FLTK logo

[Library] r8991 - in branches/branch-3.0: . fluid ide/VisualC2008 ide/VisualC2010 ide/VisualC6 ide/Xcode4/plists include include/fltk3 include/fltk3jpeg include/fltk3png include/fltk3zlib src src/core src/core/xutf8 src/core/xutf8/headers src/core/xutf8/lcUniConv src/core/xutf8/utils src/jpeg src/png src/zlib test

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r8991 - in branches/branch-3.0: . fluid ide/VisualC2008 ide/VisualC2010 ide/VisualC6 ide/Xcode4/plists include include/fltk3 include/fltk3jpeg include/fltk3png include/fltk3zlib src src/core src/core/xutf8 src/core/xutf8/headers src/core/xutf8/lcUniConv src/core/xutf8/utils src/jpeg src/png src/zlib test fltk-dev Aug 22, 2011  
 
Author: matt
Date: 2011-08-22 08:21:44 -0700 (Mon, 22 Aug 2011)
New Revision: 8991
Log:
FLTK3: THE BIG FILE SHUFFLE

=== THIS RELEASE BUILDS ONLY USING THE AUTOCONF/MAKEFILE SYSTEM - IF AT ALL! ===

Ok, so here is the big file shuffle, part 1: 

 - all "simple" libraries are now included (jpeg, png, zlib become fltk3jpeg etc.) 
   rationale: Fluid (and all the tests) have no external dependencies, even 
   when built on a system with jpeg libraries, but run on a system without
 - all library names start with "fltk3" 
   rationale: avoid naming conflicts with fltk1 and fltk2
 - all "_" characters were removed from library names
   rationale: those seem to be unsupported in OS X framework names and cause warnings
 - all headers are now in a directory named include/ 
   rationale: clean up the top level directory
 - all headers are in a subdirectory strictly named after their library (jpeg/ -> fltk3jpeg/)
   and all sources are in a directory named after their library, minus the "fltk3" (jpeg/ -> src/jpeg/)
   rationale: allow auto-genration of build environments for further additional
   libraries in FLTK3, for example fltk3cairo, etc. . 
 

Still to do:

 - Fluid will become Fluid3
   rationale: avoid naming conflicts with fltk 1 and 2
 - fltk gl headers go into include/fltk3gl/, fltk images headers in include/fltk3images
   rationale: additional libraries always have their headers named in the same naming system
 - add 'all.h' and '`libname`.h' to all include directories
   rationale: this will make work with the libraries easier by allowing #include <fltk3/all.h>
   which includes everything available. It helps debugging header files, and it will be consistent
   among libraries (#include <fltk3gl/all.h>). It also accelerates compilation when using
   precompiled headers. And last-not-least, the alternative syntax #include <ftk3/fltk3.h> 
   is standard for OS X frameworks.
 - rename Fl_... .cxx files into their FLTK3 name counterpart
   rationale: avoid confusion with FLTK 1 class naming

I hope you guys are not completely shocked by this commit and will stick with me.
Nothing really changed or moved further than one directory away.

 - Matthias




Added:
   branches/branch-3.0/ide/VisualC2008/fltk3.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk3gl.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk3images.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk3jpeg.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk3png.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk3zlib.vcproj
   branches/branch-3.0/ide/VisualC2010/fltk3.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk3gl.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk3images.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk3jpeg.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk3png.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk3zlib.vcxproj
   branches/branch-3.0/ide/VisualC6/fltk3.dsp
   branches/branch-3.0/ide/VisualC6/fltk3gl.dsp
   branches/branch-3.0/ide/VisualC6/fltk3images.dsp
   branches/branch-3.0/ide/VisualC6/fltk3jpeg.dsp
   branches/branch-3.0/ide/VisualC6/fltk3png.dsp
   branches/branch-3.0/ide/VisualC6/fltk3zlib.dsp
   branches/branch-3.0/ide/Xcode4/plists/fltk3-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk3gl-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk3images-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk3jpeg-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk3png-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk3zlib-Info.plist
   branches/branch-3.0/include/
   branches/branch-3.0/include/FL/
   branches/branch-3.0/include/GL/
   branches/branch-3.0/include/fltk/
   branches/branch-3.0/include/fltk3/
   branches/branch-3.0/include/fltk3/Browser_.h
   branches/branch-3.0/include/fltk3/Button.h
   branches/branch-3.0/include/fltk3/Chart.h
   branches/branch-3.0/include/fltk3/Counter.h
   branches/branch-3.0/include/fltk3/HelpView.h
   branches/branch-3.0/include/fltk3/Input_.h
   branches/branch-3.0/include/fltk3/MenuItem.h
   branches/branch-3.0/include/fltk3/Menu_.h
   branches/branch-3.0/include/fltk3/Style.h
   branches/branch-3.0/include/fltk3/SysMenuBar.h
   branches/branch-3.0/include/fltk3/TextDisplay.h
   branches/branch-3.0/include/fltk3/TextEditor.h
   branches/branch-3.0/include/fltk3/Tree.h
   branches/branch-3.0/include/fltk3/ValueInput.h
   branches/branch-3.0/include/fltk3/ValueOutput.h
   branches/branch-3.0/include/fltk3/ValueSlider.h
   branches/branch-3.0/include/fltk3/Widget.h
   branches/branch-3.0/include/fltk3/osx.h
   branches/branch-3.0/include/fltk3/run.h
   branches/branch-3.0/include/fltk3gl/
   branches/branch-3.0/include/fltk3jpeg/
   branches/branch-3.0/include/fltk3jpeg/jconfig.h
   branches/branch-3.0/include/fltk3jpeg/jdct.h
   branches/branch-3.0/include/fltk3jpeg/jerror.h
   branches/branch-3.0/include/fltk3jpeg/jinclude.h
   branches/branch-3.0/include/fltk3jpeg/jmemsys.h
   branches/branch-3.0/include/fltk3jpeg/jmorecfg.h
   branches/branch-3.0/include/fltk3jpeg/jpegint.h
   branches/branch-3.0/include/fltk3jpeg/jpeglib.h
   branches/branch-3.0/include/fltk3jpeg/jversion.h
   branches/branch-3.0/include/fltk3png/
   branches/branch-3.0/include/fltk3png/png.h
   branches/branch-3.0/include/fltk3png/pngconf.h
   branches/branch-3.0/include/fltk3png/pngdebug.h
   branches/branch-3.0/include/fltk3png/pnginfo.h
   branches/branch-3.0/include/fltk3png/pnglibconf.h
   branches/branch-3.0/include/fltk3png/pngpriv.h
   branches/branch-3.0/include/fltk3png/pngstruct.h
   branches/branch-3.0/include/fltk3zlib/
   branches/branch-3.0/include/fltk3zlib/crc32.h
   branches/branch-3.0/include/fltk3zlib/deflate.h
   branches/branch-3.0/include/fltk3zlib/gzguts.h
   branches/branch-3.0/include/fltk3zlib/inffast.h
   branches/branch-3.0/include/fltk3zlib/inffixed.h
   branches/branch-3.0/include/fltk3zlib/inflate.h
   branches/branch-3.0/include/fltk3zlib/inftrees.h
   branches/branch-3.0/include/fltk3zlib/trees.h
   branches/branch-3.0/include/fltk3zlib/zconf.h
   branches/branch-3.0/include/fltk3zlib/zlib.h
   branches/branch-3.0/include/fltk3zlib/zutil.h
   branches/branch-3.0/src/core/
   branches/branch-3.0/src/core/Fl.cxx
   branches/branch-3.0/src/core/Fl_Adjuster.cxx
   branches/branch-3.0/src/core/Fl_BMP_Image.cxx
   branches/branch-3.0/src/core/Fl_Bitmap.cxx
   branches/branch-3.0/src/core/Fl_Box.cxx
   branches/branch-3.0/src/core/Fl_Browser.cxx
   branches/branch-3.0/src/core/Fl_Browser_.cxx
   branches/branch-3.0/src/core/Fl_Browser_load.cxx
   branches/branch-3.0/src/core/Fl_Button.cxx
   branches/branch-3.0/src/core/Fl_Chart.cxx
   branches/branch-3.0/src/core/Fl_Check_Browser.cxx
   branches/branch-3.0/src/core/Fl_Check_Button.cxx
   branches/branch-3.0/src/core/Fl_Choice.cxx
   branches/branch-3.0/src/core/Fl_Clock.cxx
   branches/branch-3.0/src/core/Fl_Color_Chooser.cxx
   branches/branch-3.0/src/core/Fl_Counter.cxx
   branches/branch-3.0/src/core/Fl_Device.cxx
   branches/branch-3.0/src/core/Fl_Dial.cxx
   branches/branch-3.0/src/core/Fl_Double_Window.cxx
   branches/branch-3.0/src/core/Fl_File_Browser.cxx
   branches/branch-3.0/src/core/Fl_File_Chooser.cxx
   branches/branch-3.0/src/core/Fl_File_Chooser.fl
   branches/branch-3.0/src/core/Fl_File_Chooser2.cxx
   branches/branch-3.0/src/core/Fl_File_Icon.cxx
   branches/branch-3.0/src/core/Fl_File_Icon2.cxx
   branches/branch-3.0/src/core/Fl_File_Input.cxx
   branches/branch-3.0/src/core/Fl_Font.H
   branches/branch-3.0/src/core/Fl_GDI_Printer.cxx
   branches/branch-3.0/src/core/Fl_GIF_Image.cxx
   branches/branch-3.0/src/core/Fl_Gl_Choice.H
   branches/branch-3.0/src/core/Fl_Gl_Choice.cxx
   branches/branch-3.0/src/core/Fl_Gl_Device_Plugin.cxx
   branches/branch-3.0/src/core/Fl_Gl_Overlay.cxx
   branches/branch-3.0/src/core/Fl_Gl_Window.cxx
   branches/branch-3.0/src/core/Fl_Group.cxx
   branches/branch-3.0/src/core/Fl_Help_Dialog.cxx
   branches/branch-3.0/src/core/Fl_Help_Dialog.fl
   branches/branch-3.0/src/core/Fl_Help_Dialog_Dox.cxx
   branches/branch-3.0/src/core/Fl_Help_View.cxx
   branches/branch-3.0/src/core/Fl_Image.cxx
   branches/branch-3.0/src/core/Fl_Input.cxx
   branches/branch-3.0/src/core/Fl_Input_.cxx
   branches/branch-3.0/src/core/Fl_JPEG_Image.cxx
   branches/branch-3.0/src/core/Fl_Light_Button.cxx
   branches/branch-3.0/src/core/Fl_Menu.cxx
   branches/branch-3.0/src/core/Fl_Menu_.cxx
   branches/branch-3.0/src/core/Fl_Menu_Bar.cxx
   branches/branch-3.0/src/core/Fl_Menu_Button.cxx
   branches/branch-3.0/src/core/Fl_Menu_Window.cxx
   branches/branch-3.0/src/core/Fl_Menu_add.cxx
   branches/branch-3.0/src/core/Fl_Menu_global.cxx
   branches/branch-3.0/src/core/Fl_Multi_Label.cxx
   branches/branch-3.0/src/core/Fl_Native_File_Chooser.cxx
   branches/branch-3.0/src/core/Fl_Native_File_Chooser_FLTK.cxx
   branches/branch-3.0/src/core/Fl_Native_File_Chooser_MAC.mm
   branches/branch-3.0/src/core/Fl_Native_File_Chooser_WIN32.cxx
   branches/branch-3.0/src/core/Fl_Native_File_Chooser_common.cxx
   branches/branch-3.0/src/core/Fl_Overlay_Window.cxx
   branches/branch-3.0/src/core/Fl_PNG_Image.cxx
   branches/branch-3.0/src/core/Fl_PNM_Image.cxx
   branches/branch-3.0/src/core/Fl_Pack.cxx
   branches/branch-3.0/src/core/Fl_Paged_Device.cxx
   branches/branch-3.0/src/core/Fl_Pixmap.cxx
   branches/branch-3.0/src/core/Fl_Positioner.cxx
   branches/branch-3.0/src/core/Fl_PostScript.cxx
   branches/branch-3.0/src/core/Fl_Preferences.cxx
   branches/branch-3.0/src/core/Fl_Printer.cxx
   branches/branch-3.0/src/core/Fl_Progress.cxx
   branches/branch-3.0/src/core/Fl_Quartz_Printer.mm
   branches/branch-3.0/src/core/Fl_Repeat_Button.cxx
   branches/branch-3.0/src/core/Fl_Return_Button.cxx
   branches/branch-3.0/src/core/Fl_Roller.cxx
   branches/branch-3.0/src/core/Fl_Round_Button.cxx
   branches/branch-3.0/src/core/Fl_Scroll.cxx
   branches/branch-3.0/src/core/Fl_Scrollbar.cxx
   branches/branch-3.0/src/core/Fl_Shared_Image.cxx
   branches/branch-3.0/src/core/Fl_Single_Window.cxx
   branches/branch-3.0/src/core/Fl_Slider.cxx
   branches/branch-3.0/src/core/Fl_Sys_Menu_Bar.cxx
   branches/branch-3.0/src/core/Fl_Table.cxx
   branches/branch-3.0/src/core/Fl_Table_Row.cxx
   branches/branch-3.0/src/core/Fl_Tabs.cxx
   branches/branch-3.0/src/core/Fl_Text_Buffer.cxx
   branches/branch-3.0/src/core/Fl_Text_Display.cxx
   branches/branch-3.0/src/core/Fl_Text_Editor.cxx
   branches/branch-3.0/src/core/Fl_Tile.cxx
   branches/branch-3.0/src/core/Fl_Tiled_Image.cxx
   branches/branch-3.0/src/core/Fl_Tooltip.cxx
   branches/branch-3.0/src/core/Fl_Tree.cxx
   branches/branch-3.0/src/core/Fl_Tree_Item.cxx
   branches/branch-3.0/src/core/Fl_Tree_Item_Array.cxx
   branches/branch-3.0/src/core/Fl_Tree_Prefs.cxx
   branches/branch-3.0/src/core/Fl_Valuator.cxx
   branches/branch-3.0/src/core/Fl_Value_Input.cxx
   branches/branch-3.0/src/core/Fl_Value_Output.cxx
   branches/branch-3.0/src/core/Fl_Value_Slider.cxx
   branches/branch-3.0/src/core/Fl_Widget.cxx
   branches/branch-3.0/src/core/Fl_Window.cxx
   branches/branch-3.0/src/core/Fl_Window_fullscreen.cxx
   branches/branch-3.0/src/core/Fl_Window_hotspot.cxx
   branches/branch-3.0/src/core/Fl_Window_iconize.cxx
   branches/branch-3.0/src/core/Fl_Wizard.cxx
   branches/branch-3.0/src/core/Fl_XBM_Image.cxx
   branches/branch-3.0/src/core/Fl_XColor.H
   branches/branch-3.0/src/core/Fl_XPM_Image.cxx
   branches/branch-3.0/src/core/Fl_abort.cxx
   branches/branch-3.0/src/core/Fl_add_idle.cxx
   branches/branch-3.0/src/core/Fl_arg.cxx
   branches/branch-3.0/src/core/Fl_cocoa.mm
   branches/branch-3.0/src/core/Fl_compose.cxx
   branches/branch-3.0/src/core/Fl_display.cxx
   branches/branch-3.0/src/core/Fl_get_key.cxx
   branches/branch-3.0/src/core/Fl_get_key_mac.cxx
   branches/branch-3.0/src/core/Fl_get_key_win32.cxx
   branches/branch-3.0/src/core/Fl_get_system_colors.cxx
   branches/branch-3.0/src/core/Fl_grab.cxx
   branches/branch-3.0/src/core/Fl_lock.cxx
   branches/branch-3.0/src/core/Fl_mac.cxx
   branches/branch-3.0/src/core/Fl_own_colormap.cxx
   branches/branch-3.0/src/core/Fl_visual.cxx
   branches/branch-3.0/src/core/Fl_win32.cxx
   branches/branch-3.0/src/core/Fl_x.cxx
   branches/branch-3.0/src/core/Style.cxx
   branches/branch-3.0/src/core/aimm.h
   branches/branch-3.0/src/core/allfiles.xbm
   branches/branch-3.0/src/core/cgdebug.h
   branches/branch-3.0/src/core/cmap.cxx
   branches/branch-3.0/src/core/d1.xbm
   branches/branch-3.0/src/core/d1_mask.xbm
   branches/branch-3.0/src/core/dump_compose.c
   branches/branch-3.0/src/core/ew.xbm
   branches/branch-3.0/src/core/ew_mask.xbm
   branches/branch-3.0/src/core/fastarrow.h
   branches/branch-3.0/src/core/filename_absolute.cxx
   branches/branch-3.0/src/core/filename_expand.cxx
   branches/branch-3.0/src/core/filename_ext.cxx
   branches/branch-3.0/src/core/filename_isdir.cxx
   branches/branch-3.0/src/core/filename_list.cxx
   branches/branch-3.0/src/core/filename_match.cxx
   branches/branch-3.0/src/core/filename_setext.cxx
   branches/branch-3.0/src/core/fl_arc.cxx
   branches/branch-3.0/src/core/fl_arci.cxx
   branches/branch-3.0/src/core/fl_ask.cxx
   branches/branch-3.0/src/core/fl_boxtype.cxx
   branches/branch-3.0/src/core/fl_call_main.cxx
   branches/branch-3.0/src/core/fl_cmap.h
   branches/branch-3.0/src/core/fl_color.cxx
   branches/branch-3.0/src/core/fl_color_mac.cxx
   branches/branch-3.0/src/core/fl_color_win32.cxx
   branches/branch-3.0/src/core/fl_cursor.cxx
   branches/branch-3.0/src/core/fl_curve.cxx
   branches/branch-3.0/src/core/fl_diamond_box.cxx
   branches/branch-3.0/src/core/fl_dnd.cxx
   branches/branch-3.0/src/core/fl_dnd_win32.cxx
   branches/branch-3.0/src/core/fl_dnd_x.cxx
   branches/branch-3.0/src/core/fl_draw.cxx
   branches/branch-3.0/src/core/fl_draw_image.cxx
   branches/branch-3.0/src/core/fl_draw_image_mac.cxx
   branches/branch-3.0/src/core/fl_draw_image_win32.cxx
   branches/branch-3.0/src/core/fl_draw_pixmap.cxx
   branches/branch-3.0/src/core/fl_encoding_latin1.cxx
   branches/branch-3.0/src/core/fl_encoding_mac_roman.cxx
   branches/branch-3.0/src/core/fl_engraved_label.cxx
   branches/branch-3.0/src/core/fl_file_dir.cxx
   branches/branch-3.0/src/core/fl_font.cxx
   branches/branch-3.0/src/core/fl_font_mac.cxx
   branches/branch-3.0/src/core/fl_font_win32.cxx
   branches/branch-3.0/src/core/fl_font_x.cxx
   branches/branch-3.0/src/core/fl_font_xft.cxx
   branches/branch-3.0/src/core/fl_gtk.cxx
   branches/branch-3.0/src/core/fl_images_core.cxx
   branches/branch-3.0/src/core/fl_labeltype.cxx
   branches/branch-3.0/src/core/fl_line_style.cxx
   branches/branch-3.0/src/core/fl_open_uri.cxx
   branches/branch-3.0/src/core/fl_oval_box.cxx
   branches/branch-3.0/src/core/fl_overlay.cxx
   branches/branch-3.0/src/core/fl_overlay_visual.cxx
   branches/branch-3.0/src/core/fl_plastic.cxx
   branches/branch-3.0/src/core/fl_read_image.cxx
   branches/branch-3.0/src/core/fl_read_image_mac.cxx
   branches/branch-3.0/src/core/fl_read_image_win32.cxx
   branches/branch-3.0/src/core/fl_rect.cxx
   branches/branch-3.0/src/core/fl_round_box.cxx
   branches/branch-3.0/src/core/fl_rounded_box.cxx
   branches/branch-3.0/src/core/fl_scroll_area.cxx
   branches/branch-3.0/src/core/fl_set_font.cxx
   branches/branch-3.0/src/core/fl_set_fonts.cxx
   branches/branch-3.0/src/core/fl_set_fonts_mac.cxx
   branches/branch-3.0/src/core/fl_set_fonts_win32.cxx
   branches/branch-3.0/src/core/fl_set_fonts_x.cxx
   branches/branch-3.0/src/core/fl_set_fonts_xft.cxx
   branches/branch-3.0/src/core/fl_shadow_box.cxx
   branches/branch-3.0/src/core/fl_shortcut.cxx
   branches/branch-3.0/src/core/fl_show_colormap.cxx
   branches/branch-3.0/src/core/fl_symbols.cxx
   branches/branch-3.0/src/core/fl_utf.cxx
   branches/branch-3.0/src/core/fl_utf8.cxx
   branches/branch-3.0/src/core/fl_vertex.cxx
   branches/branch-3.0/src/core/flstring.c
   branches/branch-3.0/src/core/flstring.h
   branches/branch-3.0/src/core/forms_bitmap.cxx
   branches/branch-3.0/src/core/forms_compatability.cxx
   branches/branch-3.0/src/core/forms_fselect.cxx
   branches/branch-3.0/src/core/forms_pixmap.cxx
   branches/branch-3.0/src/core/forms_timer.cxx
   branches/branch-3.0/src/core/freeglut_geometry.cxx
   branches/branch-3.0/src/core/freeglut_stroke_mono_roman.cxx
   branches/branch-3.0/src/core/freeglut_stroke_roman.cxx
   branches/branch-3.0/src/core/freeglut_teapot.cxx
   branches/branch-3.0/src/core/freeglut_teapot_data.h
   branches/branch-3.0/src/core/gl_draw.cxx
   branches/branch-3.0/src/core/gl_start.cxx
   branches/branch-3.0/src/core/glut_compatability.cxx
   branches/branch-3.0/src/core/glut_font.cxx
   branches/branch-3.0/src/core/mediumarrow.h
   branches/branch-3.0/src/core/new.xbm
   branches/branch-3.0/src/core/ns.xbm
   branches/branch-3.0/src/core/ns_mask.xbm
   branches/branch-3.0/src/core/numericsort.cxx
   branches/branch-3.0/src/core/print_panel.cxx
   branches/branch-3.0/src/core/print_panel.h
   branches/branch-3.0/src/core/ps_image.cxx
   branches/branch-3.0/src/core/scandir.cxx
   branches/branch-3.0/src/core/scandir_win32.cxx
   branches/branch-3.0/src/core/screen_xywh.cxx
   branches/branch-3.0/src/core/slowarrow.h
   branches/branch-3.0/src/core/tile.xpm
   branches/branch-3.0/src/core/up.xbm
   branches/branch-3.0/src/core/vsnprintf.c
   branches/branch-3.0/src/core/xutf8/
   branches/branch-3.0/src/core/xutf8/COPYING
   branches/branch-3.0/src/core/xutf8/MAPPINGS/
   branches/branch-3.0/src/core/xutf8/README
   branches/branch-3.0/src/core/xutf8/Ximint.h
   branches/branch-3.0/src/core/xutf8/Xlibint.h
   branches/branch-3.0/src/core/xutf8/case.c
   branches/branch-3.0/src/core/xutf8/fl_wcwidth.c
   branches/branch-3.0/src/core/xutf8/headers/
   branches/branch-3.0/src/core/xutf8/headers/case.h
   branches/branch-3.0/src/core/xutf8/headers/case_tbl.txt
   branches/branch-3.0/src/core/xutf8/headers/dingbats_.h
   branches/branch-3.0/src/core/xutf8/headers/spacing.h
   branches/branch-3.0/src/core/xutf8/headers/spacing_tbl.txt
   branches/branch-3.0/src/core/xutf8/headers/symbol_.h
   branches/branch-3.0/src/core/xutf8/headers/tbl.txt
   branches/branch-3.0/src/core/xutf8/imKStoUCS.c
   branches/branch-3.0/src/core/xutf8/is_right2left.c
   branches/branch-3.0/src/core/xutf8/is_spacing.c
   branches/branch-3.0/src/core/xutf8/keysym2Ucs.c
   branches/branch-3.0/src/core/xutf8/lcUniConv/
   branches/branch-3.0/src/core/xutf8/lcUniConv/8bit_tab_to_h.c
   branches/branch-3.0/src/core/xutf8/lcUniConv/COPYRIGHT
   branches/branch-3.0/src/core/xutf8/lcUniConv/README
   branches/branch-3.0/src/core/xutf8/lcUniConv/armscii_8.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/ascii.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/big5.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/big5_emacs.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/cjk_tab_to_h.c
   branches/branch-3.0/src/core/xutf8/lcUniConv/cp1133.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/cp1251.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/cp1255.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/cp1256.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/cp936ext.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/gb2312.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/gbk_tab_to_h.c
   branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_academy.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_ps.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_1.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_10.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_11.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_13.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_14.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_15.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_16.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_2.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_3.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_4.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_5.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_6.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_7.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_8.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9e.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0201.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0208.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0212.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_c.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_r.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_u.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/ksc5601.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/mulelao.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/tatar_cyr.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/tcvn.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/tis620.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/ucs2be.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/utf8.h
   branches/branch-3.0/src/core/xutf8/lcUniConv/viscii.h
   branches/branch-3.0/src/core/xutf8/mk_wcwidth.c
   branches/branch-3.0/src/core/xutf8/stamp-h
   branches/branch-3.0/src/core/xutf8/stamp-h.in
   branches/branch-3.0/src/core/xutf8/test.c
   branches/branch-3.0/src/core/xutf8/test2.c
   branches/branch-3.0/src/core/xutf8/ucs2fontmap.c
   branches/branch-3.0/src/core/xutf8/ucs2fontmap.c.mini
   branches/branch-3.0/src/core/xutf8/utf8Input.c
   branches/branch-3.0/src/core/xutf8/utf8Utils.c
   branches/branch-3.0/src/core/xutf8/utf8Wrap.c
   branches/branch-3.0/src/core/xutf8/utils/
   branches/branch-3.0/src/core/xutf8/utils/INSTALL
   branches/branch-3.0/src/core/xutf8/utils/Makefile
   branches/branch-3.0/src/core/xutf8/utils/README
   branches/branch-3.0/src/core/xutf8/utils/case.sh
   branches/branch-3.0/src/core/xutf8/utils/conv_gen.c
   branches/branch-3.0/src/core/xutf8/utils/convert_map.c
   branches/branch-3.0/src/core/xutf8/utils/create_table.c
   branches/branch-3.0/src/core/xutf8/utils/euc_tw.c
   branches/branch-3.0/src/core/xutf8/utils/non_spacing.sh
   branches/branch-3.0/src/core/xutf8/utils/tbl_gen.sh
   branches/branch-3.0/src/jpeg/
   branches/branch-3.0/src/png/
   branches/branch-3.0/src/zlib/
Removed:
   branches/branch-3.0/FL/
   branches/branch-3.0/GL/
   branches/branch-3.0/fltk/
   branches/branch-3.0/fltk3/
   branches/branch-3.0/ide/VisualC2008/fltk.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk_gl.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk_images.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk_jpeg.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk_png.vcproj
   branches/branch-3.0/ide/VisualC2008/fltk_zlib.vcproj
   branches/branch-3.0/ide/VisualC2010/fltk.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk_gl.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk_images.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk_jpeg.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk_png.vcxproj
   branches/branch-3.0/ide/VisualC2010/fltk_zlib.vcxproj
   branches/branch-3.0/ide/VisualC6/fltk.dsp
   branches/branch-3.0/ide/VisualC6/fltk_gl.dsp
   branches/branch-3.0/ide/VisualC6/fltk_images.dsp
   branches/branch-3.0/ide/VisualC6/fltk_jpeg.dsp
   branches/branch-3.0/ide/VisualC6/fltk_png.dsp
   branches/branch-3.0/ide/VisualC6/fltk_zlib.dsp
   branches/branch-3.0/ide/Xcode4/plists/fltk-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk_forms-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk_gl-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk_images-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk_jpeg-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk_png-Info.plist
   branches/branch-3.0/ide/Xcode4/plists/fltk_zlib-Info.plist
   branches/branch-3.0/include/fltk3/Browser_.h
   branches/branch-3.0/include/fltk3/Button.h
   branches/branch-3.0/include/fltk3/Chart.h
   branches/branch-3.0/include/fltk3/Counter.h
   branches/branch-3.0/include/fltk3/HelpView.h
   branches/branch-3.0/include/fltk3/Input_.h
   branches/branch-3.0/include/fltk3/MenuItem.h
   branches/branch-3.0/include/fltk3/Menu_.h
   branches/branch-3.0/include/fltk3/SysMenuBar.h
   branches/branch-3.0/include/fltk3/TextDisplay.h
   branches/branch-3.0/include/fltk3/TextEditor.h
   branches/branch-3.0/include/fltk3/Tree.h
   branches/branch-3.0/include/fltk3/ValueInput.h
   branches/branch-3.0/include/fltk3/ValueOutput.h
   branches/branch-3.0/include/fltk3/ValueSlider.h
   branches/branch-3.0/include/fltk3/Widget.h
   branches/branch-3.0/include/fltk3/osx.h
   branches/branch-3.0/include/fltk3/run.h
   branches/branch-3.0/jpeg/
   branches/branch-3.0/png/
   branches/branch-3.0/src/Fl.cxx
   branches/branch-3.0/src/Fl_Adjuster.cxx
   branches/branch-3.0/src/Fl_BMP_Image.cxx
   branches/branch-3.0/src/Fl_Bitmap.cxx
   branches/branch-3.0/src/Fl_Box.cxx
   branches/branch-3.0/src/Fl_Browser.cxx
   branches/branch-3.0/src/Fl_Browser_.cxx
   branches/branch-3.0/src/Fl_Browser_load.cxx
   branches/branch-3.0/src/Fl_Button.cxx
   branches/branch-3.0/src/Fl_Chart.cxx
   branches/branch-3.0/src/Fl_Check_Browser.cxx
   branches/branch-3.0/src/Fl_Check_Button.cxx
   branches/branch-3.0/src/Fl_Choice.cxx
   branches/branch-3.0/src/Fl_Clock.cxx
   branches/branch-3.0/src/Fl_Color_Chooser.cxx
   branches/branch-3.0/src/Fl_Counter.cxx
   branches/branch-3.0/src/Fl_Device.cxx
   branches/branch-3.0/src/Fl_Dial.cxx
   branches/branch-3.0/src/Fl_Double_Window.cxx
   branches/branch-3.0/src/Fl_File_Browser.cxx
   branches/branch-3.0/src/Fl_File_Chooser.cxx
   branches/branch-3.0/src/Fl_File_Chooser.fl
   branches/branch-3.0/src/Fl_File_Chooser2.cxx
   branches/branch-3.0/src/Fl_File_Icon.cxx
   branches/branch-3.0/src/Fl_File_Icon2.cxx
   branches/branch-3.0/src/Fl_File_Input.cxx
   branches/branch-3.0/src/Fl_Font.H
   branches/branch-3.0/src/Fl_GDI_Printer.cxx
   branches/branch-3.0/src/Fl_GIF_Image.cxx
   branches/branch-3.0/src/Fl_Gl_Choice.H
   branches/branch-3.0/src/Fl_Gl_Choice.cxx
   branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx
   branches/branch-3.0/src/Fl_Gl_Overlay.cxx
   branches/branch-3.0/src/Fl_Gl_Window.cxx
   branches/branch-3.0/src/Fl_Group.cxx
   branches/branch-3.0/src/Fl_Help_Dialog.cxx
   branches/branch-3.0/src/Fl_Help_Dialog.fl
   branches/branch-3.0/src/Fl_Help_Dialog_Dox.cxx
   branches/branch-3.0/src/Fl_Help_View.cxx
   branches/branch-3.0/src/Fl_Image.cxx
   branches/branch-3.0/src/Fl_Input.cxx
   branches/branch-3.0/src/Fl_Input_.cxx
   branches/branch-3.0/src/Fl_JPEG_Image.cxx
   branches/branch-3.0/src/Fl_Light_Button.cxx
   branches/branch-3.0/src/Fl_Menu.cxx
   branches/branch-3.0/src/Fl_Menu_.cxx
   branches/branch-3.0/src/Fl_Menu_Bar.cxx
   branches/branch-3.0/src/Fl_Menu_Button.cxx
   branches/branch-3.0/src/Fl_Menu_Window.cxx
   branches/branch-3.0/src/Fl_Menu_add.cxx
   branches/branch-3.0/src/Fl_Menu_global.cxx
   branches/branch-3.0/src/Fl_Multi_Label.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.mm
   branches/branch-3.0/src/Fl_Native_File_Chooser_WIN32.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser_common.cxx
   branches/branch-3.0/src/Fl_Overlay_Window.cxx
   branches/branch-3.0/src/Fl_PNG_Image.cxx
   branches/branch-3.0/src/Fl_PNM_Image.cxx
   branches/branch-3.0/src/Fl_Pack.cxx
   branches/branch-3.0/src/Fl_Paged_Device.cxx
   branches/branch-3.0/src/Fl_Pixmap.cxx
   branches/branch-3.0/src/Fl_Positioner.cxx
   branches/branch-3.0/src/Fl_PostScript.cxx
   branches/branch-3.0/src/Fl_Preferences.cxx
   branches/branch-3.0/src/Fl_Printer.cxx
   branches/branch-3.0/src/Fl_Progress.cxx
   branches/branch-3.0/src/Fl_Quartz_Printer.mm
   branches/branch-3.0/src/Fl_Repeat_Button.cxx
   branches/branch-3.0/src/Fl_Return_Button.cxx
   branches/branch-3.0/src/Fl_Roller.cxx
   branches/branch-3.0/src/Fl_Round_Button.cxx
   branches/branch-3.0/src/Fl_Scroll.cxx
   branches/branch-3.0/src/Fl_Scrollbar.cxx
   branches/branch-3.0/src/Fl_Shared_Image.cxx
   branches/branch-3.0/src/Fl_Single_Window.cxx
   branches/branch-3.0/src/Fl_Slider.cxx
   branches/branch-3.0/src/Fl_Sys_Menu_Bar.cxx
   branches/branch-3.0/src/Fl_Table.cxx
   branches/branch-3.0/src/Fl_Table_Row.cxx
   branches/branch-3.0/src/Fl_Tabs.cxx
   branches/branch-3.0/src/Fl_Text_Buffer.cxx
   branches/branch-3.0/src/Fl_Text_Display.cxx
   branches/branch-3.0/src/Fl_Text_Editor.cxx
   branches/branch-3.0/src/Fl_Tile.cxx
   branches/branch-3.0/src/Fl_Tiled_Image.cxx
   branches/branch-3.0/src/Fl_Tooltip.cxx
   branches/branch-3.0/src/Fl_Tree.cxx
   branches/branch-3.0/src/Fl_Tree_Item.cxx
   branches/branch-3.0/src/Fl_Tree_Item_Array.cxx
   branches/branch-3.0/src/Fl_Tree_Prefs.cxx
   branches/branch-3.0/src/Fl_Valuator.cxx
   branches/branch-3.0/src/Fl_Value_Input.cxx
   branches/branch-3.0/src/Fl_Value_Output.cxx
   branches/branch-3.0/src/Fl_Value_Slider.cxx
   branches/branch-3.0/src/Fl_Widget.cxx
   branches/branch-3.0/src/Fl_Window.cxx
   branches/branch-3.0/src/Fl_Window_fullscreen.cxx
   branches/branch-3.0/src/Fl_Window_hotspot.cxx
   branches/branch-3.0/src/Fl_Window_iconize.cxx
   branches/branch-3.0/src/Fl_Wizard.cxx
   branches/branch-3.0/src/Fl_XBM_Image.cxx
   branches/branch-3.0/src/Fl_XColor.H
   branches/branch-3.0/src/Fl_XPM_Image.cxx
   branches/branch-3.0/src/Fl_abort.cxx
   branches/branch-3.0/src/Fl_add_idle.cxx
   branches/branch-3.0/src/Fl_arg.cxx
   branches/branch-3.0/src/Fl_cocoa.mm
   branches/branch-3.0/src/Fl_compose.cxx
   branches/branch-3.0/src/Fl_display.cxx
   branches/branch-3.0/src/Fl_get_key.cxx
   branches/branch-3.0/src/Fl_get_key_mac.cxx
   branches/branch-3.0/src/Fl_get_key_win32.cxx
   branches/branch-3.0/src/Fl_get_system_colors.cxx
   branches/branch-3.0/src/Fl_grab.cxx
   branches/branch-3.0/src/Fl_lock.cxx
   branches/branch-3.0/src/Fl_mac.cxx
   branches/branch-3.0/src/Fl_own_colormap.cxx
   branches/branch-3.0/src/Fl_visual.cxx
   branches/branch-3.0/src/Fl_win32.cxx
   branches/branch-3.0/src/Fl_x.cxx
   branches/branch-3.0/src/Style.cxx
   branches/branch-3.0/src/aimm.h
   branches/branch-3.0/src/allfiles.xbm
   branches/branch-3.0/src/cgdebug.h
   branches/branch-3.0/src/cmap.cxx
   branches/branch-3.0/src/d1.xbm
   branches/branch-3.0/src/d1_mask.xbm
   branches/branch-3.0/src/dump_compose.c
   branches/branch-3.0/src/ew.xbm
   branches/branch-3.0/src/ew_mask.xbm
   branches/branch-3.0/src/fastarrow.h
   branches/branch-3.0/src/filename_absolute.cxx
   branches/branch-3.0/src/filename_expand.cxx
   branches/branch-3.0/src/filename_ext.cxx
   branches/branch-3.0/src/filename_isdir.cxx
   branches/branch-3.0/src/filename_list.cxx
   branches/branch-3.0/src/filename_match.cxx
   branches/branch-3.0/src/filename_setext.cxx
   branches/branch-3.0/src/fl_arc.cxx
   branches/branch-3.0/src/fl_arci.cxx
   branches/branch-3.0/src/fl_ask.cxx
   branches/branch-3.0/src/fl_boxtype.cxx
   branches/branch-3.0/src/fl_call_main.cxx
   branches/branch-3.0/src/fl_cmap.h
   branches/branch-3.0/src/fl_color.cxx
   branches/branch-3.0/src/fl_color_mac.cxx
   branches/branch-3.0/src/fl_color_win32.cxx
   branches/branch-3.0/src/fl_cursor.cxx
   branches/branch-3.0/src/fl_curve.cxx
   branches/branch-3.0/src/fl_diamond_box.cxx
   branches/branch-3.0/src/fl_dnd.cxx
   branches/branch-3.0/src/fl_dnd_win32.cxx
   branches/branch-3.0/src/fl_dnd_x.cxx
   branches/branch-3.0/src/fl_draw.cxx
   branches/branch-3.0/src/fl_draw_image.cxx
   branches/branch-3.0/src/fl_draw_image_mac.cxx
   branches/branch-3.0/src/fl_draw_image_win32.cxx
   branches/branch-3.0/src/fl_draw_pixmap.cxx
   branches/branch-3.0/src/fl_encoding_latin1.cxx
   branches/branch-3.0/src/fl_encoding_mac_roman.cxx
   branches/branch-3.0/src/fl_engraved_label.cxx
   branches/branch-3.0/src/fl_file_dir.cxx
   branches/branch-3.0/src/fl_font.cxx
   branches/branch-3.0/src/fl_font_mac.cxx
   branches/branch-3.0/src/fl_font_win32.cxx
   branches/branch-3.0/src/fl_font_x.cxx
   branches/branch-3.0/src/fl_font_xft.cxx
   branches/branch-3.0/src/fl_gtk.cxx
   branches/branch-3.0/src/fl_images_core.cxx
   branches/branch-3.0/src/fl_labeltype.cxx
   branches/branch-3.0/src/fl_line_style.cxx
   branches/branch-3.0/src/fl_open_uri.cxx
   branches/branch-3.0/src/fl_oval_box.cxx
   branches/branch-3.0/src/fl_overlay.cxx
   branches/branch-3.0/src/fl_overlay_visual.cxx
   branches/branch-3.0/src/fl_plastic.cxx
   branches/branch-3.0/src/fl_read_image.cxx
   branches/branch-3.0/src/fl_read_image_mac.cxx
   branches/branch-3.0/src/fl_read_image_win32.cxx
   branches/branch-3.0/src/fl_rect.cxx
   branches/branch-3.0/src/fl_round_box.cxx
   branches/branch-3.0/src/fl_rounded_box.cxx
   branches/branch-3.0/src/fl_scroll_area.cxx
   branches/branch-3.0/src/fl_set_font.cxx
   branches/branch-3.0/src/fl_set_fonts.cxx
   branches/branch-3.0/src/fl_set_fonts_mac.cxx
   branches/branch-3.0/src/fl_set_fonts_win32.cxx
   branches/branch-3.0/src/fl_set_fonts_x.cxx
   branches/branch-3.0/src/fl_set_fonts_xft.cxx
   branches/branch-3.0/src/fl_shadow_box.cxx
   branches/branch-3.0/src/fl_shortcut.cxx
   branches/branch-3.0/src/fl_show_colormap.cxx
   branches/branch-3.0/src/fl_symbols.cxx
   branches/branch-3.0/src/fl_utf.cxx
   branches/branch-3.0/src/fl_utf8.cxx
   branches/branch-3.0/src/fl_vertex.cxx
   branches/branch-3.0/src/flstring.c
   branches/branch-3.0/src/flstring.h
   branches/branch-3.0/src/forms_bitmap.cxx
   branches/branch-3.0/src/forms_compatability.cxx
   branches/branch-3.0/src/forms_fselect.cxx
   branches/branch-3.0/src/forms_pixmap.cxx
   branches/branch-3.0/src/forms_timer.cxx
   branches/branch-3.0/src/freeglut_geometry.cxx
   branches/branch-3.0/src/freeglut_stroke_mono_roman.cxx
   branches/branch-3.0/src/freeglut_stroke_roman.cxx
   branches/branch-3.0/src/freeglut_teapot.cxx
   branches/branch-3.0/src/freeglut_teapot_data.h
   branches/branch-3.0/src/gl_draw.cxx
   branches/branch-3.0/src/gl_start.cxx
   branches/branch-3.0/src/glut_compatability.cxx
   branches/branch-3.0/src/glut_font.cxx
   branches/branch-3.0/src/jpeg/jconfig.h
   branches/branch-3.0/src/jpeg/jdct.h
   branches/branch-3.0/src/jpeg/jerror.h
   branches/branch-3.0/src/jpeg/jinclude.h
   branches/branch-3.0/src/jpeg/jmemsys.h
   branches/branch-3.0/src/jpeg/jmorecfg.h
   branches/branch-3.0/src/jpeg/jpegint.h
   branches/branch-3.0/src/jpeg/jpeglib.h
   branches/branch-3.0/src/jpeg/jversion.h
   branches/branch-3.0/src/mediumarrow.h
   branches/branch-3.0/src/new.xbm
   branches/branch-3.0/src/ns.xbm
   branches/branch-3.0/src/ns_mask.xbm
   branches/branch-3.0/src/numericsort.cxx
   branches/branch-3.0/src/png/png.h
   branches/branch-3.0/src/png/pngconf.h
   branches/branch-3.0/src/png/pngdebug.h
   branches/branch-3.0/src/png/pnginfo.h
   branches/branch-3.0/src/png/pnglibconf.h
   branches/branch-3.0/src/png/pngpriv.h
   branches/branch-3.0/src/png/pngstruct.h
   branches/branch-3.0/src/print_panel.cxx
   branches/branch-3.0/src/print_panel.h
   branches/branch-3.0/src/ps_image.cxx
   branches/branch-3.0/src/scandir.cxx
   branches/branch-3.0/src/scandir_win32.cxx
   branches/branch-3.0/src/screen_xywh.cxx
   branches/branch-3.0/src/slowarrow.h
   branches/branch-3.0/src/tile.xpm
   branches/branch-3.0/src/up.xbm
   branches/branch-3.0/src/vsnprintf.c
   branches/branch-3.0/src/xutf8/
   branches/branch-3.0/src/zlib/crc32.h
   branches/branch-3.0/src/zlib/deflate.h
   branches/branch-3.0/src/zlib/gzguts.h
   branches/branch-3.0/src/zlib/inffast.h
   branches/branch-3.0/src/zlib/inffixed.h
   branches/branch-3.0/src/zlib/inflate.h
   branches/branch-3.0/src/zlib/inftrees.h
   branches/branch-3.0/src/zlib/trees.h
   branches/branch-3.0/src/zlib/zconf.h
   branches/branch-3.0/src/zlib/zlib.h
   branches/branch-3.0/src/zlib/zutil.h
   branches/branch-3.0/zlib/
Modified:
   branches/branch-3.0/configure.in
   branches/branch-3.0/fltk.flw
   branches/branch-3.0/fluid/Fl_Function_Type.cxx
   branches/branch-3.0/fluid/Fl_Group_Type.cxx
   branches/branch-3.0/fluid/Fl_Menu_Type.cxx
   branches/branch-3.0/fluid/Fl_Type.cxx
   branches/branch-3.0/fluid/Fl_Widget_Type.cxx
   branches/branch-3.0/fluid/Fl_Window_Type.cxx
   branches/branch-3.0/fluid/Fluid_Image.cxx
   branches/branch-3.0/fluid/Makefile
   branches/branch-3.0/fluid/code.cxx
   branches/branch-3.0/fluid/factory.cxx
   branches/branch-3.0/fluid/file.cxx
   branches/branch-3.0/fluid/fluid.cxx
   branches/branch-3.0/fluid/makedepend
   branches/branch-3.0/fluid/template_panel.cxx
   branches/branch-3.0/fluid/undo.cxx
   branches/branch-3.0/makeinclude.in
   branches/branch-3.0/src/Makefile
   branches/branch-3.0/src/makedepend
   branches/branch-3.0/test/Makefile
   branches/branch-3.0/test/makedepend
   branches/branch-3.0/test/menubar.cxx

Modified: branches/branch-3.0/configure.in
===================================================================
--- branches/branch-3.0/configure.in	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/configure.in	2011-08-22 15:21:44 UTC (rev 8991)
@@ -31,7 +31,7 @@
 AC_PREREQ(2.50)
 
 dnl Required file in package...
-AC_INIT(src/Fl.cxx)
+AC_INIT(src/core/Fl.cxx)
 
 dnl So --with-archflags option is used during "checking size of long"
 if test `uname` = Darwin; then
@@ -116,49 +116,49 @@
 esac
 
 dnl Define the libraries and link options we will need.
-LINK_FLTK="../lib/libfltk.a"
-LINK_FLTK_GL="../lib/libfltk_gl.a"
-LINK_FLTK_IMAGES="../lib/libfltk_images.a"
-LINK_FLTK_PNG="../lib/libfltk_png.a"
-LINK_FLTK_JPEG="../lib/libfltk_jpeg.a"
-LINK_FLTK_ZLIB="../lib/libfltk_zlib.a"
+LINK_FLTK3="../lib/libfltk3.a"
+LINK_FLTK3GL="../lib/libfltk3gl.a"
+LINK_FLTK3IMAGES="../lib/libfltk3images.a"
+LINK_FLTK3PNG="../lib/libfltk3png.a"
+LINK_FLTK3JPEG="../lib/libfltk3jpeg.a"
+LINK_FLTK3ZLIB="../lib/libfltk3zlib.a"
 GLDEMOS="gldemos"
 
 LIBEXT=".a"
-FLTK_LIBNAME="../lib/libfltk.a"
-FLTK_GL_LIBNAME="../lib/libfltk_gl.a"
-FLTK_IMAGES_LIBNAME="../lib/libfltk_images.a"
-FLTK_PNG_LIBNAME="../lib/libfltk_png.a"
-FLTK_JPEG_LIBNAME="../lib/libfltk_jpeg.a"
-FLTK_ZLIB_LIBNAME="../lib/libfltk_zlib.a"
+FLTK3_LIBNAME="../lib/libfltk3.a"
+FLTK3GL_LIBNAME="../lib/libfltk3gl.a"
+FLTK3IMAGES_LIBNAME="../lib/libfltk3images.a"
+FLTK3PNG_LIBNAME="../lib/libfltk3png.a"
+FLTK3JPEG_LIBNAME="../lib/libfltk3jpeg.a"
+FLTK3ZLIB_LIBNAME="../lib/libfltk3zlib.a"
 
-FLTK_LIBBASENAME="libfltk.a"
-FLTK_GL_LIBBASENAME="libfltk_gl.a"
-FLTK_IMAGES_LIBBASENAME="libfltk_images.a"
-FLTK_PNG_LIBBASENAME="libfltk_png.a"
-FLTK_JPEG_LIBBASENAME="libfltk_jpeg.a"
-FLTK_ZLIB_LIBBASENAME="libfltk_zlib.a"
+FLTK3_LIBBASENAME="libfltk3.a"
+FLTK3GL_LIBBASENAME="libfltk3gl.a"
+FLTK3IMAGES_LIBBASENAME="libfltk3images.a"
+FLTK3PNG_LIBBASENAME="libfltk3png.a"
+FLTK3JPEG_LIBBASENAME="libfltk3jpeg.a"
+FLTK3ZLIB_LIBBASENAME="libfltk3zlib.a"
 
 AC_SUBST(GLDEMOS)
 AC_SUBST(LIBEXT)
-AC_SUBST(FLTK_LIBNAME)
-AC_SUBST(LINK_FLTK)
-AC_SUBST(FLTK_LIBBASENAME)
-AC_SUBST(FLTK_GL_LIBNAME)
-AC_SUBST(LINK_FLTK_GL)
-AC_SUBST(FLTK_GL_LIBBASENAME)
-AC_SUBST(FLTK_IMAGES_LIBNAME)
-AC_SUBST(LINK_FLTK_IMAGES)
-AC_SUBST(FLTK_IMAGES_LIBBASENAME)
-AC_SUBST(FLTK_PNG_LIBNAME)
-AC_SUBST(LINK_FLTK_PNG)
-AC_SUBST(FLTK_PNG_LIBBASENAME)
-AC_SUBST(FLTK_JPEG_LIBNAME)
-AC_SUBST(LINK_FLTK_JPEG)
-AC_SUBST(FLTK_JPEG_LIBBASENAME)
-AC_SUBST(FLTK_ZLIB_LIBNAME)
-AC_SUBST(LINK_FLTK_ZLIB)
-AC_SUBST(FLTK_ZLIB_LIBBASENAME)
+AC_SUBST(FLTK3_LIBNAME)
+AC_SUBST(LINK_FLTK3)
+AC_SUBST(FLTK3_LIBBASENAME)
+AC_SUBST(FLTK3GL_LIBNAME)
+AC_SUBST(LINK_FLTK3GL)
+AC_SUBST(FLTK3GL_LIBBASENAME)
+AC_SUBST(FLTK3IMAGES_LIBNAME)
+AC_SUBST(LINK_FLTK3IMAGES)
+AC_SUBST(FLTK3IMAGES_LIBBASENAME)
+AC_SUBST(FLTK3PNG_LIBNAME)
+AC_SUBST(LINK_FLTK3PNG)
+AC_SUBST(FLTK3PNG_LIBBASENAME)
+AC_SUBST(FLTK3JPEG_LIBNAME)
+AC_SUBST(LINK_FLTK3JPEG)
+AC_SUBST(FLTK3JPEG_LIBBASENAME)
+AC_SUBST(FLTK3ZLIB_LIBNAME)
+AC_SUBST(LINK_FLTK3ZLIB)
+AC_SUBST(FLTK3ZLIB_LIBBASENAME)
 
 dnl Handle compile-time options...
 AC_ARG_ENABLE(debug, [  --enable-debug          turn on debugging [default=no]])
@@ -184,109 +184,109 @@
 
     case $uname in
         Darwin*)
-            FLTK_DSONAME="libfltk.$FL_API_VERSION.dylib"
-            FLTK_GL_DSONAME="libfltk_gl.$FL_API_VERSION.dylib"
-            FLTK_IMAGES_DSONAME="libfltk_images.$FL_API_VERSION.dylib"
-            FLTK_PNG_DSONAME="libfltk_png.$FL_API_VERSION.dylib"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.$FL_API_VERSION.dylib"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.$FL_API_VERSION.dylib"
+            FLTK3_DSONAME="libfltk3.$FL_API_VERSION.dylib"
+            FLTK3GL_DSONAME="libfltk3gl.$FL_API_VERSION.dylib"
+            FLTK3IMAGES_DSONAME="libfltk3images.$FL_API_VERSION.dylib"
+            FLTK3PNG_DSONAME="libfltk3png.$FL_API_VERSION.dylib"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.$FL_API_VERSION.dylib"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.$FL_API_VERSION.dylib"
             DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
             ;;
 
         SunOS* | UNIX_S*)
-            FLTK_DSONAME="libfltk.so.$FL_API_VERSION"
-            FLTK_GL_DSONAME="libfltk_gl.so.$FL_API_VERSION"
-            FLTK_IMAGES_DSONAME="libfltk_images.so.$FL_API_VERSION"
-            FLTK_PNG_DSONAME="libfltk_png.so.$FL_API_VERSION"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.so.$FL_API_VERSION"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.so.$FL_API_VERSION"
+            FLTK3_DSONAME="libfltk3.so.$FL_API_VERSION"
+            FLTK3GL_DSONAME="libfltk3gl.so.$FL_API_VERSION"
+            FLTK3IMAGES_DSONAME="libfltk3images.so.$FL_API_VERSION"
+            FLTK3PNG_DSONAME="libfltk3png.so.$FL_API_VERSION"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.so.$FL_API_VERSION"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.so.$FL_API_VERSION"
             DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
             if test "x$libdir" != "x/usr/lib"; then
                     DSOLINK="-R$libdir"
             fi
             ;;
         HP-UX*)
-            FLTK_DSONAME="libfltk.sl.$FL_API_VERSION"
-            FLTK_GL_DSONAME="libfltk_gl.sl.$FL_API_VERSION"
-            FLTK_IMAGES_DSONAME="libfltk_images.sl.$FL_API_VERSION"
-            FLTK_PNG_DSONAME="libfltk_png.sl.$FL_API_VERSION"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.sl.$FL_API_VERSION"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.sl.$FL_API_VERSION"
+            FLTK3_DSONAME="libfltk3.sl.$FL_API_VERSION"
+            FLTK3GL_DSONAME="libfltk3gl.sl.$FL_API_VERSION"
+            FLTK3IMAGES_DSONAME="libfltk3images.sl.$FL_API_VERSION"
+            FLTK3PNG_DSONAME="libfltk3png.sl.$FL_API_VERSION"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.sl.$FL_API_VERSION"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.sl.$FL_API_VERSION"
             DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
             if test "x$libdir" != "x/usr/lib"; then
                     DSOLINK="-Wl,-rpath,$libdir"
             fi
             ;;
         IRIX*)
-            FLTK_DSONAME="libfltk.so.$FL_API_VERSION"
-            FLTK_GL_DSONAME="libfltk_gl.so.$FL_API_VERSION"
-            FLTK_IMAGES_DSONAME="libfltk_images.so.$FL_API_VERSION"
-            FLTK_PNG_DSONAME="libfltk_png.so.$FL_API_VERSION"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.so.$FL_API_VERSION"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.so.$FL_API_VERSION"
+            FLTK3_DSONAME="libfltk3.so.$FL_API_VERSION"
+            FLTK3GL_DSONAME="libfltk3gl.so.$FL_API_VERSION"
+            FLTK3IMAGES_DSONAME="libfltk3images.so.$FL_API_VERSION"
+            FLTK3PNG_DSONAME="libfltk3png.so.$FL_API_VERSION"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.so.$FL_API_VERSION"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.so.$FL_API_VERSION"
             DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
             if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
                     DSOLINK="-Wl,-rpath,$libdir"
             fi
             ;;
         OSF1*)
-            FLTK_DSONAME="libfltk.so.$FL_API_VERSION"
-            FLTK_GL_DSONAME="libfltk_gl.so.$FL_API_VERSION"
-            FLTK_IMAGES_DSONAME="libfltk_images.so.$FL_API_VERSION"
-            FLTK_PNG_DSONAME="libfltk_png.so.$FL_API_VERSION"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.so.$FL_API_VERSION"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.so.$FL_API_VERSION"
+            FLTK3_DSONAME="libfltk3.so.$FL_API_VERSION"
+            FLTK3GL_DSONAME="libfltk3gl.so.$FL_API_VERSION"
+            FLTK3IMAGES_DSONAME="libfltk3images.so.$FL_API_VERSION"
+            FLTK3PNG_DSONAME="libfltk3png.so.$FL_API_VERSION"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.so.$FL_API_VERSION"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.so.$FL_API_VERSION"
             DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
             if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then
                     DSOLINK="-Wl,-rpath,$libdir"
             fi
             ;;
         Linux* | *BSD*)
-            FLTK_DSONAME="libfltk.so.$FL_API_VERSION"
-            FLTK_GL_DSONAME="libfltk_gl.so.$FL_API_VERSION"
-            FLTK_IMAGES_DSONAME="libfltk_images.so.$FL_API_VERSION"
-            FLTK_PNG_DSONAME="libfltk_png.so.$FL_API_VERSION"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.so.$FL_API_VERSION"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.so.$FL_API_VERSION"
+            FLTK3_DSONAME="libfltk3.so.$FL_API_VERSION"
+            FLTK3GL_DSONAME="libfltk3gl.so.$FL_API_VERSION"
+            FLTK3IMAGES_DSONAME="libfltk3images.so.$FL_API_VERSION"
+            FLTK3PNG_DSONAME="libfltk3png.so.$FL_API_VERSION"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.so.$FL_API_VERSION"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.so.$FL_API_VERSION"
             DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
             if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
                     DSOLINK="-Wl,-rpath,$libdir"
             fi
             ;;
         AIX*)
-            FLTK_DSONAME="libfltk_s.a"
-            FLTK_GL_DSONAME="libfltk_gl_s.a"
-            FLTK_IMAGES_DSONAME="libfltk_images_s.a"
-            FLTK_PNG_DSONAME="libfltk_png_s.a"
-            FLTK_JPEG_DSONAME="libfltk_jpeg_s.a"
-            FLTK_ZLIB_DSONAME="libfltk_zlib_s.a"
+            FLTK3_DSONAME="libfltk3_s.a"
+            FLTK3GL_DSONAME="libfltk3gl_s.a"
+            FLTK3IMAGES_DSONAME="libfltk3images_s.a"
+            FLTK3PNG_DSONAME="libfltk3png_s.a"
+            FLTK3JPEG_DSONAME="libfltk3jpeg_s.a"
+            FLTK3ZLIB_DSONAME="libfltk3zlib_s.a"
             DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
             SHAREDSUFFIX="_s"
             ;;
         CYGWIN* | MINGW*)
             PICFLAG=0
             if test x$enable_cygwin != xyes; then
-                FLTK_DSONAME="mgwfltknox-$FL_API_VERSION.dll"
-                FLTK_GL_DSONAME="mgwfltk_glnox-$FL_API_VERSION.dll"
-                FLTK_IMAGES_DSONAME="mgwfltk_imagesnox-$FL_API_VERSION.dll"
-                FLTK_PNG_DSONAME="mgwfltk_pngnox-$FL_API_VERSION.dll"
-                FLTK_JPEG_DSONAME="mgwfltk_jpegnox-$FL_API_VERSION.dll"
-                FLTK_ZLIB_DSONAME="mgwfltk_zlibnox-$FL_API_VERSION.dll"
+                FLTK3_DSONAME="mgwfltk3nox-$FL_API_VERSION.dll"
+                FLTK3GL_DSONAME="mgwfltk3glnox-$FL_API_VERSION.dll"
+                FLTK3IMAGES_DSONAME="mgwfltk3imagesnox-$FL_API_VERSION.dll"
+                FLTK3PNG_DSONAME="mgwfltk3pngnox-$FL_API_VERSION.dll"
+                FLTK3JPEG_DSONAME="mgwfltk3jpegnox-$FL_API_VERSION.dll"
+                FLTK3ZLIB_DSONAME="mgwfltk3zlibnox-$FL_API_VERSION.dll"
             else
                 if test x$enable_x11 = xyes; then
-                    FLTK_DSONAME="cygfltk-$FL_API_VERSION.dll"
-                    FLTK_GL_DSONAME="cygfltk_gl-$FL_API_VERSION.dll"
-                    FLTK_IMAGES_DSONAME="cygfltk_images-$FL_API_VERSION.dll"
-                    FLTK_PNG_DSONAME="cygfltk_png-$FL_API_VERSION.dll"
-                    FLTK_JPEG_DSONAME="cygfltk_jpeg-$FL_API_VERSION.dll"
-                    FLTK_ZLIB_DSONAME="cygfltk_zlib-$FL_API_VERSION.dll"
+                    FLTK3_DSONAME="cygfltk3-$FL_API_VERSION.dll"
+                    FLTK3GL_DSONAME="cygfltk3gl-$FL_API_VERSION.dll"
+                    FLTK3IMAGES_DSONAME="cygfltk3images-$FL_API_VERSION.dll"
+                    FLTK3PNG_DSONAME="cygfltk3png-$FL_API_VERSION.dll"
+                    FLTK3JPEG_DSONAME="cygfltk3jpeg-$FL_API_VERSION.dll"
+                    FLTK3ZLIB_DSONAME="cygfltk3zlib-$FL_API_VERSION.dll"
                 else
-                    FLTK_DSONAME="cygfltknox-$FL_API_VERSION.dll"
-                    FLTK_GL_DSONAME="cygfltk_glnox-$FL_API_VERSION.dll"
-                    FLTK_IMAGES_DSONAME="cygfltk_imagesnox-$FL_API_VERSION.dll"
-                    FLTK_PNG_DSONAME="cygfltk_pngnox-$FL_API_VERSION.dll"
-                    FLTK_JPEG_DSONAME="cygfltk_jpegnox-$FL_API_VERSION.dll"
-                    FLTK_ZLIB_DSONAME="cygfltk_zlibnox-$FL_API_VERSION.dll"
+                    FLTK3_DSONAME="cygfltk3nox-$FL_API_VERSION.dll"
+                    FLTK3GL_DSONAME="cygfltk3glnox-$FL_API_VERSION.dll"
+                    FLTK3IMAGES_DSONAME="cygfltk3imagesnox-$FL_API_VERSION.dll"
+                    FLTK3PNG_DSONAME="cygfltk3pngnox-$FL_API_VERSION.dll"
+                    FLTK3JPEG_DSONAME="cygfltk3jpegnox-$FL_API_VERSION.dll"
+                    FLTK3ZLIB_DSONAME="cygfltk3zlibnox-$FL_API_VERSION.dll"
                 fi
             fi
             #-----------------------------------------------------------
@@ -301,12 +301,12 @@
             ;;
         *)
             AC_MSG_WARN(Shared libraries may not be supported.  Trying -shared option with compiler.)
-            FLTK_DSONAME="libfltk.so.$FL_API_VERSION"
-            FLTK_GL_DSONAME="libfltk_gl.so.$FL_API_VERSION"
-            FLTK_IMAGES_DSONAME="libfltk_images.so.$FL_API_VERSION"
-            FLTK_PNG_DSONAME="libfltk_png.so.$FL_API_VERSION"
-            FLTK_JPEG_DSONAME="libfltk_jpeg.so.$FL_API_VERSION"
-            FLTK_ZLIB_DSONAME="libfltk_zlib.so.$FL_API_VERSION"
+            FLTK3_DSONAME="libfltk3.so.$FL_API_VERSION"
+            FLTK3GL_DSONAME="libfltk3gl.so.$FL_API_VERSION"
+            FLTK3IMAGES_DSONAME="libfltk3images.so.$FL_API_VERSION"
+            FLTK3PNG_DSONAME="libfltk3png.so.$FL_API_VERSION"
+            FLTK3JPEG_DSONAME="libfltk3jpeg.so.$FL_API_VERSION"
+            FLTK3ZLIB_DSONAME="libfltk3zlib.so.$FL_API_VERSION"
             DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
             ;;
     esac
@@ -315,12 +315,12 @@
 else
     DSOCOMMAND="echo"
     DSOLINK=""
-    FLTK_DSONAME=""
-    FLTK_GL_DSONAME=""
-    FLTK_IMAGES_DSONAME=""
-    FLTK_PNG_DSONAME=""
-    FLTK_JPEG_DSONAME=""
-    FLTK_ZLIB_DSONAME=""
+    FLTK3_DSONAME=""
+    FLTK3GL_DSONAME=""
+    FLTK3IMAGES_DSONAME=""
+    FLTK3PNG_DSONAME=""
+    FLTK3JPEG_DSONAME=""
+    FLTK3ZLIB_DSONAME=""
     PICFLAG=0
     SHAREDSUFFIX=""
     FLUID="fluid"
@@ -330,12 +330,12 @@
 AC_SUBST(DSOCOMMAND)
 AC_SUBST(DSOFLAGS)
 AC_SUBST(DSOLINK)
-AC_SUBST(FLTK_DSONAME)
-AC_SUBST(FLTK_GL_DSONAME)
-AC_SUBST(FLTK_IMAGES_DSONAME)
-AC_SUBST(FLTK_PNG_DSONAME)
-AC_SUBST(FLTK_JPEG_DSONAME)
-AC_SUBST(FLTK_ZLIB_DSONAME)
+AC_SUBST(FLTK3_DSONAME)
+AC_SUBST(FLTK3GL_DSONAME)
+AC_SUBST(FLTK3IMAGES_DSONAME)
+AC_SUBST(FLTK3PNG_DSONAME)
+AC_SUBST(FLTK3JPEG_DSONAME)
+AC_SUBST(FLTK3ZLIB_DSONAME)
 AC_SUBST(SHAREDSUFFIX)
 AC_SUBST(LINKSHARED)
 AC_SUBST(FLUID)
@@ -610,7 +610,7 @@
 # Handle the JPEG lib linking mode (use fltk local or system lib)
 # If --enable-(resp. --disable-)localjpeg parameter is not set by user
 # Then we check the JPEG lib usability, with result in sysjpeglib_ok variable
-AC_ARG_ENABLE(localjpeg, [  --enable-localjpeg      use local JPEG library, default=auto])
+AC_ARG_ENABLE(localjpeg, [  --enable-localjpeg      use local JPEG library, default=yes])
 # Check for System lib use if automatic mode or --disable-localjpeg is requested
 sysjpeglib_ok=no
 sysjpeginc_ok=no
@@ -624,10 +624,10 @@
 fi
 # Now set the jpeg lib and include flags according to the requested mode and availability 
 if test x$enable_localjpeg = xyes -o x$sysjpeglib_ok = xno; then
-    JPEGINC="-I../jpeg"
+    JPEGINC="-I../include/fltk3jpeg"
     JPEG="jpeg"
-    IMAGELIBS="-lfltk_jpeg $IMAGELIBS"
-    STATICIMAGELIBS="\$libdir/libfltk_jpeg.a $STATICIMAGELIBS"
+    IMAGELIBS="-lfltk3jpeg $IMAGELIBS"
+    STATICIMAGELIBS="\$libdir/libfltk3jpeg.a $STATICIMAGELIBS"
     AC_DEFINE(HAVE_LIBJPEG)
     #ac_cv_lib_jpeg_jpeg_CreateCompress=no # from ima: should not be necessary
     # Finally, warn user if system lib was requested but not found
@@ -645,7 +645,7 @@
 # Handle the ZLIB lib linking mode (use fltk local or system lib)
 # If --enable-(resp. --disable-)localzlib parameter is not set by user
 # Then we check the ZLIB lib usability, with result in syszlib_ok variable
-AC_ARG_ENABLE(localzlib, [  --enable-localzlib      use local ZLIB library, default=auto])
+AC_ARG_ENABLE(localzlib, [  --enable-localzlib      use local ZLIB library, default=yes])
 # Check for System lib use if automatic mode or --disable-localzlib is requested
 syszlib_ok=no
 syszinc_ok=no
@@ -659,11 +659,11 @@
 fi
 # Now set the Z lib and include flags according to the requested mode and availability 
 if test x$enable_localzlib = xyes -o x$syszlib_ok = xno ; then
-    ZLIBINC="-I../zlib"
+    ZLIBINC="-I../include/fltk3zlib"
     ZLIB="zlib"
-    LIBS="-lfltk_zlib $LIBS"
-    IMAGELIBS="-lfltk_zlib $IMAGELIBS"
-    STATICIMAGELIBS="\$libdir/libfltk_zlib.a $STATICIMAGELIBS"
+    LIBS="-lfltk3zlib $LIBS"
+    IMAGELIBS="-lfltk3zlib $IMAGELIBS"
+    STATICIMAGELIBS="\$libdir/libfltk3zlib.a $STATICIMAGELIBS"
     AC_DEFINE(HAVE_LIBZ)
     ac_cv_lib_z_gzgets=no # fc: is still necessary ?
     # Finally, warn user if system lib was requested but not found
@@ -682,7 +682,7 @@
 # Handle the PNG lib linking mode (use fltk local or system lib)
 # If --enable-(resp. --disable-)localpng parameter is not set by user
 # Then we check the png lib usability with result in syspng_lib variable
-AC_ARG_ENABLE(localpng, [  --enable-localpng       use local PNG library, default=auto])
+AC_ARG_ENABLE(localpng, [  --enable-localpng       use local PNG library, default=yes])
 
 # Now check if system lib is usable, we check Lib AND include availability with inc variant,
 # but only, if the builtin lib is not requested
@@ -703,10 +703,10 @@
 
 # The following is executed if the lib was not found usable or if local lib is required explicitly
 if test x$enable_localpng = xyes -o x$syspnglib_ok = xno ; then
-    PNGINC="-I../png"
+    PNGINC="-I../include/fltk3png"
     PNG="png"
-    IMAGELIBS="-lfltk_png $IMAGELIBS"
-    STATICIMAGELIBS="\$libdir/libfltk_png.a $STATICIMAGELIBS"
+    IMAGELIBS="-lfltk3png $IMAGELIBS"
+    STATICIMAGELIBS="\$libdir/libfltk3png.a $STATICIMAGELIBS"
     AC_DEFINE(HAVE_LIBPNG)
     AC_DEFINE(HAVE_PNG_H)
     AC_DEFINE(HAVE_PNG_GET_VALID)
@@ -1371,7 +1371,7 @@
 
 dnl Write all of the files...
 AC_CONFIG_HEADER(config.h:configh.in)
-AC_OUTPUT(makeinclude fltk.list fltk-config fltk.spec FL/Makefile)
+AC_OUTPUT(makeinclude fltk.list fltk-config fltk.spec include/fltk3/Makefile)
 
 dnl Make sure the fltk-config script is executable...
 chmod +x fltk-config

Modified: branches/branch-3.0/fltk.flw
===================================================================
--- branches/branch-3.0/fltk.flw	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fltk.flw	2011-08-22 15:21:44 UTC (rev 8991)
@@ -2,7 +2,7 @@
 version 3.0000 
 header_name {.h} 
 code_name {.cxx}
-workspace FLTK {open
+workspace FLTK {open selected
   uuid_Xcode4_Root {2204C862-3EAB-44CD-B0A8-6DF16FFDC8F4}
   uuid_Xcode4_ProductsGroup {A3B55F76-F5F9-4F9E-8A45-2778583213A1}
   uuid_Xcode4_Group {341D2CD3-06FB-47E4-B35C-D1F9B51C7293}
@@ -12,6 +12,7 @@
   uuid_Xcode4_ReleaseBuildConfiguration {C5259E66-FBF8-43A2-B30F-8D59BBE3CF16}
   uuid_VC2008_Workspace {D21EA206-7BBC-4F5B-8518-A798E56EE0FC}
   uuid_VC2010_Workspace {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
+  build_env 1
 } {
   folder Applications {open
     uuid_Xcode4_Group {137F861A-5702-45AC-821B-A2C51A17F780}
@@ -279,31 +280,31 @@
       folder Dependencies {open
         uuid_Xcode4_Group {A6C2C5AC-C608-489D-8C74-B63CCDEB081B}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {B8FB366B-209C-4E6D-A6BF-961C45B9CABE}
           uuid_Xcode4_BuildFileInCopyFiles {D820C6D4-CC75-4FB7-8331-FBC1DA96464D}
           uuid_Xcode4_ContainerItemProxy {110949FF-BCC8-4DBF-BB4F-48C3FAE496EC}
           uuid_Xcode4_TargetDependency {D1864C87-7336-4379-A998-0C7EEA5BF89E}
         }
-        target_dependency fltk_images {
+        target_dependency fltk3images {
           uuid_Xcode4_BuildFileInFrameworks {4866D037-C9C8-4C6A-9B7A-96EE5292144C}
           uuid_Xcode4_BuildFileInCopyFiles {2F540F9D-650D-4FF6-BF0D-64890E338D2B}
           uuid_Xcode4_ContainerItemProxy {2CE56FE8-16AA-4473-95FB-AC67835EBAC1}
           uuid_Xcode4_TargetDependency {0858623D-80DB-46C4-B90D-DFBA4C7A2109}
         }
-        target_dependency fltk_png {
+        target_dependency fltk3png {
           uuid_Xcode4_BuildFileInFrameworks {3E5B5872-AF7E-4A07-99EB-AB98C0EAAA85}
           uuid_Xcode4_BuildFileInCopyFiles {F552DCC4-71E4-404E-A678-E6B4C6F1988A}
           uuid_Xcode4_ContainerItemProxy {3143C159-1BDC-4FD1-9796-7B5D0DC00309}
           uuid_Xcode4_TargetDependency {785B1845-DCDD-4315-9D7A-B42AD474CA8B}
         }
-        target_dependency fltk_jpeg {
+        target_dependency fltk3jpeg {
           uuid_Xcode4_BuildFileInFrameworks {6138F435-ED9E-4A53-9DE7-63A95EC0C6BD}
           uuid_Xcode4_BuildFileInCopyFiles {CC663664-AAA4-45BB-9B3C-73F8CB778028}
           uuid_Xcode4_ContainerItemProxy {5BF281B9-FC98-4EBE-A3DF-9BCDBC8F9203}
           uuid_Xcode4_TargetDependency {1B574128-6173-4A14-BDDA-1D6595B5BE71}
         }
-        target_dependency fltk_zlib {
+        target_dependency fltk3zlib {
           uuid_Xcode4_BuildFileInFrameworks {97A7C9B9-2334-4593-AF2E-C78E02AEBDDF}
           uuid_Xcode4_BuildFileInCopyFiles {0D2A2AC9-1CDD-4408-8DFB-1D4E1B01BBEF}
           uuid_Xcode4_ContainerItemProxy {529024F4-EDEF-44C3-99C0-01650CE6F845}
@@ -315,7 +316,7 @@
   folder Libraries {open
     uuid_Xcode4_Group {AFD010B3-DA64-4C5E-9682-891530BD3B73}
   } {
-    lib_target fltk {open
+    lib_target fltk3 {open
       uuid_Xcode4_BuildConfigurationList {F8A317C2-0F96-4681-8A97-DA6FDEF118E2}
       uuid_Xcode4_DebugBuildConfiguration {034870F2-FE15-4D23-AD0D-62ED38449392}
       uuid_Xcode4_ReleaseBuildConfiguration {D584B52C-FED3-4E71-A47E-A60BA05375B9}
@@ -333,7 +334,7 @@
       target_path lib
       makefile_path src
     } {
-      folder Headers {open selected
+      folder Headers {open
         uuid_Xcode4_Group {C2F00625-E401-4002-85F6-FA183D17629D}
       } {
         file_ref {Adjuster.h} {
@@ -342,7 +343,7 @@
           uuid_Xcode4_BuildFileInHeaders {757ECB76-8063-4DF1-93FD-E1FD4B8A4A42}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Adjuster.h}
+          filename_and_path {include/fltk3/Adjuster.h}
         }
         file_ref {ask.h} {
           uuid_Xcode4_BuildFile {AEDF2A15-B44B-4BD8-B754-2E54A44DB5B5}
@@ -350,7 +351,7 @@
           uuid_Xcode4_BuildFileInHeaders {CC311448-C3B8-44D6-B35A-7A9B0D5614AF}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ask.h}
+          filename_and_path {include/fltk3/ask.h}
         }
         file_ref {Bitmap.h} {
           uuid_Xcode4_BuildFile {D83BCD17-0F87-4FB5-8986-C0F3F65C02EB}
@@ -358,7 +359,7 @@
           uuid_Xcode4_BuildFileInHeaders {72A9364B-67F2-460A-921A-4CC4D9A43B9E}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Bitmap.h}
+          filename_and_path {include/fltk3/Bitmap.h}
         }
         file_ref {BMPImage.h} {
           uuid_Xcode4_BuildFile {B02F1ACA-8C63-4C41-A0FA-429D42B66E10}
@@ -366,7 +367,7 @@
           uuid_Xcode4_BuildFileInHeaders {26C1F556-804D-49CA-B330-7472D37CCAA4}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/BMPImage.h}
+          filename_and_path {include/fltk3/BMPImage.h}
         }
         file_ref {Box.h} {
           uuid_Xcode4_BuildFile {A443E7E1-065D-4CA8-9E14-C567C120B62E}
@@ -374,7 +375,7 @@
           uuid_Xcode4_BuildFileInHeaders {35DE2AD5-BDB0-4B90-80D1-C157A6545D86}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Box.h}
+          filename_and_path {include/fltk3/Box.h}
         }
         file_ref {Browser_.h} {
           uuid_Xcode4_BuildFile {28FD6277-A75E-45F4-8AC0-D32D4A90E8B8}
@@ -382,7 +383,7 @@
           uuid_Xcode4_BuildFileInHeaders {42605FAF-D17F-4638-8932-E98BA405E61E}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Browser_.h}
+          filename_and_path {include/fltk3/Browser_.h}
         }
         file_ref {Browser.h} {
           uuid_Xcode4_BuildFile {1BC27473-D70A-460D-B8FF-9467FE0B8189}
@@ -390,7 +391,7 @@
           uuid_Xcode4_BuildFileInHeaders {7713D959-C2A9-4A48-A151-F0B850DE9A22}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Browser.h}
+          filename_and_path {include/fltk3/Browser.h}
         }
         file_ref {Button.h} {
           uuid_Xcode4_BuildFile {56A922CB-2D4C-47E2-9F32-E53F75395679}
@@ -398,7 +399,7 @@
           uuid_Xcode4_BuildFileInHeaders {A086301E-F42A-4C98-B69A-207AD822CDA5}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Button.h}
+          filename_and_path {include/fltk3/Button.h}
         }
         file_ref {Cairo.h} {
           uuid_Xcode4_BuildFile {E0086A45-7DE4-4B92-AE3C-61476A5C58AC}
@@ -406,7 +407,7 @@
           uuid_Xcode4_BuildFileInHeaders {F1922355-C0E4-42FF-B6CF-C64D7EF0794A}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Cairo.h}
+          filename_and_path {include/fltk3/Cairo.h}
         }
         file_ref {CairoWindow.h} {
           uuid_Xcode4_BuildFile {3437BED3-6247-4AF8-BEF3-E0DD0C4CA738}
@@ -414,7 +415,7 @@
           uuid_Xcode4_BuildFileInHeaders {4B4514C2-2A07-4E5A-A5D5-BE4A39AC00FD}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/CairoWindow.h}
+          filename_and_path {include/fltk3/CairoWindow.h}
         }
         file_ref {Chart.h} {
           uuid_Xcode4_BuildFile {2D4F6D8F-847F-4179-94C7-C62F62E6E2E1}
@@ -422,7 +423,7 @@
           uuid_Xcode4_BuildFileInHeaders {D048A520-EDE9-4F43-93E6-03307AEB63AB}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Chart.h}
+          filename_and_path {include/fltk3/Chart.h}
         }
         file_ref {CheckBrowser.h} {
           uuid_Xcode4_BuildFile {3A59B91F-DC0C-4E99-87E8-DDD3192A85D5}
@@ -430,7 +431,7 @@
           uuid_Xcode4_BuildFileInHeaders {25AADC4E-F29E-413C-AF2D-7FE87A10E45C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/CheckBrowser.h}
+          filename_and_path {include/fltk3/CheckBrowser.h}
         }
         file_ref {CheckButton.h} {
           uuid_Xcode4_BuildFile {E3F8FE30-AB1B-4F85-8FC4-DC80874A922F}
@@ -438,7 +439,7 @@
           uuid_Xcode4_BuildFileInHeaders {AA31B0AE-6C72-4409-8F77-4A2F6A74B681}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/CheckButton.h}
+          filename_and_path {include/fltk3/CheckButton.h}
         }
         file_ref {Choice.h} {
           uuid_Xcode4_BuildFile {1F012CFB-A6E1-4945-A9B7-86F6A9BCF983}
@@ -446,7 +447,7 @@
           uuid_Xcode4_BuildFileInHeaders {DC27C811-8F0D-4E0A-BFE0-0FFF0781059C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Choice.h}
+          filename_and_path {include/fltk3/Choice.h}
         }
         file_ref {Clock.h} {
           uuid_Xcode4_BuildFile {714334FF-5D89-4BA6-9C63-339DE784279E}
@@ -454,7 +455,7 @@
           uuid_Xcode4_BuildFileInHeaders {461C93A2-6C95-4F96-964B-6F91C35C104C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Clock.h}
+          filename_and_path {include/fltk3/Clock.h}
         }
         file_ref {ColorChooser.h} {
           uuid_Xcode4_BuildFile {4E4C6BDD-DD3C-486B-9F8B-4C0C67DA0183}
@@ -462,7 +463,7 @@
           uuid_Xcode4_BuildFileInHeaders {ECAF2473-7556-47E6-987E-1CF2D90709AB}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ColorChooser.h}
+          filename_and_path {include/fltk3/ColorChooser.h}
         }
         file_ref {Counter.h} {
           uuid_Xcode4_BuildFile {F86B5E39-4135-4B33-9DDA-E9F0C4DDF91F}
@@ -470,7 +471,7 @@
           uuid_Xcode4_BuildFileInHeaders {AB0027C4-0E48-4E2D-A47C-63DC6F8005A4}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Counter.h}
+          filename_and_path {include/fltk3/Counter.h}
         }
         file_ref {Device.h} {
           uuid_Xcode4_BuildFile {D2B75DDD-0FB8-4245-B646-F692C20A37A8}
@@ -478,7 +479,7 @@
           uuid_Xcode4_BuildFileInHeaders {94A746DB-214C-45E3-913A-6B958F66C743}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Device.h}
+          filename_and_path {include/fltk3/Device.h}
         }
         file_ref {Dial.h} {
           uuid_Xcode4_BuildFile {E5B25268-CCB4-4EFE-9232-DB0631926A25}
@@ -486,7 +487,7 @@
           uuid_Xcode4_BuildFileInHeaders {8AE207C7-9385-491F-9AD1-301D8986E342}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Dial.h}
+          filename_and_path {include/fltk3/Dial.h}
         }
         file_ref {dirent.h} {
           uuid_Xcode4_BuildFile {4D18FEE1-2E3E-4C13-B0FC-D5A3F45FD1B2}
@@ -494,7 +495,7 @@
           uuid_Xcode4_BuildFileInHeaders {0D8E3B84-F38C-4F4E-87B7-36F76BDEAD11}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/dirent.h}
+          filename_and_path {include/fltk3/dirent.h}
         }
         file_ref {DoubleWindow.h} {
           uuid_Xcode4_BuildFile {C914169D-8DAD-49F1-973F-B6C1EE636CC0}
@@ -502,7 +503,7 @@
           uuid_Xcode4_BuildFileInHeaders {25D240CF-7FD0-4512-9541-BC9147CFB972}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/DoubleWindow.h}
+          filename_and_path {include/fltk3/DoubleWindow.h}
         }
         file_ref {draw.h} {
           uuid_Xcode4_BuildFile {87FA373D-1868-4353-94D6-7CC84E82F89D}
@@ -510,7 +511,7 @@
           uuid_Xcode4_BuildFileInHeaders {2D8A06C2-A684-4BBC-9074-816B411621F3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/draw.h}
+          filename_and_path {include/fltk3/draw.h}
         }
         file_ref {enumerations.h} {
           uuid_Xcode4_BuildFile {B3B44B22-A2AB-4046-BE0D-01AC71420AEE}
@@ -518,7 +519,7 @@
           uuid_Xcode4_BuildFileInHeaders {FDE3D852-C30F-4612-8D20-4F455DB7C755}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/enumerations.h}
+          filename_and_path {include/fltk3/enumerations.h}
         }
         file_ref {Export.h} {
           uuid_Xcode4_BuildFile {D3C18CCD-F2C1-4685-902F-DE409B589265}
@@ -526,7 +527,7 @@
           uuid_Xcode4_BuildFileInHeaders {E26E5B3F-935D-4CD5-9519-C470334CD6BD}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Export.h}
+          filename_and_path {include/fltk3/Export.h}
         }
         file_ref {FileBrowser.h} {
           uuid_Xcode4_BuildFile {BC0DCAEA-F201-436F-8293-974E7D64E065}
@@ -534,7 +535,7 @@
           uuid_Xcode4_BuildFileInHeaders {5C0C7B7C-7B7D-4BD1-960A-C9F1E33840F0}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FileBrowser.h}
+          filename_and_path {include/fltk3/FileBrowser.h}
         }
         file_ref {FileChooser.h} {
           uuid_Xcode4_BuildFile {0CB0EBF3-B975-46CC-8918-C4E211FA4048}
@@ -542,7 +543,7 @@
           uuid_Xcode4_BuildFileInHeaders {3A9C5ECF-2BAD-42B3-B946-66BD0CA7A48C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FileChooser.h}
+          filename_and_path {include/fltk3/FileChooser.h}
         }
         file_ref {FileIcon.h} {
           uuid_Xcode4_BuildFile {3716C3D5-92AE-4141-AA97-DD2ADE3750A6}
@@ -550,7 +551,7 @@
           uuid_Xcode4_BuildFileInHeaders {9BF596FE-B1E4-4820-B2DC-3B6DA3F6E734}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FileIcon.h}
+          filename_and_path {include/fltk3/FileIcon.h}
         }
         file_ref {FileInput.h} {
           uuid_Xcode4_BuildFile {8245FBEA-22EA-408C-9198-D464AC8B07CB}
@@ -558,7 +559,7 @@
           uuid_Xcode4_BuildFileInHeaders {61494E2D-0FB7-41C8-B06D-6E0BF8C8F159}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FileInput.h}
+          filename_and_path {include/fltk3/FileInput.h}
         }
         file_ref {filename.h} {
           uuid_Xcode4_BuildFile {2567B83E-EC58-4004-938C-0632F0947FD3}
@@ -566,7 +567,7 @@
           uuid_Xcode4_BuildFileInHeaders {8836B634-99CB-4580-A741-697F1EA78A51}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/filename.h}
+          filename_and_path {include/fltk3/filename.h}
         }
         file_ref {FillDial.h} {
           uuid_Xcode4_BuildFile {E8A30BF0-DB33-4B0C-80BF-B8732323CC5A}
@@ -574,7 +575,7 @@
           uuid_Xcode4_BuildFileInHeaders {A2F8F6E1-7232-462B-8FFC-A7C42D9478D6}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FillDial.h}
+          filename_and_path {include/fltk3/FillDial.h}
         }
         file_ref {FillSlider.h} {
           uuid_Xcode4_BuildFile {3AC5E477-8EB2-438C-9321-387A4D128525}
@@ -582,7 +583,7 @@
           uuid_Xcode4_BuildFileInHeaders {B4296EAA-4A9D-4EFD-B418-68ACD54887F6}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FillSlider.h}
+          filename_and_path {include/fltk3/FillSlider.h}
         }
         file_ref {FloatInput.h} {
           uuid_Xcode4_BuildFile {6A64A514-3CD0-4BF8-863C-3B24348C989E}
@@ -590,7 +591,7 @@
           uuid_Xcode4_BuildFileInHeaders {40EE4457-2251-440D-9DB4-F2C22AAB502C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FloatInput.h}
+          filename_and_path {include/fltk3/FloatInput.h}
         }
         file_ref {forms.h} {
           uuid_Xcode4_BuildFile {13BD0083-5C3A-4485-B0C4-76521CB9DCF9}
@@ -598,7 +599,7 @@
           uuid_Xcode4_BuildFileInHeaders {0AEE62FF-5E0B-4D27-9E43-D21940004C32}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/forms.h}
+          filename_and_path {include/fltk3/forms.h}
         }
         file_ref {FormsBitmap.h} {
           uuid_Xcode4_BuildFile {16C8EAEF-18D0-4B67-B81A-EF35EB92559A}
@@ -606,7 +607,7 @@
           uuid_Xcode4_BuildFileInHeaders {20CBFB6F-1144-464E-9949-D183A0751DBF}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FormsBitmap.h}
+          filename_and_path {include/fltk3/FormsBitmap.h}
         }
         file_ref {FormsPixmap.h} {
           uuid_Xcode4_BuildFile {CF013257-1A2A-481C-AAA2-28D934B7AAC1}
@@ -614,7 +615,7 @@
           uuid_Xcode4_BuildFileInHeaders {742D204F-0600-4AEC-AB75-6D25D53AC070}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/FormsPixmap.h}
+          filename_and_path {include/fltk3/FormsPixmap.h}
         }
         file_ref {Free.h} {
           uuid_Xcode4_BuildFile {E420FEC9-D30F-468D-A6B6-7AD4CEA93947}
@@ -622,7 +623,7 @@
           uuid_Xcode4_BuildFileInHeaders {6A197BCC-1ECB-4FDC-A201-11676D368B25}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Free.h}
+          filename_and_path {include/fltk3/Free.h}
         }
         file_ref {GIFImage.h} {
           uuid_Xcode4_BuildFile {E1645FE3-A511-42A3-873D-131C575CF91A}
@@ -630,7 +631,7 @@
           uuid_Xcode4_BuildFileInHeaders {8845649A-5BB6-4BA3-879C-1952D0C93211}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/GIFImage.h}
+          filename_and_path {include/fltk3/GIFImage.h}
         }
         file_ref {gl.h} {
           uuid_Xcode4_BuildFile {171AF659-2712-45E4-917F-0971FA2C1040}
@@ -638,7 +639,7 @@
           uuid_Xcode4_BuildFileInHeaders {53065D00-00D5-4F2D-B6B0-0238CFA68C55}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/gl.h}
+          filename_and_path {include/fltk3/gl.h}
         }
         file_ref {gl2opengl.h} {
           uuid_Xcode4_BuildFile {A18A80EF-C434-4B35-BE46-702905667C1D}
@@ -646,7 +647,7 @@
           uuid_Xcode4_BuildFileInHeaders {72812FEB-26EE-488F-9EEC-B4ED02F3DE4D}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/gl2opengl.h}
+          filename_and_path {include/fltk3/gl2opengl.h}
         }
         file_ref {glDraw.h} {
           uuid_Xcode4_BuildFile {0CE51E55-FA96-44E7-B2E8-67DD96F3C30C}
@@ -654,7 +655,7 @@
           uuid_Xcode4_BuildFileInHeaders {48257DCA-61D9-4813-AF09-08C1AA38665E}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/glDraw.h}
+          filename_and_path {include/fltk3/glDraw.h}
         }
         file_ref {glu.h} {
           uuid_Xcode4_BuildFile {E5E7BD83-9048-4F70-B075-3AEBA4E431F3}
@@ -662,7 +663,7 @@
           uuid_Xcode4_BuildFileInHeaders {4DB7B8EB-64B3-4C69-9F0A-88278049A0C9}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/glu.h}
+          filename_and_path {include/fltk3/glu.h}
         }
         file_ref {glut.h} {
           uuid_Xcode4_BuildFile {8AB70A97-595C-4E23-B623-688B0FF2BCE4}
@@ -670,7 +671,7 @@
           uuid_Xcode4_BuildFileInHeaders {665EED20-74C2-4B26-A298-617066EA7551}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/glut.h}
+          filename_and_path {include/fltk3/glut.h}
         }
         file_ref {GlWindow.h} {
           uuid_Xcode4_BuildFile {8949C41C-2C1C-4C70-B1D1-CD2E7FF04607}
@@ -678,7 +679,7 @@
           uuid_Xcode4_BuildFileInHeaders {7A5AD5C3-4B24-4558-AD62-1B5C2E02E9F8}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/GlWindow.h}
+          filename_and_path {include/fltk3/GlWindow.h}
         }
         file_ref {Group.h} {
           uuid_Xcode4_BuildFile {2D46FE73-1213-4993-9C58-3AD4F912D0F1}
@@ -686,7 +687,7 @@
           uuid_Xcode4_BuildFileInHeaders {5E1D236D-9F1B-4003-9849-9118F39D88D0}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Group.h}
+          filename_and_path {include/fltk3/Group.h}
         }
         file_ref {HelpDialog.h} {
           uuid_Xcode4_BuildFile {039E6910-80A1-4672-8705-02AC45E81900}
@@ -694,7 +695,7 @@
           uuid_Xcode4_BuildFileInHeaders {F7A66B0A-98D9-44E3-B704-829151BB84FB}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HelpDialog.h}
+          filename_and_path {include/fltk3/HelpDialog.h}
         }
         file_ref {HelpView.h} {
           uuid_Xcode4_BuildFile {35AC3DE1-3781-43C2-A095-E3DC454BDCD4}
@@ -702,7 +703,7 @@
           uuid_Xcode4_BuildFileInHeaders {E5826346-35B1-44CF-847B-2081214A9B1B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HelpView.h}
+          filename_and_path {include/fltk3/HelpView.h}
         }
         file_ref {HoldBrowser.h} {
           uuid_Xcode4_BuildFile {49B90CF5-91E1-4814-A362-A2044664DE22}
@@ -710,7 +711,7 @@
           uuid_Xcode4_BuildFileInHeaders {0CBBFB5E-78C4-408D-B206-C4AD8AC9A2E0}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HoldBrowser.h}
+          filename_and_path {include/fltk3/HoldBrowser.h}
         }
         file_ref {HorFillSlider.h} {
           uuid_Xcode4_BuildFile {4FC85770-D876-4202-93C8-0B47C06A7864}
@@ -718,7 +719,7 @@
           uuid_Xcode4_BuildFileInHeaders {C731F1AF-5BBD-4CE8-BC2C-9F9B79E819E5}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HorFillSlider.h}
+          filename_and_path {include/fltk3/HorFillSlider.h}
         }
         file_ref {HorNiceSlider.h} {
           uuid_Xcode4_BuildFile {069B4980-A156-4F26-AE84-D70B7AAB0958}
@@ -726,7 +727,7 @@
           uuid_Xcode4_BuildFileInHeaders {2434070F-F43B-475D-8783-E7E46C21E521}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HorNiceSlider.h}
+          filename_and_path {include/fltk3/HorNiceSlider.h}
         }
         file_ref {HorSlider.h} {
           uuid_Xcode4_BuildFile {4B1AABAD-79EA-4796-97CD-F347C825D3AF}
@@ -734,7 +735,7 @@
           uuid_Xcode4_BuildFileInHeaders {C334620B-BD8B-4E36-92AD-84BD2D9B6288}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HorSlider.h}
+          filename_and_path {include/fltk3/HorSlider.h}
         }
         file_ref {HorValueSlider.h} {
           uuid_Xcode4_BuildFile {8C3AD61D-0E49-444A-86A7-57A53EF411E4}
@@ -742,7 +743,7 @@
           uuid_Xcode4_BuildFileInHeaders {7002C191-8642-4B49-A0CB-1F7CA1E02B97}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/HorValueSlider.h}
+          filename_and_path {include/fltk3/HorValueSlider.h}
         }
         file_ref {Image.h} {
           uuid_Xcode4_BuildFile {3C411723-0BA7-420B-AB44-CC070E604583}
@@ -750,7 +751,7 @@
           uuid_Xcode4_BuildFileInHeaders {18E4DD12-8C1E-4E2D-8067-74ACC23340D2}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Image.h}
+          filename_and_path {include/fltk3/Image.h}
         }
         file_ref {Input_.h} {
           uuid_Xcode4_BuildFile {7A45BCF9-5AF0-4946-8F5F-2685AE0BB1B8}
@@ -758,7 +759,7 @@
           uuid_Xcode4_BuildFileInHeaders {7E5C399B-F774-40EA-A8C4-6776AD8D99C7}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Input_.h}
+          filename_and_path {include/fltk3/Input_.h}
         }
         file_ref {Input.h} {
           uuid_Xcode4_BuildFile {B4744BA6-3A72-44C6-AECB-1886322E24B9}
@@ -766,7 +767,7 @@
           uuid_Xcode4_BuildFileInHeaders {78D8944F-2B82-4BD3-ADAC-5BFB4682C312}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Input.h}
+          filename_and_path {include/fltk3/Input.h}
         }
         file_ref {InputChoice.h} {
           uuid_Xcode4_BuildFile {AD7AEF6A-2D92-41A6-B0BF-D55FDFA155FC}
@@ -774,7 +775,7 @@
           uuid_Xcode4_BuildFileInHeaders {6291854E-0119-44D4-A168-971E3495507E}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/InputChoice.h}
+          filename_and_path {include/fltk3/InputChoice.h}
         }
         file_ref {IntInput.h} {
           uuid_Xcode4_BuildFile {DD5E12EF-D917-4A2D-A1BB-2A4C73C57153}
@@ -782,7 +783,7 @@
           uuid_Xcode4_BuildFileInHeaders {0F589793-D1A8-4B9A-A566-C3E8EBBEA347}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/IntInput.h}
+          filename_and_path {include/fltk3/IntInput.h}
         }
         file_ref {JPEGImage.h} {
           uuid_Xcode4_BuildFile {E924726D-D8F9-42F3-99B6-0B33A6E07929}
@@ -790,7 +791,7 @@
           uuid_Xcode4_BuildFileInHeaders {30029E6A-2C65-48E5-8722-0B7CFEBA9CF8}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/JPEGImage.h}
+          filename_and_path {include/fltk3/JPEGImage.h}
         }
         file_ref {LightButton.h} {
           uuid_Xcode4_BuildFile {CC28845A-AB92-4F7F-8BAB-D7C630F0AD00}
@@ -798,7 +799,7 @@
           uuid_Xcode4_BuildFileInHeaders {8E35401D-136F-4D7B-97E6-D9AEE1E2E147}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/LightButton.h}
+          filename_and_path {include/fltk3/LightButton.h}
         }
         file_ref {LineDial.h} {
           uuid_Xcode4_BuildFile {18F94519-BC08-476F-AA92-C89EFFC7D6C0}
@@ -806,7 +807,7 @@
           uuid_Xcode4_BuildFileInHeaders {C5C32DAE-E855-4957-BEF4-6CA912F86757}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/LineDial.h}
+          filename_and_path {include/fltk3/LineDial.h}
         }
         file_ref {math.h} {
           uuid_Xcode4_BuildFile {9E556D63-6BE1-4DAA-BE86-D6882A75C50E}
@@ -814,7 +815,7 @@
           uuid_Xcode4_BuildFileInHeaders {E62C50EA-E62F-4C63-9214-D945F3A50640}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/math.h}
+          filename_and_path {include/fltk3/math.h}
         }
         file_ref {Menu_.h} {
           uuid_Xcode4_BuildFile {6E367156-49F5-45B1-8865-73C6C12A3AD4}
@@ -822,7 +823,7 @@
           uuid_Xcode4_BuildFileInHeaders {460DA151-8796-426A-AEF1-099BF42C91D0}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Menu_.h}
+          filename_and_path {include/fltk3/Menu_.h}
         }
         file_ref {Menu.h} {
           uuid_Xcode4_BuildFile {49A939E9-0E99-4BCD-B42E-F1E99E13D150}
@@ -830,7 +831,7 @@
           uuid_Xcode4_BuildFileInHeaders {52639EA1-9489-42A9-9577-65334616D3B1}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Menu.h}
+          filename_and_path {include/fltk3/Menu.h}
         }
         file_ref {MenuBar.h} {
           uuid_Xcode4_BuildFile {0EEEBBEA-D744-4E2B-8A67-867E2D3D50AC}
@@ -838,7 +839,7 @@
           uuid_Xcode4_BuildFileInHeaders {13B94AD3-BB4B-4D0E-B2C5-5F11DDF980B9}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MenuBar.h}
+          filename_and_path {include/fltk3/MenuBar.h}
         }
         file_ref {MenuButton.h} {
           uuid_Xcode4_BuildFile {9B8AFFC5-3B65-4686-9AD9-E7704DCA3698}
@@ -846,7 +847,7 @@
           uuid_Xcode4_BuildFileInHeaders {C6C8DFFE-E780-4CB0-81C6-5C4B55CDA057}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MenuButton.h}
+          filename_and_path {include/fltk3/MenuButton.h}
         }
         file_ref {MenuItem.h} {
           uuid_Xcode4_BuildFile {35B87DDE-7E6F-4981-98E6-A06CF94616CC}
@@ -854,7 +855,7 @@
           uuid_Xcode4_BuildFileInHeaders {5485A3F5-A7EB-4F24-B420-F52DE07B8A66}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MenuItem.h}
+          filename_and_path {include/fltk3/MenuItem.h}
         }
         file_ref {MenuWindow.h} {
           uuid_Xcode4_BuildFile {F9ADA642-4ECF-4A83-B141-074E96D90DEF}
@@ -862,7 +863,7 @@
           uuid_Xcode4_BuildFileInHeaders {85734D6A-80B4-4BBB-8B51-3306648C33CB}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MenuWindow.h}
+          filename_and_path {include/fltk3/MenuWindow.h}
         }
         file_ref {message.h} {
           uuid_Xcode4_BuildFile {7B1F47C1-B2E6-46BF-AC3B-268CE1FD07A8}
@@ -870,7 +871,7 @@
           uuid_Xcode4_BuildFileInHeaders {E77DDE3A-506C-448E-A7B0-B0DC4112A1B3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/message.h}
+          filename_and_path {include/fltk3/message.h}
         }
         file_ref {MultiBrowser.h} {
           uuid_Xcode4_BuildFile {68DADDDB-2980-48DA-BA9A-2FE33327CC73}
@@ -878,7 +879,7 @@
           uuid_Xcode4_BuildFileInHeaders {65396451-251A-4A92-BD0D-B70126DF582D}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MultiBrowser.h}
+          filename_and_path {include/fltk3/MultiBrowser.h}
         }
         file_ref {MultiLabel.h} {
           uuid_Xcode4_BuildFile {F4A1C768-90F7-4F3E-83A7-0859BE906866}
@@ -886,7 +887,7 @@
           uuid_Xcode4_BuildFileInHeaders {8248E334-7267-43BA-ACDC-5252C9417904}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MultiLabel.h}
+          filename_and_path {include/fltk3/MultiLabel.h}
         }
         file_ref {MultilineInput.h} {
           uuid_Xcode4_BuildFile {907F6D8E-AFEA-405C-A766-47019492BA4A}
@@ -894,7 +895,7 @@
           uuid_Xcode4_BuildFileInHeaders {B96D1B8C-C2EC-4316-9AD3-BEC4E682879C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MultilineInput.h}
+          filename_and_path {include/fltk3/MultilineInput.h}
         }
         file_ref {MultilineOutput.h} {
           uuid_Xcode4_BuildFile {FBB9EBB6-321E-411B-BA9C-E2589E820CD8}
@@ -902,7 +903,7 @@
           uuid_Xcode4_BuildFileInHeaders {F07D774A-93B3-4980-93EF-1CF643C75A46}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/MultilineOutput.h}
+          filename_and_path {include/fltk3/MultilineOutput.h}
         }
         file_ref {names.h} {
           uuid_Xcode4_BuildFile {17406949-1209-4EB6-8D75-0CB4C7601908}
@@ -910,7 +911,7 @@
           uuid_Xcode4_BuildFileInHeaders {9E23CC9E-C91B-4547-8A7B-489E858CDECF}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/names.h}
+          filename_and_path {include/fltk3/names.h}
         }
         file_ref {NativeFileChooser.h} {
           uuid_Xcode4_BuildFile {AB7BA9B4-F91E-4B45-B306-F4AA69FB2C02}
@@ -918,7 +919,7 @@
           uuid_Xcode4_BuildFileInHeaders {9908F978-694B-448F-AB54-851FC11A5065}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/NativeFileChooser.h}
+          filename_and_path {include/fltk3/NativeFileChooser.h}
         }
         file_ref {NiceSlider.h} {
           uuid_Xcode4_BuildFile {9828396D-E899-44F0-B0C9-6282CC57D77A}
@@ -926,7 +927,7 @@
           uuid_Xcode4_BuildFileInHeaders {E163267B-E829-46FF-8FC4-EF1F4952DE87}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/NiceSlider.h}
+          filename_and_path {include/fltk3/NiceSlider.h}
         }
         file_ref {Object.h} {
           uuid_Xcode4_BuildFile {40D638D3-8D31-4F0D-B53A-F3FCBE42C40B}
@@ -934,7 +935,7 @@
           uuid_Xcode4_BuildFileInHeaders {568A4A99-6975-429F-B940-96448020F79D}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Object.h}
+          filename_and_path {include/fltk3/Object.h}
         }
         file_ref {osx.h} {
           uuid_Xcode4_BuildFile {7A284F23-A5FE-4AA4-A9D0-D1E8A4A43C35}
@@ -942,7 +943,7 @@
           uuid_Xcode4_BuildFileInHeaders {C8AC369D-99D4-45B6-873D-BE23BFB0413B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/osx.h}
+          filename_and_path {include/fltk3/osx.h}
         }
         file_ref {Output.h} {
           uuid_Xcode4_BuildFile {4764043F-5C8D-440A-A65E-F3928A0AE1BB}
@@ -950,7 +951,7 @@
           uuid_Xcode4_BuildFileInHeaders {39B20019-684B-4DCC-98B6-06CA934CA7C9}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Output.h}
+          filename_and_path {include/fltk3/Output.h}
         }
         file_ref {OverlayWindow.h} {
           uuid_Xcode4_BuildFile {3F380557-8CBD-4B6B-AD4C-9EDFE0BA5B4F}
@@ -958,7 +959,7 @@
           uuid_Xcode4_BuildFileInHeaders {E613F74A-024D-4828-8E63-B0F6E3293370}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/OverlayWindow.h}
+          filename_and_path {include/fltk3/OverlayWindow.h}
         }
         file_ref {PackedGroup.h} {
           uuid_Xcode4_BuildFile {952AA8C1-6406-4B61-B4F3-5FEC742B4484}
@@ -966,7 +967,7 @@
           uuid_Xcode4_BuildFileInHeaders {CB8DCA5D-F848-4796-ADA6-66249BFA7C58}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/PackedGroup.h}
+          filename_and_path {include/fltk3/PackedGroup.h}
         }
         file_ref {PagedDevice.h} {
           uuid_Xcode4_BuildFile {211FAC46-08EB-488A-BAC1-54548D29475B}
@@ -974,7 +975,7 @@
           uuid_Xcode4_BuildFileInHeaders {38C7D942-122B-4A30-AF38-D36B69F2AC03}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/PagedDevice.h}
+          filename_and_path {include/fltk3/PagedDevice.h}
         }
         file_ref {Pixmap.h} {
           uuid_Xcode4_BuildFile {BF1FA8FE-B4EA-4EFD-9513-82A904563D59}
@@ -982,7 +983,7 @@
           uuid_Xcode4_BuildFileInHeaders {F5061313-11B9-48D6-A27B-B9BC61AC582B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Pixmap.h}
+          filename_and_path {include/fltk3/Pixmap.h}
         }
         file_ref {Plugin.h} {
           uuid_Xcode4_BuildFile {6463D727-3733-4F2F-B46C-67F19D55B802}
@@ -990,7 +991,7 @@
           uuid_Xcode4_BuildFileInHeaders {6AFC8619-9E0F-41FD-ABB7-518104F112C0}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Plugin.h}
+          filename_and_path {include/fltk3/Plugin.h}
         }
         file_ref {PNGImage.h} {
           uuid_Xcode4_BuildFile {5D9E7161-6EC7-4233-AA60-D021CB0DFC59}
@@ -998,7 +999,7 @@
           uuid_Xcode4_BuildFileInHeaders {E3127242-7B17-4B32-9FCC-1F2101B769A4}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/PNGImage.h}
+          filename_and_path {include/fltk3/PNGImage.h}
         }
         file_ref {PNMImage.h} {
           uuid_Xcode4_BuildFile {4C35DB58-66D6-4FE6-8D74-0F09B1B8EC70}
@@ -1006,7 +1007,7 @@
           uuid_Xcode4_BuildFileInHeaders {CBE8880E-97E1-45DC-8CC0-78ED5298EAAE}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/PNMImage.h}
+          filename_and_path {include/fltk3/PNMImage.h}
         }
         file_ref {Positioner.h} {
           uuid_Xcode4_BuildFile {62B3D61F-3AE4-4EF7-8084-F0A6FBD55B84}
@@ -1014,7 +1015,7 @@
           uuid_Xcode4_BuildFileInHeaders {F702DFA6-016B-474B-B152-017876332D90}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Positioner.h}
+          filename_and_path {include/fltk3/Positioner.h}
         }
         file_ref {PostScript.h} {
           uuid_Xcode4_BuildFile {F1D238B9-0348-4C69-8A96-C1AB02BD55F5}
@@ -1022,7 +1023,7 @@
           uuid_Xcode4_BuildFileInHeaders {ACFD331F-72AF-4B41-93F1-35A491D0492B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/PostScript.h}
+          filename_and_path {include/fltk3/PostScript.h}
         }
         file_ref {Preferences.h} {
           uuid_Xcode4_BuildFile {B14021BB-7B7C-43FA-90DD-8D574E85F561}
@@ -1030,7 +1031,7 @@
           uuid_Xcode4_BuildFileInHeaders {987CCADF-403E-478E-8653-AD854D159D9F}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Preferences.h}
+          filename_and_path {include/fltk3/Preferences.h}
         }
         file_ref {Printer.h} {
           uuid_Xcode4_BuildFile {DCF86F46-6E2A-4B75-8213-6E5D920E8E26}
@@ -1038,7 +1039,7 @@
           uuid_Xcode4_BuildFileInHeaders {8430686C-EEEE-479F-B49F-452BA9BA5883}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Printer.h}
+          filename_and_path {include/fltk3/Printer.h}
         }
         file_ref {Progress.h} {
           uuid_Xcode4_BuildFile {90702262-589B-4260-980F-F0F0A458B87F}
@@ -1046,7 +1047,7 @@
           uuid_Xcode4_BuildFileInHeaders {57474483-0DC8-4217-9124-B2B78DE7715A}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Progress.h}
+          filename_and_path {include/fltk3/Progress.h}
         }
         file_ref {RadioButton.h} {
           uuid_Xcode4_BuildFile {773E10BB-A982-4CA8-8A1A-5FB15C62C366}
@@ -1054,7 +1055,7 @@
           uuid_Xcode4_BuildFileInHeaders {C4F9F5BB-9115-4E00-91DB-B8BEDCB41239}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RadioButton.h}
+          filename_and_path {include/fltk3/RadioButton.h}
         }
         file_ref {RadioLightButton.h} {
           uuid_Xcode4_BuildFile {D0CA766C-B070-486D-90CE-96EF6EA98ED4}
@@ -1062,7 +1063,7 @@
           uuid_Xcode4_BuildFileInHeaders {3D04BFFA-DFD2-4B13-A253-9156B6909190}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RadioLightButton.h}
+          filename_and_path {include/fltk3/RadioLightButton.h}
         }
         file_ref {RadioRoundButton.h} {
           uuid_Xcode4_BuildFile {50F213E5-2D3D-4C82-9871-7544B9453BF5}
@@ -1070,7 +1071,7 @@
           uuid_Xcode4_BuildFileInHeaders {5FFF3E76-4C2F-4412-B935-2C9344DF6FB5}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RadioRoundButton.h}
+          filename_and_path {include/fltk3/RadioRoundButton.h}
         }
         file_ref {Rectangle.h} {
           uuid_Xcode4_BuildFile {F95C5A92-0695-40C4-A6E2-0A592EE1EC0F}
@@ -1078,7 +1079,7 @@
           uuid_Xcode4_BuildFileInHeaders {541F4505-F6CF-4A86-A3AC-2C612392DC3A}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Rectangle.h}
+          filename_and_path {include/fltk3/Rectangle.h}
         }
         file_ref {RepeatButton.h} {
           uuid_Xcode4_BuildFile {1CF53F2D-715D-4512-8F5B-BA20E1726122}
@@ -1086,7 +1087,7 @@
           uuid_Xcode4_BuildFileInHeaders {C314F850-5A3E-4BDA-86AC-A9714B7AE660}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RepeatButton.h}
+          filename_and_path {include/fltk3/RepeatButton.h}
         }
         file_ref {ReturnButton.h} {
           uuid_Xcode4_BuildFile {ADBE4846-AA90-4966-93EB-74E39DB2C2AE}
@@ -1094,7 +1095,7 @@
           uuid_Xcode4_BuildFileInHeaders {50013BF4-F5A7-4361-8879-40B29DE191B9}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ReturnButton.h}
+          filename_and_path {include/fltk3/ReturnButton.h}
         }
         file_ref {RGBImage.h} {
           uuid_Xcode4_BuildFile {CBF2F915-9357-4362-B83C-A7188315D23A}
@@ -1102,7 +1103,7 @@
           uuid_Xcode4_BuildFileInHeaders {EDCB645E-C684-42DE-B3FF-A1D94E5C33B0}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RGBImage.h}
+          filename_and_path {include/fltk3/RGBImage.h}
         }
         file_ref {Roller.h} {
           uuid_Xcode4_BuildFile {665F39DC-8BFF-4675-8D7B-09FAF762FCDA}
@@ -1110,7 +1111,7 @@
           uuid_Xcode4_BuildFileInHeaders {3C8B5344-6082-424D-B091-8F72B6D66AD2}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Roller.h}
+          filename_and_path {include/fltk3/Roller.h}
         }
         file_ref {RoundButton.h} {
           uuid_Xcode4_BuildFile {5EB54150-424C-4F97-906A-8FCB03F50F7B}
@@ -1118,7 +1119,7 @@
           uuid_Xcode4_BuildFileInHeaders {8403B06A-ECAC-4A4D-85B3-416D5D5C4BF3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RoundButton.h}
+          filename_and_path {include/fltk3/RoundButton.h}
         }
         file_ref {RoundClock.h} {
           uuid_Xcode4_BuildFile {85ACD94A-E352-413E-976C-A3EDA23F0DF7}
@@ -1126,7 +1127,7 @@
           uuid_Xcode4_BuildFileInHeaders {00201E11-A702-4F28-A948-382089C546F3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/RoundClock.h}
+          filename_and_path {include/fltk3/RoundClock.h}
         }
         file_ref {run.h} {
           uuid_Xcode4_BuildFile {BCD82270-EAA9-459A-B5E0-1E59FC5155BB}
@@ -1134,7 +1135,7 @@
           uuid_Xcode4_BuildFileInHeaders {C7F15631-4A95-4D04-A073-3ABF449125E2}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/run.h}
+          filename_and_path {include/fltk3/run.h}
         }
         file_ref {Scrollbar.h} {
           uuid_Xcode4_BuildFile {1091CE8D-5503-4DCF-93C7-D91C1FAF8A72}
@@ -1142,7 +1143,7 @@
           uuid_Xcode4_BuildFileInHeaders {C0F0690F-24A1-40E8-84F8-0BBD8B042439}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Scrollbar.h}
+          filename_and_path {include/fltk3/Scrollbar.h}
         }
         file_ref {ScrollGroup.h} {
           uuid_Xcode4_BuildFile {44E8E706-EBB1-4AAA-9E77-5D686B09EBCD}
@@ -1150,7 +1151,7 @@
           uuid_Xcode4_BuildFileInHeaders {CB5654D1-1A9A-4ED8-BFA5-DC7FE472204B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ScrollGroup.h}
+          filename_and_path {include/fltk3/ScrollGroup.h}
         }
         file_ref {SecretInput.h} {
           uuid_Xcode4_BuildFile {4BDB4DCC-387B-40BE-99BA-006DED0FCBDA}
@@ -1158,7 +1159,7 @@
           uuid_Xcode4_BuildFileInHeaders {17B837F8-0F28-431F-ADAE-04322865F23B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/SecretInput.h}
+          filename_and_path {include/fltk3/SecretInput.h}
         }
         file_ref {SelectBrowser.h} {
           uuid_Xcode4_BuildFile {D7845810-9029-405E-ADA3-38C399188304}
@@ -1166,7 +1167,7 @@
           uuid_Xcode4_BuildFileInHeaders {B7B93C84-ADAA-40AC-9177-AAA069314391}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/SelectBrowser.h}
+          filename_and_path {include/fltk3/SelectBrowser.h}
         }
         file_ref {SharedImage.h} {
           uuid_Xcode4_BuildFile {F6781690-45D3-43A2-97D0-428E3F972600}
@@ -1174,7 +1175,7 @@
           uuid_Xcode4_BuildFileInHeaders {034AC216-1264-4079-A638-B25B5586EBB3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/SharedImage.h}
+          filename_and_path {include/fltk3/SharedImage.h}
         }
         file_ref {show_colormap.h} {
           uuid_Xcode4_BuildFile {03BC6417-4A25-49D8-85A9-54830C1D008E}
@@ -1182,7 +1183,7 @@
           uuid_Xcode4_BuildFileInHeaders {0EE3255F-C540-4507-87FD-67DF1CB9C57B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/show_colormap.h}
+          filename_and_path {include/fltk3/show_colormap.h}
         }
         file_ref {showInput.h} {
           uuid_Xcode4_BuildFile {9F31C590-F3DE-4CF5-AFB9-3A193109953D}
@@ -1190,7 +1191,7 @@
           uuid_Xcode4_BuildFileInHeaders {243DD608-9CDF-48B3-AA01-B8E25191E9F4}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/showInput.h}
+          filename_and_path {include/fltk3/showInput.h}
         }
         file_ref {SimpleCounter.h} {
           uuid_Xcode4_BuildFile {FDB479E7-809A-4CFB-AC49-334E29BBAC34}
@@ -1198,7 +1199,7 @@
           uuid_Xcode4_BuildFileInHeaders {03FFBC63-D943-41E1-9CE1-E6EE6DB7968F}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/SimpleCounter.h}
+          filename_and_path {include/fltk3/SimpleCounter.h}
         }
         file_ref {SingleWindow.h} {
           uuid_Xcode4_BuildFile {9132D3A1-012D-4D80-ACE1-8F382C0A351B}
@@ -1206,7 +1207,7 @@
           uuid_Xcode4_BuildFileInHeaders {6B6E9395-D797-4BB1-8548-C3DD71F9DFD1}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/SingleWindow.h}
+          filename_and_path {include/fltk3/SingleWindow.h}
         }
         file_ref {Slider.h} {
           uuid_Xcode4_BuildFile {EBE0213A-2491-433A-A674-322BE25FAA14}
@@ -1214,7 +1215,7 @@
           uuid_Xcode4_BuildFileInHeaders {58F214FC-B7A1-4476-A240-28AA6EBE814F}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Slider.h}
+          filename_and_path {include/fltk3/Slider.h}
         }
         file_ref {Spinner.h} {
           uuid_Xcode4_BuildFile {D76363C0-7FE0-4A29-8EBA-6F929B570EFF}
@@ -1222,7 +1223,7 @@
           uuid_Xcode4_BuildFileInHeaders {32F02A4A-46AA-43A9-B168-66EABF4AC7AF}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Spinner.h}
+          filename_and_path {include/fltk3/Spinner.h}
         }
         file_ref {Style.h} {
           uuid_Xcode4_BuildFile {3E5FDE91-66B5-4D67-8BB6-92C0A8FA56D7}
@@ -1230,7 +1231,7 @@
           uuid_Xcode4_BuildFileInHeaders {4D7A7651-910F-4947-9747-DBFC4F5ACD8B}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Style.h}
+          filename_and_path {include/fltk3/Style.h}
         }
         file_ref {SysMenuBar.h} {
           uuid_Xcode4_BuildFile {F9CF92AB-336C-4D0A-BFF4-835EC59F6CD1}
@@ -1238,7 +1239,7 @@
           uuid_Xcode4_BuildFileInHeaders {52D66EE7-091B-4554-A028-A06D04F481BE}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/SysMenuBar.h}
+          filename_and_path {include/fltk3/SysMenuBar.h}
         }
         file_ref {TabGroup.h} {
           uuid_Xcode4_BuildFile {C5106059-F99B-4031-925E-961380819E74}
@@ -1246,7 +1247,7 @@
           uuid_Xcode4_BuildFileInHeaders {2ABC0F5B-D156-4E2A-8805-C817195F0A58}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TabGroup.h}
+          filename_and_path {include/fltk3/TabGroup.h}
         }
         file_ref {Table.h} {
           uuid_Xcode4_BuildFile {ABE56142-DE83-4A0F-B010-446DCF23A83F}
@@ -1254,7 +1255,7 @@
           uuid_Xcode4_BuildFileInHeaders {0F974000-4A81-4F44-927A-5CD92C40A1AB}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Table.h}
+          filename_and_path {include/fltk3/Table.h}
         }
         file_ref {TableRow.h} {
           uuid_Xcode4_BuildFile {89662D26-D11B-416D-A194-583ED4288C78}
@@ -1262,7 +1263,7 @@
           uuid_Xcode4_BuildFileInHeaders {D2129EFD-8DCF-4241-96E9-D5F8288BCD3C}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TableRow.h}
+          filename_and_path {include/fltk3/TableRow.h}
         }
         file_ref {TextBuffer.h} {
           uuid_Xcode4_BuildFile {CDEC102F-FF80-40F7-A9D5-7B7E96042E19}
@@ -1270,7 +1271,7 @@
           uuid_Xcode4_BuildFileInHeaders {1EC56E32-DCBA-4902-9A44-E104B7C1EA04}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TextBuffer.h}
+          filename_and_path {include/fltk3/TextBuffer.h}
         }
         file_ref {TextDisplay.h} {
           uuid_Xcode4_BuildFile {A9AF1C37-3D0A-4F48-BA94-4B86C7A1A761}
@@ -1278,7 +1279,7 @@
           uuid_Xcode4_BuildFileInHeaders {47412292-91CB-4F3E-8E91-8E387FB2409D}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TextDisplay.h}
+          filename_and_path {include/fltk3/TextDisplay.h}
         }
         file_ref {TextEditor.h} {
           uuid_Xcode4_BuildFile {67C7FA0B-802E-4487-97A1-6E6387F62564}
@@ -1286,7 +1287,7 @@
           uuid_Xcode4_BuildFileInHeaders {032C0D1B-F7C0-4165-B390-04CC05B16008}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TextEditor.h}
+          filename_and_path {include/fltk3/TextEditor.h}
         }
         file_ref {TiledGroup.h} {
           uuid_Xcode4_BuildFile {6E1AAABD-0D0E-43B6-8155-0314EF3BE7FE}
@@ -1294,7 +1295,7 @@
           uuid_Xcode4_BuildFileInHeaders {E6D42645-6C7B-4F32-8F1D-D282CD7C2759}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TiledGroup.h}
+          filename_and_path {include/fltk3/TiledGroup.h}
         }
         file_ref {TiledImage.h} {
           uuid_Xcode4_BuildFile {F5886F9D-2362-4C9E-92FB-EF926EFECAE5}
@@ -1302,7 +1303,7 @@
           uuid_Xcode4_BuildFileInHeaders {55FA8DD4-3A6B-41C7-9C12-42D1B3629750}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TiledImage.h}
+          filename_and_path {include/fltk3/TiledImage.h}
         }
         file_ref {Timer.h} {
           uuid_Xcode4_BuildFile {59B60905-6FB9-4807-A57B-5401B9F8AAB0}
@@ -1310,7 +1311,7 @@
           uuid_Xcode4_BuildFileInHeaders {7D435058-9BC6-4BD8-9C06-A7CD0DCF2928}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Timer.h}
+          filename_and_path {include/fltk3/Timer.h}
         }
         file_ref {ToggleButton.h} {
           uuid_Xcode4_BuildFile {24974A99-72A3-4E92-922F-33308EA73586}
@@ -1318,7 +1319,7 @@
           uuid_Xcode4_BuildFileInHeaders {5B70C041-3241-49EF-B798-C2A977EE03FD}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ToggleButton.h}
+          filename_and_path {include/fltk3/ToggleButton.h}
         }
         file_ref {ToggleLightButton.h} {
           uuid_Xcode4_BuildFile {F28C203D-5411-4C83-BF4A-2CFD3CF3403A}
@@ -1326,7 +1327,7 @@
           uuid_Xcode4_BuildFileInHeaders {9836A45A-4039-4822-A8DC-A8A70696720D}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ToggleLightButton.h}
+          filename_and_path {include/fltk3/ToggleLightButton.h}
         }
         file_ref {ToggleRoundButton.h} {
           uuid_Xcode4_BuildFile {93A7154C-012D-476D-889D-9762A6750520}
@@ -1334,7 +1335,7 @@
           uuid_Xcode4_BuildFileInHeaders {60B64DAA-DF8F-4CDA-8AB0-0755C6D660B2}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ToggleRoundButton.h}
+          filename_and_path {include/fltk3/ToggleRoundButton.h}
         }
         file_ref {Tooltip.h} {
           uuid_Xcode4_BuildFile {8276B012-4188-4C12-8305-1F5251314F05}
@@ -1342,7 +1343,7 @@
           uuid_Xcode4_BuildFileInHeaders {F44ED487-33C0-4390-9AFF-E14EF80A6B2A}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Tooltip.h}
+          filename_and_path {include/fltk3/Tooltip.h}
         }
         file_ref {Tree.h} {
           uuid_Xcode4_BuildFile {C3BC5E98-4E3F-46D5-9A15-FFA50F065D47}
@@ -1350,7 +1351,7 @@
           uuid_Xcode4_BuildFileInHeaders {797815C0-D853-4374-8491-D79A6E32B00F}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Tree.h}
+          filename_and_path {include/fltk3/Tree.h}
         }
         file_ref {TreeItem.h} {
           uuid_Xcode4_BuildFile {FE8A3875-9AFD-4CD4-B185-179F8E48178E}
@@ -1358,7 +1359,7 @@
           uuid_Xcode4_BuildFileInHeaders {FA3EFF2F-55A0-48AE-A219-742C29B91EBC}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TreeItem.h}
+          filename_and_path {include/fltk3/TreeItem.h}
         }
         file_ref {TreeItemArray.h} {
           uuid_Xcode4_BuildFile {66D03DB1-40F6-4172-A57A-1D2C7A55CE91}
@@ -1366,7 +1367,7 @@
           uuid_Xcode4_BuildFileInHeaders {AC33B9D6-AAD0-46C9-9D3C-CD4B1DF3DC2D}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TreeItemArray.h}
+          filename_and_path {include/fltk3/TreeItemArray.h}
         }
         file_ref {TreePrefs.h} {
           uuid_Xcode4_BuildFile {C2B74F46-3E7C-4CD7-8267-4FC28F34895D}
@@ -1374,7 +1375,7 @@
           uuid_Xcode4_BuildFileInHeaders {47916CFC-DEAC-4C97-87E7-E90852A1DA48}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/TreePrefs.h}
+          filename_and_path {include/fltk3/TreePrefs.h}
         }
         file_ref {types.h} {
           uuid_Xcode4_BuildFile {DC994779-18AC-4E19-A594-CC1898905C23}
@@ -1382,7 +1383,7 @@
           uuid_Xcode4_BuildFileInHeaders {981A2121-8BF0-4100-834F-33D64D743735}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/types.h}
+          filename_and_path {include/fltk3/types.h}
         }
         file_ref {utf8.h} {
           uuid_Xcode4_BuildFile {681E2C35-DD25-4D5E-86E3-8D324589B6C3}
@@ -1390,7 +1391,7 @@
           uuid_Xcode4_BuildFileInHeaders {31CF6B74-9890-4CD5-A622-B66955254BAF}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/utf8.h}
+          filename_and_path {include/fltk3/utf8.h}
         }
         file_ref {Valuator.h} {
           uuid_Xcode4_BuildFile {C47845FF-66AC-429D-BEA1-A6DE64E3B916}
@@ -1398,7 +1399,7 @@
           uuid_Xcode4_BuildFileInHeaders {A5459139-9707-42A6-83E8-812ED01B4470}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Valuator.h}
+          filename_and_path {include/fltk3/Valuator.h}
         }
         file_ref {ValueInput.h} {
           uuid_Xcode4_BuildFile {DFE89C49-5316-4CBC-8197-BCFF6A20EE92}
@@ -1406,7 +1407,7 @@
           uuid_Xcode4_BuildFileInHeaders {CB50E373-F0EF-4A54-BCB5-EA81DC0B7EFD}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ValueInput.h}
+          filename_and_path {include/fltk3/ValueInput.h}
         }
         file_ref {ValueOutput.h} {
           uuid_Xcode4_BuildFile {F5859980-E64A-4F2F-8C57-35C2CFDBF3B6}
@@ -1414,7 +1415,7 @@
           uuid_Xcode4_BuildFileInHeaders {A62395C6-99EF-44CC-AFDA-4C40602E899E}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ValueOutput.h}
+          filename_and_path {include/fltk3/ValueOutput.h}
         }
         file_ref {ValueSlider.h} {
           uuid_Xcode4_BuildFile {9CCACFCE-2AEE-4A38-9F8C-7ABBDAA107EA}
@@ -1422,7 +1423,7 @@
           uuid_Xcode4_BuildFileInHeaders {AFE07F39-FDFF-44DF-B055-7C3F63517A4E}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/ValueSlider.h}
+          filename_and_path {include/fltk3/ValueSlider.h}
         }
         file_ref {Widget.h} {
           uuid_Xcode4_BuildFile {77EFEC33-D024-4917-9CDB-7D74C85D2145}
@@ -1430,7 +1431,7 @@
           uuid_Xcode4_BuildFileInHeaders {94E2F8C4-9026-4615-9CE8-6379806F20EB}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Widget.h}
+          filename_and_path {include/fltk3/Widget.h}
         }
         file_ref {win32.h} {
           uuid_Xcode4_BuildFile {B6BC0131-EF86-48A2-A56E-0A39CA8B36DF}
@@ -1438,7 +1439,7 @@
           uuid_Xcode4_BuildFileInHeaders {CA399162-BE25-41CB-BED0-CF55B2354DD7}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/win32.h}
+          filename_and_path {include/fltk3/win32.h}
         }
         file_ref {Window.h} {
           uuid_Xcode4_BuildFile {11F547C0-6521-40C7-ACBF-7258AB416476}
@@ -1446,7 +1447,7 @@
           uuid_Xcode4_BuildFileInHeaders {E2AA1677-998C-4AAF-A032-E0DA24CFDBE3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Window.h}
+          filename_and_path {include/fltk3/Window.h}
         }
         file_ref {WizardGroup.h} {
           uuid_Xcode4_BuildFile {911B9212-7CE9-4673-B58A-1F685B0F7488}
@@ -1454,7 +1455,7 @@
           uuid_Xcode4_BuildFileInHeaders {92B4EB04-831A-4CE6-ADE5-F32AD3F79630}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/WizardGroup.h}
+          filename_and_path {include/fltk3/WizardGroup.h}
         }
         file_ref {Wrapper.h} {
           uuid_Xcode4_BuildFile {D3AF8F9F-6681-4F22-A57D-19DF636D33A2}
@@ -1462,7 +1463,7 @@
           uuid_Xcode4_BuildFileInHeaders {65AFEF19-9ADA-44EA-82DF-DEFED5DD6CA6}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Wrapper.h}
+          filename_and_path {include/fltk3/Wrapper.h}
         }
         file_ref {x.h} {
           uuid_Xcode4_BuildFile {569F455D-36D9-478D-8499-634081EA3C24}
@@ -1470,7 +1471,7 @@
           uuid_Xcode4_BuildFileInHeaders {39A61403-FB07-4880-B309-5FDC8A0E92D3}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/x.h}
+          filename_and_path {include/fltk3/x.h}
         }
         file_ref {XBMImage.h} {
           uuid_Xcode4_BuildFile {8AF480EA-F1C2-4A25-9AD4-658E8600CB70}
@@ -1478,7 +1479,7 @@
           uuid_Xcode4_BuildFileInHeaders {CBE1938D-1ECF-4F06-B613-EF22483B5C48}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/XBMImage.h}
+          filename_and_path {include/fltk3/XBMImage.h}
         }
         file_ref {XPMImage.h} {
           uuid_Xcode4_BuildFile {DAEEEDE3-9330-459C-AC22-055D2BB29021}
@@ -1486,7 +1487,7 @@
           uuid_Xcode4_BuildFileInHeaders {ACA9550A-8689-4F8A-8C59-6F8A1D80B160}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/XPMImage.h}
+          filename_and_path {include/fltk3/XPMImage.h}
         }
         file_ref {Xutf8.h} {
           uuid_Xcode4_BuildFile {A0588617-DA9D-48BB-8001-E0414DBCBAA2}
@@ -1494,7 +1495,7 @@
           uuid_Xcode4_BuildFileInHeaders {E0943D9D-3EC5-4918-9A46-090378EBF9DF}
           build_env 96
           list_env 124
-          filename_and_path {fltk3/Xutf8.h}
+          filename_and_path {include/fltk3/Xutf8.h}
         }
       }
       folder Sources {open
@@ -1506,7 +1507,7 @@
           uuid_Xcode4_BuildFileInSources {69C261B5-4876-4079-9B0B-EBCE4F62E633}
           build_env 99
           list_env 96
-          filename_and_path {src/Fl_cocoa.mm}
+          filename_and_path {src/core/Fl_cocoa.mm}
         }
         file_ref {Fl_Native_File_Chooser_MAC.mm} {
           uuid_Xcode4_BuildFile {60D9759F-404F-4A7C-A356-2F92BC2F400F}
@@ -1514,7 +1515,7 @@
           uuid_Xcode4_BuildFileInSources {02BBCA82-9B2B-44D0-9C15-96A37443CA28}
           build_env 99
           list_env 96
-          filename_and_path {src/Fl_Native_File_Chooser_MAC.mm}
+          filename_and_path {src/core/Fl_Native_File_Chooser_MAC.mm}
         }
         file_ref {Fl_Quartz_Printer.mm} {
           uuid_Xcode4_BuildFile {982B3E9E-7B79-4E84-A10F-7270A2EB17A5}
@@ -1522,935 +1523,935 @@
           uuid_Xcode4_BuildFileInSources {B7920395-B4B5-480F-BB30-14BE46AA357D}
           build_env 99
           list_env 96
-          filename_and_path {src/Fl_Quartz_Printer.mm}
+          filename_and_path {src/core/Fl_Quartz_Printer.mm}
         }
         file_ref {Fl.cxx} {
           uuid_Xcode4_BuildFile {5E78E80A-9D1C-4351-9F3E-B2944D622982}
           uuid_Xcode4_FileRef {81045D02-0D89-472C-BAE7-D77BD81C23A2}
           uuid_Xcode4_BuildFileInSources {008DDC0F-78E3-4A40-8F42-9408DA34594C}
-          filename_and_path {src/Fl.cxx}
+          filename_and_path {src/core/Fl.cxx}
         }
         file_ref {Fl_Adjuster.cxx} {
           uuid_Xcode4_BuildFile {91FE1840-74E4-4847-8B8E-D8952CEAF112}
           uuid_Xcode4_FileRef {ECEA64F2-F8B3-4A76-B195-748D6949AD76}
           uuid_Xcode4_BuildFileInSources {2271ACEB-F7A7-435C-8F11-380D4086EF24}
-          filename_and_path {src/Fl_Adjuster.cxx}
+          filename_and_path {src/core/Fl_Adjuster.cxx}
         }
         file_ref {Fl_Bitmap.cxx} {
           uuid_Xcode4_BuildFile {E9733D69-4D22-4B2E-B89C-81D879FA8FC5}
           uuid_Xcode4_FileRef {D68004A5-9E82-4A55-B1D1-365E2E22B59B}
           uuid_Xcode4_BuildFileInSources {87F292ED-EBB4-4EBB-BAC3-FF7CAEA18EC5}
-          filename_and_path {src/Fl_Bitmap.cxx}
+          filename_and_path {src/core/Fl_Bitmap.cxx}
         }
         file_ref {Fl_Box.cxx} {
           uuid_Xcode4_BuildFile {F4F6FEBB-918A-4AC7-813D-7B3E68C40425}
           uuid_Xcode4_FileRef {81608512-8823-4586-AF62-6E7935A2B539}
           uuid_Xcode4_BuildFileInSources {D3D9C65E-F19F-4B98-BE09-98BD5E8C7725}
-          filename_and_path {src/Fl_Box.cxx}
+          filename_and_path {src/core/Fl_Box.cxx}
         }
         file_ref {Fl_Browser.cxx} {
           uuid_Xcode4_BuildFile {DA189983-8D64-4A1D-96B0-2E367C8C4CC6}
           uuid_Xcode4_FileRef {5CE1FF6E-BFDC-4925-A6BE-F6B954C22170}
           uuid_Xcode4_BuildFileInSources {F343A0DF-4678-4211-8A50-FC76857BF06F}
-          filename_and_path {src/Fl_Browser.cxx}
+          filename_and_path {src/core/Fl_Browser.cxx}
         }
         file_ref {Fl_Browser_.cxx} {
           uuid_Xcode4_BuildFile {545A2839-E435-4EB6-839C-22C991346FF0}
           uuid_Xcode4_FileRef {2FC85E98-E2B4-484F-815B-75078EBBA1CC}
           uuid_Xcode4_BuildFileInSources {9036C344-A95E-4174-8C78-610EB425415E}
-          filename_and_path {src/Fl_Browser_.cxx}
+          filename_and_path {src/core/Fl_Browser_.cxx}
         }
         file_ref {Fl_Browser_load.cxx} {
           uuid_Xcode4_BuildFile {C18A3B76-19AC-4503-9A82-6386F545EFE7}
           uuid_Xcode4_FileRef {B89AE0F9-320A-489A-A15A-34AEA064E6FF}
           uuid_Xcode4_BuildFileInSources {C96803EE-BABD-4805-97B5-C7008A9507D0}
-          filename_and_path {src/Fl_Browser_load.cxx}
+          filename_and_path {src/core/Fl_Browser_load.cxx}
         }
         file_ref {Fl_Button.cxx} {
           uuid_Xcode4_BuildFile {07627EF8-0726-4AEE-A7BE-5B01D59A2320}
           uuid_Xcode4_FileRef {70F96088-141B-442E-AF9B-5EAE13E45EFD}
           uuid_Xcode4_BuildFileInSources {DE2BB513-7AFF-460D-8095-4D0C6D632F84}
-          filename_and_path {src/Fl_Button.cxx}
+          filename_and_path {src/core/Fl_Button.cxx}
         }
         file_ref {Fl_Chart.cxx} {
           uuid_Xcode4_BuildFile {A6F1AA20-5E36-4069-95D7-B2ADB04EACBB}
           uuid_Xcode4_FileRef {39250031-7441-4BDF-ABE1-745EE2786E57}
           uuid_Xcode4_BuildFileInSources {B0CAF4D1-1E41-4BDD-AF60-C1F8DFCA17AA}
-          filename_and_path {src/Fl_Chart.cxx}
+          filename_and_path {src/core/Fl_Chart.cxx}
         }
         file_ref {Fl_Check_Browser.cxx} {
           uuid_Xcode4_BuildFile {2D43DF76-FFA8-46BE-8CC7-97E71F74AB36}
           uuid_Xcode4_FileRef {F6EC011E-29BD-4ADB-B4C8-EEC9E72E52E7}
           uuid_Xcode4_BuildFileInSources {37D83B9E-5F12-4F75-9351-7841D83CC630}
-          filename_and_path {src/Fl_Check_Browser.cxx}
+          filename_and_path {src/core/Fl_Check_Browser.cxx}
         }
         file_ref {Fl_Check_Button.cxx} {
           uuid_Xcode4_BuildFile {6F0253C7-58FE-4E3E-A84D-ACA19AE0B60F}
           uuid_Xcode4_FileRef {490C9DC5-6833-46C7-A0F5-F3D9C9795A6D}
           uuid_Xcode4_BuildFileInSources {B34F20AC-057A-41BD-B8E5-05E3F37A17B1}
-          filename_and_path {src/Fl_Check_Button.cxx}
+          filename_and_path {src/core/Fl_Check_Button.cxx}
         }
         file_ref {Fl_Choice.cxx} {
           uuid_Xcode4_BuildFile {3BD02867-1A12-4C3A-AE6C-5D570873345C}
           uuid_Xcode4_FileRef {6356BFF2-3C95-496B-8310-FA86D8F77F5C}
           uuid_Xcode4_BuildFileInSources {16189C32-2A6C-4A8A-BAF6-4DFE1DBD4A2E}
-          filename_and_path {src/Fl_Choice.cxx}
+          filename_and_path {src/core/Fl_Choice.cxx}
         }
         file_ref {Fl_Clock.cxx} {
           uuid_Xcode4_BuildFile {64809F27-28E9-4E6E-95D6-BF69AE67D5FD}
           uuid_Xcode4_FileRef {1C4F7DBF-440E-4FD8-A83E-F098D786280A}
           uuid_Xcode4_BuildFileInSources {4BB96489-76E9-44BD-A619-51624DCAD9BA}
-          filename_and_path {src/Fl_Clock.cxx}
+          filename_and_path {src/core/Fl_Clock.cxx}
         }
         file_ref {Fl_Color_Chooser.cxx} {
           uuid_Xcode4_BuildFile {F4AB783F-377F-4E93-8461-F7D5660002E3}
           uuid_Xcode4_FileRef {4CF353D8-81FC-4DE3-9189-39E910629419}
           uuid_Xcode4_BuildFileInSources {2D847DBF-42FA-4B1F-8C9F-587D52345529}
-          filename_and_path {src/Fl_Color_Chooser.cxx}
+          filename_and_path {src/core/Fl_Color_Chooser.cxx}
         }
         file_ref {Fl_Counter.cxx} {
           uuid_Xcode4_BuildFile {45E38AE7-C514-4BBB-A2CE-4B897029509D}
           uuid_Xcode4_FileRef {96D41530-E053-46CC-8B6F-C1EBDBF7E11E}
           uuid_Xcode4_BuildFileInSources {B2BB321C-34B1-4D09-9434-7E63F4A99288}
-          filename_and_path {src/Fl_Counter.cxx}
+          filename_and_path {src/core/Fl_Counter.cxx}
         }
         file_ref {Fl_Device.cxx} {
           uuid_Xcode4_BuildFile {9CBCE251-1829-44C4-BAF4-F95523E02EDF}
           uuid_Xcode4_FileRef {CB4EA804-687E-4579-AB3B-DE67EA64E9FB}
           uuid_Xcode4_BuildFileInSources {B1AB3E6C-AA35-4A2D-9177-44469F0CB1D8}
-          filename_and_path {src/Fl_Device.cxx}
+          filename_and_path {src/core/Fl_Device.cxx}
         }
         file_ref {Fl_Dial.cxx} {
           uuid_Xcode4_BuildFile {F4D1986C-C2AB-46EA-951E-0F696A73F7F5}
           uuid_Xcode4_FileRef {FDB40722-2840-4C62-98C1-D38291CAB607}
           uuid_Xcode4_BuildFileInSources {1369E7AD-84B4-4FD2-9D04-99627B063564}
-          filename_and_path {src/Fl_Dial.cxx}
+          filename_and_path {src/core/Fl_Dial.cxx}
         }
         file_ref {Fl_Double_Window.cxx} {
           uuid_Xcode4_BuildFile {6E8494D3-F35B-4D9F-846B-5EFE8203DC04}
           uuid_Xcode4_FileRef {D65E879C-A8F7-46EF-94C2-E474B73853BC}
           uuid_Xcode4_BuildFileInSources {43FA5D81-2826-46FC-95B5-175515727381}
-          filename_and_path {src/Fl_Double_Window.cxx}
+          filename_and_path {src/core/Fl_Double_Window.cxx}
         }
         file_ref {Fl_File_Browser.cxx} {
           uuid_Xcode4_BuildFile {3C81269D-295A-4C8D-93B4-9A7B72027FE2}
           uuid_Xcode4_FileRef {31B32445-8CFD-4811-A4C7-628F7D814264}
           uuid_Xcode4_BuildFileInSources {ECCA6DC4-1741-433D-AE93-BFDE5390C8D1}
-          filename_and_path {src/Fl_File_Browser.cxx}
+          filename_and_path {src/core/Fl_File_Browser.cxx}
         }
         file_ref {Fl_File_Chooser.cxx} {
           uuid_Xcode4_BuildFile {3B24302E-E655-42B1-8195-4A65633638BE}
           uuid_Xcode4_FileRef {E74C762F-3E71-4C17-8E8F-783C5BA2394A}
           uuid_Xcode4_BuildFileInSources {049EB013-455E-45FB-A557-6567D1DB2191}
-          filename_and_path {src/Fl_File_Chooser.cxx}
+          filename_and_path {src/core/Fl_File_Chooser.cxx}
         }
         file_ref {Fl_File_Chooser2.cxx} {
           uuid_Xcode4_BuildFile {22A4B14E-FC3A-4D9F-A56C-07AD36664F71}
           uuid_Xcode4_FileRef {A7770A7F-FF59-489E-AB60-3811A3BFB46C}
           uuid_Xcode4_BuildFileInSources {17819EFD-407A-4954-8402-474A47FF9A97}
-          filename_and_path {src/Fl_File_Chooser2.cxx}
+          filename_and_path {src/core/Fl_File_Chooser2.cxx}
         }
         file_ref {Fl_File_Icon.cxx} {
           uuid_Xcode4_BuildFile {AF7F7642-24A6-444F-9A16-C020F722E332}
           uuid_Xcode4_FileRef {19FA31AE-9089-4E73-97EA-56F68EC5D035}
           uuid_Xcode4_BuildFileInSources {3DCD457D-328B-485F-8CAE-463ED9EE4246}
-          filename_and_path {src/Fl_File_Icon.cxx}
+          filename_and_path {src/core/Fl_File_Icon.cxx}
         }
         file_ref {Fl_File_Input.cxx} {
           uuid_Xcode4_BuildFile {E80A34C3-962D-4260-9AE8-3099080002B9}
           uuid_Xcode4_FileRef {D05F5EBC-72FF-49FD-912F-BB5399F2DDC2}
           uuid_Xcode4_BuildFileInSources {8F4CA13F-413A-400F-8266-4ABF3D647078}
-          filename_and_path {src/Fl_File_Input.cxx}
+          filename_and_path {src/core/Fl_File_Input.cxx}
         }
         file_ref {Fl_Group.cxx} {
           uuid_Xcode4_BuildFile {18D56E2C-8A51-4AC4-8247-489E424C5E2D}
           uuid_Xcode4_FileRef {A5952FB9-CE93-48E3-8F3E-9906B15F1B22}
           uuid_Xcode4_BuildFileInSources {99FB6408-3164-4FB6-8895-DA2F31644F95}
-          filename_and_path {src/Fl_Group.cxx}
+          filename_and_path {src/core/Fl_Group.cxx}
         }
         file_ref {Fl_Help_View.cxx} {
           uuid_Xcode4_BuildFile {E452ED95-DA10-4107-8505-81FF885CB929}
           uuid_Xcode4_FileRef {047B650C-DBF4-44C6-8D05-A009B49D48D6}
           uuid_Xcode4_BuildFileInSources {5D0D1C84-6B6B-4157-A676-0974C4878E5E}
-          filename_and_path {src/Fl_Help_View.cxx}
+          filename_and_path {src/core/Fl_Help_View.cxx}
         }
         file_ref {Fl_Image.cxx} {
           uuid_Xcode4_BuildFile {DF973496-4200-49AA-BC93-249BA2210DA0}
           uuid_Xcode4_FileRef {E01E16F1-143B-485F-B5FC-F6258C32F5F6}
           uuid_Xcode4_BuildFileInSources {DE9BFEBC-9FBA-49A7-86CB-DD7151D3A983}
-          filename_and_path {src/Fl_Image.cxx}
+          filename_and_path {src/core/Fl_Image.cxx}
         }
         file_ref {Fl_Input.cxx} {
           uuid_Xcode4_BuildFile {76FB90B7-4336-4503-9BE1-BAFE1C6595FD}
           uuid_Xcode4_FileRef {184F6210-C542-4DA1-83AC-8711FD7A0384}
           uuid_Xcode4_BuildFileInSources {1DC72F81-A8D1-4EAC-A118-87F7C91CC055}
-          filename_and_path {src/Fl_Input.cxx}
+          filename_and_path {src/core/Fl_Input.cxx}
         }
         file_ref {Fl_Input_.cxx} {
           uuid_Xcode4_BuildFile {48A7C3EF-5BA8-4979-B113-AD2901649800}
           uuid_Xcode4_FileRef {A8924614-71DC-4863-9895-60692D538E50}
           uuid_Xcode4_BuildFileInSources {22D48105-5628-4901-9056-E590708B7A5C}
-          filename_and_path {src/Fl_Input_.cxx}
+          filename_and_path {src/core/Fl_Input_.cxx}
         }
         file_ref {Fl_Light_Button.cxx} {
           uuid_Xcode4_BuildFile {A7701349-FD57-46A0-84D3-B65C795C834B}
           uuid_Xcode4_FileRef {36C72097-8E40-47E8-914C-FB7F861ACD51}
           uuid_Xcode4_BuildFileInSources {EDFFE30A-F0F2-4A3C-BBFA-CC51818EFD3C}
-          filename_and_path {src/Fl_Light_Button.cxx}
+          filename_and_path {src/core/Fl_Light_Button.cxx}
         }
         file_ref {Fl_Menu.cxx} {
           uuid_Xcode4_BuildFile {FC5ADC05-7CB3-4213-9C1A-5F737CC9EDAE}
           uuid_Xcode4_FileRef {4672B51C-C45E-4BD5-8083-1C8403D7EAA5}
           uuid_Xcode4_BuildFileInSources {FB4C0311-03FE-4E29-A8FE-55B021C93B23}
-          filename_and_path {src/Fl_Menu.cxx}
+          filename_and_path {src/core/Fl_Menu.cxx}
         }
         file_ref {Fl_Menu_.cxx} {
           uuid_Xcode4_BuildFile {F4886C34-73DF-44FB-A100-AD10EEC6340F}
           uuid_Xcode4_FileRef {DE9E57A2-6320-4D65-8B5C-485F9D820566}
           uuid_Xcode4_BuildFileInSources {24D66152-234B-40E8-96E4-9BE455EEA9CD}
-          filename_and_path {src/Fl_Menu_.cxx}
+          filename_and_path {src/core/Fl_Menu_.cxx}
         }
         file_ref {Fl_Menu_Bar.cxx} {
           uuid_Xcode4_BuildFile {F690A4A3-C410-4C28-8B0C-DD694D66E06E}
           uuid_Xcode4_FileRef {265C00BF-D5DC-4849-813B-19E9A10BE42A}
           uuid_Xcode4_BuildFileInSources {BD7AE3AE-8500-4770-86A5-3D5C7D63A102}
-          filename_and_path {src/Fl_Menu_Bar.cxx}
+          filename_and_path {src/core/Fl_Menu_Bar.cxx}
         }
         file_ref {Fl_Menu_Button.cxx} {
           uuid_Xcode4_BuildFile {FD9004A1-F802-4C5D-9225-5344D737A373}
           uuid_Xcode4_FileRef {58FD2064-F6B4-447C-BCF8-E8998D2E68DB}
           uuid_Xcode4_BuildFileInSources {1EC305B7-05F0-4FD7-A035-7FAC4486CAEA}
-          filename_and_path {src/Fl_Menu_Button.cxx}
+          filename_and_path {src/core/Fl_Menu_Button.cxx}
         }
         file_ref {Fl_Menu_Window.cxx} {
           uuid_Xcode4_BuildFile {8C7C9611-0CD1-4C32-847B-11A750EB0745}
           uuid_Xcode4_FileRef {CBE03F81-8878-47F2-8580-C669735AEFC9}
           uuid_Xcode4_BuildFileInSources {63C85999-1423-4DE8-A091-764292A98548}
-          filename_and_path {src/Fl_Menu_Window.cxx}
+          filename_and_path {src/core/Fl_Menu_Window.cxx}
         }
         file_ref {Fl_Menu_add.cxx} {
           uuid_Xcode4_BuildFile {83EF6417-50A0-4E49-8D93-357ECA893443}
           uuid_Xcode4_FileRef {C649ABF1-FC49-41C2-B145-EEF11539FB5F}
           uuid_Xcode4_BuildFileInSources {A5B4D789-9B30-4430-9193-9A2FCFC14069}
-          filename_and_path {src/Fl_Menu_add.cxx}
+          filename_and_path {src/core/Fl_Menu_add.cxx}
         }
         file_ref {Fl_Menu_global.cxx} {
           uuid_Xcode4_BuildFile {8FA4327A-A0BD-4F1B-A447-93E87A9BCE1C}
           uuid_Xcode4_FileRef {25D17230-B6AF-4AF7-B3C0-2995DA9C6F23}
           uuid_Xcode4_BuildFileInSources {6C148F33-17A5-4AF2-9A68-A5C91E171DE8}
-          filename_and_path {src/Fl_Menu_global.cxx}
+          filename_and_path {src/core/Fl_Menu_global.cxx}
         }
         file_ref {Fl_Multi_Label.cxx} {
           uuid_Xcode4_BuildFile {2F50A0D8-B6F7-490A-A8EC-11F893AC8AB9}
           uuid_Xcode4_FileRef {37D57C7D-DA2D-4296-AA55-229B1A3BFC20}
           uuid_Xcode4_BuildFileInSources {46A6752E-635C-4E9A-AA63-5B7155C93484}
-          filename_and_path {src/Fl_Multi_Label.cxx}
+          filename_and_path {src/core/Fl_Multi_Label.cxx}
         }
         file_ref {Fl_Native_File_Chooser.cxx} {
           uuid_Xcode4_BuildFile {3CCD0677-B052-4EAB-847D-EA18F342D11F}
           uuid_Xcode4_FileRef {FC634C34-9189-40E6-90A4-8D42EF923847}
           uuid_Xcode4_BuildFileInSources {B30D6189-B227-4351-BD2F-EAAB376B6779}
-          filename_and_path {src/Fl_Native_File_Chooser.cxx}
+          filename_and_path {src/core/Fl_Native_File_Chooser.cxx}
         }
         file_ref {Fl_Overlay_Window.cxx} {
           uuid_Xcode4_BuildFile {50CCB3E9-D605-4F6C-97EA-4607BFC19BEC}
           uuid_Xcode4_FileRef {CEF1A66A-1E4B-4A61-A236-82B007C52832}
           uuid_Xcode4_BuildFileInSources {5857DE8B-5066-46E4-89B9-03B693032DB4}
-          filename_and_path {src/Fl_Overlay_Window.cxx}
+          filename_and_path {src/core/Fl_Overlay_Window.cxx}
         }
         file_ref {Fl_Pack.cxx} {
           uuid_Xcode4_BuildFile {2EC07AEA-4325-4E47-8D60-139740EAE1C2}
           uuid_Xcode4_FileRef {0F0129FF-794E-4E1D-9091-7900F59B9FB5}
           uuid_Xcode4_BuildFileInSources {5C93DA84-CF25-4D54-ACD5-CFE6763AA2F8}
-          filename_and_path {src/Fl_Pack.cxx}
+          filename_and_path {src/core/Fl_Pack.cxx}
         }
         file_ref {Fl_Paged_Device.cxx} {
           uuid_Xcode4_BuildFile {3851F580-32C6-4733-9167-C8CBD7610692}
           uuid_Xcode4_FileRef {680EF039-6F4F-4B31-B176-BD222AD802F6}
           uuid_Xcode4_BuildFileInSources {BFD45A93-42FD-4D79-8F8D-953B663EB28F}
-          filename_and_path {src/Fl_Paged_Device.cxx}
+          filename_and_path {src/core/Fl_Paged_Device.cxx}
         }
         file_ref {Fl_Pixmap.cxx} {
           uuid_Xcode4_BuildFile {C4D7E2E9-314F-4361-AD85-CDBEB0E9B9A8}
           uuid_Xcode4_FileRef {9AEB9365-32CF-48CF-8810-7F9B2046454D}
           uuid_Xcode4_BuildFileInSources {EBD65896-39D0-45DE-9F3B-66A8B55D8A75}
-          filename_and_path {src/Fl_Pixmap.cxx}
+          filename_and_path {src/core/Fl_Pixmap.cxx}
         }
         file_ref {Fl_Positioner.cxx} {
           uuid_Xcode4_BuildFile {AFC22C98-7D5A-47AD-8F79-8AE0ABA64048}
           uuid_Xcode4_FileRef {9EB992B1-D710-426E-A89D-8F3306A07426}
           uuid_Xcode4_BuildFileInSources {78781310-D555-4403-B4E1-EF0EA0E1E765}
-          filename_and_path {src/Fl_Positioner.cxx}
+          filename_and_path {src/core/Fl_Positioner.cxx}
         }
         file_ref {Fl_Printer.cxx} {
           uuid_Xcode4_BuildFile {7BA4A607-6C7B-4BB0-B8CB-0F7B4F3EDE3F}
           uuid_Xcode4_FileRef {53F2F9DE-99B0-4879-AD46-BA1EA21D0246}
           uuid_Xcode4_BuildFileInSources {C759F618-3B69-4CCC-A1E6-73E8DBD7488D}
-          filename_and_path {src/Fl_Printer.cxx}
+          filename_and_path {src/core/Fl_Printer.cxx}
         }
         file_ref {Fl_Preferences.cxx} {
           uuid_Xcode4_BuildFile {B6CC4604-60B8-4F7A-B134-C1D8EC515A12}
           uuid_Xcode4_FileRef {59610374-761E-4912-BDCE-5F669B7B3FA5}
           uuid_Xcode4_BuildFileInSources {96257899-ED70-4DA5-83C8-42BB3FAC5200}
-          filename_and_path {src/Fl_Preferences.cxx}
+          filename_and_path {src/core/Fl_Preferences.cxx}
         }
         file_ref {Fl_Progress.cxx} {
           uuid_Xcode4_BuildFile {20F00948-E2C6-4027-BE38-4BD07D34D62E}
           uuid_Xcode4_FileRef {B62169E8-CBE5-4A83-8893-D176E6E4DD9F}
           uuid_Xcode4_BuildFileInSources {486D31DD-6CF6-4B78-B16A-9D3B44B6284E}
-          filename_and_path {src/Fl_Progress.cxx}
+          filename_and_path {src/core/Fl_Progress.cxx}
         }
         file_ref {Fl_Repeat_Button.cxx} {
           uuid_Xcode4_BuildFile {A494B047-B897-48AC-B463-91BA94498C6B}
           uuid_Xcode4_FileRef {F2E611B0-825F-4087-AD5E-6863D06946BC}
           uuid_Xcode4_BuildFileInSources {4E4DEB0F-5530-4490-8B70-6CDBB682FBAF}
-          filename_and_path {src/Fl_Repeat_Button.cxx}
+          filename_and_path {src/core/Fl_Repeat_Button.cxx}
         }
         file_ref {Fl_Return_Button.cxx} {
           uuid_Xcode4_BuildFile {87CE402C-87A8-4C9C-AB9A-0F4D9B28E093}
           uuid_Xcode4_FileRef {69E296C0-6A1A-43E1-A97D-9905A82EE913}
           uuid_Xcode4_BuildFileInSources {5B4F6F77-657B-4161-8495-8F9D9DCE19F1}
-          filename_and_path {src/Fl_Return_Button.cxx}
+          filename_and_path {src/core/Fl_Return_Button.cxx}
         }
         file_ref {Fl_Roller.cxx} {
           uuid_Xcode4_BuildFile {07E3396B-982F-4ACA-A15F-604C0F96FB37}
           uuid_Xcode4_FileRef {A5526E66-615E-4C5D-BEFD-4A34647C13A4}
           uuid_Xcode4_BuildFileInSources {01570F25-D56A-4F38-A635-7167DA170772}
-          filename_and_path {src/Fl_Roller.cxx}
+          filename_and_path {src/core/Fl_Roller.cxx}
         }
         file_ref {Fl_Round_Button.cxx} {
           uuid_Xcode4_BuildFile {8CE9A2F5-45BE-4D71-845A-3BCEFBC1D0AF}
           uuid_Xcode4_FileRef {5DA33AF3-3DC1-4878-970E-E2E5BE824A96}
           uuid_Xcode4_BuildFileInSources {F32B3FAD-0BC4-4B34-9E26-9E69FA6158E3}
-          filename_and_path {src/Fl_Round_Button.cxx}
+          filename_and_path {src/core/Fl_Round_Button.cxx}
         }
         file_ref {Fl_Scroll.cxx} {
           uuid_Xcode4_BuildFile {0105EB4F-2FD7-4B85-B5D8-B09B33CEBC16}
           uuid_Xcode4_FileRef {135F7AE4-1BF1-474C-BB37-117ED80BB12D}
           uuid_Xcode4_BuildFileInSources {B506EE63-364E-4744-9C3F-94D382B52F62}
-          filename_and_path {src/Fl_Scroll.cxx}
+          filename_and_path {src/core/Fl_Scroll.cxx}
         }
         file_ref {Fl_Scrollbar.cxx} {
           uuid_Xcode4_BuildFile {5C70A5A9-A67B-4B14-9D23-ABBDCE533FD9}
           uuid_Xcode4_FileRef {6F7BEB35-6EBF-499D-A9F5-BD43167B1FB8}
           uuid_Xcode4_BuildFileInSources {5622DE29-66EB-4F16-8F99-3642F1607BC6}
-          filename_and_path {src/Fl_Scrollbar.cxx}
+          filename_and_path {src/core/Fl_Scrollbar.cxx}
         }
         file_ref {Fl_Shared_Image.cxx} {
           uuid_Xcode4_BuildFile {8A0C023A-0383-430E-95D8-B9AEA5E17969}
           uuid_Xcode4_FileRef {8580401C-DB11-4629-931A-AA44CAD127AC}
           uuid_Xcode4_BuildFileInSources {7CB9D27B-4F25-4039-8052-62DE828F280B}
-          filename_and_path {src/Fl_Shared_Image.cxx}
+          filename_and_path {src/core/Fl_Shared_Image.cxx}
         }
         file_ref {Fl_Single_Window.cxx} {
           uuid_Xcode4_BuildFile {C6BD816D-59B7-4C3C-A83A-A78D32B5BDBC}
           uuid_Xcode4_FileRef {17A03BA5-0404-4989-A516-C22F7D8BDCEE}
           uuid_Xcode4_BuildFileInSources {550F71EE-612D-428E-8D5C-55BC0A890F88}
-          filename_and_path {src/Fl_Single_Window.cxx}
+          filename_and_path {src/core/Fl_Single_Window.cxx}
         }
         file_ref {Fl_Slider.cxx} {
           uuid_Xcode4_BuildFile {05A570C7-6790-48AF-B07E-3DA2E4738B28}
           uuid_Xcode4_FileRef {085FAF82-6F59-4F42-AB4C-349D927A8BAA}
           uuid_Xcode4_BuildFileInSources {052ACB65-EF8A-454B-AFDB-BD3FDFA7B7C1}
-          filename_and_path {src/Fl_Slider.cxx}
+          filename_and_path {src/core/Fl_Slider.cxx}
         }
         file_ref {Style.cxx} {
           uuid_Xcode4_BuildFile {DD895EB1-D352-4D09-99D7-D9DE1758D9F9}
           uuid_Xcode4_FileRef {CAA3AD96-0CC5-4893-8893-68022791C783}
           uuid_Xcode4_BuildFileInSources {19513486-168E-430B-88A7-6896DF857E7B}
-          filename_and_path {src/Style.cxx}
+          filename_and_path {src/core/Style.cxx}
         }
         file_ref {Fl_Sys_Menu_Bar.cxx} {
           uuid_Xcode4_BuildFile {FC5F7A11-9A94-4596-BCF0-458EB54BF587}
           uuid_Xcode4_FileRef {43C12A4D-7C89-4BAE-B250-C5E2307220CC}
           uuid_Xcode4_BuildFileInSources {B7E4B117-9D18-4D8B-A68F-4BDF4AD5127B}
-          filename_and_path {src/Fl_Sys_Menu_Bar.cxx}
+          filename_and_path {src/core/Fl_Sys_Menu_Bar.cxx}
         }
         file_ref {Fl_Table.cxx} {
           uuid_Xcode4_BuildFile {BFA14DC7-600F-49DF-99DF-24A48C8142E6}
           uuid_Xcode4_FileRef {02584243-5408-4D4A-96A5-3FA806F5BCFA}
           uuid_Xcode4_BuildFileInSources {E0D6CAE3-0A6F-47A7-9A4B-CE1FB5C61EBA}
-          filename_and_path {src/Fl_Table.cxx}
+          filename_and_path {src/core/Fl_Table.cxx}
         }
         file_ref {Fl_Table_Row.cxx} {
           uuid_Xcode4_BuildFile {8B6C6698-82A4-490F-B7D9-3AB8182B0DD4}
           uuid_Xcode4_FileRef {7097EA09-FB87-4E3F-B29A-4E64EBE28CA8}
           uuid_Xcode4_BuildFileInSources {56C8DD01-88A0-4126-BD4E-B59F64F2047B}
-          filename_and_path {src/Fl_Table_Row.cxx}
+          filename_and_path {src/core/Fl_Table_Row.cxx}
         }
         file_ref {Fl_Tabs.cxx} {
           uuid_Xcode4_BuildFile {BDA1F834-FADD-4394-A2A3-67616F09DB47}
           uuid_Xcode4_FileRef {77126381-0CA1-4F19-8800-48B51FF6A61B}
           uuid_Xcode4_BuildFileInSources {135F22EC-8E13-48D2-AB1C-CF4BF223E1EA}
-          filename_and_path {src/Fl_Tabs.cxx}
+          filename_and_path {src/core/Fl_Tabs.cxx}
         }
         file_ref {Fl_Text_Buffer.cxx} {
           uuid_Xcode4_BuildFile {9BD37A78-D289-47A9-BBA2-7B67CEFEB0DA}
           uuid_Xcode4_FileRef {8867A20B-7B96-4B4E-BBE1-E492D157D617}
           uuid_Xcode4_BuildFileInSources {1ABCEAD8-C819-4B1E-971C-A1F949D56A9B}
-          filename_and_path {src/Fl_Text_Buffer.cxx}
+          filename_and_path {src/core/Fl_Text_Buffer.cxx}
         }
         file_ref {Fl_Text_Display.cxx} {
           uuid_Xcode4_BuildFile {1A94F4A9-95C0-4A75-8DE5-8945E353D597}
           uuid_Xcode4_FileRef {E5E1DA87-AA6C-460E-90F4-2C8D9411CDB9}
           uuid_Xcode4_BuildFileInSources {9B434666-39BA-4D16-8A78-77F8CF1A44C7}
-          filename_and_path {src/Fl_Text_Display.cxx}
+          filename_and_path {src/core/Fl_Text_Display.cxx}
         }
         file_ref {Fl_Text_Editor.cxx} {
           uuid_Xcode4_BuildFile {A507F8F6-5687-406F-A0B0-A424A3CB162B}
           uuid_Xcode4_FileRef {5995AACC-72D1-4AAA-A20A-84D4CEE88139}
           uuid_Xcode4_BuildFileInSources {038A56E9-A8EE-4DC7-971B-3C3FD59EF7FA}
-          filename_and_path {src/Fl_Text_Editor.cxx}
+          filename_and_path {src/core/Fl_Text_Editor.cxx}
         }
         file_ref {Fl_Tile.cxx} {
           uuid_Xcode4_BuildFile {3870255E-E9C6-4D50-9C26-E04A6CA659C9}
           uuid_Xcode4_FileRef {A3F6667D-AF2F-460F-809F-4BDDED6E95FC}
           uuid_Xcode4_BuildFileInSources {45E744C6-8C6C-4F03-913D-2D3B7F9F04EE}
-          filename_and_path {src/Fl_Tile.cxx}
+          filename_and_path {src/core/Fl_Tile.cxx}
         }
         file_ref {Fl_Tiled_Image.cxx} {
           uuid_Xcode4_BuildFile {C043B0DE-0983-418C-88CB-5CB7F7F4A60A}
           uuid_Xcode4_FileRef {4C92BA7B-29EF-46D2-91C9-348D49388F69}
           uuid_Xcode4_BuildFileInSources {E9D3E58E-0CCD-4003-845F-E0C0B2BC43EA}
-          filename_and_path {src/Fl_Tiled_Image.cxx}
+          filename_and_path {src/core/Fl_Tiled_Image.cxx}
         }
         file_ref {Fl_Tooltip.cxx} {
           uuid_Xcode4_BuildFile {36ACF63E-9691-4DFE-8918-CA3610F13FAD}
           uuid_Xcode4_FileRef {22CA4A41-F913-4DAC-A13D-CC57F6A6F244}
           uuid_Xcode4_BuildFileInSources {90FFE6AA-D57A-4579-BAB9-1C971983C991}
-          filename_and_path {src/Fl_Tooltip.cxx}
+          filename_and_path {src/core/Fl_Tooltip.cxx}
         }
         file_ref {Fl_Tree.cxx} {
           uuid_Xcode4_BuildFile {AE64AF6B-751E-4D4E-B923-16EFC07C9234}
           uuid_Xcode4_FileRef {214492E9-38C0-491D-AC42-F4E1EF8FEAA3}
           uuid_Xcode4_BuildFileInSources {68148315-74B0-49C3-9C8F-FE81AA36873D}
-          filename_and_path {src/Fl_Tree.cxx}
+          filename_and_path {src/core/Fl_Tree.cxx}
         }
         file_ref {Fl_Tree_Item.cxx} {
           uuid_Xcode4_BuildFile {03133ABA-346B-4DEC-B667-9E9A78C07AD7}
           uuid_Xcode4_FileRef {D9F29791-60DE-48C5-9266-701106AB7E8E}
           uuid_Xcode4_BuildFileInSources {9A57CF11-9BC9-40E0-B6C2-E305BAEF98A7}
-          filename_and_path {src/Fl_Tree_Item.cxx}
+          filename_and_path {src/core/Fl_Tree_Item.cxx}
         }
         file_ref {Fl_Tree_Item_Array.cxx} {
           uuid_Xcode4_BuildFile {A082BAF2-ECA2-4E15-A323-76837C355BE9}
           uuid_Xcode4_FileRef {D6CBFFFA-2FE1-4D65-883E-F592FACE5284}
           uuid_Xcode4_BuildFileInSources {D2A37420-118D-4BAF-A60C-C4B971A051DE}
-          filename_and_path {src/Fl_Tree_Item_Array.cxx}
+          filename_and_path {src/core/Fl_Tree_Item_Array.cxx}
         }
         file_ref {Fl_Tree_Prefs.cxx} {
           uuid_Xcode4_BuildFile {D18C9E57-25E8-4D5D-8A64-59536C9DD869}
           uuid_Xcode4_FileRef {CFFE37EE-309C-43FC-BCE5-41E02E7B592D}
           uuid_Xcode4_BuildFileInSources {68CC4C36-27B6-4DA0-9B5A-A5E1BCEE853E}
-          filename_and_path {src/Fl_Tree_Prefs.cxx}
+          filename_and_path {src/core/Fl_Tree_Prefs.cxx}
         }
         file_ref {Fl_Valuator.cxx} {
           uuid_Xcode4_BuildFile {2BE8F141-3682-40D9-86E6-ED82BFF69E75}
           uuid_Xcode4_FileRef {35EB53B1-EE73-4CA2-A8DE-47D037A4970E}
           uuid_Xcode4_BuildFileInSources {4A519B4F-67A2-43BF-9740-82E3DA6D3231}
-          filename_and_path {src/Fl_Valuator.cxx}
+          filename_and_path {src/core/Fl_Valuator.cxx}
         }
         file_ref {Fl_Value_Input.cxx} {
           uuid_Xcode4_BuildFile {44BC0D55-DA69-4BD4-9F19-B42DD0F34E4E}
           uuid_Xcode4_FileRef {1685625E-A5F8-463D-BE13-D96C29D7D314}
           uuid_Xcode4_BuildFileInSources {BD78190E-0B6A-4932-85C7-DA11B71AFEDA}
-          filename_and_path {src/Fl_Value_Input.cxx}
+          filename_and_path {src/core/Fl_Value_Input.cxx}
         }
         file_ref {Fl_Value_Output.cxx} {
           uuid_Xcode4_BuildFile {4EA1B94C-4E2A-4416-A2D4-2552A132F55A}
           uuid_Xcode4_FileRef {7553A0E7-0663-41E1-AE1E-E07C7DB0DDE5}
           uuid_Xcode4_BuildFileInSources {7E26A26E-5A02-440D-8966-60F1255F67D7}
-          filename_and_path {src/Fl_Value_Output.cxx}
+          filename_and_path {src/core/Fl_Value_Output.cxx}
         }
         file_ref {Fl_Value_Slider.cxx} {
           uuid_Xcode4_BuildFile {2AF743E0-9646-472E-9B92-7D02BD5C25D0}
           uuid_Xcode4_FileRef {07F5E789-E549-43E0-B527-FB1FE46B9744}
           uuid_Xcode4_BuildFileInSources {00BFB74D-1DF3-4632-9997-B303AFF72C8E}
-          filename_and_path {src/Fl_Value_Slider.cxx}
+          filename_and_path {src/core/Fl_Value_Slider.cxx}
         }
         file_ref {Fl_Widget.cxx} {
           uuid_Xcode4_BuildFile {9B2E9C9D-3B03-453C-B5ED-887C12F26BBC}
           uuid_Xcode4_FileRef {C5F5E189-F794-4C76-B727-E18198ADF418}
           uuid_Xcode4_BuildFileInSources {C8308863-F3C1-47E0-8715-2A26C5442423}
-          filename_and_path {src/Fl_Widget.cxx}
+          filename_and_path {src/core/Fl_Widget.cxx}
         }
         file_ref {Fl_Window.cxx} {
           uuid_Xcode4_BuildFile {92A1ED53-56AF-4774-ADED-DC90687267DF}
           uuid_Xcode4_FileRef {8E1A3A4F-8323-456A-9EC0-B1C80AF48D54}
           uuid_Xcode4_BuildFileInSources {EAFF1F86-859B-4124-B744-7D388FCCEA28}
-          filename_and_path {src/Fl_Window.cxx}
+          filename_and_path {src/core/Fl_Window.cxx}
         }
         file_ref {Fl_Window_fullscreen.cxx} {
           uuid_Xcode4_BuildFile {06F92B62-70C7-4220-9B40-9E49613889D5}
           uuid_Xcode4_FileRef {7679F6CC-1F04-4C95-82A8-45ADD9B921DA}
           uuid_Xcode4_BuildFileInSources {C62F4F9E-5D2F-4E98-A29C-451146033106}
-          filename_and_path {src/Fl_Window_fullscreen.cxx}
+          filename_and_path {src/core/Fl_Window_fullscreen.cxx}
         }
         file_ref {Fl_Window_hotspot.cxx} {
           uuid_Xcode4_BuildFile {01838D98-2D61-477B-8251-BFEF7F7934B1}
           uuid_Xcode4_FileRef {B5E58AC3-DBBC-4921-9066-AABABE238301}
           uuid_Xcode4_BuildFileInSources {A76E032A-9937-4086-80F0-B370163BB493}
-          filename_and_path {src/Fl_Window_hotspot.cxx}
+          filename_and_path {src/core/Fl_Window_hotspot.cxx}
         }
         file_ref {Fl_Window_iconize.cxx} {
           uuid_Xcode4_BuildFile {C23C9712-2419-4812-927C-ADFAB6DF91C0}
           uuid_Xcode4_FileRef {C34CF806-B0A3-4A4A-B3B1-502CDFD23D3B}
           uuid_Xcode4_BuildFileInSources {E373B7F4-2FFB-4CEE-9357-7586F6D255E9}
-          filename_and_path {src/Fl_Window_iconize.cxx}
+          filename_and_path {src/core/Fl_Window_iconize.cxx}
         }
         file_ref {Fl_Wizard.cxx} {
           uuid_Xcode4_BuildFile {0ECB24E4-43CE-497B-AE79-CFB4AA24EE9F}
           uuid_Xcode4_FileRef {A84F1844-4DC5-4FCD-925E-20F4809D2871}
           uuid_Xcode4_BuildFileInSources {72DEB4A9-12C7-445B-82A8-8DB9C103EF90}
-          filename_and_path {src/Fl_Wizard.cxx}
+          filename_and_path {src/core/Fl_Wizard.cxx}
         }
         file_ref {Fl_XBM_Image.cxx} {
           uuid_Xcode4_BuildFile {0331C1F4-F50E-40CE-A3DF-DBCE1026AEE5}
           uuid_Xcode4_FileRef {9A21D7ED-A598-46CE-9BEF-FF2BB0EDD969}
           uuid_Xcode4_BuildFileInSources {F4974EC2-D5E9-4919-8325-C1F3AEB0CC0D}
-          filename_and_path {src/Fl_XBM_Image.cxx}
+          filename_and_path {src/core/Fl_XBM_Image.cxx}
         }
         file_ref {Fl_XPM_Image.cxx} {
           uuid_Xcode4_BuildFile {BA6520FE-E8C8-46CE-97D2-B2004FBA58EB}
           uuid_Xcode4_FileRef {302A3FA8-E0E6-4BBF-BFFF-61815255E28C}
           uuid_Xcode4_BuildFileInSources {A7891F57-3F3F-4B7F-B2EF-B57A4D70C5D4}
-          filename_and_path {src/Fl_XPM_Image.cxx}
+          filename_and_path {src/core/Fl_XPM_Image.cxx}
         }
         file_ref {Fl_abort.cxx} {
           uuid_Xcode4_BuildFile {76CBBC9B-34FC-4D1D-8B91-4364D399C78E}
           uuid_Xcode4_FileRef {671B96BA-1F00-4285-B741-6287EE31AB76}
           uuid_Xcode4_BuildFileInSources {230F7BA0-D22C-4FF3-BDAC-74F889B89DFF}
-          filename_and_path {src/Fl_abort.cxx}
+          filename_and_path {src/core/Fl_abort.cxx}
         }
         file_ref {Fl_add_idle.cxx} {
           uuid_Xcode4_BuildFile {995D8E2D-7F48-4AA5-BC5D-1EE141C7D5B7}
           uuid_Xcode4_FileRef {1821AF47-D43D-4B6F-BAF7-0C8239CB0CF8}
           uuid_Xcode4_BuildFileInSources {EC8E6A4E-E23B-4501-9094-B62AEC330000}
-          filename_and_path {src/Fl_add_idle.cxx}
+          filename_and_path {src/core/Fl_add_idle.cxx}
         }
         file_ref {Fl_arg.cxx} {
           uuid_Xcode4_BuildFile {3DBCCC28-455E-4B3D-A821-A87B87661BAB}
           uuid_Xcode4_FileRef {8E5EB755-F5D6-4F27-8C0C-B3BD5109FC0C}
           uuid_Xcode4_BuildFileInSources {A87E247A-A9E6-4714-843A-A9F46B7DFEE1}
-          filename_and_path {src/Fl_arg.cxx}
+          filename_and_path {src/core/Fl_arg.cxx}
         }
         file_ref {Fl_compose.cxx} {
           uuid_Xcode4_BuildFile {008D083F-48BF-4D00-91BE-4A038C38678F}
           uuid_Xcode4_FileRef {AA048ACB-ADC4-4FE4-9FEE-77DF739595BD}
           uuid_Xcode4_BuildFileInSources {867ED2B3-580E-4431-AD43-EC19CBA63053}
-          filename_and_path {src/Fl_compose.cxx}
+          filename_and_path {src/core/Fl_compose.cxx}
         }
         file_ref {Fl_display.cxx} {
           uuid_Xcode4_BuildFile {7CD1939D-5904-41CA-8EDF-051E74AF82AD}
           uuid_Xcode4_FileRef {44287148-A93A-4F14-BF82-CF1A80C4EA41}
           uuid_Xcode4_BuildFileInSources {EF8285FB-C1F0-4987-9920-B186F7E61B8A}
-          filename_and_path {src/Fl_display.cxx}
+          filename_and_path {src/core/Fl_display.cxx}
         }
         file_ref {Fl_get_key.cxx} {
           uuid_Xcode4_BuildFile {A82ED410-8A3B-4306-8DB8-B26F032BF0B4}
           uuid_Xcode4_FileRef {A8DC358A-CD4F-4EDF-BCC0-1853A9A8AE55}
           uuid_Xcode4_BuildFileInSources {11ADE417-BC90-4DDF-8E9C-777EEE8083CE}
-          filename_and_path {src/Fl_get_key.cxx}
+          filename_and_path {src/core/Fl_get_key.cxx}
         }
         file_ref {Fl_get_system_colors.cxx} {
           uuid_Xcode4_BuildFile {304D9DBC-B02C-4B24-9313-78D56E0DB732}
           uuid_Xcode4_FileRef {FEADB63E-10A5-4C86-BDC0-C7427884C5C5}
           uuid_Xcode4_BuildFileInSources {05360A38-1464-4542-ADD3-F1DC5DE74075}
-          filename_and_path {src/Fl_get_system_colors.cxx}
+          filename_and_path {src/core/Fl_get_system_colors.cxx}
         }
         file_ref {Fl_grab.cxx} {
           uuid_Xcode4_BuildFile {63ABEAB0-ACB7-4C09-907A-41FB050A8D7C}
           uuid_Xcode4_FileRef {76AA6E6C-3BA9-4D36-8E49-3F1EF8125874}
           uuid_Xcode4_BuildFileInSources {DF2B279A-3F18-4376-A29F-EF041DAF6A30}
-          filename_and_path {src/Fl_grab.cxx}
+          filename_and_path {src/core/Fl_grab.cxx}
         }
         file_ref {Fl_lock.cxx} {
           uuid_Xcode4_BuildFile {590BA941-4384-40FA-AFFA-2CA40D153532}
           uuid_Xcode4_FileRef {7FAC5183-623B-4758-B960-41D044E55B90}
           uuid_Xcode4_BuildFileInSources {F08C8B0E-2FA4-4A06-8350-642417682E0C}
-          filename_and_path {src/Fl_lock.cxx}
+          filename_and_path {src/core/Fl_lock.cxx}
         }
         file_ref {Fl_own_colormap.cxx} {
           uuid_Xcode4_BuildFile {2A1194F3-22E2-490B-AD07-E1CAB1EBB610}
           uuid_Xcode4_FileRef {013DBB50-59E0-4063-B31F-D57E3C31E2A9}
           uuid_Xcode4_BuildFileInSources {D93BEFC6-7FD5-48E3-935B-5D96C57C91B9}
-          filename_and_path {src/Fl_own_colormap.cxx}
+          filename_and_path {src/core/Fl_own_colormap.cxx}
         }
         file_ref {Fl_visual.cxx} {
           uuid_Xcode4_BuildFile {899B51B6-BAE8-4D54-942F-B2CD51DE703F}
           uuid_Xcode4_FileRef {1626800F-6D7F-4052-88E8-7EF69E2468DD}
           uuid_Xcode4_BuildFileInSources {D57FBCFB-33F0-4145-A643-4334A7F80562}
-          filename_and_path {src/Fl_visual.cxx}
+          filename_and_path {src/core/Fl_visual.cxx}
         }
         file_ref {Fl_x.cxx} {
           uuid_Xcode4_BuildFile {4FEC890B-E99A-4CC0-B4FA-8A61FFB4C5AD}
           uuid_Xcode4_FileRef {F285310A-3E4D-4595-B259-6AD6965104C8}
           uuid_Xcode4_BuildFileInSources {D9007598-62D1-4DEA-BB6B-B7B00EF91A73}
-          filename_and_path {src/Fl_x.cxx}
+          filename_and_path {src/core/Fl_x.cxx}
         }
         file_ref {filename_absolute.cxx} {
           uuid_Xcode4_BuildFile {9C057CB7-470D-474A-8A65-F3EB5D64C178}
           uuid_Xcode4_FileRef {04A6409B-1DA2-4F77-8692-2F0417606460}
           uuid_Xcode4_BuildFileInSources {AABCD211-5E58-4F6F-8407-F05C5B24F9F8}
-          filename_and_path {src/filename_absolute.cxx}
+          filename_and_path {src/core/filename_absolute.cxx}
         }
         file_ref {filename_expand.cxx} {
           uuid_Xcode4_BuildFile {53B53EC9-FB0E-4CA1-908C-AD77EC9602D1}
           uuid_Xcode4_FileRef {F9F779F2-6B64-4A82-B453-84BD4A837595}
           uuid_Xcode4_BuildFileInSources {B1C7F800-5F13-4AF7-8785-DF351ED0339C}
-          filename_and_path {src/filename_expand.cxx}
+          filename_and_path {src/core/filename_expand.cxx}
         }
         file_ref {filename_ext.cxx} {
           uuid_Xcode4_BuildFile {D613722A-19E9-4250-953B-907DFE7B14FC}
           uuid_Xcode4_FileRef {210616B2-483B-418C-9D2D-89C418A5CD3B}
           uuid_Xcode4_BuildFileInSources {80D7B46E-ED1F-468B-8C5B-E65A968CCDF8}
-          filename_and_path {src/filename_ext.cxx}
+          filename_and_path {src/core/filename_ext.cxx}
         }
         file_ref {filename_isdir.cxx} {
           uuid_Xcode4_BuildFile {6C9314CD-21BC-40F7-8415-73B0E190D503}
           uuid_Xcode4_FileRef {C07EC3AE-3C83-4B3E-9966-35A28058E2CA}
           uuid_Xcode4_BuildFileInSources {3211F94B-69C8-49ED-B0E1-2B661D48CC63}
-          filename_and_path {src/filename_isdir.cxx}
+          filename_and_path {src/core/filename_isdir.cxx}
         }
         file_ref {filename_list.cxx} {
           uuid_Xcode4_BuildFile {F2152084-2546-45BA-8321-EB4ADC4D82C9}
           uuid_Xcode4_FileRef {F08599CC-AC58-4DC3-9A01-8C41395AB3D0}
           uuid_Xcode4_BuildFileInSources {8C352F42-1C2F-4C09-B088-AEE742F1FA19}
-          filename_and_path {src/filename_list.cxx}
+          filename_and_path {src/core/filename_list.cxx}
         }
         file_ref {filename_match.cxx} {
           uuid_Xcode4_BuildFile {D2F1A161-BF18-4766-B901-D2BF0C467D27}
           uuid_Xcode4_FileRef {AB171A4B-B928-4010-BDE1-1F82E10FD0AD}
           uuid_Xcode4_BuildFileInSources {BF87576C-B066-4869-859A-D0477380B991}
-          filename_and_path {src/filename_match.cxx}
+          filename_and_path {src/core/filename_match.cxx}
         }
         file_ref {filename_setext.cxx} {
           uuid_Xcode4_BuildFile {B68A8072-65B1-4E62-8618-393D6277AB38}
           uuid_Xcode4_FileRef {003AA96B-483E-4BCF-BB09-CF9C7585B088}
           uuid_Xcode4_BuildFileInSources {53ADEE51-9229-4C76-A145-4FAE4A79CA21}
-          filename_and_path {src/filename_setext.cxx}
+          filename_and_path {src/core/filename_setext.cxx}
         }
         file_ref {fl_arc.cxx} {
           uuid_Xcode4_BuildFile {F2D72D4B-3CD3-424B-BCBE-E6ED0B1ADE19}
           uuid_Xcode4_FileRef {876B6A63-7D11-413F-926D-F400FC3119DD}
           uuid_Xcode4_BuildFileInSources {CF3BDDBE-929B-42C9-B756-D8C9B4C8A1D2}
-          filename_and_path {src/fl_arc.cxx}
+          filename_and_path {src/core/fl_arc.cxx}
         }
         file_ref {fl_arci.cxx} {
           uuid_Xcode4_BuildFile {201C7772-F8EA-46A9-8675-1DC75946FF84}
           uuid_Xcode4_FileRef {E52CB16D-9900-4D70-ACBA-7698063934AA}
           uuid_Xcode4_BuildFileInSources {3C758F19-115F-4754-92FA-29F331A7A741}
-          filename_and_path {src/fl_arci.cxx}
+          filename_and_path {src/core/fl_arci.cxx}
         }
         file_ref {fl_ask.cxx} {
           uuid_Xcode4_BuildFile {7888A1B7-3CC5-44AD-B3AB-20E7A8B7289F}
           uuid_Xcode4_FileRef {60E7DD73-D034-4D69-BA46-619166E2E30F}
           uuid_Xcode4_BuildFileInSources {F10B0DD6-7998-48AA-AE32-78A6D8879B1C}
-          filename_and_path {src/fl_ask.cxx}
+          filename_and_path {src/core/fl_ask.cxx}
         }
         file_ref {fl_boxtype.cxx} {
           uuid_Xcode4_BuildFile {FFD22E0B-E0EC-485B-8838-5DF7DC9649AC}
           uuid_Xcode4_FileRef {BC14596F-6410-40F3-96F5-930B8CE39DAF}
           uuid_Xcode4_BuildFileInSources {7CD1A504-D74F-4F06-AAA0-B99DFB39DF46}
-          filename_and_path {src/fl_boxtype.cxx}
+          filename_and_path {src/core/fl_boxtype.cxx}
         }
         file_ref {fl_call_main.cxx} {
           uuid_Xcode4_BuildFile {E0BFCC98-3264-4E4F-A465-DAD81F5A9450}
           uuid_Xcode4_FileRef {8B35EF2F-2920-4F0F-A82D-D8472B46BDD7}
           uuid_Xcode4_BuildFileInSources {36978A2B-1507-4071-9AD5-7F9BDA3F8D90}
-          filename_and_path {src/fl_call_main.cxx}
+          filename_and_path {src/core/fl_call_main.cxx}
         }
         file_ref {fl_color.cxx} {
           uuid_Xcode4_BuildFile {27FB3CD2-EF50-4CE1-A940-76EE40C14C3D}
           uuid_Xcode4_FileRef {02716487-AA34-406A-9C95-983284DE5A34}
           uuid_Xcode4_BuildFileInSources {E5A3C248-605C-4BC2-BA7A-9BF5550D91DA}
-          filename_and_path {src/fl_color.cxx}
+          filename_and_path {src/core/fl_color.cxx}
         }
         file_ref {fl_cursor.cxx} {
           uuid_Xcode4_BuildFile {191125BA-A890-4754-AB59-D8FB26F9328A}
           uuid_Xcode4_FileRef {C832D220-A5C0-4938-8129-C2CB8FBAFED8}
           uuid_Xcode4_BuildFileInSources {79967B56-B64B-423D-B3EA-8097A7A830CF}
-          filename_and_path {src/fl_cursor.cxx}
+          filename_and_path {src/core/fl_cursor.cxx}
         }
         file_ref {fl_curve.cxx} {
           uuid_Xcode4_BuildFile {56EADAE0-20B2-430D-B01C-FA223EA97E3A}
           uuid_Xcode4_FileRef {53EC964E-94FC-461A-A2EF-7CA3BF80B206}
           uuid_Xcode4_BuildFileInSources {B2341118-0C6D-4D9E-876D-4B5EC32E75A1}
-          filename_and_path {src/fl_curve.cxx}
+          filename_and_path {src/core/fl_curve.cxx}
         }
         file_ref {fl_diamond_box.cxx} {
           uuid_Xcode4_BuildFile {E40B19F0-5E9F-4EC7-9899-F4528B9AA70D}
           uuid_Xcode4_FileRef {5557266E-5E95-4208-AE3A-EA3B72D5DF09}
           uuid_Xcode4_BuildFileInSources {2BF48610-D394-48FD-8CF6-4319B5C7950E}
-          filename_and_path {src/fl_diamond_box.cxx}
+          filename_and_path {src/core/fl_diamond_box.cxx}
         }
         file_ref {fl_dnd.cxx} {
           uuid_Xcode4_BuildFile {298EDA4F-8AF0-4A92-AFC1-9408CFCD5712}
           uuid_Xcode4_FileRef {D1E006BE-6D34-4468-9F0D-9085A8E51304}
           uuid_Xcode4_BuildFileInSources {207AE6E5-9923-44E6-84D3-5AEC30896F39}
-          filename_and_path {src/fl_dnd.cxx}
+          filename_and_path {src/core/fl_dnd.cxx}
         }
         file_ref {fl_draw.cxx} {
           uuid_Xcode4_BuildFile {4F438445-50DE-4B76-BBFF-BC46EBBFA664}
           uuid_Xcode4_FileRef {3CF0F8B5-7C8D-4462-B572-4A122D6549B0}
           uuid_Xcode4_BuildFileInSources {363F858B-A81F-4AFF-A530-A54242350184}
-          filename_and_path {src/fl_draw.cxx}
+          filename_and_path {src/core/fl_draw.cxx}
         }
         file_ref {fl_draw_image.cxx} {
           uuid_Xcode4_BuildFile {4665DB5F-068D-4310-B2C0-AE689AA85929}
           uuid_Xcode4_FileRef {F608DA64-EF05-49A3-ABAC-C7C9E7494BEA}
           uuid_Xcode4_BuildFileInSources {F546A37A-4D5E-4409-9163-28738A3E4227}
-          filename_and_path {src/fl_draw_image.cxx}
+          filename_and_path {src/core/fl_draw_image.cxx}
         }
         file_ref {fl_draw_pixmap.cxx} {
           uuid_Xcode4_BuildFile {E4923B73-9025-450C-BB43-97FC0850A83A}
           uuid_Xcode4_FileRef {B6E2BA6C-59E0-4F18-AD7D-164F016C0FF0}
           uuid_Xcode4_BuildFileInSources {30E10499-75E4-4180-8EB1-884A87A5DD43}
-          filename_and_path {src/fl_draw_pixmap.cxx}
+          filename_and_path {src/core/fl_draw_pixmap.cxx}
         }
         file_ref {fl_encoding_latin1.cxx} {
           uuid_Xcode4_BuildFile {B00A9E35-5560-4825-904B-EF57CD4C0A92}
           uuid_Xcode4_FileRef {0BEBF5A7-7773-43BE-91CC-B0DFBB6BDA08}
           uuid_Xcode4_BuildFileInSources {DE48D544-6329-4439-8CA5-E1D3FDA1F6E0}
-          filename_and_path {src/fl_encoding_latin1.cxx}
+          filename_and_path {src/core/fl_encoding_latin1.cxx}
         }
         file_ref {fl_encoding_mac_roman.cxx} {
           uuid_Xcode4_BuildFile {8555518A-BE8E-4BFA-B667-6551E92013A8}
           uuid_Xcode4_FileRef {C2BF9CDF-E31E-4895-A45D-5AAF3768C51B}
           uuid_Xcode4_BuildFileInSources {ABB49E92-5D1D-47B4-8863-06E5EBD8142A}
-          filename_and_path {src/fl_encoding_mac_roman.cxx}
+          filename_and_path {src/core/fl_encoding_mac_roman.cxx}
         }
         file_ref {fl_engraved_label.cxx} {
           uuid_Xcode4_BuildFile {52DA813A-9A95-4890-A38D-19B026277F95}
           uuid_Xcode4_FileRef {0522E1C2-0E5A-4C29-A956-E8CD45EF1B4D}
           uuid_Xcode4_BuildFileInSources {15FDFD86-96C6-4012-A0D0-F022C221FBAC}
-          filename_and_path {src/fl_engraved_label.cxx}
+          filename_and_path {src/core/fl_engraved_label.cxx}
         }
         file_ref {fl_file_dir.cxx} {
           uuid_Xcode4_BuildFile {8F52E66B-DE06-408C-9FA4-1444637F7B80}
           uuid_Xcode4_FileRef {1BF9BBF4-D53A-424A-8C0A-D3B0D92797FF}
           uuid_Xcode4_BuildFileInSources {EB81F388-5E43-4527-9396-969A7D312740}
-          filename_and_path {src/fl_file_dir.cxx}
+          filename_and_path {src/core/fl_file_dir.cxx}
         }
         file_ref {fl_font.cxx} {
           uuid_Xcode4_BuildFile {DAECD573-97D2-4295-8321-13B8F8BC23A6}
           uuid_Xcode4_FileRef {1CFFB72A-F54F-4002-AE50-C1BCF9F0C89C}
           uuid_Xcode4_BuildFileInSources {C9F44B46-D3FF-4EA3-9D30-1E9AB89600F8}
-          filename_and_path {src/fl_font.cxx}
+          filename_and_path {src/core/fl_font.cxx}
         }
         file_ref {fl_gtk.cxx} {
           uuid_Xcode4_BuildFile {1FB7855F-AB31-4B42-AA73-93B07D746272}
           uuid_Xcode4_FileRef {E3303C9A-F31B-4B23-8AC3-863A5C000D0C}
           uuid_Xcode4_BuildFileInSources {EFCDA004-6B05-439D-AD1D-A8747F6CF4B9}
-          filename_and_path {src/fl_gtk.cxx}
+          filename_and_path {src/core/fl_gtk.cxx}
         }
         file_ref {fl_labeltype.cxx} {
           uuid_Xcode4_BuildFile {A91665C1-0010-43EE-8A86-9EC869983557}
           uuid_Xcode4_FileRef {95F43A2D-21DE-4899-9F5B-1DB341E90C3A}
           uuid_Xcode4_BuildFileInSources {4598BB77-92AB-4548-B34E-78B261C56140}
-          filename_and_path {src/fl_labeltype.cxx}
+          filename_and_path {src/core/fl_labeltype.cxx}
         }
         file_ref {fl_line_style.cxx} {
           uuid_Xcode4_BuildFile {70D1EF40-CEE3-4460-9437-445EF6570006}
           uuid_Xcode4_FileRef {5FD374C4-6C63-497E-9F2B-1B396390EEE5}
           uuid_Xcode4_BuildFileInSources {A59E78B8-0AD1-490B-ABBF-87C212D49294}
-          filename_and_path {src/fl_line_style.cxx}
+          filename_and_path {src/core/fl_line_style.cxx}
         }
         file_ref {fl_open_uri.cxx} {
           uuid_Xcode4_BuildFile {AE238B51-38F4-4F2E-BC0B-78F3746B987F}
           uuid_Xcode4_FileRef {5515C9CC-3DEB-4ED1-8B65-42966A9B7E06}
           uuid_Xcode4_BuildFileInSources {BE74DB33-04BD-4EEC-A847-755EB62B76EB}
-          filename_and_path {src/fl_open_uri.cxx}
+          filename_and_path {src/core/fl_open_uri.cxx}
         }
         file_ref {fl_oval_box.cxx} {
           uuid_Xcode4_BuildFile {5C5315ED-224F-4077-A54A-D916A09FD43D}
           uuid_Xcode4_FileRef {554EB894-1B49-46DC-9B44-004AF565327A}
           uuid_Xcode4_BuildFileInSources {61BF99BB-9B5E-4A8F-B47A-362BE0170B8A}
-          filename_and_path {src/fl_oval_box.cxx}
+          filename_and_path {src/core/fl_oval_box.cxx}
         }
         file_ref {fl_overlay.cxx} {
           uuid_Xcode4_BuildFile {13DECC0A-91E0-4B09-9A65-7565C4E4DE00}
           uuid_Xcode4_FileRef {5536CF51-0B6B-499F-9C91-C2E4898D00BA}
           uuid_Xcode4_BuildFileInSources {C4F171DD-B2C3-45AB-B493-13C66A684B76}
-          filename_and_path {src/fl_overlay.cxx}
+          filename_and_path {src/core/fl_overlay.cxx}
         }
         file_ref {fl_overlay_visual.cxx} {
           uuid_Xcode4_BuildFile {B447BDF4-E847-4FC6-A720-0CDF4002BA4E}
           uuid_Xcode4_FileRef {3132F016-7D43-43BE-B074-445C9F20DB50}
           uuid_Xcode4_BuildFileInSources {305944C7-0273-41CA-B68D-4B8634805326}
-          filename_and_path {src/fl_overlay_visual.cxx}
+          filename_and_path {src/core/fl_overlay_visual.cxx}
         }
         file_ref {fl_plastic.cxx} {
           uuid_Xcode4_BuildFile {E84D52FD-DECE-4423-8099-1101A9B16E65}
           uuid_Xcode4_FileRef {D9934C34-B4C6-45E9-9D8D-302562D201D1}
           uuid_Xcode4_BuildFileInSources {40F29FD8-75BE-4958-9975-880694258FAB}
-          filename_and_path {src/fl_plastic.cxx}
+          filename_and_path {src/core/fl_plastic.cxx}
         }
         file_ref {fl_read_image.cxx} {
           uuid_Xcode4_BuildFile {89292870-50B2-4B4C-9C47-BDD54D8F9A95}
           uuid_Xcode4_FileRef {1FA85C80-2951-4144-A92D-E37E598C9B19}
           uuid_Xcode4_BuildFileInSources {C91AB9AC-9EA0-4F8B-982E-2C9D52A00338}
-          filename_and_path {src/fl_read_image.cxx}
+          filename_and_path {src/core/fl_read_image.cxx}
         }
         file_ref {fl_rect.cxx} {
           uuid_Xcode4_BuildFile {7DFE2DA4-C5ED-4447-8F6A-3F7D514DEDA3}
           uuid_Xcode4_FileRef {82F1E1FC-8B3C-460B-A309-ABE348A6FD1B}
           uuid_Xcode4_BuildFileInSources {39238B46-6210-41AC-B7DC-4153DA9EE223}
-          filename_and_path {src/fl_rect.cxx}
+          filename_and_path {src/core/fl_rect.cxx}
         }
         file_ref {fl_round_box.cxx} {
           uuid_Xcode4_BuildFile {54AED6D6-19AA-4960-A913-C1DDE3A04981}
           uuid_Xcode4_FileRef {C791DFA1-9A90-4016-B393-FF1205CA92D3}
           uuid_Xcode4_BuildFileInSources {FE83B31E-A46A-4A32-A89D-E1A6D243B8C2}
-          filename_and_path {src/fl_round_box.cxx}
+          filename_and_path {src/core/fl_round_box.cxx}
         }
         file_ref {fl_rounded_box.cxx} {
           uuid_Xcode4_BuildFile {07653622-17B7-423E-8440-FA89462F116C}
           uuid_Xcode4_FileRef {557E8041-0084-4B1C-9D36-CF44F1C0F5BE}
           uuid_Xcode4_BuildFileInSources {AD0B8E3D-D68A-481D-8F9F-69BAC55B967F}
-          filename_and_path {src/fl_rounded_box.cxx}
+          filename_and_path {src/core/fl_rounded_box.cxx}
         }
         file_ref {fl_scroll_area.cxx} {
           uuid_Xcode4_BuildFile {62206CE3-C4B8-41A3-B0B2-E87558EF8359}
           uuid_Xcode4_FileRef {0E08EA1C-BD91-44D4-A0EA-0D4243805A2C}
           uuid_Xcode4_BuildFileInSources {FCAEAB49-901B-4E09-A421-B91C2138610D}
-          filename_and_path {src/fl_scroll_area.cxx}
+          filename_and_path {src/core/fl_scroll_area.cxx}
         }
         file_ref {fl_set_font.cxx} {
           uuid_Xcode4_BuildFile {A21C7DBB-77B4-4145-94D3-C8F4E0F7A704}
           uuid_Xcode4_FileRef {C7ED2C14-A368-4077-A484-B5C6DDCAC057}
           uuid_Xcode4_BuildFileInSources {2952645A-BFB2-4D1A-AA4B-9C938ADA48F9}
-          filename_and_path {src/fl_set_font.cxx}
+          filename_and_path {src/core/fl_set_font.cxx}
         }
         file_ref {fl_set_fonts.cxx} {
           uuid_Xcode4_BuildFile {2D99B7D6-2146-4F22-B7C4-7CF6B353B3B6}
           uuid_Xcode4_FileRef {22603052-0721-416C-9BC9-9117FA96A7E6}
           uuid_Xcode4_BuildFileInSources {83BEAD36-5B66-40D1-BDE6-01CAD030A36B}
-          filename_and_path {src/fl_set_fonts.cxx}
+          filename_and_path {src/core/fl_set_fonts.cxx}
         }
         file_ref {fl_shadow_box.cxx} {
           uuid_Xcode4_BuildFile {5F09A8BB-4F72-4A29-9D89-1B3686738A5F}
           uuid_Xcode4_FileRef {2C5EEC89-51E9-41FB-8530-FBF66EEA73B1}
           uuid_Xcode4_BuildFileInSources {03E51C61-09BD-4D5D-8C34-E11561CDE5EB}
-          filename_and_path {src/fl_shadow_box.cxx}
+          filename_and_path {src/core/fl_shadow_box.cxx}
         }
         file_ref {fl_shortcut.cxx} {
           uuid_Xcode4_BuildFile {6DC429A2-4E0F-46F0-9928-C972C13F3A79}
           uuid_Xcode4_FileRef {BFCE21B1-56B8-4D68-B7AE-BFB8E2D65029}
           uuid_Xcode4_BuildFileInSources {1915B2B4-3576-473D-8C68-044EC53616C9}
-          filename_and_path {src/fl_shortcut.cxx}
+          filename_and_path {src/core/fl_shortcut.cxx}
         }
         file_ref {fl_show_colormap.cxx} {
           uuid_Xcode4_BuildFile {09571C9D-E0F2-44E1-B3BB-BEA58AF6DB6E}
           uuid_Xcode4_FileRef {76D6638A-FCA0-47DD-97AC-02F20B149360}
           uuid_Xcode4_BuildFileInSources {CA982582-BAB9-4F43-AE95-97787D7118DA}
-          filename_and_path {src/fl_show_colormap.cxx}
+          filename_and_path {src/core/fl_show_colormap.cxx}
         }
         file_ref {fl_symbols.cxx} {
           uuid_Xcode4_BuildFile {E5E13729-9359-407A-ADAE-8CA9BF1153A4}
           uuid_Xcode4_FileRef {ECAFDF98-A4C6-47A4-AAC5-CBBAA9E2B887}
           uuid_Xcode4_BuildFileInSources {3F497BC1-2E55-4693-A590-93B1AB680203}
-          filename_and_path {src/fl_symbols.cxx}
+          filename_and_path {src/core/fl_symbols.cxx}
         }
         file_ref {fl_utf8.cxx} {
           uuid_Xcode4_BuildFile {1D28C444-CF47-48A3-B7BD-AC7FC031BF60}
           uuid_Xcode4_FileRef {C82D09C9-A25C-4969-AA75-C1844388A904}
           uuid_Xcode4_BuildFileInSources {E05DB01E-3C7C-4D10-B25A-24C5B0A9984E}
-          filename_and_path {src/fl_utf8.cxx}
+          filename_and_path {src/core/fl_utf8.cxx}
         }
         file_ref {fl_utf.cxx} {
           uuid_Xcode4_BuildFile {AB04400B-9F1A-4F37-888C-89372FDCF7F7}
           uuid_Xcode4_FileRef {574878A1-4FD8-42FA-9BD2-ABE5009BD0DE}
           uuid_Xcode4_BuildFileInSources {DBA6ED75-939E-4F8A-B1F2-9A110D95B619}
-          filename_and_path {src/fl_utf.cxx}
+          filename_and_path {src/core/fl_utf.cxx}
         }
         file_ref {fl_vertex.cxx} {
           uuid_Xcode4_BuildFile {62CA9151-24C4-427F-8D7C-E667CB1A6005}
           uuid_Xcode4_FileRef {6C74D84D-D2D9-473C-B4EF-A2916D41A606}
           uuid_Xcode4_BuildFileInSources {0DA67340-5E06-45F0-98AB-1EF4FFEF7D18}
-          filename_and_path {src/fl_vertex.cxx}
+          filename_and_path {src/core/fl_vertex.cxx}
         }
         file_ref {numericsort.cxx} {
           uuid_Xcode4_BuildFile {BDD37F5E-669D-45D0-AEA7-84934BD116C6}
           uuid_Xcode4_FileRef {2286DB22-6117-4F0A-BEE5-E39D655B21BB}
           uuid_Xcode4_BuildFileInSources {F9A99DC4-A8F3-48B7-B098-CACFF2242B0F}
-          filename_and_path {src/numericsort.cxx}
+          filename_and_path {src/core/numericsort.cxx}
         }
         file_ref {ps_image.cxx} {
           uuid_Xcode4_BuildFile {3FCA9BA2-08F4-4493-AAC5-1C5BA6C19BF9}
           uuid_Xcode4_FileRef {472AB397-43B4-4F36-8D30-46796562F422}
           uuid_Xcode4_BuildFileInSources {7B5F222A-9CA7-4A2B-BB10-915A4853951A}
-          filename_and_path {src/ps_image.cxx}
+          filename_and_path {src/core/ps_image.cxx}
         }
         file_ref {scandir.cxx} {
           uuid_Xcode4_BuildFile {91F32552-6EBD-41A3-A404-C13499D47D1B}
           uuid_Xcode4_FileRef {1E2B1DAE-2CA8-4E24-9D70-7648A5F0E604}
           uuid_Xcode4_BuildFileInSources {611144BE-9E25-4734-BEB0-17AA14E629C2}
-          filename_and_path {src/scandir.cxx}
+          filename_and_path {src/core/scandir.cxx}
         }
         file_ref {screen_xywh.cxx} {
           uuid_Xcode4_BuildFile {898DCC19-92C6-4CAD-8F97-795C17BF0F8E}
           uuid_Xcode4_FileRef {4302C79C-040D-4155-9A83-7B77750879E4}
           uuid_Xcode4_BuildFileInSources {ED67E26F-DB1F-48D1-A1D9-9717C2196D3A}
-          filename_and_path {src/screen_xywh.cxx}
+          filename_and_path {src/core/screen_xywh.cxx}
         }
         file_ref {flstring.c} {
           uuid_Xcode4_BuildFile {1B622B06-3765-4E90-BE13-155DFCBAB791}
           uuid_Xcode4_FileRef {EF672C7C-6AF9-43D0-8320-CBAED55C8145}
           uuid_Xcode4_BuildFileInSources {F4C279B7-3932-4279-8131-B75DFA0C11E5}
-          filename_and_path {src/flstring.c}
+          filename_and_path {src/core/flstring.c}
         }
         file_ref {vsnprintf.c} {
           uuid_Xcode4_BuildFile {22C4313D-D9D6-41BD-BA8B-E3CE07600FE1}
           uuid_Xcode4_FileRef {4024031C-0F34-4A2D-A3F2-9D9373805457}
           uuid_Xcode4_BuildFileInSources {2A8804F6-AFE8-4FED-BF50-8CAEF1B22A54}
-          filename_and_path {src/vsnprintf.c}
+          filename_and_path {src/core/vsnprintf.c}
         }
         file_ref {case.c} {
           uuid_Xcode4_BuildFile {F9589A9E-897C-4D01-9853-40C736FE4C03}
           uuid_Xcode4_FileRef {6A8D0240-7AD5-4648-B663-8D1B5B0D8F30}
           uuid_Xcode4_BuildFileInSources {C8A52709-D6A3-46B6-8BC2-631AC161BB93}
-          filename_and_path {src/xutf8/case.c}
+          filename_and_path {src/core/xutf8/case.c}
         }
         file_ref {is_right2left.c} {
           uuid_Xcode4_BuildFile {5D197D19-28FF-4FA8-B83B-F0796D18D7C7}
           uuid_Xcode4_FileRef {15064F3F-0F6F-4A59-8531-9E361125C187}
           uuid_Xcode4_BuildFileInSources {8DB42169-E703-4087-8E7D-743F1AAADA6D}
-          filename_and_path {src/xutf8/is_right2left.c}
+          filename_and_path {src/core/xutf8/is_right2left.c}
         }
         file_ref {is_spacing.c} {
           uuid_Xcode4_BuildFile {33D01DE7-EC28-45C9-AC26-AB81F6F7E056}
           uuid_Xcode4_FileRef {35196210-B2C0-48F9-88B8-7DB816C06ED2}
           uuid_Xcode4_BuildFileInSources {2FAB16B4-529A-454C-8FDD-480347534445}
-          filename_and_path {src/xutf8/is_spacing.c}
+          filename_and_path {src/core/xutf8/is_spacing.c}
         }
         file_ref {keysym2Ucs.c} {
           uuid_Xcode4_BuildFileInSources {5947D812-BC7F-4400-9267-2ED8879F5C8C}
           uuid_Xcode4_FileRef {6FB3D799-D5E6-4B46-B0D8-241B52F0EF44}
           build_env 3
           list_env 0
-          filename_and_path {src/xutf8/keysym2Ucs.c}
+          filename_and_path {src/core/xutf8/keysym2Ucs.c}
         }
         file_ref {utf8Input.c} {
           uuid_Xcode4_BuildFileInSources {25B5DE2D-97EE-4E32-9CA8-05174FB0DB2F}
           uuid_Xcode4_FileRef {77C2578B-D9D9-4526-BB2D-01C1C3C80034}
           build_env 3
           list_env 0
-          filename_and_path {src/xutf8/utf8Input.c}
+          filename_and_path {src/core/xutf8/utf8Input.c}
         }
         file_ref {utf8Utils.c} {
           uuid_Xcode4_BuildFileInSources {24005306-9985-4AC5-BE6D-6D7500E3217E}
           uuid_Xcode4_FileRef {737A139C-1672-4BB4-8105-7BBD5750BA73}
           build_env 3
           list_env 0
-          filename_and_path {src/xutf8/utf8Utils.c}
+          filename_and_path {src/core/xutf8/utf8Utils.c}
         }
         file_ref {utf8Wrap.c} {
           uuid_Xcode4_BuildFileInSources {C7B16874-D0F9-451B-82FE-5CDE5ED6E374}
           uuid_Xcode4_FileRef {46AA9D55-FF6A-42F9-9D65-167B6C61CD4A}
           build_env 3
           list_env 0
-          filename_and_path {src/xutf8/utf8Wrap.c}
+          filename_and_path {src/core/xutf8/utf8Wrap.c}
         }
       }
       folder Libraries {open
@@ -2467,7 +2468,7 @@
         }
       }
     }
-    lib_target fltk_gl {
+    lib_target fltk3gl {
       uuid_Xcode4_FluidBuildRule {C15C877E-5712-4AB2-B7BE-7B8A5F1D6F49}
       uuid_Xcode4_ProductFileReference {47405B55-C42D-4839-B6BF-F6B5BA410AF3}
       uuid_Xcode4_FrameworksBuildPhase {A02CA389-C019-4CB2-82B7-1CC18C255A72}
@@ -2490,57 +2491,57 @@
         file_ref {Fl_Gl_Choice.cxx} {
           uuid_Xcode4_BuildFileInSources {E1C77AA3-F9A7-4CE9-8892-06DA277C3538}
           uuid_Xcode4_FileRef {DE5C107D-166F-42F2-9042-0A08FBEF3B60}
-          filename_and_path {src/Fl_Gl_Choice.cxx}
+          filename_and_path {src/core/Fl_Gl_Choice.cxx}
         }
         file_ref {Fl_Gl_Device_Plugin.cxx} {
           uuid_Xcode4_BuildFileInSources {E8D5789A-7A69-45A6-9900-2123CBE99BDE}
           uuid_Xcode4_FileRef {391E3B0B-3499-46A4-B0FC-8BA7EC865531}
-          filename_and_path {src/Fl_Gl_Device_Plugin.cxx}
+          filename_and_path {src/core/Fl_Gl_Device_Plugin.cxx}
         }
         file_ref {Fl_Gl_Overlay.cxx} {
           uuid_Xcode4_BuildFileInSources {070BED62-ED38-45D1-BDFE-569E9EBED411}
           uuid_Xcode4_FileRef {07BC5E29-F3DD-4EF8-A362-BEB97204BFDA}
-          filename_and_path {src/Fl_Gl_Overlay.cxx}
+          filename_and_path {src/core/Fl_Gl_Overlay.cxx}
         }
         file_ref {Fl_Gl_Window.cxx} {
           uuid_Xcode4_BuildFileInSources {32BC3E68-841A-4283-B00D-A5EB305FD0AA}
           uuid_Xcode4_FileRef {53DC629E-53C3-498E-91AD-57A275B5DB21}
-          filename_and_path {src/Fl_Gl_Window.cxx}
+          filename_and_path {src/core/Fl_Gl_Window.cxx}
         }
         file_ref {freeglut_geometry.cxx} {
           uuid_Xcode4_BuildFileInSources {ECB8D856-36CB-46A6-91F6-208478C0CBF3}
           uuid_Xcode4_FileRef {FFAAC078-4DCA-4EEE-926B-22E2398B7046}
-          filename_and_path {src/freeglut_geometry.cxx}
+          filename_and_path {src/core/freeglut_geometry.cxx}
         }
         file_ref {freeglut_stroke_mono_roman.cxx} {
           uuid_Xcode4_BuildFileInSources {75788B42-B62E-4C4F-9E61-4B91C7324344}
           uuid_Xcode4_FileRef {504FF704-8B78-42E2-BB35-33253373D40F}
-          filename_and_path {src/freeglut_stroke_mono_roman.cxx}
+          filename_and_path {src/core/freeglut_stroke_mono_roman.cxx}
         }
         file_ref {freeglut_stroke_roman.cxx} {
           uuid_Xcode4_BuildFileInSources {9CDFF782-50BD-4118-B043-8B22A9B2F2CC}
           uuid_Xcode4_FileRef {B2D08460-836E-4E9C-A77B-DBD6C1A1A460}
-          filename_and_path {src/freeglut_stroke_roman.cxx}
+          filename_and_path {src/core/freeglut_stroke_roman.cxx}
         }
         file_ref {freeglut_teapot.cxx} {
           uuid_Xcode4_BuildFileInSources {CE3D60CB-29C8-424A-91AA-1742E2155791}
           uuid_Xcode4_FileRef {9F61A674-BE2D-4567-9B0F-B0A7A83F337A}
-          filename_and_path {src/freeglut_teapot.cxx}
+          filename_and_path {src/core/freeglut_teapot.cxx}
         }
         file_ref {gl_draw.cxx} {
           uuid_Xcode4_BuildFileInSources {008A289F-3FCA-4E5D-9F9D-A6601947D877}
           uuid_Xcode4_FileRef {CBE8D5E4-01A5-438B-B144-4FFA652AE41A}
-          filename_and_path {src/gl_draw.cxx}
+          filename_and_path {src/core/gl_draw.cxx}
         }
         file_ref {glut_compatability.cxx} {
           uuid_Xcode4_BuildFileInSources {4432E2FF-063E-407F-B040-F7168FACEC8A}
           uuid_Xcode4_FileRef {7458D589-B1BE-4EFD-8D40-E5B8F83EDDDE}
-          filename_and_path {src/glut_compatability.cxx}
+          filename_and_path {src/core/glut_compatability.cxx}
         }
         file_ref {glut_font.cxx} {
           uuid_Xcode4_BuildFileInSources {52743D1F-C453-4A9C-B7FF-24D5110D8886}
           uuid_Xcode4_FileRef {8A51D2BA-6224-4A81-A7C0-1FF09F60F380}
-          filename_and_path {src/glut_font.cxx}
+          filename_and_path {src/core/glut_font.cxx}
         }
       }
       folder Libraries {open
@@ -2586,7 +2587,7 @@
       folder Dependencies {open
         uuid_Xcode4_Group {5AD936C1-6A47-4960-8FF6-30D89A6A3DA1}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {A63A2DF4-FCDA-49A6-8E07-491575DAF8AC}
           uuid_Xcode4_BuildFileInCopyFiles {3A7B0801-6B7F-4688-BC98-DD30E2829536}
           uuid_Xcode4_ContainerItemProxy {A8E79403-D7ED-4D85-92DE-AB2236A0903A}
@@ -2595,7 +2596,7 @@
         }
       }
     }
-    lib_target fltk_images {
+    lib_target fltk3images {
       uuid_Xcode4_FluidBuildRule {3B6D1711-B7F7-4646-9550-CCC0D38666DB}
       uuid_Xcode4_ProductFileReference {BF7522F0-DF30-4FBE-B61F-D44FB67C2110}
       uuid_Xcode4_FrameworksBuildPhase {E922EF9B-6694-4CD8-9E64-646407893DE6}
@@ -2618,62 +2619,62 @@
         file_ref {Fl_BMP_Image.cxx} {
           uuid_Xcode4_BuildFileInSources {E6582F0C-0750-4240-82F3-E8318102A2E1}
           uuid_Xcode4_FileRef {BEBF4248-3EAD-4A52-AAA4-E820B7383470}
-          filename_and_path {src/Fl_BMP_Image.cxx}
+          filename_and_path {src/core/Fl_BMP_Image.cxx}
         }
         file_ref {Fl_File_Icon2.cxx} {
           uuid_Xcode4_BuildFileInSources {4527A184-6B41-4768-86C4-ACF47AB984FD}
           uuid_Xcode4_FileRef {7655FB1C-DE8D-4283-BC6F-56486E0C6765}
-          filename_and_path {src/Fl_File_Icon2.cxx}
+          filename_and_path {src/core/Fl_File_Icon2.cxx}
         }
         file_ref {Fl_GIF_Image.cxx} {
           uuid_Xcode4_BuildFileInSources {61475B35-29FB-4C24-8830-ECA24AD4D896}
           uuid_Xcode4_FileRef {CFAC1FAE-3A10-47AA-AFCF-D8465E2BC5E9}
-          filename_and_path {src/Fl_GIF_Image.cxx}
+          filename_and_path {src/core/Fl_GIF_Image.cxx}
         }
         file_ref {Fl_Help_Dialog.cxx} {
           uuid_Xcode4_BuildFileInSources {D0C37235-7804-45A7-899C-281EC063120A}
           uuid_Xcode4_FileRef {0EDA91FF-EE99-4E85-8C47-3C2A2CD72D46}
-          filename_and_path {src/Fl_Help_Dialog.cxx}
+          filename_and_path {src/core/Fl_Help_Dialog.cxx}
         }
         file_ref {Fl_JPEG_Image.cxx} {
           uuid_Xcode4_BuildFileInSources {633E5465-917A-472C-A60F-0F991EB5A771}
           uuid_Xcode4_FileRef {771C095F-B545-47EB-A972-E68EACA213AB}
-          filename_and_path {src/Fl_JPEG_Image.cxx}
+          filename_and_path {src/core/Fl_JPEG_Image.cxx}
         }
         file_ref {Fl_PNG_Image.cxx} {
           uuid_Xcode4_BuildFileInSources {6C957398-2885-42CA-94E3-6A7DE9ADFFDD}
           uuid_Xcode4_FileRef {E1BECD1D-5322-476A-97C7-1A355469A00E}
-          filename_and_path {src/Fl_PNG_Image.cxx}
+          filename_and_path {src/core/Fl_PNG_Image.cxx}
         }
         file_ref {Fl_PNM_Image.cxx} {
           uuid_Xcode4_BuildFileInSources {E8B17358-E01C-468D-BA98-FD841B2BD4D5}
           uuid_Xcode4_FileRef {948DEE29-B0C3-4360-8B48-E166578DD9C0}
-          filename_and_path {src/Fl_PNM_Image.cxx}
+          filename_and_path {src/core/Fl_PNM_Image.cxx}
         }
         file_ref {fl_images_core.cxx} {
           uuid_Xcode4_BuildFileInSources {C99E8BD8-E953-4FF3-8C5D-3186E07EE04C}
           uuid_Xcode4_FileRef {6ADD9C72-9A09-406D-A836-86A180529588}
-          filename_and_path {src/fl_images_core.cxx}
+          filename_and_path {src/core/fl_images_core.cxx}
         }
       }
       folder Dependencies {open
         uuid_Xcode4_Group {5C231979-6ADE-4A65-9BA7-0688B9D02387}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {8A255408-4E71-485E-B62A-CC1D77F2346E}
           uuid_Xcode4_BuildFileInCopyFiles {8B041A15-060E-4ED8-BB33-F147C4EB7662}
           uuid_Xcode4_ContainerItemProxy {6B50C690-8555-4F18-86CC-49B249AFF4A1}
           uuid_Xcode4_TargetDependency {0ED253BE-A025-449A-B0CE-98970A1A8119}
           build_env 91
         }
-        target_dependency fltk_png {
+        target_dependency fltk3png {
           uuid_Xcode4_BuildFileInFrameworks {5F01A68D-D52A-4AC6-AA14-4F0CEF71F730}
           uuid_Xcode4_BuildFileInCopyFiles {1F90ED55-BDB0-413C-9A63-FD8E24D69794}
           uuid_Xcode4_ContainerItemProxy {B08169D8-AD1B-4FE0-8708-8176EB6EE7B3}
           uuid_Xcode4_TargetDependency {BCCDA5FF-EE55-4F37-83CF-ECE0A4EA0315}
           build_env 91
         }
-        target_dependency fltk_jpeg {
+        target_dependency fltk3jpeg {
           uuid_Xcode4_BuildFileInFrameworks {788FE6BC-FC49-4F30-8C02-E66DF4069E08}
           uuid_Xcode4_BuildFileInCopyFiles {496D6E42-F3B3-4972-914E-84B3A6BEDA0E}
           uuid_Xcode4_ContainerItemProxy {B17A1C57-1070-4AB8-88C1-EAAE31224532}
@@ -2682,7 +2683,7 @@
         }
       }
     }
-    lib_target fltk_png {
+    lib_target fltk3png {
       uuid_Xcode4_FluidBuildRule {B468177C-52F4-4139-A3FF-67AB6002BC34}
       uuid_Xcode4_ProductFileReference {06A7B68E-69DF-48DF-9752-4CC40872987D}
       uuid_Xcode4_FrameworksBuildPhase {E6A799B5-B767-4119-BAAE-E6ABAED46318}
@@ -2706,90 +2707,90 @@
         file_ref {png.c} {
           uuid_Xcode4_BuildFileInSources {6F20F990-BFF6-476E-B9AA-D6671402AB51}
           uuid_Xcode4_FileRef {6B712BE1-E979-4100-8238-C53FCD95C26F}
-          filename_and_path {png/png.c}
+          filename_and_path {src/png/png.c}
         }
         file_ref {pngerror.c} {
           uuid_Xcode4_BuildFileInSources {363FC5CA-BA18-4E0B-B08C-F86B0697DAE9}
           uuid_Xcode4_FileRef {1773D73E-7040-449F-B17A-BCFC32576CC2}
-          filename_and_path {png/pngerror.c}
+          filename_and_path {src/png/pngerror.c}
         }
         file_ref {pngget.c} {
           uuid_Xcode4_BuildFileInSources {23E0C5B5-DCB0-4137-815C-0698047B64AC}
           uuid_Xcode4_FileRef {DD39B9F3-BB4C-4DE7-A35D-F41A47525FC8}
-          filename_and_path {png/pngget.c}
+          filename_and_path {src/png/pngget.c}
         }
         file_ref {pngmem.c} {
           uuid_Xcode4_BuildFileInSources {EDC7DC5B-824C-45E6-AB5D-DE9D566E0BE9}
           uuid_Xcode4_FileRef {459F31DC-C130-4D9D-8BA6-C6CC18A2B274}
-          filename_and_path {png/pngmem.c}
+          filename_and_path {src/png/pngmem.c}
         }
         file_ref {pngpread.c} {
           uuid_Xcode4_BuildFileInSources {664352FA-C06C-4E8D-9359-AAEDA6B4B206}
           uuid_Xcode4_FileRef {D922ACBB-42C1-452F-AD39-4FBD38BC9C23}
-          filename_and_path {png/pngpread.c}
+          filename_and_path {src/png/pngpread.c}
         }
         file_ref {pngread.c} {
           uuid_Xcode4_BuildFileInSources {B4A3041F-EB8B-4F62-81F1-A6016FA0E727}
           uuid_Xcode4_FileRef {3466ECAF-94B6-41A6-848B-B4532D8756C9}
-          filename_and_path {png/pngread.c}
+          filename_and_path {src/png/pngread.c}
         }
         file_ref {pngrio.c} {
           uuid_Xcode4_BuildFileInSources {90B706F8-BBB5-4900-B96B-FE84E1638DEE}
           uuid_Xcode4_FileRef {F74E2081-855B-4410-9107-C6E7C8A7003A}
-          filename_and_path {png/pngrio.c}
+          filename_and_path {src/png/pngrio.c}
         }
         file_ref {pngrtran.c} {
           uuid_Xcode4_BuildFileInSources {845E26FE-38F8-4129-A28C-97B9BA2A60D5}
           uuid_Xcode4_FileRef {7122D728-C3EA-4218-80ED-6A9281EBEBD3}
-          filename_and_path {png/pngrtran.c}
+          filename_and_path {src/png/pngrtran.c}
         }
         file_ref {pngrutil.c} {
           uuid_Xcode4_BuildFileInSources {82E970ED-E1C1-4E60-9153-3DAB83C5EDD4}
           uuid_Xcode4_FileRef {5BEF2DB3-6546-4924-BC2D-7BFF5D5303E3}
-          filename_and_path {png/pngrutil.c}
+          filename_and_path {src/png/pngrutil.c}
         }
         file_ref {pngset.c} {
           uuid_Xcode4_BuildFileInSources {101F19A2-1FB6-4BFF-A71D-C938325B85A4}
           uuid_Xcode4_FileRef {C3B834FF-C05F-4928-8148-3204AE193B67}
-          filename_and_path {png/pngset.c}
+          filename_and_path {src/png/pngset.c}
         }
         file_ref {pngtrans.c} {
           uuid_Xcode4_BuildFileInSources {73845E7C-AA74-4D9A-8366-9D3F7CF10E30}
           uuid_Xcode4_FileRef {3CCB7520-77B6-440D-AA4E-0501F95165BE}
-          filename_and_path {png/pngtrans.c}
+          filename_and_path {src/png/pngtrans.c}
         }
         file_ref {pngwio.c} {
           uuid_Xcode4_BuildFileInSources {3D43AAF9-6CB6-4FFB-90C2-209E84575E33}
           uuid_Xcode4_FileRef {D83965A3-1DB2-45BE-BAAE-168FE9E870E2}
-          filename_and_path {png/pngwio.c}
+          filename_and_path {src/png/pngwio.c}
         }
         file_ref {pngwrite.c} {
           uuid_Xcode4_BuildFileInSources {D3013979-5BC3-4F49-A2C2-C64DBCD983A2}
           uuid_Xcode4_FileRef {5BAD5EB2-AE72-48E8-9401-BF28E5FD588C}
-          filename_and_path {png/pngwrite.c}
+          filename_and_path {src/png/pngwrite.c}
         }
         file_ref {pngwtran.c} {
           uuid_Xcode4_BuildFileInSources {78D6D247-E96A-4FD4-9277-0753C0BA95EF}
           uuid_Xcode4_FileRef {589B114A-FD66-440D-AA9E-402011FF760C}
-          filename_and_path {png/pngwtran.c}
+          filename_and_path {src/png/pngwtran.c}
         }
         file_ref {pngwutil.c} {
           uuid_Xcode4_BuildFileInSources {CBA0A339-F833-4456-B957-D426AD95F7F4}
           uuid_Xcode4_FileRef {BB2B54C5-D832-4C2A-9C56-3E9C9CCC8159}
-          filename_and_path {png/pngwutil.c}
+          filename_and_path {src/png/pngwutil.c}
         }
       }
       folder Dependencies {open
         uuid_Xcode4_Group {A97D3E94-724B-4CAA-8AB2-247AD83A5B2D}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {6D845CB7-854A-4800-9AD9-2B53655ABEAF}
           uuid_Xcode4_BuildFileInCopyFiles {487334DA-41CD-4EDA-B24E-D9C633C85812}
           uuid_Xcode4_ContainerItemProxy {EDC7DB92-9194-40C0-ABB4-5D02D8DAC985}
           uuid_Xcode4_TargetDependency {705F04BB-AA4A-4845-AC82-61E2709BCB42}
           build_env 91
         }
-        target_dependency fltk_zlib {
+        target_dependency fltk3zlib {
           uuid_Xcode4_BuildFileInFrameworks {AB672F58-66FD-476C-BA59-994248B463F8}
           uuid_Xcode4_BuildFileInCopyFiles {2DA17766-AF46-4EB8-BF0C-B958F80158A2}
           uuid_Xcode4_ContainerItemProxy {E9425A34-644F-4D08-86E8-0C6577B981FD}
@@ -2798,7 +2799,7 @@
         }
       }
     }
-    lib_target fltk_jpeg {
+    lib_target fltk3jpeg {
       uuid_Xcode4_FluidBuildRule {657AA958-2632-4A29-B657-91775A869EBC}
       uuid_Xcode4_ProductFileReference {C03975F6-58DD-41B5-9A0D-D73961888340}
       uuid_Xcode4_FrameworksBuildPhase {65CF0CCA-3098-403B-A9B6-70000827BCE8}
@@ -2822,238 +2823,238 @@
         file_ref {jaricom.c} {
           uuid_Xcode4_BuildFileInSources {0F6F13CB-23C0-485E-A717-983187573244}
           uuid_Xcode4_FileRef {693F4237-F486-4BBA-8EE8-FE38FC7D08F6}
-          filename_and_path {jpeg/jaricom.c}
+          filename_and_path {src/jpeg/jaricom.c}
         }
         file_ref {jcarith.c} {
           uuid_Xcode4_BuildFileInSources {0BC9CDFC-57BC-4F2C-BE30-3049D67F6017}
           uuid_Xcode4_FileRef {72ABFB26-4F71-4747-9B79-07A337C77C2F}
-          filename_and_path {jpeg/jcarith.c}
+          filename_and_path {src/jpeg/jcarith.c}
         }
         file_ref {jdarith.c} {
           uuid_Xcode4_BuildFileInSources {85476745-C36A-475D-B24A-C1BA4303F50A}
           uuid_Xcode4_FileRef {2964F2B7-8BC3-4E65-A540-99D51C03AA24}
-          filename_and_path {jpeg/jdarith.c}
+          filename_and_path {src/jpeg/jdarith.c}
         }
         file_ref {jcapimin.c} {
           uuid_Xcode4_BuildFileInSources {8D7AFAF6-F148-4667-9E48-80CD935CEDF5}
           uuid_Xcode4_FileRef {FB6E486A-C35D-420C-BA96-4DA3009EC010}
-          filename_and_path {jpeg/jcapimin.c}
+          filename_and_path {src/jpeg/jcapimin.c}
         }
         file_ref {jcapistd.c} {
           uuid_Xcode4_BuildFileInSources {3F4CCF20-ADBD-4E57-9307-0203943BDBD6}
           uuid_Xcode4_FileRef {057D4054-6B02-481C-808D-A547346FB68A}
-          filename_and_path {jpeg/jcapistd.c}
+          filename_and_path {src/jpeg/jcapistd.c}
         }
         file_ref {jccoefct.c} {
           uuid_Xcode4_BuildFileInSources {93CA99FA-167D-4F3C-A5F3-BA10C9B637EC}
           uuid_Xcode4_FileRef {CEAC28BB-B960-4CD7-9E9A-86FAD3EF102B}
-          filename_and_path {jpeg/jccoefct.c}
+          filename_and_path {src/jpeg/jccoefct.c}
         }
         file_ref {jccolor.c} {
           uuid_Xcode4_BuildFileInSources {E2CDC5EE-79CE-444D-AC8C-CF1EA8630221}
           uuid_Xcode4_FileRef {809AF344-3D79-4677-86FD-169321F2A86B}
-          filename_and_path {jpeg/jccolor.c}
+          filename_and_path {src/jpeg/jccolor.c}
         }
         file_ref {jcdctmgr.c} {
           uuid_Xcode4_BuildFileInSources {42A29A32-6094-45EB-8769-A9C1E2A57975}
           uuid_Xcode4_FileRef {1590B3B2-B4B8-4B64-A031-7B7647042C2C}
-          filename_and_path {jpeg/jcdctmgr.c}
+          filename_and_path {src/jpeg/jcdctmgr.c}
         }
         file_ref {jchuff.c} {
           uuid_Xcode4_BuildFileInSources {04A60174-19A4-4581-A8B8-6CBD65E22170}
           uuid_Xcode4_FileRef {2E971DDC-9491-4309-98D9-AACC1070E85B}
-          filename_and_path {jpeg/jchuff.c}
+          filename_and_path {src/jpeg/jchuff.c}
         }
         file_ref {jcinit.c} {
           uuid_Xcode4_BuildFileInSources {D265819F-15A5-42D7-8C32-8988DA8A43B3}
           uuid_Xcode4_FileRef {814BE969-AF77-4C0D-82F5-A28DCE617107}
-          filename_and_path {jpeg/jcinit.c}
+          filename_and_path {src/jpeg/jcinit.c}
         }
         file_ref {jcmainct.c} {
           uuid_Xcode4_BuildFileInSources {B51ED764-5063-4038-83F3-414EE50637AB}
           uuid_Xcode4_FileRef {AD0A0161-F77D-419A-BFC0-0BC6989ACA4A}
-          filename_and_path {jpeg/jcmainct.c}
+          filename_and_path {src/jpeg/jcmainct.c}
         }
         file_ref {jcmarker.c} {
           uuid_Xcode4_BuildFileInSources {03D0D430-8CCA-424D-9994-3C03CD192005}
           uuid_Xcode4_FileRef {D2164F03-0054-481B-9F15-B6DD6A57771C}
-          filename_and_path {jpeg/jcmarker.c}
+          filename_and_path {src/jpeg/jcmarker.c}
         }
         file_ref {jcmaster.c} {
           uuid_Xcode4_BuildFileInSources {63F3DCA1-8817-40E4-8A17-C27E2E9B4D7E}
           uuid_Xcode4_FileRef {61763219-DF34-46C3-B577-F26763612615}
-          filename_and_path {jpeg/jcmaster.c}
+          filename_and_path {src/jpeg/jcmaster.c}
         }
         file_ref {jcomapi.c} {
           uuid_Xcode4_BuildFileInSources {D7A12A5C-3217-49A3-9412-3F8FFDDD2664}
           uuid_Xcode4_FileRef {232A27C0-8509-4D05-AA89-2BD6B5288634}
-          filename_and_path {jpeg/jcomapi.c}
+          filename_and_path {src/jpeg/jcomapi.c}
         }
         file_ref {jcparam.c} {
           uuid_Xcode4_BuildFileInSources {E4F0CE8C-9CDF-4D1B-805F-380ED645DB8B}
           uuid_Xcode4_FileRef {40C23607-AE76-40B3-838D-C980B2BFE20C}
-          filename_and_path {jpeg/jcparam.c}
+          filename_and_path {src/jpeg/jcparam.c}
         }
         file_ref {jcprepct.c} {
           uuid_Xcode4_BuildFileInSources {0EE2DF13-8D02-4452-937F-466FE950E28E}
           uuid_Xcode4_FileRef {AB617BED-6B47-4FB5-A508-1863A003B94C}
-          filename_and_path {jpeg/jcprepct.c}
+          filename_and_path {src/jpeg/jcprepct.c}
         }
         file_ref {jcsample.c} {
           uuid_Xcode4_BuildFileInSources {09D0B434-E419-45D3-A318-3CF98F43BC80}
           uuid_Xcode4_FileRef {3F3D0C31-0855-4C21-B52C-5BCAFAD53A3B}
-          filename_and_path {jpeg/jcsample.c}
+          filename_and_path {src/jpeg/jcsample.c}
         }
         file_ref {jctrans.c} {
           uuid_Xcode4_BuildFileInSources {A3FBF089-F8D8-4B45-A01A-327B9DD5EE6B}
           uuid_Xcode4_FileRef {7FAFE821-F649-416D-8E37-8EC977BBC5D7}
-          filename_and_path {jpeg/jctrans.c}
+          filename_and_path {src/jpeg/jctrans.c}
         }
         file_ref {jdapimin.c} {
           uuid_Xcode4_BuildFileInSources {E4FCFB26-46D1-447A-9B40-684C9545A0BC}
           uuid_Xcode4_FileRef {41E7F99E-8C2A-4F0B-94A6-487E53DA2B74}
-          filename_and_path {jpeg/jdapimin.c}
+          filename_and_path {src/jpeg/jdapimin.c}
         }
         file_ref {jdapistd.c} {
           uuid_Xcode4_BuildFileInSources {92CBD856-0957-4B06-AFB7-061A10591DCF}
           uuid_Xcode4_FileRef {099D5F00-89A2-4F31-85B7-582F8B06D1D3}
-          filename_and_path {jpeg/jdapistd.c}
+          filename_and_path {src/jpeg/jdapistd.c}
         }
         file_ref {jdatadst.c} {
           uuid_Xcode4_BuildFileInSources {C260A3F6-DA21-498C-902C-127B7AA68F43}
           uuid_Xcode4_FileRef {28554BF1-A500-40A9-9C0D-C0753E806ABE}
-          filename_and_path {jpeg/jdatadst.c}
+          filename_and_path {src/jpeg/jdatadst.c}
         }
         file_ref {jdatasrc.c} {
           uuid_Xcode4_BuildFileInSources {82657390-F3AD-4BE9-88F4-26F8052C9E59}
           uuid_Xcode4_FileRef {4F409781-D1EB-438D-A944-CA0223760086}
-          filename_and_path {jpeg/jdatasrc.c}
+          filename_and_path {src/jpeg/jdatasrc.c}
         }
         file_ref {jdcoefct.c} {
           uuid_Xcode4_BuildFileInSources {47E18E5D-F338-476E-BB7E-92E197AD0F88}
           uuid_Xcode4_FileRef {91142696-4C7D-4CFD-8E03-8903782180FE}
-          filename_and_path {jpeg/jdcoefct.c}
+          filename_and_path {src/jpeg/jdcoefct.c}
         }
         file_ref {jdcolor.c} {
           uuid_Xcode4_BuildFileInSources {FC035B23-6018-4CC1-B6D8-62F11C8C35A7}
           uuid_Xcode4_FileRef {2852C165-F430-489C-855C-FD1C8E9CFA4E}
-          filename_and_path {jpeg/jdcolor.c}
+          filename_and_path {src/jpeg/jdcolor.c}
         }
         file_ref {jddctmgr.c} {
           uuid_Xcode4_BuildFileInSources {6D525695-01BB-4BC7-9504-0E7E6DA74C9C}
           uuid_Xcode4_FileRef {E18222C3-29F7-4230-8753-8E719974FC76}
-          filename_and_path {jpeg/jddctmgr.c}
+          filename_and_path {src/jpeg/jddctmgr.c}
         }
         file_ref {jdhuff.c} {
           uuid_Xcode4_BuildFileInSources {C8159B6A-5C15-4DDF-9065-DB026603F6F2}
           uuid_Xcode4_FileRef {1BF6EF84-B0E4-422D-83B6-DE17AAC7EFB6}
-          filename_and_path {jpeg/jdhuff.c}
+          filename_and_path {src/jpeg/jdhuff.c}
         }
         file_ref {jdinput.c} {
           uuid_Xcode4_BuildFileInSources {9C82F5C6-CC2B-403F-9CDE-B0E8369D567D}
           uuid_Xcode4_FileRef {1C5349FA-F5F6-4E32-AC0B-E1804B1F198C}
-          filename_and_path {jpeg/jdinput.c}
+          filename_and_path {src/jpeg/jdinput.c}
         }
         file_ref {jdmainct.c} {
           uuid_Xcode4_BuildFileInSources {3BE49E90-0599-473C-9234-030B67F86301}
           uuid_Xcode4_FileRef {EEF41328-C9A7-4B03-B31F-D5300498FFF5}
-          filename_and_path {jpeg/jdmainct.c}
+          filename_and_path {src/jpeg/jdmainct.c}
         }
         file_ref {jdmarker.c} {
           uuid_Xcode4_BuildFileInSources {D118BF0A-EED4-4F7D-BA96-B7594BAAA41E}
           uuid_Xcode4_FileRef {636096E6-1DFC-47DB-B620-ED855E766C1C}
-          filename_and_path {jpeg/jdmarker.c}
+          filename_and_path {src/jpeg/jdmarker.c}
         }
         file_ref {jdmaster.c} {
           uuid_Xcode4_BuildFileInSources {AA5963F8-FE1E-4F91-9299-1EEFCF06A4B9}
           uuid_Xcode4_FileRef {25201ED4-CE64-4E14-B3A3-EBA7A50DDF00}
-          filename_and_path {jpeg/jdmaster.c}
+          filename_and_path {src/jpeg/jdmaster.c}
         }
         file_ref {jdmerge.c} {
           uuid_Xcode4_BuildFileInSources {4F69BAC2-C629-40B8-B1D6-5D778B026DF8}
           uuid_Xcode4_FileRef {EFDC5B8F-7BD2-413A-9829-A20F85BBDD2F}
-          filename_and_path {jpeg/jdmerge.c}
+          filename_and_path {src/jpeg/jdmerge.c}
         }
         file_ref {jdpostct.c} {
           uuid_Xcode4_BuildFileInSources {4E084D25-47EC-44E1-8DFE-2A532694836B}
           uuid_Xcode4_FileRef {8AB6F92D-B6E2-4692-BA0E-6B8B3A9600D7}
-          filename_and_path {jpeg/jdpostct.c}
+          filename_and_path {src/jpeg/jdpostct.c}
         }
         file_ref {jdsample.c} {
           uuid_Xcode4_BuildFileInSources {050810E5-F79A-4601-B411-5AFC3093695B}
           uuid_Xcode4_FileRef {84504867-4116-4864-8C1B-9FB5D88C56BE}
-          filename_and_path {jpeg/jdsample.c}
+          filename_and_path {src/jpeg/jdsample.c}
         }
         file_ref {jdtrans.c} {
           uuid_Xcode4_BuildFileInSources {349BA997-C403-4E94-8049-B2E1B0125A5E}
           uuid_Xcode4_FileRef {93CA9E6D-728E-4933-8BF5-356F97BF6F78}
-          filename_and_path {jpeg/jdtrans.c}
+          filename_and_path {src/jpeg/jdtrans.c}
         }
         file_ref {jerror.c} {
           uuid_Xcode4_BuildFileInSources {83B2EC91-3B70-4DA4-8A87-D3C1E60A5FF0}
           uuid_Xcode4_FileRef {A3250EC2-46FD-4400-8B6E-43793D1E74D7}
-          filename_and_path {jpeg/jerror.c}
+          filename_and_path {src/jpeg/jerror.c}
         }
         file_ref {jfdctflt.c} {
           uuid_Xcode4_BuildFileInSources {E62D919A-A84F-4060-9731-E4CABC41F507}
           uuid_Xcode4_FileRef {36A2AB09-889D-4B97-A429-846ACAA94B18}
-          filename_and_path {jpeg/jfdctflt.c}
+          filename_and_path {src/jpeg/jfdctflt.c}
         }
         file_ref {jfdctfst.c} {
           uuid_Xcode4_BuildFileInSources {2ED27EA1-EB53-4523-99B9-CF287496D451}
           uuid_Xcode4_FileRef {30991F7C-8274-4A61-93B1-6B497C8A5EDC}
-          filename_and_path {jpeg/jfdctfst.c}
+          filename_and_path {src/jpeg/jfdctfst.c}
         }
         file_ref {jfdctint.c} {
           uuid_Xcode4_BuildFileInSources {0E6874E5-E419-4706-877C-5963D87E69C7}
           uuid_Xcode4_FileRef {8E3EEE62-F9B3-4A63-97E6-572243D9FDB2}
-          filename_and_path {jpeg/jfdctint.c}
+          filename_and_path {src/jpeg/jfdctint.c}
         }
         file_ref {jidctflt.c} {
           uuid_Xcode4_BuildFileInSources {0DFBF0B0-84F0-40A5-987C-8F8F11D2229E}
           uuid_Xcode4_FileRef {855E6E12-3B27-434A-AFD1-33E0AA064E9E}
-          filename_and_path {jpeg/jidctflt.c}
+          filename_and_path {src/jpeg/jidctflt.c}
         }
         file_ref {jidctfst.c} {
           uuid_Xcode4_BuildFileInSources {262CC4F8-4991-4B80-BC81-F0E8EAD42B40}
           uuid_Xcode4_FileRef {653EB01C-242E-44BD-8223-02DCFCAFCED8}
-          filename_and_path {jpeg/jidctfst.c}
+          filename_and_path {src/jpeg/jidctfst.c}
         }
         file_ref {jidctint.c} {
           uuid_Xcode4_BuildFileInSources {61B2EEBC-B3BB-4263-8E53-54C26CDBEA1B}
           uuid_Xcode4_FileRef {20F81663-325A-4C56-8872-20064248D47D}
-          filename_and_path {jpeg/jidctint.c}
+          filename_and_path {src/jpeg/jidctint.c}
         }
         file_ref {jmemmgr.c} {
           uuid_Xcode4_BuildFileInSources {3746F41F-9750-40F8-992E-E9110A8AB0B3}
           uuid_Xcode4_FileRef {A45DD33A-E77B-4756-8907-4E40501255FA}
-          filename_and_path {jpeg/jmemmgr.c}
+          filename_and_path {src/jpeg/jmemmgr.c}
         }
         file_ref {jmemnobs.c} {
           uuid_Xcode4_BuildFileInSources {1E7CB584-91D0-4135-93A3-B0B2BC5080A3}
           uuid_Xcode4_FileRef {40575E02-FFEC-4B96-9C7D-6B018C90D9D3}
-          filename_and_path {jpeg/jmemnobs.c}
+          filename_and_path {src/jpeg/jmemnobs.c}
         }
         file_ref {jquant1.c} {
           uuid_Xcode4_BuildFileInSources {70DDC391-A770-43E5-80AE-8F2D0A16669C}
           uuid_Xcode4_FileRef {35F258BF-08E3-44B6-9AB9-58BFAEBF105B}
-          filename_and_path {jpeg/jquant1.c}
+          filename_and_path {src/jpeg/jquant1.c}
         }
         file_ref {jquant2.c} {
           uuid_Xcode4_BuildFileInSources {0E9496FF-69CC-4ED0-8F19-2F5A98EE6F32}
           uuid_Xcode4_FileRef {FD5C5068-2930-4FB3-B183-20DD81E4C790}
-          filename_and_path {jpeg/jquant2.c}
+          filename_and_path {src/jpeg/jquant2.c}
         }
         file_ref {jutils.c} {
           uuid_Xcode4_BuildFileInSources {EA4FF7A8-6037-4B5D-8AA2-C7D0AE7EA10A}
           uuid_Xcode4_FileRef {8EAEBE33-4B20-413B-992A-3DB7499DF618}
-          filename_and_path {jpeg/jutils.c}
+          filename_and_path {src/jpeg/jutils.c}
         }
       }
       folder Dependencies {open
         uuid_Xcode4_Group {29DA55EE-F482-49B9-A1C9-98AC7554132B}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {F856DD57-FD89-4FBA-81A4-15FBD9E64F8A}
           uuid_Xcode4_BuildFileInCopyFiles {0E7E9400-D367-4993-8390-88825A44719E}
           uuid_Xcode4_ContainerItemProxy {7BFBB398-8097-4804-A67A-7014D8FEBA3B}
@@ -3062,7 +3063,7 @@
         }
       }
     }
-    lib_target fltk_zlib {
+    lib_target fltk3zlib {
       uuid_Xcode4_FluidBuildRule {123C1072-0C58-4F44-AD82-E57DC97E4F36}
       uuid_Xcode4_ProductFileReference {AFDEBB8C-A6BB-4318-814D-9D4B6586BF8B}
       uuid_Xcode4_FrameworksBuildPhase {DEBCC581-E57F-4C21-8DA4-57A0CC89BBE4}
@@ -3086,83 +3087,83 @@
         file_ref {adler32.c} {
           uuid_Xcode4_BuildFileInSources {A6B3D69F-5F98-4164-B21F-CDBE3994B136}
           uuid_Xcode4_FileRef {E1182D55-8C81-436A-85A9-E2FF90B66495}
-          filename_and_path {zlib/adler32.c}
+          filename_and_path {src/zlib/adler32.c}
         }
         file_ref {compress.c} {
           uuid_Xcode4_BuildFileInSources {18140AB5-6E0C-40FE-9923-027E6C5BF838}
           uuid_Xcode4_FileRef {B451652D-5BE6-4662-8DDA-E876452DBAEF}
-          filename_and_path {zlib/compress.c}
+          filename_and_path {src/zlib/compress.c}
         }
         file_ref {crc32.c} {
           uuid_Xcode4_BuildFileInSources {8A1863E7-13F1-4633-B16F-90F4CBE46510}
           uuid_Xcode4_FileRef {FAF20BD4-44E8-4EF3-BC2F-27E6DCF94A4D}
-          filename_and_path {zlib/crc32.c}
+          filename_and_path {src/zlib/crc32.c}
         }
         file_ref {deflate.c} {
           uuid_Xcode4_BuildFileInSources {03BD549E-8BF4-4DBD-9CB5-9791FDFAFBF2}
           uuid_Xcode4_FileRef {DD77A2FB-0EA6-47D8-90B0-DC70B9156631}
-          filename_and_path {zlib/deflate.c}
+          filename_and_path {src/zlib/deflate.c}
         }
         file_ref {gzclose.c} {
           uuid_Xcode4_BuildFileInSources {43A69EC0-6029-433F-9BE4-52B2CBB68D7C}
           uuid_Xcode4_FileRef {F6A9CA02-FD88-4190-887C-A572801064B6}
-          filename_and_path {zlib/gzclose.c}
+          filename_and_path {src/zlib/gzclose.c}
         }
         file_ref {gzlib.c} {
           uuid_Xcode4_BuildFileInSources {D6265271-B9BA-4FB3-9CB7-33D4AB411E8D}
           uuid_Xcode4_FileRef {A0E49410-B08E-4FF7-9B72-859F478221CC}
-          filename_and_path {zlib/gzlib.c}
+          filename_and_path {src/zlib/gzlib.c}
         }
         file_ref {gzread.c} {
           uuid_Xcode4_BuildFileInSources {BE13FAC5-F083-43D5-93F9-7DEC01DBCBD7}
           uuid_Xcode4_FileRef {17E81DB4-8628-4E36-BFF9-50B2F8B0919D}
-          filename_and_path {zlib/gzread.c}
+          filename_and_path {src/zlib/gzread.c}
         }
         file_ref {gzwrite.c} {
           uuid_Xcode4_BuildFileInSources {D2A47073-B350-440D-BC69-C0138779EC61}
           uuid_Xcode4_FileRef {80D41C84-6225-4050-A3E5-FF529C567637}
-          filename_and_path {zlib/gzwrite.c}
+          filename_and_path {src/zlib/gzwrite.c}
         }
         file_ref {infback.c} {
           uuid_Xcode4_BuildFileInSources {BF7645D6-B1E0-4E9F-82F3-29B88B164125}
           uuid_Xcode4_FileRef {E1A389C8-8BBA-474D-B413-906B25478BDF}
-          filename_and_path {zlib/infback.c}
+          filename_and_path {src/zlib/infback.c}
         }
         file_ref {inffast.c} {
           uuid_Xcode4_BuildFileInSources {B1A53430-A594-41B2-8090-12E6E6EA3267}
           uuid_Xcode4_FileRef {5070B522-9990-4D27-BA5E-58D46F4733D8}
-          filename_and_path {zlib/inffast.c}
+          filename_and_path {src/zlib/inffast.c}
         }
         file_ref {inflate.c} {
           uuid_Xcode4_BuildFileInSources {504287ED-12E0-4372-9C42-C3DF474E89AF}
           uuid_Xcode4_FileRef {6E9D6A15-B44F-4FB7-B629-62CA272DD84A}
-          filename_and_path {zlib/inflate.c}
+          filename_and_path {src/zlib/inflate.c}
         }
         file_ref {inftrees.c} {
           uuid_Xcode4_BuildFileInSources {58F571A0-F678-44A1-94F5-B9902450B459}
           uuid_Xcode4_FileRef {0A153D59-57C7-4602-9AA8-E88C7C91C273}
-          filename_and_path {zlib/inftrees.c}
+          filename_and_path {src/zlib/inftrees.c}
         }
         file_ref {trees.c} {
           uuid_Xcode4_BuildFileInSources {99617D65-49D3-45B3-BA5F-6ED4A61BF18B}
           uuid_Xcode4_FileRef {AE96BB30-45F3-4F9A-A5CF-869BAD219C3D}
-          filename_and_path {zlib/trees.c}
+          filename_and_path {src/zlib/trees.c}
         }
         file_ref {uncompr.c} {
           uuid_Xcode4_BuildFileInSources {26B75986-2376-4B1A-81C4-61203E974AEF}
           uuid_Xcode4_FileRef {D3758527-5F4F-4D42-84D4-DD55D3455099}
-          filename_and_path {zlib/uncompr.c}
+          filename_and_path {src/zlib/uncompr.c}
         }
         file_ref {zutil.c} {
           uuid_Xcode4_BuildFileInSources {267DA6FD-110F-4E38-82D3-E4A01985C8C0}
           uuid_Xcode4_FileRef {58A29655-7720-41B6-87EF-234B66936598}
-          filename_and_path {zlib/zutil.c}
+          filename_and_path {src/zlib/zutil.c}
         }
       }
       folder Dependencies {open
         uuid_Xcode4_Group {C2FA673B-BFDC-4D21-A2B7-3248083B81F0}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {6E43C73F-7148-45DC-B2A4-667D2F5AE901}
           uuid_Xcode4_BuildFileInCopyFiles {2EC24DA9-FD73-42C8-8413-1ED28BF57B2B}
           uuid_Xcode4_ContainerItemProxy {8C9700E2-E6FB-4603-8811-5142A89F69EA}
@@ -3205,7 +3206,7 @@
       folder Dependencies {
         uuid_Xcode4_Group {07C5E7CF-8C74-4EE9-A2D5-81B7DB721D90}
       } {
-        target_dependency fltk {
+        target_dependency fltk3 {
           uuid_Xcode4_BuildFileInFrameworks {03702EFE-F96C-44C2-B844-A8116323CC4F}
           uuid_Xcode4_BuildFileInCopyFiles {63E14856-3AD1-4439-A8ED-7C38F1D08583}
           uuid_Xcode4_ContainerItemProxy {804623D9-7CAC-47B1-A359-2AD0C394DA41}
@@ -3652,7 +3653,7 @@
         uuid_Xcode4_FileRef {3D06E7D8-83DA-4C4E-AB15-601198A70787}
         filename_and_path {test/adjuster.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {DB7E12FC-EF17-4F5C-A8CE-A61078C49DF2}
         uuid_Xcode4_BuildFileInCopyFiles {8D6D8BC6-E27A-417F-8145-71D210799F30}
         uuid_Xcode4_ContainerItemProxy {788DC2BA-6B5F-45E4-8DD3-C257E6FC3234}
@@ -3681,7 +3682,7 @@
         uuid_Xcode4_FileRef {CD16450F-2771-4A56-AF8E-8175F36C2AAF}
         filename_and_path {test/arc.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {D4C0211D-E216-44AC-A372-56E1E8A89E6F}
         uuid_Xcode4_BuildFileInCopyFiles {07C5A242-CFE3-4D2F-879E-6372C117B75C}
         uuid_Xcode4_ContainerItemProxy {199D76DA-B9F6-4F2D-B03A-519CCC1E6402}
@@ -3710,7 +3711,7 @@
         uuid_Xcode4_FileRef {1B3AB21E-8A82-4EBA-8495-58C26304A9AF}
         filename_and_path {test/ask.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {D8046FD1-E35D-46B6-9C41-D465D8A33995}
         uuid_Xcode4_BuildFileInCopyFiles {30161DE3-CC1D-4EA0-8B84-C4169742DB98}
         uuid_Xcode4_ContainerItemProxy {1913C58A-843B-45E5-B9C7-C15DAE7D37E1}
@@ -3739,7 +3740,7 @@
         uuid_Xcode4_FileRef {31FFC13C-2711-4E6F-B93F-D9567E03E76B}
         filename_and_path {test/bitmap.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {981D4712-322B-49CC-BDF2-265BFDFBDBE9}
         uuid_Xcode4_BuildFileInCopyFiles {2BB38AB7-BA64-453B-89ED-12C0D6332DDA}
         uuid_Xcode4_ContainerItemProxy {4B9199EF-8AB5-4884-9B5E-D568E8EC0BFD}
@@ -3768,7 +3769,7 @@
         uuid_Xcode4_FileRef {CE316BB5-C691-4202-8843-AE3C8327B31A}
         filename_and_path {test/blocks.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {F2191AFC-C993-40E9-8669-4AC1400FFCC2}
         uuid_Xcode4_BuildFileInCopyFiles {7AA6A418-70C8-414D-8DC3-120B57A68AA0}
         uuid_Xcode4_ContainerItemProxy {1FD69761-084F-4B59-B3D9-477918A5BE6A}
@@ -3817,7 +3818,7 @@
         uuid_Xcode4_FileRef {1619633D-905A-46C3-9353-6D78F79DB30B}
         filename_and_path {test/boxtype.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {08623FCC-6310-46B4-BD24-875D1111212B}
         uuid_Xcode4_BuildFileInCopyFiles {D2CA36EC-3DAE-4955-8B1C-19E8EB76F99B}
         uuid_Xcode4_ContainerItemProxy {3E8480AC-AA1B-493A-88AD-E0C1617360F7}
@@ -3846,7 +3847,7 @@
         uuid_Xcode4_FileRef {39340B79-AC20-44BF-93AE-4691923AF39E}
         filename_and_path {test/browser.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {9D947952-DDF4-455C-B98E-918EDDD3E937}
         uuid_Xcode4_BuildFileInCopyFiles {25565B0C-2F48-46A6-8023-D2FB782801D5}
         uuid_Xcode4_ContainerItemProxy {4718C675-F09A-447A-81AA-53276ECF45FE}
@@ -3875,7 +3876,7 @@
         uuid_Xcode4_FileRef {952B51EC-BF52-4C4C-A137-F7130A9C143C}
         filename_and_path {test/button.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {EBFC481B-3666-45A6-9C9A-67C1656DD464}
         uuid_Xcode4_BuildFileInCopyFiles {4FE097C8-161C-42C3-8994-4A4837A719D5}
         uuid_Xcode4_ContainerItemProxy {6F97AD0A-6373-4D08-93B0-56FE943B00A1}
@@ -3904,7 +3905,7 @@
         uuid_Xcode4_FileRef {93C6C1CA-BC89-49CE-B494-661BE20F2F98}
         filename_and_path {test/buttons.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {6E9C5B65-B294-4C07-A656-E68F8518978C}
         uuid_Xcode4_BuildFileInCopyFiles {C39FF765-4D50-41A3-9720-ABDD46DF3E73}
         uuid_Xcode4_ContainerItemProxy {4DC77E88-D7FF-4D21-BBD1-3FDC3D431D75}
@@ -3933,7 +3934,7 @@
         uuid_Xcode4_FileRef {76028DAC-9955-4470-8664-A620A1304A6F}
         filename_and_path {test/checkers.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {EB8CF813-B67D-4295-B1EB-006B2355DF62}
         uuid_Xcode4_BuildFileInCopyFiles {C802C253-EF9A-44E1-94B5-B6A592B3B98F}
         uuid_Xcode4_ContainerItemProxy {245828A3-77D8-42E6-A854-BBE6B4FED043}
@@ -3962,7 +3963,7 @@
         uuid_Xcode4_FileRef {20A9B7B7-6591-4C2D-A32A-CE2D1B8914B0}
         filename_and_path {test/clock.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {B2B1BE8E-8A2D-41EC-8451-3BD05B86B1AC}
         uuid_Xcode4_BuildFileInCopyFiles {08FEA870-B89D-4061-AC6C-A60F20E3709D}
         uuid_Xcode4_ContainerItemProxy {379B5984-18C4-41B4-AC2C-EBE0E7BA7ED2}
@@ -3996,7 +3997,7 @@
         uuid_Xcode4_BuildFileInCopyFiles {E1C4BA41-C74B-461C-949F-B8B773AF73AF}
         filename_and_path {test/rgb.txt}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {E987CDD8-5F3F-4769-A738-B4EB040F4B70}
         uuid_Xcode4_BuildFileInCopyFiles {077BF726-9D65-41EA-8A1A-6928D1151174}
         uuid_Xcode4_ContainerItemProxy {35F97728-1925-4ECA-B516-3E8BA2077AD5}
@@ -4025,7 +4026,7 @@
         uuid_Xcode4_FileRef {19450A14-1EC2-4633-B33D-146D1D924635}
         filename_and_path {test/color_chooser.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {7AEAECCF-8FA2-4CCC-8BF8-2D008E3EC6FE}
         uuid_Xcode4_BuildFileInCopyFiles {D62493AF-217F-4848-8A81-B2DC78CEEB59}
         uuid_Xcode4_ContainerItemProxy {DBCD6652-EF8E-4F04-9953-5EE4CE5A1A4D}
@@ -4054,13 +4055,13 @@
         uuid_Xcode4_FileRef {D0D09BC4-88E7-40BE-885C-AC8CFE9C1EDC}
         filename_and_path {test/cube.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {A841F6F0-32F5-4FB9-9DDB-36D938FAA169}
         uuid_Xcode4_BuildFileInCopyFiles {94CADAAB-2DF5-42D0-B898-9753EE1FECA2}
         uuid_Xcode4_ContainerItemProxy {15D7E10D-418F-4999-A061-DB27F176CB2B}
         uuid_Xcode4_TargetDependency {F9665FAB-B238-4137-B22C-2DF8C435184A}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {4D537C8D-79AE-4B99-A107-A86A8CE24F81}
         uuid_Xcode4_BuildFileInCopyFiles {FD537552-B85F-49AC-ABFF-EB5A2D1E7989}
         uuid_Xcode4_ContainerItemProxy {B34DDFE5-6D7E-412C-8C52-E0C647EDF118}
@@ -4140,13 +4141,13 @@
         uuid_Xcode4_BuildFileInSources {0D51A139-5624-4C79-9F25-02E808D92465}
         filename_and_path {test/CubeViewUI.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {2C2E53D3-2087-4216-A68C-15DEB1DD62C2}
         uuid_Xcode4_BuildFileInCopyFiles {104782D1-1BDE-46D7-B440-3C7286E0C347}
         uuid_Xcode4_ContainerItemProxy {CE6CDD8B-055F-4D26-A3C7-FCF2F9B5DB65}
         uuid_Xcode4_TargetDependency {085C7907-9CD7-4D54-AF7B-E6FDD8AA99FE}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {571D49E1-49CB-43F4-A92D-09765BD1F7AF}
         uuid_Xcode4_BuildFileInCopyFiles {FF60AB35-2E52-4ECE-9001-87274CFA1D8A}
         uuid_Xcode4_ContainerItemProxy {F1A6F5BC-F960-4567-B865-B9C19E72E4AA}
@@ -4222,7 +4223,7 @@
         uuid_Xcode4_FileRef {E038E2F6-8246-48AA-8CE7-A59643F2CA2D}
         filename_and_path {test/cursor.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {EBE07599-032E-45CF-AF7F-144D6B41E965}
         uuid_Xcode4_BuildFileInCopyFiles {9EBEA0D4-A85F-4F05-98AE-369D7F2F628A}
         uuid_Xcode4_ContainerItemProxy {3CE9F0FA-D396-481D-91FA-FF0D6ACC20B1}
@@ -4251,7 +4252,7 @@
         uuid_Xcode4_FileRef {FE2E2FF8-0822-4842-B4B2-B204AD098B77}
         filename_and_path {test/curve.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {F0E924E6-49F7-4C35-BC7B-9647E5C45A9D}
         uuid_Xcode4_BuildFileInCopyFiles {669EFE55-8F60-4354-9B07-431CB2540F5C}
         uuid_Xcode4_ContainerItemProxy {52BE3004-FC7C-43C2-9301-F60A763FA3E9}
@@ -4280,31 +4281,31 @@
         uuid_Xcode4_FileRef {C6EE0C83-C290-4C40-ADBA-9F9F5E7ADCE2}
         filename_and_path {test/device.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {3A6AA37D-E7E4-4EA5-81A7-4FA034EAD2B5}
         uuid_Xcode4_BuildFileInCopyFiles {F2D47D4B-48B4-42D4-A564-056B894B4A74}
         uuid_Xcode4_ContainerItemProxy {1C38DF89-4C32-40EF-92B7-B42A04614F9D}
         uuid_Xcode4_TargetDependency {B3189DC8-0EF1-4347-83AB-0ADA50B98124}
       }
-      target_dependency fltk_images {
+      target_dependency fltk3images {
         uuid_Xcode4_BuildFileInFrameworks {E9B29690-4BEE-49DD-9B9C-861306BB8899}
         uuid_Xcode4_BuildFileInCopyFiles {B12D0006-E19C-449C-9FFB-5B22CEA00737}
         uuid_Xcode4_ContainerItemProxy {5B6611B6-7CCA-4167-80F3-632AADA9267D}
         uuid_Xcode4_TargetDependency {915B34B2-E11C-483D-9A00-B91FFFC4D449}
       }
-      target_dependency fltk_png {
+      target_dependency fltk3png {
         uuid_Xcode4_BuildFileInFrameworks {A054E478-76AB-4E90-BAAB-DCD0C4D95CFB}
         uuid_Xcode4_BuildFileInCopyFiles {2F65FA77-7427-434F-8872-692340539F42}
         uuid_Xcode4_ContainerItemProxy {5C9607E0-967B-4CA0-82FA-4C62D1C78A8F}
         uuid_Xcode4_TargetDependency {AC449879-2D99-4B91-897A-601F05164947}
       }
-      target_dependency fltk_jpeg {
+      target_dependency fltk3jpeg {
         uuid_Xcode4_BuildFileInFrameworks {E8124816-3AD2-41C6-B489-E10052866775}
         uuid_Xcode4_BuildFileInCopyFiles {A174D004-D8B1-4EA5-AC9C-5573773D0099}
         uuid_Xcode4_ContainerItemProxy {270E68F0-B12F-4C6F-9B63-248F2908B27F}
         uuid_Xcode4_TargetDependency {AD0FFF9D-B2EA-46DB-9D30-144D1B1D7840}
       }
-      target_dependency fltk_zlib {
+      target_dependency fltk3zlib {
         uuid_Xcode4_BuildFileInFrameworks {AFC1A639-E006-46DB-BDAC-37361985CD16}
         uuid_Xcode4_BuildFileInCopyFiles {9832B164-33E8-4643-A5D0-61E2BFA5AFC7}
         uuid_Xcode4_ContainerItemProxy {466DD509-0CB2-463F-AD19-F1F1B7299187}
@@ -4333,7 +4334,7 @@
         uuid_Xcode4_FileRef {059E297C-C753-4710-B99B-63CC7CA5CCE9}
         filename_and_path {test/doublebuffer.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {609A6618-1016-46B0-9FFF-D27C6E71408D}
         uuid_Xcode4_BuildFileInCopyFiles {F6825229-71E0-4911-BD60-AAB19C80D326}
         uuid_Xcode4_ContainerItemProxy {7AB6CF4F-D446-4C57-8D61-1951C243AB05}
@@ -4362,7 +4363,7 @@
         uuid_Xcode4_FileRef {F4669FEA-4960-4059-890C-2EC26D4B0224}
         filename_and_path {test/editor.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {CC700B10-67D3-4C20-8843-97CBA2F00588}
         uuid_Xcode4_BuildFileInCopyFiles {3120A5BF-8036-4FEA-90FD-695121FC497B}
         uuid_Xcode4_ContainerItemProxy {B8128304-DA10-4CB3-AE2F-D088C4A2925D}
@@ -4391,7 +4392,7 @@
         uuid_Xcode4_BuildFileInSources {5DDB5807-0BED-4A52-965A-5BFD5C84521B}
         filename_and_path {test/fast_slow.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {A4439C00-EA6C-477F-802C-1481FC09491A}
         uuid_Xcode4_BuildFileInCopyFiles {F3E3D5C9-209E-43D4-A395-E3358EB19114}
         uuid_Xcode4_ContainerItemProxy {C3871164-75C3-4F6F-A5E8-4EA6F638DDBF}
@@ -4426,31 +4427,31 @@
         uuid_Xcode4_FileRef {AD3FE6EB-D96E-43FB-8360-96D54B935C14}
         filename_and_path {test/file_chooser.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {C744FA2A-7979-48A9-85AC-CC2849FEDCA1}
         uuid_Xcode4_BuildFileInCopyFiles {3E5C5DA5-DAF3-45E9-BBEE-1C038D0F4A71}
         uuid_Xcode4_ContainerItemProxy {CC3DCFB0-B286-4CE9-A700-7AE10849DDFB}
         uuid_Xcode4_TargetDependency {4C6BC702-3AFB-4DD1-995A-3959FCBE165C}
       }
-      target_dependency fltk_images {
+      target_dependency fltk3images {
         uuid_Xcode4_BuildFileInFrameworks {9EBE574D-2374-400E-8F91-8A0C95FF9E90}
         uuid_Xcode4_BuildFileInCopyFiles {76924521-B590-4D27-A9A9-5BE5E11F158E}
         uuid_Xcode4_ContainerItemProxy {1BCC1587-7E3B-46EA-975E-F84EECB3AC66}
         uuid_Xcode4_TargetDependency {41746EC3-4F80-4692-84F3-B0A06E478F37}
       }
-      target_dependency fltk_png {
+      target_dependency fltk3png {
         uuid_Xcode4_BuildFileInFrameworks {DB178FC2-71EF-4CB8-AD04-08BF3B172761}
         uuid_Xcode4_BuildFileInCopyFiles {79734C5A-D16A-47BC-94DC-0F20CA991A2B}
         uuid_Xcode4_ContainerItemProxy {E5F4B6BA-08E0-4AE3-AA60-873A32CEC5CC}
         uuid_Xcode4_TargetDependency {D821DADC-5C77-4273-A680-2E3377EBD866}
       }
-      target_dependency fltk_jpeg {
+      target_dependency fltk3jpeg {
         uuid_Xcode4_BuildFileInFrameworks {A0E3DDF2-7BE9-4F96-8CA0-45D357287385}
         uuid_Xcode4_BuildFileInCopyFiles {633315B3-37AD-40CC-B6C0-B7452F8DBD41}
         uuid_Xcode4_ContainerItemProxy {A97568E1-4350-4BDB-BCC4-0F5247DAABBE}
         uuid_Xcode4_TargetDependency {B4949039-16F3-4845-A6C2-8CEA978B8ACA}
       }
-      target_dependency fltk_zlib {
+      target_dependency fltk3zlib {
         uuid_Xcode4_BuildFileInFrameworks {B44D7292-DD7B-4347-A4F2-5A74B72F7623}
         uuid_Xcode4_BuildFileInCopyFiles {98F2D9CA-CABF-40CC-875D-D41A827CE104}
         uuid_Xcode4_ContainerItemProxy {09D1B4D4-554D-43E1-866D-1F50F2DF757D}
@@ -4479,7 +4480,7 @@
         uuid_Xcode4_FileRef {7C5102D2-9FE2-4321-A31A-5225B0CA3A02}
         filename_and_path {test/fonts.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {06C745CD-7DFA-411C-990C-998668D1DF1F}
         uuid_Xcode4_BuildFileInCopyFiles {62E9FE14-C77B-491F-AEF2-468095C2D0F3}
         uuid_Xcode4_ContainerItemProxy {28E02E63-9230-4F59-A452-FDC328B3C3EC}
@@ -4513,13 +4514,13 @@
         uuid_Xcode4_FileRef {DB32AB5C-80B3-4D73-82D2-E686C8B6B7D8}
         filename_and_path {test/fracviewer.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {6BBBF8A9-6AE9-4076-9F3B-AA3ACD270510}
         uuid_Xcode4_BuildFileInCopyFiles {3FE2ECDD-3F6F-4989-A5FE-440F485B0A34}
         uuid_Xcode4_ContainerItemProxy {E459F3FB-0862-40DF-84FA-6ADB23E3CC84}
         uuid_Xcode4_TargetDependency {FF75163F-DF83-40AC-BEF3-749B48010FBD}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {6E086496-CBFF-46A4-A936-C509CAD971CC}
         uuid_Xcode4_BuildFileInCopyFiles {E2256E49-5D38-4BD6-8100-E662DC798A3C}
         uuid_Xcode4_ContainerItemProxy {0F4A629B-FE52-49FE-8BD9-5809083C69E4}
@@ -4589,13 +4590,13 @@
         uuid_Xcode4_FileRef {E449265F-4022-4CCE-9532-8CC2312A5E37}
         filename_and_path {test/fullscreen.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {0CAE1A87-9431-4AB6-BA89-0A124825EA0D}
         uuid_Xcode4_BuildFileInCopyFiles {E8DF7FBF-0C1C-4833-9059-D9AFEFC680F2}
         uuid_Xcode4_ContainerItemProxy {EBB65343-BFBA-4039-9E15-C832A3C95BCC}
         uuid_Xcode4_TargetDependency {8DB1E91B-6F73-4D53-8D27-019995582833}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {7A186475-8320-4D53-90A6-763AACBA81F4}
         uuid_Xcode4_BuildFileInCopyFiles {D96ADC43-4F3D-409B-A877-830DCA448604}
         uuid_Xcode4_ContainerItemProxy {5DF3FEB7-2C6F-4078-B563-C6758FED60AE}
@@ -4665,13 +4666,13 @@
         uuid_Xcode4_FileRef {8E78BDB9-551E-4F2B-82F4-F200D93F40F2}
         filename_and_path {test/gl_overlay.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {5E48194D-2A8A-4B05-AC2E-85549CFFF761}
         uuid_Xcode4_BuildFileInCopyFiles {8DE1D7D9-842B-44E8-9361-F82A7436ABFE}
         uuid_Xcode4_ContainerItemProxy {0A00B7C4-AAAA-4824-A9FA-43138425DE17}
         uuid_Xcode4_TargetDependency {F25FBAE3-2722-4193-9257-6B25CFC2728D}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {0B16E780-A267-4836-A9DD-FF920CDA4229}
         uuid_Xcode4_BuildFileInCopyFiles {D33D21E8-2BEC-4D3F-B57B-C3894C287280}
         uuid_Xcode4_ContainerItemProxy {5372B4CA-95F5-4A8C-A3D1-2DC822FD0407}
@@ -4741,13 +4742,13 @@
         uuid_Xcode4_FileRef {E05F987F-6F85-4F29-A408-D03E4B697B07}
         filename_and_path {test/glpuzzle.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {EC0F97FD-F032-44F9-BAA8-79A5CCDE94A5}
         uuid_Xcode4_BuildFileInCopyFiles {A8762C2D-C668-467E-A77A-15ED1F7D2A60}
         uuid_Xcode4_ContainerItemProxy {845975FB-977D-41CB-A292-61DA90791884}
         uuid_Xcode4_TargetDependency {660B6F62-9971-487A-B2C3-609517B90235}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {808870F4-C2F9-483B-ADC6-EC3704C8669A}
         uuid_Xcode4_BuildFileInCopyFiles {906A5A3D-8AE5-4773-A091-7F7C40BC8CFD}
         uuid_Xcode4_ContainerItemProxy {77FC120C-006C-4852-8ED0-0B96F3DA7415}
@@ -4817,7 +4818,7 @@
         uuid_Xcode4_FileRef {25C199DD-4BA2-4CA6-AF98-F2F658407004}
         filename_and_path {test/hello.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {BB6E4BCB-3551-446A-B68C-1121D3B23EDB}
         uuid_Xcode4_BuildFileInCopyFiles {8B697C86-89CC-4E78-9E72-C652150875CF}
         uuid_Xcode4_ContainerItemProxy {36A15A12-B9E5-4611-B895-292247CAF517}
@@ -4846,31 +4847,31 @@
         uuid_Xcode4_FileRef {5DF919E9-EAF9-44AF-AA59-C5118620CA78}
         filename_and_path {test/help.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {5EECA66D-C121-493D-BE1E-9863C54A170B}
         uuid_Xcode4_BuildFileInCopyFiles {FF19AABC-EE2C-4302-AD31-D3190DE840C2}
         uuid_Xcode4_ContainerItemProxy {7176BA30-F6F2-462B-9070-3F02BE68DB4C}
         uuid_Xcode4_TargetDependency {D8AC90BC-33E6-4EAD-9178-7783B7FA3434}
       }
-      target_dependency fltk_images {
+      target_dependency fltk3images {
         uuid_Xcode4_BuildFileInFrameworks {55C0D4C7-3676-4D87-B5D4-F7AD2107BC09}
         uuid_Xcode4_BuildFileInCopyFiles {DCE8BFD2-8039-46C5-AE03-1D260582164C}
         uuid_Xcode4_ContainerItemProxy {3554B5F6-5522-48F3-A6CB-7D48FBA6511D}
         uuid_Xcode4_TargetDependency {665E19C8-EE5D-40EB-818B-E930364DFFA9}
       }
-      target_dependency fltk_png {
+      target_dependency fltk3png {
         uuid_Xcode4_BuildFileInFrameworks {BEEEDBE3-B1E2-46FF-BAD8-705115D11004}
         uuid_Xcode4_BuildFileInCopyFiles {2005318C-0C2E-4D24-98D9-B947C82F60AC}
         uuid_Xcode4_ContainerItemProxy {CA5271A0-6AFC-4C7D-95DD-ECC99D4592D8}
         uuid_Xcode4_TargetDependency {B01A5893-3D0A-4667-B9DE-E2AE0F6C1771}
       }
-      target_dependency fltk_jpeg {
+      target_dependency fltk3jpeg {
         uuid_Xcode4_BuildFileInFrameworks {C852AD6B-968F-494F-98DB-5C4D1BB35F0D}
         uuid_Xcode4_BuildFileInCopyFiles {41D37846-F39A-43D8-939D-CF6B2A442DF1}
         uuid_Xcode4_ContainerItemProxy {7AAB4998-A626-4F2B-BD57-AA917C2670E8}
         uuid_Xcode4_TargetDependency {DD978FFB-799E-4B76-9704-24D7F9858311}
       }
-      target_dependency fltk_zlib {
+      target_dependency fltk3zlib {
         uuid_Xcode4_BuildFileInFrameworks {8CFEC211-54F6-4441-8434-341686076466}
         uuid_Xcode4_BuildFileInCopyFiles {66BDB4B5-2ED7-49B5-9BAB-D55F1193378C}
         uuid_Xcode4_ContainerItemProxy {4BECC4A3-DA5A-4277-8EB2-12A092039220}
@@ -4908,7 +4909,7 @@
         uuid_Xcode4_FileRef {E34FF519-7B5A-4065-82C2-B74CBB45477C}
         filename_and_path {test/iconize.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {EA058632-D4EF-45A8-8FDE-6818A26E3910}
         uuid_Xcode4_BuildFileInCopyFiles {B65A4716-C4E6-47EA-A162-0E26297022BD}
         uuid_Xcode4_ContainerItemProxy {9D0609B4-7E93-4FA4-B643-57F899175D7D}
@@ -4937,7 +4938,7 @@
         uuid_Xcode4_FileRef {04420ABF-636C-4FF6-A93A-DF97D540BFB3}
         filename_and_path {test/image.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {C328C146-6C98-4083-9365-5A922437B45B}
         uuid_Xcode4_BuildFileInCopyFiles {75CC268F-3338-41E8-AD4E-E7272FF84F90}
         uuid_Xcode4_ContainerItemProxy {04181475-D170-48AA-9D82-185D56F1430B}
@@ -4966,7 +4967,7 @@
         uuid_Xcode4_FileRef {295B1BF3-4466-4FF5-9D8E-469FF38E280E}
         filename_and_path {test/inactive.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {7B867E21-4AD4-4F74-B856-AB2397745EB7}
         uuid_Xcode4_BuildFileInCopyFiles {F84B19DF-AD87-4ECB-AE46-0452F9BE1497}
         uuid_Xcode4_ContainerItemProxy {DB0B427C-E88F-4C52-A675-479F1A26865D}
@@ -4995,7 +4996,7 @@
         uuid_Xcode4_FileRef {DBE8F57C-BAA6-4988-A301-F64C590FF812}
         filename_and_path {test/input.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {F1399BFD-8550-4C10-A160-0BF3B6CBF6A4}
         uuid_Xcode4_BuildFileInCopyFiles {F33CC6D1-6CDE-4832-983C-2D08AE4D0BD0}
         uuid_Xcode4_ContainerItemProxy {BB1BE232-DE66-4F4C-8154-C789BA551955}
@@ -5024,7 +5025,7 @@
         uuid_Xcode4_FileRef {BE8CCD78-901E-4160-BC08-1F68DACAD37C}
         filename_and_path {test/input_choice.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {262AB0EE-C30C-42FB-A05C-3C035EAB3268}
         uuid_Xcode4_BuildFileInCopyFiles {CCE10FE3-F7BE-40F3-9F68-D748E0679A1F}
         uuid_Xcode4_ContainerItemProxy {B53D1D2C-0788-482A-86A2-C50CE7C33972}
@@ -5058,7 +5059,7 @@
         uuid_Xcode4_BuildFileInSources {704E917E-45EB-483F-98CF-A08A00F48E72}
         filename_and_path {test/keyboard_ui.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {71477938-0602-40DD-A6D4-245ED051ABE5}
         uuid_Xcode4_BuildFileInCopyFiles {7CD98AB2-3F84-450F-9B3B-A1D2C6028811}
         uuid_Xcode4_ContainerItemProxy {DF2E582A-A93F-4EF2-BCED-A6D9EB52A522}
@@ -5093,7 +5094,7 @@
         uuid_Xcode4_FileRef {548DE129-B842-4DE0-8E7B-E24186B07E9A}
         filename_and_path {test/label.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {D1942689-B3DE-4A86-BAF3-032AD07316AC}
         uuid_Xcode4_BuildFileInCopyFiles {EBC41AC0-40D1-4C79-B11B-09A4C93342AE}
         uuid_Xcode4_ContainerItemProxy {5AD0BF7E-A7B2-494A-8ED0-25C30B993A16}
@@ -5122,7 +5123,7 @@
         uuid_Xcode4_FileRef {1691194C-38B1-42F8-BF73-B98248207877}
         filename_and_path {test/line_style.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {07518481-50CF-49BF-8AE0-48DB31951F7E}
         uuid_Xcode4_BuildFileInCopyFiles {5C420C5A-7A88-4ECF-BBB0-65E53CE86067}
         uuid_Xcode4_ContainerItemProxy {9B5FFB10-3872-4C4B-8EF5-1F4922599C86}
@@ -5151,7 +5152,7 @@
         uuid_Xcode4_FileRef {B93E2240-8A65-479E-B532-E9E2311E4DC2}
         filename_and_path {test/list_visuals.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {42357684-CF8D-4209-8655-4D07F326215E}
         uuid_Xcode4_BuildFileInCopyFiles {5561E0F2-659E-4759-B8B3-DC8F43C39C9B}
         uuid_Xcode4_ContainerItemProxy {F2A9CED6-9DC6-4841-8F28-4E7AF0D3838E}
@@ -5185,7 +5186,7 @@
         uuid_Xcode4_BuildFileInSources {B98174D2-7D3F-4BD9-9289-18958C15B67C}
         filename_and_path {test/mandelbrot_ui.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {49A7EFC5-EFA4-4CC6-A766-BC297EE1E288}
         uuid_Xcode4_BuildFileInCopyFiles {CD4F4625-2493-4DF9-860F-BF5AD12DDFB9}
         uuid_Xcode4_ContainerItemProxy {E20E62D9-66F6-45BC-91B0-03A1FF8EB12A}
@@ -5220,7 +5221,7 @@
         uuid_Xcode4_FileRef {725B9B32-8552-4306-B776-2DE0E3F403D9}
         filename_and_path {test/menubar.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {51B3BF0C-44CB-4C1D-90B7-2614E4F0FBB1}
         uuid_Xcode4_BuildFileInCopyFiles {144825F4-0DB4-4595-B9B3-3D90EFE61084}
         uuid_Xcode4_ContainerItemProxy {0054A598-5D9C-439F-9E11-FBAC7E0A00B1}
@@ -5249,7 +5250,7 @@
         uuid_Xcode4_FileRef {9F2E7F62-BA24-4A04-953F-909D880BACFB}
         filename_and_path {test/message.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {4BCA97BB-74D4-4961-9ACC-F02309A348FD}
         uuid_Xcode4_BuildFileInCopyFiles {20414F40-7897-4DC4-96D0-A197E82F7030}
         uuid_Xcode4_ContainerItemProxy {89252249-6148-42F8-A257-7623CFE3086D}
@@ -5278,7 +5279,7 @@
         uuid_Xcode4_FileRef {E5BC0BE3-D6DA-45CE-A47B-DADF0C501769}
         filename_and_path {test/minimum.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {DED84CBE-83F7-40B1-A6DD-6E034D119906}
         uuid_Xcode4_BuildFileInCopyFiles {039F762C-AA1F-4819-BFC6-52CC6A613E4E}
         uuid_Xcode4_ContainerItemProxy {51B50408-71BB-4AC6-9837-DDFBD6F3E3AB}
@@ -5307,7 +5308,7 @@
         uuid_Xcode4_FileRef {4AE97840-DF2C-4F8C-9A26-D607BF6AE252}
         filename_and_path {test/navigation.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {B6658415-02AE-48D7-AB3A-A6EC9B7E8FA6}
         uuid_Xcode4_BuildFileInCopyFiles {1A1893BC-53EF-453A-8E15-508AC3DCAB12}
         uuid_Xcode4_ContainerItemProxy {1E3800F2-61AC-4B76-801D-238324E4EBFD}
@@ -5336,7 +5337,7 @@
         uuid_Xcode4_FileRef {E3F5E9E7-259F-4B80-BCD1-E312D0AF5F26}
         filename_and_path {test/native-filechooser.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {EA1F5CD8-C9DB-472A-9E75-012EB19F8D1E}
         uuid_Xcode4_BuildFileInCopyFiles {8B45D566-448B-4FD9-B55B-59850EF64591}
         uuid_Xcode4_ContainerItemProxy {0F62A6EA-CFBA-46B3-9295-6EC44F81BF78}
@@ -5365,7 +5366,7 @@
         uuid_Xcode4_FileRef {0433C858-2CA0-4517-8AC1-383F052D803D}
         filename_and_path {test/output.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {BFB851FC-3F18-4DDE-8235-3A4109E4B784}
         uuid_Xcode4_BuildFileInCopyFiles {FECC9CB8-3061-4454-B571-B67D879FB0EF}
         uuid_Xcode4_ContainerItemProxy {AAAFD2FC-0338-4AAB-BA78-FC9D9B097872}
@@ -5394,7 +5395,7 @@
         uuid_Xcode4_FileRef {FA6E3584-A76D-4B92-B390-0F2BCF74F662}
         filename_and_path {test/overlay.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {CB7DEB15-A616-44F8-9004-A718104C42FE}
         uuid_Xcode4_BuildFileInCopyFiles {277CFEBD-07B8-494F-A722-8D36FA9213FE}
         uuid_Xcode4_ContainerItemProxy {4112E6C6-EBCB-4278-AA3C-7FE27F8824C5}
@@ -5423,7 +5424,7 @@
         uuid_Xcode4_FileRef {B94C9434-DEC6-4409-99C2-564D403D2DD0}
         filename_and_path {test/pack.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {24576601-E4B7-4649-ADB5-7BB1A1731E8D}
         uuid_Xcode4_BuildFileInCopyFiles {2FEC0834-E291-4C2A-B0F5-35F45E776937}
         uuid_Xcode4_ContainerItemProxy {D77BDE28-2669-4D70-A5B2-576E195DD96B}
@@ -5452,31 +5453,31 @@
         uuid_Xcode4_FileRef {D10F0CF7-7411-40F7-B130-ED5EE20131D8}
         filename_and_path {test/pixmap_browser.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {D3A4E90D-F2FC-4194-9AEB-6E3E40B91B42}
         uuid_Xcode4_BuildFileInCopyFiles {1174924A-127E-463E-800B-C73D51B9A086}
         uuid_Xcode4_ContainerItemProxy {66D5017C-A6D1-4FBB-B8AC-71D8D7753212}
         uuid_Xcode4_TargetDependency {2C1154AB-BCF5-4BE8-B952-7F36F9911C1B}
       }
-      target_dependency fltk_images {
+      target_dependency fltk3images {
         uuid_Xcode4_BuildFileInFrameworks {F6365FB7-903D-4B53-BA7C-A657DB15AEB6}
         uuid_Xcode4_BuildFileInCopyFiles {D9716327-725F-4D31-818D-51867D51F4F7}
         uuid_Xcode4_ContainerItemProxy {6955C816-CE89-4013-96D0-786FA8119A07}
         uuid_Xcode4_TargetDependency {B8EA6D01-E4E9-4630-895C-0893A2411B26}
       }
-      target_dependency fltk_png {
+      target_dependency fltk3png {
         uuid_Xcode4_BuildFileInFrameworks {2A07E43F-4EBE-494E-966B-999C633D079E}
         uuid_Xcode4_BuildFileInCopyFiles {4BC82B14-1A95-4EB4-9B58-50A4B33630DF}
         uuid_Xcode4_ContainerItemProxy {91B00D3E-7A5C-4A46-989E-626767B35C52}
         uuid_Xcode4_TargetDependency {541466C5-D9F8-423A-917E-D6478C013848}
       }
-      target_dependency fltk_jpeg {
+      target_dependency fltk3jpeg {
         uuid_Xcode4_BuildFileInFrameworks {FB6C7401-7567-4CF4-8527-95CA2E50833E}
         uuid_Xcode4_BuildFileInCopyFiles {74B905D5-1CE7-4832-AAD1-BCEB8CA5DC67}
         uuid_Xcode4_ContainerItemProxy {3DF04926-C0D8-4696-A077-ACEC5745CA60}
         uuid_Xcode4_TargetDependency {17C19DFB-1E41-4DC6-BDF6-F59BB656C7E1}
       }
-      target_dependency fltk_zlib {
+      target_dependency fltk3zlib {
         uuid_Xcode4_BuildFileInFrameworks {65BBE449-A4D4-4167-BFE6-BF27DC85AC6A}
         uuid_Xcode4_BuildFileInCopyFiles {D8AAD7FC-7634-4977-9F1D-875BAD84FFD6}
         uuid_Xcode4_ContainerItemProxy {9177E4D7-B7BB-4BAD-B6C3-16D5A022943F}
@@ -5505,7 +5506,7 @@
         uuid_Xcode4_FileRef {F5C69D2F-FA03-4927-9DD7-A3074A3D422B}
         filename_and_path {test/pixmap.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {62243343-1F86-42FC-8BFE-3951E11FAC17}
         uuid_Xcode4_BuildFileInCopyFiles {C9800385-1575-4D2F-833D-3F0797C1D84B}
         uuid_Xcode4_ContainerItemProxy {168F11AD-1A64-489F-B276-A96FC8786524}
@@ -5534,7 +5535,7 @@
         uuid_Xcode4_BuildFileInSources {19BB117B-5033-44B7-A09F-417BF8BE1C63}
         filename_and_path {test/preferences.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {4F1839C3-9D83-4063-B8BA-C8A6D81571A5}
         uuid_Xcode4_BuildFileInCopyFiles {78AFD340-DF54-4FB5-8950-4D429C1ACD30}
         uuid_Xcode4_ContainerItemProxy {70E9C4A0-4E28-4113-A74B-ACEBF476AD24}
@@ -5569,7 +5570,7 @@
         uuid_Xcode4_BuildFileInSources {704E9EB0-136D-45C1-ACF6-3237D5C05351}
         filename_and_path {test/radio.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {ADFE5AA1-2184-41FD-AE6B-3556DFF96A0D}
         uuid_Xcode4_BuildFileInCopyFiles {257CC57A-9BE4-4367-B2DD-767A841E5452}
         uuid_Xcode4_ContainerItemProxy {853CAB4E-79C4-47E9-85E4-A873AD5A32CE}
@@ -5604,7 +5605,7 @@
         uuid_Xcode4_FileRef {BBD59C52-9636-47E1-95A2-2343DD9695A8}
         filename_and_path {test/resizebox.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {6266CE70-997A-42BB-9EA3-B3422FB9A471}
         uuid_Xcode4_BuildFileInCopyFiles {454A29D5-5091-423E-88AF-21F313416024}
         uuid_Xcode4_ContainerItemProxy {6EDF2799-0FD2-42B0-8CAB-59B6CA9BB812}
@@ -5633,7 +5634,7 @@
         uuid_Xcode4_BuildFileInSources {533D8CCB-375E-415B-8F18-CF85A8E11B44}
         filename_and_path {test/resize.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {8C0A5A62-66D3-45AD-B98A-378F8AD66BD5}
         uuid_Xcode4_BuildFileInCopyFiles {012D264C-CB0B-4E69-A33D-D65EF1182C05}
         uuid_Xcode4_ContainerItemProxy {7F3844D9-54CA-4F28-93EA-0F7EB602C449}
@@ -5668,7 +5669,7 @@
         uuid_Xcode4_FileRef {3B964469-A4BC-4C8C-B25D-0E1C3AF0D5AF}
         filename_and_path {test/rotated_text.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {D6F8969F-0E24-40EE-8BBF-0655356A2655}
         uuid_Xcode4_BuildFileInCopyFiles {E66471FF-6318-44C7-AA0C-9014B55F4C1A}
         uuid_Xcode4_ContainerItemProxy {24B6ADC2-502E-44C4-B772-F3ED5789D9A3}
@@ -5697,7 +5698,7 @@
         uuid_Xcode4_FileRef {15F2668C-A985-4EBB-B000-76D2A5CBC8D6}
         filename_and_path {test/scroll.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {82173261-BF26-4C1E-99A7-E5A2B7C00885}
         uuid_Xcode4_BuildFileInCopyFiles {64AD3B91-64C8-4002-ACC9-E928726F9AB6}
         uuid_Xcode4_ContainerItemProxy {F9129EF8-7D1B-4BBD-A2D9-EABB749AFD35}
@@ -5726,13 +5727,13 @@
         uuid_Xcode4_FileRef {DBE78FC4-2D67-4648-A133-5D5E3A089E55}
         filename_and_path {test/shape.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {C44BB43D-F260-46E9-B4C8-C67025E0EB57}
         uuid_Xcode4_BuildFileInCopyFiles {7D54EC0F-2599-4482-9B30-36736B6F3222}
         uuid_Xcode4_ContainerItemProxy {587428E1-E9BB-4A7A-A329-062F00A706A7}
         uuid_Xcode4_TargetDependency {5F54E43B-F769-4A7F-97A0-BD9874C9458E}
       }
-      target_dependency fltk_gl {
+      target_dependency fltk3gl {
         uuid_Xcode4_BuildFileInFrameworks {5FE67EF4-8004-43FA-A501-07DFDFA39AE2}
         uuid_Xcode4_BuildFileInCopyFiles {D15CD64F-C45E-4111-80BB-796251601A30}
         uuid_Xcode4_ContainerItemProxy {332B0BA6-29BA-48B9-AB34-E5D7494F0F02}
@@ -5802,7 +5803,7 @@
         uuid_Xcode4_FileRef {F86868E8-003C-4C2F-9530-5520C2022020}
         filename_and_path {test/subwindow.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {78408084-B93D-46CC-9E6D-F01EF08849D6}
         uuid_Xcode4_BuildFileInCopyFiles {536A5972-7DAE-49CA-A02E-BCC58D97F026}
         uuid_Xcode4_ContainerItemProxy {488F15B7-E428-46E8-83A1-F439AF2A58FC}
@@ -5831,31 +5832,31 @@
         uuid_Xcode4_FileRef {45B471C7-8D57-4244-BD19-8C230A1A2CB9}
         filename_and_path {test/sudoku.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {4BD59DB6-F11B-4DBC-88BE-F191746C2F44}
         uuid_Xcode4_BuildFileInCopyFiles {1277C42A-BA11-405B-BEF9-5A3B5AD91C8B}
         uuid_Xcode4_ContainerItemProxy {3D1A55EE-4C83-4AF8-93C0-44F5E0D93646}
         uuid_Xcode4_TargetDependency {0E6EB228-6578-4065-91C8-EF43B01991F2}
       }
-      target_dependency fltk_images {
+      target_dependency fltk3images {
         uuid_Xcode4_BuildFileInFrameworks {DF57BE2E-0AF6-4604-80F4-7C340B8D9141}
         uuid_Xcode4_BuildFileInCopyFiles {0D0C53CA-958A-44CD-BCD8-6E23BD960020}
         uuid_Xcode4_ContainerItemProxy {9AA4F2ED-945E-4EE8-AA00-A0A11E333E24}
         uuid_Xcode4_TargetDependency {53FE520F-A4D9-4C8A-8272-543AC64ECEC1}
       }
-      target_dependency fltk_png {
+      target_dependency fltk3png {
         uuid_Xcode4_BuildFileInFrameworks {0A54EEB6-E507-4065-91CF-482E33B69D6F}
         uuid_Xcode4_BuildFileInCopyFiles {02F006EE-785B-43E6-995B-8EF20F460B56}
         uuid_Xcode4_ContainerItemProxy {4F98C824-CCC8-45DF-9408-481E67721EA0}
         uuid_Xcode4_TargetDependency {E7555394-82BD-4398-9A3E-AD53ACE3D8F9}
       }
-      target_dependency fltk_jpeg {
+      target_dependency fltk3jpeg {
         uuid_Xcode4_BuildFileInFrameworks {6C329225-4336-49BF-BEB9-46DBB35700E6}
         uuid_Xcode4_BuildFileInCopyFiles {C3B9CC3B-CB1A-460D-958A-F966E482BD94}
         uuid_Xcode4_ContainerItemProxy {AC25B5F5-E512-4E15-B482-41ABA508B860}
         uuid_Xcode4_TargetDependency {CE1F19EF-85AC-444E-8C8C-EBCFCBE9AC7C}
       }
-      target_dependency fltk_zlib {
+      target_dependency fltk3zlib {
         uuid_Xcode4_BuildFileInFrameworks {7A143F72-B525-4C20-8DD2-C9E8B8146A28}
         uuid_Xcode4_BuildFileInCopyFiles {6ED6E780-2CC9-4D9E-925E-59941518A541}
         uuid_Xcode4_ContainerItemProxy {E964FBEE-0180-463B-BB1E-3BE02DB3EAE6}
@@ -5904,7 +5905,7 @@
         uuid_Xcode4_FileRef {C354D5A0-DED9-4385-A76B-C37930D5586D}
         filename_and_path {test/symbols.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {300B8687-3529-4495-B024-77527B03BD37}
         uuid_Xcode4_BuildFileInCopyFiles {F9C35C0D-49D7-43FA-ACEE-A569755ECC63}
         uuid_Xcode4_ContainerItemProxy {94A8EFB6-BD70-42C3-9152-923661FCD5CD}
@@ -5933,7 +5934,7 @@
         uuid_Xcode4_FileRef {D22BD0BD-29DD-432A-A021-D320E5A0A999}
         filename_and_path {test/table.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {66DA6238-02F5-4763-97DA-339043F71011}
         uuid_Xcode4_BuildFileInCopyFiles {AD35AD13-8C5E-4E5F-925A-619E8400F45F}
         uuid_Xcode4_ContainerItemProxy {0384E187-CD91-44DE-A54F-BE3D0057ECCD}
@@ -5962,7 +5963,7 @@
         uuid_Xcode4_BuildFileInSources {97A367FE-F0FD-47DC-B172-825DE6118BE6}
         filename_and_path {test/tabs.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {F3B05DCE-570C-4B31-9931-615454C46632}
         uuid_Xcode4_BuildFileInCopyFiles {735F2EA0-7E10-4AE1-B7BF-649E672E5046}
         uuid_Xcode4_ContainerItemProxy {87A77570-4D8B-453B-87D5-33A7B967B177}
@@ -5997,7 +5998,7 @@
         uuid_Xcode4_FileRef {7DC4397C-38CA-4084-A223-A51B4BEB4394}
         filename_and_path {test/threads.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {298DFB84-BC8B-4227-8A6B-A8C534B800DC}
         uuid_Xcode4_BuildFileInCopyFiles {8613D5F9-4C2C-4C3A-94B7-15DE7546E877}
         uuid_Xcode4_ContainerItemProxy {39DA3DE4-4255-42FA-8638-847AA3F38AEB}
@@ -6026,7 +6027,7 @@
         uuid_Xcode4_FileRef {ED8CF1CB-EEC8-4192-B488-F1603779CC88}
         filename_and_path {test/tile.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {C517F8E8-6914-490E-8F22-E6485C2F694C}
         uuid_Xcode4_BuildFileInCopyFiles {81C0056B-A4B7-4D26-91D7-934D716A7ACE}
         uuid_Xcode4_ContainerItemProxy {851D31FF-CA6A-4AC3-B961-8990D7A3F3C6}
@@ -6055,31 +6056,31 @@
         uuid_Xcode4_FileRef {99260DC8-B403-43A2-B83E-6873D8300462}
         filename_and_path {test/tiled_image.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {DEBA9070-6C8D-4EAB-87DF-66F1C3FB3909}
         uuid_Xcode4_BuildFileInCopyFiles {D4D36579-7A03-4371-9ABE-52560326AA01}
         uuid_Xcode4_ContainerItemProxy {19372258-33CB-4EA5-88DE-0F212A955D20}
         uuid_Xcode4_TargetDependency {D7AFA5B0-6DD6-40F0-B5FF-76114C71BEB2}
       }
-      target_dependency fltk_images {
+      target_dependency fltk3images {
         uuid_Xcode4_BuildFileInFrameworks {E70C3377-9299-4E31-8AAB-347A8D010ED4}
         uuid_Xcode4_BuildFileInCopyFiles {25B6823C-DE57-4082-B7AB-0B637B35E6B0}
         uuid_Xcode4_ContainerItemProxy {D471C388-A152-4A96-8DBD-B54D82F72A79}
         uuid_Xcode4_TargetDependency {F075F236-3F06-4C15-9AE8-D2D380AB5255}
       }
-      target_dependency fltk_png {
+      target_dependency fltk3png {
         uuid_Xcode4_BuildFileInFrameworks {3CB3EF77-FD55-4829-8330-082AE4B98C8C}
         uuid_Xcode4_BuildFileInCopyFiles {27D4D6D5-4ACE-446A-85DF-0ADD85080738}
         uuid_Xcode4_ContainerItemProxy {37F6B52F-4DC8-47A1-9D5B-287ADAEC14D5}
         uuid_Xcode4_TargetDependency {EC765C5E-235F-4571-AC2B-663AEF6F286D}
       }
-      target_dependency fltk_jpeg {
+      target_dependency fltk3jpeg {
         uuid_Xcode4_BuildFileInFrameworks {0E4AFD10-3C04-44B8-8E86-86DAA105B26F}
         uuid_Xcode4_BuildFileInCopyFiles {B8C293F5-45DC-444B-AEC8-CFF1D802413B}
         uuid_Xcode4_ContainerItemProxy {F5F922B3-C00B-405C-9856-AF2FCE15CAE7}
         uuid_Xcode4_TargetDependency {DCB37FCA-CCD1-48C4-AB03-14D7217F70D6}
       }
-      target_dependency fltk_zlib {
+      target_dependency fltk3zlib {
         uuid_Xcode4_BuildFileInFrameworks {7F5336BC-9352-4C95-89E3-A99160BDA0B9}
         uuid_Xcode4_BuildFileInCopyFiles {210B7CEF-E767-4785-9645-A572330F8950}
         uuid_Xcode4_ContainerItemProxy {8CAC0721-5F98-4D4A-9882-549A4E288064}
@@ -6108,7 +6109,7 @@
         uuid_Xcode4_BuildFileInSources {CAB0D222-F989-40D3-B2AD-0455DEAE45EE}
         filename_and_path {test/tree.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {6B9AB514-B21B-4282-8DD1-88A0B372ECB8}
         uuid_Xcode4_BuildFileInCopyFiles {1660BF6E-2DCA-4890-BABC-9381C55FF987}
         uuid_Xcode4_ContainerItemProxy {55B18FF4-354C-4740-9254-5C4BCDAAA3F1}
@@ -6194,7 +6195,7 @@
         uuid_Xcode4_FileRef {4DDA4319-0910-4380-96D0-CA7616D06987}
         filename_and_path {test/unittest_viewport.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {5BB07519-DDC5-4225-8AB4-9B8A2B541AA2}
         uuid_Xcode4_BuildFileInCopyFiles {60B535BE-3A83-4B7A-AE27-C05684B317A3}
         uuid_Xcode4_ContainerItemProxy {1919671C-4588-4F42-B36D-2FB10A61CCDD}
@@ -6223,7 +6224,7 @@
         uuid_Xcode4_FileRef {24A75B71-B745-4E8B-B7F2-5FE9B809B54D}
         filename_and_path {test/utf8.cxx}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {3B428E37-4AEB-4A5B-932C-A4B2B2751E16}
         uuid_Xcode4_BuildFileInCopyFiles {646340DC-FCF7-42BB-B8A5-B7AF5164FD14}
         uuid_Xcode4_ContainerItemProxy {51855363-63E2-437E-8E8B-50E0FB33AED8}
@@ -6252,7 +6253,7 @@
         uuid_Xcode4_BuildFileInSources {F671D5D7-7150-4116-9C68-92969A3F9E32}
         filename_and_path {test/valuators.fl}
       }
-      target_dependency fltk {
+      target_dependency fltk3 {
         uuid_Xcode4_BuildFileInFrameworks {77A4274D-2AC6-4E31-9745-D943FAB74014}
         uuid_Xcode4_BuildFileInCopyFiles {9CA30044-CE75-413A-B8A3-2A6223D68EE9}
         uuid_Xcode4_ContainerItemProxy {AED96CC1-E203-4DF4-99A7-27005A39BB35}

Modified: branches/branch-3.0/fluid/Fl_Function_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Function_Type.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fl_Function_Type.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -31,7 +31,7 @@
 #include "Fl_Type.h"
 #include <fltk3/ask.h>
 #include <fltk3/FileChooser.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <stdio.h>
 #include <stdlib.h>
 

Modified: branches/branch-3.0/fluid/Fl_Group_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Group_Type.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fl_Group_Type.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -35,7 +35,7 @@
 #include <fltk3/Table.h>
 #include <fltk3/message.h>
 #include "Fl_Widget_Type.h"
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 
 // Override group's resize behavior to do nothing to children:
 void igroup::resize(int X, int Y, int W, int H) {

Modified: branches/branch-3.0/fluid/Fl_Menu_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Menu_Type.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fl_Menu_Type.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -40,7 +40,7 @@
 #include <fltk3/ValueInput.h>
 #include <fltk3/TextDisplay.h>
 #include <fltk3/Wrapper.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <stdio.h>
 #include <stdlib.h>
 

Modified: branches/branch-3.0/fluid/Fl_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Type.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fl_Type.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -43,7 +43,7 @@
 #include <fltk3/draw.h>
 #include <fltk3/filename.h>
 #include <stdlib.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <stdio.h>
 
 #include "Fl_Type.h"

Modified: branches/branch-3.0/fluid/Fl_Widget_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Widget_Type.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fl_Widget_Type.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -35,7 +35,7 @@
 #include <fltk3/Slider.h>
 #include <fltk3/Spinner.h>
 #include <fltk3/Window.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <stdio.h>
 #include <stdlib.h>
 

Modified: branches/branch-3.0/fluid/Fl_Window_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Window_Type.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fl_Window_Type.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -1359,7 +1359,7 @@
 ////////////////////////////////////////////////////////////////
 
 #include <stdio.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 
 void Fl_Window_Type::write_code1() {
   Fl_Widget_Type::write_code1();

Modified: branches/branch-3.0/fluid/Fluid_Image.cxx
===================================================================
--- branches/branch-3.0/fluid/Fluid_Image.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Fluid_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -29,7 +29,7 @@
 #include <fltk3/Widget.h>
 #include "Fl_Type.h"
 #include "Fluid_Image.h"
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>

Modified: branches/branch-3.0/fluid/Makefile
===================================================================
--- branches/branch-3.0/fluid/Makefile	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/Makefile	2011-08-22 15:21:44 UTC (rev 8991)
@@ -61,12 +61,12 @@
 
 all:	$(FLUID) fluid$(EXEEXT)
 
-fluid$(EXEEXT): $(FLUID_OBJECTS) $(FLTK_LIBNAME) $(FLTK_IMAGES_LIBNAME) $(FLTK_PNG_LIBNAME) $(FLTK_JPEG_LIBNAME) $(FLTK_ZLIB_LIBNAME)
+fluid$(EXEEXT): $(FLUID_OBJECTS) $(FLTK3_LIBNAME) $(FLTK3IMAGES_LIBNAME) $(FLTK3PNG_LIBNAME) $(FLTK3JPEG_LIBNAME) $(FLTK3ZLIB_LIBNAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(FLUID_OBJECTS) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(FLUID_OBJECTS) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(LINK_FLTK3) $(LDLIBS)
 	$(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS
 
-fluid-shared$(EXEEXT):	$(FLUID_OBJECTS) ../src/$(FLTK_DSONAME) ../src/$(FLTK_IMAGES_DSONAME) ../src/$(FLTK_PNG_DSONAME) ../src/$(FLTK_JPEG_DSONAME) ../src/$(FLTK_ZLIB_DSONAME)
+fluid-shared$(EXEEXT):	$(FLUID_OBJECTS) ../src/$(FLTK3_DSONAME) ../src/$(FLTK3IMAGES_DSONAME) ../src/$(FLTK3PNG_DSONAME) ../src/$(FLTK3JPEG_DSONAME) ../src/$(FLTK3ZLIB_DSONAME)
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(FLUID_OBJECTS) $(LINKSHARED) $(LDLIBS)
 

Modified: branches/branch-3.0/fluid/code.cxx
===================================================================
--- branches/branch-3.0/fluid/code.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/code.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -27,7 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <stdarg.h>
 
 #include <fltk3/run.h>

Modified: branches/branch-3.0/fluid/factory.cxx
===================================================================
--- branches/branch-3.0/fluid/factory.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/factory.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -39,7 +39,7 @@
 #include <fltk3/Pixmap.h>
 #include <fltk3/Tree.h>
 #include <stdio.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include "undo.h"
 
 #include "Fl_Widget_Type.h"

Modified: branches/branch-3.0/fluid/file.cxx
===================================================================
--- branches/branch-3.0/fluid/file.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/file.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -32,7 +32,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "../src/flstring.h"
+// FIXME: either make the interface public or remove this include statement!
+#include "../src/core/flstring.h"
 #include <stdarg.h>
 #include "alignment_panel.h"
 #include "workspace_panel.h"

Modified: branches/branch-3.0/fluid/fluid.cxx
===================================================================
--- branches/branch-3.0/fluid/fluid.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/fluid.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -48,7 +48,7 @@
 #include <sys/stat.h>
 #include <time.h> // time(), localtime(), etc.
 
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include "alignment_panel.h"
 #include "function_panel.h"
 #include "template_panel.h"

Modified: branches/branch-3.0/fluid/makedepend
===================================================================
--- branches/branch-3.0/fluid/makedepend	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/makedepend	2011-08-22 15:21:44 UTC (rev 8991)
@@ -1,112 +1,12 @@
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
-CodeEditor.o: CodeEditor.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-CodeEditor.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-CodeEditor.o: ../fltk3/TextBuffer.h ../fltk3/TextEditor.h
-CodeEditor.o: ../fltk3/TextDisplay.h ../fltk3/draw.h ../fltk3/x.h
-CodeEditor.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-CodeEditor.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-CodeEditor.o: ../fltk3/Widget.h ../fltk3/enumerations.h ../fltk3/Window.h
-CodeEditor.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-CodeEditor.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-CodeEditor.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-CodeEditor.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-CodeEditor.o: ../fltk3/TextBuffer.h
-Fl_Function_Type.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Function_Type.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Function_Type.o: ../fltk3/Preferences.h ../fltk3/FileChooser.h
-Fl_Function_Type.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h
-Fl_Function_Type.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Function_Type.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Function_Type.o: ../fltk3/Group.h ../fltk3/Choice.h ../fltk3/Menu_.h
-Fl_Function_Type.o: ../fltk3/MenuItem.h ../fltk3/Image.h
-Fl_Function_Type.o: ../fltk3/MenuButton.h ../fltk3/Button.h
-Fl_Function_Type.o: ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h
-Fl_Function_Type.o: ../fltk3/Browser.h ../fltk3/Browser_.h
-Fl_Function_Type.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Function_Type.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-Fl_Function_Type.o: ../fltk3/filename.h ../fltk3/Box.h ../fltk3/CheckButton.h
-Fl_Function_Type.o: ../fltk3/LightButton.h ../fltk3/Button.h
-Fl_Function_Type.o: ../fltk3/FileInput.h ../fltk3/Input.h ../fltk3/Input_.h
-Fl_Function_Type.o: ../fltk3/ReturnButton.h ../fltk3/ask.h Fl_Type.h
-Fl_Function_Type.o: ../fltk3/Menu.h ../fltk3/Plugin.h Fluid_Image.h
-Fl_Function_Type.o: ../fltk3/SharedImage.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Function_Type.o: ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Function_Type.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Image.h
-Fl_Function_Type.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Function_Type.o: ../fltk3/TabGroup.h ../fltk3/PackedGroup.h
-Fl_Function_Type.o: ../fltk3/WizardGroup.h ../fltk3/Menu_.h
-Fl_Function_Type.o: ../fltk3/InputChoice.h ../fltk3/MenuBar.h
-Fl_Function_Type.o: ../src/flstring.h ../fltk3/Export.h ../config.h
-Fl_Function_Type.o: function_panel.h ../fltk3/LightButton.h
-Fl_Function_Type.o: ../fltk3/TextEditor.h ../fltk3/TextDisplay.h
-Fl_Function_Type.o: ../fltk3/draw.h ../fltk3/TextBuffer.h CodeEditor.h
-Fl_Function_Type.o: ../fltk3/TextBuffer.h comments.h
-Fl_Group_Type.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Group_Type.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Group_Type.o: ../fltk3/Group.h ../fltk3/Table.h ../fltk3/ScrollGroup.h
-Fl_Group_Type.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Group_Type.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Group_Type.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Group_Type.o: ../fltk3/Box.h ../fltk3/Scrollbar.h ../fltk3/message.h
-Fl_Group_Type.o: ../fltk3/ask.h Fl_Widget_Type.h Fl_Type.h
-Fl_Group_Type.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Menu.h
-Fl_Group_Type.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/Plugin.h
-Fl_Group_Type.o: ../fltk3/Preferences.h Fluid_Image.h ../fltk3/SharedImage.h
-Fl_Group_Type.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Group_Type.o: ../fltk3/Window.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Group_Type.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-Fl_Group_Type.o: ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-Fl_Group_Type.o: ../fltk3/PackedGroup.h ../fltk3/WizardGroup.h
-Fl_Group_Type.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-Fl_Group_Type.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-Fl_Group_Type.o: ../fltk3/Input_.h ../fltk3/MenuBar.h ../src/flstring.h
-Fl_Group_Type.o: ../fltk3/Export.h ../config.h
-Fl_Menu_Type.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Menu_Type.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Menu_Type.o: Fl_Widget_Type.h Fl_Type.h ../fltk3/Widget.h
-Fl_Menu_Type.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Menu_Type.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Menu_Type.o: ../fltk3/Wrapper.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-Fl_Menu_Type.o: ../fltk3/Image.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Menu_Type.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/draw.h
-Fl_Menu_Type.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Menu_Type.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Image.h
-Fl_Menu_Type.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Menu_Type.o: ../fltk3/TabGroup.h ../fltk3/PackedGroup.h ../fltk3/Group.h
-Fl_Menu_Type.o: ../fltk3/WizardGroup.h ../fltk3/Menu_.h ../fltk3/MenuButton.h
-Fl_Menu_Type.o: ../fltk3/Menu_.h ../fltk3/Choice.h ../fltk3/InputChoice.h
-Fl_Menu_Type.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/MenuBar.h
-Fl_Menu_Type.o: alignment_panel.h ../fltk3/TextBuffer.h
-Fl_Menu_Type.o: ../fltk3/TextDisplay.h ../fltk3/draw.h ../fltk3/Scrollbar.h
-Fl_Menu_Type.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/TextBuffer.h
-Fl_Menu_Type.o: ../fltk3/filename.h ../fltk3/Tooltip.h ../fltk3/Button.h
-Fl_Menu_Type.o: ../fltk3/Box.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-Fl_Menu_Type.o: ../fltk3/Button.h ../fltk3/IntInput.h ../fltk3/Input.h
-Fl_Menu_Type.o: ../fltk3/Spinner.h ../fltk3/RepeatButton.h ../fltk3/run.h
-Fl_Menu_Type.o: ../fltk3/ReturnButton.h ../fltk3/RoundButton.h
-Fl_Menu_Type.o: ../fltk3/message.h ../fltk3/ask.h ../fltk3/ValueInput.h
-Fl_Menu_Type.o: ../src/flstring.h ../fltk3/Export.h ../config.h
-Fl_Menu_Type.o: ../fltk3/Output.h Shortcut_Button.h
-Fl_Type.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Type.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/ask.h
-Fl_Type.o: ../fltk3/Browser_.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Type.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-Fl_Type.o: ../fltk3/Widget.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Type.o: ../fltk3/Valuator.h ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Type.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-Fl_Type.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Type.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Type.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/filename.h
-Fl_Type.o: ../src/flstring.h ../fltk3/Export.h ../config.h Fl_Type.h
-Fl_Type.o: ../fltk3/DoubleWindow.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-Fl_Type.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/TabGroup.h
-Fl_Type.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-Fl_Type.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-Fl_Type.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-Fl_Type.o: ../fltk3/Input_.h ../fltk3/MenuBar.h workspace_panel.h
-Fl_Type.o: ../fltk3/MultiLabel.h ../fltk3/Box.h ../fltk3/Button.h
-Fl_Type.o: ../fltk3/ReturnButton.h ../fltk3/Button.h undo.h pixmaps/lock.xpm
+CodeEditor.o: CodeEditor.h
+Fl_Function_Type.o: Fl_Type.h Fluid_Image.h function_panel.h CodeEditor.h
+Fl_Function_Type.o: comments.h
+Fl_Group_Type.o: Fl_Widget_Type.h Fl_Type.h Fluid_Image.h
+Fl_Menu_Type.o: Fl_Widget_Type.h Fl_Type.h Fluid_Image.h alignment_panel.h
+Fl_Menu_Type.o: Shortcut_Button.h
+Fl_Type.o: Fl_Type.h Fluid_Image.h workspace_panel.h undo.h pixmaps/lock.xpm
 Fl_Type.o: pixmaps/protected.xpm pixmaps/flWindow.xpm pixmaps/flButton.xpm
 Fl_Type.o: pixmaps/flCheckButton.xpm pixmaps/flRoundButton.xpm
 Fl_Type.o: pixmaps/flBox.xpm pixmaps/flGroup.xpm pixmaps/flFunction.xpm
@@ -128,398 +28,37 @@
 Fl_Type.o: pixmaps/flCounter.xpm pixmaps/flDial.xpm pixmaps/flRoller.xpm
 Fl_Type.o: pixmaps/flValueInput.xpm pixmaps/flValueOutput.xpm
 Fl_Type.o: pixmaps/flSpinner.xpm pixmaps/flWidgetClass.xpm pixmaps/flTree.xpm
-Fl_Type.o: pixmaps/flTable.xpm pixmaps/flAppTarget.xpm pixmaps/flFile.xpm
-Fl_Type.o: pixmaps/flFolder.xpm pixmaps/flFluidFile.xpm
-Fl_Type.o: pixmaps/flCodeFile.xpm pixmaps/flMenuNone.xpm
-Fl_Type.o: pixmaps/flMenuMulti.xpm pixmaps/flMenuAll.xpm
-Fl_Widget_Type.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Widget_Type.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Widget_Type.o: ../fltk3/Group.h ../fltk3/Table.h ../fltk3/ScrollGroup.h
-Fl_Widget_Type.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Widget_Type.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Widget_Type.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Widget_Type.o: ../fltk3/Box.h ../fltk3/Scrollbar.h ../fltk3/Input.h
-Fl_Widget_Type.o: ../fltk3/Input_.h Fl_Widget_Type.h Fl_Type.h
-Fl_Widget_Type.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Menu.h
-Fl_Widget_Type.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/Plugin.h
-Fl_Widget_Type.o: ../fltk3/Preferences.h Fluid_Image.h ../fltk3/SharedImage.h
-Fl_Widget_Type.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Widget_Type.o: ../fltk3/Window.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Widget_Type.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-Fl_Widget_Type.o: ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-Fl_Widget_Type.o: ../fltk3/PackedGroup.h ../fltk3/WizardGroup.h
-Fl_Widget_Type.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-Fl_Widget_Type.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/MenuBar.h
-Fl_Widget_Type.o: alignment_panel.h ../fltk3/TextBuffer.h
-Fl_Widget_Type.o: ../fltk3/TextDisplay.h ../fltk3/draw.h
-Fl_Widget_Type.o: ../fltk3/TextBuffer.h ../fltk3/filename.h
-Fl_Widget_Type.o: ../fltk3/Tooltip.h ../fltk3/Button.h ../fltk3/CheckButton.h
-Fl_Widget_Type.o: ../fltk3/LightButton.h ../fltk3/Button.h
-Fl_Widget_Type.o: ../fltk3/IntInput.h ../fltk3/Input.h ../fltk3/Spinner.h
-Fl_Widget_Type.o: ../fltk3/RepeatButton.h ../fltk3/run.h
-Fl_Widget_Type.o: ../fltk3/ReturnButton.h ../fltk3/RoundButton.h
-Fl_Widget_Type.o: ../fltk3/message.h ../fltk3/ask.h ../fltk3/Slider.h
-Fl_Widget_Type.o: ../src/flstring.h ../fltk3/Export.h ../config.h
-Fl_Widget_Type.o: widget_panel.h ../fltk3/ValueInput.h ../fltk3/LightButton.h
-Fl_Widget_Type.o: Shortcut_Button.h CodeEditor.h ../fltk3/TextEditor.h
-Fl_Widget_Type.o: ../fltk3/TextDisplay.h ../fltk3/show_colormap.h
-Fl_Window_Type.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Window_Type.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Window_Type.o: ../fltk3/OverlayWindow.h ../fltk3/DoubleWindow.h
-Fl_Window_Type.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Window_Type.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-Fl_Window_Type.o: ../fltk3/Widget.h ../fltk3/message.h ../fltk3/ask.h
-Fl_Window_Type.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Window_Type.o: ../fltk3/Window.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Window_Type.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Window_Type.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Window_Type.o: ../fltk3/RGBImage.h ../fltk3/MenuItem.h
-Fl_Window_Type.o: ../fltk3/RoundButton.h ../fltk3/LightButton.h
-Fl_Window_Type.o: ../fltk3/Button.h Fl_Widget_Type.h Fl_Type.h
-Fl_Window_Type.o: ../fltk3/DoubleWindow.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-Fl_Window_Type.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/TabGroup.h
-Fl_Window_Type.o: ../fltk3/PackedGroup.h ../fltk3/Group.h
-Fl_Window_Type.o: ../fltk3/WizardGroup.h ../fltk3/Menu_.h
-Fl_Window_Type.o: ../fltk3/MenuButton.h ../fltk3/Menu_.h ../fltk3/Choice.h
-Fl_Window_Type.o: ../fltk3/InputChoice.h ../fltk3/Input.h ../fltk3/Input_.h
-Fl_Window_Type.o: ../fltk3/MenuBar.h undo.h alignment_panel.h
-Fl_Window_Type.o: ../fltk3/TextBuffer.h ../fltk3/TextDisplay.h
-Fl_Window_Type.o: ../fltk3/draw.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Window_Type.o: ../fltk3/Valuator.h ../fltk3/TextBuffer.h
-Fl_Window_Type.o: ../fltk3/filename.h ../fltk3/Tooltip.h ../fltk3/Button.h
-Fl_Window_Type.o: ../fltk3/Box.h ../fltk3/CheckButton.h ../fltk3/IntInput.h
-Fl_Window_Type.o: ../fltk3/Input.h ../fltk3/Spinner.h ../fltk3/RepeatButton.h
-Fl_Window_Type.o: ../fltk3/run.h ../fltk3/ReturnButton.h widget_panel.h
-Fl_Window_Type.o: ../fltk3/ValueInput.h ../fltk3/LightButton.h
-Fl_Window_Type.o: Shortcut_Button.h CodeEditor.h ../fltk3/TextEditor.h
-Fl_Window_Type.o: ../fltk3/TextDisplay.h ../src/flstring.h ../fltk3/Export.h
-Fl_Window_Type.o: ../config.h
-Fluid_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fluid_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fluid_Image.o: ../fltk3/Widget.h Fl_Type.h ../fltk3/DoubleWindow.h
-Fluid_Image.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fluid_Image.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-Fluid_Image.o: ../fltk3/Menu.h ../fltk3/MenuItem.h ../fltk3/Image.h
-Fluid_Image.o: ../fltk3/Plugin.h ../fltk3/Preferences.h Fluid_Image.h
-Fluid_Image.o: ../fltk3/SharedImage.h ../fltk3/draw.h ../fltk3/x.h
-Fluid_Image.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-Fluid_Image.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fluid_Image.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-Fluid_Image.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-Fluid_Image.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-Fluid_Image.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-Fluid_Image.o: ../fltk3/Input_.h ../fltk3/MenuBar.h ../src/flstring.h
-Fluid_Image.o: ../fltk3/Export.h ../config.h ../fltk3/filename.h
-Fluid_Image.o: ../fltk3/FileChooser.h ../fltk3/Button.h ../fltk3/TiledGroup.h
-Fluid_Image.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h ../fltk3/Browser_.h
-Fluid_Image.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fluid_Image.o: ../fltk3/FileIcon.h ../fltk3/run.h ../fltk3/filename.h
-Fluid_Image.o: ../fltk3/Box.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-Fluid_Image.o: ../fltk3/Button.h ../fltk3/FileInput.h ../fltk3/ReturnButton.h
-Fluid_Image.o: ../fltk3/ask.h
-about_panel.o: about_panel.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-about_panel.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-about_panel.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-about_panel.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-about_panel.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Box.h
-about_panel.o: ../fltk3/Button.h ../fltk3/ReturnButton.h ../fltk3/Button.h
-about_panel.o: ../fltk3/Pixmap.h ../fltk3/Image.h
-align_widget.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-align_widget.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-align_widget.o: ../fltk3/Window.h Fl_Widget_Type.h Fl_Type.h
-align_widget.o: ../fltk3/Widget.h ../fltk3/DoubleWindow.h ../fltk3/Window.h
-align_widget.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-align_widget.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Menu.h
-align_widget.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/Plugin.h
-align_widget.o: ../fltk3/Preferences.h Fluid_Image.h ../fltk3/SharedImage.h
-align_widget.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-align_widget.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Image.h
-align_widget.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-align_widget.o: ../fltk3/TabGroup.h ../fltk3/PackedGroup.h ../fltk3/Group.h
-align_widget.o: ../fltk3/WizardGroup.h ../fltk3/Menu_.h ../fltk3/MenuButton.h
-align_widget.o: ../fltk3/Menu_.h ../fltk3/Choice.h ../fltk3/InputChoice.h
-align_widget.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/MenuBar.h undo.h
-alignment_panel.o: alignment_panel.h ../fltk3/run.h ../fltk3/utf8.h
-alignment_panel.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-alignment_panel.o: ../fltk3/enumerations.h ../fltk3/TextBuffer.h
-alignment_panel.o: ../fltk3/TextDisplay.h ../fltk3/draw.h ../fltk3/x.h
-alignment_panel.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-alignment_panel.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-alignment_panel.o: ../fltk3/Widget.h ../fltk3/enumerations.h
-alignment_panel.o: ../fltk3/Window.h ../fltk3/Device.h ../fltk3/Object.h
-alignment_panel.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-alignment_panel.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-alignment_panel.o: ../fltk3/RGBImage.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-alignment_panel.o: ../fltk3/Valuator.h ../fltk3/TextBuffer.h
-alignment_panel.o: ../fltk3/filename.h ../fltk3/DoubleWindow.h
-alignment_panel.o: ../fltk3/Tooltip.h ../fltk3/Button.h ../fltk3/TabGroup.h
-alignment_panel.o: ../fltk3/Group.h ../fltk3/Box.h ../fltk3/Input.h
-alignment_panel.o: ../fltk3/Input_.h ../fltk3/CheckButton.h
-alignment_panel.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/Choice.h
-alignment_panel.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/IntInput.h
-alignment_panel.o: ../fltk3/Input.h ../fltk3/Spinner.h
-alignment_panel.o: ../fltk3/RepeatButton.h ../fltk3/run.h
-alignment_panel.o: ../fltk3/ReturnButton.h ../fltk3/RoundButton.h
-alignment_panel.o: ../fltk3/ask.h
-code.o: ../src/flstring.h ../fltk3/Export.h ../config.h ../fltk3/run.h
-code.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-code.o: ../fltk3/enumerations.h Fl_Type.h ../fltk3/Widget.h
-code.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-code.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-code.o: ../fltk3/Wrapper.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-code.o: ../fltk3/Image.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-code.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/draw.h ../fltk3/x.h
-code.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-code.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-code.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-code.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-code.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-code.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-code.o: ../fltk3/Input_.h ../fltk3/MenuBar.h alignment_panel.h
-code.o: ../fltk3/TextBuffer.h ../fltk3/TextDisplay.h ../fltk3/draw.h
-code.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-code.o: ../fltk3/TextBuffer.h ../fltk3/filename.h ../fltk3/Tooltip.h
-code.o: ../fltk3/Button.h ../fltk3/Box.h ../fltk3/CheckButton.h
-code.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/IntInput.h
-code.o: ../fltk3/Input.h ../fltk3/Spinner.h ../fltk3/RepeatButton.h
-code.o: ../fltk3/run.h ../fltk3/ReturnButton.h ../fltk3/RoundButton.h
-factory.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-factory.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Group.h
-factory.o: ../fltk3/MenuItem.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-factory.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Pixmap.h
-factory.o: ../fltk3/Tree.h ../fltk3/Scrollbar.h ../fltk3/draw.h ../fltk3/x.h
-factory.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-factory.o: ../fltk3/Widget.h ../fltk3/enumerations.h ../fltk3/Window.h
-factory.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-factory.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-factory.o: ../fltk3/RGBImage.h ../fltk3/TreeItem.h ../fltk3/TreeItemArray.h
-factory.o: ../fltk3/TreePrefs.h ../src/flstring.h ../fltk3/Export.h
-factory.o: ../config.h undo.h Fl_Widget_Type.h Fl_Type.h
-factory.o: ../fltk3/DoubleWindow.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-factory.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/TabGroup.h
-factory.o: ../fltk3/PackedGroup.h ../fltk3/WizardGroup.h ../fltk3/Menu_.h
-factory.o: ../fltk3/MenuButton.h ../fltk3/Menu_.h ../fltk3/Choice.h
-factory.o: ../fltk3/InputChoice.h ../fltk3/Input.h ../fltk3/Input_.h
-factory.o: ../fltk3/MenuBar.h ../fltk3/Box.h ../fltk3/Button.h
-factory.o: ../fltk3/ReturnButton.h ../fltk3/Button.h ../fltk3/RepeatButton.h
-factory.o: ../fltk3/run.h ../fltk3/LightButton.h ../fltk3/CheckButton.h
-factory.o: ../fltk3/LightButton.h ../fltk3/RoundButton.h ../fltk3/Browser.h
-factory.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-factory.o: ../fltk3/Valuator.h ../fltk3/CheckBrowser.h ../fltk3/FileBrowser.h
-factory.o: ../fltk3/Browser.h ../fltk3/FileIcon.h ../fltk3/filename.h
-factory.o: ../fltk3/Counter.h ../fltk3/Spinner.h ../fltk3/FileInput.h
-factory.o: ../fltk3/TextDisplay.h ../fltk3/draw.h ../fltk3/TextBuffer.h
-factory.o: ../fltk3/TextEditor.h ../fltk3/TextDisplay.h ../fltk3/Clock.h
-factory.o: ../fltk3/HelpView.h ../fltk3/SharedImage.h ../fltk3/Progress.h
-factory.o: ../fltk3/Adjuster.h ../fltk3/Dial.h ../fltk3/Roller.h
-factory.o: ../fltk3/Output.h ../fltk3/Input.h ../fltk3/ValueInput.h
-factory.o: ../fltk3/ValueOutput.h ../fltk3/ValueSlider.h
-factory.o: ../fltk3/MultiLabel.h
-file.o: ../src/flstring.h ../fltk3/Export.h ../config.h alignment_panel.h
-file.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-file.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/TextBuffer.h
-file.o: ../fltk3/TextDisplay.h ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-file.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-file.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-file.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-file.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-file.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-file.o: ../fltk3/RGBImage.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-file.o: ../fltk3/Valuator.h ../fltk3/TextBuffer.h ../fltk3/filename.h
-file.o: ../fltk3/DoubleWindow.h ../fltk3/Tooltip.h ../fltk3/Button.h
-file.o: ../fltk3/TabGroup.h ../fltk3/Group.h ../fltk3/Box.h ../fltk3/Input.h
-file.o: ../fltk3/Input_.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-file.o: ../fltk3/Button.h ../fltk3/Choice.h ../fltk3/Menu_.h
-file.o: ../fltk3/MenuItem.h ../fltk3/IntInput.h ../fltk3/Input.h
-file.o: ../fltk3/Spinner.h ../fltk3/RepeatButton.h ../fltk3/run.h
-file.o: ../fltk3/ReturnButton.h ../fltk3/RoundButton.h workspace_panel.h
-file.o: Fl_Type.h ../fltk3/Menu.h Fluid_Image.h ../fltk3/SharedImage.h
-file.o: ../fltk3/draw.h ../fltk3/PackedGroup.h ../fltk3/WizardGroup.h
-file.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/InputChoice.h
-file.o: ../fltk3/MenuBar.h ../fltk3/MultiLabel.h ../fltk3/FileChooser.h
-file.o: ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h ../fltk3/Browser.h
-file.o: ../fltk3/Browser_.h ../fltk3/FileIcon.h ../fltk3/filename.h
-file.o: ../fltk3/FileInput.h ../fltk3/ask.h ../fltk3/message.h ../fltk3/ask.h
+Fl_Type.o: pixmaps/flTable.xpm pixmaps/flAppTarget.xpm
+Fl_Type.o: pixmaps/flLibTarget.xpm pixmaps/flFile.xpm pixmaps/flFolder.xpm
+Fl_Type.o: pixmaps/flFluidFile.xpm pixmaps/flCodeFile.xpm
+Fl_Type.o: pixmaps/flMenuNone.xpm pixmaps/flMenuMulti.xpm
+Fl_Type.o: pixmaps/flMenuAll.xpm pixmaps/flWorkspace.xpm
+Fl_Type.o: pixmaps/flDependency.xpm pixmaps/flOption.xpm
+Fl_Widget_Type.o: Fl_Widget_Type.h Fl_Type.h Fluid_Image.h alignment_panel.h
+Fl_Widget_Type.o: widget_panel.h Shortcut_Button.h CodeEditor.h
+Fl_Window_Type.o: Fl_Widget_Type.h Fl_Type.h Fluid_Image.h undo.h
+Fl_Window_Type.o: alignment_panel.h widget_panel.h Shortcut_Button.h
+Fl_Window_Type.o: CodeEditor.h
+Fluid_Image.o: Fl_Type.h Fluid_Image.h
+about_panel.o: about_panel.h
+align_widget.o: Fl_Widget_Type.h Fl_Type.h Fluid_Image.h undo.h
+alignment_panel.o: alignment_panel.h
+code.o: Fl_Type.h Fluid_Image.h alignment_panel.h
+factory.o: undo.h Fl_Widget_Type.h Fl_Type.h Fluid_Image.h
+file.o: alignment_panel.h workspace_panel.h Fl_Type.h Fluid_Image.h
 file.o: Fl_Widget_Type.h
-file_cmake.o: Fl_Type.h ../fltk3/Widget.h ../fltk3/DoubleWindow.h
-file_cmake.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-file_cmake.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-file_cmake.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-file_cmake.o: ../fltk3/Menu.h ../fltk3/MenuItem.h ../fltk3/Image.h
-file_cmake.o: ../fltk3/Plugin.h ../fltk3/Preferences.h Fluid_Image.h
-file_cmake.o: ../fltk3/SharedImage.h ../fltk3/run.h ../fltk3/utf8.h
-file_cmake.o: ../fltk3/Xutf8.h ../fltk3/draw.h ../fltk3/x.h
-file_cmake.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-file_cmake.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-file_cmake.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-file_cmake.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-file_cmake.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-file_cmake.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-file_cmake.o: ../fltk3/Input_.h ../fltk3/MenuBar.h ../fltk3/filename.h
-file_make.o: Fl_Type.h ../fltk3/Widget.h ../fltk3/DoubleWindow.h
-file_make.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-file_make.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-file_make.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-file_make.o: ../fltk3/Menu.h ../fltk3/MenuItem.h ../fltk3/Image.h
-file_make.o: ../fltk3/Plugin.h ../fltk3/Preferences.h Fluid_Image.h
-file_make.o: ../fltk3/SharedImage.h ../fltk3/run.h ../fltk3/utf8.h
-file_make.o: ../fltk3/Xutf8.h ../fltk3/draw.h ../fltk3/x.h
-file_make.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-file_make.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-file_make.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-file_make.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-file_make.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-file_make.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-file_make.o: ../fltk3/Input_.h ../fltk3/MenuBar.h ../fltk3/filename.h
-file_visualc.o: Fl_Type.h ../fltk3/Widget.h ../fltk3/DoubleWindow.h
-file_visualc.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-file_visualc.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-file_visualc.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-file_visualc.o: ../fltk3/Menu.h ../fltk3/MenuItem.h ../fltk3/Image.h
-file_visualc.o: ../fltk3/Plugin.h ../fltk3/Preferences.h Fluid_Image.h
-file_visualc.o: ../fltk3/SharedImage.h ../fltk3/run.h ../fltk3/utf8.h
-file_visualc.o: ../fltk3/Xutf8.h ../fltk3/draw.h ../fltk3/x.h
-file_visualc.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-file_visualc.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-file_visualc.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-file_visualc.o: ../fltk3/PackedGroup.h ../fltk3/Group.h
-file_visualc.o: ../fltk3/WizardGroup.h ../fltk3/Menu_.h ../fltk3/MenuButton.h
-file_visualc.o: ../fltk3/Menu_.h ../fltk3/Choice.h ../fltk3/InputChoice.h
-file_visualc.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/MenuBar.h
-file_visualc.o: ../fltk3/filename.h
-file_xcode.o: Fl_Type.h ../fltk3/Widget.h ../fltk3/DoubleWindow.h
-file_xcode.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-file_xcode.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-file_xcode.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-file_xcode.o: ../fltk3/Menu.h ../fltk3/MenuItem.h ../fltk3/Image.h
-file_xcode.o: ../fltk3/Plugin.h ../fltk3/Preferences.h Fluid_Image.h
-file_xcode.o: ../fltk3/SharedImage.h ../fltk3/run.h ../fltk3/utf8.h
-file_xcode.o: ../fltk3/Xutf8.h ../fltk3/draw.h ../fltk3/x.h
-file_xcode.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-file_xcode.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-file_xcode.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-file_xcode.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-file_xcode.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-file_xcode.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-file_xcode.o: ../fltk3/Input_.h ../fltk3/MenuBar.h ../fltk3/filename.h
-fluid.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-fluid.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-fluid.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fluid.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-fluid.o: ../fltk3/Widget.h ../fltk3/Box.h ../fltk3/Button.h
-fluid.o: ../fltk3/FileIcon.h ../fltk3/run.h ../fltk3/HelpDialog.h
-fluid.o: ../fltk3/Group.h ../fltk3/Input.h ../fltk3/Input_.h
-fluid.o: ../fltk3/HelpView.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-fluid.o: ../fltk3/Valuator.h ../fltk3/draw.h ../fltk3/x.h
-fluid.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-fluid.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fluid.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fluid.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/SharedImage.h
-fluid.o: ../fltk3/filename.h ../fltk3/HoldBrowser.h ../fltk3/Browser.h
-fluid.o: ../fltk3/Browser_.h ../fltk3/MenuBar.h ../fltk3/Menu_.h
-fluid.o: ../fltk3/MenuItem.h ../fltk3/ask.h ../fltk3/draw.h
-fluid.o: ../fltk3/FileChooser.h ../fltk3/Choice.h ../fltk3/MenuButton.h
-fluid.o: ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h ../fltk3/FileIcon.h
-fluid.o: ../fltk3/CheckButton.h ../fltk3/LightButton.h ../fltk3/Button.h
-fluid.o: ../fltk3/FileInput.h ../fltk3/ReturnButton.h ../fltk3/PNGImage.h
-fluid.o: ../fltk3/Printer.h ../fltk3/PagedDevice.h ../fltk3/PostScript.h
-fluid.o: ../fltk3/message.h ../fltk3/ask.h ../fltk3/filename.h
-fluid.o: ../src/flstring.h ../fltk3/Export.h ../config.h alignment_panel.h
-fluid.o: ../fltk3/TextBuffer.h ../fltk3/TextDisplay.h ../fltk3/TextBuffer.h
-fluid.o: ../fltk3/Tooltip.h ../fltk3/TabGroup.h ../fltk3/IntInput.h
-fluid.o: ../fltk3/Input.h ../fltk3/Spinner.h ../fltk3/RepeatButton.h
-fluid.o: ../fltk3/RoundButton.h function_panel.h ../fltk3/LightButton.h
-fluid.o: ../fltk3/TextEditor.h ../fltk3/TextDisplay.h CodeEditor.h
-fluid.o: template_panel.h ../fltk3/Browser.h workspace_panel.h Fl_Type.h
-fluid.o: ../fltk3/Menu.h Fluid_Image.h ../fltk3/SharedImage.h
-fluid.o: ../fltk3/PackedGroup.h ../fltk3/WizardGroup.h ../fltk3/Menu_.h
-fluid.o: ../fltk3/InputChoice.h ../fltk3/MultiLabel.h about_panel.h undo.h
-function_panel.o: function_panel.h ../fltk3/run.h ../fltk3/utf8.h
-function_panel.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-function_panel.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-function_panel.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-function_panel.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-function_panel.o: ../fltk3/Widget.h ../fltk3/Group.h ../fltk3/Choice.h
-function_panel.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-function_panel.o: ../fltk3/LightButton.h ../fltk3/Box.h ../fltk3/Input.h
-function_panel.o: ../fltk3/Input_.h ../fltk3/ReturnButton.h ../fltk3/Button.h
-function_panel.o: ../fltk3/Button.h ../fltk3/TextEditor.h
-function_panel.o: ../fltk3/TextDisplay.h ../fltk3/draw.h ../fltk3/x.h
-function_panel.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-function_panel.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-function_panel.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-function_panel.o: ../fltk3/RGBImage.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-function_panel.o: ../fltk3/Valuator.h ../fltk3/TextBuffer.h CodeEditor.h
-function_panel.o: ../fltk3/TextBuffer.h ../fltk3/MenuButton.h
-function_panel.o: ../fltk3/TabGroup.h Fl_Type.h ../fltk3/Menu.h Fluid_Image.h
-function_panel.o: ../fltk3/SharedImage.h ../fltk3/draw.h
-function_panel.o: ../fltk3/PackedGroup.h ../fltk3/WizardGroup.h
-function_panel.o: ../fltk3/Menu_.h ../fltk3/InputChoice.h ../fltk3/MenuBar.h
+file_cmake.o: Fl_Type.h Fluid_Image.h
+file_make.o: Fl_Type.h Fluid_Image.h
+file_visualc_6.o: Fl_Type.h Fluid_Image.h
+file_visualc_2008.o: Fl_Type.h Fluid_Image.h
+file_visualc_2010.o: Fl_Type.h Fluid_Image.h
+file_xcode.o: Fl_Type.h Fluid_Image.h
+fluid.o: alignment_panel.h function_panel.h CodeEditor.h template_panel.h
+fluid.o: workspace_panel.h Fl_Type.h Fluid_Image.h about_panel.h undo.h
+function_panel.o: function_panel.h CodeEditor.h Fl_Type.h Fluid_Image.h
 function_panel.o: undo.h
-template_panel.o: template_panel.h ../fltk3/run.h ../fltk3/utf8.h
-template_panel.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-template_panel.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-template_panel.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-template_panel.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-template_panel.o: ../fltk3/Widget.h ../fltk3/Browser.h ../fltk3/Browser_.h
-template_panel.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-template_panel.o: ../fltk3/Image.h ../fltk3/Box.h ../fltk3/Input.h
-template_panel.o: ../fltk3/Input_.h ../fltk3/Group.h ../fltk3/Button.h
-template_panel.o: ../fltk3/ReturnButton.h ../fltk3/Button.h ../src/flstring.h
-template_panel.o: ../fltk3/Export.h ../config.h ../fltk3/filename.h
-template_panel.o: ../fltk3/ask.h ../fltk3/SharedImage.h
-template_panel.o: ../fltk3/Preferences.h
-undo.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-undo.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h Fl_Type.h ../fltk3/Widget.h
-undo.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-undo.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-undo.o: ../fltk3/Wrapper.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-undo.o: ../fltk3/Image.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-undo.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/draw.h ../fltk3/x.h
-undo.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-undo.o: ../fltk3/Object.h ../fltk3/Image.h ../fltk3/Bitmap.h
-undo.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TabGroup.h
-undo.o: ../fltk3/PackedGroup.h ../fltk3/Group.h ../fltk3/WizardGroup.h
-undo.o: ../fltk3/Menu_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-undo.o: ../fltk3/Choice.h ../fltk3/InputChoice.h ../fltk3/Input.h
-undo.o: ../fltk3/Input_.h ../fltk3/MenuBar.h undo.h ../fltk3/filename.h
-undo.o: ../src/flstring.h ../fltk3/Export.h ../config.h
-widget_panel.o: widget_panel.h ../fltk3/run.h ../fltk3/utf8.h
-widget_panel.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-widget_panel.o: ../fltk3/enumerations.h Fl_Type.h ../fltk3/Widget.h
-widget_panel.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-widget_panel.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-widget_panel.o: ../fltk3/Wrapper.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-widget_panel.o: ../fltk3/Image.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-widget_panel.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/draw.h
-widget_panel.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-widget_panel.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Image.h
-widget_panel.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-widget_panel.o: ../fltk3/TabGroup.h ../fltk3/PackedGroup.h ../fltk3/Group.h
-widget_panel.o: ../fltk3/WizardGroup.h ../fltk3/Menu_.h ../fltk3/MenuButton.h
-widget_panel.o: ../fltk3/Menu_.h ../fltk3/Choice.h ../fltk3/InputChoice.h
-widget_panel.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/MenuBar.h
-widget_panel.o: ../fltk3/Button.h ../fltk3/Box.h ../fltk3/ValueInput.h
-widget_panel.o: ../fltk3/Valuator.h ../fltk3/Input.h ../fltk3/LightButton.h
-widget_panel.o: Shortcut_Button.h CodeEditor.h ../fltk3/TextBuffer.h
-widget_panel.o: ../fltk3/TextEditor.h ../fltk3/TextDisplay.h ../fltk3/draw.h
-widget_panel.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/TextBuffer.h
-widget_panel.o: ../fltk3/ReturnButton.h ../fltk3/Button.h
-workspace_panel.o: workspace_panel.h ../fltk3/run.h ../fltk3/utf8.h
-workspace_panel.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-workspace_panel.o: ../fltk3/enumerations.h Fl_Type.h ../fltk3/Widget.h
-workspace_panel.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-workspace_panel.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-workspace_panel.o: ../fltk3/Wrapper.h ../fltk3/Menu.h ../fltk3/MenuItem.h
-workspace_panel.o: ../fltk3/Image.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-workspace_panel.o: Fluid_Image.h ../fltk3/SharedImage.h ../fltk3/draw.h
-workspace_panel.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-workspace_panel.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Image.h
-workspace_panel.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-workspace_panel.o: ../fltk3/TabGroup.h ../fltk3/PackedGroup.h
-workspace_panel.o: ../fltk3/Group.h ../fltk3/WizardGroup.h ../fltk3/Menu_.h
-workspace_panel.o: ../fltk3/MenuButton.h ../fltk3/Menu_.h ../fltk3/Choice.h
-workspace_panel.o: ../fltk3/InputChoice.h ../fltk3/Input.h ../fltk3/Input_.h
-workspace_panel.o: ../fltk3/MenuBar.h ../fltk3/MultiLabel.h ../fltk3/Box.h
-workspace_panel.o: ../fltk3/Button.h ../fltk3/ReturnButton.h
-workspace_panel.o: ../fltk3/Button.h
+template_panel.o: template_panel.h
+undo.o: Fl_Type.h Fluid_Image.h undo.h
+widget_panel.o: widget_panel.h Fl_Type.h Fluid_Image.h Shortcut_Button.h
+widget_panel.o: CodeEditor.h
+workspace_panel.o: workspace_panel.h Fl_Type.h Fluid_Image.h

Modified: branches/branch-3.0/fluid/template_panel.cxx
===================================================================
--- branches/branch-3.0/fluid/template_panel.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/template_panel.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -30,7 +30,7 @@
 #include "template_panel.h"
 #include <stdio.h>
 #include <stdlib.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <errno.h>
 #include <fltk3/filename.h>
 #include <fltk3/ask.h>

Modified: branches/branch-3.0/fluid/undo.cxx
===================================================================
--- branches/branch-3.0/fluid/undo.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/fluid/undo.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -30,7 +30,7 @@
 #include "undo.h"
 #include <fltk3/Preferences.h>
 #include <fltk3/filename.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #if defined(WIN32) && !defined(__CYGWIN__)
 #  include <io.h>
 #  include <windows.h>

Deleted: branches/branch-3.0/ide/VisualC2008/fltk.vcproj

Copied: branches/branch-3.0/ide/VisualC2008/fltk3.vcproj (from rev 8989, branches/branch-3.0/ide/VisualC2008/fltk.vcproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2008/fltk3.vcproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2008/fltk3.vcproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,3616 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="fltk"
+	ProjectGUID="{57369729-6B61-4DCD-9289-79E0E2A168E8}"
+	RootNamespace="fltk"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_debug\fltk.pch"
+				AssemblerListingLocation=".\fltk_debug\"
+				ObjectFile=".\fltk_debug\"
+				ProgramDataBaseFileName=".\fltk_debug\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltkd.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_release\fltk.pch"
+				AssemblerListingLocation=".\fltk_release\"
+				ObjectFile=".\fltk_release\"
+				ProgramDataBaseFileName=".\fltk_release\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\src\Fl.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Adjuster.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Bitmap.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Box.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Browser.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Browser_.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Browser_load.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Chart.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Check_Browser.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Check_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Choice.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Clock.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Color_Chooser.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Counter.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Device.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Dial.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Double_Window.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_File_Browser.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_File_Chooser.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_File_Chooser2.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_File_Icon.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_File_Input.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Group.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Help_View.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Input.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Input_.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Light_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu_.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu_Bar.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu_Window.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu_add.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Menu_global.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Multi_Label.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Native_File_Chooser.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Overlay_Window.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Pack.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Paged_Device.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Pixmap.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Positioner.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Printer.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Preferences.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Progress.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Repeat_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Return_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Roller.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Round_Button.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Scroll.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Scrollbar.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Shared_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Single_Window.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Slider.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Style.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Sys_Menu_Bar.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Table.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Table_Row.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tabs.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Text_Buffer.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Text_Display.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Text_Editor.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tile.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tiled_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tooltip.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tree.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tree_Item.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tree_Item_Array.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Tree_Prefs.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Valuator.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Value_Input.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Value_Output.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Value_Slider.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Widget.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Window.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Window_fullscreen.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Window_hotspot.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Window_iconize.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Wizard.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_XBM_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_XPM_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_abort.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_add_idle.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_arg.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_compose.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_display.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_get_key.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_get_system_colors.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_grab.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_lock.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_own_colormap.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_visual.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_x.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_absolute.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_expand.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_ext.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_isdir.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_list.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_match.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\filename_setext.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_arc.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_arci.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_ask.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_boxtype.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_call_main.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_color.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_cursor.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_curve.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_diamond_box.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_dnd.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_draw.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_draw_image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_draw_pixmap.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_encoding_latin1.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_encoding_mac_roman.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_engraved_label.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_file_dir.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_font.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_gtk.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_labeltype.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_line_style.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_open_uri.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_oval_box.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_overlay.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_overlay_visual.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_plastic.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_read_image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_rect.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_round_box.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_rounded_box.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_scroll_area.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_set_font.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_set_fonts.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_shadow_box.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_shortcut.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_show_colormap.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_symbols.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_utf8.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_utf.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_vertex.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\numericsort.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\ps_image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\scandir.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\screen_xywh.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\flstring.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\vsnprintf.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\xutf8\case.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\xutf8\is_right2left.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\xutf8\is_spacing.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Copied: branches/branch-3.0/ide/VisualC2008/fltk3gl.vcproj (from rev 8988, branches/branch-3.0/ide/VisualC2008/fltk_gl.vcproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2008/fltk3gl.vcproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2008/fltk3gl.vcproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="fltk_gl"
+	ProjectGUID="{F0B23DD8-B4C3-4DB7-A879-3250CFAC686B}"
+	RootNamespace="fltk_gl"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_gl_debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_gl_debug\fltk_gl.pch"
+				AssemblerListingLocation=".\fltk_gl_debug\"
+				ObjectFile=".\fltk_gl_debug\"
+				ProgramDataBaseFileName=".\fltk_gl_debug\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_gld.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_gl_release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_gl_release\fltk_gl.pch"
+				AssemblerListingLocation=".\fltk_gl_release\"
+				ObjectFile=".\fltk_gl_release\"
+				ProgramDataBaseFileName=".\fltk_gl_release\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_gl.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\src\Fl_Gl_Choice.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Gl_Device_Plugin.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Gl_Overlay.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Gl_Window.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\freeglut_geometry.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\freeglut_stroke_mono_roman.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\freeglut_stroke_roman.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\freeglut_teapot.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\gl_draw.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\glut_compatability.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\glut_font.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Copied: branches/branch-3.0/ide/VisualC2008/fltk3images.vcproj (from rev 8988, branches/branch-3.0/ide/VisualC2008/fltk_images.vcproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2008/fltk3images.vcproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2008/fltk3images.vcproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="fltk_images"
+	ProjectGUID="{9BDDFD0A-6B25-4532-8AAF-897D526A845D}"
+	RootNamespace="fltk_images"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_images_debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_images_debug\fltk_images.pch"
+				AssemblerListingLocation=".\fltk_images_debug\"
+				ObjectFile=".\fltk_images_debug\"
+				ProgramDataBaseFileName=".\fltk_images_debug\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_imagesd.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_images_release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_images_release\fltk_images.pch"
+				AssemblerListingLocation=".\fltk_images_release\"
+				ObjectFile=".\fltk_images_release\"
+				ProgramDataBaseFileName=".\fltk_images_release\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_images.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\src\Fl_BMP_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_File_Icon2.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_GIF_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_Help_Dialog.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_JPEG_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_PNG_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\Fl_PNM_Image.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\src\fl_images_core.cxx"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Copied: branches/branch-3.0/ide/VisualC2008/fltk3jpeg.vcproj (from rev 8988, branches/branch-3.0/ide/VisualC2008/fltk_jpeg.vcproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2008/fltk3jpeg.vcproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2008/fltk3jpeg.vcproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1224 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="fltk_jpeg"
+	ProjectGUID="{417DB0F9-647A-4A36-ADFF-4196F7C1963D}"
+	RootNamespace="fltk_jpeg"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_jpeg_debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_jpeg_debug\fltk_jpeg.pch"
+				AssemblerListingLocation=".\fltk_jpeg_debug\"
+				ObjectFile=".\fltk_jpeg_debug\"
+				ProgramDataBaseFileName=".\fltk_jpeg_debug\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_jpegd.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_jpeg_release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_jpeg_release\fltk_jpeg.pch"
+				AssemblerListingLocation=".\fltk_jpeg_release\"
+				ObjectFile=".\fltk_jpeg_release\"
+				ProgramDataBaseFileName=".\fltk_jpeg_release\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_jpeg.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\jpeg\jaricom.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcarith.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdarith.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcapimin.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcapistd.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jccoefct.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jccolor.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcdctmgr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jchuff.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcinit.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcmainct.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcmarker.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcmaster.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcomapi.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcparam.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcprepct.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jcsample.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jctrans.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdapimin.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdapistd.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdatadst.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdatasrc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdcoefct.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdcolor.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jddctmgr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdhuff.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdinput.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdmainct.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdmarker.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdmaster.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdmerge.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdpostct.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdsample.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jdtrans.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jerror.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jfdctflt.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jfdctfst.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jfdctint.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jidctflt.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jidctfst.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jidctint.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jmemmgr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jmemnobs.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jquant1.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jquant2.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\jpeg\jutils.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Copied: branches/branch-3.0/ide/VisualC2008/fltk3png.vcproj (from rev 8988, branches/branch-3.0/ide/VisualC2008/fltk_png.vcproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2008/fltk3png.vcproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2008/fltk3png.vcproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,511 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="fltk_png"
+	ProjectGUID="{AF7CC2D4-BBC7-4995-B18D-6A590C267527}"
+	RootNamespace="fltk_png"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_png_debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_png_debug\fltk_png.pch"
+				AssemblerListingLocation=".\fltk_png_debug\"
+				ObjectFile=".\fltk_png_debug\"
+				ProgramDataBaseFileName=".\fltk_png_debug\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_pngd.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_png_release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_png_release\fltk_png.pch"
+				AssemblerListingLocation=".\fltk_png_release\"
+				ObjectFile=".\fltk_png_release\"
+				ProgramDataBaseFileName=".\fltk_png_release\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_png.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\png\png.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngerror.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngget.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngmem.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngpread.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngread.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngrio.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngrtran.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngrutil.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngset.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngtrans.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngwio.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngwrite.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngwtran.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\png\pngwutil.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Copied: branches/branch-3.0/ide/VisualC2008/fltk3zlib.vcproj (from rev 8988, branches/branch-3.0/ide/VisualC2008/fltk_zlib.vcproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2008/fltk3zlib.vcproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2008/fltk3zlib.vcproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,511 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="fltk_zlib"
+	ProjectGUID="{2F487ADB-AB3A-44B1-A824-D25C00A2D30A}"
+	RootNamespace="fltk_zlib"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_zlib_debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_zlib_debug\fltk_zlib.pch"
+				AssemblerListingLocation=".\fltk_zlib_debug\"
+				ObjectFile=".\fltk_zlib_debug\"
+				ProgramDataBaseFileName=".\fltk_zlib_debug\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_zlibd.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\lib"
+			IntermediateDirectory=".\fltk_zlib_release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories=".;..\..;..\..\zlib;..\..\png;..\..\jpeg"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\fltk_zlib_release\fltk_zlib.pch"
+				AssemblerListingLocation=".\fltk_zlib_release\"
+				ObjectFile=".\fltk_zlib_release\"
+				ProgramDataBaseFileName=".\fltk_zlib_release\"
+				BrowseInformation="1"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\..\lib\fltk_zlib.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\zlib\adler32.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\compress.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\crc32.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\deflate.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\gzclose.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\gzlib.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\gzread.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\gzwrite.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\infback.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\inffast.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\inflate.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\inftrees.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\trees.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\uncompr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\zlib\zutil.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Deleted: branches/branch-3.0/ide/VisualC2008/fltk_gl.vcproj

Deleted: branches/branch-3.0/ide/VisualC2008/fltk_images.vcproj

Deleted: branches/branch-3.0/ide/VisualC2008/fltk_jpeg.vcproj

Deleted: branches/branch-3.0/ide/VisualC2008/fltk_png.vcproj

Deleted: branches/branch-3.0/ide/VisualC2008/fltk_zlib.vcproj

Deleted: branches/branch-3.0/ide/VisualC2010/fltk.vcxproj

Copied: branches/branch-3.0/ide/VisualC2010/fltk3.vcxproj (from rev 8989, branches/branch-3.0/ide/VisualC2010/fltk.vcxproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2010/fltk3.vcxproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2010/fltk3.vcxproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>fltk</ProjectName>
+    <ProjectGuid>{E070AAFC-9D03-41A3-BC7D-30887EA0D50F}</ProjectGuid>
+    <RootNamespace>fltk</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(ProjectName)_debug\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(ProjectName)_release\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltkd.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\Fl.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Adjuster.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Bitmap.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Box.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Browser.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Browser_.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Browser_load.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Chart.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Check_Browser.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Check_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Choice.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Clock.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Color_Chooser.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Counter.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Device.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Dial.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Double_Window.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_File_Browser.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_File_Chooser.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_File_Chooser2.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_File_Icon.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_File_Input.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Group.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Help_View.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Input.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Input_.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Light_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu_.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu_Bar.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu_Window.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu_add.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Menu_global.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Multi_Label.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Native_File_Chooser.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Overlay_Window.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Pack.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Paged_Device.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Pixmap.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Positioner.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Printer.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Preferences.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Progress.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Repeat_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Return_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Roller.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Round_Button.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Scroll.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Scrollbar.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Shared_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Single_Window.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Slider.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Style.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Sys_Menu_Bar.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Table.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Table_Row.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tabs.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Text_Buffer.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Text_Display.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Text_Editor.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tile.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tiled_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tooltip.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tree.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tree_Item.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tree_Item_Array.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Tree_Prefs.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Valuator.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Value_Input.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Value_Output.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Value_Slider.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Widget.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Window.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Window_fullscreen.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Window_hotspot.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Window_iconize.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Wizard.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_XBM_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_XPM_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_abort.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_add_idle.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_arg.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_compose.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_display.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_get_key.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_get_system_colors.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_grab.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_lock.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_own_colormap.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_visual.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_x.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_absolute.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_expand.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_ext.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_isdir.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_list.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_match.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\filename_setext.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_arc.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_arci.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_ask.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_boxtype.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_call_main.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_color.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_cursor.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_curve.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_diamond_box.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_dnd.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_draw.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_draw_image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_draw_pixmap.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_encoding_latin1.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_encoding_mac_roman.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_engraved_label.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_file_dir.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_font.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_gtk.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_labeltype.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_line_style.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_open_uri.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_oval_box.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_overlay.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_overlay_visual.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_plastic.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_read_image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_rect.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_round_box.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_rounded_box.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_scroll_area.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_set_font.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_set_fonts.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_shadow_box.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_shortcut.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_show_colormap.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_symbols.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_utf8.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_utf.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_vertex.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\numericsort.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\ps_image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\scandir.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\screen_xywh.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\flstring.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\vsnprintf.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\xutf8\case.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\xutf8\is_right2left.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\xutf8\is_spacing.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Copied: branches/branch-3.0/ide/VisualC2010/fltk3gl.vcxproj (from rev 8988, branches/branch-3.0/ide/VisualC2010/fltk_gl.vcxproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2010/fltk3gl.vcxproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2010/fltk3gl.vcxproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>fltk_gl</ProjectName>
+    <ProjectGuid>{42E7DB4F-8A12-431D-B651-4FADDD74F327}</ProjectGuid>
+    <RootNamespace>fltk_gl</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(ProjectName)_debug\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(ProjectName)_release\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_gld.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_gl.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\Fl_Gl_Choice.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Gl_Device_Plugin.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Gl_Overlay.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Gl_Window.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\freeglut_geometry.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\freeglut_stroke_mono_roman.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\freeglut_stroke_roman.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\freeglut_teapot.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\gl_draw.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\glut_compatability.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\glut_font.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="fltk.vcxproj">
+      <Project>{E070AAFC-9D03-41A3-BC7D-30887EA0D50F}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Copied: branches/branch-3.0/ide/VisualC2010/fltk3images.vcxproj (from rev 8988, branches/branch-3.0/ide/VisualC2010/fltk_images.vcxproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2010/fltk3images.vcxproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2010/fltk3images.vcxproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>fltk_images</ProjectName>
+    <ProjectGuid>{4527AC02-4EB6-41C9-8ECA-819F7725A9BF}</ProjectGuid>
+    <RootNamespace>fltk_images</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(ProjectName)_debug\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(ProjectName)_release\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_imagesd.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_images.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\Fl_BMP_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_File_Icon2.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_GIF_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_Help_Dialog.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_JPEG_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_PNG_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\Fl_PNM_Image.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\src\fl_images_core.cxx">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="fltk.vcxproj">
+      <Project>{E070AAFC-9D03-41A3-BC7D-30887EA0D50F}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="fltk_png.vcxproj">
+      <Project>{A6556097-732F-4D5C-9763-96A896DA0F8F}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="fltk_jpeg.vcxproj">
+      <Project>{845449C0-BCC9-4404-89DC-52E53E80F8D0}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Copied: branches/branch-3.0/ide/VisualC2010/fltk3jpeg.vcxproj (from rev 8988, branches/branch-3.0/ide/VisualC2010/fltk_jpeg.vcxproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2010/fltk3jpeg.vcxproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2010/fltk3jpeg.vcxproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,428 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>fltk_jpeg</ProjectName>
+    <ProjectGuid>{845449C0-BCC9-4404-89DC-52E53E80F8D0}</ProjectGuid>
+    <RootNamespace>fltk_jpeg</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(ProjectName)_debug\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(ProjectName)_release\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_jpegd.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_jpeg.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\jpeg\jaricom.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcarith.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdarith.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcapimin.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcapistd.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jccoefct.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jccolor.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcdctmgr.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jchuff.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcinit.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcmainct.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcmarker.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcmaster.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcomapi.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcparam.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcprepct.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jcsample.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jctrans.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdapimin.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdapistd.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdatadst.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdatasrc.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdcoefct.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdcolor.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jddctmgr.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdhuff.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdinput.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdmainct.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdmarker.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdmaster.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdmerge.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdpostct.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdsample.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jdtrans.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jerror.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jfdctflt.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jfdctfst.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jfdctint.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jidctflt.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jidctfst.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jidctint.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jmemmgr.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jmemnobs.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jquant1.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jquant2.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\jpeg\jutils.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="fltk.vcxproj">
+      <Project>{E070AAFC-9D03-41A3-BC7D-30887EA0D50F}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Copied: branches/branch-3.0/ide/VisualC2010/fltk3png.vcxproj (from rev 8988, branches/branch-3.0/ide/VisualC2010/fltk_png.vcxproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2010/fltk3png.vcxproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2010/fltk3png.vcxproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>fltk_png</ProjectName>
+    <ProjectGuid>{A6556097-732F-4D5C-9763-96A896DA0F8F}</ProjectGuid>
+    <RootNamespace>fltk_png</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(ProjectName)_debug\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(ProjectName)_release\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_pngd.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_png.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\png\png.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngerror.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngget.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngmem.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngpread.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngread.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngrio.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngrtran.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngrutil.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngset.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngtrans.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngwio.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngwrite.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngwtran.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\png\pngwutil.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="fltk.vcxproj">
+      <Project>{E070AAFC-9D03-41A3-BC7D-30887EA0D50F}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="fltk_zlib.vcxproj">
+      <Project>{8051E81E-8228-43EA-AABA-FE4E48CB10AD}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Copied: branches/branch-3.0/ide/VisualC2010/fltk3zlib.vcxproj (from rev 8988, branches/branch-3.0/ide/VisualC2010/fltk_zlib.vcxproj)
===================================================================
--- branches/branch-3.0/ide/VisualC2010/fltk3zlib.vcxproj	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC2010/fltk3zlib.vcxproj	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>fltk_zlib</ProjectName>
+    <ProjectGuid>{8051E81E-8228-43EA-AABA-FE4E48CB10AD}</ProjectGuid>
+    <RootNamespace>fltk_zlib</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(ProjectName)_debug\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\lib\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(ProjectName)_release\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_zlibd.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+      <AdditionalIncludeDirectories>.;..\..\zlib;..\..\png;..\..\jpeg;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;FL_LIBRARY;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+<BrowseInformation>true</BrowseInformation>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Lib>
+    <OutputFile>..\..\lib\fltk_zlib.lib</OutputFile>
+    <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\zlib\adler32.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\compress.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\crc32.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\deflate.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\gzclose.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\gzlib.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\gzread.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\gzwrite.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\infback.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\inffast.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\inflate.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\inftrees.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\trees.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\uncompr.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\zlib\zutil.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="fltk.vcxproj">
+      <Project>{E070AAFC-9D03-41A3-BC7D-30887EA0D50F}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Deleted: branches/branch-3.0/ide/VisualC2010/fltk_gl.vcxproj

Deleted: branches/branch-3.0/ide/VisualC2010/fltk_images.vcxproj

Deleted: branches/branch-3.0/ide/VisualC2010/fltk_jpeg.vcxproj

Deleted: branches/branch-3.0/ide/VisualC2010/fltk_png.vcxproj

Deleted: branches/branch-3.0/ide/VisualC2010/fltk_zlib.vcxproj

Deleted: branches/branch-3.0/ide/VisualC6/fltk.dsp

Copied: branches/branch-3.0/ide/VisualC6/fltk3.dsp (from rev 8989, branches/branch-3.0/ide/VisualC6/fltk.dsp)
===================================================================
--- branches/branch-3.0/ide/VisualC6/fltk3.dsp	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC6/fltk3.dsp	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,685 @@
+# Microsoft Developer Studio Project File - Name="fltk" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=fltk - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk.mak" CFG="fltk - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "fltk - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "fltk - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "fltk - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release\fltk"
+# PROP BASE Intermediate_Dir "Release\fltk"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release\fltk"
+# PROP Intermediate_Dir "Release\fltk"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
+# SUBTRACT CPP /Os
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk.lib"
+
+!ELSEIF  "$(CFG)" == "fltk - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug\fltk"
+# PROP BASE Intermediate_Dir "Debug\fltk"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug\fltk"
+# PROP Intermediate_Dir "Debug\fltk"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltkd.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "fltk - Win32 Release"
+# Name "fltk - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\src\Fl.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Adjuster.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Bitmap.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Box.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Browser.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Browser_.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Browser_load.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Chart.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Check_Browser.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Check_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Choice.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Clock.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Color_Chooser.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Counter.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Device.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Dial.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Double_Window.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_File_Browser.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_File_Chooser.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_File_Chooser2.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_File_Icon.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_File_Input.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Group.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Help_View.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Input.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Input_.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Light_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu_.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu_Bar.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu_Window.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu_add.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Menu_global.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Multi_Label.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Native_File_Chooser.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Overlay_Window.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Pack.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Paged_Device.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Pixmap.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Positioner.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Printer.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Preferences.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Progress.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Repeat_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Return_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Roller.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Round_Button.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Scroll.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Scrollbar.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Shared_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Single_Window.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Slider.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Style.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Sys_Menu_Bar.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Table.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Table_Row.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tabs.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Text_Buffer.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Text_Display.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Text_Editor.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tile.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tiled_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tooltip.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tree.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tree_Item.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tree_Item_Array.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Tree_Prefs.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Valuator.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Value_Input.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Value_Output.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Value_Slider.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Widget.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Window.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Window_fullscreen.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Window_hotspot.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Window_iconize.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Wizard.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_XBM_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_XPM_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_abort.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_add_idle.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_arg.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_compose.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_display.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_get_key.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_get_system_colors.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_grab.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_lock.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_own_colormap.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_visual.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_x.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_absolute.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_expand.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_ext.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_isdir.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_list.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_match.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\filename_setext.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_arc.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_arci.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_ask.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_boxtype.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_call_main.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_color.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_cursor.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_curve.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_diamond_box.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_dnd.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_draw.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_draw_image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_draw_pixmap.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_encoding_latin1.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_encoding_mac_roman.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_engraved_label.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_file_dir.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_font.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_gtk.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_labeltype.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_line_style.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_open_uri.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_oval_box.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_overlay.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_overlay_visual.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_plastic.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_read_image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_rect.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_round_box.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_rounded_box.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_scroll_area.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_set_font.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_set_fonts.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_shadow_box.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_shortcut.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_show_colormap.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_symbols.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_utf8.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_utf.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_vertex.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\numericsort.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\ps_image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\scandir.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\screen_xywh.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\flstring.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\vsnprintf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\xutf8\case.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\xutf8\is_right2left.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\xutf8\is_spacing.c
+# End Source File
+# End Target
+# End Project

Copied: branches/branch-3.0/ide/VisualC6/fltk3gl.dsp (from rev 8988, branches/branch-3.0/ide/VisualC6/fltk_gl.dsp)
===================================================================
--- branches/branch-3.0/ide/VisualC6/fltk3gl.dsp	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC6/fltk3gl.dsp	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,129 @@
+# Microsoft Developer Studio Project File - Name="fltk_gl" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=fltk_gl - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_gl.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_gl.mak" CFG="fltk_gl - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "fltk_gl - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "fltk_gl - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "fltk_gl - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release\fltk_gl"
+# PROP BASE Intermediate_Dir "Release\fltk_gl"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release\fltk_gl"
+# PROP Intermediate_Dir "Release\fltk_gl"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
+# SUBTRACT CPP /Os
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_gl.lib"
+
+!ELSEIF  "$(CFG)" == "fltk_gl - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug\fltk_gl"
+# PROP BASE Intermediate_Dir "Debug\fltk_gl"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug\fltk_gl"
+# PROP Intermediate_Dir "Debug\fltk_gl"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_gld.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "fltk_gl - Win32 Release"
+# Name "fltk_gl - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Gl_Choice.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Gl_Device_Plugin.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Gl_Overlay.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Gl_Window.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\freeglut_geometry.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\freeglut_stroke_mono_roman.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\freeglut_stroke_roman.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\freeglut_teapot.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\gl_draw.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\glut_compatability.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\glut_font.cxx
+# End Source File
+# End Target
+# End Project

Copied: branches/branch-3.0/ide/VisualC6/fltk3images.dsp (from rev 8988, branches/branch-3.0/ide/VisualC6/fltk_images.dsp)
===================================================================
--- branches/branch-3.0/ide/VisualC6/fltk3images.dsp	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC6/fltk3images.dsp	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,117 @@
+# Microsoft Developer Studio Project File - Name="fltk_images" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=fltk_images - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_images.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_images.mak" CFG="fltk_images - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "fltk_images - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "fltk_images - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "fltk_images - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release\fltk_images"
+# PROP BASE Intermediate_Dir "Release\fltk_images"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release\fltk_images"
+# PROP Intermediate_Dir "Release\fltk_images"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
+# SUBTRACT CPP /Os
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_images.lib"
+
+!ELSEIF  "$(CFG)" == "fltk_images - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug\fltk_images"
+# PROP BASE Intermediate_Dir "Debug\fltk_images"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug\fltk_images"
+# PROP Intermediate_Dir "Debug\fltk_images"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_imagesd.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "fltk_images - Win32 Release"
+# Name "fltk_images - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\src\Fl_BMP_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_File_Icon2.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_GIF_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_Help_Dialog.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_JPEG_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_PNG_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\Fl_PNM_Image.cxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\fl_images_core.cxx
+# End Source File
+# End Target
+# End Project

Copied: branches/branch-3.0/ide/VisualC6/fltk3jpeg.dsp (from rev 8988, branches/branch-3.0/ide/VisualC6/fltk_jpeg.dsp)
===================================================================
--- branches/branch-3.0/ide/VisualC6/fltk3jpeg.dsp	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC6/fltk3jpeg.dsp	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,269 @@
+# Microsoft Developer Studio Project File - Name="fltk_jpeg" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=fltk_jpeg - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_jpeg.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_jpeg.mak" CFG="fltk_jpeg - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "fltk_jpeg - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "fltk_jpeg - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "fltk_jpeg - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release\fltk_jpeg"
+# PROP BASE Intermediate_Dir "Release\fltk_jpeg"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release\fltk_jpeg"
+# PROP Intermediate_Dir "Release\fltk_jpeg"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
+# SUBTRACT CPP /Os
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_jpeg.lib"
+
+!ELSEIF  "$(CFG)" == "fltk_jpeg - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug\fltk_jpeg"
+# PROP BASE Intermediate_Dir "Debug\fltk_jpeg"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug\fltk_jpeg"
+# PROP Intermediate_Dir "Debug\fltk_jpeg"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_jpegd.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "fltk_jpeg - Win32 Release"
+# Name "fltk_jpeg - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\jpeg\jaricom.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcarith.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdarith.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcapimin.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcapistd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jccoefct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jccolor.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcdctmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jchuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcinit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcmainct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcmarker.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcmaster.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcomapi.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcparam.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcprepct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jcsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jctrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdapimin.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdapistd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdatadst.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdatasrc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdcoefct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdcolor.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jddctmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdhuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdinput.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdmainct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdmarker.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdmaster.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdmerge.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdpostct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jdtrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jerror.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jfdctflt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jfdctfst.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jfdctint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jidctflt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jidctfst.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jidctint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jmemmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jmemnobs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jquant1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jquant2.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\jpeg\jutils.c
+# End Source File
+# End Target
+# End Project

Copied: branches/branch-3.0/ide/VisualC6/fltk3png.dsp (from rev 8988, branches/branch-3.0/ide/VisualC6/fltk_png.dsp)
===================================================================
--- branches/branch-3.0/ide/VisualC6/fltk3png.dsp	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC6/fltk3png.dsp	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,145 @@
+# Microsoft Developer Studio Project File - Name="fltk_png" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=fltk_png - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_png.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_png.mak" CFG="fltk_png - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "fltk_png - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "fltk_png - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "fltk_png - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release\fltk_png"
+# PROP BASE Intermediate_Dir "Release\fltk_png"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release\fltk_png"
+# PROP Intermediate_Dir "Release\fltk_png"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
+# SUBTRACT CPP /Os
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_png.lib"
+
+!ELSEIF  "$(CFG)" == "fltk_png - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug\fltk_png"
+# PROP BASE Intermediate_Dir "Debug\fltk_png"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug\fltk_png"
+# PROP Intermediate_Dir "Debug\fltk_png"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_pngd.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "fltk_png - Win32 Release"
+# Name "fltk_png - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\png\png.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngerror.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngget.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngmem.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngpread.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngread.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngrio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngrtran.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngrutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngset.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngtrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngwio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngwrite.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngwtran.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\png\pngwutil.c
+# End Source File
+# End Target
+# End Project

Copied: branches/branch-3.0/ide/VisualC6/fltk3zlib.dsp (from rev 8988, branches/branch-3.0/ide/VisualC6/fltk_zlib.dsp)
===================================================================
--- branches/branch-3.0/ide/VisualC6/fltk3zlib.dsp	                        (rev 0)
+++ branches/branch-3.0/ide/VisualC6/fltk3zlib.dsp	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,145 @@
+# Microsoft Developer Studio Project File - Name="fltk_zlib" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=fltk_zlib - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_zlib.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "fltk_zlib.mak" CFG="fltk_zlib - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "fltk_zlib - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "fltk_zlib - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "fltk_zlib - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release\fltk_zlib"
+# PROP BASE Intermediate_Dir "Release\fltk_zlib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release\fltk_zlib"
+# PROP Intermediate_Dir "Release\fltk_zlib"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
+# SUBTRACT CPP /Os
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_zlib.lib"
+
+!ELSEIF  "$(CFG)" == "fltk_zlib - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug\fltk_zlib"
+# PROP BASE Intermediate_Dir "Debug\fltk_zlib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug\fltk_zlib"
+# PROP Intermediate_Dir "Debug\fltk_zlib"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "WIN32" /D "FL_LIBRARY" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\fltk_zlibd.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "fltk_zlib - Win32 Release"
+# Name "fltk_zlib - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\zlib\adler32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\compress.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\crc32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\deflate.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\gzclose.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\gzlib.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\gzread.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\gzwrite.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\infback.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\inffast.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\inflate.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\inftrees.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\trees.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\uncompr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\zlib\zutil.c
+# End Source File
+# End Target
+# End Project

Deleted: branches/branch-3.0/ide/VisualC6/fltk_gl.dsp

Deleted: branches/branch-3.0/ide/VisualC6/fltk_images.dsp

Deleted: branches/branch-3.0/ide/VisualC6/fltk_jpeg.dsp

Deleted: branches/branch-3.0/ide/VisualC6/fltk_png.dsp

Deleted: branches/branch-3.0/ide/VisualC6/fltk_zlib.dsp

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk-Info.plist

Copied: branches/branch-3.0/ide/Xcode4/plists/fltk3-Info.plist (from rev 8988, branches/branch-3.0/ide/Xcode4/plists/fltk-Info.plist)
===================================================================
--- branches/branch-3.0/ide/Xcode4/plists/fltk3-Info.plist	                        (rev 0)
+++ branches/branch-3.0/ide/Xcode4/plists/fltk3-Info.plist	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fltk</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+</dict>
+	</plist>

Copied: branches/branch-3.0/ide/Xcode4/plists/fltk3gl-Info.plist (from rev 8988, branches/branch-3.0/ide/Xcode4/plists/fltk_gl-Info.plist)
===================================================================
--- branches/branch-3.0/ide/Xcode4/plists/fltk3gl-Info.plist	                        (rev 0)
+++ branches/branch-3.0/ide/Xcode4/plists/fltk3gl-Info.plist	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fltk_gl</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+</dict>
+	</plist>

Copied: branches/branch-3.0/ide/Xcode4/plists/fltk3images-Info.plist (from rev 8988, branches/branch-3.0/ide/Xcode4/plists/fltk_images-Info.plist)
===================================================================
--- branches/branch-3.0/ide/Xcode4/plists/fltk3images-Info.plist	                        (rev 0)
+++ branches/branch-3.0/ide/Xcode4/plists/fltk3images-Info.plist	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fltk_images</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+</dict>
+	</plist>

Copied: branches/branch-3.0/ide/Xcode4/plists/fltk3jpeg-Info.plist (from rev 8988, branches/branch-3.0/ide/Xcode4/plists/fltk_jpeg-Info.plist)
===================================================================
--- branches/branch-3.0/ide/Xcode4/plists/fltk3jpeg-Info.plist	                        (rev 0)
+++ branches/branch-3.0/ide/Xcode4/plists/fltk3jpeg-Info.plist	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fltk_jpeg</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+</dict>
+	</plist>

Copied: branches/branch-3.0/ide/Xcode4/plists/fltk3png-Info.plist (from rev 8988, branches/branch-3.0/ide/Xcode4/plists/fltk_png-Info.plist)
===================================================================
--- branches/branch-3.0/ide/Xcode4/plists/fltk3png-Info.plist	                        (rev 0)
+++ branches/branch-3.0/ide/Xcode4/plists/fltk3png-Info.plist	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fltk_png</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+</dict>
+	</plist>

Copied: branches/branch-3.0/ide/Xcode4/plists/fltk3zlib-Info.plist (from rev 8988, branches/branch-3.0/ide/Xcode4/plists/fltk_zlib-Info.plist)
===================================================================
--- branches/branch-3.0/ide/Xcode4/plists/fltk3zlib-Info.plist	                        (rev 0)
+++ branches/branch-3.0/ide/Xcode4/plists/fltk3zlib-Info.plist	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.fltk.fltk_zlib</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>FLTK</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+	<key>CFBundleGetInfoString</key>
+	<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+</dict>
+	</plist>

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk_forms-Info.plist

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk_gl-Info.plist

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk_images-Info.plist

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk_jpeg-Info.plist

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk_png-Info.plist

Deleted: branches/branch-3.0/ide/Xcode4/plists/fltk_zlib-Info.plist

Copied: branches/branch-3.0/include/FL (from rev 8987, branches/branch-3.0/FL)

Copied: branches/branch-3.0/include/GL (from rev 8987, branches/branch-3.0/GL)

Copied: branches/branch-3.0/include/fltk (from rev 8987, branches/branch-3.0/fltk)

Copied: branches/branch-3.0/include/fltk3 (from rev 8987, branches/branch-3.0/fltk3)

Deleted: branches/branch-3.0/include/fltk3/Browser_.h

Copied: branches/branch-3.0/include/fltk3/Browser_.h (from rev 8988, branches/branch-3.0/fltk3/Browser_.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Browser_.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Browser_.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,352 @@
+//
+// "$Id: Browser_.h 8275 2011-01-13 22:07:31Z manolo $"
+//
+// Common browser header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::Browser_ widget . */
+
+#ifndef Fltk3_Browser__H
+#define Fltk3_Browser__H
+
+#include "Group.h"
+#include "Scrollbar.h"
+#include <fltk3/run.h>		// fltk3::scrollbar_size()
+
+class Fl_Browser_;
+
+namespace fltk3 {
+  
+  const uchar NORMAL_BROWSER	= 0;	/**< type() of fltk3::Browser */
+  const uchar SELECT_BROWSER	= 1;	/**< type() of fltk3::SelectBrowser */
+  const uchar HOLD_BROWSER	= 2;	/**< type() of fltk3::HoldBrowser */
+  const uchar MULTI_BROWSER	= 3;	/**< type() of fltk3::MultiBrowser */
+  
+  const uchar SORT_ASCENDING	= 0;	/**< sort browser items in ascending alphabetic order. */
+  const uchar SORT_DESCENDING	= 1;	/**< sort in descending order */
+  
+  /**
+   This is the base class for browsers.  To be useful it must be
+   subclassed and several virtual functions defined.  The Forms-compatible
+   browser and the file chooser's browser are subclassed off of this.
+   
+   This has been designed so that the subclass has complete control
+   over the storage of the data, although because next() and 
+   prev() functions are used to index, it works best as a linked list
+   or as a large block of characters in which the line breaks must be
+   searched for.
+   
+   A great deal of work has been done so that the "height" of a data
+   object does not need to be determined until it is drawn.  This is
+   useful if actually figuring out the size of an object requires
+   accessing image data or doing stat() on a file or doing some
+   other slow operation.
+   */
+  class FLTK3_EXPORT Browser_ : public fltk3::Group {
+
+    friend class ::Fl_Browser_;
+
+    int position_;	// where user wants it scrolled to
+    int real_position_;	// the current vertical scrolling position
+    int hposition_;	// where user wants it panned to
+    int real_hposition_;	// the current horizontal scrolling position
+    int offset_;		// how far down top_ item the real_position is
+    int max_width;	// widest object seen so far
+    uchar has_scrollbar_;	// which scrollbars are enabled
+    void* top_;		// which item scrolling position is in
+    void* selection_;	// which is selected (except for fltk3::MULTI_BROWSER)
+    void *redraw1,*redraw2; // minimal update pointers
+    void* max_width_item;	// which item has max_width_
+    int scrollbar_size_;	// size of scrollbar trough
+    
+    void update_top();
+    
+  protected:
+    
+    // All of the following must be supplied by the subclass:
+    /**
+     This method must be provided by the subclass 
+     to return the first item in the list.
+     \see item_first(), item_next(), item_last(), item_prev()
+     */
+    virtual void *item_first() const;
+    /**
+     This method must be provided by the subclass
+     to return the item in the list after \p item.
+     \see item_first(), item_next(), item_last(), item_prev()
+     */
+    virtual void *item_next(void *item) const;
+    /**
+     This method must be provided by the subclass
+     to return the item in the list before \p item.
+     \see item_first(), item_next(), item_last(), item_prev()
+     */
+    virtual void *item_prev(void *item) const;
+    /**
+     This method must be provided by the subclass
+     to return the last item in the list.
+     \see item_first(), item_next(), item_last(), item_prev()
+     */
+    virtual void *item_last() const;
+    /** 
+     This method must be provided by the subclass to return 
+     the height of \p item in pixels.
+     Allow for two additional pixels for the list selection box.
+     \param[in] item The item whose height is returned.
+     \returns The height of the specified \p item in pixels.
+     \see item_height(), item_width(), item_quick_height()
+     */
+    virtual int item_height(void *item) const;
+    /**
+     This method must be provided by the subclass to return the width of the
+     \p item in pixels.  Allow for two additional pixels for the list
+     selection box.
+     \param[in] item The item whose width is returned.
+     \returns The width of the item in pixels.
+     */
+    virtual int item_width(void *item) const;
+    virtual int item_quick_height(void *item) const ;
+    /**
+     This method must be provided by the subclass to draw the \p item
+     in the area indicated by \p X, \p Y, \p W, \p H.
+     */
+    virtual void item_draw(void *item,int X,int Y,int W,int H) const;
+    /**
+     This optional method returns a string (label) that may be used for sorting. 
+     \param[in] item The item whose label text is returned.
+     \returns The item's text label. (Can be NULL if blank)
+     */
+    virtual const char *item_text(void *item) const;
+    /**
+     This optional method should be provided by the subclass 
+     to efficiently swap browser items \p a and \p b, such as for sorting.
+     \param[in] a,b The two items to be swapped.
+     */
+    virtual void item_swap(void *a,void *b);
+    /**
+     This method must be provided by the subclass 
+     to return the item for the specified \p index. 
+     \param[in] index The \p index of the item to be returned
+     \returns The item at the specified \p index.
+     */
+    virtual void *item_at(int index) const;
+    // you don't have to provide these but it may help speed it up:
+    virtual int full_width() const ;	// current width of all items
+    virtual int full_height() const ;	// current height of all items
+    virtual int incr_height() const ;	// average height of an item
+                                        // These only need to be done by subclass if you want a multi-browser:
+    virtual void item_select(void *item,int val=1);
+    virtual int item_selected(void *item) const ;
+    
+    // things the subclass may want to call:
+    /**
+     Returns the item that appears at the top of the list.
+     */
+    void *top() const { return top_; }
+    /**
+     Returns the item currently selected, or NULL if there is no selection.
+     
+     For multiple selection browsers this call returns the currently focused item,
+     even if it is not selected. To find all selected items, call 
+     fltk3::MultiBrowser::selected() for every item in question.
+     */
+    void *selection() const { return selection_; }
+    void new_list(); // completely clobber all data, as though list replaced
+    void deleting(void *item); // get rid of any pointers to item
+    void replacing(void *a,void *b); // change a pointers to b
+    void swapping(void *a,void *b); // exchange pointers a and b
+    void inserting(void *a,void *b); // insert b near a
+    int displayed(void *item) const ; // true if this item is visible
+    void redraw_line(void *item); // minimal update, no change in size
+    /**
+     This method will cause the entire list to be redrawn.
+     \see redraw_lines(), redraw_line()
+     */
+    void redraw_lines() { damage(fltk3::DAMAGE_SCROLL); } // redraw all of them
+    void bbox(int &X,int &Y,int &W,int &H) const;
+    int leftedge() const;	// x position after scrollbar & border
+    void *find_item(int ypos); // item under mouse
+    
+    void draw();
+    Browser_(int X,int Y,int W,int H,const char *L=0);
+    
+  public:
+    
+    /**
+     Vertical scrollbar. Public, so that it can be accessed directly.
+     */
+    fltk3::Scrollbar scrollbar;
+    /**
+     Horizontal scrollbar. Public, so that it can be accessed directly.
+     */
+    fltk3::Scrollbar hscrollbar;
+    
+    int handle(int event);
+    void resize(int X,int Y,int W,int H);
+    
+    int select(void *item,int val=1,int docallbacks=0);
+    int select_only(void *item,int docallbacks=0);
+    int deselect(int docallbacks=0);
+    /**
+     Gets the vertical scroll position of the list as a pixel position \p pos.
+     The position returned is how many pixels of the list are scrolled off the top edge
+     of the screen.  Example: A position of '3' indicates the top 3 pixels of 
+     the list are scrolled off the top edge of the screen.
+     \see position(), hposition()
+     */
+    int position() const { return position_; }
+    void position(int pos); // scroll to here
+    /**
+     Gets the horizontal scroll position of the list as a pixel position \p pos.
+     The position returned is how many pixels of the list are scrolled off the left edge
+     of the screen. Example: A position of '18' indicates the left 18 pixels of
+     the list are scrolled off the left edge of the screen.
+     \see position(), hposition()
+     */
+    int hposition() const { return hposition_; }
+    void hposition(int); // pan to here
+    void display(void *item); // scroll so this item is shown
+    
+    /**
+     Values for has_scrollbar().
+     */
+    /** Anonymous enum bit flags for has_scrollbar().
+     -  bit 0: horizontal
+     -  bit 1: vertical
+     -  bit 2: 'always' (to be combined with bits 0 and 1)
+     -  bit 3-31: reserved for future use
+     */
+    enum { // values for has_scrollbar()
+      HORIZONTAL = 1,		///< Only show horizontal scrollbar.
+      VERTICAL = 2,		///< Only show vertical scrollbar.
+      BOTH = 3,			///< Show both scrollbars. (default)
+      ALWAYS_ON = 4,		///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
+      HORIZONTAL_ALWAYS = 5,	///< Horizontal scrollbar always on.
+      VERTICAL_ALWAYS = 6,	///< Vertical scrollbar always on.
+      BOTH_ALWAYS = 7		///< Both scrollbars always on.
+    };
+    /**
+     Returns the current scrollbar mode, see fltk3::Browser_::has_scrollbar(uchar)
+     */
+    uchar has_scrollbar() const { return has_scrollbar_; }
+    /**
+     Sets whether the widget should have scrollbars or not (default fltk3::Browser_::BOTH).
+     By default you can scroll in both directions, and the scrollbars
+     disappear if the data will fit in the widget.  
+     has_scrollbar() changes this based on the value of \p mode:
+     
+     - 0 - No scrollbars.
+     
+     - fltk3::Browser_::HORIZONTAL - Only a horizontal scrollbar.
+     
+     - fltk3::Browser_::VERTICAL - Only a vertical scrollbar.
+     
+     - fltk3::Browser_::BOTH - The default is both scrollbars.
+     
+     - fltk3::Browser_::HORIZONTAL_ALWAYS - Horizontal scrollbar always on,
+     vertical always off.
+     
+     - fltk3::Browser_::VERTICAL_ALWAYS - Vertical scrollbar always on,
+     horizontal always off.
+     
+     - fltk3::Browser_::BOTH_ALWAYS - Both always on.
+     */
+    void has_scrollbar(uchar mode) { has_scrollbar_ = mode; }
+    
+    /**
+     Gets the current size of the scrollbars' troughs, in pixels.
+     
+     If this value is zero (default), this widget will use the 
+     fltk3::scrollbar_size() value as the scrollbar's width.
+     
+     \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollsize() is being used.
+     \see fltk3::scrollbar_size(int)
+     */
+    int scrollbar_size() const {
+      return(scrollbar_size_);
+    }
+    /**
+     Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
+     
+     Normally you should not need this method, and should use
+     fltk3::scrollbar_size(int) instead to manage the size of ALL 
+     your widgets' scrollbars. This ensures your application 
+     has a consistent UI, is the default behavior, and is normally
+     what you want.
+     
+     Only use THIS method if you really need to override the global
+     scrollbar size. The need for this should be rare.
+     
+     Setting \p size to the special value of 0 causes the widget to
+     track the global fltk3::scrollbar_size(), which is the default.
+     
+     \param[in] size Sets the scrollbar size in pixels.\n
+     If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+     \see fltk3::scrollbar_size()
+     */
+    void scrollbar_size(int size) {
+      scrollbar_size_ = size;
+    }   
+    /**
+     This method has been deprecated, existing for backwards compatibility only.
+     Use scrollbar_size() instead.
+     This method always returns the global value fltk3::scrollbar_size().
+     \returns Always returns the global value fltk3::scrollbar_size().
+     \todo This method should eventually be removed in 1.4+
+     */
+    int scrollbar_width() const {
+      return(fltk3::scrollbar_size());
+    }
+    /**
+     This method has been deprecated, existing for backwards compatibility only.
+     Use scrollbar_size(int) instead.
+     This method sets the global fltk3::scrollbar_size(), and forces this
+     instance of the widget to use it.
+     \todo This method should eventually be removed in 1.4+
+     */
+    void scrollbar_width(int width) {
+      fltk3::scrollbar_size(width);
+      scrollbar_size_ = 0;
+    }
+    /**
+     Moves the vertical scrollbar to the righthand side of the list.
+     For back compatibility.
+     */
+    void scrollbar_right() { scrollbar.align(fltk3::ALIGN_RIGHT); }
+    /**
+     Moves the vertical scrollbar to the lefthand side of the list.
+     For back compatibility.
+     */
+    void scrollbar_left() { scrollbar.align(fltk3::ALIGN_LEFT); }
+    void sort(int flags=0);
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: Browser_.h 8275 2011-01-13 22:07:31Z manolo $".
+//

Deleted: branches/branch-3.0/include/fltk3/Button.h

Copied: branches/branch-3.0/include/fltk3/Button.h (from rev 8988, branches/branch-3.0/fltk3/Button.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Button.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Button.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,187 @@
+//
+// "$Id: Button.h 7903 2010-11-28 21:06:39Z matt $"
+//
+// Button header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::Button widget . */
+
+#ifndef FLTK3_BUTTON_H
+#define FLTK3_BUTTON_H
+
+#include "Widget.h"
+#include <fltk3/Wrapper.h>
+
+class Fl_Button;
+
+
+namespace fltk3 {
+  // values for type()
+  const uchar NORMAL_BUTTON = 0;   /**< value() will be set to 1 during the press of the button and 
+                                    reverts back to 0 when the button is released */
+  const uchar TOGGLE_BUTTON = 1;   ///< value() toggles between 0 and 1 at every click of the button
+  const uchar RADIO_BUTTON = RESERVED_TYPE+2; /**< is set to 1 at button press, and all other
+                                               buttons in the same group with <tt>type() == fltk3::RADIO_BUTTON</tt>
+                                               are set to zero.*/
+  const uchar HIDDEN_BUTTON = 3;   ///< for Forms compatibility
+  
+  extern FLTK3_EXPORT fltk3::Shortcut old_shortcut(const char*);
+  
+  class WidgetTracker;
+  
+  /**
+   \class fltk3::Button
+   \brief Buttons generate callbacks when they are clicked by the user.
+   
+   You control exactly when and how by changing the values for type() and
+   when().  Buttons can also generate callbacks in response to \c fltk3::SHORTCUT
+   events.  The button can either have an explicit shortcut(int s) value or a
+   letter shortcut can be indicated in the label() with an '\&' character
+   before it.  For the label shortcut it does not matter if \e Alt is held
+   down, but if you have an input field in the same window, the user will have
+   to hold down the \e Alt key so that the input field does not eat the event
+   first as an \c fltk3::KEYBOARD event.
+   
+   \todo Refactor the doxygen comments for fltk3::Button type() documentation.
+   
+   For an fltk3::Button object, the type() call returns one of:
+   \li \c fltk3::NORMAL_BUTTON (0): value() remains unchanged after button press.
+   \li \c fltk3::TOGGLE_BUTTON: value() is inverted after button press.
+   \li \c fltk3::RADIO_BUTTON: value() is set to 1 after button press, and all other
+   buttons in the current group with <tt>type() == fltk3::RADIO_BUTTON</tt>
+   are set to zero.
+   
+   \todo Refactor the doxygen comments for fltk3::Button when() documentation.
+   
+   For an fltk3::Button object, the following when() values are useful, the default
+   being \c fltk3::WHEN_RELEASE:
+   \li \c 0: The callback is not done, instead changed() is turned on.
+   \li \c fltk3::WHEN_RELEASE: The callback is done after the user successfully
+   clicks the button, or when a shortcut is typed.
+   \li \c fltk3::WHEN_CHANGED: The callback is done each time the value() changes
+   (when the user pushes and releases the button, and as the mouse is
+   dragged around in and out of the button).
+   */
+  class FLTK3_EXPORT Button : public Widget {
+    
+    friend class ::Fl_Button;
+    
+    unsigned int shortcut_;
+    char value_;
+    char oldval;
+    uchar down_box_;
+    
+  protected:
+    
+    static fltk3::WidgetTracker *key_release_tracker;
+    static void key_release_timeout(void*);
+    void simulate_key_action();
+    
+    virtual void draw();
+    
+  public:
+    
+    virtual int handle(int);
+    
+    Button(int X, int Y, int W, int H, const char *L = 0);
+    
+    int value(int v);
+    
+    /**
+     Returns the current value of the button (0 or 1).
+     */
+    char value() const {return value_;}
+    
+    /**
+     Same as \c value(1).
+     \see value(int v)
+     */
+    int set() {return value(1);}
+    
+    /**
+     Same as \c value(0).
+     \see value(int v)
+     */
+    int clear() {return value(0);}
+    
+    void setonly(); // this should only be called on fltk3::RADIO_BUTTONs
+    
+    /**
+     Returns the current shortcut key for the button.
+     \retval int
+     */
+    unsigned int shortcut() const {return shortcut_;}
+    
+    /**
+     Sets the shortcut key to \c s.
+     Setting this overrides the use of '\&' in the label().
+     The value is a bitwise OR of a key and a set of shift flags, for example:
+     <tt>fltk3::ALT | 'a'</tt>, or
+     <tt>fltk3::ALT | (fltk3::FKey + 10)</tt>, or just
+     <tt>'a'</tt>.
+     A value of 0 disables the shortcut.
+     
+     The key can be any value returned by fltk3::event_key(), but will usually be
+     an ASCII letter.  Use a lower-case letter unless you require the shift key
+     to be held down.
+     
+     The shift flags can be any set of values accepted by fltk3::event_state().
+     If the bit is on, that shift key must be pushed.  Meta, Alt, Ctrl, and
+     Shift must be off if they are not in the shift flags (zero for the other
+     bits indicates a "don't care" setting).
+     \param[in] s bitwise OR of key and shift flags
+     */
+    void shortcut(unsigned int s) {shortcut_ = s;}
+    
+    /**
+     Returns the current down box type, which is drawn when value() is non-zero.
+     \retval fltk3::Boxtype
+     */
+    Boxtype down_box() const {return (fltk3::Boxtype)down_box_;}
+    
+    /**
+     Sets the down box type. The default value of 0 causes FLTK to figure out
+     the correct matching down version of box().
+     \param[in] b down box type
+     */
+    void down_box(fltk3::Boxtype b) {down_box_ = b;}
+    
+    /// (for backwards compatibility)
+    void shortcut(const char *s) {shortcut(fltk3::old_shortcut(s));}
+    
+    /// (for backwards compatibility)
+    Color down_color() const {return selection_color();}
+    
+    /// (for backwards compatibility)
+    void down_color(unsigned c) {selection_color(c);}
+  };
+  
+} // namespace
+
+#endif
+
+//
+// End of "$Id: Button.h 7903 2010-11-28 21:06:39Z matt $".
+//

Deleted: branches/branch-3.0/include/fltk3/Chart.h

Copied: branches/branch-3.0/include/fltk3/Chart.h (from rev 8988, branches/branch-3.0/fltk3/Chart.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Chart.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Chart.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,145 @@
+//
+// "$Id: Chart.h 7981 2010-12-08 23:53:04Z greg.ercolano $"
+//
+// Forms chart header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::Chart widget . */
+
+#ifndef Fltk3_Chart_H
+#define Fltk3_Chart_H
+
+#include "Widget.h"
+#include <fltk3/Wrapper.h>
+
+namespace fltk3 {
+  
+  // values for type()
+  const uchar BAR_CHART		= 0;	/**< type() for Bar Chart variant */
+  const uchar HORBAR_CHART	= 1;	/**< type() for Horizontal Bar Chart variant */
+  const uchar LINE_CHART	= 2;	/**< type() for Line Chart variant */
+  const uchar FILL_CHART	= 3;	/**< type() for Fill Line Chart variant */
+  const uchar SPIKE_CHART	= 4;	/**< type() for Spike Chart variant */
+  const uchar PIE_CHART		= 5;	/**< type() for Pie Chart variant */
+  const uchar SPECIALPIE_CHART	= 6;	/**< type() for Special Pie Chart variant */
+  
+  const uchar FILLED_CHART      = FILL_CHART;	/**< for compatibility */
+  
+  const int CHART_MAX		= 128;	/**< max entries per chart */
+  const int CHART_LABEL_MAX	= 18;	/**< max label length for entry */
+  
+  /** For internal use only */
+  struct CHART_ENTRY {
+    float val;				/**< For internal use only. */
+    unsigned col;			/**< For internal use only. */
+    char str[fltk3::CHART_LABEL_MAX+1];	/**< For internal use only. */
+  };
+  
+  /**
+   \class fltk3::Chart
+   \brief fltk3::Chart displays simple charts.
+   It is provided for Forms compatibility.
+   
+   \image html charts.png  
+   \image latex charts.png  "fltk3::Chart" width=10cm
+   \todo Refactor fltk3::Chart::type() information.
+   
+   The type of an fltk3::Chart object can be set using type(uchar t) to:
+   \li \c fltk3::BAR_CHART: Each sample value is drawn as a vertical bar.
+   \li \c fltk3::FILLED_CHART: The chart is filled from the bottom of the graph
+   to the sample values.
+   \li \c fltk3::HORBAR_CHART: Each sample value is drawn as a horizontal bar.
+   \li \c fltk3::LINE_CHART: The chart is drawn as a polyline with vertices at
+   each sample value.
+   \li \c fltk3::PIE_CHART: A pie chart is drawn with each sample value being
+   drawn as a proportionate slice in the circle.
+   \li \c fltk3::SPECIALPIE_CHART: Like \c fltk3::PIE_CHART, but the first slice is
+   separated from the pie.
+   \li \c fltk3::SPIKE_CHART: Each sample value is drawn as a vertical line.
+   */
+  class FLTK3_EXPORT Chart : public fltk3::Widget {
+    int numb;
+    int maxnumb;
+    int sizenumb;
+    fltk3::CHART_ENTRY *entries;
+    double min,max;
+    uchar autosize_;
+  protected:
+    void draw();
+  public:
+    Chart(int X, int Y, int W, int H, const char *L = 0);
+    
+    ~Chart();
+    
+    void clear();
+    
+    void add(double val, const char *str = 0, unsigned col = 0);
+    
+    void insert(int ind, double val, const char *str = 0, unsigned col = 0);
+    
+    void replace(int ind, double val, const char *str = 0, unsigned col = 0);
+    
+    /**
+     Gets the lower and upper bounds of the chart values.
+     \param[out] a, b are set to lower, upper
+     */
+    void bounds(double *a,double *b) const {*a = min; *b = max;}
+    
+    void bounds(double a,double b);
+    
+    /**
+     Returns the number of data values in the chart.
+     */
+    int size() const {return numb;}
+    
+    void size(int W, int H) { Widget::size(W, H); }
+    
+    /**
+     Gets the maximum number of data values for a chart.
+     */
+    int maxsize() const {return maxnumb;}
+    
+    void maxsize(int m);
+    
+    /**
+     Get whether the chart will automatically adjust the bounds of the chart.
+     \returns non-zero if auto-sizing is enabled and zero if disabled.
+     */
+    uchar autosize() const {return autosize_;}
+    
+    /**
+     Set whether the chart will automatically adjust the bounds of the chart.
+     \param[in] n non-zero to enable automatic resizing, zero to disable.
+     */
+    void autosize(uchar n) {autosize_ = n;}
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: Chart.h 7981 2010-12-08 23:53:04Z greg.ercolano $".
+//

Deleted: branches/branch-3.0/include/fltk3/Counter.h

Copied: branches/branch-3.0/include/fltk3/Counter.h (from rev 8988, branches/branch-3.0/fltk3/Counter.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Counter.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Counter.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,112 @@
+//
+// "$Id: Counter.h 7981 2010-12-08 23:53:04Z greg.ercolano $"
+//
+// Counter header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::Counter widget . */
+
+// A numerical value with up/down step buttons.  From Forms.
+
+#ifndef Fltk3_Counter_H
+#define Fltk3_Counter_H
+
+#include "Valuator.h"
+#include <fltk3/Wrapper.h>
+
+class Fl_Counter;
+
+namespace fltk3 {
+  
+  // values for type():
+  const uchar NORMAL_COUNTER	= 0;	/**< type() for counter with fast buttons */
+  const uchar SIMPLE_COUNTER	= 1;	/**< type() for counter without fast buttons */
+  
+  /**
+   Controls a single floating point value with button (or keyboard) arrows.
+   Double arrows buttons achieve larger steps than simple arrows.
+   \see fltk3::Spinner for value input with vertical step arrows.
+   <P align=center>\image html counter.png</P>
+   \image latex counter.png "fltk3::Counter" width=4cm
+   
+   \todo Refactor the doxygen comments for fltk3::Counter type() documentation.
+   
+   The type of an fltk3::Counter object can be set using type(uchar t) to:
+   \li \c fltk3::NORMAL_COUNTER: Displays a counter with 4 arrow buttons.
+   \li \c fltk3::SIMPLE_COUNTER: Displays a counter with only 2 arrow buttons.
+   */
+  class FLTK3_EXPORT Counter : public fltk3::Valuator {
+
+    friend class ::Fl_Counter;
+    
+    double lstep_;
+    uchar mouseobj;
+    static void repeat_callback(void *);
+    int calc_mouseobj();
+    void increment_cb();
+    
+  protected:
+    
+    void draw();
+    
+  public:
+    
+    int handle(int);
+    
+    Counter(int X, int Y, int W, int H, const char* L = 0);
+    ~Counter();
+    
+    /**
+     Sets the increment for the large step buttons.
+     The default value is 1.0.
+     \param[in] a large step increment.
+     */
+    void lstep(double a) {lstep_ = a;}
+    
+    /**
+     Sets the increments for the normal and large step buttons.
+     \param[in] a, b normal and large step increments.
+     */
+    void step(double a,double b) {Valuator::step(a); lstep_ = b;}
+    
+    /**
+     Sets the increment for the normal step buttons.
+     \param[in] a normal step increment.
+     */
+    void step(double a) {Valuator::step(a);}
+    
+    /**
+     Returns the increment for normal step buttons.
+     */
+    double step() const {return Valuator::step();}    
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: Counter.h 7981 2010-12-08 23:53:04Z greg.ercolano $".
+//

Deleted: branches/branch-3.0/include/fltk3/HelpView.h

Copied: branches/branch-3.0/include/fltk3/HelpView.h (from rev 8988, branches/branch-3.0/fltk3/HelpView.h)
===================================================================
--- branches/branch-3.0/include/fltk3/HelpView.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/HelpView.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,405 @@
+//
+// "$Id: HelpView.h 8306 2011-01-24 17:04:22Z matt $"
+//
+// Help Viewer widget definitions.
+//
+// Copyright 1997-2010 by Easy Software Products.
+// Image support by Matthias Melcher, Copyright 2000-2009.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::HelpView widget . */
+
+#ifndef Fltk3_Help_View_H
+#  define Fltk3_Help_View_H
+
+//
+// Include necessary header files...
+//
+
+#  include <stdio.h>
+#  include "run.h"
+#  include "Group.h"
+#  include "Scrollbar.h"
+#  include "draw.h"
+#  include "SharedImage.h"
+#  include "filename.h"
+
+namespace fltk3 {
+  
+  //
+  // fltk3::HelpFunc type - link callback function for files...
+  //
+  
+  
+  typedef const char *(HelpFunc)(fltk3::Widget *, const char *);
+  
+  
+  //
+  // fltk3::HelpBlock structure...
+  //
+  
+  struct HelpBlock {
+    const char	*start,		// Start of text
+    *end;		// End of text
+    uchar		border;		// Draw border?
+    fltk3::Color	bgcolor;	// Background color
+    int		x,		// Indentation/starting X coordinate
+    y,		// Starting Y coordinate
+    w,		// Width
+    h;		// Height
+    int		line[32];	// Left starting position for each line
+  };
+  
+  //
+  // fltk3::HelpLink structure...
+  //
+  /** Definition of a link for the html viewer. */
+  struct HelpLink {
+    char		filename[192],	///< Reference filename
+    name[32];	///< Link target (blank if none)
+    int		x,		///< X offset of link text
+    y,		///< Y offset of link text
+    w,		///< Width of link text
+    h;		///< Height of link text
+  };
+  
+  /*
+   * fltk3::HelpView font stack opaque implementation
+   */
+  
+  /** fltk3::HelpView font stack element definition. */
+  struct FLTK3_EXPORT HelpFontStyle {
+    fltk3::Font      f;  ///< Font
+    fltk3::Fontsize  s;  ///< Font Size
+    fltk3::Color     c;  ///< Font Color
+    void get(fltk3::Font &afont, fltk3::Fontsize &asize, fltk3::Color &acolor) {afont=f; asize=s; acolor=c;} ///< Gets current font attributes
+    void set(fltk3::Font afont, fltk3::Fontsize asize, fltk3::Color acolor) {f=afont; s=asize; c=acolor;} ///< Sets current font attributes
+    HelpFontStyle(fltk3::Font afont, fltk3::Fontsize asize, fltk3::Color acolor) {set(afont, asize, acolor);}
+    HelpFontStyle(){} // For in table use
+  };
+  
+  /** fltk3::HelpView font stack definition. */
+  const size_t MAX_FL_HELP_FS_ELTS = 100;
+  
+  struct FLTK3_EXPORT HelpFontStack {
+    /** font stack construction, initialize attributes. */
+    HelpFontStack() {
+      nfonts_ = 0;
+    }
+    
+    void init(fltk3::Font f, fltk3::Fontsize s, fltk3::Color c) { 
+      nfonts_ = 0;
+      elts_[nfonts_].set(f, s, c);
+      fltk3::font(f, s); 
+      fltk3::color(c);
+    }
+    /** Gets the top (current) element on the stack. */
+    void top(fltk3::Font &f, fltk3::Fontsize &s, fltk3::Color &c) { elts_[nfonts_].get(f, s, c); }
+    /** Pushes the font style triplet on the stack, also calls fltk3::font() & fltk3::color() adequately */
+    void push(fltk3::Font f, fltk3::Fontsize s, fltk3::Color c) { 
+      if (nfonts_ <  MAX_FL_HELP_FS_ELTS-1) nfonts_ ++;
+      elts_[nfonts_].set(f, s, c);
+      fltk3::font(f, s); fltk3::color(c); 
+    }
+    /** Pops from the stack the font style triplet and calls fltk3::font() & fltk3::color() adequately */
+    void pop(fltk3::Font &f, fltk3::Fontsize &s, fltk3::Color &c) { 
+      if (nfonts_ > 0) nfonts_ --;
+      top(f, s, c);
+      fltk3::font(f, s); fltk3::color(c);
+    }
+    /** Gets the current count of font style elements in the stack. */
+    size_t count() const {return nfonts_;} // Gets the current number of fonts in the stack
+    
+  protected:
+    size_t nfonts_;		///< current number of fonts in stack
+    fltk3::HelpFontStyle elts_[100]; ///< font elements
+  };
+  
+  /** fltk3::HelpTarget structure */
+  
+  struct HelpTarget {
+    char		name[32];	///< Target name
+    int		y;		///< Y offset of target
+  };
+  
+  /**
+   The fltk3::HelpView widget displays HTML text. Most HTML 2.0
+   elements are supported, as well as a primitive implementation of tables.
+   GIF, JPEG, and PNG images are displayed inline.
+   
+   Supported HTML tags:
+   - A: HREF/NAME
+   - B
+   - BODY: BGCOLOR/TEXT/LINK
+   - BR
+   - CENTER
+   - CODE
+   - DD
+   - DL
+   - DT
+   - EM
+   - FONT: COLOR/SIZE/FACE=(helvetica/arial/sans/times/serif/symbol/courier)
+   - H1/H2/H3/H4/H5/H6
+   - HEAD
+   - HR
+   - I
+   - IMG: SRC/WIDTH/HEIGHT/ALT
+   - KBD
+   - LI
+   - OL
+   - P
+   - PRE
+   - STRONG
+   - TABLE: TH/TD/TR/BORDER/BGCOLOR/COLSPAN/ALIGN=CENTER|RIGHT|LEFT
+   - TITLE
+   - TT
+   - U
+   - UL
+   - VAR
+   
+   Supported color names:
+   - black,red,green,yellow,blue,magenta,fuchsia,cyan,aqua,white,gray,grey,lime,maroon,navy,olive,purple,silver,teal.
+   
+   Supported urls:
+   - Internal: file:
+   - External: http: ftp: https: ipp: mailto: news:
+   
+   Quoted char names:
+   - Aacute aacute Acirc acirc acute AElig aelig Agrave agrave amp Aring aring Atilde atilde Auml auml
+   - brvbar bull
+   - Ccedil ccedil cedil cent copy curren
+   - deg divide
+   - Eacute eacute Ecirc ecirc Egrave egrave ETH eth Euml euml euro
+   - frac12 frac14 frac34
+   - gt
+   - Iacute iacute Icirc icirc iexcl Igrave igrave iquest Iuml iuml
+   - laquo lt
+   - macr micro middot
+   - nbsp not Ntilde ntilde
+   - Oacute oacute Ocirc ocirc Ograve ograve ordf ordm Oslash oslash Otilde otilde Ouml ouml
+   - para premil plusmn pound
+   - quot
+   - raquo reg
+   - sect shy sup1 sup2 sup3 szlig
+   - THORN thorn times trade
+   - Uacute uacute Ucirc ucirc Ugrave ugrave uml Uuml uuml
+   - Yacute yacute
+   - yen Yuml yuml
+   
+   */
+  class FLTK3_EXPORT HelpView : public fltk3::Group {	// Help viewer widget
+    
+    enum { RIGHT = -1, CENTER, LEFT };	///< Alignments
+    
+    char		title_[1024];		///< Title string
+    fltk3::Color	defcolor_,		///< Default text color
+    bgcolor_,		///< Background color
+    textcolor_,		///< Text color
+    linkcolor_;		///< Link color
+    fltk3::Font       textfont_;		///< Default font for text
+    fltk3::Fontsize  textsize_;		///< Default font size
+    const char	*value_;		///< HTML text value
+    fltk3::HelpFontStack fstack_;		///< font stack management
+    int		nblocks_,		///< Number of blocks/paragraphs
+    ablocks_;		///< Allocated blocks
+    fltk3::HelpBlock	*blocks_;		///< Blocks
+    
+    fltk3::HelpFunc	*link_;			///< Link transform function
+    
+    int		nlinks_,		///< Number of links
+    alinks_;		///< Allocated links
+    fltk3::HelpLink	*links_;		///< Links
+    
+    int		ntargets_,		///< Number of targets
+    atargets_;		///< Allocated targets
+    fltk3::HelpTarget *targets_;		///< Targets
+    
+    char		directory_[FLTK3_PATH_MAX];///< Directory for current file
+    char		filename_[FLTK3_PATH_MAX];	///< Current filename
+    int		topline_,		///< Top line in document
+    leftline_,		///< Lefthand position
+    size_,			///< Total document length
+    hsize_,			///< Maximum document width
+    scrollbar_size_;	///< Size for both scrollbars
+    fltk3::Scrollbar	scrollbar_,		///< Vertical scrollbar for document
+    hscrollbar_;		///< Horizontal scrollbar
+    
+    static int    selection_first;
+    static int    selection_last;
+    static int    selection_push_first;
+    static int    selection_push_last;
+    static int    selection_drag_first;
+    static int    selection_drag_last;
+    static int    selected;
+    static int    draw_mode;
+    static int    mouse_x;
+    static int    mouse_y;
+    static int    current_pos;
+    static fltk3::HelpView *current_view;
+    static fltk3::Color hv_selection_color;
+    static fltk3::Color hv_selection_text_color;
+    
+    
+    void initfont(fltk3::Font &f, fltk3::Fontsize &s, fltk3::Color &c) { f = textfont_; s = textsize_; c = textcolor_; fstack_.init(f, s, c); }
+    void pushfont(fltk3::Font f, fltk3::Fontsize s) {fstack_.push(f, s, textcolor_);}
+    void pushfont(fltk3::Font f, fltk3::Fontsize s, fltk3::Color c) {fstack_.push(f, s, c);}
+    void popfont(fltk3::Font &f, fltk3::Fontsize &s, fltk3::Color &c) {fstack_.pop(f, s, c);}
+    
+    fltk3::HelpBlock	*add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
+    void		add_link(const char *n, int xx, int yy, int ww, int hh);
+    void		add_target(const char *n, int yy);
+    static int	compare_targets(const fltk3::HelpTarget *t0, const fltk3::HelpTarget *t1);
+    int		do_align(fltk3::HelpBlock *block, int line, int xx, int a, int &l);
+    void		draw();
+    void		format();
+    void		format_table(int *table_width, int *columns, const char *table);
+    void		free_data();
+    int		get_align(const char *p, int a);
+    const char	*get_attr(const char *p, const char *n, char *buf, int bufsize);
+    fltk3::Color	get_color(const char *n, fltk3::Color c);
+    fltk3::SharedImage *get_image(const char *name, int W, int H);
+    int		get_length(const char *l);
+    int		handle(int);
+    
+    void          hv_draw(const char *t, int x, int y);
+    char          begin_selection();
+    char          extend_selection();
+    void          end_selection(int c=0);
+    void          clear_global_selection();
+    fltk3::HelpLink  *find_link(int, int);
+    void          follow_link(fltk3::HelpLink*);
+    
+  public:
+    
+    HelpView(int xx, int yy, int ww, int hh, const char *l = 0);
+    ~HelpView();
+    /** Returns the current directory for the text in the buffer. */
+    const char	*directory() const { if (directory_[0]) return (directory_);
+      else return ((const char *)0); }
+    /** Returns the current filename for the text in the buffer. */
+    const char	*filename() const { if (filename_[0]) return (filename_);
+      else return ((const char *)0); }
+    int		find(const char *s, int p = 0);
+    /**
+     This method assigns a callback function to use when a link is
+     followed or a file is loaded (via fltk3::HelpView::load()) that
+     requires a different file or path.
+     
+     The callback function receives a pointer to the fltk3::HelpView
+     widget and the URI or full pathname for the file in question.
+     It must return a pathname that can be opened as a local file or NULL:
+     
+     \code
+     const char *fn(fltk3::Widget *w, const char *uri);
+     \endcode
+     
+     The link function can be used to retrieve remote or virtual
+     documents, returning a temporary file that contains the actual
+     data. If the link function returns NULL, the value of
+     the fltk3::HelpView widget will remain unchanged.
+     
+     If the link callback cannot handle the URI scheme, it should
+     return the uri value unchanged or set the value() of the widget
+     before returning NULL.
+     */
+    void		link(fltk3::HelpFunc *fn) { link_ = fn; }
+    int		load(const char *f);
+    void		resize(int,int,int,int);
+    /** Gets the size of the help view. */
+    int		size() const { return (size_); }
+    void		size(int W, int H) { Widget::size(W, H); }
+    /** Sets the default text color.
+     \todo this call overrides Widget::textcolor. That is bad!
+     */
+    void		textcolor(fltk3::Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
+    /** Returns the current default text color. */
+    fltk3::Color	textcolor() const { return (defcolor_); }
+    /** Sets the default text font. 
+     \todo this call overrides Widget::textfont. That is bad!
+     */
+    void		textfont(fltk3::Font f) { textfont_ = f; format(); }
+    /** Returns the current default text font. */
+    fltk3::Font       textfont() const { return (textfont_); }
+    /** Sets the default text size. 
+     \todo this call overrides Widget::textsize. That is bad!
+     */
+    void		textsize(fltk3::Fontsize s) { textsize_ = s; format(); }
+    /** Gets the default text size. */
+    fltk3::Fontsize  textsize() const { return (textsize_); }
+    /** Returns the current document title, or NULL if there is no title. */
+    const char	*title() { return (title_); }
+    void		topline(const char *n);
+    void		topline(int);
+    /** Returns the current top line in pixels. */
+    int		topline() const { return (topline_); }
+    void		leftline(int);
+    /** Gets the left position in pixels. */
+    int		leftline() const { return (leftline_); }
+    void		value(const char *val);
+    /** Returns the current buffer contents. */
+    const char	*value() const { return (value_); }
+    void          clear_selection();
+    void          select_all();
+    /**
+     Gets the current size of the scrollbars' troughs, in pixels.
+     
+     If this value is zero (default), this widget will use the 
+     fltk3::scrollbar_size() value as the scrollbar's width.
+     
+     \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollbar_size() is being used.
+     \see fltk3::scrollbar_size(int)
+     */
+    int scrollbar_size() const {
+      return(scrollbar_size_);
+    }
+    /**
+     Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
+     
+     Normally you should not need this method, and should use
+     fltk3::scrollbar_size(int) instead to manage the size of ALL 
+     your widgets' scrollbars. This ensures your application 
+     has a consistent UI, is the default behavior, and is normally
+     what you want.
+     
+     Only use THIS method if you really need to override the global
+     scrollbar size. The need for this should be rare.
+     
+     Setting \p size to the special value of 0 causes the widget to
+     track the global fltk3::scrollbar_size(), which is the default.
+     
+     \param[in] size Sets the scrollbar size in pixels.\n
+     If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+     \see fltk3::scrollbar_size()
+     */
+    void scrollbar_size(int size) {
+      scrollbar_size_ = size;
+    }   
+  };
+  
+}
+
+#endif // !Fltk3_Help_View_H
+
+//
+// End of "$Id: HelpView.h 8306 2011-01-24 17:04:22Z matt $".
+//

Deleted: branches/branch-3.0/include/fltk3/Input_.h

Copied: branches/branch-3.0/include/fltk3/Input_.h (from rev 8988, branches/branch-3.0/fltk3/Input_.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Input_.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Input_.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,467 @@
+//
+// "$Id: Input_.h 8068 2010-12-20 07:48:59Z greg.ercolano $"
+//
+// Input base class header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::Input_ widget . */
+
+#ifndef Fltk3_Input__H
+#define Fltk3_Input__H
+
+#include "Widget.h"
+
+
+class Fl_Input_;
+
+
+namespace fltk3 {
+  
+  const uchar NORMAL_INPUT	= 0;
+  const uchar FLOAT_INPUT	= 1;
+  const uchar INT_INPUT		= 2;
+  const uchar HIDDEN_INPUT	= 3;
+  const uchar MULTILINE_INPUT	= 4;
+  const uchar SECRET_INPUT	= 5;
+  const uchar INPUT_TYPE	= 7;
+  const uchar INPUT_READONLY	= 8;
+  const uchar NORMAL_OUTPUT	= (fltk3::NORMAL_INPUT | fltk3::INPUT_READONLY);
+  const uchar MULTILINE_OUTPUT	= (fltk3::MULTILINE_INPUT | fltk3::INPUT_READONLY);
+  const uchar INPUT_WRAP	= 16;
+  const uchar MULTILINE_INPUT_WRAP = (fltk3::MULTILINE_INPUT | fltk3::INPUT_WRAP);
+  const uchar MULTILINE_OUTPUT_WRAP = (fltk3::MULTILINE_INPUT | fltk3::INPUT_READONLY | fltk3::INPUT_WRAP);
+  
+  /**
+   This class provides a low-overhead text input field.
+   
+   This is a virtual base class below fltk3::Input. It has all
+   the same interfaces, but lacks the handle() and
+   draw() method. You may want to subclass it if you are
+   one of those people who likes to change how the editing keys
+   work. It may also be useful for adding scrollbars
+   to the input field.
+   
+   This can act like any of the subclasses of fltk3::Input, by
+   setting type() to one of the following values:
+   
+   \code
+   #define fltk3::NORMAL_INPUT	   0
+   #define fltk3::FLOAT_INPUT	   1
+   #define fltk3::INT_INPUT		   2
+   #define fltk3::MULTILINE_INPUT	   4
+   #define fltk3::SECRET_INPUT	   5
+   #define fltk3::INPUT_TYPE		   7
+   #define fltk3::INPUT_READONLY	   8
+   #define fltk3::NORMAL_OUTPUT	   (fltk3::NORMAL_INPUT | fltk3::INPUT_READONLY)
+   #define fltk3::MULTILINE_OUTPUT	   (fltk3::MULTILINE_INPUT | fltk3::INPUT_READONLY)
+   #define fltk3::INPUT_WRAP		   16
+   #define fltk3::MULTILINE_INPUT_WRAP  (fltk3::MULTILINE_INPUT | fltk3::INPUT_WRAP)
+   #define fltk3::MULTILINE_OUTPUT_WRAP (fltk3::MULTILINE_INPUT | fltk3::INPUT_READONLY | fltk3::INPUT_WRAP)
+   \endcode
+   
+   All variables that represent an index into a text buffer are byte-oriented,
+   not character oriented. Since UTF-8 characters can be up to six bytes long,
+   simply incrementing such an index will not reliably advance to the next character
+   in the text buffer.
+   
+   Indices and pointers into the text buffer should always point at a 7 bit ASCII
+   character or the beginning of a UTF-8 character sequence. Behavior for false
+   UTF-8 sequences and pointers into the middle of a sequence are undefined.
+   
+   \see fltk3::TextDisplay, fltk3::TextEditor for more powerful text handling widgets
+   
+   \internal
+   When porting this widget from ASCII to UTF-8, previously legal pointers into
+   the text of this widget can become illegal by pointing into the middle of
+   a UTF-8 sequence. This is not a big problem for fltk3::Input_ because all code
+   in this module is quite tolerant. It could be problematic though when deriving
+   from this class because no feedback for illegal pointers is given. Additionally,
+   a careless "copy" call can put partial UTF-8 sequences into the clipboard.
+   
+   None of these issues should be disastrous. Nevertheless, we should
+   discuss how FLTK should handle false UTF-8 sequences and pointers.
+   */
+  class FLTK3_EXPORT Input_ : public fltk3::Widget {
+   
+    friend class ::Fl_Input_;
+ 
+    /** \internal Storage for the text field. */
+    const char* value_;
+    
+    /** \internal Buffer memory for expanded text. \see expand() */
+    char* buffer;
+    
+    /** \internal Size of text in bytes in the \p value_ field. */
+    int size_;
+    
+    /** \internal \todo Please document me! */
+    int bufsize;
+    
+    /** \internal Position of the cursor in the document. */
+    int position_;
+    
+    /** \internal Position of the other end of the selected text. If \p position_ equals 
+     \p mark_, no text is selected */
+    int mark_;
+    
+    /** \internal Behavior of Tab key in multiline input widget. 
+     If enabled (default) Tab causes focus nav, otherwise Tab is inserted 
+     as a character. */
+    int tab_nav_;
+    
+    /** \internal Offset to text origin within widget bounds */
+    int xscroll_, yscroll_;
+    
+    /** \internal Minimal update pointer. Display requires redraw from here to the end
+     of the buffer. */
+    int mu_p;
+    
+    /** \internal Maximum size of buffer. \todo Is this really needed? */
+    int maximum_size_;
+    
+    /** \internal Shortcut key that will fetch focus for this widget. */
+    unsigned int shortcut_;
+    
+    /** \internal This is set if no text but only the cursor needs updating. */
+    uchar erase_cursor_only;
+    
+    /** \internal color of the text cursor */
+    fltk3::Color cursor_color_;
+    
+    /** \internal Horizontal cursor position in pixels while moving up or down. */
+    static double up_down_pos;
+    
+    /** \internal Flag to remember last cursor move. */
+    static int was_up_down;
+    
+    /* Convert a given text segment into the text that will be rendered on screen. */
+    const char* expand(const char*, char*) const;
+    
+    /* Calculates the width in pixels of part of a text buffer. */
+    double expandpos(const char*, const char*, const char*, int*) const;
+    
+    /* Mark a range of characters for update. */
+    void minimal_update(int, int);
+    
+    /* Mark a range of characters for update. */
+    void minimal_update(int p);
+    
+    /* Copy the value from a possibly static entry into the internal buffer. */
+    void put_in_buffer(int newsize);
+    
+    /* Set the current font and font size. */
+    void setfont() const;
+    
+  protected:
+    
+    /* Find the start of a word. */
+    int word_start(int i) const;
+    
+    /* Find the end of a word. */
+    int word_end(int i) const;
+    
+    /* Find the start of a line. */
+    int line_start(int i) const;
+    
+    /* Find the end of a line. */
+    int line_end(int i) const;
+    
+    /* Draw the text in the passed bounding box. */
+    void drawtext(int, int, int, int);
+    
+    /* Move the cursor to the column given by up_down_pos. */
+    int up_down_position(int, int keepmark=0);
+    
+    /* Handle mouse clicks and mouse moves. */
+    void handle_mouse(int, int, int, int, int keepmark=0);
+    
+    /* Handle all kinds of text field related events. */
+    int handletext(int e, int, int, int, int);
+    
+    /* Check the when() field and do a callback if indicated. */
+    void maybe_do_callback();
+    
+    /** \internal Horizontal offset of text to left edge of widget. */
+    int xscroll() const {return xscroll_;}
+    
+    /** \internal Vertical offset of text to top edge of widget. */
+    int yscroll() const {return yscroll_;}
+    void yscroll(int y) { yscroll_ = y; damage(fltk3::DAMAGE_EXPOSE);}
+    
+    /* Return the number of lines displayed on a single page.  */
+    int linesPerPage();
+    
+  public:
+    
+    /* Change the size of the widget. */
+    void resize(int, int, int, int);
+    
+    /* Constructor */
+    Input_(int, int, int, int, const char* = 0);
+    
+    /* Destructor */
+    ~Input_();
+    
+    /* Changes the widget text. */
+    int value(const char*);
+    
+    /* Changes the widget text. */
+    int value(const char*, int);
+    
+    /* Changes the widget text. */
+    int static_value(const char*);
+    
+    /* Changes the widget text. */
+    int static_value(const char*, int);
+    
+    /**
+     Returns the text displayed in the widget.
+     
+     This function returns the current value, which is a pointer
+     to the internal buffer and is valid only until the next event is
+     handled.
+     
+     \return pointer to an internal buffer - do not free() this    
+     \see fltk3::Input_::value(const char*)
+     */
+    const char* value() const {return value_;}
+    
+    /* Returns the character at index \p i. */
+    fltk3::Char index(int i) const;
+    
+    /**
+     Returns the number of bytes in value(). 
+     
+     This may be greater than <tt>strlen(value())</tt> if there are 
+     \c nul characters in the text.
+     
+     \return number of bytes in the text
+     */
+    int size() const {return size_;}
+    
+    /** Sets the width and height of this widget.
+     \param [in] W, H new width and height
+     \see fltk3::Widget::size(int, int) */
+    void size(int W, int H) { Widget::size(W, H); }
+    
+    /** Gets the maximum length of the input field.  
+     \todo It is not clear if this function is actually required */
+    int maximum_size() const {return maximum_size_;}
+    
+    /** Sets the maximum length of the input field. 
+     \todo It is not clear if this function is actually required */
+    void maximum_size(int m) {maximum_size_ = m;}
+    
+    /** Gets the position of the text cursor.
+     \return the cursor position as an index
+     \see position(int, int)
+     */
+    int position() const {return position_;}
+    
+    /** Gets the current selection mark. 
+     \return index into the text */
+    int mark() const {return mark_;}
+    
+    /* Sets the index for the cursor and mark. */
+    int position(int p, int m);
+    
+    /** Set the cursor position and mark.
+     position(n) is the same as <tt>position(n, n)</tt>.
+     \param p new index for cursor and mark
+     \return 0 if no positions changed
+     \see position(int, int), position(), mark(int)
+     */
+    int position(int p) {return position(p, p);}
+    
+    /** Sets the current selection mark. 
+     mark(n) is the same as <tt>position(position(),n)</tt>.
+     \param m new index of the mark 
+     \return 0 if the mark did not change
+     \see position(), position(int, int) */
+    int mark(int m) {return position(position(), m);}
+    
+    /* Deletes text from b to e and inserts the new string text. */
+    int replace(int, int, const char*, int=0);
+    
+    /**
+     Deletes the current selection.
+     
+     This function deletes the currently selected text
+     \e without storing it in the clipboard. To use the clipboard,
+     you may call copy() first or copy_cuts() after
+     this call.
+     
+     \return 0 if no data was copied
+     */
+    int cut() {return replace(position(), mark(), 0);}
+    
+    /**
+     Deletes the next \p n bytes rounded to characters before or after the cursor.
+     
+     This function deletes the currently selected text
+     \e without storing it in the clipboard. To use the clipboard,
+     you may call copy() first or copy_cuts() after
+     this call.
+     
+     \param n number of bytes rounded to full characters and clamped to the buffer.
+     A negative number will cut characters to the left of the cursor.
+     \return 0 if no data was copied
+     */
+    int cut(int n) {return replace(position(), position()+n, 0);}
+    
+    /**
+     Deletes all characters between index \p a and \p b.
+     
+     This function deletes the currently selected text
+     \e without storing it in the clipboard. To use the clipboard,
+     you may call copy() first or copy_cuts() after
+     this call.
+     
+     \param a, b range of bytes rounded to full characters and clamped to the buffer
+     \return 0 if no data was copied
+     */
+    int cut(int a, int b) {return replace(a, b, 0);}
+    
+    /**
+     Inserts text at the cursor position.
+     
+     This function inserts the string in \p t at the cursor
+     position() and moves the new position and mark to
+     the end of the inserted text.
+     
+     \param [in] t text that will be inserted
+     \param [in] l length of text, or 0 if the string is terminated by \c nul.
+     \return 0 if no text was inserted
+     */
+    int insert(const char* t, int l=0){return replace(position_, mark_, t, l);}
+    
+    /* Put the current selection into the clipboard. */
+    int copy(int clipboard);
+    
+    /* Undo previous changes to the text buffer. */
+    int undo();
+    
+    /* Copy the yank buffer to the clipboard. */
+    int copy_cuts();
+    
+    /** Return the shortcut key associated with this widget.
+     \return shortcut keystroke
+     \see fltk3::Button::shortcut() */
+    unsigned int shortcut() const {return shortcut_;}
+    
+    /** 
+     Sets the shortcut key associated with this widget.
+     Pressing the shortcut key gives text editing focus to this widget.
+     \param [in] s new shortcut keystroke 
+     \see fltk3::Button::shortcut() 
+     */
+    void shortcut(unsigned int s) {shortcut_ = s;}
+    
+    /** Gets the color of the cursor.  
+     \return the current cursor color */
+    fltk3::Color cursor_color() const {return cursor_color_;}
+    
+    /** Sets the color of the cursor.  
+     The default color for the cursor is \c fltk3::BLACK.
+     \param [in] n the new cursor color */
+    void cursor_color(fltk3::Color n) {cursor_color_ = n;}
+    
+    /** Gets the input field type. 
+     \return the current input type */
+    int input_type() const {return type() & fltk3::INPUT_TYPE; }
+    
+    /** Sets the input field type. 
+     A redraw() is required to reformat the input field.
+     \param [in] t new input type */
+    void input_type(int t) { type((uchar)(t | readonly())); }
+    
+    /** Gets the read-only state of the input field.  
+     \return non-zero if this widget is read-only */
+    int readonly() const { return type() & fltk3::INPUT_READONLY; }
+    
+    /** Sets the read-only state of the input field.  
+     \param [in] b if \p b is 0, the text in this widget can be edited by the user */
+    void readonly(int b) { if (b) type((uchar)(type() | fltk3::INPUT_READONLY));
+      else type((uchar)(type() & ~fltk3::INPUT_READONLY)); }
+    
+    /**
+     Gets  the word wrapping state of the input field. 
+     Word wrap is only functional with multi-line input fields.
+     */
+    int wrap() const { return type() & fltk3::INPUT_WRAP; }
+    
+    /**
+     Sets the word wrapping state of the input field. 
+     Word wrap is only functional with multi-line input fields.
+     */
+    void wrap(int b) { if (b) type((uchar)(type() | fltk3::INPUT_WRAP));
+      else type((uchar)(type() & ~fltk3::INPUT_WRAP)); }
+    
+    /**
+     Sets whether the Tab key does focus navigation, 
+     or inserts tab characters into fltk3::MultilineInput.
+     
+     By default this flag is enabled to provide the 'normal' behavior 
+     most users expect; Tab navigates focus to the next widget. 
+     To inserting an actual Tab character, users can use Ctrl-I
+     or copy/paste.
+     
+     Disabling this flag gives the old FLTK behavior where Tab
+     inserts a tab character into the text field, in which case
+     only the mouse can be used to navigate to the next field.
+     
+     History: This flag was provided for backwards support of FLTK's old 1.1.x
+     behavior where Tab inserts a tab character instead of navigating 
+     focus to the next widget. This behavior was unique to fltk3::MultilineInput. 
+     With the advent of fltk3::TextEditor, this old behavior has been deprecated.
+     
+     \param [in] val If \p val is 1, Tab advances focus (default).<BR>
+     If \p val is 0, Tab inserts a tab character (old FLTK behavior).
+     */
+    void tab_nav(int val) {
+      tab_nav_ = val;
+    }
+    
+    /**
+     Gets whether the Tab key causes focus navigation in multiline input fields or not.
+     
+     If enabled (default), hitting Tab causes focus navigation to the next widget.
+     
+     If disabled, hitting Tab inserts a tab character into the text field.
+     \returns 1 if Tab advances focus (default), 0 if Tab inserts tab characters.
+     \see tab_nav(int)
+     */
+    int tab_nav() const {
+      return tab_nav_;
+    }
+  };
+  
+}
+
+#endif 
+
+//
+// End of "$Id: Input_.h 8068 2010-12-20 07:48:59Z greg.ercolano $".
+//

Deleted: branches/branch-3.0/include/fltk3/MenuItem.h

Copied: branches/branch-3.0/include/fltk3/MenuItem.h (from rev 8988, branches/branch-3.0/fltk3/MenuItem.h)
===================================================================
--- branches/branch-3.0/include/fltk3/MenuItem.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/MenuItem.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,433 @@
+//
+// "$Id: MenuItem.h 7983 2010-12-09 00:04:06Z AlbrechtS $"
+//
+// Menu item header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifndef Fltk3_Menu_Item_H
+#define Fltk3_Menu_Item_H
+
+#  include "Widget.h"
+#  include "Image.h"
+
+#  if defined(__APPLE__) && defined(check)
+#    undef check
+#  endif
+
+
+namespace fltk3 {
+  
+  class Menu_;
+  
+  enum { // values for flags:
+    MENU_INACTIVE = 1,		///< Deactivate menu item (gray out)
+    MENU_TOGGLE= 2,		///< Item is a checkbox toggle (shows checkbox for on/off state)
+    MENU_VALUE = 4,		///< The on/off state for checkbox/radio buttons (if set, state is 'on')
+    MENU_RADIO = 8,		///< Item is a radio button (one checkbox of many can be on)
+    MENU_INVISIBLE = 0x10,	///< Item will not show up (shortcut will work)
+    SUBMENU_POINTER = 0x20,	///< Indicates user_data() is a pointer to another menu array
+    SUBMENU = 0x40,		///< This item is a submenu to other items
+    MENU_DIVIDER = 0x80,	///< Creates divider line below this item. Also ends a group of radio buttons.
+    MENU_HORIZONTAL = 0x100	///< ??? -- reserved
+  };
+  
+  extern FLTK3_EXPORT fltk3::Shortcut old_shortcut(const char*);
+    
+  /**
+   The fltk3::MenuItem structure defines a single menu item that
+   is used by the fltk3::Menu_ class.  
+   \code
+   struct fltk3::MenuItem {
+   const char*		text;     // label()
+   ulong		shortcut_;
+   fltk3::Callback*		callback_;
+   void*		user_data_;
+   int			flags;
+   uchar		labeltype_;
+   uchar		labelfont_;
+   uchar		labelsize_;
+   uchar		labelcolor_;
+   };
+   
+   enum { // values for flags:
+   fltk3::MENU_INACTIVE	= 1,      // Deactivate menu item (gray out)
+   fltk3::MENU_TOGGLE	= 2,      // Item is a checkbox toggle (shows checkbox for on/off state)
+   fltk3::MENU_VALUE	= 4,      // The on/off state for checkbox/radio buttons (if set, state is 'on')
+   fltk3::MENU_RADIO	= 8,      // Item is a radio button (one checkbox of many can be on)
+   fltk3::MENU_INVISIBLE	= 0x10,   // Item will not show up (shortcut will work)
+   fltk3::SUBMENU_POINTER	= 0x20,   // Indicates user_data() is a pointer to another menu array
+   fltk3::SUBMENU		= 0x40,   // This item is a submenu to other items
+   fltk3::MENU_DIVIDER	= 0x80,   // Creates divider line below this item. Also ends a group of radio buttons.
+   fltk3::MENU_HORIZONTAL	= 0x100   // ??? -- reserved
+   };
+   \endcode
+   Typically menu items are statically defined; for example:
+   \code
+   fltk3::MenuItem popup[] = {
+   {"&alpha",   fltk3::ALT+'a', the_cb, (void*)1},
+   {"&beta",    fltk3::ALT+'b', the_cb, (void*)2},
+   {"gamma",    fltk3::ALT+'c', the_cb, (void*)3, fltk3::MENU_DIVIDER},
+   {"&strange",  0,   strange_cb},
+   {"&charm",    0,   charm_cb},
+   {"&truth",    0,   truth_cb},
+   {"b&eauty",   0,   beauty_cb},
+   {"sub&menu",  0,   0, 0, fltk3::SUBMENU},
+   {"one"},
+   {"two"},
+   {"three"},
+   {0},
+   {"inactive", fltk3::ALT+'i', 0, 0, fltk3::MENU_INACTIVE|fltk3::MENU_DIVIDER},
+   {"invisible",fltk3::ALT+'i', 0, 0, fltk3::MENU_INVISIBLE},
+   {"check",    fltk3::ALT+'i', 0, 0, fltk3::MENU_TOGGLE|fltk3::MENU_VALUE},
+   {"box",      fltk3::ALT+'i', 0, 0, fltk3::MENU_TOGGLE},
+   {0}};
+   \endcode
+   produces:
+   
+   \image html   menu.png
+   \image latex  menu.png "menu" width=10cm
+   
+   A submenu title is identified by the bit fltk3::SUBMENU in the 
+   flags field, and ends with a label() that is NULL.
+   You can nest menus to any depth.  A pointer to the first item in the
+   submenu can be treated as an fltk3::Menu array itself.  It is also
+   possible to make separate submenu arrays with fltk3::SUBMENU_POINTER flags.
+   
+   You should use the method functions to access structure members and
+   not access them directly to avoid compatibility problems with future
+   releases of FLTK.
+   */
+  struct FLTK3_EXPORT MenuItem {
+    const char *text;	    ///< menu item text, returned by label()
+    unsigned int shortcut_;	    ///< menu item shortcut
+    fltk3::Callback *callback_;   ///< menu item callback
+    void *user_data_;	    ///< menu item user_data for the menu's callback
+    int flags;		    ///< menu item flags like fltk3::MENU_TOGGLE, fltk3::MENU_RADIO
+    uchar labeltype_;	    ///< how the menu item text looks like
+    fltk3::Font labelfont_;	    ///< which font for this menu item text
+    fltk3::Fontsize labelsize_;   ///< size of menu item text
+    fltk3::Color labelcolor_;	    ///< menu item text color
+    
+    // advance N items, skipping submenus:
+    const fltk3::MenuItem *next(int=1) const;
+    
+    /**
+     Advances a pointer by n items through a menu array, skipping
+     the contents of submenus and invisible items. There are two calls so
+     that you can advance through const and non-const data.
+     */
+    fltk3::MenuItem *next(int i=1) {
+      return (fltk3::MenuItem*)(((const fltk3::MenuItem*)this)->next(i));}
+    
+    /** Returns the first menu item, same as next(0). */
+    const fltk3::MenuItem *first() const { return next(0); }
+    
+    /** Returns the first menu item, same as next(0). */
+    fltk3::MenuItem *first() { return next(0); }
+    
+    // methods on menu items:
+    /**
+     Returns the title of the item.
+     A NULL here indicates the end of the menu (or of a submenu).
+     A '&' in the item will print an underscore under the next letter,
+     and if the menu is popped up that letter will be a "shortcut" to pick
+     that item.  To get a real '&' put two in a row.
+     */
+    const char* label() const {return text;}
+    
+    /**    See const char* fltk3::MenuItem::label() const   */
+    void label(const char* a) {text=a;}
+    
+    /**    See const char* fltk3::MenuItem::label() const   */
+    void label(fltk3::Labeltype a,const char* b) {labeltype_ = a; text = b;}
+    
+    /**
+     Returns the menu item's labeltype.
+     A labeltype identifies a routine that draws the label of the
+     widget.  This can be used for special effects such as emboss, or to use
+     the label() pointer as another form of data such as a bitmap.
+     The value fltk3::NORMAL_LABEL prints the label as text.
+     */
+    fltk3::Labeltype labeltype() const {return (fltk3::Labeltype)labeltype_;}
+    
+    /**
+     Sets the menu item's labeltype.
+     A labeltype identifies a routine that draws the label of the
+     widget.  This can be used for special effects such as emboss, or to use
+     the label() pointer as another form of data such as a bitmap.
+     The value fltk3::NORMAL_LABEL prints the label as text.
+     */
+    void labeltype(fltk3::Labeltype a) {labeltype_ = a;}
+    
+    /**
+     Gets the menu item's label color.
+     This color is passed to the labeltype routine, and is typically the
+     color of the label text.  This defaults to fltk3::BLACK.  If this
+     color is not black fltk will \b not use overlay bitplanes to draw
+     the menu - this is so that images put in the menu draw correctly.
+     */
+    fltk3::Color labelcolor() const {return labelcolor_;}
+    
+    /**
+     Sets the menu item's label color.
+     \see fltk3::Color fltk3::MenuItem::labelcolor() const
+     */
+    void labelcolor(fltk3::Color a) {labelcolor_ = a;}
+    /**
+     Gets the menu item's label font.
+     Fonts are identified by small 8-bit indexes into a table. See the
+     enumeration list for predefined fonts. The default value is a
+     Helvetica font. The function fltk3::set_font() can define new fonts.
+     */
+    fltk3::Font labelfont() const {return labelfont_;}
+    
+    /**
+     Sets the menu item's label font.
+     Fonts are identified by small 8-bit indexes into a table. See the
+     enumeration list for predefined fonts. The default value is a
+     Helvetica font.  The function fltk3::set_font() can define new fonts.
+     */
+    void labelfont(fltk3::Font a) {labelfont_ = a;}
+    
+    /** Gets the label font pixel size/height. */
+    fltk3::Fontsize labelsize() const {return labelsize_;}
+    
+    /** Sets the label font pixel size/height.*/
+    void labelsize(fltk3::Fontsize a) {labelsize_ = a;}
+    
+    /**
+     Returns the callback function that is set for the menu item.
+     Each item has space for a callback function and an argument for that
+     function. Due to back compatibility, the fltk3::MenuItem itself
+     is not passed to the callback, instead you have to get it by calling
+     ((fltk3::Menu_*)w)->mvalue() where w is the widget argument.
+     */
+    fltk3::CallbackPtr callback() const {return callback_;}
+    
+    /**
+     Sets the menu item's callback function and userdata() argument.
+     \see fltk3::CallbackPtr fltk3::MenuItem::callback() const
+     */
+    void callback(fltk3::Callback* c, void* p) {callback_=c; user_data_=p;}
+    
+    /**
+     Sets the menu item's callback function.
+     This method does not set the userdata() argument.
+     \see fltk3::CallbackPtr fltk3::MenuItem::callback() const
+     */
+    void callback(fltk3::Callback* c) {callback_=c;}
+    
+    /**
+     Sets the menu item's callback function.
+     This method does not set the userdata() argument.
+     \see fltk3::CallbackPtr fltk3::MenuItem::callback() const
+     */
+    void callback(fltk3::Callback0*c) {callback_=(fltk3::Callback*)c;}
+    
+    /**
+     Sets the menu item's callback function and userdata() argument.
+     This method does not set the userdata() argument.
+     The argument \p is cast to void* and stored as the userdata()
+     for the menu item's callback function.
+     \see fltk3::CallbackPtr fltk3::MenuItem::callback() const
+     */
+    void callback(fltk3::Callback1*c, long p=0) {callback_=(fltk3::Callback*)c; user_data_=(void*)p;}
+    
+    /**
+     Gets the user_data() argument that is sent to the callback function.
+     */
+    void* user_data() const {return user_data_;}
+    /**
+     Sets the user_data() argument that is sent to the callback function.
+     */
+    void user_data(void* v) {user_data_ = v;}
+    /**
+     Gets the user_data() argument that is sent to the callback function.
+     For convenience you can also define the callback as taking a long
+     argument.  This method casts the stored userdata() argument to long
+     and returns it as a \e long value.
+     */
+    long argument() const {return (long)(fl_intptr_t)user_data_;}
+    /**
+     Sets the user_data() argument that is sent to the callback function.
+     For convenience you can also define the callback as taking a long
+     argument.  This method casts the given argument \p v to void*
+     and stores it in the menu item's userdata() member.
+     This may not be portable to some machines.
+     */
+    void argument(long v) {user_data_ = (void*)v;}
+    
+    /** Gets what key combination shortcut will trigger the menu item. */
+    unsigned int shortcut() const {return shortcut_;}
+    
+    /**
+     Sets exactly what key combination will trigger the menu item.  The
+     value is a logical 'or' of a key and a set of shift flags, for instance 
+     fltk3::ALT+'a' or fltk3::ALT+fltk3::FKey+10 or just 'a'.  A value of
+     zero disables the shortcut.
+     
+     The key can be any value returned by fltk3::event_key(), but will usually 
+     be an ASCII letter. Use a lower-case letter unless you require the shift 
+     key to be held down.
+     
+     The shift flags can be any set of values accepted by fltk3::event_state().
+     If the bit is on that shift key must be pushed.  Meta, Alt, Ctrl, 
+     and Shift must be off if they are not in the shift flags (zero for the 
+     other bits indicates a "don't care" setting).
+     */
+    void shortcut(unsigned int s) {shortcut_ = s;}
+    /**
+     Returns true if either fltk3::SUBMENU or fltk3::SUBMENU_POINTER
+     is on in the flags. fltk3::SUBMENU indicates an embedded submenu
+     that goes from the next item through the next one with a NULL
+     label(). fltk3::SUBMENU_POINTER indicates that user_data()
+     is a pointer to another menu array.
+     */
+    int submenu() const {return flags&(SUBMENU|SUBMENU_POINTER);}
+    /**
+     Returns true if a checkbox will be drawn next to this item.
+     This is true if fltk3::MENU_TOGGLE or fltk3::MENU_RADIO is set in the flags.
+     */
+    int checkbox() const {return flags&MENU_TOGGLE;}
+    /**
+     Returns true if this item is a radio item.
+     When a radio button is selected all "adjacent" radio buttons are
+     turned off.  A set of radio items is delimited by an item that has
+     radio() false, or by an item with fltk3::MENU_DIVIDER turned on.
+     */
+    int radio() const {return flags&MENU_RADIO;}
+    /** Returns the current value of the check or radio item. */
+    int value() const {return flags&MENU_VALUE;}
+    /**
+     Turns the check or radio item "on" for the menu item. Note that this
+     does not turn off any adjacent radio items like set_only() does.
+     */
+    void set() {flags |= MENU_VALUE;}
+    
+    /** Turns the check or radio item "off" for the menu item. */
+    void clear() {flags &= ~MENU_VALUE;}
+    
+    void setonly();
+    
+    /** Gets the visibility of an item. */
+    int visible() const {return !(flags&MENU_INVISIBLE);}
+    
+    /** Makes an item visible in the menu. */
+    void show() {flags &= ~MENU_INVISIBLE;}
+    
+    /** Hides an item in the menu. */
+    void hide() {flags |= MENU_INVISIBLE;}
+    
+    /** Gets whether or not the item can be picked. */
+    int active() const {return !(flags&MENU_INACTIVE);}
+    
+    /** Allows a menu item to be picked. */
+    void activate() {flags &= ~MENU_INACTIVE;}
+    /**
+     Prevents a menu item from being picked. Note that this will also cause
+     the menu item to appear grayed-out.
+     */
+    void deactivate() {flags |= MENU_INACTIVE;}
+    /** Returns non 0 if fltk3::INACTIVE and fltk3::INVISIBLE are cleared, 0 otherwise. */
+    int activevisible() const {return !(flags & (MENU_INACTIVE|MENU_INVISIBLE));}
+    
+    // compatibility for FLUID so it can set the image of a menu item...
+    
+    /** compatibility api for FLUID, same as a->label(this) */
+    void image(fltk3::Image* a) {a->label(this);}
+    
+    /** compatibility api for FLUID, same as a.label(this) */
+    void image(fltk3::Image& a) {a.label(this);}
+    
+    // used by menubar:
+    int measure(int* h, const fltk3::Menu_*) const;
+    void draw(int x, int y, int w, int h, const fltk3::Menu_*, int t=0) const;
+    
+    // popup menus without using an fltk3::Menu_ widget:
+    const fltk3::MenuItem* popup(
+                                 int X, int Y,
+                                 const char *title = 0,
+                                 const fltk3::MenuItem* picked=0,
+                                 const fltk3::Menu_* = 0) const;
+    const fltk3::MenuItem* pulldown(
+                                    int X, int Y, int W, int H,
+                                    const fltk3::MenuItem* picked = 0,
+                                    const fltk3::Menu_* = 0,
+                                    const fltk3::MenuItem* title = 0,
+                                    int menubar=0) const;
+    const fltk3::MenuItem* test_shortcut() const;
+    const fltk3::MenuItem* find_shortcut(int *ip=0, const bool require_alt = false) const;
+    
+    /**
+     Calls the fltk3::MenuItem item's callback, and provides the fltk3::Widget argument.
+     The callback is called with the stored user_data() as its second argument.
+     You must first check that callback() is non-zero before calling this.
+     */
+    void do_callback(fltk3::Widget* o) const {callback_(o, user_data_);}
+    
+    /**
+     Calls the fltk3::MenuItem item's callback, and provides the fltk3::Widget argument.
+     This call overrides the callback's second argument with the given value \p arg.
+     You must first check that callback() is non-zero before calling this.
+     */
+    void do_callback(fltk3::Widget* o,void* arg) const {callback_(o, arg);}
+    
+    /**
+     Calls the fltk3::MenuItem item's callback, and provides the fltk3::Widget argument.
+     This call overrides the callback's second argument with the
+     given value \p arg. long \p arg is cast to void* when calling
+     the callback.
+     You must first check that callback() is non-zero before calling this.
+     */
+    void do_callback(fltk3::Widget* o,long arg) const {callback_(o, (void*)arg);}
+    
+    // back-compatibility, do not use:
+    
+    /** back compatibility only \deprecated. */
+    int checked() const {return flags&MENU_VALUE;}
+    
+    /** back compatibility only \deprecated. */
+    void check() {flags |= MENU_VALUE;}
+    
+    /** back compatibility only \deprecated. */
+    void uncheck() {flags &= ~MENU_VALUE;}
+    
+    int insert(int,const char*,int,fltk3::Callback*,void* =0, int =0);
+    int add(const char*, unsigned int shortcut, fltk3::Callback*, void* =0, int = 0);
+    
+    /** See int add(const char*, unsigned int shortcut, fltk3::Callback*, void*, int) */
+    int add(const char*a, const char* b, fltk3::Callback* c,
+            void* d = 0, int e = 0) {
+      return add(a,fltk3::old_shortcut(b),c,d,e);}
+    
+    int size() const ;
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: MenuItem.h 7983 2010-12-09 00:04:06Z AlbrechtS $".
+//

Deleted: branches/branch-3.0/include/fltk3/Menu_.h

Copied: branches/branch-3.0/include/fltk3/Menu_.h (from rev 8988, branches/branch-3.0/fltk3/Menu_.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Menu_.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Menu_.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,156 @@
+//
+// "$Id: Menu_.h 7903 2010-11-28 21:06:39Z matt $"
+//
+// Menu base class header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::Menu_ widget . */
+
+#ifndef Fltk3_Menu__H
+#define Fltk3_Menu__H
+
+#include "Widget.h"
+#include "MenuItem.h"
+
+
+namespace fltk3 {
+  
+  
+  /**
+   Base class of all widgets that have a menu in FLTK.
+   Currently FLTK provides you with 
+   fltk3::MenuButton, fltk3::MenuBar, and fltk3::Choice.
+   
+   <P>The class contains a pointer to an array of structures of type  fltk3::MenuItem.  The
+   array may either be supplied directly by the user program, or it may
+   be "private": a dynamically allocated array managed by the fltk3::Menu_.
+   */
+  class FLTK3_EXPORT Menu_ : public fltk3::Widget {
+    
+    fltk3::MenuItem *menu_;
+    const fltk3::MenuItem *value_;
+    
+  protected:
+    
+    uchar alloc;			// flag indicates if menu_ is a dynamic copy (=1) or not (=0)
+    uchar down_box_;
+    
+  public:
+    Menu_(int,int,int,int,const char * =0);
+    ~Menu_();
+    
+    int item_pathname(char *name, int namelen, const fltk3::MenuItem *finditem=0) const;
+    const fltk3::MenuItem* picked(const fltk3::MenuItem*);
+    const fltk3::MenuItem* find_item(const char *name);
+    const fltk3::MenuItem* find_item(fltk3::Callback*);
+    int find_index(const char *name) const;
+    int find_index(const fltk3::MenuItem *item) const;
+    int find_index(fltk3::Callback *cb) const;
+    
+    /**
+     Returns the menu item with the entered shortcut (key value).
+     
+     This searches the complete menu() for a shortcut that matches the
+     entered key value.  It must be called for a fltk3::KEYBOARD or fltk3::SHORTCUT
+     event.
+     
+     If a match is found, the menu's callback will be called.
+     
+     \return matched fltk3::MenuItem or NULL.
+     */
+    const fltk3::MenuItem* test_shortcut() {return picked(menu()->test_shortcut());}
+    void global();
+    
+    /**
+     Returns a pointer to the array of fltk3::MenuItems.  This will either be
+     the value passed to menu(value) or the private copy.
+     */  
+    const fltk3::MenuItem *menu() const {return menu_;}
+    void menu(const fltk3::MenuItem *m);
+    void copy(const fltk3::MenuItem *m, void* user_data = 0);
+    int insert(int index, const char*, unsigned int shortcut, fltk3::Callback*, void* = 0, int = 0);
+    int  add(const char*, unsigned int shortcut, fltk3::Callback*, void* = 0, int = 0);
+    /** See int fltk3::Menu_::add(const char* label, unsigned int shortcut, fltk3::Callback*, void *user_data=0, int flags=0) */
+    int  add(const char* a, const char* b, fltk3::Callback* c, void* d = 0, int e = 0) {
+      return add(a,fltk3::old_shortcut(b),c,d,e);
+    }
+    /** See int fltk3::Menu_::insert(const char* label, unsigned int shortcut, fltk3::Callback*, void *user_data=0, int flags=0) */
+    int insert(int index, const char* a, const char* b, fltk3::Callback* c, void* d = 0, int e = 0) {
+      return insert(index,a,fltk3::old_shortcut(b),c,d,e);
+    }
+    int  add(const char *);
+    int  size() const ;
+    void size(int W, int H) { Widget::size(W, H); }
+    void clear();
+    int clear_submenu(int index);
+    void replace(int,const char *);
+    void remove(int);
+    /** Changes the shortcut of item i to n.  */
+    void shortcut(int i, unsigned int s) {menu_[i].shortcut(s);}
+    /** Sets the flags of item i.  For a list of the flags, see fltk3::MenuItem.  */
+    void mode(int i,int fl) {menu_[i].flags = fl;}
+    /** Gets the flags of item i.  For a list of the flags, see fltk3::MenuItem.  */
+    int  mode(int i) const {return menu_[i].flags;}
+    
+    /** Returns a pointer to the last menu item that was picked.  */
+    const fltk3::MenuItem *mvalue() const {return value_;}
+    /** Returns the index into menu() of the last item chosen by the user.  It is zero initially. */
+    int value() const {return value_ ? (int)(value_-menu_) : -1;}
+    int value(const fltk3::MenuItem*);
+    /**
+     The value is the index into menu() of the last item chosen by
+     the user.  It is zero initially.  You can set it as an integer, or set
+     it with a pointer to a menu item.  The set routines return non-zero if
+     the new value is different than the old one.
+     */
+    int value(int i) {return value(menu_+i);}
+    /** Returns the title of the last item chosen.  */
+    const char *text() const {return value_ ? value_->text : 0;}
+    /** Returns the title of item i.  */
+    const char *text(int i) const {return menu_[i].text;}
+    
+    /**
+     This box type is used to surround the currently-selected items in the
+     menus.  If this is fltk3::NO_BOX then it acts like 
+     fltk3::THIN_UP_BOX and selection_color() acts like 
+     fltk3::WHITE, for back compatibility.    
+     */
+    fltk3::Boxtype down_box() const {return (fltk3::Boxtype)down_box_;}
+    /**    See fltk3::Boxtype fltk3::Menu_::down_box() const   */
+    void down_box(fltk3::Boxtype b) {down_box_ = b;}
+    
+    /** For back compatibility, same as selection_color() */
+    fltk3::Color down_color() const {return selection_color();}
+    /** For back compatibility, same as selection_color() */
+    void down_color(unsigned c) {selection_color(c);}
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: Menu_.h 7903 2010-11-28 21:06:39Z matt $".
+//

Copied: branches/branch-3.0/include/fltk3/Style.h (from rev 8989, branches/branch-3.0/fltk3/Style.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Style.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Style.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,39 @@
+//
+// "$Id: Style.h 8623 2011-04-24 17:09:41Z AlbrechtS $"
+//
+// Style header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/** \file
+ fltk3::Style class . */
+
+#ifndef FLTK3_STYLE_H
+#define FLTK3_STYLE_H
+
+
+#endif
+
+//
+// End of "$Id: Style.h 8623 2011-04-24 17:09:41Z AlbrechtS $".
+//

Deleted: branches/branch-3.0/include/fltk3/SysMenuBar.h

Copied: branches/branch-3.0/include/fltk3/SysMenuBar.h (from rev 8988, branches/branch-3.0/fltk3/SysMenuBar.h)
===================================================================
--- branches/branch-3.0/include/fltk3/SysMenuBar.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/SysMenuBar.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,89 @@
+//
+// "$Id: SysMenuBar.h 7903 2010-11-28 21:06:39Z matt $"
+//
+// MacOS system menu bar header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifndef Fltk3_Sys_Menu_Bar_H
+#define Fltk3_Sys_Menu_Bar_H
+
+#include "MenuBar.h"
+#include "x.h"
+
+class Fl_Sys_Menu_Bar;
+
+namespace fltk3 {
+  
+#if defined(__APPLE__) || defined(FLTK3_DOXYGEN)
+  
+  /**
+   @brief A class to create, modify and delete menus that appear on Mac OS X in the menu bar at the top of the screen.
+   *
+   * On other than Mac OS X platforms, fltk3::SysMenuBar is a synonym of class fltk3::MenuBar.
+   */
+  class FLTK3_EXPORT SysMenuBar : public fltk3::MenuBar {
+
+    friend class ::Fl_Sys_Menu_Bar;
+
+  protected:
+    void draw();
+  public:
+    /**
+     @brief The constructor.
+     *
+     * On Mac OS X, all arguments are unused. On other platforms they are used as by fltk3::MenuBar::fltk3::MenuBar().
+     */
+    SysMenuBar(int x,int y,int w,int h,const char *l=0)
+    : fltk3::MenuBar(x,y,w,h,l) {
+      deactivate();			// don't let the old area take events
+      fltk3::sys_menu_bar = this;
+    }
+    void menu(const fltk3::MenuItem *m);
+    int add(const char* label, unsigned int shortcut, fltk3::Callback*, void *user_data=0, int flags=0);
+    int insert(int index, const char* label, unsigned int shortcut, fltk3::Callback *cb, void *user_data=0, int flags=0);
+    void remove(int n);
+    void replace(int rank, const char *name);
+    void clear();
+    int clear_submenu(int index);
+#if ! defined(FLTK3_DOXYGEN)
+    enum menuOrItemOperation { itemAtIndex, setKeyEquivalent, setKeyEquivalentModifierMask, setState, initWithTitle,
+      numberOfItems, setSubmenu, setEnabled, addSeparatorItem, setTitle, removeItem, addNewItem, renameItem };
+    // function doMenuOrItemOperation is in file F|_cocoa.mm because it contains objective-c code
+    static void *doMenuOrItemOperation( menuOrItemOperation operation, ...);
+#endif
+  };
+  
+#else
+  
+  typedef MenuBar SysMenuBar;
+  
+#endif // defined(__APPLE__) || defined(FLTK3_DOXYGEN)
+  
+}
+
+#endif // Fltk3_Sys_Menu_Bar_H
+
+//
+// End of "$Id: SysMenuBar.h 7903 2010-11-28 21:06:39Z matt $".
+//

Deleted: branches/branch-3.0/include/fltk3/TextDisplay.h

Copied: branches/branch-3.0/include/fltk3/TextDisplay.h (from rev 8988, branches/branch-3.0/fltk3/TextDisplay.h)
===================================================================
--- branches/branch-3.0/include/fltk3/TextDisplay.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/TextDisplay.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,466 @@
+//
+// "$Id: TextDisplay.h 8306 2011-01-24 17:04:22Z matt $"
+//
+// Header file for fltk3::TextDisplay class.
+//
+// Copyright 2001-2010 by Bill Spitzak and others.
+// Original code Copyright Mark Edel.  Permission to distribute under
+// the LGPL for the FLTK library granted by Mark Edel.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::TextDisplay widget . */
+
+#ifndef FLtk3_TEXT_DISPLAY_H
+#define FLtk3_TEXT_DISPLAY_H
+
+#include "draw.h"
+#include "Group.h"
+#include "Widget.h"
+#include "Scrollbar.h"
+#include "TextBuffer.h"
+
+
+class Fl_Text_Display;
+
+
+namespace fltk3 {
+  
+/**
+ \brief Rich text display widget.
+ 
+ This is the FLTK text display widget. It allows the user to view multiple lines
+ of text and supports highlighting and scrolling. The buffer that is displayed 
+ in the widget is managed by the fltk3::TextBuffer class. A single Text Buffer
+ can be displayed by multiple Text Displays.
+ */
+class FLTK3_EXPORT TextDisplay: public fltk3::Group {
+
+friend class ::Fl_Text_Display;
+
+public:
+  
+  /** 
+   text display cursor shapes enumeration 
+   */
+  enum {
+    NORMAL_CURSOR,    /**< I-beam */
+    CARET_CURSOR,     /**< caret under the text */
+    DIM_CURSOR,       /**< dim I-beam */
+    BLOCK_CURSOR,     /**< unfille box under the current character */
+    HEAVY_CURSOR      /**< thick I-beam */
+  };
+  
+  /**
+   the character position is the left edge of a character, whereas 
+   the cursor is thought to be between the centers of two consecutive
+   characters.
+   */
+  enum {
+    CURSOR_POS, 
+    CHARACTER_POS
+  };
+  
+  /** 
+   drag types - they match fltk3::event_clicks() so that single clicking to
+   start a collection selects by character, double clicking selects by
+   word and triple clicking selects by line.
+   */
+  enum {
+    DRAG_NONE = -2,
+    DRAG_START_DND = -1,
+    DRAG_CHAR = 0, 
+    DRAG_WORD = 1, 
+    DRAG_LINE = 2
+  };
+  
+  /**
+   wrap types - used in wrap_mode()
+   */
+  enum {
+    WRAP_NONE,      /**< don't wrap text at all */
+    WRAP_AT_COLUMN, /**< wrap text at the given text column */
+    WRAP_AT_PIXEL,  /**< wrap text at a pixel position */
+    WRAP_AT_BOUNDS  /**< wrap text so that it fits into the widget width */
+  };    
+  
+  friend void text_drag_me(int pos, fltk3::TextDisplay* d);
+  
+  typedef void (*UnfinishedStyleCb)(int, void *);
+  
+  /** 
+   This structure associates the color, font, andsize of a string to draw
+   with an attribute mask matching attr
+   */
+  struct StyleTableEntry {
+    fltk3::Color    color;
+    fltk3::Font     font;
+    fltk3::Fontsize size;
+    unsigned    attr;
+  };
+  
+  TextDisplay(int X, int Y, int W, int H, const char *l = 0);
+  ~TextDisplay();
+  
+  virtual int handle(int e);
+  
+  void buffer(fltk3::TextBuffer* buf);
+  
+  /**
+   Sets the current text buffer associated with the text widget.
+   Multiple text widgets can be associated with the same text buffer.
+   \param buf new text buffer
+   */
+  void buffer(fltk3::TextBuffer& buf) { buffer(&buf); }
+  
+  /**
+   Gets the current text buffer associated with the text widget.
+   Multiple text widgets can be associated with the same text buffer.
+   \return current text buffer
+   */
+  fltk3::TextBuffer* buffer() const { return mBuffer; }
+  
+  void redisplay_range(int start, int end);
+  void scroll(int topLineNum, int horizOffset);
+  void insert(const char* text);
+  void overstrike(const char* text);
+  void insert_position(int newPos);
+  
+  /** 
+   Gets the position of the text insertion cursor for text display.
+   \return insert position index into text buffer 
+   */
+  int insert_position() const { return mCursorPos; }
+  int position_to_xy(int pos, int* x, int* y) const;
+
+  int in_selection(int x, int y) const;
+  void show_insert_position();
+  
+  int move_right();
+  int move_left();
+  int move_up();  
+  int move_down();
+  int count_lines(int start, int end, bool start_pos_is_line_start) const;
+  int line_start(int pos) const;
+  int line_end(int startPos, bool startPosIsLineStart) const;
+  int skip_lines(int startPos, int nLines, bool startPosIsLineStart);
+  int rewind_lines(int startPos, int nLines);
+  void next_word(void);
+  void previous_word(void);
+  
+  void show_cursor(int b = 1);
+  
+  /**
+   Hides the text cursor.
+   */
+  void hide_cursor() { show_cursor(0); }
+  
+  void cursor_style(int style);
+  
+  /**
+   Gets the text cursor color.  
+   \return cursor color
+   */
+  fltk3::Color cursor_color() const {return mCursor_color;}
+  
+  /**    
+   Sets the text cursor color.
+   \param n new cursor color
+   */
+  void cursor_color(fltk3::Color n) {mCursor_color = n;}
+  
+  /**   
+   Gets the width/height of the scrollbars.
+   /return width of scrollbars
+   */
+  int scrollbar_width() const { return scrollbar_width_; }
+  
+  /**
+   Sets the width/height of the scrollbars.
+   \param W width of scrollbars
+   */
+  void scrollbar_width(int W) { scrollbar_width_ = W; }
+  
+  /**
+   Gets the scrollbar alignment type.
+   \return scrollbar alignment
+   */
+  fltk3::Align scrollbar_align() const { return scrollbar_align_; }
+  
+  /**
+   Sets the scrollbar alignment type.
+   \param a new scrollbar alignment
+   */
+  void scrollbar_align(fltk3::Align a) { scrollbar_align_ = a; }
+  
+  /**
+   Moves the insert position to the beginning of the current word.
+   \param pos start calculation at this index
+   \return beginning of the words
+   */
+  int word_start(int pos) const { return buffer()->word_start(pos); }
+  
+  /** 
+   Moves the insert position to the end of the current word.
+   \param pos start calculation at this index
+   \return index of first character after the end of the word
+   */
+  int word_end(int pos) const { return buffer()->word_end(pos); }
+  
+  
+  void highlight_data(fltk3::TextBuffer *styleBuffer,
+                      const StyleTableEntry *styleTable,
+                      int nStyles, char unfinishedStyle,
+                      UnfinishedStyleCb unfinishedHighlightCB,
+                      void *cbArg);
+  
+  int position_style(int lineStartPos, int lineLen, int lineIndex) const;
+  
+  /** 
+   \todo FIXME : get set methods pointing on shortcut_ 
+   have no effects as shortcut_ is unused in this class and derived! 
+   \return the current shortcut key
+   */
+  unsigned int shortcut() const {return shortcut_;}
+  
+  /**
+   \todo FIXME : get set methods pointing on shortcut_ 
+   have no effects as shortcut_ is unused in this class and derived! 
+   \param s the new shortcut key
+   */
+  void shortcut(unsigned int s) {shortcut_ = s;}
+  
+  /**
+   Sets the default font used when drawing text in the widget.
+   \param s default text font face
+   \todo textfont is a method of Widget and should not have this side effect
+   */
+  void textfont(fltk3::Font s) {Widget::textfont(s); mColumnScale = 0;}
+  
+  /**
+   Sets the default size of text in the widget.
+   \param s new text size
+   \todo textsize is a method of Widget and should not have this side effect
+   */
+  void textsize(fltk3::Fontsize s) {Widget::textsize(s); mColumnScale = 0;}
+  fltk3::Font textfont() const {return Widget::textfont();}
+  fltk3::Fontsize textsize() const {return Widget::textsize();}
+  
+  int wrapped_column(int row, int column) const;
+  int wrapped_row(int row) const;
+  void wrap_mode(int wrap, int wrap_margin);
+  
+  virtual void resize(int X, int Y, int W, int H);
+
+  /**
+   Convert an x pixel position into a column number.
+   \param x number of pixels from the left margin
+   \return an approximate column number based on the main font
+   */
+  double x_to_col(double x) const;
+  
+  /**
+   Convert a column number into an x pixel position.
+   \param col an approximate column number based on the main font
+   \return number of pixels from the left margin to the left of an
+	   average sized character
+   */
+  double col_to_x(double col) const;
+  
+protected:
+  // Most (all?) of this stuff should only be called from resize() or
+  // draw().
+  // Anything with "vline" indicates thats it deals with currently
+  // visible lines.
+  
+  virtual void draw();
+  void draw_text(int X, int Y, int W, int H);
+  void draw_range(int start, int end);
+  void draw_cursor(int, int);
+  
+  void draw_string(int style, int x, int y, int toX, const char *string,
+                   int nChars) const;
+  
+  void draw_vline(int visLineNum, int leftClip, int rightClip,
+                  int leftCharIndex, int rightCharIndex);
+  
+  int find_x(const char *s, int len, int style, int x) const;
+  
+  enum { 
+    DRAW_LINE, 
+    FIND_INDEX,
+    FIND_INDEX_FROM_ZERO,
+    GET_WIDTH 
+  };
+  
+  int handle_vline(int mode, 
+                   int lineStart, int lineLen, int leftChar, int rightChar,
+                   int topClip, int bottomClip,
+                   int leftClip, int rightClip) const;
+  
+  void draw_line_numbers(bool clearAll);
+  
+  void clear_rect(int style, int x, int y, int width, int height) const;
+  void display_insert();
+  
+  void offset_line_starts(int newTopLineNum);
+  
+  void calc_line_starts(int startLine, int endLine);
+  
+  void update_line_starts(int pos, int charsInserted, int charsDeleted,
+                          int linesInserted, int linesDeleted, int *scrolled);
+  
+  void calc_last_char();
+  
+  int position_to_line( int pos, int* lineNum ) const;
+  double string_width(const char* string, int length, int style) const;
+  
+  static void scroll_timer_cb(void*);
+  
+  static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg);
+  static void buffer_modified_cb(int pos, int nInserted, int nDeleted,
+                                 int nRestyled, const char* deletedText,
+                                 void* cbArg);
+  
+  static void h_scrollbar_cb(fltk3::Scrollbar* w, fltk3::TextDisplay* d);
+  static void v_scrollbar_cb( fltk3::Scrollbar* w, fltk3::TextDisplay* d);
+  void update_v_scrollbar();
+  void update_h_scrollbar();
+  int measure_vline(int visLineNum) const;
+  int longest_vline() const;
+  int empty_vlines() const;
+  int vline_length(int visLineNum) const;
+  int xy_to_position(int x, int y, int PosType = CHARACTER_POS) const;
+  
+  void xy_to_rowcol(int x, int y, int* row, int* column,
+                    int PosType = CHARACTER_POS) const;
+  void maintain_absolute_top_line_number(int state);
+  int get_absolute_top_line_number() const;
+  void absolute_top_line_number(int oldFirstChar);
+  int maintaining_absolute_top_line_number() const;
+  void reset_absolute_top_line_number();
+  int position_to_linecol(int pos, int* lineNum, int* column) const;
+  int scroll_(int topLineNum, int horizOffset);
+  
+  void extend_range_for_styles(int* start, int* end);
+  
+  void find_wrap_range(const char *deletedText, int pos, int nInserted,
+                       int nDeleted, int *modRangeStart, int *modRangeEnd,
+                       int *linesInserted, int *linesDeleted);
+  void measure_deleted_lines(int pos, int nDeleted);
+  void wrapped_line_counter(fltk3::TextBuffer *buf, int startPos, int maxPos,
+                            int maxLines, bool startPosIsLineStart,
+                            int styleBufOffset, int *retPos, int *retLines,
+                            int *retLineStart, int *retLineEnd,
+                            bool countLastLineMissingNewLine = true) const;
+  void find_line_end(int pos, bool start_pos_is_line_start, int *lineEnd,
+                     int *nextLineStart) const;
+  double measure_proportional_character(const char *s, int colNum, int pos) const;
+  int wrap_uses_character(int lineEndPos) const;
+  
+  int damage_range1_start, damage_range1_end;
+  int damage_range2_start, damage_range2_end;
+  int mCursorPos;
+  int mCursorOn;
+  int mCursorOldY;              /* Y pos. of cursor for blanking */
+  int mCursorToHint;            /* Tells the buffer modified callback
+                                 where to move the cursor, to reduce
+                                 the number of redraw calls */
+  int mCursorStyle;             /* One of enum cursorStyles above */
+  int mCursorPreferredXPos;     /* Pixel position for vert. cursor movement */
+  int mNVisibleLines;           /* # of visible (displayed) lines */
+  int mNBufferLines;            /* # of newlines in the buffer */
+  fltk3::TextBuffer* mBuffer;      /* Contains text to be displayed */
+  fltk3::TextBuffer* mStyleBuffer; /* Optional parallel buffer containing
+                                 color and font information */
+  int mFirstChar, mLastChar;    /* Buffer positions of first and last
+                                 displayed character (lastChar points
+                                 either to a newline or one character
+                                 beyond the end of the buffer) */
+  int mContinuousWrap;          /* Wrap long lines when displaying */
+  int mWrapMarginPix; 	    	/* Margin in # of pixels for
+                                 wrapping in continuousWrap mode */
+  int* mLineStarts;
+  int mTopLineNum;              /* Line number of top displayed line
+                                 of file (first line of file is 1) */
+  int mAbsTopLineNum;           /* In continuous wrap mode, the line
+                                  number of the top line if the text
+                                  were not wrapped (note that this is
+                                  only maintained as needed). */
+  int mNeedAbsTopLineNum;       /* Externally settable flag to continue
+                                 maintaining absTopLineNum even if
+                                 it isn't needed for line # display */
+  int mHorizOffset;             /* Horizontal scroll pos. in pixels */
+  int mTopLineNumHint;          /* Line number of top displayed line
+                                 of file (first line of file is 1) */
+  int mHorizOffsetHint;         /* Horizontal scroll pos. in pixels */
+  int mNStyles;                 /* Number of entries in styleTable */
+  const StyleTableEntry *mStyleTable; /* Table of fonts and colors for
+                                         coloring/syntax-highlighting */
+  char mUnfinishedStyle;        /* Style buffer entry which triggers
+                                 on-the-fly reparsing of region */
+  UnfinishedStyleCb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */
+  /* regions */
+  void* mHighlightCBArg;        /* Arg to unfinishedHighlightCB */
+  
+  int mMaxsize;
+  
+  int mSuppressResync;          /* Suppress resynchronization of line
+                                 starts during buffer updates */
+  int mNLinesDeleted;           /* Number of lines deleted during
+                                 buffer modification (only used
+                                 when resynchronization is suppressed) */
+  int mModifyingTabDistance;    /* Whether tab distance is being
+                                 modified */
+  
+  mutable double mColumnScale; /* Width in pixels of an average character. This
+                                 value is calculated as needed (lazy eval); it 
+                                 needs to be mutable so that it can be calculated
+                                 within a method marked as "const" */
+  
+  fltk3::Color mCursor_color;
+  
+  fltk3::Scrollbar* mHScrollBar;
+  fltk3::Scrollbar* mVScrollBar;
+  int scrollbar_width_;
+  fltk3::Align scrollbar_align_;
+  int dragPos, dragType, dragging;
+  int display_insert_position_hint;
+  struct { int x, y, w, h; } text_area;
+  
+  unsigned int shortcut_;
+  
+  // The following are not presently used from the original NEdit code,
+  // but are being put here so that future versions of fltk3::TextDisplay
+  // can implement line numbers without breaking binary compatibility.
+  
+  /* Line number margin and width */
+  int mLineNumLeft, mLineNumWidth;
+};
+
+} // namespace
+
+#endif
+
+//
+// End of "$Id: TextDisplay.h 8306 2011-01-24 17:04:22Z matt $".
+//

Deleted: branches/branch-3.0/include/fltk3/TextEditor.h

Copied: branches/branch-3.0/include/fltk3/TextEditor.h (from rev 8988, branches/branch-3.0/fltk3/TextEditor.h)
===================================================================
--- branches/branch-3.0/include/fltk3/TextEditor.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/TextEditor.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,152 @@
+//
+// "$Id: TextEditor.h 7903 2010-11-28 21:06:39Z matt $"
+//
+// Header file for fltk3::TextEditor class.
+//
+// Copyright 2001-2010 by Bill Spitzak and others.
+// Original code Copyright Mark Edel.  Permission to distribute under
+// the LGPL for the FLTK library granted by Mark Edel.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::TextEditor widget . */
+
+
+#ifndef FLtk3_TEXT_EDITOR_H
+#define FLtk3_TEXT_EDITOR_H
+
+#include "TextDisplay.h"
+
+
+class Fl_Text_Editor;
+
+
+namespace fltk3 {
+
+  // key will match in any state
+  const unsigned int TEXT_EDITOR_ANY_STATE = -1L;
+  
+  /**
+   This is the FLTK text editor widget. It allows the user to
+   edit multiple lines of text and supports highlighting and
+   scrolling. The buffer that is displayed in the widget is managed
+   by the fltk3::TextBuffer
+   class.
+   */
+  class FLTK3_EXPORT TextEditor : public fltk3::TextDisplay {
+
+    friend class ::Fl_Text_Editor;
+
+  public:
+    /** Key function binding callback type */
+    typedef int (*KeyFunc)(unsigned int key, fltk3::TextEditor* editor);
+    
+    /** Simple linked list associating a key/state to a function */
+    struct KeyBinding {
+      unsigned int key;		///< the key pressed
+      unsigned int state;	///< the state of key modifiers
+      KeyFunc     function;	///< associated function
+      KeyBinding* next;	///< next key binding in the list
+    };
+    
+    TextEditor(int X, int Y, int W, int H, const char* l = 0);
+    ~TextEditor() { remove_all_key_bindings(); }
+    virtual int handle(int e);
+    /**
+     Sets the current insert mode; if non-zero, new text
+     is inserted before the current cursor position. Otherwise, new
+     text replaces text at the current cursor position.
+     */
+    void insert_mode(int b) { insert_mode_ = b; }
+    /**
+     Gets the current insert mode; if non-zero, new text
+     is inserted before the current cursor position. Otherwise, new
+     text replaces text at the current cursor position.
+     */
+    int insert_mode() { return insert_mode_; }
+    
+    void add_key_binding(unsigned key, unsigned state, KeyFunc f, KeyBinding** list);
+    /** Adds a key of state "state" with the function "function" */
+    void add_key_binding(unsigned key, unsigned state, KeyFunc f)
+    { add_key_binding(key, state, f, &key_bindings); }
+    void remove_key_binding(unsigned key, unsigned state, KeyBinding** list);
+    /** Removes the key binding associated with the key "key" of state "state". */
+    void remove_key_binding(unsigned key, unsigned state)
+    { remove_key_binding(key, state, &key_bindings); }
+    void remove_all_key_bindings(KeyBinding** list);
+    /** Removes all of the key bindings associated with the text editor or list. */
+    void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); }
+    void add_default_key_bindings(KeyBinding** list);
+    KeyFunc bound_key_function(unsigned int key, unsigned int state, KeyBinding* list);
+    /**  Returns the function associated with a key binding. */
+    KeyFunc bound_key_function(unsigned int key, unsigned int state)
+    { return bound_key_function(key, state, key_bindings); }
+    /**  Sets the default key function for unassigned keys. */
+    void default_key_function(KeyFunc f) { default_key_function_ = f; }
+    
+    // functions for the built in default bindings
+    static int kf_default(unsigned int c, fltk3::TextEditor* e);
+    static int kf_ignore(unsigned int c, fltk3::TextEditor* e);
+    static int kf_backspace(unsigned int c, fltk3::TextEditor* e);
+    static int kf_enter(unsigned int c, fltk3::TextEditor* e);
+    static int kf_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_shift_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_ctrl_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_c_s_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_meta_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_m_s_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_home(unsigned int, fltk3::TextEditor* e);
+    static int kf_end(unsigned int c, fltk3::TextEditor* e);
+    static int kf_left(unsigned int c, fltk3::TextEditor* e);
+    static int kf_up(unsigned int c, fltk3::TextEditor* e);
+    static int kf_right(unsigned int c, fltk3::TextEditor* e);
+    static int kf_down(unsigned int c, fltk3::TextEditor* e);
+    static int kf_page_up(unsigned int c, fltk3::TextEditor* e);
+    static int kf_page_down(unsigned int c, fltk3::TextEditor* e);
+    static int kf_insert(unsigned int c, fltk3::TextEditor* e);
+    static int kf_delete(unsigned int c, fltk3::TextEditor* e);
+    static int kf_copy(unsigned int c, fltk3::TextEditor* e);
+    static int kf_cut(unsigned int c, fltk3::TextEditor* e);
+    static int kf_paste(unsigned int c, fltk3::TextEditor* e);
+    static int kf_select_all(unsigned int c, fltk3::TextEditor* e);
+    static int kf_undo(unsigned int c, fltk3::TextEditor* e);
+    
+  protected:
+    int handle_key();
+    void maybe_do_callback();
+    
+#ifndef FLTK3_DOXYGEN
+    int insert_mode_;
+    KeyBinding* key_bindings;
+    static KeyBinding* global_key_bindings;
+    KeyFunc default_key_function_;
+#endif
+  };
+  
+} // namespace
+
+#endif
+
+//
+// End of "$Id: TextEditor.h 7903 2010-11-28 21:06:39Z matt $".
+//
+

Deleted: branches/branch-3.0/include/fltk3/Tree.h

Copied: branches/branch-3.0/include/fltk3/Tree.h (from rev 8988, branches/branch-3.0/fltk3/Tree.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Tree.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Tree.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1025 @@
+//
+// "$Id: Tree.h 8632 2011-05-04 02:59:50Z greg.ercolano $"
+//
+
+#ifndef FLtk3_TREE_H
+#define FLtk3_TREE_H
+
+#include <fltk3/run.h>
+#include <fltk3/Group.h>
+#include <fltk3/Scrollbar.h>
+#include <fltk3/draw.h>
+
+#include <fltk3/TreeItem.h>
+#include <fltk3/TreePrefs.h>
+
+class Fl_Tree;
+
+namespace fltk3 {
+  
+  //////////////////////
+  // fltk3/Tree.h
+  //////////////////////
+  //
+  // fltk3::Tree -- This file is part of the fltk3::Tree widget for FLTK
+  // Copyright (C) 2009-2010 by Greg Ercolano.
+  //
+  // 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.
+  //
+  
+  ///
+  /// \file
+  /// \brief This file contains the definitions of the fltk3::Tree class
+  ///
+  
+  /// \class fltk3::Tree
+  ///
+  /// \brief Tree widget.
+  ///
+  ///     \image html tree-simple.png "fltk3::Tree example program"
+  ///     \image latex tree-simple.png "fltk3::Tree example program" width=4cm
+  ///
+  /// \code
+  ///     fltk3::Tree                                         // Top level widget
+  ///        |--- fltk3::TreeItem                            // Items in the tree
+  ///        |--- fltk3::TreePrefs                           // Preferences for the tree
+  ///                  |--- fltk3::TreeConnector (enum)      // Connection modes
+  ///                  |--- fltk3::TreeSelect (enum)         // Selection modes
+  ///                  |--- fltk3::TreeSort (enum)           // Sort behavior
+  /// \endcode
+  ///
+  ///     Similar to fltk3::Browser, fltk3::Tree is a browser of fltk3::TreeItem's, which is arranged
+  ///     in a parented hierarchy, or 'tree'. Subtrees can be expanded or closed. Items can be
+  ///     added, deleted, inserted, sorted and re-ordered.
+  ///
+  ///     The tree items may also contain other FLTK widgets, like buttons, input fields,
+  ///     or even "custom" widgets.
+  ///
+  ///     The callback() is invoked depending on the value of when():
+  ///
+  ///         - fltk3::WHEN_RELEASE -- callback invoked when left mouse button is released on an item
+  ///         - fltk3::WHEN_CHANGED -- callback invoked when left mouse changes selection state
+  ///
+  ///     The simple way to define a tree:
+  /// \code
+  ///    #include <fltk3/Tree.h>
+  ///    [..]
+  ///    fltk3::Tree tree(X,Y,W,H);
+  ///    tree.begin();
+  ///      tree.add("Flintstones/Fred");
+  ///      tree.add("Flintstones/Wilma");
+  ///      tree.add("Flintstones/Pebbles");
+  ///      tree.add("Simpsons/Homer");
+  ///      tree.add("Simpsons/Marge");
+  ///      tree.add("Simpsons/Bart");
+  ///      tree.add("Simpsons/Lisa");
+  ///    tree.end();
+  /// \endcode
+  ///     
+  ///     Items can be added with add(),
+  ///     removed with remove(),
+  ///     completely cleared with clear(),
+  ///     inserted with insert() and insert_above(),
+  ///     selected/deselected with select() and deselect(),
+  ///     open/closed with open() and closed().
+  ///     Children of an item can be swapped around with fltk3::TreeItem::swap_children(),
+  ///     sorting can be controlled when items are add()ed via sortorder().
+  ///     You can walk the entire tree with first() and next().
+  ///     You can walk selected items with first_selected_item() and
+  ///     next_selected_item().
+  ///     Items can be found by their pathname using find_item(const char*),
+  ///     and an item's pathname can be found with item_pathname().
+  ///     The selected items' colors are controlled by selection_color() (inherited from fltk3::Widget).
+  ///
+  ///     The tree can have different selection behaviors controlled by selectmode().
+  ///
+  ///     FLTK widgets (including custom widgets) can be assigned to tree items via
+  ///     fltk3::TreeItem::widget().
+  ///
+  ///     Icons for individual items can be changed with
+  ///     fltk3::TreeItem::openicon(), 
+  ///     fltk3::TreeItem::closeicon(),
+  ///     fltk3::TreeItem::usericon().
+  ///
+  ///     Various default preferences can be globally manipulated via fltk3::TreePrefs, 
+  ///     including colors, margins, icons, connection lines. 
+  ///
+  ///     The tree's callback() will be invoked when items change state or are open/closed.
+  ///     when() controls when mouse/keyboard events invoke the callback.
+  ///     callback_item() and callback_reason() can be used to determine the cause of the callback. eg:
+  ///
+  /// \code
+  /// void MyTreeCallback(fltk3::Widget *w, void *data) {
+  ///   fltk3::Tree      *tree = (fltk3::Tree*)w;
+  ///   fltk3::TreeItem *item = (fltk3::TreeItem*)tree->callback_item();	// get selected item
+  ///   switch ( tree->callback_reason() ) {
+  ///     case fltk3::TREE_REASON_SELECTED: [..]
+  ///     case fltk3::TREE_REASON_DESELECTED: [..]
+  ///     case fltk3::TREE_REASON_OPENED: [..]
+  ///     case fltk3::TREE_REASON_CLOSED: [..]
+  ///   }
+  /// \endcode
+  ///
+  ///     To get the item's full menu pathname, you can use fltk3::TreeItem::item_pathname(), eg:
+  ///
+  /// \code
+  ///   char pathname[256] = "???";
+  ///   tree->item_pathname(pathname, sizeof(pathname), item);		// eg. "Parent/Child/Item"
+  /// \endcode
+  ///
+  ///     To walk all the items of the tree from top to bottom:
+  /// \code
+  /// // Walk all the items in the tree, and print their labels
+  /// for ( fltk3::TreeItem *item = tree->first(); item; item = tree->next(item) ) {
+  ///     printf("Item: %s\n", item->label());
+  /// }
+  /// \endcode
+  ///
+  ///     To recursively walk all the children of a particular item, 
+  ///     define a function that uses recursion:
+  ///     \code
+  /// // Find all of the item's children and print an indented report of their labels
+  /// void my_print_all_children(fltk3::TreeItem *item, int indent=0) {
+  ///     for ( int t=0; t<item->children(); t++ ) {
+  ///         printf("%*s Item: %s\n", indent, "", item->child(t)->label());
+  ///         my_print_all_children(item->child(t), indent+4);   // recurse
+  ///     }
+  /// }
+  ///     \endcode
+  ///
+  ///     To change the default label font and color for creating new items:
+  /// \code
+  ///  tree = new fltk3::Tree(..);
+  ///  tree->item_labelfont(fltk3::COURIER);	// Use Courier font for all new items
+  ///  tree->item_labelfgcolor(fltk3::RED);	// Use red color for labels of all new items
+  ///  [..]
+  ///  // Now create the items in the tree using the above defaults.
+  ///  tree->add("Aaa");
+  ///  tree->add("Bbb");
+  ///  [..]
+  /// \endcode
+  ///
+  ///     To change the font and color of all items in the tree:
+  /// \code
+  /// // Change the font and color of all items currently in the tree
+  /// for ( fltk3::TreeItem *item = tree->first(); item; item = tree->next(item) ) {
+  ///     item->labelfont(fltk3::COURIER);
+  ///     item->labelcolor(fltk3::RED);
+  /// }
+  /// \endcode
+  ///
+  ///     The following image shows the tree's various visual elements
+  ///     and the methods that control them:
+  ///     
+  ///     \image html tree-elements.png
+  ///     \image latex tree-elements.png "fltk3::Tree dimensions" width=6cm
+  ///
+  
+  /// \enum fltk3::TreeReason
+  /// The reason the callback was invoked.
+  ///
+  enum TreeReason {
+    TREE_REASON_NONE=0,	///< unknown reason
+    TREE_REASON_SELECTED,	///< an item was selected
+    TREE_REASON_DESELECTED,	///< an item was de-selected
+    TREE_REASON_OPENED,	///< an item was opened
+    TREE_REASON_CLOSED		///< an item was closed
+  };
+  
+  
+  class FLTK3_EXPORT Tree : public fltk3::Group {
+
+    friend class ::Fl_Tree;
+
+    fltk3::TreeItem  *_root;				// can be null!
+    fltk3::TreeItem  *_item_focus;			// item that has focus box
+    fltk3::TreeItem  *_callback_item;		// item invoked during callback (can be NULL)
+    fltk3::TreeReason _callback_reason;		// reason for the callback
+    fltk3::TreePrefs  _prefs;			// all the tree's settings
+    int            _scrollbar_size;		// size of scrollbar trough
+    
+  protected:
+    /// Vertical scrollbar
+    fltk3::Scrollbar *_vscroll;
+    
+  protected:
+    void item_clicked(fltk3::TreeItem* val);
+    /// Do the callback for the item, setting the item and reason
+    void do_callback_for_item(fltk3::TreeItem* item, fltk3::TreeReason reason) {
+      callback_reason(reason);
+      callback_item(item);
+      do_callback((fltk3::Widget*)this, user_data());
+    }
+    fltk3::TreeItem *next_visible_item(fltk3::TreeItem *start, unsigned int dir);
+    
+  public:
+    Tree(int X, int Y, int W, int H, const char *L=0);
+    ~Tree();
+    int handle(int e);
+    void draw();
+    
+    ///////////////////////
+    // root methods
+    ///////////////////////
+    
+    /// Set the label for the root item. 
+    ///
+    /// Makes an internally managed copy of 'new_label'.
+    ///
+    void root_label(const char *new_label) {
+      if ( ! _root ) return;
+      _root->label(new_label);
+    }
+    /// Returns the root item.
+    fltk3::TreeItem* root() {
+      return(_root);
+    }
+    
+    ////////////////////////////////
+    // Item creation/removal methods
+    ////////////////////////////////
+    fltk3::TreeItem *add(const char *path);
+    fltk3::TreeItem* add(fltk3::TreeItem *item, const char *name);
+    fltk3::TreeItem *insert_above(fltk3::TreeItem *above, const char *name);
+    fltk3::TreeItem* insert(fltk3::TreeItem *item, const char *name, int pos);
+    
+    /// Remove the specified \p item from the tree.
+    /// \p item may not be NULL.
+    /// If it has children, all those are removed too.
+    /// \returns 0 if done, -1 if 'item' not found.
+    ///
+    int remove(fltk3::TreeItem *item) {
+      if ( item == _root ) {
+        clear();
+      } else {
+        fltk3::TreeItem *parent = item->parent();		// find item's parent
+        if ( ! parent ) return(-1);
+        parent->remove_child(item);			// remove child + children
+      }
+      return(0);
+    } 
+    /// Clear all children from the tree.
+    /// The tree will be left completely empty.
+    ///
+    void clear() {
+      if ( ! _root ) return;
+      _root->clear_children();
+      delete _root; _root = 0;
+    } 
+    /// Clear all the children of a particular node in the tree specified by \p item.
+    /// Item may not be NULL.
+    ///
+    void clear_children(fltk3::TreeItem *item) {
+      if ( item->has_children() ) {
+        item->clear_children();
+        redraw();				// redraw only if there were children to clear
+      }
+    } 
+    
+    ////////////////////////
+    // Item lookup methods
+    ////////////////////////
+    fltk3::TreeItem *find_item(const char *path);
+    const fltk3::TreeItem *find_item(const char *path) const;
+    int item_pathname(char *pathname, int pathnamelen, const fltk3::TreeItem *item) const;
+    
+    const fltk3::TreeItem *find_clicked() const;
+    
+    /// Return the item that was last clicked.
+    ///
+    /// Valid only from within the callback().
+    ///
+    /// Deprecated: use callback_item() instead.
+    ///
+    /// \returns the item clicked, or 0 if none.
+    ///          0 may also be used to indicate several items were clicked/changed.
+    ///
+    fltk3::TreeItem *item_clicked() {
+      return(_callback_item);
+    }
+    fltk3::TreeItem *first();
+    fltk3::TreeItem *next(fltk3::TreeItem *item=0);
+    fltk3::TreeItem *prev(fltk3::TreeItem *item=0);
+    fltk3::TreeItem *last();
+    fltk3::TreeItem *first_selected_item();
+    fltk3::TreeItem *next_selected_item(fltk3::TreeItem *item=0);
+    
+    //////////////////////////
+    // Item open/close methods
+    //////////////////////////
+    
+    /// Open the specified 'item'.
+    /// This causes the item's children (if any) to be shown.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] item -- the item to be opened. Must not be NULL.
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - callback() is not invoked
+    ///     -   1 - callback() is invoked if item changed,
+    ///             callback_reason() will be fltk3::TREE_REASON_OPENED
+    /// \returns
+    ///     -   1 -- item was opened
+    ///     -   0 -- item was already open, no change
+    ///
+    /// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
+    ///
+    int open(fltk3::TreeItem *item, int docallback=1) {
+      if ( item->is_open() ) return(0);
+      item->open();
+      redraw();
+      if ( docallback ) {
+        do_callback_for_item(item, fltk3::TREE_REASON_OPENED);
+      }
+      return(1);
+    }
+    /// Opens the item specified by \p path (eg: "Parent/child/item").
+    /// This causes the item's children (if any) to be shown.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. open("Holidays/12\\/25\//2010").
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - callback() is not invoked
+    ///     -   1 - callback() is invoked if item changed,
+    ///             callback_reason() will be fltk3::TREE_REASON_OPENED
+    /// \returns
+    ///     -   1 -- OK: item opened
+    ///     -   0 -- OK: item was already open, no change
+    ///     -  -1 -- ERROR: item was not found
+    ///
+    /// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
+    ///         
+    int open(const char *path, int docallback=1) {
+      fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(open(item, docallback));
+    }
+    /// Toggle the open state of \p item.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] item -- the item whose open state is to be toggled. Must not be NULL.
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - callback() is not invoked
+    ///     -   1 - callback() is invoked, callback_reason() will be either
+    ///             fltk3::TREE_REASON_OPENED or fltk3::TREE_REASON_CLOSED
+    ///
+    /// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
+    ///
+    void open_toggle(fltk3::TreeItem *item, int docallback=1) {
+      if ( item->is_open() ) {
+        close(item, docallback);
+      } else {
+        open(item, docallback);
+      }
+    }
+    /// Closes the specified \p item.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] item -- the item to be closed. Must not be NULL.
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - callback() is not invoked
+    ///     -   1 - callback() is invoked if item changed,
+    ///             callback_reason() will be fltk3::TREE_REASON_CLOSED
+    /// \returns
+    ///     -   1 -- item was closed
+    ///     -   0 -- item was already closed, no change
+    ///
+    /// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
+    ///
+    int close(fltk3::TreeItem *item, int docallback=1) {
+      if ( item->is_close() ) return(0);
+      item->close();
+      redraw();
+      if ( docallback ) {
+        do_callback_for_item(item, fltk3::TREE_REASON_CLOSED);
+      }
+      return(1);
+    }
+    /// Closes the item specified by \p path, eg: "Parent/child/item".
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. close("Holidays/12\\/25\//2010").
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - callback() is not invoked
+    ///     -   1 - callback() is invoked if item changed,
+    ///             callback_reason() will be fltk3::TREE_REASON_CLOSED
+    /// \returns
+    ///     -   1 -- OK: item closed
+    ///     -   0 -- OK: item was already closed, no change
+    ///     -  -1 -- ERROR: item was not found
+    ///
+    /// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
+    ///         
+    int close(const char *path, int docallback=1) {
+      fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(close(item, docallback));
+    }
+    /// See if \p item is open.
+    ///
+    /// Items that are 'open' are themselves not necessarily visible;
+    /// one of the item's parents might be closed.
+    ///
+    /// \param[in] item -- the item to be tested. Must not be NULL.
+    /// \returns
+    ///     -  1 : item is open
+    ///     -  0 : item is closed
+    ///
+    int is_open(fltk3::TreeItem *item) const {
+      return(item->is_open()?1:0);
+    }
+    /// See if item specified by \p path (eg: "Parent/child/item") is open.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. is_open("Holidays/12\\/25\//2010").
+    ///
+    /// Items that are 'open' are themselves not necessarily visible;
+    /// one of the item's parents might be closed.
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \returns
+    ///     -    1 - OK: item is open
+    ///     -    0 - OK: item is closed
+    ///     -   -1 - ERROR: item was not found
+    ///
+    int is_open(const char *path) const {
+      const fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(item->is_open()?1:0);
+    }
+    /// See if the specified \p item is closed.
+    ///
+    /// \param[in] item -- the item to be tested. Must not be NULL.
+    /// \returns
+    ///     -   1 : item is open
+    ///     -   0 : item is closed
+    ///
+    int is_close(fltk3::TreeItem *item) const {
+      return(item->is_close());
+    }
+    /// See if item specified by \p path (eg: "Parent/child/item") is closed.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. is_close("Holidays/12\\/25\//2010").
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \returns
+    ///     -   1 - OK: item is closed
+    ///     -   0 - OK: item is open
+    ///     -  -1 - ERROR: item was not found
+    ///
+    int is_close(const char *path) const {
+      const fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(item->is_close()?1:0);
+    }
+    
+    /// Select the specified \p item. Use 'deselect()' to de-select it.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] item -- the item to be selected. Must not be NULL.
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - the callback() is not invoked
+    ///     -   1 - the callback() is invoked if item changed state,
+    ///             callback_reason() will be fltk3::TREE_REASON_SELECTED
+    /// \returns
+    ///     -   1 - item's state was changed
+    ///     -   0 - item was already selected, no change was made
+    ///
+    int select(fltk3::TreeItem *item, int docallback=1) {
+      if ( ! item->is_selected() ) {
+        item->select();
+        set_changed();
+        if ( docallback ) {
+          do_callback_for_item(item, fltk3::TREE_REASON_SELECTED);
+        }
+        redraw();
+        return(1);
+      }
+      return(0);
+    }
+    /// Select the item specified by \p path (eg: "Parent/child/item").
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. select("Holidays/12\\/25\//2010").
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - the callback() is not invoked
+    ///     -   1 - the callback() is invoked if item changed state,
+    ///             callback_reason() will be fltk3::TREE_REASON_SELECTED
+    /// \returns
+    ///     -   1 : OK: item's state was changed
+    ///     -   0 : OK: item was already selected, no change was made
+    ///     -  -1 : ERROR: item was not found
+    ///
+    int select(const char *path, int docallback=1) {
+      fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(select(item, docallback));
+    }
+    /// Toggle the select state of the specified \p item.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] item -- the item to be selected. Must not be NULL.
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - the callback() is not invoked
+    ///     -   1 - the callback() is invoked, callback_reason() will be
+    ///             either fltk3::TREE_REASON_SELECTED or fltk3::TREE_REASON_DESELECTED
+    ///
+    void select_toggle(fltk3::TreeItem *item, int docallback=1) {
+      item->select_toggle();
+      set_changed();
+      if ( docallback ) {
+        do_callback_for_item(item, item->is_selected() ? fltk3::TREE_REASON_SELECTED
+                             : fltk3::TREE_REASON_DESELECTED);
+      }
+      redraw();
+    }
+    /// De-select the specified \p item.
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] item -- the item to be selected. Must not be NULL.
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - the callback() is not invoked
+    ///     -   1 - the callback() is invoked if item changed state,
+    ///             callback_reason() will be fltk3::TREE_REASON_DESELECTED
+    /// \returns
+    ///     -   0 - item was already deselected, no change was made
+    ///     -   1 - item's state was changed
+    ///
+    int deselect(fltk3::TreeItem *item, int docallback=1) {
+      if ( item->is_selected() ) {
+        item->deselect();
+        set_changed();
+        if ( docallback ) {
+          do_callback_for_item(item, fltk3::TREE_REASON_DESELECTED);
+        }
+        redraw();
+        return(1);
+      }
+      return(0);
+    }
+    /// Deselect an item specified by \p path (eg: "Parent/child/item").
+    /// Handles redrawing if anything was actually changed.
+    /// Invokes the callback depending on the value of optional parameter \p docallback.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. deselect("Holidays/12\\/25\//2010").
+    ///
+    /// The callback can use callback_item() and callback_reason() respectively to determine 
+    /// the item changed and the reason the callback was called.
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+    ///     -   0 - the callback() is not invoked
+    ///     -   1 - the callback() is invoked if item changed state,
+    ///             callback_reason() will be fltk3::TREE_REASON_DESELECTED
+    ///  \returns
+    ///     -   1 - OK: item's state was changed
+    ///     -   0 - OK: item was already deselected, no change was made
+    ///     -  -1 - ERROR: item was not found
+    ///
+    int deselect(const char *path, int docallback=1) {
+      fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(deselect(item, docallback));
+    }
+    
+    int deselect_all(fltk3::TreeItem *item=0, int docallback=1);
+    int select_only(fltk3::TreeItem *selitem, int docallback=1);
+    int select_all(fltk3::TreeItem *item=0, int docallback=1);
+    void set_item_focus(fltk3::TreeItem *o);
+    
+    /// See if the specified \p item is selected.
+    ///
+    /// \param[in] item -- the item to be tested. Must not be NULL.
+    ///
+    /// \return
+    ///     -   1 : item selected
+    ///     -   0 : item deselected
+    ///
+    int is_selected(fltk3::TreeItem *item) const {
+      return(item->is_selected()?1:0);
+    }
+    /// See if item specified by \p path (eg: "Parent/child/item") is selected.
+    ///
+    /// Items or submenus that themselves contain slashes ('/' or '\')
+    /// should be escaped, e.g. is_selected("Holidays/12\\/25\//2010").
+    ///
+    /// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
+    /// \returns
+    ///     -   1 : item selected
+    ///     -   0 : item deselected
+    ///     -  -1 : item was not found
+    ///
+    int is_selected(const char *path) {
+      fltk3::TreeItem *item = find_item(path);
+      if ( ! item ) return(-1);
+      return(is_selected(item));
+    }
+    /// Print the tree as 'ascii art' to stdout.
+    /// Used mainly for debugging.
+    ///
+    void show_self() {
+      if ( ! _root ) return;
+      _root->show_self();
+    }
+    
+    /////////////////////////////////
+    // Item attribute related methods
+    /////////////////////////////////
+    
+    /// Get the default label fontsize used for creating new items.
+    fltk3::Fontsize item_labelsize() const {
+      return(_prefs.labelsize());
+    }
+    /// Set the default label font size used for creating new items.
+    /// To change the font size on a per-item basis, use fltk3::TreeItem::labelsize(fltk3::Fontsize)
+    ///
+    void item_labelsize(fltk3::Fontsize val) {
+      _prefs.labelsize(val);
+    }
+    /// Get the default font face used for creating new items.
+    fltk3::Font item_labelfont() const {
+      return(_prefs.labelfont());
+    }
+    /// Set the default font face used for creating new items.
+    /// To change the font face on a per-item basis, use fltk3::TreeItem::labelfont(fltk3::Font)
+    ///
+    void item_labelfont(fltk3::Font val) {
+      _prefs.labelfont(val);
+    }
+    /// Get the default label foreground color used for creating new items.
+    fltk3::Color item_labelfgcolor(void) const {
+      return(_prefs.labelfgcolor());
+    }
+    /// Set the default label foreground color used for creating new items.
+    /// To change the foreground color on a per-item basis, use fltk3::TreeItem::labelfgcolor(fltk3::Color)
+    ///
+    void item_labelfgcolor(fltk3::Color val) {
+      _prefs.labelfgcolor(val);
+    }
+    /// Get the default label background color used for creating new items.
+    fltk3::Color item_labelbgcolor(void) const {
+      return(_prefs.labelbgcolor());
+    }
+    /// Set the default label background color used for creating new items.
+    /// To change the background color on a per-item basis, use fltk3::TreeItem::labelbgcolor(fltk3::Color)
+    ///
+    void item_labelbgcolor(fltk3::Color val) {
+      _prefs.labelbgcolor(val);
+    }
+    /// Get the connector color used for tree connection lines.
+    fltk3::Color connectorcolor() const {
+      return(_prefs.connectorcolor());
+    }
+    /// Set the connector color used for tree connection lines.
+    void connectorcolor(fltk3::Color val) {
+      _prefs.connectorcolor(val);
+    }
+    /// Get the amount of white space (in pixels) that should appear
+    /// between the widget's left border and the tree's contents.
+    ///
+    int marginleft() const {
+      return(_prefs.marginleft());
+    }
+    /// Set the amount of white space (in pixels) that should appear
+    /// between the widget's left border and the left side of the tree's contents.
+    ///
+    void marginleft(int val) {
+      _prefs.marginleft(val);
+      redraw();
+    }
+    /// Get the amount of white space (in pixels) that should appear
+    /// between the widget's top border and the top of the tree's contents.
+    ///
+    int margintop() const {
+      return(_prefs.margintop());
+    }
+    /// Sets the amount of white space (in pixels) that should appear
+    /// between the widget's top border and the top of the tree's contents.
+    ///
+    void margintop(int val) {
+      _prefs.margintop(val);
+      redraw();
+    }
+    /// Get the amount of white space (in pixels) that should appear
+    /// below an open child tree's contents.
+    ///
+    int openchild_marginbottom() const {
+      return(_prefs.openchild_marginbottom());
+    }
+    /// Set the amount of white space (in pixels) that should appear
+    /// below an open child tree's contents.
+    ///
+    void openchild_marginbottom(int val) {
+      _prefs.openchild_marginbottom(val);
+      redraw();
+    }
+    /// Gets the width of the horizontal connection lines (in pixels) 
+    /// that appear to the left of each tree item's label.
+    ///
+    int connectorwidth() const {
+      return(_prefs.connectorwidth());
+    }
+    /// Sets the width of the horizontal connection lines (in pixels) 
+    /// that appear to the left of each tree item's label.
+    ///
+    void connectorwidth(int val) {
+      _prefs.connectorwidth(val);
+      redraw();
+    }
+    /// Returns the fltk3::Image being used as the default user icon for all
+    /// newly created items.
+    /// Returns zero if no icon has been set, which is the default.
+    ///
+    fltk3::Image *usericon() const {
+      return(_prefs.usericon());
+    }
+    /// Sets the fltk3::Image to be used as the default user icon for all
+    /// newly created items.
+    ///
+    /// If you want to specify user icons on a per-item basis,
+    /// use fltk3::TreeItem::usericon() instead.
+    ///
+    /// \param[in] val -- The new image to be used, or
+    ///                   zero to disable user icons.
+    ///
+    void usericon(fltk3::Image *val) {
+      _prefs.usericon(val);
+      redraw();
+    }
+    /// Returns the icon to be used as the 'open' icon.
+    /// If none was set, the internal default is returned,
+    /// a simple '[+]' icon.
+    ///
+    fltk3::Image *openicon() const {
+      return(_prefs.openicon());
+    }
+    /// Sets the icon to be used as the 'open' icon.
+    /// This overrides the built in default '[+]' icon.
+    ///
+    /// \param[in] val -- The new image, or zero to use the default [+] icon.
+    ///
+    void openicon(fltk3::Image *val) {
+      _prefs.openicon(val);
+      redraw();
+    }
+    /// Returns the icon to be used as the 'close' icon.
+    /// If none was set, the internal default is returned,
+    /// a simple '[-]' icon.
+    ///
+    fltk3::Image *closeicon() const {
+      return(_prefs.closeicon());
+    }
+    /// Sets the icon to be used as the 'close' icon.
+    /// This overrides the built in default '[-]' icon.
+    ///
+    /// \param[in] val -- The new image, or zero to use the default [-] icon.
+    ///
+    void closeicon(fltk3::Image *val) {
+      _prefs.closeicon(val);
+      redraw();
+    }
+    /// Returns 1 if the collapse icon is enabled, 0 if not.
+    int showcollapse() const {
+      return(_prefs.showcollapse());
+    }
+    /// Set if we should show the collapse icon or not.
+    /// If collapse icons are disabled, the user will not be able
+    /// to interactively collapse items in the tree, unless the application
+    /// provides some other means via open() and close().
+    ///
+    /// \param[in] val 1: shows collapse icons (default),\n
+    ///                0: hides collapse icons.
+    ///
+    void showcollapse(int val) {
+      _prefs.showcollapse(val);
+      redraw();
+    }
+    /// Returns 1 if the root item is to be shown, or 0 if not.
+    int showroot() const {
+      return(_prefs.showroot());
+    }
+    /// Set if the root item should be shown or not.
+    /// \param[in] val 1 -- show the root item (default)\n
+    ///                0 -- hide the root item.
+    ///
+    void showroot(int val) {
+      _prefs.showroot(val);
+      redraw();
+    }
+    /// Returns the line drawing style for inter-connecting items.
+    fltk3::TreeConnector connectorstyle() const {
+      return(_prefs.connectorstyle());
+    }
+    /// Sets the line drawing style for inter-connecting items.
+    void connectorstyle(fltk3::TreeConnector val) {
+      _prefs.connectorstyle(val);
+      redraw();
+    }
+    /// Set the default sort order used when items are added to the tree.
+    ///     See fltk3::TreeSort for possible values.
+    ///
+    fltk3::TreeSort sortorder() const {
+      return(_prefs.sortorder());
+    }
+    /// Gets the sort order used to add items to the tree.
+    void sortorder(fltk3::TreeSort val) {
+      _prefs.sortorder(val);
+      // no redraw().. only affects new add()itions
+    }
+    /// Sets the style of box used to draw selected items.
+    /// This is an fltk fltk3::Boxtype.
+    /// The default is influenced by FLTK's current fltk3::scheme()
+    ///
+    fltk3::Boxtype selectbox() const {
+      return(_prefs.selectbox());
+    }
+    /// Gets the style of box used to draw selected items.
+    /// This is an fltk fltk3::Boxtype.
+    /// The default is influenced by FLTK's current fltk3::scheme()
+    ///
+    void selectbox(fltk3::Boxtype val) {
+      _prefs.selectbox(val);
+      redraw();
+    }
+    /// Gets the tree's current selection mode.
+    fltk3::TreeSelect selectmode() const {
+      return(_prefs.selectmode());
+    }
+    /// Sets the tree's selection mode.
+    void selectmode(fltk3::TreeSelect val) {
+      _prefs.selectmode(val);
+    }
+    int displayed(fltk3::TreeItem *item);
+    void show_item(fltk3::TreeItem *item, int yoff);
+    void show_item(fltk3::TreeItem *item);
+    void show_item_bottom(fltk3::TreeItem *item);
+    void show_item_middle(fltk3::TreeItem *item);
+    void show_item_top(fltk3::TreeItem *item);
+    void display(fltk3::TreeItem *item);
+    int  vposition() const;
+    void vposition(int ypos);
+    
+    /// See if widget \p w is one of the fltk3::Tree widget's scrollbars.
+    /// Use this to skip over the scrollbars when walking the child() array. Example:
+    /// \code
+    /// for ( int i=0; i<tree->children(); i++ ) {    // walk children
+    ///     fltk3::Widget *w= tree->child(i);
+    ///     if ( brow->is_scrollbar(w) ) continue;    // skip scrollbars
+    ///     ..do work here..
+    /// }
+    /// \endcode
+    /// \param[in] w Widget to test
+    /// \returns 1 if \p w is a scrollbar, 0 if not.
+    ///
+    int is_scrollbar(fltk3::Widget *w) {
+      return( ( w == _vscroll ) ? 1 : 0 );
+    }
+    /// Gets the current size of the scrollbars' troughs, in pixels.
+    ///
+    /// If this value is zero (default), this widget will use the global
+    /// fltk3::scrollbar_size() value as the scrollbar's width.
+    /// 
+    /// \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollsize() is being used.
+    /// \see fltk3::scrollbar_size(int)
+    ///
+    int scrollbar_size() const {
+      return(_scrollbar_size);
+    }
+    /// Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
+    ///
+    /// Normally you should not need this method, and should use the global
+    /// fltk3::scrollbar_size(int) instead to manage the size of ALL 
+    /// your widgets' scrollbars. This ensures your application 
+    /// has a consistent UI, is the default behavior, and is normally
+    /// what you want.
+    ///
+    /// Only use THIS method if you really need to override the global
+    /// scrollbar size. The need for this should be rare.
+    ///   
+    /// Setting \p size to the special value of 0 causes the widget to
+    /// track the global fltk3::scrollbar_size(), which is the default.
+    ///   
+    /// \param[in] size Sets the scrollbar size in pixels.\n
+    ///                 If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+    /// \see fltk3::scrollbar_size()
+    ///
+    void scrollbar_size(int size) {
+      _scrollbar_size = size;
+      int scrollsize = _scrollbar_size ? _scrollbar_size : fltk3::scrollbar_size();
+      if ( _vscroll->w() != scrollsize ) {
+        _vscroll->resize(x()+w()-scrollsize, h(), scrollsize, _vscroll->h());
+      }
+    }   
+    
+    ///////////////////////
+    // callback related
+    ///////////////////////
+    
+    /// Sets the item that was changed for this callback.
+    ///    Used internally to pass the item that invoked the callback.
+    ///
+    void callback_item(fltk3::TreeItem* item) {
+      _callback_item = item;
+    }
+    /// Gets the item that caused the callback.
+    /// The callback() can use this value to see which item changed.
+    ///
+    fltk3::TreeItem* callback_item() {
+      return(_callback_item);
+    }
+    /// Sets the reason for this callback.
+    ///    Used internally to pass the reason the callback was invoked.
+    ///
+    void callback_reason(fltk3::TreeReason reason) {
+      _callback_reason = reason;
+    }
+    /// Gets the reason for this callback.
+    ///
+    /// The callback() can use this value to see why it was called. Example:
+    /// \code
+    ///     void MyTreeCallback(fltk3::Widget *w, void *userdata) {
+    ///         fltk3::Tree *tree = (fltk3::Tree*)w;
+    ///         fltk3::TreeItem *item = tree->callback_item();    // the item changed (can be NULL if more than one item was changed!)
+    ///         switch ( tree->callback_reason() ) {           // reason callback was invoked
+    ///             case     fltk3::TREE_REASON_OPENED: ..item was opened..
+    ///             case     fltk3::TREE_REASON_CLOSED: ..item was closed..
+    ///             case   fltk3::TREE_REASON_SELECTED: ..item was selected..
+    ///             case fltk3::TREE_REASON_DESELECTED: ..item was deselected..
+    ///         }
+    ///     }
+    /// \endcode
+    ///
+    fltk3::TreeReason callback_reason() const {
+      return(_callback_reason);
+    }
+    
+    /// Load FLTK preferences
+    void load(class fltk3::Preferences&);
+  };
+  
+}
+
+#endif /*fltk3::TREE_H*/
+
+//
+// End of "$Id: Tree.h 8632 2011-05-04 02:59:50Z greg.ercolano $".
+//

Deleted: branches/branch-3.0/include/fltk3/ValueInput.h

Copied: branches/branch-3.0/include/fltk3/ValueInput.h (from rev 8988, branches/branch-3.0/fltk3/ValueInput.h)
===================================================================
--- branches/branch-3.0/include/fltk3/ValueInput.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/ValueInput.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,148 @@
+//
+// "$Id: ValueInput.h 8337 2011-01-30 09:04:59Z manolo $"
+//
+// Value input header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::ValueInput widget . */
+
+#ifndef Fltk3_Value_Input_H
+#define Fltk3_Value_Input_H
+
+#include "Valuator.h"
+#include "Input.h"
+
+class Fl_Value_Input;
+
+namespace fltk3 {
+  
+  /**
+   The fltk3::ValueInput widget displays a numeric value.
+   The user can click in the text field and edit it - there is in
+   fact a hidden fltk3::Input widget with
+   type(fltk3::FLOAT_INPUT) or type(fltk3::INT_INPUT) in
+   there - and when they hit return or tab the value updates to
+   what they typed and the callback is done.
+   
+   <P>If step() is non-zero and integral, then the range of numbers
+   is limited to integers instead of floating point numbers. As
+   well as displaying the value as an integer, typed input is also
+   limited to integer values, even if the hidden fltk3::Input widget
+   is of type(fltk3::FLOAT_INPUT).</P>
+   
+   <P>If step() is non-zero, the user can also drag the
+   mouse across the object and thus slide the value. The left
+   button moves one step() per pixel, the middle by 10
+   * step(), and the right button by 100 * step(). It
+   is therefore impossible to select text by dragging across it,
+   although clicking can still move the insertion cursor.</P>
+   
+   <P>If step() is non-zero and integral, then the range
+   of numbers are limited to integers instead of floating point
+   values.
+   
+   <P ALIGN="CENTER">\image html fltk3::ValueInput.png 
+   \image latex  fltk3::ValueInput.png "fltk3::ValueInput" width=4cm
+   */
+  class FLTK3_EXPORT ValueInput : public fltk3::Valuator {
+
+   friend class ::Fl_Value_Input;
+
+  public:
+    /* This is the encapsulated fltk3::Input attribute to which 
+     this class delegates the value font, color and shortcut */
+    fltk3::Input input;
+  private:
+    char soft_;
+    static void input_cb(fltk3::Widget*,void*);
+    virtual void value_damage(); // cause damage() due to value() changing
+  public:
+    int handle(int);
+  protected:
+    void draw();
+  public:
+    void resize(int,int,int,int);
+    ValueInput(int x,int y,int w,int h,const char *l=0);
+    ~ValueInput();
+    
+    /** See void fltk3::ValueInput::soft(char s) */
+    void soft(char s) {soft_ = s;}
+    /**
+     If "soft" is turned on, the user is allowed to drag
+     the value outside the range. If they drag the value to one of
+     the ends, let go, then grab again and continue to drag, they can
+     get to any value. The default is true.
+     */
+    char soft() const {return soft_;}
+    /**
+     Returns the current shortcut key for the Input.
+     \see fltk3::ValueInput::shortcut(int) 
+     */
+    unsigned int shortcut() const {return input.shortcut();}
+    /** 
+     Sets the shortcut key to \p s. Setting this
+     overrides the use of '&' in the label().  The value is a bitwise
+     OR of a key and a set of shift flags, for example fltk3::ALT | 'a'
+     , fltk3::ALT | (fltk3::FKey + 10), or just 'a'.  A value
+     of 0 disables the shortcut.
+     
+     The key can be any value returned by 
+     fltk3::event_key(), but will usually be an ASCII letter.  Use
+     a lower-case letter unless you require the shift key to be held down.
+     
+     The shift flags can be any set of values accepted by 
+     fltk3::event_state().  If the bit is on that shift key must
+     be pushed.  Meta, Alt, Ctrl, and Shift must be off if they are not in
+     the shift flags (zero for the other bits indicates a "don't care"
+     setting).
+     */
+    void shortcut(unsigned int s) {input.shortcut(s);}
+    
+    /** Gets the typeface of the text in the value box.  */
+    fltk3::Font textfont() const {return input.textfont();}
+    /** Sets the typeface of the text in the value box.  */
+    void textfont(fltk3::Font s) {input.textfont(s);}
+    /** Gets the size of the text in the value box.  */
+    fltk3::Fontsize textsize() const {return input.textsize();}
+    /** Sets the size of the text in the value box.  */
+    void textsize(fltk3::Fontsize s) {input.textsize(s);}
+    /** Gets the color of the text in the value box.  */
+    fltk3::Color textcolor() const {return input.textcolor();}
+    /** Sets the color of the text in the value box.*/
+    void textcolor(fltk3::Color n) {input.textcolor(n);}
+    /** Gets the color of the text cursor. The text cursor is black by default. */
+    fltk3::Color cursor_color() const {return input.cursor_color();}
+    /** Sets the color of the text cursor. The text cursor is black by default. */
+    void cursor_color(fltk3::Color n) {input.cursor_color(n);}
+    
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: ValueInput.h 8337 2011-01-30 09:04:59Z manolo $".
+//

Deleted: branches/branch-3.0/include/fltk3/ValueOutput.h

Copied: branches/branch-3.0/include/fltk3/ValueOutput.h (from rev 8988, branches/branch-3.0/fltk3/ValueOutput.h)
===================================================================
--- branches/branch-3.0/include/fltk3/ValueOutput.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/ValueOutput.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,90 @@
+//
+// "$Id: ValueOutput.h 7989 2010-12-09 12:19:03Z greg.ercolano $"
+//
+// Value output header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::ValueOutput widget . */
+
+#ifndef Fltk3_Value_Output_H
+#define Fltk3_Value_Output_H
+
+#include "Valuator.h"
+
+
+class Fl_Value_Output;
+
+
+namespace fltk3 {
+  
+  /**
+   The fltk3::ValueOutput widget displays a floating point value.
+   If step() is not zero, the user can adjust the value by
+   dragging the mouse left and right.  The left button moves one step()
+   per pixel, the middle by 10 * step(), and the right button by 
+   100 * step().
+   <P>This is much lighter-weight than 
+   fltk3::ValueInput because it contains no text editing code or
+   character buffer. </P>
+   <P ALIGN=CENTER>\image html fltk3::ValueOutput.png 
+   \image latex  fltk3::ValueOutput.png "fltk3::ValueOutput" width=4cm
+   */
+  class FLTK3_EXPORT ValueOutput : public fltk3::Valuator {
+
+    friend class ::Fl_Value_Output;
+
+    uchar soft_;
+    
+  protected:
+    void draw();
+    
+  public:
+    int handle(int);
+    ValueOutput(int x,int y,int w,int h,const char *l=0);
+    
+    /**
+     If "soft" is turned on, the user is allowed to drag the value outside
+     the range.  If they drag the value to one of the ends, let go, then
+     grab again and continue to drag, they can get to any value.  Default is
+     one.
+     */
+    void soft(uchar s) {soft_ = s;}
+    /**
+     If "soft" is turned on, the user is allowed to drag the value outside
+     the range.  If they drag the value to one of the ends, let go, then
+     grab again and continue to drag, they can get to any value.  Default is
+     one.
+     */
+    uchar soft() const {return soft_;}
+    
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: ValueOutput.h 7989 2010-12-09 12:19:03Z greg.ercolano $".
+//

Deleted: branches/branch-3.0/include/fltk3/ValueSlider.h

Copied: branches/branch-3.0/include/fltk3/ValueSlider.h (from rev 8988, branches/branch-3.0/fltk3/ValueSlider.h)
===================================================================
--- branches/branch-3.0/include/fltk3/ValueSlider.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/ValueSlider.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,65 @@
+//
+// "$Id: ValueSlider.h 7981 2010-12-08 23:53:04Z greg.ercolano $"
+//
+// Value slider header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* \file
+ fltk3::ValueSlider widget . */
+
+#ifndef Fltk3_Value_Slider_H
+#define Fltk3_Value_Slider_H
+
+#include "Slider.h"
+
+
+class Fl_Value_Slider;
+
+
+namespace fltk3 {
+  
+  /**
+   The fltk3::ValueSlider widget is a fltk3::Slider widget
+   with a box displaying the current value.
+   <P ALIGN=CENTER>\image html value_slider.png 
+   \image latex  value_slider.png "fltk3::ValueSlider" width=4cm
+   */
+  class FLTK3_EXPORT ValueSlider : public fltk3::Slider {
+
+    friend class ::Fl_Value_Slider;
+
+  protected:
+    void draw();
+  public:
+    int handle(int);
+    ValueSlider(int x,int y,int w,int h, const char *l = 0);
+  };
+  
+}
+
+#endif
+
+//
+// End of "$Id: ValueSlider.h 7981 2010-12-08 23:53:04Z greg.ercolano $".
+//

Deleted: branches/branch-3.0/include/fltk3/Widget.h

Copied: branches/branch-3.0/include/fltk3/Widget.h (from rev 8988, branches/branch-3.0/fltk3/Widget.h)
===================================================================
--- branches/branch-3.0/include/fltk3/Widget.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/Widget.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1018 @@
+//
+// "$Id: Widget.h 8623 2011-04-24 17:09:41Z AlbrechtS $"
+//
+// Widget header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/** \file
+ fltk3::Widget, fltk3::Label classes . */
+
+#ifndef Fltk3_Widget_H
+#define Fltk3_Widget_H
+
+#include "enumerations.h"
+#include "Rectangle.h"
+
+/**
+ \todo	typedef's fl_intptr_t and fl_uintptr_t should be documented.
+ */
+#ifdef _WIN64
+#ifdef __GNUC__
+#include <stdint.h>
+#else
+#include <stddef.h>  // M$VC
+#endif
+typedef intptr_t fl_intptr_t;
+typedef uintptr_t fl_uintptr_t;
+#else
+typedef long fl_intptr_t;
+typedef unsigned long fl_uintptr_t;
+#endif
+
+namespace fltk3 { 
+  class Widget; 
+  class Group;
+  class Window;
+  class Image;
+  class GlWindow;
+
+  /** Default callback type definition for all fltk widgets (by far the most used) */
+  typedef void (Callback)(Widget*, void*);
+  /** Default callback type pointer definition for all fltk widgets */
+  typedef Callback* CallbackPtr; // needed for BORLAND
+  /** One parameter callback type definition passing only the widget */
+  typedef void (Callback0)(Widget*);
+  /** Callback type definition passing the widget and a long data value */
+  typedef void (Callback1)(Widget*, long);
+  
+  /** This struct stores all information for a text or mixed graphics label.
+   
+   \todo For FLTK 1.3, the fltk3::Label type will become a widget by itself. That way
+   we will be avoiding a lot of code duplication by handling labels in 
+   a similar fashion to widgets containing text. We also provide an easy
+   interface for very complex labels, containing html or vector graphics.
+   */
+  struct FLTK3_EXPORT Label {
+    /** label text */
+    const char* value;
+    /** optional image for an active label */
+    fltk3::Image* image;
+    /** optional image for a deactivated label */
+    fltk3::Image* deimage;
+    /** label font used in text */
+    fltk3::Font font;
+    /** size of label font */
+    fltk3::Fontsize size;
+    /** text color */
+    fltk3::Color color;
+    /** \internal The font used for the entire text. */
+    fltk3::Font textfont_;
+    /** \internal Height of the font used for the entire text. */
+    fltk3::Fontsize textsize_;
+    /** \internal color of the entire text */
+    fltk3::Color textcolor_;
+    /** alignment of label */
+    fltk3::Align align_;
+    /** type of label. \see fltk3::Labeltype */
+    uchar type;
+    
+    /** Draws the label aligned to the given box */
+    void draw(int,int,int,int, fltk3::Align) const ;
+    void measure(int &w, int &h) const ;
+  };
+  
+  
+  /** fltk3::Widget is the base class for all widgets in FLTK.  
+   
+   You can't create one of these because the constructor is not public.
+   However you can subclass it.  
+   
+   All "property" accessing methods, such as color(), parent(), or argument() 
+   are implemented as trivial inline functions and thus are as fast and small 
+   as accessing fields in a structure. Unless otherwise noted, the property 
+   setting methods such as color(n) or label(s) are also trivial inline 
+   functions, even if they change the widget's appearance. It is up to the 
+   user code to call redraw() after these.
+   */
+  class FLTK3_EXPORT Widget : public Rectangle {
+    friend class Group;
+    
+    fltk3::Group* parent_;
+    fltk3::Callback* callback_;
+    void* user_data_;
+    Label label_;
+    unsigned int flags_;
+    Color color_;
+    Color color2_;
+    uchar type_;
+    uchar damage_;
+    uchar box_;
+    uchar when_;
+    
+    const char *tooltip_;
+    
+    /** unimplemented copy ctor */
+    Widget(const Widget &);
+    /** unimplemented assignment operator */
+    Widget& operator=(const Widget &);
+    
+  protected:
+    
+    /** Gets the widget flags mask */
+    unsigned int flags() const {return flags_;}
+    /** Sets a flag in the flags mask */
+    void set_flag(unsigned int c) {flags_ |= c;}
+    /** Clears a flag in the flags mask */
+    void clear_flag(unsigned int c) {flags_ &= ~c;}
+    /** flags possible values enumeration.
+     See activate(), output(), visible(), changed(), set_visible_focus()
+     */
+    enum {
+      INACTIVE        = 1<<0,   ///< the widget can't receive focus, and is disabled but potentially visible
+      INVISIBLE       = 1<<1,   ///< the widget is not drawn, but can receive a few special events
+      OUTPUT          = 1<<2,   ///< for output only
+      NOBORDER        = 1<<3,   ///< don't draw a decoration (fltk3::Window)
+      FORCE_POSITION  = 1<<4,   ///< don't let the window manager position the window (fltk3::Window)
+      NON_MODAL       = 1<<5,   ///< this is a hovering toolbar window (fltk3::Window)
+      SHORTCUT_LABEL  = 1<<6,   ///< the label contains a shortcut we need to draw
+      CHANGED         = 1<<7,   ///< the widget value changed
+      OVERRIDE        = 1<<8,   ///< position window on top (fltk3::Window)
+      VISIBLE_FOCUS   = 1<<9,   ///< accepts keyboard focus navigation if the widget can have the focus
+      COPIED_LABEL    = 1<<10,  ///< the widget label is internally copied, its destruction is handled by the widget
+      CLIP_CHILDREN   = 1<<11,  ///< all drawing within this widget will be clipped (fltk3::Group)
+      MENU_WINDOW     = 1<<12,  ///< a temporary popup window, dismissed by clicking outside (fltk3::Window)
+      TOOLTIP_WINDOW  = 1<<13,  ///< a temporary popup, transparent to events, and dismissed easily (fltk3::Window)
+      MODAL           = 1<<14,  ///< a window blocking input to all other winows (fltk3::Window)
+      NO_OVERLAY      = 1<<15,  ///< window not using a hardware overlay plane (fltk3::MenuWindow)
+      GROUP_RELATIVE  = 1<<16,  ///< position this widget relative to the parent group, not to the window
+      COPIED_TOOLTIP  = 1<<17,  ///< the widget tooltip is internally copied, its destruction is handled by the widget
+                                // (space for more flags)
+      USERFLAG3       = 1<<29,  ///< reserved for 3rd party extensions
+      USERFLAG2       = 1<<30,  ///< reserved for 3rd party extensions
+      USERFLAG1       = 1<<31   ///< reserved for 3rd party extensions
+    };
+    void draw_box() const;
+    void draw_box(Boxtype t, Color c) const;
+    void draw_box(Boxtype t, int x,int y,int w,int h, Color c) const;
+    void draw_backdrop() const;
+    /** draws a focus rectangle around the widget */
+    void draw_focus() {draw_focus(box(),x(),y(),w(),h());}
+    void draw_focus(Boxtype t, int x,int y,int w,int h) const;
+    void draw_label() const;
+    void draw_label(int, int, int, int) const;
+    
+  public:
+    
+    /** Creates a widget at the given position and size.
+     
+     The fltk3::Widget is a protected constructor, but all derived widgets have a 
+     matching public constructor. It takes a value for x(), y(), w(), h(), and 
+     an optional value for label().
+     
+     \param[in] x, y the position of the widget relative to the enclosing window
+     \param[in] w, h size of the widget in pixels
+     \param[in] label optional text for the widget label
+     */
+    Widget(int x, int y, int w, int h, const char *label=0L);
+    
+    /** Destroys the widget.
+     Destroying single widgets is not very common. You almost always want to 
+     destroy the parent group instead, which will destroy all of the child widgets 
+     and groups in that group.
+     
+     \since FLTK 1.3, the widget's destructor removes the widget from its parent
+     group, if it is member of a group.
+     */
+    virtual ~Widget();
+    
+    /** Draws the widget.
+     Never call this function directly. FLTK will schedule redrawing whenever
+     needed. If your widget must be redrawn as soon as possible, call redraw()
+     instead.
+     
+     Override this function to draw your own widgets.
+     
+     If you ever need to call another widget's draw method <I>from within your
+     own draw() method</I>, e.g. for an embedded scrollbar, you can do it
+     (because draw() is virtual) like this:
+     
+     \code
+     fltk3::Widget *s = &scroll;		// scroll is an embedded fltk3::Scrollbar
+     s->draw();			// calls fltk3::Scrollbar::draw()
+     \endcode
+     */
+    virtual void draw();
+    
+    /** Handles the specified event. 
+     You normally don't call this method directly, but instead let FLTK do 
+     it when the user interacts with the widget.
+     
+     When implemented in a widget, this function must return 0 if the 
+     widget does not use the event or 1 otherwise.
+     
+     Most of the time, you want to call the inherited handle() method in 
+     your overridden method so that you don't short-circuit events that you 
+     don't handle. In this last case you should return the callee retval.
+     
+     \param[in] event the kind of event received
+     \retval 0 if the event was not used or understood
+     \retval 1 if the event was used and can be deleted
+     \see fltk3::Event
+     */
+    virtual int handle(int event);
+    
+    /** Returns a pointer to the parent widget.  
+     Usually this is a fltk3::Group or fltk3::Window. 
+     \retval NULL if the widget has no parent
+     \see fltk3::Group::add(fltk3::Widget*)
+     */
+    fltk3::Group* parent() const {return parent_;}
+    
+    /** Internal use only - "for hacks only".
+     
+     It is \em \b STRONGLY recommended not to use this method, because it
+     short-circuits fltk3::Group's normal widget adding and removing methods,
+     if the widget is already a child widget of another fltk3::Group.
+     
+     Use fltk3::Group::add(fltk3::Widget*) and/or fltk3::Group::remove(fltk3::Widget*) instead.
+     */
+    void parent(fltk3::Group* p) {parent_ = p;} // for hacks only, use fltk3::Group::add()
+    
+    /** Gets the widget type.
+     Returns the widget type value, which is used for Forms compatibility
+     and to simulate RTTI.
+     
+     \todo Explain "simulate RTTI" (currently only used to decide if a widget
+     is a window, i.e. type()>=fltk3::WINDOW ?). Is type() really used in a way
+     that ensures "Forms compatibility" ?
+     */
+    uchar type() const {return type_;}
+    
+    /** Sets the widget type.
+     This is used for Forms compatibility.
+     */
+    void type(uchar t) {type_ = t;}
+    
+    /** Changes the size or position of the widget.
+     
+     This is a virtual function so that the widget may implement its 
+     own handling of resizing. The default version does \e not
+     call the redraw() method, but instead relies on the parent widget 
+     to do so because the parent may know a faster way to update the 
+     display, such as scrolling from the old position.  
+     
+     Some window managers under X11 call resize() a lot more often 
+     than needed. Please verify that the position or size of a widget 
+     did actually change before doing any extensive calculations.
+     
+     position(X, Y) is a shortcut for resize(X, Y, w(), h()), 
+     and size(W, H) is a shortcut for resize(x(), y(), W, H).
+     
+     \param[in] x, y new position relative to the parent window 
+     \param[in] w, h new size
+     \see position(int,int), size(int,int)
+     */
+    virtual void resize(int x, int y, int w, int h);
+    
+    /** Internal use only. */
+    int damage_resize(int,int,int,int);
+    
+    /** Repositions the window or widget.
+     
+     position(X, Y) is a shortcut for resize(X, Y, w(), h()).
+     
+     \param[in] X, Y new position relative to the parent window 
+     \see resize(int,int,int,int), size(int,int)
+     */
+    void position(int X,int Y) {resize(X,Y,w_,h_);}
+    
+    /** Changes the size of the widget.
+     
+     size(W, H) is a shortcut for resize(x(), y(), W, H).
+     
+     \param[in] W, H new size
+     \see position(int,int), resize(int,int,int,int)
+     */
+    void size(int W,int H) {resize(x_,y_,W,H);}
+    
+    /** Gets the label alignment.
+     
+     \return label alignment
+     \see label(), align(fltk3::Align), fltk3::Align
+     */
+    Align align() const {return label_.align_;}
+    
+    /** Sets the label alignment.
+     This controls how the label is displayed next to or inside the widget. 
+     The default value is fltk3::ALIGN_CENTER, which centers the label inside 
+     the widget.
+     \param[in] alignment new label alignment
+     \see align(), fltk3::Align
+     */
+    void align(Align alignment) {label_.align_ = alignment;}
+    
+    /** Gets the box type of the widget.
+     \return the current box type
+     \see box(fltk3::Boxtype), fltk3::Boxtype
+     */
+    Boxtype box() const {return (Boxtype)box_;}
+    
+    /** Sets the box type for the widget. 
+     This identifies a routine that draws the background of the widget.
+     See fltk3::Boxtype for the available types. The default depends on the 
+     widget, but is usually fltk3::NO_BOX or fltk3::UP_BOX.
+     \param[in] new_box the new box type
+     \see box(), fltk3::Boxtype
+     */
+    void box(Boxtype new_box) {box_ = new_box;}
+    
+    /** Gets the background color of the widget.
+     \return current background color
+     \see color(fltk3::Color), color(fltk3::Color, fltk3::Color)
+     */
+    Color color() const {return color_;}
+    
+    /** Sets the background color of the widget. 
+     The color is passed to the box routine. The color is either an index into 
+     an internal table of RGB colors or an RGB color value generated using 
+     fltk3::rgb_color().
+     
+     The default for most widgets is fltk3::BACKGROUND_COLOR. Use fltk3::set_color()
+     to redefine colors in the color map.
+     \param[in] bg background color
+     \see color(), color(fltk3::Color, fltk3::Color), selection_color(fltk3::Color)
+     */
+    void color(Color bg) {color_ = bg;}
+    
+    /** Gets the selection color.
+     \return the current selection color
+     \see selection_color(fltk3::Color), color(fltk3::Color, fltk3::Color)
+     */
+    fltk3::Color selection_color() const {return color2_;}
+    
+    /** Sets the selection color.
+     The selection color is defined for Forms compatibility and is usually 
+     used to color the widget when it is selected, although some widgets 
+     use this color for other purposes. You can set both colors at once 
+     with color(fltk3::Color bg, fltk3::Color sel).
+     \param[in] a the new selection color
+     \see selection_color(), color(fltk3::Color, fltk3::Color)
+     */
+    void selection_color(fltk3::Color a) {color2_ = a;}
+    
+    /** Sets the background and selection color of the widget. 
+     
+     The two color form sets both the background and selection colors. 
+     \param[in] bg background color
+     \param[in] sel selection color
+     \see color(unsigned), selection_color(unsigned)
+     */
+    void color(fltk3::Color bg, fltk3::Color sel) {color_=bg; color2_=sel;}
+    
+    /** Gets the current label text.
+     \return a pointer to the current label text
+     \see label(const char *), copy_label(const char *)
+     */
+    const char* label() const {return label_.value;}
+    
+    /** Sets the current label pointer.
+     
+     The label is shown somewhere on or next to the widget. The passed pointer 
+     is stored unchanged in the widget (the string is \em not copied), so if 
+     you need to set the label to a formatted value, make sure the buffer is 
+     static, global, or allocated. The copy_label() method can be used 
+     to make a copy of the label string automatically.
+     \param[in] text pointer to new label text
+     \see copy_label()
+     */
+    void label(const char* text);
+    
+    /** Sets the current label. 
+     Unlike label(), this method allocates a copy of the label 
+     string instead of using the original string pointer.
+     
+     The internal copy will automatically be freed whenever you assign
+     a new label or when the widget is destroyed.
+     
+     \param[in] new_label the new label text
+     \see label()
+     */
+    void copy_label(const char *new_label);
+    
+    /** Shortcut to set the label text and type in one call.
+     \see label(const char *), labeltype(fltk3::Labeltype)
+     */
+    void label(fltk3::Labeltype a, const char* b) {label_.type = a; label_.value = b;}
+    
+    /** Gets the label type.
+     \return the current label type.
+     \see fltk3::Labeltype
+     */
+    fltk3::Labeltype labeltype() const {return (fltk3::Labeltype)label_.type;}
+    
+    /** Sets the label type. 
+     The label type identifies the function that draws the label of the widget. 
+     This is generally used for special effects such as embossing or for using 
+     the label() pointer as another form of data such as an icon. The value 
+     fltk3::NORMAL_LABEL prints the label as plain text.
+     \param[in] a new label type
+     \see fltk3::Labeltype
+     */
+    void labeltype(fltk3::Labeltype a) {label_.type = a;}
+    
+    /** Gets the label color. 
+     The default color is fltk3::FOREGROUND_COLOR. 
+     \return the current label color
+     */
+    fltk3::Color labelcolor() const {return label_.color;}
+    
+    /** Sets the label color. 
+     The default color is fltk3::FOREGROUND_COLOR. 
+     \param[in] c the new label color
+     */
+    void labelcolor(fltk3::Color c) {label_.color=c;}
+    
+    /** Gets the font to use. 
+     Fonts are identified by indexes into a table. The default value
+     uses a Helvetica typeface (Arial for Microsoft&reg; Windows&reg;).
+     The function fltk3::set_font() can define new typefaces.
+     \return current font used by the label
+     \see fltk3::Font
+     */
+    fltk3::Font labelfont() const {return label_.font;}
+    
+    /** Sets the font to use. 
+     Fonts are identified by indexes into a table. The default value
+     uses a Helvetica typeface (Arial for Microsoft&reg; Windows&reg;).
+     The function fltk3::set_font() can define new typefaces.
+     \param[in] f the new font for the label
+     \see fltk3::Font
+     */
+    void labelfont(fltk3::Font f) {label_.font=f;}
+    
+    /** Gets the font size in pixels. 
+     The default size is 14 pixels.
+     \return the current font size
+     */
+    fltk3::Fontsize labelsize() const {return label_.size;}
+    
+    /** Sets the font size in pixels.
+     \param[in] pix the new font size
+     \see fltk3::Fontsize labelsize()
+     */
+    void labelsize(fltk3::Fontsize pix) {label_.size=pix;}
+    
+    /** Gets the image that is used as part of the widget label.
+     This image is used when drawing the widget in the active state.
+     \return the current image
+     */
+    fltk3::Image* image() {return label_.image;}
+    const fltk3::Image* image() const {return label_.image;}
+    
+    /** Sets the image to use as part of the widget label.
+     This image is used when drawing the widget in the active state.
+     \param[in] img the new image for the label 
+     */
+    void image(fltk3::Image* img) {label_.image=img;}
+    
+    /** Sets the image to use as part of the widget label.
+     This image is used when drawing the widget in the active state.
+     \param[in] img the new image for the label 
+     */
+    void image(fltk3::Image& img) {label_.image=&img;}
+    
+    /** Gets the image that is used as part of the widget label.  
+     This image is used when drawing the widget in the inactive state.
+     \return the current image for the deactivated widget
+     */
+    fltk3::Image* deimage() {return label_.deimage;}
+    const fltk3::Image* deimage() const {return label_.deimage;}
+    
+    /** Sets the image to use as part of the widget label.  
+     This image is used when drawing the widget in the inactive state.
+     \param[in] img the new image for the deactivated widget
+     */
+    void deimage(fltk3::Image* img) {label_.deimage=img;}
+    
+    /** Sets the image to use as part of the widget label.  
+     This image is used when drawing the widget in the inactive state.
+     \param[in] img the new image for the deactivated widget
+     */
+    void deimage(fltk3::Image& img) {label_.deimage=&img;}
+    
+    /** Gets the current tooltip text.
+     \return a pointer to the tooltip text or NULL
+     \see tooltip(const char*), copy_tooltip(const char*)
+     */
+    const char *tooltip() const {return tooltip_;}
+    
+    void tooltip(const char *text);		// see fltk3::Tooltip
+    void copy_tooltip(const char *text);		// see fltk3::Tooltip
+    
+    /** Gets the current callback function for the widget.
+     Each widget has a single callback.
+     \return current callback
+     */
+    CallbackPtr callback() const {return callback_;}
+    
+    /** Sets the current callback function for the widget.
+     Each widget has a single callback.
+     \param[in] cb new callback
+     \param[in] p user data
+     */
+    void callback(fltk3::Callback* cb, void* p) {callback_=cb; user_data_=p;}
+    
+    /** Sets the current callback function for the widget.
+     Each widget has a single callback.
+     \param[in] cb new callback
+     */
+    void callback(fltk3::Callback* cb) {callback_=cb;}
+    
+    /** Sets the current callback function for the widget.
+     Each widget has a single callback.
+     \param[in] cb new callback
+     */
+    void callback(fltk3::Callback0*cb) {callback_=(fltk3::Callback*)cb;}
+    
+    /** Sets the current callback function for the widget.
+     Each widget has a single callback.
+     \param[in] cb new callback
+     \param[in] p user data
+     */
+    void callback(fltk3::Callback1*cb, long p=0) {callback_=(fltk3::Callback*)cb; user_data_=(void*)p;}
+    
+    /** Gets the user data for this widget.
+     Gets the current user data (void *) argument that is passed to the callback function.
+     \return user data as a pointer
+     */
+    void* user_data() const {return user_data_;}
+    
+    /** Sets the user data for this widget.
+     Sets the new user data (void *) argument that is passed to the callback function.
+     \param[in] v new user data
+     */
+    void user_data(void* v) {user_data_ = v;}
+    
+    /** Gets the current user data (long) argument that is passed to the callback function.
+     */
+    long argument() const {return (long)(fl_intptr_t)user_data_;}
+    
+    /** Sets the current user data (long) argument that is passed to the callback function.
+     \todo The user data value must be implemented using \em intptr_t or similar
+     to avoid 64-bit machine incompatibilities.
+     */
+    void argument(long v) {user_data_ = (void*)v;}
+    
+    /** Returns the conditions under which the callback is called.
+     
+     You can set the flags with when(uchar), the default value is
+     fltk3::WHEN_RELEASE.
+     
+     \return set of flags
+     \see when(uchar)
+     */
+    fltk3::When when() const {return (fltk3::When)when_;}
+    
+    /** Sets the flags used to decide when a callback is called.
+     
+     This controls when callbacks are done. The following values are useful,
+     the default value is fltk3::WHEN_RELEASE:
+     
+     \li 0: The callback is not done, but changed() is turned on.
+     \li fltk3::WHEN_CHANGED: The callback is done each time the text is
+     changed by the user.
+     \li fltk3::WHEN_RELEASE: The callback will be done when this widget loses 
+     the focus, including when the window is unmapped. This is a useful 
+     value for text fields in a panel where doing the callback on every
+     change is wasteful. However the callback will also happen if the 
+     mouse is moved out of the window, which means it should not do 
+     anything visible (like pop up an error message).
+     You might do better setting this to zero, and scanning all the
+     items for changed() when the OK button on a panel is pressed.
+     \li fltk3::WHEN_ENTER_KEY: If the user types the Enter key, the entire 
+     text is selected, and the callback is done if the text has changed. 
+     Normally the Enter key will navigate to the next field (or insert 
+     a newline for a fltk3::MultilineInput) - this changes the behavior.
+     \li fltk3::WHEN_ENTER_KEY|fltk3::WHEN_NOT_CHANGED: The Enter key will do the
+     callback even if the text has not changed. Useful for command fields.
+     fltk3::Widget::when() is a set of bitflags used by subclasses of 
+     fltk3::Widget to decide when to do the callback.
+     
+     If the value is zero then the callback is never done. Other values 
+     are described  in the individual widgets. This field is in the base 
+     class so that you can scan a panel and do_callback() on all the ones
+     that don't do their own callbacks in response to an "OK" button.
+     \param[in] i set of flags
+     */
+    void when(uchar i) {when_ = i;}
+    
+    /** Returns whether a widget is visible.
+     \retval 0 if the widget is not drawn and hence invisible.
+     \see show(), hide(), visible_r()
+     */
+    unsigned int visible() const {return !(flags_&INVISIBLE);}
+    
+    /** Returns whether a widget and all its parents are visible.
+     \retval 0 if the widget or any of its parents are invisible.
+     \see show(), hide(), visible()
+     */
+    int visible_r() const;
+    
+    /** Makes a widget visible.
+     
+     An invisible widget never gets redrawn and does not get keyboard
+     or mouse events, but can receive a few other events like fltk3::SHOW.
+     
+     The visible() method returns true if the widget is set to be
+     visible. The visible_r() method returns true if the widget and
+     all of its parents are visible. A widget is only visible if
+     visible() is true on it <I>and all of its parents</I>.
+     
+     Changing it will send fltk3::SHOW or fltk3::HIDE events to the widget.
+     <I>Do not change it if the parent is not visible, as this
+     will send false fltk3::SHOW or fltk3::HIDE events to the widget</I>.
+     redraw() is called if necessary on this or the parent.
+     
+     \see hide(), visible(), visible_r()
+     */
+    virtual void show();
+    
+    /** Makes a widget invisible.
+     \see show(), visible(), visible_r()
+     */
+    virtual void hide();
+    
+    /** Makes the widget visible. 
+     You must still redraw the parent widget to see a change in the 
+     window. Normally you want to use the show() method instead.
+     */
+    void set_visible() {flags_ &= ~INVISIBLE;}
+    
+    /** Hides the widget. 
+     You must still redraw the parent to see a change in the window. 
+     Normally you want to use the hide() method instead.
+     */
+    void clear_visible() {flags_ |= INVISIBLE;}
+    
+    /** Returns whether the widget is active.
+     \retval 0 if the widget is inactive
+     \see active_r(), activate(), deactivate()
+     */
+    unsigned int active() const {return !(flags_&INACTIVE);}
+    
+    /** Returns whether the widget and all of its parents are active. 
+     \retval 0 if this or any of the parent widgets are inactive
+     \see active(), activate(), deactivate()
+     */
+    int active_r() const;
+    
+    /** Activates the widget.
+     Changing this value will send fltk3::ACTIVATE to the widget if 
+     active_r() is true.
+     \see active(), active_r(), deactivate()
+     */
+    void activate();
+    
+    /** Deactivates the widget.
+     Inactive widgets will be drawn "grayed out", e.g. with less contrast 
+     than the active widget. Inactive widgets will not receive any keyboard 
+     or mouse button events. Other events (including fltk3::ENTER, fltk3::MOVE, 
+     fltk3::LEAVE, fltk3::SHORTCUT, and others) will still be sent. A widget is 
+     only active if active() is true on it <I>and all of its parents</I>.  
+     
+     Changing this value will send fltk3::DEACTIVATE to the widget if 
+     active_r() is true.
+     
+     Currently you cannot deactivate fltk3::Window widgets.
+     
+     \see activate(), active(), active_r()
+     */
+    void deactivate();
+    
+    /** Returns if a widget is used for output only.
+     output() means the same as !active() except it does not change how the 
+     widget is drawn. The widget will not receive any events. This is useful 
+     for making scrollbars or buttons that work as displays rather than input 
+     devices.
+     \retval 0 if the widget is used for input and output
+     \see set_output(), clear_output() 
+     */
+    unsigned int output() const {return (flags_&OUTPUT);}
+    
+    /** Sets a widget to output only.
+     \see output(), clear_output() 
+     */
+    void set_output() {flags_ |= OUTPUT;}
+    
+    /** Sets a widget to accept input.
+     \see set_output(), output() 
+     */
+    void clear_output() {flags_ &= ~OUTPUT;}
+    
+    /** Returns if the widget is able to take events.
+     This is the same as (active() && !output() && visible())
+     but is faster.
+     \retval 0 if the widget takes no events
+     */
+    unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
+    
+    /** 
+     Checks if the widget value changed since the last callback.
+     
+     "Changed" is a flag that is turned on when the user changes the value 
+     stored in the widget. This is only used by subclasses of fltk3::Widget that 
+     store values, but is in the base class so it is easier to scan all the 
+     widgets in a panel and do_callback() on the changed ones in response 
+     to an "OK" button.
+     
+     Most widgets turn this flag off when they do the callback, and when 
+     the program sets the stored value.
+     
+     \retval 0 if the value did not change
+     \see set_changed(), clear_changed()
+     */
+    unsigned int changed() const {return flags_&CHANGED;}
+    
+    /** Marks the value of the widget as changed.
+     \see changed(), clear_changed()
+     */
+    void set_changed() {flags_ |= CHANGED;}
+    
+    /** Marks the value of the widget as unchanged.
+     \see changed(), set_changed()
+     */
+    void clear_changed() {flags_ &= ~CHANGED;}
+    
+    /** Gives the widget the keyboard focus.
+     Tries to make this widget be the fltk3::focus() widget, by first sending 
+     it an fltk3::FOCUS event, and if it returns non-zero, setting 
+     fltk3::focus() to this widget. You should use this method to 
+     assign the focus to a widget.  
+     \return true if the widget accepted the focus.
+     */
+    int take_focus();
+    
+    /** Enables keyboard focus navigation with this widget. 
+     Note, however, that this will not necessarily mean that the widget
+     will accept focus, but for widgets that can accept focus, this method
+     enables it if it has been disabled.
+     \see visible_focus(), clear_visible_focus(), visible_focus(int) 
+     */
+    void set_visible_focus() { flags_ |= VISIBLE_FOCUS; }
+    
+    /** Disables keyboard focus navigation with this widget. 
+     Normally, all widgets participate in keyboard focus navigation.
+     \see set_visible_focus(), visible_focus(), visible_focus(int) 
+     */
+    void clear_visible_focus() { flags_ &= ~VISIBLE_FOCUS; }
+    
+    /** Modifies keyboard focus navigation. 
+     \param[in] v set or clear visible focus
+     \see set_visible_focus(), clear_visible_focus(), visible_focus() 
+     */
+    void visible_focus(int v) { if (v) set_visible_focus(); else clear_visible_focus(); }
+    
+    /** Checks whether this widget has a visible focus.
+     \retval 0 if this widget has no visible focus.
+     \see visible_focus(int), set_visible_focus(), clear_visible_focus()
+     */
+    unsigned int visible_focus() { return flags_ & VISIBLE_FOCUS; }
+    
+    /** Sets the default callback for all widgets.
+     Sets the default callback, which puts a pointer to the widget on the queue 
+     returned by fltk3::readqueue(). You may want to call this from your own callback.
+     \param[in] cb the new callback
+     \param[in] d user data associated with that callback
+     \see callback(), do_callback(), fltk3::readqueue()
+     */
+    static void default_callback(fltk3::Widget *cb, void *d);
+    
+    /** Calls the widget callback.
+     Causes a widget to invoke its callback function with default arguments.
+     \see callback()
+     */
+    void do_callback() {do_callback(this,user_data_);}
+    
+    /** Calls the widget callback.
+     Causes a widget to invoke its callback function with arbitrary arguments.
+     \param[in] o call the callback with \p o as the widget argument
+     \param[in] arg call the callback with \p arg as the user data argument
+     \see callback()
+     */
+    void do_callback(fltk3::Widget* o,long arg) {do_callback(o,(void*)arg);}
+    
+    // Causes a widget to invoke its callback function with arbitrary arguments.
+    // Documentation and implementation in fltk3::Widget.cxx
+    void do_callback(fltk3::Widget* o,void* arg=0);
+    
+    /* Internal use only. */
+    int test_shortcut();
+    /* Internal use only. */
+    static unsigned int label_shortcut(const char *t);
+    /* Internal use only. */
+    static int test_shortcut(const char*, const bool require_alt = false);
+    
+    /** Checks if w is a child of this widget.
+     \param[in] w potential child widget
+     \return Returns 1 if \p w is a child of this widget, or is
+     equal to this widget. Returns 0 if \p w is NULL.
+     */
+    int contains(const fltk3::Widget *w) const ;
+    
+    /** Checks if this widget is a child of w.
+     Returns 1 if this widget is a child of \p w, or is
+     equal to \p w. Returns 0 if \p w is NULL.
+     \param[in] w the possible parent widget.
+     \see contains()
+     */
+    int inside(const fltk3::Widget* w) const {return w ? w->contains(this) : 0;}
+    
+    /** Schedules the drawing of the widget.
+     Marks the widget as needing its draw() routine called.
+     */
+    void redraw();
+    
+    /** Schedules the drawing of the label.
+     Marks the widget or the parent as needing a redraw for the label area 
+     of a widget.
+     */
+    void redraw_label();
+    
+    /** Returns non-zero if draw() needs to be called. 
+     The damage value is actually a bit field that the widget 
+     subclass can use to figure out what parts to draw.
+     \return a bitmap of flags describing the kind of damage to the widget
+     \see damage(uchar), clear_damage(uchar)
+     */
+    fltk3::Damage damage() const {return (fltk3::Damage)damage_;}
+    
+    /** Clears or sets the damage flags.
+     Damage flags are cleared when parts of the widget drawing is repaired.
+     
+     The optional argument \p c specifies the bits that <b>are set</b>
+     after the call (default: 0) and \b not the bits that are cleared!
+     
+     \note Therefore it is possible to set damage bits with this method, but
+     this should be avoided. Use damage(uchar) instead.
+     
+     \param[in] c new bitmask of damage flags (default: 0)
+     \see damage(uchar), damage()
+     */
+    void clear_damage(uchar c = 0) {damage_ = c;}
+    
+    /** Sets the damage bits for the widget.
+     Setting damage bits will schedule the widget for the next redraw.
+     \param[in] c bitmask of flags to set
+     \see damage(), clear_damage(uchar)
+     */
+    void damage(uchar c);
+    
+    /** Sets the damage bits for an area inside the widget.
+     Setting damage bits will schedule the widget for the next redraw.
+     \param[in] c bitmask of flags to set
+     \param[in] x, y, w, h size of damaged area
+     \see damage(), clear_damage(uchar)
+     */
+    void damage(uchar c, int x, int y, int w, int h);
+    
+    void draw_label(int, int, int, int, fltk3::Align) const;
+    
+    /** Sets width ww and height hh accordingly with the label size.
+     Labels with images will return w() and h() of the image.
+     */
+    void measure_label(int& ww, int& hh) const {label_.measure(ww, hh);}
+    
+    /** Returns a pointer to the primary fltk3::Window widget.
+     \retval  NULL if no window is associated with this widget.  
+     \note for an fltk3::Window widget, this returns its <I>parent</I> window 
+     (if any), not <I>this</I> window.
+     */
+    fltk3::Window* window() const ;
+    
+    /** Returns an fltk3::Group pointer if this widget is an fltk3::Group.
+     
+     Use this method if you have a widget (pointer) and need to
+     know whether this widget is derived from fltk3::Group. If it returns
+     non-NULL, then the widget in question is derived from fltk3::Group,
+     and you can use the returned pointer to access its children
+     or other fltk3::Group-specific methods.
+     
+     Example:
+     \code
+     void my_callback (fltk3::Widget *w, void *) {
+     fltk3::Group *g = w->as_group();
+     if (g)
+     printf ("This group has %d children\n",g->children());
+     else
+     printf ("This widget is not a group!\n");
+     }
+     \endcode
+     
+     \retval NULL if this widget is not derived from fltk3::Group.
+     \note This method is provided to avoid dynamic_cast.
+     \see fltk3::Widget::as_window(), fltk3::Widget::as_gl_window()
+     */
+    virtual fltk3::Group* as_group() {return 0;}
+    
+    /** Returns an fltk3::Window pointer if this widget is an fltk3::Window.
+     
+     Use this method if you have a widget (pointer) and need to
+     know whether this widget is derived from fltk3::Window. If it returns
+     non-NULL, then the widget in question is derived from fltk3::Window,
+     and you can use the returned pointer to access its children
+     or other fltk3::Window-specific methods.
+     
+     \retval NULL if this widget is not derived from fltk3::Window.
+     \note This method is provided to avoid dynamic_cast.
+     \see fltk3::Widget::as_group(), fltk3::Widget::as_gl_window()
+     */
+    virtual fltk3::Window* as_window() {return 0;}
+    
+    /** Returns an fltk3::GlWindow pointer if this widget is an fltk3::GlWindow.
+     
+     Use this method if you have a widget (pointer) and need to
+     know whether this widget is derived from fltk3::GlWindow. If it returns
+     non-NULL, then the widget in question is derived from fltk3::GlWindow.
+     
+     \retval NULL if this widget is not derived from fltk3::GlWindow.
+     \note This method is provided to avoid dynamic_cast.
+     \see fltk3::Widget::as_group(), fltk3::Widget::as_window()
+     */
+    virtual class fltk3::GlWindow* as_gl_window() {return 0;}
+    
+    /** For back compatibility only.
+     \deprecated Use selection_color() instead.
+     */
+    fltk3::Color color2() const {return (fltk3::Color)color2_;}
+    
+    /** For back compatibility only.
+     \deprecated Use selection_color(unsigned) instead.
+     */
+    void color2(unsigned a) {color2_ = a;}
+
+    /** Gets the font of the text in the input field.
+     \return the current fltk3::Font index */
+    fltk3::Font textfont() const {return label_.textfont_;}
+    
+    /** Sets the font of the text in the input field.
+     The text font defaults to \c fltk3::HELVETICA.
+     \param [in] s the new text font */
+    void textfont(fltk3::Font s) {label_.textfont_ = s;}
+    
+    /** Gets the size of the text in the input field.
+     \return the text height in pixels */
+    fltk3::Fontsize textsize() const {return label_.textsize_;}
+    
+    /** Sets the size of the text in the input field.
+     The text height defaults to \c fltk3::NORMAL_SIZE.
+     \param [in] s the new font height in pixel units */
+    void textsize(fltk3::Fontsize s) {label_.textsize_ = s;}
+    
+    /** Gets the color of the text in the input field.
+     \return the text color
+     \see textcolor(fltk3::Color) */
+    fltk3::Color textcolor() const {return label_.textcolor_;}
+    
+    /** Sets the color of the text in the input field.
+     The text color defaults to \c fltk3::FOREGROUND_COLOR.
+     \param [in] n new text color
+     \see textcolor() */
+    void textcolor(fltk3::Color n) {label_.textcolor_ = n;}
+    
+};
+  
+  
+  /**
+   Reserved type numbers (necessary for my cheapo RTTI) start here.
+   Grep the header files for "RESERVED_TYPE" to find the next available
+   number.
+   */
+  const uchar RESERVED_TYPE = 100;
+}
+
+#endif
+
+//
+// End of "$Id: Widget.h 8623 2011-04-24 17:09:41Z AlbrechtS $".
+//

Deleted: branches/branch-3.0/include/fltk3/osx.h

Copied: branches/branch-3.0/include/fltk3/osx.h (from rev 8988, branches/branch-3.0/fltk3/osx.h)
===================================================================
--- branches/branch-3.0/include/fltk3/osx.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/osx.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,250 @@
+//
+// "$Id: osx.h 8657 2011-05-12 11:50:43Z manolo $"
+//
+// Mac header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Do not directly include this file, instead use <fltk3/x.h>.  It will
+// include this file if "__APPLE__" is defined.  This is to encourage
+// portability of even the system-specific code...
+#ifndef FLTK3_DOXYGEN
+
+#if !defined(Fltk3_X_H)
+#  error "Never use <fltk3/osx.h> directly; include <fltk3/x.h> instead."
+#endif // !Fltk3_X_H
+#include <fltk3/Widget.h>
+
+typedef void* Window;	    // this is really a pointer to the subclass FLWindow of NSWindow
+
+namespace fltk3 {
+  typedef void* Offscreen; // this is really a CGContextRef
+  typedef void* Bitmask;   // this is really a CGImageRef
+}
+
+#include <AvailabilityMacros.h>
+#ifndef MAC_OS_X_VERSION_10_3
+#define MAC_OS_X_VERSION_10_3 1030
+#endif
+#ifndef MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_10_4 1040
+#endif
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+
+#if !(defined(FL_LIBRARY) || defined(FLTK3_INTERNALS)) // this part is used when compiling an application program
+
+namespace fltk3 {
+  typedef void* Region;
+}
+typedef void* Fl_CGContextRef;
+typedef void* Fl_PMPrintSettings;
+typedef void* Fl_PMPageFormat;
+typedef void* Fl_PMPrintSession;
+
+#else // this part must be compiled when building the FLTK libraries
+
+// Standard MacOS C/C++ includes...
+#include <ApplicationServices/ApplicationServices.h>
+#undef check // because of fltk3::check()
+
+typedef CGContextRef	Fl_CGContextRef;
+typedef PMPrintSettings Fl_PMPrintSettings;
+typedef PMPageFormat	Fl_PMPageFormat;
+typedef PMPrintSession	Fl_PMPrintSession;
+
+namespace fltk3 {
+  typedef struct flCocoaRegion {
+    int count;
+    CGRect *rects;
+  } *Region;  // a region is the union of a series of rectangles
+}
+
+#  include "Window.h"
+
+// Some random X equivalents
+struct XPoint { int x, y; };
+struct XRectangle {int x, y, width, height;};
+#ifndef CGFLOAT_DEFINED //appears with 10.5 in CGBase.h
+#if defined(__LP64__) && __LP64__
+typedef double CGFloat;
+#else
+typedef float CGFloat;
+#endif
+#endif // CGFLOAT_DEFINED
+
+extern CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h);
+inline fltk3::Region XRectangleRegion(int x, int y, int w, int h) {
+  fltk3::Region R = (fltk3::Region)malloc(sizeof(*R));
+  R->count = 1;
+  R->rects = (CGRect *)malloc(sizeof(CGRect));
+  *(R->rects) = fl_cgrectmake_cocoa(x, y, w, h);
+  return R;
+}
+inline void XDestroyRegion(fltk3::Region r) {
+  if(r) {
+    free(r->rects);
+    free(r);
+  }
+}
+extern void *fl_system_menu;
+extern void *fl_default_cursor;
+
+// This object contains all mac-specific stuff about a window:
+// WARNING: this object is highly subject to change!
+class Fl_X {
+  
+public:
+  Window xid;              // pointer to the Cocoa window object (FLWindow*)
+  fltk3::Offscreen other_xid;  // pointer for offscreen bitmaps (overlay window)
+  fltk3::Window *w;            // FLTK window for 
+  fltk3::Region region;
+  fltk3::Region subRegion;     // region for this specific subwindow
+  Fl_X *next;              // linked tree to support subwindows
+  Fl_X *xidChildren, *xidNext; // more subwindow tree
+  int wait_for_expose;
+  void *cursor;	           // is really NSCursor*
+  static Fl_X* first;
+  static Fl_X* i(const fltk3::Window* w) {return w->i;}
+  static int fake_X_wm(const fltk3::Window*,int&,int&,int&,int&,int&);
+  static void make(fltk3::Window*);
+  void flush();
+  // Quartz additions:
+  CGContextRef gc;                 // graphics context (NULL when using QD)
+  static void q_fill_context();    // fill a Quartz context with current FLTK state
+  static void q_clear_clipping();  // remove all clipping from a Quartz context
+  static void q_release_context(Fl_X *x=0); // free all resources associated with fl_gc
+  static void q_begin_image(CGRect&, int x, int y, int w, int h);
+  static void q_end_image();
+  // Cocoa additions
+  void destroy(void);
+  void map(void);
+  void unmap(void);
+  int unlink(Fl_X* start = NULL);
+  void collapse(void);
+  WindowRef window_ref(void);
+  void set_key_window(void);
+  void set_cursor(fltk3::Cursor);
+  static CGImageRef CGImage_from_window_rect(fltk3::Window *win, int x, int y, int w, int h);
+  static unsigned char *bitmap_from_window_rect(fltk3::Window *win, int x, int y, int w, int h, int *bytesPerPixel);
+  static fltk3::Region intersect_region_and_rect(fltk3::Region current, int x,int y,int w, int h);
+  static CGContextRef watch_cursor_image(void);
+  static CGContextRef help_cursor_image(void);
+  static CGContextRef nesw_cursor_image(void);
+  static CGContextRef nwse_cursor_image(void);
+  static CGContextRef none_cursor_image(void);
+  static void *get_carbon_function(const char *name);
+private:
+  static void relink(fltk3::Window*, fltk3::Window*);
+  bool subwindow;
+};
+
+extern struct Fl_XMap {
+  RGBColor rgb;
+  ulong pen;
+} *fl_current_xmap;
+extern FLTK3_EXPORT Window fl_window;
+
+#endif // FL_LIBRARY || FLTK3_INTERNALS
+
+extern FLTK3_EXPORT Fl_CGContextRef fl_gc;
+
+namespace fltk3 {
+  extern FLTK3_EXPORT class SysMenuBar *sys_menu_bar;
+}
+
+extern Window fl_xid(const fltk3::Window*);
+
+namespace fltk3 {
+  void clip_region(fltk3::Region);
+}
+
+extern FLTK3_EXPORT fltk3::Bitmask fl_create_bitmask(int w, int h, const uchar *data);
+extern FLTK3_EXPORT fltk3::Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data);
+extern FLTK3_EXPORT void fl_delete_bitmask(fltk3::Bitmask bm);
+extern fltk3::Offscreen fl_create_offscreen(int w, int h);
+extern void fl_copy_offscreen(int x,int y,int w,int h, fltk3::Offscreen gWorld, int srcx,int srcy);
+extern void fl_delete_offscreen(fltk3::Offscreen gWorld);
+extern void fl_begin_offscreen(fltk3::Offscreen gWorld);
+extern void fl_end_offscreen();
+
+extern FLTK3_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b);
+extern void fl_open_display();
+
+#endif // FLTK3_DOXYGEN
+
+/** \defgroup group_macosx Mac OS X-specific symbols
+ Mac OS X-specific symbols declared in <fltk3/x.h> or <fltk3/gl.h>
+ @{ */
+
+/** @brief Register a function called for each file dropped onto an application icon.
+ \e cb will be called with a single Unix-style file name and path.
+ If multiple files were dropped, \e cb will be called multiple times.
+ */
+extern void fl_open_callback(void (*cb)(const char *));
+
+/** 
+ * \brief Attaches a callback to the "About myprog" item of the system application menu.
+ *
+ * \param cb   a callback that will be called by "About myprog" menu item
+ *		   with NULL 1st argument.
+ * \param user_data   a pointer transmitted as 2nd argument to the callback.
+ * \param shortcut    optional shortcut to attach to the "About myprog" menu item (e.g., fltk3::META+'a')
+ */
+extern void fl_mac_set_about( fltk3::Callback *cb, void *user_data, unsigned int shortcut = 0);
+
+/** \brief The version number of the running Mac OS X (e.g., 100604 for 10.6.4)
+ */
+extern int fl_mac_os_version;
+
+class Fl_Mac_App_Menu {
+public:
+  /** Localizable text for the "About xxx" application menu item */
+  static const char *about;
+  /** Localizable text for the "Print Front Window" application menu item.
+   This menu item won't be displayed if Fl_Mac_App_Menu::print 
+   is set to an empty string.
+   */
+  static const char *print;
+  /** Localizable text for the "Services" application menu item */
+  static const char *services;
+  /** Localizable text for the "Hide xxx" application menu item */
+  static const char *hide;
+  /** Localizable text for the "Hide Others" application menu item */
+  static const char *hide_others;
+  /** Localizable text for the "Show All" application menu item */
+  static const char *show;
+  /** Localizable text for the "Quit xxx" application menu item */
+  static const char *quit;
+};
+
+/** @} */
+
+//
+// End of "$Id: osx.h 8657 2011-05-12 11:50:43Z manolo $".
+//
+

Deleted: branches/branch-3.0/include/fltk3/run.h

Copied: branches/branch-3.0/include/fltk3/run.h (from rev 8988, branches/branch-3.0/fltk3/run.h)
===================================================================
--- branches/branch-3.0/include/fltk3/run.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3/run.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1170 @@
+//
+// "$Id: run.h 8548 2011-03-30 12:07:52Z AlbrechtS $"
+//
+// Main header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/** \file
+ fltk3 namespace
+ */
+
+#ifndef FLTK3_RUN_H
+#  define FLTK3_RUN_H
+
+#ifdef FLTK_HAVE_CAIRO
+# include <fltk3/Cairo.h>
+#endif
+
+#  include "utf8.h"
+#  include "enumerations.h"
+
+#  ifdef check
+#    undef check
+#  endif
+
+
+namespace fltk3 { 
+  class Widget;
+  class Window;
+  struct Label;
+  class Image;
+  
+  /** \defgroup  callback_functions Callback function typedefs
+   \brief Typedefs defined in <fltk3/run.h> for callback or handler functions passed as function parameters.
+   
+   FLTK uses callback functions as parameters for some function calls, e.g. to
+   set up global event handlers (fltk3::add_handler()), to add a timeout handler
+   (fltk3::add_timeout()), and many more.
+   
+   The typedefs defined in this group describe the function parameters used to set
+   up or clear the callback functions and should also be referenced to define the
+   callback function to handle such events in the user's code.
+   
+   \see fltk3::add_handler(), fltk3::add_timeout(), fltk3::repeat_timeout(),
+   fltk3::remove_timeout() and others
+   @{ */
+  
+  /** Signature of some label drawing functions passed as parameters */
+  typedef void (LabelDrawF)(const fltk3::Label *label, int x, int y, int w, int h, fltk3::Align align);
+  
+  /** Signature of some label measurement functions passed as parameters */
+  typedef void (LabelMeasureF)(const fltk3::Label *label, int &width, int &height);
+  
+  /** Signature of some box drawing functions passed as parameters */
+  typedef void (BoxDrawF)(int x, int y, int w, int h, fltk3::Color color);
+  
+  /** Signature of some timeout callback functions passed as parameters */
+  typedef void (*TimeoutHandler)(void *data);
+  
+  /** Signature of some wakeup callback functions passed as parameters */
+  typedef void (*AwakeHandler)(void *data);
+  
+  /** Signature of add_idle callback functions passed as parameters */
+  typedef void (*IdleHandler)(void *data);
+  
+  /** Signature of set_idle callback functions passed as parameters */
+  typedef void (*OldIdleHandler)();
+  
+  /** Signature of add_fd functions passed as parameters */
+  typedef void (*FDHandler)(int fd, void *data);
+  
+  /** Signature of add_handler functions passed as parameters */
+  typedef int (*EventHandler)(int event);
+  
+  /** Signature of set_abort functions passed as parameters */
+  typedef void (*AbortHandler)(const char *format,...);
+  
+  /** Signature of set_atclose functions passed as parameters */
+  typedef void (*AtcloseHandler)(fltk3::Window *window, void *data);
+  
+  /** Signature of args functions passed as parameters */
+  typedef int (*ArgsHandler)(int argc, char **argv, int &i);
+  
+  /** Signature of event_dispatch functions passed as parameters.
+   \see fltk3::event_dispatch(fltk3::EventDispatch) */
+  typedef int (*EventDispatch)(int event, fltk3::Window *w);
+  
+  /** @} */ /* group callback_functions */
+  
+  
+  /**
+   The Fl is the FLTK global (static) class containing
+   state information and global methods for the current application.
+   */
+  
+  //public: // should be private!
+#ifndef FLTK3_DOXYGEN
+  extern int e_number;
+  extern int e_x;
+  extern int e_y;
+  extern int e_x_root;
+  extern int e_y_root;
+  extern int e_dx;
+  extern int e_dy;
+  extern unsigned int e_state;
+  extern int e_clicks;
+  extern int e_is_click;
+  extern unsigned int e_keysym;
+  extern char* e_text;
+  extern int e_length;
+  extern fltk3::EventDispatch e_dispatch;
+  extern fltk3::Widget* belowmouse_;
+  extern fltk3::Widget* pushed_;
+  extern fltk3::Widget* focus_;
+  extern int damage_;
+  extern fltk3::Widget* selection_owner_;
+  extern fltk3::Window* modal_;
+  extern fltk3::Window* grab_;
+  extern int compose_state;
+#endif
+  /**
+   If true then flush() will do something.
+   */
+  inline void damage(int d) {damage_ = d;}
+  
+  //public:
+  /** Enumerator for global FLTK options.
+   These options can be set system wide, per user, or for the running
+   application only.
+   \see fltk3::option(fltk3::Option, bool)
+   \see fltk3::option(fltk3::Option)
+   */
+  typedef enum {
+    /// When switched on, moving the text cursor beyond the start or end of
+    /// a text in a text widget will change focus to the next text widget.
+    /// When switched off, the cursor will stop at the end of the text.
+    /// Pressing Tab or Ctrl-Tab will advance the keyboard focus.
+    OPTION_ARROW_FOCUS = 0,
+    // When switched on, FLTK will use the file chooser dialog that comes 
+    // with your operating system whenever possible. When switched off, FLTK
+    // will present its own file chooser.
+    // \todo implement me
+    // OPTION_NATIVE_FILECHOOSER,
+    // When Filechooser Preview is enabled, the FLTK or native file chooser
+    // will show a preview of a selected file (if possible) before the user
+    // decides to choose the file.
+    // \todo implement me
+    //OPTION_FILECHOOSER_PREVIEW,
+    /// If visible focus is switched on, FLTK will draw a dotted rectangle 
+    /// inside the widget that will receive the next keystroke. If switched
+    /// off, no such indicator will be drawn and keyboard navigation
+    /// is disabled.
+    OPTION_VISIBLE_FOCUS,
+    /// If text drag-and-drop is enabled, the user can select and drag text
+    /// from any text widget. If disabled, no dragging is possible, however
+    /// dropping text from other applications still works.
+    OPTION_DND_TEXT,
+    /// If tooltips are enabled, hovering the mouse over a widget with a 
+    /// tooltip text will open a little tooltip window until the mouse leaves
+    /// the widget. If disabled, no tooltip is shown.
+    OPTION_SHOW_TOOLTIPS,
+    // don't change this, leave it always as the last element
+    /// For internal use only.
+    OPTION_LAST
+  } Option;
+  
+  //private:  
+  extern unsigned char options_[OPTION_LAST];
+  extern unsigned char options_read_;
+  
+  //public:  
+  /*
+   Return a global setting for all FLTK applications, possibly overridden
+   by a setting specifically for this application.
+   */
+  bool option(Option opt);
+  
+  /*
+   Override an option while the application is running.
+   */
+  void option(Option opt, bool val);
+  
+  /**
+   The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
+   
+   This is now used as part of a higher level system allowing multiple
+   idle callback functions to be called.
+   \see add_idle(), remove_idle()
+   */
+  extern void (*idle)();
+  
+#ifndef FLTK3_DOXYGEN
+  extern fltk3::AwakeHandler *awake_ring_;
+  extern void **awake_data_;
+  extern int awake_ring_size_;
+  extern int awake_ring_head_;
+  extern int awake_ring_tail_;
+  extern const char* scheme_;
+  extern fltk3::Image* scheme_bg_;
+  
+  extern int e_original_keysym; // late addition
+  extern int scrollbar_size_;
+#endif
+  
+  
+  int add_awake_handler_(fltk3::AwakeHandler, void*);
+  int get_awake_handler_(fltk3::AwakeHandler&, void*&);
+  
+  //public:
+  
+  // API version number
+  double version();
+  
+  // argument parsers:
+  int arg(int argc, char **argv, int& i);
+  int args(int argc, char **argv, int& i, fltk3::ArgsHandler cb = 0);
+  void args(int argc, char **argv);
+  /**
+   Usage string displayed if fltk3::args() detects an invalid argument.
+   This may be changed to point to customized text at run-time.
+   */
+  extern const char* const help;
+  
+  // things called by initialization:
+  void display(const char*);
+  int visual(int);
+  /**
+   This does the same thing as fltk3::visual(int) but also requires OpenGL
+   drawing to work. This <I>must</I> be done if you want to draw in
+   normal windows with OpenGL with gl_start() and gl_end().
+   It may be useful to call this so your X windows use the same visual
+   as an fltk3::GlWindow, which on some servers will reduce colormap flashing.
+   
+   See fltk3::GlWindow for a list of additional values for the argument.
+   */
+  int gl_visual(int, int *alist=0); // platform dependent
+  void own_colormap();
+  void get_system_colors();
+  void foreground(uchar, uchar, uchar);
+  void background(uchar, uchar, uchar);
+  void background2(uchar, uchar, uchar);
+  
+  // schemes:
+  int scheme(const char*);
+  /** See void scheme(const char *name) */
+  inline const char* scheme() {return scheme_;}
+  /** 
+   Called by scheme according to scheme name. 
+   Loads or reloads the current scheme selection. 
+   See void scheme(const char *name) 
+   */
+  int reload_scheme(); // platform dependent
+  int scrollbar_size();
+  void scrollbar_size(int W);
+  
+  // execution:
+  int wait();
+  double wait(double time);
+  int check();
+  int ready();
+  int run();
+  fltk3::Widget* readqueue();
+  /**
+   Adds a one-shot timeout callback.  The function will be called by
+   fltk3::wait() at <i>t</i> seconds after this function is called.
+   The optional void* argument is passed to the callback.
+   
+   You can have multiple timeout callbacks. To remove a timeout
+   callback use fltk3::remove_timeout().
+   
+   If you need more accurate, repeated timeouts, use fltk3::repeat_timeout() to
+   reschedule the subsequent timeouts.
+   
+   The following code will print "TICK" each second on
+   stdout with a fair degree of accuracy:
+   
+   \code
+   void callback(void*) {
+   puts("TICK");
+   fltk3::repeat_timeout(1.0, callback);
+   }
+   
+   int main() {
+   fltk3::add_timeout(1.0, callback);
+   return fltk3::run();
+   }
+   \endcode
+   */
+  void add_timeout(double t, fltk3::TimeoutHandler,void* = 0); // platform dependent
+  /**
+   Repeats a timeout callback from the expiration of the
+   previous timeout, allowing for more accurate timing. You may only call
+   this method inside a timeout callback.
+   
+   The following code will print "TICK" each second on
+   stdout with a fair degree of accuracy:
+   
+   \code
+   void callback(void*) {
+   puts("TICK");
+   fltk3::repeat_timeout(1.0, callback);
+   }
+   
+   int main() {
+   fltk3::add_timeout(1.0, callback);
+   return fltk3::run();
+   }
+   \endcode
+   */
+  void repeat_timeout(double t, fltk3::TimeoutHandler, void* = 0); // platform dependent
+  int  has_timeout(fltk3::TimeoutHandler, void* = 0);
+  void remove_timeout(fltk3::TimeoutHandler, void* = 0);
+  void add_check(fltk3::TimeoutHandler, void* = 0);
+  int  has_check(fltk3::TimeoutHandler, void* = 0);
+  void remove_check(fltk3::TimeoutHandler, void* = 0);
+  /**
+   Adds file descriptor fd to listen to.
+   
+   When the fd becomes ready for reading fltk3::wait() will call the
+   callback and then return. The callback is passed the fd and the
+   arbitrary void* argument.
+   
+   The second version takes a when bitfield, with the bits
+   fltk3::READ, fltk3::WRITE, and fltk3::EXCEPT defined,
+   to indicate when the callback should be done.
+   
+   There can only be one callback of each type for a file descriptor. 
+   fltk3::remove_fd() gets rid of <I>all</I> the callbacks for a given
+   file descriptor.
+   
+   Under UNIX <I>any</I> file descriptor can be monitored (files,
+   devices, pipes, sockets, etc.). Due to limitations in Microsoft Windows,
+   WIN32 applications can only monitor sockets.
+   */
+  void add_fd(int fd, int when, fltk3::FDHandler cb, void* = 0); // platform dependent
+  /** See void add_fd(int fd, int when, fltk3::FDHandler cb, void* = 0) */
+  void add_fd(int fd, fltk3::FDHandler cb, void* = 0); // platform dependent
+  /** Removes a file descriptor handler. */
+  void remove_fd(int, int when); // platform dependent
+  /** Removes a file descriptor handler. */
+  void remove_fd(int); // platform dependent
+  
+  void add_idle(fltk3::IdleHandler cb, void* data = 0);
+  int  has_idle(fltk3::IdleHandler cb, void* data = 0);
+  void remove_idle(fltk3::IdleHandler cb, void* data = 0);
+  /** If true then flush() will do something. */
+  inline int damage() {return damage_;}
+  void redraw();
+  void flush();
+  /** \addtogroup group_comdlg
+   @{ */
+  /**
+   FLTK calls fltk3::warning() to output a warning message.
+   
+   The default version on Windows returns \e without printing a warning
+   message, because Windows programs normally don't have stderr (a console
+   window) enabled.
+   
+   The default version on all other platforms prints the warning message to stderr.
+   
+   You can override the behavior by setting the function pointer to your
+   own routine.
+   
+   fltk3::warning() means that there was a recoverable problem, the display may
+   be messed up, but the user can probably keep working - all X protocol
+   errors call this, for example. The default implementation returns after
+   displaying the message.
+   \note \#include <fltk3/run.h>
+   */
+  extern void (*warning)(const char*, ...);
+  /**
+   FLTK calls fltk3::error() to output a normal error message.
+   
+   The default version on Windows displays the error message in a MessageBox window.
+   
+   The default version on all other platforms prints the error message to stderr.
+   
+   You can override the behavior by setting the function pointer to your
+   own routine.
+   
+   fltk3::error() means there is a recoverable error such as the inability to read
+   an image file. The default implementation returns after displaying the message.
+   \note \#include <fltk3/run.h>
+   */
+  extern void (*error)(const char*, ...);
+  /**
+   FLTK calls fltk3::fatal() to output a fatal error message.
+   
+   The default version on Windows displays the error message in a MessageBox window.
+   
+   The default version on all other platforms prints the error message to stderr.
+   
+   You can override the behavior by setting the function pointer to your
+   own routine.
+   
+   fltk3::fatal() must not return, as FLTK is in an unusable state, however your
+   version may be able to use longjmp or an exception to continue, as long as
+   it does not call FLTK again. The default implementation exits with status 1
+   after displaying the message.
+   \note \#include <fltk3/run.h>
+   */
+  extern void (*fatal)(const char*, ...);
+  /** @} */
+  
+  /** \defgroup  fl_windows Windows handling functions
+   \brief Windows and standard dialogs handling declared in <fltk3/run.h>
+   @{ */
+  fltk3::Window* first_window();
+  void first_window(fltk3::Window*);
+  fltk3::Window* next_window(const fltk3::Window*);
+  
+  /**
+   Returns the top-most modal() window currently shown.
+   
+   This is the most recently shown() window with modal() true, or NULL
+   if there are no modal() windows shown().
+   The modal() window has its handle() method called
+   for all events, and no other windows will have handle()
+   called (grab() overrides this).
+   */
+  inline Window* modal() {return modal_;}
+  /** Returns the window that currently receives all events.
+   
+   \return The window that currently receives all events,
+   or NULL if event grabbing is currently OFF.
+   */
+  inline Window* grab() {return grab_;}
+  /** Selects the window to grab.  
+   This is used when pop-up menu systems are active.
+   
+   Send all events to the passed window no matter where the pointer or
+   focus is (including in other programs). The window <I>does not have
+   to be shown()</I> , this lets the handle() method of a
+   "dummy" window override all event handling and allows you to
+   map and unmap a complex set of windows (under both X and WIN32
+   <I>some</I> window must be mapped because the system interface needs a
+   window id).
+   
+   If grab() is on it will also affect show() of windows by doing
+   system-specific operations (on X it turns on override-redirect).
+   These are designed to make menus popup reliably
+   and faster on the system.
+   
+   To turn off grabbing do fltk3::grab(0).
+   
+   <I>Be careful that your program does not enter an infinite loop
+   while grab() is on.  On X this will lock up your screen!</I>
+   To avoid this potential lockup, all newer operating systems seem to 
+   limit mouse pointer grabbing to the time during which a mouse button 
+   is held down. Some OS's may not support grabbing at all.
+   */
+  void grab(fltk3::Window*); // platform dependent
+  /** @} */
+  
+  /** \defgroup fl_events Events handling functions
+   Fl class events handling API declared in <fltk3/run.h>
+   @{
+   */
+  // event information:
+  /**
+   Returns the last event that was processed. This can be used
+   to determine if a callback is being done in response to a
+   keypress, mouse click, etc.
+   */
+  inline int event()		{return e_number;}
+  /**
+   Returns the mouse position of the event relative to the fltk3::Window
+   it was passed to.
+   */
+  inline int event_x()	{return e_x;}
+  /**
+   Returns the mouse position of the event relative to the fltk3::Window
+   it was passed to.
+   */
+  inline int event_y()	{return e_y;}
+  /**
+   Returns the mouse position on the screen of the event.  To find the
+   absolute position of an fltk3::Window on the screen, use the
+   difference between event_x_root(),event_y_root() and 
+   event_x(),event_y().
+   */
+  inline int event_x_root()	{return e_x_root;}
+  /**
+   Returns the mouse position on the screen of the event.  To find the
+   absolute position of an fltk3::Window on the screen, use the
+   difference between event_x_root(),event_y_root() and 
+   event_x(),event_y().
+   */
+  inline int event_y_root()	{return e_y_root;}
+  /**
+   Returns the current horizontal mouse scrolling associated with the
+   fltk3::MOUSEWHEEL event. Right is positive.
+   */
+  inline int event_dx()	{return e_dx;}
+  /**
+   Returns the current vertical mouse scrolling associated with the
+   fltk3::MOUSEWHEEL event. Down is positive.
+   */
+  inline int event_dy()	{return e_dy;}
+  /**
+   Return where the mouse is on the screen by doing a round-trip query to
+   the server.  You should use fltk3::event_x_root() and 
+   fltk3::event_y_root() if possible, but this is necessary if you are
+   not sure if a mouse event has been processed recently (such as to
+   position your first window).  If the display is not open, this will
+   open it.
+   */
+  void get_mouse(int &,int &); // platform dependent
+  /**
+   Returns non zero if we had a double click event.
+   \retval Non-zero if the most recent fltk3::PUSH or fltk3::KEYBOARD was a "double click".  
+   \retval  N-1 for  N clicks. 
+   A double click is counted if the same button is pressed
+   again while event_is_click() is true.
+   
+   */
+  inline int event_clicks()	{return e_clicks;}
+  /**
+   Manually sets the number returned by fltk3::event_clicks().  
+   This can be used to set it to zero so that
+   later code does not think an item was double-clicked.
+   \param[in] i corresponds to no double-click if 0, i+1 mouse clicks otherwise
+   \see int event_clicks()
+   */
+  inline void event_clicks(int i) {e_clicks = i;}
+  /**
+   Returns non-zero if the mouse has not moved far enough
+   and not enough time has passed since the last fltk3::PUSH or 
+   fltk3::KEYBOARD event for it to be considered a "drag" rather than a
+   "click".  You can test this on fltk3::DRAG, fltk3::RELEASE,
+   and fltk3::MOVE events.  
+   */
+  inline int event_is_click()	{return e_is_click;}
+  /**
+   Clears the value returned by fltk3::event_is_click().  
+   Useful to prevent the <I>next</I>
+   click from being counted as a double-click or to make a popup menu
+   pick an item with a single click.  Don't pass non-zero to this. 
+   */
+  inline void event_is_click(int i) {e_is_click = i;}
+  /**
+   Gets which particular mouse button caused the current event. 
+   This returns garbage if the most recent event was not a fltk3::PUSH or fltk3::RELEASE event.
+   \retval fltk3::LEFT_MOUSE \retval fltk3::MIDDLE_MOUSE \retval fltk3::RIGHT_MOUSE.
+   \see fltk3::event_buttons()
+   */
+  inline unsigned int event_button()	{return e_keysym-fltk3::MouseButton;}
+  /**
+   This is a bitfield of what shift states were on and what mouse buttons
+   were held down during the most recent event. The second version
+   returns non-zero if any of the passed bits are turned on.
+   The legal bits are:
+   
+   \li fltk3::SHIFT
+   \li fltk3::CAPS_LOCK
+   \li fltk3::CTRL
+   \li fltk3::ALT
+   \li fltk3::NUM_LOCK
+   \li fltk3::META
+   \li fltk3::SCROLL_LOCK
+   \li fltk3::BUTTON1
+   \li fltk3::BUTTON2
+   \li fltk3::BUTTON3
+   
+   X servers do not agree on shift states, and fltk3::NUM_LOCK, fltk3::META, and
+   fltk3::SCROLL_LOCK may not work. The values were selected to match the
+   XFree86 server on Linux. In addition there is a bug in the way X works
+   so that the shift state is not correctly reported until the first event
+   <I>after</I> the shift key is pressed or released.
+   */
+  inline unsigned event_state()	{return e_state;}
+  /** See int event_state() */
+  inline unsigned event_state(unsigned i) {return e_state&i;}
+  /**
+   Gets which key on the keyboard was last pushed.
+   
+   The returned integer 'key code' is not necessarily a text
+   equivalent for the keystroke. For instance: if someone presses '5' on the 
+   numeric keypad with numlock on, fltk3::event_key() may return the 'key code'
+   for this key, and NOT the character '5'. To always get the '5', use fltk3::event_text() instead.
+   
+   \returns an integer 'key code', or 0 if the last event was not a key press or release.
+   \see int event_key(int), event_text(), compose(int&).
+   */
+  inline unsigned int event_key()	{return e_keysym;}
+  /**
+   Returns the keycode of the last key event, regardless of the NumLock state.
+   
+   If NumLock is deactivated, FLTK translates events from the 
+   numeric keypad into the corresponding arrow key events. 
+   event_key() returns the translated key code, whereas
+   event_original_key() returns the keycode before NumLock translation.
+   */
+  inline int event_original_key(){return e_original_keysym;}
+  /** 
+   Returns true if the given \p key was held
+   down (or pressed) <I>during</I> the last event.  This is constant until
+   the next event is read from the server.
+   
+   fltk3::get_key(int) returns true if the given key is held down <I>now</I>.
+   Under X this requires a round-trip to the server and is <I>much</I>
+   slower than fltk3::event_key(int).
+   
+   Keys are identified by the <I>unshifted</I> values. FLTK defines a
+   set of symbols that should work on most modern machines for every key
+   on the keyboard:
+   
+   \li All keys on the main keyboard producing a printable ASCII
+   character use the value of that ASCII character (as though shift,
+   ctrl, and caps lock were not on). The space bar is 32.
+   \li All keys on the numeric keypad producing a printable ASCII
+   character use the value of that ASCII character plus fltk3::KPKey.
+   The highest possible value is fltk3::KPLastKey so you can
+   range-check to see if something is  on the keypad.
+   \li All numbered function keys use the number on the function key plus 
+   fltk3::FKey.  The highest possible number is fltk3::FLastKey, so you
+   can range-check a value.
+   \li Buttons on the mouse are considered keys, and use the button
+   number (where the left button is 1) plus fltk3::MouseButton.
+   \li All other keys on the keypad have a symbol: fltk3::EscapeKey,
+   fltk3::BackSpaceKey, fltk3::TabKey, fltk3::EnterKey, fltk3::PrintKey, fltk3::ScrollLockKey, fltk3::PauseKey,
+   fltk3::InsertKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::EndKey, fltk3::PageDownKey,
+   fltk3::LeftKey, fltk3::UpKey, fltk3::RightKey, fltk3::DownKey, fltk3::ShiftLKey, fltk3::ShiftRKey,
+   fltk3::ControlLKey, fltk3::ControlRKey, fltk3::CapsLockKey, fltk3::AltLKey, fltk3::AltRKey,
+   fltk3::MetaLKey, fltk3::MetaRKey, fltk3::MenuKey, fltk3::NumLockKey, fltk3::KPEnterKey.  Be
+   careful not to confuse these with the very similar, but all-caps,
+   symbols used by fltk3::event_state().
+   
+   On X fltk3::get_key(fltk3::MouseButton+n) does not work.
+   
+   On WIN32 fltk3::get_key(fltk3::KPEnterKey) and fltk3::event_key(fltk3::KPEnterKey) do not work.
+   */
+  int event_key(int key);
+  /** 
+   Returns true if the given \p key is held down <I>now</I>.  
+   Under X this requires a round-trip to the server and is <I>much</I>
+   slower than fltk3::event_key(int). \see event_key(int)
+   */
+  int get_key(unsigned int key); // platform dependent
+  /** 
+   Returns the text associated with the current event, including fltk3::PASTE or fltk3::DND_RELEASE events.
+   This can be used in response to fltk3::KEYUP, fltk3::KEYDOWN, fltk3::PASTE, fltk3::DND_RELEASE.
+   
+   When responding to fltk3::KEYUP/fltk3::KEYDOWN, use this function instead of fltk3::event_key()
+   to get the text equivalent of keystrokes suitable for inserting into strings 
+   and text widgets.
+   
+   The returned string is guaranteed to be be NULL terminated.
+   However, see fltk3::event_length() for the actual length of the string,
+   in case the string itself contains NULLs that are part of the text data.
+   
+   \returns A NULL terminated text string equivalent of the last keystroke.
+   */
+  inline const char* event_text() {return e_text;}
+  /**
+   Returns the length of the text in fltk3::event_text(). There
+   will always be a nul at this position in the text. However there may
+   be a nul before that if the keystroke translates to a nul character or
+   you paste a nul character.
+   */
+  inline int event_length() {return e_length;}
+  
+  int compose(int &del);
+  void compose_reset();
+  int event_inside(int,int,int,int);
+  int event_inside(const fltk3::Widget*);
+  int test_shortcut(fltk3::Shortcut);
+  
+  // event destinations:
+  int handle(int, fltk3::Window*);
+  int handle_(int, fltk3::Window*);
+  /**  Gets the widget that is below the mouse. 
+   \see  belowmouse(fltk3::Widget*) */
+  inline fltk3::Widget* belowmouse() {return belowmouse_;}
+  void belowmouse(fltk3::Widget*);
+  /** Gets the widget that is being pushed.
+   \see void pushed(fltk3::Widget*) */
+  inline fltk3::Widget* pushed()	{return pushed_;}
+  void pushed(fltk3::Widget*);
+  /** Gets the current fltk3::focus() widget. \sa fltk3::focus(fltk3::Widget*) */
+  inline fltk3::Widget* focus()	{return focus_;}
+  void focus(fltk3::Widget*);
+  void add_handler(fltk3::EventHandler h);
+  void remove_handler(fltk3::EventHandler h);
+  void event_dispatch(fltk3::EventDispatch d);
+  fltk3::EventDispatch event_dispatch();
+  /** @} */
+  
+  /** \defgroup  fl_clipboard  Selection & Clipboard functions
+   FLTK global copy/cut/paste functions declared in <fltk3/run.h>
+   @{ */
+  // cut/paste:
+  /**
+   Copies the data pointed to by \p stuff to the selection buffer 
+   (\p destination is 0) or
+   the clipboard (\p destination is 1); \p len is the number of relevant
+   bytes in \p stuff.
+   The selection buffer is used for
+   middle-mouse pastes and for drag-and-drop selections. The 
+   clipboard is used for traditional copy/cut/paste operations.
+   */
+  void copy(const char* stuff, int len, int destination = 0); // platform dependent
+  /**
+   Pastes the data from the selection buffer (\p source is 0) or the clipboard 
+   (\p source is 1) into \p receiver.  
+   Set things up so the receiver widget will be called with an fltk3::PASTE event some
+   time in the future with the data from the specified \p source in fltk3::event_text()
+   and the number of characters in fltk3::event_length().
+   The receiver
+   should be prepared to be called \e directly by this, or for
+   it to happen \e later, or possibly <i>not at all</i>.  This
+   allows the window system to take as long as necessary to retrieve
+   the paste buffer (or even to screw up completely) without complex
+   and error-prone synchronization code in FLTK.
+   
+   The selection buffer is used for middle-mouse pastes and for 
+   drag-and-drop selections. The clipboard is used for traditional 
+   copy/cut/paste operations.
+   */
+  void paste(fltk3::Widget &receiver, int source /*=0*/); // platform dependent
+  /**
+   Initiate a Drag And Drop operation. The selection buffer should be
+   filled with relevant data before calling this method. FLTK will
+   then initiate the system wide drag and drop handling. Dropped data
+   will be marked as <i>text</i>.
+   
+   Create a selection first using:
+   fltk3::copy(const char *stuff, int len, 0)
+   */
+  int dnd(); // platform dependent
+  
+  // These are for back-compatibility only:
+  /**  back-compatibility only: Gets the widget owning the current selection  
+   \see fltk3::Widget* selection_owner(fltk3::Widget*) */
+  inline fltk3::Widget* selection_owner() {return selection_owner_;}
+  void selection_owner(fltk3::Widget*);
+  void selection(fltk3::Widget &owner, const char*, int len);
+  void paste(fltk3::Widget &receiver);
+  /** @} */
+  /** \defgroup  fl_screen  Screen functions
+   fl global screen functions declared in <fltk3/run.h>
+   @{ */
+  // screen size:
+  /** Returns the origin of the current screen work area, where 0 indicates the left side of the screen. */
+  int x(); // platform dependent
+  /** Returns the origin of the current screen work area, where 0 indicates the top edge of the screen. */
+  int y(); // platform dependent
+  /** Returns the width of the screen work area in pixels. */
+  int w(); // platform dependent
+  /** Returns the height of the screen work area in pixels. */
+  int h(); // platform dependent
+  
+  // multi-head support:
+  int screen_count();
+  /** 
+   Gets the bounding box of a screen that contains the mouse pointer.
+   \param[out]  X,Y,W,H the corresponding screen bounding box
+   \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
+   */
+  void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
+  void screen_xywh(int &X, int &Y, int &W, int &H, int n); 
+  void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh);
+  void screen_dpi(float &h, float &v, int n=0);
+  inline void screen_xywh(int &X, int &Y, int &W, int &H) {
+    screen_xywh(X, Y, W, H, e_x_root, e_y_root);
+  }
+  
+  /**   @} */
+  
+  /** \defgroup  fl_attributes  Color & Font functions
+   fl global color, font functions.
+   These functions are declared in <fltk3/run.h> or <fltk3/draw.h>. 
+   @{ */
+  
+  // color map:
+  void	set_color(fltk3::Color, uchar, uchar, uchar);
+  /**
+   Sets an entry in the fltk3::color index table. You can set it to any
+   8-bit RGB color. The color is not allocated until fltk3::color(i) is used.
+   */
+  void	set_color(fltk3::Color i, unsigned c); // platform dependent
+  unsigned get_color(fltk3::Color i);
+  void	get_color(fltk3::Color i, uchar &red, uchar &green, uchar &blue);
+  /**
+   Frees the specified color from the colormap, if applicable.
+   If overlay is non-zero then the color is freed from the
+   overlay colormap.
+   */
+  void	free_color(fltk3::Color i, int overlay = 0); // platform dependent
+  
+  // fonts:
+  const char* get_font(fltk3::Font);
+  /**
+   Get a human-readable string describing the family of this face.  This
+   is useful if you are presenting a choice to the user.  There is no
+   guarantee that each face has a different name.  The return value points
+   to a static buffer that is overwritten each call.
+   
+   The integer pointed to by \p attributes (if the pointer is not
+   zero) is set to zero, fltk3::BOLD or fltk3::ITALIC or 
+   fltk3::BOLD | fltk3::ITALIC.  To locate a "family" of fonts, search
+   forward and back for a set with non-zero attributes, these faces along
+   with the face with a zero attribute before them constitute a family.
+   */
+  const char* get_font_name(fltk3::Font, int* attributes = 0);
+  /**
+   Return an array of sizes in \p sizep.  The return value is the
+   length of this array.  The sizes are sorted from smallest to largest
+   and indicate what sizes can be given to fltk3::font() that will
+   be matched exactly (fltk3::font() will pick the closest size for
+   other sizes).  A zero in the first location of the array indicates a
+   scalable font, where any size works, although the array may list sizes
+   that work "better" than others.  Warning: the returned array
+   points at a static buffer that is overwritten each call.  Under X this
+   will open the display.
+   */
+  int get_font_sizes(fltk3::Font, int*& sizep);
+  void set_font(fltk3::Font, const char*);
+  void set_font(fltk3::Font, fltk3::Font);
+  /**
+   FLTK will open the display, and add every fonts on the server to the
+   face table.  It will attempt to put "families" of faces together, so
+   that the normal one is first, followed by bold, italic, and bold
+   italic.
+   
+   The optional argument is a string to describe the set of fonts to
+   add.  Passing NULL will select only fonts that have the
+   ISO8859-1 character set (and are thus usable by normal text).  Passing
+   "-*" will select all fonts with any encoding as long as they have
+   normal X font names with dashes in them.  Passing "*" will list every
+   font that exists (on X this may produce some strange output).  Other
+   values may be useful but are system dependent.  With WIN32 NULL
+   selects fonts with ISO8859-1 encoding and non-NULL selects
+   all fonts.
+   
+   The return value is how many faces are in the table after this is done.
+   */
+  fltk3::Font set_fonts(const char* = 0); // platform dependent
+  
+  /**   @} */
+  /** \defgroup  fl_drawings  Drawing functions
+   FLTK global graphics and GUI drawing functions.
+   These functions are declared in <fltk3/draw.h>, 
+   and in <fltk3/x.h> for offscreen buffer-related ones.
+   @{ */
+  // <Hack to re-order the 'Drawing functions' group>
+  /** @} */
+  
+  // labeltypes:
+  void set_labeltype(fltk3::Labeltype,fltk3::LabelDrawF*,fltk3::LabelMeasureF*);
+  /** Sets the functions to call to draw and measure a specific labeltype. */
+  void set_labeltype(fltk3::Labeltype, fltk3::Labeltype from); // is it defined ?
+  
+  // boxtypes:
+  fltk3::BoxDrawF *get_boxtype(fltk3::Boxtype);
+  void set_boxtype(fltk3::Boxtype, fltk3::BoxDrawF*,uchar,uchar,uchar,uchar);
+  void set_boxtype(fltk3::Boxtype, fltk3::Boxtype from);
+  int box_dx(fltk3::Boxtype);
+  int box_dy(fltk3::Boxtype);
+  int box_dw(fltk3::Boxtype);
+  int box_dh(fltk3::Boxtype);
+  int draw_box_active();
+  
+  // back compatibility:
+  /** \addtogroup fl_windows 
+   @{ */
+  /** For back compatibility, sets the void fltk3::fatal handler callback */
+  inline void set_abort(fltk3::AbortHandler f) {fatal = f;}
+  extern void (*atclose)(fltk3::Window*,void*);
+  void default_atclose(fltk3::Window*,void*);
+  /** For back compatibility, sets the fltk3::atclose handler callback. You
+   can now simply change the callback for the window instead.
+   \see fltk3::Window::callback(fltk3::Callback*) */
+  inline void set_atclose(fltk3::AtcloseHandler f) {atclose = f;}
+  /**   @} */
+  
+  /** \addtogroup fl_events 
+   @{ */
+  /** Returns non-zero if the Shift key is pressed. */
+  inline int event_shift() {return e_state&fltk3::SHIFT;}
+  /** Returns non-zero if the Control key is pressed. */
+  inline int event_ctrl() {return e_state&fltk3::CTRL;}
+  /** Returns non-zero if the fltk3::COMMAND key is pressed, either fltk3::CTRL or on OSX fltk3::META. */
+  inline int event_command() {return e_state&fltk3::COMMAND;}
+  /** Returns non-zero if the Alt key is pressed. */
+  inline int event_alt() {return e_state&fltk3::ALT;}
+  /**
+   Returns the mouse buttons state bits; if non-zero, then at least one
+   button is pressed now.  This function returns the button state at the 
+   time of the event. During an fltk3::RELEASE event, the state 
+   of the released button will be 0. To find out, which button 
+   caused an fltk3::RELEASE event, you can use fltk3::event_button() instead.
+   \return a bit mask value like { [fltk3::BUTTON1] | [fltk3::BUTTON2] | [fltk3::BUTTON3] }
+   */
+  inline int event_buttons() {return e_state&0x7f000000;}
+  /**
+   Returns non-zero if mouse button 1 is currently held down.
+   For more details, see fltk3::event_buttons().
+   */
+  inline int event_button1() {return e_state&fltk3::BUTTON1;}
+  /**
+   Returns non-zero if button 2 is currently held down.
+   For more details, see fltk3::event_buttons().
+   */
+  inline int event_button2() {return e_state&fltk3::BUTTON2;}
+  /**
+   Returns non-zero if button 3 is currently held down.
+   For more details, see fltk3::event_buttons().
+   */
+  inline int event_button3() {return e_state&fltk3::BUTTON3;}
+  /**   @} */
+  
+  /**
+   Sets an idle callback.
+   
+   \deprecated This method is obsolete - use the add_idle() method instead.
+   */
+  inline void set_idle(fltk3::OldIdleHandler cb) {idle = cb;}
+  
+  /** See grab(fltk3::Window*) */
+  inline void grab(fltk3::Window& win) {grab(&win);}
+  /** Releases the current grabbed window, equals grab(0).
+   \deprecated Use fltk3::grab(0) instead.
+   \see grab(fltk3::Window*) */
+  inline void release() {grab(0);}
+  
+  // Visible focus methods...
+  /**
+   Gets or sets the visible keyboard focus on buttons and other
+   non-text widgets. The default mode is to enable keyboard focus
+   for all widgets.
+   */
+  inline void visible_focus(int v) { option(OPTION_VISIBLE_FOCUS, (v!=0)); }
+  /**
+   Gets or sets the visible keyboard focus on buttons and other
+   non-text widgets. The default mode is to enable keyboard focus
+   for all widgets.
+   */
+  inline int  visible_focus() { return option(OPTION_VISIBLE_FOCUS); }
+  
+  // Drag-n-drop text operation methods...
+  /**
+   Gets or sets whether drag and drop text operations are supported.
+   This specifically affects whether selected text can
+   be dragged from text fields or dragged within a text field as a
+   cut/paste shortcut.
+   */
+  inline void dnd_text_ops(int v) { option(OPTION_DND_TEXT, (v!=0)); }
+  /**
+   Gets or sets whether drag and drop text operations are
+   supported. This specifically affects whether selected text can
+   be dragged from text fields or dragged within a text field as a
+   cut/paste shortcut.
+   */
+  inline int  dnd_text_ops() { return option(OPTION_DND_TEXT); }
+  /** \defgroup fl_multithread Multithreading support functions
+   fl multithreading support functions declared in <fltk3/run.h>
+   @{ */
+  
+  // Multithreading support:
+  int lock();
+  void unlock();
+  void awake(void* message = 0);
+  /** See void awake(void* message=0). */
+  int awake(fltk3::AwakeHandler cb, void* message = 0);
+  /**
+   The thread_message() method returns the last message
+   that was sent from a child by the awake() method.
+   
+   See also: \ref advanced_multithreading
+   */
+  void* thread_message(); // platform dependent
+  /** @} */
+  
+  /** \defgroup fl_del_widget Safe widget deletion support functions
+   
+   These functions, declared in <fltk3/run.h>, support deletion of widgets inside callbacks.
+   
+   fltk3::delete_widget() should be called when deleting widgets
+   or complete widget trees (fltk3::Group, fltk3::Window, ...) inside
+   callbacks.
+   
+   The other functions are intended for internal use. The preferred
+   way to use them is by using the helper class fltk3::WidgetTracker.
+   
+   The following is to show how it works ...
+   
+   There are three groups of related methods:
+   
+   -# scheduled widget deletion
+   - fltk3::delete_widget() schedules widgets for deletion
+   - fltk3::do_widget_deletion() deletes all scheduled widgets
+   -# widget watch list ("smart pointers")
+   - fltk3::watch_widget_pointer() adds a widget pointer to the watch list
+   - fltk3::release_widget_pointer() removes a widget pointer from the watch list
+   - fltk3::clear_widget_pointer() clears a widget pointer \e in the watch list
+   -# the class fltk3::WidgetTracker:
+   - the constructor calls fltk3::watch_widget_pointer()
+   - the destructor calls fltk3::release_widget_pointer()
+   - the access methods can be used to test, if a widget has been deleted
+   \see fltk3::WidgetTracker.
+   
+   @{ */
+  // Widget deletion:
+  void delete_widget(fltk3::Widget *w);
+  void do_widget_deletion();
+  void watch_widget_pointer(fltk3::Widget *&w);
+  void release_widget_pointer(fltk3::Widget *&w);
+  void clear_widget_pointer(fltk3::Widget const *w);
+  /** @} */
+  
+#ifdef FLTK_HAVE_CAIRO
+  /** \defgroup group_cairo Cairo support functions and classes 
+   @{ 
+   */
+  //public:
+  // Cairo support API
+  cairo_t * cairo_make_current(fltk3::Window* w);
+  /** when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, 
+   any current window dc is linked to a current context.
+   This is not the default, because it may not be necessary
+   to add cairo support to all fltk supported windows.
+   When you wish to associate a cairo context in this mode,
+   you need to call explicitly in your draw() overridden method,
+   fltk3::cairo_make_current(fltk3::Window*). This will create a cairo context
+   but only for this Window. 
+   Still in custom cairo application it is possible to handle 
+   completely this process automatically by setting \p alink to true.
+   In this last case, you don't need anymore to call fltk3::cairo_make_current().
+   You can use fltk3::cairo_cc() to get the current cairo context anytime.
+   \note Only available when configure has the --enable-cairo option
+   */
+  inline void cairo_autolink_context(bool alink) {cairo_state_.autolink(alink);}
+  /** 
+   Gets the current autolink mode for cairo support.
+   \retval false if no cairo context autolink is made for each window. 
+   \retval true if any fltk window is attached a cairo context when it 
+   is current. \see void cairo_autolink_context(bool alink) 
+   \note Only available when configure has the --enable-cairo option
+   */
+  inline bool cairo_autolink_context() {return cairo_state_.autolink();}
+  /** Gets the current cairo context linked with a fltk window. */
+  inline cairo_t * cairo_cc() { return cairo_state_.cc(); }
+  /** Sets the current cairo context to \p c.
+   Set \p own to true if you want fltk to handle this cc deletion.
+   \note Only available when configure has the --enable-cairo option
+   */
+  inline void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); } 
+  
+  //private:
+  cairo_t * cairo_make_current(void* gc);
+  cairo_t * cairo_make_current(void* gc, int W, int H);
+  extern Fl_Cairo_State cairo_state_;
+  //public:
+  /** @} */ 
+  
+#endif // FLTK_HAVE_CAIRO
+  
+  /**
+   This class should be used to control safe widget deletion.
+   
+   You can use an fltk3::WidgetTracker object to watch another widget, if you
+   need to know, if this widget has been deleted during a callback.
+   
+   This simplifies the use of the "safe widget deletion" methods
+   fltk3::watch_widget_pointer() and fltk3::release_widget_pointer() and
+   makes their use more reliable, because the destructor autmatically
+   releases the widget pointer from the widget watch list.
+   
+   It is intended to be used as an automatic (local/stack) variable,
+   such that the automatic destructor is called when the object's
+   scope is left. This ensures that no stale widget pointers are
+   left in the widget watch list (see example below).
+   
+   You can also create fltk3::WidgetTracker objects with \c new, but then it
+   is your responsibility to delete the object (and thus remove the
+   widget pointer from the watch list) when it is not needed any more.
+   
+   Example:
+   
+   \code
+   int MyClass::handle (int event) {
+   
+   if (...) {
+   fltk3::WidgetTracker wp(this);	// watch myself
+   do_callback();			// call the callback
+   
+   if (wp.deleted()) return 1;	// exit, if deleted
+   
+   // Now we are sure that the widget has not been deleted.
+   // It is safe to access the widget
+   
+   clear_changed();		// access the widget
+   }
+   }
+   \endcode
+   
+   */
+  class FLTK3_EXPORT WidgetTracker {
+    
+    fltk3::Widget* wp_;
+    
+  public:
+    
+    WidgetTracker(Widget *wi);
+    ~WidgetTracker();
+    
+    /**
+     Returns a pointer to the watched widget.
+     
+     This pointer is \c NULL, if the widget has been deleted.
+     */
+    Widget *widget() {return wp_;}
+    
+    /**
+     Returns 1, if the watched widget has been deleted.
+     
+     This is a convenience method. You can also use something like
+     
+     <tt>  if (wp.widget() == 0) // ...</tt>
+     
+     where \p wp is an fltk3::WidgetTracker object.
+     */
+    int deleted() {return wp_ == 0;}
+    
+    /**
+     Returns 1, if the watched widget exists (has not been deleted).
+     
+     This is a convenience method. You can also use something like
+     
+     <tt>  if (wp.widget() != 0) // ...</tt>
+     
+     where \p wp is an fltk3::WidgetTracker object.
+     */
+    int exists()  {return wp_ != 0;}
+    
+  };
+  
+}
+
+/** \defgroup  fl_unicode  Unicode and UTF-8 functions
+ fl global Unicode and UTF-8 handling functions declared in <fltk3/utf8.h>
+ @{ */
+/** @} */
+
+#endif // !Fltk3_H
+
+//
+// End of "$Id: run.h 8548 2011-03-30 12:07:52Z AlbrechtS $".
+//

Copied: branches/branch-3.0/include/fltk3jpeg/jconfig.h (from rev 8987, branches/branch-3.0/jpeg/jconfig.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jconfig.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jconfig.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,51 @@
+/* jconfig.cfg --- source file edited by configure script */
+/* see jconfig.doc for explanations */
+
+#define HAVE_PROTOTYPES
+#define HAVE_UNSIGNED_CHAR
+#define HAVE_UNSIGNED_SHORT
+#ifdef __CHAR_UNSIGNED__
+#  define CHAR_IS_UNSIGNED
+#endif /* __CHAR_UNSIGNED__ */
+#define HAVE_STDLIB_H
+/* Define this if you get warnings about undefined structures. */
+#undef INCOMPLETE_TYPES_BROKEN
+
+#if defined(WIN32) || defined(__EMX__)
+/* Define "boolean" as unsigned char, not int, per Windows custom */
+#  ifndef __RPCNDR_H__		/* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#  endif
+#  define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */
+#endif /* WIN32 || __EMX__ */
+
+#ifdef JPEG_INTERNALS
+
+#undef RIGHT_SHIFT_IS_UNSIGNED
+#undef INLINE
+/* These are for configuring the JPEG memory manager. */
+#undef DEFAULT_MAX_MEM
+#undef NO_MKTEMP
+
+#endif /* JPEG_INTERNALS */
+
+#ifdef JPEG_CJPEG_DJPEG
+
+#define BMP_SUPPORTED		/* BMP image file format */
+#define GIF_SUPPORTED		/* GIF image file format */
+#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
+#undef RLE_SUPPORTED		/* Utah RLE image file format */
+#define TARGA_SUPPORTED		/* Targa image file format */
+
+#undef TWO_FILE_COMMANDLINE
+#undef NEED_SIGNAL_CATCHER
+#undef DONT_USE_B_MODE
+
+#if defined(WIN32) || defined(__EMX__)
+#  define USE_SETMODE
+#endif /* WIN32 || __EMX__ */
+
+/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
+#undef PROGRESS_REPORT
+
+#endif /* JPEG_CJPEG_DJPEG */

Copied: branches/branch-3.0/include/fltk3jpeg/jdct.h (from rev 8987, branches/branch-3.0/jpeg/jdct.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jdct.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jdct.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,393 @@
+/*
+ * jdct.h
+ *
+ * Copyright (C) 1994-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This include file contains common declarations for the forward and
+ * inverse DCT modules.  These declarations are private to the DCT managers
+ * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
+ * The individual DCT algorithms are kept in separate files to ease 
+ * machine-dependent tuning (e.g., assembly coding).
+ */
+
+
+/*
+ * A forward DCT routine is given a pointer to an input sample array and
+ * a pointer to a work area of type DCTELEM[]; the DCT is to be performed
+ * in-place in that buffer.  Type DCTELEM is int for 8-bit samples, INT32
+ * for 12-bit samples.  (NOTE: Floating-point DCT implementations use an
+ * array of type FAST_FLOAT, instead.)
+ * The input data is to be fetched from the sample array starting at a
+ * specified column.  (Any row offset needed will be applied to the array
+ * pointer before it is passed to the FDCT code.)
+ * Note that the number of samples fetched by the FDCT routine is
+ * DCT_h_scaled_size * DCT_v_scaled_size.
+ * The DCT outputs are returned scaled up by a factor of 8; they therefore
+ * have a range of +-8K for 8-bit data, +-128K for 12-bit data.  This
+ * convention improves accuracy in integer implementations and saves some
+ * work in floating-point ones.
+ * Quantization of the output coefficients is done by jcdctmgr.c.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+typedef int DCTELEM;		/* 16 or 32 bits is fine */
+#else
+typedef INT32 DCTELEM;		/* must have 32 bits */
+#endif
+
+typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
+					       JSAMPARRAY sample_data,
+					       JDIMENSION start_col));
+typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
+					     JSAMPARRAY sample_data,
+					     JDIMENSION start_col));
+
+
+/*
+ * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
+ * to an output sample array.  The routine must dequantize the input data as
+ * well as perform the IDCT; for dequantization, it uses the multiplier table
+ * pointed to by compptr->dct_table.  The output data is to be placed into the
+ * sample array starting at a specified column.  (Any row offset needed will
+ * be applied to the array pointer before it is passed to the IDCT code.)
+ * Note that the number of samples emitted by the IDCT routine is
+ * DCT_h_scaled_size * DCT_v_scaled_size.
+ */
+
+/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
+
+/*
+ * Each IDCT routine has its own ideas about the best dct_table element type.
+ */
+
+typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
+#if BITS_IN_JSAMPLE == 8
+typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
+#define IFAST_SCALE_BITS  2	/* fractional bits in scale factors */
+#else
+typedef INT32 IFAST_MULT_TYPE;	/* need 32 bits for scaled quantizers */
+#define IFAST_SCALE_BITS  13	/* fractional bits in scale factors */
+#endif
+typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
+
+
+/*
+ * Each IDCT routine is responsible for range-limiting its results and
+ * converting them to unsigned form (0..MAXJSAMPLE).  The raw outputs could
+ * be quite far out of range if the input data is corrupt, so a bulletproof
+ * range-limiting step is required.  We use a mask-and-table-lookup method
+ * to do the combined operations quickly.  See the comments with
+ * prepare_range_limit_table (in jdmaster.c) for more info.
+ */
+
+#define IDCT_range_limit(cinfo)  ((cinfo)->sample_range_limit + CENTERJSAMPLE)
+
+#define RANGE_MASK  (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_fdct_islow		jFDislow
+#define jpeg_fdct_ifast		jFDifast
+#define jpeg_fdct_float		jFDfloat
+#define jpeg_fdct_7x7		jFD7x7
+#define jpeg_fdct_6x6		jFD6x6
+#define jpeg_fdct_5x5		jFD5x5
+#define jpeg_fdct_4x4		jFD4x4
+#define jpeg_fdct_3x3		jFD3x3
+#define jpeg_fdct_2x2		jFD2x2
+#define jpeg_fdct_1x1		jFD1x1
+#define jpeg_fdct_9x9		jFD9x9
+#define jpeg_fdct_10x10		jFD10x10
+#define jpeg_fdct_11x11		jFD11x11
+#define jpeg_fdct_12x12		jFD12x12
+#define jpeg_fdct_13x13		jFD13x13
+#define jpeg_fdct_14x14		jFD14x14
+#define jpeg_fdct_15x15		jFD15x15
+#define jpeg_fdct_16x16		jFD16x16
+#define jpeg_fdct_16x8		jFD16x8
+#define jpeg_fdct_14x7		jFD14x7
+#define jpeg_fdct_12x6		jFD12x6
+#define jpeg_fdct_10x5		jFD10x5
+#define jpeg_fdct_8x4		jFD8x4
+#define jpeg_fdct_6x3		jFD6x3
+#define jpeg_fdct_4x2		jFD4x2
+#define jpeg_fdct_2x1		jFD2x1
+#define jpeg_fdct_8x16		jFD8x16
+#define jpeg_fdct_7x14		jFD7x14
+#define jpeg_fdct_6x12		jFD6x12
+#define jpeg_fdct_5x10		jFD5x10
+#define jpeg_fdct_4x8		jFD4x8
+#define jpeg_fdct_3x6		jFD3x6
+#define jpeg_fdct_2x4		jFD2x4
+#define jpeg_fdct_1x2		jFD1x2
+#define jpeg_idct_islow		jRDislow
+#define jpeg_idct_ifast		jRDifast
+#define jpeg_idct_float		jRDfloat
+#define jpeg_idct_7x7		jRD7x7
+#define jpeg_idct_6x6		jRD6x6
+#define jpeg_idct_5x5		jRD5x5
+#define jpeg_idct_4x4		jRD4x4
+#define jpeg_idct_3x3		jRD3x3
+#define jpeg_idct_2x2		jRD2x2
+#define jpeg_idct_1x1		jRD1x1
+#define jpeg_idct_9x9		jRD9x9
+#define jpeg_idct_10x10		jRD10x10
+#define jpeg_idct_11x11		jRD11x11
+#define jpeg_idct_12x12		jRD12x12
+#define jpeg_idct_13x13		jRD13x13
+#define jpeg_idct_14x14		jRD14x14
+#define jpeg_idct_15x15		jRD15x15
+#define jpeg_idct_16x16		jRD16x16
+#define jpeg_idct_16x8		jRD16x8
+#define jpeg_idct_14x7		jRD14x7
+#define jpeg_idct_12x6		jRD12x6
+#define jpeg_idct_10x5		jRD10x5
+#define jpeg_idct_8x4		jRD8x4
+#define jpeg_idct_6x3		jRD6x3
+#define jpeg_idct_4x2		jRD4x2
+#define jpeg_idct_2x1		jRD2x1
+#define jpeg_idct_8x16		jRD8x16
+#define jpeg_idct_7x14		jRD7x14
+#define jpeg_idct_6x12		jRD6x12
+#define jpeg_idct_5x10		jRD5x10
+#define jpeg_idct_4x8		jRD4x8
+#define jpeg_idct_3x6		jRD3x8
+#define jpeg_idct_2x4		jRD2x4
+#define jpeg_idct_1x2		jRD1x2
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+/* Extern declarations for the forward and inverse DCT routines. */
+
+EXTERN(void) jpeg_fdct_islow
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_ifast
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_float
+    JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_7x7
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_6x6
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_5x5
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_4x4
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_3x3
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_2x2
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_1x1
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_9x9
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_10x10
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_11x11
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_12x12
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_13x13
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_14x14
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_15x15
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_16x16
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_16x8
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_14x7
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_12x6
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_10x5
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_8x4
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_6x3
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_4x2
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_2x1
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_8x16
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_7x14
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_6x12
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_5x10
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_4x8
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_3x6
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_2x4
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_1x2
+    JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+
+EXTERN(void) jpeg_idct_islow
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_ifast
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_float
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_7x7
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_6x6
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_5x5
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_4x4
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_3x3
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_2x2
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_1x1
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_9x9
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_10x10
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_11x11
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_12x12
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_13x13
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_14x14
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_15x15
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_16x16
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_16x8
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_14x7
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_12x6
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_10x5
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_8x4
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_6x3
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_4x2
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_2x1
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_8x16
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_7x14
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_6x12
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_5x10
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_4x8
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_3x6
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_2x4
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_1x2
+    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+
+
+/*
+ * Macros for handling fixed-point arithmetic; these are used by many
+ * but not all of the DCT/IDCT modules.
+ *
+ * All values are expected to be of type INT32.
+ * Fractional constants are scaled left by CONST_BITS bits.
+ * CONST_BITS is defined within each module using these macros,
+ * and may differ from one module to the next.
+ */
+
+#define ONE	((INT32) 1)
+#define CONST_SCALE (ONE << CONST_BITS)
+
+/* Convert a positive real constant to an integer scaled by CONST_SCALE.
+ * Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
+ * thus causing a lot of useless floating-point operations at run time.
+ */
+
+#define FIX(x)	((INT32) ((x) * CONST_SCALE + 0.5))
+
+/* Descale and correctly round an INT32 value that's scaled by N bits.
+ * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
+ * the fudge factor is correct for either sign of X.
+ */
+
+#define DESCALE(x,n)  RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
+
+/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
+ * This macro is used only when the two inputs will actually be no more than
+ * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
+ * full 32x32 multiply.  This provides a useful speedup on many machines.
+ * Unfortunately there is no way to specify a 16x16->32 multiply portably
+ * in C, but some C compilers will do the right thing if you provide the
+ * correct combination of casts.
+ */
+
+#ifdef SHORTxSHORT_32		/* may work if 'int' is 32 bits */
+#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT16) (const)))
+#endif
+#ifdef SHORTxLCONST_32		/* known to work with Microsoft C 6.0 */
+#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT32) (const)))
+#endif
+
+#ifndef MULTIPLY16C16		/* default definition */
+#define MULTIPLY16C16(var,const)  ((var) * (const))
+#endif
+
+/* Same except both inputs are variables. */
+
+#ifdef SHORTxSHORT_32		/* may work if 'int' is 32 bits */
+#define MULTIPLY16V16(var1,var2)  (((INT16) (var1)) * ((INT16) (var2)))
+#endif
+
+#ifndef MULTIPLY16V16		/* default definition */
+#define MULTIPLY16V16(var1,var2)  ((var1) * (var2))
+#endif

Copied: branches/branch-3.0/include/fltk3jpeg/jerror.h (from rev 8987, branches/branch-3.0/jpeg/jerror.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jerror.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jerror.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,304 @@
+/*
+ * jerror.h
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file defines the error and message codes for the JPEG library.
+ * Edit this file to add new codes, or to translate the message strings to
+ * some other language.
+ * A set of error-reporting macros are defined too.  Some applications using
+ * the JPEG library may wish to include this file to get the error codes
+ * and/or the macros.
+ */
+
+/*
+ * To define the enum list of message codes, include this file without
+ * defining macro JMESSAGE.  To create a message string table, include it
+ * again with a suitable JMESSAGE definition (see jerror.c for an example).
+ */
+#ifndef JMESSAGE
+#ifndef JERROR_H
+/* First time through, define the enum list */
+#define JMAKE_ENUM_LIST
+#else
+/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
+#define JMESSAGE(code,string)
+#endif /* JERROR_H */
+#endif /* JMESSAGE */
+
+#ifdef JMAKE_ENUM_LIST
+
+typedef enum {
+
+#define JMESSAGE(code,string)	code ,
+
+#endif /* JMAKE_ENUM_LIST */
+
+JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
+
+/* For maintenance convenience, list is alphabetical by message code name */
+JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
+JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
+JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
+JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
+JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
+JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
+JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported")
+JMESSAGE(JERR_BAD_DROP_SAMPLING,
+	 "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
+JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
+JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
+JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
+JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
+JMESSAGE(JERR_BAD_LIB_VERSION,
+	 "Wrong JPEG library version: library is %d, caller expects %d")
+JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
+JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
+JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
+JMESSAGE(JERR_BAD_PROGRESSION,
+	 "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
+JMESSAGE(JERR_BAD_PROG_SCRIPT,
+	 "Invalid progressive parameters at scan script entry %d")
+JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
+JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
+JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
+JMESSAGE(JERR_BAD_STRUCT_SIZE,
+	 "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
+JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
+JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
+JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
+JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
+JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
+JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
+JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
+JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
+JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
+JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
+JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
+JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
+JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
+JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
+JMESSAGE(JERR_FILE_READ, "Input file read error")
+JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
+JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
+JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
+JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
+JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
+JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
+JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
+JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
+	 "Cannot transcode due to multiple use of quantization table %d")
+JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
+JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
+JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
+JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
+JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
+JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
+JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
+JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
+JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
+JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
+JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
+JMESSAGE(JERR_QUANT_COMPONENTS,
+	 "Cannot quantize more than %d color components")
+JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
+JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
+JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
+JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
+JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
+JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
+JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
+JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
+JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
+JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
+JMESSAGE(JERR_TFILE_WRITE,
+	 "Write failed on temporary file --- out of disk space?")
+JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
+JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
+JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
+JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
+JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
+JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
+JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
+JMESSAGE(JMSG_VERSION, JVERSION)
+JMESSAGE(JTRC_16BIT_TABLES,
+	 "Caution: quantization tables are too coarse for baseline JPEG")
+JMESSAGE(JTRC_ADOBE,
+	 "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
+JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
+JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
+JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
+JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
+JMESSAGE(JTRC_DQT, "Define Quantization Table %d  precision %d")
+JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
+JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
+JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
+JMESSAGE(JTRC_EOI, "End Of Image")
+JMESSAGE(JTRC_HUFFBITS, "        %3d %3d %3d %3d %3d %3d %3d %3d")
+JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d  %d")
+JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
+	 "Warning: thumbnail image size does not match data length %u")
+JMESSAGE(JTRC_JFIF_EXTENSION,
+	 "JFIF extension marker: type 0x%02x, length %u")
+JMESSAGE(JTRC_JFIF_THUMBNAIL, "    with %d x %d thumbnail image")
+JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
+JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
+JMESSAGE(JTRC_QUANTVALS, "        %4u %4u %4u %4u %4u %4u %4u %4u")
+JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
+JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
+JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
+JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
+JMESSAGE(JTRC_RST, "RST%d")
+JMESSAGE(JTRC_SMOOTH_NOTIMPL,
+	 "Smoothing not supported with nonstandard sampling ratios")
+JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
+JMESSAGE(JTRC_SOF_COMPONENT, "    Component %d: %dhx%dv q=%d")
+JMESSAGE(JTRC_SOI, "Start of Image")
+JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
+JMESSAGE(JTRC_SOS_COMPONENT, "    Component %d: dc=%d ac=%d")
+JMESSAGE(JTRC_SOS_PARAMS, "  Ss=%d, Se=%d, Ah=%d, Al=%d")
+JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
+JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
+JMESSAGE(JTRC_THUMB_JPEG,
+	 "JFIF extension marker: JPEG-compressed thumbnail image, length %u")
+JMESSAGE(JTRC_THUMB_PALETTE,
+	 "JFIF extension marker: palette thumbnail image, length %u")
+JMESSAGE(JTRC_THUMB_RGB,
+	 "JFIF extension marker: RGB thumbnail image, length %u")
+JMESSAGE(JTRC_UNKNOWN_IDS,
+	 "Unrecognized component IDs %d %d %d, assuming YCbCr")
+JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
+JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
+JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
+JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
+JMESSAGE(JWRN_BOGUS_PROGRESSION,
+	 "Inconsistent progression sequence for component %d coefficient %d")
+JMESSAGE(JWRN_EXTRANEOUS_DATA,
+	 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
+JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
+JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
+JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
+JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
+JMESSAGE(JWRN_MUST_RESYNC,
+	 "Corrupt JPEG data: found marker 0x%02x instead of RST%d")
+JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
+JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
+
+#ifdef JMAKE_ENUM_LIST
+
+  JMSG_LASTMSGCODE
+} J_MESSAGE_CODE;
+
+#undef JMAKE_ENUM_LIST
+#endif /* JMAKE_ENUM_LIST */
+
+/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
+#undef JMESSAGE
+
+
+#ifndef JERROR_H
+#define JERROR_H
+
+/* Macros to simplify using the error and trace message stuff */
+/* The first parameter is either type of cinfo pointer */
+
+/* Fatal errors (print message and exit) */
+#define ERREXIT(cinfo,code)  \
+  ((cinfo)->err->msg_code = (code), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT1(cinfo,code,p1)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT2(cinfo,code,p1,p2)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT3(cinfo,code,p1,p2,p3)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (cinfo)->err->msg_parm.i[2] = (p3), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT4(cinfo,code,p1,p2,p3,p4)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (cinfo)->err->msg_parm.i[2] = (p3), \
+   (cinfo)->err->msg_parm.i[3] = (p4), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (cinfo)->err->msg_parm.i[2] = (p3), \
+   (cinfo)->err->msg_parm.i[3] = (p4), \
+   (cinfo)->err->msg_parm.i[4] = (p5), \
+   (cinfo)->err->msg_parm.i[5] = (p6), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXITS(cinfo,code,str)  \
+  ((cinfo)->err->msg_code = (code), \
+   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
+   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+
+#define MAKESTMT(stuff)		do { stuff } while (0)
+
+/* Nonfatal errors (we can keep going, but the data is probably corrupt) */
+#define WARNMS(cinfo,code)  \
+  ((cinfo)->err->msg_code = (code), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
+#define WARNMS1(cinfo,code,p1)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
+#define WARNMS2(cinfo,code,p1,p2)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
+
+/* Informational/debugging messages */
+#define TRACEMS(cinfo,lvl,code)  \
+  ((cinfo)->err->msg_code = (code), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+#define TRACEMS1(cinfo,lvl,code,p1)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+#define TRACEMS2(cinfo,lvl,code,p1,p2)  \
+  ((cinfo)->err->msg_code = (code), \
+   (cinfo)->err->msg_parm.i[0] = (p1), \
+   (cinfo)->err->msg_parm.i[1] = (p2), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+#define TRACEMS3(cinfo,lvl,code,p1,p2,p3)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
+	   _mp[4] = (p5); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8)  \
+  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
+	   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
+	   _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
+	   (cinfo)->err->msg_code = (code); \
+	   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
+#define TRACEMSS(cinfo,lvl,code,str)  \
+  ((cinfo)->err->msg_code = (code), \
+   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
+   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
+
+#endif /* JERROR_H */

Copied: branches/branch-3.0/include/fltk3jpeg/jinclude.h (from rev 8987, branches/branch-3.0/jpeg/jinclude.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jinclude.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jinclude.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,91 @@
+/*
+ * jinclude.h
+ *
+ * Copyright (C) 1991-1994, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file exists to provide a single place to fix any problems with
+ * including the wrong system include files.  (Common problems are taken
+ * care of by the standard jconfig symbols, but on really weird systems
+ * you may have to edit this file.)
+ *
+ * NOTE: this file is NOT intended to be included by applications using the
+ * JPEG library.  Most applications need only include jpeglib.h.
+ */
+
+
+/* Include auto-config file to find out which system include files we need. */
+
+#include "jconfig.h"		/* auto configuration options */
+#define JCONFIG_INCLUDED	/* so that jpeglib.h doesn't do it again */
+
+/*
+ * We need the NULL macro and size_t typedef.
+ * On an ANSI-conforming system it is sufficient to include <stddef.h>.
+ * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
+ * pull in <sys/types.h> as well.
+ * Note that the core JPEG library does not require <stdio.h>;
+ * only the default error handler and data source/destination modules do.
+ * But we must pull it in because of the references to FILE in jpeglib.h.
+ * You can remove those references if you want to compile without <stdio.h>.
+ */
+
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef NEED_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include <stdio.h>
+
+/*
+ * We need memory copying and zeroing functions, plus strncpy().
+ * ANSI and System V implementations declare these in <string.h>.
+ * BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
+ * Some systems may declare memset and memcpy in <memory.h>.
+ *
+ * NOTE: we assume the size parameters to these functions are of type size_t.
+ * Change the casts in these macros if not!
+ */
+
+#ifdef NEED_BSD_STRINGS
+
+#include <strings.h>
+#define MEMZERO(target,size)	bzero((void *)(target), (size_t)(size))
+#define MEMCOPY(dest,src,size)	bcopy((const void *)(src), (void *)(dest), (size_t)(size))
+
+#else /* not BSD, assume ANSI/SysV string lib */
+
+#include <string.h>
+#define MEMZERO(target,size)	memset((void *)(target), 0, (size_t)(size))
+#define MEMCOPY(dest,src,size)	memcpy((void *)(dest), (const void *)(src), (size_t)(size))
+
+#endif
+
+/*
+ * In ANSI C, and indeed any rational implementation, size_t is also the
+ * type returned by sizeof().  However, it seems there are some irrational
+ * implementations out there, in which sizeof() returns an int even though
+ * size_t is defined as long or unsigned long.  To ensure consistent results
+ * we always use this SIZEOF() macro in place of using sizeof() directly.
+ */
+
+#define SIZEOF(object)	((size_t) sizeof(object))
+
+/*
+ * The modules that use fread() and fwrite() always invoke them through
+ * these macros.  On some systems you may need to twiddle the argument casts.
+ * CAUTION: argument order is different from underlying functions!
+ */
+
+#define JFREAD(file,buf,sizeofbuf)  \
+  ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
+#define JFWRITE(file,buf,sizeofbuf)  \
+  ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))

Copied: branches/branch-3.0/include/fltk3jpeg/jmemsys.h (from rev 8987, branches/branch-3.0/jpeg/jmemsys.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jmemsys.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jmemsys.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,198 @@
+/*
+ * jmemsys.h
+ *
+ * Copyright (C) 1992-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This include file defines the interface between the system-independent
+ * and system-dependent portions of the JPEG memory manager.  No other
+ * modules need include it.  (The system-independent portion is jmemmgr.c;
+ * there are several different versions of the system-dependent portion.)
+ *
+ * This file works as-is for the system-dependent memory managers supplied
+ * in the IJG distribution.  You may need to modify it if you write a
+ * custom memory manager.  If system-dependent changes are needed in
+ * this file, the best method is to #ifdef them based on a configuration
+ * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR
+ * and USE_MAC_MEMMGR.
+ */
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_get_small		jGetSmall
+#define jpeg_free_small		jFreeSmall
+#define jpeg_get_large		jGetLarge
+#define jpeg_free_large		jFreeLarge
+#define jpeg_mem_available	jMemAvail
+#define jpeg_open_backing_store	jOpenBackStore
+#define jpeg_mem_init		jMemInit
+#define jpeg_mem_term		jMemTerm
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/*
+ * These two functions are used to allocate and release small chunks of
+ * memory.  (Typically the total amount requested through jpeg_get_small is
+ * no more than 20K or so; this will be requested in chunks of a few K each.)
+ * Behavior should be the same as for the standard library functions malloc
+ * and free; in particular, jpeg_get_small must return NULL on failure.
+ * On most systems, these ARE malloc and free.  jpeg_free_small is passed the
+ * size of the object being freed, just in case it's needed.
+ * On an 80x86 machine using small-data memory model, these manage near heap.
+ */
+
+EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
+EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
+				  size_t sizeofobject));
+
+/*
+ * These two functions are used to allocate and release large chunks of
+ * memory (up to the total free space designated by jpeg_mem_available).
+ * The interface is the same as above, except that on an 80x86 machine,
+ * far pointers are used.  On most other machines these are identical to
+ * the jpeg_get/free_small routines; but we keep them separate anyway,
+ * in case a different allocation strategy is desirable for large chunks.
+ */
+
+EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
+				       size_t sizeofobject));
+EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
+				  size_t sizeofobject));
+
+/*
+ * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
+ * be requested in a single call to jpeg_get_large (and jpeg_get_small for that
+ * matter, but that case should never come into play).  This macro is needed
+ * to model the 64Kb-segment-size limit of far addressing on 80x86 machines.
+ * On those machines, we expect that jconfig.h will provide a proper value.
+ * On machines with 32-bit flat address spaces, any large constant may be used.
+ *
+ * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type
+ * size_t and will be a multiple of sizeof(align_type).
+ */
+
+#ifndef MAX_ALLOC_CHUNK		/* may be overridden in jconfig.h */
+#define MAX_ALLOC_CHUNK  1000000000L
+#endif
+
+/*
+ * This routine computes the total space still available for allocation by
+ * jpeg_get_large.  If more space than this is needed, backing store will be
+ * used.  NOTE: any memory already allocated must not be counted.
+ *
+ * There is a minimum space requirement, corresponding to the minimum
+ * feasible buffer sizes; jmemmgr.c will request that much space even if
+ * jpeg_mem_available returns zero.  The maximum space needed, enough to hold
+ * all working storage in memory, is also passed in case it is useful.
+ * Finally, the total space already allocated is passed.  If no better
+ * method is available, cinfo->mem->max_memory_to_use - already_allocated
+ * is often a suitable calculation.
+ *
+ * It is OK for jpeg_mem_available to underestimate the space available
+ * (that'll just lead to more backing-store access than is really necessary).
+ * However, an overestimate will lead to failure.  Hence it's wise to subtract
+ * a slop factor from the true available space.  5% should be enough.
+ *
+ * On machines with lots of virtual memory, any large constant may be returned.
+ * Conversely, zero may be returned to always use the minimum amount of memory.
+ */
+
+EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
+				     long min_bytes_needed,
+				     long max_bytes_needed,
+				     long already_allocated));
+
+
+/*
+ * This structure holds whatever state is needed to access a single
+ * backing-store object.  The read/write/close method pointers are called
+ * by jmemmgr.c to manipulate the backing-store object; all other fields
+ * are private to the system-dependent backing store routines.
+ */
+
+#define TEMP_NAME_LENGTH   64	/* max length of a temporary file's name */
+
+
+#ifdef USE_MSDOS_MEMMGR		/* DOS-specific junk */
+
+typedef unsigned short XMSH;	/* type of extended-memory handles */
+typedef unsigned short EMSH;	/* type of expanded-memory handles */
+
+typedef union {
+  short file_handle;		/* DOS file handle if it's a temp file */
+  XMSH xms_handle;		/* handle if it's a chunk of XMS */
+  EMSH ems_handle;		/* handle if it's a chunk of EMS */
+} handle_union;
+
+#endif /* USE_MSDOS_MEMMGR */
+
+#ifdef USE_MAC_MEMMGR		/* Mac-specific junk */
+#include <Files.h>
+#endif /* USE_MAC_MEMMGR */
+
+
+typedef struct backing_store_struct * backing_store_ptr;
+
+typedef struct backing_store_struct {
+  /* Methods for reading/writing/closing this backing-store object */
+  JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
+				     backing_store_ptr info,
+				     void FAR * buffer_address,
+				     long file_offset, long byte_count));
+  JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
+				      backing_store_ptr info,
+				      void FAR * buffer_address,
+				      long file_offset, long byte_count));
+  JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
+				      backing_store_ptr info));
+
+  /* Private fields for system-dependent backing-store management */
+#ifdef USE_MSDOS_MEMMGR
+  /* For the MS-DOS manager (jmemdos.c), we need: */
+  handle_union handle;		/* reference to backing-store storage object */
+  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
+#else
+#ifdef USE_MAC_MEMMGR
+  /* For the Mac manager (jmemmac.c), we need: */
+  short temp_file;		/* file reference number to temp file */
+  FSSpec tempSpec;		/* the FSSpec for the temp file */
+  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
+#else
+  /* For a typical implementation with temp files, we need: */
+  FILE * temp_file;		/* stdio reference to temp file */
+  char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */
+#endif
+#endif
+} backing_store_info;
+
+
+/*
+ * Initial opening of a backing-store object.  This must fill in the
+ * read/write/close pointers in the object.  The read/write routines
+ * may take an error exit if the specified maximum file size is exceeded.
+ * (If jpeg_mem_available always returns a large value, this routine can
+ * just take an error exit.)
+ */
+
+EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
+					  backing_store_ptr info,
+					  long total_bytes_needed));
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.  jpeg_mem_init will be called before anything is
+ * allocated (and, therefore, nothing in cinfo is of use except the error
+ * manager pointer).  It should return a suitable default value for
+ * max_memory_to_use; this may subsequently be overridden by the surrounding
+ * application.  (Note that max_memory_to_use is only important if
+ * jpeg_mem_available chooses to consult it ... no one else will.)
+ * jpeg_mem_term may assume that all requested memory has been freed and that
+ * all opened backing-store objects have been closed.
+ */
+
+EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
+EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));

Copied: branches/branch-3.0/include/fltk3jpeg/jmorecfg.h (from rev 8987, branches/branch-3.0/jpeg/jmorecfg.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jmorecfg.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jmorecfg.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,371 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
+#ifndef _BASETSD_H_		/* Microsoft defines it in basetsd.h */
+#ifndef _BASETSD_H		/* MinGW is slightly different */
+#ifndef QGLOBAL_H		/* Qt defines it in qglobal.h */
+typedef long INT32;
+#endif
+#endif
+#endif
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifndef FAR
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+#endif
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#define C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define DCT_SCALING_SUPPORTED	    /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#define D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		0	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	2	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */

Copied: branches/branch-3.0/include/fltk3jpeg/jpegint.h (from rev 8987, branches/branch-3.0/jpeg/jpegint.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jpegint.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jpegint.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,407 @@
+/*
+ * jpegint.h
+ *
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file provides common declarations for the various JPEG modules.
+ * These declarations are considered internal to the JPEG library; most
+ * applications using the library shouldn't need to include this file.
+ */
+
+
+/* Declarations for both compression & decompression */
+
+typedef enum {			/* Operating modes for buffer controllers */
+	JBUF_PASS_THRU,		/* Plain stripwise operation */
+	/* Remaining modes require a full-image buffer to have been created */
+	JBUF_SAVE_SOURCE,	/* Run source subobject only, save output */
+	JBUF_CRANK_DEST,	/* Run dest subobject only, using saved data */
+	JBUF_SAVE_AND_PASS	/* Run both subobjects, save output */
+} J_BUF_MODE;
+
+/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
+#define CSTATE_START	100	/* after create_compress */
+#define CSTATE_SCANNING	101	/* start_compress done, write_scanlines OK */
+#define CSTATE_RAW_OK	102	/* start_compress done, write_raw_data OK */
+#define CSTATE_WRCOEFS	103	/* jpeg_write_coefficients done */
+#define DSTATE_START	200	/* after create_decompress */
+#define DSTATE_INHEADER	201	/* reading header markers, no SOS yet */
+#define DSTATE_READY	202	/* found SOS, ready for start_decompress */
+#define DSTATE_PRELOAD	203	/* reading multiscan file in start_decompress*/
+#define DSTATE_PRESCAN	204	/* performing dummy pass for 2-pass quant */
+#define DSTATE_SCANNING	205	/* start_decompress done, read_scanlines OK */
+#define DSTATE_RAW_OK	206	/* start_decompress done, read_raw_data OK */
+#define DSTATE_BUFIMAGE	207	/* expecting jpeg_start_output */
+#define DSTATE_BUFPOST	208	/* looking for SOS/EOI in jpeg_finish_output */
+#define DSTATE_RDCOEFS	209	/* reading file in jpeg_read_coefficients */
+#define DSTATE_STOPPING	210	/* looking for EOI in jpeg_finish_decompress */
+
+
+/* Declarations for compression modules */
+
+/* Master control module */
+struct jpeg_comp_master {
+  JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
+  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+
+  /* State variables made visible to other modules */
+  boolean call_pass_startup;	/* True if pass_startup must be called */
+  boolean is_last_pass;		/* True during last pass */
+};
+
+/* Main buffer control (downsampled-data buffer) */
+struct jpeg_c_main_controller {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, process_data, (j_compress_ptr cinfo,
+			       JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+			       JDIMENSION in_rows_avail));
+};
+
+/* Compression preprocessing (downsampling input buffer control) */
+struct jpeg_c_prep_controller {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
+				   JSAMPARRAY input_buf,
+				   JDIMENSION *in_row_ctr,
+				   JDIMENSION in_rows_avail,
+				   JSAMPIMAGE output_buf,
+				   JDIMENSION *out_row_group_ctr,
+				   JDIMENSION out_row_groups_avail));
+};
+
+/* Coefficient buffer control */
+struct jpeg_c_coef_controller {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
+				   JSAMPIMAGE input_buf));
+};
+
+/* Colorspace conversion */
+struct jpeg_color_converter {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, color_convert, (j_compress_ptr cinfo,
+				JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+				JDIMENSION output_row, int num_rows));
+};
+
+/* Downsampling */
+struct jpeg_downsampler {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, downsample, (j_compress_ptr cinfo,
+			     JSAMPIMAGE input_buf, JDIMENSION in_row_index,
+			     JSAMPIMAGE output_buf,
+			     JDIMENSION out_row_group_index));
+
+  boolean need_context_rows;	/* TRUE if need rows above & below */
+};
+
+/* Forward DCT (also controls coefficient quantization) */
+typedef JMETHOD(void, forward_DCT_ptr,
+		(j_compress_ptr cinfo, jpeg_component_info * compptr,
+		 JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+		 JDIMENSION start_row, JDIMENSION start_col,
+		 JDIMENSION num_blocks));
+
+struct jpeg_forward_dct {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  /* It is useful to allow each component to have a separate FDCT method. */
+  forward_DCT_ptr forward_DCT[MAX_COMPONENTS];
+};
+
+/* Entropy encoding */
+struct jpeg_entropy_encoder {
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
+  JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
+  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+};
+
+/* Marker writing */
+struct jpeg_marker_writer {
+  JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
+  JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
+  /* These routines are exported to allow insertion of extra markers */
+  /* Probably only COM and APPn markers should be written this way */
+  JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
+				      unsigned int datalen));
+  JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
+};
+
+
+/* Declarations for decompression modules */
+
+/* Master control module */
+struct jpeg_decomp_master {
+  JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
+
+  /* State variables made visible to other modules */
+  boolean is_dummy_pass;	/* True during 1st pass for 2-pass quant */
+};
+
+/* Input control module */
+struct jpeg_input_controller {
+  JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
+  JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
+
+  /* State variables made visible to other modules */
+  boolean has_multiple_scans;	/* True if file has multiple scans */
+  boolean eoi_reached;		/* True when EOI has been consumed */
+};
+
+/* Main buffer control (downsampled-data buffer) */
+struct jpeg_d_main_controller {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, process_data, (j_decompress_ptr cinfo,
+			       JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+			       JDIMENSION out_rows_avail));
+};
+
+/* Coefficient buffer control */
+struct jpeg_d_coef_controller {
+  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
+				 JSAMPIMAGE output_buf));
+  /* Pointer to array of coefficient virtual arrays, or NULL if none */
+  jvirt_barray_ptr *coef_arrays;
+};
+
+/* Decompression postprocessing (color quantization buffer control) */
+struct jpeg_d_post_controller {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
+				    JSAMPIMAGE input_buf,
+				    JDIMENSION *in_row_group_ctr,
+				    JDIMENSION in_row_groups_avail,
+				    JSAMPARRAY output_buf,
+				    JDIMENSION *out_row_ctr,
+				    JDIMENSION out_rows_avail));
+};
+
+/* Marker reading & parsing */
+struct jpeg_marker_reader {
+  JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
+  /* Read markers until SOS or EOI.
+   * Returns same codes as are defined for jpeg_consume_input:
+   * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
+   */
+  JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
+  /* Read a restart marker --- exported for use by entropy decoder only */
+  jpeg_marker_parser_method read_restart_marker;
+
+  /* State of marker reader --- nominally internal, but applications
+   * supplying COM or APPn handlers might like to know the state.
+   */
+  boolean saw_SOI;		/* found SOI? */
+  boolean saw_SOF;		/* found SOF? */
+  int next_restart_num;		/* next restart number expected (0-7) */
+  unsigned int discarded_bytes;	/* # of bytes skipped looking for a marker */
+};
+
+/* Entropy decoding */
+struct jpeg_entropy_decoder {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
+				JBLOCKROW *MCU_data));
+};
+
+/* Inverse DCT (also performs dequantization) */
+typedef JMETHOD(void, inverse_DCT_method_ptr,
+		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
+		 JCOEFPTR coef_block,
+		 JSAMPARRAY output_buf, JDIMENSION output_col));
+
+struct jpeg_inverse_dct {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  /* It is useful to allow each component to have a separate IDCT method. */
+  inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
+};
+
+/* Upsampling (note that upsampler must also call color converter) */
+struct jpeg_upsampler {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, upsample, (j_decompress_ptr cinfo,
+			   JSAMPIMAGE input_buf,
+			   JDIMENSION *in_row_group_ctr,
+			   JDIMENSION in_row_groups_avail,
+			   JSAMPARRAY output_buf,
+			   JDIMENSION *out_row_ctr,
+			   JDIMENSION out_rows_avail));
+
+  boolean need_context_rows;	/* TRUE if need rows above & below */
+};
+
+/* Colorspace conversion */
+struct jpeg_color_deconverter {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
+				JSAMPIMAGE input_buf, JDIMENSION input_row,
+				JSAMPARRAY output_buf, int num_rows));
+};
+
+/* Color quantization or color precision reduction */
+struct jpeg_color_quantizer {
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
+  JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
+				 JSAMPARRAY input_buf, JSAMPARRAY output_buf,
+				 int num_rows));
+  JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
+};
+
+
+/* Miscellaneous useful macros */
+
+#undef MAX
+#define MAX(a,b)	((a) > (b) ? (a) : (b))
+#undef MIN
+#define MIN(a,b)	((a) < (b) ? (a) : (b))
+
+
+/* We assume that right shift corresponds to signed division by 2 with
+ * rounding towards minus infinity.  This is correct for typical "arithmetic
+ * shift" instructions that shift in copies of the sign bit.  But some
+ * C compilers implement >> with an unsigned shift.  For these machines you
+ * must define RIGHT_SHIFT_IS_UNSIGNED.
+ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
+ * It is only applied with constant shift counts.  SHIFT_TEMPS must be
+ * included in the variables of any routine using RIGHT_SHIFT.
+ */
+
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define SHIFT_TEMPS	INT32 shift_temp;
+#define RIGHT_SHIFT(x,shft)  \
+	((shift_temp = (x)) < 0 ? \
+	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
+	 (shift_temp >> (shft)))
+#else
+#define SHIFT_TEMPS
+#define RIGHT_SHIFT(x,shft)	((x) >> (shft))
+#endif
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jinit_compress_master	jICompress
+#define jinit_c_master_control	jICMaster
+#define jinit_c_main_controller	jICMainC
+#define jinit_c_prep_controller	jICPrepC
+#define jinit_c_coef_controller	jICCoefC
+#define jinit_color_converter	jICColor
+#define jinit_downsampler	jIDownsampler
+#define jinit_forward_dct	jIFDCT
+#define jinit_huff_encoder	jIHEncoder
+#define jinit_arith_encoder	jIAEncoder
+#define jinit_marker_writer	jIMWriter
+#define jinit_master_decompress	jIDMaster
+#define jinit_d_main_controller	jIDMainC
+#define jinit_d_coef_controller	jIDCoefC
+#define jinit_d_post_controller	jIDPostC
+#define jinit_input_controller	jIInCtlr
+#define jinit_marker_reader	jIMReader
+#define jinit_huff_decoder	jIHDecoder
+#define jinit_arith_decoder	jIADecoder
+#define jinit_inverse_dct	jIIDCT
+#define jinit_upsampler		jIUpsampler
+#define jinit_color_deconverter	jIDColor
+#define jinit_1pass_quantizer	jI1Quant
+#define jinit_2pass_quantizer	jI2Quant
+#define jinit_merged_upsampler	jIMUpsampler
+#define jinit_memory_mgr	jIMemMgr
+#define jdiv_round_up		jDivRound
+#define jround_up		jRound
+#define jcopy_sample_rows	jCopySamples
+#define jcopy_block_row		jCopyBlocks
+#define jzero_far		jZeroFar
+#define jpeg_zigzag_order	jZIGTable
+#define jpeg_natural_order	jZAGTable
+#define jpeg_natural_order7	jZAGTable7
+#define jpeg_natural_order6	jZAGTable6
+#define jpeg_natural_order5	jZAGTable5
+#define jpeg_natural_order4	jZAGTable4
+#define jpeg_natural_order3	jZAGTable3
+#define jpeg_natural_order2	jZAGTable2
+#define jpeg_aritab		jAriTab
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/* Compression module initialization routines */
+EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
+					 boolean transcode_only));
+EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
+/* Decompression module initialization routines */
+EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
+					  boolean need_full_buffer));
+EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
+/* Memory manager initialization */
+EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
+
+/* Utility routines in jutils.c */
+EXTERN(long) jdiv_round_up JPP((long a, long b));
+EXTERN(long) jround_up JPP((long a, long b));
+EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
+				    JSAMPARRAY output_array, int dest_row,
+				    int num_rows, JDIMENSION num_cols));
+EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
+				  JDIMENSION num_blocks));
+EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
+/* Constant tables in jutils.c */
+#if 0				/* This table is not actually needed in v6a */
+extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
+#endif
+extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
+extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */
+extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */
+extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */
+extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */
+extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
+extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
+
+/* Arithmetic coding probability estimation tables in jaricom.c */
+extern const INT32 jpeg_aritab[];
+
+/* Suppress undefined-structure complaints if necessary. */
+
+#ifdef INCOMPLETE_TYPES_BROKEN
+#ifndef AM_MEMORY_MANAGER	/* only jmemmgr.c defines these */
+struct jvirt_sarray_control { long dummy; };
+struct jvirt_barray_control { long dummy; };
+#endif
+#endif /* INCOMPLETE_TYPES_BROKEN */

Copied: branches/branch-3.0/include/fltk3jpeg/jpeglib.h (from rev 8987, branches/branch-3.0/jpeg/jpeglib.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jpeglib.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jpeglib.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1160 @@
+/*
+ * jpeglib.h
+ *
+ * Copyright (C) 1991-1998, Thomas G. Lane.
+ * Modified 2002-2010 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file defines the application interface for the JPEG library.
+ * Most applications using the library need only include this file,
+ * and perhaps jerror.h if they want to know the exact error codes.
+ */
+
+#ifndef JPEGLIB_H
+#define JPEGLIB_H
+
+/*
+ * First we include the configuration files that record how this
+ * installation of the JPEG library is set up.  jconfig.h can be
+ * generated automatically for many systems.  jmorecfg.h contains
+ * manual configuration options that most people need not worry about.
+ */
+
+#ifndef JCONFIG_INCLUDED	/* in case jinclude.h already did */
+#include "jconfig.h"		/* widely used configuration options */
+#endif
+#include "jmorecfg.h"		/* seldom changed options */
+
+
+#ifdef __cplusplus
+#ifndef DONT_USE_EXTERN_C
+extern "C" {
+#endif
+#endif
+
+/* Version IDs for the JPEG library.
+ * Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
+ */
+
+#define JPEG_LIB_VERSION        80	/* Compatibility version 8.0 */
+#define JPEG_LIB_VERSION_MAJOR  8
+#define JPEG_LIB_VERSION_MINOR  3
+
+
+/* Various constants determining the sizes of things.
+ * All of these are specified by the JPEG standard, so don't change them
+ * if you want to be compatible.
+ */
+
+#define DCTSIZE		    8	/* The basic DCT block is 8x8 samples */
+#define DCTSIZE2	    64	/* DCTSIZE squared; # of elements in a block */
+#define NUM_QUANT_TBLS      4	/* Quantization tables are numbered 0..3 */
+#define NUM_HUFF_TBLS       4	/* Huffman tables are numbered 0..3 */
+#define NUM_ARITH_TBLS      16	/* Arith-coding tables are numbered 0..15 */
+#define MAX_COMPS_IN_SCAN   4	/* JPEG limit on # of components in one scan */
+#define MAX_SAMP_FACTOR     4	/* JPEG limit on sampling factors */
+/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;
+ * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.
+ * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU
+ * to handle it.  We even let you do this from the jconfig.h file.  However,
+ * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe
+ * sometimes emits noncompliant files doesn't mean you should too.
+ */
+#define C_MAX_BLOCKS_IN_MCU   10 /* compressor's limit on blocks per MCU */
+#ifndef D_MAX_BLOCKS_IN_MCU
+#define D_MAX_BLOCKS_IN_MCU   10 /* decompressor's limit on blocks per MCU */
+#endif
+
+
+/* Data structures for images (arrays of samples and of DCT coefficients).
+ * On 80x86 machines, the image arrays are too big for near pointers,
+ * but the pointer arrays can fit in near memory.
+ */
+
+typedef JSAMPLE FAR *JSAMPROW;	/* ptr to one image row of pixel samples. */
+typedef JSAMPROW *JSAMPARRAY;	/* ptr to some rows (a 2-D sample array) */
+typedef JSAMPARRAY *JSAMPIMAGE;	/* a 3-D sample array: top index is color */
+
+typedef JCOEF JBLOCK[DCTSIZE2];	/* one block of coefficients */
+typedef JBLOCK FAR *JBLOCKROW;	/* pointer to one row of coefficient blocks */
+typedef JBLOCKROW *JBLOCKARRAY;		/* a 2-D array of coefficient blocks */
+typedef JBLOCKARRAY *JBLOCKIMAGE;	/* a 3-D array of coefficient blocks */
+
+typedef JCOEF FAR *JCOEFPTR;	/* useful in a couple of places */
+
+
+/* Types for JPEG compression parameters and working tables. */
+
+
+/* DCT coefficient quantization tables. */
+
+typedef struct {
+  /* This array gives the coefficient quantizers in natural array order
+   * (not the zigzag order in which they are stored in a JPEG DQT marker).
+   * CAUTION: IJG versions prior to v6a kept this array in zigzag order.
+   */
+  UINT16 quantval[DCTSIZE2];	/* quantization step for each coefficient */
+  /* This field is used only during compression.  It's initialized FALSE when
+   * the table is created, and set TRUE when it's been output to the file.
+   * You could suppress output of a table by setting this to TRUE.
+   * (See jpeg_suppress_tables for an example.)
+   */
+  boolean sent_table;		/* TRUE when table has been output */
+} JQUANT_TBL;
+
+
+/* Huffman coding tables. */
+
+typedef struct {
+  /* These two fields directly represent the contents of a JPEG DHT marker */
+  UINT8 bits[17];		/* bits[k] = # of symbols with codes of */
+				/* length k bits; bits[0] is unused */
+  UINT8 huffval[256];		/* The symbols, in order of incr code length */
+  /* This field is used only during compression.  It's initialized FALSE when
+   * the table is created, and set TRUE when it's been output to the file.
+   * You could suppress output of a table by setting this to TRUE.
+   * (See jpeg_suppress_tables for an example.)
+   */
+  boolean sent_table;		/* TRUE when table has been output */
+} JHUFF_TBL;
+
+
+/* Basic info about one component (color channel). */
+
+typedef struct {
+  /* These values are fixed over the whole image. */
+  /* For compression, they must be supplied by parameter setup; */
+  /* for decompression, they are read from the SOF marker. */
+  int component_id;		/* identifier for this component (0..255) */
+  int component_index;		/* its index in SOF or cinfo->comp_info[] */
+  int h_samp_factor;		/* horizontal sampling factor (1..4) */
+  int v_samp_factor;		/* vertical sampling factor (1..4) */
+  int quant_tbl_no;		/* quantization table selector (0..3) */
+  /* These values may vary between scans. */
+  /* For compression, they must be supplied by parameter setup; */
+  /* for decompression, they are read from the SOS marker. */
+  /* The decompressor output side may not use these variables. */
+  int dc_tbl_no;		/* DC entropy table selector (0..3) */
+  int ac_tbl_no;		/* AC entropy table selector (0..3) */
+  
+  /* Remaining fields should be treated as private by applications. */
+  
+  /* These values are computed during compression or decompression startup: */
+  /* Component's size in DCT blocks.
+   * Any dummy blocks added to complete an MCU are not counted; therefore
+   * these values do not depend on whether a scan is interleaved or not.
+   */
+  JDIMENSION width_in_blocks;
+  JDIMENSION height_in_blocks;
+  /* Size of a DCT block in samples,
+   * reflecting any scaling we choose to apply during the DCT step.
+   * Values from 1 to 16 are supported.
+   * Note that different components may receive different DCT scalings.
+   */
+  int DCT_h_scaled_size;
+  int DCT_v_scaled_size;
+  /* The downsampled dimensions are the component's actual, unpadded number
+   * of samples at the main buffer (preprocessing/compression interface);
+   * DCT scaling is included, so
+   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE)
+   * and similarly for height.
+   */
+  JDIMENSION downsampled_width;	 /* actual width in samples */
+  JDIMENSION downsampled_height; /* actual height in samples */
+  /* This flag is used only for decompression.  In cases where some of the
+   * components will be ignored (eg grayscale output from YCbCr image),
+   * we can skip most computations for the unused components.
+   */
+  boolean component_needed;	/* do we need the value of this component? */
+
+  /* These values are computed before starting a scan of the component. */
+  /* The decompressor output side may not use these variables. */
+  int MCU_width;		/* number of blocks per MCU, horizontally */
+  int MCU_height;		/* number of blocks per MCU, vertically */
+  int MCU_blocks;		/* MCU_width * MCU_height */
+  int MCU_sample_width;	/* MCU width in samples: MCU_width * DCT_h_scaled_size */
+  int last_col_width;		/* # of non-dummy blocks across in last MCU */
+  int last_row_height;		/* # of non-dummy blocks down in last MCU */
+
+  /* Saved quantization table for component; NULL if none yet saved.
+   * See jdinput.c comments about the need for this information.
+   * This field is currently used only for decompression.
+   */
+  JQUANT_TBL * quant_table;
+
+  /* Private per-component storage for DCT or IDCT subsystem. */
+  void * dct_table;
+} jpeg_component_info;
+
+
+/* The script for encoding a multiple-scan file is an array of these: */
+
+typedef struct {
+  int comps_in_scan;		/* number of components encoded in this scan */
+  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
+  int Ss, Se;			/* progressive JPEG spectral selection parms */
+  int Ah, Al;			/* progressive JPEG successive approx. parms */
+} jpeg_scan_info;
+
+/* The decompressor can save APPn and COM markers in a list of these: */
+
+typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;
+
+struct jpeg_marker_struct {
+  jpeg_saved_marker_ptr next;	/* next in list, or NULL */
+  UINT8 marker;			/* marker code: JPEG_COM, or JPEG_APP0+n */
+  unsigned int original_length;	/* # bytes of data in the file */
+  unsigned int data_length;	/* # bytes of data saved at data[] */
+  JOCTET FAR * data;		/* the data contained in the marker */
+  /* the marker length word is not counted in data_length or original_length */
+};
+
+/* Known color spaces. */
+
+typedef enum {
+	JCS_UNKNOWN,		/* error/unspecified */
+	JCS_GRAYSCALE,		/* monochrome */
+	JCS_RGB,		/* red/green/blue */
+	JCS_YCbCr,		/* Y/Cb/Cr (also known as YUV) */
+	JCS_CMYK,		/* C/M/Y/K */
+	JCS_YCCK		/* Y/Cb/Cr/K */
+} J_COLOR_SPACE;
+
+/* DCT/IDCT algorithm options. */
+
+typedef enum {
+	JDCT_ISLOW,		/* slow but accurate integer algorithm */
+	JDCT_IFAST,		/* faster, less accurate integer method */
+	JDCT_FLOAT		/* floating-point: accurate, fast on fast HW */
+} J_DCT_METHOD;
+
+#ifndef JDCT_DEFAULT		/* may be overridden in jconfig.h */
+#define JDCT_DEFAULT  JDCT_ISLOW
+#endif
+#ifndef JDCT_FASTEST		/* may be overridden in jconfig.h */
+#define JDCT_FASTEST  JDCT_IFAST
+#endif
+
+/* Dithering options for decompression. */
+
+typedef enum {
+	JDITHER_NONE,		/* no dithering */
+	JDITHER_ORDERED,	/* simple ordered dither */
+	JDITHER_FS		/* Floyd-Steinberg error diffusion dither */
+} J_DITHER_MODE;
+
+
+/* Common fields between JPEG compression and decompression master structs. */
+
+#define jpeg_common_fields \
+  struct jpeg_error_mgr * err;	/* Error handler module */\
+  struct jpeg_memory_mgr * mem;	/* Memory manager module */\
+  struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
+  void * client_data;		/* Available for use by application */\
+  boolean is_decompressor;	/* So common code can tell which is which */\
+  int global_state		/* For checking call sequence validity */
+
+/* Routines that are to be used by both halves of the library are declared
+ * to receive a pointer to this structure.  There are no actual instances of
+ * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.
+ */
+struct jpeg_common_struct {
+  jpeg_common_fields;		/* Fields common to both master struct types */
+  /* Additional fields follow in an actual jpeg_compress_struct or
+   * jpeg_decompress_struct.  All three structs must agree on these
+   * initial fields!  (This would be a lot cleaner in C++.)
+   */
+};
+
+typedef struct jpeg_common_struct * j_common_ptr;
+typedef struct jpeg_compress_struct * j_compress_ptr;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+
+
+/* Master record for a compression instance */
+
+struct jpeg_compress_struct {
+  jpeg_common_fields;		/* Fields shared with jpeg_decompress_struct */
+
+  /* Destination for compressed data */
+  struct jpeg_destination_mgr * dest;
+
+  /* Description of source image --- these fields must be filled in by
+   * outer application before starting compression.  in_color_space must
+   * be correct before you can even call jpeg_set_defaults().
+   */
+
+  JDIMENSION image_width;	/* input image width */
+  JDIMENSION image_height;	/* input image height */
+  int input_components;		/* # of color components in input image */
+  J_COLOR_SPACE in_color_space;	/* colorspace of input image */
+
+  double input_gamma;		/* image gamma of input image */
+
+  /* Compression parameters --- these fields must be set before calling
+   * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to
+   * initialize everything to reasonable defaults, then changing anything
+   * the application specifically wants to change.  That way you won't get
+   * burnt when new parameters are added.  Also note that there are several
+   * helper routines to simplify changing parameters.
+   */
+
+  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
+
+  JDIMENSION jpeg_width;	/* scaled JPEG image width */
+  JDIMENSION jpeg_height;	/* scaled JPEG image height */
+  /* Dimensions of actual JPEG image that will be written to file,
+   * derived from input dimensions by scaling factors above.
+   * These fields are computed by jpeg_start_compress().
+   * You can also use jpeg_calc_jpeg_dimensions() to determine these values
+   * in advance of calling jpeg_start_compress().
+   */
+
+  int data_precision;		/* bits of precision in image data */
+
+  int num_components;		/* # of color components in JPEG image */
+  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
+
+  jpeg_component_info * comp_info;
+  /* comp_info[i] describes component that appears i'th in SOF */
+
+  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
+  int q_scale_factor[NUM_QUANT_TBLS];
+  /* ptrs to coefficient quantization tables, or NULL if not defined,
+   * and corresponding scale factors (percentage, initialized 100).
+   */
+
+  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  /* ptrs to Huffman coding tables, or NULL if not defined */
+
+  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
+  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
+  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
+
+  int num_scans;		/* # of entries in scan_info array */
+  const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */
+  /* The default value of scan_info is NULL, which causes a single-scan
+   * sequential JPEG file to be emitted.  To create a multi-scan file,
+   * set num_scans and scan_info to point to an array of scan definitions.
+   */
+
+  boolean raw_data_in;		/* TRUE=caller supplies downsampled data */
+  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
+  boolean optimize_coding;	/* TRUE=optimize entropy encoding parms */
+  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
+  boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */
+  int smoothing_factor;		/* 1..100, or 0 for no input smoothing */
+  J_DCT_METHOD dct_method;	/* DCT algorithm selector */
+
+  /* The restart interval can be specified in absolute MCUs by setting
+   * restart_interval, or in MCU rows by setting restart_in_rows
+   * (in which case the correct restart_interval will be figured
+   * for each scan).
+   */
+  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */
+  int restart_in_rows;		/* if > 0, MCU rows per restart interval */
+
+  /* Parameters controlling emission of special markers. */
+
+  boolean write_JFIF_header;	/* should a JFIF marker be written? */
+  UINT8 JFIF_major_version;	/* What to write for the JFIF version number */
+  UINT8 JFIF_minor_version;
+  /* These three values are not used by the JPEG code, merely copied */
+  /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */
+  /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */
+  /* ratio is defined by X_density/Y_density even when density_unit=0. */
+  UINT8 density_unit;		/* JFIF code for pixel size units */
+  UINT16 X_density;		/* Horizontal pixel density */
+  UINT16 Y_density;		/* Vertical pixel density */
+  boolean write_Adobe_marker;	/* should an Adobe marker be written? */
+  
+  /* State variable: index of next scanline to be written to
+   * jpeg_write_scanlines().  Application may use this to control its
+   * processing loop, e.g., "while (next_scanline < image_height)".
+   */
+
+  JDIMENSION next_scanline;	/* 0 .. image_height-1  */
+
+  /* Remaining fields are known throughout compressor, but generally
+   * should not be touched by a surrounding application.
+   */
+
+  /*
+   * These fields are computed during compression startup
+   */
+  boolean progressive_mode;	/* TRUE if scan script uses progressive mode */
+  int max_h_samp_factor;	/* largest h_samp_factor */
+  int max_v_samp_factor;	/* largest v_samp_factor */
+
+  int min_DCT_h_scaled_size;	/* smallest DCT_h_scaled_size of any component */
+  int min_DCT_v_scaled_size;	/* smallest DCT_v_scaled_size of any component */
+
+  JDIMENSION total_iMCU_rows;	/* # of iMCU rows to be input to coef ctlr */
+  /* The coefficient controller receives data in units of MCU rows as defined
+   * for fully interleaved scans (whether the JPEG file is interleaved or not).
+   * There are v_samp_factor * DCTSIZE sample rows of each component in an
+   * "iMCU" (interleaved MCU) row.
+   */
+  
+  /*
+   * These fields are valid during any one scan.
+   * They describe the components and MCUs actually appearing in the scan.
+   */
+  int comps_in_scan;		/* # of JPEG components in this scan */
+  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
+  /* *cur_comp_info[i] describes component that appears i'th in SOS */
+  
+  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
+  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
+  
+  int blocks_in_MCU;		/* # of DCT blocks per MCU */
+  int MCU_membership[C_MAX_BLOCKS_IN_MCU];
+  /* MCU_membership[i] is index in cur_comp_info of component owning */
+  /* i'th block in an MCU */
+
+  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
+
+  int block_size;		/* the basic DCT block size: 1..16 */
+  const int * natural_order;	/* natural-order position array */
+  int lim_Se;			/* min( Se, DCTSIZE2-1 ) */
+
+  /*
+   * Links to compression subobjects (methods and private variables of modules)
+   */
+  struct jpeg_comp_master * master;
+  struct jpeg_c_main_controller * main;
+  struct jpeg_c_prep_controller * prep;
+  struct jpeg_c_coef_controller * coef;
+  struct jpeg_marker_writer * marker;
+  struct jpeg_color_converter * cconvert;
+  struct jpeg_downsampler * downsample;
+  struct jpeg_forward_dct * fdct;
+  struct jpeg_entropy_encoder * entropy;
+  jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */
+  int script_space_size;
+};
+
+
+/* Master record for a decompression instance */
+
+struct jpeg_decompress_struct {
+  jpeg_common_fields;		/* Fields shared with jpeg_compress_struct */
+
+  /* Source of compressed data */
+  struct jpeg_source_mgr * src;
+
+  /* Basic description of image --- filled in by jpeg_read_header(). */
+  /* Application may inspect these values to decide how to process image. */
+
+  JDIMENSION image_width;	/* nominal image width (from SOF marker) */
+  JDIMENSION image_height;	/* nominal image height */
+  int num_components;		/* # of color components in JPEG image */
+  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
+
+  /* Decompression processing parameters --- these fields must be set before
+   * calling jpeg_start_decompress().  Note that jpeg_read_header() initializes
+   * them to default values.
+   */
+
+  J_COLOR_SPACE out_color_space; /* colorspace for output */
+
+  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
+
+  double output_gamma;		/* image gamma wanted in output */
+
+  boolean buffered_image;	/* TRUE=multiple output passes */
+  boolean raw_data_out;		/* TRUE=downsampled data wanted */
+
+  J_DCT_METHOD dct_method;	/* IDCT algorithm selector */
+  boolean do_fancy_upsampling;	/* TRUE=apply fancy upsampling */
+  boolean do_block_smoothing;	/* TRUE=apply interblock smoothing */
+
+  boolean quantize_colors;	/* TRUE=colormapped output wanted */
+  /* the following are ignored if not quantize_colors: */
+  J_DITHER_MODE dither_mode;	/* type of color dithering to use */
+  boolean two_pass_quantize;	/* TRUE=use two-pass color quantization */
+  int desired_number_of_colors;	/* max # colors to use in created colormap */
+  /* these are significant only in buffered-image mode: */
+  boolean enable_1pass_quant;	/* enable future use of 1-pass quantizer */
+  boolean enable_external_quant;/* enable future use of external colormap */
+  boolean enable_2pass_quant;	/* enable future use of 2-pass quantizer */
+
+  /* Description of actual output image that will be returned to application.
+   * These fields are computed by jpeg_start_decompress().
+   * You can also use jpeg_calc_output_dimensions() to determine these values
+   * in advance of calling jpeg_start_decompress().
+   */
+
+  JDIMENSION output_width;	/* scaled image width */
+  JDIMENSION output_height;	/* scaled image height */
+  int out_color_components;	/* # of color components in out_color_space */
+  int output_components;	/* # of color components returned */
+  /* output_components is 1 (a colormap index) when quantizing colors;
+   * otherwise it equals out_color_components.
+   */
+  int rec_outbuf_height;	/* min recommended height of scanline buffer */
+  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows
+   * high, space and time will be wasted due to unnecessary data copying.
+   * Usually rec_outbuf_height will be 1 or 2, at most 4.
+   */
+
+  /* When quantizing colors, the output colormap is described by these fields.
+   * The application can supply a colormap by setting colormap non-NULL before
+   * calling jpeg_start_decompress; otherwise a colormap is created during
+   * jpeg_start_decompress or jpeg_start_output.
+   * The map has out_color_components rows and actual_number_of_colors columns.
+   */
+  int actual_number_of_colors;	/* number of entries in use */
+  JSAMPARRAY colormap;		/* The color map as a 2-D pixel array */
+
+  /* State variables: these variables indicate the progress of decompression.
+   * The application may examine these but must not modify them.
+   */
+
+  /* Row index of next scanline to be read from jpeg_read_scanlines().
+   * Application may use this to control its processing loop, e.g.,
+   * "while (output_scanline < output_height)".
+   */
+  JDIMENSION output_scanline;	/* 0 .. output_height-1  */
+
+  /* Current input scan number and number of iMCU rows completed in scan.
+   * These indicate the progress of the decompressor input side.
+   */
+  int input_scan_number;	/* Number of SOS markers seen so far */
+  JDIMENSION input_iMCU_row;	/* Number of iMCU rows completed */
+
+  /* The "output scan number" is the notional scan being displayed by the
+   * output side.  The decompressor will not allow output scan/row number
+   * to get ahead of input scan/row, but it can fall arbitrarily far behind.
+   */
+  int output_scan_number;	/* Nominal scan number being displayed */
+  JDIMENSION output_iMCU_row;	/* Number of iMCU rows read */
+
+  /* Current progression status.  coef_bits[c][i] indicates the precision
+   * with which component c's DCT coefficient i (in zigzag order) is known.
+   * It is -1 when no data has yet been received, otherwise it is the point
+   * transform (shift) value for the most recent scan of the coefficient
+   * (thus, 0 at completion of the progression).
+   * This pointer is NULL when reading a non-progressive file.
+   */
+  int (*coef_bits)[DCTSIZE2];	/* -1 or current Al value for each coef */
+
+  /* Internal JPEG parameters --- the application usually need not look at
+   * these fields.  Note that the decompressor output side may not use
+   * any parameters that can change between scans.
+   */
+
+  /* Quantization and Huffman tables are carried forward across input
+   * datastreams when processing abbreviated JPEG datastreams.
+   */
+
+  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
+  /* ptrs to coefficient quantization tables, or NULL if not defined */
+
+  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
+  /* ptrs to Huffman coding tables, or NULL if not defined */
+
+  /* These parameters are never carried across datastreams, since they
+   * are given in SOF/SOS markers or defined to be reset by SOI.
+   */
+
+  int data_precision;		/* bits of precision in image data */
+
+  jpeg_component_info * comp_info;
+  /* comp_info[i] describes component that appears i'th in SOF */
+
+  boolean is_baseline;		/* TRUE if Baseline SOF0 encountered */
+  boolean progressive_mode;	/* TRUE if SOFn specifies progressive mode */
+  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
+
+  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
+  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
+  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
+
+  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */
+
+  /* These fields record data obtained from optional markers recognized by
+   * the JPEG library.
+   */
+  boolean saw_JFIF_marker;	/* TRUE iff a JFIF APP0 marker was found */
+  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
+  UINT8 JFIF_major_version;	/* JFIF version number */
+  UINT8 JFIF_minor_version;
+  UINT8 density_unit;		/* JFIF code for pixel size units */
+  UINT16 X_density;		/* Horizontal pixel density */
+  UINT16 Y_density;		/* Vertical pixel density */
+  boolean saw_Adobe_marker;	/* TRUE iff an Adobe APP14 marker was found */
+  UINT8 Adobe_transform;	/* Color transform code from Adobe marker */
+
+  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
+
+  /* Aside from the specific data retained from APPn markers known to the
+   * library, the uninterpreted contents of any or all APPn and COM markers
+   * can be saved in a list for examination by the application.
+   */
+  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */
+
+  /* Remaining fields are known throughout decompressor, but generally
+   * should not be touched by a surrounding application.
+   */
+
+  /*
+   * These fields are computed during decompression startup
+   */
+  int max_h_samp_factor;	/* largest h_samp_factor */
+  int max_v_samp_factor;	/* largest v_samp_factor */
+
+  int min_DCT_h_scaled_size;	/* smallest DCT_h_scaled_size of any component */
+  int min_DCT_v_scaled_size;	/* smallest DCT_v_scaled_size of any component */
+
+  JDIMENSION total_iMCU_rows;	/* # of iMCU rows in image */
+  /* The coefficient controller's input and output progress is measured in
+   * units of "iMCU" (interleaved MCU) rows.  These are the same as MCU rows
+   * in fully interleaved JPEG scans, but are used whether the scan is
+   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block
+   * rows of each component.  Therefore, the IDCT output contains
+   * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row.
+   */
+
+  JSAMPLE * sample_range_limit; /* table for fast range-limiting */
+
+  /*
+   * These fields are valid during any one scan.
+   * They describe the components and MCUs actually appearing in the scan.
+   * Note that the decompressor output side must not use these fields.
+   */
+  int comps_in_scan;		/* # of JPEG components in this scan */
+  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
+  /* *cur_comp_info[i] describes component that appears i'th in SOS */
+
+  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
+  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
+
+  int blocks_in_MCU;		/* # of DCT blocks per MCU */
+  int MCU_membership[D_MAX_BLOCKS_IN_MCU];
+  /* MCU_membership[i] is index in cur_comp_info of component owning */
+  /* i'th block in an MCU */
+
+  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
+
+  /* These fields are derived from Se of first SOS marker.
+   */
+  int block_size;		/* the basic DCT block size: 1..16 */
+  const int * natural_order; /* natural-order position array for entropy decode */
+  int lim_Se;			/* min( Se, DCTSIZE2-1 ) for entropy decode */
+
+  /* This field is shared between entropy decoder and marker parser.
+   * It is either zero or the code of a JPEG marker that has been
+   * read from the data source, but has not yet been processed.
+   */
+  int unread_marker;
+
+  /*
+   * Links to decompression subobjects (methods, private variables of modules)
+   */
+  struct jpeg_decomp_master * master;
+  struct jpeg_d_main_controller * main;
+  struct jpeg_d_coef_controller * coef;
+  struct jpeg_d_post_controller * post;
+  struct jpeg_input_controller * inputctl;
+  struct jpeg_marker_reader * marker;
+  struct jpeg_entropy_decoder * entropy;
+  struct jpeg_inverse_dct * idct;
+  struct jpeg_upsampler * upsample;
+  struct jpeg_color_deconverter * cconvert;
+  struct jpeg_color_quantizer * cquantize;
+};
+
+
+/* "Object" declarations for JPEG modules that may be supplied or called
+ * directly by the surrounding application.
+ * As with all objects in the JPEG library, these structs only define the
+ * publicly visible methods and state variables of a module.  Additional
+ * private fields may exist after the public ones.
+ */
+
+
+/* Error handler object */
+
+struct jpeg_error_mgr {
+  /* Error exit handler: does not return to caller */
+  JMETHOD(void, error_exit, (j_common_ptr cinfo));
+  /* Conditionally emit a trace or warning message */
+  JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
+  /* Routine that actually outputs a trace or error message */
+  JMETHOD(void, output_message, (j_common_ptr cinfo));
+  /* Format a message string for the most recent JPEG error or message */
+  JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
+#define JMSG_LENGTH_MAX  200	/* recommended size of format_message buffer */
+  /* Reset error state variables at start of a new image */
+  JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
+  
+  /* The message ID code and any parameters are saved here.
+   * A message can have one string parameter or up to 8 int parameters.
+   */
+  int msg_code;
+#define JMSG_STR_PARM_MAX  80
+  union {
+    int i[8];
+    char s[JMSG_STR_PARM_MAX];
+  } msg_parm;
+  
+  /* Standard state variables for error facility */
+  
+  int trace_level;		/* max msg_level that will be displayed */
+  
+  /* For recoverable corrupt-data errors, we emit a warning message,
+   * but keep going unless emit_message chooses to abort.  emit_message
+   * should count warnings in num_warnings.  The surrounding application
+   * can check for bad data by seeing if num_warnings is nonzero at the
+   * end of processing.
+   */
+  long num_warnings;		/* number of corrupt-data warnings */
+
+  /* These fields point to the table(s) of error message strings.
+   * An application can change the table pointer to switch to a different
+   * message list (typically, to change the language in which errors are
+   * reported).  Some applications may wish to add additional error codes
+   * that will be handled by the JPEG library error mechanism; the second
+   * table pointer is used for this purpose.
+   *
+   * First table includes all errors generated by JPEG library itself.
+   * Error code 0 is reserved for a "no such error string" message.
+   */
+  const char * const * jpeg_message_table; /* Library errors */
+  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */
+  /* Second table can be added by application (see cjpeg/djpeg for example).
+   * It contains strings numbered first_addon_message..last_addon_message.
+   */
+  const char * const * addon_message_table; /* Non-library errors */
+  int first_addon_message;	/* code for first string in addon table */
+  int last_addon_message;	/* code for last string in addon table */
+};
+
+
+/* Progress monitor object */
+
+struct jpeg_progress_mgr {
+  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
+
+  long pass_counter;		/* work units completed in this pass */
+  long pass_limit;		/* total number of work units in this pass */
+  int completed_passes;		/* passes completed so far */
+  int total_passes;		/* total number of passes expected */
+};
+
+
+/* Data destination object for compression */
+
+struct jpeg_destination_mgr {
+  JOCTET * next_output_byte;	/* => next byte to write in buffer */
+  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
+
+  JMETHOD(void, init_destination, (j_compress_ptr cinfo));
+  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
+  JMETHOD(void, term_destination, (j_compress_ptr cinfo));
+};
+
+
+/* Data source object for decompression */
+
+struct jpeg_source_mgr {
+  const JOCTET * next_input_byte; /* => next byte to read from buffer */
+  size_t bytes_in_buffer;	/* # of bytes remaining in buffer */
+
+  JMETHOD(void, init_source, (j_decompress_ptr cinfo));
+  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
+  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
+  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
+  JMETHOD(void, term_source, (j_decompress_ptr cinfo));
+};
+
+
+/* Memory manager object.
+ * Allocates "small" objects (a few K total), "large" objects (tens of K),
+ * and "really big" objects (virtual arrays with backing store if needed).
+ * The memory manager does not allow individual objects to be freed; rather,
+ * each created object is assigned to a pool, and whole pools can be freed
+ * at once.  This is faster and more convenient than remembering exactly what
+ * to free, especially where malloc()/free() are not too speedy.
+ * NB: alloc routines never return NULL.  They exit to error_exit if not
+ * successful.
+ */
+
+#define JPOOL_PERMANENT	0	/* lasts until master record is destroyed */
+#define JPOOL_IMAGE	1	/* lasts until done with image/datastream */
+#define JPOOL_NUMPOOLS	2
+
+typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
+typedef struct jvirt_barray_control * jvirt_barray_ptr;
+
+
+struct jpeg_memory_mgr {
+  /* Method pointers */
+  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
+				size_t sizeofobject));
+  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
+				     size_t sizeofobject));
+  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
+				     JDIMENSION samplesperrow,
+				     JDIMENSION numrows));
+  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
+				      JDIMENSION blocksperrow,
+				      JDIMENSION numrows));
+  JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
+						  int pool_id,
+						  boolean pre_zero,
+						  JDIMENSION samplesperrow,
+						  JDIMENSION numrows,
+						  JDIMENSION maxaccess));
+  JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
+						  int pool_id,
+						  boolean pre_zero,
+						  JDIMENSION blocksperrow,
+						  JDIMENSION numrows,
+						  JDIMENSION maxaccess));
+  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
+  JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
+					   jvirt_sarray_ptr ptr,
+					   JDIMENSION start_row,
+					   JDIMENSION num_rows,
+					   boolean writable));
+  JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
+					    jvirt_barray_ptr ptr,
+					    JDIMENSION start_row,
+					    JDIMENSION num_rows,
+					    boolean writable));
+  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
+  JMETHOD(void, self_destruct, (j_common_ptr cinfo));
+
+  /* Limit on memory allocation for this JPEG object.  (Note that this is
+   * merely advisory, not a guaranteed maximum; it only affects the space
+   * used for virtual-array buffers.)  May be changed by outer application
+   * after creating the JPEG object.
+   */
+  long max_memory_to_use;
+
+  /* Maximum allocation request accepted by alloc_large. */
+  long max_alloc_chunk;
+};
+
+
+/* Routine signature for application-supplied marker processing methods.
+ * Need not pass marker code since it is stored in cinfo->unread_marker.
+ */
+typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
+
+
+/* Declarations for routines called by application.
+ * The JPP macro hides prototype parameters from compilers that can't cope.
+ * Note JPP requires double parentheses.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JPP(arglist)	arglist
+#else
+#define JPP(arglist)	()
+#endif
+
+
+/* Short forms of external names for systems with brain-damaged linkers.
+ * We shorten external names to be unique in the first six letters, which
+ * is good enough for all known systems.
+ * (If your compiler itself needs names to be unique in less than 15 
+ * characters, you are out of luck.  Get a better compiler.)
+ */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_std_error		jStdError
+#define jpeg_CreateCompress	jCreaCompress
+#define jpeg_CreateDecompress	jCreaDecompress
+#define jpeg_destroy_compress	jDestCompress
+#define jpeg_destroy_decompress	jDestDecompress
+#define jpeg_stdio_dest		jStdDest
+#define jpeg_stdio_src		jStdSrc
+#define jpeg_mem_dest		jMemDest
+#define jpeg_mem_src		jMemSrc
+#define jpeg_set_defaults	jSetDefaults
+#define jpeg_set_colorspace	jSetColorspace
+#define jpeg_default_colorspace	jDefColorspace
+#define jpeg_set_quality	jSetQuality
+#define jpeg_set_linear_quality	jSetLQuality
+#define jpeg_default_qtables	jDefQTables
+#define jpeg_add_quant_table	jAddQuantTable
+#define jpeg_quality_scaling	jQualityScaling
+#define jpeg_simple_progression	jSimProgress
+#define jpeg_suppress_tables	jSuppressTables
+#define jpeg_alloc_quant_table	jAlcQTable
+#define jpeg_alloc_huff_table	jAlcHTable
+#define jpeg_start_compress	jStrtCompress
+#define jpeg_write_scanlines	jWrtScanlines
+#define jpeg_finish_compress	jFinCompress
+#define jpeg_calc_jpeg_dimensions	jCjpegDimensions
+#define jpeg_write_raw_data	jWrtRawData
+#define jpeg_write_marker	jWrtMarker
+#define jpeg_write_m_header	jWrtMHeader
+#define jpeg_write_m_byte	jWrtMByte
+#define jpeg_write_tables	jWrtTables
+#define jpeg_read_header	jReadHeader
+#define jpeg_start_decompress	jStrtDecompress
+#define jpeg_read_scanlines	jReadScanlines
+#define jpeg_finish_decompress	jFinDecompress
+#define jpeg_read_raw_data	jReadRawData
+#define jpeg_has_multiple_scans	jHasMultScn
+#define jpeg_start_output	jStrtOutput
+#define jpeg_finish_output	jFinOutput
+#define jpeg_input_complete	jInComplete
+#define jpeg_new_colormap	jNewCMap
+#define jpeg_consume_input	jConsumeInput
+#define jpeg_core_output_dimensions	jCoreDimensions
+#define jpeg_calc_output_dimensions	jCalcDimensions
+#define jpeg_save_markers	jSaveMarkers
+#define jpeg_set_marker_processor	jSetMarker
+#define jpeg_read_coefficients	jReadCoefs
+#define jpeg_write_coefficients	jWrtCoefs
+#define jpeg_copy_critical_parameters	jCopyCrit
+#define jpeg_abort_compress	jAbrtCompress
+#define jpeg_abort_decompress	jAbrtDecompress
+#define jpeg_abort		jAbort
+#define jpeg_destroy		jDestroy
+#define jpeg_resync_to_restart	jResyncRestart
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/* Default error-management setup */
+EXTERN(struct jpeg_error_mgr *) jpeg_std_error
+	JPP((struct jpeg_error_mgr * err));
+
+/* Initialization of JPEG compression objects.
+ * jpeg_create_compress() and jpeg_create_decompress() are the exported
+ * names that applications should call.  These expand to calls on
+ * jpeg_CreateCompress and jpeg_CreateDecompress with additional information
+ * passed for version mismatch checking.
+ * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
+ */
+#define jpeg_create_compress(cinfo) \
+    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
+			(size_t) sizeof(struct jpeg_compress_struct))
+#define jpeg_create_decompress(cinfo) \
+    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
+			  (size_t) sizeof(struct jpeg_decompress_struct))
+EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
+				      int version, size_t structsize));
+EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
+					int version, size_t structsize));
+/* Destruction of JPEG compression objects */
+EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
+
+/* Standard data source and destination managers: stdio streams. */
+/* Caller is responsible for opening the file before and closing after. */
+EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
+EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
+
+/* Data source and destination managers: memory buffers. */
+EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
+			       unsigned char ** outbuffer,
+			       unsigned long * outsize));
+EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
+			      unsigned char * inbuffer,
+			      unsigned long insize));
+
+/* Default parameter setup for compression */
+EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
+/* Compression parameter setup aids */
+EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
+				      J_COLOR_SPACE colorspace));
+EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
+				   boolean force_baseline));
+EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
+					  int scale_factor,
+					  boolean force_baseline));
+EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
+				       boolean force_baseline));
+EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
+				       const unsigned int *basic_table,
+				       int scale_factor,
+				       boolean force_baseline));
+EXTERN(int) jpeg_quality_scaling JPP((int quality));
+EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
+				       boolean suppress));
+EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
+EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
+
+/* Main entry points for compression */
+EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
+				      boolean write_all_tables));
+EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
+					     JSAMPARRAY scanlines,
+					     JDIMENSION num_lines));
+EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
+
+/* Precalculate JPEG dimensions for current compression parameters. */
+EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
+
+/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
+EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
+					    JSAMPIMAGE data,
+					    JDIMENSION num_lines));
+
+/* Write a special marker.  See libjpeg.txt concerning safe usage. */
+EXTERN(void) jpeg_write_marker
+	JPP((j_compress_ptr cinfo, int marker,
+	     const JOCTET * dataptr, unsigned int datalen));
+/* Same, but piecemeal. */
+EXTERN(void) jpeg_write_m_header
+	JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
+EXTERN(void) jpeg_write_m_byte
+	JPP((j_compress_ptr cinfo, int val));
+
+/* Alternate compression function: just write an abbreviated table file */
+EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
+
+/* Decompression startup: read start of JPEG datastream to see what's there */
+EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
+				  boolean require_image));
+/* Return value is one of: */
+#define JPEG_SUSPENDED		0 /* Suspended due to lack of input data */
+#define JPEG_HEADER_OK		1 /* Found valid image datastream */
+#define JPEG_HEADER_TABLES_ONLY	2 /* Found valid table-specs-only datastream */
+/* If you pass require_image = TRUE (normal case), you need not check for
+ * a TABLES_ONLY return code; an abbreviated file will cause an error exit.
+ * JPEG_SUSPENDED is only possible if you use a data source module that can
+ * give a suspension return (the stdio source module doesn't).
+ */
+
+/* Main entry points for decompression */
+EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
+					    JSAMPARRAY scanlines,
+					    JDIMENSION max_lines));
+EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
+
+/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
+EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
+					   JSAMPIMAGE data,
+					   JDIMENSION max_lines));
+
+/* Additional entry points for buffered-image mode. */
+EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
+EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
+				       int scan_number));
+EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
+EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
+EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
+/* Return value is one of: */
+/* #define JPEG_SUSPENDED	0    Suspended due to lack of input data */
+#define JPEG_REACHED_SOS	1 /* Reached start of new scan */
+#define JPEG_REACHED_EOI	2 /* Reached end of image */
+#define JPEG_ROW_COMPLETED	3 /* Completed one iMCU row */
+#define JPEG_SCAN_COMPLETED	4 /* Completed last iMCU row of a scan */
+
+/* Precalculate output dimensions for current decompression parameters. */
+EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
+
+/* Control saving of COM and APPn markers into marker_list. */
+EXTERN(void) jpeg_save_markers
+	JPP((j_decompress_ptr cinfo, int marker_code,
+	     unsigned int length_limit));
+
+/* Install a special processing method for COM or APPn markers. */
+EXTERN(void) jpeg_set_marker_processor
+	JPP((j_decompress_ptr cinfo, int marker_code,
+	     jpeg_marker_parser_method routine));
+
+/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
+EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
+					  jvirt_barray_ptr * coef_arrays));
+EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
+						j_compress_ptr dstinfo));
+
+/* If you choose to abort compression or decompression before completing
+ * jpeg_finish_(de)compress, then you need to clean up to release memory,
+ * temporary files, etc.  You can just call jpeg_destroy_(de)compress
+ * if you're done with the JPEG object, but if you want to clean it up and
+ * reuse it, call this:
+ */
+EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
+
+/* Generic versions of jpeg_abort and jpeg_destroy that work on either
+ * flavor of JPEG object.  These may be more convenient in some places.
+ */
+EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
+EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
+
+/* Default restart-marker-resync procedure for use by data source modules */
+EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
+					    int desired));
+
+
+/* These marker codes are exported since applications and data source modules
+ * are likely to want to use them.
+ */
+
+#define JPEG_RST0	0xD0	/* RST0 marker code */
+#define JPEG_EOI	0xD9	/* EOI marker code */
+#define JPEG_APP0	0xE0	/* APP0 marker code */
+#define JPEG_COM	0xFE	/* COM marker code */
+
+
+/* If we have a brain-damaged compiler that emits warnings (or worse, errors)
+ * for structure definitions that are never filled in, keep it quiet by
+ * supplying dummy definitions for the various substructures.
+ */
+
+#ifdef INCOMPLETE_TYPES_BROKEN
+#ifndef JPEG_INTERNALS		/* will be defined in jpegint.h */
+struct jvirt_sarray_control { long dummy; };
+struct jvirt_barray_control { long dummy; };
+struct jpeg_comp_master { long dummy; };
+struct jpeg_c_main_controller { long dummy; };
+struct jpeg_c_prep_controller { long dummy; };
+struct jpeg_c_coef_controller { long dummy; };
+struct jpeg_marker_writer { long dummy; };
+struct jpeg_color_converter { long dummy; };
+struct jpeg_downsampler { long dummy; };
+struct jpeg_forward_dct { long dummy; };
+struct jpeg_entropy_encoder { long dummy; };
+struct jpeg_decomp_master { long dummy; };
+struct jpeg_d_main_controller { long dummy; };
+struct jpeg_d_coef_controller { long dummy; };
+struct jpeg_d_post_controller { long dummy; };
+struct jpeg_input_controller { long dummy; };
+struct jpeg_marker_reader { long dummy; };
+struct jpeg_entropy_decoder { long dummy; };
+struct jpeg_inverse_dct { long dummy; };
+struct jpeg_upsampler { long dummy; };
+struct jpeg_color_deconverter { long dummy; };
+struct jpeg_color_quantizer { long dummy; };
+#endif /* JPEG_INTERNALS */
+#endif /* INCOMPLETE_TYPES_BROKEN */
+
+
+/*
+ * The JPEG library modules define JPEG_INTERNALS before including this file.
+ * The internal structure declarations are read only when that is true.
+ * Applications using the library should not include jpegint.h, but may wish
+ * to include jerror.h.
+ */
+
+#ifdef JPEG_INTERNALS
+#include "jpegint.h"		/* fetch private declarations */
+#include "jerror.h"		/* fetch error codes too */
+#endif
+
+#ifdef __cplusplus
+#ifndef DONT_USE_EXTERN_C
+}
+#endif
+#endif
+
+#endif /* JPEGLIB_H */

Copied: branches/branch-3.0/include/fltk3jpeg/jversion.h (from rev 8987, branches/branch-3.0/jpeg/jversion.h)
===================================================================
--- branches/branch-3.0/include/fltk3jpeg/jversion.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3jpeg/jversion.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,14 @@
+/*
+ * jversion.h
+ *
+ * Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains software version identification.
+ */
+
+
+#define JVERSION	"8c  16-Jan-2011"
+
+#define JCOPYRIGHT	"Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding"

Copied: branches/branch-3.0/include/fltk3png/png.h (from rev 8987, branches/branch-3.0/png/png.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/png.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/png.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2588 @@
+
+/* png.h - header file for PNG reference library
+ *
+ * libpng version 1.5.4 - July 7, 2011
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * This code is released under the libpng license (See LICENSE, below)
+ *
+ * Authors and maintainers:
+ *   libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
+ *   libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
+ *   libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011: Glenn
+ *   See also "Contributing Authors", below.
+ *
+ * Note about libpng version numbers:
+ *
+ *   Due to various miscommunications, unforeseen code incompatibilities
+ *   and occasional factors outside the authors' control, version numbering
+ *   on the library has not always been consistent and straightforward.
+ *   The following table summarizes matters since version 0.89c, which was
+ *   the first widely used release:
+ *
+ *    source                 png.h  png.h  shared-lib
+ *    version                string   int  version
+ *    -------                ------ -----  ----------
+ *    0.89c "1.0 beta 3"     0.89      89  1.0.89
+ *    0.90  "1.0 beta 4"     0.90      90  0.90  [should have been 2.0.90]
+ *    0.95  "1.0 beta 5"     0.95      95  0.95  [should have been 2.0.95]
+ *    0.96  "1.0 beta 6"     0.96      96  0.96  [should have been 2.0.96]
+ *    0.97b "1.00.97 beta 7" 1.00.97   97  1.0.1 [should have been 2.0.97]
+ *    0.97c                  0.97      97  2.0.97
+ *    0.98                   0.98      98  2.0.98
+ *    0.99                   0.99      98  2.0.99
+ *    0.99a-m                0.99      99  2.0.99
+ *    1.00                   1.00     100  2.1.0 [100 should be 10000]
+ *    1.0.0      (from here on, the   100  2.1.0 [100 should be 10000]
+ *    1.0.1       png.h string is   10001  2.1.0
+ *    1.0.1a-e    identical to the  10002  from here on, the shared library
+ *    1.0.2       source version)   10002  is 2.V where V is the source code
+ *    1.0.2a-b                      10003  version, except as noted.
+ *    1.0.3                         10003
+ *    1.0.3a-d                      10004
+ *    1.0.4                         10004
+ *    1.0.4a-f                      10005
+ *    1.0.5 (+ 2 patches)           10005
+ *    1.0.5a-d                      10006
+ *    1.0.5e-r                      10100 (not source compatible)
+ *    1.0.5s-v                      10006 (not binary compatible)
+ *    1.0.6 (+ 3 patches)           10006 (still binary incompatible)
+ *    1.0.6d-f                      10007 (still binary incompatible)
+ *    1.0.6g                        10007
+ *    1.0.6h                        10007  10.6h (testing xy.z so-numbering)
+ *    1.0.6i                        10007  10.6i
+ *    1.0.6j                        10007  2.1.0.6j (incompatible with 1.0.0)
+ *    1.0.7beta11-14        DLLNUM  10007  2.1.0.7beta11-14 (binary compatible)
+ *    1.0.7beta15-18           1    10007  2.1.0.7beta15-18 (binary compatible)
+ *    1.0.7rc1-2               1    10007  2.1.0.7rc1-2 (binary compatible)
+ *    1.0.7                    1    10007  (still compatible)
+ *    1.0.8beta1-4             1    10008  2.1.0.8beta1-4
+ *    1.0.8rc1                 1    10008  2.1.0.8rc1
+ *    1.0.8                    1    10008  2.1.0.8
+ *    1.0.9beta1-6             1    10009  2.1.0.9beta1-6
+ *    1.0.9rc1                 1    10009  2.1.0.9rc1
+ *    1.0.9beta7-10            1    10009  2.1.0.9beta7-10
+ *    1.0.9rc2                 1    10009  2.1.0.9rc2
+ *    1.0.9                    1    10009  2.1.0.9
+ *    1.0.10beta1              1    10010  2.1.0.10beta1
+ *    1.0.10rc1                1    10010  2.1.0.10rc1
+ *    1.0.10                   1    10010  2.1.0.10
+ *    1.0.11beta1-3            1    10011  2.1.0.11beta1-3
+ *    1.0.11rc1                1    10011  2.1.0.11rc1
+ *    1.0.11                   1    10011  2.1.0.11
+ *    1.0.12beta1-2            2    10012  2.1.0.12beta1-2
+ *    1.0.12rc1                2    10012  2.1.0.12rc1
+ *    1.0.12                   2    10012  2.1.0.12
+ *    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)
+ *    1.2.0beta1-2             2    10200  2.1.2.0beta1-2
+ *    1.2.0beta3-5             3    10200  3.1.2.0beta3-5
+ *    1.2.0rc1                 3    10200  3.1.2.0rc1
+ *    1.2.0                    3    10200  3.1.2.0
+ *    1.2.1beta1-4             3    10201  3.1.2.1beta1-4
+ *    1.2.1rc1-2               3    10201  3.1.2.1rc1-2
+ *    1.2.1                    3    10201  3.1.2.1
+ *    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6
+ *    1.0.13beta1             10    10013  10.so.0.1.0.13beta1
+ *    1.0.13rc1               10    10013  10.so.0.1.0.13rc1
+ *    1.2.2rc1                12    10202  12.so.0.1.2.2rc1
+ *    1.0.13                  10    10013  10.so.0.1.0.13
+ *    1.2.2                   12    10202  12.so.0.1.2.2
+ *    1.2.3rc1-6              12    10203  12.so.0.1.2.3rc1-6
+ *    1.2.3                   12    10203  12.so.0.1.2.3
+ *    1.2.4beta1-3            13    10204  12.so.0.1.2.4beta1-3
+ *    1.0.14rc1               13    10014  10.so.0.1.0.14rc1
+ *    1.2.4rc1                13    10204  12.so.0.1.2.4rc1
+ *    1.0.14                  10    10014  10.so.0.1.0.14
+ *    1.2.4                   13    10204  12.so.0.1.2.4
+ *    1.2.5beta1-2            13    10205  12.so.0.1.2.5beta1-2
+ *    1.0.15rc1-3             10    10015  10.so.0.1.0.15rc1-3
+ *    1.2.5rc1-3              13    10205  12.so.0.1.2.5rc1-3
+ *    1.0.15                  10    10015  10.so.0.1.0.15
+ *    1.2.5                   13    10205  12.so.0.1.2.5
+ *    1.2.6beta1-4            13    10206  12.so.0.1.2.6beta1-4
+ *    1.0.16                  10    10016  10.so.0.1.0.16
+ *    1.2.6                   13    10206  12.so.0.1.2.6
+ *    1.2.7beta1-2            13    10207  12.so.0.1.2.7beta1-2
+ *    1.0.17rc1               10    10017  12.so.0.1.0.17rc1
+ *    1.2.7rc1                13    10207  12.so.0.1.2.7rc1
+ *    1.0.17                  10    10017  12.so.0.1.0.17
+ *    1.2.7                   13    10207  12.so.0.1.2.7
+ *    1.2.8beta1-5            13    10208  12.so.0.1.2.8beta1-5
+ *    1.0.18rc1-5             10    10018  12.so.0.1.0.18rc1-5
+ *    1.2.8rc1-5              13    10208  12.so.0.1.2.8rc1-5
+ *    1.0.18                  10    10018  12.so.0.1.0.18
+ *    1.2.8                   13    10208  12.so.0.1.2.8
+ *    1.2.9beta1-3            13    10209  12.so.0.1.2.9beta1-3
+ *    1.2.9beta4-11           13    10209  12.so.0.9[.0]
+ *    1.2.9rc1                13    10209  12.so.0.9[.0]
+ *    1.2.9                   13    10209  12.so.0.9[.0]
+ *    1.2.10beta1-7           13    10210  12.so.0.10[.0]
+ *    1.2.10rc1-2             13    10210  12.so.0.10[.0]
+ *    1.2.10                  13    10210  12.so.0.10[.0]
+ *    1.4.0beta1-5            14    10400  14.so.0.0[.0]
+ *    1.2.11beta1-4           13    10211  12.so.0.11[.0]
+ *    1.4.0beta7-8            14    10400  14.so.0.0[.0]
+ *    1.2.11                  13    10211  12.so.0.11[.0]
+ *    1.2.12                  13    10212  12.so.0.12[.0]
+ *    1.4.0beta9-14           14    10400  14.so.0.0[.0]
+ *    1.2.13                  13    10213  12.so.0.13[.0]
+ *    1.4.0beta15-36          14    10400  14.so.0.0[.0]
+ *    1.4.0beta37-87          14    10400  14.so.14.0[.0]
+ *    1.4.0rc01               14    10400  14.so.14.0[.0]
+ *    1.4.0beta88-109         14    10400  14.so.14.0[.0]
+ *    1.4.0rc02-08            14    10400  14.so.14.0[.0]
+ *    1.4.0                   14    10400  14.so.14.0[.0]
+ *    1.4.1beta01-03          14    10401  14.so.14.1[.0]
+ *    1.4.1rc01               14    10401  14.so.14.1[.0]
+ *    1.4.1beta04-12          14    10401  14.so.14.1[.0]
+ *    1.4.1                   14    10401  14.so.14.1[.0]
+ *    1.4.2                   14    10402  14.so.14.2[.0]
+ *    1.4.3                   14    10403  14.so.14.3[.0]
+ *    1.4.4                   14    10404  14.so.14.4[.0]
+ *    1.5.0beta01-58          15    10500  15.so.15.0[.0]
+ *    1.5.0rc01-07            15    10500  15.so.15.0[.0]
+ *    1.5.0                   15    10500  15.so.15.0[.0]
+ *    1.5.1beta01-11          15    10501  15.so.15.1[.0]
+ *    1.5.1rc01-02            15    10501  15.so.15.1[.0]
+ *    1.5.1                   15    10501  15.so.15.1[.0]
+ *    1.5.2beta01-03          15    10502  15.so.15.2[.0]
+ *    1.5.2rc01-03            15    10502  15.so.15.2[.0]
+ *    1.5.2                   15    10502  15.so.15.2[.0]
+ *    1.5.3beta01-10          15    10503  15.so.15.3[.0]
+ *    1.5.3rc01-02            15    10503  15.so.15.3[.0]
+ *    1.5.3beta11             15    10503  15.so.15.3[.0]
+ *    1.5.3 [omitted]
+ *    1.5.4beta01-08          15    10504  15.so.15.4[.0]
+ *    1.5.4rc01               15    10504  15.so.15.4[.0]
+ *    1.5.4                   15    10504  15.so.15.4[.0]
+ *
+ *   Henceforth the source version will match the shared-library major
+ *   and minor numbers; the shared-library major version number will be
+ *   used for changes in backward compatibility, as it is intended.  The
+ *   PNG_LIBPNG_VER macro, which is not used within libpng but is available
+ *   for applications, is an unsigned integer of the form xyyzz corresponding
+ *   to the source version x.y.z (leading zeros in y and z).  Beta versions
+ *   were given the previous public release number plus a letter, until
+ *   version 1.0.6j; from then on they were given the upcoming public
+ *   release number plus "betaNN" or "rcN".
+ *
+ *   Binary incompatibility exists only when applications make direct access
+ *   to the info_ptr or png_ptr members through png.h, and the compiled
+ *   application is loaded with a different version of the library.
+ *
+ *   DLLNUM will change each time there are forward or backward changes
+ *   in binary compatibility (e.g., when a new feature is added).
+ *
+ * See libpng-manual.txt or libpng.3 for more information.  The PNG
+ * specification is available as a W3C Recommendation and as an ISO
+ * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/
+ */
+
+/*
+ * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+ *
+ * If you modify libpng you may insert additional notices immediately following
+ * this sentence.
+ *
+ * This code is released under the libpng license.
+ *
+ * libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
+ * Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
+ * distributed according to the same disclaimer and license as libpng-1.2.5
+ * with the following individual added to the list of Contributing Authors:
+ *
+ *    Cosmin Truta
+ *
+ * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
+ * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
+ * distributed according to the same disclaimer and license as libpng-1.0.6
+ * with the following individuals added to the list of Contributing Authors:
+ *
+ *    Simon-Pierre Cadieux
+ *    Eric S. Raymond
+ *    Gilles Vollant
+ *
+ * and with the following additions to the disclaimer:
+ *
+ *    There is no warranty against interference with your enjoyment of the
+ *    library or against infringement.  There is no warranty that our
+ *    efforts or the library will fulfill any of your particular purposes
+ *    or needs.  This library is provided with all faults, and the entire
+ *    risk of satisfactory quality, performance, accuracy, and effort is with
+ *    the user.
+ *
+ * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+ * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are
+ * distributed according to the same disclaimer and license as libpng-0.96,
+ * with the following individuals added to the list of Contributing Authors:
+ *
+ *    Tom Lane
+ *    Glenn Randers-Pehrson
+ *    Willem van Schaik
+ *
+ * libpng versions 0.89, June 1996, through 0.96, May 1997, are
+ * Copyright (c) 1996, 1997 Andreas Dilger
+ * Distributed according to the same disclaimer and license as libpng-0.88,
+ * with the following individuals added to the list of Contributing Authors:
+ *
+ *    John Bowler
+ *    Kevin Bracey
+ *    Sam Bushell
+ *    Magnus Holmgren
+ *    Greg Roelofs
+ *    Tom Tanner
+ *
+ * libpng versions 0.5, May 1995, through 0.88, January 1996, are
+ * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+ *
+ * For the purposes of this copyright and license, "Contributing Authors"
+ * is defined as the following set of individuals:
+ *
+ *    Andreas Dilger
+ *    Dave Martindale
+ *    Guy Eric Schalnat
+ *    Paul Schmidt
+ *    Tim Wegner
+ *
+ * The PNG Reference Library is supplied "AS IS".  The Contributing Authors
+ * and Group 42, Inc. disclaim all warranties, expressed or implied,
+ * including, without limitation, the warranties of merchantability and of
+ * fitness for any purpose.  The Contributing Authors and Group 42, Inc.
+ * assume no liability for direct, indirect, incidental, special, exemplary,
+ * or consequential damages, which may result from the use of the PNG
+ * Reference Library, even if advised of the possibility of such damage.
+ *
+ * Permission is hereby granted to use, copy, modify, and distribute this
+ * source code, or portions hereof, for any purpose, without fee, subject
+ * to the following restrictions:
+ *
+ *   1. The origin of this source code must not be misrepresented.
+ *
+ *   2. Altered versions must be plainly marked as such and must not
+ *      be misrepresented as being the original source.
+ *
+ *   3. This Copyright notice may not be removed or altered from
+ *      any source or altered source distribution.
+ *
+ * The Contributing Authors and Group 42, Inc. specifically permit, without
+ * fee, and encourage the use of this source code as a component to
+ * supporting the PNG file format in commercial products.  If you use this
+ * source code in a product, acknowledgment is not required but would be
+ * appreciated.
+ */
+
+/*
+ * A "png_get_copyright" function is available, for convenient use in "about"
+ * boxes and the like:
+ *
+ *     printf("%s", png_get_copyright(NULL));
+ *
+ * Also, the PNG logo (in PNG format, of course) is supplied in the
+ * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
+ */
+
+/*
+ * Libpng is OSI Certified Open Source Software.  OSI Certified is a
+ * certification mark of the Open Source Initiative.
+ */
+
+/*
+ * The contributing authors would like to thank all those who helped
+ * with testing, bug fixes, and patience.  This wouldn't have been
+ * possible without all of you.
+ *
+ * Thanks to Frank J. T. Wojcik for helping with the documentation.
+ */
+
+/*
+ * Y2K compliance in libpng:
+ * =========================
+ *
+ *    July 7, 2011
+ *
+ *    Since the PNG Development group is an ad-hoc body, we can't make
+ *    an official declaration.
+ *
+ *    This is your unofficial assurance that libpng from version 0.71 and
+ *    upward through 1.5.4 are Y2K compliant.  It is my belief that
+ *    earlier versions were also Y2K compliant.
+ *
+ *    Libpng only has two year fields.  One is a 2-byte unsigned integer
+ *    that will hold years up to 65535.  The other holds the date in text
+ *    format, and will hold years up to 9999.
+ *
+ *    The integer is
+ *        "png_uint_16 year" in png_time_struct.
+ *
+ *    The string is
+ *        "png_char time_buffer" in png_struct
+ *
+ *    There are seven time-related functions:
+ *        png.c: png_convert_to_rfc_1123() in png.c
+ *          (formerly png_convert_to_rfc_1152() in error)
+ *        png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
+ *        png_convert_from_time_t() in pngwrite.c
+ *        png_get_tIME() in pngget.c
+ *        png_handle_tIME() in pngrutil.c, called in pngread.c
+ *        png_set_tIME() in pngset.c
+ *        png_write_tIME() in pngwutil.c, called in pngwrite.c
+ *
+ *    All handle dates properly in a Y2K environment.  The
+ *    png_convert_from_time_t() function calls gmtime() to convert from system
+ *    clock time, which returns (year - 1900), which we properly convert to
+ *    the full 4-digit year.  There is a possibility that applications using
+ *    libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
+ *    function, or that they are incorrectly passing only a 2-digit year
+ *    instead of "year - 1900" into the png_convert_from_struct_tm() function,
+ *    but this is not under our control.  The libpng documentation has always
+ *    stated that it works with 4-digit years, and the APIs have been
+ *    documented as such.
+ *
+ *    The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
+ *    integer to hold the year, and can hold years as large as 65535.
+ *
+ *    zlib, upon which libpng depends, is also Y2K compliant.  It contains
+ *    no date-related code.
+ *
+ *       Glenn Randers-Pehrson
+ *       libpng maintainer
+ *       PNG Development Group
+ */
+
+#ifndef PNG_H
+#define PNG_H
+
+/* This is not the place to learn how to use libpng. The file libpng-manual.txt
+ * describes how to use libpng, and the file example.c summarizes it
+ * with some code on which to build.  This file is useful for looking
+ * at the actual function definitions and structure components.
+ */
+
+/* Version information for png.h - this should match the version in png.c */
+#define PNG_LIBPNG_VER_STRING "1.5.4"
+#define PNG_HEADER_VERSION_STRING \
+     " libpng version 1.5.4 - July 7, 2011\n"
+
+#define PNG_LIBPNG_VER_SONUM   15
+#define PNG_LIBPNG_VER_DLLNUM  15
+
+/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
+#define PNG_LIBPNG_VER_MAJOR   1
+#define PNG_LIBPNG_VER_MINOR   5
+#define PNG_LIBPNG_VER_RELEASE 4
+/* This should match the numeric part of the final component of
+ * PNG_LIBPNG_VER_STRING, omitting any leading zero:
+ */
+
+#define PNG_LIBPNG_VER_BUILD  0
+
+/* Release Status */
+#define PNG_LIBPNG_BUILD_ALPHA    1
+#define PNG_LIBPNG_BUILD_BETA     2
+#define PNG_LIBPNG_BUILD_RC       3
+#define PNG_LIBPNG_BUILD_STABLE   4
+#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
+
+/* Release-Specific Flags */
+#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with
+                                       PNG_LIBPNG_BUILD_STABLE only */
+#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with
+                                       PNG_LIBPNG_BUILD_SPECIAL */
+#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
+                                       PNG_LIBPNG_BUILD_PRIVATE */
+
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
+
+/* Careful here.  At one time, Guy wanted to use 082, but that would be octal.
+ * We must not include leading zeros.
+ * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
+ * version 1.0.0 was mis-numbered 100 instead of 10000).  From
+ * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release
+ */
+#define PNG_LIBPNG_VER 10504 /* 1.5.4 */
+
+/* Library configuration: these options cannot be changed after
+ * the library has been built.
+ */
+#ifndef PNGLCONF_H
+    /* If pnglibconf.h is missing, you can
+     * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h
+     */
+#   include "pnglibconf.h"
+#endif
+
+#ifndef PNG_VERSION_INFO_ONLY
+#  ifndef PNG_BUILDING_SYMBOL_TABLE
+  /*
+   *   Standard header files (not needed for the version info or while
+   *   building symbol table -- see scripts/pnglibconf.dfa)
+   */
+#    ifdef PNG_SETJMP_SUPPORTED
+#      include <setjmp.h>
+#    endif
+
+    /* Need the time information for converting tIME chunks, it
+     * defines struct tm:
+     */
+#    ifdef PNG_CONVERT_tIME_SUPPORTED
+       /* "time.h" functions are not supported on all operating systems */
+#      include <time.h>
+#    endif
+#  endif
+
+/* Machine specific configuration. */
+#  include "pngconf.h"
+#endif
+
+/*
+ * Added at libpng-1.2.8
+ *
+ * Ref MSDN: Private as priority over Special
+ * VS_FF_PRIVATEBUILD File *was not* built using standard release
+ * procedures. If this value is given, the StringFileInfo block must
+ * contain a PrivateBuild string.
+ *
+ * VS_FF_SPECIALBUILD File *was* built by the original company using
+ * standard release procedures but is a variation of the standard
+ * file of the same version number. If this value is given, the
+ * StringFileInfo block must contain a SpecialBuild string.
+ */
+
+#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */
+#  define PNG_LIBPNG_BUILD_TYPE \
+       (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
+#else
+#  ifdef PNG_LIBPNG_SPECIALBUILD
+#    define PNG_LIBPNG_BUILD_TYPE \
+         (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
+#  else
+#    define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
+#  endif
+#endif
+
+#ifndef PNG_VERSION_INFO_ONLY
+
+/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Version information for C files, stored in png.c.  This had better match
+ * the version above.
+ */
+#define png_libpng_ver png_get_header_ver(NULL)
+
+/* This file is arranged in several sections:
+ *
+ * 1. Any configuration options that can be specified by for the application
+ *    code when it is built.  (Build time configuration is in pnglibconf.h)
+ * 2. Type definitions (base types are defined in pngconf.h), structure
+ *    definitions.
+ * 3. Exported library functions.
+ *
+ * The library source code has additional files (principally pngpriv.h) that
+ * allow configuration of the library.
+ */
+/* Section 1: run time configuration
+ * See pnglibconf.h for build time configuration
+ *
+ * Run time configuration allows the application to choose between
+ * implementations of certain arithmetic APIs.  The default is set
+ * at build time and recorded in pnglibconf.h, but it is safe to
+ * override these (and only these) settings.  Note that this won't
+ * change what the library does, only application code, and the
+ * settings can (and probably should) be made on a per-file basis
+ * by setting the #defines before including png.h
+ *
+ * Use macros to read integers from PNG data or use the exported
+ * functions?
+ *   PNG_USE_READ_MACROS: use the macros (see below)  Note that
+ *     the macros evaluate their argument multiple times.
+ *   PNG_NO_USE_READ_MACROS: call the relevant library function.
+ *
+ * Use the alternative algorithm for compositing alpha samples that
+ * does not use division?
+ *   PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division'
+ *      algorithm.
+ *   PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm.
+ *
+ * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is
+ * false?
+ *   PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error
+ *      APIs to png_warning.
+ * Otherwise the calls are mapped to png_error.
+ */
+
+/* Section 2: type definitions, including structures and compile time
+ * constants.
+ * See pngconf.h for base types that vary by machine/system
+ */
+
+/* This triggers a compiler error in png.c, if png.c and png.h
+ * do not agree upon the version number.
+ */
+typedef char* png_libpng_version_1_5_4;
+
+/* Three color definitions.  The order of the red, green, and blue, (and the
+ * exact size) is not important, although the size of the fields need to
+ * be png_byte or png_uint_16 (as defined below).
+ */
+typedef struct png_color_struct
+{
+   png_byte red;
+   png_byte green;
+   png_byte blue;
+} png_color;
+typedef png_color FAR * png_colorp;
+typedef PNG_CONST png_color FAR * png_const_colorp;
+typedef png_color FAR * FAR * png_colorpp;
+
+typedef struct png_color_16_struct
+{
+   png_byte index;    /* used for palette files */
+   png_uint_16 red;   /* for use in red green blue files */
+   png_uint_16 green;
+   png_uint_16 blue;
+   png_uint_16 gray;  /* for use in grayscale files */
+} png_color_16;
+typedef png_color_16 FAR * png_color_16p;
+typedef PNG_CONST png_color_16 FAR * png_const_color_16p;
+typedef png_color_16 FAR * FAR * png_color_16pp;
+
+typedef struct png_color_8_struct
+{
+   png_byte red;   /* for use in red green blue files */
+   png_byte green;
+   png_byte blue;
+   png_byte gray;  /* for use in grayscale files */
+   png_byte alpha; /* for alpha channel files */
+} png_color_8;
+typedef png_color_8 FAR * png_color_8p;
+typedef PNG_CONST png_color_8 FAR * png_const_color_8p;
+typedef png_color_8 FAR * FAR * png_color_8pp;
+
+/*
+ * The following two structures are used for the in-core representation
+ * of sPLT chunks.
+ */
+typedef struct png_sPLT_entry_struct
+{
+   png_uint_16 red;
+   png_uint_16 green;
+   png_uint_16 blue;
+   png_uint_16 alpha;
+   png_uint_16 frequency;
+} png_sPLT_entry;
+typedef png_sPLT_entry FAR * png_sPLT_entryp;
+typedef PNG_CONST png_sPLT_entry FAR * png_const_sPLT_entryp;
+typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;
+
+/*  When the depth of the sPLT palette is 8 bits, the color and alpha samples
+ *  occupy the LSB of their respective members, and the MSB of each member
+ *  is zero-filled.  The frequency member always occupies the full 16 bits.
+ */
+
+typedef struct png_sPLT_struct
+{
+   png_charp name;           /* palette name */
+   png_byte depth;           /* depth of palette samples */
+   png_sPLT_entryp entries;  /* palette entries */
+   png_int_32 nentries;      /* number of palette entries */
+} png_sPLT_t;
+typedef png_sPLT_t FAR * png_sPLT_tp;
+typedef PNG_CONST png_sPLT_t FAR * png_const_sPLT_tp;
+typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
+
+#ifdef PNG_TEXT_SUPPORTED
+/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
+ * and whether that contents is compressed or not.  The "key" field
+ * points to a regular zero-terminated C string.  The "text", "lang", and
+ * "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
+ * However, the structure returned by png_get_text() will always contain
+ * regular zero-terminated C strings (possibly empty), never NULL pointers,
+ * so they can be safely used in printf() and other string-handling functions.
+ */
+typedef struct png_text_struct
+{
+   int  compression;       /* compression value:
+                             -1: tEXt, none
+                              0: zTXt, deflate
+                              1: iTXt, none
+                              2: iTXt, deflate  */
+   png_charp key;          /* keyword, 1-79 character description of "text" */
+   png_charp text;         /* comment, may be an empty string (ie "")
+                              or a NULL pointer */
+   png_size_t text_length; /* length of the text string */
+   png_size_t itxt_length; /* length of the itxt string */
+   png_charp lang;         /* language code, 0-79 characters
+                              or a NULL pointer */
+   png_charp lang_key;     /* keyword translated UTF-8 string, 0 or more
+                              chars or a NULL pointer */
+} png_text;
+typedef png_text FAR * png_textp;
+typedef PNG_CONST png_text FAR * png_const_textp;
+typedef png_text FAR * FAR * png_textpp;
+#endif
+
+/* Supported compression types for text in PNG files (tEXt, and zTXt).
+ * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */
+#define PNG_TEXT_COMPRESSION_NONE_WR -3
+#define PNG_TEXT_COMPRESSION_zTXt_WR -2
+#define PNG_TEXT_COMPRESSION_NONE    -1
+#define PNG_TEXT_COMPRESSION_zTXt     0
+#define PNG_ITXT_COMPRESSION_NONE     1
+#define PNG_ITXT_COMPRESSION_zTXt     2
+#define PNG_TEXT_COMPRESSION_LAST     3  /* Not a valid value */
+
+/* png_time is a way to hold the time in an machine independent way.
+ * Two conversions are provided, both from time_t and struct tm.  There
+ * is no portable way to convert to either of these structures, as far
+ * as I know.  If you know of a portable way, send it to me.  As a side
+ * note - PNG has always been Year 2000 compliant!
+ */
+typedef struct png_time_struct
+{
+   png_uint_16 year; /* full year, as in, 1995 */
+   png_byte month;   /* month of year, 1 - 12 */
+   png_byte day;     /* day of month, 1 - 31 */
+   png_byte hour;    /* hour of day, 0 - 23 */
+   png_byte minute;  /* minute of hour, 0 - 59 */
+   png_byte second;  /* second of minute, 0 - 60 (for leap seconds) */
+} png_time;
+typedef png_time FAR * png_timep;
+typedef PNG_CONST png_time FAR * png_const_timep;
+typedef png_time FAR * FAR * png_timepp;
+
+#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
+    defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+/* png_unknown_chunk is a structure to hold queued chunks for which there is
+ * no specific support.  The idea is that we can use this to queue
+ * up private chunks for output even though the library doesn't actually
+ * know about their semantics.
+ */
+typedef struct png_unknown_chunk_t
+{
+    png_byte name[5];
+    png_byte *data;
+    png_size_t size;
+
+    /* libpng-using applications should NOT directly modify this byte. */
+    png_byte location; /* mode of operation at read time */
+}
+
+
+png_unknown_chunk;
+typedef png_unknown_chunk FAR * png_unknown_chunkp;
+typedef PNG_CONST png_unknown_chunk FAR * png_const_unknown_chunkp;
+typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
+#endif
+
+/* Values for the unknown chunk location byte */
+
+#define PNG_HAVE_IHDR  0x01
+#define PNG_HAVE_PLTE  0x02
+#define PNG_AFTER_IDAT 0x08
+
+/* The complete definition of png_info has, as of libpng-1.5.0,
+ * been moved into a separate header file that is not accessible to
+ * applications.  Read libpng-manual.txt or libpng.3 for more info.
+ */
+typedef struct png_info_def png_info;
+typedef png_info FAR * png_infop;
+typedef PNG_CONST png_info FAR * png_const_infop;
+typedef png_info FAR * FAR * png_infopp;
+
+/* Maximum positive integer used in PNG is (2^31)-1 */
+#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
+#define PNG_UINT_32_MAX ((png_uint_32)(-1))
+#define PNG_SIZE_MAX ((png_size_t)(-1))
+
+/* These are constants for fixed point values encoded in the
+ * PNG specification manner (x100000)
+ */
+#define PNG_FP_1    100000
+#define PNG_FP_HALF  50000
+#define PNG_FP_MAX  ((png_fixed_point)0x7fffffffL)
+#define PNG_FP_MIN  (-PNG_FP_MAX)
+
+/* These describe the color_type field in png_info. */
+/* color type masks */
+#define PNG_COLOR_MASK_PALETTE    1
+#define PNG_COLOR_MASK_COLOR      2
+#define PNG_COLOR_MASK_ALPHA      4
+
+/* color types.  Note that not all combinations are legal */
+#define PNG_COLOR_TYPE_GRAY 0
+#define PNG_COLOR_TYPE_PALETTE  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)
+#define PNG_COLOR_TYPE_RGB        (PNG_COLOR_MASK_COLOR)
+#define PNG_COLOR_TYPE_RGB_ALPHA  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
+#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)
+/* aliases */
+#define PNG_COLOR_TYPE_RGBA  PNG_COLOR_TYPE_RGB_ALPHA
+#define PNG_COLOR_TYPE_GA  PNG_COLOR_TYPE_GRAY_ALPHA
+
+/* This is for compression type. PNG 1.0-1.2 only define the single type. */
+#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */
+#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE
+
+/* This is for filter type. PNG 1.0-1.2 only define the single type. */
+#define PNG_FILTER_TYPE_BASE      0 /* Single row per-byte filtering */
+#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */
+#define PNG_FILTER_TYPE_DEFAULT   PNG_FILTER_TYPE_BASE
+
+/* These are for the interlacing type.  These values should NOT be changed. */
+#define PNG_INTERLACE_NONE        0 /* Non-interlaced image */
+#define PNG_INTERLACE_ADAM7       1 /* Adam7 interlacing */
+#define PNG_INTERLACE_LAST        2 /* Not a valid value */
+
+/* These are for the oFFs chunk.  These values should NOT be changed. */
+#define PNG_OFFSET_PIXEL          0 /* Offset in pixels */
+#define PNG_OFFSET_MICROMETER     1 /* Offset in micrometers (1/10^6 meter) */
+#define PNG_OFFSET_LAST           2 /* Not a valid value */
+
+/* These are for the pCAL chunk.  These values should NOT be changed. */
+#define PNG_EQUATION_LINEAR       0 /* Linear transformation */
+#define PNG_EQUATION_BASE_E       1 /* Exponential base e transform */
+#define PNG_EQUATION_ARBITRARY    2 /* Arbitrary base exponential transform */
+#define PNG_EQUATION_HYPERBOLIC   3 /* Hyperbolic sine transformation */
+#define PNG_EQUATION_LAST         4 /* Not a valid value */
+
+/* These are for the sCAL chunk.  These values should NOT be changed. */
+#define PNG_SCALE_UNKNOWN         0 /* unknown unit (image scale) */
+#define PNG_SCALE_METER           1 /* meters per pixel */
+#define PNG_SCALE_RADIAN          2 /* radians per pixel */
+#define PNG_SCALE_LAST            3 /* Not a valid value */
+
+/* These are for the pHYs chunk.  These values should NOT be changed. */
+#define PNG_RESOLUTION_UNKNOWN    0 /* pixels/unknown unit (aspect ratio) */
+#define PNG_RESOLUTION_METER      1 /* pixels/meter */
+#define PNG_RESOLUTION_LAST       2 /* Not a valid value */
+
+/* These are for the sRGB chunk.  These values should NOT be changed. */
+#define PNG_sRGB_INTENT_PERCEPTUAL 0
+#define PNG_sRGB_INTENT_RELATIVE   1
+#define PNG_sRGB_INTENT_SATURATION 2
+#define PNG_sRGB_INTENT_ABSOLUTE   3
+#define PNG_sRGB_INTENT_LAST       4 /* Not a valid value */
+
+/* This is for text chunks */
+#define PNG_KEYWORD_MAX_LENGTH     79
+
+/* Maximum number of entries in PLTE/sPLT/tRNS arrays */
+#define PNG_MAX_PALETTE_LENGTH    256
+
+/* These determine if an ancillary chunk's data has been successfully read
+ * from the PNG header, or if the application has filled in the corresponding
+ * data in the info_struct to be written into the output file.  The values
+ * of the PNG_INFO_<chunk> defines should NOT be changed.
+ */
+#define PNG_INFO_gAMA 0x0001
+#define PNG_INFO_sBIT 0x0002
+#define PNG_INFO_cHRM 0x0004
+#define PNG_INFO_PLTE 0x0008
+#define PNG_INFO_tRNS 0x0010
+#define PNG_INFO_bKGD 0x0020
+#define PNG_INFO_hIST 0x0040
+#define PNG_INFO_pHYs 0x0080
+#define PNG_INFO_oFFs 0x0100
+#define PNG_INFO_tIME 0x0200
+#define PNG_INFO_pCAL 0x0400
+#define PNG_INFO_sRGB 0x0800   /* GR-P, 0.96a */
+#define PNG_INFO_iCCP 0x1000   /* ESR, 1.0.6 */
+#define PNG_INFO_sPLT 0x2000   /* ESR, 1.0.6 */
+#define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */
+#define PNG_INFO_IDAT 0x8000L  /* ESR, 1.0.6 */
+
+/* This is used for the transformation routines, as some of them
+ * change these values for the row.  It also should enable using
+ * the routines for other purposes.
+ */
+typedef struct png_row_info_struct
+{
+   png_uint_32 width;    /* width of row */
+   png_size_t rowbytes;  /* number of bytes in row */
+   png_byte color_type;  /* color type of row */
+   png_byte bit_depth;   /* bit depth of row */
+   png_byte channels;    /* number of channels (1, 2, 3, or 4) */
+   png_byte pixel_depth; /* bits per pixel (depth * channels) */
+} png_row_info;
+
+typedef png_row_info FAR * png_row_infop;
+typedef png_row_info FAR * FAR * png_row_infopp;
+
+/* The complete definition of png_struct has, as of libpng-1.5.0,
+ * been moved into a separate header file that is not accessible to
+ * applications.  Read libpng-manual.txt or libpng.3 for more info.
+ */
+typedef struct png_struct_def png_struct;
+typedef PNG_CONST png_struct FAR * png_const_structp;
+typedef png_struct FAR * png_structp;
+
+/* These are the function types for the I/O functions and for the functions
+ * that allow the user to override the default I/O functions with his or her
+ * own.  The png_error_ptr type should match that of user-supplied warning
+ * and error functions, while the png_rw_ptr type should match that of the
+ * user read/write data functions.  Note that the 'write' function must not
+ * modify the buffer it is passed. The 'read' function, on the other hand, is
+ * expected to return the read data in the buffer.
+ */
+typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));
+typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t));
+typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp));
+typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
+    int));
+typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32,
+    int));
+
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
+typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
+
+/* The following callback receives png_uint_32 row_number, int pass for the
+ * png_bytep data of the row.  When transforming an interlaced image the
+ * row number is the row number within the sub-image of the interlace pass, so
+ * the value will increase to the height of the sub-image (not the full image)
+ * then reset to 0 for the next pass.
+ *
+ * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to
+ * find the output pixel (x,y) given an interlaced sub-image pixel
+ * (row,col,pass).  (See below for these macros.)
+ */
+typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep,
+    png_uint_32, int));
+#endif
+
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
+    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop,
+    png_bytep));
+#endif
+
+#ifdef PNG_USER_CHUNKS_SUPPORTED
+typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
+    png_unknown_chunkp));
+#endif
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
+typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp));
+#endif
+
+#ifdef PNG_SETJMP_SUPPORTED
+/* This must match the function definition in <setjmp.h>, and the application
+ * must include this before png.h to obtain the definition of jmp_buf.  The
+ * function is required to be PNG_NORETURN, but this is not checked.  If the
+ * function does return the application will crash via an abort() or similar
+ * system level call.
+ *
+ * If you get a warning here while building the library you may need to make
+ * changes to ensure that pnglibconf.h records the calling convention used by
+ * your compiler.  This may be very difficult - try using a different compiler
+ * to build the library!
+ */
+PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
+#endif
+
+/* Transform masks for the high-level interface */
+#define PNG_TRANSFORM_IDENTITY       0x0000    /* read and write */
+#define PNG_TRANSFORM_STRIP_16       0x0001    /* read only */
+#define PNG_TRANSFORM_STRIP_ALPHA    0x0002    /* read only */
+#define PNG_TRANSFORM_PACKING        0x0004    /* read and write */
+#define PNG_TRANSFORM_PACKSWAP       0x0008    /* read and write */
+#define PNG_TRANSFORM_EXPAND         0x0010    /* read only */
+#define PNG_TRANSFORM_INVERT_MONO    0x0020    /* read and write */
+#define PNG_TRANSFORM_SHIFT          0x0040    /* read and write */
+#define PNG_TRANSFORM_BGR            0x0080    /* read and write */
+#define PNG_TRANSFORM_SWAP_ALPHA     0x0100    /* read and write */
+#define PNG_TRANSFORM_SWAP_ENDIAN    0x0200    /* read and write */
+#define PNG_TRANSFORM_INVERT_ALPHA   0x0400    /* read and write */
+#define PNG_TRANSFORM_STRIP_FILLER   0x0800    /* write only */
+/* Added to libpng-1.2.34 */
+#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER
+#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */
+/* Added to libpng-1.4.0 */
+#define PNG_TRANSFORM_GRAY_TO_RGB   0x2000      /* read only */
+/* Added to libpng-1.5.4 */
+#define PNG_TRANSFORM_EXPAND_16     0x4000      /* read only */
+#define PNG_TRANSFORM_SCALE_16      0x8000      /* read only */
+
+/* Flags for MNG supported features */
+#define PNG_FLAG_MNG_EMPTY_PLTE     0x01
+#define PNG_FLAG_MNG_FILTER_64      0x04
+#define PNG_ALL_MNG_FEATURES        0x05
+
+/* NOTE: prior to 1.5 these functions had no 'API' style declaration,
+ * this allowed the zlib default functions to be used on Windows
+ * platforms.  In 1.5 the zlib default malloc (which just calls malloc and
+ * ignores the first argument) should be completely compatible with the
+ * following.
+ */
+typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
+    png_alloc_size_t));
+typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp));
+
+typedef png_struct FAR * FAR * png_structpp;
+
+/* Section 3: exported functions
+ * Here are the function definitions most commonly used.  This is not
+ * the place to find out how to use libpng.  See libpng-manual.txt for the
+ * full explanation, see example.c for the summary.  This just provides
+ * a simple one line description of the use of each function.
+ *
+ * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in
+ * pngconf.h and in the *.dfn files in the scripts directory.
+ *
+ *   PNG_EXPORT(ordinal, type, name, (args));
+ *
+ *       ordinal:    ordinal that is used while building
+ *                   *.def files. The ordinal value is only
+ *                   relevant when preprocessing png.h with
+ *                   the *.dfn files for building symbol table
+ *                   entries, and are removed by pngconf.h.
+ *       type:       return type of the function
+ *       name:       function name
+ *       args:       function arguments, with types
+ *
+ * When we wish to append attributes to a function prototype we use
+ * the PNG_EXPORTA() macro instead.
+ *
+ *   PNG_EXPORTA(ordinal, type, name, (args), attributes);
+ *
+ *       ordinal, type, name, and args: same as in PNG_EXPORT().
+ *       attributes: function attributes
+ */
+
+/* Returns the version number of the library */
+PNG_EXPORT(1, png_uint_32, png_access_version_number, (void));
+
+/* Tell lib we have already handled the first <num_bytes> magic bytes.
+ * Handling more than 8 bytes from the beginning of the file is an error.
+ */
+PNG_EXPORT(2, void, png_set_sig_bytes, (png_structp png_ptr, int num_bytes));
+
+/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
+ * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG
+ * signature, and non-zero otherwise.  Having num_to_check == 0 or
+ * start > 7 will always fail (ie return non-zero).
+ */
+PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start,
+    png_size_t num_to_check));
+
+/* Simple signature checking function.  This is the same as calling
+ * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
+ */
+#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n))
+
+/* Allocate and initialize png_ptr struct for reading, and any other memory. */
+PNG_EXPORTA(4, png_structp, png_create_read_struct,
+    (png_const_charp user_png_ver, png_voidp error_ptr,
+    png_error_ptr error_fn, png_error_ptr warn_fn),
+    PNG_ALLOCATED);
+
+/* Allocate and initialize png_ptr struct for writing, and any other memory */
+PNG_EXPORTA(5, png_structp, png_create_write_struct,
+    (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
+    png_error_ptr warn_fn),
+    PNG_ALLOCATED);
+
+PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size,
+    (png_const_structp png_ptr));
+
+PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr,
+    png_size_t size));
+
+/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
+ * match up.
+ */
+#ifdef PNG_SETJMP_SUPPORTED
+/* This function returns the jmp_buf built in to *png_ptr.  It must be
+ * supplied with an appropriate 'longjmp' function to use on that jmp_buf
+ * unless the default error function is overridden in which case NULL is
+ * acceptable.  The size of the jmp_buf is checked against the actual size
+ * allocated by the library - the call will return NULL on a mismatch
+ * indicating an ABI mismatch.
+ */
+PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr,
+    png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
+#  define png_jmpbuf(png_ptr) \
+      (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
+#else
+#  define png_jmpbuf(png_ptr) \
+      (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
+#endif
+/* This function should be used by libpng applications in place of
+ * longjmp(png_ptr->jmpbuf, val).  If longjmp_fn() has been set, it
+ * will use it; otherwise it will call PNG_ABORT().  This function was
+ * added in libpng-1.5.0.
+ */
+PNG_EXPORTA(9, void, png_longjmp, (png_structp png_ptr, int val),
+    PNG_NORETURN);
+
+#ifdef PNG_READ_SUPPORTED
+/* Reset the compression stream */
+PNG_EXPORT(10, int, png_reset_zstream, (png_structp png_ptr));
+#endif
+
+/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
+#ifdef PNG_USER_MEM_SUPPORTED
+PNG_EXPORTA(11, png_structp, png_create_read_struct_2,
+    (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
+    png_error_ptr warn_fn,
+    png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
+    PNG_ALLOCATED);
+PNG_EXPORTA(12, png_structp, png_create_write_struct_2,
+    (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
+    png_error_ptr warn_fn,
+    png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
+    PNG_ALLOCATED);
+#endif
+
+/* Write the PNG file signature. */
+PNG_EXPORT(13, void, png_write_sig, (png_structp png_ptr));
+
+/* Write a PNG chunk - size, type, (optional) data, CRC. */
+PNG_EXPORT(14, void, png_write_chunk, (png_structp png_ptr, png_const_bytep
+    chunk_name, png_const_bytep data, png_size_t length));
+
+/* Write the start of a PNG chunk - length and chunk name. */
+PNG_EXPORT(15, void, png_write_chunk_start, (png_structp png_ptr,
+    png_const_bytep chunk_name, png_uint_32 length));
+
+/* Write the data of a PNG chunk started with png_write_chunk_start(). */
+PNG_EXPORT(16, void, png_write_chunk_data, (png_structp png_ptr,
+    png_const_bytep data, png_size_t length));
+
+/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
+PNG_EXPORT(17, void, png_write_chunk_end, (png_structp png_ptr));
+
+/* Allocate and initialize the info structure */
+PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr),
+    PNG_ALLOCATED);
+
+PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr,
+    png_size_t png_info_struct_size));
+
+/* Writes all the PNG information before the image. */
+PNG_EXPORT(20, void, png_write_info_before_PLTE,
+    (png_structp png_ptr, png_infop info_ptr));
+PNG_EXPORT(21, void, png_write_info,
+    (png_structp png_ptr, png_infop info_ptr));
+
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+/* Read the information before the actual image data. */
+PNG_EXPORT(22, void, png_read_info,
+    (png_structp png_ptr, png_infop info_ptr));
+#endif
+
+#ifdef PNG_TIME_RFC1123_SUPPORTED
+PNG_EXPORT(23, png_const_charp, png_convert_to_rfc1123,
+    (png_structp png_ptr,
+    png_const_timep ptime));
+#endif
+
+#ifdef PNG_CONVERT_tIME_SUPPORTED
+/* Convert from a struct tm to png_time */
+PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
+    PNG_CONST struct tm FAR * ttime));
+
+/* Convert from time_t to png_time.  Uses gmtime() */
+PNG_EXPORT(25, void, png_convert_from_time_t,
+    (png_timep ptime, time_t ttime));
+#endif /* PNG_CONVERT_tIME_SUPPORTED */
+
+#ifdef PNG_READ_EXPAND_SUPPORTED
+/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
+PNG_EXPORT(26, void, png_set_expand, (png_structp png_ptr));
+PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structp png_ptr));
+PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structp png_ptr));
+PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_EXPAND_16_SUPPORTED
+/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion
+ * of a tRNS chunk if present.
+ */
+PNG_EXPORT(221, void, png_set_expand_16, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
+/* Use blue, green, red order for pixels. */
+PNG_EXPORT(30, void, png_set_bgr, (png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
+/* Expand the grayscale to 24-bit RGB if necessary. */
+PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+/* Reduce RGB to grayscale. */
+PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr,
+    int error_action, double red, double green));
+PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr,
+    int error_action, png_fixed_point red, png_fixed_point green));
+
+PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structp
+    png_ptr));
+#endif
+
+#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
+PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
+    png_colorp palette));
+#endif
+
+#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
+/* How the alpha channel is interpreted - this affects how the color channels of
+ * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
+ * file, is present.
+ *
+ * This has no effect on the way pixels are written into a PNG output
+ * datastream. The color samples in a PNG datastream are never premultiplied
+ * with the alpha samples.
+ *
+ * The default is to return data according to the PNG specification: the alpha
+ * channel is a linear measure of the contribution of the pixel to the
+ * corresponding composited pixel.  The gamma encoded color channels must be
+ * scaled according to the contribution and to do this it is necessary to undo
+ * the encoding, scale the color values, perform the composition and reencode
+ * the values.  This is the 'PNG' mode.
+ *
+ * The alternative is to 'associate' the alpha with the color information by
+ * storing color channel values that have been scaled by the alpha.  The
+ * advantage is that the color channels can be resampled (the image can be
+ * scaled) in this form.  The disadvantage is that normal practice is to store
+ * linear, not (gamma) encoded, values and this requires 16-bit channels for
+ * still images rather than the 8-bit channels that are just about sufficient if
+ * gamma encoding is used.  In addition all non-transparent pixel values,
+ * including completely opaque ones, must be gamma encoded to produce the final
+ * image.  This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the
+ * latter being the two common names for associated alpha color channels.)
+ *
+ * Since it is not necessary to perform arithmetic on opaque color values so
+ * long as they are not to be resampled and are in the final color space it is
+ * possible to optimize the handling of alpha by storing the opaque pixels in
+ * the PNG format (adjusted for the output color space) while storing partially
+ * opaque pixels in the standard, linear, format.  The accuracy required for
+ * standard alpha composition is relatively low, because the pixels are
+ * isolated, therefore typically the accuracy loss in storing 8-bit linear
+ * values is acceptable.  (This is not true if the alpha channel is used to
+ * simulate transparency over large areas - use 16 bits or the PNG mode in
+ * this case!)  This is the 'OPTIMIZED' mode.  For this mode a pixel is
+ * treated as opaque only if the alpha value is equal to the maximum value.
+ *
+ * The final choice is to gamma encode the alpha channel as well.  This is
+ * broken because, in practice, no implementation that uses this choice
+ * correctly undoes the encoding before handling alpha composition.  Use this
+ * choice only if other serious errors in the software or hardware you use
+ * mandate it; the typical serious error is for dark halos to appear around
+ * opaque areas of the composited PNG image because of arithmetic overflow.
+ *
+ * The API function png_set_alpha_mode specifies which of these choices to use
+ * with an enumerated 'mode' value and the gamma of the required output:
+ */
+#define PNG_ALPHA_PNG           0 /* according to the PNG standard */
+#define PNG_ALPHA_STANDARD      1 /* according to Porter/Duff */
+#define PNG_ALPHA_ASSOCIATED    1 /* as above; this is the normal practice */
+#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */
+#define PNG_ALPHA_OPTIMIZED     2 /* 'PNG' for opaque pixels, else 'STANDARD' */
+#define PNG_ALPHA_BROKEN        3 /* the alpha channel is gamma encoded */
+
+PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structp png_ptr, int mode,
+    double output_gamma));
+PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structp png_ptr,
+    int mode, png_fixed_point output_gamma));
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED)
+/* The output_gamma value is a screen gamma in libpng terminology: it expresses
+ * how to decode the output values, not how they are encoded.  The values used
+ * correspond to the normal numbers used to describe the overall gamma of a
+ * computer display system; for example 2.2 for an sRGB conformant system.  The
+ * values are scaled by 100000 in the _fixed version of the API (so 220000 for
+ * sRGB.)
+ *
+ * The inverse of the value is always used to provide a default for the PNG file
+ * encoding if it has no gAMA chunk and if png_set_gamma() has not been called
+ * to override the PNG gamma information.
+ *
+ * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode
+ * opaque pixels however pixels with lower alpha values are not encoded,
+ * regardless of the output gamma setting.
+ *
+ * When the standard Porter Duff handling is requested with mode 1 the output
+ * encoding is set to be linear and the output_gamma value is only relevant
+ * as a default for input data that has no gamma information.  The linear output
+ * encoding will be overridden if png_set_gamma() is called - the results may be
+ * highly unexpected!
+ *
+ * The following numbers are derived from the sRGB standard and the research
+ * behind it.  sRGB is defined to be approximated by a PNG gAMA chunk value of
+ * 0.45455 (1/2.2) for PNG.  The value implicitly includes any viewing
+ * correction required to take account of any differences in the color
+ * environment of the original scene and the intended display environment; the
+ * value expresses how to *decode* the image for display, not how the original
+ * data was *encoded*.
+ *
+ * sRGB provides a peg for the PNG standard by defining a viewing environment.
+ * sRGB itself, and earlier TV standards, actually use a more complex transform
+ * (a linear portion then a gamma 2.4 power law) than PNG can express.  (PNG is
+ * limited to simple power laws.)  By saying that an image for direct display on
+ * an sRGB conformant system should be stored with a gAMA chunk value of 45455
+ * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification
+ * makes it possible to derive values for other display systems and
+ * environments.
+ *
+ * The Mac value is deduced from the sRGB based on an assumption that the actual
+ * extra viewing correction used in early Mac display systems was implemented as
+ * a power 1.45 lookup table.
+ *
+ * Any system where a programmable lookup table is used or where the behavior of
+ * the final display device characteristics can be changed requires system
+ * specific code to obtain the current characteristic.  However this can be
+ * difficult and most PNG gamma correction only requires an approximate value.
+ *
+ * By default, if png_set_alpha_mode() is not called, libpng assumes that all
+ * values are unencoded, linear, values and that the output device also has a
+ * linear characteristic.  This is only very rarely correct - it is invariably
+ * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the
+ * default if you don't know what the right answer is!
+ *
+ * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS
+ * 10.6) which used a correction table to implement a somewhat lower gamma on an
+ * otherwise sRGB system.
+ *
+ * Both these values are reserved (not simple gamma values) in order to allow
+ * more precise correction internally in the future.
+ *
+ * NOTE: the following values can be passed to either the fixed or floating
+ * point APIs, but the floating point API will also accept floating point
+ * values.
+ */
+#define PNG_DEFAULT_sRGB -1       /* sRGB gamma and color space */
+#define PNG_GAMMA_MAC_18 -2       /* Old Mac '1.8' gamma and color space */
+#define PNG_GAMMA_sRGB   220000   /* Television standards--matches sRGB gamma */
+#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */
+#endif
+
+/* The following are examples of calls to png_set_alpha_mode to achieve the
+ * required overall gamma correction and, where necessary, alpha
+ * premultiplication.
+ *
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB);
+ *    This is the default libpng handling of the alpha channel - it is not
+ *    pre-multiplied into the color components.  In addition the call states
+ *    that the output is for a sRGB system and causes all PNG files without gAMA
+ *    chunks to be assumed to be encoded using sRGB.
+ *
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
+ *    In this case the output is assumed to be something like an sRGB conformant
+ *    display preceeded by a power-law lookup table of power 1.45.  This is how
+ *    early Mac systems behaved.
+ *
+ * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR);
+ *    This is the classic Jim Blinn approach and will work in academic
+ *    environments where everything is done by the book.  It has the shortcoming
+ *    of assuming that input PNG data with no gamma information is linear - this
+ *    is unlikely to be correct unless the PNG files where generated locally.
+ *    Most of the time the output precision will be so low as to show
+ *    significant banding in dark areas of the image.
+ *
+ * png_set_expand_16(pp);
+ * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB);
+ *    This is a somewhat more realistic Jim Blinn inspired approach.  PNG files
+ *    are assumed to have the sRGB encoding if not marked with a gamma value and
+ *    the output is always 16 bits per component.  This permits accurate scaling
+ *    and processing of the data.  If you know that your input PNG files were
+ *    generated locally you might need to replace PNG_DEFAULT_sRGB with the
+ *    correct value for your system.
+ *
+ * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB);
+ *    If you just need to composite the PNG image onto an existing background
+ *    and if you control the code that does this you can use the optimization
+ *    setting.  In this case you just copy completely opaque pixels to the
+ *    output.  For pixels that are not completely transparent (you just skip
+ *    those) you do the composition math using png_composite or png_composite_16
+ *    below then encode the resultant 8-bit or 16-bit values to match the output
+ *    encoding.
+ *
+ * Other cases
+ *    If neither the PNG nor the standard linear encoding work for you because
+ *    of the software or hardware you use then you have a big problem.  The PNG
+ *    case will probably result in halos around the image.  The linear encoding
+ *    will probably result in a washed out, too bright, image (it's actually too
+ *    contrasty.)  Try the ALPHA_OPTIMIZED mode above - this will probably
+ *    substantially reduce the halos.  Alternatively try:
+ *
+ * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB);
+ *    This option will also reduce the halos, but there will be slight dark
+ *    halos round the opaque parts of the image where the background is light.
+ *    In the OPTIMIZED mode the halos will be light halos where the background
+ *    is dark.  Take your pick - the halos are unavoidable unless you can get
+ *    your hardware/software fixed!  (The OPTIMIZED approach is slightly
+ *    faster.)
+ *
+ * When the default gamma of PNG files doesn't match the output gamma.
+ *    If you have PNG files with no gamma information png_set_alpha_mode allows
+ *    you to provide a default gamma, but it also sets the ouput gamma to the
+ *    matching value.  If you know your PNG files have a gamma that doesn't
+ *    match the output you can take advantage of the fact that
+ *    png_set_alpha_mode always sets the output gamma but only sets the PNG
+ *    default if it is not already set:
+ *
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB);
+ * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
+ *    The first call sets both the default and the output gamma values, the
+ *    second call overrides the output gamma without changing the default.  This
+ *    is easier than achieving the same effect with png_set_gamma.  You must use
+ *    PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will
+ *    fire if more than one call to png_set_alpha_mode and png_set_background is
+ *    made in the same read operation, however multiple calls with PNG_ALPHA_PNG
+ *    are ignored.
+ */
+
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
+PNG_EXPORT(36, void, png_set_strip_alpha, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
+    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
+PNG_EXPORT(37, void, png_set_swap_alpha, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
+    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
+PNG_EXPORT(38, void, png_set_invert_alpha, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
+/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
+PNG_EXPORT(39, void, png_set_filler, (png_structp png_ptr, png_uint_32 filler,
+    int flags));
+/* The values of the PNG_FILLER_ defines should NOT be changed */
+#  define PNG_FILLER_BEFORE 0
+#  define PNG_FILLER_AFTER 1
+/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
+PNG_EXPORT(40, void, png_set_add_alpha,
+    (png_structp png_ptr, png_uint_32 filler,
+    int flags));
+#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
+
+#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
+/* Swap bytes in 16-bit depth files. */
+PNG_EXPORT(41, void, png_set_swap, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
+/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
+PNG_EXPORT(42, void, png_set_packing, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
+    defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+/* Swap packing order of pixels in bytes. */
+PNG_EXPORT(43, void, png_set_packswap, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
+/* Converts files to legal bit depths. */
+PNG_EXPORT(44, void, png_set_shift, (png_structp png_ptr, png_const_color_8p
+    true_bits));
+#endif
+
+#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
+    defined(PNG_WRITE_INTERLACING_SUPPORTED)
+/* Have the code handle the interlacing.  Returns the number of passes.
+ * MUST be called before png_read_update_info or png_start_read_image,
+ * otherwise it will not have the desired effect.  Note that it is still
+ * necessary to call png_read_row or png_read_rows png_get_image_height
+ * times for each pass.
+*/
+PNG_EXPORT(45, int, png_set_interlace_handling, (png_structp png_ptr));
+#endif
+
+#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
+/* Invert monochrome files */
+PNG_EXPORT(46, void, png_set_invert_mono, (png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
+/* Handle alpha and tRNS by replacing with a background color.  Prior to
+ * libpng-1.5.4 this API must not be called before the PNG file header has been
+ * read.  Doing so will result in unexpected behavior and possible warnings or
+ * errors if the PNG file contains a bKGD chunk.
+ */
+PNG_FP_EXPORT(47, void, png_set_background, (png_structp png_ptr,
+    png_const_color_16p background_color, int background_gamma_code,
+    int need_expand, double background_gamma));
+PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structp png_ptr,
+    png_const_color_16p background_color, int background_gamma_code,
+    int need_expand, png_fixed_point background_gamma));
+#endif
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
+#  define PNG_BACKGROUND_GAMMA_UNKNOWN 0
+#  define PNG_BACKGROUND_GAMMA_SCREEN  1
+#  define PNG_BACKGROUND_GAMMA_FILE    2
+#  define PNG_BACKGROUND_GAMMA_UNIQUE  3
+#endif
+
+#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
+/* Scale a 16-bit depth file down to 8-bit, accurately. */
+PNG_EXPORT(229, void, png_set_scale_16, (png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
+#define PNG_READ_16_TO_8 SUPPORTED /* Name prior to 1.5.4 */
+/* Strip the second byte of information from a 16-bit depth file. */
+PNG_EXPORT(48, void, png_set_strip_16, (png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+/* Turn on quantizing, and reduce the palette to the number of colors
+ * available.
+ */
+PNG_EXPORT(49, void, png_set_quantize,
+    (png_structp png_ptr, png_colorp palette,
+    int num_palette, int maximum_colors, png_const_uint_16p histogram,
+    int full_quantize));
+#endif
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+/* The threshold on gamma processing is configurable but hard-wired into the
+ * library.  The following is the floating point variant.
+ */
+#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001)
+
+/* Handle gamma correction. Screen_gamma=(display_exponent).
+ * NOTE: this API simply sets the screen and file gamma values. It will
+ * therefore override the value for gamma in a PNG file if it is called after
+ * the file header has been read - use with care  - call before reading the PNG
+ * file for best results!
+ *
+ * These routines accept the same gamma values as png_set_alpha_mode (described
+ * above).  The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either
+ * API (floating point or fixed.)  Notice, however, that the 'file_gamma' value
+ * is the inverse of a 'screen gamma' value.
+ */
+PNG_FP_EXPORT(50, void, png_set_gamma,
+    (png_structp png_ptr, double screen_gamma,
+    double override_file_gamma));
+PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp png_ptr,
+    png_fixed_point screen_gamma, png_fixed_point override_file_gamma));
+#endif
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+/* Set how many lines between output flushes - 0 for no flushing */
+PNG_EXPORT(51, void, png_set_flush, (png_structp png_ptr, int nrows));
+/* Flush the current PNG output buffer */
+PNG_EXPORT(52, void, png_write_flush, (png_structp png_ptr));
+#endif
+
+/* Optional update palette with requested transformations */
+PNG_EXPORT(53, void, png_start_read_image, (png_structp png_ptr));
+
+/* Optional call to update the users info structure */
+PNG_EXPORT(54, void, png_read_update_info,
+    (png_structp png_ptr, png_infop info_ptr));
+
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+/* Read one or more rows of image data. */
+PNG_EXPORT(55, void, png_read_rows, (png_structp png_ptr, png_bytepp row,
+    png_bytepp display_row, png_uint_32 num_rows));
+#endif
+
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+/* Read a row of data. */
+PNG_EXPORT(56, void, png_read_row, (png_structp png_ptr, png_bytep row,
+    png_bytep display_row));
+#endif
+
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+/* Read the whole image into memory at once. */
+PNG_EXPORT(57, void, png_read_image, (png_structp png_ptr, png_bytepp image));
+#endif
+
+/* Write a row of image data */
+PNG_EXPORT(58, void, png_write_row,
+    (png_structp png_ptr, png_const_bytep row));
+
+/* Write a few rows of image data: (*row) is not written; however, the type
+ * is declared as writeable to maintain compatibility with previous versions
+ * of libpng and to allow the 'display_row' array from read_rows to be passed
+ * unchanged to write_rows.
+ */
+PNG_EXPORT(59, void, png_write_rows, (png_structp png_ptr, png_bytepp row,
+    png_uint_32 num_rows));
+
+/* Write the image data */
+PNG_EXPORT(60, void, png_write_image,
+    (png_structp png_ptr, png_bytepp image));
+
+/* Write the end of the PNG file. */
+PNG_EXPORT(61, void, png_write_end,
+    (png_structp png_ptr, png_infop info_ptr));
+
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+/* Read the end of the PNG file. */
+PNG_EXPORT(62, void, png_read_end, (png_structp png_ptr, png_infop info_ptr));
+#endif
+
+/* Free any memory associated with the png_info_struct */
+PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp png_ptr,
+    png_infopp info_ptr_ptr));
+
+/* Free any memory associated with the png_struct and the png_info_structs */
+PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr,
+    png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
+
+/* Free any memory associated with the png_struct and the png_info_structs */
+PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr,
+    png_infopp info_ptr_ptr));
+
+/* Set the libpng method of handling chunk CRC errors */
+PNG_EXPORT(66, void, png_set_crc_action,
+    (png_structp png_ptr, int crit_action, int ancil_action));
+
+/* Values for png_set_crc_action() say how to handle CRC errors in
+ * ancillary and critical chunks, and whether to use the data contained
+ * therein.  Note that it is impossible to "discard" data in a critical
+ * chunk.  For versions prior to 0.90, the action was always error/quit,
+ * whereas in version 0.90 and later, the action for CRC errors in ancillary
+ * chunks is warn/discard.  These values should NOT be changed.
+ *
+ *      value                       action:critical     action:ancillary
+ */
+#define PNG_CRC_DEFAULT       0  /* error/quit          warn/discard data */
+#define PNG_CRC_ERROR_QUIT    1  /* error/quit          error/quit        */
+#define PNG_CRC_WARN_DISCARD  2  /* (INVALID)           warn/discard data */
+#define PNG_CRC_WARN_USE      3  /* warn/use data       warn/use data     */
+#define PNG_CRC_QUIET_USE     4  /* quiet/use data      quiet/use data    */
+#define PNG_CRC_NO_CHANGE     5  /* use current value   use current value */
+
+/* These functions give the user control over the scan-line filtering in
+ * libpng and the compression methods used by zlib.  These functions are
+ * mainly useful for testing, as the defaults should work with most users.
+ * Those users who are tight on memory or want faster performance at the
+ * expense of compression can modify them.  See the compression library
+ * header file (zlib.h) for an explination of the compression functions.
+ */
+
+/* Set the filtering method(s) used by libpng.  Currently, the only valid
+ * value for "method" is 0.
+ */
+PNG_EXPORT(67, void, png_set_filter,
+    (png_structp png_ptr, int method, int filters));
+
+/* Flags for png_set_filter() to say which filters to use.  The flags
+ * are chosen so that they don't conflict with real filter types
+ * below, in case they are supplied instead of the #defined constants.
+ * These values should NOT be changed.
+ */
+#define PNG_NO_FILTERS     0x00
+#define PNG_FILTER_NONE    0x08
+#define PNG_FILTER_SUB     0x10
+#define PNG_FILTER_UP      0x20
+#define PNG_FILTER_AVG     0x40
+#define PNG_FILTER_PAETH   0x80
+#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
+                         PNG_FILTER_AVG | PNG_FILTER_PAETH)
+
+/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
+ * These defines should NOT be changed.
+ */
+#define PNG_FILTER_VALUE_NONE  0
+#define PNG_FILTER_VALUE_SUB   1
+#define PNG_FILTER_VALUE_UP    2
+#define PNG_FILTER_VALUE_AVG   3
+#define PNG_FILTER_VALUE_PAETH 4
+#define PNG_FILTER_VALUE_LAST  5
+
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */
+/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
+ * defines, either the default (minimum-sum-of-absolute-differences), or
+ * the experimental method (weighted-minimum-sum-of-absolute-differences).
+ *
+ * Weights are factors >= 1.0, indicating how important it is to keep the
+ * filter type consistent between rows.  Larger numbers mean the current
+ * filter is that many times as likely to be the same as the "num_weights"
+ * previous filters.  This is cumulative for each previous row with a weight.
+ * There needs to be "num_weights" values in "filter_weights", or it can be
+ * NULL if the weights aren't being specified.  Weights have no influence on
+ * the selection of the first row filter.  Well chosen weights can (in theory)
+ * improve the compression for a given image.
+ *
+ * Costs are factors >= 1.0 indicating the relative decoding costs of a
+ * filter type.  Higher costs indicate more decoding expense, and are
+ * therefore less likely to be selected over a filter with lower computational
+ * costs.  There needs to be a value in "filter_costs" for each valid filter
+ * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't
+ * setting the costs.  Costs try to improve the speed of decompression without
+ * unduly increasing the compressed image size.
+ *
+ * A negative weight or cost indicates the default value is to be used, and
+ * values in the range [0.0, 1.0) indicate the value is to remain unchanged.
+ * The default values for both weights and costs are currently 1.0, but may
+ * change if good general weighting/cost heuristics can be found.  If both
+ * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
+ * to the UNWEIGHTED method, but with added encoding time/computation.
+ */
+PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp png_ptr,
+    int heuristic_method, int num_weights, png_const_doublep filter_weights,
+    png_const_doublep filter_costs));
+PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
+    (png_structp png_ptr,
+    int heuristic_method, int num_weights, png_const_fixed_point_p
+    filter_weights, png_const_fixed_point_p filter_costs));
+#endif /*  PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
+
+/* Heuristic used for row filter selection.  These defines should NOT be
+ * changed.
+ */
+#define PNG_FILTER_HEURISTIC_DEFAULT    0  /* Currently "UNWEIGHTED" */
+#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1  /* Used by libpng < 0.95 */
+#define PNG_FILTER_HEURISTIC_WEIGHTED   2  /* Experimental feature */
+#define PNG_FILTER_HEURISTIC_LAST       3  /* Not a valid value */
+
+#ifdef PNG_WRITE_SUPPORTED
+/* Set the library compression level.  Currently, valid values range from
+ * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
+ * (0 - no compression, 9 - "maximal" compression).  Note that tests have
+ * shown that zlib compression levels 3-6 usually perform as well as level 9
+ * for PNG images, and do considerably fewer caclulations.  In the future,
+ * these values may not correspond directly to the zlib compression levels.
+ */
+PNG_EXPORT(69, void, png_set_compression_level,
+    (png_structp png_ptr, int level));
+
+PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr,
+    int mem_level));
+
+PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp png_ptr,
+    int strategy));
+
+/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
+ * smaller value of window_bits if it can do so safely.
+ */
+PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structp png_ptr,
+    int window_bits));
+
+PNG_EXPORT(73, void, png_set_compression_method, (png_structp png_ptr,
+    int method));
+#endif
+
+#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
+/* Also set zlib parameters for compressing non-IDAT chunks */
+PNG_EXPORT(222, void, png_set_text_compression_level,
+    (png_structp png_ptr, int level));
+
+PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structp png_ptr,
+    int mem_level));
+
+PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structp png_ptr,
+    int strategy));
+
+/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a
+ * smaller value of window_bits if it can do so safely.
+ */
+PNG_EXPORT(225, void, png_set_text_compression_window_bits, (png_structp
+    png_ptr, int window_bits));
+
+PNG_EXPORT(226, void, png_set_text_compression_method, (png_structp png_ptr,
+    int method));
+#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */
+
+/* These next functions are called for input/output, memory, and error
+ * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
+ * and call standard C I/O routines such as fread(), fwrite(), and
+ * fprintf().  These functions can be made to use other I/O routines
+ * at run time for those applications that need to handle I/O in a
+ * different manner by calling png_set_???_fn().  See libpng-manual.txt for
+ * more information.
+ */
+
+#ifdef PNG_STDIO_SUPPORTED
+/* Initialize the input/output for the PNG file to the default functions. */
+PNG_EXPORT(74, void, png_init_io, (png_structp png_ptr, png_FILE_p fp));
+#endif
+
+/* Replace the (error and abort), and warning functions with user
+ * supplied functions.  If no messages are to be printed you must still
+ * write and use replacement functions. The replacement error_fn should
+ * still do a longjmp to the last setjmp location if you are using this
+ * method of error handling.  If error_fn or warning_fn is NULL, the
+ * default function will be used.
+ */
+
+PNG_EXPORT(75, void, png_set_error_fn,
+    (png_structp png_ptr, png_voidp error_ptr,
+    png_error_ptr error_fn, png_error_ptr warning_fn));
+
+/* Return the user pointer associated with the error functions */
+PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structp png_ptr));
+
+/* Replace the default data output functions with a user supplied one(s).
+ * If buffered output is not used, then output_flush_fn can be set to NULL.
+ * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time
+ * output_flush_fn will be ignored (and thus can be NULL).
+ * It is probably a mistake to use NULL for output_flush_fn if
+ * write_data_fn is not also NULL unless you have built libpng with
+ * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's
+ * default flush function, which uses the standard *FILE structure, will
+ * be used.
+ */
+PNG_EXPORT(77, void, png_set_write_fn, (png_structp png_ptr, png_voidp io_ptr,
+    png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
+
+/* Replace the default data input function with a user supplied one. */
+PNG_EXPORT(78, void, png_set_read_fn, (png_structp png_ptr, png_voidp io_ptr,
+    png_rw_ptr read_data_fn));
+
+/* Return the user pointer associated with the I/O functions */
+PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_structp png_ptr));
+
+PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr,
+    png_read_status_ptr read_row_fn));
+
+PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr,
+    png_write_status_ptr write_row_fn));
+
+#ifdef PNG_USER_MEM_SUPPORTED
+/* Replace the default memory allocation functions with user supplied one(s). */
+PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr,
+    png_malloc_ptr malloc_fn, png_free_ptr free_fn));
+/* Return the user pointer associated with the memory functions */
+PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
+PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp png_ptr,
+    png_user_transform_ptr read_user_transform_fn));
+#endif
+
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
+PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr,
+    png_user_transform_ptr write_user_transform_fn));
+#endif
+
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
+PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr,
+    png_voidp user_transform_ptr, int user_transform_depth,
+    int user_transform_channels));
+/* Return the user pointer associated with the user transform functions */
+PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr,
+    (png_const_structp png_ptr));
+#endif
+
+#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED
+/* Return information about the row currently being processed.  Note that these
+ * APIs do not fail but will return unexpected results if called outside a user
+ * transform callback.  Also note that when transforming an interlaced image the
+ * row number is the row number within the sub-image of the interlace pass, so
+ * the value will increase to the height of the sub-image (not the full image)
+ * then reset to 0 for the next pass.
+ *
+ * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to
+ * find the output pixel (x,y) given an interlaced sub-image pixel
+ * (row,col,pass).  (See below for these macros.)
+ */
+PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structp));
+PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp));
+#endif
+
+#ifdef PNG_USER_CHUNKS_SUPPORTED
+PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr,
+    png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
+PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr));
+#endif
+
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+/* Sets the function callbacks for the push reader, and a pointer to a
+ * user-defined structure available to the callback functions.
+ */
+PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr,
+    png_voidp progressive_ptr, png_progressive_info_ptr info_fn,
+    png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn));
+
+/* Returns the user pointer associated with the push read functions */
+PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structp png_ptr));
+
+/* Function to be called when data becomes available */
+PNG_EXPORT(92, void, png_process_data,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_bytep buffer, png_size_t buffer_size));
+
+/* A function which may be called *only* within png_process_data to stop the
+ * processing of any more data.  The function returns the number of bytes
+ * remaining, excluding any that libpng has cached internally.  A subsequent
+ * call to png_process_data must supply these bytes again.  If the argument
+ * 'save' is set to true the routine will first save all the pending data and
+ * will always return 0.
+ */
+PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structp, int save));
+
+/* A function which may be called *only* outside (after) a call to
+ * png_process_data.  It returns the number of bytes of data to skip in the
+ * input.  Normally it will return 0, but if it returns a non-zero value the
+ * application must skip than number of bytes of input data and pass the
+ * following data to the next call to png_process_data.
+ */
+PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structp));
+
+/* Function that combines rows.  'new_row' is a flag that should come from
+ * the callback and be non-NULL if anything needs to be done; the library
+ * stores its own version of the new data internally and ignores the passed
+ * in value.
+ */
+PNG_EXPORT(93, void, png_progressive_combine_row, (png_structp png_ptr,
+    png_bytep old_row, png_const_bytep new_row));
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+
+PNG_EXPORTA(94, png_voidp, png_malloc,
+    (png_structp png_ptr, png_alloc_size_t size),
+    PNG_ALLOCATED);
+/* Added at libpng version 1.4.0 */
+PNG_EXPORTA(95, png_voidp, png_calloc,
+    (png_structp png_ptr, png_alloc_size_t size),
+    PNG_ALLOCATED);
+
+/* Added at libpng version 1.2.4 */
+PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_structp png_ptr,
+    png_alloc_size_t size), PNG_ALLOCATED);
+
+/* Frees a pointer allocated by png_malloc() */
+PNG_EXPORT(97, void, png_free, (png_structp png_ptr, png_voidp ptr));
+
+/* Free data that was allocated internally */
+PNG_EXPORT(98, void, png_free_data,
+    (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num));
+
+/* Reassign responsibility for freeing existing data, whether allocated
+ * by libpng or by the application */
+PNG_EXPORT(99, void, png_data_freer,
+    (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask));
+
+/* Assignments for png_data_freer */
+#define PNG_DESTROY_WILL_FREE_DATA 1
+#define PNG_SET_WILL_FREE_DATA 1
+#define PNG_USER_WILL_FREE_DATA 2
+/* Flags for png_ptr->free_me and info_ptr->free_me */
+#define PNG_FREE_HIST 0x0008
+#define PNG_FREE_ICCP 0x0010
+#define PNG_FREE_SPLT 0x0020
+#define PNG_FREE_ROWS 0x0040
+#define PNG_FREE_PCAL 0x0080
+#define PNG_FREE_SCAL 0x0100
+#define PNG_FREE_UNKN 0x0200
+#define PNG_FREE_LIST 0x0400
+#define PNG_FREE_PLTE 0x1000
+#define PNG_FREE_TRNS 0x2000
+#define PNG_FREE_TEXT 0x4000
+#define PNG_FREE_ALL  0x7fff
+#define PNG_FREE_MUL  0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
+
+#ifdef PNG_USER_MEM_SUPPORTED
+PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr,
+    png_alloc_size_t size), PNG_ALLOCATED);
+PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr));
+#endif
+
+#ifdef PNG_ERROR_TEXT_SUPPORTED
+/* Fatal error in PNG image of libpng - can't continue */
+PNG_EXPORTA(102, void, png_error,
+    (png_structp png_ptr, png_const_charp error_message),
+    PNG_NORETURN);
+
+/* The same, but the chunk name is prepended to the error string. */
+PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr,
+    png_const_charp error_message), PNG_NORETURN);
+
+#else
+/* Fatal error in PNG image of libpng - can't continue */
+PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN);
+#endif
+
+#ifdef PNG_WARNINGS_SUPPORTED
+/* Non-fatal error in libpng.  Can continue, but may have a problem. */
+PNG_EXPORT(105, void, png_warning, (png_structp png_ptr,
+    png_const_charp warning_message));
+
+/* Non-fatal error in libpng, chunk name is prepended to message. */
+PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr,
+    png_const_charp warning_message));
+#endif
+
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
+/* Benign error in libpng.  Can continue, but may have a problem.
+ * User can choose whether to handle as a fatal error or as a warning. */
+#  undef png_benign_error
+PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr,
+    png_const_charp warning_message));
+
+/* Same, chunk name is prepended to message. */
+#  undef png_chunk_benign_error
+PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr,
+    png_const_charp warning_message));
+
+PNG_EXPORT(109, void, png_set_benign_errors,
+    (png_structp png_ptr, int allowed));
+#else
+#  ifdef PNG_ALLOW_BENIGN_ERRORS
+#    define png_benign_error png_warning
+#    define png_chunk_benign_error png_chunk_warning
+#  else
+#    define png_benign_error png_error
+#    define png_chunk_benign_error png_chunk_error
+#  endif
+#endif
+
+/* The png_set_<chunk> functions are for storing values in the png_info_struct.
+ * Similarly, the png_get_<chunk> calls are used to read values from the
+ * png_info_struct, either storing the parameters in the passed variables, or
+ * setting pointers into the png_info_struct where the data is stored.  The
+ * png_get_<chunk> functions return a non-zero value if the data was available
+ * in info_ptr, or return zero and do not change any of the parameters if the
+ * data was not available.
+ *
+ * These functions should be used instead of directly accessing png_info
+ * to avoid problems with future changes in the size and internal layout of
+ * png_info_struct.
+ */
+/* Returns "flag" if chunk data is valid in info_ptr. */
+PNG_EXPORT(110, png_uint_32, png_get_valid,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_uint_32 flag));
+
+/* Returns number of bytes needed to hold a transformed row. */
+PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+#ifdef PNG_INFO_IMAGE_SUPPORTED
+/* Returns row_pointers, which is an array of pointers to scanlines that was
+ * returned from png_read_png().
+ */
+PNG_EXPORT(112, png_bytepp, png_get_rows,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+/* Set row_pointers, which is an array of pointers to scanlines for use
+ * by png_write_png().
+ */
+PNG_EXPORT(113, void, png_set_rows, (png_structp png_ptr,
+    png_infop info_ptr, png_bytepp row_pointers));
+#endif
+
+/* Returns number of color channels in image. */
+PNG_EXPORT(114, png_byte, png_get_channels,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+#ifdef PNG_EASY_ACCESS_SUPPORTED
+/* Returns image width in pixels. */
+PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+/* Returns image height in pixels. */
+PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+/* Returns image bit_depth. */
+PNG_EXPORT(117, png_byte, png_get_bit_depth,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+/* Returns image color_type. */
+PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+/* Returns image filter_type. */
+PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+/* Returns image interlace_type. */
+PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+/* Returns image compression_type. */
+PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+
+/* Returns image resolution in pixels per meter, from pHYs chunk data. */
+PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+/* Returns pixel aspect ratio, computed from pHYs chunk data.  */
+PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
+PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+#endif /* PNG_EASY_ACCESS_SUPPORTED */
+
+/* Returns pointer to signature string read from PNG header */
+PNG_EXPORT(130, png_const_bytep, png_get_signature,
+    (png_const_structp png_ptr, png_infop info_ptr));
+
+#ifdef PNG_bKGD_SUPPORTED
+PNG_EXPORT(131, png_uint_32, png_get_bKGD,
+    (png_const_structp png_ptr, png_infop info_ptr,
+    png_color_16p *background));
+#endif
+
+#ifdef PNG_bKGD_SUPPORTED
+PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr,
+    png_const_color_16p background));
+#endif
+
+#ifdef PNG_cHRM_SUPPORTED
+PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr,
+   png_const_infop info_ptr, double *white_x, double *white_y, double *red_x,
+    double *red_y, double *green_x, double *green_y, double *blue_x,
+    double *blue_y));
+#ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */
+PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed,
+    (png_const_structp png_ptr,
+    png_const_infop info_ptr, png_fixed_point *int_white_x,
+    png_fixed_point *int_white_y, png_fixed_point *int_red_x,
+    png_fixed_point *int_red_y, png_fixed_point *int_green_x,
+    png_fixed_point *int_green_y, png_fixed_point *int_blue_x,
+    png_fixed_point *int_blue_y));
+#endif
+#endif
+
+#ifdef PNG_cHRM_SUPPORTED
+PNG_FP_EXPORT(135, void, png_set_cHRM,
+    (png_structp png_ptr, png_infop info_ptr,
+    double white_x, double white_y, double red_x, double red_y, double green_x,
+    double green_y, double blue_x, double blue_y));
+PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr,
+    png_infop info_ptr, png_fixed_point int_white_x,
+    png_fixed_point int_white_y, png_fixed_point int_red_x,
+    png_fixed_point int_red_y, png_fixed_point int_green_x,
+    png_fixed_point int_green_y, png_fixed_point int_blue_x,
+    png_fixed_point int_blue_y));
+#endif
+
+#ifdef PNG_gAMA_SUPPORTED
+PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    double *file_gamma));
+PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_fixed_point *int_file_gamma));
+#endif
+
+#ifdef PNG_gAMA_SUPPORTED
+PNG_FP_EXPORT(139, void, png_set_gAMA, (png_structp png_ptr,
+    png_infop info_ptr, double file_gamma));
+PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr,
+    png_infop info_ptr, png_fixed_point int_file_gamma));
+#endif
+
+#ifdef PNG_hIST_SUPPORTED
+PNG_EXPORT(141, png_uint_32, png_get_hIST,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_uint_16p *hist));
+#endif
+
+#ifdef PNG_hIST_SUPPORTED
+PNG_EXPORT(142, void, png_set_hIST, (png_structp png_ptr,
+    png_infop info_ptr, png_const_uint_16p hist));
+#endif
+
+PNG_EXPORT(143, png_uint_32, png_get_IHDR,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type,
+    int *interlace_method, int *compression_method, int *filter_method));
+
+PNG_EXPORT(144, void, png_set_IHDR,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 width, png_uint_32 height, int bit_depth, int color_type,
+    int interlace_method, int compression_method, int filter_method));
+
+#ifdef PNG_oFFs_SUPPORTED
+PNG_EXPORT(145, png_uint_32, png_get_oFFs,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type));
+#endif
+
+#ifdef PNG_oFFs_SUPPORTED
+PNG_EXPORT(146, void, png_set_oFFs,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_int_32 offset_x, png_int_32 offset_y, int unit_type));
+#endif
+
+#ifdef PNG_pCAL_SUPPORTED
+PNG_EXPORT(147, png_uint_32, png_get_pCAL,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type,
+    int *nparams,
+    png_charp *units, png_charpp *params));
+#endif
+
+#ifdef PNG_pCAL_SUPPORTED
+PNG_EXPORT(148, void, png_set_pCAL, (png_structp png_ptr,
+    png_infop info_ptr,
+    png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type,
+    int nparams, png_const_charp units, png_charpp params));
+#endif
+
+#ifdef PNG_pHYs_SUPPORTED
+PNG_EXPORT(149, png_uint_32, png_get_pHYs,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
+#endif
+
+#ifdef PNG_pHYs_SUPPORTED
+PNG_EXPORT(150, void, png_set_pHYs,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 res_x, png_uint_32 res_y, int unit_type));
+#endif
+
+PNG_EXPORT(151, png_uint_32, png_get_PLTE,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_colorp *palette, int *num_palette));
+
+PNG_EXPORT(152, void, png_set_PLTE,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_const_colorp palette, int num_palette));
+
+#ifdef PNG_sBIT_SUPPORTED
+PNG_EXPORT(153, png_uint_32, png_get_sBIT,
+    (png_const_structp png_ptr, png_infop info_ptr,
+    png_color_8p *sig_bit));
+#endif
+
+#ifdef PNG_sBIT_SUPPORTED
+PNG_EXPORT(154, void, png_set_sBIT,
+    (png_structp png_ptr, png_infop info_ptr, png_const_color_8p sig_bit));
+#endif
+
+#ifdef PNG_sRGB_SUPPORTED
+PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr,
+    png_const_infop info_ptr, int *file_srgb_intent));
+#endif
+
+#ifdef PNG_sRGB_SUPPORTED
+PNG_EXPORT(156, void, png_set_sRGB,
+    (png_structp png_ptr, png_infop info_ptr, int srgb_intent));
+PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr,
+    png_infop info_ptr, int srgb_intent));
+#endif
+
+#ifdef PNG_iCCP_SUPPORTED
+PNG_EXPORT(158, png_uint_32, png_get_iCCP,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_charpp name, int *compression_type, png_bytepp profile,
+    png_uint_32 *proflen));
+#endif
+
+#ifdef PNG_iCCP_SUPPORTED
+PNG_EXPORT(159, void, png_set_iCCP,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_const_charp name, int compression_type, png_const_bytep profile,
+    png_uint_32 proflen));
+#endif
+
+#ifdef PNG_sPLT_SUPPORTED
+PNG_EXPORT(160, png_uint_32, png_get_sPLT,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_sPLT_tpp entries));
+#endif
+
+#ifdef PNG_sPLT_SUPPORTED
+PNG_EXPORT(161, void, png_set_sPLT,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_const_sPLT_tp entries, int nentries));
+#endif
+
+#ifdef PNG_TEXT_SUPPORTED
+/* png_get_text also returns the number of text chunks in *num_text */
+PNG_EXPORT(162, png_uint_32, png_get_text,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    png_textp *text_ptr, int *num_text));
+#endif
+
+/* Note while png_set_text() will accept a structure whose text,
+ * language, and  translated keywords are NULL pointers, the structure
+ * returned by png_get_text will always contain regular
+ * zero-terminated C strings.  They might be empty strings but
+ * they will never be NULL pointers.
+ */
+
+#ifdef PNG_TEXT_SUPPORTED
+PNG_EXPORT(163, void, png_set_text,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_const_textp text_ptr, int num_text));
+#endif
+
+#ifdef PNG_tIME_SUPPORTED
+PNG_EXPORT(164, png_uint_32, png_get_tIME,
+    (png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time));
+#endif
+
+#ifdef PNG_tIME_SUPPORTED
+PNG_EXPORT(165, void, png_set_tIME,
+    (png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time));
+#endif
+
+#ifdef PNG_tRNS_SUPPORTED
+PNG_EXPORT(166, png_uint_32, png_get_tRNS,
+    (png_const_structp png_ptr, png_infop info_ptr,
+    png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color));
+#endif
+
+#ifdef PNG_tRNS_SUPPORTED
+PNG_EXPORT(167, void, png_set_tRNS,
+    (png_structp png_ptr, png_infop info_ptr,
+    png_const_bytep trans_alpha, int num_trans,
+    png_const_color_16p trans_color));
+#endif
+
+#ifdef PNG_sCAL_SUPPORTED
+PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    int *unit, double *width, double *height));
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+/* NOTE: this API is currently implemented using floating point arithmetic,
+ * consequently it can only be used on systems with floating point support.
+ * In any case the range of values supported by png_fixed_point is small and it
+ * is highly recommended that png_get_sCAL_s be used instead.
+ */
+PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed,
+    (png_structp png_ptr, png_const_infop info_ptr, int *unit,
+    png_fixed_point *width,
+    png_fixed_point *height));
+#endif
+PNG_EXPORT(169, png_uint_32, png_get_sCAL_s,
+    (png_const_structp png_ptr, png_const_infop info_ptr,
+    int *unit, png_charpp swidth, png_charpp sheight));
+
+PNG_FP_EXPORT(170, void, png_set_sCAL,
+    (png_structp png_ptr, png_infop info_ptr,
+    int unit, double width, double height));
+PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr,
+   png_infop info_ptr, int unit, png_fixed_point width,
+   png_fixed_point height));
+PNG_EXPORT(171, void, png_set_sCAL_s,
+    (png_structp png_ptr, png_infop info_ptr,
+    int unit, png_const_charp swidth, png_const_charp sheight));
+#endif /* PNG_sCAL_SUPPORTED */
+
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+/* Provide a list of chunks and how they are to be handled, if the built-in
+   handling or default unknown chunk handling is not desired.  Any chunks not
+   listed will be handled in the default manner.  The IHDR and IEND chunks
+   must not be listed.
+      keep = 0: follow default behaviour
+           = 1: do not keep
+           = 2: keep only if safe-to-copy
+           = 3: keep even if unsafe-to-copy
+*/
+PNG_EXPORT(172, void, png_set_keep_unknown_chunks,
+    (png_structp png_ptr, int keep,
+    png_const_bytep chunk_list, int num_chunks));
+PNG_EXPORT(173, int, png_handle_as_unknown, (png_structp png_ptr,
+    png_const_bytep chunk_name));
+#endif
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
+PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr,
+    png_infop info_ptr, png_const_unknown_chunkp unknowns,
+    int num_unknowns));
+PNG_EXPORT(175, void, png_set_unknown_chunk_location,
+    (png_structp png_ptr, png_infop info_ptr, int chunk, int location));
+PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr,
+    png_const_infop info_ptr, png_unknown_chunkpp entries));
+#endif
+
+/* Png_free_data() will turn off the "valid" flag for anything it frees.
+ * If you need to turn it off for a chunk that your application has freed,
+ * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);
+ */
+PNG_EXPORT(177, void, png_set_invalid,
+    (png_structp png_ptr, png_infop info_ptr, int mask));
+
+#ifdef PNG_INFO_IMAGE_SUPPORTED
+/* The "params" pointer is currently not used and is for future expansion. */
+PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr,
+    int transforms, png_voidp params));
+PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr,
+    int transforms, png_voidp params));
+#endif
+
+PNG_EXPORT(180, png_const_charp, png_get_copyright,
+    (png_const_structp png_ptr));
+PNG_EXPORT(181, png_const_charp, png_get_header_ver,
+    (png_const_structp png_ptr));
+PNG_EXPORT(182, png_const_charp, png_get_header_version,
+    (png_const_structp png_ptr));
+PNG_EXPORT(183, png_const_charp, png_get_libpng_ver,
+    (png_const_structp png_ptr));
+
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr,
+    png_uint_32 mng_features_permitted));
+#endif
+
+/* For use in png_set_keep_unknown, added to version 1.2.6 */
+#define PNG_HANDLE_CHUNK_AS_DEFAULT   0
+#define PNG_HANDLE_CHUNK_NEVER        1
+#define PNG_HANDLE_CHUNK_IF_SAFE      2
+#define PNG_HANDLE_CHUNK_ALWAYS       3
+
+/* Strip the prepended error numbers ("#nnn ") from error and warning
+ * messages before passing them to the error or warning handler.
+ */
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+PNG_EXPORT(185, void, png_set_strip_error_numbers,
+    (png_structp png_ptr,
+    png_uint_32 strip_mode));
+#endif
+
+/* Added in libpng-1.2.6 */
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr,
+    png_uint_32 user_width_max, png_uint_32 user_height_max));
+PNG_EXPORT(187, png_uint_32, png_get_user_width_max,
+    (png_const_structp png_ptr));
+PNG_EXPORT(188, png_uint_32, png_get_user_height_max,
+    (png_const_structp png_ptr));
+/* Added in libpng-1.4.0 */
+PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr,
+    png_uint_32 user_chunk_cache_max));
+PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max,
+    (png_const_structp png_ptr));
+/* Added in libpng-1.4.1 */
+PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr,
+    png_alloc_size_t user_chunk_cache_max));
+PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max,
+    (png_const_structp png_ptr));
+#endif
+
+#if defined(PNG_INCH_CONVERSIONS_SUPPORTED)
+PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+
+PNG_FP_EXPORT(196, float, png_get_x_offset_inches,
+    (png_const_structp png_ptr, png_const_infop info_ptr));
+#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
+PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed,
+    (png_structp png_ptr, png_const_infop info_ptr));
+#endif
+
+PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr,
+    png_const_infop info_ptr));
+#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
+PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
+    (png_structp png_ptr, png_const_infop info_ptr));
+#endif
+
+#  ifdef PNG_pHYs_SUPPORTED
+PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr,
+    png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
+    int *unit_type));
+#  endif /* PNG_pHYs_SUPPORTED */
+#endif  /* PNG_INCH_CONVERSIONS_SUPPORTED */
+
+/* Added in libpng-1.4.0 */
+#ifdef PNG_IO_STATE_SUPPORTED
+PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_structp png_ptr));
+
+PNG_EXPORTA(200, png_const_bytep, png_get_io_chunk_name,
+    (png_structp png_ptr), PNG_DEPRECATED);
+PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
+    (png_const_structp png_ptr));
+
+/* The flags returned by png_get_io_state() are the following: */
+#  define PNG_IO_NONE        0x0000   /* no I/O at this moment */
+#  define PNG_IO_READING     0x0001   /* currently reading */
+#  define PNG_IO_WRITING     0x0002   /* currently writing */
+#  define PNG_IO_SIGNATURE   0x0010   /* currently at the file signature */
+#  define PNG_IO_CHUNK_HDR   0x0020   /* currently at the chunk header */
+#  define PNG_IO_CHUNK_DATA  0x0040   /* currently at the chunk data */
+#  define PNG_IO_CHUNK_CRC   0x0080   /* currently at the chunk crc */
+#  define PNG_IO_MASK_OP     0x000f   /* current operation: reading/writing */
+#  define PNG_IO_MASK_LOC    0x00f0   /* current location: sig/hdr/data/crc */
+#endif /* ?PNG_IO_STATE_SUPPORTED */
+
+/* Interlace support.  The following macros are always defined so that if
+ * libpng interlace handling is turned off the macros may be used to handle
+ * interlaced images within the application.
+ */
+#define PNG_INTERLACE_ADAM7_PASSES 7
+
+/* Two macros to return the first row and first column of the original,
+ * full, image which appears in a given pass.  'pass' is in the range 0
+ * to 6 and the result is in the range 0 to 7.
+ */
+#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7)
+#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7)
+
+/* Two macros to help evaluate the number of rows or columns in each
+ * pass.  This is expressed as a shift - effectively log2 of the number or
+ * rows or columns in each 8x8 tile of the original image.
+ */
+#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3)
+#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3)
+
+/* Hence two macros to determine the number of rows or columns in a given
+ * pass of an image given its height or width.  In fact these macros may
+ * return non-zero even though the sub-image is empty, because the other
+ * dimension may be empty for a small image.
+ */
+#define PNG_PASS_ROWS(height, pass) (((height)+(((1<<PNG_PASS_ROW_SHIFT(pass))\
+   -1)-PNG_PASS_START_ROW(pass)))>>PNG_PASS_ROW_SHIFT(pass))
+#define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\
+   -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass))
+
+/* For the reader row callbacks (both progressive and sequential) it is
+ * necessary to find the row in the output image given a row in an interlaced
+ * image, so two more macros:
+ */
+#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \
+   (((yIn)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass))
+#define PNG_COL_FROM_PASS_COL(xIn, pass) \
+   (((xIn)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass))
+
+/* Two macros which return a boolean (0 or 1) saying whether the given row
+ * or column is in a particular pass.  These use a common utility macro that
+ * returns a mask for a given pass - the offset 'off' selects the row or
+ * column version.  The mask has the appropriate bit set for each column in
+ * the tile.
+ */
+#define PNG_PASS_MASK(pass,off) ( \
+   ((0x110145AFU>>(((7-(off))-(pass))<<2)) & 0xFU) | \
+   ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U))
+
+#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \
+   ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1)
+#define PNG_COL_IN_INTERLACE_PASS(x, pass) \
+   ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1)
+
+#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
+/* With these routines we avoid an integer divide, which will be slower on
+ * most machines.  However, it does take more operations than the corresponding
+ * divide method, so it may be slower on a few RISC systems.  There are two
+ * shifts (by 8 or 16 bits) and an addition, versus a single integer divide.
+ *
+ * Note that the rounding factors are NOT supposed to be the same!  128 and
+ * 32768 are correct for the NODIV code; 127 and 32767 are correct for the
+ * standard method.
+ *
+ * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]
+ */
+
+ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
+
+#  define png_composite(composite, fg, alpha, bg)         \
+     { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \
+           * (png_uint_16)(alpha)                         \
+           + (png_uint_16)(bg)*(png_uint_16)(255          \
+           - (png_uint_16)(alpha)) + (png_uint_16)128);   \
+       (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
+
+#  define png_composite_16(composite, fg, alpha, bg)       \
+     { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg)  \
+           * (png_uint_32)(alpha)                          \
+           + (png_uint_32)(bg)*(png_uint_32)(65535L        \
+           - (png_uint_32)(alpha)) + (png_uint_32)32768L); \
+       (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
+
+#else  /* Standard method using integer division */
+
+#  define png_composite(composite, fg, alpha, bg)                          \
+     (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) +  \
+     (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) +       \
+     (png_uint_16)127) / 255)
+
+#  define png_composite_16(composite, fg, alpha, bg)                         \
+     (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
+     (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) +        \
+     (png_uint_32)32767) / (png_uint_32)65535L)
+#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
+
+#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
+PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
+PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf));
+PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf));
+#endif
+
+PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_structp png_ptr,
+    png_const_bytep buf));
+/* No png_get_int_16 -- may be added if there's a real need for it. */
+
+/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
+#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
+PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i));
+#endif
+#ifdef PNG_SAVE_INT_32_SUPPORTED
+PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i));
+#endif
+
+/* Place a 16-bit number into a buffer in PNG byte order.
+ * The parameter is declared unsigned int, not png_uint_16,
+ * just to avoid potential problems on pre-ANSI C compilers.
+ */
+#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
+PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
+/* No png_save_int_16 -- may be added if there's a real need for it. */
+#endif
+
+#ifdef PNG_USE_READ_MACROS
+/* Inline macros to do direct reads of bytes from the input buffer.
+ * The png_get_int_32() routine assumes we are using two's complement
+ * format for negative values, which is almost certainly true.
+ */
+#  define png_get_uint_32(buf) \
+     (((png_uint_32)(*(buf)) << 24) + \
+      ((png_uint_32)(*((buf) + 1)) << 16) + \
+      ((png_uint_32)(*((buf) + 2)) << 8) + \
+      ((png_uint_32)(*((buf) + 3))))
+
+   /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+    * function) incorrectly returned a value of type png_uint_32.
+    */
+#  define png_get_uint_16(buf) \
+     ((png_uint_16) \
+      (((unsigned int)(*(buf)) << 8) + \
+       ((unsigned int)(*((buf) + 1)))))
+
+#  define png_get_int_32(buf) \
+     ((png_int_32)((*(buf) & 0x80) \
+      ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \
+      : (png_int_32)png_get_uint_32(buf)))
+#endif
+
+/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
+ * defs
+ */
+
+/* The last ordinal number (this is the *last* one already used; the next
+ * one to use is one more than this.)  Maintainer, remember to add an entry to
+ * scripts/symbols.def as well.
+ */
+#ifdef PNG_EXPORT_LAST_ORDINAL
+  PNG_EXPORT_LAST_ORDINAL(229);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PNG_VERSION_INFO_ONLY */
+/* Do not put anything past this line */
+#endif /* PNG_H */

Copied: branches/branch-3.0/include/fltk3png/pngconf.h (from rev 8987, branches/branch-3.0/png/pngconf.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/pngconf.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/pngconf.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,619 @@
+
+/* pngconf.h - machine configurable file for libpng
+ *
+ * libpng version 1.5.4 - July 7, 2011
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ *
+ */
+
+/* Any machine specific code is near the front of this file, so if you
+ * are configuring libpng for a machine, you may want to read the section
+ * starting here down to where it starts to typedef png_color, png_text,
+ * and png_info.
+ */
+
+#ifndef PNGCONF_H
+#define PNGCONF_H
+
+#ifndef PNG_BUILDING_SYMBOL_TABLE
+/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
+ * definition file for  machine specific limits, this may impact the
+ * correctness of the definitons below (see uses of INT_MAX).
+ */
+#  ifndef PNG_NO_LIMITS_H
+#    include <limits.h>
+#  endif
+
+/* For the memory copy APIs (i.e. the standard definitions of these),
+ * because this file defines png_memcpy and so on the base APIs must
+ * be defined here.
+ */
+#  ifdef BSD
+#    include <strings.h>
+#  else
+#    include <string.h>
+#  endif
+
+/* For png_FILE_p - this provides the standard definition of a
+ * FILE
+ */
+#  ifdef PNG_STDIO_SUPPORTED
+#    include <stdio.h>
+#  endif
+#endif
+
+/* This controls optimization of the reading of 16 and 32 bit values
+ * from PNG files.  It can be set on a per-app-file basis - it
+ * just changes whether a macro is used to the function is called.
+ * The library builder sets the default, if read functions are not
+ * built into the library the macro implementation is forced on.
+ */
+#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
+#  define PNG_USE_READ_MACROS
+#endif
+#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
+#  if PNG_DEFAULT_READ_MACROS
+#    define PNG_USE_READ_MACROS
+#  endif
+#endif
+
+/* COMPILER SPECIFIC OPTIONS.
+ *
+ * These options are provided so that a variety of difficult compilers
+ * can be used.  Some are fixed at build time (e.g. PNG_API_RULE
+ * below) but still have compiler specific implementations, others
+ * may be changed on a per-file basis when compiling against libpng.
+ */
+
+/* The PNGARG macro protects us against machines that don't have function
+ * prototypes (ie K&R style headers).  If your compiler does not handle
+ * function prototypes, define this macro and use the included ansi2knr.
+ * I've always been able to use _NO_PROTO as the indicator, but you may
+ * need to drag the empty declaration out in front of here, or change the
+ * ifdef to suit your own needs.
+ */
+#ifndef PNGARG
+
+#  ifdef OF /* zlib prototype munger */
+#    define PNGARG(arglist) OF(arglist)
+#  else
+
+#    ifdef _NO_PROTO
+#      define PNGARG(arglist) ()
+#    else
+#      define PNGARG(arglist) arglist
+#    endif /* _NO_PROTO */
+
+#  endif /* OF */
+
+#endif /* PNGARG */
+
+/* Function calling conventions.
+ * =============================
+ * Normally it is not necessary to specify to the compiler how to call
+ * a function - it just does it - however on x86 systems derived from
+ * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems
+ * and some others) there are multiple ways to call a function and the
+ * default can be changed on the compiler command line.  For this reason
+ * libpng specifies the calling convention of every exported function and
+ * every function called via a user supplied function pointer.  This is
+ * done in this file by defining the following macros:
+ *
+ * PNGAPI    Calling convention for exported functions.
+ * PNGCBAPI  Calling convention for user provided (callback) functions.
+ * PNGCAPI   Calling convention used by the ANSI-C library (required
+ *           for longjmp callbacks and sometimes used internally to
+ *           specify the calling convention for zlib).
+ *
+ * These macros should never be overridden.  If it is necessary to
+ * change calling convention in a private build this can be done
+ * by setting PNG_API_RULE (which defaults to 0) to one of the values
+ * below to select the correct 'API' variants.
+ *
+ * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout.
+ *                This is correct in every known environment.
+ * PNG_API_RULE=1 Use the operating system convention for PNGAPI and
+ *                the 'C' calling convention (from PNGCAPI) for
+ *                callbacks (PNGCBAPI).  This is no longer required
+ *                in any known environment - if it has to be used
+ *                please post an explanation of the problem to the
+ *                libpng mailing list.
+ *
+ * These cases only differ if the operating system does not use the C
+ * calling convention, at present this just means the above cases
+ * (x86 DOS/Windows sytems) and, even then, this does not apply to
+ * Cygwin running on those systems.
+ *
+ * Note that the value must be defined in pnglibconf.h so that what
+ * the application uses to call the library matches the conventions
+ * set when building the library.
+ */
+
+/* Symbol export
+ * =============
+ * When building a shared library it is almost always necessary to tell
+ * the compiler which symbols to export.  The png.h macro 'PNG_EXPORT'
+ * is used to mark the symbols.  On some systems these symbols can be
+ * extracted at link time and need no special processing by the compiler,
+ * on other systems the symbols are flagged by the compiler and just
+ * the declaration requires a special tag applied (unfortunately) in a
+ * compiler dependent way.  Some systems can do either.
+ *
+ * A small number of older systems also require a symbol from a DLL to
+ * be flagged to the program that calls it.  This is a problem because
+ * we do not know in the header file included by application code that
+ * the symbol will come from a shared library, as opposed to a statically
+ * linked one.  For this reason the application must tell us by setting
+ * the magic flag PNG_USE_DLL to turn on the special processing before
+ * it includes png.h.
+ *
+ * Four additional macros are used to make this happen:
+ *
+ * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from
+ *            the build or imported if PNG_USE_DLL is set - compiler
+ *            and system specific.
+ *
+ * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to
+ *                       'type', compiler specific.
+ *
+ * PNG_DLL_EXPORT Set to the magic to use during a libpng build to
+ *                make a symbol exported from the DLL.
+ *
+ * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come
+ *                from a DLL - used to define PNG_IMPEXP when
+ *                PNG_USE_DLL is set.
+ */
+
+/* System specific discovery.
+ * ==========================
+ * This code is used at build time to find PNG_IMPEXP, the API settings
+ * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
+ * import processing is possible.  On Windows/x86 systems it also sets
+ * compiler-specific macros to the values required to change the calling
+ * conventions of the various functions.
+ */
+#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
+      defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
+    ( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
+      defined(_M_X64) || defined(_M_IA64) )
+  /* Windows system (DOS doesn't support DLLs) running on x86/x64.  Includes
+   * builds under Cygwin or MinGW.  Also includes Watcom builds but these need
+   * special treatment because they are not compatible with GCC or Visual C
+   * because of different calling conventions.
+   */
+#  if PNG_API_RULE == 2
+    /* If this line results in an error, either because __watcall is not
+     * understood or because of a redefine just below you cannot use *this*
+     * build of the library with the compiler you are using.  *This* build was
+     * build using Watcom and applications must also be built using Watcom!
+     */
+#    define PNGCAPI __watcall
+#  endif
+
+#  if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
+#    define PNGCAPI __cdecl
+#    if PNG_API_RULE == 1
+#      define PNGAPI __stdcall
+#    endif
+#  else
+    /* An older compiler, or one not detected (erroneously) above,
+     * if necessary override on the command line to get the correct
+     * variants for the compiler.
+     */
+#    ifndef PNGCAPI
+#      define PNGCAPI _cdecl
+#    endif
+#    if PNG_API_RULE == 1 && !defined(PNGAPI)
+#      define PNGAPI _stdcall
+#    endif
+#  endif /* compiler/api */
+  /* NOTE: PNGCBAPI always defaults to PNGCAPI. */
+
+#  if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
+   ERROR: PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed
+#  endif
+
+#  if (defined(_MSC_VER) && _MSC_VER < 800) ||\
+      (defined(__BORLANDC__) && __BORLANDC__ < 0x500)
+    /* older Borland and MSC
+     * compilers used '__export' and required this to be after
+     * the type.
+     */
+#    ifndef PNG_EXPORT_TYPE
+#      define PNG_EXPORT_TYPE(type) type PNG_IMPEXP
+#    endif
+#    define PNG_DLL_EXPORT __export
+#  else /* newer compiler */
+#    define PNG_DLL_EXPORT __declspec(dllexport)
+#    ifndef PNG_DLL_IMPORT
+#      define PNG_DLL_IMPORT __declspec(dllimport)
+#    endif
+#  endif /* compiler */
+
+#else /* !Windows/x86 */
+#  if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
+#    define PNGAPI _System
+#  else /* !Windows/x86 && !OS/2 */
+    /* Use the defaults, or define PNG*API on the command line (but
+     * this will have to be done for every compile!)
+     */
+#  endif /* other system, !OS/2 */
+#endif /* !Windows/x86 */
+
+/* Now do all the defaulting . */
+#ifndef PNGCAPI
+#  define PNGCAPI
+#endif
+#ifndef PNGCBAPI
+#  define PNGCBAPI PNGCAPI
+#endif
+#ifndef PNGAPI
+#  define PNGAPI PNGCAPI
+#endif
+
+/* The default for PNG_IMPEXP depends on whether the library is
+ * being built or used.
+ */
+#ifndef PNG_IMPEXP
+#  ifdef PNGLIB_BUILD
+    /* Building the library */
+#    if (defined(DLL_EXPORT)/*from libtool*/ ||\
+        defined(_WINDLL) || defined(_DLL) || defined(__DLL__) ||\
+        defined(_USRDLL) ||\
+        defined(PNG_BUILD_DLL)) && defined(PNG_DLL_EXPORT)
+      /* Building a DLL. */
+#      define PNG_IMPEXP PNG_DLL_EXPORT
+#    endif /* DLL */
+#  else
+    /* Using the library */
+#    if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT)
+      /* This forces use of a DLL, disallowing static linking */
+#      define PNG_IMPEXP PNG_DLL_IMPORT
+#    endif
+#  endif
+
+#  ifndef PNG_IMPEXP
+#    define PNG_IMPEXP
+#  endif
+#endif
+
+/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat
+ * 'attributes' as a storage class - the attributes go at the start of the
+ * function definition, and attributes are always appended regardless of the
+ * compiler.  This considerably simplifies these macros but may cause problems
+ * if any compilers both need function attributes and fail to handle them as
+ * a storage class (this is unlikely.)
+ */
+#ifndef PNG_FUNCTION
+#  define PNG_FUNCTION(type, name, args, attributes) attributes type name args
+#endif
+
+#ifndef PNG_EXPORT_TYPE
+#  define PNG_EXPORT_TYPE(type) PNG_IMPEXP type
+#endif
+
+   /* The ordinal value is only relevant when preprocessing png.h for symbol
+    * table entries, so we discard it here.  See the .dfn files in the
+    * scripts directory.
+    */
+#ifndef PNG_EXPORTA
+
+#  define PNG_EXPORTA(ordinal, type, name, args, attributes)\
+      PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \
+        extern attributes)
+#endif
+
+/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument,
+ * so make something non-empty to satisfy the requirement:
+ */
+#define PNG_EMPTY /*empty list*/
+
+#define PNG_EXPORT(ordinal, type, name, args)\
+   PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY)
+
+/* Use PNG_REMOVED to comment out a removed interface. */
+#ifndef PNG_REMOVED
+#  define PNG_REMOVED(ordinal, type, name, args, attributes)
+#endif
+
+#ifndef PNG_CALLBACK
+#  define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args)
+#endif
+
+/* Support for compiler specific function attributes.  These are used
+ * so that where compiler support is available incorrect use of API
+ * functions in png.h will generate compiler warnings.
+ *
+ * Added at libpng-1.2.41.
+ */
+
+#ifndef PNG_NO_PEDANTIC_WARNINGS
+#  ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
+#    define PNG_PEDANTIC_WARNINGS_SUPPORTED
+#  endif
+#endif
+
+#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
+  /* Support for compiler specific function attributes.  These are used
+   * so that where compiler support is available incorrect use of API
+   * functions in png.h will generate compiler warnings.  Added at libpng
+   * version 1.2.41.
+   */
+#  if defined(__GNUC__)
+#    ifndef PNG_USE_RESULT
+#      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
+#    endif
+#    ifndef PNG_NORETURN
+#      define PNG_NORETURN   __attribute__((__noreturn__))
+#    endif
+#    ifndef PNG_ALLOCATED
+#      define PNG_ALLOCATED  __attribute__((__malloc__))
+#    endif
+
+    /* This specifically protects structure members that should only be
+     * accessed from within the library, therefore should be empty during
+     * a library build.
+     */
+#    ifndef PNGLIB_BUILD
+#      ifndef PNG_DEPRECATED
+#        define PNG_DEPRECATED __attribute__((__deprecated__))
+#      endif
+#      ifndef PNG_PRIVATE
+#        if 0 /* Doesn't work so we use deprecated instead*/
+#          define PNG_PRIVATE \
+            __attribute__((warning("This function is not exported by libpng.")))
+#        else
+#          define PNG_PRIVATE \
+            __attribute__((__deprecated__))
+#        endif
+#      endif
+#    endif /* PNGLIB_BUILD */
+#  endif /* __GNUC__ */
+
+#  if defined(_MSC_VER)  && (_MSC_VER >= 1300)
+#    ifndef PNG_USE_RESULT
+#      define PNG_USE_RESULT /* not supported */
+#    endif
+#    ifndef PNG_NORETURN
+#      define PNG_NORETURN   __declspec(noreturn)
+#    endif
+#    ifndef PNG_ALLOCATED
+#      if (_MSC_VER >= 1400)
+#        define PNG_ALLOCATED __declspec(restrict)
+#      endif
+#    endif
+
+    /* This specifically protects structure members that should only be
+     * accessed from within the library, therefore should be empty during
+     * a library build.
+     */
+#    ifndef PNGLIB_BUILD
+#      ifndef PNG_DEPRECATED
+#        define PNG_DEPRECATED __declspec(deprecated)
+#      endif
+#      ifndef PNG_PRIVATE
+#        define PNG_PRIVATE __declspec(deprecated)
+#      endif
+#    endif /* PNGLIB_BUILD */
+#  endif /* _MSC_VER */
+#endif /* PNG_PEDANTIC_WARNINGS */
+
+#ifndef PNG_DEPRECATED
+#  define PNG_DEPRECATED  /* Use of this function is deprecated */
+#endif
+#ifndef PNG_USE_RESULT
+#  define PNG_USE_RESULT  /* The result of this function must be checked */
+#endif
+#ifndef PNG_NORETURN
+#  define PNG_NORETURN    /* This function does not return */
+#endif
+#ifndef PNG_ALLOCATED
+#  define PNG_ALLOCATED   /* The result of the function is new memory */
+#endif
+#ifndef PNG_PRIVATE
+#  define PNG_PRIVATE     /* This is a private libpng function */
+#endif
+#ifndef PNG_FP_EXPORT     /* A floating point API. */
+#  ifdef PNG_FLOATING_POINT_SUPPORTED
+#     define PNG_FP_EXPORT(ordinal, type, name, args)\
+         PNG_EXPORT(ordinal, type, name, args)
+#  else                   /* No floating point APIs */
+#     define PNG_FP_EXPORT(ordinal, type, name, args)
+#  endif
+#endif
+#ifndef PNG_FIXED_EXPORT  /* A fixed point API. */
+#  ifdef PNG_FIXED_POINT_SUPPORTED
+#     define PNG_FIXED_EXPORT(ordinal, type, name, args)\
+         PNG_EXPORT(ordinal, type, name, args)
+#  else                   /* No fixed point APIs */
+#     define PNG_FIXED_EXPORT(ordinal, type, name, args)
+#  endif
+#endif
+
+/* The following uses const char * instead of char * for error
+ * and warning message functions, so some compilers won't complain.
+ * If you do not want to use const, define PNG_NO_CONST here.
+ *
+ * This should not change how the APIs are called, so it can be done
+ * on a per-file basis in the application.
+ */
+#ifndef PNG_CONST
+#  ifndef PNG_NO_CONST
+#    define PNG_CONST const
+#  else
+#    define PNG_CONST
+#  endif
+#endif
+
+/* Some typedefs to get us started.  These should be safe on most of the
+ * common platforms.  The typedefs should be at least as large as the
+ * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
+ * don't have to be exactly that size.  Some compilers dislike passing
+ * unsigned shorts as function parameters, so you may be better off using
+ * unsigned int for png_uint_16.
+ */
+
+#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL)
+typedef unsigned int png_uint_32;
+typedef int png_int_32;
+#else
+typedef unsigned long png_uint_32;
+typedef long png_int_32;
+#endif
+typedef unsigned short png_uint_16;
+typedef short png_int_16;
+typedef unsigned char png_byte;
+
+#ifdef PNG_NO_SIZE_T
+typedef unsigned int png_size_t;
+#else
+typedef size_t png_size_t;
+#endif
+#define png_sizeof(x) (sizeof (x))
+
+/* The following is needed for medium model support.  It cannot be in the
+ * pngpriv.h header.  Needs modification for other compilers besides
+ * MSC.  Model independent support declares all arrays and pointers to be
+ * large using the far keyword.  The zlib version used must also support
+ * model independent data.  As of version zlib 1.0.4, the necessary changes
+ * have been made in zlib.  The USE_FAR_KEYWORD define triggers other
+ * changes that are needed. (Tim Wegner)
+ */
+
+/* Separate compiler dependencies (problem here is that zlib.h always
+ * defines FAR. (SJT)
+ */
+#ifdef __BORLANDC__
+#  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
+#    define LDATA 1
+#  else
+#    define LDATA 0
+#  endif
+  /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */
+#  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
+#    define PNG_MAX_MALLOC_64K /* only used in build */
+#    if (LDATA != 1)
+#      ifndef FAR
+#        define FAR __far
+#      endif
+#      define USE_FAR_KEYWORD
+#    endif   /* LDATA != 1 */
+         /* Possibly useful for moving data out of default segment.
+          * Uncomment it if you want. Could also define FARDATA as
+          * const if your compiler supports it. (SJT)
+#        define FARDATA FAR
+          */
+#  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */
+#endif   /* __BORLANDC__ */
+
+
+/* Suggest testing for specific compiler first before testing for
+ * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,
+ * making reliance oncertain keywords suspect. (SJT)
+ */
+
+/* MSC Medium model */
+#ifdef FAR
+#  ifdef M_I86MM
+#    define USE_FAR_KEYWORD
+#    define FARDATA FAR
+#    include <dos.h>
+#  endif
+#endif
+
+/* SJT: default case */
+#ifndef FAR
+#  define FAR
+#endif
+
+/* At this point FAR is always defined */
+#ifndef FARDATA
+#  define FARDATA
+#endif
+
+/* Typedef for floating-point numbers that are converted
+ * to fixed-point with a multiple of 100,000, e.g., gamma
+ */
+typedef png_int_32 png_fixed_point;
+
+/* Add typedefs for pointers */
+typedef void                      FAR * png_voidp;
+typedef PNG_CONST void            FAR * png_const_voidp;
+typedef png_byte                  FAR * png_bytep;
+typedef PNG_CONST png_byte        FAR * png_const_bytep;
+typedef png_uint_32               FAR * png_uint_32p;
+typedef PNG_CONST png_uint_32     FAR * png_const_uint_32p;
+typedef png_int_32                FAR * png_int_32p;
+typedef PNG_CONST png_int_32      FAR * png_const_int_32p;
+typedef png_uint_16               FAR * png_uint_16p;
+typedef PNG_CONST png_uint_16     FAR * png_const_uint_16p;
+typedef png_int_16                FAR * png_int_16p;
+typedef PNG_CONST png_int_16      FAR * png_const_int_16p;
+typedef char                      FAR * png_charp;
+typedef PNG_CONST char            FAR * png_const_charp;
+typedef png_fixed_point           FAR * png_fixed_point_p;
+typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p;
+typedef png_size_t                FAR * png_size_tp;
+typedef PNG_CONST png_size_t      FAR * png_const_size_tp;
+
+#ifdef PNG_STDIO_SUPPORTED
+typedef FILE            * png_FILE_p;
+#endif
+
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+typedef double           FAR * png_doublep;
+typedef PNG_CONST double FAR * png_const_doublep;
+#endif
+
+/* Pointers to pointers; i.e. arrays */
+typedef png_byte        FAR * FAR * png_bytepp;
+typedef png_uint_32     FAR * FAR * png_uint_32pp;
+typedef png_int_32      FAR * FAR * png_int_32pp;
+typedef png_uint_16     FAR * FAR * png_uint_16pp;
+typedef png_int_16      FAR * FAR * png_int_16pp;
+typedef PNG_CONST char  FAR * FAR * png_const_charpp;
+typedef char            FAR * FAR * png_charpp;
+typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+typedef double          FAR * FAR * png_doublepp;
+#endif
+
+/* Pointers to pointers to pointers; i.e., pointer to array */
+typedef char            FAR * FAR * FAR * png_charppp;
+
+/* png_alloc_size_t is guaranteed to be no smaller than png_size_t,
+ * and no smaller than png_uint_32.  Casts from png_size_t or png_uint_32
+ * to png_alloc_size_t are not necessary; in fact, it is recommended
+ * not to use them at all so that the compiler can complain when something
+ * turns out to be problematic.
+ * Casts in the other direction (from png_alloc_size_t to png_size_t or
+ * png_uint_32) should be explicitly applied; however, we do not expect
+ * to encounter practical situations that require such conversions.
+ */
+#if defined(__TURBOC__) && !defined(__FLAT__)
+   typedef unsigned long png_alloc_size_t;
+#else
+#  if defined(_MSC_VER) && defined(MAXSEG_64K)
+     typedef unsigned long    png_alloc_size_t;
+#  else
+     /* This is an attempt to detect an old Windows system where (int) is
+      * actually 16 bits, in that case png_malloc must have an argument with a
+      * bigger size to accomodate the requirements of the library.
+      */
+#    if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
+        (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
+       typedef DWORD         png_alloc_size_t;
+#    else
+       typedef png_size_t    png_alloc_size_t;
+#    endif
+#  endif
+#endif
+
+#endif /* PNGCONF_H */

Copied: branches/branch-3.0/include/fltk3png/pngdebug.h (from rev 8987, branches/branch-3.0/png/pngdebug.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/pngdebug.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/pngdebug.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,157 @@
+
+/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+/* Define PNG_DEBUG at compile time for debugging information.  Higher
+ * numbers for PNG_DEBUG mean more debugging information.  This has
+ * only been added since version 0.95 so it is not implemented throughout
+ * libpng yet, but more support will be added as needed.
+ *
+ * png_debug[1-2]?(level, message ,arg{0-2})
+ *   Expands to a statement (either a simple expression or a compound
+ *   do..while(0) statement) that outputs a message with parameter
+ *   substitution if PNG_DEBUG is defined to 2 or more.  If PNG_DEBUG
+ *   is undefined, 0 or 1 every png_debug expands to a simple expression
+ *   (actually ((void)0)).
+ *
+ *   level: level of detail of message, starting at 0.  A level 'n'
+ *          message is preceded by 'n' tab characters (not implemented
+ *          on Microsoft compilers unless PNG_DEBUG_FILE is also
+ *          defined, to allow debug DLL compilation with no standard IO).
+ *   message: a printf(3) style text string.  A trailing '\n' is added
+ *            to the message.
+ *   arg: 0 to 2 arguments for printf(3) style substitution in message.
+ */
+#ifndef PNGDEBUG_H
+#define PNGDEBUG_H
+/* These settings control the formatting of messages in png.c and pngerror.c */
+/* Moved to pngdebug.h at 1.5.0 */
+#  ifndef PNG_LITERAL_SHARP
+#    define PNG_LITERAL_SHARP 0x23
+#  endif
+#  ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
+#    define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
+#  endif
+#  ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
+#    define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
+#  endif
+#  ifndef PNG_STRING_NEWLINE
+#    define PNG_STRING_NEWLINE "\n"
+#  endif
+
+#ifdef PNG_DEBUG
+#  if (PNG_DEBUG > 0)
+#    if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
+#      include <crtdbg.h>
+#      if (PNG_DEBUG > 1)
+#        ifndef _DEBUG
+#          define _DEBUG
+#        endif
+#        ifndef png_debug
+#          define png_debug(l,m)  _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
+#        endif
+#        ifndef png_debug1
+#          define png_debug1(l,m,p1)  _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
+#        endif
+#        ifndef png_debug2
+#          define png_debug2(l,m,p1,p2) \
+             _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
+#        endif
+#      endif
+#    else /* PNG_DEBUG_FILE || !_MSC_VER */
+#      ifndef PNG_STDIO_SUPPORTED
+#        include <stdio.h> /* not included yet */
+#      endif
+#      ifndef PNG_DEBUG_FILE
+#        define PNG_DEBUG_FILE stderr
+#      endif /* PNG_DEBUG_FILE */
+
+#      if (PNG_DEBUG > 1)
+/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
+ * non-ISO compilers
+ */
+#        ifdef __STDC__
+#          ifndef png_debug
+#            define png_debug(l,m) \
+       do { \
+       int num_tabs=l; \
+       fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
+       } while (0)
+#          endif
+#          ifndef png_debug1
+#            define png_debug1(l,m,p1) \
+       do { \
+       int num_tabs=l; \
+       fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
+       } while (0)
+#          endif
+#          ifndef png_debug2
+#            define png_debug2(l,m,p1,p2) \
+       do { \
+       int num_tabs=l; \
+       fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
+       } while (0)
+#          endif
+#        else /* __STDC __ */
+#          ifndef png_debug
+#            define png_debug(l,m) \
+       do { \
+       int num_tabs=l; \
+       char format[256]; \
+       snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+         m,PNG_STRING_NEWLINE); \
+       fprintf(PNG_DEBUG_FILE,format); \
+       } while (0)
+#          endif
+#          ifndef png_debug1
+#            define png_debug1(l,m,p1) \
+       do { \
+       int num_tabs=l; \
+       char format[256]; \
+       snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+         m,PNG_STRING_NEWLINE); \
+       fprintf(PNG_DEBUG_FILE,format,p1); \
+       } while (0)
+#          endif
+#          ifndef png_debug2
+#            define png_debug2(l,m,p1,p2) \
+       do { \
+       int num_tabs=l; \
+       char format[256]; \
+       snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+         m,PNG_STRING_NEWLINE); \
+       fprintf(PNG_DEBUG_FILE,format,p1,p2); \
+       } while (0)
+#          endif
+#        endif /* __STDC __ */
+#      endif /* (PNG_DEBUG > 1) */
+
+#    endif /* _MSC_VER */
+#  endif /* (PNG_DEBUG > 0) */
+#endif /* PNG_DEBUG */
+#ifndef png_debug
+#  define png_debug(l, m) ((void)0)
+#endif
+#ifndef png_debug1
+#  define png_debug1(l, m, p1) ((void)0)
+#endif
+#ifndef png_debug2
+#  define png_debug2(l, m, p1, p2) ((void)0)
+#endif
+#endif /* PNGDEBUG_H */

Copied: branches/branch-3.0/include/fltk3png/pnginfo.h (from rev 8987, branches/branch-3.0/png/pnginfo.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/pnginfo.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/pnginfo.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,269 @@
+
+/* pnginfo.h - header file for PNG reference library
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+ /* png_info is a structure that holds the information in a PNG file so
+ * that the application can find out the characteristics of the image.
+ * If you are reading the file, this structure will tell you what is
+ * in the PNG file.  If you are writing the file, fill in the information
+ * you want to put into the PNG file, using png_set_*() functions, then
+ * call png_write_info().
+ *
+ * The names chosen should be very close to the PNG specification, so
+ * consult that document for information about the meaning of each field.
+ *
+ * With libpng < 0.95, it was only possible to directly set and read the
+ * the values in the png_info_struct, which meant that the contents and
+ * order of the values had to remain fixed.  With libpng 0.95 and later,
+ * however, there are now functions that abstract the contents of
+ * png_info_struct from the application, so this makes it easier to use
+ * libpng with dynamic libraries, and even makes it possible to use
+ * libraries that don't have all of the libpng ancillary chunk-handing
+ * functionality.  In libpng-1.5.0 this was moved into a separate private
+ * file that is not visible to applications.
+ *
+ * The following members may have allocated storage attached that should be
+ * cleaned up before the structure is discarded: palette, trans, text,
+ * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
+ * splt_palettes, scal_unit, row_pointers, and unknowns.   By default, these
+ * are automatically freed when the info structure is deallocated, if they were
+ * allocated internally by libpng.  This behavior can be changed by means
+ * of the png_data_freer() function.
+ *
+ * More allocation details: all the chunk-reading functions that
+ * change these members go through the corresponding png_set_*
+ * functions.  A function to clear these members is available: see
+ * png_free_data().  The png_set_* functions do not depend on being
+ * able to point info structure members to any of the storage they are
+ * passed (they make their own copies), EXCEPT that the png_set_text
+ * functions use the same storage passed to them in the text_ptr or
+ * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
+ * functions do not make their own copies.
+ */
+#ifndef PNGINFO_H
+#define PNGINFO_H
+
+struct png_info_def
+{
+   /* the following are necessary for every PNG file */
+   png_uint_32 width;  /* width of image in pixels (from IHDR) */
+   png_uint_32 height; /* height of image in pixels (from IHDR) */
+   png_uint_32 valid;  /* valid chunk data (see PNG_INFO_ below) */
+   png_size_t rowbytes; /* bytes needed to hold an untransformed row */
+   png_colorp palette;      /* array of color values (valid & PNG_INFO_PLTE) */
+   png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
+   png_uint_16 num_trans;   /* number of transparent palette color (tRNS) */
+   png_byte bit_depth;      /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
+   png_byte color_type;     /* see PNG_COLOR_TYPE_ below (from IHDR) */
+   /* The following three should have been named *_method not *_type */
+   png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
+   png_byte filter_type;    /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
+   png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
+
+   /* The following is informational only on read, and not used on writes. */
+   png_byte channels;       /* number of data channels per pixel (1, 2, 3, 4) */
+   png_byte pixel_depth;    /* number of bits per pixel */
+   png_byte spare_byte;     /* to align the data, and for future use */
+   png_byte signature[8];   /* magic bytes read by libpng from start of file */
+
+   /* The rest of the data is optional.  If you are reading, check the
+    * valid field to see if the information in these are valid.  If you
+    * are writing, set the valid field to those chunks you want written,
+    * and initialize the appropriate fields below.
+    */
+
+#if defined(PNG_gAMA_SUPPORTED)
+   /* The gAMA chunk describes the gamma characteristics of the system
+    * on which the image was created, normally in the range [1.0, 2.5].
+    * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
+    */
+   png_fixed_point gamma;
+#endif
+
+#ifdef PNG_sRGB_SUPPORTED
+    /* GR-P, 0.96a */
+    /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
+   png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
+#endif
+
+#ifdef PNG_TEXT_SUPPORTED
+   /* The tEXt, and zTXt chunks contain human-readable textual data in
+    * uncompressed, compressed, and optionally compressed forms, respectively.
+    * The data in "text" is an array of pointers to uncompressed,
+    * null-terminated C strings. Each chunk has a keyword that describes the
+    * textual data contained in that chunk.  Keywords are not required to be
+    * unique, and the text string may be empty.  Any number of text chunks may
+    * be in an image.
+    */
+   int num_text; /* number of comments read or comments to write */
+   int max_text; /* current size of text array */
+   png_textp text; /* array of comments read or comments to write */
+#endif /* PNG_TEXT_SUPPORTED */
+
+#ifdef PNG_tIME_SUPPORTED
+   /* The tIME chunk holds the last time the displayed image data was
+    * modified.  See the png_time struct for the contents of this struct.
+    */
+   png_time mod_time;
+#endif
+
+#ifdef PNG_sBIT_SUPPORTED
+   /* The sBIT chunk specifies the number of significant high-order bits
+    * in the pixel data.  Values are in the range [1, bit_depth], and are
+    * only specified for the channels in the pixel data.  The contents of
+    * the low-order bits is not specified.  Data is valid if
+    * (valid & PNG_INFO_sBIT) is non-zero.
+    */
+   png_color_8 sig_bit; /* significant bits in color channels */
+#endif
+
+#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
+defined(PNG_READ_BACKGROUND_SUPPORTED)
+   /* The tRNS chunk supplies transparency data for paletted images and
+    * other image types that don't need a full alpha channel.  There are
+    * "num_trans" transparency values for a paletted image, stored in the
+    * same order as the palette colors, starting from index 0.  Values
+    * for the data are in the range [0, 255], ranging from fully transparent
+    * to fully opaque, respectively.  For non-paletted images, there is a
+    * single color specified that should be treated as fully transparent.
+    * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
+    */
+   png_bytep trans_alpha;    /* alpha values for paletted image */
+   png_color_16 trans_color; /* transparent color for non-palette image */
+#endif
+
+#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+   /* The bKGD chunk gives the suggested image background color if the
+    * display program does not have its own background color and the image
+    * is needs to composited onto a background before display.  The colors
+    * in "background" are normally in the same color space/depth as the
+    * pixel data.  Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
+    */
+   png_color_16 background;
+#endif
+
+#ifdef PNG_oFFs_SUPPORTED
+   /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
+    * and downwards from the top-left corner of the display, page, or other
+    * application-specific co-ordinate space.  See the PNG_OFFSET_ defines
+    * below for the unit types.  Valid if (valid & PNG_INFO_oFFs) non-zero.
+    */
+   png_int_32 x_offset; /* x offset on page */
+   png_int_32 y_offset; /* y offset on page */
+   png_byte offset_unit_type; /* offset units type */
+#endif
+
+#ifdef PNG_pHYs_SUPPORTED
+   /* The pHYs chunk gives the physical pixel density of the image for
+    * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
+    * defines below).  Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
+    */
+   png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
+   png_uint_32 y_pixels_per_unit; /* vertical pixel density */
+   png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
+#endif
+
+#ifdef PNG_hIST_SUPPORTED
+   /* The hIST chunk contains the relative frequency or importance of the
+    * various palette entries, so that a viewer can intelligently select a
+    * reduced-color palette, if required.  Data is an array of "num_palette"
+    * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
+    * is non-zero.
+    */
+   png_uint_16p hist;
+#endif
+
+#ifdef PNG_cHRM_SUPPORTED
+   /* The cHRM chunk describes the CIE color characteristics of the monitor
+    * on which the PNG was created.  This data allows the viewer to do gamut
+    * mapping of the input image to ensure that the viewer sees the same
+    * colors in the image as the creator.  Values are in the range
+    * [0.0, 0.8].  Data valid if (valid & PNG_INFO_cHRM) non-zero.
+    */
+   png_fixed_point x_white;
+   png_fixed_point y_white;
+   png_fixed_point x_red;
+   png_fixed_point y_red;
+   png_fixed_point x_green;
+   png_fixed_point y_green;
+   png_fixed_point x_blue;
+   png_fixed_point y_blue;
+#endif
+
+#ifdef PNG_pCAL_SUPPORTED
+   /* The pCAL chunk describes a transformation between the stored pixel
+    * values and original physical data values used to create the image.
+    * The integer range [0, 2^bit_depth - 1] maps to the floating-point
+    * range given by [pcal_X0, pcal_X1], and are further transformed by a
+    * (possibly non-linear) transformation function given by "pcal_type"
+    * and "pcal_params" into "pcal_units".  Please see the PNG_EQUATION_
+    * defines below, and the PNG-Group's PNG extensions document for a
+    * complete description of the transformations and how they should be
+    * implemented, and for a description of the ASCII parameter strings.
+    * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
+    */
+   png_charp pcal_purpose;  /* pCAL chunk description string */
+   png_int_32 pcal_X0;      /* minimum value */
+   png_int_32 pcal_X1;      /* maximum value */
+   png_charp pcal_units;    /* Latin-1 string giving physical units */
+   png_charpp pcal_params;  /* ASCII strings containing parameter values */
+   png_byte pcal_type;      /* equation type (see PNG_EQUATION_ below) */
+   png_byte pcal_nparams;   /* number of parameters given in pcal_params */
+#endif
+
+/* New members added in libpng-1.0.6 */
+   png_uint_32 free_me;     /* flags items libpng is responsible for freeing */
+
+#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
+ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+   /* Storage for unknown chunks that the library doesn't recognize. */
+   png_unknown_chunkp unknown_chunks;
+   int unknown_chunks_num;
+#endif
+
+#ifdef PNG_iCCP_SUPPORTED
+   /* iCCP chunk data. */
+   png_charp iccp_name;     /* profile name */
+   png_bytep iccp_profile;  /* International Color Consortium profile data */
+   png_uint_32 iccp_proflen;  /* ICC profile data length */
+   png_byte iccp_compression; /* Always zero */
+#endif
+
+#ifdef PNG_sPLT_SUPPORTED
+   /* Data on sPLT chunks (there may be more than one). */
+   png_sPLT_tp splt_palettes;
+   png_uint_32 splt_palettes_num;
+#endif
+
+#ifdef PNG_sCAL_SUPPORTED
+   /* The sCAL chunk describes the actual physical dimensions of the
+    * subject matter of the graphic.  The chunk contains a unit specification
+    * a byte value, and two ASCII strings representing floating-point
+    * values.  The values are width and height corresponsing to one pixel
+    * in the image.  Data values are valid if (valid & PNG_INFO_sCAL) is
+    * non-zero.
+    */
+   png_byte scal_unit;         /* unit of physical scale */
+   png_charp scal_s_width;     /* string containing height */
+   png_charp scal_s_height;    /* string containing width */
+#endif
+
+#ifdef PNG_INFO_IMAGE_SUPPORTED
+   /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS)
+      non-zero */
+   /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
+   png_bytepp row_pointers;        /* the image bits */
+#endif
+
+};
+#endif /* PNGINFO_H */

Copied: branches/branch-3.0/include/fltk3png/pnglibconf.h (from rev 8987, branches/branch-3.0/png/pnglibconf.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/pnglibconf.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/pnglibconf.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,187 @@
+
+/* libpng STANDARD API DEFINITION */
+
+/* pnglibconf.h - library build configuration */
+
+/* libpng version 1.5.4 - last changed on June 22, 2011 */
+
+/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
+
+/* This code is released under the libpng license. */
+/* For conditions of distribution and use, see the disclaimer */
+/* and license in png.h */
+
+/* pnglibconf.h */
+/* Derived from: scripts/pnglibconf.dfa */
+/* If you edit this file by hand you must obey the rules expressed in */
+/* pnglibconf.dfa with respect to the dependencies between the following */
+/* symbols.  It is much better to generate a new file using */
+/* scripts/libpngconf.mak */
+
+#ifndef PNGLCONF_H
+#define PNGLCONF_H
+/* settings */
+#define PNG_API_RULE 0
+#define PNG_CALLOC_SUPPORTED
+#define PNG_COST_SHIFT 3
+#define PNG_DEFAULT_READ_MACROS 1
+#define PNG_GAMMA_THRESHOLD_FIXED 5000
+#define PNG_MAX_GAMMA_8 11
+#define PNG_QUANTIZE_BLUE_BITS 5
+#define PNG_QUANTIZE_GREEN_BITS 5
+#define PNG_QUANTIZE_RED_BITS 5
+#define PNG_sCAL_PRECISION 5
+#define PNG_USER_CHUNK_CACHE_MAX 0
+#define PNG_USER_CHUNK_MALLOC_MAX 0
+#define PNG_USER_HEIGHT_MAX 1000000L
+#define PNG_USER_WIDTH_MAX 1000000L
+#define PNG_WEIGHT_SHIFT 8
+#define PNG_ZBUF_SIZE 8192
+/* end of settings */
+/* options */
+#define PNG_16BIT_SUPPORTED
+#define PNG_ALIGN_MEMORY_SUPPORTED
+#define PNG_BENIGN_ERRORS_SUPPORTED
+#define PNG_bKGD_SUPPORTED
+#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
+#define PNG_CHECK_cHRM_SUPPORTED
+#define PNG_cHRM_SUPPORTED
+#define PNG_CONSOLE_IO_SUPPORTED
+#define PNG_CONVERT_tIME_SUPPORTED
+#define PNG_EASY_ACCESS_SUPPORTED
+/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
+#define PNG_ERROR_TEXT_SUPPORTED
+#define PNG_FIXED_POINT_SUPPORTED
+#define PNG_FLOATING_ARITHMETIC_SUPPORTED
+#define PNG_FLOATING_POINT_SUPPORTED
+#define PNG_gAMA_SUPPORTED
+#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+#define PNG_hIST_SUPPORTED
+#define PNG_iCCP_SUPPORTED
+#define PNG_INCH_CONVERSIONS_SUPPORTED
+#define PNG_INFO_IMAGE_SUPPORTED
+#define PNG_IO_STATE_SUPPORTED
+#define PNG_iTXt_SUPPORTED
+#define PNG_MNG_FEATURES_SUPPORTED
+#define PNG_oFFs_SUPPORTED
+#define PNG_pCAL_SUPPORTED
+#define PNG_pHYs_SUPPORTED
+#define PNG_POINTER_INDEXING_SUPPORTED
+#define PNG_PROGRESSIVE_READ_SUPPORTED
+#define PNG_READ_16BIT_SUPPORTED
+#define PNG_READ_ALPHA_MODE_SUPPORTED
+#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
+#define PNG_READ_BACKGROUND_SUPPORTED
+#define PNG_READ_BGR_SUPPORTED
+#define PNG_READ_bKGD_SUPPORTED
+#define PNG_READ_cHRM_SUPPORTED
+#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
+#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
+#define PNG_READ_EXPAND_16_SUPPORTED
+#define PNG_READ_EXPAND_SUPPORTED
+#define PNG_READ_FILLER_SUPPORTED
+#define PNG_READ_gAMA_SUPPORTED
+#define PNG_READ_GAMMA_SUPPORTED
+#define PNG_READ_GRAY_TO_RGB_SUPPORTED
+#define PNG_READ_hIST_SUPPORTED
+#define PNG_READ_iCCP_SUPPORTED
+#define PNG_READ_INTERLACING_SUPPORTED
+#define PNG_READ_INT_FUNCTIONS_SUPPORTED
+#define PNG_READ_INVERT_ALPHA_SUPPORTED
+#define PNG_READ_INVERT_SUPPORTED
+#define PNG_READ_iTXt_SUPPORTED
+#define PNG_READ_oFFs_SUPPORTED
+#define PNG_READ_OPT_PLTE_SUPPORTED
+#define PNG_READ_PACK_SUPPORTED
+#define PNG_READ_PACKSWAP_SUPPORTED
+#define PNG_READ_pCAL_SUPPORTED
+#define PNG_READ_pHYs_SUPPORTED
+#define PNG_READ_QUANTIZE_SUPPORTED
+#define PNG_READ_RGB_TO_GRAY_SUPPORTED
+#define PNG_READ_sBIT_SUPPORTED
+#define PNG_READ_SCALE_16_TO_8_SUPPORTED
+#define PNG_READ_sCAL_SUPPORTED
+#define PNG_READ_SHIFT_SUPPORTED
+#define PNG_READ_sPLT_SUPPORTED
+#define PNG_READ_sRGB_SUPPORTED
+#define PNG_READ_STRIP_16_TO_8_SUPPORTED
+#define PNG_READ_STRIP_ALPHA_SUPPORTED
+#define PNG_READ_SUPPORTED
+#define PNG_READ_SWAP_ALPHA_SUPPORTED
+#define PNG_READ_SWAP_SUPPORTED
+#define PNG_READ_tEXt_SUPPORTED
+#define PNG_READ_TEXT_SUPPORTED
+#define PNG_READ_tIME_SUPPORTED
+#define PNG_READ_TRANSFORMS_SUPPORTED
+#define PNG_READ_tRNS_SUPPORTED
+#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
+#define PNG_READ_USER_CHUNKS_SUPPORTED
+#define PNG_READ_USER_TRANSFORM_SUPPORTED
+#define PNG_READ_zTXt_SUPPORTED
+#define PNG_SAVE_INT_32_SUPPORTED
+#define PNG_sBIT_SUPPORTED
+#define PNG_sCAL_SUPPORTED
+#define PNG_SEQUENTIAL_READ_SUPPORTED
+#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
+#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
+#define PNG_SETJMP_SUPPORTED
+#define PNG_SET_USER_LIMITS_SUPPORTED
+#define PNG_sPLT_SUPPORTED
+#define PNG_sRGB_SUPPORTED
+#define PNG_STDIO_SUPPORTED
+#define PNG_tEXt_SUPPORTED
+#define PNG_TEXT_SUPPORTED
+#define PNG_TIME_RFC1123_SUPPORTED
+#define PNG_tIME_SUPPORTED
+#define PNG_tRNS_SUPPORTED
+#define PNG_UNKNOWN_CHUNKS_SUPPORTED
+#define PNG_USER_CHUNKS_SUPPORTED
+#define PNG_USER_LIMITS_SUPPORTED
+#define PNG_USER_MEM_SUPPORTED
+#define PNG_USER_TRANSFORM_INFO_SUPPORTED
+#define PNG_USER_TRANSFORM_PTR_SUPPORTED
+#define PNG_WARNINGS_SUPPORTED
+#define PNG_WRITE_16BIT_SUPPORTED
+#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
+#define PNG_WRITE_BGR_SUPPORTED
+#define PNG_WRITE_bKGD_SUPPORTED
+#define PNG_WRITE_cHRM_SUPPORTED
+#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
+#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
+#define PNG_WRITE_FILLER_SUPPORTED
+#define PNG_WRITE_FILTER_SUPPORTED
+#define PNG_WRITE_FLUSH_SUPPORTED
+#define PNG_WRITE_gAMA_SUPPORTED
+#define PNG_WRITE_hIST_SUPPORTED
+#define PNG_WRITE_iCCP_SUPPORTED
+#define PNG_WRITE_INTERLACING_SUPPORTED
+#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
+#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
+#define PNG_WRITE_INVERT_SUPPORTED
+#define PNG_WRITE_iTXt_SUPPORTED
+#define PNG_WRITE_oFFs_SUPPORTED
+#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
+#define PNG_WRITE_PACK_SUPPORTED
+#define PNG_WRITE_PACKSWAP_SUPPORTED
+#define PNG_WRITE_pCAL_SUPPORTED
+#define PNG_WRITE_pHYs_SUPPORTED
+#define PNG_WRITE_sBIT_SUPPORTED
+#define PNG_WRITE_sCAL_SUPPORTED
+#define PNG_WRITE_SHIFT_SUPPORTED
+#define PNG_WRITE_sPLT_SUPPORTED
+#define PNG_WRITE_sRGB_SUPPORTED
+#define PNG_WRITE_SUPPORTED
+#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
+#define PNG_WRITE_SWAP_SUPPORTED
+#define PNG_WRITE_tEXt_SUPPORTED
+#define PNG_WRITE_TEXT_SUPPORTED
+#define PNG_WRITE_tIME_SUPPORTED
+#define PNG_WRITE_TRANSFORMS_SUPPORTED
+#define PNG_WRITE_tRNS_SUPPORTED
+#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
+#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
+#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+#define PNG_WRITE_zTXt_SUPPORTED
+#define PNG_zTXt_SUPPORTED
+/* end of options */
+#endif /* PNGLCONF_H */

Copied: branches/branch-3.0/include/fltk3png/pngpriv.h (from rev 8987, branches/branch-3.0/png/pngpriv.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/pngpriv.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/pngpriv.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1358 @@
+
+/* pngpriv.h - private declarations for use inside libpng
+ *
+ * For conditions of distribution and use, see copyright notice in png.h
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.4 [July 7, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+/* The symbols declared in this file (including the functions declared
+ * as PNG_EXTERN) are PRIVATE.  They are not part of the libpng public
+ * interface, and are not recommended for use by regular applications.
+ * Some of them may become public in the future; others may stay private,
+ * change in an incompatible way, or even disappear.
+ * Although the libpng users are not forbidden to include this header,
+ * they should be well aware of the issues that may arise from doing so.
+ */
+
+#ifndef PNGPRIV_H
+#define PNGPRIV_H
+
+/* Feature Test Macros.  The following are defined here to ensure that correctly
+ * implemented libraries reveal the APIs libpng needs to build and hide those
+ * that are not needed and potentially damaging to the compilation.
+ *
+ * Feature Test Macros must be defined before any system header is included (see
+ * POSIX 1003.1 2.8.2 "POSIX Symbols."
+ *
+ * These macros only have an effect if the operating system supports either
+ * POSIX 1003.1 or C99, or both.  On other operating systems (particularly
+ * Windows/Visual Studio) there is no effect; the OS specific tests below are
+ * still required (as of 2011-05-02.)
+ */
+#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
+
+/* This is required for the definition of abort(), used as a last ditch
+ * error handler when all else fails.
+ */
+#include <stdlib.h>
+
+#define PNGLIB_BUILD
+#ifdef PNG_USER_CONFIG
+#  include "pngusr.h"
+   /* These should have been defined in pngusr.h */
+#  ifndef PNG_USER_PRIVATEBUILD
+#    define PNG_USER_PRIVATEBUILD "Custom libpng build"
+#  endif
+#  ifndef PNG_USER_DLLFNAME_POSTFIX
+#    define PNG_USER_DLLFNAME_POSTFIX "Cb"
+#  endif
+#endif
+#include "png.h"
+#include "pnginfo.h"
+#include "pngstruct.h"
+
+/* This is used for 16 bit gamma tables - only the top level pointers are const,
+ * this could be changed:
+ */
+typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
+
+/* Added at libpng-1.2.9 */
+/* Moved to pngpriv.h at libpng-1.5.0 */
+
+/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure"
+ * script.  We may need it here to get the correct configuration on things
+ * like limits.
+ */
+#ifdef PNG_CONFIGURE_LIBPNG
+#  ifdef HAVE_CONFIG_H
+#    include "config.h"
+#  endif
+#endif
+
+/* Moved to pngpriv.h at libpng-1.5.0 */
+/* NOTE: some of these may have been used in external applications as
+ * these definitions were exposed in pngconf.h prior to 1.5.
+ */
+
+/* If you are running on a machine where you cannot allocate more
+ * than 64K of memory at once, uncomment this.  While libpng will not
+ * normally need that much memory in a chunk (unless you load up a very
+ * large file), zlib needs to know how big of a chunk it can use, and
+ * libpng thus makes sure to check any memory allocation to verify it
+ * will fit into memory.
+ *
+ * zlib provides 'MAXSEG_64K' which, if defined, indicates the
+ * same limit and pngconf.h (already included) sets the limit
+ * if certain operating systems are detected.
+ */
+#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
+#  define PNG_MAX_MALLOC_64K
+#endif
+
+#ifndef PNG_UNUSED
+/* Unused formal parameter warnings are silenced using the following macro
+ * which is expected to have no bad effects on performance (optimizing
+ * compilers will probably remove it entirely).  Note that if you replace
+ * it with something other than whitespace, you must include the terminating
+ * semicolon.
+ */
+#  define PNG_UNUSED(param) (void)param;
+#endif
+
+/* Just a little check that someone hasn't tried to define something
+ * contradictory.
+ */
+#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
+#  undef PNG_ZBUF_SIZE
+#  define PNG_ZBUF_SIZE 65536L
+#endif
+
+/* PNG_STATIC is used to mark internal file scope functions if they need to be
+ * accessed for implementation tests (see the code in tests/?*).
+ */
+#ifndef PNG_STATIC
+#   define PNG_STATIC static
+#endif
+
+/* If warnings or errors are turned off the code is disabled or redirected here.
+ * From 1.5.4 functions have been added to allow very limited formatting of
+ * error and warning messages - this code will also be disabled here.
+ */
+#ifdef PNG_WARNINGS_SUPPORTED
+#  define PNG_WARNING_PARAMETERS(p) png_warning_parameters p;
+#else
+#  define png_warning(s1,s2) ((void)(s1))
+#  define png_chunk_warning(s1,s2) ((void)(s1))
+#  define png_warning_parameter(p,number,string) ((void)0)
+#  define png_warning_parameter_unsigned(p,number,format,value) ((void)0)
+#  define png_warning_parameter_signed(p,number,format,value) ((void)0)
+#  define png_formatted_warning(pp,p,message) ((void)(pp))
+#  define PNG_WARNING_PARAMETERS(p)
+#endif
+#ifndef PNG_ERROR_TEXT_SUPPORTED
+#  define png_error(s1,s2) png_err(s1)
+#  define png_chunk_error(s1,s2) png_err(s1)
+#  define png_fixed_error(s1,s2) png_err(s1)
+#endif
+
+#ifndef PNG_EXTERN
+/* The functions exported by PNG_EXTERN are internal functions, which
+ * aren't usually used outside the library (as far as I know), so it is
+ * debatable if they should be exported at all.  In the future, when it
+ * is possible to have run-time registry of chunk-handling functions,
+ * some of these might be made available again.
+#  define PNG_EXTERN extern
+ */
+#  define PNG_EXTERN
+#endif
+
+/* Some fixed point APIs are still required even if not exported because
+ * they get used by the corresponding floating point APIs.  This magic
+ * deals with this:
+ */
+#ifdef PNG_FIXED_POINT_SUPPORTED
+#  define PNGFAPI PNGAPI
+#else
+#  define PNGFAPI /* PRIVATE */
+#endif
+
+/* Other defines specific to compilers can go here.  Try to keep
+ * them inside an appropriate ifdef/endif pair for portability.
+ */
+#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\
+    defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
+   /* png.c requires the following ANSI-C constants if the conversion of
+    * floating point to ASCII is implemented therein:
+    *
+    *  DBL_DIG  Maximum number of decimal digits (can be set to any constant)
+    *  DBL_MIN  Smallest normalized fp number (can be set to an arbitrary value)
+    *  DBL_MAX  Maximum floating point number (can be set to an arbitrary value)
+    */
+#  include <float.h>
+
+#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
+    defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
+     /* We need to check that <math.h> hasn't already been included earlier
+      * as it seems it doesn't agree with <fp.h>, yet we should really use
+      * <fp.h> if possible.
+      */
+#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
+#      include <fp.h>
+#    endif
+#  else
+#    include <math.h>
+#  endif
+#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
+     /* Amiga SAS/C: We must include builtin FPU functions when compiling using
+      * MATH=68881
+      */
+#    include <m68881.h>
+#  endif
+#endif
+
+/* This provides the non-ANSI (far) memory allocation routines. */
+#if defined(__TURBOC__) && defined(__MSDOS__)
+#  include <mem.h>
+#  include <alloc.h>
+#endif
+
+#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
+    defined(_WIN32) || defined(__WIN32__)
+#  include <windows.h>  /* defines _WINDOWS_ macro */
+#endif
+
+/* Moved here around 1.5.0beta36 from pngconf.h */
+/* Users may want to use these so they are not private.  Any library
+ * functions that are passed far data must be model-independent.
+ */
+
+/* Memory model/platform independent fns */
+#ifndef PNG_ABORT
+#  ifdef _WINDOWS_
+#    define PNG_ABORT() ExitProcess(0)
+#  else
+#    define PNG_ABORT() abort()
+#  endif
+#endif
+
+#ifdef USE_FAR_KEYWORD
+/* Use this to make far-to-near assignments */
+#  define CHECK   1
+#  define NOCHECK 0
+#  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
+#  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
+#  define png_strlen  _fstrlen
+#  define png_memcmp  _fmemcmp    /* SJT: added */
+#  define png_memcpy  _fmemcpy
+#  define png_memset  _fmemset
+#else
+#  ifdef _WINDOWS_  /* Favor Windows over C runtime fns */
+#    define CVT_PTR(ptr)         (ptr)
+#    define CVT_PTR_NOCHECK(ptr) (ptr)
+#    define png_strlen  lstrlenA
+#    define png_memcmp  memcmp
+#    define png_memcpy  CopyMemory
+#    define png_memset  memset
+#  else
+#    define CVT_PTR(ptr)         (ptr)
+#    define CVT_PTR_NOCHECK(ptr) (ptr)
+#    define png_strlen  strlen
+#    define png_memcmp  memcmp      /* SJT: added */
+#    define png_memcpy  memcpy
+#    define png_memset  memset
+#  endif
+#endif
+/* End of memory model/platform independent support */
+/* End of 1.5.0beta36 move from pngconf.h */
+
+/* CONSTANTS and UTILITY MACROS
+ * These are used internally by libpng and not exposed in the API
+ */
+
+/* Various modes of operation.  Note that after an init, mode is set to
+ * zero automatically when the structure is created.  Three of these
+ * are defined in png.h because they need to be visible to applications
+ * that call png_set_unknown_chunk().
+ */
+/* #define PNG_HAVE_IHDR            0x01 (defined in png.h) */
+/* #define PNG_HAVE_PLTE            0x02 (defined in png.h) */
+#define PNG_HAVE_IDAT               0x04
+/* #define PNG_AFTER_IDAT           0x08 (defined in png.h) */
+#define PNG_HAVE_IEND               0x10
+#define PNG_HAVE_gAMA               0x20
+#define PNG_HAVE_cHRM               0x40
+#define PNG_HAVE_sRGB               0x80
+#define PNG_HAVE_CHUNK_HEADER      0x100
+#define PNG_WROTE_tIME             0x200
+#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
+#define PNG_BACKGROUND_IS_GRAY     0x800
+#define PNG_HAVE_PNG_SIGNATURE    0x1000
+#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
+
+/* Flags for the transformations the PNG library does on the image data */
+#define PNG_BGR                 0x0001
+#define PNG_INTERLACE           0x0002
+#define PNG_PACK                0x0004
+#define PNG_SHIFT               0x0008
+#define PNG_SWAP_BYTES          0x0010
+#define PNG_INVERT_MONO         0x0020
+#define PNG_QUANTIZE            0x0040
+#define PNG_COMPOSE             0x0080     /* Was PNG_BACKGROUND */
+#define PNG_BACKGROUND_EXPAND   0x0100
+#define PNG_EXPAND_16           0x0200     /* Added to libpng 1.5.2 */
+#define PNG_16_TO_8             0x0400     /* Becomes 'chop' in 1.5.4 */
+#define PNG_RGBA                0x0800
+#define PNG_EXPAND              0x1000
+#define PNG_GAMMA               0x2000
+#define PNG_GRAY_TO_RGB         0x4000
+#define PNG_FILLER              0x8000L
+#define PNG_PACKSWAP           0x10000L
+#define PNG_SWAP_ALPHA         0x20000L
+#define PNG_STRIP_ALPHA        0x40000L
+#define PNG_INVERT_ALPHA       0x80000L
+#define PNG_USER_TRANSFORM    0x100000L
+#define PNG_RGB_TO_GRAY_ERR   0x200000L
+#define PNG_RGB_TO_GRAY_WARN  0x400000L
+#define PNG_RGB_TO_GRAY       0x600000L  /* two bits, RGB_TO_GRAY_ERR|WARN */
+#define PNG_ENCODE_ALPHA      0x800000L  /* Added to libpng-1.5.4 */
+#define PNG_ADD_ALPHA         0x1000000L  /* Added to libpng-1.2.7 */
+#define PNG_EXPAND_tRNS       0x2000000L  /* Added to libpng-1.2.9 */
+#define PNG_SCALE_16_TO_8     0x4000000L  /* Added to libpng-1.5.4 */
+                       /*   0x8000000L  unused */
+                       /*  0x10000000L  unused */
+                       /*  0x20000000L  unused */
+                       /*  0x40000000L  unused */
+
+/* Flags for png_create_struct */
+#define PNG_STRUCT_PNG   0x0001
+#define PNG_STRUCT_INFO  0x0002
+
+/* Scaling factor for filter heuristic weighting calculations */
+#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
+#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
+
+/* Flags for the png_ptr->flags rather than declaring a byte for each one */
+#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY     0x0001
+#define PNG_FLAG_ZLIB_CUSTOM_LEVEL        0x0002
+#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL    0x0004
+#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS  0x0008
+#define PNG_FLAG_ZLIB_CUSTOM_METHOD       0x0010
+#define PNG_FLAG_ZLIB_FINISHED            0x0020
+#define PNG_FLAG_ROW_INIT                 0x0040
+#define PNG_FLAG_FILLER_AFTER             0x0080
+#define PNG_FLAG_CRC_ANCILLARY_USE        0x0100
+#define PNG_FLAG_CRC_ANCILLARY_NOWARN     0x0200
+#define PNG_FLAG_CRC_CRITICAL_USE         0x0400
+#define PNG_FLAG_CRC_CRITICAL_IGNORE      0x0800
+#define PNG_FLAG_ASSUME_sRGB              0x1000  /* Added to libpng-1.5.4 */
+#define PNG_FLAG_OPTIMIZE_ALPHA           0x2000  /* Added to libpng-1.5.4 */
+#define PNG_FLAG_DETECT_UNINITIALIZED     0x4000  /* Added to libpng-1.5.4 */
+#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS      0x8000L
+#define PNG_FLAG_KEEP_UNSAFE_CHUNKS       0x10000L
+#define PNG_FLAG_LIBRARY_MISMATCH         0x20000L
+#define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L
+#define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L
+#define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L
+                                  /*      0x200000L  unused */
+                                  /*      0x400000L  unused */
+#define PNG_FLAG_BENIGN_ERRORS_WARN       0x800000L  /* Added to libpng-1.4.0 */
+#define PNG_FLAG_ZTXT_CUSTOM_STRATEGY    0x1000000L  /* 5 lines added */
+#define PNG_FLAG_ZTXT_CUSTOM_LEVEL       0x2000000L  /* to libpng-1.5.4 */
+#define PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL   0x4000000L
+#define PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS 0x8000000L
+#define PNG_FLAG_ZTXT_CUSTOM_METHOD      0x10000000L
+                                  /*     0x20000000L  unused */
+                                  /*     0x40000000L  unused */
+
+#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
+                                     PNG_FLAG_CRC_ANCILLARY_NOWARN)
+
+#define PNG_FLAG_CRC_CRITICAL_MASK  (PNG_FLAG_CRC_CRITICAL_USE | \
+                                     PNG_FLAG_CRC_CRITICAL_IGNORE)
+
+#define PNG_FLAG_CRC_MASK           (PNG_FLAG_CRC_ANCILLARY_MASK | \
+                                     PNG_FLAG_CRC_CRITICAL_MASK)
+
+/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib
+ * can handle at once.  This type need be no larger than 16 bits (so maximum of
+ * 65535), this define allows us to discover how big it is, but limited by the
+ * maximuum for png_size_t.  The value can be overriden in a library build
+ * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably
+ * lower value (e.g. 255 works).  A lower value may help memory usage (slightly)
+ * and may even improve performance on some systems (and degrade it on others.)
+ */
+#ifndef ZLIB_IO_MAX
+#  define ZLIB_IO_MAX ((uInt)-1)
+#endif
+
+/* Save typing and make code easier to understand */
+
+#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
+   abs((int)((c1).green) - (int)((c2).green)) + \
+   abs((int)((c1).blue) - (int)((c2).blue)))
+
+/* Added to libpng-1.2.6 JB */
+#define PNG_ROWBYTES(pixel_bits, width) \
+    ((pixel_bits) >= 8 ? \
+    ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
+    (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
+
+/* PNG_OUT_OF_RANGE returns true if value is outside the range
+ * ideal-delta..ideal+delta.  Each argument is evaluated twice.
+ * "ideal" and "delta" should be constants, normally simple
+ * integers, "value" a variable. Added to libpng-1.2.6 JB
+ */
+#define PNG_OUT_OF_RANGE(value, ideal, delta) \
+   ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+
+/* Conversions between fixed and floating point, only defined if
+ * required (to make sure the code doesn't accidentally use float
+ * when it is supposedly disabled.)
+ */
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+/* The floating point conversion can't overflow, though it can and
+ * does lose accuracy relative to the original fixed point value.
+ * In practice this doesn't matter because png_fixed_point only
+ * stores numbers with very low precision.  The png_ptr and s
+ * arguments are unused by default but are there in case error
+ * checking becomes a requirement.
+ */
+#define png_float(png_ptr, fixed, s) (.00001 * (fixed))
+
+/* The fixed point conversion performs range checking and evaluates
+ * its argument multiple times, so must be used with care.  The
+ * range checking uses the PNG specification values for a signed
+ * 32 bit fixed point value except that the values are deliberately
+ * rounded-to-zero to an integral value - 21474 (21474.83 is roughly
+ * (2^31-1) * 100000). 's' is a string that describes the value being
+ * converted.
+ *
+ * NOTE: this macro will raise a png_error if the range check fails,
+ * therefore it is normally only appropriate to use this on values
+ * that come from API calls or other sources where an out of range
+ * error indicates a programming error, not a data error!
+ *
+ * NOTE: by default this is off - the macro is not used - because the
+ * function call saves a lot of code.
+ */
+#ifdef PNG_FIXED_POINT_MACRO_SUPPORTED
+#define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\
+    ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0))
+#else
+PNG_EXTERN png_fixed_point png_fixed PNGARG((png_structp png_ptr, double fp,
+   png_const_charp text));
+#endif
+#endif
+
+/* Constant strings for known chunk types.  If you need to add a chunk,
+ * define the name here, and add an invocation of the macro wherever it's
+ * needed.
+ */
+#define PNG_IHDR PNG_CONST png_byte png_IHDR[5] = { 73,  72,  68,  82, '\0'}
+#define PNG_IDAT PNG_CONST png_byte png_IDAT[5] = { 73,  68,  65,  84, '\0'}
+#define PNG_IEND PNG_CONST png_byte png_IEND[5] = { 73,  69,  78,  68, '\0'}
+#define PNG_PLTE PNG_CONST png_byte png_PLTE[5] = { 80,  76,  84,  69, '\0'}
+#define PNG_bKGD PNG_CONST png_byte png_bKGD[5] = { 98,  75,  71,  68, '\0'}
+#define PNG_cHRM PNG_CONST png_byte png_cHRM[5] = { 99,  72,  82,  77, '\0'}
+#define PNG_gAMA PNG_CONST png_byte png_gAMA[5] = {103,  65,  77,  65, '\0'}
+#define PNG_hIST PNG_CONST png_byte png_hIST[5] = {104,  73,  83,  84, '\0'}
+#define PNG_iCCP PNG_CONST png_byte png_iCCP[5] = {105,  67,  67,  80, '\0'}
+#define PNG_iTXt PNG_CONST png_byte png_iTXt[5] = {105,  84,  88, 116, '\0'}
+#define PNG_oFFs PNG_CONST png_byte png_oFFs[5] = {111,  70,  70, 115, '\0'}
+#define PNG_pCAL PNG_CONST png_byte png_pCAL[5] = {112,  67,  65,  76, '\0'}
+#define PNG_sCAL PNG_CONST png_byte png_sCAL[5] = {115,  67,  65,  76, '\0'}
+#define PNG_pHYs PNG_CONST png_byte png_pHYs[5] = {112,  72,  89, 115, '\0'}
+#define PNG_sBIT PNG_CONST png_byte png_sBIT[5] = {115,  66,  73,  84, '\0'}
+#define PNG_sPLT PNG_CONST png_byte png_sPLT[5] = {115,  80,  76,  84, '\0'}
+#define PNG_sRGB PNG_CONST png_byte png_sRGB[5] = {115,  82,  71,  66, '\0'}
+#define PNG_sTER PNG_CONST png_byte png_sTER[5] = {115,  84,  69,  82, '\0'}
+#define PNG_tEXt PNG_CONST png_byte png_tEXt[5] = {116,  69,  88, 116, '\0'}
+#define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116,  73,  77,  69, '\0'}
+#define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116,  82,  78,  83, '\0'}
+#define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122,  84,  88, 116, '\0'}
+
+/* Gamma values (new at libpng-1.5.4): */
+#define PNG_GAMMA_MAC_OLD 151724  /* Assume '1.8' is really 2.2/1.45! */
+#define PNG_GAMMA_MAC_INVERSE 65909
+#define PNG_GAMMA_sRGB_INVERSE 45455
+
+
+/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* These functions are used internally in the code.  They generally
+ * shouldn't be used unless you are writing code to add or replace some
+ * functionality in libpng.  More information about most functions can
+ * be found in the files where the functions are located.
+ */
+
+/* Check the user version string for compatibility, returns false if the version
+ * numbers aren't compatible.
+ */
+PNG_EXTERN int png_user_version_check(png_structp png_ptr,
+   png_const_charp user_png_ver);
+
+/* Allocate memory for an internal libpng struct */
+PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct,PNGARG((int type)),
+   PNG_ALLOCATED);
+
+/* Free memory from internal libpng struct */
+PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
+
+PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct_2,
+   PNGARG((int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)),
+   PNG_ALLOCATED);
+PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
+    png_free_ptr free_fn, png_voidp mem_ptr));
+
+/* Free any memory that info_ptr points to and reset struct. */
+PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+
+/* Function to allocate memory for zlib.  PNGAPI is disallowed. */
+PNG_EXTERN PNG_FUNCTION(voidpf,png_zalloc,PNGARG((voidpf png_ptr, uInt items,
+   uInt size)),PNG_ALLOCATED);
+
+/* Function to free memory for zlib.  PNGAPI is disallowed. */
+PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
+
+/* Next four functions are used internally as callbacks.  PNGCBAPI is required
+ * but not PNG_EXPORT.  PNGAPI added at libpng version 1.2.3, changed to
+ * PNGCBAPI at 1.5.0
+ */
+
+PNG_EXTERN void PNGCBAPI png_default_read_data PNGARG((png_structp png_ptr,
+    png_bytep data, png_size_t length));
+
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+PNG_EXTERN void PNGCBAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
+    png_bytep buffer, png_size_t length));
+#endif
+
+PNG_EXTERN void PNGCBAPI png_default_write_data PNGARG((png_structp png_ptr,
+    png_bytep data, png_size_t length));
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+#  ifdef PNG_STDIO_SUPPORTED
+PNG_EXTERN void PNGCBAPI png_default_flush PNGARG((png_structp png_ptr));
+#  endif
+#endif
+
+/* Reset the CRC variable */
+PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
+
+/* Write the "data" buffer to whatever output you are using */
+PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr,
+    png_const_bytep data, png_size_t length));
+
+/* Read and check the PNG file signature */
+PNG_EXTERN void png_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr));
+
+/* Read the chunk header (length + type name) */
+PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
+
+/* Read data from whatever input you are using into the "data" buffer */
+PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
+    png_size_t length));
+
+/* Read bytes into buf, and update png_ptr->crc */
+PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
+    png_size_t length));
+
+/* Decompress data in a chunk that uses compression */
+#if defined(PNG_READ_COMPRESSED_TEXT_SUPPORTED)
+PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
+    int comp_type, png_size_t chunklength, png_size_t prefix_length,
+    png_size_t *data_length));
+#endif
+
+/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
+PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
+
+/* Read the CRC from the file and compare it to the libpng calculated CRC */
+PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
+
+/* Calculate the CRC over a section of data.  Note that we are only
+ * passing a maximum of 64K on systems that have this as a memory limit,
+ * since this is the maximum buffer size we can specify.
+ */
+PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr,
+    png_const_bytep ptr, png_size_t length));
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
+#endif
+
+/* Write various chunks */
+
+/* Write the IHDR chunk, and update the png_struct with the necessary
+ * information.
+ */
+PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
+    png_uint_32 height,
+    int bit_depth, int color_type, int compression_method, int filter_method,
+    int interlace_method));
+
+PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr,
+    png_const_colorp palette, png_uint_32 num_pal));
+
+PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
+    png_size_t length));
+
+PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
+
+#ifdef PNG_WRITE_gAMA_SUPPORTED
+#  ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
+#  endif
+#  ifdef PNG_FIXED_POINT_SUPPORTED
+PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,
+    png_fixed_point file_gamma));
+#  endif
+#endif
+
+#ifdef PNG_WRITE_sBIT_SUPPORTED
+PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr,
+    png_const_color_8p sbit, int color_type));
+#endif
+
+#ifdef PNG_WRITE_cHRM_SUPPORTED
+#  ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
+    double white_x, double white_y,
+    double red_x, double red_y, double green_x, double green_y,
+    double blue_x, double blue_y));
+#  endif
+PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
+    png_fixed_point int_white_x, png_fixed_point int_white_y,
+    png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
+    int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
+    png_fixed_point int_blue_y));
+#endif
+
+#ifdef PNG_WRITE_sRGB_SUPPORTED
+PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
+    int intent));
+#endif
+
+#ifdef PNG_WRITE_iCCP_SUPPORTED
+PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
+    png_const_charp name, int compression_type,
+    png_const_charp profile, int proflen));
+   /* Note to maintainer: profile should be png_bytep */
+#endif
+
+#ifdef PNG_WRITE_sPLT_SUPPORTED
+PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
+    png_const_sPLT_tp palette));
+#endif
+
+#ifdef PNG_WRITE_tRNS_SUPPORTED
+PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr,
+    png_const_bytep trans, png_const_color_16p values, int number,
+    int color_type));
+#endif
+
+#ifdef PNG_WRITE_bKGD_SUPPORTED
+PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
+    png_const_color_16p values, int color_type));
+#endif
+
+#ifdef PNG_WRITE_hIST_SUPPORTED
+PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr,
+    png_const_uint_16p hist, int num_hist));
+#endif
+
+/* Chunks that have keywords */
+#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
+    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
+PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
+    png_const_charp key, png_charpp new_key));
+#endif
+
+#ifdef PNG_WRITE_tEXt_SUPPORTED
+PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_const_charp key,
+    png_const_charp text, png_size_t text_len));
+#endif
+
+#ifdef PNG_WRITE_zTXt_SUPPORTED
+PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_const_charp key,
+    png_const_charp text, png_size_t text_len, int compression));
+#endif
+
+#ifdef PNG_WRITE_iTXt_SUPPORTED
+PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
+    int compression, png_const_charp key, png_const_charp lang,
+    png_const_charp lang_key, png_const_charp text));
+#endif
+
+#ifdef PNG_TEXT_SUPPORTED  /* Added at version 1.0.14 and 1.2.4 */
+PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
+    png_infop info_ptr, png_const_textp text_ptr, int num_text));
+#endif
+
+#ifdef PNG_WRITE_oFFs_SUPPORTED
+PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
+    png_int_32 x_offset, png_int_32 y_offset, int unit_type));
+#endif
+
+#ifdef PNG_WRITE_pCAL_SUPPORTED
+PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
+    png_int_32 X0, png_int_32 X1, int type, int nparams,
+    png_const_charp units, png_charpp params));
+#endif
+
+#ifdef PNG_WRITE_pHYs_SUPPORTED
+PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
+    png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
+    int unit_type));
+#endif
+
+#ifdef PNG_WRITE_tIME_SUPPORTED
+PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
+    png_const_timep mod_time));
+#endif
+
+#ifdef PNG_WRITE_sCAL_SUPPORTED
+PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
+    int unit, png_const_charp width, png_const_charp height));
+#endif
+
+/* Called when finished processing a row of data */
+PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
+
+/* Internal use only.   Called before first row of data */
+PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
+
+/* Combine a row of data, dealing with alpha, etc. if requested */
+PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
+    int mask));
+
+#ifdef PNG_READ_INTERLACING_SUPPORTED
+/* Expand an interlaced row */
+/* OLD pre-1.0.9 interface:
+PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
+    png_bytep row, int pass, png_uint_32 transformations));
+ */
+PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
+#endif
+
+/* GRR TO DO (2.0 or whenever):  simplify other internal calling interfaces */
+
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
+/* Grab pixels out of a row for an interlaced pass */
+PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
+    png_bytep row, int pass));
+#endif
+
+/* Unfilter a row */
+PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
+    png_row_infop row_info, png_bytep row, png_const_bytep prev_row,
+    int filter));
+
+/* Choose the best filter to use and filter the row data */
+PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
+    png_row_infop row_info));
+
+/* Finish a row while reading, dealing with interlacing passes, etc. */
+PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
+
+/* Initialize the row buffers, etc. */
+PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
+
+#ifdef PNG_READ_TRANSFORMS_SUPPORTED
+/* Optional call to update the users info structure */
+PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+#endif
+
+/* These are the functions that do the transformations */
+#ifdef PNG_READ_FILLER_SUPPORTED
+PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
+    png_bytep row, png_uint_32 filler, png_uint_32 flags));
+#endif
+
+#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
+    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+PNG_EXTERN void png_do_strip_channel PNGARG((png_row_infop row_info,
+    png_bytep row, int at_start));
+#endif
+
+#ifdef PNG_16BIT_SUPPORTED
+#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
+PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+#endif
+
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
+    defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr,
+    png_row_infop row_info, png_bytep row));
+#endif
+
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
+PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_PACK_SUPPORTED
+PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_SHIFT_SUPPORTED
+PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info,
+    png_bytep row, png_const_color_8p sig_bits));
+#endif
+
+#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
+PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
+PNG_EXTERN void png_do_scale_16_to_8 PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
+PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info,
+    png_bytep row, png_const_bytep palette_lookup,
+    png_const_bytep quantize_lookup));
+
+#  ifdef PNG_CORRECT_PALETTE_SUPPORTED
+PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
+    png_colorp palette, int num_palette));
+#  endif
+#endif
+
+#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
+PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+#ifdef PNG_WRITE_PACK_SUPPORTED
+PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
+   png_bytep row, png_uint_32 bit_depth));
+#endif
+
+#ifdef PNG_WRITE_SHIFT_SUPPORTED
+PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info,
+    png_bytep row, png_const_color_8p bit_depth));
+#endif
+
+#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
+    defined(PNG_READ_ALPHA_MODE_SUPPORTED)
+PNG_EXTERN void png_do_compose PNGARG((png_row_infop row_info,
+    png_bytep row, png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info,
+    png_bytep row, png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
+PNG_EXTERN void png_do_encode_alpha PNGARG((png_row_infop row_info,
+   png_bytep row, png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_EXPAND_SUPPORTED
+PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
+    png_bytep row, png_const_colorp palette, png_const_bytep trans,
+    int num_trans));
+PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
+    png_bytep row, png_const_color_16p trans_color));
+#endif
+
+#ifdef PNG_READ_EXPAND_16_SUPPORTED
+PNG_EXTERN void png_do_expand_16 PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+/* The following decodes the appropriate chunks, and does error correction,
+ * then calls the appropriate callback for the chunk if it is valid.
+ */
+
+/* Decode the IHDR chunk */
+PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+
+#ifdef PNG_READ_bKGD_SUPPORTED
+PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_cHRM_SUPPORTED
+PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_gAMA_SUPPORTED
+PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_hIST_SUPPORTED
+PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_iCCP_SUPPORTED
+PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif /* PNG_READ_iCCP_SUPPORTED */
+
+#ifdef PNG_READ_iTXt_SUPPORTED
+PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_oFFs_SUPPORTED
+PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_pCAL_SUPPORTED
+PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_pHYs_SUPPORTED
+PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_sBIT_SUPPORTED
+PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_sCAL_SUPPORTED
+PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_sPLT_SUPPORTED
+PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif /* PNG_READ_sPLT_SUPPORTED */
+
+#ifdef PNG_READ_sRGB_SUPPORTED
+PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_tEXt_SUPPORTED
+PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_tIME_SUPPORTED
+PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_tRNS_SUPPORTED
+PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_zTXt_SUPPORTED
+PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
+    png_uint_32 length));
+#endif
+
+PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
+    png_infop info_ptr, png_uint_32 length));
+
+PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
+    png_const_bytep chunk_name));
+
+/* Handle the transformations for reading and writing */
+#ifdef PNG_READ_TRANSFORMS_SUPPORTED
+PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
+#endif
+#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
+PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
+#endif
+
+#ifdef PNG_READ_TRANSFORMS_SUPPORTED
+PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
+#endif
+
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
+    png_uint_32 length));
+PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
+    png_bytep buffer, png_size_t buffer_length));
+PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
+    png_bytep buffer, png_size_t buffer_length));
+PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
+   png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
+   png_infop info_ptr));
+PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
+   png_infop info_ptr));
+PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
+PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
+#  ifdef PNG_READ_tEXt_SUPPORTED
+PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
+    png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+#  endif
+#  ifdef PNG_READ_zTXt_SUPPORTED
+PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
+    png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+#  endif
+#  ifdef PNG_READ_iTXt_SUPPORTED
+PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
+    png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
+    png_infop info_ptr));
+#  endif
+
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
+    png_bytep row));
+PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
+    png_bytep row));
+#endif
+
+/* Added at libpng version 1.4.0 */
+#ifdef PNG_CHECK_cHRM_SUPPORTED
+PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
+    png_fixed_point int_white_x, png_fixed_point int_white_y,
+    png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
+    int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
+    png_fixed_point int_blue_y));
+#endif
+
+#ifdef PNG_CHECK_cHRM_SUPPORTED
+/* Added at libpng version 1.2.34 and 1.4.0 */
+/* Currently only used by png_check_cHRM_fixed */
+PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,
+    unsigned long *hi_product, unsigned long *lo_product));
+#endif
+
+/* Added at libpng version 1.4.0 */
+PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
+    png_uint_32 width, png_uint_32 height, int bit_depth,
+    int color_type, int interlace_type, int compression_type,
+    int filter_type));
+
+/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
+PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr,
+    png_infop info_ptr, png_infop end_info_ptr));
+
+/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
+PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr));
+
+#ifdef USE_FAR_KEYWORD  /* memory model conversion function */
+PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr,
+    int check));
+#endif /* USE_FAR_KEYWORD */
+
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
+PNG_EXTERN PNG_FUNCTION(void, png_fixed_error, (png_structp png_ptr,
+   png_const_charp name),PNG_NORETURN);
+#endif
+
+/* Puts 'string' into 'buffer' at buffer[pos], taking care never to overwrite
+ * the end.  Always leaves the buffer nul terminated.  Never errors out (and
+ * there is no error code.)
+ */
+PNG_EXTERN size_t png_safecat(png_charp buffer, size_t bufsize, size_t pos,
+    png_const_charp string);
+
+/* Various internal functions to handle formatted warning messages, currently
+ * only implemented for warnings.
+ */
+#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED)
+/* Utility to dump an unsigned value into a buffer, given a start pointer and
+ * and end pointer (which should point just *beyond* the end of the buffer!)
+ * Returns the pointer to the start of the formatted string.  This utility only
+ * does unsigned values.
+ */
+PNG_EXTERN png_charp png_format_number(png_const_charp start, png_charp end,
+   int format, png_alloc_size_t number);
+
+/* Convenience macro that takes an array: */
+#define PNG_FORMAT_NUMBER(buffer,format,number) \
+   png_format_number(buffer, buffer + (sizeof buffer), format, number)
+
+/* Suggested size for a number buffer (enough for 64 bits and a sign!) */
+#define PNG_NUMBER_BUFFER_SIZE 24
+
+/* These are the integer formats currently supported, the name is formed from
+ * the standard printf(3) format string.
+ */
+#define PNG_NUMBER_FORMAT_u     1 /* chose unsigned API! */
+#define PNG_NUMBER_FORMAT_02u   2
+#define PNG_NUMBER_FORMAT_d     1 /* chose signed API! */
+#define PNG_NUMBER_FORMAT_02d   2
+#define PNG_NUMBER_FORMAT_x     3
+#define PNG_NUMBER_FORMAT_02x   4
+#define PNG_NUMBER_FORMAT_fixed 5 /* choose the signed API */
+#endif
+
+#ifdef PNG_WARNINGS_SUPPORTED
+/* New defines and members adding in libpng-1.5.4 */
+#  define PNG_WARNING_PARAMETER_SIZE 32
+#  define PNG_WARNING_PARAMETER_COUNT 8
+
+/* An l-value of this type has to be passed to the APIs below to cache the
+ * values of the parameters to a formatted warning message.
+ */
+typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][
+   PNG_WARNING_PARAMETER_SIZE];
+
+PNG_EXTERN void png_warning_parameter(png_warning_parameters p, int number,
+    png_const_charp string);
+    /* Parameters are limited in size to PNG_WARNING_PARAMETER_SIZE characters,
+     * including the trailing '\0'.
+     */
+PNG_EXTERN void png_warning_parameter_unsigned(png_warning_parameters p,
+    int number, int format, png_alloc_size_t value);
+    /* Use png_alloc_size_t because it is an unsigned type as big as any we
+     * need to output.  Use the following for a signed value.
+     */
+PNG_EXTERN void png_warning_parameter_signed(png_warning_parameters p,
+    int number, int format, png_int_32 value);
+
+PNG_EXTERN void png_formatted_warning(png_structp png_ptr,
+    png_warning_parameters p, png_const_charp message);
+    /* 'message' follows the X/Open approach of using @1, @2 to insert
+     * parameters previously supplied using the above functions.  Errors in
+     * specifying the paramters will simple result in garbage substitutions.
+     */
+#endif
+
+/* ASCII to FP interfaces, currently only implemented if sCAL
+ * support is required.
+ */
+#if defined(PNG_READ_sCAL_SUPPORTED)
+/* MAX_DIGITS is actually the maximum number of characters in an sCAL
+ * width or height, derived from the precision (number of significant
+ * digits - a build time settable option) and assumpitions about the
+ * maximum ridiculous exponent.
+ */
+#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/)
+
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_EXTERN void png_ascii_from_fp PNGARG((png_structp png_ptr, png_charp ascii,
+    png_size_t size, double fp, unsigned int precision));
+#endif /* FLOATING_POINT */
+
+#ifdef PNG_FIXED_POINT_SUPPORTED
+PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr,
+    png_charp ascii, png_size_t size, png_fixed_point fp));
+#endif /* FIXED_POINT */
+#endif /* READ_sCAL */
+
+#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED)
+/* An internal API to validate the format of a floating point number.
+ * The result is the index of the next character.  If the number is
+ * not valid it will be the index of a character in the supposed number.
+ *
+ * The format of a number is defined in the PNG extensions specification
+ * and this API is strictly conformant to that spec, not anyone elses!
+ *
+ * The format as a regular expression is:
+ *
+ * [+-]?[0-9]+.?([Ee][+-]?[0-9]+)?
+ *
+ * or:
+ *
+ * [+-]?.[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?
+ *
+ * The complexity is that either integer or fraction must be present and the
+ * fraction is permitted to have no digits only if the integer is present.
+ *
+ * NOTE: The dangling E problem.
+ *   There is a PNG valid floating point number in the following:
+ *
+ *       PNG floating point numb1.ers are not greedy.
+ *
+ *   Working this out requires *TWO* character lookahead (because of the
+ *   sign), the parser does not do this - it will fail at the 'r' - this
+ *   doesn't matter for PNG sCAL chunk values, but it requires more care
+ *   if the value were ever to be embedded in something more complex.  Use
+ *   ANSI-C strtod if you need the lookahead.
+ */
+/* State table for the parser. */
+#define PNG_FP_INTEGER    0  /* before or in integer */
+#define PNG_FP_FRACTION   1  /* before or in fraction */
+#define PNG_FP_EXPONENT   2  /* before or in exponent */
+#define PNG_FP_STATE      3  /* mask for the above */
+#define PNG_FP_SAW_SIGN   4  /* Saw +/- in current state */
+#define PNG_FP_SAW_DIGIT  8  /* Saw a digit in current state */
+#define PNG_FP_SAW_DOT   16  /* Saw a dot in current state */
+#define PNG_FP_SAW_E     32  /* Saw an E (or e) in current state */
+#define PNG_FP_SAW_ANY   60  /* Saw any of the above 4 */
+
+/* These three values don't affect the parser.  They are set but not used.
+ */
+#define PNG_FP_WAS_VALID 64  /* Preceding substring is a valid fp number */
+#define PNG_FP_NEGATIVE 128  /* A negative number, including "-0" */
+#define PNG_FP_NONZERO  256  /* A non-zero value */
+#define PNG_FP_STICKY   448  /* The above three flags */
+
+/* This is available for the caller to store in 'state' if required.  Do not
+ * call the parser after setting it (the parser sometimes clears it.)
+ */
+#define PNG_FP_INVALID  512  /* Available for callers as a distinct value */
+
+/* Result codes for the parser (boolean - true meants ok, false means
+ * not ok yet.)
+ */
+#define PNG_FP_MAYBE      0  /* The number may be valid in the future */
+#define PNG_FP_OK         1  /* The number is valid */
+
+/* Tests on the sticky non-zero and negative flags.  To pass these checks
+ * the state must also indicate that the whole number is valid - this is
+ * achieved by testing PNG_FP_SAW_DIGIT (see the implementation for why this
+ * is equivalent to PNG_FP_OK above.)
+ */
+#define PNG_FP_NZ_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO)
+   /* NZ_MASK: the string is valid and a non-zero negative value */
+#define PNG_FP_Z_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO)
+   /* Z MASK: the string is valid and a non-zero value. */
+   /* PNG_FP_SAW_DIGIT: the string is valid. */
+#define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT)
+#define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK)
+#define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK)
+ 
+/* The actual parser.  This can be called repeatedly, it updates
+ * the index into the string and the state variable (which must
+ * be initialzed to 0).  It returns a result code, as above.  There
+ * is no point calling the parser any more if it fails to advance to
+ * the end of the string - it is stuck on an invalid character (or
+ * terminated by '\0').
+ *
+ * Note that the pointer will consume an E or even an E+ then leave
+ * a 'maybe' state even though a preceding integer.fraction is valid.
+ * The PNG_FP_WAS_VALID flag indicates that a preceding substring was
+ * a valid number.  It's possible to recover from this by calling
+ * the parser again (from the start, with state 0) but with a string
+ * that omits the last character (i.e. set the size to the index of
+ * the problem character.)  This has not been tested within libpng.
+ */
+PNG_EXTERN int png_check_fp_number PNGARG((png_const_charp string,
+    png_size_t size, int *statep, png_size_tp whereami));
+
+/* This is the same but it checks a complete string and returns true
+ * only if it just contains a floating point number.  As of 1.5.4 this
+ * function also returns the state at the end of parsing the number if
+ * it was valid (otherwise it returns 0.)  This can be used for testing
+ * for negative or zero values using the sticky flag.
+ */
+PNG_EXTERN int png_check_fp_string PNGARG((png_const_charp string,
+    png_size_t size));
+#endif /* pCAL || sCAL */
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) ||\
+    defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED)
+/* Added at libpng version 1.5.0 */
+/* This is a utility to provide a*times/div (rounded) and indicate
+ * if there is an overflow.  The result is a boolean - false (0)
+ * for overflow, true (1) if no overflow, in which case *res
+ * holds the result.
+ */
+PNG_EXTERN int png_muldiv PNGARG((png_fixed_point_p res, png_fixed_point a,
+    png_int_32 multiplied_by, png_int_32 divided_by));
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED)
+/* Same deal, but issue a warning on overflow and return 0. */
+PNG_EXTERN png_fixed_point png_muldiv_warn PNGARG((png_structp png_ptr,
+    png_fixed_point a, png_int_32 multiplied_by, png_int_32 divided_by));
+#endif
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+/* Calculate a reciprocal - used for gamma values.  This returns
+ * 0 if the argument is 0 in order to maintain an undefined value,
+ * there are no warnings.
+ */
+PNG_EXTERN png_fixed_point png_reciprocal PNGARG((png_fixed_point a));
+
+/* The same but gives a reciprocal of the product of two fixed point
+ * values.  Accuracy is suitable for gamma calculations but this is
+ * not exact - use png_muldiv for that.
+ */
+PNG_EXTERN png_fixed_point png_reciprocal2 PNGARG((png_fixed_point a,
+    png_fixed_point b));
+#endif
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+/* Internal fixed point gamma correction.  These APIs are called as
+ * required to convert single values - they don't need to be fast,
+ * they are not used when processing image pixel values.
+ *
+ * While the input is an 'unsigned' value it must actually be the
+ * correct bit value - 0..255 or 0..65535 as required.
+ */
+PNG_EXTERN png_uint_16 png_gamma_correct PNGARG((png_structp png_ptr,
+    unsigned int value, png_fixed_point gamma_value));
+PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma_value));
+PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value,
+    png_fixed_point gamma_value));
+PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value,
+    png_fixed_point gamma_value));
+PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
+    int bit_depth));
+#endif
+
+/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
+
+
+#include "pngdebug.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PNGPRIV_H */

Copied: branches/branch-3.0/include/fltk3png/pngstruct.h (from rev 8987, branches/branch-3.0/png/pngstruct.h)
===================================================================
--- branches/branch-3.0/include/fltk3png/pngstruct.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3png/pngstruct.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,337 @@
+
+/* pngstruct.h - header file for PNG reference library
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.4 [July 7, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+/* The structure that holds the information to read and write PNG files.
+ * The only people who need to care about what is inside of this are the
+ * people who will be modifying the library for their own special needs.
+ * It should NOT be accessed directly by an application.
+ */
+
+#ifndef PNGSTRUCT_H
+#define PNGSTRUCT_H
+/* zlib.h defines the structure z_stream, an instance of which is included
+ * in this structure and is required for decompressing the LZ compressed
+ * data in PNG files.
+ */
+#include "zlib.h"
+
+struct png_struct_def
+{
+#ifdef PNG_SETJMP_SUPPORTED
+   jmp_buf longjmp_buffer;    /* used in png_error */
+   png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */
+#endif
+   png_error_ptr error_fn;    /* function for printing errors and aborting */
+#ifdef PNG_WARNINGS_SUPPORTED
+   png_error_ptr warning_fn;  /* function for printing warnings */
+#endif
+   png_voidp error_ptr;       /* user supplied struct for error functions */
+   png_rw_ptr write_data_fn;  /* function for writing output data */
+   png_rw_ptr read_data_fn;   /* function for reading input data */
+   png_voidp io_ptr;          /* ptr to application struct for I/O functions */
+
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
+   png_user_transform_ptr read_user_transform_fn; /* user read transform */
+#endif
+
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
+   png_user_transform_ptr write_user_transform_fn; /* user write transform */
+#endif
+
+/* These were added in libpng-1.0.2 */
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
+    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+   png_voidp user_transform_ptr; /* user supplied struct for user transform */
+   png_byte user_transform_depth;    /* bit depth of user transformed pixels */
+   png_byte user_transform_channels; /* channels in user transformed pixels */
+#endif
+#endif
+
+   png_uint_32 mode;          /* tells us where we are in the PNG file */
+   png_uint_32 flags;         /* flags indicating various things to libpng */
+   png_uint_32 transformations; /* which transformations to perform */
+
+   z_stream zstream;          /* pointer to decompression structure (below) */
+   png_bytep zbuf;            /* buffer for zlib */
+   uInt zbuf_size;            /* size of zbuf (typically 65536) */
+#ifdef PNG_WRITE_SUPPORTED
+
+/* Added in 1.5.4: state to keep track of whether the zstream has been
+ * initialized and if so whether it is for IDAT or some other chunk.
+ */
+#define PNG_ZLIB_UNINITIALIZED 0
+#define PNG_ZLIB_FOR_IDAT      1
+#define PNG_ZLIB_FOR_TEXT      2 /* anything other than IDAT */
+#define PNG_ZLIB_USE_MASK      3 /* bottom two bits */
+#define PNG_ZLIB_IN_USE        4 /* a flag value */
+
+   png_uint_32 zlib_state;       /* State of zlib initialization */
+/* End of material added at libpng 1.5.4 */
+
+   int zlib_level;            /* holds zlib compression level */
+   int zlib_method;           /* holds zlib compression method */
+   int zlib_window_bits;      /* holds zlib compression window bits */
+   int zlib_mem_level;        /* holds zlib compression memory level */
+   int zlib_strategy;         /* holds zlib compression strategy */
+#endif
+/* Added at libpng 1.5.4 */
+#if defined(PNG_WRITE_COMPRESSED_TEXT_SUPPORTED) || \
+    defined(PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED)
+   int zlib_text_level;            /* holds zlib compression level */
+   int zlib_text_method;           /* holds zlib compression method */
+   int zlib_text_window_bits;      /* holds zlib compression window bits */
+   int zlib_text_mem_level;        /* holds zlib compression memory level */
+   int zlib_text_strategy;         /* holds zlib compression strategy */
+#endif
+/* End of material added at libpng 1.5.4 */
+
+   png_uint_32 width;         /* width of image in pixels */
+   png_uint_32 height;        /* height of image in pixels */
+   png_uint_32 num_rows;      /* number of rows in current pass */
+   png_uint_32 usr_width;     /* width of row at start of write */
+   png_size_t rowbytes;       /* size of row in bytes */
+   png_uint_32 iwidth;        /* width of current interlaced row in pixels */
+   png_uint_32 row_number;    /* current row in interlace pass */
+   png_bytep prev_row;        /* buffer to save previous (unfiltered) row */
+   png_bytep row_buf;         /* buffer to save current (unfiltered) row */
+   png_bytep sub_row;         /* buffer to save "sub" row when filtering */
+   png_bytep up_row;          /* buffer to save "up" row when filtering */
+   png_bytep avg_row;         /* buffer to save "avg" row when filtering */
+   png_bytep paeth_row;       /* buffer to save "Paeth" row when filtering */
+   png_row_info row_info;     /* used for transformation routines */
+   png_size_t info_rowbytes;  /* Added in 1.5.4: cache of updated row bytes */
+
+   png_uint_32 idat_size;     /* current IDAT size for read */
+   png_uint_32 crc;           /* current chunk CRC value */
+   png_colorp palette;        /* palette from the input file */
+   png_uint_16 num_palette;   /* number of color entries in palette */
+   png_uint_16 num_trans;     /* number of transparency values */
+   png_byte chunk_name[5];    /* null-terminated name of current chunk */
+   png_byte compression;      /* file compression type (always 0) */
+   png_byte filter;           /* file filter type (always 0) */
+   png_byte interlaced;       /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
+   png_byte pass;             /* current interlace pass (0 - 6) */
+   png_byte do_filter;        /* row filter flags (see PNG_FILTER_ below ) */
+   png_byte color_type;       /* color type of file */
+   png_byte bit_depth;        /* bit depth of file */
+   png_byte usr_bit_depth;    /* bit depth of users row */
+   png_byte pixel_depth;      /* number of bits per pixel */
+   png_byte channels;         /* number of channels in file */
+   png_byte usr_channels;     /* channels at start of write */
+   png_byte sig_bytes;        /* magic bytes read/written from start of file */
+
+#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
+   png_uint_16 filler;           /* filler bytes for pixel expansion */
+#endif
+
+#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
+   defined(PNG_READ_ALPHA_MODE_SUPPORTED)
+   png_byte background_gamma_type;
+   png_fixed_point background_gamma;
+   png_color_16 background;   /* background color in screen gamma space */
+#ifdef PNG_READ_GAMMA_SUPPORTED
+   png_color_16 background_1; /* background normalized to gamma 1.0 */
+#endif
+#endif /* PNG_bKGD_SUPPORTED */
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+   png_flush_ptr output_flush_fn; /* Function for flushing output */
+   png_uint_32 flush_dist;    /* how many rows apart to flush, 0 - no flush */
+   png_uint_32 flush_rows;    /* number of rows written since last flush */
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+   int gamma_shift;      /* number of "insignificant" bits in 16-bit gamma */
+   png_fixed_point gamma;        /* file gamma value */
+   png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+   png_bytep gamma_table;     /* gamma table for 8-bit depth files */
+   png_bytep gamma_from_1;    /* converts from 1.0 to screen */
+   png_bytep gamma_to_1;      /* converts from file to 1.0 */
+   png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
+   png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
+   png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
+   png_color_8 sig_bit;       /* significant bits in each available channel */
+#endif
+
+#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
+   png_color_8 shift;         /* shift for significant bit tranformation */
+#endif
+
+#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
+ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+   png_bytep trans_alpha;           /* alpha values for paletted files */
+   png_color_16 trans_color;  /* transparent color for non-paletted files */
+#endif
+
+   png_read_status_ptr read_row_fn;   /* called after each row is decoded */
+   png_write_status_ptr write_row_fn; /* called after each row is encoded */
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+   png_progressive_info_ptr info_fn; /* called after header data fully read */
+   png_progressive_row_ptr row_fn;   /* called after a prog. row is decoded */
+   png_progressive_end_ptr end_fn;   /* called after image is complete */
+   png_bytep save_buffer_ptr;        /* current location in save_buffer */
+   png_bytep save_buffer;            /* buffer for previously read data */
+   png_bytep current_buffer_ptr;     /* current location in current_buffer */
+   png_bytep current_buffer;         /* buffer for recently used data */
+   png_uint_32 push_length;          /* size of current input chunk */
+   png_uint_32 skip_length;          /* bytes to skip in input data */
+   png_size_t save_buffer_size;      /* amount of data now in save_buffer */
+   png_size_t save_buffer_max;       /* total size of save_buffer */
+   png_size_t buffer_size;           /* total amount of available input data */
+   png_size_t current_buffer_size;   /* amount of data now in current_buffer */
+   int process_mode;                 /* what push library is currently doing */
+   int cur_palette;                  /* current push library palette index */
+
+#  ifdef PNG_TEXT_SUPPORTED
+     png_size_t current_text_size;   /* current size of text input data */
+     png_size_t current_text_left;   /* how much text left to read in input */
+     png_charp current_text;         /* current text chunk buffer */
+     png_charp current_text_ptr;     /* current location in current_text */
+#  endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
+
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+
+#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
+/* For the Borland special 64K segment handler */
+   png_bytepp offset_table_ptr;
+   png_bytep offset_table;
+   png_uint_16 offset_table_number;
+   png_uint_16 offset_table_count;
+   png_uint_16 offset_table_count_free;
+#endif
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+   png_bytep palette_lookup; /* lookup table for quantizing */
+   png_bytep quantize_index; /* index translation for palette files */
+#endif
+
+#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
+   png_uint_16p hist;                /* histogram */
+#endif
+
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+   png_byte heuristic_method;        /* heuristic for row filter selection */
+   png_byte num_prev_filters;        /* number of weights for previous rows */
+   png_bytep prev_filters;           /* filter type(s) of previous row(s) */
+   png_uint_16p filter_weights;      /* weight(s) for previous line(s) */
+   png_uint_16p inv_filter_weights;  /* 1/weight(s) for previous line(s) */
+   png_uint_16p filter_costs;        /* relative filter calculation cost */
+   png_uint_16p inv_filter_costs;    /* 1/relative filter calculation cost */
+#endif
+
+#ifdef PNG_TIME_RFC1123_SUPPORTED
+   char time_buffer[29]; /* String to hold RFC 1123 time text */
+#endif
+
+/* New members added in libpng-1.0.6 */
+
+   png_uint_32 free_me;    /* flags items libpng is responsible for freeing */
+
+#ifdef PNG_USER_CHUNKS_SUPPORTED
+   png_voidp user_chunk_ptr;
+   png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
+#endif
+
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+   int num_chunk_list;
+   png_bytep chunk_list;
+#endif
+
+/* New members added in libpng-1.0.3 */
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+   png_byte rgb_to_gray_status;
+   /* These were changed from png_byte in libpng-1.0.6 */
+   png_uint_16 rgb_to_gray_red_coeff;
+   png_uint_16 rgb_to_gray_green_coeff;
+   png_uint_16 rgb_to_gray_blue_coeff;
+#endif
+
+/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
+#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
+    defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
+    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
+/* Changed from png_byte to png_uint_32 at version 1.2.0 */
+   png_uint_32 mng_features_permitted;
+#endif
+
+/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+   png_byte filter_type;
+#endif
+
+/* New members added in libpng-1.2.0 */
+
+/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
+#ifdef PNG_USER_MEM_SUPPORTED
+   png_voidp mem_ptr;             /* user supplied struct for mem functions */
+   png_malloc_ptr malloc_fn;      /* function for allocating memory */
+   png_free_ptr free_fn;          /* function for freeing memory */
+#endif
+
+/* New member added in libpng-1.0.13 and 1.2.0 */
+   png_bytep big_row_buf;         /* buffer to save current (unfiltered) row */
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+/* The following three members were added at version 1.0.14 and 1.2.4 */
+   png_bytep quantize_sort;          /* working sort array */
+   png_bytep index_to_palette;       /* where the original index currently is
+                                        in the palette */
+   png_bytep palette_to_index;       /* which original index points to this
+                                         palette color */
+#endif
+
+/* New members added in libpng-1.0.16 and 1.2.6 */
+   png_byte compression_type;
+
+#ifdef PNG_USER_LIMITS_SUPPORTED
+   png_uint_32 user_width_max;
+   png_uint_32 user_height_max;
+
+   /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
+    * chunks that can be stored (0 means unlimited).
+    */
+   png_uint_32 user_chunk_cache_max;
+
+   /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk
+    * can occupy when decompressed.  0 means unlimited.
+    */
+   png_alloc_size_t user_chunk_malloc_max;
+#endif
+
+/* New member added in libpng-1.0.25 and 1.2.17 */
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
+   /* Storage for unknown chunk that the library doesn't recognize. */
+   png_unknown_chunk unknown_chunk;
+#endif
+
+/* New members added in libpng-1.2.26 */
+  png_size_t old_big_row_buf_size;
+  png_size_t old_prev_row_size;
+
+/* New member added in libpng-1.2.30 */
+  png_charp chunkdata;  /* buffer for reading chunk data */
+
+#ifdef PNG_IO_STATE_SUPPORTED
+/* New member added in libpng-1.4.0 */
+   png_uint_32 io_state;
+#endif
+};
+#endif /* PNGSTRUCT_H */

Copied: branches/branch-3.0/include/fltk3zlib/crc32.h (from rev 8987, branches/branch-3.0/zlib/crc32.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/crc32.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/crc32.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,441 @@
+/* crc32.h -- tables for rapid CRC calculation
+ * Generated automatically by crc32.c
+ */
+
+local const unsigned long FAR crc_table[TBLS][256] =
+{
+  {
+    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
+    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
+    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
+    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
+    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
+    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
+    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
+    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
+    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
+    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
+    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
+    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
+    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
+    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
+    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
+    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
+    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
+    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
+    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
+    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
+    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
+    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
+    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
+    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
+    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
+    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
+    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
+    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
+    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
+    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
+    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
+    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
+    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
+    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
+    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
+    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
+    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
+    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
+    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
+    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
+    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
+    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
+    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
+    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
+    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
+    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
+    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
+    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
+    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
+    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
+    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
+    0x2d02ef8dUL
+#ifdef BYFOUR
+  },
+  {
+    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
+    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
+    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
+    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
+    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
+    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
+    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
+    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
+    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
+    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
+    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
+    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
+    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
+    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
+    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
+    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
+    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
+    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
+    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
+    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
+    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
+    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
+    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
+    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
+    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
+    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
+    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
+    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
+    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
+    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
+    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
+    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
+    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
+    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
+    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
+    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
+    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
+    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
+    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
+    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
+    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
+    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
+    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
+    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
+    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
+    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
+    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
+    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
+    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
+    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
+    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
+    0x9324fd72UL
+  },
+  {
+    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
+    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
+    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
+    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
+    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
+    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
+    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
+    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
+    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
+    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
+    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
+    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
+    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
+    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
+    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
+    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
+    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
+    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
+    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
+    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
+    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
+    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
+    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
+    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
+    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
+    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
+    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
+    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
+    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
+    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
+    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
+    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
+    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
+    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
+    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
+    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
+    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
+    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
+    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
+    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
+    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
+    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
+    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
+    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
+    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
+    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
+    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
+    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
+    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
+    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
+    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
+    0xbe9834edUL
+  },
+  {
+    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
+    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
+    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
+    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
+    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
+    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
+    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
+    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
+    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
+    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
+    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
+    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
+    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
+    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
+    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
+    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
+    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
+    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
+    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
+    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
+    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
+    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
+    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
+    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
+    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
+    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
+    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
+    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
+    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
+    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
+    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
+    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
+    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
+    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
+    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
+    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
+    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
+    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
+    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
+    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
+    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
+    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
+    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
+    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
+    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
+    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
+    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
+    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
+    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
+    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
+    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
+    0xde0506f1UL
+  },
+  {
+    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
+    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
+    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
+    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
+    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
+    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
+    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
+    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
+    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
+    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
+    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
+    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
+    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
+    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
+    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
+    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
+    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
+    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
+    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
+    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
+    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
+    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
+    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
+    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
+    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
+    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
+    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
+    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
+    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
+    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
+    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
+    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
+    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
+    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
+    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
+    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
+    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
+    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
+    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
+    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
+    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
+    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
+    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
+    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
+    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
+    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
+    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
+    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
+    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
+    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
+    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
+    0x8def022dUL
+  },
+  {
+    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
+    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
+    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
+    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
+    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
+    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
+    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
+    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
+    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
+    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
+    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
+    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
+    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
+    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
+    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
+    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
+    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
+    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
+    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
+    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
+    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
+    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
+    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
+    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
+    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
+    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
+    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
+    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
+    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
+    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
+    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
+    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
+    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
+    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
+    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
+    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
+    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
+    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
+    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
+    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
+    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
+    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
+    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
+    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
+    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
+    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
+    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
+    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
+    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
+    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
+    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
+    0x72fd2493UL
+  },
+  {
+    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
+    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
+    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
+    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
+    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
+    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
+    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
+    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
+    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
+    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
+    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
+    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
+    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
+    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
+    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
+    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
+    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
+    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
+    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
+    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
+    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
+    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
+    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
+    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
+    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
+    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
+    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
+    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
+    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
+    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
+    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
+    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
+    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
+    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
+    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
+    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
+    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
+    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
+    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
+    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
+    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
+    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
+    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
+    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
+    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
+    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
+    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
+    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
+    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
+    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
+    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
+    0xed3498beUL
+  },
+  {
+    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
+    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
+    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
+    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
+    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
+    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
+    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
+    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
+    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
+    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
+    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
+    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
+    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
+    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
+    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
+    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
+    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
+    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
+    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
+    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
+    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
+    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
+    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
+    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
+    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
+    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
+    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
+    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
+    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
+    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
+    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
+    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
+    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
+    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
+    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
+    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
+    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
+    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
+    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
+    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
+    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
+    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
+    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
+    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
+    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
+    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
+    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
+    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
+    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
+    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
+    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
+    0xf10605deUL
+#endif
+  }
+};

Copied: branches/branch-3.0/include/fltk3zlib/deflate.h (from rev 8987, branches/branch-3.0/zlib/deflate.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/deflate.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/deflate.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,342 @@
+/* deflate.h -- internal compression state
+ * Copyright (C) 1995-2010 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+   part of the implementation of the compression library and is
+   subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef DEFLATE_H
+#define DEFLATE_H
+
+#include "zutil.h"
+
+/* define NO_GZIP when compiling if you want to disable gzip header and
+   trailer creation by deflate().  NO_GZIP would be used to avoid linking in
+   the crc code when it is not needed.  For shared libraries, gzip encoding
+   should be left enabled. */
+#ifndef NO_GZIP
+#  define GZIP
+#endif
+
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+#define LENGTH_CODES 29
+/* number of length codes, not counting the special END_BLOCK code */
+
+#define LITERALS  256
+/* number of literal bytes 0..255 */
+
+#define L_CODES (LITERALS+1+LENGTH_CODES)
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+#define D_CODES   30
+/* number of distance codes */
+
+#define BL_CODES  19
+/* number of codes used to transfer the bit lengths */
+
+#define HEAP_SIZE (2*L_CODES+1)
+/* maximum heap size */
+
+#define MAX_BITS 15
+/* All codes must not exceed MAX_BITS bits */
+
+#define INIT_STATE    42
+#define EXTRA_STATE   69
+#define NAME_STATE    73
+#define COMMENT_STATE 91
+#define HCRC_STATE   103
+#define BUSY_STATE   113
+#define FINISH_STATE 666
+/* Stream status */
+
+
+/* Data structure describing a single value and its code string. */
+typedef struct ct_data_s {
+    union {
+        ush  freq;       /* frequency count */
+        ush  code;       /* bit string */
+    } fc;
+    union {
+        ush  dad;        /* father node in Huffman tree */
+        ush  len;        /* length of bit string */
+    } dl;
+} FAR ct_data;
+
+#define Freq fc.freq
+#define Code fc.code
+#define Dad  dl.dad
+#define Len  dl.len
+
+typedef struct static_tree_desc_s  static_tree_desc;
+
+typedef struct tree_desc_s {
+    ct_data *dyn_tree;           /* the dynamic tree */
+    int     max_code;            /* largest code with non zero frequency */
+    static_tree_desc *stat_desc; /* the corresponding static tree */
+} FAR tree_desc;
+
+typedef ush Pos;
+typedef Pos FAR Posf;
+typedef unsigned IPos;
+
+/* A Pos is an index in the character window. We use short instead of int to
+ * save space in the various tables. IPos is used only for parameter passing.
+ */
+
+typedef struct internal_state {
+    z_streamp strm;      /* pointer back to this zlib stream */
+    int   status;        /* as the name implies */
+    Bytef *pending_buf;  /* output still pending */
+    ulg   pending_buf_size; /* size of pending_buf */
+    Bytef *pending_out;  /* next pending byte to output to the stream */
+    uInt   pending;      /* nb of bytes in the pending buffer */
+    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
+    gz_headerp  gzhead;  /* gzip header information to write */
+    uInt   gzindex;      /* where in extra, name, or comment */
+    Byte  method;        /* STORED (for zip only) or DEFLATED */
+    int   last_flush;    /* value of flush param for previous deflate call */
+
+                /* used by deflate.c: */
+
+    uInt  w_size;        /* LZ77 window size (32K by default) */
+    uInt  w_bits;        /* log2(w_size)  (8..16) */
+    uInt  w_mask;        /* w_size - 1 */
+
+    Bytef *window;
+    /* Sliding window. Input bytes are read into the second half of the window,
+     * and move to the first half later to keep a dictionary of at least wSize
+     * bytes. With this organization, matches are limited to a distance of
+     * wSize-MAX_MATCH bytes, but this ensures that IO is always
+     * performed with a length multiple of the block size. Also, it limits
+     * the window size to 64K, which is quite useful on MSDOS.
+     * To do: use the user input buffer as sliding window.
+     */
+
+    ulg window_size;
+    /* Actual size of window: 2*wSize, except when the user input buffer
+     * is directly used as sliding window.
+     */
+
+    Posf *prev;
+    /* Link to older string with same hash index. To limit the size of this
+     * array to 64K, this link is maintained only for the last 32K strings.
+     * An index in this array is thus a window index modulo 32K.
+     */
+
+    Posf *head; /* Heads of the hash chains or NIL. */
+
+    uInt  ins_h;          /* hash index of string to be inserted */
+    uInt  hash_size;      /* number of elements in hash table */
+    uInt  hash_bits;      /* log2(hash_size) */
+    uInt  hash_mask;      /* hash_size-1 */
+
+    uInt  hash_shift;
+    /* Number of bits by which ins_h must be shifted at each input
+     * step. It must be such that after MIN_MATCH steps, the oldest
+     * byte no longer takes part in the hash key, that is:
+     *   hash_shift * MIN_MATCH >= hash_bits
+     */
+
+    long block_start;
+    /* Window position at the beginning of the current output block. Gets
+     * negative when the window is moved backwards.
+     */
+
+    uInt match_length;           /* length of best match */
+    IPos prev_match;             /* previous match */
+    int match_available;         /* set if previous match exists */
+    uInt strstart;               /* start of string to insert */
+    uInt match_start;            /* start of matching string */
+    uInt lookahead;              /* number of valid bytes ahead in window */
+
+    uInt prev_length;
+    /* Length of the best match at previous step. Matches not greater than this
+     * are discarded. This is used in the lazy match evaluation.
+     */
+
+    uInt max_chain_length;
+    /* To speed up deflation, hash chains are never searched beyond this
+     * length.  A higher limit improves compression ratio but degrades the
+     * speed.
+     */
+
+    uInt max_lazy_match;
+    /* Attempt to find a better match only when the current match is strictly
+     * smaller than this value. This mechanism is used only for compression
+     * levels >= 4.
+     */
+#   define max_insert_length  max_lazy_match
+    /* Insert new strings in the hash table only if the match length is not
+     * greater than this length. This saves time but degrades compression.
+     * max_insert_length is used only for compression levels <= 3.
+     */
+
+    int level;    /* compression level (1..9) */
+    int strategy; /* favor or force Huffman coding*/
+
+    uInt good_match;
+    /* Use a faster search when the previous match is longer than this */
+
+    int nice_match; /* Stop searching when current match exceeds this */
+
+                /* used by trees.c: */
+    /* Didn't use ct_data typedef below to supress compiler warning */
+    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
+    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
+
+    struct tree_desc_s l_desc;               /* desc. for literal tree */
+    struct tree_desc_s d_desc;               /* desc. for distance tree */
+    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
+
+    ush bl_count[MAX_BITS+1];
+    /* number of codes at each bit length for an optimal tree */
+
+    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
+    int heap_len;               /* number of elements in the heap */
+    int heap_max;               /* element of largest frequency */
+    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+     * The same heap array is used to build all trees.
+     */
+
+    uch depth[2*L_CODES+1];
+    /* Depth of each subtree used as tie breaker for trees of equal frequency
+     */
+
+    uchf *l_buf;          /* buffer for literals or lengths */
+
+    uInt  lit_bufsize;
+    /* Size of match buffer for literals/lengths.  There are 4 reasons for
+     * limiting lit_bufsize to 64K:
+     *   - frequencies can be kept in 16 bit counters
+     *   - if compression is not successful for the first block, all input
+     *     data is still in the window so we can still emit a stored block even
+     *     when input comes from standard input.  (This can also be done for
+     *     all blocks if lit_bufsize is not greater than 32K.)
+     *   - if compression is not successful for a file smaller than 64K, we can
+     *     even emit a stored file instead of a stored block (saving 5 bytes).
+     *     This is applicable only for zip (not gzip or zlib).
+     *   - creating new Huffman trees less frequently may not provide fast
+     *     adaptation to changes in the input data statistics. (Take for
+     *     example a binary file with poorly compressible code followed by
+     *     a highly compressible string table.) Smaller buffer sizes give
+     *     fast adaptation but have of course the overhead of transmitting
+     *     trees more frequently.
+     *   - I can't count above 4
+     */
+
+    uInt last_lit;      /* running index in l_buf */
+
+    ushf *d_buf;
+    /* Buffer for distances. To simplify the code, d_buf and l_buf have
+     * the same number of elements. To use different lengths, an extra flag
+     * array would be necessary.
+     */
+
+    ulg opt_len;        /* bit length of current block with optimal trees */
+    ulg static_len;     /* bit length of current block with static trees */
+    uInt matches;       /* number of string matches in current block */
+    int last_eob_len;   /* bit length of EOB code for last block */
+
+#ifdef DEBUG
+    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
+    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
+#endif
+
+    ush bi_buf;
+    /* Output buffer. bits are inserted starting at the bottom (least
+     * significant bits).
+     */
+    int bi_valid;
+    /* Number of valid bits in bi_buf.  All bits above the last valid bit
+     * are always zero.
+     */
+
+    ulg high_water;
+    /* High water mark offset in window for initialized bytes -- bytes above
+     * this are set to zero in order to avoid memory check warnings when
+     * longest match routines access bytes past the input.  This is then
+     * updated to the new high water mark.
+     */
+
+} FAR deflate_state;
+
+/* Output a byte on the stream.
+ * IN assertion: there is enough room in pending_buf.
+ */
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
+/* In order to simplify the code, particularly on 16 bit machines, match
+ * distances are limited to MAX_DIST instead of WSIZE.
+ */
+
+#define WIN_INIT MAX_MATCH
+/* Number of bytes after end of data in window to initialize in order to avoid
+   memory checker errors from longest match routines */
+
+        /* in trees.c */
+void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
+int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
+                        ulg stored_len, int last));
+void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
+void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
+                        ulg stored_len, int last));
+
+#define d_code(dist) \
+   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
+/* Mapping from a distance to a distance code. dist is the distance - 1 and
+ * must not have side effects. _dist_code[256] and _dist_code[257] are never
+ * used.
+ */
+
+#ifndef DEBUG
+/* Inline versions of _tr_tally for speed: */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+  extern uch ZLIB_INTERNAL _length_code[];
+  extern uch ZLIB_INTERNAL _dist_code[];
+#else
+  extern const uch ZLIB_INTERNAL _length_code[];
+  extern const uch ZLIB_INTERNAL _dist_code[];
+#endif
+
+# define _tr_tally_lit(s, c, flush) \
+  { uch cc = (c); \
+    s->d_buf[s->last_lit] = 0; \
+    s->l_buf[s->last_lit++] = cc; \
+    s->dyn_ltree[cc].Freq++; \
+    flush = (s->last_lit == s->lit_bufsize-1); \
+   }
+# define _tr_tally_dist(s, distance, length, flush) \
+  { uch len = (length); \
+    ush dist = (distance); \
+    s->d_buf[s->last_lit] = dist; \
+    s->l_buf[s->last_lit++] = len; \
+    dist--; \
+    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+    s->dyn_dtree[d_code(dist)].Freq++; \
+    flush = (s->last_lit == s->lit_bufsize-1); \
+  }
+#else
+# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
+# define _tr_tally_dist(s, distance, length, flush) \
+              flush = _tr_tally(s, distance, length)
+#endif
+
+#endif /* DEFLATE_H */

Copied: branches/branch-3.0/include/fltk3zlib/gzguts.h (from rev 8987, branches/branch-3.0/zlib/gzguts.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/gzguts.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/gzguts.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,132 @@
+/* gzguts.h -- zlib internal header definitions for gz* operations
+ * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#ifdef _LARGEFILE64_SOURCE
+#  ifndef _LARGEFILE_SOURCE
+#    define _LARGEFILE_SOURCE 1
+#  endif
+#  ifdef _FILE_OFFSET_BITS
+#    undef _FILE_OFFSET_BITS
+#  endif
+#endif
+
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#  define ZLIB_INTERNAL /*__attribute__((visibility ("hidden")))*/
+#else
+#  define ZLIB_INTERNAL
+#endif
+
+#include <stdio.h>
+#include "zlib.h"
+#ifdef STDC
+#  include <string.h>
+#  include <stdlib.h>
+#  include <limits.h>
+#endif
+#include <fcntl.h>
+
+#ifdef NO_DEFLATE       /* for compatibility with old definition */
+#  define NO_GZCOMPRESS
+#endif
+
+#ifdef _MSC_VER
+#  include <io.h>
+#  define vsnprintf _vsnprintf
+#endif
+
+#ifndef local
+#  define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+/* gz* functions always use library allocation functions */
+#ifndef STDC
+  extern voidp  malloc OF((uInt size));
+  extern void   free   OF((voidpf ptr));
+#endif
+
+/* get errno and strerror definition */
+#if defined UNDER_CE
+#  include <windows.h>
+#  define zstrerror() gz_strwinerror((DWORD)GetLastError())
+#else
+#  ifdef STDC
+#    include <errno.h>
+#    define zstrerror() strerror(errno)
+#  else
+#    define zstrerror() "stdio error (consult errno)"
+#  endif
+#endif
+
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+    ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+    ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+    ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+#endif
+
+/* default i/o buffer size -- double this for output when reading */
+#define GZBUFSIZE 8192
+
+/* gzip modes, also provide a little integrity check on the passed structure */
+#define GZ_NONE 0
+#define GZ_READ 7247
+#define GZ_WRITE 31153
+#define GZ_APPEND 1     /* mode set to GZ_WRITE after the file is opened */
+
+/* values for gz_state how */
+#define LOOK 0      /* look for a gzip header */
+#define COPY 1      /* copy input directly */
+#define GZIP 2      /* decompress a gzip stream */
+
+/* internal gzip file state data structure */
+typedef struct {
+        /* used for both reading and writing */
+    int mode;               /* see gzip modes above */
+    int fd;                 /* file descriptor */
+    char *path;             /* path or fd for error messages */
+    z_off64_t pos;          /* current position in uncompressed data */
+    unsigned size;          /* buffer size, zero if not allocated yet */
+    unsigned want;          /* requested buffer size, default is GZBUFSIZE */
+    unsigned char *in;      /* input buffer */
+    unsigned char *out;     /* output buffer (double-sized when reading) */
+    unsigned char *next;    /* next output data to deliver or write */
+        /* just for reading */
+    unsigned have;          /* amount of output data unused at next */
+    int eof;                /* true if end of input file reached */
+    z_off64_t start;        /* where the gzip data started, for rewinding */
+    z_off64_t raw;          /* where the raw data started, for seeking */
+    int how;                /* 0: get header, 1: copy, 2: decompress */
+    int direct;             /* true if last read direct, false if gzip */
+        /* just for writing */
+    int level;              /* compression level */
+    int strategy;           /* compression strategy */
+        /* seek request */
+    z_off64_t skip;         /* amount to skip (already rewound if backwards) */
+    int seek;               /* true if seek request pending */
+        /* error information */
+    int err;                /* error code */
+    char *msg;              /* error message */
+        /* zlib inflate or deflate stream */
+    z_stream strm;          /* stream structure in-place (not a pointer) */
+} gz_state;
+typedef gz_state FAR *gz_statep;
+
+/* shared functions */
+void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
+#if defined UNDER_CE
+char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
+#endif
+
+/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
+   value -- needed when comparing unsigned to z_off64_t, which is signed
+   (possible z_off64_t types off_t, off64_t, and long are all signed) */
+#ifdef INT_MAX
+#  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
+#else
+unsigned ZLIB_INTERNAL gz_intmax OF((void));
+#  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
+#endif

Copied: branches/branch-3.0/include/fltk3zlib/inffast.h (from rev 8987, branches/branch-3.0/zlib/inffast.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/inffast.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/inffast.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,11 @@
+/* inffast.h -- header to use inffast.c
+ * Copyright (C) 1995-2003, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+   part of the implementation of the compression library and is
+   subject to change. Applications should only use zlib.h.
+ */
+
+void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));

Copied: branches/branch-3.0/include/fltk3zlib/inffixed.h (from rev 8987, branches/branch-3.0/zlib/inffixed.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/inffixed.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/inffixed.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,94 @@
+    /* inffixed.h -- table for decoding fixed codes
+     * Generated automatically by makefixed().
+     */
+
+    /* WARNING: this file should *not* be used by applications. It
+       is part of the implementation of the compression library and
+       is subject to change. Applications should only use zlib.h.
+     */
+
+    static const code lenfix[512] = {
+        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
+        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
+        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
+        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
+        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
+        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
+        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
+        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
+        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
+        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
+        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
+        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
+        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
+        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
+        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
+        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
+        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
+        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
+        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
+        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
+        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
+        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
+        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
+        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
+        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
+        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
+        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
+        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
+        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
+        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
+        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
+        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
+        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
+        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
+        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
+        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
+        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
+        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
+        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
+        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
+        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
+        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
+        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
+        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
+        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
+        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
+        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
+        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
+        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
+        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
+        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
+        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
+        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
+        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
+        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
+        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
+        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
+        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
+        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
+        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
+        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
+        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
+        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
+        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
+        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
+        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
+        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
+        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
+        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
+        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
+        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
+        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
+        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
+        {0,9,255}
+    };
+
+    static const code distfix[32] = {
+        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
+        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
+        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
+        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
+        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
+        {22,5,193},{64,5,0}
+    };

Copied: branches/branch-3.0/include/fltk3zlib/inflate.h (from rev 8987, branches/branch-3.0/zlib/inflate.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/inflate.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/inflate.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,122 @@
+/* inflate.h -- internal inflate state definition
+ * Copyright (C) 1995-2009 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+   part of the implementation of the compression library and is
+   subject to change. Applications should only use zlib.h.
+ */
+
+/* define NO_GZIP when compiling if you want to disable gzip header and
+   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
+   the crc code when it is not needed.  For shared libraries, gzip decoding
+   should be left enabled. */
+#ifndef NO_GZIP
+#  define GUNZIP
+#endif
+
+/* Possible inflate modes between inflate() calls */
+typedef enum {
+    HEAD,       /* i: waiting for magic header */
+    FLAGS,      /* i: waiting for method and flags (gzip) */
+    TIME,       /* i: waiting for modification time (gzip) */
+    OS,         /* i: waiting for extra flags and operating system (gzip) */
+    EXLEN,      /* i: waiting for extra length (gzip) */
+    EXTRA,      /* i: waiting for extra bytes (gzip) */
+    NAME,       /* i: waiting for end of file name (gzip) */
+    COMMENT,    /* i: waiting for end of comment (gzip) */
+    HCRC,       /* i: waiting for header crc (gzip) */
+    DICTID,     /* i: waiting for dictionary check value */
+    DICT,       /* waiting for inflateSetDictionary() call */
+        TYPE,       /* i: waiting for type bits, including last-flag bit */
+        TYPEDO,     /* i: same, but skip check to exit inflate on new block */
+        STORED,     /* i: waiting for stored size (length and complement) */
+        COPY_,      /* i/o: same as COPY below, but only first time in */
+        COPY,       /* i/o: waiting for input or output to copy stored block */
+        TABLE,      /* i: waiting for dynamic block table lengths */
+        LENLENS,    /* i: waiting for code length code lengths */
+        CODELENS,   /* i: waiting for length/lit and distance code lengths */
+            LEN_,       /* i: same as LEN below, but only first time in */
+            LEN,        /* i: waiting for length/lit/eob code */
+            LENEXT,     /* i: waiting for length extra bits */
+            DIST,       /* i: waiting for distance code */
+            DISTEXT,    /* i: waiting for distance extra bits */
+            MATCH,      /* o: waiting for output space to copy string */
+            LIT,        /* o: waiting for output space to write literal */
+    CHECK,      /* i: waiting for 32-bit check value */
+    LENGTH,     /* i: waiting for 32-bit length (gzip) */
+    DONE,       /* finished check, done -- remain here until reset */
+    BAD,        /* got a data error -- remain here until reset */
+    MEM,        /* got an inflate() memory error -- remain here until reset */
+    SYNC        /* looking for synchronization bytes to restart inflate() */
+} inflate_mode;
+
+/*
+    State transitions between above modes -
+
+    (most modes can go to BAD or MEM on error -- not shown for clarity)
+
+    Process header:
+        HEAD -> (gzip) or (zlib) or (raw)
+        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
+                  HCRC -> TYPE
+        (zlib) -> DICTID or TYPE
+        DICTID -> DICT -> TYPE
+        (raw) -> TYPEDO
+    Read deflate blocks:
+            TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
+            STORED -> COPY_ -> COPY -> TYPE
+            TABLE -> LENLENS -> CODELENS -> LEN_
+            LEN_ -> LEN
+    Read deflate codes in fixed or dynamic block:
+                LEN -> LENEXT or LIT or TYPE
+                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
+                LIT -> LEN
+    Process trailer:
+        CHECK -> LENGTH -> DONE
+ */
+
+/* state maintained between inflate() calls.  Approximately 10K bytes. */
+struct inflate_state {
+    inflate_mode mode;          /* current inflate mode */
+    int last;                   /* true if processing last block */
+    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
+    int havedict;               /* true if dictionary provided */
+    int flags;                  /* gzip header method and flags (0 if zlib) */
+    unsigned dmax;              /* zlib header max distance (INFLATE_STRICT) */
+    unsigned long check;        /* protected copy of check value */
+    unsigned long total;        /* protected copy of output count */
+    gz_headerp head;            /* where to save gzip header information */
+        /* sliding window */
+    unsigned wbits;             /* log base 2 of requested window size */
+    unsigned wsize;             /* window size or zero if not using window */
+    unsigned whave;             /* valid bytes in the window */
+    unsigned wnext;             /* window write index */
+    unsigned char FAR *window;  /* allocated sliding window, if needed */
+        /* bit accumulator */
+    unsigned long hold;         /* input bit accumulator */
+    unsigned bits;              /* number of bits in "in" */
+        /* for string and stored block copying */
+    unsigned length;            /* literal or length of data to copy */
+    unsigned offset;            /* distance back to copy string from */
+        /* for table and code decoding */
+    unsigned extra;             /* extra bits needed */
+        /* fixed and dynamic code tables */
+    code const FAR *lencode;    /* starting table for length/literal codes */
+    code const FAR *distcode;   /* starting table for distance codes */
+    unsigned lenbits;           /* index bits for lencode */
+    unsigned distbits;          /* index bits for distcode */
+        /* dynamic table building */
+    unsigned ncode;             /* number of code length code lengths */
+    unsigned nlen;              /* number of length code lengths */
+    unsigned ndist;             /* number of distance code lengths */
+    unsigned have;              /* number of code lengths in lens[] */
+    code FAR *next;             /* next available space in codes[] */
+    unsigned short lens[320];   /* temporary storage for code lengths */
+    unsigned short work[288];   /* work area for code table building */
+    code codes[ENOUGH];         /* space for code tables */
+    int sane;                   /* if false, allow invalid distance too far */
+    int back;                   /* bits back of last unprocessed length/lit */
+    unsigned was;               /* initial length of match */
+};

Copied: branches/branch-3.0/include/fltk3zlib/inftrees.h (from rev 8987, branches/branch-3.0/zlib/inftrees.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/inftrees.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/inftrees.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,62 @@
+/* inftrees.h -- header to use inftrees.c
+ * Copyright (C) 1995-2005, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+   part of the implementation of the compression library and is
+   subject to change. Applications should only use zlib.h.
+ */
+
+/* Structure for decoding tables.  Each entry provides either the
+   information needed to do the operation requested by the code that
+   indexed that table entry, or it provides a pointer to another
+   table that indexes more bits of the code.  op indicates whether
+   the entry is a pointer to another table, a literal, a length or
+   distance, an end-of-block, or an invalid code.  For a table
+   pointer, the low four bits of op is the number of index bits of
+   that table.  For a length or distance, the low four bits of op
+   is the number of extra bits to get after the code.  bits is
+   the number of bits in this code or part of the code to drop off
+   of the bit buffer.  val is the actual byte to output in the case
+   of a literal, the base length or distance, or the offset from
+   the current table to the next table.  Each entry is four bytes. */
+typedef struct {
+    unsigned char op;           /* operation, extra bits, table bits */
+    unsigned char bits;         /* bits in this part of the code */
+    unsigned short val;         /* offset in table or code value */
+} code;
+
+/* op values as set by inflate_table():
+    00000000 - literal
+    0000tttt - table link, tttt != 0 is the number of table index bits
+    0001eeee - length or distance, eeee is the number of extra bits
+    01100000 - end of block
+    01000000 - invalid code
+ */
+
+/* Maximum size of the dynamic table.  The maximum number of code structures is
+   1444, which is the sum of 852 for literal/length codes and 592 for distance
+   codes.  These values were found by exhaustive searches using the program
+   examples/enough.c found in the zlib distribtution.  The arguments to that
+   program are the number of symbols, the initial root table size, and the
+   maximum bit length of a code.  "enough 286 9 15" for literal/length codes
+   returns returns 852, and "enough 30 6 15" for distance codes returns 592.
+   The initial root table size (9 or 6) is found in the fifth argument of the
+   inflate_table() calls in inflate.c and infback.c.  If the root table size is
+   changed, then these maximum sizes would be need to be recalculated and
+   updated. */
+#define ENOUGH_LENS 852
+#define ENOUGH_DISTS 592
+#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
+
+/* Type of code to build for inflate_table() */
+typedef enum {
+    CODES,
+    LENS,
+    DISTS
+} codetype;
+
+int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
+                             unsigned codes, code FAR * FAR *table,
+                             unsigned FAR *bits, unsigned short FAR *work));

Copied: branches/branch-3.0/include/fltk3zlib/trees.h (from rev 8987, branches/branch-3.0/zlib/trees.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/trees.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/trees.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,128 @@
+/* header created automatically with -DGEN_TREES_H */
+
+local const ct_data static_ltree[L_CODES+2] = {
+{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
+{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
+{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
+{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
+{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
+{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
+{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
+{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
+{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
+{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
+{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
+{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
+{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
+{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
+{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
+{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
+{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
+{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
+{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
+{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
+{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
+{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
+{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
+{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
+{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
+{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
+{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
+{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
+{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
+{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
+{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
+{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
+{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
+{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
+{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
+{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
+{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
+{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
+{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
+{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
+{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
+{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
+{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
+{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
+{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
+{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
+{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
+{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
+{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
+{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
+{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
+{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
+{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
+{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
+{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
+{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
+{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
+{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
+};
+
+local const ct_data static_dtree[D_CODES] = {
+{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
+{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
+{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
+{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
+{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
+{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
+};
+
+const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
+ 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
+ 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
+10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
+13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
+18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
+23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
+};
+
+const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
+ 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
+13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
+17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
+19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
+22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
+23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
+};
+
+local const int base_length[LENGTH_CODES] = {
+0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
+64, 80, 96, 112, 128, 160, 192, 224, 0
+};
+
+local const int base_dist[D_CODES] = {
+    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
+   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
+ 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
+};
+

Copied: branches/branch-3.0/include/fltk3zlib/zconf.h (from rev 8987, branches/branch-3.0/zlib/zconf.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/zconf.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/zconf.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,432 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  define compress              z_compress
+#  define compress2             z_compress2
+#  define compressBound         z_compressBound
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
+#  define gz_strwinerror        z_gz_strwinerror
+#  define gzbuffer              z_gzbuffer
+#  define gzclearerr            z_gzclearerr
+#  define gzclose               z_gzclose
+#  define gzclose_r             z_gzclose_r
+#  define gzclose_w             z_gzclose_w
+#  define gzdirect              z_gzdirect
+#  define gzdopen               z_gzdopen
+#  define gzeof                 z_gzeof
+#  define gzerror               z_gzerror
+#  define gzflush               z_gzflush
+#  define gzgetc                z_gzgetc
+#  define gzgets                z_gzgets
+#  define gzoffset              z_gzoffset
+#  define gzoffset64            z_gzoffset64
+#  define gzopen                z_gzopen
+#  define gzopen64              z_gzopen64
+#  define gzprintf              z_gzprintf
+#  define gzputc                z_gzputc
+#  define gzputs                z_gzputs
+#  define gzread                z_gzread
+#  define gzrewind              z_gzrewind
+#  define gzseek                z_gzseek
+#  define gzseek64              z_gzseek64
+#  define gzsetparams           z_gzsetparams
+#  define gztell                z_gztell
+#  define gztell64              z_gztell64
+#  define gzungetc              z_gzungetc
+#  define gzwrite               z_gzwrite
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  define uncompress            z_uncompress
+#  define zError                z_zError
+#  define zcalloc               z_zcalloc
+#  define zcfree                z_zcfree
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  define gzFile                z_gzFile
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#if !(defined(WINDOWS) || defined(WIN32))
+#  define HAVE_UNISTD_H
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef STDC
+#  include <sys/types.h>    /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+#  undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+#  include <unistd.h>       /* for SEEK_* and off_t */
+#  ifdef VMS
+#    include <unixio.h>     /* for off_t */
+#  endif
+#  ifndef z_off_t
+#    define z_off_t off_t
+#  endif
+#endif
+
+#ifndef SEEK_SET
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#  define z_off64_t off64_t
+#else
+#  define z_off64_t z_off_t
+#endif
+
+#if defined(__OS400__)
+#  define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+#  define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */

Copied: branches/branch-3.0/include/fltk3zlib/zlib.h (from rev 8987, branches/branch-3.0/zlib/zlib.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/zlib.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/zlib.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1613 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+  version 1.2.5, April 19th, 2010
+
+  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup@gzip.org          madler@alumni.caltech.edu
+
+
+  The data format used by the zlib library is described by RFCs (Request for
+  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.5"
+#define ZLIB_VERNUM 0x1250
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+    The 'zlib' compression library provides in-memory compression and
+  decompression functions, including integrity checks of the uncompressed data.
+  This version of the library supports only one compression method (deflation)
+  but other algorithms will be added later and will have the same stream
+  interface.
+
+    Compression can be done in a single step if the buffers are large enough,
+  or can be done by repeated calls of the compression function.  In the latter
+  case, the application must provide more input and/or consume the output
+  (providing more output space) before each call.
+
+    The compressed data format used by default by the in-memory functions is
+  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+  around a deflate stream, which is itself documented in RFC 1951.
+
+    The library also supports reading and writing files in gzip (.gz) format
+  with an interface similar to that of stdio using the functions that start
+  with "gz".  The gzip format is different from the zlib format.  gzip is a
+  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+    This library can optionally read and write gzip streams in memory as well.
+
+    The zlib format was designed to be compact and fast for use in memory
+  and on communications channels.  The gzip format was designed for single-
+  file compression on file systems, has a larger header than zlib to maintain
+  directory information, and uses a different, slower check method than zlib.
+
+    The library does not install any signal handler.  The decoder checks
+  the consistency of the compressed data, so the library should never crash
+  even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+    Bytef    *next_in;  /* next input byte */
+    uInt     avail_in;  /* number of bytes available at next_in */
+    uLong    total_in;  /* total nb of input bytes read so far */
+
+    Bytef    *next_out; /* next output byte should be put there */
+    uInt     avail_out; /* remaining free space at next_out */
+    uLong    total_out; /* total nb of bytes output so far */
+
+    char     *msg;      /* last error message, NULL if no error */
+    struct internal_state FAR *state; /* not visible by applications */
+
+    alloc_func zalloc;  /* used to allocate the internal state */
+    free_func  zfree;   /* used to free the internal state */
+    voidpf     opaque;  /* private data object passed to zalloc and zfree */
+
+    int     data_type;  /* best guess about the data type: binary or text */
+    uLong   adler;      /* adler32 value of the uncompressed data */
+    uLong   reserved;   /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+     gzip header information passed to and from zlib routines.  See RFC 1952
+  for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+    int     text;       /* true if compressed data believed to be text */
+    uLong   time;       /* modification time */
+    int     xflags;     /* extra flags (not used when writing a gzip file) */
+    int     os;         /* operating system */
+    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
+    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
+    uInt    extra_max;  /* space at extra (only when reading header) */
+    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
+    uInt    name_max;   /* space at name (only when reading header) */
+    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
+    uInt    comm_max;   /* space at comment (only when reading header) */
+    int     hcrc;       /* true if there was or will be a header crc */
+    int     done;       /* true when done reading gzip header (not used
+                           when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+     The application must update next_in and avail_in when avail_in has dropped
+   to zero.  It must update next_out and avail_out when avail_out has dropped
+   to zero.  The application must initialize zalloc, zfree and opaque before
+   calling the init function.  All other fields are set by the compression
+   library and must not be updated by the application.
+
+     The opaque value provided by the application will be passed as the first
+   parameter for calls of zalloc and zfree.  This can be useful for custom
+   memory management.  The compression library attaches no meaning to the
+   opaque value.
+
+     zalloc must return Z_NULL if there is not enough memory for the object.
+   If zlib is used in a multi-threaded application, zalloc and zfree must be
+   thread safe.
+
+     On 16-bit systems, the functions zalloc and zfree must be able to allocate
+   exactly 65536 bytes, but will not be required to allocate more than this if
+   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
+   returned by zalloc for objects of exactly 65536 bytes *must* have their
+   offset normalized to zero.  The default allocation function provided by this
+   library ensures this (see zutil.c).  To reduce memory requirements and avoid
+   any allocation of 64K objects, at the expense of compression ratio, compile
+   the library with -DMAX_WBITS=14 (see zconf.h).
+
+     The fields total_in and total_out can be used for statistics or progress
+   reports.  After compression, total_in holds the total size of the
+   uncompressed data and may be saved for use in the decompressor (particularly
+   if the decompressor wants to decompress everything in a single step).
+*/
+
+                        /* constants */
+
+#define Z_NO_FLUSH      0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH    2
+#define Z_FULL_FLUSH    3
+#define Z_FINISH        4
+#define Z_BLOCK         5
+#define Z_TREES         6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK            0
+#define Z_STREAM_END    1
+#define Z_NEED_DICT     2
+#define Z_ERRNO        (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR   (-3)
+#define Z_MEM_ERROR    (-4)
+#define Z_BUF_ERROR    (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION         0
+#define Z_BEST_SPEED             1
+#define Z_BEST_COMPRESSION       9
+#define Z_DEFAULT_COMPRESSION  (-1)
+/* compression levels */
+
+#define Z_FILTERED            1
+#define Z_HUFFMAN_ONLY        2
+#define Z_RLE                 3
+#define Z_FIXED               4
+#define Z_DEFAULT_STRATEGY    0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY   0
+#define Z_TEXT     1
+#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN  2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED   8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+                        /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+   If the first character differs, the library code actually used is not
+   compatible with the zlib.h header file used by the application.  This check
+   is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+     Initializes the internal stream state for compression.  The fields
+   zalloc, zfree and opaque must be initialized before by the caller.  If
+   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+   allocation functions.
+
+     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+   1 gives best speed, 9 gives best compression, 0 gives no compression at all
+   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
+   requests a default compromise between speed and compression (currently
+   equivalent to level 6).
+
+     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if level is not a valid compression level, or
+   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
+   if there is no error message.  deflateInit does not perform any compression:
+   this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+    deflate compresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+    The detailed semantics are as follows.  deflate performs one or both of the
+  following actions:
+
+  - Compress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in and avail_in are updated and
+    processing will resume at this point for the next call of deflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  This action is forced if the parameter flush is non zero.
+    Forcing flush frequently degrades the compression ratio, so this parameter
+    should be set only when necessary (in interactive applications).  Some
+    output may be provided even if flush is not set.
+
+    Before the call of deflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating avail_in or avail_out accordingly; avail_out should
+  never be zero before the call.  The application can consume the compressed
+  output when it wants, for example when the output buffer is full (avail_out
+  == 0), or after each call of deflate().  If deflate returns Z_OK and with
+  zero avail_out, it must be called again after making room in the output
+  buffer because there might be more output pending.
+
+    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+  decide how much data to accumulate before producing output, in order to
+  maximize compression.
+
+    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+  flushed to the output buffer and the output is aligned on a byte boundary, so
+  that the decompressor can get all input data available so far.  (In
+  particular avail_in is zero after the call if enough output space has been
+  provided before the call.) Flushing may degrade compression for some
+  compression algorithms and so it should be used only when necessary.  This
+  completes the current deflate block and follows it with an empty stored block
+  that is three bits plus filler bits to the next byte, followed by four bytes
+  (00 00 ff ff).
+
+    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+  output buffer, but the output is not aligned to a byte boundary.  All of the
+  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+  This completes the current deflate block and follows it with an empty fixed
+  codes block that is 10 bits long.  This assures that enough bytes are output
+  in order for the decompressor to finish the block before the empty fixed code
+  block.
+
+    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+  seven bits of the current block are held to be written as the next byte after
+  the next deflate block is completed.  In this case, the decompressor may not
+  be provided enough bits at this point in order to complete decompression of
+  the data provided so far to the compressor.  It may need to wait for the next
+  block to be emitted.  This is for advanced applications that need to control
+  the emission of deflate blocks.
+
+    If flush is set to Z_FULL_FLUSH, all output is flushed as with
+  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+  restart from this point if previous compressed data has been damaged or if
+  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
+  compression.
+
+    If deflate returns with avail_out == 0, this function must be called again
+  with the same value of the flush parameter and more output space (updated
+  avail_out), until the flush is complete (deflate returns with non-zero
+  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+  avail_out is greater than six to avoid repeated flush markers due to
+  avail_out == 0 on return.
+
+    If the parameter flush is set to Z_FINISH, pending input is processed,
+  pending output is flushed and deflate returns with Z_STREAM_END if there was
+  enough output space; if deflate returns with Z_OK, this function must be
+  called again with Z_FINISH and more output space (updated avail_out) but no
+  more input data, until it returns with Z_STREAM_END or an error.  After
+  deflate has returned Z_STREAM_END, the only possible operations on the stream
+  are deflateReset or deflateEnd.
+
+    Z_FINISH can be used immediately after deflateInit if all the compression
+  is to be done in a single step.  In this case, avail_out must be at least the
+  value returned by deflateBound (see below).  If deflate does not return
+  Z_STREAM_END, then it must be called again as described above.
+
+    deflate() sets strm->adler to the adler32 checksum of all input read
+  so far (that is, total_in bytes).
+
+    deflate() may update strm->data_type if it can make a good guess about
+  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
+  binary.  This field is only for information purposes and does not affect the
+  compression algorithm in any manner.
+
+    deflate() returns Z_OK if some progress has been made (more input
+  processed or more output produced), Z_STREAM_END if all input has been
+  consumed and all output has been produced (only when flush is set to
+  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
+  fatal, and deflate() can be called again with more input and more output
+  space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+   prematurely (some input or output was discarded).  In the error case, msg
+   may be set but then points to a static string (which must not be
+   deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+     Initializes the internal stream state for decompression.  The fields
+   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
+   exact value depends on the compression method), inflateInit determines the
+   compression method from the zlib header and allocates all data structures
+   accordingly; otherwise the allocation will be deferred to the first call of
+   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+   use default allocation functions.
+
+     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit() does not process any header information -- that is deferred
+   until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+    inflate decompresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+  The detailed semantics are as follows.  inflate performs one or both of the
+  following actions:
+
+  - Decompress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in is updated and processing will
+    resume at this point for the next call of inflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  inflate() provides as much output as possible, until there is
+    no more input data or no more space in the output buffer (see below about
+    the flush parameter).
+
+    Before the call of inflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating the next_* and avail_* values accordingly.  The
+  application can consume the uncompressed output when it wants, for example
+  when the output buffer is full (avail_out == 0), or after each call of
+  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
+  called again after making room in the output buffer because there might be
+  more output pending.
+
+    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
+  output as possible to the output buffer.  Z_BLOCK requests that inflate()
+  stop if and when it gets to the next deflate block boundary.  When decoding
+  the zlib or gzip format, this will cause inflate() to return immediately
+  after the header and before the first block.  When doing a raw inflate,
+  inflate() will go ahead and process the first block, and will return when it
+  gets to the end of that block, or when it runs out of data.
+
+    The Z_BLOCK option assists in appending to or combining deflate streams.
+  Also to assist in this, on return inflate() will set strm->data_type to the
+  number of unused bits in the last byte taken from strm->next_in, plus 64 if
+  inflate() is currently decoding the last block in the deflate stream, plus
+  128 if inflate() returned immediately after decoding an end-of-block code or
+  decoding the complete header up to just before the first byte of the deflate
+  stream.  The end-of-block will not be indicated until all of the uncompressed
+  data from that block has been written to strm->next_out.  The number of
+  unused bits may in general be greater than seven, except when bit 7 of
+  data_type is set, in which case the number of unused bits will be less than
+  eight.  data_type is set as noted here every time inflate() returns for all
+  flush options, and so can be used to determine the amount of currently
+  consumed input in bits.
+
+    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+  end of each deflate block header is reached, before any actual data in that
+  block is decoded.  This allows the caller to determine the length of the
+  deflate block header for later use in random access within a deflate block.
+  256 is added to the value of strm->data_type when inflate() returns
+  immediately after reaching the end of the deflate block header.
+
+    inflate() should normally be called until it returns Z_STREAM_END or an
+  error.  However if all decompression is to be performed in a single step (a
+  single call of inflate), the parameter flush should be set to Z_FINISH.  In
+  this case all pending input is processed and all pending output is flushed;
+  avail_out must be large enough to hold all the uncompressed data.  (The size
+  of the uncompressed data may have been saved by the compressor for this
+  purpose.) The next operation on this stream must be inflateEnd to deallocate
+  the decompression state.  The use of Z_FINISH is never required, but can be
+  used to inform inflate that a faster approach may be used for the single
+  inflate() call.
+
+     In this implementation, inflate() always flushes as much output as
+  possible to the output buffer, and always uses the faster approach on the
+  first call.  So the only effect of the flush parameter in this implementation
+  is on the return value of inflate(), as noted below, or when it returns early
+  because Z_BLOCK or Z_TREES is used.
+
+     If a preset dictionary is needed after this call (see inflateSetDictionary
+  below), inflate sets strm->adler to the adler32 checksum of the dictionary
+  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+  strm->adler to the adler32 checksum of all output produced so far (that is,
+  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+  below.  At the end of the stream, inflate() checks that its computed adler32
+  checksum is equal to that saved by the compressor and returns Z_STREAM_END
+  only if the checksum is correct.
+
+    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+  deflate data.  The header type is detected automatically, if requested when
+  initializing with inflateInit2().  Any information contained in the gzip
+  header is not retained, so applications that need that information should
+  instead use raw inflate, see inflateInit2() below, or inflateBack() and
+  perform their own processing of the gzip header and trailer.
+
+    inflate() returns Z_OK if some progress has been made (more input processed
+  or more output produced), Z_STREAM_END if the end of the compressed data has
+  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+  corrupted (input stream not conforming to the zlib format or incorrect check
+  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
+  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
+  inflate() can be called again with more input and more output space to
+  continue decompressing.  If Z_DATA_ERROR is returned, the application may
+  then call inflateSync() to look for a good compression block if a partial
+  recovery of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+   was inconsistent.  In the error case, msg may be set but then points to a
+   static string (which must not be deallocated).
+*/
+
+
+                        /* Advanced functions */
+
+/*
+    The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+                                     int  level,
+                                     int  method,
+                                     int  windowBits,
+                                     int  memLevel,
+                                     int  strategy));
+
+     This is another version of deflateInit with more compression options.  The
+   fields next_in, zalloc, zfree and opaque must be initialized before by the
+   caller.
+
+     The method parameter is the compression method.  It must be Z_DEFLATED in
+   this version of the library.
+
+     The windowBits parameter is the base two logarithm of the window size
+   (the size of the history buffer).  It should be in the range 8..15 for this
+   version of the library.  Larger values of this parameter result in better
+   compression at the expense of memory usage.  The default value is 15 if
+   deflateInit is used instead.
+
+     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
+   determines the window size.  deflate() will then generate raw deflate data
+   with no zlib header or trailer, and will not compute an adler32 check value.
+
+     windowBits can also be greater than 15 for optional gzip encoding.  Add
+   16 to windowBits to write a simple gzip header and trailer around the
+   compressed data instead of a zlib wrapper.  The gzip header will have no
+   file name, no extra data, no comment, no modification time (set to zero), no
+   header crc, and the operating system will be set to 255 (unknown).  If a
+   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+     The memLevel parameter specifies how much memory should be allocated
+   for the internal compression state.  memLevel=1 uses minimum memory but is
+   slow and reduces compression ratio; memLevel=9 uses maximum memory for
+   optimal speed.  The default value is 8.  See zconf.h for total memory usage
+   as a function of windowBits and memLevel.
+
+     The strategy parameter is used to tune the compression algorithm.  Use the
+   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+   string match), or Z_RLE to limit match distances to one (run-length
+   encoding).  Filtered data consists mostly of small values with a somewhat
+   random distribution.  In this case, the compression algorithm is tuned to
+   compress them better.  The effect of Z_FILTERED is to force more Huffman
+   coding and less string matching; it is somewhat intermediate between
+   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
+   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
+   strategy parameter only affects the compression ratio but not the
+   correctness of the compressed output even if it is not set appropriately.
+   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+   decoder for special applications.
+
+     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
+   set to null if there is no error message.  deflateInit2 does not perform any
+   compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the compression dictionary from the given byte sequence
+   without producing any compressed output.  This function must be called
+   immediately after deflateInit, deflateInit2 or deflateReset, before any call
+   of deflate.  The compressor and decompressor must use exactly the same
+   dictionary (see inflateSetDictionary).
+
+     The dictionary should consist of strings (byte sequences) that are likely
+   to be encountered later in the data to be compressed, with the most commonly
+   used strings preferably put towards the end of the dictionary.  Using a
+   dictionary is most useful when the data to be compressed is short and can be
+   predicted with good accuracy; the data can then be compressed better than
+   with the default empty dictionary.
+
+     Depending on the size of the compression data structures selected by
+   deflateInit or deflateInit2, a part of the dictionary may in effect be
+   discarded, for example if the dictionary is larger than the window size
+   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
+   useful should be put at the end of the dictionary, not at the front.  In
+   addition, the current implementation of deflate will use at most the window
+   size minus 262 bytes of the provided dictionary.
+
+     Upon return of this function, strm->adler is set to the adler32 value
+   of the dictionary; the decompressor may later use this value to determine
+   which dictionary has been used by the compressor.  (The adler32 value
+   applies to the whole dictionary even if only a subset of the dictionary is
+   actually used by the compressor.) If a raw deflate was requested, then the
+   adler32 value is not computed and strm->adler is not set.
+
+     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent (for example if deflate has already been called for this stream
+   or if the compression method is bsort).  deflateSetDictionary does not
+   perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when several compression strategies will be
+   tried, for example when there are several ways of pre-processing the input
+   data with a filter.  The streams that will be discarded should then be freed
+   by calling deflateEnd.  Note that deflateCopy duplicates the internal
+   compression state which can be quite large, so this strategy is slow and can
+   consume lots of memory.
+
+     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to deflateEnd followed by deflateInit,
+   but does not free and reallocate all the internal compression state.  The
+   stream will keep the same compression level and any other attributes that
+   may have been set by deflateInit2.
+
+     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+                                      int level,
+                                      int strategy));
+/*
+     Dynamically update the compression level and compression strategy.  The
+   interpretation of level and strategy is as in deflateInit2.  This can be
+   used to switch between compression and straight copy of the input data, or
+   to switch to a different kind of input data requiring a different strategy.
+   If the compression level is changed, the input available so far is
+   compressed with the old level (and may be flushed); the new level will take
+   effect only at the next call of deflate().
+
+     Before the call of deflateParams, the stream state must be set as for
+   a call of deflate(), since the currently available input may have to be
+   compressed and flushed.  In particular, strm->avail_out must be non-zero.
+
+     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+   strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+                                    int good_length,
+                                    int max_lazy,
+                                    int nice_length,
+                                    int max_chain));
+/*
+     Fine tune deflate's internal compression parameters.  This should only be
+   used by someone who understands the algorithm used by zlib's deflate for
+   searching for the best matching string, and even then only by the most
+   fanatic optimizer trying to squeeze out the last compressed bit for their
+   specific input data.  Read the deflate.c source code for the meaning of the
+   max_lazy, good_length, nice_length, and max_chain parameters.
+
+     deflateTune() can be called after deflateInit() or deflateInit2(), and
+   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+                                       uLong sourceLen));
+/*
+     deflateBound() returns an upper bound on the compressed size after
+   deflation of sourceLen bytes.  It must be called after deflateInit() or
+   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
+   to allocate an output buffer for deflation in a single pass, and so would be
+   called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     deflatePrime() inserts bits in the deflate output stream.  The intent
+   is that this function is used to start off the deflate output with the bits
+   leftover from a previous deflate stream when appending to it.  As such, this
+   function can only be used for raw deflate, and must be used before the first
+   deflate() call after a deflateInit2() or deflateReset().  bits must be less
+   than or equal to 16, and that many of the least significant bits of value
+   will be inserted in the output.
+
+     deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     deflateSetHeader() provides gzip header information for when a gzip
+   stream is requested by deflateInit2().  deflateSetHeader() may be called
+   after deflateInit2() or deflateReset() and before the first call of
+   deflate().  The text, time, os, extra field, name, and comment information
+   in the provided gz_header structure are written to the gzip header (xflag is
+   ignored -- the extra flags are set according to the compression level).  The
+   caller must assure that, if not Z_NULL, name and comment are terminated with
+   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+   available there.  If hcrc is true, a gzip header crc is included.  Note that
+   the current versions of the command-line version of gzip (up through version
+   1.3.x) do not support header crc's, and will report that it is a "multi-part
+   gzip file" and give up.
+
+     If deflateSetHeader is not used, the default gzip header has text false,
+   the time set to zero, and os set to 255, with no extra, name, or comment
+   fields.  The gzip header is returned to the default state by deflateReset().
+
+     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+                                     int  windowBits));
+
+     This is another version of inflateInit with an extra parameter.  The
+   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+   before by the caller.
+
+     The windowBits parameter is the base two logarithm of the maximum window
+   size (the size of the history buffer).  It should be in the range 8..15 for
+   this version of the library.  The default value is 15 if inflateInit is used
+   instead.  windowBits must be greater than or equal to the windowBits value
+   provided to deflateInit2() while compressing, or it must be equal to 15 if
+   deflateInit2() was not used.  If a compressed stream with a larger window
+   size is given as input, inflate() will return with the error code
+   Z_DATA_ERROR instead of trying to allocate a larger window.
+
+     windowBits can also be zero to request that inflate use the window size in
+   the zlib header of the compressed stream.
+
+     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
+   determines the window size.  inflate() will then process raw deflate data,
+   not looking for a zlib or gzip header, not generating a check value, and not
+   looking for any check values for comparison at the end of the stream.  This
+   is for use with other formats that use the deflate compressed data format
+   such as zip.  Those formats provide their own check values.  If a custom
+   format is developed using the raw deflate format for compressed data, it is
+   recommended that a check value such as an adler32 or a crc32 be applied to
+   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
+   most applications, the zlib format should be used as is.  Note that comments
+   above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+     windowBits can also be greater than 15 for optional gzip decoding.  Add
+   32 to windowBits to enable zlib and gzip decoding with automatic header
+   detection, or add 16 to decode only the gzip format (the zlib format will
+   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
+   crc32 instead of an adler32.
+
+     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit2 does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit2() does not process any header information -- that is
+   deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the decompression dictionary from the given uncompressed byte
+   sequence.  This function must be called immediately after a call of inflate,
+   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
+   can be determined from the adler32 value returned by that call of inflate.
+   The compressor and decompressor must use exactly the same dictionary (see
+   deflateSetDictionary).  For raw inflate, this function can be called
+   immediately after inflateInit2() or inflateReset() and before any call of
+   inflate() to set the dictionary.  The application must insure that the
+   dictionary that was used for compression is provided.
+
+     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+   expected one (incorrect adler32 value).  inflateSetDictionary does not
+   perform any decompression: this will be done by subsequent calls of
+   inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+     Skips invalid compressed data until a full flush point (see above the
+   description of deflate with Z_FULL_FLUSH) can be found, or until all
+   available input is skipped.  No output is provided.
+
+     inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+   if no more input was provided, Z_DATA_ERROR if no flush point has been
+   found, or Z_STREAM_ERROR if the stream structure was inconsistent.  In the
+   success case, the application may save the current current value of total_in
+   which indicates where valid compressed data was found.  In the error case,
+   the application may repeatedly call inflateSync, providing more input each
+   time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when randomly accessing a large stream.  The
+   first pass through the stream can periodically record the inflate state,
+   allowing restarting inflate at those points when randomly accessing the
+   stream.
+
+     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to inflateEnd followed by inflateInit,
+   but does not free and reallocate all the internal decompression state.  The
+   stream will keep attributes that may have been set by inflateInit2.
+
+     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+                                      int windowBits));
+/*
+     This function is the same as inflateReset, but it also permits changing
+   the wrap and window size requests.  The windowBits parameter is interpreted
+   the same as it is for inflateInit2.
+
+     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+   the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     This function inserts bits in the inflate input stream.  The intent is
+   that this function is used to start inflating at a bit position in the
+   middle of a byte.  The provided bits will be used before any bytes are used
+   from next_in.  This function should only be used with raw inflate, and
+   should be used before the first inflate() call after inflateInit2() or
+   inflateReset().  bits must be less than or equal to 16, and that many of the
+   least significant bits of value will be inserted in the input.
+
+     If bits is negative, then the input stream bit buffer is emptied.  Then
+   inflatePrime() can be called again to put bits in the buffer.  This is used
+   to clear out bits leftover after feeding inflate a block description prior
+   to feeding inflate codes.
+
+     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+     This function returns two values, one in the lower 16 bits of the return
+   value, and the other in the remaining upper bits, obtained by shifting the
+   return value down 16 bits.  If the upper value is -1 and the lower value is
+   zero, then inflate() is currently decoding information outside of a block.
+   If the upper value is -1 and the lower value is non-zero, then inflate is in
+   the middle of a stored block, with the lower value equaling the number of
+   bytes from the input remaining to copy.  If the upper value is not -1, then
+   it is the number of bits back from the current bit position in the input of
+   the code (literal or length/distance pair) currently being processed.  In
+   that case the lower value is the number of bytes already emitted for that
+   code.
+
+     A code is being processed if inflate is waiting for more input to complete
+   decoding of the code, or if it has completed decoding but is waiting for
+   more output space to write the literal or match data.
+
+     inflateMark() is used to mark locations in the input data for random
+   access, which may be at bit positions, and to note those cases where the
+   output of a code may span boundaries of random access blocks.  The current
+   location in the input stream can be determined from avail_in and data_type
+   as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+     inflateMark returns the value noted above or -1 << 16 if the provided
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     inflateGetHeader() requests that gzip header information be stored in the
+   provided gz_header structure.  inflateGetHeader() may be called after
+   inflateInit2() or inflateReset(), and before the first call of inflate().
+   As inflate() processes the gzip stream, head->done is zero until the header
+   is completed, at which time head->done is set to one.  If a zlib stream is
+   being decoded, then head->done is set to -1 to indicate that there will be
+   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
+   used to force inflate() to return immediately after header processing is
+   complete and before any actual data is decompressed.
+
+     The text, time, xflags, and os fields are filled in with the gzip header
+   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
+   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+   contains the maximum number of bytes to write to extra.  Once done is true,
+   extra_len contains the actual extra field length, and extra contains the
+   extra field, or that field truncated if extra_max is less than extra_len.
+   If name is not Z_NULL, then up to name_max characters are written there,
+   terminated with a zero unless the length is greater than name_max.  If
+   comment is not Z_NULL, then up to comm_max characters are written there,
+   terminated with a zero unless the length is greater than comm_max.  When any
+   of extra, name, or comment are not Z_NULL and the respective field is not
+   present in the header, then that field is set to Z_NULL to signal its
+   absence.  This allows the use of deflateSetHeader() with the returned
+   structure to duplicate the header.  However if those fields are set to
+   allocated memory, then the application will need to save those pointers
+   elsewhere so that they can be eventually freed.
+
+     If inflateGetHeader is not used, then the header information is simply
+   discarded.  The header is always checked for validity, including the header
+   CRC if present.  inflateReset() will reset the process to discard the header
+   information.  The application would need to call inflateGetHeader() again to
+   retrieve the header from the next gzip stream.
+
+     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+                                        unsigned char FAR *window));
+
+     Initialize the internal stream state for decompression using inflateBack()
+   calls.  The fields zalloc, zfree and opaque in strm must be initialized
+   before the call.  If zalloc and zfree are Z_NULL, then the default library-
+   derived memory allocation routines are used.  windowBits is the base two
+   logarithm of the window size, in the range 8..15.  window is a caller
+   supplied buffer of that size.  Except for special applications where it is
+   assured that deflate was used with small window sizes, windowBits must be 15
+   and a 32K byte window must be supplied to be able to decompress general
+   deflate streams.
+
+     See inflateBack() for the usage of these routines.
+
+     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+   the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+   allocated, or Z_VERSION_ERROR if the version of the library does not match
+   the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+                                    in_func in, void FAR *in_desc,
+                                    out_func out, void FAR *out_desc));
+/*
+     inflateBack() does a raw inflate with a single call using a call-back
+   interface for input and output.  This is more efficient than inflate() for
+   file i/o applications in that it avoids copying between the output and the
+   sliding window by simply making the window itself the output buffer.  This
+   function trusts the application to not change the output buffer passed by
+   the output function, at least until inflateBack() returns.
+
+     inflateBackInit() must be called first to allocate the internal state
+   and to initialize the state with the user-provided window buffer.
+   inflateBack() may then be used multiple times to inflate a complete, raw
+   deflate stream with each call.  inflateBackEnd() is then called to free the
+   allocated state.
+
+     A raw deflate stream is one with no zlib or gzip header or trailer.
+   This routine would normally be used in a utility that reads zip or gzip
+   files and writes out uncompressed files.  The utility would decode the
+   header and process the trailer on its own, hence this routine expects only
+   the raw deflate stream to decompress.  This is different from the normal
+   behavior of inflate(), which expects either a zlib or gzip header and
+   trailer around the deflate stream.
+
+     inflateBack() uses two subroutines supplied by the caller that are then
+   called by inflateBack() for input and output.  inflateBack() calls those
+   routines until it reads a complete deflate stream and writes out all of the
+   uncompressed data, or until it encounters an error.  The function's
+   parameters and return types are defined above in the in_func and out_func
+   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
+   number of bytes of provided input, and a pointer to that input in buf.  If
+   there is no input available, in() must return zero--buf is ignored in that
+   case--and inflateBack() will return a buffer error.  inflateBack() will call
+   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
+   should return zero on success, or non-zero on failure.  If out() returns
+   non-zero, inflateBack() will return with an error.  Neither in() nor out()
+   are permitted to change the contents of the window provided to
+   inflateBackInit(), which is also the buffer that out() uses to write from.
+   The length written by out() will be at most the window size.  Any non-zero
+   amount of input may be provided by in().
+
+     For convenience, inflateBack() can be provided input on the first call by
+   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
+   in() will be called.  Therefore strm->next_in must be initialized before
+   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
+   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
+   must also be initialized, and then if strm->avail_in is not zero, input will
+   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
+
+     The in_desc and out_desc parameters of inflateBack() is passed as the
+   first parameter of in() and out() respectively when they are called.  These
+   descriptors can be optionally used to pass any information that the caller-
+   supplied in() and out() functions need to do their job.
+
+     On return, inflateBack() will set strm->next_in and strm->avail_in to
+   pass back any unused input that was provided by the last in() call.  The
+   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+   in the deflate stream (in which case strm->msg is set to indicate the nature
+   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+   In the case of Z_BUF_ERROR, an input or output error can be distinguished
+   using strm->next_in which will be Z_NULL only if in() returned an error.  If
+   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+   non-zero.  (in() will always be called before out(), so strm->next_in is
+   assured to be defined if out() returns non-zero.) Note that inflateBack()
+   cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+     All memory allocated by inflateBackInit() is freed.
+
+     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+   state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+     1.0: size of uInt
+     3.2: size of uLong
+     5.4: size of voidpf (pointer)
+     7.6: size of z_off_t
+
+    Compiler, assembler, and debug options:
+     8: DEBUG
+     9: ASMV or ASMINF -- use ASM code
+     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+     11: 0 (reserved)
+
+    One-time table building (smaller code, but not thread-safe if true):
+     12: BUILDFIXED -- build static block decoding tables when needed
+     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+     14,15: 0 (reserved)
+
+    Library content (indicates missing functionality):
+     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+                          deflate code when not needed)
+     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+                    and decode gzip streams (to avoid linking crc code)
+     18-19: 0 (reserved)
+
+    Operation variations (changes in library functionality):
+     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+     21: FASTEST -- deflate algorithm with only one, lowest compression level
+     22,23: 0 (reserved)
+
+    The sprintf variant used by gzprintf (zero is best):
+     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+    Remainder:
+     27-31: 0 (reserved)
+ */
+
+
+                        /* utility functions */
+
+/*
+     The following utility functions are implemented on top of the basic
+   stream-oriented functions.  To simplify the interface, some default options
+   are assumed (compression level and memory usage, standard memory allocation
+   functions).  The source code of these utility functions can be modified if
+   you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
+                                 const Bytef *source, uLong sourceLen));
+/*
+     Compresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
+                                  const Bytef *source, uLong sourceLen,
+                                  int level));
+/*
+     Compresses the source buffer into the destination buffer.  The level
+   parameter has the same meaning as in deflateInit.  sourceLen is the byte
+   length of the source buffer.  Upon entry, destLen is the total size of the
+   destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+   Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+     compressBound() returns an upper bound on the compressed size after
+   compress() or compress2() on sourceLen bytes.  It would be used before a
+   compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
+                                   const Bytef *source, uLong sourceLen));
+/*
+     Decompresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be large enough to hold the entire
+   uncompressed data.  (The size of the uncompressed data must have been saved
+   previously by the compressor and transmitted to the decompressor by some
+   mechanism outside the scope of this compression library.) Upon exit, destLen
+   is the actual size of the uncompressed buffer.
+
+     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+                        /* gzip file access functions */
+
+/*
+     This library supports reading and writing files in gzip (.gz) format with
+   an interface similar to that of stdio, using the functions that start with
+   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
+   wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef voidp gzFile;       /* opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
+   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+   for fixed code compression as in "wb9F".  (See the description of
+   deflateInit2 for more information about the strategy parameter.) Also "a"
+   can be used instead of "w" to request that the gzip stream that will be
+   written be appended to the file.  "+" will result in an error, since reading
+   and writing to the same gzip file is not supported.
+
+     gzopen can be used to read a file which is not in gzip format; in this
+   case gzread will directly read from the file without decompression.
+
+     gzopen returns NULL if the file could not be opened, if there was
+   insufficient memory to allocate the gzFile state, or if an invalid mode was
+   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+   errno can be checked to determine if the reason gzopen failed was that the
+   file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
+   are obtained from calls like open, dup, creat, pipe or fileno (if the file
+   has been previously opened with fopen).  The mode parameter is as in gzopen.
+
+     The next call of gzclose on the returned gzFile will also close the file
+   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+   mode);.  The duplicated descriptor should be saved to avoid a leak, since
+   gzdopen does not close fd if it fails.
+
+     gzdopen returns NULL if there was insufficient memory to allocate the
+   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
+   used until the next gz* read, write, seek, or close operation, so gzdopen
+   will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
+/*
+     Set the internal buffer size used by this library's functions.  The
+   default buffer size is 8192 bytes.  This function must be called after
+   gzopen() or gzdopen(), and before any other calls that read or write the
+   file.  The buffer memory allocation is always deferred to the first read or
+   write.  Two buffers are allocated, either both of the specified size when
+   writing, or one of the specified size and the other twice that size when
+   reading.  A larger buffer size of, for example, 64K or 128K bytes will
+   noticeably increase the speed of decompression (reading).
+
+     The new buffer size also affects the maximum length for gzprintf().
+
+     gzbuffer() returns 0 on success, or -1 on failure, such as being called
+   too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+     Dynamically update the compression level or strategy.  See the description
+   of deflateInit2 for the meaning of these parameters.
+
+     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+   opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+     Reads the given number of uncompressed bytes from the compressed file.  If
+   the input file was not in gzip format, gzread copies the given number of
+   bytes into the buffer.
+
+     After reaching the end of a gzip stream in the input, gzread will continue
+   to read, looking for another gzip stream, or failing that, reading the rest
+   of the input file directly without decompression.  The entire input file
+   will be read if gzread is called until it returns less than the requested
+   len.
+
+     gzread returns the number of uncompressed bytes actually read, less than
+   len for end of file, or -1 for error.
+*/
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+                                voidpc buf, unsigned len));
+/*
+     Writes the given number of uncompressed bytes into the compressed file.
+   gzwrite returns the number of uncompressed bytes written or 0 in case of
+   error.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+     Converts, formats, and writes the arguments to the compressed file under
+   control of the format string, as in fprintf.  gzprintf returns the number of
+   uncompressed bytes actually written, or 0 in case of error.  The number of
+   uncompressed bytes written is limited to 8191, or one less than the buffer
+   size given to gzbuffer().  The caller should assure that this limit is not
+   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
+   nothing written.  In this case, there may also be a buffer overflow with
+   unpredictable consequences, which is possible only if zlib was compiled with
+   the insecure functions sprintf() or vsprintf() because the secure snprintf()
+   or vsnprintf() functions were not available.  This can be determined using
+   zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+     Writes the given null-terminated string to the compressed file, excluding
+   the terminating null character.
+
+     gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+     Reads bytes from the compressed file until len-1 characters are read, or a
+   newline character is read and transferred to buf, or an end-of-file
+   condition is encountered.  If any characters are read or if len == 1, the
+   string is terminated with a null character.  If no characters are read due
+   to an end-of-file or len < 1, then the buffer is left untouched.
+
+     gzgets returns buf which is a null-terminated string, or it returns NULL
+   for end-of-file or in case of error.  If there was an error, the contents at
+   buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+     Writes c, converted to an unsigned char, into the compressed file.  gzputc
+   returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+     Reads one byte from the compressed file.  gzgetc returns this byte or -1
+   in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+     Push one character back onto the stream to be read as the first character
+   on the next read.  At least one character of push-back is allowed.
+   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
+   fail if c is -1, and may fail if a character has been pushed but not read
+   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
+   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
+   The pushed character will be discarded if the stream is repositioned with
+   gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+     Flushes all pending output into the compressed file.  The parameter flush
+   is as in the deflate() function.  The return value is the zlib error number
+   (see function gzerror below).  gzflush is only permitted when writing.
+
+     If the flush parameter is Z_FINISH, the remaining data is written and the
+   gzip stream is completed in the output.  If gzwrite() is called again, a new
+   gzip stream will be started in the output.  gzread() is able to read such
+   concatented gzip streams.
+
+     gzflush should be called only when strictly necessary because it will
+   degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+                                   z_off_t offset, int whence));
+
+     Sets the starting position for the next gzread or gzwrite on the given
+   compressed file.  The offset represents a number of bytes in the
+   uncompressed data stream.  The whence parameter is defined as in lseek(2);
+   the value SEEK_END is not supported.
+
+     If the file is opened for reading, this function is emulated but can be
+   extremely slow.  If the file is opened for writing, only forward seeks are
+   supported; gzseek then compresses a sequence of zeroes up to the new
+   starting position.
+
+     gzseek returns the resulting offset location as measured in bytes from
+   the beginning of the uncompressed stream, or -1 in case of error, in
+   particular if the file is opened for writing and the new starting position
+   would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
+/*
+     Rewinds the given file. This function is supported only for reading.
+
+     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
+
+     Returns the starting position for the next gzread or gzwrite on the given
+   compressed file.  This position represents a number of bytes in the
+   uncompressed data stream, and is zero when starting, even if appending or
+   reading a gzip stream from the middle of a file using gzdopen().
+
+     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
+
+     Returns the current offset in the file being read or written.  This offset
+   includes the count of bytes that precede the gzip stream, for example when
+   appending or when using gzdopen() for reading.  When reading, the offset
+   does not include as yet unused buffered input.  This information can be used
+   for a progress indicator.  On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+     Returns true (1) if the end-of-file indicator has been set while reading,
+   false (0) otherwise.  Note that the end-of-file indicator is set only if the
+   read tried to go past the end of the input, but came up short.  Therefore,
+   just like feof(), gzeof() may return false even if there is no more data to
+   read, in the event that the last read request was for the exact number of
+   bytes remaining in the input file.  This will happen if the input file size
+   is an exact multiple of the buffer size.
+
+     If gzeof() returns true, then the read functions will return no more data,
+   unless the end-of-file indicator is reset by gzclearerr() and the input file
+   has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+     Returns true (1) if file is being copied directly while reading, or false
+   (0) if file is a gzip stream being decompressed.  This state can change from
+   false to true while reading the input file if the end of a gzip stream is
+   reached, but is followed by data that is not another gzip stream.
+
+     If the input file is empty, gzdirect() will return true, since the input
+   does not contain a gzip stream.
+
+     If gzdirect() is used immediately after gzopen() or gzdopen() it will
+   cause buffers to be allocated to allow reading the file to determine if it
+   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
+   gzdirect().
+*/
+
+ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
+/*
+     Flushes all pending output if necessary, closes the compressed file and
+   deallocates the (de)compression state.  Note that once file is closed, you
+   cannot call gzerror with file, since its structures have been deallocated.
+   gzclose must not be called more than once on the same file, just as free
+   must not be called more than once on the same allocation.
+
+     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+   file operation error, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+     Same as gzclose(), but gzclose_r() is only for use when reading, and
+   gzclose_w() is only for use when writing or appending.  The advantage to
+   using these instead of gzclose() is that they avoid linking in zlib
+   compression or decompression code that is not used when only reading or only
+   writing respectively.  If gzclose() is used, then both compression and
+   decompression code will be included the application when linking to a static
+   zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+     Returns the error message for the last error which occurred on the given
+   compressed file.  errnum is set to zlib error number.  If an error occurred
+   in the file system and not in the compression library, errnum is set to
+   Z_ERRNO and the application may consult errno to get the exact error code.
+
+     The application must not modify the returned string.  Future calls to
+   this function may invalidate the previously returned string.  If file is
+   closed, then the string previously returned by gzerror will no longer be
+   available.
+
+     gzerror() should be used to distinguish errors from end-of-file for those
+   functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+     Clears the error and end-of-file flags for file.  This is analogous to the
+   clearerr() function in stdio.  This is useful for continuing to read a gzip
+   file that is being written concurrently.
+*/
+
+
+                        /* checksum functions */
+
+/*
+     These functions are not related to compression but are exported
+   anyway because they might be useful in applications using the compression
+   library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+   return the updated checksum.  If buf is Z_NULL, this function returns the
+   required initial value for the checksum.
+
+     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+   much faster.
+
+   Usage example:
+
+     uLong adler = adler32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       adler = adler32(adler, buffer, length);
+     }
+     if (adler != original_adler) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+                                          z_off_t len2));
+
+     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
+   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
+   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
+/*
+     Update a running CRC-32 with the bytes buf[0..len-1] and return the
+   updated CRC-32.  If buf is Z_NULL, this function returns the required
+   initial value for the for the crc.  Pre- and post-conditioning (one's
+   complement) is performed within this function so it shouldn't be done by the
+   application.
+
+   Usage example:
+
+     uLong crc = crc32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       crc = crc32(crc, buffer, length);
+     }
+     if (crc != original_crc) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+     Combine two CRC-32 check values into one.  For two sequences of bytes,
+   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
+   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+   len2.
+*/
+
+
+                        /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
+                                      int windowBits, int memLevel,
+                                      int strategy, const char *version,
+                                      int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
+                                      const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+                                         unsigned char FAR *window,
+                                         const char *version,
+                                         int stream_size));
+#define deflateInit(strm, level) \
+        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+        inflateBackInit_((strm), (windowBits), (window), \
+                                            ZLIB_VERSION, sizeof(z_stream))
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+#  define gzopen gzopen64
+#  define gzseek gzseek64
+#  define gztell gztell64
+#  define gzoffset gzoffset64
+#  define adler32_combine adler32_combine64
+#  define crc32_combine crc32_combine64
+#  ifdef _LARGEFILE64_SOURCE
+     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#  endif
+#else
+   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+/* hack for buggy compilers */
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+    struct internal_state {int dummy;};
+#endif
+
+/* undocumented functions */
+ZEXTERN const char   * ZEXPORT zError           OF((int));
+ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
+ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */

Copied: branches/branch-3.0/include/fltk3zlib/zutil.h (from rev 8987, branches/branch-3.0/zlib/zutil.h)
===================================================================
--- branches/branch-3.0/include/fltk3zlib/zutil.h	                        (rev 0)
+++ branches/branch-3.0/include/fltk3zlib/zutil.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,274 @@
+/* zutil.h -- internal interface and configuration of the compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+   part of the implementation of the compression library and is
+   subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZUTIL_H
+#define ZUTIL_H
+
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#  define ZLIB_INTERNAL /*__attribute__((visibility ("hidden")))*/
+#else
+#  define ZLIB_INTERNAL
+#endif
+
+#include "zlib.h"
+
+#ifdef STDC
+#  if !(defined(_WIN32_WCE) && defined(_MSC_VER))
+#    include <stddef.h>
+#  endif
+#  include <string.h>
+#  include <stdlib.h>
+#endif
+
+#ifndef local
+#  define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+typedef unsigned char  uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long  ulg;
+
+extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+/* (size given to avoid silly warnings with Visual C++) */
+
+#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
+
+#define ERR_RETURN(strm,err) \
+  return (strm->msg = (char*)ERR_MSG(err), (err))
+/* To be used only when the state is known to be valid */
+
+        /* common constants */
+
+#ifndef DEF_WBITS
+#  define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#if MAX_MEM_LEVEL >= 8
+#  define DEF_MEM_LEVEL 8
+#else
+#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
+#endif
+/* default memLevel */
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES    2
+/* The three kinds of block type */
+
+#define MIN_MATCH  3
+#define MAX_MATCH  258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+        /* target dependencies */
+
+#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
+#  define OS_CODE  0x00
+#  if defined(__TURBOC__) || defined(__BORLANDC__)
+#    if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+       /* Allow compilation with ANSI keywords only enabled */
+       void _Cdecl farfree( void *block );
+       void *_Cdecl farmalloc( unsigned long nbytes );
+#    else
+#      include <alloc.h>
+#    endif
+#  else /* MSC or DJGPP */
+#    include <malloc.h>
+#  endif
+#endif
+
+#ifdef AMIGA
+#  define OS_CODE  0x01
+#endif
+
+#if defined(VAXC) || defined(VMS)
+#  define OS_CODE  0x02
+#  define F_OPEN(name, mode) \
+     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
+#endif
+
+#if defined(ATARI) || defined(atarist)
+#  define OS_CODE  0x05
+#endif
+
+#ifdef OS2
+#  define OS_CODE  0x06
+#  ifdef M_I86
+#    include <malloc.h>
+#  endif
+#endif
+
+#if defined(MACOS) || defined(TARGET_OS_MAC)
+#  define OS_CODE  0x07
+#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+#    include <unix.h> /* for fdopen */
+#  else
+#    ifndef fdopen
+#      define fdopen(fd,mode) NULL /* No fdopen() */
+#    endif
+#  endif
+#endif
+
+#ifdef TOPS20
+#  define OS_CODE  0x0a
+#endif
+
+#ifdef WIN32
+#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
+#    define OS_CODE  0x0b
+#  endif
+#endif
+
+#ifdef __50SERIES /* Prime/PRIMOS */
+#  define OS_CODE  0x0f
+#endif
+
+#if defined(_BEOS_) || defined(RISCOS)
+#  define fdopen(fd,mode) NULL /* No fdopen() */
+#endif
+
+#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
+#  if defined(_WIN32_WCE)
+#    define fdopen(fd,mode) NULL /* No fdopen() */
+#    ifndef _PTRDIFF_T_DEFINED
+       typedef int ptrdiff_t;
+#      define _PTRDIFF_T_DEFINED
+#    endif
+#  else
+#    define fdopen(fd,type)  _fdopen(fd,type)
+#  endif
+#endif
+
+#if defined(__BORLANDC__)
+  #pragma warn -8004
+  #pragma warn -8008
+  #pragma warn -8066
+#endif
+
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#endif
+
+        /* common defaults */
+
+#ifndef OS_CODE
+#  define OS_CODE  0x03  /* assume Unix */
+#endif
+
+#ifndef F_OPEN
+#  define F_OPEN(name, mode) fopen((name), (mode))
+#endif
+
+         /* functions */
+
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+#  ifndef HAVE_VSNPRINTF
+#    define HAVE_VSNPRINTF
+#  endif
+#endif
+#if defined(__CYGWIN__)
+#  ifndef HAVE_VSNPRINTF
+#    define HAVE_VSNPRINTF
+#  endif
+#endif
+#ifndef HAVE_VSNPRINTF
+#  ifdef MSDOS
+     /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+        but for now we just assume it doesn't. */
+#    define NO_vsnprintf
+#  endif
+#  ifdef __TURBOC__
+#    define NO_vsnprintf
+#  endif
+#  ifdef WIN32
+     /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+#    if !defined(vsnprintf) && !defined(NO_vsnprintf)
+#      if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
+#         define vsnprintf _vsnprintf
+#      endif
+#    endif
+#  endif
+#  ifdef __SASC
+#    define NO_vsnprintf
+#  endif
+#endif
+#ifdef VMS
+#  define NO_vsnprintf
+#endif
+
+#if defined(pyr)
+#  define NO_MEMCPY
+#endif
+#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
+ /* Use our own functions for small and medium model with MSC <= 5.0.
+  * You may have to use the same strategy for Borland C (untested).
+  * The __SC__ check is for Symantec.
+  */
+#  define NO_MEMCPY
+#endif
+#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
+#  define HAVE_MEMCPY
+#endif
+#ifdef HAVE_MEMCPY
+#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
+#    define zmemcpy _fmemcpy
+#    define zmemcmp _fmemcmp
+#    define zmemzero(dest, len) _fmemset(dest, 0, len)
+#  else
+#    define zmemcpy memcpy
+#    define zmemcmp memcmp
+#    define zmemzero(dest, len) memset(dest, 0, len)
+#  endif
+#else
+   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
+#endif
+
+/* Diagnostic functions */
+#ifdef DEBUG
+#  include <stdio.h>
+   extern int ZLIB_INTERNAL z_verbose;
+   extern void ZLIB_INTERNAL z_error OF((char *m));
+#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
+#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
+#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
+#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
+#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
+#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
+#else
+#  define Assert(cond,msg)
+#  define Trace(x)
+#  define Tracev(x)
+#  define Tracevv(x)
+#  define Tracec(c,x)
+#  define Tracecv(c,x)
+#endif
+
+
+voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+                        unsigned size));
+void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
+
+#define ZALLOC(strm, items, size) \
+           (*((strm)->zalloc))((strm)->opaque, (items), (size))
+#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
+#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+
+#endif /* ZUTIL_H */

Modified: branches/branch-3.0/makeinclude.in
===================================================================
--- branches/branch-3.0/makeinclude.in	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/makeinclude.in	2011-08-22 15:21:44 UTC (rev 8991)
@@ -63,24 +63,24 @@
 CXXFLAGS	= $(OPTIM) @LARGEFILE@ @PTHREAD_FLAGS@ @CPPFLAGS@ @CXXFLAGS@ $(FLTKFLAGS)
 
 # program to make the archive:
-FLTK_LIBNAME		= @FLTK_LIBNAME@
-FLTK_DSONAME		= @FLTK_DSONAME@
-FLTK_LIBBASENAME		= @FLTK_LIBBASENAME@
-FLTK_GL_LIBNAME		= @FLTK_GL_LIBNAME@
-FLTK_GL_DSONAME		= @FLTK_GL_DSONAME@
-FLTK_GL_LIBBASENAME		= @FLTK_GL_LIBBASENAME@
-FLTK_IMAGES_LIBNAME		= @FLTK_IMAGES_LIBNAME@
-FLTK_IMAGES_DSONAME		= @FLTK_IMAGES_DSONAME@
-FLTK_IMAGES_LIBBASENAME		= @FLTK_IMAGES_LIBBASENAME@
-FLTK_PNG_LIBNAME		= @FLTK_PNG_LIBNAME@
-FLTK_PNG_DSONAME		= @FLTK_PNG_DSONAME@
-FLTK_PNG_LIBBASENAME		= @FLTK_PNG_LIBBASENAME@
-FLTK_JPEG_LIBNAME		= @FLTK_JPEG_LIBNAME@
-FLTK_JPEG_DSONAME		= @FLTK_JPEG_DSONAME@
-FLTK_JPEG_LIBBASENAME		= @FLTK_JPEG_LIBBASENAME@
-FLTK_ZLIB_LIBNAME		= @FLTK_ZLIB_LIBNAME@
-FLTK_ZLIB_DSONAME		= @FLTK_ZLIB_DSONAME@
-FLTK_ZLIB_LIBBASENAME		= @FLTK_ZLIB_LIBBASENAME@
+FLTK3_LIBNAME		= @FLTK3_LIBNAME@
+FLTK3_DSONAME		= @FLTK3_DSONAME@
+FLTK3_LIBBASENAME		= @FLTK3_LIBBASENAME@
+FLTK3GL_LIBNAME		= @FLTK3GL_LIBNAME@
+FLTK3GL_DSONAME		= @FLTK3GL_DSONAME@
+FLTK3GL_LIBBASENAME		= @FLTK3GL_LIBBASENAME@
+FLTK3IMAGES_LIBNAME		= @FLTK3IMAGES_LIBNAME@
+FLTK3IMAGES_DSONAME		= @FLTK3IMAGES_DSONAME@
+FLTK3IMAGES_LIBBASENAME		= @FLTK3IMAGES_LIBBASENAME@
+FLTK3PNG_LIBNAME		= @FLTK3PNG_LIBNAME@
+FLTK3PNG_DSONAME		= @FLTK3PNG_DSONAME@
+FLTK3PNG_LIBBASENAME		= @FLTK3PNG_LIBBASENAME@
+FLTK3JPEG_LIBNAME		= @FLTK3JPEG_LIBNAME@
+FLTK3JPEG_DSONAME		= @FLTK3JPEG_DSONAME@
+FLTK3JPEG_LIBBASENAME		= @FLTK3JPEG_LIBBASENAME@
+FLTK3ZLIB_LIBNAME		= @FLTK3ZLIB_LIBNAME@
+FLTK3ZLIB_DSONAME		= @FLTK3ZLIB_DSONAME@
+FLTK3ZLIB_LIBBASENAME		= @FLTK3ZLIB_LIBBASENAME@
 LIBCOMMAND	= @LIBCOMMAND@
 LIBEXT		= @LIBEXT@
 RANLIB		= @RANLIB@
@@ -93,17 +93,17 @@
 LDLIBS		= @LIBS@
 GLLIB		= @GLLIB@
 GLDLIBS		= @GLLIB@ @LIBS@
-LINK_FLTK	= @LINK_FLTK@
-LINK_FLTK_GL	= @LINK_FLTK_GL@
-LINK_FLTK_IMAGES	= @LINK_FLTK_IMAGES@
-LINK_FLTK_PNG	= @LINK_FLTK_PNG@
-LINK_FLTK_JPEG	= @LINK_FLTK_JPEG@
-LINK_FLTK_ZLIB	= @LINK_FLTK_ZLIB@
+LINK_FLTK3	= @LINK_FLTK3@
+LINK_FLTK3GL	= @LINK_FLTK3GL@
+LINK_FLTK3IMAGES	= @LINK_FLTK3IMAGES@
+LINK_FLTK3PNG	= @LINK_FLTK3PNG@
+LINK_FLTK3JPEG	= @LINK_FLTK3JPEG@
+LINK_FLTK3ZLIB	= @LINK_FLTK3ZLIB@
 LINKSHARED	= @DSOLINK@ @LINKSHARED@ $(IMAGELIBS)
 IMAGELIBS	= -L../lib @IMAGELIBS@
 
 # image libraries to build...
-IMAGEDIRS	= @JPEG@ @ZLIB@ @PNG@
+IMAGEDIRS	= 
 # The extension to use for executables...
 EXEEXT		= @EXEEXT@
 
@@ -151,15 +151,15 @@
 
 .c.o:
 	echo Compiling $<...
-	$(CC) -I.. $(ARCHFLAGS) @PNGINC@ @JPEGINC@ @ZLIBINC@ $(CFLAGS) -c $< -o $@
+	$(CC) -I../include $(ARCHFLAGS) @PNGINC@ @JPEGINC@ @ZLIBINC@ $(CFLAGS) -c $< -o $@
 
 .cxx.o:
 	echo Compiling $<...
-	$(CXX) -I.. $(ARCHFLAGS) @PNGINC@ @JPEGINC@ @ZLIBINC@ $(CXXFLAGS) -c $< -o $@
+	$(CXX) -I../include $(ARCHFLAGS) @PNGINC@ @JPEGINC@ @ZLIBINC@ $(CXXFLAGS) -c $< -o $@
 	
 .mm.o:
 	echo Compiling $<...
-	$(CXX) -I.. $(ARCHFLAGS) $(CXXFLAGS) -x objective-c++ -c $< -o $@
+	$(CXX) -I../include $(ARCHFLAGS) $(CXXFLAGS) -x objective-c++ -c $< -o $@
 
 
 .man.0 .man.1 .man.3 .man.6:

Deleted: branches/branch-3.0/src/Fl.cxx

Deleted: branches/branch-3.0/src/Fl_Adjuster.cxx

Deleted: branches/branch-3.0/src/Fl_BMP_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Bitmap.cxx

Deleted: branches/branch-3.0/src/Fl_Box.cxx

Deleted: branches/branch-3.0/src/Fl_Browser.cxx

Deleted: branches/branch-3.0/src/Fl_Browser_.cxx

Deleted: branches/branch-3.0/src/Fl_Browser_load.cxx

Deleted: branches/branch-3.0/src/Fl_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Chart.cxx

Deleted: branches/branch-3.0/src/Fl_Check_Browser.cxx

Deleted: branches/branch-3.0/src/Fl_Check_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Choice.cxx

Deleted: branches/branch-3.0/src/Fl_Clock.cxx

Deleted: branches/branch-3.0/src/Fl_Color_Chooser.cxx

Deleted: branches/branch-3.0/src/Fl_Counter.cxx

Deleted: branches/branch-3.0/src/Fl_Device.cxx

Deleted: branches/branch-3.0/src/Fl_Dial.cxx

Deleted: branches/branch-3.0/src/Fl_Double_Window.cxx

Deleted: branches/branch-3.0/src/Fl_File_Browser.cxx

Deleted: branches/branch-3.0/src/Fl_File_Chooser.cxx

Deleted: branches/branch-3.0/src/Fl_File_Chooser.fl

Deleted: branches/branch-3.0/src/Fl_File_Chooser2.cxx

Deleted: branches/branch-3.0/src/Fl_File_Icon.cxx

Deleted: branches/branch-3.0/src/Fl_File_Icon2.cxx

Deleted: branches/branch-3.0/src/Fl_File_Input.cxx

Deleted: branches/branch-3.0/src/Fl_Font.H

Deleted: branches/branch-3.0/src/Fl_GDI_Printer.cxx

Deleted: branches/branch-3.0/src/Fl_GIF_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Gl_Choice.H

Deleted: branches/branch-3.0/src/Fl_Gl_Choice.cxx

Deleted: branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx

Deleted: branches/branch-3.0/src/Fl_Gl_Overlay.cxx

Deleted: branches/branch-3.0/src/Fl_Gl_Window.cxx

Deleted: branches/branch-3.0/src/Fl_Group.cxx

Deleted: branches/branch-3.0/src/Fl_Help_Dialog.cxx

Deleted: branches/branch-3.0/src/Fl_Help_Dialog.fl

Deleted: branches/branch-3.0/src/Fl_Help_Dialog_Dox.cxx

Deleted: branches/branch-3.0/src/Fl_Help_View.cxx

Deleted: branches/branch-3.0/src/Fl_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Input.cxx

Deleted: branches/branch-3.0/src/Fl_Input_.cxx

Deleted: branches/branch-3.0/src/Fl_JPEG_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Light_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Menu.cxx

Deleted: branches/branch-3.0/src/Fl_Menu_.cxx

Deleted: branches/branch-3.0/src/Fl_Menu_Bar.cxx

Deleted: branches/branch-3.0/src/Fl_Menu_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Menu_Window.cxx

Deleted: branches/branch-3.0/src/Fl_Menu_add.cxx

Deleted: branches/branch-3.0/src/Fl_Menu_global.cxx

Deleted: branches/branch-3.0/src/Fl_Multi_Label.cxx

Deleted: branches/branch-3.0/src/Fl_Native_File_Chooser.cxx

Deleted: branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx

Deleted: branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.mm

Deleted: branches/branch-3.0/src/Fl_Native_File_Chooser_WIN32.cxx

Deleted: branches/branch-3.0/src/Fl_Native_File_Chooser_common.cxx

Deleted: branches/branch-3.0/src/Fl_Overlay_Window.cxx

Deleted: branches/branch-3.0/src/Fl_PNG_Image.cxx

Deleted: branches/branch-3.0/src/Fl_PNM_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Pack.cxx

Deleted: branches/branch-3.0/src/Fl_Paged_Device.cxx

Deleted: branches/branch-3.0/src/Fl_Pixmap.cxx

Deleted: branches/branch-3.0/src/Fl_Positioner.cxx

Deleted: branches/branch-3.0/src/Fl_PostScript.cxx

Deleted: branches/branch-3.0/src/Fl_Preferences.cxx

Deleted: branches/branch-3.0/src/Fl_Printer.cxx

Deleted: branches/branch-3.0/src/Fl_Progress.cxx

Deleted: branches/branch-3.0/src/Fl_Quartz_Printer.mm

Deleted: branches/branch-3.0/src/Fl_Repeat_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Return_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Roller.cxx

Deleted: branches/branch-3.0/src/Fl_Round_Button.cxx

Deleted: branches/branch-3.0/src/Fl_Scroll.cxx

Deleted: branches/branch-3.0/src/Fl_Scrollbar.cxx

Deleted: branches/branch-3.0/src/Fl_Shared_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Single_Window.cxx

Deleted: branches/branch-3.0/src/Fl_Slider.cxx

Deleted: branches/branch-3.0/src/Fl_Sys_Menu_Bar.cxx

Deleted: branches/branch-3.0/src/Fl_Table.cxx

Deleted: branches/branch-3.0/src/Fl_Table_Row.cxx

Deleted: branches/branch-3.0/src/Fl_Tabs.cxx

Deleted: branches/branch-3.0/src/Fl_Text_Buffer.cxx

Deleted: branches/branch-3.0/src/Fl_Text_Display.cxx

Deleted: branches/branch-3.0/src/Fl_Text_Editor.cxx

Deleted: branches/branch-3.0/src/Fl_Tile.cxx

Deleted: branches/branch-3.0/src/Fl_Tiled_Image.cxx

Deleted: branches/branch-3.0/src/Fl_Tooltip.cxx

Deleted: branches/branch-3.0/src/Fl_Tree.cxx

Deleted: branches/branch-3.0/src/Fl_Tree_Item.cxx

Deleted: branches/branch-3.0/src/Fl_Tree_Item_Array.cxx

Deleted: branches/branch-3.0/src/Fl_Tree_Prefs.cxx

Deleted: branches/branch-3.0/src/Fl_Valuator.cxx

Deleted: branches/branch-3.0/src/Fl_Value_Input.cxx

Deleted: branches/branch-3.0/src/Fl_Value_Output.cxx

Deleted: branches/branch-3.0/src/Fl_Value_Slider.cxx

Deleted: branches/branch-3.0/src/Fl_Widget.cxx

Deleted: branches/branch-3.0/src/Fl_Window.cxx

Deleted: branches/branch-3.0/src/Fl_Window_fullscreen.cxx

Deleted: branches/branch-3.0/src/Fl_Window_hotspot.cxx

Deleted: branches/branch-3.0/src/Fl_Window_iconize.cxx

Deleted: branches/branch-3.0/src/Fl_Wizard.cxx

Deleted: branches/branch-3.0/src/Fl_XBM_Image.cxx

Deleted: branches/branch-3.0/src/Fl_XColor.H

Deleted: branches/branch-3.0/src/Fl_XPM_Image.cxx

Deleted: branches/branch-3.0/src/Fl_abort.cxx

Deleted: branches/branch-3.0/src/Fl_add_idle.cxx

Deleted: branches/branch-3.0/src/Fl_arg.cxx

Deleted: branches/branch-3.0/src/Fl_cocoa.mm

Deleted: branches/branch-3.0/src/Fl_compose.cxx

Deleted: branches/branch-3.0/src/Fl_display.cxx

Deleted: branches/branch-3.0/src/Fl_get_key.cxx

Deleted: branches/branch-3.0/src/Fl_get_key_mac.cxx

Deleted: branches/branch-3.0/src/Fl_get_key_win32.cxx

Deleted: branches/branch-3.0/src/Fl_get_system_colors.cxx

Deleted: branches/branch-3.0/src/Fl_grab.cxx

Deleted: branches/branch-3.0/src/Fl_lock.cxx

Deleted: branches/branch-3.0/src/Fl_mac.cxx

Deleted: branches/branch-3.0/src/Fl_own_colormap.cxx

Deleted: branches/branch-3.0/src/Fl_visual.cxx

Deleted: branches/branch-3.0/src/Fl_win32.cxx

Deleted: branches/branch-3.0/src/Fl_x.cxx

Modified: branches/branch-3.0/src/Makefile
===================================================================
--- branches/branch-3.0/src/Makefile	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/src/Makefile	2011-08-22 15:21:44 UTC (rev 8991)
@@ -25,301 +25,319 @@
 #      http://www.fltk.org/str.php
 #
 
-FLTK_CPPFILES = \
-	Fl.cxx \
-	Fl_Adjuster.cxx \
-	Fl_Bitmap.cxx \
-	Fl_Box.cxx \
-	Fl_Browser.cxx \
-	Fl_Browser_.cxx \
-	Fl_Browser_load.cxx \
-	Fl_Button.cxx \
-	Fl_Chart.cxx \
-	Fl_Check_Browser.cxx \
-	Fl_Check_Button.cxx \
-	Fl_Choice.cxx \
-	Fl_Clock.cxx \
-	Fl_Color_Chooser.cxx \
-	Fl_Counter.cxx \
-	Fl_Device.cxx \
-	Fl_Dial.cxx \
-	Fl_Double_Window.cxx \
-	Fl_File_Browser.cxx \
-	Fl_File_Chooser.cxx \
-	Fl_File_Chooser2.cxx \
-	Fl_File_Icon.cxx \
-	Fl_File_Input.cxx \
-	Fl_Group.cxx \
-	Fl_Help_View.cxx \
-	Fl_Image.cxx \
-	Fl_Input.cxx \
-	Fl_Input_.cxx \
-	Fl_Light_Button.cxx \
-	Fl_Menu.cxx \
-	Fl_Menu_.cxx \
-	Fl_Menu_Bar.cxx \
-	Fl_Menu_Button.cxx \
-	Fl_Menu_Window.cxx \
-	Fl_Menu_add.cxx \
-	Fl_Menu_global.cxx \
-	Fl_Multi_Label.cxx \
-	Fl_Native_File_Chooser.cxx \
-	Fl_Overlay_Window.cxx \
-	Fl_Pack.cxx \
-	Fl_Paged_Device.cxx \
-	Fl_Pixmap.cxx \
-	Fl_Positioner.cxx \
-	Fl_Printer.cxx \
-	Fl_Preferences.cxx \
-	Fl_Progress.cxx \
-	Fl_Repeat_Button.cxx \
-	Fl_Return_Button.cxx \
-	Fl_Roller.cxx \
-	Fl_Round_Button.cxx \
-	Fl_Scroll.cxx \
-	Fl_Scrollbar.cxx \
-	Fl_Shared_Image.cxx \
-	Fl_Single_Window.cxx \
-	Fl_Slider.cxx \
-	Style.cxx \
-	Fl_Sys_Menu_Bar.cxx \
-	Fl_Table.cxx \
-	Fl_Table_Row.cxx \
-	Fl_Tabs.cxx \
-	Fl_Text_Buffer.cxx \
-	Fl_Text_Display.cxx \
-	Fl_Text_Editor.cxx \
-	Fl_Tile.cxx \
-	Fl_Tiled_Image.cxx \
-	Fl_Tooltip.cxx \
-	Fl_Tree.cxx \
-	Fl_Tree_Item.cxx \
-	Fl_Tree_Item_Array.cxx \
-	Fl_Tree_Prefs.cxx \
-	Fl_Valuator.cxx \
-	Fl_Value_Input.cxx \
-	Fl_Value_Output.cxx \
-	Fl_Value_Slider.cxx \
-	Fl_Widget.cxx \
-	Fl_Window.cxx \
-	Fl_Window_fullscreen.cxx \
-	Fl_Window_hotspot.cxx \
-	Fl_Window_iconize.cxx \
-	Fl_Wizard.cxx \
-	Fl_XBM_Image.cxx \
-	Fl_XPM_Image.cxx \
-	Fl_abort.cxx \
-	Fl_add_idle.cxx \
-	Fl_arg.cxx \
-	Fl_compose.cxx \
-	Fl_display.cxx \
-	Fl_get_key.cxx \
-	Fl_get_system_colors.cxx \
-	Fl_grab.cxx \
-	Fl_lock.cxx \
-	Fl_own_colormap.cxx \
-	Fl_visual.cxx \
-	Fl_x.cxx \
-	filename_absolute.cxx \
-	filename_expand.cxx \
-	filename_ext.cxx \
-	filename_isdir.cxx \
-	filename_list.cxx \
-	filename_match.cxx \
-	filename_setext.cxx \
-	fl_arc.cxx \
-	fl_arci.cxx \
-	fl_ask.cxx \
-	fl_boxtype.cxx \
-	fl_call_main.cxx \
-	fl_color.cxx \
-	fl_cursor.cxx \
-	fl_curve.cxx \
-	fl_diamond_box.cxx \
-	fl_dnd.cxx \
-	fl_draw.cxx \
-	fl_draw_image.cxx \
-	fl_draw_pixmap.cxx \
-	fl_encoding_latin1.cxx \
-	fl_encoding_mac_roman.cxx \
-	fl_engraved_label.cxx \
-	fl_file_dir.cxx \
-	fl_font.cxx \
-	fl_gtk.cxx \
-	fl_labeltype.cxx \
-	fl_line_style.cxx \
-	fl_open_uri.cxx \
-	fl_oval_box.cxx \
-	fl_overlay.cxx \
-	fl_overlay_visual.cxx \
-	fl_plastic.cxx \
-	fl_read_image.cxx \
-	fl_rect.cxx \
-	fl_round_box.cxx \
-	fl_rounded_box.cxx \
-	fl_scroll_area.cxx \
-	fl_set_font.cxx \
-	fl_set_fonts.cxx \
-	fl_shadow_box.cxx \
-	fl_shortcut.cxx \
-	fl_show_colormap.cxx \
-	fl_symbols.cxx \
-	fl_utf8.cxx \
-	fl_utf.cxx \
-	fl_vertex.cxx \
-	numericsort.cxx \
-	ps_image.cxx \
-	scandir.cxx \
-	screen_xywh.cxx
+FLTK3_CPPFILES = \
+	core/Fl.cxx \
+	core/Fl_Adjuster.cxx \
+	core/Fl_Bitmap.cxx \
+	core/Fl_Box.cxx \
+	core/Fl_Browser.cxx \
+	core/Fl_Browser_.cxx \
+	core/Fl_Browser_load.cxx \
+	core/Fl_Button.cxx \
+	core/Fl_Chart.cxx \
+	core/Fl_Check_Browser.cxx \
+	core/Fl_Check_Button.cxx \
+	core/Fl_Choice.cxx \
+	core/Fl_Clock.cxx \
+	core/Fl_Color_Chooser.cxx \
+	core/Fl_Counter.cxx \
+	core/Fl_Device.cxx \
+	core/Fl_Dial.cxx \
+	core/Fl_Double_Window.cxx \
+	core/Fl_File_Browser.cxx \
+	core/Fl_File_Chooser.cxx \
+	core/Fl_File_Chooser2.cxx \
+	core/Fl_File_Icon.cxx \
+	core/Fl_File_Input.cxx \
+	core/Fl_Group.cxx \
+	core/Fl_Help_View.cxx \
+	core/Fl_Image.cxx \
+	core/Fl_Input.cxx \
+	core/Fl_Input_.cxx \
+	core/Fl_Light_Button.cxx \
+	core/Fl_Menu.cxx \
+	core/Fl_Menu_.cxx \
+	core/Fl_Menu_Bar.cxx \
+	core/Fl_Menu_Button.cxx \
+	core/Fl_Menu_Window.cxx \
+	core/Fl_Menu_add.cxx \
+	core/Fl_Menu_global.cxx \
+	core/Fl_Multi_Label.cxx \
+	core/Fl_Native_File_Chooser.cxx \
+	core/Fl_Overlay_Window.cxx \
+	core/Fl_Pack.cxx \
+	core/Fl_Paged_Device.cxx \
+	core/Fl_Pixmap.cxx \
+	core/Fl_Positioner.cxx \
+	core/Fl_Printer.cxx \
+	core/Fl_Preferences.cxx \
+	core/Fl_Progress.cxx \
+	core/Fl_Repeat_Button.cxx \
+	core/Fl_Return_Button.cxx \
+	core/Fl_Roller.cxx \
+	core/Fl_Round_Button.cxx \
+	core/Fl_Scroll.cxx \
+	core/Fl_Scrollbar.cxx \
+	core/Fl_Shared_Image.cxx \
+	core/Fl_Single_Window.cxx \
+	core/Fl_Slider.cxx \
+	core/Style.cxx \
+	core/Fl_Sys_Menu_Bar.cxx \
+	core/Fl_Table.cxx \
+	core/Fl_Table_Row.cxx \
+	core/Fl_Tabs.cxx \
+	core/Fl_Text_Buffer.cxx \
+	core/Fl_Text_Display.cxx \
+	core/Fl_Text_Editor.cxx \
+	core/Fl_Tile.cxx \
+	core/Fl_Tiled_Image.cxx \
+	core/Fl_Tooltip.cxx \
+	core/Fl_Tree.cxx \
+	core/Fl_Tree_Item.cxx \
+	core/Fl_Tree_Item_Array.cxx \
+	core/Fl_Tree_Prefs.cxx \
+	core/Fl_Valuator.cxx \
+	core/Fl_Value_Input.cxx \
+	core/Fl_Value_Output.cxx \
+	core/Fl_Value_Slider.cxx \
+	core/Fl_Widget.cxx \
+	core/Fl_Window.cxx \
+	core/Fl_Window_fullscreen.cxx \
+	core/Fl_Window_hotspot.cxx \
+	core/Fl_Window_iconize.cxx \
+	core/Fl_Wizard.cxx \
+	core/Fl_XBM_Image.cxx \
+	core/Fl_XPM_Image.cxx \
+	core/Fl_abort.cxx \
+	core/Fl_add_idle.cxx \
+	core/Fl_arg.cxx \
+	core/Fl_compose.cxx \
+	core/Fl_display.cxx \
+	core/Fl_get_key.cxx \
+	core/Fl_get_system_colors.cxx \
+	core/Fl_grab.cxx \
+	core/Fl_lock.cxx \
+	core/Fl_own_colormap.cxx \
+	core/Fl_visual.cxx \
+	core/Fl_x.cxx \
+	core/filename_absolute.cxx \
+	core/filename_expand.cxx \
+	core/filename_ext.cxx \
+	core/filename_isdir.cxx \
+	core/filename_list.cxx \
+	core/filename_match.cxx \
+	core/filename_setext.cxx \
+	core/fl_arc.cxx \
+	core/fl_arci.cxx \
+	core/fl_ask.cxx \
+	core/fl_boxtype.cxx \
+	core/fl_call_main.cxx \
+	core/fl_color.cxx \
+	core/fl_cursor.cxx \
+	core/fl_curve.cxx \
+	core/fl_diamond_box.cxx \
+	core/fl_dnd.cxx \
+	core/fl_draw.cxx \
+	core/fl_draw_image.cxx \
+	core/fl_draw_pixmap.cxx \
+	core/fl_encoding_latin1.cxx \
+	core/fl_encoding_mac_roman.cxx \
+	core/fl_engraved_label.cxx \
+	core/fl_file_dir.cxx \
+	core/fl_font.cxx \
+	core/fl_gtk.cxx \
+	core/fl_labeltype.cxx \
+	core/fl_line_style.cxx \
+	core/fl_open_uri.cxx \
+	core/fl_oval_box.cxx \
+	core/fl_overlay.cxx \
+	core/fl_overlay_visual.cxx \
+	core/fl_plastic.cxx \
+	core/fl_read_image.cxx \
+	core/fl_rect.cxx \
+	core/fl_round_box.cxx \
+	core/fl_rounded_box.cxx \
+	core/fl_scroll_area.cxx \
+	core/fl_set_font.cxx \
+	core/fl_set_fonts.cxx \
+	core/fl_shadow_box.cxx \
+	core/fl_shortcut.cxx \
+	core/fl_show_colormap.cxx \
+	core/fl_symbols.cxx \
+	core/fl_utf8.cxx \
+	core/fl_utf.cxx \
+	core/fl_vertex.cxx \
+	core/numericsort.cxx \
+	core/ps_image.cxx \
+	core/scandir.cxx \
+	core/screen_xywh.cxx
 
-FLTK_GL_CPPFILES = \
-	Fl_Gl_Choice.cxx \
-	Fl_Gl_Device_Plugin.cxx \
-	Fl_Gl_Overlay.cxx \
-	Fl_Gl_Window.cxx \
-	freeglut_geometry.cxx \
-	freeglut_stroke_mono_roman.cxx \
-	freeglut_stroke_roman.cxx \
-	freeglut_teapot.cxx \
-	gl_draw.cxx \
-	glut_compatability.cxx \
-	glut_font.cxx
+FLTK3GL_CPPFILES = \
+	core/Fl_Gl_Choice.cxx \
+	core/Fl_Gl_Device_Plugin.cxx \
+	core/Fl_Gl_Overlay.cxx \
+	core/Fl_Gl_Window.cxx \
+	core/freeglut_geometry.cxx \
+	core/freeglut_stroke_mono_roman.cxx \
+	core/freeglut_stroke_roman.cxx \
+	core/freeglut_teapot.cxx \
+	core/gl_draw.cxx \
+	core/glut_compatability.cxx \
+	core/glut_font.cxx
 
-FLTK_IMAGES_CPPFILES = \
-	Fl_BMP_Image.cxx \
-	Fl_File_Icon2.cxx \
-	Fl_GIF_Image.cxx \
-	Fl_Help_Dialog.cxx \
-	Fl_JPEG_Image.cxx \
-	Fl_PNG_Image.cxx \
-	Fl_PNM_Image.cxx \
-	fl_images_core.cxx
+FLTK3IMAGES_CPPFILES = \
+	core/Fl_BMP_Image.cxx \
+	core/Fl_File_Icon2.cxx \
+	core/Fl_GIF_Image.cxx \
+	core/Fl_Help_Dialog.cxx \
+	core/Fl_JPEG_Image.cxx \
+	core/Fl_PNG_Image.cxx \
+	core/Fl_PNM_Image.cxx \
+	core/fl_images_core.cxx
 
-FLTK_OBJCPPFILES = \
-	Fl_cocoa.mm \
-	Fl_Native_File_Chooser_MAC.mm \
-	Fl_Quartz_Printer.mm
+FLTK3_OBJCPPFILES = \
+	core/Fl_cocoa.mm \
+	core/Fl_Native_File_Chooser_MAC.mm \
+	core/Fl_Quartz_Printer.mm
 
-FLTK_CFILES = \
-	flstring.c \
-	vsnprintf.c \
-	xutf8/case.c \
-	xutf8/is_right2left.c \
-	xutf8/is_spacing.c \
-	xutf8/keysym2Ucs.c \
-	xutf8/utf8Input.c \
-	xutf8/utf8Utils.c \
-	xutf8/utf8Wrap.c
+FLTK3_CFILES = \
+	core/flstring.c \
+	core/vsnprintf.c \
+	core/xutf8/case.c \
+	core/xutf8/is_right2left.c \
+	core/xutf8/is_spacing.c \
+	core/xutf8/keysym2Ucs.c \
+	core/xutf8/utf8Input.c \
+	core/xutf8/utf8Utils.c \
+	core/xutf8/utf8Wrap.c
 
-FLTK_PNG_CFILES = \
-	../../png/png.c \
-	../../png/pngerror.c \
-	../../png/pngget.c \
-	../../png/pngmem.c \
-	../../png/pngpread.c \
-	../../png/pngread.c \
-	../../png/pngrio.c \
-	../../png/pngrtran.c \
-	../../png/pngrutil.c \
-	../../png/pngset.c \
-	../../png/pngtrans.c \
-	../../png/pngwio.c \
-	../../png/pngwrite.c \
-	../../png/pngwtran.c \
-	../../png/pngwutil.c
+FLTK3PNG_CFILES = \
+	png/png.c \
+	png/pngerror.c \
+	png/pngget.c \
+	png/pngmem.c \
+	png/pngpread.c \
+	png/pngread.c \
+	png/pngrio.c \
+	png/pngrtran.c \
+	png/pngrutil.c \
+	png/pngset.c \
+	png/pngtrans.c \
+	png/pngwio.c \
+	png/pngwrite.c \
+	png/pngwtran.c \
+	png/pngwutil.c
 
-FLTK_JPEG_CFILES = \
-	../../jpeg/jaricom.c \
-	../../jpeg/jcarith.c \
-	../../jpeg/jdarith.c \
-	../../jpeg/jcapimin.c \
-	../../jpeg/jcapistd.c \
-	../../jpeg/jccoefct.c \
-	../../jpeg/jccolor.c \
-	../../jpeg/jcdctmgr.c \
-	../../jpeg/jchuff.c \
-	../../jpeg/jcinit.c \
-	../../jpeg/jcmainct.c \
-	../../jpeg/jcmarker.c \
-	../../jpeg/jcmaster.c \
-	../../jpeg/jcomapi.c \
-	../../jpeg/jcparam.c \
-	../../jpeg/jcprepct.c \
-	../../jpeg/jcsample.c \
-	../../jpeg/jctrans.c \
-	../../jpeg/jdapimin.c \
-	../../jpeg/jdapistd.c \
-	../../jpeg/jdatadst.c \
-	../../jpeg/jdatasrc.c \
-	../../jpeg/jdcoefct.c \
-	../../jpeg/jdcolor.c \
-	../../jpeg/jddctmgr.c \
-	../../jpeg/jdhuff.c \
-	../../jpeg/jdinput.c \
-	../../jpeg/jdmainct.c \
-	../../jpeg/jdmarker.c \
-	../../jpeg/jdmaster.c \
-	../../jpeg/jdmerge.c \
-	../../jpeg/jdpostct.c \
-	../../jpeg/jdsample.c \
-	../../jpeg/jdtrans.c \
-	../../jpeg/jerror.c \
-	../../jpeg/jfdctflt.c \
-	../../jpeg/jfdctfst.c \
-	../../jpeg/jfdctint.c \
-	../../jpeg/jidctflt.c \
-	../../jpeg/jidctfst.c \
-	../../jpeg/jidctint.c \
-	../../jpeg/jmemmgr.c \
-	../../jpeg/jmemnobs.c \
-	../../jpeg/jquant1.c \
-	../../jpeg/jquant2.c \
-	../../jpeg/jutils.c
+FLTK3JPEG_CFILES = \
+	jpeg/jaricom.c \
+	jpeg/jcarith.c \
+	jpeg/jdarith.c \
+	jpeg/jcapimin.c \
+	jpeg/jcapistd.c \
+	jpeg/jccoefct.c \
+	jpeg/jccolor.c \
+	jpeg/jcdctmgr.c \
+	jpeg/jchuff.c \
+	jpeg/jcinit.c \
+	jpeg/jcmainct.c \
+	jpeg/jcmarker.c \
+	jpeg/jcmaster.c \
+	jpeg/jcomapi.c \
+	jpeg/jcparam.c \
+	jpeg/jcprepct.c \
+	jpeg/jcsample.c \
+	jpeg/jctrans.c \
+	jpeg/jdapimin.c \
+	jpeg/jdapistd.c \
+	jpeg/jdatadst.c \
+	jpeg/jdatasrc.c \
+	jpeg/jdcoefct.c \
+	jpeg/jdcolor.c \
+	jpeg/jddctmgr.c \
+	jpeg/jdhuff.c \
+	jpeg/jdinput.c \
+	jpeg/jdmainct.c \
+	jpeg/jdmarker.c \
+	jpeg/jdmaster.c \
+	jpeg/jdmerge.c \
+	jpeg/jdpostct.c \
+	jpeg/jdsample.c \
+	jpeg/jdtrans.c \
+	jpeg/jerror.c \
+	jpeg/jfdctflt.c \
+	jpeg/jfdctfst.c \
+	jpeg/jfdctint.c \
+	jpeg/jidctflt.c \
+	jpeg/jidctfst.c \
+	jpeg/jidctint.c \
+	jpeg/jmemmgr.c \
+	jpeg/jmemnobs.c \
+	jpeg/jquant1.c \
+	jpeg/jquant2.c \
+	jpeg/jutils.c
 
-FLTK_ZLIB_CFILES = \
-	../../zlib/adler32.c \
-	../../zlib/compress.c \
-	../../zlib/crc32.c \
-	../../zlib/deflate.c \
-	../../zlib/gzclose.c \
-	../../zlib/gzlib.c \
-	../../zlib/gzread.c \
-	../../zlib/gzwrite.c \
-	../../zlib/infback.c \
-	../../zlib/inffast.c \
-	../../zlib/inflate.c \
-	../../zlib/inftrees.c \
-	../../zlib/trees.c \
-	../../zlib/uncompr.c \
-	../../zlib/zutil.c
+FLTK3ZLIB_CFILES = \
+	zlib/adler32.c \
+	zlib/compress.c \
+	zlib/crc32.c \
+	zlib/deflate.c \
+	zlib/gzclose.c \
+	zlib/gzlib.c \
+	zlib/gzread.c \
+	zlib/gzwrite.c \
+	zlib/infback.c \
+	zlib/inffast.c \
+	zlib/inflate.c \
+	zlib/inftrees.c \
+	zlib/trees.c \
+	zlib/uncompr.c \
+	zlib/zutil.c
 
 ################################################################
 FLTKFLAGS = -DFL_LIBRARY
 include ../makeinclude
 
-FLTK_MMFILES = $(shell if test $(USEMMFILES) = Yes; then echo $(FLTK_OBJCPPFILES); fi)
+FLTK3_MMFILES = $(shell if test $(USEMMFILES) = Yes; then echo $(FLTK3_OBJCPPFILES); fi)
 
-FLTK_OBJECTS = $(FLTK_CPPFILES:.cxx=.o) $(FLTK_MMFILES:.mm=.o) $(FLTK_CFILES:.c=.o)
-FLTK_GL_OBJECTS = $(FLTK_GL_CPPFILES:.cxx=.o)
-FLTK_IMAGES_OBJECTS = $(FLTK_IMAGES_CPPFILES:.cxx=.o)
-FLTK_PNG_OBJECTS = $(FLTK_PNG_CFILES:.c=.o)
-FLTK_JPEG_OBJECTS = $(FLTK_JPEG_CFILES:.c=.o)
-FLTK_ZLIB_OBJECTS = $(FLTK_ZLIB_CFILES:.c=.o)
+FLTK3_OBJECTS = $(FLTK3_CPPFILES:.cxx=.o) $(FLTK3_MMFILES:.mm=.o) $(FLTK3_CFILES:.c=.o)
+FLTK3GL_OBJECTS = $(FLTK3GL_CPPFILES:.cxx=.o)
+FLTK3IMAGES_OBJECTS = $(FLTK3IMAGES_CPPFILES:.cxx=.o)
+FLTK3PNG_OBJECTS = $(FLTK3PNG_CFILES:.c=.o)
+FLTK3JPEG_OBJECTS = $(FLTK3JPEG_CFILES:.c=.o)
+FLTK3ZLIB_OBJECTS = $(FLTK3ZLIB_CFILES:.c=.o)
 
 all: \
-	$(FLTK_LIBNAME) $(FLTK_DSONAME) \
-	$(FLTK_GL_LIBNAME) $(FLTK_GL_DSONAME) \
-	$(FLTK_IMAGES_LIBNAME) $(FLTK_IMAGES_DSONAME) \
-	$(FLTK_PNG_LIBNAME) $(FLTK_PNG_DSONAME) \
-	$(FLTK_JPEG_LIBNAME) $(FLTK_JPEG_DSONAME) \
-	$(FLTK_ZLIB_LIBNAME) $(FLTK_ZLIB_DSONAME)
+	$(FLTK3_LIBNAME) $(FLTK3_DSONAME) \
+	$(FLTK3GL_LIBNAME) $(FLTK3GL_DSONAME) \
+	$(FLTK3IMAGES_LIBNAME) $(FLTK3IMAGES_DSONAME) \
+	$(FLTK3PNG_LIBNAME) $(FLTK3PNG_DSONAME) \
+	$(FLTK3JPEG_LIBNAME) $(FLTK3JPEG_DSONAME) \
+	$(FLTK3ZLIB_LIBNAME) $(FLTK3ZLIB_DSONAME)
 
-$(FLTK_LIBNAME): $(FLTK_OBJECTS)
+$(FLTK3_LIBNAME): $(FLTK3_OBJECTS)
 	echo $(LIBCOMMAND) $@ ...
 	$(RM) $@
-	$(LIBCOMMAND) $@ $(FLTK_OBJECTS)
+	$(LIBCOMMAND) $@ $(FLTK3_OBJECTS)
 	$(RANLIB) $@
 
+$(FLTK3JPEG_LIBNAME): $(FLTK3JPEG_OBJECTS)
+	echo $(LIBCOMMAND) $@ ...
+	$(RM) $@
+	$(LIBCOMMAND) $@ $(FLTK3JPEG_OBJECTS)
+	$(RANLIB) $@
+
+$(FLTK3PNG_LIBNAME): $(FLTK3PNG_OBJECTS)
+	echo $(LIBCOMMAND) $@ ...
+	$(RM) $@
+	$(LIBCOMMAND) $@ $(FLTK3PNG_OBJECTS)
+	$(RANLIB) $@
+
+$(FLTK3ZLIB_LIBNAME): $(FLTK3ZLIB_OBJECTS)
+	echo $(LIBCOMMAND) $@ ...
+	$(RM) $@
+	$(LIBCOMMAND) $@ $(FLTK3ZLIB_OBJECTS)
+	$(RANLIB) $@
+
 libfltk.so.1.3: $(FLTK_OBJECTS)
 	echo $(DSOCOMMAND) $@ ...
 	$(DSOCOMMAND) $@ $(FLTK_OBJECTS)
@@ -350,10 +368,10 @@
 	$(LIBCOMMAND) libfltk_s.a libfltk_s.o
 	$(CHMOD) +x libfltk_s.a
 
-$(FLTK_GL_LIBNAME): $(FLTK_GL_OBJECTS)
+$(FLTK3GL_LIBNAME): $(FLTK3GL_OBJECTS)
 	echo $(LIBCOMMAND) $@ ...
 	$(RM) $@
-	$(LIBCOMMAND) $@ $(FLTK_GL_OBJECTS)
+	$(LIBCOMMAND) $@ $(FLTK3GL_OBJECTS)
 	$(RANLIB) $@
 
 libfltk_gl.so.1.3: $(FLTK_GL_OBJECTS) libfltk.so.1.3
@@ -386,10 +404,10 @@
 	$(LIBCOMMAND) libfltk_gl_s.a libfltk_gl_s.o
 	$(CHMOD) +x libfltk_gl_s.a
 
-$(FLTK_IMAGES_LIBNAME): $(FLTK_IMAGES_OBJECTS)
+$(FLTK3IMAGES_LIBNAME): $(FLTK3IMAGES_OBJECTS)
 	echo $(LIBCOMMAND) $@ ...
 	$(RM) $@
-	$(LIBCOMMAND) $@ $(FLTK_IMAGES_OBJECTS)
+	$(LIBCOMMAND) $@ $(FLTK3IMAGES_OBJECTS)
 	$(RANLIB) $@
 
 libfltk_images.so.1.3: $(FLTK_IMAGES_OBJECTS) libfltk.so.1.3
@@ -505,7 +523,7 @@
 		libfltk.sl libfltk_gl.sl libfltk_images.sl \
 		libfltk.dylib \
 		libfltk_gl.dylib libfltk_images.dylib \
-		cmap core
+		cmap
 
 depend:	$(FLTK_CPPFILES) $(FLTK_MMFILES) $(FLTK_GL_CPPFILES) $(FLTK_IMAGES_CPPFILES) $(FLTK_CFILES)
 	makedepend -Y -I.. -f makedepend $(FLTK_CPPFILES) $(FLTK_MMFILES) \

Deleted: branches/branch-3.0/src/Style.cxx

Deleted: branches/branch-3.0/src/aimm.h

Deleted: branches/branch-3.0/src/allfiles.xbm

Deleted: branches/branch-3.0/src/cgdebug.h

Deleted: branches/branch-3.0/src/cmap.cxx

Added: branches/branch-3.0/src/core/Fl.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2026 @@
+//
+// "$Id$"
+//
+// Main event handling code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+// warning: the Apple Quartz version still uses some Quickdraw calls,
+//          mostly to get around the single active context in QD and
+//          to implement clipping. This should be changed into pure
+//          Quartz calls in the near future.
+#include <config.h>
+#include <fltk3/Wrapper.h>
+
+/* We require Windows 2000 features (e.g. VK definitions) */
+#if defined(WIN32)
+# if !defined(WINVER) || (WINVER < 0x0500)
+#  ifdef WINVER
+#   undef WINVER
+#  endif
+#  define WINVER 0x0500
+# endif
+# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
+#  ifdef _WIN32_WINNT
+#   undef _WIN32_WINNT
+#  endif
+#  define _WIN32_WINNT 0x0500
+# endif
+#endif
+
+// recent versions of MinGW warn: "Please include winsock2.h before windows.h",
+// hence we must include winsock2.h before FL/Fl.H (A.S. Dec. 2010, IMM May 2011)
+#if defined(WIN32) && !defined(__CYGWIN__)
+#  include <winsock2.h>
+#endif
+
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/Tooltip.h>
+#include <fltk3/x.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+#if defined(DEBUG) || defined(DEBUG_WATCH)
+#  include <stdio.h>
+#endif // DEBUG || DEBUG_WATCH
+
+#ifdef WIN32
+#  include <ole2.h>
+void fl_free_fonts(void);
+HBRUSH fl_brush_action(int action);
+void fl_cleanup_pens(void);
+void fl_release_dc(HWND,HDC);
+void fl_cleanup_dc_list(void);
+#elif defined(__APPLE__)
+extern double fl_mac_flush_and_wait(double time_to_wait, char in_idle);
+#endif // WIN32
+
+//
+// Globals...
+//
+#if defined(__APPLE__) || defined(FLTK3_DOXYGEN)
+const char *Fl_Mac_App_Menu::about = "About ";
+const char *Fl_Mac_App_Menu::print = "Print Front Window";
+const char *Fl_Mac_App_Menu::services = "Services";
+const char *Fl_Mac_App_Menu::hide = "Hide ";
+const char *Fl_Mac_App_Menu::hide_others = "Hide Others";
+const char *Fl_Mac_App_Menu::show = "Show All";
+const char *Fl_Mac_App_Menu::quit = "Quit ";
+#endif // __APPLE__
+#ifndef FLTK3_DOXYGEN
+fltk3::Widget	*fltk3::belowmouse_,
+		*fltk3::pushed_,
+		*fltk3::focus_,
+		*fltk3::selection_owner_;
+int		fltk3::damage_,
+		fltk3::e_number,
+		fltk3::e_x,
+		fltk3::e_y,
+		fltk3::e_x_root,
+		fltk3::e_y_root,
+		fltk3::e_dx,
+		fltk3::e_dy,
+		fltk3::e_clicks,
+		fltk3::e_is_click,
+                fltk3::e_original_keysym,
+		fltk3::scrollbar_size_ = 16;
+unsigned int fltk3::e_keysym;
+unsigned int fltk3::e_state;
+
+
+char		*fltk3::e_text = (char *)"";
+int		fltk3::e_length;
+
+fltk3::EventDispatch fltk3::e_dispatch = 0;
+
+unsigned char   fltk3::options_[] = { 0, 0 };
+unsigned char   fltk3::options_read_ = 0;
+
+
+fltk3::Window *fl_xfocus;	// which window X thinks has focus
+fltk3::Window *fl_xmousewin;// which window X thinks has fltk3::ENTER
+fltk3::Window *fltk3::grab_;	// most recent fltk3::grab()
+fltk3::Window *fltk3::modal_;	// topmost modal() window
+
+#endif // FLTK3_DOXYGEN
+
+//
+// 'fltk3::version()' - Return the API version number...
+//
+
+double
+/**
+  Returns the compiled-in value of the FL_VERSION constant. This
+  is useful for checking the version of a shared library.
+*/
+fltk3::version() {
+  return FL_VERSION;
+}
+
+/**
+  Gets the default scrollbar size used by
+  fltk3::Browser_,
+  fltk3::HelpView,
+  fltk3::ScrollGroup, and
+  fltk3::TextDisplay widgets.
+  \returns The default size for widget scrollbars, in pixels.
+*/
+int fltk3::scrollbar_size() {
+  return scrollbar_size_;
+}
+
+/**
+  Sets the default scrollbar size that is used by the
+  fltk3::Browser_,
+  fltk3::HelpView,
+  fltk3::ScrollGroup, and
+  fltk3::TextDisplay widgets.
+  \param[in] W The new default size for widget scrollbars, in pixels.
+*/
+void fltk3::scrollbar_size(int W) {
+  scrollbar_size_ = W;
+}
+
+
+/** Returns whether or not the mouse event is inside the given rectangle.
+
+    Returns non-zero if the current fltk3::event_x() and fltk3::event_y()
+    put it inside the given arbitrary bounding box.
+
+    You should always call this rather than doing your own comparison
+    so you are consistent about edge effects.
+
+    To find out, whether the event is inside a child widget of the
+    current window, you can use fltk3::event_inside(const fltk3::Widget *).
+
+    \param[in] xx,yy,ww,hh	bounding box
+    \return			non-zero, if mouse event is inside
+*/
+int fltk3::event_inside(int xx,int yy,int ww,int hh) /*const*/ {
+  int mx = e_x - xx;
+  int my = e_y - yy;
+  return (mx >= 0 && mx < ww && my >= 0 && my < hh);
+}
+
+/** Returns whether or not the mouse event is inside a given child widget.
+
+    Returns non-zero if the current fltk3::event_x() and fltk3::event_y()
+    put it inside the given child widget's bounding box.
+
+    This method can only be used to check whether the mouse event is
+    inside a \b child widget of the window that handles the event, and
+    there must not be an intermediate subwindow (i.e. the widget must
+    not be inside a subwindow of the current window). However, it is
+    valid if the widget is inside a nested fltk3::Group.
+
+    You must not use it with the window itself as the \p o argument
+    in a window's handle() method.
+
+    \note The mentioned restrictions are necessary, because this method
+    does not transform coordinates of child widgets, and thus the given
+    widget \p o must be within the \e same window that is handling the
+    current event. Otherwise the results are undefined.
+
+    You should always call this rather than doing your own comparison
+    so you are consistent about edge effects.
+
+    \see fltk3::event_inside(int, int, int, int)
+
+    \param[in] o	child widget to be tested
+    \return		non-zero, if mouse event is inside the widget
+*/
+int fltk3::event_inside(const fltk3::Widget *o) /*const*/ {
+  int mx = e_x - o->x();
+  int my = e_y - o->y();
+  return (mx >= 0 && mx < o->w() && my >= 0 && my < o->h());
+}
+
+//
+//
+// timer support
+//
+
+#ifdef WIN32
+
+// implementation in Fl_win32.cxx
+
+#elif defined(__APPLE__)
+
+// implementation in Fl_mac.cxx
+
+#else
+
+//
+// X11 timers
+//
+
+
+////////////////////////////////////////////////////////////////////////
+// Timeouts are stored in a sorted list (*first_timeout), so only the
+// first one needs to be checked to see if any should be called.
+// Allocated, but unused (free) Timeout structs are stored in another
+// linked list (*free_timeout).
+
+struct Timeout {
+  double time;
+  void (*cb)(void*);
+  void* arg;
+  Timeout* next;
+};
+static Timeout* first_timeout, *free_timeout;
+
+#include <sys/time.h>
+
+// I avoid the overhead of getting the current time when we have no
+// timeouts by setting this flag instead of getting the time.
+// In this case calling elapse_timeouts() does nothing, but records
+// the current time, and the next call will actually elapse time.
+static char reset_clock = 1;
+
+static void elapse_timeouts() {
+  static struct timeval prevclock;
+  struct timeval newclock;
+  gettimeofday(&newclock, NULL);
+  double elapsed = newclock.tv_sec - prevclock.tv_sec +
+    (newclock.tv_usec - prevclock.tv_usec)/1000000.0;
+  prevclock.tv_sec = newclock.tv_sec;
+  prevclock.tv_usec = newclock.tv_usec;
+  if (reset_clock) {
+    reset_clock = 0;
+  } else if (elapsed > 0) {
+    for (Timeout* t = first_timeout; t; t = t->next) t->time -= elapsed;
+  }
+}
+
+// Continuously-adjusted error value, this is a number <= 0 for how late
+// we were at calling the last timeout. This appears to make repeat_timeout
+// very accurate even when processing takes a significant portion of the
+// time interval:
+static double missed_timeout_by;
+
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void *argp) {
+  elapse_timeouts();
+  repeat_timeout(time, cb, argp);
+}
+
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void *argp) {
+  time += missed_timeout_by; if (time < -.05) time = 0;
+  Timeout* t = free_timeout;
+  if (t) {
+      free_timeout = t->next;
+  } else {
+      t = new Timeout;
+  }
+  t->time = time;
+  t->cb = cb;
+  t->arg = argp;
+  // insert-sort the new timeout:
+  Timeout** p = &first_timeout;
+  while (*p && (*p)->time <= time) p = &((*p)->next);
+  t->next = *p;
+  *p = t;
+}
+
+/**
+  Returns true if the timeout exists and has not been called yet.
+*/
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void *argp) {
+  for (Timeout* t = first_timeout; t; t = t->next)
+    if (t->cb == cb && t->arg == argp) return 1;
+  return 0;
+}
+
+/**
+  Removes a timeout callback. It is harmless to remove a timeout
+  callback that no longer exists.
+
+  \note	This version removes all matching timeouts, not just the first one.
+	This may change in the future.
+*/
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void *argp) {
+  for (Timeout** p = &first_timeout; *p;) {
+    Timeout* t = *p;
+    if (t->cb == cb && (t->arg == argp || !argp)) {
+      *p = t->next;
+      t->next = free_timeout;
+      free_timeout = t;
+    } else {
+      p = &(t->next);
+    }
+  }
+}
+
+#endif
+
+////////////////////////////////////////////////////////////////
+// Checks are just stored in a list. They are called in the reverse
+// order that they were added (this may change in the future).
+// This is a bit messy because I want to allow checks to be added,
+// removed, and have wait() called from inside them. To do this
+// next_check points at the next unprocessed one for the outermost
+// call to fltk3::wait().
+
+struct Check {
+  void (*cb)(void*);
+  void* arg;
+  Check* next;
+};
+static Check *first_check, *next_check, *free_check;
+
+/**
+  FLTK will call this callback just before it flushes the display and
+  waits for events.  This is different than an idle callback because it
+  is only called once, then FLTK calls the system and tells it not to
+  return until an event happens.
+
+  This can be used by code that wants to monitor the
+  application's state, such as to keep a display up to date. The
+  advantage of using a check callback is that it is called only when no
+  events are pending. If events are coming in quickly, whole blocks of
+  them will be processed before this is called once. This can save
+  significant time and avoid the application falling behind the events.
+
+  Sample code:
+
+  \code
+  bool state_changed; // anything that changes the display turns this on
+  
+  void callback(void*) {
+   if (!state_changed) return;
+   state_changed = false;
+   do_expensive_calculation();
+   widget-&gt;redraw();
+  }
+  
+  main() {
+   fltk3::add_check(callback);
+   return fltk3::run();
+  }
+  \endcode
+*/
+void fltk3::add_check(fltk3::TimeoutHandler cb, void *argp) {
+  Check* t = free_check;
+  if (t) free_check = t->next;
+  else t = new Check;
+  t->cb = cb;
+  t->arg = argp;
+  t->next = first_check;
+  if (next_check == first_check) next_check = t;
+  first_check = t;
+}
+
+/**
+  Removes a check callback. It is harmless to remove a check
+  callback that no longer exists.
+*/
+void fltk3::remove_check(fltk3::TimeoutHandler cb, void *argp) {
+  for (Check** p = &first_check; *p;) {
+    Check* t = *p;
+    if (t->cb == cb && t->arg == argp) {
+      if (next_check == t) next_check = t->next;
+      *p = t->next;
+      t->next = free_check;
+      free_check = t;
+    } else {
+      p = &(t->next);
+    }
+  }
+}
+
+/**
+  Returns 1 if the check exists and has not been called yet, 0 otherwise.
+*/
+int fltk3::has_check(fltk3::TimeoutHandler cb, void *argp) {
+  for (Check** p = &first_check; *p;) {
+    Check* t = *p;
+    if (t->cb == cb && t->arg == argp) {
+      return 1;
+    } else {
+      p = &(t->next);
+    }
+  }
+  return 0;
+}
+
+static void run_checks()
+{
+  // checks are a bit messy so that add/remove and wait may be called
+  // from inside them without causing an infinite loop:
+  if (next_check == first_check) {
+    while (next_check) {
+      Check* checkp = next_check;
+      next_check = checkp->next;
+      (checkp->cb)(checkp->arg);
+    }
+    next_check = first_check;
+  }
+}
+
+#ifndef WIN32
+static char in_idle;
+#endif
+
+////////////////////////////////////////////////////////////////
+// wait/run/check/ready:
+
+void (*fltk3::idle)(); // see fltk3::add_idle.cxx for the add/remove functions
+
+extern int fl_ready(); // in Fl_<platform>.cxx
+extern int fl_wait(double time); // in Fl_<platform>.cxx
+
+/**
+  See int fltk3::wait()
+*/
+double fltk3::wait(double time_to_wait) {
+  // delete all widgets that were listed during callbacks
+  do_widget_deletion();
+
+#ifdef WIN32
+
+  return fl_wait(time_to_wait);
+
+#elif defined(__APPLE__)
+
+  run_checks();
+  if (idle) {
+    if (!in_idle) {
+      in_idle = 1;
+      idle();
+      in_idle = 0;
+    }
+    // the idle function may turn off idle, we can then wait:
+    if (idle) time_to_wait = 0.0;
+  }
+  return fl_mac_flush_and_wait(time_to_wait, in_idle);
+
+#else
+
+  if (first_timeout) {
+    elapse_timeouts();
+    Timeout *t;
+    while ((t = first_timeout)) {
+      if (t->time > 0) break;
+      // The first timeout in the array has expired.
+      missed_timeout_by = t->time;
+      // We must remove timeout from array before doing the callback:
+      void (*cb)(void*) = t->cb;
+      void *argp = t->arg;
+      first_timeout = t->next;
+      t->next = free_timeout;
+      free_timeout = t;
+      // Now it is safe for the callback to do add_timeout:
+      cb(argp);
+    }
+  } else {
+    reset_clock = 1; // we are not going to check the clock
+  }
+  run_checks();
+//  if (idle && !fl_ready()) {
+  if (idle) {
+    if (!in_idle) {
+      in_idle = 1;
+      idle();
+      in_idle = 0;
+    }
+    // the idle function may turn off idle, we can then wait:
+    if (idle) time_to_wait = 0.0;
+  }
+  if (first_timeout && first_timeout->time < time_to_wait)
+    time_to_wait = first_timeout->time;
+  if (time_to_wait <= 0.0) {
+    // do flush second so that the results of events are visible:
+    int ret = fl_wait(0.0);
+    flush();
+    return ret;
+  } else {
+    // do flush first so that user sees the display:
+    flush();
+    if (idle && !in_idle) // 'idle' may have been set within flush()
+      time_to_wait = 0.0;
+    return fl_wait(time_to_wait);
+  }
+#endif
+}
+
+#define FOREVER 1e20
+
+/**
+  As long as any windows are displayed this calls fltk3::wait()
+  repeatedly.  When all the windows are closed it returns zero
+  (supposedly it would return non-zero on any errors, but FLTK calls
+  exit directly for these).  A normal program will end main()
+  with return fltk3::run();.
+*/
+int fltk3::run() {
+  while (Fl_X::first) wait(FOREVER);
+  return 0;
+}
+
+#ifdef WIN32
+
+// Function to initialize COM/OLE for usage. This must be done only once.
+// We define a flag to register whether we called it:
+static char oleInitialized = 0;
+
+// This calls the Windows function OleInitialize() exactly once.
+void fl_OleInitialize() {
+  if (!oleInitialized) {
+    OleInitialize(0L);
+    oleInitialized = 1;
+  }
+}
+
+// This calls the Windows function OleUninitialize() only, if
+// OleInitialize has been called before.
+void fl_OleUninitialize() {
+  if (oleInitialized) {
+    OleUninitialize();
+    oleInitialized = 0;
+  }
+}
+
+class Fl_Win32_At_Exit {
+public:
+  Fl_Win32_At_Exit() { }
+  ~Fl_Win32_At_Exit() {
+    fl_free_fonts();        // do some WIN32 cleanup
+    fl_cleanup_pens();
+    fl_OleUninitialize();
+    fl_brush_action(1);
+    fl_cleanup_dc_list();
+  }
+};
+static Fl_Win32_At_Exit win32_at_exit;
+#endif
+
+
+
+/**
+  Waits until "something happens" and then returns.  Call this
+  repeatedly to "run" your program.  You can also check what happened
+  each time after this returns, which is quite useful for managing
+  program state.
+  
+  What this really does is call all idle callbacks, all elapsed
+  timeouts, call fltk3::flush() to get the screen to update, and
+  then wait some time (zero if there are idle callbacks, the shortest of
+  all pending timeouts, or infinity), for any events from the user or
+  any fltk3::add_fd() callbacks.  It then handles the events and
+  calls the callbacks and then returns.
+
+  The return value of fltk3::wait() is non-zero if there are any
+  visible windows - this may change in future versions of FLTK.
+
+  fltk3::wait(time) waits a maximum of \e time seconds.
+  <i>It can return much sooner if something happens.</i>
+
+  The return value is positive if an event or fd happens before the
+  time elapsed.  It is zero if nothing happens (on Win32 this will only
+  return zero if \e time is zero).  It is negative if an error
+  occurs (this will happen on UNIX if a signal happens).
+*/
+int fltk3::wait() {
+  if (!Fl_X::first) return 0;
+  wait(FOREVER);
+  return Fl_X::first != 0; // return true if there is a window
+}
+
+/**
+  Same as fltk3::wait(0).  Calling this during a big calculation
+  will keep the screen up to date and the interface responsive:
+  
+  \code
+  while (!calculation_done()) {
+  calculate();
+  fltk3::check();
+  if (user_hit_abort_button()) break;
+  }
+  \endcode
+  
+  This returns non-zero if any windows are displayed, and 0 if no
+  windows are displayed (this is likely to change in future versions of
+  FLTK).
+*/
+int fltk3::check() {
+  wait(0.0);
+  return Fl_X::first != 0; // return true if there is a window
+}
+
+/**
+  This is similar to fltk3::check() except this does \e not
+  call fltk3::flush() or any callbacks, which is useful if your
+  program is in a state where such callbacks are illegal.  This returns
+  true if fltk3::check() would do anything (it will continue to
+  return true until you call fltk3::check() or fltk3::wait()).
+  
+  \code
+  while (!calculation_done()) {
+    calculate();
+    if (fltk3::ready()) {
+      do_expensive_cleanup();
+      fltk3::check();
+      if (user_hit_abort_button()) break;
+    }
+  }
+  \endcode
+*/
+int fltk3::ready() {
+#if ! defined( WIN32 )  &&  ! defined(__APPLE__)
+  if (first_timeout) {
+    elapse_timeouts();
+    if (first_timeout->time <= 0) return 1;
+  } else {
+    reset_clock = 1;
+  }
+#endif
+  return fl_ready();
+}
+
+////////////////////////////////////////////////////////////////
+// Window list management:
+
+#ifndef FLTK3_DOXYGEN
+Fl_X* Fl_X::first;
+#endif
+
+fltk3::Window* fl_find(Window xid) {
+  Fl_X *window;
+  for (Fl_X **pp = &Fl_X::first; (window = *pp); pp = &window->next)
+#if defined(WIN32) || defined(USE_X11)
+   if (window->xid == xid) 
+#elif defined(__APPLE_QUARTZ__)
+   if (window->xid == xid && !window->w->window()) 
+#else
+# error unsupported platform
+#endif // __APPLE__
+	{
+      if (window != Fl_X::first && !fltk3::modal()) {
+	// make this window be first to speed up searches
+	// this is not done if modal is true to avoid messing up modal stack
+	*pp = window->next;
+	window->next = Fl_X::first;
+	Fl_X::first = window;
+      }
+      return window->w;
+    }
+  return 0;
+}
+
+/**
+  Returns the first top-level window in the list of shown() windows.  If
+  a modal() window is shown this is the top-most modal window, otherwise
+  it is the most recent window to get an event.
+*/
+fltk3::Window* fltk3::first_window() {
+  Fl_X* i = Fl_X::first;
+  return i ? i->w : 0;
+}
+
+/**
+  Returns the next top-level window in the list of shown() windows.
+  You can use this call to iterate through all the windows that are shown().
+  \param[in] window	must be shown and not NULL
+*/
+fltk3::Window* fltk3::next_window(const fltk3::Window* window) {
+  Fl_X* i = Fl_X::i(window)->next;
+  return i ? i->w : 0;
+}
+
+/**
+ Sets the window that is returned by first_window().  
+ The window is removed from wherever it is in the
+ list and inserted at the top.  This is not done if fltk3::modal()
+ is on or if the window is not shown(). Because the first window
+ is used to set the "parent" of modal windows, this is often
+ useful.
+ */
+void fltk3::first_window(fltk3::Window* window) {
+  if (!window || !window->shown()) return;
+  fl_find( Fl_X::i(window)->xid );
+}
+
+/**
+  Redraws all widgets.
+*/
+void fltk3::redraw() {
+  for (Fl_X* i = Fl_X::first; i; i = i->next) i->w->redraw();
+}
+
+/**
+  Causes all the windows that need it to be redrawn and graphics forced
+  out through the pipes.
+  
+  This is what wait() does before looking for events.
+
+  Note: in multi-threaded applications you should only call fltk3::flush()
+  from the main thread. If a child thread needs to trigger a redraw event,
+  it should instead call fltk3::awake() to get the main thread to process the
+  event queue.
+*/
+void fltk3::flush() {
+  if (damage()) {
+    fltk3::damage_ = 0;
+    for (Fl_X* i = Fl_X::first; i; i = i->next) {
+      if (i->wait_for_expose) {fltk3::damage_ = 1; continue;}
+      fltk3::Window* wi = i->w;
+      if (!wi->visible_r()) continue;
+      if (wi->damage()) {i->flush(); wi->clear_damage();}
+      // destroy damage regions for windows that don't use them:
+      if (i->region) {XDestroyRegion(i->region); i->region = 0;}
+    }
+  }
+#if defined(USE_X11)
+  if (fl_display) XFlush(fl_display);
+#elif defined(WIN32)
+  GdiFlush();
+#elif defined (__APPLE_QUARTZ__)
+  if (fl_gc)
+    CGContextFlush(fl_gc);
+#else
+# error unsupported platform
+#endif
+}
+
+
+////////////////////////////////////////////////////////////////
+// Event handlers:
+
+
+struct handler_link {
+  int (*handle)(int);
+  handler_link *next;
+};
+
+
+static handler_link *handlers = 0;
+
+
+/**
+  Install a function to parse unrecognized events.  If FLTK cannot
+  figure out what to do with an event, it calls each of these functions
+  (most recent first) until one of them returns non-zero.  If none of
+  them returns non-zero then the event is ignored.  Events that cause
+  this to be called are:
+  
+  - fltk3::SHORTCUT events that are not recognized by any widget.
+    This lets you provide global shortcut keys.
+  - System events that FLTK does not recognize.  See fl_xevent.
+  - \e Some other events when the widget FLTK selected returns
+    zero from its handle() method.  Exactly which ones may change
+    in future versions, however.
+
+ \see fltk3::remove_handler(fltk3::EventHandler)
+ \see fltk3::event_dispatch(fltk3::EventDispatch d)
+ \see fltk3::handle(int, fltk3::Window*)
+*/
+void fltk3::add_handler(fltk3::EventHandler ha) {
+  handler_link *l = new handler_link;
+  l->handle = ha;
+  l->next = handlers;
+  handlers = l;
+}
+
+
+/**
+ Removes a previously added event handler.
+ \see fltk3::handle(int, fltk3::Window*)
+*/
+void fltk3::remove_handler(fltk3::EventHandler ha) {
+  handler_link *l, *p;
+
+  // Search for the handler in the list...
+  for (l = handlers, p = 0; l && l->handle != ha; p = l, l = l->next);
+
+  if (l) {
+    // Found it, so remove it from the list...
+    if (p) p->next = l->next;
+    else handlers = l->next;
+
+    // And free the record...
+    delete l;
+  }
+}
+
+int (*fl_local_grab)(int); // used by fl_dnd.cxx
+
+static int send_handlers(int e) {
+  for (const handler_link *hl = handlers; hl; hl = hl->next)
+    if (hl->handle(e)) return 1;
+  return 0;
+}
+
+////////////////////////////////////////////////////////////////
+
+fltk3::Widget* fl_oldfocus; // kludge for fltk3::Group...
+
+/**
+    Sets the widget that will receive fltk3::KEYBOARD events.
+    
+    If you change fltk3::focus(), the previous widget and all
+    parents (that don't contain the new widget) are sent fltk3::UNFOCUS
+    events.  Changing the focus does \e not send fltk3::FOCUS to
+    this or any widget, because sending fltk3::FOCUS is supposed to
+    \e test if the widget wants the focus (by it returning non-zero from
+    handle()).
+    
+    \see fltk3::Widget::take_focus()
+*/
+void fltk3::focus(fltk3::Widget *o) {
+  if (o && !o->visible_focus()) return;
+  if (grab()) return; // don't do anything while grab is on
+  fltk3::Widget *p = focus_;
+  if (o != p) {
+    fltk3::compose_reset();
+    focus_ = o;
+    // make sure that fl_xfocus is set to the top level window
+    // of this widget, or fl_fix_focus will clear our focus again
+    if (o) {
+      fltk3::Window *win = 0, *w1 = o->as_window();
+      if (!w1) w1 = o->window();
+      while (w1) { win=w1; w1=win->window(); }
+      if (win) {
+#ifdef __APPLE__
+	if (fl_xfocus != win) {
+	  Fl_X *x = Fl_X::i(win);
+	  if (x) x->set_key_window();
+        }
+#endif
+	fl_xfocus = win;
+      }
+    }
+    // take focus from the old focused window
+    fl_oldfocus = 0;
+    int old_event = e_number;
+    e_number = fltk3::UNFOCUS;
+    for (; p; p = p->parent()) {
+      p->handle(fltk3::UNFOCUS);
+      fl_oldfocus = p;
+    }
+    e_number = old_event;
+  }
+}
+
+static char dnd_flag = 0; // make 'belowmouse' send DND_LEAVE instead of LEAVE
+
+/**
+    Sets the widget that is below the mouse.  This is for
+    highlighting buttons.  It is not used to send fltk3::PUSH or 
+    fltk3::MOVE directly, for several obscure reasons, but those events
+    typically go to this widget.  This is also the first widget tried for 
+    fltk3::SHORTCUT events.
+    
+    If you change the belowmouse widget, the previous one and all
+    parents (that don't contain the new widget) are sent fltk3::LEAVE
+    events.  Changing this does \e not send fltk3::ENTER to this
+    or any widget, because sending fltk3::ENTER is supposed to \e test
+    if the widget wants the mouse (by it returning non-zero from 
+    handle()).
+*/
+void fltk3::belowmouse(fltk3::Widget *o) {
+  if (grab()) return; // don't do anything while grab is on
+  fltk3::Widget *p = belowmouse_;
+  if (o != p) {
+    belowmouse_ = o;
+    int old_event = e_number;
+    e_number = dnd_flag ? fltk3::DND_LEAVE : fltk3::LEAVE;
+    for (; p && !p->contains(o); p = p->parent()) {
+      p->handle(e_number);
+    }
+    e_number = old_event;
+  }
+}
+
+/**
+    Sets the widget that is being pushed. fltk3::DRAG or 
+    fltk3::RELEASE (and any more fltk3::PUSH) events will be sent to
+    this widget.
+    
+    If you change the pushed widget, the previous one and all parents
+    (that don't contain the new widget) are sent fltk3::RELEASE
+    events.  Changing this does \e not send fltk3::PUSH to this
+    or any widget, because sending fltk3::PUSH is supposed to \e test
+    if the widget wants the mouse (by it returning non-zero from 
+    handle()).
+*/
+ void fltk3::pushed(fltk3::Widget *o) {
+  pushed_ = o;
+}
+
+static void nothing(fltk3::Widget *) {}
+void (*fltk3::Tooltip::enter)(fltk3::Widget *) = nothing;
+void (*fltk3::Tooltip::exit)(fltk3::Widget *) = nothing;
+
+// Update modal(), focus() and other state according to system state,
+// and send fltk3::ENTER, fltk3::LEAVE, fltk3::FOCUS, and/or fltk3::UNFOCUS events.
+// This is the only function that produces these events in response
+// to system activity.
+// This is called whenever a window is added or hidden, and whenever
+// X says the focus or mouse window have changed.
+
+void fl_fix_focus() {
+#ifdef DEBUG
+  puts("fl_fix_focus();");
+#endif // DEBUG
+
+  if (fltk3::grab()) return; // don't do anything while grab is on.
+
+  // set focus based on fltk3::modal() and fl_xfocus
+  fltk3::Widget* w = fl_xfocus;
+  if (w) {
+    unsigned int saved = fltk3::e_keysym;
+    if (fltk3::e_keysym < (fltk3::MouseButton + fltk3::LEFT_MOUSE) ||
+        fltk3::e_keysym > (fltk3::MouseButton + fltk3::RIGHT_MOUSE))
+      fltk3::e_keysym = 0; // make sure widgets don't think a keystroke moved focus
+    while (w->parent()) w = w->parent();
+    if (fltk3::modal()) w = fltk3::modal();
+    if (!w->contains(fltk3::focus()))
+      if (!w->take_focus()) fltk3::focus(w);
+    fltk3::e_keysym = saved;
+  } else
+    fltk3::focus(0);
+
+// MRS: Originally we checked the button state, but a user reported that it
+//      broke click-to-focus in FLWM?!?
+//  if (!(fltk3::event_state() & 0x7f00000 /*fltk3::BUTTONS*/)) {
+  if (!fltk3::pushed()) {
+    // set belowmouse based on fltk3::modal() and fl_xmousewin:
+    w = fl_xmousewin;
+    if (w) {
+      if (fltk3::modal()) w = fltk3::modal();
+      if (!w->contains(fltk3::belowmouse())) {
+        int old_event = fltk3::e_number;
+	w->handle(fltk3::e_number = fltk3::ENTER);
+	fltk3::e_number = old_event;
+	if (!w->contains(fltk3::belowmouse())) fltk3::belowmouse(w);
+      } else {
+	// send a fltk3::MOVE event so the enter/leave state is up to date
+	fltk3::e_x = fltk3::e_x_root-fl_xmousewin->x();
+	fltk3::e_y = fltk3::e_y_root-fl_xmousewin->y();
+        int old_event = fltk3::e_number;
+	w->handle(fltk3::e_number = fltk3::MOVE);
+	fltk3::e_number = old_event;
+      }
+    } else {
+      fltk3::belowmouse(0);
+      fltk3::Tooltip::enter(0);
+    }
+  }
+}
+
+#if !(defined(WIN32) || defined(__APPLE__))
+extern fltk3::Widget *fl_selection_requestor; // from Fl_x.cxx
+#endif
+
+// This function is called by ~Fl_Widget() and by fltk3::Widget::deactivate()
+// and by fltk3::Widget::hide().  It indicates that the widget does not want
+// to receive any more events, and also removes all global variables that
+// point at the widget.
+// I changed this from the 1.0.1 behavior, the older version could send
+// fltk3::LEAVE or fltk3::UNFOCUS events to the widget.  This appears to not be
+// desirable behavior and caused flwm to crash.
+
+void fl_throw_focus(fltk3::Widget *o) {
+#ifdef DEBUG
+  printf("fl_throw_focus(o=%p)\n", o);
+#endif // DEBUG
+
+  if (o->contains(fltk3::pushed())) fltk3::pushed_ = 0;
+#if !(defined(WIN32) || defined(__APPLE__))
+  if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0;
+#endif
+  if (o->contains(fltk3::belowmouse())) fltk3::belowmouse_ = 0;
+  if (o->contains(fltk3::focus())) fltk3::focus_ = 0;
+  if (o == fl_xfocus) fl_xfocus = 0;
+  if (o == fltk3::Tooltip::current()) fltk3::Tooltip::current(0);
+  if (o == fl_xmousewin) fl_xmousewin = 0;
+  fltk3::Tooltip::exit(o);
+  fl_fix_focus();
+}
+
+////////////////////////////////////////////////////////////////
+
+// Call to->handle(), but first replace the mouse x/y with the correct
+// values to account for nested windows. 'window' is the outermost
+// window the event was posted to by the system:
+static int send(int event, fltk3::Widget* to, fltk3::Window* window) {
+  int dx, dy;
+  int old_event = fltk3::e_number;
+  if (window) {
+    dx = window->x();
+    dy = window->y();
+  } else {
+    dx = dy = 0;
+  }
+  for (const fltk3::Widget* w = to; w; w = w->parent())
+    if (w->type()>=fltk3::WINDOW) {dx -= w->x(); dy -= w->y();}
+  int save_x = fltk3::e_x; fltk3::e_x += dx;
+  int save_y = fltk3::e_y; fltk3::e_y += dy;
+  int ret = to->handle(fltk3::e_number = event);
+  fltk3::e_number = old_event;
+  fltk3::e_y = save_y;
+  fltk3::e_x = save_x;
+  return ret;
+}
+
+
+/**
+ \brief Set a new event dispatch function.
+
+ The event dispatch function is called after native events are converted to
+ FLTK events, but before they are handled by FLTK. If the dispatch function
+ fltk3::EventDispatch \p d is set, it is up to the dispatch function to call
+ fltk3::handle_(int, fltk3::Window*) or to ignore the event.
+
+ The dispatch function itself must return 0 if it ignored the event,
+ or non-zero if it used the event. If you call fltk3::handle_(), then
+ this will return the correct value.
+
+ The event dispatch can be used to handle exceptions in FLTK events and
+ callbacks before they reach the native event handler:
+
+ \code
+ int myHandler(int e, fltk3::Window *w) {
+   try {
+     return fltk3::handle_(e, w);
+   } catch () {
+     ...
+   }
+ }
+
+ main() {
+   fltk3::event_dispatch(myHandler);
+   ...
+   fltk3::run();
+ }
+ \endcode
+
+ \param d new dispatch function, or NULL 
+ \see fltk3::add_handler(fltk3::EventHandler)
+ \see fltk3::handle(int, fltk3::Window*)
+ \see fltk3::handle_(int, fltk3::Window*)
+ */
+void fltk3::event_dispatch(fltk3::EventDispatch d)
+{
+  e_dispatch = d; 
+}
+
+
+/** 
+ \brief Return the current event dispatch function. 
+ */
+fltk3::EventDispatch fltk3::event_dispatch() 
+{ 
+  return e_dispatch; 
+}
+
+
+/**
+ \brief Handle events from the window system.
+
+ This is called from the native event dispatch after native events have been
+ converted to FLTK notation. This function calls fltk3::handle_(int, fltk3::Window*) 
+ unless the user sets a dispatch function. If a user dispatch function is set,
+ the user must make sure that fltk3::handle_() is called, or the event will be
+ ignored.
+
+ \param e the event type (fltk3::event_number() is not yet set)
+ \param window the window that caused this event
+ \return 0 if the event was not handled
+
+ \see fltk3::add_handler(fltk3::EventHandler)
+ \see fltk3::event_dispatch(fltk3::EventDispatch)
+ */
+int fltk3::handle(int e, fltk3::Window* window)
+{
+  if (e_dispatch) {
+    return e_dispatch(e, window);
+  } else {
+    return handle_(e, window);
+  }
+}
+
+
+/**
+ \brief Handle events from the window system.
+
+ This function is called from the native event dispatch, unless the user sets 
+ another dispatch function. In that case, the user dispatch function must 
+ decide when to call fltk3::handle_(int, fltk3::Window*)
+
+ \param e the event type (fltk3::event_number() is not yet set)
+ \param window the window that caused this event
+ \return 0 if the event was not handled
+
+ \see fltk3::event_dispatch(fltk3::EventDispatch)
+ */
+int fltk3::handle_(int e, fltk3::Window* window)
+{  
+  e_number = e;
+  if (fl_local_grab) return fl_local_grab(e);
+
+  fltk3::Widget* wi = window;
+
+  switch (e) {
+
+  case fltk3::CLOSE:
+    if ( grab() || (modal() && window != modal()) ) return 0;
+    wi->do_callback();
+    return 1;
+
+  case fltk3::SHOW:
+    wi->Widget::show(); // this calls fltk3::Widget::show(), not fltk3::Window::show()
+    return 1;
+
+  case fltk3::HIDE:
+    wi->Widget::hide(); // this calls fltk3::Widget::hide(), not fltk3::Window::hide()
+    return 1;
+
+  case fltk3::PUSH:
+#ifdef DEBUG
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
+#endif // DEBUG
+
+    if (grab()) wi = grab();
+    else if (modal() && wi != modal()) return 0;
+    pushed_ = wi;
+    fltk3::Tooltip::current(wi);
+    if (send(e, wi, window)) return 1;
+    // raise windows that are clicked on:
+    window->show();
+    return 1;
+
+  case fltk3::DND_ENTER:
+  case fltk3::DND_DRAG:
+    dnd_flag = 1;
+    break;
+
+  case fltk3::DND_LEAVE:
+    dnd_flag = 1;
+    belowmouse(0);
+    dnd_flag = 0;
+    return 1;
+
+  case fltk3::DND_RELEASE:
+    wi = belowmouse();
+    break;
+
+  case fltk3::MOVE:
+  case fltk3::DRAG:
+    fl_xmousewin = window; // this should already be set, but just in case.
+    if (pushed()) {
+      wi = pushed();
+      if (grab()) wi = grab();
+      e_number = e = fltk3::DRAG;
+      break;
+    }
+    if (modal() && wi != modal()) wi = 0;
+    if (grab()) wi = grab();
+    { int ret;
+      fltk3::Widget* pbm = belowmouse();
+#ifdef __APPLE__
+      if (fl_mac_os_version < 100500) {
+        // before 10.5, mouse moved events aren't sent to borderless windows such as tooltips
+	fltk3::Window *tooltip = fltk3::Tooltip::current_window();
+	int inside = 0;
+	if (tooltip && tooltip->shown() ) { // check if a tooltip window is currently opened
+	  // check if mouse is inside the tooltip
+	  inside = (fltk3::event_x_root() >= tooltip->x() && fltk3::event_x_root() < tooltip->x() + tooltip->w() &&
+	  fltk3::event_y_root() >= tooltip->y() && fltk3::event_y_root() < tooltip->y() + tooltip->h() );
+	}
+	// if inside, send event to tooltip window instead of background window
+	if (inside) ret = send(e, tooltip, window);
+	else ret = (wi && send(e, wi, window));
+      } else
+#endif
+      ret = (wi && send(e, wi, window));
+   if (pbm != belowmouse()) {
+#ifdef DEBUG
+      printf("fltk3::handle(e=%d, window=%p);\n", e, window);
+#endif // DEBUG
+      fltk3::Tooltip::enter(belowmouse());
+    }
+    return ret;}
+
+  case fltk3::RELEASE: {
+//    printf("fltk3::RELEASE: window=%p, pushed() = %p, grab() = %p, modal() = %p\n",
+//           window, pushed(), grab(), modal());
+
+    if (grab()) {
+      wi = grab();
+      pushed_ = 0; // must be zero before callback is done!
+    } else if (pushed()) {
+      wi = pushed();
+      pushed_ = 0; // must be zero before callback is done!
+    } else if (modal() && wi != modal()) return 0;
+    int r = send(e, wi, window);
+    fl_fix_focus();
+    return r;}
+
+  case fltk3::UNFOCUS:
+    window = 0;
+  case fltk3::FOCUS:
+    fl_xfocus = window;
+    fl_fix_focus();
+    return 1;
+
+  case fltk3::KEYUP:
+    // Send the key-up to the current focus widget. This is not
+    // always the same widget that received the corresponding
+    // fltk3::KEYBOARD event because focus may have changed.
+    // Sending the KEYUP to the right KEYDOWN is possible, but
+    // would require that we track the KEYDOWN for every possible 
+    // key stroke (users may hold down multiple keys!) and then 
+    // make sure that the widget still exists before sending
+    // a KEYUP there. I believe that the current solution is
+    // "close enough".
+    for (wi = grab() ? grab() : focus(); wi; wi = wi->parent())
+      if (send(fltk3::KEYUP, wi, window)) return 1;
+    return 0;
+
+  case fltk3::KEYBOARD:
+#ifdef DEBUG
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
+#endif // DEBUG
+
+    fltk3::Tooltip::enter((fltk3::Widget*)0);
+
+    fl_xfocus = window; // this should not happen!  But maybe it does:
+
+    // Try it as keystroke, sending it to focus and all parents:
+    for (wi = grab() ? grab() : focus(); wi; wi = wi->parent())
+      if (send(fltk3::KEYBOARD, wi, window)) return 1;
+
+    // recursive call to try shortcut:
+    if (handle(fltk3::SHORTCUT, window)) return 1;
+
+    // and then try a shortcut with the case of the text swapped, by
+    // changing the text and falling through to fltk3::SHORTCUT case:
+    {unsigned char* c = (unsigned char*)event_text(); // cast away const
+    if (!isalpha(*c)) return 0;
+    *c = isupper(*c) ? tolower(*c) : toupper(*c);}
+    e_number = e = fltk3::SHORTCUT;
+
+  case fltk3::SHORTCUT:
+    if (grab()) {wi = grab(); break;} // send it to grab window
+
+    // Try it as shortcut, sending to mouse widget and all parents:
+    wi = belowmouse();
+    if (!wi) {
+      wi = modal();
+      if (!wi) wi = window;
+    } else if (wi->window() != first_window()) {
+      if (send(fltk3::SHORTCUT, first_window(), first_window())) return 1;
+    }
+
+    for (; wi; wi = wi->parent()) {
+      if (send(fltk3::SHORTCUT, wi, wi->window())) return 1;
+    }
+
+    // try using add_handle() functions:
+    if (send_handlers(fltk3::SHORTCUT)) return 1;
+
+    // make Escape key close windows:
+    if (event_key()==fltk3::EscapeKey) {
+      wi = modal(); if (!wi) wi = window;
+      wi->do_callback();
+      return 1;
+    }
+
+    return 0;
+
+  case fltk3::ENTER:
+#ifdef DEBUG
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
+#endif // DEBUG
+
+    fl_xmousewin = window;
+    fl_fix_focus();
+    fltk3::Tooltip::enter(belowmouse());
+    return 1;
+
+  case fltk3::LEAVE:
+#ifdef DEBUG
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
+#endif // DEBUG
+
+    if (!pushed_) {
+      belowmouse(0);
+      fltk3::Tooltip::enter(0);
+    }
+    if (window == fl_xmousewin) {fl_xmousewin = 0; fl_fix_focus();}
+    return 1;
+
+  case fltk3::MOUSEWHEEL:
+    fl_xfocus = window; // this should not happen!  But maybe it does:
+
+    // Try sending it to the "grab" first
+    if (grab() && grab()!=modal() && grab()!=window) {
+      if (send(fltk3::MOUSEWHEEL, grab(), window)) return 1;
+    }
+    // Now try sending it to the "modal" window
+    if (modal()) {
+      send(fltk3::MOUSEWHEEL, modal(), window);
+      return 1;
+    }
+    // Finally try sending it to the window, the event occured in
+    if (send(fltk3::MOUSEWHEEL, window, window)) return 1;
+  default:
+    break;
+  }
+  if (wi && send(e, wi, window)) {
+    dnd_flag = 0;
+    return 1;
+  }
+  dnd_flag = 0;
+  return send_handlers(e);
+}
+
+////////////////////////////////////////////////////////////////
+// hide() destroys the X window, it does not do unmap!
+
+#if !defined(WIN32) && USE_XFT
+extern void fl_destroy_xft_draw(Window);
+#endif
+
+void fltk3::Window::hide() {
+  clear_visible();
+
+  if (!shown()) return;
+
+  // remove from the list of windows:
+  Fl_X* ip = i;
+  Fl_X** pp = &Fl_X::first;
+  for (; *pp != ip; pp = &(*pp)->next) if (!*pp) return;
+  *pp = ip->next;
+#ifdef __APPLE__
+  ip->unlink();
+  // MacOS X manages a single pointer per application. Make sure that hiding
+  // a toplevel window will not leave us with some random pointer shape, or
+  // worst case, an invisible pointer
+  if (!parent()) cursor(fltk3::CURSOR_DEFAULT);
+#endif
+  i = 0;
+
+  // recursively remove any subwindows:
+  for (Fl_X *wi = Fl_X::first; wi;) {
+    fltk3::Window* W = wi->w;
+    if (W->window() == this) {
+      W->hide();
+      W->set_visible();
+      wi = Fl_X::first;
+    } else wi = wi->next;
+  }
+
+  if (this == fltk3::modal_) { // we are closing the modal window, find next one:
+    fltk3::Window* W;
+    for (W = fltk3::first_window(); W; W = fltk3::next_window(W))
+      if (W->modal()) break;
+    fltk3::modal_ = W;
+  }
+
+  // Make sure no events are sent to this window:
+  fl_throw_focus(this);
+  handle(fltk3::HIDE);
+
+#if defined(WIN32)
+  // this little trick keeps the current clipboard alive, even if we are about
+  // to destroy the window that owns the selection.
+  if (GetClipboardOwner()==ip->xid) {
+    fltk3::Window *w1 = fltk3::first_window();
+    if (w1 && OpenClipboard(fl_xid(w1))) {
+      EmptyClipboard();
+      SetClipboardData(CF_TEXT, NULL);
+      CloseClipboard();
+    }
+  }
+  // Send a message to myself so that I'll get out of the event loop...
+  PostMessage(ip->xid, WM_APP, 0, 0);
+  if (ip->private_dc) fl_release_dc(ip->xid, ip->private_dc);
+    if (ip->xid == fl_window && fl_gc) {
+      fl_release_dc(fl_window, fl_gc);
+      fl_window = (HWND)-1;
+      fl_gc = 0;
+# ifdef FLTK_USE_CAIRO
+      if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0);
+# endif
+    }
+#elif defined(__APPLE_QUARTZ__)
+  Fl_X::q_release_context(ip);
+  if ( ip->xid == fl_window && !parent() )
+    fl_window = 0;
+#endif
+
+  if (ip->region) XDestroyRegion(ip->region);
+
+#if defined(USE_X11)
+# if USE_XFT
+  fl_destroy_xft_draw(ip->xid);
+# endif
+  // this test makes sure ip->xid has not been destroyed already
+  if (ip->xid) XDestroyWindow(fl_display, ip->xid);
+#elif defined(WIN32)
+  // this little trickery seems to avoid the popup window stacking problem
+  HWND p = GetForegroundWindow();
+  if (p==GetParent(ip->xid)) {
+    ShowWindow(ip->xid, SW_HIDE);
+    ShowWindow(p, SW_SHOWNA);
+  }
+  XDestroyWindow(fl_display, ip->xid);
+#elif defined(__APPLE_QUARTZ__)
+  ip->destroy();
+#else
+# error unsupported platform
+#endif
+  
+#ifdef WIN32
+  // Try to stop the annoying "raise another program" behavior
+  if (non_modal() && fltk3::first_window() && fltk3::first_window()->shown())
+    fltk3::first_window()->show();
+#endif
+  delete ip;
+}
+
+fltk3::Window::~Window() {
+  hide();
+  if (xclass_) {
+    free(xclass_);
+  }
+}
+
+// fltk3::SHOW and fltk3::HIDE are called whenever the visibility of this widget
+// or any parent changes.  We must correctly map/unmap the system's window.
+
+// For top-level windows it is assumed the window has already been
+// mapped or unmapped!!!  This is because this should only happen when
+// fltk3::Window::show() or fltk3::Window::hide() is called, or in response to
+// iconize/deiconize events from the system.
+
+int fltk3::Window::handle(int ev)
+{
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(ev), Handle)
+  if (parent()) {
+    switch (ev) {
+    case fltk3::SHOW:
+      if (!shown()) show();
+      else {
+#if defined(USE_X11) || defined(WIN32)
+        XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless
+#elif defined(__APPLE_QUARTZ__)
+	i->map();
+#else
+# error unsupported platform
+#endif // __APPLE__
+      }
+      break;
+    case fltk3::HIDE:
+      if (shown()) {
+	// Find what really turned invisible, if it was a parent window
+	// we do nothing.  We need to avoid unnecessary unmap calls
+	// because they cause the display to blink when the parent is
+	// remapped.  However if this or any intermediate non-window
+	// widget has really had hide() called directly on it, we must
+	// unmap because when the parent window is remapped we don't
+	// want to reappear.
+	if (visible()) {
+	 fltk3::Widget* p = parent(); for (;p->visible();p = p->parent()) {}
+	 if (p->type() >= fltk3::WINDOW) break; // don't do the unmap
+	}
+#if defined(USE_X11) || defined(WIN32)
+	XUnmapWindow(fl_display, fl_xid(this));
+#elif defined(__APPLE_QUARTZ__)
+	i->unmap();
+#else
+# error platform unsupported
+#endif
+      }
+      break;
+    }
+//  } else if (ev == fltk3::FOCUS || ev == fltk3::UNFOCUS) {
+//    fltk3::Tooltip::exit(fltk3::Tooltip::current());
+  }
+
+  return Group::handle(ev);
+}
+
+////////////////////////////////////////////////////////////////
+// Back compatibility cut & paste functions for fltk 1.1 only:
+
+/** Back-compatibility only: The single-argument call can be used to
+    move the selection to another widget or to set the owner to
+    NULL, without changing the actual text of the
+    selection. fltk3::SELECTIONCLEAR is sent to the previous
+    selection owner, if any.
+    
+    <i>Copying the buffer every time the selection is changed is
+    obviously wasteful, especially for large selections.  An interface will
+    probably be added in a future version to allow the selection to be made
+    by a callback function.  The current interface will be emulated on top
+    of this.</i>
+*/
+void fltk3::selection_owner(fltk3::Widget *owner) {selection_owner_ = owner;}
+
+/**
+  Changes the current selection.  The block of text is
+  copied to an internal buffer by FLTK (be careful if doing this in
+  response to an fltk3::PASTE as this \e may be the same buffer
+  returned by event_text()).  The selection_owner()
+  widget is set to the passed owner.
+*/
+void fltk3::selection(fltk3::Widget &owner, const char* text, int len) {
+  selection_owner_ = &owner;
+  fltk3::copy(text, len, 0);
+}
+
+/** Backward compatibility only.
+  This calls fltk3::paste(receiver, 0);
+  \see fltk3::paste(fltk3::Widget &receiver, int clipboard)
+*/
+void fltk3::paste(fltk3::Widget &receiver) {
+  fltk3::paste(receiver, 0);
+}
+
+////////////////////////////////////////////////////////////////
+
+#include <fltk3/draw.h>
+
+void fltk3::Widget::redraw() {
+  damage(fltk3::DAMAGE_ALL);
+}
+
+void fltk3::Widget::redraw_label() {
+  if (window()) {
+    if (box() == fltk3::NO_BOX) {
+      // Widgets with the fltk3::NO_BOX boxtype need a parent to
+      // redraw, since it is responsible for redrawing the
+      // background...
+      int X = x() > 0 ? x() - 1 : 0;
+      int Y = y() > 0 ? y() - 1 : 0;
+      window()->damage(fltk3::DAMAGE_ALL, X, Y, w() + 2, h() + 2);
+    }
+
+    if (align() && !(align() & fltk3::ALIGN_INSIDE) && window()->shown()) {
+      // If the label is not inside the widget, compute the location of
+      // the label and redraw the window within that bounding box...
+      int W = 0, H = 0;
+      label_.measure(W, H);
+      W += 5; // Add a little to the size of the label to cover overflow
+      H += 5;
+
+      // FIXME:
+      // This assumes that measure() returns the correct outline, which it does
+      // not in all possible cases of alignment combinedwith image and symbols.
+      switch (align() & 0x0f) {
+        case fltk3::ALIGN_TOP_LEFT:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x(), y()-H, W, H); break;
+        case fltk3::ALIGN_TOP:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+(w()-W)/2, y()-H, W, H); break;
+        case fltk3::ALIGN_TOP_RIGHT:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+w()-W, y()-H, W, H); break;
+        case fltk3::ALIGN_LEFT_TOP:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()-W, y(), W, H); break;
+        case fltk3::ALIGN_RIGHT_TOP:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+w(), y(), W, H); break;
+        case fltk3::ALIGN_LEFT:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()-W, y()+(h()-H)/2, W, H); break;
+        case fltk3::ALIGN_RIGHT:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+w(), y()+(h()-H)/2, W, H); break;
+        case fltk3::ALIGN_LEFT_BOTTOM:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()-W, y()+h()-H, W, H); break;
+        case fltk3::ALIGN_RIGHT_BOTTOM:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+w(), y()+h()-H, W, H); break;
+        case fltk3::ALIGN_BOTTOM_LEFT:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x(), y()+h(), W, H); break;
+        case fltk3::ALIGN_BOTTOM:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+(w()-W)/2, y()+h(), W, H); break;
+        case fltk3::ALIGN_BOTTOM_RIGHT:
+          window()->damage(fltk3::DAMAGE_EXPOSE, x()+w()-W, y()+h(), W, H); break;
+        default:
+          window()->damage(fltk3::DAMAGE_ALL); break;
+      }
+    } else {
+      // The label is inside the widget, so just redraw the widget itself...
+      damage(fltk3::DAMAGE_ALL);
+    }
+  }
+}
+
+void fltk3::Widget::damage(uchar fl) {
+  if (type() < fltk3::WINDOW) {
+    // damage only the rectangle covered by a child widget:
+    damage(fl, x(), y(), w(), h());
+  } else {
+    // damage entire window by deleting the region:
+    Fl_X* i = Fl_X::i((fltk3::Window*)this);
+    if (!i) return; // window not mapped, so ignore it
+    if (i->region) {XDestroyRegion(i->region); i->region = 0;}
+    damage_ |= fl;
+    fltk3::damage(fltk3::DAMAGE_CHILD);
+  }
+}
+
+void fltk3::Widget::damage(uchar fl, int X, int Y, int W, int H) {
+  fltk3::Widget* wi = this;
+  // mark all parent widgets between this and window with fltk3::DAMAGE_CHILD:
+  while (wi->type() < fltk3::WINDOW) {
+    wi->damage_ |= fl;
+    wi = wi->parent();
+    if (!wi) return;
+    fl = fltk3::DAMAGE_CHILD;
+  }
+  Fl_X* i = Fl_X::i((fltk3::Window*)wi);
+  if (!i) return; // window not mapped, so ignore it
+
+  // clip the damage to the window and quit if none:
+  if (X < 0) {W += X; X = 0;}
+  if (Y < 0) {H += Y; Y = 0;}
+  if (W > wi->w()-X) W = wi->w()-X;
+  if (H > wi->h()-Y) H = wi->h()-Y;
+  if (W <= 0 || H <= 0) return;
+
+  if (!X && !Y && W==wi->w() && H==wi->h()) {
+    // if damage covers entire window delete region:
+    wi->damage(fl);
+    return;
+  }
+
+  if (wi->damage()) {
+    // if we already have damage we must merge with existing region:
+    if (i->region) {
+#if defined(USE_X11)
+      XRectangle R;
+      R.x = X; R.y = Y; R.width = W; R.height = H;
+      XUnionRectWithRegion(&R, i->region, i->region);
+#elif defined(WIN32)
+      fltk3::Region R = XRectangleRegion(X, Y, W, H);
+      CombineRgn(i->region, i->region, R, RGN_OR);
+      XDestroyRegion(R);
+#elif defined(__APPLE_QUARTZ__)
+      CGRect arg = fl_cgrectmake_cocoa(X, Y, W, H);
+      int j; // don't add a rectangle totally inside the fltk3::Region
+      for(j = 0; j < i->region->count; j++) {
+        if(CGRectContainsRect(i->region->rects[j], arg)) break;
+      }
+      if( j >= i->region->count) {
+        i->region->rects = (CGRect*)realloc(i->region->rects, (++(i->region->count)) * sizeof(CGRect));
+        i->region->rects[i->region->count - 1] = arg;
+      }
+#else
+# error unsupported platform
+#endif
+    }
+    wi->damage_ |= fl;
+  } else {
+    // create a new region:
+    if (i->region) XDestroyRegion(i->region);
+    i->region = XRectangleRegion(X,Y,W,H);
+    wi->damage_ = fl;
+  }
+  fltk3::damage(fltk3::DAMAGE_CHILD);
+}
+void fltk3::Window::flush() {
+  make_current();
+//if (damage() == fltk3::DAMAGE_EXPOSE && can_boxcheat(box())) fl_boxcheat = this;
+  fltk3::clip_region(i->region); i->region = 0;
+  draw();
+}
+
+#ifdef WIN32
+#  include "Fl_win32.cxx"
+//#elif defined(__APPLE__)
+#endif
+
+//
+// The following methods allow callbacks to schedule the deletion of
+// widgets at "safe" times.
+//
+
+static int		num_dwidgets = 0, alloc_dwidgets = 0;
+static fltk3::Widget	**dwidgets = 0;
+
+/** 
+  Schedules a widget for deletion at the next call to the event loop.
+  Use this method to delete a widget inside a callback function.
+
+  To avoid early deletion of widgets, this function should be called
+  toward the end of a callback and only after any call to the event
+  loop (fltk3::wait(), fltk3::flush(), fltk3::check(), fltk3::ask(), etc.).
+
+  When deleting groups or windows, you must only delete the group or
+  window widget and not the individual child widgets.
+
+  \since FLTK 1.3 it is not necessary to remove widgets from their parent
+  groups or windows before calling this, because it will be done in the
+  widget's destructor, but it is not a failure to do this nevertheless.
+
+  \note In FLTK 1.1 you \b must remove widgets from their parent group
+  (or window) before deleting them.
+
+  \see fltk3::Widget::~Fl_Widget()
+*/
+void fltk3::delete_widget(fltk3::Widget *wi) {
+  if (!wi) return;
+
+  if (num_dwidgets >= alloc_dwidgets) {
+    fltk3::Widget	**temp;
+
+    temp = new fltk3::Widget *[alloc_dwidgets + 10];
+    if (alloc_dwidgets) {
+      memcpy(temp, dwidgets, alloc_dwidgets * sizeof(fltk3::Widget *));
+      delete[] dwidgets;
+    }
+
+    dwidgets = temp;
+    alloc_dwidgets += 10;
+  }
+
+  dwidgets[num_dwidgets] = wi;
+  num_dwidgets ++;
+}
+
+/** 
+    Deletes widgets previously scheduled for deletion.
+    
+    This is for internal use only. You should never call this directly.
+
+    fltk3::do_widget_deletion() is called from the FLTK event loop or whenever
+    you call fltk3::wait(). The previously scheduled widgets are deleted in the
+    same order they were scheduled by calling fltk3::delete_widget().
+
+    \see fltk3::delete_widget(fltk3::Widget *wi)
+*/
+void fltk3::do_widget_deletion() {
+  if (!num_dwidgets) return;
+
+  for (int i = 0; i < num_dwidgets; i ++)
+    delete dwidgets[i];
+
+  num_dwidgets = 0;
+}
+
+static fltk3::Widget ***widget_watch = 0;
+static int num_widget_watch = 0;
+static int max_widget_watch = 0;
+
+/**
+  Adds a widget pointer to the widget watch list.
+  
+  \note Internal use only, please use class fltk3::WidgetTracker instead.
+
+  This can be used, if it is possible that a widget might be deleted during
+  a callback or similar function. The widget pointer must be added to the
+  watch list before calling the callback. After the callback the widget
+  pointer can be queried, if it is NULL. \e If it is NULL, then the widget has been
+  deleted during the callback and must not be accessed anymore. If the widget
+  pointer is \e not NULL, then the widget has not been deleted and can be accessed
+  safely.
+
+  After accessing the widget, the widget pointer must be released from the
+  watch list by calling fltk3::release_widget_pointer().
+
+  Example for a button that is clicked (from its handle() method):
+  \code
+    fltk3::Widget *wp = this;		// save 'this' in a pointer variable
+    fltk3::watch_widget_pointer(wp);	// add the pointer to the watch list
+    set_changed();			// set the changed flag
+    do_callback();			// call the callback
+    if (!wp) {				// the widget has been deleted
+
+      // DO NOT ACCESS THE DELETED WIDGET !
+
+    } else {				// the widget still exists
+      clear_changed();			// reset the changed flag
+    }
+
+    fltk3::release_widget_pointer(wp);	// remove the pointer from the watch list
+   \endcode
+
+   This works, because all widgets call fltk3::clear_widget_pointer() in their
+   destructors.
+
+   \see fltk3::release_widget_pointer()
+   \see fltk3::clear_widget_pointer()
+
+   An easier and more convenient method to control widget deletion during
+   callbacks is to use the class fltk3::WidgetTracker with a local (automatic)
+   variable.
+
+   \see class fltk3::WidgetTracker
+*/
+void fltk3::watch_widget_pointer(fltk3::Widget *&w) 
+{
+  fltk3::Widget **wp = &w;
+  int i;
+  for (i=0; i<num_widget_watch; ++i) {
+    if (widget_watch[i]==wp) return;
+  }
+  if (num_widget_watch==max_widget_watch) {
+    max_widget_watch += 8;
+    widget_watch = (fltk3::Widget***)realloc(widget_watch, sizeof(fltk3::Widget**)*max_widget_watch);
+  }
+  widget_watch[num_widget_watch++] = wp;
+#ifdef DEBUG_WATCH
+  printf ("\nwatch_widget_pointer:   (%d/%d) %8p => %8p\n",
+    num_widget_watch,num_widget_watch,wp,*wp);
+  fflush(stdout);
+#endif // DEBUG_WATCH
+}
+
+/**
+  Releases a widget pointer from the watch list.
+
+  This is used to remove a widget pointer that has been added to the watch list
+  with fltk3::watch_widget_pointer(), when it is not needed anymore.
+  
+  \note Internal use only, please use class fltk3::WidgetTracker instead.
+
+  \see fltk3::watch_widget_pointer()
+*/
+void fltk3::release_widget_pointer(fltk3::Widget *&w)
+{
+  fltk3::Widget **wp = &w;
+  int i,j=0;
+  for (i=0; i<num_widget_watch; ++i) {
+    if (widget_watch[i]!=wp) {
+      if (j<i) widget_watch[j] = widget_watch[i]; // fill gap
+      j++;
+    }
+#ifdef DEBUG_WATCH
+    else { // found widget pointer
+      printf ("release_widget_pointer: (%d/%d) %8p => %8p\n",
+	i+1,num_widget_watch,wp,*wp);
+    }
+#endif //DEBUG_WATCH
+  }
+  num_widget_watch = j;
+#ifdef DEBUG_WATCH
+  printf ("                        num_widget_watch = %d\n\n",num_widget_watch);
+  fflush(stdout);
+#endif // DEBUG_WATCH
+  return;
+}
+/**
+  Clears a widget pointer \e in the watch list.
+
+  This is called when a widget is destroyed (by its destructor). You should never
+  call this directly.
+
+  \note Internal use only !
+
+  This method searches the widget watch list for pointers to the widget and
+  clears each pointer that points to it. Widget pointers can be added to the
+  widget watch list by calling fltk3::watch_widget_pointer() or by using the
+  helper class fltk3::WidgetTracker (recommended).
+
+  \see fltk3::watch_widget_pointer()
+  \see class fltk3::WidgetTracker
+*/
+void fltk3::clear_widget_pointer(fltk3::Widget const *w) 
+{
+  if (w==0L) return;
+  int i;
+  for (i=0; i<num_widget_watch; ++i) {
+    if (widget_watch[i] && *widget_watch[i]==w) {
+      *widget_watch[i] = 0L;
+    }
+  }
+}
+
+
+/**
+ \brief FLTK library options management.
+
+ This function needs to be documented in more detail. It can be used for more
+ optional settings, such as using a native file chooser instead of the FLTK one
+ wherever possible, disabling tooltips, disabling visible focus, disabling 
+ FLTK file chooser preview, etc. .
+
+ There should be a command line option interface.
+
+ There should be an application that manages options system wide, per user, and
+ per application.
+
+ \note As of FLTK 1.3.0, options can be managed within fluid, using the menu
+ <i>Edit/Global FLTK Settings</i>.
+
+ \param opt which option
+ \return true or false
+ \see enum fltk3::fltk3::Option
+ \see fltk3::option(fltk3::Option, bool)
+
+ \since FLTK 1.3.0
+ */ 
+bool fltk3::option(fltk3::Option opt)
+{
+  if (!options_read_) {
+    int tmp;
+    { // first, read the system wide preferences
+      fltk3::Preferences prefs(fltk3::Preferences::SYSTEM, "fltk.org", "fltk");
+      fltk3::Preferences opt_prefs(prefs, "options");
+      opt_prefs.get("ArrowFocus", tmp, 0);                      // default: off
+      options_[OPTION_ARROW_FOCUS] = tmp;
+      //opt_prefs.get("NativeFilechooser", tmp, 1);             // default: on
+      //options_[OPTION_NATIVE_FILECHOOSER] = tmp;
+      //opt_prefs.get("FilechooserPreview", tmp, 1);            // default: on
+      //options_[OPTION_FILECHOOSER_PREVIEW] = tmp;
+      opt_prefs.get("VisibleFocus", tmp, 1);                    // default: on
+      options_[OPTION_VISIBLE_FOCUS] = tmp;
+      opt_prefs.get("DNDText", tmp, 1);                         // default: on
+      options_[OPTION_DND_TEXT] = tmp;
+      opt_prefs.get("ShowTooltips", tmp, 1);                    // default: on
+      options_[OPTION_SHOW_TOOLTIPS] = tmp;
+    }
+    { // next, check the user preferences
+      // override system options only, if the option is set ( >= 0 )
+      fltk3::Preferences prefs(fltk3::Preferences::USER, "fltk.org", "fltk");
+      fltk3::Preferences opt_prefs(prefs, "options");
+      opt_prefs.get("ArrowFocus", tmp, -1); 
+      if (tmp >= 0) options_[OPTION_ARROW_FOCUS] = tmp;
+      //opt_prefs.get("NativeFilechooser", tmp, -1); 
+      //if (tmp >= 0) options_[OPTION_NATIVE_FILECHOOSER] = tmp;
+      //opt_prefs.get("FilechooserPreview", tmp, -1);
+      //if (tmp >= 0) options_[OPTION_FILECHOOSER_PREVIEW] = tmp;
+      opt_prefs.get("VisibleFocus", tmp, -1); 
+      if (tmp >= 0) options_[OPTION_VISIBLE_FOCUS] = tmp;
+      opt_prefs.get("DNDText", tmp, -1); 
+      if (tmp >= 0) options_[OPTION_DND_TEXT] = tmp;
+      opt_prefs.get("ShowTooltips", tmp, -1); 
+      if (tmp >= 0) options_[OPTION_SHOW_TOOLTIPS] = tmp;
+    }
+    { // now, if the developer has registered this app, we could as for per-application preferences
+    }
+    options_read_ = 1;
+  }
+  if (opt<0 || opt>=OPTION_LAST) 
+    return false;
+  return (bool)(options_[opt]!=0);
+}
+
+/**
+ \brief Override an option while the application is running.
+ 
+ This function does not change any system or user settings.
+ 
+ \param opt which option
+ \param val set to true or false
+ \see enum fltk3::fltk3::Option
+ \see bool fltk3::option(fltk3::Option)
+ */
+void fltk3::option(fltk3::Option opt, bool val)
+{
+  if (opt<0 || opt>=OPTION_LAST) 
+    return;
+  if (!options_read_) {
+    // first read this option, so we don't override our setting later
+    option(opt);
+  }
+  options_[opt] = val;
+}
+
+
+// Helper class fltk3::WidgetTracker
+
+/**
+  The constructor adds a widget to the watch list.
+*/
+fltk3::WidgetTracker::WidgetTracker(fltk3::Widget *wi) 
+{
+  wp_ = wi;
+  fltk3::watch_widget_pointer(wp_); // add pointer to watch list
+}
+
+/**
+  The destructor removes a widget from the watch list.
+*/
+fltk3::WidgetTracker::~WidgetTracker() 
+{
+  fltk3::release_widget_pointer(wp_); // remove pointer from watch list
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Adjuster.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Adjuster.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Adjuster.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,183 @@
+//
+// "$Id$"
+//
+// Adjuster widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Adjuster.h>
+#include <fltk3/Bitmap.h>
+#include <fltk3/draw.h>
+#include <fltk3/Wrapper.h>
+
+#include "fastarrow.h"
+static fltk3::Bitmap fastarrow(fastarrow_bits, fastarrow_width, fastarrow_height);
+#include "mediumarrow.h"
+static fltk3::Bitmap mediumarrow(mediumarrow_bits, mediumarrow_width, mediumarrow_height);
+#include "slowarrow.h"
+static fltk3::Bitmap slowarrow(slowarrow_bits, slowarrow_width, slowarrow_height);
+
+// changing the value does not change the appearance:
+void fltk3::Adjuster::value_damage() {}
+
+void fltk3::Adjuster::draw() {
+  int dx, dy, W, H;
+  if (w()>=h()) {
+    dx = W = w()/3;
+    dy = 0; H = h();
+  } else {
+    dx = 0; W = w();
+    dy = H = h()/3;
+  }
+  draw_box(drag==1?fltk3::DOWN_BOX:box(), x(),  y()+2*dy, W, H, color());
+  draw_box(drag==2?fltk3::DOWN_BOX:box(), x()+dx, y()+dy, W, H, color());
+  draw_box(drag==3?fltk3::DOWN_BOX:box(), x()+2*dx,  y(), W, H, color());
+  if (active_r())
+    fltk3::color(selection_color());
+  else
+    fltk3::color(fltk3::inactive(selection_color()));
+  fastarrow.draw(x()+(W-fastarrow_width)/2,
+		 y()+2*dy+(H-fastarrow_height)/2, W, H);
+  mediumarrow.draw(x()+dx+(W-mediumarrow_width)/2,
+		   y()+dy+(H-mediumarrow_height)/2, W, H);
+  slowarrow.draw(x()+2*dx+(W-slowarrow_width)/2,
+		 y()+(H-slowarrow_width)/2, W, H);
+  if (fltk3::focus() == this) draw_focus();
+}
+
+int fltk3::Adjuster::handle(int event) {
+  double v;
+  int delta;
+  int mx = fltk3::event_x();
+  // fltk3::WidgetTracker wp(this);
+  switch (event) {
+    case fltk3::PUSH:
+      if (fltk3::visible_focus()) fltk3::focus(this);
+      ix = mx;
+      if (w()>=h())
+	drag = 3*(mx-x())/w() + 1;
+      else
+	drag = 3-3*(fltk3::event_y()-y()-1)/h();
+      { fltk3::WidgetTracker wp(this);
+	handle_push();
+	if (wp.deleted()) return 1;
+      }
+      redraw();
+      return 1;
+    case fltk3::DRAG:
+      if (w() >= h()) {
+	delta = x()+(drag-1)*w()/3;	// left edge of button
+	if (mx < delta)
+	  delta = mx-delta;
+	else if (mx > (delta+w()/3)) // right edge of button
+	  delta = mx-delta-w()/3;
+	else
+	  delta = 0;
+      } else {
+	if (mx < x())
+	  delta = mx-x();
+	else if (mx > (x()+w()))
+	  delta = mx-x()-w();
+	else
+	  delta = 0;
+      }
+      switch (drag) {
+	case 3: v = increment(previous_value(), delta); break;
+	case 2: v = increment(previous_value(), delta*10); break;
+	default:v = increment(previous_value(), delta*100); break;
+      }
+      handle_drag(soft() ? softclamp(v) : clamp(v));
+      return 1;
+    case fltk3::RELEASE:
+      if (fltk3::event_is_click()) { // detect click but no drag
+	if (fltk3::event_state()&0xF0000) delta = -10;
+	else delta = 10;
+	switch (drag) {
+	  case 3: v = increment(previous_value(), delta); break;
+	  case 2: v = increment(previous_value(), delta*10); break;
+	  default:v = increment(previous_value(), delta*100); break;
+	}
+	fltk3::WidgetTracker wp(this);
+	handle_drag(soft() ? softclamp(v) : clamp(v));
+	if (wp.deleted()) return 1;
+      }
+      drag = 0;
+      redraw();
+      handle_release();
+      return 1;
+    case fltk3::KEYBOARD :
+      switch (fltk3::event_key()) {
+	case fltk3::UpKey:
+          if (w() > h()) return 0;
+	  handle_drag(clamp(increment(value(),-1)));
+	  return 1;
+	case fltk3::DownKey:
+          if (w() > h()) return 0;
+	  handle_drag(clamp(increment(value(),1)));
+	  return 1;
+	case fltk3::LeftKey:
+          if (w() < h()) return 0;
+	  handle_drag(clamp(increment(value(),-1)));
+	  return 1;
+	case fltk3::RightKey:
+          if (w() < h()) return 0;
+	  handle_drag(clamp(increment(value(),1)));
+	  return 1;
+	default:
+          return 0;
+      }
+      // break not required because of switch...
+
+    case fltk3::FOCUS:
+    case fltk3::UNFOCUS:
+      if (fltk3::visible_focus()) {
+        redraw();
+        return 1;
+      } else return 0;
+
+    case fltk3::ENTER :
+    case fltk3::LEAVE :
+      return 1;
+  }
+  return 0;
+}
+
+/**
+  Creates a new fltk3::Adjuster widget using the given position,
+  size, and label string. It looks best if one of the dimensions is 3
+  times the other.
+  <P> Inherited destructor destroys the Valuator.
+*/
+fltk3::Adjuster::Adjuster(int X, int Y, int W, int H, const char* l)
+  : fltk3::Valuator(X, Y, W, H, l) {
+  box(fltk3::UP_BOX);
+  step(1, 10000);
+  selection_color(fltk3::SELECTION_COLOR);
+  drag = 0;
+  soft_ = 1;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Adjuster.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_BMP_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_BMP_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_BMP_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,495 @@
+//
+// "$Id$"
+//
+// fltk3::BMPImage routines.
+//
+// Copyright 1997-2010 by Easy Software Products.
+// Image support by Matthias Melcher, Copyright 2000-2009.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::BMPImage::fltk3::BMPImage() - Load a BMP image file.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/BMPImage.h>
+#include <fltk3/utf8.h>
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+//
+// BMP definitions...
+//
+
+#ifndef BI_RGB
+#  define BI_RGB       0             // No compression - straight BGR data
+#  define BI_RLE8      1             // 8-bit run-length compression
+#  define BI_RLE4      2             // 4-bit run-length compression
+#  define BI_BITFIELDS 3             // RGB bitmap with RGB masks
+#endif // !BI_RGB
+
+
+//
+// Local functions...
+//
+
+static int		read_long(FILE *fp);
+static unsigned short	read_word(FILE *fp);
+static unsigned int	read_dword(FILE *fp);
+/** 
+  The constructor loads the named BMP image from the given bmp filename.  
+  <P>The inherited destructor free all memory and server resources that are used by
+  the image.
+  <P>The destructor free all memory and server resources that are used by
+  the image
+*/
+fltk3::BMPImage::BMPImage(const char *bmp) // I - File to read
+  : fltk3::RGBImage(0,0,0) {
+  FILE		*fp;		// File pointer
+  int		info_size,	// Size of info header
+		depth,		// Depth of image (bits)
+		bDepth = 3,	// Depth of image (bytes)
+		compression,	// Type of compression
+		colors_used,	// Number of colors used
+		x, y,		// Looping vars
+		color,		// Color of RLE pixel
+		repcount,	// Number of times to repeat
+		temp,		// Temporary color
+		align,		// Alignment bytes
+		dataSize,	// number of bytes in image data set
+		row_order,	// 1 = normal;  -1 = flipped row order
+		start_y,	// Beginning Y
+		end_y;		// Ending Y
+  long		offbits;	// Offset to image data
+  uchar		bit,		// Bit in image
+		byte;		// Byte in image
+  uchar		*ptr;		// Pointer into pixels
+  uchar		colormap[256][3];// Colormap
+  uchar		havemask;	// Single bit mask follows image data
+  int		use_5_6_5;	// Use 5:6:5 for R:G:B channels in 16 bit images
+
+
+  // Open the file...
+  if ((fp = fltk3::fopen(bmp, "rb")) == NULL) return;
+
+  // Get the header...
+  byte = (uchar)getc(fp);	// Check "BM" sync chars
+  bit  = (uchar)getc(fp);
+  if (byte != 'B' || bit != 'M') {
+    fclose(fp);
+    return;
+  }
+
+  read_dword(fp);		// Skip size
+  read_word(fp);		// Skip reserved stuff
+  read_word(fp);
+  offbits = (long)read_dword(fp);// Read offset to image data
+
+  // Then the bitmap information...
+  info_size = read_dword(fp);
+
+//  printf("offbits = %ld, info_size = %d\n", offbits, info_size);
+
+  havemask  = 0;
+  row_order = -1;
+  use_5_6_5 = 0;
+
+  if (info_size < 40) {
+    // Old Windows/OS2 BMP header...
+    w(read_word(fp));
+    h(read_word(fp));
+    read_word(fp);
+    depth = read_word(fp);
+    compression = BI_RGB;
+    colors_used = 0;
+
+    repcount = info_size - 12;
+  } else {
+    // New BMP header...
+    w(read_long(fp));
+    // If the height is negative, the row order is flipped
+    temp = read_long(fp);
+    if (temp < 0) row_order = 1;
+    h(abs(temp));
+    read_word(fp);
+    depth = read_word(fp);
+    compression = read_dword(fp);
+    dataSize = read_dword(fp);
+    read_long(fp);
+    read_long(fp);
+    colors_used = read_dword(fp);
+    read_dword(fp);
+
+    repcount = info_size - 40;
+
+    if (!compression && depth>=8 && w()>32/depth) {
+      int Bpp = depth/8;
+      int maskSize = (((w()*Bpp+3)&~3)*h()) + (((((w()+7)/8)+3)&~3)*h());
+      if (maskSize==2*dataSize) {
+        havemask = 1;
+	h(h()/2);
+	bDepth = 4;
+      }
+    }
+  }
+
+//  printf("w() = %d, h() = %d, depth = %d, compression = %d, colors_used = %d, repcount = %d\n",
+//         w(), h(), depth, compression, colors_used, repcount);
+
+  // Skip remaining header bytes...
+  while (repcount > 0) {
+    getc(fp);
+    repcount --;
+  }
+
+  // Check header data...
+  if (!w() || !h() || !depth) {
+    fclose(fp);
+    return;
+  }
+
+  // Get colormap...
+  if (colors_used == 0 && depth <= 8)
+    colors_used = 1 << depth;
+
+  for (repcount = 0; repcount < colors_used; repcount ++) {
+    // Read BGR color...
+    if (fread(colormap[repcount], 1, 3, fp)==0) { /* ignore */ }
+
+    // Skip pad byte for new BMP files...
+    if (info_size > 12) getc(fp);
+  }
+
+  // Read first dword of colormap. It tells us if 5:5:5 or 5:6:5 for 16 bit
+  if (depth == 16)
+    use_5_6_5 = (read_dword(fp) == 0xf800);
+
+  // Set byte depth for RGBA images
+  if (depth == 32)
+    bDepth=4;
+
+  // Setup image and buffers...
+  d(bDepth);
+  if (offbits) fseek(fp, offbits, SEEK_SET);
+
+  array = new uchar[w() * h() * d()];
+  alloc_array = 1;
+
+  // Read the image data...
+  color = 0;
+  repcount = 0;
+  align = 0;
+  byte  = 0;
+  temp  = 0;
+
+  if (row_order < 0) {
+    start_y = h() - 1;
+    end_y   = -1;
+  } else {
+    start_y = 0;
+    end_y   = h();
+  }
+
+  for (y = start_y; y != end_y; y += row_order) {
+    ptr = (uchar *)array + y * w() * d();
+
+    switch (depth)
+    {
+      case 1 : // Bitmap
+          for (x = w(), bit = 128; x > 0; x --) {
+	    if (bit == 128) byte = (uchar)getc(fp);
+
+	    if (byte & bit) {
+	      *ptr++ = colormap[1][2];
+	      *ptr++ = colormap[1][1];
+	      *ptr++ = colormap[1][0];
+	    } else {
+	      *ptr++ = colormap[0][2];
+	      *ptr++ = colormap[0][1];
+	      *ptr++ = colormap[0][0];
+	    }
+
+	    if (bit > 1)
+	      bit >>= 1;
+	    else
+	      bit = 128;
+	  }
+
+          // Read remaining bytes to align to 32 bits...
+	  for (temp = (w() + 7) / 8; temp & 3; temp ++) {
+	    getc(fp);
+	  }
+          break;
+
+      case 4 : // 16-color
+          for (x = w(), bit = 0xf0; x > 0; x --) {
+	    // Get a new repcount as needed...
+	    if (repcount == 0) {
+              if (compression != BI_RLE4) {
+		repcount = 2;
+		color = -1;
+              } else {
+		while (align > 0) {
+	          align --;
+		  getc(fp);
+        	}
+
+		if ((repcount = getc(fp)) == 0) {
+		  if ((repcount = getc(fp)) == 0) {
+		    // End of line...
+                    x ++;
+		    continue;
+		  } else if (repcount == 1) {
+                    // End of image...
+		    break;
+		  } else if (repcount == 2) {
+		    // Delta...
+		    repcount = getc(fp) * getc(fp) * w();
+		    color = 0;
+		  } else {
+		    // Absolute...
+		    color = -1;
+		    align = ((4 - (repcount & 3)) / 2) & 1;
+		  }
+		} else {
+	          color = getc(fp);
+		}
+	      }
+	    }
+
+            // Get a new color as needed...
+	    repcount --;
+
+	    // Extract the next pixel...
+            if (bit == 0xf0) {
+	      // Get the next color byte as needed...
+              if (color < 0) temp = getc(fp);
+	      else temp = color;
+
+              // Copy the color value...
+	      *ptr++ = colormap[(temp >> 4) & 15][2];
+	      *ptr++ = colormap[(temp >> 4) & 15][1];
+	      *ptr++ = colormap[(temp >> 4) & 15][0];
+
+	      bit  = 0x0f;
+	    } else {
+	      bit  = 0xf0;
+
+              // Copy the color value...
+	      *ptr++ = colormap[temp & 15][2];
+	      *ptr++ = colormap[temp & 15][1];
+	      *ptr++ = colormap[temp & 15][0];
+	    }
+
+	  }
+
+	  if (!compression) {
+            // Read remaining bytes to align to 32 bits...
+	    for (temp = (w() + 1) / 2; temp & 3; temp ++) {
+	      getc(fp);
+	    }
+	  }
+          break;
+
+      case 8 : // 256-color
+          for (x = w(); x > 0; x --) {
+	    // Get a new repcount as needed...
+            if (compression != BI_RLE8) {
+	      repcount = 1;
+	      color = -1;
+            }
+
+	    if (repcount == 0) {
+	      while (align > 0) {
+	        align --;
+		getc(fp);
+              }
+
+	      if ((repcount = getc(fp)) == 0) {
+		if ((repcount = getc(fp)) == 0) {
+		  // End of line...
+                  x ++;
+		  continue;
+		} else if (repcount == 1) {
+		  // End of image...
+		  break;
+		} else if (repcount == 2) {
+		  // Delta...
+		  repcount = getc(fp) * getc(fp) * w();
+		  color = 0;
+		} else {
+		  // Absolute...
+		  color = -1;
+		  align = (2 - (repcount & 1)) & 1;
+		}
+	      } else {
+	        color = getc(fp);
+              }
+            }
+
+            // Get a new color as needed...
+            if (color < 0) temp = getc(fp);
+	    else temp = color;
+
+            repcount --;
+
+            // Copy the color value...
+	    *ptr++ = colormap[temp][2];
+	    *ptr++ = colormap[temp][1];
+	    *ptr++ = colormap[temp][0];
+	    if (havemask) ptr++;
+	  }
+
+	  if (!compression) {
+            // Read remaining bytes to align to 32 bits...
+	    for (temp = w(); temp & 3; temp ++) {
+	      getc(fp);
+	    }
+	  }
+          break;
+
+      case 16 : // 16-bit 5:5:5 or 5:6:5 RGB
+          for (x = w(); x > 0; x --, ptr += bDepth) {
+	    uchar b = getc(fp), a = getc(fp) ;
+	    if (use_5_6_5) {
+		ptr[2] = (uchar)(( b << 3 ) & 0xf8);
+		ptr[1] = (uchar)(((a << 5) & 0xe0) | ((b >> 3) & 0x1c));
+		ptr[0] = (uchar)(a & 0xf8);
+	    } else {
+		ptr[2] = (uchar)((b << 3) & 0xf8);
+		ptr[1] = (uchar)(((a << 6) & 0xc0) | ((b >> 2) & 0x38));
+		ptr[0] = (uchar)((a<<1) & 0xf8);
+	    }
+	  }
+
+          // Read remaining bytes to align to 32 bits...
+	  for (temp = w() * 2; temp & 3; temp ++) {
+	    getc(fp);
+	  }
+          break;
+
+      case 24 : // 24-bit RGB
+          for (x = w(); x > 0; x --, ptr += bDepth) {
+	    ptr[2] = (uchar)getc(fp);
+	    ptr[1] = (uchar)getc(fp);
+	    ptr[0] = (uchar)getc(fp);
+	  }
+
+          // Read remaining bytes to align to 32 bits...
+	  for (temp = w() * 3; temp & 3; temp ++) {
+	    getc(fp);
+	  }
+          break;
+		  
+      case 32 : // 32-bit RGBA
+         for (x = w(); x > 0; x --, ptr += bDepth) {
+            ptr[2] = (uchar)getc(fp);
+            ptr[1] = (uchar)getc(fp);
+            ptr[0] = (uchar)getc(fp);
+            ptr[3] = (uchar)getc(fp);
+          }
+          break;
+    }
+  }
+  
+  if (havemask) {
+    for (y = h() - 1; y >= 0; y --) {
+      ptr = (uchar *)array + y * w() * d() + 3;
+      for (x = w(), bit = 128; x > 0; x --, ptr+=bDepth) {
+	if (bit == 128) byte = (uchar)getc(fp);
+	if (byte & bit)
+	  *ptr = 0;
+	else
+	  *ptr = 255;
+	if (bit > 1)
+	  bit >>= 1;
+	else
+	  bit = 128;
+      }
+      // Read remaining bytes to align to 32 bits...
+      for (temp = (w() + 7) / 8; temp & 3; temp ++)
+	getc(fp);
+    }
+  }
+
+  // Close the file and return...
+  fclose(fp);
+}
+
+
+//
+// 'read_word()' - Read a 16-bit unsigned integer.
+//
+
+static unsigned short	// O - 16-bit unsigned integer
+read_word(FILE *fp) {	// I - File to read from
+  unsigned char b0, b1;	// Bytes from file
+
+  b0 = (uchar)getc(fp);
+  b1 = (uchar)getc(fp);
+
+  return ((b1 << 8) | b0);
+}
+
+
+//
+// 'read_dword()' - Read a 32-bit unsigned integer.
+//
+
+static unsigned int		// O - 32-bit unsigned integer
+read_dword(FILE *fp) {		// I - File to read from
+  unsigned char b0, b1, b2, b3;	// Bytes from file
+
+  b0 = (uchar)getc(fp);
+  b1 = (uchar)getc(fp);
+  b2 = (uchar)getc(fp);
+  b3 = (uchar)getc(fp);
+
+  return ((((((b3 << 8) | b2) << 8) | b1) << 8) | b0);
+}
+
+
+//
+// 'read_long()' - Read a 32-bit signed integer.
+//
+
+static int			// O - 32-bit signed integer
+read_long(FILE *fp) {		// I - File to read from
+  unsigned char b0, b1, b2, b3;	// Bytes from file
+
+  b0 = (uchar)getc(fp);
+  b1 = (uchar)getc(fp);
+  b2 = (uchar)getc(fp);
+  b3 = (uchar)getc(fp);
+
+  return ((int)(((((b3 << 8) | b2) << 8) | b1) << 8) | b0);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_BMP_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Bitmap.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Bitmap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Bitmap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,482 @@
+//
+// "$Id$"
+//
+// Bitmap drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/** \fn fltk3::Bitmap::fltk3::Bitmap(const char *array, int W, int H)
+  The constructors create a new bitmap from the specified bitmap data.*/
+
+/** \fn fltk3::Bitmap::fltk3::Bitmap(const unsigned char *array, int W, int H)
+  The constructors create a new bitmap from the specified bitmap data.*/
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+#include <fltk3/Widget.h>
+#include <fltk3/MenuItem.h>
+#include <fltk3/Bitmap.h>
+#include <fltk3/Printer.h>
+#include "flstring.h"
+
+#if defined(__APPLE_QUARTZ__)
+
+
+fltk3::Bitmask fl_create_bitmask(int w, int h, const uchar *array) {
+  static uchar reverse[16] =    /* Bit reversal lookup table */
+    { 0x00, 0x88, 0x44, 0xcc, 0x22, 0xaa, 0x66, 0xee, 
+      0x11, 0x99, 0x55, 0xdd, 0x33, 0xbb, 0x77, 0xff };
+  int rowBytes = (w+7)>>3 ;
+  uchar *bmask = (uchar*)malloc(rowBytes*h), *dst = bmask;
+  const uchar *src = array;
+  for ( int i=rowBytes*h; i>0; i--,src++ ) {
+    *dst++ = ((reverse[*src & 0x0f] & 0xf0) | (reverse[(*src >> 4) & 0x0f] & 0x0f))^0xff;
+  }
+  CGDataProviderRef srcp = CGDataProviderCreateWithData( 0L, bmask, rowBytes*h, 0L);
+  CGImageRef id_ = CGImageMaskCreate( w, h, 1, 1, rowBytes, srcp, 0L, false);
+  CGDataProviderRelease(srcp);
+  return (fltk3::Bitmask)id_;
+}
+void fl_delete_bitmask(fltk3::Bitmask bm) {
+  if (bm) CGImageRelease((CGImageRef)bm);
+}
+
+
+#elif defined(WIN32) // Windows bitmask functions...
+
+
+// 'fl_create_bitmap()' - Create a 1-bit bitmap for drawing...
+static fltk3::Bitmask fl_create_bitmap(int w, int h, const uchar *data) {
+  // we need to pad the lines out to words & swap the bits
+  // in each byte.
+  int w1 = (w+7)/8;
+  int w2 = ((w+15)/16)*2;
+  uchar* newarray = new uchar[w2*h];
+  const uchar* src = data;
+  uchar* dest = newarray;
+  fltk3::Bitmask bm;
+  static uchar reverse[16] =	/* Bit reversal lookup table */
+  	      { 0x00, 0x88, 0x44, 0xcc, 0x22, 0xaa, 0x66, 0xee,
+		0x11, 0x99, 0x55, 0xdd, 0x33, 0xbb, 0x77, 0xff };
+
+  for (int y=0; y < h; y++) {
+    for (int n = 0; n < w1; n++, src++)
+      *dest++ = (uchar)((reverse[*src & 0x0f] & 0xf0) |
+	                (reverse[(*src >> 4) & 0x0f] & 0x0f));
+    dest += w2-w1;
+  }
+
+  bm = CreateBitmap(w, h, 1, 1, newarray);
+
+  delete[] newarray;
+
+  return bm;
+}
+
+// 'fl_create_bitmask()' - Create an N-bit bitmap for masking...
+fltk3::Bitmask fl_create_bitmask(int w, int h, const uchar *data) {
+  // this won't work when the user changes display mode during run or
+  // has two screens with differnet depths
+  fltk3::Bitmask bm;
+  static uchar hiNibble[16] =
+  { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+    0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0 };
+  static uchar loNibble[16] =
+  { 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e,
+    0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f };
+  int np  = GetDeviceCaps(fl_gc, PLANES);	//: was always one on sample machines
+  int bpp = GetDeviceCaps(fl_gc, BITSPIXEL);//: 1,4,8,16,24,32 and more odd stuff?
+  int Bpr = (bpp*w+7)/8;			//: bytes per row
+  int pad = Bpr&1, w1 = (w+7)/8, shr = ((w-1)&7)+1;
+  if (bpp==4) shr = (shr+1)/2;
+  uchar *newarray = new uchar[(Bpr+pad)*h];
+  uchar *dst = newarray;
+  const uchar *src = data;
+
+  for (int i=0; i<h; i++) {
+    // This is slooow, but we do it only once per pixmap
+    for (int j=w1; j>0; j--) {
+      uchar b = *src++;
+      if (bpp==1) {
+        *dst++ = (uchar)( hiNibble[b&15] ) | ( loNibble[(b>>4)&15] );
+      } else if (bpp==4) {
+        for (int k=(j==1)?shr:4; k>0; k--) {
+          *dst++ = (uchar)("\377\360\017\000"[b&3]);
+          b = b >> 2;
+        }
+      } else {
+        for (int k=(j==1)?shr:8; k>0; k--) {
+          if (b&1) {
+            *dst++=0;
+	    if (bpp>8) *dst++=0;
+            if (bpp>16) *dst++=0;
+	    if (bpp>24) *dst++=0;
+	  } else {
+	    *dst++=0xff;
+	    if (bpp>8) *dst++=0xff;
+	    if (bpp>16) *dst++=0xff;
+	    if (bpp>24) *dst++=0xff;
+	  }
+
+	  b = b >> 1;
+        }
+      }
+    }
+
+    dst += pad;
+  }
+
+  bm = CreateBitmap(w, h, np, bpp, newarray);
+  delete[] newarray;
+
+  return bm;
+}
+
+
+void fl_delete_bitmask(fltk3::Bitmask bm) {
+  DeleteObject((HGDIOBJ)bm);
+}
+
+
+#else // X11 bitmask functions
+
+
+fltk3::Bitmask fl_create_bitmask(int w, int h, const uchar *data) {
+  return XCreateBitmapFromData(fl_display, fl_window, (const char *)data,
+                               (w+7)&-8, h);
+}
+
+void fl_delete_bitmask(fltk3::Bitmask bm) {
+  fl_delete_offscreen((fltk3::Offscreen)bm);
+}
+
+
+#endif // __APPLE__
+
+
+// Create a 1-bit mask used for alpha blending
+fltk3::Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *array) {
+  fltk3::Bitmask bm;
+  int bmw = (w + 7) / 8;
+  uchar *bitmap = new uchar[bmw * h];
+  uchar *bitptr, bit;
+  const uchar *dataptr;
+  int x, y;
+  static uchar dither[16][16] = { // Simple 16x16 Floyd dither
+    { 0,   128, 32,  160, 8,   136, 40,  168,
+      2,   130, 34,  162, 10,  138, 42,  170 },
+    { 192, 64,  224, 96,  200, 72,  232, 104,
+      194, 66,  226, 98,  202, 74,  234, 106 },
+    { 48,  176, 16,  144, 56,  184, 24,  152,
+      50,  178, 18,  146, 58,  186, 26,  154 },
+    { 240, 112, 208, 80,  248, 120, 216, 88,
+      242, 114, 210, 82,  250, 122, 218, 90 },
+    { 12,  140, 44,  172, 4,   132, 36,  164,
+      14,  142, 46,  174, 6,   134, 38,  166 },
+    { 204, 76,  236, 108, 196, 68,  228, 100,
+      206, 78,  238, 110, 198, 70,  230, 102 },
+    { 60,  188, 28,  156, 52,  180, 20,  148,
+      62,  190, 30,  158, 54,  182, 22,  150 },
+    { 252, 124, 220, 92,  244, 116, 212, 84,
+      254, 126, 222, 94,  246, 118, 214, 86 },
+    { 3,   131, 35,  163, 11,  139, 43,  171,
+      1,   129, 33,  161, 9,   137, 41,  169 },
+    { 195, 67,  227, 99,  203, 75,  235, 107,
+      193, 65,  225, 97,  201, 73,  233, 105 },
+    { 51,  179, 19,  147, 59,  187, 27,  155,
+      49,  177, 17,  145, 57,  185, 25,  153 },
+    { 243, 115, 211, 83,  251, 123, 219, 91,
+      241, 113, 209, 81,  249, 121, 217, 89 },
+    { 15,  143, 47,  175, 7,   135, 39,  167,
+      13,  141, 45,  173, 5,   133, 37,  165 },
+    { 207, 79,  239, 111, 199, 71,  231, 103,
+      205, 77,  237, 109, 197, 69,  229, 101 },
+    { 63,  191, 31,  159, 55,  183, 23,  151,
+      61,  189, 29,  157, 53,  181, 21,  149 },
+    { 254, 127, 223, 95,  247, 119, 215, 87,
+      253, 125, 221, 93,  245, 117, 213, 85 }
+  };
+
+  // Generate a 1-bit "screen door" alpha mask; not always pretty, but
+  // definitely fast...  In the future we may be able to support things
+  // like the RENDER extension in XFree86, when available, to provide
+  // true RGBA-blended rendering.  See:
+  //
+  //     http://www.xfree86.org/~keithp/render/protocol.html
+  //
+  // for more info on XRender...
+  //
+  // MacOS already provides alpha blending support and has its own
+  // fl_create_alphamask() function...
+  memset(bitmap, 0, bmw * h);
+
+  for (dataptr = array + d - 1, y = 0; y < h; y ++, dataptr += ld)
+    for (bitptr = bitmap + y * bmw, bit = 1, x = 0; x < w; x ++, dataptr += d) {
+      if (*dataptr > dither[x & 15][y & 15])
+	*bitptr |= bit;
+      if (bit < 128) bit <<= 1;
+      else {
+	bit = 1;
+	bitptr ++;
+      }
+    }
+
+  bm = fl_create_bitmask(w, h, bitmap);
+  delete[] bitmap;
+
+  return (bm);
+}
+
+void fltk3::Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
+  fltk3::graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
+}
+
+static int start(fltk3::Bitmap *bm, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy, 
+		 int &X, int &Y, int &W, int &H)
+{
+  // account for current clip region (faster on Irix):
+  fltk3::clip_box(XP,YP,WP,HP,X,Y,W,H);
+  cx += X-XP; cy += Y-YP;
+  // clip the box down to the size of image, quit if empty:
+  if (cx < 0) {W += cx; X -= cx; cx = 0;}
+  if (cx+W > w) W = w-cx;
+  if (W <= 0) return 1;
+  if (cy < 0) {H += cy; Y -= cy; cy = 0;}
+  if (cy+H > h) H = h-cy;
+  if (H <= 0) return 1;
+  return 0;
+}
+
+#ifdef __APPLE__
+void fltk3::QuartzGraphicsDriver::draw(fltk3::Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  if (!bm->array) {
+    bm->draw_empty(XP, YP);
+    return;
+  }
+  if (start(bm, XP, YP, WP, HP, bm->w(), bm->h(), cx, cy, X, Y, W, H)) {
+    return;
+  }
+  if (!bm->id_) bm->id_ = fl_create_bitmask(bm->w(), bm->h(), bm->array);
+  if (bm->id_ && fl_gc) {
+    CGRect rect = { { X, Y }, { W, H } };
+    Fl_X::q_begin_image(rect, cx, cy, bm->w(), bm->h());
+    CGContextDrawImage(fl_gc, rect, (CGImageRef)bm->id_);
+    Fl_X::q_end_image();
+  }
+}
+
+#elif defined(WIN32)
+void fltk3::GDIGraphicsDriver::draw(fltk3::Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  if (!bm->array) {
+    bm->draw_empty(XP, YP);
+    return;
+  }
+  if (start(bm, XP, YP, WP, HP, bm->w(), bm->h(), cx, cy, X, Y, W, H)) {
+    return;
+  }
+  if (!bm->id_) bm->id_ = fl_create_bitmap(bm->w(), bm->h(), bm->array);
+  
+  typedef BOOL (WINAPI* fl_transp_func)  (HDC,int,int,int,int,HDC,int,int,int,int,UINT);
+  static fl_transp_func fl_TransparentBlt;
+  HDC tempdc;
+  int save;
+  BOOL use_print_algo = false;
+  if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) {
+    static HMODULE hMod = NULL;
+    if (!hMod) {
+      hMod = LoadLibrary("MSIMG32.DLL");
+      if (hMod) fl_TransparentBlt = (fl_transp_func)GetProcAddress(hMod, "TransparentBlt");
+    }
+    if (fl_TransparentBlt) use_print_algo = true;
+  }
+  if (use_print_algo) { // algorithm for bitmap output to Fl_GDI_Printer
+    fltk3::Offscreen tmp_id = fl_create_offscreen(W, H);
+    fl_begin_offscreen(tmp_id);
+    fltk3::Color save_c = fltk3::color(); // save bitmap's desired color
+    uchar r, g, b;
+    fltk3::get_color(save_c, r, g, b);
+    r = 255-r;
+    g = 255-g;
+    b = 255-b;
+    fltk3::Color background = fltk3::rgb_color(r, g, b); // a color very different from the bitmap's
+    fltk3::color(background);
+    fltk3::rectf(0,0,W,H); // use this color as offscreen background
+    fltk3::color(save_c); // back to bitmap's color
+    tempdc = CreateCompatibleDC(fl_gc);
+    save = SaveDC(tempdc);
+    SelectObject(tempdc, (HGDIOBJ)bm->id_);
+    SelectObject(fl_gc, fl_brush()); // use bitmap's desired color
+    BitBlt(fl_gc, 0, 0, W, H, tempdc, 0, 0, 0xE20746L); // draw bitmap to offscreen
+    fl_end_offscreen(); // offscreen data is in tmp_id
+    SelectObject(tempdc, (HGDIOBJ)tmp_id); // use offscreen data
+    // draw it to printer context with background color as transparent
+    fl_TransparentBlt(fl_gc, X,Y,W,H, tempdc, cx, cy, bm->w(), bm->h(), RGB(r, g, b) ); 
+    fl_delete_offscreen(tmp_id);
+  }
+  else { // algorithm for bitmap output to display
+    tempdc = CreateCompatibleDC(fl_gc);
+    save = SaveDC(tempdc);
+    SelectObject(tempdc, (HGDIOBJ)bm->id_);
+    SelectObject(fl_gc, fl_brush());
+    // secret bitblt code found in old MSWindows reference manual:
+    BitBlt(fl_gc, X, Y, W, H, tempdc, cx, cy, 0xE20746L);
+  }
+  RestoreDC(tempdc, save);
+  DeleteDC(tempdc);
+}  
+
+#else // Xlib
+void fltk3::XlibGraphicsDriver::draw(fltk3::Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  if (!bm->array) {
+    bm->draw_empty(XP, YP);
+    return;
+  }
+  if (start(bm, XP, YP, WP, HP, bm->w(), bm->h(), cx, cy, X, Y, W, H)) {
+    return;
+  }
+  if (!bm->id_) bm->id_ = fl_create_bitmask(bm->w(), bm->h(), bm->array);
+  
+  XSetStipple(fl_display, fl_gc, bm->id_);
+  int ox = X-cx; if (ox < 0) ox += bm->w();
+  int oy = Y-cy; if (oy < 0) oy += bm->h();
+  XSetTSOrigin(fl_display, fl_gc, ox, oy);
+  XSetFillStyle(fl_display, fl_gc, FillStippled);
+  XFillRectangle(fl_display, fl_window, fl_gc, X, Y, W, H);
+  XSetFillStyle(fl_display, fl_gc, FillSolid);
+}
+#endif
+
+/**
+  The destructor free all memory and server resources that are used by
+  the bitmap.
+*/
+fltk3::Bitmap::~Bitmap() {
+  uncache();
+  if (alloc_array) delete[] (uchar *)array;
+}
+
+void fltk3::Bitmap::uncache() {
+  if (id_) {
+#ifdef __APPLE_QUARTZ__
+    fl_delete_bitmask((fltk3::Bitmask)id_);
+#else
+    fl_delete_bitmask((fltk3::Offscreen)id_);
+#endif
+    id_ = 0;
+  }
+}
+
+void fltk3::Bitmap::label(fltk3::Widget* widget) {
+  widget->image(this);
+}
+
+void fltk3::Bitmap::label(fltk3::MenuItem* m) {
+  fltk3::set_labeltype(fltk3::IMAGE_LABEL, labeltype, measure);
+  m->label(fltk3::IMAGE_LABEL, (const char*)this);
+}
+
+fltk3::Image *fltk3::Bitmap::copy(int W, int H) {
+  fltk3::Bitmap	*new_image;	// New RGB image
+  uchar		*new_array;	// New array for image data
+
+  // Optimize the simple copy where the width and height are the same...
+  if (W == w() && H == h()) {
+    new_array = new uchar [H * ((W + 7) / 8)];
+    memcpy(new_array, array, H * ((W + 7) / 8));
+
+    new_image = new fltk3::Bitmap(new_array, W, H);
+    new_image->alloc_array = 1;
+
+    return new_image;
+  }
+  if (W <= 0 || H <= 0) return 0;
+
+  // OK, need to resize the image data; allocate memory and 
+  uchar		*new_ptr,	// Pointer into new array
+		new_bit,	// Bit for new array
+		old_bit;	// Bit for old array
+  const uchar	*old_ptr;	// Pointer into old array
+  int		sx, sy,		// Source coordinates
+		dx, dy,		// Destination coordinates
+		xerr, yerr,	// X & Y errors
+		xmod, ymod,	// X & Y moduli
+		xstep, ystep;	// X & Y step increments
+
+
+  // Figure out Bresenheim step/modulus values...
+  xmod   = w() % W;
+  xstep  = w() / W;
+  ymod   = h() % H;
+  ystep  = h() / H;
+
+  // Allocate memory for the new image...
+  new_array = new uchar [H * ((W + 7) / 8)];
+  new_image = new fltk3::Bitmap(new_array, W, H);
+  new_image->alloc_array = 1;
+
+  memset(new_array, 0, H * ((W + 7) / 8));
+
+  // Scale the image using a nearest-neighbor algorithm...
+  for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) {
+    for (dx = W, xerr = W, old_ptr = array + sy * ((w() + 7) / 8), sx = 0, new_bit = 1;
+	 dx > 0;
+	 dx --) {
+      old_bit = (uchar)(1 << (sx & 7));
+      if (old_ptr[sx / 8] & old_bit) *new_ptr |= new_bit;
+
+      if (new_bit < 128) new_bit <<= 1;
+      else {
+        new_bit = 1;
+	new_ptr ++;
+      }
+
+      sx   += xstep;
+      xerr -= xmod;
+
+      if (xerr <= 0) {
+	xerr += W;
+	sx ++;
+      }
+    }
+
+    if (new_bit > 1) new_ptr ++;
+
+    sy   += ystep;
+    yerr -= ymod;
+    if (yerr <= 0) {
+      yerr += H;
+      sy ++;
+    }
+  }
+
+  return new_image;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Bitmap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Box.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Box.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Box.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,47 @@
+//
+// "$Id$"
+//
+// Box widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/Widget.h>
+#include <fltk3/Box.h>
+#include <fltk3/Wrapper.h>
+
+
+void fltk3::Box::draw() {
+  draw_box();
+  draw_label();
+}
+
+
+int fltk3::Box::handle(int event) {
+  if (event == fltk3::ENTER || event == fltk3::LEAVE) return 1;
+  else return 0;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Box.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Browser.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Browser.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Browser.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,982 @@
+//
+// "$Id$"
+//
+// Browser widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Browser.h>
+#include <fltk3/draw.h>
+#include "flstring.h"
+#include <stdlib.h>
+#include <math.h>
+
+#if defined(FL_DLL)	// really needed for c'tors for MS VC++ only
+#include <fltk3/HoldBrowser.h>
+#include <fltk3/MultiBrowser.h>
+#include <fltk3/SelectBrowser.h>
+#endif
+
+// I modified this from the original Forms data to use a linked list
+// so that the number of items in the browser and size of those items
+// is unlimited. The only problem is that the old browser used an
+// index number to identify a line, and it is slow to convert from/to
+// a pointer. I use a cache of the last match to try to speed this up.
+
+// Also added the ability to "hide" a line. This sets its height to
+// zero, so the fltk3::Browser_ cannot pick it.
+
+#define SELECTED 1
+#define NOTDISPLAYED 2
+
+namespace fltk3 {
+  
+  // WARNING:
+  //       fltk3::FileChooser.cxx also has a definition of this structure (fltk3::BrowserLine_).
+  //       Changes to fltk3::BrowserLine_ *must* be reflected in fltk3::FileChooser.cxx as well.
+  //       This hack in fltk3::FileChooser should be solved.
+  //
+  struct BrowserLine_ {	// data is in a linked list of these
+    fltk3::BrowserLine_* prev;
+    fltk3::BrowserLine_* next;
+    void* data;
+    fltk3::Image* icon;
+    short length;		// sizeof(txt)-1, may be longer than string
+    char flags;		// selected, displayed
+    char txt[1];		// start of allocated array
+  };
+  
+}
+
+
+void fltk3::Browser::item_swap(void *a, void *b) { 
+  FLTK3_OBJECT_VCALLS_WRAPPER(item_swap(a, b), BrowserItemSwap) 
+  swap((fltk3::BrowserLine_*)a, (fltk3::BrowserLine_*)b); 
+}
+
+void *fltk3::Browser::item_at(int line) const { 
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_at(line), BrowserItemAt) 
+  return (void*)find_line(line);
+}
+
+/**
+  Returns the very first item in the list.
+  Example of use:
+  \code
+  // Walk the browser from beginning to end
+  for ( void *i=item_first(); i; i=item_next(i) ) {
+      printf("item label='%s'\n", item_text(i));
+  }
+  \endcode
+  \returns The first item, or NULL if list is empty.
+  \see item_first(), item_last(), item_next(), item_prev()
+*/
+void* fltk3::Browser::item_first() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_first(), BrowserItemFirst) 
+  return first;
+}
+
+/**
+  Returns the next item after \p item.
+  \param[in] item The 'current' item
+  \returns The next item after \p item, or NULL if there are none after this one.
+  \see item_first(), item_last(), item_next(), item_prev()
+*/
+void* fltk3::Browser::item_next(void* item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_next(item), BrowserItemNext) 
+  return ((fltk3::BrowserLine_*)item)->next;
+}
+
+/**
+  Returns the previous item before \p item.
+  \param[in] item The 'current' item
+  \returns The previous item before \p item, or NULL if there none before this one.
+  \see item_first(), item_last(), item_next(), item_prev()
+*/
+void* fltk3::Browser::item_prev(void* item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_prev(item), BrowserItemPrev) 
+  return ((fltk3::BrowserLine_*)item)->prev;
+}
+
+/**
+  Returns the very last item in the list.
+  Example of use:
+  \code
+  // Walk the browser in reverse, from end to start
+  for ( void *i=item_last(); i; i=item_prev(i) ) {
+      printf("item label='%s'\n", item_text(i));
+  }
+  \endcode
+  \returns The last item, or NULL if list is empty.
+  \see item_first(), item_last(), item_next(), item_prev()
+*/
+void* fltk3::Browser::item_last() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_last(), BrowserItemLast) 
+  return last;
+}
+
+/**
+  See if \p item is selected.
+  \param[in] item The item whose selection state is to be checked.
+  \returns 1 if selected, 0 if not.
+  \see select(), selected(), value(), item_select(), item_selected()
+*/
+int fltk3::Browser::item_selected(void* item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_selected(item), BrowserItemSelected)
+  return ((fltk3::BrowserLine_*)item)->flags&SELECTED;
+}
+/**
+  Change the selection state of \p item to the value \p val.
+  \param[in] item The item to be changed.
+  \param[in] val The new selection state: 1 selects, 0 de-selects.
+  \see select(), selected(), value(), item_select(), item_selected()
+*/
+void fltk3::Browser::item_select(void *item, int val) {
+  FLTK3_OBJECT_VCALLS_WRAPPER(item_select(item, val), BrowserItemSelect)
+  if (val) ((fltk3::BrowserLine_*)item)->flags |= SELECTED;
+  else     ((fltk3::BrowserLine_*)item)->flags &= ~SELECTED;
+}
+
+/**
+  Returns the label text for \p item.
+  \param[in] item The item whose label text is returned.
+  \returns The item's text string. (Can be NULL)
+*/
+const char *fltk3::Browser::item_text(void *item) const { 
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(const char *, item_text(item), BrowserItemText)
+  return ((fltk3::BrowserLine_*)item)->txt;
+}
+
+/**
+  Returns the item for specified \p line.
+
+  Note: This call is slow. It's fine for e.g. responding to user
+  clicks, but slow if called often, such as in a tight sorting loop.
+  Finding an item 'by line' involves a linear lookup on the internal
+  linked list. The performance hit can be significant if the browser's
+  contents is large, and the method is called often (e.g. during a sort).
+  If you're writing a subclass, use the protected methods item_first(),
+  item_next(), etc. to access the internal linked list more efficiently.
+
+  \param[in] line The line number of the item to return. (1 based)
+  \retval item that was found.
+  \retval NULL if line is out of range.
+  \see item_at(), find_line(), lineno()
+*/
+fltk3::BrowserLine_* fltk3::Browser::find_line(int line) const {
+  int n; fltk3::BrowserLine_* l;
+  if (line == cacheline) return cache;
+  if (cacheline && line > (cacheline/2) && line < ((cacheline+lines)/2)) {
+    n = cacheline; l = cache;
+  } else if (line <= (lines/2)) {
+    n = 1; l = first;
+  } else {
+    n = lines; l = last;
+  }
+  for (; n < line && l; n++) l = l->next;
+  for (; n > line && l; n--) l = l->prev;
+  ((fltk3::Browser*)this)->cacheline = line;
+  ((fltk3::Browser*)this)->cache = l;
+  return l;
+}
+
+/**
+  Returns line number corresponding to \p item, or zero if not found.
+  Caveat: See efficiency note in find_line().
+  \param[in] item The item to be found
+  \returns The line number of the item, or 0 if not found.
+  \see item_at(), find_line(), lineno()
+*/
+int fltk3::Browser::lineno(void *item) const {
+  fltk3::BrowserLine_* l = (fltk3::BrowserLine_*)item;
+  if (!l) return 0;
+  if (l == cache) return cacheline;
+  if (l == first) return 1;
+  if (l == last) return lines;
+  if (!cache) {
+    ((fltk3::Browser*)this)->cache = first;
+    ((fltk3::Browser*)this)->cacheline = 1;
+  }
+  // assume it is near cache, search both directions:
+  fltk3::BrowserLine_* b = cache->prev;
+  int bnum = cacheline-1;
+  fltk3::BrowserLine_* f = cache->next;
+  int fnum = cacheline+1;
+  int n = 0;
+  for (;;) {
+    if (b == l) {n = bnum; break;}
+    if (f == l) {n = fnum; break;}
+    if (b) {b = b->prev; bnum--;}
+    if (f) {f = f->next; fnum++;}
+  }
+  ((fltk3::Browser*)this)->cache = l;
+  ((fltk3::Browser*)this)->cacheline = n;
+  return n;
+}
+
+/**
+  Removes the item at the specified \p line.
+  Caveat: See efficiency note in find_line().
+  You must call redraw() to make any changes visible.
+  \param[in] line The line number to be removed. (1 based) Must be in range!
+  \returns Pointer to browser item that was removed (and is no longer valid).
+  \see add(), insert(), remove(), swap(int,int), clear()
+*/
+fltk3::BrowserLine_* fltk3::Browser::_remove(int line) {
+  fltk3::BrowserLine_* ttt = find_line(line);
+  deleting(ttt);
+
+  cacheline = line-1;
+  cache = ttt->prev;
+  lines--;
+  full_height_ -= item_height(ttt);
+  if (ttt->prev) ttt->prev->next = ttt->next;
+  else first = ttt->next;
+  if (ttt->next) ttt->next->prev = ttt->prev;
+  else last = ttt->prev;
+
+  return(ttt);
+}
+
+/**
+  Remove entry for given \p line number, making the browser one line shorter.
+  You must call redraw() to make any changes visible.
+  \param[in] line Line to be removed. (1 based) \n
+                  If \p line is out of range, no action is taken.
+  \see add(), insert(), remove(), swap(int,int), clear()
+*/
+void fltk3::Browser::remove(int line) {
+  if (line < 1 || line > lines) return;
+  free(_remove(line));
+}
+
+/**
+  Insert specified \p item above \p line.
+  If \p line > size() then the line is added to the end.
+
+  Caveat: See efficiency note in find_line().
+
+  \param[in] line  The new line will be inserted above this line (1 based).
+  \param[in] item  The item to be added.
+*/
+void fltk3::Browser::insert(int line, fltk3::BrowserLine_* item) {
+  if (!first) {
+    item->prev = item->next = 0;
+    first = last = item;
+  } else if (line <= 1) {
+    inserting(first, item);
+    item->prev = 0;
+    item->next = first;
+    item->next->prev = item;
+    first = item;
+  } else if (line > lines) {
+    item->prev = last;
+    item->prev->next = item;
+    item->next = 0;
+    last = item;
+  } else {
+    fltk3::BrowserLine_* n = find_line(line);
+    inserting(n, item);
+    item->next = n;
+    item->prev = n->prev;
+    item->prev->next = item;
+    n->prev = item;
+  }
+  cacheline = line;
+  cache = item;
+  lines++;
+  full_height_ += item_height(item);
+  redraw_line(item);
+}
+
+/**
+  Insert a new entry whose label is \p newtext \e above given \p line, optional data \p d.
+
+  Text may contain format characters; see format_char() for details.
+  \p newtext is copied using the strdup() function, and can be NULL to make a blank line.
+
+  The optional void * argument \p d will be the data() of the new item.
+
+  \param[in] line Line position for insert. (1 based) \n
+             If \p line > size(), the entry will be added at the end.
+  \param[in] newtext The label text for the new line.
+  \param[in] d Optional pointer to user data to be associated with the new line.
+*/
+void fltk3::Browser::insert(int line, const char* newtext, void* d) {
+  int l = strlen(newtext);
+  fltk3::BrowserLine_* t = (fltk3::BrowserLine_*)malloc(sizeof(fltk3::BrowserLine_)+l);
+  t->length = (short)l;
+  t->flags = 0;
+  strcpy(t->txt, newtext);
+  t->data = d;
+  t->icon = 0;
+  insert(line, t);
+}
+
+/**
+  Line \p from is removed and reinserted at \p to.
+  Note: \p to is calculated \e after line \p from gets removed.
+  \param[in] to Destination line number (calculated \e after line \p from is removed)
+  \param[in] from Line number of item to be moved
+*/
+void fltk3::Browser::move(int to, int from) {
+  if (from < 1 || from > lines) return;
+  insert(to, _remove(from));
+}
+
+/**
+  Sets the text for the specified \p line to \p newtext.
+
+  Text may contain format characters; see format_char() for details.
+  \p newtext is copied using the strdup() function, and can be NULL to make a blank line.
+
+  Does nothing if \p line is out of range.
+
+  \param[in] line The line of the item whose text will be changed. (1 based)
+  \param[in] newtext The new string to be assigned to the item.
+*/
+void fltk3::Browser::text(int line, const char* newtext) {
+  if (line < 1 || line > lines) return;
+  fltk3::BrowserLine_* t = find_line(line);
+  int l = strlen(newtext);
+  if (l > t->length) {
+    fltk3::BrowserLine_* n = (fltk3::BrowserLine_*)malloc(sizeof(fltk3::BrowserLine_)+l);
+    replacing(t, n);
+    cache = n;
+    n->data = t->data;
+    n->icon = t->icon;
+    n->length = (short)l;
+    n->flags = t->flags;
+    n->prev = t->prev;
+    if (n->prev) n->prev->next = n; else first = n;
+    n->next = t->next;
+    if (n->next) n->next->prev = n; else last = n;
+    free(t);
+    t = n;
+  }
+  strcpy(t->txt, newtext);
+  redraw_line(t);
+}
+
+/**
+  Sets the user data for specified \p line to \p d.
+  Does nothing if \p line is out of range.
+  \param[in] line The line of the item whose data() is to be changed. (1 based)
+  \param[in] d The new data to be assigned to the item. (can be NULL)
+*/
+void fltk3::Browser::data(int line, void* d) {
+  if (line < 1 || line > lines) return;
+  find_line(line)->data = d;
+}
+
+/**
+  Returns height of \p item in pixels.
+  This takes into account embedded \@ codes within the text() label.
+  \param[in] item The item whose height is returned.
+  \returns The height of the item in pixels.
+  \see item_height(), item_width(),\n
+       incr_height(), full_height()
+*/
+int fltk3::Browser::item_height(void *item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_height(item), BrowserItemHeight) 
+  fltk3::BrowserLine_* l = (fltk3::BrowserLine_*)item;
+  if (l->flags & NOTDISPLAYED) return 0;
+
+  int hmax = 2; // use 2 to insure we don't return a zero!
+
+  if (!l->txt[0]) {
+    // For blank lines set the height to exactly 1 line!
+    fltk3::font(textfont(), textsize());
+    int hh = fltk3::height();
+    if (hh > hmax) hmax = hh;
+  } else {
+    const int* i = column_widths();
+    long int dummy;
+    // do each column separately as they may all set different fonts:
+    for (char* str = l->txt; str && *str; str++) {
+      fltk3::Font font = textfont(); // default font
+      int tsize = textsize(); // default size
+      while (*str==format_char()) {
+	str++;
+	switch (*str++) {
+	case 'l': case 'L': tsize = 24; break;
+	case 'm': case 'M': tsize = 18; break;
+	case 's': tsize = 11; break;
+	case 'b': font = (fltk3::Font)(font|fltk3::BOLD); break;
+	case 'i': font = (fltk3::Font)(font|fltk3::ITALIC); break;
+	case 'f': case 't': font = fltk3::COURIER; break;
+	case 'B':
+	case 'C': dummy = strtol(str, &str, 10); break;// skip a color number
+	case 'F': font = (fltk3::Font)strtol(str,&str,10); break;
+	case 'S': tsize = strtol(str,&str,10); break;
+	case 0: case '@': str--;
+	case '.': goto END_FORMAT;
+	}
+      }
+      END_FORMAT:
+      char* ptr = str;
+      if (ptr && *i++) str = strchr(str, column_char());
+      else str = NULL;
+      if((!str && *ptr) || (str && ptr < str)) {
+	fltk3::font(font, tsize); int hh = fltk3::height();
+	if (hh > hmax) hmax = hh;
+      }
+      if (!str || !*str) break;
+    }
+  }
+
+  if (l->icon && (l->icon->h()+2)>hmax) {
+    hmax = l->icon->h() + 2;	// leave 2px above/below
+  }
+  return hmax; // previous version returned hmax+2!
+}
+
+/**
+  Returns width of \p item in pixels.
+  This takes into account embedded \@ codes within the text() label.
+  \param[in] item The item whose width is returned.
+  \returns The width of the item in pixels.
+  \see item_height(), item_width(),\n
+       incr_height(), full_height()
+*/
+int fltk3::Browser::item_width(void *item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_width(item), BrowserItemWidth)
+  fltk3::BrowserLine_* l=(fltk3::BrowserLine_*)item;
+  char* str = l->txt;
+  const int* i = column_widths();
+  int ww = 0;
+
+  while (*i) { // add up all tab-separated fields
+    char* e;
+    e = strchr(str, column_char());
+    if (!e) break; // last one occupied by text
+    str = e+1;
+    ww += *i++;
+  }
+
+  // OK, we gotta parse the string and find the string width...
+  int tsize = textsize();
+  fltk3::Font font = textfont();
+  int done = 0;
+
+  while (*str == format_char_ && str[1] && str[1] != format_char_) {
+    long int dummy;
+    str ++;
+    switch (*str++) {
+    case 'l': case 'L': tsize = 24; break;
+    case 'm': case 'M': tsize = 18; break;
+    case 's': tsize = 11; break;
+    case 'b': font = (fltk3::Font)(font|fltk3::BOLD); break;
+    case 'i': font = (fltk3::Font)(font|fltk3::ITALIC); break;
+    case 'f': case 't': font = fltk3::COURIER; break;
+    case 'B':
+    case 'C': dummy = strtol(str, &str, 10); break;// skip a color number
+    case 'F': font = (fltk3::Font)strtol(str, &str, 10); break;
+    case 'S': tsize = strtol(str, &str, 10); break;
+    case '.':
+      done = 1;
+      break;
+    case '@':
+      str--;
+      done = 1;
+    }
+
+    if (done)
+      break;
+  }
+
+  if (*str == format_char_ && str[1])
+    str ++;
+
+  if (ww==0 && l->icon) ww = l->icon->w();
+
+  fltk3::font(font, tsize);
+  return ww + int(fltk3::width(str)) + 6;
+}
+
+/**
+  The height of the entire list of all visible() items in pixels.
+  This returns the accumulated height of *all* the items in the browser
+  that are not hidden with hide(), including items scrolled off screen.
+  \returns The accumulated size of all the visible items in pixels.
+  \see item_height(), item_width(),\n
+       incr_height(), full_height()
+*/
+int fltk3::Browser::full_height() const {
+  return full_height_;
+}
+
+/**
+  The default 'average' item height (including inter-item spacing) in pixels.
+  This currently returns textsize() + 2.
+  \returns The value in pixels.
+  \see item_height(), item_width(),\n
+       incr_height(), full_height()
+*/
+int fltk3::Browser::incr_height() const {
+  return textsize()+2;
+}
+
+/**
+  Draws \p item at the position specified by \p X \p Y \p W \p H.
+  The \p W and \p H values are used for clipping.
+  Should only be called within the context of an FLTK draw().
+  \param[in] item The item to be drawn
+  \param[in] X,Y,W,H position and size.
+*/
+void fltk3::Browser::item_draw(void* item, int X, int Y, int W, int H) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER(item_draw(item, X, Y, W, H), BrowserItemDraw)
+  fltk3::BrowserLine_* l = (fltk3::BrowserLine_*)item;
+  char* str = l->txt;
+  const int* i = column_widths();
+
+  bool first = true;	// for icon
+  while (W > 6) {	// do each tab-separated field
+    int w1 = W;	// width for this field
+    char* e = 0; // pointer to end of field or null if none
+    if (*i) { // find end of field and temporarily replace with 0
+      e = strchr(str, column_char());
+      if (e) {*e = 0; w1 = *i++;}
+    }
+    // Icon drawing code
+    if (first) {
+      first = false;
+      if (l->icon) {
+	l->icon->draw(X+2,Y+1);	// leave 2px left, 1px above
+	int iconw = l->icon->w()+2;
+	X += iconw; W -= iconw; w1 -= iconw;
+      }
+    }
+    int tsize = textsize();
+    fltk3::Font font = textfont();
+    fltk3::Color lcol = textcolor();
+    fltk3::Align talign = fltk3::ALIGN_LEFT;
+    // check for all the @-lines recognized by XForms:
+    //#if defined(__GNUC__)
+    //#warning FIXME This maybe needs to be more UTF8 aware now...?
+    //#endif /*__GNUC__*/
+    while (*str == format_char() && *++str && *str != format_char()) {
+      long int dummy;
+      switch (*str++) {
+      case 'l': case 'L': tsize = 24; break;
+      case 'm': case 'M': tsize = 18; break;
+      case 's': tsize = 11; break;
+      case 'b': font = (fltk3::Font)(font|fltk3::BOLD); break;
+      case 'i': font = (fltk3::Font)(font|fltk3::ITALIC); break;
+      case 'f': case 't': font = fltk3::COURIER; break;
+      case 'c': talign = fltk3::ALIGN_CENTER; break;
+      case 'r': talign = fltk3::ALIGN_RIGHT; break;
+      case 'B': 
+	if (!(l->flags & SELECTED)) {
+	  fltk3::color((fltk3::Color)strtol(str, &str, 10));
+	  fltk3::rectf(X, Y, w1, H);
+	} else dummy = strtol(str, &str, 10);
+        break;
+      case 'C':
+	lcol = (fltk3::Color)strtol(str, &str, 10);
+	break;
+      case 'F':
+	font = (fltk3::Font)strtol(str, &str, 10);
+	break;
+      case 'N':
+	lcol = fltk3::INACTIVE_COLOR;
+	break;
+      case 'S':
+	tsize = strtol(str, &str, 10);
+	break;
+      case '-':
+	fltk3::color(fltk3::DARK3);
+	fltk3::line(X+3, Y+H/2, X+w1-3, Y+H/2);
+	fltk3::color(fltk3::LIGHT3);
+	fltk3::line(X+3, Y+H/2+1, X+w1-3, Y+H/2+1);
+	break;
+      case 'u':
+      case '_':
+	fltk3::color(lcol);
+	fltk3::line(X+3, Y+H-1, X+w1-3, Y+H-1);
+	break;
+      case '.':
+	goto BREAK;
+      case '@':
+	str--; goto BREAK;
+      }
+    }
+  BREAK:
+    fltk3::font(font, tsize);
+    if (l->flags & SELECTED)
+      lcol = fltk3::contrast(lcol, selection_color());
+    if (!active_r()) lcol = fltk3::inactive(lcol);
+    fltk3::color(lcol);
+    fltk3::draw(str, X+3, Y, w1-6, H, e ? fltk3::Align(talign|fltk3::ALIGN_CLIP) : talign, 0, 0);
+    if (!e) break; // no more fields...
+    *e = column_char(); // put the separator back
+    X += w1;
+    W -= w1;
+    str = e+1;
+  }
+}
+
+static const int no_columns[1] = {0};
+
+/**
+  The constructor makes an empty browser.
+  \param[in] X,Y,W,H position and size.
+  \param[in] L label string, may be NULL.
+*/
+fltk3::Browser::Browser(int X, int Y, int W, int H, const char *L)
+: fltk3::Browser_(X, Y, W, H, L) {
+  column_widths_ = no_columns;
+  lines = 0;
+  full_height_ = 0;
+  cacheline = 0;
+  format_char_ = '@';
+  column_char_ = '\t';
+  first = last = cache = 0;
+}
+
+/**
+  Updates the browser so that \p line is shown at position \p pos.
+  \param[in] line line number. (1 based)
+  \param[in] pos position.
+  \see topline(), middleline(), bottomline()
+*/
+void fltk3::Browser::lineposition(int line, LinePosition pos) {
+  if (line<1) line = 1;
+  if (line>lines) line = lines;
+  int p = 0;
+
+  fltk3::BrowserLine_* l;
+  for (l=first; l && line>1; l = l->next) {
+    line--; p += item_height(l);
+  }
+  if (l && (pos == BOTTOM)) p += item_height (l);
+
+  int final = p, X, Y, W, H;
+  bbox(X, Y, W, H);
+
+  switch(pos) {
+    case TOP: break;
+    case BOTTOM: final -= H; break;
+    case MIDDLE: final -= H/2; break;
+  }
+  
+  if (final > (full_height() - H)) final = full_height() -H;
+  position(final);
+}
+
+/**
+  Returns the line that is currently visible at the top of the browser.
+  If there is no vertical scrollbar then this will always return 1.
+  \returns The lineno() of the top() of the browser.
+*/
+int fltk3::Browser::topline() const {
+  return lineno(top());
+}
+
+/**
+  Removes all the lines in the browser.
+  \see add(), insert(), remove(), swap(int,int), clear()
+*/
+void fltk3::Browser::clear() {
+  for (fltk3::BrowserLine_* l = first; l;) {
+    fltk3::BrowserLine_* n = l->next;
+    free(l);
+    l = n;
+  }
+  full_height_ = 0;
+  first = 0;
+  last = 0;
+  lines = 0;
+  new_list();
+}
+
+/**
+  Adds a new line to the end of the browser.
+
+  The text string \p newtext may contain format characters; see format_char() for details.
+  \p newtext is copied using the strdup() function, and can be NULL to make a blank line.
+
+  The optional void* argument \p d will be the data() for the new item.
+
+  \param[in] newtext The label text used for the added item
+  \param[in] d Optional user data() for the item (0 if unspecified)
+  \see add(), insert(), remove(), swap(int,int), clear()
+*/
+void fltk3::Browser::add(const char* newtext, void* d) {
+  insert(lines+1, newtext, d);
+  //fltk3::Browser_::display(last);
+}
+
+/**
+  Returns the label text for the specified \p line.
+  Return value can be NULL if \p line is out of range or unset.
+  The parameter \p line is 1 based.
+  \param[in] line The line number of the item whose text is returned. (1 based)
+  \returns The text string (can be NULL)
+*/
+const char* fltk3::Browser::text(int line) const {
+  if (line < 1 || line > lines) return 0;
+  return find_line(line)->txt;
+}
+
+/**
+  Returns the user data() for specified \p line.
+  Return value can be NULL if \p line is out of range or no user data() was defined.
+  The parameter \p line is 1 based (1 will be the first item in the list).
+  \param[in] line The line number of the item whose data() is returned. (1 based)
+  \returns The user data pointer (can be NULL)
+
+*/
+void* fltk3::Browser::data(int line) const {
+  if (line < 1 || line > lines) return 0;
+  return find_line(line)->data;
+}
+
+/**
+  Sets the selection state of the item at \p line to the value \p val.
+  If \p val is not specified, the default is 1 (selects the item).
+  \param[in] line The line number of the item to be changed. (1 based)
+  \param[in] val The new selection state (1=select, 0=de-select).
+  \returns 1 if the state changed, 0 if not.
+  \see select(), selected(), value(), item_select(), item_selected()
+*/
+int fltk3::Browser::select(int line, int val) {
+  if (line < 1 || line > lines) return 0;
+  return Browser_::select(find_line(line), val);
+}
+
+/**
+  Returns 1 if specified \p line is selected, 0 if not.
+  \param[in] line The line being checked (1 based)
+  \returns 1 if item selected, 0 if not.
+  \see select(), selected(), value(), item_select(), item_selected()
+  */
+int fltk3::Browser::selected(int line) const {
+  if (line < 1 || line > lines) return 0;
+  return find_line(line)->flags & SELECTED;
+}
+
+/**
+  Makes \p line visible, and available for selection by user.
+  Opposite of hide(int).
+  This changes the full_height() if the state was changed.
+  redraw() is called automatically if a change occurred.
+  \param[in] line The line to be shown. (1 based)
+  \see show(int), hide(int), display(), visible(), make_visible()
+*/
+void fltk3::Browser::show(int line) {
+  fltk3::BrowserLine_* t = find_line(line);
+  if (t->flags & NOTDISPLAYED) {
+    t->flags &= ~NOTDISPLAYED;
+    full_height_ += item_height(t);
+    if (Browser_::displayed(t)) redraw();
+  }
+}
+
+/**
+  Makes \p line invisible, preventing selection by the user.
+  The line can still be selected under program control.
+  This changes the full_height() if the state was changed.
+  When a line is made invisible, lines below it are moved up in the display.
+  redraw() is called automatically if a change occurred.
+  \param[in] line The line to be hidden. (1 based)
+  \see show(int), hide(int), display(), visible(), make_visible()
+*/
+void fltk3::Browser::hide(int line) {
+  fltk3::BrowserLine_* t = find_line(line);
+  if (!(t->flags & NOTDISPLAYED)) {
+    full_height_ -= item_height(t);
+    t->flags |= NOTDISPLAYED;
+    if (Browser_::displayed(t)) redraw();
+  }
+}
+
+/**
+  For back compatibility.
+  This calls show(line) if \p val is true, and hide(line) otherwise.
+  If \p val is not specified, the default is 1 (makes the line visible).
+  \see show(int), hide(int), display(), visible(), make_visible()
+*/
+void fltk3::Browser::display(int line, int val) {
+  if (line < 1 || line > lines) return;
+  if (val) show(line); else hide(line);
+}
+
+/**
+  Returns non-zero if the specified \p line is visible, 0 if hidden.
+  Use show(int), hide(int), or make_visible(int) to change an item's visible state.
+  \param[in] line The line in the browser to be tested. (1 based)
+  \see show(int), hide(int), display(), visible(), make_visible()
+*/
+int fltk3::Browser::visible(int line) const {
+  if (line < 1 || line > lines) return 0;
+  return !(find_line(line)->flags&NOTDISPLAYED);
+}
+
+/**
+  Returns the line number of the currently selected line, or 0 if none.
+  \returns The line number of current selection, or 0 if none selected.
+  \see select(), selected(), value(), item_select(), item_selected()
+*/
+int fltk3::Browser::value() const {
+  return lineno(selection());
+}
+
+/**
+  Swap the two items \p a and \p b.
+  Uses swapping() to ensure list updates correctly.
+  \param[in] a,b The two items to be swapped.
+  \see swap(int,int), item_swap()
+*/
+void fltk3::Browser::swap(fltk3::BrowserLine_ *a, fltk3::BrowserLine_ *b) {
+
+  if ( a == b || !a || !b) return;          // nothing to do
+  swapping(a, b);
+  fltk3::BrowserLine_ *aprev  = a->prev;
+  fltk3::BrowserLine_ *anext  = a->next;
+  fltk3::BrowserLine_ *bprev  = b->prev;
+  fltk3::BrowserLine_ *bnext  = b->next;
+  if ( b->prev == a ) { 		// A ADJACENT TO B
+     if ( aprev ) aprev->next = b; else first = b;
+     b->next = a;
+     a->next = bnext;
+     b->prev = aprev;
+     a->prev = b;
+     if ( bnext ) bnext->prev = a; else last = a;
+  } else if ( a->prev == b ) {		// B ADJACENT TO A
+     if ( bprev ) bprev->next = a; else first = a;
+     a->next = b;
+     b->next = anext;
+     a->prev = bprev;
+     b->prev = a;
+     if ( anext ) anext->prev = b; else last = b;
+  } else {				// A AND B NOT ADJACENT
+     // handle prev's
+     b->prev = aprev;
+     if ( anext ) anext->prev = b; else last = b;
+     a->prev = bprev;
+     if ( bnext ) bnext->prev = a; else last = a;
+     // handle next's
+     if ( aprev ) aprev->next = b; else first = b;
+     b->next = anext;
+     if ( bprev ) bprev->next = a; else first = a;
+     a->next = bnext;
+  }
+  // Disable cache -- we played around with positions
+  cacheline = 0;
+  cache = 0;
+}
+
+/**
+  Swaps two browser lines \p a and \p b.
+  You must call redraw() to make any changes visible.
+  \param[in] a,b The two lines to be swapped. (both 1 based)
+  \see swap(int,int), item_swap()
+*/
+void fltk3::Browser::swap(int a, int b) {
+  if (a < 1 || a > lines || b < 1 || b > lines) return;
+  fltk3::BrowserLine_* ai = find_line(a);
+  fltk3::BrowserLine_* bi = find_line(b);
+  swap(ai,bi);
+}
+
+/**
+  Set the image icon for \p line to the value \p icon.
+  Caller is responsible for keeping the icon allocated.
+  The \p line is automatically redrawn.
+  \param[in] line The line to be modified. If out of range, nothing is done.
+  \param[in] icon The image icon to be assigned to the \p line.
+                  If NULL, any previous icon is removed.
+*/
+void fltk3::Browser::icon(int line, fltk3::Image* icon) {
+
+  if (line<1 || line > lines) return;
+
+  fltk3::BrowserLine_* bl = find_line(line);
+
+  int old_h = bl->icon ? bl->icon->h()+2 : 0;	// init with *old* icon height
+  bl->icon = 0;					// remove icon, if any
+  int th = item_height(bl);			// height of text only
+  int new_h = icon ? icon->h()+2 : 0;		// init with *new* icon height
+  if (th > old_h) old_h = th;
+  if (th > new_h) new_h = th;
+  int dh = new_h - old_h;
+  full_height_ += dh;				// do this *always*
+
+  bl->icon = icon;				// set new icon
+  if (dh>0) {
+    redraw();					// icon larger than item? must redraw widget
+  } else {
+    redraw_line(bl);				// icon same or smaller? can redraw just this line
+  }
+  replacing(bl,bl);				// recalc fltk3::Browser_::max_width et al
+}
+
+/**
+  Returns the icon currently defined for \p line.
+  If no icon is defined, NULL is returned.
+  \param[in] line The line whose icon is returned.
+  \returns The icon defined, or NULL if none.
+*/
+fltk3::Image* fltk3::Browser::icon(int line) const {
+  fltk3::BrowserLine_* l = find_line(line);
+  return(l ? l->icon : NULL);
+}
+
+/**
+  Removes the icon for \p line.
+  It's ok to remove an icon if none has been defined.
+  \param[in] line The line whose icon is to be removed.
+*/
+void fltk3::Browser::remove_icon(int line) { 
+  icon(line,0);
+}
+
+/*
+ The following constructors must not be in the header file(s) if we
+ build a shared object (DLL). Instead they are defined here to force
+ the constructor (and default destructor as well) to be defined in
+ the DLL and exported (STR #2632, #2645).
+ 
+ Note: if you change any of them, do the same changes in the specific
+ header file as well.  This redundant definition was chosen to enable
+ inline constructors in the header files (for static linking) as well
+ as those here for dynamic linking (Windows DLL).
+ */
+#if defined(FL_DLL)
+
+fltk3::HoldBrowser::HoldBrowser(int X,int Y,int W,int H,const char *L)
+: fltk3::Browser(X,Y,W,H,L) {type(fltk3::HOLD_BROWSER);}
+
+fltk3::MultiBrowser::MultiBrowser(int X,int Y,int W,int H,const char *L)
+: fltk3::Browser(X,Y,W,H,L) {type(fltk3::MULTI_BROWSER);}
+
+fltk3::SelectBrowser::SelectBrowser(int X,int Y,int W,int H,const char *L)
+: fltk3::Browser(X,Y,W,H,L) {type(fltk3::SELECT_BROWSER);}
+
+#endif // FL_DLL
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Browser.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Browser_.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Browser_.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Browser_.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1167 @@
+//
+// "$Id$"
+//
+// Base Browser widget class for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#define DISPLAY_SEARCH_BOTH_WAYS_AT_ONCE
+
+#include <stdio.h>
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/Browser_.h>
+#include <fltk3/draw.h>
+#include <fltk3/Wrapper.h>
+
+
+// This is the base class for browsers.  To be useful it must be
+// subclassed and several virtual functions defined.  The
+// Forms-compatible browser and the file chooser's browser are
+// subclassed off of this.
+
+// Yes, I know this should be a template...
+
+// This has been designed so that the subclass has complete control
+// over the storage of the data, although because next() and prev()
+// functions are used to index, it works best as a linked list or as a
+// large block of characters in which the line breaks must be searched
+// for.
+
+// A great deal of work has been done so that the "height" of a data
+// object does not need to be determined until it is drawn.  This was
+// done for the file chooser, because the height requires doing stat()
+// to see if the file is a directory, which can be annoyingly slow
+// over the network.
+
+/* redraw bits:
+ 1 = redraw children (the scrollbar)
+ 2 = redraw one or two items
+ 4 = redraw all items
+ */
+
+static void scrollbar_callback(fltk3::Widget* s, void*) {
+  ((fltk3::Browser_*)(s->parent()))->position(int(((fltk3::Scrollbar*)s)->value()));
+}
+
+static void hscrollbar_callback(fltk3::Widget* s, void*) {
+  ((fltk3::Browser_*)(s->parent()))->hposition(int(((fltk3::Scrollbar*)s)->value()));
+}
+
+// return where to draw the actual box:
+/**
+ Returns the bounding box for the interior of the list's display window, inside
+ the scrollbars.
+ \param[out] X,Y,W,H The returned bounding box.\n
+ (The original contents of these parameters are overwritten)
+ */
+void fltk3::Browser_::bbox(int& X, int& Y, int& W, int& H) const {
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  fltk3::Boxtype b = box() ? box() : fltk3::DOWN_BOX;
+  X = x()+fltk3::box_dx(b);
+  Y = y()+fltk3::box_dy(b);
+  W = w()-fltk3::box_dw(b);
+  H = h()-fltk3::box_dh(b);
+  if (scrollbar.visible()) {
+    W -= scrollsize;
+    if (scrollbar.align() & fltk3::ALIGN_LEFT) X += scrollsize;
+  }
+  if (W < 0) W = 0;
+  if (hscrollbar.visible()) {
+    H -= scrollsize;
+    if (scrollbar.align() & fltk3::ALIGN_TOP) Y += scrollsize;
+  }
+  if (H < 0) H = 0;
+}
+
+/**
+ This method returns the X position of the left edge of the list area
+ after adjusting for the scrollbar and border, if any.
+ \returns The X position of the left edge of the list, in pixels.
+ \see fltk3::Browser_::bbox()
+ */
+int fltk3::Browser_::leftedge() const {
+  int X, Y, W, H; bbox(X, Y, W, H);
+  return X;
+}
+
+// The scrollbars may be moved again by draw(), since each one's size
+// depends on whether the other is visible or not.  This skips over
+// fltk3::Group::resize since it moves the scrollbars uselessly.
+/**
+ Repositions and/or resizes the browser.
+ \param[in] X,Y,W,H The new position and size for the browser, in pixels.
+ */
+void fltk3::Browser_::resize(int X, int Y, int W, int H) {
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  Widget::resize(X, Y, W, H);
+  // move the scrollbars so they can respond to events:
+  bbox(X,Y,W,H);
+  scrollbar.resize(
+                   scrollbar.align()&fltk3::ALIGN_LEFT ? X-scrollsize : X+W,
+                   Y, scrollsize, H);
+  hscrollbar.resize(
+                    X, scrollbar.align()&fltk3::ALIGN_TOP ? Y-scrollsize : Y+H,
+                    W, scrollsize);
+}
+
+// Cause minimal update to redraw the given item:
+/**
+ This method should be called when the contents of \p item has changed,
+ but not its height.
+ \param[in] item The item that needs to be redrawn.
+ \see redraw_lines(), redraw_line()
+ */
+void fltk3::Browser_::redraw_line(void* item) {
+  if (!redraw1 || redraw1 == item) {redraw1 = item; damage(fltk3::DAMAGE_EXPOSE);}
+  else if (!redraw2 || redraw2 == item) {redraw2 = item; damage(fltk3::DAMAGE_EXPOSE);}
+  else damage(fltk3::DAMAGE_SCROLL);
+}
+
+// Figure out top() based on position():
+void fltk3::Browser_::update_top() {
+  if (!top_) top_ = item_first();
+  if (position_ != real_position_) {
+    void* l;
+    int ly;
+    int yy = position_;
+    // start from either head or current position, whichever is closer:
+    if (!top_ || yy <= (real_position_/2)) {
+      l = item_first();
+      ly = 0;
+    } else {
+      l = top_;
+      ly = real_position_-offset_;
+    }
+    if (!l) {
+      top_ = 0;
+      offset_ = 0;
+      real_position_ = 0;
+    } else {
+      int hh = item_quick_height(l);
+      // step through list until we find line containing this point:
+      while (ly > yy) {
+	void* l1 = item_prev(l);
+	if (!l1) {ly = 0; break;} // hit the top
+	l  = l1;
+	hh = item_quick_height(l);
+	ly -= hh;
+      }
+      while ((ly+hh) <= yy) {
+	void* l1 = item_next(l);
+	if (!l1) {yy = ly+hh-1; break;}
+	l = l1;
+	ly += hh;
+	hh = item_quick_height(l);
+      }
+      // top item must *really* be visible, use slow height:
+      for (;;) {
+	hh = item_height(l);
+	if ((ly+hh) > yy) break; // it is big enough to see
+                                 // go up to top of previous item:
+	void* l1 = item_prev(l);
+	if (!l1) {ly = yy = 0; break;} // hit the top
+	l = l1; yy = position_ = ly = ly-item_quick_height(l);
+      }
+      // use it:
+      top_ = l;
+      offset_ = yy-ly;
+      real_position_ = yy;
+    }
+    damage(fltk3::DAMAGE_SCROLL);
+  }
+}
+
+// Change position(), top() will update when update_top() is called
+// (probably by draw() or handle()):
+/**
+ Sets the vertical scroll position of the list to pixel position \p pos.
+ The position is how many pixels of the list are scrolled off the top edge
+ of the screen. Example: A position of '3' scrolls the top three pixels of
+ the list off the top edge of the screen.
+ \param[in] pos The vertical position (in pixels) to scroll the browser to.
+ \see position(), hposition()
+ */
+void fltk3::Browser_::position(int pos) {
+  if (pos < 0) pos = 0;
+  if (pos == position_) return;
+  position_ = pos;
+  if (pos != real_position_) redraw_lines();
+}
+
+/**
+ Sets the horizontal scroll position of the list to pixel position \p pos.
+ The position is how many pixels of the list are scrolled off the left edge
+ of the screen. Example: A position of '18' scrolls the left 18 pixels of the list
+ off the left edge of the screen.
+ \param[in] pos The horizontal position (in pixels) to scroll the browser to.
+ \see position(), hposition()
+ */
+void fltk3::Browser_::hposition(int pos) {
+  if (pos < 0) pos = 0;
+  if (pos == hposition_) return;
+  hposition_ = pos;
+  if (pos != real_hposition_) redraw_lines();
+}
+
+// Tell whether item is currently displayed:
+/**
+ Returns non-zero if \p item has been scrolled to a position where it is being displayed.
+ Checks to see if the item's vertical position is within the top and bottom
+ edges of the display window. This does NOT take into account the hide()/show()
+ status of the widget or item.
+ \param[in] item The item to check
+ \returns 1 if visible, 0 if not visible.
+ \see display(), displayed()
+ */
+int fltk3::Browser_::displayed(void* item) const {
+  int X, Y, W, H; bbox(X, Y, W, H);
+  int yy = H+offset_;
+  for (void* l = top_; l && yy > 0; l = item_next(l)) {
+    if (l == item) return 1;
+    yy -= item_height(l);
+  }
+  return 0;
+}
+
+// Ensure this item is displayed:
+// Messy because we have no idea if it is before top or after bottom:
+/**
+ Displays the \p item, scrolling the list as necessary.
+ \param[in] item The item to be displayed.
+ \see display(), displayed()
+ */
+void fltk3::Browser_::display(void* item) {
+  
+  // First special case - want to display first item in the list?
+  update_top();
+  if (item == item_first()) {position(0); return;}
+  
+  int X, Y, W, H, Yp; bbox(X, Y, W, H);
+  void* l = top_;
+  Y = Yp = -offset_;
+  int h1;
+  
+  // 2nd special case - want to display item already displayed at top of browser?
+  if (l == item) {position(real_position_+Y); return;} // scroll up a bit
+  
+  // 3rd special case - want to display item just above top of browser?
+  void* lp = item_prev(l);
+  if (lp == item) {position(real_position_+Y-item_quick_height(lp)); return;}
+  
+#ifdef DISPLAY_SEARCH_BOTH_WAYS_AT_ONCE
+  // search for item.  We search both up and down the list at the same time,
+  // this evens up the execution time for the two cases - the old way was
+  // much slower for going up than for going down.
+  while (l || lp) {
+    if (l) {
+      h1 = item_quick_height(l);
+      if (l == item) {
+	if (Y <= H) { // it is visible or right at bottom
+	  Y = Y+h1-H; // find where bottom edge is
+	  if (Y > 0) position(real_position_+Y); // scroll down a bit
+	} else {
+	  position(real_position_+Y-(H-h1)/2); // center it
+	}
+	return;
+      }
+      Y += h1;
+      l = item_next(l);
+    }
+    if (lp) {
+      h1 = item_quick_height(lp);
+      Yp -= h1;
+      if (lp == item) {
+	if ((Yp + h1) >= 0) position(real_position_+Yp);
+	else position(real_position_+Yp-(H-h1)/2);
+	return;
+      }
+      lp = item_prev(lp);
+    }
+  }
+#else
+  // Old version went forwards and then backwards:
+  // search forward for it:
+  l = top_;
+  for (; l; l = item_next(l)) {
+    h1 = item_quick_height(l);
+    if (l == item) {
+      if (Y <= H) { // it is visible or right at bottom
+	Y = Y+h1-H; // find where bottom edge is
+	if (Y > 0) position(real_position_+Y); // scroll down a bit
+      } else {
+	position(real_position_+Y-(H-h1)/2); // center it
+      }
+      return;
+    }
+    Y += h1;
+  }
+  // search backward for it, if found center it:
+  l = lp;
+  Y = -offset_;
+  for (; l; l = item_prev(l)) {
+    h1 = item_quick_height(l);
+    Y -= h1;
+    if (l == item) {
+      if ((Y + h1) >= 0) position(real_position_+Y);
+      else position(real_position_+Y-(H-h1)/2);
+      return;
+    }
+  }
+#endif
+}
+
+// redraw, has side effect of updating top and setting scrollbar:
+/**
+ Draws the list within the normal widget bounding box.
+ */
+void fltk3::Browser_::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int drawsquare = 0;
+  update_top();
+  int full_width_ = full_width();
+  int full_height_ = full_height();
+  int X, Y, W, H; bbox(X, Y, W, H);
+  int dont_repeat = 0;
+J1:
+  if (damage() & fltk3::DAMAGE_ALL) { // redraw the box if full redraw
+    fltk3::Boxtype b = box() ? box() : fltk3::DOWN_BOX;
+    draw_box(b, x(), y(), w(), h(), color());
+    drawsquare = 1;
+  }
+  // see if scrollbar needs to be switched on/off:
+  if ((has_scrollbar_ & VERTICAL) && (
+                                      (has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {
+    if (!scrollbar.visible()) {
+      scrollbar.set_visible();
+      drawsquare = 1;
+      bbox(X, Y, W, H);
+    }
+  } else {
+    top_ = item_first(); real_position_ = offset_ = 0;
+    if (scrollbar.visible()) {
+      scrollbar.clear_visible();
+      clear_damage((uchar)(damage()|fltk3::DAMAGE_SCROLL));
+    }
+  }
+  
+  if ((has_scrollbar_ & HORIZONTAL) && (
+                                        (has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_ > W)) {
+    if (!hscrollbar.visible()) {
+      hscrollbar.set_visible();
+      drawsquare = 1;
+      bbox(X, Y, W, H);
+    }
+  } else {
+    real_hposition_ = 0;
+    if (hscrollbar.visible()) {
+      hscrollbar.clear_visible();
+      clear_damage((uchar)(damage()|fltk3::DAMAGE_SCROLL));
+    }
+  }
+  
+  // Check the vertical scrollbar again, just in case it needs to be drawn
+  // because the horizontal one is drawn.  There should be a cleaner way
+  // to do this besides copying the same code...
+  if ((has_scrollbar_ & VERTICAL) && (
+                                      (has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {
+    if (!scrollbar.visible()) {
+      scrollbar.set_visible();
+      drawsquare = 1;
+      bbox(X, Y, W, H);
+    }
+  } else {
+    top_ = item_first(); real_position_ = offset_ = 0;
+    if (scrollbar.visible()) {
+      scrollbar.clear_visible();
+      clear_damage((uchar)(damage()|fltk3::DAMAGE_SCROLL));
+    }
+  }
+  
+  bbox(X, Y, W, H);
+  
+  fltk3::push_clip(X, Y, W, H);
+  // for each line, draw it if full redraw or scrolled.  Erase background
+  // if not a full redraw or if it is selected:
+  void* l = top();
+  int yy = -offset_;
+  for (; l && yy < H; l = item_next(l)) {
+    int hh = item_height(l);
+    if (hh <= 0) continue;
+    if ((damage()&(fltk3::DAMAGE_SCROLL|fltk3::DAMAGE_ALL)) || l == redraw1 || l == redraw2) {
+      if (item_selected(l)) {
+	fltk3::color(active_r() ? selection_color() : fltk3::inactive(selection_color()));
+	fltk3::rectf(X, yy+Y, W, hh);
+      } else if (!(damage()&fltk3::DAMAGE_ALL)) {
+	fltk3::push_clip(X, yy+Y, W, hh);
+	draw_box(box() ? box() : fltk3::DOWN_BOX, x(), y(), w(), h(), color());
+	fltk3::pop_clip();
+      }
+      item_draw(l, X-hposition_, yy+Y, W+hposition_, hh);
+      if (l == selection_ && fltk3::focus() == this) {
+	draw_box(fltk3::BORDER_FRAME, X, yy+Y, W, hh, color());
+	draw_focus(fltk3::NO_BOX, X, yy+Y, W+1, hh+1);
+      }
+      int ww = item_width(l);
+      if (ww > max_width) {max_width = ww; max_width_item = l;}
+    }
+    yy += hh;
+  }
+  // erase the area below last line:
+  if (!(damage()&fltk3::DAMAGE_ALL) && yy < H) {
+    fltk3::push_clip(X, yy+Y, W, H-yy);
+    draw_box(box() ? box() : fltk3::DOWN_BOX, x(), y(), w(), h(), color());
+    fltk3::pop_clip();
+  }
+  fltk3::pop_clip();
+  redraw1 = redraw2 = 0;
+  
+  if (!dont_repeat) {
+    dont_repeat = 1;
+    // see if changes to full_height caused by calls to slow_height
+    // caused scrollbar state to change, in which case we have to redraw:
+    full_height_ = full_height();
+    full_width_ = full_width();
+    if ((has_scrollbar_ & VERTICAL) &&
+	((has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) {
+      if (!scrollbar.visible()) { damage(fltk3::DAMAGE_ALL); goto J1; }
+    } else {
+      if (scrollbar.visible()) { damage(fltk3::DAMAGE_ALL); goto J1; }
+    }
+    if ((has_scrollbar_ & HORIZONTAL) &&
+	((has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_>W)) {
+      if (!hscrollbar.visible()) { damage(fltk3::DAMAGE_ALL); goto J1; }
+    } else {
+      if (hscrollbar.visible()) { damage(fltk3::DAMAGE_ALL); goto J1; }
+    }
+  }
+  
+  // update the scrollbars and redraw them:
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  int dy = top_ ? item_quick_height(top_) : 0; if (dy < 10) dy = 10;
+  if (scrollbar.visible()) {
+    scrollbar.damage_resize(
+                            scrollbar.align()&fltk3::ALIGN_LEFT ? X-scrollsize : X+W,
+                            Y, scrollsize, H);
+    scrollbar.value(position_, H, 0, full_height_);
+    scrollbar.linesize(dy);
+    if (drawsquare) draw_child(scrollbar);
+    else update_child(scrollbar);
+  }
+  if (hscrollbar.visible()) {
+    hscrollbar.damage_resize(
+                             X, scrollbar.align()&fltk3::ALIGN_TOP ? Y-scrollsize : Y+H,
+                             W, scrollsize);
+    hscrollbar.value(hposition_, W, 0, full_width_);
+    hscrollbar.linesize(dy);
+    if (drawsquare) draw_child(hscrollbar);
+    else update_child(hscrollbar);
+  }
+  
+  // draw that little square between the scrollbars:
+  if (drawsquare && scrollbar.visible() && hscrollbar.visible()) {
+    fltk3::color(parent()->color());
+    fltk3::rectf(scrollbar.x(), hscrollbar.y(), scrollsize, scrollsize);
+  }
+  
+  real_hposition_ = hposition_;
+}
+
+// Quick way to delete and reset everything:
+/**
+ This method should be called when the list data is completely replaced
+ or cleared. It informs the fltk3::Browser_ widget that any cached
+ information it has concerning the items is invalid.
+ This method does not clear the list, it just handles the follow up
+ bookkeeping after the list has been cleared.
+ */
+void fltk3::Browser_::new_list() {
+  top_ = 0;
+  position_ = real_position_ = 0;
+  hposition_ = real_hposition_ = 0;
+  selection_ = 0;
+  offset_ = 0;
+  max_width = 0;
+  max_width_item = 0;
+  redraw_lines();
+}
+
+// Tell it that this item is going away, and that this must remove
+// all pointers to it:
+/**
+ This method should be used when \p item is being deleted from the list.
+ It allows the fltk3::Browser_ to discard any cached data it has on the item.
+ This method does not actually delete the item, but handles the follow up
+ bookkeeping after the item has just been deleted.
+ \param[in] item The item being deleted.
+ */
+void fltk3::Browser_::deleting(void* item) {
+  if (displayed(item)) {
+    redraw_lines();
+    if (item == top_) {
+      real_position_ -= offset_;
+      offset_ = 0;
+      top_ = item_next(item);
+      if (!top_) top_ = item_prev(item);
+    }
+  } else {
+    // we don't know where this item is, recalculate top...
+    real_position_ = 0;
+    offset_ = 0;
+    top_ = 0;
+  }
+  if (item == selection_) selection_ = 0;
+  if (item == max_width_item) {max_width_item = 0; max_width = 0;}
+}
+
+/**
+ This method should be used when item \p a is being replaced by item \p b.
+ It allows the fltk3::Browser_ to update its cache data as needed,
+ schedules a redraw for the item being changed, and tries to maintain the selection.
+ This method does not actually replace the item, but handles the follow up
+ bookkeeping after the item has just been replaced.
+ \param[in] a Item being replaced
+ \param[in] b Item to replace 'a'
+ */
+void fltk3::Browser_::replacing(void* a, void* b) {
+  redraw_line(a);
+  if (a == selection_) selection_ = b;
+  if (a == top_) top_ = b;
+  if (a == max_width_item) {max_width_item = 0; max_width = 0;}
+}
+
+/**
+ This method should be used when two items \p a and \p b are being swapped.
+ It allows the fltk3::Browser_ to update its cache data as needed,
+ schedules a redraw for the two items, and tries to maintain the current selection.
+ This method does not actually swap items, but handles the follow up
+ bookkeeping after items have been swapped.
+ \param[in] a,b Items being swapped.
+ */
+void fltk3::Browser_::swapping(void* a, void* b) {
+  redraw_line(a);
+  redraw_line(b);
+  if (a == selection_) selection_ = b;
+  else if (b == selection_) selection_ = a;
+  if (a == top_) top_ = b;
+  else if (b == top_) top_ = a;
+}
+
+/**
+ This method should be used when an item is in the process of
+ being inserted into the list.
+ It allows the fltk3::Browser_ to update its cache data as needed,
+ scheduling a redraw for the affected lines.
+ This method does not actually insert items, but handles the 
+ follow up bookkeeping after items have been inserted.
+ \param[in] a The starting item position
+ \param[in] b The new item being inserted
+ */
+void fltk3::Browser_::inserting(void* a, void* b) {
+  if (displayed(a)) redraw_lines();
+  if (a == top_) top_ = b;
+}
+
+/**
+ This method returns the item under mouse y position \p ypos.
+ NULL is returned if no item is displayed at that position.
+ \param[in] ypos The y position (eg. fltk3::event_y()) to find an item under.
+ \returns The item, or NULL if not found
+ */
+void* fltk3::Browser_::find_item(int ypos) {
+  update_top();
+  int X, Y, W, H; bbox(X, Y, W, H);
+  int yy = Y-offset_;
+  for (void *l = top_; l; l = item_next(l)) {
+    int hh = item_height(l); if (hh <= 0) continue;
+    yy += hh;
+    if (ypos <= yy || yy>=(Y+H)) return l;
+  }
+  return 0;
+}
+
+/**
+ Sets the selection state of \p item to \p val,
+ and returns 1 if the state changed or 0 if it did not.
+ 
+ If \p docallbacks is non-zero, select tries to call
+ the callback function for the widget.
+ 
+ \param[in] item The item whose selection state is to be changed
+ \param[in] val The new selection state (1=select, 0=de-select)
+ \param[in] docallbacks If 1, invokes widget callback if item changed.\n
+ If 0, doesn't do callback (default).
+ \returns 1 if state was changed, 0 if not.
+ */
+int fltk3::Browser_::select(void* item, int val, int docallbacks) {
+  if (type() == fltk3::MULTI_BROWSER) {
+    if (selection_ != item) {
+      if (selection_) redraw_line(selection_);
+      selection_ = item;
+      redraw_line(item);
+    }
+    if ((!val)==(!item_selected(item))) return 0;
+    item_select(item, val);
+    redraw_line(item);
+  } else {
+    if (val && selection_ == item) return 0;
+    if (!val && selection_ != item) return 0;
+    if (selection_) {
+      item_select(selection_, 0);
+      redraw_line(selection_);
+      selection_ = 0;
+    }
+    if (val) {
+      item_select(item, 1);
+      selection_ = item;
+      redraw_line(item);
+      display(item);
+    }
+  }	    
+  if (docallbacks) {
+    set_changed();
+    do_callback();
+  }
+  return 1;
+}
+
+/**
+ Deselects all items in the list and returns 1 if the state changed
+ or 0 if it did not.
+ 
+ If the optional \p docallbacks parameter is non-zero, deselect tries
+ to call the callback function for the widget.
+ 
+ \param[in] docallbacks If 1, invokes widget callback if item changed.\n
+ If 0, doesn't do callback (default).
+ */
+int fltk3::Browser_::deselect(int docallbacks) {
+  if (type() == fltk3::MULTI_BROWSER) {
+    int change = 0;
+    for (void* p = item_first(); p; p = item_next(p))
+      change |= select(p, 0, docallbacks);
+    return change;
+  } else {
+    if (!selection_) return 0;
+    item_select(selection_, 0);
+    redraw_line(selection_);
+    selection_ = 0;
+    return 1;
+  }
+}
+
+/**
+ Selects \p item and returns 1 if the state changed or 0 if it did not.
+ Any other items in the list are deselected.
+ \param[in] item The \p item to select.
+ \param[in] docallbacks If 1, invokes widget callback if item changed.\n
+ If 0, doesn't do callback (default).
+ */
+int fltk3::Browser_::select_only(void* item, int docallbacks) {
+  if (!item) return deselect(docallbacks);
+  int change = 0;
+  fltk3::WidgetTracker wp(this);
+  if (type() == fltk3::MULTI_BROWSER) {
+    for (void* p = item_first(); p; p = item_next(p)) {
+      if (p != item) change |= select(p, 0, docallbacks);
+      if (wp.deleted()) return change;
+    }
+  }
+  change |= select(item, 1, docallbacks);
+  if (wp.deleted()) return change;
+  display(item);
+  return change;
+}
+
+/**
+ Handles the \p event within the normal widget bounding box.
+ \param[in] event The event to process.
+ \returns 1 if event was processed, 0 if not.
+ */
+int fltk3::Browser_::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  
+  // NOTE:
+  // We use fltk3::WidgetTracker to test if the user has deleted
+  // this widget in a callback. Callbacks can be called by:
+  //  - do_callback()
+  //  - select()
+  //  - select_only()
+  //  - deselect()
+  // Thus we must test wp.deleted() after each of these calls,
+  // unless we return directly after one of these.
+  // If wp.deleted() is true, we return 1 because we used the event.
+  
+  fltk3::WidgetTracker wp(this);
+  
+  // must do shortcuts first or the scrollbar will get them...
+  if (event == fltk3::ENTER || event == fltk3::LEAVE) return 1;
+  if (event == fltk3::KEYBOARD && type() >= fltk3::HOLD_BROWSER) {
+    void* l1 = selection_;
+    void* l = l1; if (!l) l = top_; if (!l) l = item_first();
+    if (l) {
+      if (type()==fltk3::HOLD_BROWSER) {
+        switch (fltk3::event_key()) {
+          case fltk3::DownKey:
+            while ((l = item_next(l)))
+              if (item_height(l)>0) {select_only(l, when()); break;}
+            return 1;
+          case fltk3::UpKey:
+            while ((l = item_prev(l))) {
+              if (item_height(l)>0) {
+                select_only(l, when());
+                break; // no need to test wp (return 1)
+              }
+            }
+            return 1;
+        } 
+      } else  {
+        switch (fltk3::event_key()) {
+          case fltk3::EnterKey:
+          case fltk3::KPEnterKey:
+            select_only(l, when() & ~fltk3::WHEN_ENTER_KEY);
+            if (wp.deleted()) return 1;
+            if (when() & fltk3::WHEN_ENTER_KEY) {
+              set_changed();
+              do_callback();
+            }
+            return 1;
+          case ' ':
+            selection_ = l;
+            select(l, !item_selected(l), when() & ~fltk3::WHEN_ENTER_KEY);
+            return 1;
+          case fltk3::DownKey:
+            while ((l = item_next(l))) {
+              if (fltk3::event_state(fltk3::SHIFT|fltk3::CTRL))
+                select(l, l1 ? item_selected(l1) : 1, when());
+              if (wp.deleted()) return 1;
+              if (item_height(l)>0) goto J1;
+            }
+            return 1;
+          case fltk3::UpKey:
+            while ((l = item_prev(l))) {
+              if (fltk3::event_state(fltk3::SHIFT|fltk3::CTRL))
+                select(l, l1 ? item_selected(l1) : 1, when());
+              if (wp.deleted()) return 1;
+              if (item_height(l)>0) goto J1;
+            }
+            return 1;
+          J1:
+            if (selection_) redraw_line(selection_);
+            selection_ = l; redraw_line(l);
+            display(l);
+            return 1;
+        }
+      }
+    }
+  }
+  
+  if (Group::handle(event)) return 1;
+  if (wp.deleted()) return 1;
+  
+  int X, Y, W, H; bbox(X, Y, W, H);
+  int my;
+  // NOTE:
+  // instead of:
+  //     change = select_only(find_item(my), when() & fltk3::WHEN_CHANGED)
+  // we use the construct:
+  //     change = select_only(find_item(my), 0);
+  //     if (change && (when() & fltk3::WHEN_CHANGED)) {
+  //	 set_changed();
+  //       do_callback();
+  //     }
+  // See str #834
+  // The first form calls the callback *before* setting change.
+  // The callback may execute an fltk3::wait(), resulting in another
+  // call of fltk3::Browser_::handle() for the same widget. The sequence
+  // of events can be an fltk3::PUSH followed by an fltk3::RELEASE.
+  // This second call of fltk3::Browser_::handle() may result in a -
+  // somewhat unexpected - second concurrent invocation of the callback.
+  
+  static char change;
+  static char whichway;
+  static int py;
+  switch (event) {
+    case fltk3::PUSH:
+      if (!fltk3::event_inside(X, Y, W, H)) return 0;
+      if (fltk3::visible_focus()) {
+        fltk3::focus(this);
+        redraw();
+      }
+      my = py = fltk3::event_y();
+      change = 0;
+      if (type() == fltk3::NORMAL_BROWSER || !top_)
+        ;
+      else if (type() != fltk3::MULTI_BROWSER) {
+        change = select_only(find_item(my), 0);
+        if (wp.deleted()) return 1;
+        if (change && (when() & fltk3::WHEN_CHANGED)) {
+          set_changed();
+          do_callback();
+          if (wp.deleted()) return 1;
+        }
+      } else {
+        void* l = find_item(my);
+        whichway = 1;
+        if (fltk3::event_state(fltk3::CTRL)) { // toggle selection:
+        TOGGLE:
+          if (l) {
+            whichway = !item_selected(l);
+            change = select(l, whichway, 0);
+            if (wp.deleted()) return 1;
+            if (change && (when() & fltk3::WHEN_CHANGED)) {
+              set_changed();
+              do_callback();
+              if (wp.deleted()) return 1;
+            }
+          }
+        } else if (fltk3::event_state(fltk3::SHIFT)) { // extend selection:
+          if (l == selection_) goto TOGGLE;
+          // state of previous selection determines new value:
+          whichway = l ? !item_selected(l) : 1;
+          // see which of the new item or previous selection is earlier,
+          // by searching from the previous forward for this one:
+          int down;
+          if (!l) down = 1;
+          else {for (void* m = selection_; ; m = item_next(m)) {
+            if (m == l) {down = 1; break;}
+            if (!m) {down = 0; break;}
+          }}
+          if (down) {
+            for (void* m = selection_; m != l; m = item_next(m)) {
+              select(m, whichway, when() & fltk3::WHEN_CHANGED);
+              if (wp.deleted()) return 1;
+            }
+          } else {
+            void* e = selection_;
+            for (void* m = item_next(l); m; m = item_next(m)) {
+              select(m, whichway, when() & fltk3::WHEN_CHANGED);
+              if (wp.deleted()) return 1;
+              if (m == e) break;
+            }
+          }
+          // do the clicked item last so the select box is around it:
+          change = 1;
+          if (l) select(l, whichway, when() & fltk3::WHEN_CHANGED);
+          if (wp.deleted()) return 1;
+        } else { // select only this item
+          change = select_only(l, 0);
+          if (wp.deleted()) return 1;
+          if (change && (when() & fltk3::WHEN_CHANGED)) {
+            set_changed();
+            do_callback();
+            if (wp.deleted()) return 1;
+          }
+        }
+      }
+      return 1;
+    case fltk3::DRAG:
+      // do the scrolling first:
+      my = fltk3::event_y();
+      if (my < Y && my < py) {
+        int p = real_position_+my-Y;
+        if (p<0) p = 0;
+        position(p);
+      } else if (my > (Y+H) && my > py) {
+        int p = real_position_+my-(Y+H);
+        int hh = full_height()-H; if (p > hh) p = hh;
+        if (p<0) p = 0;
+        position(p);
+      }
+      if (type() == fltk3::NORMAL_BROWSER || !top_)
+        ;
+      else if (type() == fltk3::MULTI_BROWSER) {
+        void* l = find_item(my);
+        void* t; void* b; // this will be the range to change
+        if (my > py) { // go down
+          t = selection_ ? item_next(selection_) : 0;
+          b = l ? item_next(l) : 0;
+        } else {	// go up
+          t = l;
+          b = selection_;
+        }
+        for (; t && t != b; t = item_next(t)) {
+          char change_t;
+          change_t = select(t, whichway, 0);
+          if (wp.deleted()) return 1;
+          change |= change_t;
+          if (change_t && (when() & fltk3::WHEN_CHANGED)) {
+            set_changed();
+            do_callback();
+            if (wp.deleted()) return 1;
+          }
+        }
+        if (l) selection_ = l;
+      } else {
+        void* l1 = selection_;
+        void* l =
+	(fltk3::event_x()<x() || fltk3::event_x()>x()+w()) ? selection_ :
+	find_item(my);
+        change = (l != l1);
+        select_only(l, when() & fltk3::WHEN_CHANGED);
+        if (wp.deleted()) return 1;
+      }
+      py = my;
+      return 1;
+    case fltk3::RELEASE:
+      if (type() == fltk3::SELECT_BROWSER) {
+        void* t = selection_;
+        deselect();
+        if (wp.deleted()) return 1;
+        selection_ = t;
+      }
+      if (change) {
+        set_changed();
+        if (when() & fltk3::WHEN_RELEASE) do_callback();
+      } else {
+        if (when() & fltk3::WHEN_NOT_CHANGED) do_callback();
+      }
+      if (wp.deleted()) return 1;
+      
+      // double click calls the callback: (like Enter Key)
+      if (fltk3::event_clicks() && (when() & fltk3::WHEN_ENTER_KEY)) {
+        set_changed();
+        do_callback();
+      }
+      return 1;
+    case fltk3::FOCUS:
+    case fltk3::UNFOCUS:
+      if (type() >= fltk3::HOLD_BROWSER && fltk3::visible_focus()) {
+        redraw();
+        return 1;
+      } else return 0;
+  }
+  
+  return 0;
+}
+
+/**
+ The constructor makes an empty browser.
+ \param[in] X,Y,W,H position and size.
+ \param[in] L The label string, may be NULL.
+ */
+fltk3::Browser_::Browser_(int X, int Y, int W, int H, const char* L)
+: fltk3::Group(X, Y, W, H, L),
+scrollbar(0, 0, 0, 0, 0), // they will be resized by draw()
+hscrollbar(0, 0, 0, 0, 0)
+{
+  box(fltk3::NO_BOX);
+  align(fltk3::ALIGN_BOTTOM);
+  position_ = real_position_ = 0;
+  hposition_ = real_hposition_ = 0;
+  offset_ = 0;
+  top_ = 0;
+  when(fltk3::WHEN_RELEASE_ALWAYS);
+  selection_ = 0;
+  color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
+  scrollbar.callback(scrollbar_callback);
+  //scrollbar.align(fltk3::ALIGN_LEFT|fltk3::ALIGN_BOTTOM); // back compatibility?
+  hscrollbar.callback(hscrollbar_callback);
+  hscrollbar.type(fltk3::HORIZONTAL);
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
+  has_scrollbar_ = BOTH;
+  max_width = 0;
+  max_width_item = 0;
+  scrollbar_size_ = 0;
+  redraw1 = redraw2 = 0;
+  end();
+}
+
+/**
+ Sort the items in the browser based on \p flags.
+ item_swap(void*, void*) and item_text(void*) must be implemented for this call.
+ \param[in] flags fltk3::SORT_ASCENDING -- sort in ascending order\n
+ fltk3::SORT_DESCENDING -- sort in descending order\n
+ Values other than the above will cause undefined behavior\n
+ Other flags may appear in the future.
+ \todo Add a flag to ignore case
+ */
+void fltk3::Browser_::sort(int flags) {
+  //
+  // Simple bubble sort - pure lazyness on my side.
+  //
+  int i, j, n = -1, desc = ((flags&fltk3::SORT_DESCENDING)==fltk3::SORT_DESCENDING);
+  void *a =item_first(), *b, *c;
+  if (!a) return;
+  while (a) {
+    a = item_next(a);
+    n++;
+  }
+  for (i=n; i>0; i--) {
+    char swapped = 0;
+    a = item_first();
+    b = item_next(a);
+    for (j=0; j<i; j++) {
+      const char *ta = item_text(a);
+      const char *tb = item_text(b);
+      c = item_next(b);
+      if (desc) {
+        if (strcmp(ta, tb)<0) {
+          item_swap(a, b);
+          swapped = 1;
+        }
+      } else {
+        if (strcmp(ta, tb)>0) {
+          item_swap(a, b);
+          swapped = 1;
+        }
+      }
+      if (!c) break;
+      b = c; a = item_prev(b);
+    }
+    if (!swapped)
+      break;
+  }
+}
+
+// Default versions of some of the virtual functions:
+
+/**
+ This method may be provided by the subclass to return the height of the
+ \p item, in pixels.  
+ Allow for two additional pixels for the list selection box.
+ This method differs from item_height in that it is only called for 
+ selection and scrolling operations. 
+ The default implementation calls item_height.
+ \param[in] item The item whose height to return.
+ \returns The height, in pixels.
+ */
+int fltk3::Browser_::item_quick_height(void* item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_quick_height(item), BrowserItemQuickHeight)
+  return item_height(item);
+}
+
+/**
+ This method may be provided to return the average height of all items
+ to be used for scrolling. 
+ The default implementation uses the height of the first item.
+ \returns The average height of items, in pixels.
+ */
+int fltk3::Browser_::incr_height() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, incr_height(), BrowserIncrHeight)
+  return item_quick_height(item_first());
+}
+
+/**
+ This method may be provided by the subclass to indicate the full height
+ of the item list, in pixels. 
+ The default implementation computes the full height from the item heights. 
+ Includes the items that are scrolled off screen.
+ \returns The height of the entire list, in pixels.
+ */
+int fltk3::Browser_::full_height() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, full_height(), BrowserFullHeight)
+  int t = 0;
+  for (void* p = item_first(); p; p = item_next(p))
+    t += item_quick_height(p);
+  return t;
+}
+
+/**
+ This method may be provided by the subclass to indicate the full width
+ of the item list, in pixels. 
+ The default implementation computes the full width from the item widths.
+ \returns The maximum width of all the items, in pixels.
+ */
+int fltk3::Browser_::full_width() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, full_width(), BrowserFullWidth)
+  return max_width;
+}
+
+/**
+ This method must be implemented by the subclass if it supports 
+ multiple selections; sets the selection state to \p val for the \p item.
+ Sets the selection state for \p item, where optional \p val is 1 (select, the default)
+ or 0 (de-select).
+ \param[in] item The item to be selected
+ \param[in] val The optional selection state; 1=select, 0=de-select.\n
+ The default is to select the item (1).
+ */
+void fltk3::Browser_::item_select(void *item, int val) {
+  FLTK3_OBJECT_VCALLS_WRAPPER(item_select(item, val), BrowserItemSelect)
+}
+
+/**
+ This method must be implemented by the subclass if it supports
+ multiple selections; returns the selection state for \p item.
+ The method should return 1 if \p item is selected, or 0 otherwise.
+ \param[in] item The item to test.
+ */
+int fltk3::Browser_::item_selected(void* item) const { 
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_selected(item), BrowserItemSelected)
+  return item==selection_ ? 1 : 0; 
+}
+
+void *fltk3::Browser_::item_first() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_first(), BrowserItemFirst)
+  return 0;
+}
+
+void *fltk3::Browser_::item_next(void *item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_next(item), BrowserItemNext)
+  return 0;
+}
+
+void *fltk3::Browser_::item_prev(void *item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_prev(item), BrowserItemPrev)
+  return 0;
+}
+
+void *fltk3::Browser_::item_last() const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void*, item_last(), BrowserItemLast)
+  return 0;
+}
+
+int fltk3::Browser_::item_height(void *item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_height(item), BrowserItemHeight)
+  return 0;
+}
+
+int fltk3::Browser_::item_width(void *item) const { 
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, item_width(item), BrowserItemWidth)
+  return 0;
+}
+
+void fltk3::Browser_::item_draw(void *item,int X,int Y,int W,int H) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER(item_draw(item, X, Y, W, H), BrowserItemDraw)
+}
+
+const char *fltk3::Browser_::item_text(void *item) const {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(const char *, item_text(item), BrowserItemText)
+  return 0L;
+}
+
+void fltk3::Browser_::item_swap(void *a,void *b) { 
+  FLTK3_OBJECT_VCALLS_WRAPPER(item_swap(a, b), BrowserItemSwap)
+}
+
+void *fltk3::Browser_::item_at(int index) const { 
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(void *, item_at(index), BrowserItemAt)
+  return 0L; 
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Browser_.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Browser_load.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Browser_load.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Browser_load.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,70 @@
+//
+// "$Id$"
+//
+// File loading routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Browser.h>
+#include <stdio.h>
+#include <fltk3/utf8.h>
+
+/**
+  Clears the browser and reads the file, adding each line from the file
+  to the browser.  If the filename is NULL or a zero-length
+  string then this just clears the browser.  This returns zero if there
+  was any error in opening or reading the file, in which case errno
+  is set to the system error.  The data() of each line is set
+  to NULL.
+  \param[in] filename The filename to load
+  \returns 1 if OK, 0 on error (errno has reason)
+  \see add()
+*/
+int fltk3::Browser::load(const char *filename) {
+#define MAXFL_BLINE 1024
+    char newtext[MAXFL_BLINE];
+    int c;
+    int i;
+    clear();
+    if (!filename || !(filename[0])) return 1;
+    FILE *fl = fltk3::fopen(filename,"r");
+    if (!fl) return 0;
+    i = 0;
+    do {
+	c = getc(fl);
+	if (c == '\n' || c <= 0 || i>=(MAXFL_BLINE-1)) {
+	    newtext[i] = 0;
+	    add(newtext);
+	    i = 0;
+	} else {
+	    newtext[i++] = c;
+	}
+    } while (c >= 0);
+    fclose(fl);
+    return 1;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Browser_load.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,220 @@
+//
+// "$Id$"
+//
+// Button widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Button.h>
+#include <fltk3/Group.h>
+#include <fltk3/Window.h>
+
+
+fltk3::WidgetTracker *fltk3::Button::key_release_tracker = 0;
+
+
+// There are a lot of subclasses, named Fl_*_Button.  Some of
+// them are implemented by setting the type() value and testing it
+// here.  This includes fltk3::RadioButton and fltk3::ToggleButton
+
+/**
+  Sets the current value of the button.
+  A non-zero value sets the button to 1 (ON), and zero sets it to 0 (OFF).
+  \param[in] v button value.
+  \see set(), clear()
+ */
+int fltk3::Button::value(int v) {
+  v = v ? 1 : 0;
+  oldval = v;
+  clear_changed();
+  if (value_ != v) {
+    value_ = v;
+    if (box()) redraw();
+    else redraw_label();
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+/**
+  Turns on this button and turns off all other radio buttons in the group
+  (calling \c value(1) or \c set() does not do this).
+ */
+void fltk3::Button::setonly() { // set this radio button on, turn others off
+  value(1);
+  fltk3::Group* g = parent();
+  fltk3::Widget*const* a = g->array();
+  for (int i = g->children(); i--;) {
+    fltk3::Widget* o = *a++;
+    if (o != this && o->type()==fltk3::RADIO_BUTTON) ((fltk3::Button*)o)->value(0);
+  }
+}
+
+void fltk3::Button::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (type() == fltk3::HIDDEN_BUTTON) return;
+  fltk3::Color col = value() ? selection_color() : color();
+  draw_box(value() ? (down_box()?down_box():fltk3::down(box())) : box(), col);
+  draw_backdrop();
+  if (labeltype() == fltk3::NORMAL_LABEL && value()) {
+    fltk3::Color c = labelcolor();
+    labelcolor(fltk3::contrast(c, col));
+    draw_label();
+    labelcolor(c);
+  } else draw_label();
+  if (fltk3::focus() == this) draw_focus();
+}
+
+int fltk3::Button::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  int newval;
+  switch (event) {
+  case fltk3::ENTER: /* FALLTHROUGH */
+  case fltk3::LEAVE:
+//  if ((value_?selection_color():color())==fltk3::GRAY) redraw();
+    return 1;
+  case fltk3::PUSH:
+    if (fltk3::visible_focus() && handle(fltk3::FOCUS)) fltk3::focus(this);
+  case fltk3::DRAG:
+    if (fltk3::event_inside(this)) {
+      if (type() == fltk3::RADIO_BUTTON) newval = 1;
+      else newval = !oldval;
+    } else
+    {
+      clear_changed();
+      newval = oldval;
+    }
+    if (newval != value_) {
+      value_ = newval;
+      set_changed();
+      redraw();
+      if (when() & fltk3::WHEN_CHANGED) do_callback();
+    }
+    return 1;
+  case fltk3::RELEASE:
+    if (value_ == oldval) {
+      if (when() & fltk3::WHEN_NOT_CHANGED) do_callback();
+      return 1;
+    }
+    set_changed();
+    if (type() == fltk3::RADIO_BUTTON) setonly();
+    else if (type() == fltk3::TOGGLE_BUTTON) oldval = value_;
+    else {
+      value(oldval);
+      set_changed();
+      if (when() & fltk3::WHEN_CHANGED) {
+	fltk3::WidgetTracker wp(this);
+        do_callback();
+        if (wp.deleted()) return 1;
+      }
+    }
+    if (when() & fltk3::WHEN_RELEASE) do_callback();
+    return 1;
+  case fltk3::SHORTCUT:
+    if (!(shortcut() ?
+	  fltk3::test_shortcut(shortcut()) : test_shortcut())) return 0;    
+    if (fltk3::visible_focus() && handle(fltk3::FOCUS)) fltk3::focus(this);
+    goto triggered_by_keyboard;
+  case fltk3::FOCUS : /* FALLTHROUGH */
+  case fltk3::UNFOCUS :
+    if (fltk3::visible_focus()) {
+      if (box() == fltk3::NO_BOX) {
+	// Widgets with the fltk3::NO_BOX boxtype need a parent to
+	// redraw, since it is responsible for redrawing the
+	// background...
+	int X = x() > 0 ? x() - 1 : 0;
+	int Y = y() > 0 ? y() - 1 : 0;
+	if (window()) window()->damage(fltk3::DAMAGE_ALL, X, Y, w() + 2, h() + 2);
+      } else redraw();
+      return 1;
+    } else return 0;
+  case fltk3::KEYBOARD :
+    if (fltk3::focus() == this && fltk3::event_key() == ' ' &&
+        !(fltk3::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
+      set_changed();
+    triggered_by_keyboard:
+      fltk3::WidgetTracker wp(this);
+      if (type() == fltk3::RADIO_BUTTON && !value_) {
+	setonly();
+	if (when() & fltk3::WHEN_CHANGED) do_callback();
+      } else if (type() == fltk3::TOGGLE_BUTTON) {
+	value(!value());
+	if (when() & fltk3::WHEN_CHANGED) do_callback();
+      } else {
+        simulate_key_action();
+      }
+      if (wp.deleted()) return 1;
+      if (when() & fltk3::WHEN_RELEASE) do_callback();
+      return 1;
+    }
+  default:
+    return 0;
+  }
+}
+
+void fltk3::Button::simulate_key_action()
+{
+  if (key_release_tracker) {
+    fltk3::remove_timeout(key_release_timeout, key_release_tracker);
+    key_release_timeout(key_release_tracker);
+  }
+  value(1); 
+  redraw();
+  key_release_tracker = new fltk3::WidgetTracker(this);
+  fltk3::add_timeout(0.15, key_release_timeout, key_release_tracker);
+}
+
+void fltk3::Button::key_release_timeout(void *d)
+{
+  fltk3::WidgetTracker *wt = (fltk3::WidgetTracker*)d;
+  if (!wt)
+    return;
+  if (wt==key_release_tracker) 
+    key_release_tracker = 0L;
+  fltk3::Button *btn = (fltk3::Button*)wt->widget();
+  if (btn) {
+    btn->value(0);
+    btn->redraw();
+  }
+  delete wt;
+}
+
+/**
+  The constructor creates the button using the given position, size and label.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::Button::Button(int X, int Y, int W, int H, const char *L)
+: fltk3::Widget(X,Y,W,H,L) {
+  box(fltk3::UP_BOX);
+  down_box(fltk3::NO_BOX);
+  value_ = oldval = 0;
+  shortcut_ = 0;
+  set_flag(SHORTCUT_LABEL);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Chart.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Chart.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Chart.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,436 @@
+//
+// "$Id$"
+//
+// Forms-compatible chart widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/math.h>
+#include <fltk3/run.h>
+#include <fltk3/Chart.h>
+#include <fltk3/draw.h>
+#include "flstring.h"
+#include <stdlib.h>
+
+#define ARCINC	(2.0*M_PI/360.0)
+
+// this function is in fl_boxtype.cxx:
+void fl_rectbound(int x,int y,int w,int h, fltk3::Color color);
+
+/* Widget specific information */
+
+static void draw_barchart(int x,int y,int w,int h,
+			  int numb, fltk3::CHART_ENTRY entries[],
+			  double min, double max, int autosize, int maxnumb,
+			  fltk3::Color textcolor)
+/* Draws a bar chart. x,y,w,h is the bounding box, entries the array of
+   numb entries and min and max the boundaries. */
+{
+  double incr;
+  int zeroh;
+  double lh = fltk3::height();
+  if (max == min) incr = h;
+  else incr = h/(max-min);
+  if ( (-min*incr) < lh) {
+      incr = (h - lh + min*incr)/(max-min);
+      zeroh = int(y+h-lh);
+  } else {
+      zeroh = (int)rint(y+h+min * incr);
+  }
+  int bwidth = (int)rint(w/double(autosize?numb:maxnumb));
+  /* Draw base line */
+  fltk3::color(textcolor);
+  fltk3::line(x, zeroh, x+w, zeroh);
+  if (min == 0.0 && max == 0.0) return; /* Nothing else to draw */
+  int i;
+  /* Draw the bars */
+  for (i=0; i<numb; i++) {
+      int hh = (int)rint(entries[i].val*incr);
+      if (hh < 0)
+	fl_rectbound(x+i*bwidth,zeroh,bwidth+1,-hh+1, (fltk3::Color)entries[i].col);
+      else if (hh > 0)
+	fl_rectbound(x+i*bwidth,zeroh-hh,bwidth+1,hh+1,(fltk3::Color)entries[i].col);
+  }
+  /* Draw the labels */
+  fltk3::color(textcolor);
+  for (i=0; i<numb; i++)
+      fltk3::draw(entries[i].str,
+	      x+i*bwidth+bwidth/2,zeroh,0,0,
+	      fltk3::ALIGN_TOP);
+}
+
+static void draw_horbarchart(int x,int y,int w,int h,
+			     int numb, fltk3::CHART_ENTRY entries[],
+			     double min, double max, int autosize, int maxnumb,
+			     fltk3::Color textcolor)
+/* Draws a horizontal bar chart. x,y,w,h is the bounding box, entries the
+   array of numb entries and min and max the boundaries. */
+{
+  int i;
+  double lw = 0.0;		/* Maximal label width */
+  /* Compute maximal label width */
+  for (i=0; i<numb; i++) {
+      double w1 = fltk3::width(entries[i].str);
+      if (w1 > lw) lw = w1;
+  }
+  if (lw > 0.0) lw += 4.0;
+  double incr;
+  int zeroh;
+  if (max == min) incr = w;
+  else incr = w/(max-min);
+  if ( (-min*incr) < lw) {
+      incr = (w - lw + min*incr)/(max-min);
+      zeroh = x+(int)rint(lw);
+  } else {
+      zeroh = (int)rint(x-min * incr);
+  }
+  int bwidth = (int)rint(h/double(autosize?numb:maxnumb));
+  /* Draw base line */
+  fltk3::color(textcolor);
+  fltk3::line(zeroh, y, zeroh, y+h);
+  if (min == 0.0 && max == 0.0) return; /* Nothing else to draw */
+  /* Draw the bars */
+  for (i=0; i<numb; i++) {
+      int ww = (int)rint(entries[i].val*incr);
+      if (ww > 0)
+	fl_rectbound(zeroh,y+i*bwidth,ww+1,bwidth+1, (fltk3::Color)entries[i].col);
+      else if (ww < 0)
+	fl_rectbound(zeroh+ww,y+i*bwidth,-ww+1,bwidth+1,(fltk3::Color)entries[i].col);
+  }
+  /* Draw the labels */
+  fltk3::color(textcolor);
+  for (i=0; i<numb; i++)
+      fltk3::draw(entries[i].str,
+	      zeroh-2,y+i*bwidth+bwidth/2,0,0,
+	      fltk3::ALIGN_RIGHT);
+}
+
+static void draw_linechart(int type, int x,int y,int w,int h,
+			   int numb, fltk3::CHART_ENTRY entries[],
+			   double min, double max, int autosize, int maxnumb,
+			   fltk3::Color textcolor)
+/* Draws a line chart. x,y,w,h is the bounding box, entries the array of
+   numb entries and min and max the boundaries. */
+{
+  int i;
+  double lh = fltk3::height();
+  double incr;
+  if (max == min) incr = h-2.0*lh;
+  else incr = (h-2.0*lh)/ (max-min);
+  int zeroh = (int)rint(y+h-lh+min * incr);
+  double bwidth = w/double(autosize?numb:maxnumb);
+  /* Draw the values */
+  for (i=0; i<numb; i++) {
+      int x0 = x + (int)rint((i-.5)*bwidth);
+      int x1 = x + (int)rint((i+.5)*bwidth);
+      int yy0 = i ? zeroh - (int)rint(entries[i-1].val*incr) : 0;
+      int yy1 = zeroh - (int)rint(entries[i].val*incr);
+      if (type == fltk3::SPIKE_CHART) {
+	  fltk3::color((fltk3::Color)entries[i].col);
+	  fltk3::line(x1, zeroh, x1, yy1);
+      } else if (type == fltk3::LINE_CHART && i != 0) {
+	  fltk3::color((fltk3::Color)entries[i-1].col);
+	  fltk3::line(x0,yy0,x1,yy1);
+      } else if (type == fltk3::FILLED_CHART && i != 0) {
+	  fltk3::color((fltk3::Color)entries[i-1].col);
+	  if ((entries[i-1].val>0.0)!=(entries[i].val>0.0)) {
+	      double ttt = entries[i-1].val/(entries[i-1].val-entries[i].val);
+	      int xt = x + (int)rint((i-.5+ttt)*bwidth);
+	      fltk3::polygon(x0,zeroh, x0,yy0, xt,zeroh);
+	      fltk3::polygon(xt,zeroh, x1,yy1, x1,zeroh);
+	  } else {
+	      fltk3::polygon(x0,zeroh, x0,yy0, x1,yy1, x1,zeroh);
+	  }
+	  fltk3::color(textcolor);
+	  fltk3::line(x0,yy0,x1,yy1);
+      }
+  }
+  /* Draw base line */
+  fltk3::color(textcolor);
+  fltk3::line(x,zeroh,x+w,zeroh);
+  /* Draw the labels */
+  for (i=0; i<numb; i++)
+      fltk3::draw(entries[i].str,
+	      x+(int)rint((i+.5)*bwidth), zeroh - (int)rint(entries[i].val*incr),0,0,
+	      entries[i].val>=0 ? fltk3::ALIGN_BOTTOM : fltk3::ALIGN_TOP);
+}
+
+static void draw_piechart(int x,int y,int w,int h,
+			  int numb, fltk3::CHART_ENTRY entries[], int special,
+			  fltk3::Color textcolor)
+/* Draws a pie chart. x,y,w,h is the bounding box, entries the array of
+   numb entries */
+{
+  int i;
+  double xc,yc,rad;	/* center and radius */
+  double tot;		/* sum of values */
+  double incr;		/* increment in angle */
+  double curang;		/* current angle we are drawing */
+  double txc,tyc;	/* temporary center */
+  double lh = fltk3::height();
+  /* compute center and radius */
+  double h_denom = (special ? 2.3 : 2.0);
+  rad = (h - 2*lh)/h_denom/1.1;
+  xc = x+w/2.0; yc = y+h-1.1*rad-lh;
+  /* compute sum of values */
+  tot = 0.0;
+  for (i=0; i<numb; i++)
+    if (entries[i].val > 0.0) tot += entries[i].val;
+  if (tot == 0.0) return;
+  incr = 360.0/tot;
+  /* Draw the pie */
+  curang = 0.0;
+  for (i=0; i<numb; i++)
+    if (entries[i].val > 0.0)
+    {
+      txc = xc; tyc = yc;
+      /* Correct for special pies */
+      if (special && i==0)
+      {
+        txc += 0.3*rad*cos(ARCINC*(curang+0.5*incr*entries[i].val));
+        tyc -= 0.3*rad*sin(ARCINC*(curang+0.5*incr*entries[i].val));
+      }
+      fltk3::color((fltk3::Color)entries[i].col);
+      fltk3::begin_polygon(); fltk3::vertex(txc,tyc);
+      fltk3::arc(txc,tyc,rad,curang, curang+incr*entries[i].val);
+      fltk3::end_polygon();
+      fltk3::color(textcolor);
+      fltk3::begin_loop(); fltk3::vertex(txc,tyc);
+      fltk3::arc(txc,tyc,rad,curang, curang+incr*entries[i].val);
+      fltk3::end_loop();
+      curang += 0.5 * incr * entries[i].val;
+      /* draw the label */
+      double xl = txc + 1.1*rad*cos(ARCINC*curang);
+      fltk3::draw(entries[i].str,
+	      (int)rint(xl),
+	      (int)rint(tyc - 1.1*rad*sin(ARCINC*curang)),
+	      0, 0,
+	      xl<txc ? fltk3::ALIGN_RIGHT : fltk3::ALIGN_LEFT);
+      curang += 0.5 * incr * entries[i].val;
+    }
+}
+
+void fltk3::Chart::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+    draw_box();
+    fltk3::Boxtype b = box();
+    int xx = x()+fltk3::box_dx(b); // was 9 instead of dx...
+    int yy = y()+fltk3::box_dy(b);
+    int ww = w()-fltk3::box_dw(b);
+    int hh = h()-fltk3::box_dh(b);
+    fltk3::push_clip(xx, yy, ww, hh);
+
+    ww--; hh--; // adjust for line thickness
+
+    if (min >= max) {
+	min = max = 0.0;
+	for (int i=0; i<numb; i++) {
+	    if (entries[i].val < min) min = entries[i].val;
+	    if (entries[i].val > max) max = entries[i].val;
+	}
+    }
+
+    fltk3::font(textfont(),textsize());
+
+    switch (type()) {
+    case fltk3::BAR_CHART:
+	ww++; // makes the bars fill box correctly
+	draw_barchart(xx,yy,ww,hh, numb, entries, min, max,
+			autosize(), maxnumb, textcolor());
+	break;
+    case fltk3::HORBAR_CHART:
+	hh++; // makes the bars fill box correctly
+	draw_horbarchart(xx,yy,ww,hh, numb, entries, min, max,
+			autosize(), maxnumb, textcolor());
+	break;
+    case fltk3::PIE_CHART:
+	draw_piechart(xx,yy,ww,hh,numb,entries,0, textcolor());
+	break;
+    case fltk3::SPECIALPIE_CHART:
+	draw_piechart(xx,yy,ww,hh,numb,entries,1,textcolor());
+	break;
+    default:
+	draw_linechart(type(),xx,yy,ww,hh, numb, entries, min, max,
+			autosize(), maxnumb, textcolor());
+	break;
+    }
+    draw_label();
+    fltk3::pop_clip();
+}
+
+/*------------------------------*/
+
+#define FL_CHART_BOXTYPE	fltk3::BORDER_BOX
+#define FL_CHART_COL1		FL_COL1
+#define FL_CHART_LCOL		FL_LCOL
+#define FL_CHART_ALIGN		fltk3::ALIGN_BOTTOM
+
+/**
+  Create a new fltk3::Chart widget using the given position, size and label string.
+  The default boxstyle is \c fltk3::NO_BOX.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::Chart::Chart(int X, int Y, int W, int H,const char *L) :
+fltk3::Widget(X,Y,W,H,L) {
+  box(fltk3::BORDER_BOX);
+  align(fltk3::ALIGN_BOTTOM);
+  numb       = 0;
+  maxnumb    = 0;
+  sizenumb   = fltk3::CHART_MAX;
+  autosize_  = 1;
+  min = max  = 0;
+  textfont(fltk3::HELVETICA);
+  textsize(10);
+  textcolor(fltk3::FOREGROUND_COLOR);
+  entries    = (fltk3::CHART_ENTRY *)calloc(sizeof(fltk3::CHART_ENTRY), fltk3::CHART_MAX + 1);
+}
+
+/**
+  Destroys the fltk3::Chart widget and all of its data.
+ */
+fltk3::Chart::~Chart() {
+  free(entries);
+}
+
+/**
+  Removes all values from the chart.
+ */
+void fltk3::Chart::clear() {
+  numb = 0;
+  min = max = 0;
+  redraw();
+}
+
+/**
+  Add the data value \p val with optional label \p str and color \p col
+  to the chart.
+  \param[in] val data value
+  \param[in] str optional data label
+  \param[in] col optional data color
+ */
+void fltk3::Chart::add(double val, const char *str, unsigned col) {
+  /* Allocate more entries if required */
+  if (numb >= sizenumb) {
+    sizenumb += fltk3::CHART_MAX;
+    entries = (fltk3::CHART_ENTRY *)realloc(entries, sizeof(fltk3::CHART_ENTRY) * (sizenumb + 1));
+  }
+  // Shift entries as needed
+  if (numb >= maxnumb && maxnumb > 0) {
+    memmove(entries, entries + 1, sizeof(fltk3::CHART_ENTRY) * (numb - 1));
+    numb --;
+  }
+  entries[numb].val = float(val);
+  entries[numb].col = col;
+    if (str) {
+	strlcpy(entries[numb].str,str,fltk3::CHART_LABEL_MAX + 1);
+    } else {
+	entries[numb].str[0] = 0;
+    }
+  numb++;
+  redraw();
+}
+
+/**
+  Inserts a data value \p val at the given position \p ind.
+  Position 1 is the first data value.
+  \param[in] ind insertion position
+  \param[in] val data value
+  \param[in] str optional data label
+  \param[in] col optional data color
+ */
+void fltk3::Chart::insert(int ind, double val, const char *str, unsigned col) {
+  int i;
+  if (ind < 1 || ind > numb+1) return;
+  /* Allocate more entries if required */
+  if (numb >= sizenumb) {
+    sizenumb += fltk3::CHART_MAX;
+    entries = (fltk3::CHART_ENTRY *)realloc(entries, sizeof(fltk3::CHART_ENTRY) * (sizenumb + 1));
+  }
+  // Shift entries as needed
+  for (i=numb; i >= ind; i--) entries[i] = entries[i-1];
+  if (numb < maxnumb || maxnumb == 0) numb++;
+  /* Fill in the new entry */
+  entries[ind-1].val = float(val);
+  entries[ind-1].col = col;
+  if (str) {
+      strlcpy(entries[ind-1].str,str,fltk3::CHART_LABEL_MAX+1);
+  } else {
+      entries[ind-1].str[0] = 0;
+  }
+  redraw();
+}
+
+/**
+  Replace a data value \p val at the given position \p ind.
+  Position 1 is the first data value.
+  \param[in] ind insertion position
+  \param[in] val data value
+  \param[in] str optional data label
+  \param[in] col optional data color
+ */
+void fltk3::Chart::replace(int ind,double val, const char *str, unsigned col) {
+  if (ind < 1 || ind > numb) return;
+  entries[ind-1].val = float(val);
+  entries[ind-1].col = col;
+  if (str) {
+      strlcpy(entries[ind-1].str,str,fltk3::CHART_LABEL_MAX+1);
+  } else {
+      entries[ind-1].str[0] = 0;
+  }
+  redraw();
+}
+
+/**
+  Sets the lower and upper bounds of the chart values.
+  \param[in] a, b are used to set lower, upper
+ */
+void fltk3::Chart::bounds(double a, double b) {
+  this->min = a;
+  this->max = b;
+  redraw();
+}
+
+/**
+  Set the maximum number of data values for a chart.
+  If you do not call this method then the chart will be allowed to grow
+  to any size depending on available memory.
+  \param[in] m maximum number of data values allowed.
+ */
+void fltk3::Chart::maxsize(int m) {
+  int i;
+  /* Fill in the new number */
+  if (m < 0) return;
+  maxnumb = m;
+  /* Shift entries if required */
+  if (numb > maxnumb) {
+      for (i = 0; i<maxnumb; i++)
+	  entries[i] = entries[i+numb-maxnumb];
+      numb = maxnumb;
+      redraw();
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Chart.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Check_Browser.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Check_Browser.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Check_Browser.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,330 @@
+//
+// "$Id$"
+//
+// fltk3::CheckBrowser header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+#include <fltk3/draw.h>
+#include <fltk3/CheckBrowser.h>
+
+/* This uses a cache for faster access when you're scanning the list
+either forwards or backwards. */
+
+fltk3::CheckBrowser::cb_item *fltk3::CheckBrowser::find_item(int n) const {
+	int i = n;
+	cb_item *p = first;
+
+	if (n <= 0 || n > nitems_ || p == 0) {
+		return 0;
+	}
+
+	if (n == cached_item) {
+		p = cache;
+		n = 1;
+	} else if (n == cached_item + 1) {
+		p = cache->next;
+		n = 1;
+	} else if (n == cached_item - 1) {
+		p = cache->prev;
+		n = 1;
+	}
+
+	while (--n) {
+		p = p->next;
+	}
+
+	/* Cast to not const and cache it. */
+
+	((fltk3::CheckBrowser *)this)->cache = p;
+	((fltk3::CheckBrowser *)this)->cached_item = i;
+
+	return p;
+}
+
+int fltk3::CheckBrowser::lineno(cb_item *p0) const {
+	cb_item *p = first;
+
+	if (p == 0) {
+		return 0;
+	}
+
+	int i = 1;
+	while (p) {
+		if (p == p0) {
+			return i;
+		}
+		i++;
+		p = p->next;
+	}
+
+	return 0;
+}
+
+fltk3::CheckBrowser::CheckBrowser(int X, int Y, int W, int H, const char *l)
+/**  The constructor makes an empty browser.*/
+: fltk3::Browser_(X, Y, W, H, l) {
+	type(fltk3::SELECT_BROWSER);
+	when(fltk3::WHEN_NEVER);
+	first = last = 0;
+	nitems_ = nchecked_ = 0;
+	cached_item = -1;
+}
+
+void *fltk3::CheckBrowser::item_first() const {
+	return first;
+}
+
+void *fltk3::CheckBrowser::item_next(void *l) const {
+	return ((cb_item *)l)->next;
+}
+
+void *fltk3::CheckBrowser::item_prev(void *l) const {
+	return ((cb_item *)l)->prev;
+}
+
+int fltk3::CheckBrowser::item_height(void *) const {
+	return textsize() + 2;
+}
+
+#define CHECK_SIZE (textsize()-2)
+
+int fltk3::CheckBrowser::item_width(void *v) const {
+	fltk3::font(textfont(), textsize());
+	return int(fltk3::width(((cb_item *)v)->text)) + CHECK_SIZE + 8;
+}
+
+void fltk3::CheckBrowser::item_draw(void *v, int X, int Y, int, int) const {
+	cb_item *i = (cb_item *)v;
+	char *s = i->text;
+	int tsize = textsize();
+	fltk3::Color col = active_r() ? textcolor() : fltk3::inactive(textcolor());
+	int cy = Y + (tsize + 1 - CHECK_SIZE) / 2;
+	X += 2;
+
+	fltk3::color(active_r() ? fltk3::FOREGROUND_COLOR : fltk3::inactive(fltk3::FOREGROUND_COLOR));
+	fltk3::loop(X, cy, X, cy + CHECK_SIZE,
+	        X + CHECK_SIZE, cy + CHECK_SIZE, X + CHECK_SIZE, cy);
+	if (i->checked) {
+	  int tx = X + 3;
+	  int tw = CHECK_SIZE - 4;
+	  int d1 = tw/3;
+	  int d2 = tw-d1;
+	  int ty = cy + (CHECK_SIZE+d2)/2-d1-2;
+	  for (int n = 0; n < 3; n++, ty++) {
+	    fltk3::line(tx, ty, tx+d1, ty+d1);
+	    fltk3::line(tx+d1, ty+d1, tx+tw-1, ty+d1-d2+1);
+	  }
+	}
+	fltk3::font(textfont(), tsize);
+	if (i->selected) {
+		col = fltk3::contrast(col, selection_color());
+	}
+	fltk3::color(col);
+	fltk3::draw(s, X + CHECK_SIZE + 8, Y + tsize - 1);
+}
+
+void fltk3::CheckBrowser::item_select(void *v, int state) {
+	cb_item *i = (cb_item *)v;
+
+	if (state) {
+		if (i->checked) {
+			i->checked = 0;
+			nchecked_--;
+		} else {
+			i->checked = 1;
+			nchecked_++;
+		}
+	}
+}
+
+int fltk3::CheckBrowser::item_selected(void *v) const {
+	cb_item *i = (cb_item *)v;
+	return i->selected;
+}
+/**
+ Add a new unchecked line to the end of the browser.  
+ \see add(char *s, int b)
+*/
+int fltk3::CheckBrowser::add(char *s) {
+	return (add(s, 0));
+}
+
+/** 
+ Add a new line to the end of the browser.  The text is copied
+ using the strdup() function.  It may also be NULL to make
+ a blank line.  It can set the item checked if \p b is not 0.
+ */
+int fltk3::CheckBrowser::add(char *s, int b) {
+	cb_item *p = (cb_item *)malloc(sizeof(cb_item));
+	p->next = 0;
+	p->prev = 0;
+	p->checked = b;
+	p->selected = 0;
+	p->text = strdup(s);
+
+	if (b) {
+		nchecked_++;
+	}
+
+	if (last == 0) {
+		first = last = p;
+	} else {
+		last->next = p;
+		p->prev = last;
+		last = p;
+	}
+	nitems_++;
+
+	return (nitems_);
+}
+
+/**
+  Remove line n and make the browser one line shorter. Returns the 
+  number of lines left in the browser.
+*/
+int fltk3::CheckBrowser::remove(int item) {
+  cb_item *p = find_item(item);
+  
+  // line at item exists
+  if(p) {
+    // tell the Browser_ what we will do
+    deleting(p);
+
+    // fix checked count
+    if(p->checked)
+      --nchecked_;
+    
+    // remove the node
+    if (p->prev) 
+      p->prev->next = p->next;
+    else 
+      first = p->next;
+    if (p->next) 
+      p->next->prev = p->prev;
+    else 
+      last = p->prev;
+    
+    free(p->text);
+    free(p);
+    
+    --nitems_;
+    cached_item = -1;
+  }
+  
+  return (nitems_);
+}
+
+/**  Remove every item from the browser.*/
+void fltk3::CheckBrowser::clear() {
+	cb_item *p = first;
+	cb_item *next;
+
+	if (p == 0) {
+		return;
+	}
+
+	new_list();
+	do {
+		next = p->next;
+		free(p->text);
+		free(p);
+		p = next;
+	} while (p);
+
+	first = last = 0;
+	nitems_ = nchecked_ = 0;
+	cached_item = -1;
+}
+
+/** Gets the current status of item item. */
+int fltk3::CheckBrowser::checked(int i) const {
+	cb_item *p = find_item(i);
+
+	if (p) return p->checked;
+	return 0;
+}
+
+/** Sets the check status of item item to b. */
+void fltk3::CheckBrowser::checked(int i, int b) {
+	cb_item *p = find_item(i);
+
+	if (p && (p->checked ^ b)) {
+		p->checked = b;
+		if (b) {
+			nchecked_++;
+		} else {
+			nchecked_--;
+		}
+		redraw();
+	}
+}
+
+/**  Returns the index of the currently selected item.*/
+int fltk3::CheckBrowser::value() const {
+	return lineno((cb_item *)selection());
+}
+
+/**  Return a pointer to an internal buffer holding item item's text.*/
+char *fltk3::CheckBrowser::text(int i) const {
+	cb_item *p = find_item(i);
+
+	if (p) return p->text;
+	return 0;
+}
+
+/**  Sets all the items checked.*/
+void fltk3::CheckBrowser::check_all() {
+	cb_item *p;
+
+	nchecked_ = nitems_;
+	for (p = first; p; p = p->next) {
+		p->checked = 1;
+	}
+	redraw();
+}
+
+/**  Sets all the items unchecked.*/
+void fltk3::CheckBrowser::check_none() {
+	cb_item *p;
+
+	nchecked_ = 0;
+	for (p = first; p; p = p->next) {
+		p->checked = 0;
+	}
+	redraw();
+}
+
+int fltk3::CheckBrowser::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (event==fltk3::PUSH)
+    deselect();
+  return Browser_::handle(event);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Check_Browser.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Check_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Check_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Check_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,47 @@
+//
+// "$Id$"
+//
+// Check button widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/CheckButton.h>
+
+// TODO Correct incorrect fltk3::CheckButton comments.
+// A subclass of fltk3::Button that always draws as a diamond box.  This
+// diamond is smaller than the widget size and can be surchecked by
+// another box type, for compatibility with Forms.
+
+/**
+  Creates a new fltk3::CheckButton widget using the given position, size and
+  label string.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::CheckButton::CheckButton(int X, int Y, int W, int H, const char *L)
+: fltk3::LightButton(X, Y, W, H, L) {
+  box(fltk3::NO_BOX);
+  down_box(fltk3::DOWN_BOX);
+  selection_color(fltk3::FOREGROUND_COLOR);
+}


Property changes on: branches/branch-3.0/src/core/Fl_Check_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Choice.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Choice.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Choice.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,216 @@
+//
+// "$Id$"
+//
+// Choice widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Choice.h>
+#include <fltk3/draw.h>
+#include <fltk3/Wrapper.h>
+#include "flstring.h"
+
+// Emulates the Forms choice widget.  This is almost exactly the same
+// as an fltk3::MenuButton.  The only difference is the appearance of the
+// button: it draws the text of the current pick and a down-arrow.
+
+void fltk3::Choice::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int dx = fltk3::box_dx(fltk3::DOWN_BOX);
+  int dy = fltk3::box_dy(fltk3::DOWN_BOX);
+  int H = h() - 2 * dy;
+  int W = (H > 20) ? 20 : H;
+  int X = x() + w() - W - dx;
+  int Y = y() + dy;
+  int w1 = (W - 4) / 3; if (w1 < 1) w1 = 1;
+  int x1 = X + (W - 2 * w1 - 1) / 2;
+  int y1 = Y + (H - w1 - 1) / 2;
+
+  if (fltk3::scheme()) {
+    draw_box(fltk3::UP_BOX, color());
+
+    fltk3::color(active_r() ? labelcolor() : fltk3::inactive(labelcolor()));
+    if (!strcmp(fltk3::scheme(), "plastic")) {
+      // Show larger up/down arrows...
+      fltk3::polygon(x1, y1 + 3, x1 + w1, y1 + w1 + 3, x1 + 2 * w1, y1 + 3);
+      fltk3::polygon(x1, y1 + 1, x1 + w1, y1 - w1 + 1, x1 + 2 * w1, y1 + 1);
+    } else {
+      // Show smaller up/down arrows with a divider...
+      x1 = x() + w() - 13 - dx;
+      y1 = y() + h() / 2;
+      fltk3::polygon(x1, y1 - 2, x1 + 3, y1 - 5, x1 + 6, y1 - 2);
+      fltk3::polygon(x1, y1 + 2, x1 + 3, y1 + 5, x1 + 6, y1 + 2);
+
+      fltk3::color(fltk3::darker(color()));
+      fltk3::yxline(x1 - 7, y1 - 8, y1 + 8);
+
+      fltk3::color(fltk3::lighter(color()));
+      fltk3::yxline(x1 - 6, y1 - 8, y1 + 8);
+    }
+  } else {
+    if (fltk3::contrast(textcolor(), fltk3::BACKGROUND2_COLOR) == textcolor()) {
+      draw_box(fltk3::DOWN_BOX, fltk3::BACKGROUND2_COLOR);
+    } else {
+      draw_box(fltk3::DOWN_BOX, fltk3::lighter(color()));
+    }
+    draw_box(fltk3::UP_BOX,X,Y,W,H,color());
+
+    fltk3::color(active_r() ? labelcolor() : fltk3::inactive(labelcolor()));
+    fltk3::polygon(x1, y1, x1 + w1, y1 + w1, x1 + 2 * w1, y1);
+  }
+
+  W += 2 * dx;
+
+  if (mvalue()) {
+    fltk3::MenuItem m = *mvalue();
+    if (active_r()) m.activate(); else m.deactivate();
+
+    // ERCO
+    int xx = x() + dx, yy = y() + dy + 1, ww = w() - W, hh = H - 2;
+
+    fltk3::push_clip(xx, yy, ww, hh);
+
+    if ( fltk3::scheme()) {
+      fltk3::Label l;
+      l.value = m.text;
+      l.image = 0;
+      l.deimage = 0;
+      l.type = m.labeltype_;
+      l.font = m.labelsize_ || m.labelfont_ ? m.labelfont_ : textfont();
+      l.size = m.labelsize_ ? m.labelsize_ : textsize();
+      l.color= m.labelcolor_ ? m.labelcolor_ : textcolor();
+      if (!m.active()) l.color = fltk3::inactive((fltk3::Color)l.color);
+      fltk3::draw_shortcut = 2; // hack value to make '&' disappear
+      l.draw(xx+3, yy, ww>6 ? ww-6 : 0, hh, fltk3::ALIGN_LEFT);
+      fltk3::draw_shortcut = 0;
+      if ( fltk3::focus() == this ) draw_focus(box(), xx, yy, ww, hh);
+    }
+    else {
+      fltk3::draw_shortcut = 2; // hack value to make '&' disappear
+      m.draw(xx, yy, ww, hh, this, fltk3::focus() == this);
+      fltk3::draw_shortcut = 0;
+    }
+
+    fltk3::pop_clip();
+  }
+
+  draw_label();
+}
+
+/**
+  Create a new fltk3::Choice widget using the given position, size and label string.
+  The default boxtype is \c fltk3::UP_BOX.
+
+  The constructor sets menu() to NULL.
+  See fltk3::Menu_ for the methods to set or change the menu.
+
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::Choice::Choice(int X, int Y, int W, int H, const char *L)
+: fltk3::Menu_(X,Y,W,H,L) {
+  align(fltk3::ALIGN_LEFT);
+  when(fltk3::WHEN_RELEASE);
+  textfont(fltk3::HELVETICA);
+  box(fltk3::FLAT_BOX);
+  down_box(fltk3::BORDER_BOX);
+}
+
+/**
+  Sets the currently selected value using a pointer to menu item.
+  Changing the selected value causes a redraw().
+  \param[in] v pointer to menu item in the menu item array.
+  \returns non-zero if the new value is different to the old one.
+ */
+int fltk3::Choice::value(const fltk3::MenuItem *v) {
+  if (!Menu_::value(v)) return 0;
+  redraw();
+  return 1;
+}
+
+/**
+  Sets the currently selected value using the index into the menu item array.
+  Changing the selected value causes a redraw().
+  \param[in] v index of value in the menu item array.
+  \returns non-zero if the new value is different to the old one.
+ */
+int fltk3::Choice::value(int v) {
+  if (v == -1) return value((const fltk3::MenuItem *)0);
+  if (v < 0 || v >= (size() - 1)) return 0;
+  if (!Menu_::value(v)) return 0;
+  redraw();
+  return 1;
+}
+
+int fltk3::Choice::handle(int e) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(e), Handle)
+  if (!menu() || !menu()->text) return 0;
+  const fltk3::MenuItem* v;
+  switch (e) {
+  case fltk3::ENTER:
+  case fltk3::LEAVE:
+    return 1;
+
+  case fltk3::KEYBOARD:
+    if (fltk3::event_key() != ' ' ||
+        (fltk3::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) return 0;
+  case fltk3::PUSH:
+    if (fltk3::visible_focus()) fltk3::focus(this);
+  J1:
+    if (fltk3::scheme()
+	|| fltk3::contrast(textcolor(), fltk3::BACKGROUND2_COLOR) != textcolor()) {
+      v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
+    } else {
+      // In order to preserve the old look-n-feel of "white" menus,
+      // temporarily override the color() of this widget...
+      fltk3::Color c = color();
+      color(fltk3::BACKGROUND2_COLOR);
+      v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
+      color(c);
+    }
+    if (!v || v->submenu()) return 1;
+    if (v != mvalue()) redraw();
+    picked(v);
+    return 1;
+  case fltk3::SHORTCUT:
+    if (Widget::test_shortcut()) goto J1;
+    v = menu()->test_shortcut();
+    if (!v) return 0;
+    if (v != mvalue()) redraw();
+    picked(v);
+    return 1;
+  case fltk3::FOCUS:
+  case fltk3::UNFOCUS:
+    if (fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    } else return 0;
+  default:
+    return 0;
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Choice.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Clock.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Clock.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Clock.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,220 @@
+//
+// "$Id$"
+//
+// Clock widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Clock.h>
+#include <fltk3/draw.h>
+#include <math.h>
+#include <time.h>
+#ifndef WIN32
+#  include <sys/time.h>
+#endif /* !WIN32 */
+
+// Original clock display written by Paul Haeberli at SGI.
+// Modifications by Mark Overmars for Forms
+// Further changes by Bill Spitzak for fltk
+
+const float hourhand[4][2] = {{-0.5f, 0}, {0, 1.5f}, {0.5f, 0}, {0, -7.0f}};
+const float  minhand[4][2] = {{-0.5f, 0}, {0, 1.5f}, {0.5f, 0}, {0, -11.5f}};
+const float  sechand[4][2] = {{-0.1f, 0}, {0, 2.0f}, {0.1f, 0}, {0, -11.5f}};
+
+static void drawhand(double ang,const float v[][2],fltk3::Color fill,fltk3::Color line)
+{
+  fltk3::push_matrix();
+  fltk3::rotate(ang);
+  fltk3::color(fill); fltk3::begin_polygon();
+  int i; for (i=0; i<4; i++) fltk3::vertex(v[i][0],v[i][1]); fltk3::end_polygon();
+  fltk3::color(line); fltk3::begin_loop();
+  for (i=0; i<4; i++) fltk3::vertex(v[i][0],v[i][1]); fltk3::end_loop();
+  fltk3::pop_matrix();
+}
+
+void fltk3::ClockOutput::drawhands(fltk3::Color fill, fltk3::Color line) {
+  if (!active_r()) {
+    fill = fltk3::inactive(fill);
+    line = fltk3::inactive(line);
+  }
+  drawhand(-360*(hour()+minute()/60.0)/12, hourhand, fill, line);
+  drawhand(-360*(minute()+second()/60.0)/60, minhand, fill, line);
+  drawhand(-360*(second()/60.0), sechand, fill, line);
+}
+
+static void rect(double x, double y, double w, double h) {
+  double r = x+w;
+  double t = y+h;
+  fltk3::begin_polygon();
+  fltk3::vertex(x, y);
+  fltk3::vertex(r, y);
+  fltk3::vertex(r, t);
+  fltk3::vertex(x, t);
+  fltk3::end_polygon();
+}
+
+/**
+  Draw clock with the given position and size.
+  \param[in] X, Y, W, H position and size
+*/
+void fltk3::ClockOutput::draw(int X, int Y, int W, int H) {
+  fltk3::Color box_color = type()==fltk3::ROUND_CLOCK ? fltk3::GRAY : color();
+  fltk3::Color shadow_color = fltk3::color_average(box_color, fltk3::BLACK, 0.5);
+  draw_box(box(), X, Y, W, H, box_color);
+  fltk3::push_matrix();
+  fltk3::translate(X+W/2.0-.5, Y+H/2.0-.5);
+  fltk3::scale((W-1)/28.0, (H-1)/28.0);
+  if (type() == fltk3::ROUND_CLOCK) {
+    fltk3::color(active_r() ? color() : fltk3::inactive(color()));
+    fltk3::begin_polygon(); fltk3::circle(0,0,14); fltk3::end_polygon();
+    fltk3::color(active_r() ? fltk3::FOREGROUND_COLOR : fltk3::inactive(fltk3::FOREGROUND_COLOR));
+    fltk3::begin_loop(); fltk3::circle(0,0,14); fltk3::end_loop();
+  }
+  // draw the shadows:
+  fltk3::push_matrix();
+  fltk3::translate(0.60, 0.60);
+  drawhands(shadow_color, shadow_color);
+  fltk3::pop_matrix();
+  // draw the tick marks:
+  fltk3::push_matrix();
+  fltk3::color(active_r() ? fltk3::FOREGROUND_COLOR : fltk3::inactive(fltk3::FOREGROUND_COLOR));
+  for (int i=0; i<12; i++) {
+    if (i==6) ::rect(-0.5, 9, 1, 2);
+    else if (i==3 || i==0 || i== 9) ::rect(-0.5, 9.5, 1, 1);
+    else ::rect(-0.25, 9.5, .5, 1);
+    fltk3::rotate(-30);
+  }
+  fltk3::pop_matrix();
+  // draw the hands:
+  drawhands(selection_color(), fltk3::FOREGROUND_COLOR); // color was 54
+  fltk3::pop_matrix();
+}
+
+/**
+  Draw clock with current position and size.
+*/
+void fltk3::ClockOutput::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw(x(), y(), w(), h());
+  draw_label();
+}
+
+/**
+  Set the displayed time.
+  Set the time in hours, minutes, and seconds.
+  \param[in] H, m, s displayed time
+  \see hour(), minute(), second()
+ */
+void fltk3::ClockOutput::value(int H, int m, int s) {
+  if (H!=hour_ || m!=minute_ || s!=second_) {
+    hour_ = H; minute_ = m; second_ = s;
+    value_ = (H * 60 + m) * 60 + s;
+    damage(fltk3::DAMAGE_CHILD);
+  }
+}
+
+/**
+  Set the displayed time.
+  Set the time in seconds since the UNIX epoch (January 1, 1970).
+  \param[in] v seconds since epoch
+  \see value()
+ */
+void fltk3::ClockOutput::value(ulong v) {
+  value_ = v;
+  struct tm *timeofday;
+  // Some platforms, notably Windows, now use a 64-bit time_t value...
+  time_t vv = (time_t)v;
+  timeofday = localtime(&vv);
+  value(timeofday->tm_hour, timeofday->tm_min, timeofday->tm_sec);
+}
+
+/**
+  Create a new fltk3::ClockOutput widget with the given position, size and label.
+  The default boxtype is \c fltk3::NO_BOX.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::ClockOutput::ClockOutput(int X, int Y, int W, int H, const char *L)
+: fltk3::Widget(X, Y, W, H, L) {
+  box(fltk3::UP_BOX);
+  selection_color(fltk3::gray_ramp(5));
+  align(fltk3::ALIGN_BOTTOM);
+  hour_ = 0;
+  minute_ = 0;
+  second_ = 0;
+  value_ = 0;
+}
+
+////////////////////////////////////////////////////////////////
+
+/**
+  Create an fltk3::Clock widget using the given position, size, and label string.
+  The default boxtype is \c fltk3::NO_BOX.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::Clock::Clock(int X, int Y, int W, int H, const char *L)
+  : fltk3::ClockOutput(X, Y, W, H, L) {}
+
+/**
+  Create an fltk3::Clock widget using the given boxtype, position, size, and
+  label string.
+  \param[in] t boxtype
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::Clock::Clock(uchar t, int X, int Y, int W, int H, const char *L)
+  : fltk3::ClockOutput(X, Y, W, H, L) {
+  type(t);
+  box(t==fltk3::ROUND_CLOCK ? fltk3::NO_BOX : fltk3::UP_BOX);
+}
+
+static void tick(void *v) {
+  ((fltk3::Clock*)v)->value(time(0));
+  fltk3::add_timeout(1.0, tick, v);
+}
+
+int fltk3::Clock::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  switch (event) {
+  case fltk3::SHOW:
+    tick(this);
+    break;
+  case fltk3::HIDE:
+    fltk3::remove_timeout(tick, this);
+    break;
+  }
+  return ClockOutput::handle(event);
+}
+  
+/**
+  The destructor removes the clock.
+ */
+fltk3::Clock::~Clock() {
+  fltk3::remove_timeout(tick, this);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Clock.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Color_Chooser.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Color_Chooser.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Color_Chooser.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,634 @@
+//
+// "$Id$"
+//
+// Color chooser for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/ColorChooser.h>
+#include <fltk3/draw.h>
+#include <fltk3/math.h>
+#include <stdio.h>
+
+// Besides being a useful object on it's own, the fltk3::ColorChooser was
+// an attempt to make a complex composite object that could be easily
+// imbedded into a user interface.  If you wish to make complex objects
+// of your own, be sure to read this code.
+
+// The function fltk3::color_chooser() creates a window containing a color
+// chooser and a few buttons and current-color indicators.  It is an
+// easier interface for simple programs that just need a color.
+
+// The "hue box" can be a circle or rectilinear.
+// You get a circle by defining this:
+#define CIRCLE 1
+// And the "hue box" can auto-update when the value changes
+// you get this by defining this:
+#define UPDATE_HUE_BOX 1
+
+/**
+  This \e static method converts HSV colors to RGB colorspace.
+  \param[in] H, S, V color components
+  \param[out] R, G, B color components
+ */
+void fltk3::ColorChooser::hsv2rgb(
+	double H, double S, double V, double& R, double& G, double& B) {
+  if (S < 5.0e-6) {
+    R = G = B = V;
+  } else {
+    int i = (int)H;  
+    double f = H - (float)i;
+    double p1 = V*(1.0-S);
+    double p2 = V*(1.0-S*f);
+    double p3 = V*(1.0-S*(1.0-f));
+    switch (i) {
+    case 0: R = V;   G = p3;  B = p1;  break;
+    case 1: R = p2;  G = V;   B = p1;  break;
+    case 2: R = p1;  G = V;   B = p3;  break;
+    case 3: R = p1;  G = p2;  B = V;   break;
+    case 4: R = p3;  G = p1;  B = V;   break;
+    case 5: R = V;   G = p1;  B = p2;  break;
+    }
+  }
+}
+
+/**
+  This \e static method converts RGB colors to HSV colorspace.
+  \param[in] R, G, B color components
+  \param[out] H, S, V color components
+ */
+void fltk3::ColorChooser::rgb2hsv(
+	double R, double G, double B, double& H, double& S, double& V) {
+  double maxv = R > G ? R : G; if (B > maxv) maxv = B;
+  V = maxv;
+  if (maxv>0) {
+    double minv = R < G ? R : G; if (B < minv) minv = B;
+    S = 1.0 - double(minv)/maxv;
+    if (maxv > minv) {
+      if (maxv == R) {H = (G-B)/double(maxv-minv); if (H<0) H += 6.0;}
+      else if (maxv == G) H = 2.0+(B-R)/double(maxv-minv);
+      else H = 4.0+(R-G)/double(maxv-minv);
+    }
+  }
+}
+
+/** fltk3::ColorChooser modes */
+enum {
+  M_RGB,	/**< mode() of fltk3::ColorChooser showing RGB values */
+  M_BYTE,	/**< mode() of fltk3::ColorChooser showing byte values */
+  M_HEX,	/**< mode() of fltk3::ColorChooser showing hex values */
+  M_HSV		/**< mode() of fltk3::ColorChooser showing HSV values */
+};
+static fltk3::MenuItem mode_menu[] = {
+  {"rgb"},
+  {"byte"},
+  {"hex"},
+  {"hsv"},
+  {0}
+};
+
+#ifndef FLTK3_DOXYGEN
+int fltk3::cc_Value_Input::format(char* buf) {
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+  if (c->mode() == M_HEX) return sprintf(buf,"0x%02X", int(value()));
+  else return Valuator::format(buf);
+}
+#endif // !FLTK3_DOXYGEN
+
+void fltk3::ColorChooser::set_valuators() {
+  switch (mode()) {
+  case M_RGB:
+    rvalue.range(0,1); rvalue.step(1,1000); rvalue.value(r_);
+    gvalue.range(0,1); gvalue.step(1,1000); gvalue.value(g_);
+    bvalue.range(0,1); bvalue.step(1,1000); bvalue.value(b_);
+    break;
+  case M_BYTE: /* FALLTHROUGH */
+  case M_HEX:
+    rvalue.range(0,255); rvalue.step(1); rvalue.value(int(255*r_+.5));
+    gvalue.range(0,255); gvalue.step(1); gvalue.value(int(255*g_+.5));
+    bvalue.range(0,255); bvalue.step(1); bvalue.value(int(255*b_+.5));
+    break;
+  case M_HSV:
+    rvalue.range(0,6); rvalue.step(1,1000); rvalue.value(hue_);
+    gvalue.range(0,1); gvalue.step(1,1000); gvalue.value(saturation_);
+    bvalue.range(0,1); bvalue.step(1,1000); bvalue.value(value_);
+    break;
+  }
+}
+
+/**
+  Sets the current rgb color values.
+  Does not do the callback. Does not clamp (but out of range values will
+  produce psychedelic effects in the hue selector).
+  \param[in] R, G, B color components.
+  \return 1 if a new rgb value was set, 0 if the rgb value was the previous one.
+ */
+int fltk3::ColorChooser::rgb(double R, double G, double B) {
+  if (R == r_ && G == g_ && B == b_) return 0;
+  r_ = R; g_ = G; b_ = B;
+  double ph = hue_;
+  double ps = saturation_;
+  double pv = value_;
+  rgb2hsv(R,G,B,hue_,saturation_,value_);
+  set_valuators();
+  set_changed();
+  if (value_ != pv) {
+#ifdef UPDATE_HUE_BOX
+    huebox.damage(fltk3::DAMAGE_SCROLL);
+#endif
+    valuebox.damage(fltk3::DAMAGE_EXPOSE);}
+  if (hue_ != ph || saturation_ != ps) {
+    huebox.damage(fltk3::DAMAGE_EXPOSE); 
+    valuebox.damage(fltk3::DAMAGE_SCROLL);
+  }
+  return 1;
+}
+
+/**
+  Set the hsv values.
+  The passed values are clamped (or for hue, modulus 6 is used) to get
+  legal values. Does not do the callback.
+  \param[in] H, S, V color components.
+  \return 1 if a new hsv value was set, 0 if the hsv value was the previous one.
+*/
+int fltk3::ColorChooser::hsv(double H, double S, double V) {
+  H = fmod(H,6.0); if (H < 0.0) H += 6.0;
+  if (S < 0.0) S = 0.0; else if (S > 1.0) S = 1.0;
+  if (V < 0.0) V = 0.0; else if (V > 1.0) V = 1.0;
+  if (H == hue_ && S == saturation_ && V == value_) return 0;
+  double ph = hue_;
+  double ps = saturation_;
+  double pv = value_;
+  hue_ = H; saturation_ = S; value_ = V;
+  if (value_ != pv) {
+#ifdef UPDATE_HUE_BOX
+    huebox.damage(fltk3::DAMAGE_SCROLL);
+#endif
+    valuebox.damage(fltk3::DAMAGE_EXPOSE);}
+  if (hue_ != ph || saturation_ != ps) {
+    huebox.damage(fltk3::DAMAGE_EXPOSE); 
+    valuebox.damage(fltk3::DAMAGE_SCROLL);
+  }
+  hsv2rgb(H,S,V,r_,g_,b_);
+  set_valuators();
+  set_changed();
+  return 1;
+}
+
+////////////////////////////////////////////////////////////////
+
+static void tohs(double x, double y, double& h, double& s) {
+#ifdef CIRCLE
+  x = 2*x-1;
+  y = 1-2*y;
+  s = sqrt(x*x+y*y); if (s > 1.0) s = 1.0;
+  h = (3.0/M_PI)*atan2(y,x);
+  if (h<0) h += 6.0;
+#else
+  h = fmod(6.0*x,6.0); if (h < 0.0) h += 6.0;
+  s = 1.0-y; if (s < 0.0) s = 0.0; else if (s > 1.0) s = 1.0;
+#endif
+}
+
+#ifndef FLTK3_DOXYGEN
+int fltk3::cc_HueBox::handle(int e) {
+  static double ih, is;
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+  switch (e) {
+  case fltk3::PUSH:
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
+      redraw();
+    }
+    ih = c->hue();
+    is = c->saturation();
+  case fltk3::DRAG: {
+    double Xf, Yf, H, S;
+    Xf = (fltk3::event_x()-x()-fltk3::box_dx(box()))/double(w()-fltk3::box_dw(box()));
+    Yf = (fltk3::event_y()-y()-fltk3::box_dy(box()))/double(h()-fltk3::box_dh(box()));
+    tohs(Xf, Yf, H, S);
+    if (fabs(H-ih) < 3*6.0/w()) H = ih;
+    if (fabs(S-is) < 3*1.0/h()) S = is;
+    if (fltk3::event_state(fltk3::CTRL)) H = ih;
+    if (c->hsv(H, S, c->value())) c->do_callback();
+    } return 1;
+  case fltk3::FOCUS : /* FALLTHROUGH */
+  case fltk3::UNFOCUS :
+    if (fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    }
+    else return 1;
+  case fltk3::KEYBOARD :
+    return handle_key(fltk3::event_key());
+  default:
+    return 0;
+  }
+}
+#endif // !FLTK3_DOXYGEN
+
+static void generate_image(void* vv, int X, int Y, int W, uchar* buf) {
+  fltk3::cc_HueBox* v = (fltk3::cc_HueBox*)vv;
+  int iw = v->w()-fltk3::box_dw(v->box());
+  double Yf = double(Y)/(v->h()-fltk3::box_dh(v->box()));
+#ifdef UPDATE_HUE_BOX
+  const double V = ((fltk3::ColorChooser*)(v->parent()))->value();
+#else
+  const double V = 1.0;
+#endif
+  for (int x = X; x < X+W; x++) {
+    double Xf = double(x)/iw;
+    double H,S; tohs(Xf,Yf,H,S);
+    double r,g,b;
+    fltk3::ColorChooser::hsv2rgb(H,S,V,r,g,b);
+    *buf++ = uchar(255*r+.5);
+    *buf++ = uchar(255*g+.5);
+    *buf++ = uchar(255*b+.5);
+  }
+}
+
+#ifndef FLTK3_DOXYGEN
+int fltk3::cc_HueBox::handle_key(int key) {
+  int w1 = w()-fltk3::box_dw(box())-6;
+  int h1 = h()-fltk3::box_dh(box())-6;
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+
+#ifdef CIRCLE
+  int X = int(.5*(cos(c->hue()*(M_PI/3.0))*c->saturation()+1) * w1);
+  int Y = int(.5*(1-sin(c->hue()*(M_PI/3.0))*c->saturation()) * h1);
+#else
+  int X = int(c->hue()/6.0*w1);
+  int Y = int((1-c->saturation())*h1);
+#endif
+
+  switch (key) {
+    case fltk3::UpKey :
+      Y -= 3;
+      break;
+    case fltk3::DownKey :
+      Y += 3;
+      break;
+    case fltk3::LeftKey :
+      X -= 3;
+      break;
+    case fltk3::RightKey :
+      X += 3;
+      break;
+    default :
+      return 0;
+  }
+
+  double Xf, Yf, H, S;
+  Xf = (double)X/(double)w1;
+  Yf = (double)Y/(double)h1;
+  tohs(Xf, Yf, H, S);
+  if (c->hsv(H, S, c->value())) c->do_callback();
+
+  return 1;
+}
+#endif // !FLTK3_DOXYGEN
+
+#ifndef FLTK3_DOXYGEN
+void fltk3::cc_HueBox::draw() {
+  if (damage()&fltk3::DAMAGE_ALL) draw_box();
+  int x1 = x()+fltk3::box_dx(box());
+  int yy1 = y()+fltk3::box_dy(box());
+  int w1 = w()-fltk3::box_dw(box());
+  int h1 = h()-fltk3::box_dh(box());
+  if (damage() == fltk3::DAMAGE_EXPOSE) fltk3::push_clip(x1+px,yy1+py,6,6);
+  fltk3::draw_image(generate_image, this, x1, yy1, w1, h1);
+  if (damage() == fltk3::DAMAGE_EXPOSE) fltk3::pop_clip();
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+#ifdef CIRCLE
+  int X = int(.5*(cos(c->hue()*(M_PI/3.0))*c->saturation()+1) * (w1-6));
+  int Y = int(.5*(1-sin(c->hue()*(M_PI/3.0))*c->saturation()) * (h1-6));
+#else
+  int X = int(c->hue()/6.0*(w1-6));
+  int Y = int((1-c->saturation())*(h1-6));
+#endif
+  if (X < 0) X = 0; else if (X > w1-6) X = w1-6;
+  if (Y < 0) Y = 0; else if (Y > h1-6) Y = h1-6;
+  //  fltk3::color(c->value()>.75 ? fltk3::BLACK : fltk3::WHITE);
+  draw_box(fltk3::UP_BOX,x1+X,yy1+Y,6,6,fltk3::focus() == this ? fltk3::FOREGROUND_COLOR : fltk3::GRAY);
+  px = X; py = Y;
+}
+#endif // !FLTK3_DOXYGEN
+
+////////////////////////////////////////////////////////////////
+
+#ifndef FLTK3_DOXYGEN
+int fltk3::cc_ValueBox::handle(int e) {
+  static double iv;
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+  switch (e) {
+  case fltk3::PUSH:
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
+      redraw();
+    }
+    iv = c->value();
+  case fltk3::DRAG: {
+    double Yf;
+    Yf = 1-(fltk3::event_y()-y()-fltk3::box_dy(box()))/double(h()-fltk3::box_dh(box()));
+    if (fabs(Yf-iv)<(3*1.0/h())) Yf = iv;
+    if (c->hsv(c->hue(),c->saturation(),Yf)) c->do_callback();
+    } return 1;
+  case fltk3::FOCUS : /* FALLTHROUGH */
+  case fltk3::UNFOCUS :
+    if (fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    }
+    else return 1;
+  case fltk3::KEYBOARD :
+    return handle_key(fltk3::event_key());
+  default:
+    return 0;
+  }
+}
+#endif // !FLTK3_DOXYGEN
+
+static double tr, tg, tb;
+static void generate_vimage(void* vv, int X, int Y, int W, uchar* buf) {
+  fltk3::cc_ValueBox* v = (fltk3::cc_ValueBox*)vv;
+  double Yf = 255*(1.0-double(Y)/(v->h()-fltk3::box_dh(v->box())));
+  uchar r = uchar(tr*Yf+.5);
+  uchar g = uchar(tg*Yf+.5);
+  uchar b = uchar(tb*Yf+.5);
+  for (int x = X; x < X+W; x++) {
+    *buf++ = r; *buf++ = g; *buf++ = b;
+  }
+}
+
+#ifndef FLTK3_DOXYGEN
+void fltk3::cc_ValueBox::draw() {
+  if (damage()&fltk3::DAMAGE_ALL) draw_box();
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+  c->hsv2rgb(c->hue(),c->saturation(),1.0,tr,tg,tb);
+  int x1 = x()+fltk3::box_dx(box());
+  int yy1 = y()+fltk3::box_dy(box());
+  int w1 = w()-fltk3::box_dw(box());
+  int h1 = h()-fltk3::box_dh(box());
+  if (damage() == fltk3::DAMAGE_EXPOSE) fltk3::push_clip(x1,yy1+py,w1,6);
+  fltk3::draw_image(generate_vimage, this, x1, yy1, w1, h1);
+  if (damage() == fltk3::DAMAGE_EXPOSE) fltk3::pop_clip();
+  int Y = int((1-c->value()) * (h1-6));
+  if (Y < 0) Y = 0; else if (Y > h1-6) Y = h1-6;
+  draw_box(fltk3::UP_BOX,x1,yy1+Y,w1,6,fltk3::focus() == this ? fltk3::FOREGROUND_COLOR : fltk3::GRAY);
+  py = Y;
+}
+#endif // !FLTK3_DOXYGEN
+
+#ifndef FLTK3_DOXYGEN
+int fltk3::cc_ValueBox::handle_key(int key) {
+  int h1 = h()-fltk3::box_dh(box())-6;
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)parent();
+
+  int Y = int((1-c->value()) * h1);
+  if (Y < 0) Y = 0; else if (Y > h1) Y = h1;
+
+  switch (key) {
+    case fltk3::UpKey :
+      Y -= 3;
+      break;
+    case fltk3::DownKey :
+      Y += 3;
+      break;
+    default :
+      return 0;
+  }
+
+  double Yf;
+  Yf = 1-((double)Y/(double)h1);
+  if (c->hsv(c->hue(),c->saturation(),Yf)) c->do_callback();
+
+  return 1;
+}
+#endif // !FLTK3_DOXYGEN
+
+////////////////////////////////////////////////////////////////
+
+void fltk3::ColorChooser::rgb_cb(fltk3::Widget* o, void*) {
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)(o->parent());
+  double R = c->rvalue.value();
+  double G = c->gvalue.value();
+  double B = c->bvalue.value();
+  if (c->mode() == M_HSV) {
+    if (c->hsv(R,G,B)) c->do_callback();
+    return;
+  }
+  if (c->mode() != M_RGB) {
+    R = R/255;
+    G = G/255;
+    B = B/255;
+  }
+  if (c->rgb(R,G,B)) c->do_callback();
+}
+
+void fltk3::ColorChooser::mode_cb(fltk3::Widget* o, void*) {
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)(o->parent());
+  // force them to redraw even if value is the same:
+  c->rvalue.value(-1);
+  c->gvalue.value(-1);
+  c->bvalue.value(-1);
+  c->set_valuators();
+}
+
+void fltk3::ColorChooser::mode(int newMode)
+{
+  choice.value(newMode);
+  choice.do_callback();
+}
+
+
+////////////////////////////////////////////////////////////////
+
+/**
+  Creates a new fltk3::ColorChooser widget using the given position, size, and
+  label string.
+  The recommended dimensions are 200x95. The color is initialized to black.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::ColorChooser::ColorChooser(int X, int Y, int W, int H, const char* L)
+  : fltk3::Group(0,0,195,115,L),
+    huebox(0,0,115,115),
+    valuebox(115,0,20,115),
+    choice(140,0,55,25),
+    rvalue(140,30,55,25),
+    gvalue(140,60,55,25),
+    bvalue(140,90,55,25),
+    resize_box(0,0,115,115)
+{
+  end();
+  resizable(resize_box);
+  resize(X,Y,W,H);
+  r_ = g_ = b_ = 0;
+  hue_ = 0.0;
+  saturation_ = 0.0;
+  value_ = 0.0;
+  huebox.box(fltk3::DOWN_FRAME);
+  valuebox.box(fltk3::DOWN_FRAME);
+  choice.menu(mode_menu);
+  set_valuators();
+  rvalue.callback(rgb_cb);
+  gvalue.callback(rgb_cb);
+  bvalue.callback(rgb_cb);
+  choice.callback(mode_cb);
+  choice.box(fltk3::THIN_UP_BOX);
+  choice.textfont(fltk3::HELVETICA_BOLD_ITALIC);
+}
+
+////////////////////////////////////////////////////////////////
+// fltk3::color_chooser():
+
+#include <fltk3/Window.h>
+#include <fltk3/Box.h>
+#include <fltk3/ReturnButton.h>
+
+class ColorChip : public fltk3::Widget {
+  void draw();
+public:
+  uchar r,g,b;
+  ColorChip(int X, int Y, int W, int H) : fltk3::Widget(X,Y,W,H) {
+    box(fltk3::ENGRAVED_FRAME);}
+};
+
+void ColorChip::draw() {
+  if (damage()&fltk3::DAMAGE_ALL) draw_box();
+  fltk3::rectf(x()+fltk3::box_dx(box()),
+	   y()+fltk3::box_dy(box()),
+	   w()-fltk3::box_dw(box()),
+	   h()-fltk3::box_dh(box()),r,g,b);
+}
+
+static void chooser_cb(fltk3::Widget* o, void* vv) {
+  fltk3::ColorChooser* c = (fltk3::ColorChooser*)o;
+  ColorChip* v = (ColorChip*)vv;
+  v->r = uchar(255*c->r()+.5);
+  v->g = uchar(255*c->g()+.5);
+  v->b = uchar(255*c->b()+.5);
+  v->damage(fltk3::DAMAGE_EXPOSE);
+}
+
+namespace fltk3 {
+  extern const char* ok;
+  extern const char* cancel;
+}
+
+// fltk3::color_chooser's callback for ok_button (below)
+//  [in] o is a pointer to okay_button (below) 
+//  [in] p is a pointer to an int to receive the return value (1)
+// closes the fltk3::color_chooser window
+static void cc_ok_cb (fltk3::Widget *o, void *p) {
+  *((int *)p) = 1; // set return value
+  o->window()->hide();
+}
+
+// fltk3::color_chooser's callback for cancel_button and window close
+//  [in] o is a pointer to cancel_button (below) _or_ the dialog window
+//  [in] p is a pointer to an int to receive the return value (0)
+// closes the fltk3::color_chooser window
+static void cc_cancel_cb (fltk3::Widget *o, void *p) {
+  *((int *)p) = 0; // set return value
+  if (o->window()) // cancel button
+    o->window()->hide();
+  else // window close
+    o->hide();
+}
+
+/** \addtogroup  group_comdlg 
+    @{ */
+/**
+  \brief Pops up a window to let the user pick an arbitrary RGB color.
+  \note \#include <fltk3/ColorChooser.h>
+  \image html fltk3::color_chooser.jpg 
+  \image latex  fltk3::color_chooser.jpg "fltk3::color_chooser" width=8cm
+  \param[in] name Title label for the window
+  \param[in,out] r, g, b Color components in the range 0.0 to 1.0.
+  \param[in] cmode Optional mode for color chooser. See mode(int). Default -1 if none (rgb mode).
+  \retval 1 if user confirms the selection 
+  \retval 0 if user cancels the dialog
+  \relates fltk3::ColorChooser
+ */
+int fltk3::color_chooser(const char* name, double& r, double& g, double& b, int cmode) {
+  int ret = 0;
+  fltk3::Window window(215,200,name);
+  window.callback(cc_cancel_cb,&ret);
+  fltk3::ColorChooser chooser(10, 10, 195, 115);
+  ColorChip ok_color(10, 130, 95, 25);
+  fltk3::ReturnButton ok_button(10, 165, 95, 25, fltk3::ok);
+  ok_button.callback(cc_ok_cb,&ret);
+  ColorChip cancel_color(110, 130, 95, 25);
+  cancel_color.r = uchar(255*r+.5); ok_color.r = cancel_color.r;
+  ok_color.g = cancel_color.g = uchar(255*g+.5);
+  ok_color.b = cancel_color.b = uchar(255*b+.5);
+  fltk3::Button cancel_button(110, 165, 95, 25, fltk3::cancel);
+  cancel_button.callback(cc_cancel_cb,&ret);
+  window.resizable(chooser);
+  chooser.rgb(r,g,b);
+  chooser.callback(chooser_cb, &ok_color);
+  if (cmode!=-1) chooser.mode(cmode);
+  window.end();
+  window.set_modal();
+  window.hotspot(window);
+  window.show();
+  while (window.shown()) fltk3::wait();
+  if (ret) { // ok_button or Enter
+    r = chooser.r();
+    g = chooser.g();
+    b = chooser.b();
+  }
+  return ret;
+}
+
+/**
+  \brief Pops up a window to let the user pick an arbitrary RGB color.
+  \note \#include <fltk3/ColorChooser.h>
+  \image html fltk3::color_chooser.jpg 
+  \image latex  fltk3::color_chooser.jpg "fltk3::color_chooser" width=8cm
+  \param[in] name Title label for the window
+  \param[in,out] r, g, b Color components in the range 0 to 255.
+  \param[in] cmode Optional mode for color chooser. See mode(int). Default -1 if none (rgb mode).
+  \retval 1 if user confirms the selection 
+  \retval 0 if user cancels the dialog
+  \relates fltk3::ColorChooser
+ */
+int fltk3::color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int cmode) {
+  double dr = r/255.0;
+  double dg = g/255.0;
+  double db = b/255.0;
+  if (fltk3::color_chooser(name,dr,dg,db,cmode)) {
+    r = uchar(255*dr+.5);
+    g = uchar(255*dg+.5);
+    b = uchar(255*db+.5);
+    return 1;
+  }
+  return 0;
+}
+
+/** @} */
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Color_Chooser.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Counter.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Counter.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Counter.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,213 @@
+//
+// "$Id$"
+//
+// Counter widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Counter.h>
+#include <fltk3/draw.h>
+
+void fltk3::Counter::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int i; fltk3::Boxtype boxtype[5];
+  fltk3::Color selcolor;
+
+  boxtype[0] = box();
+  if (boxtype[0] == fltk3::UP_BOX) boxtype[0] = fltk3::DOWN_BOX;
+  if (boxtype[0] == fltk3::THIN_UP_BOX) boxtype[0] = fltk3::THIN_DOWN_BOX;
+  for (i=1; i<5; i++)
+    if (mouseobj == i)
+      boxtype[i] = fltk3::down(box());
+    else
+      boxtype[i] = box();
+
+  int xx[5], ww[5];
+  if (type() == fltk3::NORMAL_COUNTER) {
+    int W = w()*15/100;
+    xx[1] = x();	 ww[1] = W;
+    xx[2] = x()+1*W;     ww[2] = W;
+    xx[0] = x()+2*W;     ww[0] = w()-4*W;
+    xx[3] = x()+w()-2*W; ww[3] = W;
+    xx[4] = x()+w()-1*W; ww[4] = W;
+  } else {
+    int W = w()*20/100;
+    xx[1] = 0;	         ww[1] = 0;
+    xx[2] = x();	 ww[2] = W;
+    xx[0] = x()+W;	 ww[0] = w()-2*W;
+    xx[3] = x()+w()-1*W; ww[3] = W;
+    xx[4] = 0;	         ww[4] = 0;
+  }
+
+  draw_box(boxtype[0], xx[0], y(), ww[0], h(), fltk3::BACKGROUND2_COLOR);
+  fltk3::font(textfont(), textsize());
+  fltk3::color(active_r() ? textcolor() : fltk3::inactive(textcolor()));
+  char str[128]; format(str);
+  fltk3::draw(str, xx[0], y(), ww[0], h(), fltk3::ALIGN_CENTER);
+  if (fltk3::focus() == this) draw_focus(boxtype[0], xx[0], y(), ww[0], h());
+  if (!(damage()&fltk3::DAMAGE_ALL)) return; // only need to redraw text
+
+  if (active_r())
+    selcolor = labelcolor();
+  else
+    selcolor = fltk3::inactive(labelcolor());
+
+  if (type() == fltk3::NORMAL_COUNTER) {
+    draw_box(boxtype[1], xx[1], y(), ww[1], h(), color());
+    fltk3::draw_symbol("@-4<<", xx[1], y(), ww[1], h(), selcolor);
+  }
+  draw_box(boxtype[2], xx[2], y(), ww[2], h(), color());
+  fltk3::draw_symbol("@-4<",  xx[2], y(), ww[2], h(), selcolor);
+  draw_box(boxtype[3], xx[3], y(), ww[3], h(), color());
+  fltk3::draw_symbol("@-4>",  xx[3], y(), ww[3], h(), selcolor);
+  if (type() == fltk3::NORMAL_COUNTER) {
+    draw_box(boxtype[4], xx[4], y(), ww[4], h(), color());
+    fltk3::draw_symbol("@-4>>", xx[4], y(), ww[4], h(), selcolor);
+  }
+}
+
+void fltk3::Counter::increment_cb() {
+  if (!mouseobj) return;
+  double v = value();
+  switch (mouseobj) {
+  case 1: v -= lstep_; break;
+  case 2: v = increment(v, -1); break;
+  case 3: v = increment(v, 1); break;
+  case 4: v += lstep_; break;
+  }
+  handle_drag(clamp(round(v)));
+}
+
+#define INITIALREPEAT .5
+#define REPEAT .1
+
+void fltk3::Counter::repeat_callback(void* v) {
+  fltk3::Counter* b = (fltk3::Counter*)v;
+  if (b->mouseobj) {
+    fltk3::add_timeout(REPEAT, repeat_callback, b);
+    b->increment_cb();
+  }
+}
+
+int fltk3::Counter::calc_mouseobj() {
+  if (type() == fltk3::NORMAL_COUNTER) {
+    int W = w()*15/100;
+    if (fltk3::event_inside(x(), y(), W, h())) return 1;
+    if (fltk3::event_inside(x()+W, y(), W, h())) return 2;
+    if (fltk3::event_inside(x()+w()-2*W, y(), W, h())) return 3;
+    if (fltk3::event_inside(x()+w()-W, y(), W, h())) return 4;
+  } else {
+    int W = w()*20/100;
+    if (fltk3::event_inside(x(), y(), W, h())) return 2;
+    if (fltk3::event_inside(x()+w()-W, y(), W, h())) return 3;
+  }
+  return -1;
+}
+
+int fltk3::Counter::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  int i;
+  switch (event) {
+  case fltk3::RELEASE:
+    if (mouseobj) {
+      fltk3::remove_timeout(repeat_callback, this);
+      mouseobj = 0;
+      redraw();
+    }
+    handle_release();
+    return 1;
+  case fltk3::PUSH:
+    if (fltk3::visible_focus()) fltk3::focus(this);
+    { fltk3::WidgetTracker wp(this);
+      handle_push();
+      if (wp.deleted()) return 1;
+    }
+  case fltk3::DRAG:
+    i = calc_mouseobj();
+    if (i != mouseobj) {
+      fltk3::remove_timeout(repeat_callback, this);
+      mouseobj = (uchar)i;
+      if (i) fltk3::add_timeout(INITIALREPEAT, repeat_callback, this);
+      fltk3::WidgetTracker wp(this);
+      increment_cb();
+      if (wp.deleted()) return 1;
+      redraw();
+    }
+    return 1;
+  case fltk3::KEYBOARD :
+    switch (fltk3::event_key()) {
+      case fltk3::LeftKey:
+	handle_drag(clamp(increment(value(),-1)));
+	return 1;
+      case fltk3::RightKey:
+	handle_drag(clamp(increment(value(),1)));
+	return 1;
+      default:
+        return 0;
+    }
+    // break not required because of switch...
+  case fltk3::FOCUS : /* FALLTHROUGH */
+  case fltk3::UNFOCUS :
+    if (fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    } else return 0;
+  case fltk3::ENTER : /* FALLTHROUGH */
+  case fltk3::LEAVE :
+    return 1;
+  default:
+    return 0;
+  }
+}
+
+/**
+  Destroys the valuator.
+ */
+fltk3::Counter::~Counter() {
+  fltk3::remove_timeout(repeat_callback, this);
+}
+
+/**
+  Creates a new fltk3::Counter widget using the given position, size, and label
+  string. The default type is fltk3::NORMAL_COUNTER.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+ */
+fltk3::Counter::Counter(int X, int Y, int W, int H, const char* L)
+  : fltk3::Valuator(X, Y, W, H, L) {
+  box(fltk3::UP_BOX);
+  selection_color(fltk3::INACTIVE_COLOR); // was fltk3::BLUE
+  align(fltk3::ALIGN_BOTTOM);
+  bounds(-1000000.0, 1000000.0);
+  Valuator::step(1, 10);
+  lstep_ = 1.0;
+  mouseobj = 0;
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Counter.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Device.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Device.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Device.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,92 @@
+//
+// "$Id$"
+//
+// implementation of fltk3::Device class for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Device.h>
+#include <fltk3/Image.h>
+
+const char *fltk3::Device::class_id = "fltk3::Device";
+const char *fltk3::SurfaceDevice::class_id = "fltk3::SurfaceDevice";
+const char *fltk3::DisplayDevice::class_id = "fltk3::DisplayDevice";
+const char *fltk3::GraphicsDriver::class_id = "fltk3::GraphicsDriver";
+#if defined(__APPLE__) || defined(FLTK3_DOXYGEN)
+const char *fltk3::QuartzGraphicsDriver::class_id = "fltk3::QuartzGraphicsDriver";
+#endif
+#if defined(WIN32) || defined(FLTK3_DOXYGEN)
+const char *fltk3::GDIGraphicsDriver::class_id = "fltk3::GDIGraphicsDriver";
+#endif
+#if !(defined(__APPLE__) || defined(WIN32))
+namespace fltk3 {
+  const char *XlibGraphicsDriver::class_id = "fltk3::XlibGraphicsDriver";
+}
+#endif
+
+
+/** \brief Use this drawing surface for future graphics requests. */
+void fltk3::SurfaceDevice::set_current(void)
+{
+  fltk3::graphics_driver = _driver;
+  _surface = this;
+}
+
+const fltk3::GraphicsDriver::matrix fltk3::GraphicsDriver::m0 = {1, 0, 0, 1, 0, 0};
+
+fltk3::GraphicsDriver::GraphicsDriver() {
+  font_ = 0;
+  size_ = 0;
+  sptr=0; rstackptr=0; 
+  fl_clip_state_number=0;
+  m = m0; 
+  fl_matrix = &m; 
+  p = (XPOINT *)0;
+  font_descriptor_ = NULL;
+};
+
+void fltk3::GraphicsDriver::text_extents(const char*t, int n, int& dx, int& dy, int& w, int& h)
+{
+  w = (int)width(t, n);
+  h = - height();
+  dx = 0;
+  dy = descent();
+}
+
+fltk3::DisplayDevice::DisplayDevice(fltk3::GraphicsDriver *graphics_driver) : fltk3::SurfaceDevice( graphics_driver) {
+#ifdef __APPLE__
+  SInt32 versionMajor = 0;
+  SInt32 versionMinor = 0;
+  SInt32 versionBugFix = 0;
+  Gestalt( gestaltSystemVersionMajor, &versionMajor );
+  Gestalt( gestaltSystemVersionMinor, &versionMinor );
+  Gestalt( gestaltSystemVersionBugFix, &versionBugFix );
+  fl_mac_os_version = versionMajor * 10000 + versionMinor * 100 + versionBugFix;
+#endif
+};
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Device.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Dial.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Dial.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Dial.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,169 @@
+//
+// "$Id$"
+//
+// Circular dial widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Dial.h>
+#include <fltk3/draw.h>
+#include <stdlib.h>
+#include <fltk3/math.h>
+#include <fltk3/Wrapper.h>
+
+// All angles are measured with 0 to the right and counter-clockwise
+/**
+  Draws dial at given position and size.
+  \param[in] X, Y, W, H position and size
+*/
+void fltk3::Dial::draw(int X, int Y, int W, int H) {
+  if (damage()&fltk3::DAMAGE_ALL) draw_box(box(), X, Y, W, H, color());
+  X += fltk3::box_dx(box());
+  Y += fltk3::box_dy(box());
+  W -= fltk3::box_dw(box());
+  H -= fltk3::box_dh(box());
+  double angle = (a2-a1)*(value()-minimum())/(maximum()-minimum()) + a1;
+  if (type() == fltk3::FILL_DIAL) {
+    // foo: draw this nicely in certain round box types
+    int foo = (box() > fltk3::ROUND_UP_BOX && fltk3::box_dx(box()));
+    if (foo) {X--; Y--; W+=2; H+=2;}
+    if (active_r()) fltk3::color(color());
+    else fltk3::color(fltk3::inactive(color()));
+    fltk3::pie(X, Y, W, H, 270-a1, angle > a1 ? 360+270-angle : 270-360-angle);
+    if (active_r()) fltk3::color(selection_color());
+    else fltk3::color(fltk3::inactive(selection_color()));
+    fltk3::pie(X, Y, W, H, 270-angle, 270-a1);
+    if (foo) {
+      if (active_r()) fltk3::color(fltk3::FOREGROUND_COLOR);
+      else fltk3::color(fltk3::inactive(fltk3::FOREGROUND_COLOR));
+      fltk3::arc(X, Y, W, H, 0, 360);
+    }
+    return;
+  }
+  if (!(damage()&fltk3::DAMAGE_ALL)) {
+    if (active_r()) fltk3::color(color());
+    else fltk3::color(fltk3::inactive(color()));
+    fltk3::pie(X+1, Y+1, W-2, H-2, 0, 360);
+  }
+  fltk3::push_matrix();
+  fltk3::translate(X+W/2-.5, Y+H/2-.5);
+  fltk3::scale(W-1, H-1);
+  fltk3::rotate(45-angle);
+  if (active_r()) fltk3::color(selection_color());
+  else fltk3::color(fltk3::inactive(selection_color()));
+  if (type()) { // fltk3::LINE_DIAL
+    fltk3::begin_polygon();
+    fltk3::vertex(0.0,   0.0);
+    fltk3::vertex(-0.04, 0.0);
+    fltk3::vertex(-0.25, 0.25);
+    fltk3::vertex(0.0,   0.04);
+    fltk3::end_polygon();
+    if (active_r()) fltk3::color(fltk3::FOREGROUND_COLOR);
+    else fltk3::color(fltk3::inactive(fltk3::FOREGROUND_COLOR));
+    fltk3::begin_loop();
+    fltk3::vertex(0.0,   0.0);
+    fltk3::vertex(-0.04, 0.0);
+    fltk3::vertex(-0.25, 0.25);
+    fltk3::vertex(0.0,   0.04);
+    fltk3::end_loop();
+  } else {
+    fltk3::begin_polygon(); fltk3::circle(-0.20, 0.20, 0.07); fltk3::end_polygon();
+    if (active_r()) fltk3::color(fltk3::FOREGROUND_COLOR);
+    else fltk3::color(fltk3::inactive(fltk3::FOREGROUND_COLOR));
+    fltk3::begin_loop(); fltk3::circle(-0.20, 0.20, 0.07); fltk3::end_loop();
+  }
+  fltk3::pop_matrix();
+}
+
+/**
+  Draws dial at current position and size.
+*/
+void fltk3::Dial::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw(x(), y(), w(), h());
+  draw_label();
+}
+
+/**
+  Allows subclasses to handle event based on given position and size.
+  \param[in] event, X, Y, W, H event to handle, related position and size.
+*/
+int fltk3::Dial::handle(int event, int X, int Y, int W, int H) {
+  switch (event) {
+  case fltk3::PUSH: {
+    fltk3::WidgetTracker wp(this);  
+    handle_push();
+    if (wp.deleted()) return 1; }
+  case fltk3::DRAG: {
+    int mx = (fltk3::event_x()-X-W/2)*H;
+    int my = (fltk3::event_y()-Y-H/2)*W;
+    if (!mx && !my) return 1;
+    double angle = 270-atan2((float)-my, (float)mx)*180/M_PI;
+    double oldangle = (a2-a1)*(value()-minimum())/(maximum()-minimum()) + a1;
+    while (angle < oldangle-180) angle += 360;
+    while (angle > oldangle+180) angle -= 360;
+    double val;
+    if ((a1<a2) ? (angle <= a1) : (angle >= a1)) {
+      val = minimum();
+    } else if ((a1<a2) ? (angle >= a2) : (angle <= a2)) {
+      val = maximum();
+    } else {
+      val = minimum() + (maximum()-minimum())*(angle-a1)/(a2-a1);
+    }
+    handle_drag(clamp(round(val)));
+  } return 1;
+  case fltk3::RELEASE:
+    handle_release();
+    return 1;
+  case fltk3::ENTER : /* FALLTHROUGH */
+  case fltk3::LEAVE :
+    return 1;
+  default:
+    return 0;
+  }
+}
+
+/**
+  Allow subclasses to handle event based on current position and size.
+*/
+int fltk3::Dial::handle(int e) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(e), Handle)
+  return handle(e, x(), y(), w(), h());
+}
+
+/**
+ Creates a new fltk3::Dial widget using the given position, size,
+ and label string. The default type is fltk3::NORMAL_DIAL.
+ */
+fltk3::Dial::Dial(int X, int Y, int W, int H, const char* l)
+: fltk3::Valuator(X, Y, W, H, l) {
+  box(fltk3::OVAL_BOX);
+  selection_color(fltk3::INACTIVE_COLOR); // was 37
+  a1 = 45;
+  a2 = 315;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Dial.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Double_Window.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Double_Window.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Double_Window.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,465 @@
+//
+// "$Id$"
+//
+// Double-buffered window code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/DoubleWindow.h>
+#include <fltk3/Printer.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+
+
+// On systems that support double buffering "naturally" the base
+// fltk3::Window class will probably do double-buffer and this subclass
+// does nothing.
+
+#if USE_XDBE
+
+#include <X11/extensions/Xdbe.h>
+
+static int use_xdbe;
+
+static int can_xdbe() {
+  static int tried;
+  if (!tried) {
+    tried = 1;
+    int event_base, error_base;
+    if (!XdbeQueryExtension(fl_display, &event_base, &error_base)) return 0;
+    Drawable root = RootWindow(fl_display,fl_screen);
+    int numscreens = 1;
+    XdbeScreenVisualInfo *a = XdbeGetVisualInfo(fl_display,&root,&numscreens);
+    if (!a) return 0;
+    for (int j = 0; j < a->count; j++) {
+      if (a->visinfo[j].visual == fl_visual->visualid
+	  /*&& a->visinfo[j].perflevel > 0*/) {
+        use_xdbe = 1; break;
+      }
+    }
+    XdbeFreeVisualInfo(a);
+  }
+  return use_xdbe;
+}
+#endif
+
+void fltk3::DoubleWindow::show() {
+  Window::show();
+}
+
+static void fl_copy_offscreen_to_display(int x, int y, int w, int h, fltk3::Offscreen pixmap, int srcx, int srcy);
+
+/** \addtogroup fl_drawings
+ @{
+ */
+/** Copy a rectangular area of the given offscreen buffer into the current drawing destination.
+ \param x,y	position where to draw the copied rectangle
+ \param w,h	size of the copied rectangle
+ \param pixmap  offscreen buffer containing the rectangle to copy
+ \param srcx,srcy origin in offscreen buffer of rectangle to copy
+ */
+void fl_copy_offscreen(int x, int y, int w, int h, fltk3::Offscreen pixmap, int srcx, int srcy) {
+  if (fltk3::graphics_driver == fltk3::DisplayDevice::display_device()->driver()) {
+    fl_copy_offscreen_to_display(x, y, w, h, pixmap, srcx, srcy);
+  }
+  else { // when copy is not to the display
+    fl_begin_offscreen(pixmap);
+    uchar *img = fltk3::read_image(NULL, srcx, srcy, w, h, 0);
+    fl_end_offscreen();
+    fltk3::draw_image(img, x, y, w, h, 3, 0);
+    delete[] img;
+  }
+}
+/** @} */
+
+#if defined(USE_X11)
+
+static void fl_copy_offscreen_to_display(int x, int y, int w, int h, fltk3::Offscreen pixmap, int srcx, int srcy) {
+  XCopyArea(fl_display, pixmap, fl_window, fl_gc, srcx, srcy, w, h, x, y);
+}
+
+
+// maybe someone feels inclined to implement alpha blending on X11?
+char fltk3::can_do_alpha_blending() {
+  return 0;
+}
+#elif defined(WIN32)
+
+// Code used to switch output to an off-screen window.  See macros in
+// win32.h which save the old state in local variables.
+
+typedef struct { BYTE a; BYTE b; BYTE c; BYTE d; } FL_BLENDFUNCTION;
+typedef BOOL (WINAPI* fl_alpha_blend_func)
+    (HDC,int,int,int,int,HDC,int,int,int,int,FL_BLENDFUNCTION);
+static fl_alpha_blend_func fl_alpha_blend = NULL;
+static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
+
+/*
+ * This function checks if the version of MSWindows that we
+ * curently run on supports alpha blending for bitmap transfers
+ * and finds the required function if so.
+ */
+char fltk3::can_do_alpha_blending() {
+  static char been_here = 0;
+  static char can_do = 0;
+  // do this test only once
+  if (been_here) return can_do;
+  been_here = 1;
+  // load the library that implements alpha blending
+  HMODULE hMod = LoadLibrary("MSIMG32.DLL");
+  // give up if that doesn't exist (Win95?)
+  if (!hMod) return 0;
+  // now find the blending function inside that dll
+  fl_alpha_blend = (fl_alpha_blend_func)GetProcAddress(hMod, "AlphaBlend");
+  // give up if we can't find it (Win95)
+  if (!fl_alpha_blend) return 0;
+  // we have the call, but does our display support alpha blending?
+  // get the desktop's device context
+  HDC dc = GetDC(0L);
+  if (!dc) return 0;
+  // check the device capabilities flags. However GetDeviceCaps
+  // does not return anything useful, so we have to do it manually:
+
+  HBITMAP bm = CreateCompatibleBitmap(dc, 1, 1);
+  HDC new_gc = CreateCompatibleDC(dc);
+  int save = SaveDC(new_gc);
+  SelectObject(new_gc, bm);
+  /*COLORREF set = */ SetPixel(new_gc, 0, 0, 0x01010101);
+  BOOL alpha_ok = fl_alpha_blend(dc, 0, 0, 1, 1, new_gc, 0, 0, 1, 1, blendfunc);
+  RestoreDC(new_gc, save);
+  DeleteDC(new_gc);
+  DeleteObject(bm);
+  ReleaseDC(0L, dc);
+
+  if (alpha_ok) can_do = 1;
+  return can_do;
+}
+
+HDC fl_makeDC(HBITMAP bitmap) {
+  HDC new_gc = CreateCompatibleDC(fl_gc);
+  SetTextAlign(new_gc, TA_BASELINE|TA_LEFT);
+  SetBkMode(new_gc, TRANSPARENT);
+#if USE_COLORMAP
+  if (fl_palette) SelectPalette(new_gc, fl_palette, FALSE);
+#endif
+  SelectObject(new_gc, bitmap);
+  return new_gc;
+}
+
+static void fl_copy_offscreen_to_display(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
+  HDC new_gc = CreateCompatibleDC(fl_gc);
+  int save = SaveDC(new_gc);
+  SelectObject(new_gc, bitmap);
+  BitBlt(fl_gc, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
+  RestoreDC(new_gc, save);
+  DeleteDC(new_gc);
+}
+
+void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
+  HDC new_gc = CreateCompatibleDC(fl_gc);
+  int save = SaveDC(new_gc);
+  SelectObject(new_gc, bitmap);
+  BOOL alpha_ok = 0;
+  // first try to alpha blend
+  // if to printer, always try alpha_blend
+  int to_display = fltk3::SurfaceDevice::surface()->class_name() == fltk3::DisplayDevice::class_id; // true iff display output
+  if ( (to_display && fltk3::can_do_alpha_blending()) || fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) {
+    alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc);
+  }
+  // if that failed (it shouldn't), still copy the bitmap over, but now alpha is 1
+  if (!alpha_ok) {
+    BitBlt(fl_gc, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
+  }
+  RestoreDC(new_gc, save);
+  DeleteDC(new_gc);
+}
+
+extern void fltk3::restore_clip();
+
+#elif defined(__APPLE_QUARTZ__) || defined(FLTK3_DOXYGEN)
+
+char fltk3::can_do_alpha_blending() {
+  return 1;
+}
+
+fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h) {
+  void *data = calloc(w*h,4);
+  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
+  CGContextRef ctx = CGBitmapContextCreate(
+    data, w, h, 8, w*4, lut, kCGImageAlphaPremultipliedLast);
+  CGColorSpaceRelease(lut);
+  return (fltk3::Offscreen)ctx;
+}
+
+/** \addtogroup fl_drawings
+ @{
+ */
+
+/** 
+  Creation of an offscreen graphics buffer.
+ \param w,h     width and height in pixels of the buffer.
+ \return    the created graphics buffer.
+ */
+fltk3::Offscreen fl_create_offscreen(int w, int h) {
+  void *data = calloc(w*h,4);
+  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
+  CGContextRef ctx = CGBitmapContextCreate(
+    data, w, h, 8, w*4, lut, kCGImageAlphaNoneSkipLast);
+  CGColorSpaceRelease(lut);
+  return (fltk3::Offscreen)ctx;
+}
+
+static void bmProviderRelease (void *src, const void *data, size_t size) {
+  CFIndex count = CFGetRetainCount(src);
+  CFRelease(src);
+  if(count == 1) free((void*)data);
+}
+
+static void fl_copy_offscreen_to_display(int x,int y,int w,int h,fltk3::Offscreen osrc,int srcx,int srcy) {
+  CGContextRef src = (CGContextRef)osrc;
+  void *data = CGBitmapContextGetData(src);
+  int sw = CGBitmapContextGetWidth(src);
+  int sh = CGBitmapContextGetHeight(src);
+  CGImageAlphaInfo alpha = CGBitmapContextGetAlphaInfo(src);
+  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
+  // when output goes to a Quartz printercontext, release of the bitmap must be
+  // delayed after the end of the print page
+  CFRetain(src);
+  CGDataProviderRef src_bytes = CGDataProviderCreateWithData( src, data, sw*sh*4, bmProviderRelease);
+  CGImageRef img = CGImageCreate( sw, sh, 8, 4*8, 4*sw, lut, alpha,
+    src_bytes, 0L, false, kCGRenderingIntentDefault);
+  // fltk3::push_clip();
+  CGRect rect = { { x, y }, { w, h } };
+  Fl_X::q_begin_image(rect, srcx, srcy, sw, sh);
+  CGContextDrawImage(fl_gc, rect, img);
+  Fl_X::q_end_image();
+  CGImageRelease(img);
+  CGColorSpaceRelease(lut);
+  CGDataProviderRelease(src_bytes);
+}
+
+/**  Deletion of an offscreen graphics buffer.
+ \param ctx     the buffer to be deleted.
+ */
+void fl_delete_offscreen(fltk3::Offscreen ctx) {
+  if (!ctx) return;
+  void *data = CGBitmapContextGetData((CGContextRef)ctx);
+  CFIndex count = CFGetRetainCount(ctx);
+  CGContextRelease((CGContextRef)ctx);
+  if(count == 1) free(data);
+}
+
+const int stack_max = 16;
+static int stack_ix = 0;
+static CGContextRef stack_gc[stack_max];
+static Window stack_window[stack_max];
+static fltk3::SurfaceDevice *_ss;
+
+/**  Send all subsequent drawing commands to this offscreen buffer.
+ \param ctx     the offscreen buffer.
+ */
+void fl_begin_offscreen(fltk3::Offscreen ctx) {
+  _ss = fltk3::SurfaceDevice::surface(); 
+  fltk3::DisplayDevice::display_device()->set_current();
+  if (stack_ix<stack_max) {
+    stack_gc[stack_ix] = fl_gc;
+    stack_window[stack_ix] = fl_window;
+  } else 
+    fprintf(stderr, "FLTK CGContext Stack overflow error\n");
+  stack_ix++;
+
+  fl_gc = (CGContextRef)ctx;
+  fl_window = 0;
+  CGContextSaveGState(fl_gc);
+  fltk3::push_no_clip();
+}
+
+/** Quit sending drawing commands to the current offscreen buffer.
+ */
+void fl_end_offscreen() {
+  Fl_X::q_release_context();
+  fltk3::pop_clip();
+  if (stack_ix>0)
+    stack_ix--;
+  else
+    fprintf(stderr, "FLTK CGContext Stack underflow error\n");
+  if (stack_ix<stack_max) {
+    fl_gc = stack_gc[stack_ix];
+    fl_window = stack_window[stack_ix];
+  }
+  _ss->set_current();
+}
+
+/** @} */
+
+namespace fltk3 {
+  extern void restore_clip();
+}
+
+#else
+# error unsupported platform
+#endif
+
+/**
+  Forces the window to be redrawn.
+*/
+void fltk3::DoubleWindow::flush() {flush(0);}
+
+/**
+  Forces the window to be redrawn.
+  \param[in] eraseoverlay non-zero to erase overlay, zero to ignore
+
+  fltk3::OverlayWindow relies on flush(1) copying the back buffer to the
+  front everywhere, even if damage() == 0, thus erasing the overlay,
+  and leaving the clip region set to the entire window.
+*/
+void fltk3::DoubleWindow::flush(int eraseoverlay) {
+  make_current(); // make sure fl_gc is non-zero
+  Fl_X *myi = Fl_X::i(this);
+  if (!myi->other_xid) {
+#if USE_XDBE
+    if (can_xdbe()) {
+      myi->other_xid = XdbeAllocateBackBufferName(fl_display, fl_xid(this), XdbeCopied);
+      myi->backbuffer_bad = 1;
+    } else
+#endif
+#if defined(USE_X11) || defined(WIN32)
+    myi->other_xid = fl_create_offscreen(w(), h());
+    clear_damage(fltk3::DAMAGE_ALL);
+#elif defined(__APPLE_QUARTZ__)
+    if (force_doublebuffering_) {
+      myi->other_xid = fl_create_offscreen(w(), h());
+      clear_damage(fltk3::DAMAGE_ALL);
+    }
+#else
+# error unsupported platform
+#endif
+  }
+#if USE_XDBE
+  if (use_xdbe) {
+    if (myi->backbuffer_bad || eraseoverlay) {
+      // Make sure we do a complete redraw...
+      if (myi->region) {XDestroyRegion(myi->region); myi->region = 0;}
+      clear_damage(fltk3::DAMAGE_ALL);
+      myi->backbuffer_bad = 0;
+    }
+
+    // Redraw as needed...
+    if (damage()) {
+      fltk3::clip_region(myi->region); myi->region = 0;
+      fl_window = myi->other_xid;
+      draw();
+      fl_window = myi->xid;
+    }
+
+    // Copy contents of back buffer to window...
+    XdbeSwapInfo s;
+    s.swap_window = fl_xid(this);
+    s.swap_action = XdbeCopied;
+    XdbeSwapBuffers(fl_display, &s, 1);
+    return;
+  } else
+#endif
+    if (damage() & ~fltk3::DAMAGE_EXPOSE) {
+    fltk3::clip_region(myi->region); myi->region = 0;
+#ifdef WIN32
+    HDC _sgc = fl_gc;
+    fl_gc = fl_makeDC(myi->other_xid);
+    int save = SaveDC(fl_gc);
+    fltk3::restore_clip(); // duplicate region into new gc
+    draw();
+    RestoreDC(fl_gc, save);
+    DeleteDC(fl_gc);
+    fl_gc = _sgc;
+    //# if defined(FLTK_USE_CAIRO)
+    //if fltk3::cairo_autolink_context() fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+    //# endif
+#elif defined(__APPLE__)
+    if ( myi->other_xid ) {
+      fl_begin_offscreen( myi->other_xid );
+      fltk3::clip_region( 0 );   
+      draw();
+      fl_end_offscreen();
+    } else {
+      draw();
+    }
+#else // X:
+    fl_window = myi->other_xid;
+    draw();
+    fl_window = myi->xid;
+#endif
+  }
+  if (eraseoverlay) fltk3::clip_region(0);
+  // on Irix (at least) it is faster to reduce the area copied to
+  // the current clip region:
+  int X,Y,W,H; fltk3::clip_box(0,0,w(),h(),X,Y,W,H);
+  if (myi->other_xid) fl_copy_offscreen(X, Y, W, H, myi->other_xid, X, Y);
+}
+
+void fltk3::DoubleWindow::resize(int X,int Y,int W,int H) {
+  int ow = w();
+  int oh = h();
+  Window::resize(X,Y,W,H);
+#if USE_XDBE
+  if (use_xdbe) {
+    Fl_X* myi = Fl_X::i(this);
+    if (myi && myi->other_xid && (ow < w() || oh < h())) {
+      // STR #2152: Deallocate the back buffer to force creation of a new one.
+      XdbeDeallocateBackBufferName(fl_display,myi->other_xid);
+      myi->other_xid = 0;
+    }
+    return;
+  }
+#endif
+  Fl_X* myi = Fl_X::i(this);
+  if (myi && myi->other_xid && (ow != w() || oh != h())) {
+    fl_delete_offscreen(myi->other_xid);
+    myi->other_xid = 0;
+  }
+}
+
+void fltk3::DoubleWindow::hide() {
+  Fl_X* myi = Fl_X::i(this);
+  if (myi && myi->other_xid) {
+#if USE_XDBE
+    if (!use_xdbe)
+#endif
+      fl_delete_offscreen(myi->other_xid);
+  }
+  Window::hide();
+}
+
+/**
+  The destructor <I>also deletes all the children</I>. This allows a
+  whole tree to be deleted at once, without having to keep a pointer to
+  all the children in the user code.
+*/
+fltk3::DoubleWindow::~DoubleWindow() {
+  hide();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Double_Window.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Browser.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Browser.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Browser.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,643 @@
+//
+// "$Id$"
+//
+// fltk3::FileBrowser routines.
+//
+// Copyright 1999-2010 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::FileBrowser::full_height()     - Return the height of the list.
+//   fltk3::FileBrowser::item_height()     - Return the height of a list item.
+//   fltk3::FileBrowser::item_width()      - Return the width of a list item.
+//   fltk3::FileBrowser::item_draw()       - Draw a list item.
+//   fltk3::FileBrowser::fltk3::FileBrowser() - Create a fltk3::FileBrowser widget.
+//   fltk3::FileBrowser::load()            - Load a directory into the browser.
+//   fltk3::FileBrowser::filter()          - Set the filename filter.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/FileBrowser.h>
+#include <fltk3/draw.h>
+#include <fltk3/filename.h>
+#include <fltk3/Image.h>	// icon
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+#ifdef __CYGWIN__
+#  include <mntent.h>
+#elif defined(WIN32)
+#  include <windows.h>
+#  include <direct.h>
+// Apparently Borland C++ defines DIRECTORY in <direct.h>, which
+// interfers with the fltk3::FileIcon enumeration of the same name.
+#  ifdef DIRECTORY
+#    undef DIRECTORY
+#  endif // DIRECTORY
+#endif // __CYGWIN__
+
+#ifdef __EMX__
+#  define  INCL_DOS
+#  define  INCL_DOSMISC
+#  include <os2.h>
+#endif // __EMX__
+
+#if defined(__APPLE__)
+#  include <sys/param.h>
+#  include <sys/ucred.h>
+#  include <sys/mount.h>
+#endif // __APPLE__
+
+//
+// fltk3::BrowserLine_ definition from "fltk3::Browser.cxx"...
+//
+
+#define SELECTED 1
+#define NOTDISPLAYED 2
+
+// TODO -- Warning: The definition of fltk3::BrowserLine_ here is a hack.
+//    fltk3::FileBrowser should not do this. PLEASE FIX.
+//    fltk3::BrowserLine_ should be private to fltk3::Browser, and not re-defined here.
+//    For now, make sure this struct is precisely consistent with fltk3::Browser.cxx.
+//
+struct fltk3::BrowserLine_			// data is in a linked list of these
+{
+  fltk3::BrowserLine_	*prev;		// Previous item in list
+  fltk3::BrowserLine_	*next;		// Next item in list
+  void		*data;		// Pointer to data (function)
+  fltk3::Image      *icon;		// Pointer to optional icon
+  short		length;		// sizeof(txt)-1, may be longer than string
+  char		flags;		// selected, displayed
+  char		txt[1];		// start of allocated array
+};
+
+
+//
+// 'fltk3::FileBrowser::full_height()' - Return the height of the list.
+//
+
+int					// O - Height in pixels
+fltk3::FileBrowser::full_height() const
+{
+  int	i,				// Looping var
+	th;				// Total height of list.
+
+
+  for (i = 0, th = 0; i < size(); i ++)
+    th += item_height(find_line(i));
+
+  return (th);
+}
+
+
+//
+// 'fltk3::FileBrowser::item_height()' - Return the height of a list item.
+//
+
+int					// O - Height in pixels
+fltk3::FileBrowser::item_height(void *p) const	// I - List item data
+{
+  fltk3::BrowserLine_	*line;			// Pointer to line
+  char		*t;			// Pointer into text
+  int		height;			// Width of line
+  int		textheight;		// Height of text
+
+
+  // Figure out the standard text height...
+  fltk3::font(textfont(), textsize());
+  textheight = fltk3::height();
+
+  // We always have at least 1 line...
+  height = textheight;
+
+  // Scan for newlines...
+  line = (fltk3::BrowserLine_ *)p;
+
+  if (line != NULL)
+    for (t = line->txt; *t != '\0'; t ++)
+      if (*t == '\n')
+	height += textheight;
+
+  // If we have enabled icons then add space for them...
+  if (fltk3::FileIcon::first() != NULL && height < iconsize_)
+    height = iconsize_;
+
+  // Add space for the selection border..
+  height += 2;
+
+  // Return the height
+  return (height);
+}
+
+
+//
+// 'fltk3::FileBrowser::item_width()' - Return the width of a list item.
+//
+
+int					// O - Width in pixels
+fltk3::FileBrowser::item_width(void *p) const	// I - List item data
+{
+  int		i;			// Looping var
+  fltk3::BrowserLine_	*line;			// Pointer to line
+  char		*t,			// Pointer into text
+		*ptr,			// Pointer into fragment
+		fragment[10240];	// Fragment of text
+  int		width,			// Width of line
+		tempwidth;		// Width of fragment
+  int		column;			// Current column
+  const int	*columns;		// Columns
+
+
+  // Scan for newlines...
+  line    = (fltk3::BrowserLine_ *)p;
+  columns = column_widths();
+
+  // Set the font and size...
+  if (line->txt[strlen(line->txt) - 1] == '/')
+    fltk3::font(textfont() | fltk3::BOLD, textsize());
+  else
+    fltk3::font(textfont(), textsize());
+
+  if (strchr(line->txt, '\n') == NULL &&
+      strchr(line->txt, column_char()) == NULL)
+  {
+    // Do a fast width calculation...
+    width = (int)fltk3::width(line->txt);
+  }
+  else
+  {
+    // More than 1 line or have columns; find the maximum width...
+    width     = 0;
+    tempwidth = 0;
+    column    = 0;
+
+    for (t = line->txt, ptr = fragment; *t != '\0'; t ++)
+      if (*t == '\n')
+      {
+        // Newline - nul terminate this fragment and get the width...
+        *ptr = '\0';
+
+	tempwidth += (int)fltk3::width(fragment);
+
+        // Update the max width as needed...
+	if (tempwidth > width)
+	  width = tempwidth;
+
+        // Point back to the start of the fragment...
+	ptr       = fragment;
+	tempwidth = 0;
+	column    = 0;
+      }
+      else if (*t == column_char())
+      {
+        // Advance to the next column...
+        column ++;
+	if (columns)
+	{
+	  for (i = 0, tempwidth = 0; i < column && columns[i]; i ++)
+	    tempwidth += columns[i];
+	}
+	else
+          tempwidth = column * (int)(fltk3::height() * 0.6 * 8.0);
+
+        if (tempwidth > width)
+	  width = tempwidth;
+
+	ptr = fragment;
+      }
+      else
+        *ptr++ = *t;
+
+    if (ptr > fragment)
+    {
+      // Nul terminate this fragment and get the width...
+      *ptr = '\0';
+
+      tempwidth += (int)fltk3::width(fragment);
+
+      // Update the max width as needed...
+      if (tempwidth > width)
+	width = tempwidth;
+    }
+  }
+
+  // If we have enabled icons then add space for them...
+  if (fltk3::FileIcon::first() != NULL)
+    width += iconsize_ + 8;
+
+  // Add space for the selection border..
+  width += 2;
+
+  // Return the width
+  return (width);
+}
+
+
+//
+// 'fltk3::FileBrowser::item_draw()' - Draw a list item.
+//
+
+void
+fltk3::FileBrowser::item_draw(void *p,	// I - List item data
+                 	   int  X,	// I - Upper-lefthand X coordinate
+		 	   int  Y,	// I - Upper-lefthand Y coordinate
+		 	   int  W,	// I - Width of item
+			   int) const	// I - Height of item
+{
+  int		i;			// Looping var
+  fltk3::BrowserLine_	*line;			// Pointer to line
+  fltk3::Color	c;			// Text color
+  char		*t,			// Pointer into text
+		*ptr,			// Pointer into fragment
+		fragment[10240];	// Fragment of text
+  int		width,			// Width of line
+		height;			// Height of line
+  int		column;			// Current column
+  const int	*columns;		// Columns
+
+
+  // Draw the list item text...
+  line = (fltk3::BrowserLine_ *)p;
+
+  if (line->txt[strlen(line->txt) - 1] == '/')
+    fltk3::font(textfont() | fltk3::BOLD, textsize());
+  else
+    fltk3::font(textfont(), textsize());
+
+  if (line->flags & SELECTED)
+    c = fltk3::contrast(textcolor(), selection_color());
+  else
+    c = textcolor();
+
+  if (fltk3::FileIcon::first() == NULL)
+  {
+    // No icons, just draw the text...
+    X ++;
+    W -= 2;
+  }
+  else
+  {
+    // Draw the icon if it is set...
+    if (line->data)
+      ((fltk3::FileIcon *)line->data)->draw(X, Y, iconsize_, iconsize_,
+                                	(line->flags & SELECTED) ? fltk3::YELLOW :
+				                                   fltk3::LIGHT2,
+					active_r());
+
+    // Draw the text offset to the right...
+    X += iconsize_ + 9;
+    W -= iconsize_ - 10;
+
+    // Center the text vertically...
+    height = fltk3::height();
+
+    for (t = line->txt; *t != '\0'; t ++)
+      if (*t == '\n')
+	height += fltk3::height();
+
+    if (height < iconsize_)
+      Y += (iconsize_ - height) / 2;
+  }
+
+  // Draw the text...
+  line    = (fltk3::BrowserLine_ *)p;
+  columns = column_widths();
+  width   = 0;
+  column  = 0;
+
+  if (active_r())
+    fltk3::color(c);
+  else
+    fltk3::color(fltk3::inactive(c));
+
+  for (t = line->txt, ptr = fragment; *t != '\0'; t ++)
+    if (*t == '\n')
+    {
+      // Newline - nul terminate this fragment and draw it...
+      *ptr = '\0';
+
+      fltk3::draw(fragment, X + width, Y, W - width, fltk3::height(),
+              (fltk3::Align)(fltk3::ALIGN_LEFT | fltk3::ALIGN_CLIP), 0, 0);
+
+      // Point back to the start of the fragment...
+      ptr    = fragment;
+      width  = 0;
+      Y      += fltk3::height();
+      column = 0;
+    }
+    else if (*t == column_char())
+    {
+      // Tab - nul terminate this fragment and draw it...
+      *ptr = '\0';
+
+      int cW = W - width; // Clip width...
+
+      if (columns)
+      {
+        // Try clipping inside this column...
+	for (i = 0; i < column && columns[i]; i ++);
+
+        if (columns[i])
+          cW = columns[i];
+      }
+
+      fltk3::draw(fragment, X + width, Y, cW, fltk3::height(),
+              (fltk3::Align)(fltk3::ALIGN_LEFT | fltk3::ALIGN_CLIP), 0, 0);
+
+      // Advance to the next column...
+      column ++;
+      if (columns)
+      {
+	for (i = 0, width = 0; i < column && columns[i]; i ++)
+	  width += columns[i];
+      }
+      else
+        width = column * (int)(fltk3::height() * 0.6 * 8.0);
+
+      ptr = fragment;
+    }
+    else
+      *ptr++ = *t;
+
+  if (ptr > fragment)
+  {
+    // Nul terminate this fragment and draw it...
+    *ptr = '\0';
+
+    fltk3::draw(fragment, X + width, Y, W - width, fltk3::height(),
+            (fltk3::Align)(fltk3::ALIGN_LEFT | fltk3::ALIGN_CLIP), 0, 0);
+  }
+}
+
+
+//
+// 'fltk3::FileBrowser::fltk3::FileBrowser()' - Create a fltk3::FileBrowser widget.
+//
+
+fltk3::FileBrowser::FileBrowser(int        X,  // I - Upper-lefthand X coordinate
+                        	 int        Y,  // I - Upper-lefthand Y coordinate
+				 int        W,  // I - Width in pixels
+				 int        H,  // I - Height in pixels
+				 const char *l)	// I - Label text
+    : fltk3::Browser(X, Y, W, H, l)
+{
+  // Initialize the filter pattern, current directory, and icon size...
+  pattern_   = "*";
+  directory_ = "";
+  iconsize_  = (uchar)(3 * textsize() / 2);
+  filetype_  = FILES;
+}
+
+
+//
+// 'fltk3::FileBrowser::load()' - Load a directory into the browser.
+//
+
+int						// O - Number of files loaded
+fltk3::FileBrowser::load(const char     *directory,// I - Directory to load
+                      fltk3::FileSortF *sort)	// I - Sort function to use
+{
+  int		i;				// Looping var
+  int		num_files;			// Number of files in directory
+  int		num_dirs;			// Number of directories in list
+  char		filename[4096];			// Current file
+  fltk3::FileIcon	*icon;				// Icon to use
+
+
+//  printf("fltk3::FileBrowser::load(\"%s\")\n", directory);
+
+  clear();
+
+  directory_ = directory;
+
+  if (!directory)
+    return (0);
+
+  if (directory_[0] == '\0')
+  {
+    //
+    // No directory specified; for UNIX list all mount points.  For DOS
+    // list all valid drive letters...
+    //
+
+    num_files = 0;
+    if ((icon = fltk3::FileIcon::find("any", fltk3::FileIcon::DEVICE)) == NULL)
+      icon = fltk3::FileIcon::find("any", fltk3::FileIcon::DIRECTORY);
+
+#ifdef WIN32
+#  ifdef __CYGWIN__
+    //
+    // Cygwin provides an implementation of setmntent() to get the list
+    // of available drives...
+    //
+    FILE          *m = setmntent("/-not-used-", "r");
+    struct mntent *p;
+
+    while ((p = getmntent (m)) != NULL) {
+      add(p->mnt_dir, icon);
+      num_files ++;
+    }
+
+    endmntent(m);
+#  else
+    //
+    // Normal WIN32 code uses drive bits...
+    //
+    DWORD	drives;		// Drive available bits
+
+    drives = GetLogicalDrives();
+    for (i = 'A'; i <= 'Z'; i ++, drives >>= 1)
+      if (drives & 1)
+      {
+        sprintf(filename, "%c:/", i);
+
+	if (i < 'C') // see also: GetDriveType and GetVolumeInformation in WIN32
+	  add(filename, icon);
+	else
+	  add(filename, icon);
+
+	num_files ++;
+      }
+#  endif // __CYGWIN__
+#elif defined(__EMX__)
+    //
+    // OS/2 code uses drive bits...
+    //
+    ULONG	curdrive;	// Current drive
+    ULONG	drives;		// Drive available bits
+    int		start = 3;      // 'C' (MRS - dunno if this is correct!)
+
+
+    DosQueryCurrentDisk(&curdrive, &drives);
+    drives >>= start - 1;
+    for (i = 'A'; i <= 'Z'; i ++, drives >>= 1)
+      if (drives & 1)
+      {
+        sprintf(filename, "%c:/", i);
+        add(filename, icon);
+
+	num_files ++;
+      }
+#elif defined(__APPLE__)
+    // MacOS X and Darwin use getfsstat() system call...
+    int			numfs;	// Number of file systems
+    struct statfs	*fs;	// Buffer for file system info
+
+
+    // We always have the root filesystem.
+    add("/", icon);
+
+    // Get the mounted filesystems...
+    numfs = getfsstat(NULL, 0, MNT_NOWAIT);
+    if (numfs > 0) {
+      // We have file systems, get them...
+      fs = new struct statfs[numfs];
+      getfsstat(fs, sizeof(struct statfs) * numfs, MNT_NOWAIT);
+
+      // Add filesystems to the list...
+      for (i = 0; i < numfs; i ++) {
+	// Ignore "/", "/dev", and "/.vol"...
+        if (fs[i].f_mntonname[1] && strcmp(fs[i].f_mntonname, "/dev") &&
+	    strcmp(fs[i].f_mntonname, "/.vol")) {
+          snprintf(filename, sizeof(filename), "%s/", fs[i].f_mntonname);
+          add(filename, icon);
+        }
+        num_files ++;
+      }
+
+      // Free the memory used for the file system info array...
+      delete[] fs;
+    }
+#else
+    //
+    // UNIX code uses /etc/fstab or similar...
+    //
+    FILE	*mtab;		// /etc/mtab or /etc/mnttab file
+    char	line[FLTK3_PATH_MAX];	// Input line
+
+    //
+    // Open the file that contains a list of mounted filesystems...
+    //
+
+    mtab = fltk3::fopen("/etc/mnttab", "r");	// Fairly standard
+    if (mtab == NULL)
+      mtab = fltk3::fopen("/etc/mtab", "r");	// More standard
+    if (mtab == NULL)
+      mtab = fltk3::fopen("/etc/fstab", "r");	// Otherwise fallback to full list
+    if (mtab == NULL)
+      mtab = fltk3::fopen("/etc/vfstab", "r");	// Alternate full list file
+
+    if (mtab != NULL)
+    {
+      while (fgets(line, sizeof(line), mtab) != NULL)
+      {
+        if (line[0] == '#' || line[0] == '\n')
+	  continue;
+        if (sscanf(line, "%*s%4095s", filename) != 1)
+	  continue;
+
+        strlcat(filename, "/", sizeof(filename));
+
+//        printf("fltk3::FileBrowser::load() - adding \"%s\" to list...\n", filename);
+        add(filename, icon);
+	num_files ++;
+      }
+
+      fclose(mtab);
+    }
+#endif // WIN32 || __EMX__
+  }
+  else
+  {
+    dirent	**files;	// Files in in directory
+
+
+    //
+    // Build the file list...
+    //
+
+#if (defined(WIN32) && !defined(__CYGWIN__)) || defined(__EMX__)
+    strlcpy(filename, directory_, sizeof(filename));
+    i = strlen(filename) - 1;
+
+    if (i == 2 && filename[1] == ':' &&
+        (filename[2] == '/' || filename[2] == '\\'))
+      filename[2] = '/';
+    else if (filename[i] != '/' && filename[i] != '\\')
+      strlcat(filename, "/", sizeof(filename));
+
+    num_files = fltk3::filename_list(filename, &files, sort);
+#else
+    num_files = fltk3::filename_list(directory_, &files, sort);
+#endif /* WIN32 || __EMX__ */
+
+    if (num_files <= 0)
+      return (0);
+
+    for (i = 0, num_dirs = 0; i < num_files; i ++) {
+      if (strcmp(files[i]->d_name, "./")) {
+	snprintf(filename, sizeof(filename), "%s/%s", directory_,
+	         files[i]->d_name);
+
+        icon = fltk3::FileIcon::find(filename);
+	if ((icon && icon->type() == fltk3::FileIcon::DIRECTORY) ||
+	     fltk3::_filename_isdir_quick(filename)) {
+          num_dirs ++;
+          insert(num_dirs, files[i]->d_name, icon);
+	} else if (filetype_ == FILES &&
+	           fltk3::filename_match(files[i]->d_name, pattern_)) {
+          add(files[i]->d_name, icon);
+	}
+      }
+
+      free(files[i]);
+    }
+
+    free(files);
+  }
+
+  return (num_files);
+}
+
+
+//
+// 'fltk3::FileBrowser::filter()' - Set the filename filter.
+//
+
+void
+fltk3::FileBrowser::filter(const char *pattern)	// I - Pattern string
+{
+  // If pattern is NULL set the pattern to "*"...
+  if (pattern)
+    pattern_ = pattern;
+  else
+    pattern_ = "*";
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_File_Browser.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Chooser.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Chooser.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Chooser.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,475 @@
+//
+// "$Id$"
+//
+// fltk3::FileChooser dialog for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// generated by Fast Light User Interface Designer (fluid) version 1.0300
+
+#include <fltk3/FileChooser.h>
+#include <fltk3/draw.h>
+
+void fltk3::FileChooser::cb_window_i(fltk3::DoubleWindow*, void*) {
+  fileName->value("");
+fileList->deselect();
+fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
+window->hide();
+}
+void fltk3::FileChooser::cb_window(fltk3::DoubleWindow* o, void* v) {
+  ((fltk3::FileChooser*)(o->user_data()))->cb_window_i(o,v);
+}
+
+void fltk3::FileChooser::cb_showChoice_i(fltk3::Choice*, void*) {
+  showChoiceCB();
+}
+void fltk3::FileChooser::cb_showChoice(fltk3::Choice* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_showChoice_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favoritesButton_i(fltk3::MenuButton*, void*) {
+  favoritesButtonCB();
+}
+void fltk3::FileChooser::cb_favoritesButton(fltk3::MenuButton* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_favoritesButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_newButton_i(fltk3::Button*, void*) {
+  newdir();
+}
+void fltk3::FileChooser::cb_newButton(fltk3::Button* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_newButton_i(o,v);
+}
+
+#include <fltk3/Bitmap.h>
+static unsigned char idata_new[] =
+{0,0,120,0,132,0,2,1,1,254,1,128,49,128,49,128,253,128,253,128,49,128,49,
+128,1,128,1,128,255,255,0,0};
+static fltk3::Bitmap image_new(idata_new, 16, 16);
+
+void fltk3::FileChooser::cb__i(fltk3::TiledGroup*, void*) {
+  update_preview();
+}
+void fltk3::FileChooser::cb_(fltk3::TiledGroup* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->user_data()))->cb__i(o,v);
+}
+
+void fltk3::FileChooser::cb_fileList_i(fltk3::FileBrowser*, void*) {
+  fileListCB();
+}
+void fltk3::FileChooser::cb_fileList(fltk3::FileBrowser* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_fileList_i(o,v);
+}
+
+void fltk3::FileChooser::cb_previewButton_i(fltk3::CheckButton*, void*) {
+  preview(previewButton->value());
+}
+void fltk3::FileChooser::cb_previewButton(fltk3::CheckButton* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->parent()->user_data()))->cb_previewButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_showHiddenButton_i(fltk3::CheckButton*, void*) {
+  showHidden(showHiddenButton->value());
+}
+void fltk3::FileChooser::cb_showHiddenButton(fltk3::CheckButton* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->parent()->user_data()))->cb_showHiddenButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_fileName_i(fltk3::FileInput*, void*) {
+  fileNameCB();
+}
+void fltk3::FileChooser::cb_fileName(fltk3::FileInput* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_fileName_i(o,v);
+}
+
+void fltk3::FileChooser::cb_okButton_i(fltk3::ReturnButton*, void*) {
+  window->hide();
+
+// Do any callback that is registered...
+if (callback_)
+  (*callback_)(this, data_);
+}
+void fltk3::FileChooser::cb_okButton(fltk3::ReturnButton* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->parent()->user_data()))->cb_okButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_cancelButton_i(fltk3::Button*, void*) {
+  fileName->value("");
+fileList->deselect();
+fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
+window->hide();
+}
+void fltk3::FileChooser::cb_cancelButton(fltk3::Button* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->parent()->user_data()))->cb_cancelButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favList_i(fltk3::FileBrowser*, void*) {
+  favoritesCB(favList);
+}
+void fltk3::FileChooser::cb_favList(fltk3::FileBrowser* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->user_data()))->cb_favList_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favUpButton_i(fltk3::Button*, void*) {
+  favoritesCB(favUpButton);
+}
+void fltk3::FileChooser::cb_favUpButton(fltk3::Button* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_favUpButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favDeleteButton_i(fltk3::Button*, void*) {
+  favoritesCB(favDeleteButton);
+}
+void fltk3::FileChooser::cb_favDeleteButton(fltk3::Button* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_favDeleteButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favDownButton_i(fltk3::Button*, void*) {
+  favoritesCB(favDownButton);
+}
+void fltk3::FileChooser::cb_favDownButton(fltk3::Button* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_favDownButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favCancelButton_i(fltk3::Button*, void*) {
+  favWindow->hide();
+}
+void fltk3::FileChooser::cb_favCancelButton(fltk3::Button* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_favCancelButton_i(o,v);
+}
+
+void fltk3::FileChooser::cb_favOkButton_i(fltk3::ReturnButton*, void*) {
+  favoritesCB(favOkButton);
+}
+void fltk3::FileChooser::cb_favOkButton(fltk3::ReturnButton* o, void* v) {
+  ((fltk3::FileChooser*)(o->parent()->parent()->user_data()))->cb_favOkButton_i(o,v);
+}
+
+fltk3::FileChooser::FileChooser(const char *d, const char *p, int t, const char *title) {
+  fltk3::Group *prev_current = fltk3::Group::current();
+  { window = new fltk3::DoubleWindow(490, 380, "Choose File");
+    window->callback((fltk3::Callback*)cb_window, (void*)(this));
+    { fltk3::Group* o = new fltk3::Group(10, 10, 470, 25);
+      { showChoice = new fltk3::Choice(65, 10, 215, 25, "Show:");
+        showChoice->down_box(fltk3::BORDER_BOX);
+        showChoice->labelfont(1);
+        showChoice->callback((fltk3::Callback*)cb_showChoice);
+        fltk3::Group::current()->resizable(showChoice);
+        showChoice->label(show_label);
+      } // fltk3::Choice* showChoice
+      { favoritesButton = new fltk3::MenuButton(290, 10, 155, 25, "Favorites");
+        favoritesButton->down_box(fltk3::BORDER_BOX);
+        favoritesButton->callback((fltk3::Callback*)cb_favoritesButton);
+        favoritesButton->align(fltk3::Align(fltk3::ALIGN_LEFT|fltk3::ALIGN_INSIDE));
+        favoritesButton->label(favorites_label);
+      } // fltk3::MenuButton* favoritesButton
+      { fltk3::Button* o = newButton = new fltk3::Button(455, 10, 25, 25);
+        newButton->image(image_new);
+        newButton->labelsize(8);
+        newButton->callback((fltk3::Callback*)cb_newButton);
+        o->tooltip(new_directory_tooltip);
+      } // fltk3::Button* newButton
+      o->end();
+    } // fltk3::Group* o
+    { fltk3::TiledGroup* o = new fltk3::TiledGroup(10, 45, 470, 225);
+      o->callback((fltk3::Callback*)cb_);
+      { fileList = new fltk3::FileBrowser(10, 45, 295, 225);
+        fileList->type(2);
+        fileList->callback((fltk3::Callback*)cb_fileList);
+        fileList->window()->hotspot(fileList);
+      } // fltk3::FileBrowser* fileList
+      { previewBox = new fltk3::Box(305, 45, 175, 225, "?");
+        previewBox->box(fltk3::DOWN_BOX);
+        previewBox->labelsize(100);
+        previewBox->align(fltk3::Align(fltk3::ALIGN_CLIP|fltk3::ALIGN_INSIDE));
+      } // fltk3::Box* previewBox
+      o->end();
+      fltk3::Group::current()->resizable(o);
+    } // fltk3::TiledGroup* o
+    { fltk3::Group* o = new fltk3::Group(10, 275, 470, 95);
+      { fltk3::Group* o = new fltk3::Group(10, 275, 470, 20);
+        { previewButton = new fltk3::CheckButton(10, 275, 73, 20, "Preview");
+          previewButton->shortcut(0x80070);
+          previewButton->down_box(fltk3::DOWN_BOX);
+          previewButton->value(1);
+          previewButton->callback((fltk3::Callback*)cb_previewButton);
+          previewButton->label(preview_label);
+        } // fltk3::CheckButton* previewButton
+        { showHiddenButton = new fltk3::CheckButton(115, 275, 165, 20, "Show hidden files");
+          showHiddenButton->down_box(fltk3::DOWN_BOX);
+          showHiddenButton->callback((fltk3::Callback*)cb_showHiddenButton);
+          showHiddenButton->label(hidden_label);
+        } // fltk3::CheckButton* showHiddenButton
+        { fltk3::Box* o = new fltk3::Box(115, 275, 365, 20);
+          fltk3::Group::current()->resizable(o);
+        } // fltk3::Box* o
+        o->end();
+      } // fltk3::Group* o
+      { fileName = new fltk3::FileInput(115, 300, 365, 35);
+        fileName->labelfont(1);
+        fileName->callback((fltk3::Callback*)cb_fileName);
+        fileName->when(fltk3::WHEN_ENTER_KEY);
+        fltk3::Group::current()->resizable(fileName);
+        fileName->when(fltk3::WHEN_CHANGED | fltk3::WHEN_ENTER_KEY);
+      } // fltk3::FileInput* fileName
+      { fltk3::Box* o = new fltk3::Box(10, 310, 105, 25, "Filename:");
+        o->labelfont(1);
+        o->align(fltk3::Align(fltk3::ALIGN_RIGHT|fltk3::ALIGN_INSIDE));
+        o->label(filename_label);
+      } // fltk3::Box* o
+      { fltk3::Group* o = new fltk3::Group(10, 345, 470, 25);
+        { okButton = new fltk3::ReturnButton(313, 345, 85, 25, "OK");
+          okButton->callback((fltk3::Callback*)cb_okButton);
+          okButton->label(fltk3::ok);
+        } // fltk3::ReturnButton* okButton
+        { fltk3::Button* o = cancelButton = new fltk3::Button(408, 345, 72, 25, "Cancel");
+          cancelButton->callback((fltk3::Callback*)cb_cancelButton);
+          o->label(fltk3::cancel);
+        } // fltk3::Button* cancelButton
+        { fltk3::Box* o = new fltk3::Box(10, 345, 30, 25);
+          fltk3::Group::current()->resizable(o);
+        } // fltk3::Box* o
+        o->end();
+      } // fltk3::Group* o
+      o->end();
+    } // fltk3::Group* o
+    if (title) window->label(title);
+    window->set_modal();
+    window->end();
+  } // fltk3::DoubleWindow* window
+  { favWindow = new fltk3::DoubleWindow(355, 150, "Manage Favorites");
+    favWindow->user_data((void*)(this));
+    { favList = new fltk3::FileBrowser(10, 10, 300, 95);
+      favList->type(2);
+      favList->callback((fltk3::Callback*)cb_favList);
+      fltk3::Group::current()->resizable(favList);
+    } // fltk3::FileBrowser* favList
+    { fltk3::Group* o = new fltk3::Group(320, 10, 25, 95);
+      { favUpButton = new fltk3::Button(320, 10, 25, 25, "@8>");
+        favUpButton->callback((fltk3::Callback*)cb_favUpButton);
+      } // fltk3::Button* favUpButton
+      { favDeleteButton = new fltk3::Button(320, 45, 25, 25, "X");
+        favDeleteButton->labelfont(1);
+        favDeleteButton->callback((fltk3::Callback*)cb_favDeleteButton);
+        fltk3::Group::current()->resizable(favDeleteButton);
+      } // fltk3::Button* favDeleteButton
+      { favDownButton = new fltk3::Button(320, 80, 25, 25, "@2>");
+        favDownButton->callback((fltk3::Callback*)cb_favDownButton);
+      } // fltk3::Button* favDownButton
+      o->end();
+    } // fltk3::Group* o
+    { fltk3::Group* o = new fltk3::Group(10, 113, 335, 29);
+      { favCancelButton = new fltk3::Button(273, 115, 72, 25, "Cancel");
+        favCancelButton->callback((fltk3::Callback*)cb_favCancelButton);
+        favCancelButton->label(fltk3::cancel);
+      } // fltk3::Button* favCancelButton
+      { favOkButton = new fltk3::ReturnButton(181, 115, 79, 25, "Save");
+        favOkButton->callback((fltk3::Callback*)cb_favOkButton);
+        favOkButton->label(save_label);
+      } // fltk3::ReturnButton* favOkButton
+      { fltk3::Box* o = new fltk3::Box(10, 115, 161, 25);
+        fltk3::Group::current()->resizable(o);
+      } // fltk3::Box* o
+      o->end();
+    } // fltk3::Group* o
+    favWindow->label(manage_favorites_label);
+    favWindow->set_modal();
+    favWindow->size_range(181, 150);
+    favWindow->end();
+  } // fltk3::DoubleWindow* favWindow
+  callback_ = 0;
+  data_ = 0;
+  directory_[0] = 0;
+  window->size_range(window->w(), window->h(), fltk3::w(), fltk3::h());
+  type(t);
+  filter(p);
+  update_favorites();
+  value(d);
+  type(t);
+  int e;
+  prefs_.get("preview", e, 1);
+  preview(e);
+  fltk3::Group::current(prev_current);
+  ext_group=(fltk3::Widget*)0;
+}
+
+fltk3::FileChooser::~FileChooser() {
+  fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
+  if(ext_group)window->remove(ext_group);
+  delete window;
+  delete favWindow;
+}
+
+void fltk3::FileChooser::callback(void (*cb)(fltk3::FileChooser *, void *), void *d ) {
+  callback_ = cb;
+  data_     = d;
+}
+
+void fltk3::FileChooser::color(fltk3::Color c) {
+  fileList->color(c);
+}
+
+fltk3::Color fltk3::FileChooser::color() {
+  return (fileList->color());
+}
+
+char * fltk3::FileChooser::directory() {
+  return directory_;
+}
+
+const char * fltk3::FileChooser::filter() {
+  return (fileList->filter());
+}
+
+int fltk3::FileChooser::filter_value() {
+  return showChoice->value();
+}
+
+void fltk3::FileChooser::filter_value(int f) {
+  showChoice->value(f);
+  showChoiceCB();
+}
+
+void fltk3::FileChooser::hide() {
+  window->hide();
+}
+
+void fltk3::FileChooser::iconsize(uchar s) {
+  fileList->iconsize(s);
+}
+
+uchar fltk3::FileChooser::iconsize() {
+  return (fileList->iconsize());
+}
+
+void fltk3::FileChooser::label(const char *l) {
+  window->label(l);
+}
+
+const char * fltk3::FileChooser::label() {
+  return (window->label());
+}
+
+void fltk3::FileChooser::ok_label(const char *l) {
+  okButton->label(l);
+  int w=0, h=0;
+  okButton->measure_label(w, h);
+  okButton->resize(cancelButton->x() - 50 - w, cancelButton->y(),
+                   w + 40, 25);
+  okButton->parent()->init_sizes();
+}
+
+const char * fltk3::FileChooser::ok_label() {
+  return (okButton->label());
+}
+
+int fltk3::FileChooser::shown() {
+  return window->shown();
+}
+
+void fltk3::FileChooser::textcolor(fltk3::Color c) {
+  fileList->textcolor(c);
+}
+
+fltk3::Color fltk3::FileChooser::textcolor() {
+  return (fileList->textcolor());
+}
+
+void fltk3::FileChooser::textfont(fltk3::Font f) {
+  fileList->textfont(f);
+}
+
+fltk3::Font fltk3::FileChooser::textfont() {
+  return (fileList->textfont());
+}
+
+void fltk3::FileChooser::textsize(fltk3::Fontsize s) {
+  fileList->textsize(s);
+}
+
+fltk3::Fontsize fltk3::FileChooser::textsize() {
+  return (fileList->textsize());
+}
+
+void fltk3::FileChooser::type(int t) {
+  type_ = t;
+  if (t & MULTI)
+    fileList->type(fltk3::MULTI_BROWSER);
+  else
+    fileList->type(fltk3::HOLD_BROWSER);
+  if (t & CREATE)
+    newButton->activate();
+  else
+    newButton->deactivate();
+  if (t & DIRECTORY)
+    fileList->filetype(fltk3::FileBrowser::DIRECTORIES);
+  else
+    fileList->filetype(fltk3::FileBrowser::FILES);
+}
+
+int fltk3::FileChooser::type() {
+  return (type_);
+}
+
+void * fltk3::FileChooser::user_data() const {
+  return (data_);
+}
+
+void fltk3::FileChooser::user_data(void *d) {
+  data_ = d;
+}
+
+int fltk3::FileChooser::visible() {
+  return window->visible();
+}
+
+fltk3::Widget* fltk3::FileChooser::add_extra(fltk3::Widget* gr) {
+  fltk3::Widget* ret=ext_group;
+  if (gr==ext_group) {
+    return ret;
+  }
+  if (ext_group) {
+    int sh=ext_group->h()+4;
+    fltk3::Widget* svres=window->resizable();
+    window->resizable(NULL);
+    window->size(window->w(),window->h()-sh);
+    window->remove(ext_group);
+    ext_group=NULL;
+    window->resizable(svres);
+  }
+  if (gr) {
+    int nh=window->h()+gr->h()+4;
+    fltk3::Widget* svres=window->resizable();
+    window->resizable(NULL);
+    window->size(window->w(),nh);
+    gr->position(2,okButton->y()+okButton->h()+2);
+    window->add(gr);
+    ext_group=gr;
+    window->resizable(svres);
+  }
+  return ret;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_File_Chooser.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Chooser.fl
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Chooser.fl	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Chooser.fl	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,470 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0300 
+header_name {../FL/Fl_File_Chooser.H} 
+code_name {.cxx}
+comment {//
+// "$Id$"
+//
+// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+//     http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+} {in_source in_header
+} 
+
+decl {\#include <FL/fl_draw.H>} {} 
+
+class FL_EXPORT Fl_File_Chooser {open
+} {
+  decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public
+  }
+  decl {static Fl_Preferences prefs_;} {}
+  decl {void (*callback_)(Fl_File_Chooser*, void *);} {}
+  decl {void *data_;} {}
+  decl {char directory_[FL_PATH_MAX];} {}
+  decl {char pattern_[FL_PATH_MAX];} {}
+  decl {char preview_text_[2048];} {}
+  decl {int type_;} {}
+  decl {void favoritesButtonCB();} {}
+  decl {void favoritesCB(Fl_Widget *w);} {}
+  decl {void fileListCB();} {}
+  decl {void fileNameCB();} {}
+  decl {void newdir();} {}
+  decl {static void previewCB(Fl_File_Chooser *fc);} {}
+  decl {void showChoiceCB();} {}
+  decl {void update_favorites();} {}
+  decl {void update_preview();} {}
+  Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {} {
+    code {Fl_Group *prev_current = Fl_Group::current();} {}
+    Fl_Window window {
+      label {Choose File}
+      callback {fileName->value("");
+fileList->deselect();
+Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+window->hide();} open
+      private xywh {507 327 490 380} type Double resizable
+      code0 {if (title) window->label(title);}
+      code1 {\#include <stdio.h>}
+      code2 {\#include <stdlib.h>}
+      code3 {\#include <string.h>} modal visible
+    } {
+      Fl_Group {} {open
+        private xywh {10 10 470 25}
+      } {
+        Fl_Choice showChoice {
+          label {Show:}
+          callback {showChoiceCB();} open
+          private xywh {65 10 215 25} down_box BORDER_BOX labelfont 1 resizable
+          code0 {showChoice->label(show_label);}
+        } {}
+        Fl_Menu_Button favoritesButton {
+          label Favorites
+          callback {favoritesButtonCB();} open
+          private xywh {290 10 155 25} down_box BORDER_BOX align 20
+          code0 {favoritesButton->label(favorites_label);}
+        } {}
+        Fl_Button newButton {
+          callback {newdir();}
+          image {new.xbm} xywh {455 10 25 25} labelsize 8
+          code0 {\#include <FL/Fl_Preferences.H>}
+          code1 {o->tooltip(new_directory_tooltip);}
+        }
+      }
+      Fl_Tile {} {
+        callback {update_preview();}
+        private xywh {10 45 470 225} resizable
+      } {
+        Fl_File_Browser fileList {
+          callback {fileListCB();}
+          private xywh {10 45 295 225} type Hold hotspot
+          code0 {\#include <FL/Fl_File_Browser.H>}
+        }
+        Fl_Box previewBox {
+          label {?}
+          private xywh {305 45 175 225} box DOWN_BOX labelsize 100 align 80
+        }
+      }
+      Fl_Group {} {open
+        private xywh {10 275 470 95}
+      } {
+        Fl_Group {} {open
+          private xywh {10 275 470 20}
+        } {
+          Fl_Check_Button previewButton {
+            label Preview
+            callback {preview(previewButton->value());}
+            xywh {10 275 73 20} down_box DOWN_BOX shortcut 0x80070 value 1
+            code0 {previewButton->label(preview_label);}
+          }
+          Fl_Check_Button showHiddenButton {
+            label {Show hidden files}
+            callback {showHidden(showHiddenButton->value());}
+            xywh {115 275 165 20} down_box DOWN_BOX
+            code0 {showHiddenButton->label(hidden_label);}
+          }
+          Fl_Box {} {
+            private xywh {115 275 365 20} resizable
+          }
+        }
+        Fl_File_Input fileName {
+          callback {fileNameCB();}
+          private xywh {115 300 365 35} labelfont 1 when 8 resizable
+          code0 {fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY);}
+        }
+        Fl_Box {} {
+          label {Filename:}
+          private xywh {10 310 105 25} labelfont 1 align 24
+          code0 {o->label(filename_label);}
+        }
+        Fl_Group {} {open
+          private xywh {10 345 470 25}
+        } {
+          Fl_Return_Button okButton {
+            label OK
+            callback {window->hide();
+
+// Do any callback that is registered...
+if (callback_)
+  (*callback_)(this, data_);}
+            private xywh {313 345 85 25}
+            code0 {\#include <FL/fl_ask.H>}
+            code1 {okButton->label(fl_ok);}
+          }
+          Fl_Button cancelButton {
+            label Cancel
+            callback {fileName->value("");
+fileList->deselect();
+Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+window->hide();}
+            private xywh {408 345 72 25}
+            code0 {o->label(fl_cancel);}
+          }
+          Fl_Box {} {
+            private xywh {10 345 30 25} resizable
+          }
+        }
+      }
+    }
+    Fl_Window favWindow {
+      label {Manage Favorites}
+      private xywh {413 100 355 150} type Double resizable
+      code0 {favWindow->label(manage_favorites_label);} modal size_range {181 150 0 0} visible
+    } {
+      Fl_File_Browser favList {
+        callback {favoritesCB(favList);}
+        private xywh {10 10 300 95} type Hold resizable
+      }
+      Fl_Group {} {open
+        xywh {320 10 25 95}
+      } {
+        Fl_Button favUpButton {
+          label {@8>}
+          callback {favoritesCB(favUpButton);}
+          private xywh {320 10 25 25}
+        }
+        Fl_Button favDeleteButton {
+          label X
+          callback {favoritesCB(favDeleteButton);}
+          private xywh {320 45 25 25} labelfont 1 resizable
+        }
+        Fl_Button favDownButton {
+          label {@2>}
+          callback {favoritesCB(favDownButton);}
+          private xywh {320 80 25 25}
+        }
+      }
+      Fl_Group {} {open
+        xywh {10 113 335 29}
+      } {
+        Fl_Button favCancelButton {
+          label Cancel
+          callback {favWindow->hide();}
+          private xywh {273 115 72 25}
+          code0 {favCancelButton->label(fl_cancel);}
+        }
+        Fl_Return_Button favOkButton {
+          label Save
+          callback {favoritesCB(favOkButton);}
+          private xywh {181 115 79 25}
+          code0 {\#include <FL/fl_ask.H>}
+          code1 {favOkButton->label(save_label);}
+        }
+        Fl_Box {} {
+          xywh {10 115 161 25} resizable
+        }
+      }
+    }
+    code {callback_ = 0;
+data_ = 0;
+directory_[0] = 0;
+window->size_range(window->w(), window->h(), Fl::w(), Fl::h());
+type(t);
+filter(p);
+update_favorites();
+value(d);
+type(t);
+int e;
+prefs_.get("preview", e, 1);
+preview(e);
+Fl_Group::current(prev_current);} {}
+    code {ext_group=(Fl_Widget*)0;} {}
+  }
+  Function {~Fl_File_Chooser()} {open
+  } {
+    code {Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+if(ext_group)window->remove(ext_group);
+delete window;
+delete favWindow;} {}
+  }
+  Function {callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0)} {return_type void
+  } {
+    code {callback_ = cb;
+data_     = d;} {}
+  }
+  Function {color(Fl_Color c)} {} {
+    code {fileList->color(c);} {}
+  }
+  Function {color()} {return_type Fl_Color
+  } {
+    code {return (fileList->color());} {}
+  }
+  decl {int count();} {public
+  }
+  decl {void directory(const char *d);} {public
+  }
+  Function {directory()} {return_type {char *}
+  } {
+    code {return directory_;} {}
+  }
+  decl {void filter(const char *p);} {public
+  }
+  Function {filter()} {return_type {const char *}
+  } {
+    code {return (fileList->filter());} {}
+  }
+  Function {filter_value()} {return_type int
+  } {
+    code {return showChoice->value();} {}
+  }
+  Function {filter_value(int f)} {return_type void
+  } {
+    code {showChoice->value(f);
+showChoiceCB();} {}
+  }
+  Function {hide()} {return_type void
+  } {
+    code {window->hide();} {}
+  }
+  Function {iconsize(uchar s)} {return_type void
+  } {
+    code {fileList->iconsize(s);} {}
+  }
+  Function {iconsize()} {return_type uchar
+  } {
+    code {return (fileList->iconsize());} {}
+  }
+  Function {label(const char *l)} {return_type void
+  } {
+    code {window->label(l);} {}
+  }
+  Function {label()} {return_type {const char *}
+  } {
+    code {return (window->label());} {}
+  }
+  Function {ok_label(const char *l)} {return_type void
+  } {
+    code {okButton->label(l);
+int w=0, h=0;
+okButton->measure_label(w, h);
+okButton->resize(cancelButton->x() - 50 - w, cancelButton->y(),
+                 w + 40, 25);
+okButton->parent()->init_sizes();} {}
+  }
+  Function {ok_label()} {return_type {const char *}
+  } {
+    code {return (okButton->label());} {}
+  }
+  decl {void preview(int e);} {public
+  }
+  decl {int preview() const { return previewButton->value(); }} {public
+  }
+  decl {void showHidden(int e);} {private
+  }
+  decl {void remove_hidden_files();} {private
+  }
+  decl {void rescan();} {public
+  }
+  decl {void rescan_keep_filename();} {public
+  }
+  decl {void show();} {public
+  }
+  Function {shown()} {return_type int
+  } {
+    code {return window->shown();} {}
+  }
+  Function {textcolor(Fl_Color c)} {return_type void
+  } {
+    code {fileList->textcolor(c);} {}
+  }
+  Function {textcolor()} {return_type Fl_Color
+  } {
+    code {return (fileList->textcolor());} {}
+  }
+  Function {textfont(Fl_Font f)} {return_type void
+  } {
+    code {fileList->textfont(f);} {}
+  }
+  Function {textfont()} {selected return_type Fl_Font
+  } {
+    code {return (fileList->textfont());} {}
+  }
+  Function {textsize(Fl_Fontsize s)} {return_type void
+  } {
+    code {fileList->textsize(s);} {}
+  }
+  Function {textsize()} {return_type Fl_Fontsize
+  } {
+    code {return (fileList->textsize());} {}
+  }
+  Function {type(int t)} {return_type void
+  } {
+    code {type_ = t;
+if (t & MULTI)
+  fileList->type(FL_MULTI_BROWSER);
+else
+  fileList->type(FL_HOLD_BROWSER);
+if (t & CREATE)
+  newButton->activate();
+else
+  newButton->deactivate();
+if (t & DIRECTORY)
+  fileList->filetype(Fl_File_Browser::DIRECTORIES);
+else
+  fileList->filetype(Fl_File_Browser::FILES);} {}
+  }
+  Function {type()} {return_type int
+  } {
+    code {return (type_);} {}
+  }
+  Function {user_data() const} {return_type {void *}
+  } {
+    code {return (data_);} {}
+  }
+  Function {user_data(void *d)} {return_type void
+  } {
+    code {data_ = d;} {}
+  }
+  decl {const char *value(int f = 1);} {public
+  }
+  decl {void value(const char *filename);} {public
+  }
+  Function {visible()} {return_type int
+  } {
+    code {return window->visible();} {}
+  }
+  decl {static const char *add_favorites_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *all_files_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *custom_filter_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *existing_file_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *favorites_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *filename_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *filesystems_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *manage_favorites_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *new_directory_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *new_directory_tooltip;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *preview_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *save_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *show_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static const char *hidden_label;} {
+    comment {[standard text may be customized at run-time]} public
+  }
+  decl {static Fl_File_Sort_F *sort;} {
+    comment {the sort function that is used when loading
+the contents of a directory.} public
+  }
+  decl {Fl_Widget* ext_group;} {}
+  Function {add_extra(Fl_Widget* gr)} {open return_type {Fl_Widget*}
+  } {
+    code {Fl_Widget* ret=ext_group;} {}
+    codeblock {if (gr==ext_group)} {open
+    } {
+      code {return ret;} {}
+    }
+    codeblock {if (ext_group)} {open
+    } {
+      code {int sh=ext_group->h()+4;
+Fl_Widget* svres=window->resizable();
+window->resizable(NULL);
+window->size(window->w(),window->h()-sh);
+window->remove(ext_group);
+ext_group=NULL;
+window->resizable(svres);} {}
+    }
+    codeblock {if (gr)} {open
+    } {
+      code {int nh=window->h()+gr->h()+4;
+Fl_Widget* svres=window->resizable();
+window->resizable(NULL);
+window->size(window->w(),nh);
+gr->position(2,okButton->y()+okButton->h()+2);
+window->add(gr);
+ext_group=gr;
+window->resizable(svres);} {}
+    }
+    code {return ret;} {}
+  }
+} 
+
+decl {FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);} {public
+} 
+
+decl {FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);} {public
+} 
+
+decl {FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));} {public
+} 
+
+decl {FL_EXPORT void fl_file_chooser_ok_label(const char*l);} {public
+} 
+
+comment {
+//
+// End of "$Id$".
+//} {in_source in_header
+} 


Property changes on: branches/branch-3.0/src/core/Fl_File_Chooser.fl
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Chooser2.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Chooser2.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Chooser2.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1695 @@
+//
+// "$Id$"
+//
+// More fltk3::FileChooser routines.
+//
+// Copyright 1999-2011 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// fabien: ATTENTION: Only Out Of Source Gen. because cxx/H files are autogenerated by fluid.
+/** \defgroup group_comdlg Common Dialogs classes and functions
+    @{
+*/
+/** \class fltk3::FileChooser
+  The fltk3::FileChooser widget displays a standard file selection
+  dialog that supports various selection modes.
+  
+  \image html fltk3::FileChooser.jpg 
+  \image latex  fltk3::FileChooser.jpg "fltk3::FileChooser" width=12cm
+  
+  The fltk3::FileChooser class also exports several static values
+  that may be used to localize or customize the appearance of all file chooser
+  dialogs:
+  
+  <CENTER><TABLE BORDER="1">
+  <TR>
+  	<TH>Member</TH>
+  	<TH>Default value</TH>
+  </TR>
+  <TR>
+  	<TD>add_favorites_label</TD>
+  	<TD>"Add to Favorites"</TD>
+  </TR>
+  <TR>
+  	<TD>all_files_label</TD>
+  	<TD>"All Files (*)"</TD>
+  </TR>
+  <TR>
+  	<TD>custom_filter_label</TD>
+  	<TD>"Custom Filter"</TD>
+  </TR>
+  <TR>
+  	<TD>existing_file_label</TD>
+  	<TD>"Please choose an existing file!"</TD>
+  </TR>
+  <TR>
+  	<TD>favorites_label</TD>
+  	<TD>"Favorites"</TD>
+  </TR>
+  <TR>
+  	<TD>filename_label</TD>
+  	<TD>"Filename:"</TD>
+  </TR>
+  <TR>
+  	<TD>filesystems_label</TD>
+  	<TD>"My Computer" (WIN32)<BR>
+  	"File Systems" (all others)</TD>
+  </TR>
+ <TR>
+	<TD>hidden_label</TD>
+	<TD>"Show hidden files:"</TD>
+ </TR>
+ <TR>
+  	<TD>manage_favorites_label</TD>
+  	<TD>"Manage Favorites"</TD>
+  </TR>
+  <TR>
+  	<TD>new_directory_label</TD>
+  	<TD>"New Directory?"</TD>
+  </TR>
+  <TR>
+  	<TD>new_directory_tooltip</TD>
+  	<TD>"Create a new directory."</TD>
+  </TR>
+  <TR>
+  	<TD>preview_label</TD>
+  	<TD>"Preview"</TD>
+  </TR>
+  <TR>
+  	<TD>save_label</TD>
+  	<TD>"Save"</TD>
+  </TR>
+  <TR>
+  	<TD>show_label</TD>
+  	<TD>"Show:"</TD>
+  </TR>
+ <TR>
+  	<TD>sort</TD>
+  	<TD>fltk3::numericsort</TD>
+  </TR>
+  </TABLE></CENTER>
+
+  The fltk3::FileChooser::sort member specifies the sort function that is
+  used when loading the contents of a directory and can be customized
+  at run-time.
+
+  The fltk3::FileChooser class also exports the fltk3::FileChooser::newButton
+  and fltk3::FileChooser::previewButton widgets so that application developers
+  can control their appearance and use.  For more complex customization,
+  consider copying the FLTK file chooser code and changing it accordingly.
+*/
+/** @} */
+
+/** \fn fltk3::FileChooser::fltk3::FileChooser(const char *pathname, const char *pattern, int type, const char *title)
+  The constructor creates the fltk3::FileChooser dialog shown.
+  The pathname argument can be a directory name or a
+  complete file name (in which case the corresponding file is highlighted
+  in the list and in the filename input field.)
+  
+  The pattern argument can be a NULL
+  string or "*" to list all files, or it can be a
+  series of descriptions and filter strings separated by tab
+  characters (\\t). The format of filters is either
+  "Description text (patterns)" or just "patterns". A file chooser
+  that provides filters for HTML and image files might look like:
+  
+  \code
+  "HTML Files (*.html)\tImage Files (*.{bmp,gif,jpg,png})"
+  \endcode
+  
+  The file chooser will automatically add the "All Files (*)"
+  pattern to the end of the string you pass if you do not provide
+  one. The first filter in the string is the default filter.
+  
+  See the FLTK documentation on fltk3::filename_match()
+  for the kinds of pattern strings that are supported.
+  
+  The type argument can be one of the following:
+  
+  \li \c SINGLE - allows the user to select a single, existing file.
+  \li \c MULTI - allows the user to select one or more existing files.
+  \li \c CREATE - allows the user to select a single, existing file or
+         specify a new filename.
+  \li \c DIRECTORY - allows the user to select a single, existing directory.
+  
+  The title argument is used to set the title bar text for the
+  fltk3::FileChooser window.
+*/
+
+/** \var fltk3::FileChooser::newButton
+  The "new directory" button is exported so that application developers
+  can control the appearance and use.
+*/
+
+/** \var fltk3::FileChooser::previewButton
+  The "preview" button is exported so that application developers can
+  control the appearance and use.
+*/
+
+/** \fn fltk3::FileChooser::~Fl_File_Chooser()
+  Destroys the widget and frees all memory used by it.*/
+
+/** \fn void fltk3::FileChooser::color(fltk3::Color c)
+  Sets the background color of the fltk3::FileBrowser list.*/
+
+/** \fn fltk3::Color fltk3::FileChooser::color()
+  Gets the background color of the fltk3::FileBrowser list.*/
+
+/** \fn int fltk3::FileChooser::count()
+  Returns the number of selected files.*/
+
+/** \fn void fltk3::FileChooser::directory(const char *pathname)
+  Sets the current directory.*/
+
+/** \fn const char *fltk3::FileChooser::directory()
+  Gets the current directory.*/
+
+/** \fn void fltk3::FileChooser::filter(const char *pattern)
+  Sets or gets the current filename filter patterns. The filter
+  patterns use fltk3::filename_match().
+  Multiple patterns can be used by separating them with tabs, like
+  <tt>"*.jpg\t*.png\t*.gif\t*"</tt>. In addition, you can provide
+  human-readable labels with the patterns inside parenthesis, like
+  <tt>"JPEG Files (*.jpg)\tPNG Files (*.png)\tGIF Files (*.gif)\tAll Files (*)"
+  </tt>.
+
+  Use filter(NULL) to show all files.
+*/
+
+/** \fn const char *fltk3::FileChooser::filter()
+  See void filter(const char *pattern)*/
+
+/** \fn void fltk3::FileChooser::filter_value(int f)
+  Sets the current filename filter selection.*/
+
+/** \fn int fltk3::FileChooser::filter_value()
+  Gets the current filename filter selection.*/
+
+/** \fn void fltk3::FileChooser::hide()
+  Hides the fltk3::FileChooser window.*/
+
+/** \fn void fltk3::FileChooser::iconsize(uchar s)
+  Sets the size of the icons in the fltk3::FileBrowser.  By
+  default the icon size is set to 1.5 times the textsize().
+*/
+
+/** \fn uchar fltk3::FileChooser::iconsize()
+  Gets the size of the icons in the fltk3::FileBrowser.  By
+  default the icon size is set to 1.5 times the textsize().
+*/
+
+/** \fn void fltk3::FileChooser::label(const char *l)
+  Sets the title bar text for the fltk3::FileChooser.*/
+
+/** \fn const char *fltk3::FileChooser::label()
+  Gets the title bar text for the fltk3::FileChooser.*/
+
+/** \fn void fltk3::FileChooser::ok_label(const char *l)
+  Sets the label for the "ok" button in the fltk3::FileChooser.
+*/
+
+/** \fn const char *fltk3::FileChooser::ok_label()
+  Gets the label for the "ok" button in the fltk3::FileChooser.
+*/
+
+/** \fn int fltk3::FileChooser::preview() const
+   Returns the current state of the preview box. */
+
+/** \fn void fltk3::FileChooser::rescan()
+  Reloads the current directory in the fltk3::FileBrowser.*/
+
+/** \fn void fltk3::FileChooser::show()
+  Shows the fltk3::FileChooser window.*/
+
+/** \fn void fltk3::FileChooser::textcolor(fltk3::Color c)
+  Sets the current fltk3::FileBrowser text color.*/
+
+/** \fn fltk3::Color fltk3::FileChooser::textcolor()
+  Gets the current fltk3::FileBrowser text color.*/
+
+/** \fn void fltk3::FileChooser::textfont(fltk3::Font f)
+  Sets the current fltk3::FileBrowser text font.*/
+
+/** \fn fltk3::Font fltk3::FileChooser::textfont()
+  Gets the current fltk3::FileBrowser text font.*/
+
+/** \fn void fltk3::FileChooser::textsize(fltk3::Fontsize s)
+  Sets the current fltk3::FileBrowser text size.*/
+
+/** \fn fltk3::Fontsize fltk3::FileChooser::textsize()
+  Gets the current fltk3::FileBrowser text size.*/
+
+/** \fn void fltk3::FileChooser::type(int t)
+  Sets the current type of fltk3::FileChooser.*/
+
+/** \fn int fltk3::FileChooser::type()
+  Gets the current type of fltk3::FileChooser.*/
+
+/** \fn void fltk3::FileChooser::value(const char *pathname)
+  Sets the current value of the selected file.
+*/
+
+/** \fn const char *fltk3::FileChooser::value(int f)
+ Gets the current value of the selected file(s).
+ \p f is a \c 1-based index into a list of
+ file names. The number of selected files is returned by
+ fltk3::FileChooser::count().
+ 
+ This sample code loops through all selected files:
+ \code
+ // Get list of filenames user selected from a MULTI chooser
+ for ( int t=1; t<=chooser->count(); t++ ) {
+ const char *filename = chooser->value(t);
+ ...
+ }
+ \endcode
+ */
+
+/** \fn int fltk3::FileChooser::visible()
+  Returns 1 if the fltk3::FileChooser window is visible.*/
+
+/** \fn fltk3::Widget* fltk3::FileChooser::add_extra(fltk3::Widget*)
+  Adds extra widget at the bottom of fltk3::FileChooser window.
+  Returns pointer for previous extra widget or NULL if not set previously.
+  If argument is NULL only remove previous extra widget.
+
+  \note fltk3::FileChooser does \b not delete extra widget in destructor!
+     To prevent memory leakage, don't forget to delete unused extra widgets
+*/
+  /** \fn int fltk3::FileChooser::shown()
+    Returns non-zero if the file chooser main window show() has been called (but not hide()
+    see fltk3::Window::shown()
+  */
+
+  /** \fn void fltk3::FileChooser::callback(void (*cb)(fltk3::FileChooser *, void *), void *d = 0)
+    Sets the file chooser callback cb and associated data d */
+
+  /** \fn void fltk3::FileChooser::user_data(void *d)
+    Sets the file chooser user data d */
+
+  /** \fn void * fltk3::FileChooser::user_data() const
+    Gets the file chooser user data d */
+
+// *** END OF OUT OF SOURCE DOC ***
+
+// Contents:
+//
+//   fltk3::FileChooser::count()             - Return the number of selected files.
+//   fltk3::FileChooser::directory()         - Set the directory in the file chooser.
+//   fltk3::FileChooser::filter()            - Set the filter(s) for the chooser.
+//   fltk3::FileChooser::newdir()            - Make a new directory.
+//   fltk3::FileChooser::value()             - Return a selected filename.
+//   fltk3::FileChooser::rescan()            - Rescan the current directory.
+//   fltk3::FileChooser::favoritesButtonCB() - Handle favorites selections.
+//   fltk3::FileChooser::fileListCB()        - Handle clicks (and double-clicks)
+//                                          in the fltk3::FileBrowser.
+//   fltk3::FileChooser::fileNameCB()        - Handle text entry in the FileBrowser.
+//   fltk3::FileChooser::showChoiceCB()      - Handle show selections.
+//   compare_dirnames()                   - Compare two directory names.
+//   quote_pathname()                     - Quote a pathname for a menu.
+//   unquote_pathname()                   - Unquote a pathname from a menu.
+//
+//   fltk3::FileChooser::add_extra()         - add extra widget at the bottom, return pointer 
+//                                          to previous extra widget or NULL if none,
+//                                          If argument is NULL extra widget removed.
+//                                          NOTE! file chooser does't delete extra widget in 
+//                                          destructor! To prevent memory leakage don't forget
+//					    delete unused extra widgets by yourself.
+//
+
+//
+// Include necessary headers.
+//
+
+#include <fltk3/FileChooser.h>
+#include <fltk3/filename.h>
+#include <fltk3/ask.h>
+#include <fltk3/x.h>
+#include <fltk3/SharedImage.h>
+#include <fltk3/draw.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(WIN32) && ! defined (__CYGWIN__)
+#  include <direct.h>
+#  include <io.h>
+// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
+// on Windows, which is supposed to be POSIX compliant...
+#  define access _access
+#  define mkdir _mkdir
+// Apparently Borland C++ defines DIRECTORY in <direct.h>, which
+// interfers with the fltk3::FileIcon enumeration of the same name.
+#  ifdef DIRECTORY
+#    undef DIRECTORY
+#  endif // DIRECTORY
+#else
+#  include <unistd.h>
+#  include <pwd.h>
+#endif /* WIN32 */
+
+
+//
+// File chooser label strings and sort function...
+//
+
+fltk3::Preferences	fltk3::FileChooser::prefs_(fltk3::Preferences::USER, "fltk.org", "filechooser");
+
+const char	*fltk3::FileChooser::add_favorites_label = "Add to Favorites";
+const char	*fltk3::FileChooser::all_files_label = "All Files (*)";
+const char	*fltk3::FileChooser::custom_filter_label = "Custom Filter";
+const char	*fltk3::FileChooser::existing_file_label = "Please choose an existing file!";
+const char	*fltk3::FileChooser::favorites_label = "Favorites";
+const char	*fltk3::FileChooser::filename_label = "Filename:";
+#ifdef WIN32
+const char	*fltk3::FileChooser::filesystems_label = "My Computer";
+#else
+const char	*fltk3::FileChooser::filesystems_label = "File Systems";
+#endif // WIN32
+const char	*fltk3::FileChooser::manage_favorites_label = "Manage Favorites";
+const char	*fltk3::FileChooser::new_directory_label = "New Directory?";
+const char	*fltk3::FileChooser::new_directory_tooltip = "Create a new directory.";
+const char	*fltk3::FileChooser::preview_label = "Preview";
+const char	*fltk3::FileChooser::save_label = "Save";
+const char	*fltk3::FileChooser::show_label = "Show:";
+const char      *fltk3::FileChooser::hidden_label = "Show hidden files";
+fltk3::FileSortF	*fltk3::FileChooser::sort = fltk3::numericsort;
+
+
+//
+// Local functions...
+//
+
+static int	compare_dirnames(const char *a, const char *b);
+static void	quote_pathname(char *, const char *, int);
+static void	unquote_pathname(char *, const char *, int);
+
+
+//
+// 'fltk3::FileChooser::count()' - Return the number of selected files.
+//
+
+int				// O - Number of selected files
+fltk3::FileChooser::count() {
+  int		i;		// Looping var
+  int		fcount;		// Number of selected files
+  const char	*filename;	// Filename in input field or list
+
+
+  filename = fileName->value();
+
+  if (!(type_ & MULTI)) {
+    // Check to see if the file name input field is blank...
+    if (!filename || !filename[0]) return 0;
+    else return 1;
+  }
+
+  for (i = 1, fcount = 0; i <= fileList->size(); i ++)
+    if (fileList->selected(i)) {
+      // See if this file is a directory...
+      // matt: why would we do that? It is perfectly legal to select multiple
+      // directories in a DIR chooser. They are visually selected and value(i)
+      // returns all of them as expected
+      //filename = (char *)fileList->text(i);
+
+      //if (filename[strlen(filename) - 1] != '/')
+	fcount ++;
+    }
+
+  if (fcount) return fcount;
+  else if (!filename || !filename[0]) return 0;
+  else return 1;
+}
+
+
+//
+// 'fltk3::FileChooser::directory()' - Set the directory in the file chooser.
+//
+
+void
+fltk3::FileChooser::directory(const char *d)// I - Directory to change to
+{
+  char	*dirptr;			// Pointer into directory
+
+
+//  printf("fltk3::FileChooser::directory(\"%s\")\n", d == NULL ? "(null)" : d);
+
+  // NULL == current directory
+  if (d == NULL)
+    d = ".";
+
+#ifdef WIN32
+  // See if the filename contains backslashes...
+  char	*slash;				// Pointer to slashes
+  char	fixpath[FLTK3_PATH_MAX];			// Path with slashes converted
+  if (strchr(d, '\\')) {
+    // Convert backslashes to slashes...
+    strlcpy(fixpath, d, sizeof(fixpath));
+
+    for (slash = strchr(fixpath, '\\'); slash; slash = strchr(slash + 1, '\\'))
+      *slash = '/';
+
+    d = fixpath;
+  }
+#endif // WIN32
+
+  if (d[0] != '\0')
+  {
+    // Make the directory absolute...
+#if (defined(WIN32) && ! defined(__CYGWIN__))|| defined(__EMX__)
+    if (d[0] != '/' && d[0] != '\\' && d[1] != ':')
+#else
+    if (d[0] != '/' && d[0] != '\\')
+#endif /* WIN32 || __EMX__ */
+      fltk3::filename_absolute(directory_, d);
+    else
+      strlcpy(directory_, d, sizeof(directory_));
+
+    // Strip any trailing slash...
+    dirptr = directory_ + strlen(directory_) - 1;
+    if ((*dirptr == '/' || *dirptr == '\\') && dirptr > directory_)
+      *dirptr = '\0';
+
+    // See if we have a trailing .. or . in the filename...
+    dirptr = directory_ + strlen(directory_) - 3;
+    if (dirptr >= directory_ && strcmp(dirptr, "/..") == 0) {
+      // Yes, we have "..", so strip the trailing path...
+      *dirptr = '\0';
+      while (dirptr > directory_) {
+        if (*dirptr == '/') break;
+	dirptr --;
+      }
+
+      if (dirptr >= directory_ && *dirptr == '/')
+        *dirptr = '\0';
+    } else if ((dirptr + 1) >= directory_ && strcmp(dirptr + 1, "/.") == 0) {
+      // Strip trailing "."...
+      dirptr[1] = '\0';
+    }
+  }
+  else
+    directory_[0] = '\0';
+
+  if (shown()) {
+    // Rescan the directory...
+    rescan();
+  }
+}
+
+
+//
+// 'fltk3::FileChooser::favoritesButtonCB()' - Handle favorites selections.
+//
+
+void
+fltk3::FileChooser::favoritesButtonCB()
+{
+  int		v;			// Current selection
+  char		pathname[FLTK3_PATH_MAX],		// Pathname
+		menuname[FLTK3_PATH_MAX];		// Menu name
+
+
+  v = favoritesButton->value();
+
+  if (!v) {
+    // Add current directory to favorites...
+    if (getenv("HOME")) v = favoritesButton->size() - 5;
+    else v = favoritesButton->size() - 4;
+
+    sprintf(menuname, "favorite%02d", v);
+
+    prefs_.set(menuname, directory_);
+    prefs_.flush();
+
+    quote_pathname(menuname, directory_, sizeof(menuname));
+    favoritesButton->add(menuname);
+
+    if (favoritesButton->size() > 104) {
+      ((fltk3::MenuItem *)favoritesButton->menu())[0].deactivate();
+    }
+  } else if (v == 1) {
+    // Manage favorites...
+    favoritesCB(0);
+  } else if (v == 2) {
+    // Filesystems/My Computer
+    directory("");
+  } else {
+    unquote_pathname(pathname, favoritesButton->text(v), sizeof(pathname));
+    directory(pathname);
+  }
+}
+
+
+//
+// 'fltk3::FileChooser::favoritesCB()' - Handle favorites dialog.
+//
+
+void
+fltk3::FileChooser::favoritesCB(fltk3::Widget *w)
+					// I - Widget
+{
+  int		i;			// Looping var
+  char		name[32],		// Preference name
+		pathname[1024];		// Directory in list
+
+
+  if (!w) {
+    // Load the favorites list...
+    favList->clear();
+    favList->deselect();
+
+    for (i = 0; i < 100; i ++) {
+      // Get favorite directory 0 to 99...
+      sprintf(name, "favorite%02d", i);
+
+      prefs_.get(name, pathname, "", sizeof(pathname));
+
+      // Stop on the first empty favorite...
+      if (!pathname[0]) break;
+
+      // Add the favorite to the list...
+      favList->add(pathname,
+                   fltk3::FileIcon::find(pathname, fltk3::FileIcon::DIRECTORY));
+    }
+
+    favUpButton->deactivate();
+    favDeleteButton->deactivate();
+    favDownButton->deactivate();
+    favOkButton->deactivate();
+
+    favWindow->hotspot(favList);
+    favWindow->show();
+  } else if (w == favList) {
+    i = favList->value();
+    if (i) {
+      if (i > 1) favUpButton->activate();
+      else favUpButton->deactivate();
+
+      favDeleteButton->activate();
+
+      if (i < favList->size()) favDownButton->activate();
+      else favDownButton->deactivate();
+    } else {
+      favUpButton->deactivate();
+      favDeleteButton->deactivate();
+      favDownButton->deactivate();
+    }
+  } else if (w == favUpButton) {
+    i = favList->value();
+
+    favList->insert(i - 1, favList->text(i), favList->data(i));
+    favList->remove(i + 1);
+    favList->select(i - 1);
+
+    if (i == 2) favUpButton->deactivate();
+
+    favDownButton->activate();
+
+    favOkButton->activate();
+  } else if (w == favDeleteButton) {
+    i = favList->value();
+
+    favList->remove(i);
+
+    if (i > favList->size()) i --;
+    favList->select(i);
+
+    if (i < favList->size()) favDownButton->activate();
+    else favDownButton->deactivate();
+
+    if (i > 1) favUpButton->activate();
+    else favUpButton->deactivate();
+
+    if (!i) favDeleteButton->deactivate();
+
+    favOkButton->activate();
+  } else if (w == favDownButton) {
+    i = favList->value();
+
+    favList->insert(i + 2, favList->text(i), favList->data(i));
+    favList->remove(i);
+    favList->select(i + 1);
+
+    if ((i + 1) == favList->size()) favDownButton->deactivate();
+
+    favUpButton->activate();
+
+    favOkButton->activate();
+  } else if (w == favOkButton) {
+    // Copy the new list over...
+    for (i = 0; i < favList->size(); i ++) {
+      // Set favorite directory 0 to 99...
+      sprintf(name, "favorite%02d", i);
+
+      prefs_.set(name, favList->text(i + 1));
+    }
+
+    // Clear old entries as necessary...
+    for (; i < 100; i ++) {
+      // Clear favorite directory 0 to 99...
+      sprintf(name, "favorite%02d", i);
+
+      prefs_.get(name, pathname, "", sizeof(pathname));
+
+      if (pathname[0]) prefs_.set(name, "");
+      else break;
+    }
+
+    update_favorites();
+    prefs_.flush();
+
+    favWindow->hide();
+  }
+}
+
+
+//
+// 'fltk3::FileChooser::fileListCB()' - Handle clicks (and double-clicks) in the
+//                                   fltk3::FileBrowser.
+//
+
+void
+fltk3::FileChooser::fileListCB()
+{
+  char	*filename,			// New filename
+	pathname[FLTK3_PATH_MAX];			// Full pathname to file
+
+
+  filename = (char *)fileList->text(fileList->value());
+  if (!filename)
+    return;
+
+  if (!directory_[0]) {
+    strlcpy(pathname, filename, sizeof(pathname));
+  } else if (strcmp(directory_, "/") == 0) {
+    snprintf(pathname, sizeof(pathname), "/%s", filename);
+  } else {
+    snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
+  }
+
+  if (fltk3::event_clicks()) {
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
+    if ((strlen(pathname) == 2 && pathname[1] == ':') ||
+        fltk3::_filename_isdir_quick(pathname))
+#else
+    if (fltk3::_filename_isdir_quick(pathname))
+#endif /* WIN32 || __EMX__ */
+    {
+      // Change directories...
+      directory(pathname);
+
+      // Reset the click count so that a click in the same spot won't
+      // be treated as a triple-click.  We use a value of -1 because
+      // the next click will increment click count to 0, which is what
+      // we really want...
+      fltk3::event_clicks(-1);
+    }
+    else
+    {
+      // Hide the window - picked the file...
+      window->hide();
+      if (callback_) (*callback_)(this, data_);
+    }
+  }
+  else
+  {
+    // Check if the user clicks on a directory when picking files;
+    // if so, make sure only that item is selected...
+    filename = pathname + strlen(pathname) - 1;
+
+    if ((type_ & MULTI) && !(type_ & DIRECTORY)) {
+      if (*filename == '/') {
+	// Clicked on a directory, deselect everything else...
+	int i = fileList->value();
+	fileList->deselect();
+	fileList->select(i);
+      } else {
+        // Clicked on a file - see if there are other directories selected...
+        int i;
+	const char *temp;
+	for (i = 1; i <= fileList->size(); i ++) {
+	  if (i != fileList->value() && fileList->selected(i)) {
+	    temp = fileList->text(i);
+	    temp += strlen(temp) - 1;
+	    if (*temp == '/') break;	// Yes, selected directory
+	  }
+	}
+
+        if (i <= fileList->size()) {
+	  i = fileList->value();
+	  fileList->deselect();
+	  fileList->select(i);
+	}
+      }
+    }
+    // Strip any trailing slash from the directory name...
+    if (*filename == '/') *filename = '\0';
+
+//    puts("Setting fileName from fileListCB...");
+    fileName->value(pathname);
+
+    // Update the preview box...
+    fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
+    fltk3::add_timeout(1.0, (fltk3::TimeoutHandler)previewCB, this);
+
+    // Do any callback that is registered...
+    if (callback_) (*callback_)(this, data_);
+
+    // Activate the OK button as needed...
+    if (!fltk3::_filename_isdir_quick(pathname) || (type_ & DIRECTORY))
+      okButton->activate();
+    else
+      okButton->deactivate();
+  }
+}
+
+
+//
+// 'fltk3::FileChooser::fileNameCB()' - Handle text entry in the FileBrowser.
+//
+
+void
+fltk3::FileChooser::fileNameCB()
+{
+  char		*filename,	// New filename
+		*slash,		// Pointer to trailing slash
+		pathname[FLTK3_PATH_MAX],	// Full pathname to file
+		matchname[FLTK3_PATH_MAX];	// Matching filename
+  int		i,		// Looping var
+		min_match,	// Minimum number of matching chars
+		max_match,	// Maximum number of matching chars
+		num_files,	// Number of files in directory
+		first_line;	// First matching line
+  const char	*file;		// File from directory
+
+//  puts("fileNameCB()");
+//  printf("Event: %s\n", fl_eventnames[fltk3::event()]);
+
+  // Get the filename from the text field...
+  filename = (char *)fileName->value();
+
+  if (!filename || !filename[0]) {
+    okButton->deactivate();
+    return;
+  }
+
+  // Expand ~ and $ variables as needed...
+  if (strchr(filename, '~') || strchr(filename, '$')) {
+    fltk3::filename_expand(pathname, sizeof(pathname), filename);
+    filename = pathname;
+    value(pathname);
+  }
+
+  // Make sure we have an absolute path...
+#if (defined(WIN32) && !defined(__CYGWIN__)) || defined(__EMX__)
+  if (directory_[0] != '\0' && filename[0] != '/' &&
+      filename[0] != '\\' &&
+      !(isalpha(filename[0] & 255) && (!filename[1] || filename[1] == ':'))) {
+#else
+  if (directory_[0] != '\0' && filename[0] != '/') {
+#endif /* WIN32 || __EMX__ */
+    fltk3::filename_absolute(pathname, sizeof(pathname), filename);
+    value(pathname);
+    fileName->mark(fileName->position()); // no selection after expansion
+  } else if (filename != pathname) {
+    // Finally, make sure that we have a writable copy...
+    strlcpy(pathname, filename, sizeof(pathname));
+  }
+
+  filename = pathname;
+
+  // Now process things according to the key pressed...
+  if (fltk3::event_key() == fltk3::EnterKey || fltk3::event_key() == fltk3::KPEnterKey) {
+    // Enter pressed - select or change directory...
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
+    if ((isalpha(pathname[0] & 255) && pathname[1] == ':' && !pathname[2]) ||
+        (fltk3::_filename_isdir_quick(pathname) &&
+	 compare_dirnames(pathname, directory_))) {
+#else
+    if (fltk3::_filename_isdir_quick(pathname) &&
+	compare_dirnames(pathname, directory_)) {
+#endif /* WIN32 || __EMX__ */
+      directory(pathname);
+    } else if ((type_ & CREATE) || access(pathname, 0) == 0) {
+      if (!fltk3::_filename_isdir_quick(pathname) || (type_ & DIRECTORY)) {
+	// Update the preview box...
+	update_preview();
+
+	// Do any callback that is registered...
+	if (callback_) (*callback_)(this, data_);
+
+	// Hide the window to signal things are done...
+	window->hide();
+      }
+    } else {
+      // File doesn't exist, so beep at and alert the user...
+      fltk3::alert("%s",existing_file_label);
+    }
+  }
+  else if (fltk3::event_key() != fltk3::DeleteKey &&
+           fltk3::event_key() != fltk3::BackSpaceKey) {
+    // Check to see if the user has entered a directory...
+    if ((slash = strrchr(pathname, '/')) == NULL)
+      slash = strrchr(pathname, '\\');
+
+    if (!slash) return;
+
+    // Yes, change directories if necessary...
+    *slash++ = '\0';
+    filename = slash;
+
+#if defined(WIN32) || defined(__EMX__)
+    if (strcasecmp(pathname, directory_) &&
+        (pathname[0] || strcasecmp("/", directory_))) {
+#else
+    if (strcmp(pathname, directory_) &&
+        (pathname[0] || strcasecmp("/", directory_))) {
+#endif // WIN32 || __EMX__
+      int p = fileName->position();
+      int m = fileName->mark();
+
+      directory(pathname);
+
+      if (filename[0]) {
+	char tempname[FLTK3_PATH_MAX];
+
+	snprintf(tempname, sizeof(tempname), "%s/%s", directory_, filename);
+	fileName->value(tempname);
+	strlcpy(pathname, tempname, sizeof(pathname));
+      }
+
+      fileName->position(p, m);
+    }
+
+    // Other key pressed - do filename completion as possible...
+    num_files  = fileList->size();
+    min_match  = strlen(filename);
+    max_match  = min_match + 1;
+    first_line = 0;
+
+    for (i = 1; i <= num_files && max_match > min_match; i ++) {
+      file = fileList->text(i);
+
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
+      if (strncasecmp(filename, file, min_match) == 0) {
+#else
+      if (strncmp(filename, file, min_match) == 0) {
+#endif // WIN32 || __EMX__
+        // OK, this one matches; check against the previous match
+	if (!first_line) {
+	  // First match; copy stuff over...
+	  strlcpy(matchname, file, sizeof(matchname));
+	  max_match = strlen(matchname);
+
+          // Strip trailing /, if any...
+	  if (matchname[max_match - 1] == '/') {
+	    max_match --;
+	    matchname[max_match] = '\0';
+	  }
+
+	  // And then make sure that the item is visible
+          fileList->topline(i);
+	  first_line = i;
+	} else {
+	  // Succeeding match; compare to find maximum string match...
+	  while (max_match > min_match)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
+	    if (strncasecmp(file, matchname, max_match) == 0)
+#else
+	    if (strncmp(file, matchname, max_match) == 0)
+#endif // WIN32 || __EMX__
+	      break;
+	    else
+	      max_match --;
+
+          // Truncate the string as needed...
+          matchname[max_match] = '\0';
+	}
+      }
+    }
+
+    // If we have any matches, add them to the input field...
+    if (first_line > 0 && min_match == max_match &&
+        max_match == (int)strlen(fileList->text(first_line))) {
+      // This is the only possible match...
+      fileList->deselect(0);
+      fileList->select(first_line);
+      fileList->redraw();
+    } else if (max_match > min_match && first_line) {
+      // Add the matching portion...
+      fileName->replace(filename - pathname, filename - pathname + min_match,
+                        matchname);
+
+      // Highlight it with the cursor at the end of the selection so
+      // s/he can press the right arrow to accept the selection
+      // (Tab and End also do this for both cases.)
+      fileName->position(filename - pathname + max_match,
+	                 filename - pathname + min_match);
+    } else if (max_match == 0) {
+      fileList->deselect(0);
+      fileList->redraw();
+    }
+
+    // See if we need to enable the OK button...
+    if (((type_ & CREATE) || !access(fileName->value(), 0)) &&
+        (!fltk3::filename_isdir(fileName->value()) || (type_ & DIRECTORY))) {
+      okButton->activate();
+    } else {
+      okButton->deactivate();
+    }
+  } else {
+    // fltk3::DeleteKey or fltk3::BackSpaceKey
+    fileList->deselect(0);
+    fileList->redraw();
+    if (((type_ & CREATE) || !access(fileName->value(), 0)) &&
+        (!fltk3::filename_isdir(fileName->value()) || (type_ & DIRECTORY))) {
+      okButton->activate();
+    } else {
+      okButton->deactivate();
+    }
+  }
+}
+
+
+//
+// 'fltk3::FileChooser::filter()' - Set the filter(s) for the chooser.
+//
+
+void
+fltk3::FileChooser::filter(const char *p)		// I - Pattern(s)
+{
+  char		*copyp,				// Copy of pattern
+		*start,				// Start of pattern
+		*end;				// End of pattern
+  int		allfiles;			// Do we have a "*" pattern?
+  char		temp[FLTK3_PATH_MAX];			// Temporary pattern string
+
+
+  // Make sure we have a pattern...
+  if (!p || !*p) p = "*";
+
+  // Copy the pattern string...
+  copyp = strdup(p);
+
+  // Separate the pattern string as necessary...
+  showChoice->clear();
+
+  for (start = copyp, allfiles = 0; start && *start; start = end) {
+    end = strchr(start, '\t');
+    if (end) *end++ = '\0';
+
+    if (strcmp(start, "*") == 0) {
+      showChoice->add(all_files_label);
+      allfiles = 1;
+    } else {
+      quote_pathname(temp, start, sizeof(temp));
+      showChoice->add(temp);
+      if (strstr(start, "(*)") != NULL) allfiles = 1;
+    }
+  }
+
+  free(copyp);
+
+  if (!allfiles) showChoice->add(all_files_label);
+
+  showChoice->add(custom_filter_label);
+  
+  showChoice->value(0);
+  showChoiceCB();
+}
+
+
+//
+// 'fltk3::FileChooser::newdir()' - Make a new directory.
+//
+
+void
+fltk3::FileChooser::newdir()
+{
+  const char	*dir;		// New directory name
+  char		pathname[FLTK3_PATH_MAX];	// Full path of directory
+
+
+  // Get a directory name from the user
+  if ((dir = fltk3::input("%s", NULL, new_directory_label)) == NULL)
+    return;
+
+  // Make it relative to the current directory as needed...
+#if (defined(WIN32) && ! defined (__CYGWIN__)) || defined(__EMX__)
+  if (dir[0] != '/' && dir[0] != '\\' && dir[1] != ':')
+#else
+  if (dir[0] != '/' && dir[0] != '\\')
+#endif /* WIN32 || __EMX__ */
+    snprintf(pathname, sizeof(pathname), "%s/%s", directory_, dir);
+  else
+    strlcpy(pathname, dir, sizeof(pathname));
+
+  // Create the directory; ignore EEXIST errors...
+#if defined(WIN32) && ! defined (__CYGWIN__)
+  if (mkdir(pathname))
+#else
+  if (mkdir(pathname, 0777))
+#endif /* WIN32 */
+    if (errno != EEXIST)
+    {
+      fltk3::alert("%s", strerror(errno));
+      return;
+    }
+
+  // Show the new directory...
+  directory(pathname);
+}
+
+
+
+/** Enable or disable the preview tile. 1 = enable preview, 0 = disable preview. */
+void fltk3::FileChooser::preview(int e)
+{
+  previewButton->value(e);
+  prefs_.set("preview", e);
+  prefs_.flush();
+
+  fltk3::Group *p = previewBox->parent();
+  if (e) {
+    int w = p->w() * 2 / 3;
+    fileList->resize(fileList->x(), fileList->y(),
+                     w, fileList->h());
+    previewBox->resize(fileList->x()+w, previewBox->y(),
+                       p->w()-w, previewBox->h());
+    previewBox->show();
+    update_preview();
+  } else {
+    fileList->resize(fileList->x(), fileList->y(),
+                     p->w(), fileList->h());
+    previewBox->resize(p->x()+p->w(), previewBox->y(),
+                       0, previewBox->h());
+    previewBox->hide();
+  }
+  p->init_sizes();
+
+  fileList->parent()->redraw();
+}
+
+
+//
+// 'fltk3::FileChooser::previewCB()' - Timeout handler for the preview box.
+//
+
+void
+fltk3::FileChooser::previewCB(fltk3::FileChooser *fc) {	// I - File chooser
+  fc->update_preview();
+}
+
+
+//
+// 'fltk3::FileChooser::rescan()' - Rescan the current directory.
+//
+
+void
+fltk3::FileChooser::rescan()
+{
+  char	pathname[FLTK3_PATH_MAX];		// New pathname for filename field
+
+
+  // Clear the current filename
+  strlcpy(pathname, directory_, sizeof(pathname));
+  if (pathname[0] && pathname[strlen(pathname) - 1] != '/') {
+    strlcat(pathname, "/", sizeof(pathname));
+  }
+//  puts("Setting fileName in rescan()");
+  fileName->value(pathname);
+
+  if (type_ & DIRECTORY)
+    okButton->activate();
+  else
+    okButton->deactivate();
+
+  // Build the file list...
+  fileList->load(directory_, sort);
+#ifndef WIN32	
+  if (!showHiddenButton->value()) remove_hidden_files();
+#endif
+  // Update the preview box...
+  update_preview();
+}
+
+//
+/**  
+  Rescan the current directory  without clearing the filename, 
+  then select the file if it is in the list
+*/
+void fltk3::FileChooser::rescan_keep_filename()
+{
+  // if no filename was set, this is likely a diretory browser
+  const char *fn = fileName->value();
+  if (!fn || !*fn || fn[strlen(fn) - 1]=='/') {
+    rescan();
+    return;
+  }
+
+  int   i;
+  char	pathname[FLTK3_PATH_MAX];		// New pathname for filename field
+  strlcpy(pathname, fn, sizeof(pathname));
+
+  // Build the file list...
+  fileList->load(directory_, sort);
+#ifndef WIN32	
+  if (!showHiddenButton->value()) remove_hidden_files();
+#endif
+  // Update the preview box...
+  update_preview();
+
+  // and select the chosen file
+  char found = 0;
+  char *slash = strrchr(pathname, '/');
+  if (slash) 
+    slash++;
+  else
+    slash = pathname;
+  for (i = 1; i <= fileList->size(); i ++)
+#if defined(WIN32) || defined(__EMX__)
+    if (strcasecmp(fileList->text(i), slash) == 0) {
+#else
+    if (strcmp(fileList->text(i), slash) == 0) {
+#endif // WIN32 || __EMX__
+      fileList->topline(i);
+      fileList->select(i);
+      found = 1;
+      break;
+    }
+
+  // update OK button activity
+  if (found || type_ & CREATE)
+    okButton->activate();
+  else
+    okButton->deactivate();
+}
+
+
+//
+// 'fltk3::FileChooser::showChoiceCB()' - Handle show selections.
+//
+
+void
+fltk3::FileChooser::showChoiceCB()
+{
+  const char	*item,			// Selected item
+		*patstart;		// Start of pattern
+  char		*patend;		// End of pattern
+  char		temp[FLTK3_PATH_MAX];		// Temporary string for pattern
+
+
+  item = showChoice->text(showChoice->value());
+
+  if (strcmp(item, custom_filter_label) == 0) {
+    if ((item = fltk3::input("%s", pattern_, custom_filter_label)) != NULL) {
+      strlcpy(pattern_, item, sizeof(pattern_));
+
+      quote_pathname(temp, item, sizeof(temp));
+      showChoice->add(temp);
+      showChoice->value(showChoice->size() - 2);
+    }
+  } else if ((patstart = strchr(item, '(')) == NULL) {
+    strlcpy(pattern_, item, sizeof(pattern_));
+  } else {
+    strlcpy(pattern_, patstart + 1, sizeof(pattern_));
+    if ((patend = strrchr(pattern_, ')')) != NULL) *patend = '\0';
+  }
+
+  fileList->filter(pattern_);
+
+  if (shown()) {
+    // Rescan the directory...
+    rescan_keep_filename();
+  }
+}
+
+
+//
+// 'fltk3::FileChooser::update_favorites()' - Update the favorites menu.
+//
+
+void
+fltk3::FileChooser::update_favorites()
+{
+  int		i;			// Looping var
+  char		pathname[FLTK3_PATH_MAX],		// Pathname
+		menuname[2048];		// Menu name
+  const char	*home;			// Home directory
+
+
+  favoritesButton->clear();
+  favoritesButton->add("bla");
+  favoritesButton->clear();
+  favoritesButton->add(add_favorites_label, fltk3::ALT + 'a', 0);
+  favoritesButton->add(manage_favorites_label, fltk3::ALT + 'm', 0, 0, fltk3::MENU_DIVIDER);
+  favoritesButton->add(filesystems_label, fltk3::ALT + 'f', 0);
+    
+  if ((home = getenv("HOME")) != NULL) {
+    quote_pathname(menuname, home, sizeof(menuname));
+    favoritesButton->add(menuname, fltk3::ALT + 'h', 0);
+  }
+
+  for (i = 0; i < 100; i ++) {
+    sprintf(menuname, "favorite%02d", i);
+    prefs_.get(menuname, pathname, "", sizeof(pathname));
+    if (!pathname[0]) break;
+
+    quote_pathname(menuname, pathname, sizeof(menuname));
+
+    if (i < 10) favoritesButton->add(menuname, fltk3::ALT + '0' + i, 0);
+    else favoritesButton->add(menuname);
+  }
+
+  if (i == 100) ((fltk3::MenuItem *)favoritesButton->menu())[0].deactivate();
+}
+
+
+//
+// 'fltk3::FileChooser::update_preview()' - Update the preview box...
+//
+
+void
+fltk3::FileChooser::update_preview()
+{
+  const char		*filename;	// Current filename
+  const char            *newlabel = 0;  // New label text
+  fltk3::SharedImage	*image = 0,     // New image
+			*oldimage;	// Old image
+  int			pbw, pbh;	// Width and height of preview box
+  int			w, h;		// Width and height of preview image
+  int                   set = 0;        // Set this flag as soon as a decent preview is found
+
+  if (!previewButton->value()) return;
+
+  filename = value();
+  if (filename == NULL) {
+    // no file name at all, so we have an empty preview
+    set = 1;
+  } else if (fltk3::filename_isdir(filename)) {
+    // filename is a directory, show a folder icon
+    newlabel = "@fileopen";
+    set = 1;
+  } else {
+    struct stat s;
+    if (fltk3::stat(filename, &s)==0) {
+      if ((s.st_mode&S_IFMT)!=S_IFREG) {
+        // this is no regular file, probably some kind of device
+        newlabel = "@-3refresh"; // a cross
+        set = 1;
+      } else if (s.st_size==0) {
+        // this file is emty
+        newlabel = "<empty file>";
+        set = 1;
+      } else {
+        // if this file is an image, try to load it
+        window->cursor(fltk3::CURSOR_WAIT);
+        fltk3::check();
+        
+        image = fltk3::SharedImage::get(filename);
+        
+        if (image) {
+          window->cursor(fltk3::CURSOR_DEFAULT);
+          fltk3::check();
+          set = 1;
+        }
+      }
+    }
+  }
+
+  oldimage = (fltk3::SharedImage *)previewBox->image();
+
+  if (oldimage) oldimage->release();
+
+  previewBox->image(0);
+
+  if (!set) {
+    FILE	*fp;
+    int		bytes;
+    char	*ptr;
+
+    if (filename) fp = fltk3::fopen(filename, "rb");
+    else fp = NULL;
+
+    if (fp != NULL) {
+      // Try reading the first 1k of data for a label...
+      bytes = fread(preview_text_, 1, sizeof(preview_text_) - 1, fp);
+      preview_text_[bytes] = '\0';
+      fclose(fp);
+    } else {
+      // Assume we can't read any data...
+      preview_text_[0] = '\0';
+    }
+
+    window->cursor(fltk3::CURSOR_DEFAULT);
+    fltk3::check();
+
+    // Scan the buffer for printable UTF8 chars...
+    for (ptr = preview_text_; *ptr; ptr++) {
+      uchar c = uchar(*ptr);
+      if ( (c&0x80)==0 ) {
+        if (!isprint(c&255) && !isspace(c&255)) break;
+      } else if ( (c&0xe0)==0xc0 ) {
+        if (ptr[1] && (ptr[1]&0xc0)!=0x80) break;
+        ptr++;
+      } else if ( (c&0xf0)==0xe0 ) {
+        if (ptr[1] && (ptr[1]&0xc0)!=0x80) break;
+        ptr++;
+        if (ptr[1] && (ptr[1]&0xc0)!=0x80) break;
+        ptr++;
+      } else if ( (c&0xf8)==0xf0 ) {
+        if (ptr[1] && (ptr[1]&0xc0)!=0x80) break;
+        ptr++;
+        if (ptr[1] && (ptr[1]&0xc0)!=0x80) break;
+        ptr++;
+        if (ptr[1] && (ptr[1]&0xc0)!=0x80) break;
+        ptr++;
+      }
+    } 
+//         *ptr && (isprint(*ptr & 255) || isspace(*ptr & 255));
+//	 ptr ++);
+
+    // Scan the buffer for printable characters in 8 bit
+    if (*ptr || ptr == preview_text_) {
+      for (ptr = preview_text_;
+         *ptr && (isprint(*ptr & 255) || isspace(*ptr & 255));
+	 ptr ++);
+    }
+
+    if (*ptr || ptr == preview_text_) {
+      // Non-printable file, just show a big ?...
+      previewBox->label(filename ? "?" : 0);
+      previewBox->align(fltk3::ALIGN_CLIP);
+      previewBox->labelsize(75);
+      previewBox->labelfont(fltk3::HELVETICA);
+    } else {
+      // Show the first 1k of text...
+      int size = previewBox->h() / 20;
+      if (size < 6) size = 6;
+      else if (size > fltk3::NORMAL_SIZE) size = fltk3::NORMAL_SIZE;
+
+      previewBox->label(preview_text_);
+      previewBox->align((fltk3::Align)(fltk3::ALIGN_CLIP | fltk3::ALIGN_INSIDE |
+                                   fltk3::ALIGN_LEFT | fltk3::ALIGN_TOP));
+      previewBox->labelsize(size);
+      previewBox->labelfont(fltk3::COURIER);
+    }
+  } else if (image) {
+    pbw = previewBox->w() - 20;
+    pbh = previewBox->h() - 20;
+
+    if (image->w() > pbw || image->h() > pbh) {
+      w   = pbw;
+      h   = w * image->h() / image->w();
+
+      if (h > pbh) {
+	h = pbh;
+	w = h * image->w() / image->h();
+      }
+
+      oldimage = (fltk3::SharedImage *)image->copy(w, h);
+      previewBox->image((fltk3::Image *)oldimage);
+
+      image->release();
+    } else {
+      previewBox->image((fltk3::Image *)image);
+    }
+
+    previewBox->align(fltk3::ALIGN_CLIP);
+    previewBox->label(0);
+  } else if (newlabel) {
+    previewBox->label(newlabel);
+    previewBox->align(fltk3::ALIGN_CLIP);
+    previewBox->labelsize(newlabel[0]=='@'?75:12);
+    previewBox->labelfont(fltk3::HELVETICA);
+  }
+
+  previewBox->redraw();
+}
+
+
+//
+// 'fltk3::FileChooser::value()' - Return a selected filename.
+//
+
+const char *			// O - Filename or NULL
+fltk3::FileChooser::value(int f)	// I - File number
+{
+  int		i;		// Looping var
+  int		fcount;		// Number of selected files
+  const char	*name;		// Current filename
+  static char	pathname[FLTK3_PATH_MAX];	// Filename + directory
+
+
+  name = fileName->value();
+
+  if (!(type_ & MULTI)) {
+    // Return the filename in the filename field...
+    if (!name || !name[0]) return NULL;
+    else return name;
+  }
+
+  // Return a filename from the list...
+  for (i = 1, fcount = 0; i <= fileList->size(); i ++)
+    if (fileList->selected(i)) {
+      // See if this file is a selected file/directory...
+      name = fileList->text(i);
+
+      fcount ++;
+
+      if (fcount == f) {
+	if (directory_[0]) {
+	  snprintf(pathname, sizeof(pathname), "%s/%s", directory_, name);
+	} else {
+	  strlcpy(pathname, name, sizeof(pathname));
+	}
+
+	return pathname;
+      }
+    }
+
+  // If nothing is selected, use the filename field...
+  if (!name || !name[0]) return NULL;
+  else return name;
+}
+
+
+//
+// 'fltk3::FileChooser::value()' - Set the current filename.
+//
+
+void
+fltk3::FileChooser::value(const char *filename)
+					// I - Filename + directory
+{
+  int	i,				// Looping var
+  	fcount;				// Number of items in list
+  char	*slash;				// Directory separator
+  char	pathname[FLTK3_PATH_MAX];		// Local copy of filename
+
+
+//  printf("fltk3::FileChooser::value(\"%s\")\n", filename == NULL ? "(null)" : filename);
+
+  // See if the filename is the "My System" directory...
+  if (filename == NULL || !filename[0]) {
+    // Yes, just change the current directory...
+    directory(filename);
+    fileName->value("");
+    okButton->deactivate();
+    return;
+  }
+
+#ifdef WIN32
+  // See if the filename contains backslashes...
+  char	fixpath[FLTK3_PATH_MAX];			// Path with slashes converted
+  if (strchr(filename, '\\')) {
+    // Convert backslashes to slashes...
+    strlcpy(fixpath, filename, sizeof(fixpath));
+
+    for (slash = strchr(fixpath, '\\'); slash; slash = strchr(slash + 1, '\\'))
+      *slash = '/';
+
+    filename = fixpath;
+  }
+#endif // WIN32
+
+  // See if there is a directory in there...
+  fltk3::filename_absolute(pathname, sizeof(pathname), filename);
+
+  if ((slash = strrchr(pathname, '/')) != NULL) {
+    // Yes, change the display to the directory... 
+    if (!fltk3::filename_isdir(pathname)) *slash++ = '\0';
+
+    directory(pathname);
+    if (*slash == '/') slash = pathname;
+  } else {
+    directory(".");
+    slash = pathname;
+  }
+
+  // Set the input field to the absolute path...
+  if (slash > pathname) slash[-1] = '/';
+
+  fileName->value(pathname);
+  fileName->position(0, strlen(pathname));
+  okButton->activate();
+
+  // Then find the file in the file list and select it...
+  fcount = fileList->size();
+
+  fileList->deselect(0);
+  fileList->redraw();
+
+  for (i = 1; i <= fcount; i ++)
+#if defined(WIN32) || defined(__EMX__)
+    if (strcasecmp(fileList->text(i), slash) == 0) {
+#else
+    if (strcmp(fileList->text(i), slash) == 0) {
+#endif // WIN32 || __EMX__
+//      printf("Selecting line %d...\n", i);
+      fileList->topline(i);
+      fileList->select(i);
+      break;
+    }
+}
+  
+void fltk3::FileChooser::show()
+{
+  window->hotspot(fileList);
+  window->show();
+  fltk3::flush();
+  fltk3::cursor(fltk3::CURSOR_WAIT);
+  rescan_keep_filename();
+  fltk3::cursor(fltk3::CURSOR_DEFAULT);
+  fileName->take_focus();
+#ifdef WIN32
+  showHiddenButton->hide();
+#endif
+}
+  
+void fltk3::FileChooser::showHidden(int value)
+{
+  if (value) {
+    fileList->load(directory());
+  } else {
+    remove_hidden_files();
+    fileList->redraw();
+  }
+}
+
+void fltk3::FileChooser::remove_hidden_files()
+{
+  int count = fileList->size();
+  for(int num = count; num >= 1; num--) {
+    const char *p = fileList->text(num);
+    if (*p == '.' && strcmp(p, "../") != 0) fileList->remove(num);
+  }
+  fileList->topline(1);
+}
+  
+
+
+//
+// 'compare_dirnames()' - Compare two directory names.
+//
+
+static int
+compare_dirnames(const char *a, const char *b) {
+  int alen, blen;
+
+  // Get length of each string...
+  alen = strlen(a) - 1;
+  blen = strlen(b) - 1;
+
+  if (alen < 0 || blen < 0) return alen - blen;
+
+  // Check for trailing slashes...
+  if (a[alen] != '/') alen ++;
+  if (b[blen] != '/') blen ++;
+
+  // If the lengths aren't the same, then return the difference...
+  if (alen != blen) return alen - blen;
+
+  // Do a comparison of the first N chars (alen == blen at this point)...
+#ifdef WIN32
+  return strncasecmp(a, b, alen);
+#else
+  return strncmp(a, b, alen);
+#endif // WIN32
+}
+
+
+//
+// 'quote_pathname()' - Quote a pathname for a menu.
+//
+
+static void
+quote_pathname(char       *dst,		// O - Destination string
+               const char *src,		// I - Source string
+	       int        dstsize)	// I - Size of destination string
+{
+  dstsize --;
+
+  while (*src && dstsize > 1) {
+    if (*src == '\\') {
+      // Convert backslash to forward slash...
+      *dst++ = '\\';
+      *dst++ = '/';
+      src ++;
+    } else {
+      if (*src == '/') *dst++ = '\\';
+
+      *dst++ = *src++;
+    }
+  }
+
+  *dst = '\0';
+}
+
+
+//
+// 'unquote_pathname()' - Unquote a pathname from a menu.
+//
+
+static void
+unquote_pathname(char       *dst,	// O - Destination string
+                 const char *src,	// I - Source string
+	         int        dstsize)	// I - Size of destination string
+{
+  dstsize --;
+
+  while (*src && dstsize > 1) {
+    if (*src == '\\') src ++;
+    *dst++ = *src++;
+  }
+
+  *dst = '\0';
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_File_Chooser2.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Icon.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Icon.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Icon.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,490 @@
+//
+// "$Id$"
+//
+// fltk3::FileIcon routines.
+//
+// KDE icon code donated by Maarten De Boer.
+//
+// Copyright 1999-2010 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::FileIcon::fltk3::FileIcon()       - Create a new file icon.
+//   fltk3::FileIcon::~Fl_File_Icon()      - Remove a file icon.
+//   fltk3::FileIcon::add()               - Add data to an icon.
+//   fltk3::FileIcon::find()              - Find an icon based upon a given file.
+//   fltk3::FileIcon::draw()              - Draw an icon.
+//   fltk3::FileIcon::label()             - Set the widgets label to an icon.
+//   fltk3::FileIcon::labeltype()         - Draw the icon label.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
+#  include <io.h>
+#  define F_OK	0
+#else
+#  include <unistd.h>
+#endif /* WIN32 || __EMX__ */
+
+#include <fltk3/FileIcon.h>
+#include <fltk3/Widget.h>
+#include <fltk3/draw.h>
+#include <fltk3/filename.h>
+
+
+//
+// Define missing POSIX/XPG4 macros as needed...
+//
+
+#ifndef S_ISDIR
+#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif /* !S_ISDIR */
+
+
+//
+// Icon cache...
+//
+
+fltk3::FileIcon	*fltk3::FileIcon::first_ = (fltk3::FileIcon *)0;
+
+
+/**
+  Creates a new fltk3::FileIcon with the specified information.
+  \param[in] p filename pattern
+  \param[in] t file type
+  \param[in] nd number of data values
+  \param[in] d data values
+*/
+fltk3::FileIcon::FileIcon(const char *p,	/* I - Filename pattern */
+                	   int        t,	/* I - File type */
+			   int        nd,	/* I - Number of data values */
+			   short      *d)	/* I - Data values */
+{
+  // Initialize the pattern and type...
+  pattern_ = p;
+  type_    = t;
+
+  // Copy icon data as needed...
+  if (nd)
+  {
+    num_data_   = nd;
+    alloc_data_ = nd + 1;
+    data_       = (short *)calloc(sizeof(short), nd + 1);
+    memcpy(data_, d, nd * sizeof(short));
+  }
+  else
+  {
+    num_data_   = 0;
+    alloc_data_ = 0;
+  }
+
+  // And add the icon to the list of icons...
+  next_  = first_;
+  first_ = this;
+}
+
+
+/**
+  The destructor destroys the icon and frees all memory that has been
+  allocated for it.
+*/
+fltk3::FileIcon::~FileIcon() {
+  fltk3::FileIcon	*current,	// Current icon in list
+		*prev;		// Previous icon in list
+
+
+  // Find the icon in the list...
+  for (current = first_, prev = (fltk3::FileIcon *)0;
+       current != this && current != (fltk3::FileIcon *)0;
+       prev = current, current = current->next_);
+
+  // Remove the icon from the list as needed...
+  if (current)
+  {
+    if (prev)
+      prev->next_ = current->next_;
+    else
+      first_ = current->next_;
+  }
+
+  // Free any memory used...
+  if (alloc_data_)
+    free(data_);
+}
+
+
+/**
+  Adds a keyword value to the icon array, returning a pointer to it.
+  \param[in] d data value
+*/
+short *				// O - Pointer to new data value
+fltk3::FileIcon::add(short d)	// I - Data to add
+{
+  short	*dptr;			// Pointer to new data value
+
+
+  // Allocate/reallocate memory as needed
+  if ((num_data_ + 1) >= alloc_data_)
+  {
+    alloc_data_ += 128;
+
+    if (alloc_data_ == 128)
+      dptr = (short *)malloc(sizeof(short) * alloc_data_);
+    else
+      dptr = (short *)realloc(data_, sizeof(short) * alloc_data_);
+
+    if (dptr == NULL)
+      return (NULL);
+
+    data_ = dptr;
+  }
+
+  // Store the new data value and return
+  data_[num_data_++] = d;
+  data_[num_data_]   = END;
+
+  return (data_ + num_data_ - 1);
+}
+
+
+/**
+  Finds an icon that matches the given filename and file type.
+  \param[in] filename name of file
+  \param[in] filetype enumerated file type
+  \return matching file icon or NULL
+*/
+fltk3::FileIcon *				// O - Matching file icon or NULL
+fltk3::FileIcon::find(const char *filename,// I - Name of file */
+                   int        filetype)	// I - Enumerated file type
+{
+  fltk3::FileIcon	*current;		// Current file in list
+#ifndef WIN32
+  struct stat	fileinfo;		// Information on file
+#endif // !WIN32
+  const char	*name;			// Base name of filename
+
+
+  // Get file information if needed...
+  if (filetype == ANY)
+  {
+#ifdef WIN32
+    if (filename[strlen(filename) - 1] == '/')
+      filetype = DIRECTORY;
+    else if (fltk3::filename_isdir(filename))
+      filetype = DIRECTORY;
+    else
+      filetype = PLAIN;
+#else
+    if (!fltk3::stat(filename, &fileinfo))
+    {
+      if (S_ISDIR(fileinfo.st_mode))
+        filetype = DIRECTORY;
+#  ifdef S_IFIFO
+      else if (S_ISFIFO(fileinfo.st_mode))
+        filetype = FIFO;
+#  endif // S_IFIFO
+#  if defined(S_ICHR) && defined(S_IBLK)
+      else if (S_ISCHR(fileinfo.st_mode) || S_ISBLK(fileinfo.st_mode))
+        filetype = DEVICE;
+#  endif // S_ICHR && S_IBLK
+#  ifdef S_ILNK
+      else if (S_ISLNK(fileinfo.st_mode))
+        filetype = LINK;
+#  endif // S_ILNK
+      else
+        filetype = PLAIN;
+    }
+    else
+      filetype = PLAIN;
+#endif // WIN32
+  }
+
+  // Look at the base name in the filename
+  name = fltk3::filename_name(filename);
+
+  // Loop through the available file types and return any match that
+  // is found...
+  for (current = first_; current != (fltk3::FileIcon *)0; current = current->next_)
+    if ((current->type_ == filetype || current->type_ == ANY) &&
+        (fltk3::filename_match(filename, current->pattern_) ||
+	 fltk3::filename_match(name, current->pattern_)))
+      break;
+
+  // Return the match (if any)...
+  return (current);
+}
+
+/**
+  Draws an icon in the indicated area.
+  \param[in] x, y, w, h position and size
+  \param[in] ic icon color
+  \param[in] active status, default is active [non-zero]
+*/
+void
+fltk3::FileIcon::draw(int      x,		// I - Upper-lefthand X
+        	   int      y,		// I - Upper-lefthand Y
+		   int      w,		// I - Width of bounding box
+		   int      h,		// I - Height of bounding box
+        	   fltk3::Color ic,		// I - Icon color...
+        	   int      active)	// I - Active or inactive?
+{
+  fltk3::Color	c,		// Current color
+		oc;		// Outline color
+  short		*d,		// Pointer to data
+		*dend;		// End of data...
+  short		*prim;		// Pointer to start of primitive...
+  double	scale;		// Scale of icon
+
+
+  // Don't try to draw a NULL array!
+  if (num_data_ == 0)
+    return;
+
+  // Setup the transform matrix as needed...
+  scale = w < h ? w : h;
+
+  fltk3::push_matrix();
+  fltk3::translate((float)x + 0.5 * ((float)w - scale),
+               (float)y + 0.5 * ((float)h + scale));
+  fltk3::scale(scale, -scale);
+
+  // Loop through the array until we see an unmatched END...
+  d    = data_;
+  dend = data_ + num_data_;
+  prim = NULL;
+  c    = ic;
+
+  if (active)
+    fltk3::color(c);
+  else
+    fltk3::color(fltk3::inactive(c));
+
+  while (d < dend)
+    switch (*d)
+    {
+      case END :
+          if (prim)
+            switch (*prim)
+	    {
+	      case LINE :
+		  fltk3::end_line();
+		  break;
+
+	      case CLOSEDLINE :
+		  fltk3::end_loop();
+		  break;
+
+	      case POLYGON :
+		  fltk3::end_complex_polygon();
+		  break;
+
+	      case OUTLINEPOLYGON :
+		  fltk3::end_complex_polygon();
+
+        	  oc = (fltk3::Color)((((unsigned short *)prim)[1] << 16) | 
+	                	  ((unsigned short *)prim)[2]);
+                  if (active)
+		  {
+                    if (oc == fltk3::ICON_COLOR)
+		      fltk3::color(ic);
+		    else
+		      fltk3::color(oc);
+		  }
+		  else
+		  {
+                    if (oc == fltk3::ICON_COLOR)
+		      fltk3::color(fltk3::inactive(ic));
+		    else
+		      fltk3::color(fltk3::inactive(oc));
+		  }
+
+		  fltk3::begin_loop();
+
+		  prim += 3;
+		  while (*prim == VERTEX)
+		  {
+		    fltk3::vertex(prim[1] * 0.0001, prim[2] * 0.0001);
+		    prim += 3;
+		  }
+
+        	  fltk3::end_loop();
+		  fltk3::color(c);
+		  break;
+	    }
+
+          prim = NULL;
+	  d ++;
+	  break;
+
+      case COLOR :
+          c = (fltk3::Color)((((unsigned short *)d)[1] << 16) | 
+	                   ((unsigned short *)d)[2]);
+
+          if (c == fltk3::ICON_COLOR)
+	    c = ic;
+
+          if (!active)
+	    c = fltk3::inactive(c);
+
+          fltk3::color(c);
+	  d += 3;
+	  break;
+
+      case LINE :
+          prim = d;
+	  d ++;
+	  fltk3::begin_line();
+	  break;
+
+      case CLOSEDLINE :
+          prim = d;
+	  d ++;
+	  fltk3::begin_loop();
+	  break;
+
+      case POLYGON :
+          prim = d;
+	  d ++;
+	  fltk3::begin_complex_polygon();
+	  break;
+
+      case OUTLINEPOLYGON :
+          prim = d;
+	  d += 3;
+	  fltk3::begin_complex_polygon();
+	  break;
+
+      case VERTEX :
+          if (prim)
+	    fltk3::vertex(d[1] * 0.0001, d[2] * 0.0001);
+	  d += 3;
+	  break;
+
+      default : // Ignore invalid data...
+          d ++;
+    }
+
+  // If we still have an open primitive, close it...
+  if (prim)
+    switch (*prim)
+    {
+      case LINE :
+	  fltk3::end_line();
+	  break;
+
+      case CLOSEDLINE :
+	  fltk3::end_loop();
+	  break;
+
+      case POLYGON :
+	  fltk3::end_polygon();
+	  break;
+
+      case OUTLINEPOLYGON :
+	  fltk3::end_polygon();
+
+          oc = (fltk3::Color)((((unsigned short *)prim)[1] << 16) | 
+	                  ((unsigned short *)prim)[2]);
+          if (active)
+	  {
+            if (oc == fltk3::ICON_COLOR)
+	      fltk3::color(ic);
+	    else
+	      fltk3::color(oc);
+	  }
+	  else
+	  {
+            if (oc == fltk3::ICON_COLOR)
+	      fltk3::color(fltk3::inactive(ic));
+	    else
+	      fltk3::color(fltk3::inactive(oc));
+	  }
+
+	  fltk3::begin_loop();
+
+	  prim += 3;
+	  while (*prim == VERTEX)
+	  {
+	    fltk3::vertex(prim[1] * 0.0001, prim[2] * 0.0001);
+	    prim += 3;
+	  }
+
+          fltk3::end_loop();
+	  fltk3::color(c);
+	  break;
+    }
+
+  // Restore the transform matrix
+  fltk3::pop_matrix();
+}
+
+/**
+  Applies the icon to the widget, registering the fltk3::FileIcon
+  label type as needed.
+  \param[in] w widget for which this icon will become the label
+*/
+void fltk3::FileIcon::label(fltk3::Widget *w)	// I - Widget to label
+{
+  w->label(fltk3::ICON_LABEL, (const char*)this);
+}
+
+
+/**
+  Draw the icon label.
+  \param[in] o label data
+  \param[in] x, y, w, h position and size of label
+  \param[in] a label alignment [not used]
+*/
+void fl_icon_labeltype(const fltk3::Label *o,	// I - Label data
+                	int            x,	// I - X position of label
+			int            y,	// I - Y position of label
+			int            w,	// I - Width of label
+			int            h,	// I - Height of label
+			fltk3::Align       a)	// I - Label alignment (not used)
+{
+  fltk3::FileIcon *icon;			// Pointer to icon data
+
+
+  (void)a;
+
+  icon = (fltk3::FileIcon *)(o->value);
+  if (icon) icon->draw(x, y, w, h, (fltk3::Color)(o->color));
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_File_Icon.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Icon2.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Icon2.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Icon2.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1022 @@
+//
+// "$Id$"
+//
+// fltk3::FileIcon system icon routines.
+//
+// KDE icon code donated by Maarten De Boer.
+//
+// Copyright 1999-2010 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::FileIcon::load()              - Load an icon file...
+//   fltk3::FileIcon::load_fti()          - Load an SGI-format FTI file...
+//   fltk3::FileIcon::load_image()        - Load an image icon file...
+//   fltk3::FileIcon::load_system_icons() - Load the standard system icons/filetypes.
+//   load_kde_icons()                  - Load KDE icon files.
+//   load_kde_mimelnk()                - Load a KDE "mimelnk" file.
+//   kde_to_fltk_pattern()             - Convert a KDE pattern to a FLTK pattern.
+//   get_kde_val()                     - Get a KDE value.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <ctype.h>
+#include <errno.h>
+#include <fltk3/math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#if defined(WIN32) && !defined(__CYGWIN__)
+#  include <io.h>
+#  define F_OK	0
+// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
+// on Windows, which is supposed to be POSIX compliant...
+#  define access _access
+#else
+#  include <unistd.h>
+#endif // WIN32
+
+#include <fltk3/FileIcon.h>
+#include <fltk3/SharedImage.h>
+#include <fltk3/Widget.h>
+#include <fltk3/draw.h>
+#include <fltk3/filename.h>
+
+
+//
+// Define missing POSIX/XPG4 macros as needed...
+//
+
+#ifndef S_ISDIR
+#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif /* !S_ISDIR */
+
+
+//
+// Local functions...
+//
+
+static void	load_kde_icons(const char *directory, const char *icondir);
+static void	load_kde_mimelnk(const char *filename, const char *icondir);
+static char	*kde_to_fltk_pattern(const char *kdepattern);
+static char	*get_kde_val(char *str, const char *key);
+
+
+//
+// Local globals...
+//
+
+static const char *kdedir = NULL;
+
+
+/**
+  Loads the specified icon image. The format is deduced from the filename.
+  \param[in] f filename
+*/
+void
+fltk3::FileIcon::load(const char *f)	// I - File to read from
+{
+  int		i;			// Load status...
+  const char	*ext;			// File extension
+
+
+  ext = fltk3::filename_ext(f);
+
+  if (ext && strcmp(ext, ".fti") == 0)
+    i = load_fti(f);
+  else
+    i = load_image(f);
+
+  if (i)
+  {
+    fltk3::warning("fltk3::FileIcon::load(): Unable to load icon file \"%s\".", f);
+    return;
+  }
+}
+
+
+/**
+  Loads an SGI icon file.
+  \param[in] fti icon filename
+  \return 0 on success, non-zero on error
+*/
+int					// O - 0 on success, non-zero on error
+fltk3::FileIcon::load_fti(const char *fti)	// I - File to read from
+{
+  FILE	*fp;			// File pointer
+  int	ch;			// Current character
+  char	command[255],		// Command string ("vertex", etc.)
+	params[255],		// Parameter string ("10.0,20.0", etc.)
+	*ptr;			// Pointer into strings
+  int	outline;		// Outline polygon
+
+
+  // Try to open the file...
+  if ((fp = fltk3::fopen(fti, "rb")) == NULL)
+  {
+    fltk3::error("fltk3::FileIcon::load_fti(): Unable to open \"%s\" - %s",
+              fti, strerror(errno));
+    return -1;
+  }
+
+  // Read the entire file, adding data as needed...
+  outline = 0;
+
+  while ((ch = getc(fp)) != EOF)
+  {
+    // Skip whitespace
+    if (isspace(ch))
+      continue;
+
+    // Skip comments starting with "#"...
+    if (ch == '#')
+    {
+      while ((ch = getc(fp)) != EOF)
+        if (ch == '\n')
+	  break;
+
+      if (ch == EOF)
+        break;
+      else
+        continue;
+    }
+
+    // OK, this character better be a letter...
+    if (!isalpha(ch))
+    {
+      fltk3::error("fltk3::FileIcon::load_fti(): Expected a letter at file position %ld (saw '%c')",
+                ftell(fp) - 1, ch);
+      break;
+    }
+
+    // Scan the command name...
+    ptr    = command;
+    *ptr++ = ch;
+
+    while ((ch = getc(fp)) != EOF)
+    {
+      if (ch == '(')
+        break;
+      else if (ptr < (command + sizeof(command) - 1))
+        *ptr++ = ch;
+    }
+
+    *ptr++ = '\0';
+
+    // Make sure we stopped on a parenthesis...
+    if (ch != '(')
+    {
+      fltk3::error("fltk3::FileIcon::load_fti(): Expected a ( at file position %ld (saw '%c')",
+                ftell(fp) - 1, ch);
+      break;
+    }
+
+    // Scan the parameters...
+    ptr = params;
+
+    while ((ch = getc(fp)) != EOF)
+    {
+      if (ch == ')')
+        break;
+      else if (ptr < (params + sizeof(params) - 1))
+        *ptr++ = ch;
+    }
+
+    *ptr++ = '\0';
+
+    // Make sure we stopped on a parenthesis...
+    if (ch != ')')
+    {
+      fltk3::error("fltk3::FileIcon::load_fti(): Expected a ) at file position %ld (saw '%c')",
+                ftell(fp) - 1, ch);
+      break;
+    }
+
+    // Make sure the next character is a semicolon...
+    if ((ch = getc(fp)) != ';')
+    {
+      fltk3::error("fltk3::FileIcon::load_fti(): Expected a ; at file position %ld (saw '%c')",
+                ftell(fp) - 1, ch);
+      break;
+    }
+
+    // Now process the command...
+    if (strcmp(command, "color") == 0)
+    {
+      // Set the color; for negative colors blend the two primaries to
+      // produce a composite color.  Also, the following symbolic color
+      // names are understood:
+      //
+      //     name           FLTK color
+      //     -------------  ----------
+      //     iconcolor      fltk3::ICON_COLOR; mapped to the icon color in
+      //                    fltk3::FileIcon::draw()
+      //     shadowcolor    fltk3::DARK3
+      //     outlinecolor   fltk3::BLACK
+      if (strcmp(params, "iconcolor") == 0)
+        add_color(fltk3::ICON_COLOR);
+      else if (strcmp(params, "shadowcolor") == 0)
+        add_color(fltk3::DARK3);
+      else if (strcmp(params, "outlinecolor") == 0)
+        add_color(fltk3::BLACK);
+      else
+      {
+        int c = atoi(params);	// Color value
+
+
+        if (c < 0)
+	{
+	  // Composite color; compute average...
+	  c = -c;
+	  add_color(fltk3::color_average((fltk3::Color)(c >> 4),
+	                             (fltk3::Color)(c & 15), 0.5f));
+	}
+	else
+	  add_color((fltk3::Color)c);
+      }
+    }
+    else if (strcmp(command, "bgnline") == 0)
+      add(LINE);
+    else if (strcmp(command, "bgnclosedline") == 0)
+      add(CLOSEDLINE);
+    else if (strcmp(command, "bgnpolygon") == 0)
+      add(POLYGON);
+    else if (strcmp(command, "bgnoutlinepolygon") == 0)
+    {
+      add(OUTLINEPOLYGON);
+      outline = add(0) - data_;
+      add(0);
+    }
+    else if (strcmp(command, "endoutlinepolygon") == 0 && outline)
+    {
+      unsigned cval; // Color value
+
+      // Set the outline color; see above for valid values...
+      if (strcmp(params, "iconcolor") == 0)
+        cval = fltk3::ICON_COLOR;
+      else if (strcmp(params, "shadowcolor") == 0)
+        cval = fltk3::DARK3;
+      else if (strcmp(params, "outlinecolor") == 0)
+        cval = fltk3::BLACK;
+      else
+      {
+        int c = atoi(params);	// Color value
+
+
+        if (c < 0)
+	{
+	  // Composite color; compute average...
+	  c = -c;
+	  cval = fltk3::color_average((fltk3::Color)(c >> 4), (fltk3::Color)(c & 15), 0.5f);
+	}
+	else
+	  cval = c;
+      }
+
+      // Store outline color...
+      data_[outline]     = cval >> 16;
+      data_[outline + 1] = cval;
+
+      outline = 0;
+      add(END);
+    }
+    else if (strncmp(command, "end", 3) == 0)
+      add(END);
+    else if (strcmp(command, "vertex") == 0)
+    {
+      float x, y;		// Coordinates of vertex
+
+
+      if (sscanf(params, "%f,%f", &x, &y) != 2)
+        break;
+
+      add_vertex((short)(int)rint(x * 100.0), (short)(int)rint(y * 100.0));
+    }
+    else
+    {
+      fltk3::error("fltk3::FileIcon::load_fti(): Unknown command \"%s\" at file position %ld.",
+                command, ftell(fp) - 1);
+      break;
+    }
+  }
+
+  // Close the file and return...
+  fclose(fp);
+
+#ifdef DEBUG
+  printf("Icon File \"%s\":\n", fti);
+  for (int i = 0; i < num_data_; i ++)
+    printf("    %d,\n", data_[i]);
+#endif /* DEBUG */
+
+  return 0;
+}
+
+
+/**
+  Load an image icon file from an image filename.
+  \param[in] ifile image filename
+  \return 0 on success, non-zero on error
+*/
+int fltk3::FileIcon::load_image(const char *ifile)	// I - File to read from
+{
+  fltk3::SharedImage	*img;		// Image file
+
+
+  img = fltk3::SharedImage::get(ifile);
+  if (!img || !img->count() || !img->w() || !img->h()) return -1;
+
+  if (img->count() == 1) {
+    int		x, y;		// X & Y in image
+    int		startx;		// Starting X coord
+    fltk3::Color	c,		// Current color
+		temp;		// Temporary color
+    const uchar *row;		// Pointer into image
+
+
+    // Loop through grayscale or RGB image...
+    for (y = 0, row = (const uchar *)(*(img->data())); y < img->h(); y ++, row += img->ld())
+    {
+      for (x = 0, startx = 0, c = (fltk3::Color)-1;
+           x < img->w();
+	   x ++, row += img->d())
+      {
+	switch (img->d())
+	{
+          case 1 :
+              temp = fltk3::rgb_color(row[0], row[0], row[0]);
+	      break;
+          case 2 :
+	      if (row[1] > 127)
+        	temp = fltk3::rgb_color(row[0], row[0], row[0]);
+	      else
+		temp = (fltk3::Color)-1;
+	      break;
+	  case 3 :
+              temp = fltk3::rgb_color(row[0], row[1], row[2]);
+	      break;
+	  default :
+	      if (row[3] > 127)
+        	temp = fltk3::rgb_color(row[0], row[1], row[2]);
+	      else
+		temp = (fltk3::Color)-1;
+	      break;
+	}
+
+	if (temp != c)
+	{
+	  if (x > startx && c != (fltk3::Color)-1)
+	  {
+	    add_color(c);
+	    add(POLYGON);
+	    add_vertex(startx * 9000 / img->w() + 1000, 9500 - y * 9000 / img->h());
+	    add_vertex(x * 9000 / img->w() + 1000,      9500 - y * 9000 / img->h());
+	    add_vertex(x * 9000 / img->w() + 1000,      9500 - (y + 1) * 9000 / img->h());
+	    add_vertex(startx * 9000 / img->w() + 1000, 9500 - (y + 1) * 9000 / img->h());
+	    add(END);
+	  }
+
+          c      = temp;
+	  startx = x;
+	}
+      }
+
+      if (x > startx && c != (fltk3::Color)-1)
+      {
+	add_color(c);
+	add(POLYGON);
+	add_vertex(startx * 9000 / img->w() + 1000, 9500 - y * 9000 / img->h());
+	add_vertex(x * 9000 / img->w() + 1000,      9500 - y * 9000 / img->h());
+	add_vertex(x * 9000 / img->w() + 1000,      9500 - (y + 1) * 9000 / img->h());
+	add_vertex(startx * 9000 / img->w() + 1000, 9500 - (y + 1) * 9000 / img->h());
+	add(END);
+      }
+    }
+  } else {
+    int		i, j;			// Looping vars
+    int		ch;			// Current character
+    int		newch;			// New character
+    int		bg;			// Background color
+    char	val[16];		// Color value
+    const char	*lineptr,		// Pointer into line
+		*const*ptr;		// Pointer into data array
+    int		ncolors,		// Number of colors
+		chars_per_color;	// Characters per color
+    fltk3::Color	*colors;		// Colors
+    int		red, green, blue;	// Red, green, and blue values
+    int		x, y;			// X & Y in image
+    int		startx;			// Starting X coord
+
+
+    // Get the pixmap data...
+    ptr = img->data();
+    sscanf(*ptr, "%*d%*d%d%d", &ncolors, &chars_per_color);
+
+    colors = new fltk3::Color[1 << (chars_per_color * 8)];
+
+    // Read the colormap...
+    memset(colors, 0, sizeof(fltk3::Color) << (chars_per_color * 8));
+    bg = ' ';
+
+    ptr ++;
+
+    if (ncolors < 0) {
+      // Read compressed colormap...
+      const uchar *cmapptr;
+
+      ncolors = -ncolors;
+
+      for (i = 0, cmapptr = (const uchar *)*ptr; i < ncolors; i ++, cmapptr += 4)
+        colors[cmapptr[0]] = fltk3::rgb_color(cmapptr[1], cmapptr[2], cmapptr[3]);
+
+      ptr ++;
+    } else {
+      for (i = 0; i < ncolors; i ++, ptr ++) {
+	// Get the color's character
+	lineptr = *ptr;
+	ch      = *lineptr++;
+
+        if (chars_per_color > 1) ch = (ch << 8) | *lineptr++;
+
+	// Get the color value...
+	if ((lineptr = strstr(lineptr, "c ")) == NULL) {
+	  // No color; make this black...
+	  colors[ch] = fltk3::BLACK;
+	} else if (lineptr[2] == '#') {
+	  // Read the RGB triplet...
+	  lineptr += 3;
+	  for (j = 0; j < 12; j ++)
+            if (!isxdigit(lineptr[j]))
+	      break;
+
+	  switch (j) {
+            case 0 :
+		bg = ch;
+	    default :
+		red = green = blue = 0;
+		break;
+
+            case 3 :
+		val[0] = lineptr[0];
+		val[1] = '\0';
+		red = 255 * strtol(val, NULL, 16) / 15;
+
+		val[0] = lineptr[1];
+		val[1] = '\0';
+		green = 255 * strtol(val, NULL, 16) / 15;
+
+		val[0] = lineptr[2];
+		val[1] = '\0';
+		blue = 255 * strtol(val, NULL, 16) / 15;
+		break;
+
+            case 6 :
+            case 9 :
+            case 12 :
+		j /= 3;
+
+		val[0] = lineptr[0];
+		val[1] = lineptr[1];
+		val[2] = '\0';
+		red = strtol(val, NULL, 16);
+
+		val[0] = lineptr[j + 0];
+		val[1] = lineptr[j + 1];
+		val[2] = '\0';
+		green = strtol(val, NULL, 16);
+
+		val[0] = lineptr[2 * j + 0];
+		val[1] = lineptr[2 * j + 1];
+		val[2] = '\0';
+		blue = strtol(val, NULL, 16);
+		break;
+	  }
+
+	  colors[ch] = fltk3::rgb_color((uchar)red, (uchar)green, (uchar)blue);
+	} else {
+	  // Read a color name...
+	  if (strncasecmp(lineptr + 2, "white", 5) == 0) colors[ch] = fltk3::WHITE;
+	  else if (strncasecmp(lineptr + 2, "black", 5) == 0) colors[ch] = fltk3::BLACK;
+	  else if (strncasecmp(lineptr + 2, "none", 4) == 0) {
+            colors[ch] = fltk3::BLACK;
+	    bg = ch;
+	  } else colors[ch] = fltk3::GRAY;
+	}
+      }
+    }
+
+    // Read the image data...
+    for (y = 0; y < img->h(); y ++, ptr ++) {
+      lineptr = *ptr;
+      startx  = 0;
+      ch      = bg;
+
+      for (x = 0; x < img->w(); x ++) {
+	newch = *lineptr++;
+
+        if (chars_per_color > 1) newch = (newch << 8) | *lineptr++;
+
+	if (newch != ch) {
+	  if (ch != bg) {
+            add_color(colors[ch]);
+	    add(POLYGON);
+	    add_vertex(startx * 9000 / img->w() + 1000, 9500 - y * 9000 / img->h());
+	    add_vertex(x * 9000 / img->w() + 1000,      9500 - y * 9000 / img->h());
+	    add_vertex(x * 9000 / img->w() + 1000,      9500 - (y + 1) * 9000 / img->h());
+	    add_vertex(startx * 9000 / img->w() + 1000, 9500 - (y + 1) * 9000 / img->h());
+	    add(END);
+          }
+
+	  ch     = newch;
+	  startx = x;
+	}
+      }
+
+      if (ch != bg) {
+	add_color(colors[ch]);
+	add(POLYGON);
+	add_vertex(startx * 9000 / img->w() + 1000, 9500 - y * 9000 / img->h());
+	add_vertex(x * 9000 / img->w() + 1000,      9500 - y * 9000 / img->h());
+	add_vertex(x * 9000 / img->w() + 1000,      9500 - (y + 1) * 9000 / img->h());
+	add_vertex(startx * 9000 / img->w() + 1000, 9500 - (y + 1) * 9000 / img->h());
+	add(END);
+      }
+    }
+
+    // Free the colormap...
+    delete[] colors;
+  }
+
+  img->release();
+
+#ifdef DEBUG
+  printf("Icon File \"%s\":\n", xpm);
+  for (i = 0; i < num_data_; i ++)
+    printf("    %d,\n", data_[i]);
+#endif // DEBUG
+
+  return 0;
+}
+
+
+/**
+  Loads all system-defined icons. This call is useful when using the
+  FileChooser widget and should be used when the application starts:
+  
+  \code
+  fltk3::FileIcon::load_system_icons();
+  \endcode
+*/
+void
+fltk3::FileIcon::load_system_icons(void) {
+  int		i;		// Looping var
+  fltk3::FileIcon	*icon;		// New icons
+  char		filename[FLTK3_PATH_MAX];	// Filename
+  char		icondir[FLTK3_PATH_MAX];	// Icon directory
+  static int	init = 0;	// Have the icons been initialized?
+  const char * const icondirs[] = {
+		  "Bluecurve",	// Icon directories to look for, in order
+		  "crystalsvg",
+		  "default.kde",
+		  "hicolor",
+		  NULL
+		};
+  static short	plain[] = {	// Plain file icon
+		  COLOR, -1, -1, OUTLINEPOLYGON, 0, fltk3::GRAY,
+		  VERTEX, 2000, 1000, VERTEX, 2000, 9000,
+		  VERTEX, 6000, 9000, VERTEX, 8000, 7000,
+		  VERTEX, 8000, 1000, END, OUTLINEPOLYGON, 0, fltk3::GRAY,
+		  VERTEX, 6000, 9000, VERTEX, 6000, 7000,
+		  VERTEX, 8000, 7000, END,
+		  COLOR, 0, fltk3::BLACK, LINE, VERTEX, 6000, 7000,
+		  VERTEX, 8000, 7000, VERTEX, 8000, 1000,
+		  VERTEX, 2000, 1000, END, LINE, VERTEX, 3000, 7000,
+		  VERTEX, 5000, 7000, END, LINE, VERTEX, 3000, 6000,
+		  VERTEX, 5000, 6000, END, LINE, VERTEX, 3000, 5000,
+		  VERTEX, 7000, 5000, END, LINE, VERTEX, 3000, 4000,
+		  VERTEX, 7000, 4000, END, LINE, VERTEX, 3000, 3000,
+		  VERTEX, 7000, 3000, END, LINE, VERTEX, 3000, 2000,
+		  VERTEX, 7000, 2000, END, 
+		  END
+		};
+  static short	image[] = {	// Image file icon
+		  COLOR, -1, -1, OUTLINEPOLYGON, 0, fltk3::GRAY,
+		  VERTEX, 2000, 1000, VERTEX, 2000, 9000,
+		  VERTEX, 6000, 9000, VERTEX, 8000, 7000,
+		  VERTEX, 8000, 1000, END, OUTLINEPOLYGON, 0, fltk3::GRAY,
+		  VERTEX, 6000, 9000, VERTEX, 6000, 7000,
+		  VERTEX, 8000, 7000, END,
+		  COLOR, 0, fltk3::BLACK, LINE, VERTEX, 6000, 7000,
+		  VERTEX, 8000, 7000, VERTEX, 8000, 1000,
+		  VERTEX, 2000, 1000, END,
+		  COLOR, 0, fltk3::RED, POLYGON, VERTEX, 3500, 2500,
+		  VERTEX, 3000, 3000, VERTEX, 3000, 4000,
+		  VERTEX, 3500, 4500, VERTEX, 4500, 4500,
+		  VERTEX, 5000, 4000, VERTEX, 5000, 3000,
+		  VERTEX, 4500, 2500, END,
+		  COLOR, 0, fltk3::GREEN, POLYGON, VERTEX, 5500, 2500,
+		  VERTEX, 5000, 3000, VERTEX, 5000, 4000,
+		  VERTEX, 5500, 4500, VERTEX, 6500, 4500,
+		  VERTEX, 7000, 4000, VERTEX, 7000, 3000,
+		  VERTEX, 6500, 2500, END,
+		  COLOR, 0, fltk3::BLUE, POLYGON, VERTEX, 4500, 3500,
+		  VERTEX, 4000, 4000, VERTEX, 4000, 5000,
+		  VERTEX, 4500, 5500, VERTEX, 5500, 5500,
+		  VERTEX, 6000, 5000, VERTEX, 6000, 4000,
+		  VERTEX, 5500, 3500, END,
+		  END
+		};
+  static short	dir[] = {	// Directory icon
+		  COLOR, -1, -1, POLYGON, VERTEX, 1000, 1000,
+		  VERTEX, 1000, 7500,  VERTEX, 9000, 7500,
+		  VERTEX, 9000, 1000, END,
+		  POLYGON, VERTEX, 1000, 7500, VERTEX, 2500, 9000,
+		  VERTEX, 5000, 9000, VERTEX, 6500, 7500, END,
+		  COLOR, 0, fltk3::WHITE, LINE, VERTEX, 1500, 1500,
+		  VERTEX, 1500, 7000, VERTEX, 9000, 7000, END,
+		  COLOR, 0, fltk3::BLACK, LINE, VERTEX, 9000, 7500,
+		  VERTEX, 9000, 1000, VERTEX, 1000, 1000, END,
+		  COLOR, 0, fltk3::GRAY, LINE, VERTEX, 1000, 1000,
+		  VERTEX, 1000, 7500, VERTEX, 2500, 9000,
+		  VERTEX, 5000, 9000, VERTEX, 6500, 7500,
+		  VERTEX, 9000, 7500, END,
+		  END
+		};
+
+
+  // Add symbols if they haven't been added already...
+  if (!init) {
+    // This method requires the images library...
+    fltk3::register_images();
+
+    if (!kdedir) {
+      // Figure out where KDE is installed...
+      if ((kdedir = getenv("KDEDIR")) == NULL) {
+        if (!access("/opt/kde", F_OK)) kdedir = "/opt/kde";
+	else if (!access("/usr/local/share/mimelnk", F_OK)) kdedir = "/usr/local";
+        else kdedir = "/usr";
+      }
+    }
+
+    snprintf(filename, sizeof(filename), "%s/share/mimelnk", kdedir);
+
+    if (!access(filename, F_OK)) {
+      // Load KDE icons...
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::PLAIN);
+
+      for (i = 0; icondirs[i]; i ++) {
+	snprintf(icondir, sizeof(icondir), "%s/share/icons/%s", kdedir,
+		 icondirs[i]);
+
+        if (!access(icondir, F_OK)) break;
+      }
+
+      if (icondirs[i]) {
+        snprintf(filename, sizeof(filename), "%s/16x16/mimetypes/unknown.png",
+	         icondir);
+      } else {
+	snprintf(filename, sizeof(filename), "%s/share/icons/unknown.xpm",
+	         kdedir);
+      }
+
+      if (!access(filename, F_OK)) icon->load_image(filename);
+
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::LINK);
+
+      snprintf(filename, sizeof(filename), "%s/16x16/filesystems/link.png",
+               icondir);
+
+      if (!access(filename, F_OK)) icon->load_image(filename);
+
+      snprintf(filename, sizeof(filename), "%s/share/mimelnk", kdedir);
+      load_kde_icons(filename, icondir);
+    } else if (!access("/usr/share/icons/folder.xpm", F_OK)) {
+      // Load GNOME icons...
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::PLAIN);
+      icon->load_image("/usr/share/icons/page.xpm");
+
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::DIRECTORY);
+      icon->load_image("/usr/share/icons/folder.xpm");
+    } else if (!access("/usr/dt/appconfig/icons", F_OK)) {
+      // Load CDE icons...
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::PLAIN);
+      icon->load_image("/usr/dt/appconfig/icons/C/Dtdata.m.pm");
+
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::DIRECTORY);
+      icon->load_image("/usr/dt/appconfig/icons/C/DtdirB.m.pm");
+
+      icon = new fltk3::FileIcon("core", fltk3::FileIcon::PLAIN);
+      icon->load_image("/usr/dt/appconfig/icons/C/Dtcore.m.pm");
+
+      icon = new fltk3::FileIcon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", fltk3::FileIcon::PLAIN);
+      icon->load_image("/usr/dt/appconfig/icons/C/Dtimage.m.pm");
+
+      icon = new fltk3::FileIcon("*.{eps|pdf|ps}", fltk3::FileIcon::PLAIN);
+      icon->load_image("/usr/dt/appconfig/icons/C/Dtps.m.pm");
+
+      icon = new fltk3::FileIcon("*.ppd", fltk3::FileIcon::PLAIN);
+      icon->load_image("/usr/dt/appconfig/icons/C/DtPrtpr.m.pm");
+    } else if (!access("/usr/lib/filetype", F_OK)) {
+      // Load SGI icons...
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::PLAIN);
+      icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
+
+      icon = new fltk3::FileIcon("*", fltk3::FileIcon::DIRECTORY);
+      icon->load_fti("/usr/lib/filetype/iconlib/generic.folder.closed.fti");
+
+      icon = new fltk3::FileIcon("core", fltk3::FileIcon::PLAIN);
+      icon->load_fti("/usr/lib/filetype/default/iconlib/CoreFile.fti");
+
+      icon = new fltk3::FileIcon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", fltk3::FileIcon::PLAIN);
+      icon->load_fti("/usr/lib/filetype/system/iconlib/ImageFile.fti");
+
+      if (!access("/usr/lib/filetype/install/iconlib/acroread.doc.fti", F_OK)) {
+	icon = new fltk3::FileIcon("*.{eps|ps}", fltk3::FileIcon::PLAIN);
+	icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+
+	icon = new fltk3::FileIcon("*.pdf", fltk3::FileIcon::PLAIN);
+	icon->load_fti("/usr/lib/filetype/install/iconlib/acroread.doc.fti");
+      } else {
+	icon = new fltk3::FileIcon("*.{eps|pdf|ps}", fltk3::FileIcon::PLAIN);
+	icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+      }
+
+      if (!access("/usr/lib/filetype/install/iconlib/html.fti", F_OK)) {
+	icon = new fltk3::FileIcon("*.{htm|html|shtml}", fltk3::FileIcon::PLAIN);
+        icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
+	icon->load_fti("/usr/lib/filetype/install/iconlib/html.fti");
+      }
+
+      if (!access("/usr/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK)) {
+	icon = new fltk3::FileIcon("*.ppd", fltk3::FileIcon::PLAIN);
+	icon->load_fti("/usr/lib/filetype/install/iconlib/color.ps.idle.fti");
+      }
+    } else {
+      // Create the default icons...
+      new fltk3::FileIcon("*", fltk3::FileIcon::PLAIN, sizeof(plain) / sizeof(plain[0]), plain);
+      new fltk3::FileIcon("*.{bm|bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", fltk3::FileIcon::PLAIN,
+                   sizeof(image) / sizeof(image[0]), image);
+      new fltk3::FileIcon("*", fltk3::FileIcon::DIRECTORY, sizeof(dir) / sizeof(dir[0]), dir);
+    }
+
+    // Mark things as initialized...
+    init = 1;
+
+#ifdef DEBUG
+    int count;
+    fltk3::FileIcon *temp;
+    for (count = 0, temp = first_; temp; temp = temp->next_, count ++);
+    printf("count of fltk3::FileIcon's is %d...\n", count);
+#endif // DEBUG
+  }
+}
+
+
+//
+// 'load_kde_icons()' - Load KDE icon files.
+//
+
+static void
+load_kde_icons(const char *directory,	// I - Directory to load
+               const char *icondir) {	// I - Location of icons
+  int		i;			// Looping var
+  int		n;			// Number of entries in directory
+  dirent	**entries;		// Entries in directory
+  char		full[FLTK3_PATH_MAX];	// Full name of file
+
+
+  entries = (dirent **)0;
+  n       = fltk3::filename_list(directory, &entries);
+
+  for (i = 0; i < n; i ++) {
+    if (entries[i]->d_name[0] != '.') {
+      snprintf(full, sizeof(full), "%s/%s", directory, entries[i]->d_name);
+
+      if (fltk3::filename_isdir(full)) load_kde_icons(full, icondir);
+      else load_kde_mimelnk(full, icondir);
+    }
+
+    free((void *)entries[i]);
+  }
+
+  free((void*)entries);
+}
+
+
+//
+// 'load_kde_mimelnk()' - Load a KDE "mimelnk" file.
+//
+
+static void
+load_kde_mimelnk(const char *filename,	// I - mimelnk filename
+                 const char *icondir) {	// I - Location of icons
+  FILE		*fp;
+  char		tmp[1024];
+  char		iconfilename[FLTK3_PATH_MAX];
+  char		pattern[1024];
+  char		mimetype[1024];
+  char		*val;
+  char		full_iconfilename[FLTK3_PATH_MAX];
+  fltk3::FileIcon	*icon;
+
+
+  mimetype[0]     = '\0';
+  pattern[0]      = '\0';
+  iconfilename[0] = '\0';
+
+  if ((fp = fltk3::fopen(filename, "rb")) != NULL) {
+    while (fgets(tmp, sizeof(tmp), fp)) {
+      if ((val = get_kde_val(tmp, "Icon")) != NULL)
+	strlcpy(iconfilename, val, sizeof(iconfilename));
+      else if ((val = get_kde_val(tmp, "MimeType")) != NULL)
+	strlcpy(mimetype, val, sizeof(mimetype));
+      else if ((val = get_kde_val(tmp, "Patterns")) != NULL)
+	strlcpy(pattern, val, sizeof(pattern));
+    }
+
+    fclose(fp);
+
+#ifdef DEBUG
+    printf("%s: Icon=\"%s\", MimeType=\"%s\", Patterns=\"%s\"\n", filename,
+           iconfilename, mimetype, pattern);
+#endif // DEBUG
+
+    if (!pattern[0] && strncmp(mimetype, "inode/", 6)) return;
+
+    if (iconfilename[0]) {
+      if (iconfilename[0] == '/') {
+        strlcpy(full_iconfilename, iconfilename, sizeof(full_iconfilename));
+      } else if (!access(icondir, F_OK)) {
+        // KDE 3.x and 2.x icons
+	int		i;		// Looping var
+	static const char *paths[] = {	// Subdirs to look in...
+	  "16x16/actions",
+	  "16x16/apps",
+	  "16x16/devices",
+	  "16x16/filesystems",
+	  "16x16/mimetypes",
+/*
+	  "20x20/actions",
+	  "20x20/apps",
+	  "20x20/devices",
+	  "20x20/filesystems",
+	  "20x20/mimetypes",
+
+	  "22x22/actions",
+	  "22x22/apps",
+	  "22x22/devices",
+	  "22x22/filesystems",
+	  "22x22/mimetypes",
+
+	  "24x24/actions",
+	  "24x24/apps",
+	  "24x24/devices",
+	  "24x24/filesystems",
+	  "24x24/mimetypes",
+*/
+	  "32x32/actions",
+	  "32x32/apps",
+	  "32x32/devices",
+	  "32x32/filesystems",
+	  "32x32/mimetypes",
+/*
+	  "36x36/actions",
+	  "36x36/apps",
+	  "36x36/devices",
+	  "36x36/filesystems",
+	  "36x36/mimetypes",
+
+	  "48x48/actions",
+	  "48x48/apps",
+	  "48x48/devices",
+	  "48x48/filesystems",
+	  "48x48/mimetypes",
+
+	  "64x64/actions",
+	  "64x64/apps",
+	  "64x64/devices",
+	  "64x64/filesystems",
+	  "64x64/mimetypes",
+
+	  "96x96/actions",
+	  "96x96/apps",
+	  "96x96/devices",
+	  "96x96/filesystems",
+	  "96x96/mimetypes"
+*/	};
+
+        for (i = 0; i < (int)(sizeof(paths) / sizeof(paths[0])); i ++) {
+          snprintf(full_iconfilename, sizeof(full_iconfilename),
+	           "%s/%s/%s.png", icondir, paths[i], iconfilename);
+
+          if (!access(full_iconfilename, F_OK)) break;
+	}
+
+        if (i >= (int)(sizeof(paths) / sizeof(paths[0]))) return;
+      } else {
+        // KDE 1.x icons
+        snprintf(full_iconfilename, sizeof(full_iconfilename),
+	         "%s/%s", tmp, iconfilename);
+
+        if (access(full_iconfilename, F_OK)) return;
+      }
+
+      if (strncmp(mimetype, "inode/", 6) == 0) {
+	if (!strcmp(mimetype + 6, "directory"))
+	  icon = new fltk3::FileIcon("*", fltk3::FileIcon::DIRECTORY);
+	else if (!strcmp(mimetype + 6, "blockdevice"))
+	  icon = new fltk3::FileIcon("*", fltk3::FileIcon::DEVICE);
+	else if (!strcmp(mimetype + 6, "fifo"))
+	  icon = new fltk3::FileIcon("*", fltk3::FileIcon::FIFO);
+	else return;
+      } else {
+        icon = new fltk3::FileIcon(kde_to_fltk_pattern(pattern),
+                                fltk3::FileIcon::PLAIN);
+      }
+
+      icon->load(full_iconfilename);
+    }
+  }
+}
+
+
+//
+// 'kde_to_fltk_pattern()' - Convert a KDE pattern to a FLTK pattern.
+//
+
+static char *
+kde_to_fltk_pattern(const char *kdepattern) {
+  char	*pattern,
+	*patptr;
+
+
+  pattern = (char *)malloc(strlen(kdepattern) + 3);
+  strcpy(pattern, "{");
+  strcpy(pattern + 1, kdepattern);
+
+  if (pattern[strlen(pattern) - 1] == ';') pattern[strlen(pattern) - 1] = '\0';
+
+  strcat(pattern, "}");
+
+  for (patptr = pattern; *patptr; patptr ++) {
+    if (*patptr == ';') *patptr = '|';
+  }
+
+  return (pattern);
+}
+
+
+//
+// 'get_kde_val()' - Get a KDE value.
+//
+
+static char *
+get_kde_val(char       *str,
+            const char *key) {
+  while (*str == *key) {
+    str ++;
+    key ++;
+  }
+
+  if (*key == '\0' && *str == '=') {
+    if (str[strlen(str) - 1] == '\n') str[strlen(str) - 1] = '\0';
+
+    return (str + 1);
+  }
+
+  return ((char *)0);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_File_Icon2.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_File_Input.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_File_Input.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_File_Input.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,302 @@
+//
+// "$Id$"
+//
+// File_Input header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+// Original version Copyright 1998 by Curtis Edwards.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/FileInput.h>
+#include <fltk3/Window.h>
+#include <fltk3/draw.h>
+#include <fltk3/filename.h>
+#include <stdio.h>
+#include "flstring.h"
+
+
+//
+// Height of directory buttons...
+//
+
+#define DIR_HEIGHT	10
+
+
+//
+// Redraw bit for directory bar...
+//
+
+namespace fltk3 {
+  const unsigned int DAMAGE_BAR = 0x10;
+};
+
+
+/**
+  Creates a new fltk3::FileInput widget using the given position,
+  size, and label string. The default boxtype is fltk3::DOWN_BOX.
+  \param[in] X, Y, W, H position and size of the widget
+  \param[in] L widget label, default is no label
+*/
+fltk3::FileInput::FileInput(int X, int Y, int W, int H, const char *L)
+  : fltk3::Input(X, Y, W, H, L) {
+  buttons_[0] = 0;
+  errorcolor_ = fltk3::RED;
+  ok_entry_   = 1;
+  pressed_    = -1;
+
+  down_box(fltk3::UP_BOX);
+}
+
+/**
+  Draw directory buttons.
+*/
+void fltk3::FileInput::draw_buttons() {
+  int	i,					// Looping var
+	X;					// Current X position
+
+
+  if (damage() & (fltk3::DAMAGE_BAR | fltk3::DAMAGE_ALL)) {
+    update_buttons();
+  }
+
+  for (X = 0, i = 0; buttons_[i]; i ++)
+  {
+    if ((X + buttons_[i]) > xscroll()) {
+      if (X < xscroll()) {
+        draw_box(pressed_ == i ? fltk3::down(down_box()) : down_box(),
+                 x(), y(), X + buttons_[i] - xscroll(), DIR_HEIGHT, fltk3::GRAY);
+      } else if ((X + buttons_[i] - xscroll()) > w()) {
+	draw_box(pressed_ == i ? fltk3::down(down_box()) : down_box(),
+        	 x() + X - xscroll(), y(), w() - X + xscroll(), DIR_HEIGHT,
+		 fltk3::GRAY);
+      } else {
+        draw_box(pressed_ == i ? fltk3::down(down_box()) : down_box(),
+	         x() + X - xscroll(), y(), buttons_[i], DIR_HEIGHT, fltk3::GRAY);
+      }
+    }
+
+    X += buttons_[i];
+  }
+
+  if (X < w()) {
+    draw_box(pressed_ == i ? fltk3::down(down_box()) : down_box(),
+             x() + X - xscroll(), y(), w() - X + xscroll(), DIR_HEIGHT, fltk3::GRAY);
+  }
+}
+
+/**
+  Update the sizes of the directory buttons.
+*/
+void fltk3::FileInput::update_buttons() {
+  int		i;				// Looping var
+  const char	*start,				// Start of path component
+		*end;				// End of path component
+
+
+//  puts("update_buttons()");
+
+  // Set the current font & size...
+  fltk3::font(textfont(), textsize());
+
+  // Loop through the value string, setting widths...
+  for (i = 0, start = value();
+       start && i < (int)(sizeof(buttons_) / sizeof(buttons_[0]) - 1);
+       start = end, i ++) {
+//    printf("    start = \"%s\"\n", start);
+    if ((end = strchr(start, '/')) == NULL)
+#if defined(WIN32) || defined(__EMX__)
+      if ((end = strchr(start, '\\')) == NULL)
+#endif // WIN32 || __EMX__
+      break;
+
+    end ++;
+
+    buttons_[i] = (short)fltk3::width(start, end - start);
+    if (!i) buttons_[i] += fltk3::box_dx(box()) + 6;
+  }
+
+//  printf("    found %d components/buttons...\n", i);
+
+  buttons_[i] = 0;
+}
+
+
+/**
+  Sets the value of the widget given a new string value and its length.
+  Returns non 0 on success.
+  \param[in] str new string value
+  \param[in] len lengh of value
+*/
+int						// O - TRUE on success
+fltk3::FileInput::value(const char *str,		// I - New string value
+                     int        len) {		// I - Length of value
+  damage(fltk3::DAMAGE_BAR);
+  return Input::value(str,len);
+}
+
+
+/**
+  Sets the value of the widget given a new string value.
+  Returns non 0 on success.
+  \param[in] str new string value
+*/
+int						// O - TRUE on success
+fltk3::FileInput::value(const char *str) {		// I - New string value
+  damage(fltk3::DAMAGE_BAR);
+  return Input::value(str);
+}
+
+
+/**
+  Draws the file input widget
+*/
+void fltk3::FileInput::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  fltk3::Boxtype b = box();
+  if (damage() & (fltk3::DAMAGE_BAR | fltk3::DAMAGE_ALL)) draw_buttons();
+  // this flag keeps fltk3::Input_::drawtext from drawing a bogus box!
+  char must_trick_fl_input_ = 
+    fltk3::focus()!=this && !size() && !(damage()&fltk3::DAMAGE_ALL);
+  if ((damage() & fltk3::DAMAGE_ALL) || must_trick_fl_input_) 
+    draw_box(b,x(),y()+DIR_HEIGHT,w(),h()-DIR_HEIGHT,color());
+  if (!must_trick_fl_input_) 
+    Input_::drawtext(x()+fltk3::box_dx(b)+3, y()+fltk3::box_dy(b)+DIR_HEIGHT,
+		        w()-fltk3::box_dw(b)-6, h()-fltk3::box_dh(b)-DIR_HEIGHT);
+}
+
+
+
+/**
+  Handle events in the widget.
+  Return non zero if event is handled.
+  \param[in] event
+*/
+int						// O - TRUE if we handled event
+fltk3::FileInput::handle(int event) 		// I - Event
+{
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+//  printf("handle(event = %d)\n", event);
+  static char inButtonBar = 0;
+
+  switch (event) {
+    case fltk3::MOVE :
+    case fltk3::ENTER :
+      if (active_r()) {
+	if (fltk3::event_y() < (y() + DIR_HEIGHT)) 
+          window()->cursor(fltk3::CURSOR_DEFAULT);
+	else 
+          window()->cursor(fltk3::CURSOR_INSERT);
+      }
+
+      return 1;
+
+    case fltk3::PUSH :
+      inButtonBar = (fltk3::event_y() < (y() + DIR_HEIGHT));
+    case fltk3::RELEASE :
+    case fltk3::DRAG :
+      if (inButtonBar) 
+        return handle_button(event);
+      else
+        return Input::handle(event);
+
+    default :
+      { fltk3::WidgetTracker wp(this);
+	if (Input::handle(event)) {
+	  if (wp.exists())
+	    damage(fltk3::DAMAGE_BAR);
+	  return 1;
+	}
+      }
+      return 0;
+  }
+}
+
+
+
+/**
+  Handles button events in the widget.
+  Return non zero if event is handled.
+  \param[in] event
+*/
+int						// O - TRUE if we handled event
+fltk3::FileInput::handle_button(int event)		// I - Event
+{
+  int		i,				// Looping var
+		X;				// Current X position
+  char		*start,				// Start of path component
+		*end;				// End of path component
+  char		newvalue[FLTK3_PATH_MAX];		// New value
+
+
+  // Figure out which button is being pressed...
+  for (X = 0, i = 0; buttons_[i]; i ++)
+  {
+    X += buttons_[i];
+
+    if (X > xscroll() && fltk3::event_x() < (x() + X - xscroll())) break;
+  }
+
+//  printf("handle_button(event = %d), button = %d\n", event, i);
+
+  // Redraw the directory bar...
+  if (event == fltk3::RELEASE) pressed_ = -1;
+  else pressed_ = (short)i;
+
+  window()->make_current();
+  draw_buttons();
+
+  // Return immediately if the user is clicking on the last button or
+  // has not released the mouse button...
+  if (!buttons_[i] || event != fltk3::RELEASE) return 1;
+
+  // Figure out where to truncate the path...
+  strlcpy(newvalue, value(), sizeof(newvalue));
+
+  for (start = newvalue, end = start; start && i >= 0; start = end, i --) {
+//    printf("    start = \"%s\"\n", start);
+    if ((end = strchr(start, '/')) == NULL)
+#if defined(WIN32) || defined(__EMX__)
+      if ((end = strchr(start, '\\')) == NULL)
+#endif // WIN32 || __EMX__
+      break;
+
+    end ++;
+  }
+
+  if (i < 0) {
+    // Found the end; truncate the value and update the buttons...
+    *start = '\0';
+    value(newvalue, start - newvalue);
+
+    // Then do the callbacks, if necessary...
+    set_changed();
+    if (when() & (fltk3::WHEN_CHANGED|fltk3::WHEN_RELEASE) ) do_callback();
+  }
+
+  return 1;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_File_Input.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Font.H
===================================================================
--- branches/branch-3.0/src/core/Fl_Font.H	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Font.H	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,122 @@
+//
+// "$Id$"
+//
+// Font definitions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Two internal fltk data structures:
+//
+// Fl_Fontdesc: an entry into the fltk3::font() table.  There is one of these
+// for each fltk font number.
+//
+#ifndef FL_FONT_
+#define FL_FONT_
+
+#include <config.h>
+
+#  if USE_XFT
+typedef struct _XftFont XftFont;
+#  elif !defined(WIN32) && !defined(__APPLE__)
+#    include <fltk3/Xutf8.h>
+#  endif // USE_XFT
+
+/**
+   This a structure for an actual system font, with junk to
+   help choose it and info on character sizes.  Each Fl_Fontdesc has a
+   linked list of these.  These are created the first time each system
+   font/size combination is used.
+*/
+class Fl_Font_Descriptor {
+public:
+  /** linked list for this Fl_Fontdesc */
+  Fl_Font_Descriptor *next;	
+  fltk3::Fontsize size; /**< font size */
+#ifndef FLTK3_DOXYGEN // don't bother with platorm dependant details in the doc. 
+#  ifdef WIN32
+  HFONT fid;
+  int *width[64];
+  TEXTMETRIC metr;
+  int angle;
+  FLTK3_EXPORT Fl_Font_Descriptor(const char* fontname, fltk3::Fontsize size);
+#  elif defined(__APPLE_QUARTZ__)
+  FLTK3_EXPORT Fl_Font_Descriptor(const char* fontname, fltk3::Fontsize size);
+  ATSUTextLayout layout;
+#     if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  CTFontRef fontref;
+  // the unicode span is divided in 512 blocks of 128 characters
+  float *width[512]; // array of arrays of character widths
+#     endif
+  ATSUStyle style;
+  short ascent, descent, q_width;
+  char *q_name;
+#  elif USE_XFT
+  XftFont* font;
+  //const char* encoding;
+  int angle;
+  FLTK3_EXPORT Fl_Font_Descriptor(const char* xfontname, fltk3::Fontsize size, int angle);
+#  else
+  XUtf8FontStruct* font;	// X UTF-8 font information
+  FLTK3_EXPORT Fl_Font_Descriptor(const char* xfontname);
+#  endif
+#  if HAVE_GL
+  unsigned int listbase;// base of display list, 0 = none
+#ifndef __APPLE_QUARTZ__
+  char glok[64];
+#endif // __APPLE_QUARTZ__
+#  endif // HAVE_GL
+
+  FLTK3_EXPORT ~Fl_Font_Descriptor();
+
+#endif // FLTK3_DOXYGEN
+};
+
+//extern FLTK3_EXPORT Fl_Font_Descriptor *fltk3::fontsize; // the currently selected one
+
+struct Fl_Fontdesc {
+  const char *name;
+  char fontname[128];	// "Pretty" font name
+  Fl_Font_Descriptor *first;	// linked list of sizes of this style
+#  ifndef WIN32
+  char **xlist;		// matched X font names
+  int n;		// size of xlist, negative = don't free xlist!
+#  endif
+};
+
+namespace fltk3 {
+  extern FLTK3_EXPORT Fl_Fontdesc *fonts; // the table
+}
+
+#  ifndef WIN32
+// functions for parsing X font names:
+namespace fltk3 {
+  FLTK3_EXPORT const char* font_word(const char *p, int n);
+}
+FLTK3_EXPORT char *fl_find_fontsize(char *name);
+#  endif
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Font.H
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_GDI_Printer.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_GDI_Printer.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_GDI_Printer.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,285 @@
+//
+// "$Id$"
+//
+// Support for WIN32 printing for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifdef WIN32
+#include <fltk3/Printer.h>
+
+
+#include <fltk3/ask.h>
+#include <fltk3/math.h>
+
+extern HWND fl_window;
+
+fltk3::SystemPrinter::SystemPrinter(void) : fltk3::PagedDevice() {
+  hPr = NULL;
+  driver(fltk3::DisplayDevice::display_device()->driver());
+}
+
+fltk3::SystemPrinter::~SystemPrinter(void) {
+  if (hPr) end_job();
+}
+
+static void WIN_SetupPrinterDeviceContext(HDC prHDC)
+{
+  if ( !prHDC ) return;
+  
+  fl_window = 0;
+  fl_gc = prHDC;
+  SetGraphicsMode(prHDC, GM_ADVANCED); // to allow for rotations
+  SetMapMode(prHDC, MM_ANISOTROPIC);
+  SetTextAlign(prHDC, TA_BASELINE|TA_LEFT);
+  SetBkMode(prHDC, TRANSPARENT);	
+  // this matches 720 logical units to the number of device units in 10 inches of paper
+  // thus the logical unit is the point (= 1/72 inch)
+  SetWindowExtEx(prHDC, 720, 720, NULL);
+  SetViewportExtEx(prHDC, 10*GetDeviceCaps(prHDC, LOGPIXELSX), 10*GetDeviceCaps(prHDC, LOGPIXELSY), NULL);
+}
+
+
+int fltk3::SystemPrinter::start_job (int pagecount, int *frompage, int *topage)
+// returns 0 iff OK
+{
+  DWORD       commdlgerr;
+  DOCINFO     di;
+  char        docName [256];
+  int err = 0;
+  
+  abortPrint = FALSE;
+  memset (&pd, 0, sizeof (PRINTDLG));
+  pd.lStructSize = sizeof (PRINTDLG);
+  pd.hwndOwner = GetForegroundWindow();
+  pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE | PD_NOSELECTION;
+  pd.nMinPage = 1;
+  pd.nMaxPage = pagecount;
+  if (PrintDlg (&pd) != 0) {
+    hPr = pd.hDC;
+    if (hPr != NULL) {
+      strcpy (docName, "FLTK");
+      memset(&di, 0, sizeof(DOCINFO));
+      di.cbSize = sizeof (DOCINFO);
+      di.lpszDocName = (LPCSTR) docName;
+      prerr = StartDoc (hPr, &di);
+      if (prerr < 1) {
+	abortPrint = TRUE;
+	//fltk3::alert ("StartDoc error %d", prerr);
+	err = 1;
+      }
+    } else {
+      commdlgerr = CommDlgExtendedError ();
+      fltk3::alert ("Unable to create print context, error %lu",
+		(unsigned long) commdlgerr);
+      err = 1;
+    }
+  } else {
+    err = 1;
+  }
+  if(!err) {
+    if((pd.Flags & PD_PAGENUMS) != 0 ) {
+      if (frompage) *frompage = pd.nFromPage;
+      if (topage) *topage = pd.nToPage;
+    }
+    else {
+      if (frompage) *frompage = 1;
+      if (topage) *topage = pagecount;
+    }
+    x_offset = 0;
+    y_offset = 0;
+    WIN_SetupPrinterDeviceContext (hPr);
+    gc = (void *)fl_gc;
+    this->set_current();
+  }
+  return err;
+}
+
+void fltk3::SystemPrinter::end_job (void)
+{
+  fltk3::DisplayDevice::display_device()->set_current();
+  if (hPr != NULL) {
+    if (! abortPrint) {
+      prerr = EndDoc (hPr);
+      if (prerr < 0) {
+	fltk3::alert ("EndDoc error %d", prerr);
+      }
+    }
+    DeleteDC (hPr);
+    if (pd.hDevMode != NULL) {
+      GlobalFree (pd.hDevMode);
+    }
+    if (pd.hDevNames != NULL) {
+      GlobalFree (pd.hDevNames);
+    }
+  }
+  hPr = NULL;
+}
+
+void fltk3::SystemPrinter::absolute_printable_rect(int *x, int *y, int *w, int *h)
+{
+  POINT         physPageSize;
+  POINT         pixelsPerInch;
+    
+  if (hPr == NULL) return;
+  SetWindowOrgEx(fl_gc, 0, 0, NULL);
+  
+  physPageSize.x = GetDeviceCaps(hPr, HORZRES);
+  physPageSize.y = GetDeviceCaps(hPr, VERTRES);
+  DPtoLP(hPr, &physPageSize, 1);
+  *w = physPageSize.x + 1;
+  *h = physPageSize.y + 1;
+  pixelsPerInch.x = GetDeviceCaps(hPr, LOGPIXELSX);
+  pixelsPerInch.y = GetDeviceCaps(hPr, LOGPIXELSY);
+  DPtoLP(hPr, &pixelsPerInch, 1);
+  left_margin = (pixelsPerInch.x / 4);
+  *w -= (pixelsPerInch.x / 2);
+  top_margin = (pixelsPerInch.y / 4);
+  *h -= (pixelsPerInch.y / 2);
+  
+  *x = left_margin;
+  *y = top_margin;
+  origin(x_offset, y_offset);
+}
+
+void fltk3::SystemPrinter::margins(int *left, int *top, int *right, int *bottom)
+{
+  int x, y, w, h;
+  absolute_printable_rect(&x, &y, &w, &h);
+  if (left) *left = x;
+  if (top) *top = y;
+  if (right) *right = x;
+  if (bottom) *bottom = y;
+}
+
+int fltk3::SystemPrinter::printable_rect(int *w, int *h)
+{
+  int x, y;
+  absolute_printable_rect(&x, &y, w, h);
+  return 0;
+}
+
+int fltk3::SystemPrinter::start_page (void)
+{
+  int  rsult, w, h;
+  
+  rsult = 0;
+  if (hPr != NULL) {
+    WIN_SetupPrinterDeviceContext (hPr);
+    prerr = StartPage (hPr);
+    if (prerr < 0) {
+      fltk3::alert ("StartPage error %d", prerr);
+      rsult = 1;
+    }
+    printable_rect(&w, &h);
+    origin(0, 0);
+    fltk3::clip_region(0);
+    gc = (void *)fl_gc;
+  }
+  return rsult;
+}
+
+void fltk3::SystemPrinter::origin (int deltax, int deltay)
+{
+  SetWindowOrgEx(fl_gc, - left_margin - deltax, - top_margin - deltay, NULL);
+  x_offset = deltax;
+  y_offset = deltay;
+}
+
+void fltk3::SystemPrinter::scale (float scalex, float scaley)
+{
+  if (scaley == 0.) scaley = scalex;
+  int w, h;
+  SetWindowExtEx(fl_gc, (int)(720 / scalex + 0.5), (int)(720 / scaley + 0.5), NULL);
+  printable_rect(&w, &h);
+  origin(0, 0);
+}
+
+void fltk3::SystemPrinter::rotate (float rot_angle)
+{
+  XFORM mat;
+  float angle;
+  angle = - rot_angle * M_PI / 180.;
+  mat.eM11 = cos(angle);
+  mat.eM12 = sin(angle);
+  mat.eM21 = - mat.eM12;
+  mat.eM22 = mat.eM11;
+  mat.eDx = mat.eDy = 0;
+  SetWorldTransform(fl_gc, &mat);
+}
+
+int fltk3::SystemPrinter::end_page (void)
+{
+  int  rsult;
+  
+  rsult = 0;
+  if (hPr != NULL) {
+    prerr = EndPage (hPr);
+    if (prerr < 0) {
+      abortPrint = TRUE;
+      fltk3::alert ("EndPage error %d", prerr);
+      rsult = 1;
+    }
+  }
+  gc = NULL;
+  return rsult;
+}
+
+static int translate_stack_depth = 0;
+const int translate_stack_max = 5;
+static int translate_stack_x[translate_stack_max];
+static int translate_stack_y[translate_stack_max];
+
+static void do_translate(int x, int y)
+{
+  XFORM tr;
+  tr.eM11 = tr.eM22 = 1;
+  tr.eM12 = tr.eM21 = 0;
+  tr.eDx =  x;
+  tr.eDy =  y;
+  ModifyWorldTransform(fl_gc, &tr, MWT_LEFTMULTIPLY);
+}
+
+void fltk3::SystemPrinter::translate (int x, int y)
+{
+  do_translate(x, y);
+  if (translate_stack_depth < translate_stack_max) {
+    translate_stack_x[translate_stack_depth] = x;
+    translate_stack_y[translate_stack_depth] = y;
+    translate_stack_depth++;
+    }
+}
+
+void fltk3::SystemPrinter::untranslate (void)
+{
+  if (translate_stack_depth > 0) {
+    translate_stack_depth--;
+    do_translate( - translate_stack_x[translate_stack_depth], - translate_stack_y[translate_stack_depth] );
+    }
+}
+
+#endif // WIN32
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_GDI_Printer.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_GIF_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_GIF_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_GIF_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,390 @@
+//
+// "$Id$"
+//
+// fltk3::GIFImage routines.
+//
+// Copyright 1997-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/run.h>
+#include <fltk3/GIFImage.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+
+// Read a .gif file and convert it to a "xpm" format (actually my
+// modified one with compressed colormaps).
+
+// Extensively modified from original code for gif2ras by
+// Patrick J. Naughton of Sun Microsystems.  The original
+// copyright notice follows:
+
+/* gif2ras.c - Converts from a Compuserve GIF (tm) image to a Sun Raster image.
+ *
+ * Copyright (c) 1988 by Patrick J. Naughton
+ *
+ * Author: Patrick J. Naughton
+ * naughton@wind.sun.com
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Comments and additions should be sent to the author:
+ *
+ *                     Patrick J. Naughton
+ *                     Sun Microsystems, Inc.
+ *                     2550 Garcia Ave, MS 14-40
+ *                     Mountain View, CA 94043
+ *                     (415) 336-1080
+ */
+
+typedef unsigned char uchar;
+
+#define NEXTBYTE (uchar)getc(GifFile)
+#define GETSHORT(var) var = NEXTBYTE; var += NEXTBYTE << 8
+
+/**  
+  The constructor loads the named GIF image.
+  <P>The inherited destructor free all memory and server resources that are used by
+  the image.
+*/
+fltk3::GIFImage::GIFImage(const char *infname) : fltk3::Pixmap((char *const*)0) {
+  FILE *GifFile;	// File to read
+  char **new_data;	// Data array
+
+  if ((GifFile = fltk3::fopen(infname, "rb")) == NULL) {
+    fltk3::error("fltk3::GIFImage: Unable to open %s!", infname);
+    return;
+  }
+
+  {char b[6];
+  if (fread(b,1,6,GifFile)<6) {
+    fclose(GifFile);
+    return; /* quit on eof */
+  }
+  if (b[0]!='G' || b[1]!='I' || b[2] != 'F') {
+    fclose(GifFile);
+    fltk3::error("fltk3::GIFImage: %s is not a GIF file.\n", infname);
+    return;
+  }
+  if (b[3]!='8' || b[4]>'9' || b[5]!= 'a')
+    fltk3::warning("%s is version %c%c%c.",infname,b[3],b[4],b[5]);
+  }
+
+  int Width; GETSHORT(Width);
+  int Height; GETSHORT(Height);
+
+  uchar ch = NEXTBYTE;
+  char HasColormap = ((ch & 0x80) != 0);
+  int BitsPerPixel = (ch & 7) + 1;
+  int ColorMapSize = 1 << BitsPerPixel;
+  // int OriginalResolution = ((ch>>4)&7)+1;
+  // int SortedTable = (ch&8)!=0;
+  ch = NEXTBYTE; // Background Color index
+  ch = NEXTBYTE; // Aspect ratio is N/64
+
+  // Read in global colormap:
+  uchar transparent_pixel = 0;
+  char has_transparent = 0;
+  uchar Red[256], Green[256], Blue[256]; /* color map */
+  if (HasColormap) {
+    for (int i=0; i < ColorMapSize; i++) {	
+      Red[i] = NEXTBYTE;
+      Green[i] = NEXTBYTE;
+      Blue[i] = NEXTBYTE;
+    }
+  } else {
+    fltk3::warning("%s does not have a colormap.", infname);
+    for (int i = 0; i < ColorMapSize; i++)
+      Red[i] = Green[i] = Blue[i] = (uchar)(255 * i / (ColorMapSize-1));
+  }
+
+  int CodeSize;		/* Code size, init from GIF header, increases... */
+  char Interlace;
+
+  for (;;) {
+
+    int i = NEXTBYTE;
+    if (i<0) {
+      fclose(GifFile);
+      fltk3::error("fltk3::GIFImage: %s - unexpected EOF",infname); 
+      return;
+    }
+    int blocklen;
+
+    //  if (i == 0x3B) return 0;  eof code
+
+    if (i == 0x21) {		// a "gif extension"
+
+      ch = NEXTBYTE;
+      blocklen = NEXTBYTE;
+
+      if (ch==0xF9 && blocklen==4) { // Netscape animation extension
+
+	char bits;
+	bits = NEXTBYTE;
+	getc(GifFile); getc(GifFile); // GETSHORT(delay);
+	transparent_pixel = NEXTBYTE;
+	if (bits & 1) has_transparent = 1;
+	blocklen = NEXTBYTE;
+
+      } else if (ch == 0xFF) { // Netscape repeat count
+	;
+
+      } else if (ch != 0xFE) { //Gif Comment
+	fltk3::warning("%s: unknown gif extension 0x%02x.", infname, ch);
+      }
+    } else if (i == 0x2c) {	// an image
+
+      ch = NEXTBYTE; ch = NEXTBYTE; // GETSHORT(x_position);
+      ch = NEXTBYTE; ch = NEXTBYTE; // GETSHORT(y_position);
+      GETSHORT(Width);
+      GETSHORT(Height);
+      ch = NEXTBYTE;
+      Interlace = ((ch & 0x40) != 0);
+      if (ch&0x80) { 
+	// read local color map
+	int n = 2<<(ch&7);
+	for (i=0; i < n; i++) {	
+	  Red[i] = NEXTBYTE;
+	  Green[i] = NEXTBYTE;
+	  Blue[i] = NEXTBYTE;
+	}
+      }
+      CodeSize = NEXTBYTE+1;
+      break; // okay, this is the image we want
+    } else {
+      fltk3::warning("%s: unknown gif code 0x%02x", infname, i);
+      blocklen = 0;
+    }
+
+    // skip the data:
+    while (blocklen>0) {while (blocklen--) {ch = NEXTBYTE;} blocklen=NEXTBYTE;}
+  }
+
+  if (BitsPerPixel >= CodeSize)
+  {
+    // Workaround for broken GIF files...
+    BitsPerPixel = CodeSize - 1;
+    ColorMapSize = 1 << BitsPerPixel;
+  }
+
+  uchar *Image = new uchar[Width*Height];
+
+  int YC = 0, Pass = 0; /* Used to de-interlace the picture */
+  uchar *p = Image;
+  uchar *eol = p+Width;
+
+  int InitCodeSize = CodeSize;
+  int ClearCode = (1 << (CodeSize-1));
+  int EOFCode = ClearCode + 1;
+  int FirstFree = ClearCode + 2;
+  int FinChar = 0;
+  int ReadMask = (1<<CodeSize) - 1;
+  int FreeCode = FirstFree;
+  int OldCode = ClearCode;
+
+  // tables used by LZW decompresser:
+  short int Prefix[4096];
+  uchar Suffix[4096];
+
+  int blocklen = NEXTBYTE;
+  uchar thisbyte = NEXTBYTE; blocklen--;
+  int frombit = 0;
+
+  for (;;) {
+
+/* Fetch the next code from the raster data stream.  The codes can be
+ * any length from 3 to 12 bits, packed into 8-bit bytes, so we have to
+ * maintain our location as a pointer and a bit offset.
+ * In addition, gif adds totally useless and annoying block counts
+ * that must be correctly skipped over. */
+    int CurCode = thisbyte;
+    if (frombit+CodeSize > 7) {
+      if (blocklen <= 0) {
+	blocklen = NEXTBYTE;
+	if (blocklen <= 0) break;
+      }
+      thisbyte = NEXTBYTE; blocklen--;
+      CurCode |= thisbyte<<8;
+    }
+    if (frombit+CodeSize > 15) {
+      if (blocklen <= 0) {
+	blocklen = NEXTBYTE;
+	if (blocklen <= 0) break;
+      }
+      thisbyte = NEXTBYTE; blocklen--;
+      CurCode |= thisbyte<<16;
+    }
+    CurCode = (CurCode>>frombit)&ReadMask;
+    frombit = (frombit+CodeSize)%8;
+
+    if (CurCode == ClearCode) {
+      CodeSize = InitCodeSize;
+      ReadMask = (1<<CodeSize) - 1;
+      FreeCode = FirstFree;
+      OldCode = ClearCode;
+      continue;
+    }
+
+    if (CurCode == EOFCode) break;
+
+    uchar OutCode[1025]; // temporary array for reversing codes
+    uchar *tp = OutCode;
+    int i;
+    if (CurCode < FreeCode) i = CurCode;
+    else if (CurCode == FreeCode) {*tp++ = (uchar)FinChar; i = OldCode;}
+    else {fltk3::error("fltk3::GIFImage: %s - LZW Barf!", infname); break;}
+
+    while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];}
+    *tp++ = FinChar = i;
+    do {
+      *p++ = *--tp;
+      if (p >= eol) {
+	if (!Interlace) YC++;
+	else switch (Pass) {
+	case 0: YC += 8; if (YC >= Height) {Pass++; YC = 4;} break;
+	case 1: YC += 8; if (YC >= Height) {Pass++; YC = 2;} break;
+	case 2: YC += 4; if (YC >= Height) {Pass++; YC = 1;} break;
+	case 3: YC += 2; break;
+	}
+	if (YC>=Height) YC=0; /* cheap bug fix when excess data */
+	p = Image + YC*Width;
+	eol = p+Width;
+      }
+    } while (tp > OutCode);
+
+    if (OldCode != ClearCode) {
+      Prefix[FreeCode] = (short)OldCode;
+      Suffix[FreeCode] = FinChar;
+      FreeCode++;
+      if (FreeCode > ReadMask) {
+	if (CodeSize < 12) {
+	  CodeSize++;
+	  ReadMask = (1 << CodeSize) - 1;
+	}
+	else FreeCode--;
+      }
+    }
+    OldCode = CurCode;
+  }
+
+  // We are done reading the file, now convert to xpm:
+
+  // allocate line pointer arrays:
+  w(Width);
+  h(Height);
+  d(1);
+  new_data = new char*[Height+2];
+
+  // transparent pixel must be zero, swap if it isn't:
+  if (has_transparent && transparent_pixel != 0) {
+    // swap transparent pixel with zero
+    p = Image+Width*Height;
+    while (p-- > Image) {
+      if (*p==transparent_pixel) *p = 0;
+      else if (!*p) *p = transparent_pixel;
+    }
+    uchar t;
+    t                        = Red[0];
+    Red[0]                   = Red[transparent_pixel];
+    Red[transparent_pixel]   = t;
+
+    t                        = Green[0];
+    Green[0]                 = Green[transparent_pixel];
+    Green[transparent_pixel] = t;
+
+    t                        = Blue[0];
+    Blue[0]                  = Blue[transparent_pixel];
+    Blue[transparent_pixel]  = t;
+  }
+
+  // find out what colors are actually used:
+  uchar used[256]; uchar remap[256];
+  int i;
+  for (i = 0; i < ColorMapSize; i++) used[i] = 0;
+  p = Image+Width*Height;
+  while (p-- > Image) used[*p] = 1;
+
+  // remap them to start with printing characters:
+  int base = has_transparent && used[0] ? ' ' : ' '+1;
+  int numcolors = 0;
+  for (i = 0; i < ColorMapSize; i++) if (used[i]) {
+    remap[i] = (uchar)(base++);
+    numcolors++;
+  }
+
+  // write the first line of xpm data (use suffix as temp array):
+  int length = sprintf((char*)(Suffix),
+		       "%d %d %d %d",Width,Height,-numcolors,1);
+  new_data[0] = new char[length+1];
+  strcpy(new_data[0], (char*)Suffix);
+
+  // write the colormap
+  new_data[1] = (char*)(p = new uchar[4*numcolors]);
+  for (i = 0; i < ColorMapSize; i++) if (used[i]) {
+    *p++ = remap[i];
+    *p++ = Red[i];
+    *p++ = Green[i];
+    *p++ = Blue[i];
+  }
+
+  // remap the image data:
+  p = Image+Width*Height;
+  while (p-- > Image) *p = remap[*p];
+
+  // split the image data into lines:
+  for (i=0; i<Height; i++) {
+    new_data[i+2] = new char[Width+1];
+    memcpy(new_data[i + 2], (char*)(Image + i*Width), Width);
+    new_data[i + 2][Width] = 0;
+  }
+
+  data((const char **)new_data, Height + 2);
+  alloc_data = 1;
+
+  delete[] Image;
+
+  fclose(GifFile);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_GIF_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Gl_Choice.H
===================================================================
--- branches/branch-3.0/src/core/Fl_Gl_Choice.H	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Gl_Choice.H	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,129 @@
+//
+// "$Id$"
+//
+// OpenGL definitions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Internal interface to set up OpenGL.
+//
+// A "fltk3::GlChoice" is created from an OpenGL mode and holds information
+// necessary to create a window (on X) and to create an OpenGL "context"
+// (on both X and Win32).
+//
+// fl_create_gl_context takes a window (necessary only on Win32) and an
+// fltk3::GlChoice and returns a new OpenGL context. All contexts share
+// display lists with each other.
+//
+// On X another fl_create_gl_context is provided to create it for any
+// X visual.
+//
+// fl_set_gl_context makes the given OpenGL context current and makes
+// it draw into the passed window. It tracks the current one context
+// to avoid calling the context switching code when the same context
+// is used, though it is a mystery to me why the GLX/WGL libraries
+// don't do this themselves...
+//
+// fl_no_gl_context clears that cache so the next fl_set_gl_context is
+// guaranteed to work.
+//
+// fl_delete_gl_context destroys the context.
+//
+// This code is used by fltk3::GlWindow, gl_start(), and gl_visual()
+
+#ifndef Fl_Gl_Choice_H
+#define Fl_Gl_Choice_H
+
+// Warning: whatever GLContext is defined to must take exactly the same
+// space in a structure as a void*!!!
+#ifdef WIN32
+#  include <fltk3/gl.h>
+#  define GLContext HGLRC
+#elif defined(__APPLE_QUARTZ__)
+// warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+#  include <OpenGL/gl.h>
+#  include <AGL/agl.h>
+#  define GLContext AGLContext
+#else
+#  include <GL/glx.h>
+#  define GLContext GLXContext
+#endif
+
+namespace fltk3 {
+  
+  // Describes crap needed to create a GLContext.
+  class GlChoice {
+    int mode;
+    const int *alist;
+    fltk3::GlChoice *next;
+  public:
+#ifdef WIN32
+    int pixelformat;	// the visual to use
+    PIXELFORMATDESCRIPTOR pfd; // some wgl calls need this thing
+#elif defined(__APPLE_QUARTZ__)
+    // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+    AGLPixelFormat pixelformat;
+#else
+    XVisualInfo *vis;	// the visual to use
+    Colormap colormap;	// a colormap for that visual
+#endif
+    // Return one of these structures for a given gl mode.
+    // The second argument is a glX attribute list, and is used if mode is
+    // zero.  This is not supported on Win32:
+    static fltk3::GlChoice *find(int mode, const int *);
+  };
+  
+  class Window;
+
+} // namespace
+
+
+#ifdef WIN32
+  
+  GLContext fl_create_gl_context(fltk3::Window*, const fltk3::GlChoice*, int layer=0);
+  
+#elif defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  
+  GLContext fl_create_gl_context(fltk3::Window*, const fltk3::GlChoice*, int layer=0);
+  
+#else
+  
+  GLContext fl_create_gl_context(XVisualInfo* vis);
+  
+  static inline
+  GLContext fl_create_gl_context(fltk3::Window*, const fltk3::GlChoice* g) {
+    return fl_create_gl_context(g->vis);
+  }
+  
+#endif
+  
+  void fl_set_gl_context(fltk3::Window*, GLContext);
+  void fl_no_gl_context();
+  void fl_delete_gl_context(GLContext);
+  
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Gl_Choice.H
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Gl_Choice.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Gl_Choice.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Gl_Choice.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,426 @@
+//
+// "$Id$"
+//
+// OpenGL visual selection code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#if HAVE_GL
+
+#  include <fltk3/run.h>
+#  include <fltk3/x.h>
+#  include <stdlib.h>
+#  include "Fl_Gl_Choice.H"
+#  include <fltk3/glDraw.h>
+#  include "flstring.h"
+#  include <fltk3/utf8.h>
+
+#  ifdef __APPLE__
+#    include <ApplicationServices/ApplicationServices.h>
+#    include <fltk3/Window.h>
+#  endif
+
+#  ifdef WIN32
+void fl_save_dc(HWND, HDC);
+#  endif
+
+static fltk3::GlChoice *first;
+
+// this assumes one of the two arguments is zero:
+// We keep the list system in Win32 to stay compatible and interpret
+// the list later...
+fltk3::GlChoice *fltk3::GlChoice::find(int m, const int *alistp) {
+  fltk3::GlChoice *g;
+  
+  for (g = first; g; g = g->next)
+    if (g->mode == m && g->alist == alistp) 
+      return g;
+
+#if defined(USE_X11)    
+  const int *blist;
+  int list[32];
+    
+  if (alistp)
+    blist = alistp;
+  else {
+    int n = 0;
+    if (m & fltk3::INDEX) {
+      list[n++] = GLX_BUFFER_SIZE;
+      list[n++] = 8; // glut tries many sizes, but this should work...
+    } else {
+      list[n++] = GLX_RGBA;
+      list[n++] = GLX_GREEN_SIZE;
+      list[n++] = (m & fltk3::RGB8) ? 8 : 1;
+      if (m & fltk3::ALPHA) {
+	list[n++] = GLX_ALPHA_SIZE;
+	list[n++] = (m & fltk3::RGB8) ? 8 : 1;
+      }
+      if (m & fltk3::ACCUM) {
+	list[n++] = GLX_ACCUM_GREEN_SIZE;
+	list[n++] = 1;
+	if (m & fltk3::ALPHA) {
+	  list[n++] = GLX_ACCUM_ALPHA_SIZE;
+	  list[n++] = 1;
+	}
+      }
+    }
+    if (m & fltk3::DOUBLE) {
+      list[n++] = GLX_DOUBLEBUFFER;
+    }
+    if (m & fltk3::DEPTH) {
+      list[n++] = GLX_DEPTH_SIZE; list[n++] = 1;
+    }
+    if (m & fltk3::STENCIL) {
+      list[n++] = GLX_STENCIL_SIZE; list[n++] = 1;
+    }
+    if (m & fltk3::STEREO) {
+      list[n++] = GLX_STEREO;
+    }
+#    if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
+    if (m & fltk3::MULTISAMPLE) {
+      list[n++] = GLX_SAMPLES_SGIS;
+      list[n++] = 4; // value Glut uses
+    }
+#    endif
+    list[n] = 0;
+    blist = list;
+  }
+    
+  fl_open_display();
+  XVisualInfo *visp = glXChooseVisual(fl_display, fl_screen, (int *)blist);
+  if (!visp) {
+#    if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
+    if (m&fltk3::MULTISAMPLE) return find(m&~fltk3::MULTISAMPLE,0);
+#    endif
+    return 0;
+  }
+
+#elif defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  const int *blist;
+  int list[32];
+   
+  if (alistp)
+    blist = alistp;
+  else {
+    int n = 0;
+    if (m & fltk3::INDEX) {
+      list[n++] = AGL_BUFFER_SIZE;
+      list[n++] = 8; // glut tries many sizes, but this should work...
+    } else {
+      list[n++] = AGL_RGBA;
+      list[n++] = AGL_GREEN_SIZE;
+      list[n++] = (m & fltk3::RGB8) ? 8 : 1;
+      if (m & fltk3::ALPHA) {
+        list[n++] = AGL_ALPHA_SIZE;
+        list[n++] = (m & fltk3::RGB8) ? 8 : 1;
+      }
+      if (m & fltk3::ACCUM) {
+        list[n++] = AGL_ACCUM_GREEN_SIZE;
+        list[n++] = 1;
+        if (m & fltk3::ALPHA) {
+          list[n++] = AGL_ACCUM_ALPHA_SIZE;
+          list[n++] = 1;
+        }
+      }
+    }
+    if (m & fltk3::DOUBLE) {
+      list[n++] = AGL_DOUBLEBUFFER;
+    }
+    if (m & fltk3::DEPTH) {
+      list[n++] = AGL_DEPTH_SIZE; list[n++] = 24;
+    }
+    if (m & fltk3::STENCIL) {
+      list[n++] = AGL_STENCIL_SIZE; list[n++] = 1;
+    }
+#    ifdef AGL_STEREO
+    if (m & fltk3::STEREO) {
+      list[n++] = AGL_STEREO;
+    }
+#    endif
+    list[n] = AGL_NONE;
+    blist = list;
+  }
+  fl_open_display();
+  AGLPixelFormat fmt = aglChoosePixelFormat(NULL, 0, (GLint*)blist);
+  if (!fmt) return 0;
+  
+#elif defined(WIN32)
+
+  // Replacement for ChoosePixelFormat() that finds one with an overlay
+  // if possible:
+  if (!fl_gc) fl_GetDC(0);
+  int pixelformat = 0;
+  PIXELFORMATDESCRIPTOR chosen_pfd;
+  for (int i = 1; ; i++) {
+    PIXELFORMATDESCRIPTOR pfd;
+    if (!DescribePixelFormat(fl_gc, i, sizeof(pfd), &pfd)) break;
+    // continue if it does not satisfy our requirements:
+    if (~pfd.dwFlags & (PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL)) continue;
+    if (pfd.iPixelType != ((m&fltk3::INDEX)?PFD_TYPE_COLORINDEX:PFD_TYPE_RGBA)) continue;
+    if ((m & fltk3::ALPHA) && !pfd.cAlphaBits) continue;
+    if ((m & fltk3::ACCUM) && !pfd.cAccumBits) continue;
+    if ((!(m & fltk3::DOUBLE)) != (!(pfd.dwFlags & PFD_DOUBLEBUFFER))) continue;
+    if ((!(m & fltk3::STEREO)) != (!(pfd.dwFlags & PFD_STEREO))) continue;
+    if ((m & fltk3::DEPTH) && !pfd.cDepthBits) continue;
+    if ((m & fltk3::STENCIL) && !pfd.cStencilBits) continue;
+    // see if better than the one we have already:
+    if (pixelformat) {
+      // offering non-generic rendering is better (read: hardware accelleration)
+      if (!(chosen_pfd.dwFlags & PFD_GENERIC_FORMAT) &&
+          (pfd.dwFlags & PFD_GENERIC_FORMAT)) continue;
+      // offering overlay is better:
+      else if (!(chosen_pfd.bReserved & 15) && (pfd.bReserved & 15)) {}
+      // otherwise more bit planes is better:
+      else if (chosen_pfd.cColorBits > pfd.cColorBits) continue;
+      else if (chosen_pfd.cDepthBits > pfd.cDepthBits) continue;
+    }
+    pixelformat = i;
+    chosen_pfd = pfd;
+  }
+  //printf("Chosen pixel format is %d\n", pixelformat);
+  if (!pixelformat) return 0;
+#else
+# error platform unsupported
+#endif
+
+  g = new fltk3::GlChoice;
+  g->mode = m;
+  g->alist = alistp;
+  g->next = first;
+  first = g;
+
+#if defined(USE_X11)
+  g->vis = visp;
+
+  if (/*MaxCmapsOfScreen(ScreenOfDisplay(fl_display,fl_screen))==1 && */
+      visp->visualid == fl_visual->visualid &&
+      !fltk3::getenv("MESA_PRIVATE_CMAP"))
+    g->colormap = fl_colormap;
+  else
+    g->colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
+				  visp->visual, AllocNone);
+#  elif defined(WIN32)
+  g->pixelformat = pixelformat;
+  g->pfd = chosen_pfd;
+#  elif defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  g->pixelformat = fmt;
+#  else
+#    error unsupported platform
+#  endif
+
+  return g;
+}
+
+static GLContext *context_list = 0;
+static int nContext = 0, NContext = 0;
+
+static void add_context(GLContext ctx) {
+  if (!ctx) return;
+  if (nContext==NContext) {
+    if (!NContext) NContext = 8;
+    NContext *= 2;
+    context_list = (GLContext*)realloc(
+      context_list, NContext*sizeof(GLContext));
+  }
+  context_list[nContext++] = ctx;
+}
+
+static void del_context(GLContext ctx) {
+  int i; 
+  for (i=0; i<nContext; i++) {
+    if (context_list[i]==ctx) {
+      memmove(context_list+i, context_list+i+1,
+        (nContext-i-1) * sizeof(GLContext));
+      context_list[--nContext] = 0;
+      break;
+    }
+  }
+  if (!nContext) gl_remove_displaylist_fonts();
+}
+
+#if defined(USE_X11)
+
+GLContext fl_create_gl_context(XVisualInfo* vis) {
+  GLContext shared_ctx = 0;
+  if (context_list && nContext) shared_ctx = context_list[0];
+  GLContext context = glXCreateContext(fl_display, vis, shared_ctx, 1);
+  if (context)
+    add_context(context);
+  return context;
+}
+
+#elif defined(WIN32)
+
+GLContext fl_create_gl_context(fltk3::Window* window, const fltk3::GlChoice* g, int layer) {
+  Fl_X* i = Fl_X::i(window);
+  HDC hdc = i->private_dc;
+  if (!hdc) {
+    hdc = i->private_dc = GetDCEx(i->xid, 0, DCX_CACHE);
+    fl_save_dc(i->xid, hdc);
+    SetPixelFormat(hdc, g->pixelformat, (PIXELFORMATDESCRIPTOR*)(&g->pfd));
+#    if USE_COLORMAP
+    if (fl_palette) SelectPalette(hdc, fl_palette, FALSE);
+#    endif
+  }
+  GLContext context =
+    layer ? wglCreateLayerContext(hdc, layer) : wglCreateContext(hdc);
+  if (context) {
+    if (context_list && nContext) 
+      wglShareLists(context_list[0], context);
+    add_context(context);
+  }
+  return context;
+}
+
+#  elif defined(__APPLE_QUARTZ__)
+#if !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && __LP64__)
+static CGrafPtr fl_GetWindowPort(WindowRef window)
+{
+  typedef CGrafPtr (*wf)(WindowRef);
+  static wf f = NULL;
+  if ( ! f) f = (wf)Fl_X::get_carbon_function("GetWindowPort");
+  return (*f)(window);
+}
+#endif
+
+// warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+GLContext fl_create_gl_context(fltk3::Window* window, const fltk3::GlChoice* g, int layer) {
+  GLContext context, shared_ctx = 0;
+  if (context_list && nContext) shared_ctx = context_list[0];
+  context = aglCreateContext( g->pixelformat, shared_ctx);
+  if (!context) return 0;
+  add_context((GLContext)context);
+  if ( window->parent() ) {
+    int H = window->window()->h();
+    GLint rect[] = { window->x(), H-window->h()-window->y(), window->w(), window->h() };
+    aglSetInteger( (GLContext)context, AGL_BUFFER_RECT, rect );
+    aglEnable( (GLContext)context, AGL_BUFFER_RECT );
+  }
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#if __LP64__
+  // 64 bit version
+  aglSetWindowRef(context, Fl_X::i(window)->window_ref() );
+#else
+  // 32 bit version >= 10.5
+  if (aglSetWindowRef != NULL)
+    aglSetWindowRef(context, Fl_X::i(window)->window_ref() );
+  else
+    aglSetDrawable( context, fl_GetWindowPort( Fl_X::i(window)->window_ref() ) );
+#endif
+#else
+  // 32 bit version < 10.5
+  aglSetDrawable( context, fl_GetWindowPort( Fl_X::i(window)->window_ref() ) );
+#endif
+  return (context);
+}
+#  else
+#    error unsupported platform
+#  endif
+
+static GLContext cached_context;
+static fltk3::Window* cached_window;
+
+void fl_set_gl_context(fltk3::Window* w, GLContext context) {
+  if (context != cached_context || w != cached_window) {
+    cached_context = context;
+    cached_window = w;
+#  if defined(USE_X11)
+    glXMakeCurrent(fl_display, fl_xid(w), context);
+#  elif defined(WIN32)
+    wglMakeCurrent(Fl_X::i(w)->private_dc, context);
+#  elif defined(__APPLE_QUARTZ__)
+    // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+    if ( w->parent() ) { //: resize our GL buffer rectangle
+      int H = w->window()->h();
+      GLint rect[] = { w->x(), H-w->h()-w->y(), w->w(), w->h() };
+      aglSetInteger( context, AGL_BUFFER_RECT, rect );
+      aglEnable( context, AGL_BUFFER_RECT );
+    }
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#if __LP64__
+    // 64 bit version
+    aglSetWindowRef(context, Fl_X::i(w)->window_ref() );
+#else
+    // 32 bit version >= 10.5
+    if (aglSetWindowRef != NULL)
+      aglSetWindowRef(context, Fl_X::i(w)->window_ref() );
+    else
+      aglSetDrawable( context, fl_GetWindowPort( Fl_X::i(w)->window_ref() ) );
+#endif
+#else
+    // 32 bit version < 10.5
+    aglSetDrawable( context, fl_GetWindowPort( Fl_X::i(w)->window_ref() ) );
+#endif
+    aglSetCurrentContext(context);
+#  else
+#   error unsupported platform
+#  endif
+  }
+}
+
+void fl_no_gl_context() {
+  cached_context = 0;
+  cached_window = 0;
+#  if defined(USE_X11)
+  glXMakeCurrent(fl_display, 0, 0);
+#  elif defined(WIN32)
+  wglMakeCurrent(0, 0);
+#  elif defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  AGLContext ctx = aglGetCurrentContext();  
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  if (aglSetWindowRef != NULL)
+    { if(ctx) aglSetWindowRef(ctx, NULL ); }
+  else
+#endif
+  if(ctx) aglSetDrawable( ctx, NULL );
+  aglSetCurrentContext(0);
+#  else
+#    error unsupported platform
+#  endif
+}
+
+void fl_delete_gl_context(GLContext context) {
+  if (cached_context == context) fl_no_gl_context();
+#  if defined(USE_X11)
+  glXDestroyContext(fl_display, context);
+#  elif defined(WIN32)
+  wglDeleteContext(context);
+#  elif defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  aglDestroyContext( context );
+#  else
+#    error unsupported platform
+#  endif
+  del_context(context);
+}
+
+#endif // HAVE_GL
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Gl_Choice.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Gl_Device_Plugin.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Gl_Device_Plugin.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Gl_Device_Plugin.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,156 @@
+//
+// "$Id$"
+//
+// implementation of class Fl_Gl_Device_Plugin for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#include <fltk3/Printer.h>
+#include <fltk3/GlWindow.h>
+#include "Fl_Gl_Choice.H"
+#include <fltk3/run.h>
+#ifndef __APPLE__
+#include <fltk3/draw.h>
+#endif
+
+#if defined(__APPLE__)
+static void imgProviderReleaseData (void *info, const void *data, size_t size)
+{
+  free((void *)data);
+}
+#endif
+
+static void print_gl_window(fltk3::GlWindow *glw, int x, int y, int height)
+{
+#ifdef WIN32
+  HDC save_gc = fl_gc;
+  const int bytesperpixel = 3;
+#elif defined(__APPLE__)
+  CGContextRef save_gc = fl_gc;
+  const int bytesperpixel = 4;
+#else
+  _XGC *save_gc = fl_gc;
+  const int bytesperpixel = 3;
+#endif
+  fltk3::SurfaceDevice *save_surface = fltk3::SurfaceDevice::surface();
+  fl_gc = NULL;
+  fltk3::DisplayDevice::display_device()->set_current();
+#ifdef WIN32
+  fltk3::check();
+  fltk3::Window *win = (fltk3::Window*)glw;
+  while( win->window() ) win = win->window();
+  win->redraw();
+  fltk3::check();
+  glw->make_current();
+#else
+  glw->make_current();
+  glw->redraw();
+  glFlush();
+  fltk3::check();
+  glFinish();
+#endif
+  // Read OpenGL context pixels directly.
+  // For extra safety, save & restore OpenGL states that are changed
+  glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
+  glPixelStorei(GL_PACK_ALIGNMENT, 4); /* Force 4-byte alignment */
+  glPixelStorei(GL_PACK_ROW_LENGTH, 0);
+  glPixelStorei(GL_PACK_SKIP_ROWS, 0);
+  glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
+  // Read a block of pixels from the frame buffer
+  int mByteWidth = glw->w() * bytesperpixel;                
+  mByteWidth = (mByteWidth + 3) & ~3;    // Align to 4 bytes
+  uchar *baseAddress = (uchar*)malloc(mByteWidth * glw->h());
+  glReadPixels(0, 0, glw->w(), glw->h(), 
+#ifdef WIN32
+	       GL_RGB, GL_UNSIGNED_BYTE,
+#elif defined(__APPLE__)
+	       GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
+#else // FIXME Linux/Unix
+	       GL_RGB, GL_UNSIGNED_BYTE,
+#endif
+	       baseAddress);
+  glPopClientAttrib();
+  save_surface->set_current();
+  fl_gc = save_gc;
+#if defined(__APPLE__)
+// kCGBitmapByteOrder32Host and CGBitmapInfo are supposed to arrive with 10.4
+// but some 10.4 don't have kCGBitmapByteOrder32Host, so we play a little #define game
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
+#define kCGBitmapByteOrder32Host 0
+#define CGBitmapInfo CGImageAlphaInfo
+#elif ! defined(kCGBitmapByteOrder32Host)
+#ifdef __BIG_ENDIAN__
+#define kCGBitmapByteOrder32Host (4 << 12)
+#else    /* Little endian. */
+#define kCGBitmapByteOrder32Host (2 << 12)
+#endif
+#endif
+  CGColorSpaceRef cSpace = CGColorSpaceCreateDeviceRGB();
+  CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, baseAddress, mByteWidth * glw->h(), imgProviderReleaseData);
+  CGImageRef image = CGImageCreate(glw->w(), glw->h(), 8, 8*bytesperpixel, mByteWidth, cSpace, 
+				   (CGBitmapInfo)(kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host), 
+				   provider, NULL, false, kCGRenderingIntentDefault);
+  if(image == NULL) return;
+  CGContextSaveGState(fl_gc);
+  CGContextTranslateCTM(fl_gc, 0, height);
+  CGContextScaleCTM(fl_gc, 1.0f, -1.0f);
+  CGRect rect = { { x, height - y - glw->h() }, { glw->w(), glw->h() } };
+  Fl_X::q_begin_image(rect, 0, 0, glw->w(), glw->h());
+  CGContextDrawImage(fl_gc, rect, image);
+  Fl_X::q_end_image();
+  CGContextRestoreGState(fl_gc);
+  CGImageRelease(image);
+  CGColorSpaceRelease(cSpace);
+  CGDataProviderRelease(provider);  
+#else
+  fltk3::draw_image(baseAddress + (glw->h() - 1) * mByteWidth, x, y , glw->w(), glw->h(), bytesperpixel, - mByteWidth);
+  free(baseAddress);
+#endif // __APPLE__
+}
+
+/**
+ This class will make sure that OpenGL printing is available if fltk_gl
+ was linked to the program.
+ */
+class Fl_Gl_Device_Plugin : public fltk3::DevicePlugin {
+public:
+  Fl_Gl_Device_Plugin() : fltk3::DevicePlugin(name()) { }
+  virtual const char *name() { return "opengl.device.fltk.org"; }
+  virtual int print(fltk3::Widget *w, int x, int y, int height) {
+    fltk3::GlWindow *glw = w->as_gl_window();
+    if (!glw) return 0;
+    print_gl_window(glw, x, y, height);
+    return 1; 
+  }
+};
+
+static Fl_Gl_Device_Plugin Gl_Device_Plugin;
+
+// The purpose of this variable, used in fltk3::GlWindow.cxx, is only to force this file to be loaded
+// whenever fltk3::GlWindow.cxx is loaded, that is, whenever fltk_gl is.
+FLTK3_EXPORT int fl_gl_load_plugin = 0;
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Gl_Device_Plugin.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Gl_Overlay.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Gl_Overlay.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Gl_Overlay.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,248 @@
+//
+// "$Id$"
+//
+// OpenGL overlay code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#if HAVE_GL
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include "Fl_Gl_Choice.H"
+#include <fltk3/GlWindow.h>
+#include <stdlib.h>
+
+#if !HAVE_GL_OVERLAY
+
+int fltk3::GlWindow::can_do_overlay() {return 0;}
+
+void fltk3::GlWindow::make_overlay() {overlay = this;}
+
+#else
+
+// Methods on fltk3::GlWindow that create an overlay window.  Because
+// many programs don't need the overlay, this is separated into this
+// source file so it is not linked in if not used.
+
+// Under X this is done by creating another window, of class _Fl_Gl_Overlay
+// which is a subclass of fltk3::GlWindow except it uses the overlay planes.
+// A pointer to this is stored in the "overlay" pointer of the fltk3::GlWindow.
+
+// Under win32 another GLX context is created to draw into the overlay
+// and it is stored in the "overlay" pointer.
+
+// In both cases if overlay hardware is unavailable, the overlay is
+// "faked" by drawing into the main layers.  This is indicated by
+// setting overlay == this.
+
+#ifndef WIN32
+////////////////////////////////////////////////////////////////
+// X version
+
+extern XVisualInfo *fl_find_overlay_visual();
+extern XVisualInfo *fl_overlay_visual;
+extern Colormap fl_overlay_colormap;
+extern unsigned long fl_transparent_pixel;
+extern uchar fl_overlay;
+
+class _Fl_Gl_Overlay : public fltk3::GlWindow {
+  void flush();
+  void draw();
+public:
+  void show();
+  _Fl_Gl_Overlay(int x, int y, int w, int h) :
+    fltk3::GlWindow(x,y,w,h) {
+    set_flag(INACTIVE);
+  }
+};
+
+void _Fl_Gl_Overlay::flush() {
+  make_current();
+#ifdef BOXX_BUGS
+  // The BoXX overlay is broken and you must not call swap-buffers. This
+  // code will make it work, but we lose because machines that do support
+  // double-buffered overlays will blink when they don't have to
+  glDrawBuffer(GL_FRONT);
+  draw();
+#else
+  draw();
+  swap_buffers();
+#endif
+  glFlush();
+  valid(1);
+}
+
+void _Fl_Gl_Overlay::draw() {
+  if (!valid()) glClearIndex((GLfloat)fl_transparent_pixel);
+  if (damage() != fltk3::DAMAGE_EXPOSE) glClear(GL_COLOR_BUFFER_BIT);
+  fltk3::GlWindow *w = (fltk3::GlWindow *)parent();
+  uchar save_valid = w->valid();
+  w->valid(valid());
+  fl_overlay = 1;
+  w->draw_overlay();
+  fl_overlay = 0;
+  valid(w->valid());
+  w->valid(save_valid);
+}
+
+void _Fl_Gl_Overlay::show() {
+  if (!shown()) {
+    fl_background_pixel = int(fl_transparent_pixel);
+    Fl_X::make_xid(this, fl_overlay_visual, fl_overlay_colormap);
+    fl_background_pixel = -1;
+    // find the outermost window to tell wm about the colormap:
+    fltk3::Window *w = window();
+    for (;;) {fltk3::Window *w1 = w->window(); if (!w1) break; w = w1;}
+    XSetWMColormapWindows(fl_display, fl_xid(w), &(Fl_X::i(this)->xid), 1);
+    context(fl_create_gl_context(fl_overlay_visual), 1);
+    valid(0);
+  }
+  fltk3::GlWindow::show();
+}
+
+int fltk3::GlWindow::can_do_overlay() {
+  return fl_find_overlay_visual() != 0;
+}
+
+void fltk3::GlWindow::make_overlay() {
+  if (overlay) return;
+  if (can_do_overlay()) {
+    _Fl_Gl_Overlay* o = new _Fl_Gl_Overlay(0,0,w(),h());
+    overlay = o;
+    add(*o);
+    o->show();
+  } else {
+    overlay = this; // fake the overlay
+  }
+}
+
+#else
+////////////////////////////////////////////////////////////////
+// WIN32 version:
+
+//static COLORREF *palette;
+extern int fl_overlay_depth;
+
+void fltk3::GlWindow::make_overlay() {
+  if (overlay) return;
+
+  GLContext context = fl_create_gl_context(this, g, 1);
+  if (!context) {overlay = this; return;} // fake the overlay
+
+  HDC hdc = Fl_X::i(this)->private_dc;
+  overlay = context;
+  LAYERPLANEDESCRIPTOR pfd;
+  wglDescribeLayerPlane(hdc, g->pixelformat, 1, sizeof(pfd), &pfd);
+  if (!pfd.iPixelType) {
+    ; // full-color overlay
+  } else {
+    fl_overlay_depth = pfd.cColorBits; // used by gl_color()
+    if (fl_overlay_depth > 8) fl_overlay_depth = 8;
+    COLORREF palette[256];
+    int n = (1<<fl_overlay_depth)-1;
+    // copy all colors except #0 into the overlay palette:
+    for (int i = 0; i <= n; i++) {
+      uchar r,g,b; fltk3::get_color((fltk3::Color)i,r,g,b);
+      palette[i] = RGB(r,g,b);
+    }
+    // always provide black & white in the last 2 pixels:
+    if (fl_overlay_depth < 8) {
+      palette[n-1] = RGB(0,0,0);
+      palette[n] = RGB(255,255,255);
+    }
+    // and use it:
+    wglSetLayerPaletteEntries(hdc, 1, 1, n, palette+1);
+    wglRealizeLayerPalette(hdc, 1, TRUE);
+  }
+  valid(0);
+  return;
+}
+
+int fltk3::GlWindow::can_do_overlay() {
+  if (!g) {
+    g = fltk3::GlChoice::find(mode_,alist);
+    if (!g) return 0;
+  }
+  return (g->pfd.bReserved & 15) != 0;
+}
+
+////////////////////////////////////////////////////////////////
+#endif
+
+#endif
+
+void fltk3::GlWindow::redraw_overlay() {
+  if (!shown()) return;
+  make_overlay();
+#ifdef __APPLE__
+  redraw();
+#else
+#ifndef WIN32
+  if (overlay != this)
+    ((fltk3::GlWindow*)overlay)->redraw();
+  else
+#endif
+    damage(fltk3::DAMAGE_OVERLAY);
+#endif
+}
+
+void fltk3::GlWindow::make_overlay_current() {
+  make_overlay();
+#ifdef __APPLE__
+  // this is not very useful, but unfortunately, Apple decided
+  // that front buffer drawing can no longer (OS X 10.4) be 
+  // supported on their platforms.
+  make_current();
+#else
+#if HAVE_GL_OVERLAY
+  if (overlay != this) {
+#ifdef WIN32
+    fl_set_gl_context(this, (GLContext)overlay);
+//  if (fl_overlay_depth)
+//    wglRealizeLayerPalette(Fl_X::i(this)->private_dc, 1, TRUE);
+#else
+    ((fltk3::GlWindow*)overlay)->make_current();
+#endif
+  } else
+#endif
+    glDrawBuffer(GL_FRONT);
+#endif
+}
+/** Hides the window if it is not this window, does nothing in WIN32. */
+void fltk3::GlWindow::hide_overlay() {
+#if HAVE_GL_OVERLAY
+#ifdef WIN32
+  // nothing needs to be done?  Or should it be erased?
+#else
+  if (overlay && overlay!=this) ((fltk3::GlWindow*)overlay)->hide();
+#endif
+#endif
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Gl_Overlay.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Gl_Window.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Gl_Window.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Gl_Window.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,554 @@
+//
+// "$Id$"
+//
+// OpenGL window code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include "flstring.h"
+#if HAVE_GL
+
+extern int fl_gl_load_plugin;
+
+static int temp = fl_gl_load_plugin;
+
+#include <fltk3/Wrapper.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#ifdef __APPLE__
+#include <fltk3/gl.h>
+#endif
+#include "Fl_Gl_Choice.H"
+#include <fltk3/GlWindow.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+
+////////////////////////////////////////////////////////////////
+
+// The symbol SWAP_TYPE defines what is in the back buffer after doing
+// a glXSwapBuffers().
+
+// The OpenGl documentation says that the contents of the backbuffer
+// are "undefined" after glXSwapBuffers().  However, if we know what
+// is in the backbuffers then we can save a good deal of time.  For
+// this reason you can define some symbols to describe what is left in
+// the back buffer.
+
+// Having not found any way to determine this from glx (or wgl) I have
+// resorted to letting the user specify it with an environment variable,
+// GL_SWAP_TYPE, it should be equal to one of these symbols:
+
+// contents of back buffer after glXSwapBuffers():
+#define UNDEFINED 1 	// anything
+#define SWAP 2		// former front buffer (same as unknown)
+#define COPY 3		// unchanged
+#define NODAMAGE 4	// unchanged even by X expose() events
+
+static char SWAP_TYPE = 0 ; // 0 = determine it from environment variable
+
+////////////////////////////////////////////////////////////////
+
+/**  Returns non-zero if the hardware supports the given or current OpenGL  mode. */
+int fltk3::GlWindow::can_do(int a, const int *b) {
+  return fltk3::GlChoice::find(a,b) != 0;
+}
+
+void fltk3::GlWindow::show() {
+#if defined(__APPLE__)
+  int need_redraw = 0;
+#endif
+  if (!shown()) {
+    if (!g) {
+      g = fltk3::GlChoice::find(mode_,alist);
+
+      if (!g && (mode_ & fltk3::DOUBLE) == fltk3::SINGLE) {
+        g = fltk3::GlChoice::find(mode_ | fltk3::DOUBLE,alist);
+	if (g) mode_ |= fltk3::FAKE_SINGLE;
+      }
+
+      if (!g) {
+        fltk3::error("Insufficient GL support");
+	return;
+      }
+    }
+#if !defined(WIN32) && !defined(__APPLE__)
+    Fl_X::make_xid(this, g->vis, g->colormap);
+    if (overlay && overlay != this) ((fltk3::GlWindow*)overlay)->show();
+#elif defined(__APPLE__)
+	if( ! parent() ) need_redraw=1;
+#endif
+  }
+  Window::show();
+
+#ifdef __APPLE__
+  set_visible();
+  if(need_redraw) redraw();//necessary only after creation of a top-level GL window
+#endif /* __APPLE__ */
+}
+
+/**
+  The invalidate() method turns off valid() and is
+  equivalent to calling value(0).
+*/
+void fltk3::GlWindow::invalidate() {
+  valid(0);
+  context_valid(0);
+#ifndef WIN32
+  if (overlay) {
+    ((fltk3::GlWindow*)overlay)->valid(0);
+    ((fltk3::GlWindow*)overlay)->context_valid(0);
+  }
+#endif
+}
+
+/**
+  See const int fltk3::GlWindow::mode() const 
+*/
+int fltk3::GlWindow::mode(int m, const int *a) {
+  if (m == mode_ && a == alist) return 0;
+#ifndef __APPLE__
+  int oldmode = mode_;
+#endif // !__APPLE__
+#if !defined(WIN32) && !defined(__APPLE__)
+  fltk3::GlChoice* oldg = g;
+#endif // !WIN32 && !__APPLE__
+  context(0);
+  mode_ = m; alist = a;
+  if (shown()) {
+    g = fltk3::GlChoice::find(m, a);
+
+#if defined(USE_X11)
+    // under X, if the visual changes we must make a new X window (yuck!):
+    if (!g || g->vis->visualid!=oldg->vis->visualid || (oldmode^m)&fltk3::DOUBLE) {
+      hide();
+      show();
+    }
+#elif defined(WIN32)
+    if (!g || (oldmode^m)&(fltk3::DOUBLE|fltk3::STEREO)) {
+      hide();
+      show();
+    }
+#elif defined(__APPLE_QUARTZ__)
+    // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+    redraw();
+#else
+#  error unsupported platform
+#endif
+  } else {
+    g = 0;
+  }
+  return 1;
+}
+
+#define NON_LOCAL_CONTEXT 0x80000000
+
+/**
+  The make_current() method selects the OpenGL context for the
+  widget.  It is called automatically prior to the draw() method
+  being called and can also be used to implement feedback and/or
+  selection within the handle() method.
+*/
+
+void fltk3::GlWindow::make_current() {
+//  puts("fltk3::GlWindow::make_current()");
+//  printf("make_current: context_=%p\n", context_);
+  if (!context_) {
+    mode_ &= ~NON_LOCAL_CONTEXT;
+    context_ = fl_create_gl_context(this, g);
+    valid(0);
+    context_valid(0);
+  }
+  fl_set_gl_context(this, context_);
+
+#ifdef __APPLE__
+  // Set the buffer rectangle here, since in resize() we won't have the
+  // correct parent window size to work with...
+  GLint xywh[4];
+
+  if (window()) {
+    xywh[0] = x();
+    xywh[1] = window()->h() - y() - h();
+  } else {
+    xywh[0] = 0;
+    xywh[1] = 0;
+  }
+
+  xywh[2] = w();
+  xywh[3] = h();
+
+  aglSetInteger(context_, AGL_BUFFER_RECT, xywh);
+  aglEnable(context_, AGL_BUFFER_RECT);
+//  printf("make_current: xywh=[%d %d %d %d]\n", xywh[0], xywh[1], xywh[2], xywh[3]);
+#endif // __APPLE__
+
+#if defined(WIN32) && USE_COLORMAP
+  if (fl_palette) {
+    fl_GetDC(fl_xid(this));
+    SelectPalette(fl_gc, fl_palette, FALSE);
+    RealizePalette(fl_gc);
+  }
+#endif // USE_COLORMAP
+  if (mode_ & fltk3::FAKE_SINGLE) {
+    glDrawBuffer(GL_FRONT);
+    glReadBuffer(GL_FRONT);
+  }
+  current_ = this;
+}
+
+/**
+  Sets the projection so 0,0 is in the lower left of the window and each
+  pixel is 1 unit wide/tall.  If you are drawing 2D images, your 
+  draw() method may want to call this if valid() is false.
+*/
+void fltk3::GlWindow::ortho() {
+// Alpha NT seems to have a broken OpenGL that does not like negative coords:
+#ifdef _M_ALPHA
+  glLoadIdentity();
+  glViewport(0, 0, w(), h());
+  glOrtho(0, w(), 0, h(), -1, 1);
+#else
+  GLint v[2];
+  glGetIntegerv(GL_MAX_VIEWPORT_DIMS, v);
+  glLoadIdentity();
+  glViewport(w()-v[0], h()-v[1], v[0], v[1]);
+  glOrtho(w()-v[0], w(), h()-v[1], h(), -1, 1);
+#endif
+}
+
+/**
+  The swap_buffers() method swaps the back and front buffers.
+  It is called automatically after the draw() method is called.
+*/
+void fltk3::GlWindow::swap_buffers() {
+#if defined(USE_X11)
+  glXSwapBuffers(fl_display, fl_xid(this));
+#elif defined(WIN32)
+#  if HAVE_GL_OVERLAY
+  // Do not swap the overlay, to match GLX:
+  BOOL ret = wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_MAIN_PLANE);
+  DWORD err = GetLastError();;
+#  else
+  SwapBuffers(Fl_X::i(this)->private_dc);
+#  endif
+#elif defined(__APPLE_QUARTZ__)
+  if(overlay != NULL) {
+    //aglSwapBuffers does not work well with overlays under cocoa
+    glReadBuffer(GL_BACK);
+    glDrawBuffer(GL_FRONT);
+    glCopyPixels(0,0,w(),h(),GL_COLOR);
+  }
+  else
+    aglSwapBuffers((AGLContext)context_);
+#else
+# error unsupported platform
+#endif
+}
+
+#if HAVE_GL_OVERLAY && defined(WIN32)
+uchar fl_overlay; // changes how fltk3::color() works
+int fl_overlay_depth = 0;
+#endif
+
+
+void fltk3::GlWindow::flush() {
+  uchar save_valid = valid_f_ & 1;
+#if HAVE_GL_OVERLAY && defined(WIN32)
+  uchar save_valid_f = valid_f_;
+#endif
+
+#if defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  //: clear previous clipping in this shared port
+#if ! __LP64__
+/*GrafPtr port = GetWindowPort( Fl_X::i(this)->window_ref() );
+  Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
+  GrafPtr old; GetPort( &old );
+  SetPort( port );
+  ClipRect( &rect );
+  SetPort( old );*/
+#endif
+#endif
+
+#if HAVE_GL_OVERLAY && defined(WIN32)
+
+  bool fixcursor = false; // for fixing the SGI 320 bug
+
+  // Draw into hardware overlay planes if they are damaged:
+  if (overlay && overlay != this
+      && (damage()&(fltk3::DAMAGE_OVERLAY|fltk3::DAMAGE_EXPOSE) || !save_valid)) {
+    // SGI 320 messes up overlay with user-defined cursors:
+    if (Fl_X::i(this)->cursor && Fl_X::i(this)->cursor != fl_default_cursor) {
+      fixcursor = true; // make it restore cursor later
+      SetCursor(0);
+    }
+    fl_set_gl_context(this, (GLContext)overlay);
+    if (fl_overlay_depth)
+      wglRealizeLayerPalette(Fl_X::i(this)->private_dc, 1, TRUE);
+    glDisable(GL_SCISSOR_TEST);
+    glClear(GL_COLOR_BUFFER_BIT);
+    fl_overlay = 1;
+    draw_overlay();
+    fl_overlay = 0;
+    valid_f_ = save_valid_f;
+    wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_OVERLAY1);
+    // if only the overlay was damaged we are done, leave main layer alone:
+    if (damage() == fltk3::DAMAGE_OVERLAY) {
+      if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
+      return;
+    }
+  }
+#endif
+
+  make_current();
+
+  if (mode_ & fltk3::DOUBLE) {
+
+    glDrawBuffer(GL_BACK);
+
+    if (!SWAP_TYPE) {
+#if defined (__APPLE_QUARTZ__) || defined (USE_X11)
+      SWAP_TYPE = COPY;
+#else
+      SWAP_TYPE = UNDEFINED;
+#endif
+      const char* c = fltk3::getenv("GL_SWAP_TYPE");
+      if (c) {
+	if (!strcmp(c,"COPY")) SWAP_TYPE = COPY;
+	else if (!strcmp(c, "NODAMAGE")) SWAP_TYPE = NODAMAGE;
+	else if (!strcmp(c, "SWAP")) SWAP_TYPE = SWAP;
+	else SWAP_TYPE = UNDEFINED;
+      }
+    }
+
+    if (SWAP_TYPE == NODAMAGE) {
+
+      // don't draw if only overlay damage or expose events:
+      if ((damage()&~(fltk3::DAMAGE_OVERLAY|fltk3::DAMAGE_EXPOSE)) || !save_valid)
+	draw();
+      swap_buffers();
+
+    } else if (SWAP_TYPE == COPY) {
+
+      // don't draw if only the overlay is damaged:
+      if (damage() != fltk3::DAMAGE_OVERLAY || !save_valid) draw();
+	  swap_buffers();
+
+    } else if (SWAP_TYPE == SWAP){
+      damage(fltk3::DAMAGE_ALL);
+      draw();
+      if (overlay == this) draw_overlay();
+      swap_buffers();
+    } else if (SWAP_TYPE == UNDEFINED){ // SWAP_TYPE == UNDEFINED
+
+      // If we are faking the overlay, use CopyPixels to act like
+      // SWAP_TYPE == COPY.  Otherwise overlay redraw is way too slow.
+      if (overlay == this) {
+	// don't draw if only the overlay is damaged:
+	if (damage1_ || damage() != fltk3::DAMAGE_OVERLAY || !save_valid) draw();
+	// we use a separate context for the copy because rasterpos must be 0
+	// and depth test needs to be off:
+	static GLContext ortho_context = 0;
+	static fltk3::GlWindow* ortho_window = 0;
+	int orthoinit = !ortho_context;
+	if (orthoinit) ortho_context = fl_create_gl_context(this, g);
+	fl_set_gl_context(this, ortho_context);
+	if (orthoinit || !save_valid || ortho_window != this) {
+	  glDisable(GL_DEPTH_TEST);
+	  glReadBuffer(GL_BACK);
+	  glDrawBuffer(GL_FRONT);
+	  glLoadIdentity();
+	  glViewport(0, 0, w(), h());
+	  glOrtho(0, w(), 0, h(), -1, 1);
+	  glRasterPos2i(0,0);
+	  ortho_window = this;
+	}
+	glCopyPixels(0,0,w(),h(),GL_COLOR);
+	make_current(); // set current context back to draw overlay
+	damage1_ = 0;
+
+      } else {
+	damage1_ = damage();
+	clear_damage(0xff); draw();
+	swap_buffers();
+      }
+
+    }
+
+    if (overlay==this && SWAP_TYPE != SWAP) { // fake overlay in front buffer
+      glDrawBuffer(GL_FRONT);
+      draw_overlay();
+      glDrawBuffer(GL_BACK);
+      glFlush();
+    }
+
+  } else {	// single-buffered context is simpler:
+
+    draw();
+    if (overlay == this) draw_overlay();
+    glFlush();
+
+  }
+
+#if HAVE_GL_OVERLAY && defined(WIN32)
+  if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
+#endif
+  valid(1);
+  context_valid(1);
+}
+
+void fltk3::GlWindow::resize(int X,int Y,int W,int H) {
+//  printf("fltk3::GlWindow::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H);
+//  printf("current: x()=%d, y()=%d, w()=%d, h()=%d\n", x(), y(), w(), h());
+
+  if (W != w() || H != h()) valid(0);
+
+#ifdef __APPLE__
+  if (X != x() || Y != y() || W != w() || H != h()) aglUpdateContext(context_);
+#elif !defined(WIN32)
+  if ((W != w() || H != h()) && !resizable() && overlay && overlay != this) {
+    ((fltk3::GlWindow*)overlay)->resize(0,0,W,H);
+  }
+#endif
+
+  Window::resize(X,Y,W,H);
+}
+
+/**
+  Returns or sets a pointer to the GLContext that this window is
+  using. This is a system-dependent structure, but it is portable to copy
+  the context from one window to another. You can also set it to NULL,
+  which will force FLTK to recreate the context the next time make_current()
+  is called, this is useful for getting around bugs in OpenGL implementations.
+  
+  If <i>destroy_flag</i> is true the context will be destroyed by
+  fltk when the window is destroyed, or when the mode() is changed, 
+  or the next time context(x) is called.
+*/
+void fltk3::GlWindow::context(void* v, int destroy_flag) {
+  if (context_ && !(mode_&NON_LOCAL_CONTEXT)) fl_delete_gl_context(context_);
+  context_ = (GLContext)v;
+  if (destroy_flag) mode_ &= ~NON_LOCAL_CONTEXT;
+  else mode_ |= NON_LOCAL_CONTEXT;
+}    
+
+/**
+  Hides the window and destroys the OpenGL context.
+*/
+void fltk3::GlWindow::hide() {
+  context(0);
+#if HAVE_GL_OVERLAY && defined(WIN32)
+  if (overlay && overlay != this) {
+    fl_delete_gl_context((GLContext)overlay);
+    overlay = 0;
+  }
+#endif
+  Window::hide();
+}
+
+/**
+  The destructor removes the widget and destroys the OpenGL context
+  associated with it.
+*/
+fltk3::GlWindow::~GlWindow() {
+  hide();
+//  delete overlay; this is done by ~Fl_Group
+#ifdef __APPLE__
+  // resets the pile of string textures used to draw strings
+  extern void gl_texture_reset();
+  gl_texture_reset();
+#endif
+}
+
+void fltk3::GlWindow::init() {
+  end(); // we probably don't want any children
+  box(fltk3::NO_BOX);
+
+  mode_    = fltk3::RGB | fltk3::DEPTH | fltk3::DOUBLE;
+  alist    = 0;
+  context_ = 0;
+  g        = 0;
+  overlay  = 0;
+  valid_f_ = 0;
+  damage1_ = 0;
+
+#if 0 // This breaks resizing on Linux/X11
+  int H = h();
+  h(1); // Make sure we actually do something in resize()...
+  resize(x(), y(), w(), H);
+#endif // 0
+}
+
+/**
+  You must implement this virtual function if you want to draw into the
+  overlay.  The overlay is cleared before this is called.  You should
+  draw anything that is not clear using OpenGL.  You must use 
+  gl_color(i) to choose colors (it allocates them from the colormap
+  using system-specific calls), and remember that you are in an indexed
+  OpenGL mode and drawing anything other than flat-shaded will probably
+  not work.
+
+  Both this function and fltk3::GlWindow::draw() should check 
+  fltk3::GlWindow::valid() and set the same transformation.  If you
+  don't your code may not work on other systems.  Depending on the OS,
+  and on whether overlays are real or simulated, the OpenGL context may
+  be the same or different between the overlay and main window.
+*/
+void fltk3::GlWindow::draw_overlay() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw_overlay(), DrawOverlay)
+}
+
+#endif
+
+  /**
+  You \e \b must subclass fltk3::GlWindow and provide an implementation for 
+  draw().  You may also provide an implementation of draw_overlay()
+  if you want to draw into the overlay planes.  You can avoid
+  reinitializing the viewport and lights and other things by checking 
+  valid() at the start of draw() and only doing the
+  initialization if it is false.
+
+  The draw() method can <I>only</I> use OpenGL calls.  Do not
+  attempt to call X, any of the functions in <fltk3/draw.h>, or glX
+  directly.  Do not call gl_start() or gl_finish().
+
+  If double-buffering is enabled in the window, the back and front
+  buffers are swapped after this function is completed.
+*/
+void fltk3::GlWindow::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  fltk3::fatal("fltk3::GlWindow::draw() *must* be overriden. Please refer to the documentation.");
+}
+
+
+/**
+ Handle some FLTK events as needed.
+ */
+int fltk3::GlWindow::handle(int event) 
+{
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  return Window::handle(event);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Gl_Window.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Group.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Group.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Group.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,873 @@
+//
+// "$Id$"
+//
+// Group widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// The fltk3::Group is the only defined container type in FLTK.
+
+// fltk3::Window itself is a subclass of this, and most of the event
+// handling is designed so windows themselves work correctly.
+
+#include <stdio.h>
+#include <fltk3/run.h>
+#include <fltk3/Group.h>
+#include <fltk3/Window.h>
+#include <fltk3/draw.h>
+#include <stdlib.h>
+
+fltk3::Group* fltk3::Group::current_;
+
+// Hack: A single child is stored in the pointer to the array, while
+// multiple children are stored in an allocated array:
+
+/**
+  Returns a pointer to the array of children. <I>This pointer is only
+  valid until the next time a child is added or removed.</I>
+*/
+fltk3::Widget*const* fltk3::Group::array() const {
+  return children_ <= 1 ? (fltk3::Widget**)(&array_) : array_;
+}
+
+/**
+  Searches the child array for the widget and returns the index. Returns children()
+  if the widget is NULL or not found.
+*/
+int fltk3::Group::find(const fltk3::Widget* o) const {
+  fltk3::Widget*const* a = array();
+  int i; for (i=0; i < children_; i++) if (*a++ == o) break;
+  return i;
+}
+
+// Metrowerks CodeWarrior and others can't export the static
+// class member: current_, so these methods can't be inlined...
+
+/**
+  Sets the current group so you can build the widget
+  tree by just constructing the widgets.
+
+  begin() is automatically called by the constructor for fltk3::Group (and thus for
+  fltk3::Window as well). begin() <I>is exactly the same as</I> current(this).
+  <I>Don't forget to end() the group or window!</I>
+*/
+void fltk3::Group::begin() {current_ = this;}
+
+/**
+  <I>Exactly the same as</I> current(this->parent()). Any new widgets
+  added to the widget tree will be added to the parent of the group.
+*/
+void fltk3::Group::end() {current_ = parent();}
+
+/**
+  Returns the currently active group.
+  
+  The fltk3::Widget constructor automatically does current()->add(widget) if this
+  is not null. To prevent new widgets from being added to a group, call
+  fltk3::Group::current(0).
+*/
+fltk3::Group *fltk3::Group::current() {return current_;}
+
+/**
+  Sets the current group.
+  \see fltk3::Group::current() 
+*/
+void fltk3::Group::current(fltk3::Group *g) {current_ = g;}
+
+extern fltk3::Widget* fl_oldfocus; // set by fltk3::focus
+
+// For back-compatibility, we must adjust all events sent to child
+// windows so they are relative to that window.
+
+static int send(fltk3::Widget* o, int event) {
+  if (o->type() < fltk3::WINDOW) return o->handle(event);
+  switch ( event )
+  {
+  case fltk3::DND_ENTER: /* FALLTHROUGH */
+  case fltk3::DND_DRAG:
+    // figure out correct type of event:
+    event = (o->contains(fltk3::belowmouse())) ? fltk3::DND_DRAG : fltk3::DND_ENTER;
+  }
+  int save_x = fltk3::e_x; fltk3::e_x -= o->x();
+  int save_y = fltk3::e_y; fltk3::e_y -= o->y();
+  int ret = o->handle(event);
+  fltk3::e_y = save_y;
+  fltk3::e_x = save_x;
+  switch ( event )
+  {
+  case fltk3::ENTER: /* FALLTHROUGH */
+  case fltk3::DND_ENTER:
+    // Successful completion of fltk3::ENTER means the widget is now the
+    // belowmouse widget, but only call fltk3::belowmouse if the child
+    // widget did not do so:
+    if (!o->contains(fltk3::belowmouse())) fltk3::belowmouse(o);
+    break;
+  }
+  return ret;
+}
+
+// translate the current keystroke into up/down/left/right for navigation:
+#define ctrl(x) (x^0x40)
+static int navkey() {
+  switch (fltk3::event_key()) {
+  case 0: // not an fltk3::KEYBOARD/fltk3::SHORTCUT event
+    break;
+  case fltk3::TabKey:
+    if (!fltk3::event_state(fltk3::SHIFT)) return fltk3::RightKey;
+    return fltk3::LeftKey;
+  case fltk3::RightKey:
+    return fltk3::RightKey;
+  case fltk3::LeftKey:
+    return fltk3::LeftKey;
+  case fltk3::UpKey:
+    return fltk3::UpKey;
+  case fltk3::DownKey:
+    return fltk3::DownKey;
+  }
+  return 0;
+}
+
+int fltk3::Group::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  fltk3::Widget*const* a = array();
+  int i;
+  fltk3::Widget* o;
+
+  switch (event) {
+
+  case fltk3::FOCUS:
+    switch (navkey()) {
+    default:
+      if (savedfocus_ && savedfocus_->take_focus()) return 1;
+    case fltk3::RightKey:
+    case fltk3::DownKey:
+      for (i = children(); i--;) if ((*a++)->take_focus()) return 1;
+      break;
+    case fltk3::LeftKey:
+    case fltk3::UpKey:
+      for (i = children(); i--;) if (a[i]->take_focus()) return 1;
+      break;
+    }
+    return 0;
+
+  case fltk3::UNFOCUS:
+    savedfocus_ = fl_oldfocus;
+    return 0;
+
+  case fltk3::KEYBOARD:
+    return navigation(navkey());
+
+  case fltk3::SHORTCUT:
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->takesevents() && fltk3::event_inside(o) && send(o,fltk3::SHORTCUT))
+	return 1;
+    }
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->takesevents() && !fltk3::event_inside(o) && send(o,fltk3::SHORTCUT))
+	return 1;
+    }
+    if ((fltk3::event_key() == fltk3::EnterKey || fltk3::event_key() == fltk3::KPEnterKey)) return navigation(fltk3::DownKey);
+    return 0;
+
+  case fltk3::ENTER:
+  case fltk3::MOVE:
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->visible() && fltk3::event_inside(o)) {
+	if (o->contains(fltk3::belowmouse())) {
+	  return send(o,fltk3::MOVE);
+	} else {
+	  fltk3::belowmouse(o);
+	  if (send(o,fltk3::ENTER)) return 1;
+	}
+      }
+    }
+    fltk3::belowmouse(this);
+    return 1;
+
+  case fltk3::DND_ENTER:
+  case fltk3::DND_DRAG:
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->takesevents() && fltk3::event_inside(o)) {
+	if (o->contains(fltk3::belowmouse())) {
+	  return send(o,fltk3::DND_DRAG);
+	} else if (send(o,fltk3::DND_ENTER)) {
+	  if (!o->contains(fltk3::belowmouse())) fltk3::belowmouse(o);
+	  return 1;
+	}
+      }
+    }
+    fltk3::belowmouse(this);
+    return 0;
+
+  case fltk3::PUSH:
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->takesevents() && fltk3::event_inside(o)) {
+	fltk3::WidgetTracker wp(o);
+	if (send(o,fltk3::PUSH)) {
+	  if (fltk3::pushed() && wp.exists() && !o->contains(fltk3::pushed())) fltk3::pushed(o);
+	  return 1;
+	}
+      }
+    }
+    return 0;
+
+  case fltk3::RELEASE:
+  case fltk3::DRAG:
+    o = fltk3::pushed();
+    if (o == this) return 0;
+    else if (o) send(o,event);
+    else {
+      for (i = children(); i--;) {
+	o = a[i];
+	if (o->takesevents() && fltk3::event_inside(o)) {
+	  if (send(o,event)) return 1;
+	}
+      }
+    }
+    return 0;
+
+  case fltk3::MOUSEWHEEL:
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->takesevents() && fltk3::event_inside(o) && send(o,fltk3::MOUSEWHEEL))
+	return 1;
+    }
+    for (i = children(); i--;) {
+      o = a[i];
+      if (o->takesevents() && !fltk3::event_inside(o) && send(o,fltk3::MOUSEWHEEL))
+	return 1;
+    }
+    return 0;
+
+  case fltk3::DEACTIVATE:
+  case fltk3::ACTIVATE:
+    for (i = children(); i--;) {
+      o = *a++;
+      if (o->active()) o->handle(event);
+    }
+    return 1;
+
+  case fltk3::SHOW:
+  case fltk3::HIDE:
+    for (i = children(); i--;) {
+      o = *a++;
+      if (event == fltk3::HIDE && o == fltk3::focus()) {
+        // Give up input focus...
+	int old_event = fltk3::e_number;
+        o->handle(fltk3::e_number = fltk3::UNFOCUS);
+	fltk3::e_number = old_event;
+	fltk3::focus(0);
+      }
+      if (o->visible()) o->handle(event);
+    }
+    return 1;
+
+  default:
+    // For all other events, try to give to each child, starting at focus:
+    for (i = 0; i < children(); i ++)
+      if (fltk3::focus_ == a[i]) break;
+
+    if (i >= children()) i = 0;
+
+    if (children()) {
+      for (int j = i;;) {
+        if (a[j]->takesevents()) if (send(a[j], event)) return 1;
+        j++;
+        if (j >= children()) j = 0;
+        if (j == i) break;
+      }
+    }
+
+    return 0;
+  }
+}
+
+//void fltk3::Group::focus(fltk3::Widget *o) {fltk3::focus(o); o->handle(fltk3::FOCUS);}
+
+#if 0
+const char *nameof(fltk3::Widget *o) {
+  if (!o) return "NULL";
+  if (!o->label()) return "<no label>";
+  return o->label();
+}
+#endif
+
+// try to move the focus in response to a keystroke:
+int fltk3::Group::navigation(int key) {
+  if (children() <= 1) return 0;
+  int i;
+  for (i = 0; ; i++) {
+    if (i >= children_) return 0;
+    if (array_[i]->contains(fltk3::focus())) break;
+  }
+  fltk3::Widget *previous = array_[i];
+
+  for (;;) {
+    switch (key) {
+    case fltk3::RightKey:
+    case fltk3::DownKey:
+      i++;
+      if (i >= children_) {
+	if (parent()) return 0;
+	i = 0;
+      }
+      break;
+    case fltk3::LeftKey:
+    case fltk3::UpKey:
+      if (i) i--;
+      else {
+	if (parent()) return 0;
+	i = children_-1;
+      }
+      break;
+    default:
+      return 0;
+    }
+    fltk3::Widget* o = array_[i];
+    if (o == previous) return 0;
+    switch (key) {
+    case fltk3::DownKey:
+    case fltk3::UpKey:
+      // for up/down, the widgets have to overlap horizontally:
+      if (o->x() >= previous->x()+previous->w() ||
+	  o->x()+o->w() <= previous->x()) continue;
+    }
+    if (o->take_focus()) return 1;
+  }
+}
+
+////////////////////////////////////////////////////////////////
+
+fltk3::Group::Group(int X,int Y,int W,int H,const char *l)
+: fltk3::Widget(X,Y,W,H,l) {
+  align(fltk3::ALIGN_TOP);
+  children_ = 0;
+  array_ = 0;
+  savedfocus_ = 0;
+  resizable_ = this;
+  sizes_ = 0; // this is allocated when first resize() is done
+  // Subclasses may want to construct child objects as part of their
+  // constructor, so make sure they are add()'d to this object.
+  // But you must end() the object!
+  begin();
+}
+
+/**
+  Deletes all child widgets from memory recursively.
+
+  This method differs from the remove() method in that it
+  affects all child widgets and deletes them from memory.
+*/
+void fltk3::Group::clear() {
+  savedfocus_ = 0;
+  resizable_ = this;
+  init_sizes();
+
+  // we must change the fltk3::pushed() widget, if it is one of
+  // the group's children. Otherwise fl_fix_focus() would send
+  // lots of events to children that are about to be deleted
+  // anyway.
+
+  fltk3::Widget *pushed = fltk3::pushed();	// save pushed() widget
+  if (contains(pushed)) pushed = this;	// set it to be the group, if it's a child
+  fltk3::pushed(this);			// for fl_fix_focus etc.
+
+  // okay, now it is safe to destroy the children:
+
+#define REVERSE_CHILDREN
+#ifdef  REVERSE_CHILDREN
+  // Reverse the order of the children. Doing this and deleting
+  // always the last child is much faster than the other way around.
+  if (children_ > 1) {
+    fltk3::Widget *temp;
+    fltk3::Widget **a = (fltk3::Widget**)array();
+    for (int i=0,j=children_-1; i<children_/2; i++,j--) {
+      temp = a[i];
+      a[i] = a[j];
+      a[j] = temp;
+    }
+  }
+#endif // REVERSE_CHILDREN
+
+  while (children_) {			// delete all children
+    int idx = children_-1;		// last child's index
+    fltk3::Widget* w = child(idx);		// last child widget
+    if (w->parent()==this) {		// should always be true
+      if (children_>2) {		// optimized removal
+        w->parent_ = 0;			// reset child's parent
+        children_--;			// update counter
+      } else {				// slow removal
+        remove(idx);
+      }
+      delete w;				// delete the child
+    } else {				// should never happen
+      remove(idx);			// remove it anyway
+    }
+  }
+
+  if (pushed != this) fltk3::pushed(pushed); // reset pushed() widget
+
+}
+
+/**
+  The destructor <I>also deletes all the children</I>. This allows a
+  whole tree to be deleted at once, without having to keep a pointer to
+  all the children in the user code.
+  
+  It is allowed that the fltk3::Group and all of its children are automatic
+  (local) variables, but you must declare the fltk3::Group \e first, so that
+  it is destroyed last.
+  
+  If you add static or automatic (local) variables to an fltk3::Group, then it
+  is your responsibility to remove (or delete) all such static or automatic
+  child widgets \e \b before destroying the group - otherwise the child
+  widgets' destructors would be called twice!
+*/
+fltk3::Group::~Group() {
+  clear();
+}
+
+/**
+  The widget is removed from its current group (if any) and then
+  inserted into this group. It is put at index n - or at the end,
+  if n >= children(). This can also be used to rearrange
+  the widgets inside a group.
+*/
+void fltk3::Group::insert(fltk3::Widget &o, int index) {
+  if (o.parent()) {
+    fltk3::Group* g = o.parent();
+    int n = g->find(o);
+    if (g == this) {
+      if (index > n) index--;
+      if (index == n) return;
+    }
+    g->remove(n);
+  }
+  o.parent_ = this;
+  if (children_ == 0) { // use array pointer to point at single child
+    array_ = (fltk3::Widget**)&o;
+  } else if (children_ == 1) { // go from 1 to 2 children
+    fltk3::Widget* t = (fltk3::Widget*)array_;
+    array_ = (fltk3::Widget**)malloc(2*sizeof(fltk3::Widget*));
+    if (index) {array_[0] = t; array_[1] = &o;}
+    else {array_[0] = &o; array_[1] = t;}
+  } else {
+    if (!(children_ & (children_-1))) // double number of children
+      array_ = (fltk3::Widget**)realloc((void*)array_,
+				    2*children_*sizeof(fltk3::Widget*));
+    int j; for (j = children_; j > index; j--) array_[j] = array_[j-1];
+    array_[j] = &o;
+  }
+  children_++;
+  init_sizes();
+}
+
+/**
+  The widget is removed from its current group (if any) and then added
+  to the end of this group.
+*/
+void fltk3::Group::add(fltk3::Widget &o) {insert(o, children_);}
+
+/**
+  Removes the widget at \p index from the group but does not delete it.
+
+  This method does nothing if \p index is out of bounds.
+
+  This method differs from the clear() method in that it only affects
+  a single widget and does not delete it from memory.
+  
+  \since FLTK 1.3.0
+*/
+void fltk3::Group::remove(int index) {
+  if (index < 0 || index >= children_) return;
+  fltk3::Widget &o = *child(index);
+  if (&o == savedfocus_) savedfocus_ = 0;
+  if (o.parent_ == this) {	// this should always be true
+    o.parent_ = 0;
+  } 
+
+  // remove the widget from the group
+
+  children_--;
+  if (children_ == 1) { // go from 2 to 1 child
+    fltk3::Widget *t = array_[!index];
+    free((void*)array_);
+    array_ = (fltk3::Widget**)t;
+  } else if (children_ > 1) { // delete from array
+    for (; index < children_; index++) array_[index] = array_[index+1];
+  }
+  init_sizes();
+}
+
+/**
+  Removes a widget from the group but does not delete it.
+
+  This method does nothing if the widget is not a child of the group.
+
+  This method differs from the clear() method in that it only affects
+  a single widget and does not delete it from memory.
+  
+  \note If you have the child's index anyway, use remove(int index)
+  instead, because this doesn't need a child lookup in the group's
+  table of children. This can be much faster, if there are lots of
+  children.
+*/
+void fltk3::Group::remove(fltk3::Widget &o) {
+  if (!children_) return;
+  int i = find(o);
+  if (i < children_) remove(i);
+}
+
+////////////////////////////////////////////////////////////////
+
+// Rather lame kludge here, I need to detect windows and ignore the
+// changes to X,Y, since all children are relative to X,Y.  That
+// is why I check type():
+
+// sizes array stores the initial positions of widgets as
+// left,right,top,bottom quads.  The first quad is the group, the
+// second is the resizable (clipped to the group), and the
+// rest are the children.  This is a convenient order for the
+// algorithm.  If you change this be sure to fix fltk3::TiledGroup which
+// also uses this array!
+
+/**
+  Resets the internal array of widget sizes and positions.
+
+  The fltk3::Group widget keeps track of the original widget sizes and
+  positions when resizing occurs so that if you resize a window back to its
+  original size the widgets will be in the correct places. If you rearrange
+  the widgets in your group, call this method to register the new arrangement
+  with the fltk3::Group that contains them.
+  
+  If you add or remove widgets, this will be done automatically.
+  
+  \note The internal array of widget sizes and positions will be allocated and
+  filled when the next resize() occurs.
+  
+  \sa sizes()
+*/
+void fltk3::Group::init_sizes() {
+  delete[] sizes_; sizes_ = 0;
+}
+
+/**
+  Returns the internal array of widget sizes and positions.
+
+  If the sizes() array does not exist, it will be allocated and filled
+  with the current widget sizes and positions.
+
+  \note You should never need to use this method directly, unless you have
+  special needs to rearrange the children of a fltk3::Group. fltk3::TiledGroup uses
+  this to rearrange its widget positions.
+  
+  \sa init_sizes()
+
+  \todo Should the internal representation of the sizes() array be documented?
+*/
+int* fltk3::Group::sizes() {
+  if (!sizes_) {
+    int* p = sizes_ = new int[4*(children_+2)];
+    // first thing in sizes array is the group's size:
+    if (type() < fltk3::WINDOW) {p[0] = x(); p[2] = y();} else {p[0] = p[2] = 0;}
+    p[1] = p[0]+w(); p[3] = p[2]+h();
+    // next is the resizable's size:
+    p[4] = p[0]; // init to the group's size
+    p[5] = p[1];
+    p[6] = p[2];
+    p[7] = p[3];
+    fltk3::Widget* r = resizable();
+    if (r && r != this) { // then clip the resizable to it
+      int t;
+      t = r->x(); if (t > p[0]) p[4] = t;
+      t +=r->w(); if (t < p[1]) p[5] = t;
+      t = r->y(); if (t > p[2]) p[6] = t;
+      t +=r->h(); if (t < p[3]) p[7] = t;
+    }
+    // next is all the children's sizes:
+    p += 8;
+    fltk3::Widget*const* a = array();
+    for (int i=children_; i--;) {
+      fltk3::Widget* o = *a++;
+      *p++ = o->x();
+      *p++ = o->x()+o->w();
+      *p++ = o->y();
+      *p++ = o->y()+o->h();
+    }
+  }
+  return sizes_;
+}
+
+/**
+  Resizes the fltk3::Group widget and all of its children.
+
+  The fltk3::Group widget first resizes itself, and then it moves and resizes
+  all its children according to the rules documented for
+  fltk3::Group::resizable(fltk3::Widget*)
+
+  \sa fltk3::Group::resizable(fltk3::Widget*)
+  \sa fltk3::Group::resizable()
+  \sa fltk3::Widget::resize(int,int,int,int)
+*/
+void fltk3::Group::resize(int X, int Y, int W, int H) {
+
+  int dx = X-x();
+  int dy = Y-y();
+  int dw = W-w();
+  int dh = H-h();
+  
+  int *p = sizes(); // save initial sizes and positions
+
+  Widget::resize(X,Y,W,H); // make new xywh values visible for children
+
+  if (!resizable() || (dw==0 && dh==0) ) {
+
+    if (type() < fltk3::WINDOW) {
+      fltk3::Widget*const* a = array();
+      for (int i=children_; i--;) {
+	fltk3::Widget* o = *a++;
+	o->resize(o->x()+dx, o->y()+dy, o->w(), o->h());
+      }
+    }
+
+  } else if (children_) {
+
+    // get changes in size/position from the initial size:
+    dx = X - p[0];
+    dw = W - (p[1]-p[0]);
+    dy = Y - p[2];
+    dh = H - (p[3]-p[2]);
+    if (type() >= fltk3::WINDOW) dx = dy = 0;
+    p += 4;
+
+    // get initial size of resizable():
+    int IX = *p++;
+    int IR = *p++;
+    int IY = *p++;
+    int IB = *p++;
+
+    fltk3::Widget*const* a = array();
+    for (int i=children_; i--;) {
+      fltk3::Widget* o = *a++;
+#if 1
+      int XX = *p++;
+      if (XX >= IR) XX += dw;
+      else if (XX > IX) XX = IX+((XX-IX)*(IR+dw-IX)+(IR-IX)/2)/(IR-IX);
+      int R = *p++;
+      if (R >= IR) R += dw;
+      else if (R > IX) R = IX+((R-IX)*(IR+dw-IX)+(IR-IX)/2)/(IR-IX);
+
+      int YY = *p++;
+      if (YY >= IB) YY += dh;
+      else if (YY > IY) YY = IY+((YY-IY)*(IB+dh-IY)+(IB-IY)/2)/(IB-IY);
+      int B = *p++;
+      if (B >= IB) B += dh;
+      else if (B > IY) B = IY+((B-IY)*(IB+dh-IY)+(IB-IY)/2)/(IB-IY);
+#else // much simpler code from Francois Ostiguy:
+      int XX = *p++;
+      if (XX >= IR) XX += dw;
+      else if (XX > IX) XX += dw * (XX-IX)/(IR-IX);
+      int R = *p++;
+      if (R >= IR) R += dw;
+      else if (R > IX) R = R + dw * (R-IX)/(IR-IX);
+
+      int YY = *p++;
+      if (YY >= IB) YY += dh;
+      else if (YY > IY) YY = YY + dh*(YY-IY)/(IB-IY);
+      int B = *p++;
+      if (B >= IB) B += dh;
+      else if (B > IY) B = B + dh*(B-IY)/(IB-IY);
+#endif
+      o->resize(XX+dx, YY+dy, R-XX, B-YY);
+    }
+  }
+}
+
+/**
+  Draws all children of the group.
+
+  This is useful, if you derived a widget from fltk3::Group and want to draw a special
+  border or background. You can call draw_children() from the derived draw() method
+  after drawing the box, border, or background.
+*/
+void fltk3::Group::draw_children() {
+  fltk3::Widget*const* a = array();
+
+  if (clip_children()) {
+    fltk3::push_clip(x() + fltk3::box_dx(box()),
+                 y() + fltk3::box_dy(box()),
+		 w() - fltk3::box_dw(box()),
+		 h() - fltk3::box_dh(box()));
+  }
+
+  if (damage() & ~fltk3::DAMAGE_CHILD) { // redraw the entire thing:
+    for (int i=children_; i--;) {
+      fltk3::Widget& o = **a++;
+      draw_child(o);
+      draw_outside_label(o);
+    }
+  } else {	// only redraw the children that need it:
+    for (int i=children_; i--;) update_child(**a++);
+  }
+
+  if (clip_children()) fltk3::pop_clip();
+}
+
+void fltk3::Group::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (damage() & ~fltk3::DAMAGE_CHILD) { // redraw the entire thing:
+    draw_box();
+    draw_label();
+  }
+  draw_children();
+}
+
+/**
+  Draws a child only if it needs it.
+
+  This draws a child widget, if it is not clipped \em and if any damage() bits
+  are set. The damage bits are cleared after drawing.
+
+  \sa fltk3::Group::draw_child(fltk3::Widget& widget) const
+*/
+void fltk3::Group::update_child(fltk3::Widget& widget) const {
+  if (widget.damage() && widget.visible() && widget.type() < fltk3::WINDOW &&
+      fltk3::not_clipped(widget.x(), widget.y(), widget.w(), widget.h())) {
+    widget.draw();	
+    widget.clear_damage();
+  }
+}
+
+/**
+  Forces a child to redraw.
+
+  This draws a child widget, if it is not clipped.
+  The damage bits are cleared after drawing.
+*/
+void fltk3::Group::draw_child(fltk3::Widget& widget) const {
+  if (widget.visible() && widget.type() < fltk3::WINDOW &&
+      fltk3::not_clipped(widget.x(), widget.y(), widget.w(), widget.h())) {
+    widget.clear_damage(fltk3::DAMAGE_ALL);
+    widget.draw();
+    widget.clear_damage();
+  }
+}
+
+extern char fltk3::draw_shortcut;
+
+/** Parents normally call this to draw outside labels of child widgets. */
+void fltk3::Group::draw_outside_label(const fltk3::Widget& widget) const {
+  if (!widget.visible()) return;
+  // skip any labels that are inside the widget:
+  if (!(widget.align()&15) || (widget.align() & fltk3::ALIGN_INSIDE)) return;
+  // invent a box that is outside the widget:
+  fltk3::Align a = widget.align();
+  int X = widget.x();
+  int Y = widget.y();
+  int W = widget.w();
+  int H = widget.h();
+  int wx, wy;
+  if (const_cast<fltk3::Group*>(this)->as_window()) {
+    wx = wy = 0;
+  } else {
+    wx = x(); wy = y();
+  }
+  if ( (a & 0x0f) == fltk3::ALIGN_LEFT_TOP ) {
+    a = (a &~0x0f ) | fltk3::ALIGN_TOP_RIGHT;
+    X = wx;
+    W = widget.x()-X-3;
+  } else if ( (a & 0x0f) == fltk3::ALIGN_LEFT_BOTTOM ) {
+    a = (a &~0x0f ) | fltk3::ALIGN_BOTTOM_RIGHT; 
+    X = wx;
+    W = widget.x()-X-3;
+  } else if ( (a & 0x0f) == fltk3::ALIGN_RIGHT_TOP ) {
+    a = (a &~0x0f ) | fltk3::ALIGN_TOP_LEFT; 
+    X = X+W+3;
+    W = wx+this->w()-X;
+  } else if ( (a & 0x0f) == fltk3::ALIGN_RIGHT_BOTTOM ) {
+    a = (a &~0x0f ) | fltk3::ALIGN_BOTTOM_LEFT; 
+    X = X+W+3;
+    W = wx+this->w()-X;
+  } else if (a & fltk3::ALIGN_TOP) {
+    a ^= (fltk3::ALIGN_BOTTOM|fltk3::ALIGN_TOP);
+    Y = wy;
+    H = widget.y()-Y;
+  } else if (a & fltk3::ALIGN_BOTTOM) {
+    a ^= (fltk3::ALIGN_BOTTOM|fltk3::ALIGN_TOP);
+    Y = Y+H;
+    H = wy+h()-Y;
+  } else if (a & fltk3::ALIGN_LEFT) {
+    a ^= (fltk3::ALIGN_LEFT|fltk3::ALIGN_RIGHT);
+    X = wx;
+    W = widget.x()-X-3;
+  } else if (a & fltk3::ALIGN_RIGHT) {
+    a ^= (fltk3::ALIGN_LEFT|fltk3::ALIGN_RIGHT);
+    X = X+W+3;
+    W = wx+this->w()-X;
+  }
+  widget.draw_label(X,Y,W,H,(fltk3::Align)a);
+}
+
+void fltk3::Group::forms_end() {
+  // set the dimensions of a group to surround contents
+  if (children() && !w()) {
+    fltk3::Widget*const* a = array();
+    fltk3::Widget* o = *a++;
+    int rx = o->x();
+    int ry = o->y();
+    int rw = rx+o->w();
+    int rh = ry+o->h();
+    for (int i=children_-1; i--;) {
+      o = *a++;
+      if (o->x() < rx) rx = o->x();
+      if (o->y() < ry) ry = o->y();
+      if (o->x()+o->w() > rw) rw = o->x()+o->w();
+      if (o->y()+o->h() > rh) rh = o->y()+o->h();
+    }
+    x(rx);
+    y(ry);
+    w(rw-rx);
+    h(rh-ry);
+  }
+  // flip all the children's coordinate systems:
+  //if (fl_flip) {
+    fltk3::Widget* o = (type()>=fltk3::WINDOW) ? this : window();
+    int Y = o->h();
+    fltk3::Widget*const* a = array();
+    for (int i=children(); i--;) {
+      fltk3::Widget* ow = *a++;
+      int newy = Y-ow->y()-ow->h();
+      ow->y(newy);
+    }
+  //}
+  end();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Group.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Help_Dialog.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Help_Dialog.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Help_Dialog.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,301 @@
+//
+// "$Id$"
+//
+// fltk3::HelpDialog dialog for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// generated by Fast Light User Interface Designer (fluid) version 1.0108
+
+#include <fltk3/HelpDialog.h>
+#include "flstring.h"
+#include <fltk3/ask.h>
+
+void fltk3::HelpDialog::cb_back__i(fltk3::Button*, void*) {
+  if (index_ > 0)
+  index_ --;
+
+if (index_ == 0)
+  back_->deactivate();
+
+forward_->activate();
+
+int l = line_[index_];
+
+if (strcmp(view_->filename(), file_[index_]) != 0)
+  view_->load(file_[index_]);
+
+view_->topline(l);
+}
+void fltk3::HelpDialog::cb_back_(fltk3::Button* o, void* v) {
+  ((fltk3::HelpDialog*)(o->parent()->parent()->user_data()))->cb_back__i(o,v);
+}
+
+void fltk3::HelpDialog::cb_forward__i(fltk3::Button*, void*) {
+  if (index_ < max_)
+  index_ ++;
+
+if (index_ >= max_)
+  forward_->deactivate();
+
+back_->activate();
+
+int l = view_->topline();
+
+if (strcmp(view_->filename(), file_[index_]) != 0)
+  view_->load(file_[index_]);
+
+view_->topline(l);
+}
+void fltk3::HelpDialog::cb_forward_(fltk3::Button* o, void* v) {
+  ((fltk3::HelpDialog*)(o->parent()->parent()->user_data()))->cb_forward__i(o,v);
+}
+
+void fltk3::HelpDialog::cb_smaller__i(fltk3::Button*, void*) {
+  if (view_->textsize() > 8)
+  view_->textsize(view_->textsize() - 2);
+
+if (view_->textsize() <= 8)
+  smaller_->deactivate();
+larger_->activate();
+}
+void fltk3::HelpDialog::cb_smaller_(fltk3::Button* o, void* v) {
+  ((fltk3::HelpDialog*)(o->parent()->parent()->user_data()))->cb_smaller__i(o,v);
+}
+
+void fltk3::HelpDialog::cb_larger__i(fltk3::Button*, void*) {
+  if (view_->textsize() < 18)
+  view_->textsize(view_->textsize() + 2);
+
+if (view_->textsize() >= 18)
+  larger_->deactivate();
+smaller_->activate();
+}
+void fltk3::HelpDialog::cb_larger_(fltk3::Button* o, void* v) {
+  ((fltk3::HelpDialog*)(o->parent()->parent()->user_data()))->cb_larger__i(o,v);
+}
+
+void fltk3::HelpDialog::cb_find__i(fltk3::Input*, void*) {
+  find_pos_ = view_->find(find_->value(), find_pos_);
+}
+void fltk3::HelpDialog::cb_find_(fltk3::Input* o, void* v) {
+  ((fltk3::HelpDialog*)(o->parent()->parent()->parent()->user_data()))->cb_find__i(o,v);
+}
+
+void fltk3::HelpDialog::cb_view__i(fltk3::HelpView*, void*) {
+  if (view_->filename())
+{
+  if (view_->changed())
+  {
+    index_ ++;
+
+    if (index_ >= 100)
+    {
+      memmove(line_, line_ + 10, sizeof(line_[0]) * 90);
+      memmove(file_, file_ + 10, sizeof(file_[0]) * 90);
+      index_ -= 10;
+    }
+
+    max_ = index_;
+
+    strlcpy(file_[index_], view_->filename(),sizeof(file_[0]));
+    line_[index_] = view_->topline();
+
+    if (index_ > 0)
+      back_->activate();
+    else
+      back_->deactivate();
+
+    forward_->deactivate();
+    window_->label(view_->title());
+  }
+  else // if ! view_->changed()
+  {
+    strlcpy(file_[index_], view_->filename(), sizeof(file_[0]));
+    line_[index_] = view_->topline();
+  }
+} else { // if ! view_->filename()
+  index_ = 0; // hitting an internal page will disable the back/fwd buffer
+  file_[index_][0] = 0; // unnamed internal page
+  line_[index_] = view_->topline();
+  back_->deactivate();
+  forward_->deactivate();
+};
+}
+void fltk3::HelpDialog::cb_view_(fltk3::HelpView* o, void* v) {
+  ((fltk3::HelpDialog*)(o->parent()->user_data()))->cb_view__i(o,v);
+}
+
+fltk3::HelpDialog::HelpDialog() {
+  { window_ = new fltk3::DoubleWindow(530, 385, "Help Dialog");
+    window_->user_data((void*)(this));
+    { fltk3::Group* o = new fltk3::Group(10, 10, 511, 25);
+      { back_ = new fltk3::Button(10, 10, 25, 25, "@<-");
+        back_->tooltip("Show the previous help page.");
+        back_->shortcut(0xff51);
+        back_->labelcolor((fltk3::Color)2);
+        back_->callback((fltk3::Callback*)cb_back_);
+      } // fltk3::Button* back_
+      { forward_ = new fltk3::Button(45, 10, 25, 25, "@->");
+        forward_->tooltip("Show the next help page.");
+        forward_->shortcut(0xff53);
+        forward_->labelcolor((fltk3::Color)2);
+        forward_->callback((fltk3::Callback*)cb_forward_);
+      } // fltk3::Button* forward_
+      { smaller_ = new fltk3::Button(80, 10, 25, 25, "F");
+        smaller_->tooltip("Make the help text smaller.");
+        smaller_->labelfont(1);
+        smaller_->labelsize(10);
+        smaller_->callback((fltk3::Callback*)cb_smaller_);
+      } // fltk3::Button* smaller_
+      { larger_ = new fltk3::Button(115, 10, 25, 25, "F");
+        larger_->tooltip("Make the help text larger.");
+        larger_->labelfont(1);
+        larger_->labelsize(16);
+        larger_->callback((fltk3::Callback*)cb_larger_);
+      } // fltk3::Button* larger_
+      { fltk3::Group* o = new fltk3::Group(350, 10, 171, 25);
+        o->box(fltk3::DOWN_BOX);
+        o->color(fltk3::BACKGROUND2_COLOR);
+        { find_ = new fltk3::Input(375, 12, 143, 21, "@search");
+          find_->tooltip("find text in document");
+          find_->box(fltk3::FLAT_BOX);
+          find_->labelsize(13);
+          find_->textfont(4);
+          find_->callback((fltk3::Callback*)cb_find_);
+          find_->when(fltk3::WHEN_ENTER_KEY_ALWAYS);
+        } // fltk3::Input* find_
+        o->end();
+      } // fltk3::Group* o
+      { fltk3::Box* o = new fltk3::Box(150, 10, 190, 25);
+        fltk3::Group::current()->resizable(o);
+      } // fltk3::Box* o
+      o->end();
+    } // fltk3::Group* o
+    { view_ = new fltk3::HelpView(10, 45, 510, 330);
+      view_->box(fltk3::DOWN_BOX);
+      view_->callback((fltk3::Callback*)cb_view_);
+      fltk3::Group::current()->resizable(view_);
+    } // fltk3::HelpView* view_
+    window_->size_range(260, 150);
+    window_->end();
+  } // fltk3::DoubleWindow* window_
+  back_->deactivate();
+forward_->deactivate();
+
+index_    = -1;
+max_      = 0;
+find_pos_ = 0;
+
+fltk3::register_images();
+}
+
+fltk3::HelpDialog::~HelpDialog() {
+  delete window_;
+}
+
+int fltk3::HelpDialog::h() {
+  return (window_->h());
+}
+
+void fltk3::HelpDialog::hide() {
+  window_->hide();
+}
+
+void fltk3::HelpDialog::load(const char *f) {
+  view_->set_changed();
+view_->load(f);
+window_->label(view_->title());
+}
+
+void fltk3::HelpDialog::position(int xx, int yy) {
+  window_->position(xx, yy);
+}
+
+void fltk3::HelpDialog::resize(int xx, int yy, int ww, int hh) {
+  window_->resize(xx, yy, ww, hh);
+}
+
+void fltk3::HelpDialog::show() {
+  window_->show();
+}
+
+void fltk3::HelpDialog::show(int argc, char **argv) {
+  window_->show(argc, argv);
+}
+
+void fltk3::HelpDialog::textsize(fltk3::Fontsize s) {
+  view_->textsize(s);
+
+if (s <= 8)
+  smaller_->deactivate();
+else
+  smaller_->activate();
+
+if (s >= 18)
+  larger_->deactivate();
+else
+  larger_->activate();
+}
+
+fltk3::Fontsize fltk3::HelpDialog::textsize() {
+  return (view_->textsize());
+}
+
+void fltk3::HelpDialog::topline(const char *n) {
+  view_->topline(n);
+}
+
+void fltk3::HelpDialog::topline(int n) {
+  view_->topline(n);
+}
+
+void fltk3::HelpDialog::value(const char *f) {
+  view_->set_changed();
+view_->value(f);
+window_->label(view_->title());
+}
+
+const char * fltk3::HelpDialog::value() const {
+  return view_->value();
+}
+
+int fltk3::HelpDialog::visible() {
+  return (window_->visible());
+}
+
+int fltk3::HelpDialog::w() {
+  return (window_->w());
+}
+
+int fltk3::HelpDialog::x() {
+  return (window_->x());
+}
+
+int fltk3::HelpDialog::y() {
+  return (window_->y());
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Help_Dialog.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Help_Dialog.fl
===================================================================
--- branches/branch-3.0/src/core/Fl_Help_Dialog.fl	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Help_Dialog.fl	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,265 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0108 
+header_name {../FL/Fl_Help_Dialog.H} 
+code_name {.cxx}
+comment {//
+// "$Id$"
+//
+// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+} {in_source in_header
+} 
+
+decl {\#include "flstring.h"} {} 
+
+decl {\#include <FL/fl_ask.H>} {} 
+
+class FL_EXPORT Fl_Help_Dialog {open
+} {
+  decl {int index_;} {}
+  decl {int max_;} {}
+  decl {int line_[100];} {}
+  decl {char file_[100][256];} {}
+  decl {int find_pos_;} {}
+  Function {Fl_Help_Dialog()} {open
+  } {
+    Fl_Window window_ {
+      label {Help Dialog} open
+      private xywh {398 64 530 385} type Double resizable size_range {260 150 0 0} visible
+    } {
+      Fl_Group {} {open selected
+        xywh {10 10 511 25}
+      } {
+        Fl_Button back_ {
+          label {@<-}
+          callback {if (index_ > 0)
+  index_ --;
+
+if (index_ == 0)
+  back_->deactivate();
+
+forward_->activate();
+
+int l = line_[index_];
+
+if (strcmp(view_->filename(), file_[index_]) != 0)
+  view_->load(file_[index_]);
+
+view_->topline(l);}
+          private tooltip {Show the previous help page.} xywh {10 10 25 25} shortcut 0xff51 labelcolor 2
+        }
+        Fl_Button forward_ {
+          label {@->}
+          callback {if (index_ < max_)
+  index_ ++;
+
+if (index_ >= max_)
+  forward_->deactivate();
+
+back_->activate();
+
+int l = view_->topline();
+
+if (strcmp(view_->filename(), file_[index_]) != 0)
+  view_->load(file_[index_]);
+
+view_->topline(l);}
+          private tooltip {Show the next help page.} xywh {45 10 25 25} shortcut 0xff53 labelcolor 2
+        }
+        Fl_Button smaller_ {
+          label F
+          callback {if (view_->textsize() > 8)
+  view_->textsize(view_->textsize() - 2);
+
+if (view_->textsize() <= 8)
+  smaller_->deactivate();
+larger_->activate();}
+          private tooltip {Make the help text smaller.} xywh {80 10 25 25} labelfont 1 labelsize 10
+        }
+        Fl_Button larger_ {
+          label F
+          callback {if (view_->textsize() < 18)
+  view_->textsize(view_->textsize() + 2);
+
+if (view_->textsize() >= 18)
+  larger_->deactivate();
+smaller_->activate();}
+          private tooltip {Make the help text larger.} xywh {115 10 25 25} labelfont 1 labelsize 16
+        }
+        Fl_Group {} {open
+          xywh {350 10 171 25} box DOWN_BOX color 7
+        } {
+          Fl_Input find_ {
+            label {@search}
+            callback {find_pos_ = view_->find(find_->value(), find_pos_);}
+            private tooltip {find text in document} xywh {375 12 143 21} box FLAT_BOX labelsize 13 when 10 textfont 4
+          }
+        }
+        Fl_Box {} {
+          xywh {150 10 190 25} resizable
+        }
+      }
+      Fl_Help_View view_ {
+        callback {if (view_->filename())
+{
+  if (view_->changed())
+  {
+    index_ ++;
+
+    if (index_ >= 100)
+    {
+      memmove(line_, line_ + 10, sizeof(line_[0]) * 90);
+      memmove(file_, file_ + 10, sizeof(file_[0]) * 90);
+      index_ -= 10;
+    }
+
+    max_ = index_;
+
+    strlcpy(file_[index_], view_->filename(),sizeof(file_[0]));
+    line_[index_] = view_->topline();
+
+    if (index_ > 0)
+      back_->activate();
+    else
+      back_->deactivate();
+
+    forward_->deactivate();
+    window_->label(view_->title());
+  }
+  else // if ! view_->changed()
+  {
+    strlcpy(file_[index_], view_->filename(), sizeof(file_[0]));
+    line_[index_] = view_->topline();
+  }
+} else { // if ! view_->filename()
+  index_ = 0; // hitting an internal page will disable the back/fwd buffer
+  file_[index_][0] = 0; // unnamed internal page
+  line_[index_] = view_->topline();
+  back_->deactivate();
+  forward_->deactivate();
+}}
+        private xywh {10 45 510 330} box DOWN_BOX resizable
+      }
+    }
+    code {back_->deactivate();
+forward_->deactivate();
+
+index_    = -1;
+max_      = 0;
+find_pos_ = 0;
+
+fl_register_images();} {}
+  }
+  Function {~Fl_Help_Dialog()} {} {
+    code {delete window_;} {}
+  }
+  Function {h()} {return_type int
+  } {
+    code {return (window_->h());} {}
+  }
+  Function {hide()} {return_type void
+  } {
+    code {window_->hide();} {}
+  }
+  Function {load(const char *f)} {return_type void
+  } {
+    code {view_->set_changed();
+view_->load(f);
+window_->label(view_->title());} {}
+  }
+  Function {position(int xx, int yy)} {return_type void
+  } {
+    code {window_->position(xx, yy);} {}
+  }
+  Function {resize(int xx, int yy, int ww, int hh)} {return_type void
+  } {
+    code {window_->resize(xx, yy, ww, hh);} {}
+  }
+  Function {show()} {return_type void
+  } {
+    code {window_->show();} {}
+  }
+  Function {show(int argc, char **argv)} {return_type void
+  } {
+    code {window_->show(argc, argv);} {}
+  }
+  Function {textsize(Fl_Fontsize s)} {return_type void
+  } {
+    code {view_->textsize(s);
+
+if (s <= 8)
+  smaller_->deactivate();
+else
+  smaller_->activate();
+
+if (s >= 18)
+  larger_->deactivate();
+else
+  larger_->activate();} {}
+  }
+  Function {textsize()} {return_type Fl_Fontsize
+  } {
+    code {return (view_->textsize());} {}
+  }
+  Function {topline(const char *n)} {return_type void
+  } {
+    code {view_->topline(n);} {}
+  }
+  Function {topline(int n)} {return_type void
+  } {
+    code {view_->topline(n);} {}
+  }
+  Function {value(const char *f)} {return_type void
+  } {
+    code {view_->set_changed();
+view_->value(f);
+window_->label(view_->title());} {}
+  }
+  Function {value() const} {return_type {const char *}
+  } {
+    code {return view_->value();} {}
+  }
+  Function {visible()} {return_type int
+  } {
+    code {return (window_->visible());} {}
+  }
+  Function {w()} {return_type int
+  } {
+    code {return (window_->w());} {}
+  }
+  Function {x()} {return_type int
+  } {
+    code {return (window_->x());} {}
+  }
+  Function {y()} {return_type int
+  } {
+    code {return (window_->y());} {}
+  }
+} 
+
+comment {
+//
+// End of "$Id$".
+//} {in_source in_header
+} 


Property changes on: branches/branch-3.0/src/core/Fl_Help_Dialog.fl
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Help_Dialog_Dox.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Help_Dialog_Dox.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Help_Dialog_Dox.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,120 @@
+//
+// "$Id$"
+//
+// fltk3::HelpDialog dialog for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// fltk3::HelpDialog (autogenerated class) doxygen documentation placeholder
+
+/** \class fltk3::HelpDialog
+  The fltk3::HelpDialog widget displays a standard help dialog window
+  using the fltk3::HelpView widget.
+  
+  <P ALIGN=CENTER> \image html fltk3::HelpDialog.png </P> 
+  \image latex  fltk3::HelpDialog.png "fltk3::HelpDialog" width=8cm
+*/
+
+/** \fn fltk3::HelpDialog::fltk3::HelpDialog()
+  The constructor creates the dialog pictured above.*/
+
+/** \fn fltk3::HelpDialog::~Fl_Help_Dialog()
+  The destructor destroys the widget and frees all memory that has been
+  allocated for the current file.
+*/
+
+/** \fn void fltk3::HelpDialog::hide()
+  Hides the fltk3::HelpDialog window.*/
+
+/** \fn void fltk3::HelpDialog::load(const char *f)
+  Loads the specified HTML file into the fltk3::HelpView widget.
+  The filename can also contain a target name ("filename.html#target").
+*/
+
+/** \fn void fltk3::HelpDialog::position(int x, int y)
+  Set the screen position of the dialog.*/
+
+/** \fn void fltk3::HelpDialog::resize(int xx, int yy, int ww, int hh)
+  Change the position and size of the dialog.*/
+
+/** \fn void fltk3::HelpDialog::show()
+  Shows the fltk3::HelpDialog window.*/
+
+/** \fn void fltk3::HelpDialog::textsize(fltk3::Fontsize s)
+  Sets or gets the default text size for the help view.*/
+
+/** \fn uchar fltk3::HelpDialog::textsize()
+  Sets or gets the default text size for the help view.*/
+
+/** \fn void fltk3::HelpDialog::topline(const char *n)
+  Sets the top line in the fltk3::HelpView widget to the named or
+  numbered line.
+*/
+
+/** \fn void fltk3::HelpDialog::topline(int n)
+  Sets the top line in the fltk3::HelpView widget to the named or
+  numbered line.
+*/
+
+/** \fn void fltk3::HelpDialog::value(const char *v)
+  The first form sets the current buffer to the string provided and
+  reformats the text. It also clears the history of the "back" and
+  "forward" buttons. The second form returns the current buffer contents.
+*/
+
+/** \fn const char *fltk3::HelpDialog::value() const
+  The first form sets the current buffer to the string provided and
+  reformats the text. It also clears the history of the "back" and
+  "forward" buttons. The second form returns the current buffer contents.
+*/
+
+/** \fn int fltk3::HelpDialog::visible()
+  Returns 1 if the fltk3::HelpDialog window is visible.*/
+
+/** \fn int fltk3::HelpDialog::x()
+  Returns the position and size of the help dialog.*/
+
+/** \fn int fltk3::HelpDialog::y()
+  Returns the position and size of the help dialog.*/
+
+/** \fn int fltk3::HelpDialog::w()
+  Returns the position and size of the help dialog.*/
+
+/** \fn int fltk3::HelpDialog::h()
+  Returns the position and size of the help dialog.*/
+
+/** \fn void fltk3::HelpDialog::show()
+  Shows the main Help Dialog Window
+  Delegates call to encapsulated window_ void fltk3::Window::show() method */
+
+/** \fn void fltk3::HelpDialog::show(int argc, char **argv)
+  Shows the main Help Dialog Window
+  Delegates call to encapsulated window_ void fltk3::Window::show(int argc, char **argv) instance method */
+
+/** \fn void fltk3::HelpDialog::textsize(fltk3::Fontsize s)
+  Sets the internal fltk3::HelpView instance text size.
+  Delegates call to encapsulated view_ void fltk3::HelpView::textsize(fltk3::Fontsize s) instance method */
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Help_Dialog_Dox.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Help_View.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Help_View.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Help_View.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,3520 @@
+//
+// "$Id$"
+//
+// fltk3::HelpView widget routines.
+//
+// Copyright 1997-2010 by Easy Software Products.
+// Image support by Matthias Melcher, Copyright 2000-2009.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::HelpView::add_block()       - Add a text block to the list.
+//   fltk3::HelpView::add_link()        - Add a new link to the list.
+//   fltk3::HelpView::add_target()      - Add a new target to the list.
+//   fltk3::HelpView::compare_targets() - Compare two targets.
+//   fltk3::HelpView::do_align()        - Compute the alignment for a line in
+//                                     a block.
+//   fltk3::HelpView::draw()            - Draw the fltk3::HelpView widget.
+//   fltk3::HelpView::format()          - Format the help text.
+//   fltk3::HelpView::format_table()    - Format a table...
+//   fltk3::HelpView::free_data()       - Free memory used for the document.
+//   fltk3::HelpView::get_align()       - Get an alignment attribute.
+//   fltk3::HelpView::get_attr()        - Get an attribute value from the string.
+//   fltk3::HelpView::get_color()       - Get an alignment attribute.
+//   fltk3::HelpView::handle()          - Handle events in the widget.
+//   fltk3::HelpView::fltk3::HelpView()    - Build a fltk3::HelpView widget.
+//   fltk3::HelpView::~Fl_Help_View()   - Destroy a fltk3::HelpView widget.
+//   fltk3::HelpView::load()            - Load the specified file.
+//   fltk3::HelpView::resize()          - Resize the help widget.
+//   fltk3::HelpView::topline()         - Set the top line to the named target.
+//   fltk3::HelpView::topline()         - Set the top line by number.
+//   fltk3::HelpView::value()           - Set the help text directly.
+//   scrollbar_callback()            - A callback for the scrollbar.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/HelpView.h>
+#include <fltk3/Window.h>
+#include <fltk3/Pixmap.h>
+#include <fltk3/x.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include <fltk3/filename.h>	// fltk3::open_uri()
+#include "flstring.h"
+#include <ctype.h>
+#include <errno.h>
+#include <math.h>
+
+#if defined(WIN32) && ! defined(__CYGWIN__)
+#  include <io.h>
+#  include <direct.h>
+#else
+#  include <unistd.h>
+#endif // WIN32
+
+#define MAX_COLUMNS	200
+
+
+//
+// Typedef the C API sort function type the only way I know how...
+//
+
+extern "C"
+{
+  typedef int (*compare_func_t)(const void *, const void *);
+}
+
+
+//
+// Local functions...
+//
+
+static int	quote_char(const char *);
+static void	scrollbar_callback(fltk3::Widget *s, void *);
+static void	hscrollbar_callback(fltk3::Widget *s, void *);
+
+//
+// global flag for image loading (see get_image).
+//
+
+static char initial_load = 0;
+
+//
+// Broken image...
+//
+
+static const char *broken_xpm[] =
+		{
+		  "16 24 4 1",
+		  "@ c #000000",
+		  "  c #ffffff",
+		  "+ c none",
+		  "x c #ff0000",
+		  // pixels
+		  "@@@@@@@+++++++++",
+		  "@    @++++++++++",
+		  "@   @+++++++++++",
+		  "@   @++@++++++++",
+		  "@    @@+++++++++",
+		  "@     @+++@+++++",
+		  "@     @++@@++++@",
+		  "@ xxx  @@  @++@@",
+		  "@  xxx    xx@@ @",
+		  "@   xxx  xxx   @",
+		  "@    xxxxxx    @",
+		  "@     xxxx     @",
+		  "@    xxxxxx    @",
+		  "@   xxx  xxx   @",
+		  "@  xxx    xxx  @",
+		  "@ xxx      xxx @",
+		  "@              @",
+		  "@              @",
+		  "@              @",
+		  "@              @",
+		  "@              @",
+		  "@              @",
+		  "@              @",
+		  "@@@@@@@@@@@@@@@@",
+		  NULL
+		};
+
+static fltk3::Pixmap broken_image(broken_xpm);
+
+//
+// Simple margin stack for fltk3::HelpView::format()...
+//
+
+struct fl_margins {
+  int depth_;
+  int margins_[100];
+
+  fl_margins() { clear();  }
+
+  int clear() {
+//    puts("fl_margins::clear()");
+
+    depth_ = 0;
+    return margins_[0] = 4;
+  }
+
+  int current() { return margins_[depth_]; }
+
+  int pop() {
+//    printf("fl_margins::pop(): depth_=%d, xx=%d\n", depth_,
+//           depth_ > 0 ? margins_[depth_ - 1] : 4);
+
+    if (depth_ > 0) {
+      depth_ --;
+      return margins_[depth_];
+    } else return 4;
+  }
+
+  int push(int indent) {
+    int xx;
+
+    xx = margins_[depth_] + indent;
+
+//    printf("fl_margins::push(indent=%d): depth_=%d, xx=%d\n", indent,
+//           depth_ + 1, xx);
+
+    if (depth_ < 99) {
+      depth_ ++;
+      margins_[depth_] = xx;
+    }
+
+    return xx;
+  }
+};
+
+//
+// All the stuff needed to implement text selection in fltk3::HelpView
+//
+
+/* matt:
+ * We are trying to keep binary compatibility with previous versions
+ * of FLTK. This means that we are limited to adding static variables
+ * only to not enlarge the fltk3::HelpView class. Lucky for us, only one
+ * text can be selected system wide, so we can remember the selection
+ * in a single set of variables.
+ *
+ * Still to do:
+ * - &word; style characters mess up our count inside a word boundary
+ * - we can only select words, no individual characters
+ * - no dragging of the selection into another widget
+ * - selection must be cleared if another widget get focus!
+ * - write a comment for every new function
+ */
+
+/*
+The following functions are also used to draw stuff and should be replaced with
+local copies that are much faster when merely counting:
+
+fltk3::color(fltk3::Color);
+fltk3::rectf(int, int, int, int);
+fltk3::push_clip(int, int, int, int);
+fltk3::xyline(int, int, int);
+fltk3::rect()
+fltk3::line()
+img->draw()
+*/
+
+// We don't put the offscreen buffer in the help view class because
+// we'd need to include x.h in the header...
+static fltk3::Offscreen fl_help_view_buffer;
+int fltk3::HelpView::selection_first = 0;
+int fltk3::HelpView::selection_last = 0;
+int fltk3::HelpView::selection_push_first = 0;
+int fltk3::HelpView::selection_push_last = 0;
+int fltk3::HelpView::selection_drag_first = 0;
+int fltk3::HelpView::selection_drag_last = 0;
+int fltk3::HelpView::selected = 0;
+int fltk3::HelpView::draw_mode = 0;
+int fltk3::HelpView::mouse_x = 0;
+int fltk3::HelpView::mouse_y = 0;
+int fltk3::HelpView::current_pos = 0;
+fltk3::HelpView *fltk3::HelpView::current_view = 0L;
+fltk3::Color fltk3::HelpView::hv_selection_color;
+fltk3::Color fltk3::HelpView::hv_selection_text_color;
+
+/*
+ * Limitation: if a word contains &code; notations, we will calculate a wrong length.
+ *
+ * This function must be optimized for speed!
+ */
+void fltk3::HelpView::hv_draw(const char *t, int x, int y)
+{
+  if (selected && current_view==this && current_pos<selection_last && current_pos>=selection_first) {
+    fltk3::Color c = fltk3::color();
+    fltk3::color(hv_selection_color);
+    int w = (int)fltk3::width(t);
+    if (current_pos+(int)strlen(t)<selection_last) 
+      w += (int)fltk3::width(' ');
+    fltk3::rectf(x, y+fltk3::descent()-fltk3::height(), w, fltk3::height());
+    fltk3::color(hv_selection_text_color);
+    fltk3::draw(t, x, y);
+    fltk3::color(c);
+  } else {
+    fltk3::draw(t, x, y);
+  }
+  if (draw_mode) {
+    int w = (int)fltk3::width(t);
+    if (mouse_x>=x && mouse_x<x+w) {
+      if (mouse_y>=y-fltk3::height()+fltk3::descent()&&mouse_y<=y+fltk3::descent()) {
+        int f = current_pos;
+        int l = f+strlen(t); // use 'quote_char' to calculate the true length of the HTML string
+        if (draw_mode==1) {
+          selection_push_first = f;
+          selection_push_last = l;
+        } else {
+          selection_drag_first = f;
+          selection_drag_last = l;
+        }
+      }
+    }
+  }
+}
+
+
+/** Adds a text block to the list. */
+fltk3::HelpBlock *					// O - Pointer to new block
+fltk3::HelpView::add_block(const char   *s,	// I - Pointer to start of block text
+                	int           xx,	// I - X position of block
+			int           yy,	// I - Y position of block
+			int           ww,	// I - Right margin of block
+			int           hh,	// I - Height of block
+			unsigned char border)	// I - Draw border?
+{
+  fltk3::HelpBlock	*temp;				// New block
+
+
+//  printf("add_block(s = %p, xx = %d, yy = %d, ww = %d, hh = %d, border = %d)\n",
+//         s, xx, yy, ww, hh, border);
+
+  if (nblocks_ >= ablocks_)
+  {
+    ablocks_ += 16;
+
+    if (ablocks_ == 16)
+      blocks_ = (fltk3::HelpBlock *)malloc(sizeof(fltk3::HelpBlock) * ablocks_);
+    else
+      blocks_ = (fltk3::HelpBlock *)realloc(blocks_, sizeof(fltk3::HelpBlock) * ablocks_);
+  }
+
+  temp = blocks_ + nblocks_;
+  memset(temp, 0, sizeof(fltk3::HelpBlock));
+  temp->start   = s;
+  temp->end     = s;
+  temp->x       = xx;
+  temp->y       = yy;
+  temp->w       = ww;
+  temp->h       = hh;
+  temp->border  = border;
+  temp->bgcolor = bgcolor_;
+  nblocks_ ++;
+
+  return (temp);
+}
+
+
+/** Adds a new link to the list. */
+void fltk3::HelpView::add_link(const char *n,	// I - Name of link
+                      int        xx,	// I - X position of link
+		      int        yy,	// I - Y position of link
+		      int        ww,	// I - Width of link text
+		      int        hh)	// I - Height of link text
+{
+  fltk3::HelpLink	*temp;			// New link
+  char		*target;		// Pointer to target name
+
+
+  if (nlinks_ >= alinks_)
+  {
+    alinks_ += 16;
+
+    if (alinks_ == 16)
+      links_ = (fltk3::HelpLink *)malloc(sizeof(fltk3::HelpLink) * alinks_);
+    else
+      links_ = (fltk3::HelpLink *)realloc(links_, sizeof(fltk3::HelpLink) * alinks_);
+  }
+
+  temp = links_ + nlinks_;
+
+  temp->x       = xx;
+  temp->y       = yy;
+  temp->w       = xx + ww;
+  temp->h       = yy + hh;
+
+  strlcpy(temp->filename, n, sizeof(temp->filename));
+
+  if ((target = strrchr(temp->filename, '#')) != NULL)
+  {
+    *target++ = '\0';
+    strlcpy(temp->name, target, sizeof(temp->name));
+  }
+  else
+    temp->name[0] = '\0';
+
+  nlinks_ ++;
+}
+
+
+/** Adds a new target to the list. */
+void fltk3::HelpView::add_target(const char *n,	// I - Name of target
+			      int        yy)	// I - Y position of target
+{
+  fltk3::HelpTarget	*temp;			// New target
+
+
+  if (ntargets_ >= atargets_)
+  {
+    atargets_ += 16;
+
+    if (atargets_ == 16)
+      targets_ = (fltk3::HelpTarget *)malloc(sizeof(fltk3::HelpTarget) * atargets_);
+    else
+      targets_ = (fltk3::HelpTarget *)realloc(targets_, sizeof(fltk3::HelpTarget) * atargets_);
+  }
+
+  temp = targets_ + ntargets_;
+
+  temp->y = yy;
+  strlcpy(temp->name, n, sizeof(temp->name));
+
+  ntargets_ ++;
+}
+
+/** Compares two targets.*/
+int							// O - Result of comparison
+fltk3::HelpView::compare_targets(const fltk3::HelpTarget *t0,	// I - First target
+                             const fltk3::HelpTarget *t1)	// I - Second target
+{
+  return (strcasecmp(t0->name, t1->name));
+}
+
+/** Computes the alignment for a line in a block.*/
+int						// O - New line
+fltk3::HelpView::do_align(fltk3::HelpBlock *block,	// I - Block to add to
+                      int          line,	// I - Current line
+		      int          xx,		// I - Current X position
+		      int          a,		// I - Current alignment
+		      int          &l)		// IO - Starting link
+{
+  int	offset;					// Alignment offset
+
+
+  switch (a)
+  {
+    case RIGHT :	// Right align
+	offset = block->w - xx;
+	break;
+    case CENTER :	// Center
+	offset = (block->w - xx) / 2;
+	break;
+    default :		// Left align
+	offset = 0;
+	break;
+  }
+
+  block->line[line] = block->x + offset;
+
+  if (line < 31)
+    line ++;
+
+  while (l < nlinks_)
+  {
+    links_[l].x += offset;
+    links_[l].w += offset;
+    l ++;
+  }
+
+  return (line);
+}
+
+/** Draws the fltk3::HelpView widget. */
+void
+fltk3::HelpView::draw()
+{
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int			i;		// Looping var
+  const fltk3::HelpBlock	*block;		// Pointer to current block
+  const char		*ptr,		// Pointer to text in block
+			*attrs;		// Pointer to start of element attributes
+  char			*s,		// Pointer into buffer
+			buf[1024],	// Text buffer
+			attr[1024];	// Attribute buffer
+  int			xx, yy, ww, hh;	// Current positions and sizes
+  int			line;		// Current line
+  fltk3::Font               font;
+  fltk3::Fontsize           fsize;          // Current font and size
+  fltk3::Color              fcolor;         // current font color 
+  int			head, pre,	// Flags for text
+			needspace;	// Do we need whitespace?
+  fltk3::Boxtype		b = box() ? box() : fltk3::DOWN_BOX;
+					// Box to draw...
+  int			underline,	// Underline text?
+                        xtra_ww;        // Extra width for underlined space between words
+
+  // Draw the scrollbar(s) and box first...
+  ww = w();
+  hh = h();
+  i  = 0;
+
+  draw_box(b, x(), y(), ww, hh, bgcolor_);
+
+  if ( hscrollbar_.visible() || scrollbar_.visible() ) {
+    int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+    int hor_vis = hscrollbar_.visible();
+    int ver_vis = scrollbar_.visible();
+    // Scrollbar corner
+    int scorn_x = x() + ww - (ver_vis?scrollsize:0) - fltk3::box_dw(b) + fltk3::box_dx(b);
+    int scorn_y = y() + hh - (hor_vis?scrollsize:0) - fltk3::box_dh(b) + fltk3::box_dy(b);
+    if ( hor_vis ) {
+      if ( hscrollbar_.h() != scrollsize ) {		// scrollsize changed?
+	hscrollbar_.resize(x(), scorn_y, scorn_x - x(), scrollsize);
+	init_sizes();
+      }
+      draw_child(hscrollbar_);
+      hh -= scrollsize;
+    }
+    if ( ver_vis ) {
+      if ( scrollbar_.w() != scrollsize ) {		// scrollsize changed?
+	scrollbar_.resize(scorn_x, y(), scrollsize, scorn_y - y());
+	init_sizes();
+      }
+      draw_child(scrollbar_);
+      ww -= scrollsize;
+    }
+    if ( hor_vis && ver_vis ) {
+      // Both scrollbars visible? Draw little gray box in corner
+      fltk3::color(fltk3::GRAY);
+      fltk3::rectf(scorn_x, scorn_y, scrollsize, scrollsize);
+    }
+  }
+
+  if (!value_)
+    return;
+
+  if (current_view == this && selected) {
+    hv_selection_color      = fltk3::SELECTION_COLOR;
+    hv_selection_text_color = fltk3::contrast(textcolor_, fltk3::SELECTION_COLOR);
+  }
+  current_pos = 0;
+
+  // Clip the drawing to the inside of the box...
+  fltk3::push_clip(x() + fltk3::box_dx(b), y() + fltk3::box_dy(b),
+               ww - fltk3::box_dw(b), hh - fltk3::box_dh(b));
+  fltk3::color(textcolor_);
+
+  // Draw all visible blocks...
+  for (i = 0, block = blocks_; i < nblocks_; i ++, block ++)
+    if ((block->y + block->h) >= topline_ && block->y < (topline_ + h()))
+    {
+      line      = 0;
+      xx        = block->line[line];
+      yy        = block->y - topline_;
+      hh        = 0;
+      pre       = 0;
+      head      = 0;
+      needspace = 0;
+      underline = 0;
+
+      initfont(font, fsize, fcolor);
+
+      for (ptr = block->start, s = buf; ptr < block->end;)
+      {
+	if ((*ptr == '<' || isspace((*ptr)&255)) && s > buf)
+	{
+	  if (!head && !pre)
+	  {
+            // Check width...
+            *s = '\0';
+            s  = buf;
+            ww = (int)fltk3::width(buf);
+
+            if (needspace && xx > block->x)
+	      xx += (int)fltk3::width(' ');
+
+            if ((xx + ww) > block->w)
+	    {
+	      if (line < 31)
+	        line ++;
+	      xx = block->line[line];
+	      yy += hh;
+	      hh = 0;
+	    }
+
+            hv_draw(buf, xx + x() - leftline_, yy + y());
+	    if (underline) {
+              xtra_ww = isspace((*ptr)&255)?(int)fltk3::width(' '):0;
+              fltk3::xyline(xx + x() - leftline_, yy + y() + 1,
+	                xx + x() - leftline_ + ww + xtra_ww);
+            }
+            current_pos = ptr-value_;
+
+            xx += ww;
+	    if ((fsize + 2) > hh)
+	      hh = fsize + 2;
+
+	    needspace = 0;
+	  }
+	  else if (pre)
+	  {
+	    while (isspace((*ptr)&255))
+	    {
+	      if (*ptr == '\n')
+	      {
+	        *s = '\0';
+                s = buf;
+
+                hv_draw(buf, xx + x() - leftline_, yy + y());
+		if (underline) fltk3::xyline(xx + x() - leftline_, yy + y() + 1,
+	                        	 xx + x() - leftline_ +
+					     (int)fltk3::width(buf));
+
+                current_pos = ptr-value_;
+		if (line < 31)
+	          line ++;
+		xx = block->line[line];
+		yy += hh;
+		hh = fsize + 2;
+	      }
+	      else if (*ptr == '\t')
+	      {
+		// Do tabs every 8 columns...
+		while (((s - buf) & 7))
+	          *s++ = ' ';
+	      }
+	      else
+	        *s++ = ' ';
+
+              if ((fsize + 2) > hh)
+	        hh = fsize + 2;
+
+              ptr ++;
+	    }
+
+            if (s > buf)
+	    {
+	      *s = '\0';
+	      s = buf;
+
+              hv_draw(buf, xx + x() - leftline_, yy + y());
+	      ww = (int)fltk3::width(buf);
+	      if (underline) fltk3::xyline(xx + x() - leftline_, yy + y() + 1,
+	                               xx + x() - leftline_ + ww);
+              xx += ww;
+              current_pos = ptr-value_;
+	    }
+
+	    needspace = 0;
+	  }
+	  else
+	  {
+            s = buf;
+
+	    while (isspace((*ptr)&255))
+              ptr ++;
+            current_pos = ptr-value_;
+	  }
+	}
+
+	if (*ptr == '<')
+	{
+	  ptr ++;
+
+          if (strncmp(ptr, "!--", 3) == 0)
+	  {
+	    // Comment...
+	    ptr += 3;
+	    if ((ptr = strstr(ptr, "-->")) != NULL)
+	    {
+	      ptr += 3;
+	      continue;
+	    }
+	    else
+	      break;
+	  }
+
+	  while (*ptr && *ptr != '>' && !isspace((*ptr)&255))
+            if (s < (buf + sizeof(buf) - 1))
+	      *s++ = *ptr++;
+	    else
+	      ptr ++;
+
+	  *s = '\0';
+	  s = buf;
+
+	  attrs = ptr;
+	  while (*ptr && *ptr != '>')
+            ptr ++;
+
+	  if (*ptr == '>')
+            ptr ++;
+
+          // end of command reached, set the supposed start of printed eord here
+          current_pos = ptr-value_;
+	  if (strcasecmp(buf, "HEAD") == 0)
+            head = 1;
+	  else if (strcasecmp(buf, "BR") == 0)
+	  {
+	    if (line < 31)
+	      line ++;
+	    xx = block->line[line];
+            yy += hh;
+	    hh = 0;
+	  }
+	  else if (strcasecmp(buf, "HR") == 0)
+	  {
+	    fltk3::line(block->x + x(), yy + y(), block->w + x(),
+	            yy + y());
+
+	    if (line < 31)
+	      line ++;
+	    xx = block->line[line];
+            yy += 2 * hh;
+	    hh = 0;
+	  }
+	  else if (strcasecmp(buf, "CENTER") == 0 ||
+        	   strcasecmp(buf, "P") == 0 ||
+        	   strcasecmp(buf, "H1") == 0 ||
+		   strcasecmp(buf, "H2") == 0 ||
+		   strcasecmp(buf, "H3") == 0 ||
+		   strcasecmp(buf, "H4") == 0 ||
+		   strcasecmp(buf, "H5") == 0 ||
+		   strcasecmp(buf, "H6") == 0 ||
+		   strcasecmp(buf, "UL") == 0 ||
+		   strcasecmp(buf, "OL") == 0 ||
+		   strcasecmp(buf, "DL") == 0 ||
+		   strcasecmp(buf, "LI") == 0 ||
+		   strcasecmp(buf, "DD") == 0 ||
+		   strcasecmp(buf, "DT") == 0 ||
+		   strcasecmp(buf, "PRE") == 0)
+	  {
+            if (tolower(buf[0]) == 'h')
+	    {
+	      font  = fltk3::HELVETICA_BOLD;
+	      fsize = textsize_ + '7' - buf[1];
+	    }
+	    else if (strcasecmp(buf, "DT") == 0)
+	    {
+	      font  = textfont_ | fltk3::ITALIC;
+	      fsize = textsize_;
+	    }
+	    else if (strcasecmp(buf, "PRE") == 0)
+	    {
+	      font  = fltk3::COURIER;
+	      fsize = textsize_;
+	      pre   = 1;
+	    }
+
+            if (strcasecmp(buf, "LI") == 0)
+	    {
+//            fltk3::font(fltk3::SYMBOL, fsize); // The default SYMBOL font on my XP box is not Unicode...
+              char buf[8];
+              wchar_t b[] = {0x2022, 0x0};
+//            buf[fl_unicode2utf(b, 1, buf)] = 0;
+              unsigned dstlen = fltk3::utf8fromwc(buf, 8, b, 1);
+              buf[dstlen] = 0;
+              hv_draw(buf, xx - fsize + x() - leftline_, yy + y());
+	    }
+
+	    pushfont(font, fsize);
+	  }
+	  else if (strcasecmp(buf, "A") == 0 &&
+	           get_attr(attrs, "HREF", attr, sizeof(attr)) != NULL)
+	  {
+	    fltk3::color(linkcolor_);
+	    underline = 1;
+	  }
+	  else if (strcasecmp(buf, "/A") == 0)
+	  {
+	    fltk3::color(textcolor_);
+	    underline = 0;
+	  }
+	  else if (strcasecmp(buf, "FONT") == 0)
+	  {
+	    if (get_attr(attrs, "COLOR", attr, sizeof(attr)) != NULL) {
+	      textcolor_ = get_color(attr, textcolor_);
+	    }
+
+            if (get_attr(attrs, "FACE", attr, sizeof(attr)) != NULL) {
+	      if (!strncasecmp(attr, "helvetica", 9) ||
+	          !strncasecmp(attr, "arial", 5) ||
+		  !strncasecmp(attr, "sans", 4)) font = fltk3::HELVETICA;
+              else if (!strncasecmp(attr, "times", 5) ||
+	               !strncasecmp(attr, "serif", 5)) font = fltk3::TIMES;
+              else if (!strncasecmp(attr, "symbol", 6)) font = fltk3::SYMBOL;
+	      else font = fltk3::COURIER;
+            }
+
+            if (get_attr(attrs, "SIZE", attr, sizeof(attr)) != NULL) {
+              if (isdigit(attr[0] & 255)) {
+	        // Absolute size
+	        fsize = (int)(textsize_ * pow(1.2, atof(attr) - 3.0));
+	      } else {
+	        // Relative size
+	        fsize = (int)(fsize * pow(1.2, atof(attr) - 3.0));
+	      }
+	    }
+
+            pushfont(font, fsize);
+	  }
+	  else if (strcasecmp(buf, "/FONT") == 0)
+	  {
+	    popfont(font, fsize, textcolor_);
+	  }
+	  else if (strcasecmp(buf, "U") == 0)
+	    underline = 1;
+	  else if (strcasecmp(buf, "/U") == 0)
+	    underline = 0;
+	  else if (strcasecmp(buf, "B") == 0 ||
+	           strcasecmp(buf, "STRONG") == 0)
+	    pushfont(font |= fltk3::BOLD, fsize);
+	  else if (strcasecmp(buf, "TD") == 0 ||
+	           strcasecmp(buf, "TH") == 0)
+          {
+	    int tx, ty, tw, th;
+
+	    if (tolower(buf[1]) == 'h')
+	      pushfont(font |= fltk3::BOLD, fsize);
+	    else
+	      pushfont(font = textfont_, fsize);
+
+            tx = block->x - 4 - leftline_;
+	    ty = block->y - topline_ - fsize - 3;
+            tw = block->w - block->x + 7;
+	    th = block->h + fsize - 5;
+
+            if (tx < 0)
+	    {
+	      tw += tx;
+	      tx  = 0;
+	    }
+
+	    if (ty < 0)
+	    {
+	      th += ty;
+	      ty  = 0;
+	    }
+
+            tx += x();
+	    ty += y();
+
+            if (block->bgcolor != bgcolor_)
+	    {
+	      fltk3::color(block->bgcolor);
+              fltk3::rectf(tx, ty, tw, th);
+              fltk3::color(textcolor_);
+	    }
+
+            if (block->border)
+              fltk3::rect(tx, ty, tw, th);
+	  }
+	  else if (strcasecmp(buf, "I") == 0 ||
+                   strcasecmp(buf, "EM") == 0)
+	    pushfont(font |= fltk3::ITALIC, fsize);
+	  else if (strcasecmp(buf, "CODE") == 0 ||
+	           strcasecmp(buf, "TT") == 0)
+	    pushfont(font = fltk3::COURIER, fsize);
+	  else if (strcasecmp(buf, "KBD") == 0)
+	    pushfont(font = fltk3::COURIER_BOLD, fsize);
+	  else if (strcasecmp(buf, "VAR") == 0)
+	    pushfont(font = fltk3::COURIER_ITALIC, fsize);
+	  else if (strcasecmp(buf, "/HEAD") == 0)
+            head = 0;
+	  else if (strcasecmp(buf, "/H1") == 0 ||
+		   strcasecmp(buf, "/H2") == 0 ||
+		   strcasecmp(buf, "/H3") == 0 ||
+		   strcasecmp(buf, "/H4") == 0 ||
+		   strcasecmp(buf, "/H5") == 0 ||
+		   strcasecmp(buf, "/H6") == 0 ||
+		   strcasecmp(buf, "/B") == 0 ||
+		   strcasecmp(buf, "/STRONG") == 0 ||
+		   strcasecmp(buf, "/I") == 0 ||
+		   strcasecmp(buf, "/EM") == 0 ||
+		   strcasecmp(buf, "/CODE") == 0 ||
+		   strcasecmp(buf, "/TT") == 0 ||
+		   strcasecmp(buf, "/KBD") == 0 ||
+		   strcasecmp(buf, "/VAR") == 0)
+	    popfont(font, fsize, fcolor);
+	  else if (strcasecmp(buf, "/PRE") == 0)
+	  {
+	    popfont(font, fsize, fcolor);
+	    pre = 0;
+	  }
+	  else if (strcasecmp(buf, "IMG") == 0)
+	  {
+	    fltk3::SharedImage *img = 0;
+	    int		width, height;
+	    char	wattr[8], hattr[8];
+
+
+            get_attr(attrs, "WIDTH", wattr, sizeof(wattr));
+            get_attr(attrs, "HEIGHT", hattr, sizeof(hattr));
+	    width  = get_length(wattr);
+	    height = get_length(hattr);
+
+	    if (get_attr(attrs, "SRC", attr, sizeof(attr))) {
+	      img = get_image(attr, width, height);
+	      if (!width) width = img->w();
+	      if (!height) height = img->h();
+	    }
+
+	    if (!width || !height) {
+              if (get_attr(attrs, "ALT", attr, sizeof(attr)) == NULL) {
+	        strcpy(attr, "IMG");
+              }
+	    }
+
+	    ww = width;
+
+	    if (needspace && xx > block->x)
+	      xx += (int)fltk3::width(' ');
+
+	    if ((xx + ww) > block->w)
+	    {
+	      if (line < 31)
+		line ++;
+
+	      xx = block->line[line];
+	      yy += hh;
+	      hh = 0;
+	    }
+
+	    if (img) {
+	      img->draw(xx + x() - leftline_,
+	                yy + y() - fltk3::height() + fltk3::descent() + 2);
+	    }
+
+	    xx += ww;
+	    if ((height + 2) > hh)
+	      hh = height + 2;
+
+	    needspace = 0;
+	  }
+	}
+	else if (*ptr == '\n' && pre)
+	{
+	  *s = '\0';
+	  s = buf;
+
+          hv_draw(buf, xx + x() - leftline_, yy + y());
+
+	  if (line < 31)
+	    line ++;
+	  xx = block->line[line];
+	  yy += hh;
+	  hh = fsize + 2;
+	  needspace = 0;
+
+	  ptr ++;
+          current_pos = ptr-value_;
+	}
+	else if (isspace((*ptr)&255))
+	{
+	  if (pre)
+	  {
+	    if (*ptr == ' ')
+	      *s++ = ' ';
+	    else
+	    {
+	      // Do tabs every 8 columns...
+	      while (((s - buf) & 7))
+	        *s++ = ' ';
+            }
+	  }
+
+          ptr ++;
+          if (!pre) current_pos = ptr-value_;
+	  needspace = 1;
+	}
+	else if (*ptr == '&')
+	{
+	  ptr ++;
+
+          int qch = quote_char(ptr);
+
+	  if (qch < 0)
+	    *s++ = '&';
+	  else {
+            int l;
+            l = fltk3::utf8encode((unsigned int) qch, s);
+            if (l < 1) l = 1;
+            s += l;
+	    ptr = strchr(ptr, ';') + 1;
+	  }
+
+          if ((fsize + 2) > hh)
+	    hh = fsize + 2;
+	}
+	else
+	{
+	  *s++ = *ptr++;
+
+          if ((fsize + 2) > hh)
+	    hh = fsize + 2;
+        }
+      }
+
+      *s = '\0';
+
+      if (s > buf && !pre && !head)
+      {
+	ww = (int)fltk3::width(buf);
+
+        if (needspace && xx > block->x)
+	  xx += (int)fltk3::width(' ');
+
+	if ((xx + ww) > block->w)
+	{
+	  if (line < 31)
+	    line ++;
+	  xx = block->line[line];
+	  yy += hh;
+	  hh = 0;
+	}
+      }
+
+      if (s > buf && !head)
+      {
+        hv_draw(buf, xx + x() - leftline_, yy + y());
+	if (underline) fltk3::xyline(xx + x() - leftline_, yy + y() + 1,
+	                         xx + x() - leftline_ + ww);
+        current_pos = ptr-value_;
+      }
+    }
+
+  fltk3::pop_clip();
+}
+
+
+
+/** Finds the specified string \p s at starting position \p p.
+
+    \return the matching position or -1 if not found
+*/
+int						// O - Matching position or -1 if not found
+fltk3::HelpView::find(const char *s,		// I - String to find
+                   int        p)		// I - Starting position
+{
+  int		i,				// Looping var
+		c;				// Current character
+  fltk3::HelpBlock	*b;				// Current block
+  const char	*bp,				// Block matching pointer
+		*bs,				// Start of current comparison
+		*sp;				// Search string pointer
+
+
+  // Range check input and value...
+  if (!s || !value_) return -1;
+
+  if (p < 0 || p >= (int)strlen(value_)) p = 0;
+  else if (p > 0) p ++;
+
+  // Look for the string...
+  for (i = nblocks_, b = blocks_; i > 0; i --, b ++) {
+    if (b->end < (value_ + p))
+      continue;
+
+    if (b->start < (value_ + p)) bp = value_ + p;
+    else bp = b->start;
+
+    for (sp = s, bs = bp; *sp && *bp && bp < b->end; bp ++) {
+      if (*bp == '<') {
+        // skip to end of element...
+	while (*bp && bp < b->end && *bp != '>') bp ++;
+	continue;
+      } else if (*bp == '&') {
+        // decode HTML entity...
+	if ((c = quote_char(bp + 1)) < 0) c = '&';
+	else bp = strchr(bp + 1, ';') + 1;
+      } else c = *bp;
+
+      if (tolower(*sp) == tolower(c)) sp ++;
+      else {
+        // No match, so reset to start of search...
+	sp = s;
+	bs ++;
+	bp = bs;
+      }
+    }
+
+    if (!*sp) {
+      // Found a match!
+      topline(b->y - b->h);
+      return (b->end - value_);
+    }
+  }
+
+  // No match!
+  return (-1);
+}
+
+/** Formats the help text. */
+void fltk3::HelpView::format() {
+  int		i;		// Looping var
+  int		done;		// Are we done yet?
+  fltk3::HelpBlock	*block,		// Current block
+		*cell;		// Current table cell
+  int		cells[MAX_COLUMNS],
+				// Cells in the current row...
+		row;		// Current table row (block number)
+  const char	*ptr,		// Pointer into block
+		*start,		// Pointer to start of element
+		*attrs;		// Pointer to start of element attributes
+  char		*s,		// Pointer into buffer
+		buf[1024],	// Text buffer
+		attr[1024],	// Attribute buffer
+		wattr[1024],	// Width attribute buffer
+		hattr[1024],	// Height attribute buffer
+		linkdest[1024];	// Link destination
+  int		xx, yy, ww, hh;	// Size of current text fragment
+  int		line;		// Current line in block
+  int		links;		// Links for current line
+  fltk3::Font       font;
+  fltk3::Fontsize   fsize;          // Current font and size
+  fltk3::Color      fcolor;         // Current font color
+  unsigned char	border;		// Draw border?
+  int		talign,		// Current alignment
+		newalign,	// New alignment
+		head,		// In the <HEAD> section?
+		pre,		// <PRE> text?
+		needspace;	// Do we need whitespace?
+  int		table_width,	// Width of table
+		table_offset;	// Offset of table
+  int		column,		// Current table column number
+		columns[MAX_COLUMNS];
+				// Column widths
+  fltk3::Color	tc, rc;		// Table/row background color
+  fltk3::Boxtype	b = box() ? box() : fltk3::DOWN_BOX;
+				// Box to draw...
+  fl_margins	margins;	// Left margin stack...
+
+
+  // Reset document width...
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  hsize_ = w() - scrollsize - fltk3::box_dw(b);
+
+  done = 0;
+  while (!done)
+  {
+    // Reset state variables...
+    done       = 1;
+    nblocks_   = 0;
+    nlinks_    = 0;
+    ntargets_  = 0;
+    size_      = 0;
+    bgcolor_   = color();
+    textcolor_ = textcolor();
+    linkcolor_ = fltk3::contrast(fltk3::BLUE, color());
+
+    tc = rc = bgcolor_;
+
+    strcpy(title_, "Untitled");
+
+    if (!value_)
+      return;
+
+    // Setup for formatting...
+    initfont(font, fsize, fcolor);
+
+    line         = 0;
+    links        = 0;
+    xx           = margins.clear();
+    yy           = fsize + 2;
+    ww           = 0;
+    column       = 0;
+    border       = 0;
+    hh           = 0;
+    block        = add_block(value_, xx, yy, hsize_, 0);
+    row          = 0;
+    head         = 0;
+    pre          = 0;
+    talign       = LEFT;
+    newalign     = LEFT;
+    needspace    = 0;
+    linkdest[0]  = '\0';
+    table_offset = 0;
+
+    // Html text character loop
+    for (ptr = value_, s = buf; *ptr;)
+    {
+      // End of word?
+      if ((*ptr == '<' || isspace((*ptr)&255)) && s > buf)
+      {
+        // Get width of word parsed so far...
+        *s = '\0';
+        ww = (int)fltk3::width(buf);
+
+	if (!head && !pre)
+	{
+          // Check width...
+          if (ww > hsize_) {
+	    hsize_ = ww;
+	    done   = 0;
+	    break;
+	  }
+
+          if (needspace && xx > block->x)
+	    ww += (int)fltk3::width(' ');
+
+  //        printf("line = %d, xx = %d, ww = %d, block->x = %d, block->w = %d\n",
+  //	       line, xx, ww, block->x, block->w);
+
+          if ((xx + ww) > block->w)
+	  {
+            line     = do_align(block, line, xx, newalign, links);
+	    xx       = block->x;
+	    yy       += hh;
+	    block->h += hh;
+	    hh       = 0;
+	  }
+
+          if (linkdest[0])
+	    add_link(linkdest, xx, yy - fsize, ww, fsize);
+
+	  xx += ww;
+	  if ((fsize + 2) > hh)
+	    hh = fsize + 2;
+
+	  needspace = 0;
+	}
+	else if (pre)
+	{
+          // Add a link as needed...
+          if (linkdest[0])
+	    add_link(linkdest, xx, yy - hh, ww, hh);
+
+	  xx += ww;
+	  if ((fsize + 2) > hh)
+	    hh = fsize + 2;
+
+          // Handle preformatted text...
+	  while (isspace((*ptr)&255))
+	  {
+	    if (*ptr == '\n')
+	    {
+              if (xx > hsize_) break;
+
+              line     = do_align(block, line, xx, newalign, links);
+              xx       = block->x;
+	      yy       += hh;
+	      block->h += hh;
+	      hh       = fsize + 2;
+	    }
+	    else
+              xx += (int)fltk3::width(' ');
+
+            if ((fsize + 2) > hh)
+	      hh = fsize + 2;
+
+            ptr ++;
+	  }
+
+          if (xx > hsize_) {
+	    hsize_ = xx;
+	    done   = 0;
+	    break;
+	  }
+
+	  needspace = 0;
+	}
+	else
+	{
+          // Handle normal text or stuff in the <HEAD> section...
+	  while (isspace((*ptr)&255))
+            ptr ++;
+	}
+
+	s = buf;
+      }
+
+      if (*ptr == '<')
+      {
+	// Handle html tags..
+	start = ptr;
+	ptr ++;
+
+        if (strncmp(ptr, "!--", 3) == 0)
+	{
+	  // Comment...
+	  ptr += 3;
+	  if ((ptr = strstr(ptr, "-->")) != NULL)
+	  {
+	    ptr += 3;
+	    continue;
+	  }
+	  else
+	    break;
+	}
+
+	while (*ptr && *ptr != '>' && !isspace((*ptr)&255))
+          if (s < (buf + sizeof(buf) - 1))
+            *s++ = *ptr++;
+	  else
+	    ptr ++;
+
+	*s = '\0';
+	s = buf;
+
+//        puts(buf);
+
+	attrs = ptr;
+	while (*ptr && *ptr != '>')
+          ptr ++;
+
+	if (*ptr == '>')
+          ptr ++;
+
+	if (strcasecmp(buf, "HEAD") == 0)
+          head = 1;
+	else if (strcasecmp(buf, "/HEAD") == 0)
+          head = 0;
+	else if (strcasecmp(buf, "TITLE") == 0)
+	{
+          // Copy the title in the document...
+          for (s = title_;
+	       *ptr != '<' && *ptr && s < (title_ + sizeof(title_) - 1);
+	       *s++ = *ptr++);
+
+	  *s = '\0';
+	  s = buf;
+	}
+	else if (strcasecmp(buf, "A") == 0)
+	{
+          if (get_attr(attrs, "NAME", attr, sizeof(attr)) != NULL)
+	    add_target(attr, yy - fsize - 2);
+
+	  if (get_attr(attrs, "HREF", attr, sizeof(attr)) != NULL)
+	    strlcpy(linkdest, attr, sizeof(linkdest));
+	}
+	else if (strcasecmp(buf, "/A") == 0)
+          linkdest[0] = '\0';
+	else if (strcasecmp(buf, "BODY") == 0)
+	{
+          bgcolor_   = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)),
+	                	 color());
+          textcolor_ = get_color(get_attr(attrs, "TEXT", attr, sizeof(attr)),
+	                	 textcolor());
+          linkcolor_ = get_color(get_attr(attrs, "LINK", attr, sizeof(attr)),
+	                	 fltk3::contrast(fltk3::BLUE, color()));
+	}
+	else if (strcasecmp(buf, "BR") == 0)
+	{
+          line     = do_align(block, line, xx, newalign, links);
+          xx       = block->x;
+	  block->h += hh;
+          yy       += hh;
+	  hh       = 0;
+	}
+	else if (strcasecmp(buf, "CENTER") == 0 ||
+        	 strcasecmp(buf, "P") == 0 ||
+        	 strcasecmp(buf, "H1") == 0 ||
+		 strcasecmp(buf, "H2") == 0 ||
+		 strcasecmp(buf, "H3") == 0 ||
+		 strcasecmp(buf, "H4") == 0 ||
+		 strcasecmp(buf, "H5") == 0 ||
+		 strcasecmp(buf, "H6") == 0 ||
+		 strcasecmp(buf, "UL") == 0 ||
+		 strcasecmp(buf, "OL") == 0 ||
+		 strcasecmp(buf, "DL") == 0 ||
+		 strcasecmp(buf, "LI") == 0 ||
+		 strcasecmp(buf, "DD") == 0 ||
+		 strcasecmp(buf, "DT") == 0 ||
+		 strcasecmp(buf, "HR") == 0 ||
+		 strcasecmp(buf, "PRE") == 0 ||
+		 strcasecmp(buf, "TABLE") == 0)
+	{
+          block->end = start;
+          line       = do_align(block, line, xx, newalign, links);
+	  newalign   = strcasecmp(buf, "CENTER") ? LEFT : CENTER;
+          xx         = block->x;
+          block->h   += hh;
+
+          if (strcasecmp(buf, "UL") == 0 ||
+	      strcasecmp(buf, "OL") == 0 ||
+	      strcasecmp(buf, "DL") == 0)
+          {
+	    block->h += fsize + 2;
+	    xx       = margins.push(4 * fsize);
+	  }
+          else if (strcasecmp(buf, "TABLE") == 0)
+	  {
+	    if (get_attr(attrs, "BORDER", attr, sizeof(attr)))
+	      border = (uchar)atoi(attr);
+	    else
+	      border = 0;
+
+            tc = rc = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), bgcolor_);
+
+	    block->h += fsize + 2;
+
+            format_table(&table_width, columns, start);
+
+            if ((xx + table_width) > hsize_) {
+#ifdef DEBUG
+              printf("xx=%d, table_width=%d, hsize_=%d\n", xx, table_width,
+	             hsize_);
+#endif // DEBUG
+	      hsize_ = xx + table_width;
+	      done   = 0;
+	      break;
+	    }
+
+            switch (get_align(attrs, talign))
+	    {
+	      default :
+	          table_offset = 0;
+	          break;
+
+	      case CENTER :
+	          table_offset = (hsize_ - table_width) / 2 - textsize_;
+	          break;
+
+	      case RIGHT :
+	          table_offset = hsize_ - table_width - textsize_;
+	          break;
+	    }
+
+	    column = 0;
+	  }
+
+          if (tolower(buf[0]) == 'h' && isdigit(buf[1]))
+	  {
+	    font  = fltk3::HELVETICA_BOLD;
+	    fsize = textsize_ + '7' - buf[1];
+	  }
+	  else if (strcasecmp(buf, "DT") == 0)
+	  {
+	    font  = textfont_ | fltk3::ITALIC;
+	    fsize = textsize_;
+	  }
+	  else if (strcasecmp(buf, "PRE") == 0)
+	  {
+	    font  = fltk3::COURIER;
+	    fsize = textsize_;
+	    pre   = 1;
+	  }
+	  else
+	  {
+	    font  = textfont_;
+	    fsize = textsize_;
+	  }
+
+	  pushfont(font, fsize);
+
+          yy = block->y + block->h;
+          hh = 0;
+
+          if ((tolower(buf[0]) == 'h' && isdigit(buf[1])) ||
+	      strcasecmp(buf, "DD") == 0 ||
+	      strcasecmp(buf, "DT") == 0 ||
+	      strcasecmp(buf, "P") == 0)
+            yy += fsize + 2;
+	  else if (strcasecmp(buf, "HR") == 0)
+	  {
+	    hh += 2 * fsize;
+	    yy += fsize;
+	  }
+
+          if (row)
+	    block = add_block(start, xx, yy, block->w, 0);
+	  else
+	    block = add_block(start, xx, yy, hsize_, 0);
+
+	  needspace = 0;
+	  line      = 0;
+
+	  if (strcasecmp(buf, "CENTER") == 0)
+	    newalign = talign = CENTER;
+	  else
+	    newalign = get_align(attrs, talign);
+	}
+	else if (strcasecmp(buf, "/CENTER") == 0 ||
+		 strcasecmp(buf, "/P") == 0 ||
+		 strcasecmp(buf, "/H1") == 0 ||
+		 strcasecmp(buf, "/H2") == 0 ||
+		 strcasecmp(buf, "/H3") == 0 ||
+		 strcasecmp(buf, "/H4") == 0 ||
+		 strcasecmp(buf, "/H5") == 0 ||
+		 strcasecmp(buf, "/H6") == 0 ||
+		 strcasecmp(buf, "/PRE") == 0 ||
+		 strcasecmp(buf, "/UL") == 0 ||
+		 strcasecmp(buf, "/OL") == 0 ||
+		 strcasecmp(buf, "/DL") == 0 ||
+		 strcasecmp(buf, "/TABLE") == 0)
+	{
+          line       = do_align(block, line, xx, newalign, links);
+          xx         = block->x;
+          block->end = ptr;
+
+          if (strcasecmp(buf, "/UL") == 0 ||
+	      strcasecmp(buf, "/OL") == 0 ||
+	      strcasecmp(buf, "/DL") == 0)
+	  {
+	    xx       = margins.pop();
+	    block->h += fsize + 2;
+	  }
+          else if (strcasecmp(buf, "/TABLE") == 0) 
+          {
+	    block->h += fsize + 2;
+            xx       = margins.current();
+          }
+	  else if (strcasecmp(buf, "/PRE") == 0)
+	  {
+	    pre = 0;
+	    hh  = 0;
+	  }
+	  else if (strcasecmp(buf, "/CENTER") == 0)
+	    talign = LEFT;
+
+          popfont(font, fsize, fcolor);
+
+	  //#if defined(__GNUC__)
+          //#warning FIXME this isspace & 255 test will probably not work on a utf8 stream... And we use it everywhere!
+	  //#endif /*__GNUC__*/
+          while (isspace((*ptr)&255))
+	    ptr ++;
+
+          block->h += hh;
+          yy       += hh;
+
+          if (tolower(buf[2]) == 'l')
+            yy += fsize + 2;
+
+          if (row)
+	    block = add_block(ptr, xx, yy, block->w, 0);
+	  else
+	    block = add_block(ptr, xx, yy, hsize_, 0);
+
+	  needspace = 0;
+	  hh        = 0;
+	  line      = 0;
+	  newalign  = talign;
+	}
+	else if (strcasecmp(buf, "TR") == 0)
+	{
+          block->end = start;
+          line       = do_align(block, line, xx, newalign, links);
+          xx         = block->x;
+          block->h   += hh;
+
+          if (row)
+	  {
+            yy = blocks_[row].y + blocks_[row].h;
+
+	    for (cell = blocks_ + row + 1; cell <= block; cell ++)
+	      if ((cell->y + cell->h) > yy)
+		yy = cell->y + cell->h;
+
+            block = blocks_ + row;
+
+            block->h = yy - block->y + 2;
+
+	    for (i = 0; i < column; i ++)
+	      if (cells[i])
+	      {
+		cell = blocks_ + cells[i];
+		cell->h = block->h;
+	      }
+	  }
+
+          memset(cells, 0, sizeof(cells));
+
+	  yy        = block->y + block->h - 4;
+	  hh        = 0;
+          block     = add_block(start, xx, yy, hsize_, 0);
+	  row       = block - blocks_;
+	  needspace = 0;
+	  column    = 0;
+	  line      = 0;
+
+          rc = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), tc);
+	}
+	else if (strcasecmp(buf, "/TR") == 0 && row)
+	{
+          line       = do_align(block, line, xx, newalign, links);
+          block->end = start;
+	  block->h   += hh;
+	  talign     = LEFT;
+
+          xx = blocks_[row].x;
+          yy = blocks_[row].y + blocks_[row].h;
+
+	  for (cell = blocks_ + row + 1; cell <= block; cell ++)
+	    if ((cell->y + cell->h) > yy)
+	      yy = cell->y + cell->h;
+
+          block = blocks_ + row;
+
+          block->h = yy - block->y + 2;
+
+	  for (i = 0; i < column; i ++)
+	    if (cells[i])
+	    {
+	      cell = blocks_ + cells[i];
+	      cell->h = block->h;
+	    }
+
+	  yy        = block->y + block->h /*- 4*/;
+          block     = add_block(start, xx, yy, hsize_, 0);
+	  needspace = 0;
+	  row       = 0;
+	  line      = 0;
+	}
+	else if ((strcasecmp(buf, "TD") == 0 ||
+                  strcasecmp(buf, "TH") == 0) && row)
+	{
+          int	colspan;		// COLSPAN attribute
+
+
+          line       = do_align(block, line, xx, newalign, links);
+          block->end = start;
+	  block->h   += hh;
+
+          if (strcasecmp(buf, "TH") == 0)
+	    font = textfont_ | fltk3::BOLD;
+	  else
+	    font = textfont_;
+
+          fsize = textsize_;
+
+          xx = blocks_[row].x + fsize + 3 + table_offset;
+	  for (i = 0; i < column; i ++)
+	    xx += columns[i] + 6;
+
+          margins.push(xx - margins.current());
+
+          if (get_attr(attrs, "COLSPAN", attr, sizeof(attr)) != NULL)
+	    colspan = atoi(attr);
+	  else
+	    colspan = 1;
+
+          for (i = 0, ww = -6; i < colspan; i ++)
+	    ww += columns[column + i] + 6;
+
+          if (block->end == block->start && nblocks_ > 1)
+	  {
+	    nblocks_ --;
+	    block --;
+	  }
+
+	  pushfont(font, fsize);
+
+	  yy        = blocks_[row].y;
+	  hh        = 0;
+          block     = add_block(start, xx, yy, xx + ww, 0, border);
+	  needspace = 0;
+	  line      = 0;
+	  newalign  = get_align(attrs, tolower(buf[1]) == 'h' ? CENTER : LEFT);
+	  talign    = newalign;
+
+          cells[column] = block - blocks_;
+
+	  column += colspan;
+
+          block->bgcolor = get_color(get_attr(attrs, "BGCOLOR", attr,
+	                                      sizeof(attr)), rc);
+	}
+	else if ((strcasecmp(buf, "/TD") == 0 ||
+                  strcasecmp(buf, "/TH") == 0) && row)
+	{
+          line = do_align(block, line, xx, newalign, links);
+          popfont(font, fsize, fcolor);
+	  xx = margins.pop();
+	  talign = LEFT;
+	}
+	else if (strcasecmp(buf, "FONT") == 0)
+	{
+          if (get_attr(attrs, "FACE", attr, sizeof(attr)) != NULL) {
+	    if (!strncasecmp(attr, "helvetica", 9) ||
+	        !strncasecmp(attr, "arial", 5) ||
+		!strncasecmp(attr, "sans", 4)) font = fltk3::HELVETICA;
+            else if (!strncasecmp(attr, "times", 5) ||
+	             !strncasecmp(attr, "serif", 5)) font = fltk3::TIMES;
+            else if (!strncasecmp(attr, "symbol", 6)) font = fltk3::SYMBOL;
+	    else font = fltk3::COURIER;
+          }
+
+          if (get_attr(attrs, "SIZE", attr, sizeof(attr)) != NULL) {
+            if (isdigit(attr[0] & 255)) {
+	      // Absolute size
+	      fsize = (int)(textsize_ * pow(1.2, atoi(attr) - 3.0));
+	    } else {
+	      // Relative size
+	      fsize = (int)(fsize * pow(1.2, atoi(attr)));
+	    }
+	  }
+
+          pushfont(font, fsize);
+	}
+	else if (strcasecmp(buf, "/FONT") == 0)
+	  popfont(font, fsize, fcolor);
+	else if (strcasecmp(buf, "B") == 0 ||
+        	 strcasecmp(buf, "STRONG") == 0)
+	  pushfont(font |= fltk3::BOLD, fsize);
+	else if (strcasecmp(buf, "I") == 0 ||
+        	 strcasecmp(buf, "EM") == 0)
+	  pushfont(font |= fltk3::ITALIC, fsize);
+	else if (strcasecmp(buf, "CODE") == 0 ||
+	         strcasecmp(buf, "TT") == 0)
+	  pushfont(font = fltk3::COURIER, fsize);
+	else if (strcasecmp(buf, "KBD") == 0)
+	  pushfont(font = fltk3::COURIER_BOLD, fsize);
+	else if (strcasecmp(buf, "VAR") == 0)
+	  pushfont(font = fltk3::COURIER_ITALIC, fsize);
+	else if (strcasecmp(buf, "/B") == 0 ||
+		 strcasecmp(buf, "/STRONG") == 0 ||
+		 strcasecmp(buf, "/I") == 0 ||
+		 strcasecmp(buf, "/EM") == 0 ||
+		 strcasecmp(buf, "/CODE") == 0 ||
+		 strcasecmp(buf, "/TT") == 0 ||
+		 strcasecmp(buf, "/KBD") == 0 ||
+		 strcasecmp(buf, "/VAR") == 0)
+	  popfont(font, fsize, fcolor);
+	else if (strcasecmp(buf, "IMG") == 0)
+	{
+	  fltk3::SharedImage	*img = 0;
+	  int		width;
+	  int		height;
+
+
+          get_attr(attrs, "WIDTH", wattr, sizeof(wattr));
+          get_attr(attrs, "HEIGHT", hattr, sizeof(hattr));
+	  width  = get_length(wattr);
+	  height = get_length(hattr);
+
+	  if (get_attr(attrs, "SRC", attr, sizeof(attr))) {
+	    img    = get_image(attr, width, height);
+	    width  = img->w();
+	    height = img->h();
+	  }
+
+	  ww = width;
+
+          if (ww > hsize_) {
+	    hsize_ = ww;
+	    done   = 0;
+	    break;
+	  }
+
+	  if (needspace && xx > block->x)
+	    ww += (int)fltk3::width(' ');
+
+	  if ((xx + ww) > block->w)
+	  {
+	    line     = do_align(block, line, xx, newalign, links);
+	    xx       = block->x;
+	    yy       += hh;
+	    block->h += hh;
+	    hh       = 0;
+	  }
+
+	  if (linkdest[0])
+	    add_link(linkdest, xx, yy - height, ww, height);
+
+	  xx += ww;
+	  if ((height + 2) > hh)
+	    hh = height + 2;
+
+	  needspace = 0;
+	}
+      }
+      else if (*ptr == '\n' && pre)
+      {
+	if (linkdest[0])
+	  add_link(linkdest, xx, yy - hh, ww, hh);
+
+        if (xx > hsize_) {
+	  hsize_ = xx;
+          done   = 0;
+	  break;
+	}
+
+	line      = do_align(block, line, xx, newalign, links);
+	xx        = block->x;
+	yy        += hh;
+	block->h  += hh;
+	needspace = 0;
+	ptr ++;
+      }
+      else if (isspace((*ptr)&255))
+      {
+	needspace = 1;
+	if ( pre ) {
+	  xx += (int)fltk3::width(' ');
+        }
+	ptr ++;
+      }
+      else if (*ptr == '&' && s < (buf + sizeof(buf) - 1))
+      {
+        // Handle html '&' codes, eg. "&amp;"
+	ptr ++;
+
+        int qch = quote_char(ptr);
+
+	if (qch < 0)
+	  *s++ = '&';
+	else {
+          int l;
+          l = fltk3::utf8encode((unsigned int) qch, s);
+          if (l < 1) l = 1;
+          s += l;
+	  ptr = strchr(ptr, ';') + 1;
+	}
+
+	if ((fsize + 2) > hh)
+          hh = fsize + 2;
+      }
+      else
+      {
+	if (s < (buf + sizeof(buf) - 1))
+          *s++ = *ptr++;
+	else
+          ptr ++;
+
+	if ((fsize + 2) > hh)
+          hh = fsize + 2;
+      }
+    }
+
+    if (s > buf && !head)
+    {
+      *s = '\0';
+      ww = (int)fltk3::width(buf);
+
+  //    printf("line = %d, xx = %d, ww = %d, block->x = %d, block->w = %d\n",
+  //	   line, xx, ww, block->x, block->w);
+
+      if (ww > hsize_) {
+	hsize_ = ww;
+	done   = 0;
+	break;
+      }
+
+      if (needspace && xx > block->x)
+	ww += (int)fltk3::width(' ');
+
+      if ((xx + ww) > block->w)
+      {
+	line     = do_align(block, line, xx, newalign, links);
+	xx       = block->x;
+	yy       += hh;
+	block->h += hh;
+	hh       = 0;
+      }
+
+      if (linkdest[0])
+	add_link(linkdest, xx, yy - fsize, ww, fsize);
+
+      xx += ww;
+    }
+
+    do_align(block, line, xx, newalign, links);
+
+    block->end = ptr;
+    size_      = yy + hh;
+  }
+
+//  printf("margins.depth_=%d\n", margins.depth_);
+
+  if (ntargets_ > 1)
+    qsort(targets_, ntargets_, sizeof(fltk3::HelpTarget),
+          (compare_func_t)compare_targets);
+
+  int dx = fltk3::box_dw(b) - fltk3::box_dx(b);
+  int dy = fltk3::box_dh(b) - fltk3::box_dy(b);
+  int ss = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  int dw = fltk3::box_dw(b) + ss;
+  int dh = fltk3::box_dh(b);
+
+  if (hsize_ > (w() - dw)) {
+    hscrollbar_.show();
+
+    dh += ss;
+
+    if (size_ < (h() - dh)) {
+      scrollbar_.hide();
+      hscrollbar_.resize(x() + fltk3::box_dx(b), y() + h() - ss - dy,
+                         w() - fltk3::box_dw(b), ss);
+    } else {
+      scrollbar_.show();
+      scrollbar_.resize(x() + w() - ss - dx, y() + fltk3::box_dy(b),
+                        ss, h() - ss - fltk3::box_dh(b));
+      hscrollbar_.resize(x() + fltk3::box_dx(b), y() + h() - ss - dy,
+                         w() - ss - fltk3::box_dw(b), ss);
+    }
+  } else {
+    hscrollbar_.hide();
+
+    if (size_ < (h() - dh)) scrollbar_.hide();
+    else {
+      scrollbar_.resize(x() + w() - ss - dx, y() + fltk3::box_dy(b),
+                        ss, h() - fltk3::box_dh(b));
+      scrollbar_.show();
+    }
+  }
+
+  // Reset scrolling if it needs to be...
+  if (scrollbar_.visible()) {
+    int temph = h() - fltk3::box_dh(b);
+    if (hscrollbar_.visible()) temph -= ss;
+    if ((topline_ + temph) > size_) topline(size_ - temph);
+    else topline(topline_);
+  } else topline(0);
+
+  if (hscrollbar_.visible()) {
+    int tempw = w() - ss - fltk3::box_dw(b);
+    if ((leftline_ + tempw) > hsize_) leftline(hsize_ - tempw);
+    else leftline(leftline_);
+  } else leftline(0);
+}
+
+
+/** Formats a table */
+void
+fltk3::HelpView::format_table(int        *table_width,	// O - Total table width
+                           int        *columns,		// O - Column widths
+	                   const char *table)		// I - Pointer to start of table
+{
+  int		column,					// Current column
+		num_columns,				// Number of columns
+		colspan,				// COLSPAN attribute
+		width,					// Current width
+		temp_width,				// Temporary width
+		max_width,				// Maximum width
+		incell,					// In a table cell?
+		pre,					// <PRE> text?
+		needspace;				// Need whitespace?
+  char		*s,					// Pointer into buffer
+		buf[1024],				// Text buffer
+		attr[1024],				// Other attribute
+		wattr[1024],				// WIDTH attribute
+		hattr[1024];				// HEIGHT attribute
+  const char	*ptr,					// Pointer into table
+		*attrs,					// Pointer to attributes
+		*start;					// Start of element
+  int		minwidths[MAX_COLUMNS];			// Minimum widths for each column
+  fltk3::Font       font;
+  fltk3::Fontsize   fsize;				        // Current font and size
+  fltk3::Color      fcolor;                                 // Currrent font color
+
+  // Clear widths...
+  *table_width = 0;
+  for (column = 0; column < MAX_COLUMNS; column ++)
+  {
+    columns[column]   = 0;
+    minwidths[column] = 0;
+  }
+
+  num_columns = 0;
+  colspan     = 0;
+  max_width   = 0;
+  pre         = 0;
+  needspace   = 0;
+  fstack_.top(font, fsize, fcolor);
+
+  // Scan the table...
+  for (ptr = table, column = -1, width = 0, s = buf, incell = 0; *ptr;)
+  {
+    if ((*ptr == '<' || isspace((*ptr)&255)) && s > buf && incell)
+    {
+      // Check width...
+      if (needspace)
+      {
+        *s++      = ' ';
+	needspace = 0;
+      }
+
+      *s         = '\0';
+      temp_width = (int)fltk3::width(buf);
+      s          = buf;
+
+      if (temp_width > minwidths[column])
+        minwidths[column] = temp_width;
+
+      width += temp_width;
+
+      if (width > max_width)
+        max_width = width;
+    }
+
+    if (*ptr == '<')
+    {
+      start = ptr;
+
+      for (s = buf, ptr ++; *ptr && *ptr != '>' && !isspace((*ptr)&255);)
+        if (s < (buf + sizeof(buf) - 1))
+          *s++ = *ptr++;
+	else
+	  ptr ++;
+
+      *s = '\0';
+      s = buf;
+
+      attrs = ptr;
+      while (*ptr && *ptr != '>')
+        ptr ++;
+
+      if (*ptr == '>')
+        ptr ++;
+
+      if (strcasecmp(buf, "BR") == 0 ||
+	  strcasecmp(buf, "HR") == 0)
+      {
+        width     = 0;
+	needspace = 0;
+      }
+      else if (strcasecmp(buf, "TABLE") == 0 && start > table)
+        break;
+      else if (strcasecmp(buf, "CENTER") == 0 ||
+               strcasecmp(buf, "P") == 0 ||
+               strcasecmp(buf, "H1") == 0 ||
+	       strcasecmp(buf, "H2") == 0 ||
+	       strcasecmp(buf, "H3") == 0 ||
+	       strcasecmp(buf, "H4") == 0 ||
+	       strcasecmp(buf, "H5") == 0 ||
+	       strcasecmp(buf, "H6") == 0 ||
+	       strcasecmp(buf, "UL") == 0 ||
+	       strcasecmp(buf, "OL") == 0 ||
+	       strcasecmp(buf, "DL") == 0 ||
+	       strcasecmp(buf, "LI") == 0 ||
+	       strcasecmp(buf, "DD") == 0 ||
+	       strcasecmp(buf, "DT") == 0 ||
+	       strcasecmp(buf, "PRE") == 0)
+      {
+        width     = 0;
+	needspace = 0;
+
+        if (tolower(buf[0]) == 'h' && isdigit(buf[1]))
+	{
+	  font  = fltk3::HELVETICA_BOLD;
+	  fsize = textsize_ + '7' - buf[1];
+	}
+	else if (strcasecmp(buf, "DT") == 0)
+	{
+	  font  = textfont_ | fltk3::ITALIC;
+	  fsize = textsize_;
+	}
+	else if (strcasecmp(buf, "PRE") == 0)
+	{
+	  font  = fltk3::COURIER;
+	  fsize = textsize_;
+	  pre   = 1;
+	}
+	else if (strcasecmp(buf, "LI") == 0)
+	{
+	  width  += 4 * fsize;
+	  font   = textfont_;
+	  fsize  = textsize_;
+	}
+	else
+	{
+	  font  = textfont_;
+	  fsize = textsize_;
+	}
+
+	pushfont(font, fsize);
+      }
+      else if (strcasecmp(buf, "/CENTER") == 0 ||
+	       strcasecmp(buf, "/P") == 0 ||
+	       strcasecmp(buf, "/H1") == 0 ||
+	       strcasecmp(buf, "/H2") == 0 ||
+	       strcasecmp(buf, "/H3") == 0 ||
+	       strcasecmp(buf, "/H4") == 0 ||
+	       strcasecmp(buf, "/H5") == 0 ||
+	       strcasecmp(buf, "/H6") == 0 ||
+	       strcasecmp(buf, "/PRE") == 0 ||
+	       strcasecmp(buf, "/UL") == 0 ||
+	       strcasecmp(buf, "/OL") == 0 ||
+	       strcasecmp(buf, "/DL") == 0)
+      {
+        width     = 0;
+	needspace = 0;
+
+        popfont(font, fsize, fcolor);
+      }
+      else if (strcasecmp(buf, "TR") == 0 || strcasecmp(buf, "/TR") == 0 ||
+               strcasecmp(buf, "/TABLE") == 0)
+      {
+//        printf("%s column = %d, colspan = %d, num_columns = %d\n",
+//	       buf, column, colspan, num_columns);
+
+        if (column >= 0)
+	{
+	  // This is a hack to support COLSPAN...
+	  max_width /= colspan;
+
+	  while (colspan > 0)
+	  {
+	    if (max_width > columns[column])
+	      columns[column] = max_width;
+
+	    column ++;
+	    colspan --;
+	  }
+	}
+
+	if (strcasecmp(buf, "/TABLE") == 0)
+	  break;
+
+	needspace = 0;
+	column    = -1;
+	width     = 0;
+	max_width = 0;
+	incell    = 0;
+      }
+      else if (strcasecmp(buf, "TD") == 0 ||
+               strcasecmp(buf, "TH") == 0)
+      {
+//        printf("BEFORE column = %d, colspan = %d, num_columns = %d\n",
+//	       column, colspan, num_columns);
+
+        if (column >= 0)
+	{
+	  // This is a hack to support COLSPAN...
+	  max_width /= colspan;
+
+	  while (colspan > 0)
+	  {
+	    if (max_width > columns[column])
+	      columns[column] = max_width;
+
+	    column ++;
+	    colspan --;
+	  }
+	}
+	else
+	  column ++;
+
+        if (get_attr(attrs, "COLSPAN", attr, sizeof(attr)) != NULL)
+	  colspan = atoi(attr);
+	else
+	  colspan = 1;
+
+//        printf("AFTER column = %d, colspan = %d, num_columns = %d\n",
+//	       column, colspan, num_columns);
+
+        if ((column + colspan) >= num_columns)
+	  num_columns = column + colspan;
+
+	needspace = 0;
+	width     = 0;
+	incell    = 1;
+
+        if (strcasecmp(buf, "TH") == 0)
+	  font = textfont_ | fltk3::BOLD;
+	else
+	  font = textfont_;
+
+        fsize = textsize_;
+
+	pushfont(font, fsize);
+
+        if (get_attr(attrs, "WIDTH", attr, sizeof(attr)) != NULL)
+	  max_width = get_length(attr);
+	else
+	  max_width = 0;
+
+//        printf("max_width = %d\n", max_width);
+      }
+      else if (strcasecmp(buf, "/TD") == 0 ||
+               strcasecmp(buf, "/TH") == 0)
+      {
+	incell = 0;
+        popfont(font, fsize, fcolor);
+      }
+      else if (strcasecmp(buf, "B") == 0 ||
+               strcasecmp(buf, "STRONG") == 0)
+	pushfont(font |= fltk3::BOLD, fsize);
+      else if (strcasecmp(buf, "I") == 0 ||
+               strcasecmp(buf, "EM") == 0)
+	pushfont(font |= fltk3::ITALIC, fsize);
+      else if (strcasecmp(buf, "CODE") == 0 ||
+               strcasecmp(buf, "TT") == 0)
+	pushfont(font = fltk3::COURIER, fsize);
+      else if (strcasecmp(buf, "KBD") == 0)
+	pushfont(font = fltk3::COURIER_BOLD, fsize);
+      else if (strcasecmp(buf, "VAR") == 0)
+	pushfont(font = fltk3::COURIER_ITALIC, fsize);
+      else if (strcasecmp(buf, "/B") == 0 ||
+	       strcasecmp(buf, "/STRONG") == 0 ||
+	       strcasecmp(buf, "/I") == 0 ||
+	       strcasecmp(buf, "/EM") == 0 ||
+	       strcasecmp(buf, "/CODE") == 0 ||
+	       strcasecmp(buf, "/TT") == 0 ||
+	       strcasecmp(buf, "/KBD") == 0 ||
+	       strcasecmp(buf, "/VAR") == 0)
+	popfont(font, fsize, fcolor);
+      else if (strcasecmp(buf, "IMG") == 0 && incell)
+      {
+	fltk3::SharedImage	*img = 0;
+	int		iwidth, iheight;
+
+
+        get_attr(attrs, "WIDTH", wattr, sizeof(wattr));
+        get_attr(attrs, "HEIGHT", hattr, sizeof(hattr));
+	iwidth  = get_length(wattr);
+	iheight = get_length(hattr);
+
+        if (get_attr(attrs, "SRC", attr, sizeof(attr))) {
+	  img     = get_image(attr, iwidth, iheight);
+	  iwidth  = img->w();
+	  iheight = img->h();
+	}
+
+	if (iwidth > minwidths[column])
+          minwidths[column] = iwidth;
+
+        width += iwidth;
+	if (needspace)
+	  width += (int)fltk3::width(' ');
+
+	if (width > max_width)
+          max_width = width;
+
+	needspace = 0;
+      }
+    }
+    else if (*ptr == '\n' && pre)
+    {
+      width     = 0;
+      needspace = 0;
+      ptr ++;
+    }
+    else if (isspace((*ptr)&255))
+    {
+      needspace = 1;
+
+      ptr ++;
+    }
+    else if (*ptr == '&' && s < (buf + sizeof(buf) - 1))
+    {
+      ptr ++;
+
+      int qch = quote_char(ptr);
+
+      if (qch < 0)
+	*s++ = '&';
+      else {
+//        int l;
+//        l = fltk3::utf8encode((unsigned int) qch, s);
+//        if (l < 1) l = 1;
+//        s += l;
+	*s++ = qch;
+	ptr = strchr(ptr, ';') + 1;
+      }
+    }
+    else
+    {
+      if (s < (buf + sizeof(buf) - 1))
+        *s++ = *ptr++;
+      else
+        ptr ++;
+    }
+  }
+
+  // Now that we have scanned the entire table, adjust the table and
+  // cell widths to fit on the screen...
+  if (get_attr(table + 6, "WIDTH", attr, sizeof(attr)))
+    *table_width = get_length(attr);
+  else
+    *table_width = 0;
+
+#ifdef DEBUG
+  printf("num_columns = %d, table_width = %d\n", num_columns, *table_width);
+#endif // DEBUG
+
+  if (num_columns == 0)
+    return;
+
+  // Add up the widths...
+  for (column = 0, width = 0; column < num_columns; column ++)
+    width += columns[column];
+
+#ifdef DEBUG
+  printf("width = %d, w() = %d\n", width, w());
+  for (column = 0; column < num_columns; column ++)
+    printf("    columns[%d] = %d, minwidths[%d] = %d\n", column, columns[column],
+           column, minwidths[column]);
+#endif // DEBUG
+
+  // Adjust the width if needed...
+  int scale_width = *table_width;
+
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  if (scale_width == 0) {
+    if (width > (hsize_ - scrollsize)) scale_width = hsize_ - scrollsize;
+    else scale_width = width;
+  }
+
+  if (width < scale_width) {
+#ifdef DEBUG
+    printf("Scaling table up to %d from %d...\n", scale_width, width);
+#endif // DEBUG
+
+    *table_width = 0;
+
+    scale_width = (scale_width - width) / num_columns;
+
+#ifdef DEBUG
+    printf("adjusted scale_width = %d\n", scale_width);
+#endif // DEBUG
+
+    for (column = 0; column < num_columns; column ++) {
+      columns[column] += scale_width;
+
+      (*table_width) += columns[column];
+    }
+  }
+  else if (width > scale_width) {
+#ifdef DEBUG
+    printf("Scaling table down to %d from %d...\n", scale_width, width);
+#endif // DEBUG
+
+    for (column = 0; column < num_columns; column ++) {
+      width       -= minwidths[column];
+      scale_width -= minwidths[column];
+    }
+
+#ifdef DEBUG
+    printf("adjusted width = %d, scale_width = %d\n", width, scale_width);
+#endif // DEBUG
+
+    if (width > 0) {
+      for (column = 0; column < num_columns; column ++) {
+	columns[column] -= minwidths[column];
+	columns[column] = scale_width * columns[column] / width;
+	columns[column] += minwidths[column];
+      }
+    }
+
+    *table_width = 0;
+    for (column = 0; column < num_columns; column ++) {
+      (*table_width) += columns[column];
+    }
+  }
+  else if (*table_width == 0)
+    *table_width = width;
+
+#ifdef DEBUG
+  printf("FINAL table_width = %d\n", *table_width);
+  for (column = 0; column < num_columns; column ++)
+    printf("    columns[%d] = %d\n", column, columns[column]);
+#endif // DEBUG
+}
+
+
+/** Frees memory used for the document. */
+void
+fltk3::HelpView::free_data() {
+  // Release all images...
+  if (value_) {
+    const char	*ptr,		// Pointer into block
+		*attrs;		// Pointer to start of element attributes
+    char	*s,		// Pointer into buffer
+		buf[1024],	// Text buffer
+		attr[1024],	// Attribute buffer
+		wattr[1024],	// Width attribute buffer
+		hattr[1024];	// Height attribute buffer
+
+    for (ptr = value_; *ptr;)
+    {
+      if (*ptr == '<')
+      {
+	ptr ++;
+
+        if (strncmp(ptr, "!--", 3) == 0)
+	{
+	  // Comment...
+	  ptr += 3;
+	  if ((ptr = strstr(ptr, "-->")) != NULL)
+	  {
+	    ptr += 3;
+	    continue;
+	  }
+	  else
+	    break;
+	}
+
+        s = buf;
+
+	while (*ptr && *ptr != '>' && !isspace((*ptr)&255))
+          if (s < (buf + sizeof(buf) - 1))
+            *s++ = *ptr++;
+	  else
+	    ptr ++;
+
+	*s = '\0';
+
+	attrs = ptr;
+	while (*ptr && *ptr != '>')
+          ptr ++;
+
+	if (*ptr == '>')
+          ptr ++;
+
+	if (strcasecmp(buf, "IMG") == 0)
+	{
+	  fltk3::SharedImage	*img;
+	  int		width;
+	  int		height;
+
+          get_attr(attrs, "WIDTH", wattr, sizeof(wattr));
+          get_attr(attrs, "HEIGHT", hattr, sizeof(hattr));
+	  width  = get_length(wattr);
+	  height = get_length(hattr);
+
+	  if (get_attr(attrs, "SRC", attr, sizeof(attr))) {
+	    // Get and release the image to free it from memory...
+	    img = get_image(attr, width, height);
+	    if ((void*)img != &broken_image) {
+	      img->release();
+	    }
+	  }
+	}
+      }
+      else
+        ptr ++;
+    }
+
+    free((void *)value_);
+    value_ = 0;
+  }
+
+  // Free all of the arrays...
+  if (nblocks_) {
+    free(blocks_);
+
+    ablocks_ = 0;
+    nblocks_ = 0;
+    blocks_  = 0;
+  }
+
+  if (nlinks_) {
+    free(links_);
+
+    alinks_ = 0;
+    nlinks_ = 0;
+    links_  = 0;
+  }
+
+  if (ntargets_) {
+    free(targets_);
+
+    atargets_ = 0;
+    ntargets_ = 0;
+    targets_  = 0;
+  }
+}
+
+/** Gets an alignment attribute. */
+int					// O - Alignment
+fltk3::HelpView::get_align(const char *p,	// I - Pointer to start of attrs
+                        int        a)	// I - Default alignment
+{
+  char	buf[255];			// Alignment value
+
+
+  if (get_attr(p, "ALIGN", buf, sizeof(buf)) == NULL)
+    return (a);
+
+  if (strcasecmp(buf, "CENTER") == 0)
+    return (CENTER);
+  else if (strcasecmp(buf, "RIGHT") == 0)
+    return (RIGHT);
+  else
+    return (LEFT);
+}
+
+
+/** Gets an attribute value from the string. */
+const char *					// O - Pointer to buf or NULL
+fltk3::HelpView::get_attr(const char *p,		// I - Pointer to start of attributes
+                      const char *n,		// I - Name of attribute
+		      char       *buf,		// O - Buffer for attribute value
+		      int        bufsize)	// I - Size of buffer
+{
+  char	name[255],				// Name from string
+	*ptr,					// Pointer into name or value
+	quote;					// Quote
+
+
+  buf[0] = '\0';
+
+  while (*p && *p != '>')
+  {
+    while (isspace((*p)&255))
+      p ++;
+
+    if (*p == '>' || !*p)
+      return (NULL);
+
+    for (ptr = name; *p && !isspace((*p)&255) && *p != '=' && *p != '>';)
+      if (ptr < (name + sizeof(name) - 1))
+        *ptr++ = *p++;
+      else
+        p ++;
+
+    *ptr = '\0';
+
+    if (isspace((*p)&255) || !*p || *p == '>')
+      buf[0] = '\0';
+    else
+    {
+      if (*p == '=')
+        p ++;
+
+      for (ptr = buf; *p && !isspace((*p)&255) && *p != '>';)
+        if (*p == '\'' || *p == '\"')
+	{
+	  quote = *p++;
+
+	  while (*p && *p != quote)
+	    if ((ptr - buf + 1) < bufsize)
+	      *ptr++ = *p++;
+	    else
+	      p ++;
+
+          if (*p == quote)
+	    p ++;
+	}
+	else if ((ptr - buf + 1) < bufsize)
+	  *ptr++ = *p++;
+	else
+	  p ++;
+
+      *ptr = '\0';
+    }
+
+    if (strcasecmp(n, name) == 0)
+      return (buf);
+    else
+      buf[0] = '\0';
+
+    if (*p == '>')
+      return (NULL);
+  }
+
+  return (NULL);
+}
+
+
+/** Gets a color attribute. */
+fltk3::Color				// O - Color value
+fltk3::HelpView::get_color(const char *n,	// I - Color name
+                        fltk3::Color   c)	// I - Default color value
+{
+  int	i;				// Looping var
+  int	rgb, r, g, b;			// RGB values
+  static const struct {			// Color name table
+    const char *name;
+    int r, g, b;
+  }	colors[] = {
+    { "black",		0x00, 0x00, 0x00 },
+    { "red",		0xff, 0x00, 0x00 },
+    { "green",		0x00, 0x80, 0x00 },
+    { "yellow",		0xff, 0xff, 0x00 },
+    { "blue",		0x00, 0x00, 0xff },
+    { "magenta",	0xff, 0x00, 0xff },
+    { "fuchsia",	0xff, 0x00, 0xff },
+    { "cyan",		0x00, 0xff, 0xff },
+    { "aqua",		0x00, 0xff, 0xff },
+    { "white",		0xff, 0xff, 0xff },
+    { "gray",		0x80, 0x80, 0x80 },
+    { "grey",		0x80, 0x80, 0x80 },
+    { "lime",		0x00, 0xff, 0x00 },
+    { "maroon",		0x80, 0x00, 0x00 },
+    { "navy",		0x00, 0x00, 0x80 },
+    { "olive",		0x80, 0x80, 0x00 },
+    { "purple",		0x80, 0x00, 0x80 },
+    { "silver",		0xc0, 0xc0, 0xc0 },
+    { "teal",		0x00, 0x80, 0x80 }
+  };
+
+
+  if (!n || !n[0]) return c;
+
+  if (n[0] == '#') {
+    // Do hex color lookup
+    rgb = strtol(n + 1, NULL, 16);
+
+    if (strlen(n) > 4) {
+      r = rgb >> 16;
+      g = (rgb >> 8) & 255;
+      b = rgb & 255;
+    } else {
+      r = (rgb >> 8) * 17;
+      g = ((rgb >> 4) & 15) * 17;
+      b = (rgb & 15) * 17;
+    }
+    return (fltk3::rgb_color((uchar)r, (uchar)g, (uchar)b));
+  } else {
+    for (i = 0; i < (int)(sizeof(colors) / sizeof(colors[0])); i ++)
+      if (!strcasecmp(n, colors[i].name)) {
+        return fltk3::rgb_color(colors[i].r, colors[i].g, colors[i].b);
+      }
+    return c;
+  }
+}
+
+
+/** Gets an inline image.
+
+  The image reference count is maintained accordingly, such that
+  the image can be released exactly once when the document is closed.
+
+  \return a pointer to a cached fltk3::SharedImage, if the image can be loaded,
+  	  otherwise a pointer to an internal fltk3::Pixmap (broken_image).
+
+  \todo fltk3::HelpView::get_image() returns a pointer to the internal
+  fltk3::Pixmap broken_image, but this is _not_ compatible with the
+  return type fltk3::SharedImage (release() must not be called).
+*/
+
+/* Implementation note: (A.S. Apr 05, 2009)
+
+  fltk3::HelpView::get_image() uses a static global flag (initial_load)
+  to determine, if it is called from the initial loading of a document
+  (load() or value()), or from resize() or draw().
+
+  A better solution would be to manage all loaded images in an own
+  structure like fltk3::HelpTarget (Fl_Help_Image ?) to avoid using this
+  global flag, but this would break the ABI !
+
+  This should be fixed in FLTK 1.3 !
+
+
+  If initial_load is true, then fltk3::SharedImage::get() is called to
+  load the image, and the reference count of the shared image is
+  increased by one.
+
+  If initial_load is false, then fltk3::SharedImage::find() is called to
+  load the image, and the image is released immediately. This avoids
+  increasing the reference count when calling get_image() from draw()
+  or resize().
+
+  Calling fltk3::SharedImage::find() instead of fltk3::SharedImage::get() avoids
+  doing unnecessary i/o for "broken images" within each resize/redraw.
+
+  Each image must be released exactly once in the destructor or before
+  a new document is loaded: see free_data().
+*/
+
+fltk3::SharedImage *
+fltk3::HelpView::get_image(const char *name, int W, int H) {
+  const char	*localname;		// Local filename
+  char		dir[FLTK3_PATH_MAX];	// Current directory
+  char		temp[FLTK3_PATH_MAX],	// Temporary filename
+		*tempptr;		// Pointer into temporary name
+  fltk3::SharedImage *ip;			// Image pointer...
+
+  // See if the image can be found...
+  if (strchr(directory_, ':') != NULL && strchr(name, ':') == NULL) {
+    if (name[0] == '/') {
+      strlcpy(temp, directory_, sizeof(temp));
+
+      if ((tempptr = strrchr(strchr(directory_, ':') + 3, '/')) != NULL) {
+        strlcpy(tempptr, name, sizeof(temp) - (tempptr - temp));
+      } else {
+        strlcat(temp, name, sizeof(temp));
+      }
+    } else {
+      snprintf(temp, sizeof(temp), "%s/%s", directory_, name);
+    }
+
+    if (link_) localname = (*link_)(this, temp);
+    else localname = temp;
+  } else if (name[0] != '/' && strchr(name, ':') == NULL) {
+    if (directory_[0]) snprintf(temp, sizeof(temp), "%s/%s", directory_, name);
+    else {
+      fltk3::getcwd(dir, sizeof(dir));
+      snprintf(temp, sizeof(temp), "file:%s/%s", dir, name);
+    }
+
+    if (link_) localname = (*link_)(this, temp);
+    else localname = temp;
+  } else if (link_) localname = (*link_)(this, name);
+  else localname = name;
+
+  if (!localname) return 0;
+
+  if (strncmp(localname, "file:", 5) == 0) localname += 5;
+
+  if (initial_load) {
+    if ((ip = fltk3::SharedImage::get(localname, W, H)) == NULL) {
+      ip = (fltk3::SharedImage *)&broken_image;
+    }
+  } else { // draw or resize
+    if ((ip = fltk3::SharedImage::find(localname, W, H)) == NULL) {
+      ip = (fltk3::SharedImage *)&broken_image;
+    } else {
+      ip->release();
+    }
+  }
+
+  return ip;
+}
+
+
+/** Gets a length value, either absolute or %. */
+int
+fltk3::HelpView::get_length(const char *l) {	// I - Value
+  int	val;					// Integer value
+
+  if (!l[0]) return 0;
+
+  val = atoi(l);
+  if (l[strlen(l) - 1] == '%') {
+    if (val > 100) val = 100;
+    else if (val < 0) val = 0;
+
+    int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+    val = val * (hsize_ - scrollsize) / 100;
+  }
+
+  return val;
+}
+
+
+fltk3::HelpLink *fltk3::HelpView::find_link(int xx, int yy)
+{
+  int		i;
+  fltk3::HelpLink	*linkp;
+  for (i = nlinks_, linkp = links_; i > 0; i --, linkp ++) {
+    if (xx >= linkp->x && xx < linkp->w &&
+        yy >= linkp->y && yy < linkp->h)
+      break;
+  }
+  return i ? linkp : 0L;
+}
+
+void fltk3::HelpView::follow_link(fltk3::HelpLink *linkp)
+{
+  char		target[32];	// Current target
+
+  clear_selection();
+
+  strlcpy(target, linkp->name, sizeof(target));
+
+  set_changed();
+
+  if (strcmp(linkp->filename, filename_) != 0 && linkp->filename[0])
+  {
+    char	dir[FLTK3_PATH_MAX];	// Current directory
+    char	temp[FLTK3_PATH_MAX],	// Temporary filename
+	      *tempptr;	// Pointer into temporary filename
+
+
+    if (strchr(directory_, ':') != NULL &&
+        strchr(linkp->filename, ':') == NULL)
+    {
+      if (linkp->filename[0] == '/')
+      {
+        strlcpy(temp, directory_, sizeof(temp));
+        if ((tempptr = strrchr(strchr(directory_, ':') + 3, '/')) != NULL)
+	  strlcpy(tempptr, linkp->filename, sizeof(temp));
+	else
+	  strlcat(temp, linkp->filename, sizeof(temp));
+      }
+      else
+	snprintf(temp, sizeof(temp), "%s/%s", directory_, linkp->filename);
+    }
+    else if (linkp->filename[0] != '/' && strchr(linkp->filename, ':') == NULL)
+    {
+      if (directory_[0])
+	snprintf(temp, sizeof(temp), "%s/%s", directory_, linkp->filename);
+      else
+      {
+	  fltk3::getcwd(dir, sizeof(dir));
+	snprintf(temp, sizeof(temp), "file:%s/%s", dir, linkp->filename);
+      }
+    }
+    else
+      strlcpy(temp, linkp->filename, sizeof(temp));
+
+    if (linkp->name[0])
+      snprintf(temp + strlen(temp), sizeof(temp) - strlen(temp), "#%s",
+	       linkp->name);
+
+    load(temp);
+  }
+  else if (target[0])
+    topline(target);
+  else
+    topline(0);
+
+  leftline(0);
+}
+
+/** Removes the current text selection. */
+void fltk3::HelpView::clear_selection()
+{
+  if (current_view==this)
+    clear_global_selection();
+}
+/** Selects all the text in the view. */
+void fltk3::HelpView::select_all()
+{
+  clear_global_selection();
+  if (!value_) return;
+  current_view = this;
+  selection_drag_last = selection_last = strlen(value_);
+  selected = 1;
+}
+
+void fltk3::HelpView::clear_global_selection()
+{
+  if (selected) redraw();
+  selection_push_first = selection_push_last = 0;
+  selection_drag_first = selection_drag_last = 0;
+  selection_first = selection_last = 0;
+  selected = 0;
+}
+
+char fltk3::HelpView::begin_selection()
+{
+  clear_global_selection();
+
+  if (!fl_help_view_buffer) fl_help_view_buffer = fl_create_offscreen(1, 1);
+
+  mouse_x = fltk3::event_x();
+  mouse_y = fltk3::event_y();
+  draw_mode = 1;
+
+    current_view = this;
+    fl_begin_offscreen(fl_help_view_buffer);
+    draw();
+    fl_end_offscreen();
+
+  draw_mode = 0;
+
+  if (selection_push_last) return 1;
+  else return 0;
+}
+
+char fltk3::HelpView::extend_selection()
+{
+  if (fltk3::event_is_click())
+    return 0;
+
+//  printf("old selection_first=%d, selection_last=%d\n",
+//         selection_first, selection_last);
+
+  int sf = selection_first, sl = selection_last;
+
+  selected = 1;
+  mouse_x = fltk3::event_x();
+  mouse_y = fltk3::event_y();
+  draw_mode = 2;
+
+    fl_begin_offscreen(fl_help_view_buffer);
+    draw();
+    fl_end_offscreen();
+
+  draw_mode = 0;
+
+  if (selection_push_first < selection_drag_first) {
+    selection_first = selection_push_first;
+  } else {
+    selection_first = selection_drag_first;
+  }
+
+  if (selection_push_last > selection_drag_last) {
+    selection_last = selection_push_last;
+  } else {
+    selection_last = selection_drag_last;
+  }
+
+//  printf("new selection_first=%d, selection_last=%d\n",
+//         selection_first, selection_last);
+
+  if (sf!=selection_first || sl!=selection_last) {
+//    puts("REDRAW!!!\n");
+    return 1;
+  } else {
+//    puts("");
+    return 0;
+  }
+}
+
+// convert a command with up to four letters into an unsigned int
+static unsigned int command(const char *cmd)
+{
+  unsigned int ret = (tolower(cmd[0])<<24);
+  char c = cmd[1];
+  if (c=='>' || c==' ' || c==0) return ret;
+  ret |= (tolower(c)<<16);
+  c = cmd[2];
+  if (c=='>' || c==' ' || c==0) return ret;
+  ret |= (tolower(c)<<8);
+  c = cmd[3];
+  if (c=='>' || c==' ' || c==0) return ret;
+  ret |= tolower(c);
+  c = cmd[4];
+  if (c=='>' || c==' ' || c==0) return ret;
+  return 0;
+}
+
+#define CMD(a, b, c, d) ((a<<24)|(b<<16)|(c<<8)|d)
+
+void fltk3::HelpView::end_selection(int clipboard) 
+{
+  if (!selected || current_view!=this) 
+    return;
+  // convert the select part of our html text into some kind of somewhat readable ASCII
+  // and store it in the selection buffer
+  char p = 0, pre = 0;;
+  int len = strlen(value_);
+  char *txt = (char*)malloc(len+1), *d = txt;
+  const char *s = value_, *cmd, *src;
+  for (;;) {
+    char c = *s++;
+    if (c==0) break;
+    if (c=='<') { // begin of some html command. Skip until we find a '>'
+      cmd = s;
+      for (;;) {
+        c = *s++;
+        if (c==0 || c=='>') break;
+      }
+      if (c==0) break;
+      // do something with this command... .
+      // the replacement string must not be longer that the command itself plus '<' and '>'
+      src = 0;
+      switch (command(cmd)) {
+        case CMD('p','r','e', 0 ): pre = 1; break;
+        case CMD('/','p','r','e'): pre = 0; break;
+        case CMD('t','d', 0 , 0 ):
+        case CMD('p', 0 , 0 , 0 ):
+        case CMD('/','p', 0 , 0 ):
+        case CMD('b','r', 0 , 0 ): src = "\n"; break;
+        case CMD('l','i', 0 , 0 ): src = "\n * "; break;
+        case CMD('/','h','1', 0 ):
+        case CMD('/','h','2', 0 ):
+        case CMD('/','h','3', 0 ):
+        case CMD('/','h','4', 0 ):
+        case CMD('/','h','5', 0 ):
+        case CMD('/','h','6', 0 ): src = "\n\n"; break;
+        case CMD('t','r', 0 , 0 ):
+        case CMD('h','1', 0 , 0 ):
+        case CMD('h','2', 0 , 0 ):
+        case CMD('h','3', 0 , 0 ):
+        case CMD('h','4', 0 , 0 ):
+        case CMD('h','5', 0 , 0 ):
+        case CMD('h','6', 0 , 0 ): src = "\n\n"; break;
+        case CMD('d','t', 0 , 0 ): src = "\n "; break;
+        case CMD('d','d', 0 , 0 ): src = "\n - "; break;
+      }
+      int n = s-value_;
+      if (src && n>selection_first && n<=selection_last) {
+        while (*src) {
+          *d++ = *src++;
+        }
+        c = src[-1];
+        p = isspace(c&255) ? ' ' : c;
+      }
+      continue;
+    }
+    if (c=='&') { // special characters
+      int xx = quote_char(s);
+      if (xx>=0) {
+        c = (char)xx;
+        for (;;) {
+          char cc = *s++;
+          if (!cc || cc==';') break;
+        }
+      }
+    }
+    int n = s-value_;
+    if (n>selection_first && n<=selection_last) {
+      if (!pre && isspace(c&255)) c = ' ';
+      if (p!=' '||c!=' ')
+        *d++ = c;
+      p = c;
+    }
+  }
+  *d = 0;
+  fltk3::copy(txt, strlen(txt), clipboard);
+  free(txt);
+}
+
+/** Handles events in the widget. */
+int				// O - 1 if we handled it, 0 otherwise
+fltk3::HelpView::handle(int event)	// I - Event to handle
+{
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  static fltk3::HelpLink *linkp;   // currently clicked link
+
+  int xx = fltk3::event_x() - x() + leftline_;
+  int yy = fltk3::event_y() - y() + topline_;
+
+  switch (event)
+  {
+    case fltk3::FOCUS:
+      redraw();
+      return 1;
+    case fltk3::UNFOCUS:
+      clear_selection();
+      redraw();
+      return 1;
+    case fltk3::ENTER :
+      Group::handle(event);
+      return 1;
+    case fltk3::LEAVE :
+      fltk3::cursor(fltk3::CURSOR_DEFAULT);
+      break;
+    case fltk3::MOVE:
+      if (find_link(xx, yy)) fltk3::cursor(fltk3::CURSOR_HAND);
+      else fltk3::cursor(fltk3::CURSOR_DEFAULT);
+      return 1;
+    case fltk3::PUSH:
+      if (Group::handle(event)) return 1;
+      linkp = find_link(xx, yy);
+      if (linkp) {
+        fltk3::cursor(fltk3::CURSOR_HAND);
+        return 1;
+      }
+      if (begin_selection()) {
+        fltk3::cursor(fltk3::CURSOR_INSERT);
+        return 1;
+      }
+      fltk3::cursor(fltk3::CURSOR_DEFAULT);
+      return 1;
+    case fltk3::DRAG:
+      if (linkp) {
+        if (fltk3::event_is_click()) {
+          fltk3::cursor(fltk3::CURSOR_HAND);
+        } else {
+          fltk3::cursor(fltk3::CURSOR_DEFAULT); // should be "fltk3::CURSOR_CANCEL" if we had it
+        }
+        return 1;
+      }
+      if (current_view==this && selection_push_last) {
+        if (extend_selection()) redraw();
+        fltk3::cursor(fltk3::CURSOR_INSERT);
+        return 1;
+      }
+      fltk3::cursor(fltk3::CURSOR_DEFAULT);
+      return 1;
+    case fltk3::RELEASE:
+      if (linkp) {
+        if (fltk3::event_is_click()) {
+          follow_link(linkp);
+        }
+        fltk3::cursor(fltk3::CURSOR_DEFAULT);
+        linkp = 0;
+        return 1;
+      }
+      if (current_view==this && selection_push_last) {
+        end_selection();
+        return 1;
+      }
+      return 1;
+    case fltk3::SHORTCUT: {
+      if (fltk3::event_state() == fltk3::COMMAND) {
+        switch ( fltk3::event_key() ) {
+          case 'a': select_all(); redraw(); return 1;
+          case 'c':
+          case 'x': end_selection(1); return 1;
+        }
+      }
+      break; }
+  }
+  return (Group::handle(event));
+}
+
+/** 
+  The constructor creates the fltk3::HelpView widget at the specified
+  position and size.
+*/
+fltk3::HelpView::HelpView(int        xx,	// I - Left position
+                	   int        yy,	// I - Top position
+			   int        ww,	// I - Width in pixels
+			   int        hh,	// I - Height in pixels
+			   const char *l)
+    : fltk3::Group(xx, yy, ww, hh, l),
+      scrollbar_(xx + ww - fltk3::scrollbar_size(), yy,
+                 fltk3::scrollbar_size(), hh - fltk3::scrollbar_size()),
+      hscrollbar_(xx, yy + hh - fltk3::scrollbar_size(),
+                  ww - fltk3::scrollbar_size(), fltk3::scrollbar_size())
+{
+  color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
+
+  title_[0]     = '\0';
+  defcolor_     = fltk3::FOREGROUND_COLOR;
+  bgcolor_      = fltk3::BACKGROUND_COLOR;
+  textcolor_    = fltk3::FOREGROUND_COLOR;
+  linkcolor_    = fltk3::SELECTION_COLOR;
+  textfont_     = fltk3::TIMES;
+  textsize_     = 12;
+  value_        = NULL;
+
+  ablocks_      = 0;
+  nblocks_      = 0;
+  blocks_       = (fltk3::HelpBlock *)0;
+
+  link_         = (fltk3::HelpFunc *)0;
+
+  alinks_       = 0;
+  nlinks_       = 0;
+  links_        = (fltk3::HelpLink *)0;
+
+  atargets_     = 0;
+  ntargets_     = 0;
+  targets_      = (fltk3::HelpTarget *)0;
+
+  directory_[0] = '\0';
+  filename_[0]  = '\0';
+
+  topline_      = 0;
+  leftline_     = 0;
+  size_         = 0;
+  hsize_        = 0;
+  scrollbar_size_ = 0;
+
+  scrollbar_.value(0, hh, 0, 1);
+  scrollbar_.step(8.0);
+  scrollbar_.show();
+  scrollbar_.callback(scrollbar_callback);
+
+  hscrollbar_.value(0, ww, 0, 1);
+  hscrollbar_.step(8.0);
+  hscrollbar_.show();
+  hscrollbar_.callback(hscrollbar_callback);
+  hscrollbar_.type(fltk3::HORIZONTAL);
+  end();
+
+  resize(xx, yy, ww, hh);
+}
+
+
+/** Destroys the fltk3::HelpView widget.
+
+  The destructor destroys the widget and frees all memory that has been
+  allocated for the current document.
+*/
+fltk3::HelpView::~HelpView()
+{
+  clear_selection();
+  free_data();
+}
+
+
+/** Loads the specified file.
+
+  This method loads the specified file or URL.
+*/
+int				// O - 0 on success, -1 on error
+fltk3::HelpView::load(const char *f)// I - Filename to load (may also have target)
+{
+  FILE		*fp;		// File to read from
+  long		len;		// Length of file
+  char		*target;	// Target in file
+  char		*slash;		// Directory separator
+  const char	*localname;	// Local filename
+  char		error[1024];	// Error buffer
+  char		newname[FLTK3_PATH_MAX];	// New filename buffer
+
+  // printf("load(%s)\n",f); fflush(stdout);
+
+  if (strncmp(f, "ftp:", 4) == 0 ||
+      strncmp(f, "http:", 5) == 0 ||
+      strncmp(f, "https:", 6) == 0 ||
+      strncmp(f, "ipp:", 4) == 0 ||
+      strncmp(f, "mailto:";, 7) == 0 ||
+      strncmp(f, "news:";, 5) == 0) {
+    char urimsg[FLTK3_PATH_MAX];
+    if ( fltk3::open_uri(f, urimsg, sizeof(urimsg)) == 0 ) {
+      clear_selection();
+
+      strlcpy(newname, f, sizeof(newname));
+      if ((target = strrchr(newname, '#')) != NULL)
+	*target++ = '\0';
+
+      if (link_)
+	localname = (*link_)(this, newname);
+      else
+	localname = filename_;
+
+      if (!localname)
+	return (0);
+
+      free_data();
+
+      strlcpy(filename_, newname, sizeof(filename_));
+      strlcpy(directory_, newname, sizeof(directory_));
+
+      // Note: We do not support Windows backslashes, since they are illegal
+      //       in URLs...
+      if ((slash = strrchr(directory_, '/')) == NULL)
+	directory_[0] = '\0';
+      else if (slash > directory_ && slash[-1] != '/')
+	*slash = '\0';
+
+      snprintf(error, sizeof(error),
+	       "<HTML><HEAD><TITLE>Error</TITLE></HEAD>"
+	       "<BODY><H1>Error</H1>"
+	       "<P>Unable to follow the link \"%s\" - "
+	       "%s.</P></BODY>",
+	       f, urimsg);
+      value(error);
+      //return(-1);
+    }
+    return(0);
+  }
+
+  clear_selection();
+
+  strlcpy(newname, f, sizeof(newname));
+  if ((target = strrchr(newname, '#')) != NULL)
+    *target++ = '\0';
+
+  if (link_)
+    localname = (*link_)(this, newname);
+  else
+    localname = filename_;
+
+  if (!localname)
+    return (0);
+
+  free_data();
+
+  strlcpy(filename_, newname, sizeof(filename_));
+  strlcpy(directory_, newname, sizeof(directory_));
+
+  // Note: We do not support Windows backslashes, since they are illegal
+  //       in URLs...
+  if ((slash = strrchr(directory_, '/')) == NULL)
+    directory_[0] = '\0';
+  else if (slash > directory_ && slash[-1] != '/')
+    *slash = '\0';
+
+  if (strncmp(localname, "file:", 5) == 0)
+    localname += 5;	// Adjust for local filename...
+
+  if ((fp = fltk3::fopen(localname, "rb")) != NULL)
+  {
+    fseek(fp, 0, SEEK_END);
+    len = ftell(fp);
+    rewind(fp);
+
+    value_ = (const char *)calloc(len + 1, 1);
+    if (fread((void *)value_, 1, len, fp)==0) { /* use default 0 */ }
+    fclose(fp);
+  }
+  else
+  {
+    snprintf(error, sizeof(error),
+	     "<HTML><HEAD><TITLE>Error</TITLE></HEAD>"
+	     "<BODY><H1>Error</H1>"
+	     "<P>Unable to follow the link \"%s\" - "
+	     "%s.</P></BODY>",
+	     localname, strerror(errno));
+    value_ = strdup(error);
+  }
+
+  initial_load = 1;
+  format();
+  initial_load = 0;
+
+  if (target)
+    topline(target);
+  else
+    topline(0);
+
+  return (0);
+}
+
+
+/** Resizes the help widget. */
+
+void
+fltk3::HelpView::resize(int xx,	// I - New left position
+                     int yy,	// I - New top position
+		     int ww,	// I - New width
+		     int hh)	// I - New height
+{
+  fltk3::Boxtype		b = box() ? box() : fltk3::DOWN_BOX;
+					// Box to draw...
+
+
+  Widget::resize(xx, yy, ww, hh);
+
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  scrollbar_.resize(x() + w() - scrollsize - fltk3::box_dw(b) + fltk3::box_dx(b),
+                    y() + fltk3::box_dy(b), scrollsize, h() - scrollsize - fltk3::box_dh(b));
+  hscrollbar_.resize(x() + fltk3::box_dx(b),
+                     y() + h() - scrollsize - fltk3::box_dh(b) + fltk3::box_dy(b),
+                     w() - scrollsize - fltk3::box_dw(b), scrollsize);
+
+  format();
+}
+
+
+/** Scrolls the text to the indicated position, given a named destination.
+
+  \param[in] n target name
+*/
+void
+fltk3::HelpView::topline(const char *n)	// I - Target name
+{
+  fltk3::HelpTarget key,			// Target name key
+		*target;		// Pointer to matching target
+
+
+  if (ntargets_ == 0)
+    return;
+
+  strlcpy(key.name, n, sizeof(key.name));
+
+  target = (fltk3::HelpTarget *)bsearch(&key, targets_, ntargets_, sizeof(fltk3::HelpTarget),
+                                 (compare_func_t)compare_targets);
+
+  if (target != NULL)
+    topline(target->y);
+}
+
+
+/** Scrolls the text to the indicated position, given a pixel line.
+
+  If the given pixel value \p top is out of range, then the text is
+  scrolled to the top or bottom of the document, resp.
+
+  \param[in] top top line number in pixels (0 = start of document)
+*/
+void
+fltk3::HelpView::topline(int top)	// I - Top line number
+{
+  if (!value_)
+    return;
+
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  if (size_ < (h() - scrollsize) || top < 0)
+    top = 0;
+  else if (top > size_)
+    top = size_;
+
+  topline_ = top;
+
+  scrollbar_.value(topline_, h() - scrollsize, 0, size_);
+
+  do_callback();
+
+  redraw();
+}
+
+
+/** Scrolls the text to the indicated position, given a pixel column.
+
+  If the given pixel value \p left is out of range, then the text is
+  scrolled to the left or right side of the document, resp.
+
+  \param[in] left left column number in pixels (0 = left side)
+*/
+void
+fltk3::HelpView::leftline(int left)	// I - Left position
+{
+  if (!value_)
+    return;
+
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  if (hsize_ < (w() - scrollsize) || left < 0)
+    left = 0;
+  else if (left > hsize_)
+    left = hsize_;
+
+  leftline_ = left;
+
+  hscrollbar_.value(leftline_, w() - scrollsize, 0, hsize_);
+
+  redraw();
+}
+
+
+/** Sets the current help text buffer to the string provided and reformats the text.
+
+  The provided character string \p val is copied internally and will be
+  freed when value() is called again, or when the widget is destroyed.
+
+  If \p val is NULL, then the widget is cleared.
+*/
+void
+fltk3::HelpView::value(const char *val)	// I - Text to view
+{
+  clear_selection();
+  free_data();
+  set_changed();
+
+  if (!val)
+    return;
+
+  value_ = strdup(val);
+
+  initial_load = 1;
+  format();
+  initial_load = 0;
+
+  topline(0);
+  leftline(0);
+}
+
+
+#ifdef ENC
+# undef ENC
+#endif
+// part b in the table seems to be mac_roman - beku
+# define ENC(a, b) a
+
+
+/** Returns the character code associated with a quoted char. */
+static int			// O - Code or -1 on error
+quote_char(const char *p) {	// I - Quoted string
+  int	i;			// Looping var
+  static struct {
+    const char	*name;
+    int		namelen;
+    int		code;
+  }	*nameptr,		// Pointer into name array
+	names[] = {		// Quoting names
+    { "Aacute;", 7, ENC(193,231) },
+    { "aacute;", 7, ENC(225,135) },
+    { "Acirc;",  6, ENC(194,229) },
+    { "acirc;",  6, ENC(226,137) },
+    { "acute;",  6, ENC(180,171) },
+    { "AElig;",  6, ENC(198,174) },
+    { "aelig;",  6, ENC(230,190) },
+    { "Agrave;", 7, ENC(192,203) },
+    { "agrave;", 7, ENC(224,136) },
+    { "amp;",    4, ENC('&','&') },
+    { "Aring;",  6, ENC(197,129) },
+    { "aring;",  6, ENC(229,140) },
+    { "Atilde;", 7, ENC(195,204) },
+    { "atilde;", 7, ENC(227,139) },
+    { "Auml;",   5, ENC(196,128) },
+    { "auml;",   5, ENC(228,138) },
+    { "brvbar;", 7, ENC(166, -1) },
+    { "bull;",   5, ENC(149,165) },
+    { "Ccedil;", 7, ENC(199,199) },
+    { "ccedil;", 7, ENC(231,141) },
+    { "cedil;",  6, ENC(184,252) },
+    { "cent;",   5, ENC(162,162) },
+    { "copy;",   5, ENC(169,169) },
+    { "curren;", 7, ENC(164, -1) },
+    { "deg;",    4, ENC(176,161) },
+    { "divide;", 7, ENC(247,214) },
+    { "Eacute;", 7, ENC(201,131) },
+    { "eacute;", 7, ENC(233,142) },
+    { "Ecirc;",  6, ENC(202,230) },
+    { "ecirc;",  6, ENC(234,144) },
+    { "Egrave;", 7, ENC(200,233) },
+    { "egrave;", 7, ENC(232,143) },
+    { "ETH;",    4, ENC(208, -1) },
+    { "eth;",    4, ENC(240, -1) },
+    { "Euml;",   5, ENC(203,232) },
+    { "euml;",   5, ENC(235,145) },
+    { "euro;",   5, ENC(128,219) },
+    { "frac12;", 7, ENC(189, -1) },
+    { "frac14;", 7, ENC(188, -1) },
+    { "frac34;", 7, ENC(190, -1) },
+    { "gt;",     3, ENC('>','>') },
+    { "Iacute;", 7, ENC(205,234) },
+    { "iacute;", 7, ENC(237,146) },
+    { "Icirc;",  6, ENC(206,235) },
+    { "icirc;",  6, ENC(238,148) },
+    { "iexcl;",  6, ENC(161,193) },
+    { "Igrave;", 7, ENC(204,237) },
+    { "igrave;", 7, ENC(236,147) },
+    { "iquest;", 7, ENC(191,192) },
+    { "Iuml;",   5, ENC(207,236) },
+    { "iuml;",   5, ENC(239,149) },
+    { "laquo;",  6, ENC(171,199) },
+    { "lt;",     3, ENC('<','<') },
+    { "macr;",   5, ENC(175,248) },
+    { "micro;",  6, ENC(181,181) },
+    { "middot;", 7, ENC(183,225) },
+    { "nbsp;",   5, ENC(' ',' ') },
+    { "not;",    4, ENC(172,194) },
+    { "Ntilde;", 7, ENC(209,132) },
+    { "ntilde;", 7, ENC(241,150) },
+    { "Oacute;", 7, ENC(211,238) },
+    { "oacute;", 7, ENC(243,151) },
+    { "Ocirc;",  6, ENC(212,239) },
+    { "ocirc;",  6, ENC(244,153) },
+    { "Ograve;", 7, ENC(210,241) },
+    { "ograve;", 7, ENC(242,152) },
+    { "ordf;",   5, ENC(170,187) },
+    { "ordm;",   5, ENC(186,188) },
+    { "Oslash;", 7, ENC(216,175) },
+    { "oslash;", 7, ENC(248,191) },
+    { "Otilde;", 7, ENC(213,205) },
+    { "otilde;", 7, ENC(245,155) },
+    { "Ouml;",   5, ENC(214,133) },
+    { "ouml;",   5, ENC(246,154) },
+    { "para;",   5, ENC(182,166) },
+    { "premil;", 7, ENC(137,228) },
+    { "plusmn;", 7, ENC(177,177) },
+    { "pound;",  6, ENC(163,163) },
+    { "quot;",   5, ENC('\"','\"') },
+    { "raquo;",  6, ENC(187,200) },
+    { "reg;",    4, ENC(174,168) },
+    { "sect;",   5, ENC(167,164) },
+    { "shy;",    4, ENC(173,'-') },
+    { "sup1;",   5, ENC(185, -1) },
+    { "sup2;",   5, ENC(178, -1) },
+    { "sup3;",   5, ENC(179, -1) },
+    { "szlig;",  6, ENC(223,167) },
+    { "THORN;",  6, ENC(222, -1) },
+    { "thorn;",  6, ENC(254, -1) },
+    { "times;",  6, ENC(215,'x') },
+    { "trade;",  6, ENC(153,170) },
+    { "Uacute;", 7, ENC(218,242) },
+    { "uacute;", 7, ENC(250,156) },
+    { "Ucirc;",  6, ENC(219,243) },
+    { "ucirc;",  6, ENC(251,158) },
+    { "Ugrave;", 7, ENC(217,244) },
+    { "ugrave;", 7, ENC(249,157) },
+    { "uml;",    4, ENC(168,172) },
+    { "Uuml;",   5, ENC(220,134) },
+    { "uuml;",   5, ENC(252,159) },
+    { "Yacute;", 7, ENC(221, -1) },
+    { "yacute;", 7, ENC(253, -1) },
+    { "yen;",    4, ENC(165,180) },
+    { "Yuml;",   5, ENC(159,217) },
+    { "yuml;",   5, ENC(255,216) }
+  };
+
+  if (!strchr(p, ';')) return -1;
+  if (*p == '#') {
+    if (*(p+1) == 'x' || *(p+1) == 'X') return strtol(p+2, NULL, 16);
+    else return atoi(p+1);
+  }
+  for (i = (int)(sizeof(names) / sizeof(names[0])), nameptr = names; i > 0; i --, nameptr ++)
+    if (strncmp(p, nameptr->name, nameptr->namelen) == 0)
+      return nameptr->code;
+
+  return -1;
+}
+
+
+/** The vertical scrollbar callback. */
+static void
+scrollbar_callback(fltk3::Widget *s, void *)
+{
+  ((fltk3::HelpView *)(s->parent()))->topline(int(((fltk3::Scrollbar*)s)->value()));
+}
+
+
+/** The horizontal scrollbar callback. */
+static void
+hscrollbar_callback(fltk3::Widget *s, void *)
+{
+  ((fltk3::HelpView *)(s->parent()))->leftline(int(((fltk3::Scrollbar*)s)->value()));
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Help_View.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,592 @@
+//
+// "$Id$"
+//
+// Image drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include <fltk3/Widget.h>
+#include <fltk3/MenuItem.h>
+#include <fltk3/Image.h>
+#include "flstring.h"
+
+#ifdef WIN32
+void fl_release_dc(HWND, HDC); // from Fl_win32.cxx
+#endif
+
+namespace fltk3 {
+  void restore_clip(); // from fltk3::rect.cxx
+}
+
+//
+// Base image class...
+//
+
+/**
+  The destructor is a virtual method that frees all memory used
+  by the image.
+*/
+fltk3::Image::~Image() {
+}
+
+/**
+  If the image has been cached for display, delete the cache
+  data. This allows you to change the data used for the image and
+  then redraw it without recreating an image object.
+*/
+void fltk3::Image::uncache() {
+}
+
+void fltk3::Image::draw(int XP, int YP, int, int, int, int) {
+  draw_empty(XP, YP);
+}
+
+/**
+  The protected method draw_empty() draws a box with
+  an X in it. It can be used to draw any image that lacks image
+  data.
+*/
+void fltk3::Image::draw_empty(int X, int Y) {
+  if (w() > 0 && h() > 0) {
+    fltk3::color(fltk3::FOREGROUND_COLOR);
+    fltk3::rect(X, Y, w(), h());
+    fltk3::line(X, Y, X + w() - 1, Y + h() - 1);
+    fltk3::line(X, Y + h() - 1, X + w() - 1, Y);
+  }
+}
+
+/**
+  The copy() method creates a copy of the specified
+  image. If the width and height are provided, the image is
+  resized to the specified size. The image should be deleted (or in
+  the case of fltk3::SharedImage, released) when you are done
+  with it.
+*/
+fltk3::Image *fltk3::Image::copy(int W, int H) {
+  return new fltk3::Image(W, H, d());
+}
+
+/**
+  The color_average() method averages the colors in
+  the image with the FLTK color value c. The i
+  argument specifies the amount of the original image to combine
+  with the color, so a value of 1.0 results in no color blend, and
+  a value of 0.0 results in a constant image of the specified
+  color. <I>The original image data is not altered by this
+  method.</I>
+*/
+void fltk3::Image::color_average(fltk3::Color, float) {
+}
+
+/**
+  The desaturate() method converts an image to
+  grayscale. If the image contains an alpha channel (depth = 4),
+  the alpha channel is preserved. <I>This method does not alter
+  the original image data.</I>
+*/
+void fltk3::Image::desaturate() {
+}
+
+/**
+  The label() methods are an obsolete way to set the
+  image attribute of a widget or menu item. Use the
+  image() or deimage() methods of the
+  fltk3::Widget and fltk3::MenuItem classes
+  instead.
+*/
+void fltk3::Image::label(fltk3::Widget* widget) {
+  widget->image(this);
+}
+
+/**
+  The label() methods are an obsolete way to set the
+  image attribute of a widget or menu item. Use the
+  image() or deimage() methods of the
+  fltk3::Widget and fltk3::MenuItem classes
+  instead.
+*/
+void fltk3::Image::label(fltk3::MenuItem* m) {
+  fltk3::set_labeltype(fltk3::IMAGE_LABEL, labeltype, measure);
+  m->label(fltk3::IMAGE_LABEL, (const char*)this);
+}
+
+void
+fltk3::Image::labeltype(const fltk3::Label *lo,		// I - Label
+                    int            lx,		// I - X position
+		    int            ly,		// I - Y position
+		    int            lw,		// I - Width of label
+		    int            lh,		// I - Height of label
+		    fltk3::Align       la) {	// I - Alignment
+  fltk3::Image	*img;				// Image pointer
+  int		cx, cy;				// Image position
+
+  img = (fltk3::Image *)(lo->value);
+
+  if (la & fltk3::ALIGN_LEFT) cx = 0;
+  else if (la & fltk3::ALIGN_RIGHT) cx = img->w() - lw;
+  else cx = (img->w() - lw) / 2;
+
+  if (la & fltk3::ALIGN_TOP) cy = 0;
+  else if (la & fltk3::ALIGN_BOTTOM) cy = img->h() - lh;
+  else cy = (img->h() - lh) / 2;
+
+  fltk3::color((fltk3::Color)lo->color);
+
+  img->draw(lx, ly, lw, lh, cx, cy);
+}
+
+void
+fltk3::Image::measure(const fltk3::Label *lo,		// I - Label
+                  int            &lw,		// O - Width of image
+		  int            &lh) {		// O - Height of image
+  fltk3::Image *img;				// Image pointer
+
+  img = (fltk3::Image *)(lo->value);
+
+  lw = img->w();
+  lh = img->h();
+}
+
+
+//
+// RGB image class...
+//
+/**  The destructor free all memory and server resources that are used by  the image. */
+fltk3::RGBImage::~RGBImage() {
+  uncache();
+  if (alloc_array) delete[] (uchar *)array;
+}
+
+void fltk3::RGBImage::uncache() {
+#ifdef __APPLE_QUARTZ__
+  if (id_) {
+    CGImageRelease((CGImageRef)id_);
+    id_ = 0;
+  }
+#else
+  if (id_) {
+    fl_delete_offscreen((fltk3::Offscreen)id_);
+    id_ = 0;
+  }
+
+  if (mask_) {
+    fl_delete_bitmask((fltk3::Bitmask)mask_);
+    mask_ = 0;
+  }
+#endif
+}
+
+fltk3::Image *fltk3::RGBImage::copy(int W, int H) {
+  fltk3::RGBImage	*new_image;	// New RGB image
+  uchar		*new_array;	// New array for image data
+
+  // Optimize the simple copy where the width and height are the same,
+  // or when we are copying an empty image...
+  if ((W == w() && H == h()) ||
+      !w() || !h() || !d() || !array) {
+    if (array) {
+      // Make a copy of the image data and return a new fltk3::RGBImage...
+      new_array = new uchar[w() * h() * d()];
+      if (ld() && ld()!=w()*d()) {
+        const uchar *src = array;
+        uchar *dst = new_array;
+        int dy, dh = h(), wd = w()*d(), wld = ld();
+        for (dy=0; dy<dh; dy++) {
+          memcpy(dst, src, wd);
+          src += wld;
+          dst += wd;
+        }
+      } else {
+        memcpy(new_array, array, w() * h() * d());
+      }
+      new_image = new fltk3::RGBImage(new_array, w(), h(), d());
+      new_image->alloc_array = 1;
+
+      return new_image;
+    } else return new fltk3::RGBImage(array, w(), h(), d(), ld());
+  }
+  if (W <= 0 || H <= 0) return 0;
+
+  // OK, need to resize the image data; allocate memory and 
+  uchar		*new_ptr;	// Pointer into new array
+  const uchar	*old_ptr;	// Pointer into old array
+  int		c,		// Channel number
+		sy,		// Source coordinate
+		dx, dy,		// Destination coordinates
+		xerr, yerr,	// X & Y errors
+		xmod, ymod,	// X & Y moduli
+		xstep, ystep,	// X & Y step increments
+    line_d; // stride from line to line
+
+
+  // Figure out Bresenheim step/modulus values...
+  xmod   = w() % W;
+  xstep  = (w() / W) * d();
+  ymod   = h() % H;
+  ystep  = h() / H;
+  line_d = ld() ? ld() : w() * d();
+
+  // Allocate memory for the new image...
+  new_array = new uchar [W * H * d()];
+  new_image = new fltk3::RGBImage(new_array, W, H, d());
+  new_image->alloc_array = 1;
+
+  // Scale the image using a nearest-neighbor algorithm...
+  for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) {
+    for (dx = W, xerr = W, old_ptr = array + sy * line_d; dx > 0; dx --) {
+      for (c = 0; c < d(); c ++) *new_ptr++ = old_ptr[c];
+
+      old_ptr += xstep;
+      xerr    -= xmod;
+
+      if (xerr <= 0) {
+	xerr    += W;
+	old_ptr += d();
+      }
+    }
+
+    sy   += ystep;
+    yerr -= ymod;
+    if (yerr <= 0) {
+      yerr += H;
+      sy ++;
+    }
+  }
+
+  return new_image;
+}
+
+void fltk3::RGBImage::color_average(fltk3::Color c, float i) {
+  // Don't average an empty image...
+  if (!w() || !h() || !d() || !array) return;
+
+  // Delete any existing pixmap/mask objects...
+  uncache();
+
+  // Allocate memory as needed...
+  uchar		*new_array,
+		*new_ptr;
+
+  if (!alloc_array) new_array = new uchar[h() * w() * d()];
+  else new_array = (uchar *)array;
+
+  // Get the color to blend with...
+  uchar		r, g, b;
+  unsigned	ia, ir, ig, ib;
+
+  fltk3::get_color(c, r, g, b);
+  if (i < 0.0f) i = 0.0f;
+  else if (i > 1.0f) i = 1.0f;
+
+  ia = (unsigned)(256 * i);
+  ir = r * (256 - ia);
+  ig = g * (256 - ia);
+  ib = b * (256 - ia);
+
+  // Update the image data to do the blend...
+  const uchar	*old_ptr;
+  int		x, y;
+  int   line_i = ld() ? ld() - (w()*d()) : 0; // increment from line end to beginning of next line
+
+  if (d() < 3) {
+    ig = (r * 31 + g * 61 + b * 8) / 100 * (256 - ia);
+
+    for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += line_i)
+      for (x = 0; x < w(); x ++) {
+	*new_ptr++ = (*old_ptr++ * ia + ig) >> 8;
+	if (d() > 1) *new_ptr++ = *old_ptr++;
+      }
+  } else {
+    for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += line_i)
+      for (x = 0; x < w(); x ++) {
+	*new_ptr++ = (*old_ptr++ * ia + ir) >> 8;
+	*new_ptr++ = (*old_ptr++ * ia + ig) >> 8;
+	*new_ptr++ = (*old_ptr++ * ia + ib) >> 8;
+	if (d() > 3) *new_ptr++ = *old_ptr++;
+      }
+  }
+
+  // Set the new pointers/values as needed...
+  if (!alloc_array) {
+    array       = new_array;
+    alloc_array = 1;
+
+    ld(0);
+  }
+}
+
+void fltk3::RGBImage::desaturate() {
+  // Don't desaturate an empty image...
+  if (!w() || !h() || !d() || !array) return;
+
+  // Can only desaturate color images...
+  if (d() < 3) return;
+
+  // Delete any existing pixmap/mask objects...
+  uncache();
+
+  // Allocate memory for a grayscale image...
+  uchar		*new_array,
+		*new_ptr;
+  int		new_d;
+
+  new_d     = d() - 2;
+  new_array = new uchar[h() * w() * new_d];
+
+  // Copy the image data, converting to grayscale...
+  const uchar	*old_ptr;
+  int		x, y;
+  int   line_i = ld() ? ld() - (w()*d()) : 0; // increment from line end to beginning of next line
+
+  for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += line_i)
+    for (x = 0; x < w(); x ++, old_ptr += d()) {
+      *new_ptr++ = (uchar)((31 * old_ptr[0] + 61 * old_ptr[1] + 8 * old_ptr[2]) / 100);
+      if (d() > 3) *new_ptr++ = old_ptr[3];
+    }
+
+  // Free the old array as needed, and then set the new pointers/values...
+  if (alloc_array) delete[] (uchar *)array;
+
+  array       = new_array;
+  alloc_array = 1;
+
+  ld(0);
+  d(new_d);
+}
+
+#if !defined(WIN32) && !defined(__APPLE_QUARTZ__)
+// Composite an image with alpha on systems that don't have accelerated
+// alpha compositing...
+static void alpha_blend(fltk3::RGBImage *img, int X, int Y, int W, int H, int cx, int cy) {
+  int ld = img->ld();
+  if (ld == 0) ld = img->w() * img->d();
+  uchar *srcptr = (uchar*)img->array + cy * ld + cx * img->d();
+  int srcskip = ld - img->d() * W;
+
+  uchar *dst = new uchar[W * H * 3];
+  uchar *dstptr = dst;
+
+  fltk3::read_image(dst, X, Y, W, H, 0);
+
+  uchar srcr, srcg, srcb, srca;
+  uchar dstr, dstg, dstb, dsta;
+
+  if (img->d() == 2) {
+    // Composite grayscale + alpha over RGB...
+    for (int y = H; y > 0; y--, srcptr+=srcskip)
+      for (int x = W; x > 0; x--) {
+	srcg = *srcptr++;
+	srca = *srcptr++;
+
+	dstr = dstptr[0];
+	dstg = dstptr[1];
+	dstb = dstptr[2];
+	dsta = 255 - srca;
+
+	*dstptr++ = (srcg * srca + dstr * dsta) >> 8;
+	*dstptr++ = (srcg * srca + dstg * dsta) >> 8;
+	*dstptr++ = (srcg * srca + dstb * dsta) >> 8;
+      }
+  } else {
+    // Composite RGBA over RGB...
+    for (int y = H; y > 0; y--, srcptr+=srcskip)
+      for (int x = W; x > 0; x--) {
+	srcr = *srcptr++;
+	srcg = *srcptr++;
+	srcb = *srcptr++;
+	srca = *srcptr++;
+
+	dstr = dstptr[0];
+	dstg = dstptr[1];
+	dstb = dstptr[2];
+	dsta = 255 - srca;
+
+	*dstptr++ = (srcr * srca + dstr * dsta) >> 8;
+	*dstptr++ = (srcg * srca + dstg * dsta) >> 8;
+	*dstptr++ = (srcb * srca + dstb * dsta) >> 8;
+      }
+  }
+
+  fltk3::draw_image(dst, X, Y, W, H, 3, 0);
+
+  delete[] dst;
+}
+#endif // !WIN32 && !__APPLE_QUARTZ__
+
+void fltk3::RGBImage::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
+  fltk3::graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
+}
+
+static int start(fltk3::RGBImage *img, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy, 
+		 int &X, int &Y, int &W, int &H)
+{
+  // account for current clip region (faster on Irix):
+  fltk3::clip_box(XP,YP,WP,HP,X,Y,W,H);
+  cx += X-XP; cy += Y-YP;
+  // clip the box down to the size of image, quit if empty:
+  if (cx < 0) {W += cx; X -= cx; cx = 0;}
+  if (cx+W > w) W = w-cx;
+  if (W <= 0) return 1;
+  if (cy < 0) {H += cy; Y -= cy; cy = 0;}
+  if (cy+H > h) H = h-cy;
+  if (H <= 0) return 1;
+  return 0;
+}
+
+#ifdef __APPLE__
+void fltk3::QuartzGraphicsDriver::draw(fltk3::RGBImage *img, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  // Don't draw an empty image...
+  if (!img->d() || !img->array) {
+    img->draw_empty(XP, YP);
+    return;
+  }
+  if (start(img, XP, YP, WP, HP, img->w(), img->h(), cx, cy, X, Y, W, H)) {
+    return;
+  }
+  if (!img->id_) {
+    CGColorSpaceRef lut = 0;
+    if (img->d()<=2)
+      lut = CGColorSpaceCreateDeviceGray();
+    else
+      lut = CGColorSpaceCreateDeviceRGB();
+    CGDataProviderRef src = CGDataProviderCreateWithData( 0L, img->array, img->w()*img->h()*img->d(), 0L);
+    img->id_ = CGImageCreate( img->w(), img->h(), 8, img->d()*8, img->ld()?img->ld():img->w()*img->d(),
+			lut, (img->d()&1)?kCGImageAlphaNone:kCGImageAlphaLast,
+			src, 0L, false, kCGRenderingIntentDefault);
+    CGColorSpaceRelease(lut);
+    CGDataProviderRelease(src);
+  }
+  if (img->id_ && fl_gc) {
+    CGRect rect = { { X, Y }, { W, H } };
+    Fl_X::q_begin_image(rect, cx, cy, img->w(), img->h());
+    CGContextDrawImage(fl_gc, rect, (CGImageRef)img->id_);
+    Fl_X::q_end_image();
+  }
+}
+
+#elif defined(WIN32)
+void fltk3::GDIGraphicsDriver::draw(fltk3::RGBImage *img, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  // Don't draw an empty image...
+  if (!img->d() || !img->array) {
+    img->draw_empty(XP, YP);
+    return;
+  }
+  if (start(img, XP, YP, WP, HP, img->w(), img->h(), cx, cy, X, Y, W, H)) {
+    return;
+  }
+  if (!img->id_) {
+    img->id_ = fl_create_offscreen(img->w(), img->h());
+    if ((img->d() == 2 || img->d() == 4) && fltk3::can_do_alpha_blending()) {
+      fl_begin_offscreen((fltk3::Offscreen)img->id_);
+      fltk3::draw_image(img->array, 0, 0, img->w(), img->h(), img->d()|fltk3::IMAGE_WITH_ALPHA, img->ld());
+      fl_end_offscreen();
+    } else {
+      fl_begin_offscreen((fltk3::Offscreen)img->id_);
+      fltk3::draw_image(img->array, 0, 0, img->w(), img->h(), img->d(), img->ld());
+      fl_end_offscreen();
+      if (img->d() == 2 || img->d() == 4) {
+        img->mask_ = fl_create_alphamask(img->w(), img->h(), img->d(), img->ld(), img->array);
+      }
+    }
+  }
+  if (img->mask_) {
+    HDC new_gc = CreateCompatibleDC(fl_gc);
+    int save = SaveDC(new_gc);
+    SelectObject(new_gc, (void*)img->mask_);
+    BitBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, SRCAND);
+    SelectObject(new_gc, (void*)img->id_);
+    BitBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, SRCPAINT);
+    RestoreDC(new_gc,save);
+    DeleteDC(new_gc);
+  } else if (img->d()==2 || img->d()==4) {
+    fl_copy_offscreen_with_alpha(X, Y, W, H, (fltk3::Offscreen)img->id_, cx, cy);
+  } else {
+    fl_copy_offscreen(X, Y, W, H, (fltk3::Offscreen)img->id_, cx, cy);
+  }
+}
+
+#else
+void fltk3::XlibGraphicsDriver::draw(fltk3::RGBImage *img, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  // Don't draw an empty image...
+  if (!img->d() || !img->array) {
+    img->draw_empty(XP, YP);
+    return;
+  }
+  if (start(img, XP, YP, WP, HP, img->w(), img->h(), cx, cy, X, Y, W, H)) {
+    return;
+  }
+  if (!img->id_) {
+    if (img->d() == 1 || img->d() == 3) {
+      img->id_ = fl_create_offscreen(img->w(), img->h());
+      fl_begin_offscreen((fltk3::Offscreen)img->id_);
+      fltk3::draw_image(img->array, 0, 0, img->w(), img->h(), img->d(), img->ld());
+      fl_end_offscreen();
+    }
+  }
+  if (img->id_) {
+    if (img->mask_) {
+      // I can't figure out how to combine a mask with existing region,
+      // so cut the image down to a clipped rectangle:
+      int nx, ny; fltk3::clip_box(X,Y,W,H,nx,ny,W,H);
+      cx += nx-X; X = nx;
+      cy += ny-Y; Y = ny;
+      // make X use the bitmap as a mask:
+      XSetClipMask(fl_display, fl_gc, img->mask_);
+      int ox = X-cx; if (ox < 0) ox += img->w();
+      int oy = Y-cy; if (oy < 0) oy += img->h();
+      XSetClipOrigin(fl_display, fl_gc, X-cx, Y-cy);
+    }
+    
+    fl_copy_offscreen(X, Y, W, H, img->id_, cx, cy);
+    
+    if (img->mask_) {
+      // put the old clip region back
+      XSetClipOrigin(fl_display, fl_gc, 0, 0);
+      fltk3::restore_clip();
+    }
+  } else {
+    // Composite image with alpha manually each time...
+    alpha_blend(img, X, Y, W, H, cx, cy);
+  }
+}
+
+#endif
+
+void fltk3::RGBImage::label(fltk3::Widget* widget) {
+  widget->image(this);
+}
+
+void fltk3::RGBImage::label(fltk3::MenuItem* m) {
+  m->label(fltk3::IMAGE_LABEL, (const char*)this);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Input.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Input.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Input.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,824 @@
+//
+// "$Id$"
+//
+// Input widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This is the "user interface", it decodes user actions into what to
+// do to the text.  See also fltk3::Input_.cxx, where the text is actually
+// manipulated (and some ui, in particular the mouse, is done...).
+// In theory you can replace this code with another subclass to change
+// the keybindings.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/Input.h>
+#include <fltk3/draw.h>
+#include <fltk3/ask.h>
+#include "flstring.h"
+
+#if defined(FL_DLL)	// really needed for c'tors for MS VC++ only
+#include <fltk3/FloatInput.H>
+#include <fltk3/IntInput.H>
+#include <fltk3/MultilineInput.H>
+#include <fltk3/Output.H>
+#include <fltk3/MultilineOutput.H>
+#include <fltk3/SecretInput.H>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+
+void fltk3::Input::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (input_type() == fltk3::HIDDEN_INPUT) return;
+  fltk3::Boxtype b = box();
+  if (damage() & fltk3::DAMAGE_ALL) draw_box(b, color());
+  Input_::drawtext(x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+		      w()-fltk3::box_dw(b), h()-fltk3::box_dh(b));
+}
+
+// kludge so shift causes selection to extend:
+int fltk3::Input::shift_position(int p) {
+  return position(p, fltk3::event_state(fltk3::SHIFT) ? mark() : p);
+}
+
+int fltk3::Input::shift_up_down_position(int p) {
+  return up_down_position(p, fltk3::event_state(fltk3::SHIFT));
+}
+
+// Old text from FLTK 1.1 for reference:
+// If you define NORMAL_INPUT_MOVE as zero you will get the peculiar fltk
+// behavior where moving off the end of an input field will move the
+// cursor into the next field:
+// define it as 1 to prevent cursor movement from going to next field:
+//
+// Note: this has been replaced by fltk3::option(fltk3::OPTION_ARROW_FOCUS)
+// in FLTK 1.3.  This option has "inverted" values:
+//   1 = Arrow keys move focus (previously 0)
+//   0 = Arrow keys don't move focus (previously 1)
+// Hence we define ...
+//
+#define NORMAL_INPUT_MOVE (fltk3::option(fltk3::OPTION_ARROW_FOCUS) ? 0 : 1)
+
+#define ctrl(x) ((x)^0x40)
+
+// List of characters that are legal in a floating point input field.
+// This text string is created at run-time to take the current locale
+// into account (for example, continental Europe uses a comma instead
+// of a decimal point). For back compatibility reasons, we always 
+// allow the decimal point.
+#ifdef HAVE_LOCALECONV
+static const char *standard_fp_chars = ".eE+-"; 
+static const char *legal_fp_chars = 0L;
+#else
+static const char *legal_fp_chars = ".eE+-"; 
+#endif
+
+// Move cursor up specified #lines
+//    If OPTION_ARROW_FOCUS is disabled, return 1 to prevent focus navigation.
+//
+int fltk3::Input::kf_lines_up(int repeat_num) {
+  int i = position();
+  if (!line_start(i)) {
+    //UNNEEDED if (input_type()==fltk3::MULTILINE_INPUT && !fltk3::option(fltk3::OPTION_ARROW_FOCUS)) return 1;
+    return NORMAL_INPUT_MOVE;
+  }
+  while(repeat_num--) {
+    i = line_start(i);
+    if (!i) break;
+    i--;
+  }
+  shift_up_down_position(line_start(i));
+  return 1;
+}
+
+// Move cursor down specified #lines
+//    If OPTION_ARROW_FOCUS is disabled, return 1 to prevent focus navigation.
+//
+int fltk3::Input::kf_lines_down(int repeat_num) {
+  int i = position();
+  if (line_end(i) >= size()) {
+    //UNNEEDED if (input_type()==fltk3::MULTILINE_INPUT && !fltk3::option(fltk3::OPTION_ARROW_FOCUS)) return 1;
+    return NORMAL_INPUT_MOVE;
+  }
+  while (repeat_num--) {  
+    i = line_end(i);
+    if (i >= size()) break;
+    i++;
+  }
+  shift_up_down_position(i);
+  return 1;
+}
+
+// Move up a page
+int fltk3::Input::kf_page_up() {
+  return kf_lines_up(linesPerPage());
+}
+
+// Move down a page
+int fltk3::Input::kf_page_down() {
+  return kf_lines_down(linesPerPage());
+}
+
+// Toggle insert mode
+int fltk3::Input::kf_insert_toggle() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  return 1;				// \todo: needs insert mode
+}
+
+// Delete word right
+int fltk3::Input::kf_delete_word_right() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (mark() != position()) return cut();
+  cut(position(), word_end(position()));
+  return 1;
+}
+
+// Delete word left
+int fltk3::Input::kf_delete_word_left() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (mark() != position()) return cut();
+  cut(word_start(position()), position());
+  return 1;
+}
+
+// Delete to start of line
+int fltk3::Input::kf_delete_sol() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (mark() != position()) return cut();
+  cut(line_start(position()), position());
+  return 1;
+}
+
+// Delete to end of line
+int fltk3::Input::kf_delete_eol() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (mark() != position()) return cut();
+  cut(position(), line_end(position()));
+  return 1;
+}
+
+int fltk3::Input::kf_delete_char_right() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (mark() != position()) return cut();
+  else return cut(1);
+}
+
+int fltk3::Input::kf_delete_char_left() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (mark() != position()) cut();
+  else cut(-1);
+  return 1;
+}
+
+// Move cursor to start of line
+int fltk3::Input::kf_move_sol() {
+  return shift_position(line_start(position())) + NORMAL_INPUT_MOVE;
+}
+
+// Move cursor to end of line
+int fltk3::Input::kf_move_eol() {
+  return shift_position(line_end(position())) + NORMAL_INPUT_MOVE;
+}
+
+// Clear to end of line
+int fltk3::Input::kf_clear_eol() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  if (position()>=size()) return 0;
+  int i = line_end(position());
+  if (i == position() && i < size()) i++;
+  cut(position(), i);
+  return copy_cuts();
+}
+
+// Move cursor one character to the left
+//    If OPTION_ARROW_FOCUS is disabled, return 1 to prevent focus navigation.
+//
+int fltk3::Input::kf_move_char_left() {
+  int i = shift_position(position()-1) + NORMAL_INPUT_MOVE;
+  return fltk3::option(fltk3::OPTION_ARROW_FOCUS) ? i : 1;
+}
+
+// Move cursor one character to the right
+//    If OPTION_ARROW_FOCUS is disabled, return 1 to prevent focus navigation.
+//
+int fltk3::Input::kf_move_char_right() {
+  int i = shift_position(position()+1) + NORMAL_INPUT_MOVE;
+  return fltk3::option(fltk3::OPTION_ARROW_FOCUS) ? i : 1;
+}
+
+// Move cursor word-left
+int fltk3::Input::kf_move_word_left() {
+  shift_position(word_start(position()));
+  return 1; 
+}
+
+// Move cursor word-right
+int fltk3::Input::kf_move_word_right() {
+  shift_position(word_end(position()));
+  return 1;
+}
+
+// Move cursor up one line and to the start of line (paragraph up)
+int fltk3::Input::kf_move_up_and_sol() {
+  if (line_start(position())==position() && position()>0)
+    return shift_position(line_start(position()-1)) + NORMAL_INPUT_MOVE;
+  else
+    return shift_position(line_start(position())) + NORMAL_INPUT_MOVE;
+}
+
+// Move cursor down one line and to the end of line (paragraph down)
+int fltk3::Input::kf_move_down_and_eol() {
+  if (line_end(position())==position() && position()<size())
+    return shift_position(line_end(position()+1)) + NORMAL_INPUT_MOVE;
+  else
+    return shift_position(line_end(position())) + NORMAL_INPUT_MOVE;
+}
+
+// Move to top of document
+int fltk3::Input::kf_top() {
+  shift_position(0);
+  return 1;
+}
+
+// Move to bottom of document
+int fltk3::Input::kf_bottom() {
+  shift_position(size());
+  return 1; 
+}
+
+// Select all text in the widget
+int fltk3::Input::kf_select_all() {
+  position(0,size());
+  return 1;
+}
+
+// Undo.
+int fltk3::Input::kf_undo() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  return undo();
+}
+
+// Redo. (currently unimplemented.. toggles undo() instead)
+int fltk3::Input::kf_redo() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  return kf_undo();			// currently we don't support multilevel undo
+}
+
+// Do a copy operation
+int fltk3::Input::kf_copy() {
+  return copy(1);
+}
+
+// Do a paste operation
+int fltk3::Input::kf_paste() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  fltk3::paste(*this, 1);
+  return 1;
+}
+
+// Do a cut with copy
+int fltk3::Input::kf_copy_cut() {
+  if (readonly()) { fltk3::beep(); return 1; }
+  copy(1);
+  return cut();
+}
+
+// Handle a keystroke.
+//     Returns 1 if handled by us, 0 if not.
+//
+int fltk3::Input::handle_key() {
+  
+  char ascii = fltk3::event_text()[0];
+  
+  int del;
+  if (fltk3::compose(del)) {
+    
+    // Insert characters into numeric fields after checking for legality:
+    if (input_type() == fltk3::FLOAT_INPUT || input_type() == fltk3::INT_INPUT) {
+      fltk3::compose_reset(); // ignore any foreign letters...
+      
+      // initialize the list of legal characters inside a floating point number
+#ifdef HAVE_LOCALECONV
+      if (!legal_fp_chars) {
+        int len = strlen(standard_fp_chars);
+        struct lconv *lc = localeconv();
+        if (lc) {
+          if (lc->decimal_point) len += strlen(lc->decimal_point);
+          if (lc->mon_decimal_point) len += strlen(lc->mon_decimal_point);
+          if (lc->positive_sign) len += strlen(lc->positive_sign);
+          if (lc->negative_sign) len += strlen(lc->negative_sign);
+        }
+        // the following line is not a true memory leak because the array is only
+        // allocated once if required, and automatically freed when the program quits
+        char *chars = (char*)malloc(len+1);
+	legal_fp_chars = chars;
+        strcpy(chars, standard_fp_chars);
+        if (lc) {
+          if (lc->decimal_point) strcat(chars, lc->decimal_point);
+          if (lc->mon_decimal_point) strcat(chars, lc->mon_decimal_point);
+          if (lc->positive_sign) strcat(chars, lc->positive_sign);
+          if (lc->negative_sign) strcat(chars, lc->negative_sign);
+        }
+      }
+#endif // HAVE_LOCALECONV
+      
+      // find the insert position
+      int ip = position()<mark() ? position() : mark();
+      // This is complex to allow "0xff12" hex to be typed:
+      if (   (!ip && (ascii == '+' || ascii == '-')) 
+          || (ascii >= '0' && ascii <= '9') 
+          || (ip==1 && index(0)=='0' && (ascii=='x' || ascii == 'X')) 
+          || (ip>1 && index(0)=='0' && (index(1)=='x'||index(1)=='X') 
+              && ((ascii>='A'&& ascii<='F') || (ascii>='a'&& ascii<='f'))) 
+          || (input_type()==fltk3::FLOAT_INPUT && ascii && strchr(legal_fp_chars, ascii))) 
+      {
+	if (readonly()) fltk3::beep();
+	else replace(position(), mark(), &ascii, 1);
+      }
+      return 1;
+    }
+    
+    if (del || fltk3::event_length()) {
+      if (readonly()) fltk3::beep();
+      else replace(position(), del ? position()-del : mark(),
+	           fltk3::event_text(), fltk3::event_length());
+    }
+    return 1;
+  }
+  
+  unsigned int mods = fltk3::event_state() & (fltk3::META|fltk3::CTRL|fltk3::ALT);
+  unsigned int shift = fltk3::event_state() & fltk3::SHIFT;
+  unsigned int multiline = (input_type() == fltk3::MULTILINE_INPUT) ? 1 : 0;
+  //
+  // The following lists apps that support these keypresses.
+  // Prefixes: '!' indicates NOT supported, '?' indicates un-verified.
+  //
+  //    HIG=Human Interface Guide, 
+  //    TE=TextEdit.app, SA=Safari.app, WOX=MS Word/OSX -- OSX 10.4.x
+  //    NP=Notepad, WP=WordPad, WOW=MS Word/Windows     -- WinXP
+  //    GE=gedit, KE=kedit                              -- Ubuntu8.04
+  //    OF=old FLTK behavior (<=1.1.10)
+  //
+  // Example: (NP,WP,!WO) means supported in notepad + wordpad, but NOT word.
+  //
+  switch (fltk3::event_key()) {
+
+    case fltk3::InsertKey:
+      // Note: Mac has no "Insert" key; it's the "Help" key.
+      //       This keypress is apparently not possible on macs.
+      //
+      if (mods==0 && shift) return kf_paste();			// Shift-Insert   (WP,NP,WOW,GE,KE,OF)
+      if (mods==0)          return kf_insert_toggle();		// Insert         (Standard)
+      if (mods==fltk3::CTRL)    return kf_copy();			// Ctrl-Insert    (WP,NP,WOW,GE,KE,OF)
+      return 0;							// ignore other combos, pass to parent
+
+    case fltk3::DeleteKey: {
+#ifdef __APPLE__
+      if (mods==0)          return kf_delete_char_right();	// Delete         (OSX-HIG,TE,SA,WOX)
+      if (mods==fltk3::CTRL)    return kf_delete_char_right();	// Ctrl-Delete    (??? TE,!SA,!WOX)
+      if (mods==fltk3::ALT)     return kf_delete_word_right();	// Alt-Delete     (OSX-HIG,TE,SA)
+      return 0;							// ignore other combos, pass to parent
+#else
+      int selected = (position() != mark()) ? 1 : 0;
+      if (mods==0 && shift && selected)
+                            return kf_copy_cut();		// Shift-Delete with selection (WP,NP,WOW,GE,KE,OF)
+      if (mods==0 && shift && !selected)
+                            return kf_delete_char_right();	// Shift-Delete no selection (WP,NP,WOW,GE,KE,!OF)
+      if (mods==0)          return kf_delete_char_right();	// Delete         (Standard)
+      if (mods==fltk3::CTRL)    return kf_delete_word_right();	// Ctrl-Delete    (WP,!NP,WOW,GE,KE,!OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+    }
+
+    case fltk3::LeftKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_move_char_left();		// Left           (OSX-HIG)
+      if (mods==fltk3::ALT)     return kf_move_word_left();		// Alt-Left       (OSX-HIG)
+      if (mods==fltk3::META)    return kf_move_sol();		// Meta-Left      (OSX-HIG)
+      if (mods==fltk3::CTRL)    return kf_move_sol();		// Ctrl-Left      (TE/SA)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_move_char_left();		// Left           (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_move_word_left();		// Ctrl-Left      (WP,NP,WOW,GE,KE,!OF)
+      if (mods==fltk3::META)    return kf_move_char_left();		// Meta-Left      (WP,NP,?WOW,GE,KE)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::RightKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_move_char_right();	// Right          (OSX-HIG)
+      if (mods==fltk3::ALT)     return kf_move_word_right();	// Alt-Right      (OSX-HIG)
+      if (mods==fltk3::META)    return kf_move_eol();		// Meta-Right     (OSX-HIG)
+      if (mods==fltk3::CTRL)    return kf_move_eol();		// Ctrl-Right     (TE/SA)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_move_char_right();	// Right          (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_move_word_right();	// Ctrl-Right     (WP,NP,WOW,GE,KE,!OF)
+      if (mods==fltk3::META)    return kf_move_char_right();	// Meta-Right     (WP,NP,?WOW,GE,KE,!OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::UpKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_lines_up(1);		// Up             (OSX-HIG)
+      if (mods==fltk3::CTRL)    return kf_page_up();		// Ctrl-Up        (TE !HIG)
+      if (mods==fltk3::ALT)     return kf_move_up_and_sol();	// Alt-Up         (OSX-HIG)
+      if (mods==fltk3::META)    return kf_top();			// Meta-Up        (OSX-HIG)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_lines_up(1);		// Up             (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_move_up_and_sol();	// Ctrl-Up        (WP,!NP,WOW,GE,!KE,OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::DownKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_lines_down(1);		// Dn             (OSX-HIG)
+      if (mods==fltk3::CTRL)    return kf_page_down();		// Ctrl-Dn        (TE !HIG)
+      if (mods==fltk3::ALT)     return kf_move_down_and_eol();	// Alt-Dn         (OSX-HIG)
+      if (mods==fltk3::META)    return kf_bottom();			// Meta-Dn        (OSX-HIG)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_lines_down(1);		// Dn             (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_move_down_and_eol();	// Ctrl-Down      (WP,!NP,WOW,GE,!KE,OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::PageUpKey:
+      // fltk3::Input has no scroll control, so instead we move the cursor by one page
+      // OSX-HIG recommends Alt increase one semantic unit, Meta next higher..
+#ifdef __APPLE__
+      if (mods==0)          return kf_page_up();		// PgUp           (OSX-HIG)
+      if (mods==fltk3::ALT)     return kf_page_up();		// Alt-PageUp     (OSX-HIG)
+      if (mods==fltk3::META)    return kf_top();			// Meta-PageUp    (OSX-HIG,!TE)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_page_up();		// PageUp         (WP,NP,WOW,GE,KE)
+      if (mods==fltk3::CTRL)    return kf_page_up();		// Ctrl-PageUp    (!WP,!NP,!WOW,!GE,KE,OF)
+      if (mods==fltk3::ALT)     return kf_page_up();		// Alt-PageUp     (!WP,!NP,!WOW,!GE,KE,OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::PageDownKey:
+#ifdef __APPLE__
+      // fltk3::Input has no scroll control, so instead we move the cursor by one page
+      // OSX-HIG recommends Alt increase one semantic unit, Meta next higher..
+      if (mods==0)          return kf_page_down();		// PgDn           (OSX-HIG)
+      if (mods==fltk3::ALT)     return kf_page_down();		// Alt-PageDn     (OSX-HIG)
+      if (mods==fltk3::META)    return kf_bottom();			// Meta-PageDn    (OSX-HIG,!TE)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_page_down();		// PageDn         (WP,NP,WOW,GE,KE)
+      if (mods==fltk3::CTRL)    return kf_page_down();		// Ctrl-PageDn    (!WP,!NP,!WOW,!GE,KE,OF)
+      if (mods==fltk3::ALT)     return kf_page_down();		// Alt-PageDn     (!WP,!NP,!WOW,!GE,KE,OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::HomeKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_top();			// Home           (OSX-HIG)
+      if (mods==fltk3::ALT)     return kf_top();			// Alt-Home       (???)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_move_sol();		// Home           (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_top();			// Ctrl-Home      (WP,NP,WOW,GE,KE,OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::EndKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_bottom();			// End            (OSX-HIG)
+      if (mods==fltk3::ALT)     return kf_bottom();			// Alt-End        (???)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_move_eol();		// End            (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_bottom();			// Ctrl-End       (WP,NP,WOW,GE,KE,OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::BackSpaceKey:
+#ifdef __APPLE__
+      if (mods==0)          return kf_delete_char_left();	// Backspace      (OSX-HIG)
+      if (mods==fltk3::CTRL)    return kf_delete_char_left();	// Ctrl-Backspace (TE/SA)
+      if (mods==fltk3::ALT)     return kf_delete_word_left();	// Alt-Backspace  (OSX-HIG)
+      if (mods==fltk3::META)    return kf_delete_sol();		// Meta-Backspace (OSX-HIG,!TE)
+      return 0;							// ignore other combos, pass to parent
+#else
+      if (mods==0)          return kf_delete_char_left();	// Backspace      (WP,NP,WOW,GE,KE,OF)
+      if (mods==fltk3::CTRL)    return kf_delete_word_left();	// Ctrl-Backspace (WP,!NP,WOW,GE,KE,!OF)
+      return 0;							// ignore other combos, pass to parent
+#endif
+
+    case fltk3::EnterKey:
+    case fltk3::KPEnterKey:
+      if (when() & fltk3::WHEN_ENTER_KEY) {
+        position(size(), 0);
+        maybe_do_callback();
+        return 1;
+      } else if (multiline && !readonly()) {
+        return replace(position(), mark(), "\n", 1);
+      } return 0;			// reserved for shortcuts
+
+    case fltk3::TabKey:
+      // Handle special case for multiline input with 'old tab behavior';
+      // tab handled as a normal insertable character.
+      //
+      if (mods==0 && !shift 		// Tab?
+	   && !tab_nav()		// old tab behavior enabled?
+	   && multiline) {		// multiline input?
+        break;				// insert tab character
+      }
+      if (mods==0) return 0;					// Tab, Shift-Tab? nav focus      (Standard/OSX-HIG)
+      return 0;							// ignore other combos, pass to parent
+
+    case 'a':
+      if (mods==fltk3::COMMAND) return kf_select_all();		// Ctrl-A, Mac:Meta-A             (Standard/OSX-HIG)
+      break;							// handle other combos elsewhere
+    case 'c':
+      if (mods==fltk3::COMMAND) return kf_copy();			// Ctrl-C, Mac:Meta-C             (Standard/OSX-HIG)
+      break;							// handle other combos elsewhere
+    case 'v':
+      if (mods==fltk3::COMMAND) return kf_paste();			// Ctrl-V, Mac:Meta-V             (Standard/OSX-HIG)
+      break;							// handle other combos elsewhere
+    case 'x':
+      if (mods==fltk3::COMMAND) return kf_copy_cut();		// Ctrl-X, Mac:Meta-X             (Standard/OSX-HIG)
+      break;
+    case 'z':
+      if (mods==fltk3::COMMAND && !shift) return kf_undo();		// Ctrl-Z, Mac:Meta-Z             (Standard/OSX-HIG)
+      if (mods==fltk3::COMMAND && shift)  return kf_redo();		// Shift-Ctrl-Z, Mac:Shift-Meta-Z (Standard/OSX-HIG)
+      break;							// handle other combos elsewhere
+  }
+  
+  switch (ascii) {
+    case ctrl('H'):
+      return kf_delete_char_left();				// Ctrl-H                           (!WP,!NP,!WOW,!WOX,TE,SA,GE,KE,OF)
+    case ctrl('I'): 						// Ctrl-I (literal Tab)             (!WP,NP,!WOW,!GE,KE,OF)
+    case ctrl('J'):						// Ctrl-J (literal Line Feed/Enter) (Standard)
+    case ctrl('L'):						// Ctrl-L (literal Form Feed)       (Standard)
+    case ctrl('M'):						// Ctrl-M (literal Cr)              (Standard)
+      if (readonly()) { fltk3::beep(); return 1; }
+      // insert a few selected control characters literally:
+      if (input_type() != fltk3::FLOAT_INPUT && input_type() != fltk3::INT_INPUT)
+        return replace(position(), mark(), &ascii, 1);
+      break;
+  }
+  
+  return 0;		// ignored
+}
+
+int fltk3::Input::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  static int dnd_save_position, dnd_save_mark, drag_start = -1, newpos;
+  static fltk3::Widget *dnd_save_focus;
+  switch (event) {
+    case fltk3::FOCUS:
+      switch (fltk3::event_key()) {
+        case fltk3::RightKey:
+          position(0);
+          break;
+        case fltk3::LeftKey:
+          position(size());
+          break;
+        case fltk3::DownKey:
+          up_down_position(0);
+          break;
+        case fltk3::UpKey:
+          up_down_position(line_start(size()));
+          break;
+        case fltk3::TabKey:
+          position(size(),0);
+          break;
+        default:
+          position(position(),mark());// turns off the saved up/down arrow position
+          break;
+      }
+      break;
+      
+    case fltk3::KEYBOARD:
+      // Handle special case for multiline input with 'old tab behavior'
+      // where tab is entered as a character: make sure user attempt to 'tab over'
+      // widget doesn't destroy the field, replacing it with a tab character.
+      //
+      if (fltk3::event_key() == fltk3::TabKey 			// Tab key?
+          && !fltk3::event_state(fltk3::SHIFT)			// no shift?
+          && !tab_nav()					// with tab navigation disabled?
+	  && input_type() == fltk3::MULTILINE_INPUT		// with a multiline input?
+          && (mark()==0 && position()==size())) {	// while entire field selected?
+        // Set cursor to the end of the selection...
+        if (mark() > position())
+          position(mark());
+        else
+          position(position());
+        return (1);
+      } else {
+        if (active_r() && window() && this == fltk3::belowmouse()) 
+          window()->cursor(fltk3::CURSOR_NONE);
+        return handle_key();
+      }
+      //NOTREACHED
+      
+    case fltk3::PUSH:
+      if (fltk3::dnd_text_ops()) {
+        int oldpos = position(), oldmark = mark();
+        fltk3::Boxtype b = box();
+        Input_::handle_mouse(x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                                w()-fltk3::box_dw(b), h()-fltk3::box_dh(b), 0);
+        newpos = position(); 
+        position( oldpos, oldmark );
+        if (fltk3::focus()==this && !fltk3::event_state(fltk3::SHIFT) && input_type()!=fltk3::SECRET_INPUT &&
+           ( (newpos >= mark() && newpos < position()) || 
+             (newpos >= position() && newpos < mark()) ) ) {
+          // user clicked in the selection, may be trying to drag
+          drag_start = newpos;
+          return 1;
+        }
+        drag_start = -1;
+      }
+      
+      if (fltk3::focus() != this) {
+        fltk3::focus(this);
+        handle(fltk3::FOCUS);
+      }
+      break;
+      
+    case fltk3::DRAG:
+      if (fltk3::dnd_text_ops()) {
+        if (drag_start >= 0) {
+          if (fltk3::event_is_click()) return 1; // debounce the mouse
+                                              // save the position because sometimes we don't get DND_ENTER:
+          dnd_save_position = position();
+          dnd_save_mark = mark();
+          // drag the data:
+          copy(0); fltk3::dnd();
+          return 1;
+        }
+      }
+      break;
+      
+    case fltk3::RELEASE:
+      if (fltk3::event_button() == 2) {
+        fltk3::event_is_click(0); // stop double click from picking a word
+        fltk3::paste(*this, 0);
+      } else if (!fltk3::event_is_click()) {
+        // copy drag-selected text to the clipboard.
+        copy(0);
+      } else if (fltk3::event_is_click() && drag_start >= 0) {
+        // user clicked in the field and wants to reset the cursor position...
+        position(drag_start, drag_start);
+        drag_start = -1;
+      } else if (fltk3::event_clicks()) {
+        // user double or triple clicked to select word or whole text
+        copy(0);
+      }
+      
+      // For output widgets, do the callback so the app knows the user
+      // did something with the mouse...
+      if (readonly()) do_callback();
+      
+      return 1;
+      
+    case fltk3::DND_ENTER:
+      fltk3::belowmouse(this); // send the leave events first
+      dnd_save_position = position();
+      dnd_save_mark = mark();
+      dnd_save_focus = fltk3::focus();
+      if (dnd_save_focus != this) {
+        fltk3::focus(this);
+        handle(fltk3::FOCUS);
+      }
+      // fall through:
+    case fltk3::DND_DRAG: 
+      //int p = mouse_position(X, Y, W, H);
+#if DND_OUT_XXXX
+      if (fltk3::focus()==this && (p>=dnd_save_position && p<=dnd_save_mark ||
+                                p>=dnd_save_mark && p<=dnd_save_position)) {
+        position(dnd_save_position, dnd_save_mark);
+        return 0;
+      }
+#endif
+      {
+        fltk3::Boxtype b = box();
+        Input_::handle_mouse(x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                                w()-fltk3::box_dw(b), h()-fltk3::box_dh(b), 0);
+      }
+      return 1;
+      
+    case fltk3::DND_LEAVE:
+      position(dnd_save_position, dnd_save_mark);
+#if DND_OUT_XXXX
+      if (!focused())
+#endif
+        if (dnd_save_focus != this) {
+          fltk3::focus(dnd_save_focus);
+          handle(fltk3::UNFOCUS);
+        }
+#if !(defined(__APPLE__) || defined(WIN32))
+      fltk3::first_window()->cursor(fltk3::CURSOR_MOVE);
+#endif
+      return 1;
+      
+    case fltk3::DND_RELEASE:
+      take_focus();
+      return 1;
+      
+      /* TODO: this will scroll the area, but stop if the cursor would become invisible.
+       That clipping happens in drawtext(). Do we change the clipping or should 
+       we move the cursor (ouch)?
+       case fltk3::MOUSEWHEEL:
+       if (fltk3::e_dy > 0) {
+       yscroll( yscroll() - fltk3::e_dy*15 );
+       } else if (fltk3::e_dy < 0) {
+       yscroll( yscroll() - fltk3::e_dy*15 );
+       }
+       return 1;
+       */
+  }
+  fltk3::Boxtype b = box();
+  return Input_::handletext(event,
+                               x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                               w()-fltk3::box_dw(b), h()-fltk3::box_dh(b));
+}
+
+/**
+ Creates a new fltk3::Input widget using the given position, size,
+ and label string. The default boxtype is fltk3::DOWN_BOX.
+ */
+fltk3::Input::Input(int X, int Y, int W, int H, const char *l)
+: fltk3::Input_(X, Y, W, H, l) {
+}
+
+/*
+ The following constructors must not be in the header file(s) if we
+ build a shared object (DLL). Instead they are defined here to force
+ the constructor (and default destructor as well) to be defined in
+ the DLL and exported (STR #2632).
+ 
+ Note: if you change any of them, do the same changes in the specific
+ header file as well.  This redundant definition was chosen to enable
+ inline constructors in the header files (for static linking) as well
+ as those here for dynamic linking (Windows DLL).
+ */
+#if defined(FL_DLL)
+
+fltk3::FloatInput::FloatInput(int X,int Y,int W,int H,const char *l)
+: fltk3::Input(X,Y,W,H,l) {
+  type(fltk3::FLOAT_INPUT);
+}
+
+fltk3::IntInput::IntInput(int X,int Y,int W,int H,const char *l)
+: fltk3::Input(X,Y,W,H,l) {
+  type(fltk3::INT_INPUT);
+}
+
+fltk3::MultilineInput::MultilineInput(int X,int Y,int W,int H,const char *l)
+: fltk3::Input(X,Y,W,H,l) {
+  type(fltk3::MULTILINE_INPUT);
+}
+
+fltk3::Output::Output(int X,int Y,int W,int H, const char *l)
+: fltk3::Input(X, Y, W, H, l) {
+  type(fltk3::NORMAL_OUTPUT);
+}
+
+fltk3::MultilineOutput::MultilineOutput(int X,int Y,int W,int H,const char *l)
+: fltk3::Output(X,Y,W,H,l) {
+  type(fltk3::MULTILINE_OUTPUT);
+}
+
+fltk3::SecretInput::SecretInput(int X,int Y,int W,int H,const char *l)
+: fltk3::Input(X,Y,W,H,l) {
+  type(fltk3::SECRET_INPUT);
+}
+
+#endif // FL_DLL
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Input.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Input_.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Input_.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Input_.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1274 @@
+//
+// "$Id$"
+//
+// Common input widget routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Input_.h>
+#include <fltk3/Window.h>
+#include <fltk3/draw.h>
+#include <fltk3/ask.h>
+#include <math.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <stdlib.h>
+#include <ctype.h>
+
+#define MAXBUF 1024
+#if defined(USE_X11) && !USE_XFT
+const int secret_char = '*'; // asterisk to hide secret input
+#else
+const int secret_char = 0x2022; // bullet to hide secret input
+#endif
+static int l_secret;
+
+namespace fltk3 {
+  extern void draw(const char*, int, float, float);
+}
+
+////////////////////////////////////////////////////////////////
+
+/** \internal
+  Converts a given text segment into the text that will be rendered on screen.
+
+  This copies the text from \p p to \p buf, replacing characters with <tt>^X</tt>
+  and <tt>\\nnn</tt> as necessary.
+
+  The destination buffer is limited to \c MAXBUF (currently at 1024). All
+  following text is truncated.
+
+  \param [in] p pointer to source buffer
+  \param [in] buf pointer to destination buffer
+  \return pointer to the end of the destination buffer
+*/
+const char* fltk3::Input_::expand(const char* p, char* buf) const {
+  char* o = buf;
+  char* e = buf+(MAXBUF-4);
+  const char* lastspace = p;
+  char* lastspace_out = o;
+  int width_to_lastspace = 0;
+  int word_count = 0;
+  int word_wrap;
+//  const char *pe = p + strlen(p);
+
+  if (input_type()==fltk3::SECRET_INPUT) {
+    while (o<e && p < value_+size_) {
+      if (fltk3::utf8len((char)p[0]) >= 1) {
+	l_secret = fltk3::utf8encode(secret_char, o);
+	o += l_secret;
+      }
+      p++;
+    }
+
+  } else while (o<e) {
+    if (wrap() && (p >= value_+size_ || isspace(*p & 255))) {
+      word_wrap = w() - fltk3::box_dw(box()) - 2;
+      width_to_lastspace += (int)fltk3::width(lastspace_out, o-lastspace_out);
+      if (p > lastspace+1) {
+	if (word_count && width_to_lastspace > word_wrap) {
+	  p = lastspace; o = lastspace_out; break;
+	}
+	word_count++;
+      }
+      lastspace = p;
+      lastspace_out = o;
+    }
+
+    if (p >= value_+size_) break;
+    int c = *p++ & 255;
+    if (c < ' ' || c == 127) {
+      if (c=='\n' && input_type()==fltk3::MULTILINE_INPUT) {p--; break;}
+      if (c == '\t' && input_type()==fltk3::MULTILINE_INPUT) {
+        for (c = fltk3::utf_nb_char((uchar*)buf, o-buf)%8; c<8 && o<e; c++) {
+          *o++ = ' ';
+        }
+      } else {
+	*o++ = '^';
+	*o++ = c ^ 0x40;
+      }
+    } else {
+      *o++ = c;
+    }
+  }
+  *o = 0;
+  return p;
+}
+
+/** \internal
+  Calculates the width in pixels of part of a text buffer.
+
+  This call takes a string, usually created by expand, and calculates
+  the width of the string when rendered with the given font.
+
+  \param [in] p pointer to the start of the original string
+  \param [in] e pointer to the end of the original string
+  \param [in] buf pointer to the buffer as returned by expand()
+  \return width of string in pixels
+*/
+double fltk3::Input_::expandpos(
+  const char* p,	// real string
+  const char* e,	// pointer into real string
+  const char* buf,	// conversion of real string by expand()
+  int* returnn		// return offset into buf here
+) const {
+  int n = 0;
+  int chr = 0;
+  int l;
+  if (input_type()==fltk3::SECRET_INPUT) {
+    while (p<e) {
+      l = fltk3::utf8len((char)p[0]);
+      if (l >= 1) n += l_secret;
+      p += l;
+    }
+  } else while (p<e) {
+    int c = *p & 255;
+    if (c < ' ' || c == 127) {
+      if (c == '\t' && input_type()==fltk3::MULTILINE_INPUT) {
+         n += 8-(chr%8);
+         chr += 7-(chr%8);
+      } else n += 2;
+    } else {
+      n++;
+    }
+    chr += fltk3::utf8len((char)p[0]) >= 1;
+    p++;
+  }
+  if (returnn) *returnn = n;
+  return fltk3::width(buf, n);
+}
+
+////////////////////////////////////////////////////////////////
+
+/** \internal
+  Marks a range of characters for update.
+
+  This call marks all characters from \p to the end of the 
+  text buffer for update. At least these characters
+  will be redrawn in the next update cycle.
+
+  Characters from \p mu_p to end of widget are redrawn.
+  If \p erase_cursor_only, small part at \p mu_p is redrawn.
+  Right now minimal update just keeps unchanged characters from
+  being erased, so they don't blink.
+
+  \param [in] p start of update range
+*/
+void fltk3::Input_::minimal_update(int p) {
+  if (damage() & fltk3::DAMAGE_ALL) return; // don't waste time if it won't be done
+  if (damage() & fltk3::DAMAGE_EXPOSE) {
+    if (p < mu_p) mu_p = p;
+  } else {
+    mu_p = p;
+  }
+
+  damage(fltk3::DAMAGE_EXPOSE);
+  erase_cursor_only = 0;
+}
+
+/** \internal
+  Marks a range of characters for update.
+
+  This call marks a text range for update. At least all characters
+  from \p p to \p q will be redrawn in the next update cycle.
+
+  \param [in] p start of update range
+  \param [in] q end of update range
+*/
+void fltk3::Input_::minimal_update(int p, int q) {
+  if (q < p) p = q;
+  minimal_update(p);
+}
+
+////////////////////////////////////////////////////////////////
+
+/* Horizontal cursor position in pixels while moving up or down. */
+double fltk3::Input_::up_down_pos = 0;
+
+/* Flag to remember last cursor move. */
+int fltk3::Input_::was_up_down = 0;
+
+/**
+  Sets the current font and font size.
+*/
+void fltk3::Input_::setfont() const {
+  fltk3::font(textfont(), textsize());
+}
+
+/**
+  Draws the text in the passed bounding box.  
+
+  If <tt>damage() & fltk3::DAMAGE_ALL</tt> is true, this assumes the 
+  area has already been erased to color(). Otherwise it does
+  minimal update and erases the area itself.
+
+  \param X, Y, W, H area that must be redrawn
+*/
+void fltk3::Input_::drawtext(int X, int Y, int W, int H) {
+  int do_mu = !(damage()&fltk3::DAMAGE_ALL);
+
+  if (fltk3::focus()!=this && !size()) {
+    if (do_mu) { // we have to erase it if cursor was there
+      draw_box(box(), X-fltk3::box_dx(box()), Y-fltk3::box_dy(box()),
+               W+fltk3::box_dw(box()), H+fltk3::box_dh(box()), color());
+    }
+    return;
+  }
+
+  int selstart, selend;
+  if (fltk3::focus()!=this && /*fltk3::selection_owner()!=this &&*/ fltk3::pushed()!=this)
+    selstart = selend = 0;
+  else if (position() <= mark()) {
+    selstart = position(); selend = mark();
+  } else {
+    selend = position(); selstart = mark();
+  }
+
+  setfont();
+  const char *p, *e;
+  char buf[MAXBUF];
+
+  // count how many lines and put the last one into the buffer:
+  // And figure out where the cursor is:
+  int height = fltk3::height();
+  int threshold = height/2;
+  int lines;
+  int curx, cury;
+  for (p=value(), curx=cury=lines=0; ;) {
+    e = expand(p, buf);
+    if (position() >= p-value() && position() <= e-value()) {
+      curx = int(expandpos(p, value()+position(), buf, 0)+.5);
+      if (fltk3::focus()==this && !was_up_down) up_down_pos = curx;
+      cury = lines*height;
+      int newscroll = xscroll_;
+      if (curx > newscroll+W-threshold) {
+	// figure out scrolling so there is space after the cursor:
+	newscroll = curx+threshold-W;
+	// figure out the furthest left we ever want to scroll:
+	int ex = int(expandpos(p, e, buf, 0))+2-W;
+	// use minimum of both amounts:
+	if (ex < newscroll) newscroll = ex;
+      } else if (curx < newscroll+threshold) {
+	newscroll = curx-threshold;
+      }
+      if (newscroll < 0) newscroll = 0;
+      if (newscroll != xscroll_) {
+	xscroll_ = newscroll;
+	mu_p = 0; erase_cursor_only = 0;
+      }
+    }
+    lines++;
+    if (e >= value_+size_) break;
+    p = e+1;
+  }
+
+  // adjust the scrolling:
+  if (input_type()==fltk3::MULTILINE_INPUT) {
+    int newy = yscroll_;
+    if (cury < newy) newy = cury;
+    if (cury > newy+H-height) newy = cury-H+height;
+    if (newy < -1) newy = -1;
+    if (newy != yscroll_) {yscroll_ = newy; mu_p = 0; erase_cursor_only = 0;}
+  } else {
+    yscroll_ = -(H-height)/2;
+  }
+
+  fltk3::push_clip(X, Y, W, H);
+  fltk3::Color tc = active_r() ? textcolor() : fltk3::inactive(textcolor());
+
+  p = value();
+  // visit each line and draw it:
+  int desc = height-fltk3::descent();
+  float xpos = (float)(X - xscroll_ + 1);
+  int ypos = -yscroll_;
+  for (; ypos < H;) {
+
+    // re-expand line unless it is the last one calculated above:
+    if (lines>1) e = expand(p, buf);
+
+    if (ypos <= -height) goto CONTINUE; // clipped off top
+
+    if (do_mu) {	// for minimal update:
+      const char* pp = value()+mu_p; // pointer to where minimal update starts
+      if (e < pp) goto CONTINUE2; // this line is before the changes
+      if (readonly()) erase_cursor_only = 0; // this isn't the most efficient way
+      if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after
+      // calculate area to erase:
+      float r = (float)(X+W);
+      float xx;
+      if (p >= pp) {
+	xx = (float)X;
+	if (erase_cursor_only) r = xpos+2;
+	else if (readonly()) xx -= 3;
+      } else {
+	xx = xpos + (float)expandpos(p, pp, buf, 0);
+	if (erase_cursor_only) r = xx+2;
+	else if (readonly()) xx -= 3;
+      }
+      // clip to and erase it:
+      fltk3::push_clip((int)xx-1-height/8, Y+ypos, (int)(r-xx+2+height/4), height);
+      draw_box(box(), X-fltk3::box_dx(box()), Y-fltk3::box_dy(box()),
+               W+fltk3::box_dw(box()), H+fltk3::box_dh(box()), color());
+      // it now draws entire line over it
+      // this should not draw letters to left of erased area, but
+      // that is nyi.
+    }
+
+    // Draw selection area if required:
+    if (selstart < selend && selstart <= e-value() && selend > p-value()) {
+      const char* pp = value()+selstart;
+      float x1 = xpos;
+      int offset1 = 0;
+      if (pp > p) {
+	fltk3::color(tc);
+	x1 += (float)expandpos(p, pp, buf, &offset1);
+	fltk3::draw(buf, offset1, xpos, (float)(Y+ypos+desc));
+      }
+      pp = value()+selend;
+      float x2 = (float)(X+W);
+      int offset2;
+      if (pp <= e) x2 = xpos + (float)expandpos(p, pp, buf, &offset2);
+      else offset2 = strlen(buf);
+      fltk3::color(selection_color());
+      fltk3::rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height);
+      fltk3::color(fltk3::contrast(textcolor(), selection_color()));
+      fltk3::draw(buf+offset1, offset2-offset1, x1, (float)(Y+ypos+desc));
+      if (pp < e) {
+	fltk3::color(tc);
+	fltk3::draw(buf+offset2, strlen(buf+offset2), x2, (float)(Y+ypos+desc));
+      }
+    } else {
+      // draw unselected text
+      fltk3::color(tc);
+      fltk3::draw(buf, strlen(buf), xpos, (float)(Y+ypos+desc));
+    }
+
+    if (do_mu) fltk3::pop_clip();
+
+  CONTINUE2:
+    // draw the cursor:
+    if (fltk3::focus() == this && selstart == selend &&
+	position() >= p-value() && position() <= e-value()) {
+      fltk3::color(cursor_color());
+      // cursor position may need to be recomputed (see STR #2486)
+      curx = int(expandpos(p, value()+position(), buf, 0)+.5);
+      if (readonly()) {
+        fltk3::line((int)(xpos+curx-2.5f), Y+ypos+height-1,
+	        (int)(xpos+curx+0.5f), Y+ypos+height-4,
+	        (int)(xpos+curx+3.5f), Y+ypos+height-1);
+      } else {
+        fltk3::rectf((int)(xpos+curx+0.5), Y+ypos, 2, height);
+      }
+    }
+
+  CONTINUE:
+    ypos += height;
+    if (e >= value_+size_) break;
+    if (*e == '\n' || *e == ' ') e++;
+    p = e;
+  }
+
+  // for minimal update, erase all lines below last one if necessary:
+  if (input_type()==fltk3::MULTILINE_INPUT && do_mu && ypos<H
+      && (!erase_cursor_only || p <= value()+mu_p)) {
+    if (ypos < 0) ypos = 0;
+    fltk3::push_clip(X, Y+ypos, W, H-ypos);
+    draw_box(box(), X-fltk3::box_dx(box()), Y-fltk3::box_dy(box()),
+             W+fltk3::box_dw(box()), H+fltk3::box_dh(box()), color());
+    fltk3::pop_clip();
+  }
+
+  fltk3::pop_clip();
+  if (fltk3::focus() == this) {
+       fltk3::set_spot(textfont(), textsize(),
+               (int)xpos+curx, Y+ypos-fltk3::descent(), W, H, window());
+  }
+}
+
+/** \internal
+  Simple function that determines if a character could be part of a word.
+  \todo This function is not ucs4-aware.
+*/
+static int isword(char c) {
+  return (c&128 || isalnum(c) || strchr("#%&-/@\\_~", c));
+}
+
+/**
+  Finds the end of a word.
+
+  This call calculates the end of a word based on the given 
+  index \p i. Calling this function repeatedly will move
+  forwards to the end of the text.
+ 
+  \param [in] i starting index for the search
+  \return end of the word
+*/
+int fltk3::Input_::word_end(int i) const {
+  if (input_type() == fltk3::SECRET_INPUT) return size();
+  //while (i < size() && !isword(index(i))) i++;
+  while (i < size() && !isword(index(i))) i++;
+  while (i < size() && isword(index(i))) i++;
+  return i;
+}
+
+/**
+  Finds the start of a word.
+
+  This call calculates the start of a word based on the given 
+  index \p i. Calling this function repeatedly will move
+  backwards to the beginning of the text.
+ 
+  \param [in] i starting index for the search
+  \return start of the word
+*/
+int fltk3::Input_::word_start(int i) const {
+  if (input_type() == fltk3::SECRET_INPUT) return 0;
+//   if (i >= size() || !isword(index(i)))
+//     while (i > 0 && !isword(index(i-1))) i--;
+  while (i > 0 && !isword(index(i-1))) i--;
+  while (i > 0 && isword(index(i-1))) i--;
+  return i;
+}
+
+/**
+  Finds the end of a line.
+
+  This call calculates the end of a line based on the given 
+  index \p i. 
+ 
+  \param [in] i starting index for the search
+  \return end of the line
+*/
+int fltk3::Input_::line_end(int i) const {
+  if (input_type() != fltk3::MULTILINE_INPUT) return size();
+
+  if (wrap()) {
+    // go to the start of the paragraph:
+    int j = i;
+    while (j > 0 && index(j-1) != '\n') j--;
+    // now measure lines until we get past i, end of that line is real eol:
+    setfont();
+    for (const char* p=value()+j; ;) {
+      char buf[MAXBUF];
+      p = expand(p, buf);
+      if (p-value() >= i) return p-value();
+      p++;
+    }
+  } else {
+    while (i < size() && index(i) != '\n') i++;
+    return i;
+  }
+}
+
+/**
+  Finds the start of a line.
+
+  This call calculates the start of a line based on the given 
+  index \p i. 
+ 
+  \param [in] i starting index for the search
+  \return start of the line
+*/
+int fltk3::Input_::line_start(int i) const {
+  if (input_type() != fltk3::MULTILINE_INPUT) return 0;
+  int j = i;
+  while (j > 0 && index(j-1) != '\n') j--;
+  if (wrap()) {
+    // now measure lines until we get past i, start of that line is real eol:
+    setfont();
+    for (const char* p=value()+j; ;) {
+      char buf[MAXBUF];
+      const char* e = expand(p, buf);
+      if (e-value() >= i) return p-value();
+      p = e+1;
+    }
+  } else return j;
+}
+
+/** 
+  Handles mouse clicks and mouse moves.
+  \todo Add comment and parameters
+*/
+void fltk3::Input_::handle_mouse(int X, int Y, int /*W*/, int /*H*/, int drag) {
+  was_up_down = 0;
+  if (!size()) return;
+  setfont();
+
+  const char *p, *e;
+  char buf[MAXBUF];
+
+  int theline = (input_type()==fltk3::MULTILINE_INPUT) ?
+    (fltk3::event_y()-Y+yscroll_)/fltk3::height() : 0;
+
+  int newpos = 0;
+  for (p=value();; ) {
+    e = expand(p, buf);
+    theline--; if (theline < 0) break;
+    if (e >= value_+size_) break;
+    p = e+1;
+  }
+  const char *l, *r, *t; double f0 = fltk3::event_x()-X+xscroll_;
+  for (l = p, r = e; l<r; ) {
+    double f;
+    int cw = fltk3::utf8len((char)l[0]);
+    if (cw < 1) cw = 1;
+    t = l+cw;
+    f = X-xscroll_+expandpos(p, t, buf, 0);
+    if (f <= fltk3::event_x()) {l = t; f0 = fltk3::event_x()-f;}
+    else r = t-cw;
+  }
+  if (l < e) { // see if closer to character on right:
+    double f1;
+    int cw = fltk3::utf8len((char)l[0]);
+    if (cw > 0) {
+      f1 = X-xscroll_+expandpos(p, l + cw, buf, 0) - fltk3::event_x();
+      if (f1 < f0) l = l+cw;
+    }
+  }
+  newpos = l-value();
+
+  int newmark = drag ? mark() : newpos;
+  if (fltk3::event_clicks()) {
+    if (newpos >= newmark) {
+      if (newpos == newmark) {
+	if (newpos < size()) newpos++;
+	else newmark--;
+      }
+      if (fltk3::event_clicks() > 1) {
+	newpos = line_end(newpos);
+	newmark = line_start(newmark);
+      } else {
+	newpos = word_end(newpos);
+	newmark = word_start(newmark);
+      }
+    } else {
+      if (fltk3::event_clicks() > 1) {
+	newpos = line_start(newpos);
+	newmark = line_end(newmark);
+      } else {
+	newpos = word_start(newpos);
+	newmark = word_end(newmark);
+      }
+    }
+    // if the multiple click does not increase the selection, revert
+    // to single-click behavior:
+    if (!drag && (mark() > position() ?
+                  (newmark >= position() && newpos <= mark()) :
+                  (newmark >= mark() && newpos <= position()))) {
+      fltk3::event_clicks(0);
+      newmark = newpos = l-value();
+    }
+  }
+  position(newpos, newmark);
+}
+
+/**
+  Sets the index for the cursor and mark.
+
+  The input widget maintains two pointers into the string. The
+  \e position (\c p) is where the cursor is. The
+  \e mark (\c m) is the other end of the selected text. If they
+  are equal then there is no selection. Changing this does not
+  affect the clipboard (use copy() to do that).
+    
+  Changing these values causes a redraw(). The new
+  values are bounds checked. 
+
+  \param p index for the cursor position
+  \param m index for the mark
+  \return 0 if no positions changed
+  \see position(int), position(), mark(int)
+*/
+int fltk3::Input_::position(int p, int m) {
+  int is_same = 0;
+  was_up_down = 0;
+  if (p<0) p = 0;
+  if (p>size()) p = size();
+  if (m<0) m = 0;
+  if (m>size()) m = size();
+  if (p == m) is_same = 1;
+
+  while (p < position_ && p > 0 && (size() - p) > 0 &&
+       (fltk3::utf8len((char)(value() + p)[0]) < 1)) { p--; }
+  int ul = fltk3::utf8len((char)(value() + p)[0]);
+  while (p < size() && p > position_ && ul < 0) {
+       p++;
+       ul = fltk3::utf8len((char)(value() + p)[0]);
+  }
+
+  while (m < mark_ && m > 0 && (size() - m) > 0 &&
+       (fltk3::utf8len((char)(value() + m)[0]) < 1)) { m--; }
+  ul = fltk3::utf8len((char)(value() + m)[0]);
+  while (m < size() && m > mark_ && ul < 0) {
+       m++;
+       ul = fltk3::utf8len((char)(value() + m)[0]);
+  }
+  if (is_same) m = p;
+  if (p == position_ && m == mark_) return 0;
+
+
+  //if (fltk3::selection_owner() == this) fltk3::selection_owner(0);
+  if (p != m) {
+    if (p != position_) minimal_update(position_, p);
+    if (m != mark_) minimal_update(mark_, m);
+  } else {
+    // new position is a cursor
+    if (position_ == mark_) {
+      // old position was just a cursor
+      if (fltk3::focus() == this && !(damage()&fltk3::DAMAGE_EXPOSE)) {
+	minimal_update(position_); erase_cursor_only = 1;
+      }
+    } else { // old position was a selection
+      minimal_update(position_, mark_);
+    }
+  }
+  position_ = p;
+  mark_ = m;
+  return 1;
+}
+
+/**
+  Moves the cursor to the column given by \p up_down_pos.
+
+  This function is helpful when implementing up and down 
+  cursor movement. It moves the cursor from the beginning
+  of a line to the column indicated by the global variable
+  \p up_down_pos in pixel units.
+
+  \param [in] i index into the beginning of a line of text
+  \param [in] keepmark if set, move only the cursor, but not the mark
+  \return index to new cursor position
+*/
+int fltk3::Input_::up_down_position(int i, int keepmark) {
+  // unlike before, i must be at the start of the line already!
+
+  setfont();
+  char buf[MAXBUF];
+  const char* p = value()+i;
+  const char* e = expand(p, buf);
+  const char *l, *r, *t;
+  for (l = p, r = e; l<r; ) {
+    t = l+(r-l+1)/2;
+    int f = (int)expandpos(p, t, buf, 0);
+    if (f <= up_down_pos) l = t; else r = t-1;
+  }
+  int j = l-value();
+  j = position(j, keepmark ? mark_ : j);
+  was_up_down = 1;
+  return j;
+}
+
+/**
+  Put the current selection into the clipboard.
+
+  This function copies the current selection between mark() and
+  position() into the specified \c clipboard. This does not
+  replace the old clipboard contents if position() and
+  mark() are equal. Clipboard 0 maps to the current text
+  selection and clipboard 1 maps to the cut/paste clipboard.
+
+  \param clipboard the clipboard destination 0 or 1
+  \return 0 if no text is selected, 1 if the selection was copied
+  \see fltk3::copy(const char *, int, int)
+*/
+int fltk3::Input_::copy(int clipboard) {
+  int b = position();
+  int e = mark();
+  if (b != e) {
+    if (b > e) {b = mark(); e = position();}
+    if (input_type() == fltk3::SECRET_INPUT) e = b;
+    fltk3::copy(value()+b, e-b, clipboard);
+    return 1;
+  }
+  return 0;
+}
+
+#define MAXFLOATSIZE 40
+
+static char* undobuffer;
+static int undobufferlength;
+static fltk3::Input_* undowidget;
+static int undoat;	// points after insertion
+static int undocut;	// number of characters deleted there
+static int undoinsert;	// number of characters inserted
+static int yankcut;	// length of valid contents of buffer, even if undocut=0
+
+static void undobuffersize(int n) {
+  if (n > undobufferlength) {
+    if (undobuffer) {
+      do {undobufferlength *= 2;} while (undobufferlength < n);
+      undobuffer = (char*)realloc(undobuffer, undobufferlength);
+    } else {
+      undobufferlength = n+9;
+      undobuffer = (char*)malloc(undobufferlength);
+    }
+  }
+}
+
+/**
+  Deletes text from \p b to \p e and inserts the new string \p text.
+
+  All changes to the text buffer go through this function.
+  It deletes the region between \p a and \p b (either one may be less or
+  equal to the other), and then inserts the string \p text
+  at that point and moves the mark() and
+  position() to the end of the insertion. Does the callback if
+  <tt>when() & fltk3::WHEN_CHANGED</tt> and there is a change.
+
+  Set \p b and \p e equal to not delete anything.
+  Set \p text to \c NULL to not insert anything.
+
+  \p ilen can be zero or <tt>strlen(text)</tt>, which
+  saves a tiny bit of time if you happen to already know the
+  length of the insertion, or can be used to insert a portion of a
+  string.
+  
+  \p b and \p e are clamped to the
+  <tt>0..size()</tt> range, so it is safe to pass any values.
+  
+  cut() and insert() are just inline functions that call replace().
+
+  \param [in] b beginning index of text to be deleted
+  \param [in] e ending index of text to be deleted and insertion position
+  \param [in] text string that will be inserted
+  \param [in] ilen length of \p text or 0 for \c nul terminated strings
+  \return 0 if nothing changed
+*/
+int fltk3::Input_::replace(int b, int e, const char* text, int ilen) {
+  int ul, om, op;
+  was_up_down = 0;
+
+  if (b<0) b = 0;
+  if (e<0) e = 0;
+  if (b>size_) b = size_;
+  if (e>size_) e = size_;
+  if (e<b) {int t=b; b=e; e=t;}
+  while (b != e && b > 0 && (size_ - b) > 0 &&
+       (fltk3::utf8len((value_ + b)[0]) < 1)) { b--; }
+  ul = fltk3::utf8len((char)(value_ + e)[0]);
+  while (e < size_ && e > 0 && ul < 0) {
+       e++;
+       ul = fltk3::utf8len((char)(value_ + e)[0]);
+  }
+  if (text && !ilen) ilen = strlen(text);
+  if (e<=b && !ilen) return 0; // don't clobber undo for a null operation
+  if (size_+ilen-(e-b) > maximum_size_) {
+    ilen = maximum_size_-size_+(e-b);
+    if (ilen < 0) ilen = 0;
+  }
+
+  put_in_buffer(size_+ilen);
+
+  if (e>b) {
+    if (undowidget == this && b == undoat) {
+      undobuffersize(undocut+(e-b));
+      memcpy(undobuffer+undocut, value_+b, e-b);
+      undocut += e-b;
+    } else if (undowidget == this && e == undoat && !undoinsert) {
+      undobuffersize(undocut+(e-b));
+      memmove(undobuffer+(e-b), undobuffer, undocut);
+      memcpy(undobuffer, value_+b, e-b);
+      undocut += e-b;
+    } else if (undowidget == this && e == undoat && (e-b)<undoinsert) {
+      undoinsert -= e-b;
+    } else {
+      undobuffersize(e-b);
+      memcpy(undobuffer, value_+b, e-b);
+      undocut = e-b;
+      undoinsert = 0;
+    }
+    memmove(buffer+b, buffer+e, size_-e+1);
+    size_ -= e-b;
+    undowidget = this;
+    undoat = b;
+    if (input_type() == fltk3::SECRET_INPUT) yankcut = 0; else yankcut = undocut;
+  }
+
+  if (ilen) {
+    if (undowidget == this && b == undoat)
+      undoinsert += ilen;
+    else {
+      undocut = 0;
+      undoinsert = ilen;
+    }
+    memmove(buffer+b+ilen, buffer+b, size_-b+1);
+    memcpy(buffer+b, text, ilen);
+    size_ += ilen;
+  }
+  undowidget = this;
+  om = mark_;
+  op = position_;
+  mark_ = position_ = undoat = b+ilen;
+
+  // Insertions into the word at the end of the line will cause it to
+  // wrap to the next line, so we must indicate that the changes may start
+  // right after the whitespace before the current word.  This will
+  // result in sub-optimal update when such wrapping does not happen
+  // but it is too hard to figure out for now...
+  if (wrap()) {
+    // if there is a space in the pasted text, the whole line may have rewrapped
+    int i;
+    for (i=0; i<ilen; i++)
+      if (text[i]==' ') break;
+    if (i==ilen)
+      while (b > 0 && !isspace(index(b) & 255) && index(b)!='\n') b--;
+    else
+      while (b > 0 && index(b)!='\n') b--;
+  }
+
+  // make sure we redraw the old selection or cursor:
+  if (om < b) b = om;
+  if (op < b) b = op;
+
+  minimal_update(b);
+
+  mark_ = position_ = undoat;
+
+  set_changed();
+  if (when()&fltk3::WHEN_CHANGED) do_callback();
+  return 1;
+}
+
+/**
+  Undoes previous changes to the text buffer.
+
+  This call undoes a number of previous calls to replace().
+
+  \return non-zero if any change was made.
+*/
+int fltk3::Input_::undo() {
+  was_up_down = 0;
+  if ( undowidget != this || (!undocut && !undoinsert) ) return 0;
+
+  int ilen = undocut;
+  int xlen = undoinsert;
+  int b = undoat-xlen;
+  int b1 = b;
+
+  put_in_buffer(size_+ilen);
+
+  if (ilen) {
+    memmove(buffer+b+ilen, buffer+b, size_-b+1);
+    memcpy(buffer+b, undobuffer, ilen);
+    size_ += ilen;
+    b += ilen;
+  }
+
+  if (xlen) {
+    undobuffersize(xlen);
+    memcpy(undobuffer, buffer+b, xlen);
+    memmove(buffer+b, buffer+b+xlen, size_-xlen-b+1);
+    size_ -= xlen;
+  }
+
+  undocut = xlen;
+  if (xlen) yankcut = xlen;
+  undoinsert = ilen;
+  undoat = b;
+  mark_ = b /* -ilen */;
+  position_ = b;
+
+  if (wrap())
+    while (b1 > 0 && index(b1)!='\n') b1--;
+  minimal_update(b1);
+  set_changed();
+  if (when()&fltk3::WHEN_CHANGED) do_callback();
+  return 1;
+}
+
+/**
+  Copies the \e yank buffer to the clipboard.
+
+  This method copies all the previous contiguous cuts from the undo
+  information to the clipboard. This function implements 
+  the \c ^K shortcut key.
+
+  \return 0 if the operation did not change the clipboard
+  \see copy(int), cut()
+*/
+int fltk3::Input_::copy_cuts() {
+  // put the yank buffer into the X clipboard
+  if (!yankcut || input_type()==fltk3::SECRET_INPUT) return 0;
+  fltk3::copy(undobuffer, yankcut, 1);
+  return 1;
+}
+
+/** \internal
+  Checks the when() field and does a callback if indicated.
+*/
+void fltk3::Input_::maybe_do_callback() {
+  if (changed() || (when()&fltk3::WHEN_NOT_CHANGED)) {
+    do_callback();
+  }
+}
+
+/** 
+  Handles all kinds of text field related events.
+
+  This is called by derived classes.
+  \todo Add comment and parameters
+*/
+int fltk3::Input_::handletext(int event, int X, int Y, int W, int H) {
+  switch (event) {
+
+  case fltk3::ENTER:
+  case fltk3::MOVE:
+    if (active_r() && window()) window()->cursor(fltk3::CURSOR_INSERT);
+    return 1;
+
+  case fltk3::LEAVE:
+    if (active_r() && window()) window()->cursor(fltk3::CURSOR_DEFAULT);
+    return 1;
+
+  case fltk3::FOCUS:
+    fltk3::set_spot(textfont(), textsize(), x(), y(), w(), h(), window());
+    if (mark_ == position_) {
+      minimal_update(size()+1);
+    } else //if (fltk3::selection_owner() != this)
+      minimal_update(mark_, position_);
+    return 1;
+
+  case fltk3::UNFOCUS:
+    if (active_r() && window()) window()->cursor(fltk3::CURSOR_DEFAULT);
+    if (mark_ == position_) {
+      if (!(damage()&fltk3::DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;}
+    } else //if (fltk3::selection_owner() != this)
+      minimal_update(mark_, position_);
+  case fltk3::HIDE:
+    fltk3::reset_spot();
+    if (!readonly() && (when() & fltk3::WHEN_RELEASE))
+      maybe_do_callback();
+    return 1;
+
+  case fltk3::PUSH:
+    if (active_r() && window()) window()->cursor(fltk3::CURSOR_INSERT);
+
+    handle_mouse(X, Y, W, H, fltk3::event_state(fltk3::SHIFT));
+
+    if (fltk3::focus() != this) {
+      fltk3::focus(this);
+      handle(fltk3::FOCUS);
+    }
+    return 1;
+
+  case fltk3::DRAG:
+    handle_mouse(X, Y, W, H, 1);
+    return 1;
+
+  case fltk3::RELEASE:
+    copy(0);
+    return 1;
+
+  case fltk3::PASTE: {
+    // Don't allow pastes into readonly widgets...
+    if (readonly()) {
+      fltk3::beep(fltk3::BEEP_ERROR);
+      return 1;
+    }
+
+    // See if we have anything to paste...
+    if (!fltk3::event_text() || !fltk3::event_length()) return 1;
+
+    // strip trailing control characters and spaces before pasting:
+    const char* t = fltk3::event_text();
+    const char* e = t+fltk3::event_length();
+    if (input_type() != fltk3::MULTILINE_INPUT) while (e > t && isspace(*(e-1) & 255)) e--;
+    if (!t || e <= t) return 1; // Int/float stuff will crash without this test
+    if (input_type() == fltk3::INT_INPUT) {
+      while (isspace(*t & 255) && t < e) t ++;
+      const char *p = t;
+      if (*p == '+' || *p == '-') p ++;
+      if (strncmp(p, "0x", 2) == 0) {
+        p += 2;
+        while (isxdigit(*p & 255) && p < e) p ++;
+      } else {
+        while (isdigit(*p & 255) && p < e) p ++;
+      }
+      if (p < e) {
+        fltk3::beep(fltk3::BEEP_ERROR);
+        return 1;
+      } else return replace(0, size(), t, e - t);
+    } else if (input_type() == fltk3::FLOAT_INPUT) {
+      while (isspace(*t & 255) && t < e) t ++;
+      const char *p = t;
+      if (*p == '+' || *p == '-') p ++;
+      while (isdigit(*p & 255) && p < e) p ++;
+      if (*p == '.') {
+        p ++;
+        while (isdigit(*p & 255) && p < e) p ++;
+	if (*p == 'e' || *p == 'E') {
+	  p ++;
+	  if (*p == '+' || *p == '-') p ++;
+	  while (isdigit(*p & 255) && p < e) p ++;
+	}
+      }
+      if (p < e) {
+        fltk3::beep(fltk3::BEEP_ERROR);
+        return 1;
+      } else return replace(0, size(), t, e - t);
+    }
+    return replace(position(), mark(), t, e-t);}
+
+  case fltk3::SHORTCUT:
+    if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut())) 
+      return 0;
+    if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+      fltk3::focus(this);
+      return 1;
+    } // else fall through
+
+  default:
+    return 0;
+  }
+}
+
+/*------------------------------*/
+
+/**
+  Creates a new fltk3::Input_ widget.
+
+  This function creates a new fltk3::Input_ widget and adds it to the current
+  fltk3::Group. The value() is set to \c NULL.
+  The default boxtype is \c fltk3::DOWN_BOX.
+
+  \param X, Y, W, H the dimensions of the new widget
+  \param l an optional label text
+*/
+fltk3::Input_::Input_(int X, int Y, int W, int H, const char* l)
+: fltk3::Widget(X, Y, W, H, l) {
+  box(fltk3::DOWN_BOX);
+  color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
+  align(fltk3::ALIGN_LEFT);
+  textsize(fltk3::NORMAL_SIZE);
+  textfont(fltk3::HELVETICA);
+  textcolor(fltk3::FOREGROUND_COLOR);
+  cursor_color_ = fltk3::FOREGROUND_COLOR; // was fltk3::BLUE
+  mark_ = position_ = size_ = 0;
+  bufsize = 0;
+  buffer  = 0;
+  value_ = "";
+  xscroll_ = yscroll_ = 0;
+  maximum_size_ = 32767;
+  shortcut_ = 0;
+  set_flag(SHORTCUT_LABEL);
+  tab_nav(1);
+}
+
+/**
+ Copies the value from a possibly static entry into the internal buffer.
+
+ \param [in] len size of the current text
+*/
+void fltk3::Input_::put_in_buffer(int len) {
+  if (value_ == buffer && bufsize > len) {
+    buffer[size_] = 0;
+    return;
+  }
+  if (!bufsize) {
+    if (len > size_) len += 9; // let a few characters insert before realloc
+    bufsize = len+1; 
+    buffer = (char*)malloc(bufsize);
+  } else if (bufsize <= len) {
+    // we may need to move old value in case it points into buffer:
+    int moveit = (value_ >= buffer && value_ < buffer+bufsize);
+    // enlarge current buffer
+    if (len > size_) {
+      do {bufsize *= 2;} while (bufsize <= len);
+    } else {
+      bufsize = len+1;
+    }
+    // Note: the following code is equivalent to:
+    //
+    //   if (moveit) value_ = value_ - buffer;
+    //   char* nbuffer = (char*)realloc(buffer, bufsize);
+    //   if (moveit) value_ = value_ + nbuffer;
+    //   buffer = nbuffer;
+    //
+    // We just optimized the pointer arithmetic for value_...
+    //
+    char* nbuffer = (char*)realloc(buffer, bufsize);
+    if (moveit) value_ += (nbuffer-buffer);
+    buffer = nbuffer;
+  }
+  memmove(buffer, value_, size_); buffer[size_] = 0;
+  value_ = buffer;
+}
+
+/**
+  Changes the widget text.
+
+  This function changes the text and sets the mark and the point to 
+  the end of it. The string is \e not copied. If the user edits the
+  string it is copied to the internal buffer then. This can save a
+  great deal of time and memory if your program is rapidly
+  changing the values of text fields, but this will only work if
+  the passed string remains unchanged until either the
+  fltk3::Input is destroyed or value() is called again.
+
+  You can use the \p len parameter to directly set the length
+  if you know it already or want to put \c nul characters in the text.
+
+  \param [in] str the new text 
+  \param [in] len the length of the new text
+  \return non-zero if the new value is different than the current one
+*/
+int fltk3::Input_::static_value(const char* str, int len) {
+  clear_changed();
+  if (undowidget == this) undowidget = 0;
+  if (str == value_ && len == size_) return 0;
+  if (len) { // non-empty new value:
+    if (xscroll_ || yscroll_) {
+      xscroll_ = yscroll_ = 0;
+      minimal_update(0);
+    } else {
+      int i = 0;
+      // find first different character:
+      if (value_) {
+	for (; i<size_ && i<len && str[i]==value_[i]; i++);
+	if (i==size_ && i==len) return 0;
+      }
+      minimal_update(i);
+    }
+    value_ = str;
+    size_ = len;
+  } else { // empty new value:
+    if (!size_) return 0; // both old and new are empty.
+    size_ = 0;
+    value_ = "";
+    xscroll_ = yscroll_ = 0;
+    minimal_update(0);
+  }
+  position(readonly() ? 0 : size());
+  return 1;
+}
+
+/**
+  Changes the widget text.
+
+  This function changes the text and sets the mark and the point to 
+  the end of it. The string is \e not copied. If the user edits the
+  string it is copied to the internal buffer then. This can save a
+  great deal of time and memory if your program is rapidly
+  changing the values of text fields, but this will only work if
+  the passed string remains unchanged until either the
+  fltk3::Input is destroyed or value() is called again.
+
+  \param [in] str the new text 
+  \return non-zero if the new value is different than the current one
+*/
+int fltk3::Input_::static_value(const char* str) {
+  return static_value(str, str ? strlen(str) : 0);
+}
+
+/**
+  Changes the widget text.
+
+  This function changes the text and sets the mark and the
+  point to the end of it. The string is copied to the internal
+  buffer. Passing \c NULL is the same as "". 
+
+  You can use the \p length parameter to directly set the length
+  if you know it already or want to put \c nul characters in the text.
+
+  \param [in] str the new text 
+  \param [in] len the length of the new text
+  \return non-zero if the new value is different than the current one
+  \see fltk3::Input_::value(const char* str), fltk3::Input_::value()
+*/
+int fltk3::Input_::value(const char* str, int len) {
+  int r = static_value(str, len);
+  if (len) put_in_buffer(len);
+  return r;
+}
+
+/** 
+  Changes the widget text.
+
+  This function changes the text and sets the mark and the
+  point to the end of it. The string is copied to the internal
+  buffer. Passing \c NULL is the same as \c "". 
+
+  \param [in] str the new text 
+  \return non-zero if the new value is different than the current one
+  \see fltk3::Input_::value(const char* str, int len), fltk3::Input_::value()
+*/
+int fltk3::Input_::value(const char* str) {
+  return value(str, str ? strlen(str) : 0);
+}
+
+/**
+  Changes the size of the widget.
+  This call updates the text layout so that the cursor is visible.
+  \param [in] X, Y, W, H new size of the widget
+  \see fltk3::Widget::resize(int, int, int, int)
+*/
+void fltk3::Input_::resize(int X, int Y, int W, int H) {
+  if (W != w()) xscroll_ = 0;
+  if (H != h()) yscroll_ = 0;
+  Widget::resize(X, Y, W, H);
+}
+
+/**
+  Destroys the widget.
+
+  The destructor clears all allocated buffers and removes the widget
+  from the parent fltk3::Group.
+*/
+fltk3::Input_::~Input_() {
+  if (undowidget == this) undowidget = 0;
+  if (bufsize) free((void*)buffer);
+}
+
+/** \internal
+  Returns the number of lines displayed on a single page.
+  \return widget height divided by the font height
+*/
+int fltk3::Input_::linesPerPage() {
+  int n = 1;
+  if (input_type() == fltk3::MULTILINE_INPUT) {
+    fltk3::font(textfont(),textsize()); //ensure current font is set to ours
+    n = h()/fltk3::height(); // number of lines to scroll
+    if (n<=0) n = 1;
+  }
+  return n;
+}
+
+/**
+  Returns the character at index \p i.
+
+  This function returns the UTF-8 character at \p i 
+  as a ucs4 character code.
+
+  \param [in] i index into the value field
+  \return the character at index \p i
+*/
+unsigned int fltk3::Input_::index(int i) const 
+{
+  int len = 0;
+  return fltk3::utf8decode(value_+i, value_+size_, &len);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Input_.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_JPEG_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_JPEG_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_JPEG_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,381 @@
+//
+// "$Id$"
+//
+// fltk3::JPEGImage routines.
+//
+// Copyright 1997-2011 by Easy Software Products.
+// Image support by Matthias Melcher, Copyright 2000-2009.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::JPEGImage::fltk3::JPEGImage() - Load a JPEG image file.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/JPEGImage.h>
+#include <fltk3/SharedImage.h>
+#include <fltk3/utf8.h>
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <setjmp.h>
+
+
+// Some releases of the Cygwin JPEG libraries don't have a correctly
+// updated header file for the INT32 data type; the following define
+// from Shane Hill seems to be a usable workaround...
+
+#if defined(WIN32) && defined(__CYGWIN__)
+#  define XMD_H
+#endif // WIN32 && __CYGWIN__
+
+
+extern "C"
+{
+#ifdef HAVE_LIBJPEG
+#  include <jpeglib.h>
+#endif // HAVE_LIBJPEG
+}
+
+
+//
+// Custom JPEG error handling structure...
+//
+
+#ifdef HAVE_LIBJPEG
+struct fl_jpeg_error_mgr {
+  jpeg_error_mgr	pub_;		// Destination manager...
+  jmp_buf		errhand_;	// Error handler
+};
+#endif // HAVE_LIBJPEG
+
+
+//
+// Error handler for JPEG files...
+//
+
+#ifdef HAVE_LIBJPEG
+extern "C" {
+  static void
+  fl_jpeg_error_handler(j_common_ptr dinfo) {	// I - Decompressor info
+    longjmp(((fl_jpeg_error_mgr *)(dinfo->err))->errhand_, 1);
+  }
+
+  static void
+  fl_jpeg_output_handler(j_common_ptr) {	// I - Decompressor info (not used)
+  }
+}
+#endif // HAVE_LIBJPEG
+
+
+/**
+ \brief The constructor loads the JPEG image from the given jpeg filename.
+ 
+ The inherited destructor frees all memory and server resources that are used 
+ by the image.
+ 
+ There is no error function in this class. If the image has loaded correctly, 
+ w(), h(), and d() should return values greater zero.
+ 
+ \param[in] filename a full path and name pointing to a valid jpeg file.
+ */
+fltk3::JPEGImage::JPEGImage(const char *filename)	// I - File to load
+: fltk3::RGBImage(0,0,0) {
+#ifdef HAVE_LIBJPEG
+  FILE				*fp;	// File pointer
+  jpeg_decompress_struct	dinfo;	// Decompressor info
+  fl_jpeg_error_mgr		jerr;	// Error handler info
+  JSAMPROW			row;	// Sample row pointer
+  
+  // the following variables are pointers allocating some private space that
+  // is not reset by 'setjmp()'
+  char* max_finish_decompress_err;      // count errors and give up afer a while
+  char* max_destroy_decompress_err;     // to avoid recusion and deadlock
+  
+  // Clear data...
+  alloc_array = 0;
+  array = (uchar *)0;
+  
+  // Open the image file...
+  if ((fp = fltk3::fopen(filename, "rb")) == NULL) return;
+  
+  // Setup the decompressor info and read the header...
+  dinfo.err                = jpeg_std_error((jpeg_error_mgr *)&jerr);
+  jerr.pub_.error_exit     = fl_jpeg_error_handler;
+  jerr.pub_.output_message = fl_jpeg_output_handler;
+  
+  // Setup error loop variables
+  max_finish_decompress_err = (char*)malloc(1);   // allocate space on the frame for error counters
+  max_destroy_decompress_err = (char*)malloc(1);  // otherwise, the variables are reset on the longjmp
+  *max_finish_decompress_err=10;
+  *max_destroy_decompress_err=10;
+  
+  if (setjmp(jerr.errhand_))
+  {
+    // JPEG error handling...
+    // if any of the cleanup routines hits another error, we would end up 
+    // in a loop. So instead, we decrement max_err for some upper cleanup limit.
+    if ( ((*max_finish_decompress_err)-- > 0) && array)
+      jpeg_finish_decompress(&dinfo);
+    if ( (*max_destroy_decompress_err)-- > 0)
+      jpeg_destroy_decompress(&dinfo);
+    
+    fclose(fp);
+    
+    w(0);
+    h(0);
+    d(0);
+    
+    if (array) {
+      delete[] (uchar *)array;
+      array = 0;
+      alloc_array = 0;
+    }
+    
+    free(max_destroy_decompress_err);
+    free(max_finish_decompress_err);
+    
+    return;
+  }
+  
+  jpeg_create_decompress(&dinfo);
+  jpeg_stdio_src(&dinfo, fp);
+  jpeg_read_header(&dinfo, 1);
+  
+  dinfo.quantize_colors      = (boolean)FALSE;
+  dinfo.out_color_space      = JCS_RGB;
+  dinfo.out_color_components = 3;
+  dinfo.output_components    = 3;
+  
+  jpeg_calc_output_dimensions(&dinfo);
+  
+  w(dinfo.output_width); 
+  h(dinfo.output_height);
+  d(dinfo.output_components);
+  
+  array = new uchar[w() * h() * d()];
+  alloc_array = 1;
+  
+  jpeg_start_decompress(&dinfo);
+  
+  while (dinfo.output_scanline < dinfo.output_height) {
+    row = (JSAMPROW)(array +
+                     dinfo.output_scanline * dinfo.output_width *
+                     dinfo.output_components);
+    jpeg_read_scanlines(&dinfo, &row, (JDIMENSION)1);
+  }
+  
+  jpeg_finish_decompress(&dinfo);
+  jpeg_destroy_decompress(&dinfo);
+  
+  free(max_destroy_decompress_err);
+  free(max_finish_decompress_err);
+  
+  fclose(fp);
+#endif // HAVE_LIBJPEG
+}
+
+
+// data source manager for reading jpegs from memory
+// init_source (j_decompress_ptr cinfo)
+// fill_input_buffer (j_decompress_ptr cinfo)
+// skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+// resync_to_restart (j_decompress_ptr cinfo, int desired)
+// term_source (j_decompress_ptr cinfo)
+//         JOCTET * next_output_byte;  /* => next byte to write in buffer */
+//         size_t free_in_buffer;      /* # of byte spaces remaining in buffer */
+
+#ifdef HAVE_LIBJPEG
+typedef struct {
+  struct jpeg_source_mgr pub;
+  const unsigned char *data, *s;
+  // JOCTET * buffer;              /* start of buffer */
+  // boolean start_of_file;        /* have we gotten any data yet? */
+} my_source_mgr;
+
+typedef my_source_mgr *my_src_ptr;
+
+
+void init_source (j_decompress_ptr cinfo) {
+  my_src_ptr src = (my_src_ptr)cinfo->src;
+  src->s = src->data;
+}
+
+boolean fill_input_buffer(j_decompress_ptr cinfo) {
+  my_src_ptr src = (my_src_ptr)cinfo->src;
+  size_t nbytes = 4096;
+  src->pub.next_input_byte = src->s;
+  src->pub.bytes_in_buffer = nbytes;
+  src->s += nbytes;
+  return TRUE;
+}
+
+void term_source(j_decompress_ptr cinfo)
+{
+}
+
+void skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
+  my_src_ptr src = (my_src_ptr)cinfo->src;
+  if (num_bytes > 0) {
+    while (num_bytes > (long)src->pub.bytes_in_buffer) {
+      num_bytes -= (long)src->pub.bytes_in_buffer;
+      fill_input_buffer(cinfo);
+    }
+    src->pub.next_input_byte += (size_t) num_bytes;
+    src->pub.bytes_in_buffer -= (size_t) num_bytes;
+  }
+}
+
+static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data)
+{
+  my_src_ptr src;
+  cinfo->src = (struct jpeg_source_mgr *)malloc(sizeof(my_source_mgr));
+  src = (my_src_ptr)cinfo->src;
+  src->pub.init_source = init_source;
+  src->pub.fill_input_buffer = fill_input_buffer;
+  src->pub.skip_input_data = skip_input_data;
+  src->pub.resync_to_restart = jpeg_resync_to_restart;
+  src->pub.term_source = term_source;
+  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
+  src->pub.next_input_byte = NULL; /* until buffer loaded */
+  src->data = data;
+  src->s = data;
+}
+#endif // HAVE_LIBJPEG
+
+
+/**
+ \brief The constructor loads the JPEG image from memory.
+
+ Construct an image from a block of memory inside the application. Fluid offers
+ "binary Data" chunks as a great way to add image data into the C++ source code.
+ name_png can be NULL. If a name is given, the image is added to the list of 
+ shared images (see: fltk3::SharedImage) and will be available by that name.
+
+ The inherited destructor frees all memory and server resources that are used 
+ by the image.
+
+ There is no error function in this class. If the image has loaded correctly, 
+ w(), h(), and d() should return values greater zero.
+
+ \param name A unique name or NULL
+ \param data A pointer to the memory location of the JPEG image
+ */
+fltk3::JPEGImage::JPEGImage(const char *name, const unsigned char *data)
+: fltk3::RGBImage(0,0,0) {
+#ifdef HAVE_LIBJPEG
+  jpeg_decompress_struct	dinfo;	// Decompressor info
+  fl_jpeg_error_mgr		jerr;	// Error handler info
+  JSAMPROW			row;	// Sample row pointer
+  
+  // the following variables are pointers allocating some private space that
+  // is not reset by 'setjmp()'
+  char* max_finish_decompress_err;      // count errors and give up afer a while
+  char* max_destroy_decompress_err;     // to avoid recusion and deadlock
+  
+  // Clear data...
+  alloc_array = 0;
+  array = (uchar *)0;
+  
+  // Setup the decompressor info and read the header...
+  dinfo.err                = jpeg_std_error((jpeg_error_mgr *)&jerr);
+  jerr.pub_.error_exit     = fl_jpeg_error_handler;
+  jerr.pub_.output_message = fl_jpeg_output_handler;
+  
+  // Setup error loop variables
+  max_finish_decompress_err = (char*)malloc(1);   // allocate space on the frame for error counters
+  max_destroy_decompress_err = (char*)malloc(1);  // otherwise, the variables are reset on the longjmp
+  *max_finish_decompress_err=10;
+  *max_destroy_decompress_err=10;
+  
+  if (setjmp(jerr.errhand_))
+  {
+    // JPEG error handling...
+    // if any of the cleanup routines hits another error, we would end up 
+    // in a loop. So instead, we decrement max_err for some upper cleanup limit.
+    if ( ((*max_finish_decompress_err)-- > 0) && array)
+      jpeg_finish_decompress(&dinfo);
+    if ( (*max_destroy_decompress_err)-- > 0)
+      jpeg_destroy_decompress(&dinfo);
+    
+    w(0);
+    h(0);
+    d(0);
+    
+    if (array) {
+      delete[] (uchar *)array;
+      array = 0;
+      alloc_array = 0;
+    }
+    
+    free(max_destroy_decompress_err);
+    free(max_finish_decompress_err);
+    
+    return;
+  }
+  
+  jpeg_create_decompress(&dinfo);
+  jpeg_mem_src(&dinfo, data);
+  jpeg_read_header(&dinfo, 1);
+  
+  dinfo.quantize_colors      = (boolean)FALSE;
+  dinfo.out_color_space      = JCS_RGB;
+  dinfo.out_color_components = 3;
+  dinfo.output_components    = 3;
+  
+  jpeg_calc_output_dimensions(&dinfo);
+  
+  w(dinfo.output_width); 
+  h(dinfo.output_height);
+  d(dinfo.output_components);
+  
+  array = new uchar[w() * h() * d()];
+  alloc_array = 1;
+  
+  jpeg_start_decompress(&dinfo);
+  
+  while (dinfo.output_scanline < dinfo.output_height) {
+    row = (JSAMPROW)(array +
+                     dinfo.output_scanline * dinfo.output_width *
+                     dinfo.output_components);
+    jpeg_read_scanlines(&dinfo, &row, (JDIMENSION)1);
+  }
+  
+  jpeg_finish_decompress(&dinfo);
+  jpeg_destroy_decompress(&dinfo);
+  
+  free(max_destroy_decompress_err);
+  free(max_finish_decompress_err);
+
+  if (w() && h() && name) {
+    fltk3::SharedImage *si = new fltk3::SharedImage(name, this);
+    si->add();
+  }
+#endif // HAVE_LIBJPEG
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_JPEG_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Light_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Light_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Light_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,176 @@
+//
+// "$Id$"
+//
+// Lighted button widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Subclass of fltk3::Button where the "box" indicates whether it is
+// pushed or not, and the "down box" is drawn small and square on
+// the left to indicate the current state.
+
+// The default down_box of zero draws a rectangle designed to look
+// just like Flame's buttons.
+
+#include <fltk3/run.h>
+#include <fltk3/LightButton.h>
+#include <fltk3/draw.h>
+#include "flstring.h"
+
+void fltk3::LightButton::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (box()) draw_box(this==fltk3::pushed() ? fltk3::down(box()) : box(), color());
+  fltk3::Color col = value() ? (active_r() ? selection_color() :
+                            fltk3::inactive(selection_color())) : color();
+  int W;
+  int dx, dy;
+
+  W  = labelsize();
+  dx = fltk3::box_dx(box()) + 2;
+  dy = (h() - W) / 2;
+  // if (dy < 0) dy = 0;         // neg. offset o.k. for vertical centering
+
+  if (down_box()) {
+    // draw other down_box() styles:
+    switch (down_box()) {
+      case fltk3::DOWN_BOX :
+      case fltk3::UP_BOX :
+      case fltk3::PLASTIC_DOWN_BOX :
+      case fltk3::PLASTIC_UP_BOX :
+        // Check box...
+        draw_box(down_box(), x()+dx, y()+dy, W, W, fltk3::BACKGROUND2_COLOR);
+	if (value()) {
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
+	    fltk3::color(fltk3::SELECTION_COLOR);
+	  } else {
+	    fltk3::color(col);
+	  }
+	  int tx = x() + dx + 3;
+	  int tw = W - 6;
+	  int d1 = tw/3;
+	  int d2 = tw-d1;
+	  int ty = y() + dy + (W+d2)/2-d1-2;
+	  for (int n = 0; n < 3; n++, ty++) {
+	    fltk3::line(tx, ty, tx+d1, ty+d1);
+	    fltk3::line(tx+d1, ty+d1, tx+tw-1, ty+d1-d2+1);
+	  }
+	}
+        break;
+      case fltk3::ROUND_DOWN_BOX :
+      case fltk3::ROUND_UP_BOX :
+        // Radio button...
+        draw_box(down_box(), x()+dx, y()+dy, W, W, fltk3::BACKGROUND2_COLOR);
+	if (value()) {
+	  int tW = (W - fltk3::box_dw(down_box())) / 2 + 1;
+	  if ((W - tW) & 1) tW++; // Make sure difference is even to center
+	  int tdx = dx + (W - tW) / 2;
+	  int tdy = dy + (W - tW) / 2;
+
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
+	    fltk3::color(fltk3::SELECTION_COLOR);
+	    tW --;
+	    fltk3::pie(x() + tdx - 1, y() + tdy - 1, tW + 3, tW + 3, 0.0, 360.0);
+	    fltk3::arc(x() + tdx - 1, y() + tdy - 1, tW + 3, tW + 3, 0.0, 360.0);
+	    fltk3::color(fltk3::color_average(fltk3::WHITE, fltk3::SELECTION_COLOR, 0.2f));
+	  } else fltk3::color(col);
+
+	  switch (tW) {
+	    // Larger circles draw fine...
+	    default :
+              fltk3::pie(x() + tdx, y() + tdy, tW, tW, 0.0, 360.0);
+	      break;
+
+            // Small circles don't draw well on many systems...
+	    case 6 :
+	      fltk3::rectf(x() + tdx + 2, y() + tdy, tW - 4, tW);
+	      fltk3::rectf(x() + tdx + 1, y() + tdy + 1, tW - 2, tW - 2);
+	      fltk3::rectf(x() + tdx, y() + tdy + 2, tW, tW - 4);
+	      break;
+
+	    case 5 :
+	    case 4 :
+	    case 3 :
+	      fltk3::rectf(x() + tdx + 1, y() + tdy, tW - 2, tW);
+	      fltk3::rectf(x() + tdx, y() + tdy + 1, tW, tW - 2);
+	      break;
+
+	    case 2 :
+	    case 1 :
+	      fltk3::rectf(x() + tdx, y() + tdy, tW, tW);
+	      break;
+	  }
+
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
+	    fltk3::color(fltk3::color_average(fltk3::WHITE, fltk3::SELECTION_COLOR, 0.5));
+	    fltk3::arc(x() + tdx, y() + tdy, tW + 1, tW + 1, 60.0, 180.0);
+	  }
+	}
+        break;
+      default :
+        draw_box(down_box(), x()+dx, y()+dy, W, W, col);
+        break;
+    }
+  } else {
+    // if down_box() is zero, draw light button style:
+    int hh = h()-2*dy - 2;
+    int ww = W/2+1;
+    int xx = dx;
+    if (w()<ww+2*xx) xx = (w()-ww)/2;
+    if (fltk3::scheme() && !strcmp(fltk3::scheme(), "plastic")) {
+      col = active_r() ? selection_color() : fltk3::inactive(selection_color());
+      fltk3::color(value() ? col : fltk3::color_average(col, fltk3::BLACK, 0.5f));
+      fltk3::pie(x()+xx, y()+dy+1, ww, hh, 0, 360);
+    } else {
+      draw_box(fltk3::THIN_DOWN_BOX, x()+xx, y()+dy+1, ww, hh, col);
+    }
+    dx = (ww + 2 * dx - W) / 2;
+  }
+  draw_label(x()+W+2*dx, y(), w()-W-2*dx, h());
+  if (fltk3::focus() == this) draw_focus();
+}
+
+int fltk3::LightButton::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  switch (event) {
+  case fltk3::RELEASE:
+    if (box()) redraw();
+  default:
+    return Button::handle(event);
+  }
+}
+
+/**
+  Creates a new fltk3::LightButton widget using the given
+  position, size, and label string.
+  <P>The destructor deletes the check button.
+*/
+fltk3::LightButton::LightButton(int X, int Y, int W, int H, const char* l)
+: fltk3::Button(X, Y, W, H, l) {
+  type(fltk3::TOGGLE_BUTTON);
+  selection_color(fltk3::YELLOW);
+  align(fltk3::ALIGN_LEFT|fltk3::ALIGN_INSIDE);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Light_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1060 @@
+//
+// "$Id$"
+//
+// Menu code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Warning: this menu code is quite a mess!
+
+// This file contains code for implementing fltk3::MenuItem, and for
+// methods for bringing up popup menu hierarchies without using the
+// fltk3::Menu_ widget.
+
+#include <fltk3/run.h>
+#include <fltk3/MenuWindow.h>
+#include <fltk3/Menu_.h>
+#include <fltk3/draw.h>
+#include <stdio.h>
+#include "flstring.h"
+
+/** Size of the menu starting from this menu item */
+int fltk3::MenuItem::size() const {
+  const fltk3::MenuItem* m = this;
+  int nest = 0;
+  for (;;) {
+    if (!m->text) {
+      if (!nest) return (m-this+1);
+      nest--;
+    } else if (m->flags & fltk3::SUBMENU) {
+      nest++;
+    }
+    m++;
+  }
+}
+
+// Advance a pointer to next visible or invisible item of a menu array, 
+// skipping the contents of submenus.
+static const fltk3::MenuItem* next_visible_or_not(const fltk3::MenuItem* m) {
+  int nest = 0;
+  do {
+    if (!m->text) {
+      if (!nest) return m;
+      nest--;
+    } else if (m->flags&fltk3::SUBMENU) {
+      nest++;
+    }
+    m++;
+  }
+  while (nest);
+  return m;
+}
+
+/**
+  Advance a pointer by n items through a menu array, skipping
+  the contents of submenus and invisible items.  There are two calls so
+  that you can advance through const and non-const data.
+*/
+const fltk3::MenuItem* fltk3::MenuItem::next(int n) const {
+  if (n < 0) return 0; // this is so selected==-1 returns NULL
+  const fltk3::MenuItem* m = this;
+  if (!m->visible()) n++;
+  while (n) {
+    m = next_visible_or_not(m);
+    if (m->visible() || !m->text) n--;
+  }
+  return m;
+}
+
+// appearance of current menus are pulled from this parent widget:
+static const fltk3::Menu_* button=0;
+
+////////////////////////////////////////////////////////////////
+
+// tiny window for title of menu:
+class menutitle : public fltk3::MenuWindow {
+  void draw();
+public:
+  const fltk3::MenuItem* menu;
+  menutitle(int X, int Y, int W, int H, const fltk3::MenuItem*);
+};
+
+// each vertical menu has one of these:
+class menuwindow : public fltk3::MenuWindow {
+  void draw();
+  void drawentry(const fltk3::MenuItem*, int i, int erase);
+public:
+  menutitle* title;
+  int handle(int);
+#if defined (__APPLE__) || defined (USE_X11)
+  int early_hide_handle(int);
+#endif
+  int itemheight;	// zero == menubar
+  int numitems;
+  int selected;
+  int drawn_selected;	// last redraw has this selected
+  int shortcutWidth;
+  const fltk3::MenuItem* menu;
+  menuwindow(const fltk3::MenuItem* m, int X, int Y, int W, int H,
+	     const fltk3::MenuItem* picked, const fltk3::MenuItem* title,
+	     int menubar = 0, int menubar_title = 0, int right_edge = 0);
+  ~menuwindow();
+  void set_selected(int);
+  int find_selected(int mx, int my);
+  int titlex(int);
+  void autoscroll(int);
+  void position(int x, int y);
+  int is_inside(int x, int y);
+};
+
+#define LEADING 4 // extra vertical leading
+
+extern char fltk3::draw_shortcut;
+
+/** 
+  Measures width of label, including effect of & characters. 
+  Optionally, can get height if hp is not NULL. 
+*/
+int fltk3::MenuItem::measure(int* hp, const fltk3::Menu_* m) const {
+  fltk3::Label l;
+  l.value   = text;
+  l.image   = 0;
+  l.deimage = 0;
+  l.type    = labeltype_;
+  l.font    = labelsize_ || labelfont_ ? labelfont_ : (m ? m->textfont() : fltk3::HELVETICA);
+  l.size    = labelsize_ ? labelsize_ : m ? m->textsize() : fltk3::NORMAL_SIZE;
+  l.color   = fltk3::FOREGROUND_COLOR; // this makes no difference?
+  fltk3::draw_shortcut = 1;
+  int w = 0; int h = 0;
+  l.measure(w, hp ? *hp : h);
+  fltk3::draw_shortcut = 0;
+  if (flags & (fltk3::MENU_TOGGLE|fltk3::MENU_RADIO)) w += 14;
+  return w;
+}
+
+/** Draws the menu item in bounding box x,y,w,h, optionally selects the item. */
+void fltk3::MenuItem::draw(int x, int y, int w, int h, const fltk3::Menu_* m,
+			int selected) const {
+  fltk3::Label l;
+  l.value   = text;
+  l.image   = 0;
+  l.deimage = 0;
+  l.type    = labeltype_;
+  l.font    = labelsize_ || labelfont_ ? labelfont_ : (m ? m->textfont() : fltk3::HELVETICA);
+  l.size    = labelsize_ ? labelsize_ : m ? m->textsize() : fltk3::NORMAL_SIZE;
+  l.color   = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(fltk3::FOREGROUND_COLOR);
+  if (!active()) l.color = fltk3::inactive((fltk3::Color)l.color);
+  fltk3::Color color = m ? m->color() : fltk3::GRAY;
+  if (selected) {
+    fltk3::Color r = m ? m->selection_color() : fltk3::SELECTION_COLOR;
+    fltk3::Boxtype b = m && m->down_box() ? m->down_box() : fltk3::FLAT_BOX;
+    if (fltk3::contrast(r,color)!=r) { // back compatibility boxtypes
+      if (selected == 2) { // menu title
+	r = color;
+	b = m ? m->box() : fltk3::UP_BOX;
+      } else {
+	r = (fltk3::Color)(fltk3::COLOR_CUBE-1); // white
+	l.color = fltk3::contrast((fltk3::Color)labelcolor_, r);
+      }
+    } else {
+      l.color = fltk3::contrast((fltk3::Color)labelcolor_, r);
+    }
+    if (selected == 2) { // menu title
+      fltk3::draw_box(b, x, y, w, h, r);
+      x += 3;
+      w -= 8;
+    } else {
+      fltk3::draw_box(b, x+1, y-(LEADING-2)/2, w-2, h+(LEADING-2), r);
+    }
+  }
+
+  if (flags & (fltk3::MENU_TOGGLE|fltk3::MENU_RADIO)) {
+    int d = (h - fltk3::NORMAL_SIZE + 1) / 2;
+    int W = h - 2 * d;
+
+    if (flags & fltk3::MENU_RADIO) {
+      fltk3::draw_box(fltk3::ROUND_DOWN_BOX, x+2, y+d, W, W, fltk3::BACKGROUND2_COLOR);
+      if (value()) {
+	int tW = (W - fltk3::box_dw(fltk3::ROUND_DOWN_BOX)) / 2 + 1;
+	if ((W - tW) & 1) tW++;	// Make sure difference is even to center
+	int td = fltk3::box_dx(fltk3::ROUND_DOWN_BOX) + 1;
+        if (fltk3::scheme()) {
+	  // Offset the radio circle...
+	  td ++;
+
+	  if (!strcmp(fltk3::scheme(), "gtk+")) {
+	    fltk3::color(fltk3::SELECTION_COLOR);
+	    tW --;
+	    fltk3::pie(x + td + 1, y + d + td - 1, tW + 3, tW + 3, 0.0, 360.0);
+	    fltk3::arc(x + td + 1, y + d + td - 1, tW + 3, tW + 3, 0.0, 360.0);
+	    fltk3::color(fltk3::color_average(fltk3::WHITE, fltk3::SELECTION_COLOR, 0.2f));
+	  } else fltk3::color(labelcolor_);
+	} else fltk3::color(labelcolor_);
+
+	switch (tW) {
+	  // Larger circles draw fine...
+	  default :
+            fltk3::pie(x + td + 2, y + d + td, tW, tW, 0.0, 360.0);
+	    break;
+
+          // Small circles don't draw well on many systems...
+	  case 6 :
+	    fltk3::rectf(x + td + 4, y + d + td, tW - 4, tW);
+	    fltk3::rectf(x + td + 3, y + d + td + 1, tW - 2, tW - 2);
+	    fltk3::rectf(x + td + 2, y + d + td + 2, tW, tW - 4);
+	    break;
+
+	  case 5 :
+	  case 4 :
+	  case 3 :
+	    fltk3::rectf(x + td + 3, y + d + td, tW - 2, tW);
+	    fltk3::rectf(x + td + 2, y + d + td + 1, tW, tW - 2);
+	    break;
+
+	  case 2 :
+	  case 1 :
+	    fltk3::rectf(x + td + 2, y + d + td, tW, tW);
+	    break;
+	}
+
+	if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
+	  fltk3::color(fltk3::color_average(fltk3::WHITE, fltk3::SELECTION_COLOR, 0.5));
+	  fltk3::arc(x + td + 2, y + d + td, tW + 1, tW + 1, 60.0, 180.0);
+	}
+      }
+    } else {
+      fltk3::draw_box(fltk3::DOWN_BOX, x+2, y+d, W, W, fltk3::BACKGROUND2_COLOR);
+      if (value()) {
+	if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
+	  fltk3::color(fltk3::SELECTION_COLOR);
+	} else {
+	  fltk3::color(labelcolor_);
+	}
+	int tx = x + 5;
+	int tw = W - 6;
+	int d1 = tw/3;
+	int d2 = tw-d1;
+	int ty = y + d + (W+d2)/2-d1-2;
+	for (int n = 0; n < 3; n++, ty++) {
+	  fltk3::line(tx, ty, tx+d1, ty+d1);
+	  fltk3::line(tx+d1, ty+d1, tx+tw-1, ty+d1-d2+1);
+	}
+      }
+    }
+    x += W + 3;
+    w -= W + 3;
+  }
+
+  if (!fltk3::draw_shortcut) fltk3::draw_shortcut = 1;
+  l.draw(x+3, y, w>6 ? w-6 : 0, h, fltk3::ALIGN_LEFT);
+  fltk3::draw_shortcut = 0;
+}
+
+menutitle::menutitle(int X, int Y, int W, int H, const fltk3::MenuItem* L) :
+  fltk3::MenuWindow(X, Y, W, H, 0) {
+  end();
+  set_modal();
+  clear_border();
+  set_menu_window();
+  menu = L;
+  if (L->labelcolor_ || fltk3::scheme() || L->labeltype_ > fltk3::NO_LABEL) clear_overlay();
+}
+
+menuwindow::menuwindow(const fltk3::MenuItem* m, int X, int Y, int Wp, int Hp,
+		       const fltk3::MenuItem* picked, const fltk3::MenuItem* t, 
+		       int menubar, int menubar_title, int right_edge)
+  : fltk3::MenuWindow(X, Y, Wp, Hp, 0)
+{
+  int scr_x, scr_y, scr_w, scr_h;
+  int tx = X, ty = Y;
+
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+  if (!right_edge || right_edge > scr_x+scr_w) right_edge = scr_x+scr_w;
+
+  end();
+  set_modal();
+  clear_border();
+  set_menu_window();
+  menu = m;
+  if (m) m = m->first(); // find the first item that needs to be rendered
+  drawn_selected = -1;
+  if (button) {
+    box(button->box());
+    if (box() == fltk3::NO_BOX || box() == fltk3::FLAT_BOX) box(fltk3::UP_BOX);
+  } else {
+    box(fltk3::UP_BOX);
+  }
+  color(button && !fltk3::scheme() ? button->color() : fltk3::GRAY);
+  selected = -1;
+  {
+    int j = 0;
+    if (m) for (const fltk3::MenuItem* m1=m; ; m1 = m1->next(), j++) {
+      if (picked) {
+        if (m1 == picked) {selected = j; picked = 0;}
+        else if (m1 > picked) {selected = j-1; picked = 0; Wp = Hp = 0;}
+    }
+    if (!m1->text) break;
+  }
+  numitems = j;}
+
+  if (menubar) {
+    itemheight = 0;
+    title = 0;
+    return;
+  }
+
+  itemheight = 1;
+
+  int hotKeysw = 0;
+  int hotModsw = 0;
+  int Wtitle = 0;
+  int Htitle = 0;
+  if (t) Wtitle = t->measure(&Htitle, button) + 12;
+  int W = 0;
+  if (m) for (; m->text; m = m->next()) {
+    int hh; 
+    int w1 = m->measure(&hh, button);
+    if (hh+LEADING>itemheight) itemheight = hh+LEADING;
+    if (m->flags&(fltk3::SUBMENU|fltk3::SUBMENU_POINTER)) w1 += 14;
+    if (w1 > W) W = w1;
+    // calculate the maximum width of all shortcuts
+    if (m->shortcut_) {
+      // s is a pointerto the utf8 string for the entire shortcut
+      // k points only to the key part (minus the modifier keys)
+      const char *k, *s = fltk3::shortcut_label(m->shortcut_, &k);
+      if (fltk3::utf_nb_char((const unsigned char*)k, strlen(k))<=4) {
+        // a regular shortcut has a right-justified modifier followed by a left-justified key
+        w1 = int(fltk3::width(s, k-s));
+        if (w1 > hotModsw) hotModsw = w1;
+        w1 = int(fltk3::width(k))+4;
+        if (w1 > hotKeysw) hotKeysw = w1;
+      } else {
+        // a shortcut with a long modifier is right-justified to the menu
+        w1 = int(fltk3::width(s))+4;
+        if (w1 > (hotModsw+hotKeysw)) {
+          hotModsw = w1-hotKeysw;
+        }
+      }
+    }
+    if (m->labelcolor_ || fltk3::scheme() || m->labeltype_ > fltk3::NO_LABEL) clear_overlay();
+  }
+  shortcutWidth = hotKeysw;
+  if (selected >= 0 && !Wp) X -= W/2;
+  int BW = fltk3::box_dx(box());
+  W += hotKeysw+hotModsw+2*BW+7;
+  if (Wp > W) W = Wp;
+  if (Wtitle > W) W = Wtitle;
+
+  if (X < scr_x) X = scr_x; if (X > scr_x+scr_w-W) X = right_edge-W; //X= scr_x+scr_w-W;
+  x(X); w(W);
+  h((numitems ? itemheight*numitems-LEADING : 0)+2*BW+3);
+  if (selected >= 0) {
+    Y = Y+(Hp-itemheight)/2-selected*itemheight-BW;
+  } else {
+    Y = Y+Hp;
+    // if the menu hits the bottom of the screen, we try to draw
+    // it above the menubar instead. We will not adjust any menu
+    // that has a selected item.
+    if (Y+h()>scr_y+scr_h && Y-h()>=scr_y) {
+      if (Hp>1) {
+        // if we know the height of the fltk3::Menu_, use it
+        Y = Y-Hp-h();
+      } else if (t) {
+        // assume that the menubar item height relates to the first
+        // menuitem as well
+        Y = Y-itemheight-h()-fltk3::box_dh(box());
+      } else {
+        // draw the menu to the right
+        Y = Y-h()+itemheight+fltk3::box_dy(box());
+      }
+    }
+  }
+  if (m) y(Y); else {y(Y-2); w(1); h(1);}
+
+  if (t) {
+    if (menubar_title) {
+      int dy = fltk3::box_dy(button->box())+1;
+      int ht = button->h()-dy*2;
+      title = new menutitle(tx, ty-ht-dy, Wtitle, ht, t);
+    } else {
+      int dy = 2;
+      int ht = Htitle+2*BW+3;
+      title = new menutitle(X, Y-ht-dy, Wtitle, ht, t);
+    }
+  } else {
+    title = 0;
+  }
+}
+
+menuwindow::~menuwindow() {
+  hide();
+  delete title;
+}
+
+void menuwindow::position(int X, int Y) {
+  if (title) {title->position(X, title->y()+Y-y());}
+  MenuWindow::position(X, Y);
+  // x(X); y(Y); // don't wait for response from X
+}
+
+// scroll so item i is visible on screen
+void menuwindow::autoscroll(int n) {
+  int scr_x, scr_y, scr_w, scr_h;
+  int Y = y()+fltk3::box_dx(box())+2+n*itemheight;
+
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+  if (Y <= scr_y) Y = scr_y-Y+10;
+  else {
+    Y = Y+itemheight-scr_h-scr_y;
+    if (Y < 0) return;
+    Y = -Y-10;
+  }
+  MenuWindow::position(x(), y()+Y);
+  // y(y()+Y); // don't wait for response from X
+}
+
+////////////////////////////////////////////////////////////////
+
+void menuwindow::drawentry(const fltk3::MenuItem* m, int n, int eraseit) {
+  if (!m) return; // this happens if -1 is selected item and redrawn
+
+  int BW = fltk3::box_dx(box());
+  int xx = BW;
+  int W = w();
+  int ww = W-2*BW-1;
+  int yy = BW+1+n*itemheight;
+  int hh = itemheight - LEADING;
+
+  if (eraseit && n != selected) {
+    fltk3::push_clip(xx+1, yy-(LEADING-2)/2, ww-2, hh+(LEADING-2));
+    draw_box(box(), 0, 0, w(), h(), button ? button->color() : color());
+    fltk3::pop_clip();
+  }
+
+  m->draw(xx, yy, ww, hh, button, n==selected);
+
+  // the shortcuts and arrows assume fltk3::color() was left set by draw():
+  if (m->submenu()) {
+    int sz = (hh-7)&-2;
+    int y1 = yy+(hh-sz)/2;
+    int x1 = xx+ww-sz-3;
+    fltk3::polygon(x1+2, y1, x1+2, y1+sz, x1+sz/2+2, y1+sz/2);
+  } else if (m->shortcut_) {
+    fltk3::Font f = m->labelsize_ || m->labelfont_ ? (fltk3::Font)m->labelfont_ :
+                    button ? button->textfont() : fltk3::HELVETICA;
+    fltk3::font(f, m->labelsize_ ? m->labelsize_ :
+                   button ? button->textsize() : fltk3::NORMAL_SIZE);
+    const char *k, *s = fltk3::shortcut_label(m->shortcut_, &k);
+    if (fltk3::utf_nb_char((const unsigned char*)k, strlen(k))<=4) {
+      // righ-align the modifiers and left-align the key
+      char buf[32]; strcpy(buf, s); buf[k-s] = 0;
+      fltk3::draw(buf, xx, yy, ww-shortcutWidth, hh, fltk3::ALIGN_RIGHT);
+      fltk3::draw(  k, xx+ww-shortcutWidth, yy, shortcutWidth, hh, fltk3::ALIGN_LEFT);
+    } else {
+      // right-align to the menu
+      fltk3::draw(s, xx, yy, ww-4, hh, fltk3::ALIGN_RIGHT);
+    }
+  }
+
+  if (m->flags & fltk3::MENU_DIVIDER) {
+    fltk3::color(fltk3::DARK3);
+    fltk3::xyline(BW-1, yy+hh+(LEADING-2)/2, W-2*BW+2);
+    fltk3::color(fltk3::LIGHT3);
+    fltk3::xyline(BW-1, yy+hh+((LEADING-2)/2+1), W-2*BW+2);
+  }
+}
+
+void menutitle::draw() {
+  menu->draw(0, 0, w(), h(), button, 2);
+}
+
+void menuwindow::draw() {
+  if (damage() != fltk3::DAMAGE_CHILD) {	// complete redraw
+    fltk3::draw_box(box(), 0, 0, w(), h(), button ? button->color() : color());
+    if (menu) {
+      const fltk3::MenuItem* m; int j;
+      for (m=menu->first(), j=0; m->text; j++, m = m->next()) drawentry(m, j, 0);
+    }
+  } else {
+    if (damage() & fltk3::DAMAGE_CHILD && selected!=drawn_selected) { // change selection
+      drawentry(menu->next(drawn_selected), drawn_selected, 1);
+      drawentry(menu->next(selected), selected, 1);
+    }
+  }	    
+  drawn_selected = selected;
+}
+
+void menuwindow::set_selected(int n) {
+  if (n != selected) {selected = n; damage(fltk3::DAMAGE_CHILD);}
+}
+
+////////////////////////////////////////////////////////////////
+
+int menuwindow::find_selected(int mx, int my) {
+  if (!menu || !menu->text) return -1;
+  mx -= x();
+  my -= y();
+  if (my < 0 || my >= h()) return -1;
+  if (!itemheight) { // menubar
+    int xx = 3; int n = 0;
+    const fltk3::MenuItem* m = menu ? menu->first() : 0;
+    for (; ; m = m->next(), n++) {
+      if (!m->text) return -1;
+      xx += m->measure(0, button) + 16;
+      if (xx > mx) break;
+    }
+    return n;
+  }
+  if (mx < fltk3::box_dx(box()) || mx >= w()) return -1;
+  int n = (my-fltk3::box_dx(box())-1)/itemheight;
+  if (n < 0 || n>=numitems) return -1;
+  return n;
+}
+
+// return horizontal position for item n in a menubar:
+int menuwindow::titlex(int n) {
+  const fltk3::MenuItem* m;
+  int xx = 3;
+  for (m=menu->first(); n--; m = m->next()) xx += m->measure(0, button) + 16;
+  return xx;
+}
+
+// return 1, if the given root coordinates are inside the window
+int menuwindow::is_inside(int mx, int my) {
+  if ( mx < x_root() || mx >= x_root() + w() ||
+       my < y_root() || my >= y_root() + h()) {
+    return 0;
+  }
+  if (itemheight == 0 && find_selected(mx, my) == -1) {
+    // in the menubar but out from any menu header
+    return 0;
+    }
+  return 1;
+}
+
+////////////////////////////////////////////////////////////////
+// fltk3::MenuItem::popup(...)
+
+// Because fltk3::grab() is done, all events go to one of the menu windows.
+// But the handle method needs to look at all of them to find out
+// what item the user is pointing at.  And it needs a whole lot
+// of other state variables to determine what is going on with
+// the currently displayed menus.
+// So the main loop (handlemenu()) puts all the state in a structure
+// and puts a pointer to it in a static location, so the handle()
+// on menus can refer to it and alter it.  The handle() method
+// changes variables in this state to indicate what item is
+// picked, but does not actually alter the display, instead the
+// main loop does that.  This is because the X mapping and unmapping
+// of windows is slow, and we don't want to fall behind the events.
+
+// values for menustate.state:
+#define INITIAL_STATE 0	// no mouse up or down since popup() called
+#define PUSH_STATE 1	// mouse has been pushed on a normal item
+#define DONE_STATE 2	// exit the popup, the current item was picked
+#define MENU_PUSH_STATE 3 // mouse has been pushed on a menu title
+
+struct menustate {
+  const fltk3::MenuItem* current_item; // what mouse is pointing at
+  int menu_number; // which menu it is in
+  int item_number; // which item in that menu, -1 if none
+  menuwindow* p[20]; // pointers to menus
+  int nummenus;
+  int menubar; // if true p[0] is a menubar
+  int state;
+  menuwindow* fakemenu; // kludge for buttons in menubar
+  int is_inside(int mx, int my);
+};
+static menustate* p=0;
+
+// return 1 if the coordinates are inside any of the menuwindows
+int menustate::is_inside(int mx, int my) {
+  int i;
+  for (i=nummenus-1; i>=0; i--) {
+    if (p[i]->is_inside(mx, my))
+      return 1;
+  }
+  return 0;
+}
+
+static inline void setitem(const fltk3::MenuItem* i, int m, int n) {
+  p->current_item = i;
+  p->menu_number = m;
+  p->item_number = n;
+}
+
+static void setitem(int m, int n) {
+  menustate &pp = *p;
+  pp.current_item = (n >= 0) ? pp.p[m]->menu->next(n) : 0;
+  pp.menu_number = m;
+  pp.item_number = n;
+}
+
+static int forward(int menu) { // go to next item in menu menu if possible
+  menustate &pp = *p;
+  // fltk3::MenuButton can generate menu=-1. This line fixes it and selectes the first item.
+  if (menu==-1) 
+    menu = 0;
+  menuwindow &m = *(pp.p[menu]);
+  int item = (menu == pp.menu_number) ? pp.item_number : m.selected;
+  while (++item < m.numitems) {
+    const fltk3::MenuItem* m1 = m.menu->next(item);
+    if (m1->activevisible()) {setitem(m1, menu, item); return 1;}
+  }
+  return 0;
+}
+
+static int backward(int menu) { // previous item in menu menu if possible
+  menustate &pp = *p;
+  menuwindow &m = *(pp.p[menu]);
+  int item = (menu == pp.menu_number) ? pp.item_number : m.selected;
+  if (item < 0) item = m.numitems;
+  while (--item >= 0) {
+    const fltk3::MenuItem* m1 = m.menu->next(item);
+    if (m1->activevisible()) {setitem(m1, menu, item); return 1;}
+  }
+  return 0;
+}
+
+int menuwindow::handle(int e) {
+#if defined (__APPLE__) || defined (USE_X11)
+  // This off-route takes care of the "detached menu" bug on OS X.
+  // Apple event handler requires that we hide all menu windows right
+  // now, so that Carbon can continue undisturbed with handling window
+  // manager events, like dragging the application window.
+  int ret = early_hide_handle(e);
+  menustate &pp = *p;
+  if (pp.state == DONE_STATE) {
+    hide();
+    if (pp.fakemenu) {
+      pp.fakemenu->hide();
+      if (pp.fakemenu->title)
+        pp.fakemenu->title->hide();
+    }
+    int i = pp.nummenus;
+    while (i>0) {
+      menuwindow *mw = pp.p[--i];
+      if (mw) {
+        mw->hide();
+        if (mw->title) 
+          mw->title->hide();
+      }
+    }
+  }
+  return ret;
+}
+
+int menuwindow::early_hide_handle(int e) {
+#endif
+  menustate &pp = *p;
+  switch (e) {
+  case fltk3::KEYBOARD:
+    switch (fltk3::event_key()) {
+    case fltk3::BackSpaceKey:
+    BACKTAB:
+      if (!backward(pp.menu_number)) {pp.item_number = -1;backward(pp.menu_number);}
+      return 1;
+    case fltk3::UpKey:
+      if (pp.menubar && pp.menu_number == 0) {
+        // Do nothing...
+      } else if (backward(pp.menu_number)) {
+        // Do nothing...
+      } else if (pp.menubar && pp.menu_number==1) {
+        setitem(0, pp.p[0]->selected);
+      }
+      return 1;
+    case fltk3::TabKey:
+      if (fltk3::event_shift()) goto BACKTAB;
+    case fltk3::DownKey:
+      if (pp.menu_number || !pp.menubar) {
+        if (!forward(pp.menu_number) && fltk3::event_key()==fltk3::TabKey) {
+          pp.item_number = -1;
+          forward(pp.menu_number);
+        }
+      } else if (pp.menu_number < pp.nummenus-1) {
+        forward(pp.menu_number+1);
+      }
+      return 1;
+    case fltk3::RightKey:
+      if (pp.menubar && (pp.menu_number<=0 || (pp.menu_number==1 && pp.nummenus==2)))
+	forward(0);
+      else if (pp.menu_number < pp.nummenus-1) forward(pp.menu_number+1);
+      return 1;
+    case fltk3::LeftKey:
+      if (pp.menubar && pp.menu_number<=1) backward(0);
+      else if (pp.menu_number>0)
+	setitem(pp.menu_number-1, pp.p[pp.menu_number-1]->selected);
+      return 1;
+    case fltk3::EnterKey:
+    case fltk3::KPEnterKey:
+    case ' ':
+      pp.state = DONE_STATE;
+      return 1;
+    case fltk3::EscapeKey:
+      setitem(0, -1, 0);
+      pp.state = DONE_STATE;
+      return 1;
+    }
+    break;
+  case fltk3::SHORTCUT: 
+    {
+      for (int mymenu = pp.nummenus; mymenu--;) {
+	menuwindow &mw = *(pp.p[mymenu]);
+	int item; const fltk3::MenuItem* m = mw.menu->find_shortcut(&item);
+	if (m) {
+	  setitem(m, mymenu, item);
+	  if (!m->submenu()) pp.state = DONE_STATE;
+	  return 1;
+	}
+      }
+    }
+    break;
+    case fltk3::MOVE:
+#if ! (defined(WIN32) || defined(__APPLE__))
+      if (pp.state == DONE_STATE) {
+	return 1; // Fix for STR #2619
+      }
+      /* FALLTHROUGH */
+#endif
+  case fltk3::ENTER:
+  case fltk3::PUSH:
+  case fltk3::DRAG:
+    {
+      int mx = fltk3::event_x_root();
+      int my = fltk3::event_y_root();
+      int item=0; int mymenu = pp.nummenus-1;
+      // Clicking or dragging outside menu cancels it...
+      if ((!pp.menubar || mymenu) && !pp.is_inside(mx, my)) {
+	setitem(0, -1, 0);
+	if (e==fltk3::PUSH)
+	  pp.state = DONE_STATE;
+	return 1;
+      }
+      for (mymenu = pp.nummenus-1; ; mymenu--) {
+	item = pp.p[mymenu]->find_selected(mx, my);
+	if (item >= 0) 
+	  break;
+	if (mymenu <= 0) {
+	  // buttons in menubars must be deselected if we move outside of them!
+	  if (pp.menu_number==-1 && e==fltk3::PUSH) {
+	    pp.state = DONE_STATE;
+	    return 1;
+	  }
+	  if (pp.current_item && pp.menu_number==0 && !pp.current_item->submenu()) {
+	    if (e==fltk3::PUSH)
+	      pp.state = DONE_STATE;
+	    setitem(0, -1, 0);
+	    return 1;
+	  }
+	  // all others can stay selected
+	  return 0;
+	}
+      }
+      if (my == 0 && item > 0) setitem(mymenu, item - 1);
+      else setitem(mymenu, item);
+      if (e == fltk3::PUSH) {
+	if (pp.current_item && pp.current_item->submenu() // this is a menu title
+	    && item != pp.p[mymenu]->selected // and it is not already on
+	    && !pp.current_item->callback_) // and it does not have a callback
+	  pp.state = MENU_PUSH_STATE;
+	else
+	  pp.state = PUSH_STATE;
+      }
+    }
+    return 1;
+  case fltk3::RELEASE:
+    // Mouse must either be held down/dragged some, or this must be
+    // the second click (not the one that popped up the menu):
+    if (   !fltk3::event_is_click() 
+        || pp.state == PUSH_STATE 
+        || (pp.menubar && pp.current_item && !pp.current_item->submenu()) // button
+	) {
+#if 0 // makes the check/radio items leave the menu up
+      const fltk3::MenuItem* m = pp.current_item;
+      if (m && button && (m->flags & (fltk3::MENU_TOGGLE|fltk3::MENU_RADIO))) {
+	((fltk3::Menu_*)button)->picked(m);
+	pp.p[pp.menu_number]->redraw();
+      } else
+#endif
+      // do nothing if they try to pick inactive items
+      if (!pp.current_item || pp.current_item->activevisible())
+	pp.state = DONE_STATE;
+    }
+    return 1;
+  }
+  return Window::handle(e);
+}
+
+/**
+  Pulldown() is similar to popup(), but a rectangle is
+  provided to position the menu.  The menu is made at least W
+  wide, and the picked item is centered over the rectangle
+  (like fltk3::Choice uses).  If picked is zero or not
+  found, the menu is aligned just below the rectangle (like a pulldown
+  menu).
+  <P>The title and menubar arguments are used
+  internally by the fltk3::MenuBar widget.
+*/
+const fltk3::MenuItem* fltk3::MenuItem::pulldown(
+    int X, int Y, int W, int H,
+    const fltk3::MenuItem* initial_item,
+    const fltk3::Menu_* pbutton,
+    const fltk3::MenuItem* t,
+    int menubar) const {
+  fltk3::Group::current(0); // fix possible user error...
+
+  button = pbutton;
+  if (pbutton && pbutton->window()) {
+    for (fltk3::Window* w = pbutton->window(); w; w = w->window()) {
+      X += w->x();
+      Y += w->y();
+    }
+  } else {
+    X += fltk3::event_x_root()-fltk3::event_x();
+    Y += fltk3::event_y_root()-fltk3::event_y();
+  }
+  menuwindow mw(this, X, Y, W, H, initial_item, t, menubar);
+  fltk3::grab(mw);
+  menustate pp; p = &pp;
+  pp.p[0] = &mw;
+  pp.nummenus = 1;
+  pp.menubar = menubar;
+  pp.state = INITIAL_STATE;
+  pp.fakemenu = 0; // kludge for buttons in menubar
+
+  // preselected item, pop up submenus if necessary:
+  if (initial_item && mw.selected >= 0) {
+    setitem(0, mw.selected);
+    goto STARTUP;
+  }
+
+  pp.current_item = 0; pp.menu_number = 0; pp.item_number = -1;
+  if (menubar) {
+    // find the initial menu
+    if (!mw.handle(fltk3::DRAG)) {
+      fltk3::grab(0);
+      return 0;
+    }
+  }
+  initial_item = pp.current_item;
+  if (initial_item) goto STARTUP;
+
+  // the main loop, runs until p.state goes to DONE_STATE:
+  for (;;) {
+
+    // make sure all the menus are shown:
+    {
+      for (int k = menubar; k < pp.nummenus; k++) {
+        if (!pp.p[k]->shown()) {
+	  if (pp.p[k]->title) pp.p[k]->title->show();
+	  pp.p[k]->show();
+        }
+      }
+    }
+
+    // get events:
+    {
+      const fltk3::MenuItem* oldi = pp.current_item;
+      fltk3::wait();
+      if (pp.state == DONE_STATE) break; // done.
+      if (pp.current_item == oldi) continue;
+    }
+
+    // only do rest if item changes:
+    if(pp.fakemenu) {delete pp.fakemenu; pp.fakemenu = 0;} // turn off "menubar button"
+
+    if (!pp.current_item) { // pointing at nothing
+      // turn off selection in deepest menu, but don't erase other menus:
+      pp.p[pp.nummenus-1]->set_selected(-1);
+      continue;
+    }
+
+    if(pp.fakemenu) {delete pp.fakemenu; pp.fakemenu = 0;}
+    initial_item = 0; // stop the startup code
+    pp.p[pp.menu_number]->autoscroll(pp.item_number);
+
+  STARTUP:
+    menuwindow& cw = *pp.p[pp.menu_number];
+    const fltk3::MenuItem* m = pp.current_item;
+    if (!m->activevisible()) { // pointing at inactive item
+      cw.set_selected(-1);
+      initial_item = 0; // turn off startup code
+      continue;
+    }
+    cw.set_selected(pp.item_number);
+
+    if (m==initial_item) initial_item=0; // stop the startup code if item found
+    if (m->submenu()) {
+      const fltk3::MenuItem* title = m;
+      const fltk3::MenuItem* menutable;
+      if (m->flags&fltk3::SUBMENU) menutable = m+1;
+      else menutable = (fltk3::MenuItem*)(m)->user_data_;
+      // figure out where new menu goes:
+      int nX, nY;
+      if (!pp.menu_number && pp.menubar) {	// menu off a menubar:
+	nX = cw.x() + cw.titlex(pp.item_number);
+	nY = cw.y() + cw.h();
+	initial_item = 0;
+      } else {
+	nX = cw.x() + cw.w();
+	nY = cw.y() + pp.item_number * cw.itemheight;
+	title = 0;
+      }
+      if (initial_item) { // bring up submenu containing initial item:
+	menuwindow* n = new menuwindow(menutable,X,Y,W,H,initial_item,title,0,0,cw.x());
+	pp.p[pp.nummenus++] = n;
+	// move all earlier menus to line up with this new one:
+	if (n->selected>=0) {
+	  int dy = n->y()-nY;
+	  int dx = n->x()-nX;
+	  for (int menu = 0; menu <= pp.menu_number; menu++) {
+	    menuwindow* tt = pp.p[menu];
+	    int nx = tt->x()+dx; if (nx < 0) {nx = 0; dx = -tt->x();}
+	    int ny = tt->y()+dy; if (ny < 0) {ny = 0; dy = -tt->y();}
+	    tt->position(nx, ny);
+	  }
+	  setitem(pp.nummenus-1, n->selected);
+	  goto STARTUP;
+	}
+      } else if (pp.nummenus > pp.menu_number+1 &&
+		 pp.p[pp.menu_number+1]->menu == menutable) {
+	// the menu is already up:
+	while (pp.nummenus > pp.menu_number+2) delete pp.p[--pp.nummenus];
+	pp.p[pp.nummenus-1]->set_selected(-1);
+      } else {
+	// delete all the old menus and create new one:
+	while (pp.nummenus > pp.menu_number+1) delete pp.p[--pp.nummenus];
+	pp.p[pp.nummenus++]= new menuwindow(menutable, nX, nY,
+					  title?1:0, 0, 0, title, 0, menubar, cw.x());
+      }
+    } else { // !m->submenu():
+      while (pp.nummenus > pp.menu_number+1) delete pp.p[--pp.nummenus];
+      if (!pp.menu_number && pp.menubar) {
+	// kludge so "menubar buttons" turn "on" by using menu title:
+	pp.fakemenu = new menuwindow(0,
+				  cw.x()+cw.titlex(pp.item_number),
+				  cw.y()+cw.h(), 0, 0,
+				  0, m, 0, 1);
+	pp.fakemenu->title->show();
+      }
+    }
+  }
+  const fltk3::MenuItem* m = pp.current_item;
+  delete pp.fakemenu;
+  while (pp.nummenus>1) delete pp.p[--pp.nummenus];
+  mw.hide();
+  fltk3::grab(0);
+  return m;
+}
+
+/**
+  This method is called by widgets that want to display menus.
+
+  The menu stays up until the user picks an item or dismisses it.
+  The selected item (or NULL if none) is returned. <I>This does not
+  do the callbacks or change the state of check or radio items.</I>
+
+  X,Y is the position of the mouse cursor, relative to the
+  window that got the most recent event (usually you can pass 
+  fltk3::event_x() and fltk3::event_y() unchanged here).
+
+  \p title is a character string title for the menu.  If
+  non-zero a small box appears above the menu with the title in it.
+
+  The menu is positioned so the cursor is centered over the item 
+  picked.  This will work even if \p picked is in a submenu.
+  If \p picked is zero or not in the menu item table the menu is
+  positioned with the cursor in the top-left corner.
+
+  \p button is a pointer to an fltk3::Menu_ from which the color and
+  boxtypes for the menu are pulled.  If NULL then defaults are used.
+*/
+const fltk3::MenuItem* fltk3::MenuItem::popup(
+  int X, int Y,
+  const char* title,
+  const fltk3::MenuItem* picked,
+  const fltk3::Menu_* button
+  ) const {
+  static fltk3::MenuItem dummy; // static so it is all zeros
+  dummy.text = title;
+  return pulldown(X, Y, 0, 0, picked, button, title ? &dummy : 0);
+}
+
+/**
+  Search only the top level menu for a shortcut.  
+  Either &x in the label or the shortcut fields are used.
+
+  This tests the current event, which must be an fltk3::KEYBOARD or 
+  fltk3::SHORTCUT, against a shortcut value.
+
+  \param ip returns the index of the item, if \p ip is not NULL.
+  \param require_alt if true: match only if Alt key is pressed.
+
+  \return found fltk3::MenuItem or NULL
+*/
+const fltk3::MenuItem* fltk3::MenuItem::find_shortcut(int* ip, const bool require_alt) const {
+  const fltk3::MenuItem* m = this;
+  if (m) for (int ii = 0; m->text; m = next_visible_or_not(m), ii++) {
+    if (m->active()) {
+      if (fltk3::test_shortcut(m->shortcut_)
+	 || fltk3::Widget::test_shortcut(m->text, require_alt)) {
+	if (ip) *ip=ii;
+	return m;
+      }
+    }
+  }
+  return 0;
+}
+
+// Recursive search of all submenus for anything with this key as a
+// shortcut.  Only uses the shortcut field, ignores &x in the labels:
+/**
+  This is designed to be called by a widgets handle() method in
+  response to a fltk3::SHORTCUT event.  If the current event matches
+  one of the items shortcut, that item is returned.  If the keystroke
+  does not match any shortcuts then NULL is returned.  This only
+  matches the shortcut() fields, not the letters in the title
+  preceeded by '
+*/
+const fltk3::MenuItem* fltk3::MenuItem::test_shortcut() const {
+  const fltk3::MenuItem* m = this;
+  const fltk3::MenuItem* ret = 0;
+  if (m) for (; m->text; m = next_visible_or_not(m)) {
+    if (m->active()) {
+      // return immediately any match of an item in top level menu:
+      if (fltk3::test_shortcut(m->shortcut_)) return m;
+      // if (fltk3::Widget::test_shortcut(m->text)) return m;
+      // only return matches from lower menu if nothing found in top menu:
+      if (!ret && m->submenu()) {
+	const fltk3::MenuItem* s =
+	  (m->flags&fltk3::SUBMENU) ? m+1:(const fltk3::MenuItem*)m->user_data_;
+	ret = s->test_shortcut();
+      }
+    }
+  }
+  return ret;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu_.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu_.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu_.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,437 @@
+//
+// "$Id$"
+//
+// Common menu code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// This is a base class for all items that have a menu:
+//	fltk3::MenuBar, fltk3::MenuButton, fltk3::Choice
+// This provides storage for a menu item, functions to add/modify/delete
+// items, and a call for when the user picks a menu item.
+
+// More code in Fl_Menu_add.cxx
+
+#include <fltk3/run.h>
+#include <fltk3/Menu_.h>
+#include "flstring.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define SAFE_STRCAT(s) { len += strlen(s); if ( len >= namelen ) { *name='\0'; return(-2); } else strcat(name,(s)); }
+
+/** Get the menu 'pathname' for the specified menuitem.
+
+    If finditem==NULL, mvalue() is used (the most recently picked menuitem).
+
+    \b Example:
+    \code
+      fltk3::MenuBar *menubar = 0;
+      void my_menu_callback(fltk3::Widget*,void*) {
+        char name[80];
+        if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) {   // recently picked item
+          if ( strcmp(name, "File/&Open") == 0 ) { .. }              // open invoked
+          if ( strcmp(name, "File/&Save") == 0 ) { .. }              // save invoked
+          if ( strcmp(name, "Edit/&Copy") == 0 ) { .. }              // copy invoked
+        }
+      }
+      int main() {
+        [..]
+        menubar = new fltk3::MenuBar(..);
+        menubar->add("File/&Open",  0, my_menu_callback);
+        menubar->add("File/&Save",  0, my_menu_callback);
+        menubar->add("Edit/&Copy",  0, my_menu_callback);
+        [..]
+      }
+    \endcode
+
+    \returns
+	-   0 : OK (name has menuitem's pathname)
+	-  -1 : item not found (name="")
+	-  -2 : 'name' not large enough (name="")
+    \see find_item()
+*/
+int fltk3::Menu_::item_pathname(char *name, int namelen, const fltk3::MenuItem *finditem) const {
+    int len = 0;
+    finditem = finditem ? finditem : mvalue();    
+    name[0] = '\0';
+    for ( int t=0; t<size(); t++ ) {
+        const fltk3::MenuItem *m = &(menu()[t]);
+	if ( m->submenu() ) {				// submenu? descend
+	    if (*name) SAFE_STRCAT("/");
+	    if (m->label()) SAFE_STRCAT(m->label());
+	    if ( m == finditem ) return(0);		// found? done.
+	} else {
+	    if (m->label()) {				// menu item?
+		if ( m == finditem ) {			// found? tack on itemname, done.
+		    SAFE_STRCAT("/");
+		    SAFE_STRCAT(m->label());
+		    return(0);
+		}
+	    } else {					// end of submenu? pop
+	        char *ss = strrchr(name, '/');
+		if ( ss ) { *ss = 0; len = strlen(name); }	// "File/Edit" -> "File"
+		else { name[0] = '\0'; len = 0; }		// "File" -> ""
+		continue;
+	    }
+	}
+    }
+    *name = '\0';
+    return(-1);						// item not found
+}
+
+/**
+ Find the menu item for a given menu \p pathname, such as "Edit/Copy".
+ 
+ This method finds a menu item in the menu array, also traversing submenus, but
+ not submenu pointers.
+
+ To get the menu item's index, use find_index(const char*)
+
+  \b Example:
+  \code
+    fltk3::MenuBar *menubar = new fltk3::MenuBar(..);
+    menubar->add("File/&Open");
+    menubar->add("File/&Save");
+    menubar->add("Edit/&Copy");
+    // [..]
+    fltk3::MenuItem *item;
+    if ( ( item = (fltk3::MenuItem*)menubar->find_item("File/&Open") ) != NULL ) {
+	item->labelcolor(fltk3::RED);
+    }
+    if ( ( item = (fltk3::MenuItem*)menubar->find_item("Edit/&Copy") ) != NULL ) {
+	item->labelcolor(fltk3::GREEN);
+    }
+  \endcode
+
+  \param pathname The path and name of the menu item
+  \returns The item found, or NULL if not found
+  \see find_index(const char*), find_item(fltk3::Callback*), item_pathname() 
+*/
+const fltk3::MenuItem * fltk3::Menu_::find_item(const char *pathname) {
+  int i = find_index(pathname);
+  return( (i==-1) ? 0 : (const fltk3::MenuItem*)(menu_+i));
+}
+
+/**
+ Find the index the menu array for given \p item.
+ 
+ A way to convert a menu item pointer into an index.
+
+ Current implementation is fast and not expensive.
+
+ \code
+   // Convert an index-to-item
+   int index = 12;
+   const fltk3::MenuItem *item = mymenu->menu() + index;
+
+   // Convert an item-to-index
+   int index = mymenu->find_index(item);
+   if ( index == -1 ) { ..error.. }
+ \endcode
+
+ \param item The *item to be found
+ \returns    The index of the item, or -1 if not found.
+ \see        menu()
+*/
+int fltk3::Menu_::find_index(const fltk3::MenuItem *item) const {
+  fltk3::MenuItem *max = menu_+size();
+  if (item<menu_ || item>=max) return(-1);
+  return(item-menu_);
+}
+
+/**
+ Find the index into the menu array for a given callback \p cb.
+ 
+ This method finds a menu item's index position, also traversing submenus, but
+ not submenu pointers. This is useful if an application uses internationalisation
+ and a menu item can not be found using its label. This search is also much faster.
+ 
+ \param cb Find the first item with this callback
+ \returns  The index of the item with the specific callback, or -1 if not found
+ \see      find_index(const char*)
+ */
+int fltk3::Menu_::find_index(fltk3::Callback *cb) const {
+  for ( int t=0; t < size(); t++ )
+    if (menu_[t].callback_==cb)
+      return(t);
+  return(-1);
+}
+
+/**
+ Find the menu item index for a given menu \p pathname, such as "Edit/Copy".
+ 
+ This method finds a menu item's index position for the given menu pathname,
+ also traversing submenus, but not submenu pointers.
+
+ To get the menu item pointer for a pathname, use find_item()
+
+ \param pathname The path and name of the menu item index to find
+ \returns        The index of the matching item, or -1 if not found.
+ \see            item_pathname()
+
+*/
+int fltk3::Menu_::find_index(const char *pathname) const {
+  char menupath[1024] = "";	// File/Export
+  for ( int t=0; t < size(); t++ ) {
+    fltk3::MenuItem *m = menu_ + t;
+    if (m->flags&fltk3::SUBMENU) {
+      // IT'S A SUBMENU
+      // we do not support searches through fltk3::SUBMENU_POINTER links
+      if (menupath[0]) strlcat(menupath, "/", sizeof(menupath));
+      strlcat(menupath, m->label(), sizeof(menupath));
+      if (!strcmp(menupath, pathname)) return(t);
+    } else {
+      if (!m->label()) {
+	// END OF SUBMENU? Pop back one level.
+	char *ss = strrchr(menupath, '/');
+	if ( ss ) *ss = 0;
+	else menupath[0] = '\0';
+	continue;
+      }
+      // IT'S A MENU ITEM
+      char itempath[1024];	// eg. Edit/Copy
+      strcpy(itempath, menupath);
+      if (itempath[0]) strlcat(itempath, "/", sizeof(itempath));
+      strlcat(itempath, m->label(), sizeof(itempath));
+      if (!strcmp(itempath, pathname)) return(t);
+    }
+  }
+  return(-1);
+}
+
+/**
+ Find the menu item for the given callback \p cb.
+ 
+ This method finds a menu item in a menu array, also traversing submenus, but
+ not submenu pointers. This is useful if an application uses 
+ internationalisation and a menu item can not be found using its label. This
+ search is also much faster.
+ 
+ \param cb find the first item with this callback
+ \returns The item found, or NULL if not found
+ \see find_item(const char*)
+ */
+const fltk3::MenuItem * fltk3::Menu_::find_item(fltk3::Callback *cb) {
+  for ( int t=0; t < size(); t++ ) {
+    const fltk3::MenuItem *m = menu_ + t;
+    if (m->callback_==cb) {
+      return m;
+    }
+  }
+  return (const fltk3::MenuItem *)0;
+}
+
+/**
+  The value is the index into menu() of the last item chosen by
+  the user.  It is zero initially.  You can set it as an integer, or set
+  it with a pointer to a menu item.  The set routines return non-zero if
+  the new value is different than the old one.
+*/
+int fltk3::Menu_::value(const fltk3::MenuItem* m) {
+  clear_changed();
+  if (value_ != m) {value_ = m; return 1;}
+  return 0;
+}
+
+/** 
+ When user picks a menu item, call this.  It will do the callback.
+ Unfortunately this also casts away const for the checkboxes, but this
+ was necessary so non-checkbox menus can really be declared const...
+*/
+const fltk3::MenuItem* fltk3::Menu_::picked(const fltk3::MenuItem* v) {
+  if (v) {
+    if (v->radio()) {
+      if (!v->value()) { // they are turning on a radio item
+	set_changed();
+	((fltk3::MenuItem*)v)->setonly();
+      }
+      redraw();
+    } else if (v->flags & fltk3::MENU_TOGGLE) {
+      set_changed();
+      ((fltk3::MenuItem*)v)->flags ^= fltk3::MENU_VALUE;
+      redraw();
+    } else if (v != value_) { // normal item
+      set_changed();
+    }
+    value_ = v;
+    if (when()&(fltk3::WHEN_CHANGED|fltk3::WHEN_RELEASE)) {
+      if (changed() || when()&fltk3::WHEN_NOT_CHANGED) {
+	if (value_ && value_->callback_) value_->do_callback((fltk3::Widget*)this);
+	else do_callback();
+      }
+    }
+  }
+  return v;
+}
+
+/** Turns the radio item "on" for the menu item and turns off adjacent radio items set. */
+void fltk3::MenuItem::setonly() {
+  flags |= fltk3::MENU_RADIO | fltk3::MENU_VALUE;
+  fltk3::MenuItem* j;
+  for (j = this; ; ) {	// go down
+    if (j->flags & fltk3::MENU_DIVIDER) break; // stop on divider lines
+    j++;
+    if (!j->text || !j->radio()) break; // stop after group
+    j->clear();
+  }
+  for (j = this-1; ; j--) { // go up
+    if (!j->text || (j->flags&fltk3::MENU_DIVIDER) || !j->radio()) break;
+    j->clear();
+  }
+}
+
+/**
+ Creates a new fltk3::Menu_ widget using the given position, size,
+ and label string.  menu() is initialized to null.
+ */
+fltk3::Menu_::Menu_(int X,int Y,int W,int H,const char* l)
+: fltk3::Widget(X,Y,W,H,l) {
+  set_flag(SHORTCUT_LABEL);
+  box(fltk3::UP_BOX);
+  when(fltk3::WHEN_RELEASE_ALWAYS);
+  value_ = menu_ = 0;
+  alloc = 0;
+  selection_color(fltk3::SELECTION_COLOR);
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
+  down_box(fltk3::NO_BOX);
+}
+
+/**
+  This returns the number of fltk3::MenuItem structures that make up the
+  menu, correctly counting submenus.  This includes the "terminator"
+  item at the end.  To copy a menu array you need to copy
+  size()*sizeof(fltk3::MenuItem) bytes.  If the menu is
+  NULL this returns zero (an empty menu will return 1).
+*/
+int fltk3::Menu_::size() const {
+  if (!menu_) return 0;
+  return menu_->size();
+}
+
+/**
+    Sets the menu array pointer directly.  If the old menu is private it is
+    deleted.  NULL is allowed and acts the same as a zero-length
+    menu.  If you try to modify the array (with add(), replace(), or
+    remove()) a private copy is automatically done.
+*/
+void fltk3::Menu_::menu(const fltk3::MenuItem* m) {
+  clear();
+  value_ = menu_ = (fltk3::MenuItem*)m;
+}
+
+// this version is ok with new Fl_Menu_add code with fltk3::menu_array_owner:
+
+/** 
+  Sets the menu array pointer with a copy of m that will be automatically deleted. 
+  If userdata \p ud is not NULL, then all user data pointers are changed in the menus as well.
+  See void fltk3::Menu_::menu(const fltk3::MenuItem* m). 
+*/
+void fltk3::Menu_::copy(const fltk3::MenuItem* m, void* ud) {
+  int n = m->size();
+  fltk3::MenuItem* newMenu = new fltk3::MenuItem[n];
+  memcpy(newMenu, m, n*sizeof(fltk3::MenuItem));
+  menu(newMenu);
+  alloc = 1; // make destructor free array, but not strings
+  // for convenience, provide way to change all the user data pointers:
+  if (ud) for (; n--;) {
+    if (newMenu->callback_) newMenu->user_data_ = ud;
+    newMenu++;
+  }
+}
+
+fltk3::Menu_::~Menu_() {
+  clear();
+}
+
+// Fl_Menu::add() uses this to indicate the owner of the dynamically-
+// expanding array.  We must not free this array:
+namespace fltk3 {
+  fltk3::Menu_* menu_array_owner = 0;
+}
+
+/**
+  Same as menu(NULL), set the array pointer to null, indicating
+  a zero-length menu.
+  
+  Menus must not be cleared during a callback to the same menu.
+*/
+void fltk3::Menu_::clear() {
+  if (alloc) {
+    if (alloc>1) for (int i = size(); i--;)
+      if (menu_[i].text) free((void*)menu_[i].text);
+    if (this == fltk3::menu_array_owner)
+      fltk3::menu_array_owner = 0;
+    else
+      delete[] menu_;
+    menu_ = 0;
+    value_ = 0;
+    alloc = 0;
+  }
+}
+
+/**
+ Clears the specified submenu pointed to by \p index of all menu items.
+
+ This method is useful for clearing a submenu so that it can be
+ re-populated with new items. Example: a "File/Recent Files/..." submenu
+ that shows the last few files that have been opened.
+
+ The specified \p index must point to a submenu.
+ 
+ The submenu is cleared with remove().
+ If the menu array was directly set with menu(x), then copy() 
+ is done to make a private array.
+
+ \warning Since this method can change the internal menu array, any menu
+ item pointers or indecies the application may have cached can become
+ stale, and should be recalculated/refreshed.
+
+ \b Example:
+ \code
+   int index = menubar->find_index("File/Recent");    // get index of "File/Recent" submenu
+   if ( index != -1 ) menubar->clear_submenu(index);  // clear the submenu
+   menubar->add("File/Recent/Aaa");
+   menubar->add("File/Recent/Bbb");
+   [..]
+ \endcode
+
+ \param index The index of the submenu to be cleared
+ \returns 0 on success, -1 if the index is out of range or not a submenu
+ \see remove(int)
+ */
+int fltk3::Menu_::clear_submenu(int index) {
+  if ( index < 0 || index >= size() ) return(-1);
+  if ( ! (menu_[index].flags & fltk3::SUBMENU) ) return(-1);
+  ++index;					// advance to first item in submenu
+  while ( index < size() ) {                    // keep remove()ing top item until end is reached
+    if ( menu_[index].text == 0 ) break;	// end of this submenu? done
+    remove(index);				// remove items/submenus
+  }
+  return(0);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu_.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu_Bar.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu_Bar.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu_Bar.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,80 @@
+//
+// "$Id$"
+//
+// Menu bar widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/MenuBar.h>
+#include <fltk3/draw.h>
+
+void fltk3::MenuBar::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw_box();
+  if (!menu() || !menu()->text) return;
+  const fltk3::MenuItem* m;
+  int X = x()+6;
+  for (m=menu()->first(); m->text; m = m->next()) {
+    int W = m->measure(0,this) + 16;
+    m->draw(X, y(), W, h(), this);
+    X += W;
+    if (m->flags & fltk3::MENU_DIVIDER) {
+      int y1 = y() + fltk3::box_dy(box());
+      int y2 = y1 + h() - fltk3::box_dh(box()) - 1;
+
+      // Draw a vertical divider between menus...
+      fltk3::color(fltk3::DARK3);
+      fltk3::yxline(X - 6, y1, y2);
+      fltk3::color(fltk3::LIGHT3);
+      fltk3::yxline(X - 5, y1, y2);
+    }
+  }
+}
+
+int fltk3::MenuBar::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  const fltk3::MenuItem* v;
+  if (menu() && menu()->text) switch (event) {
+  case fltk3::ENTER:
+  case fltk3::LEAVE:
+    return 1;
+  case fltk3::PUSH:
+    v = 0;
+  J1:
+    v = menu()->pulldown(x(), y(), w(), h(), v, this, 0, 1);
+    picked(v);
+    return 1;
+  case fltk3::SHORTCUT:
+    if (visible_r()) {
+      v = menu()->find_shortcut(0, true);
+      if (v && v->submenu()) goto J1;
+    }
+    return test_shortcut() != 0;
+  }
+  return 0;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu_Bar.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,125 @@
+//
+// "$Id$"
+//
+// Menu button widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/MenuButton.h>
+#include <fltk3/draw.h>
+#include <fltk3/Wrapper.h>
+
+
+static fltk3::MenuButton	*pressed_menu_button_ = 0;
+
+void fltk3::MenuButton::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (!box() || type()) return;
+  draw_box(pressed_menu_button_ == this ? fltk3::down(box()) : box(), color());
+  draw_label();
+  if (fltk3::focus() == this) draw_focus();
+  // ** if (box() == fltk3::FLAT_BOX) return; // for XForms compatibility
+  int H = (labelsize()-3)&-2;
+  int X = x()+w()-H*2;
+  int Y = y()+(h()-H)/2;
+  fltk3::color(active_r() ? fltk3::DARK3 : fltk3::inactive(fltk3::DARK3));
+  fltk3::line(X+H/2, Y+H, X, Y, X+H, Y);
+  fltk3::color(active_r() ? fltk3::LIGHT3 : fltk3::inactive(fltk3::LIGHT3));
+  fltk3::line(X+H, Y, X+H/2, Y+H);
+}
+
+/**
+  Act exactly as though the user clicked the button or typed the
+  shortcut key.  The menu appears, it waits for the user to pick an item,
+  and if they pick one it sets value() and does the callback or
+  sets changed() as described above.  The menu item is returned
+  or NULL if the user dismisses the menu.
+*/
+const fltk3::MenuItem* fltk3::MenuButton::popup() {
+  const fltk3::MenuItem* m;
+  pressed_menu_button_ = this;
+  redraw();
+  fltk3::WidgetTracker mb(this);
+  if (!box() || type()) {
+    m = menu()->popup(fltk3::event_x(), fltk3::event_y(), label(), mvalue(), this);
+  } else {
+    m = menu()->pulldown(x(), y(), w(), h(), 0, this);
+  }
+  picked(m);
+  pressed_menu_button_ = 0;
+  if (mb.exists()) redraw();
+  return m;
+}
+
+int fltk3::MenuButton::handle(int e) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(e), Handle)
+  if (!menu() || !menu()->text) return 0;
+  switch (e) {
+  case fltk3::ENTER: /* FALLTHROUGH */
+  case fltk3::LEAVE:
+    return (box() && !type()) ? 1 : 0;
+  case fltk3::PUSH:
+    if (!box()) {
+      if (fltk3::event_button() != 3) return 0;
+    } else if (type()) {
+      if (!(type() & (1 << (fltk3::event_button()-1)))) return 0;
+    }
+    if (fltk3::visible_focus()) fltk3::focus(this);
+    popup();
+    return 1;
+  case fltk3::KEYBOARD:
+    if (!box()) return 0;
+    if (fltk3::event_key() == ' ' &&
+        !(fltk3::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
+      popup();
+      return 1;
+    } else return 0;
+  case fltk3::SHORTCUT:
+    if (Widget::test_shortcut()) {popup(); return 1;}
+    return test_shortcut() != 0;
+  case fltk3::FOCUS: /* FALLTHROUGH */
+  case fltk3::UNFOCUS:
+    if (box() && fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    }
+  default:
+    return 0;
+  }
+}
+
+/**
+  Creates a new fltk3::MenuButton widget using the given position,
+  size, and label string. The default boxtype is fltk3::UP_BOX.
+  <P>The constructor sets menu() to NULL.  See 
+  fltk3::Menu_ for the methods to set or change the menu.
+*/
+fltk3::MenuButton::MenuButton(int X,int Y,int W,int H,const char *l)
+: fltk3::Menu_(X,Y,W,H,l) {
+  down_box(fltk3::NO_BOX);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu_Window.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu_Window.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu_Window.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,110 @@
+//
+// "$Id$"
+//
+// Menu window code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This is the window type used by Fl_Menu to make the pop-ups.
+// It draws in the overlay planes if possible.
+
+// Also here is the implementation of the mouse & keyboard grab,
+// which are used so that clicks outside the program's windows
+// can be used to dismiss the menus.
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+#include <fltk3/MenuWindow.h>
+
+// WIN32 note: HAVE_OVERLAY is false
+#if HAVE_OVERLAY
+extern XVisualInfo *fl_find_overlay_visual();
+extern XVisualInfo *fl_overlay_visual;
+extern Colormap fl_overlay_colormap;
+extern unsigned long fl_transparent_pixel;
+static GC gc;	// the GC used by all X windows
+extern uchar fl_overlay; // changes how fltk3::color(x) works
+#endif
+
+#include <stdio.h>
+
+void fltk3::MenuWindow::show() {
+#if HAVE_OVERLAY
+  if (!shown() && overlay() && fl_find_overlay_visual()) {
+    XInstallColormap(fl_display, fl_overlay_colormap);
+    fl_background_pixel = int(fl_transparent_pixel);
+    Fl_X::make_xid(this, fl_overlay_visual, fl_overlay_colormap);
+    fl_background_pixel = -1;
+  } else
+#endif
+    SingleWindow::show();
+}
+
+void fltk3::MenuWindow::flush() {
+#if HAVE_OVERLAY
+  if (!fl_overlay_visual || !overlay()) {fltk3::SingleWindow::flush(); return;}
+  Fl_X *myi = Fl_X::i(this);
+  fl_window = myi->xid;
+  if (!gc) {
+	  gc = XCreateGC(fl_display, myi->xid, 0, 0);
+# if defined(FLTK_USE_CAIRO)
+	  if(fltk3::autolink_context()) fltk3::cairo_make_current(gc); // capture gc changes automatically to update the cairo context adequately
+# endif
+  }
+  fl_gc = gc;
+  fl_overlay = 1;
+  fltk3::clip_region(myi->region); myi->region = 0; current_ = this;
+  draw();
+  fl_overlay = 0;
+#else
+  SingleWindow::flush();
+#endif
+}
+
+/** Erases the window, does nothing if HAVE_OVERLAY is not defined config.h */
+void fltk3::MenuWindow::erase() {
+#if HAVE_OVERLAY
+  if (!gc || !shown()) return;
+//XSetForeground(fl_display, gc, 0);
+//XFillRectangle(fl_display, fl_xid(this), gc, 0, 0, w(), h());
+  XClearWindow(fl_display, fl_xid(this));
+#endif
+}
+
+// Fix the colormap flashing on Maximum Impact Graphics by erasing the
+// menu before unmapping it:
+void fltk3::MenuWindow::hide() {
+  erase();
+  SingleWindow::hide();
+}
+
+/**  Destroys the window and all of its children.*/
+fltk3::MenuWindow::~MenuWindow() {
+  hide();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu_Window.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu_add.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu_add.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu_add.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,499 @@
+//
+// "$Id$"
+//
+// Menu utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Methods to alter the menu in an fltk3::Menu_ widget.
+
+// These are for Forms emulation and for dynamically changing the
+// menus.  They are in this source file so they are not linked in if
+// not used, which is what will happen if the program only uses
+// constant menu tables.
+
+// Not at all guaranteed to be Forms compatible, especially with any
+// string with a % sign in it!
+
+#include <fltk3/Menu_.h>
+#include "flstring.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+// If the array is this, we will double-reallocate as necessary:
+static fltk3::MenuItem* local_array = 0;
+static int local_array_alloc = 0; // number allocated
+static int local_array_size = 0; // == size(local_array)
+
+namespace fltk3 {
+  extern fltk3::Menu_* menu_array_owner; // in fltk3::Menu_.cxx
+}
+
+// For historical reasons there are matching methods that work on a
+// user-allocated array of fltk3::MenuItem.  These methods are quite
+// depreciated and should not be used.  These old methods use the
+// above pointers to detect if the array belongs to an fltk3::Menu_
+// widget, and if so it reallocates as necessary.
+
+
+
+// Insert a single fltk3::MenuItem into an array of size at offset n,
+// if this is local_array it will be reallocated if needed.
+static fltk3::MenuItem* array_insert(
+  fltk3::MenuItem* array,  // array to modify
+  int size,             // size of array
+  int n,                // index of new insert position
+  const char *text,     // text of new item (copy is made)
+  int flags             // flags for new item
+) {
+  if (array == local_array && size >= local_array_alloc) {
+    local_array_alloc = 2*size;
+    fltk3::MenuItem* newarray = new fltk3::MenuItem[local_array_alloc];
+    memmove(newarray, array, size*sizeof(fltk3::MenuItem));
+    delete[] local_array;
+    local_array = array = newarray;
+  }
+  // move all the later items:
+  memmove(array+n+1, array+n, sizeof(fltk3::MenuItem)*(size-n));
+  // create the new item:
+  fltk3::MenuItem* m = array+n;
+  m->text = text ? strdup(text) : 0;
+  m->shortcut_ = 0;
+  m->callback_ = 0;
+  m->user_data_ = 0;
+  m->flags = flags;
+  m->labeltype_ = m->labelsize_ = m->labelcolor_ = 0;
+  m->labelfont_ = fltk3::HELVETICA; 
+  return array;
+}
+
+
+
+// Comparison that does not care about deleted '&' signs:
+static int compare(const char* a, const char* b) {
+  for (;;) {
+    int n = *a-*b;
+    if (n) {
+      if (*a == '&') a++;
+      else if (*b == '&') b++;
+      else return n;
+    } else if (*a) {
+      a++; b++;
+    } else {
+      return 0;
+    }
+  }
+}
+
+
+
+/** Adds an item.  The text is split at '/' characters to automatically
+   produce submenus (actually a totally unnecessary feature as you can
+   now add submenu titles directly by setting SUBMENU in the flags):
+*/
+int fltk3::MenuItem::add(
+  const char *mytext,
+  unsigned int sc,
+  fltk3::Callback *cb,	
+  void *data,
+  int myflags
+) {
+  return(insert(-1,mytext,sc,cb,data,myflags));		// -1: append
+}
+
+
+
+/** 
+ Inserts an item at position \p index.
+    
+ If \p index is -1, the item is added the same way as fltk3::MenuItem::add().
+
+ If 'mytext' contains any un-escaped front slashes (/), it's assumed 
+ a menu pathname is being specified, and the value of \p index 
+ will be ignored.
+
+ In all other aspects, the behavior of insert() is the same as add().
+ 
+ \param index insert new items here
+ \param mytext new label string, details see above
+ \param sc keyboard shortcut for new item
+ \param cb callback function for new item
+ \param data user data for new item
+ \param myflags menu flags as described in fltk3::Menu_Item
+ \returns the index into the menu() array, where the entry was added
+*/
+int fltk3::MenuItem::insert(
+  int index,
+  const char *mytext,
+  int sc,
+  fltk3::Callback *cb,	
+  void *data,
+  int myflags
+) {
+  fltk3::MenuItem *array = this;
+  fltk3::MenuItem *m = this;
+  const char *p;
+  char *q;
+  char buf[1024];
+
+  int msize = array==local_array ? local_array_size : array->size();
+  int flags1 = 0;
+  const char* item;
+
+  // split at slashes to make submenus:
+  for (;;) {
+
+    // leading slash makes us assume it is a filename:
+    if (*mytext == '/') {item = mytext; break;}
+
+    // leading underscore causes divider line:
+    if (*mytext == '_') {mytext++; flags1 = fltk3::MENU_DIVIDER;}
+
+    // copy to buf, changing \x to x:
+    q = buf;
+    for (p=mytext; *p && *p != '/'; *q++ = *p++) if (*p=='\\' && p[1]) p++;
+    *q = 0;
+
+    item = buf;
+    if (*p != '/') break; /* not a menu title */
+    index = -1;           /* any submenu specified overrides insert position */
+    mytext = p+1;         /* point at item title */
+
+    /* find a matching menu title: */
+    for (; m->text; m = m->next())
+      if (m->flags&fltk3::SUBMENU && !compare(item, m->text)) break;
+
+    if (!m->text) { /* create a new menu */
+      int n = (index==-1) ? m-array : index;
+      array = array_insert(array, msize, n, item, fltk3::SUBMENU|flags1);
+      msize++;
+      array = array_insert(array, msize, n+1, 0, 0);
+      msize++;
+      m = array+n;
+    }
+    m++;	/* go into the submenu */
+    flags1 = 0;
+  }
+
+  /* find a matching menu item: */
+  for (; m->text; m = m->next())
+    if (!(m->flags&fltk3::SUBMENU) && !compare(m->text,item)) break;
+
+  if (!m->text) {	/* add a new menu item */
+    int n = (index==-1) ? m-array : index;
+    array = array_insert(array, msize, n, item, myflags|flags1);
+    msize++;
+    if (myflags & fltk3::SUBMENU) { // add submenu delimiter
+      array = array_insert(array, msize, n+1, 0, 0);
+      msize++;
+    }
+    m = array+n;
+  }
+
+  /* fill it in */
+  m->shortcut_ = sc;
+  m->callback_ = cb;
+  m->user_data_ = data;
+  m->flags = myflags|flags1;
+
+  if (array == local_array) local_array_size = msize;
+  return m-array;
+}
+
+
+
+/**
+  Adds a new menu item.
+  
+  \param[in] label    The text label for the menu item.
+  \param[in] shortcut Optional keyboard shortcut that can be an int or string; (fltk3::CTRL+'a') or "^a". Default 0 if none.
+  \param[in] callback Optional callback invoked when user clicks the item. Default 0 if none.
+  \param[in] userdata Optional user data passed as an argument to the callback. Default 0 if none.
+  \param[in] flags    Optional flags that control the type of menu item; see below. Default is 0 for none.
+  \returns            The index into the menu() array, where the entry was added.
+  
+  \par Description
+  If the menu array was directly set with menu(x), then copy() is done 
+  to make a private array.
+  \par 
+  Since this method can change the internal menu array, any menu item
+  pointers or indecies the application may have cached can become stale,
+  and should be recalculated/refreshed.
+  \par
+  A menu item's callback must not add() items to its parent menu during the callback.
+
+  <B>Detailed Description of Parameters</B>
+  \par label
+  The menu item's label. This option is required.
+  \par
+  The characters "&", "/", "\", and "_" are treated as special characters in the label string. 
+  The "&" character specifies that the following character is an accelerator and will be underlined.
+  The "\" character is used to escape the next character in the string. 
+  Labels starting with the "_" character cause a divider to be placed after that menu item.
+  \par 
+  A label of the form "File/Quit" will create the submenu "File"
+  with a menu item called "Quit". The "/" character is ignored if it appears
+  as the first character of the label string, e.g.  "/File/Quit".
+  \par 
+  The label string is copied to new memory and can be freed.
+  The other arguments (including the shortcut) are copied into the
+  menu item unchanged.
+  \par 
+  If an item exists already with that name then it is replaced with
+  this new one.  Otherwise this new one is added to the end of the
+  correct menu or submenu.  The return value is the offset into the array
+  that the new entry was placed at.
+  
+  \par shortcut
+  The keyboard shortcut for this menu item. 
+  \par 
+  This parameter is optional, and defaults to 0 to indicate no shortcut.
+  \par
+  The shortcut can either be a raw integer value (eg. fltk3::CTRL+'A')
+  or a string (eg. "^c" or "^97").
+  \par
+  Raw integer shortcuts can be a combination of keyboard chars (eg. 'A')
+  and optional keyboard modifiers (see fltk3::event_state(), e.g. fltk3::SHIFT, etc).
+  In addition, fltk3::COMMAND can be used to denote fltk3::META under Mac OS X and
+  fltk3::CTRL under other platforms.
+  \par
+  String shortcuts can be specified in one of two ways:
+  \par
+  \verbatim
+   [#+^]<ascii_value>    e.g. "97", "^97", "+97", "#97"
+   [#+^]<ascii_char>     e.g. "a", "^a", "+a", "#a"
+  \endverbatim
+  \par
+  ..where \<ascii_value\> is a decimal value representing an
+  ascii character (eg. 97 is the ascii code for 'a'), and the optional
+  prefixes enhance the value that follows. Multiple prefixes must
+  appear in the order below.
+  \par
+  \verbatim
+   # - Alt
+   + - Shift
+   ^ - Control
+  \endverbatim
+  \par
+  Internally, the text shortcuts are converted to integer values using
+  fltk3::old_shortcut(const char*).
+
+  \par callback
+  The callback to invoke when this menu item is selected. 
+  \par 
+  This parameter is optional, and defaults to 0 for no callback.
+
+  \par userdata
+  The callback's 'user data' that is passed to the callback. 
+  \par 
+  This parameter is optional, and defaults to 0.
+
+  \par flags
+  These are bit flags to define what kind of menu item this is. 
+  \par
+  This parameter is optional, and defaults to 0 to define a 'regular' menu item.
+  \par 
+  These flags can be 'OR'ed together:
+  \code
+      fltk3::MENU_INACTIVE     // Deactivate menu item (gray out)
+      fltk3::MENU_TOGGLE       // Item is a checkbox toggle (shows checkbox for on/off state)
+      fltk3::MENU_VALUE        // The on/off state for checkbox/radio buttons (if set, state is 'on')
+      fltk3::MENU_RADIO        // Item is a radio button (one checkbox of many can be on)
+      fltk3::MENU_INVISIBLE    // Item will not show up (shortcut will work)
+      fltk3::SUBMENU_POINTER   // Indicates user_data() is a pointer to another menu array
+      fltk3::SUBMENU           // This item is a submenu to other items
+      fltk3::MENU_DIVIDER      // Creates divider line below this item. Also ends a group of radio buttons.
+  \endcode
+
+  \todo Raw integer shortcut needs examples. 
+        Dependent on responses to http://fltk.org/newsgroups.php?gfltk.development+v:10086 and results of STR#2344
+ */
+int fltk3::Menu_::add(const char *label,unsigned int shortcut,fltk3::Callback *callback,void *userdata,int flags) {
+  return(insert(-1,label,shortcut,callback,userdata,flags));	// -1: append
+}
+
+
+
+/**
+  Inserts a new menu item at the specified \p index position.
+
+  If \p index is -1, the menu item is appended; same behavior as add().
+
+  To properly insert a menu item, \p label must be the name of the item (eg. "Quit"),
+  and not a 'menu pathname' (eg. "File/Quit").  If a menu pathname is specified, 
+  the value of \p index is \em ignored, the new item's position defined by the pathname.
+  
+  For more details, see add(). Except for the \p index parameter, add()
+  has more detailed information on parameters and behavior, and is
+  functionally equivalent.
+
+  \param[in] index    The menu array's index position where the new item
+                      is inserted. If -1, behavior is the same as add().
+  \param[in] label    The text label for the menu item. If the label 
+                      is a menu pathname, \p index is ignored, and the pathname
+		      indicates the position of the new item.
+  \param[in] shortcut Optional keyboard shortcut. Can be an int (fltk3::CTRL+'a')
+                      or a string ("^a"). Default is 0.
+  \param[in] callback Optional callback invoked when user clicks the item.
+                      Default 0 if none.
+  \param[in] userdata Optional user data passed as an argument to the callback.
+                      Default 0 if none.
+  \param[in] flags    Optional flags that control the type of menu item; 
+                      see add() for more info. Default is 0 for none.
+  \returns            The index into the menu() array, where the entry was added.
+
+  \see                add()
+
+ */
+int fltk3::Menu_::insert(
+  int index,
+  const char *label,
+  unsigned int shortcut,
+  fltk3::Callback *callback,
+  void *userdata,
+  int flags
+) {
+  // make this widget own the local array:
+  if (this != fltk3::menu_array_owner) {
+    if (fltk3::menu_array_owner) {
+      fltk3::Menu_* o = fltk3::menu_array_owner;
+      // the previous owner get's its own correctly-sized array:
+      int value_offset = o->value_-local_array;
+      int n = local_array_size;
+      fltk3::MenuItem* newMenu = o->menu_ = new fltk3::MenuItem[n];
+      memcpy(newMenu, local_array, n*sizeof(fltk3::MenuItem));
+      if (o->value_) o->value_ = newMenu+value_offset;
+    }
+    if (menu_) {
+      // this already has a menu array, use it as the local one:
+      delete[] local_array;
+      if (!alloc) copy(menu_); // duplicate a user-provided static array
+      // add to the menu's current array:
+      local_array_alloc = local_array_size = size();
+      local_array = menu_;
+    } else {
+      // start with a blank array:
+      alloc = 2; // indicates that the strings can be freed
+      if (local_array) {
+	menu_ = local_array;
+      } else {
+	local_array_alloc = 15;
+	local_array = menu_ = new fltk3::MenuItem[local_array_alloc];
+        memset(local_array, 0, sizeof(fltk3::MenuItem) * local_array_alloc);
+      }
+      memset(menu_, 0, sizeof(fltk3::MenuItem));
+      local_array_size = 1;
+    }
+    fltk3::menu_array_owner = this;
+  }
+  int r = menu_->insert(index,label,shortcut,callback,userdata,flags);
+  // if it rellocated array we must fix the pointer:
+  int value_offset = value_-menu_;
+  menu_ = local_array; // in case it reallocated it
+  if (value_) value_ = menu_+value_offset;
+  return r;
+}
+
+
+
+/**
+  This is a Forms (and SGI GL library) compatible add function, it
+  adds many menu items, with '|' separating the menu items, and tab
+  separating the menu item names from an optional shortcut string.
+
+  The passed string is split at any '|' characters and then
+  add(s,0,0,0,0) is done with each section. This is
+  often useful if you are just using the value, and is compatible
+  with Forms and other GL programs. The section strings use the
+  same special characters as described for the long version of add().
+
+  No items must be added to a menu during a callback to the same menu.
+ 
+  \param str string containing multiple menu labels as described above
+  \returns the index into the menu() array, where the entry was added
+*/
+int fltk3::Menu_::add(const char *str) {
+  char buf[1024];
+  int r = 0;
+  while (*str) {
+    int sc = 0;
+    char *c;
+    for (c = buf; c < (buf + sizeof(buf) - 2) && *str && *str != '|'; str++) {
+      if (*str == '\t') {*c++ = 0; sc = fltk3::old_shortcut(str);}
+      else *c++ = *str;
+    }
+    *c = 0;
+    r = add(buf, sc, 0, 0, 0);
+    if (*str) str++;
+  }
+  return r;
+}
+
+
+
+/**
+  Changes the text of item \p i.  This is the only way to get
+  slash into an add()'ed menu item.  If the menu array was directly set
+  with menu(x) then copy() is done to make a private array.
+ 
+  \param i index into menu array
+  \param str new label for menu item at index i
+*/
+void fltk3::Menu_::replace(int i, const char *str) {
+  if (i<0 || i>=size()) return;
+  if (!alloc) copy(menu_);
+  if (alloc > 1) {
+    free((void *)menu_[i].text);
+    str = strdup(str);
+  }
+  menu_[i].text = str;
+}
+
+
+
+/**
+  Deletes item \p i from the menu.  If the menu array was directly
+  set with menu(x) then copy() is done to make a private array.
+  
+  No items must be removed from a menu during a callback to the same menu.
+ 
+  \param i index into menu array
+*/
+void fltk3::Menu_::remove(int i) {
+  int n = size();
+  if (i<0 || i>=n) return;
+  if (!alloc) copy(menu_);
+  // find the next item, skipping submenus:
+  fltk3::MenuItem* item = menu_+i;
+  const fltk3::MenuItem* next_item = item->next();
+  // delete the text only if all items were created with add():
+  if (alloc > 1) {
+    for (fltk3::MenuItem* m = item; m < next_item; m++)
+      if (m->text) free((void*)(m->text));
+  }
+  // MRS: "n" is the menu size(), which includes the trailing NULL entry...
+  memmove(item, next_item, (menu_+n-next_item)*sizeof(fltk3::MenuItem));
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu_add.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Menu_global.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Menu_global.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Menu_global.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,60 @@
+//
+// "$Id$"
+//
+// Global menu shortcut code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Make all the shortcuts in this menu global.
+// Currently only one menu at a time and you cannot destruct the menu,
+// is this sufficient?
+
+#include <fltk3/run.h>
+#include <fltk3/Menu_.h>
+
+static fltk3::Menu_* the_widget;
+
+static int handler(int e) {
+  if (e != fltk3::SHORTCUT || fltk3::modal()) return 0;
+  fltk3::first_window(the_widget->window());
+  return the_widget->handle(e);
+}
+
+/**
+  Make the shortcuts for this menu work no matter what window has the
+  focus when you type it.  This is done by using 
+  fltk3::add_handler().  This fltk3::Menu_ widget does not
+  have to be visible (ie the window it is in can be hidden, or it does
+  not have to be put in a window at all).
+  <P>Currently there can be only one global()menu.  Setting a new
+  one will replace the old one.  There is no way to remove the 
+  global() setting (so don't destroy the widget!)
+*/
+void fltk3::Menu_::global() {
+  if (!the_widget) fltk3::add_handler(handler);
+  the_widget = this;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Menu_global.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Multi_Label.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Multi_Label.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Multi_Label.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,77 @@
+//
+// "$Id$"
+//
+// Multi-label widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Allows two labels to be used on a widget (by having one of them
+// be one of these it allows an infinte number!)
+
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/MenuItem.h>
+#include <fltk3/MultiLabel.h>
+
+void fl_multi_labeltype(const fltk3::Label* o, int x, int y, int w, int h, fltk3::Align a)
+{
+  fltk3::MultiLabel* b = (fltk3::MultiLabel*)(o->value);
+  fltk3::Label local = *o;
+  local.value = b->labela;
+  local.type = b->typea;
+  int W = w; int H = h; local.measure(W, H);
+  local.draw(x,y,w,h,a);
+  if (a & fltk3::ALIGN_BOTTOM) h -= H;
+  else if (a & fltk3::ALIGN_TOP) {y += H; h -= H;}
+  else if (a & fltk3::ALIGN_RIGHT) w -= W;
+  else if (a & fltk3::ALIGN_LEFT) {x += W; w -= W;}
+  else {int d = (h+H)/2; y += d; h -= d;}
+  local.value = b->labelb;
+  local.type = b->typeb;
+  local.draw(x,y,w,h,a);
+}
+
+// measurement is only correct for left-to-right appending...
+void fl_multi_measure(const fltk3::Label* o, int& w, int& h) {
+  fltk3::MultiLabel* b = (fltk3::MultiLabel*)(o->value);
+  fltk3::Label local = *o;
+  local.value = b->labela;
+  local.type = b->typea;
+  local.measure(w,h);
+  local.value = b->labelb;
+  local.type = b->typeb;
+  int W = 0; int H = 0; local.measure(W,H);
+  w += W; if (H>h) h = H;
+}
+
+void fltk3::MultiLabel::label(fltk3::Widget* o) {
+  o->label(fltk3::MULTI_LABEL, (const char*)this);
+}
+
+void fltk3::MultiLabel::label(fltk3::MenuItem* o) {
+  o->label(fltk3::MULTI_LABEL, (const char*)this);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Multi_Label.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Native_File_Chooser.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Native_File_Chooser.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Native_File_Chooser.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,47 @@
+// "$Id$"
+//
+// FLTK native OS file chooser widget
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 2004 Greg Ercolano.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Use Windows' chooser
+#ifdef WIN32
+#include "Fl_Native_File_Chooser_WIN32.cxx"
+#endif
+
+// Use Apple's chooser
+#ifdef __APPLE__
+#include <fltk3/NativeFileChooser.h>
+#endif
+
+// All else falls back to FLTK's own chooser
+#if ! defined(__APPLE__) && !defined(WIN32)
+#include "Fl_Native_File_Chooser_FLTK.cxx"
+#endif
+
+const char *fltk3::NativeFileChooser::file_exists_message = "File exists. Are you sure you want to overwrite?";
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Native_File_Chooser.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Native_File_Chooser_FLTK.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Native_File_Chooser_FLTK.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Native_File_Chooser_FLTK.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,462 @@
+// "$Id$"
+//
+// FLTK native OS file chooser widget
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 2004 Greg Ercolano.
+// API changes + filter improvements by Nathan Vander Wilt 2005
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/NativeFileChooser.h>
+#include <fltk3/FileIcon.h>
+#define FLTK_CHOOSER_SINGLE    fltk3::FileChooser::SINGLE
+#define FLTK_CHOOSER_DIRECTORY fltk3::FileChooser::DIRECTORY
+#define FLTK_CHOOSER_MULTI     fltk3::FileChooser::MULTI
+#define FLTK_CHOOSER_CREATE    fltk3::FileChooser::CREATE
+
+#include "Fl_Native_File_Chooser_common.cxx"
+#include <sys/stat.h>
+#include <string.h>
+
+/**
+  The constructor. Internally allocates the native widgets.
+  Optional \p val presets the type of browser this will be, 
+  which can also be changed with type().
+*/
+fltk3::NativeFileChooser::NativeFileChooser(int val) {
+  //// CANT USE THIS -- MESSES UP LINKING/CREATES DEPENDENCY ON fltk_images.
+  //// Have app call this from main() instead.
+  ////
+  ////  static int init = 0;		// 'first time' initialize flag
+  ////  if ( init == 0 ) {
+  ////    // Initialize when instanced for first time
+  ////    fltk3::FileIcon::load_system_icons();
+  ////    init = 1;
+  ////  }
+  _btype       = val;
+  _options     = NO_OPTIONS;
+  _filter      = NULL;
+  _filtvalue   = 0;
+  _parsedfilt  = NULL;
+  _preset_file = NULL;
+  _prevvalue   = NULL;
+  _directory   = NULL;
+  _errmsg      = NULL;
+  _file_chooser = new fltk3::FileChooser(NULL, NULL, 0, NULL);
+  type(val);			// do this after _file_chooser created
+  _nfilters    = 0;
+} 
+
+/**
+  Destructor. 
+  Deallocates any resources allocated to this widget.
+*/
+fltk3::NativeFileChooser::~NativeFileChooser() {
+  delete _file_chooser;
+  _filter      = strfree(_filter);
+  _parsedfilt  = strfree(_parsedfilt);
+  _preset_file = strfree(_preset_file);
+  _prevvalue   = strfree(_prevvalue);
+  _directory   = strfree(_directory);
+  _errmsg      = strfree(_errmsg);
+}
+
+// PRIVATE: SET ERROR MESSAGE
+void fltk3::NativeFileChooser::errmsg(const char *msg) {
+  _errmsg = strfree(_errmsg);
+  _errmsg = strnew(msg);
+}
+
+// PRIVATE: translate Native types to fltk3::FileChooser types
+int fltk3::NativeFileChooser::type_fl_file(int val) {
+  switch (val) {
+    case BROWSE_FILE:
+      return(FLTK_CHOOSER_SINGLE);
+    case BROWSE_DIRECTORY:
+      return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_DIRECTORY);
+    case BROWSE_MULTI_FILE:
+      return(FLTK_CHOOSER_MULTI);
+    case BROWSE_MULTI_DIRECTORY:
+      return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI);
+    case BROWSE_SAVE_FILE:
+      return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_CREATE);
+    case BROWSE_SAVE_DIRECTORY:
+      return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI | FLTK_CHOOSER_CREATE);
+    default:
+      return(FLTK_CHOOSER_SINGLE);
+  }
+}
+
+/**
+  Sets the current fltk3::NativeFileChooser::Type of browser.
+ */
+void fltk3::NativeFileChooser::type(int val) {
+  _btype = val;
+  _file_chooser->type(type_fl_file(val));
+}
+
+/**
+  Gets the current fltk3::NativeFileChooser::Type of browser.
+ */
+int fltk3::NativeFileChooser::type() const {
+  return(_btype);
+}
+
+/**
+  Sets the platform specific chooser options to \p val.
+  \p val is expected to be one or more fltk3::NativeFileChooser::Option flags ORed together.
+  Some platforms have OS-specific functions that can be enabled/disabled via this method.
+  <P>
+  \code
+  Flag              Description                                       Win       Mac       Other
+  --------------    -----------------------------------------------   -------   -------   -------
+  NEW_FOLDER        Shows the 'New Folder' button.                    Ignored   Used      Used
+  PREVIEW           Enables the 'Preview' mode by default.            Ignored   Ignored   Used
+  SAVEAS_CONFIRM    Confirm dialog if BROWSE_SAVE_FILE file exists.   Ignored   Used      Used
+  \endcode
+*/
+void fltk3::NativeFileChooser::options(int val) {
+  _options = val;
+}
+
+/**
+  Gets the platform specific fltk3::NativeFileChooser::Option flags.
+*/
+int fltk3::NativeFileChooser::options() const {
+  return(_options);
+}
+
+/**
+  Post the chooser's dialog. Blocks until dialog has been completed or cancelled.
+  \returns
+     - 0  -- user picked a file
+     - 1  -- user cancelled
+     - -1 -- failed; errmsg() has reason
+*/
+int fltk3::NativeFileChooser::show() {
+  // FILTER
+  if ( _parsedfilt ) {
+    _file_chooser->filter(_parsedfilt);
+  }
+
+  // FILTER VALUE
+  //     Set this /after/ setting the filter
+  //
+  _file_chooser->filter_value(_filtvalue);
+
+  // DIRECTORY
+  if ( _directory && _directory[0] ) {
+    _file_chooser->directory(_directory);
+  } else {
+    _file_chooser->directory(_prevvalue);
+  }
+
+  // PRESET FILE
+  if ( _preset_file ) {
+    _file_chooser->value(_preset_file);
+  }
+
+  // OPTIONS: PREVIEW
+  _file_chooser->preview( (options() & PREVIEW) ? 1 : 0);
+
+  // OPTIONS: NEW FOLDER
+  if ( options() & NEW_FOLDER )
+    _file_chooser->type(_file_chooser->type() | FLTK_CHOOSER_CREATE);	// on
+
+  // SHOW
+  _file_chooser->show();
+
+  // BLOCK WHILE BROWSER SHOWN
+  while ( _file_chooser->shown() ) {
+    fltk3::wait();
+  }
+
+  if ( _file_chooser->value() && _file_chooser->value()[0] ) {
+    _prevvalue = strfree(_prevvalue);
+    _prevvalue = strnew(_file_chooser->value());
+    _filtvalue = _file_chooser->filter_value();	// update filter value
+
+    // HANDLE SHOWING 'SaveAs' CONFIRM
+    if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) {
+      struct stat buf;
+      if ( fltk3::stat(_file_chooser->value(), &buf) != -1 ) {
+	if ( buf.st_mode & S_IFREG ) {		// Regular file + exists?
+	  if ( exist_dialog() == 0 ) {
+	    return(1);
+	  }
+	}
+      }
+    }
+  }
+
+  if ( _file_chooser->count() ) return(0);
+  else return(1);
+}
+
+/**
+  Returns a system dependent error message for the last method that failed. 
+  This message should at least be flagged to the user in a dialog box, or to some kind of error log. 
+  Contents will be valid only for methods that document errmsg() will have info on failures.
+ */
+const char *fltk3::NativeFileChooser::errmsg() const {
+  return(_errmsg ? _errmsg : "No error");
+}
+
+/**
+  Return the filename the user choose.
+  Use this if only expecting a single filename.
+  If more than one filename is expected, use filename(int) instead.
+  Return value may be "" if no filename was chosen (eg. user cancelled).
+ */
+const char* fltk3::NativeFileChooser::filename() const {
+  if ( _file_chooser->count() > 0 ) return(_file_chooser->value());
+  return("");
+}
+
+/**
+  Return one of the filenames the user selected.
+  Use count() to determine how many filenames the user selected.
+  <P>
+  \b Example:
+  \code
+  if ( fnfc->show() == 0 ) {
+    // Print all filenames user selected
+    for (int n=0; n<fnfc->count(); n++ ) {
+      printf("%d) '%s'\n", n, fnfc->filename(n));
+    }
+  }
+  \endcode
+ */
+const char* fltk3::NativeFileChooser::filename(int i) const {
+  if ( i < _file_chooser->count() )
+    return(_file_chooser->value(i+1));	// convert fltk 1 based to our 0 based
+  return("");
+}
+
+/**
+  Set the title of the file chooser's dialog window.
+  Can be NULL if no title desired.
+  The default title varies according to the platform, so you are advised to set the title explicitly.
+*/
+void fltk3::NativeFileChooser::title(const char *val) {
+  _file_chooser->label(val);
+}
+
+/**
+  Get the title of the file chooser's dialog window.
+  Return value may be NULL if no title was set.
+*/
+const char *fltk3::NativeFileChooser::title() const {
+  return(_file_chooser->label());
+}
+
+/**
+  Sets the filename filters used for browsing. 
+  The default is NULL, which browses all files.
+  <P>
+  The filter string can be any of:
+  <P>
+    - A single wildcard (eg. "*.txt")
+    - Multiple wildcards (eg. "*.{cxx,h,H}")
+    - A descriptive name followed by a "\t" and a wildcard (eg. "Text Files\t*.txt")
+    - A list of separate wildcards with a "\n" between each (eg. "*.{cxx,H}\n*.txt")
+    - A list of descriptive names and wildcards (eg. "C++ Files\t*.{cxx,H}\nTxt Files\t*.txt")
+  <P>
+  The format of each filter is a wildcard, or an optional user description 
+  followed by '\\t' and the wildcard.
+  <P>
+  On most platforms, each filter is available to the user via a pulldown menu 
+  in the file chooser. The 'All Files' option is always available to the user. 
+*/
+void fltk3::NativeFileChooser::filter(const char *val) {
+  _filter = strfree(_filter);
+  _filter = strnew(val);
+  parse_filter();
+}
+
+/**
+  Returns the filter string last set.
+  Can be NULL if no filter was set.
+ */
+const char *fltk3::NativeFileChooser::filter() const {
+  return(_filter);
+}
+
+/**
+Gets how many filters were available, not including "All Files" 
+*/
+int fltk3::NativeFileChooser::filters() const {
+  return(_nfilters);
+}
+
+/**
+  Sets which filter will be initially selected.
+
+  The first filter is indexed as 0. 
+  If filter_value()==filters(), then "All Files" was chosen. 
+  If filter_value() > filters(), then a custom filter was set.
+ */
+void fltk3::NativeFileChooser::filter_value(int val) {
+  _filtvalue = val;
+}
+
+/**
+  Returns which filter value was last selected by the user.
+  This is only valid if the chooser returns success.
+ */
+int fltk3::NativeFileChooser::filter_value() const {
+  return(_filtvalue);
+}
+
+/**
+  Returns the number of filenames (or directory names) the user selected.
+  <P>
+  \b Example:
+  \code
+  if ( fnfc->show() == 0 ) {
+    // Print all filenames user selected
+    for (int n=0; n<fnfc->count(); n++ ) {
+      printf("%d) '%s'\n", n, fnfc->filename(n));
+    }
+  }
+  \endcode
+*/
+int fltk3::NativeFileChooser::count() const {
+  return(_file_chooser->count());
+}
+
+/**
+  Preset the directory the browser will show when opened.
+  If \p val is NULL, or no directory is specified, the chooser will attempt
+  to use the last non-cancelled folder.
+*/
+void fltk3::NativeFileChooser::directory(const char *val) {
+  _directory = strfree(_directory);
+  _directory = strnew(val);
+}
+
+/**
+  Returns the current preset directory() value.
+*/
+const char *fltk3::NativeFileChooser::directory() const {
+  return(_directory);
+}
+
+// PRIVATE: Convert our filter format to fltk's chooser format
+//     FROM                                     TO (FLTK)
+//     -------------------------                --------------------------
+//     "*.cxx"                                  "*.cxx Files(*.cxx)"
+//     "C Files\t*.{cxx,h}"                     "C Files(*.{cxx,h})"
+//     "C Files\t*.{cxx,h}\nText Files\t*.txt"  "C Files(*.{cxx,h})\tText Files(*.txt)"
+//
+//     Returns a modified version of the filter that the caller is responsible
+//     for freeing with strfree().
+//
+void fltk3::NativeFileChooser::parse_filter() {
+  _parsedfilt = strfree(_parsedfilt);	// clear previous parsed filter (if any)
+  _nfilters = 0;
+  char *in = _filter;
+  if ( !in ) return;
+
+  int has_name = strchr(in, '\t') ? 1 : 0;
+
+  char mode = has_name ? 'n' : 'w';	// parse mode: n=title, w=wildcard
+  char wildcard[1024] = "";		// parsed wildcard
+  char name[1024] = "";
+
+  // Parse filter user specified
+  for ( ; 1; in++ ) {
+    /*** DEBUG
+    printf("WORKING ON '%c': mode=<%c> name=<%s> wildcard=<%s>\n",
+			*in, mode,     name,     wildcard);
+    ***/
+
+    switch (*in) {
+      // FINISHED PARSING NAME?
+      case '\t':
+        if ( mode != 'n' ) goto regchar;
+        mode = 'w';
+        break; 
+      // ESCAPE NEXT CHAR
+      case '\\':
+	++in;
+	goto regchar; 
+      // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS?
+      case '\r':
+      case '\n':
+      case '\0':
+	// APPEND NEW FILTER TO LIST
+	if ( wildcard[0] ) {
+	  // OUT: "name(wild)\tname(wild)"
+	  char comp[2048];
+	  sprintf(comp, "%s%.511s(%.511s)", ((_parsedfilt)?"\t":""),
+					    name, wildcard);
+	  _parsedfilt = strapp(_parsedfilt, comp);
+	  _nfilters++;
+	  //DEBUG printf("DEBUG: PARSED FILT NOW <%s>\n", _parsedfilt);
+	}
+	// RESET
+	wildcard[0] = name[0] = '\0';
+	mode = strchr(in, '\t') ? 'n' : 'w';
+	// DONE?
+	if ( *in == '\0' ) return;	// done
+	else continue;			// not done yet, more filters
+
+      // Parse all other chars
+      default:				// handle all non-special chars
+      regchar:				// handle regular char
+	switch ( mode ) {
+	  case 'n': chrcat(name, *in);     continue;
+	  case 'w': chrcat(wildcard, *in); continue;
+	}
+	break;
+    }
+  }
+  //NOTREACHED
+}
+
+/**
+  Sets the default filename for the chooser.
+  Use directory() to set the default directory.
+  Mainly used to preset the filename for save dialogs, 
+  and on most platforms can be used for opening files as well. 
+ */
+void fltk3::NativeFileChooser::preset_file(const char* val) {
+  _preset_file = strfree(_preset_file);
+  _preset_file = strnew(val);
+}
+
+/**
+  Get the preset filename.
+  */
+const char* fltk3::NativeFileChooser::preset_file() const {
+  return(_preset_file);
+}
+
+
+int fltk3::NativeFileChooser::exist_dialog() {
+  return(fltk3::choice("%s", fltk3::cancel, fltk3::ok, NULL, file_exists_message));
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Native_File_Chooser_FLTK.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Native_File_Chooser_MAC.mm
===================================================================
--- branches/branch-3.0/src/core/Fl_Native_File_Chooser_MAC.mm	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Native_File_Chooser_MAC.mm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,632 @@
+// "$Id$"
+//
+// FLTK native OS file chooser widget
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 2004 Greg Ercolano.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+// TODO:
+//	o When doing 'open file', only dir is preset, not filename.
+//        Possibly 'preset_file' could be used to select the filename.
+//
+
+#ifdef __APPLE__
+
+#include "Fl_Native_File_Chooser_common.cxx"		// strnew/strfree/strapp/chrcat
+#include <libgen.h>		// dirname(3)
+#include <sys/types.h>		// stat(2)
+#include <sys/stat.h>		// stat(2)
+
+
+#include <fltk3/run.h>
+#include <fltk3/NativeFileChooser.h>
+#include <fltk3/FileChooser.h>
+#include <fltk3/filename.h>
+
+// FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS
+void fltk3::NativeFileChooser::clear_pathnames() {
+  if ( _pathnames ) {
+    while ( --_tpathnames >= 0 ) {
+      _pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]);
+    }
+    delete [] _pathnames;
+    _pathnames = NULL;
+  }
+  _tpathnames = 0;
+}
+
+// SET A SINGLE PATHNAME
+void fltk3::NativeFileChooser::set_single_pathname(const char *s) {
+  clear_pathnames();
+  _pathnames = new char*[1];
+  _pathnames[0] = strnew(s);
+  _tpathnames = 1;
+}
+
+// CONSTRUCTOR
+fltk3::NativeFileChooser::NativeFileChooser(int val) {
+  _btype          = val;
+  _panel = NULL;
+  _options        = NO_OPTIONS;
+  _pathnames      = NULL;
+  _tpathnames     = 0;
+  _title          = NULL;
+  _filter         = NULL;
+  _filt_names     = NULL;
+  memset(_filt_patt, 0, sizeof(char*) * MAXFILTERS);
+  _filt_total     = 0;
+  _filt_value     = 0;
+  _directory      = NULL;
+  _preset_file    = NULL;
+  _errmsg         = NULL;
+}
+
+// DESTRUCTOR
+fltk3::NativeFileChooser::~NativeFileChooser() {
+  // _opts		// nothing to manage
+  // _options		// nothing to manage
+  // _keepstate		// nothing to manage
+  // _tempitem		// nothing to manage
+  clear_pathnames();
+  _directory   = strfree(_directory);
+  _title       = strfree(_title);
+  _preset_file = strfree(_preset_file);
+  _filter      = strfree(_filter);
+  //_filt_names		// managed by clear_filters()
+  //_filt_patt[i]	// managed by clear_filters()
+  //_filt_total		// managed by clear_filters()
+  clear_filters();
+  //_filt_value		// nothing to manage
+  _errmsg = strfree(_errmsg);
+}
+
+// GET TYPE OF BROWSER
+int fltk3::NativeFileChooser::type() const {
+  return(_btype);
+}
+
+// SET OPTIONS
+void fltk3::NativeFileChooser::options(int val) {
+  _options = val;
+}
+
+// GET OPTIONS
+int fltk3::NativeFileChooser::options() const {
+  return(_options);
+}
+
+// SHOW THE BROWSER WINDOW
+//     Returns:
+//         0 - user picked a file
+//         1 - user cancelled
+//        -1 - failed; errmsg() has reason
+//
+int fltk3::NativeFileChooser::show() {
+
+  // Make sure fltk interface updates before posting our dialog
+  fltk3::flush();
+  
+  // POST BROWSER
+  int err = post();
+
+  _filt_total = 0;
+
+  return(err);
+}
+
+// SET ERROR MESSAGE
+//     Internal use only.
+//
+void fltk3::NativeFileChooser::errmsg(const char *msg) {
+  _errmsg = strfree(_errmsg);
+  _errmsg = strnew(msg);
+}
+
+// RETURN ERROR MESSAGE
+const char *fltk3::NativeFileChooser::errmsg() const {
+  return(_errmsg ? _errmsg : "No error");
+}
+
+// GET FILENAME
+const char* fltk3::NativeFileChooser::filename() const {
+  if ( _pathnames && _tpathnames > 0 ) return(_pathnames[0]);
+  return("");
+}
+
+// GET FILENAME FROM LIST OF FILENAMES
+const char* fltk3::NativeFileChooser::filename(int i) const {
+  if ( _pathnames && i < _tpathnames ) return(_pathnames[i]);
+  return("");
+}
+
+// GET TOTAL FILENAMES CHOSEN
+int fltk3::NativeFileChooser::count() const {
+  return(_tpathnames);
+}
+
+// PRESET PATHNAME
+//     Value can be NULL for none.
+//
+void fltk3::NativeFileChooser::directory(const char *val) {
+  _directory = strfree(_directory);
+  _directory = strnew(val);
+}
+
+// GET PRESET PATHNAME
+//     Returned value can be NULL if none set.
+//
+const char* fltk3::NativeFileChooser::directory() const {
+  return(_directory);
+}
+
+// SET TITLE
+//     Value can be NULL if no title desired.
+//
+void fltk3::NativeFileChooser::title(const char *val) {
+  _title = strfree(_title);
+  _title = strnew(val);
+}
+
+// GET TITLE
+//     Returned value can be NULL if none set.
+//
+const char *fltk3::NativeFileChooser::title() const {
+  return(_title);
+}
+
+// SET FILTER
+//     Can be NULL if no filter needed
+//
+void fltk3::NativeFileChooser::filter(const char *val) {
+  _filter = strfree(_filter);
+  _filter = strnew(val);
+
+  // Parse filter user specified
+  //     IN: _filter = "C Files\t*.{cxx,h}\nText Files\t*.txt"
+  //    OUT: _filt_names   = "C Files\tText Files"
+  //         _filt_patt[0] = "*.{cxx,h}"
+  //         _filt_patt[1] = "*.txt"
+  //         _filt_total   = 2
+  //
+  parse_filter(_filter);
+}
+
+// GET FILTER
+//     Returned value can be NULL if none set.
+//
+const char *fltk3::NativeFileChooser::filter() const {
+  return(_filter);
+}
+
+// CLEAR ALL FILTERS
+//    Internal use only.
+//
+void fltk3::NativeFileChooser::clear_filters() {
+  _filt_names = strfree(_filt_names);
+  for (int i=0; i<_filt_total; i++) {
+    _filt_patt[i] = strfree(_filt_patt[i]);
+  }
+  _filt_total = 0;
+}
+
+// PARSE USER'S FILTER SPEC
+//    Parses user specified filter ('in'),
+//    breaks out into _filt_patt[], _filt_names, and _filt_total.
+//
+//    Handles:
+//    IN:                                   OUT:_filt_names    OUT: _filt_patt
+//    ------------------------------------  ------------------ ---------------
+//    "*.{ma,mb}"                           "*.{ma,mb} Files"  "*.{ma,mb}"
+//    "*.[abc]"                             "*.[abc] Files"    "*.[abc]"
+//    "*.txt"                               "*.txt Files"      "*.c"
+//    "C Files\t*.[ch]"                     "C Files"          "*.[ch]"
+//    "C Files\t*.[ch]\nText Files\t*.cxx"  "C Files"          "*.[ch]"
+//
+//    Parsing Mode:
+//         IN:"C Files\t*.{cxx,h}"
+//             |||||||  |||||||||
+//       mode: nnnnnnn  wwwwwwwww
+//             \_____/  \_______/
+//              Name     Wildcard
+//
+void fltk3::NativeFileChooser::parse_filter(const char *in) {
+  clear_filters();
+  if ( ! in ) return;
+  int has_name = strchr(in, '\t') ? 1 : 0;
+
+  char mode = has_name ? 'n' : 'w';	// parse mode: n=title, w=wildcard
+  char wildcard[1024] = "";		// parsed wildcard
+  char name[1024] = "";
+
+  // Parse filter user specified
+  for ( ; 1; in++ ) {
+
+    //// DEBUG
+    //// printf("WORKING ON '%c': mode=<%c> name=<%s> wildcard=<%s>\n",
+    ////                    *in,  mode,     name,     wildcard);
+    
+    switch (*in) {
+      // FINISHED PARSING NAME?
+      case '\t':
+	if ( mode != 'n' ) goto regchar;
+	mode = 'w';
+	break;
+
+      // ESCAPE NEXT CHAR
+      case '\\':
+	++in;
+	goto regchar;
+
+      // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS?
+      case '\r':
+      case '\n':
+      case '\0':
+	// TITLE
+	//     If user didn't specify a name, make one
+	//
+	if ( name[0] == '\0' ) {
+	  sprintf(name, "%.*s Files", (int)sizeof(name)-10, wildcard);
+	}
+	// APPEND NEW FILTER TO LIST
+	if ( wildcard[0] ) {
+	  // Add to filtername list
+	  //     Tab delimit if more than one. We later break
+	  //     tab delimited string into CFArray with 
+	  //     CFStringCreateArrayBySeparatingStrings()
+	  //
+	  if ( _filt_total ) {
+	      _filt_names = strapp(_filt_names, "\t");
+	  }
+	  _filt_names = strapp(_filt_names, name);
+
+	  // Add filter to the pattern array
+	  _filt_patt[_filt_total++] = strnew(wildcard);
+	}
+	// RESET
+	wildcard[0] = name[0] = '\0';
+	mode = strchr(in, '\t') ? 'n' : 'w';
+	// DONE?
+	if ( *in == '\0' ) return;	// done
+	else continue;			// not done yet, more filters
+
+      // Parse all other chars
+      default:				// handle all non-special chars
+      regchar:				// handle regular char
+	switch ( mode ) {
+	  case 'n': chrcat(name, *in);     continue;
+	  case 'w': chrcat(wildcard, *in); continue;
+	}
+	break;
+    }
+  }
+  //NOTREACHED
+}
+
+// SET PRESET FILE
+//     Value can be NULL for none.
+//
+void fltk3::NativeFileChooser::preset_file(const char* val) {
+  _preset_file = strfree(_preset_file);
+  _preset_file = strnew(val);
+}
+
+// PRESET FILE
+//     Returned value can be NULL if none set.
+//
+const char* fltk3::NativeFileChooser::preset_file() const {
+  return(_preset_file);
+}
+
+void fltk3::NativeFileChooser::filter_value(int val) {
+  _filt_value = val;
+}
+
+int fltk3::NativeFileChooser::filter_value() const {
+  return(_filt_value);
+}
+
+int fltk3::NativeFileChooser::filters() const {
+  return(_filt_total);
+}
+
+#import <Cocoa/Cocoa.h>
+#define UNLIKELYPREFIX "___fl_very_unlikely_prefix_"
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+
+int fltk3::NativeFileChooser::get_saveas_basename(void) {
+  char *q = strdup( [[(NSSavePanel*)_panel filename] fileSystemRepresentation] );
+  id delegate = [(NSSavePanel*)_panel delegate];
+  if (delegate != nil) {
+    const char *d = [[(NSSavePanel*)_panel directory] fileSystemRepresentation];
+    int l = strlen(d) + 1;
+    int lu = strlen(UNLIKELYPREFIX);
+    // Remove UNLIKELYPREFIX between directory and filename parts
+    memmove(q + l, q + l + lu, strlen(q + l + lu) + 1);
+  }
+  set_single_pathname( q );
+  free(q);
+  return 0;
+}
+
+// SET THE TYPE OF BROWSER
+void fltk3::NativeFileChooser::type(int val) {
+  _btype = val;
+}
+
+/* Input
+ filter=  "C files\t*.{c,h}\nText files\t*.txt\n"
+ patterns[0] = "*.{c,h}"
+ patterns[1] = "*.txt"
+ count = 2
+ Return:
+ "C files (*.{c,h})\nText files (*.txt)\n"
+ */
+static char *prepareMacFilter(int count, const char *filter, char **patterns) {
+  int rank = 0, l = 0;
+  for (int i = 0; i < count; i++) {
+    l += strlen(patterns[i]) + 3;
+  }
+  const char *p = filter;
+  char *q; q = new char[strlen(p) + l + 1];
+  const char *r, *s;
+  char *t;
+  t = q;
+  do {	// copy to t what is in filter removing what is between \t and \n, if any
+    r = strchr(p, '\n');
+    if (!r) r = p + strlen(p);
+    s = strchr(p, '\t');
+    if (s && s < r) { 
+      memcpy(q, p, s - p); 
+      q += s - p; 
+      if (rank < count) { sprintf(q, " (%s)", patterns[rank]); q += strlen(q); }
+    }
+    else { 
+      memcpy(q, p, r - p); 
+      q += r - p; 
+    }
+    rank++;
+    *(q++) = '\n'; 
+    if (*p) p = r + 1;
+  } while(*p);
+  *q = 0;
+  return t;
+}
+
+@interface FLopenDelegate : NSObject 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSOpenSavePanelDelegate>
+#endif
+{
+  NSPopUpButton *nspopup;
+  char **filter_pattern;
+}
+- (FLopenDelegate*)setPopup:(NSPopUpButton*)popup filter_pattern:(char**)pattern;
+- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;
+@end
+@implementation FLopenDelegate
+- (FLopenDelegate*)setPopup:(NSPopUpButton*)popup filter_pattern:(char**)pattern
+{
+  nspopup = popup;
+  filter_pattern = pattern;
+  return self;
+}
+- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
+{
+  if ( [nspopup indexOfSelectedItem] == [nspopup numberOfItems] - 1) return YES;
+  const char *pathname = [filename fileSystemRepresentation];
+  if ( fltk3::filename_isdir(pathname) ) return YES;
+  if ( fltk3::filename_match(pathname, filter_pattern[ [nspopup indexOfSelectedItem] ]) ) return YES;
+  return NO;
+}
+@end
+
+@interface FLsaveDelegate : NSObject 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSOpenSavePanelDelegate>
+#endif
+{
+}
+- (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag;
+@end
+@implementation FLsaveDelegate
+- (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag
+{
+  if (! okFlag) return filename;
+  // User has clicked save, and no overwrite confirmation should occur.
+  // To get the latter, we need to change the name we return (hence the prefix):
+  return [@ UNLIKELYPREFIX stringByAppendingString:filename];
+}
+@end
+  
+static NSPopUpButton *createPopupAccessory(NSSavePanel *panel, const char *filter, const char *title, int rank)
+{
+  NSPopUpButton *popup;
+  NSRect rectview = NSMakeRect(5, 5, 350, 30 );
+  NSView *view = [[[NSView alloc] initWithFrame:rectview] autorelease];
+  NSRect rectbox = NSMakeRect(0, 3, 140, 20 );
+  NSBox *box = [[[NSBox alloc] initWithFrame:rectbox] autorelease];
+  NSRect rectpop = NSMakeRect(105, 0, 246, 30 );
+  popup = [[[NSPopUpButton alloc ] initWithFrame:rectpop pullsDown:NO] autorelease];
+  [view addSubview:box];
+  [view addSubview:popup];
+  [box setBorderType:NSNoBorder];
+  NSString *nstitle = [[NSString alloc] initWithUTF8String:title];
+  [box setTitle:nstitle];
+  [nstitle release];
+  NSFont *font = [NSFont controlContentFontOfSize:NSRegularControlSize];
+  [box setTitleFont:font];
+  [box sizeToFit];
+  // horizontally move box to fit the locale-dependent width of its title
+  NSRect r=[box frame];
+  NSPoint o = r.origin;
+  o.x = rectpop.origin.x - r.size.width + 15;
+  [box setFrameOrigin:o];
+  CFStringRef tab = CFSTR("\n");
+  CFStringRef tmp_cfs;
+  tmp_cfs = CFStringCreateWithCString(NULL, filter, kCFStringEncodingUTF8);
+  CFArrayRef array = CFStringCreateArrayBySeparatingStrings(NULL, tmp_cfs, tab);
+  CFRelease(tmp_cfs);
+  CFRelease(tab);
+  [popup addItemsWithTitles:(NSArray*)array];
+  NSMenuItem *item = [popup itemWithTitle:@""];
+  if (item) [popup removeItemWithTitle:@""];
+  CFRelease(array);
+  [popup selectItemAtIndex:rank];
+  [panel setAccessoryView:view];
+  return popup;
+}
+  
+// POST BROWSER
+//     Internal use only.
+//     Assumes '_opts' has been initialized.
+//
+//     Returns:
+//         0 - user picked a file
+//         1 - user cancelled
+//        -1 - failed; errmsg() has reason
+//     
+int fltk3::NativeFileChooser::post() {
+  // INITIALIZE BROWSER
+  if ( _filt_total == 0 ) {	// Make sure they match
+    _filt_value = 0;		// TBD: move to someplace more logical?
+  }
+  NSAutoreleasePool *localPool;
+  localPool = [[NSAutoreleasePool alloc] init];
+  switch (_btype) {
+    case BROWSE_FILE:
+    case BROWSE_MULTI_FILE:
+    case BROWSE_DIRECTORY:
+    case BROWSE_MULTI_DIRECTORY:
+      _panel =  [NSOpenPanel openPanel];
+      break;	  
+    case BROWSE_SAVE_DIRECTORY:
+    case BROWSE_SAVE_FILE:
+      _panel =  [NSSavePanel savePanel];
+      break;
+  }
+  int retval;
+  NSString *nstitle = [NSString stringWithUTF8String: (_title ? _title : "No Title")];
+  [(NSSavePanel*)_panel setTitle:nstitle];
+  switch (_btype) {
+    case BROWSE_MULTI_FILE:
+      [(NSOpenPanel*)_panel setAllowsMultipleSelection:YES];
+      break;
+    case BROWSE_MULTI_DIRECTORY:
+      [(NSOpenPanel*)_panel setAllowsMultipleSelection:YES];
+      /* FALLTHROUGH */
+    case BROWSE_DIRECTORY:
+      [(NSOpenPanel*)_panel setCanChooseDirectories:YES];
+      break;
+    case BROWSE_SAVE_DIRECTORY:
+      [(NSSavePanel*)_panel setCanCreateDirectories:YES];
+      break;
+  }
+  
+  // SHOW THE DIALOG
+  if ( [(NSSavePanel*)_panel isKindOfClass:[NSOpenPanel class]] ) {
+    NSPopUpButton *popup = nil;
+    if (_filt_total) {
+      char *t = prepareMacFilter(_filt_total, _filter, _filt_patt);
+      popup = createPopupAccessory((NSSavePanel*)_panel, t, fltk3::FileChooser::show_label, 0);
+      delete[] t;
+      [[popup menu] addItem:[NSMenuItem separatorItem]];
+      [popup addItemWithTitle:[[NSString alloc] initWithUTF8String:fltk3::FileChooser::all_files_label]];
+      [popup setAction:@selector(validateVisibleColumns)];
+      [popup setTarget:(NSObject*)_panel];
+      static FLopenDelegate *openDelegate = nil;
+      if (openDelegate == nil) {
+	// not to be ever freed
+	openDelegate = [[FLopenDelegate alloc] init];
+      }
+      [openDelegate setPopup:popup filter_pattern:_filt_patt];
+      [(NSOpenPanel*)_panel setDelegate:openDelegate];
+    }
+    NSString *dir = nil;
+    NSString *fname = nil;
+    NSString *preset = nil;
+    if (_preset_file) {
+      preset = [[NSString alloc] initWithUTF8String:_preset_file];
+      if (strchr(_preset_file, '/') != NULL) 
+	dir = [[NSString alloc] initWithString:[preset stringByDeletingLastPathComponent]];
+      fname = [preset lastPathComponent];
+    }
+    if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory];
+    retval = [(NSOpenPanel*)_panel runModalForDirectory:dir file:fname types:nil];	
+    [dir release];
+    [preset release];
+    if (_filt_total) {
+      _filt_value = [popup indexOfSelectedItem];
+    }
+    if ( retval == NSOKButton ) {
+      clear_pathnames();
+      NSArray *array = [(NSOpenPanel*)_panel filenames];
+      _tpathnames = [array count];
+      _pathnames = new char*[_tpathnames];
+      for(int i = 0; i < _tpathnames; i++) {
+	_pathnames[i] = strnew([(NSString*)[array objectAtIndex:i] fileSystemRepresentation]);
+      }
+    }
+  }
+  else {
+    NSString *dir = nil;
+    NSString *fname = nil;
+    NSString *preset = nil;
+    NSPopUpButton *popup = nil;
+    [(NSSavePanel*)_panel setAllowsOtherFileTypes:YES];
+    if ( !(_options & SAVEAS_CONFIRM) ) {
+      static FLsaveDelegate *saveDelegate = nil;
+      if (saveDelegate == nil)saveDelegate = [[FLsaveDelegate alloc] init]; // not to be ever freed
+      [(NSSavePanel*)_panel setDelegate:saveDelegate];
+    }
+    if (_preset_file) {
+      preset = [[NSString alloc] initWithUTF8String:_preset_file];
+      if (strchr(_preset_file, '/') != NULL) {
+	dir = [[NSString alloc] initWithString:[preset stringByDeletingLastPathComponent]];
+      }
+      fname = [preset lastPathComponent];
+    }
+    if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory];
+    if (_filt_total) {
+      char *t = prepareMacFilter(_filt_total, _filter, _filt_patt);
+      popup = createPopupAccessory((NSSavePanel*)_panel, t, [[(NSSavePanel*)_panel nameFieldLabel] UTF8String], _filt_value);
+      delete[] t;
+    }
+    retval = [(NSSavePanel*)_panel runModalForDirectory:dir file:fname];
+    if (_filt_total) {
+      _filt_value = [popup indexOfSelectedItem];
+    }
+    [dir release];
+    [preset release];
+    if ( retval == NSOKButton ) get_saveas_basename();
+  }
+  [localPool release];
+  return (retval == NSOKButton ? 0 : 1);
+}
+
+#endif // __APPLE__
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Native_File_Chooser_MAC.mm
___________________________________________________________________
Name: svn:eol_style
   + native
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Native_File_Chooser_WIN32.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Native_File_Chooser_WIN32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Native_File_Chooser_WIN32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,860 @@
+// "$Id$"
+//
+// FLTK native OS file chooser widget
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 2004 Greg Ercolano.
+// API changes + filter improvements by Nathan Vander Wilt 2005
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Any application to multi-folder implementation:
+//     http://www.codeproject.com/dialog/selectfolder.asp
+//
+
+#ifndef FLTK3_DOXYGEN		// PREVENT DOXYGEN'S USE OF THIS FILE
+
+#include <stdio.h>		// debugging
+#include <wchar.h>		//MG
+#include "Fl_Native_File_Chooser_common.cxx"		// strnew/strfree/strapp/chrcat
+typedef const wchar_t *LPCWSTR; //MG
+LPCWSTR utf8towchar(const char *in); //MG
+char *wchartoutf8(LPCWSTR in);  //MG
+
+#include <fltk3/NativeFileChooser.h>
+
+#define LCURLY_CHR	'{'
+#define RCURLY_CHR	'}'
+#define LBRACKET_CHR	'['
+#define RBRACKET_CHR	']'
+#define MAXFILTERS	80
+
+void fl_OleInitialize();	// in Fl.cxx (Windows only)
+
+// STATIC: PRINT WINDOWS 'DOUBLE NULL' STRING (DEBUG)
+#ifdef DEBUG
+static void dnullprint(char *wp) {
+  if ( ! wp ) return;
+  for ( int t=0; true; t++ ) {
+    if ( wp[t] == '\0' && wp[t+1] == '\0' ) {
+      printf("\\0\\0");
+      fflush(stdout);
+      return;
+    } else if ( wp[t] == '\0' ) {
+      printf("\\0");
+    } else { 
+      printf("%c",wp[t]);
+    }
+  }
+}
+#endif
+
+// RETURN LENGTH OF DOUBLENULL STRING
+//    Includes single nulls in count, excludes trailing doublenull.
+//
+//         1234 567
+//         |||/\|||
+//    IN: "one\0two\0\0"
+//   OUT: 7
+//
+static int dnulllen(const char *wp) {
+  int len = 0;
+  while ( ! ( *(wp+0) == 0 && *(wp+1) == 0 ) ) {
+    ++wp;
+    ++len;
+  }
+  return(len);
+}
+
+// STATIC: Append a string to another, leaving terminated with DOUBLE NULL.
+//     Automatically handles extending length of string.
+//     wp can be NULL (a new wp will be allocated and initialized).
+//     string must be NULL terminated.
+//     The pointer wp may be modified on return.
+//
+static void dnullcat(char*&wp, const char *string, int n = -1 ) {
+  //DEBUG printf("DEBUG: dnullcat IN: <"); dnullprint(wp); printf(">\n");
+  int inlen = ( n < 0 ) ? strlen(string) : n;
+  if ( ! wp ) {
+    wp = new char[inlen + 4];
+    *(wp+0) = '\0';
+    *(wp+1) = '\0';
+  } else {
+    int wplen = dnulllen(wp);
+    // Make copy of wp into larger buffer
+    char *tmp = new char[wplen + inlen + 4];
+    memcpy(tmp, wp, wplen+2);	// copy of wp plus doublenull
+    delete [] wp;			// delete old wp
+    wp = tmp;			// use new copy
+    //DEBUG printf("DEBUG: dnullcat COPY: <"); dnullprint(wp); printf("> (wplen=%d)\n", wplen);
+  }
+
+  // Find end of double null string
+  //     *wp2 is left pointing at second null.
+  //
+  char *wp2 = wp;
+  if ( *(wp2+0) != '\0' && *(wp2+1) != '\0' ) {
+    for ( ; 1; wp2++ ) {
+      if ( *(wp2+0) == '\0' && *(wp2+1) == '\0' ) {
+        wp2++;
+        break;
+      }
+    }
+  }
+
+  if ( n == -1 ) n = strlen(string);
+  strncpy(wp2, string, n);
+
+  // Leave string double-null terminated
+  *(wp2+n+0) = '\0';
+  *(wp2+n+1) = '\0';
+  //DEBUG printf("DEBUG: dnullcat OUT: <"); dnullprint(wp); printf(">\n\n");
+}
+
+// CTOR
+fltk3::NativeFileChooser::NativeFileChooser(int val) {
+  _btype           = val;
+  _options         = NO_OPTIONS;
+  memset((void*)&_ofn, 0, sizeof(OPENFILENAMEW));
+  _ofn.lStructSize = sizeof(OPENFILENAMEW);
+  _ofn.hwndOwner   = NULL;
+  memset((void*)&_binf, 0, sizeof(BROWSEINFO));
+  _pathnames       = NULL;
+  _tpathnames      = 0;
+  _directory       = NULL;
+  _title           = NULL;
+  _filter          = NULL;
+  _parsedfilt      = NULL;
+  _nfilters        = 0;
+  _preset_file     = NULL;
+  _errmsg          = NULL;
+}
+
+// DTOR
+fltk3::NativeFileChooser::~NativeFileChooser() {
+  //_pathnames                // managed by clear_pathnames()
+  //_tpathnames               // managed by clear_pathnames()
+  _directory   = strfree(_directory);
+  _title       = strfree(_title);
+  _filter      = strfree(_filter);
+  //_parsedfilt               // managed by clear_filters()
+  //_nfilters                 // managed by clear_filters()
+  _preset_file = strfree(_preset_file);
+  _errmsg      = strfree(_errmsg);
+  clear_filters();
+  clear_pathnames();
+  ClearOFN();
+  ClearBINF();
+}
+
+// SET TYPE OF BROWSER
+void fltk3::NativeFileChooser::type(int val) {
+  _btype = val;
+}
+
+// GET TYPE OF BROWSER
+int fltk3::NativeFileChooser::type() const {
+  return( _btype );
+}
+
+// SET OPTIONS
+void fltk3::NativeFileChooser::options(int val) {
+  _options = val;
+}
+
+// GET OPTIONS
+int fltk3::NativeFileChooser::options() const {
+  return(_options);
+}
+
+// PRIVATE: SET ERROR MESSAGE
+void fltk3::NativeFileChooser::errmsg(const char *val) {
+  _errmsg = strfree(_errmsg);
+  _errmsg = strnew(val);
+}
+
+// FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS
+void fltk3::NativeFileChooser::clear_pathnames() {
+  if ( _pathnames ) {
+    while ( --_tpathnames >= 0 ) {
+      _pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]);
+    }
+    delete [] _pathnames;
+    _pathnames = NULL;
+  }
+  _tpathnames = 0;
+}
+
+// SET A SINGLE PATHNAME
+void fltk3::NativeFileChooser::set_single_pathname(const char *s) {
+  clear_pathnames();
+  _pathnames = new char*[1];
+  _pathnames[0] = strnew(s);
+  _tpathnames = 1;
+}
+
+// ADD PATHNAME TO EXISTING ARRAY
+void fltk3::NativeFileChooser::add_pathname(const char *s) {
+  if ( ! _pathnames ) {
+    // Create first element in array
+    ++_tpathnames;
+    _pathnames = new char*[_tpathnames];
+  } else {
+    // Grow array by 1
+    char **tmp = new char*[_tpathnames+1];		// create new buffer
+    memcpy((void*)tmp, (void*)_pathnames, 
+		       sizeof(char*)*_tpathnames);	// copy old
+    delete [] _pathnames;				// delete old
+    _pathnames = tmp;					// use new
+    ++_tpathnames;
+  }
+  _pathnames[_tpathnames-1] = strnew(s);
+}
+
+// FREE A PIDL (Pointer to IDentity List)
+void fltk3::NativeFileChooser::FreePIDL(ITEMIDLIST *pidl) {
+  IMalloc *imalloc = NULL;
+  if ( SUCCEEDED(SHGetMalloc(&imalloc)) ) {
+    imalloc->Free(pidl);
+    imalloc->Release();
+    imalloc = NULL;
+  }
+}
+
+// CLEAR MICROSOFT OFN (OPEN FILE NAME) CLASS
+void fltk3::NativeFileChooser::ClearOFN() {
+  // Free any previously allocated lpstrFile before zeroing out _ofn
+  if ( _ofn.lpstrFile ) {
+    delete [] _ofn.lpstrFile;
+    _ofn.lpstrFile = NULL;
+  }
+  if ( _ofn.lpstrInitialDir ) {
+    delete [] (TCHAR*) _ofn.lpstrInitialDir; //msvc6 compilation fix
+    _ofn.lpstrInitialDir = NULL;
+  }
+  _ofn.lpstrFilter = NULL;		// (deleted elsewhere)
+  int temp = _ofn.nFilterIndex;		// keep the filter_value
+  memset((void*)&_ofn, 0, sizeof(_ofn));
+  _ofn.lStructSize  = sizeof(OPENFILENAMEW);
+  _ofn.nFilterIndex = temp;
+}
+
+// CLEAR MICROSOFT BINF (BROWSER INFO) CLASS
+void fltk3::NativeFileChooser::ClearBINF() {
+  if ( _binf.pidlRoot ) {
+    FreePIDL((ITEMIDLIST*)_binf.pidlRoot);
+    _binf.pidlRoot = NULL;
+  }
+  memset((void*)&_binf, 0, sizeof(_binf));
+}
+
+// CONVERT WINDOWS BACKSLASHES TO UNIX FRONTSLASHES
+void fltk3::NativeFileChooser::Win2Unix(char *s) {
+  for ( ; *s; s++ )
+    if ( *s == '\\' ) *s = '/';
+}
+
+// CONVERT UNIX FRONTSLASHES TO WINDOWS BACKSLASHES
+void fltk3::NativeFileChooser::Unix2Win(char *s) {
+  for ( ; *s; s++ )
+    if ( *s == '/' ) *s = '\\';
+}
+
+// SHOW FILE BROWSER
+int fltk3::NativeFileChooser::showfile() {
+  ClearOFN();
+  clear_pathnames();
+  size_t fsize = MAX_PATH;
+  _ofn.Flags |= OFN_NOVALIDATE;		// prevent disabling of front slashes
+  _ofn.Flags |= OFN_HIDEREADONLY;	// hide goofy readonly flag
+  // USE NEW BROWSER
+  _ofn.Flags |= OFN_EXPLORER;		// use newer explorer windows
+  _ofn.Flags |= OFN_ENABLESIZING;	// allow window to be resized (hey, why not?)
+
+  // XXX: The docs for OFN_NOCHANGEDIR says the flag is 'ineffective' on XP/2K/NT!
+  //      But let's set it anyway..
+  //
+  _ofn.Flags |= OFN_NOCHANGEDIR;	// prevent dialog for messing up the cwd
+
+  switch ( _btype ) {
+    case BROWSE_DIRECTORY:
+    case BROWSE_MULTI_DIRECTORY:
+    case BROWSE_SAVE_DIRECTORY:
+      abort();				// never happens: handled by showdir()
+    case BROWSE_FILE:
+      fsize = 65536;			// XXX: there must be a better way
+      break;
+    case BROWSE_MULTI_FILE:
+      _ofn.Flags |= OFN_ALLOWMULTISELECT;
+      fsize = 65536;			// XXX: there must be a better way
+      break;
+    case BROWSE_SAVE_FILE:
+      if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) {
+	  _ofn.Flags |= OFN_OVERWRITEPROMPT;
+      }
+      break;
+  }
+  // SPACE FOR RETURNED FILENAME
+  _ofn.lpstrFile    = new WCHAR[fsize];
+  _ofn.nMaxFile     = fsize-1;
+  _ofn.lpstrFile[0] = 0;
+  _ofn.lpstrFile[1] = 0;		// dnull
+  // PARENT WINDOW
+  _ofn.hwndOwner = GetForegroundWindow();
+  // DIALOG TITLE
+  if (_title) {
+    static WCHAR wtitle[200];
+    wcscpy(wtitle, utf8towchar(_title));
+    _ofn.lpstrTitle =  wtitle;
+  } else {
+    _ofn.lpstrTitle = NULL;
+  }
+  // FILTER
+  if (_parsedfilt != NULL) {	// to convert a null-containing char string into a widechar string
+    static WCHAR wpattern[MAX_PATH];
+    const char *p = _parsedfilt;
+    while(*(p + strlen(p) + 1) != 0) p += strlen(p) + 1;
+    p += strlen(p) + 2;
+    MultiByteToWideChar(CP_UTF8, 0, _parsedfilt, p - _parsedfilt, wpattern, MAX_PATH);
+    _ofn.lpstrFilter = wpattern;
+  } else {
+    _ofn.lpstrFilter = NULL;
+  }
+  // PRESET FILE
+  //     If set, supercedes _directory. See KB Q86920 for details
+  //
+  if ( _preset_file ) {
+    size_t len = strlen(_preset_file);
+    if ( len >= _ofn.nMaxFile ) {
+      char msg[80];
+      sprintf(msg, "preset_file() filename is too long: %ld is >=%ld", (long)len, (long)fsize);
+      return(-1);
+    }
+    wcscpy(_ofn.lpstrFile, utf8towchar(_preset_file));
+//  Unix2Win(_ofn.lpstrFile);
+    len = wcslen(_ofn.lpstrFile);
+    _ofn.lpstrFile[len+0] = 0;	// multiselect needs dnull
+    _ofn.lpstrFile[len+1] = 0;
+  }
+  if ( _directory ) {
+    // PRESET DIR
+    //     XXX: See KB Q86920 for doc bug:
+    //     http://support.microsoft.com/default.aspx?scid=kb;en-us;86920
+    //
+    _ofn.lpstrInitialDir    = new WCHAR[MAX_PATH];
+    wcscpy((WCHAR *)_ofn.lpstrInitialDir, utf8towchar(_directory));
+    // Unix2Win((char*)_ofn.lpstrInitialDir);
+  }
+  // SAVE THE CURRENT DIRECTORY
+  //     XXX: Save the cwd because GetOpenFileName() is probably going to
+  //     change it, in spite of the OFN_NOCHANGEDIR flag, due to its docs
+  //     saying the flag is 'ineffective'. %^(
+  //
+  char oldcwd[MAX_PATH];
+  GetCurrentDirectory(MAX_PATH, oldcwd);
+  oldcwd[MAX_PATH-1] = '\0';
+  // OPEN THE DIALOG WINDOW
+  int err;
+  if ( _btype == BROWSE_SAVE_FILE ) {
+    err = GetSaveFileNameW(&_ofn);
+  } else {
+    err = GetOpenFileNameW(&_ofn);
+  }
+  if ( err == 0 ) {
+    // EXTENDED ERROR CHECK
+    int err = CommDlgExtendedError();
+    // CANCEL?
+    if ( err == 0 ) return(1);	// user hit 'cancel'
+    // AN ERROR OCCURRED
+    char msg[80];
+    sprintf(msg, "CommDlgExtendedError() code=%d", err);
+    errmsg(msg);
+    // XXX: RESTORE CWD
+    if ( oldcwd[0] ) SetCurrentDirectory(oldcwd);
+    return(-1);
+  }
+  // XXX: RESTORE CWD
+  if ( oldcwd[0] ) {
+    SetCurrentDirectory(oldcwd);
+  }
+  // PREPARE PATHNAMES FOR RETURN
+  switch ( _btype ) {
+    case BROWSE_FILE: 
+    case BROWSE_SAVE_FILE:
+      set_single_pathname(wchartoutf8(_ofn.lpstrFile));
+      // Win2Unix(_pathnames[_tpathnames-1]);
+      break;
+    case BROWSE_MULTI_FILE: {
+      // EXTRACT MULTIPLE FILENAMES
+      const WCHAR *dirname = _ofn.lpstrFile;
+      int dirlen = wcslen(dirname);
+      if ( dirlen > 0 ) {
+	// WALK STRING SEARCHING FOR 'DOUBLE-NULL'
+	//     eg. "/dir/name\0foo1\0foo2\0foo3\0\0"
+	//
+	char pathname[MAX_PATH]; 
+	for ( const WCHAR *s = dirname + dirlen + 1; 
+		 *s; s+= (wcslen(s)+1)) {
+		strcpy(pathname, wchartoutf8(dirname));
+		strcat(pathname, "\\");
+		strcat(pathname, wchartoutf8(s));
+		add_pathname(pathname);
+	}
+      }
+      // XXX
+      //    Work around problem where pasted forward-slash pathname
+      //    into the file browser causes new "Explorer" interface
+      //    not to grok forward slashes, passing back as a 'filename'..!
+      //
+      if ( _tpathnames == 0 ) {
+	add_pathname(wchartoutf8(dirname)); 
+	// Win2Unix(_pathnames[_tpathnames-1]);
+      }
+      break;
+    }
+    case BROWSE_DIRECTORY:
+    case BROWSE_MULTI_DIRECTORY:
+    case BROWSE_SAVE_DIRECTORY:
+      abort();			// never happens: handled by showdir()
+  }
+  return(0);
+}
+
+// Used by SHBrowseForFolder(), sets initial selected dir.
+// Ref: Usenet: microsoft.public.vc.mfc, Dec 8 2000, 1:38p David Lowndes
+//              Subject: How to specify to select an initial folder .."
+//
+int CALLBACK fltk3::NativeFileChooser::Dir_CB(HWND win, UINT msg, LPARAM param, LPARAM data) {
+  switch (msg) {
+    case BFFM_INITIALIZED:
+      if (data) ::SendMessage(win, BFFM_SETSELECTION, TRUE, data);
+      break;
+    case BFFM_SELCHANGED:
+      TCHAR path[MAX_PATH];
+      if ( SHGetPathFromIDList((ITEMIDLIST*)param, path) ) {
+	::SendMessage(win, BFFM_ENABLEOK, 0, 1);
+      } else {
+	// disable ok button if not a path
+	::SendMessage(win, BFFM_ENABLEOK, 0, 0);
+      }
+      break;
+    case BFFM_VALIDATEFAILED:
+      // we could pop up an annoying message here. 
+      // also needs set ulFlags |= BIF_VALIDATE
+      break;
+    default:
+      break;
+  }
+  return(0);
+}
+
+// SHOW DIRECTORY BROWSER
+int fltk3::NativeFileChooser::showdir() {
+  // initialize OLE only once
+  fl_OleInitialize();		// init needed by BIF_USENEWUI
+  ClearBINF();
+  clear_pathnames();
+  // PARENT WINDOW
+  _binf.hwndOwner = GetForegroundWindow();
+  // DIALOG TITLE
+  _binf.lpszTitle = _title ? _title : NULL;
+  // FLAGS
+  _binf.ulFlags = 0; 		// initialize
+
+  // TBD: make sure matches to runtime system, if need be.
+  //(what if _WIN32_IE doesn't match system? does the program not run?)
+  //
+  // TBD: match all 3 types of directories
+  //
+  // NOTE: *Don't* use BIF_SHAREABLE. It /disables/ mapped network shares
+  //       from being visible in BROWSE_DIRECTORY mode. 
+  //       See Walter Garm's comments in ./TODO.
+
+#if defined(BIF_NONEWFOLDERBUTTON)				// Version 6.0
+  if ( _btype == BROWSE_DIRECTORY ) _binf.ulFlags |= BIF_NONEWFOLDERBUTTON;
+  _binf.ulFlags |= BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
+#elif defined(BIF_USENEWUI)					// Version 5.0
+  if ( _btype == BROWSE_DIRECTORY ) _binf.ulFlags |= BIF_EDITBOX;
+  else if ( _btype == BROWSE_SAVE_DIRECTORY ) _binf.ulFlags |= BIF_USENEWUI;
+  _binf.ulFlags |= BIF_RETURNONLYFSDIRS;
+#elif defined(BIF_EDITBOX)					// Version 4.71
+  _binf.ulFlags |= BIF_RETURNONLYFSDIRS | BIF_EDITBOX;
+#else								// Version Old
+  _binf.ulFlags |= BIF_RETURNONLYFSDIRS;
+#endif
+
+  // BUFFER
+  char displayname[MAX_PATH];
+  _binf.pszDisplayName = displayname;
+  // PRESET DIR
+  char presetname[MAX_PATH];
+  if ( _directory ) {
+    strcpy(presetname, _directory);
+    // Unix2Win(presetname);
+    _binf.lParam = (LPARAM)presetname;
+  }
+  else _binf.lParam = 0;
+  _binf.lpfn = Dir_CB;
+  // OPEN BROWSER
+  ITEMIDLIST *pidl = SHBrowseForFolder(&_binf);
+  // CANCEL?
+  if ( pidl == NULL ) return(1);
+
+  // GET THE PATHNAME(S) THE USER SELECTED
+  // TBD: expand NetHood shortcuts from this PIDL??
+  // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp
+
+  TCHAR path[MAX_PATH];
+  if ( SHGetPathFromIDList(pidl, path) ) {
+    // Win2Unix(path);
+    add_pathname(path);
+  }
+  FreePIDL(pidl);
+  if ( !strlen(path) ) return(1);             // don't return empty pathnames
+  return(0);
+}
+
+// RETURNS:
+//    0 - user picked a file
+//    1 - user cancelled
+//   -1 - failed; errmsg() has reason
+//
+int fltk3::NativeFileChooser::show() {
+  if ( _btype == BROWSE_DIRECTORY || 
+       _btype == BROWSE_MULTI_DIRECTORY || 
+       _btype == BROWSE_SAVE_DIRECTORY ) {
+    return(showdir());
+  } else {
+    return(showfile());
+  }
+}
+
+// RETURN ERROR MESSAGE
+const char *fltk3::NativeFileChooser::errmsg() const {
+  return(_errmsg ? _errmsg : "No error");
+}
+
+// GET FILENAME
+const char* fltk3::NativeFileChooser::filename() const {
+  if ( _pathnames && _tpathnames > 0 ) return(_pathnames[0]);
+  return("");
+}
+
+// GET FILENAME FROM LIST OF FILENAMES
+const char* fltk3::NativeFileChooser::filename(int i) const {
+  if ( _pathnames && i < _tpathnames ) return(_pathnames[i]);
+  return("");
+}
+
+// GET TOTAL FILENAMES CHOSEN
+int fltk3::NativeFileChooser::count() const {
+  return(_tpathnames);
+}
+
+// PRESET PATHNAME
+//     Can be NULL if no preset is desired.
+//
+void fltk3::NativeFileChooser::directory(const char *val) {
+  _directory = strfree(_directory);
+  _directory = strnew(val);
+}
+
+// GET PRESET PATHNAME
+//    Can return NULL if none set.
+//
+const char *fltk3::NativeFileChooser::directory() const {
+  return(_directory);
+}
+
+// SET TITLE
+//     Can be NULL if no title desired.
+//
+void fltk3::NativeFileChooser::title(const char *val) {
+  _title = strfree(_title);
+  _title = strnew(val);
+}
+
+// GET TITLE
+//    Can return NULL if none set.
+//
+const char *fltk3::NativeFileChooser::title() const {
+  return(_title);
+}
+
+// SET FILTER
+//     Can be NULL if no filter needed
+//
+void fltk3::NativeFileChooser::filter(const char *val) {
+  _filter = strfree(_filter);
+  clear_filters();
+  if ( val ) {
+    _filter = strnew(val);
+    parse_filter(_filter);
+  }
+  add_filter("All Files", "*.*");	// always include 'all files' option
+
+#ifdef DEBUG
+  nullprint(_parsedfilt);
+#endif /*DEBUG*/
+}
+
+// GET FILTER
+//    Can return NULL if none set.
+//
+const char *fltk3::NativeFileChooser::filter() const {
+  return(_filter);
+}
+
+// CLEAR FILTERS
+void fltk3::NativeFileChooser::clear_filters() {
+  _nfilters = 0;
+  _parsedfilt = strfree(_parsedfilt);
+}
+
+// ADD A FILTER
+void fltk3::NativeFileChooser::add_filter(const char *name_in,	// name of filter (optional: can be null)
+	                    const char *winfilter) {    	// windows style filter (eg. "*.cxx;*.h")
+  // No name? Make one..
+  char name[1024];
+  if ( !name_in || name_in[0] == '\0' ) {
+    sprintf(name, "%.*s Files", int(sizeof(name)-10), winfilter);
+  } else {
+    sprintf(name, "%.*s", int(sizeof(name)-10), name_in);
+  }
+  dnullcat(_parsedfilt, name);
+  dnullcat(_parsedfilt, winfilter);
+  _nfilters++;
+  //DEBUG printf("DEBUG: ADD FILTER name=<%s> winfilter=<%s>\n", name, winfilter);
+}
+
+// CONVERT FLTK STYLE PATTERN MATCHES TO WINDOWS 'DOUBLENULL' PATTERN
+//    Handles:
+//        IN              OUT
+//        -----------     -----------------------------
+//        *.{ma,mb}       "*.{ma,mb} Files\0*.ma;*.mb\0\0"
+//        *.[abc]         "*.[abc] Files\0*.a;*.b;*.c\0\0"
+//        *.txt           "*.txt Files\0*.txt\0\0"
+//        C Files\t*.[ch] "C Files\0*.c;*.h\0\0"
+//
+//    Example:
+//         IN: "*.{ma,mb}"
+//        OUT: "*.ma;*.mb Files\0*.ma;*.mb\0All Files\0*.*\0\0"
+//              ---------------  ---------  ---------  ---
+//                     |             |          |       |
+//                   Title       Wildcards    Title    Wildcards
+//
+// Parsing Mode:
+//         IN:"C Files\t*.{cxx,h}"
+//             |||||||  |||||||||
+//       mode: nnnnnnn  ww{{{{{{{
+//             \_____/  \_______/
+//              Name     Wildcard
+//
+void fltk3::NativeFileChooser::parse_filter(const char *in) {
+  clear_filters();
+  if ( ! in ) return;
+
+  int has_name = strchr(in, '\t') ? 1 : 0;
+
+  char mode = has_name ? 'n' : 'w';	// parse mode: n=name, w=wildcard
+  int nwildcards = 0;
+  char wildcards[MAXFILTERS][1024];	// parsed wildcards (can be several)
+  char wildprefix[512] = "";
+  char name[512] = "";
+
+  // Init
+  int t;
+  for ( t=0; t<MAXFILTERS; t++ ) {
+    wildcards[t][0] = '\0';
+  }
+
+  // Parse
+  for ( ; 1; in++ ) {
+
+    //// DEBUG
+    //// printf("WORKING ON '%c': mode=<%c> name=<%s> wildprefix=<%s> nwildcards=%d wildcards[n]=<%s>\n",
+    ////        *in, mode, name, wildprefix, nwildcards, wildcards[nwildcards]);
+
+    switch (*in) {
+      case ',':
+      case '|':
+	if ( mode == LCURLY_CHR ) {
+	  // create new wildcard, copy in prefix
+	  strcat(wildcards[nwildcards++], wildprefix);
+	  continue;
+	} else {
+	  goto regchar;
+	}
+	continue;
+
+      // FINISHED PARSING A NAME?
+      case '\t':
+	if ( mode != 'n' ) goto regchar;
+	// finish parsing name? switch to wildcard mode
+	mode = 'w';
+	break;
+
+      // ESCAPE NEXT CHAR
+      case '\\':
+	++in;
+	goto regchar;
+
+      // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS?
+      case '\r':
+      case '\n':
+      case '\0':
+      {
+	if ( mode == 'w' ) {		// finished parsing wildcard?
+	  if ( nwildcards == 0 ) {
+	    strcpy(wildcards[nwildcards++], wildprefix);
+	  }
+	  // Append wildcards in Microsoft's "*.one;*.two" format
+	  char comp[4096] = "";
+	  for ( t=0; t<nwildcards; t++ ) {
+	    if ( t != 0 ) strcat(comp, ";");
+	    strcat(comp, wildcards[t]);
+	  }
+	  // Add if not empty
+	  if ( comp[0] ) {
+	    add_filter(name, comp);
+	  }
+	}
+	// RESET
+	for ( t=0; t<MAXFILTERS; t++ ) {
+	  wildcards[t][0] = '\0';
+	}
+	nwildcards = 0;
+	wildprefix[0] = name[0] = '\0';
+	mode = strchr(in,'\t') ? 'n' : 'w';
+	// DONE?
+	if ( *in == '\0' ) return;	// done
+	continue;			// not done yet, more filters
+      }
+
+      // STARTING A WILDCARD?
+      case LBRACKET_CHR:
+      case LCURLY_CHR:
+	mode = *in;
+	if ( *in == LCURLY_CHR ) {
+	  // create new wildcard
+	  strcat(wildcards[nwildcards++], wildprefix);
+	}
+	continue;
+
+      // ENDING A WILDCARD?
+      case RBRACKET_CHR:
+      case RCURLY_CHR:
+	mode = 'w';	// back to wildcard mode
+	continue;
+
+      // ALL OTHER NON-SPECIAL CHARACTERS
+      default:
+      regchar:		// handle regular char
+	switch ( mode ) {
+	  case LBRACKET_CHR: 
+	    // create new wildcard
+	    ++nwildcards;
+	    // copy in prefix
+	    strcpy(wildcards[nwildcards-1], wildprefix);
+	    // append search char
+	    chrcat(wildcards[nwildcards-1], *in);
+	    continue;
+
+	  case LCURLY_CHR:
+	    if ( nwildcards > 0 ) {
+	      chrcat(wildcards[nwildcards-1], *in);
+	    }
+	    continue;
+
+	  case 'n':
+	    chrcat(name, *in);
+	    continue;
+
+	  case 'w':
+	    chrcat(wildprefix, *in);
+	    for ( t=0; t<nwildcards; t++ ) {
+	      chrcat(wildcards[t], *in);
+	    }
+	    continue;
+	}
+	break;
+    }
+  }
+}
+
+// SET 'CURRENTLY SELECTED FILTER'
+void fltk3::NativeFileChooser::filter_value(int i) {
+  _ofn.nFilterIndex = i + 1;
+}
+
+// RETURN VALUE OF 'CURRENTLY SELECTED FILTER'
+int fltk3::NativeFileChooser::filter_value() const {
+  return(_ofn.nFilterIndex ? _ofn.nFilterIndex-1 : _nfilters+1);
+}
+
+// PRESET FILENAME FOR 'SAVE AS' CHOOSER
+void fltk3::NativeFileChooser::preset_file(const char* val) {
+  _preset_file = strfree(_preset_file);
+  _preset_file = strnew(val);
+}
+
+// GET PRESET FILENAME FOR 'SAVE AS' CHOOSER
+const char* fltk3::NativeFileChooser::preset_file() const {
+  return(_preset_file);
+}
+
+int fltk3::NativeFileChooser::filters() const {
+  return(_nfilters);
+}
+
+char *wchartoutf8(LPCWSTR in)
+{
+  static char *out = NULL;
+  static int lchar = 0;
+  if (in == NULL)return NULL;
+  int utf8len  = WideCharToMultiByte(CP_UTF8, 0, in, -1, NULL, 0, NULL, NULL);
+  if (utf8len > lchar) {
+    lchar = utf8len;
+    out = (char *)realloc(out, lchar * sizeof(char));
+  }
+  WideCharToMultiByte(CP_UTF8, 0, in, -1, out, utf8len, NULL, NULL);
+  return out;
+}
+
+LPCWSTR utf8towchar(const char *in)
+{
+  static WCHAR *wout = NULL;
+  static int lwout = 0;
+  if (in == NULL)return NULL;
+  int wlen = MultiByteToWideChar(CP_UTF8, 0, in, -1, NULL, 0);
+  if (wlen > lwout) {
+    lwout = wlen;
+    wout = (WCHAR *)realloc(wout, lwout * sizeof(WCHAR));
+  }
+  MultiByteToWideChar(CP_UTF8, 0, in, -1, wout, wlen);
+  return wout;
+}
+
+#endif /*!FLTK3_DOXYGEN*/
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Native_File_Chooser_WIN32.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Native_File_Chooser_common.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Native_File_Chooser_common.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Native_File_Chooser_common.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,85 @@
+// "$Id$"
+//
+// FLTK native OS file chooser widget
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 2004 Greg Ercolano.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <string.h>
+#include <fltk3/enumerations.h>
+
+// COPY A STRING WITH 'new'
+//    Value can be NULL
+//
+static char *strnew(const char *val) {
+  if ( val == NULL ) return(NULL);
+  char *s = new char[strlen(val)+1];
+  strcpy(s, val);
+  return(s);
+}
+
+// FREE STRING CREATED WITH strnew(), NULLS OUT STRING
+//    Value can be NULL
+//
+static char *strfree(char *val) {
+  if ( val ) delete [] val;
+  return(NULL);
+}
+
+// 'DYNAMICALLY' APPEND ONE STRING TO ANOTHER
+//    Returns newly allocated string, or NULL 
+//    if s && val == NULL.
+//    's' can be NULL; returns a strnew(val).
+//    'val' can be NULL; s is returned unmodified.
+//
+//    Usage:
+//	char *s = strnew("foo");	// s = "foo"
+//      s = strapp(s, "bar");		// s = "foobar"
+//
+#if !defined(WIN32)
+static char *strapp(char *s, const char *val) {
+  if ( ! val ) {
+    return(s);			// Nothing to append? return s
+  }
+  if ( ! s ) {
+    return(strnew(val));	// New string? return copy of val
+  }
+  char *news = new char[strlen(s)+strlen(val)+1];
+  strcpy(news, s);
+  strcat(news, val);
+  delete [] s;			// delete old string
+  return(news);			// return new copy
+}
+#endif
+
+// APPEND A CHARACTER TO A STRING
+//     This does NOT allocate space for the new character.
+//
+static void chrcat(char *s, char c) {
+  char tmp[2] = { c, '\0' };
+  strcat(s, tmp);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Native_File_Chooser_common.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Overlay_Window.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Overlay_Window.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Overlay_Window.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,176 @@
+//
+// "$Id$"
+//
+// Overlay window code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/** \fn virtual void fltk3::OverlayWindow::draw_overlay() = 0
+  You must subclass fltk3::OverlayWindow and provide this method.
+  It is just like a draw() method, except it draws the overlay.
+  The overlay will have already been "cleared" when this is called.  You
+  can use any of the routines described in &lt;fltk3/draw.h&gt;.
+*/
+
+// A window using double-buffering and able to draw an overlay
+// on top of that.  Uses the hardware to draw the overlay if
+// possible, otherwise it just draws in the front buffer.
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/OverlayWindow.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+
+void fltk3::OverlayWindow::show() {
+  DoubleWindow::show();
+  if (overlay_ && overlay_ != this) overlay_->show();
+}
+
+void fltk3::OverlayWindow::hide() {
+  DoubleWindow::hide();
+}
+
+void fltk3::OverlayWindow::flush() {
+#ifdef BOXX_BUGS
+  if (overlay_ && overlay_ != this && overlay_->shown()) {
+    // all drawing to windows hidden by overlay windows is ignored, fix this
+    XUnmapWindow(fl_display, fl_xid(overlay_));
+    fltk3::DoubleWindow::flush(0);
+    XMapWindow(fl_display, fl_xid(overlay_));
+    return;
+  }
+#endif
+  int erase_overlay = (damage()&fltk3::DAMAGE_OVERLAY) | (overlay_ == this);
+  clear_damage((uchar)(damage()&~fltk3::DAMAGE_OVERLAY));
+  DoubleWindow::flush(erase_overlay);
+  if (overlay_ == this) draw_overlay();
+}
+
+void fltk3::OverlayWindow::resize(int X, int Y, int W, int H) {
+  DoubleWindow::resize(X,Y,W,H);
+  if (overlay_ && overlay_!=this) overlay_->resize(0,0,w(),h());
+}
+
+/**
+  Destroys the window and all child widgets.
+*/
+fltk3::OverlayWindow::~OverlayWindow() {
+  hide();
+//  delete overlay; this is done by ~Fl_Group
+}
+
+#if !HAVE_OVERLAY
+
+int fltk3::OverlayWindow::can_do_overlay() {return 0;}
+
+/**
+  Call this to indicate that the overlay data has changed and needs to
+  be redrawn.  The overlay will be clear until the first time this is
+  called, so if you want an initial display you must call this after
+  calling show().
+*/
+void fltk3::OverlayWindow::redraw_overlay() {
+  overlay_ = this;
+  clear_damage((uchar)(damage()|fltk3::DAMAGE_OVERLAY));
+  fltk3::damage(fltk3::DAMAGE_CHILD);
+}
+
+#else
+
+extern XVisualInfo *fl_find_overlay_visual();
+extern XVisualInfo *fl_overlay_visual;
+extern Colormap fl_overlay_colormap;
+extern unsigned long fl_transparent_pixel;
+static GC gc;	// the GC used by all X windows
+extern uchar fl_overlay; // changes how fltk3::color(x) works
+
+class _Fl_Overlay : public fltk3::Window {
+  friend class fltk3::OverlayWindow;
+  void flush();
+  void show();
+public:
+  _Fl_Overlay(int x, int y, int w, int h) :
+    fltk3::Window(x,y,w,h) {set_flag(INACTIVE);}
+};
+
+int fltk3::OverlayWindow::can_do_overlay() {
+  return fl_find_overlay_visual() != 0;
+}
+
+void _Fl_Overlay::show() {
+  if (shown()) {fltk3::Window::show(); return;}
+  fl_background_pixel = int(fl_transparent_pixel);
+  Fl_X::make_xid(this, fl_overlay_visual, fl_overlay_colormap);
+  fl_background_pixel = -1;
+  // find the outermost window to tell wm about the colormap:
+  fltk3::Window *w = window();
+  for (;;) {fltk3::Window *w1 = w->window(); if (!w1) break; w = w1;}
+  XSetWMColormapWindows(fl_display, fl_xid(w), &(Fl_X::i(this)->xid), 1);
+}
+
+void _Fl_Overlay::flush() {
+  fl_window = fl_xid(this);
+  if (!gc) {
+	  gc = XCreateGC(fl_display, fl_xid(this), 0, 0);
+  }
+  fl_gc = gc;
+#if defined(FLTK_USE_CAIRO)
+      if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+#endif
+  fl_overlay = 1;
+  fltk3::OverlayWindow *w = (fltk3::OverlayWindow *)parent();
+  Fl_X *myi = Fl_X::i(this);
+  if (damage() != fltk3::DAMAGE_EXPOSE) XClearWindow(fl_display, fl_xid(this));
+  fltk3::clip_region(myi->region); myi->region = 0;
+  w->draw_overlay();
+  fl_overlay = 0;
+}
+
+void fltk3::OverlayWindow::redraw_overlay() {
+  if (!fl_display) return; // this prevents fluid -c from opening display
+  if (!overlay_) {
+    if (can_do_overlay()) {
+      fltk3::Group::current(this);
+      overlay_ = new _Fl_Overlay(0,0,w(),h());
+      fltk3::Group::current(0);
+    } else {
+      overlay_ = this;	// fake the overlay
+    }
+  }
+  if (shown()) {
+    if (overlay_ == this) {
+      clear_damage(damage()|fltk3::DAMAGE_OVERLAY);
+      fltk3::damage(fltk3::DAMAGE_CHILD);
+    } else if (!overlay_->shown())
+      overlay_->show();
+    else
+      overlay_->redraw();
+  }
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Overlay_Window.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_PNG_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_PNG_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_PNG_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,233 @@
+//
+// "$Id$"
+//
+// fltk3::PNGImage routines.
+//
+// Copyright 1997-2011 by Easy Software Products.
+// Image support by Matthias Melcher, Copyright 2000-2009.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+
+//
+//   fltk3::PNGImage::fltk3::PNGImage() - Load a PNG image file.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/run.h>
+#include <fltk3/PNGImage.h>
+#include <fltk3/SharedImage.h>
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+
+#if defined(HAVE_LIBPNG) && defined(HAVE_LIBZ)
+extern "C"
+{
+#  include <zlib.h>
+#  ifdef HAVE_PNG_H
+#    include <png.h>
+#  else
+#    include <libpng/png.h>
+#  endif // HAVE_PNG_H
+}
+
+typedef struct  {
+  png_structp pp;
+  const unsigned char *current;
+  const unsigned char *last;
+} fl_png_memory;
+
+static void png_read_data_from_mem( png_structp png_ptr, //pointer to our data
+				   png_bytep data,  // where to copy the image data for libpng computing
+				   png_size_t length) // length of data to copy
+{
+  fl_png_memory *png_mem_data = (fl_png_memory*)png_get_io_ptr(png_ptr); // get the pointer to our struct
+  if (png_mem_data->current + length > png_mem_data->last) {
+    png_error(png_mem_data->pp, "Invalid attempt to read row data");
+    return;
+  }
+  /* copy data from image buffer */
+  memcpy (data, png_mem_data->current, length);
+  /* advance in the memory data */
+  png_mem_data->current += length;
+}
+#endif // HAVE_LIBPNG && HAVE_LIBZ
+
+
+/**
+  The constructor loads the named PNG image from the given png filename.
+
+  The destructor frees all memory and server resources that are used by
+  the image.
+
+  \param[in] filename	Name of PNG file to read
+*/
+fltk3::PNGImage::PNGImage (const char *filename): fltk3::RGBImage(0,0,0)
+{
+  load_png_(filename, NULL, 0);
+}
+
+/** 
+ \brief Constructor that reads a PNG image from memory.
+
+ Construct an image from a block of memory inside the application. Fluid offers
+ "binary Data" chunks as a great way to add image data into the C++ source code.
+ name_png can be NULL. If a name is given, the image is added to the list of 
+ shared images (see: fltk3::SharedImage) and will be available by that name.
+ 
+ \param name_png  A name given to this image or NULL
+ \param buffer	  Pointer to the start of the PNG image in memory
+ \param maxsize   Size in bytes of the memory buffer containing the PNG image
+ */
+fltk3::PNGImage::PNGImage (
+      const char *name_png, const unsigned char *buffer, int maxsize): fltk3::RGBImage(0,0,0)
+{
+  load_png_(name_png, buffer, maxsize);
+}
+
+void fltk3::PNGImage::load_png_(const char *name_png, const unsigned char *buffer_png, int maxsize)
+{
+#if defined(HAVE_LIBPNG) && defined(HAVE_LIBZ)
+  int i;	  // Looping var
+  FILE *fp = NULL;	  // File pointer
+  int channels;	  // Number of color channels
+  png_structp pp; // PNG read pointer
+  png_infop info; // PNG info pointers
+  png_bytep *rows;// PNG row pointers
+  fl_png_memory png_mem_data;
+  int from_memory = (buffer_png != NULL); // true if reading image from memory
+
+  if (!from_memory) {
+    if ((fp = fltk3::fopen(name_png, "rb")) == NULL) return;
+  }
+  else name_png = "In-memory PNG data";
+
+  // Setup the PNG data structures...
+  pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+  if (pp) info = png_create_info_struct(pp);
+  if (!pp || !info) {
+    if (pp) png_destroy_read_struct(&pp, NULL, NULL);
+    if (!from_memory) fclose(fp);
+    fltk3::warning("Cannot allocate memory to read PNG file or data \"%s\".\n", name_png);
+    return;
+  }
+  
+  if (setjmp(png_jmpbuf(pp)))
+  {
+    png_destroy_read_struct(&pp, &info, NULL);
+    if (!from_memory) fclose(fp);
+    fltk3::warning("PNG file or data \"%s\" contains errors!\n", name_png);
+    return;
+  }
+
+  if (from_memory) {
+    png_mem_data.current = buffer_png;
+    png_mem_data.last = buffer_png + maxsize;
+    png_mem_data.pp = pp;
+    // Initialize the function pointer to the PNG read "engine"...
+    png_set_read_fn (pp, (png_voidp) &png_mem_data, png_read_data_from_mem);
+  } else {
+    png_init_io(pp, fp); // Initialize the PNG file read "engine"...
+  }  
+
+  // Get the image dimensions and convert to grayscale or RGB...
+  png_read_info(pp, info);
+
+  if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE)
+    png_set_expand(pp);
+
+  if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
+    channels = 3;
+  else
+    channels = 1;
+
+  int num_trans = 0;
+  png_get_tRNS(pp, info, 0, &num_trans, 0);
+  if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || (num_trans != 0))
+    channels ++;
+
+  w((int)(png_get_image_width(pp, info)));
+  h((int)(png_get_image_height(pp, info)));
+  d(channels);
+
+  if (png_get_bit_depth(pp, info) < 8)
+  {
+    png_set_packing(pp);
+    png_set_expand(pp);
+  }
+  else if (png_get_bit_depth(pp, info) == 16)
+    png_set_strip_16(pp);
+
+#  if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)
+  // Handle transparency...
+  if (png_get_valid(pp, info, PNG_INFO_tRNS))
+    png_set_tRNS_to_alpha(pp);
+#  endif // HAVE_PNG_GET_VALID && HAVE_PNG_SET_TRNS_TO_ALPHA
+
+  array = new uchar[w() * h() * d()];
+  alloc_array = 1;
+
+  // Allocate pointers...
+  rows = new png_bytep[h()];
+
+  for (i = 0; i < h(); i ++)
+    rows[i] = (png_bytep)(array + i * w() * d());
+
+  // Read the image, handling interlacing as needed...
+  for (i = png_set_interlace_handling(pp); i > 0; i --)
+    png_read_rows(pp, rows, NULL, h());
+
+#ifdef WIN32
+  // Some Windows graphics drivers don't honor transparency when RGB == white
+  if (channels == 4) {
+    // Convert RGB to 0 when alpha == 0...
+    uchar *ptr = (uchar *)array;
+    for (i = w() * h(); i > 0; i --, ptr += 4)
+      if (!ptr[3]) ptr[0] = ptr[1] = ptr[2] = 0;
+  }
+#endif // WIN32
+
+  // Free memory and return...
+  delete[] rows;
+
+  png_read_end(pp, info);
+  png_destroy_read_struct(&pp, &info, NULL);
+
+  if (from_memory) {
+    if (w() && h() && name_png) {
+      fltk3::SharedImage *si = new fltk3::SharedImage(name_png, this);
+      si->add();
+    }
+  } else {
+    fclose(fp);
+  }
+#endif // HAVE_LIBPNG && HAVE_LIBZ
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_PNG_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_PNM_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_PNM_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_PNM_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,197 @@
+//
+// "$Id$"
+//
+// fltk3::PNMImage routines.
+//
+// Copyright 1997-2010 by Easy Software Products.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+
+//
+//   fltk3::PNMImage::fltk3::PNMImage() - Load a PNM image...
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/run.h>
+#include <fltk3/PNMImage.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+
+
+//
+// 'fltk3::PNMImage::fltk3::PNMImage()' - Load a PNM image...
+//
+
+/** 
+  The constructor loads the named PNM image. 
+  <P>The inherited destructor free all memory and server resources that are used by the image.
+*/
+
+fltk3::PNMImage::PNMImage(const char *name)	// I - File to read
+  : fltk3::RGBImage(0,0,0) {
+  FILE		*fp;		// File pointer
+  int		x, y;		// Looping vars
+  char		line[1024],	// Input line
+		*lineptr;	// Pointer in line
+  uchar		*ptr,		// Pointer to pixel values
+		byte,		// Byte from file
+		bit;		// Bit in pixel
+  int		format,		// Format of PNM file
+		val,		// Pixel value
+		maxval;		// Maximum pixel value
+
+
+  if ((fp = fltk3::fopen(name, "rb")) == NULL) return;
+
+  //
+  // Read the file header in the format:
+  //
+  //   Pformat
+  //   # comment1
+  //   # comment2
+  //   ...
+  //   # commentN
+  //   width
+  //   height
+  //   max sample
+  //
+
+  lineptr = fgets(line, sizeof(line), fp);
+  if (!lineptr) {
+    fclose(fp);
+    fltk3::error("Early end-of-file in PNM file \"%s\"!", name);
+    return;
+  }
+
+  lineptr ++;
+
+  format = atoi(lineptr);
+  while (isdigit(*lineptr)) lineptr ++;
+
+  if (format == 7) lineptr = (char *)"";
+
+  while (lineptr != NULL && w() == 0) {
+    if (*lineptr == '\0' || *lineptr == '#') {
+      lineptr = fgets(line, sizeof(line), fp);
+    } else if (isdigit(*lineptr)) {
+      w(strtol(lineptr, &lineptr, 10));
+    } else lineptr ++;
+  }
+
+  while (lineptr != NULL && h() == 0) {
+    if (*lineptr == '\0' || *lineptr == '#') {
+      lineptr = fgets(line, sizeof(line), fp);
+    } else if (isdigit(*lineptr)) {
+      h(strtol(lineptr, &lineptr, 10));
+    } else lineptr ++;
+  }
+
+  if (format != 1 && format != 4) {
+    maxval = 0;
+
+    while (lineptr != NULL && maxval == 0) {
+      if (*lineptr == '\0' || *lineptr == '#') {
+	lineptr = fgets(line, sizeof(line), fp);
+      } else if (isdigit(*lineptr)) {
+	maxval = strtol(lineptr, &lineptr, 10);
+      } else lineptr ++;
+    }
+  } else maxval = 1;
+
+  // Allocate memory...
+  if (format == 1 || format == 2 || format == 4 || format == 5) d(1);
+  else d(3);
+
+//  printf("%s = %dx%dx%d\n", name, w(), h(), d());
+
+  array       = new uchar[w() * h() * d()];
+  alloc_array = 1;
+
+  // Read the image file...
+  for (y = 0; y < h(); y ++) {
+    ptr = (uchar *)array + y * w() * d();
+
+    switch (format) {
+      case 1 :
+      case 2 :
+          for (x = w(); x > 0; x --)
+            if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
+          break;
+
+      case 3 :
+          for (x = w(); x > 0; x --) {
+            if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
+            if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
+            if (fscanf(fp, "%d", &val) == 1) *ptr++ = (uchar)(255 * val / maxval);
+          }
+          break;
+
+      case 4 :
+          for (x = w(), byte = (uchar)getc(fp), bit = 128; x > 0; x --) {
+	    if (byte & bit) *ptr++ = 255;
+	    else *ptr++ = 0;
+
+            if (bit > 1) bit >>= 1;
+            else {
+              bit  = 128;
+              byte = (uchar)getc(fp);
+            }
+          }
+          break;
+          
+      case 5 :
+      case 6 :
+        if (maxval < 256) {
+          if (fread(ptr, w(), d(), fp)) { /* ignored */ }
+        } else {
+          for (x = d() * w(); x > 0; x --) {
+            val = (uchar)getc(fp);
+            val = (val<<8)|(uchar)getc(fp);
+            *ptr++ = (255*val)/maxval;
+          }
+        }
+        break;
+        
+      case 7 : /* XV 3:3:2 thumbnail format */
+        for (x = w(); x > 0; x --) {
+          byte = (uchar)getc(fp);
+          
+          *ptr++ = (uchar)(255 * ((byte >> 5) & 7) / 7);
+          *ptr++ = (uchar)(255 * ((byte >> 2) & 7) / 7);
+          *ptr++ = (uchar)(255 * (byte & 3) / 3);
+        }
+        break;
+    }
+  }
+
+  fclose(fp);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_PNM_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Pack.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Pack.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Pack.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,186 @@
+//
+// "$Id$"
+//
+// Packing widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Based on code by Curtis Edwards
+// Group that compresses all it's children together and resizes to surround
+// them on each redraw (only if box() is zero)
+// Bugs: ?
+
+#include <fltk3/run.h>
+#include <fltk3/PackedGroup.h>
+#include <fltk3/draw.h>
+
+/**
+  Creates a new fltk3::PackedGroup widget using the given position, size,
+  and label string. The default boxtype is fltk3::NO_BOX.
+  <P>The destructor <I>also deletes all the children</I>. This allows a
+  whole tree to be deleted at once, without having to keep a pointer to
+  all the children in the user code. A kludge has been done so the 
+  fltk3::PackedGroup and all of it's children can be automatic (local)
+  variables, but you must declare the fltk3::PackedGroup<I>first</I>, so
+  that it is destroyed last.
+*/
+fltk3::PackedGroup::PackedGroup(int X, int Y, int W, int H,const char *l)
+: fltk3::Group(X, Y, W, H, l) {
+  resizable(0);
+  spacing_ = 0;
+  // type(VERTICAL); // already set like this
+}
+
+// calculate the height and width of this widget.
+// FIXME: do not move any children. "draw()" does that for now.
+void fltk3::PackedGroup::layout() {
+  //int tx = x()+fltk3::box_dx(box());
+  //int ty = y()+fltk3::box_dy(box());
+  int tw = w()-fltk3::box_dw(box());
+  int th = h()-fltk3::box_dh(box());
+  int rw, rh;
+  if (horizontal()) {
+    rw = -spacing_;
+    rh = th;    
+    for (int i = children(); i--;)
+      if (child(i)->visible()) {
+        if (child(i) != this->resizable()) rw += child(i)->w();
+        rw += spacing_;
+      }
+  } else {
+    rw = tw;
+    rh = -spacing_;    
+    for (int i = children(); i--;)
+      if (child(i)->visible()) {
+        if (child(i) != this->resizable()) rh += child(i)->h();
+        rh += spacing_;
+      }
+  }
+  size(rw+fltk3::box_dw(box()), rh+fltk3::box_dh(box()));
+}
+
+void fltk3::PackedGroup::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int tx = x()+fltk3::box_dx(box());
+  int ty = y()+fltk3::box_dy(box());
+  int tw = w()-fltk3::box_dw(box());
+  int th = h()-fltk3::box_dh(box());
+  int rw, rh;
+  int current_position = horizontal() ? tx : ty;
+  int maximum_position = current_position;
+  uchar d = damage();
+  fltk3::Widget*const* a = array();
+  if (horizontal()) {
+    rw = -spacing_;
+    rh = th;
+    
+    for (int i = children(); i--;)
+      if (child(i)->visible()) {
+        if (child(i) != this->resizable()) rw += child(i)->w();
+        rw += spacing_;
+      }
+  } else {
+    rw = tw;
+    rh = -spacing_;
+    
+    for (int i = children(); i--;)
+      if (child(i)->visible()) {
+        if (child(i) != this->resizable()) rh += child(i)->h();
+        rh += spacing_;
+      }
+  }
+  for (int i = children(); i--;) {
+    fltk3::Widget* o = *a++;
+    if (o->visible()) {
+      int X,Y,W,H;
+      if (horizontal()) {
+        X = current_position;
+        W = o->w();
+        Y = ty;
+        H = th;
+      } else {
+        X = tx;
+        W = tw;
+        Y = current_position;
+        H = o->h();
+      }
+      // Last child, if resizable, takes all remaining room
+      if(i == 0 && o == this->resizable()) {
+        if(horizontal())
+          W = tw - rw;
+        else
+          H = th - rh;
+      }
+      if (spacing_ && current_position>maximum_position && box() &&
+        (X != o->x() || Y != o->y() || d&fltk3::DAMAGE_ALL)) {
+        fltk3::color(color());
+        if (horizontal())
+          fltk3::rectf(maximum_position, ty, spacing_, th);
+        else
+          fltk3::rectf(tx, maximum_position, tw, spacing_);
+      }
+      if (X != o->x() || Y != o->y() || W != o->w() || H != o->h()) {
+        o->resize(X,Y,W,H);
+        o->clear_damage(fltk3::DAMAGE_ALL);
+      }
+      if (d&fltk3::DAMAGE_ALL) {
+        draw_child(*o);
+        draw_outside_label(*o);
+      } else update_child(*o);
+      // child's draw() can change it's size, so use new size:
+      current_position += (horizontal() ? o->w() : o->h());
+      if (current_position > maximum_position)
+        maximum_position = current_position;
+      current_position += spacing_;
+    }
+  }
+  
+  if (horizontal()) {
+    if (maximum_position < tx+tw && box()) {
+      fltk3::color(color());
+      fltk3::rectf(maximum_position, ty, tx+tw-maximum_position, th);
+    }
+    tw = maximum_position-tx;
+  } else {
+    if (maximum_position < ty+th && box()) {
+      fltk3::color(color());
+      fltk3::rectf(tx, maximum_position, tw, ty+th-maximum_position);
+    }
+    th = maximum_position-ty;
+  }
+  
+  tw += fltk3::box_dw(box()); if (tw <= 0) tw = 1;
+  th += fltk3::box_dh(box()); if (th <= 0) th = 1;
+  if (tw != w() || th != h()) {
+    Widget::resize(x(),y(),tw,th);
+    d = fltk3::DAMAGE_ALL;
+  }
+  if (d&fltk3::DAMAGE_ALL) {
+    draw_box();
+    draw_label();
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Pack.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Paged_Device.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Paged_Device.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Paged_Device.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,297 @@
+//
+// "$Id$"
+//
+// implementation of fltk3::PagedDevice class for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+/** \file Fl_Paged_Device.cxx
+ \brief implementation of class fltk3::PagedDevice.
+ */
+
+#include <fltk3/PagedDevice.h>
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+const char *fltk3::PagedDevice::class_id = "fltk3::PagedDevice";
+
+
+/**
+ @brief Draws the widget on the printed page.
+ *
+ The widget's position on the printed page is determined by the last call to origin()
+ and by the optional delta_x and delta_y arguments.
+ Its dimensions are in points unless there was a previous call to scale().
+ @param[in] widget Any FLTK widget (e.g., standard, custom, window).
+ @param[in] delta_x Optional horizontal offset for positioning the widget relatively
+ to the current origin of graphics functions.
+ @param[in] delta_y Same as above, vertically.
+ */
+void fltk3::PagedDevice::print_widget(fltk3::Widget* widget, int delta_x, int delta_y) 
+{ 
+  int old_x, old_y, new_x, new_y, is_window;
+  if ( ! widget->visible() ) return;
+  is_window = (widget->as_window() != NULL);
+  widget->damage(fltk3::DAMAGE_ALL);
+  // set origin to the desired top-left position of the widget
+  origin(&old_x, &old_y);
+  new_x = old_x + delta_x;
+  new_y = old_y + delta_y;
+  if (!is_window) {
+    new_x -= widget->x();
+    new_y -= widget->y();
+  }
+  if (new_x != old_x || new_y != old_y) {
+    translate(new_x - old_x, new_y - old_y );
+  }
+  // if widget is a window, clip all drawings to the window area
+  if (is_window) fltk3::push_clip(0, 0, widget->w(), widget->h() );
+  // we do some trickery to recognize OpenGL windows and draw them via a plugin
+  int drawn_by_plugin = 0;
+  if (widget->as_gl_window()) {
+    fltk3::PluginManager pm("fltk:device");  
+    fltk3::DevicePlugin *pi = (fltk3::DevicePlugin*)pm.plugin("opengl.device.fltk.org");
+    if (pi) {
+      int width, height;
+      this->printable_rect(&width, &height);
+      drawn_by_plugin = pi->print(widget, 0, 0, height);
+    }
+  }
+  if (!drawn_by_plugin) {
+    widget->draw();
+  }
+  if (is_window) fltk3::pop_clip();
+  // find subwindows of widget and print them
+  traverse(widget);
+  // reset origin to where it was
+  if (new_x != old_x || new_y != old_y) {
+    untranslate();
+  }
+}
+
+
+void fltk3::PagedDevice::traverse(fltk3::Widget *widget)
+{
+  fltk3::Group *g = widget->as_group();
+  if (!g) return;
+  int n = g->children();
+  for (int i = 0; i < n; i++) {
+    fltk3::Widget *c = g->child(i);
+    if ( !c->visible() ) continue;
+    if ( c->as_window() ) {
+      print_widget(c, c->x(), c->y());
+    }
+    else traverse(c);
+  }
+}
+
+/**
+ @brief Computes the page coordinates of the current origin of graphics functions.
+ *
+ @param[out] x If non-null, *x is set to the horizontal page offset of graphics origin.
+ @param[out] y Same as above, vertically.
+ */
+void fltk3::PagedDevice::origin(int *x, int *y)
+{
+  if (x) *x = x_offset;
+  if (y) *y = y_offset;
+}
+
+/**
+ @brief Prints a rectangular part of an on-screen window.
+
+ @param win The window from where to capture.
+ @param x The rectangle left
+ @param y The rectangle top
+ @param w The rectangle width
+ @param h The rectangle height
+ @param delta_x Optional horizontal offset from current graphics origin where to print the captured rectangle.
+ @param delta_y As above, vertically.
+ */
+void fltk3::PagedDevice::print_window_part(fltk3::Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
+{
+  fltk3::SurfaceDevice *current = fltk3::SurfaceDevice::surface();
+  fltk3::DisplayDevice::display_device()->set_current();
+  fltk3::Window *save_front = fltk3::first_window();
+  win->show();
+  fl_gc = NULL;
+  fltk3::check();
+  win->make_current();
+  uchar *image_data;
+  image_data = fltk3::read_image(NULL, x, y, w, h);
+  if (save_front != win) save_front->show();
+  current->set_current();
+  fltk3::draw_image(image_data, delta_x, delta_y, w, h, 3);
+  delete[] image_data;
+#ifdef WIN32
+  fl_gc = GetDC(fl_xid(win));
+  ReleaseDC(fl_xid(win), fl_gc);
+#endif
+}
+
+/**
+ @brief Starts a print job.
+
+ @param[in] pagecount the total number of pages of the job
+ @param[out] frompage if non-null, *frompage is set to the first page the user wants printed
+ @param[out] topage if non-null, *topage is set to the last page the user wants printed
+ @return 0 if OK, non-zero if any error
+ */
+int fltk3::PagedDevice::start_job(int pagecount, int *frompage, int *topage) {return 1;}
+
+/**
+ @brief Starts a new printed page
+
+ The page coordinates are initially in points, i.e., 1/72 inch, 
+ and with origin at the top left of the printable page area.
+ @return 0 if OK, non-zero if any error
+ */
+int fltk3::PagedDevice::start_page (void) {return 1;}
+
+/**
+ @brief Computes the width and height of the printable area of the page.
+
+ Values are in the same unit as that used by FLTK drawing functions,
+ are unchanged by calls to origin(), but are changed by scale() calls.
+ Values account for the user-selected paper type and print orientation.
+ @return 0 if OK, non-zero if any error
+ */
+int fltk3::PagedDevice::printable_rect(int *w, int *h) {return 1;}
+
+/**
+ @brief Computes the dimensions of margins that lie between the printable page area and
+ the full page.
+
+ Values are in the same unit as that used by FLTK drawing functions. They are changed
+ by scale() calls.
+ @param[out] left If non-null, *left is set to the left margin size.
+ @param[out] top If non-null, *top is set to the top margin size.
+ @param[out] right If non-null, *right is set to the right margin size.
+ @param[out] bottom If non-null, *bottom is set to the bottom margin size.
+ */
+void fltk3::PagedDevice::margins(int *left, int *top, int *right, int *bottom) {}
+
+/**
+ @brief Sets the position in page coordinates of the origin of graphics functions.
+
+ Arguments should be expressed relatively to the result of a previous printable_rect() call.
+ That is, <tt>printable_rect(&w, &h); origin(w/2, 0);</tt> sets the graphics origin at the
+ top center of the page printable area.
+ Origin() calls are not affected by rotate() calls.
+ Successive origin() calls don't combine their effects.
+ @param[in] x Horizontal position in page coordinates of the desired origin of graphics functions.
+ @param[in] y Same as above, vertically.
+ */
+void fltk3::PagedDevice::origin(int x, int y) {}
+
+/**
+ @brief Changes the scaling of page coordinates.
+
+ This function also resets the origin of graphics functions at top left of printable page area.
+ After a scale() call, do a printable_rect() call to get the new dimensions of the printable page area.
+ Successive scale() calls don't combine their effects.
+ @param scale_x Horizontal dimensions of plot are multiplied by this quantity.
+ @param scale_y Same as above, vertically. 
+  The value 0. is equivalent to setting \p scale_y = \p scale_x. Thus, scale(factor);
+  is equivalent to scale(factor, factor);
+ */
+void fltk3::PagedDevice::scale (float scale_x, float scale_y) {}
+
+/**
+ @brief Rotates the graphics operations relatively to paper.
+
+ The rotation is centered on the current graphics origin. 
+ Successive rotate() calls don't combine their effects.
+ @param angle Rotation angle in counter-clockwise degrees.
+ */
+void fltk3::PagedDevice::rotate(float angle) {}
+
+/**
+ @brief To be called at the end of each page.
+
+ @return 0 if OK, non-zero if any error.
+ */
+int fltk3::PagedDevice::end_page (void) {return 1;}
+
+/**
+ @brief To be called at the end of a print job.
+ */
+void fltk3::PagedDevice::end_job (void) {}
+
+/**
+ @brief Translates the current graphics origin accounting for the current rotation.
+
+ This function is only useful after a rotate() call. 
+ Each translate() call must be matched by an untranslate() call.
+ Successive translate() calls add up their effects.
+ */
+void fltk3::PagedDevice::translate(int x, int y) {}
+
+/**
+ @brief Undoes the effect of a previous translate() call.
+ */
+void fltk3::PagedDevice::untranslate(void) {}
+
+const fltk3::PagedDevice::page_format fltk3::PagedDevice::page_formats[NO_PAGE_FORMATS] = { 
+  // order of enum Page_Format
+  // comes from appendix B of 5003.PPD_Spec_v4.3.pdf
+  
+  // A* // index(Ai) = i
+  {2384, 3370, "A0"},
+  {1684, 2384, "A1"},
+  {1191, 1684, "A2"},
+  { 842, 1191, "A3"},
+  { 595,  842, "A4"},
+  { 420,  595, "A5"},
+  { 297,  420, "A6"},
+  { 210,  297, "A7"},
+  { 148,  210, "A8"},
+  { 105,  148, "A9"},
+  
+  // B* // index(Bi) = i+10
+  {2920, 4127, "B0"},
+  {2064, 2920, "B1"},
+  {1460, 2064, "B2"},
+  {1032, 1460, "B3"},
+  { 729, 1032, "B4"},
+  { 516,  729, "B5"},
+  { 363,  516, "B6"},
+  { 258,  363, "B7"},
+  { 181,  258, "B8"},
+  { 127,  181, "B9"},
+  {  91,  127, "B10"},
+  
+  // others
+  { 459,  649, "EnvC5"}, // envelope
+  { 312,  624, "EnvDL"}, // envelope
+  { 522,  756, "Executive"},
+  { 595,  935, "Folio"},
+  {1224,  792, "Ledger"}, // landscape
+  { 612, 1008, "Legal"},
+  { 612,  792, "Letter"},
+  { 792, 1224, "Tabloid"},
+  { 297,  684, "Env10"} // envelope
+};
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Paged_Device.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Pixmap.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Pixmap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Pixmap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,565 @@
+//
+// "$Id$"
+//
+// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/** \fn fltk3::Pixmap::fltk3::Pixmap(const char **data)
+  The constructors create a new pixmap from the specified XPM data.*/
+
+/** \fn fltk3::Pixmap::fltk3::Pixmap(const unsigned char * const *data)
+  The constructors create a new pixmap from the specified XPM data.*/
+
+/** \fn fltk3::Pixmap::fltk3::Pixmap(const unsigned char **data)
+  The constructors create a new pixmap from the specified XPM data.*/
+
+// Draws X pixmap data, keeping it stashed in a server pixmap so it
+// redraws fast.
+
+// See fltk3::draw_pixmap.cxx for code used to get the actual data into pixmap.
+// Implemented without using the xpm library (which I can't use because
+// it interferes with the color cube used by fltk3::draw_image).
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include <fltk3/Widget.h>
+#include <fltk3/MenuItem.h>
+#include <fltk3/Pixmap.h>
+#include <fltk3/Printer.h>
+
+#include <stdio.h>
+#include "flstring.h"
+#include <ctype.h>
+
+#ifdef WIN32
+extern void fl_release_dc(HWND, HDC);      // located in Fl_win32.cxx
+#endif
+
+#ifdef __APPLE_QUARTZ__
+extern fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h);
+#endif
+
+extern uchar **fl_mask_bitmap; // used by fltk3::draw_pixmap.cxx to store mask
+
+namespace fltk3 {
+  void restore_clip(); // in fltk3::rect.cxx
+}
+
+void fltk3::Pixmap::measure() {
+  int W, H;
+
+  // ignore empty or bad pixmap data:
+  if (w()<0 && data()) {
+    fltk3::measure_pixmap(data(), W, H);
+    w(W); h(H);
+  }
+}
+
+void fltk3::Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
+  fltk3::graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
+}
+
+static int start(fltk3::Pixmap *pxm, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy, 
+		 int &X, int &Y, int &W, int &H)
+{
+  // ignore empty or bad pixmap data:
+  if (!pxm->data()) {
+    return 2;
+  }
+  if (WP == -1) {
+    WP = w;
+    HP = h;
+  }
+  if (!w) {
+    return 2;
+  }
+  // account for current clip region (faster on Irix):
+  fltk3::clip_box(XP,YP,WP,HP,X,Y,W,H);
+  cx += X-XP; cy += Y-YP;
+  // clip the box down to the size of image, quit if empty:
+  if (cx < 0) {W += cx; X -= cx; cx = 0;}
+  if (cx+W > w) W = w-cx;
+  if (W <= 0) return 1;
+  if (cy < 0) {H += cy; Y -= cy; cy = 0;}
+  if (cy+H > h) H = h-cy;
+  if (H <= 0) return 1;
+  return 0;
+}
+
+#ifdef __APPLE__
+void fltk3::QuartzGraphicsDriver::draw(fltk3::Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  if (pxm->w() < 0) pxm->measure();
+  int code = start(pxm, XP, YP, WP, HP, pxm->w(), pxm->h(), cx, cy, X, Y, W, H);
+  if (code) {
+    if (code == 2) pxm->draw_empty(XP, YP);
+    return;
+    }
+  if (!pxm->id_) {
+    pxm->id_ = fl_create_offscreen_with_alpha(pxm->w(), pxm->h());
+    fl_begin_offscreen((fltk3::Offscreen)pxm->id_);
+    fltk3::draw_pixmap(pxm->data(), 0, 0, fltk3::GREEN);
+    fl_end_offscreen();
+    }
+  fl_copy_offscreen(X, Y, W, H, (fltk3::Offscreen)pxm->id_, cx, cy);
+}
+
+#elif defined(WIN32)
+void fltk3::GDIGraphicsDriver::draw(fltk3::Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  if (pxm->w() < 0) pxm->measure();
+  int code = start(pxm, XP, YP, WP, HP, pxm->w(), pxm->h(), cx, cy, X, Y, W, H);
+  if (code) {
+    if (code == 2) pxm->draw_empty(XP, YP);
+    return;
+  }
+  if (!pxm->id_) {
+    pxm->id_ = fl_create_offscreen(pxm->w(), pxm->h());
+    fl_begin_offscreen((fltk3::Offscreen)pxm->id_);
+    uchar *bitmap = 0;
+    fl_mask_bitmap = &bitmap;
+    fltk3::draw_pixmap(pxm->data(), 0, 0, fltk3::BLACK);
+    fl_mask_bitmap = 0;
+    if (bitmap) {
+      pxm->mask_ = fl_create_bitmask(pxm->w(), pxm->h(), bitmap);
+      delete[] bitmap;
+    }
+    fl_end_offscreen();
+  }
+  if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) {
+    typedef BOOL (WINAPI* fl_transp_func)  (HDC,int,int,int,int,HDC,int,int,int,int,UINT);
+    static HMODULE hMod = NULL;
+    static fl_transp_func fl_TransparentBlt = NULL;
+    if (!hMod) {
+      hMod = LoadLibrary("MSIMG32.DLL");
+      if(hMod) fl_TransparentBlt = (fl_transp_func)GetProcAddress(hMod, "TransparentBlt");
+    }
+    if (fl_TransparentBlt) {
+      fltk3::Offscreen tmp_id = fl_create_offscreen(pxm->w(), pxm->h());
+      fl_begin_offscreen(tmp_id);
+      uchar *bitmap = 0;
+      fl_mask_bitmap = &bitmap;
+      // draw pixmap to offscreen
+      fltk3::draw_pixmap(pxm->data(), 0, 0); 
+      fl_end_offscreen();
+      HDC new_gc = CreateCompatibleDC(fl_gc);
+      int save = SaveDC(new_gc);
+      SelectObject(new_gc, (void*)tmp_id);
+      // print all of offscreen but its parts in background color
+      extern UINT win_pixmap_bg_color; // computed by fltk3::draw_pixmap()
+      fl_TransparentBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, pxm->w(), pxm->h(), win_pixmap_bg_color );
+      RestoreDC(new_gc,save);
+      DeleteDC(new_gc);
+      fl_delete_offscreen(tmp_id);
+    }
+    else {
+      fl_copy_offscreen(X, Y, W, H, (fltk3::Offscreen)pxm->id_, cx, cy);
+    }
+  }
+  else if (pxm->mask_) {
+    HDC new_gc = CreateCompatibleDC(fl_gc);
+    int save = SaveDC(new_gc);
+    SelectObject(new_gc, (void*)pxm->mask_);
+    BitBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, SRCAND);
+    SelectObject(new_gc, (void*)pxm->id_);
+    BitBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, SRCPAINT);
+    RestoreDC(new_gc,save);
+    DeleteDC(new_gc);
+  } else {
+    fl_copy_offscreen(X, Y, W, H, (fltk3::Offscreen)pxm->id_, cx, cy);
+  }
+}
+
+#else // Xlib
+void fltk3::XlibGraphicsDriver::draw(fltk3::Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) {
+  int X, Y, W, H;
+  if (pxm->w() < 0) pxm->measure();
+  int code = start(pxm, XP, YP, WP, HP, pxm->w(), pxm->h(), cx, cy, X, Y, W, H);
+  if (code) {
+    if (code == 2) pxm->draw_empty(XP, YP);
+    return;
+  }
+  if (!pxm->id_) {
+    pxm->id_ = fl_create_offscreen(pxm->w(), pxm->h());
+    fl_begin_offscreen((fltk3::Offscreen)pxm->id_);
+    uchar *bitmap = 0;
+    fl_mask_bitmap = &bitmap;
+    fltk3::draw_pixmap(pxm->data(), 0, 0, fltk3::BLACK);
+    fl_mask_bitmap = 0;
+    if (bitmap) {
+      pxm->mask_ = fl_create_bitmask(pxm->w(), pxm->h(), bitmap);
+      delete[] bitmap;
+    }
+    fl_end_offscreen();
+  }
+  if (pxm->mask_) {
+    // I can't figure out how to combine a mask with existing region,
+    // so cut the image down to a clipped rectangle:
+    int nx, ny; fltk3::clip_box(X,Y,W,H,nx,ny,W,H);
+    cx += nx-X; X = nx;
+    cy += ny-Y; Y = ny;
+    // make X use the bitmap as a mask:
+    XSetClipMask(fl_display, fl_gc, pxm->mask_);
+    int ox = X-cx; if (ox < 0) ox += pxm->w();
+    int oy = Y-cy; if (oy < 0) oy += pxm->h();
+    XSetClipOrigin(fl_display, fl_gc, X-cx, Y-cy);
+  }
+  fl_copy_offscreen(X, Y, W, H, pxm->id_, cx, cy);
+  if (pxm->mask_) {
+    // put the old clip region back
+    XSetClipOrigin(fl_display, fl_gc, 0, 0);
+    fltk3::restore_clip();
+  }
+}
+
+#endif
+
+/**
+  The destructor free all memory and server resources that are used by
+  the pixmap.
+*/
+fltk3::Pixmap::~Pixmap() {
+  uncache();
+  delete_data();
+}
+
+void fltk3::Pixmap::uncache() {
+  if (id_) {
+    fl_delete_offscreen((fltk3::Offscreen)id_);
+    id_ = 0;
+  }
+
+  if (mask_) {
+    fl_delete_bitmask((fltk3::Bitmask)mask_);
+    mask_ = 0;
+  }
+}
+
+void fltk3::Pixmap::label(fltk3::Widget* widget) {
+  widget->image(this);
+}
+
+void fltk3::Pixmap::label(fltk3::MenuItem* m) {
+  m->label(fltk3::IMAGE_LABEL, (const char*)this);
+}
+
+void fltk3::Pixmap::copy_data() {
+  if (alloc_data) return;
+
+  char		**new_data,	// New data array
+		**new_row;	// Current row in image
+  int		i,		// Looping var
+		ncolors,	// Number of colors in image
+		chars_per_pixel,// Characters per color
+		chars_per_line;	// Characters per line 
+
+  // Figure out how many colors there are, and how big they are...
+  sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
+  chars_per_line = chars_per_pixel * w() + 1;
+
+  // Allocate memory for the new array...
+  if (ncolors < 0) new_data = new char *[h() + 2];
+  else new_data = new char *[h() + ncolors + 1];
+
+  new_data[0] = new char[strlen(data()[0]) + 1];
+  strcpy(new_data[0], data()[0]);
+
+  // Copy colors...
+  if (ncolors < 0) {
+    // Copy FLTK colormap values...
+    ncolors = -ncolors;
+    new_row = new_data + 1;
+    *new_row = new char[ncolors * 4];
+    memcpy(*new_row, data()[1], ncolors * 4);
+    ncolors = 1;
+    new_row ++;
+  } else {
+    // Copy standard XPM colormap values...
+    for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) {
+      *new_row = new char[strlen(data()[i + 1]) + 1];
+      strcpy(*new_row, data()[i + 1]);
+    }
+  }
+
+  // Copy image data...
+  for (i = 0; i < h(); i ++, new_row ++) {
+    *new_row = new char[chars_per_line];
+    memcpy(*new_row, data()[i + ncolors + 1], chars_per_line);
+  }
+
+  // Update pointers...
+  data((const char **)new_data, h() + ncolors + 1);
+  alloc_data = 1;  
+}
+
+fltk3::Image *fltk3::Pixmap::copy(int W, int H) {
+  fltk3::Pixmap	*new_image;	// New pixmap
+
+  // Optimize the simple copy where the width and height are the same...
+  if (W == w() && H == h()) {
+    // Make an exact copy of the image and return it...
+    new_image = new fltk3::Pixmap(data());
+    new_image->copy_data();
+    return new_image;
+  }
+  if (W <= 0 || H <= 0) return 0;
+
+  // OK, need to resize the image data; allocate memory and 
+  char		**new_data,	// New array for image data
+		**new_row,	// Pointer to row in image data
+		*new_ptr,	// Pointer into new array
+		new_info[255];	// New information line
+  const char	*old_ptr;	// Pointer into old array
+  int		i,		// Looping var
+		c,		// Channel number
+		sy,		// Source coordinate
+		dx, dy,		// Destination coordinates
+		xerr, yerr,	// X & Y errors
+		xmod, ymod,	// X & Y moduli
+		xstep, ystep;	// X & Y step increments
+  int		ncolors,	// Number of colors in image
+		chars_per_pixel,// Characters per color
+		chars_per_line;	// Characters per line 
+
+  // Figure out how many colors there are, and how big they are...
+  sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
+  chars_per_line = chars_per_pixel * W + 1;
+
+  sprintf(new_info, "%d %d %d %d", W, H, ncolors, chars_per_pixel);
+
+  // Figure out Bresenheim step/modulus values...
+  xmod   = w() % W;
+  xstep  = (w() / W) * chars_per_pixel;
+  ymod   = h() % H;
+  ystep  = h() / H;
+
+  // Allocate memory for the new array...
+  if (ncolors < 0) new_data = new char *[H + 2];
+  else new_data = new char *[H + ncolors + 1];
+  new_data[0] = new char[strlen(new_info) + 1];
+  strcpy(new_data[0], new_info);
+
+  // Copy colors...
+  if (ncolors < 0) {
+    // Copy FLTK colormap values...
+    ncolors = -ncolors;
+    new_row = new_data + 1;
+    *new_row = new char[ncolors * 4];
+    memcpy(*new_row, data()[1], ncolors * 4);
+    ncolors = 1;
+    new_row ++;
+  } else {
+    // Copy standard XPM colormap values...
+    for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) {
+      *new_row = new char[strlen(data()[i + 1]) + 1];
+      strcpy(*new_row, data()[i + 1]);
+    }
+  }
+
+  // Scale the image using a nearest-neighbor algorithm...
+  for (dy = H, sy = 0, yerr = H; dy > 0; dy --, new_row ++) {
+    *new_row = new char[chars_per_line];
+    new_ptr  = *new_row;
+
+    for (dx = W, xerr = W, old_ptr = data()[sy + ncolors + 1];
+	 dx > 0;
+	 dx --) {
+      for (c = 0; c < chars_per_pixel; c ++) *new_ptr++ = old_ptr[c];
+
+      old_ptr += xstep;
+      xerr    -= xmod;
+
+      if (xerr <= 0) {
+	xerr    += W;
+	old_ptr += chars_per_pixel;
+      }
+    }
+
+    *new_ptr = '\0';
+    sy       += ystep;
+    yerr     -= ymod;
+    if (yerr <= 0) {
+      yerr += H;
+      sy ++;
+    }
+  }
+
+  new_image = new fltk3::Pixmap((char*const*)new_data);
+  new_image->alloc_data = 1;
+
+  return new_image;
+}
+
+void fltk3::Pixmap::color_average(fltk3::Color c, float i) {
+  // Delete any existing pixmap/mask objects...
+  uncache();
+
+  // Allocate memory as needed...
+  copy_data();
+
+  // Get the color to blend with...
+  uchar		r, g, b;
+  unsigned	ia, ir, ig, ib;
+
+  fltk3::get_color(c, r, g, b);
+  if (i < 0.0f) i = 0.0f;
+  else if (i > 1.0f) i = 1.0f;
+
+  ia = (unsigned)(256 * i);
+  ir = r * (256 - ia);
+  ig = g * (256 - ia);
+  ib = b * (256 - ia);
+
+  // Update the colormap to do the blend...
+  char		line[255];	// New colormap line
+  int		color,		// Looping var
+		ncolors,	// Number of colors in image
+		chars_per_pixel;// Characters per color
+
+
+  sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
+
+  if (ncolors < 0) {
+    // Update FLTK colormap...
+    ncolors = -ncolors;
+    uchar *cmap = (uchar *)(data()[1]);
+    for (color = 0; color < ncolors; color ++, cmap += 4) {
+      cmap[1] = (ia * cmap[1] + ir) >> 8;
+      cmap[2] = (ia * cmap[2] + ig) >> 8;
+      cmap[3] = (ia * cmap[3] + ib) >> 8;
+    }
+  } else {
+    // Update standard XPM colormap...
+    for (color = 0; color < ncolors; color ++) {
+      // look for "c word", or last word if none:
+      const char *p = data()[color + 1] + chars_per_pixel + 1;
+      const char *previous_word = p;
+      for (;;) {
+	while (*p && isspace(*p)) p++;
+	char what = *p++;
+	while (*p && !isspace(*p)) p++;
+	while (*p && isspace(*p)) p++;
+	if (!*p) {p = previous_word; break;}
+	if (what == 'c') break;
+	previous_word = p;
+	while (*p && !isspace(*p)) p++;
+      }
+
+      if (fl_parse_color(p, r, g, b)) {
+        r = (ia * r + ir) >> 8;
+        g = (ia * g + ig) >> 8;
+        b = (ia * b + ib) >> 8;
+
+        if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X",
+	                                 data()[color + 1][0],
+	                                 data()[color + 1][1], r, g, b);
+        else sprintf(line, "%c c #%02X%02X%02X", data()[color + 1][0], r, g, b);
+
+        delete[] (char *)data()[color + 1];
+	((char **)data())[color + 1] = new char[strlen(line) + 1];
+	strcpy((char *)data()[color + 1], line);
+      }
+    }
+  }
+}
+
+void fltk3::Pixmap::delete_data() {
+  if (alloc_data) {
+    for (int i = 0; i < count(); i ++) delete[] (char *)data()[i];
+    delete[] (char **)data();
+  }
+}
+
+void fltk3::Pixmap::set_data(const char * const * p) {
+  int	height,		// Number of lines in image
+	ncolors;	// Number of colors in image
+
+  if (p) {
+    sscanf(p[0],"%*d%d%d", &height, &ncolors);
+    if (ncolors < 0) data(p, height + 2);
+    else data(p, height + ncolors + 1);
+  }
+}
+
+
+void fltk3::Pixmap::desaturate() {
+  // Delete any existing pixmap/mask objects...
+  uncache();
+
+  // Allocate memory as needed...
+  copy_data();
+
+  // Update the colormap to grayscale...
+  char		line[255];	// New colormap line
+  int		i,		// Looping var
+		ncolors,	// Number of colors in image
+		chars_per_pixel;// Characters per color
+  uchar		r, g, b;
+
+  sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
+
+  if (ncolors < 0) {
+    // Update FLTK colormap...
+    ncolors = -ncolors;
+    uchar *cmap = (uchar *)(data()[1]);
+    for (i = 0; i < ncolors; i ++, cmap += 4) {
+      g = (uchar)((cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100);
+      cmap[1] = cmap[2] = cmap[3] = g;
+    }
+  } else {
+    // Update standard XPM colormap...
+    for (i = 0; i < ncolors; i ++) {
+      // look for "c word", or last word if none:
+      const char *p = data()[i + 1] + chars_per_pixel + 1;
+      const char *previous_word = p;
+      for (;;) {
+	while (*p && isspace(*p)) p++;
+	char what = *p++;
+	while (*p && !isspace(*p)) p++;
+	while (*p && isspace(*p)) p++;
+	if (!*p) {p = previous_word; break;}
+	if (what == 'c') break;
+	previous_word = p;
+	while (*p && !isspace(*p)) p++;
+      }
+
+      if (fl_parse_color(p, r, g, b)) {
+        g = (uchar)((r * 31 + g * 61 + b * 8) / 100);
+
+        if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0],
+	                                 data()[i + 1][1], g, g, g);
+        else sprintf(line, "%c c #%02X%02X%02X", data()[i + 1][0], g, g, g);
+
+        delete[] (char *)data()[i + 1];
+	((char **)data())[i + 1] = new char[strlen(line) + 1];
+	strcpy((char *)data()[i + 1], line);
+      }
+    }
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Pixmap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Positioner.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Positioner.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Positioner.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,164 @@
+//
+// "$Id$"
+//
+// Positioner widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+// The positioner widget from Forms, gives 2D input
+// Written by: Mark Overmars
+
+#include <fltk3/run.h>
+#include <fltk3/Positioner.h>
+#include <fltk3/draw.h>
+#include <fltk3/Wrapper.h>
+
+static double flinear(double val, double smin, double smax, double gmin, double gmax)
+{
+  if (smin == smax) return gmax;
+  else return gmin + (gmax - gmin) * (val - smin) / (smax - smin);
+}
+
+void fltk3::Positioner::draw(int X, int Y, int W, int H) {
+  int x1 = X + 4;
+  int y1 = Y + 4;
+  int w1 = W - 2 * 4;
+  int h1 = H - 2 * 4;
+  int xx = int(flinear(xvalue(), xmin, xmax, x1, x1+w1-1)+.5);
+  int yy = int(flinear(yvalue(), ymin, ymax, y1, y1+h1-1)+.5);
+  draw_box(box(), X, Y, W, H, color());
+  fltk3::color(selection_color());
+  fltk3::xyline(x1, yy, x1+w1);
+  fltk3::yxline(xx, y1, y1+h1);
+}
+
+void fltk3::Positioner::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw(x(), y(), w(), h());
+  draw_label();
+}
+
+/** Returns the current position in x and y.*/
+int fltk3::Positioner::value(double X, double Y) {
+  clear_changed();
+  if (X == xvalue_ && Y == yvalue_) return 0;
+  xvalue_ = X; yvalue_ = Y;
+  redraw();
+  return 1;
+}
+
+/** Sets the X axis coordinate.*/
+int fltk3::Positioner::xvalue(double X) {
+  return(value(X, yvalue_));
+}
+
+/** Sets the Y axis coordinate.*/
+int fltk3::Positioner::yvalue(double Y) {
+  return(value(xvalue_, Y));
+}
+
+int fltk3::Positioner::handle(int event, int X, int Y, int W, int H) {
+  switch (event) {
+  case fltk3::PUSH:
+  case fltk3::DRAG:
+  case fltk3::RELEASE: {
+    double x1 = X + 4;
+    double y1 = Y + 4;
+    double w1 = W - 2 * 4;
+    double h1 = H - 2 * 4;
+    double xx = flinear(fltk3::event_x(), x1, x1+w1-1.0, xmin, xmax);
+    if (xstep_) xx = int(xx/xstep_+0.5) * xstep_;
+    if (xmin < xmax) {
+      if (xx < xmin) xx = xmin;
+      if (xx > xmax) xx = xmax;
+    } else {
+      if (xx > xmin) xx = xmin;
+      if (xx < xmax) xx = xmax;
+    }
+    double yy = flinear(fltk3::event_y(), y1, y1+h1-1.0, ymin, ymax);
+    if (ystep_) yy = int(yy/ystep_+0.5) * ystep_;
+    if (ymin < ymax) {
+      if (yy < ymin) yy = ymin;
+      if (yy > ymax) yy = ymax;
+    } else {
+      if (yy > ymin) yy = ymin;
+      if (yy < ymax) yy = ymax;
+    }
+    if (xx != xvalue_ || yy != yvalue_) {
+      xvalue_ = xx; yvalue_ = yy;
+      set_changed();
+      redraw();
+                   } }
+    if (!(when() & fltk3::WHEN_CHANGED ||
+	  (when() & fltk3::WHEN_RELEASE && event == fltk3::RELEASE))) return 1;
+    if (changed() || when()&fltk3::WHEN_NOT_CHANGED) {
+      if (event == fltk3::RELEASE) clear_changed();
+      do_callback();
+    }
+    return 1;
+  default:
+    return 0;
+  }
+}
+
+int fltk3::Positioner::handle(int e) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(e), Handle)
+  return handle(e, x(), y(), w(), h());
+}
+
+/**
+  Creates a new fltk3::Positioner widget using the given position,
+  size, and label string. The default boxtype is fltk3::NO_BOX.
+*/
+fltk3::Positioner::Positioner(int X, int Y, int W, int H, const char* l)
+: fltk3::Widget(X, Y, W, H, l) {
+  box(fltk3::DOWN_BOX);
+  selection_color(fltk3::RED);
+  align(fltk3::ALIGN_BOTTOM);
+  when(fltk3::WHEN_CHANGED);
+  xmin = ymin = 0;
+  xmax = ymax = 1;
+  xvalue_ = yvalue_ = .5;
+  xstep_ = ystep_ = 0;
+}
+
+/** Sets the X axis bounds.*/
+void fltk3::Positioner::xbounds(double a, double b) {
+  if (a != xmin || b != xmax) {
+    xmin = a; xmax = b;
+    redraw();
+  }
+}
+
+/** Sets the Y axis bounds.*/
+void fltk3::Positioner::ybounds(double a, double b) {
+  if (a != ymin || b != ymax) {
+    ymin = a; ymax = b;
+    redraw();
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Positioner.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_PostScript.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_PostScript.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_PostScript.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1603 @@
+//
+// "$Id$"
+//
+// PostScript device support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/ask.h>
+#include <fltk3/draw.h>
+#include <stdio.h>
+#include <fltk3/PostScript.h>
+#include <fltk3/NativeFileChooser.h>
+#if defined(USE_X11)
+#include "Fl_Font.H"
+#if USE_XFT
+#include <X11/Xft/Xft.h>
+#endif
+#endif
+
+const char *fltk3::PostScriptGraphicsDriver::class_id = "fltk3::PostScriptGraphicsDriver";
+const char *fltk3::PostScriptFileDevice::class_id = "fltk3::PostScriptFileDevice";
+/** \brief Label of the PostScript file chooser window */
+const char *fltk3::PostScriptFileDevice::file_chooser_title = "Select a .ps file";
+
+/**
+ @brief The constructor.
+ */
+fltk3::PostScriptGraphicsDriver::PostScriptGraphicsDriver(void)
+{
+  close_cmd_ = 0;
+  //lang_level_ = 3;
+  lang_level_ = 2;
+  mask = 0;
+  ps_filename_ = NULL;
+  scale_x = scale_y = 1.;
+  bg_r = bg_g = bg_b = 255;
+}
+
+/** \brief The destructor. */
+fltk3::PostScriptGraphicsDriver::~PostScriptGraphicsDriver() {
+  if(ps_filename_) free(ps_filename_);
+}
+
+/**
+ @brief The constructor.
+ */
+fltk3::PostScriptFileDevice::PostScriptFileDevice(void)
+{
+#ifdef __APPLE__
+  gc = fl_gc; // the display context is used by fltk3::text_extents()
+#endif
+  SurfaceDevice::driver( new fltk3::PostScriptGraphicsDriver() );
+}
+
+/**
+ \brief Returns the PostScript driver of this drawing surface.
+ */
+fltk3::PostScriptGraphicsDriver *fltk3::PostScriptFileDevice::driver()
+{
+  return (PostScriptGraphicsDriver*)SurfaceDevice::driver();
+}
+
+
+/**
+ @brief Begins the session where all graphics requests will go to a local PostScript file.
+ *
+ Opens a file dialog entitled with fltk3::PostScriptFileDevice::file_chooser_title to select an output PostScript file.
+ @param pagecount The total number of pages to be created.
+ @param format Desired page format.
+ @param layout Desired page layout.
+ @return 0 if OK, 1 if user cancelled the file dialog, 2 if fopen failed on user-selected output file.
+ */
+int fltk3::PostScriptFileDevice::start_job (int pagecount, enum fltk3::PagedDevice::Page_Format format, 
+					  enum fltk3::PagedDevice::Page_Layout layout)
+{
+  fltk3::NativeFileChooser fnfc;
+  fnfc.title(fltk3::PostScriptFileDevice::file_chooser_title);
+  fnfc.type(fltk3::NativeFileChooser::BROWSE_SAVE_FILE);
+  fnfc.options(fltk3::NativeFileChooser::SAVEAS_CONFIRM);
+  fnfc.filter("PostScript\t*.ps\n");
+  // Show native chooser
+  if ( fnfc.show() ) return 1;
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  ps->output = fopen(fnfc.filename(), "w");
+  if(ps->output == NULL) return 2;
+  ps->ps_filename_ = strdup(fnfc.filename());
+  ps->start_postscript(pagecount, format, layout);
+  this->set_current();
+  return 0;
+}
+
+static int dont_close(FILE *f) 
+{
+  return 0;
+}
+
+/**
+ @brief Begins the session where all graphics requests will go to FILE pointer.
+ *
+ @param ps_output A writable FILE pointer that will receive PostScript output and that should not be closed
+ until after end_job() has been called.
+ @param pagecount The total number of pages to be created.
+ @param format Desired page format.
+ @param layout Desired page layout.
+ @return always 0.
+ */
+int fltk3::PostScriptFileDevice::start_job (FILE *ps_output, int pagecount, 
+    enum fltk3::PagedDevice::Page_Format format, enum fltk3::PagedDevice::Page_Layout layout)
+{
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  ps->output = ps_output;
+  ps->ps_filename_ = NULL;
+  ps->start_postscript(pagecount, format, layout);
+  ps->close_command(dont_close); // so that end_job() doesn't close the file
+  this->set_current();
+  return 0;
+}
+
+/**
+ @brief The destructor.
+ */
+fltk3::PostScriptFileDevice::~PostScriptFileDevice() {
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  if (ps) delete ps;
+}
+
+#ifndef FLTK3_DOXYGEN
+
+#if ! (defined(__APPLE__) || defined(WIN32) )
+  #include "print_panel.cxx"
+#endif
+
+//  Prolog string 
+
+static const char * prolog =
+"%%BeginProlog\n"
+"/L { /y2 exch def\n"
+"/x2 exch def\n"
+"/y1 exch def\n"
+"/x1 exch def\n"
+"newpath   x1 y1 moveto x2 y2 lineto\n"
+"stroke}\n"
+"bind def\n"
+
+
+"/R { /dy exch def\n"
+"/dx exch def\n"
+"/y exch def\n"
+"/x exch def\n"
+"newpath\n"
+"x y moveto\n"
+"dx 0 rlineto\n"
+"0 dy rlineto\n"
+"dx neg 0 rlineto\n"
+"closepath stroke\n"
+"} bind def\n"
+
+"/CL {\n"
+"/dy exch def\n"
+"/dx exch def\n"
+"/y exch def\n"
+"/x exch def\n"
+"newpath\n"
+"x y moveto\n"
+"dx 0 rlineto\n"
+"0 dy rlineto\n"
+"dx neg 0 rlineto\n"
+"closepath\n"
+"clip\n"
+"} bind def\n"
+
+"/FR { /dy exch def\n"
+"/dx exch def\n"
+"/y exch def\n"
+"/x exch def\n"
+"currentlinewidth 0 setlinewidth newpath\n"
+"x y moveto\n"
+"dx 0 rlineto\n"
+"0 dy rlineto\n"
+"dx neg 0 rlineto\n"
+"closepath fill setlinewidth\n"
+"} bind def\n"
+
+"/GS { gsave } bind  def\n"
+"/GR { grestore } bind def\n"
+
+"/SP { showpage } bind def\n"
+"/LW { setlinewidth } bind def\n"
+"/CF /Courier def\n"
+"/SF { /CF exch def } bind def\n"
+"/fsize 12 def\n"
+"/FS { /fsize exch def fsize CF findfont exch scalefont setfont }def \n"
+
+
+"/GL { setgray } bind def\n"
+"/SRGB { setrgbcolor } bind def\n"
+
+//  color images 
+
+"/CI { GS /py exch def /px exch def /sy exch def /sx exch def\n"
+"translate \n"
+"sx sy scale px py 8 \n"
+"[ px 0 0 py neg 0 py ]\n"
+"currentfile /ASCIIHexDecode filter\n false 3"
+" colorimage GR\n"
+"} bind def\n"
+
+//  gray images 
+
+"/GI { GS /py exch def /px exch def /sy exch def /sx exch def \n"
+"translate \n"
+"sx sy scale px py 8 \n"
+
+
+"[ px 0 0 py neg 0 py ]\n"
+"currentfile /ASCIIHexDecode filter\n"
+"image GR\n"
+"} bind def\n"
+
+// single-color bitmask 
+
+"/MI { GS /py exch def /px exch def /sy exch def /sx exch def \n"
+"translate \n"
+"sx sy scale px py true \n"
+"[ px 0 0 py neg 0 py ]\n"
+"currentfile /ASCIIHexDecode filter\n"
+"imagemask GR\n"
+"} bind def\n"
+
+
+//  path 
+
+"/BFP { newpath moveto }  def\n"
+"/BP { newpath } bind def \n"
+"/PL { lineto } bind def \n"
+"/PM { moveto } bind def \n"
+"/MT { moveto } bind def \n"
+"/LT { lineto } bind def \n"
+"/EFP { closepath fill } bind def\n"  //was:stroke
+"/ELP { stroke } bind def\n"  
+"/ECP { closepath stroke } bind def\n"  // Closed (loop)
+"/LW { setlinewidth } bind def\n"
+
+// ////////////////////////// misc ////////////////
+"/TR { translate } bind def\n"
+"/CT { concat } bind def\n"
+"/RCT { matrix invertmatrix concat} bind def\n"
+"/SC { scale } bind def\n"
+//"/GPD { currentpagedevice /PageSize get} def\n"
+
+// show at position with desired width
+// usage:
+// width (string) x y show_pos_width
+"/show_pos_width {GS moveto dup dup stringwidth pop exch length 2 div dup 2 le {pop 9999} if "
+"1 sub exch 3 index exch sub exch "
+"div 0 2 index 1 -1 scale ashow pop pop GR} bind def\n" // spacing altered to match desired width
+//"/show_pos_width {GS moveto dup stringwidth pop 3 2 roll exch div -1 matrix scale concat "
+//"show GR } bind def\n" // horizontally scaled text to match desired width
+
+;
+
+
+static const char * prolog_2 =  // prolog relevant only if lang_level >1
+
+// color image dictionaries
+"/CII {GS /inter exch def /py exch def /px exch def /sy exch def /sx exch def \n"
+"translate \n"
+"sx sy scale\n"
+"/DeviceRGB setcolorspace\n"
+"/IDD 8 dict def\n"
+"IDD begin\n"
+"/ImageType 1 def\n"
+"/Width px def\n"
+"/Height py def\n"
+"/BitsPerComponent 8 def\n"
+"/Interpolate inter def\n"
+"/DataSource currentfile /ASCIIHexDecode filter def\n"
+"/MultipleDataSources false def\n"
+"/ImageMatrix [ px 0 0 py neg 0 py ] def\n"
+"/Decode [ 0 1 0 1 0 1 ] def\n"
+"end\n"
+"IDD image GR} bind def\n"
+
+// gray image dict 
+"/GII {GS /inter exch def /py exch def /px exch def /sy exch def /sx exch def \n"
+"translate \n"
+"sx sy scale\n"
+"/DeviceGray setcolorspace\n"
+"/IDD 8 dict def\n"
+"IDD begin\n"
+"/ImageType 1 def\n"
+"/Width px def\n"
+"/Height py def\n"
+"/BitsPerComponent 8 def\n"
+
+"/Interpolate inter def\n"
+"/DataSource currentfile /ASCIIHexDecode filter def\n"
+"/MultipleDataSources false def\n"
+"/ImageMatrix [ px 0 0 py neg 0 py ] def\n"
+"/Decode [ 0 1 ] def\n"
+"end\n"
+"IDD image GR} bind def\n"
+
+// Create a custom PostScript font derived from PostScript standard text fonts
+// The encoding of this custom font is as follows:
+// 0000-00FF  coincides with Unicode, that is to ASCII + Latin-1
+// 0100-017F  coincides with Unicode, that is to Latin Extended-A
+// 0180-01A6  encodes miscellaneous characters present in PostScript standard text fonts
+
+// use ISOLatin1Encoding for all text fonts
+"/ToISO { dup findfont dup length dict copy begin /Encoding ISOLatin1Encoding def currentdict end definefont pop } def\n"
+"/Helvetica ToISO /Helvetica-Bold ToISO /Helvetica-Oblique ToISO /Helvetica-BoldOblique ToISO \n"
+"/Courier ToISO /Courier-Bold ToISO /Courier-Oblique ToISO /Courier-BoldOblique ToISO \n"
+"/Times-Roman ToISO /Times-Bold ToISO /Times-Italic ToISO /Times-BoldItalic ToISO \n"
+
+// define LatinExtA, the encoding of Latin-extended-A + some additional characters
+// see http://www.adobe.com/devnet/opentype/archives/glyphlist.txt for their names
+"/LatinExtA \n"
+"[ "
+" /Amacron /amacron /Abreve /abreve /Aogonek /aogonek\n" // begin of Latin Extended-A code page
+" /Cacute  /cacute  /Ccircumflex  /ccircumflex  /Cdotaccent  /cdotaccent  /Ccaron  /ccaron \n"
+" /Dcaron  /dcaron   /Dcroat  /dcroat\n"
+" /Emacron  /emacron  /Ebreve  /ebreve  /Edotaccent  /edotaccent  /Eogonek  /eogonek  /Ecaron  /ecaron\n"
+" /Gcircumflex  /gcircumflex  /Gbreve  /gbreve  /Gdotaccent  /gdotaccent  /Gcommaaccent  /gcommaaccent \n"
+" /Hcircumflex /hcircumflex  /Hbar  /hbar  \n"
+" /Itilde  /itilde  /Imacron  /imacron  /Ibreve  /ibreve  /Iogonek  /iogonek /Idotaccent  /dotlessi  \n"
+" /IJ  /ij  /Jcircumflex  /jcircumflex\n"
+" /Kcommaaccent  /kcommaaccent  /kgreenlandic  \n"
+" /Lacute  /lacute  /Lcommaaccent  /lcommaaccent   /Lcaron  /lcaron  /Ldotaccent /ldotaccent   /Lslash  /lslash \n"
+" /Nacute  /nacute  /Ncommaaccent  /ncommaaccent  /Ncaron  /ncaron  /napostrophe  /Eng  /eng  \n"
+" /Omacron  /omacron /Obreve  /obreve  /Ohungarumlaut  /ohungarumlaut  /OE  /oe \n"
+" /Racute  /racute  /Rcommaaccent  /rcommaaccent  /Rcaron  /rcaron \n"
+" /Sacute /sacute  /Scircumflex  /scircumflex  /Scedilla /scedilla /Scaron  /scaron \n"
+" /Tcommaaccent  /tcommaaccent  /Tcaron  /tcaron  /Tbar  /tbar \n"
+" /Utilde  /utilde /Umacron /umacron  /Ubreve  /ubreve  /Uring  /uring  /Uhungarumlaut  /uhungarumlaut  /Uogonek /uogonek \n"
+" /Wcircumflex  /wcircumflex  /Ycircumflex  /ycircumflex  /Ydieresis \n"
+" /Zacute /zacute /Zdotaccent /zdotaccent /Zcaron /zcaron \n"
+" /longs \n" // end of Latin Extended-A code page
+" /florin  /circumflex  /caron  /breve  /dotaccent  /ring \n" // remaining characters from PostScript standard text fonts
+" /ogonek  /tilde  /hungarumlaut  /endash /emdash \n"
+" /quoteleft  /quoteright  /quotesinglbase  /quotedblleft  /quotedblright \n"
+" /quotedblbase  /dagger  /daggerdbl  /bullet  /ellipsis \n"
+" /perthousand  /guilsinglleft  /guilsinglright  /fraction  /Euro \n"
+" /trademark /partialdiff  /Delta /summation  /radical \n"
+" /infinity /notequal /lessequal /greaterequal /lozenge \n"
+" /fi /fl /apple \n"
+" ] def \n"
+// deal with alternative PostScript names of some characters
+" /mycharstrings /Helvetica findfont /CharStrings get def\n"
+" /PSname2 { dup mycharstrings exch known {LatinExtA 3 -1 roll 3 -1 roll put}{pop pop} ifelse } def \n"
+" 16#20 /Gdot PSname2 16#21 /gdot PSname2 16#30 /Idot PSname2 16#3F /Ldot PSname2 16#40 /ldot PSname2 16#7F /slong PSname2 \n"
+
+// proc that gives LatinExtA encoding to a font
+"/ToLatinExtA { findfont dup length dict copy begin /Encoding LatinExtA def currentdict end definefont pop } def\n"
+// create Ext-versions of standard fonts that use LatinExtA encoding \n"
+"/HelveticaExt /Helvetica ToLatinExtA \n"
+"/Helvetica-BoldExt /Helvetica-Bold ToLatinExtA /Helvetica-ObliqueExt /Helvetica-Oblique ToLatinExtA  \n"
+"/Helvetica-BoldObliqueExt /Helvetica-BoldOblique ToLatinExtA  \n"
+"/CourierExt /Courier ToLatinExtA /Courier-BoldExt /Courier-Bold ToLatinExtA  \n"
+"/Courier-ObliqueExt /Courier-Oblique ToLatinExtA /Courier-BoldObliqueExt /Courier-BoldOblique ToLatinExtA \n"
+"/Times-RomanExt /Times-Roman ToLatinExtA /Times-BoldExt /Times-Bold ToLatinExtA  \n"
+"/Times-ItalicExt /Times-Italic ToLatinExtA /Times-BoldItalicExt /Times-BoldItalic ToLatinExtA \n"
+
+// proc to create a Type 0 font with 2-byte encoding 
+// that merges a text font with ISO encoding + same font with LatinExtA encoding
+"/To2byte { 6 dict begin /FontType 0 def \n"
+"/FDepVector 3 1 roll findfont exch findfont 2 array astore def \n"
+"/FontMatrix [1  0  0  1  0  0] def /FMapType 6 def /Encoding [ 0 1 0 ] def\n"
+// 100: Hexa count of ISO array; A7: hexa count of LatinExtA array
+"/SubsVector < 01 0100 00A7 > def\n" 
+"currentdict end definefont pop } def\n"
+// create Type 0 versions of standard fonts
+"/Helvetica2B /HelveticaExt /Helvetica To2byte \n"
+"/Helvetica-Bold2B /Helvetica-BoldExt /Helvetica-Bold To2byte \n"
+"/Helvetica-Oblique2B /Helvetica-ObliqueExt /Helvetica-Oblique To2byte \n"
+"/Helvetica-BoldOblique2B /Helvetica-BoldObliqueExt /Helvetica-BoldOblique To2byte \n"
+"/Courier2B /CourierExt /Courier To2byte \n"
+"/Courier-Bold2B /Courier-BoldExt /Courier-Bold To2byte \n"
+"/Courier-Oblique2B /Courier-ObliqueExt /Courier-Oblique To2byte \n"
+"/Courier-BoldOblique2B /Courier-BoldObliqueExt /Courier-BoldOblique To2byte \n"
+"/Times-Roman2B /Times-RomanExt /Times-Roman To2byte \n"
+"/Times-Bold2B /Times-BoldExt /Times-Bold To2byte \n"
+"/Times-Italic2B /Times-ItalicExt /Times-Italic To2byte \n"
+"/Times-BoldItalic2B /Times-BoldItalicExt /Times-BoldItalic To2byte \n"
+;
+
+static const char * prolog_2_pixmap =  // prolog relevant only if lang_level == 2 for pixmaps/masked color images
+"/pixmap_mat {[ pixmap_sx 0 0 pixmap_sy neg 0 pixmap_sy ]}  bind def\n"
+
+"/pixmap_dict {"
+"<< /PatternType 1 "
+"/PaintType 1 "
+"/TilingType 2 "
+"/BBox [0  0  pixmap_sx  pixmap_sy] "
+"/XStep pixmap_sx "
+"/YStep pixmap_sy\n"
+"/PaintProc "
+"{ begin "
+"pixmap_w pixmap_h scale "
+"pixmap_sx pixmap_sy 8 "
+"pixmap_mat "
+"currentfile /ASCIIHexDecode filter "
+"false 3 "
+"colorimage "
+"end "
+"} bind "
+">>\n"
+"} bind def\n"
+
+"/pixmap_plot {"
+"GS "
+"/pixmap_sy exch def /pixmap_sx exch def\n"
+"/pixmap_h exch def /pixmap_w exch def\n"
+"translate\n"
+"pixmap_dict matrix makepattern setpattern\n"
+"pixmap_w pixmap_h scale\n"
+"pixmap_sx pixmap_sy\n"
+"true\n"
+"pixmap_mat\n"
+"currentfile /ASCIIHexDecode filter\n"
+"imagemask\n"
+"GR\n"
+"} bind def\n"
+;
+
+static const char * prolog_3 = // prolog relevant only if lang_level >2
+
+// masked color images 
+"/CIM {GS /inter exch def /my exch def /mx exch def /py exch def /px exch def /sy exch def /sx exch def \n"
+"translate \n"
+"sx sy scale\n"
+"/DeviceRGB setcolorspace\n"
+
+"/IDD 8 dict def\n"
+
+"IDD begin\n"
+"/ImageType 1 def\n"
+"/Width px def\n"
+"/Height py def\n"
+"/BitsPerComponent 8 def\n"
+"/Interpolate inter def\n"
+"/DataSource currentfile /ASCIIHexDecode filter def\n"
+"/MultipleDataSources false def\n"
+"/ImageMatrix [ px 0 0 py neg 0 py ] def\n"
+
+"/Decode [ 0 1 0 1 0 1 ] def\n"
+"end\n"
+
+"/IMD 8 dict def\n"
+"IMD begin\n"
+"/ImageType 1 def\n"
+"/Width mx def\n"           
+"/Height my def\n"
+"/BitsPerComponent 1 def\n"
+//  "/Interpolate inter def\n"
+"/ImageMatrix [ mx 0 0 my neg 0 my ] def\n"
+"/Decode [ 1 0 ] def\n"
+"end\n"
+
+"<<\n"
+"/ImageType 3\n"
+"/InterleaveType 2\n"
+"/MaskDict IMD\n"
+"/DataDict IDD\n"
+">> image GR\n"
+"} bind def\n"
+
+
+//  masked gray images 
+"/GIM {GS /inter exch def /my exch def /mx exch def /py exch def /px exch def /sy exch def /sx exch def \n"
+"translate \n"
+"sx sy scale\n"
+"/DeviceGray setcolorspace\n"
+
+"/IDD 8 dict def\n"
+
+"IDD begin\n"
+"/ImageType 1 def\n"
+"/Width px def\n"
+"/Height py def\n"
+"/BitsPerComponent 8 def\n"
+"/Interpolate inter def\n"
+"/DataSource currentfile /ASCIIHexDecode filter def\n"
+"/MultipleDataSources false def\n"
+"/ImageMatrix [ px 0 0 py neg 0 py ] def\n"
+
+"/Decode [ 0 1 ] def\n"
+"end\n"
+
+"/IMD 8 dict def\n"
+
+"IMD begin\n"
+"/ImageType 1 def\n"
+"/Width mx def\n"           
+"/Height my def\n"
+"/BitsPerComponent 1 def\n"
+"/ImageMatrix [ mx 0 0 my neg 0 my ] def\n"
+"/Decode [ 1 0 ] def\n"
+"end\n"
+
+"<<\n"
+"/ImageType 3\n"
+"/InterleaveType 2\n"
+"/MaskDict IMD\n"
+"/DataDict IDD\n"
+">> image GR\n"
+"} bind def\n"
+
+
+"\n"
+;
+
+// end prolog 
+
+int fltk3::PostScriptGraphicsDriver::start_postscript (int pagecount, 
+    enum fltk3::PagedDevice::Page_Format format, enum fltk3::PagedDevice::Page_Layout layout)
+//returns 0 iff OK
+{
+  int w, h, x;
+  if (format == fltk3::PagedDevice::A4) {
+    left_margin = 18;
+    top_margin = 18;
+  }
+  else {
+    left_margin = 12;
+    top_margin = 12;
+  }
+  page_format_ = (enum fltk3::PagedDevice::Page_Format)(format | layout);
+  if (layout & fltk3::PagedDevice::LANDSCAPE){
+    ph_ = fltk3::PagedDevice::page_formats[format].width;
+    pw_ = fltk3::PagedDevice::page_formats[format].height;
+  } else {
+    pw_ = fltk3::PagedDevice::page_formats[format].width;
+    ph_ = fltk3::PagedDevice::page_formats[format].height;
+  }
+  
+  fputs("%!PS-Adobe-3.0\n", output);
+  fputs("%%Creator: FLTK\n", output);
+  if (lang_level_>1)
+    fprintf(output, "%%%%LanguageLevel: %i\n" , lang_level_);
+  if ((pages_ = pagecount))
+    fprintf(output, "%%%%Pages: %i\n", pagecount);
+  else
+    fputs("%%Pages: (atend)\n", output);
+  fprintf(output, "%%%%BeginFeature: *PageSize %s\n", fltk3::PagedDevice::page_formats[format].name );
+  w = fltk3::PagedDevice::page_formats[format].width;
+  h = fltk3::PagedDevice::page_formats[format].height;
+  if (lang_level_ == 3 && (layout & fltk3::PagedDevice::LANDSCAPE) ) { x = w; w = h; h = x; }
+  fprintf(output, "<</PageSize[%d %d]>>setpagedevice\n", w, h );
+  fputs("%%EndFeature\n", output);
+  fputs("%%EndComments\n", output);
+  fputs(prolog, output);
+  if (lang_level_ > 1) {
+    fputs(prolog_2, output);
+    }
+  if (lang_level_ == 2) {
+    fputs(prolog_2_pixmap, output);
+    }
+  if (lang_level_ > 2)
+    fputs(prolog_3, output);
+  if (lang_level_ >= 3) {
+    fputs("/CS { clipsave } bind def\n", output);
+    fputs("/CR { cliprestore } bind def\n", output);
+  } else {
+    fputs("/CS { GS } bind def\n", output);
+    fputs("/CR { GR } bind def\n", output);
+  }
+  page_policy_ = 1;
+  
+  
+  fputs("%%EndProlog\n",output);
+  if (lang_level_ >= 2)
+    fprintf(output,"<< /Policies << /Pagesize 1 >> >> setpagedevice\n");
+  
+  reset();
+  nPages=0;
+  return 0;
+}
+
+void fltk3::PostScriptGraphicsDriver::recover(){
+  color(cr_,cg_,cb_);
+  line_style(linestyle_,linewidth_,linedash_);
+  font(GraphicsDriver::font(), GraphicsDriver::size());
+}
+
+void fltk3::PostScriptGraphicsDriver::reset(){
+  gap_=1;
+  clip_=0;
+  cr_=cg_=cb_=0;
+  GraphicsDriver::font(fltk3::HELVETICA, 12);
+  linewidth_=0;
+  linestyle_=fltk3::SOLID;
+  strcpy(linedash_,"");
+  Clip *c=clip_;   ////just not to have memory leaks for badly writen code (forgotten clip popping)
+  
+  while(c){
+    clip_=clip_->prev;
+    delete c;
+    c=clip_;
+  }
+  
+}
+
+void fltk3::PostScriptGraphicsDriver::page_policy(int p){
+  page_policy_ = p;
+  if(lang_level_>=2)
+    fprintf(output,"<< /Policies << /Pagesize %i >> >> setpagedevice\n", p);
+}
+
+// //////////////////// paging //////////////////////////////////////////
+
+
+
+void fltk3::PostScriptGraphicsDriver::page(double pw, double ph, int media) {
+  
+  if (nPages){
+    fprintf(output, "CR\nGR\nGR\nGR\nSP\nrestore\n");
+  }
+  ++nPages;
+  fprintf(output, "%%%%Page: %i %i\n" , nPages , nPages);
+  fprintf(output, "%%%%PageBoundingBox: 0 0 %d %d\n", (int)pw, (int)ph);
+  if (pw>ph){
+    fprintf(output, "%%%%PageOrientation: Landscape\n");
+  }else{
+    fprintf(output, "%%%%PageOrientation: Portrait\n");
+  }
+  
+  fprintf(output, "%%%%BeginPageSetup\n");
+  if((media & fltk3::PagedDevice::MEDIA) &&(lang_level_>1)){
+    int r = media & fltk3::PagedDevice::REVERSED;
+    if(r) r = 2;
+    fprintf(output, "<< /PageSize [%i %i] /Orientation %i>> setpagedevice\n", (int)(pw+.5), (int)(ph+.5), r);
+  }
+  fprintf(output, "%%%%EndPageSetup\n");
+  
+  //pw_ = pw;
+  //ph_ = ph;
+  reset();
+  
+  fprintf(output, "save\n");
+  fprintf(output, "GS\n");
+  fprintf(output, "%g %g TR\n", (double)0 /*lm_*/ , ph_ /* - tm_*/);
+  fprintf(output, "1 -1 SC\n");
+  line_style(0);
+  fprintf(output, "GS\n");
+  
+  if (!((media & fltk3::PagedDevice::MEDIA) &&(lang_level_>1))){
+    if (pw > ph) {
+      if(media & fltk3::PagedDevice::REVERSED) {
+        fprintf(output, "-90 rotate %i 0 translate\n", int(-pw));
+	}
+      else {
+        fprintf(output, "90 rotate -%i -%i translate\n", (lang_level_ == 2 ? int(pw - ph) : 0), int(ph));
+	}
+      }
+      else {
+	if(media & fltk3::PagedDevice::REVERSED)
+	  fprintf(output, "180 rotate %i %i translate\n", int(-pw), int(-ph));
+	}
+  }
+  fprintf(output, "GS\nCS\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::page(int format){
+/*  if(format &  fltk3::PagedDevice::LANDSCAPE){
+    ph_=fltk3::PagedDevice::page_formats[format & 0xFF].width;
+    pw_=fltk3::PagedDevice::page_formats[format & 0xFF].height;
+  }else{
+    pw_=fltk3::PagedDevice::page_formats[format & 0xFF].width;
+    ph_=fltk3::PagedDevice::page_formats[format & 0xFF].height;
+  }*/
+  page(pw_,ph_,format & 0xFF00);//,orientation only;
+}
+
+void fltk3::PostScriptGraphicsDriver::rect(int x, int y, int w, int h) {
+  // Commented code does not work, i can't find the bug ;-(
+  // fprintf(output, "GS\n");
+  //  fprintf(output, "%i, %i, %i, %i R\n", x , y , w, h);
+  //  fprintf(output, "GR\n");
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x , y);
+  fprintf(output, "%i %i LT\n", x+w-1 , y);
+  fprintf(output, "%i %i LT\n", x+w-1 , y+h-1);
+  fprintf(output, "%i %i LT\n", x , y+h-1);
+  fprintf(output, "ECP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::rectf(int x, int y, int w, int h) {
+  fprintf(output, "%g %g %i %i FR\n", x-0.5, y-0.5, w, h);
+}
+
+void fltk3::PostScriptGraphicsDriver::line(int x1, int y1, int x2, int y2) {
+  fprintf(output, "GS\n");
+  fprintf(output, "%i %i %i %i L\n", x1 , y1, x2 ,y2);
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::line(int x0, int y0, int x1, int y1, int x2, int y2) {
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x0 , y0);
+  fprintf(output, "%i %i LT\n", x1 , y1);
+  fprintf(output, "%i %i LT\n", x2 , y2);
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::xyline(int x, int y, int x1, int y2, int x3){
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x , y );
+  fprintf(output, "%i %i LT\n", x1 , y );
+  fprintf(output, "%i %i LT\n", x1 , y2);
+  fprintf(output,"%i %i LT\n", x3 , y2);
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+}
+
+
+void fltk3::PostScriptGraphicsDriver::xyline(int x, int y, int x1, int y2){
+  
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x , y);
+  fprintf(output,"%i %i LT\n", x1 , y);
+  fprintf(output, "%i %i LT\n", x1 , y2 );
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::xyline(int x, int y, int x1){
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x , y);
+  fprintf(output, "%i %i LT\n", x1 , y );
+  fprintf(output, "ELP\n");
+  
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::yxline(int x, int y, int y1, int x2, int y3){
+  fprintf(output, "GS\n");
+  
+  fprintf(output,"BP\n");
+  fprintf(output,"%i %i MT\n", x , y);
+  fprintf(output, "%i %i LT\n", x , y1 );
+  fprintf(output, "%i %i LT\n", x2 , y1 );
+  fprintf(output , "%i %i LT\n", x2 , y3);
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::yxline(int x, int y, int y1, int x2){
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x , y);
+  fprintf(output, "%i %i LT\n", x , y1);
+  fprintf(output, "%i %i LT\n", x2 , y1);
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::yxline(int x, int y, int y1){
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x , y);
+  fprintf(output, "%i %i LT\n", x , y1);
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::loop(int x0, int y0, int x1, int y1, int x2, int y2) {
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x0 , y0);
+  fprintf(output, "%i %i LT\n", x1 , y1);
+  fprintf(output, "%i %i LT\n", x2 , y2);
+  fprintf(output, "ECP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x0 , y0);
+  fprintf(output, "%i %i LT\n", x1 , y1);
+  fprintf(output, "%i %i LT\n", x2 , y2);
+  fprintf(output, "%i %i LT\n", x3 , y3);
+  fprintf(output, "ECP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::polygon(int x0, int y0, int x1, int y1, int x2, int y2) {
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x0 , y0);
+  fprintf(output,"%i %i LT\n", x1 , y1);
+  fprintf(output, "%i %i LT\n", x2 , y2);
+  fprintf(output, "EFP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {
+  fprintf(output, "GS\n");
+  fprintf(output,"BP\n");
+  fprintf(output, "%i %i MT\n", x0 , y0 );
+  fprintf(output, "%i %i LT\n", x1 , y1 );
+  fprintf(output, "%i %i LT\n", x2 , y2 );
+  fprintf(output, "%i %i LT\n", x3 , y3 );
+  
+  fprintf(output, "EFP\n");
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::point(int x, int y){
+  rectf(x,y,1,1);
+}
+
+static int dashes_flat[5][7]={
+{-1,0,0,0,0,0,0},
+{3,1,-1,0,0,0,0},
+{1,1,-1,0,0,0,0},
+{3,1,1,1,-1,0,0},
+{3,1,1,1,1,1,-1}
+};
+
+
+//yeah, hack...
+static double dashes_cap[5][7]={
+{-1,0,0,0,0,0,0},
+{2,2,-1,0,0,0,0},
+{0.01,1.99,-1,0,0,0,0},
+{2,2,0.01,1.99,-1,0,0},
+{2,2,0.01,1.99,0.01,1.99,-1}
+};
+
+
+void fltk3::PostScriptGraphicsDriver::line_style(int style, int width, char* dashes){
+  //line_styled_=1;
+  
+  linewidth_=width;
+  linestyle_=style;
+  //dashes_= dashes;
+  if(dashes){
+    if(dashes != linedash_)
+      strcpy(linedash_,dashes);
+    
+  }else
+    linedash_[0]=0;
+  char width0 = 0;
+  if(!width){
+    width=1; //for screen drawing compatibility
+    width0=1;
+  }
+  
+  fprintf(output, "%i setlinewidth\n", width);
+  
+  if(!style && (!dashes || !(*dashes)) && width0) //system lines
+    style = fltk3::CAP_SQUARE;
+  
+  int cap = (style &0xf00) >> 8;
+  if(cap) cap--;
+  fprintf(output,"%i setlinecap\n", cap);
+  
+  int join = (style & 0xf000) >> 12;
+  
+  if(join) join--;
+  fprintf(output,"%i setlinejoin\n", join);
+  
+  
+  fprintf(output, "[");
+  if(dashes && *dashes){
+    while(*dashes){
+      fprintf(output, "%i ", *dashes);
+      dashes++;
+    }
+  }else{
+    int * ds; 
+    if(style & 0x200){ // round and square caps, dash length need to be adjusted
+      double *dt = dashes_cap[style & 0xff];
+      while (*dt >= 0){
+	fprintf(output, "%g ",width * (*dt));
+	dt++;
+      }
+    }else{
+      
+      ds = dashes_flat[style & 0xff];
+      while (*ds >= 0){
+	fprintf(output, "%i ",width * (*ds));
+        ds++;
+      }
+    }
+  }
+  fprintf(output, "] 0 setdash\n");
+}
+
+static const char *_fontNames[] = {
+"Helvetica2B", 
+"Helvetica-Bold2B",
+"Helvetica-Oblique2B",
+"Helvetica-BoldOblique2B",
+"Courier2B",
+"Courier-Bold2B",
+"Courier-Oblique2B",
+"Courier-BoldOblique2B",
+"Times-Roman2B",
+"Times-Bold2B",
+"Times-Italic2B",
+"Times-BoldItalic2B",
+"Symbol",
+"Courier2B",
+"Courier-Bold2B",
+"ZapfDingbats"
+};
+
+void fltk3::PostScriptGraphicsDriver::font(int f, int s) {
+  fltk3::GraphicsDriver *driver = fltk3::DisplayDevice::display_device()->driver();
+  driver->font(f,s); // Use display fonts for font measurement
+  GraphicsDriver::font(f, s);
+  Fl_Font_Descriptor *desc = driver->font_descriptor();
+  this->font_descriptor(desc);
+  if (f < fltk3::FREE_FONT) {
+    float ps_size = s;
+    fprintf(output, "/%s SF\n" , _fontNames[f]);
+#if defined(USE_X11) 
+#if USE_XFT
+    // Xft font height is sometimes larger than the required size (see STR 2566).
+    // Increase the PostScript font size by 15% without exceeding the display font height 
+    int max = desc->font->height;
+    ps_size = s * 1.15;
+    if (ps_size > max) ps_size = max;
+#else
+    // Non-Xft fonts can be smaller than required.
+    // Set the PostScript font size to the display font height 
+    char *name = desc->font->font_name_list[0];
+    char *p = strstr(name, "--");
+    if (p) {
+      sscanf(p + 2, "%f", &ps_size);
+    }
+#endif // USE_XFT
+#endif // USE_X11
+    fprintf(output,"%.1f FS\n", ps_size);
+  }
+}
+
+double fltk3::PostScriptGraphicsDriver::width(const char *s, int n) {
+  return fltk3::DisplayDevice::display_device()->driver()->width(s, n);
+}
+
+int fltk3::PostScriptGraphicsDriver::height() {
+  return fltk3::DisplayDevice::display_device()->driver()->height();
+}
+
+int fltk3::PostScriptGraphicsDriver::descent() {
+  return fltk3::DisplayDevice::display_device()->driver()->descent();
+}
+
+void fltk3::PostScriptGraphicsDriver::text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
+  fltk3::DisplayDevice::display_device()->driver()->text_extents(c, n, dx, dy, w, h);
+}
+
+
+void fltk3::PostScriptGraphicsDriver::color(fltk3::Color c) {
+  fltk3::get_color(c, cr_, cg_, cb_);
+  color(cr_, cg_, cb_);
+}
+
+void fltk3::PostScriptGraphicsDriver::color(unsigned char r, unsigned char g, unsigned char b) {
+  GraphicsDriver::color( fltk3::rgb_color(r, g, b) );
+  cr_ = r; cg_ = g; cb_ = b;
+  if (r == g && g == b) {
+    double gray = r/255.0;
+    fprintf(output, "%g GL\n", gray);
+  } else {
+    double fr, fg, fb;
+    fr = r/255.0;
+    fg = g/255.0;
+    fb = b/255.0;
+    fprintf(output, "%g %g %g SRGB\n", fr , fg , fb);
+  }
+}
+
+void fltk3::PostScriptGraphicsDriver::draw(int angle, const char *str, int n, int x, int y)
+{
+  fprintf(output, "GS %d %d translate %d rotate\n", x, y, - angle);
+  this->transformed_draw(str, n, 0, 0);
+  fprintf(output, "GR\n");
+}
+
+
+// computes the mask for the RGB image img of all pixels with color != bg
+static uchar *calc_mask(uchar *img, int w, int h, fltk3::Color bg)
+{
+  uchar red, green, blue, r, g, b;
+  uchar bit, byte, *q;
+  fltk3::get_color(bg, red, green, blue);
+  int W = (w+7)/8; // width of mask
+  uchar* mask = new uchar[W * h];
+  q = mask;
+  while (h-- > 0) { // for each row
+    bit = 0x80; // byte with last bit set
+    byte = 0; // next mask byte to compute
+    for (int j = 0; j < w; j++) { // for each column
+      r = *img++; // the pixel color components
+      g = *img++;
+      b = *img++;
+      // if pixel doesn't have bg color, put it in mask
+      if (r != red || g != green || b != blue) byte |= bit;
+      bit = bit>>1; // shift bit one step to the right
+      if (bit == 0) { // single set bit has fallen out
+	*q++ = byte; // enter byte in mask
+	byte = 0; // reset next mask byte to zero
+	bit = 0x80; // and this byte
+	}
+      }
+    if (bit != 0x80) *q++ = byte; // enter last columns' byte in mask
+    }
+  return mask;
+}
+
+// write to PostScript a bitmap image of a UTF8 string
+static void transformed_draw_extra(const char* str, int n, double x, double y, int w, 
+      FILE *output, fltk3::GraphicsDriver *driver, bool rtl) {
+  // scale for bitmask computation
+#if defined(USE_X11) && !USE_XFT
+  float scale = 1; // don't scale because we can't expect to have scalable fonts
+#else
+  float scale = 2;
+#endif
+  fltk3::Fontsize old_size = driver->size();
+  fltk3::Font fontnum = driver->font();
+  int w_scaled =  (int)(w * (scale + 0.5));
+  int h = (int)(driver->height() * scale);
+  // create an offscreen image of the string
+  fltk3::Color text_color = driver->color();
+  fltk3::Color bg_color = fltk3::contrast(fltk3::WHITE, text_color);
+  fltk3::Offscreen off = fl_create_offscreen(w_scaled, (int)(h+3*scale) );
+  fl_begin_offscreen(off);
+  fltk3::color(bg_color);
+  // color offscreen background with a shade contrasting with the text color
+  fltk3::rectf(0, 0, w_scaled, (int)(h+3*scale) );
+  fltk3::color(text_color);
+#if defined(USE_X11) && !USE_XFT
+  // force seeing this font as new so it's applied to the offscreen graphics context
+  fltk3::graphics_driver->font_descriptor(NULL);
+  fltk3::font(fontnum, 0);
+#endif
+  fltk3::font(fontnum, (fltk3::Fontsize)(scale * old_size) );
+  int w2 = (int)fltk3::width(str, n);
+  // draw string in offscreen
+  if (rtl) fltk3::rtl_draw(str, n, w2, (int)(h * 0.8) );
+  else fltk3::draw(str, n, 1, (int)(h * 0.8) );
+  // read (most of) the offscreen image
+  uchar *img = fltk3::read_image(NULL, 1, 1, w2, h, 0);
+  fl_end_offscreen();
+  driver->font(fontnum, old_size);
+  fl_delete_offscreen(off);
+  // compute the mask of what is not the background
+  uchar *mask = calc_mask(img, w2, h, bg_color);
+  delete[] img;
+  // write the string image to PostScript as a scaled bitmask
+  scale = w2 / float(w);
+  fprintf(output, "%g %g %g %g %d %d MI\n", x, y - h*0.77/scale, w2/scale, h/scale, w2, h);
+  uchar *di;
+  int wmask = (w2+7)/8;
+  for (int j = h - 1; j >= 0; j--){
+    di = mask + j * wmask;
+    for (int i = 0; i < wmask; i++){
+      //if (!(i%80)) fprintf(output, "\n"); // don't have lines longer than 255 chars
+      fprintf(output, "%2.2x", *di );
+      di++;
+    }
+    fprintf(output,"\n");
+  }
+  fprintf(output,">\n");
+  delete[] mask;
+}
+
+static int is_in_table(unsigned utf) {
+  unsigned i;
+  static unsigned extra_table_roman[] = { // unicodes/*names*/ of other characters from PostScript standard fonts
+    0x192/*florin*/, 0x2C6/*circumflex*/, 0x2C7/*caron*/, 
+    0x2D8/*breve*/, 0x2D9/*dotaccent*/, 0x2DA/*ring*/, 0x2DB/*ogonek*/, 0x2DC/*tilde*/, 0x2DD/*hungarumlaut*/,
+    0x2013/*endash*/, 0x2014/*emdash*/, 0x2018/*quoteleft*/, 0x2019/*quoteright*/, 
+    0x201A/*quotesinglbase*/, 0x201C/*quotedblleft*/, 0x201D/*quotedblright*/, 0x201E/*quotedblbase*/, 
+    0x2020/*dagger*/, 0x2021/*daggerdbl*/, 0x2022/*bullet*/,
+    0x2026/*ellipsis*/, 0x2030/*perthousand*/, 0x2039/*guilsinglleft*/, 0x203A/*guilsinglright*/, 
+    0x2044/*fraction*/, 0x20AC/*Euro*/, 0x2122/*trademark*/, 
+    0x2202/*partialdiff*/, 0x2206/*Delta*/, 0x2211/*summation*/, 0x221A/*radical*/,
+    0x221E/*infinity*/, 0x2260/*notequal*/, 0x2264/*lessequal*/, 
+    0x2265/*greaterequal*/, 
+    0x25CA/*lozenge*/, 0xFB01/*fi*/, 0xFB02/*fl*/,
+    0xF8FF/*apple*/
+  };
+  for ( i = 0; i < sizeof(extra_table_roman)/sizeof(int); i++) {
+    if (extra_table_roman[i] == utf) return i + 0x180;
+  }
+  return 0;
+}
+
+// outputs in PostScript a UTF8 string using the same width in points as on display
+void fltk3::PostScriptGraphicsDriver::transformed_draw(const char* str, int n, double x, double y) {
+  int len, code;
+  if (!n || !str || !*str) return;
+  // compute display width of string
+  int w = (int)width(str, n);
+  if (w == 0) return;
+  if (GraphicsDriver::font() >= fltk3::FREE_FONT) {
+    transformed_draw_extra(str, n, x, y, w, output, this, false);
+    return;
+    }
+  fprintf(output, "%d <", w);
+  // transforms UTF8 encoding to our custom PostScript encoding as follows:
+  // extract each unicode character
+  // if unicode <= 0x17F, unicode and PostScript codes are identical
+  // if unicode is one of the values listed in extra_table_roman above
+  //    its PostScript code is 0x180 + the character's rank in extra_table_roman
+  // if unicode is something else, draw all string as bitmap image
+
+  const char *last = str + n;
+  const char *str2 = str;
+  while (str2 < last) {
+    // Extract each unicode character of string.
+    unsigned utf = fltk3::utf8decode(str2, last, &len);
+    str2 += len;
+    if (utf <= 0x17F) { // until Latin Extended-A
+      ;
+      }
+    else if ( (code = is_in_table(utf)) != 0) { // other handled characters
+      utf = code;
+      }
+    else { // unhandled character: draw all string as bitmap image
+      fprintf(output, "> pop pop\n"); // close and ignore the opened hex string
+      transformed_draw_extra(str, n, x, y, w, output, this, false);
+      return;
+    }
+    fprintf(output, "%4.4X", utf);
+  }
+  fprintf(output, "> %g %g show_pos_width\n", x, y);
+}
+
+void fltk3::PostScriptGraphicsDriver::rtl_draw(const char* str, int n, int x, int y) {
+  int w = (int)width(str, n);
+  transformed_draw_extra(str, n, x - w, y, w, output, this, true);
+}
+
+void fltk3::PostScriptGraphicsDriver::concat(){
+  fprintf(output,"[%g %g %g %g %g %g] CT\n", fl_matrix->a , fl_matrix->b , fl_matrix->c , fl_matrix->d , fl_matrix->x , fl_matrix->y);
+}
+
+void fltk3::PostScriptGraphicsDriver::reconcat(){
+  fprintf(output, "[%g %g %g %g %g %g] RCT\n" , fl_matrix->a , fl_matrix->b , fl_matrix->c , fl_matrix->d , fl_matrix->x , fl_matrix->y);
+}
+
+/////////////////  transformed (double) drawings ////////////////////////////////
+
+
+void fltk3::PostScriptGraphicsDriver::begin_points(){
+  fprintf(output, "GS\n");
+  concat();
+  
+  fprintf(output, "BP\n");
+  gap_=1;
+  shape_=POINTS;
+}
+
+void fltk3::PostScriptGraphicsDriver::begin_line(){
+  fprintf(output, "GS\n");
+  concat();
+  fprintf(output, "BP\n");
+  gap_=1;
+  shape_=LINE;
+}
+
+void fltk3::PostScriptGraphicsDriver::begin_loop(){
+  fprintf(output, "GS\n");
+  concat();
+  fprintf(output, "BP\n");
+  gap_=1;
+  shape_=LOOP;
+}
+
+void fltk3::PostScriptGraphicsDriver::begin_polygon(){
+  fprintf(output, "GS\n");
+  concat();
+  fprintf(output, "BP\n");
+  gap_=1;
+  shape_=POLYGON;
+}
+
+void fltk3::PostScriptGraphicsDriver::vertex(double x, double y){
+  if(shape_==POINTS){
+    fprintf(output,"%g %g MT\n", x , y);
+    gap_=1;
+    return;
+  }
+  if(gap_){
+    fprintf(output,"%g %g MT\n", x , y);
+    gap_=0;
+  }else
+    fprintf(output, "%g %g LT\n", x , y);
+}
+
+void fltk3::PostScriptGraphicsDriver::curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3){
+  if(shape_==NONE) return;
+  if(gap_)
+    fprintf(output,"%g %g MT\n", x , y);
+  else
+    fprintf(output, "%g %g LT\n", x , y);
+  gap_=0;
+  
+  fprintf(output, "%g %g %g %g %g %g curveto \n", x1 , y1 , x2 , y2 , x3 , y3);
+}
+
+
+void fltk3::PostScriptGraphicsDriver::circle(double x, double y, double r){
+  if(shape_==NONE){
+    fprintf(output, "GS\n");
+    concat();
+    //    fprintf(output, "BP\n");
+    fprintf(output,"%g %g %g 0 360 arc\n", x , y , r);
+    reconcat();
+    //    fprintf(output, "ELP\n");
+    fprintf(output, "GR\n");
+  }else
+    
+    fprintf(output, "%g %g %g 0 360 arc\n", x , y , r);
+  
+}
+
+void fltk3::PostScriptGraphicsDriver::arc(double x, double y, double r, double start, double a){
+  if(shape_==NONE) return;
+  gap_=0;
+  if(start>a)
+    fprintf(output, "%g %g %g %g %g arc\n", x , y , r , -start, -a);
+  else
+    fprintf(output, "%g %g %g %g %g arcn\n", x , y , r , -start, -a);
+  
+}
+
+void fltk3::PostScriptGraphicsDriver::arc(int x, int y, int w, int h, double a1, double a2) {
+  fprintf(output, "GS\n");
+  //fprintf(output, "BP\n");
+  begin_line();
+  fprintf(output, "%g %g TR\n", x + w/2.0 -0.5 , y + h/2.0 - 0.5);
+  fprintf(output, "%g %g SC\n", (w-1)/2.0 , (h-1)/2.0 );
+  arc(0,0,1,a2,a1);
+  //  fprintf(output, "0 0 1 %g %g arc\n" , -a1 , -a2);
+  fprintf(output, "%g %g SC\n", 2.0/(w-1) , 2.0/(h-1) );
+  fprintf(output, "%g %g TR\n", -x - w/2.0 +0.5 , -y - h/2.0 +0.5);
+  end_line();
+  
+  //  fprintf(output, "%g setlinewidth\n",  2/sqrt(w*h));
+  //  fprintf(output, "ELP\n");
+  //  fprintf(output, 2.0/w , 2.0/w , " SC\n";
+  //  fprintf(output, (-x - w/2.0) , (-y - h/2)  , " TR\n";
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::pie(int x, int y, int w, int h, double a1, double a2) {
+  
+  fprintf(output, "GS\n");
+  fprintf(output, "%g %g TR\n", x + w/2.0 -0.5 , y + h/2.0 - 0.5);
+  fprintf(output, "%g %g SC\n", (w-1)/2.0 , (h-1)/2.0 );
+  begin_polygon();
+  vertex(0,0);
+  arc(0.0,0.0, 1, a2, a1);
+  end_polygon();
+  fprintf(output, "GR\n");
+}
+
+void fltk3::PostScriptGraphicsDriver::end_points(){
+  gap_=1;
+  reconcat();
+  fprintf(output, "ELP\n"); //??
+  fprintf(output, "GR\n");
+  shape_=NONE;
+}
+
+void fltk3::PostScriptGraphicsDriver::end_line(){
+  gap_=1;
+  reconcat();
+  fprintf(output, "ELP\n");
+  fprintf(output, "GR\n");
+  shape_=NONE;
+}
+void fltk3::PostScriptGraphicsDriver::end_loop(){
+  gap_=1;
+  reconcat();
+  fprintf(output, "ECP\n");
+  fprintf(output, "GR\n");
+  shape_=NONE;
+}
+
+void fltk3::PostScriptGraphicsDriver::end_polygon(){
+  
+  gap_=1;
+  reconcat();
+  fprintf(output, "EFP\n");
+  fprintf(output, "GR\n");
+  shape_=NONE;
+}
+
+void fltk3::PostScriptGraphicsDriver::transformed_vertex(double x, double y){
+  reconcat();
+  if(gap_){
+    fprintf(output, "%g %g MT\n", x , y);
+    gap_=0;
+  }else
+    fprintf(output, "%g %g LT\n", x , y);
+  concat();
+}
+
+/////////////////////////////   Clipping /////////////////////////////////////////////
+
+void fltk3::PostScriptGraphicsDriver::push_clip(int x, int y, int w, int h) {
+  Clip * c=new Clip();
+  clip_box(x,y,w,h,c->x,c->y,c->w,c->h);
+  c->prev=clip_;
+  clip_=c;
+  fprintf(output, "CR\nCS\n");
+  if(lang_level_<3)
+    recover();
+  fprintf(output, "%g %g %i %i CL\n", clip_->x-0.5 , clip_->y-0.5 , clip_->w  , clip_->h);
+  
+}
+
+void fltk3::PostScriptGraphicsDriver::push_no_clip() {
+  Clip * c = new Clip();
+  c->prev=clip_;
+  clip_=c;
+  clip_->x = clip_->y = clip_->w = clip_->h = -1;
+  fprintf(output, "CR\nCS\n");
+  if(lang_level_<3)
+    recover();
+}
+
+void fltk3::PostScriptGraphicsDriver::pop_clip() {
+  if(!clip_)return;
+  Clip * c=clip_;
+  clip_=clip_->prev;
+  delete c;
+  fprintf(output, "CR\nCS\n");
+  if(clip_ && clip_->w >0)
+    fprintf(output, "%g %g %i %i CL\n", clip_->x - 0.5, clip_->y - 0.5, clip_->w  , clip_->h);
+  // uh, -0.5 is to match screen clipping, for floats there should be something beter
+  if(lang_level_<3)
+    recover();
+}
+
+int fltk3::PostScriptGraphicsDriver::clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H){
+  if(!clip_){
+    X=x;Y=y;W=w;H=h;
+    return 1;
+  }
+  if(clip_->w < 0){
+    X=x;Y=y;W=w;H=h;
+    return 1;
+  }
+  int ret=0;
+  if (x > (X=clip_->x)) {X=x; ret=1;}
+  if (y > (Y=clip_->y)) {Y=y; ret=1;}
+  if ((x+w) < (clip_->x+clip_->w)) {
+    W=x+w-X;
+    
+    ret=1;
+    
+  }else
+    W = clip_->x + clip_->w - X;
+  if(W<0){
+    W=0;
+    return 1;
+  }
+  if ((y+h) < (clip_->y+clip_->h)) {
+    H=y+h-Y;
+    ret=1;
+  }else
+    H = clip_->y + clip_->h - Y;
+  if(H<0){
+    W=0;
+    H=0;
+    return 1;
+  }
+  return ret;
+}
+
+int fltk3::PostScriptGraphicsDriver::not_clipped(int x, int y, int w, int h){
+  if(!clip_) return 1;
+  if(clip_->w < 0) return 1;
+  int X, Y, W, H;
+  clip_box(x, y, w, h, X, Y, W, H);
+  if(W) return 1;
+  return 0;
+}
+
+
+void fltk3::PostScriptFileDevice::margins(int *left, int *top, int *right, int *bottom) // to implement
+{
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  if(left) *left = (int)(ps->left_margin / ps->scale_x + .5);
+  if(right) *right = (int)(ps->left_margin / ps->scale_x + .5);
+  if(top) *top = (int)(ps->top_margin / ps->scale_y + .5);
+  if(bottom) *bottom = (int)(ps->top_margin / ps->scale_y + .5);
+}
+
+int fltk3::PostScriptFileDevice::printable_rect(int *w, int *h)
+//returns 0 iff OK
+{
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  if(w) *w = (int)((ps->pw_ - 2 * ps->left_margin) / ps->scale_x + .5);
+  if(h) *h = (int)((ps->ph_ - 2 * ps->top_margin) / ps->scale_y + .5);
+  return 0;
+}
+
+void fltk3::PostScriptFileDevice::origin(int *x, int *y)
+{
+  PagedDevice::origin(x, y);
+}
+
+void fltk3::PostScriptFileDevice::origin(int x, int y)
+{
+  x_offset = x;
+  y_offset = y;
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  fprintf(ps->output, "GR GR GS %d %d TR  %f %f SC %d %d TR %f rotate GS\n", 
+	  ps->left_margin, ps->top_margin, ps->scale_x, ps->scale_y, x, y, ps->angle);
+}
+
+void fltk3::PostScriptFileDevice::scale (float s_x, float s_y)
+{
+  if (s_y == 0.) s_y = s_x;
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  ps->scale_x = s_x;
+  ps->scale_y = s_y;
+  fprintf(ps->output, "GR GR GS %d %d TR  %f %f SC %f rotate GS\n", 
+	  ps->left_margin, ps->top_margin, ps->scale_x, ps->scale_y, ps->angle);
+}
+
+void fltk3::PostScriptFileDevice::rotate (float rot_angle)
+{
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  ps->angle = - rot_angle;
+  fprintf(ps->output, "GR GR GS %d %d TR  %f %f SC %d %d TR %f rotate GS\n", 
+	  ps->left_margin, ps->top_margin, ps->scale_x, ps->scale_y, x_offset, y_offset, ps->angle);
+}
+
+void fltk3::PostScriptFileDevice::translate(int x, int y)
+{
+  fprintf(driver()->output, "GS %d %d translate GS\n", x, y);
+}
+
+void fltk3::PostScriptFileDevice::untranslate(void)
+{
+  fprintf(driver()->output, "GR GR\n");
+}
+
+int fltk3::PostScriptFileDevice::start_page (void)
+{
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  ps->page(ps->page_format_);
+  x_offset = 0;
+  y_offset = 0;
+  ps->scale_x = ps->scale_y = 1.;
+  ps->angle = 0;
+  fprintf(ps->output, "GR GR GS %d %d translate GS\n", ps->left_margin, ps->top_margin);
+  return 0;
+}
+
+int fltk3::PostScriptFileDevice::end_page (void)
+{
+  return 0;
+}
+
+void fltk3::PostScriptFileDevice::end_job (void)
+// finishes PostScript & closes file
+{
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  if (ps->nPages) {  // for eps nPages is 0 so it is fine ....
+    fprintf(ps->output, "CR\nGR\nGR\nGR\nSP\n restore\n");
+    if (!ps->pages_){
+      fprintf(ps->output, "%%%%Trailer\n");
+      fprintf(ps->output, "%%%%Pages: %i\n" , ps->nPages);
+    };
+  } else
+    fprintf(ps->output, "GR\n restore\n");
+  fputs("%%EOF",ps->output);
+  ps->reset();
+  fflush(ps->output);
+  if(ferror(ps->output)) {
+    fltk3::alert ("Error during PostScript data output.");
+    }
+  if (ps->close_cmd_) {
+    (*ps->close_cmd_)(ps->output);
+  } else {
+    fclose(ps->output);
+    }
+  while (ps->clip_){
+    fltk3::PostScriptGraphicsDriver::Clip * c= ps->clip_;
+    ps->clip_= ps->clip_->prev;
+    delete c;
+  }
+  fltk3::DisplayDevice::display_device()->set_current();
+}
+
+#if ! (defined(__APPLE__) || defined(WIN32) )
+int fltk3::PostScriptPrinter::start_job(int pages, int *firstpage, int *lastpage) {
+  enum fltk3::PagedDevice::Page_Format format;
+  enum fltk3::PagedDevice::Page_Layout layout;
+
+  // first test version for print dialog
+  if (!print_panel) make_print_panel();
+  print_load();
+  print_selection->deactivate();
+  print_all->setonly();
+  print_all->do_callback();
+  print_from->value("1");
+  { char tmp[10]; snprintf(tmp, sizeof(tmp), "%d", pages); print_to->value(tmp); }
+  print_panel->show(); // this is modal
+  while (print_panel->shown()) fltk3::wait();
+  
+  if (!print_start) // user clicked cancel
+    return 1;
+
+  // get options
+
+  format = print_page_size->value() ? fltk3::PagedDevice::A4 : fltk3::PagedDevice::LETTER;
+  { // page range choice
+    int from = 1, to = pages;
+    if (print_pages->value()) {
+      sscanf(print_from->value(), "%d", &from);
+      sscanf(print_to->value(), "%d", &to);
+    }
+    if (from < 1) from = 1;
+    if (to > pages) to = pages;
+    if (to < from) to = from;
+    if (firstpage) *firstpage = from;
+    if (lastpage) *lastpage = to;
+    pages = to - from + 1;
+  }
+  
+  if (print_output_mode[0]->value()) layout = fltk3::PagedDevice::PORTRAIT;
+  else if (print_output_mode[1]->value()) layout = fltk3::PagedDevice::LANDSCAPE;
+  else if (print_output_mode[2]->value()) layout = fltk3::PagedDevice::PORTRAIT;
+  else layout = fltk3::PagedDevice::LANDSCAPE;
+
+  int print_pipe = print_choice->value();	// 0 = print to file, >0 = printer (pipe)
+
+  const char *media = print_page_size->text(print_page_size->value());
+  const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data();
+  if (!print_pipe) printer = "<File>";
+
+  if (!print_pipe) // fall back to file printing
+    return fltk3::PostScriptFileDevice::start_job (pages, format, layout);
+
+  // Print: pipe the output into the lp command...
+
+  char command[1024];
+  snprintf(command, sizeof(command), "lp -s -d %s -n %d -t '%s' -o media=%s",
+             printer, print_collate_button->value() ? 1 : (int)(print_copies->value() + 0.5),
+	     "FLTK", media);
+
+  fltk3::PostScriptGraphicsDriver *ps = driver();
+  ps->output = popen(command, "w");
+  if (!ps->output) {
+    fltk3::alert("could not run command: %s\n",command);
+    return 1;
+  }
+  ps->close_command(pclose);
+  this->set_current();
+  return ps->start_postscript(pages, format, layout); // start printing
+}
+
+#endif // ! (defined(__APPLE__) || defined(WIN32) )
+
+#endif // FLTK3_DOXYGEN
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_PostScript.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Preferences.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Preferences.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Preferences.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1803 @@
+//
+// "$Id$"
+//
+// Preferences methods for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2002-2010 by Matthias Melcher.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Preferences.h>
+#include <fltk3/Plugin.h>
+#include <fltk3/filename.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <sys/stat.h>
+#include <time.h>
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+#  include <windows.h>
+#  include <direct.h>
+#  include <io.h>
+// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
+// on Windows, which is supposed to be POSIX compliant...
+#  define access _access
+#  define mkdir _mkdir
+#elif defined (__APPLE__)
+#  include <ApplicationServices/ApplicationServices.h>
+#  include <unistd.h>
+#  include <dlfcn.h>
+#else
+#  include <unistd.h>
+#  include <dlfcn.h>
+#endif
+
+#ifdef WIN32
+#  include <windows.h>
+#  include <rpc.h>
+// function pointer for the UuidCreate Function
+// RPC_STATUS RPC_ENTRY UuidCreate(UUID __RPC_FAR *Uuid);
+typedef RPC_STATUS (WINAPI* uuid_func)(UUID __RPC_FAR *Uuid);
+#else
+#  include <sys/time.h>
+#endif // WIN32
+
+#ifdef __CYGWIN__
+#  include <wchar.h>
+#endif
+
+char fltk3::Preferences::nameBuffer[128];
+char fltk3::Preferences::uuidBuffer[40];
+fltk3::Preferences *fltk3::Preferences::runtimePrefs = 0;
+
+/**
+ * Returns a UUID as generated by the system.
+ *
+ * A UUID is a "universally unique identifier" which is commonly used in
+ * configuration files to create identities. A UUID in ASCII looks like this:
+ * <tt>937C4900-51AA-4C11-8DD3-7AB59944F03E</tt>. It has always 36 bytes plus
+ * a trailing zero.
+ *
+ * \return a pointer to a static buffer containing the new UUID in ASCII format.
+ *         The buffer is overwritten during every call to this function!
+ */
+const char *fltk3::Preferences::newUUID() {
+#ifdef __APPLE__
+  CFUUIDRef theUUID = CFUUIDCreate(NULL);
+  CFUUIDBytes b = CFUUIDGetUUIDBytes(theUUID);
+  sprintf(uuidBuffer, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+          b.byte0, b.byte1, b.byte2, b.byte3, b.byte4, b.byte5, b.byte6, b.byte7,
+          b.byte8, b.byte9, b.byte10, b.byte11, b.byte12, b.byte13, b.byte14, b.byte15);
+  CFRelease(theUUID);
+#elif defined (WIN32)
+  // First try and use the win API function UuidCreate(), but if that is not
+  // available, fall back to making something up from scratch.
+  // We do not want to link against the Rpcrt4.dll, as we will rarely use it,
+  // so we load the DLL dynamically, if it is available, and work from there.
+  static HMODULE hMod = NULL;
+  UUID ud;
+  UUID *pu = &ud;
+  int got_uuid = 0;
+
+  if (!hMod) {		// first time in?
+    hMod = LoadLibrary("Rpcrt4.dll");
+  }
+
+  if (hMod) {		// do we have a usable handle to Rpcrt4.dll?
+    uuid_func uuid_crt = (uuid_func)GetProcAddress(hMod, "UuidCreate");
+    if (uuid_crt != NULL) {
+      RPC_STATUS rpc_res = uuid_crt(pu);
+      if ( // is the return status OK for our needs?
+          (rpc_res == RPC_S_OK) ||		// all is well
+          (rpc_res == RPC_S_UUID_LOCAL_ONLY) || // only unique to this machine
+          (rpc_res == RPC_S_UUID_NO_ADDRESS)	// probably only locally unique
+        ) {
+        got_uuid = -1;
+        sprintf(uuidBuffer, "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+            pu->Data1, pu->Data2, pu->Data3, pu->Data4[0], pu->Data4[1],
+            pu->Data4[2], pu->Data4[3], pu->Data4[4],
+            pu->Data4[5], pu->Data4[6], pu->Data4[7]);
+      }
+    }
+  }
+  if (got_uuid == 0) {		// did not make a UUID - use fallback logic
+    unsigned char b[16];
+    time_t t = time(0);		// first 4 byte
+    b[0] = (unsigned char)t;
+    b[1] = (unsigned char)(t>>8);
+    b[2] = (unsigned char)(t>>16);
+    b[3] = (unsigned char)(t>>24);
+    int r = rand();		// four more bytes
+    b[4] = (unsigned char)r;
+    b[5] = (unsigned char)(r>>8);
+    b[6] = (unsigned char)(r>>16);
+    b[7] = (unsigned char)(r>>24);
+    // Now we try to find 4 more "random" bytes. We extract the
+    // lower 4 bytes from the address of t - it is created on the
+    // stack so *might* be in a different place each time...
+    // This is now done via a union to make it compile OK on 64-bit systems.
+    union { void *pv; unsigned char a[sizeof(void*)]; } v;
+    v.pv = (void *)(&t);
+    // NOTE: This assume that all WinXX systems are little-endian
+    b[8] = v.a[0];
+    b[9] = v.a[1];
+    b[10] = v.a[2];
+    b[11] = v.a[3];
+    TCHAR name[MAX_COMPUTERNAME_LENGTH + 1]; // only used to make last four bytes
+    DWORD nSize = MAX_COMPUTERNAME_LENGTH + 1;
+    // GetComputerName() does not depend on any extra libs, and returns something
+    // analogous to gethostname()
+    GetComputerName(name, &nSize);
+    //  use the first 4 TCHAR's of the name to create the last 4 bytes of our UUID
+    for (int ii = 0; ii < 4; ii++) {
+      b[12 + ii] = (unsigned char)name[ii];
+    }
+    sprintf(uuidBuffer, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+            b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],
+            b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]);
+  }
+#else
+  // warning Unix implementation of fltk3::Preferences::newUUID() incomplete!
+  // #include <uuid/uuid.h>
+  // void uuid_generate(uuid_t out);
+  unsigned char b[16];
+  time_t t = time(0);			// first 4 byte
+  b[0] = (unsigned char)t;
+  b[1] = (unsigned char)(t>>8);
+  b[2] = (unsigned char)(t>>16);
+  b[3] = (unsigned char)(t>>24);
+  int r = rand(); 			// four more bytes
+  b[4] = (unsigned char)r;
+  b[5] = (unsigned char)(r>>8);
+  b[6] = (unsigned char)(r>>16);
+  b[7] = (unsigned char)(r>>24);
+  unsigned long a = (unsigned long)&t;	// four more bytes
+  b[8] = (unsigned char)a;
+  b[9] = (unsigned char)(a>>8);
+  b[10] = (unsigned char)(a>>16);
+  b[11] = (unsigned char)(a>>24);
+  // Now we try to find 4 more "random" bytes. We extract the
+  // lower 4 bytes from the address of t - it is created on the
+  // stack so *might* be in a different place each time...
+  // This is now done via a union to make it compile OK on 64-bit systems.
+  union { void *pv; unsigned char a[sizeof(void*)]; } v;
+  v.pv = (void *)(&t);
+  // NOTE: May need to handle big- or little-endian systems here
+# if WORDS_BIGENDIAN
+  b[8] = v.a[sizeof(void*) - 1];
+  b[9] = v.a[sizeof(void*) - 2];
+  b[10] = v.a[sizeof(void*) - 3];
+  b[11] = v.a[sizeof(void*) - 4];
+# else /* data ordered for a little-endian system */
+  b[8] = v.a[0];
+  b[9] = v.a[1];
+  b[10] = v.a[2];
+  b[11] = v.a[3];
+# endif
+  char name[80];			// last four bytes
+  gethostname(name, 79);
+  memcpy(b+12, name, 4);
+  sprintf(uuidBuffer, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+          b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],
+          b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]);
+#endif
+
+  return uuidBuffer;
+}
+
+/**
+   The constructor creates a group that manages name/value pairs and
+   child groups. Groups are ready for reading and writing at any time.
+   The root argument is either fltk3::Preferences::USER
+   or fltk3::Preferences::SYSTEM.
+
+   This constructor creates the <i>base</i> instance for all
+   following entries and reads existing databases into memory. The
+   vendor argument is a unique text string identifying the
+   development team or vendor of an application.  A domain name or
+   an EMail address are great unique names, e.g.
+   "researchATmatthiasm.com" or "fltk.org". The
+   application argument can be the working title or final
+   name of your application. Both vendor and
+   application must be valid relative UNIX pathnames and
+   may contain '/'s to create deeper file structures.
+
+   A set of Preferences marked "run-time" exists exactly one per application and
+   only as long as the application runs. It can be used as a database for
+   volatile information. FLTK uses it to register plugins at run-time.
+
+   \param[in] root can be \c USER or \c SYSTEM for user specific or system wide
+              preferences
+   \param[in] vendor unique text describing the company or author of this file
+   \param[in] application unique text describing the application
+*/
+fltk3::Preferences::Preferences( Root root, const char *vendor, const char *application ) {
+  node = new Node( "." );
+  rootNode = new RootNode( this, root, vendor, application );
+  node->setRoot(rootNode);
+}
+
+/**
+   \brief Use this constructor to create or read a preferences file at an
+   arbitrary position in the file system.
+
+   The file name is generated in the form
+   <tt><i>path</i>/<i>application</i>.prefs</tt>. If \p application
+   is \c NULL, \p path must contain the full file name.
+
+   \param[in] path path to the directory that contains the preferences file
+   \param[in] vendor unique text describing the company or author of this file
+   \param[in] application unique text describing the application
+ */
+fltk3::Preferences::Preferences( const char *path, const char *vendor, const char *application ) {
+  node = new Node( "." );
+  rootNode = new RootNode( this, path, vendor, application );
+  node->setRoot(rootNode);
+}
+
+/**
+   \brief Generate or read a new group of entries within another group.
+
+   Use the \p group argument to name the group that you would like to access.
+   \p Group can also contain a path to a group further down the hierarchy by
+   separating group names with a forward slash '/'.
+
+   \param[in] parent reference object for the new group
+   \param[in] group name of the group to access (may contain '/'s)
+ */
+fltk3::Preferences::Preferences( fltk3::Preferences &parent, const char *group ) {
+  rootNode = parent.rootNode;
+  node = parent.node->addChild( group );
+}
+
+/**
+   \brief Create or access a group of preferences using a name.
+   \param[in] parent the parameter parent is a pointer to the parent group.
+              \p Parent may be \p NULL. It then refers to an application internal
+              database which exists only once, and remains in RAM only until the
+              application quits. This database is used to manage plugins and other
+              data indexes by strings.
+   \param[in] group a group name that is used as a key into the database
+   \see fltk3::Preferences( fltk3::Preferences&, const char *group )
+ */
+fltk3::Preferences::Preferences( fltk3::Preferences *parent, const char *group ) {
+  if (parent==0) {
+    if (!runtimePrefs) {
+      runtimePrefs = new fltk3::Preferences();
+      runtimePrefs->node = new Node( "." );
+      runtimePrefs->rootNode = new RootNode( runtimePrefs );
+      runtimePrefs->node->setRoot(rootNode);
+    }
+    parent = runtimePrefs;
+  }
+  rootNode = parent->rootNode;
+  node = parent->node->addChild( group );
+}
+
+/**
+ \brief Open a child group using a given index.
+
+ Use the \p groupIndex argument to find the group that you would like to access.
+ If the given index is invalid (negative or too high), a new group is created
+ with a UUID as a name.
+
+ The index needs to be fixed. It is currently backward. Index 0 points
+ to the last member in the 'list' of preferences.
+
+ \param[in] parent reference object for the new group
+ \param[in] groupIndex zero based index into child groups
+ */
+fltk3::Preferences::Preferences( fltk3::Preferences &parent, int groupIndex ) {
+  rootNode = parent.rootNode;
+  if (groupIndex<0 || groupIndex>=parent.groups()) {
+    node = parent.node->addChild( newUUID() );
+  } else {
+    node = parent.node->childNode( groupIndex );
+  }
+}
+
+/**
+ \see fltk3::Preferences( fltk3::Preferences&, int groupIndex )
+ */
+fltk3::Preferences::Preferences( fltk3::Preferences *parent, int groupIndex ) {
+  rootNode = parent->rootNode;
+  if (groupIndex<0 || groupIndex>=parent->groups()) {
+    node = parent->node->addChild( newUUID() );
+  } else {
+    node = parent->node->childNode( groupIndex );
+  }
+}
+
+/**
+ Create a new dataset access point using a dataset ID.
+
+ ID's are a great way to remember shortcuts to database entries that are deeply
+ nested in a preferences database, as long as the database root is not deleted.
+ An ID can be retrieved from any fltk3::Preferences dataset, and can then be used
+ to create multiple new references to the same dataset.
+
+ ID's can be put very helpful when put into the <tt>user_data()</tt> field of
+ widget callbacks.
+ */
+fltk3::Preferences::Preferences( fltk3::Preferences::ID id ) {
+  node = (Node*)id;
+  rootNode = node->findRoot();
+}
+
+/**
+ Create another reference to a Preferences group.
+ */
+fltk3::Preferences::Preferences(const fltk3::Preferences &rhs)
+: node(rhs.node),
+  rootNode(rhs.rootNode)
+{ }
+
+/**
+ Assign another reference to a Preference group.
+ */
+fltk3::Preferences &fltk3::Preferences::operator=(const fltk3::Preferences &rhs) {
+  if (&rhs != this) {
+    node = rhs.node;
+    rootNode = rhs.rootNode;
+  }
+  return *this;
+}
+
+/**
+   The destructor removes allocated resources. When used on the
+   \em base preferences group, the destructor flushes all
+   changes to the preferences file and deletes all internal
+   databases.
+
+   The destructor does not remove any data from the database. It merely
+   deletes your reference to the database.
+ */
+fltk3::Preferences::~Preferences() {
+  if (node && !node->parent()) delete rootNode;
+  // DO NOT delete nodes! The root node will do that after writing the preferences
+  // zero all pointer to avoid memory errors, even though
+  // Valgrind does not complain (Cygwind does though)
+  node = 0L;
+  rootNode = 0L;
+}
+
+/**
+   Returns the number of groups that are contained within a group.
+
+   \return 0 for no groups at all
+ */
+int fltk3::Preferences::groups() {
+  return node->nChildren();
+}
+
+/**
+   Returns the name of the Nth (\p num_group) group.
+   There is no guaranteed order of group names. The index must
+   be within the range given by groups().
+
+   \param[in] num_group number indexing the requested group
+   \return 'C' string pointer to the group name
+ */
+const char *fltk3::Preferences::group( int num_group ) {
+  return node->child( num_group );
+}
+
+/**
+   Returns non-zero if a group with this name exists.
+   Group names are relative to the Preferences node and can contain a path.
+   "." describes the current node, "./" describes the topmost node.
+   By preceding a groupname with a "./", its path becomes relative to the topmost node.
+
+   \param[in] key name of group that is searched for
+   \return 0 if no group by that name was found
+ */
+char fltk3::Preferences::groupExists( const char *key ) {
+  return node->search( key ) ? 1 : 0 ;
+}
+
+/**
+   Deletes a group.
+
+   Removes a group and all keys and groups within that group
+   from the database.
+
+   \param[in] group name of the group to delete
+   \return 0 if call failed
+ */
+char fltk3::Preferences::deleteGroup( const char *group ) {
+  Node *nd = node->search( group );
+  if ( nd ) return nd->remove();
+  return 0;
+}
+
+/**
+ Delete all groups.
+ */
+char fltk3::Preferences::deleteAllGroups() {
+  node->deleteAllChildren();
+  return 1;
+}
+
+/**
+   Returns the number of entries (name/value pairs) in a group.
+
+   \return number of entries
+ */
+int fltk3::Preferences::entries() {
+  return node->nEntry();
+}
+
+/**
+   Returns the name of an entry. There is no guaranteed order of
+   entry names. The index must be within the range given by
+   entries().
+
+   \param[in] index number indexing the requested entry
+   \return pointer to value cstring
+ */
+const char *fltk3::Preferences::entry( int index ) {
+  return node->entry(index).name;
+}
+
+/**
+   Returns non-zero if an entry with this name exists.
+
+   \param[in] key name of entry that is searched for
+   \return 0 if entry was not found
+ */
+char fltk3::Preferences::entryExists( const char *key ) {
+  return node->getEntry( key )>=0 ? 1 : 0 ;
+}
+
+/**
+   Deletes a single name/value pair.
+
+   This function removes the entry \p key from the database.
+
+   \param[in] key name of entry to delete
+   \return 0 if deleting the entry failed
+ */
+char fltk3::Preferences::deleteEntry( const char *key ) {
+  return node->deleteEntry( key );
+}
+
+/**
+ Delete all entries.
+ */
+char fltk3::Preferences::deleteAllEntries() {
+  node->deleteAllEntries();
+  return 1;
+}
+
+/**
+ Delete all groups and all entries.
+ */
+char fltk3::Preferences::clear() {
+  char ret1 = deleteAllGroups();
+  char ret2 = deleteAllEntries();
+  return ret1 & ret2;
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0).
+
+ \param[in] key name of entry
+ \param[out] value returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \return 0 if the default value was used
+ */
+char fltk3::Preferences::get( const char *key, int &value, int defaultValue ) {
+  const char *v = node->get( key );
+  value = v ? atoi( v ) : defaultValue;
+  return ( v != 0 );
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] value set this entry to \p value
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, int value ) {
+  sprintf( nameBuffer, "%d", value );
+  node->set( key, nameBuffer );
+  return 1;
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0).
+
+ \param[in] key name of entry
+ \param[out] value returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \return 0 if the default value was used
+ */
+char fltk3::Preferences::get( const char *key, float &value, float defaultValue ) {
+  const char *v = node->get( key );
+  value = v ? (float)atof( v ) : defaultValue;
+  return ( v != 0 );
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] value set this entry to \p value
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, float value ) {
+  sprintf( nameBuffer, "%g", value );
+  node->set( key, nameBuffer );
+  return 1;
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] value set this entry to \p value
+ \param[in] precision number of decimal digits to represent value
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, float value, int precision ) {
+  sprintf( nameBuffer, "%.*g", precision, value );
+  node->set( key, nameBuffer );
+  return 1;
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0).
+
+ \param[in] key name of entry
+ \param[out] value returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \return 0 if the default value was used
+ */
+char fltk3::Preferences::get( const char *key, double &value, double defaultValue ) {
+  const char *v = node->get( key );
+  value = v ? atof( v ) : defaultValue;
+  return ( v != 0 );
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] value set this entry to \p value
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, double value ) {
+  sprintf( nameBuffer, "%g", value );
+  node->set( key, nameBuffer );
+  return 1;
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] value set this entry to \p value
+ \param[in] precision number of decimal digits to represent value
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, double value, int precision ) {
+  sprintf( nameBuffer, "%.*g", precision, value );
+  node->set( key, nameBuffer );
+  return 1;
+}
+
+// remove control sequences from a string
+static char *decodeText( const char *src ) {
+  int len = 0;
+  const char *s = src;
+  for ( ; *s; s++, len++ ) {
+    if ( *s == '\\' ) {
+      if ( isdigit( s[1] ) ) {
+        s+=3; 
+      } else { 
+        s+=1;
+      }
+    }
+  }
+  char *dst = (char*)malloc( len+1 ), *d = dst;
+  for ( s = src; *s; s++ ) {
+    char c = *s;
+    if ( c == '\\' ) {
+      if ( s[1] == '\\' ) { *d++ = c; s++; }
+      else if ( s[1] == 'n' ) { *d++ = '\n'; s++; }
+      else if ( s[1] == 'r' ) { *d++ = '\r'; s++; }
+      else if ( isdigit( s[1] ) ) { *d++ = ((s[1]-'0')<<6) + ((s[2]-'0')<<3) + (s[3]-'0'); s+=3; }
+      else s++; // error
+    }
+    else
+      *d++ = c;
+  }
+  *d = 0;
+  return dst;
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0).
+ 'maxSize' is the maximum length of text that will be read.
+ The text buffer must allow for one additional byte for a trailling zero.
+
+ \param[in] key name of entry
+ \param[out] text returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \param[in] maxSize maximum length of value plus one byte for a trailing zero
+ \return 0 if the default value was used
+ */
+char fltk3::Preferences::get( const char *key, char *text, const char *defaultValue, int maxSize ) {
+  const char *v = node->get( key );
+  if ( v && strchr( v, '\\' ) ) {
+    char *w = decodeText( v );
+    strlcpy(text, w, maxSize);
+    free( w );
+    return 1;
+  }
+  if ( !v ) v = defaultValue;
+  if ( v ) strlcpy(text, v, maxSize);
+  else text = 0;
+  return ( v != defaultValue );
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0). get() allocates memory of
+ sufficient size to hold the value. The buffer must be free'd by
+ the developer using 'free(value)'.
+
+ \param[in] key name of entry
+ \param[out] text returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \return 0 if the default value was used
+ */
+char fltk3::Preferences::get( const char *key, char *&text, const char *defaultValue ) {
+  const char *v = node->get( key );
+  if ( v && strchr( v, '\\' ) ) {
+    text = decodeText( v );
+    return 1;
+  }
+  if ( !v ) v = defaultValue;
+  if ( v )
+    text = strdup( v );
+  else
+    text = 0;
+  return ( v != defaultValue );
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] text set this entry to \p value
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, const char *text ) {
+  const char *s = text ? text : "";
+  int n=0, ns=0;
+  for ( ; *s; s++ ) { n++; if ( *s<32 || *s=='\\' || *s==0x7f ) ns+=4; }
+  if ( ns ) {
+    char *buffer = (char*)malloc( n+ns+1 ), *d = buffer;
+    for ( s=text; *s; ) {
+      char c = *s;
+      if ( c=='\\' ) { *d++ = '\\'; *d++ = '\\'; s++; }
+      else if ( c=='\n' ) { *d++ = '\\'; *d++ = 'n'; s++; }
+      else if ( c=='\r' ) { *d++ = '\\'; *d++ = 'r'; s++; }
+      else if ( c<32 || c==0x7f )
+	{ *d++ = '\\'; *d++ = '0'+((c>>6)&3); *d++ = '0'+((c>>3)&7); *d++ = '0'+(c&7);  s++; }
+      else *d++ = *s++;
+    }
+    *d = 0;
+    node->set( key, buffer );
+    free( buffer );
+  }
+  else
+    node->set( key, text );
+  return 1;
+}
+
+// convert a hex string to binary data
+static void *decodeHex( const char *src, int &size ) {
+  size = strlen( src )/2;
+  unsigned char *data = (unsigned char*)malloc( size ), *d = data;
+  const char *s = src;
+  for ( int i=size; i>0; i-- ) {
+    int v;
+    char x = tolower(*s++);
+    if ( x >= 'a' ) v = x-'a'+10; else v = x-'0';
+    v = v<<4;
+    x = tolower(*s++);
+    if ( x >= 'a' ) v += x-'a'+10; else v += x-'0';
+    *d++ = (uchar)v;
+  }
+  return (void*)data;
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0).
+ 'maxSize' is the maximum length of text that will be read.
+
+ \param[in] key name of entry
+ \param[out] data value returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \param[in] defaultSize size of default value array
+ \param[in] maxSize maximum length of value
+ \return 0 if the default value was used
+
+ \todo maxSize should receive the number of bytes that were read.
+ */
+char fltk3::Preferences::get( const char *key, void *data, const void *defaultValue, int defaultSize, int maxSize ) {
+  const char *v = node->get( key );
+  if ( v ) {
+    int dsize;
+    void *w = decodeHex( v, dsize );
+    memmove( data, w, dsize>maxSize?maxSize:dsize );
+    free( w );
+    return 1;
+  }
+  if ( defaultValue )
+    memmove( data, defaultValue, defaultSize>maxSize?maxSize:defaultSize );
+  return 0;
+}
+
+/**
+ Reads an entry from the group. A default value must be
+ supplied. The return value indicates if the value was available
+ (non-zero) or the default was used (0). get() allocates memory of
+ sufficient size to hold the value. The buffer must be free'd by
+ the developer using 'free(value)'.
+
+ \param[in] key name of entry
+ \param[out] data returned from preferences or default value if none was set
+ \param[in] defaultValue default value to be used if no preference was set
+ \param[in] defaultSize size of default value array
+ \return 0 if the default value was used
+ */
+char fltk3::Preferences::get( const char *key, void *&data, const void *defaultValue, int defaultSize ) {
+  const char *v = node->get( key );
+  if ( v ) {
+    int dsize;
+    data = decodeHex( v, dsize );
+    return 1;
+  }
+  if ( defaultValue ) {
+    data = (void*)malloc( defaultSize );
+    memmove( data, defaultValue, defaultSize );
+  }
+  else
+    data = 0;
+  return 0;
+}
+
+/**
+ Sets an entry (name/value pair). The return value indicates if there
+ was a problem storing the data in memory. However it does not
+ reflect if the value was actually stored in the preferences
+ file.
+
+ \param[in] key name of entry
+ \param[in] data set this entry to \p value
+ \param[in] dsize size of data array
+ \return 0 if setting the value failed
+ */
+char fltk3::Preferences::set( const char *key, const void *data, int dsize ) {
+  char *buffer = (char*)malloc( dsize*2+1 ), *d = buffer;;
+  unsigned char *s = (unsigned char*)data;
+  for ( ; dsize>0; dsize-- ) {
+    static char lu[] = "0123456789abcdef";
+    unsigned char v = *s++;
+    *d++ = lu[v>>4];
+    *d++ = lu[v&0xf];
+  }
+  *d = 0;
+  node->set( key, buffer );
+  free( buffer );
+  return 1;
+}
+
+/**
+ Returns the size of the value part of an entry.
+
+ \param[in] key name of entry
+ \return size of value
+ */
+int fltk3::Preferences::size( const char *key ) {
+  const char *v = node->get( key );
+  return v ? strlen( v ) : 0 ;
+}
+
+/**
+ \brief Creates a path that is related to the preferences file and
+ that is usable for additional application data.
+
+ This function creates a directory that is named after the preferences
+ database without the \c .prefs extension and located in the same directory.
+ It then fills the given buffer with the complete path name.
+
+ Exmaple:
+ \code
+ fltk3::Preferences prefs( USER, "matthiasm.com", "test" );
+ char path[FLTK3_PATH_MAX];
+ prefs.getUserdataPath( path );
+ \endcode
+ creates the preferences database in (MS Windows):
+ \code
+ c:/Documents and Settings/matt/Application Data/matthiasm.com/test.prefs
+ \endcode
+ and returns the userdata path:
+ \code
+ c:/Documents and Settings/matt/Application Data/matthiasm.com/test/
+ \endcode
+
+ \param[out] path buffer for user data path
+ \param[in] pathlen size of path buffer (should be at least \c FLTK3_PATH_MAX)
+ \return 0 if path was not created or pathname can't fit into buffer
+ */
+char fltk3::Preferences::getUserdataPath( char *path, int pathlen ) {
+  if ( rootNode )
+    return rootNode->getPath( path, pathlen );
+  return 0;
+}
+
+/**
+ Writes all preferences to disk. This function works only with
+ the base preferences group. This function is rarely used as
+ deleting the base preferences flushes automatically.
+ */
+void fltk3::Preferences::flush() {
+  if ( rootNode && node->dirty() )
+    rootNode->write();
+}
+
+//-----------------------------------------------------------------------------
+// helper class to create dynamic group and entry names on the fly
+//
+
+/**
+   Creates a group name or entry name on the fly.
+
+   This version creates a simple unsigned integer as an entry name.
+
+   \code
+     int n, i;
+     fltk3::Preferences prev( appPrefs, "PreviousFiles" );
+     prev.get( "n", 0 );
+     for ( i=0; i<n; i++ )
+       prev.get( fltk3::Preferences::Name(i), prevFile[i], "" );
+   \endcode
+ */
+fltk3::Preferences::Name::Name( unsigned int n ) {
+  data_ = (char*)malloc(20);
+  sprintf(data_, "%u", n);
+}
+
+/**
+   Creates a group name or entry name on the fly.
+
+   This version creates entry names as in 'printf'.
+
+   \code
+     int n, i;
+     fltk3::Preferences prefs( USER, "matthiasm.com", "test" );
+     prev.get( "nFiles", 0 );
+     for ( i=0; i<n; i++ )
+       prev.get( fltk3::Preferences::Name( "File%d", i ), prevFile[i], "" );
+    \endcode
+ */
+fltk3::Preferences::Name::Name( const char *format, ... ) {
+  data_ = (char*)malloc(1024);
+  va_list args;
+  va_start(args, format);
+  vsnprintf(data_, 1024, format, args);
+  va_end(args);
+}
+
+// delete the name
+fltk3::Preferences::Name::~Name() {
+  if (data_) {
+    free(data_);
+    data_ = 0L;
+  }
+}
+
+//-----------------------------------------------------------------------------
+// internal methods, do not modify or use as they will change without notice
+//
+
+int fltk3::Preferences::Node::lastEntrySet = -1;
+
+// recursively create a path in the file system
+static char makePath( const char *path ) {
+  if (access(path, 0)) {
+    const char *s = strrchr( path, '/' );
+    if ( !s ) return 0;
+    int len = s-path;
+    char *p = (char*)malloc( len+1 );
+    memcpy( p, path, len );
+    p[len] = 0;
+    makePath( p );
+    free( p );
+#if defined(WIN32) && !defined(__CYGWIN__)
+    return ( mkdir( path ) == 0 );
+#else
+    return ( mkdir( path, 0777 ) == 0 );
+#endif // WIN32 && !__CYGWIN__
+  }
+  return 1;
+}
+
+#if 0
+// strip the filename and create a path
+static void makePathForFile( const char *path ) {
+  const char *s = strrchr( path, '/' );
+  if ( !s ) return;
+  int len = s-path;
+  char *p = (char*)malloc( len+1 );
+  memcpy( p, path, len );
+  p[len] = 0;
+  makePath( p );
+  free( p );
+}
+#endif
+
+// create the root node
+// - construct the name of the file that will hold our preferences
+fltk3::Preferences::RootNode::RootNode( fltk3::Preferences *prefs, Root root, const char *vendor, const char *application )
+: prefs_(prefs),
+  filename_(0L),
+  vendor_(0L),
+  application_(0L) {
+
+  char filename[ FLTK3_PATH_MAX ]; filename[0] = 0;
+#ifdef WIN32
+#  define FLPREFS_RESOURCE	"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
+#  define FLPREFS_RESOURCEW	L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
+  int appDataLen = strlen(vendor) + strlen(application) + 8;
+  DWORD type, nn;
+  LONG err;
+  HKEY key;
+
+  switch (root) {
+    case SYSTEM:
+      err = RegOpenKeyW( HKEY_LOCAL_MACHINE, FLPREFS_RESOURCEW, &key );
+      if (err == ERROR_SUCCESS) {
+        nn = FLTK3_PATH_MAX - appDataLen; 
+        err = RegQueryValueExW( key, L"Common AppData", 0L, &type,
+                                (BYTE*)filename, &nn ); 
+        if ( ( err != ERROR_SUCCESS ) && ( type == REG_SZ ) ) {
+          filename[0] = 0;
+          filename[1] = 0;
+        }
+        RegCloseKey(key);
+      }
+      break;
+    case USER:
+      err = RegOpenKeyW( HKEY_CURRENT_USER, FLPREFS_RESOURCEW, &key );
+      if (err == ERROR_SUCCESS) {
+        nn = FLTK3_PATH_MAX - appDataLen;
+        err = RegQueryValueExW( key, L"AppData", 0L, &type,
+                                (BYTE*)filename, &nn ); 
+        if ( ( err != ERROR_SUCCESS ) && ( type == REG_SZ ) ) {
+          filename[0] = 0;
+          filename[1] = 0;
+	}
+        RegCloseKey(key);
+      }
+      break;
+  } 
+  if (!filename[1] && !filename[0]) {
+    strcpy(filename, "C:\\FLTK");
+  } else {
+#if 0
+    xchar *b = (xchar*)_wcsdup((xchar *)filename);
+#else
+    // cygwin does not come with _wcsdup. Use malloc +  wcscpy.
+    // For implementation of wcsdup functionality See
+    // - http://linenum.info/p/glibc/2.7/wcsmbs/wcsdup.c
+    xchar *b = (xchar*) malloc((wcslen((xchar *) filename) + 1) * sizeof(xchar));
+    wcscpy(b, (xchar *) filename);
+#endif
+    //  filename[fl_unicode2utf(b, wcslen((xchar*)b), filename)] = 0;
+    unsigned len = fltk3::utf8fromwc(filename, (FLTK3_PATH_MAX-1), b, wcslen(b));
+    filename[len] = 0;
+    free(b);
+  }
+  snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename),
+           "/%s/%s.prefs", vendor, application);
+  for (char *s = filename; *s; s++) if (*s == '\\') *s = '/';
+#elif defined ( __APPLE__ )
+  // TODO: verify that this is the Apple sanctioned way of finding these folders
+  // (On MSWindows, this frequently leads to issues with internationalized systems)
+  // Carbon: err = FindFolder( kLocalDomain, kPreferencesFolderType, 1, &spec.vRefNum, &spec.parID );
+  switch (root) {
+    case SYSTEM:
+      strcpy(filename, "/Library/Preferences");
+      break;
+    case USER:
+      sprintf(filename, "%s/Library/Preferences", fltk3::getenv("HOME"));
+      break;
+  }
+  snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename),
+           "/%s/%s.prefs", vendor, application );
+#else
+  const char *e;
+  switch (root) {
+    case USER:
+      if ((e = fltk3::getenv("HOME")) != NULL) {
+	strlcpy(filename, e, sizeof(filename));
+
+	if (filename[strlen(filename)-1] != '/') {
+	  strlcat(filename, "/.fltk/", sizeof(filename));
+	} else {
+	  strlcat(filename, ".fltk/", sizeof(filename));
+	}
+	break;
+      } 
+    case SYSTEM:
+      strcpy(filename, "/etc/fltk/");
+      break;
+  } 
+  snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename),
+           "%s/%s.prefs", vendor, application);
+#endif 
+  filename_    = strdup(filename);
+  vendor_      = strdup(vendor);
+  application_ = strdup(application); 
+  read();
+}
+
+// create the root node
+// - construct the name of the file that will hold our preferences
+fltk3::Preferences::RootNode::RootNode( fltk3::Preferences *prefs, const char *path, const char *vendor, const char *application )
+: prefs_(prefs),
+  filename_(0L),
+  vendor_(0L),
+  application_(0L) {
+
+  if (!vendor)
+    vendor = "unknown";
+  if (!application) {
+    application = "unknown";
+    filename_ = strdup(path);
+  } else {
+    char filename[ FLTK3_PATH_MAX ]; filename[0] = 0;
+    snprintf(filename, sizeof(filename), "%s/%s.prefs", path, application);
+    filename_  = strdup(filename);
+  }
+  vendor_      = strdup(vendor);
+  application_ = strdup(application); 
+  read();
+}
+
+// create a root node that exists only on RAM and can not be read or written to
+// a file
+fltk3::Preferences::RootNode::RootNode( fltk3::Preferences *prefs )
+: prefs_(prefs),
+  filename_(0L),
+  vendor_(0L),
+  application_(0L) {
+}
+
+// destroy the root node and all depending nodes
+fltk3::Preferences::RootNode::~RootNode() {
+  if ( prefs_->node->dirty() )
+    write();
+  if ( filename_ ) {
+    free( filename_ );
+    filename_ = 0L;
+  }
+  if ( vendor_ ) {
+    free( vendor_ );
+    vendor_ = 0L;
+  }
+  if ( application_ ) {
+    free( application_ );
+    application_ = 0L;
+  }
+  delete prefs_->node;
+  prefs_->node = 0L;
+}
+
+// read a preferences file and construct the group tree and with all entry leafs
+int fltk3::Preferences::RootNode::read() {
+  if (!filename_)   // RUNTIME preferences
+    return -1; 
+  char buf[1024];
+  FILE *f = fltk3::fopen( filename_, "rb" );
+  if ( !f )
+    return -1; 
+  if (fgets( buf, 1024, f )==0) { /* ignore */ }
+  if (fgets( buf, 1024, f )==0) { /* ignore */ }
+  if (fgets( buf, 1024, f )==0) { /* ignore */ }
+  Node *nd = prefs_->node;
+  for (;;) {
+    if ( !fgets( buf, 1024, f ) ) break;	// EOF or Error
+    if ( buf[0]=='[' ) {			// read a new group
+      int end = strcspn( buf+1, "]\n\r" );
+      buf[ end+1 ] = 0;
+      nd = prefs_->node->find( buf+1 );
+    } else if ( buf[0]=='+' ) {			// value of previous name/value pair spans multiple lines
+      int end = strcspn( buf+1, "\n\r" );
+      if ( end != 0 ) {				// if entry is not empty
+	buf[ end+1 ] = 0;
+	nd->add( buf+1 );
+      }
+    } else {					 // read a name/value pair
+      int end = strcspn( buf, "\n\r" );
+      if ( end != 0 ) {				// if entry is not empty
+	buf[ end ] = 0;
+	nd->set( buf );
+      }
+    }
+  }
+  fclose( f );
+  return 0;
+}
+
+// write the group tree and all entry leafs
+int fltk3::Preferences::RootNode::write() {
+  if (!filename_)   // RUNTIME preferences
+    return -1; 
+  fltk3::make_path_for_file(filename_);
+  FILE *f = fltk3::fopen( filename_, "wb" );
+  if ( !f )
+    return -1; 
+  fprintf( f, "; FLTK preferences file format 1.0\n" );
+  fprintf( f, "; vendor: %s\n", vendor_ );
+  fprintf( f, "; application: %s\n", application_ );
+  prefs_->node->write( f );
+  fclose( f );
+#if !(defined(__APPLE__) || defined(WIN32))
+  // unix: make sure that system prefs are user-readable
+  if (strncmp(filename_, "/etc/fltk/", 10) == 0) {
+    char *p;
+    p = filename_ + 9;
+    do {			 // for each directory to the pref file
+      *p = 0;
+      fltk3::chmod(filename_, 0755); // rwxr-xr-x
+      *p = '/';
+      p = strchr(p+1, '/');
+    } while (p);
+    fltk3::chmod(filename_, 0644);   // rw-r--r--
+  }
+#endif
+  return 0;
+}
+
+// get the path to the preferences directory
+char fltk3::Preferences::RootNode::getPath( char *path, int pathlen ) {
+  if (!filename_)   // RUNTIME preferences
+    return -1; 
+  strlcpy( path, filename_, pathlen); 
+
+  char *s;
+  for ( s = path; *s; s++ ) if ( *s == '\\' ) *s = '/';
+  s = strrchr( path, '.' );
+  if ( !s ) return 0;
+  *s = 0;
+  char ret = fltk3::make_path( path );
+#if !(defined(__APPLE__) || defined(WIN32))
+  // unix: make sure that system prefs dir. is user-readable
+  if (strncmp(path, "/etc/fltk/", 10) == 0) {
+    fltk3::chmod(path, 0755); // rwxr-xr-x
+  }
+#endif
+  strcpy( s, "/" );
+  return ret;
+}
+
+// create a node that represents a group
+// - path must be a single word, prferable alnum(), dot and underscore only. Space is ok.
+fltk3::Preferences::Node::Node( const char *path ) {
+  if ( path ) path_ = strdup( path ); else path_ = 0;
+  child_ = 0; next_ = 0; parent_ = 0;
+  entry_ = 0;
+  nEntry_ = NEntry_ = 0;
+  dirty_ = 0;
+  top_ = 0;
+  indexed_ = 0;
+  index_ = 0;
+  nIndex_ = NIndex_ = 0;
+}
+
+void fltk3::Preferences::Node::deleteAllChildren() {
+  Node *nx;
+  for ( Node *nd = child_; nd; nd = nx ) {
+    nx = nd->next_;
+    delete nd;
+  }
+  child_ = 0L;
+  dirty_ = 1;
+  updateIndex();
+}
+
+void fltk3::Preferences::Node::deleteAllEntries() {
+  if ( entry_ ) {
+    for ( int i = 0; i < nEntry_; i++ ) {
+      if ( entry_[i].name ) {
+	free( entry_[i].name );
+	entry_[i].name = 0L;
+      }
+      if ( entry_[i].value ) {
+	free( entry_[i].value );
+	entry_[i].value = 0L;
+      }
+    }
+    free( entry_ );
+    entry_ = 0L;
+    nEntry_ = 0;
+    NEntry_ = 0;
+  }
+  dirty_ = 1;
+}
+
+// delete this and all depending nodes
+fltk3::Preferences::Node::~Node() {
+  deleteAllChildren();
+  deleteAllEntries();
+  deleteIndex();
+  if ( path_ ) {
+    free( path_ );
+    path_ = 0L;
+  }
+  next_ = 0L;
+  parent_ = 0L;
+}
+
+// recursively check if any entry is dirty (was changed after loading a fresh prefs file)
+char fltk3::Preferences::Node::dirty() {
+  if ( dirty_ ) return 1;
+  if ( next_ && next_->dirty() ) return 1;
+  if ( child_ && child_->dirty() ) return 1;
+  return 0;
+}
+
+// write this node (recursively from the last neighbor back to this)
+// write all entries
+// write all children
+int fltk3::Preferences::Node::write( FILE *f ) {
+  if ( next_ ) next_->write( f );
+  fprintf( f, "\n[%s]\n\n", path_ );
+  for ( int i = 0; i < nEntry_; i++ ) {
+    char *src = entry_[i].value;
+    if ( src ) {		// hack it into smaller pieces if needed
+      fprintf( f, "%s:", entry_[i].name );
+      int cnt, written;
+      for ( cnt = 0; cnt < 60; cnt++ )
+	if ( src[cnt]==0 ) break;
+      written = fwrite( src, cnt, 1, f );
+      fprintf( f, "\n" );
+      src += cnt;
+      for (;*src;) {
+	for ( cnt = 0; cnt < 80; cnt++ )
+	  if ( src[cnt]==0 ) break;
+        fputc( '+', f );
+	written = fwrite( src, cnt, 1, f );
+        fputc( '\n', f );
+	src += cnt;
+      }
+    }
+    else
+      fprintf( f, "%s\n", entry_[i].name );
+  }
+  if ( child_ ) child_->write( f );
+  dirty_ = 0;
+  return 0;
+}
+
+// set the parent node and create the full path
+void fltk3::Preferences::Node::setParent( Node *pn ) {
+  parent_ = pn;
+  next_ = pn->child_;
+  pn->child_ = this;
+  sprintf( nameBuffer, "%s/%s", pn->path_, path_ );
+  free( path_ );
+  path_ = strdup( nameBuffer );
+}
+
+// find the corresponding root node
+fltk3::Preferences::RootNode *fltk3::Preferences::Node::findRoot() {
+  Node *n = this;
+  do {
+    if (n->top_)
+      return n->root_;
+    n = n->parent();
+  } while (n);
+  return 0L;
+}
+
+// add a child to this node and set its path (try to find it first...)
+fltk3::Preferences::Node *fltk3::Preferences::Node::addChild( const char *path ) {
+  sprintf( nameBuffer, "%s/%s", path_, path );
+  char *name = strdup( nameBuffer );
+  Node *nd = find( name );
+  free( name );
+  dirty_ = 1;
+  updateIndex();
+  return nd;
+}
+
+// create and set, or change an entry within this node
+void fltk3::Preferences::Node::set( const char *name, const char *value )
+{
+  for ( int i=0; i<nEntry_; i++ ) {
+    if ( strcmp( name, entry_[i].name ) == 0 ) {
+      if ( !value ) return; // annotation
+      if ( strcmp( value, entry_[i].value ) != 0 ) {
+	if ( entry_[i].value )
+	  free( entry_[i].value );
+	entry_[i].value = strdup( value );
+	dirty_ = 1;
+      }
+      lastEntrySet = i;
+      return;
+    }
+  }
+  if ( NEntry_==nEntry_ ) {
+    NEntry_ = NEntry_ ? NEntry_*2 : 10;
+    entry_ = (Entry*)realloc( entry_, NEntry_ * sizeof(Entry) );
+  }
+  entry_[ nEntry_ ].name = strdup( name );
+  entry_[ nEntry_ ].value = value?strdup( value ):0;
+  lastEntrySet = nEntry_;
+  nEntry_++;
+  dirty_ = 1;
+}
+
+// create or set a value (or annotation) from a single line in the file buffer
+void fltk3::Preferences::Node::set( const char *line ) {
+  // hmm. If we assume that we always read this file in the beginning,
+  // we can handle the dirty flag 'quick and dirty'
+  char dirt = dirty_;
+  if ( line[0]==';' || line[0]==0 || line[0]=='#' ) {
+    set( line, 0 );
+  } else {
+    const char *c = strchr( line, ':' );
+    if ( c ) {
+      unsigned int len = c-line+1;
+      if ( len >= sizeof( nameBuffer ) )
+        len = sizeof( nameBuffer );
+      strlcpy( nameBuffer, line, len );
+      set( nameBuffer, c+1 );
+    } else {
+      set( line, "" );
+    }
+  }
+  dirty_ = dirt;
+}
+
+// add more data to an existing entry
+void fltk3::Preferences::Node::add( const char *line ) {
+  if ( lastEntrySet<0 || lastEntrySet>=nEntry_ ) return;
+  char *&dst = entry_[ lastEntrySet ].value;
+  int a = strlen( dst );
+  int b = strlen( line );
+  dst = (char*)realloc( dst, a+b+1 );
+  memcpy( dst+a, line, b+1 );
+  dirty_ = 1;
+}
+
+// get the value for a name, returns 0 if no such name
+const char *fltk3::Preferences::Node::get( const char *name ) {
+  int i = getEntry( name );
+  return i>=0 ? entry_[i].value : 0 ;
+}
+
+// find the index of an entry, returns -1 if no such entry
+int fltk3::Preferences::Node::getEntry( const char *name ) {
+  for ( int i=0; i<nEntry_; i++ ) {
+    if ( strcmp( name, entry_[i].name ) == 0 ) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+// remove one entry form this group
+char fltk3::Preferences::Node::deleteEntry( const char *name ) {
+  int ix = getEntry( name );
+  if ( ix == -1 ) return 0;
+  memmove( entry_+ix, entry_+ix+1, (nEntry_-ix-1) * sizeof(Entry) );
+  nEntry_--;
+  dirty_ = 1;
+  return 1;
+}
+
+// find a group somewhere in the tree starting here
+// - this method will always return a valid node (except for memory allocation problems)
+// - if the node was not found, 'find' will create the required branch
+fltk3::Preferences::Node *fltk3::Preferences::Node::find( const char *path ) {
+  int len = strlen( path_ );
+  if ( strncmp( path, path_, len ) == 0 ) {
+    if ( path[ len ] == 0 )
+      return this;
+    if ( path[ len ] == '/' ) {
+      Node *nd;
+      for ( nd = child_; nd; nd = nd->next_ ) {
+	Node *nn = nd->find( path );
+	if ( nn ) return nn;
+      }
+      const char *s = path+len+1;
+      const char *e = strchr( s, '/' );
+      if (e) strlcpy( nameBuffer, s, e-s+1 );
+      else strlcpy( nameBuffer, s, sizeof(nameBuffer));
+      nd = new Node( nameBuffer );
+      nd->setParent( this );
+      return nd->find( path );
+    }
+  }
+  return 0;
+}
+
+// find a group somewhere in the tree starting here
+// caller must not set 'offset' argument
+// - if the node does not exist, 'search' returns NULL
+// - if the pathname is "." (current node) return this node
+// - if the pathname is "./" (root node) return the topmost node
+// - if the pathname starts with "./", start the search at the root node instead
+fltk3::Preferences::Node *fltk3::Preferences::Node::search( const char *path, int offset ) { 
+  if ( offset == 0 ) {
+    if ( path[0] == '.' ) {
+      if ( path[1] == 0 ) {
+	return this; // user was searching for current node
+      } else if ( path[1] == '/' ) {
+	Node *nn = this;
+	while ( nn->parent() ) nn = nn->parent();
+	if ( path[2]==0 ) {		// user is searching for root ( "./" )
+	  return nn;
+	}
+	return nn->search( path+2, 2 ); // do a relative search on the root node
+      }
+    }
+    offset = strlen( path_ ) + 1;
+  }
+  int len = strlen( path_ );
+  if ( len < offset-1 ) return 0;
+  len -= offset;
+  if ( ( len <= 0 ) || ( strncmp( path, path_+offset, len ) == 0 ) ) {
+    if ( len > 0 && path[ len ] == 0 )
+      return this;
+    if ( len <= 0 || path[ len ] == '/' ) {
+      for ( Node *nd = child_; nd; nd = nd->next_ ) {
+	Node *nn = nd->search( path, offset );
+	if ( nn ) return nn;
+      }
+      return 0;
+    }
+  }
+  return 0;
+}
+
+// return the number of child nodes (groups)
+int fltk3::Preferences::Node::nChildren() {
+  if (indexed_) {
+    return nIndex_;
+  } else {
+    int cnt = 0;
+    for ( Node *nd = child_; nd; nd = nd->next_ )
+      cnt++;
+    return cnt;
+  }
+}
+
+// return the node name
+const char *fltk3::Preferences::Node::name() {
+  if ( path_ ) {
+    char *r = strrchr( path_, '/' );
+    return r ? r+1 : path_ ;
+  } else {
+    return 0L ;
+  }
+}
+
+// return the n'th child node's name
+const char *fltk3::Preferences::Node::child( int ix ) {
+  Node *nd = childNode( ix );
+  if ( nd )
+    return nd->name();
+  else
+    return 0L ;
+}
+
+// return the n'th child node
+fltk3::Preferences::Node *fltk3::Preferences::Node::childNode( int ix ) {
+  createIndex();
+  if (indexed_) {
+    // usually faster access in correct order, but needing more memory
+    return index_[ix];
+  } else {
+    // slow access and reverse order
+    int n = nChildren();
+    ix = n - ix -1;
+    Node *nd;
+    for ( nd = child_; nd; nd = nd->next_ ) {
+      if ( !ix-- ) break;
+      if ( !nd ) break;
+    }
+    return nd;
+  }
+}
+
+// remove myself from the list and delete me (and all children)
+char fltk3::Preferences::Node::remove() {
+  Node *nd = 0, *np;
+  if ( parent() ) {
+    nd = parent()->child_; np = 0L;
+    for ( ; nd; np = nd, nd = nd->next_ ) {
+      if ( nd == this ) {
+	if ( np )
+	  np->next_ = nd->next_;
+	else
+	  parent()->child_ = nd->next_;
+	break;
+      }
+    }
+    parent()->dirty_ = 1;
+    parent()->updateIndex();
+  }
+  delete this;
+  return ( nd != 0 );
+}
+
+void fltk3::Preferences::Node::createIndex() {
+  if (indexed_) return;
+  int n = nChildren();
+  if (n>NIndex_) {
+    NIndex_ = n + 16;
+    index_ = (Node**)realloc(index_, NIndex_*sizeof(Node**));
+  }
+  Node *nd;
+  int i = 0;
+  for (nd = child_; nd; nd = nd->next_, i++) {
+    index_[n-i-1] = nd;
+  }
+  nIndex_ = n;
+  indexed_ = 1;
+}
+
+void fltk3::Preferences::Node::updateIndex() {
+  indexed_ = 0;
+}
+
+void fltk3::Preferences::Node::deleteIndex() {
+  if (index_) free(index_);
+  NIndex_ = nIndex_ = 0;
+  index_ = 0;
+  indexed_ = 0;
+}
+
+/**
+ * \brief Create a plugin.
+ *
+ * \param[in] klass plugins are grouped in classes
+ * \param[in] name every plugin should have a unique name
+ */
+fltk3::Plugin::Plugin(const char *klass, const char *name)
+: id(0) {
+#ifdef FL_PLUGIN_VERBOSE
+  printf("fltk3::Plugin: creating a plugin, class \"%s\", name \"%s\"\n",
+         klass, name);
+#endif
+  fltk3::PluginManager pm(klass);
+  id = pm.addPlugin(name, this);
+}
+
+/**
+ * \brief Clear the plugin and remove it from the database.
+ */
+fltk3::Plugin::~Plugin() {
+#ifdef FL_PLUGIN_VERBOSE
+  printf("fltk3::Plugin: deleting a plugin\n");
+#endif
+  if (id)
+    fltk3::PluginManager::remove(id);
+}
+
+/**
+ * \brief Manage all plugins belonging to one class.
+ */
+fltk3::PluginManager::PluginManager(const char *klass)
+: fltk3::Preferences(0, fltk3::Preferences::Name("%s/%s", "plugins", klass)) {
+#ifdef FL_PLUGIN_VERBOSE
+  printf("fltk3::Plugin: creating a plugin manager for class \"%s\"\n", klass);
+#endif
+}
+
+/**
+ * \brief Remove the plugin manager.
+ *
+ * Calling this does not remove the database itself or any plugins. It just
+ * removes the reference to the database.
+ */
+fltk3::PluginManager::~PluginManager() {
+#ifdef FL_PLUGIN_VERBOSE
+  printf("fltk3::Plugin: deleting a plugin manager\n");
+#endif
+}
+
+static unsigned char x2i(char hi, char lo) {
+  return ((hi-'A')<<4) | (lo-'A');
+}
+
+static void i2x(unsigned char v, char *d) {
+  d[0] = ((v>>4)&0x0f)+'A'; d[1] = (v&0x0f)+'A';
+}
+
+static void *a2p(const char *s) {
+  union { void *ret; unsigned char d[sizeof(void*)]; } v;
+  v.ret = 0L;
+  int i=0, n=sizeof(void*);
+  for (i=0; i<n; i++) {
+    v.d[i] = x2i(s[2*i], s[2*i+1]);
+  }
+  return v.ret;
+}
+
+static void p2a(void *vp, char *d) {
+  union { void *vp; unsigned char s[sizeof(void*)]; } v;
+  v.vp = vp;
+  int i=0, n=sizeof(void*);
+  for (i=0; i<n; i++) {
+    i2x(v.s[i], d+i*2);
+  }
+  d[2*i] = 0;
+}
+
+/**
+ * \brief Return the address of a plugin by index.
+ */
+fltk3::Plugin *fltk3::PluginManager::plugin(int index) {
+  char buf[34];
+  fltk3::Plugin *ret = 0;
+  fltk3::Preferences pin(this, index);
+  pin.get("address", buf, "", 34);
+  if (buf[0]=='@') ret = (fltk3::Plugin*)a2p(buf+1);
+#ifdef FL_PLUGIN_VERBOSE
+  printf("fltk3::Plugin: returning plugin at index %d: (%s) %p\n", index, buf, ret);
+#endif
+  return ret;
+}
+
+/**
+ * \brief Return the address of a plugin by name.
+ */
+fltk3::Plugin *fltk3::PluginManager::plugin(const char *name) {
+  char buf[34];
+  fltk3::Plugin *ret = 0;
+  if (groupExists(name)) {
+    fltk3::Preferences pin(this, name);
+    pin.get("address", buf, "", 34);
+    if (buf[0]=='@') ret = (fltk3::Plugin*)a2p(buf+1);
+#ifdef FL_PLUGIN_VERBOSE
+    printf("fltk3::Plugin: returning plugin named \"%s\": (%s) %p\n", name, buf, ret);
+#endif
+    return ret;
+  } else {
+#ifdef FL_PLUGIN_VERBOSE
+    printf("fltk3::Plugin: no plugin found named \"%s\"\n", name);
+#endif
+    return 0L;
+  }
+}
+
+/**
+ * \brief This function adds a new plugin to the database.
+ *
+ * There is no need to call this function explicitly. Every fltk3::Plugin constructor
+ * will call this function at initialization time.
+ */
+fltk3::Preferences::ID fltk3::PluginManager::addPlugin(const char *name, fltk3::Plugin *plugin) {
+  char buf[34];
+#ifdef FL_PLUGIN_VERBOSE
+  printf("fltk3::Plugin: adding plugin named \"%s\" at 0x%p\n", name, plugin);
+#endif
+  fltk3::Preferences pin(this, name);
+  buf[0] = '@'; p2a(plugin, buf+1);
+  pin.set("address", buf);
+  return pin.id();
+}
+
+/**
+ * \brief Remove any plugin.
+ *
+ * There is no need to call this function explicitly. Every fltk3::Plugin destructor
+ * will call this function at destruction time.
+ */
+void fltk3::PluginManager::removePlugin(fltk3::Preferences::ID id) {
+  fltk3::Preferences::remove(id);
+}
+
+/**
+ * \brief Load a module from disk.
+ *
+ * A module must be a dynamically linkable file for the given operating system.
+ * When loading a module, its +init function will be called which in turn calls
+ * the constructor of all statically initialized fltk3::Plugin classes and adds
+ * them to the database.
+ */
+int fltk3::PluginManager::load(const char *filename) {
+  // the functions below will autmaticaly load plugins that are defined:
+  // Fl_My_Plugin plugin();
+#if defined(WIN32) && !defined(__CYGWIN__)
+  HMODULE dl = LoadLibrary(filename);
+#else
+  void * dl = dlopen(filename, RTLD_LAZY);
+#endif
+  // There is no way of unloading a plugin!
+  return (dl!=0) ? 0 : -1;
+}
+
+/**
+ * \brief Use this function to load a whole directory full of modules.
+ */
+int fltk3::PluginManager::loadAll(const char *filepath, const char *pattern) {
+  struct dirent **dir;
+  int i, n = fltk3::filename_list(filepath, &dir);
+  for (i=0; i<n; i++) {
+    struct dirent *e = dir[i];
+    if (pattern==0 || fltk3::filename_match(e->d_name, pattern)) {
+      load(fltk3::Preferences::Name("%s%s", filepath, e->d_name));
+    }
+    free(e);
+  }
+  free(dir);
+  return 0;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Preferences.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Printer.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Printer.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Printer.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,202 @@
+//
+// "$Id$"
+//
+// Encompasses platform-specific printing-support code and 
+// PostScript output code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/Printer.h>
+
+#ifdef __APPLE__
+//#include "Fl_Quartz_Printer.mm"
+#elif defined(WIN32)
+#include "Fl_GDI_Printer.cxx"
+#endif
+
+#include "Fl_PostScript.cxx"
+
+// print dialog customization strings
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_title = "Print";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_printer = "Printer:";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_range = "Print Range";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_copies = "Copies";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_all = "All";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_pages = "Pages";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_from = "From:";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_to = "To:";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_properties = "Properties...";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_copyNo = "# Copies:";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_print_button = "Print";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_cancel_button = "Cancel";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::dialog_print_to_file = "Print To File";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::property_title = "Printer Properties";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::property_pagesize = "Page Size:";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::property_mode = "Output Mode:";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::property_use = "Use";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::property_save = "Save";
+/** [this text may be customized at run-time] */
+const char *fltk3::Printer::property_cancel = "Cancel";
+
+const char *fltk3::Printer::class_id = "fltk3::Printer";
+#if defined(__APPLE__) || defined(WIN32) || defined(FLTK3_DOXYGEN)
+const char *fltk3::SystemPrinter::class_id = fltk3::Printer::class_id;
+#endif
+#if !( defined(__APPLE__) || defined(WIN32) )
+const char *fltk3::PostScriptPrinter::class_id = fltk3::Printer::class_id;
+#endif
+
+#if defined(__APPLE__) || defined(WIN32)
+void fltk3::SystemPrinter::set_current(void)
+{
+#ifdef __APPLE__
+  fl_gc = (CGContextRef)gc;
+#elif defined(WIN32)
+  fl_gc = (HDC)gc;
+#endif
+  this->SurfaceDevice::set_current();
+}
+
+void fltk3::SystemPrinter::origin(int *x, int *y)
+{
+  PagedDevice::origin(x, y);
+}
+
+#endif
+
+fltk3::Printer::Printer(void) {
+#if defined(WIN32) || defined(__APPLE__)
+  printer = new fltk3::SystemPrinter();
+#else
+  printer = new fltk3::PostScriptPrinter();
+#endif
+  SurfaceDevice::driver(printer->driver());
+}
+
+int fltk3::Printer::start_job(int pagecount, int *frompage, int *topage)
+{
+  return printer->start_job(pagecount, frompage, topage);
+}
+
+int fltk3::Printer::start_page(void)
+{
+  return printer->start_page();
+}
+
+int fltk3::Printer::printable_rect(int *w, int *h)
+{
+  return printer->printable_rect(w, h);
+}
+
+void fltk3::Printer::margins(int *left, int *top, int *right, int *bottom)
+{
+  printer->margins(left, top, right, bottom);
+}
+
+void fltk3::Printer::origin(int *x, int *y)
+{
+  printer->origin(x, y);
+}
+
+void fltk3::Printer::origin(int x, int y)
+{
+  printer->origin(x, y);
+}
+
+void fltk3::Printer::scale(float scale_x, float scale_y)
+{
+  printer->scale(scale_x, scale_y);
+}
+
+void fltk3::Printer::rotate(float angle)
+{
+  printer->rotate(angle);
+}
+
+void fltk3::Printer::translate(int x, int y)
+{
+  printer->translate(x, y);
+}
+
+void fltk3::Printer::untranslate(void)
+{
+  printer->untranslate();
+}
+
+int fltk3::Printer::end_page (void)
+{
+  return printer->end_page();
+}
+
+void fltk3::Printer::end_job (void)
+{
+  printer->end_job();
+}
+
+void fltk3::Printer::print_widget(fltk3::Widget* widget, int delta_x, int delta_y)
+{
+  printer->print_widget(widget, delta_x, delta_y);
+}
+
+void fltk3::Printer::print_window_part(fltk3::Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
+{
+  printer->print_window_part(win, x, y, w, h, delta_x, delta_y);
+}
+
+void fltk3::Printer::set_current(void)
+{
+  printer->set_current();
+}
+
+fltk3::GraphicsDriver* fltk3::Printer::driver(void)
+{
+  return printer->driver();
+}
+
+fltk3::Printer::~Printer(void)
+{
+  delete printer;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Printer.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Progress.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Progress.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Progress.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,124 @@
+//
+// "$Id$"
+//
+// Progress bar widget routines.
+//
+// Copyright 2000-2010 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+
+//
+//   fltk3::Progress::draw()        - Draw the check button.
+//   fltk3::Progress::fltk3::Progress() - Construct a fltk3::Progress widget.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Progress.h>
+#include <fltk3/draw.h>
+
+
+//
+// fltk3::Progress is a progress bar widget based off fltk3::Widget that shows a
+// standard progress bar...
+//
+
+
+//
+// 'fltk3::Progress::draw()' - Draw the progress bar.
+//
+
+/** Draws the progress bar. */
+void fltk3::Progress::draw()
+{
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int	progress;	// Size of progress bar...
+  int	bx, by, bw, bh;	// Box areas...
+  int	tx, tw;		// Temporary X + width
+
+
+  // Get the box borders...
+  bx = fltk3::box_dx(box());
+  by = fltk3::box_dy(box());
+  bw = fltk3::box_dw(box());
+  bh = fltk3::box_dh(box());
+
+  tx = x() + bx;
+  tw = w() - bw;
+
+  // Draw the progress bar...
+  if (maximum_ > minimum_)
+    progress = (int)(w() * (value_ - minimum_) / (maximum_ - minimum_) + 0.5f);
+  else
+    progress = 0;
+
+  // Draw the box and label...
+  if (progress > 0) {
+    fltk3::Color c = labelcolor();
+    labelcolor(fltk3::contrast(labelcolor(), selection_color()));
+
+    fltk3::push_clip(x(), y(), progress + bx, h());
+      draw_box(box(), x(), y(), w(), h(), active_r() ? selection_color() : fltk3::inactive(selection_color()));
+      draw_label(tx, y() + by, tw, h() - bh);
+    fltk3::pop_clip();
+
+    labelcolor(c);
+
+    if (progress<w()) {
+      fltk3::push_clip(tx + progress, y(), w() - progress, h());
+        draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fltk3::inactive(color()));
+        draw_label(tx, y() + by, tw, h() - bh);
+      fltk3::pop_clip();
+    }
+  } else {
+    draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fltk3::inactive(color()));
+    draw_label(tx, y() + by, tw, h() - bh);
+  }
+}
+
+
+/**  
+    The constructor creates the progress bar using the position, size, and label.
+    
+    You can set the background color with color() and the
+    progress bar color with selection_color(), or you can set both colors
+    together with color(unsigned bg, unsigned sel).
+    
+    The default colors are fltk3::BACKGROUND2_COLOR and fltk3::YELLOW, resp.
+*/
+fltk3::Progress::Progress(int X, int Y, int W, int H, const char* L)
+: fltk3::Widget(X, Y, W, H, L) {
+  align(fltk3::ALIGN_INSIDE);
+  box(fltk3::DOWN_BOX);
+  color(fltk3::BACKGROUND2_COLOR, fltk3::YELLOW);
+  minimum(0.0f);
+  maximum(100.0f);
+  value(0.0f);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Progress.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Quartz_Printer.mm
===================================================================
--- branches/branch-3.0/src/core/Fl_Quartz_Printer.mm	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Quartz_Printer.mm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,308 @@
+//
+// "$Id$"
+//
+// Mac OS X-specific printing support (objective-c++) for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems to:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifdef __APPLE__
+#include <fltk3/Printer.h>
+
+#include <fltk3/run.h>
+#include <fltk3/ask.h>
+#include <fltk3/draw.h>
+#import <Cocoa/Cocoa.h>
+
+extern void fl_quartz_restore_line_style_();
+
+fltk3::SystemPrinter::SystemPrinter(void)
+{
+  x_offset = 0;
+  y_offset = 0;
+  scale_x = scale_y = 1.;
+  gc = 0;
+  driver(fltk3::DisplayDevice::display_device()->driver());
+}
+
+fltk3::SystemPrinter::~SystemPrinter(void) {}
+
+int fltk3::SystemPrinter::start_job (int pagecount, int *frompage, int *topage)
+//printing using a Quartz graphics context
+//returns 0 iff OK
+{
+  OSStatus status = 0;
+  Fl_X::q_release_context();
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  if( [NSPrintPanel instancesRespondToSelector:@selector(runModalWithPrintInfo:)] &&
+     [NSPrintInfo instancesRespondToSelector:@selector(PMPrintSession)] ) {
+    NSAutoreleasePool *localPool;
+    localPool = [[NSAutoreleasePool alloc] init]; 
+    NSPrintInfo *info = [NSPrintInfo sharedPrintInfo];
+    NSPageLayout *layout = [NSPageLayout pageLayout];
+    NSInteger retval = [layout runModal];
+    if(retval == NSOKButton) {
+      NSPrintPanel *panel = [NSPrintPanel printPanel];
+      retval = (NSInteger)[panel runModalWithPrintInfo:info];//from 10.5 only
+    }
+    if(retval != NSOKButton) {
+      fltk3::first_window()->show();
+      [localPool release];
+      return 1;
+    }
+    printSession = (PMPrintSession)[info PMPrintSession];
+    pageFormat = (PMPageFormat)[info PMPageFormat];
+    printSettings = (PMPrintSettings)[info PMPrintSettings];
+    UInt32 from32, to32;
+    PMGetFirstPage(printSettings, &from32); 
+    if (frompage) *frompage = (int)from32;
+    PMGetLastPage(printSettings, &to32); 
+    if (topage) *topage = (int)to32;
+    if(topage && *topage > pagecount) *topage = pagecount;
+    status = PMSessionBeginCGDocumentNoDialog(printSession, printSettings, pageFormat);
+    [localPool release];
+  }
+  else {
+#endif
+    
+#if !__LP64__
+    Boolean accepted;
+    status = PMCreateSession(&printSession);
+    if (status != noErr) return 1;
+    status = PMCreatePageFormat(&pageFormat);
+    status = PMSessionDefaultPageFormat(printSession, pageFormat);
+    if (status != noErr) return 1;
+    // get pointer to the PMSessionPageSetupDialog Carbon function
+    typedef OSStatus (*dialog_f)(PMPrintSession, PMPageFormat, Boolean *);
+    static dialog_f f = NULL;
+    if (!f) f = (dialog_f)Fl_X::get_carbon_function("PMSessionPageSetupDialog");
+    status = (*f)(printSession, pageFormat, &accepted);
+    if (status != noErr || !accepted) {
+      fltk3::first_window()->show();
+      return 1;
+    }
+    status = PMCreatePrintSettings(&printSettings);
+    if (status != noErr || printSettings == kPMNoPrintSettings) return 1;
+    status = PMSessionDefaultPrintSettings (printSession, printSettings);
+    if (status != noErr) return 1;
+    PMSetPageRange(printSettings, 1, (UInt32)kPMPrintAllPages);
+    // get pointer to the PMSessionPrintDialog Carbon function
+    typedef OSStatus (*dialog_f2)(PMPrintSession, PMPrintSettings, PMPageFormat, Boolean *);
+    static dialog_f2 f2 = NULL;
+    if (!f2) f2 = (dialog_f2)Fl_X::get_carbon_function("PMSessionPrintDialog");
+    status = (*f2)(printSession, printSettings, pageFormat, &accepted);
+    if (!accepted) status = kPMCancel;
+    if (status != noErr) {
+      fltk3::first_window()->show();
+      return 1;
+    }
+    UInt32 from32, to32;
+    PMGetFirstPage(printSettings, &from32); 
+    if (frompage) *frompage = (int)from32;
+    PMGetLastPage(printSettings, &to32); 
+    if (topage) *topage = (int)to32;
+    if(topage && *topage > pagecount) *topage = pagecount;
+    CFStringRef mystring[1];
+    mystring[0] = kPMGraphicsContextCoreGraphics;
+    CFArrayRef array = CFArrayCreate(NULL, (const void **)mystring, 1, &kCFTypeArrayCallBacks);
+    status = PMSessionSetDocumentFormatGeneration(printSession, kPMDocumentFormatDefault, array, NULL);
+    CFRelease(array);
+    status = PMSessionBeginDocumentNoDialog(printSession, printSettings, pageFormat);
+#endif //__LP64__
+    
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  }
+#endif
+  if (status != noErr) return 1;
+  y_offset = x_offset = 0;
+  this->set_current();
+  return 0;
+}
+
+void fltk3::SystemPrinter::margins(int *left, int *top, int *right, int *bottom)
+{
+  PMPaper paper;
+  PMGetPageFormatPaper(pageFormat, &paper);
+  PMOrientation orientation;
+  PMGetOrientation(pageFormat, &orientation);
+  PMPaperMargins margins;
+  PMPaperGetMargins(paper, &margins);
+  if(orientation == kPMPortrait) {
+    if (left) *left = (int)(margins.left / scale_x + 0.5);
+    if (top) *top = (int)(margins.top / scale_y + 0.5);
+    if (right) *right = (int)(margins.right / scale_x + 0.5);
+    if (bottom) *bottom = (int)(margins.bottom / scale_y + 0.5);
+    }
+  else {
+    if (left) *left = (int)(margins.top / scale_x + 0.5);
+    if (top) *top = (int)(margins.left / scale_y + 0.5);
+    if (right) *right = (int)(margins.bottom / scale_x + 0.5);
+    if (bottom) *bottom = (int)(margins.right / scale_y + 0.5);
+  }
+}
+
+int fltk3::SystemPrinter::printable_rect(int *w, int *h)
+//returns 0 iff OK
+{
+  OSStatus status;
+  PMRect pmRect;
+  int x, y;
+  
+  status = PMGetAdjustedPageRect(pageFormat, &pmRect);
+  if (status != noErr) return 1;
+  
+  x = (int)pmRect.left;
+  y = (int)pmRect.top;
+  *w = int((int)(pmRect.right - x) / scale_x + 1);
+  *h = int((int)(pmRect.bottom - y) / scale_y + 1);
+  return 0;
+}
+
+void fltk3::SystemPrinter::origin(int x, int y)
+{
+  x_offset = x;
+  y_offset = y;
+  CGContextRestoreGState(fl_gc);
+  CGContextRestoreGState(fl_gc);
+  CGContextSaveGState(fl_gc);
+  CGContextScaleCTM(fl_gc, scale_x, scale_y);
+  CGContextTranslateCTM(fl_gc, x, y);
+  CGContextRotateCTM(fl_gc, angle);
+  CGContextSaveGState(fl_gc);
+}
+
+void fltk3::SystemPrinter::scale (float s_x, float s_y)
+{
+  if (s_y == 0.) s_y = s_x;
+  scale_x = s_x;
+  scale_y = s_y;
+  CGContextRestoreGState(fl_gc);
+  CGContextRestoreGState(fl_gc);
+  CGContextSaveGState(fl_gc);
+  CGContextScaleCTM(fl_gc, scale_x, scale_y);
+  CGContextRotateCTM(fl_gc, angle);
+  x_offset = y_offset = 0;
+  CGContextSaveGState(fl_gc);
+}
+
+void fltk3::SystemPrinter::rotate (float rot_angle)
+{
+  angle = - rot_angle * M_PI / 180.;
+  CGContextRestoreGState(fl_gc);
+  CGContextRestoreGState(fl_gc);
+  CGContextSaveGState(fl_gc);
+  CGContextScaleCTM(fl_gc, scale_x, scale_y);
+  CGContextTranslateCTM(fl_gc, x_offset, y_offset);
+  CGContextRotateCTM(fl_gc, angle);
+  CGContextSaveGState(fl_gc);
+}
+
+void fltk3::SystemPrinter::translate(int x, int y)
+{
+  CGContextSaveGState(fl_gc);
+  CGContextTranslateCTM(fl_gc, x, y );
+  CGContextSaveGState(fl_gc);
+}
+
+void fltk3::SystemPrinter::untranslate(void)
+{
+  CGContextRestoreGState(fl_gc);
+  CGContextRestoreGState(fl_gc);
+}
+
+int fltk3::SystemPrinter::start_page (void)
+{	
+  OSStatus status = PMSessionBeginPageNoDialog(printSession, pageFormat, NULL);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+  if ( PMSessionGetCGGraphicsContext != NULL ) {
+    status = PMSessionGetCGGraphicsContext(printSession, &fl_gc);
+  }
+  else {
+#endif
+#if ! __LP64__
+    status = PMSessionGetGraphicsContext(printSession,NULL,(void **)&fl_gc);
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+  }
+#endif
+  PMRect pmRect;
+  float win_scale_x, win_scale_y;
+
+  PMPaper paper;
+  PMGetPageFormatPaper(pageFormat, &paper);
+  PMPaperMargins margins;
+  PMPaperGetMargins(paper, &margins);
+  PMOrientation orientation;
+  PMGetOrientation(pageFormat, &orientation);
+  
+  status = PMGetAdjustedPageRect(pageFormat, &pmRect);
+  double h = pmRect.bottom - pmRect.top;
+  x_offset = 0;
+  y_offset = 0; 
+  angle = 0;
+  scale_x = scale_y = 1;
+  win_scale_x = win_scale_y = 1;
+  if(orientation == kPMPortrait)
+    CGContextTranslateCTM(fl_gc, margins.left, margins.bottom + h);
+  else
+    CGContextTranslateCTM(fl_gc, margins.top, margins.right + h);
+  CGContextScaleCTM(fl_gc, win_scale_x, - win_scale_y);
+  fl_quartz_restore_line_style_();
+  CGContextSetShouldAntialias(fl_gc, false);
+  CGContextSaveGState(fl_gc);
+  CGContextSaveGState(fl_gc);
+  fltk3::line_style(fltk3::SOLID);
+  fl_window = (void *)1; // TODO: something better
+  fltk3::clip_region(0);
+  if( status == noErr) gc = fl_gc;
+  return status != noErr;
+}
+
+int fltk3::SystemPrinter::end_page (void)
+{	
+  CGContextFlush(fl_gc);
+  CGContextRestoreGState(fl_gc);
+  CGContextRestoreGState(fl_gc);
+  OSStatus status = PMSessionEndPageNoDialog(printSession);
+  gc = NULL;
+  return status != noErr;
+}
+
+void fltk3::SystemPrinter::end_job (void)
+{
+  OSStatus status;
+  
+  status = PMSessionError(printSession);
+  if (status != noErr) {
+    fltk3::alert ("PM Session error %d", (int)status);
+  }
+  PMSessionEndDocumentNoDialog(printSession);
+  fltk3::DisplayDevice::display_device()->set_current();
+  fl_gc = 0;
+  fltk3::first_window()->show();
+}
+
+#endif // __APPLE__
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Quartz_Printer.mm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Repeat_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Repeat_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Repeat_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,71 @@
+//
+// "$Id$"
+//
+// Repeat button widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/RepeatButton.h>
+
+#define INITIALREPEAT .5
+#define REPEAT .1
+
+void fltk3::RepeatButton::repeat_callback(void *v) {
+  fltk3::Button *b = (fltk3::Button*)v;
+  fltk3::add_timeout(REPEAT,repeat_callback,b);
+  b->do_callback();
+}
+
+int fltk3::RepeatButton::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  int newval;
+  switch (event) {
+  case fltk3::HIDE:
+  case fltk3::DEACTIVATE:
+  case fltk3::RELEASE:
+    newval = 0; goto J1;
+  case fltk3::PUSH:
+  case fltk3::DRAG:
+    if (fltk3::visible_focus()) fltk3::focus(this);
+    newval = fltk3::event_inside(this);
+  J1:
+    if (!active()) 
+      newval = 0;
+    if (value(newval)) {
+      if (newval) {
+	fltk3::add_timeout(INITIALREPEAT,repeat_callback,this);
+	do_callback();
+      } else {
+	fltk3::remove_timeout(repeat_callback,this);
+      }
+    }
+    return 1;
+  default:
+    return Button::handle(event);
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Repeat_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Return_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Return_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Return_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,75 @@
+//
+// "$Id$"
+//
+// Return button widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/ReturnButton.h>
+#include <fltk3/draw.h>
+
+int fl_return_arrow(int x, int y, int w, int h) {
+  int size = w; if (h<size) size = h;
+  int d = (size+2)/4; if (d<3) d = 3;
+  int t = (size+9)/12; if (t<1) t = 1;
+  int x0 = x+(w-2*d-2*t-1)/2;
+  int x1 = x0+d;
+  int y0 = y+h/2;
+  fltk3::color(fltk3::LIGHT3);
+  fltk3::line(x0, y0, x1, y0+d);
+  fltk3::yxline(x1, y0+d, y0+t, x1+d+2*t, y0-d);
+  fltk3::yxline(x1, y0-t, y0-d);
+  fltk3::color(fltk3::gray_ramp(0));
+  fltk3::line(x0, y0, x1, y0-d);
+  fltk3::color(fltk3::DARK3);
+  fltk3::xyline(x1+1, y0-t, x1+d, y0-d, x1+d+2*t);
+  return 1;
+}
+
+void fltk3::ReturnButton::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (type() == fltk3::HIDDEN_BUTTON) return;
+  draw_box(value() ? (down_box()?down_box():fltk3::down(box())) : box(),
+	   value() ? selection_color() : color());
+  int W = h();
+  if (w()/3 < W) W = w()/3;
+  fl_return_arrow(x()+w()-W-4, y(), W, h());
+  draw_label(x(), y(), w()-W+4, h());
+  if (fltk3::focus() == this) draw_focus();
+}
+
+int fltk3::ReturnButton::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (event == fltk3::SHORTCUT &&
+      (fltk3::event_key() == fltk3::EnterKey || fltk3::event_key() == fltk3::KPEnterKey)) {
+    simulate_key_action();
+    do_callback();
+    return 1;
+  } else
+    return Button::handle(event);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Return_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Roller.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Roller.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Roller.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,187 @@
+//
+// "$Id$"
+//
+// Roller widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Rapid-App style knob
+
+#include <fltk3/run.h>
+#include <fltk3/Roller.h>
+#include <fltk3/draw.h>
+#include <math.h>
+
+int fltk3::Roller::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  static int ipos;
+  int newpos = horizontal() ? fltk3::event_x() : fltk3::event_y();
+  switch (event) {
+  case fltk3::PUSH:
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
+      redraw();
+    }
+    handle_push();
+    ipos = newpos;
+    return 1;
+  case fltk3::DRAG:
+    handle_drag(clamp(round(increment(previous_value(),newpos-ipos))));
+    return 1;
+  case fltk3::RELEASE:
+    handle_release();
+    return 1;
+  case fltk3::KEYBOARD :
+    switch (fltk3::event_key()) {
+      case fltk3::UpKey:
+        if (horizontal()) return 0;
+	handle_drag(clamp(increment(value(),-1)));
+	return 1;
+      case fltk3::DownKey:
+        if (horizontal()) return 0;
+	handle_drag(clamp(increment(value(),1)));
+	return 1;
+      case fltk3::LeftKey:
+        if (!horizontal()) return 0;
+	handle_drag(clamp(increment(value(),-1)));
+	return 1;
+      case fltk3::RightKey:
+        if (!horizontal()) return 0;
+	handle_drag(clamp(increment(value(),1)));
+	return 1;
+      default:
+        return 0;
+    }
+    // break not required because of switch...
+  case fltk3::FOCUS :
+  case fltk3::UNFOCUS :
+    if (fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    } else return 0;
+  case fltk3::ENTER :
+  case fltk3::LEAVE :
+    return 1;
+  default:
+    return 0;
+  }
+}
+
+void fltk3::Roller::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (damage()&fltk3::DAMAGE_ALL) draw_box();
+  int X = x()+fltk3::box_dx(box());
+  int Y = y()+fltk3::box_dy(box());
+  int W = w()-fltk3::box_dw(box())-1;
+  int H = h()-fltk3::box_dh(box())-1;
+  if (W<=0 || H <=0) return;
+  int offset = step() ? int(value()/step()) : 0;
+  const double ARC = 1.5; // 1/2 the number of radians visible
+  const double delta = .2; // radians per knurl
+  if (horizontal()) { // horizontal one
+    // draw shaded ends of wheel:
+    int h1 = W/4+1; // distance from end that shading starts
+    fltk3::color(color()); fltk3::rectf(X+h1,Y,W-2*h1,H);
+    for (int i=0; h1; i++) {
+      fltk3::color((fltk3::Color)(fltk3::GRAY-i-1));
+      int h2 = fltk3::GRAY-i-1 > fltk3::DARK3 ? 2*h1/3+1 : 0;
+      fltk3::rectf(X+h2,Y,h1-h2,H);
+      fltk3::rectf(X+W-h1,Y,h1-h2,H);
+      h1 = h2;
+    }
+    if (active_r()) {
+      // draw ridges:
+      double junk;
+      for (double yy = -ARC+modf(offset*sin(ARC)/(W/2)/delta,&junk)*delta;;
+	   yy += delta) {
+	int yy1 = int((sin(yy)/sin(ARC)+1)*W/2);
+	if (yy1 <= 0) continue; else if (yy1 >= W-1) break;
+	fltk3::color(fltk3::DARK3); fltk3::yxline(X+yy1,Y+1,Y+H-1);
+	if (yy < 0) yy1--; else yy1++;
+	fltk3::color(fltk3::LIGHT1);fltk3::yxline(X+yy1,Y+1,Y+H-1);
+      }
+      // draw edges:
+      h1 = W/8+1; // distance from end the color inverts
+      fltk3::color(fltk3::DARK2);
+      fltk3::xyline(X+h1,Y+H-1,X+W-h1);
+      fltk3::color(fltk3::DARK3);
+      fltk3::yxline(X,Y+H,Y,X+h1);
+      fltk3::xyline(X+W-h1,Y,X+W);
+      fltk3::color(fltk3::LIGHT2);
+      fltk3::xyline(X+h1,Y-1,X+W-h1);
+      fltk3::yxline(X+W,Y,Y+H,X+W-h1);
+      fltk3::xyline(X+h1,Y+H,X);
+    }
+  } else { // vertical one
+    // draw shaded ends of wheel:
+    int h1 = H/4+1; // distance from end that shading starts
+    fltk3::color(color()); fltk3::rectf(X,Y+h1,W,H-2*h1);
+    for (int i=0; h1; i++) {
+      fltk3::color((fltk3::Color)(fltk3::GRAY-i-1));
+      int h2 = fltk3::GRAY-i-1 > fltk3::DARK3 ? 2*h1/3+1 : 0;
+      fltk3::rectf(X,Y+h2,W,h1-h2);
+      fltk3::rectf(X,Y+H-h1,W,h1-h2);
+      h1 = h2;
+    }
+    if (active_r()) {
+      // draw ridges:
+      double junk;
+      for (double yy = -ARC+modf(offset*sin(ARC)/(H/2)/delta,&junk)*delta;
+	   ; yy += delta) {
+	int yy1 = int((sin(yy)/sin(ARC)+1)*H/2);
+	if (yy1 <= 0) continue; else if (yy1 >= H-1) break;
+	fltk3::color(fltk3::DARK3); fltk3::xyline(X+1,Y+yy1,X+W-1);
+	if (yy < 0) yy1--; else yy1++;
+	fltk3::color(fltk3::LIGHT1);fltk3::xyline(X+1,Y+yy1,X+W-1);
+      }
+      // draw edges:
+      h1 = H/8+1; // distance from end the color inverts
+      fltk3::color(fltk3::DARK2);
+      fltk3::yxline(X+W-1,Y+h1,Y+H-h1);
+      fltk3::color(fltk3::DARK3);
+      fltk3::xyline(X+W,Y,X,Y+h1);
+      fltk3::yxline(X,Y+H-h1,Y+H);
+      fltk3::color(fltk3::LIGHT2);
+      fltk3::yxline(X,Y+h1,Y+H-h1);
+      fltk3::xyline(X,Y+H,X+W,Y+H-h1);
+      fltk3::yxline(X+W,Y+h1,Y);
+    }
+  }
+
+  if (fltk3::focus() == this) draw_focus(fltk3::THIN_UP_FRAME, x(), y(), w(), h());
+}
+
+/**
+  Creates a new fltk3::Roller widget using the given position,
+  size, and label string. The default boxtype is fltk3::NO_BOX.
+  <P>Inherited destructor destroys the valuator.
+*/
+fltk3::Roller::Roller(int X,int Y,int W,int H,const char* L)
+  : fltk3::Valuator(X,Y,W,H,L) {
+  box(fltk3::UP_BOX);
+  step(1,1000);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Roller.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Round_Button.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Round_Button.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Round_Button.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,48 @@
+//
+// "$Id$"
+//
+// Round button for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// A subclass of fltk3::Button that always draws as a round circle.  This
+// circle is smaller than the widget size and can be surrounded by
+// another box type, for compatibility with Forms.
+
+#include <fltk3/run.h>
+#include <fltk3/RoundButton.h>
+
+/**
+  Creates a new fltk3::RoundButton widget using the given
+  position, size, and label string.
+*/
+fltk3::RoundButton::RoundButton(int X,int Y,int W,int H, const char *l)
+: fltk3::LightButton(X,Y,W,H,l) {
+  box(fltk3::NO_BOX);
+  down_box(fltk3::ROUND_DOWN_BOX);
+  selection_color(fltk3::FOREGROUND_COLOR);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Round_Button.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Scroll.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Scroll.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Scroll.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,422 @@
+//
+// "$Id$"
+//
+// Scroll widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/TiledImage.h>
+#include <fltk3/ScrollGroup.h>
+#include <fltk3/draw.h>
+
+/** Clear all but the scrollbars... */
+void fltk3::ScrollGroup::clear() {
+  // Note: the scrollbars are removed from the group before calling
+  // fltk3::Group::clear() to take advantage of the optimized widget removal
+  // and deletion. Finally they are added to fltk3::ScrollGroup's group again. This
+  // is MUCH faster than removing the widgets one by one (STR #2409).
+
+  remove(scrollbar);
+  remove(hscrollbar);
+  Group::clear();
+  add(hscrollbar);
+  add(scrollbar);
+}
+
+/** Insure the scrollbars are the last children */
+void fltk3::ScrollGroup::fix_scrollbar_order() {
+  fltk3::Widget** a = (fltk3::Widget**)array();
+  if (a[children()-1] != &scrollbar) {
+    int i,j; for (i = j = 0; j < children(); j++)
+      if (a[j] != &hscrollbar && a[j] != &scrollbar) a[i++] = a[j];
+    a[i++] = &hscrollbar;
+    a[i++] = &scrollbar;
+  }
+}
+
+// Draw widget's background and children within a specific clip region
+//    So widget can just redraw damaged parts.
+//
+void fltk3::ScrollGroup::draw_clip(void* v,int X, int Y, int W, int H) {
+  fltk3::push_clip(X,Y,W,H);
+  fltk3::ScrollGroup* s = (fltk3::ScrollGroup*)v;
+  // erase background as needed...
+  switch (s->box()) {
+    case fltk3::NO_BOX :
+    case fltk3::UP_FRAME :
+    case fltk3::DOWN_FRAME :
+    case fltk3::THIN_UP_FRAME :
+    case fltk3::THIN_DOWN_FRAME :
+    case fltk3::ENGRAVED_FRAME :
+    case fltk3::EMBOSSED_FRAME :
+    case fltk3::BORDER_FRAME :
+    case fltk3::SHADOW_FRAME :
+    case fltk3::ROUNDED_FRAME :
+    case fltk3::OVAL_FRAME :
+    case fltk3::PLASTIC_UP_FRAME :
+    case fltk3::PLASTIC_DOWN_FRAME :
+        if (s->parent() == (fltk3::Group *)s->window() && fltk3::scheme_bg_) {
+	  fltk3::scheme_bg_->draw(X-(X%((fltk3::TiledImage *)fltk3::scheme_bg_)->image()->w()),
+	                       Y-(Y%((fltk3::TiledImage *)fltk3::scheme_bg_)->image()->h()),
+	                       W+((fltk3::TiledImage *)fltk3::scheme_bg_)->image()->w(),
+			       H+((fltk3::TiledImage *)fltk3::scheme_bg_)->image()->h());
+	  break;
+        }
+
+    default :
+	fltk3::color(s->color());
+	fltk3::rectf(X,Y,W,H);
+	break;
+  }
+  fltk3::Widget*const* a = s->array();
+  for (int i=s->children()-2; i--;) {
+    fltk3::Widget& o = **a++;
+    s->draw_child(o);
+    s->draw_outside_label(o);
+  }
+  fltk3::pop_clip();
+}
+
+/**
+   Calculate visibility/size/position of scrollbars, find children's bounding box.
+   The \p si paramater will be filled with data from the calculations.
+   Derived classes can make use of this call to figure out the scrolling area
+   eg. during resize() handling.
+   \param[in] si -- ScrollInfo structure
+   \returns Structure containing the calculated info.
+*/
+void fltk3::ScrollGroup::recalc_scrollbars(ScrollInfo &si) {
+
+  // inner box of widget (excluding scrollbars)
+  si.innerbox_x = x()+fltk3::box_dx(box());
+  si.innerbox_y = y()+fltk3::box_dy(box());
+  si.innerbox_w = w()-fltk3::box_dw(box());
+  si.innerbox_h = h()-fltk3::box_dh(box());
+
+  // accumulate a bounding box for all the children
+  si.child_l = si.innerbox_x;
+  si.child_r = si.innerbox_x;
+  si.child_b = si.innerbox_y;
+  si.child_t = si.innerbox_y;
+  int first = 1;
+  fltk3::Widget*const* a = array();
+  for (int i=children()-2; i--;) {
+    fltk3::Widget* o = *a++;
+    if ( first ) {
+        first = 0;
+	si.child_l = o->x();
+	si.child_r = o->x()+o->w();
+	si.child_b = o->y()+o->h();
+	si.child_t = o->y();
+    } else {
+	if (o->x() < si.child_l) si.child_l = o->x();
+	if (o->y() < si.child_t) si.child_t = o->y();
+	if (o->x()+o->w() > si.child_r) si.child_r = o->x()+o->w();
+	if (o->y()+o->h() > si.child_b) si.child_b = o->y()+o->h();
+    }
+  }
+
+  // Turn the scrollbars on and off as necessary.
+  // See if children would fit if we had no scrollbars...
+  {
+    int X = si.innerbox_x;
+    int Y = si.innerbox_y;
+    int W = si.innerbox_w;
+    int H = si.innerbox_h;
+
+    si.scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+    si.vneeded = 0;
+    si.hneeded = 0;
+    if (type() & VERTICAL) {
+      if ((type() & ALWAYS_ON) || si.child_t < Y || si.child_b > Y+H) {
+	si.vneeded = 1;
+	W -= si.scrollsize;
+	if (scrollbar.align() & fltk3::ALIGN_LEFT) X += si.scrollsize;
+      }
+    }
+    if (type() & HORIZONTAL) {
+      if ((type() & ALWAYS_ON) || si.child_l < X || si.child_r > X+W) {
+	si.hneeded = 1;
+	H -= si.scrollsize;
+	if (scrollbar.align() & fltk3::ALIGN_TOP) Y += si.scrollsize;
+	// recheck vertical since we added a horizontal scrollbar
+	if (!si.vneeded && (type() & VERTICAL)) {
+	  if ((type() & ALWAYS_ON) || si.child_t < Y || si.child_b > Y+H) {
+	    si.vneeded = 1;
+	    W -= si.scrollsize;
+	    if (scrollbar.align() & fltk3::ALIGN_LEFT) X += si.scrollsize;
+	  }
+	}
+      }
+    }
+    si.innerchild_x = X;
+    si.innerchild_y = Y;
+    si.innerchild_w = W;
+    si.innerchild_h = H;
+  }
+
+  // calculate hor scrollbar position
+  si.hscroll_x = si.innerchild_x;
+  si.hscroll_y = (scrollbar.align() & fltk3::ALIGN_TOP) 
+		     ? si.innerbox_y
+		     : si.innerbox_y + si.innerbox_h - si.scrollsize;
+  si.hscroll_w = si.innerchild_w;
+  si.hscroll_h = si.scrollsize;
+
+  // calculate ver scrollbar position
+  si.vscroll_x = (scrollbar.align() & fltk3::ALIGN_LEFT)
+                     ? si.innerbox_x
+		     : si.innerbox_x + si.innerbox_w - si.scrollsize;
+  si.vscroll_y = si.innerchild_y;
+  si.vscroll_w = si.scrollsize;
+  si.vscroll_h = si.innerchild_h;
+
+  // calculate h/v scrollbar values (pos/size/first/total)
+  si.hpos = si.innerchild_x - si.child_l;
+  si.hsize = si.innerchild_w;
+  si.hfirst = 0;
+  si.htotal = si.child_r - si.child_l;
+  if ( si.hpos < 0 ) { si.htotal += (-si.hpos); si.hfirst = si.hpos; }
+
+  si.vpos = si.innerchild_y - si.child_t;
+  si.vsize = si.innerchild_h;
+  si.vfirst = 0;
+  si.vtotal = si.child_b - si.child_t;
+  if ( si.vpos < 0 ) { si.vtotal += (-si.vpos); si.vfirst = si.vpos; }
+
+//  printf("DEBUG --- ScrollInfo ---\n");
+//  printf("DEBUG        scrollsize: %d\n", si.scrollsize);
+//  printf("DEBUG  hneeded, vneeded: %d %d\n", si.hneeded, si.vneeded);
+//  printf("DEBUG     innerbox xywh: %d %d %d %d\n", si.innerbox_x,   si.innerbox_y,   si.innerbox_w,   si.innerbox_h);
+//  printf("DEBUG   innerchild xywh: %d %d %d %d\n", si.innerchild_x, si.innerchild_y, si.innerchild_w, si.innerchild_h);
+//  printf("DEBUG        child lrbt: %d %d %d %d\n", si.child_l, si.child_r, si.child_b, si.child_t);
+//  printf("DEBUG      hscroll xywh: %d %d %d %d\n", si.hscroll_x, si.hscroll_y, si.hscroll_w, si.hscroll_h);
+//  printf("DEBUG      vscroll xywh: %d %d %d %d\n", si.vscroll_x, si.vscroll_y, si.vscroll_w, si.vscroll_h);
+//  printf("DEBUG  horz scroll vals: %d %d %d %d\n", si.hpos, si.hsize, si.hfirst, si.htotal);
+//  printf("DEBUG  vert scroll vals: %d %d %d %d\n", si.vpos, si.vsize, si.vfirst, si.vtotal);
+//  printf("DEBUG \n");
+}
+
+/**
+  Returns the bounding box for the interior of the scrolling area, inside
+  the scrollbars.
+  
+  Currently this is only reliable after draw(), and before any resizing of
+  the fltk3::ScrollGroup or any child widgets occur.
+  
+  \todo The visibility of the scrollbars ought to be checked/calculated
+  outside of the draw() method (STR #1895).
+*/
+void fltk3::ScrollGroup::bbox(int& X, int& Y, int& W, int& H) {
+  X = x()+fltk3::box_dx(box());
+  Y = y()+fltk3::box_dy(box());
+  W = w()-fltk3::box_dw(box());
+  H = h()-fltk3::box_dh(box());
+  if (scrollbar.visible()) {
+    W -= scrollbar.w();
+    if (scrollbar.align() & fltk3::ALIGN_LEFT) X += scrollbar.w();
+  }
+  if (hscrollbar.visible()) {
+    H -= hscrollbar.h();
+    if (scrollbar.align() & fltk3::ALIGN_TOP) Y += hscrollbar.h();
+  }
+}
+
+void fltk3::ScrollGroup::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  fix_scrollbar_order();
+  int X,Y,W,H; bbox(X,Y,W,H);
+
+  uchar d = damage();
+
+  if (d & fltk3::DAMAGE_ALL) { // full redraw
+    draw_box(box(),x(),y(),w(),h(),color());
+    draw_clip(this, X, Y, W, H);
+  } else {
+    if (d & fltk3::DAMAGE_SCROLL) {
+      // scroll the contents:
+      fltk3::scroll(X, Y, W, H, oldx-xposition_, oldy-yposition_, draw_clip, this);
+
+      // Erase the background as needed...
+      fltk3::Widget*const* a = array();
+      int L, R, T, B;
+      L = 999999;
+      R = 0;
+      T = 999999;
+      B = 0;
+      for (int i=children()-2; i--; a++) {
+        if ((*a)->x() < L) L = (*a)->x();
+	if (((*a)->x() + (*a)->w()) > R) R = (*a)->x() + (*a)->w();
+        if ((*a)->y() < T) T = (*a)->y();
+	if (((*a)->y() + (*a)->h()) > B) B = (*a)->y() + (*a)->h();
+      }
+      if (L > X) draw_clip(this, X, Y, L - X, H);
+      if (R < (X + W)) draw_clip(this, R, Y, X + W - R, H);
+      if (T > Y) draw_clip(this, X, Y, W, T - Y);
+      if (B < (Y + H)) draw_clip(this, X, B, W, Y + H - B);
+    }
+    if (d & fltk3::DAMAGE_CHILD) { // draw damaged children
+      fltk3::push_clip(X, Y, W, H);
+      fltk3::Widget*const* a = array();
+      for (int i=children()-2; i--;) update_child(**a++);
+      fltk3::pop_clip();
+    }
+  }
+
+  // Calculate where scrollbars should go, and draw them
+  {
+      ScrollInfo si;
+      recalc_scrollbars(si);
+
+      // Now that we know what's needed, make it so.
+      if (si.vneeded && !scrollbar.visible()) {
+	scrollbar.set_visible();
+	d = fltk3::DAMAGE_ALL;
+      }
+      else if (!si.vneeded && scrollbar.visible()) {
+	scrollbar.clear_visible();
+	draw_clip(this, si.vscroll_x, si.vscroll_y, si.vscroll_w, si.vscroll_h);
+	d = fltk3::DAMAGE_ALL;
+      }
+      if (si.hneeded && !hscrollbar.visible()) {
+	hscrollbar.set_visible();
+	d = fltk3::DAMAGE_ALL;
+      }
+      else if (!si.hneeded && hscrollbar.visible()) {
+	hscrollbar.clear_visible();
+	draw_clip(this, si.hscroll_x, si.hscroll_y, si.hscroll_w, si.hscroll_h);
+	d = fltk3::DAMAGE_ALL;
+      }
+      else if ( hscrollbar.h() != si.scrollsize || scrollbar.w() != si.scrollsize ) {
+         // scrollsize changed
+         d = fltk3::DAMAGE_ALL;
+      }
+
+      scrollbar.resize(si.vscroll_x, si.vscroll_y, si.vscroll_w, si.vscroll_h);
+      oldy = yposition_ = si.vpos;	// si.innerchild_y - si.child_t;
+      scrollbar.value(si.vpos, si.vsize, si.vfirst, si.vtotal);
+
+      hscrollbar.resize(si.hscroll_x, si.hscroll_y, si.hscroll_w, si.hscroll_h);
+      oldx = xposition_ = si.hpos;	// si.innerchild_x - si.child_l;
+      hscrollbar.value(si.hpos, si.hsize, si.hfirst, si.htotal);
+  }
+
+  // draw the scrollbars:
+  if (d & fltk3::DAMAGE_ALL) {
+    draw_child(scrollbar);
+    draw_child(hscrollbar);
+    if (scrollbar.visible() && hscrollbar.visible()) {
+      // fill in the little box in the corner
+      fltk3::color(color());
+      fltk3::rectf(scrollbar.x(), hscrollbar.y(), scrollbar.w(), hscrollbar.h());
+    }
+  } else {
+    update_child(scrollbar);
+    update_child(hscrollbar);
+  }
+}
+
+void fltk3::ScrollGroup::resize(int X, int Y, int W, int H) {
+  int dx = X-x(), dy = Y-y();
+  int dw = W-w(), dh = H-h();
+  Widget::resize(X,Y,W,H); // resize _before_ moving children around
+  fix_scrollbar_order();
+  // move all the children:
+  fltk3::Widget*const* a = array();
+  for (int i=children()-2; i--;) {
+    fltk3::Widget* o = *a++;
+    o->position(o->x()+dx, o->y()+dy);
+  }
+  if (dw==0 && dh==0) {
+    char pad = ( scrollbar.visible() && hscrollbar.visible() );
+    char al = ( (scrollbar.align() & fltk3::ALIGN_LEFT) != 0 );
+    char at = ( (scrollbar.align() & fltk3::ALIGN_TOP)  !=0 );
+    scrollbar.position(al?X:X+W-scrollbar.w(), (at&&pad)?Y+hscrollbar.h():Y);
+    hscrollbar.position((al&&pad)?X+scrollbar.w():X, at?Y:Y+H-hscrollbar.h());
+  } else {
+    // FIXME recalculation of scrollbars needs to be moved out fo "draw()" (STR #1895)
+    redraw(); // need full recalculation of scrollbars
+  }
+}
+
+/**  Moves the contents of the scroll group to a new position.*/
+void fltk3::ScrollGroup::scroll_to(int X, int Y) {
+  int dx = xposition_-X;
+  int dy = yposition_-Y;
+  if (!dx && !dy) return;
+  xposition_ = X;
+  yposition_ = Y;
+  fltk3::Widget*const* a = array();
+  for (int i=children(); i--;) {
+    fltk3::Widget* o = *a++;
+    if (o == &hscrollbar || o == &scrollbar) continue;
+    o->position(o->x()+dx, o->y()+dy);
+  }
+  if (parent() == (fltk3::Group *)window() && fltk3::scheme_bg_) damage(fltk3::DAMAGE_ALL);
+  else damage(fltk3::DAMAGE_SCROLL);
+}
+
+void fltk3::ScrollGroup::hscrollbar_cb(fltk3::Widget* o, void*) {
+  fltk3::ScrollGroup* s = (fltk3::ScrollGroup*)(o->parent());
+  s->scroll_to(int(((fltk3::Scrollbar*)o)->value()), s->yposition());
+}
+
+void fltk3::ScrollGroup::scrollbar_cb(fltk3::Widget* o, void*) {
+  fltk3::ScrollGroup* s = (fltk3::ScrollGroup*)(o->parent());
+  s->scroll_to(s->xposition(), int(((fltk3::Scrollbar*)o)->value()));
+}
+/**
+  Creates a new fltk3::ScrollGroup widget using the given position,
+  size, and label string. The default boxtype is fltk3::NO_BOX.
+  <P>The destructor <I>also deletes all the children</I>. This allows a
+  whole tree to be deleted at once, without having to keep a pointer to
+  all the children in the user code. A kludge has been done so the 
+  fltk3::ScrollGroup and all of its children can be automatic (local)
+  variables, but you must declare the fltk3::ScrollGroup<I>first</I>, so
+  that it is destroyed last.
+*/
+fltk3::ScrollGroup::ScrollGroup(int X,int Y,int W,int H,const char* L)
+  : fltk3::Group(X,Y,W,H,L), 
+    scrollbar(X+W-fltk3::scrollbar_size(),Y,
+              fltk3::scrollbar_size(),H-fltk3::scrollbar_size()),
+    hscrollbar(X,Y+H-fltk3::scrollbar_size(),
+               W-fltk3::scrollbar_size(),fltk3::scrollbar_size()) {
+  type(BOTH);
+  xposition_ = oldx = 0;
+  yposition_ = oldy = 0;
+  scrollbar_size_ = 0;
+  hscrollbar.type(fltk3::HORIZONTAL);
+  hscrollbar.callback(hscrollbar_cb);
+  scrollbar.callback(scrollbar_cb);
+}
+
+int fltk3::ScrollGroup::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  fix_scrollbar_order();
+  return Group::handle(event);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Scroll.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Scrollbar.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Scrollbar.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Scrollbar.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,294 @@
+//
+// "$Id$"
+//
+// Scroll bar widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+#include <fltk3/run.h>
+#include <fltk3/Scrollbar.h>
+#include <fltk3/draw.h>
+#include <math.h>
+#include "flstring.h"
+
+#define INITIALREPEAT .5
+#define REPEAT .05
+
+void fltk3::Scrollbar::increment_cb() {
+  char inv = maximum()<minimum();
+  int ls = inv ? -linesize_ : linesize_;
+  int i;
+  switch (pushed_) {
+    case 1: // clicked on arrow left
+      i = -ls;
+      break;
+    default: // clicked on arrow right
+      i =  ls;
+      break;
+    case 5: // clicked into the box next to the slider on the left
+      i = -(int((maximum()-minimum())*slider_size()/(1.0-slider_size())));
+      if (inv) {
+        if (i<-ls) i = -ls;
+      } else {
+        if (i>-ls) i = -ls; // err
+      }
+      break;
+    case 6: // clicked into the box next to the slider on the right
+      i = (int((maximum()-minimum())*slider_size()/(1.0-slider_size())));
+      if (inv) {
+        if (i>ls) i = ls;
+      } else {
+        if (i<ls) i = ls; // err
+      }
+      break;
+  }
+  handle_drag(clamp(value() + i));
+}
+
+void fltk3::Scrollbar::timeout_cb(void* v) {
+  fltk3::Scrollbar* s = (fltk3::Scrollbar*)v;
+  s->increment_cb();
+  fltk3::add_timeout(REPEAT, timeout_cb, s);
+}
+
+int fltk3::Scrollbar::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  // area of scrollbar:
+  int area;
+  int X=x(); int Y=y(); int W=w(); int H=h();
+
+  // adjust slider area to be inside the arrow buttons:
+  if (horizontal()) {
+    if (W >= 3*H) {X += H; W -= 2*H;}
+  } else {
+    if (H >= 3*W) {Y += W; H -= 2*W;}
+  }
+
+  // which widget part is highlighted?
+  int relx;
+  int ww;
+  if (horizontal()) {
+    relx = fltk3::event_x()-X;
+    ww = W;
+  } else {
+    relx = fltk3::event_y()-Y;
+    ww = H;
+  }
+  if (relx < 0) area = 1;
+  else if (relx >= ww) area = 2;
+  else {
+    int S = int(slider_size()*ww+.5);
+    int T = (horizontal() ? H : W)/2+1;
+    if (type()==fltk3::VERT_NICE_SLIDER || type()==fltk3::HOR_NICE_SLIDER) T += 4;
+    if (S < T) S = T;
+    double val =
+      (maximum()-minimum()) ? (value()-minimum())/(maximum()-minimum()) : 0.5;
+    int sliderx;
+    if (val >= 1.0) sliderx = ww-S;
+    else if (val <= 0.0) sliderx = 0;
+    else sliderx = int(val*(ww-S)+.5);
+    if (fltk3::event_button() == fltk3::MIDDLE_MOUSE) area = 8;
+    else if (relx < sliderx) area = 5;
+    else if (relx >= sliderx+S) area = 6;
+    else area = 8;
+  }
+
+  switch (event) {
+  case fltk3::ENTER:
+  case fltk3::LEAVE:
+    return 1;
+  case fltk3::RELEASE:
+      damage(fltk3::DAMAGE_ALL);
+    if (pushed_) {
+      fltk3::remove_timeout(timeout_cb, this);
+      pushed_ = 0;
+    }
+    handle_release();
+    return 1;
+  case fltk3::PUSH:
+    if (pushed_) return 1;
+    if (area != 8) pushed_ = area;
+    if (pushed_) {
+      handle_push();
+      fltk3::add_timeout(INITIALREPEAT, timeout_cb, this);
+      increment_cb();
+      damage(fltk3::DAMAGE_ALL);
+      return 1;
+    }
+    return Slider::handle(event, X,Y,W,H);
+  case fltk3::DRAG:
+    if (pushed_) return 1;
+    return Slider::handle(event, X,Y,W,H);
+  case fltk3::MOUSEWHEEL :
+    if (horizontal()) {
+      if (fltk3::e_dx==0) return 0;
+      int ls = maximum()>=minimum() ? linesize_ : -linesize_;
+      handle_drag(clamp(value() + ls * fltk3::e_dx));
+      return 1;
+    } else {
+      if (fltk3::e_dy==0) return 0;
+      int ls = maximum()>=minimum() ? linesize_ : -linesize_;
+      handle_drag(clamp(value() + ls * fltk3::e_dy));
+      return 1;
+    }
+  case fltk3::SHORTCUT:
+  case fltk3::KEYBOARD: {
+    int v = value();
+    int ls = maximum()>=minimum() ? linesize_ : -linesize_;
+    if (horizontal()) {
+      switch (fltk3::event_key()) {
+      case fltk3::LeftKey:
+	v -= ls;
+	break;
+      case fltk3::RightKey:
+	v += ls;
+	break;
+      default:
+	return 0;
+      }
+    } else { // vertical
+      switch (fltk3::event_key()) {
+      case fltk3::UpKey:
+	v -= ls;
+	break;
+      case fltk3::DownKey:
+	v += ls;
+	break;
+      case fltk3::PageUpKey:
+	if (slider_size() >= 1.0) return 0;
+	v -= int((maximum()-minimum())*slider_size()/(1.0-slider_size()));
+	v += ls;
+	break;
+      case fltk3::PageDownKey:
+	if (slider_size() >= 1.0) return 0;
+	v += int((maximum()-minimum())*slider_size()/(1.0-slider_size()));
+	v -= ls;
+	break;
+      case fltk3::HomeKey:
+	v = int(minimum());
+	break;
+      case fltk3::EndKey:
+	v = int(maximum());
+	break;
+      default:
+	return 0;
+      }
+    }
+    v = int(clamp(v));
+    if (v != value()) {
+      Slider::value(v);
+      value_damage();
+      set_changed();
+      do_callback();
+    }
+    return 1;}
+  }
+  return 0;
+}
+
+void fltk3::Scrollbar::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (damage()&fltk3::DAMAGE_ALL) draw_box();
+  int X = x()+fltk3::box_dx(box());
+  int Y = y()+fltk3::box_dy(box());
+  int W = w()-fltk3::box_dw(box());
+  int H = h()-fltk3::box_dh(box());
+  if (horizontal()) {
+    if (W < 3*H) {Slider::draw(X,Y,W,H); return;}
+    Slider::draw(X+H,Y,W-2*H,H);
+    if (damage()&fltk3::DAMAGE_ALL) {
+      draw_box((pushed_==1) ? fltk3::down(slider()) : slider(),
+	       X, Y, H, H, selection_color());
+      draw_box((pushed_==2) ? fltk3::down(slider()) : slider(),
+	       X+W-H, Y, H, H, selection_color());
+      if (active_r())
+        fltk3::color(labelcolor());
+      else
+        fltk3::color(fltk3::inactive(labelcolor()));
+      int w1 = (H-4)/3; if (w1 < 1) w1 = 1;
+      int x1 = X+(H-w1-1)/2;
+      int yy1 = Y+(H-2*w1-1)/2;
+      if (fltk3::scheme_ && !strcmp(fltk3::scheme_, "gtk+")) {
+	fltk3::polygon(x1, yy1+w1, x1+w1, yy1+2*w1, x1+w1-1, yy1+w1, x1+w1, yy1);
+	x1 += (W-H);
+	fltk3::polygon(x1, yy1, x1+1, yy1+w1, x1, yy1+2*w1, x1+w1, yy1+w1);
+      } else {
+	fltk3::polygon(x1, yy1+w1, x1+w1, yy1+2*w1, x1+w1, yy1);
+	x1 += (W-H);
+	fltk3::polygon(x1, yy1, x1, yy1+2*w1, x1+w1, yy1+w1);
+      }
+    }
+  } else { // vertical
+    if (H < 3*W) {Slider::draw(X,Y,W,H); return;}
+    Slider::draw(X,Y+W,W,H-2*W);
+    if (damage()&fltk3::DAMAGE_ALL) {
+      draw_box((pushed_==1) ? fltk3::down(slider()) : slider(),
+	       X, Y, W, W, selection_color());
+      draw_box((pushed_==2) ? fltk3::down(slider()) : slider(),
+	       X, Y+H-W, W, W, selection_color());
+      if (active_r())
+        fltk3::color(labelcolor());
+      else
+        fltk3::color(fltk3::inactive(labelcolor()));
+      int w1 = (W-4)/3; if (w1 < 1) w1 = 1;
+      int x1 = X+(W-2*w1-1)/2;
+      int yy1 = Y+(W-w1-1)/2;
+      if (fltk3::scheme_ && !strcmp(fltk3::scheme_, "gtk+")) {
+	fltk3::polygon(x1, yy1+w1, x1+w1, yy1+w1-1, x1+2*w1, yy1+w1, x1+w1, yy1);
+	yy1 += H-W;
+	fltk3::polygon(x1, yy1, x1+w1, yy1+1, x1+w1, yy1+w1);
+	fltk3::polygon(x1+w1, yy1+1, x1+2*w1, yy1, x1+w1, yy1+w1);
+      } else {
+	fltk3::polygon(x1, yy1+w1, x1+2*w1, yy1+w1, x1+w1, yy1);
+	yy1 += H-W;
+	fltk3::polygon(x1, yy1, x1+w1, yy1+w1, x1+2*w1, yy1);
+      }
+    }
+  }
+}
+
+/**
+  Creates a new fltk3::Scrollbar widget with given position, size, and label.
+  You need to do type(fltk3::HORIZONTAL) if you want a horizontal scrollbar.
+*/
+fltk3::Scrollbar::Scrollbar(int X, int Y, int W, int H, const char* L)
+  : fltk3::Slider(X, Y, W, H, L) {
+  box(fltk3::FLAT_BOX);
+  color(fltk3::DARK2);
+  slider(fltk3::UP_BOX);
+  linesize_ = 16;
+  pushed_ = 0;
+  step(1);
+}
+
+/**  Destroys the Scrollbar. */
+fltk3::Scrollbar::~Scrollbar() {
+  if (pushed_)
+    fltk3::remove_timeout(timeout_cb, this);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Scrollbar.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Shared_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Shared_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Shared_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,476 @@
+//
+// "$Id$"
+//
+// Shared image code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+
+#include <fltk3/run.h>
+#include <fltk3/SharedImage.h>
+#include <fltk3/XBMImage.h>
+#include <fltk3/XPMImage.h>
+
+
+//
+// Global class vars...
+//
+
+fltk3::SharedImage **fltk3::SharedImage::images_ = 0;	// Shared images
+int	fltk3::SharedImage::num_images_ = 0;	// Number of shared images
+int	fltk3::SharedImage::alloc_images_ = 0;	// Allocated shared images
+
+fltk3::SharedHandler *fltk3::SharedImage::handlers_ = 0;// Additional format handlers
+int	fltk3::SharedImage::num_handlers_ = 0;	// Number of format handlers
+int	fltk3::SharedImage::alloc_handlers_ = 0;	// Allocated format handlers
+
+
+//
+// Typedef the C API sort function type the only way I know how...
+//
+
+extern "C" {
+  typedef int (*compare_func_t)(const void *, const void *);
+}
+
+
+/** Returns the fltk3::SharedImage* array */
+fltk3::SharedImage **fltk3::SharedImage::images() {
+  return images_;
+}
+/** Returns the total number of shared images in the array. */
+int fltk3::SharedImage::num_images() {
+  return num_images_;
+}
+
+
+//
+// 'fltk3::SharedImage::compare()' - Compare two shared images...
+//
+
+int
+fltk3::SharedImage::compare(fltk3::SharedImage **i0,		// I - First image
+                         fltk3::SharedImage **i1) {	// I - Second image
+  int i = strcmp((*i0)->name(), (*i1)->name());
+
+  if (i) return i;
+  else if (((*i0)->w() == 0 && (*i1)->original_) ||
+           ((*i1)->w() == 0 && (*i0)->original_)) return 0;
+  else if ((*i0)->w() != (*i1)->w()) return (*i0)->w() - (*i1)->w();
+  else return (*i0)->h() - (*i1)->h();
+}
+
+
+/** 
+  Creates an empty shared image.
+  The constructors create a new shared image record in the image cache.
+  
+  <P>The constructors are protected and cannot be used directly
+  from a program. Use the get() method instead.
+*/
+fltk3::SharedImage::SharedImage() : fltk3::Image(0,0,0) {
+  name_        = 0;
+  refcount_    = 1;
+  original_    = 0;
+  image_       = 0;
+  alloc_image_ = 0;
+}
+
+
+/** 
+  Creates a shared image from its filename and its corresponding fltk3::Image* img.
+  The constructors create a new shared image record in the image cache.
+  
+  <P>The constructors are protected and cannot be used directly
+  from a program. Use the get() method instead.
+*/
+fltk3::SharedImage::SharedImage(const char *n,		// I - Filename
+                                 fltk3::Image   *img)	// I - Image
+  : fltk3::Image(0,0,0) {
+  name_ = new char[strlen(n) + 1];
+  strcpy((char *)name_, n);
+
+  refcount_    = 1;
+  image_       = img;
+  alloc_image_ = !img;
+  original_    = 1;
+
+  if (!img) reload();
+  else update();
+}
+
+
+//
+// 'fltk3::SharedImage::add()' - Add a shared image to the array.
+//
+
+void
+fltk3::SharedImage::add() {
+  fltk3::SharedImage	**temp;		// New image pointer array...
+
+  if (num_images_ >= alloc_images_) {
+    // Allocate more memory...
+    temp = new fltk3::SharedImage *[alloc_images_ + 32];
+
+    if (alloc_images_) {
+      memcpy(temp, images_, alloc_images_ * sizeof(fltk3::SharedImage *));
+
+      delete[] images_;
+    }
+
+    images_       = temp;
+    alloc_images_ += 32;
+  }
+
+  images_[num_images_] = this;
+  num_images_ ++;
+
+  if (num_images_ > 1) {
+    qsort(images_, num_images_, sizeof(fltk3::SharedImage *),
+          (compare_func_t)compare);
+  }
+}
+
+
+//
+// 'fltk3::SharedImage::update()' - Update the dimensions of the shared images.
+//
+
+void
+fltk3::SharedImage::update() {
+  if (image_) {
+    w(image_->w());
+    h(image_->h());
+    d(image_->d());
+    data(image_->data(), image_->count());
+  }
+}
+
+/**
+  The destructor free all memory and server resources that are
+  used by the image. The destructor is protected and cannot be
+  used directly from a program. Use the fltk3::SharedImage::release() method
+  instead.
+*/
+fltk3::SharedImage::~SharedImage() {
+  if (name_) delete[] (char *)name_;
+  if (alloc_image_) delete image_;
+}
+
+
+//
+/** 
+  Releases and possibly destroys (if refcount <=0) a shared image. 
+  In the latter case, it will reorganize the shared image array so that no hole will occur.
+*/
+void fltk3::SharedImage::release() {
+  int	i;	// Looping var...
+
+  refcount_ --;
+  if (refcount_ > 0) return;
+
+  for (i = 0; i < num_images_; i ++)
+    if (images_[i] == this) {
+      num_images_ --;
+
+      if (i < num_images_) {
+        memmove(images_ + i, images_ + i + 1,
+               (num_images_ - i) * sizeof(fltk3::SharedImage *));
+      }
+
+      break;
+    }
+
+  delete this;
+
+  if (num_images_ == 0 && images_) {
+    delete[] images_;
+
+    images_       = 0;
+    alloc_images_ = 0;
+  }
+}
+
+
+//
+/** Reloads the shared image from disk */
+void fltk3::SharedImage::reload() {
+  // Load image from disk...
+  int		i;		// Looping var
+  FILE		*fp;		// File pointer
+  uchar		header[64];	// Buffer for auto-detecting files
+  fltk3::Image	*img;		// New image
+
+  if (!name_) return;
+
+  if ((fp = fltk3::fopen(name_, "rb")) != NULL) {
+    if (fread(header, 1, sizeof(header), fp)==0) { /* ignore */ }
+    fclose(fp);
+  } else {
+    return;
+  }
+
+  // Load the image as appropriate...
+  if (memcmp(header, "#define", 7) == 0) // XBM file
+    img = new fltk3::XBMImage(name_);
+  else if (memcmp(header, "/* XPM */", 9) == 0) // XPM file
+    img = new fltk3::XPMImage(name_);
+  else {
+    // Not a standard format; try an image handler...
+    for (i = 0, img = 0; i < num_handlers_; i ++) {
+      img = (handlers_[i])(name_, header, sizeof(header));
+
+      if (img) break;
+    }
+  }
+
+  if (img) {
+    if (alloc_image_) delete image_;
+
+    alloc_image_ = 1;
+
+    if ((img->w() != w() && w()) || (img->h() != h() && h())) {
+      // Make sure the reloaded image is the same size as the existing one.
+      fltk3::Image *temp = img->copy(w(), h());
+      delete img;
+      image_ = temp;
+    } else {
+      image_ = img;
+    }
+
+    update();
+  }
+}
+
+
+//
+// 'fltk3::SharedImage::copy()' - Copy and resize a shared image...
+//
+
+fltk3::Image *
+fltk3::SharedImage::copy(int W, int H) {
+  fltk3::Image		*temp_image;	// New image file
+  fltk3::SharedImage	*temp_shared;	// New shared image
+
+  // Make a copy of the image we're sharing...
+  if (!image_) temp_image = 0;
+  else temp_image = image_->copy(W, H);
+
+  // Then make a new shared image...
+  temp_shared = new fltk3::SharedImage();
+
+  temp_shared->name_ = new char[strlen(name_) + 1];
+  strcpy((char *)temp_shared->name_, name_);
+
+  temp_shared->refcount_    = 1;
+  temp_shared->image_       = temp_image;
+  temp_shared->alloc_image_ = 1;
+
+  temp_shared->update();
+
+  return temp_shared;
+}
+
+
+//
+// 'fltk3::SharedImage::color_average()' - Blend colors...
+//
+
+void
+fltk3::SharedImage::color_average(fltk3::Color c,	// I - Color to blend with
+                               float    i) {	// I - Blend fraction
+  if (!image_) return;
+
+  image_->color_average(c, i);
+  update();
+}
+
+
+//
+// 'fltk3::SharedImage::desaturate()' - Convert the image to grayscale...
+//
+
+void
+fltk3::SharedImage::desaturate() {
+  if (!image_) return;
+
+  image_->desaturate();
+  update();
+}
+
+
+//
+// 'fltk3::SharedImage::draw()' - Draw a shared image...
+//
+
+void
+fltk3::SharedImage::draw(int X, int Y, int W, int H, int cx, int cy) {
+  if (image_) image_->draw(X, Y, W, H, cx, cy);
+  else Image::draw(X, Y, W, H, cx, cy);
+}
+
+
+//
+// 'fltk3::SharedImage::uncache()' - Uncache the shared image...
+//
+
+void fltk3::SharedImage::uncache()
+{
+  if (image_) image_->uncache();
+}
+
+
+
+/** Finds a shared image from its named and size specifications */
+fltk3::SharedImage* fltk3::SharedImage::find(const char *n, int W, int H) {
+  fltk3::SharedImage	*key,		// Image key
+			**match;	// Matching image
+
+  if (num_images_) {
+    key = new fltk3::SharedImage();
+    key->name_ = new char[strlen(n) + 1];
+    strcpy((char *)key->name_, n);
+    key->w(W);
+    key->h(H);
+
+    match = (fltk3::SharedImage **)bsearch(&key, images_, num_images_,
+                                        sizeof(fltk3::SharedImage *),
+                                        (compare_func_t)compare);
+
+    delete key;
+
+    if (match) {
+      (*match)->refcount_ ++;
+      return *match;
+    }
+  }
+
+  return 0;
+}
+
+
+/** 
+ \brief Find or load an image that can be shared by multiple widgets.
+ 
+ Gets a shared image, if it exists already ; it will return it.
+ If it does not exist or if it exist but with other size, 
+ then the existing image is deleted and replaced
+ by a new image from the n filename of the proper dimension.
+ If n is not a valid image filename, then get() will return NULL.
+ 
+ Shared JPEG and PNG images can also be created from memory by using their 
+ named memory access constructor.
+ 
+ \param n name of the image
+ \param W, H desired size
+ 
+ \see fltk3::SharedImage::find(const char *n, int W, int H)
+ \see fltk3::SharedImage::release() 
+ \see fltk3::JPEGImage::JPEGImage(const char *name, const unsigned char *data)
+ \see fltk3::PNGImage::fltk3::PNGImage (const char *name_png, const unsigned char *buffer, int maxsize)
+*/
+fltk3::SharedImage* fltk3::SharedImage::get(const char *n, int W, int H) {
+  fltk3::SharedImage	*temp;		// Image
+
+  if ((temp = find(n, W, H)) != NULL) return temp;
+
+  if ((temp = find(n)) == NULL) {
+    temp = new fltk3::SharedImage(n);
+
+    if (!temp->image_) {
+      delete temp;
+      return NULL;
+    }
+
+    temp->add();
+  }
+
+  if ((temp->w() != W || temp->h() != H) && W && H) {
+    temp = (fltk3::SharedImage *)temp->copy(W, H);
+    temp->add();
+  }
+
+  return temp;
+}
+
+
+
+/** Adds a shared image handler, which is basically a test function for adding new formats */
+void fltk3::SharedImage::add_handler(fltk3::SharedHandler f) {
+  int			i;		// Looping var...
+  fltk3::SharedHandler	*temp;		// New image handler array...
+
+  // First see if we have already added the handler...
+  for (i = 0; i < num_handlers_; i ++) {
+    if (handlers_[i] == f) return;
+  }
+
+  if (num_handlers_ >= alloc_handlers_) {
+    // Allocate more memory...
+    temp = new fltk3::SharedHandler [alloc_handlers_ + 32];
+
+    if (alloc_handlers_) {
+      memcpy(temp, handlers_, alloc_handlers_ * sizeof(fltk3::SharedHandler));
+
+      delete[] handlers_;
+    }
+
+    handlers_       = temp;
+    alloc_handlers_ += 32;
+  }
+
+  handlers_[num_handlers_] = f;
+  num_handlers_ ++;
+}
+
+
+
+/** Removes a shared image handler */
+void fltk3::SharedImage::remove_handler(fltk3::SharedHandler f) {
+  int	i;				// Looping var...
+
+  // First see if the handler has been added...
+  for (i = 0; i < num_handlers_; i ++) {
+    if (handlers_[i] == f) break;
+  }
+
+  if (i >= num_handlers_) return;
+
+  // OK, remove the handler from the array...
+  num_handlers_ --;
+
+  if (i < num_handlers_) {
+    // Shift later handlers down 1...
+    memmove(handlers_ + i, handlers_ + i + 1,
+           (num_handlers_ - i) * sizeof(fltk3::SharedHandler ));
+  }
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Shared_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Single_Window.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Single_Window.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Single_Window.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,41 @@
+//
+// "$Id$"
+//
+// Single-buffered window for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//	A window with a single-buffered context
+//
+//	This is provided for systems where the base class is double
+//	buffered.  You can turn it off using this subclass in case
+//	your display looks better without it.
+
+#include <fltk3/SingleWindow.h>
+
+void fltk3::SingleWindow::show() {Window::show();}
+void fltk3::SingleWindow::flush() {Window::flush();}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Single_Window.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Slider.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Slider.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Slider.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,394 @@
+//
+// "$Id$"
+//
+// Slider widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Slider.h>
+#include <fltk3/draw.h>
+#include <math.h>
+#include "flstring.h"
+
+#if defined(FL_DLL)	// really needed for c'tors for MS VC++ only
+#include <fltk3/HorSlider.h>
+#endif
+
+void fltk3::Slider::_Slider() {
+  slider_size_ = 0;
+  slider_ = 0; // fltk3::UP_BOX;
+}
+
+/**
+  Creates a new fltk3::Slider widget using the given position,
+  size, and label string. The default boxtype is fltk3::DOWN_BOX.
+*/
+fltk3::Slider::Slider(int X, int Y, int W, int H, const char* L)
+: fltk3::Valuator(X, Y, W, H, L) {
+  box(fltk3::DOWN_BOX);
+  _Slider();
+}
+
+/**
+  Creates a new fltk3::Slider widget using the given box type, position,
+  size, and label string.
+*/
+fltk3::Slider::Slider(uchar t, int X, int Y, int W, int H, const char* L)
+  : fltk3::Valuator(X, Y, W, H, L) {
+  type(t);
+  box(t==fltk3::HOR_NICE_SLIDER || t==fltk3::VERT_NICE_SLIDER ?
+      fltk3::FLAT_BOX : fltk3::DOWN_BOX);
+  _Slider();
+}
+
+void fltk3::Slider::slider_size(double v) {
+  if (v <  0) v = 0;
+  if (v > 1) v = 1;
+  if (slider_size_ != float(v)) {
+    slider_size_ = float(v); 
+    damage(fltk3::DAMAGE_EXPOSE);
+  }
+}
+
+/** 
+  Sets the minimum (a) and maximum (b) values for the valuator widget. 
+  if at least one of the values is changed, a partial redraw is asked.
+*/
+void fltk3::Slider::bounds(double a, double b) {
+  if (minimum() != a || maximum() != b) {
+    Valuator::bounds(a, b); 
+    damage(fltk3::DAMAGE_EXPOSE);
+  }
+}
+
+/**
+  Sets the size and position of the sliding knob in the box.
+  \param[in] pos position of first line displayed
+  \param[in] size size of window in lines
+  \param[in] first number of first line
+  \param[in] total total number of lines
+  Returns fltk3::Valuator::value(p)
+ */
+int fltk3::Slider::scrollvalue(int pos, int size, int first, int total) {
+  step(1, 1);
+  if (pos+size > first+total) total = pos+size-first;
+  slider_size(size >= total ? 1.0 : double(size)/double(total));
+  bounds(first, total-size+first);
+  return value(pos);
+}
+
+// All slider interaction is done as though the slider ranges from
+// zero to one, and the left (bottom) edge of the slider is at the
+// given position.  Since when the slider is all the way to the
+// right (top) the left (bottom) edge is not all the way over, a
+// position on the widget itself covers a wider range than 0-1,
+// actually it ranges from 0 to 1/(1-size).
+
+void fltk3::Slider::draw_bg(int X, int Y, int W, int H) {
+  fltk3::push_clip(X, Y, W, H);
+  draw_box();
+  fltk3::pop_clip();
+
+  fltk3::Color black = active_r() ? fltk3::FOREGROUND_COLOR : fltk3::INACTIVE_COLOR;
+  if (type() == fltk3::VERT_NICE_SLIDER) {
+    draw_box(fltk3::THIN_DOWN_BOX, X+W/2-2, Y, 4, H, black);
+  } else if (type() == fltk3::HOR_NICE_SLIDER) {
+    draw_box(fltk3::THIN_DOWN_BOX, X, Y+H/2-2, W, 4, black);
+  }
+}
+
+void fltk3::Slider::draw(int X, int Y, int W, int H) {
+
+  double val;
+  if (minimum() == maximum())
+    val = 0.5;
+  else {
+    val = (value()-minimum())/(maximum()-minimum());
+    if (val > 1.0) val = 1.0;
+    else if (val < 0.0) val = 0.0;
+  }
+
+  int ww = (horizontal() ? W : H);
+  int xx, S;
+  if (type()==fltk3::HOR_FILL_SLIDER || type() == fltk3::VERT_FILL_SLIDER) {
+    S = int(val*ww+.5);
+    if (minimum()>maximum()) {S = ww-S; xx = ww-S;}
+    else xx = 0;
+  } else {
+    S = int(slider_size_*ww+.5);
+    int T = (horizontal() ? H : W)/2+1;
+    if (type()==fltk3::VERT_NICE_SLIDER || type()==fltk3::HOR_NICE_SLIDER) T += 4;
+    if (S < T) S = T;
+    xx = int(val*(ww-S)+.5);
+  }
+  int xsl, ysl, wsl, hsl;
+  if (horizontal()) {
+    xsl = X+xx;
+    wsl = S;
+    ysl = Y;
+    hsl = H;
+  } else {
+    ysl = Y+xx;
+    hsl = S;
+    xsl = X;
+    wsl = W;
+  }
+
+  draw_bg(X, Y, W, H);
+
+  fltk3::Boxtype box1 = slider();
+  if (!box1) {box1 = (fltk3::Boxtype)(box()&-2); if (!box1) box1 = fltk3::UP_BOX;}
+  if (type() == fltk3::VERT_NICE_SLIDER) {
+    draw_box(box1, xsl, ysl, wsl, hsl, fltk3::GRAY);
+    int d = (hsl-4)/2;
+    draw_box(fltk3::THIN_DOWN_BOX, xsl+2, ysl+d, wsl-4, hsl-2*d,selection_color());
+  } else if (type() == fltk3::HOR_NICE_SLIDER) {
+    draw_box(box1, xsl, ysl, wsl, hsl, fltk3::GRAY);
+    int d = (wsl-4)/2;
+    draw_box(fltk3::THIN_DOWN_BOX, xsl+d, ysl+2, wsl-2*d, hsl-4,selection_color());
+  } else {
+    if (wsl>0 && hsl>0) draw_box(box1, xsl, ysl, wsl, hsl, selection_color());
+
+    if (type()!=fltk3::HOR_FILL_SLIDER && type() != fltk3::VERT_FILL_SLIDER &&
+        fltk3::scheme_ && !strcmp(fltk3::scheme_, "gtk+")) {
+      if (W>H && wsl>(hsl+8)) {
+        // Draw horizontal grippers
+	int yy, hh;
+	hh = hsl-8;
+	xx = xsl+(wsl-hsl-4)/2;
+	yy = ysl+3;
+
+	fltk3::color(fltk3::darker(selection_color()));
+	fltk3::line(xx, yy+hh, xx+hh, yy);
+	fltk3::line(xx+6, yy+hh, xx+hh+6, yy);
+	fltk3::line(xx+12, yy+hh, xx+hh+12, yy);
+
+        xx++;
+	fltk3::color(fltk3::lighter(selection_color()));
+	fltk3::line(xx, yy+hh, xx+hh, yy);
+	fltk3::line(xx+6, yy+hh, xx+hh+6, yy);
+	fltk3::line(xx+12, yy+hh, xx+hh+12, yy);
+      } else if (H>W && hsl>(wsl+8)) {
+        // Draw vertical grippers
+	int yy;
+	xx = xsl+4;
+	ww = wsl-8;
+	yy = ysl+(hsl-wsl-4)/2;
+
+	fltk3::color(fltk3::darker(selection_color()));
+	fltk3::line(xx, yy+ww, xx+ww, yy);
+	fltk3::line(xx, yy+ww+6, xx+ww, yy+6);
+	fltk3::line(xx, yy+ww+12, xx+ww, yy+12);
+
+        yy++;
+	fltk3::color(fltk3::lighter(selection_color()));
+	fltk3::line(xx, yy+ww, xx+ww, yy);
+	fltk3::line(xx, yy+ww+6, xx+ww, yy+6);
+	fltk3::line(xx, yy+ww+12, xx+ww, yy+12);
+      }
+    }
+  }
+
+  draw_label(xsl, ysl, wsl, hsl);
+  if (fltk3::focus() == this) {
+    if (type() == fltk3::HOR_FILL_SLIDER || type() == fltk3::VERT_FILL_SLIDER) draw_focus();
+    else draw_focus(box1, xsl, ysl, wsl, hsl);
+  }
+}
+
+void fltk3::Slider::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (damage()&fltk3::DAMAGE_ALL) draw_box();
+  draw(x()+fltk3::box_dx(box()),
+       y()+fltk3::box_dy(box()),
+       w()-fltk3::box_dw(box()),
+       h()-fltk3::box_dh(box()));
+}
+
+int fltk3::Slider::handle(int event, int X, int Y, int W, int H) {
+  // fltk3::WidgetTracker wp(this);
+  switch (event) {
+  case fltk3::PUSH: {
+    fltk3::WidgetTracker wp(this);
+    if (!fltk3::event_inside(X, Y, W, H)) return 0;
+    handle_push();
+    if (wp.deleted()) return 1; }
+    // fall through ...
+  case fltk3::DRAG: {
+
+    double val;
+    if (minimum() == maximum())
+      val = 0.5;
+    else {
+      val = (value()-minimum())/(maximum()-minimum());
+      if (val > 1.0) val = 1.0;
+      else if (val < 0.0) val = 0.0;
+    }
+
+    int ww = (horizontal() ? W : H);
+    int mx = (horizontal() ? fltk3::event_x()-X : fltk3::event_y()-Y);
+    int S;
+    static int offcenter;
+
+    if (type() == fltk3::HOR_FILL_SLIDER || type() == fltk3::VERT_FILL_SLIDER) {
+
+      S = 0;
+      if (event == fltk3::PUSH) {
+	int xx = int(val*ww+.5);
+	offcenter = mx-xx;
+	if (offcenter < -10 || offcenter > 10) offcenter = 0;
+	else return 1;
+      }
+
+    } else {
+
+      S = int(slider_size_*ww+.5); if (S >= ww) return 0;
+      int T = (horizontal() ? H : W)/2+1;
+      if (type()==fltk3::VERT_NICE_SLIDER || type()==fltk3::HOR_NICE_SLIDER) T += 4;
+      if (S < T) S = T;
+      if (event == fltk3::PUSH) {
+	int xx = int(val*(ww-S)+.5);
+	offcenter = mx-xx;
+	if (offcenter < 0) offcenter = 0;
+	else if (offcenter > S) offcenter = S;
+	else return 1;
+      }
+    }
+
+    int xx = mx-offcenter;
+    double v;
+    char tryAgain = 1;
+    while (tryAgain)
+    {
+      tryAgain = 0;
+      if (xx < 0) {
+        xx = 0;
+        offcenter = mx; if (offcenter < 0) offcenter = 0;
+      } else if (xx > (ww-S)) {
+        xx = ww-S;
+        offcenter = mx-xx; if (offcenter > S) offcenter = S;
+      }
+      v = round(xx*(maximum()-minimum())/(ww-S) + minimum());
+      // make sure a click outside the sliderbar moves it:
+      if (event == fltk3::PUSH && v == value()) {
+        offcenter = S/2;
+        event = fltk3::DRAG;
+        tryAgain = 1;
+      }
+    }
+    handle_drag(clamp(v));
+    } return 1;
+  case fltk3::RELEASE:
+    handle_release();
+    return 1;
+  case fltk3::KEYBOARD:
+    { fltk3::WidgetTracker wp(this);
+      switch (fltk3::event_key()) {
+	case fltk3::UpKey:
+	  if (horizontal()) return 0;
+	  handle_push();
+	  if (wp.deleted()) return 1;
+	  handle_drag(clamp(increment(value(),-1)));
+	  if (wp.deleted()) return 1;
+	  handle_release();
+	  return 1;
+	case fltk3::DownKey:
+	  if (horizontal()) return 0;
+	  handle_push();
+	  if (wp.deleted()) return 1;
+	  handle_drag(clamp(increment(value(),1)));
+	  if (wp.deleted()) return 1;
+	  handle_release();
+	  return 1;
+	case fltk3::LeftKey:
+	  if (!horizontal()) return 0;
+	  handle_push();
+	  if (wp.deleted()) return 1;
+	  handle_drag(clamp(increment(value(),-1)));
+	  if (wp.deleted()) return 1;
+	  handle_release();
+	  return 1;
+	case fltk3::RightKey:
+	  if (!horizontal()) return 0;
+	  handle_push();
+	  if (wp.deleted()) return 1;
+	  handle_drag(clamp(increment(value(),1)));
+	  if (wp.deleted()) return 1;
+	  handle_release();
+	  return 1;
+	default:
+	  return 0;
+      }
+    }
+    // break not required because of switch...
+  case fltk3::FOCUS :
+  case fltk3::UNFOCUS :
+    if (fltk3::visible_focus()) {
+      redraw();
+      return 1;
+    } else return 0;
+  case fltk3::ENTER :
+  case fltk3::LEAVE :
+    return 1;
+  default:
+    return 0;
+  }
+}
+
+int fltk3::Slider::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (event == fltk3::PUSH && fltk3::visible_focus()) {
+    fltk3::focus(this);
+    redraw();
+  }
+
+  return handle(event,
+		x()+fltk3::box_dx(box()),
+		y()+fltk3::box_dy(box()),
+		w()-fltk3::box_dw(box()),
+		h()-fltk3::box_dh(box()));
+}
+
+/*
+ The following constructor must not be in the header file if we
+ build a shared object (DLL). Instead it is defined here to force
+ the constructor (and default destructor as well) to be defined
+ in the DLL and exported (STR #2632).
+ 
+ Note: if you the ctor here, do the same changes in the specific
+ header file as well.  This redundant definition was chosen to enable
+ inline constructors in the header files (for static linking) as well
+ as the one here for dynamic linking (Windows DLL).
+ */
+
+#if defined(FL_DLL)
+
+fltk3::HorSlider::HorSlider(int X,int Y,int W,int H,const char *l)
+: fltk3::Slider(X,Y,W,H,l) {type(fltk3::HOR_SLIDER);}
+
+#endif // FL_DLL
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Slider.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Sys_Menu_Bar.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Sys_Menu_Bar.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Sys_Menu_Bar.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,288 @@
+//
+// "$Id$"
+//
+// MacOS system menu bar widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+ * This code is a quick hack! It was written as a proof of concept.
+ * It has been tested on the "menubar" sample program and provides
+ * basic functionality. 
+ * 
+ * To use the System Menu Bar, simply replace the main fltk3::MenuBar
+ * in an application with fltk3::SysMenuBar.
+ *
+ * FLTK features not supported by the Mac System menu
+ *
+ * - no invisible menu items
+ * - no symbolic labels
+ * - embossed labels will be underlined instead
+ * - no font sizes
+ * - Shortcut Characters should be English alphanumeric only, no modifiers yet
+ * - no disable main menus
+ * - changes to menubar in run-time don't update! 
+ *     (disable, etc. - toggle and radio button do!)
+ *
+ * No care was taken to clean up the menu bar after destruction!
+ * ::menu(bar) should only be called once!
+ * Many other calls of the parent class don't work.
+ * Changing the menu items has no effect on the menu bar.
+ * Starting with OS X 10.5, FLTK applications must be created as
+ * a bundle for the System Menu Bar (and maybe other features) to work!
+ */
+
+#if defined(__APPLE__) || defined(FLTK3_DOXYGEN)
+
+#include <fltk3/x.h>
+#include <fltk3/run.h>
+#include <fltk3/SysMenuBar.h>
+
+#include "flstring.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <stdarg.h>
+
+#define MenuHandle void *
+
+typedef const fltk3::MenuItem *pFl_Menu_Item;
+ 
+
+/*
+ * Set a shortcut for an Apple menu item using the FLTK shortcut descriptor.
+ */
+static void setMenuShortcut( MenuHandle mh, int miCnt, const fltk3::MenuItem *m )
+{
+  if ( !m->shortcut_ ) 
+    return;
+  if ( m->flags & fltk3::SUBMENU )
+    return;
+  if ( m->flags & fltk3::SUBMENU_POINTER )
+    return;
+  char key = m->shortcut_ & 0xff;
+  if ( !isalnum( key ) )
+    return;
+  
+  void *menuItem = fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::itemAtIndex, mh, miCnt);
+  fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setKeyEquivalent, menuItem, m->shortcut_ & 0xff );
+  fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setKeyEquivalentModifierMask, menuItem, m->shortcut_ );
+}
+
+
+/*
+ * Set the Toggle and Radio flag based on FLTK flags
+ */
+static void setMenuFlags( MenuHandle mh, int miCnt, const fltk3::MenuItem *m )
+{
+  if ( m->flags & fltk3::MENU_TOGGLE )
+  {
+	void *menuItem = fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::itemAtIndex, mh, miCnt);
+	fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setState, menuItem, m->flags & fltk3::MENU_VALUE );
+  }
+  else if ( m->flags & fltk3::MENU_RADIO ) {
+    void *menuItem = fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::itemAtIndex, mh, miCnt);
+    fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setState, menuItem, m->flags & fltk3::MENU_VALUE );
+  }
+}
+
+
+/*
+ * create a sub menu for a specific menu handle
+ */
+static void createSubMenu( void * mh, pFl_Menu_Item &mm )
+{
+  void *submenu;
+  int miCnt, flags;
+  
+  void *menuItem;
+  submenu = fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::initWithTitle, mm->text);
+  int cnt;
+  fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::numberOfItems, mh, &cnt);
+  cnt--;
+  menuItem = fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::itemAtIndex, mh, cnt);
+  fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setSubmenu, menuItem, submenu);
+  if ( mm->flags & fltk3::MENU_INACTIVE ) {
+    fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setEnabled, menuItem, 0);
+  }
+  mm++;
+  
+  while ( mm->text )
+  {
+    int flRank = mm - fltk3::sys_menu_bar->fltk3::Menu_::menu();
+    fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::addNewItem, submenu, flRank, &miCnt);
+    setMenuFlags( submenu, miCnt, mm );
+    setMenuShortcut( submenu, miCnt, mm );
+    if ( mm->flags & fltk3::MENU_INACTIVE ) {
+      void *item = fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::itemAtIndex, submenu, miCnt);
+      fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setEnabled, item, 0);
+    }
+    flags = mm->flags;
+    if ( mm->flags & fltk3::SUBMENU )
+    {
+      createSubMenu( submenu, mm );
+    }
+    else if ( mm->flags & fltk3::SUBMENU_POINTER )
+    {
+      const fltk3::MenuItem *smm = (fltk3::MenuItem*)mm->user_data_;
+      createSubMenu( submenu, smm );
+    }
+    if ( flags & fltk3::MENU_DIVIDER ) {
+      fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::addSeparatorItem, submenu);
+      }
+    mm++;
+  }
+}
+ 
+
+/*
+ * convert a complete fltk3::MenuItem array into a series of menus in the top menu bar
+ * ALL PREVIOUS SYSTEM MENUS, EXCEPT APPLICATION MENU, ARE REPLACED BY THE NEW DATA
+ */
+static void convertToMenuBar(const fltk3::MenuItem *mm)
+{
+  int count;//first, delete all existing system menus
+  fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::numberOfItems, fl_system_menu, &count);
+  for(int i = count - 1; i > 0; i--) {
+	  fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::removeItem, fl_system_menu, i);
+  }
+  //now convert FLTK stuff into MacOS menus
+  for (;;)
+  {
+    if ( !mm || !mm->text )
+      break;
+    char visible = mm->visible() ? 1 : 0;
+    int flRank = mm - fltk3::sys_menu_bar->fltk3::Menu_::menu();
+    fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::addNewItem, fl_system_menu, flRank, NULL);
+		
+    if ( mm->flags & fltk3::SUBMENU )
+      createSubMenu( fl_system_menu, mm );
+    else if ( mm->flags & fltk3::SUBMENU_POINTER ) {
+      const fltk3::MenuItem *smm = (fltk3::MenuItem*)mm->user_data_;
+      createSubMenu( fl_system_menu, smm );
+    }
+    if ( visible ) {
+      //      InsertMenu( mh, 0 );
+    }
+    mm++;
+  }
+}
+
+
+/**
+ * @brief create a system menu bar using the given list of menu structs
+ *
+ * \author Matthias Melcher
+ *
+ * @param m list of fltk3::MenuItem
+ */
+void fltk3::SysMenuBar::menu(const fltk3::MenuItem *m) 
+{
+  fl_open_display();
+  fltk3::MenuBar::menu( m );
+  convertToMenuBar(m);
+}
+
+
+/**
+ * @brief add to the system menu bar a new menu item
+ *
+ * add to the system menu bar a new menu item, with a title string, shortcut int,
+ * callback, argument to the callback, and flags.
+ *
+ * @see fltk3::Menu_::add(const char* label, int shortcut, fltk3::Callback *cb, void *user_data, int flags) 
+ */
+int fltk3::SysMenuBar::add(const char* label, unsigned int shortcut, fltk3::Callback *cb, void *user_data, int flags)
+{
+  fl_open_display();
+  int rank = fltk3::Menu_::add(label, shortcut, cb, user_data, flags);
+  convertToMenuBar(fltk3::Menu_::menu());
+  return rank;
+}
+
+/**
+ * @brief insert in the system menu bar a new menu item
+ *
+ * insert in the system menu bar a new menu item, with a title string, shortcut int,
+ * callback, argument to the callback, and flags.
+ *
+ * @see fltk3::Menu_::insert(int index, const char* label, int shortcut, fltk3::Callback *cb, void *user_data, int flags) 
+ */
+int fltk3::SysMenuBar::insert(int index, const char* label, unsigned int shortcut, fltk3::Callback *cb, void *user_data, int flags)
+{
+  fl_open_display();
+  int rank = fltk3::Menu_::insert(index, label, shortcut, cb, user_data, flags);
+  convertToMenuBar(fltk3::Menu_::menu());
+  return rank;
+}
+
+void fltk3::SysMenuBar::clear()
+{
+  fltk3::Menu_::clear();
+  convertToMenuBar(NULL);
+}
+
+int fltk3::SysMenuBar::clear_submenu(int index)
+{
+  int retval = fltk3::Menu_::clear_submenu(index);
+  if (retval != -1) convertToMenuBar(fltk3::Menu_::menu());
+  return retval;
+}
+
+/**
+ * @brief remove an item from the system menu bar
+ *
+ * @param rank		the rank of the item to remove
+ */
+void fltk3::SysMenuBar::remove(int rank)
+{
+  fltk3::Menu_::remove(rank);
+  convertToMenuBar(fltk3::Menu_::menu());
+}
+
+
+/**
+ * @brief rename an item from the system menu bar
+ *
+ * @param rank		the rank of the item to rename
+ * @param name		the new item name as a UTF8 string
+ */
+void fltk3::SysMenuBar::replace(int rank, const char *name)
+{
+  doMenuOrItemOperation(renameItem, rank, name);
+  fltk3::sys_menu_bar->fltk3::Menu_::replace(rank, name);
+}
+
+
+/*
+ * Draw the menu bar. 
+ * Nothing here because the OS does this for us.
+ */
+void fltk3::SysMenuBar::draw() {
+}
+
+
+#endif /* __APPLE__ */
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Sys_Menu_Bar.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Table.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Table.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Table.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1262 @@
+//
+// "$Id$"
+//
+// fltk3::Table -- A table widget
+//
+// Copyright 2002 by Greg Ercolano.
+// Copyright (c) 2004 O'ksi'D
+//
+// 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.
+//
+
+#include <stdio.h>		// fprintf
+#include <fltk3/draw.h>
+#include <fltk3/Table.h>
+
+#if defined(USE_UTF8) && ( defined(MICROSOFT) || defined(LINUX) )
+#include <fltk3/fl_utf8.h>	// currently only Windows and Linux
+#endif
+
+#define SCROLLBAR_SIZE	(fltk3::scrollbar_size())
+
+// Scroll display so 'row' is at top
+void fltk3::Table::row_position(int row) {
+  if ( _row_position == row ) return;		// OPTIMIZATION: no change? avoid redraw
+  if ( row < 0 ) row = 0;
+  else if ( row >= rows() ) row = rows() - 1;
+  if ( table_h <= tih ) return;			// don't scroll if table smaller than window
+  double newtop = row_scroll_position(row);
+  if ( newtop > vscrollbar->maximum() ) {
+    newtop = vscrollbar->maximum();
+  }
+  vscrollbar->Slider::value(newtop);
+  table_scrolled();
+  redraw();
+  _row_position = row;	// HACK: override what table_scrolled() came up with
+}
+
+// Scroll display so 'col' is at left
+void fltk3::Table::col_position(int col) {
+  if ( _col_position == col ) return;	// OPTIMIZATION: no change? avoid redraw
+  if ( col < 0 ) col = 0;
+  else if ( col >= cols() ) col = cols() - 1;
+  if ( table_w <= tiw ) return;		// don't scroll if table smaller than window
+  double newleft = col_scroll_position(col);
+  if ( newleft > hscrollbar->maximum() ) {
+    newleft = hscrollbar->maximum();
+  }
+  hscrollbar->Slider::value(newleft);
+  table_scrolled();
+  redraw();
+  _col_position = col;	// HACK: override what table_scrolled() came up with
+}
+
+// Find scroll position of a row (in pixels)
+long fltk3::Table::row_scroll_position(int row) {
+  int startrow = 0;
+  long scroll = 0; 
+  // OPTIMIZATION: 
+  //     Attempt to use precomputed row scroll position
+  //
+  if ( toprow_scrollpos != -1 && row >= toprow ) {
+    scroll = toprow_scrollpos;
+    startrow = toprow;
+  }
+  for ( int t=startrow; t<row; t++ ) {
+    scroll += row_height(t);
+  }
+  return(scroll);
+}
+
+// Find scroll position of a column (in pixels)
+long fltk3::Table::col_scroll_position(int col) {
+  int startcol = 0;
+  long scroll = 0;
+  // OPTIMIZATION: 
+  //     Attempt to use precomputed row scroll position
+  //
+  if ( leftcol_scrollpos != -1 && col >= leftcol ) {
+    scroll = leftcol_scrollpos;
+    startcol = leftcol;
+  }
+  for ( int t=startcol; t<col; t++ ) {
+    scroll += col_width(t);
+  }
+  return(scroll);
+}
+
+// Ctor
+fltk3::Table::Table(int X, int Y, int W, int H, const char *l) : fltk3::Group(X,Y,W,H,l) {
+  _rows             = 0;
+  _cols             = 0;
+  _row_header_w     = 40;
+  _col_header_h     = 18;
+  _row_header       = 0;
+  _col_header       = 0;
+  _row_header_color = color();
+  _col_header_color = color();
+  _row_resize       = 0;
+  _col_resize       = 0;
+  _row_resize_min   = 1;
+  _col_resize_min   = 1;
+  _redraw_toprow    = -1;
+  _redraw_botrow    = -1;
+  _redraw_leftcol   = -1;
+  _redraw_rightcol  = -1;
+  table_w           = 0;
+  table_h           = 0;
+  toprow            = 0;
+  botrow            = 0;
+  leftcol           = 0;
+  rightcol          = 0;
+  toprow_scrollpos  = -1;
+  leftcol_scrollpos = -1;
+  _last_cursor      = fltk3::CURSOR_DEFAULT;
+  _resizing_col     = -1;
+  _resizing_row     = -1;
+  _dragging_x       = -1;
+  _dragging_y       = -1;
+  _last_row         = -1;
+  _auto_drag        = 0;
+  current_col	      = -1;
+  current_row       = -1;
+  select_row        = -1;
+  select_col        = -1;
+  
+  box(fltk3::THIN_DOWN_FRAME);
+  
+  vscrollbar = new fltk3::Scrollbar(x()+w()-SCROLLBAR_SIZE, y(),
+                                SCROLLBAR_SIZE, h()-SCROLLBAR_SIZE);
+  vscrollbar->type(fltk3::VERTICAL);
+  vscrollbar->callback(scroll_cb, (void*)this);
+  
+  hscrollbar = new fltk3::Scrollbar(x(), y()+h()-SCROLLBAR_SIZE,
+                                w(), SCROLLBAR_SIZE);
+  hscrollbar->type(fltk3::HORIZONTAL);
+  hscrollbar->callback(scroll_cb, (void*)this);
+  
+  table = new fltk3::ScrollGroup(x(), y(), w(), h());
+  table->box(fltk3::NO_BOX);
+  table->type(0);		// don't show fltk3::ScrollGroup's scrollbars -- use our own
+  table->hide();		// hide unless children are present
+  table->end();
+  
+  table_resized();
+  redraw();
+  
+  Group::end();		// end the group's begin()
+  
+  table->begin();		// leave with fltk children getting added to the scroll
+}
+
+// Dtor
+fltk3::Table::~Table() {
+  // The parent fltk3::Group takes care of destroying scrollbars
+}
+
+// Set height of a row
+void fltk3::Table::row_height(int row, int height) {
+  if ( row < 0 ) return;
+  if ( row < (int)_rowheights.size() && _rowheights[row] == height ) {
+    return;		// OPTIMIZATION: no change? avoid redraw
+  }
+  // Add row heights, even if none yet
+  int now_size = (int)_rowheights.size();
+  if ( row >= now_size ) {
+    _rowheights.size(row);
+    while (now_size < row)
+      _rowheights[now_size++] = height;
+  }
+  _rowheights[row] = height;
+  table_resized();
+  if ( row <= botrow ) {	// OPTIMIZATION: only redraw if onscreen or above screen
+    redraw();
+  }
+  // ROW RESIZE CALLBACK
+  if ( Widget::callback() && when() & fltk3::WHEN_CHANGED ) {
+    do_callback(CONTEXT_RC_RESIZE, row, 0);
+  }
+}
+
+// Set width of a column
+void fltk3::Table::col_width(int col, int width)
+{
+  if ( col < 0 ) return;
+  if ( col < (int)_colwidths.size() && _colwidths[col] == width ) {
+    return;			// OPTIMIZATION: no change? avoid redraw
+  }
+  // Add column widths, even if none yet
+  int now_size = (int)_colwidths.size();
+  if ( col >= now_size ) {
+    _colwidths.size(col);
+    while (now_size < col) {
+      _colwidths[now_size++] = width;
+    }
+  }
+  _colwidths[col] = width;
+  table_resized();
+  if ( col <= rightcol ) {	// OPTIMIZATION: only redraw if onscreen or to the left
+    redraw();
+  }
+  // COLUMN RESIZE CALLBACK
+  if ( Widget::callback() && when() & fltk3::WHEN_CHANGED ) {
+    do_callback(CONTEXT_RC_RESIZE, 0, col);
+  }
+}
+
+// Return row/col clamped to reality
+int fltk3::Table::row_col_clamp(TableContext context, int &R, int &C) {
+  int clamped = 0;
+  if ( R < 0 ) { R = 0; clamped = 1; }
+  if ( C < 0 ) { C = 0; clamped = 1; }
+  switch ( context ) {
+    case CONTEXT_COL_HEADER:
+      // Allow col headers to draw even if no rows
+      if ( R >= _rows && R != 0 ) { R = _rows - 1; clamped = 1; }
+      break;
+      
+    case CONTEXT_ROW_HEADER:
+      // Allow row headers to draw even if no columns
+      if ( C >= _cols && C != 0 ) { C = _cols - 1; clamped = 1; }
+      break;
+      
+    case CONTEXT_CELL:
+    default:
+      // CLAMP R/C TO _rows/_cols
+      if ( R >= _rows ) { R = _rows - 1; clamped = 1; }
+      if ( C >= _cols ) { C = _cols - 1; clamped = 1; }
+      break;
+  }
+  return(clamped);
+}
+
+// Return bounding region for given context
+void fltk3::Table::get_bounds(TableContext context, int &X, int &Y, int &W, int &H) {
+  switch ( context ) {
+    case CONTEXT_COL_HEADER:
+      // Column header clipping.
+      X = tox;
+      Y = wiy;
+      W = tow;
+      H = col_header_height();
+      return;
+      
+    case CONTEXT_ROW_HEADER:
+      // Row header clipping.
+      X = wix;
+      Y = toy;
+      W = row_header_width();
+      H = toh;
+      return;
+      
+    case CONTEXT_TABLE:
+      // Table inner dimensions
+      X = tix; Y = tiy; W = tiw; H = tih;
+      return;
+      
+      // TODO: Add other contexts..
+    default:
+      fprintf(stderr, "fltk3::Table::get_bounds(): context %d unimplemented\n", (int)context);
+      return;
+  }
+  //NOTREACHED
+}
+
+// Find row/col beneath cursor
+//
+//    Returns R/C and context.
+//    Also returns resizeflag, if mouse is hovered over a resize boundary.
+//
+fltk3::Table::TableContext fltk3::Table::cursor2rowcol(int &R, int &C, ResizeFlag &resizeflag) {
+  // return values
+  R = C = 0;
+  resizeflag = RESIZE_NONE;
+  // Row header?
+  int X, Y, W, H;
+  if ( row_header() ) {
+    // Inside a row heading?
+    get_bounds(CONTEXT_ROW_HEADER, X, Y, W, H);
+    if ( fltk3::event_inside(X, Y, W, H) ) {
+      // Scan visible rows until found
+      for ( R = toprow; R <= botrow; R++ ) {
+        find_cell(CONTEXT_ROW_HEADER, R, 0, X, Y, W, H);
+        if ( fltk3::event_y() >= Y && fltk3::event_y() < (Y+H) ) {
+          // Found row?
+          //     If cursor over resize boundary, and resize enabled,
+          //     enable the appropriate resize flag.
+          //
+          if ( row_resize() ) {
+            if ( fltk3::event_y() <= (Y+3-0) ) { resizeflag = RESIZE_ROW_ABOVE; }
+            if ( fltk3::event_y() >= (Y+H-3) ) { resizeflag = RESIZE_ROW_BELOW; }
+          }
+          return(CONTEXT_ROW_HEADER);
+        }
+      }
+      // Must be in row header dead zone
+      return(CONTEXT_NONE);
+    }
+  }
+  // Column header?
+  if ( col_header() ) {
+    // Inside a column heading?
+    get_bounds(CONTEXT_COL_HEADER, X, Y, W, H);
+    if ( fltk3::event_inside(X, Y, W, H) ) {
+      // Scan visible columns until found
+      for ( C = leftcol; C <= rightcol; C++ ) {
+        find_cell(CONTEXT_COL_HEADER, 0, C, X, Y, W, H);
+        if ( fltk3::event_x() >= X && fltk3::event_x() < (X+W) ) {
+          // Found column?
+          //     If cursor over resize boundary, and resize enabled,
+          //     enable the appropriate resize flag.
+          //
+          if ( col_resize() ) {
+            if ( fltk3::event_x() <= (X+3-0) ) { resizeflag = RESIZE_COL_LEFT; }
+            if ( fltk3::event_x() >= (X+W-3) ) { resizeflag = RESIZE_COL_RIGHT; }
+          }
+          return(CONTEXT_COL_HEADER);
+        }
+      }
+      // Must be in column header dead zone
+      return(CONTEXT_NONE);
+    }
+  }
+  // Mouse somewhere in table?
+  //     Scan visible r/c's until we find it.
+  //
+  if ( fltk3::event_inside(tox, toy, tow, toh) ) {
+    for ( R = toprow; R <= botrow; R++ ) {
+      find_cell(CONTEXT_CELL, R, C, X, Y, W, H);
+      if ( fltk3::event_y() < Y ) break;		// OPT: thanks lars
+      if ( fltk3::event_y() >= (Y+H) ) continue;	// OPT: " "
+      for ( C = leftcol; C <= rightcol; C++ ) {
+        find_cell(CONTEXT_CELL, R, C, X, Y, W, H);
+        if ( fltk3::event_inside(X, Y, W, H) ) {
+          return(CONTEXT_CELL);			// found it
+        }
+      }
+    }
+    // Must be in a dead zone of the table
+    R = C = 0;
+    return(CONTEXT_TABLE);
+  }
+  // Somewhere else
+  return(CONTEXT_NONE);
+}
+
+// Find X/Y/W/H for cell at R/C
+//     If R or C are out of range, returns -1 
+//     with X/Y/W/H set to zero.
+//
+int fltk3::Table::find_cell(TableContext context, int R, int C, int &X, int &Y, int &W, int &H) {
+  if ( row_col_clamp(context, R, C) ) {		// row or col out of range? error
+    X=Y=W=H=0;
+    return(-1);
+  }
+  X = col_scroll_position(C) - hscrollbar->value() + tix;
+  Y = row_scroll_position(R) - vscrollbar->value() + tiy;
+  W = col_width(C);
+  H = row_height(R);
+  
+  switch ( context ) {
+    case CONTEXT_COL_HEADER:
+      Y = wiy;
+      H = col_header_height();
+      return(0);
+      
+    case CONTEXT_ROW_HEADER:
+      X = wix;
+      W = row_header_width();
+      return(0);
+      
+    case CONTEXT_CELL:
+      return(0);
+      
+    case CONTEXT_TABLE:
+      return(0);
+      
+      // TODO -- HANDLE OTHER CONTEXTS
+    default:
+      fprintf(stderr, "fltk3::Table::find_cell: unknown context %d\n", (int)context);
+      return(-1);
+  }
+  //NOTREACHED
+}
+
+// Enable automatic scroll-selection
+void fltk3::Table::_start_auto_drag() {
+  if (_auto_drag) return;
+  _auto_drag = 1;
+  fltk3::add_timeout(0.3, _auto_drag_cb2, this);
+}
+
+// Disable automatic scroll-selection
+void fltk3::Table::_stop_auto_drag() {
+  if (!_auto_drag) return;
+  fltk3::remove_timeout(_auto_drag_cb2, this);
+  _auto_drag = 0;
+}
+
+void fltk3::Table::_auto_drag_cb2(void *d) {
+  ((fltk3::Table*)d)->_auto_drag_cb();
+}
+
+// Handle automatic scroll-selection if mouse selection dragged off table edge
+void fltk3::Table::_auto_drag_cb() {
+  int lx = fltk3::e_x;
+  int ly = fltk3::e_y;
+  if (_selecting == CONTEXT_COL_HEADER)
+  { ly = y() + col_header_height(); }
+  else if (_selecting == CONTEXT_ROW_HEADER)
+  { lx = x() + row_header_width(); }
+  if (lx > x() + w() - 20) {
+    fltk3::e_x = x() + w() - 20;
+    if (hscrollbar->visible())
+      ((fltk3::Slider*)hscrollbar)->value(hscrollbar->clamp(hscrollbar->value() + 30));
+    hscrollbar->do_callback();
+    _dragging_x = fltk3::e_x - 30;
+  }
+  else if (lx < (x() + row_header_width())) {
+    fltk3::e_x = x() + row_header_width() + 1;
+    if (hscrollbar->visible()) {
+      ((fltk3::Slider*)hscrollbar)->value(hscrollbar->clamp(hscrollbar->value() - 30));
+    }
+    hscrollbar->do_callback();
+    _dragging_x = fltk3::e_x + 30;
+  }
+  if (ly > y() + h() - 20) {
+    fltk3::e_y = y() + h() - 20;
+    if (vscrollbar->visible()) {
+      ((fltk3::Slider*)vscrollbar)->value(vscrollbar->clamp(vscrollbar->value() + 30));
+    }
+    vscrollbar->do_callback();
+    _dragging_y = fltk3::e_y - 30;
+  }
+  else if (ly < (y() + col_header_height())) {
+    fltk3::e_y = y() + col_header_height() + 1;
+    if (vscrollbar->visible()) {
+      ((fltk3::Slider*)vscrollbar)->value(vscrollbar->clamp(vscrollbar->value() - 30));
+    }
+    vscrollbar->do_callback();
+    _dragging_y = fltk3::e_y + 30;
+  }
+  _auto_drag = 2;
+  handle(fltk3::DRAG);
+  _auto_drag = 1;
+  fltk3::e_x = lx;
+  fltk3::e_y = ly;
+  fltk3::check();
+  fltk3::flush();
+  if (fltk3::event_buttons() && _auto_drag) {
+    fltk3::add_timeout(0.05, _auto_drag_cb2, this);
+  }
+}
+
+// Recalculate the window dimensions
+void fltk3::Table::recalc_dimensions() {
+  // Recalc to* (Table Outer), ti* (Table Inner), wi* ( Widget Inner)
+  wix = ( x() + fltk3::box_dx(box())); tox = wix; tix = tox + fltk3::box_dx(table->box());
+  wiy = ( y() + fltk3::box_dy(box())); toy = wiy; tiy = toy + fltk3::box_dy(table->box());
+  wiw = ( w() - fltk3::box_dw(box())); tow = wiw; tiw = tow - fltk3::box_dw(table->box());
+  wih = ( h() - fltk3::box_dh(box())); toh = wih; tih = toh - fltk3::box_dh(table->box());
+  // Trim window if headers enabled
+  if ( col_header() ) {
+    tiy += col_header_height(); toy += col_header_height();
+    tih -= col_header_height(); toh -= col_header_height();
+  }
+  if ( row_header() ) {
+    tix += row_header_width(); tox += row_header_width();
+    tiw -= row_header_width(); tow -= row_header_width();
+  } 
+  // Make scroll bars disappear if window large enough
+  {
+    // First pass: can hide via window size?
+    int hidev = (table_h <= tih);
+    int hideh = (table_w <= tiw); 
+    // Second pass: Check for interference
+    if ( !hideh & hidev ) { hidev = (( table_h - tih + SCROLLBAR_SIZE ) <= 0 ); } 
+    if ( !hidev & hideh ) { hideh = (( table_w - tiw + SCROLLBAR_SIZE ) <= 0 ); } 
+    // Determine scrollbar visibility, trim ti[xywh]/to[xywh]
+    if ( hidev ) { vscrollbar->hide(); } 
+    else { vscrollbar->show(); tiw -= SCROLLBAR_SIZE; tow -= SCROLLBAR_SIZE; }
+    if ( hideh ) { hscrollbar->hide(); } 
+    else { hscrollbar->show(); tih -= SCROLLBAR_SIZE; toh -= SCROLLBAR_SIZE; }
+  } 
+  // Resize the child table
+  table->resize(tox, toy, tow, toh);
+  table->init_sizes();
+}
+
+// Recalculate internals after a scroll.
+//
+//    Call this if table has been scrolled or resized.
+//    Does not handle redraw().
+//    TODO: Assumes ti[xywh] has already been recalculated.
+//
+void fltk3::Table::table_scrolled() {
+  // Find top row
+  int y, row, voff = vscrollbar->value();
+  for ( row=y=0; row < _rows; row++ ) {
+    y += row_height(row);
+    if ( y > voff ) { y -= row_height(row); break; }
+  }
+  _row_position = toprow = ( row >= _rows ) ? (row - 1) : row;
+  toprow_scrollpos = y;		// OPTIMIZATION: save for later use 
+  // Find bottom row
+  voff = vscrollbar->value() + tih;
+  for ( ; row < _rows; row++ ) {
+    y += row_height(row);
+    if ( y >= voff ) { break; }
+  }
+  botrow = ( row >= _rows ) ? (row - 1) : row; 
+  // Left column
+  int x, col, hoff = hscrollbar->value();
+  for ( col=x=0; col < _cols; col++ ) {
+    x += col_width(col);
+    if ( x > hoff ) { x -= col_width(col); break; }
+  }
+  _col_position = leftcol = ( col >= _cols ) ? (col - 1) : col;
+  leftcol_scrollpos = x;	// OPTIMIZATION: save for later use 
+  // Right column
+  //    Work with data left over from leftcol calculation
+  //
+  hoff = hscrollbar->value() + tiw;
+  for ( ; col < _cols; col++ ) {
+    x += col_width(col);
+    if ( x >= hoff ) { break; }
+  }
+  rightcol = ( col >= _cols ) ? (col - 1) : col; 
+  // First tell children to scroll
+  draw_cell(CONTEXT_RC_RESIZE, 0,0,0,0,0,0);
+}
+
+// Table resized: recalc internal data
+//    Call this whenever the window is resized.
+//    Recalculates the scrollbar sizes.
+//    Makes no assumptions about any pre-initialized data.
+//
+void fltk3::Table::table_resized() {
+  table_h = row_scroll_position(rows());
+  table_w = col_scroll_position(cols()); 
+  recalc_dimensions(); 
+  // Recalc scrollbar sizes
+  //    Clamp scrollbar value() after a resize.
+  //    Resize scrollbars to enforce a constant trough width after a window resize.
+  //
+  {
+    // Vertical scrollbar
+    float vscrolltab = ( table_h == 0 || tih > table_h ) ? 1 : (float)tih / table_h;
+    float hscrolltab = ( table_w == 0 || tiw > table_w ) ? 1 : (float)tiw / table_w;
+    vscrollbar->bounds(0, table_h-tih);
+    vscrollbar->precision(10);
+    vscrollbar->slider_size(vscrolltab);
+    vscrollbar->resize(wix+wiw-SCROLLBAR_SIZE, wiy,
+                       SCROLLBAR_SIZE, 
+                       wih - ((hscrollbar->visible())?SCROLLBAR_SIZE:0));
+    vscrollbar->Valuator::value(vscrollbar->clamp(vscrollbar->value()));	
+    // Horizontal scrollbar
+    hscrollbar->bounds(0, table_w-tiw);
+    hscrollbar->precision(10);
+    hscrollbar->slider_size(hscrolltab);
+    hscrollbar->resize(wix, wiy+wih-SCROLLBAR_SIZE,
+                       wiw - ((vscrollbar->visible())?SCROLLBAR_SIZE:0), 
+                       SCROLLBAR_SIZE);
+    hscrollbar->Valuator::value(hscrollbar->clamp(hscrollbar->value()));
+  }
+  
+  // Tell FLTK child widgets were resized
+  Group::init_sizes();
+  
+  // Recalc top/bot/left/right
+  table_scrolled();
+  
+  // DO *NOT* REDRAW -- LEAVE THIS UP TO THE CALLER
+  // redraw();
+}
+
+// Someone moved a scrollbar
+void fltk3::Table::scroll_cb(fltk3::Widget*w, void *data) {
+  fltk3::Table *o = (fltk3::Table*)data;
+  o->recalc_dimensions();	// recalc tix, tiy, etc.
+  o->table_scrolled();
+  o->redraw();
+}
+
+// Set number of rows
+void fltk3::Table::rows(int val) {
+  int oldrows = _rows;
+  _rows = val;
+  {
+    int default_h = ( _rowheights.size() > 0 ) ? _rowheights.back() : 25;
+    int now_size = _rowheights.size();
+    _rowheights.size(val);			// enlarge or shrink as needed
+    while ( now_size < val ) {
+      _rowheights[now_size++] = default_h;	// fill new
+    }
+  }
+  table_resized();
+  
+  // OPTIMIZATION: redraw only if change is visible.
+  if ( val >= oldrows && oldrows > botrow ) {
+    // NO REDRAW
+  } else {
+    redraw();
+  }
+}
+
+// Set number of cols
+void fltk3::Table::cols(int val) {
+  _cols = val;
+  {
+    int default_w = ( _colwidths.size() > 0 ) ? _colwidths[_colwidths.size()-1] : 80;
+    int now_size = _colwidths.size();
+    _colwidths.size(val);			// enlarge or shrink as needed
+    while ( now_size < val ) {
+      _colwidths[now_size++] = default_w;	// fill new
+    }
+  }
+  table_resized();
+  redraw();
+}
+
+// Change mouse cursor to different type
+void fltk3::Table::change_cursor(fltk3::Cursor newcursor) {
+  if ( newcursor != _last_cursor ) {
+    fltk3::cursor(newcursor, fltk3::BLACK, fltk3::WHITE);
+    _last_cursor = newcursor;
+  }
+}
+
+void fltk3::Table::damage_zone(int r1, int c1, int r2, int c2, int r3, int c3) {
+  int R1 = r1, C1 = c1;
+  int R2 = r2, C2 = c2;
+  if (r1 > R2) R2 = r1;
+  if (r2 < R1) R1 = r2;
+  if (r3 > R2) R2 = r3;
+  if (r3 < R1) R1 = r3;
+  if (c1 > C2) C2 = c1;
+  if (c2 < C1) C1 = c2;
+  if (c3 > C2) C2 = c3;
+  if (c3 < C1) C1 = c3;
+  if (R1 < 0) {
+    if (R2 < 0) return;
+    R1 = 0;
+  }
+  if (C1 < 0) {
+    if (C2 < 0) return;
+    C1 = 0;
+  }
+  if (R1 < toprow) R1 = toprow;
+  if (R2 > botrow) R2 = botrow;
+  if (C1 < leftcol) C1 = leftcol;
+  if (C2 > rightcol) C2 = rightcol;
+  redraw_range(R1, R2, C1, C2);
+}
+
+int fltk3::Table::move_cursor(int R, int C) {
+  if (select_row == -1) R++;
+  if (select_col == -1) C++;
+  R += select_row;
+  C += select_col;
+  if (R < 0) R = 0;
+  if (R >= rows()) R = rows() - 1;
+  if (C < 0) C = 0;
+  if (C >= cols()) C = cols() - 1;
+  if (R == select_row && C == select_col) return 0;
+  damage_zone(current_row, current_col, select_row, select_col, R, C);
+  select_row = R;
+  select_col = C;
+  if (!fltk3::event_state(fltk3::SHIFT)) {
+    current_row = R;
+    current_col = C;
+  }
+  if (R < toprow + 1 || R > botrow - 1) row_position(R);
+  if (C < leftcol + 1 || C > rightcol - 1) col_position(C);
+  return 1;
+}
+
+// #define DEBUG 1
+#ifdef DEBUG
+#include "eventnames.h"
+#define PRINTEVENT \
+fprintf(stderr,"Table %s: ** Event: %s --\n", (label()?label():"none"), eventnames[event]);
+#else
+#define PRINTEVENT
+#endif
+
+// Handle FLTK events
+int fltk3::Table::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  PRINTEVENT;
+  int ret = Group::handle(event);	// let FLTK group handle events first
+  if (ret) {
+    if (fltk3::event_inside(hscrollbar) || fltk3::event_inside(vscrollbar)) return 1;
+    if (fltk3::focus() != this && contains(fltk3::focus())) return 1;
+  }
+  // Which row/column are we over?
+  int R, C;  				// row/column being worked on
+  ResizeFlag resizeflag;		// which resizing area are we over? (0=none)
+  TableContext context = cursor2rowcol(R, C, resizeflag);
+  switch ( event ) {
+    case fltk3::PUSH:
+      if (fltk3::event_button() == 1 && !fltk3::event_clicks()) {
+        if (fltk3::focus() != this) {
+          take_focus();
+          do_callback(CONTEXT_TABLE, -1, -1);
+          ret = 1;
+        }
+        damage_zone(current_row, current_col, select_row, select_col, R, C);
+        if (context == CONTEXT_CELL) {
+          current_row = select_row = R;
+          current_col = select_col = C;
+          _selecting = CONTEXT_CELL;
+        } else {
+          current_row = select_row = -1;
+          current_col = select_col = -1;
+        }
+      }
+      // Need this for eg. right click to pop up a menu
+      if ( Widget::callback() &&		// callback defined?
+          resizeflag == RESIZE_NONE ) {	// not resizing?
+        do_callback(context, R, C);		// do callback
+      }
+      switch ( context ) {
+        case CONTEXT_CELL:
+          // fltk3::PUSH on a cell?
+          ret = 1; 			// express interest in fltk3::RELEASE
+          break;
+          
+        case CONTEXT_NONE:
+          // fltk3::PUSH on table corner?
+          if ( fltk3::event_button() == 1 && 
+              fltk3::event_x() < x() + row_header_width()) {
+            current_col = 0;
+            select_col = cols() - 1;
+            current_row = 0;
+            select_row = rows() - 1;				
+            damage_zone(current_row, current_col, select_row, select_col);
+            ret = 1;
+          }
+          break;
+          
+        case CONTEXT_COL_HEADER:
+          // fltk3::PUSH on a column header?
+          if ( fltk3::event_button() == 1) {
+            // Resizing? Handle it
+            if ( resizeflag ) {
+              // Start resize if left click on column border.
+              //    "ret=1" ensures we get drag events from now on.
+              //    (C-1) is used if mouse is over the left hand side 
+              //    of cell, so we resize the next column on the left.
+              //
+              _resizing_col = ( resizeflag & RESIZE_COL_LEFT ) ? C-1 : C; 
+              _resizing_row = -1;
+              _dragging_x = fltk3::event_x(); 
+              ret = 1;
+            } else {
+              // Not resizing? Select the column
+              current_col = select_col = C;
+              current_row = 0;
+              select_row = rows() - 1;
+              _selecting = CONTEXT_COL_HEADER;
+              damage_zone(current_row, current_col, select_row, select_col);
+              ret = 1;
+            }
+          }
+          break;
+          
+        case CONTEXT_ROW_HEADER:
+          // fltk3::PUSH on a row header?
+          if ( fltk3::event_button() == 1 ) {
+            // Resizing? Handle it
+            if ( resizeflag ) {
+              // Start resize if left mouse clicked on row border.
+              //    "ret = 1" ensures we get drag events from now on.
+              //    (R-1) is used if mouse is over the top of the cell,
+              //    so that we resize the row above.
+              //
+              _resizing_row = ( resizeflag & RESIZE_ROW_ABOVE ) ? R-1 : R; 
+              _resizing_col = -1;
+              _dragging_y = fltk3::event_y(); 
+              ret = 1;
+            } else {
+              // Not resizing? Select the row
+              current_row = select_row = R;
+              current_col = 0;
+              select_col = cols() - 1;
+              _selecting = CONTEXT_ROW_HEADER;
+              damage_zone(current_row, current_col, select_row, select_col);
+              ret = 1;
+            }
+          }
+          break;
+          
+        default:
+          ret = 0;		// express disinterest
+          break;
+      }
+      _last_row = R;
+      break;
+      
+    case fltk3::DRAG:
+      if (_auto_drag == 1) {
+        ret = 1;
+        break;
+      } 
+      if ( _resizing_col > -1 ) {
+        // Dragging column?
+        //
+        //    Let user drag even /outside/ the row/col widget.
+        //    Don't allow column width smaller than 1.
+        //    Continue to show fltk3::CURSOR_WE at all times during drag.
+        //
+        int offset = _dragging_x - fltk3::event_x();
+        int new_w = col_width(_resizing_col) - offset;
+        if ( new_w < _col_resize_min ) new_w = _col_resize_min;
+        col_width(_resizing_col, new_w);
+        _dragging_x = fltk3::event_x();
+        table_resized();
+        redraw();
+        change_cursor(fltk3::CURSOR_WE);
+        ret = 1;
+        if ( Widget::callback() && when() & fltk3::WHEN_CHANGED ) {
+          do_callback(CONTEXT_RC_RESIZE, R, C);
+        }
+      }
+      else if ( _resizing_row > -1 ) {
+        // Dragging row?
+        //
+        //    Let user drag even /outside/ the row/col widget.
+        //    Don't allow row width smaller than 1.
+        //    Continue to show fltk3::CURSOR_NS at all times during drag.
+        //
+        int offset = _dragging_y - fltk3::event_y();
+        int new_h = row_height(_resizing_row) - offset;
+        if ( new_h < _row_resize_min ) new_h = _row_resize_min;
+        row_height(_resizing_row, new_h);
+        _dragging_y = fltk3::event_y();
+        table_resized();
+        redraw();
+        change_cursor(fltk3::CURSOR_NS);
+        ret = 1;
+        if ( Widget::callback() && when() & fltk3::WHEN_CHANGED ) {
+          do_callback(CONTEXT_RC_RESIZE, R, C);
+        }
+      } else {
+        if (fltk3::event_button() == 1 && 
+            _selecting == CONTEXT_CELL &&
+            context == CONTEXT_CELL) {
+          if (select_row != R || select_col != C) {
+            damage_zone(current_row, current_col, select_row, select_col, R, C);
+          }
+          select_row = R;
+          select_col = C;
+          ret = 1;
+        }
+        else if (fltk3::event_button() == 1 && 
+                 _selecting == CONTEXT_ROW_HEADER && 
+                 context & (CONTEXT_ROW_HEADER|CONTEXT_COL_HEADER|CONTEXT_CELL)) {
+          if (select_row != R) {
+            damage_zone(current_row, current_col, select_row, select_col, R, C);
+          }
+          select_row = R;
+          ret = 1;
+        }
+        else if (fltk3::event_button() == 1 && 
+                 _selecting == CONTEXT_COL_HEADER 
+                 && context & (CONTEXT_ROW_HEADER|CONTEXT_COL_HEADER|CONTEXT_CELL)) {
+          if (select_col != C) {
+            damage_zone(current_row, current_col, select_row, select_col, R, C);
+          }
+          select_col = C;
+          ret = 1;
+        }
+      }
+      // Enable autodrag if not resizing, and mouse has moved off table edge
+      if ( _resizing_row < 0 && _resizing_col < 0 && _auto_drag == 0 && 
+          ( fltk3::event_x() > x() + w() - 20 ||
+           fltk3::event_x() < x() + row_header_width() || 
+           fltk3::event_y() > y() + h() - 20 ||
+           fltk3::event_y() < y() + col_header_height()
+           ) ) {
+            _start_auto_drag();
+          }
+      break;
+      
+    case fltk3::RELEASE:
+      _stop_auto_drag();
+      switch ( context ) {
+        case CONTEXT_ROW_HEADER:		// release on row header
+        case CONTEXT_COL_HEADER:		// release on col header
+        case CONTEXT_CELL:			// release on a cell
+        case CONTEXT_TABLE:			// release on dead zone
+          if ( _resizing_col == -1 &&		// not resizing a column
+              _resizing_row == -1 &&		// not resizing a row
+              Widget::callback() && 	// callback defined
+              when() & fltk3::WHEN_RELEASE && 	// on button release
+              _last_row == R ) {		// release on same row PUSHed?
+            // Need this for eg. left clicking on a cell to select it
+            do_callback(context, R, C);
+          }
+          break;
+          
+        default:
+          break;
+      }
+      if ( fltk3::event_button() == 1 ) {
+        change_cursor(fltk3::CURSOR_DEFAULT);
+        _resizing_col = -1;
+        _resizing_row = -1;
+        ret = 1;
+      }
+      break;
+      
+    case fltk3::MOVE:
+      if ( context == CONTEXT_COL_HEADER && 		// in column header?
+          resizeflag ) {				// resize + near boundary?
+        change_cursor(fltk3::CURSOR_WE);			// show resize cursor
+      }
+      else if ( context == CONTEXT_ROW_HEADER && 	// in row header?
+               resizeflag ) {				// resize + near boundary?
+        change_cursor(fltk3::CURSOR_NS);			// show resize cursor
+      } else {
+        change_cursor(fltk3::CURSOR_DEFAULT);		// normal cursor
+      }
+      ret = 1;
+      break;
+      
+    case fltk3::ENTER:		// See FLTK event docs on the fltk3::ENTER widget
+      if (!ret) take_focus();
+      ret = 1;
+      //FALLTHROUGH
+      
+    case fltk3::LEAVE:		// We want to track the mouse if resizing is allowed.
+      if ( resizeflag ) {
+        ret = 1;
+      }
+      if ( event == fltk3::LEAVE ) {
+        _stop_auto_drag();
+        change_cursor(fltk3::CURSOR_DEFAULT);
+      }
+      break;
+      
+    case fltk3::FOCUS:
+      fltk3::focus(this);
+      //FALLTHROUGH
+      
+    case fltk3::UNFOCUS:
+      _stop_auto_drag();
+      ret = 1;
+      break;
+      
+    case fltk3::KEYBOARD: {
+      ret = 0;
+      int is_row = select_row;
+      int is_col = select_col;
+      switch(fltk3::event_key()) {
+        case fltk3::HomeKey:
+          ret = move_cursor(0, -1000000);
+          break;
+        case fltk3::EndKey:
+          ret = move_cursor(0, 1000000);
+          break;
+        case fltk3::PageUpKey:
+          ret = move_cursor(-(botrow - toprow - 1), 0);
+          break;
+        case fltk3::PageDownKey:
+          ret = move_cursor(botrow - toprow - 1 , 0);
+          break;
+        case fltk3::LeftKey:
+          ret = move_cursor(0, -1);
+          break;
+        case fltk3::RightKey:
+          ret = move_cursor(0, 1);
+          break;
+        case fltk3::UpKey:
+          ret = move_cursor(-1, 0);
+          break;
+        case fltk3::DownKey:
+          ret = move_cursor(1, 0);
+          break;
+	case fltk3::TabKey:
+	  if ( fltk3::event_state() & fltk3::SHIFT ) {
+            ret = move_cursor(0, -1);		// shift-tab -> left
+	  } else {
+	    ret = move_cursor(0, 1);		// tab -> right
+	  }
+          break;
+      }
+      if (ret && fltk3::focus() != this) {
+        do_callback(CONTEXT_TABLE, -1, -1);
+        take_focus();
+      }
+      //if (!ret && fltk3::Widget::callback() && when() & fltk3::WHEN_NOT_CHANGED  )
+      if ( Widget::callback() && 
+          (
+           ( !ret && when() & fltk3::WHEN_NOT_CHANGED ) || 
+           ( is_row!= select_row || is_col!= select_col ) 
+           )
+          ) {
+        do_callback(CONTEXT_CELL, select_row, select_col); 
+        //damage_zone(current_row, current_col, select_row, select_col);
+        ret = 1;
+      }
+      break;
+    }
+      
+    default:
+      change_cursor(fltk3::CURSOR_DEFAULT);
+      break;
+  }
+  return(ret);
+}
+
+// Resize FLTK override
+//     Handle resize events if user resizes parent window.
+//
+void fltk3::Table::resize(int X, int Y, int W, int H) {
+  // Tell group to resize, and recalc our own widget as well
+  Group::resize(X, Y, W, H);
+  table_resized();
+  redraw();
+}
+
+// Draw a cell
+void fltk3::Table::_redraw_cell(TableContext context, int r, int c) {
+  if ( r < 0 || c < 0 ) return;
+  int X,Y,W,H;
+  find_cell(context, r, c, X, Y, W, H);	// find positions of cell
+  draw_cell(context, r, c, X, Y, W, H);	// call users' function to draw it
+}
+
+/**
+ See if the cell at row \p r and column \p c is selected.
+ \returns 1 if the cell is selected, 0 if not.
+ */
+int fltk3::Table::is_selected(int r, int c) {
+  int s_left, s_right, s_top, s_bottom;
+  
+  if (select_col > current_col) {
+    s_left = current_col;
+    s_right = select_col;
+  } else {
+    s_right = current_col;
+    s_left = select_col;
+  }
+  if (select_row > current_row) {
+    s_top = current_row;
+    s_bottom = select_row;
+  } else {
+    s_bottom = current_row;
+    s_top = select_row;
+  }
+  if (r >= s_top && r <= s_bottom && c >= s_left && c <= s_right) {
+    return 1;
+  }
+  return 0;
+}
+
+/**
+  Gets the region of cells selected (highlighted).
+
+  \param[in] row_top   Returns the top row of selection area
+  \param[in] col_left  Returns the left column of selection area
+  \param[in] row_bot   Returns the bottom row of selection area
+  \param[in] col_right Returns the right column of selection area
+*/
+void fltk3::Table::get_selection(int& row_top, int& col_left, int& row_bot, int& col_right) {
+  if (select_col > current_col) {
+    col_left  = current_col;
+    col_right = select_col;
+  } else {
+    col_right = current_col;
+    col_left  = select_col;
+  }
+  if (select_row > current_row) {
+    row_top = current_row;
+    row_bot = select_row;
+  } else {
+    row_bot = current_row;
+    row_top = select_row;
+  }
+}
+
+/**
+  Sets the region of cells to be selected (highlighted).
+
+  So for instance, set_selection(0,0,0,0) selects the top/left cell in the table.
+  And set_selection(0,0,1,1) selects the four cells in rows 0 and 1, column 0 and 1.
+
+  \param[in] row_top   Top row of selection area
+  \param[in] col_left  Left column of selection area
+  \param[in] row_bot   Bottom row of selection area
+  \param[in] col_right Right column of selection area
+*/
+void fltk3::Table::set_selection(int row_top, int col_left, int row_bot, int col_right) {
+  damage_zone(current_row, current_col, select_row, select_col);
+  current_col = col_left;
+  current_row = row_top;
+  select_col  = col_right;
+  select_row  = row_bot;
+  damage_zone(current_row, current_col, select_row, select_col);
+}
+
+// Draw the entire fltk3::Table
+//    Override the draw() routine to draw the table.
+//    Then tell the group to draw over us.
+//
+void fltk3::Table::draw() {   
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  // Check if scrollbar size changed
+  if ( ( vscrollbar && (SCROLLBAR_SIZE != vscrollbar->w()) ) || 
+       ( hscrollbar && (SCROLLBAR_SIZE != hscrollbar->h()) ) ) {
+    // handle size change, min/max, table dim's, etc
+  table_resized();
+  }
+  
+  draw_cell(CONTEXT_STARTPAGE, 0, 0,	 	// let user's drawing routine
+            tix, tiy, tiw, tih);		// prep new page
+  
+  // Let fltk widgets draw themselves first. Do this after
+  // draw_cell(CONTEXT_STARTPAGE) in case user moves widgets around.
+  // Use window 'inner' clip to prevent drawing into table border.
+  // (unfortunately this clips FLTK's border, so we must draw it explicity below)
+  //
+  fltk3::push_clip(wix, wiy, wiw, wih);
+  {
+    Group::draw();
+  }
+  fltk3::pop_clip();
+  
+  // Explicitly draw border around widget, if any
+  draw_box(box(), x(), y(), w(), h(), color());
+  
+  // If fltk3::ScrollGroup 'table' is hidden, draw its box
+  //    Do this after fltk3::Group::draw() so we draw over scrollbars
+  //    that leak around the border.
+  //
+  if ( ! table->visible() ) {
+    if ( damage() & fltk3::DAMAGE_ALL || damage() & fltk3::DAMAGE_CHILD ) {
+      draw_box(table->box(), tox, toy, tow, toh, table->color());
+    }
+  } 
+  // Clip all further drawing to the inner widget dimensions
+  fltk3::push_clip(wix, wiy, wiw, wih);
+  {
+    // Only redraw a few cells?
+    if ( ! ( damage() & fltk3::DAMAGE_ALL ) && _redraw_leftcol != -1 ) {
+      fltk3::push_clip(tix, tiy, tiw, tih);
+      for ( int c = _redraw_leftcol; c <= _redraw_rightcol; c++ ) {
+        for ( int r = _redraw_toprow; r <= _redraw_botrow; r++ ) { 
+          _redraw_cell(CONTEXT_CELL, r, c);
+        }
+      }
+      fltk3::pop_clip();
+    }
+    if ( damage() & fltk3::DAMAGE_ALL ) {
+      int X,Y,W,H;
+      // Draw row headers, if any
+      if ( row_header() ) {
+        get_bounds(CONTEXT_ROW_HEADER, X, Y, W, H);
+        fltk3::push_clip(X,Y,W,H);
+        for ( int r = toprow; r <= botrow; r++ ) {
+          _redraw_cell(CONTEXT_ROW_HEADER, r, 0);
+        }
+        fltk3::pop_clip();
+      }
+      // Draw column headers, if any
+      if ( col_header() ) {
+        get_bounds(CONTEXT_COL_HEADER, X, Y, W, H);
+        fltk3::push_clip(X,Y,W,H);
+        for ( int c = leftcol; c <= rightcol; c++ ) {
+          _redraw_cell(CONTEXT_COL_HEADER, 0, c);
+        }
+        fltk3::pop_clip();
+      } 
+      // Draw all cells.
+      //    This includes cells partially obscured off edges of table.
+      //    No longer do this last; you might think it would be nice
+      //    to draw over dead zones, but on redraws it flickers. Avoid
+      //    drawing over deadzones; prevent deadzones by sizing columns.
+      //
+      fltk3::push_clip(tix, tiy, tiw, tih); {
+        for ( int r = toprow; r <= botrow; r++ ) {
+          for ( int c = leftcol; c <= rightcol; c++ ) {
+            _redraw_cell(CONTEXT_CELL, r, c); 
+          }
+        }
+      }
+      fltk3::pop_clip(); 
+      // Draw little rectangle in corner of headers
+      if ( row_header() && col_header() ) {
+        fltk3::rectf(wix, wiy, row_header_width(), col_header_height(), color());
+      }
+      
+      // Table has a boxtype? Close those few dead pixels
+      if ( table->box() ) {
+        if ( col_header() ) {
+          fltk3::rectf(tox, wiy, fltk3::box_dx(table->box()), col_header_height(), color());
+        }
+        if ( row_header() ) {
+          fltk3::rectf(wix, toy, row_header_width(), fltk3::box_dx(table->box()), color());
+        }
+      }
+      
+      // Table width smaller than window? Fill remainder with rectangle
+      if ( table_w < tiw ) {
+        fltk3::rectf(tix + table_w, tiy, tiw - table_w, tih, color()); 
+        // Col header? fill that too
+        if ( col_header() ) {
+          fltk3::rectf(tix + table_w, 
+                   wiy, 
+                   // get that corner just right..
+                   (tiw - table_w + fltk3::box_dw(table->box()) - 
+                    fltk3::box_dx(table->box())),
+                   col_header_height(),
+                   color());
+        }
+      } 
+      // Table height smaller than window? Fill remainder with rectangle
+      if ( table_h < tih ) {
+        fltk3::rectf(tix, tiy + table_h, tiw, tih - table_h, color()); 
+        if ( row_header() ) {
+          // NOTE:
+          //     Careful with that lower corner; don't use tih; when eg. 
+          //     table->box(fltk3::THIN_UPFRAME) and hscrollbar hidden, 
+          //     leaves a row of dead pixels.
+          //
+          fltk3::rectf(wix, tiy + table_h, row_header_width(), 
+                   (wiy+wih) - (tiy+table_h) - 
+                   ( hscrollbar->visible() ? SCROLLBAR_SIZE : 0),
+                   color());
+        }
+      }
+    } 
+    // Both scrollbars? Draw little box in lower right
+    if ( vscrollbar->visible() && hscrollbar->visible() ) {
+      fltk3::rectf(vscrollbar->x(), hscrollbar->y(), 
+               vscrollbar->w(), hscrollbar->h(), color());
+    } 
+    draw_cell(CONTEXT_ENDPAGE, 0, 0,		// let user's drawing
+              tix, tiy, tiw, tih);		// routines cleanup
+    
+    _redraw_leftcol = _redraw_rightcol = _redraw_toprow = _redraw_botrow = -1;
+  }
+  fltk3::pop_clip();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Table.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Table_Row.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Table_Row.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Table_Row.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,317 @@
+//
+// "$Id$"
+//
+// fltk3::TableRow -- A row oriented table widget
+//
+//    A class specializing in a table of rows.
+//    Handles row-specific selection behavior.
+//
+// Copyright 2002 by Greg Ercolano.
+//
+// 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.
+//
+// Please report all bugs and problems to "erco at seriss dot com".
+//
+//
+// TODO:
+//    o Row headings (only column headings supported currently)
+//
+
+#include <stdio.h>		// for debugging
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/TableRow.h>
+
+// Is row selected?
+int fltk3::TableRow::row_selected(int row) {
+  if ( row < 0 || row >= rows() ) return(-1);
+  return(_rowselect[row]);
+}
+
+// Change row selection type
+void fltk3::TableRow::type(TableRowSelectMode val) {
+  _selectmode = val;
+  switch ( _selectmode ) {
+    case SELECT_NONE: {
+      for ( int row=0; row<rows(); row++ ) {
+        _rowselect[row] = 0;
+      }
+      redraw();
+      break;
+    }
+    case SELECT_SINGLE: {
+      int count = 0;
+      for ( int row=0; row<rows(); row++ ) {
+        if ( _rowselect[row] ) {
+          if ( ++count > 1 ) {	// only one allowed
+            _rowselect[row] = 0;
+          }
+        }
+      }
+      redraw();
+      break;
+    }
+    case SELECT_MULTI:
+      break;
+  }
+}
+
+// Change selection state for row
+//
+//     flag:
+//        0 - clear selection
+//        1 - set selection
+//        2 - toggle selection
+//
+//     Returns:
+//        0 - selection state did not change
+//        1 - selection state changed
+//       -1 - row out of range or incorrect selection mode
+//
+int fltk3::TableRow::select_row(int row, int flag) {
+  int ret = 0;
+  if ( row < 0 || row >= rows() ) { return(-1); }
+  switch ( _selectmode ) {
+    case SELECT_NONE:
+      return(-1);
+      
+    case SELECT_SINGLE: {
+      int oldval;
+      for ( int t=0; t<rows(); t++ ) {
+        if ( t == row ) {
+          oldval = _rowselect[row];
+          if ( flag == 2 ) { _rowselect[row] ^= 1; }
+          else             { _rowselect[row] = flag; }
+          if ( oldval != _rowselect[row] ) {
+            redraw_range(row, row, leftcol, rightcol);
+            ret = 1;
+          }
+        }
+        else if ( _rowselect[t] ) {
+          _rowselect[t] = 0;
+          redraw_range(t, t, leftcol, rightcol);
+        }
+      }
+      break;
+    }
+      
+    case SELECT_MULTI: {
+      int oldval = _rowselect[row];
+      if ( flag == 2 ) { _rowselect[row] ^= 1; }
+      else             { _rowselect[row] = flag; }
+      if ( _rowselect[row] != oldval ) {		// select state changed?
+        if ( row >= toprow && row <= botrow ) {		// row visible?
+          // Extend partial redraw range
+          redraw_range(row, row, leftcol, rightcol);
+        }
+        ret = 1;
+      }
+    }
+  }
+  return(ret);
+}
+
+// Select all rows to a known state
+void fltk3::TableRow::select_all_rows(int flag) {
+  switch ( _selectmode ) {
+    case SELECT_NONE:
+      return;
+      
+    case SELECT_SINGLE:
+      if ( flag != 0 ) return;
+      //FALLTHROUGH
+      
+    case SELECT_MULTI: {
+      char changed = 0;
+      if ( flag == 2 ) {
+        for ( int row=0; row<(int)_rowselect.size(); row++ ) {
+          _rowselect[row] ^= 1;
+        }
+        changed = 1;
+      } else {
+        for ( int row=0; row<(int)_rowselect.size(); row++ ) {
+          changed |= (_rowselect[row] != flag)?1:0;
+          _rowselect[row] = flag; 
+        }
+      }
+      if ( changed ) {
+        redraw();
+      }
+    }
+  }
+}
+
+// Set number of rows
+void fltk3::TableRow::rows(int val) {
+  Table::rows(val);
+  while ( val > (int)_rowselect.size() ) { _rowselect.push_back(0); }	// enlarge
+  while ( val < (int)_rowselect.size() ) { _rowselect.pop_back(); }	// shrink
+}
+
+// #include "eventnames.h"		// debugging
+// #include <stdio.h>
+
+// Handle events
+int fltk3::TableRow::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  
+  //  fprintf(stderr, "** EVENT: %s: EVENT XY=%d,%d\n", 
+  //      eventnames[event], fltk3::event_x(), fltk3::event_y());	// debugging
+  
+  // Let base class handle event
+  int ret = Table::handle(event);
+  
+  // The following code disables cell selection.. why was it added? -erco 05/18/03
+  // if ( ret ) { _last_y = fltk3::event_y(); return(1); }	// base class 'handled' it (eg. column resize)
+  
+  int shiftstate = (fltk3::event_state() & fltk3::CTRL) ? fltk3::CTRL :
+  (fltk3::event_state() & fltk3::SHIFT) ? fltk3::SHIFT : 0;
+  
+  // Which row/column are we over?
+  int R, C;  				// row/column being worked on
+  ResizeFlag resizeflag;		// which resizing area are we over? (0=none)
+  TableContext context = cursor2rowcol(R, C, resizeflag);
+  switch ( event ) {
+    case fltk3::PUSH:
+      if ( fltk3::event_button() == 1 ) {
+        _last_push_x = fltk3::event_x();	// save regardless of context
+        _last_push_y = fltk3::event_y();	// " "
+        
+        // Handle selection in table.
+        //     Select cell under cursor, and enable drag selection mode.
+        //
+        if ( context == CONTEXT_CELL ) {
+          // Ctrl key? Toggle selection state
+          switch ( shiftstate ) {
+            case fltk3::CTRL:
+              select_row(R, 2);		// toggle
+              break;
+              
+            case fltk3::SHIFT: {
+              select_row(R, 1);
+              if ( _last_row > -1 ) {
+                int srow = R, erow = _last_row;
+                if ( srow > erow ) {
+                  srow = _last_row;
+                  erow = R;
+                }
+                for ( int row = srow; row <= erow; row++ ) {
+                  select_row(row, 1);
+                }
+              }
+              break;
+            }
+              
+            default:
+              select_all_rows(0);	// clear all previous selections
+              select_row(R, 1);
+              break;
+          }
+          
+          _last_row = R;
+          _dragging_select = 1;
+          ret = 1;      // fltk3::PUSH handled (ensures fltk3::DRAG will be sent)
+          // redraw();  // redraw() handled by select_row()
+        }
+      } 
+      break;
+      
+    case fltk3::DRAG: {
+      if ( _dragging_select ) {
+        // Dragged off table edges? Handle scrolling
+        int offtop = toy - _last_y;			// >0 if off top of table
+        int offbot = _last_y - (toy + toh);		// >0 if off bottom of table
+        
+        if ( offtop > 0 && row_position() > 0 ) {
+          // Only scroll in upward direction
+          int diff = _last_y - fltk3::event_y();
+          if ( diff < 1 ) {
+            ret = 1;
+            break;
+          }
+          row_position(row_position() - diff);
+          context = CONTEXT_CELL; C = 0; R = row_position();  // HACK: fake it
+          if ( R < 0 || R > rows() ) { ret = 1; break; }      // HACK: ugly
+        }
+        else if ( offbot > 0 && botrow < rows() ) {
+          // Only scroll in downward direction
+          int diff = fltk3::event_y() - _last_y;
+          if ( diff < 1 ) {
+            ret = 1;
+            break;
+          }
+          row_position(row_position() + diff);
+          context = CONTEXT_CELL; C = 0; R = botrow;		// HACK: fake it
+          if ( R < 0 || R > rows() ) { ret = 1; break; }	// HACK: ugly
+        }
+        if ( context == CONTEXT_CELL ) {
+          switch ( shiftstate ) {
+            case fltk3::CTRL:
+              if ( R != _last_row ) {		// toggle if dragged to new row
+                select_row(R, 2);		// 2=toggle
+              }
+              break;
+              
+            case fltk3::SHIFT:
+            default:
+              select_row(R, 1);
+              if ( _last_row > -1 ) {
+                int srow = R, erow = _last_row;
+                if ( srow > erow ) {
+                  srow = _last_row;
+                  erow = R;
+                }
+                for ( int row = srow; row <= erow; row++ ) {
+                  select_row(row, 1);
+                }
+              }
+              break;
+          }
+          ret = 1;				// drag handled
+          _last_row = R;
+        }
+      }
+      break;
+    }
+      
+    case fltk3::RELEASE:
+      if ( fltk3::event_button() == 1 ) {
+        _dragging_select = 0;
+        ret = 1;			// release handled
+        // Clicked off edges of data table? 
+        //    A way for user to clear the current selection.
+        //
+        int databot = tiy + table_h,
+        dataright = tix + table_w;
+        if ( 
+            ( _last_push_x > dataright && fltk3::event_x() > dataright ) ||
+            ( _last_push_y > databot && fltk3::event_y() > databot )
+            ) {
+          select_all_rows(0);			// clear previous selections
+        }
+      }
+      break;
+      
+    default:
+      break;
+  }
+  _last_y = fltk3::event_y();
+  return(ret);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Table_Row.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tabs.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tabs.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tabs.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,533 @@
+//
+// "$Id$"
+//
+// Tab widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+// This is the "file card tabs" interface to allow you to put lots and lots
+// of buttons and switches in a panel, as popularized by many toolkits.
+
+// Each child widget is a card, and its label() is printed on the card tab.
+// Clicking the tab makes that card visible.
+
+#include <stdio.h>
+#include <fltk3/run.h>
+#include <fltk3/TabGroup.h>
+#include <fltk3/draw.h>
+#include <fltk3/Tooltip.h>
+
+#define BORDER 2
+#define EXTRASPACE 10
+#define SELECTION_BORDER 5
+
+// Return the left edges of each tab (plus a fake left edge for a tab
+// past the right-hand one).  These positions are actually of the left
+// edge of the slope.  They are either separated by the correct distance
+// or by EXTRASPACE or by zero.
+// These positions are updated in the private arrays tab_pos[] and
+// tab_width[], resp.. If needed, these arrays are (re)allocated.
+// Return value is the index of the selected item.
+
+int fltk3::TabGroup::tab_positions() {
+  int nc = children();
+  if (nc != tab_count) {
+    clear_tab_positions();
+    if (nc) {
+      tab_pos   = (int*)malloc((nc+1)*sizeof(int));
+      tab_width = (int*)malloc((nc+1)*sizeof(int));
+    }
+    tab_count = nc;
+  }
+  if (nc == 0) return 0;
+  int selected = 0;
+  fltk3::Widget*const* a = array();
+  int i;
+  char prev_draw_shortcut = fltk3::draw_shortcut;
+  fltk3::draw_shortcut = 1;
+
+  tab_pos[0] = fltk3::box_dx(box());
+  for (i=0; i<nc; i++) {
+    fltk3::Widget* o = *a++;
+    if (o->visible()) selected = i;
+
+    int wt = 0; int ht = 0;
+    o->measure_label(wt,ht);
+
+    tab_width[i] = wt + EXTRASPACE;
+    tab_pos[i+1] = tab_pos[i] + tab_width[i] + BORDER;
+  }
+  fltk3::draw_shortcut = prev_draw_shortcut;
+
+  int r = w();
+  if (tab_pos[i] <= r) return selected;
+  // uh oh, they are too big:
+  // pack them against right edge:
+  tab_pos[i] = r;
+  for (i = nc; i--;) {
+    int l = r-tab_width[i];
+    if (tab_pos[i+1] < l) l = tab_pos[i+1];
+    if (tab_pos[i] <= l) break;
+    tab_pos[i] = l;
+    r -= EXTRASPACE;
+  }
+  // pack them against left edge and truncate width if they still don't fit:
+  for (i = 0; i<nc; i++) {
+    if (tab_pos[i] >= i*EXTRASPACE) break;
+    tab_pos[i] = i*EXTRASPACE;
+    int W = w()-1-EXTRASPACE*(children()-i) - tab_pos[i];
+    if (tab_width[i] > W) tab_width[i] = W;
+  }
+  // adjust edges according to visiblity:
+  for (i = nc; i > selected; i--) {
+    tab_pos[i] = tab_pos[i-1] + tab_width[i-1];
+  }
+  return selected;
+}
+
+// Returns space (height) in pixels needed for tabs. Negative to put them on the bottom.
+// Returns full height, if children() = 0.
+int fltk3::TabGroup::tab_height() {
+  if (children() == 0) return h();
+  int H = h();
+  int H2 = y();
+  fltk3::Widget*const* a = array();
+  for (int i=children(); i--;) {
+    fltk3::Widget* o = *a++;
+    if (o->y() < y()+H) H = o->y()-y();
+    if (o->y()+o->h() > H2) H2 = o->y()+o->h();
+  }
+  H2 = y()+h()-H2;
+  if (H2 > H) return (H2 <= 0) ? 0 : -H2;
+  else return (H <= 0) ? 0 : H;
+}
+
+// This is used for event handling (clicks) and by fluid to pick tabs.
+// Returns 0, if children() = 0, or if the event is outside of the tabs area.
+fltk3::Widget *fltk3::TabGroup::which(int event_x, int event_y) {
+  if (children() == 0) return 0;
+  int H = tab_height();
+  if (H < 0) {
+    if (event_y > y()+h() || event_y < y()+h()+H) return 0;
+  } else {
+    if (event_y > y()+H || event_y < y()) return 0;
+  }
+  if (event_x < x()) return 0;
+  fltk3::Widget *ret = 0L;
+  int nc = children();
+  tab_positions();
+  for (int i=0; i<nc; i++) {
+    if (event_x < x()+tab_pos[i+1]) {
+      ret = child(i);
+      break;
+    }
+  }
+  return ret;
+}
+
+void fltk3::TabGroup::redraw_tabs()
+{
+  int H = tab_height();
+  if (H >= 0) {
+    H += fltk3::box_dy(box());
+    damage(fltk3::DAMAGE_SCROLL, x(), y(), w(), H);
+  } else {
+    H = fltk3::box_dy(box()) - H;
+    damage(fltk3::DAMAGE_SCROLL, x(), y() + h() - H, w(), H);
+  }
+}
+
+int fltk3::TabGroup::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+
+  fltk3::Widget *o;
+  int i;
+
+  switch (event) {
+
+  case fltk3::PUSH: {
+    int H = tab_height();
+    if (H >= 0) {
+      if (fltk3::event_y() > y()+H) return Group::handle(event);
+    } else {
+      if (fltk3::event_y() < y()+h()+H) return Group::handle(event);
+    }}
+    /* FALLTHROUGH */
+  case fltk3::DRAG:
+  case fltk3::RELEASE:
+    o = which(fltk3::event_x(), fltk3::event_y());
+    if (event == fltk3::RELEASE) {
+      push(0);
+      if (o && fltk3::visible_focus() && fltk3::focus()!=this) { 
+        fltk3::focus(this);
+        redraw_tabs();
+      }
+      if (o && value(o)) {
+        fltk3::WidgetTracker wp(o);
+        set_changed();
+	do_callback();
+	if (wp.deleted()) return 1;
+      }
+      fltk3::Tooltip::current(o);
+    } else {
+      push(o);
+    }
+    return 1;
+  case fltk3::MOVE: {
+    int ret = Group::handle(event);
+    fltk3::Widget *o = fltk3::Tooltip::current(), *n = o;
+    int H = tab_height();
+    if ( (H>=0) && (fltk3::event_y()>y()+H) )
+      return ret;
+    else if ( (H<0) && (fltk3::event_y() < y()+h()+H) )
+      return ret;
+    else { 
+      n = which(fltk3::event_x(), fltk3::event_y());
+      if (!n) n = this;
+    }
+    if (n!=o)
+      fltk3::Tooltip::enter(n);
+    return ret; }
+  case fltk3::FOCUS:
+  case fltk3::UNFOCUS:
+    if (!fltk3::visible_focus()) return Group::handle(event);
+    if (fltk3::event() == fltk3::RELEASE ||
+	fltk3::event() == fltk3::SHORTCUT ||
+	fltk3::event() == fltk3::KEYBOARD ||
+	fltk3::event() == fltk3::FOCUS ||
+	fltk3::event() == fltk3::UNFOCUS) {
+      redraw_tabs();
+      if (fltk3::event() == fltk3::FOCUS) return Group::handle(event);
+      if (fltk3::event() == fltk3::UNFOCUS) return 0;
+      else return 1;
+    } else return Group::handle(event);
+  case fltk3::KEYBOARD:
+    switch (fltk3::event_key()) {
+      case fltk3::LeftKey:
+        if (child(0)->visible()) return 0;
+	for (i = 1; i < children(); i ++)
+	  if (child(i)->visible()) break;
+	value(child(i - 1));
+	set_changed();
+	do_callback();
+        return 1;
+      case fltk3::RightKey:
+        if (child(children() - 1)->visible()) return 0;
+	for (i = 0; i < children(); i ++)
+	  if (child(i)->visible()) break;
+	value(child(i + 1));
+	set_changed();
+	do_callback();
+        return 1;
+      case fltk3::DownKey:
+        redraw();
+        return Group::handle(fltk3::FOCUS);
+      default:
+        break;
+    }
+    return Group::handle(event);
+  case fltk3::SHORTCUT:
+    for (i = 0; i < children(); ++i) {
+      fltk3::Widget *c = child(i);
+      if (c->test_shortcut(c->label())) {
+        char sc = !c->visible();
+        value(c);
+        if (sc) set_changed();
+        do_callback();
+        return 1;
+      }
+    }
+    return Group::handle(event);
+  case fltk3::SHOW:
+    value(); // update visibilities and fall through
+  default:
+    return Group::handle(event);
+
+  }
+}
+
+int fltk3::TabGroup::push(fltk3::Widget *o) {
+  if (push_ == o) return 0;
+  if ( (push_ && !push_->visible()) || (o && !o->visible()) )
+    redraw_tabs();
+  push_ = o;
+  return 1;
+}
+
+/**  
+   Gets the currently visible widget/tab.
+   The value() is the first visible child (or the last child if none
+   are visible) and this also hides any other children.
+   This allows the tabs to be deleted, moved to other groups, and
+   show()/hide() called without it screwing up.
+*/
+fltk3::Widget* fltk3::TabGroup::value() {
+  fltk3::Widget* v = 0;
+  fltk3::Widget*const* a = array();
+  for (int i=children(); i--;) {
+    fltk3::Widget* o = *a++;
+    if (v) o->hide();
+    else if (o->visible()) v = o;
+    else if (!i) {o->show(); v = o;}
+  }
+  return v;
+}
+
+/**
+  Sets the widget to become the current visible widget/tab.
+  Setting the value hides all other children, and makes this one
+  visible, if it is really a child.
+*/
+int fltk3::TabGroup::value(fltk3::Widget *newvalue) {
+  fltk3::Widget*const* a = array();
+  int ret = 0;
+  for (int i=children(); i--;) {
+    fltk3::Widget* o = *a++;
+    if (o == newvalue) {
+      if (!o->visible()) ret = 1;
+      o->show();
+    } else {
+      o->hide();
+    }
+  }
+  return ret;
+}
+
+enum {LEFT, RIGHT, SELECTED};
+
+void fltk3::TabGroup::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  fltk3::Widget *v = value();
+  int H = tab_height();
+
+  if (damage() & fltk3::DAMAGE_ALL) { // redraw the entire thing:
+    fltk3::Color c = v ? v->color() : color();
+
+    draw_box(box(), x(), y()+(H>=0?H:0), w(), h()-(H>=0?H:-H), c);
+
+    if (selection_color() != c) {
+      // Draw the top or bottom SELECTION_BORDER lines of the tab pane in the
+      // selection color so that the user knows which tab is selected...
+      int clip_y = (H >= 0) ? y() + H : y() + h() + H - SELECTION_BORDER;
+      fltk3::push_clip(x(), clip_y, w(), SELECTION_BORDER);
+      draw_box(box(), x(), clip_y, w(), SELECTION_BORDER, selection_color());
+      fltk3::pop_clip();
+    }
+    if (v) draw_child(*v);
+  } else { // redraw the child
+    if (v) update_child(*v);
+  }
+  if (damage() & (fltk3::DAMAGE_SCROLL|fltk3::DAMAGE_ALL)) {
+    int nc = children();
+    int selected = tab_positions();
+    int i;
+    fltk3::Widget*const* a = array();
+    for (i=0; i<selected; i++)
+      draw_tab(x()+tab_pos[i], x()+tab_pos[i+1],
+               tab_width[i], H, a[i], LEFT);
+    for (i=nc-1; i > selected; i--)
+      draw_tab(x()+tab_pos[i], x()+tab_pos[i+1],
+               tab_width[i], H, a[i], RIGHT);
+    if (v) {
+      i = selected;
+      draw_tab(x()+tab_pos[i], x()+tab_pos[i+1],
+               tab_width[i], H, a[i], SELECTED);
+    }
+  }
+}
+
+void fltk3::TabGroup::draw_tab(int x1, int x2, int W, int H, fltk3::Widget* o, int what) {
+  int sel = (what == SELECTED);
+  int dh = fltk3::box_dh(box());
+  int dy = fltk3::box_dy(box());
+  char prev_draw_shortcut = fltk3::draw_shortcut;
+  fltk3::draw_shortcut = 1;
+
+  fltk3::Boxtype bt = (o==push_ &&!sel) ? fltk3::down(box()) : box();
+
+  // compute offsets to make selected tab look bigger
+  int yofs = sel ? 0 : BORDER;
+
+  if ((x2 < x1+W) && what == RIGHT) x1 = x2 - W;
+
+  if (H >= 0) {
+    if (sel) fltk3::push_clip(x1, y(), x2 - x1, H + dh - dy);
+    else fltk3::push_clip(x1, y(), x2 - x1, H);
+
+    H += dh;
+
+    fltk3::Color c = sel ? selection_color() : o->selection_color();
+
+    draw_box(bt, x1, y() + yofs, W, H + 10 - yofs, c);
+
+    // Save the previous label color
+    fltk3::Color oc = o->labelcolor();
+
+    // Draw the label using the current color...
+    o->labelcolor(sel ? labelcolor() : o->labelcolor());    
+    o->draw_label(x1, y() + yofs, W, H - yofs, fltk3::ALIGN_CENTER);
+
+    // Restore the original label color...
+    o->labelcolor(oc);
+
+    if (fltk3::focus() == this && o->visible())
+      draw_focus(box(), x1, y(), W, H);
+
+    fltk3::pop_clip();
+  } else {
+    H = -H;
+
+    if (sel) fltk3::push_clip(x1, y() + h() - H - dy, x2 - x1, H + dy);
+    else fltk3::push_clip(x1, y() + h() - H, x2 - x1, H);
+
+    H += dh;
+
+    fltk3::Color c = sel ? selection_color() : o->selection_color();
+
+    draw_box(bt, x1, y() + h() - H - 10, W, H + 10 - yofs, c);
+
+    // Save the previous label color
+    fltk3::Color oc = o->labelcolor();
+
+    // Draw the label using the current color...
+    o->labelcolor(sel ? labelcolor() : o->labelcolor());
+    o->draw_label(x1, y() + h() - H, W, H - yofs, fltk3::ALIGN_CENTER);
+
+    // Restore the original label color...
+    o->labelcolor(oc);
+
+    if (fltk3::focus() == this && o->visible())
+      draw_focus(box(), x1, y() + h() - H, W, H);
+
+    fltk3::pop_clip();
+  }
+  fltk3::draw_shortcut = prev_draw_shortcut;
+}
+
+/**
+    Creates a new fltk3::TabGroup widget using the given position, size,
+    and label string. The default boxtype is fltk3::THIN_UP_BOX.
+
+    Use add(fltk3::Widget*) to add each child, which are usually
+    fltk3::Group widgets. The children should be sized to stay
+    away from the top or bottom edge of the fltk3::TabGroup widget,
+    which is where the tabs will be drawn.
+
+    All children of fltk3::TabGroup should have the same size and exactly fit on top of 
+    each other. They should only leave space above or below where that tabs will 
+    go, but not on the sides. If the first child of fltk3::TabGroup is set to 
+    "resizable()", the riders will not resize when the tabs are resized.
+
+    The destructor <I>also deletes all the children</I>. This
+    allows a whole tree to be deleted at once, without having to
+    keep a pointer to all the children in the user code. A kludge
+    has been done so the fltk3::TabGroup and all of its children
+    can be automatic (local) variables, but you must declare the
+    fltk3::TabGroup widget <I>first</I> so that it is destroyed last.
+*/
+fltk3::TabGroup::TabGroup(int X,int Y,int W, int H, const char *l) :
+  fltk3::Group(X,Y,W,H,l)
+{
+  box(fltk3::THIN_UP_BOX);
+  push_ = 0;
+  tab_pos = 0;
+  tab_width = 0;
+  tab_count = 0;
+}
+
+fltk3::TabGroup::~TabGroup() {
+  clear_tab_positions();
+}
+
+/**
+    Returns the position and size available to be used by its children.
+
+    If there isn't any child yet the \p tabh parameter will be used to
+    calculate the return values. This assumes that the children's labelsize
+    is the same as the fltk3::TabGroup' labelsize and adds a small border.
+
+    If there are already children, the values of child(0) are returned, and
+    \p tabh is ignored.
+
+    \note Children should always use the same positions and sizes.
+
+    \p tabh can be one of
+    \li    0: calculate label size, tabs on top
+    \li   -1: calculate label size, tabs on bottom
+    \li >  0: use given \p tabh value, tabs on top (height = tabh)
+    \li < -1: use given \p tabh value, tabs on bottom (height = -tabh)
+
+    \param[in]	tabh		position and optional height of tabs (see above)
+    \param[out]	rx,ry,rw,rh	(x,y,w,h) of client area for children
+
+    \since	FLTK 1.3.0
+*/
+void fltk3::TabGroup::client_area(int &rx, int &ry, int &rw, int &rh, int tabh) {
+
+  if (children()) {			// use existing values
+
+    rx = child(0)->x();
+    ry = child(0)->y();
+    rw = child(0)->w();
+    rh = child(0)->h();
+
+  } else {				// calculate values
+
+    int y_offset;
+    int label_height = fltk3::height(labelfont(), labelsize()) + BORDER*2;
+
+    if (tabh == 0)			// use default (at top)
+      y_offset = label_height;
+    else if (tabh == -1)	 	// use default (at bottom)
+      y_offset = -label_height;
+    else
+      y_offset = tabh;			// user given value
+
+    rx = x();
+    rw = w();
+
+    if (y_offset >= 0) {		// labels at top
+      ry = y() + y_offset;
+      rh = h() - y_offset;
+    } else {				// labels at bottom
+      ry = y();
+      rh = h() + y_offset;
+    }
+  }
+}
+
+void fltk3::TabGroup::clear_tab_positions() {
+  if (tab_pos) {
+    free(tab_pos);
+    tab_pos = 0;
+  }
+  if (tab_width){
+    free(tab_width);
+    tab_width = 0;
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tabs.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Text_Buffer.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Text_Buffer.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Text_Buffer.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1794 @@
+//
+// "$Id$"
+//
+// Copyright 2001-2010 by Bill Spitzak and others.
+// Original code Copyright Mark Edel.  Permission to distribute under
+// the LGPL for the FLTK library granted by Mark Edel.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <ctype.h>
+#include <fltk3/run.h>
+#include <fltk3/TextBuffer.h>
+#include <fltk3/ask.h>
+
+
+/*
+ This file is based on a port of NEdit to FLTK many years ago. NEdit at that
+ point was already stretched beyond the task it was designed for which explains
+ why the source code is sometimes pretty convoluted. It still is a very useful
+ widget for FLTK, and we are thankful that the nedit team allowed us to 
+ integrate their code.
+
+ With the introduction of Unicode and UTF-8, Fl_Text_... has to go into a whole
+ new generation of code. Originally designed for monospaced fonts only, many
+ features make less sense in the multibyte and multiwidth world of UTF-8.
+
+ Columns are a good example. There is simply no such thing. The new Fl_Text_...
+ widget converts columns to pixels by multiplying them with the average 
+ character width for a given font.
+
+ Rectangular selections were rarely used (if at all) and make little sense when
+ using variable width fonts. They have been removed.
+
+ Using multiple spaces to emulate tab stops has been replaced by pixel counting
+ routines. They are slower, but give the expected result for proportional fonts.
+
+ And constantly recalculating character widths is just much too expensive. Lines
+ of text are now subdivided into blocks of text which are measured at once 
+ instead of individual characters. 
+ */
+
+
+#ifndef min
+
+static int max(int i1, int i2)
+{
+  return i1 >= i2 ? i1 : i2;
+}
+
+static int min(int i1, int i2)
+{
+  return i1 <= i2 ? i1 : i2;
+}
+
+#endif
+
+
+static char *undobuffer;
+static int undobufferlength;
+static fltk3::TextBuffer *undowidget;
+static int undoat;		// points after insertion
+static int undocut;		// number of characters deleted there
+static int undoinsert;		// number of characters inserted
+static int undoyankcut;		// length of valid contents of buffer, even if undocut=0
+
+/*
+ Resize the undo buffer to match at least the requested size.
+ */
+static void undobuffersize(int n)
+{
+  if (n > undobufferlength) {
+    if (undobuffer) {
+      do {
+	undobufferlength *= 2;
+      } while (undobufferlength < n);
+      undobuffer = (char *) realloc(undobuffer, undobufferlength);
+    } else {
+      undobufferlength = n + 9;
+      undobuffer = (char *) malloc(undobufferlength);
+    }
+  }
+}
+
+static void def_transcoding_warning_action(fltk3::TextBuffer *text)
+{
+  fltk3::alert("%s", text->file_encoding_warning_message);
+}
+
+/*
+ Initialize all variables.
+ */
+fltk3::TextBuffer::TextBuffer(int requestedSize, int preferredGapSize)
+{
+  mLength = 0;
+  mPreferredGapSize = preferredGapSize;
+  mBuf = (char *) malloc(requestedSize + mPreferredGapSize);
+  mGapStart = 0;
+  mGapEnd = mPreferredGapSize;
+  mTabDist = 8;
+  mPrimary.mSelected = 0;
+  mPrimary.mStart = mPrimary.mEnd = 0;
+  mSecondary.mSelected = 0;
+  mSecondary.mStart = mSecondary.mEnd = 0;
+  mHighlight.mSelected = 0;
+  mHighlight.mStart = mHighlight.mEnd = 0;
+  mModifyProcs = NULL;
+  mCbArgs = NULL;
+  mNModifyProcs = 0;
+  mNPredeleteProcs = 0;
+  mPredeleteProcs = NULL;
+  mPredeleteCbArgs = NULL;
+  mCursorPosHint = 0;
+  mCanUndo = 1;
+  input_file_was_transcoded = 0;
+  transcoding_warning_action = def_transcoding_warning_action;
+}
+
+
+/*
+ Free all resources.
+ */
+fltk3::TextBuffer::~TextBuffer()
+{
+  free(mBuf);
+  if (mNModifyProcs != 0) {
+    delete[]mModifyProcs;
+    delete[]mCbArgs;
+  }
+  if (mNPredeleteProcs != 0) {
+    delete[]mPredeleteProcs;
+    delete[]mPredeleteCbArgs;
+  }
+}
+
+
+/*
+ This function copies verbose whatever is in front and after the gap into a
+ single buffer.
+ */
+char *fltk3::TextBuffer::text() const {
+  char *t = (char *) malloc(mLength + 1);
+  memcpy(t, mBuf, mGapStart);
+  memcpy(t+mGapStart, mBuf+mGapEnd, mLength - mGapStart);
+  t[mLength] = '\0';
+  return t;
+} 
+
+
+/*
+ Set the text buffer to a new string.
+ */
+void fltk3::TextBuffer::text(const char *t)
+{
+  IS_UTF8_ALIGNED(t)
+  
+  call_predelete_callbacks(0, length());
+  
+  /* Save information for redisplay, and get rid of the old buffer */
+  const char *deletedText = text();
+  int deletedLength = mLength;
+  free((void *) mBuf);
+  
+  /* Start a new buffer with a gap of mPreferredGapSize at the end */
+  int insertedLength = strlen(t);
+  mBuf = (char *) malloc(insertedLength + mPreferredGapSize);
+  mLength = insertedLength;
+  mGapStart = insertedLength;
+  mGapEnd = mGapStart + mPreferredGapSize;
+  memcpy(mBuf, t, insertedLength);
+  
+  /* Zero all of the existing selections */
+  update_selections(0, deletedLength, 0);
+  
+  /* Call the saved display routine(s) to update the screen */
+  call_modify_callbacks(0, deletedLength, insertedLength, 0, deletedText);
+  free((void *) deletedText);
+}
+
+
+/*
+ Creates a range of text to a new buffer and copies verbose from around the gap.
+ */
+char *fltk3::TextBuffer::text_range(int start, int end) const {
+  IS_UTF8_ALIGNED2(this, (start))
+  IS_UTF8_ALIGNED2(this, (end))
+  
+  char *s = NULL;
+  
+  /* Make sure start and end are ok, and allocate memory for returned string.
+   If start is bad, return "", if end is bad, adjust it. */
+  if (start < 0 || start > mLength)
+  {
+    s = (char *) malloc(1);
+    s[0] = '\0';
+    return s;
+  }
+  if (end < start) {
+    int temp = start;
+    start = end;
+    end = temp;
+  }
+  if (end > mLength)
+    end = mLength;
+  int copiedLength = end - start;
+  s = (char *) malloc(copiedLength + 1);
+  
+  /* Copy the text from the buffer to the returned string */
+  if (end <= mGapStart) {
+    memcpy(s, mBuf + start, copiedLength);
+  } else if (start >= mGapStart) {
+    memcpy(s, mBuf + start + (mGapEnd - mGapStart), copiedLength);
+  } else {
+    int part1Length = mGapStart - start;
+    memcpy(s, mBuf + start, part1Length);
+    memcpy(s + part1Length, mBuf + mGapEnd, copiedLength - part1Length);
+  }
+  s[copiedLength] = '\0';
+  return s;
+}
+
+/*
+ Return a UCS-4 character at the given index.
+ Pos must be at a character boundary.
+ */
+unsigned int fltk3::TextBuffer::char_at(int pos) const {  
+  if (pos < 0 || pos >= mLength)
+    return '\0';
+  
+  IS_UTF8_ALIGNED2(this, (pos))
+  
+  const char *src = address(pos);
+  return fltk3::utf8decode(src, 0, 0);
+} 
+
+
+/*
+ Return the raw byte at the given index.
+ This function ignores all unicode encoding.
+ */
+char fltk3::TextBuffer::byte_at(int pos) const {
+  if (pos < 0 || pos >= mLength)
+    return '\0';
+  const char *src = address(pos);
+  return *src;
+} 
+
+
+/*
+ Insert some text at the given index.
+ Pos must be at a character boundary.
+*/
+void fltk3::TextBuffer::insert(int pos, const char *text)
+{
+  IS_UTF8_ALIGNED2(this, (pos))
+  IS_UTF8_ALIGNED(text)
+  
+  /* check if there is actually any text */
+  if (!text || !*text)
+    return;
+  
+  /* if pos is not contiguous to existing text, make it */
+  if (pos > mLength)
+    pos = mLength;
+  if (pos < 0)
+    pos = 0;
+  
+  /* Even if nothing is deleted, we must call these callbacks */
+  call_predelete_callbacks(pos, 0);
+  
+  /* insert and redisplay */
+  int nInserted = insert_(pos, text);
+  mCursorPosHint = pos + nInserted;
+  IS_UTF8_ALIGNED2(this, (mCursorPosHint))
+  call_modify_callbacks(pos, 0, nInserted, 0, NULL);
+}
+
+
+/*
+ Replace a range of text with new text.
+ Start and end must be at a character boundary.
+*/
+void fltk3::TextBuffer::replace(int start, int end, const char *text)
+{
+  // Range check...
+  if (!text)
+    return;
+  if (start < 0)
+    start = 0;
+  if (end > mLength)
+    end = mLength;
+
+  IS_UTF8_ALIGNED2(this, (start))
+  IS_UTF8_ALIGNED2(this, (end))
+  IS_UTF8_ALIGNED(text)
+  
+  call_predelete_callbacks(start, end - start);
+  const char *deletedText = text_range(start, end);
+  remove_(start, end);
+  int nInserted = insert_(start, text);
+  mCursorPosHint = start + nInserted;
+  call_modify_callbacks(start, end - start, nInserted, 0, deletedText);
+  free((void *) deletedText);
+}
+
+
+/*
+ Remove a range of text.
+ Start and End must be at a character boundary.
+*/
+void fltk3::TextBuffer::remove(int start, int end)
+{
+  /* Make sure the arguments make sense */
+  if (start > end) {
+    int temp = start;
+    start = end;
+    end = temp;
+  }
+  if (start > mLength)
+    start = mLength;
+  if (start < 0)
+    start = 0;
+  if (end > mLength)
+    end = mLength;
+  if (end < 0)
+    end = 0;
+
+  IS_UTF8_ALIGNED2(this, (start))
+  IS_UTF8_ALIGNED2(this, (end))  
+  
+  if (start == end)
+    return;
+  
+  call_predelete_callbacks(start, end - start);
+  /* Remove and redisplay */
+  const char *deletedText = text_range(start, end);
+  remove_(start, end);
+  mCursorPosHint = start;
+  call_modify_callbacks(start, end - start, 0, 0, deletedText);
+  free((void *) deletedText);
+}
+
+
+/*
+ Copy a range of text from another text buffer.
+ fromStart, fromEnd, and toPos must be at a character boundary.
+ */
+void fltk3::TextBuffer::copy(fltk3::TextBuffer * fromBuf, int fromStart,
+			  int fromEnd, int toPos)
+{
+  IS_UTF8_ALIGNED2(fromBuf, fromStart)
+  IS_UTF8_ALIGNED2(fromBuf, fromEnd)
+  IS_UTF8_ALIGNED2(this, (toPos))
+  
+  int copiedLength = fromEnd - fromStart;
+  
+  /* Prepare the buffer to receive the new text.  If the new text fits in
+   the current buffer, just move the gap (if necessary) to where
+   the text should be inserted.  If the new text is too large, reallocate
+   the buffer with a gap large enough to accomodate the new text and a
+   gap of mPreferredGapSize */
+  if (copiedLength > mGapEnd - mGapStart)
+    reallocate_with_gap(toPos, copiedLength + mPreferredGapSize);
+  else if (toPos != mGapStart)
+    move_gap(toPos);
+  
+  /* Insert the new text (toPos now corresponds to the start of the gap) */
+  if (fromEnd <= fromBuf->mGapStart) {
+    memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart], copiedLength);
+  } else if (fromStart >= fromBuf->mGapStart) {
+    memcpy(&mBuf[toPos],
+	   &fromBuf->mBuf[fromStart + (fromBuf->mGapEnd - fromBuf->mGapStart)],
+	   copiedLength);
+  } else {
+    int part1Length = fromBuf->mGapStart - fromStart;
+    memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart], part1Length);
+    memcpy(&mBuf[toPos + part1Length],
+	   &fromBuf->mBuf[fromBuf->mGapEnd], copiedLength - part1Length);
+  }
+  mGapStart += copiedLength;
+  mLength += copiedLength;
+  update_selections(toPos, 0, copiedLength);
+}
+
+
+/*
+ Take the previous changes and undo them. Return the previous
+ cursor position in cursorPos. Returns 1 if the undo was applied.
+ CursorPos will be at a character boundary.
+ */ 
+int fltk3::TextBuffer::undo(int *cursorPos)
+{
+  if (undowidget != this || (!undocut && !undoinsert && !mCanUndo))
+    return 0;
+  
+  int ilen = undocut;
+  int xlen = undoinsert;
+  int b = undoat - xlen;
+  
+  if (xlen && undoyankcut && !ilen) {
+    ilen = undoyankcut;
+  }
+  
+  if (xlen && ilen) {
+    undobuffersize(ilen + 1);
+    undobuffer[ilen] = 0;
+    char *tmp = strdup(undobuffer);
+    replace(b, undoat, tmp);
+    if (cursorPos)
+      *cursorPos = mCursorPosHint;
+    free(tmp);
+  } else if (xlen) {
+    remove(b, undoat);
+    if (cursorPos)
+      *cursorPos = mCursorPosHint;
+  } else if (ilen) {
+    undobuffersize(ilen + 1);
+    undobuffer[ilen] = 0;
+    insert(undoat, undobuffer);
+    if (cursorPos)
+      *cursorPos = mCursorPosHint;
+    undoyankcut = 0;
+  }
+  
+  return 1;
+}
+
+
+/*
+ Set a flag if undo function will work.
+ */
+void fltk3::TextBuffer::canUndo(char flag)
+{
+  mCanUndo = flag;
+  // disabling undo also clears the last undo operation!
+  if (!mCanUndo && undowidget==this) 
+    undowidget = 0;
+}
+
+
+/*
+ Change the tab width. This will cause a couple of callbacks and a complete 
+ redisplay. 
+ Matt: I am not entirely sure why we need to trigger callbacks because
+ tabs are only a graphical hint, not changing any text at all, but I leave
+ this in here for back compatibility. 
+ */
+void fltk3::TextBuffer::tab_distance(int tabDist)
+{
+  /* First call the pre-delete callbacks with the previous tab setting 
+   still active. */
+  call_predelete_callbacks(0, mLength);
+  
+  /* Change the tab setting */
+  mTabDist = tabDist;
+  
+  /* Force any display routines to redisplay everything (unfortunately,
+   this means copying the whole buffer contents to provide "deletedText" */
+  const char *deletedText = text();
+  call_modify_callbacks(0, mLength, mLength, 0, deletedText);
+  free((void *) deletedText);
+}
+
+
+/*
+ Select a range of text.
+ Start and End must be at a character boundary.
+ */
+void fltk3::TextBuffer::select(int start, int end)
+{
+  IS_UTF8_ALIGNED2(this, (start))
+  IS_UTF8_ALIGNED2(this, (end))  
+  
+  fltk3::TextSelection oldSelection = mPrimary;
+  
+  mPrimary.set(start, end);
+  redisplay_selection(&oldSelection, &mPrimary);
+}
+
+
+/*
+ Clear the primary selection.
+ */
+void fltk3::TextBuffer::unselect()
+{
+  fltk3::TextSelection oldSelection = mPrimary;
+  
+  mPrimary.mSelected = 0;
+  redisplay_selection(&oldSelection, &mPrimary);
+}
+
+  
+/*
+ Return the primary selection range.
+ */
+int fltk3::TextBuffer::selection_position(int *start, int *end)
+{
+  return mPrimary.position(start, end);
+}
+
+
+/*
+ Return a copy of the selected text.
+ */
+char *fltk3::TextBuffer::selection_text()
+{
+  return selection_text_(&mPrimary);
+}
+
+
+/*
+ Remove the selected text.
+ */
+void fltk3::TextBuffer::remove_selection()
+{
+  remove_selection_(&mPrimary);
+}
+
+
+/*
+ Replace the selected text.
+ */
+void fltk3::TextBuffer::replace_selection(const char *text)
+{
+  replace_selection_(&mPrimary, text);
+}
+
+
+/*
+ Select text.
+ Start and End must be at a character boundary.
+ */
+void fltk3::TextBuffer::secondary_select(int start, int end)
+{
+  fltk3::TextSelection oldSelection = mSecondary;
+  
+  mSecondary.set(start, end);
+  redisplay_selection(&oldSelection, &mSecondary);
+}
+
+
+/*
+ Deselect text.
+ */
+void fltk3::TextBuffer::secondary_unselect()
+{
+  fltk3::TextSelection oldSelection = mSecondary;
+  
+  mSecondary.mSelected = 0;
+  redisplay_selection(&oldSelection, &mSecondary);
+}
+
+  
+/*
+ Return the selected range.
+ */
+int fltk3::TextBuffer::secondary_selection_position(int *start, int *end)
+{
+  return mSecondary.position(start, end);
+}
+
+
+/*
+ Return a copy of the text in this selection.
+ */
+char *fltk3::TextBuffer::secondary_selection_text()
+{
+  return selection_text_(&mSecondary);
+}
+
+
+/*
+ Remove the selected text.
+ */
+void fltk3::TextBuffer::remove_secondary_selection()
+{
+  remove_selection_(&mSecondary);
+}
+
+
+/*
+ Replace selected text.
+ */
+void fltk3::TextBuffer::replace_secondary_selection(const char *text)
+{
+  replace_selection_(&mSecondary, text);
+}
+
+
+/*
+ Highlight a range of text.
+ Start and End must be at a character boundary.
+ */
+void fltk3::TextBuffer::highlight(int start, int end)
+{
+  fltk3::TextSelection oldSelection = mHighlight;
+  
+  mHighlight.set(start, end);
+  redisplay_selection(&oldSelection, &mHighlight);
+}
+
+
+/*
+ Remove text highlighting.
+ */
+void fltk3::TextBuffer::unhighlight()
+{
+  fltk3::TextSelection oldSelection = mHighlight;
+  
+  mHighlight.mSelected = 0;
+  redisplay_selection(&oldSelection, &mHighlight);
+}
+
+  
+/*
+ Return position of highlight.
+ */
+int fltk3::TextBuffer::highlight_position(int *start, int *end)
+{
+  return mHighlight.position(start, end);
+}
+
+
+/*
+ Return a copy of highlighted text.
+ */
+char *fltk3::TextBuffer::highlight_text()
+{
+  return selection_text_(&mHighlight);
+}
+
+
+/*
+ Add a callback that is called whenever text is modified.
+ */
+void fltk3::TextBuffer::add_modify_callback(fltk3::TextModifyCb bufModifiedCB,
+					 void *cbArg)
+{
+  fltk3::TextModifyCb *newModifyProcs =
+  new fltk3::TextModifyCb[mNModifyProcs + 1];
+  void **newCBArgs = new void *[mNModifyProcs + 1];
+  for (int i = 0; i < mNModifyProcs; i++) {
+    newModifyProcs[i + 1] = mModifyProcs[i];
+    newCBArgs[i + 1] = mCbArgs[i];
+  }
+  if (mNModifyProcs != 0) {
+    delete[]mModifyProcs;
+    delete[]mCbArgs;
+  }
+  newModifyProcs[0] = bufModifiedCB;
+  newCBArgs[0] = cbArg;
+  mNModifyProcs++;
+  mModifyProcs = newModifyProcs;
+  mCbArgs = newCBArgs;
+}
+
+
+/*
+ Remove a callback.
+ */
+void fltk3::TextBuffer::remove_modify_callback(fltk3::TextModifyCb bufModifiedCB, 
+                                            void *cbArg)
+{
+  int i, toRemove = -1;
+  
+  /* find the matching callback to remove */
+  for (i = 0; i < mNModifyProcs; i++) {
+    if (mModifyProcs[i] == bufModifiedCB && mCbArgs[i] == cbArg) {
+      toRemove = i;
+      break;
+    }
+  }
+  if (toRemove == -1) {
+    fltk3::error
+    ("fltk3::TextBuffer::remove_modify_callback(): Can't find modify CB to remove");
+    return;
+  }
+  
+  /* Allocate new lists for remaining callback procs and args (if
+   any are left) */
+  mNModifyProcs--;
+  if (mNModifyProcs == 0) {
+    mNModifyProcs = 0;
+    delete[]mModifyProcs;
+    mModifyProcs = NULL;
+    delete[]mCbArgs;
+    mCbArgs = NULL;
+    return;
+  }
+  fltk3::TextModifyCb *newModifyProcs = new fltk3::TextModifyCb[mNModifyProcs];
+  void **newCBArgs = new void *[mNModifyProcs];
+  
+  /* copy out the remaining members and free the old lists */
+  for (i = 0; i < toRemove; i++) {
+    newModifyProcs[i] = mModifyProcs[i];
+    newCBArgs[i] = mCbArgs[i];
+  }
+  for (; i < mNModifyProcs; i++) {
+    newModifyProcs[i] = mModifyProcs[i + 1];
+    newCBArgs[i] = mCbArgs[i + 1];
+  }
+  delete[]mModifyProcs;
+  delete[]mCbArgs;
+  mModifyProcs = newModifyProcs;
+  mCbArgs = newCBArgs;
+}
+
+
+/*
+ Add a callback that is called before deleting text.
+ */
+void fltk3::TextBuffer::add_predelete_callback(fltk3::TextPredeleteCb bufPreDeleteCB, 
+                                            void *cbArg)
+{
+  fltk3::TextPredeleteCb *newPreDeleteProcs =
+  new fltk3::TextPredeleteCb[mNPredeleteProcs + 1];
+  void **newCBArgs = new void *[mNPredeleteProcs + 1];
+  for (int i = 0; i < mNPredeleteProcs; i++) {
+    newPreDeleteProcs[i + 1] = mPredeleteProcs[i];
+    newCBArgs[i + 1] = mPredeleteCbArgs[i];
+  }
+  if (!mNPredeleteProcs != 0) {
+    delete[]mPredeleteProcs;
+    delete[]mPredeleteCbArgs;
+  }
+  newPreDeleteProcs[0] = bufPreDeleteCB;
+  newCBArgs[0] = cbArg;
+  mNPredeleteProcs++;
+  mPredeleteProcs = newPreDeleteProcs;
+  mPredeleteCbArgs = newCBArgs;
+}
+
+
+/*
+ Remove a callback.
+ */
+void fltk3::TextBuffer::remove_predelete_callback(fltk3::TextPredeleteCb bufPreDeleteCB, void *cbArg)
+{
+  int i, toRemove = -1;
+  /* find the matching callback to remove */
+  for (i = 0; i < mNPredeleteProcs; i++) {
+    if (mPredeleteProcs[i] == bufPreDeleteCB &&
+	mPredeleteCbArgs[i] == cbArg) {
+      toRemove = i;
+      break;
+    }
+  }
+  if (toRemove == -1) {
+    fltk3::error
+    ("fltk3::TextBuffer::remove_predelete_callback(): Can't find pre-delete CB to remove");
+    return;
+  }
+  
+  /* Allocate new lists for remaining callback procs and args (if
+   any are left) */
+  mNPredeleteProcs--;
+  if (mNPredeleteProcs == 0) {
+    mNPredeleteProcs = 0;
+    delete[]mPredeleteProcs;
+    mPredeleteProcs = NULL;
+    delete[]mPredeleteCbArgs;
+    mPredeleteCbArgs = NULL;
+    return;
+  }
+  fltk3::TextPredeleteCb *newPreDeleteProcs =
+  new fltk3::TextPredeleteCb[mNPredeleteProcs];
+  void **newCBArgs = new void *[mNPredeleteProcs];
+  
+  /* copy out the remaining members and free the old lists */
+  for (i = 0; i < toRemove; i++) {
+    newPreDeleteProcs[i] = mPredeleteProcs[i];
+    newCBArgs[i] = mPredeleteCbArgs[i];
+  }
+  for (; i < mNPredeleteProcs; i++) {
+    newPreDeleteProcs[i] = mPredeleteProcs[i + 1];
+    newCBArgs[i] = mPredeleteCbArgs[i + 1];
+  }
+  delete[]mPredeleteProcs;
+  delete[]mPredeleteCbArgs;
+  mPredeleteProcs = newPreDeleteProcs;
+  mPredeleteCbArgs = newCBArgs;
+}
+
+
+/*
+ Return a copy of the line that contains a given index.
+ Pos must be at a character boundary.
+ */
+char *fltk3::TextBuffer::line_text(int pos) const {
+  return text_range(line_start(pos), line_end(pos));
+} 
+
+
+/*
+ Find the beginning of the line.
+ */
+int fltk3::TextBuffer::line_start(int pos) const 
+{
+  if (!findchar_backward(pos, '\n', &pos))
+    return 0;
+  return pos + 1;
+} 
+
+
+/*
+ Find the end of the line.
+ */
+int fltk3::TextBuffer::line_end(int pos) const {
+  if (!findchar_forward(pos, '\n', &pos))
+    pos = mLength;
+  return pos;
+} 
+
+
+/*
+ Find the beginning of a word.
+ NOT UNICODE SAFE.
+ */
+int fltk3::TextBuffer::word_start(int pos) const {
+  // FIXME: character is ucs-4
+  while (pos>0 && (isalnum(char_at(pos)) || char_at(pos) == '_')) {
+    pos = prev_char(pos);
+  } 
+  // FIXME: character is ucs-4
+  if (!(isalnum(char_at(pos)) || char_at(pos) == '_'))
+    pos = next_char(pos);
+  return pos;
+}
+
+
+/*
+ Find the end of a word.
+ NOT UNICODE SAFE.
+ */
+int fltk3::TextBuffer::word_end(int pos) const {
+  // FIXME: character is ucs-4
+  while (pos < length() && (isalnum(char_at(pos)) || char_at(pos) == '_'))
+  {
+    pos = next_char(pos);
+  }
+  return pos;
+}
+
+
+/*
+ Count the number of characters between two positions.
+ */
+int fltk3::TextBuffer::count_displayed_characters(int lineStartPos,
+					       int targetPos) const
+{
+  IS_UTF8_ALIGNED2(this, (lineStartPos))
+  IS_UTF8_ALIGNED2(this, (targetPos))
+  
+  int charCount = 0;
+  
+  int pos = lineStartPos;
+  while (pos < targetPos) {
+    pos = next_char(pos);
+    charCount++;
+  }
+  return charCount;
+} 
+
+
+/*
+ Skip ahead a number of characters from a given index.
+ This function breaks early if it encounters a newline character.
+ */
+int fltk3::TextBuffer::skip_displayed_characters(int lineStartPos, int nChars)
+{
+  IS_UTF8_ALIGNED2(this, (lineStartPos))
+
+  int pos = lineStartPos;
+  
+  for (int charCount = 0; charCount < nChars && pos < mLength; charCount++) {
+    unsigned int c = char_at(pos);
+    if (c == '\n')
+      return pos;
+    pos = next_char(pos);
+  }
+  return pos;
+}
+
+
+/*
+ Count the number of newline characters between start and end.
+ startPos and endPos must be at a character boundary.
+ This function is optimized for speed by not using UTF-8 calls.
+ */
+int fltk3::TextBuffer::count_lines(int startPos, int endPos) const {
+  IS_UTF8_ALIGNED2(this, (startPos))
+  IS_UTF8_ALIGNED2(this, (endPos))
+  
+  int gapLen = mGapEnd - mGapStart;
+  int lineCount = 0;
+  
+  int pos = startPos;
+  while (pos < mGapStart)
+  {
+    if (pos == endPos)
+      return lineCount;
+    if (mBuf[pos++] == '\n')
+      lineCount++;
+  } 
+  while (pos < mLength) {
+    if (pos == endPos)
+      return lineCount;
+    if (mBuf[pos++ + gapLen] == '\n')
+      lineCount++;
+  }
+  return lineCount;
+}
+
+
+/*
+ Skip to the first character, n lines ahead.
+ StartPos must be at a character boundary.
+ This function is optimized for speed by not using UTF-8 calls.
+ */
+int fltk3::TextBuffer::skip_lines(int startPos, int nLines)
+{
+  IS_UTF8_ALIGNED2(this, (startPos))
+  
+  if (nLines == 0)
+    return startPos;
+  
+  int gapLen = mGapEnd - mGapStart;
+  int pos = startPos;
+  int lineCount = 0;
+  while (pos < mGapStart) {
+    if (mBuf[pos++] == '\n') {
+      lineCount++;
+      if (lineCount == nLines) {
+        IS_UTF8_ALIGNED2(this, (pos))
+	return pos;
+      }
+    }
+  }
+  while (pos < mLength) {
+    if (mBuf[pos++ + gapLen] == '\n') {
+      lineCount++;
+      if (lineCount >= nLines) {
+        IS_UTF8_ALIGNED2(this, (pos))
+	return pos;
+      }
+    }
+  }
+  IS_UTF8_ALIGNED2(this, (pos))
+  return pos;
+}
+
+
+/*
+ Skip to the first character, n lines back.
+ StartPos must be at a character boundary.
+ This function is optimized for speed by not using UTF-8 calls.
+ */
+int fltk3::TextBuffer::rewind_lines(int startPos, int nLines)
+{
+  IS_UTF8_ALIGNED2(this, (startPos))
+  
+  int pos = startPos - 1;
+  if (pos <= 0)
+    return 0;
+  
+  int gapLen = mGapEnd - mGapStart;
+  int lineCount = -1;
+  while (pos >= mGapStart) {
+    if (mBuf[pos + gapLen] == '\n') {
+      if (++lineCount >= nLines) {
+        IS_UTF8_ALIGNED2(this, (pos+1))
+	return pos + 1;
+      }
+    }
+    pos--;
+  }
+  while (pos >= 0) {
+    if (mBuf[pos] == '\n') {
+      if (++lineCount >= nLines) {
+        IS_UTF8_ALIGNED2(this, (pos+1))
+	return pos + 1;
+      }
+    }
+    pos--;
+  }
+  return 0;
+}
+
+
+/*
+ Find a matching string in the buffer.
+ */
+int fltk3::TextBuffer::search_forward(int startPos, const char *searchString,
+				   int *foundPos, int matchCase) const 
+{
+  IS_UTF8_ALIGNED2(this, (startPos))
+  IS_UTF8_ALIGNED(searchString)
+  
+  if (!searchString)
+    return 0;
+  int bp;
+  const char *sp;
+  if (matchCase) {
+    while (startPos < length()) {
+      bp = startPos;
+      sp = searchString;
+      for (;;) {
+        char c = *sp;
+        // we reached the end of the "needle", so we found the string!
+        if (!c) {
+          *foundPos = startPos;
+          return 1;
+        }
+        int l = fltk3::utf8len1(c);
+        if (memcmp(sp, address(bp), l))
+          break;
+        sp += l; bp += l;
+      }
+      startPos = next_char(startPos);
+    }
+  } else {
+    while (startPos < length()) {
+      bp = startPos;
+      sp = searchString;
+      for (;;) {
+        // we reached the end of the "needle", so we found the string!
+        if (!*sp) {
+          *foundPos = startPos;
+          return 1;
+        }
+        int l;
+        unsigned int b = char_at(bp);
+        unsigned int s = fltk3::utf8decode(sp, 0, &l);
+        if (fltk3::tolower(b)!=fltk3::tolower(s))
+          break;
+        sp += l; 
+        bp = next_char(bp);
+      }
+      startPos = next_char(startPos);
+    }
+  }  
+  return 0;
+}
+
+int fltk3::TextBuffer::search_backward(int startPos, const char *searchString,
+				    int *foundPos, int matchCase) const 
+{
+  IS_UTF8_ALIGNED2(this, (startPos))
+  IS_UTF8_ALIGNED(searchString)
+  
+  if (!searchString)
+    return 0;
+  int bp;
+  const char *sp;
+  if (matchCase) {
+    while (startPos >= 0) {
+      bp = startPos;
+      sp = searchString;
+      for (;;) {
+        char c = *sp;
+        // we reached the end of the "needle", so we found the string!
+        if (!c) {
+          *foundPos = startPos;
+          return 1;
+        }
+        int l = fltk3::utf8len1(c);
+        if (memcmp(sp, address(bp), l))
+          break;
+        sp += l; bp += l;
+      }
+      startPos = prev_char(startPos);
+    }
+  } else {
+    while (startPos >= 0) {
+      bp = startPos;
+      sp = searchString;
+      for (;;) {
+        // we reached the end of the "needle", so we found the string!
+        if (!*sp) {
+          *foundPos = startPos;
+          return 1;
+        }
+        int l;
+        unsigned int b = char_at(bp);
+        unsigned int s = fltk3::utf8decode(sp, 0, &l);
+        if (fltk3::tolower(b)!=fltk3::tolower(s))
+          break;
+        sp += l; 
+        bp = next_char(bp);
+      }
+      startPos = prev_char(startPos);
+    }
+  }  
+  return 0;
+}
+
+
+
+/*
+ Insert a string into the buffer.
+ Pos must be at a character boundary. Text must be a correct UTF-8 string.
+ */
+int fltk3::TextBuffer::insert_(int pos, const char *text)
+{
+  if (!text || !*text)
+    return 0;
+  
+  int insertedLength = strlen(text);
+  
+  /* Prepare the buffer to receive the new text.  If the new text fits in
+   the current buffer, just move the gap (if necessary) to where
+   the text should be inserted.  If the new text is too large, reallocate
+   the buffer with a gap large enough to accomodate the new text and a
+   gap of mPreferredGapSize */
+  if (insertedLength > mGapEnd - mGapStart)
+    reallocate_with_gap(pos, insertedLength + mPreferredGapSize);
+  else if (pos != mGapStart)
+    move_gap(pos);
+  
+  /* Insert the new text (pos now corresponds to the start of the gap) */
+  memcpy(&mBuf[pos], text, insertedLength);
+  mGapStart += insertedLength;
+  mLength += insertedLength;
+  update_selections(pos, 0, insertedLength);
+  
+  if (mCanUndo) {
+    if (undowidget == this && undoat == pos && undoinsert) {
+      undoinsert += insertedLength;
+    } else {
+      undoinsert = insertedLength;
+      undoyankcut = (undoat == pos) ? undocut : 0;
+    }
+    undoat = pos + insertedLength;
+    undocut = 0;
+    undowidget = this;
+  }
+  
+  return insertedLength;
+}
+
+
+/*
+ Remove a string from the buffer.
+ Unicode safe. Start and end must be at a character boundary.
+ */
+void fltk3::TextBuffer::remove_(int start, int end)
+{
+  /* if the gap is not contiguous to the area to remove, move it there */
+  
+  if (mCanUndo) {
+    if (undowidget == this && undoat == end && undocut) {
+      undobuffersize(undocut + end - start + 1);
+      memmove(undobuffer + end - start, undobuffer, undocut);
+      undocut += end - start;
+    } else {
+      undocut = end - start;
+      undobuffersize(undocut);
+    }
+    undoat = start;
+    undoinsert = 0;
+    undoyankcut = 0;
+    undowidget = this;
+  }
+  
+  if (start > mGapStart) {
+    if (mCanUndo)
+      memcpy(undobuffer, mBuf + (mGapEnd - mGapStart) + start,
+	     end - start);
+    move_gap(start);
+  } else if (end < mGapStart) {
+    if (mCanUndo)
+      memcpy(undobuffer, mBuf + start, end - start);
+    move_gap(end);
+  } else {
+    int prelen = mGapStart - start;
+    if (mCanUndo) {
+      memcpy(undobuffer, mBuf + start, prelen);
+      memcpy(undobuffer + prelen, mBuf + mGapEnd, end - start - prelen);
+    }
+  }
+  
+  /* expand the gap to encompass the deleted characters */
+  mGapEnd += end - mGapStart;
+  mGapStart -= mGapStart - start;
+  
+  /* update the length */
+  mLength -= end - start;
+  
+  /* fix up any selections which might be affected by the change */
+  update_selections(start, end - start, 0);
+}
+
+  
+/*
+ simple setter.
+ Unicode safe. Start and end must be at a character boundary.
+ */
+void fltk3::TextSelection::set(int startpos, int endpos)
+{
+  mSelected = startpos != endpos;
+  mStart = min(startpos, endpos);
+  mEnd = max(startpos, endpos);
+}
+
+
+/*
+ simple getter.
+ Unicode safe. Start and end will be at a character boundary.
+ */
+int fltk3::TextSelection::position(int *startpos, int *endpos) const {
+  if (!mSelected)
+    return 0;
+  *startpos = mStart;
+  *endpos = mEnd;
+  
+  return 1;
+} 
+
+
+/*
+ Return if a position is inside the selected area.
+ Unicode safe. Pos must be at a character boundary.
+ */
+int fltk3::TextSelection::includes(int pos) const {
+  return (selected() && pos >= start() && pos < end() );
+}
+
+
+/*
+ Return a duplicate of the selected text, or an empty string.
+ Unicode safe.
+ */
+char *fltk3::TextBuffer::selection_text_(fltk3::TextSelection * sel) const {
+  int start, end;
+  
+  /* If there's no selection, return an allocated empty string */
+  if (!sel->position(&start, &end))
+  {
+    char *s = (char *) malloc(1);
+    *s = '\0';
+    return s;
+  }
+  
+  /* Return the selected range */
+    return text_range(start, end);
+}
+
+
+/*
+ Remove the selected text.
+ Unicode safe.
+ */
+void fltk3::TextBuffer::remove_selection_(fltk3::TextSelection * sel)
+{
+  int start, end;
+  
+  if (!sel->position(&start, &end))
+    return;
+  remove(start, end);
+  //undoyankcut = undocut;
+}
+
+
+/*
+ Replace selection with text.
+ Unicode safe.
+ */
+void fltk3::TextBuffer::replace_selection_(fltk3::TextSelection * sel,
+					const char *text)
+{
+  fltk3::TextSelection oldSelection = *sel;
+  
+  /* If there's no selection, return */
+  int start, end;
+  if (!sel->position(&start, &end))
+    return;
+  
+  /* Do the appropriate type of replace */
+    replace(start, end, text);
+  
+  /* Unselect (happens automatically in BufReplace, but BufReplaceRect
+   can't detect when the contents of a selection goes away) */
+  sel->mSelected = 0;
+  redisplay_selection(&oldSelection, sel);
+}
+
+  
+/*
+ Call all callbacks.
+ Unicode safe.
+ */
+void fltk3::TextBuffer::call_modify_callbacks(int pos, int nDeleted,
+					   int nInserted, int nRestyled,
+					   const char *deletedText) const {
+  IS_UTF8_ALIGNED2(this, pos)
+  for (int i = 0; i < mNModifyProcs; i++)
+    (*mModifyProcs[i]) (pos, nInserted, nDeleted, nRestyled,
+			deletedText, mCbArgs[i]);
+} 
+
+
+/*
+ Call all callbacks.
+ Unicode safe.
+ */
+void fltk3::TextBuffer::call_predelete_callbacks(int pos, int nDeleted) const {
+  for (int i = 0; i < mNPredeleteProcs; i++)
+    (*mPredeleteProcs[i]) (pos, nDeleted, mPredeleteCbArgs[i]);
+} 
+
+
+/*
+ Redisplay a new selected area.
+ Unicode safe.
+ */
+void fltk3::TextBuffer::redisplay_selection(fltk3::TextSelection *
+					   oldSelection,
+					   fltk3::TextSelection *
+					   newSelection) const
+{
+  int oldStart, oldEnd, newStart, newEnd, ch1Start, ch1End, ch2Start,
+  ch2End;
+  
+  /* If either selection is rectangular, add an additional character to
+   the end of the selection to request the redraw routines to wipe out
+   the parts of the selection beyond the end of the line */
+  oldStart = oldSelection->mStart;
+  newStart = newSelection->mStart;
+  oldEnd = oldSelection->mEnd;
+  newEnd = newSelection->mEnd;
+  
+  /* If the old or new selection is unselected, just redisplay the
+   single area that is (was) selected and return */
+  if (!oldSelection->mSelected && !newSelection->mSelected)
+    return;
+  if (!oldSelection->mSelected)
+  {
+    call_modify_callbacks(newStart, 0, 0, newEnd - newStart, NULL);
+    return;
+  }
+  if (!newSelection->mSelected) {
+    call_modify_callbacks(oldStart, 0, 0, oldEnd - oldStart, NULL);
+    return;
+  }
+  
+  /* If the selections are non-contiguous, do two separate updates
+   and return */
+  if (oldEnd < newStart || newEnd < oldStart) {
+    call_modify_callbacks(oldStart, 0, 0, oldEnd - oldStart, NULL);
+    call_modify_callbacks(newStart, 0, 0, newEnd - newStart, NULL);
+    return;
+  }
+  
+  /* Otherwise, separate into 3 separate regions: ch1, and ch2 (the two
+   changed areas), and the unchanged area of their intersection,
+   and update only the changed area(s) */
+  ch1Start = min(oldStart, newStart);
+  ch2End = max(oldEnd, newEnd);
+  ch1End = max(oldStart, newStart);
+  ch2Start = min(oldEnd, newEnd);
+  if (ch1Start != ch1End)
+    call_modify_callbacks(ch1Start, 0, 0, ch1End - ch1Start, NULL);
+  if (ch2Start != ch2End)
+    call_modify_callbacks(ch2Start, 0, 0, ch2End - ch2Start, NULL);
+}
+
+
+/*
+ Move the gap around without changing buffer content.
+ Unicode safe. Pos must be at a character boundary.
+ */
+void fltk3::TextBuffer::move_gap(int pos)
+{
+  int gapLen = mGapEnd - mGapStart;
+  
+  if (pos > mGapStart)
+    memmove(&mBuf[mGapStart], &mBuf[mGapEnd], pos - mGapStart);
+  else
+    memmove(&mBuf[pos + gapLen], &mBuf[pos], mGapStart - pos);
+  mGapEnd += pos - mGapStart;
+  mGapStart += pos - mGapStart;
+}
+
+
+/*
+ Create a larger gap.
+ Unicode safe. Start must be at a character boundary.
+ */
+void fltk3::TextBuffer::reallocate_with_gap(int newGapStart, int newGapLen)
+{
+  char *newBuf = (char *) malloc(mLength + newGapLen);
+  int newGapEnd = newGapStart + newGapLen;
+  
+  if (newGapStart <= mGapStart) {
+    memcpy(newBuf, mBuf, newGapStart);
+    memcpy(&newBuf[newGapEnd], &mBuf[newGapStart],
+	   mGapStart - newGapStart);
+    memcpy(&newBuf[newGapEnd + mGapStart - newGapStart],
+	   &mBuf[mGapEnd], mLength - mGapStart);
+  } else {			/* newGapStart > mGapStart */
+    memcpy(newBuf, mBuf, mGapStart);
+    memcpy(&newBuf[mGapStart], &mBuf[mGapEnd], newGapStart - mGapStart);
+    memcpy(&newBuf[newGapEnd],
+	   &mBuf[mGapEnd + newGapStart - mGapStart],
+	   mLength - newGapStart);
+  }
+  free((void *) mBuf);
+  mBuf = newBuf;
+  mGapStart = newGapStart;
+  mGapEnd = newGapEnd;
+  }
+
+
+/*
+ Update selection range if characters were inserted.
+ Unicode safe. Pos must be at a character boundary.
+ */
+void fltk3::TextBuffer::update_selections(int pos, int nDeleted,
+				       int nInserted)
+{
+  mPrimary.update(pos, nDeleted, nInserted);
+  mSecondary.update(pos, nDeleted, nInserted);
+  mHighlight.update(pos, nDeleted, nInserted);
+}
+
+
+// unicode safe, assuming the arguments are on character boundaries
+void fltk3::TextSelection::update(int pos, int nDeleted, int nInserted)
+{
+  if (!mSelected || pos > mEnd)
+    return;
+  if (pos + nDeleted <= mStart) {
+    mStart += nInserted - nDeleted;
+    mEnd += nInserted - nDeleted;
+  } else if (pos <= mStart && pos + nDeleted >= mEnd) {
+    mStart = pos;
+    mEnd = pos;
+    mSelected = 0;
+  } else if (pos <= mStart && pos + nDeleted < mEnd) {
+    mStart = pos;
+    mEnd = nInserted + mEnd - nDeleted;
+  } else if (pos < mEnd) {
+    mEnd += nInserted - nDeleted;
+    if (mEnd <= mStart)
+      mSelected = 0;
+  }
+}
+
+
+/*
+ Find a UCS-4 character.
+ StartPos must be at a character boundary, searchChar is UCS-4 encoded.
+ */
+int fltk3::TextBuffer::findchar_forward(int startPos, unsigned searchChar,
+				     int *foundPos) const 
+{
+  if (startPos >= mLength) {
+    *foundPos = mLength;
+    return 0;
+  }
+  
+  if (startPos<0)
+    startPos = 0;
+  
+  for ( ; startPos<mLength; startPos = next_char(startPos)) {
+    if (searchChar == char_at(startPos)) {
+      *foundPos = startPos;
+      return 1;
+    }
+  }
+  
+  *foundPos = mLength;
+  return 0;
+}
+
+  
+/*
+ Find a UCS-4 character.
+ StartPos must be at a character boundary, searchChar is UCS-4 encoded.
+ */
+int fltk3::TextBuffer::findchar_backward(int startPos, unsigned int searchChar,
+				      int *foundPos) const {
+  if (startPos <= 0) {
+    *foundPos = 0;
+    return 0;
+  }
+  
+  if (startPos > mLength)
+    startPos = mLength;
+  
+  for (startPos = prev_char(startPos); startPos>=0; startPos = prev_char(startPos)) {
+    if (searchChar == char_at(startPos)) {
+      *foundPos = startPos;
+      return 1;
+    }
+  }
+  
+  *foundPos = 0;
+  return 0;
+}
+
+//#define EXAMPLE_ENCODING // shows how to process any encoding for which a decoding function exists
+#ifdef EXAMPLE_ENCODING 
+
+// returns the UCS equivalent of *p in CP1252 and advances p by 1
+unsigned cp1252toucs(char* &p)
+{
+  // Codes 0x80..0x9f from the Microsoft CP1252 character set, translated
+  // to Unicode
+  static unsigned cp1252[32] = {
+    0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
+    0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x017d, 0x008f,
+    0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+    0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x017e, 0x0178
+  };
+  unsigned char uc = *(unsigned char*)p;
+  p++;
+  return (uc < 0x80 || uc >= 0xa0 ? uc : cp1252[uc - 0x80]);
+}
+
+// returns the UCS equivalent of *p in UTF-16 and advances p by 2 (or more for surrogates)
+unsigned utf16toucs(char* &p)
+{
+  union {
+#if WORDS_BIGENDIAN
+    struct { unsigned char a, b;} chars;
+#else
+    struct { unsigned char b, a;} chars;
+#endif
+    U16 short_val;
+  } u;
+  u.chars.a = *(unsigned char*)p++;
+  u.chars.b = *(unsigned char*)p++;
+  return u.short_val;
+}
+
+// filter that produces, from an input stream fed by reading from fp,
+// a UTF-8-encoded output stream written in buffer.
+// Input can be any (e.g., 8-bit, UTF-16) encoding.
+// Output is true UTF-8.
+// p_trf points to a function that transforms encoded byte(s) into one UCS
+// and that increases the pointer by the adequate quantity
+static int general_input_filter(char *buffer, int buflen, 
+				 char *line, int sline, char* &endline, 
+				 unsigned (*p_trf)(char* &),
+				 FILE *fp)
+{
+  char *p, *q, multibyte[5];
+  int lq, r, offset;
+  p = endline = line;
+  q = buffer;
+  while (q < buffer + buflen) {
+    if (p >= endline) {
+      r = fread(line, 1, sline, fp);
+      endline = line + r; 
+      if (r == 0) return q - buffer;
+      p = line;
+    }
+    if (q + 4 /*max width of utf-8 char*/ > buffer + buflen) {
+      memmove(line, p, endline - p);
+      endline -= (p - line);
+      return q - buffer;
+    }
+    lq = fltk3::utf8encode( p_trf(p), multibyte );
+    memcpy(q, multibyte, lq);
+    q += lq; 
+  }
+  memmove(line, p, endline - p);
+  endline -= (p - line);
+  return q - buffer;
+}
+#endif // EXAMPLE_ENCODING
+
+/*
+ filter that produces, from an input stream fed by reading from fp,
+ a UTF-8-encoded output stream written in buffer.
+ Input can be UTF-8. If it is not, it is decoded with CP1252.
+ Output is UTF-8.
+ *input_was_changed is set to true if the input was not strict UTF-8 so output
+ differs from input.
+ */
+static int utf8_input_filter(char *buffer, int buflen, char *line, int sline, char* &endline, 
+	      FILE *fp, int *input_was_changed)
+{
+  char *p, *q, multibyte[5];
+  int l, lp, lq, r;
+  unsigned u;
+  p = endline = line;
+  q = buffer;
+  while (q < buffer + buflen) {
+    if (p >= endline) {
+      r = fread(line, 1, sline, fp);
+      endline = line + r; 
+      if (r == 0) return q - buffer;
+      p = line;
+    }
+    l = fltk3::utf8len1(*p);
+    if (p + l > endline) {
+      memmove(line, p, endline - p);
+      endline -= (p - line);
+      r = fread(endline, 1, sline - (endline - line), fp);
+      endline += r;
+      p = line;
+      if (endline - line < l) break;
+    }
+    while ( l > 0) {
+      u = fltk3::utf8decode(p, p+l, &lp);
+      lq = fltk3::utf8encode(u, multibyte);
+      if (lp != l || lq != l) *input_was_changed = true;
+      if (q + lq > buffer + buflen) {
+	memmove(line, p, endline - p);
+	endline -= (p - line);
+	return q - buffer;
+      }
+      memcpy(q, multibyte, lq);
+      q += lq; 
+      p += lp;
+      l -= lp;
+    }
+  }
+  memmove(line, p, endline - p);
+  endline -= (p - line);
+  return q - buffer;
+}
+
+const char *fltk3::TextBuffer::file_encoding_warning_message = 
+"Displayed text contains the UTF-8 transcoding\n"
+"of the input file which was not UTF-8 encoded.\n"
+"Some changes may have occurred.";
+
+/*
+ Insert text from a file.
+ Input file can be of various encodings according to what input fiter is used.
+ utf8_input_filter accepts UTF-8 or CP1252 as input encoding.
+ Output is always UTF-8.
+ */
+ int fltk3::TextBuffer::insertfile(const char *file, int pos, int buflen)
+{
+  FILE *fp;
+  if (!(fp = fltk3::fopen(file, "r")))
+    return 1;
+  char *buffer = new char[buflen + 1];  
+  char *endline, line[100];
+  int l;
+  input_file_was_transcoded = false;
+  endline = line;
+  while (true) {
+#ifdef EXAMPLE_ENCODING
+    // example of 16-bit encoding: UTF-16
+    l = general_input_filter(buffer, buflen, 
+				  line, sizeof(line), endline, 
+				  utf16toucs, // use cp1252toucs to read CP1252-encoded files
+				  fp);
+    input_file_was_transcoded = true;
+#else
+    l = utf8_input_filter(buffer, buflen, line, sizeof(line), endline, 
+			  fp, &input_file_was_transcoded);
+#endif
+    if (l == 0) break;
+    buffer[l] = 0;
+    insert(pos, buffer);
+    pos += l;
+    }
+  int e = ferror(fp) ? 2 : 0;
+  fclose(fp);
+  delete[]buffer;
+  if ( (!e) && input_file_was_transcoded && transcoding_warning_action) {
+    transcoding_warning_action(this);
+    }
+  return e;
+}
+
+
+/*
+ Write text to file.
+ Unicode safe.
+ */
+int fltk3::TextBuffer::outputfile(const char *file,
+			       int start, int end,
+			       int buflen) {
+  FILE *fp;
+  if (!(fp = fltk3::fopen(file, "w")))
+    return 1;
+  for (int n; (n = min(end - start, buflen)); start += n) {
+    const char *p = text_range(start, start + n);
+    int r = fwrite(p, 1, n, fp);
+    free((void *) p);
+    if (r != n)
+      break;
+  }
+  
+  int e = ferror(fp) ? 2 : 0;
+  fclose(fp);
+  return e;
+}
+
+
+/*
+ Return the previous character position.
+ Unicode safe.
+ */
+int fltk3::TextBuffer::prev_char_clipped(int pos) const
+{
+  if (pos<=0)
+    return 0;
+
+  IS_UTF8_ALIGNED2(this, (pos))  
+
+  char c;
+  do {
+    pos--;
+    if (pos==0)
+      return 0;
+    c = byte_at(pos);
+  } while ( (c&0xc0) == 0x80);
+  
+  IS_UTF8_ALIGNED2(this, (pos))  
+  return pos;
+}
+
+
+/*
+ Return the previous character position.
+ Returns -1 if the beginning of the buffer is reached.
+ */
+int fltk3::TextBuffer::prev_char(int pos) const
+{
+  if (pos==0) return -1;
+  return prev_char_clipped(pos);
+}
+
+
+/*
+ Return the next character position.
+ Returns length() if the end of the buffer is reached.
+ */
+int fltk3::TextBuffer::next_char(int pos) const
+{
+  IS_UTF8_ALIGNED2(this, (pos))  
+  int n = fltk3::utf8len1(byte_at(pos));
+  pos += n;
+  if (pos>=mLength)
+    return mLength;
+  IS_UTF8_ALIGNED2(this, (pos))  
+  return pos;
+}
+
+
+/*
+ Return the next character position.
+ If the end of the buffer is reached, it returns the current position.
+ */
+int fltk3::TextBuffer::next_char_clipped(int pos) const
+{
+  return next_char(pos);
+}
+
+/*
+ Align an index to the current UTF-8 boundary.
+ */
+int fltk3::TextBuffer::utf8_align(int pos) const 
+{
+  char c = byte_at(pos);
+  while ( (c&0xc0) == 0x80) {
+    pos--;
+    c = byte_at(pos);
+  }
+  return pos;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Text_Buffer.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Text_Display.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Text_Display.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Text_Display.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,3797 @@
+//
+// "$Id$"
+//
+// Copyright 2001-2010 by Bill Spitzak and others.
+// Original code Copyright Mark Edel.  Permission to distribute under
+// the LGPL for the FLTK library granted by Mark Edel.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// TODO: rendering of the "optional hyphen"
+// TODO: make line numbering work again
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <limits.h>
+#include <ctype.h>
+#include <fltk3/run.h>
+#include <fltk3/TextBuffer.h>
+#include <fltk3/TextDisplay.h>
+#include <fltk3/Window.h>
+#include <fltk3/Printer.h>
+
+#undef min
+#undef max
+
+// Text area margins.  Left & right margins should be at least 3 so that
+// there is some room for the overhanging parts of the cursor!
+#define TOP_MARGIN 1
+#define BOTTOM_MARGIN 1
+#define LEFT_MARGIN 3
+#define RIGHT_MARGIN 3
+
+#define NO_HINT -1
+
+/* Masks for text drawing methods.  These are or'd together to form an
+ integer which describes what drawing calls to use to draw a string */
+#define FILL_MASK         0x0100
+#define SECONDARY_MASK    0x0200
+#define PRIMARY_MASK      0x0400
+#define HIGHLIGHT_MASK    0x0800
+#define BG_ONLY_MASK      0x1000
+#define TEXT_ONLY_MASK    0x2000
+#define STYLE_LOOKUP_MASK   0xff
+
+/* Maximum displayable line length (how many characters will fit across the
+ widest window).  This amount of memory is temporarily allocated from the
+ stack in the draw_vline() method for drawing strings */
+#define MAX_DISP_LINE_LEN 1000
+
+static int max( int i1, int i2 );
+static int min( int i1, int i2 );
+static int countlines( const char *string );
+
+/* The variables below are used in a timer event to allow smooth
+ scrolling of the text area when the pointer has left the area. */
+static int scroll_direction = 0;
+static int scroll_amount = 0;
+static int scroll_y = 0;
+static int scroll_x = 0;
+
+// CET - FIXME
+#define TMPFONTWIDTH 6
+
+
+
+/**  
+ \brief Creates a new text display widget.
+ 
+ \param X, Y, W, H position and size of widget
+ \param l label text, defaults to none
+ */
+fltk3::TextDisplay::TextDisplay(int X, int Y, int W, int H, const char* l)
+: fltk3::Group(X, Y, W, H, l) {
+  int i;
+  
+  mMaxsize = 0;
+  damage_range1_start = damage_range1_end = -1;
+  damage_range2_start = damage_range2_end = -1;
+  dragPos = dragging = 0;
+  dragType = DRAG_CHAR;
+  display_insert_position_hint = 0;
+  shortcut_ = 0;
+  
+  color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
+  box(fltk3::DOWN_FRAME);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
+  textfont(fltk3::HELVETICA);
+  set_flag(SHORTCUT_LABEL);
+  
+  text_area.x = 0;
+  text_area.y = 0;
+  text_area.w = 0;
+  text_area.h = 0;
+  
+  mVScrollBar = new fltk3::Scrollbar(0,0,1,1);
+  mVScrollBar->callback((fltk3::Callback*)v_scrollbar_cb, this);
+  mHScrollBar = new fltk3::Scrollbar(0,0,1,1);
+  mHScrollBar->callback((fltk3::Callback*)h_scrollbar_cb, this);
+  mHScrollBar->type(fltk3::HORIZONTAL);
+  
+  end();
+  
+  scrollbar_width(fltk3::scrollbar_size());
+  scrollbar_align(fltk3::ALIGN_BOTTOM_RIGHT);
+  
+  mCursorOn = 0;
+  mCursorPos = 0;
+  mCursorOldY = -100;
+  mCursorToHint = NO_HINT;
+  mCursorStyle = NORMAL_CURSOR;
+  mCursorPreferredXPos = -1;
+  mBuffer = 0;
+  mFirstChar = 0;
+  mLastChar = 0;
+  mNBufferLines = 0;
+  mTopLineNum = mTopLineNumHint = 1;
+  mAbsTopLineNum = 1;
+  mNeedAbsTopLineNum = 0;
+  mHorizOffset = mHorizOffsetHint = 0;
+  
+  mCursor_color = fltk3::FOREGROUND_COLOR;
+  
+  mStyleBuffer = 0;
+  mStyleTable = 0;
+  mNStyles = 0;
+  mNVisibleLines = 1;
+  mLineStarts = new int[mNVisibleLines];
+  mLineStarts[0] = 0;
+  for (i=1; i<mNVisibleLines; i++)
+    mLineStarts[i] = -1;
+  mSuppressResync = 0;
+  mNLinesDeleted = 0;
+  mModifyingTabDistance = 0;
+  
+  mUnfinishedStyle = 0;
+  mUnfinishedHighlightCB = 0;
+  mHighlightCBArg = 0;
+  
+  mLineNumLeft = mLineNumWidth = 0;
+  mContinuousWrap = 0;
+  mWrapMarginPix = 0;
+  mSuppressResync = mNLinesDeleted = mModifyingTabDistance = 0;
+}
+
+
+
+/**
+ Free a text display and release its associated memory.
+ 
+ Note, the text BUFFER that the text display displays is a separate
+ entity and is not freed, nor are the style buffer or style table.
+ */
+fltk3::TextDisplay::~TextDisplay() {
+  if (scroll_direction) {
+    fltk3::remove_timeout(scroll_timer_cb, this);
+    scroll_direction = 0;
+  }
+  if (mBuffer) {
+    mBuffer->remove_modify_callback(buffer_modified_cb, this);
+    mBuffer->remove_predelete_callback(buffer_predelete_cb, this);
+  }
+  if (mLineStarts) delete[] mLineStarts;
+}
+
+
+
+/**  
+ Attach a text buffer to display, replacing the current buffer (if any)
+ \param buf attach this text buffer
+ */
+void fltk3::TextDisplay::buffer( fltk3::TextBuffer *buf ) {
+  /* If the text display is already displaying a buffer, clear it off
+   of the display and remove our callback from it */
+  if ( buf == mBuffer) return;
+  if ( mBuffer != 0 ) {
+    // we must provide a copy of the buffer that we are deleting!
+    char *deletedText = mBuffer->text();
+    buffer_modified_cb( 0, 0, mBuffer->length(), 0, deletedText, this );
+    free(deletedText);
+    mNBufferLines = 0;
+    mBuffer->remove_modify_callback( buffer_modified_cb, this );
+    mBuffer->remove_predelete_callback( buffer_predelete_cb, this );
+  }
+  
+  /* Add the buffer to the display, and attach a callback to the buffer for
+   receiving modification information when the buffer contents change */
+  mBuffer = buf;
+  if (mBuffer) {
+    mBuffer->add_modify_callback( buffer_modified_cb, this );
+    mBuffer->add_predelete_callback( buffer_predelete_cb, this );
+    
+    /* Update the display */
+    buffer_modified_cb( 0, buf->length(), 0, 0, 0, this );
+  }
+  
+  /* Resize the widget to update the screen... */
+  resize(x(), y(), w(), h());
+}
+
+
+
+/**   
+ \brief Attach (or remove) highlight information in text display and redisplay.
+ 
+ Highlighting information consists of a style buffer which parallels the
+ normal text buffer, but codes font and color information for the display;
+ a style table which translates style buffer codes (indexed by buffer
+ character - 'A') into fonts and colors; and a callback mechanism for
+ as-needed highlighting, triggered by a style buffer entry of
+ "unfinishedStyle".  Style buffer can trigger additional redisplay during
+ a normal buffer modification if the buffer contains a primary fltk3::TextSelection
+ (see extendRangeForStyleMods for more information on this protocol).
+ 
+ Style buffers, tables and their associated memory are managed by the caller.
+ 
+ Styles are ranged from 65 ('A') to 126.
+ 
+ \param styleBuffer this buffer works in parallel to the text buffer. For every
+   character in the text buffer, the stye buffer has a byte at the same offset 
+   that contains an index into an array of possible styles. 
+ \param styleTable a list of styles indexed by the style buffer
+ \param nStyles number of styles in the style table
+ \param unfinishedStyle if this style is found, the callback below is called
+ \param unfinishedHighlightCB if a character with an unfinished style is found,
+   this callback will be called
+ \param cbArg and optional argument for the callback above, usually a pointer
+   to the Text Display.
+ */
+void fltk3::TextDisplay::highlight_data(fltk3::TextBuffer *styleBuffer,
+                                     const StyleTableEntry *styleTable,
+                                     int nStyles, char unfinishedStyle,
+                                     UnfinishedStyleCb unfinishedHighlightCB,
+                                     void *cbArg ) {
+  mStyleBuffer = styleBuffer;
+  mStyleTable = styleTable;
+  mNStyles = nStyles;
+  mUnfinishedStyle = unfinishedStyle;
+  mUnfinishedHighlightCB = unfinishedHighlightCB;
+  mHighlightCBArg = cbArg;
+  mColumnScale = 0;
+  
+  mStyleBuffer->canUndo(0);
+  damage(fltk3::DAMAGE_EXPOSE);
+}
+
+
+
+/**
+ \brief Find the longest line of all visible lines.
+ \return the width of the longest visible line in pixels
+ */
+int fltk3::TextDisplay::longest_vline() const {
+  int longest = 0;
+  for (int i = 0; i < mNVisibleLines; i++)
+    longest = max(longest, measure_vline(i));
+  return longest;
+}
+
+
+
+/**
+ \brief Change the size of the displayed text area.
+ Calling this function will trigger a recalculation of all lines visible and
+ of all scrollbar sizes.
+ \param X, Y, W, H new position and size of this widget
+ */
+void fltk3::TextDisplay::resize(int X, int Y, int W, int H) {
+#ifdef DEBUG
+  printf("fltk3::TextDisplay::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H);
+#endif // DEBUG
+  const int oldWidth = w();
+#ifdef DEBUG
+  printf("    oldWidth=%d, mContinuousWrap=%d, mWrapMargin=%d\n", oldWidth, mContinuousWrap, mWrapMargin);
+#endif // DEBUG
+  Widget::resize(X,Y,W,H);
+  if (!buffer()) return;
+  X += fltk3::box_dx(box());
+  Y += fltk3::box_dy(box());
+  W -= fltk3::box_dw(box());
+  H -= fltk3::box_dh(box());
+  
+  text_area.x = X+LEFT_MARGIN;
+  text_area.y = Y+TOP_MARGIN;
+  text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN;
+  text_area.h = H-TOP_MARGIN-BOTTOM_MARGIN;
+  int i;
+  
+  /* Find the new maximum font height for this text display */
+  for (i = 0, mMaxsize = fltk3::height(textfont(), textsize()); i < mNStyles; i++)
+    mMaxsize = max(mMaxsize, fltk3::height(mStyleTable[i].font, mStyleTable[i].size));
+  
+  // did we have scrollbars initially?
+  unsigned int hscrollbarvisible = mHScrollBar->visible();
+  unsigned int vscrollbarvisible = mVScrollBar->visible();
+  
+  // try without scrollbars first
+  mVScrollBar->clear_visible();
+  mHScrollBar->clear_visible();
+  
+  for (int again = 1; again;) {
+    again = 0;
+    /* In continuous wrap mode, a change in width affects the total number of
+     lines in the buffer, and can leave the top line number incorrect, and
+     the top character no longer pointing at a valid line start */
+    if (mContinuousWrap && !mWrapMarginPix && W!=oldWidth) {
+      int oldFirstChar = mFirstChar;
+      mNBufferLines = count_lines(0, buffer()->length(), true);
+      mFirstChar = line_start(mFirstChar);
+      mTopLineNum = count_lines(0, mFirstChar, true)+1;
+      absolute_top_line_number(oldFirstChar);      
+#ifdef DEBUG
+      printf("    mNBufferLines=%d\n", mNBufferLines);
+#endif // DEBUG
+    }
+    
+    /* reallocate and update the line starts array, which may have changed
+     size and / or contents.  */
+    int nvlines = (text_area.h + mMaxsize - 1) / mMaxsize;
+    if (nvlines < 1) nvlines = 1;
+    if (mNVisibleLines != nvlines) {
+      mNVisibleLines = nvlines;
+      if (mLineStarts) delete[] mLineStarts;
+      mLineStarts = new int [mNVisibleLines];
+    }
+    
+    calc_line_starts(0, mNVisibleLines);
+    calc_last_char();
+    
+    // figure the scrollbars
+    if (scrollbar_width()) {
+      /* Decide if the vertical scrollbar needs to be visible */
+      if (scrollbar_align() & (fltk3::ALIGN_LEFT|fltk3::ALIGN_RIGHT) &&
+          mNBufferLines >= mNVisibleLines - 1)
+      {
+        mVScrollBar->set_visible();
+        if (scrollbar_align() & fltk3::ALIGN_LEFT) {
+          text_area.x = X+scrollbar_width()+LEFT_MARGIN;
+          text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN;
+          mVScrollBar->resize(X, text_area.y-TOP_MARGIN, scrollbar_width(),
+                              text_area.h+TOP_MARGIN+BOTTOM_MARGIN);
+        } else {
+          text_area.x = X+LEFT_MARGIN;
+          text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN;
+          mVScrollBar->resize(X+W-scrollbar_width(), text_area.y-TOP_MARGIN,
+                              scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN);
+        }
+      }
+      
+      /*
+       Decide if the horizontal scrollbar needs to be visible.  If there
+       is a vertical scrollbar, a horizontal is always created too.  This
+       is because the alternatives are unattractive:
+       * Dynamically creating a horizontal scrollbar based on the currently
+       visible lines is what the original nedit does, but it always wastes
+       space for the scrollbar even when it's not used.  Since the FLTK
+       widget dynamically allocates the space for the scrollbar and
+       rearranges the widget to make room for it, this would create a very
+       visually displeasing "bounce" effect when the vertical scrollbar is
+       dragged.  Trust me, I tried it and it looks really bad.
+       * The other alternative would be to keep track of what the longest
+       line in the entire buffer is and base the scrollbar on that.  I
+       didn't do this because I didn't see any easy way to do that using
+       the nedit code and this could involve a lengthy calculation for
+       large buffers.  If an efficient and non-costly way of doing this
+       can be found, this might be a way to go.
+       */
+      /* WAS: Suggestion: Try turning the horizontal scrollbar on when
+       you first see a line that is too wide in the window, but then
+       don't turn it off (ie mix both of your solutions). */
+      if (scrollbar_align() & (fltk3::ALIGN_TOP|fltk3::ALIGN_BOTTOM) &&
+          (mVScrollBar->visible() || longest_vline() > text_area.w))
+      {
+        if (!mHScrollBar->visible()) {
+          mHScrollBar->set_visible();
+          again = 1; // loop again to see if we now need vert. & recalc sizes
+        }
+        if (scrollbar_align() & fltk3::ALIGN_TOP) {
+          text_area.y = Y + scrollbar_width()+TOP_MARGIN;
+          text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN;
+          mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y,
+                              text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width());
+        } else {
+          text_area.y = Y+TOP_MARGIN;
+          text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN;
+          mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y+H-scrollbar_width(),
+                              text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width());
+        }
+      }
+    }
+  }
+  
+  // user request to change viewport
+  if (mTopLineNumHint != mTopLineNum || mHorizOffsetHint != mHorizOffset)
+    scroll_(mTopLineNumHint, mHorizOffsetHint);
+  
+  // everything will fit in the viewport
+  if (mNBufferLines < mNVisibleLines || mBuffer == NULL || mBuffer->length() == 0) {
+    scroll_(1, mHorizOffset);
+  /* if empty lines become visible, there may be an opportunity to
+   display more text by scrolling down */
+  } else {
+    while (   mNVisibleLines>=2
+           && (mLineStarts[mNVisibleLines-2]==-1) 
+           && scroll_(mTopLineNum-1, mHorizOffset))
+    { }
+  }
+  
+  // user request to display insert position
+  if (display_insert_position_hint)
+    display_insert();
+  
+  // in case horizontal offset is now greater than longest line
+  int maxhoffset = max(0, longest_vline()-text_area.w);
+  if (mHorizOffset > maxhoffset)
+    scroll_(mTopLineNumHint, maxhoffset);
+  
+  mTopLineNumHint = mTopLineNum;
+  mHorizOffsetHint = mHorizOffset;
+  display_insert_position_hint = 0;
+  
+  if (mContinuousWrap ||
+      hscrollbarvisible != mHScrollBar->visible() ||
+      vscrollbarvisible != mVScrollBar->visible())
+    redraw();
+  
+  update_v_scrollbar();
+  update_h_scrollbar();
+}
+
+
+
+/**
+ \brief Refresh a rectangle of the text display.  
+ \param left, top are in coordinates of the text drawing window.
+ \param width, height size in pixels 
+ */
+void fltk3::TextDisplay::draw_text( int left, int top, int width, int height ) {
+  int fontHeight, firstLine, lastLine, line;
+  
+  /* find the line number range of the display */
+  fontHeight = mMaxsize ? mMaxsize : textsize();
+  firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight;
+  lastLine = ( top + height - text_area.y ) / fontHeight + 1;
+  
+  fltk3::push_clip( left, top, width, height );
+  
+  /* draw the lines */
+  for ( line = firstLine; line <= lastLine; line++ )
+    draw_vline( line, left, left + width, 0, INT_MAX );
+  
+  /* draw the line numbers if exposed area includes them */
+  if (mLineNumWidth != 0 && left <= mLineNumLeft + mLineNumWidth)
+    draw_line_numbers(false);
+  
+  fltk3::pop_clip();
+}
+
+
+
+/**  
+ \brief Marks text from start to end as needing a redraw.
+ This function will trigger a damage event and later a redraw of parts of 
+ the widget.
+ \param startpos index of first character needing redraw
+ \param endpos index after last character needing redraw
+ */
+void fltk3::TextDisplay::redisplay_range(int startpos, int endpos) {
+  IS_UTF8_ALIGNED2(buffer(), startpos)
+  IS_UTF8_ALIGNED2(buffer(), endpos)
+  
+  if (damage_range1_start == -1 && damage_range1_end == -1) {
+    damage_range1_start = startpos;
+    damage_range1_end = endpos;
+  } else if ((startpos >= damage_range1_start && startpos <= damage_range1_end) ||
+             (endpos >= damage_range1_start && endpos <= damage_range1_end)) {
+    damage_range1_start = min(damage_range1_start, startpos);
+    damage_range1_end = max(damage_range1_end, endpos);
+  } else if (damage_range2_start == -1 && damage_range2_end == -1) {
+    damage_range2_start = startpos;
+    damage_range2_end = endpos;
+  } else {
+    damage_range2_start = min(damage_range2_start, startpos);
+    damage_range2_end = max(damage_range2_end, endpos);
+  }
+  damage(fltk3::DAMAGE_SCROLL);
+}
+
+
+
+/**
+ \brief Draw a range of text.
+
+ Refresh all of the text between buffer positions \p startpos and
+ \p endpos not including the character at the position \p endpos.
+
+ If \p endpos points beyond the end of the buffer, refresh the whole display
+ after \p startpos, including blank lines which are not technically part of
+ any range of characters.
+
+ \param startpos index of first character to draw
+ \param endpos index after last character to draw
+ */
+void fltk3::TextDisplay::draw_range(int startpos, int endpos) {
+  startpos = buffer()->utf8_align(startpos);
+  endpos = buffer()->utf8_align(endpos);
+  
+  int i, startLine, lastLine, startIndex, endIndex;
+  
+  /* If the range is outside of the displayed text, just return */
+  if ( endpos < mFirstChar || ( startpos > mLastChar && !empty_vlines() ) ) 
+    return;
+  
+  /* Clean up the starting and ending values */
+  if ( startpos < 0 ) startpos = 0;
+  if ( startpos > mBuffer->length() ) startpos = mBuffer->length();
+  if ( endpos < 0 ) endpos = 0;
+  if ( endpos > mBuffer->length() ) endpos = mBuffer->length();
+  
+  /* Get the starting and ending lines */
+  if ( startpos < mFirstChar )
+    startpos = mFirstChar;
+  if ( !position_to_line( startpos, &startLine ) )
+    startLine = mNVisibleLines - 1;
+  if ( endpos >= mLastChar ) {
+    lastLine = mNVisibleLines - 1;
+  } else {
+    if ( !position_to_line( endpos, &lastLine ) ) {
+      /* shouldn't happen */
+      lastLine = mNVisibleLines - 1;
+    }
+  }
+  
+  /* Get the starting and ending positions within the lines */
+  startIndex = mLineStarts[ startLine ] == -1 ? 0 : startpos - mLineStarts[ startLine ];
+  if ( endpos >= mLastChar )
+    endIndex = INT_MAX;
+  else if ( mLineStarts[ lastLine ] == -1 )
+    endIndex = 0;
+  else
+    endIndex = endpos - mLineStarts[ lastLine ];
+  
+  /* If the starting and ending lines are the same, redisplay the single
+   line between "start" and "end" */
+  if ( startLine == lastLine ) {
+    draw_vline( startLine, 0, INT_MAX, startIndex, endIndex );
+    return;
+  }
+
+  /* Redisplay the first line from "start" */
+  draw_vline( startLine, 0, INT_MAX, startIndex, INT_MAX );
+
+  /* Redisplay the lines in between at their full width */
+  for ( i = startLine + 1; i < lastLine; i++ )
+    draw_vline( i, 0, INT_MAX, 0, INT_MAX );
+
+  /* Redisplay the last line to "end" */
+  draw_vline( lastLine, 0, INT_MAX, 0, endIndex );
+}
+
+
+
+/** 
+ \brief Sets the position of the text insertion cursor for text display.
+ Move the insertion cursor in front of the character at \p newPos.
+ This function may trigger a redraw.
+ \param newPos new caret position
+ */
+void fltk3::TextDisplay::insert_position( int newPos ) {
+  IS_UTF8_ALIGNED2(buffer(), newPos)
+  
+  /* make sure new position is ok, do nothing if it hasn't changed */
+  if ( newPos == mCursorPos ) return;
+  if ( newPos < 0 ) newPos = 0;
+  if ( newPos > mBuffer->length() ) newPos = mBuffer->length();
+  
+  /* cursor movement cancels vertical cursor motion column */
+  mCursorPreferredXPos = -1;
+  
+  /* erase the cursor at its previous position */
+  redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos));
+  
+  mCursorPos = newPos;
+  
+  /* draw cursor at its new position */
+  redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos));
+}
+
+
+
+/** 
+ \brief Shows the text cursor.
+ This function may trigger a redraw.
+ \param b show(1) or hide(0) the text cursor (caret).
+ */
+void fltk3::TextDisplay::show_cursor(int b) {
+  mCursorOn = b;
+  redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos));
+}
+
+
+
+/**
+ \brief Sets the text cursor style.
+ Sets the text cursor style to one of the following:
+ 
+ \li fltk3::TextDisplay::NORMAL_CURSOR - Shows an I beam.
+ \li fltk3::TextDisplay::CARET_CURSOR - Shows a caret under the text.
+ \li fltk3::TextDisplay::DIM_CURSOR - Shows a dimmed I beam.
+ \li fltk3::TextDisplay::BLOCK_CURSOR - Shows an unfilled box around the current
+      character.
+ \li fltk3::TextDisplay::HEAVY_CURSOR - Shows a thick I beam.
+ 
+ This call also switches the cursor on and may trigger a redraw.
+ 
+ \param style new cursor style
+ */
+void fltk3::TextDisplay::cursor_style(int style) {
+  mCursorStyle = style;
+  if (mCursorOn) show_cursor();
+}
+
+
+
+/**
+ \brief Set the new text wrap mode.
+ 
+ If \p wrap mode is not zero, this call enables automatic word wrapping at column
+ \p wrapMargin. Word-wrapping does not change the text buffer itself, only the way
+ the text is displayed. Different Text Displays can have different wrap modes,
+ even if they share the same Text Buffer.
+
+ \param wrap new wrap mode is WRAP_NONE (don't wrap text at all), WRAP_AT_COLUMN
+      (wrap text at the given text column), WRAP_AT_PIXEL (wrap text at a pixel 
+      position), or WRAP_AT_BOUNDS (wrap text so that it fits into the 
+      widget width)
+ \param wrapMargin in WRAP_AT_COLUMN mode, text will wrap at the n'th character.
+      For variable width fonts, an average character width is calculated. The
+      column width is calculated using the current textfont or the first style
+      when this function is called. If the font size changes, this function
+      must be called again. In WRAP_AT_PIXEL mode, this is the pixel position.
+ \todo we need new wrap modes to wrap at the window edge and based on pixel width
+   or average character width.
+ */
+void fltk3::TextDisplay::wrap_mode(int wrap, int wrapMargin) {
+  switch (wrap) {
+    case WRAP_NONE: 
+      mWrapMarginPix = 0;
+      mContinuousWrap = 0;
+      break;
+    case WRAP_AT_COLUMN: 
+    default:
+      mWrapMarginPix = int(col_to_x(wrapMargin));
+      mContinuousWrap = 1;
+      break;
+    case WRAP_AT_PIXEL: 
+      mWrapMarginPix = wrapMargin;
+      mContinuousWrap = 1;
+      break;
+    case WRAP_AT_BOUNDS: 
+      mWrapMarginPix = 0;
+      mContinuousWrap = 1;
+      break;
+  }
+  
+  if (buffer()) {
+    /* wrapping can change the total number of lines, re-count */
+    mNBufferLines = count_lines(0, buffer()->length(), true);
+    
+    /* changing wrap margins or changing from wrapped mode to non-wrapped
+     can leave the character at the top no longer at a line start, and/or
+     change the line number */
+    mFirstChar = line_start(mFirstChar);
+    mTopLineNum = count_lines(0, mFirstChar, true) + 1;
+    
+    reset_absolute_top_line_number();
+    
+    /* update the line starts array */
+    calc_line_starts(0, mNVisibleLines);
+    calc_last_char();
+  } else {
+    // No buffer, so just clear the state info for later...
+    mNBufferLines  = 0;
+    mFirstChar     = 0;
+    mTopLineNum    = 1;
+    mAbsTopLineNum = 0;
+  }
+  
+  resize(x(), y(), w(), h());
+}
+
+
+
+/**
+ \brief Inserts "text" at the current cursor location.  
+ 
+ This has the same effect as inserting the text into the buffer using BufInsert 
+ and then moving the insert position after the newly inserted text, except
+ that it's optimized to do less redrawing.
+ 
+ \param text new text in UTF-8 encoding.
+ */
+void fltk3::TextDisplay::insert(const char* text) {
+  IS_UTF8_ALIGNED2(buffer(), mCursorPos)
+  IS_UTF8_ALIGNED(text)
+  
+  int pos = mCursorPos;
+  
+  mCursorToHint = pos + strlen( text );
+  mBuffer->insert( pos, text );
+  mCursorToHint = NO_HINT;
+}
+
+
+
+/**  
+ \brief Replaces text at the current insert position.
+ \param text new text in UTF-8 encoding
+ 
+ \todo Unicode? Find out exactly what we do here and simplify.
+ */
+void fltk3::TextDisplay::overstrike(const char* text) {
+  IS_UTF8_ALIGNED2(buffer(), mCursorPos)
+  IS_UTF8_ALIGNED(text)
+  
+  int startPos = mCursorPos;
+  fltk3::TextBuffer *buf = mBuffer;
+  int lineStart = buf->line_start( startPos );
+  int textLen = strlen( text );
+  int i, p, endPos, indent, startIndent, endIndent;
+  const char *c;
+  unsigned int ch;
+  char *paddedText = NULL;
+  
+  /* determine how many displayed character positions are covered */
+  startIndent = mBuffer->count_displayed_characters( lineStart, startPos );
+  indent = startIndent;
+  for ( c = text; *c != '\0'; c += fltk3::utf8len1(*c) )
+    indent++;
+  endIndent = indent;
+  
+  /* find which characters to remove, and if necessary generate additional
+   padding to make up for removed control characters at the end */
+  indent = startIndent;
+  for ( p = startPos; ; p=buffer()->next_char(p) ) {
+    if ( p == buf->length() )
+      break;
+    ch = buf->char_at( p );
+    if ( ch == '\n' )
+      break;
+    indent++;
+    if ( indent == endIndent ) {
+      p++;
+      break;
+    } else if ( indent > endIndent ) {
+      if ( ch != '\t' ) {
+        p++;
+        paddedText = new char [ textLen + 20 + 1 ];
+        strcpy( paddedText, text );
+        for ( i = 0; i < indent - endIndent; i++ )
+          paddedText[ textLen + i ] = ' ';
+        paddedText[ textLen + i ] = '\0';
+      }
+      break;
+    }
+  }
+  endPos = p;
+  
+  mCursorToHint = startPos + textLen;
+  buf->replace( startPos, endPos, paddedText == NULL ? text : paddedText );
+  mCursorToHint = NO_HINT;
+  if ( paddedText != NULL )
+    delete [] paddedText;
+}
+
+
+
+/**
+ \brief Convert a character index into a pixel position.
+ 
+ Translate a buffer text position to the XY location where the top left of the 
+ cursor would be positioned to point to that character. Returns 0 if the 
+ position is not displayed because it is \e \b vertically out of view.
+ If the position is horizontally out of view, returns the X coordinate where
+ the position would be if it were visible.
+
+ \param pos character index
+ \param[out] X, Y pixel position of character on screen
+ \return 0 if character vertically out of view, X position otherwise
+ */
+int fltk3::TextDisplay::position_to_xy( int pos, int* X, int* Y ) const {
+  IS_UTF8_ALIGNED2(buffer(), pos)
+
+  int lineStartPos, fontHeight, lineLen;
+  int visLineNum;
+  
+  /* If position is not displayed, return false */
+  if (pos < mFirstChar || (pos > mLastChar && !empty_vlines())) {
+    return 0;
+  }
+  
+  /* Calculate Y coordinate */
+  if (!position_to_line(pos, &visLineNum)) {
+    return 0;
+  }
+  if (visLineNum < 0 || visLineNum > mNBufferLines) {
+    return 0;
+  }
+  
+  fontHeight = mMaxsize;
+  *Y = text_area.y + visLineNum * fontHeight;
+  
+  /* Get the text, length, and buffer position of the line. If the position
+   is beyond the end of the buffer and should be at the first position on
+   the first empty line, don't try to get or scan the text  */
+  lineStartPos = mLineStarts[visLineNum];
+  if ( lineStartPos == -1 ) {
+    *X = text_area.x - mHorizOffset;
+    return 1;
+  }
+  lineLen = vline_length( visLineNum );
+  *X = text_area.x + handle_vline(GET_WIDTH, lineStartPos, pos-lineStartPos, 0, 0, 0, 0, 0, 0) - mHorizOffset;
+  return 1;
+}
+
+
+
+/**
+ \brief Find the line and column number of position \p pos.  
+
+ This only works for displayed lines. If the line is not displayed, the 
+ function returns 0 (without the mLineStarts array it could turn in to very long
+ calculation involving scanning large amounts of text in the buffer).
+ If continuous wrap mode is on, returns the absolute line number (as opposed
+ to the wrapped line number which is used for scrolling).
+ 
+ \param pos character index
+ \param[out] lineNum absolute (unwrapped) line number
+ \param[out] column character offset to the beginning of the line
+ \return 0 if \p pos is off screen, line number otherwise
+ \todo a column number makes little sense in the UTF-8/variable font width 
+    environment. We will have to further define what exactly we want to return. 
+    Please check the functions that call this particular function.
+ */
+int fltk3::TextDisplay::position_to_linecol( int pos, int* lineNum, int* column ) const {
+  IS_UTF8_ALIGNED2(buffer(), pos)
+  
+  int retVal;
+  
+  /* In continuous wrap mode, the absolute (non-wrapped) line count is
+   maintained separately, as needed.  Only return it if we're actually
+   keeping track of it and pos is in the displayed text */
+  if (mContinuousWrap) {
+    if (!maintaining_absolute_top_line_number() || pos < mFirstChar || pos > mLastChar)
+      return 0;
+    *lineNum = mAbsTopLineNum + buffer()->count_lines(mFirstChar, pos);
+    *column = buffer()->count_displayed_characters(buffer()->line_start(pos), pos);
+    return 1;
+  }
+  
+  retVal = position_to_line( pos, lineNum );
+  if ( retVal ) {
+    *column = mBuffer->count_displayed_characters( mLineStarts[ *lineNum ], pos );
+    *lineNum += mTopLineNum;
+  }
+  return retVal;
+}
+
+
+
+/**
+ \brief Check if a pixel position is within the primary selection.
+ \param X, Y pixel position to test
+ \return 1 if position (X, Y) is inside of the primary fltk3::TextSelection
+ */
+int fltk3::TextDisplay::in_selection( int X, int Y ) const {
+  int pos = xy_to_position( X, Y, CHARACTER_POS );
+  IS_UTF8_ALIGNED2(buffer(), pos)
+  fltk3::TextBuffer *buf = mBuffer;
+  return buf->primary_selection()->includes(pos);
+}
+
+
+
+/**
+ \brief Nobody knows what this function does.
+ 
+ Correct a column number based on an unconstrained position (as returned by
+ TextDXYToUnconstrainedPosition) to be relative to the last actual newline
+ in the buffer before the row and column position given, rather than the
+ last line start created by line wrapping.  This is an adapter
+ for rectangular selections and code written before continuous wrap mode,
+ which thinks that the unconstrained column is the number of characters
+ from the last newline.  Obviously this is time consuming, because it
+ invloves character re-counting.
+ 
+ \param row
+ \param column
+ \return something unknown
+ \todo What does this do and how is it useful? Column numbers mean little in 
+    this context. Which functions depend on this one?
+ 
+ \todo Unicode?
+ */
+int fltk3::TextDisplay::wrapped_column(int row, int column) const {
+  int lineStart, dispLineStart;
+  
+  if (!mContinuousWrap || row < 0 || row > mNVisibleLines)
+    return column;
+  dispLineStart = mLineStarts[row];
+  if (dispLineStart == -1)
+    return column;
+  lineStart = buffer()->line_start(dispLineStart);
+  return column + buffer()->count_displayed_characters(lineStart, dispLineStart);
+}
+
+
+
+/**
+ \brief Nobody knows what this function does.
+ 
+ Correct a row number from an unconstrained position (as returned by
+ TextDXYToUnconstrainedPosition) to a straight number of newlines from the
+ top line of the display.  Because rectangular selections are based on
+ newlines, rather than display wrapping, and anywhere a rectangular selection
+ needs a row, it needs it in terms of un-wrapped lines.
+ 
+ \param row
+ \return something unknown
+ \todo What does this do and how is it useful? Column numbers mean little in 
+ this context. Which functions depend on this one?
+ */
+int fltk3::TextDisplay::wrapped_row(int row) const {
+  if (!mContinuousWrap || row < 0 || row > mNVisibleLines)
+    return row;
+  return buffer()->count_lines(mFirstChar, mLineStarts[row]);
+}
+
+
+
+/**
+ \brief Scroll the display to bring insertion cursor into view.
+
+ Note: it would be nice to be able to do this without counting lines twice
+ (scroll_() counts them too) and/or to count from the most efficient
+ starting point, but the efficiency of this routine is not as important to
+ the overall performance of the text display.
+ 
+ \todo Unicode?
+ */
+void fltk3::TextDisplay::display_insert() {
+  int hOffset, topLine, X, Y;
+  hOffset = mHorizOffset;
+  topLine = mTopLineNum;
+  
+  if (insert_position() < mFirstChar) {
+    topLine -= count_lines(insert_position(), mFirstChar, false);
+  } else if (mNVisibleLines>=2 && mLineStarts[mNVisibleLines-2] != -1) {
+    int lastChar = line_end(mLineStarts[mNVisibleLines-2],true);
+    if (insert_position() >= lastChar)
+      topLine += count_lines(lastChar - (wrap_uses_character(mLastChar) ? 0 : 1),
+                             insert_position(), false);
+  }
+  
+  /* Find the new setting for horizontal offset (this is a bit ungraceful).
+   If the line is visible, just use PositionToXY to get the position
+   to scroll to, otherwise, do the vertical scrolling first, then the
+   horizontal */
+  if (!position_to_xy( mCursorPos, &X, &Y )) {
+    scroll_(topLine, hOffset);
+    if (!position_to_xy( mCursorPos, &X, &Y )) {
+#ifdef DEBUG
+      printf ("*** display_insert/position_to_xy # GIVE UP !\n"); fflush(stdout);
+#endif // DEBUG
+      return;   /* Give up, it's not worth it (but why does it fail?) */
+    }
+  }
+  if (X > text_area.x + text_area.w)
+    hOffset += X-(text_area.x + text_area.w);
+  else if (X < text_area.x)
+    hOffset += X-text_area.x;
+  
+  /* Do the scroll */
+  if (topLine != mTopLineNum || hOffset != mHorizOffset)
+    scroll_(topLine, hOffset);
+}
+
+
+/**  
+ \brief Scrolls the text buffer to show the current insert position.
+ This function triggers a complete recalculation, ending in a call to 
+ fltk3::TextDisplay::display_insert()
+ */
+void fltk3::TextDisplay::show_insert_position() {
+  display_insert_position_hint = 1;
+  resize(x(), y(), w(), h());
+}
+
+
+/*
+ Cursor movement functions
+ */
+
+/**  
+ \brief Moves the current insert position right one character.
+ \return 1 if the cursor moved, 0 if the end of the text was reached
+ */
+int fltk3::TextDisplay::move_right() {
+  if ( mCursorPos >= mBuffer->length() )
+    return 0;
+  int p = insert_position();
+  int q = buffer()->next_char(p);
+  insert_position(q);
+  return 1;
+}
+
+
+
+/**  
+ \brief Moves the current insert position left one character.
+ \return 1 if the cursor moved, 0 if the beginning of the text was reached
+ */
+int fltk3::TextDisplay::move_left() {
+  if ( mCursorPos <= 0 )
+    return 0;
+  int p = insert_position();
+  int q = buffer()->prev_char_clipped(p);
+  insert_position(q);
+  return 1;
+}
+
+
+
+/** 
+ \brief Moves the current insert position up one line.
+ \return 1 if the cursor moved, 0 if the beginning of the text was reached
+ */
+int fltk3::TextDisplay::move_up() {
+  int lineStartPos, xPos, prevLineStartPos, newPos, visLineNum;
+  
+  /* Find the position of the start of the line.  Use the line starts array
+   if possible */
+  if ( position_to_line( mCursorPos, &visLineNum ) )
+    lineStartPos = mLineStarts[ visLineNum ];
+  else {
+    lineStartPos = line_start( mCursorPos );
+    visLineNum = -1;
+  }
+  if ( lineStartPos == 0 )
+    return 0;
+  
+  /* Decide what column to move to, if there's a preferred column use that */
+  if (mCursorPreferredXPos >= 0)
+    xPos = mCursorPreferredXPos;
+  else
+    xPos = handle_vline(GET_WIDTH, lineStartPos, mCursorPos-lineStartPos, 
+                        0, 0, 0, 0, 0, INT_MAX);
+  
+  /* count forward from the start of the previous line to reach the column */
+  if ( visLineNum != -1 && visLineNum != 0 )
+    prevLineStartPos = mLineStarts[ visLineNum - 1 ];
+  else
+    prevLineStartPos = rewind_lines( lineStartPos, 1 );
+  
+  int lineEnd = line_end(prevLineStartPos, true);
+  newPos = handle_vline(FIND_INDEX_FROM_ZERO, prevLineStartPos, lineEnd-prevLineStartPos, 
+                        0, 0, 0, 0, 0, xPos);
+  
+  /* move the cursor */
+  insert_position( newPos );
+  
+  /* if a preferred column wasn't aleady established, establish it */
+  mCursorPreferredXPos = xPos;
+  return 1;
+}
+
+
+
+/** 
+ \brief Moves the current insert position down one line.
+ \return 1 if the cursor moved, 0 if the beginning of the text was reached
+ */
+int fltk3::TextDisplay::move_down() {
+  int lineStartPos, xPos, newPos, visLineNum;
+  
+  if ( mCursorPos == mBuffer->length() )
+    return 0;
+  
+  if ( position_to_line( mCursorPos, &visLineNum ) )
+    lineStartPos = mLineStarts[ visLineNum ];
+  else {
+    lineStartPos = line_start( mCursorPos );
+    visLineNum = -1;
+  }
+  if (mCursorPreferredXPos >= 0) {
+    xPos = mCursorPreferredXPos;
+  } else {
+    xPos = handle_vline(GET_WIDTH, lineStartPos, mCursorPos-lineStartPos, 
+                        0, 0, 0, 0, 0, INT_MAX);
+  }
+  
+  int nextLineStartPos = skip_lines( lineStartPos, 1, true );
+  int lineEnd = line_end(nextLineStartPos, true);
+  newPos = handle_vline(FIND_INDEX_FROM_ZERO, nextLineStartPos, lineEnd-nextLineStartPos, 
+                        0, 0, 0, 0, 0, xPos);
+  
+  insert_position( newPos );
+  mCursorPreferredXPos = xPos;
+  return 1;
+}
+
+
+
+/**
+ \brief Count the number of lines between two positions.
+
+ Same as BufCountLines, but takes into account wrapping if wrapping is
+ turned on.  If the caller knows that \p startPos is at a line start, it
+ can pass \p startPosIsLineStart as True to make the call more efficient
+ by avoiding the additional step of scanning back to the last newline.
+
+ \param startPos index to first character
+ \param endPos index after last character
+ \param startPosIsLineStart avoid scanning back to the line start
+ \return number of lines
+ */
+int fltk3::TextDisplay::count_lines(int startPos, int endPos,
+                                 bool startPosIsLineStart) const {
+  IS_UTF8_ALIGNED2(buffer(), startPos)
+  IS_UTF8_ALIGNED2(buffer(), endPos)
+  
+  int retLines, retPos, retLineStart, retLineEnd;
+  
+#ifdef DEBUG
+  printf("fltk3::TextDisplay::count_lines(startPos=%d, endPos=%d, startPosIsLineStart=%d\n",
+         startPos, endPos, startPosIsLineStart);
+#endif // DEBUG
+  
+  /* If we're not wrapping use simple (and more efficient) BufCountLines */
+  if (!mContinuousWrap)
+    return buffer()->count_lines(startPos, endPos);
+  
+  wrapped_line_counter(buffer(), startPos, endPos, INT_MAX,
+                       startPosIsLineStart, 0, &retPos, &retLines, &retLineStart,
+                       &retLineEnd);
+  
+#ifdef DEBUG
+  printf("   # after WLC: retPos=%d, retLines=%d, retLineStart=%d, retLineEnd=%d\n",
+         retPos, retLines, retLineStart, retLineEnd);
+#endif // DEBUG
+  
+  return retLines;
+}
+
+
+
+/**
+ \brief Skip a number of lines forward.
+
+ Same as BufCountForwardNLines, but takes into account line breaks when
+ wrapping is turned on. If the caller knows that startPos is at a line start,
+ it can pass "startPosIsLineStart" as True to make the call more efficient
+ by avoiding the additional step of scanning back to the last newline.
+ 
+ \param startPos index to starting character
+ \param nLines number of lines to skip ahead
+ \param startPosIsLineStart avoid scanning back to the line start
+ \return new position as index
+ */
+int fltk3::TextDisplay::skip_lines(int startPos, int nLines,
+                                bool startPosIsLineStart) {
+  IS_UTF8_ALIGNED2(buffer(), startPos)
+
+  int retLines, retPos, retLineStart, retLineEnd;
+  
+  /* if we're not wrapping use more efficient BufCountForwardNLines */
+  if (!mContinuousWrap)
+    return buffer()->skip_lines(startPos, nLines);
+  
+  /* wrappedLineCounter can't handle the 0 lines case */
+  if (nLines == 0)
+    return startPos;
+  
+  /* use the common line counting routine to count forward */
+  wrapped_line_counter(buffer(), startPos, buffer()->length(),
+                       nLines, startPosIsLineStart, 0, 
+                       &retPos, &retLines, &retLineStart, &retLineEnd);
+  IS_UTF8_ALIGNED2(buffer(), retPos)
+  return retPos;
+}
+
+
+
+/**
+ \brief Returns the end of a line.
+ 
+ Same as BufEndOfLine, but takes into account line breaks when wrapping
+ is turned on.  If the caller knows that \p startPos is at a line start, it
+ can pass "startPosIsLineStart" as True to make the call more efficient
+ by avoiding the additional step of scanning back to the last newline.
+
+ Note that the definition of the end of a line is less clear when continuous
+ wrap is on.  With continuous wrap off, it's just a pointer to the newline
+ that ends the line.  When it's on, it's the character beyond the last
+ \b displayable character on the line, where a whitespace character which has
+ been "converted" to a newline for wrapping is not considered displayable.
+ Also note that a line can be wrapped at a non-whitespace character if the
+ line had no whitespace.  In this case, this routine returns a pointer to
+ the start of the next line.  This is also consistent with the model used by
+ visLineLength.
+ 
+ \param startPos index to starting character
+ \param startPosIsLineStart avoid scanning back to the line start
+ \return new position as index
+ */
+int fltk3::TextDisplay::line_end(int startPos, bool startPosIsLineStart) const {
+  IS_UTF8_ALIGNED2(buffer(), startPos)
+
+  int retLines, retPos, retLineStart, retLineEnd;
+  
+  /* If we're not wrapping use more efficient BufEndOfLine */
+  if (!mContinuousWrap)
+    return buffer()->line_end(startPos);
+  
+  if (startPos == buffer()->length())
+    return startPos;
+  
+  wrapped_line_counter(buffer(), startPos, buffer()->length(), 1,
+                       startPosIsLineStart, 0, &retPos, &retLines, &retLineStart,
+                       &retLineEnd);
+  
+  IS_UTF8_ALIGNED2(buffer(), retLineEnd)
+  return retLineEnd;
+}
+
+
+
+/**
+ \brief Return the beginning of a line.
+
+ Same as BufStartOfLine, but returns the character after last wrap point
+ rather than the last newline.
+ 
+ \param pos index to starting character
+ \return new position as index
+ */
+int fltk3::TextDisplay::line_start(int pos) const {
+  IS_UTF8_ALIGNED2(buffer(), pos)
+
+  int retLines, retPos, retLineStart, retLineEnd;
+  
+  /* If we're not wrapping, use the more efficient BufStartOfLine */
+  if (!mContinuousWrap)
+    return buffer()->line_start(pos);
+  
+  wrapped_line_counter(buffer(), buffer()->line_start(pos), pos, INT_MAX, true, 0,
+                       &retPos, &retLines, &retLineStart, &retLineEnd);
+
+  IS_UTF8_ALIGNED2(buffer(), retLineStart)
+  return retLineStart;
+}
+
+
+
+/**
+ \brief Skip a number of lines back.
+
+ Same as BufCountBackwardNLines, but takes into account line breaks when
+ wrapping is turned on.
+
+ \param startPos index to starting character
+ \param nLines number of lines to skip back
+ \return new position as index
+ */
+int fltk3::TextDisplay::rewind_lines(int startPos, int nLines) {
+  IS_UTF8_ALIGNED2(buffer(), startPos)
+
+  fltk3::TextBuffer *buf = buffer();
+  int pos, lineStart, retLines, retPos, retLineStart, retLineEnd;
+  
+  /* If we're not wrapping, use the more efficient BufCountBackwardNLines */
+  if (!mContinuousWrap)
+    return buf->rewind_lines(startPos, nLines);
+  
+  pos = startPos;
+  for (;;) {
+    lineStart = buf->line_start(pos);
+    wrapped_line_counter(buf, lineStart, pos, INT_MAX, true, 0, 
+                         &retPos, &retLines, &retLineStart, &retLineEnd, false);
+    if (retLines > nLines)
+      return skip_lines(lineStart, retLines-nLines, true);
+    nLines -= retLines;
+    pos = lineStart - 1;
+    if (pos < 0)
+      return 0;
+    nLines -= 1;
+  }
+}
+
+
+
+static inline int fl_isseparator(unsigned int c) {
+  // FIXME: this does not take UCS-4 encoding into account
+  return c != '$' && c != '_' && (isspace(c) || ispunct(c));
+}
+
+
+
+/**   
+ \brief Moves the current insert position right one word.
+ */
+void fltk3::TextDisplay::next_word() {
+  int pos = insert_position();
+
+  while (pos < buffer()->length() && !fl_isseparator(buffer()->char_at(pos))) {
+    pos = buffer()->next_char(pos);
+  }
+
+  while (pos < buffer()->length() && fl_isseparator(buffer()->char_at(pos))) {
+    pos = buffer()->next_char(pos);
+  }
+  
+  insert_position( pos );
+}
+
+
+
+/**  
+ \brief Moves the current insert position left one word.
+ */
+void fltk3::TextDisplay::previous_word() {
+  int pos = insert_position();
+  if (pos==0) return;
+  pos = buffer()->prev_char(pos);
+
+  while (pos && fl_isseparator(buffer()->char_at(pos))) {
+    pos = buffer()->prev_char(pos);
+  }
+
+  while (pos && !fl_isseparator(buffer()->char_at(pos))) {
+    pos = buffer()->prev_char(pos);
+  }
+
+  if (fl_isseparator(buffer()->char_at(pos))) {
+    pos = buffer()->next_char(pos);
+  }
+  
+  insert_position( pos );
+}
+
+
+
+/**
+ \brief This is called before any characters are deleted.
+ 
+ Callback attached to the text buffer to receive delete information before
+ the modifications are actually made.
+ 
+ \param pos starting index of deletion
+ \param nDeleted number of bytes we will delete (must be UTF-8 aligned!)
+ \param cbArg "this" pointer for static callback function
+ */
+void fltk3::TextDisplay::buffer_predelete_cb(int pos, int nDeleted, void *cbArg) {
+  fltk3::TextDisplay *textD = (fltk3::TextDisplay *)cbArg;
+  if (textD->mContinuousWrap) {
+  /* Note: we must perform this measurement, even if there is not a
+   single character deleted; the number of "deleted" lines is the
+   number of visual lines spanned by the real line in which the
+   modification takes place.
+   Also, a modification of the tab distance requires the same
+   kind of calculations in advance, even if the font width is "fixed",
+   because when the width of the tab characters changes, the layout
+   of the text may be completely different. */
+    IS_UTF8_ALIGNED2(textD->buffer(), pos)
+    textD->measure_deleted_lines(pos, nDeleted);
+  } else {
+    textD->mSuppressResync = 0; /* Probably not needed, but just in case */
+  }
+}
+
+
+
+/**
+ \brief This is called whenever the buffer is modified.
+ 
+ Callback attached to the text buffer to receive modification information
+
+ \param pos starting index of modification
+ \param nInserted number of bytes we inserted (must be UTF-8 aligned!)
+ \param nDeleted number of bytes deleted (must be UTF-8 aligned!)
+ \param nRestyled ??
+ \param deletedText this is what was removed, must not be NULL if nDeleted is set
+ \param cbArg "this" pointer for static callback function
+ */
+void fltk3::TextDisplay::buffer_modified_cb( int pos, int nInserted, int nDeleted,
+                                         int nRestyled, const char *deletedText, void *cbArg ) {
+  int linesInserted, linesDeleted, startDispPos, endDispPos;
+  fltk3::TextDisplay *textD = ( fltk3::TextDisplay * ) cbArg;
+  fltk3::TextBuffer *buf = textD->mBuffer;
+  int oldFirstChar = textD->mFirstChar;
+  int scrolled, origCursorPos = textD->mCursorPos;
+  int wrapModStart = 0, wrapModEnd = 0;
+
+  IS_UTF8_ALIGNED2(buf, pos)
+  IS_UTF8_ALIGNED2(buf, oldFirstChar)
+  
+  /* buffer modification cancels vertical cursor motion column */
+  if ( nInserted != 0 || nDeleted != 0 )
+    textD->mCursorPreferredXPos = -1;
+  
+  /* Count the number of lines inserted and deleted, and in the case
+   of continuous wrap mode, how much has changed */
+  if (textD->mContinuousWrap) {
+    textD->find_wrap_range(deletedText, pos, nInserted, nDeleted,
+                           &wrapModStart, &wrapModEnd, &linesInserted, &linesDeleted);
+  } else {
+    linesInserted = nInserted == 0 ? 0 : buf->count_lines( pos, pos + nInserted );
+    linesDeleted = nDeleted == 0 ? 0 : countlines( deletedText );
+  }
+  
+  /* Update the line starts and mTopLineNum */
+  if ( nInserted != 0 || nDeleted != 0 ) {
+    if (textD->mContinuousWrap) {
+      textD->update_line_starts( wrapModStart, wrapModEnd-wrapModStart,
+                                nDeleted + pos-wrapModStart + (wrapModEnd-(pos+nInserted)),
+                                linesInserted, linesDeleted, &scrolled );
+    } else {
+      textD->update_line_starts( pos, nInserted, nDeleted, linesInserted,
+                                linesDeleted, &scrolled );
+    }
+  } else
+    scrolled = 0;
+  
+  /* If we're counting non-wrapped lines as well, maintain the absolute
+   (non-wrapped) line number of the text displayed */
+  if (textD->maintaining_absolute_top_line_number() &&
+      (nInserted != 0 || nDeleted != 0)) {
+    if (deletedText && (pos + nDeleted < oldFirstChar))
+      textD->mAbsTopLineNum += buf->count_lines(pos, pos + nInserted) -
+                               countlines(deletedText);
+    else if (pos < oldFirstChar)
+      textD->reset_absolute_top_line_number();
+  }    	    
+  
+  /* Update the line count for the whole buffer */
+  textD->mNBufferLines += linesInserted - linesDeleted;
+  
+  /* Update the cursor position */
+  if ( textD->mCursorToHint != NO_HINT ) {
+    textD->mCursorPos = textD->mCursorToHint;
+    textD->mCursorToHint = NO_HINT;
+  } else if ( textD->mCursorPos > pos ) {
+    if ( textD->mCursorPos < pos + nDeleted )
+      textD->mCursorPos = pos;
+    else
+      textD->mCursorPos += nInserted - nDeleted;
+  }
+  
+  // refigure scrollbars & stuff
+  textD->resize(textD->x(), textD->y(), textD->w(), textD->h());
+  
+  // don't need to do anything else if not visible?
+  if (!textD->visible_r()) return;
+  
+  /* If the changes caused scrolling, re-paint everything and we're done. */
+  if ( scrolled ) {
+    textD->damage(fltk3::DAMAGE_EXPOSE);
+    if ( textD->mStyleBuffer )   /* See comments in extendRangeForStyleMods */
+      textD->mStyleBuffer->primary_selection()->selected(0);
+    return;
+  }
+  
+  /* If the changes didn't cause scrolling, decide the range of characters
+   that need to be re-painted.  Also if the cursor position moved, be
+   sure that the redisplay range covers the old cursor position so the
+   old cursor gets erased, and erase the bits of the cursor which extend
+   beyond the left and right edges of the text. */
+  startDispPos = textD->mContinuousWrap ? wrapModStart : pos;
+  IS_UTF8_ALIGNED2(buf, startDispPos)
+  
+  if ( origCursorPos == startDispPos && textD->mCursorPos != startDispPos )
+    startDispPos = min( startDispPos, buf->prev_char_clipped(origCursorPos) );
+  IS_UTF8_ALIGNED2(buf, startDispPos)
+  
+  if ( linesInserted == linesDeleted ) {
+    if ( nInserted == 0 && nDeleted == 0 )
+      endDispPos = pos + nRestyled;
+    else {
+      if (textD->mContinuousWrap)
+        endDispPos = wrapModEnd;
+      else
+        endDispPos = buf->next_char(buf->line_end( pos + nInserted ));
+      
+      // CET - FIXME      if ( origCursorPos >= startDispPos &&
+      //                ( origCursorPos <= endDispPos || endDispPos == buf->length() ) )
+    }
+    
+    if (linesInserted > 1) textD->draw_line_numbers(false);
+  } else {
+    endDispPos = buf->next_char(textD->mLastChar);
+    // CET - FIXME   if ( origCursorPos >= pos )
+    /* If more than one line is inserted/deleted, a line break may have
+     been inserted or removed in between, and the line numbers may
+     have changed. If only one line is altered, line numbers cannot
+     be affected (the insertion or removal of a line break always 
+     results in at least two lines being redrawn). */
+    textD->draw_line_numbers(false);
+  }
+  IS_UTF8_ALIGNED2(buf, startDispPos)
+  IS_UTF8_ALIGNED2(buf, endDispPos)
+  
+  /* If there is a style buffer, check if the modification caused additional
+   changes that need to be redisplayed.  (Redisplaying separately would
+   cause double-redraw on almost every modification involving styled
+   text).  Extend the redraw range to incorporate style changes */
+  if ( textD->mStyleBuffer )
+    textD->extend_range_for_styles( &startDispPos, &endDispPos );
+  IS_UTF8_ALIGNED2(buf, startDispPos)
+  IS_UTF8_ALIGNED2(buf, endDispPos)
+  
+  /* Redisplay computed range */
+  textD->redisplay_range( startDispPos, endDispPos );
+}
+
+
+
+/**
+ \brief Line numbering stuff, currently unused.
+ 
+ In continuous wrap mode, internal line numbers are calculated after
+ wrapping.  A separate non-wrapped line count is maintained when line
+ numbering is turned on.  There is some performance cost to maintaining this
+ line count, so normally absolute line numbers are not tracked if line
+ numbering is off.  This routine allows callers to specify that they still
+ want this line count maintained (for use via TextDPosToLineAndCol).
+ More specifically, this allows the line number reported in the statistics
+ line to be calibrated in absolute lines, rather than post-wrapped lines.
+ */
+void fltk3::TextDisplay::maintain_absolute_top_line_number(int state) {
+  mNeedAbsTopLineNum = state;
+  reset_absolute_top_line_number();
+}
+
+
+
+/**
+ \brief Line numbering stuff, currently unused.
+ 
+ Returns the absolute (non-wrapped) line number of the first line displayed.
+ Returns 0 if the absolute top line number is not being maintained.
+ */
+int fltk3::TextDisplay::get_absolute_top_line_number() const {
+  if (!mContinuousWrap)
+    return mTopLineNum;
+  if (maintaining_absolute_top_line_number())
+    return mAbsTopLineNum;
+  return 0;
+}
+
+
+
+/**
+ \brief Line numbering stuff, currently unused.
+ 
+ Re-calculate absolute top line number for a change in scroll position.
+ */
+void fltk3::TextDisplay::absolute_top_line_number(int oldFirstChar) {
+  if (maintaining_absolute_top_line_number()) {
+    if (mFirstChar < oldFirstChar)
+      mAbsTopLineNum -= buffer()->count_lines(mFirstChar, oldFirstChar);
+    else
+      mAbsTopLineNum += buffer()->count_lines(oldFirstChar, mFirstChar);
+  }
+}
+
+
+
+/**
+ \brief Line numbering stuff, currently unused.
+ 
+ Return true if a separate absolute top line number is being maintained
+ (for displaying line numbers or showing in the statistics line).
+ */
+int fltk3::TextDisplay::maintaining_absolute_top_line_number() const {
+  return mContinuousWrap &&
+  (mLineNumWidth != 0 || mNeedAbsTopLineNum);
+}
+
+
+
+/**
+ \brief Line numbering stuff, probably unused.
+ 
+ Count lines from the beginning of the buffer to reestablish the
+ absolute (non-wrapped) top line number.  If mode is not continuous wrap,
+ or the number is not being maintained, does nothing.
+ */
+void fltk3::TextDisplay::reset_absolute_top_line_number() {
+  mAbsTopLineNum = 1;
+  absolute_top_line_number(0);
+}
+
+
+
+/**
+ \brief Convert a position index into a line number offset.
+ 
+ Find the line number of position \p pos relative to the first line of
+ displayed text. Returns 0 if the line is not displayed.
+ 
+ \param pos ??
+ \param[out] lineNum ??
+ \return ??
+ \todo What does this do?
+ */
+int fltk3::TextDisplay::position_to_line( int pos, int *lineNum ) const {
+  IS_UTF8_ALIGNED2(buffer(), pos)
+
+  int i;
+  
+  *lineNum = 0;
+  if ( pos < mFirstChar ) return 0;
+  if ( pos > mLastChar ) {
+    if ( empty_vlines() ) {
+      if ( mLastChar < mBuffer->length() ) {
+        if ( !position_to_line( mLastChar, lineNum ) ) {
+          fltk3::error("fltk3::TextDisplay::position_to_line(): Consistency check ptvl failed");
+          return 0;
+        }
+        return ++( *lineNum ) <= mNVisibleLines - 1;
+      } else {
+        position_to_line( buffer()->prev_char_clipped(mLastChar), lineNum );
+        return 1;
+      }
+    }
+    return 0;
+  }
+  
+  for ( i = mNVisibleLines - 1; i >= 0; i-- ) {
+    if ( mLineStarts[ i ] != -1 && pos >= mLineStarts[ i ] ) {
+      *lineNum = i;
+      return 1;
+    }
+  }
+  return 0;   /* probably never be reached */
+}
+
+
+/**
+ Universal pixel machine.
+
+ We use a single function that handles all line layout, measuring, and drawing
+  \li draw a text range
+  \li return the width of a text range in pixels
+  \li return the index of a character that is at a pixel position
+
+ \param[in] mode DRAW_LINE, GET_WIDTH, FIND_INDEX
+ \param[in] lineStartPos index of first character
+ \param[in] lineLen size of string in bytes
+ \param[in] leftChar, rightChar
+ \param[in] Y drawing position
+ \param[in] bottomClip, leftClip, rightClip stop work when we reach the clipped 
+            area. rightClip is the X position that we search in FIND_INDEX.
+ \retval DRAW_LINE index of last drawn character
+ \retval GET_WIDTH width in pixels of text segment if we would draw it
+ \retval FIND_INDEX index of character at given x position in window coordinates
+ \retval FIND_INDEX_FROM_ZERO index of character at given x position without scrolling and widget offsets
+ \todo we need to handle hidden hyphens and tabs here!
+ \todo we handle all styles and selections 
+ \todo we must provide code to get pixel positions of the middle of a character as well
+ */
+int fltk3::TextDisplay::handle_vline(
+                                  int mode, 
+                                  int lineStartPos, int lineLen, int leftChar, int rightChar,
+                                  int Y, int bottomClip,
+                                  int leftClip, int rightClip) const
+{
+  IS_UTF8_ALIGNED2(buffer(), lineStartPos)
+
+  // FIXME: we need to allow two modes for FIND_INDEX: one on the edge of the 
+  // FIXME: character for selection, and one on the character center for cursors.
+  int i, X, startX, startIndex, style, charStyle;
+  char *lineStr;
+  
+  if ( lineStartPos == -1 ) {
+    lineStr = NULL;
+  } else {
+    lineStr = mBuffer->text_range( lineStartPos, lineStartPos + lineLen );
+  }
+  
+  if (mode==GET_WIDTH) {
+    X = 0;
+  } else if (mode==FIND_INDEX_FROM_ZERO) {
+    X = 0; 
+    mode = FIND_INDEX;
+  } else {
+    X = text_area.x - mHorizOffset;
+  }
+  
+  startX = X;
+  startIndex = 0;
+  if (!lineStr) {
+    // just clear the background
+    if (mode==DRAW_LINE) {
+      style = position_style(lineStartPos, lineLen, -1);
+      draw_string( style|BG_ONLY_MASK, text_area.x, Y, text_area.x+text_area.w, lineStr, lineLen );
+    }
+    if (mode==FIND_INDEX) {
+      IS_UTF8_ALIGNED2(buffer(), lineStartPos)
+      return lineStartPos;
+    }
+    return 0;
+  }
+  
+  char currChar = 0, prevChar = 0;
+  // draw the line
+  style = position_style(lineStartPos, lineLen, 0);
+  for (i=0; i<lineLen; ) {
+    currChar = lineStr[i]; // one byte is enough to handele tabs and other cases
+    int len = fltk3::utf8len1(currChar);
+    if (len<=0) len = 1; // OUCH!
+    charStyle = position_style(lineStartPos, lineLen, i);
+    if (charStyle!=style || currChar=='\t' || prevChar=='\t') {
+      // draw a segment whenever the style changes or a Tab is found
+      int w = 0;
+      if (prevChar=='\t') {
+        // draw a single Tab space
+        int tab = (int)col_to_x(mBuffer->tab_distance());
+        int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x;
+        w = (((xAbs/tab)+1)*tab) - xAbs;
+        if (mode==DRAW_LINE)
+          draw_string( style|BG_ONLY_MASK, startX, Y, startX+w, 0, 0 );
+        if (mode==FIND_INDEX && startX+w>rightClip) {
+          // find x pos inside block
+          free(lineStr);
+          return lineStartPos + startIndex;
+        }
+      } else {
+        // draw a text segment
+        w = int( string_width( lineStr+startIndex, i-startIndex, style ) );
+        if (mode==DRAW_LINE)
+          draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex );
+        if (mode==FIND_INDEX && startX+w>rightClip) {
+          // find x pos inside block
+          int di = find_x(lineStr+startIndex, i-startIndex, style, rightClip-startX);
+          free(lineStr);
+          IS_UTF8_ALIGNED2(buffer(), (lineStartPos+startIndex+di))
+          return lineStartPos + startIndex + di;
+        }
+      }
+      style = charStyle;
+      startX += w;
+      startIndex = i;
+    }
+    i += len;
+    prevChar = currChar;
+  }
+  int w = 0;
+  if (currChar=='\t') {
+    // draw a single Tab space
+    int tab = (int)col_to_x(mBuffer->tab_distance());
+    int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x;
+    w = (((xAbs/tab)+1)*tab) - xAbs;
+    if (mode==DRAW_LINE)
+      draw_string( style|BG_ONLY_MASK, startX, Y, startX+w, 0, 0 );
+    if (mode==FIND_INDEX) {
+      // find x pos inside block
+      free(lineStr);
+      return lineStartPos + startIndex + ( rightClip-startX>w ? 1 : 0 );
+    }
+  } else {
+    w = int( string_width( lineStr+startIndex, i-startIndex, style ) );
+    if (mode==DRAW_LINE)
+      draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex );
+    if (mode==FIND_INDEX) {
+      // find x pos inside block
+      int di = find_x(lineStr+startIndex, i-startIndex, style, rightClip-startX);
+      free(lineStr);
+      IS_UTF8_ALIGNED2(buffer(), (lineStartPos+startIndex+di))
+      return lineStartPos + startIndex + di;
+    }
+  }
+  if (mode==GET_WIDTH) {
+    free(lineStr);
+    return startX+w;
+  }
+  
+  // clear the rest of the line
+  startX += w;
+  style = position_style(lineStartPos, lineLen, i);
+  if (mode==DRAW_LINE)
+    draw_string( style|BG_ONLY_MASK, startX, Y, text_area.x+text_area.w, lineStr, lineLen );
+  
+  free(lineStr);
+  IS_UTF8_ALIGNED2(buffer(), (lineStartPos+lineLen))
+  return lineStartPos + lineLen;
+}
+
+
+/**
+ \brief Find the index of the character that lies at the given x position.
+ \param s UTF-8 text string
+ \param len length of string
+ \param style index into style lookup table
+ \param x position in pixels
+ \return index into buffer
+ */
+int fltk3::TextDisplay::find_x(const char *s, int len, int style, int x) const {
+  IS_UTF8_ALIGNED(s)
+
+  // TODO: use binary search which may be quicker.
+  int i = 0;
+  while (i<len) {
+    int cl = fltk3::utf8len1(s[i]);
+    int w = int( string_width(s, i+cl, style) );
+    if (w>x) 
+      return i;
+    i += cl;
+  }  
+  return len;
+}
+
+
+
+/**
+ \brief Draw a single line of text.
+ 
+ Draw the text on a single line represented by \p visLineNum (the
+ number of lines down from the top of the display), limited by
+ \p leftClip and \p rightClip window coordinates and \p leftCharIndex and
+ \p rightCharIndex character positions (not including the character at
+ position \p rightCharIndex).
+ 
+ \param visLineNum index of line in the visible line number lookup
+ \param leftClip, rightClip pixel position of clipped area
+ \param leftCharIndex, rightCharIndex index into line of segment that we want to draw
+ */
+void fltk3::TextDisplay::draw_vline(int visLineNum, int leftClip, int rightClip,
+                                 int leftCharIndex, int rightCharIndex) {
+  int Y, lineStartPos, lineLen, fontHeight;
+  
+  //  printf("draw_vline(visLineNum=%d, leftClip=%d, rightClip=%d, leftCharIndex=%d, rightCharIndex=%d)\n",
+  //         visLineNum, leftClip, rightClip, leftCharIndex, rightCharIndex);
+  //  printf("nNVisibleLines=%d\n", mNVisibleLines);
+  
+  /* If line is not displayed, skip it */
+  if ( visLineNum < 0 || visLineNum >= mNVisibleLines )
+    return;
+  
+  /* Calculate Y coordinate of the string to draw */
+  fontHeight = mMaxsize;
+  Y = text_area.y + visLineNum * fontHeight;
+  
+  /* Get the text, length, and  buffer position of the line to display */
+  lineStartPos = mLineStarts[ visLineNum ];
+  if ( lineStartPos == -1 ) {
+    lineLen = 0;
+  } else {
+    lineLen = vline_length( visLineNum );
+  }
+  
+  /* Shrink the clipping range to the active display area */
+  leftClip = max( text_area.x, leftClip );
+  rightClip = min( rightClip, text_area.x + text_area.w );
+  
+  handle_vline(DRAW_LINE, 
+               lineStartPos, lineLen, leftCharIndex, rightCharIndex,
+               Y, Y+fontHeight, leftClip, rightClip);
+  return;
+}
+
+
+
+/**
+ \brief Draw a text segment in a single style.
+ 
+ Draw a string or blank area according to parameter \p style, using the
+ appropriate colors and drawing method for that style, with top left
+ corner at \p X, \p Y.  If style says to draw text, use \p string as
+ source of characters, and draw \p nChars, if style is FILL, erase
+ rectangle where text would have drawn from \p X to \p toX and from
+ \p Y to the maximum y extent of the current font(s).
+ 
+ \param style index into style lookup table
+ \param X, Y drawing origin
+ \param toX rightmost position if this is a fill operation
+ \param string text if this is a drawing operation
+ \param nChars number of characters to draw
+ */
+void fltk3::TextDisplay::draw_string(int style, 
+                                  int X, int Y, int toX,
+                                  const char *string, int nChars) const {
+  IS_UTF8_ALIGNED(string)
+
+  const StyleTableEntry * styleRec;
+  
+  /* Draw blank area rather than text, if that was the request */
+  if ( style & FILL_MASK ) {
+    if (style & TEXT_ONLY_MASK) return;
+    clear_rect( style, X, Y, toX - X, mMaxsize );
+    return;
+  }
+  /* Set font, color, and gc depending on style.  For normal text, GCs
+   for normal drawing, or drawing within a fltk3::TextSelection or highlight are
+   pre-allocated and pre-configured.  For syntax highlighting, GCs are
+   configured here, on the fly. */
+  
+  fltk3::Font font = textfont();
+  int fsize = textsize();
+  fltk3::Color foreground;
+  fltk3::Color background;
+  
+  if ( style & STYLE_LOOKUP_MASK ) {
+    int si = (style & STYLE_LOOKUP_MASK) - 'A';
+    if (si < 0) si = 0;
+    else if (si >= mNStyles) si = mNStyles - 1;
+    
+    styleRec = mStyleTable + si;
+    font  = styleRec->font;
+    fsize = styleRec->size;
+    
+    if (style & PRIMARY_MASK) {
+      if (fltk3::focus() == (fltk3::Widget*)this) background = selection_color();
+      else background = fltk3::color_average(color(), selection_color(), 0.4f);
+    } else if (style & HIGHLIGHT_MASK) {
+      if (fltk3::focus() == (fltk3::Widget*)this) background = fltk3::color_average(color(), selection_color(), 0.5f);
+      else background = fltk3::color_average(color(), selection_color(), 0.6f);
+    } else background = color();
+    foreground = fltk3::contrast(styleRec->color, background);
+  } else if (style & PRIMARY_MASK) {
+    if (fltk3::focus() == (fltk3::Widget*)this) background = selection_color();
+    else background = fltk3::color_average(color(), selection_color(), 0.4f);
+    foreground = fltk3::contrast(textcolor(), background);
+  } else if (style & HIGHLIGHT_MASK) {
+    if (fltk3::focus() == (fltk3::Widget*)this) background = fltk3::color_average(color(), selection_color(), 0.5f);
+    else background = fltk3::color_average(color(), selection_color(), 0.6f);
+    foreground = fltk3::contrast(textcolor(), background);
+  } else {
+    foreground = textcolor();
+    background = color();
+  }
+  
+  if (!(style & TEXT_ONLY_MASK)) {
+    fltk3::color( background );
+    fltk3::rectf( X, Y, toX - X, mMaxsize );
+  }
+  if (!(style & BG_ONLY_MASK)) {
+    fltk3::color( foreground );
+    fltk3::font( font, fsize );
+#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT
+    // makes sure antialiased ÄÖÜ do not leak on line above
+    fltk3::push_clip(X, Y, toX - X, mMaxsize);
+#endif
+    fltk3::draw( string, nChars, X, Y + mMaxsize - fltk3::descent());
+#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT
+    fltk3::pop_clip();
+#endif
+  }
+  
+  // CET - FIXME
+  /* If any space around the character remains unfilled (due to use of
+   different sized fonts for highlighting), fill in above or below
+   to erase previously drawn characters */
+  /*
+   if (fs->ascent < mAscent)
+   clear_rect( style, X, Y, toX - X, mAscent - fs->ascent);
+   if (fs->descent < mDescent)
+   clear_rect( style, X, Y + mAscent + fs->descent, toX - x,
+   mDescent - fs->descent);
+   */
+  /* Underline if style is secondary fltk3::TextSelection */
+  
+  /*
+   if (style & SECONDARY_MASK)
+   XDrawLine(XtDisplay(mW), XtWindow(mW), gc, x,
+   y + mAscent, toX - 1, Y + fs->ascent);
+   */
+}
+
+
+
+/**
+ \brief Clear a rectangle with the appropriate background color for \p style.
+ 
+ \param style index into style table
+ \param X, Y, width, height size and position of background area
+ */
+void fltk3::TextDisplay::clear_rect(int style, 
+                                 int X, int Y,
+                                 int width, int height) const {
+  /* A width of zero means "clear to end of window" to XClearArea */
+  if ( width == 0 )
+    return;
+  
+  if (style & PRIMARY_MASK) {
+    if (fltk3::focus()==(fltk3::Widget*)this) {
+      fltk3::color(selection_color());
+    } else {
+      fltk3::color(fltk3::color_average(color(), selection_color(), 0.4f));
+    }
+  } else if (style & HIGHLIGHT_MASK) {
+    if (fltk3::focus()==(fltk3::Widget*)this) {
+      fltk3::color(fltk3::color_average(color(), selection_color(), 0.5f));
+    } else {
+      fltk3::color(fltk3::color_average(color(), selection_color(), 0.6f));
+    }
+  } else {
+    fltk3::color( color() );
+  }
+  fltk3::rectf( X, Y, width, height );
+}
+
+
+
+/**
+ \brief Draw a cursor with top center at \p X, \p Y.
+ 
+ \param X, Y cursor position in pixels
+ */
+void fltk3::TextDisplay::draw_cursor( int X, int Y ) {
+
+  typedef struct {
+    int x1, y1, x2, y2;
+  }
+  Segment;
+
+  Segment segs[ 5 ];
+  int left, right, cursorWidth, midY;
+  //    int fontWidth = mFontStruct->min_bounds.width, nSegs = 0;
+  int fontWidth = TMPFONTWIDTH; // CET - FIXME
+  int nSegs = 0;
+  int fontHeight = mMaxsize;
+  int bot = Y + fontHeight - 1;
+  
+  if ( X < text_area.x - 1 || X > text_area.x + text_area.w )
+    return;
+  
+  /* For cursors other than the block, make them around 2/3 of a character
+   width, rounded to an even number of pixels so that X will draw an
+   odd number centered on the stem at x. */
+  cursorWidth = 4;   //(fontWidth/3) * 2;
+  left = X - cursorWidth / 2;
+  right = left + cursorWidth;
+  
+  /* Create segments and draw cursor */
+  if ( mCursorStyle == CARET_CURSOR ) {
+    midY = bot - fontHeight / 5;
+    segs[ 0 ].x1 = left; segs[ 0 ].y1 = bot; segs[ 0 ].x2 = X; segs[ 0 ].y2 = midY;
+    segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot;
+    segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = midY - 1;
+    segs[ 3 ].x1 = X; segs[ 3 ].y1 = midY - 1; segs[ 3 ].x2 = right; segs[ 3 ].y2 = bot;
+    nSegs = 4;
+  } else if ( mCursorStyle == NORMAL_CURSOR ) {
+    segs[ 0 ].x1 = left; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y;
+    segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot;
+    segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = right; segs[ 2 ].y2 = bot;
+    nSegs = 3;
+  } else if ( mCursorStyle == HEAVY_CURSOR ) {
+    segs[ 0 ].x1 = X - 1; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X - 1; segs[ 0 ].y2 = bot;
+    segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot;
+    segs[ 2 ].x1 = X + 1; segs[ 2 ].y1 = Y; segs[ 2 ].x2 = X + 1; segs[ 2 ].y2 = bot;
+    segs[ 3 ].x1 = left; segs[ 3 ].y1 = Y; segs[ 3 ].x2 = right; segs[ 3 ].y2 = Y;
+    segs[ 4 ].x1 = left; segs[ 4 ].y1 = bot; segs[ 4 ].x2 = right; segs[ 4 ].y2 = bot;
+    nSegs = 5;
+  } else if ( mCursorStyle == DIM_CURSOR ) {
+    midY = Y + fontHeight / 2;
+    segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X; segs[ 0 ].y2 = Y;
+    segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = X; segs[ 1 ].y2 = midY;
+    segs[ 2 ].x1 = X; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot;
+    nSegs = 3;
+  } else if ( mCursorStyle == BLOCK_CURSOR ) {
+    right = X + fontWidth;
+    segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y;
+    segs[ 1 ].x1 = right; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot;
+    segs[ 2 ].x1 = right; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot;
+    segs[ 3 ].x1 = X; segs[ 3 ].y1 = bot; segs[ 3 ].x2 = X; segs[ 3 ].y2 = Y;
+    nSegs = 4;
+  }
+  fltk3::color( mCursor_color );
+  
+  for ( int k = 0; k < nSegs; k++ ) {
+    fltk3::line( segs[ k ].x1, segs[ k ].y1, segs[ k ].x2, segs[ k ].y2 );
+  }
+}
+
+
+
+/**
+ \brief Find the correct style for a character.
+
+ Determine the drawing method to use to draw a specific character from "buf".
+ \p lineStartPos gives the character index where the line begins, \p lineIndex,
+ the number of characters past the beginning of the line, and \p lineIndex
+ the number of displayed characters past the beginning of the line.  Passing
+ \p lineStartPos of -1 returns the drawing style for "no text".
+
+ Why not just: position_style(pos)?  Because style applies to blank areas
+ of the window beyond the text boundaries, and because this routine must also
+ decide whether a position is inside of a rectangular fltk3::TextSelection, and do
+ so efficiently, without re-counting character positions from the start of the
+ line.
+
+ Note that style is a somewhat incorrect name, drawing method would
+ be more appropriate.
+
+ \param lineStartPos beginning of this line
+ \param lineLen number of bytes in line
+ \param lineIndex position of character within line
+ \return style for the given character
+ */
+int fltk3::TextDisplay::position_style( int lineStartPos, int lineLen, int lineIndex) const 
+{
+  IS_UTF8_ALIGNED2(buffer(), lineStartPos)
+
+  fltk3::TextBuffer * buf = mBuffer;
+  fltk3::TextBuffer *styleBuf = mStyleBuffer;
+  int pos, style = 0;
+  
+  if ( lineStartPos == -1 || buf == NULL )
+    return FILL_MASK;
+  
+  pos = lineStartPos + min( lineIndex, lineLen );
+  
+  if ( lineIndex >= lineLen )
+    style = FILL_MASK;
+  else if ( styleBuf != NULL ) {
+    style = ( unsigned char ) styleBuf->byte_at( pos );
+    if (style == mUnfinishedStyle && mUnfinishedHighlightCB) {
+      /* encountered "unfinished" style, trigger parsing */
+      (mUnfinishedHighlightCB)( pos, mHighlightCBArg);
+      style = (unsigned char) styleBuf->byte_at( pos);
+    }
+  }
+  if (buf->primary_selection()->includes(pos))
+    style |= PRIMARY_MASK;
+  if (buf->highlight_selection()->includes(pos))
+    style |= HIGHLIGHT_MASK;
+  if (buf->secondary_selection()->includes(pos))
+    style |= SECONDARY_MASK;
+  return style;
+}
+
+
+/**
+ \brief Find the width of a string in the font of a particular style.
+ 
+ \param string the text
+ \param length number of bytes in string
+ \param style index into style table
+ \return width of text segment in pixels
+ */
+double fltk3::TextDisplay::string_width( const char *string, int length, int style ) const {
+  IS_UTF8_ALIGNED(string)
+
+  fltk3::Font font;
+  fltk3::Fontsize fsize;
+  
+  if ( mNStyles && (style & STYLE_LOOKUP_MASK) ) {
+    int si = (style & STYLE_LOOKUP_MASK) - 'A';
+    if (si < 0) si = 0;
+    else if (si >= mNStyles) si = mNStyles - 1;
+    
+    font  = mStyleTable[si].font;
+    fsize = mStyleTable[si].size;
+  } else {
+    font  = textfont();
+    fsize = textsize();
+  }
+  fltk3::font( font, fsize );
+  return fltk3::width( string, length );
+}
+
+
+
+/**
+ \brief Translate a pixel position into a character index.
+
+ Translate window coordinates to the nearest (insert cursor or character
+ cell) text position.  The parameter \p posType specifies how to interpret the
+ position: CURSOR_POS means translate the coordinates to the nearest cursor
+ position, and CHARACTER_POS means return the position of the character
+ closest to (\p X, \p Y).
+
+ \param X, Y pixel position
+ \param posType CURSOR_POS or CHARACTER_POS
+ \return index into text buffer
+ */
+int fltk3::TextDisplay::xy_to_position( int X, int Y, int posType ) const {
+  int lineStart, lineLen, fontHeight;
+  int visLineNum;
+  
+  /* Find the visible line number corresponding to the Y coordinate */
+  fontHeight = mMaxsize;
+  visLineNum = ( Y - text_area.y ) / fontHeight;
+  if ( visLineNum < 0 )
+    return mFirstChar;
+  if ( visLineNum >= mNVisibleLines )
+    visLineNum = mNVisibleLines - 1;
+  
+  /* Find the position at the start of the line */
+  lineStart = mLineStarts[ visLineNum ];
+  
+  /* If the line start was empty, return the last position in the buffer */
+  if ( lineStart == -1 )
+    return mBuffer->length();
+  
+  /* Get the line text and its length */
+  lineLen = vline_length( visLineNum );
+  
+  return handle_vline(FIND_INDEX, 
+                      lineStart, lineLen, 0, 0, 
+                      0, 0,
+                      text_area.x, X);
+}
+
+
+
+/**
+ \brief Translate pixel coordinates into row and column.
+ 
+ Translate window coordinates to the nearest row and column number for
+ positioning the cursor.  This, of course, makes no sense when the font is
+ proportional, since there are no absolute columns.  The parameter posType
+ specifies how to interpret the position: CURSOR_POS means translate the
+ coordinates to the nearest position between characters, and CHARACTER_POS
+ means translate the position to the nearest character cell.
+ 
+ \param X, Y pixel coordinates
+ \param[out] row, column neares row and column
+ \param posType CURSOR_POS or CHARACTER_POS
+ */
+void fltk3::TextDisplay::xy_to_rowcol( int X, int Y, int *row,
+                                   int *column, int posType ) const {
+  int fontHeight = mMaxsize;
+  int fontWidth = TMPFONTWIDTH;   //mFontStruct->max_bounds.width;
+  
+  /* Find the visible line number corresponding to the Y coordinate */
+  *row = ( Y - text_area.y ) / fontHeight;
+  if ( *row < 0 ) *row = 0;
+  if ( *row >= mNVisibleLines ) *row = mNVisibleLines - 1;
+  
+  *column = ( ( X - text_area.x ) + mHorizOffset +
+             ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth;
+  if ( *column < 0 ) * column = 0;
+}
+
+
+
+/**
+ \brief Offset line start counters for a new vertical scroll position.
+ 
+ Offset the line starts array, mTopLineNum, mFirstChar and lastChar, for a new
+ vertical scroll position given by newTopLineNum.  If any currently displayed
+ lines will still be visible, salvage the line starts values, otherwise,
+ count lines from the nearest known line start (start or end of buffer, or
+ the closest value in the mLineStarts array)
+ 
+ \param newTopLineNum index into buffer
+ */
+void fltk3::TextDisplay::offset_line_starts( int newTopLineNum ) {
+  int oldTopLineNum = mTopLineNum;
+  int oldFirstChar = mFirstChar;
+  int lineDelta = newTopLineNum - oldTopLineNum;
+  int nVisLines = mNVisibleLines;
+  int *lineStarts = mLineStarts;
+  int i, lastLineNum;
+  fltk3::TextBuffer *buf = mBuffer;
+  
+  /* If there was no offset, nothing needs to be changed */
+  if ( lineDelta == 0 )
+    return;
+  
+  /* Find the new value for mFirstChar by counting lines from the nearest
+   known line start (start or end of buffer, or the closest value in the
+   lineStarts array) */
+  lastLineNum = oldTopLineNum + nVisLines - 1;
+  if ( newTopLineNum < oldTopLineNum && newTopLineNum < -lineDelta ) {
+    mFirstChar = skip_lines( 0, newTopLineNum - 1, true );
+  } else if ( newTopLineNum < oldTopLineNum ) {
+    mFirstChar = rewind_lines( mFirstChar, -lineDelta );
+  } else if ( newTopLineNum < lastLineNum ) {
+    mFirstChar = lineStarts[ newTopLineNum - oldTopLineNum ];
+  } else if ( newTopLineNum - lastLineNum < mNBufferLines - newTopLineNum ) {
+    mFirstChar = skip_lines( lineStarts[ nVisLines - 1 ],
+                            newTopLineNum - lastLineNum, true );
+  } else {
+    mFirstChar = rewind_lines( buf->length(), mNBufferLines - newTopLineNum + 1 );
+  }
+  
+  /* Fill in the line starts array */
+  if ( lineDelta < 0 && -lineDelta < nVisLines ) {
+    for ( i = nVisLines - 1; i >= -lineDelta; i-- )
+      lineStarts[ i ] = lineStarts[ i + lineDelta ];
+    calc_line_starts( 0, -lineDelta );
+  } else if ( lineDelta > 0 && lineDelta < nVisLines ) {
+    for ( i = 0; i < nVisLines - lineDelta; i++ )
+      lineStarts[ i ] = lineStarts[ i + lineDelta ];
+    calc_line_starts( nVisLines - lineDelta, nVisLines - 1 );
+  } else
+    calc_line_starts( 0, nVisLines );
+  
+  /* Set lastChar and mTopLineNum */
+  calc_last_char();
+  mTopLineNum = newTopLineNum;
+  
+  /* If we're numbering lines or being asked to maintain an absolute line
+   number, re-calculate the absolute line number */
+  absolute_top_line_number(oldFirstChar);
+}
+
+
+
+/**
+ \brief Update line start arrays and variables.
+
+ Update the line starts array, mTopLineNum, mFirstChar and lastChar for this
+ text display after a modification to the text buffer, given by the
+ position \p pos where the change began, and the numbers of characters
+ and lines inserted and deleted.
+
+ \param pos index into buffer of recent changes
+ \param charsInserted number of bytes(!) inserted
+ \param charsDeleted number of bytes(!) deleted
+ \param linesInserted number of lines
+ \param linesDeleted number of lines
+ \param[out] scrolled set to 1 if the text display needs to be scrolled
+ */
+void fltk3::TextDisplay::update_line_starts(int pos, int charsInserted,
+                                         int charsDeleted, int linesInserted, 
+                                         int linesDeleted, int *scrolled ) {
+  IS_UTF8_ALIGNED2(buffer(), pos)
+
+  int *lineStarts = mLineStarts;
+  int i, lineOfPos, lineOfEnd, nVisLines = mNVisibleLines;
+  int charDelta = charsInserted - charsDeleted;
+  int lineDelta = linesInserted - linesDeleted;
+  
+  /* If all of the changes were before the displayed text, the display
+   doesn't change, just update the top line num and offset the line
+   start entries and first and last characters */
+  if ( pos + charsDeleted < mFirstChar ) {
+    mTopLineNum += lineDelta;
+    for ( i = 0; i < nVisLines && lineStarts[i] != -1; i++ )
+      lineStarts[ i ] += charDelta;
+    mFirstChar += charDelta;
+    mLastChar += charDelta;
+    *scrolled = 0;
+    return;
+  }
+  
+  /* The change began before the beginning of the displayed text, but
+   part or all of the displayed text was deleted */
+  if ( pos < mFirstChar ) {
+    /* If some text remains in the window, anchor on that  */
+    if ( position_to_line( pos + charsDeleted, &lineOfEnd ) &&
+        ++lineOfEnd < nVisLines && lineStarts[ lineOfEnd ] != -1 ) {
+      mTopLineNum = max( 1, mTopLineNum + lineDelta );
+      mFirstChar = rewind_lines(lineStarts[ lineOfEnd ] + charDelta, lineOfEnd );
+      /* Otherwise anchor on original line number and recount everything */
+    } else {
+      if ( mTopLineNum > mNBufferLines + lineDelta ) {
+        mTopLineNum = 1;
+        mFirstChar = 0;
+      } else
+        mFirstChar = skip_lines( 0, mTopLineNum - 1, true );
+    }
+    calc_line_starts( 0, nVisLines - 1 );
+    /* calculate lastChar by finding the end of the last displayed line */
+    calc_last_char();
+    *scrolled = 1;
+    return;
+  }
+  
+  /* If the change was in the middle of the displayed text (it usually is),
+   salvage as much of the line starts array as possible by moving and
+   offsetting the entries after the changed area, and re-counting the
+   added lines or the lines beyond the salvaged part of the line starts
+   array */
+  if ( pos <= mLastChar ) {
+    /* find line on which the change began */
+    position_to_line( pos, &lineOfPos );
+    /* salvage line starts after the changed area */
+    if ( lineDelta == 0 ) {
+      for ( i = lineOfPos + 1; i < nVisLines && lineStarts[ i ] != -1; i++ )
+        lineStarts[ i ] += charDelta;
+    } else if ( lineDelta > 0 ) {
+      for ( i = nVisLines - 1; i >= lineOfPos + lineDelta + 1; i-- )
+        lineStarts[ i ] = lineStarts[ i - lineDelta ] +
+        ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta );
+    } else /* (lineDelta < 0) */ {
+      for ( i = max( 0, lineOfPos + 1 ); i < nVisLines + lineDelta; i++ )
+        lineStarts[ i ] = lineStarts[ i - lineDelta ] +
+        ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta );
+    }
+    /* fill in the missing line starts */
+    if ( linesInserted >= 0 )
+      calc_line_starts( lineOfPos + 1, lineOfPos + linesInserted );
+    if ( lineDelta < 0 )
+      calc_line_starts( nVisLines + lineDelta, nVisLines );
+    /* calculate lastChar by finding the end of the last displayed line */
+    calc_last_char();
+    *scrolled = 0;
+    return;
+  }
+  
+  /* Change was past the end of the displayed text, but displayable by virtue
+   of being an insert at the end of the buffer into visible blank lines */
+  if ( empty_vlines() ) {
+    position_to_line( pos, &lineOfPos );
+    calc_line_starts( lineOfPos, lineOfPos + linesInserted );
+    calc_last_char();
+    *scrolled = 0;
+    return;
+  }
+  
+  /* Change was beyond the end of the buffer and not visible, do nothing */
+  *scrolled = 0;
+}
+
+
+
+/**
+ \brief Update the line start arrays.
+ 
+ Scan through the text in the "textD"'s buffer and recalculate the line
+ starts array values beginning at index "startLine" and continuing through
+ (including) "endLine".  It assumes that the line starts entry preceding
+ "startLine" (or mFirstChar if startLine is 0) is good, and re-counts
+ newlines to fill in the requested entries.  Out of range values for
+ "startLine" and "endLine" are acceptable.
+ 
+ \param startLine, endLine range of lines to scan as line numbers
+ */
+void fltk3::TextDisplay::calc_line_starts( int startLine, int endLine ) {
+  int startPos, bufLen = mBuffer->length();
+  int line, lineEnd, nextLineStart, nVis = mNVisibleLines;
+  int *lineStarts = mLineStarts;
+  
+  /* Clean up (possibly) messy input parameters */
+  if ( endLine < 0 ) endLine = 0;
+  if ( endLine >= nVis ) endLine = nVis - 1;
+  if ( startLine < 0 ) startLine = 0;
+  if ( startLine >= nVis ) startLine = nVis - 1;
+  if ( startLine > endLine )
+    return;
+  
+  /* Find the last known good line number -> position mapping */
+  if ( startLine == 0 ) {
+    lineStarts[ 0 ] = mFirstChar;
+    startLine = 1;
+  }
+  startPos = lineStarts[ startLine - 1 ];
+  
+  /* If the starting position is already past the end of the text,
+   fill in -1's (means no text on line) and return */
+  if ( startPos == -1 ) {
+    for ( line = startLine; line <= endLine; line++ )
+      lineStarts[ line ] = -1;
+    return;
+  }
+  
+  /* Loop searching for ends of lines and storing the positions of the
+   start of the next line in lineStarts */
+  for ( line = startLine; line <= endLine; line++ ) {
+    find_line_end(startPos, true, &lineEnd, &nextLineStart);
+    startPos = nextLineStart;
+    if ( startPos >= bufLen ) {
+      /* If the buffer ends with a newline or line break, put
+       buf->length() in the next line start position (instead of
+       a -1 which is the normal marker for an empty line) to
+       indicate that the cursor may safely be displayed there */
+      if ( line == 0 || ( lineStarts[ line - 1 ] != bufLen &&
+                         lineEnd != nextLineStart ) ) {
+        lineStarts[ line ] = bufLen;
+        line++;
+      }
+      break;
+    }
+    lineStarts[ line ] = startPos;
+  }
+  
+  /* Set any entries beyond the end of the text to -1 */
+  for ( ; line <= endLine; line++ )
+    lineStarts[ line ] = -1;
+}
+
+
+
+/**
+ \brief Update last display character index.
+ 
+ Given a fltk3::TextDisplay with a complete, up-to-date lineStarts array, update
+ the lastChar entry to point to the last buffer position displayed.
+ */
+void fltk3::TextDisplay::calc_last_char() {
+  int i;
+  for (i = mNVisibleLines - 1; i >= 0 && mLineStarts[i] == -1; i--) ;
+  mLastChar = i < 0 ? 0 : line_end(mLineStarts[i], true);
+}
+
+
+
+/**  
+ \brief Scrolls the current buffer to start at the specified line and column.
+ \param topLineNum top line number
+ \param horizOffset column number
+ \todo Column numbers make little sense here.
+ */
+void fltk3::TextDisplay::scroll(int topLineNum, int horizOffset) {
+  mTopLineNumHint = topLineNum;
+  mHorizOffsetHint = horizOffset;
+  resize(x(), y(), w(), h());
+}
+
+
+
+/**  
+ \brief Scrolls the current buffer to start at the specified line and column.
+ \param topLineNum top line number
+ \param horizOffset in pixels
+ \return 0 if nothing changed, 1 if we scrolled
+ */
+int fltk3::TextDisplay::scroll_(int topLineNum, int horizOffset) {
+  /* Limit the requested scroll position to allowable values */
+  if (topLineNum > mNBufferLines + 3 - mNVisibleLines)
+    topLineNum = mNBufferLines + 3 - mNVisibleLines;
+  if (topLineNum < 1) topLineNum = 1;
+  
+  if (horizOffset > longest_vline() - text_area.w)
+    horizOffset = longest_vline() - text_area.w;
+  if (horizOffset < 0) horizOffset = 0;
+  
+  /* Do nothing if scroll position hasn't actually changed or there's no
+   window to draw in yet */
+  if (mHorizOffset == horizOffset && mTopLineNum == topLineNum)
+    return 0;
+  
+  /* If the vertical scroll position has changed, update the line
+   starts array and related counters in the text display */
+  offset_line_starts(topLineNum);
+  
+  /* Just setting mHorizOffset is enough information for redisplay */
+  mHorizOffset = horizOffset;
+  
+  // redraw all text
+  damage(fltk3::DAMAGE_EXPOSE);
+  return 1;
+}
+
+
+
+/**
+ \brief Update vertical scrollbar.
+ 
+ Update the minimum, maximum, slider size, page increment, and value
+ for vertical scrollbar.
+ */
+void fltk3::TextDisplay::update_v_scrollbar() {
+  /* The vertical scrollbar value and slider size directly represent the top
+   line number, and the number of visible lines respectively.  The scroll
+   bar maximum value is chosen to generally represent the size of the whole
+   buffer, with minor adjustments to keep the scrollbar widget happy */
+#ifdef DEBUG
+  printf("fltk3::TextDisplay::update_v_scrollbar():\n"
+         "    mTopLineNum=%d, mNVisibleLines=%d, mNBufferLines=%d\n",
+	 mTopLineNum, mNVisibleLines, mNBufferLines);
+#endif // DEBUG
+  
+  mVScrollBar->value(mTopLineNum, mNVisibleLines, 1, mNBufferLines+2);
+  mVScrollBar->linesize(3);
+}
+
+
+/**
+ \brief Update vertical scrollbar.
+ 
+ Update the minimum, maximum, slider size, page increment, and value
+ for the horizontal scrollbar.
+ */
+void fltk3::TextDisplay::update_h_scrollbar() {
+  int sliderMax = max(longest_vline(), text_area.w + mHorizOffset);
+  mHScrollBar->value( mHorizOffset, text_area.w, 0, sliderMax );
+}
+
+
+
+/**
+ \brief Callbacks for drag or valueChanged on scrollbars.
+ */
+void fltk3::TextDisplay::v_scrollbar_cb(fltk3::Scrollbar* b, fltk3::TextDisplay* textD) {
+  if (b->value() == textD->mTopLineNum) return;
+  textD->scroll(b->value(), textD->mHorizOffset);
+}
+
+
+
+/**
+ \brief Callbacks for drag or valueChanged on scrollbars.
+ */
+void fltk3::TextDisplay::h_scrollbar_cb(fltk3::Scrollbar* b, fltk3::TextDisplay* textD) {
+  if (b->value() == textD->mHorizOffset) return;
+  textD->scroll(textD->mTopLineNum, b->value());
+}
+
+
+
+/**
+ \brief Refresh the line number area.  
+ 
+ If clearAll is False, writes only over the character cell areas.  Setting 
+ clearAll to True will clear out any stray marks outside of the character cell 
+ area, which might have been left from before a resize or font change.
+ 
+ This function is not used.
+ */
+void fltk3::TextDisplay::draw_line_numbers(bool /*clearAll*/) {
+#if 0
+  int y, line, visLine, nCols, lineStart;
+  char lineNumString[12];
+  int lineHeight = mMaxsize ? mMaxsize : textsize();
+  int charWidth = TMPFONTWIDTH;   //mFontStruct->max_bounds.width;
+  
+  /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is
+   not yet realized */
+  if (mLineNumWidth == 0 || visible_r())
+    return;
+  
+  /* GC is allocated on demand, since not everyone will use line numbering */
+  if (textD->lineNumGC == NULL) {
+    XGCValues values;
+    values.foreground = textD->lineNumFGPixel;
+    values.background = textD->bgPixel;
+    values.font = textD->fontStruct->fid;
+    textD->lineNumGC = XtGetGC(textD->w,
+                               GCFont| GCForeground | GCBackground, &values);
+  }
+  
+  /* Erase the previous contents of the line number area, if requested */
+  if (clearAll)
+    XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft,
+               textD->top, textD->lineNumWidth, textD->height, False);
+  
+  /* Draw the line numbers, aligned to the text */
+  nCols = min(11, textD->lineNumWidth / charWidth);
+  y = textD->top;
+  line = getAbsTopLineNum(textD);
+  for (visLine=0; visLine < textD->nVisibleLines; visLine++) {
+    lineStart = textD->lineStarts[visLine];
+    if (lineStart != -1 && (lineStart==0 ||
+                            BufGetCharacter(textD->buffer, lineStart-1)=='\n')) {
+      sprintf(lineNumString, "%*d", nCols, line);
+      XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w),
+                       textD->lineNumGC, textD->lineNumLeft, y + textD->ascent,
+                       lineNumString, strlen(lineNumString));
+      line++;
+    } else {
+      XClearArea(XtDisplay(textD->w), XtWindow(textD->w),
+                 textD->lineNumLeft, y, textD->lineNumWidth,
+                 textD->ascent + textD->descent, False);
+      if (visLine == 0)
+        line++;
+    }
+    y += lineHeight;
+  }
+#endif
+}
+
+static int max( int i1, int i2 ) {
+  return i1 >= i2 ? i1 : i2;
+}
+
+static int min( int i1, int i2 ) {
+  return i1 <= i2 ? i1 : i2;
+}
+
+
+
+/**
+ Count the number of newlines in a null-terminated text string;
+ */
+static int countlines( const char *string ) {
+  IS_UTF8_ALIGNED(string)
+
+  const char * c;
+  int lineCount = 0;
+  
+  if (!string) return 0;
+  
+  for ( c = string; *c != '\0'; c++ )
+    if ( *c == '\n' ) lineCount++;
+  return lineCount;
+}
+
+
+
+
+/**
+ \brief Returns the width in pixels of the displayed line pointed to by "visLineNum".
+ \param visLineNum index into visible lines array
+ \return width of line in pixels
+ */
+int fltk3::TextDisplay::measure_vline( int visLineNum ) const {
+  int lineLen = vline_length( visLineNum );
+  int lineStartPos = mLineStarts[ visLineNum ];
+  if (lineStartPos < 0 || lineLen == 0) return 0;
+  return handle_vline(GET_WIDTH, lineStartPos, lineLen, 0, 0, 0, 0, 0, 0);
+}
+
+
+
+/**
+ \brief Return true if there are lines visible with no corresponding buffer text.
+ \return 1 if there are empty lines
+ */
+int fltk3::TextDisplay::empty_vlines() const {
+  return (mNVisibleLines > 0) && (mLineStarts[ mNVisibleLines - 1 ] == -1);
+}
+
+
+
+/**
+ \brief Count number of bytes in a visible line.
+ 
+ Return the length of a line (number of bytes) by examining
+ entries in the line starts array rather than by scanning for newlines.
+ 
+ \param visLineNum index of line in visible line array
+ \return number of bytes in this line
+ */
+int fltk3::TextDisplay::vline_length( int visLineNum ) const {
+  int nextLineStart, lineStartPos;
+  
+  if (visLineNum < 0 || visLineNum >= mNVisibleLines)
+    return (0);
+  
+  lineStartPos = mLineStarts[ visLineNum ];
+  
+  if ( lineStartPos == -1 )
+    return 0;
+  
+  if ( visLineNum + 1 >= mNVisibleLines )
+    return mLastChar - lineStartPos;
+  
+  nextLineStart = mLineStarts[ visLineNum + 1 ];
+  if ( nextLineStart == -1 )
+    return mLastChar - lineStartPos;
+  
+  int nextLineStartMinus1 = buffer()->prev_char(nextLineStart);
+  if (wrap_uses_character(nextLineStartMinus1))
+    return nextLineStartMinus1 - lineStartPos;
+  
+  return nextLineStart - lineStartPos;
+}
+
+
+
+/**
+ \brief Wrapping calculations.
+ 
+ When continuous wrap is on, and the user inserts or deletes characters,
+ wrapping can happen before and beyond the changed position.  This routine
+ finds the extent of the changes, and counts the deleted and inserted lines
+ over that range.  It also attempts to minimize the size of the range to
+ what has to be counted and re-displayed, so the results can be useful
+ both for delimiting where the line starts need to be recalculated, and
+ for deciding what part of the text to redisplay.
+ 
+ \param deletedText
+ \param pos
+ \param nInserted
+ \param nDeleted
+ \param modRangeStart
+ \param modRangeEnd
+ \param linesInserted
+ \param linesDeleted
+ */
+void fltk3::TextDisplay::find_wrap_range(const char *deletedText, int pos,
+                                      int nInserted, int nDeleted, 
+                                      int *modRangeStart, int *modRangeEnd,
+                                      int *linesInserted, int *linesDeleted) {
+  IS_UTF8_ALIGNED(deletedText)
+  IS_UTF8_ALIGNED2(buffer(), pos)
+
+  int length, retPos, retLines, retLineStart, retLineEnd;
+  fltk3::TextBuffer *deletedTextBuf, *buf = buffer();
+  int nVisLines = mNVisibleLines;
+  int *lineStarts = mLineStarts;
+  int countFrom, countTo, lineStart, adjLineStart, i;
+  int visLineNum = 0, nLines = 0;
+  
+  /*
+   ** Determine where to begin searching: either the previous newline, or
+   ** if possible, limit to the start of the (original) previous displayed
+   ** line, using information from the existing line starts array
+   */
+  if (pos >= mFirstChar && pos <= mLastChar) {
+    for (i=nVisLines-1; i>0; i--) {
+      if (lineStarts[i] != -1 && pos >= lineStarts[i]) {
+        break;
+      }
+    }
+    if (i > 0) {
+      countFrom = lineStarts[i-1];
+      visLineNum = i-1;
+    } else {
+      countFrom = buf->line_start(pos);
+    }
+  } else {
+    countFrom = buf->line_start(pos);
+  }
+  
+  IS_UTF8_ALIGNED2(buf, countFrom)
+  
+  /*
+   ** Move forward through the (new) text one line at a time, counting
+   ** displayed lines, and looking for either a real newline, or for the
+   ** line starts to re-sync with the original line starts array
+   */
+  lineStart = countFrom;
+  *modRangeStart = countFrom;
+  for (;;) {
+    
+    /* advance to the next line.  If the line ended in a real newline
+     or the end of the buffer, that's far enough */
+    wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0,
+                         &retPos, &retLines, &retLineStart, &retLineEnd);
+    if (retPos >= buf->length()) {
+      countTo = buf->length();
+      *modRangeEnd = countTo;
+      if (retPos != retLineEnd)
+        nLines++;
+      break;
+    } else {
+      lineStart = retPos;
+    }
+    nLines++;
+    if (lineStart > pos + nInserted && buf->char_at(buf->prev_char(lineStart)) == '\n') {
+      countTo = lineStart;
+      *modRangeEnd = lineStart;
+      break;
+    }
+    
+    /* Don't try to resync in continuous wrap mode with non-fixed font
+     sizes; it would result in a chicken-and-egg dependency between
+     the calculations for the inserted and the deleted lines. 
+     If we're in that mode, the number of deleted lines is calculated in
+     advance, without resynchronization, so we shouldn't resynchronize
+     for the inserted lines either. */
+    if (mSuppressResync)
+      continue;
+    
+    /* check for synchronization with the original line starts array
+     before pos, if so, the modified range can begin later */
+    if (lineStart <= pos) {
+      while (visLineNum<nVisLines && lineStarts[visLineNum] < lineStart)
+        visLineNum++;
+      if (visLineNum < nVisLines && lineStarts[visLineNum] == lineStart) {
+        countFrom = lineStart;
+        nLines = 0;
+        if (visLineNum+1 < nVisLines && lineStarts[visLineNum+1] != -1)
+          *modRangeStart = min(pos, buf->prev_char(lineStarts[visLineNum+1]));
+        else
+          *modRangeStart = countFrom;
+      } else
+        *modRangeStart = min(*modRangeStart, buf->prev_char(lineStart));
+    }
+    
+    /* check for synchronization with the original line starts array
+     after pos, if so, the modified range can end early */
+    else if (lineStart > pos + nInserted) {
+      adjLineStart = lineStart - nInserted + nDeleted;
+      while (visLineNum<nVisLines && lineStarts[visLineNum]<adjLineStart)
+        visLineNum++;
+      if (visLineNum < nVisLines && lineStarts[visLineNum] != -1 &&
+          lineStarts[visLineNum] == adjLineStart) {
+        countTo = line_end(lineStart, true);
+        *modRangeEnd = lineStart;
+        break;
+      }
+    }
+  }
+  *linesInserted = nLines;
+  
+  
+  /* Count deleted lines between countFrom and countTo as the text existed
+   before the modification (that is, as if the text between pos and
+   pos+nInserted were replaced by "deletedText").  This extra context is
+   necessary because wrapping can occur outside of the modified region
+   as a result of adding or deleting text in the region. This is done by
+   creating a textBuffer containing the deleted text and the necessary
+   additional context, and calling the wrappedLineCounter on it.
+   
+   NOTE: This must not be done in continuous wrap mode when the font
+   width is not fixed. In that case, the calculation would try
+   to access style information that is no longer available (deleted
+   text), or out of date (updated highlighting), possibly leading 
+   to completely wrong calculations and/or even crashes eventually.
+   (This is not theoretical; it really happened.)
+   
+   In that case, the calculation of the number of deleted lines
+   has happened before the buffer was modified (only in that case,
+   because resynchronization of the line starts is impossible
+   in that case, which makes the whole calculation less efficient).
+   */
+  if (mSuppressResync) {
+    *linesDeleted = mNLinesDeleted;
+    mSuppressResync = 0;
+    return;
+  }
+  
+  length = (pos-countFrom) + nDeleted +(countTo-(pos+nInserted));
+  deletedTextBuf = new fltk3::TextBuffer(length);
+  deletedTextBuf->copy(buffer(), countFrom, pos, 0);
+  if (nDeleted != 0)
+    deletedTextBuf->insert(pos-countFrom, deletedText);
+  deletedTextBuf->copy(buffer(), pos+nInserted, countTo, pos-countFrom+nDeleted);
+  /* Note that we need to take into account an offset for the style buffer:
+   the deletedTextBuf can be out of sync with the style buffer. */
+  wrapped_line_counter(deletedTextBuf, 0, length, INT_MAX, true, countFrom, 
+                       &retPos, &retLines, &retLineStart, &retLineEnd, false);
+  delete deletedTextBuf;
+  *linesDeleted = retLines;
+  mSuppressResync = 0;
+}
+
+
+
+/**
+ \brief Wrapping calculations.
+ 
+ This is a stripped-down version of the findWrapRange() function above,
+ intended to be used to calculate the number of "deleted" lines during
+ a buffer modification. It is called _before_ the modification takes place.
+ 
+ This function should only be called in continuous wrap mode with a
+ non-fixed font width. In that case, it is impossible to calculate
+ the number of deleted lines, because the necessary style information 
+ is no longer available _after_ the modification. In other cases, we
+ can still perform the calculation afterwards (possibly even more
+ efficiently).
+
+ \param pos
+ \param nDeleted
+ */
+void fltk3::TextDisplay::measure_deleted_lines(int pos, int nDeleted) {
+  IS_UTF8_ALIGNED2(buffer(), pos)
+
+  int retPos, retLines, retLineStart, retLineEnd;
+  fltk3::TextBuffer *buf = buffer();
+  int nVisLines = mNVisibleLines;
+  int *lineStarts = mLineStarts;
+  int countFrom, lineStart;
+  int visLineNum = 0, nLines = 0, i;
+  /*
+   ** Determine where to begin searching: either the previous newline, or
+   ** if possible, limit to the start of the (original) previous displayed
+   ** line, using information from the existing line starts array
+   */
+  if (pos >= mFirstChar && pos <= mLastChar) {
+    for (i=nVisLines-1; i>0; i--)
+      if (lineStarts[i] != -1 && pos >= lineStarts[i])
+        break;
+    if (i > 0) {
+      countFrom = lineStarts[i-1];
+      visLineNum = i-1;
+    } else
+      countFrom = buf->line_start(pos);
+  } else
+    countFrom = buf->line_start(pos);
+  
+  /*
+   ** Move forward through the (new) text one line at a time, counting
+   ** displayed lines, and looking for either a real newline, or for the
+   ** line starts to re-sync with the original line starts array
+   */
+  lineStart = countFrom;
+  for (;;) {
+    /* advance to the next line.  If the line ended in a real newline
+     or the end of the buffer, that's far enough */
+    wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0,
+                         &retPos, &retLines, &retLineStart, &retLineEnd);
+    if (retPos >= buf->length()) {
+      if (retPos != retLineEnd)
+        nLines++;
+      break;
+    } else
+      lineStart = retPos;
+    nLines++;
+    if (lineStart > pos + nDeleted && buf->char_at(lineStart-1) == '\n') {
+      break;
+    }
+    
+    /* Unlike in the findWrapRange() function above, we don't try to 
+     resync with the line starts, because we don't know the length 
+     of the inserted text yet, nor the updated style information. 
+     
+     Because of that, we also shouldn't resync with the line starts
+     after the modification either, because we must perform the
+     calculations for the deleted and inserted lines in the same way. 
+     
+     This can result in some unnecessary recalculation and redrawing
+     overhead, and therefore we should only use this two-phase mode
+     of calculation when it's really needed (continuous wrap + variable
+     font width). */
+  }
+  mNLinesDeleted = nLines;
+  mSuppressResync = 1;
+}
+
+
+
+/**
+ \brief Wrapping calculations.
+ 
+ Count forward from startPos to either maxPos or maxLines (whichever is
+ reached first), and return all relevant positions and line count.
+ The provided textBuffer may differ from the actual text buffer of the
+ widget. In that case it must be a (partial) copy of the actual text buffer
+ and the styleBufOffset argument must indicate the starting position of the
+ copy, to take into account the correct style information.
+
+ \param buf
+ \param startPos
+ \param maxPos
+ \param maxLines
+ \param startPosIsLineStart
+ \param styleBufOffset
+
+ \param[out] retPos Position where counting ended.  When counting lines, the
+    position returned is the start of the line "maxLines" lines 
+    beyond "startPos".
+ \param[out] retLines Number of line breaks counted
+ \param[out] retLineStart Start of the line where counting ended
+ \param[out] retLineEnd End position of the last line traversed
+ \param[out] countLastLineMissingNewLine
+ */
+void fltk3::TextDisplay::wrapped_line_counter(fltk3::TextBuffer *buf, int startPos,
+                                           int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset,
+                                           int *retPos, int *retLines, int *retLineStart, int *retLineEnd,
+                                           bool countLastLineMissingNewLine) const {
+  IS_UTF8_ALIGNED2(buf, startPos)
+  IS_UTF8_ALIGNED2(buf, maxPos)
+
+  int lineStart, newLineStart = 0, b, p, colNum, wrapMarginPix;
+  int i, foundBreak;
+  double width;
+  int nLines = 0;
+  unsigned int c;
+  
+  /* Set the wrap margin to the wrap column or the view width */
+  if (mWrapMarginPix != 0) {
+    wrapMarginPix = mWrapMarginPix;
+  } else {
+    wrapMarginPix = text_area.w;
+  }
+  
+  /* Find the start of the line if the start pos is not marked as a
+   line start. */
+  if (startPosIsLineStart)
+    lineStart = startPos;
+  else
+    lineStart = line_start(startPos);
+  
+  /*
+   ** Loop until position exceeds maxPos or line count exceeds maxLines.
+   ** (actually, continues beyond maxPos to end of line containing maxPos,
+   ** in case later characters cause a word wrap back before maxPos)
+   */
+  colNum = 0;
+  width = 0;
+  for (p=lineStart; p<buf->length(); p=buf->next_char(p)) {
+    c = buf->char_at(p);  // UCS-4
+    
+    /* If the character was a newline, count the line and start over,
+     otherwise, add it to the width and column counts */
+    if (c == '\n') {
+      if (p >= maxPos) {
+        *retPos = maxPos;
+        *retLines = nLines;
+        *retLineStart = lineStart;
+        *retLineEnd = maxPos;
+        return;
+      }
+      nLines++;
+      int p1 = buf->next_char(p);
+      if (nLines >= maxLines) {
+        *retPos = p1;
+        *retLines = nLines;
+        *retLineStart = p1;
+        *retLineEnd = p;
+        return;
+      }
+      lineStart = p1;
+      colNum = 0;
+      width = 0;
+    } else {
+      const char *s = buf->address(p);
+      colNum++;
+      // FIXME: it is not a good idea to simply add character widths because on
+      // some platforms, the width is a floating point value and depends on the 
+      // previous character as well.
+      width += measure_proportional_character(s, (int)width, p+styleBufOffset);
+    }
+    
+    /* If character exceeded wrap margin, find the break point and wrap there */
+    if (width > wrapMarginPix) {
+      foundBreak = false;
+      for (b=p; b>=lineStart; b=buf->prev_char(b)) {
+        c = buf->char_at(b);
+        if (c == '\t' || c == ' ') {
+          newLineStart = buf->next_char(b);
+          colNum = 0;
+          width = 0;
+          int iMax = buf->next_char(p);
+          for (i=buf->next_char(b); i<iMax; i = buf->next_char(i)) {
+            width += measure_proportional_character(buf->address(i), (int)width, 
+                                                    i+styleBufOffset);
+            colNum++;
+          }
+          foundBreak = true;
+          break;
+        }
+      }
+      if (!foundBreak) { /* no whitespace, just break at margin */
+        newLineStart = max(p, buf->next_char(lineStart));
+        const char *s = buf->address(b);
+        colNum++;
+        width = measure_proportional_character(s, 0, p+styleBufOffset);
+      }
+      if (p >= maxPos) {
+        *retPos = maxPos;
+        *retLines = maxPos < newLineStart ? nLines : nLines + 1;
+        *retLineStart = maxPos < newLineStart ? lineStart : newLineStart;
+        *retLineEnd = maxPos;
+        return;
+      }
+      nLines++;
+      if (nLines >= maxLines) {
+        *retPos = foundBreak ? buf->next_char(b) : max(p, buf->next_char(lineStart));
+        *retLines = nLines;
+        *retLineStart = lineStart;
+        *retLineEnd = foundBreak ? b : p;
+        return;
+      }
+      lineStart = newLineStart;
+    }
+  }
+  
+  /* reached end of buffer before reaching pos or line target */
+  *retPos = buf->length();
+  *retLines = nLines;
+  if (countLastLineMissingNewLine && colNum > 0) 
+    *retLines = buf->next_char(*retLines);
+  *retLineStart = lineStart;
+  *retLineEnd = buf->length();
+}
+
+
+
+/**
+ \brief Wrapping calculations.
+ 
+ Measure the width in pixels of the first character of string "s" at a
+ particular column "colNum" and buffer position "pos".  This is for measuring
+ characters in proportional or mixed-width highlighting fonts.
+
+ A note about proportional and mixed-width fonts: the mixed width and
+ proportional font code in nedit does not get much use in general editing,
+ because nedit doesn't allow per-language-mode fonts, and editing programs
+ in a proportional font is usually a bad idea, so very few users would
+ choose a proportional font as a default.  There are still probably mixed-
+ width syntax highlighting cases where things don't redraw properly for
+ insertion/deletion, though static display and wrapping and resizing
+ should now be solid because they are now used for online help display.
+ 
+ \param s text string
+ \param xPix x pixel position needed for calculating tab widths
+ \param pos offset within string
+ \return width of character in pixels
+ */
+double fltk3::TextDisplay::measure_proportional_character(const char *s, int xPix, int pos) const {
+  IS_UTF8_ALIGNED(s)
+  
+  if (*s=='\t') {
+    int tab = (int)col_to_x(mBuffer->tab_distance());
+    return (((xPix/tab)+1)*tab) - xPix;
+  }
+  
+  int charLen = fltk3::utf8len1(*s), style = 0;
+  if (mStyleBuffer) {
+    style = mStyleBuffer->byte_at(pos);
+  }
+  return string_width(s, charLen, style);
+}
+
+
+
+/**
+ \brief Finds both the end of the current line and the start of the next line.  
+ 
+ Why?
+ In continuous wrap mode, if you need to know both, figuring out one from the
+ other can be expensive or error prone.  The problem comes when there's a
+ trailing space or tab just before the end of the buffer.  To translate an
+ end of line value to or from the next lines start value, you need to know
+ whether the trailing space or tab is being used as a line break or just a
+ normal character, and to find that out would otherwise require counting all
+ the way back to the beginning of the line.
+ 
+ \param startPos
+ \param startPosIsLineStart
+ \param[out] lineEnd
+ \param[out] nextLineStart
+ */
+void fltk3::TextDisplay::find_line_end(int startPos, bool startPosIsLineStart,
+                                    int *lineEnd, int *nextLineStart) const {
+  IS_UTF8_ALIGNED2(buffer(), startPos)
+
+  int retLines, retLineStart;
+  
+  /* if we're not wrapping use more efficient BufEndOfLine */
+  if (!mContinuousWrap) {
+    int le = buffer()->line_end(startPos);
+    int ls = buffer()->next_char(le);
+    *lineEnd = le;
+    *nextLineStart = min(buffer()->length(), ls);
+    return;
+  }
+  
+  /* use the wrapped line counter routine to count forward one line */
+  wrapped_line_counter(buffer(), startPos, buffer()->length(),
+                       1, startPosIsLineStart, 0, nextLineStart, &retLines,
+                       &retLineStart, lineEnd);
+}
+
+
+
+/**
+ \brief Check if the line break is caused by a \\n or by line wrapping.
+ 
+ Line breaks in continuous wrap mode usually happen at newlines or
+ whitespace.  This line-terminating character is not included in line
+ width measurements and has a special status as a non-visible character.
+ However, lines with no whitespace are wrapped without the benefit of a
+ line terminating character, and this distinction causes endless trouble
+ with all of the text display code which was originally written without
+ continuous wrap mode and always expects to wrap at a newline character.
+
+ Given the position of the end of the line, as returned by TextDEndOfLine
+ or BufEndOfLine, this returns true if there is a line terminating
+ character, and false if there's not.  On the last character in the
+ buffer, this function can't tell for certain whether a trailing space was
+ used as a wrap point, and just guesses that it wasn't.  So if an exact
+ accounting is necessary, don't use this function.
+ 
+ \param lineEndPos index of character where the line wraps
+ \return 1 if a \\n character causes the line wrap
+ */ 
+int fltk3::TextDisplay::wrap_uses_character(int lineEndPos) const {
+  IS_UTF8_ALIGNED2(buffer(), lineEndPos)
+
+  unsigned int c;
+  
+  if (!mContinuousWrap || lineEndPos == buffer()->length())
+    return 1;
+  
+  c = buffer()->char_at(lineEndPos);
+  return c == '\n' || ((c == '\t' || c == ' ') &&
+                       lineEndPos + 1 < buffer()->length());
+}
+
+
+
+/**
+ \brief I don't know what this does!
+ 
+ Extend the range of a redraw request (from *start to *end) with additional
+ redraw requests resulting from changes to the attached style buffer (which
+ contains auxiliary information for coloring or styling text).
+ 
+ \param startpos ??
+ \param endpos ??
+ 
+ \todo Unicode?
+ */
+void fltk3::TextDisplay::extend_range_for_styles( int *startpos, int *endpos ) {
+  IS_UTF8_ALIGNED2(buffer(), (*startpos))  
+  IS_UTF8_ALIGNED2(buffer(), (*endpos))  
+  
+  fltk3::TextSelection * sel = mStyleBuffer->primary_selection();
+  int extended = 0;
+  
+  /* The peculiar protocol used here is that modifications to the style
+   buffer are marked by selecting them with the buffer's primary fltk3::TextSelection.
+   The style buffer is usually modified in response to a modify callback on
+   the text buffer BEFORE fltk3::TextDisplay.c's modify callback, so that it can keep
+   the style buffer in step with the text buffer.  The style-update
+   callback can't just call for a redraw, because fltk3::TextDisplay hasn't processed
+   the original text changes yet.  Anyhow, to minimize redrawing and to
+   avoid the complexity of scheduling redraws later, this simple protocol
+   tells the text display's buffer modify callback to extend its redraw
+   range to show the text color/and font changes as well. */
+  if ( sel->selected() ) {
+    if ( sel->start() < *startpos ) {
+      *startpos = sel->start();
+      // somewhere while deleting, alignment is lost. We do this just to be sure.
+      *startpos = buffer()->utf8_align(*startpos);
+      IS_UTF8_ALIGNED2(buffer(), (*startpos))  
+      extended = 1;
+    }
+    if ( sel->end() > *endpos ) {
+      *endpos = sel->end();
+      *endpos = buffer()->utf8_align(*endpos);
+      IS_UTF8_ALIGNED2(buffer(), (*endpos))  
+      extended = 1;
+    }
+  }
+  
+  /* If the fltk3::TextSelection was extended due to a style change, and some of the
+   fonts don't match in spacing, extend redraw area to end of line to
+   redraw characters exposed by possible font size changes */
+  if ( extended )
+    *endpos = mBuffer->line_end( *endpos ) + 1;
+  
+  IS_UTF8_ALIGNED2(buffer(), (*endpos))
+}
+
+
+
+/**
+ \brief Draw the widget.
+ 
+ This function tries to limit drawing to smaller areas if possible.
+ */
+void fltk3::TextDisplay::draw(void) {
+  // don't even try if there is no associated text buffer!
+  if (!buffer()) { draw_box(); return; }
+  
+  fltk3::push_clip(x(),y(),w(),h());	// prevent drawing outside widget area
+  
+  // draw the non-text, non-scrollbar areas.
+  if (damage() & fltk3::DAMAGE_ALL) {
+    //    printf("drawing all (box = %d)\n", box());
+    if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) {
+      // if to printer, draw the background
+      fltk3::rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() );
+    }
+    // draw the box()
+    int W = w(), H = h();
+    draw_box(box(), x(), y(), W, H, color());
+    
+    if (mHScrollBar->visible())
+      W -= scrollbar_width();
+    if (mVScrollBar->visible())
+      H -= scrollbar_width();
+    
+    // left margin
+    fltk3::rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN,
+             LEFT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN,
+             color());
+    
+    // right margin
+    fltk3::rectf(text_area.x+text_area.w, text_area.y-TOP_MARGIN,
+             RIGHT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN,
+             color());
+    
+    // top margin
+    fltk3::rectf(text_area.x, text_area.y-TOP_MARGIN,
+             text_area.w, TOP_MARGIN, color());
+    
+    // bottom margin
+    fltk3::rectf(text_area.x, text_area.y+text_area.h,
+             text_area.w, BOTTOM_MARGIN, color());
+    
+    // draw that little box in the corner of the scrollbars
+    if (mVScrollBar->visible() && mHScrollBar->visible())
+      fltk3::rectf(mVScrollBar->x(), mHScrollBar->y(),
+               mVScrollBar->w(), mHScrollBar->h(),
+               fltk3::GRAY);
+    
+    // blank the previous cursor protrusions
+  }
+  else if (damage() & (fltk3::DAMAGE_SCROLL | fltk3::DAMAGE_EXPOSE)) {
+    //    printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY);
+    // CET - FIXME - save old cursor position instead and just draw side needed?
+    fltk3::push_clip(text_area.x-LEFT_MARGIN,
+                 text_area.y,
+                 text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
+                 text_area.h);
+    fltk3::rectf(text_area.x-LEFT_MARGIN, mCursorOldY,
+             LEFT_MARGIN, mMaxsize, color());
+    fltk3::rectf(text_area.x+text_area.w, mCursorOldY,
+             RIGHT_MARGIN, mMaxsize, color());
+    fltk3::pop_clip();
+  }
+  
+  // draw the scrollbars
+  if (damage() & (fltk3::DAMAGE_ALL | fltk3::DAMAGE_CHILD)) {
+    mVScrollBar->damage(fltk3::DAMAGE_ALL);
+    mHScrollBar->damage(fltk3::DAMAGE_ALL);
+  }
+  update_child(*mVScrollBar);
+  update_child(*mHScrollBar);
+  
+  // draw all of the text
+  if (damage() & (fltk3::DAMAGE_ALL | fltk3::DAMAGE_EXPOSE)) {
+    //printf("drawing all text\n");
+    int X, Y, W, H;
+    if (fltk3::clip_box(text_area.x, text_area.y, text_area.w, text_area.h,
+                    X, Y, W, H)) {
+      // Draw text using the intersected clipping box...
+      // (this sets the clipping internally)
+      draw_text(X, Y, W, H);
+    } else {
+      // Draw the whole area...
+      draw_text(text_area.x, text_area.y, text_area.w, text_area.h);
+    }
+  }
+  else if (damage() & fltk3::DAMAGE_SCROLL) {
+    // draw some lines of text
+    fltk3::push_clip(text_area.x, text_area.y,
+                 text_area.w, text_area.h);
+    //printf("drawing text from %d to %d\n", damage_range1_start, damage_range1_end);
+    draw_range(damage_range1_start, damage_range1_end);
+    if (damage_range2_end != -1) {
+      //printf("drawing text from %d to %d\n", damage_range2_start, damage_range2_end);
+      draw_range(damage_range2_start, damage_range2_end);
+    }
+    damage_range1_start = damage_range1_end = -1;
+    damage_range2_start = damage_range2_end = -1;
+    fltk3::pop_clip();
+  }
+  
+  // draw the text cursor
+  if (damage() & (fltk3::DAMAGE_ALL | fltk3::DAMAGE_SCROLL | fltk3::DAMAGE_EXPOSE)
+      && !buffer()->primary_selection()->selected() &&
+      mCursorOn && fltk3::focus() == (fltk3::Widget*)this ) {
+    fltk3::push_clip(text_area.x-LEFT_MARGIN,
+                 text_area.y,
+                 text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
+                 text_area.h);
+    
+    int X, Y;
+    if (position_to_xy(mCursorPos, &X, &Y)) draw_cursor(X, Y);
+    //    else puts("position_to_xy() failed - unable to draw cursor!");
+    //printf("drew cursor at pos: %d (%d,%d)\n", mCursorPos, X, Y);
+    mCursorOldY = Y;
+    fltk3::pop_clip();
+  }
+  fltk3::pop_clip();
+}
+
+
+namespace fltk3 {
+// this processes drag events due to mouse for fltk3::TextDisplay and
+// also drags due to cursor movement with shift held down for
+// fltk3::TextEditor
+void text_drag_me(int pos, fltk3::TextDisplay* d) {
+  if (d->dragType == fltk3::TextDisplay::DRAG_CHAR) {
+    if (pos >= d->dragPos) {
+      d->buffer()->select(d->dragPos, pos);
+    } else {
+      d->buffer()->select(pos, d->dragPos);
+    }
+    d->insert_position(pos);
+  } else if (d->dragType == fltk3::TextDisplay::DRAG_WORD) {
+    if (pos >= d->dragPos) {
+      d->insert_position(d->word_end(pos));
+      d->buffer()->select(d->word_start(d->dragPos), d->word_end(pos));
+    } else {
+      d->insert_position(d->word_start(pos));
+      d->buffer()->select(d->word_start(pos), d->word_end(d->dragPos));
+    }
+  } else if (d->dragType == fltk3::TextDisplay::DRAG_LINE) {
+    if (pos >= d->dragPos) {
+      d->insert_position(d->buffer()->line_end(pos)+1);
+      d->buffer()->select(d->buffer()->line_start(d->dragPos),
+                          d->buffer()->line_end(pos)+1);
+    } else {
+      d->insert_position(d->buffer()->line_start(pos));
+      d->buffer()->select(d->buffer()->line_start(pos),
+                          d->buffer()->line_end(d->dragPos)+1);
+    }
+  }
+}
+
+}
+
+
+/**
+ \brief Timer callback for scroll events.
+ 
+ This timer event scrolls the text view proportionally to
+ how far the mouse pointer has left the text area. This 
+ allows for smooth scrolling without "wiggeling" the mouse.
+ */
+void fltk3::TextDisplay::scroll_timer_cb(void *user_data) {
+  fltk3::TextDisplay *w = (fltk3::TextDisplay*)user_data;
+  int pos;
+  switch (scroll_direction) {
+    case 1: // mouse is to the right, scroll left
+      w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount);
+      pos = w->xy_to_position(w->text_area.x + w->text_area.w, scroll_y, CURSOR_POS);
+      break;
+    case 2: // mouse is to the left, scroll right
+      w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount);
+      pos = w->xy_to_position(w->text_area.x, scroll_y, CURSOR_POS);
+      break;
+    case 3: // mouse is above, scroll down
+      w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset);
+      pos = w->xy_to_position(scroll_x, w->text_area.y, CURSOR_POS);
+      break;
+    case 4: // mouse is below, scroll up
+      w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset);
+      pos = w->xy_to_position(scroll_x, w->text_area.y + w->text_area.h, CURSOR_POS);
+      break;
+    default:
+      return;
+  }
+  fltk3::text_drag_me(pos, w);
+  fltk3::repeat_timeout(.1, scroll_timer_cb, user_data);
+}
+
+
+
+/**
+ \brief Event handling.
+ */
+int fltk3::TextDisplay::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (!buffer()) return 0;
+  // This isn't very elegant!
+  if (!fltk3::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) &&
+      !dragging && event != fltk3::LEAVE && event != fltk3::ENTER &&
+      event != fltk3::MOVE && event != fltk3::FOCUS && event != fltk3::UNFOCUS &&
+      event != fltk3::KEYBOARD && event != fltk3::KEYUP) {
+    return Group::handle(event);
+  }
+  
+  switch (event) {
+    case fltk3::ENTER:
+    case fltk3::MOVE:
+      if (active_r()) {
+        if (fltk3::event_inside(text_area.x, text_area.y, text_area.w,
+	                     text_area.h)) window()->cursor(fltk3::CURSOR_INSERT);
+	else window()->cursor(fltk3::CURSOR_DEFAULT);
+	return 1;
+      } else {
+        return 0;
+      }
+      
+    case fltk3::LEAVE:
+    case fltk3::HIDE:
+      if (active_r() && window()) {
+        window()->cursor(fltk3::CURSOR_DEFAULT);
+        
+	return 1;
+      } else {
+	return 0;
+      }
+      
+    case fltk3::PUSH: {
+      if (active_r() && window()) {
+        if (fltk3::event_inside(text_area.x, text_area.y, text_area.w,
+                             text_area.h)) window()->cursor(fltk3::CURSOR_INSERT);
+        else window()->cursor(fltk3::CURSOR_DEFAULT);
+      }
+      
+      if (fltk3::focus() != this) {
+        fltk3::focus(this);
+        handle(fltk3::FOCUS);
+      }
+      if (Group::handle(event)) return 1;
+      if (fltk3::event_state()&fltk3::SHIFT) return handle(fltk3::DRAG);
+      dragging = 1;
+      int pos = xy_to_position(fltk3::event_x(), fltk3::event_y(), CURSOR_POS);
+      dragPos = pos;
+      if (buffer()->primary_selection()->includes(pos)) {
+        dragType = DRAG_START_DND;
+        return 1;
+      }
+      dragType = fltk3::event_clicks();
+      if (dragType == DRAG_CHAR) {
+        buffer()->unselect();
+//	Fl::copy("", 0, 0); /* removed for STR 2668 */
+      }
+      else if (dragType == DRAG_WORD) {
+        buffer()->select(word_start(pos), word_end(pos));
+	dragPos = word_start(pos);
+	}
+      
+      if (buffer()->primary_selection()->selected())
+        insert_position(buffer()->primary_selection()->end());
+      else
+        insert_position(pos);
+      show_insert_position();
+      return 1;
+    }
+      
+    case fltk3::DRAG: {
+      if (dragType==DRAG_NONE)
+        return 1;
+      if (dragType==DRAG_START_DND) {
+        if (!fltk3::event_is_click() && fltk3::dnd_text_ops()) {
+          const char* copy = buffer()->selection_text();
+          fltk3::dnd();
+          free((void*)copy);
+        }
+        return 1;
+      }
+      int X = fltk3::event_x(), Y = fltk3::event_y(), pos = insert_position();
+      // if we leave the text_area, we start a timer event
+      // that will take care of scrolling and selecting
+      if (Y < text_area.y) {
+        scroll_x = X;
+        scroll_amount = (Y - text_area.y) / 5 - 1;
+        if (!scroll_direction) {
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
+        }
+        scroll_direction = 3;
+      } else if (Y >= text_area.y+text_area.h) {
+        scroll_x = X;
+        scroll_amount = (Y - text_area.y - text_area.h) / 5 + 1;
+        if (!scroll_direction) {
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
+        }
+        scroll_direction = 4;
+      } else if (X < text_area.x) {
+        scroll_y = Y;
+        scroll_amount = (X - text_area.x) / 2 - 1;
+        if (!scroll_direction) {
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
+        }
+        scroll_direction = 2;
+      } else if (X >= text_area.x+text_area.w) {
+        scroll_y = Y;
+        scroll_amount = (X - text_area.x - text_area.w) / 2 + 1;
+        if (!scroll_direction) {
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
+        }
+        scroll_direction = 1;
+      } else {
+        if (scroll_direction) {
+          fltk3::remove_timeout(scroll_timer_cb, this);
+          scroll_direction = 0;
+        }
+        pos = xy_to_position(X, Y, CURSOR_POS);
+        pos = buffer()->next_char(pos);
+      }
+      fltk3::text_drag_me(pos, this);
+      return 1;
+    }
+      
+    case fltk3::RELEASE: {
+      if (fltk3::event_is_click() && (! fltk3::event_clicks()) && 
+	  buffer()->primary_selection()->includes(dragPos) && !(fltk3::event_state()&fltk3::SHIFT) ) {
+	buffer()->unselect(); // clicking in the selection: unselect and move cursor
+	insert_position(dragPos);
+	return 1;
+      } else if (fltk3::event_clicks() == DRAG_LINE && fltk3::event_button() == fltk3::LEFT_MOUSE) {
+        buffer()->select(buffer()->line_start(dragPos), buffer()->next_char(buffer()->line_end(dragPos)));
+	dragPos = line_start(dragPos);
+	dragType = DRAG_CHAR;
+      } else {
+	dragging = 0;
+	if (scroll_direction) {
+	  fltk3::remove_timeout(scroll_timer_cb, this);
+	  scroll_direction = 0;
+	}
+	
+	// convert from WORD or LINE selection to CHAR
+	/*if (insert_position() >= dragPos)
+	  dragPos = buffer()->primary_selection()->start();
+	else
+	  dragPos = buffer()->primary_selection()->end();*/
+	dragType = DRAG_CHAR;
+      }
+      
+      const char* copy = buffer()->selection_text();
+      if (*copy) fltk3::copy(copy, strlen(copy), 0);
+      free((void*)copy);
+      return 1;
+    }
+      
+    case fltk3::MOUSEWHEEL:
+      if (fltk3::event_dy()) return mVScrollBar->handle(event);
+      else return mHScrollBar->handle(event);
+      
+    case fltk3::UNFOCUS:
+      if (active_r() && window()) window()->cursor(fltk3::CURSOR_DEFAULT);
+    case fltk3::FOCUS:
+      if (buffer()->selected()) {
+        int start, end;
+        if (buffer()->selection_position(&start, &end))
+          redisplay_range(start, end);
+      }
+      if (buffer()->secondary_selected()) {
+        int start, end;
+        if (buffer()->secondary_selection_position(&start, &end))
+          redisplay_range(start, end);
+      }
+      if (buffer()->highlight()) {
+        int start, end;
+        if (buffer()->highlight_position(&start, &end))
+          redisplay_range(start, end);
+      }
+      return 1;
+      
+    case fltk3::KEYBOARD:
+      // Copy?
+      if ((fltk3::event_state()&(fltk3::CTRL|fltk3::COMMAND)) && fltk3::event_key()=='c') {
+        if (!buffer()->selected()) return 1;
+        const char *copy = buffer()->selection_text();
+        if (*copy) fltk3::copy(copy, strlen(copy), 1);
+        free((void*)copy);
+        return 1;
+      }
+      
+      // Select all ?
+      if ((fltk3::event_state()&(fltk3::CTRL|fltk3::COMMAND)) && fltk3::event_key()=='a') {
+        buffer()->select(0,buffer()->length());
+        const char *copy = buffer()->selection_text();
+        if (*copy) fltk3::copy(copy, strlen(copy), 0);
+        free((void*)copy);
+        return 1;
+      }
+      
+      if (mVScrollBar->handle(event)) return 1;
+      if (mHScrollBar->handle(event)) return 1;
+      
+      break;
+      
+    case fltk3::SHORTCUT:
+      if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut()))
+        return 0;
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+        fltk3::focus(this);
+        return 1;
+      }
+      break;
+      
+  }
+  
+  return 0;
+}
+
+
+/*
+ Convert an x pixel position into a column number.
+ */
+double fltk3::TextDisplay::x_to_col(double y) const
+{
+  if (!mColumnScale) {
+    mColumnScale = string_width("Mitg", 4, 'A') / 4.0;
+  }
+  return (y/mColumnScale)+0.5;
+}
+
+
+/**
+ Convert a column number into an x pixel position.
+ */
+double fltk3::TextDisplay::col_to_x(double col) const
+{
+  if (!mColumnScale) {
+    // recalculate column scale value
+    x_to_col(0); 
+  }
+  return col*mColumnScale;
+}
+
+
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Text_Display.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Text_Editor.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Text_Editor.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Text_Editor.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,656 @@
+//
+// "$Id$"
+//
+// Copyright 2001-2010 by Bill Spitzak and others.
+// Original code Copyright Mark Edel.  Permission to distribute under
+// the LGPL for the FLTK library granted by Mark Edel.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+#include <ctype.h>
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/TextEditor.h>
+#include <fltk3/ask.h>
+
+
+/* Keyboard Control Matrix
+
+key\modifier   plain  Ctrl   Alt  Meta  
+  left          1/1  13/9   0/13  0/9  
+  right         2/2  14/10  0/14  0/10  
+  up            3/19 21/7   0/15  0/17 
+  down          4/20 22/8   0/16  0/18
+  home          9/5  17/0   0/0   0/0
+  end          10/6  18/0   0/0   0/0
+  page up      11/7  23/0   0/11  0/0
+  page down    12/8  24/0   0/12  0/0
+    (FLTK action / OS X action)
+    (adding the shift key extends the selection, all other combinations are no-op)
+
+  0: no-op
+  1: move cursor to the left, at line beginning wrap to end of prev line, at doc start no-op
+  2: move cursor to the right, at line end move to beginning of the next line, at doc end no-op
+  3: move cursor up, at doc top no-op
+  4: move cursor down, at doc bottom no-op
+  5: scroll display to top of text (cursor unchanged)
+  6: scroll display to end of text (cursor unchanged)
+  7: scroll text down one page (cursor unchanged)
+  8: scroll text up one page (cursor unchanged)
+  9: move cursor to beginning of line
+ 10: move cursor to end of line
+ 11: move cursor up one page and scroll down
+ 12: move cursor down one page and scroll up
+ 13: move to the beginning of the word or the previous word
+ 14: move to the end of the word or the next word
+ 15: if start of line: start of prev line, else start of this line
+ 16: if end of line: end of next line, else end of this line
+ 17: move cursor to the beginning of the document
+ 18: move cursor to the end of the document
+ 19: move cursor up, at doc top: home, at doc start: no-op)
+ 20: move cursor down, at doc bot: end, at doc end: no-op)
+ 21: scroll text down one line (cursor unchanged)
+ 22: scroll text up one line (cursor unchanged)
+ 23: move cursor to the beginning of the top of the screen
+ 24: move cursor to the beginning of the bottom of the window
+*/
+
+/**  The constructor creates a new text editor widget.*/
+fltk3::TextEditor::TextEditor(int X, int Y, int W, int H,  const char* l)
+    : fltk3::TextDisplay(X, Y, W, H, l) {
+  mCursorOn = 1;
+  insert_mode_ = 1;
+  key_bindings = 0;
+
+  // handle the default key bindings
+  add_default_key_bindings(&key_bindings);
+
+  // handle everything else
+  default_key_function(kf_default);
+}
+
+#ifndef FLTK3_DOXYGEN
+fltk3::TextEditor::KeyBinding* fltk3::TextEditor::global_key_bindings = 0;
+#endif
+
+// These are the default key bindings every widget should start with
+static struct {
+  int key;
+  int state;
+  fltk3::TextEditor::KeyFunc func;
+} default_key_bindings[] = {
+  { fltk3::EscapeKey,    fltk3::TEXT_EDITOR_ANY_STATE, fltk3::TextEditor::kf_ignore     },
+  { fltk3::EnterKey,     fltk3::TEXT_EDITOR_ANY_STATE, fltk3::TextEditor::kf_enter      },
+  { fltk3::KPEnterKey,  fltk3::TEXT_EDITOR_ANY_STATE, fltk3::TextEditor::kf_enter      },
+  { fltk3::BackSpaceKey, fltk3::TEXT_EDITOR_ANY_STATE, fltk3::TextEditor::kf_backspace  },
+  { fltk3::InsertKey,    fltk3::TEXT_EDITOR_ANY_STATE, fltk3::TextEditor::kf_insert     },
+  { fltk3::DeleteKey,    fltk3::TEXT_EDITOR_ANY_STATE, fltk3::TextEditor::kf_delete     },
+  { fltk3::HomeKey,      0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::EndKey,       0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::LeftKey,      0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::UpKey,        0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::RightKey,     0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::DownKey,      0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::PageUpKey,   0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::PageDownKey, 0,                        fltk3::TextEditor::kf_move       },
+  { fltk3::HomeKey,      fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::EndKey,       fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::LeftKey,      fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::UpKey,        fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::RightKey,     fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::DownKey,      fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::PageUpKey,   fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::PageDownKey, fltk3::SHIFT,                 fltk3::TextEditor::kf_shift_move },
+  { fltk3::HomeKey,      fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::EndKey,       fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::LeftKey,      fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::UpKey,        fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::RightKey,     fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::DownKey,      fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::PageUpKey,   fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::PageDownKey, fltk3::CTRL,                  fltk3::TextEditor::kf_ctrl_move  },
+  { fltk3::HomeKey,      fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::EndKey,       fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::LeftKey,      fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::UpKey,        fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::RightKey,     fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::DownKey,      fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::PageUpKey,   fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+  { fltk3::PageDownKey, fltk3::CTRL|fltk3::SHIFT,         fltk3::TextEditor::kf_c_s_move   },
+//{ FL_Clear,	  0,                        fltk3::TextEditor::delete_to_eol },
+  { 'z',          fltk3::CTRL,                  fltk3::TextEditor::kf_undo	  },
+  { '/',          fltk3::CTRL,                  fltk3::TextEditor::kf_undo	  },
+  { 'x',          fltk3::CTRL,                  fltk3::TextEditor::kf_cut        },
+  { fltk3::DeleteKey,    fltk3::SHIFT,                 fltk3::TextEditor::kf_cut        },
+  { 'c',          fltk3::CTRL,                  fltk3::TextEditor::kf_copy       },
+  { fltk3::InsertKey,    fltk3::CTRL,                  fltk3::TextEditor::kf_copy       },
+  { 'v',          fltk3::CTRL,                  fltk3::TextEditor::kf_paste      },
+  { fltk3::InsertKey,    fltk3::SHIFT,                 fltk3::TextEditor::kf_paste      },
+  { 'a',          fltk3::CTRL,                  fltk3::TextEditor::kf_select_all },
+
+#ifdef __APPLE__
+  // Define CMD+key accelerators...
+  { 'z',          fltk3::COMMAND,               fltk3::TextEditor::kf_undo       },
+  { 'x',          fltk3::COMMAND,               fltk3::TextEditor::kf_cut        },
+  { 'c',          fltk3::COMMAND,               fltk3::TextEditor::kf_copy       },
+  { 'v',          fltk3::COMMAND,               fltk3::TextEditor::kf_paste      },
+  { 'a',          fltk3::COMMAND,               fltk3::TextEditor::kf_select_all },
+  { fltk3::LeftKey,      fltk3::COMMAND,               fltk3::TextEditor::kf_meta_move  },
+  { fltk3::RightKey,     fltk3::COMMAND,               fltk3::TextEditor::kf_meta_move  },
+  { fltk3::UpKey,        fltk3::COMMAND,               fltk3::TextEditor::kf_meta_move  },
+  { fltk3::DownKey,      fltk3::COMMAND,               fltk3::TextEditor::kf_meta_move  },
+  { fltk3::LeftKey,      fltk3::COMMAND|fltk3::SHIFT,      fltk3::TextEditor::kf_m_s_move   },
+  { fltk3::RightKey,     fltk3::COMMAND|fltk3::SHIFT,      fltk3::TextEditor::kf_m_s_move   },
+  { fltk3::UpKey,        fltk3::COMMAND|fltk3::SHIFT,      fltk3::TextEditor::kf_m_s_move   },
+  { fltk3::DownKey,      fltk3::COMMAND|fltk3::SHIFT,      fltk3::TextEditor::kf_m_s_move   },
+#endif // __APPLE__
+
+  { 0,            0,                        0                             }
+};
+
+/**  Adds all of the default editor key bindings to the specified key binding list.*/
+void fltk3::TextEditor::add_default_key_bindings(KeyBinding** list) {
+  for (int i = 0; default_key_bindings[i].key; i++) {
+    add_key_binding(default_key_bindings[i].key,
+                    default_key_bindings[i].state,
+                    default_key_bindings[i].func,
+                    list);
+  }
+}
+
+/**  Returns the function associated with a key binding.*/
+fltk3::TextEditor::KeyFunc fltk3::TextEditor::bound_key_function(unsigned int key, unsigned int state, KeyBinding* list) {
+  KeyBinding* cur;
+  for (cur = list; cur; cur = cur->next)
+    if (cur->key == key)
+      if (cur->state == fltk3::TEXT_EDITOR_ANY_STATE || cur->state == state)
+        break;
+  if (!cur) return 0;
+  return cur->function;
+}
+
+/**  Removes all of the key bindings associated with the text editor or list.*/
+void fltk3::TextEditor::remove_all_key_bindings(KeyBinding** list) {
+  KeyBinding *cur, *next;
+  for (cur = *list; cur; cur = next) {
+    next = cur->next;
+    delete cur;
+  }
+  *list = 0;
+}
+
+/** Removes the key binding associated with the key "key" of state "state" */
+void fltk3::TextEditor::remove_key_binding(unsigned int key, unsigned int state, KeyBinding** list) {
+  KeyBinding *cur, *last = 0;
+  for (cur = *list; cur; last = cur, cur = cur->next)
+    if (cur->key == key && cur->state == state) break;
+  if (!cur) return;
+  if (last) last->next = cur->next;
+  else *list = cur->next;
+  delete cur;
+}
+/** Adds a key of state "state" with the function "function" */
+void fltk3::TextEditor::add_key_binding(unsigned key, unsigned state, KeyFunc function,
+                                KeyBinding** list) {
+  KeyBinding* kb = new KeyBinding;
+  kb->key = key;
+  kb->state = state;
+  kb->function = function;
+  kb->next = *list;
+  *list = kb;
+}
+
+////////////////////////////////////////////////////////////////
+
+static void kill_selection(fltk3::TextEditor* e) {
+  if (e->buffer()->selected()) {
+    e->insert_position(e->buffer()->primary_selection()->start());
+    e->buffer()->remove_selection();
+  }
+}
+
+/** Inserts the text associated with the key */
+int fltk3::TextEditor::kf_default(unsigned c, fltk3::TextEditor* e) {
+  // FIXME: this function is a mess! Fix this!
+  if (!c || (!isprint(c) && c != '\t')) return 0;
+  char s[2] = "\0";
+  s[0] = (char)c;
+  kill_selection(e);
+  if (e->insert_mode()) e->insert(s);
+  else e->overstrike(s);
+  e->show_insert_position();
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return 1;
+}
+
+/** Ignores the keypress */
+int fltk3::TextEditor::kf_ignore(unsigned, fltk3::TextEditor*) {
+  return 0; // don't handle
+}
+/**  Does a backspace in the current buffer.*/
+int fltk3::TextEditor::kf_backspace(unsigned, fltk3::TextEditor* e) {
+  if (!e->buffer()->selected() && e->move_left()) {
+    int p1 = e->insert_position();
+    int p2 = e->buffer()->next_char(p1);
+    e->buffer()->select(p1, p2);
+  }
+  kill_selection(e);
+  e->show_insert_position();
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return 1;
+}
+
+/** Inserts a newline at the current cursor position */
+int fltk3::TextEditor::kf_enter(unsigned, fltk3::TextEditor* e) {
+  kill_selection(e);
+  e->insert("\n");
+  e->show_insert_position();
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return 1;
+}
+
+namespace fltk3 {
+  extern void text_drag_me(int pos, fltk3::TextDisplay* d);
+}
+
+/**  Moves the text cursor in the direction indicated by key c.*/
+int fltk3::TextEditor::kf_move(unsigned c, fltk3::TextEditor* e) {
+  int i;
+  int selected = e->buffer()->selected();
+  if (!selected)
+    e->dragPos = e->insert_position();
+  e->buffer()->unselect();
+  fltk3::copy("", 0, 0);
+  switch (c) {
+  case fltk3::HomeKey:
+      e->insert_position(e->buffer()->line_start(e->insert_position()));
+      break;
+    case fltk3::EndKey:
+      e->insert_position(e->buffer()->line_end(e->insert_position()));
+      break;
+    case fltk3::LeftKey:
+      e->move_left();
+      break;
+    case fltk3::RightKey:
+      e->move_right();
+      break;
+    case fltk3::UpKey:
+      e->move_up();
+      break;
+    case fltk3::DownKey:
+      e->move_down();
+      break;
+    case fltk3::PageUpKey:
+      for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_up();
+      break;
+    case fltk3::PageDownKey:
+      for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_down();
+      break;
+  }
+  e->show_insert_position();
+  return 1;
+}
+
+/**  Extends the current selection in the direction of key c.*/
+int fltk3::TextEditor::kf_shift_move(unsigned c, fltk3::TextEditor* e) {
+  kf_move(c, e);
+  fltk3::text_drag_me(e->insert_position(), e);
+  char *copy = e->buffer()->selection_text();
+  if (copy) {
+    fltk3::copy(copy, strlen(copy), 0);
+    free(copy);
+    }
+  return 1;
+}
+/** Moves the current text cursor in the direction indicated by control key */
+int fltk3::TextEditor::kf_ctrl_move(unsigned c, fltk3::TextEditor* e) {
+  if (!e->buffer()->selected())
+    e->dragPos = e->insert_position();
+  if (c != fltk3::UpKey && c != fltk3::DownKey) {
+    e->buffer()->unselect();
+    fltk3::copy("", 0, 0);
+    e->show_insert_position();
+  }
+  switch (c) {
+    case fltk3::HomeKey:
+      e->insert_position(0);
+      e->scroll(0, 0);
+      break;
+    case fltk3::EndKey:
+      e->insert_position(e->buffer()->length());
+      e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0);
+      break;
+    case fltk3::LeftKey:
+      e->previous_word();
+      break;
+    case fltk3::RightKey:
+      e->next_word();
+      break;
+    case fltk3::UpKey:
+      e->scroll(e->mTopLineNum-1, e->mHorizOffset);
+      break;
+    case fltk3::DownKey:
+      e->scroll(e->mTopLineNum+1, e->mHorizOffset);
+      break;
+    case fltk3::PageUpKey:
+      e->insert_position(e->mLineStarts[0]);
+      break;
+    case fltk3::PageDownKey:
+      e->insert_position(e->mLineStarts[e->mNVisibleLines-2]);
+      break;
+  }
+  return 1;
+}
+
+/** Moves the current text cursor in the direction indicated by meta key */
+int fltk3::TextEditor::kf_meta_move(unsigned c, fltk3::TextEditor* e) {
+  if (!e->buffer()->selected())
+    e->dragPos = e->insert_position();
+  if (c != fltk3::UpKey && c != fltk3::DownKey) {
+    e->buffer()->unselect();
+    fltk3::copy("", 0, 0);
+    e->show_insert_position();
+  }
+  switch (c) {
+    case fltk3::UpKey:				// top of buffer
+      e->insert_position(0);
+      e->scroll(0, 0);
+      break;
+    case fltk3::DownKey:			// end of buffer
+      e->insert_position(e->buffer()->length());
+      e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0);
+      break;
+    case fltk3::LeftKey:			// beginning of line
+      kf_move(fltk3::HomeKey, e);
+      break;
+    case fltk3::RightKey:			// end of line
+      kf_move(fltk3::EndKey, e);
+      break;
+  }
+  return 1;
+}
+
+/** Extends the current selection in the direction indicated by meta key c. */
+int fltk3::TextEditor::kf_m_s_move(unsigned c, fltk3::TextEditor* e) {
+  kf_meta_move(c, e);
+  fltk3::text_drag_me(e->insert_position(), e);
+  return 1;
+}
+
+/** Extends the current selection in the direction indicated by control key c. */
+int fltk3::TextEditor::kf_c_s_move(unsigned c, fltk3::TextEditor* e) {
+  kf_ctrl_move(c, e);
+  fltk3::text_drag_me(e->insert_position(), e);
+  return 1;
+}
+
+/**  Moves the text cursor to the beginning of the current line.*/
+int fltk3::TextEditor::kf_home(unsigned int, fltk3::TextEditor* e) {
+    return kf_move(fltk3::HomeKey, e);
+}
+
+/**  Moves the text cursor to the end of the current line.*/
+int fltk3::TextEditor::kf_end(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::EndKey, e);
+}
+
+/**  Moves the text cursor one character to the left.*/
+int fltk3::TextEditor::kf_left(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::LeftKey, e);
+}
+
+/**  Moves the text cursor one line up.*/
+int fltk3::TextEditor::kf_up(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::UpKey, e);
+}
+
+/**  Moves the text cursor one character to the right.*/
+int fltk3::TextEditor::kf_right(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::RightKey, e);
+}
+/**  Moves the text cursor one line down.*/
+int fltk3::TextEditor::kf_down(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::DownKey, e);
+}
+
+/**  Moves the text cursor up one page.*/
+int fltk3::TextEditor::kf_page_up(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::PageUpKey, e);
+}
+
+/**  Moves the text cursor down one page.*/
+int fltk3::TextEditor::kf_page_down(unsigned int, fltk3::TextEditor* e) {
+  return kf_move(fltk3::PageDownKey, e);
+}
+/**  Toggles the insert mode in the text editor.*/
+int fltk3::TextEditor::kf_insert(unsigned int, fltk3::TextEditor* e) {
+  e->insert_mode(e->insert_mode() ? 0 : 1);
+  return 1;
+}
+
+/**  Does a delete of selected text or the current character in the current buffer.*/
+int fltk3::TextEditor::kf_delete(unsigned int, fltk3::TextEditor* e) {
+  if (!e->buffer()->selected()) {
+    int p1 = e->insert_position();
+    int p2 = e->buffer()->next_char(p1);
+    e->buffer()->select(p1, p2);
+  }
+
+  kill_selection(e);
+  e->show_insert_position();
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return 1;
+}
+
+/**  Does a copy of selected text or the current character in the current buffer.*/
+int fltk3::TextEditor::kf_copy(unsigned int, fltk3::TextEditor* e) {
+  if (!e->buffer()->selected()) return 1;
+  const char *copy = e->buffer()->selection_text();
+  if (*copy) fltk3::copy(copy, strlen(copy), 1);
+  free((void*)copy);
+  e->show_insert_position();
+  return 1;
+}
+
+/**  Does a cut of selected text in the current buffer.*/
+int fltk3::TextEditor::kf_cut(unsigned int c, fltk3::TextEditor* e) {
+  kf_copy(c, e);
+  kill_selection(e);
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return 1;
+}
+
+/**  Does a paste of selected text in the current buffer.*/
+int fltk3::TextEditor::kf_paste(unsigned int, fltk3::TextEditor* e) {
+  kill_selection(e);
+  fltk3::paste(*e, 1);
+  e->show_insert_position();
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return 1;
+}
+
+/**  Selects all text in the current buffer.*/
+int fltk3::TextEditor::kf_select_all(unsigned int, fltk3::TextEditor* e) {
+  e->buffer()->select(0, e->buffer()->length());
+  const char *copy = e->buffer()->selection_text();
+  if (*copy) fltk3::copy(copy, strlen(copy), 0);
+  free((void*)copy);
+  return 1;
+}
+/**  Undo last edit in the current buffer. Also deselect previous selection. */
+int fltk3::TextEditor::kf_undo(unsigned int , fltk3::TextEditor* e) {
+  e->buffer()->unselect();
+  fltk3::copy("", 0, 0);
+  int crsr;
+  int ret = e->buffer()->undo(&crsr);
+  e->insert_position(crsr);
+  e->show_insert_position();
+  e->set_changed();
+  if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
+  return ret;
+}
+
+/** Handles a key press in the editor */
+int fltk3::TextEditor::handle_key() {
+  // Call FLTK's rules to try to turn this into a printing character.
+  // This uses the right-hand ctrl key as a "compose prefix" and returns
+  // the changes that should be made to the text, as a number of
+  // bytes to delete and a string to insert:
+  int del = 0;
+  if (fltk3::compose(del)) {
+    if (del) {
+      int dp = insert_position(), di = del;
+      while (di--) dp = buffer()->prev_char_clipped(dp);
+      buffer()->select(dp, insert_position());
+    }
+    kill_selection(this);
+    if (fltk3::event_length()) {
+      if (insert_mode()) insert(fltk3::event_text());
+      else overstrike(fltk3::event_text());
+    }
+    show_insert_position();
+    set_changed();
+    if (when()&fltk3::WHEN_CHANGED) do_callback();
+    return 1;
+  }
+
+  int key = fltk3::event_key(), state = fltk3::event_state(), c = fltk3::event_text()[0];
+  state &= fltk3::SHIFT|fltk3::CTRL|fltk3::ALT|fltk3::META; // only care about these states
+  KeyFunc f;
+  f = bound_key_function(key, state, global_key_bindings);
+  if (!f) f = bound_key_function(key, state, key_bindings);
+  if (f) return f(key, this);
+  if (default_key_function_ && !state) return default_key_function_(c, this);
+  return 0;
+}
+
+/** does or does not a callback according to changed() and when() settings */
+void fltk3::TextEditor::maybe_do_callback() {
+//  printf("fltk3::TextEditor::maybe_do_callback()\n");
+//  printf("changed()=%d, when()=%x\n", changed(), when());
+  if (changed() || (when()&fltk3::WHEN_NOT_CHANGED)) do_callback();
+}
+
+int fltk3::TextEditor::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  static int dndCursorPos;
+  
+  if (!buffer()) return 0;
+
+  switch (event) {
+    case fltk3::FOCUS:
+      show_cursor(mCursorOn); // redraws the cursor
+      if (buffer()->selected()) redraw(); // Redraw selections...
+      fltk3::focus(this);
+      return 1;
+
+    case fltk3::UNFOCUS:
+      show_cursor(mCursorOn); // redraws the cursor
+      if (buffer()->selected()) redraw(); // Redraw selections...
+    case fltk3::HIDE:
+      if (when() & fltk3::WHEN_RELEASE) maybe_do_callback();
+      return 1;
+
+    case fltk3::KEYBOARD:
+      if (active_r() && window() && this == fltk3::belowmouse()) 
+        window()->cursor(fltk3::CURSOR_NONE);
+      return handle_key();
+
+    case fltk3::PASTE:
+      if (!fltk3::event_text()) {
+        fltk3::beep();
+	return 1;
+      }
+      buffer()->remove_selection();
+      if (insert_mode()) insert(fltk3::event_text());
+      else overstrike(fltk3::event_text());
+      show_insert_position();
+      set_changed();
+      if (when()&fltk3::WHEN_CHANGED) do_callback();
+      return 1;
+
+    case fltk3::ENTER:
+// MRS: WIN32 only?  Need to test!
+//    case fltk3::MOVE:
+      show_cursor(mCursorOn);
+      return 1;
+
+    case fltk3::PUSH:
+      if (fltk3::event_button() == 2) {
+        // don't let the text_display see this event
+        if (Group::handle(event)) return 1;
+        dragType = DRAG_NONE;
+	if(buffer()->selected()) {
+	  buffer()->unselect();
+	  }
+	int pos = xy_to_position(fltk3::event_x(), fltk3::event_y(), CURSOR_POS);
+        insert_position(pos);
+        fltk3::paste(*this, 0);
+        fltk3::focus(this);
+        set_changed();
+        if (when()&fltk3::WHEN_CHANGED) do_callback();
+        return 1;
+      }
+      break;
+
+    case fltk3::SHORTCUT:
+      if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut()))
+        return 0;
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+        fltk3::focus(this);
+        return 1;
+      }
+      break;
+      
+      // Handle drag'n'drop attempt by the user. This is a simplified 
+      // implementation which allows dnd operations onto the scroll bars.
+    case fltk3::DND_ENTER: // save the current cursor position
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS))
+        fltk3::focus(this);
+      show_cursor(mCursorOn);
+      dndCursorPos = insert_position();
+      /* fall through */
+    case fltk3::DND_DRAG: // show a temporary insertion cursor
+      insert_position(xy_to_position(fltk3::event_x(), fltk3::event_y(), CURSOR_POS));
+      return 1;      
+    case fltk3::DND_LEAVE: // restore original cursor
+      insert_position(dndCursorPos);
+      return 1;      
+    case fltk3::DND_RELEASE: // keep insertion cursor and wait for the fltk3::PASTE event
+      buffer()->unselect(); // fltk3::PASTE must not destroy current selection!
+      return 1;
+  }
+
+  return TextDisplay::handle(event);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Text_Editor.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tile.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tile.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tile.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,215 @@
+//
+// "$Id$"
+//
+// Tile widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+// Group of 2 or 4 "tiles" that can be resized by dragging border
+// The size of the first child determines where the resize border is.
+// The resizebox is used to limit where the border can be dragged to.
+
+#include <fltk3/run.h>
+#include <fltk3/TiledGroup.h>
+#include <fltk3/Window.h>
+#include <stdlib.h>
+
+// Drag the edges that were initially at oldx,oldy to newx,newy:
+// pass zero as oldx or oldy to disable drag in that direction:
+/** 
+  Drag the intersection at from_x,from_y to to_x,to_y.
+  This redraws all the necessary children.
+*/
+void fltk3::TiledGroup::position(int oix, int oiy, int newx, int newy) {
+  fltk3::Widget*const* a = array();
+  int *p = sizes();
+  p += 8; // skip group & resizable's saved size
+  for (int i=children(); i--; p += 4) {
+    fltk3::Widget* o = *a++;
+    if (o == resizable()) continue;
+    int X = o->x();
+    int R = X+o->w();
+    if (oix) {
+      int t = p[0];
+      if (t == oix || (t>oix && X<newx) || (t<oix && X>newx) ) X = newx;
+      t = p[1];
+      if (t == oix || (t>oix && R<newx) || (t<oix && R>newx) ) R = newx;
+    }
+    int Y = o->y();
+    int B = Y+o->h();
+    if (oiy) {
+      int t = p[2];
+      if (t == oiy || (t>oiy && Y<newy) || (t<oiy && Y>newy) ) Y = newy;
+      t = p[3];
+      if (t == oiy || (t>oiy && B<newy) || (t<oiy && B>newy) ) B = newy;
+    }
+    o->damage_resize(X,Y,R-X,B-Y);
+  }
+}
+
+// move the lower-right corner (sort of):
+void fltk3::TiledGroup::resize(int X,int Y,int W,int H) {
+  //fltk3::Group::resize(X, Y, W, H);
+  //return;
+  // remember how much to move the child widgets:
+  int dx = X-x();
+  int dy = Y-y();
+  int dw = W-w();
+  int dh = H-h();
+  int *p = sizes();
+  // resize this (skip the fltk3::Group resize):
+  Widget::resize(X,Y,W,H);
+  // find bottom-right of resiable:
+  int OR = p[5];
+  int NR = X+W-(p[1]-OR);
+  int OB = p[7];
+  int NB = Y+H-(p[3]-OB);
+  // move everything to be on correct side of new resizable:
+  fltk3::Widget*const* a = array();
+  p += 8;
+  for (int i=children(); i--;) {
+    fltk3::Widget* o = *a++;
+    int xx = o->x()+dx;
+    int R = xx+o->w();
+    if (*p++ >= OR) xx += dw; else if (xx > NR) xx = NR;
+    if (*p++ >= OR) R += dw; else if (R > NR) R = NR;
+    int yy = o->y()+dy;
+    int B = yy+o->h();
+    if (*p++ >= OB) yy += dh; else if (yy > NB) yy = NB;
+    if (*p++ >= OB) B += dh; else if (B > NB) B = NB;
+    o->resize(xx,yy,R-xx,B-yy);
+    // do *not* call o->redraw() here! If you do, and the tile is inside a 
+    // scroll, it'll set the damage areas wrong for all children!
+  }
+}
+
+static void set_cursor(fltk3::TiledGroup*t, fltk3::Cursor c) {
+  static fltk3::Cursor cursor;
+  if (cursor == c || !t->window()) return;
+  cursor = c;
+#ifdef __sgi
+  t->window()->cursor(c,fltk3::RED,fltk3::WHITE);
+#else
+  t->window()->cursor(c);
+#endif
+}
+
+static fltk3::Cursor cursors[4] = {
+  fltk3::CURSOR_DEFAULT,
+  fltk3::CURSOR_WE,
+  fltk3::CURSOR_NS,
+  fltk3::CURSOR_MOVE};
+
+int fltk3::TiledGroup::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  static int sdrag;
+  static int sdx, sdy;
+  static int sx, sy;
+#define DRAGH 1
+#define DRAGV 2
+#define GRABAREA 4
+
+  int mx = fltk3::event_x();
+  int my = fltk3::event_y();
+
+  switch (event) {
+
+  case fltk3::MOVE:
+  case fltk3::ENTER:
+  case fltk3::PUSH:
+    // don't potentially change the mouse cursor if inactive:
+    if (!active()) break; // will cascade inherited handle()
+    {
+    int mindx = 100;
+    int mindy = 100;
+    int oldx = 0;
+    int oldy = 0;
+    fltk3::Widget*const* a = array();
+    int *q = sizes();
+    int *p = q+8;
+    for (int i=children(); i--; p += 4) {
+      fltk3::Widget* o = *a++;
+      if (o == resizable()) continue;
+      if (p[1]<q[1] && o->y()<=my+GRABAREA && o->y()+o->h()>=my-GRABAREA) {
+	int t = mx - (o->x()+o->w());
+	if (abs(t) < mindx) {
+	  sdx = t;
+	  mindx = abs(t);
+	  oldx = p[1];
+	}
+      }
+      if (p[3]<q[3] && o->x()<=mx+GRABAREA && o->x()+o->w()>=mx-GRABAREA) {
+	int t = my - (o->y()+o->h());
+	if (abs(t) < mindy) {
+	  sdy = t;
+	  mindy = abs(t);
+	  oldy = p[3];
+	}
+      }
+    }
+    sdrag = 0; sx = sy = 0;
+    if (mindx <= GRABAREA) {sdrag = DRAGH; sx = oldx;}
+    if (mindy <= GRABAREA) {sdrag |= DRAGV; sy = oldy;}
+    set_cursor(this, cursors[sdrag]);
+    if (sdrag) return 1;
+    return Group::handle(event);
+  }
+
+  case fltk3::LEAVE:
+    set_cursor(this, fltk3::CURSOR_DEFAULT);
+    break;
+
+  case fltk3::DRAG:
+    // This is necessary if CONSOLIDATE_MOTION in Fl_x.cxx is turned off:
+    // if (damage()) return 1; // don't fall behind
+  case fltk3::RELEASE: {
+    if (!sdrag) return 0; // should not happen
+    fltk3::Widget* r = resizable(); if (!r) r = this;
+    int newx;
+    if (sdrag&DRAGH) {
+      newx = fltk3::event_x()-sdx;
+      if (newx < r->x()) newx = r->x();
+      else if (newx > r->x()+r->w()) newx = r->x()+r->w();
+    } else
+      newx = sx;
+    int newy;
+    if (sdrag&DRAGV) {
+      newy = fltk3::event_y()-sdy;
+      if (newy < r->y()) newy = r->y();
+      else if (newy > r->y()+r->h()) newy = r->y()+r->h();
+    } else
+      newy = sy;
+    position(sx,sy,newx,newy);
+    if (event == fltk3::DRAG) set_changed();
+    do_callback();
+    return 1;}
+
+  }
+
+  return Group::handle(event);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tile.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tiled_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tiled_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tiled_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,135 @@
+//
+// "$Id$"
+//
+// Tiled image code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+#include <fltk3/run.h>
+#include <fltk3/TiledImage.h>
+#include <fltk3/draw.h>
+
+/**
+  The constructors create a new tiled image containing the specified image.
+  Use a width and height of 0 to tile the whole window/widget.
+*/
+fltk3::TiledImage::TiledImage(fltk3::Image *i,	// I - Image to tile
+                               int      W,	// I - Width of tiled area
+			       int      H) :	// I - Height of tiled area
+  fltk3::Image(W,H,0) {
+  image_       = i;
+  alloc_image_ = 0;
+
+  if (W == 0) w(fltk3::w());
+  if (H == 0) h(fltk3::h());
+}
+/**
+  The destructor frees all memory and server resources that are used by
+  the tiled image.
+*/
+  fltk3::TiledImage::~TiledImage() {
+  if (alloc_image_) delete image_;
+}
+
+
+//
+// 'fltk3::TiledImage::copy()' - Copy and resize a tiled image...
+//
+
+fltk3::Image *			// O - New image
+fltk3::TiledImage::copy(int W,	// I - New width
+                     int H) {	// I - New height
+  if (W == w() && H == h()) return this;
+  else return new fltk3::TiledImage(image_, W, H);
+}
+
+
+//
+// 'fltk3::TiledImage::color_average()' - Blend colors...
+//
+
+void
+fltk3::TiledImage::color_average(fltk3::Color c,	// I - Color to blend with
+                              float    i) {	// I - Blend fraction
+  if (!alloc_image_) {
+    image_       = image_->copy();
+    alloc_image_ = 1;
+  }
+
+  image_->color_average(c, i);
+}
+
+
+//
+// 'fltk3::TiledImage::desaturate()' - Convert the image to grayscale...
+//
+
+void
+fltk3::TiledImage::desaturate() {
+  if (!alloc_image_) {
+    image_       = image_->copy();
+    alloc_image_ = 1;
+  }
+
+  image_->desaturate();
+}
+
+
+//
+// 'fltk3::TiledImage::draw()' - Draw a shared image...
+//
+
+void
+fltk3::TiledImage::draw(int X,	// I - Starting X position
+                     int Y,	// I - Starting Y position
+		     int W,	// I - Width of area to be filled
+		     int H,	// I - Height of area to be filled
+		     int cx,	// I - "Source" X position
+		     int cy) {	// I - "Source" Y position
+  if (!image_->w() || !image_->h()) return;
+  if (W == 0) W = fltk3::w();
+  if (H == 0) H = fltk3::h();
+
+  fltk3::push_clip(X, Y, W, H);
+
+  X += cx;
+  Y += cy;
+
+  X = X - (X % image_->w());
+  Y = Y - (Y % image_->h());
+
+  W += X;
+  H += Y;
+
+  for (int yy = Y; yy < H; yy += image_->h())
+    for (int xx = X; xx < W; xx += image_->w())
+      image_->draw(xx, yy);
+
+  fltk3::pop_clip();
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tiled_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tooltip.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tooltip.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tooltip.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,350 @@
+//
+// "$Id$"
+//
+// Tooltip source file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/Tooltip.h>
+#include <fltk3/draw.h>
+#include <fltk3/MenuWindow.h>
+
+#include <stdio.h>
+#include <string.h>	// strdup()
+
+float		fltk3::Tooltip::delay_ = 1.0f;
+float		fltk3::Tooltip::hoverdelay_ = 0.2f;
+fltk3::Color	fltk3::Tooltip::color_ = fltk3::color_cube(fltk3::NUM_RED - 1,
+		                                   fltk3::NUM_GREEN - 1,
+						   fltk3::NUM_BLUE - 2);
+fltk3::Color	fltk3::Tooltip::textcolor_ = fltk3::BLACK;
+fltk3::Font         fltk3::Tooltip::font_ = fltk3::HELVETICA;
+fltk3::Fontsize     fltk3::Tooltip::size_ = -1;
+
+#define MAX_WIDTH 400
+
+static const char* tip;
+/**
+    This widget creates a tooltip box window, with no caption.
+*/
+class Fl_TooltipBox : public fltk3::MenuWindow {
+public:
+  /** Creates the box window */
+  Fl_TooltipBox() : fltk3::MenuWindow(0, 0) {
+    set_override();
+    set_tooltip_window();
+    end();
+  }
+  void draw();
+  void layout();
+  /** Shows the tooltip windows only if a tooltip text is available. */
+  void show() {
+    if (!tip) return;
+    MenuWindow::show();
+  }
+};
+
+fltk3::Widget* fltk3::Tooltip::widget_ = 0;
+static Fl_TooltipBox *window = 0;
+static int Y,H;
+
+#ifdef __APPLE__
+// returns the unique tooltip window
+fltk3::Window *fltk3::Tooltip::current_window(void)
+{
+  return (fltk3::Window*)window;
+}
+#endif
+
+void Fl_TooltipBox::layout() {
+  fltk3::font(fltk3::Tooltip::font(), fltk3::Tooltip::size());
+  int ww, hh;
+  ww = MAX_WIDTH;
+  fltk3::measure(tip, ww, hh, fltk3::ALIGN_LEFT|fltk3::ALIGN_WRAP|fltk3::ALIGN_INSIDE);
+  ww += 6; hh += 6;
+
+  // find position on the screen of the widget:
+  int ox = fltk3::event_x_root();
+  int oy = Y + H+2;
+  for (fltk3::Widget* p = fltk3::Tooltip::current(); p; p = p->window()) {
+    oy += p->y();
+  }
+  int scr_x, scr_y, scr_w, scr_h;
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+  if (ox+ww > scr_x+scr_w) ox = scr_x+scr_w - ww;
+  if (ox < scr_x) ox = scr_x;
+  if (H > 30) {
+    oy = fltk3::event_y_root()+13;
+    if (oy+hh > scr_y+scr_h) oy -= 23+hh;
+  } else {
+    if (oy+hh > scr_y+scr_h) oy -= (4+hh+H);
+  }
+  if (oy < scr_y) oy = scr_y;
+
+  resize(ox, oy, ww, hh);
+}
+
+void Fl_TooltipBox::draw() {
+  draw_box(fltk3::BORDER_BOX, 0, 0, w(), h(), fltk3::Tooltip::color());
+  fltk3::color(fltk3::Tooltip::textcolor());
+  fltk3::font(fltk3::Tooltip::font(), fltk3::Tooltip::size());
+  fltk3::draw(tip, 3, 3, w()-6, h()-6, fltk3::Align(fltk3::ALIGN_LEFT|fltk3::ALIGN_WRAP));
+}
+
+static char recent_tooltip;
+
+static void recent_timeout(void*) {
+#ifdef DEBUG
+  puts("recent_timeout();");
+#endif // DEBUG
+
+  recent_tooltip = 0;
+}
+
+static char recursion;
+
+static void tooltip_timeout(void*) {
+#ifdef DEBUG
+  puts("tooltip_timeout();");
+#endif // DEBUG
+
+  if (recursion) return;
+  recursion = 1;
+  if (!tip || !*tip) {
+    if (window) window->hide();
+  } else {
+    int condition = 1;
+#if !(defined(__APPLE__) || defined(WIN32))
+    condition = (fltk3::grab() == NULL);
+#endif
+    if ( condition ) {
+      if (!window) window = new Fl_TooltipBox;
+      // this cast bypasses the normal fltk3::Window label() code:
+      ((fltk3::Widget*)window)->label(tip);
+      window->layout();
+      window->redraw();
+  //    printf("tooltip_timeout: Showing window %p with tooltip \"%s\"...\n",
+  //           window, tip ? tip : "(null)");
+      window->show();
+    }
+  }
+
+  fltk3::remove_timeout(recent_timeout);
+  recent_tooltip = 1;
+  recursion = 0;
+}
+
+/**
+   This method is called when the mouse pointer enters a widget.
+   <P>If this widget or one of its parents has a tooltip, enter it. This
+   will do nothing if this is the current widget (even if the mouse moved
+   out so an exit() was done and then moved back in). If no tooltip can
+   be found do fltk3::Tooltip::exit_(). If you don't want this behavior (for instance
+   if you want the tooltip to reappear when the mouse moves back in)
+   call the fancier enter_area() below.
+*/
+void fltk3::Tooltip::enter_(fltk3::Widget* w) {
+#ifdef DEBUG
+  printf("fltk3::Tooltip::enter_(w=%p)\n", w);
+  printf("    window=%p\n", window);
+#endif // DEBUG
+
+  // find the enclosing group with a tooltip:
+  fltk3::Widget* tw = w;
+  for (;;) {
+    if (!tw) {exit_(0); return;}
+    if (tw == widget_) return;
+    if (tw->tooltip()) break;
+    tw = tw->parent();
+  }
+  enter_area(w, 0, 0, w->w(), w->h(), tw->tooltip());
+}
+/** 
+     Sets the current widget target. 
+     Acts as though enter(widget) was done but does not pop up a
+     tooltip.  This is useful to prevent a tooltip from reappearing when
+     a modal overlapping window is deleted. FLTK does this automatically
+     when you click the mouse button.
+*/
+void fltk3::Tooltip::current(fltk3::Widget* w) {
+#ifdef DEBUG
+  printf("fltk3::Tooltip::current(w=%p)\n", w);
+#endif // DEBUG
+
+  exit_(0);
+  // find the enclosing group with a tooltip:
+  fltk3::Widget* tw = w;
+  for (;;) {
+    if (!tw) return;
+    if (tw->tooltip()) break;
+    tw = tw->parent();
+  }
+  // act just like fltk3::Tooltip::enter_() except we can remember a zero:
+  widget_ = w;
+}
+
+// Hide any visible tooltip.
+/**  This method is called when the mouse pointer leaves a  widget. */
+void fltk3::Tooltip::exit_(fltk3::Widget *w) {
+#ifdef DEBUG
+  printf("fltk3::Tooltip::exit_(w=%p)\n", w);
+  printf("    widget=%p, window=%p\n", widget_, window);
+#endif // DEBUG
+
+  if (!widget_ || (w && w == window)) return;
+  widget_ = 0;
+  fltk3::remove_timeout(tooltip_timeout);
+  fltk3::remove_timeout(recent_timeout);
+  if (window && window->visible()) window->hide();
+  if (recent_tooltip) {
+    if (fltk3::event_state() & fltk3::BUTTONS) recent_tooltip = 0;
+    else fltk3::add_timeout(fltk3::Tooltip::hoverdelay(), recent_timeout);
+  }
+}
+
+// Get ready to display a tooltip. The widget and the xywh box inside
+// it define an area the tooltip is for, this along with the current
+// mouse position places the tooltip (the mouse is assumed to point
+// inside or near the box).
+/**
+  You may be able to use this to provide tooltips for internal pieces
+  of your widget. Call this after setting fltk3::belowmouse() to
+  your widget (because that calls the above enter() method). Then figure
+  out what thing the mouse is pointing at, and call this with the widget
+  (this pointer is used to remove the tooltip if the widget is deleted
+  or hidden, and to locate the tooltip), the rectangle surrounding the
+  area, relative to the top-left corner of the widget (used to calculate
+  where to put the tooltip), and the text of the tooltip (which must be
+  a pointer to static data as it is not copied).
+*/
+void fltk3::Tooltip::enter_area(fltk3::Widget* wid, int x,int y,int w,int h, const char* t)
+{
+  (void)x;
+  (void)w;
+
+#ifdef DEBUG
+  printf("fltk3::Tooltip::enter_area(wid=%p, x=%d, y=%d, w=%d, h=%d, t=\"%s\")\n",
+         wid, x, y, w, h, t ? t : "(null)");
+  printf("    recursion=%d, window=%p\n", recursion, window);
+#endif // DEBUG
+
+  if (recursion) return;
+  if (!t || !*t || !enabled()) {
+    exit_(0);
+    return;
+  }
+  // do nothing if it is the same:
+  if (wid==widget_ /*&& x==X && y==Y && w==W && h==H*/ && t==tip) return;
+  fltk3::remove_timeout(tooltip_timeout);
+  fltk3::remove_timeout(recent_timeout);
+  // remember it:
+  widget_ = wid; Y = y; H = h; tip = t;
+  // popup the tooltip immediately if it was recently up:
+  if (recent_tooltip) {
+    if (window) window->hide();
+    fltk3::add_timeout(fltk3::Tooltip::hoverdelay(), tooltip_timeout);
+  } else if (fltk3::Tooltip::delay() < .1) {
+#ifdef WIN32
+    // possible fix for the Windows titlebar, it seems to want the
+    // window to be destroyed, moving it messes up the parenting:
+    if (window && window->visible()) window->hide();
+#endif // WIN32
+    tooltip_timeout(0);
+  } else {
+    if (window && window->visible()) window->hide();
+    fltk3::add_timeout(fltk3::Tooltip::delay(), tooltip_timeout);
+  }
+
+#ifdef DEBUG
+  printf("    tip=\"%s\", window->shown()=%d\n", tip ? tip : "(null)",
+         window ? window->shown() : 0);
+#endif // DEBUG
+}
+
+void fltk3::Tooltip::set_enter_exit_once_() {
+  static char beenhere = 0;
+  if (!beenhere) {
+    beenhere          = 1;
+    fltk3::Tooltip::enter = fltk3::Tooltip::enter_;
+    fltk3::Tooltip::exit  = fltk3::Tooltip::exit_;
+  }
+}
+
+/**
+  Sets the current tooltip text. 
+
+  Sets a string of text to display in a popup tooltip window when the user 
+  hovers the mouse over the widget. The string is <I>not</I> copied, so 
+  make sure any formatted string is stored in a static, global, 
+  or allocated buffer. If you want a copy made and managed for you,
+  use the copy_tooltip() method, which will manage the tooltip string
+  automatically.
+
+  If no tooltip is set, the tooltip of the parent is inherited. Setting a 
+  tooltip for a group and setting no tooltip for a child will show the 
+  group's tooltip instead. To avoid this behavior, you can set the child's 
+  tooltip to an empty string ("").
+  \param[in] text New tooltip text (no copy is made)
+  \see copy_tooltip(const char*), tooltip()
+*/
+void fltk3::Widget::tooltip(const char *text) {
+  fltk3::Tooltip::set_enter_exit_once_();
+  if (flags() & COPIED_TOOLTIP) {
+    // reassigning a copied tooltip remains the same copied tooltip
+    if (tooltip_ == text) return;
+    free((void*)(tooltip_));            // free maintained copy
+    clear_flag(COPIED_TOOLTIP);         // disable copy flag (WE don't make copies)
+  }
+  tooltip_ = text;
+}
+
+/**
+  Sets the current tooltip text. 
+  Unlike tooltip(), this method allocates a copy of the tooltip 
+  string instead of using the original string pointer.
+
+  The internal copy will automatically be freed whenever you assign
+  a new tooltip or when the widget is destroyed.
+
+  If no tooltip is set, the tooltip of the parent is inherited. Setting a 
+  tooltip for a group and setting no tooltip for a child will show the 
+  group's tooltip instead. To avoid this behavior, you can set the child's 
+  tooltip to an empty string ("").
+  \param[in] text New tooltip text (an internal copy is made and managed)
+  \see tooltip(const char*), tooltip()
+*/
+void fltk3::Widget::copy_tooltip(const char *text) {
+  fltk3::Tooltip::set_enter_exit_once_();
+  if (flags() & COPIED_TOOLTIP) free((void *)(tooltip_));
+  if (text) {
+    set_flag(COPIED_TOOLTIP);
+    tooltip_ = strdup(text);
+  } else {
+    clear_flag(COPIED_TOOLTIP);
+    tooltip_ = (char *)0;
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tooltip.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tree.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tree.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tree.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,979 @@
+//
+// "$Id$"
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <fltk3/Tree.h>
+#include <fltk3/Preferences.h>
+#include <fltk3/Wrapper.h>
+
+//////////////////////
+// fltk3::Tree.cxx
+//////////////////////
+//
+// fltk3::Tree -- This file is part of the fltk3::Tree widget for FLTK
+// Copyright (C) 2009-2010 by Greg Ercolano.
+//
+// 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.
+//
+
+// INTERNAL: scroller callback
+static void scroll_cb(fltk3::Widget*,void *data) {
+  ((fltk3::Tree*)data)->redraw();
+}
+
+// INTERNAL: Parse elements from path into an array of null terminated strings
+//    Handles escape characters.
+//    Path="/aa/bb"
+//    Return: arr[0]="aa", arr[1]="bb", arr[2]=0
+//    Caller must call free_path(arr).
+//
+static char **parse_path(const char *path) {
+  while ( *path == '/' ) path++;	// skip leading '/' 
+                                        // First pass: identify, null terminate, and count separators
+  int seps = 1;				// separator count (1: first item)
+  int arrsize = 1;			// array size (1: first item)
+  char *save = strdup(path);		// make copy we can modify
+  char *sin = save, *sout = save;
+  while ( *sin ) {
+    if ( *sin == '\\' ) {		// handle escape character
+      *sout++ = *++sin;
+      if ( *sin ) ++sin;
+    } else if ( *sin == '/' ) {		// handle submenu
+      *sout++ = 0;
+      sin++;
+      seps++;
+      arrsize++;
+    } else {				// all other chars
+      *sout++ = *sin++;
+    }
+  }
+  *sout = 0;
+  arrsize++;				// (room for terminating NULL) 
+                                        // Second pass: create array, save nonblank elements
+  char **arr = (char**)malloc(sizeof(char*) * arrsize);
+  int t = 0;
+  sin = save;
+  while ( seps-- > 0 ) {
+    if ( *sin ) { arr[t++] = sin; }	// skips empty fields, e.g. '//'
+    sin += (strlen(sin) + 1);
+  }
+  arr[t] = 0;
+  return(arr);
+}
+
+// INTERNAL: Free the array returned by parse_path()
+static void free_path(char **arr) {
+  if ( arr ) {
+    if ( arr[0] ) { free((void*)arr[0]); }
+    free((void*)arr);
+  }
+}
+
+// INTERNAL: Recursively descend tree hierarchy, accumulating total child count
+static int find_total_children(fltk3::TreeItem *item, int count=0) {
+  count++;
+  for ( int t=0; t<item->children(); t++ ) {
+    count = find_total_children(item->child(t), count);
+  }
+  return(count);
+}
+
+/// Constructor.
+fltk3::Tree::Tree(int X, int Y, int W, int H, const char *L) : fltk3::Group(X,Y,W,H,L) { 
+  _root = new fltk3::TreeItem(_prefs);
+  _root->parent(0);				// we are root of tree
+  _root->label("ROOT");
+  _item_focus      = 0;
+  _callback_item   = 0;
+  _callback_reason = fltk3::TREE_REASON_NONE;
+  _scrollbar_size  = 0;				// 0: uses fltk3::scrollbar_size()
+  box(fltk3::DOWN_BOX);
+  color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
+  when(fltk3::WHEN_CHANGED);
+  _vscroll = new fltk3::Scrollbar(0,0,0,0);		// will be resized by draw()
+  _vscroll->hide();
+  _vscroll->type(fltk3::VERTICAL);
+  _vscroll->step(1);
+  _vscroll->callback(scroll_cb, (void*)this);
+  end();
+}
+
+/// Destructor.
+fltk3::Tree::~Tree() {
+  if ( _root ) { delete _root; _root = 0; }
+}
+
+/// Adds a new item, given a 'menu style' path, eg: "/Parent/Child/item".
+/// Any parent nodes that don't already exist are created automatically.
+/// Adds the item based on the value of sortorder().
+///
+/// To specify items or submenus that contain slashes ('/' or '\')
+/// use an escape character to protect them, e.g.
+///
+/// \code
+///     tree->add("/Holidays/Photos/12\\/25\\2010");          // Adds item "12/25/2010"
+///     tree->add("/Pathnames/c:\\\\Program Files\\\\MyApp"); // Adds item "c:\Program Files\MyApp"
+/// \endcode
+///
+/// \returns the child item created, or 0 on error.
+///
+fltk3::TreeItem* fltk3::Tree::add(const char *path) {
+  if ( ! _root ) {					// Create root if none
+    _root = new fltk3::TreeItem(_prefs);
+    _root->parent(0);
+    _root->label("ROOT");
+  }
+  char **arr = parse_path(path);
+  fltk3::TreeItem *item = _root->add(_prefs, arr);
+  free_path(arr);
+  return(item);
+}
+
+/// Inserts a new item above the specified fltk3::TreeItem, with the label set to 'name'.
+/// \param[in] above -- the item above which to insert the new item. Must not be NULL.
+/// \param[in] name -- the name of the new item
+/// \returns the item that was added, or 0 if 'above' could not be found.
+/// 
+fltk3::TreeItem* fltk3::Tree::insert_above(fltk3::TreeItem *above, const char *name) {
+  return(above->insert_above(_prefs, name));
+}
+
+/// Insert a new item into a tree-item's children at a specified position.
+///
+/// \param[in] item The existing item to insert new child into. Must not be NULL.
+/// \param[in] name The label for the new item
+/// \param[in] pos The position of the new item in the child list
+/// \returns the item that was added.
+///
+fltk3::TreeItem* fltk3::Tree::insert(fltk3::TreeItem *item, const char *name, int pos) {
+  return(item->insert(_prefs, name, pos));
+}
+
+/// Add a new child to a tree-item.
+///
+/// \param[in] item The existing item to add new child to. Must not be NULL.
+/// \param[in] name The label for the new item
+/// \returns the item that was added.
+///
+fltk3::TreeItem* fltk3::Tree::add(fltk3::TreeItem *item, const char *name) {
+  return(item->add(_prefs, name));
+}
+
+/// Find the item, given a menu style path, eg: "/Parent/Child/item".
+/// There is both a const and non-const version of this method.
+/// Const version allows pure const methods to use this method 
+/// to do lookups without causing compiler errors.
+///
+/// To specify items or submenus that contain slashes ('/' or '\')
+/// use an escape character to protect them, e.g.
+///
+/// \code
+///     tree->add("/Holidays/Photos/12\\/25\\2010");          // Adds item "12/25/2010"
+///     tree->add("/Pathnames/c:\\\\Program Files\\\\MyApp"); // Adds item "c:\Program Files\MyApp"
+/// \endcode
+///
+/// \param[in] path -- the tree item's pathname to be found (e.g. "Flintstones/Fred")
+/// \returns the item, or NULL if not found.
+///
+/// \see item_pathname()
+///
+fltk3::TreeItem *fltk3::Tree::find_item(const char *path) {
+  if ( ! _root ) return(NULL);
+  char **arr = parse_path(path);
+  fltk3::TreeItem *item = _root->find_item(arr);
+  free_path(arr);
+  return(item);
+}
+
+/// A const version of fltk3::Tree::find_item(const char *path)
+const fltk3::TreeItem *fltk3::Tree::find_item(const char *path) const {
+  if ( ! _root ) return(NULL);
+  char **arr = parse_path(path);
+  const fltk3::TreeItem *item = _root->find_item(arr);
+  free_path(arr);
+  return(item);
+}
+
+// Handle safe 'reverse string concatenation'.
+//   In the following we build the pathname from right-to-left,
+//   since we start at the child and work our way up to the root.
+//
+#define SAFE_RCAT(c) { \
+slen += 1; if ( slen >= pathnamelen ) { pathname[0] = '\0'; return(-2); } \
+*s-- = c; \
+}
+
+/// Find the pathname for the specified \p item.
+/// If \p item is NULL, root() is used.
+/// The tree's root will be included in the pathname of showroot() is on.
+/// Menu items or submenus that contain slashes ('/' or '\') in their names
+/// will be escaped with a backslash. This is symmetrical with the add()
+/// function which uses the same escape pattern to set names.
+/// \param[in] pathname The string to use to return the pathname
+/// \param[in] pathnamelen The maximum length of the string (including NULL). Must not be zero.
+/// \param[in] item The item whose pathname is to be returned.
+/// \returns
+///	-   0 : OK (\p pathname returns the item's pathname)
+///	-  -1 : item not found (pathname="")
+///	-  -2 : pathname not large enough (pathname="")
+/// \see find_item()
+///
+int fltk3::Tree::item_pathname(char *pathname, int pathnamelen, const fltk3::TreeItem *item) const {
+  pathname[0] = '\0';
+  item = item ? item : _root;
+  if ( !item ) return(-1);
+  // Build pathname starting at end
+  char *s = (pathname+pathnamelen-1);
+  int slen = 0;			// length of string compiled so far (including NULL)
+  SAFE_RCAT('\0');
+  while ( item ) {
+    if ( item->is_root() && showroot() == 0 ) break;		// don't include root in path if showroot() off
+                                                                // Find name of current item
+    const char *name = item->label() ? item->label() : "???";	// name for this item
+    int len = strlen(name);
+    // Add name to end of pathname[]
+    for ( --len; len>=0; len-- ) {
+      SAFE_RCAT(name[len]);					// rcat name of item
+      if ( name[len] == '/' || name[len] == '\\' ) {
+        SAFE_RCAT('\\');					// escape front or back slashes within name
+      }
+    }
+    SAFE_RCAT('/');						// rcat leading slash
+    item = item->parent();					// move up tree (NULL==root)
+  }
+  if ( *(++s) == '/' ) ++s;				// leave off leading slash from pathname
+  if ( s != pathname ) memmove(pathname, s, slen);	// Shift down right-aligned string
+  return(0);
+}
+
+/// Standard FLTK draw() method, handles draws the tree widget.
+void fltk3::Tree::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  // Let group draw box+label but *NOT* children.
+  // We handle drawing children ourselves by calling each item's draw()
+  //
+  // Handle group's bg
+  Group::draw_box();
+  Group::draw_label();
+  // Handle tree
+  if ( ! _root ) return;
+  int cx = x() + fltk3::box_dx(box());
+  int cy = y() + fltk3::box_dy(box());
+  int cw = w() - fltk3::box_dw(box());
+  int ch = h() - fltk3::box_dh(box());
+  // These values are changed during drawing
+  // 'Y' will be the lowest point on the tree
+  int X = cx + _prefs.marginleft();
+  int Y = cy + _prefs.margintop() - (_vscroll->visible() ? _vscroll->value() : 0);
+  int W = cw - _prefs.marginleft();			// - _prefs.marginright();
+  int Ysave = Y;
+  fltk3::push_clip(cx,cy,cw,ch);
+  {
+    fltk3::font(_prefs.labelfont(), _prefs.labelsize());
+    _root->draw(X, Y, W, this,
+                (fltk3::focus()==this)?_item_focus:0,	// show focus item ONLY if fltk3::Tree has focus
+		_prefs);
+  }
+  fltk3::pop_clip();
+  
+  // Show vertical scrollbar?
+  int ydiff = (Y+_prefs.margintop())-Ysave;		// ydiff=size of tree
+  int ytoofar = (cy+ch) - Y;				// ytoofar -- scrolled beyond bottom (e.g. stow)
+  
+  //printf("ydiff=%d ch=%d Ysave=%d ytoofar=%d value=%d\n",
+  //int(ydiff),int(ch),int(Ysave),int(ytoofar), int(_vscroll->value()));
+  
+  if ( ytoofar > 0 ) ydiff += ytoofar;
+  if ( Ysave<cy || ydiff > ch || int(_vscroll->value()) > 1 ) {
+    _vscroll->visible();
+    
+    int scrollsize = _scrollbar_size ? _scrollbar_size : fltk3::scrollbar_size();
+    int sx = x()+w()-fltk3::box_dx(box())-scrollsize;
+    int sy = y()+fltk3::box_dy(box());
+    int sw = scrollsize;
+    int sh = h()-fltk3::box_dh(box());
+    _vscroll->show();
+    _vscroll->range(0.0,ydiff-ch);
+    _vscroll->resize(sx,sy,sw,sh);
+    _vscroll->slider_size(float(ch)/float(ydiff));
+  } else {
+    _vscroll->Slider::value(0);
+    _vscroll->hide();
+  }
+  fltk3::push_clip(cx,cy,cw,ch);
+  Group::draw_children();	// draws any FLTK children set via fltk3::Tree::widget()
+  fltk3::pop_clip();
+}
+
+/// Returns next visible item above (dir==Fl_Up) or below (dir==Fl_Down) the specified \p item.
+/// If \p item is 0, returns first() if \p dir is Fl_Up, or last() if \p dir is fltk3::DownKey.
+///
+/// \param[in] item The item above/below which we'll find the next visible item
+/// \param[in] dir The direction to search. Can be fltk3::UpKey or fltk3::DownKey.
+/// \returns The item found, or 0 if there's no visible items above/below the specified \p item.
+///
+fltk3::TreeItem *fltk3::Tree::next_visible_item(fltk3::TreeItem *item, unsigned int dir) {
+  if ( ! item ) {				// no start item?
+    item = ( dir == fltk3::UpKey ) ? last() : first();	// start at top or bottom
+    if ( ! item ) return(0);
+    if ( item->visible_r() ) return(item);	// return first/last visible item
+  }
+  switch ( dir ) {
+    case fltk3::UpKey:   return(item->prev_displayed(_prefs));
+    case fltk3::DownKey: return(item->next_displayed(_prefs));
+    default:      return(item->next_displayed(_prefs));
+  }
+}
+
+/// Set the item that currently should have keyboard focus.
+/// Handles calling redraw() to update the focus box (if it is visible).
+///
+/// \param[in] item The item that should take focus. If NULL, none will have focus.
+///
+void fltk3::Tree::set_item_focus(fltk3::TreeItem *item) {
+  if ( _item_focus != item ) {		// changed?
+    _item_focus = item;			// update
+    if ( visible_focus() ) redraw();	// redraw to update focus box
+  }
+}
+
+/// Find the item that was clicked.
+/// You should use callback_item() instead, which is fast,
+/// and is meant to be used within a callback to determine the item clicked.
+///
+/// This method walks the entire tree looking for the first item that is
+/// under the mouse (ie. at fltk3::event_x()/Fl:event_y().
+///
+/// Use this method /only/ if you've subclassed fltk3::Tree, and are receiving
+/// events before fltk3::Tree has been able to process and update callback_item().
+/// 
+/// \returns the item clicked, or 0 if no item was under the current event.
+///
+const fltk3::TreeItem* fltk3::Tree::find_clicked() const {
+  if ( ! _root ) return(NULL);
+  return(_root->find_clicked(_prefs));
+}
+
+/// Set the item that was last clicked.
+/// Should only be used by subclasses needing to change this value.
+/// Normally fltk3::Tree manages this value.
+///
+/// Deprecated: use callback_item() instead.
+///
+void fltk3::Tree::item_clicked(fltk3::TreeItem* val) {
+  _callback_item = val;
+}
+
+/// Returns the first item in the tree.
+///
+/// Use this to walk the tree in the forward direction, eg:
+/// \code
+/// for ( fltk3::TreeItem *item = tree->first(); item; item = tree->next(item) ) {
+///     printf("Item: %s\n", item->label());
+/// }
+/// \endcode
+///
+/// \returns first item in tree, or 0 if none (tree empty).
+/// \see first(),next(),last(),prev()
+///
+fltk3::TreeItem* fltk3::Tree::first() {
+  return(_root);					// first item always root
+}
+
+/// Return the next item after \p item, or 0 if no more items.
+///
+/// Use this code to walk the entire tree:
+/// \code
+/// for ( fltk3::TreeItem *item = tree->first(); item; item = tree->next(item) ) {
+///     printf("Item: %s\n", item->label());
+/// }
+/// \endcode
+///
+/// \param[in] item The item to use to find the next item. If NULL, returns 0.
+/// \returns Next item in tree, or 0 if at last item.
+///
+/// \see first(),next(),last(),prev()
+///
+fltk3::TreeItem *fltk3::Tree::next(fltk3::TreeItem *item) {
+  if ( ! item ) return(0);
+  return(item->next());
+}
+
+/// Return the previous item before \p item, or 0 if no more items.
+///
+/// This can be used to walk the tree in reverse, eg:
+///
+/// \code
+/// for ( fltk3::TreeItem *item = tree->first(); item; item = tree->prev(item) ) {
+///     printf("Item: %s\n", item->label());
+/// }
+/// \endcode
+///
+/// \param[in] item The item to use to find the previous item. If NULL, returns 0.
+/// \returns Previous item in tree, or 0 if at first item.
+///
+/// \see first(),next(),last(),prev()
+///
+fltk3::TreeItem *fltk3::Tree::prev(fltk3::TreeItem *item) {
+  if ( ! item ) return(0);
+  return(item->prev());
+}
+
+/// Returns the last item in the tree.
+///
+/// This can be used to walk the tree in reverse, eg:
+///
+/// \code
+/// for ( fltk3::TreeItem *item = tree->last(); item; item = tree->prev() ) {
+///     printf("Item: %s\n", item->label());
+/// }
+/// \endcode
+///
+/// \returns last item in the tree, or 0 if none (tree empty).
+///
+/// \see first(),next(),last(),prev()
+///
+fltk3::TreeItem* fltk3::Tree::last() {
+  if ( ! _root ) return(0);
+  fltk3::TreeItem *item = _root;
+  while ( item->has_children() ) {
+    item = item->child(item->children()-1);
+  }
+  return(item);
+}
+
+/// Returns the first selected item in the tree.
+///
+/// Use this to walk the tree looking for all the selected items, eg:
+///
+/// \code
+/// for ( fltk3::TreeItem *item = tree->first_selected_item(); item; item = tree->next_selected_item(item) ) {
+///     printf("Item: %s\n", item->label());
+/// }
+/// \endcode
+///
+/// \returns The next selected item, or 0 if there are no more selected items.
+///     
+fltk3::TreeItem *fltk3::Tree::first_selected_item() {
+  return(next_selected_item(0));
+}
+
+/// Returns the next selected item after \p item.
+/// If \p item is 0, search starts at the first item (root).
+///
+/// Use this to walk the tree looking for all the selected items, eg:
+/// \code
+/// for ( fltk3::TreeItem *item = tree->first_selected_item(); item; item = tree->next_selected_item(item) ) {
+///     printf("Item: %s\n", item->label());
+/// }
+/// \endcode
+///
+/// \param[in] item The item to use to find the next selected item. If NULL, first() is used.
+/// \returns The next selected item, or 0 if there are no more selected items.
+///     
+fltk3::TreeItem *fltk3::Tree::next_selected_item(fltk3::TreeItem *item) {
+  if ( ! item ) {
+    if ( ! (item = first()) ) return(0);
+    if ( item->is_selected() ) return(item);
+  }
+  while ( (item = item->next()) )
+    if ( item->is_selected() )
+      return(item);
+  return(0);
+}
+
+/// Standard FLTK event handler for this widget.
+int fltk3::Tree::handle(int e) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(e), Handle)
+  int ret = 0;
+  // Developer note: fltk3::Browser_::handle() used for reference here..
+  // #include <fltk3/names.h>	// for event debugging
+  // fprintf(stderr, "DEBUG: %s (%d)\n", fl_eventnames[e], e);
+  if (e == fltk3::ENTER || e == fltk3::LEAVE) return(1);
+  switch (e) {
+    case fltk3::FOCUS: {
+      // FLTK tests if we want focus. 
+      //     If a nav key was used to give us focus, and we've got no saved
+      //     focus widget, determine which item gets focus depending on nav key.
+      //
+      if ( ! _item_focus ) {					// no focus established yet?
+	switch (fltk3::event_key()) {				// determine if focus was navigated..
+	  case fltk3::TabKey: {					// received focus via TAB?
+	    if ( fltk3::event_state(fltk3::SHIFT) ) {			// SHIFT-TAB similar to fltk3::UpKey
+	      set_item_focus(next_visible_item(0, fltk3::UpKey));
+	    } else {						// TAB similar to fltk3::DownKey
+	      set_item_focus(next_visible_item(0, fltk3::DownKey));
+	    }
+	    break;
+	  }
+	  case fltk3::LeftKey:		// received focus via LEFT or UP?
+	  case fltk3::UpKey: { 	// XK_ISO_Left_Tab
+	    set_item_focus(next_visible_item(0, fltk3::UpKey));
+	    break;
+	  }
+	  case fltk3::RightKey: 	// received focus via RIGHT or DOWN?
+	  case fltk3::DownKey:
+	  default: {
+	    set_item_focus(next_visible_item(0, fltk3::DownKey));
+	    break;
+	  }
+	}
+      }
+      if ( visible_focus() ) redraw();	// draw focus change
+      return(1);
+    }
+    case fltk3::UNFOCUS: {		// FLTK telling us some other widget took focus.
+      if ( visible_focus() ) redraw();	// draw focus change
+      return(1);
+    }
+    case fltk3::KEYBOARD: {		// keyboard shortcut
+                                        // Do shortcuts first or scrollbar will get them...
+      if (_prefs.selectmode() > fltk3::TREE_SELECT_NONE ) {
+	if ( !_item_focus ) {
+	  set_item_focus(first());
+	}
+	if ( _item_focus ) {
+	  unsigned int ekey = fltk3::event_key();
+	  switch (ekey) {
+	    case fltk3::EnterKey:	// ENTER: selects current item only
+	    case fltk3::KPEnterKey:
+	      if ( when() & ~fltk3::WHEN_ENTER_KEY) {
+		select_only(_item_focus);
+		show_item(_item_focus);		// STR #2426
+		return(1);
+	      }
+	      break;
+	    case ' ':		// toggle selection state
+	      switch ( _prefs.selectmode() ) {
+		case fltk3::TREE_SELECT_NONE:
+		  break;
+		case fltk3::TREE_SELECT_SINGLE:
+		  if ( ! _item_focus->is_selected() )		// not selected?
+		    select_only(_item_focus);			// select only this
+		  else
+		    deselect_all();				// select nothing
+		  break;
+		case fltk3::TREE_SELECT_MULTI:
+		  select_toggle(_item_focus);
+		  break;
+	      }
+	      break;
+	    case fltk3::RightKey:  	// open children (if any)
+	    case fltk3::LeftKey: {	// close children (if any)
+	      if ( _item_focus ) {
+		if ( ekey == fltk3::RightKey && _item_focus->is_close() ) {
+		  // Open closed item
+		  open(_item_focus);
+		  redraw();
+		  ret = 1;
+		} else if ( ekey == fltk3::LeftKey && _item_focus->is_open() ) {
+		  // Close open item
+		  close(_item_focus);
+		  redraw();	
+		  ret = 1;
+		}
+		return(1);
+	      }
+	      break;
+	    }
+	    case fltk3::UpKey:		// next item up
+	    case fltk3::DownKey: {	// next item down
+	      set_item_focus(next_visible_item(_item_focus, ekey));	// next item up|dn
+	      if ( _item_focus ) {					// item in focus?
+                                                                        // Autoscroll
+		int itemtop = _item_focus->y();
+		int itembot = _item_focus->y()+_item_focus->h();
+		if ( itemtop < y() ) { show_item_top(_item_focus); }
+		if ( itembot > y()+h() ) { show_item_bottom(_item_focus); }
+		// Extend selection
+		if ( _prefs.selectmode() == fltk3::TREE_SELECT_MULTI &&	// multiselect on?
+                    (fltk3::event_state() & fltk3::SHIFT) &&			// shift key?
+                    ! _item_focus->is_selected() ) {			// not already selected?
+                  select(_item_focus);				// extend selection..
+		}
+		return(1);
+	      }
+	      break;
+	    }
+	  }
+	}
+      }
+      break;
+    }
+  }
+  
+  // Let fltk3::Group take a shot at handling the event
+  if (Group::handle(e)) {
+    return(1);			// handled? don't continue below
+  }
+  
+  // Handle events the child FLTK widgets didn't need
+  
+  static fltk3::TreeItem *lastselect = 0;
+  // fprintf(stderr, "ERCODEBUG: fltk3::Tree::handle(): Event was %s (%d)\n", fl_eventnames[e], e); // DEBUGGING
+  if ( ! _root ) return(ret);
+  switch ( e ) {
+    case fltk3::PUSH: {					// clicked on a tree item?
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+        fltk3::focus(this);
+      }
+      lastselect = 0;
+      fltk3::TreeItem *o = _root->find_clicked(_prefs);
+      if ( ! o ) break;
+      set_item_focus(o);				// becomes new focus widget
+      redraw();
+      ret |= 1;						// handled
+      if ( fltk3::event_button() == fltk3::LEFT_MOUSE ) {
+	if ( o->event_on_collapse_icon(_prefs) ) {	// collapse icon clicked?
+	  open_toggle(o);
+	} else if ( o->event_on_label(_prefs) && 	// label clicked?
+                   (!o->widget() || !fltk3::event_inside(o->widget())) &&		// not inside widget
+                   (!_vscroll->visible() || !fltk3::event_inside(_vscroll)) ) {	// not on scroller
+	  switch ( _prefs.selectmode() ) {
+	    case fltk3::TREE_SELECT_NONE:
+	      break;
+	    case fltk3::TREE_SELECT_SINGLE:
+	      select_only(o);
+	      break;
+	    case fltk3::TREE_SELECT_MULTI: {
+	      if ( fltk3::event_state() & fltk3::SHIFT ) {		// SHIFT+PUSH?
+	        select(o);					// add to selection
+	      } else if ( fltk3::event_state() & fltk3::CTRL ) {	// CTRL+PUSH?
+		select_toggle(o);				// toggle selection state
+		lastselect = o;					// save toggled item (prevent oscillation)
+	      } else {
+		select_only(o);
+	      }
+	      break;
+	    }
+	  }
+	}
+      }
+      break;
+    }
+    case fltk3::DRAG: {
+      // do the scrolling first:
+      int my = fltk3::event_y();
+      if ( my < y() ) {				// above top?
+        int p = vposition()-(y()-my);
+	if ( p < 0 ) p = 0;
+        vposition(p);
+      } else if ( my > (y()+h()) ) {		// below bottom?
+        int p = vposition()+(my-y()-h());
+	if ( p > (int)_vscroll->maximum() ) p = (int)_vscroll->maximum();
+        vposition(p);
+      }
+      if ( fltk3::event_button() != fltk3::LEFT_MOUSE ) break;
+      fltk3::TreeItem *o = _root->find_clicked(_prefs);
+      if ( ! o ) break;
+      set_item_focus(o);			// becomes new focus widget
+      redraw();
+      ret |= 1;
+      // Item's label clicked?
+      if ( o->event_on_label(_prefs) && 
+          (!o->widget() || !fltk3::event_inside(o->widget())) &&
+          (!_vscroll->visible() || !fltk3::event_inside(_vscroll)) ) {
+	// Handle selection behavior
+	switch ( _prefs.selectmode() ) {
+	  case fltk3::TREE_SELECT_NONE: break;	// no selection changes
+	  case fltk3::TREE_SELECT_SINGLE:
+	    select_only(o);
+	    break;
+	  case fltk3::TREE_SELECT_MULTI:
+	    if ( fltk3::event_state() & fltk3::CTRL &&	// CTRL-DRAG: toggle?
+                lastselect != o ) {		// not already toggled from last microdrag?
+	      select_toggle(o);			// toggle selection
+	      lastselect = o;			// save we toggled it (prevents oscillation)
+	    } else {
+	      select(o);			// select this
+	    }
+	    break;
+	}
+      }
+      break;
+    }
+  }
+  return(ret);
+}
+
+/// Deselect \p item and all its children.
+/// If item is NULL, first() is used.
+/// Handles calling redraw() if anything was changed.
+/// Invokes the callback depending on the value of optional parameter \p docallback.
+///
+/// The callback can use callback_item() and callback_reason() respectively to determine 
+/// the item changed and the reason the callback was called.
+///
+/// \param[in] item The item that will be deselected (along with all its children).
+///                 If NULL, first() is used.
+/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+///     -   0 - the callback() is not invoked
+///     -   1 - the callback() is invoked for each item that changed state,
+///             callback_reason() will be fltk3::TREE_REASON_DESELECTED
+///
+/// \returns count of how many items were actually changed to the deselected state.
+///
+int fltk3::Tree::deselect_all(fltk3::TreeItem *item, int docallback) {
+  item = item ? item : first();			// NULL? use first()
+  if ( ! item ) return(0);
+  int count = 0;
+  // Deselect item
+  if ( item->is_selected() )
+    if ( deselect(item, docallback) )
+      ++count;
+  // Deselect its children
+  for ( int t=0; t<item->children(); t++ ) {
+    count += deselect_all(item->child(t), docallback);	// recurse
+  }
+  return(count);
+}
+
+/// Select \p item and all its children.
+/// If item is NULL, first() is used.
+/// Handles calling redraw() if anything was changed.
+/// Invokes the callback depending on the value of optional parameter \p docallback.
+///
+/// The callback can use callback_item() and callback_reason() respectively to determine 
+/// the item changed and the reason the callback was called.
+///
+/// \param[in] item The item that will be selected (along with all its children). 
+///            If NULL, first() is used.
+/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+///     -   0 - the callback() is not invoked
+///     -   1 - the callback() is invoked for each item that changed state,
+///             callback_reason() will be fltk3::TREE_REASON_SELECTED
+/// \returns count of how many items were actually changed to the selected state.
+///
+int fltk3::Tree::select_all(fltk3::TreeItem *item, int docallback) {
+  item = item ? item : first();			// NULL? use first()
+  if ( ! item ) return(0);
+  int count = 0;
+  // Select item
+  if ( !item->is_selected() )
+    if ( select(item, docallback) )
+      ++count;
+  // Select its children
+  for ( int t=0; t<item->children(); t++ ) {
+    count += select_all(item->child(t), docallback);	// recurse
+  }
+  return(count);
+}
+
+/// Select only the specified \p item, deselecting all others that might be selected.
+/// If item is 0, first() is used.
+/// Handles calling redraw() if anything was changed.
+/// Invokes the callback depending on the value of optional parameter \p docallback.
+///
+/// The callback can use callback_item() and callback_reason() respectively to determine 
+/// the item changed and the reason the callback was called.
+///
+/// \param[in] selitem The item to be selected. If NULL, first() is used.
+/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
+///     -   0 - the callback() is not invoked
+///     -   1 - the callback() is invoked for each item that changed state, 
+///             callback_reason() will be either fltk3::TREE_REASON_SELECTED or 
+///             fltk3::TREE_REASON_DESELECTED
+/// \returns the number of items whose selection states were changed, if any.
+///
+int fltk3::Tree::select_only(fltk3::TreeItem *selitem, int docallback) {
+  selitem = selitem ? selitem : first();	// NULL? use first()
+  if ( ! selitem ) return(0);
+  int changed = 0;
+  for ( fltk3::TreeItem *item = first(); item; item = item->next() ) {
+    if ( item == selitem ) {
+      if ( item->is_selected() ) continue;	// don't count if already selected
+      select(item, docallback);
+      ++changed;
+    } else {
+      if ( item->is_selected() ) {
+        deselect(item, docallback);
+        ++changed;
+      }
+    }
+  }
+  return(changed);
+}
+
+/// Adjust the vertical scroll bar so that \p item is visible
+/// \p yoff pixels from the top of the fltk3::Tree widget's display.
+///
+/// For instance, yoff=0 will position the item at the top.
+///
+/// If yoff is larger than the vertical scrollbar's limit,
+/// the value will be clipped. So if yoff=100, but scrollbar's max
+/// is 50, then 50 will be used.
+///
+/// \param[in] item The item to be shown. If NULL, first() is used.
+/// \param[in] yoff The pixel offset from the top for the displayed position.
+///
+/// \see show_item_top(), show_item_middle(), show_item_bottom()
+///
+void fltk3::Tree::show_item(fltk3::TreeItem *item, int yoff) {
+  item = item ? item : first();
+  if (!item) return;
+  int newval = item->y() - y() - yoff + (int)_vscroll->value();
+  if ( newval < _vscroll->minimum() ) newval = (int)_vscroll->minimum();
+  if ( newval > _vscroll->maximum() ) newval = (int)_vscroll->maximum();
+  _vscroll->value(newval);
+  redraw();
+}
+
+/// See if \p item is currently displayed on-screen (visible within the widget).
+/// This can be used to detect if the item is scrolled off-screen.
+/// Checks to see if the item's vertical position is within the top and bottom
+/// edges of the display window. This does NOT take into account the hide()/show()
+/// or open()/close() status of the item.
+///
+/// \param[in] item The item to be checked. If NULL, first() is used.
+/// \returns 1 if displayed, 0 if scrolled off screen or no items are in tree.
+///
+int fltk3::Tree::displayed(fltk3::TreeItem *item) {
+  item = item ? item : first();
+  if (!item) return(0);
+  return( (item->y() >= y()) && (item->y() <= (y()+h()-item->h())) ? 1 : 0);
+}
+
+/// Adjust the vertical scroll bar to show \p item at the top
+/// of the display IF it is currently off-screen (e.g. show_item_top()).
+/// If it is already on-screen, no change is made.
+///
+/// \param[in] item The item to be shown. If NULL, first() is used.
+///
+/// \see show_item_top(), show_item_middle(), show_item_bottom()
+///
+void fltk3::Tree::show_item(fltk3::TreeItem *item) {
+  item = item ? item : first();
+  if (!item) return;
+  if ( displayed(item) ) return;
+  show_item_top(item);
+}
+
+/// Adjust the vertical scrollbar so that \p item is at the top of the display.
+///
+/// \param[in] item The item to be shown. If NULL, first() is used.
+///
+void fltk3::Tree::show_item_top(fltk3::TreeItem *item) {
+  item = item ? item : first();
+  if (item) show_item(item, 0);
+}
+
+/// Adjust the vertical scrollbar so that \p item is in the middle of the display.
+///
+/// \param[in] item The item to be shown. If NULL, first() is used.
+///
+void fltk3::Tree::show_item_middle(fltk3::TreeItem *item) {
+  item = item ? item : first();
+  if (item) show_item(item, (h()/2)-(item->h()/2));
+}
+
+/// Adjust the vertical scrollbar so that \p item is at the bottom of the display.
+///
+/// \param[in] item The item to be shown. If NULL, first() is used.
+///
+void fltk3::Tree::show_item_bottom(fltk3::TreeItem *item) {
+  item = item ? item : first();
+  if (item) show_item(item, h()-item->h());
+}
+
+/// Returns the vertical scroll position as a pixel offset.
+/// The position returned is how many pixels of the tree are scrolled off the top edge
+/// of the screen.  Example: A position of '3' indicates the top 3 pixels of 
+/// the tree are scrolled off the top edge of the screen.
+/// \see vposition(), hposition()
+///
+int fltk3::Tree::vposition() const {
+  return((int)_vscroll->value());
+}
+
+///  Sets the vertical scroll offset to position \p pos.
+///  The position is how many pixels of the tree are scrolled off the top edge
+///  of the screen. Example: A position of '3' scrolls the top three pixels of
+///  the tree off the top edge of the screen.
+///  \param[in] pos The vertical position (in pixels) to scroll the browser to.
+///
+void fltk3::Tree::vposition(int pos) {
+  if (pos < 0) pos = 0;
+  if (pos > _vscroll->maximum()) pos = (int)_vscroll->maximum();
+  if (pos == _vscroll->value()) return;
+  _vscroll->value(pos);
+  redraw();
+}
+
+/// Displays \p item, scrolling the tree as necessary.
+/// \param[in] item The item to be displayed. If NULL, first() is used.
+///
+void fltk3::Tree::display(fltk3::TreeItem *item) {
+  item = item ? item : first();
+  if (item) show_item_middle(item);
+}
+
+/**
+ * Read a preferences database into the tree widget.
+ * A preferences database is a hierarchical collection of data which can be
+ * directly loaded into the tree view for inspection.
+ * \param[in] prefs the fltk3::Preferences database
+ */
+void fltk3::Tree::load(fltk3::Preferences &prefs) 
+{
+  int i, j, n, pn = strlen(prefs.path());
+  char *p;
+  const char *path = prefs.path();
+  if (strcmp(path, ".")==0)
+    path += 1; // root path is empty
+  else
+    path += 2; // child path starts with "./"
+  n = prefs.groups();
+  for (i=0; i<n; i++) {
+    fltk3::Preferences prefsChild(prefs, i);
+    add(prefsChild.path()+2); // children always start with "./"
+    load(prefsChild);
+  }
+  n = prefs.entries();
+  for (i=0; i<n; i++) {
+    // We must remove all fwd slashes in the key and value strings. Replace with backslash.
+    char *key = strdup(prefs.entry(i));
+    int kn = strlen(key);
+    for (j=0; j<kn; j++) {
+      if (key[j]=='/') key[j]='\\'; 
+    }
+    char *val;  prefs.get(key, val, "");
+    int vn = strlen(val);
+    for (j=0; j<vn; j++) {
+      if (val[j]=='/') val[j]='\\'; 
+    }
+    if (vn<40) {
+      int sze = pn + strlen(key) + vn;
+      p = (char*)malloc(sze+5);
+      sprintf(p, "%s/%s = %s", path, key, val);
+    } else {
+      int sze = pn + strlen(key) + 40;
+      p = (char*)malloc(sze+5);
+      sprintf(p, "%s/%s = %.40s...", path, key, val);
+    }
+    add(p[0]=='/'?p+1:p);
+    free(p);
+    free(val);
+    free(key);
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tree.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tree_Item.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tree_Item.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tree_Item.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,929 @@
+//
+// "$Id$"
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fltk3/Widget.h>
+#include <fltk3/TreeItem.h>
+#include <fltk3/TreePrefs.h>
+
+//////////////////////
+// fltk3::TreeItem.cxx
+//////////////////////
+//
+// fltk3::Tree -- This file is part of the fltk3::Tree widget for FLTK
+// Copyright (C) 2009-2010 by Greg Ercolano.
+//
+// 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.
+//
+
+// Was the last event inside the specified xywh?
+static int event_inside(const int xywh[4]) {
+  return(fltk3::event_inside(xywh[0],xywh[1],xywh[2],xywh[3]));
+}
+
+/// Constructor.
+///     Makes a new instance of fltk3::TreeItem using defaults from 'prefs'.
+///
+fltk3::TreeItem::TreeItem(const fltk3::TreePrefs &prefs) {
+  _label        = 0;
+  _labelfont    = prefs.labelfont();
+  _labelsize    = prefs.labelsize();
+  _labelfgcolor = prefs.labelfgcolor();
+  _labelbgcolor = prefs.labelbgcolor();
+  _widget       = 0;
+  _open         = 1;
+  _visible      = 1;
+  _active       = 1;
+  _selected     = 0;
+  _xywh[0]      = 0;
+  _xywh[1]      = 0;
+  _xywh[2]      = 0;
+  _xywh[3]      = 0;
+  _collapse_xywh[0] = 0;
+  _collapse_xywh[1] = 0;
+  _collapse_xywh[2] = 0;
+  _collapse_xywh[3] = 0;
+  _label_xywh[0]    = 0;
+  _label_xywh[1]    = 0;
+  _label_xywh[2]    = 0;
+  _label_xywh[3]    = 0;
+  _usericon         = 0;
+  _userdata         = 0;
+  _parent           = 0;
+}
+
+// DTOR
+fltk3::TreeItem::~TreeItem() {
+  if ( _label ) { 
+    free((void*)_label);
+    _label = 0;
+  }
+  _widget = 0;			// fltk3::Group will handle destruction
+  _usericon = 0;		// user handled allocation
+  //_children.clear();		// array's destructor handles itself
+}
+
+/// Copy constructor.
+fltk3::TreeItem::TreeItem(const fltk3::TreeItem *o) {
+  _label        = o->label() ? strdup(o->label()) : 0;
+  _labelfont    = o->labelfont();
+  _labelsize    = o->labelsize();
+  _labelfgcolor = o->labelfgcolor();
+  _labelbgcolor = o->labelbgcolor();
+  _widget       = o->widget();
+  _open         = o->_open;
+  _visible      = o->_visible;
+  _active       = o->_active;
+  _selected     = o->_selected;
+  _xywh[0]      = o->_xywh[0];
+  _xywh[1]      = o->_xywh[1];
+  _xywh[2]      = o->_xywh[2];
+  _xywh[3]      = o->_xywh[3];
+  _collapse_xywh[0] = o->_collapse_xywh[0];
+  _collapse_xywh[1] = o->_collapse_xywh[1];
+  _collapse_xywh[2] = o->_collapse_xywh[2];
+  _collapse_xywh[3] = o->_collapse_xywh[3];
+  _label_xywh[0]    = o->_label_xywh[0];
+  _label_xywh[1]    = o->_label_xywh[1];
+  _label_xywh[2]    = o->_label_xywh[2];
+  _label_xywh[3]    = o->_label_xywh[3];
+  _usericon         = o->usericon();
+  _userdata         = o->user_data();
+  _parent           = o->_parent;
+}
+
+/// Print the tree as 'ascii art' to stdout.
+/// Used mainly for debugging.
+///
+void fltk3::TreeItem::show_self(const char *indent) const {
+  if ( label() ) {
+    printf("%s-%s (%d children, this=%p, parent=%p depth=%d)\n",
+           indent,label(),children(),(void*)this, (void*)_parent, depth());
+  }
+  if ( children() ) {
+    char *i2 = (char*)malloc(strlen(indent) + 2);
+    strcpy(i2, indent);
+    strcat(i2, " |");
+    for ( int t=0; t<children(); t++ ) {
+      child(t)->show_self(i2);
+    }
+  }
+  fflush(stdout);
+}
+
+/// Set the label. Makes a copy of the name.
+void fltk3::TreeItem::label(const char *name) {
+  if ( _label ) { free((void*)_label); _label = 0; }
+  _label = name ? strdup(name) : 0;
+}
+
+/// Return the label.
+const char *fltk3::TreeItem::label() const {
+  return(_label);
+}
+
+/// Return child item for the specified 'index'.
+const fltk3::TreeItem *fltk3::TreeItem::child(int index) const {
+  return(_children[index]);
+}
+
+/// Clear all the children for this item.
+void fltk3::TreeItem::clear_children() {
+  _children.clear();
+}
+
+/// Return the index of the immediate child of this item that has the label 'name'.
+///
+/// \returns index of found item, or -1 if not found.
+///
+int fltk3::TreeItem::find_child(const char *name) {
+  if ( name ) {
+    for ( int t=0; t<children(); t++ ) {
+      if ( child(t)->label() ) {
+        if ( strcmp(child(t)->label(), name) == 0 ) {
+          return(t);
+        }
+      }
+    }
+  }
+  return(-1);
+}
+
+/// Find child item by descending array of names. Does not include self in search.
+/// Only fltk3::Tree should need this method.
+///
+/// \returns item, or 0 if not found
+///
+const fltk3::TreeItem *fltk3::TreeItem::find_child_item(char **arr) const {
+  for ( int t=0; t<children(); t++ ) {
+    if ( child(t)->label() ) {
+      if ( strcmp(child(t)->label(), *arr) == 0 ) {	// match?
+        if ( *(arr+1) ) {				// more in arr? descend
+          return(_children[t]->find_item(arr+1));
+        } else {					// end of arr? done
+          return(_children[t]);
+        }
+      }
+    }
+  }
+  return(0);
+}
+
+/// Find child item by descending array of names. Does not include self in search.
+/// Only fltk3::Tree should need this method. Use fltk3::Tree::find_item() instead.
+///
+/// \returns item, or 0 if not found
+///
+fltk3::TreeItem *fltk3::TreeItem::find_child_item(char **arr) {
+  for ( int t=0; t<children(); t++ ) {
+    if ( child(t)->label() ) {
+      if ( strcmp(child(t)->label(), *arr) == 0 ) {	// match?
+        if ( *(arr+1) ) {				// more in arr? descend
+          return(_children[t]->find_item(arr+1));
+        } else {					// end of arr? done
+          return(_children[t]);
+        }
+      }
+    }
+  }
+  return(0);
+}
+
+/// Find item by descending array of \p names. Includes self in search.
+/// Only fltk3::Tree should need this method. Use fltk3::Tree::find_item() instead.
+///
+/// \returns item, or 0 if not found
+///
+const fltk3::TreeItem *fltk3::TreeItem::find_item(char **names) const {
+  if ( label() && strcmp(label(), *names) == 0 ) {	// match self?
+    if ( *(names+1) == 0 ) {				// end of names,
+      return(this);					// found ourself.
+    }
+  }
+  if ( children() ) {					// check children..
+    return(find_child_item(names));
+  }
+  return(0);
+}
+
+/// Find item by descending array of \p names. Includes self in search.
+/// Only fltk3::Tree should need this method.
+///
+/// \returns item, or 0 if not found
+///
+fltk3::TreeItem *fltk3::TreeItem::find_item(char **names) {
+  if ( label() && strcmp(label(), *names) == 0 ) {	// match self?
+    if ( *(names+1) == 0 ) {				// end of names,
+      return(this);					// found ourself.
+    }
+  }
+  if ( children() ) {					// check children..
+    return(find_child_item(names));
+  }
+  return(0);
+}
+
+/// Find the index number for the specified 'item'
+/// in the current item's list of children.
+///
+/// \returns the index, or -1 if not found.
+///
+int fltk3::TreeItem::find_child(fltk3::TreeItem *item) {
+  for ( int t=0; t<children(); t++ ) {
+    if ( item == child(t) ) {
+      return(t);
+    }
+  }
+  return(-1);
+}
+
+/// Add a new child to this item with the name 'new_label', with defaults from 'prefs'.
+/// An internally managed copy is made of the label string.
+/// Adds the item based on the value of prefs.sortorder().
+///
+fltk3::TreeItem *fltk3::TreeItem::add(const fltk3::TreePrefs &prefs, const char *new_label) {
+  fltk3::TreeItem *item = new fltk3::TreeItem(prefs);
+  item->label(new_label);
+  item->_parent = this;
+  switch ( prefs.sortorder() ) {
+    case fltk3::TREE_SORT_NONE: {
+      _children.add(item);
+      return(item);
+    }
+    case fltk3::TREE_SORT_ASCENDING: {
+      for ( int t=0; t<_children.total(); t++ ) {
+        fltk3::TreeItem *c = _children[t];
+        if ( c->label() && strcmp(c->label(), new_label) > 0 ) {
+          _children.insert(t, item);
+          return(item);
+        }
+      }
+      _children.add(item);
+      return(item);
+    }
+    case fltk3::TREE_SORT_DESCENDING: {
+      for ( int t=0; t<_children.total(); t++ ) {
+        fltk3::TreeItem *c = _children[t];
+        if ( c->label() && strcmp(c->label(), new_label) < 0 ) {
+          _children.insert(t, item);
+          return(item);
+        }
+      }
+      _children.add(item);
+      return(item);
+    }
+  }
+  return(item);
+}
+
+/// Descend into the path specified by \p arr, and add a new child there.
+/// Should be used only by fltk3::Tree's internals.
+/// Adds the item based on the value of prefs.sortorder().
+/// \returns the item added.
+///
+fltk3::TreeItem *fltk3::TreeItem::add(const fltk3::TreePrefs &prefs, char **arr) {
+  int t = find_child(*arr);
+  fltk3::TreeItem *item = 0;
+  if ( t == -1 ) {
+    item = (fltk3::TreeItem*)add(prefs, *arr);
+  } else {
+    item = (fltk3::TreeItem*)child(t);
+  }
+  if ( *(arr+1) ) {		// descend?
+    return(item->add(prefs, arr+1));
+  } else {
+    return(item);		// end? done
+  }
+}
+
+/// Insert a new item into current item's children at a specified position.
+/// \returns the new item inserted.
+///
+fltk3::TreeItem *fltk3::TreeItem::insert(const fltk3::TreePrefs &prefs, const char *new_label, int pos) {
+  fltk3::TreeItem *item = new fltk3::TreeItem(prefs);
+  item->label(new_label);
+  item->_parent = this;
+  _children.insert(pos, item);
+  return(item);
+}
+
+/// Insert a new item above this item.
+/// \returns the new item inserted, or 0 if an error occurred.
+///
+fltk3::TreeItem *fltk3::TreeItem::insert_above(const fltk3::TreePrefs &prefs, const char *new_label) {
+  fltk3::TreeItem *p = _parent;
+  if ( ! p ) return(0);
+  // Walk our parent's children to find ourself
+  for ( int t=0; t<p->children(); t++ ) {
+    fltk3::TreeItem *c = p->child(t);
+    if ( this == c ) {
+      return(p->insert(prefs, new_label, t));
+    }
+  }
+  return(0);
+}
+
+/// Remove child by item.
+///    \returns 0 if removed, -1 if item not an immediate child.
+///
+int fltk3::TreeItem::remove_child(fltk3::TreeItem *item) {
+  for ( int t=0; t<children(); t++ ) {
+    if ( child(t) == item ) {
+      item->clear_children();
+      _children.remove(t);
+      return(0);
+    }
+  }
+  return(-1);
+}
+
+/// Remove immediate child (and its children) by its label 'name'.
+/// \returns 0 if removed, -1 if not found.
+///
+int fltk3::TreeItem::remove_child(const char *name) {
+  for ( int t=0; t<children(); t++ ) {
+    if ( child(t)->label() ) {
+      if ( strcmp(child(t)->label(), name) == 0 ) {
+        _children.remove(t);
+        return(0);
+      }
+    }
+  }
+  return(-1);
+}
+
+/// Swap two of our children, given two child index values.
+/// Use this eg. for sorting.
+///
+/// This method is FAST, and does not involve lookups.
+///
+/// No range checking is done on either index value.
+///
+/// \returns
+///    -    0 : OK
+///    -   -1 : failed: 'a' or 'b' is not our immediate child
+///
+void fltk3::TreeItem::swap_children(int ax, int bx) {
+  _children.swap(ax, bx);
+}
+
+/// Swap two of our children, given item pointers.
+/// Use this eg. for sorting. 
+///
+/// This method is SLOW because it involves linear lookups.
+/// For speed, use swap_children(int,int) instead.
+///
+/// \returns
+///    -    0 : OK
+///    -   -1 : failed: 'a' or 'b' is not our immediate child
+///
+int fltk3::TreeItem::swap_children(fltk3::TreeItem *a, fltk3::TreeItem *b) {
+  int ax = -1, bx = -1;
+  for ( int t=0; t<children(); t++ ) {	// find index for a and b
+    if ( _children[t] == a ) { ax = t; if ( bx != -1 ) break; else continue; }
+    if ( _children[t] == b ) { bx = t; if ( ax != -1 ) break; else continue; }
+  }
+  if ( ax == -1 || bx == -1 ) return(-1);	// not found? fail
+  swap_children(ax,bx);
+  return(0);
+}
+
+/// Internal: Horizontal connector line based on preference settings.
+void fltk3::TreeItem::draw_horizontal_connector(int x1, int x2, int y, const fltk3::TreePrefs &prefs) {
+  fltk3::color(prefs.connectorcolor());
+  switch ( prefs.connectorstyle() ) {
+    case fltk3::TREE_CONNECTOR_SOLID:
+      y |= 1;				// force alignment w/dot pattern
+      fltk3::line(x1,y,x2,y);
+      return;
+    case fltk3::TREE_CONNECTOR_DOTTED: 
+        {
+            y |= 1;				// force alignment w/dot pattern
+            for ( int xx=x1; xx<=x2; xx++ ) {
+                if ( !(xx & 1) ) fltk3::point(xx, y);
+            }
+        }
+      return;
+    case fltk3::TREE_CONNECTOR_NONE:
+      return;
+  }
+}
+
+/// Internal: Vertical connector line based on preference settings.
+void fltk3::TreeItem::draw_vertical_connector(int x, int y1, int y2, const fltk3::TreePrefs &prefs) {
+  fltk3::color(prefs.connectorcolor());
+  switch ( prefs.connectorstyle() ) {
+    case fltk3::TREE_CONNECTOR_SOLID:
+      y1 |= 1;				// force alignment w/dot pattern
+      y2 |= 1;				// force alignment w/dot pattern
+      fltk3::line(x,y1,x,y2);
+      return;
+    case fltk3::TREE_CONNECTOR_DOTTED:
+        {
+            y1 |= 1;				// force alignment w/dot pattern
+            y2 |= 1;				// force alignment w/dot pattern
+            for ( int yy=y1; yy<=y2; yy++ ) {
+                if ( yy & 1 ) fltk3::point(x, yy);
+            }
+        }
+        return;
+    case fltk3::TREE_CONNECTOR_NONE:
+      return;
+  }
+}
+
+/// Find the item that the last event was over.
+///
+///    Returns the item if it is visible, and mouse is over it.
+///    Works even if widget deactivated.
+///    Use event_on_collapse_icon() to determine if collapse button was pressed.
+///
+///    \returns const visible item under the event if found, or 0 if none.
+///
+const fltk3::TreeItem *fltk3::TreeItem::find_clicked(const fltk3::TreePrefs &prefs) const {
+  if ( ! _visible ) return(0);
+  if ( is_root() && !prefs.showroot() ) {
+    // skip event check if we're root but root not being shown
+  } else {
+    // See if event is over us
+    if ( ::event_inside(_xywh) ) {		// event within this item?
+      return(this);				// found
+    }
+  }
+  if ( is_open() ) {				// open? check children of this item
+    for ( int t=0; t<children(); t++ ) {
+      const fltk3::TreeItem *item;
+      if ( ( item = _children[t]->find_clicked(prefs) ) != NULL) {	// check child and its descendents
+        return(item);							// found?
+      }
+    }
+  }
+  return(0);
+}
+
+/// Non-const version of the above.
+/// Find the item that the last event was over.
+///
+///    Returns the item if it is visible, and mouse is over it.
+///    Works even if widget deactivated.
+///    Use event_on_collapse_icon() to determine if collapse button was pressed.
+///
+///    \returns the visible item under the event if found, or 0 if none.
+///
+fltk3::TreeItem *fltk3::TreeItem::find_clicked(const fltk3::TreePrefs &prefs) {
+  if ( ! _visible ) return(0);
+  if ( is_root() && !prefs.showroot() ) {
+    // skip event check if we're root but root not being shown
+  } else {
+    // See if event is over us
+    if ( ::event_inside(_xywh) ) {		// event within this item?
+      return(this);				// found
+    }
+  }
+  if ( is_open() ) {				// open? check children of this item
+    for ( int t=0; t<children(); t++ ) {
+      fltk3::TreeItem *item;
+      if ( ( item = _children[t]->find_clicked(prefs) ) != NULL ) {	// check child and its descendents
+        return(item);							// found?
+      }
+    }
+  }
+  return(0);
+}
+
+static void draw_item_focus(fltk3::Boxtype B, fltk3::Color C, int X, int Y, int W, int H) {
+  if (!fltk3::visible_focus()) return;
+  switch (B) {
+    case fltk3::DOWN_BOX:
+    case fltk3::DOWN_FRAME:
+    case fltk3::THIN_DOWN_BOX:
+    case fltk3::THIN_DOWN_FRAME:
+      X ++;
+      Y ++;
+    default:
+      break;
+  }
+  fltk3::color(fltk3::contrast(fltk3::BLACK, C));
+
+#if defined(USE_X11) || defined(__APPLE_QUARTZ__)
+  fltk3::line_style(fltk3::DOT);
+  fltk3::rect(X + fltk3::box_dx(B), Y + fltk3::box_dy(B),
+          W - fltk3::box_dw(B) - 1, H - fltk3::box_dh(B) - 1);
+  fltk3::line_style(fltk3::SOLID);
+#else
+  // Some platforms don't implement dotted line style, so draw
+  // every other pixel around the focus area...
+  //
+  // Also, QuickDraw (MacOS) does not support line styles specifically,
+  // and the hack we use in fltk3::line_style() will not draw horizontal lines
+  // on odd-numbered rows...
+  int i, xx, yy;
+
+  X += fltk3::box_dx(B);
+  Y += fltk3::box_dy(B);
+  W -= fltk3::box_dw(B) + 2;
+  H -= fltk3::box_dh(B) + 2;
+
+  for (xx = 0, i = 1; xx < W; xx ++, i ++) if (i & 1) fltk3::point(X + xx, Y);
+  for (yy = 0; yy < H; yy ++, i ++) if (i & 1) fltk3::point(X + W, Y + yy);
+  for (xx = W; xx > 0; xx --, i ++) if (i & 1) fltk3::point(X + xx, Y + H);
+  for (yy = H; yy > 0; yy --, i ++) if (i & 1) fltk3::point(X, Y + yy);
+#endif
+}
+
+/// Draw this item and its children.
+void fltk3::TreeItem::draw(int X, int &Y, int W, fltk3::Widget *tree,
+			fltk3::TreeItem *itemfocus,
+                        const fltk3::TreePrefs &prefs, int lastchild) {
+  if ( ! _visible ) return; 
+  fltk3::font(_labelfont, _labelsize);
+  int H = _labelsize;
+  if(usericon() && H < usericon()->h()) H = usericon()->h(); 
+  H += prefs.linespacing() + fltk3::descent();
+  // adjust horizontally if we draw no connecting lines
+  if ( is_root() && prefs.connectorstyle() == fltk3::TREE_CONNECTOR_NONE ) {
+    X -= prefs.openicon()->w();
+    W += prefs.openicon()->w();
+  }
+  // Colors, fonts
+  fltk3::Color fg = _selected ? fltk3::contrast(_labelfgcolor, tree->selection_color())
+                          : _active ? _labelfgcolor 
+			            : fltk3::inactive(_labelfgcolor);
+  fltk3::Color bg = _selected ? _active ? tree->selection_color() 
+                                    : fltk3::inactive(tree->selection_color())
+                          : _labelbgcolor;
+  // Update the xywh of this item
+  _xywh[0] = X;
+  _xywh[1] = Y;
+  _xywh[2] = W;
+  _xywh[3] = H;
+  // Text size
+  int textw=0, texth=0;
+  fltk3::measure(_label, textw, texth, 0);
+  int textycenter = Y+(H/2);
+  int &icon_w = _collapse_xywh[2] = prefs.openicon()->w();
+  int &icon_x = _collapse_xywh[0] = X + (icon_w + prefs.connectorwidth())/2 - 3;
+  int &icon_y = _collapse_xywh[1] = textycenter - (prefs.openicon()->h()/2);
+  _collapse_xywh[3] = prefs.openicon()->h();
+  // Horizontal connector values
+  int hstartx  = X+icon_w/2-1;
+  int hendx    = hstartx + prefs.connectorwidth();
+  int hcenterx = X + icon_w + ((hendx - (X + icon_w)) / 2);
+  
+  // See if we should draw this item
+  //    If this item is root, and showroot() is disabled, don't draw.
+  //
+  char drawthis = ( is_root() && prefs.showroot() == 0 ) ? 0 : 1;
+  if ( drawthis ) {
+    // Draw connectors
+    if ( prefs.connectorstyle() != fltk3::TREE_CONNECTOR_NONE ) {
+      // Horiz connector between center of icon and text
+      // if this is root, the connector should not dangle in thin air on the left
+      if (is_root())
+        draw_horizontal_connector(hcenterx, hendx, textycenter, prefs);
+      else
+        draw_horizontal_connector(hstartx, hendx, textycenter, prefs);
+      if ( has_children() && is_open() ) {
+        // Small vertical line down to children
+        draw_vertical_connector(hcenterx, textycenter, Y+H, prefs);
+      }
+      // Connectors for last child
+      if ( ! is_root() ) {
+        if ( lastchild ) {
+          draw_vertical_connector(hstartx, Y, textycenter, prefs);
+        } else {
+          draw_vertical_connector(hstartx, Y, Y+H, prefs);
+        }
+      }
+    } 
+    // Draw collapse icon
+    if ( has_children() && prefs.showcollapse() ) {
+      // Draw icon image
+      if ( is_open() ) {
+        prefs.closeicon()->draw(icon_x,icon_y);
+      } else {
+        prefs.openicon()->draw(icon_x,icon_y);
+      }
+    }
+    // Background for this item
+    int cw1 = icon_w+prefs.connectorwidth()/2, cw2 = prefs.connectorwidth();
+    int cwidth = cw1>cw2 ? cw1 : cw2;
+    int &bx = _label_xywh[0] = X+(icon_w/2-1+cwidth);
+    int &by = _label_xywh[1] = Y;
+    int &bw = _label_xywh[2] = W-(icon_w/2-1+cwidth);
+    int &bh = _label_xywh[3] = H;
+    // Draw bg only if different from tree's bg
+    if ( bg != tree->color() || is_selected() ) {
+      if ( is_selected() ) {
+        // Selected? Use selectbox() style
+        fltk3::draw_box(prefs.selectbox(), bx, by, bw, bh, bg);
+      } else {
+        // Not Selected? use plain filled rectangle
+        fltk3::color(bg);
+        fltk3::rectf(bx, by, bw, bh);
+      }
+    }
+    // Draw user icon (if any)
+    int useroff = (icon_w/2-1+cwidth);
+    if ( usericon() ) {
+      // Item has user icon? Use it
+      useroff += prefs.usericonmarginleft();
+      icon_y = textycenter - (usericon()->h() >> 1);
+      usericon()->draw(X+useroff,icon_y);
+      useroff += usericon()->w();
+    } else if ( prefs.usericon() ) {
+      // Prefs has user icon? Use it
+      useroff += prefs.usericonmarginleft();
+      icon_y = textycenter - (prefs.usericon()->h() >> 1);
+      prefs.usericon()->draw(X+useroff,icon_y);
+      useroff += prefs.usericon()->w();
+    }
+    useroff += prefs.labelmarginleft();
+    // Draw label
+    if ( widget() ) {
+      // Widget? Draw it
+      int lx = X+useroff;
+      int ly = by;
+      int lw = widget()->w();
+      int lh = bh;
+      if ( widget()->x() != lx || widget()->y() != ly ||
+          widget()->w() != lw || widget()->h() != lh ) {
+        widget()->resize(lx, ly, lw, lh);		// fltk will handle drawing this
+      }
+    } else {
+      // No label widget? Draw text label
+      if ( _label ) {
+        fltk3::color(fg);
+        fltk3::draw(_label, X+useroff, Y+H-fltk3::descent()-1);
+      }
+    }
+    if ( this == itemfocus && fltk3::visible_focus() && fltk3::focus() == tree) {
+      // Draw focus box around this item
+      draw_item_focus(fltk3::NO_BOX,bg,bx+1,by+1,bw-1,bh-1);
+    }
+    Y += H;
+  }			// end drawthis
+  // Draw children
+  if ( has_children() && is_open() ) {
+    int child_x = drawthis ? 				// offset children to right,
+    (hcenterx - (icon_w/2) + 1) : X;			// unless didn't drawthis
+    int child_w = W - (child_x-X);
+    int child_y_start = Y;
+    for ( int t=0; t<children(); t++ ) {
+      int lastchild = ((t+1)==children()) ? 1 : 0;
+      _children[t]->draw(child_x, Y, child_w, tree, itemfocus, prefs, lastchild);
+    }
+    if ( has_children() && is_open() ) {
+      Y += prefs.openchild_marginbottom();		// offset below open child tree
+    }
+    if ( ! lastchild ) {
+      draw_vertical_connector(hstartx, child_y_start, Y, prefs);
+    }
+  }
+}
+
+/// Was the event on the 'collapse' button?
+///
+int fltk3::TreeItem::event_on_collapse_icon(const fltk3::TreePrefs &prefs) const {
+  if ( _visible && _active && has_children() && prefs.showcollapse() ) {
+    return(::event_inside(_collapse_xywh) ? 1 : 0);
+  } else {
+    return(0);
+  }
+}
+
+/// Was event on the label()?
+///
+int fltk3::TreeItem::event_on_label(const fltk3::TreePrefs &prefs) const {
+  if ( _visible && _active ) {
+    return(::event_inside(_label_xywh) ? 1 : 0);
+  } else {
+    return(0);
+  }
+}
+
+/// Internal: Show the FLTK widget() for this item and all children.
+/// Used by open() to re-show widgets that were hidden by a previous close()
+///
+void fltk3::TreeItem::show_widgets() {
+  if ( _widget ) _widget->show();
+  if ( is_open() ) {
+    for ( int t=0; t<_children.total(); t++ ) {
+      _children[t]->show_widgets();
+    }
+  }
+}
+
+/// Internal: Hide the FLTK widget() for this item and all children.
+/// Used by close() to hide widgets.
+///
+void fltk3::TreeItem::hide_widgets() {
+  if ( _widget ) _widget->hide();
+  for ( int t=0; t<_children.total(); t++ ) {
+    _children[t]->hide_widgets();
+  }
+}
+
+/// Open this item and all its children.
+void fltk3::TreeItem::open() {
+  _open = 1;
+  // Tell children to show() their widgets
+  for ( int t=0; t<_children.total(); t++ ) {
+    _children[t]->show_widgets();
+  }
+}
+
+/// Close this item and all its children.
+void fltk3::TreeItem::close() {
+  _open = 0;
+  // Tell children to hide() their widgets
+  for ( int t=0; t<_children.total(); t++ ) {
+    _children[t]->hide_widgets();
+  }
+}
+
+/// Returns how many levels deep this item is in the hierarchy.
+///
+/// For instance; root has a depth of zero, and its immediate children
+/// would have a depth of 1, and so on.
+///
+int fltk3::TreeItem::depth() const {
+  int count = 0;
+  const fltk3::TreeItem *item = parent();
+  while ( item ) {
+    ++count;
+    item = item->parent();
+  }
+  return(count);
+}
+
+/// Return the next item in the tree.
+///
+/// This method can be used to walk the tree forward.
+/// For an example of how to use this method, see fltk3::Tree::first().
+/// 
+/// \returns the next item in the tree, or 0 if there's no more items.
+///
+fltk3::TreeItem *fltk3::TreeItem::next() {
+  fltk3::TreeItem *p, *c = this;
+  if ( c->has_children() ) {
+    return(c->child(0));
+  }
+  while ( ( p = c->parent() ) != NULL ) {	// loop upwards through parents
+    int t = p->find_child(c);			// find our position in parent's children[] array
+    if ( ++t < p->children() )			// not last child?
+      return(p->child(t));			// return next child
+    c = p;					// child becomes parent to move up generation
+  }						// loop: moves up to next parent
+  return(0);					// hit root? done
+}
+
+/// Return the previous item in the tree.
+///
+/// This method can be used to walk the tree backwards.
+/// For an example of how to use this method, see fltk3::Tree::last().
+/// 
+/// \returns the previous item in the tree, or 0 if there's no item above this one (hit the root).
+///
+fltk3::TreeItem *fltk3::TreeItem::prev() {
+  fltk3::TreeItem *p=parent();		// start with parent
+  if ( ! p ) return(0);			// hit root? done
+  int t = p->find_child(this);		// find our position in parent's children[] array
+  if ( --t == -1 ) {	 		// are we first child?
+    return(p);				// return immediate parent
+  }
+  p = p->child(t);			// take parent's previous child
+  while ( p->has_children() ) {		// has children?
+    p = p->child(p->children()-1);	// take last child
+  }
+  return(p);
+}
+
+/// Return this item's next sibling.
+///
+/// Moves to the next item below us at the same level (sibling).
+/// Use this to move down the tree without moving deeper into the tree,
+/// effectively skipping over this item's children/descendents.
+/// 
+/// \returns item's next sibling, or 0 if none.
+///
+fltk3::TreeItem *fltk3::TreeItem::next_sibling() {
+  if ( !parent() ) return(0);			// No parent (root)? We have no siblings
+  int index = parent()->find_child(this);	// find our position in parent's child() array
+  if ( index == -1 ) return(0);			// parent doesn't know us? weird
+  if ( (index+1) < parent()->children() )	// is there a next child?
+    return(parent()->child(index+1));		// return next child if there's one below us
+  return(0);					// no siblings below us
+}
+
+/// Return this item's previous sibling.
+///
+/// Moves to the previous item above us at the same level (sibling).
+/// Use this to move up the tree without moving deeper into the tree.
+/// 
+/// \returns This item's previous sibling, or 0 if none.
+///
+fltk3::TreeItem *fltk3::TreeItem::prev_sibling() {
+  if ( !parent() ) return(0);				// No parent (root)? We have no siblings
+  int index = parent()->find_child(this);		// find next position up in parent's child() array
+  if ( index == -1 ) return(0);				// parent doesn't know us? weird
+  if ( index > 0 ) return(parent()->child(index-1));	// return previous child if there's one above us
+  return(0);						// no siblings above us
+}
+
+/// Return the next visible item. (If this item has children and is closed, children are skipped)
+///
+/// This method can be used to walk the tree forward, skipping items
+/// that are not currently visible to the user.
+/// 
+/// \returns the next visible item below us, or 0 if there's no more items.
+///
+fltk3::TreeItem *fltk3::TreeItem::next_displayed(fltk3::TreePrefs &prefs) {
+  fltk3::TreeItem *c = this;
+  while ( c ) {
+    if ( c->is_root() && !prefs.showroot() ) {		// on root and can't show it?
+      c = c->next();					// skip ahead, try again
+      continue;
+    }
+    if ( c->has_children() && c->is_close() ) {		// item has children and: invisible or closed?
+      // Skip children, take next sibling. If none, try parent's sibling, repeat
+      while ( c ) {
+	fltk3::TreeItem *sib = c->next_sibling();		// get sibling
+	if ( sib ) { c = sib; break; }			// Found? let outer loop test it
+	c = c->parent();				// No sibling? move up tree, try parent's sibling
+      }
+    } else {						// has children and isn't closed, or no children
+      c = c->next();					// use normal 'next'
+    }
+    if ( !c ) return(0);				// no more? done
+    // Check all parents to be sure none are closed.
+    // If closed, move up to that level and repeat until sure none are closed.
+    fltk3::TreeItem *p = c->parent();
+    while (1) {
+      if ( !p || p->is_root() ) return(c);		// hit top? then we're displayed, return c
+      if ( p->is_close() ) c = p;			// found closed parent? make it current
+      p = p->parent();					// continue up tree
+    }
+    if ( c && c->visible() ) return(c);			// item visible? return it
+  }
+  return(0);						// hit end: no more items
+}
+
+/// Return the previous visible item. (If this item above us has children and is closed, its children are skipped)
+///
+/// This method can be used to walk the tree backward, 
+/// skipping items that are not currently visible to the user.
+/// 
+/// \returns the previous visible item above us, or 0 if there's no more items.
+///
+fltk3::TreeItem *fltk3::TreeItem::prev_displayed(fltk3::TreePrefs &prefs) {
+  fltk3::TreeItem *c = this;
+  while ( c ) {
+    c = c->prev();					// previous item
+    if ( !c ) break;					// no more items? done
+    if ( c->is_root() )					// root
+      return((prefs.showroot()&&c->visible()) ? c : 0);	// return root if visible
+    if ( !c->visible() ) continue;			// item not visible? skip
+    // Check all parents to be sure none are closed.
+    // If closed, move up to that level and repeat until sure none are closed.
+    fltk3::TreeItem *p = c->parent();
+    while (1) {
+      if ( !p || p->is_root() ) return(c);		// hit top? then we're displayed, return c
+      if ( p->is_close() ) c = p;			// found closed parent? make it current
+      p = p->parent();					// continue up tree
+    }
+  }
+  return(0);						// hit end: no more items
+}
+
+/// Returns if item and all its parents are visible.
+/// Also takes into consideration if any parent is close()ed.
+/// \returns
+///    1 -- item and its parents are visible/open()
+///    0 -- item (or parents) invisible or close()ed.
+///
+int fltk3::TreeItem::visible_r() const {
+  for (const fltk3::TreeItem *p=this; p; p=p->parent())	// move up through parents
+    if (!p->visible() || p->is_close()) return(0);	// any parent not visible or closed?
+  return(1);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tree_Item.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tree_Item_Array.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tree_Item_Array.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tree_Item_Array.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,157 @@
+//
+// "$Id$"
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <fltk3/TreeItemArray.h>
+#include <fltk3/TreeItem.h>
+
+//////////////////////
+// fltk3::TreeItemArray.cxx
+//////////////////////
+//
+// fltk3::Tree -- This file is part of the fltk3::Tree widget for FLTK
+// Copyright (C) 2009-2010 by Greg Ercolano.
+//
+// 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.
+//
+
+/// Constructor; creates an empty array.
+///
+///     The optional 'chunksize' can be specified to optimize
+///     memory allocation for potentially large arrays. Default chunksize is 10.
+/// 
+fltk3::TreeItemArray::TreeItemArray(int new_chunksize) {
+  _items     = 0;
+  _total     = 0;
+  _size      = 0;
+  _chunksize = new_chunksize;
+}
+
+/// Destructor. Calls each item's destructor, destroys internal _items array.
+fltk3::TreeItemArray::~TreeItemArray() {
+  clear();
+}
+
+/// Copy constructor. Makes new copy of array, with new instances of each item.
+fltk3::TreeItemArray::TreeItemArray(const fltk3::TreeItemArray* o) {
+  _items = (fltk3::TreeItem**)malloc(o->_size * sizeof(fltk3::TreeItem*));
+  _total     = o->_total;
+  _size      = o->_size;
+  _chunksize = o->_chunksize;
+  for ( int t=0; t<o->_total; t++ ) {
+    _items[t] = new fltk3::TreeItem(o->_items[t]);
+  }
+}
+
+/// Clear the entire array.
+///
+///     Each item will be deleted (destructors will be called),
+///     and the array will be cleared. total() will return 0.
+///
+void fltk3::TreeItemArray::clear() {
+  if ( _items ) {
+    for ( int t=0; t<_total; t++ ) {
+      delete _items[t];
+      _items[t] = 0;
+    }
+    free((void*)_items); _items = 0;
+  }
+  _total = _size = 0;
+}
+
+// Internal: Enlarge the items array.
+//
+//    Adjusts size/items memory allocation as needed.
+//    Does NOT change total.
+//
+void fltk3::TreeItemArray::enlarge(int count) {
+  int newtotal = _total + count;	// new total
+  if ( newtotal >= _size ) {		// more than we have allocated?
+    // Increase size of array
+    int newsize = _size + _chunksize;
+    fltk3::TreeItem **newitems = (fltk3::TreeItem**)malloc(newsize * sizeof(fltk3::TreeItem*));
+    if ( _items ) { 
+      // Copy old array -> new, delete old
+      memmove(newitems, _items, _size * sizeof(fltk3::TreeItem*));
+      free((void*)_items); _items = 0;
+    }
+    // Adjust items/sizeitems
+    _items = newitems;
+    _size = newsize;
+  }
+}
+
+/// Insert an item at index position \p pos.
+///
+///     Handles enlarging array if needed, total increased by 1.
+///     If \p pos == total(), an empty item is appended to the array.
+///
+void fltk3::TreeItemArray::insert(int pos, fltk3::TreeItem *new_item) {
+  enlarge(1);
+  // printf("*** POS=%d TOTAL-1=%d NITEMS=%d\n", pos, _total-1, (_total-pos));
+  if ( pos <= (_total - 1) ) {	// need to move memory around?
+    int nitems = _total - pos;
+    memmove(&_items[pos+1], &_items[pos], sizeof(fltk3::TreeItem*) * nitems);
+  } 
+  _items[pos] = new_item;
+  _total++;
+}
+
+/// Add an item* to the end of the array.
+///
+///     Assumes the item was created with 'new', and will remain
+///     allocated.. fltk3::TreeItemArray will handle calling the
+///     item's destructor when the array is cleared or the item remove()'ed.
+///
+void fltk3::TreeItemArray::add(fltk3::TreeItem *val) {
+  insert(_total, val);
+}
+
+/// Remove the item at \param[in] index from the array.
+///
+///     The item will be delete'd (if non-NULL), so its destructor will be called.
+///
+void fltk3::TreeItemArray::remove(int index) {
+  if ( _items[index] ) {		// delete if non-zero
+    delete _items[index];
+  }
+  _items[index] = 0;
+  for ( _total--; index<_total; index++ ) {
+    _items[index] = _items[index+1];
+  }
+}
+
+/// Remove the item from the array.
+///
+///     \returns 0 if removed, or -1 if the item was not in the array.
+///
+int fltk3::TreeItemArray::remove(fltk3::TreeItem *item) {
+  for ( int t=0; t<_total; t++ ) {
+    if ( item == _items[t] ) {
+      remove(t);
+      return(0);
+    }
+  }
+  return(-1);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tree_Item_Array.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Tree_Prefs.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Tree_Prefs.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Tree_Prefs.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,168 @@
+//
+// "$Id$"
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Pixmap.h>
+#include <fltk3/TreePrefs.h>
+#include <string.h>
+
+//////////////////////
+// fltk3::TreePrefs.cxx
+//////////////////////
+//
+// fltk3::Tree -- This file is part of the fltk3::Tree widget for FLTK
+// Copyright (C) 2009-2010 by Greg Ercolano.
+//
+// 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.
+//
+
+// INTERNAL: BUILT IN OPEN/STOW XPMS
+//    These can be replaced via prefs.openicon()/closeicon()
+//
+static const char *L_open_xpm[] = {
+#ifdef __APPLE__
+  "11 11 2 1",
+  ".  c None",
+  "@  c #000000",
+  "...@.......",
+  "...@@......",
+  "...@@@.....",
+  "...@@@@....",
+  "...@@@@@...",
+  "...@@@@@@..",
+  "...@@@@@...",
+  "...@@@@....",
+  "...@@@.....",
+  "...@@......",
+  "...@......."
+#else
+  "11 11 3 1",
+  ".	c #fefefe",
+  "#	c #444444",
+  "@	c #000000",
+  "###########",
+  "#.........#",
+  "#.........#",
+  "#....@....#",
+  "#....@....#",
+  "#..@@@@@..#",
+  "#....@....#",
+  "#....@....#",
+  "#.........#",
+  "#.........#",
+  "###########"
+#endif
+};
+static fltk3::Pixmap L_openpixmap(L_open_xpm);
+
+static const char *L_close_xpm[] = {
+#ifdef __APPLE__
+  "11 11 2 1",
+  ".  c None",
+  "@  c #000000",
+  "...........",
+  "...........",
+  "...........",
+  "...........",
+  "...........",
+  "@@@@@@@@@@@",
+  ".@@@@@@@@@.",
+  "..@@@@@@@..",
+  "...@@@@@...",
+  "....@@@....",
+  ".....@....."
+#else
+  "11 11 3 1",
+  ".	c #fefefe",
+  "#	c #444444",
+  "@	c #000000",
+  "###########",
+  "#.........#",
+  "#.........#",
+  "#.........#",
+  "#.........#",
+  "#..@@@@@..#",
+  "#.........#",
+  "#.........#",
+  "#.........#",
+  "#.........#",
+  "###########"
+#endif
+};
+static fltk3::Pixmap L_closepixmap(L_close_xpm);
+
+/// Sets the default icon to be used as the 'open' icon
+/// when items are add()ed to the tree.
+/// This overrides the built in default '[+]' icon.
+///
+/// \param[in] val -- The new image, or zero to use the default [+] icon.
+///
+void fltk3::TreePrefs::openicon(fltk3::Image *val) {
+  _openimage = val ? val : &L_openpixmap;
+}
+
+/// Sets the icon to be used as the 'close' icon.
+/// This overrides the built in default '[-]' icon.
+///
+/// \param[in] val -- The new image, or zero to use the default [-] icon.
+///
+void fltk3::TreePrefs::closeicon(fltk3::Image *val) {
+  _closeimage = val ? val : &L_closepixmap;
+}
+
+/// fltk3::TreePrefs constructor
+fltk3::TreePrefs::TreePrefs() {
+  _labelfont              = fltk3::HELVETICA;
+  _labelsize              = fltk3::NORMAL_SIZE;
+  _marginleft             = 6;
+  _margintop              = 3;
+  //_marginright          = 3;
+  //_marginbottom         = 3;
+  _openchild_marginbottom = 0;
+  _usericonmarginleft     = 3;
+  _labelmarginleft        = 3;
+  _linespacing            = 0;
+  _labelfgcolor           = fltk3::BLACK;
+  _labelbgcolor           = fltk3::WHITE;
+  _connectorcolor         = fltk3::Color(43);
+#ifdef __APPLE__
+  _connectorstyle         = fltk3::TREE_CONNECTOR_NONE;
+#else
+  _connectorstyle         = fltk3::TREE_CONNECTOR_DOTTED;
+#endif
+  _openimage              = &L_openpixmap;
+  _closeimage             = &L_closepixmap;
+  _userimage              = 0;
+  _showcollapse           = 1;
+  _showroot               = 1;
+  _connectorwidth         = 17;
+  _sortorder              = fltk3::TREE_SORT_NONE;
+  _selectbox              = fltk3::FLAT_BOX;
+  _selectmode             = fltk3::TREE_SELECT_SINGLE;
+  // Let fltk's current 'scheme' affect defaults
+  if ( fltk3::scheme() ) {
+    if ( strcmp(fltk3::scheme(), "gtk+") == 0 ) {
+      _selectbox = fltk3::GTK_THIN_UP_BOX;
+    } else if ( strcmp(fltk3::scheme(), "plastic") == 0 ) {
+      _selectbox = fltk3::PLASTIC_THIN_UP_BOX;
+    }
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Tree_Prefs.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Valuator.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Valuator.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Valuator.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,196 @@
+//
+// "$Id$"
+//
+// Valuator widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+// Base class for sliders and all other one-value "knobs"
+
+#include <fltk3/run.h>
+#include <fltk3/Valuator.h>
+#include <fltk3/math.h>
+#include <stdio.h>
+#include "flstring.h"
+
+fltk3::Valuator::Valuator(int X, int Y, int W, int H, const char* L)
+/**
+  Creates a new fltk3::Valuator widget using the given position,
+  size, and label string. The default boxtype is fltk3::NO_BOX.
+*/
+: fltk3::Widget(X,Y,W,H,L) {
+  align(fltk3::ALIGN_BOTTOM);
+  when(fltk3::WHEN_CHANGED);
+  value_ = 0;
+  previous_value_ = 1;
+  min = 0;
+  max = 1;
+  A = 0.0;
+  B = 1;
+}
+
+const double epsilon = 4.66e-10;
+
+/**  See double fltk3::Valuator::step() const */
+void fltk3::Valuator::step(double s) {
+  if (s < 0) s = -s;
+  A = rint(s);
+  B = 1;
+  while (fabs(s-A/B) > epsilon && B<=(0x7fffffff/10)) {B *= 10; A = rint(s*B);}
+}
+
+/**  Sets the step value to 1/10<SUP>digits</SUP>.*/
+void fltk3::Valuator::precision(int p) {
+  A = 1.0;
+  for (B = 1; p--;) B *= 10;
+}
+/** Asks for partial redraw */
+void fltk3::Valuator::value_damage() {damage(fltk3::DAMAGE_EXPOSE);} // by default do partial-redraw
+
+/**
+    Sets the current value. The new value is <I>not</I>
+    clamped or otherwise changed before storing it. Use
+    clamp() or round() to modify the value before
+    calling value(). The widget is redrawn if the new value
+    is different than the current one. The initial value is zero.
+    <P>changed() will return true if the user has moved the slider,
+    but it will be turned off by value(x) and just before doing a callback
+    (the callback can turn it back on if desired).
+*/
+int fltk3::Valuator::value(double v) {
+  clear_changed();
+  if (v == value_) return 0;
+  value_ = v;
+  value_damage();
+  return 1;
+}
+/** Clamps the value, but accepts v if the previous value is not already out of range */
+double fltk3::Valuator::softclamp(double v) {
+  int which = (min<=max);
+  double p = previous_value_;
+  if ((v<min)==which && p!=min && (p<min)!=which) return min;
+  else if ((v>max)==which && p!=max && (p>max)!=which) return max;
+  else return v;
+}
+
+// inline void fltk3::Valuator::handle_push() {previous_value_ = value_;}
+/** Called during a drag operation, after an fltk3::WHEN_CHANGED event is received and before the callback. */
+void fltk3::Valuator::handle_drag(double v) {
+  if (v != value_) {
+    value_ = v;
+    value_damage();
+    set_changed();
+    if (when() & fltk3::WHEN_CHANGED) do_callback();
+  }
+}
+/** Called after an fltk3::WHEN_RELEASE event is received and before the callback. */
+void fltk3::Valuator::handle_release() {
+  if (when()&fltk3::WHEN_RELEASE) {
+    // insure changed() is off even if no callback is done.  It may have
+    // been turned on by the drag, and then the slider returned to it's
+    // initial position:
+    clear_changed();
+    // now do the callback only if slider in new position or always is on:
+    if (value_ != previous_value_ || when() & fltk3::WHEN_NOT_CHANGED) {
+      do_callback();
+    }
+  }
+}
+
+/**
+  Round the passed value to the nearest step increment.  Does
+  nothing if step is zero.
+*/
+double fltk3::Valuator::round(double v) {
+  if (A) return rint(v*B/A)*A/B;
+  else return v;
+}
+
+/**  Clamps the passed value to the valuator range.*/
+double fltk3::Valuator::clamp(double v) {
+  if ((v<min)==(min<=max)) return min;
+  else if ((v>max)==(min<=max)) return max;
+  else return v;
+}
+
+/**
+  Adds n times the step value to the passed value. If
+  step was set to zero it uses fabs(maximum() - minimum()) /
+  100.
+*/
+double fltk3::Valuator::increment(double v, int n) {
+  if (!A) return v+n*(max-min)/100;
+  if (min > max) n = -n;
+  return (rint(v*B/A)+n)*A/B;
+}
+
+/**
+  Uses internal rules to format the fields numerical value into
+  the character array pointed to by the passed parameter.</P>
+  
+  <P>The actual format used depends on the current step value. If
+  the step value has been set to zero then a %g format is used.
+  If the step value is non-zero, then a %.*f format is used,
+  where the precision is calculated to show sufficient digits
+  for the current step value. An integer step value, such as 1
+  or 1.0, gives a precision of 0, so the formatted value will
+  appear as an integer.</P>
+  
+  <P>This method is used by the Fl_Value_... group of widgets to 
+  format the current value into a text string. 
+  The return value is the length of the formatted text.
+  The formatted value is written into in <i>buffer</i>. 
+  <i>buffer</i> should have space for at least 128 bytes.</P>
+  
+  <P>You may override this function to create your own text formatting.
+*/
+int fltk3::Valuator::format(char* buffer) {
+  double v = value();
+  // MRS: THIS IS A HACK - RECOMMEND ADDING BUFFER SIZE ARGUMENT
+  if (!A || !B) return snprintf(buffer, 128, "%g", v);
+
+  // Figure out how many digits are required to correctly format the
+  // value.
+  int i, c = 0;
+  char temp[32];
+  // output a number with many digits after the decimal point. This
+  // seems to be needed to get high precission
+  snprintf(temp, sizeof(temp), "%.12f", A/B);
+  // strip all trailing 0's
+  for (i=strlen(temp)-1; i>0; i--) {
+    if (temp[i]!='0') break;
+  }
+  // count digits until we find the decimal point (or comma or whatever
+  // letter is set in the current locale)
+  for (; i>0; i--, c++) {
+    if (!isdigit(temp[i])) break;
+  }
+
+  // MRS: THIS IS A HACK - RECOMMEND ADDING BUFFER SIZE ARGUMENT
+  return snprintf(buffer, 128, "%.*f", c, v);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Valuator.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Value_Input.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Value_Input.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Value_Input.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,151 @@
+//
+// "$Id$"
+//
+// Value input widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// FLTK widget for drag-adjusting a floating point value.
+// Warning: this works by making a child fltk3::Input object, even
+// though this object is *not* an fltk3::Group.  May be a kludge?
+
+#include <fltk3/run.h>
+#include <fltk3/ValueInput.h>
+#include <fltk3/Group.h>
+#include <stdlib.h>
+#include <fltk3/math.h>
+
+
+void fltk3::ValueInput::input_cb(fltk3::Widget*, void* v) {
+  fltk3::ValueInput& t = *(fltk3::ValueInput*)v;
+  double nv;
+  if ((t.step() - floor(t.step()))>0.0 || t.step() == 0.0) nv = strtod(t.input.value(), 0);
+  else nv = strtol(t.input.value(), 0, 0);
+  if (nv != t.value() || t.when() & fltk3::WHEN_NOT_CHANGED) {
+    t.set_value(nv);
+    t.set_changed();
+    if (t.when()) t.do_callback();
+  }
+}
+
+void fltk3::ValueInput::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  if (damage()&~fltk3::DAMAGE_CHILD) input.clear_damage(fltk3::DAMAGE_ALL);
+  input.box(box());
+  input.color(color(), selection_color());
+  fltk3::Widget *i = &input; i->draw(); // calls protected input.draw()
+  input.clear_damage();
+}
+
+void fltk3::ValueInput::resize(int X, int Y, int W, int H) {
+  Valuator::resize(X, Y, W, H);
+  input.resize(X, Y, W, H);
+}
+
+void fltk3::ValueInput::value_damage() {
+  char buf[128];
+  format(buf);
+  input.value(buf);
+  input.mark(input.position()); // turn off selection highlight
+}
+
+int fltk3::ValueInput::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  double v;
+  int delta;
+  int mx = fltk3::event_x_root();
+  static int ix, drag;
+  input.when(when());
+  switch (event) {
+  case fltk3::PUSH:
+    if (!step()) goto DEFAULT;
+    ix = mx;
+    drag = fltk3::event_button();
+    handle_push();
+    return 1;
+  case fltk3::DRAG:
+    if (!step()) goto DEFAULT;
+    delta = mx-ix;
+    if (delta > 5) delta -= 5;
+    else if (delta < -5) delta += 5;
+    else delta = 0;
+    switch (drag) {
+    case 3: v = increment(previous_value(), delta*100); break;
+    case 2: v = increment(previous_value(), delta*10); break;
+    default:v = increment(previous_value(), delta); break;
+    }
+    v = round(v);
+    handle_drag(soft()?softclamp(v):clamp(v));;
+    return 1;
+  case fltk3::RELEASE:
+    if (!step()) goto DEFAULT;
+    if (value() != previous_value() || !fltk3::event_is_click())
+      handle_release();
+    else {
+      fltk3::WidgetTracker wp(&input);
+      input.handle(fltk3::PUSH);
+      if (wp.exists())
+	input.handle(fltk3::RELEASE);
+    }
+    return 1;
+  case fltk3::FOCUS:
+    return input.take_focus();
+  case fltk3::SHORTCUT:
+    return input.handle(event);
+  default:
+  DEFAULT:
+    input.type(((step() - floor(step()))>0.0 || step() == 0.0) ? fltk3::FLOAT_INPUT : fltk3::INT_INPUT);
+    return input.handle(event);
+  }
+}
+
+/**
+  Creates a new fltk3::ValueInput widget using the given
+  position, size, and label string. The default boxtype is
+  fltk3::DOWN_BOX.
+*/
+fltk3::ValueInput::ValueInput(int X, int Y, int W, int H, const char* l)
+: fltk3::Valuator(X, Y, W, H, l), input(X, Y, W, H, 0) {
+  soft_ = 0;
+  if (input.parent())  // defeat automatic-add
+    input.parent()->remove(input);
+  input.parent((fltk3::Group *)this); // kludge!
+  input.callback(input_cb, this);
+  input.when(fltk3::WHEN_CHANGED);
+  box(input.box());
+  color(input.color());
+  selection_color(input.selection_color());
+  align(fltk3::ALIGN_LEFT);
+  value_damage();
+  set_flag(SHORTCUT_LABEL);
+}
+
+fltk3::ValueInput::~ValueInput() {
+
+  if (input.parent() == (fltk3::Group *)this)
+    input.parent(0);   // *revert* ctor kludge!
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Value_Input.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Value_Output.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Value_Output.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Value_Output.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,110 @@
+//
+// "$Id$"
+//
+// Value output widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Fltk widget for drag-adjusting a floating point value.
+// This is much lighter than fltk3::ValueInput because it has no text editor
+// If step() is zero then it can be used to display a floating-point value
+
+#include <fltk3/run.h>
+#include <fltk3/ValueOutput.h>
+#include <fltk3/draw.h>
+
+void fltk3::ValueOutput::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  fltk3::Boxtype b = box() ? box() : fltk3::DOWN_BOX;
+  int X = x()+fltk3::box_dx(b);
+  int Y = y()+fltk3::box_dy(b);
+  int W = w()-fltk3::box_dw(b);
+  int H = h()-fltk3::box_dh(b);
+  if (damage()&~fltk3::DAMAGE_CHILD)
+    draw_box(b, color());
+  else {
+    fltk3::color(color());
+    fltk3::rectf(X, Y, W, H);
+  }
+  char buf[128];
+  format(buf);
+  fltk3::color(active_r() ? textcolor() : fltk3::inactive(textcolor()));
+  fltk3::font(textfont(), textsize());
+  fltk3::draw(buf,X,Y,W,H,fltk3::ALIGN_LEFT);
+}
+
+int fltk3::ValueOutput::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (!step()) return 0;
+  double v;
+  int delta;
+  int mx = fltk3::event_x();
+  static int ix, drag;
+  switch (event) {
+  case fltk3::PUSH:
+    ix = mx;
+    drag = fltk3::event_button();
+    handle_push();
+    return 1;
+  case fltk3::DRAG:
+    delta = fltk3::event_x()-ix;
+    if (delta > 5) delta -= 5;
+    else if (delta < -5) delta += 5;
+    else delta = 0;
+    switch (drag) {
+    case 3: v = increment(previous_value(),delta*100); break;
+    case 2: v = increment(previous_value(),delta*10); break;
+    default:v = increment(previous_value(),delta); break;
+    }
+    v = round(v);
+    handle_drag(soft()?softclamp(v):clamp(v));;
+    return 1;
+  case fltk3::RELEASE:
+    handle_release();
+    return 1;
+  case fltk3::ENTER :
+  case fltk3::LEAVE :
+    return 1;
+  default:
+    return 0;
+  }
+}
+
+/**
+  Creates a new fltk3::ValueOutput widget using the given
+  position, size, and label string. The default boxtype is fltk3::NO_BOX.
+  <P> Inherited destructor destroys the Valuator.
+*/
+fltk3::ValueOutput::ValueOutput(int X, int Y, int W, int H,const char *l)
+: fltk3::Valuator(X,Y,W,H,l) {
+  box(fltk3::NO_BOX);
+  align(fltk3::ALIGN_LEFT);
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
+  soft_ = 0;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Value_Output.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Value_Slider.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Value_Slider.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Value_Slider.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,88 @@
+//
+// "$Id$"
+//
+// Value slider widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/ValueSlider.h>
+#include <fltk3/draw.h>
+#include <math.h>
+
+/**
+  Creates a new fltk3::ValueSlider widget using the given
+  position, size, and label string. The default boxtype is fltk3::DOWN_BOX.
+*/
+fltk3::ValueSlider::ValueSlider(int X, int Y, int W, int H, const char*l)
+: fltk3::Slider(X,Y,W,H,l) {
+  step(1,100);
+  textfont(fltk3::HELVETICA);
+  textsize(10);
+  textcolor(fltk3::FOREGROUND_COLOR);
+}
+
+void fltk3::ValueSlider::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int sxx = x(), syy = y(), sww = w(), shh = h();
+  int bxx = x(), byy = y(), bww = w(), bhh = h();
+  if (horizontal()) {
+    bww = 35; sxx += 35; sww -= 35;
+  } else {
+    syy += 25; bhh = 25; shh -= 25;
+  }
+  if (damage()&fltk3::DAMAGE_ALL) draw_box(box(),sxx,syy,sww,shh,color());
+  Slider::draw(sxx+fltk3::box_dx(box()),
+		  syy+fltk3::box_dy(box()),
+		  sww-fltk3::box_dw(box()),
+		  shh-fltk3::box_dh(box()));
+  draw_box(box(),bxx,byy,bww,bhh,color());
+  char buf[128];
+  format(buf);
+  fltk3::font(textfont(), textsize());
+  fltk3::color(active_r() ? textcolor() : fltk3::inactive(textcolor()));
+  fltk3::draw(buf, bxx, byy, bww, bhh, fltk3::ALIGN_CLIP);
+}
+
+int fltk3::ValueSlider::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (event == fltk3::PUSH && fltk3::visible_focus()) {
+    fltk3::focus(this);
+    redraw();
+  }
+  int sxx = x(), syy = y(), sww = w(), shh = h();
+  if (horizontal()) {
+    sxx += 35; sww -= 35;
+  } else {
+    syy += 25; shh -= 25;
+  }
+  return Slider::handle(event,
+			   sxx+fltk3::box_dx(box()),
+			   syy+fltk3::box_dy(box()),
+			   sww-fltk3::box_dw(box()),
+			   shh-fltk3::box_dh(box()));
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Value_Slider.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Widget.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Widget.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Widget.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,459 @@
+//
+// "$Id$"
+//
+// Base widget class for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/Wrapper.h>
+#include <fltk3/Group.h>
+#include <fltk3/Tooltip.h>
+#include <fltk3/draw.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+
+////////////////////////////////////////////////////////////////
+// for compatibility with Forms, all widgets without callbacks are
+// inserted into a "queue" when they are activated, and the forms
+// compatibility interaction functions (fl_do_events, etc.) will
+// read one widget at a time from this queue and return it:
+
+const int QUEUE_SIZE = 20;
+
+static fltk3::Widget *obj_queue[QUEUE_SIZE];
+static int obj_head, obj_tail;
+
+void fltk3::Widget::default_callback(fltk3::Widget *o, void * /*v*/) {
+#if 0
+  // This is necessary for strict forms compatibility but is confusing.
+  // Use the parent's callback if this widget does not have one.
+  for (fltk3::Widget *p = o->parent(); p; p = p->parent())
+    if (p->callback() != default_callback) {
+      p->do_callback(o,v);
+      return;
+    }
+#endif
+  obj_queue[obj_head++] = o;
+  if (obj_head >= QUEUE_SIZE) obj_head = 0;
+  if (obj_head == obj_tail) {
+    obj_tail++;
+    if (obj_tail >= QUEUE_SIZE) obj_tail = 0;
+  }
+}
+/**
+    All Fl_Widgets that don't have a callback defined use a
+    default callback that puts a pointer to the widget in this queue,
+    and this method reads the oldest widget out of this queue.
+*/
+fltk3::Widget *fltk3::readqueue() {
+  if (obj_tail==obj_head) return 0;
+  fltk3::Widget *o = obj_queue[obj_tail++];
+  if (obj_tail >= QUEUE_SIZE) obj_tail = 0;
+  return o;
+}
+/*
+    This static internal function removes all pending callbacks for a
+    specific widget from the default callback queue (fltk3::readqueue()).
+    It is only called from fltk3::Widget's destructor if the widget
+    doesn't have an own callback.
+    Note: There's no need to have this in the fltk3:: namespace.
+*/
+static void cleanup_readqueue(fltk3::Widget *w) {
+
+  if (obj_tail==obj_head) return;
+  
+  // Read the entire queue and copy over all valid entries.
+  // The new head will be determined after the last copied entry.
+
+  int old_head = obj_head;	// save newest entry
+  int entry = obj_tail;		// oldest entry
+  obj_head = obj_tail;		// new queue start
+  for (;;) {
+    fltk3::Widget *o = obj_queue[entry++];
+    if (entry >= QUEUE_SIZE) entry = 0;
+    if (o != w) { // valid entry
+      obj_queue[obj_head++] = o;
+      if (obj_head >= QUEUE_SIZE) obj_head = 0;
+    } // valid entry
+    if (entry == old_head) break;
+  }
+  return;
+}
+////////////////////////////////////////////////////////////////
+
+int fltk3::Widget::handle(int event) {
+  return 0;
+}
+
+/** Default font size for widgets */
+fltk3::Fontsize fltk3::NORMAL_SIZE = 14;
+
+fltk3::Widget::Widget(int X, int Y, int W, int H, const char* L) {
+
+  x_ = X; y_ = Y; w_ = W; h_ = H;
+
+  label_.value	 = L;
+  label_.image   = 0;
+  label_.deimage = 0;
+  label_.type	 = fltk3::NORMAL_LABEL;
+  label_.font	 = fltk3::HELVETICA;
+  label_.size	 = fltk3::NORMAL_SIZE;
+  label_.color	 = fltk3::FOREGROUND_COLOR;
+  label_.align_	 = fltk3::ALIGN_CENTER;
+  tooltip_       = 0;
+  callback_	 = default_callback;
+  user_data_ 	 = 0;
+  type_		 = 0;
+  flags_	 = VISIBLE_FOCUS;
+  damage_	 = 0;
+  box_		 = fltk3::NO_BOX;
+  color_	 = fltk3::GRAY;
+  color2_	 = fltk3::GRAY;
+  when_		 = fltk3::WHEN_RELEASE;
+
+  parent_ = 0;
+  if (fltk3::Group::current()) fltk3::Group::current()->add(this);
+}
+
+void fltk3::Widget::resize(int X, int Y, int W, int H) {
+  x_ = X; y_ = Y; w_ = W; h_ = H;
+}
+
+// this is useful for parent widgets to call to resize children:
+int fltk3::Widget::damage_resize(int X, int Y, int W, int H) {
+  if (x() == X && y() == Y && w() == W && h() == H) return 0;
+  resize(X, Y, W, H);
+  redraw();
+  return 1;
+}
+
+int fltk3::Widget::take_focus() {
+  if (!takesevents()) return 0;
+  if (!visible_focus()) return 0;
+  if (!handle(fltk3::FOCUS)) return 0; // see if it wants it
+  if (contains(fltk3::focus())) return 1; // it called fltk3::focus for us
+  fltk3::focus(this);
+  return 1;
+}
+
+extern void fl_throw_focus(fltk3::Widget*); // in Fl_x.cxx
+
+/**
+   Destroys the widget, taking care of throwing focus before if any.
+   Destruction removes the widget from any parent group! And groups when
+   destroyed destroy all their children. This is convenient and fast.
+*/
+fltk3::Widget::~Widget() {
+  fltk3::clear_widget_pointer(this);
+  if (flags() & COPIED_LABEL) free((void *)(label_.value));
+  if (flags() & COPIED_TOOLTIP) free((void *)(tooltip_));
+  // remove from parent group
+  if (parent_) parent_->remove(this);
+#ifdef DEBUG_DELETE
+  if (parent_) { // this should never happen
+    printf("*** fltk3::Widget: parent_->remove(this) failed [%p,%p]\n",parent_,this);
+  }
+#endif // DEBUG_DELETE
+  parent_ = 0; // Don't throw focus to a parent widget.
+  fl_throw_focus(this);
+  // remove stale entries from default callback queue (fltk3::readqueue())
+  if (callback_ == default_callback) cleanup_readqueue(this);
+}
+
+/** Draws a focus box for the widget at the given position and size */
+void
+fltk3::Widget::draw_focus(fltk3::Boxtype B, int X, int Y, int W, int H) const {
+  if (!fltk3::visible_focus()) return;
+  switch (B) {
+    case fltk3::DOWN_BOX:
+    case fltk3::DOWN_FRAME:
+    case fltk3::THIN_DOWN_BOX:
+    case fltk3::THIN_DOWN_FRAME:
+      X ++;
+      Y ++;
+    default:
+      break;
+  }
+
+  fltk3::color(fltk3::contrast(fltk3::BLACK, color()));
+
+#if defined(USE_X11) || defined(__APPLE_QUARTZ__)
+  fltk3::line_style(fltk3::DOT);
+  fltk3::rect(X + fltk3::box_dx(B), Y + fltk3::box_dy(B),
+          W - fltk3::box_dw(B) - 1, H - fltk3::box_dh(B) - 1);
+  fltk3::line_style(fltk3::SOLID);
+#elif defined(WIN32) 
+  // Windows 95/98/ME do not implement the dotted line style, so draw
+  // every other pixel around the focus area...
+  //
+  // Also, QuickDraw (MacOS) does not support line styles specifically,
+  // and the hack we use in fltk3::line_style() will not draw horizontal lines
+  // on odd-numbered rows...
+  int i, xx, yy;
+
+  X += fltk3::box_dx(B);
+  Y += fltk3::box_dy(B);
+  W -= fltk3::box_dw(B) + 2;
+  H -= fltk3::box_dh(B) + 2;
+
+  for (xx = 0, i = 1; xx < W; xx ++, i ++) if (i & 1) fltk3::point(X + xx, Y);
+  for (yy = 0; yy < H; yy ++, i ++) if (i & 1) fltk3::point(X + W, Y + yy);
+  for (xx = W; xx > 0; xx --, i ++) if (i & 1) fltk3::point(X + xx, Y + H);
+  for (yy = H; yy > 0; yy --, i ++) if (i & 1) fltk3::point(X, Y + yy);
+#else
+# error unsupported platform
+#endif // WIN32
+}
+
+
+void fltk3::Widget::activate() {
+  if (!active()) {
+    clear_flag(INACTIVE);
+    if (active_r()) {
+      redraw();
+      redraw_label();
+      handle(fltk3::ACTIVATE);
+      if (inside(fltk3::focus())) fltk3::focus()->take_focus();
+    }
+  }
+}
+
+void fltk3::Widget::deactivate() {
+  if (active_r()) {
+    set_flag(INACTIVE);
+    redraw();
+    redraw_label();
+    handle(fltk3::DEACTIVATE);
+    fl_throw_focus(this);
+  } else {
+    set_flag(INACTIVE);
+  }
+}
+
+int fltk3::Widget::active_r() const {
+  for (const fltk3::Widget* o = this; o; o = o->parent())
+    if (!o->active()) return 0;
+  return 1;
+}
+
+void fltk3::Widget::show() {
+  if (!visible()) {
+    clear_flag(INVISIBLE);
+    if (visible_r()) {
+      redraw();
+      redraw_label();
+      handle(fltk3::SHOW);
+      if (inside(fltk3::focus())) fltk3::focus()->take_focus();
+    }
+  }
+}
+
+void fltk3::Widget::hide() {
+  if (visible_r()) {
+    set_flag(INVISIBLE);
+    for (fltk3::Widget *p = parent(); p; p = p->parent())
+      if (p->box() || !p->parent()) {p->redraw(); break;}
+    handle(fltk3::HIDE);
+    fl_throw_focus(this);
+  } else {
+    set_flag(INVISIBLE);
+  }
+}
+
+int fltk3::Widget::visible_r() const {
+  for (const fltk3::Widget* o = this; o; o = o->parent())
+    if (!o->visible()) return 0;
+  return 1;
+}
+
+// return true if widget is inside (or equal to) this:
+// Returns false for null widgets.
+int fltk3::Widget::contains(const fltk3::Widget *o) const {
+  for (; o; o = o->parent_) if (o == this) return 1;
+  return 0;
+}
+
+
+void
+fltk3::Widget::label(const char *a) {
+  if (flags() & COPIED_LABEL) {
+    // reassigning a copied label remains the same copied label
+    if (label_.value == a)
+      return;
+    free((void *)(label_.value));
+    clear_flag(COPIED_LABEL);
+  }
+  label_.value=a;
+  redraw_label();
+}
+
+
+void
+fltk3::Widget::copy_label(const char *a) {
+  if (flags() & COPIED_LABEL) free((void *)(label_.value));
+  if (a) {
+    set_flag(COPIED_LABEL);
+    label_.value=strdup(a);
+  } else {
+    clear_flag(COPIED_LABEL);
+    label_.value=(char *)0;
+  }
+  redraw_label();
+}
+
+/** Calls the widget callback.
+
+  Causes a widget to invoke its callback function with arbitrary arguments.
+
+  \param[in] o call the callback with \p o as the widget argument
+  \param[in] arg use \p arg as the user data argument
+  \see callback()
+*/
+void
+fltk3::Widget::do_callback(fltk3::Widget* o,void* arg) {
+  fltk3::WidgetTracker wp(this);
+  if (o && o->pWrapper && o->callback_!=default_callback) {
+    callback_((fltk3::Widget*)o->pWrapper, arg);
+  } else {
+    callback_(o,arg);
+  }
+  if (wp.deleted()) return;
+  if (callback_ != default_callback)
+    clear_changed();
+}
+
+/** Draw a box.
+ */
+void fltk3::Widget::draw() {
+  draw_box();
+  draw_label();
+}
+
+
+// ========================= Wrapper Support ===================================
+
+fltk3::Object::~Object() {
+  if ( pWrapper && !(pWrapper->pVCalls&Wrapper::pVCallDtor) ) {
+    pWrapper->pVCalls |= Wrapper::pVCallDtor;
+    delete pWrapper;
+  }
+}
+
+fltk3::Wrapper::~Wrapper() {
+  if ( !(pVCalls&pVCallDtor) ) {
+    pVCalls |= pVCallDtor;
+    delete _p;
+  }
+}
+
+
+// ========================= Rectangle Support ===================================
+
+/*! \class fltk3::Rectangle
+  Describes an integer-sized rectangle. This is the base class of
+  Widget, and also used a lot to pass rectangular areas to drawing
+  functions. Almost all the functions are inline.
+
+  Negative w() or h() is supposed to mean an empty and thus
+  invisible rectangle, but some code will treat the rectangle as
+  reflected about x or y. Set the size to zero to make sure you
+  have an empty one.
+*/
+
+/*! \fn Rectangle::Rectangle()
+  The default constructor does not put anything into the fields!
+  You can either call set() or just modify the x_, y_, w_, and h_
+  variables directly.
+*/
+
+/** Initialize to the size w,h. The rectangle is placed inside the
+    source rectangle \a r either centered or against an edge depending
+    on the ALIGN values in \a flags. For centered alignment if the
+    difference in sizes is odd, it always rounds up and left.
+    Default value for \a flags is to center in both directions.
+ */
+void fltk3::Rectangle::set(const fltk3::Rectangle& r, int w, int h, int flags) {
+  if (flags & ALIGN_LEFT) {
+    if (flags & ALIGN_RIGHT &&  w > r.w()) x_ = r.r()-w;
+    else x_ = r.x();
+  } else if (flags & ALIGN_RIGHT) {
+    x_ = r.r()-w;
+  } else {
+    x_ = r.x()+((r.w()-w)>>1);
+    // fabien: shouldn't it  consider the case r is smaller to avoid negative values ?
+    // WAS: no, it is supposed to center at all times. The right-shift
+    // instead of divide-by-2 is to avoid shifting as it goes negative.
+    // fabien : well while debugging i observed the shift doesn't avoid
+    //    to get negative value at least on Win32
+    // WAS: no, it is *supposed* to return a negative value! I want the
+    // rectangle "centered" even if it is *bigger*.
+    // if (x_<0) x_=0;
+  }
+  if (flags & ALIGN_TOP) {
+    if (flags & ALIGN_BOTTOM && h > r.h()) y_ = r.b()-h;
+    else y_ = r.y();
+  } else if (flags & ALIGN_BOTTOM) {
+    y_ = r.b()-h;
+  } else {
+    y_ = r.y()+((r.h()-h)>>1);
+    // see above
+    // if (y_<0) y_=0;
+  }
+  w_ = w;
+  h_ = h;
+}
+
+/**
+  Replace the value with the union of this rectangle and \a R
+  (ie the rectangle that surrounds both of these rectangles).
+  If one rectangle is empty(), the other is returned unchanged
+  (ie it does not union in the degenerate point of that rectangle).
+*/
+void fltk3::Rectangle::merge(const fltk3::Rectangle& R) {
+  if (R.empty()) return;
+  if (empty()) {*this = R; return;}
+  if (R.x() < x()) set_x(R.x());
+  if (R.r() > r()) set_r(R.r());
+  if (R.y() < y()) set_y(R.y());
+  if (R.b() > b()) set_b(R.b());
+}
+
+/**
+  Replace the value with the intersection of this rectangle and \a R.
+  If the rectangles do not intersect, the result may have negative
+  width and/or height, this means empty() will return true, but some
+  code may still draw this rectangle.
+*/
+void fltk3::Rectangle::intersect(const fltk3::Rectangle& R) {
+  if (R.x() > x()) set_x(R.x());
+  if (R.r() < r()) set_r(R.r());
+  if (R.y() > y()) set_y(R.y());
+  if (R.b() < b()) set_b(R.b());
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Widget.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Window.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Window.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Window.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,326 @@
+//
+// "$Id$"
+//
+// Window widget class for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// The fltk3::Window is a window in the fltk library.
+// This is the system-independent portions.  The huge amount of 
+// crap you need to do to communicate with X is in Fl_x.cxx, the
+// equivalent (but totally different) crap for MSWindows is in Fl_win32.cxx
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/Window.h>
+#include <fltk3/Wrapper.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+#ifdef __APPLE_QUARTZ__
+#include <fltk3/draw.h>
+#endif
+
+char *fltk3::Window::default_xclass_ = 0L;
+
+void fltk3::Window::_Fl_Window() {
+  type(fltk3::WINDOW);
+  box(fltk3::FLAT_BOX);
+  if (fltk3::scheme_bg_) {
+    labeltype(fltk3::NORMAL_LABEL);
+    align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
+    image(fltk3::scheme_bg_);
+  } else {
+    labeltype(fltk3::NO_LABEL);
+  }
+  i = 0;
+  xclass_ = 0;
+  icon_ = 0;
+  iconlabel_ = 0;
+  resizable(0);
+  size_range_set = 0;
+  minw = maxw = minh = maxh = 0;
+  callback((fltk3::Callback*)default_callback);
+}
+
+fltk3::Window::Window(int X,int Y,int W, int H, const char *l)
+: fltk3::Group(X, Y, W, H, l) {
+  cursor_default = fltk3::CURSOR_DEFAULT;
+  cursor_fg      = fltk3::BLACK;
+  cursor_bg      = fltk3::WHITE;
+
+  _Fl_Window();
+  set_flag(FORCE_POSITION);
+}
+
+fltk3::Window::Window(int W, int H, const char *l)
+// fix common user error of a missing end() with current(0):
+  : fltk3::Group((fltk3::Group::current(0),0), 0, W, H, l) {
+  cursor_default = fltk3::CURSOR_DEFAULT;
+  cursor_fg      = fltk3::BLACK;
+  cursor_bg      = fltk3::WHITE;
+
+  _Fl_Window();
+  clear_visible();
+}
+
+fltk3::Window *fltk3::Widget::window() const {
+  for (fltk3::Widget *o = parent(); o; o = o->parent())
+    if (o->type() >= fltk3::WINDOW) return (fltk3::Window*)o;
+  return 0;
+}
+/** Gets the x position of the window on the screen */
+int fltk3::Window::x_root() const {
+  fltk3::Window *p = window();
+  if (p) return p->x_root() + x();
+  return x();
+}
+/** Gets the y position of the window on the screen */
+int fltk3::Window::y_root() const {
+  fltk3::Window *p = window();
+  if (p) return p->y_root() + y();
+  return y();
+}
+
+void fltk3::Window::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+
+  // The following is similar to fltk3::Group::draw(), but ...
+  //  - we draw the box with x=0 and y=0 instead of x() and y()
+  //  - we don't draw a label
+
+  if (damage() & ~fltk3::DAMAGE_CHILD) {	 // draw the entire thing
+    draw_box(box(),0,0,w(),h(),color()); // draw box with x/y = 0
+  }
+  draw_children();
+
+#ifdef __APPLE_QUARTZ__
+  // on OS X, windows have no frame. To resize a window, we drag the lower right
+  // corner. This code draws a little ribbed triangle for dragging.
+  // Starting with 10.7, OS X windows have a hidden frame and the corner is no longer needed
+  static signed char showCorner = -1;
+  if (showCorner==-1) {
+    SInt32 majorVersion, minorVersion;
+    Gestalt(gestaltSystemVersionMajor, &majorVersion);
+    Gestalt(gestaltSystemVersionMinor, &minorVersion);
+    showCorner = 1;
+    if (majorVersion>10 || (majorVersion==10 && minorVersion>=7)) {
+      showCorner = 0;
+    }
+  }
+  if (showCorner==1) {
+    extern CGContextRef fl_gc;
+    if (fl_gc && !parent() && resizable() && (!size_range_set || minh!=maxh || minw!=maxw)) {
+      int dx = fltk3::box_dw(box())-fltk3::box_dx(box());
+      int dy = fltk3::box_dh(box())-fltk3::box_dy(box());
+      if (dx<=0) dx = 1;
+      if (dy<=0) dy = 1;
+      int x1 = w()-dx-1, x2 = x1, y1 = h()-dx-1, y2 = y1;
+      fltk3::Color c[4] = {
+        color(),
+        fltk3::color_average(color(), fltk3::WHITE, 0.7f),
+        fltk3::color_average(color(), fltk3::BLACK, 0.6f),
+        fltk3::color_average(color(), fltk3::BLACK, 0.8f),
+      };
+      int i;
+      for (i=dx; i<12; i++) {
+        fltk3::color(c[i&3]);
+        fltk3::line(x1--, y1, x2, y2--);
+      }
+    }
+  }
+#endif
+
+# if defined(FLTK_USE_CAIRO)
+  fltk3::cairo_make_current(this); // checkout if an update is necessary
+# endif
+}
+
+void fltk3::Window::label(const char *name) {
+  label(name, iconlabel());
+}
+
+void fltk3::Window::copy_label(const char *a) {
+  if (flags() & COPIED_LABEL) {
+    free((void *)label());
+    clear_flag(COPIED_LABEL);
+  }
+  if (a) a = strdup(a);
+  label(a, iconlabel());
+  set_flag(COPIED_LABEL);
+}
+
+
+void fltk3::Window::iconlabel(const char *iname) {
+  label(label(), iname);
+}
+
+// the fltk3::atclose pointer is provided for back compatibility.  You
+// can now just change the callback for the window instead.
+
+/** Default callback for window widgets. It hides the window and then calls the default widget callback. */
+void fltk3::default_atclose(fltk3::Window* window, void* v) {
+  window->hide();
+  fltk3::Widget::default_callback(window, v); // put on fltk3::read_queue()
+}
+/** Back compatibility: default window callback handler \see fltk3::set_atclose() */
+namespace fltk3 {
+	void (*atclose)(fltk3::Window*, void*) = default_atclose;
+}
+/** Back compatibility: Sets the default callback v for win to call on close event */
+void fltk3::Window::default_callback(fltk3::Window* win, void* v) {
+  fltk3::atclose(win, v);
+}
+
+/**  Returns the last window that was made current. \see fltk3::Window::make_current() */
+fltk3::Window *fltk3::Window::current() {
+  return current_;
+}
+
+/** Returns the default xclass.
+
+  \see fltk3::Window::default_xclass(const char *)
+
+ */
+const char *fltk3::Window::default_xclass()
+{
+  if (default_xclass_) {
+    return default_xclass_;
+  } else {
+    return "FLTK";
+  }
+}
+
+/** Sets the default window xclass.
+
+  The default xclass is used for all windows that don't have their
+  own xclass set before show() is called. You can change the default
+  xclass whenever you want, but this only affects windows that are
+  created (and shown) after this call.
+
+  The given string \p xc is copied. You can use a local variable or
+  free the string immediately after this call.
+
+  If you don't call this, the default xclass for all windows will be "FLTK".
+  You can reset the default xclass by specifying NULL for \p xc.
+
+  If you call fltk3::Window::xclass(const char *) for any window, then
+  this also sets the default xclass, unless it has been set before.
+
+  \param[in] xc default xclass for all windows subsequently created
+
+  \see fltk3::Window::xclass(const char *)
+*/
+void fltk3::Window::default_xclass(const char *xc)
+{
+  if (default_xclass_) {
+    free(default_xclass_);
+    default_xclass_ = 0L;
+  }
+  if (xc) {
+    default_xclass_ = strdup(xc);
+  }
+}
+
+/** Sets the xclass for this window.
+
+  A string used to tell the system what type of window this is. Mostly
+  this identifies the picture to draw in the icon. This only works if
+  called \e before calling show().
+
+  <I>Under X</I>, this is turned into a XA_WM_CLASS pair by truncating at
+  the first non-alphanumeric character and capitalizing the first character,
+  and the second one if the first is 'x'.  Thus "foo" turns into "foo, Foo",
+  and "xprog.1" turns into "xprog, XProg".
+
+  <I>Under Microsoft Windows</I>, this string is used as the name of the
+  WNDCLASS structure, though it is not clear if this can have any
+  visible effect.
+
+  \since FLTK 1.3 the passed string is copied. You can use a local
+  variable or free the string immediately after this call. Note that
+  FLTK 1.1 stores the \e pointer without copying the string.
+
+  If the default xclass has not yet been set, this also sets the
+  default xclass for all windows created subsequently.
+
+  \see fltk3::Window::default_xclass(const char *)
+*/
+void fltk3::Window::xclass(const char *xc) 
+{
+  if (xclass_) {
+    free(xclass_);
+    xclass_ = 0L;
+  }
+  if (xc) {
+    xclass_ = strdup(xc);
+    if (!default_xclass_) {
+      default_xclass(xc);
+    }
+  }
+}
+
+/** Returns the xclass for this window, or a default.
+
+  \see fltk3::Window::default_xclass(const char *)
+  \see fltk3::Window::xclass(const char *)
+*/
+const char *fltk3::Window::xclass() const
+{
+  if (xclass_) {
+    return xclass_;
+  } else {
+    return default_xclass();
+  }
+}
+
+/** Gets the current icon window target dependent data. */
+const void *fltk3::Window::icon() const {
+  return icon_;
+}
+
+/** Sets the current icon window target dependent data. */
+void fltk3::Window::icon(const void * ic) {
+  icon_ = ic;
+}
+
+
+// =================== FLTK 1 compatibility ====================================
+
+class Fl_Widget;
+class Fl_Window;
+class Fl_Group;
+
+namespace fltk3 {
+  void *_wrapper(Widget *w) { return w->wrapper(); }
+  void *_wrapper(Window *w) { return w->wrapper(); }
+  void *_wrapper(Group *w)  { return w->wrapper(); }
+  void *_object(Fl_Widget *w) { return ((Wrapper*)w)->_p; }
+  void *_object(Fl_Window *w) { return ((Wrapper*)w)->_p; }
+  void *_object(Fl_Group *w) { return ((Wrapper*)w)->_p; }
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Window.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Window_fullscreen.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Window_fullscreen.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Window_fullscreen.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,98 @@
+//
+// "$Id$"
+//
+// Fullscreen window support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Turning the border on/off by changing the motif_wm_hints property
+// works on Irix 4DWM.  Does not appear to work for any other window
+// manager.  Fullscreen still works on some window managers (fvwm is one)
+// because they allow the border to be placed off-screen.
+
+// Unfortunately most X window managers ignore changes to the border
+// and refuse to position the border off-screen, so attempting to make
+// the window full screen will lose the size of the border off the
+// bottom and right.
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+#include <config.h>
+
+void fltk3::Window::border(int b) {
+  if (b) {
+    if (border()) return;
+    clear_flag(NOBORDER);
+  } else {
+    if (!border()) return;
+    set_flag(NOBORDER);
+  }
+#if defined(USE_X11)
+  if (shown()) Fl_X::i(this)->sendxjunk();
+#elif defined(WIN32)
+  // not yet implemented, but it's possible
+  // for full fullscreen we have to make the window topmost as well
+#elif defined(__APPLE_QUARTZ__)
+  // warning: not implemented in Quartz/Carbon
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::Window::fullscreen() {
+#ifndef WIN32
+  //this would clobber the fake wm, since it relies on the border flags to
+  //determine its thickness
+  border(0);
+#endif
+#if defined(__APPLE__) || defined(WIN32) || defined(USE_X11)
+  int sx, sy, sw, sh;
+  fltk3::screen_xywh(sx, sy, sw, sh, x(), y(), w(), h());
+  // if we are on the main screen, we will leave the system menu bar unobstructed
+  if (fltk3::x()>=sx && fltk3::y()>=sy && fltk3::x()+fltk3::w()<=sx+sw && fltk3::y()+fltk3::h()<=sy+sh) {
+    sx = fltk3::x(); sy = fltk3::y(); 
+    sw = fltk3::w(); sh = fltk3::h();
+  }
+  if (x()==sx) x(sx+1); // make sure that we actually execute the resize
+#if defined(USE_X11)
+  resize(0, 0, w(), h()); // work around some quirks in X11
+#endif
+  resize(sx, sy, sw, sh);
+#else
+  if (!x()) x(1); // make sure that we actually execute the resize
+  resize(0,0,fltk3::w(),fltk3::h());
+#endif
+}
+
+void fltk3::Window::fullscreen_off(int X,int Y,int W,int H) {
+  // this order produces less blinking on IRIX:
+  resize(X,Y,W,H);
+#ifndef WIN32
+  border(1);
+#endif
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Window_fullscreen.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Window_hotspot.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Window_hotspot.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Window_hotspot.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,100 @@
+//
+// "$Id$"
+//
+// Common hotspot routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/x.h>
+#include <stdio.h>
+
+void fltk3::Window::hotspot(int X, int Y, int offscreen) {
+  int mx,my;
+
+  // Update the screen position based on the mouse position.
+  fltk3::get_mouse(mx,my);
+  X = mx-X; Y = my-Y;
+
+  // If offscreen is 0 (the default), make sure that the window
+  // stays on the screen, if possible.
+  if (!offscreen) {
+    int scr_x, scr_y, scr_w, scr_h;
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+
+    int top = 0;
+    int left = 0;
+    int right = 0;
+    int bottom = 0;
+
+    if (border()) {
+#ifdef WIN32
+      if (size_range_set && (maxw != minw || maxh != minh)) {
+        left = right = GetSystemMetrics(SM_CXSIZEFRAME);
+        top = bottom = GetSystemMetrics(SM_CYSIZEFRAME);
+      } else {
+        left = right = GetSystemMetrics(SM_CXFIXEDFRAME); 
+        top = bottom = GetSystemMetrics(SM_CYFIXEDFRAME);
+      }
+      top += GetSystemMetrics(SM_CYCAPTION);
+#elif defined(__APPLE__)
+      top = 24;
+      left = 2;
+      right = 2;
+      bottom = 2;
+#else
+      // Ensure border is on screen; these values are generic enough
+      // to work with many window managers, and are based on KDE defaults.
+      top = 20;
+      left = 4;
+      right = 4;
+      bottom = 8;
+#endif
+    }
+    // now insure contents are on-screen (more important than border):
+    if (X+w()+right > scr_w-scr_x) X = scr_w-scr_x-right-w();
+    if (X-left < scr_x) X = left;
+    if (Y+h()+bottom > scr_h-scr_y) Y = scr_h-scr_y-bottom-h();
+    if (Y-top < scr_y) Y = top;
+    // make sure that we will force this position
+    if (X==x()) x(X-1);
+  }
+
+  position(X,Y);
+}
+
+void fltk3::Window::hotspot(const fltk3::Widget *o, int offscreen) {
+  int X = o->w()/2;
+  int Y = o->h()/2;
+  while (o != this && o) {
+    X += o->x(); Y += o->y();
+    o = o->window();
+  }
+  hotspot(X,Y,offscreen);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Window_hotspot.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Window_iconize.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Window_iconize.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Window_iconize.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,49 @@
+//
+// "$Id$"
+//
+// Window minification code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/x.h>
+
+extern char fl_show_iconic; // in Fl_x.cxx
+
+void fltk3::Window::iconize() {
+  if (!shown()) {
+    fl_show_iconic = 1;
+    show();
+  } else {
+#ifdef WIN32
+    ShowWindow(i->xid, SW_SHOWMINNOACTIVE);
+#elif defined(__APPLE__)
+    i->collapse();
+#else
+    XIconifyWindow(fl_display, i->xid, fl_screen);
+#endif
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Window_iconize.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_Wizard.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_Wizard.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_Wizard.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,197 @@
+//
+// "$Id$"
+//
+// fltk3::WizardGroup widget routines.
+//
+// Copyright 1997-2010 by Easy Software Products.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+
+//
+//   fltk3::WizardGroup::fltk3::WizardGroup() - Create an fltk3::WizardGroup widget.
+//   fltk3::WizardGroup::draw()      - Draw the wizard border and visible child.
+//   fltk3::WizardGroup::next()      - Show the next child.
+//   fltk3::WizardGroup::prev()      - Show the previous child.
+//   fltk3::WizardGroup::value()     - Return the current visible child.
+//   fltk3::WizardGroup::value()     - Set the visible child.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/WizardGroup.h>
+#include <fltk3/Window.h>
+#include <fltk3/draw.h>
+
+
+//
+// 'fltk3::WizardGroup::fltk3::WizardGroup()' - Create an fltk3::WizardGroup widget.
+//
+
+/**
+  The constructor creates the fltk3::WizardGroup widget at the specified
+  position and size.
+  <P>The inherited destructor destroys the widget and its children.
+*/
+fltk3::WizardGroup::WizardGroup(int        xx,	// I - Lefthand position
+                     int        yy,	// I - Upper position
+		     int        ww,	// I - Width
+		     int        hh,	// I - Height
+		     const char *l) :	// I - Label
+    fltk3::Group(xx, yy, ww, hh, l)
+{
+  box(fltk3::THIN_UP_BOX);
+
+  value_ = (fltk3::Widget *)0;
+}
+
+
+//
+/** Draws the wizard border and visible child. */
+void fltk3::WizardGroup::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+
+  fltk3::Widget	*kid;	// Visible child
+
+
+  kid = value();
+
+  if (damage() & fltk3::DAMAGE_ALL)
+  {
+    // Redraw everything...
+    if (kid)
+    {
+      draw_box(box(), x(), y(), w(), h(), kid->color());
+      draw_child(*kid);
+    }
+    else
+      draw_box(box(), x(), y(), w(), h(), color());
+
+  }
+  else if (kid)
+    update_child(*kid);
+}
+
+
+/**
+  This method shows the next child of the wizard. If the last child
+  is already visible, this function does nothing.
+*/
+void fltk3::WizardGroup::next() {
+  int			num_kids;
+  fltk3::Widget	* const *kids;
+
+
+  if ((num_kids = children()) == 0)
+    return;
+
+  for (kids = array(); num_kids > 0; kids ++, num_kids --)
+    if ((*kids)->visible())
+      break;
+
+  if (num_kids > 1)
+    value(kids[1]);
+}
+
+/** Shows the previous child.*/
+void fltk3::WizardGroup::prev()
+{
+  int			num_kids;
+  fltk3::Widget	* const *kids;
+
+
+  if ((num_kids = children()) == 0)
+    return;
+
+  for (kids = array(); num_kids > 0; kids ++, num_kids --)
+    if ((*kids)->visible())
+      break;
+
+  if (num_kids > 0 && num_kids < children())
+    value(kids[-1]);
+}
+
+/**  Gets the current visible child widget. */
+fltk3::Widget* fltk3::WizardGroup::value()
+{
+  int			num_kids;
+  fltk3::Widget	* const *kids;
+  fltk3::Widget		*kid;
+
+
+  if ((num_kids = children()) == 0)
+    return ((fltk3::Widget *)0);
+
+  for (kids = array(), kid = (fltk3::Widget *)0; num_kids > 0; kids ++, num_kids --)
+  {
+    if ((*kids)->visible())
+    {
+      if (kid)
+        (*kids)->hide();
+      else
+        kid = *kids;
+    }
+  }
+
+  if (!kid)
+  {
+    kids --;
+    kid = *kids;
+    kid->show();
+  }
+
+  return (kid);
+}
+
+/**  Sets the child widget that is visible.*/
+void fltk3::WizardGroup::value(fltk3::Widget *kid)
+{
+  int			num_kids;
+  fltk3::Widget	* const *kids;
+
+
+  if ((num_kids = children()) == 0)
+    return;
+
+  for (kids = array(); num_kids > 0; kids ++, num_kids --)
+  {
+    if (*kids == kid)
+    {
+      if (!kid->visible())
+        kid->show();
+    }
+    else
+      (*kids)->hide();
+  }
+
+  // This will restore the mouse pointer to the window's default cursor
+  // whenever the wizard pane is changed.  Otherwise text widgets that
+  // show the next pane may leave the cursor set to the I beam, etc...
+  if (window()) window()->cursor(fltk3::CURSOR_DEFAULT);
+}
+
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_Wizard.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_XBM_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_XBM_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_XBM_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,112 @@
+//
+// "$Id$"
+//
+// fltk3::XBMImage routines.
+//
+// Copyright 1997-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::XBMImage::fltk3::XBMImage() - Load an XBM file.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/run.h>
+#include <fltk3/XBMImage.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+
+//
+// 'fltk3::XBMImage::fltk3::XBMImage()' - Load an XBM file.
+//
+
+/**  
+  The constructor loads the named XBM file from the given name filename.
+  <P>The destructor free all memory and server resources that are used by 
+  the image.
+*/
+fltk3::XBMImage::XBMImage(const char *name) : fltk3::Bitmap((const char *)0,0,0) {
+  FILE	*f;
+  uchar	*ptr;
+
+  if ((f = fltk3::fopen(name, "rb")) == NULL) return;
+
+  char buffer[1024];
+  char junk[1024];
+  int wh[2]; // width and height
+  int i;
+  for (i = 0; i<2; i++) {
+    for (;;) {
+      if (!fgets(buffer,1024,f)) {
+        fclose(f);
+	return;
+      }
+      int r = sscanf(buffer,"#define %s %d",junk,&wh[i]);
+      if (r >= 2) break;
+    }
+  }
+
+  // skip to data array:
+  for (;;) {
+    if (!fgets(buffer,1024,f)) {
+      fclose(f);
+      return;
+    }
+    if (!strncmp(buffer,"static ",7)) break;
+  }
+
+  // Allocate memory...
+  w(wh[0]);
+  h(wh[1]);
+
+  int n = ((wh[0]+7)/8)*wh[1];
+  array = new uchar[n];
+
+  // read the data:
+  for (i = 0, ptr = (uchar *)array; i < n;) {
+    if (!fgets(buffer,1024,f)) {
+      fclose(f);
+      return;
+    }
+    const char *a = buffer;
+    while (*a && i<n) {
+      unsigned int t;
+      if (sscanf(a," 0x%x",&t)>0) {
+        *ptr++ = (uchar)t;
+	i ++;
+      }
+      while (*a && *a++ != ',');
+    }
+  }
+
+  fclose(f);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_XBM_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_XColor.H
===================================================================
--- branches/branch-3.0/src/core/Fl_XColor.H	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_XColor.H	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,46 @@
+//
+// "$Id$"
+//
+// X-specific color definitions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#include <fltk3/enumerations.h>
+
+// one of these for each color in fltk's "colormap":
+// if overlays are enabled, another one for the overlay
+struct Fl_XColor {
+  unsigned char r,g,b;	// actual color used by X
+  unsigned char mapped;	// true when XAllocColor done
+  unsigned long pixel;	// the X pixel to use
+};
+extern Fl_XColor fl_xmap[/*overlay*/][256];
+
+// mask & shifts to produce xcolor for truecolor visuals:
+extern unsigned char fl_redmask, fl_greenmask, fl_bluemask;
+extern int fl_redshift, fl_greenshift, fl_blueshift, fl_extrashift;
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_XColor.H
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_XPM_Image.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_XPM_Image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_XPM_Image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,136 @@
+//
+// "$Id$"
+//
+// fltk3::XPMImage routines.
+//
+// Copyright 1997-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/run.h>
+#include <fltk3/XPMImage.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+
+
+//
+// 'hexdigit()' - Convert a hex digit to an integer.
+//
+
+static int hexdigit(int x) {	// I - Hex digit...
+  if (isdigit(x)) return x-'0';
+  if (isupper(x)) return x-'A'+10;
+  if (islower(x)) return x-'a'+10;
+  return 20;
+}
+
+#define MAXSIZE 2048
+#define INITIALLINES 256
+/**
+  The constructor loads the XPM image from the name filename.
+  <P>The destructor free all memory and server resources that are used by
+  the image.
+*/
+fltk3::XPMImage::XPMImage(const char *name) : fltk3::Pixmap((char *const*)0) {
+  FILE *f;
+
+  if ((f = fltk3::fopen(name, "rb")) == NULL) return;
+
+  // read all the c-strings out of the file:
+  char** new_data = new char *[INITIALLINES];
+  char** temp_data;
+  int malloc_size = INITIALLINES;
+  char buffer[MAXSIZE+20];
+  int i = 0;
+  while (fgets(buffer,MAXSIZE+20,f)) {
+    if (buffer[0] != '\"') continue;
+    char *myp = buffer;
+    char *q = buffer+1;
+    while (*q != '\"' && myp < buffer+MAXSIZE) {
+      if (*q == '\\') switch (*++q) {
+      case '\r':
+      case '\n':
+	if (!fgets(q,(buffer+MAXSIZE+20)-q,f)) { /* no problem if we hit EOF */ } break;
+      case 0:
+	break;
+      case 'x': {
+	q++;
+	int n = 0;
+	for (int x = 0; x < 3; x++) {
+	  int xd = hexdigit(*q);
+	  if (xd > 15) break;
+	  n = (n<<4)+xd;
+	  q++;
+	}
+	*myp++ = n;
+      } break;
+      default: {
+	int c = *q++;
+	if (c>='0' && c<='7') {
+	  c -= '0';
+	  for (int x=0; x<2; x++) {
+	    int xd = hexdigit(*q);
+	    if (xd>7) break;
+	    c = (c<<3)+xd;
+	    q++;
+	  }
+	}
+	*myp++ = c;
+      } break;
+      } else {
+	*myp++ = *q++;
+      }
+    }
+    *myp++ = 0;
+    if (i >= malloc_size) {
+      temp_data = new char *[malloc_size + INITIALLINES];
+      memcpy(temp_data, new_data, sizeof(char *) * malloc_size);
+      delete[] new_data;
+      new_data = temp_data;
+      malloc_size += INITIALLINES;
+    }
+    new_data[i] = new char[myp-buffer+1];
+    memcpy(new_data[i], buffer,myp-buffer);
+    new_data[i][myp-buffer] = 0;
+    i++;
+  }
+
+  fclose(f);
+
+  data((const char **)new_data, i);
+  alloc_data = 1;
+
+  measure();
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_XPM_Image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_abort.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_abort.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_abort.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,102 @@
+//
+// "$Id$"
+//
+// Warning/error message code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This method is in its own source file so that stdlib and stdio
+// do not need to be included in Fl.cxx:
+// You can also override this by redefining all of these.
+
+#include <fltk3/run.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include "flstring.h"
+
+#ifdef WIN32
+#  include <windows.h>
+
+static void warning(const char *, ...) {
+  // Show nothing for warnings under WIN32...
+}
+
+static void error(const char *format, ...) {
+  va_list args;
+  char buf[1024];
+  va_start(args, format);
+  vsnprintf(buf, 1024, format, args);
+  va_end(args);
+  MessageBox(0,buf,"Error",MB_ICONEXCLAMATION|MB_SYSTEMMODAL);
+}
+
+static void fatal(const char *format, ...) {
+  va_list args;
+  char buf[1024];
+  va_start(args, format);
+  vsnprintf(buf, 1024, format, args);
+  va_end(args);
+  MessageBox(0,buf,"Error",MB_ICONSTOP|MB_SYSTEMMODAL);
+  ::exit(1);
+}
+
+#else
+
+static void warning(const char *format, ...) {
+  va_list args;
+  va_start(args, format);
+  vfprintf(stderr, format, args);
+  va_end(args);
+  fputc('\n', stderr);
+  fflush(stderr);
+}
+
+static void error(const char *format, ...) {
+  va_list args;
+  va_start(args, format);
+  vfprintf(stderr, format, args);
+  va_end(args);
+  fputc('\n', stderr);
+  fflush(stderr);
+}
+
+static void fatal(const char *format, ...) {
+  va_list args;
+  va_start(args, format);
+  vfprintf(stderr, format, args);
+  va_end(args);
+  fputc('\n', stderr);
+  fflush(stderr);
+  ::exit(1);
+}
+
+#endif
+
+void (*fltk3::warning)(const char* format, ...) = ::warning;
+void (*fltk3::error)(const char* format, ...) = ::error;
+void (*fltk3::fatal)(const char* format, ...) = ::fatal;
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_abort.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_add_idle.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_add_idle.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_add_idle.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,123 @@
+//
+// "$Id$"
+//
+// Idle routine support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Allows you to manage an arbitrary set of idle() callbacks.
+// Replaces the older set_idle() call (which is used to implement this)
+
+#include <fltk3/run.h>
+
+struct idle_cb {
+  void (*cb)(void*);
+  void* data;
+  idle_cb *next;
+};
+
+// the callbacks are stored linked in a ring.  last points at the one
+// just called, first at the next to call.  last->next == first.
+
+static idle_cb* first;
+static idle_cb* last;
+static idle_cb* freelist;
+
+static void call_idle() {
+  idle_cb* p = first;
+  last = p; first = p->next;
+  p->cb(p->data); // this may call add_idle() or remove_idle()!
+}
+
+/**
+  Adds a callback function that is called every time by fltk3::wait() and also
+  makes it act as though the timeout is zero (this makes fltk3::wait() return
+  immediately, so if it is in a loop it is called repeatedly, and thus the
+  idle fucntion is called repeatedly).  The idle function can be used to get
+  background processing done.
+    
+  You can have multiple idle callbacks. To remove an idle callback use
+  fltk3::remove_idle().
+    
+  fltk3::wait() and fltk3::check() call idle callbacks, but fltk3::ready() does not.
+    
+  The idle callback can call any FLTK functions, including fltk3::wait(),
+  fltk3::check(), and fltk3::ready().
+
+  FLTK will not recursively call the idle callback.
+*/
+void fltk3::add_idle(fltk3::IdleHandler cb, void* data) {
+  idle_cb* p = freelist;
+  if (p) freelist = p->next;
+  else p = new idle_cb;
+  p->cb = cb;
+  p->data = data;
+  if (first) {
+    last->next = p;
+    last = p;
+    p->next = first;
+  } else {
+    first = last = p;
+    p->next = p;
+    set_idle(call_idle);
+  }
+}
+
+/**
+  Returns true if the specified idle callback is currently installed.
+*/
+int fltk3::has_idle(fltk3::IdleHandler cb, void* data) {
+  idle_cb* p = first;
+  if (!p) return 0;
+  for (;; p = p->next) {
+    if (p->cb == cb && p->data == data) return 1;
+    if (p==last) return 0;
+  }
+}
+
+/**
+  Removes the specified idle callback, if it is installed.
+*/
+void fltk3::remove_idle(fltk3::IdleHandler cb, void* data) {
+  idle_cb* p = first;
+  if (!p) return;
+  idle_cb* l = last;
+  for (;; p = p->next) {
+    if (p->cb == cb && p->data == data) break;
+    if (p==last) return; // not found
+    l = p;
+  }
+  if (l == p) { // only one
+    first = last = 0;
+    set_idle(0);
+  } else {
+    last = l;
+    first = l->next = p->next;
+  }
+  p->next = freelist;
+  freelist = p;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_add_idle.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_arg.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_arg.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_arg.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,550 @@
+//
+// "$Id$"
+//
+// Optional argument initialization code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// OPTIONAL initialization code for a program using fltk.
+// You do not need to call this!  Feel free to make up your own switches.
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/Window.h>
+#include <fltk3/Tooltip.h>
+#include <fltk3/filename.h>
+#include <fltk3/draw.h>
+#include <ctype.h>
+#include "flstring.h"
+
+#if defined(WIN32) || defined(__APPLE__)
+int XParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*);
+#  define NoValue	0x0000
+#  define XValue  	0x0001
+#  define YValue	0x0002
+#  define WidthValue  	0x0004
+#  define HeightValue  	0x0008
+#  define AllValues 	0x000F
+#  define XNegative 	0x0010
+#  define YNegative 	0x0020
+#endif
+
+static int fl_match(const char *a, const char *s, int atleast = 1) {
+  const char *b = s;
+  while (*a && (*a == *b || tolower(*a) == *b)) {a++; b++;}
+  return !*a && b >= s+atleast;
+}
+
+// flags set by previously parsed arguments:
+extern char fl_show_iconic; // in Fl_x.cxx
+static char arg_called;
+static char return_i;
+static const char *name;
+static const char *geometry;
+static const char *title;
+// these are in Fl_get_system_colors and are set by the switches:
+extern const char *fl_fg;
+extern const char *fl_bg;
+extern const char *fl_bg2;
+
+/**
+  Parse a single switch from \p argv, starting at word \p i.
+  Returns the number of words eaten (1 or 2, or 0 if it is not
+  recognized) and adds the same value to \p i. 
+  
+  This is the default argument handler used internally by fltk3::args(...),
+  but you can use this function if you prefer to step through the
+  standard FLTK switches yourself.
+  
+  All standard FLTK switches except -bg2 may be abbreviated to just
+  one letter and case is ignored:
+  
+  \li -bg color or -background color
+  <br>
+  Sets the background color using fltk3::background().
+  
+  \li -bg2 color or -background2 color
+  <br>
+  Sets the secondary background color using fltk3::background2().
+  
+  \li -display host:n.n
+  <br>
+  Sets the X display to use; this option is silently
+  ignored under WIN32 and MacOS.
+  
+  \li -dnd and -nodnd
+  <br>
+  Enables or disables drag and drop text operations
+  using fltk3::dnd_text_ops().
+  
+  \li -fg color or -foreground color
+  <br>
+  Sets the foreground color using fltk3::foreground().
+  
+  \li -geometry WxH+X+Y
+  <br>
+  Sets the initial window position and size according
+  to the standard X geometry string.
+  
+  \li -iconic
+  <br>
+  Iconifies the window using fltk3::Window::iconize().
+  
+  \li -kbd and -nokbd
+  <br>
+  Enables or disables visible keyboard focus for
+  non-text widgets using fltk3::visible_focus().
+  
+  \li -name string
+  <br>
+  Sets the window class using fltk3::Window::xclass().
+  
+  \li -scheme string
+  <br>
+  Sets the widget scheme using fltk3::scheme().
+  
+  \li -title string
+  <br>
+  Sets the window title using fltk3::Window::label().
+  
+  \li -tooltips and -notooltips
+  <br>
+  Enables or disables tooltips using fltk3::Tooltip::enable().
+  
+  
+  If your program requires other switches in addition to the standard
+  FLTK options, you will need to pass your own argument handler to
+  fltk3::args(int,char**,int&,fltk3::ArgsHandler) explicitly.
+*/
+int fltk3::arg(int argc, char **argv, int &i) {
+  arg_called = 1;
+  const char *s = argv[i];
+
+  if (!s) {i++; return 1;}	// something removed by calling program?
+
+  // a word that does not start with '-', or a word after a '--', or
+  // the word '-' by itself all start the "non-switch arguments" to
+  // a program.  Return 0 to indicate that we don't understand the
+  // word, but set a flag (return_i) so that args() will return at
+  // that point:
+  if (s[0] != '-' || s[1] == '-' || !s[1]) {return_i = 1; return 0;}
+  s++; // point after the dash
+
+  if (fl_match(s, "iconic")) {
+    fl_show_iconic = 1;
+    i++;
+    return 1;
+  } else if (fl_match(s, "kbd")) {
+    fltk3::visible_focus(1);
+    i++;
+    return 1;
+  } else if (fl_match(s, "nokbd", 3)) {
+    fltk3::visible_focus(0);
+    i++;
+    return 1;
+  } else if (fl_match(s, "dnd", 2)) {
+    fltk3::dnd_text_ops(1);
+    i++;
+    return 1;
+  } else if (fl_match(s, "nodnd", 3)) {
+    fltk3::dnd_text_ops(0);
+    i++;
+    return 1;
+  } else if (fl_match(s, "tooltips", 2)) {
+    fltk3::Tooltip::enable();
+    i++;
+    return 1;
+  } else if (fl_match(s, "notooltips", 3)) {
+    fltk3::Tooltip::disable();
+    i++;
+    return 1;
+  }
+#ifdef __APPLE__
+  // The Finder application in MacOS X passes the "-psn_N_NNNNN" option
+  // to all apps...
+  else if (strncmp(s, "psn_", 4) == 0) {
+    i++;
+    return 1;
+  }
+#endif // __APPLE__
+
+  const char *v = argv[i+1];
+  if (i >= argc-1 || !v)
+    return 0;	// all the rest need an argument, so if missing it is an error
+
+  if (fl_match(s, "geometry")) {
+
+    int flags, gx, gy; unsigned int gw, gh;
+    flags = XParseGeometry(v, &gx, &gy, &gw, &gh);
+    if (!flags) return 0;
+    geometry = v;
+
+#if !defined(WIN32) && !defined(__APPLE__)
+  } else if (fl_match(s, "display", 2)) {
+    fltk3::display(v);
+#endif
+
+  } else if (fl_match(s, "title", 2)) {
+    title = v;
+
+  } else if (fl_match(s, "name", 2)) {
+    name = v;
+
+  } else if (fl_match(s, "bg2", 3) || fl_match(s, "background2", 11)) {
+    fl_bg2 = v;
+
+  } else if (fl_match(s, "bg", 2) || fl_match(s, "background", 10)) {
+    fl_bg = v;
+
+  } else if (fl_match(s, "fg", 2) || fl_match(s, "foreground", 10)) {
+    fl_fg = v;
+
+  } else if (fl_match(s, "scheme", 1)) {
+    fltk3::scheme(v);
+
+  } else return 0; // unrecognized
+
+  i += 2;
+  return 2;
+}
+
+
+/**
+  Parse command line switches using the \p cb argument handler.
+  
+  Returns 0 on error, or the number of words processed.
+  
+  FLTK provides this as an <i>entirely optional</i> command line
+  switch parser. You don't have to call it if you don't want to.
+  Everything it can do can be done with other calls to FLTK.
+  
+  To use the switch parser, call fltk3::args(...) near the start
+  of your program.  This does \b not open the display, instead
+  switches that need the display open are stashed into static
+  variables. Then you \b must display your first window by calling
+  <tt>window->show(argc,argv)</tt>, which will do anything stored
+  in the static variables.
+  
+  Providing an argument handler callback \p cb lets you define
+  your own switches. It is called with the same \p argc and \p argv,
+  and with \p i set to the index of the switch to be processed.
+  The \p cb handler should return zero if the switch is unrecognized,
+  and not change \p i. It should return non-zero to indicate the
+  number of words processed if the switch is recognized, i.e. 1 for
+  just the switch, and more than 1 for the switch plus associated
+  parameters. \p i should be incremented by the same amount.
+  
+  The \p cb handler is called \b before any other tests, so
+  <i>you can also override any standard FLTK switch</i>
+  (this is why FLTK can use very short switches instead of
+  the long ones all other toolkits force you to use).
+  See fltk3::arg() for descriptions of the standard switches.
+ 
+  On return \p i is set to the index of the first non-switch.
+  This is either:
+  
+  \li The first word that does not start with '-'.
+  \li The word '-' (used by many programs to name stdin as a file)
+  \li The first unrecognized switch (return value is 0).
+  \li \p argc
+  
+  The return value is \p i unless an unrecognized switch is found,
+  in which case it is zero. If your program takes no arguments other
+  than switches you should produce an error if the return value is less
+  than \p argc.
+  
+  
+  A usage string is displayed if fltk3::args() detects an invalid argument
+  on the command-line. You can change the message by setting the
+  fltk3::help pointer.
+  
+  A very simple command line parser can be found in <tt>examples/howto-parse-args.cxx</tt>
+  
+  The simpler fltk3::args(int argc, char **argv) form is useful if your program
+  does not have command line switches of its own.
+*/
+
+int fltk3::args(int argc, char** argv, int& i, fltk3::ArgsHandler cb) {
+  arg_called = 1;
+  i = 1; // skip argv[0]
+  while (i < argc) {
+    if (cb && cb(argc,argv,i)) continue;
+    if (!arg(argc,argv,i)) return return_i ? i : 0;
+  }
+  return i;
+}
+
+// show a main window, use any parsed arguments
+void fltk3::Window::show(int argc, char **argv) {
+  if (argc && !arg_called) fltk3::args(argc,argv);
+
+  fltk3::get_system_colors();
+
+#if !defined(WIN32) && !defined(__APPLE__)
+  // Get defaults for drag-n-drop and focus...
+  const char *key = 0, *val;
+
+  if (fltk3::first_window()) key = fltk3::first_window()->xclass();
+  if (!key) key = "fltk";
+
+  val = XGetDefault(fl_display, key, "dndTextOps");
+  if (val) fltk3::dnd_text_ops(strcasecmp(val, "true") == 0 ||
+                            strcasecmp(val, "on") == 0 ||
+                            strcasecmp(val, "yes") == 0);
+
+  val = XGetDefault(fl_display, key, "tooltips");
+  if (val) fltk3::Tooltip::enable(strcasecmp(val, "true") == 0 ||
+                              strcasecmp(val, "on") == 0 ||
+                              strcasecmp(val, "yes") == 0);
+
+  val = XGetDefault(fl_display, key, "visibleFocus");
+  if (val) fltk3::visible_focus(strcasecmp(val, "true") == 0 ||
+                             strcasecmp(val, "on") == 0 ||
+                             strcasecmp(val, "yes") == 0);
+#endif // !WIN32 && !__APPLE__
+
+  // set colors first, so background_pixel is correct:
+  static char beenhere;
+  if (!beenhere) {
+    if (geometry) {
+      int fl = 0, gx = x(), gy = y(); unsigned int gw = w(), gh = h();
+      fl = XParseGeometry(geometry, &gx, &gy, &gw, &gh);
+      if (fl & XNegative) gx = fltk3::w()-w()+gx;
+      if (fl & YNegative) gy = fltk3::h()-h()+gy;
+      //  int mw,mh; minsize(mw,mh);
+      //  if (mw > gw) gw = mw;
+      //  if (mh > gh) gh = mh;
+      fltk3::Widget *r = resizable();
+      if (!r) resizable(this);
+      // for WIN32 we assume window is not mapped yet:
+      if (fl & (XValue | YValue))
+	x(-1), resize(gx,gy,gw,gh);
+      else
+	size(gw,gh);
+      resizable(r);
+    }
+  }
+
+  // set the class, which is used by X version of get_system_colors:
+  if (name) {xclass(name); name = 0;}
+  else if (!xclass()) xclass(fltk3::filename_name(argv[0]));
+
+  if (title) {label(title); title = 0;}
+  else if (!label()) label(xclass());
+
+  if (!beenhere) {
+    beenhere = 1;
+    fltk3::scheme(fltk3::scheme()); // opens display!  May call fltk3::fatal()
+  }
+
+  // Show the window AFTER we have set the colors and scheme.
+  show();
+
+#if !defined(WIN32) && !defined(__APPLE__)
+  // set the command string, used by state-saving window managers:
+  int j;
+  int n=0; for (j=0; j<argc; j++) n += strlen(argv[j])+1;
+  char *buffer = new char[n];
+  char *p = buffer;
+  for (j=0; j<argc; j++) for (const char *q = argv[j]; (*p++ = *q++););
+  XChangeProperty(fl_display, fl_xid(this), XA_WM_COMMAND, XA_STRING, 8, 0,
+		  (unsigned char *)buffer, p-buffer-1);
+  delete[] buffer;
+#endif // !WIN32 && !__APPLE__
+}
+
+// Calls useful for simple demo programs, with automatic help message:
+
+static const char * const helpmsg =
+"options are:\n"
+" -bg2 color\n"
+" -bg color\n"
+" -di[splay] host:n.n\n"
+" -dn[d]\n"
+" -fg color\n"
+" -g[eometry] WxH+X+Y\n"
+" -i[conic]\n"
+" -k[bd]\n"
+" -na[me] classname\n"
+" -nod[nd]\n"
+" -nok[bd]\n"
+" -not[ooltips]\n"
+" -s[cheme] scheme\n"
+" -ti[tle] windowtitle\n"
+" -to[oltips]";
+
+const char * const fltk3::help = helpmsg+13;
+
+/**
+ Parse all command line switches matching standard FLTK options only.
+ 
+ It parses all the switches, and if any are not recognized it calls
+ fltk3::abort(fltk3::help), i.e. unlike the long form, an unrecognized
+ switch generates an error message and causes the program to exit.
+ 
+ */
+void fltk3::args(int argc, char **argv) {
+  int i; if (fltk3::args(argc,argv,i) < argc) fltk3::error(helpmsg);
+}
+
+#if defined(WIN32) || defined(__APPLE__)
+
+/* the following function was stolen from the X sources as indicated. */
+
+/* Copyright 	Massachusetts Institute of Technology  1985, 1986, 1987 */
+/* $XConsortium: XParseGeom.c,v 11.18 91/02/21 17:23:05 rws Exp $ */
+
+/*
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of M.I.T. not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission.  M.I.T. makes no representations about the
+suitability of this software for any purpose.  It is provided "as is"
+without express or implied warranty.
+*/
+
+/*
+ *    XParseGeometry parses strings of the form
+ *   "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
+ *   width, height, xoffset, and yoffset are unsigned integers.
+ *   Example:  "=80x24+300-49"
+ *   The equal sign is optional.
+ *   It returns a bitmask that indicates which of the four values
+ *   were actually found in the string.  For each value found,
+ *   the corresponding argument is updated;  for each value
+ *   not found, the corresponding argument is left unchanged. 
+ */
+
+static int ReadInteger(char* string, char** NextString)
+{
+  register int Result = 0;
+  int Sign = 1;
+    
+  if (*string == '+')
+    string++;
+  else if (*string == '-') {
+    string++;
+    Sign = -1;
+  }
+  for (; (*string >= '0') && (*string <= '9'); string++) {
+    Result = (Result * 10) + (*string - '0');
+  }
+  *NextString = string;
+  if (Sign >= 0)
+    return (Result);
+  else
+    return (-Result);
+}
+
+int XParseGeometry(const char* string, int* x, int* y,
+		   unsigned int* width, unsigned int* height)
+{
+  int mask = NoValue;
+  register char *strind;
+  unsigned int tempWidth = 0, tempHeight = 0;
+  int tempX = 0, tempY = 0;
+  char *nextCharacter;
+
+  if ( (string == NULL) || (*string == '\0')) return(mask);
+  if (*string == '=')
+    string++;  /* ignore possible '=' at beg of geometry spec */
+
+  strind = (char *)string;
+  if (*strind != '+' && *strind != '-' && *strind != 'x') {
+    tempWidth = ReadInteger(strind, &nextCharacter);
+    if (strind == nextCharacter) 
+      return (0);
+    strind = nextCharacter;
+    mask |= WidthValue;
+  }
+
+  if (*strind == 'x' || *strind == 'X') {	
+    strind++;
+    tempHeight = ReadInteger(strind, &nextCharacter);
+    if (strind == nextCharacter)
+      return (0);
+    strind = nextCharacter;
+    mask |= HeightValue;
+  }
+
+  if ((*strind == '+') || (*strind == '-')) {
+    if (*strind == '-') {
+      strind++;
+      tempX = -ReadInteger(strind, &nextCharacter);
+      if (strind == nextCharacter)
+	return (0);
+      strind = nextCharacter;
+      mask |= XNegative;
+
+    } else {
+      strind++;
+      tempX = ReadInteger(strind, &nextCharacter);
+      if (strind == nextCharacter)
+	return(0);
+      strind = nextCharacter;
+      }
+    mask |= XValue;
+    if ((*strind == '+') || (*strind == '-')) {
+      if (*strind == '-') {
+	strind++;
+	tempY = -ReadInteger(strind, &nextCharacter);
+	if (strind == nextCharacter)
+	  return(0);
+	strind = nextCharacter;
+	mask |= YNegative;
+
+      } else {
+	strind++;
+	tempY = ReadInteger(strind, &nextCharacter);
+	if (strind == nextCharacter)
+	  return(0);
+	strind = nextCharacter;
+      }
+      mask |= YValue;
+    }
+  }
+	
+  /* If strind isn't at the end of the string the it's an invalid
+     geometry specification. */
+
+  if (*strind != '\0') return (0);
+
+  if (mask & XValue)
+    *x = tempX;
+  if (mask & YValue)
+    *y = tempY;
+  if (mask & WidthValue)
+    *width = tempWidth;
+  if (mask & HeightValue)
+    *height = tempHeight;
+  return (mask);
+}
+
+#endif // ifdef WIN32
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_arg.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_cocoa.mm
===================================================================
--- branches/branch-3.0/src/core/Fl_cocoa.mm	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_cocoa.mm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,3480 @@
+//
+// "$Id$"
+//
+// MacOS-Cocoa specific code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//// From the inner edge of a MetroWerks CodeWarrior CD:
+// (without permission)
+//
+// "Three Compiles for 68Ks under the sky,
+// Seven Compiles for PPCs in their fragments of code,
+// Nine Compiles for Mortal Carbon doomed to die,
+// One Compile for Mach-O Cocoa on its Mach-O throne,
+// in the Land of MacOS X where the Drop-Shadows lie.
+// 
+// One Compile to link them all, One Compile to merge them,
+// One Compile to copy them all and in the bundle bind them,
+// in the Land of MacOS X where the Drop-Shadows lie."
+
+#ifdef __APPLE__
+
+#define CONSOLIDATE_MOTION 0
+extern "C" {
+#include <pthread.h>
+}
+
+
+#include <fltk3/run.h>
+#include <fltk3/filename.h>
+#include <fltk3/x.h>
+#include <fltk3/Window.h>
+#include <fltk3/Tooltip.h>
+#include <fltk3/SysMenuBar.h>
+#include <fltk3/Printer.h>
+#include <fltk3/Input_.h>
+#include <fltk3/TextDisplay.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+#include <unistd.h>
+#include <stdarg.h>
+
+#import <Cocoa/Cocoa.h>
+
+#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
+#if defined(__LP64__) && __LP64__
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef long NSInteger;
+typedef unsigned int NSUInteger;
+#endif
+#endif
+
+
+// #define DEBUG_SELECT		// UNCOMMENT FOR SELECT()/THREAD DEBUGGING
+#ifdef DEBUG_SELECT
+#include <stdio.h>		// testing
+#define DEBUGMSG(msg)		if ( msg ) fprintf(stderr, msg);
+#define DEBUGPERRORMSG(msg)	if ( msg ) perror(msg)
+#define DEBUGTEXT(txt)		txt
+#else
+#define DEBUGMSG(msg)
+#define DEBUGPERRORMSG(msg)
+#define DEBUGTEXT(txt)		NULL
+#endif /*DEBUG_SELECT*/
+
+// external functions
+extern void fl_fix_focus();
+extern fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h);
+
+// forward definition of functions in this file
+// converting cr lf converter function
+static void convert_crlf(char * string, size_t len);
+static void createAppleMenu(void);
+static fltk3::Region MacRegionMinusRect(fltk3::Region r, int x,int y,int w,int h);
+static void cocoaMouseHandler(NSEvent *theEvent);
+
+static fltk3::QuartzGraphicsDriver fl_quartz_driver;
+static fltk3::DisplayDevice fl_quartz_display(&fl_quartz_driver);
+FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver = (fltk3::GraphicsDriver*)&fl_quartz_driver; // the current target device of graphics operations
+fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface = (fltk3::SurfaceDevice*)&fl_quartz_display; // the current target surface of graphics operations
+fltk3::DisplayDevice *fltk3::DisplayDevice::_display = &fl_quartz_display; // the platform display
+
+// public variables
+int fl_screen;
+CGContextRef fl_gc = 0;
+void *fl_system_menu;                   // this is really a NSMenu*
+fltk3::SysMenuBar *fltk3::sys_menu_bar = 0;
+void *fl_default_cursor;		// this is really a NSCursor*
+void *fl_capture = 0;			// (NSWindow*) we need this to compensate for a missing(?) mouse capture
+bool fl_show_iconic;                    // true if called from iconize() - shows the next created window in collapsed state
+//int fl_disable_transient_for;           // secret method of removing TRANSIENT_FOR
+Window fl_window;
+fltk3::Window *fltk3::Window::current_;
+int fl_mac_os_version = 0;		// the version number of the running Mac OS X (e.g., 100604 for 10.6.4)
+
+// forward declarations of variables in this file
+static int got_events = 0;
+static fltk3::Window* resize_from_system;
+
+#if CONSOLIDATE_MOTION
+static fltk3::Window* send_motion;
+extern fltk3::Window* fl_xmousewin;
+#endif
+
+enum { FLTKTimerEvent = 1, FLTKDataReadyEvent };
+
+
+/* fltk-utf8 placekeepers */
+void fltk3::reset_spot()
+{
+}
+
+void fltk3::set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
+{
+}
+
+void fltk3::set_status(int x, int y, int w, int h)
+{
+}
+
+/*
+ * Mac keyboard lookup table
+ * See also the inverse converter vktab in Fl_get_key_mac.cxx
+ */
+static unsigned short macKeyLookUp[128] =
+{
+  'a', 's', 'd', 'f', 'h', 'g', 'z', 'x',
+  'c', 'v', '^', 'b', 'q', 'w', 'e', 'r',
+  
+  'y', 't', '1', '2', '3', '4', '6', '5',
+  '=', '9', '7', '-', '8', '0', ']', 'o',
+  
+  'u', '[', 'i', 'p', fltk3::EnterKey, 'l', 'j', '\'',
+  'k', ';', '\\', ',', '/', 'n', 'm', '.',
+  
+  fltk3::TabKey, ' ', '`', fltk3::BackSpaceKey, 
+  fltk3::KPEnterKey, fltk3::EscapeKey, fltk3::MetaRKey, fltk3::MetaLKey,
+  fltk3::ShiftLKey, fltk3::CapsLockKey, fltk3::AltLKey, fltk3::ControlLKey, 
+  fltk3::ShiftRKey, fltk3::AltRKey, fltk3::ControlRKey, 0/*fltk3::FKey*/,
+  
+  0, fltk3::KPKey+'.', fltk3::RightKey, fltk3::KPKey+'*', 0, fltk3::KPKey+'+', fltk3::LeftKey, fltk3::NumLockKey,
+  fltk3::DownKey, 0, 0, fltk3::KPKey+'/', fltk3::KPEnterKey, fltk3::UpKey, fltk3::KPKey+'-', 0,
+  
+  0, fltk3::KPKey+'=', fltk3::KPKey+'0', fltk3::KPKey+'1', fltk3::KPKey+'2', fltk3::KPKey+'3', fltk3::KPKey+'4', fltk3::KPKey+'5',
+  fltk3::KPKey+'6', fltk3::KPKey+'7', 0, fltk3::KPKey+'8', fltk3::KPKey+'9', 0, 0, 0,
+  
+  fltk3::FKey+5, fltk3::FKey+6, fltk3::FKey+7, fltk3::FKey+3, fltk3::FKey+8, fltk3::FKey+9, 0, fltk3::FKey+11,
+  0, fltk3::FKey+13, fltk3::FKey+16, fltk3::FKey+14, 0, fltk3::FKey+10, fltk3::MenuKey, fltk3::FKey+12,
+  
+  0, fltk3::FKey+15, fltk3::HelpKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::FKey+4, fltk3::EndKey,
+  fltk3::FKey+2, fltk3::PageDownKey, fltk3::FKey+1, fltk3::LeftKey, fltk3::RightKey, fltk3::DownKey, fltk3::UpKey, 0/*FL_Power*/,
+};
+
+/*
+ * convert the current mouse chord into the FLTK modifier state
+ */
+static unsigned int mods_to_e_state( NSUInteger mods )
+{
+  long state = 0;
+  if ( mods & NSCommandKeyMask ) state |= fltk3::META;
+  if ( mods & NSAlternateKeyMask ) state |= fltk3::ALT;
+  if ( mods & NSControlKeyMask ) state |= fltk3::CTRL;
+  if ( mods & NSShiftKeyMask ) state |= fltk3::SHIFT;
+  if ( mods & NSAlphaShiftKeyMask ) state |= fltk3::CAPS_LOCK;
+  unsigned int ret = ( fltk3::e_state & 0xff000000 ) | state;
+  fltk3::e_state = ret;
+  //printf( "State 0x%08x (%04x)\n", fltk3::e_state, mods );
+  return ret;
+}
+
+// these pointers are set by the fltk3::lock() function:
+static void nothing() {}
+void (*fl_lock_function)() = nothing;
+void (*fl_unlock_function)() = nothing;
+
+//
+// Select interface -- how it's implemented:
+//     When the user app configures one or more file descriptors to monitor
+//     with fltk3::add_fd(), we start a separate thread to select() the  data,
+//     sending a custom OSX 'FLTK data ready event' to the parent  thread's
+//     RunApplicationLoop(), so that it triggers the data  ready  callbacks
+//     in the parent thread.                               -erco 04/04/04
+//     
+#define POLLIN  1
+#define POLLOUT 4
+#define POLLERR 8
+
+// Class to handle select() 'data ready'
+class DataReady
+{
+  struct FD
+  {
+    int fd;
+    short events;
+    void (*cb)(int, void*);
+    void* arg;
+  };
+  int nfds, fd_array_size;
+  FD *fds;
+  pthread_t tid;		// select()'s thread id
+  
+  // Data that needs to be locked (all start with '_')
+  pthread_mutex_t _datalock;	// data lock
+  fd_set _fdsets[3];		// r/w/x sets user wants to monitor
+  int _maxfd;			// max fd count to monitor
+  int _cancelpipe[2];		// pipe used to help cancel thread
+  
+public:
+  DataReady()
+  {
+    nfds = 0;
+    fd_array_size = 0;
+    fds = 0;
+    tid = 0;
+    
+    pthread_mutex_init(&_datalock, NULL);
+    FD_ZERO(&_fdsets[0]); FD_ZERO(&_fdsets[1]); FD_ZERO(&_fdsets[2]);
+    _cancelpipe[0] = _cancelpipe[1] = 0;
+    _maxfd = -1;
+  }
+  
+  ~DataReady()
+  {
+    CancelThread(DEBUGTEXT("DESTRUCTOR\n"));
+    if (fds) { free(fds); fds = 0; }
+    nfds = 0;
+  }
+  
+  // Locks
+  //    The convention for locks: volatile vars start with '_',
+  //    and must be locked before use. Locked code is prefixed 
+  //    with /*LOCK*/ to make painfully obvious esp. in debuggers. -erco
+  //
+  void DataLock() { pthread_mutex_lock(&_datalock); }
+  void DataUnlock() { pthread_mutex_unlock(&_datalock); }
+  
+  // Accessors
+  int IsThreadRunning() { return(tid ? 1 : 0); }
+  int GetNfds() { return(nfds); }
+  int GetCancelPipe(int ix) { return(_cancelpipe[ix]); }
+  fd_set GetFdset(int ix) { return(_fdsets[ix]); }
+  
+  // Methods
+  void AddFD(int n, int events, void (*cb)(int, void*), void *v);
+  void RemoveFD(int n, int events);
+  int CheckData(fd_set& r, fd_set& w, fd_set& x);
+  void HandleData(fd_set& r, fd_set& w, fd_set& x);
+  static void* DataReadyThread(void *self);
+  void StartThread(void);
+  void CancelThread(const char *reason);
+};
+
+static DataReady dataready;
+
+void DataReady::AddFD(int n, int events, void (*cb)(int, void*), void *v)
+{
+  RemoveFD(n, events);
+  int i = nfds++;
+  if (i >= fd_array_size) 
+  {
+    fl_open_display(); // necessary for NSApp to be defined and the event loop to work
+    FD *temp;
+    fd_array_size = 2*fd_array_size+1;
+    if (!fds) { temp = (FD*)malloc(fd_array_size*sizeof(FD)); }
+    else { temp = (FD*)realloc(fds, fd_array_size*sizeof(FD)); }
+    if (!temp) return;
+    fds = temp;
+  }
+  fds[i].cb  = cb;
+  fds[i].arg = v;
+  fds[i].fd  = n;
+  fds[i].events = events;
+  DataLock();
+  /*LOCK*/  if (events & POLLIN)  FD_SET(n, &_fdsets[0]);
+  /*LOCK*/  if (events & POLLOUT) FD_SET(n, &_fdsets[1]);
+  /*LOCK*/  if (events & POLLERR) FD_SET(n, &_fdsets[2]);
+  /*LOCK*/  if (n > _maxfd) _maxfd = n;
+  DataUnlock();
+}
+
+// Remove an FD from the array
+void DataReady::RemoveFD(int n, int events)
+{
+  int i,j;
+  _maxfd = -1; // recalculate maxfd on the fly
+  for (i=j=0; i<nfds; i++) {
+    if (fds[i].fd == n) {
+      int e = fds[i].events & ~events;
+      if (!e) continue; // if no events left, delete this fd
+      fds[i].events = e;
+    }
+    if (fds[i].fd > _maxfd) _maxfd = fds[i].fd;
+    // move it down in the array if necessary:
+    if (j<i) {
+      fds[j] = fds[i];
+    }
+    j++;
+  }
+  nfds = j;
+  DataLock();
+  /*LOCK*/  if (events & POLLIN)  FD_CLR(n, &_fdsets[0]);
+  /*LOCK*/  if (events & POLLOUT) FD_CLR(n, &_fdsets[1]);
+  /*LOCK*/  if (events & POLLERR) FD_CLR(n, &_fdsets[2]);
+  DataUnlock();
+}
+
+// CHECK IF USER DATA READY, RETURNS r/w/x INDICATING WHICH IF ANY
+int DataReady::CheckData(fd_set& r, fd_set& w, fd_set& x)
+{
+  int ret;
+  DataLock();
+  /*LOCK*/  timeval t = { 0, 1 };		// quick check
+  /*LOCK*/  r = _fdsets[0], w = _fdsets[1], x = _fdsets[2];
+  /*LOCK*/  ret = ::select(_maxfd+1, &r, &w, &x, &t);
+  DataUnlock();
+  if ( ret == -1 ) {
+    DEBUGPERRORMSG("CheckData(): select()");
+  }
+  return(ret);
+}
+
+// HANDLE DATA READY CALLBACKS
+void DataReady::HandleData(fd_set& r, fd_set& w, fd_set& x)
+{
+  for (int i=0; i<nfds; i++) {
+    int f = fds[i].fd;
+    short revents = 0;
+    if (FD_ISSET(f, &r)) revents |= POLLIN;
+    if (FD_ISSET(f, &w)) revents |= POLLOUT;
+    if (FD_ISSET(f, &x)) revents |= POLLERR;
+    if (fds[i].events & revents) {
+      DEBUGMSG("DOING CALLBACK: ");
+      fds[i].cb(f, fds[i].arg);
+      DEBUGMSG("DONE\n");
+    }
+  }
+}
+
+// DATA READY THREAD
+//    This thread watches for changes in user's file descriptors.
+//    Sends a 'data ready event' to the main thread if any change.
+//
+void* DataReady::DataReadyThread(void *o)
+{
+  DataReady *self = (DataReady*)o;
+  NSAutoreleasePool *localPool;
+  localPool = [[NSAutoreleasePool alloc] init]; 
+  while ( 1 ) {					// loop until thread cancel or error
+    // Thread safe local copies of data before each select()
+    self->DataLock();
+    /*LOCK*/  int maxfd = self->_maxfd;
+    /*LOCK*/  fd_set r = self->GetFdset(0);
+    /*LOCK*/  fd_set w = self->GetFdset(1);
+    /*LOCK*/  fd_set x = self->GetFdset(2);
+    /*LOCK*/  int cancelpipe = self->GetCancelPipe(0);
+    /*LOCK*/  if ( cancelpipe > maxfd ) maxfd = cancelpipe;
+    /*LOCK*/  FD_SET(cancelpipe, &r);		// add cancelpipe to fd's to watch
+    /*LOCK*/  FD_SET(cancelpipe, &x);
+    self->DataUnlock();
+    // timeval t = { 1000, 0 };	// 1000 seconds;
+    timeval t = { 2, 0 };	// HACK: 2 secs prevents 'hanging' problem
+    int ret = ::select(maxfd+1, &r, &w, &x, &t);
+    pthread_testcancel();	// OSX 10.0.4 and older: needed for parent to cancel
+    switch ( ret ) {
+      case 0:	// NO DATA
+        continue;
+      case -1:	// ERROR
+      {
+        DEBUGPERRORMSG("CHILD THREAD: select() failed");
+        return(NULL);		// error? exit thread
+      }
+      default:	// DATA READY
+      {
+        if (FD_ISSET(cancelpipe, &r) || FD_ISSET(cancelpipe, &x)) 	// cancel?
+	  { return(NULL); }						// just exit
+        DEBUGMSG("CHILD THREAD: DATA IS READY\n");
+        NSPoint pt={0,0};
+        NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined location:pt 
+				       modifierFlags:0
+                                           timestamp:0
+                                        windowNumber:0 context:NULL 
+					     subtype:FLTKDataReadyEvent data1:0 data2:0];
+        [NSApp postEvent:event atStart:NO];
+        return(NULL);		// done with thread
+      }
+    }
+  }
+}
+
+// START 'DATA READY' THREAD RUNNING, CREATE INTER-THREAD PIPE
+void DataReady::StartThread(void)
+{
+  CancelThread(DEBUGTEXT("STARTING NEW THREAD\n"));
+  DataLock();
+  /*LOCK*/  pipe(_cancelpipe);	// pipe for sending cancel msg to thread
+  DataUnlock();
+  DEBUGMSG("*** START THREAD\n");
+  pthread_create(&tid, NULL, DataReadyThread, (void*)this);
+}
+
+// CANCEL 'DATA READY' THREAD, CLOSE PIPE
+void DataReady::CancelThread(const char *reason)
+{
+  if ( tid ) {
+    DEBUGMSG("*** CANCEL THREAD: ");
+    DEBUGMSG(reason);
+    if ( pthread_cancel(tid) == 0 ) {		// cancel first
+      DataLock();
+      /*LOCK*/  write(_cancelpipe[1], "x", 1);	// wake thread from select
+      DataUnlock();
+      pthread_join(tid, NULL);			// wait for thread to finish
+    }
+    tid = 0;
+    DEBUGMSG("(JOINED) OK\n");
+  }
+  // Close pipe if open
+  DataLock();
+  /*LOCK*/  if ( _cancelpipe[0] ) { close(_cancelpipe[0]); _cancelpipe[0] = 0; }
+  /*LOCK*/  if ( _cancelpipe[1] ) { close(_cancelpipe[1]); _cancelpipe[1] = 0; }
+  DataUnlock();
+}
+
+void fltk3::add_fd( int n, int events, void (*cb)(int, void*), void *v )
+{
+  dataready.AddFD(n, events, cb, v);
+}
+
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v)
+{
+  dataready.AddFD(fd, POLLIN, cb, v);
+}
+
+void fltk3::remove_fd(int n, int events)
+{
+  dataready.RemoveFD(n, events);
+}
+
+void fltk3::remove_fd(int n)
+{
+  dataready.RemoveFD(n, -1);
+}
+
+/*
+ * Check if there is actually a message pending!
+ */
+int fl_ready()
+{
+  NSEvent *retval = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
+				    inMode:NSDefaultRunLoopMode dequeue:NO];
+  return retval != nil;
+}
+
+
+static void processFLTKEvent(void) {
+  fl_lock_function();
+  dataready.CancelThread(DEBUGTEXT("DATA READY EVENT\n"));
+  
+  // CHILD THREAD TELLS US DATA READY
+  //     Check to see what's ready, and invoke user's cb's
+  //
+  fd_set r,w,x;
+  switch(dataready.CheckData(r,w,x)) {
+    case 0:	// NO DATA
+      break;
+    case -1:	// ERROR
+      break;
+    default:	// DATA READY
+      dataready.HandleData(r,w,x);
+      break;
+  }
+  fl_unlock_function();
+  return;
+}
+
+
+/*
+ * break the current event loop
+ */
+static void breakMacEventLoop()
+{
+  fl_lock_function();
+  
+  NSPoint pt={0,0};
+  NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined location:pt 
+				 modifierFlags:0
+                                     timestamp:0
+                                  windowNumber:0 context:NULL 
+				       subtype:FLTKTimerEvent data1:0 data2:0];
+  [NSApp postEvent:event atStart:NO];
+  fl_unlock_function();
+}
+
+//
+// MacOS X timers
+//
+
+struct MacTimeout {
+  fltk3::TimeoutHandler callback;
+  void* data;
+  CFRunLoopTimerRef timer;
+  char pending; 
+};
+static MacTimeout* mac_timers;
+static int mac_timer_alloc;
+static int mac_timer_used;
+
+static void realloc_timers()
+{
+  if (mac_timer_alloc == 0) {
+    mac_timer_alloc = 8;
+    fl_open_display(); // needed because the timer creates an event
+  }
+  mac_timer_alloc *= 2;
+  MacTimeout* new_timers = new MacTimeout[mac_timer_alloc];
+  memset(new_timers, 0, sizeof(MacTimeout)*mac_timer_alloc);
+  memcpy(new_timers, mac_timers, sizeof(MacTimeout) * mac_timer_used);
+  MacTimeout* delete_me = mac_timers;
+  mac_timers = new_timers;
+  delete [] delete_me;
+}
+
+static void delete_timer(MacTimeout& t)
+{
+  if (t.timer) {
+    CFRunLoopRemoveTimer(CFRunLoopGetCurrent(),
+		      t.timer,
+		      kCFRunLoopDefaultMode);
+    CFRelease(t.timer);
+    memset(&t, 0, sizeof(MacTimeout));
+  }
+}
+
+static void do_timer(CFRunLoopTimerRef timer, void* data)
+{
+  for (int i = 0;  i < mac_timer_used;  ++i) {
+    MacTimeout& t = mac_timers[i];
+    if (t.timer == timer  &&  t.data == data) {
+      t.pending = 0;
+      (*t.callback)(data);
+      if (t.pending==0)
+        delete_timer(t);
+      break;
+    }
+  }
+  breakMacEventLoop();
+}
+
+@interface FLWindow : NSWindow {
+  fltk3::Window *w;
+  BOOL containsGLsubwindow;
+}
+- (FLWindow*)initWithFl_W:(fltk3::Window *)flw 
+	      contentRect:(NSRect)rect 
+		styleMask:(NSUInteger)windowStyle;
+- (fltk3::Window *)getFl_Window;
+- (BOOL)windowShouldClose:(FLWindow *)w;
+- (BOOL)containsGLsubwindow;
+- (void)setContainsGLsubwindow:(BOOL)contains;
+@end
+
+@implementation FLWindow
+- (FLWindow*)initWithFl_W:(fltk3::Window *)flw 
+	      contentRect:(NSRect)rect 
+		styleMask:(NSUInteger)windowStyle 
+{
+  self = [super initWithContentRect:rect styleMask:windowStyle backing:NSBackingStoreBuffered defer:NO];
+  if (self) {
+    w = flw;
+    containsGLsubwindow = NO;
+  }
+  return self;
+}
+- (fltk3::Window *)getFl_Window;
+{
+  return w;
+}
+- (BOOL)windowShouldClose:(FLWindow *)fl
+{
+  fl_lock_function();
+  fltk3::handle( fltk3::CLOSE, [fl getFl_Window] ); // this might or might not close the window
+  if (!Fl_X::first) return YES;
+  fltk3::Window *l = fltk3::first_window();
+  while( l != NULL && l != [fl getFl_Window]) l = fltk3::next_window(l);
+  fl_unlock_function();
+  return (l == NULL ? YES : NO);
+}
+- (BOOL)containsGLsubwindow
+{
+  return containsGLsubwindow;
+}
+- (void)setContainsGLsubwindow:(BOOL)contains
+{
+  containsGLsubwindow = contains;
+}
+@end
+
+@interface FLApplication : NSObject
+{
+}
++ (void)sendEvent:(NSEvent *)theEvent;
+@end
+
+/*
+ * This function is the central event handler.
+ * It reads events from the event queue using the given maximum time
+ * Funny enough, it returns the same time that it got as the argument. 
+ */
+static double do_queued_events( double time = 0.0 ) 
+{
+  got_events = 0;
+  
+  // Check for re-entrant condition
+  if ( dataready.IsThreadRunning() ) {
+    dataready.CancelThread(DEBUGTEXT("AVOID REENTRY\n"));
+  }
+  
+  // Start thread to watch for data ready
+  if ( dataready.GetNfds() ) {
+    dataready.StartThread();
+  }
+  
+  fl_unlock_function();
+  NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask 
+                                      untilDate:[NSDate dateWithTimeIntervalSinceNow:time] 
+                                         inMode:NSDefaultRunLoopMode dequeue:YES];  
+  if (event != nil) {
+    got_events = 1;
+    [FLApplication sendEvent:event]; // will then call [NSApplication sendevent:]
+  }
+  fl_lock_function();
+  
+#if CONSOLIDATE_MOTION
+  if (send_motion && send_motion == fl_xmousewin) {
+    send_motion = 0;
+    fltk3::handle(fltk3::MOVE, fl_xmousewin);
+  }
+#endif
+  
+  return time;
+}
+
+/*
+ * This public function handles all events. It wait a maximum of 
+ * 'time' seconds for an event. This version returns 1 if events
+ * other than the timeout timer were processed.
+ *
+ * \todo there is no socket handling in this code whatsoever
+ */
+int fl_wait( double time ) 
+{
+  do_queued_events( time );
+  return (got_events);
+}
+
+double fl_mac_flush_and_wait(double time_to_wait, char in_idle) {
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+  fltk3::flush();
+  if (fltk3::idle && !in_idle) // 'idle' may have been set within flush()
+    time_to_wait = 0.0;
+  double retval = fl_wait(time_to_wait);
+  [pool release];
+  return retval;
+}
+
+// updates fltk3::e_x, fltk3::e_y, fltk3::e_x_root, and fltk3::e_y_root
+static void update_e_xy_and_e_xy_root(NSWindow *nsw)
+{
+  NSPoint pt;
+  pt = [nsw mouseLocationOutsideOfEventStream];
+  fltk3::e_x = int(pt.x);
+  fltk3::e_y = int([[nsw contentView] frame].size.height - pt.y);
+  pt = [NSEvent mouseLocation];
+  fltk3::e_x_root = int(pt.x);
+  fltk3::e_y_root = int([[nsw screen] frame].size.height - pt.y);
+}
+
+/*
+ * Cocoa Mousewheel handler
+ */
+static void cocoaMouseWheelHandler(NSEvent *theEvent)
+{
+  // Handle the new "MightyMouse" mouse wheel events. Please, someone explain
+  // to me why Apple changed the API on this even though the current API
+  // supports two wheels just fine. Matthias,
+  fl_lock_function();
+  
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  if ( !window->shown() ) {
+    fl_unlock_function();
+    return;
+  }
+  fltk3::first_window(window);
+  
+  // Under OSX, single mousewheel increments are 0.1,
+  // so make sure they show up as at least 1..
+  //
+  float dx = [theEvent deltaX]; if ( fabs(dx) < 1.0 ) dx = (dx > 0) ? 1.0 : -1.0;
+  float dy = [theEvent deltaY]; if ( fabs(dy) < 1.0 ) dy = (dy > 0) ? 1.0 : -1.0;
+  if ([theEvent deltaX] != 0) {
+    fltk3::e_dx = (int)-dx;
+    fltk3::e_dy = 0;
+    if ( fltk3::e_dx) fltk3::handle( fltk3::MOUSEWHEEL, window );
+  } else if ([theEvent deltaY] != 0) {
+    fltk3::e_dx = 0;
+    fltk3::e_dy = (int)-dy;
+    if ( fltk3::e_dy) fltk3::handle( fltk3::MOUSEWHEEL, window );
+  } else {
+    fl_unlock_function();
+    return;
+  }
+  
+  fl_unlock_function();
+  
+  //  return noErr;
+}
+
+/*
+ * Cocoa Mouse Button Handler
+ */
+static void cocoaMouseHandler(NSEvent *theEvent)
+{
+  static int keysym[] = { 0, fltk3::MouseButton+1, fltk3::MouseButton+3, fltk3::MouseButton+2 };
+  static int px, py;
+  static char suppressed = 0;
+  
+  fl_lock_function();
+  
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  if ( !window->shown() ) {
+    fl_unlock_function();
+    return;
+  }
+  fltk3::Window *first = fltk3::first_window();
+  if (first != window && !(first->modal() || first->non_modal())) fltk3::first_window(window);
+  NSPoint pos = [theEvent locationInWindow];
+  pos.y = window->h() - pos.y;
+  NSInteger btn = [theEvent buttonNumber]  + 1;
+  NSUInteger mods = [theEvent modifierFlags];  
+  int sendEvent = 0;
+  
+  NSEventType etype = [theEvent type];
+  if (etype == NSLeftMouseDown || etype == NSRightMouseDown || etype == NSOtherMouseDown) {
+    if (btn == 1) fltk3::e_state |= fltk3::BUTTON1;
+    else if (btn == 3) fltk3::e_state |= fltk3::BUTTON2;
+    else if (btn == 2) fltk3::e_state |= fltk3::BUTTON3;
+  }
+  else if (etype == NSLeftMouseUp || etype == NSRightMouseUp || etype == NSOtherMouseUp) {
+    if (btn == 1) fltk3::e_state &= ~fltk3::BUTTON1;
+    else if (btn == 3) fltk3::e_state &= ~fltk3::BUTTON2;
+    else if (btn == 2) fltk3::e_state &= ~fltk3::BUTTON3;
+    }
+    
+  switch ( etype ) {
+    case NSLeftMouseDown:
+    case NSRightMouseDown:
+    case NSOtherMouseDown:
+      suppressed = 0;
+      sendEvent = fltk3::PUSH;
+      fltk3::e_is_click = 1; 
+      px = (int)pos.x; py = (int)pos.y;
+      if ([theEvent clickCount] > 1) 
+        fltk3::e_clicks++;
+      else
+        fltk3::e_clicks = 0;
+      // fall through
+    case NSLeftMouseUp:
+    case NSRightMouseUp:
+    case NSOtherMouseUp:
+      if (suppressed) {
+        suppressed = 0;
+        break;
+      }
+      if ( !window ) break;
+      if ( !sendEvent ) {
+        sendEvent = fltk3::RELEASE; 
+      }
+      fltk3::e_keysym = keysym[ btn ];
+      // fall through
+    case NSMouseMoved:
+      suppressed = 0;
+      if ( !sendEvent ) { 
+        sendEvent = fltk3::MOVE; 
+      }
+      // fall through
+    case NSLeftMouseDragged:
+    case NSRightMouseDragged:
+    case NSOtherMouseDragged: {
+      if (suppressed) break;
+      if ( !sendEvent ) {
+        sendEvent = fltk3::MOVE; // fltk3::handle will convert into fltk3::DRAG
+        if (fabs(pos.x-px)>5 || fabs(pos.y-py)>5) 
+          fltk3::e_is_click = 0;
+      }
+      mods_to_e_state( mods );
+      update_e_xy_and_e_xy_root([theEvent window]);
+      fltk3::handle( sendEvent, window );
+      }
+      break;
+    default:
+      break;
+  }
+  
+  fl_unlock_function();
+  
+  return;
+}
+
+@interface FLTextView : NSTextView 
+// this subclass is needed under OS X <= 10.5 but not under >= 10.6 where the base class is enough
+{
+}
+@end
+@implementation FLTextView
+- (void)insertText:(id)aString
+{
+  [[[NSApp keyWindow] contentView] insertText:aString];
+}
+- (void)doCommandBySelector:(SEL)aSelector
+{
+  [[[NSApp keyWindow] contentView] doCommandBySelector:aSelector];
+}
+@end
+
+/*
+Handle cocoa keyboard events
+Events during a character composition sequence:
+ - keydown with deadkey -> [[theEvent characters] length] is 0
+ - keyup -> [theEvent characters] contains the deadkey
+ - keydown with next key -> [theEvent characters] contains the composed character
+ - keyup -> [theEvent characters] contains the standard character
+ */
+static void cocoaKeyboardHandler(NSEvent *theEvent)
+{
+  NSUInteger mods;
+  
+  // get the modifiers
+  mods = [theEvent modifierFlags];
+  // get the key code
+  UInt32 keyCode = 0, maskedKeyCode = 0;
+  unsigned short sym = 0;
+  keyCode = [theEvent keyCode];
+  NSString *s = [theEvent characters];  
+  if ( (mods & NSShiftKeyMask) && (mods & NSCommandKeyMask) ) {
+    s = [s uppercaseString]; // US keyboards return lowercase letter in s if cmd-shift-key is hit
+  }
+  // extended keyboards can also send sequences on key-up to generate Kanji etc. codes.
+  // Some observed prefixes are 0x81 to 0x83, followed by an 8 bit keycode.
+  // In this mode, there seem to be no key-down codes
+  // printf("%08x %08x %08x\n", keyCode, mods, key);
+  maskedKeyCode = keyCode & 0x7f;
+
+  if ([theEvent type] == NSKeyUp) {
+    fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
+  }
+
+  mods_to_e_state( mods ); // process modifier keys
+  sym = macKeyLookUp[maskedKeyCode];
+  if (sym < 0xff00) { // a "simple" key
+    // find the result of this key without modifier
+    NSString *sim = [theEvent charactersIgnoringModifiers];
+    UniChar one;
+    CFStringGetCharacters((CFStringRef)sim, CFRangeMake(0, 1), &one);
+    // charactersIgnoringModifiers doesn't ignore shift, remove it when it's on
+    if(one >= 'A' && one <= 'Z') one += 32;
+    if (one > 0 && one <= 0x7f && (sym<'0' || sym>'9') ) sym = one;
+  }
+  fltk3::e_keysym = fltk3::e_original_keysym = sym;
+
+  //NSLog(@"cocoaKeyboardHandler: keycode=%08x keysym=%08x mods=%08x symbol=%@ (%@)",
+  //  keyCode, sym, mods, [theEvent characters], [theEvent charactersIgnoringModifiers]);
+
+  // If there is text associated with this key, it will be filled in later.
+  fltk3::e_length = 0;
+  fltk3::e_text = (char*)"";
+}
+
+
+/*
+ * Open callback function to call...
+ */
+
+static void	(*open_cb)(const char *) = 0;
+
+
+/*
+ * Install an open documents event handler...
+ */
+@interface FLAppleEventHandler : NSObject
+{
+}
+- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+@end
+@implementation FLAppleEventHandler
+- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent
+{
+  NSAppleEventDescriptor *single = [event descriptorAtIndex:1];
+  const AEDesc *document = [single aeDesc];
+  long i, n;
+  FSRef fileRef;
+  AEKeyword keyWd;
+  DescType typeCd;
+  Size actSz;
+  char filename[1024];
+  // Lock access to FLTK in this thread...
+  fl_lock_function();
+  
+  // Open the documents via the callback...
+  if (AECountItems(document, &n) == noErr) {
+    for (i = 1; i <= n; i ++) {
+      AEGetNthPtr(document, i, typeFSRef, &keyWd, &typeCd,
+                  (Ptr)&fileRef, sizeof(fileRef),
+                  (actSz = sizeof(fileRef), &actSz));
+      FSRefMakePath( &fileRef, (UInt8*)filename, sizeof(filename) );
+      
+      (*open_cb)(filename);
+    }
+  }
+  // Unlock access to FLTK for all threads...
+  fl_unlock_function();
+}
+@end
+
+void fl_open_callback(void (*cb)(const char *)) {
+  static NSAppleEventManager *aeventmgr = nil;
+  static FLAppleEventHandler *handler;
+  fl_open_display();
+  if (!aeventmgr) {
+    aeventmgr = [NSAppleEventManager sharedAppleEventManager];
+    handler = [[FLAppleEventHandler alloc] init];
+  }
+  
+  open_cb = cb;
+  if (cb) {
+    [aeventmgr setEventHandler:handler andSelector:@selector(handleAppleEvent:withReplyEvent:) 
+                 forEventClass:kCoreEventClass andEventID:kAEOpenDocuments];
+  } else {
+    [aeventmgr removeEventHandlerForEventClass:kCoreEventClass andEventID:kAEOpenDocuments];  
+  }
+}
+
+
+/*
+ * initialize the Mac toolboxes, dock status, and set the default menubar
+ */
+
+extern "C" {
+  extern OSErr CPSEnableForegroundOperation(ProcessSerialNumber *psn, UInt32 _arg2,
+                                            UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+}
+
+
+@interface FLDelegate : NSObject 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSWindowDelegate, NSApplicationDelegate>
+#endif
+{
+}
+- (void)windowDidMove:(NSNotification *)notif;
+- (void)windowDidResize:(NSNotification *)notif;
+- (void)windowDidResignKey:(NSNotification *)notif;
+- (void)windowDidBecomeKey:(NSNotification *)notif;
+- (void)windowDidBecomeMain:(NSNotification *)notif;
+- (void)windowDidDeminiaturize:(NSNotification *)notif;
+- (void)windowDidMiniaturize:(NSNotification *)notif;
+- (void)windowWillClose:(NSNotification *)notif;
+- (void)anywindowwillclosenotif:(NSNotification *)notif;
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender;
+- (void)applicationDidBecomeActive:(NSNotification *)notify;
+- (void)applicationWillResignActive:(NSNotification *)notify;
+- (void)applicationWillHide:(NSNotification *)notify;
+- (void)applicationWillUnhide:(NSNotification *)notify;
+- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client;
+@end
+@implementation FLDelegate
+- (void)windowDidMove:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *window = [nsw getFl_Window];
+  NSPoint pt, pt2; 
+  pt.x = 0;
+  pt.y = [[nsw contentView] frame].size.height;
+  pt2 = [nsw convertBaseToScreen:pt];
+  update_e_xy_and_e_xy_root(nsw);
+  window->position((int)pt2.x, (int)([[nsw screen] frame].size.height - pt2.y));
+  if ([nsw containsGLsubwindow] ) {
+    [nsw display];// redraw window after moving if it contains OpenGL subwindows
+  }
+  fl_unlock_function();
+}
+- (void)windowDidResize:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *window = [nsw getFl_Window];
+  NSRect r = [[nsw contentView] frame];
+  NSPoint pt, pt2; 
+  pt.x = 0;
+  pt.y = [[nsw contentView] frame].size.height;
+  pt2 = [nsw convertBaseToScreen:pt];
+  resize_from_system = window;
+  update_e_xy_and_e_xy_root(nsw);
+  window->resize((int)pt2.x, 
+                 (int)([[nsw screen] frame].size.height - pt2.y),
+		 (int)r.size.width,
+		 (int)r.size.height);
+  fl_unlock_function();
+}
+- (void)windowDidResignKey:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *window = [nsw getFl_Window];
+  fltk3::handle( fltk3::UNFOCUS, window);
+  fl_unlock_function();
+}
+- (void)windowDidBecomeKey:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *w = [nsw getFl_Window];
+  if ( w->border() || (!w->modal() && !w->tooltip_window()) ) fltk3::handle( fltk3::FOCUS, w);
+  fl_unlock_function();
+}
+- (void)windowDidBecomeMain:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *window = [nsw getFl_Window];
+  fltk3::first_window(window);
+  update_e_xy_and_e_xy_root(nsw);
+  fl_unlock_function();
+}
+- (void)windowDidDeminiaturize:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *window = [nsw getFl_Window];
+  fltk3::handle(fltk3::SHOW, window);
+  update_e_xy_and_e_xy_root(nsw);
+  fl_unlock_function();
+}
+- (void)windowDidMiniaturize:(NSNotification *)notif
+{
+  fl_lock_function();
+  FLWindow *nsw = (FLWindow*)[notif object];
+  fltk3::Window *window = [nsw getFl_Window];
+  fltk3::handle(fltk3::HIDE, window);
+  fl_unlock_function();
+}
+- (void)windowWillClose:(NSNotification *)notif
+{
+  fl_lock_function();
+  fltk3::Window *w = fltk3::first_window();
+  if (w) {
+    NSWindow *cw = (NSWindow*)Fl_X::i(w)->xid;
+    if ( ![cw isMiniaturized] && ([cw styleMask] & NSTitledWindowMask) ) {
+      if (![cw isKeyWindow]) {	// always make fltk3::first_window() the key widow
+	[cw makeKeyAndOrderFront:nil];
+      }
+      if (![cw isMainWindow]) {	// always make fltk3::first_window() the main widow
+	[cw makeMainWindow];
+      }
+    }
+  }
+  fl_unlock_function();
+}
+- (void)anywindowwillclosenotif:(NSNotification *)notif
+{
+  // necessary so that after closing a non-FLTK window (e.g., fltk3::NativeFileChooser)
+  // the front window turns key again
+  NSWindow *closing = (NSWindow*)[notif object];
+  if ([closing isMemberOfClass:[FLWindow class]]) return;
+  NSWindow *nsk = [NSApp keyWindow];
+  NSWindow *nsm = [NSApp mainWindow];
+  if ([nsm isMemberOfClass:[FLWindow class]] && nsk == nil) {
+    [nsm makeKeyAndOrderFront:nil];
+  }
+}
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender
+{
+  fl_lock_function();
+  NSApplicationTerminateReply reply = NSTerminateNow;
+  while ( Fl_X::first ) {
+    Fl_X *x = Fl_X::first;
+    fltk3::handle( fltk3::CLOSE, x->w );
+    if ( Fl_X::first == x ) {
+      reply = NSTerminateCancel; // FLTK has not closed all windows, so we return to the main program now
+      break;
+    }
+  }
+  fl_unlock_function();
+  return reply;
+}
+/**
+ * Cocoa organizes the Z depth of windows on a global priority. FLTK however
+ * expects the window manager to organize Z level by application. The trickery
+ * below will change Z order during activation and deactivation.
+ */
+- (void)applicationDidBecomeActive:(NSNotification *)notify
+{
+  fl_lock_function();
+  Fl_X *x;
+  FLWindow *top = 0, *topModal = 0, *topNonModal = 0;
+  for (x = Fl_X::first;x;x = x->next) {
+    FLWindow *cw = (FLWindow*)x->xid;
+    fltk3::Window *win = x->w;
+    if (win && cw) {
+      if (win->modal()) {
+        [cw setLevel:NSModalPanelWindowLevel];
+        if (topModal) 
+          [cw orderWindow:NSWindowBelow relativeTo:[topModal windowNumber]];
+        else
+          topModal = cw;
+      } else if (win->non_modal()) {
+        [cw setLevel:NSFloatingWindowLevel];
+        if (topNonModal) 
+          [cw orderWindow:NSWindowBelow relativeTo:[topNonModal windowNumber]];
+        else
+          topNonModal = cw;
+      } else {
+        if (top) 
+          ;
+        else
+          top = cw;
+      }
+    }
+  }
+  fl_unlock_function();
+}
+- (void)applicationWillResignActive:(NSNotification *)notify
+{
+  fl_lock_function();
+  Fl_X *x;
+  FLWindow *top = 0;
+  // sort in all regular windows
+  for (x = Fl_X::first;x;x = x->next) {
+    FLWindow *cw = (FLWindow*)x->xid;
+    fltk3::Window *win = x->w;
+    if (win && cw) {
+      if (win->modal()) {
+      } else if (win->non_modal()) {
+      } else {
+        if (!top) top = cw;
+      }
+    }
+  }
+  // now sort in all modals
+  for (x = Fl_X::first;x;x = x->next) {
+    FLWindow *cw = (FLWindow*)x->xid;
+    fltk3::Window *win = x->w;
+    if (win && cw) {
+      if (win->modal()) {
+        [cw setLevel:NSNormalWindowLevel];
+        if (top) [cw orderWindow:NSWindowAbove relativeTo:[top windowNumber]];
+      }
+    }
+  }
+  // finally all non-modals
+  for (x = Fl_X::first;x;x = x->next) {
+    FLWindow *cw = (FLWindow*)x->xid;
+    fltk3::Window *win = x->w;
+    if (win && cw) {
+      if (win->non_modal()) {
+        [cw setLevel:NSNormalWindowLevel];
+        if (top) [cw orderWindow:NSWindowAbove relativeTo:[top windowNumber]];
+      }
+    }
+  }
+  fl_unlock_function();
+}
+- (void)applicationWillHide:(NSNotification *)notify
+{
+  fl_lock_function();
+  Fl_X *x;
+  for (x = Fl_X::first;x;x = x->next) {
+    fltk3::Window *window = x->w;
+    if ( !window->parent() ) fltk3::handle( fltk3::HIDE, window);
+    }
+  fl_unlock_function();
+}
+- (void)applicationWillUnhide:(NSNotification *)notify
+{
+  fl_lock_function();
+  Fl_X *x;
+  for (x = Fl_X::first;x;x = x->next) {
+    fltk3::Window *w = x->w;
+    if ( !w->parent() ) {
+      if ( w->border() || (!w->modal() && !w->tooltip_window()) ) fltk3::handle( fltk3::FOCUS, w);
+      fltk3::handle( fltk3::SHOW, w);
+      }
+  }
+  fl_unlock_function();
+}
+- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client
+{
+  if (fl_mac_os_version < 100600) {
+    static FLTextView *view = nil;
+    if (!view) {
+      NSRect rect={{0,0},{20,20}};
+      view = [[FLTextView alloc] initWithFrame:rect];
+    }
+    return view;
+  }
+  return nil;
+}
+@end
+
+@implementation FLApplication
++ (void)sendEvent:(NSEvent *)theEvent
+{
+  NSEventType type = [theEvent type];  
+  if (type == NSLeftMouseDown) {
+    fl_lock_function();
+    fltk3::Window *grab = fltk3::grab();
+    if (grab) {
+      FLWindow *win = (FLWindow *)[theEvent window];
+      if ( [win isKindOfClass:[FLWindow class]] && grab != [win getFl_Window]) {
+	// a click event out of a menu window, so we should close this menu
+	// done here to catch also clicks on window title bar/resize box 
+	cocoaMouseHandler(theEvent);
+      }
+    }
+    fl_unlock_function();
+  } else if (type == NSApplicationDefined) {
+    if ([theEvent subtype] == FLTKDataReadyEvent) {
+      processFLTKEvent();
+    }
+    return;
+  } else if (type == NSKeyUp) {
+    // The default sendEvent turns key downs into performKeyEquivalent when
+    // modifiers are down, but swallows the key up if the modifiers include
+    // command.  This one makes all modifiers consistent by always sending key ups.
+    // FLView treats performKeyEquivalent to keyDown, but performKeyEquivalent is
+    // still needed for the system menu.
+    [[NSApp keyWindow] sendEvent:theEvent];
+    return;
+    }
+  [NSApp sendEvent:theEvent]; 
+}
+@end
+
+static FLDelegate *mydelegate;
+
+void fl_open_display() {
+  static char beenHereDoneThat = 0;
+  if ( !beenHereDoneThat ) {
+    beenHereDoneThat = 1;
+
+    BOOL need_new_nsapp = (NSApp == nil);
+    if (need_new_nsapp) [NSApplication sharedApplication];
+    NSAutoreleasePool *localPool;
+    localPool = [[NSAutoreleasePool alloc] init]; // never released
+    mydelegate = [[FLDelegate alloc] init];
+    [NSApp setDelegate:mydelegate];
+    if (need_new_nsapp) [NSApp finishLaunching];
+
+    // empty the event queue but keep system events for drag&drop of files at launch
+    NSEvent *ign_event;
+    do ign_event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSSystemDefinedMask)
+					untilDate:[NSDate dateWithTimeIntervalSinceNow:0] 
+					   inMode:NSDefaultRunLoopMode 
+					  dequeue:YES];
+    while (ign_event);
+    
+    fl_default_cursor = [NSCursor arrowCursor];
+
+    // bring the application into foreground without a 'CARB' resource
+    Boolean same_psn;
+    ProcessSerialNumber cur_psn, front_psn;
+    if ( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) &&
+         !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) {
+      // only transform the application type for unbundled apps
+      CFBundleRef bundle = CFBundleGetMainBundle();
+      if ( bundle ) {
+      	FSRef execFs;
+      	CFURLRef execUrl = CFBundleCopyExecutableURL( bundle );
+      	CFURLGetFSRef( execUrl, &execFs );
+        
+      	FSRef bundleFs;
+      	GetProcessBundleLocation( &cur_psn, &bundleFs );
+        
+      	if ( !FSCompareFSRefs( &execFs, &bundleFs ) )
+          bundle = NULL;
+        
+        CFRelease(execUrl);
+      }
+            
+      if ( !bundle )
+      {
+        // Earlier versions of this code tried to use weak linking, however it
+        // appears that this does not work on 10.2.  Since 10.3 and higher provide
+        // both TransformProcessType and CPSEnableForegroundOperation, the following
+        // conditional code compiled on 10.2 will still work on newer releases...
+        OSErr err;
+#if __LP64__
+        err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication);
+#else
+        
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+        if (TransformProcessType != NULL) {
+          err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication);
+        } else
+#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+          err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103);
+#endif // __LP64__
+        if (err == noErr) {
+          SetFrontProcess( &cur_psn );
+        }
+      }
+    }
+    if (![NSApp servicesMenu]) createAppleMenu();
+    fl_system_menu = [NSApp mainMenu];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:mydelegate 
+	       selector:@selector(anywindowwillclosenotif:) 
+		   name:NSWindowWillCloseNotification 
+		 object:nil];
+  }
+}
+
+
+/*
+ * get rid of allocated resources
+ */
+void fl_close_display() {
+}
+
+
+// Gets the border sizes and the titlebar size
+static void get_window_frame_sizes(int &bx, int &by, int &bt) {
+  static bool first = true;
+  static int top, left, bottom;
+  if (first) {
+    first = false;
+    if (NSApp == nil) fl_open_display();
+    NSRect inside = { {20,20}, {100,100} };
+    NSRect outside = [NSWindow  frameRectForContentRect:inside styleMask:NSTitledWindowMask];
+    left = int(outside.origin.x - inside.origin.x);
+    bottom = int(outside.origin.y - inside.origin.y);
+    top = int(outside.size.height - inside.size.height) - bottom;
+    }
+  bx = left;
+  by = bottom;
+  bt = top;
+}
+
+/*
+ * smallest x ccordinate in screen space
+ */
+int fltk3::x() {
+  return int([[NSScreen mainScreen] visibleFrame].origin.x);
+}
+
+
+/*
+ * smallest y coordinate in screen space
+ */
+int fltk3::y() {
+  NSRect all = [[NSScreen mainScreen] frame];
+  NSRect visible = [[NSScreen mainScreen] visibleFrame];
+  return int(all.size.height - (visible.origin.y + visible.size.height));
+}
+
+
+/*
+ * screen width
+ */
+int fltk3::w() {
+  return int([[NSScreen mainScreen] visibleFrame].size.width);
+}
+
+
+/*
+ * screen height
+ */
+int fltk3::h() {
+  return int([[NSScreen mainScreen] visibleFrame].size.height);
+}
+
+
+/*
+ * get the current mouse pointer world coordinates
+ */
+void fltk3::get_mouse(int &x, int &y) 
+{
+  fl_open_display();
+  NSPoint pt = [NSEvent mouseLocation];
+  x = int(pt.x);
+  y = int([[NSScreen mainScreen] frame].size.height - pt.y);
+}
+
+
+/*
+ * Initialize the given port for redraw and call the window's flush() to actually draw the content
+ */ 
+void Fl_X::flush()
+{
+  w->flush();
+  if (fl_gc) CGContextFlush(fl_gc);
+}
+
+/*
+ * Gets called when a window is created, resized, or deminiaturized
+ */    
+static void handleUpdateEvent( fltk3::Window *window ) 
+{
+  if ( !window ) return;
+  Fl_X *i = Fl_X::i( window );
+  i->wait_for_expose = 0;
+
+  if ( i->region ) {
+    XDestroyRegion(i->region);
+    i->region = 0;
+  }
+  
+  for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext ) {
+    if ( cx->region ) {
+      XDestroyRegion(cx->region);
+      cx->region = 0;
+    }
+    cx->w->clear_damage(fltk3::DAMAGE_ALL);
+    cx->flush();
+    cx->w->clear_damage();
+  }
+  window->clear_damage(fltk3::DAMAGE_ALL);
+  i->flush();
+  window->clear_damage();
+}     
+
+
+int Fl_X::fake_X_wm(const fltk3::Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
+  int W, H, xoff, yoff, dx, dy;
+  int ret = bx = by = bt = 0;
+  if (w->border() && !w->parent()) {
+    if (w->maxw != w->minw || w->maxh != w->minh) {
+      ret = 2;
+    } else {
+      ret = 1;
+    }
+    get_window_frame_sizes(bx, by, bt);
+  }
+  // The coordinates of the whole window, including non-client area
+  xoff = bx;
+  yoff = by + bt;
+  dx = 2*bx;
+  dy = 2*by + bt;
+  X = w->x()-xoff;
+  Y = w->y()-yoff;
+  W = w->w()+dx;
+  H = w->h()+dy;
+  
+  // Proceed to positioning the window fully inside the screen, if possible
+  
+  // let's get a little elaborate here. Mac OS X puts a lot of stuff on the desk
+  // that we want to avoid when positioning our window, namely the Dock and the
+  // top menu bar (and even more stuff in 10.4 Tiger). So we will go through the
+  // list of all available screens and find the one that this window is most
+  // likely to go to, and then reposition it to fit withing the 'good' area.
+  //  Rect r;
+  // find the screen, that the center of this window will fall into
+  int R = X+W, B = Y+H; // right and bottom
+  int cx = (X+R)/2, cy = (Y+B)/2; // center of window;
+  NSScreen *gd = NULL;
+  NSArray *a = [NSScreen screens]; int count = (int)[a count]; NSRect r; int i;
+  for( i = 0; i < count; i++) {
+    r = [[a objectAtIndex:i] frame];
+    cy = int(r.size.height - cy);
+    if (   cx >= r.origin.x && cx <= r.origin.x + r.size.width
+        && cy >= r.origin.y && cy <= r.origin.y + r.size.height)
+      break;
+  }
+  if (i < count) gd = [a objectAtIndex:i];
+  
+  // if the center doesn't fall on a screen, try the top left
+  if (!gd) {
+    for( i = 0; i < count; i++) {
+      r = [[a objectAtIndex:i] frame];
+      if (    X >= r.origin.x && X <= r.origin.x + r.size.width
+          && r.size.height - Y >= r.origin.y  && r.size.height - Y <= r.origin.y + r.size.height)
+        break;
+    }
+    if (i < count) gd = [a objectAtIndex:i];
+  }
+  // if that doesn't fall on a screen, try the top right
+  if (!gd) {
+    for( i = 0; i < count; i++) {
+      r = [[a objectAtIndex:i] frame];
+      if (    R >= r.origin.x && R <= r.origin.x + r.size.width
+          && r.size.height - Y >= r.origin.y  && r.size.height - Y <= r.origin.y + r.size.height)
+        break;
+    }
+    if (i < count) gd = [a objectAtIndex:i];
+  }
+  // if that doesn't fall on a screen, try the bottom left
+  if (!gd) {
+    for( i = 0; i < count; i++) {
+      r = [[a objectAtIndex:i] frame];
+      if (    X >= r.origin.x && X <= r.origin.x + r.size.width
+          && Y-H >= r.origin.y  && Y-H <= r.origin.y + r.size.height)
+        break;
+    }
+    if (i < count) gd = [a objectAtIndex:i];
+  }
+  // last resort, try the bottom right
+  if (!gd) {
+    for( i = 0; i < count; i++) {
+      r = [[a objectAtIndex:i] frame];
+      if (    R >= r.origin.x && R <= r.origin.x + r.size.width
+          && Y-H >= r.origin.y  && Y-H <= r.origin.y + r.size.height)
+        break;
+    }
+    if (i < count) gd = [a objectAtIndex:i];
+  }
+  // if we still have not found a screen, we will use the main
+  // screen, the one that has the application menu bar.
+  if (!gd) gd = [a objectAtIndex:0];
+  if (gd) {
+    r = [gd visibleFrame];
+    int sh = int([gd frame].size.height);
+    if ( R > r.origin.x + r.size.width ) X -= int(R - (r.origin.x + r.size.width));
+    if ( B > sh - r.origin.y ) Y -= int(B - (sh - r.origin.y));
+    if ( X < r.origin.x ) X = int(r.origin.x);
+    if ( Y < sh - (r.origin.y + r.size.height) ) Y = int(sh - (r.origin.y + r.size.height));
+  }
+  
+  // Return the client area's top left corner in (X,Y)
+  X+=xoff;
+  Y+=yoff;
+  
+  return ret;
+}
+
+
+fltk3::Window *fl_dnd_target_window = 0;
+
+static void  q_set_window_title(NSWindow *nsw, const char * name, const char *mininame) {
+  CFStringRef title = CFStringCreateWithCString(NULL, (name ? name : ""), kCFStringEncodingUTF8);
+  if(!title) { // fallback when name contains malformed UTF-8
+    int l = strlen(name);
+    unsigned short* utf16 = new unsigned short[l + 1];
+    l = fltk3::utf8toUtf16(name, l, utf16, l + 1);
+    title = CFStringCreateWithCharacters(NULL, utf16, l);
+    delete[] utf16;
+    }
+  [nsw setTitle:(NSString*)title];
+  CFRelease(title);
+  if (mininame && strlen(mininame)) {
+    CFStringRef minititle = CFStringCreateWithCString(NULL, mininame, kCFStringEncodingUTF8);
+    if (minititle) {
+      [nsw setMiniwindowTitle:(NSString*)minititle];
+      CFRelease(minititle);
+    }
+  }
+}
+
+
+@interface FLView : NSView <NSTextInput> {
+  int next_compose_length;
+  bool in_key_event;
+}
++ (void)prepareEtext:(NSString*)aString;
+- (id)init;
+- (void)drawRect:(NSRect)rect;
+- (BOOL)acceptsFirstResponder;
+- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent;
+- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
+- (void)mouseUp:(NSEvent *)theEvent;
+- (void)rightMouseUp:(NSEvent *)theEvent;
+- (void)otherMouseUp:(NSEvent *)theEvent;
+- (void)mouseDown:(NSEvent *)theEvent;
+- (void)rightMouseDown:(NSEvent *)theEvent;
+- (void)otherMouseDown:(NSEvent *)theEvent;
+- (void)mouseMoved:(NSEvent *)theEvent;
+- (void)mouseDragged:(NSEvent *)theEvent;
+- (void)rightMouseDragged:(NSEvent *)theEvent;
+- (void)otherMouseDragged:(NSEvent *)theEvent;
+- (void)scrollWheel:(NSEvent *)theEvent;
+- (BOOL)handleKeyDown:(NSEvent *)theEvent;
+- (void)keyDown:(NSEvent *)theEvent;
+- (void)keyUp:(NSEvent *)theEvent;
+- (void)flagsChanged:(NSEvent *)theEvent;
+- (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)sender;
+- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender;
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
+- (void)draggingExited:(id < NSDraggingInfo >)sender;
+- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal;
+@end
+
+@implementation FLView
+- (id)init
+{
+  self = [super init];
+  if (self) {
+    next_compose_length = -1;
+    in_key_event = false;
+    }
+  return self;
+}
+- (void)drawRect:(NSRect)rect
+{
+  fl_lock_function();
+  FLWindow *cw = (FLWindow*)[self window];
+  fltk3::Window *w = [cw getFl_Window];
+  handleUpdateEvent(w);
+  fl_unlock_function();
+}
+
+- (BOOL)acceptsFirstResponder
+{   
+  return YES;
+}
+- (BOOL)performKeyEquivalent:(NSEvent*)theEvent
+{   
+  //NSLog(@"performKeyEquivalent:");
+  return [self handleKeyDown:theEvent];
+}
+- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent
+{   
+  fltk3::Window *w = [(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::Window *first = fltk3::first_window();
+  return (first == w || !first->modal());
+}
+- (void)mouseUp:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)rightMouseUp:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)otherMouseUp:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)mouseDown:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)rightMouseDown:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)otherMouseDown:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)mouseMoved:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)mouseDragged:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)rightMouseDragged:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)otherMouseDragged:(NSEvent *)theEvent {
+  cocoaMouseHandler(theEvent);
+}
+- (void)scrollWheel:(NSEvent *)theEvent {
+  cocoaMouseWheelHandler(theEvent);
+}
+- (BOOL)handleKeyDown:(NSEvent *)theEvent {
+  //NSLog(@"handleKeyDown");
+  fl_lock_function();
+
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::first_window(window);
+
+  next_compose_length = -1;
+  // First let's process the raw key press
+  cocoaKeyboardHandler(theEvent);
+
+  unsigned int no_text_key = false;
+  static const unsigned int notext[] = { // keys that don't emit text
+    fltk3::BackSpaceKey, fltk3::PrintKey, fltk3::ScrollLockKey, fltk3::PauseKey,
+    fltk3::InsertKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::EndKey, fltk3::PageDownKey,
+    fltk3::LeftKey, fltk3::UpKey, fltk3::RightKey, fltk3::DownKey, 
+    fltk3::MenuKey, fltk3::NumLockKey, fltk3::HelpKey 
+  };
+  static const int count = sizeof(notext)/sizeof(int);
+  if (fltk3::e_keysym > fltk3::FKey && fltk3::e_keysym <= fltk3::FLastKey) no_text_key = true;
+  else for (int i=0; i < count; i++) {
+    if (notext[i] == fltk3::e_keysym) {
+      no_text_key = true;
+      break;
+    }
+  }
+  if (!no_text_key && !(fltk3::e_state & fltk3::META) ) {
+    // Don't send cmd-<key> to interpretKeyEvents because it beeps.
+    // Then we can let the OS have a stab at it and see if it thinks it
+    // should result in some text
+    NSText *edit = [[theEvent window]  fieldEditor:YES forObject:nil];
+    in_key_event = true;
+    [edit interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
+    in_key_event = false;
+  }
+  //NSLog(@"to text=%@ l=%d", [NSString stringWithUTF8String:fltk3::e_text], fltk3::e_length);
+  int handled = fltk3::handle(fltk3::KEYDOWN, window);
+  // We have to update this after fltk3::handle as it says what to do on the
+  // _next_ input
+  if (next_compose_length != -1)
+    fltk3::compose_state = next_compose_length;
+
+  fl_unlock_function();
+  return (handled ? YES : NO);
+}
+- (void)keyDown:(NSEvent *)theEvent {
+  //NSLog(@"keyDown: ");
+  [self handleKeyDown:theEvent];
+}
+- (void)keyUp:(NSEvent *)theEvent {
+  //NSLog(@"keyUp: ");
+  fl_lock_function();
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::first_window(window);
+  cocoaKeyboardHandler(theEvent);
+  NSString *s = [theEvent characters];
+  if ([s length] >= 1) [FLView prepareEtext:[s substringToIndex:1]];
+  fltk3::handle(fltk3::KEYUP,window);
+  fl_unlock_function();
+}
+- (void)flagsChanged:(NSEvent *)theEvent {
+  //NSLog(@"flagsChanged: ");
+  fl_lock_function();
+  static UInt32 prevMods = 0;
+  NSUInteger mods = [theEvent modifierFlags];
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  UInt32 tMods = prevMods ^ mods;
+  int sendEvent = 0;
+  if ( tMods )
+  {
+    unsigned short keycode = [theEvent keyCode];
+    fltk3::e_keysym = fltk3::e_original_keysym = macKeyLookUp[keycode & 0x7f];
+    if ( fltk3::e_keysym ) 
+      sendEvent = ( prevMods<mods ) ? fltk3::KEYBOARD : fltk3::KEYUP;
+    fltk3::e_length = 0;
+    fltk3::e_text = (char*)"";
+    prevMods = mods;
+  }
+  mods_to_e_state( mods );
+  while (window->parent()) window = window->window();
+  if (sendEvent) fltk3::handle(sendEvent,window);
+  fl_unlock_function();
+}
+- (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)sender
+{
+  fl_lock_function();
+  fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
+  update_e_xy_and_e_xy_root([self window]);
+  fl_dnd_target_window = target;
+  int ret = fltk3::handle( fltk3::DND_ENTER, target );
+  breakMacEventLoop();
+  fl_unlock_function();
+  return ret ? NSDragOperationCopy : NSDragOperationNone;
+}
+- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
+{
+  fl_lock_function();
+  fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
+  update_e_xy_and_e_xy_root([self window]);
+  fl_dnd_target_window = target;
+  int ret = fltk3::handle( fltk3::DND_DRAG, target );
+  breakMacEventLoop();
+  fl_unlock_function();
+  return ret ? NSDragOperationCopy : NSDragOperationNone;
+}
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender 
+{
+  static char *DragData = NULL;
+  fl_lock_function();
+  fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
+  if ( !fltk3::handle( fltk3::DND_RELEASE, target ) ) { 
+    breakMacEventLoop();
+    fl_unlock_function();
+    return NO;
+  }
+  NSPasteboard *pboard;
+  // NSDragOperation sourceDragMask;
+  // sourceDragMask = [sender draggingSourceOperationMask];
+  pboard = [sender draggingPasteboard];
+  update_e_xy_and_e_xy_root([self window]);
+  if (DragData) { free(DragData); DragData = NULL; }
+  if ( [[pboard types] containsObject:NSFilenamesPboardType] ) {
+    CFArrayRef files = (CFArrayRef)[pboard propertyListForType:NSFilenamesPboardType];
+    CFStringRef all = CFStringCreateByCombiningStrings(NULL, files, CFSTR("\n"));
+    int l = CFStringGetMaximumSizeForEncoding(CFStringGetLength(all), kCFStringEncodingUTF8);
+    DragData = (char *)malloc(l + 1);
+    CFStringGetCString(all, DragData, l + 1, kCFStringEncodingUTF8);
+    CFRelease(all);
+  }
+  else if ( [[pboard types] containsObject:NSStringPboardType] ) {
+    NSData *data = [pboard dataForType:NSStringPboardType];
+    DragData = (char *)malloc([data length] + 1);
+    [data getBytes:DragData];
+    DragData[[data length]] = 0;
+    convert_crlf(DragData, strlen(DragData));
+  }
+  else {
+    breakMacEventLoop();
+    fl_unlock_function();
+    return NO;
+  }
+  fltk3::e_text = DragData;
+  fltk3::e_length = strlen(DragData);
+  int old_event = fltk3::e_number;
+  fltk3::belowmouse()->handle(fltk3::e_number = fltk3::PASTE);
+  fltk3::e_number = old_event;
+  if (DragData) { free(DragData); DragData = NULL; }
+  fltk3::e_text = NULL;
+  fltk3::e_length = 0;
+  fl_dnd_target_window = NULL;
+  breakMacEventLoop();
+  fl_unlock_function();
+  return YES;
+}
+- (void)draggingExited:(id < NSDraggingInfo >)sender
+{
+  fl_lock_function();
+  if ( fl_dnd_target_window ) {
+    fltk3::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
+    fl_dnd_target_window = 0;
+  }
+  fl_unlock_function();
+}
+- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
+{
+  return NSDragOperationGeneric;
+}
+
++ (void)prepareEtext:(NSString*)aString {
+  // fills fltk3::e_text with UTF-8 encoded aString using an adequate memory allocation
+  static char *received_utf8 = NULL;
+  static int lreceived = 0;
+  char *p = (char*)[aString UTF8String];
+  int l = strlen(p);
+  if (l > 0) {
+    if (lreceived == 0) {
+      received_utf8 = (char*)malloc(l + 1);
+      lreceived = l;
+    }
+    else if (l > lreceived) {
+      received_utf8 = (char*)realloc(received_utf8, l + 1);
+      lreceived = l;
+    }
+    strcpy(received_utf8, p);
+    fltk3::e_text = received_utf8;
+  }
+  fltk3::e_length = l;
+}
+
+// These functions implement text input.
+// Only two-stroke character composition works at this point.
+// Needs much elaboration to fully support CJK text input,
+// but this is the way to go.
+- (void)doCommandBySelector:(SEL)aSelector {
+}
+
+- (void)insertText:(id)aString {
+  NSString *received;
+  if ([aString isKindOfClass:[NSAttributedString class]]) {
+    received = [(NSAttributedString*)aString string];
+  } else {
+    received = (NSString*)aString;
+  }
+  //NSLog(@"insertText: received=%@",received);
+
+  if (!in_key_event) fl_lock_function();
+  [FLView prepareEtext:received];
+  // We can get called outside of key events (e.g. from the character
+  // palette). Transform such actions to fltk3::PASTE events.
+  if (!in_key_event) {
+    fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
+    fltk3::handle(fltk3::PASTE, target);
+    // for some reason, the window does not redraw until the next mouse move or button push
+    // sending a 'redraw()' or 'awake()' does not solve the issue!
+    fltk3::flush();
+  }
+  if (!in_key_event) fl_unlock_function();
+}
+
+- (void)setMarkedText:(id)aString selectedRange:(NSRange)newSelection  {
+  NSString *received;
+  if (newSelection.location == 0) {
+    [self unmarkText];
+    return;
+  }
+  if ([aString isKindOfClass:[NSAttributedString class]]) {
+    received = [(NSAttributedString*)aString string];
+  } else {
+    received = (NSString*)aString;
+  }
+  //NSLog(@"setMarkedText: %@ %d %d",received,newSelection.location,newSelection.length);
+  // This code creates the OS X behaviour of seeing dead keys as things
+  // are being composed.
+  next_compose_length = newSelection.location;
+  [FLView prepareEtext:received];
+  //NSLog(@"fltk3::e_text=%@ fltk3::e_length=%d next_compose_length=%d", received, fltk3::e_length, next_compose_length);
+}
+
+- (void)unmarkText {
+  fl_lock_function();
+  fltk3::compose_state = 0;
+  fl_unlock_function();
+  //NSLog(@"unmarkText");
+}
+
+- (NSRange)selectedRange {
+  return NSMakeRange(NSNotFound, 0);
+}
+
+- (NSRange)markedRange {
+  //NSLog(@"markedRange ?");
+  return NSMakeRange(NSNotFound, fltk3::compose_state);
+}
+
+- (BOOL)hasMarkedText {
+  //NSLog(@"hasMarkedText %s", fltk3::compose_state > 0?"YES":"NO");
+  return (fltk3::compose_state > 0);
+}
+
+- (NSAttributedString *)attributedSubstringFromRange:(NSRange)aRange {
+  //NSLog(@"attributedSubstringFromRange: %d %d",aRange.location,aRange.length);
+  return nil;
+}
+
+- (NSArray *)validAttributesForMarkedText {
+  return nil;
+}
+
+- (NSRect)firstRectForCharacterRange:(NSRange)aRange {
+  NSRect glyphRect;
+  fl_lock_function();
+  fltk3::Widget *focus = fltk3::focus();
+  fltk3::Window *wfocus = focus->window();
+  while (wfocus->window()) wfocus = wfocus->window();
+  glyphRect.size.width = 0;
+  
+  if (dynamic_cast<fltk3::TextDisplay*>(focus) != NULL) {
+    int x, y;
+    fltk3::TextDisplay *current = (fltk3::TextDisplay*)focus;
+    current->position_to_xy( current->insert_position(), &x, &y );
+    glyphRect.origin.x = (CGFloat)x;
+    glyphRect.origin.y = (CGFloat)y + current->textsize();
+    glyphRect.size.height = current->textsize();
+  } else {
+    glyphRect.origin.x = focus->x();
+    glyphRect.origin.y = focus->y() + focus->h();
+    glyphRect.size.height = 12;
+  }
+  // Convert the rect to screen coordinates
+  glyphRect.origin.y = wfocus->h() - glyphRect.origin.y;
+  glyphRect.origin = [[self window] convertBaseToScreen:glyphRect.origin];
+  fl_unlock_function();
+  return glyphRect;
+}
+
+- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint {
+  return 0;
+}
+
+- (NSInteger)conversationIdentifier {
+  return (NSInteger)self;
+}
+
+@end
+
+
+/*
+ * go ahead, create that (sub)window
+ */
+void Fl_X::make(fltk3::Window* w)
+{
+  static int xyPos = 100;
+  if ( w->parent() ) {		// create a subwindow
+    fltk3::Group::current(0);
+    // our subwindow needs this structure to know about its clipping. 
+    Fl_X* x = new Fl_X;
+    x->subwindow = true;
+    x->other_xid = 0;
+    x->region = 0;
+    x->subRegion = 0;
+    x->cursor = fl_default_cursor;
+    x->gc = 0;			// stay 0 for Quickdraw; fill with CGContext for Quartz
+    fltk3::Window *win = w->window();
+    Fl_X *xo = Fl_X::i(win);
+    if (xo) {
+      x->xidNext = xo->xidChildren;
+      x->xidChildren = 0L;
+      xo->xidChildren = x;
+      x->xid = win->i->xid;
+      x->w = w; w->i = x;
+      x->wait_for_expose = 0;
+      {
+	Fl_X *z = xo->next;	// we don't want a subwindow in Fl_X::first
+	xo->next = x;
+	x->next = z;
+      }
+      int old_event = fltk3::e_number;
+      w->handle(fltk3::e_number = fltk3::SHOW);
+      fltk3::e_number = old_event;
+      w->redraw();		// force draw to happen
+    }
+    if (w->as_gl_window()) { // if creating a sub-GL-window
+      while (win->window()) win = win->window();
+      [(FLWindow*)Fl_X::i(win)->xid setContainsGLsubwindow:YES];
+    }
+    fl_show_iconic = 0;
+  }
+  else {			// create a desktop window
+    fltk3::Group::current(0);
+    fl_open_display();
+    NSInteger winlevel = NSNormalWindowLevel;
+    NSUInteger winstyle;
+    if (w->border()) winstyle = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask;
+    else winstyle = NSBorderlessWindowMask;
+    int xp = w->x();
+    int yp = w->y();
+    int wp = w->w();
+    int hp = w->h();
+    if (w->size_range_set) {
+      if ( w->minh != w->maxh || w->minw != w->maxw) {
+        winstyle |= NSResizableWindowMask;
+      }
+    } else {
+      if (w->resizable()) {
+        fltk3::Widget *o = w->resizable();
+        int minw = o->w(); if (minw > 100) minw = 100;
+        int minh = o->h(); if (minh > 100) minh = 100;
+        w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
+	winstyle |= NSResizableWindowMask;
+      } else {
+        w->size_range(w->w(), w->h(), w->w(), w->h());
+      }
+    }
+    int xwm = xp, ywm = yp, bt, bx, by;
+    
+    if (!fake_X_wm(w, xwm, ywm, bt, bx, by)) {
+      // menu windows and tooltips
+      if (w->modal()||w->tooltip_window()) {
+        winstyle = NSBorderlessWindowMask;
+        winlevel = NSModalPanelWindowLevel;
+      } else {
+        winstyle = NSBorderlessWindowMask;
+      }
+    } else if (w->modal()) {
+      winstyle &= ~NSMiniaturizableWindowMask;
+      // winstyle &= ~(NSResizableWindowMask | NSMiniaturizableWindowMask);
+      winlevel = NSModalPanelWindowLevel;
+    }
+    else if (w->non_modal()) {
+      winlevel = NSFloatingWindowLevel;
+    }
+    
+    if (by+bt) {
+      wp += 2*bx;
+      hp += 2*by+bt;
+    }
+    if (!(w->flags() & fltk3::Window::FORCE_POSITION)) {
+      // use the Carbon functions below for default window positioning
+      w->x(xyPos+fltk3::x());
+      w->y(xyPos+fltk3::y());
+      xyPos += 25;
+      if (xyPos>200) xyPos = 100;
+    } else {
+      if (!fltk3::grab()) {
+        xp = xwm; yp = ywm;
+        w->x(xp);w->y(yp);
+      }
+      xp -= bx;
+      yp -= by+bt;
+    }
+    
+    if (w->non_modal() && Fl_X::first /*&& !fl_disable_transient_for*/) {
+      // find some other window to be "transient for":
+      fltk3::Window* w = Fl_X::first->w;
+      while (w->parent()) w = w->window(); // todo: this code does not make any sense! (w!=w??)
+    }
+        
+    Fl_X* x = new Fl_X;
+    x->subwindow = false;
+    x->other_xid = 0; // room for doublebuffering image map. On OS X this is only used by overlay windows
+    x->region = 0;
+    x->subRegion = 0;
+    x->cursor = fl_default_cursor;
+    x->xidChildren = 0;
+    x->xidNext = 0;
+    x->gc = 0;
+	  
+    NSRect srect = [[NSScreen mainScreen] frame];
+    NSRect crect;
+    crect.origin.x = w->x(); 
+    crect.origin.y = srect.size.height - (w->y() + w->h());
+    crect.size.width=w->w(); 
+    crect.size.height=w->h();
+    FLWindow *cw = [[FLWindow alloc] initWithFl_W:w 
+				      contentRect:crect  
+					styleMask:winstyle];
+    [cw setHasShadow:YES];
+    [cw setAcceptsMouseMovedEvents:YES];
+    x->xid = cw;
+    FLView *myview = [[FLView alloc] init];
+    [cw setContentView:myview];
+    [cw setLevel:winlevel];
+    
+    q_set_window_title(cw, w->label(), w->iconlabel());
+    if (!(w->flags() & fltk3::Window::FORCE_POSITION)) {
+      if (w->modal()) {
+        [cw center];
+      } else if (w->non_modal()) {
+        [cw center];
+      } else {
+        static NSPoint delta = NSZeroPoint;
+        delta = [cw cascadeTopLeftFromPoint:delta];
+      }
+    }
+    if(w->menu_window()) { // make menu windows slightly transparent
+      [cw setAlphaValue:0.97];
+    }
+    x->w = w; w->i = x;
+    x->wait_for_expose = 1;
+    x->next = Fl_X::first;
+    Fl_X::first = x;
+    // Install DnD handlers 
+    [myview registerForDraggedTypes:[NSArray arrayWithObjects:
+                                     NSStringPboardType,  NSFilenamesPboardType, nil]];
+    if ( ! Fl_X::first->next ) {	
+      // if this is the first window, we need to bring the application to the front
+      ProcessSerialNumber psn = { 0, kCurrentProcess };
+      SetFrontProcess( &psn );
+    }
+    
+    if (w->size_range_set) w->size_range_();
+    
+    if ( w->border() || (!w->modal() && !w->tooltip_window()) ) {
+      fltk3::Tooltip::enter(0);
+    }
+    w->set_visible();
+    if ( w->border() || (!w->modal() && !w->tooltip_window()) ) fltk3::handle(fltk3::FOCUS, w);
+    fltk3::first_window(w);
+    [cw setDelegate:mydelegate];
+    if (fl_show_iconic) { 
+      fl_show_iconic = 0;
+      [cw miniaturize:nil];
+    } else {
+      [cw makeKeyAndOrderFront:nil];
+    }
+    
+    crect = [[cw contentView] frame];
+    w->w(int(crect.size.width));
+    w->h(int(crect.size.height));
+    crect = [cw frame];
+    w->x(int(crect.origin.x));
+    srect = [[cw screen] frame];
+    w->y(int(srect.size.height - (crect.origin.y + w->h())));
+    
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::SHOW);
+    fltk3::e_number = old_event;
+    
+    if (w->modal()) { fltk3::modal_ = w; fl_fix_focus(); }
+  }
+}
+
+
+/*
+ * Tell the OS what window sizes we want to allow
+ */
+void fltk3::Window::size_range_() {
+  int bx, by, bt;
+  get_window_frame_sizes(bx, by, bt);
+  size_range_set = 1;
+  NSSize minSize = { minw, minh + bt };
+  NSSize maxSize = { maxw?maxw:32000, maxh?maxh + bt:32000 };
+  if (i && i->xid) {
+    [(NSWindow*)i->xid setMinSize:minSize];
+    [(NSWindow*)i->xid setMaxSize:maxSize];
+  }
+}
+
+
+/*
+ * returns pointer to the filename, or null if name ends with ':'
+ */
+const char *fltk3::filename_name( const char *name ) 
+{
+  const char *p, *q;
+  if (!name) return (0);
+  for ( p = q = name ; *p ; ) {
+    if ( ( p[0] == ':' ) && ( p[1] == ':' ) ) {
+      q = p+2;
+      p++;
+    }
+    else if (p[0] == '/') {
+      q = p + 1;
+    }
+    p++;
+  }
+  return q;
+}
+
+
+/*
+ * set the window title bar name
+ */
+void fltk3::Window::label(const char *name, const char *mininame) {
+  fltk3::Widget::label(name);
+  iconlabel_ = mininame;
+  if (shown() || i) {
+    NSWindow* nsw = (NSWindow*)i->xid;
+    q_set_window_title(nsw, name, mininame);
+  }
+}
+
+
+/*
+ * make a window visible
+ */
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
+    labeltype(fltk3::NORMAL_LABEL);
+    align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
+  } else {
+    labeltype(fltk3::NO_LABEL);
+  }
+  fltk3::Tooltip::exit(this);
+  if (!shown() || !i) {
+    Fl_X::make(this);
+  } else {
+    if ( !parent() ) {
+      if ([(NSWindow*)i->xid isMiniaturized]) {
+	i->w->redraw();
+	[(NSWindow*)i->xid deminiaturize:nil];
+      }
+      if (!fl_capture) {
+	[(NSWindow*)i->xid makeKeyAndOrderFront:nil];
+      }
+    }
+  }
+}
+
+
+/*
+ * resize a window
+ */
+void fltk3::Window::resize(int X,int Y,int W,int H) {
+  if (W<=0) W = 1; // OS X does not like zero width windows
+  if (H<=0) H = 1;
+  int is_a_resize = (W != w() || H != h());
+  //  printf("fltk3::Window::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
+  //         X, Y, W, H, is_a_resize, resize_from_system, this);
+  if (X != x() || Y != y()) set_flag(FORCE_POSITION);
+  else if (!is_a_resize) return;
+  if ( (resize_from_system!=this) && (!parent()) && shown()) {
+    if (is_a_resize) {
+      if (resizable()) {
+        if (W<minw) minw = W; // user request for resize takes priority
+        if (maxw && W>maxw) maxw = W; // over a previously set size_range
+        if (H<minh) minh = H;
+        if (maxh && H>maxh) maxh = H;
+        size_range(minw, minh, maxw, maxh);
+      } else {
+        size_range(W, H, W, H);
+      }
+      int bx, by, bt;
+      if ( ! this->border() ) bt = 0;
+      else get_window_frame_sizes(bx, by, bt);
+      NSRect dim;
+      dim.origin.x = X;
+      dim.origin.y = [[(NSWindow*)i->xid screen] frame].size.height - (Y + H);
+      dim.size.width = W;
+      dim.size.height = H + bt;
+      [(NSWindow*)i->xid setFrame:dim display:YES];
+    } else {
+      NSPoint pt; 
+      pt.x = X; 
+      pt.y = [[(NSWindow*)i->xid screen] frame].size.height - (Y + h());
+      [(NSWindow*)i->xid setFrameOrigin:pt];
+    }
+  }
+  resize_from_system = 0;
+  if (is_a_resize) {
+    fltk3::Group::resize(X,Y,W,H);
+    if (shown()) { 
+      redraw(); 
+    }
+  } else {
+    x(X); y(Y); 
+  }
+}
+
+
+/*
+ * make all drawing go into this window (called by subclass flush() impl.)
+ */
+void fltk3::Window::make_current() 
+{
+  Fl_X::q_release_context();
+  fl_window = i->xid;
+  current_ = this;
+  
+  int xp = 0, yp = 0;
+  fltk3::Window *win = this;
+  while ( win ) {
+    if ( !win->window() )
+      break;
+    xp += win->x();
+    yp += win->y();
+    win = (fltk3::Window*)win->window();
+  }
+  
+  NSView *current_focus = [NSView focusView]; 
+  // sometimes current_focus is set to a non-FLTK view: don't touch that
+  if ( [current_focus isKindOfClass:[FLView class]] ) [current_focus unlockFocus];
+  [[(NSWindow*)i->xid contentView]  lockFocus];
+  i->gc = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+  fl_gc = i->gc;
+  fltk3::Region fl_window_region = XRectangleRegion(0,0,w(),h());
+  if ( ! this->window() ) {
+    for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext ) {	// clip-out all sub-windows
+      fltk3::Window *cw = cx->w;
+      fltk3::Region from = fl_window_region;
+      fl_window_region = MacRegionMinusRect(from, cw->x(), cw->y(), cw->w(), cw->h() );
+      XDestroyRegion(from);
+    }
+  }
+  
+  // antialiasing must be deactivated because it applies to rectangles too
+  // and escapes even clipping!!!
+  // it gets activated when needed (e.g., draw text)
+  CGContextSetShouldAntialias(fl_gc, false);  
+  CGFloat hgt = [[(NSWindow*)fl_window contentView] frame].size.height;
+  CGContextTranslateCTM(fl_gc, 0.5, hgt-0.5f);
+  CGContextScaleCTM(fl_gc, 1.0f, -1.0f); // now 0,0 is top-left point of the window
+  win = this;
+  while(win && win->window()) { // translate to subwindow origin if this is a subwindow context
+    CGContextTranslateCTM(fl_gc, win->x(), win->y());
+    win = win->window();
+  }
+  //apply window's clip
+  CGContextClipToRects(fl_gc, fl_window_region->rects, fl_window_region->count );
+  XDestroyRegion(fl_window_region);
+// this is the context with origin at top left of (sub)window clipped out of its subwindows if any
+  CGContextSaveGState(fl_gc); 
+#if defined(FLTK_USE_CAIRO)
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+#endif
+  fltk3::clip_region( 0 );
+  
+#if defined(FLTK_USE_CAIRO)
+  // update the cairo_t context
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this);
+#endif
+}
+
+// helper function to manage the current CGContext fl_gc
+extern void fl_quartz_restore_line_style_();
+
+// FLTK has only one global graphics state. This function copies the FLTK state into the
+// current Quartz context
+void Fl_X::q_fill_context() {
+  if (!fl_gc) return;
+  if ( ! fl_window) { // a bitmap context
+    size_t hgt = CGBitmapContextGetHeight(fl_gc);
+    CGContextTranslateCTM(fl_gc, 0.5, hgt-0.5f);
+    CGContextScaleCTM(fl_gc, 1.0f, -1.0f); // now 0,0 is top-left point of the context
+    }
+  fltk3::color(fltk3::graphics_driver->color());
+  fl_quartz_restore_line_style_();
+}
+
+// The only way to reset clipping to its original state is to pop the current graphics
+// state and restore the global state.
+void Fl_X::q_clear_clipping() {
+  if (!fl_gc) return;
+  CGContextRestoreGState(fl_gc);
+  CGContextSaveGState(fl_gc);
+}
+
+// Give the Quartz context back to the system
+void Fl_X::q_release_context(Fl_X *x) {
+  if (x && x->gc!=fl_gc) return;
+  if (!fl_gc) return;
+  CGContextRestoreGState(fl_gc); // matches the CGContextSaveGState of make_current
+  fl_gc = 0;
+#if defined(FLTK_USE_CAIRO)
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0); // capture gc changes automatically to update the cairo context adequately
+#endif
+}
+
+void Fl_X::q_begin_image(CGRect &rect, int cx, int cy, int w, int h) {
+  CGContextSaveGState(fl_gc);
+  CGRect r2 = rect;
+  r2.origin.x -= 0.5f;
+  r2.origin.y -= 0.5f;
+  CGContextClipToRect(fl_gc, r2);
+  // move graphics context to origin of vertically reversed image 
+  CGContextTranslateCTM(fl_gc, rect.origin.x - cx - 0.5, rect.origin.y - cy + h - 0.5);
+  CGContextScaleCTM(fl_gc, 1, -1);
+  rect.origin.x = rect.origin.y = 0;
+  rect.size.width = w;
+  rect.size.height = h;
+}
+
+void Fl_X::q_end_image() {
+  CGContextRestoreGState(fl_gc);
+}
+
+
+////////////////////////////////////////////////////////////////
+// Copy & Paste fltk implementation.
+////////////////////////////////////////////////////////////////
+
+static void convert_crlf(char * s, size_t len)
+{
+  // turn all \r characters into \n:
+  for (size_t x = 0; x < len; x++) if (s[x] == '\r') s[x] = '\n';
+}
+
+// fltk 1.3 clipboard support constant definitions:
+const CFStringRef	flavorNames[] = {
+  CFSTR("public.utf16-plain-text"), 
+  CFSTR("public.utf8-plain-text"),
+  CFSTR("com.apple.traditional-mac-plain-text") };
+const CFStringEncoding encodings[] = { 
+  kCFStringEncodingUnicode, 
+  kCFStringEncodingUTF8, 
+  kCFStringEncodingMacRoman};
+const size_t handledFlavorsCount = sizeof(encodings)/sizeof(CFStringEncoding);
+
+// clipboard variables definitions :
+char *fl_selection_buffer[2];
+int fl_selection_length[2];
+static int fl_selection_buffer_length[2];
+
+static PasteboardRef myPasteboard = 0;
+static void allocatePasteboard() {
+  if (!myPasteboard)
+    PasteboardCreate(kPasteboardClipboard, &myPasteboard);
+}
+
+
+/*
+ * create a selection
+ * owner: widget that created the selection
+ * stuff: pointer to selected data
+ * size of selected data
+ */
+void fltk3::copy(const char *stuff, int len, int clipboard) {
+  if (!stuff || len<0) return;
+  if (len+1 > fl_selection_buffer_length[clipboard]) {
+    delete[] fl_selection_buffer[clipboard];
+    fl_selection_buffer[clipboard] = new char[len+100];
+    fl_selection_buffer_length[clipboard] = len+100;
+  }
+  memcpy(fl_selection_buffer[clipboard], stuff, len);
+  fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
+  fl_selection_length[clipboard] = len;
+  if (clipboard) {
+    allocatePasteboard();
+    OSStatus err = PasteboardClear(myPasteboard);
+    if (err!=noErr) return; // clear did not work, maybe not owner of clipboard.
+    PasteboardSynchronize(myPasteboard);
+    CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[1], len);
+    if (text==NULL) return; // there was a pb creating the object, abort.
+    err=PasteboardPutItemFlavor(myPasteboard, (PasteboardItemID)1, CFSTR("public.utf8-plain-text"), text, 0);
+    CFRelease(text);
+  }
+}
+
+// Call this when a "paste" operation happens:
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
+  if (clipboard) {
+    // see if we own the selection, if not go get it:
+    fl_selection_length[1] = 0;
+    OSStatus err = noErr;
+    Boolean found = false;
+    CFDataRef flavorData = NULL;
+    CFStringEncoding encoding = 0;
+    
+    allocatePasteboard();
+    PasteboardSynchronize(myPasteboard);
+    ItemCount nFlavor = 0, i, j;
+    err = PasteboardGetItemCount(myPasteboard, &nFlavor);
+    if (err==noErr) {
+      for (i=1; i<=nFlavor; i++) {
+        PasteboardItemID itemID = 0;
+        CFArrayRef flavorTypeArray = NULL;
+        found = false;
+        err = PasteboardGetItemIdentifier(myPasteboard, i, &itemID);
+        if (err!=noErr) continue;
+        err = PasteboardCopyItemFlavors(myPasteboard, itemID, &flavorTypeArray);
+        if (err!=noErr) {
+          if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
+          continue;
+        }
+        CFIndex flavorCount = CFArrayGetCount(flavorTypeArray);
+        for (j = 0; j < handledFlavorsCount; j++) {
+          for (CFIndex flavorIndex=0; flavorIndex<flavorCount; flavorIndex++) {
+            CFStringRef flavorType = (CFStringRef)CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex);
+            if (UTTypeConformsTo(flavorType, flavorNames[j])) {
+              err = PasteboardCopyItemFlavorData( myPasteboard, itemID, flavorNames[j], &flavorData );
+              if (err != noErr) continue;
+              encoding = encodings[j];
+              found = true;
+              break;
+            }
+          }
+          if (found) break;
+        }
+        if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
+        if (found) break;
+      }
+      if (found) {
+        CFIndex len = CFDataGetLength(flavorData);
+        CFStringRef mycfs = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(flavorData), len, encoding, false);
+        CFRelease(flavorData);
+        len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(mycfs), kCFStringEncodingUTF8) + 1;
+        if ( len >= fl_selection_buffer_length[1] ) {
+          fl_selection_buffer_length[1] = len;
+          delete[] fl_selection_buffer[1];
+          fl_selection_buffer[1] = new char[len];
+        }
+        CFStringGetCString(mycfs, fl_selection_buffer[1], len, kCFStringEncodingUTF8);
+        CFRelease(mycfs);
+        len = strlen(fl_selection_buffer[1]);
+        fl_selection_length[1] = len;
+        convert_crlf(fl_selection_buffer[1],len); // turn all \r characters into \n:
+      }
+    }
+  }
+  fltk3::e_text = fl_selection_buffer[clipboard];
+  fltk3::e_length = fl_selection_length[clipboard];
+  if (!fltk3::e_text) fltk3::e_text = (char *)"";
+  receiver.handle(fltk3::PASTE);
+}
+
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void* data)
+{
+  // check, if this timer slot exists already
+  for (int i = 0; i < mac_timer_used; ++i) {
+    MacTimeout& t = mac_timers[i];
+    // if so, simply change the fire interval
+    if (t.callback == cb  &&  t.data == data) {
+      CFRunLoopTimerSetNextFireDate(t.timer, CFAbsoluteTimeGetCurrent() + time );
+      t.pending = 1;
+      return;
+    }
+  }
+  // no existing timer to use. Create a new one:
+  int timer_id = -1;
+  // find an empty slot in the timer array
+  for (int i = 0; i < mac_timer_used; ++i) {
+    if ( !mac_timers[i].timer ) {
+      timer_id = i;
+      break;
+    }
+  }
+  // if there was no empty slot, append a new timer
+  if (timer_id == -1) {
+    // make space if needed
+    if (mac_timer_used == mac_timer_alloc) {
+      realloc_timers();
+    }
+    timer_id = mac_timer_used++;
+  }
+  // now install a brand new timer
+  MacTimeout& t = mac_timers[timer_id];
+  CFRunLoopTimerContext context = {0, data, NULL,NULL,NULL};
+  CFRunLoopTimerRef timerRef = CFRunLoopTimerCreate(kCFAllocatorDefault, 
+						    CFAbsoluteTimeGetCurrent() + time,
+						    1E30,  
+						    0,
+						    0,
+						    do_timer,
+						    &context
+						    );
+  if (timerRef) {
+    CFRunLoopAddTimer(CFRunLoopGetCurrent(),
+		      timerRef,
+		      kCFRunLoopDefaultMode);
+    t.callback = cb;
+    t.data     = data;
+    t.timer    = timerRef;
+    t.pending  = 1;
+  }
+}
+
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void* data)
+{
+  // currently, repeat_timeout does not subtract the trigger time of the previous timer event as it should.
+  add_timeout(time, cb, data);
+}
+
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void* data)
+{
+  for (int i = 0; i < mac_timer_used; ++i) {
+    MacTimeout& t = mac_timers[i];
+    if (t.callback == cb  &&  t.data == data && t.pending) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void* data)
+{
+  for (int i = 0; i < mac_timer_used; ++i) {
+    MacTimeout& t = mac_timers[i];
+    if (t.callback == cb  && ( t.data == data || data == NULL)) {
+      delete_timer(t);
+    }
+  }
+}
+
+int Fl_X::unlink(Fl_X *start) {
+  if (start) {
+    Fl_X *pc = start;
+    while (pc) {
+      if (pc->xidNext == this) {
+        pc->xidNext = xidNext;
+        return 1;
+      }
+      if (pc->xidChildren) {
+        if (pc->xidChildren == this) {
+          pc->xidChildren = xidNext;
+          return 1;
+        }
+        if (unlink(pc->xidChildren))
+          return 1;
+      }
+      pc = pc->xidNext;
+    }
+  } else {
+    for ( Fl_X *pc = Fl_X::first; pc; pc = pc->next ) {
+      if (unlink(pc))
+        return 1;
+    }
+  }  
+  return 0;
+}
+
+void Fl_X::relink(fltk3::Window *w, fltk3::Window *wp) {
+  Fl_X *x = Fl_X::i(w);
+  Fl_X *p = Fl_X::i(wp);
+  if (!x || !p) return;
+  // first, check if 'x' is already registered as a child of 'p'
+  for (Fl_X *i = p->xidChildren; i; i=i->xidNext) {
+    if (i == x) return;
+  }
+  // now add 'x' as the first child of 'p'
+  x->xidNext = p->xidChildren;
+  p->xidChildren = x;
+}
+
+void Fl_X::destroy() {
+  // subwindows share their xid with their parent window, so should not close it
+  if (!subwindow && w && !w->parent() && xid) {
+    [[(NSWindow *)xid contentView] release];
+    [(NSWindow *)xid close];
+  }
+}
+
+void Fl_X::map() {
+  if (w && xid) {
+    [(NSWindow *)xid orderFront:nil];
+  }
+  //+ link to window list
+  if (w && w->parent()) {
+    Fl_X::relink(w, w->window() );
+    w->redraw();
+  }
+}
+
+void Fl_X::unmap() {
+  if (w && !w->parent() && xid) {
+    [(NSWindow *)xid orderOut:nil];
+  }
+  if (w && Fl_X::i(w)) 
+    Fl_X::i(w)->unlink();
+}
+
+
+// removes x,y,w,h rectangle from region r and returns result as a new fltk3::Region
+static fltk3::Region MacRegionMinusRect(fltk3::Region r, int x,int y,int w,int h)
+{
+  fltk3::Region outr = (fltk3::Region)malloc(sizeof(*outr));
+  outr->rects = (CGRect*)malloc(4 * r->count * sizeof(CGRect));
+  outr->count = 0;
+  CGRect rect = fl_cgrectmake_cocoa(x, y, w, h);
+  for( int i = 0; i < r->count; i++) {
+    CGRect A = r->rects[i];
+    CGRect test = CGRectIntersection(A, rect);
+    if (CGRectIsEmpty(test)) {
+      outr->rects[(outr->count)++] = A;
+    }
+    else {
+      const CGFloat verylarge = 100000.;
+      CGRect side = CGRectMake(0,0,rect.origin.x,verylarge);// W side
+      test = CGRectIntersection(A, side);
+      if ( ! CGRectIsEmpty(test)) {
+        outr->rects[(outr->count)++] = test;
+      }
+      side = CGRectMake(0,rect.origin.y + rect.size.height,verylarge,verylarge);// N side
+      test = CGRectIntersection(A, side);
+      if ( ! CGRectIsEmpty(test)) {
+        outr->rects[(outr->count)++] = test;
+      }
+      side = CGRectMake(rect.origin.x + rect.size.width, 0, verylarge, verylarge);// E side
+      test = CGRectIntersection(A, side);
+      if ( ! CGRectIsEmpty(test)) {
+        outr->rects[(outr->count)++] = test;
+      }
+      side = CGRectMake(0, 0, verylarge, rect.origin.y);// S side
+      test = CGRectIntersection(A, side);
+      if ( ! CGRectIsEmpty(test)) {
+        outr->rects[(outr->count)++] = test;
+      }
+    }
+  }
+  if (outr->count == 0) {
+    free(outr->rects);
+    free(outr);
+    outr = XRectangleRegion(0,0,0,0);
+  }
+  else outr->rects = (CGRect*)realloc(outr->rects, outr->count * sizeof(CGRect));
+  return outr;
+}
+
+// intersects current and x,y,w,h rectangle and returns result as a new fltk3::Region
+fltk3::Region Fl_X::intersect_region_and_rect(fltk3::Region current, int x,int y,int w, int h)
+{
+  if (current == NULL) return XRectangleRegion(x,y,w,h);
+  CGRect r = fl_cgrectmake_cocoa(x, y, w, h);
+  fltk3::Region outr = (fltk3::Region)malloc(sizeof(*outr));
+  outr->count = current->count;
+  outr->rects =(CGRect*)malloc(outr->count * sizeof(CGRect));
+  int j = 0;
+  for(int i = 0; i < current->count; i++) {
+    CGRect test = CGRectIntersection(current->rects[i], r);
+    if (!CGRectIsEmpty(test)) outr->rects[j++] = test;
+  }
+  if (j) {
+    outr->count = j;
+    outr->rects = (CGRect*)realloc(outr->rects, outr->count * sizeof(CGRect));
+  }
+  else {
+    XDestroyRegion(outr);
+    outr = XRectangleRegion(0,0,0,0);
+  }
+  return outr;
+}
+
+void Fl_X::collapse() {
+  [(NSWindow *)xid miniaturize:nil];
+}
+
+static NSImage *CGBitmapContextToNSImage(CGContextRef c)
+// the returned NSImage is autoreleased
+{
+  unsigned char *pdata = (unsigned char *)CGBitmapContextGetData(c);
+  NSBitmapImageRep *imagerep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&pdata
+                                                                       pixelsWide:CGBitmapContextGetWidth(c)
+                                                                       pixelsHigh:CGBitmapContextGetHeight(c)
+                                                                    bitsPerSample:8
+                                                                  samplesPerPixel:4
+                                                                         hasAlpha:YES
+                                                                         isPlanar:NO
+                                                                   colorSpaceName:NSDeviceRGBColorSpace
+                                                                      bytesPerRow:CGBitmapContextGetBytesPerRow(c)
+                                                                     bitsPerPixel:CGBitmapContextGetBitsPerPixel(c)];
+  NSImage* image = [[NSImage alloc] initWithData: [imagerep TIFFRepresentation]];
+  [imagerep release];
+  return [image autorelease];
+}
+
+static NSCursor *PrepareCursor(NSCursor *cursor, CGContextRef (*f)() )
+{
+  if (cursor == nil) {
+    CGContextRef c = f();
+    NSImage *image = CGBitmapContextToNSImage(c);
+    fl_delete_offscreen( (fltk3::Offscreen)c ); 
+    NSPoint pt = {[image size].width/2, [image size].height/2};
+    cursor = [[NSCursor alloc] initWithImage:image hotSpot:pt];
+  }
+  return cursor;
+}
+
+void Fl_X::set_cursor(fltk3::Cursor c)
+{
+  NSCursor *icrsr;
+  switch (c) {
+    case fltk3::CURSOR_CROSS:  icrsr = [NSCursor crosshairCursor]; break;
+    case fltk3::CURSOR_WAIT:
+      static NSCursor *watch = nil;
+      watch = PrepareCursor(watch,  &Fl_X::watch_cursor_image);
+      icrsr = watch;
+      break;
+    case fltk3::CURSOR_INSERT: icrsr = [NSCursor IBeamCursor]; break;
+    case fltk3::CURSOR_N:      icrsr = [NSCursor resizeUpCursor]; break;
+    case fltk3::CURSOR_S:      icrsr = [NSCursor resizeDownCursor]; break;
+    case fltk3::CURSOR_NS:     icrsr = [NSCursor resizeUpDownCursor]; break;
+    case fltk3::CURSOR_HELP:   
+      static NSCursor *help = nil;
+      help = PrepareCursor(help,  &Fl_X::help_cursor_image);
+      icrsr = help;
+      break;
+    case fltk3::CURSOR_HAND:   icrsr = [NSCursor pointingHandCursor]; break;
+    case fltk3::CURSOR_MOVE:   icrsr = [NSCursor openHandCursor]; break;
+    case fltk3::CURSOR_NE:
+    case fltk3::CURSOR_SW:
+    case fltk3::CURSOR_NESW:   
+      static NSCursor *nesw = nil;
+      nesw = PrepareCursor(nesw,  &Fl_X::nesw_cursor_image);
+      icrsr = nesw;
+      break;
+    case fltk3::CURSOR_E:      icrsr = [NSCursor resizeRightCursor]; break;
+    case fltk3::CURSOR_W:      icrsr = [NSCursor resizeLeftCursor]; break;
+    case fltk3::CURSOR_WE:     icrsr = [NSCursor resizeLeftRightCursor]; break;
+    case fltk3::CURSOR_SE:
+    case fltk3::CURSOR_NW:
+    case fltk3::CURSOR_NWSE:   
+      static NSCursor *nwse = nil;
+      nwse = PrepareCursor(nwse,  &Fl_X::nwse_cursor_image);
+      icrsr = nwse;
+      break;
+    case fltk3::CURSOR_NONE:   
+      static NSCursor *none = nil;
+      none = PrepareCursor(none,  &Fl_X::none_cursor_image);
+      icrsr = none; 
+      break;
+    case fltk3::CURSOR_ARROW:
+    case fltk3::CURSOR_DEFAULT:
+    default:			   icrsr = [NSCursor arrowCursor];
+      break;
+  }
+  [icrsr set];
+  cursor = icrsr;
+}
+
+@interface FLaboutItemTarget : NSObject 
+{
+}
+- (void)showPanel;
+- (void)printPanel;
+@end
+@implementation FLaboutItemTarget
+- (void)showPanel
+{
+  NSDictionary *options;
+  options = [NSDictionary dictionaryWithObjectsAndKeys:
+             [[[NSAttributedString alloc] 
+               initWithString:[NSString stringWithFormat:@" GUI with FLTK %d.%d", 
+                               FL_MAJOR_VERSION, FL_MINOR_VERSION ]] autorelease], @"Credits",
+             nil];
+  [NSApp orderFrontStandardAboutPanelWithOptions:options];
+}
+//#include <fltk3/PostScript.h>
+- (void)printPanel
+{
+  fltk3::Printer printer;
+  //fltk3::PostScriptFileDevice printer;
+  int w, h, ww, wh;
+  fltk3::Window *win = fltk3::first_window();
+  if(!win) return;
+  if( printer.start_job(1) ) return;
+  if( printer.start_page() ) return;
+  fl_lock_function();
+  // scale the printer device so that the window fits on the page
+  float scale = 1;
+  printer.printable_rect(&w, &h);
+  ww = win->decorated_w();
+  wh = win->decorated_h();
+  if (ww>w || wh>h) {
+    scale = (float)w/win->w();
+    if ((float)h/wh < scale) scale = (float)h/wh;
+    printer.scale(scale);
+  }
+//#define ROTATE 1
+#ifdef ROTATE
+  printer.scale(scale * 0.8, scale * 0.8);
+  printer.printable_rect(&w, &h);
+  printer.origin(w/2, h/2 );
+  printer.rotate(20.);
+  printer.print_window( win, - win->w()/2, - win->h()/2 );
+#else
+  printer.print_window(win);
+#endif
+  printer.end_page();
+  printer.end_job();
+  fl_unlock_function();
+}
+@end
+
+static void createAppleMenu(void)
+{
+  static BOOL donethat = NO;
+  if (donethat) return;
+  donethat = YES;
+  NSMenu *mainmenu, *services, *appleMenu;
+  NSMenuItem *menuItem;
+  NSString *title;
+
+  NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
+  if (nsappname == nil)
+    nsappname = [[NSProcessInfo processInfo] processName];
+  appleMenu = [[NSMenu alloc] initWithTitle:@""];
+  /* Add menu items */
+  title = [[NSString stringWithUTF8String:Fl_Mac_App_Menu::about] stringByAppendingString:nsappname];
+  menuItem = [appleMenu addItemWithTitle:title action:@selector(showPanel) keyEquivalent:@""];
+  FLaboutItemTarget *about = [[FLaboutItemTarget alloc] init];
+  [menuItem setTarget:about];
+  [appleMenu addItem:[NSMenuItem separatorItem]];
+  // Print front window
+  if (strlen(Fl_Mac_App_Menu::print) > 0) {
+    menuItem = [appleMenu 
+		addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::print] 
+		action:@selector(printPanel) 
+		keyEquivalent:@""];
+    [menuItem setTarget:about];
+    [appleMenu setAutoenablesItems:NO];
+    [menuItem setEnabled:YES];
+    [appleMenu addItem:[NSMenuItem separatorItem]];
+    }
+  // Services Menu
+  services = [[NSMenu alloc] init];
+  menuItem = [appleMenu 
+	      addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::services] 
+	      action:nil 
+	      keyEquivalent:@""];
+  [appleMenu setSubmenu:services forItem:menuItem];
+  [appleMenu addItem:[NSMenuItem separatorItem]];
+  // Hide AppName
+  title = [[NSString stringWithUTF8String:Fl_Mac_App_Menu::hide] stringByAppendingString:nsappname];
+  [appleMenu addItemWithTitle:title 
+		       action:@selector(hide:) 
+		keyEquivalent:@"h"];
+  // Hide Others
+  menuItem = [appleMenu 
+	      addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::hide_others] 
+	      action:@selector(hideOtherApplications:) 
+	      keyEquivalent:@"h"];
+  [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+  // Show All
+  [appleMenu addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::show] 
+		       action:@selector(unhideAllApplications:) keyEquivalent:@""];
+  [appleMenu addItem:[NSMenuItem separatorItem]];
+  // Quit AppName
+  title = [[NSString stringWithUTF8String:Fl_Mac_App_Menu::quit] 
+	   stringByAppendingString:nsappname];
+  [appleMenu addItemWithTitle:title 
+		       action:@selector(terminate:) 
+		keyEquivalent:@"q"];
+  /* Put menu into the menubar */
+  menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+  [menuItem setSubmenu:appleMenu];
+  mainmenu = [[NSMenu alloc] initWithTitle:@""];
+  [mainmenu addItem:menuItem];
+  if (fl_mac_os_version < 100600) {
+    //	[NSApp setAppleMenu:appleMenu];
+    //	to avoid compiler warning raised by use of undocumented setAppleMenu	:
+    [NSApp performSelector:@selector(setAppleMenu:) withObject:appleMenu];
+  }
+  [NSApp setServicesMenu:services];
+  [NSApp setMainMenu:mainmenu];
+  [services release];
+  [mainmenu release];
+  [appleMenu release];
+  [menuItem release];
+}
+
+@interface FLMenuItem : NSMenuItem {
+}
+- (void) doCallback:(id)unused;
+- (void) directCallback:(id)unused;
+@end
+@implementation FLMenuItem
+- (void) doCallback:(id)unused
+{
+  fl_lock_function();
+  int flRank = [self tag];
+  const fltk3::MenuItem *items = fltk3::sys_menu_bar->fltk3::Menu_::menu();
+  const fltk3::MenuItem *item = items + flRank;
+  if (item) {
+    fltk3::sys_menu_bar->picked(item);
+    if ( item->flags & fltk3::MENU_TOGGLE ) {	// update the menu toggle symbol
+      [self setState:(item->value() ? NSOnState : NSOffState)];
+    }
+    else if ( item->flags & fltk3::MENU_RADIO ) {	// update the menu radio symbols
+      int from = flRank;
+      while( from > 0 && items[from - 1].label() && (items[from - 1].flags & fltk3::MENU_RADIO) &&
+            !(items[from - 1].flags & fltk3::MENU_DIVIDER) ) {
+        from--;
+      }
+      int to = flRank;
+      while( !(items[to].flags & fltk3::MENU_DIVIDER) && items[to + 1].label() && 
+            (items[to + 1].flags & fltk3::MENU_RADIO) ) {
+        to++;
+      }
+      NSMenu *nsmenu = [self menu];
+      int nsrank = (int)[nsmenu indexOfItem:self];
+      for(int i =  from - flRank + nsrank ; i <= to - flRank + nsrank; i++) {
+        NSMenuItem *nsitem = [nsmenu itemAtIndex:i];
+        if (nsitem != self) [nsitem setState:NSOffState];
+        else [nsitem setState:(item->value() ? NSOnState : NSOffState) ];
+      }
+    }
+  }
+  fl_unlock_function();
+}
+- (void) directCallback:(id)unused
+{
+  fl_lock_function();
+  fltk3::MenuItem *item = (fltk3::MenuItem *)[(NSData*)[self representedObject] bytes];
+  if ( item && item->callback() ) item->do_callback(NULL);
+  fl_unlock_function();
+}
+@end
+
+void fl_mac_set_about( fltk3::Callback *cb, void *user_data, unsigned int shortcut) 
+{
+  fl_open_display();
+  fltk3::MenuItem aboutItem;
+  memset(&aboutItem, 0, sizeof(fltk3::MenuItem));
+  aboutItem.callback(cb);
+  aboutItem.user_data(user_data);
+  aboutItem.shortcut(shortcut);
+  NSMenu *appleMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu];
+  CFStringRef cfname = CFStringCreateCopy(NULL, (CFStringRef)[[appleMenu itemAtIndex:0] title]);
+  [appleMenu removeItemAtIndex:0];
+  FLMenuItem *item = [[[FLMenuItem alloc] initWithTitle:(NSString*)cfname 
+						 action:@selector(directCallback:) 
+					  keyEquivalent:@""] autorelease];
+  if (aboutItem.shortcut()) {
+    fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setKeyEquivalent, item, aboutItem.shortcut() & 0xff);
+    fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::setKeyEquivalentModifierMask, item, aboutItem.shortcut() );
+  }
+  NSData *pointer = [NSData dataWithBytes:&aboutItem length:sizeof(fltk3::MenuItem)];
+  [item setRepresentedObject:pointer];
+  [appleMenu insertItem:item atIndex:0];
+  CFRelease(cfname);
+  [item setTarget:item];
+}
+
+static char *remove_ampersand(const char *s)
+{
+  char *ret = strdup(s);
+  const char *p = s;
+  char *q = ret;
+  while(*p != 0) {
+    if (p[0]=='&') {
+      if (p[1]=='&') {
+        *q++ = '&'; p+=2;
+      } else {
+        p++;
+      }
+    } else {
+      *q++ = *p++;
+    }
+  }
+  *q = 0;
+  return ret;
+}
+
+void *fltk3::SysMenuBar::doMenuOrItemOperation(fltk3::SysMenuBar::menuOrItemOperation operation, ...)
+/* these operations apply to menus, submenus, or menu items
+ */
+{
+  NSAutoreleasePool *localPool;
+  localPool = [[NSAutoreleasePool alloc] init]; 
+  NSMenu *menu;
+  NSMenuItem *item;
+  int value;
+  void *pter;
+  void *retval = NULL;
+  va_list ap;
+  va_start(ap, operation);
+  
+  if (operation == fltk3::SysMenuBar::itemAtIndex) {	// arguments: NSMenu*, int. Returns the item
+    menu = va_arg(ap, NSMenu*);
+    value = va_arg(ap, int);
+    retval = (void *)[menu itemAtIndex:value];
+  }
+  else if (operation == fltk3::SysMenuBar::setKeyEquivalent) {	// arguments: NSMenuItem*, int
+    item = va_arg(ap, NSMenuItem*);
+    value = va_arg(ap, int);
+    char key = value;
+    NSString *equiv = [[NSString alloc] initWithBytes:&key length:1 encoding:NSASCIIStringEncoding];
+    [item setKeyEquivalent:equiv];
+    [equiv release];
+  }
+  else if (operation == fltk3::SysMenuBar::setKeyEquivalentModifierMask) {		// arguments: NSMenuItem*, int
+    item = va_arg(ap, NSMenuItem*);
+    value = va_arg(ap, int);
+    NSUInteger macMod = 0;
+    if ( value & fltk3::META ) macMod = NSCommandKeyMask;
+    if ( value & fltk3::SHIFT || isupper(value) ) macMod |= NSShiftKeyMask;
+    if ( value & fltk3::ALT ) macMod |= NSAlternateKeyMask;
+    if ( value & fltk3::CTRL ) macMod |= NSControlKeyMask;
+    [item setKeyEquivalentModifierMask:macMod];
+  }
+  else if (operation == fltk3::SysMenuBar::setState) {	// arguments: NSMenuItem*, int
+    item = va_arg(ap, NSMenuItem*);
+    value = va_arg(ap, int);
+    [item setState:(value ? NSOnState : NSOffState)];
+  }
+  else if (operation == fltk3::SysMenuBar::initWithTitle) {	// arguments: const char*title. Returns the newly created menu
+                                                                // creates a new (sub)menu
+    char *ts = remove_ampersand(va_arg(ap, char *));
+    CFStringRef title = CFStringCreateWithCString(NULL, ts, kCFStringEncodingUTF8);
+    free(ts);
+    NSMenu *menu = [[NSMenu alloc] initWithTitle:(NSString*)title];
+    CFRelease(title);
+    [menu setAutoenablesItems:NO];
+    retval = (void *)menu;
+  }
+  else if (operation == fltk3::SysMenuBar::numberOfItems) {	// arguments: NSMenu *menu, int *pcount
+                                                                // upon return, *pcount is set to menu's item count
+    menu = va_arg(ap, NSMenu*);
+    pter = va_arg(ap, void *);
+    *(int*)pter = [menu numberOfItems];
+  }
+  else if (operation == fltk3::SysMenuBar::setSubmenu) {		// arguments: NSMenuItem *item, NSMenu *menu
+                                                        	// sets 'menu' as submenu attached to 'item'
+    item = va_arg(ap, NSMenuItem*);
+    menu = va_arg(ap, NSMenu*);
+    [item setSubmenu:menu];
+    [menu release];
+  }
+  else if (operation == fltk3::SysMenuBar::setEnabled) {		// arguments: NSMenuItem*, int
+    item = va_arg(ap, NSMenuItem*);
+    value = va_arg(ap, int);
+    [item setEnabled:(value ? YES : NO)];
+  }
+  else if (operation == fltk3::SysMenuBar::addSeparatorItem) {	// arguments: NSMenu*
+    menu = va_arg(ap, NSMenu*);
+    [menu addItem:[NSMenuItem separatorItem]];
+  }
+  else if (operation == fltk3::SysMenuBar::setTitle) {		// arguments: NSMenuItem*, const char *
+    item = va_arg(ap, NSMenuItem*);
+    char *ts = remove_ampersand(va_arg(ap, char *));
+    CFStringRef title = CFStringCreateWithCString(NULL, ts, kCFStringEncodingUTF8);
+    free(ts);
+    [item setTitle:(NSString*)title];
+    CFRelease(title);
+  }
+  else if (operation == fltk3::SysMenuBar::removeItem) {		// arguments: NSMenu*, int
+    menu = va_arg(ap, NSMenu*);
+    value = va_arg(ap, int);
+    [menu removeItem:[menu itemAtIndex:value]];
+  }
+  else if (operation == fltk3::SysMenuBar::addNewItem) {		// arguments: NSMenu *menu, int flrank, int *prank
+    // creates a new menu item at the end of 'menu'
+    // attaches the item of rank flrank (counted in fltk3::Menu_) of fltk3::sys_menu_bar to it
+    // upon return, puts the rank (counted in NSMenu) of the new item in *prank unless prank is NULL
+    menu = va_arg(ap, NSMenu*);
+    int flRank = va_arg(ap, int);
+    char *name = remove_ampersand( (fltk3::sys_menu_bar->fltk3::Menu_::menu() + flRank)->label());
+    int *prank = va_arg(ap, int*);
+    CFStringRef cfname = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
+    free(name);
+    FLMenuItem *item = [[FLMenuItem alloc] initWithTitle:(NSString*)cfname 
+						  action:@selector(doCallback:) 
+					   keyEquivalent:@""];
+    [item setTag:flRank];
+    [menu addItem:item];
+    CFRelease(cfname);
+    [item setTarget:item];
+    if (prank != NULL) *prank = [menu indexOfItem:item];
+    [item release];
+  }
+  else if (operation == fltk3::SysMenuBar::renameItem) {		// arguments: int rank, const char *newname
+    // renames the system menu item numbered rank in fltk3::sys_menu_bar->menu()
+    int rank = va_arg(ap, int);
+    char *newname = remove_ampersand( va_arg(ap, const char *) );
+    int countmenus = [[NSApp mainMenu] numberOfItems];
+    bool found = NO;
+    NSMenuItem *macitem = 0;
+    for(int i = 1; (!found) && i < countmenus; i++) {
+      NSMenuItem *item = [[NSApp mainMenu] itemAtIndex:i];
+      NSMenu *submenu = [item submenu];
+      if (submenu == nil) continue;
+      int countitems = [submenu numberOfItems];
+      for(int j = 0; j < countitems; j++) {
+	macitem = [submenu itemAtIndex:j];
+	if ([macitem tag] == rank) { found = YES; break; }
+      }
+    }
+    if (found) {
+      [macitem setTitle:[[[NSString alloc] initWithUTF8String:newname] autorelease]];
+    }
+    free(newname);
+  }
+  va_end(ap);
+  [localPool release];
+  return retval;
+}
+
+void Fl_X::set_key_window()
+{
+  [(NSWindow*)xid makeKeyWindow];
+}
+
+static NSImage *imageFromText(const char *text, int *pwidth, int *pheight)
+{
+  const char *p, *q;
+  int width = 0, height, w2, ltext = strlen(text);
+  fltk3::font(fltk3::HELVETICA, 10);
+  p = text;
+  int nl = 0;
+  while((q=strchr(p, '\n')) != NULL) { 
+    nl++; 
+    w2 = int(fltk3::width(p, q - p));
+    if (w2 > width) width = w2;
+    p = q + 1; 
+  }
+  if (text[ ltext - 1] != '\n') {
+    nl++;
+    w2 = int(fltk3::width(p));
+    if (w2 > width) width = w2;
+  }
+  height = nl * fltk3::height() + 3;
+  width += 6;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(width, height);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,width,height);
+  fltk3::color(fltk3::BLACK);
+  p = text;
+  int y = fltk3::height();
+  while(TRUE) {
+    q = strchr(p, '\n');
+    if (q) {
+      fltk3::draw(p, q - p, 3, y);
+    } else {
+      fltk3::draw(p, 3, y);
+      break;
+    }
+    y += fltk3::height();
+    p = q + 1;
+  }
+  fl_end_offscreen();
+  NSImage* image = CGBitmapContextToNSImage( (CGContextRef)off );
+  fl_delete_offscreen( off );
+  *pwidth = width;
+  *pheight = height;
+  return image;
+}
+
+static NSImage *defaultDragImage(int *pwidth, int *pheight)
+{
+  const int width = 16, height = 16;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(width, height);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,width,height);
+  CGContextSetRGBStrokeColor( (CGContextRef)off, 0,0,0,0.6);
+  fltk3::rect(0,0,width,height);
+  fltk3::rect(2,2,width-4,height-4);
+  fl_end_offscreen();
+  NSImage* image = CGBitmapContextToNSImage( (CGContextRef)off );
+  fl_delete_offscreen( off );
+  *pwidth = width;
+  *pheight = height;
+  return image;
+}
+
+int fltk3::dnd(void)
+{
+  CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[0], fl_selection_length[0]);
+  if (text==NULL) return false;
+  NSAutoreleasePool *localPool;
+  localPool = [[NSAutoreleasePool alloc] init]; 
+  NSPasteboard *mypasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
+  [mypasteboard declareTypes:[NSArray arrayWithObjects:@"public.utf8-plain-text", nil] owner:nil];
+  [mypasteboard setData:(NSData*)text forType:@"public.utf8-plain-text"];
+  CFRelease(text);
+  fltk3::Widget *w = fltk3::pushed();
+  fltk3::Window *win = w->window();
+  if (win == NULL) {
+    win = (fltk3::Window*)w;
+  } else { 
+    while(win->window()) win = win->window();
+  }
+  NSView *myview = [(NSWindow*)Fl_X::i(win)->xid contentView];
+  NSEvent *theEvent = [NSApp currentEvent];
+  
+  int width, height;
+  NSImage *image;
+  if ( dynamic_cast<fltk3::Input_*>(w) != NULL ||  dynamic_cast<fltk3::TextDisplay*>(w) != NULL) {
+    fl_selection_buffer[0][ fl_selection_length[0] ] = 0;
+    image = imageFromText(fl_selection_buffer[0], &width, &height);
+  } else {
+    image = defaultDragImage(&width, &height);
+  }
+  
+  static NSSize offset={0,0};
+  NSPoint pt = [theEvent locationInWindow];
+  pt.x -= width/2;
+  pt.y -= height/2;
+  [myview dragImage:image  at:pt  offset:offset 
+              event:theEvent  pasteboard:mypasteboard  
+             source:myview  slideBack:YES];
+  if ( w ) {
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::RELEASE);
+    fltk3::e_number = old_event;
+    fltk3::pushed( 0 );
+  }
+  [localPool release];
+  return true;
+}
+
+unsigned char *Fl_X::bitmap_from_window_rect(fltk3::Window *win, int x, int y, int w, int h, int *bytesPerPixel)
+// delete the returned pointer after use
+{
+  while(win->window()) {
+    x += win->x();
+    y += win->y();
+    win = win->window();
+  }
+  CGFloat epsilon = 0;
+  if (fl_mac_os_version >= 100600) epsilon = 0.001;
+  // The epsilon offset is absolutely necessary under 10.6. Without it, the top pixel row and
+  // left pixel column are not read, and bitmap is read shifted by one pixel in both directions. 
+  // Under 10.5, we want no offset.
+  NSRect rect = NSMakeRect(x - epsilon, y - epsilon, w, h);
+  NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithFocusedViewRect:rect];
+  *bytesPerPixel = [bitmap bitsPerPixel]/8;
+  int bpp = (int)[bitmap bytesPerPlane];
+  int bpr = (int)[bitmap bytesPerRow];
+  int hh = bpp/bpr; // sometimes hh = h-1 for unclear reason
+  int ww = bpr/(*bytesPerPixel); // sometimes ww = w-1
+  unsigned char *data = new unsigned char[w * h *  *bytesPerPixel];
+  if (w == ww) {
+    memcpy(data, [bitmap bitmapData], w * hh *  *bytesPerPixel);
+  } else {
+    unsigned char *p = [bitmap bitmapData];
+    unsigned char *q = data;
+    for(int i = 0;i < hh; i++) {
+      memcpy(q, p, *bytesPerPixel * ww);
+      p += bpr;
+      q += w * *bytesPerPixel;
+      }
+  }
+  [bitmap release];
+  return data;
+}
+
+static void imgProviderReleaseData (void *info, const void *data, size_t size)
+{
+  delete[] (unsigned char *)data;
+}
+
+CGImageRef Fl_X::CGImage_from_window_rect(fltk3::Window *win, int x, int y, int w, int h)
+// CFRelease the returned CGImageRef after use
+{
+  int bpp;
+  unsigned char *bitmap = bitmap_from_window_rect(win, x, y, w, h, &bpp);
+  CGImageRef img;
+  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
+  CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, bitmap, w*h*bpp, imgProviderReleaseData);
+  img = CGImageCreate(w, h, 8, 8*bpp, w*bpp, lut,
+                      bpp == 3 ? kCGImageAlphaNone : kCGImageAlphaLast,
+                      provider, NULL, false, kCGRenderingIntentDefault);
+  CGColorSpaceRelease(lut);
+  CGDataProviderRelease(provider);
+  return img;
+}
+
+WindowRef Fl_X::window_ref()
+{
+  return (WindowRef)[(FLWindow*)xid windowRef];
+}
+
+// so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes
+CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h) {
+  if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) return CGRectMake(x-0.5, y-0.5, w, h); 
+  return CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0);
+}
+
+Window fl_xid(const fltk3::Window* w)
+{
+  Fl_X *temp = Fl_X::i(w);
+  return temp ? temp->xid : 0;
+}
+
+int fltk3::Window::decorated_w()
+{
+  if (!shown() || parent() || !border() || !visible()) return w();
+  int bx, by, bt;
+  get_window_frame_sizes(bx, by, bt);
+  return w() + 2 * bx;
+}
+
+int fltk3::Window::decorated_h()
+{
+  if (!shown() || parent() || !border() || !visible()) return h();
+  int bx, by, bt;
+  get_window_frame_sizes(bx, by, bt);
+  return h() + bt + by;
+}
+
+void fltk3::PagedDevice::print_window(fltk3::Window *win, int x_offset, int y_offset)
+{
+  if (!win->shown() || win->parent() || !win->border() || !win->visible()) {
+    this->print_widget(win, x_offset, y_offset);
+    return;
+  }
+  int bx, by, bt;
+  get_window_frame_sizes(bx, by, bt);
+  fltk3::DisplayDevice::display_device()->set_current(); // send win to front and make it current
+  win->show();
+  fl_gc = NULL;
+  fltk3::check();
+  win->make_current();
+  this->set_current(); // back to the fltk3::PagedDevice
+  if (this->class_name() == fltk3::Printer::class_id) {
+    // capture as transparent image the window title bar from screen
+    CGImageRef img = Fl_X::CGImage_from_window_rect(win, 0, -bt, win->w(), bt);
+    CGRect rect = { { x_offset, y_offset }, { win->w(), bt } }; // print the title bar
+    Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
+    CGContextDrawImage(fl_gc, rect, img);
+    Fl_X::q_end_image();
+    CGImageRelease(img);
+  }
+  else {
+    // capture the window title bar from screen
+    uchar *top_image = fltk3::read_image(NULL, 0, -bt, win->w(), bt);
+    if (top_image) { // print the title bar
+      fltk3::draw_image(top_image, x_offset, y_offset, win->w(), bt, 3);
+      delete[] top_image;
+    }
+  }
+  this->print_widget(win, x_offset, y_offset + bt); // print the window inner part
+}
+
+#include <dlfcn.h>
+
+/* Returns the address of a Carbon function after dynamically loading the Carbon library if needed.
+ Supports old Mac OS X versions that may use a couple of Carbon calls:
+ GetKeys used by OS X 10.3 or before (in fltk3::get_key())
+ PMSessionPageSetupDialog and PMSessionPrintDialog used by 10.4 or before (in fltk3::Printer::start_job())
+ GetWindowPort used by 10.4 or before (in fltk3::GlChoice.cxx)
+ */
+void *Fl_X::get_carbon_function(const char *function_name) {
+  static void *carbon = NULL;
+  void *f = NULL;
+  if (!carbon) {
+    carbon = dlopen("/System/Library/Frameworks/Carbon.framework/Carbon", RTLD_LAZY);
+  }
+  if (carbon) {
+    f = dlsym(carbon, function_name);
+  }
+  return f;
+}
+  
+#endif // __APPLE__
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_cocoa.mm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_compose.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_compose.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_compose.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,102 @@
+//
+// "$Id$"
+//
+// Character compose processing for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+#ifndef FLTK3_DOXYGEN
+int fltk3::compose_state = 0;
+#endif
+
+#if !defined(WIN32) && !defined(__APPLE__)
+extern XIC fl_xim_ic;
+#endif
+
+/** Any text editing widget should call this for each fltk3::KEYBOARD event.
+ Use of this function is very simple.
+ 
+ <p>If <i>true</i> is returned, then it has modified the
+ fltk3::event_text() and fltk3::event_length() to a set of <i>bytes</i> to
+ insert (it may be of zero length!).  In will also set the "del"
+ parameter to the number of <i>bytes</i> to the left of the cursor to
+ delete, this is used to delete the results of the previous call to
+ fltk3::compose().
+ 
+ <p>If <i>false</i> is returned, the keys should be treated as function
+ keys, and del is set to zero. You could insert the text anyways, if
+ you don't know what else to do.
+ 
+ <p>Though the current implementation returns immediately, future
+ versions may take quite awhile, as they may pop up a window or do
+ other user-interface things to allow characters to be selected.
+ */
+int fltk3::compose(int& del) {
+  // character composition is now handled by the OS
+  del = 0;
+#if defined(__APPLE__)
+  // this stuff is to be treated as a function key
+  if(fltk3::e_length == 0 || fltk3::e_keysym == fltk3::EnterKey || fltk3::e_keysym == fltk3::KPEnterKey || 
+     fltk3::e_keysym == fltk3::TabKey || fltk3::e_keysym == fltk3::EscapeKey || fltk3::e_state&(fltk3::META | fltk3::CTRL) ) {
+    return 0;
+  }
+#elif defined(WIN32)
+  unsigned char ascii = (unsigned)e_text[0];
+  if ((e_state & (fltk3::ALT | fltk3::META)) && !(ascii & 128)) return 0;
+#else
+  unsigned char ascii = (unsigned)e_text[0];
+  if ((e_state & (fltk3::ALT | fltk3::META | fltk3::CTRL)) && !(ascii & 128)) return 0;
+#endif
+  if(fltk3::compose_state) {
+    del = fltk3::compose_state;
+    fltk3::compose_state = 0;
+#ifndef __APPLE__
+  } else {
+    // Only insert non-control characters:
+    if (! (ascii & ~31 && ascii!=127)) { return 0; }
+#endif
+  }
+  return 1;
+}
+
+/**
+ If the user moves the cursor, be sure to call fltk3::compose_reset().
+ The next call to fltk3::compose() will start out in an initial state. In
+ particular it will not set "del" to non-zero. This call is very fast
+ so it is ok to call it many times and in many places.
+ */
+void fltk3::compose_reset()
+{
+  fltk3::compose_state = 0;
+#if !defined(WIN32) && !defined(__APPLE__)
+  if (fl_xim_ic) XmbResetIC(fl_xim_ic);
+#endif
+}
+
+//
+// End of "$Id$"
+//
+


Property changes on: branches/branch-3.0/src/core/Fl_compose.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_display.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_display.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_display.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,60 @@
+//
+// "$Id$"
+//
+// Display function for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Startup method to set what display to use.
+// Using setenv makes programs that are exec'd use the same display.
+
+#include <fltk3/run.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+/**
+    Sets the X display to use for all windows.  Actually this just sets
+    the environment variable $DISPLAY to the passed string, so this only
+    works before you show() the first window or otherwise open the display,
+    and does nothing useful under WIN32.
+*/
+void fltk3::display(const char *d) {
+#if defined(__APPLE__) || defined(WIN32)
+  (void)d;
+#else
+  static char e[1024];
+  strcpy(e,"DISPLAY=");
+  strlcat(e,d,sizeof(e));
+  for (char *c = e+8; *c!=':'; c++) {
+    if (!*c) {
+      strlcat(e,":0.0",sizeof(e));
+      break;
+    }
+  }
+  putenv(e);
+#endif // __APPLE__
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_display.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_get_key.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_get_key.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_get_key.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,69 @@
+//
+// "$Id$"
+//
+// Keyboard state routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifdef WIN32
+#  include "Fl_get_key_win32.cxx"
+#elif defined(__APPLE__)
+#  include "Fl_get_key_mac.cxx"
+#else
+
+// Return the current state of a key.  This is the X version.  I identify
+// keys (mostly) by the X keysym.  So this turns the keysym into a keycode
+// and looks it up in the X key bit vector, which Fl_x.cxx keeps track of.
+
+#  include <fltk3/run.h>
+#  include <fltk3/x.h>
+
+extern char fl_key_vector[32]; // in Fl_x.cxx
+
+int fltk3::event_key(int k) {
+  if (k > fltk3::MouseButton && k <= fltk3::MouseButton+8)
+    return fltk3::event_state(8<<(k-fltk3::MouseButton));
+  int i;
+#  ifdef __sgi
+  // get some missing PC keyboard keys:
+  if (k == fltk3::MetaLKey) i = 147;
+  else if (k == fltk3::MetaRKey) i = 148;
+  else if (k == fltk3::MenuKey) i = 149;
+  else
+#  endif
+    i = XKeysymToKeycode(fl_display, k);
+  if (i==0) return 0;
+  return fl_key_vector[i/8] & (1 << (i%8));
+}
+
+int fltk3::get_key(int k) {
+  fl_open_display();
+  XQueryKeymap(fl_display, fl_key_vector);
+  return event_key(k);
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_get_key.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_get_key_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_get_key_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_get_key_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,124 @@
+//
+// "$Id$"
+//
+// MacOS keyboard state routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Return the current state of a key.  Keys are named by fltk symbols,
+// which are actually X keysyms.  So this has to translate to macOS
+// symbols.
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <config.h>
+
+// convert an FLTK (X) keysym to a MacOS symbol:
+// See also the inverse converter in table macKeyLookUp of Fl_cocoa.mm
+// This table is in numeric order by FLTK symbol order for binary search.
+// The list of Mac OS virtual keycodes appears with OS 10.5 in
+// ...../Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h
+
+static const struct {unsigned short vk, fltk;} vktab[] = {
+  { 49, ' ' }, { 39, '\'' }, { 43, ',' }, { 27, '-' }, { 47, '.' }, { 44, '/' }, 
+  { 29, '0' }, { 18, '1'  }, { 19, '2'  }, { 20, '3'  }, 
+  { 21, '4' }, { 23, '5'  }, { 22, '6'  }, { 26, '7'  }, 
+  { 28, '8' }, { 25, '9'  }, { 41, ';'  }, { 24, '='  },
+  {  0, 'A' }, { 11, 'B'  }, {  8, 'C'  }, {  2, 'D'  }, 
+  { 14, 'E' }, {  3, 'F'  }, {  5, 'G'  }, {  4, 'H'  }, 
+  { 34, 'I' }, { 38, 'J'  }, { 40, 'K'  }, { 37, 'L'  }, 
+  { 46, 'M' }, { 45, 'N'  }, { 31, 'O'  }, { 35, 'P'  }, 
+  { 12, 'Q' }, { 15, 'R'  }, {  1, 'S'  }, { 17, 'T'  }, 
+  { 32, 'U' }, {  9, 'V'  }, { 13, 'W'  }, {  7, 'X'  }, 
+  { 16, 'Y' }, {  6, 'Z'  }, 
+  { 33, '[' }, { 30, ']' }, { 50, '`' },  { 42, '\\' },
+  { 51, fltk3::BackSpaceKey }, { 48, fltk3::TabKey }, { 36, fltk3::EnterKey }, { 0x7F, fltk3::PauseKey },
+  { 0x7F, fltk3::ScrollLockKey }, { 53, fltk3::EscapeKey }, { 0x73, fltk3::HomeKey }, { 123, fltk3::LeftKey },
+  { 126, fltk3::UpKey }, { 124, fltk3::RightKey }, { 125, fltk3::DownKey }, { 0x74, fltk3::PageUpKey },
+  { 0x79, fltk3::PageDownKey },  { 119, fltk3::EndKey }, { 0x7F, fltk3::PrintKey }, { 0x7F, fltk3::InsertKey },
+  { 0x6e, fltk3::MenuKey }, { 114, fltk3::HelpKey }, { 0x47, fltk3::NumLockKey },
+  { 76, fltk3::KPEnterKey }, { 67, fltk3::KPKey+'*' }, { 69, fltk3::KPKey+'+'}, { 78, fltk3::KPKey+'-' }, { 65, fltk3::KPKey+'.' }, { 75, fltk3::KPKey+'/' }, 
+  { 82, fltk3::KPKey+'0' }, { 83, fltk3::KPKey+'1' }, { 84, fltk3::KPKey+'2' }, { 85, fltk3::KPKey+'3' }, 
+  { 86, fltk3::KPKey+'4' }, { 87, fltk3::KPKey+'5' }, { 88, fltk3::KPKey+'6' }, { 89, fltk3::KPKey+'7' }, 
+  { 91, fltk3::KPKey+'8' }, { 92, fltk3::KPKey+'9' }, { 81, fltk3::KPKey+'=' }, 
+  { 0x7a, fltk3::FKey+1 }, { 0x78, fltk3::FKey+2  }, { 0x63, fltk3::FKey+3  }, { 0x76, fltk3::FKey+4  }, 
+  { 0x60, fltk3::FKey+5 }, { 0x61, fltk3::FKey+6  }, { 0x62, fltk3::FKey+7  }, { 0x64, fltk3::FKey+8  }, 
+  { 0x65, fltk3::FKey+9 }, { 0x6D, fltk3::FKey+10 }, { 0x67, fltk3::FKey+11 }, { 0x6f, fltk3::FKey+12 }, 
+  { 0x69, fltk3::FKey+13 }, { 0x6B, fltk3::FKey+14 }, { 0x71, fltk3::FKey+15 }, { 0x6A, fltk3::FKey+16 }, 
+  { 0x38, fltk3::ShiftLKey }, { 0x3C, fltk3::ShiftRKey }, { 0x3B, fltk3::ControlLKey }, { 0x3E, fltk3::ControlRKey }, 
+  { 0x39, fltk3::CapsLockKey }, { 0x37, fltk3::MetaLKey }, { 0x36, fltk3::MetaRKey },
+  { 0x3A, fltk3::AltLKey }, { 0x3D, fltk3::AltRKey }, { 0x75, fltk3::DeleteKey },
+};
+
+static int fltk2mac(int fltk) {
+  int a = 0;
+  int b = sizeof(vktab)/sizeof(*vktab);
+  while (a < b) {
+    int c = (a+b)/2;
+    if (vktab[c].fltk == fltk) return vktab[c].vk;
+    if (vktab[c].fltk < fltk) a = c+1; else b = c;
+  }
+  return 127;
+}
+
+//: returns true, if that key was pressed during the last event
+int fltk3::event_key(int k) {
+  return get_key(k);
+}
+
+//: returns true, if that key is pressed right now
+int fltk3::get_key(unsigned int k) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+  if(CGEventSourceKeyState != NULL) {
+    return (int)CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState, fltk2mac(k) );
+    }
+  else 
+#endif
+  {
+  typedef UInt32 fl_KeyMap[4];
+  fl_KeyMap foo;
+  // use the GetKeys Carbon function
+  typedef void (*keymap_f)(fl_KeyMap);
+  static keymap_f f = NULL;
+  if (!f) f = ( keymap_f )Fl_X::get_carbon_function("GetKeys");
+  (*f)(foo);
+#ifdef MAC_TEST_FOR_KEYCODES
+ static int cnt = 0;
+ if (cnt++>1024) {
+  cnt = 0;
+  printf("%08x %08x %08x %08x\n", (ulong*)(foo)[3], (ulong*)(foo)[2], (ulong*)(foo)[1], (ulong*)(foo)[0]);
+ }
+#endif
+  unsigned char *b = (unsigned char*)foo;
+  // KP_Enter can be at different locations for Powerbooks vs. desktop Macs
+  if (k==fltk3::KPEnterKey) {
+    return (((b[0x34>>3]>>(0x34&7))&1)||((b[0x4c>>3]>>(0x4c&7))&1));
+  }
+  int i = fltk2mac(k);
+  return (b[i>>3]>>(i&7))&1;
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_get_key_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_get_key_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_get_key_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_get_key_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,138 @@
+//
+// "$Id$"
+//
+// WIN32 keyboard state routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Return the current state of a key.  Keys are named by fltk symbols,
+// which are actually X keysyms.  So this has to translate to MSWindows
+// VK_x symbols.
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+// convert an Fltk (X) keysym to a MSWindows VK symbol:
+// See also the inverse converter in Fl_win32.cxx
+// This table is in numeric order by Fltk symbol order for binary search:
+
+static const struct {unsigned short vk, fltk;} vktab[] = {
+  {VK_SPACE,	' '},
+  {'1',		'!'},
+  {0xde,	'\"'},
+  {'3',		'#'},
+  {'4',		'$'},
+  {'5',		'%'},
+  {'7',		'&'},
+  {0xde,	'\''},
+  {'9',		'('},
+  {'0',		')'},
+  {'8',		'*'},
+  {0xbb,	'+'},
+  {0xbc,	','},
+  {0xbd,	'-'},
+  {0xbe,	'.'},
+  {0xbf,	'/'},
+  {0xba,	':'},
+  {0xba,	';'},
+  {0xbc,	'<'},
+  {0xbb,	'='},
+  {0xbe,	'>'},
+  {0xbf,	'?'},
+  {'2',		'@'},
+  {0xdb,	'['},
+  {0xdc,	'\\'},
+  {0xdd,	']'},
+  {'6',		'^'},
+  {0xbd,	'_'},
+  {0xc0,	'`'},
+  {0xdb,	'{'},
+  {0xdc,	'|'},
+  {0xdd,	'}'},
+  {0xc0,	'~'},
+  {VK_BACK,	fltk3::BackSpaceKey},
+  {VK_TAB,	fltk3::TabKey},
+  {VK_CLEAR,	0xff0b/*XK_Clear*/},
+  {VK_RETURN,	fltk3::EnterKey},
+  {VK_PAUSE,	fltk3::PauseKey},
+  {VK_SCROLL,	fltk3::ScrollLockKey},
+  {VK_ESCAPE,	fltk3::EscapeKey},
+  {VK_HOME,	fltk3::HomeKey},
+  {VK_LEFT,	fltk3::LeftKey},
+  {VK_UP,	fltk3::UpKey},
+  {VK_RIGHT,	fltk3::RightKey},
+  {VK_DOWN,	fltk3::DownKey},
+  {VK_PRIOR,	fltk3::PageUpKey},
+  {VK_NEXT,	fltk3::PageDownKey},
+  {VK_END,	fltk3::EndKey},
+  {VK_SNAPSHOT,	fltk3::PrintKey},
+  {VK_INSERT,	fltk3::InsertKey},
+  {VK_APPS,	fltk3::MenuKey},
+  {VK_NUMLOCK,	fltk3::NumLockKey},
+//{VK_???,	fltk3::KPEnterKey},
+  {VK_MULTIPLY,	fltk3::KPKey+'*'},
+  {VK_ADD,	fltk3::KPKey+'+'},
+  {VK_SUBTRACT,	fltk3::KPKey+'-'},
+  {VK_DECIMAL,	fltk3::KPKey+'.'},
+  {VK_DIVIDE,	fltk3::KPKey+'/'},
+  {VK_LSHIFT,	fltk3::ShiftLKey},
+  {VK_RSHIFT,	fltk3::ShiftRKey},
+  {VK_LCONTROL,	fltk3::ControlLKey},
+  {VK_RCONTROL,	fltk3::ControlRKey},
+  {VK_CAPITAL,	fltk3::CapsLockKey},
+  {VK_LWIN,	fltk3::MetaLKey},
+  {VK_RWIN,	fltk3::MetaRKey},
+  {VK_LMENU,	fltk3::AltLKey},
+  {VK_RMENU,	fltk3::AltRKey},
+  {VK_DELETE,	fltk3::DeleteKey}
+};
+
+static int fltk2ms(unsigned int fltk) {
+  if (fltk >= '0' && fltk <= '9') return fltk;
+  if (fltk >= 'A' && fltk <= 'Z') return fltk;
+  if (fltk >= 'a' && fltk <= 'z') return fltk-('a'-'A');
+  if (fltk > fltk3::FKey && fltk <= fltk3::FKey+16) return fltk-(fltk3::FKey-(VK_F1-1));
+  if (fltk >= fltk3::KPKey+'0' && fltk<=fltk3::KPKey+'9') return fltk-(fltk3::KPKey+'0'-VK_NUMPAD0);
+  int a = 0;
+  int b = sizeof(vktab)/sizeof(*vktab);
+  while (a < b) {
+    int c = (a+b)/2;
+    if (vktab[c].fltk == fltk) return vktab[c].vk;
+    if (vktab[c].fltk < fltk) a = c+1; else b = c;
+  }
+  return 0;
+}
+
+int fltk3::event_key(int k) {
+  return GetKeyState(fltk2ms(k))&~1;
+}
+
+int fltk3::get_key(unsigned int k) {
+  uchar foo[256];
+  GetKeyboardState(foo);
+  return foo[fltk2ms(k)]&~1;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_get_key_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_get_system_colors.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_get_system_colors.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_get_system_colors.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,426 @@
+//
+// "$Id$"
+//
+// System color support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include <fltk3/math.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <fltk3/Pixmap.h>
+#include <fltk3/TiledImage.h>
+#include "tile.xpm"
+
+#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
+// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
+// on Windows, which is supposed to be POSIX compliant...
+#  define putenv _putenv
+#endif // WIN32 && !__CYGWIN__
+
+static char	fl_bg_set = 0;
+static char	fl_bg2_set = 0;
+static char	fl_fg_set = 0;
+
+/**
+    Changes fltk3::color(fltk3::BACKGROUND_COLOR) to the given color, 
+    and changes the gray ramp from 32 to 56 to black to white.  These are 
+    the colors used as backgrounds by almost all widgets and used to draw 
+    the edges of all the boxtypes.
+*/
+void fltk3::background(uchar r, uchar g, uchar b) {
+  fl_bg_set = 1;
+
+  // replace the gray ramp so that fltk3::GRAY is this color
+  if (!r) r = 1; else if (r==255) r = 254;
+  double powr = log(r/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
+  if (!g) g = 1; else if (g==255) g = 254;
+  double powg = log(g/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
+  if (!b) b = 1; else if (b==255) b = 254;
+  double powb = log(b/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
+  for (unsigned int i = 0; i < fltk3::NUM_GRAY; i++) {
+    double gray = i/(fltk3::NUM_GRAY-1.0);
+    fltk3::set_color(fltk3::gray_ramp(i),
+		  uchar(pow(gray,powr)*255+.5),
+		  uchar(pow(gray,powg)*255+.5),
+		  uchar(pow(gray,powb)*255+.5));
+  }
+}
+/** Changes fltk3::color(fltk3::FOREGROUND_COLOR). */
+void fltk3::foreground(uchar r, uchar g, uchar b) {
+  fl_fg_set = 1;
+
+  fltk3::set_color(fltk3::FOREGROUND_COLOR,r,g,b);
+}
+
+/**
+    Changes the alternative background color. This color is used as a 
+    background by fltk3::Input and other text widgets.
+    <P>This call may change fltk3::color(fltk3::FOREGROUND_COLOR) if it 
+    does not provide sufficient contrast to fltk3::BACKGROUND2_COLOR.
+*/
+void fltk3::background2(uchar r, uchar g, uchar b) {
+  fl_bg2_set = 1;
+
+  fltk3::set_color(fltk3::BACKGROUND2_COLOR,r,g,b);
+  fltk3::set_color(fltk3::FOREGROUND_COLOR,
+                get_color(fltk3::contrast(fltk3::FOREGROUND_COLOR,fltk3::BACKGROUND2_COLOR)));
+}
+
+// these are set by fltk3::args() and override any system colors:
+const char *fl_fg = NULL;
+const char *fl_bg = NULL;
+const char *fl_bg2 = NULL;
+
+static void set_selection_color(uchar r, uchar g, uchar b) {
+  fltk3::set_color(fltk3::SELECTION_COLOR,r,g,b);
+}
+
+#if defined(WIN32) || defined(__APPLE__)
+
+#  include <stdio.h>
+// simulation of XParseColor:
+int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) {
+  if (*p == '#') p++;
+  int n = strlen(p);
+  int m = n/3;
+  const char *pattern = 0;
+  switch(m) {
+  case 1: pattern = "%1x%1x%1x"; break;
+  case 2: pattern = "%2x%2x%2x"; break;
+  case 3: pattern = "%3x%3x%3x"; break;
+  case 4: pattern = "%4x%4x%4x"; break;
+  default: return 0;
+  }
+  int R,G,B; if (sscanf(p,pattern,&R,&G,&B) != 3) return 0;
+  switch(m) {
+  case 1: R *= 0x11; G *= 0x11; B *= 0x11; break;
+  case 3: R >>= 4; G >>= 4; B >>= 4; break;
+  case 4: R >>= 8; G >>= 8; B >>= 8; break;
+  }
+  r = (uchar)R; g = (uchar)G; b = (uchar)B;
+  return 1;
+}
+#else
+// Wrapper around XParseColor...
+int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) {
+  XColor x;
+  if (!fl_display) fl_open_display();
+  if (XParseColor(fl_display, fl_colormap, p, &x)) {
+    r = (uchar)(x.red>>8);
+    g = (uchar)(x.green>>8);
+    b = (uchar)(x.blue>>8);
+    return 1;
+  } else return 0;
+}
+#endif // WIN32 || __APPLE__
+/** \fn fltk3::get_system_colors()
+    Read the user preference colors from the system and use them to call
+    fltk3::foreground(), fltk3::background(), and 
+    fltk3::background2().  This is done by
+    fltk3::Window::show(argc,argv) before applying the -fg and -bg
+    switches.
+    
+    <P>On X this reads some common values from the Xdefaults database.
+    KDE users can set these values by running the "krdb" program, and
+    newer versions of KDE set this automatically if you check the "apply
+    style to other X programs" switch in their control panel.
+*/
+#if defined(WIN32)
+static void
+getsyscolor(int what, const char* arg, void (*func)(uchar,uchar,uchar))
+{
+  if (arg) {
+    uchar r,g,b;
+    if (!fl_parse_color(arg, r,g,b))
+      fltk3::error("Unknown color: %s", arg);
+    else
+      func(r,g,b);
+  } else {
+    DWORD x = GetSysColor(what);
+    func(uchar(x&255), uchar(x>>8), uchar(x>>16));
+  }
+}
+
+void fltk3::get_system_colors() {
+  if (!fl_bg2_set) getsyscolor(COLOR_WINDOW,	fl_bg2,fltk3::background2);
+  if (!fl_fg_set) getsyscolor(COLOR_WINDOWTEXT,	fl_fg, fltk3::foreground);
+  if (!fl_bg_set) getsyscolor(COLOR_BTNFACE,	fl_bg, fltk3::background);
+  getsyscolor(COLOR_HIGHLIGHT,	0,     set_selection_color);
+}
+
+#elif defined(__APPLE__)
+// MacOS X currently supports two color schemes - Blue and Graphite.
+// Since we aren't emulating the Aqua interface (even if Apple would
+// let us), we use some defaults that are similar to both.  The
+// fltk3::scheme("plastic") color/box scheme provides a usable Aqua-like
+// look-n-feel...
+void fltk3::get_system_colors()
+{
+  fl_open_display();
+
+  if (!fl_bg2_set) background2(0xff, 0xff, 0xff);
+  if (!fl_fg_set) foreground(0, 0, 0);
+  if (!fl_bg_set) background(0xd8, 0xd8, 0xd8);
+  
+#if 0 
+  // this would be the correct code, but it does not run on all versions
+  // of OS X. Also, setting a bright selection color would require 
+  // some updates in fltk3::Adjuster and Fl_Help_Browser
+  OSStatus err;
+  RGBColor c;
+  err = GetThemeBrushAsColor(kThemeBrushPrimaryHighlightColor, 24, true, &c);
+  if (err)
+    set_selection_color(0x00, 0x00, 0x80);
+  else
+    set_selection_color(c.red, c.green, c.blue);
+#else
+  set_selection_color(0x00, 0x00, 0x80);
+#endif
+}
+#else
+
+// Read colors that KDE writes to the xrdb database.
+
+// XGetDefault does not do the expected thing: it does not like
+// periods in either word. Therefore it cannot match class.Text.background.
+// However *.Text.background is matched by pretending the program is "Text".
+// But this will also match *.background if there is no *.Text.background
+// entry, requiring users to put in both (unless they want the text fields
+// the same color as the windows).
+
+static void
+getsyscolor(const char *key1, const char* key2, const char *arg, const char *defarg, void (*func)(uchar,uchar,uchar))
+{
+  if (!arg) {
+    arg = XGetDefault(fl_display, key1, key2);
+    if (!arg) arg = defarg;
+  }
+  XColor x;
+  if (!XParseColor(fl_display, fl_colormap, arg, &x))
+    fltk3::error("Unknown color: %s", arg);
+  else
+    func(x.red>>8, x.green>>8, x.blue>>8);
+}
+
+void fltk3::get_system_colors()
+{
+  fl_open_display();
+  const char* key1 = 0;
+  if (fltk3::first_window()) key1 = fltk3::first_window()->xclass();
+  if (!key1) key1 = "fltk";
+  if (!fl_bg2_set) getsyscolor("Text","background",	fl_bg2,	"#ffffff", fltk3::background2);
+  if (!fl_fg_set) getsyscolor(key1,  "foreground",	fl_fg,	"#000000", fltk3::foreground);
+  if (!fl_bg_set) getsyscolor(key1,  "background",	fl_bg,	"#c0c0c0", fltk3::background);
+  getsyscolor("Text", "selectBackground", 0, "#000080", set_selection_color);
+}
+
+#endif
+
+
+//// Simple implementation of 2.0 fltk3::scheme() interface...
+#define D1 BORDER_WIDTH
+#define D2 (BORDER_WIDTH+BORDER_WIDTH)
+
+extern void	fl_up_box(int, int, int, int, fltk3::Color);
+extern void	fl_down_box(int, int, int, int, fltk3::Color);
+extern void	fl_thin_up_box(int, int, int, int, fltk3::Color);
+extern void	fl_thin_down_box(int, int, int, int, fltk3::Color);
+extern void	fl_round_up_box(int, int, int, int, fltk3::Color);
+extern void	fl_round_down_box(int, int, int, int, fltk3::Color);
+
+extern void	fl_up_frame(int, int, int, int, fltk3::Color);
+extern void	fl_down_frame(int, int, int, int, fltk3::Color);
+extern void	fl_thin_up_frame(int, int, int, int, fltk3::Color);
+extern void	fl_thin_down_frame(int, int, int, int, fltk3::Color);
+
+#ifndef FLTK3_DOXYGEN
+const char	*fltk3::scheme_ = (const char *)0;	    // current scheme 
+fltk3::Image	*fltk3::scheme_bg_ = (fltk3::Image *)0;    // current background image for the scheme
+#endif
+
+static fltk3::Pixmap	tile(tile_xpm);
+
+/**
+    Gets or sets the current widget scheme. NULL will use
+    the scheme defined in the FLTK_SCHEME environment
+    variable or the scheme resource under X11. Otherwise,
+    any of the following schemes can be used:</P>
+    
+    <ul>
+    
+    	<li>"none" - This is the default look-n-feel which resembles old
+    	Windows (95/98/Me/NT/2000) and old GTK/KDE</li>
+    
+    	<li>"plastic" - This scheme is inspired by the Aqua user interface
+    	on Mac OS X</li>
+    
+    	<li>"gtk+" - This scheme is inspired by the Red Hat Bluecurve
+    	theme</li>
+    
+    </ul>
+*/
+int fltk3::scheme(const char *s) {
+  if (!s) {
+    if ((s = getenv("FLTK_SCHEME")) == NULL) {
+#if !defined(WIN32) && !defined(__APPLE__)
+      const char* key = 0;
+      if (fltk3::first_window()) key = fltk3::first_window()->xclass();
+      if (!key) key = "fltk";
+      fl_open_display();
+      s = XGetDefault(fl_display, key, "scheme");
+#endif // !WIN32 && !__APPLE__
+    }
+  }
+
+  if (s) {
+    if (!strcasecmp(s, "none") || !strcasecmp(s, "base") || !*s) s = 0;
+    else s = strdup(s);
+  }
+  if (scheme_) free((void*)scheme_);
+  scheme_ = s;
+
+  // Save the new scheme in the FLTK_SCHEME env var so that child processes
+  // inherit it...
+  static char e[1024];
+  strcpy(e,"FLTK_SCHEME=");
+  if (s) strlcat(e,s,sizeof(e));
+  putenv(e);
+
+  // Load the scheme...
+  return reload_scheme();
+}
+
+int fltk3::reload_scheme() {
+  fltk3::Window *win;
+
+  if (scheme_ && !strcasecmp(scheme_, "plastic")) {
+    // Update the tile image to match the background color...
+    uchar r, g, b;
+    int nr, ng, nb;
+    int i;
+//    static uchar levels[3] = { 0xff, 0xef, 0xe8 };
+    // OSX 10.3 and higher use a background with less contrast...
+    static uchar levels[3] = { 0xff, 0xf8, 0xf4 };
+
+    get_color(fltk3::GRAY, r, g, b);
+
+//    printf("fltk3::GRAY = 0x%02x 0x%02x 0x%02x\n", r, g, b);
+
+    for (i = 0; i < 3; i ++) {
+      nr = levels[i] * r / 0xe8;
+      if (nr > 255) nr = 255;
+
+      ng = levels[i] * g / 0xe8;
+      if (ng > 255) ng = 255;
+
+      nb = levels[i] * b / 0xe8;
+      if (nb > 255) nb = 255;
+
+      sprintf(tile_cmap[i], "%c c #%02x%02x%02x", "Oo."[i], nr, ng, nb);
+//      puts(tile_cmap[i]);
+    }
+
+    tile.uncache();
+
+    if (!scheme_bg_) scheme_bg_ = new fltk3::TiledImage(&tile, w(), h());
+
+    // Load plastic buttons, etc...
+    set_boxtype(fltk3::UP_FRAME,        fltk3::PLASTIC_UP_FRAME);
+    set_boxtype(fltk3::DOWN_FRAME,      fltk3::PLASTIC_DOWN_FRAME);
+    set_boxtype(fltk3::THIN_UP_FRAME,   fltk3::PLASTIC_UP_FRAME);
+    set_boxtype(fltk3::THIN_DOWN_FRAME, fltk3::PLASTIC_DOWN_FRAME);
+
+    set_boxtype(fltk3::UP_BOX,          fltk3::PLASTIC_UP_BOX);
+    set_boxtype(fltk3::DOWN_BOX,        fltk3::PLASTIC_DOWN_BOX);
+    set_boxtype(fltk3::THIN_UP_BOX,     fltk3::PLASTIC_THIN_UP_BOX);
+    set_boxtype(fltk3::THIN_DOWN_BOX,   fltk3::PLASTIC_THIN_DOWN_BOX);
+    set_boxtype(fltk3::ROUND_UP_BOX,   fltk3::PLASTIC_ROUND_UP_BOX);
+    set_boxtype(fltk3::ROUND_DOWN_BOX, fltk3::PLASTIC_ROUND_DOWN_BOX);
+
+    // Use standard size scrollbars...
+    fltk3::scrollbar_size(16);
+  } else if (scheme_ && !strcasecmp(scheme_, "gtk+")) {
+    // Use a GTK+ inspired look-n-feel...
+    if (scheme_bg_) {
+      delete scheme_bg_;
+      scheme_bg_ = (fltk3::Image *)0;
+    }
+
+    set_boxtype(fltk3::UP_FRAME,        fltk3::GTK_UP_FRAME);
+    set_boxtype(fltk3::DOWN_FRAME,      fltk3::GTK_DOWN_FRAME);
+    set_boxtype(fltk3::THIN_UP_FRAME,   fltk3::GTK_THIN_UP_FRAME);
+    set_boxtype(fltk3::THIN_DOWN_FRAME, fltk3::GTK_THIN_DOWN_FRAME);
+
+    set_boxtype(fltk3::UP_BOX,          fltk3::GTK_UP_BOX);
+    set_boxtype(fltk3::DOWN_BOX,        fltk3::GTK_DOWN_BOX);
+    set_boxtype(fltk3::THIN_UP_BOX,     fltk3::GTK_THIN_UP_BOX);
+    set_boxtype(fltk3::THIN_DOWN_BOX,   fltk3::GTK_THIN_DOWN_BOX);
+    set_boxtype(fltk3::ROUND_UP_BOX,   fltk3::GTK_ROUND_UP_BOX);
+    set_boxtype(fltk3::ROUND_DOWN_BOX, fltk3::GTK_ROUND_DOWN_BOX);
+
+    // Use slightly thinner scrollbars...
+    fltk3::scrollbar_size(15);
+  } else {
+    // Use the standard FLTK look-n-feel...
+    if (scheme_bg_) {
+      delete scheme_bg_;
+      scheme_bg_ = (fltk3::Image *)0;
+    }
+
+    set_boxtype(fltk3::UP_FRAME,        fl_up_frame, D1, D1, D2, D2);
+    set_boxtype(fltk3::DOWN_FRAME,      fl_down_frame, D1, D1, D2, D2);
+    set_boxtype(fltk3::THIN_UP_FRAME,   fl_thin_up_frame, 1, 1, 2, 2);
+    set_boxtype(fltk3::THIN_DOWN_FRAME, fl_thin_down_frame, 1, 1, 2, 2);
+
+    set_boxtype(fltk3::UP_BOX,          fl_up_box, D1, D1, D2, D2);
+    set_boxtype(fltk3::DOWN_BOX,        fl_down_box, D1, D1, D2, D2);
+    set_boxtype(fltk3::THIN_UP_BOX,     fl_thin_up_box, 1, 1, 2, 2);
+    set_boxtype(fltk3::THIN_DOWN_BOX,   fl_thin_down_box, 1, 1, 2, 2);
+    set_boxtype(fltk3::ROUND_UP_BOX,   fl_round_up_box, 3, 3, 6, 6);
+    set_boxtype(fltk3::ROUND_DOWN_BOX, fl_round_down_box, 3, 3, 6, 6);
+
+    // Use standard size scrollbars...
+    fltk3::scrollbar_size(16);
+  }
+
+  // Set (or clear) the background tile for all windows...
+  for (win = first_window(); win; win = next_window(win)) {
+    win->labeltype(scheme_bg_ ? fltk3::NORMAL_LABEL : fltk3::NO_LABEL);
+    win->align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
+    win->image(scheme_bg_);
+    win->redraw();
+  }
+
+  return 1;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_get_system_colors.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_grab.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_grab.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_grab.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,104 @@
+//
+// "$Id$"
+//
+// Grab/release code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+////////////////////////////////////////////////////////////////
+// "Grab" is done while menu systems are up.  This has several effects:
+// Events are all sent to the "grab window", which does not even
+// have to be displayed (and in the case of Fl_Menu.cxx it isn't).
+// The system is also told to "grab" events and send them to this app.
+// This also modifies how fltk3::Window::show() works, on X it turns on
+// override_redirect, it does similar things on WIN32.
+
+extern void fl_fix_focus(); // in Fl.cxx
+
+#ifdef WIN32
+// We have to keep track of whether we have captured the mouse, since
+// MSWindows shows little respect for this... Grep for fl_capture to
+// see where and how this is used.
+extern HWND fl_capture;
+#endif
+
+#ifdef __APPLE__
+extern void *fl_capture;
+#endif
+
+void fltk3::grab(fltk3::Window* win) {
+  if (win) {
+    if (!grab_) {
+#ifdef WIN32
+      SetActiveWindow(fl_capture = fl_xid(first_window()));
+      SetCapture(fl_capture);
+#elif defined(__APPLE__)
+      fl_capture = Fl_X::i(first_window())->xid;
+      Fl_X::i(first_window())->set_key_window();
+#else
+      XGrabPointer(fl_display,
+		   fl_xid(first_window()),
+		   1,
+		   ButtonPressMask|ButtonReleaseMask|
+		   ButtonMotionMask|PointerMotionMask,
+		   GrabModeAsync,
+		   GrabModeAsync, 
+		   None,
+		   0,
+		   fl_event_time);
+      XGrabKeyboard(fl_display,
+		    fl_xid(first_window()),
+		    1,
+		    GrabModeAsync,
+		    GrabModeAsync, 
+		    fl_event_time);
+#endif
+    }
+    grab_ = win;
+  } else {
+    if (grab_) {
+#ifdef WIN32
+      fl_capture = 0;
+      ReleaseCapture();
+#elif defined(__APPLE__)
+      fl_capture = 0;
+#else
+      XUngrabKeyboard(fl_display, fl_event_time);
+      XUngrabPointer(fl_display, fl_event_time);
+      // this flush is done in case the picked menu item goes into
+      // an infinite loop, so we don't leave the X server locked up:
+      XFlush(fl_display);
+#endif
+      grab_ = 0;
+      fl_fix_focus();
+    }
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_grab.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_lock.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_lock.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_lock.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,418 @@
+//
+// "$Id$"
+//
+// Multi-threading support code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+#include <fltk3/run.h>
+#include <config.h>
+
+#include <stdlib.h>
+
+/*
+   From Bill:
+
+   I would prefer that FLTK contain the minimal amount of extra
+   stuff for doing threads.  There are other portable thread
+   wrapper libraries out there and FLTK should not be providing
+   another.  This file is an attempt to make minimal additions
+   and make them self-contained in this source file.
+
+   From Mike:
+
+   Starting with 1.1.8, we now have a callback so that you can
+   process awake() messages as they come in.
+
+
+   The API:
+
+   fltk3::lock() - recursive lock.  You must call this before the
+   first call to fltk3::wait()/run() to initialize the thread
+   system. The lock is locked all the time except when
+   fltk3::wait() is waiting for events.
+
+   fltk3::unlock() - release the recursive lock.
+
+   fltk3::awake(void*) - Causes fltk3::wait() to return (with the lock
+   locked) even if there are no events ready.
+
+   fltk3::awake(void (*cb)(void *), void*) - Call a function
+   in the main thread from within another thread of execution.
+
+   fltk3::thread_message() - returns an argument sent to an
+   fltk3::awake() call, or returns NULL if none.  WARNING: the
+   current implementation only has a one-entry queue and only
+   returns the most recent value!
+*/
+
+#ifndef FLTK3_DOXYGEN
+fltk3::AwakeHandler *fltk3::awake_ring_;
+void **fltk3::awake_data_;
+int fltk3::awake_ring_size_;
+int fltk3::awake_ring_head_;
+int fltk3::awake_ring_tail_;
+#endif
+
+static const int AWAKE_RING_SIZE = 1024;
+static void lock_ring();
+static void unlock_ring();
+
+
+/** Adds an awake handler for use in awake(). */
+int fltk3::add_awake_handler_(fltk3::AwakeHandler func, void *data)
+{
+  int ret = 0;
+  lock_ring();
+  if (!awake_ring_) {
+    awake_ring_size_ = AWAKE_RING_SIZE;
+    awake_ring_ = (fltk3::AwakeHandler*)malloc(awake_ring_size_*sizeof(fltk3::AwakeHandler));
+    awake_data_ = (void**)malloc(awake_ring_size_*sizeof(void*));
+  }
+  if (awake_ring_head_==awake_ring_tail_-1 || awake_ring_head_+1==awake_ring_tail_) {
+    // ring is full. Return -1 as an error indicator.
+    ret = -1;
+  } else {
+    awake_ring_[awake_ring_head_] = func;
+    awake_data_[awake_ring_head_] = data;
+    ++awake_ring_head_;
+    if (awake_ring_head_ == awake_ring_size_)
+      awake_ring_head_ = 0;
+  }
+  unlock_ring();
+  return ret;
+}
+/** Gets the last stored awake handler for use in awake(). */
+int fltk3::get_awake_handler_(fltk3::AwakeHandler &func, void *&data)
+{
+  int ret = 0;
+  lock_ring();
+  if (!awake_ring_ || awake_ring_head_ == awake_ring_tail_) {
+    ret = -1;
+  } else {
+    func = awake_ring_[awake_ring_tail_];
+    data = awake_data_[awake_ring_tail_];
+    ++awake_ring_tail_;
+    if (awake_ring_tail_ == awake_ring_size_)
+      awake_ring_tail_ = 0;
+  }
+  unlock_ring();
+  return ret;
+}
+
+/**
+ Let the main thread know an update is pending and have it call a specific function.
+ Registers a function that will be 
+ called by the main thread during the next message handling cycle. 
+ Returns 0 if the callback function was registered, 
+ and -1 if registration failed. Over a thousand awake callbacks can be
+ registered simultaneously.
+ 
+ \see fltk3::awake(void* message=0)
+*/
+int fltk3::awake(fltk3::AwakeHandler func, void *data) {
+  int ret = add_awake_handler_(func, data);
+  fltk3::awake();
+  return ret;
+}
+
+////////////////////////////////////////////////////////////////
+// Windows threading...
+/** \fn int fltk3::lock()
+    The lock() method blocks the current thread until it
+    can safely access FLTK widgets and data. Child threads should
+    call this method prior to updating any widgets or accessing
+    data. The main thread must call lock() to initialize
+    the threading support in FLTK. lock() will return non-zero
+    if threading is not available on the platform.
+    
+    Child threads must call unlock() when they are done
+    accessing FLTK.
+    
+    When the wait() method is waiting
+    for input or timeouts, child threads are given access to FLTK.
+    Similarly, when the main thread needs to do processing, it will
+    wait until all child threads have called unlock() before processing
+    additional data.
+ 
+    \return 0 if threading is available on the platform; non-zero
+    otherwise.
+    
+    See also: \ref advanced_multithreading
+*/
+/** \fn void fltk3::unlock()
+    The unlock() method releases the lock that was set
+    using the lock() method. Child
+    threads should call this method as soon as they are finished
+    accessing FLTK.
+    
+    See also: \ref advanced_multithreading
+*/
+/** \fn void fltk3::awake(void* msg)
+    Sends a message pointer to the main thread, 
+    causing any pending fltk3::wait() call to 
+    terminate so that the main thread can retrieve the message and any pending 
+    redraws can be processed.
+    
+    Multiple calls to fltk3::awake() will queue multiple pointers 
+    for the main thread to process, up to a system-defined (typically several 
+    thousand) depth. The default message handler saves the last message which 
+    can be accessed using the 
+    fltk3::thread_message() function.
+
+    In the context of a threaded application, a call to fltk3::awake() with no
+    argument will trigger event loop handling in the main thread. Since
+    it is not possible to call fltk3::flush() from a subsidiary thread,
+    fltk3::awake() is the best (and only, really) substitute.
+    
+    See also: \ref advanced_multithreading
+*/
+#ifdef WIN32
+#  include <windows.h>
+#  include <process.h>
+#  include <fltk3/x.h>
+
+// These pointers are in Fl_win32.cxx:
+extern void (*fl_lock_function)();
+extern void (*fl_unlock_function)();
+
+// The main thread's ID
+static DWORD main_thread;
+
+// Microsoft's version of a MUTEX...
+CRITICAL_SECTION cs;
+CRITICAL_SECTION *cs_ring;
+
+void unlock_ring() {
+  LeaveCriticalSection(cs_ring);
+}
+
+void lock_ring() {
+  if (!cs_ring) {
+    cs_ring = (CRITICAL_SECTION*)malloc(sizeof(CRITICAL_SECTION));
+    InitializeCriticalSection(cs_ring);
+  }
+  EnterCriticalSection(cs_ring);
+}
+
+//
+// 'unlock_function()' - Release the lock.
+//
+
+static void unlock_function() {
+  LeaveCriticalSection(&cs);
+}
+
+//
+// 'lock_function()' - Get the lock.
+//
+
+static void lock_function() {
+  EnterCriticalSection(&cs);
+}
+
+int fltk3::lock() {
+  if (!main_thread) InitializeCriticalSection(&cs);
+
+  lock_function();
+
+  if (!main_thread) {
+    fl_lock_function   = lock_function;
+    fl_unlock_function = unlock_function;
+    main_thread        = GetCurrentThreadId();
+  }
+  return 0;
+}
+
+void fltk3::unlock() {
+  unlock_function();
+}
+
+void fltk3::awake(void* msg) {
+  PostThreadMessage( main_thread, fl_wake_msg, (WPARAM)msg, 0);
+}
+
+////////////////////////////////////////////////////////////////
+// POSIX threading...
+#elif HAVE_PTHREAD
+#  include <unistd.h>
+#  include <fcntl.h>
+#  include <pthread.h>
+
+// Pipe for thread messaging via fltk3::awake()...
+static int thread_filedes[2];
+
+// Mutex and state information for fltk3::lock() and fltk3::unlock()...
+static pthread_mutex_t fltk_mutex;
+static pthread_t owner;
+static int counter;
+
+static void lock_function_init_std() {
+  pthread_mutex_init(&fltk_mutex, NULL);
+}
+
+static void lock_function_std() {
+  if (!counter || owner != pthread_self()) {
+    pthread_mutex_lock(&fltk_mutex);
+    owner = pthread_self();
+  }
+  counter++;
+}
+
+static void unlock_function_std() {
+  if (!--counter) pthread_mutex_unlock(&fltk_mutex);
+}
+
+#  ifdef PTHREAD_MUTEX_RECURSIVE
+static bool lock_function_init_rec() {
+  pthread_mutexattr_t attrib;
+  pthread_mutexattr_init(&attrib);
+  if (pthread_mutexattr_settype(&attrib, PTHREAD_MUTEX_RECURSIVE)) {
+    pthread_mutexattr_destroy(&attrib);
+    return true;
+  }
+
+  pthread_mutex_init(&fltk_mutex, &attrib);
+  return false;
+}
+
+static void lock_function_rec() {
+  pthread_mutex_lock(&fltk_mutex);
+}
+
+static void unlock_function_rec() {
+  pthread_mutex_unlock(&fltk_mutex);
+}
+#  endif // PTHREAD_MUTEX_RECURSIVE
+
+void fltk3::awake(void* msg) {
+  if (write(thread_filedes[1], &msg, sizeof(void*))==0) { /* ignore */ }
+}
+
+static void* thread_message_;
+void* fltk3::thread_message() {
+  void* r = thread_message_;
+  thread_message_ = 0;
+  return r;
+}
+
+static void thread_awake_cb(int fd, void*) {
+  if (read(fd, &thread_message_, sizeof(void*))==0) { 
+    /* This should never happen */
+  }
+  fltk3::AwakeHandler func;
+  void *data;
+  while (fltk3::get_awake_handler_(func, data)==0) {
+    (*func)(data);
+  }
+}
+
+// These pointers are in Fl_x.cxx:
+extern void (*fl_lock_function)();
+extern void (*fl_unlock_function)();
+
+int fltk3::lock() {
+  if (!thread_filedes[1]) {
+    // Initialize thread communication pipe to let threads awake FLTK
+    // from fltk3::wait()
+    if (pipe(thread_filedes)==-1) {
+      /* this should not happen */
+    }
+
+    // Make the write side of the pipe non-blocking to avoid deadlock
+    // conditions (STR #1537)
+    fcntl(thread_filedes[1], F_SETFL,
+          fcntl(thread_filedes[1], F_GETFL) | O_NONBLOCK);
+
+    // Monitor the read side of the pipe so that messages sent via
+    // fltk3::awake() from a thread will "wake up" the main thread in
+    // fltk3::wait().
+    fltk3::add_fd(thread_filedes[0], fltk3::READ, thread_awake_cb);
+
+    // Set lock/unlock functions for this system, using a system-supplied
+    // recursive mutex if supported...
+#  ifdef PTHREAD_MUTEX_RECURSIVE
+    if (!lock_function_init_rec()) {
+      fl_lock_function   = lock_function_rec;
+      fl_unlock_function = unlock_function_rec;
+    } else {
+#  endif // PTHREAD_MUTEX_RECURSIVE
+      lock_function_init_std();
+      fl_lock_function   = lock_function_std;
+      fl_unlock_function = unlock_function_std;
+#  ifdef PTHREAD_MUTEX_RECURSIVE
+    }
+#  endif // PTHREAD_MUTEX_RECURSIVE
+  }
+
+  fl_lock_function();
+  return 0;
+}
+
+void fltk3::unlock() {
+  fl_unlock_function();
+}
+
+// Mutex code for the awake ring buffer
+static pthread_mutex_t *ring_mutex;
+
+void unlock_ring() {
+  pthread_mutex_unlock(ring_mutex);
+}
+
+void lock_ring() {
+  if (!ring_mutex) {
+    ring_mutex = (pthread_mutex_t*)malloc(sizeof(pthread_mutex_t));
+    pthread_mutex_init(ring_mutex, NULL);
+  }
+  pthread_mutex_lock(ring_mutex);
+}
+
+#else
+
+void unlock_ring() {
+}
+
+void lock_ring() {
+}
+
+void fltk3::awake(void*) {
+}
+
+int fltk3::lock() {
+  return 1;
+}
+
+void fltk3::unlock() {
+}
+
+void* fltk3::thread_message() {
+  return NULL;
+}
+
+#endif // WIN32
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_lock.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2870 @@
+//
+// "$Id$"
+//
+// MacOS specific code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//// From the inner edge of a MetroWerks CodeWarrior CD:
+// (without permission)
+//
+// "Three Compiles for 68Ks under the sky,
+// Seven Compiles for PPCs in their fragments of code,
+// Nine Compiles for Mortal Carbon doomed to die,
+// One Compile for Mach-O Cocoa on its Mach-O throne,
+// in the Land of MacOS X where the Drop-Shadows lie.
+// 
+// One Compile to link them all, One Compile to merge them,
+// One Compile to copy them all and in the bundle bind them,
+// in the Land of MacOS X where the Drop-Shadows lie."
+
+// warning: the Apple Quartz version still uses some Quickdraw calls,
+//          mostly to get around the single active context in QD and 
+//          to implement clipping. This should be changed into pure
+//          Quartz calls in the near future.
+
+// FIXME moving away from Carbon, I am replacing the Scrap manager calls with Pasteboard
+//       calls that support utf8 encoding. As soon as these function haven proven working
+//       the Scrap manager calls should be removed
+#define USE_PASTEBOARD 1
+
+// we don't need the following definition because we deliver only
+// true mouse moves.  On very slow systems however, this flag may
+// still be useful.
+#ifndef FLTK3_DOXYGEN
+
+#define CONSOLIDATE_MOTION 0
+extern "C" {
+#include <pthread.h>
+}
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/Window.h>
+#include <fltk3/Tooltip.h>
+#include <fltk3/SysMenuBar.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+#include <unistd.h>
+
+// #define DEBUG_SELECT		// UNCOMMENT FOR SELECT()/THREAD DEBUGGING
+#ifdef DEBUG_SELECT
+#include <stdio.h>		// testing
+#define DEBUGMSG(msg)		if ( msg ) fprintf(stderr, msg);
+#define DEBUGPERRORMSG(msg)	if ( msg ) perror(msg)
+#define DEBUGTEXT(txt)		txt
+#else
+#define DEBUGMSG(msg)
+#define DEBUGPERRORMSG(msg)
+#define DEBUGTEXT(txt)		NULL
+#endif /*DEBUG_SELECT*/
+
+// external functions
+extern fltk3::Window* fl_find(Window);
+extern void fl_fix_focus();
+
+// forward definition of functions in this file
+static void handleUpdateEvent( WindowPtr xid );
+//+ int fl_handle(const EventRecord &event);
+static int FSSpec2UnixPath( FSSpec *fs, char *dst );
+// converting cr lf converter function
+static void convert_crlf(char * string, size_t len);
+
+// public variables
+int fl_screen;
+CGContextRef fl_gc = 0;
+Handle fl_system_menu;
+fltk3::SysMenuBar *fltk3::sys_menu_bar = 0;
+CursHandle fl_default_cursor;
+WindowRef fl_capture = 0;            // we need this to compensate for a missing(?) mouse capture
+ulong fl_event_time;                 // the last timestamp from an x event
+char fl_key_vector[32];              // used by fltk3::get_key()
+bool fl_show_iconic;                 // true if called from iconize() - shows the next created window in collapsed state
+int fl_disable_transient_for;        // secret method of removing TRANSIENT_FOR
+const fltk3::Window* fl_modal_for;       // parent of modal() window
+fltk3::Region fl_window_region = 0;
+Window fl_window;
+fltk3::Window *fltk3::Window::current_;
+EventRef fl_os_event;		// last (mouse) event
+
+// forward declarations of variables in this file
+static int got_events = 0;
+static fltk3::Window* resize_from_system;
+static CursPtr default_cursor_ptr;
+static Cursor default_cursor;
+static WindowRef fl_os_capture = 0; // the dispatch handler will redirect mose move and drag events to these windows
+
+#if CONSOLIDATE_MOTION
+static fltk3::Window* send_motion;
+extern fltk3::Window* fl_xmousewin;
+#endif
+
+enum { kEventClassFLTK = 'fltk' };
+enum { kEventFLTKBreakLoop = 1, kEventFLTKDataReady };
+
+/* fltk-utf8 placekeepers */
+void fltk3::reset_spot()
+{
+}
+
+void fltk3::set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
+{
+}
+
+void fltk3::set_status(int x, int y, int w, int h)
+{
+}
+
+/**
+* Mac keyboard lookup table
+ */
+static unsigned short macKeyLookUp[128] =
+{
+    'a', 's', 'd', 'f', 'h', 'g', 'z', 'x',
+    'c', 'v', '^', 'b', 'q', 'w', 'e', 'r',
+
+    'y', 't', '1', '2', '3', '4', '6', '5',
+    '=', '9', '7', '-', '8', '0', ']', 'o',
+
+    'u', '[', 'i', 'p', fltk3::EnterKey, 'l', 'j', '\'',
+    'k', ';', '\\', ',', '/', 'n', 'm', '.',
+
+    fltk3::TabKey, ' ', '`', fltk3::BackSpaceKey, 
+    fltk3::KPEnterKey, fltk3::EscapeKey, 0, 0/*fltk3::MetaLKey*/,
+    0/*fltk3::ShiftLKey*/, 0/*fltk3::CapsLockKey*/, 0/*fltk3::AltLKey*/, 0/*fltk3::ControlLKey*/, 
+    0/*fltk3::ShiftRKey*/, 0/*fltk3::AltRKey*/, 0/*fltk3::ControlRKey*/, 0,
+
+    0, fltk3::KPKey+'.', fltk3::RightKey, fltk3::KPKey+'*', 0, fltk3::KPKey+'+', fltk3::LeftKey, fltk3::DeleteKey,
+    fltk3::DownKey, 0, 0, fltk3::KPKey+'/', fltk3::KPEnterKey, fltk3::UpKey, fltk3::KPKey+'-', 0,
+
+    0, fltk3::KPKey+'=', fltk3::KPKey+'0', fltk3::KPKey+'1', fltk3::KPKey+'2', fltk3::KPKey+'3', fltk3::KPKey+'4', fltk3::KPKey+'5',
+    fltk3::KPKey+'6', fltk3::KPKey+'7', 0, fltk3::KPKey+'8', fltk3::KPKey+'9', 0, 0, 0,
+
+    fltk3::FKey+5, fltk3::FKey+6, fltk3::FKey+7, fltk3::FKey+3, fltk3::FKey+8, fltk3::FKey+9, 0, fltk3::FKey+11,
+    0, 0/*fltk3::FKey+13*/, fltk3::PrintKey, fltk3::ScrollLockKey, 0, fltk3::FKey+10, fltk3::MenuKey, fltk3::FKey+12,
+
+    0, fltk3::PauseKey, fltk3::HelpKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::FKey+4, fltk3::EndKey,
+    fltk3::FKey+2, fltk3::PageDownKey, fltk3::FKey+1, fltk3::LeftKey, fltk3::RightKey, fltk3::DownKey, fltk3::UpKey, 0/*FL_Power*/,
+};
+
+/**
+ * convert the current mouse chord into the FLTK modifier state
+ */
+static unsigned int mods_to_e_state( UInt32 mods )
+{
+  long state = 0;
+  if ( mods & kEventKeyModifierNumLockMask ) state |= fltk3::NUM_LOCK;
+  if ( mods & cmdKey ) state |= fltk3::META;
+  if ( mods & (optionKey|rightOptionKey) ) state |= fltk3::ALT;
+  if ( mods & (controlKey|rightControlKey) ) state |= fltk3::CTRL;
+  if ( mods & (shiftKey|rightShiftKey) ) state |= fltk3::SHIFT;
+  if ( mods & alphaLock ) state |= fltk3::CAPS_LOCK;
+  unsigned int ret = ( fltk3::e_state & 0xff000000 ) | state;
+  fltk3::e_state = ret;
+  //printf( "State 0x%08x (%04x)\n", fltk3::e_state, mods );
+  return ret;
+}
+
+
+/**
+ * convert the current mouse chord into the FLTK keysym
+ */
+static void mods_to_e_keysym( UInt32 mods )
+{
+  if ( mods & cmdKey ) fltk3::e_keysym = fltk3::MetaLKey;
+  else if ( mods & kEventKeyModifierNumLockMask ) fltk3::e_keysym = fltk3::NumLockKey;
+  else if ( mods & optionKey ) fltk3::e_keysym = fltk3::AltLKey;
+  else if ( mods & rightOptionKey ) fltk3::e_keysym = fltk3::AltRKey;
+  else if ( mods & controlKey ) fltk3::e_keysym = fltk3::ControlLKey;
+  else if ( mods & rightControlKey ) fltk3::e_keysym = fltk3::ControlRKey;
+  else if ( mods & shiftKey ) fltk3::e_keysym = fltk3::ShiftLKey;
+  else if ( mods & rightShiftKey ) fltk3::e_keysym = fltk3::ShiftRKey;
+  else if ( mods & alphaLock ) fltk3::e_keysym = fltk3::CapsLockKey;
+  else fltk3::e_keysym = 0;
+  //printf( "to sym 0x%08x (%04x)\n", fltk3::e_keysym, mods );
+}
+// these pointers are set by the fltk3::lock() function:
+static void nothing() {}
+void (*fl_lock_function)() = nothing;
+void (*fl_unlock_function)() = nothing;
+
+//
+// Select interface -- how it's implemented:
+//     When the user app configures one or more file descriptors to monitor
+//     with fltk3::add_fd(), we start a separate thread to select() the  data,
+//     sending a custom OSX 'FLTK data ready event' to the parent  thread's
+//     RunApplicationLoop(), so that it triggers the data  ready  callbacks
+//     in the parent thread.                               -erco 04/04/04
+//     
+#define POLLIN  1
+#define POLLOUT 4
+#define POLLERR 8
+
+// Class to handle select() 'data ready'
+class DataReady
+{
+    struct FD
+    {
+      int fd;
+      short events;
+      void (*cb)(int, void*);
+      void* arg;
+    };
+    int nfds, fd_array_size;
+    FD *fds;
+    pthread_t tid;		// select()'s thread id
+
+    // Data that needs to be locked (all start with '_')
+    pthread_mutex_t _datalock;	// data lock
+    fd_set _fdsets[3];		// r/w/x sets user wants to monitor
+    int _maxfd;			// max fd count to monitor
+    int _cancelpipe[2];		// pipe used to help cancel thread
+    void *_userdata;		// thread's userdata
+
+public:
+    DataReady()
+    {
+      nfds = 0;
+      fd_array_size = 0;
+      fds = 0;
+      tid = 0;
+
+      pthread_mutex_init(&_datalock, NULL);
+      FD_ZERO(&_fdsets[0]); FD_ZERO(&_fdsets[1]); FD_ZERO(&_fdsets[2]);
+      _cancelpipe[0] = _cancelpipe[1] = 0;
+      _userdata = 0;
+      _maxfd = 0;
+    }
+
+    ~DataReady()
+    {
+        CancelThread(DEBUGTEXT("DESTRUCTOR\n"));
+        if (fds) { free(fds); fds = 0; }
+	nfds = 0;
+    }
+
+    // Locks
+    //    The convention for locks: volatile vars start with '_',
+    //    and must be locked before use. Locked code is prefixed 
+    //    with /*LOCK*/ to make painfully obvious esp. in debuggers. -erco
+    //
+    void DataLock() { pthread_mutex_lock(&_datalock); }
+    void DataUnlock() { pthread_mutex_unlock(&_datalock); }
+
+    // Accessors
+    int IsThreadRunning() { return(tid ? 1 : 0); }
+    int GetNfds() { return(nfds); }
+    int GetCancelPipe(int ix) { return(_cancelpipe[ix]); }
+    fd_set GetFdset(int ix) { return(_fdsets[ix]); }
+
+    // Methods
+    void AddFD(int n, int events, void (*cb)(int, void*), void *v);
+    void RemoveFD(int n, int events);
+    int CheckData(fd_set& r, fd_set& w, fd_set& x);
+    void HandleData(fd_set& r, fd_set& w, fd_set& x);
+    static void* DataReadyThread(void *self);
+    void StartThread(void *userdata);
+    void CancelThread(const char *reason);
+};
+
+static DataReady dataready;
+
+void DataReady::AddFD(int n, int events, void (*cb)(int, void*), void *v)
+{
+  RemoveFD(n, events);
+  int i = nfds++;
+  if (i >= fd_array_size) 
+  {
+    FD *temp;
+    fd_array_size = 2*fd_array_size+1;
+    if (!fds) { temp = (FD*)malloc(fd_array_size*sizeof(FD)); }
+    else { temp = (FD*)realloc(fds, fd_array_size*sizeof(FD)); }
+    if (!temp) return;
+    fds = temp;
+  }
+  fds[i].cb  = cb;
+  fds[i].arg = v;
+  fds[i].fd  = n;
+  fds[i].events = events;
+  DataLock();
+  /*LOCK*/  if (events & POLLIN)  FD_SET(n, &_fdsets[0]);
+  /*LOCK*/  if (events & POLLOUT) FD_SET(n, &_fdsets[1]);
+  /*LOCK*/  if (events & POLLERR) FD_SET(n, &_fdsets[2]);
+  /*LOCK*/  if (n > _maxfd) _maxfd = n;
+  DataUnlock();
+}
+
+// Remove an FD from the array
+void DataReady::RemoveFD(int n, int events)
+{
+  int i,j;
+  for (i=j=0; i<nfds; i++)
+  {
+    if (fds[i].fd == n) 
+    {
+      int e = fds[i].events & ~events;
+      if (!e) continue; // if no events left, delete this fd
+      fds[i].events = e;
+    }
+    // move it down in the array if necessary:
+    if (j<i)
+      { fds[j] = fds[i]; }
+    j++;
+  }
+  nfds = j;
+  DataLock();
+  /*LOCK*/  if (events & POLLIN)  FD_CLR(n, &_fdsets[0]);
+  /*LOCK*/  if (events & POLLOUT) FD_CLR(n, &_fdsets[1]);
+  /*LOCK*/  if (events & POLLERR) FD_CLR(n, &_fdsets[2]);
+  /*LOCK*/  if (n == _maxfd) _maxfd--;
+  DataUnlock();
+}
+
+// CHECK IF USER DATA READY, RETURNS r/w/x INDICATING WHICH IF ANY
+int DataReady::CheckData(fd_set& r, fd_set& w, fd_set& x)
+{
+  int ret;
+  DataLock();
+  /*LOCK*/  timeval t = { 0, 1 };		// quick check
+  /*LOCK*/  r = _fdsets[0], w = _fdsets[1], x = _fdsets[2];
+  /*LOCK*/  ret = ::select(_maxfd+1, &r, &w, &x, &t);
+  DataUnlock();
+  if ( ret == -1 )
+    { DEBUGPERRORMSG("CheckData(): select()"); }
+  return(ret);
+}
+
+// HANDLE DATA READY CALLBACKS
+void DataReady::HandleData(fd_set& r, fd_set& w, fd_set& x)
+{
+  for (int i=0; i<nfds; i++) 
+  {
+    int f = fds[i].fd;
+    short revents = 0;
+    if (FD_ISSET(f, &r)) revents |= POLLIN;
+    if (FD_ISSET(f, &w)) revents |= POLLOUT;
+    if (FD_ISSET(f, &x)) revents |= POLLERR;
+    if (fds[i].events & revents) 
+    {
+      DEBUGMSG("DOING CALLBACK: ");
+      fds[i].cb(f, fds[i].arg);
+      DEBUGMSG("DONE\n");
+    }
+  }
+}
+
+// DATA READY THREAD
+//    This thread watches for changes in user's file descriptors.
+//    Sends a 'data ready event' to the main thread if any change.
+//
+void* DataReady::DataReadyThread(void *o)
+{
+  DataReady *self = (DataReady*)o;
+  while ( 1 )					// loop until thread cancel or error
+  {
+    // Thread safe local copies of data before each select()
+    self->DataLock();
+    /*LOCK*/  int maxfd = self->_maxfd;
+    /*LOCK*/  fd_set r = self->GetFdset(0);
+    /*LOCK*/  fd_set w = self->GetFdset(1);
+    /*LOCK*/  fd_set x = self->GetFdset(2);
+    /*LOCK*/  void *userdata = self->_userdata;
+    /*LOCK*/  int cancelpipe = self->GetCancelPipe(0);
+    /*LOCK*/  if ( cancelpipe > maxfd ) maxfd = cancelpipe;
+    /*LOCK*/  FD_SET(cancelpipe, &r);		// add cancelpipe to fd's to watch
+    /*LOCK*/  FD_SET(cancelpipe, &x);
+    self->DataUnlock();
+    // timeval t = { 1000, 0 };	// 1000 seconds;
+    timeval t = { 2, 0 };	// HACK: 2 secs prevents 'hanging' problem
+    int ret = ::select(maxfd+1, &r, &w, &x, &t);
+    pthread_testcancel();	// OSX 10.0.4 and older: needed for parent to cancel
+    switch ( ret )
+    {
+      case 0:	// NO DATA
+        continue;
+      case -1:	// ERROR
+      {
+        DEBUGPERRORMSG("CHILD THREAD: select() failed");
+        return(NULL);		// error? exit thread
+      }
+      default:	// DATA READY
+      {
+	if (FD_ISSET(cancelpipe, &r) || FD_ISSET(cancelpipe, &x)) 	// cancel?
+	    { return(NULL); }						// just exit
+        DEBUGMSG("CHILD THREAD: DATA IS READY\n");
+        EventRef drEvent;
+        CreateEvent( 0, kEventClassFLTK, kEventFLTKDataReady,
+		     0, kEventAttributeUserEvent, &drEvent);
+        EventQueueRef eventqueue = (EventQueueRef)userdata;
+        PostEventToQueue(eventqueue, drEvent, kEventPriorityStandard );
+        ReleaseEvent( drEvent );
+        return(NULL);		// done with thread
+      }
+    }
+  }
+}
+
+// START 'DATA READY' THREAD RUNNING, CREATE INTER-THREAD PIPE
+void DataReady::StartThread(void *new_userdata)
+{
+  CancelThread(DEBUGTEXT("STARTING NEW THREAD\n"));
+  DataLock();
+  /*LOCK*/  pipe(_cancelpipe);	// pipe for sending cancel msg to thread
+  /*LOCK*/  _userdata = new_userdata;
+  DataUnlock();
+  DEBUGMSG("*** START THREAD\n");
+  pthread_create(&tid, NULL, DataReadyThread, (void*)this);
+}
+
+// CANCEL 'DATA READY' THREAD, CLOSE PIPE
+void DataReady::CancelThread(const char *reason)
+{
+  if ( tid )
+  {
+    DEBUGMSG("*** CANCEL THREAD: ");
+    DEBUGMSG(reason);
+    if ( pthread_cancel(tid) == 0 )		// cancel first
+    {
+      DataLock();
+      /*LOCK*/  write(_cancelpipe[1], "x", 1);	// wake thread from select
+      DataUnlock();
+      pthread_join(tid, NULL);			// wait for thread to finish
+    }
+    tid = 0;
+    DEBUGMSG("(JOINED) OK\n");
+  }
+  // Close pipe if open
+  DataLock();
+  /*LOCK*/  if ( _cancelpipe[0] ) { close(_cancelpipe[0]); _cancelpipe[0] = 0; }
+  /*LOCK*/  if ( _cancelpipe[1] ) { close(_cancelpipe[1]); _cancelpipe[1] = 0; }
+  DataUnlock();
+}
+
+void fltk3::add_fd( int n, int events, void (*cb)(int, void*), void *v )
+    { dataready.AddFD(n, events, cb, v); }
+
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v)
+    { dataready.AddFD(fd, POLLIN, cb, v); }
+
+void fltk3::remove_fd(int n, int events)
+    { dataready.RemoveFD(n, events); }
+
+void fltk3::remove_fd(int n)
+    { dataready.RemoveFD(n, -1); }
+
+/**
+ * Check if there is actually a message pending!
+ */
+int fl_ready()
+{
+  EventRef event;
+  return !ReceiveNextEvent(0, NULL, 0.0, false, &event);
+}
+
+/**
+ * handle Apple Menu items (can be created using the fltk3::SysMenuBar
+ * returns eventNotHandledErr if the menu item could not be handled
+ */
+OSStatus HandleMenu( HICommand *cmd )
+{
+  OSStatus ret = eventNotHandledErr;
+  // attributes, commandIDm menu.menuRef, menu.menuItemIndex
+  UInt32 ref;
+  OSErr rrc = GetMenuItemRefCon( cmd->menu.menuRef, cmd->menu.menuItemIndex, &ref );
+  //printf( "%d, %08x, %08x, %d, %d, %8x\n", rrc, cmd->attributes, cmd->commandID, cmd->menu.menuRef, cmd->menu.menuItemIndex, rrc );
+  if ( rrc==noErr && ref )
+  {
+    fltk3::MenuItem *m = (fltk3::MenuItem*)ref;
+    //printf( "Menu: %s\n", m->label() );
+    fltk3::sys_menu_bar->picked( m );
+    if ( m->flags & fltk3::MENU_TOGGLE ) // update the menu toggle symbol
+      SetItemMark( cmd->menu.menuRef, cmd->menu.menuItemIndex, (m->flags & fltk3::MENU_VALUE ) ? 0x12 : 0 );
+    if ( m->flags & fltk3::MENU_RADIO ) // update all radio buttons in this menu
+    {
+      fltk3::MenuItem *j = m;
+      int i = cmd->menu.menuItemIndex;
+      for (;;)
+      {
+        if ( j->flags & fltk3::MENU_DIVIDER )
+          break;
+        j++; i++;
+        if ( !j->text || !j->radio() )
+          break;
+        SetItemMark( cmd->menu.menuRef, i, ( j->flags & fltk3::MENU_VALUE ) ? 0x13 : 0 );
+      }
+      j = m-1; i = cmd->menu.menuItemIndex-1;
+      for ( ; i>0; j--, i-- )
+      {
+        if ( !j->text || j->flags&fltk3::MENU_DIVIDER || !j->radio() )
+          break;
+        SetItemMark( cmd->menu.menuRef, i, ( j->flags & fltk3::MENU_VALUE ) ? 0x13 : 0 );
+      }
+      SetItemMark( cmd->menu.menuRef, cmd->menu.menuItemIndex, ( m->flags & fltk3::MENU_VALUE ) ? 0x13 : 0 );
+    }
+    ret = noErr; // done handling this event
+  }
+  HiliteMenu(0);
+  return ret;
+}
+
+
+/**
+ * We can make every event pass through this function
+ * - mouse events need to be manipulated to use a mouse focus window
+ * - keyboard, mouse and some window  events need to quit the Apple Event Loop
+ *   so FLTK can continue its own management
+ */
+static pascal OSStatus carbonDispatchHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
+{
+  OSStatus ret = eventNotHandledErr;
+  HICommand cmd;
+
+  fl_lock_function();
+
+  got_events = 1;
+
+  switch ( GetEventClass( event ) )
+  {
+  case kEventClassMouse:
+    switch ( GetEventKind( event ) )
+    {
+    case kEventMouseUp:
+    case kEventMouseMoved:
+    case kEventMouseDragged:
+      if ( fl_capture )
+        ret = SendEventToEventTarget( event, GetWindowEventTarget( fl_capture ) );
+      else if ( fl_os_capture ){
+        ret = SendEventToEventTarget( event, GetWindowEventTarget( fl_os_capture ) );
+	fl_os_capture = 0;
+      }
+      break;
+    }
+    break;
+  case kEventClassCommand:
+    switch (GetEventKind( event ) )
+    {
+      case kEventCommandProcess:
+        ret = GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd );
+        if (ret == noErr && (cmd.attributes & kHICommandFromMenu) != 0) 
+          ret = HandleMenu( &cmd );
+        else 
+          ret = eventNotHandledErr;
+        break;
+    }
+    break;
+  case kEventClassFLTK:
+    switch ( GetEventKind( event ) )
+    {
+    case kEventFLTKBreakLoop:
+      ret = noErr;
+      break;
+    case kEventFLTKDataReady:
+      {
+	dataready.CancelThread(DEBUGTEXT("DATA READY EVENT\n"));
+
+        // CHILD THREAD TELLS US DATA READY
+	//     Check to see what's ready, and invoke user's cb's
+	//
+	fd_set r,w,x;
+	switch(dataready.CheckData(r,w,x))
+	{
+	  case 0:	// NO DATA
+	    break;
+	  case -1:	// ERROR
+	    break;
+	  default:	// DATA READY
+	    dataready.HandleData(r,w,x);
+	    break;
+        }
+      }
+      ret = noErr;
+      break;
+    }
+  }
+  if ( ret == eventNotHandledErr )
+    ret = CallNextEventHandler( nextHandler, event ); // let the OS handle the activation, but continue to get a click-through effect
+
+  fl_unlock_function();
+
+  return ret;
+}
+
+
+/**
+ * break the current event loop
+ */
+static void breakMacEventLoop()
+{
+  EventRef breakEvent;
+
+  fl_lock_function();
+
+  CreateEvent( 0, kEventClassFLTK, kEventFLTKBreakLoop, 0, kEventAttributeUserEvent, &breakEvent );
+  PostEventToQueue( GetCurrentEventQueue(), breakEvent, kEventPriorityStandard );
+  ReleaseEvent( breakEvent );
+
+  fl_unlock_function();
+}
+
+//
+// MacOS X timers
+//
+
+struct MacTimeout {
+    fltk3::TimeoutHandler callback;
+    void* data;
+    EventLoopTimerRef timer;
+    EventLoopTimerUPP upp;
+    char pending; 
+};
+static MacTimeout* mac_timers;
+static int mac_timer_alloc;
+static int mac_timer_used;
+
+
+static void realloc_timers()
+{
+    if (mac_timer_alloc == 0) {
+        mac_timer_alloc = 8;
+    }
+    mac_timer_alloc *= 2;
+    MacTimeout* new_timers = new MacTimeout[mac_timer_alloc];
+    memset(new_timers, 0, sizeof(MacTimeout)*mac_timer_alloc);
+    memcpy(new_timers, mac_timers, sizeof(MacTimeout) * mac_timer_used);
+    MacTimeout* delete_me = mac_timers;
+    mac_timers = new_timers;
+    delete [] delete_me;
+}
+
+static void delete_timer(MacTimeout& t)
+{
+    if (t.timer) {
+        RemoveEventLoopTimer(t.timer);
+        DisposeEventLoopTimerUPP(t.upp);
+        memset(&t, 0, sizeof(MacTimeout));
+    }
+}
+
+
+static pascal void do_timer(EventLoopTimerRef timer, void* data)
+{
+   for (int i = 0;  i < mac_timer_used;  ++i) {
+        MacTimeout& t = mac_timers[i];
+        if (t.timer == timer  &&  t.data == data) {
+            t.pending = 0;
+            (*t.callback)(data);
+            if (t.pending==0)
+              delete_timer(t);
+            break;
+        }
+    }
+    breakMacEventLoop();
+}
+
+/**
+ * This function is the central event handler.
+ * It reads events from the event queue using the given maximum time
+ * Funny enough, it returns the same time that it got as the argument. 
+ */
+static double do_queued_events( double time = 0.0 ) 
+{
+  static bool been_here = false;
+  static RgnHandle rgn;
+  
+  // initialize events and a region that enables mouse move events
+  if (!been_here) {
+    rgn = NewRgn();
+    Point mp;
+    GetMouse(&mp);
+    SetRectRgn(rgn, mp.h, mp.v, mp.h, mp.v);
+    SetEventMask(everyEvent);
+    been_here = true;
+  }
+  OSStatus ret;
+  static EventTargetRef target = 0;
+  if ( !target ) 
+  {
+    target = GetEventDispatcherTarget();
+
+    EventHandlerUPP dispatchHandler = NewEventHandlerUPP( carbonDispatchHandler ); // will not be disposed by Carbon...
+    static EventTypeSpec dispatchEvents[] = {
+        { kEventClassWindow, kEventWindowShown },
+        { kEventClassWindow, kEventWindowHidden },
+        { kEventClassWindow, kEventWindowActivated },
+        { kEventClassWindow, kEventWindowDeactivated },
+        { kEventClassWindow, kEventWindowClose },
+        { kEventClassKeyboard, kEventRawKeyDown },
+        { kEventClassKeyboard, kEventRawKeyRepeat },
+        { kEventClassKeyboard, kEventRawKeyUp },
+        { kEventClassKeyboard, kEventRawKeyModifiersChanged },
+        { kEventClassMouse, kEventMouseDown },
+        { kEventClassMouse, kEventMouseUp },
+        { kEventClassMouse, kEventMouseMoved },
+        { kEventClassMouse, 11 }, // MightyMouse wheels
+        { kEventClassMouse, kEventMouseWheelMoved },
+        { kEventClassMouse, kEventMouseDragged },
+        { kEventClassFLTK, kEventFLTKBreakLoop },
+        { kEventClassFLTK, kEventFLTKDataReady } };
+    ret = InstallEventHandler( target, dispatchHandler, GetEventTypeCount(dispatchEvents), dispatchEvents, 0, 0L );
+    static EventTypeSpec appEvents[] = {
+        { kEventClassCommand, kEventCommandProcess } };
+    ret = InstallApplicationEventHandler( dispatchHandler, GetEventTypeCount(appEvents), appEvents, 0, 0L );
+  }
+
+  got_events = 0;
+
+  // Check for re-entrant condition
+  if ( dataready.IsThreadRunning() )
+    { dataready.CancelThread(DEBUGTEXT("AVOID REENTRY\n")); }
+
+  // Start thread to watch for data ready
+  if ( dataready.GetNfds() )
+      { dataready.StartThread((void*)GetCurrentEventQueue()); }
+
+  fl_unlock_function();
+
+  EventRef event;
+  EventTimeout timeout = time;
+  if (!ReceiveNextEvent(0, NULL, timeout, true, &event)) {
+    got_events = 1;
+    OSErr ret = SendEventToEventTarget( event, target );
+    if (ret!=noErr) {
+      EventRecord clevent;
+      ConvertEventRefToEventRecord(event, &clevent);
+      if (clevent.what==kHighLevelEvent) {
+        ret = AEProcessAppleEvent(&clevent);
+      }
+    }
+    if (   ret==eventNotHandledErr
+        && GetEventClass(event)==kEventClassMouse
+        && GetEventKind(event)==kEventMouseDown ) {
+      WindowRef win; Point pos;
+      GetEventParameter(event, kEventParamMouseLocation, typeQDPoint,
+        NULL, sizeof(pos), NULL, &pos);
+      if (MacFindWindow(pos, &win)==inMenuBar) {
+        MenuSelect(pos);
+      }
+    }
+    ReleaseEvent( event );
+  }
+
+  fl_lock_function();
+
+#if CONSOLIDATE_MOTION
+  if (send_motion && send_motion == fl_xmousewin) {
+    send_motion = 0;
+    fltk3::handle(fltk3::MOVE, fl_xmousewin);
+  }
+#endif
+
+  return time;
+}
+
+
+/**
+ * This public function handles all events. It wait a maximum of 
+ * 'time' secods for an event. This version returns 1 if events
+ * other than the timeout timer were processed.
+ *
+ * \todo there is no socket handling in this code whatsoever
+ */
+int fl_wait( double time ) 
+{
+  do_queued_events( time );
+  return (got_events);
+}
+
+
+/**
+ * event handler for Apple-Q key combination
+ * this is also called from the Carbon Window handler after all windows were closed
+ */
+static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
+{
+  fl_lock_function();
+
+  while ( Fl_X::first ) {
+    Fl_X *x = Fl_X::first;
+    fltk3::handle( fltk3::CLOSE, x->w );
+    if ( Fl_X::first == x ) {
+      fl_unlock_function();
+      return noErr; // FLTK has not close all windows, so we return to the main program now
+    }
+  }
+
+  fl_unlock_function();
+
+  return noErr;
+}
+
+
+/**
+ * Carbon Window handler
+ * This needs to be linked into all new window event handlers
+ */
+static pascal OSStatus carbonWindowHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
+{
+  UInt32 kind = GetEventKind( event );
+  OSStatus ret = eventNotHandledErr;
+  fltk3::Window *window = (fltk3::Window*)userData;
+  fltk3::first_window(window);
+
+  Rect currentBounds, originalBounds;
+  WindowClass winClass;
+  static fltk3::Window *activeWindow = 0;
+  
+  fl_lock_function();
+  
+  switch ( kind )
+  {
+  case kEventWindowBoundsChanging:
+    GetEventParameter( event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds );
+    GetEventParameter( event, kEventParamOriginalBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &originalBounds );
+    break;
+  case kEventWindowDrawContent:
+    handleUpdateEvent( fl_xid( window ) );
+    ret = noErr;
+    break;
+  case kEventWindowBoundsChanged: {
+    GetEventParameter( event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds );
+    GetEventParameter( event, kEventParamOriginalBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &originalBounds );
+    int X = currentBounds.left, W = currentBounds.right-X;
+    int Y = currentBounds.top, H = currentBounds.bottom-Y;
+    resize_from_system = window;
+    window->resize( X, Y, W, H );
+    if ( ( originalBounds.right - originalBounds.left != W ) 
+      || ( originalBounds.bottom - originalBounds.top != H ) )
+    {
+      if ( window->shown() ) 
+        handleUpdateEvent( fl_xid( window ) );
+    } 
+    break; }
+  case kEventWindowShown:
+    if ( !window->parent() )
+    {
+      GetWindowClass( fl_xid( window ), &winClass );
+      if ( winClass != kHelpWindowClass ) {	// help windows can't get the focus!
+        fltk3::handle( fltk3::FOCUS, window);
+        activeWindow = window;
+      }
+      fltk3::handle( fltk3::SHOW, window);
+      mods_to_e_state(GetCurrentKeyModifiers());
+    }
+    break;
+  case kEventWindowHidden:
+    if ( !window->parent() ) fltk3::handle( fltk3::HIDE, window);
+    break;
+  case kEventWindowActivated:
+    if ( window->shown() && window!=activeWindow )
+    {
+      GetWindowClass( fl_xid( window ), &winClass );
+      if ( winClass != kHelpWindowClass ) {	// help windows can't get the focus!
+        fltk3::handle( fltk3::FOCUS, window);
+        activeWindow = window;
+      }
+    }
+    break;
+  case kEventWindowDeactivated:
+    if ( window==activeWindow ) 
+    {
+      fltk3::handle( fltk3::UNFOCUS, window);
+      activeWindow = 0;
+    }
+    break;
+  case kEventWindowClose:
+    fltk3::handle( fltk3::CLOSE, window ); // this might or might not close the window
+    // if there are no more windows, send a high-level quit event
+    if (!Fl_X::first) QuitAppleEventHandler( 0, 0, 0 );
+    ret = noErr; // returning noErr tells Carbon to stop following up on this event
+    break;
+  case kEventWindowCollapsed:
+    window->clear_visible();
+    break;
+  case kEventWindowExpanded:
+    window->set_visible();
+    break;
+  }
+
+  fl_unlock_function();
+
+  return ret;
+}
+
+
+/**
+ * Carbon Mousewheel handler
+ * This needs to be linked into all new window event handlers
+ */
+static pascal OSStatus carbonMousewheelHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
+{
+  // Handle the new "MightyMouse" mouse wheel events. Please, someone explain
+  // to me why Apple changed the API on this even though the current API
+  // supports two wheels just fine. Matthias,
+  fl_lock_function();
+
+  fl_os_event = event;
+  fltk3::Window *window = (fltk3::Window*)userData;
+  if ( !window->shown() )
+  {
+    fl_unlock_function();
+    return noErr;
+  }
+  fltk3::first_window(window);
+
+  EventMouseWheelAxis axis;
+  GetEventParameter( event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof(EventMouseWheelAxis), NULL, &axis );
+  long delta;
+  GetEventParameter( event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(long), NULL, &delta );
+//  fprintf(stderr, "axis=%d, delta=%d\n", axis, delta);
+  if ( axis == kEventMouseWheelAxisX ) {
+    fltk3::e_dx = -delta;
+    fltk3::e_dy = 0;
+    if ( fltk3::e_dx) fltk3::handle( fltk3::MOUSEWHEEL, window );
+  } else if ( axis == kEventMouseWheelAxisY ) {
+    fltk3::e_dx = 0;
+    fltk3::e_dy = -delta;
+    if ( fltk3::e_dy) fltk3::handle( fltk3::MOUSEWHEEL, window );
+  } else {
+    fl_unlock_function();
+
+    return eventNotHandledErr;
+  }
+
+  fl_unlock_function();
+  
+  return noErr;
+}
+
+
+/**
+ * convert the current mouse chord into the FLTK modifier state
+ */
+static void chord_to_e_state( UInt32 chord )
+{
+  static ulong state[] = 
+  { 
+    0, fltk3::BUTTON1, fltk3::BUTTON3, fltk3::BUTTON1|fltk3::BUTTON3, fltk3::BUTTON2,
+    fltk3::BUTTON2|fltk3::BUTTON1, fltk3::BUTTON2|fltk3::BUTTON3, 
+    fltk3::BUTTON2|fltk3::BUTTON1|fltk3::BUTTON3
+  };
+  fltk3::e_state = ( fltk3::e_state & 0xff0000 ) | state[ chord & 0x07 ];
+}
+
+
+/**
+ * Carbon Mouse Button Handler
+ */
+static pascal OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
+{
+  static int keysym[] = { 0, fltk3::MouseButton+1, fltk3::MouseButton+3, fltk3::MouseButton+2 };
+  static int px, py;
+  static char suppressed = 0;
+
+  fl_lock_function();
+  
+  fl_os_event = event;
+  fltk3::Window *window = (fltk3::Window*)userData;
+  if ( !window->shown() )
+  {
+    fl_unlock_function();
+    return noErr;
+  }
+  fltk3::first_window(window);
+  Point pos;
+  GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &pos );
+  EventMouseButton btn;
+  GetEventParameter( event, kEventParamMouseButton, typeMouseButton, NULL, sizeof(EventMouseButton), NULL, &btn );
+  UInt32 clickCount;
+  GetEventParameter( event, kEventParamClickCount, typeUInt32, NULL, sizeof(UInt32), NULL, &clickCount );
+  UInt32 chord;
+  GetEventParameter( event, kEventParamMouseChord, typeUInt32, NULL, sizeof(UInt32), NULL, &chord );
+  WindowRef xid = fl_xid(window), tempXid;
+  int sendEvent = 0, part = 0;
+  switch ( GetEventKind( event ) )
+  {
+  case kEventMouseDown:
+    part = FindWindow( pos, &tempXid );
+    if (!(fltk3::grab() && window!=fltk3::grab())) {
+      if ( part == inGrow ) {
+        fl_unlock_function();
+        suppressed = 1;
+        fltk3::Tooltip::current(0L);
+        return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
+      }
+      if ( part != inContent ) {
+        fl_unlock_function();
+        suppressed = 1;
+        fltk3::Tooltip::current(0L);
+        // anything else to here?
+        return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
+      }
+    }
+    suppressed = 0;
+    if (part==inContent && !IsWindowActive( xid ) ) {
+      CallNextEventHandler( nextHandler, event ); // let the OS handle the activation, but continue to get a click-through effect
+    }
+    // normal handling of mouse-down follows
+    fl_os_capture = xid;
+    sendEvent = fltk3::PUSH;
+    fltk3::e_is_click = 1; px = pos.h; py = pos.v;
+    if (clickCount>1) 
+      fltk3::e_clicks++;
+    else
+      fltk3::e_clicks = 0;
+    // fall through
+  case kEventMouseUp:
+    if (suppressed) {
+      suppressed = 0;
+      break;
+    }
+    if ( !window ) break;
+    if ( !sendEvent ) {
+      sendEvent = fltk3::RELEASE; 
+    }
+    fltk3::e_keysym = keysym[ btn ];
+    // fall through
+  case kEventMouseMoved:
+    suppressed = 0;
+    if ( !sendEvent ) { 
+      sendEvent = fltk3::MOVE; chord = 0; 
+    }
+    // fall through
+  case kEventMouseDragged:
+    if (suppressed) break;
+    if ( !sendEvent ) {
+      sendEvent = fltk3::MOVE; // fltk3::handle will convert into fltk3::DRAG
+      if (abs(pos.h-px)>5 || abs(pos.v-py)>5) 
+        fltk3::e_is_click = 0;
+    }
+    chord_to_e_state( chord );
+    GrafPtr oldPort;
+    GetPort( &oldPort );
+    SetPort( GetWindowPort(xid) ); // \todo replace this! There must be some GlobalToLocal call that has a port as an argument
+    SetOrigin(0, 0);
+    fltk3::e_x_root = pos.h;
+    fltk3::e_y_root = pos.v;
+    GlobalToLocal( &pos );
+    fltk3::e_x = pos.h;
+    fltk3::e_y = pos.v;
+    SetPort( oldPort );
+    if (GetEventKind(event)==kEventMouseDown && part!=inContent) {
+      int used = fltk3::handle( sendEvent, window );
+      CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
+      if (!used) 
+        suppressed = 1;
+    } else {
+      fltk3::handle( sendEvent, window );
+    }
+    break;
+  }
+
+  fl_unlock_function();
+  
+  return noErr;
+}
+
+
+/**
+ * convert the keyboard return code into the symbol on the keycaps
+ */
+static unsigned short keycode_to_sym( UInt32 keyCode, UInt32 mods, unsigned short deflt )
+{
+  static Ptr map = 0;
+  UInt32 state = 0;
+  if (!map) {
+    map = (Ptr)GetScriptManagerVariable(smKCHRCache);
+    if (!map) {
+      long kbID = GetScriptManagerVariable(smKeyScript);
+      map = *GetResource('KCHR', kbID);
+    }
+  }
+  if (map)
+    return KeyTranslate(map, keyCode|mods, &state );
+  return deflt;
+}
+
+/*
+ * keycode_function for post-10.5 systems, allows more sophisticated decoding of keys
+ */
+static int keycodeToUnicode(
+                char * uniChars, int maxChars,
+                EventKind eKind,
+                UInt32 keycode, UInt32 modifiers,
+                UInt32 * deadKeyStatePtr,
+                unsigned char,  // not used in this function
+                unsigned short) // not used in this function
+{
+  // first get the keyboard mapping in a post 10.2 way
+  
+  Ptr resource;
+  TextEncoding encoding;
+  static TextEncoding lastEncoding = kTextEncodingMacRoman;
+  int len = 0;
+  KeyboardLayoutRef currentLayout = NULL;
+  static KeyboardLayoutRef lastLayout = NULL;
+  SInt32 currentLayoutId = 0;
+  static SInt32 lastLayoutId;
+  int hasLayoutChanged = false;
+  static Ptr uchr = NULL;
+  static Ptr KCHR = NULL;
+  // ScriptCode currentKeyScript;
+  
+  KLGetCurrentKeyboardLayout(&currentLayout);
+  if (currentLayout) {
+    KLGetKeyboardLayoutProperty(currentLayout, kKLIdentifier, (const void**)&currentLayoutId);
+    if ( (lastLayout != currentLayout) || (lastLayoutId != currentLayoutId) ) {
+      lastLayout = currentLayout;
+      lastLayoutId = currentLayoutId;
+      uchr = NULL;
+      KCHR = NULL;
+      if ((KLGetKeyboardLayoutProperty(currentLayout, kKLuchrData, (const void**)&uchr) == noErr) && (uchr != NULL)) {
+        // done
+      } else if ((KLGetKeyboardLayoutProperty(currentLayout, kKLKCHRData, (const void**)&KCHR) == noErr) && (KCHR != NULL)) {
+        // done
+      }
+      // FIXME No Layout property found. Now we have a problem. 
+    }
+  }
+  if (hasLayoutChanged) {
+    //deadKeyStateUp = deadKeyStateDown = 0;
+    if (KCHR != NULL) {
+      // FIXME this must not happen
+    } else if (uchr == NULL) {
+      KCHR = (Ptr) GetScriptManagerVariable(smKCHRCache);
+    }
+  }
+  if (uchr != NULL) {
+    // this is what I expect
+    resource = uchr;
+  } else {
+    resource = KCHR;
+    encoding = lastEncoding;
+    // this is actually not supported by the following code and will likely crash
+  }
+  
+  // now apply that keyboard mapping to our keycode
+  
+  int action;
+  //OptionBits options = 0;
+  // not used yet: OptionBits options = kUCKeyTranslateNoDeadKeysMask;
+  unsigned long keyboardType;
+  keycode &= 0xFF;
+  modifiers = (modifiers >> 8) & 0xFF;
+  keyboardType = LMGetKbdType();
+  OSStatus status;
+  UniCharCount actuallength;
+  UniChar utext[10];
+  
+  switch(eKind) {     
+    case kEventRawKeyDown:    action = kUCKeyActionDown; break;
+    case kEventRawKeyUp:      action = kUCKeyActionUp; break;
+    case kEventRawKeyRepeat:  action = kUCKeyActionAutoKey; break;
+    default: return 0;
+  }
+
+  UInt32 deadKeyState = *deadKeyStatePtr;
+  if ((action==kUCKeyActionUp)&&(*deadKeyStatePtr))
+    deadKeyStatePtr = &deadKeyState;
+
+  status = UCKeyTranslate(
+                          (const UCKeyboardLayout *) uchr,
+                          keycode, action, modifiers, keyboardType,
+                          0, deadKeyStatePtr,
+                          10, &actuallength, utext);
+
+  if (noErr != status) {
+    fprintf(stderr,"UCKeyTranslate failed: %d\n", (int) status);
+    actuallength = 0;
+  }
+
+  // convert the list of unicode chars into utf8
+  // FIXME no bounds check (see maxchars)
+  unsigned i;
+  for (i=0; i<actuallength; ++i) {
+    len += fltk3::utf8encode(utext[i], uniChars+len);
+  }
+  uniChars[len] = 0;
+  return len;
+}
+
+/*
+ * keycode_function for pre-10.5 systems, this is the "historic" fltk Mac key handling
+ */
+static int keycode_wrap_old(
+                char * buffer,
+                int, EventKind, UInt32, // not used in this function
+                UInt32, UInt32 *,       // not used in this function
+                unsigned char key,
+                unsigned short sym)
+{
+  if ( (sym >= fltk3::KPKey && sym <= fltk3::KPLastKey) || !(sym & 0xff00) ||
+        sym == fltk3::TabKey || sym == fltk3::EnterKey) {
+    buffer[0] = key;
+    return 1;
+  } else {
+    buffer[0] = 0;
+    return 0;
+  }
+} /* keycode_wrap_old */
+/* 
+ * Stub pointer to select appropriate keycode_function per operating system version. This function pointer
+ * is initialised in fl_open_display, based on the runtime identification of the host OS version. This is
+ * intended to allow us to utilise 10.5 services dynamically to improve Unicode handling, whilst still 
+ * allowing code to run satisfactorily on older systems.
+ */
+static int (*keycode_function)(char*, int, EventKind, UInt32, UInt32, UInt32*, unsigned char, unsigned short) = keycode_wrap_old;
+
+
+// EXPERIMENTAL!
+pascal OSStatus carbonTextHandler( 
+  EventHandlerCallRef nextHandler, EventRef event, void *userData )
+{
+  fltk3::Window *window = (fltk3::Window*)userData;
+  fltk3::first_window(window);
+  fl_lock_function();
+  //int kind = GetEventKind(event);
+  unsigned short buf[200];
+  ByteCount size;
+  GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, 
+                     NULL, 100, &size, &buf );
+//  printf("TextEvent: %02x %02x %02x %02x\n", buf[0], buf[1], buf[2], buf[3]);
+  // FIXME: oversimplified!
+  unsigned ucs = buf[0];
+  char utf8buf[20];
+  int len = fltk3::utf8encode(ucs, utf8buf);
+  fltk3::e_length = len;
+  fltk3::e_text = utf8buf;
+  while (window->parent()) window = window->window();
+  fltk3::handle(fltk3::KEYBOARD, window);
+  fl_unlock_function();
+  fl_lock_function();
+  fltk3::handle(fltk3::KEYUP, window);
+  fl_unlock_function();
+  // for some reason, the window does not redraw until the next mouse move or button push
+  // sending a 'redraw()' or 'awake()' does not solve the issue!
+  fltk3::flush();
+  return noErr;
+}  
+
+/**
+ * handle carbon keyboard events
+ */
+pascal OSStatus carbonKeyboardHandler( 
+  EventHandlerCallRef nextHandler, EventRef event, void *userData )
+{
+  static char buffer[32];
+  int sendEvent = 0;
+  fltk3::Window *window = (fltk3::Window*)userData;
+  fltk3::first_window(window);
+  UInt32 mods;
+  static UInt32 prevMods = mods_to_e_state( GetCurrentKeyModifiers() );
+
+  fl_lock_function();
+  
+  int kind = GetEventKind(event);
+  
+  // get the modifiers for any of the events
+  GetEventParameter( event, kEventParamKeyModifiers, typeUInt32, 
+                     NULL, sizeof(UInt32), NULL, &mods );
+  
+  // get the key code only for key events
+  UInt32 keyCode = 0, maskedKeyCode = 0;
+  unsigned char key = 0;
+  unsigned short sym = 0;
+  if (kind!=kEventRawKeyModifiersChanged) {
+    GetEventParameter( event, kEventParamKeyCode, typeUInt32, 
+                       NULL, sizeof(UInt32), NULL, &keyCode );
+    GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, 
+                       NULL, sizeof(char), NULL, &key );
+  }
+  // extended keyboards can also send sequences on key-up to generate Kanji etc. codes.
+  // Some observed prefixes are 0x81 to 0x83, followed by an 8 bit keycode.
+  // In this mode, there seem to be no key-down codes
+// printf("%08x %08x %08x\n", keyCode, mods, key);
+  maskedKeyCode = keyCode & 0x7f;
+  /* output a human readable event identifier for debugging 
+  const char *ev = "";
+  switch (kind) {
+    case kEventRawKeyDown: ev = "kEventRawKeyDown"; break;
+    case kEventRawKeyRepeat: ev = "kEventRawKeyRepeat"; break;
+    case kEventRawKeyUp: ev = "kEventRawKeyUp"; break;
+    case kEventRawKeyModifiersChanged: ev = "kEventRawKeyModifiersChanged"; break;
+    default: ev = "unknown";
+  }
+  printf("%08x %08x %08x '%c' %s \n", mods, keyCode, key, key, ev);
+  */
+  switch (kind)
+  {
+  case kEventRawKeyDown:
+  case kEventRawKeyRepeat:
+/*
+    // FIXME Matt: For 10.5, the keycode_function will handle all this. This is untested for ealier versions of OS X.
+    // When the user presses a "dead key", no information is send about
+    // which dead key symbol was created. So we need to trick Carbon into
+    // giving us the code by sending a "space" after the "dead key".
+    if (key==0) {
+      UInt32 ktState = 0;
+      KeyboardLayoutRef klr;
+      KLGetCurrentKeyboardLayout(&klr);
+      const void *kchar = 0; KLGetKeyboardLayoutProperty(klr, kKLKCHRData, &kchar);
+      KeyTranslate(kchar, (mods&0xff00) | keyCode, &ktState); // send the dead key
+      key = KeyTranslate(kchar, 0x31, &ktState); // fake a space key press
+      fltk3::e_state |= 0x40000000; // mark this as a dead key
+    } else {
+      fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
+    }
+*/
+    sendEvent = fltk3::KEYBOARD;
+    // fall through
+  case kEventRawKeyUp:
+    if ( !sendEvent ) {
+      sendEvent = fltk3::KEYUP;
+      fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
+    }
+    // if the user pressed alt/option, event_key should have the keycap, 
+    // but event_text should generate the international symbol
+    sym = macKeyLookUp[maskedKeyCode];
+    if ( isalpha(key) )
+      sym = tolower(key);
+    else if ( fltk3::e_state&fltk3::CTRL && key<32 && sym<0xff00)
+      sym = key+96;
+    else if ( fltk3::e_state&fltk3::ALT && sym<0xff00) // find the keycap of this key
+      sym = keycode_to_sym( maskedKeyCode, 0, macKeyLookUp[ maskedKeyCode ] );
+    fltk3::e_keysym = fltk3::e_original_keysym = sym;
+    // Handle fltk3::KPEnterKey on regular keyboards and on Powerbooks
+    if ( maskedKeyCode==0x4c || maskedKeyCode==0x34) key=0x0d;    
+    // Handle the Delete key on the keypad
+    // Matt: the Mac has no concept of a NumLock key, or at least not visible
+    // Matt: to Carbon. The kEventKeyModifierNumLockMask is only set when
+    // Matt: a numeric keypad key is pressed and does not correspond with
+    // Matt: the NumLock light in PowerBook keyboards.
+
+    // Matt: attempt to get the correct Unicode character(s) from our keycode
+    // imm:  keycode_function function pointer added to allow us to use different functions
+    // imm:  depending on which OS version we are running on (tested and set in fl_open_display)
+    static UInt32 deadKeyState = 0; // must be cleared when losing focus
+    fltk3::e_length = (*keycode_function)(buffer, 31, kind, keyCode, mods, &deadKeyState, key, sym);
+    fltk3::e_text = buffer;
+    buffer[fltk3::e_length] = 0; // just in case...
+    break;
+  case kEventRawKeyModifiersChanged: {
+    UInt32 tMods = prevMods ^ mods;
+    if ( tMods )
+    {
+      mods_to_e_keysym( tMods );
+      if ( fltk3::e_keysym ) 
+        sendEvent = ( prevMods<mods ) ? fltk3::KEYBOARD : fltk3::KEYUP;
+      fltk3::e_length = 0;
+      buffer[0] = 0;
+      prevMods = mods;
+    }
+    mods_to_e_state( mods );
+    break; }
+  }
+  while (window->parent()) window = window->window();
+  if (sendEvent && fltk3::handle(sendEvent,window)) {
+    fl_unlock_function();  
+    return noErr; // return noErr if FLTK handled the event
+  } else {
+    fl_unlock_function();
+    //return CallNextEventHandler( nextHandler, event );;
+    // Matt: I had better results (no duplicate events) always returning
+    // Matt: 'noErr'. System keyboard events still seem to work just fine.
+    return noErr;
+  }
+}
+
+
+
+/**
+ * Open callback function to call...
+ */
+
+static void	(*open_cb)(const char *) = 0;
+
+
+/**
+ * Event handler for Apple-O key combination and also for file opens
+ * via the finder...
+ */
+
+static OSErr OpenAppleEventHandler(const AppleEvent *appleEvt,
+                                   AppleEvent *reply,
+				   UInt32 refcon) {
+  OSErr err;
+  AEDescList documents;
+  long i, n;
+  FSSpec fileSpec;
+  AEKeyword keyWd;
+  DescType typeCd;
+  Size actSz;
+  char filename[1024];
+
+  if (!open_cb) return noErr;
+
+  // Initialize the document list...
+  AECreateDesc(typeNull, NULL, 0, &documents);
+ 
+  // Get the open parameter(s)...
+  err = AEGetParamDesc(appleEvt, keyDirectObject, typeAEList, &documents);
+  if (err != noErr) {
+    AEDisposeDesc(&documents);
+    return err;
+  }
+
+  // Lock access to FLTK in this thread...
+  fl_lock_function();
+
+  // Open the documents via the callback...
+  if (AECountItems(&documents, &n) == noErr) {
+    for (i = 1; i <= n; i ++) {
+      // Get the next FSSpec record...
+      AEGetNthPtr(&documents, i, typeFSS, &keyWd, &typeCd,
+                  (Ptr)&fileSpec, sizeof(fileSpec),
+		  (actSz = sizeof(fileSpec), &actSz));
+
+      // Convert to a UNIX path...
+      FSSpec2UnixPath(&fileSpec, filename);
+
+      // Call the callback with the filename...
+      (*open_cb)(filename);
+    }
+  }
+
+  // Unlock access to FLTK for all threads...
+  fl_unlock_function();
+
+  // Get rid of the document list...
+  AEDisposeDesc(&documents);
+
+  return noErr;
+}
+
+
+/**
+ * Install an open documents event handler...
+ */
+
+void fl_open_callback(void (*cb)(const char *)) {
+  open_cb = cb;
+  if (cb) {
+    AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
+                          NewAEEventHandlerUPP((AEEventHandlerProcPtr)
+			      OpenAppleEventHandler), 0, false);
+  } else {
+    AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments,
+                          NewAEEventHandlerUPP((AEEventHandlerProcPtr)
+			      OpenAppleEventHandler), false);
+  }
+}
+
+
+/**
+ * initialize the Mac toolboxes, dock status, and set the default menubar
+ */
+
+extern "C" {
+  extern OSErr CPSEnableForegroundOperation(ProcessSerialNumber *psn, UInt32 _arg2,
+    UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+}
+
+void fl_open_display() {
+  static char beenHereDoneThat = 0;
+  if ( !beenHereDoneThat )  {
+    beenHereDoneThat = 1;
+    
+    FlushEvents(everyEvent,0);
+    
+    MoreMasters(); // \todo Carbon suggests MoreMasterPointers()
+    AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false );
+    
+    // create the Mac Handle for the default cursor (a pointer to a pointer)
+    GetQDGlobalsArrow(&default_cursor);
+    default_cursor_ptr = &default_cursor;
+    fl_default_cursor  = &default_cursor_ptr;
+    
+    ClearMenuBar();
+    AppendResMenu( GetMenuHandle( 1 ), 'DRVR' );
+    DrawMenuBar();
+    
+    // bring the application into foreground without a 'CARB' resource
+    Boolean same_psn;
+    ProcessSerialNumber cur_psn, front_psn;
+    if( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) &&
+       !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn )
+    {
+      // only transform the application type for unbundled apps
+      CFBundleRef bundle = CFBundleGetMainBundle();
+      if( bundle )
+      {
+      	FSRef execFs;
+      	CFURLRef execUrl = CFBundleCopyExecutableURL( bundle );
+      	CFURLGetFSRef( execUrl, &execFs );
+        
+      	FSRef bundleFs;
+      	GetProcessBundleLocation( &cur_psn, &bundleFs );
+        
+      	if( !FSCompareFSRefs( &execFs, &bundleFs ) )
+          bundle = NULL;
+        
+        CFRelease(execUrl);
+      }
+      
+      if( !bundle )
+      {
+        // Earlier versions of this code tried to use weak linking, however it
+        // appears that this does not work on 10.2.  Since 10.3 and higher provide
+        // both TransformProcessType and CPSEnableForegroundOperation, the following
+        // conditional code compiled on 10.2 will still work on newer releases...
+        OSErr err;
+        
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+        if (TransformProcessType != NULL) {
+          err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication);
+        } else
+#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+          err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103);
+        
+        if (err == noErr) {
+          SetFrontProcess( &cur_psn );
+        }
+      }
+    }
+    
+    // imm: keycode handler stub setting - use Gestalt to determine the running system version,
+    // then set the keycode_function pointer accordingly
+    keycode_function = keycode_wrap_old; // default to pre-10.5 mechanism
+    SInt32 MacVersion;
+    if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr)
+    {
+      if(MacVersion >= 0x1050) { // 10.5.0 or later
+        keycode_function = keycodeToUnicode;
+      }
+    }
+  }
+}
+
+
+/**
+ * get rid of allocated resources
+ */
+void fl_close_display()  {
+}
+
+
+/**
+ * smallest x ccordinate in screen space
+ */
+int fltk3::x() {
+  BitMap r;
+  GetQDGlobalsScreenBits(&r);
+  return r.bounds.left;
+}
+
+
+/**
+ * smallest y ccordinate in screen space
+ */
+int fltk3::y() {
+  BitMap r;
+  GetQDGlobalsScreenBits(&r);
+  return r.bounds.top + 20; // \todo 20 pixel menu bar?
+}
+
+
+/**
+ * screen width (single monitor!?)
+ */
+int fltk3::w() {
+  BitMap r;
+  GetQDGlobalsScreenBits(&r);
+  return r.bounds.right - r.bounds.left;
+}
+
+
+/**
+ * screen height (single monitor!?)
+ */
+int fltk3::h() {
+  BitMap r;
+  GetQDGlobalsScreenBits(&r);
+  return r.bounds.bottom - r.bounds.top - 20;
+}
+
+
+/**
+ * get the current mouse pointer world coordinates
+ */
+void fltk3::get_mouse(int &x, int &y) 
+{
+  fl_open_display();
+  Point loc; 
+  GetMouse( &loc );
+  LocalToGlobal( &loc );
+  x = loc.h;
+  y = loc.v;
+}
+
+
+/**
+ * convert Mac keystrokes to FLTK
+ */
+unsigned short mac2fltk(ulong macKey) 
+{
+  unsigned short cc = macKeyLookUp[(macKey>>8)&0x7f];
+  if (cc) return cc;
+  return macKey&0xff;
+}
+
+
+/**
+ * Initialize the given port for redraw and call the windw's flush() to actually draw the content
+ */ 
+void Fl_X::flush()
+{
+  w->flush();
+  if (fl_gc) 
+    CGContextFlush(fl_gc);
+  SetOrigin( 0, 0 );
+}
+
+
+/**
+ * Handle all clipping and redraw for the given port
+ * There are two different callers for this event:
+ * 1: the OS can request a redraw and provides all clipping itself
+ * 2: fltk3::flush() wants all redraws now
+ */    
+void handleUpdateEvent( WindowPtr xid ) 
+{
+  fltk3::Window *window = fl_find( xid );
+  if ( !window ) return;
+  GrafPtr oldPort;
+  GetPort( &oldPort );
+  SetPort( GetWindowPort(xid) );
+  Fl_X *i = Fl_X::i( window );
+  i->wait_for_expose = 0;
+  if ( window->damage() ) {
+    if ( i->region ) {
+      InvalWindowRgn( xid, i->region );
+    }
+  }
+  if ( i->region ) { // no region, so the sytem will take the update region from the OS
+    DisposeRgn( i->region );
+    i->region = 0;
+  }
+  for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext )
+  {
+    cx->w->clear_damage(window->damage()|fltk3::DAMAGE_EXPOSE);
+    cx->flush();
+    cx->w->clear_damage();
+  }
+  window->clear_damage(window->damage()|fltk3::DAMAGE_EXPOSE);
+  i->flush();
+  window->clear_damage();
+  SetPort( oldPort );
+}     
+
+// Gets the border sizes and the titlebar size
+static void get_window_frame_sizes(int &bx, int &by, int &bt) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+	static HIRect contentRect = { {50,50}, {100,100} }; // a rect to stand in for the content rect of a real window
+	static HIThemeWindowDrawInfo metrics= {0, 
+		kThemeStateActive, kThemeDocumentWindow,
+		kThemeWindowHasFullZoom + kThemeWindowHasCloseBox + 
+		kThemeWindowHasCollapseBox + kThemeWindowHasTitleText, 
+		0, 0};
+	HIShapeRef shape1=0, shape2=0, shape3=0;
+	HIRect rect1, rect2, rect3;
+	OSStatus	status;
+	status  = HIThemeGetWindowShape(&contentRect, &metrics, kWindowStructureRgn, &shape1);
+	status |= HIThemeGetWindowShape(&contentRect, &metrics, kWindowContentRgn, &shape2);
+	status |= HIThemeGetWindowShape(&contentRect, &metrics, kWindowTitleBarRgn, &shape3);
+    
+	if (!status) 
+	{
+		HIShapeGetBounds(shape1, &rect1);
+		HIShapeGetBounds(shape2, &rect2);
+		HIShapeGetBounds(shape3, &rect3);
+		bt = rect3.size.height;
+		bx = rect2.origin.x  - rect1.origin.x;
+		by = rect2.origin.y  - rect1.origin.y - bt;
+		// fprintf(stderr, "HIThemeGetWindowShape succeeded bx=%d by=%d bt=%d\n", bx, by, bt);
+	}		
+	else 
+#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+	{
+		// sets default dimensions
+		bx = by = 6;
+		bt = 22;
+		// fprintf(stderr, "HIThemeGetWindowShape failed, bx=%d by=%d bt=%d\n", bx, by, bt);
+	}
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+	CFRelease(shape1); // we must free HIThemeGetWindowShape() (copied) handles 
+	CFRelease(shape2);
+	CFRelease(shape3);
+#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+}
+
+/**
+ * \todo this is a leftover from OS9 times. Please check how much applies to Carbon!
+ */
+int Fl_X::fake_X_wm(const fltk3::Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
+  int W, H, xoff, yoff, dx, dy;
+  int ret = bx = by = bt = 0;
+  if (w->border() && !w->parent()) {
+    if (w->maxw != w->minw || w->maxh != w->minh) {
+      ret = 2;
+      get_window_frame_sizes(bx, by, bt);
+      /*
+        bx = 6; // \todo Mac : GetSystemMetrics(SM_CXSIZEFRAME);
+        by = 6; // \todo Mac : get Mac window frame size GetSystemMetrics(SM_CYSIZEFRAME);
+      */
+    } else {
+      ret = 1;
+      get_window_frame_sizes(bx, by, bt);
+      /*
+        bx = 6; // \todo Mac : GetSystemMetrics(SM_CXFIXEDFRAME);
+        by = 6; // \todo Mac : GetSystemMetrics(SM_CYFIXEDFRAME);
+      */
+    }
+  }
+  //The coordinates of the whole window, including non-client area
+  xoff = bx;
+  yoff = by + bt;
+  dx = 2*bx;
+  dy = 2*by + bt;
+  X = w->x()-xoff;
+  Y = w->y()-yoff;
+  W = w->w()+dx;
+  H = w->h()+dy;
+
+  //Proceed to positioning the window fully inside the screen, if possible
+
+  // let's get a little elaborate here. Mac OS X puts a lot of stuff on the desk
+  // that we want to avoid when positioning our window, namely the Dock and the
+  // top menu bar (and even more stuff in 10.4 Tiger). So we will go through the
+  // list of all available screens and find the one that this window is most
+  // likely to go to, and then reposition it to fit withing the 'good' area.
+  Rect r;
+  // find the screen, that the center of this window will fall into
+  int R = X+W, B = Y+H; // right and bottom
+  int cx = (X+R)/2, cy = (Y+B)/2; // center of window;
+  GDHandle gd = 0L;
+  for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
+  GDPtr gp = *gd;
+  if (    cx >= gp->gdRect.left && cx <= gp->gdRect.right
+       && cy >= gp->gdRect.top  && cy <= gp->gdRect.bottom)
+    break;
+  }
+  // if the center doesn't fall on a screen, try the top left
+  if (!gd) {
+    for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
+      GDPtr gp = *gd;
+      if (    X >= gp->gdRect.left && X <= gp->gdRect.right
+           && Y >= gp->gdRect.top  && Y <= gp->gdRect.bottom)
+        break;
+    }
+  }
+  // if that doesn't fall on a screen, try the top right
+  if (!gd) {
+    for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
+      GDPtr gp = *gd;
+      if (    R >= gp->gdRect.left && R <= gp->gdRect.right
+           && Y >= gp->gdRect.top  && Y <= gp->gdRect.bottom)
+        break;
+    }
+  }
+  // if that doesn't fall on a screen, try the bottom left
+  if (!gd) {
+    for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
+      GDPtr gp = *gd;
+      if (    X >= gp->gdRect.left && X <= gp->gdRect.right
+           && B >= gp->gdRect.top  && B <= gp->gdRect.bottom)
+        break;
+    }
+  }
+  // last resort, try the bottom right
+  if (!gd) {
+    for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
+      GDPtr gp = *gd;
+      if (    R >= gp->gdRect.left && R <= gp->gdRect.right
+           && B >= gp->gdRect.top  && B <= gp->gdRect.bottom)
+        break;
+    }
+  }
+  // if we still have not found a screen, we will use the main
+  // screen, the one that has the application menu bar.
+  if (!gd) gd = GetMainDevice();
+  if (gd) {
+    GetAvailableWindowPositioningBounds(gd, &r);
+    if ( R > r.right )  X -= R - r.right;
+    if ( B > r.bottom ) Y -= B - r.bottom;
+    if ( X < r.left )   X = r.left;
+    if ( Y < r.top )    Y = r.top;
+  }
+
+  //Return the client area's top left corner in (X,Y)
+  X+=xoff;
+  Y+=yoff;
+
+  return ret;
+}
+
+/**
+ * convert a Mac FSSpec structure into a Unix filename 
+ */
+static int FSSpec2UnixPath( FSSpec *fs, char *dst )
+{
+  FSRef fsRef;
+  FSpMakeFSRef( fs, &fsRef );
+  FSRefMakePath( &fsRef, (UInt8*)dst, 1024 );
+  return strlen(dst);
+}
+static void convert_crlf(char * s, size_t len)
+{
+  // turn all \r characters into \n:
+  for (size_t x = 0; x < len; x++) if (s[x] == '\r') s[x] = '\n';
+}
+
+
+static DragReference currDragRef = 0;
+static char *currDragData = 0L;
+static int currDragSize = 0; 
+static OSErr currDragErr = noErr;
+fltk3::Window *fl_dnd_target_window = 0;
+#include <fltk3/draw.h>
+
+/**
+ * Fill the currDrag* variables with the current DnD ASCII text.
+ */
+static OSErr fillCurrentDragData(DragReference dragRef)
+{
+  OSErr ret = noErr;
+  char *dst = 0L;
+  
+  // shortcut through this whole procedure if this is still the same drag event
+  if (dragRef==currDragRef)
+    return currDragErr;
+  
+  // clear currDrag* for a new drag event
+  currDragRef = dragRef;
+  if (currDragData) free(currDragData);
+  currDragData = 0;
+  currDragSize = 0;
+  
+  // fill currDRag* with ASCII data, if available
+  UInt16 i, nItem;
+  ItemReference itemRef;
+  FlavorFlags flags;
+  Size itemSize, size = 0;
+  CountDragItems( dragRef, &nItem );
+
+  for ( i = 1; i <= nItem; i++ )
+  {
+    GetDragItemReferenceNumber( dragRef, i, &itemRef );
+    ret = GetFlavorFlags( dragRef, itemRef, 'utf8', &flags );
+    if ( ret == noErr )
+    {
+      GetFlavorDataSize( dragRef, itemRef, 'utf8', &itemSize );
+      size += itemSize;
+      continue;
+    }
+    ret = GetFlavorFlags( dragRef, itemRef, 'utxt', &flags );
+    if ( ret == noErr )
+    {
+      GetFlavorDataSize( dragRef, itemRef, 'utxt', &itemSize );
+      size += itemSize;
+      continue;
+    }
+    ret = GetFlavorFlags( dragRef, itemRef, 'TEXT', &flags );
+    if ( ret == noErr )
+    {
+      GetFlavorDataSize( dragRef, itemRef, 'TEXT', &itemSize );
+      size += itemSize;
+      continue;
+    }
+    ret = GetFlavorFlags( dragRef, itemRef, 'hfs ', &flags );
+    if ( ret == noErr )
+    {
+      size += 1024; //++ ouch! We should create the full pathname and figure out its length
+      continue;
+    }
+  }
+
+  if ( !size )
+  {
+    currDragErr = userCanceledErr;
+    return currDragErr;
+  }
+
+  currDragSize = size + nItem - 1;
+  currDragData = dst = (char*)malloc( size+nItem );;
+
+  for ( i = 1; i <= nItem; i++ )
+  {
+    GetDragItemReferenceNumber( dragRef, i, &itemRef );
+    ret = GetFlavorFlags( dragRef, itemRef, 'utf8', &flags );
+    if ( ret == noErr )
+    {
+      GetFlavorDataSize( dragRef, itemRef, 'utf8', &itemSize );
+      GetFlavorData( dragRef, itemRef, 'utf8', dst, &itemSize, 0L );
+      dst += itemSize;
+      *dst++ = '\n'; // add our element separator
+      continue;
+    }
+    GetDragItemReferenceNumber( dragRef, i, &itemRef );
+    ret = GetFlavorFlags( dragRef, itemRef, 'utxt', &flags );
+    if ( ret == noErr )
+    {
+      GetFlavorDataSize( dragRef, itemRef, 'utxt', &itemSize );
+      GetFlavorData( dragRef, itemRef, 'utxt', dst, &itemSize, 0L );
+      dst += itemSize;
+      *dst++ = '\n'; // add our element separator
+      continue;
+    }
+    ret = GetFlavorFlags( dragRef, itemRef, 'TEXT', &flags );
+    if ( ret == noErr )
+    {
+      GetFlavorDataSize( dragRef, itemRef, 'TEXT', &itemSize );
+      GetFlavorData( dragRef, itemRef, 'TEXT', dst, &itemSize, 0L );
+      dst += itemSize;
+      *dst++ = '\n'; // add our element separator
+      continue;
+    }
+    ret = GetFlavorFlags( dragRef, itemRef, 'hfs ', &flags );
+    if ( ret == noErr )
+    {
+      HFSFlavor hfs; itemSize = sizeof( hfs );
+      GetFlavorData( dragRef, itemRef, 'hfs ', &hfs, &itemSize, 0L );
+      itemSize = FSSpec2UnixPath( &hfs.fileSpec, dst ); // return the path name in UTF8
+      dst += itemSize;
+      if ( itemSize>1 && ( hfs.fileType=='fold' || hfs.fileType=='disk' ) ) 
+        *dst++ = '/';
+      *dst++ = '\n'; // add our element separator
+      continue;
+    }
+  }
+
+  dst[-1] = 0;
+  currDragSize = dst - currDragData - 1;
+  currDragErr = ret;
+  return ret;
+}
+
+/**
+ * Drag'n'drop tracking handler
+ */
+static pascal OSErr dndTrackingHandler( DragTrackingMessage msg, WindowPtr w, void *userData, DragReference dragRef )
+{
+  fltk3::Window *target = (fltk3::Window*)userData;
+  fltk3::first_window(target);
+  Point mp;
+  static int px, py;
+  
+  fillCurrentDragData(dragRef);
+  fltk3::e_length = currDragSize;
+  fltk3::e_text = currDragData;
+  
+  switch ( msg )
+  {
+  case kDragTrackingEnterWindow:
+    // check if 'TEXT' is available
+    GetDragMouse( dragRef, &mp, 0 );
+    fltk3::e_x_root = px = mp.h;
+    fltk3::e_y_root = py = mp.v;
+    fltk3::e_x = px - target->x();
+    fltk3::e_y = py - target->y();
+    fl_dnd_target_window = target;
+    if ( fltk3::handle( fltk3::DND_ENTER, target ) )
+      fltk3::cursor( fltk3::CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
+    else
+      fltk3::cursor( fltk3::CURSOR_DEFAULT ); //HideDragHilite( dragRef );
+    breakMacEventLoop();
+    return noErr;
+  case kDragTrackingInWindow:
+    GetDragMouse( dragRef, &mp, 0 );
+    if ( mp.h==px && mp.v==py )
+      break;	//+ return previous condition for dnd hiliting
+    fltk3::e_x_root = px = mp.h;
+    fltk3::e_y_root = py = mp.v;
+    fltk3::e_x = px - target->x();
+    fltk3::e_y = py - target->y();
+    fl_dnd_target_window = target;
+    if ( fltk3::handle( fltk3::DND_DRAG, target ) )
+      fltk3::cursor( fltk3::CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
+    else
+      fltk3::cursor( fltk3::CURSOR_DEFAULT ); //HideDragHilite( dragRef );
+    breakMacEventLoop();
+    return noErr;
+    break;
+  case kDragTrackingLeaveWindow:
+    // HideDragHilite()
+    fltk3::cursor( fltk3::CURSOR_DEFAULT ); //HideDragHilite( dragRef );
+    if ( fl_dnd_target_window )
+    {
+      fltk3::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
+      fl_dnd_target_window = 0;
+    }
+    breakMacEventLoop();
+    return noErr;
+  }
+  return noErr;
+}
+
+
+/**
+ * Drag'n'drop receive handler
+ */
+static pascal OSErr dndReceiveHandler( WindowPtr w, void *userData, DragReference dragRef )
+{
+  Point mp;
+  OSErr ret;
+  
+  fltk3::Window *target = fl_dnd_target_window = (fltk3::Window*)userData;
+  fltk3::first_window(target);
+  GetDragMouse( dragRef, &mp, 0 );
+  fltk3::e_x_root = mp.h;
+  fltk3::e_y_root = mp.v;
+  fltk3::e_x = fltk3::e_x_root - target->x();
+  fltk3::e_y = fltk3::e_y_root - target->y();
+  if ( !fltk3::handle( fltk3::DND_RELEASE, target ) )
+    return userCanceledErr;
+
+  ret = fillCurrentDragData(dragRef);
+  if (ret==userCanceledErr)
+    return userCanceledErr;
+  
+  fltk3::e_length = currDragSize;
+  fltk3::e_text = currDragData;
+//  printf("Sending following text to widget %p:\n%s\n", fltk3::belowmouse(), fltk3::e_text);
+  int old_event = fltk3::e_number;
+  fltk3::belowmouse()->handle(fltk3::e_number = fltk3::PASTE);
+  fltk3::e_number = old_event;
+  
+  if (currDragData) {
+    free(currDragData);
+  }
+  currDragData = 0L;
+  currDragRef = 0;
+  fltk3::e_text = 0L;
+  fltk3::e_length = 0;
+  fl_dnd_target_window = 0L;
+  
+  breakMacEventLoop();
+  return noErr;
+}
+// fc:  
+static void  q_set_window_title(Window xid, const char * name ) {
+#if 1
+    CFStringRef utf8_title = CFStringCreateWithCString(NULL, (name ? name : ""), kCFStringEncodingUTF8);
+    SetWindowTitleWithCFString(xid, utf8_title);
+    CFRelease(utf8_title);
+#else // old non-utf8 code to remove after new utf8 code approval :
+    Str255 pTitle;
+    if (name) {
+      if (strlen(name) > 255) pTitle[0] = 255;
+      else pTitle[0] = strlen(name);
+      memcpy(pTitle+1, name, pTitle[0]);
+    } 
+    else 
+      pTitle[0] = 0;
+    SetWTitle(xid, pTitle);
+#endif
+}
+
+/**
+ * go ahead, create that (sub)window
+ * \todo we should make menu windows slightly transparent for the new Mac look
+ */
+void Fl_X::make(fltk3::Window* w)
+{
+  static int xyPos = 100;
+  if ( w->parent() ) // create a subwindow
+  {
+    fltk3::Group::current(0);
+    Rect wRect;
+    wRect.top    = w->y();
+    wRect.left   = w->x();
+    wRect.bottom = w->y() + w->h(); if (wRect.bottom<=wRect.top) wRect.bottom = wRect.top+1;
+    wRect.right  = w->x() + w->w(); if (wRect.right<=wRect.left) wRect.right = wRect.left+1;
+    // our subwindow needs this structure to know about its clipping. 
+    Fl_X* x = new Fl_X;
+    x->other_xid = 0;
+    x->region = 0;
+    x->subRegion = 0;
+    x->cursor = fl_default_cursor;
+    x->gc = 0; // stay 0 for Quickdraw; fill with CGContext for Quartz
+    fltk3::Window *win = w->window();
+    Fl_X *xo = Fl_X::i(win);
+    if (xo) {
+      x->xidNext = xo->xidChildren;
+      x->xidChildren = 0L;
+      xo->xidChildren = x;
+      x->xid = fl_xid(win);
+      x->w = w; w->i = x;
+      x->wait_for_expose = 0;
+      x->next = Fl_X::first; // must be in the list for ::flush()
+      Fl_X::first = x;
+      int old_event = fltk3::e_number;
+      w->handle(fltk3::e_number = fltk3::SHOW);
+      fltk3::e_number = old_event;
+      w->redraw(); // force draw to happen
+    }
+    fl_show_iconic = 0;
+  }
+  else // create a desktop window
+  {
+    fltk3::Group::current(0);
+    fl_open_display();
+    int winclass = kDocumentWindowClass;
+    int winattr = kWindowStandardHandlerAttribute | kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute;
+    int xp = w->x();
+    int yp = w->y();
+    int wp = w->w();
+    int hp = w->h();
+    if (w->size_range_set) {
+      if ( w->minh != w->maxh || w->minw != w->maxw)
+        winattr |= kWindowFullZoomAttribute | kWindowResizableAttribute | kWindowLiveResizeAttribute;
+    } else {
+      if (w->resizable()) {
+        fltk3::Widget *o = w->resizable();
+        int minw = o->w(); if (minw > 100) minw = 100;
+        int minh = o->h(); if (minh > 100) minh = 100;
+        w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
+        winattr |= kWindowFullZoomAttribute | kWindowResizableAttribute | kWindowLiveResizeAttribute;
+      } else {
+        w->size_range(w->w(), w->h(), w->w(), w->h());
+      }
+    }
+    int xwm = xp, ywm = yp, bt, bx, by;
+
+    if (!fake_X_wm(w, xwm, ywm, bt, bx, by)) {
+      // menu windows and tooltips
+      if (w->modal()||w->override()) {
+        winclass = kHelpWindowClass;
+        winattr  = 0;
+      } else {
+        winattr = 512; // kWindowNoTitleBarAttribute;
+      }
+    } else if (w->modal()) {
+      winclass = kMovableModalWindowClass;
+    }
+
+    if (by+bt) {
+      wp += 2*bx;
+      hp += 2*by+bt;
+    }
+    if (!(w->flags() & fltk3::Widget::FORCE_POSITION)) {
+      // use the Carbon functions below for default window positioning
+      w->x(xyPos+fltk3::x());
+      w->y(xyPos+fltk3::y());
+      xyPos += 25;
+      if (xyPos>200) xyPos = 100;
+    } else {
+      if (!fltk3::grab()) {
+        xp = xwm; yp = ywm;
+        w->x(xp);w->y(yp);
+      }
+      xp -= bx;
+      yp -= by+bt;
+    }
+
+    if (w->non_modal() && Fl_X::first && !fl_disable_transient_for) {
+      // find some other window to be "transient for":
+      fltk3::Window* w = Fl_X::first->w;
+      while (w->parent()) w = w->window(); // todo: this code does not make any sense! (w!=w??)
+    }
+
+    Rect wRect;
+    wRect.top    = w->y();
+    wRect.left   = w->x();
+    wRect.bottom = w->y() + w->h(); if (wRect.bottom<=wRect.top) wRect.bottom = wRect.top+1;
+    wRect.right  = w->x() + w->w(); if (wRect.right<=wRect.left) wRect.right = wRect.left+1;
+
+    const char *name = w->label();
+
+    Fl_X* x = new Fl_X;
+    x->other_xid = 0; // room for doublebuffering image map. On OS X this is only used by overlay windows
+    x->region = 0;
+    x->subRegion = 0;
+    x->cursor = fl_default_cursor;
+    x->xidChildren = 0;
+    x->xidNext = 0;
+    x->gc = 0;
+
+    winattr &= GetAvailableWindowAttributes( winclass );	// make sure that the window will open
+    CreateNewWindow( winclass, winattr, &wRect, &(x->xid) );
+    q_set_window_title(x->xid, name);
+    MoveWindow(x->xid, wRect.left, wRect.top, 1);	// avoid Carbon Bug on old OS
+    if (w->non_modal() && !w->modal()) {
+      // Major kludge: this is to have the regular look, but stay above the document windows
+      SetWindowClass(x->xid, kFloatingWindowClass);
+      SetWindowActivationScope(x->xid, kWindowActivationScopeAll);
+    }
+    if (!(w->flags() & fltk3::Widget::FORCE_POSITION))
+    {
+      WindowRef pw = Fl_X::first ? Fl_X::first->xid : 0 ;
+      if (w->modal()) {
+        RepositionWindow(x->xid, pw, kWindowAlertPositionOnParentWindowScreen);
+      } else if (w->non_modal()) {
+        RepositionWindow(x->xid, pw, kWindowCenterOnParentWindowScreen);
+      } else {
+        RepositionWindow(x->xid, pw, kWindowCascadeOnParentWindowScreen);
+      }
+    }
+    x->w = w; w->i = x;
+    x->wait_for_expose = 1;
+    x->next = Fl_X::first;
+    Fl_X::first = x;
+    { // Install Carbon Event handlers 
+      OSStatus ret;
+      EventHandlerUPP mousewheelHandler = NewEventHandlerUPP( carbonMousewheelHandler ); // will not be disposed by Carbon...
+      static EventTypeSpec mousewheelEvents[] = {
+        { kEventClassMouse, kEventMouseWheelMoved } };
+      ret = InstallWindowEventHandler( x->xid, mousewheelHandler,
+	        (int)(sizeof(mousewheelEvents)/sizeof(mousewheelEvents[0])),
+		mousewheelEvents, w, 0L );
+      EventHandlerUPP mouseHandler = NewEventHandlerUPP( carbonMouseHandler ); // will not be disposed by Carbon...
+      static EventTypeSpec mouseEvents[] = {
+        { kEventClassMouse, kEventMouseDown },
+        { kEventClassMouse, kEventMouseUp },
+        { kEventClassMouse, kEventMouseMoved },
+        { kEventClassMouse, kEventMouseDragged } };
+      ret = InstallWindowEventHandler( x->xid, mouseHandler, 4, mouseEvents, w, 0L );
+
+      EventHandlerUPP keyboardHandler = NewEventHandlerUPP( carbonKeyboardHandler ); // will not be disposed by Carbon...
+      static EventTypeSpec keyboardEvents[] = {
+        { kEventClassKeyboard, kEventRawKeyDown },
+        { kEventClassKeyboard, kEventRawKeyRepeat },
+        { kEventClassKeyboard, kEventRawKeyUp },
+        { kEventClassKeyboard, kEventRawKeyModifiersChanged } };
+      ret = InstallWindowEventHandler( x->xid, keyboardHandler, 4, keyboardEvents, w, 0L );
+
+      EventHandlerUPP textHandler = NewEventHandlerUPP( carbonTextHandler ); // will not be disposed by Carbon...
+      static EventTypeSpec textEvents[] = {
+        { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } };
+      ret = InstallWindowEventHandler( x->xid, textHandler, 1, textEvents, w, 0L );
+
+      EventHandlerUPP windowHandler = NewEventHandlerUPP( carbonWindowHandler ); // will not be disposed by Carbon...
+      static EventTypeSpec windowEvents[] = {
+        { kEventClassWindow, kEventWindowDrawContent },
+        { kEventClassWindow, kEventWindowShown },
+        { kEventClassWindow, kEventWindowHidden },
+        { kEventClassWindow, kEventWindowActivated },
+        { kEventClassWindow, kEventWindowDeactivated },
+        { kEventClassWindow, kEventWindowClose },
+        { kEventClassWindow, kEventWindowCollapsed },
+        { kEventClassWindow, kEventWindowExpanded },
+        { kEventClassWindow, kEventWindowBoundsChanging },
+        { kEventClassWindow, kEventWindowBoundsChanged } };
+      ret = InstallWindowEventHandler( x->xid, windowHandler, 10, windowEvents, w, 0L );
+      ret = InstallTrackingHandler( dndTrackingHandler, x->xid, w );
+      ret = InstallReceiveHandler( dndReceiveHandler, x->xid, w );
+    }
+
+    if ( ! Fl_X::first->next ) // if this is the first window, we need to bring the application to the front
+    { 
+      ProcessSerialNumber psn;
+      OSErr err = GetCurrentProcess( &psn );
+      if ( err==noErr ) SetFrontProcess( &psn );
+    }
+    
+    if (w->size_range_set) w->size_range_();
+    
+    if (winclass != kHelpWindowClass) {
+      fltk3::Tooltip::enter(0);
+    }
+    if (w->size_range_set) w->size_range_();
+    ShowWindow(x->xid);
+    if (fl_show_iconic) { 
+      fl_show_iconic = 0;
+      CollapseWindow( x->xid, true ); // \todo Mac ; untested
+    } else {
+      w->set_visible();
+    }
+
+    Rect rect;
+    GetWindowBounds(x->xid, kWindowContentRgn, &rect);
+    w->x(rect.left); w->y(rect.top);
+    w->w(rect.right-rect.left); w->h(rect.bottom-rect.top);
+
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::SHOW);
+    fltk3::e_number = old_event;
+    w->redraw(); // force draw to happen
+    
+    if (w->modal()) { fltk3::modal_ = w; fl_fix_focus(); }
+  }
+}
+
+
+/**
+ * Tell the OS what window sizes we want to allow
+ */
+void fltk3::Window::size_range_() {
+  size_range_set = 1;
+  HISize minSize = { minw, minh };
+  HISize maxSize = { maxw?maxw:32000, maxh?maxh:32000 };
+  if (i && i->xid)
+    SetWindowResizeLimits(i->xid, &minSize, &maxSize);
+}
+
+
+/**
+ * returns pointer to the filename, or null if name ends with ':'
+ */
+const char *fltk3::filename_name( const char *name ) 
+{
+  const char *p, *q;
+  if (!name) return (0);
+  for ( p = q = name ; *p ; ) 
+  {
+    if ( ( p[0] == ':' ) && ( p[1] == ':' ) ) 
+    {
+      q = p+2;
+      p++;
+    }
+    else if (p[0] == '/')
+      q = p + 1;
+    p++;
+  }
+  return q;
+}
+
+
+/**
+ * set the window title bar
+ * \todo make the titlebar icon work!
+ */
+void fltk3::Window::label(const char *name,const char */*iname*/) {
+  fltk3::Widget::label(name);
+
+  if (shown() || i) {
+    q_set_window_title(fl_xid(this), name);
+  }
+}
+
+
+/**
+ * make a window visible
+ */
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
+    labeltype(fltk3::NORMAL_LABEL);
+    align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
+  } else {
+    labeltype(fltk3::NO_LABEL);
+  }
+  fltk3::Tooltip::exit(this);
+  if (!shown() || !i) {
+    Fl_X::make(this);
+  } else {
+      if ( !parent() )
+      {
+        if ( IsWindowCollapsed( i->xid ) ) CollapseWindow( i->xid, false );
+        if (!fl_capture) {
+          BringToFront(i->xid);
+          SelectWindow(i->xid);
+        }
+      }
+  }
+}
+
+
+/**
+ * resize a window
+ */
+void fltk3::Window::resize(int X,int Y,int W,int H) {
+  if (W<=0) W = 1; // OS X does not like zero width windows
+  if (H<=0) H = 1;
+  int is_a_resize = (W != w() || H != h());
+//  printf("Fl_Winodw::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
+//         X, Y, W, H, is_a_resize, resize_from_system, this);
+  if (X != x() || Y != y()) set_flag(FORCE_POSITION);
+  else if (!is_a_resize) return;
+  if ( (resize_from_system!=this) && (!parent()) && shown()) {
+    if (is_a_resize) {
+      if (resizable()) {
+        if (W<minw) minw = W; // user request for resize takes priority
+        if (W>maxw) maxw = W; // over a previously set size_range
+        if (H<minh) minh = H;
+        if (H>maxh) maxh = H;
+        size_range(minw, minh, maxw, maxh);
+      } else {
+        size_range(W, H, W, H);
+      }
+      Rect dim; dim.left=X; dim.top=Y; dim.right=X+W; dim.bottom=Y+H;
+      SetWindowBounds(i->xid, kWindowContentRgn, &dim);
+      Rect all; all.top=-32000; all.bottom=32000; all.left=-32000; all.right=32000;
+      InvalWindowRect( i->xid, &all );    
+    } else {
+      MoveWindow(i->xid, X, Y, 0);
+    }
+  }
+  resize_from_system = 0;
+  if (is_a_resize) {
+    fltk3::Group::resize(X,Y,W,H);
+    if (shown()) { 
+      redraw(); 
+    }
+  } else {
+    x(X); y(Y); 
+  }
+}
+
+
+/**
+ * make all drawing go into this window (called by subclass flush() impl.)
+ */
+void fltk3::Window::make_current() 
+{
+  OSStatus err;
+  Fl_X::q_release_context();
+  if ( !fl_window_region )
+    fl_window_region = NewRgn();
+  fl_window = i->xid;
+  current_ = this;
+
+  SetPort( GetWindowPort(i->xid) ); // \todo check for the handling of doublebuffered windows
+
+  int xp = 0, yp = 0;
+  fltk3::Window *win = this;
+  while ( win ) 
+  {
+    if ( !win->window() )
+      break;
+    xp += win->x();
+    yp += win->y();
+    win = (fltk3::Window*)win->window();
+  }
+  SetOrigin( -xp, -yp );
+  
+  SetRectRgn( fl_window_region, 0, 0, w(), h() );
+  
+  // \todo for performance reasons: we don't have to create this unless the child windows moved
+  for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext )
+  {
+    fltk3::Window *cw = cx->w;
+    if (!cw->visible_r()) continue;
+    fltk3::Region r = NewRgn();
+    SetRectRgn( r, cw->x() - xp, cw->y() - yp, 
+                   cw->x() + cw->w() - xp, cw->y() + cw->h() - yp );
+    DiffRgn( fl_window_region, r, fl_window_region );
+    DisposeRgn( r );
+  }
+ 
+  err = QDBeginCGContext(GetWindowPort(i->xid), &i->gc);
+  if (err!=noErr) 
+    fprintf(stderr, "Error %d in QDBeginCGContext\n", (int)err);
+  fl_gc = i->gc;
+  CGContextSaveGState(fl_gc);
+  Fl_X::q_fill_context();
+#if defined(USE_CAIRO)
+   if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+#endif
+
+  fltk3::clip_region( 0 );
+  SetPortClipRegion( GetWindowPort(i->xid), fl_window_region );
+
+#if defined(USE_CAIRO)
+  // update the cairo_t context
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this);
+#endif
+}
+
+// helper function to manage the current CGContext fl_gc
+extern fltk3::Color fl_color_;
+extern class Fl_Font_Descriptor *fltk3::fontsize;
+extern void fltk3::font(class Fl_Font_Descriptor*);
+extern void fl_quartz_restore_line_style_();
+
+// FLTK has only one global graphics state. This function copies the FLTK state into the
+// current Quartz context
+void Fl_X::q_fill_context() {
+  if (!fl_gc) return;
+  int hgt = 0;
+  if (fl_window) {
+    Rect portRect; 
+    GetPortBounds(GetWindowPort( fl_window ), &portRect);
+    hgt = portRect.bottom-portRect.top;
+  } else {
+    hgt = CGBitmapContextGetHeight(fl_gc);
+  }
+  CGContextTranslateCTM(fl_gc, 0.5, hgt-0.5f);
+  CGContextScaleCTM(fl_gc, 1.0f, -1.0f);
+  fltk3::font(fltk3::fontsize);
+  fltk3::color(fl_color_);
+  fl_quartz_restore_line_style_();
+}
+
+// The only way to reset clipping to its original state is to pop the current graphics
+// state and restore the global state.
+void Fl_X::q_clear_clipping() {
+  if (!fl_gc) return;
+  CGContextRestoreGState(fl_gc);
+  CGContextSaveGState(fl_gc);
+}
+
+// Give the Quartz context back to the system
+void Fl_X::q_release_context(Fl_X *x) {
+  if (x && x->gc!=fl_gc) return;
+  if (!fl_gc) return;
+  CGContextRestoreGState(fl_gc);
+  if (fl_window) {
+    OSStatus err = QDEndCGContext(GetWindowPort(fl_window), &fl_gc);
+    if (err!=noErr)
+      fprintf(stderr, "Error %d in QDEndCGContext\n", (int)err);
+  }
+  fl_gc = 0;
+#if defined(USE_CAIRO)
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0); // capture gc changes automatically to update the cairo context adequately
+#endif
+}
+
+void Fl_X::q_begin_image(CGRect &rect, int cx, int cy, int w, int h) {
+  CGContextSaveGState(fl_gc);
+  CGAffineTransform mx = CGContextGetCTM(fl_gc);
+  CGRect r2 = rect;
+  r2.origin.x -= 0.5f;
+  r2.origin.y -= 0.5f;
+  CGContextClipToRect(fl_gc, r2);
+  mx.d = -1.0; mx.tx = -mx.tx;
+  CGContextConcatCTM(fl_gc, mx);
+  rect.origin.x = -(mx.tx+0.5f) + rect.origin.x     - cx;
+  rect.origin.y =  (mx.ty+0.5f) - rect.origin.y - h + cy;
+  rect.size.width = w;
+  rect.size.height = h;
+}
+
+void Fl_X::q_end_image() {
+  CGContextRestoreGState(fl_gc);
+}
+
+////////////////////////////////////////////////////////////////
+// Copy & Paste fltk implementation.
+////////////////////////////////////////////////////////////////
+
+// fltk 1.3 clipboard support constant definitions:
+const CFStringRef	flavorNames[] = {
+  CFSTR("public.utf16-plain-text"), 
+  CFSTR("public.utf8-plain-text"),
+  CFSTR("com.apple.traditional-mac-plain-text") };
+const CFStringEncoding encodings[] = { 
+  kCFStringEncodingUTF16, 
+  kCFStringEncodingUTF8, 
+  kCFStringEncodingMacRoman};
+const size_t handledFlavorsCount = sizeof(encodings)/sizeof(CFStringEncoding);
+
+// clipboard variables definitions :
+fltk3::Widget *fl_selection_requestor = 0;
+char *fl_selection_buffer[2];
+int fl_selection_length[2];
+static int fl_selection_buffer_length[2];
+
+#ifdef USE_PASTEBOARD
+static PasteboardRef myPasteboard = 0;
+static void allocatePasteboard() {
+  if (!myPasteboard)
+    PasteboardCreate(kPasteboardClipboard, &myPasteboard);
+}
+#else
+#endif
+
+#ifndef USE_PASTEBOARD
+static ScrapRef myScrap = 0;
+#endif
+
+/**
+ * create a selection
+ * owner: widget that created the selection
+ * stuff: pointer to selected data
+ * size of selected data
+ */
+void fltk3::copy(const char *stuff, int len, int clipboard) {
+  if (!stuff || len<0) return;
+  if (len+1 > fl_selection_buffer_length[clipboard]) {
+    delete[] fl_selection_buffer[clipboard];
+    fl_selection_buffer[clipboard] = new char[len+100];
+    fl_selection_buffer_length[clipboard] = len+100;
+  }
+  memcpy(fl_selection_buffer[clipboard], stuff, len);
+  fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
+  fl_selection_length[clipboard] = len;
+  if (clipboard) {
+#ifdef USE_PASTEBOARD
+    // FIXME no error checking done yet!
+    allocatePasteboard();
+    OSStatus err = PasteboardClear(myPasteboard);
+    if (err!=noErr) return; // clear did not work, maybe not owner of clipboard.
+    PasteboardSynchronize(myPasteboard);
+    CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[1], len);
+    if (text==NULL) return; // there was a pb creating the object, abort.
+    err=PasteboardPutItemFlavor(myPasteboard, (PasteboardItemID)1, CFSTR("public.utf8-plain-text"), text, 0);
+    CFRelease(text);
+#else
+    OSStatus err = ClearCurrentScrap(); // whatever happens we should clear the current scrap.
+    if(err!=noErr) {myScrap=0; return;} // don't get current scrap if a prev err occured. 
+    err = GetCurrentScrap( &myScrap );
+    if ( err != noErr ) {
+      myScrap = 0;
+      return;
+    }
+    // Previous version changed \n to \r before sending the text, but I would
+    // prefer to leave the local buffer alone, so a copied buffer may be
+    // needed. Check to see if this is necessary on OS/X.
+    PutScrapFlavor( myScrap, kScrapFlavorTypeText, 0,
+		    len, fl_selection_buffer[1] );
+#endif
+  }
+}
+
+// Call this when a "paste" operation happens:
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
+    if (clipboard) {
+	// see if we own the selection, if not go get it:
+	fl_selection_length[1] = 0;
+#ifdef USE_PASTEBOARD
+	OSStatus err = noErr;
+	Boolean found = false;
+	CFDataRef flavorData = NULL;
+	CFStringEncoding encoding = 0;
+
+	allocatePasteboard();
+	PasteboardSynchronize(myPasteboard);
+	ItemCount nFlavor = 0, i, j;
+	err = PasteboardGetItemCount(myPasteboard, &nFlavor);
+	if (err==noErr) {
+	    for (i=1; i<=nFlavor; i++) {
+		PasteboardItemID itemID = 0;
+		CFArrayRef flavorTypeArray = NULL;
+		found = false;
+		err = PasteboardGetItemIdentifier(myPasteboard, i, &itemID);
+		if (err!=noErr) continue;
+		err = PasteboardCopyItemFlavors(myPasteboard, itemID, &flavorTypeArray);
+		if (err!=noErr) {
+		  if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
+		  continue;
+		}
+		CFIndex flavorCount = CFArrayGetCount(flavorTypeArray);
+		for (j = 0; j < handledFlavorsCount; j++) {
+		    for (CFIndex flavorIndex=0; flavorIndex<flavorCount; flavorIndex++) {
+			CFStringRef flavorType = (CFStringRef)CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex);
+			if (UTTypeConformsTo(flavorType, flavorNames[j])) {
+			    err = PasteboardCopyItemFlavorData( myPasteboard, itemID, flavorNames[j], &flavorData );
+			    if(err != noErr) continue;
+			    encoding = encodings[j];
+			    found = true;
+			    break;
+			}
+		    }
+		    if(found) break;
+		}
+		if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
+		if (found) break;
+	    }
+	    if(found) {
+		CFIndex len = CFDataGetLength(flavorData);
+		CFStringRef mycfs = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(flavorData), len, encoding, false);
+		CFRelease(flavorData);
+		len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(mycfs), kCFStringEncodingUTF8) + 1;
+		if ( len >= fl_selection_buffer_length[1] ) {
+		    fl_selection_buffer_length[1] = len;
+		    delete[] fl_selection_buffer[1];
+		    fl_selection_buffer[1] = new char[len];
+		}
+		CFStringGetCString(mycfs, fl_selection_buffer[1], len, kCFStringEncodingUTF8);
+		CFRelease(mycfs);
+		len = strlen(fl_selection_buffer[1]);
+		fl_selection_length[1] = len;
+		convert_crlf(fl_selection_buffer[1],len); // turn all \r characters into \n:
+	    }
+	}
+#else
+	ScrapRef scrap = 0;
+	if (GetCurrentScrap(&scrap) == noErr && scrap != myScrap &&
+	    GetScrapFlavorSize(scrap, kScrapFlavorTypeText, &len) == noErr) {
+	    if ( len >= fl_selection_buffer_length[1] ) {
+		fl_selection_buffer_length[1] = len + 32;
+		delete[] fl_selection_buffer[1];
+		fl_selection_buffer[1] = new char[len + 32];
+	    }
+	    fl_selection_length[1] = len; len++;
+	    GetScrapFlavorData( scrap, kScrapFlavorTypeText, &len,
+			       fl_selection_buffer[1] );
+	    fl_selection_buffer[1][fl_selection_length[1]] = 0;
+	    convert_crlf(fl_selection_buffer[1],len); 
+	}
+#endif
+    }
+    fltk3::e_text = fl_selection_buffer[clipboard];
+    fltk3::e_length = fl_selection_length[clipboard];
+    if (!fltk3::e_text) fltk3::e_text = (char *)"";
+    receiver.handle(fltk3::PASTE);
+}
+
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void* data)
+{
+   // check, if this timer slot exists already
+   for (int i = 0;  i < mac_timer_used;  ++i) {
+        MacTimeout& t = mac_timers[i];
+        // if so, simply change the fire interval
+        if (t.callback == cb  &&  t.data == data) {
+            SetEventLoopTimerNextFireTime(t.timer, (EventTimerInterval)time);
+            t.pending = 1;
+            return;
+        }
+    }
+    // no existing timer to use. Create a new one:
+    int timer_id = -1;
+    // find an empty slot in the timer array
+    for (int i = 0;  i < mac_timer_used;  ++i) {
+        if ( !mac_timers[i].timer ) {
+            timer_id = i;
+            break;
+        }
+    }
+    // if there was no empty slot, append a new timer
+    if (timer_id == -1) {
+        // make space if needed
+        if (mac_timer_used == mac_timer_alloc) {
+            realloc_timers();
+        }
+        timer_id = mac_timer_used++;
+    }
+    // now install a brand new timer
+    MacTimeout& t = mac_timers[timer_id];
+    EventTimerInterval fireDelay = (EventTimerInterval)time;
+    EventLoopTimerUPP  timerUPP = NewEventLoopTimerUPP(do_timer);
+    EventLoopTimerRef  timerRef = 0;
+    OSStatus err = InstallEventLoopTimer(GetMainEventLoop(), fireDelay, 0, timerUPP, data, &timerRef);
+    if (err == noErr) {
+        t.callback = cb;
+        t.data     = data;
+        t.timer    = timerRef;
+        t.upp      = timerUPP;
+        t.pending  = 1;
+    } else {
+        if (timerRef) 
+            RemoveEventLoopTimer(timerRef);
+        if (timerUPP)
+            DisposeEventLoopTimerUPP(timerUPP);
+    }
+}
+
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void* data)
+{
+    // currently, repeat_timeout does not subtract the trigger time of the previous timer event as it should.
+    add_timeout(time, cb, data);
+}
+
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void* data)
+{
+   for (int i = 0;  i < mac_timer_used;  ++i) {
+        MacTimeout& t = mac_timers[i];
+        if (t.callback == cb  &&  t.data == data && t.pending) {
+            return 1;
+        }
+    }
+    return 0;
+}
+
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void* data)
+{
+   for (int i = 0;  i < mac_timer_used;  ++i) {
+        MacTimeout& t = mac_timers[i];
+        if (t.callback == cb  && ( t.data == data || data == NULL)) {
+            delete_timer(t);
+        }
+    }
+}
+
+int MacUnlinkWindow(Fl_X *ip, Fl_X *start) {
+  if (!ip) return 0;
+  if (start) {
+    Fl_X *pc = start;
+    while (pc) {
+      if (pc->xidNext == ip) {
+        pc->xidNext = ip->xidNext;
+        return 1;
+      }
+      if (pc->xidChildren) {
+        if (pc->xidChildren == ip) {
+          pc->xidChildren = ip->xidNext;
+          return 1;
+        }
+        if (MacUnlinkWindow(ip, pc->xidChildren))
+          return 1;
+      }
+      pc = pc->xidNext;
+    }
+  } else {
+    for ( Fl_X *pc = Fl_X::first; pc; pc = pc->next ) {
+      if (MacUnlinkWindow(ip, pc))
+        return 1;
+    }
+  }  
+  return 0;
+}
+
+static void MacRelinkWindow(Fl_X *x, Fl_X *p) {
+  if (!x || !p) return;
+  // first, check if 'x' is already registered as a child of 'p'
+  for (Fl_X *i = p->xidChildren; i; i=i->xidNext) {
+    if (i == x) return;
+  }
+  // now add 'x' as the first child of 'p'
+  x->xidNext = p->xidChildren;
+  p->xidChildren = x;
+}
+
+void MacDestroyWindow(fltk3::Window *w, WindowPtr p) {
+  MacUnmapWindow(w, p);
+  if (w && !w->parent() && p)
+    DisposeWindow(p);
+}
+
+void MacMapWindow(fltk3::Window *w, WindowPtr p) {
+  if (w && p)
+    ShowWindow(p);
+  //+ link to window list
+  if (w && w->parent()) {
+    MacRelinkWindow(Fl_X::i(w), Fl_X::i(w->window()));
+    w->redraw();
+  }
+}
+
+void MacUnmapWindow(fltk3::Window *w, WindowPtr p) {
+  if (w && !w->parent() && p) 
+    HideWindow(p);
+  if (w && Fl_X::i(w)) 
+    MacUnlinkWindow(Fl_X::i(w));
+}
+#endif // FLTK3_DOXYGEN
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_own_colormap.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_own_colormap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_own_colormap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,90 @@
+//
+// "$Id$"
+//
+// Private colormap support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Using the default system colormap can be a bad idea on PseudoColor
+// visuals, since typically every application uses the default colormap and
+// you can run out of colormap entries easily.
+//
+// The solution is to always create a new colormap on PseudoColor displays
+// and copy the first 16 colors from the default colormap so that we won't
+// get huge color changes when switching windows.
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+/** \fn fltk3::own_colormap()
+    Makes FLTK use its own colormap.  This may make FLTK display better
+    and will reduce conflicts with other programs that want lots of colors.
+    However the colors may flash as you move the cursor between windows.
+    
+    <P>This does nothing if the current visual is not colormapped.
+*/
+#ifdef WIN32
+// There is probably something relevant to do on MSWindows 8-bit displays
+// but I don't know what it is
+
+void fltk3::own_colormap() {}
+
+#elif defined(__APPLE__)
+// MacOS X always provides a TrueColor interface...
+
+void fltk3::own_colormap() {}
+#else
+// X version
+
+void fltk3::own_colormap() {
+  fl_open_display();
+#if USE_COLORMAP
+  switch (fl_visual->c_class) {
+  case GrayScale :
+  case PseudoColor :
+  case DirectColor :
+    break;
+  default:
+    return; // don't do anything for non-colormapped visuals
+  }
+  int i;
+  XColor colors[16];
+  // Get the first 16 colors from the default colormap...
+  for (i = 0; i < 16; i ++) colors[i].pixel = i;
+  XQueryColors(fl_display, fl_colormap, colors, 16);
+  // Create a new colormap...
+  fl_colormap = XCreateColormap(fl_display,
+				RootWindow(fl_display,fl_screen),
+				fl_visual->visual, AllocNone);
+  // Copy those first 16 colors to our own colormap:
+  for (i = 0; i < 16; i ++)
+    XAllocColor(fl_display, fl_colormap, colors + i);
+#endif
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_own_colormap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_visual.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_visual.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_visual.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,155 @@
+//
+// "$Id$"
+//
+// Visual support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Set the default visual according to passed switches:
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+/** \fn  fltk3::visual(int flags)
+    Selects a visual so that your graphics are drawn correctly.  This is
+    only allowed before you call show() on any windows.  This does nothing
+    if the default visual satisfies the capabilities, or if no visual
+    satisfies the capabilities, or on systems that don't have such
+    brain-dead notions.
+    
+    <P>Only the following combinations do anything useful:
+    
+    <UL>
+    <LI>fltk3::visual(fltk3::RGB)
+    <BR>Full/true color (if there are several depths FLTK chooses  the
+    largest).  Do this if you use fltk3::draw_image
+    for much better (non-dithered)  output.
+    <BR>&nbsp; </LI>
+    <LI>fltk3::visual(fltk3::RGB8)
+    <BR>Full color with at least 24 bits of color. fltk3::RGB will
+    always  pick this if available, but if not it will happily return a
+    less-than-24 bit deep visual.  This call fails if 24 bits are not
+    available.
+    <BR>&nbsp; </LI>
+    <LI>fltk3::visual(fltk3::DOUBLE|fltk3::INDEX)
+    <BR>Hardware double buffering.  Call this if you are going to use 
+    fltk3::DoubleWindow.
+    <BR>&nbsp; </LI>
+    <LI>fltk3::visual(fltk3::DOUBLE|fltk3::RGB)</LI>
+    <LI>fltk3::visual(fltk3::DOUBLE|fltk3::RGB8)
+    <BR>Hardware double buffering and full color.
+    </UL>
+    
+    <P>This returns true if the system has the capabilities by default or
+    FLTK suceeded in turing them on.  Your program will still work even if
+    this returns false (it just won't look as good).
+*/
+#ifdef WIN32
+int fltk3::visual(int flags) {
+  fl_GetDC(0);
+  if (flags & fltk3::DOUBLE) return 0;
+  if (!(flags & fltk3::INDEX) &&
+    GetDeviceCaps(fl_gc,BITSPIXEL) <= 8) return 0;
+  if ((flags & fltk3::RGB8) && GetDeviceCaps(fl_gc,BITSPIXEL)<24) return 0;
+  return 1;
+}
+#elif defined(__APPLE__)
+
+// \todo Mac : need to implement Visual flags
+int fltk3::visual(int flags) {
+  (void)flags;
+  return 1;
+}
+
+#else
+
+#if USE_XDBE
+#include <X11/extensions/Xdbe.h>
+#endif
+
+static int test_visual(XVisualInfo& v, int flags) {
+  if (v.screen != fl_screen) return 0;
+#if USE_COLORMAP
+  if (!(flags & fltk3::INDEX)) {
+    if (v.c_class != StaticColor && v.c_class != TrueColor) return 0;
+    if (v.depth <= 8) return 0; // fltk will work better in colormap mode
+  }
+  if (flags & fltk3::RGB8) {
+    if (v.depth < 24) return 0;
+  }
+  // for now, fltk does not like colormaps of more than 8 bits:
+  if ((v.c_class&1) && v.depth > 8) return 0;
+#else
+  // simpler if we can't use colormapped visuals at all:
+  if (v.c_class != StaticColor && v.c_class != TrueColor) return 0;
+#endif
+#if USE_XDBE
+  if (flags & fltk3::DOUBLE) {
+    static XdbeScreenVisualInfo *xdbejunk;
+    if (!xdbejunk) {
+      int event_base, error_base;
+      if (!XdbeQueryExtension(fl_display, &event_base, &error_base)) return 0;
+      Drawable root = RootWindow(fl_display,fl_screen);
+      int numscreens = 1;
+      xdbejunk = XdbeGetVisualInfo(fl_display,&root,&numscreens);
+      if (!xdbejunk) return 0;
+    }
+    for (int j = 0; ; j++) {
+      if (j >= xdbejunk->count) return 0;
+      if (xdbejunk->visinfo[j].visual == v.visualid) break;
+    }
+  }
+#endif
+  return 1;
+}
+
+int fltk3::visual(int flags) {
+#if USE_XDBE == 0
+  if (flags & fltk3::DOUBLE) return 0;
+#endif
+  fl_open_display();
+  // always use default if possible:
+  if (test_visual(*fl_visual, flags)) return 1;
+  // get all the visuals:
+  XVisualInfo vTemplate;
+  int num;
+  XVisualInfo *visualList = XGetVisualInfo(fl_display, 0, &vTemplate, &num);
+  // find all matches, use the one with greatest depth:
+  XVisualInfo *found = 0;
+  for (int i=0; i<num; i++) if (test_visual(visualList[i], flags)) {
+    if (!found || found->depth < visualList[i].depth)
+      found = &visualList[i];
+  }
+  if (!found) {XFree((void*)visualList); return 0;}
+  fl_visual = found;
+  fl_colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
+				fl_visual->visual, AllocNone);
+  return 1;
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_visual.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2084 @@
+//
+// "$Id$"
+//
+// WIN32-specific code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This file contains win32-specific code for fltk which is always linked
+// in.  Search other files for "WIN32" or filenames ending in _win32.cxx
+// for other system-specific code.
+
+// This file must be #include'd in Fl.cxx and not compiled separately.
+
+#ifndef FLTK3_DOXYGEN
+#include <fltk3/run.h>
+#include <fltk3/utf8.h>
+#include <fltk3/Window.h>
+#include <fltk3/draw.h>
+#include <fltk3/enumerations.h>
+#include <fltk3/Tooltip.h>
+#include <fltk3/PagedDevice.h>
+#include "flstring.h"
+#include "Fl_Font.H"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <time.h>
+#ifdef __CYGWIN__
+#  include <sys/time.h>
+#  include <unistd.h>
+#endif
+
+#if !defined(NO_TRACK_MOUSE)
+#  include <commctrl.h>	// TrackMouseEvent
+// fabien: Ms Visual Studio >= 2003 permit embedded lib reference
+// that makes fltk use easier as only fltk libs are now requested
+// This idea could be extended to fltk libs themselves, 
+// implementer should then care about DLL linkage flags ...
+#  if (_MSC_VER>=1310)
+#    pragma comment (lib, "comctl32.lib")
+#  endif
+#endif
+
+#if defined(__GNUC__)
+# include <wchar.h>
+#endif
+
+#include <ole2.h>
+#include <shellapi.h>
+
+#include "aimm.h"
+
+//
+// USE_ASYNC_SELECT - define it if you have WSAAsyncSelect()...
+// USE_ASYNC_SELECT is OBSOLETED in 1.3 for the following reasons:
+/*
+  This feature was supposed to provide an efficient alternative to the current
+  polling method, but as it has been discussed (Thanks Albrecht!) :
+  - the async mode would imply to change the socket to non blocking mode.
+    This can have unexpected side effects for 3rd party apps, especially
+    if it is set on-the-fly when socket service is really needed, as it is 
+    done today and on purpose, but still the 3rd party developer wouldn't easily
+    control the sequencing of socket operations.
+  - Finer granularity of events furthered by the async select is a plus only 
+    for socket 3rd party impl., it is simply not needed for the 'light' fltk
+    use we make of wsock, so here it would also be a bad point, because of all
+    the logic add-ons necessary for using this functionality, without a clear
+    benefit.
+
+  So async mode select would not add benefits to fltk, worse, it can slowdown
+  fltk because of this finer granularity and instrumentation code to be added
+  for async mode proper operation, not mentioning the side effects...
+*/
+
+static fltk3::GDIGraphicsDriver fl_gdi_driver;
+static fltk3::DisplayDevice fl_gdi_display(&fl_gdi_driver);
+FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver = (fltk3::GraphicsDriver*)&fl_gdi_driver; // the current target driver of graphics operations
+fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface = (fltk3::SurfaceDevice*)&fl_gdi_display; // the current target surface of graphics operations
+fltk3::DisplayDevice *fltk3::DisplayDevice::_display = &fl_gdi_display; // the platform display
+
+// dynamic wsock dll handling api:
+#if defined(__CYGWIN__) && !defined(SOCKET)
+# define SOCKET int
+#endif
+
+// note: winsock2.h has been #include'd in Fl.cxx
+#define WSCK_DLL_NAME "WS2_32.DLL"
+
+typedef int (WINAPI* fl_wsk_select_f)(int, fd_set*, fd_set*, fd_set*, const struct timeval*);
+typedef int (WINAPI* fl_wsk_fd_is_set_f)(SOCKET, fd_set *);
+
+static HMODULE s_wsock_mod = 0;
+static fl_wsk_select_f s_wsock_select = 0;
+static fl_wsk_fd_is_set_f fl_wsk_fd_is_set = 0;
+
+static HMODULE get_wsock_mod() {
+  if (!s_wsock_mod) {
+    s_wsock_mod = LoadLibrary(WSCK_DLL_NAME);
+    if (s_wsock_mod==NULL)
+      fltk3::fatal("FLTK Lib Error: %s file not found! Please check your winsock dll accessibility.\n",WSCK_DLL_NAME);
+    s_wsock_select = (fl_wsk_select_f) GetProcAddress(s_wsock_mod, "select");
+    fl_wsk_fd_is_set = (fl_wsk_fd_is_set_f) GetProcAddress(s_wsock_mod, "__WSAFDIsSet");
+  }
+  return s_wsock_mod;
+}
+
+/*
+ * Dynamic linking of imm32.dll
+ * This library is only needed for a hand full (four ATM) functions relating to 
+ * international text rendering and locales. Dynamically loading reduces initial
+ * size and link dependencies.
+ */
+static HMODULE s_imm_module = 0;
+typedef HIMC (WINAPI* flTypeImmGetContext)(HWND);
+static flTypeImmGetContext flImmGetContext = 0;
+typedef BOOL (WINAPI* flTypeImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM);
+static flTypeImmSetCompositionWindow flImmSetCompositionWindow = 0;
+typedef BOOL (WINAPI* flTypeImmReleaseContext)(HWND, HIMC);
+static flTypeImmReleaseContext flImmReleaseContext = 0;
+typedef BOOL (WINAPI* flTypeImmIsIME)(HKL);
+static flTypeImmIsIME flImmIsIME = 0;
+
+static HMODULE get_imm_module() {
+  if (!s_imm_module) {
+    s_imm_module = LoadLibrary("IMM32.DLL");
+    if (!s_imm_module)
+      fltk3::fatal("FLTK Lib Error: IMM32.DLL file not found!\n\n"
+        "Please check your input method manager library accessibility.");
+    flImmGetContext = (flTypeImmGetContext)GetProcAddress(s_imm_module, "ImmGetContext");
+    flImmSetCompositionWindow = (flTypeImmSetCompositionWindow)GetProcAddress(s_imm_module, "ImmSetCompositionWindow");
+    flImmReleaseContext = (flTypeImmReleaseContext)GetProcAddress(s_imm_module, "ImmReleaseContext");
+    flImmIsIME = (flTypeImmIsIME)GetProcAddress(s_imm_module, "ImmIsIME");
+  }
+  return s_imm_module;
+}
+
+// USE_TRACK_MOUSE - define NO_TRACK_MOUSE if you don't have
+// TrackMouseEvent()...
+//
+// Now (Dec. 2008) we can assume that current Cygwin/MinGW versions
+// support the TrackMouseEvent() function, but WinCE obviously doesn't
+// support it (STR 2095). Therefore, USE_TRACK_MOUSE is enabled by 
+// default, but you can disable it by defining NO_TRACK_MOUSE.
+//
+// TrackMouseEvent is only used to support window leave notifications
+// under Windows. It can be used to get fltk3::LEAVE events, when the
+// mouse leaves the _main_ application window (FLTK detects subwindow
+// leave events by using normal move events).
+//
+// Implementation note: If the mouse cursor leaves one subwindow and
+// enters another window, then Windows sends a WM_MOUSEMOVE message to
+// the new window before it sends a WM_MOUSELEAVE message to the old
+// (just left) window. We save the current mouse window in a static variable,
+// and if we get a WM_MOUSELEAVE event for the current mouse window, this
+// means that the top level window has been left (otherwise we would have
+// got another WM_MOUSEMOVE message before).
+
+// #define NO_TRACK_MOUSE
+
+#if !defined(NO_TRACK_MOUSE)
+# define USE_TRACK_MOUSE
+#endif // NO_TRACK_MOUSE
+
+static fltk3::Window *track_mouse_win=0;	// current TrackMouseEvent() window
+
+// USE_CAPTURE_MOUSE_WIN - this must be defined for TrackMouseEvent to work
+// correctly with subwindows - otherwise a single mouse click and release
+// (without a move) would generate phantom leave events.
+// This defines, if the current mouse window (maybe a subwindow) or the 
+// main window should get mouse events after pushing (and holding) a mouse
+// button, i.e. when dragging the mouse. This is done by calling SetCapture
+// (see below).
+
+#ifdef USE_TRACK_MOUSE
+#define USE_CAPTURE_MOUSE_WIN
+#endif // USE_TRACK_MOUSE
+
+//
+// WM_SYNCPAINT is an "undocumented" message, which is finally defined in
+// VC++ 6.0.
+//
+
+#ifndef WM_SYNCPAINT
+#  define WM_SYNCPAINT 0x0088
+#endif
+
+#ifndef WM_MOUSELEAVE
+#  define WM_MOUSELEAVE 0x02a3
+#endif
+
+#ifndef WM_MOUSEWHEEL
+#  define WM_MOUSEWHEEL 0x020a
+#endif
+
+#ifndef WHEEL_DELTA
+#  define WHEEL_DELTA 120	// according to MSDN.
+#endif
+
+
+//
+// WM_FLSELECT is the user-defined message that we get when one of
+// the sockets has pending data, etc.
+//
+
+#define WM_FLSELECT	(WM_APP+1)	// WM_APP is used for hide-window
+
+
+////////////////////////////////////////////////////////////////
+// interface to poll/select call:
+
+// fd's are only implemented for sockets.  Microsoft Windows does not
+// have a unified IO system, so it doesn't support select() on files,
+// devices, or pipes...
+//
+// Microsoft provides the Berkeley select() call and an asynchronous
+// select function that sends a WIN32 message when the select condition
+// exists. However, we don't try to use the asynchronous WSAAsyncSelect()
+// any more for good reasons (see above).
+//
+// A.S. Dec 2009: We got reports that current winsock2.h files define
+// POLLIN, POLLOUT, and POLLERR with conflicting values WRT what we
+// used before (STR #2301).  Therefore we must not use these values
+// for our internal purposes, but use fltk3::READ, fltk3::WRITE, and
+// fltk3::EXCEPT, as defined for use in fltk3::add_fd().
+//
+static int maxfd = 0;
+static fd_set fdsets[3];
+
+extern IDropTarget *flIDropTarget;
+
+static int nfds = 0;
+static int fd_array_size = 0;
+static struct FD {
+  int fd;
+  short events;
+  void (*cb)(int, void*);
+  void* arg;
+} *fd = 0;
+
+extern unsigned int fl_codepage;
+
+void fltk3::reset_spot()
+{
+}
+
+void fltk3::set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
+{
+  if (!win) return;
+  fltk3::Window* tw = win;
+  while (tw->parent()) tw = tw->window(); // find top level window
+
+  get_imm_module();
+  HIMC himc = flImmGetContext(fl_xid(tw));
+
+  if (himc) {
+    COMPOSITIONFORM cfs;
+    cfs.dwStyle = CFS_POINT;
+    cfs.ptCurrentPos.x = X;
+    cfs.ptCurrentPos.y = Y - tw->labelsize();
+    MapWindowPoints(fl_xid(win), fl_xid(tw), &cfs.ptCurrentPos, 1);
+    flImmSetCompositionWindow(himc, &cfs);
+    flImmReleaseContext(fl_xid(tw), himc);
+  }
+}
+
+void fltk3::set_status(int x, int y, int w, int h)
+{
+}
+
+void fltk3::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
+  remove_fd(n,events);
+  int i = nfds++;
+  if (i >= fd_array_size) {
+    fd_array_size = 2*fd_array_size+1;
+    fd = (FD*)realloc(fd, fd_array_size*sizeof(FD));
+  }
+  fd[i].fd = n;
+  fd[i].events = (short)events;
+  fd[i].cb = cb;
+  fd[i].arg = v;
+
+  if (events & fltk3::READ) FD_SET((unsigned)n, &fdsets[0]);
+  if (events & fltk3::WRITE) FD_SET((unsigned)n, &fdsets[1]);
+  if (events & fltk3::EXCEPT) FD_SET((unsigned)n, &fdsets[2]);
+  if (n > maxfd) maxfd = n;
+}
+
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v) {
+  fltk3::add_fd(fd, fltk3::READ, cb, v);
+}
+
+void fltk3::remove_fd(int n, int events) {
+  int i,j;
+  for (i=j=0; i<nfds; i++) {
+    if (fd[i].fd == n) {
+      short e = fd[i].events & ~events;
+      if (!e) continue; // if no events left, delete this fd
+      fd[i].events = e;
+    }
+    // move it down in the array if necessary:
+    if (j<i) {
+      fd[j]=fd[i];
+    }
+    j++;
+  }
+  nfds = j;
+
+  if (events & fltk3::READ) FD_CLR(unsigned(n), &fdsets[0]);
+  if (events & fltk3::WRITE) FD_CLR(unsigned(n), &fdsets[1]);
+  if (events & fltk3::EXCEPT) FD_CLR(unsigned(n), &fdsets[2]);
+}
+
+void fltk3::remove_fd(int n) {
+  remove_fd(n, -1);
+}
+
+// these pointers are set by the fltk3::lock() function:
+static void nothing() {}
+void (*fl_lock_function)() = nothing;
+void (*fl_unlock_function)() = nothing;
+
+static void* thread_message_;
+void* fltk3::thread_message() {
+  void* r = thread_message_;
+  thread_message_ = 0;
+  return r;
+}
+
+IActiveIMMApp *fl_aimm = NULL;
+MSG fl_msg;
+
+// This is never called with time_to_wait < 0.0.
+// It *should* return negative on error, 0 if nothing happens before
+// timeout, and >0 if any callbacks were done.  This version only
+// returns zero if nothing happens during a 0.0 timeout, otherwise
+// it returns 1.
+int fl_wait(double time_to_wait) {
+  int have_message = 0;
+
+  run_checks();
+
+  // idle processing
+  static char in_idle;
+  if (fltk3::idle && !in_idle) {
+    in_idle = 1;
+    fltk3::idle();
+    in_idle = 0;
+  }
+  
+  if (nfds) {
+    // For WIN32 we need to poll for socket input FIRST, since
+    // the event queue is not something we can select() on...
+    timeval t;
+    t.tv_sec = 0;
+    t.tv_usec = 0;
+
+    fd_set fdt[3];
+    memcpy(fdt, fdsets, sizeof fdt); // one shot faster fdt init
+    if (get_wsock_mod()&& s_wsock_select(maxfd+1,&fdt[0],&fdt[1],&fdt[2],&t)) {
+      // We got something - do the callback!
+      for (int i = 0; i < nfds; i ++) {
+	SOCKET f = fd[i].fd;
+	short revents = 0;
+	if (fl_wsk_fd_is_set(f, &fdt[0])) revents |= fltk3::READ;
+	if (fl_wsk_fd_is_set(f, &fdt[1])) revents |= fltk3::WRITE;
+	if (fl_wsk_fd_is_set(f, &fdt[2])) revents |= fltk3::EXCEPT;
+	if (fd[i].events & revents) fd[i].cb(f, fd[i].arg);
+      }
+      time_to_wait = 0.0; // just peek for any messages
+    } else {
+      // we need to check them periodically, so set a short timeout:
+      if (time_to_wait > .001) time_to_wait = .001;
+    }
+  }
+
+  if (fltk3::idle || fltk3::damage()) 
+    time_to_wait = 0.0;
+
+  // if there are no more windows and this timer is set
+  // to FOREVER, continue through or look up indefinitely
+  if (!fltk3::first_window() && time_to_wait==1e20)
+    time_to_wait = 0.0;
+
+  fl_unlock_function();
+
+  time_to_wait = (time_to_wait > 10000 ? 10000 : time_to_wait);
+  int t_msec = (int) (time_to_wait * 1000.0 + 0.5);
+  MsgWaitForMultipleObjects(0, NULL, FALSE, t_msec, QS_ALLINPUT);
+
+  fl_lock_function();
+
+  // Execute the message we got, and all other pending messages:
+  // have_message = PeekMessage(&fl_msg, NULL, 0, 0, PM_REMOVE);
+  have_message = PeekMessageW(&fl_msg, NULL, 0, 0, PM_REMOVE);
+  if (have_message > 0) {
+    while (have_message != 0 && have_message != -1) {
+      if (fl_msg.message == fl_wake_msg) {
+        // Used for awaking wait() from another thread
+	thread_message_ = (void*)fl_msg.wParam;
+        fltk3::AwakeHandler func;
+        void *data;
+        while (fltk3::get_awake_handler_(func, data)==0) {
+          func(data);
+        }
+      }
+
+      TranslateMessage(&fl_msg);
+      DispatchMessageW(&fl_msg);
+      have_message = PeekMessageW(&fl_msg, NULL, 0, 0, PM_REMOVE);
+    }
+  }
+  fltk3::flush();
+
+  // This should return 0 if only timer events were handled:
+  return 1;
+}
+
+// fl_ready() is just like fl_wait(0.0) except no callbacks are done:
+int fl_ready() {
+  if (PeekMessage(&fl_msg, NULL, 0, 0, PM_NOREMOVE)) return 1;
+  if (!nfds) return 0;
+  timeval t;
+  t.tv_sec = 0;
+  t.tv_usec = 0;
+  fd_set fdt[3];
+  memcpy(fdt, fdsets, sizeof fdt);
+  return get_wsock_mod() ? s_wsock_select(0,&fdt[0],&fdt[1],&fdt[2],&t) : 0;
+}
+
+////////////////////////////////////////////////////////////////
+
+int fltk3::x()
+{
+  RECT r;
+
+  SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
+  return r.left;
+}
+
+int fltk3::y()
+{
+  RECT r;
+
+  SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
+  return r.top;
+}
+
+int fltk3::h()
+{
+  RECT r;
+
+  SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
+  return r.bottom - r.top;
+}
+
+int fltk3::w()
+{
+  RECT r;
+
+  SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
+  return r.right - r.left;
+}
+
+void fltk3::get_mouse(int &x, int &y) {
+  POINT p;
+  GetCursorPos(&p);
+  x = p.x;
+  y = p.y;
+}
+
+////////////////////////////////////////////////////////////////
+// code used for selections:
+
+char *fl_selection_buffer[2];
+int fl_selection_length[2];
+int fl_selection_buffer_length[2];
+char fl_i_own_selection[2];
+
+UINT fl_get_lcid_codepage(LCID id)
+{
+  char buf[8];
+  buf[GetLocaleInfo(id, LOCALE_IDEFAULTANSICODEPAGE, buf, 8)] = 0;
+  return atol(buf);
+}
+
+// Convert \n -> \r\n
+class Lf2CrlfConvert {
+  char *out;
+  int outlen;
+public:
+  Lf2CrlfConvert(const char *in, int inlen) {
+    outlen = 0;
+    const char *i;
+    char *o;
+    int lencount;
+    // Predict size of \r\n conversion buffer
+    for ( i=in, lencount = inlen; lencount--; ) {
+      if ( *i == '\r' && *(i+1) == '\n' )	// leave \r\n untranslated
+	{ i+=2; outlen+=2; }
+      else if ( *i == '\n' )			// \n by itself? leave room to insert \r
+	{ i++; outlen+=2; }
+      else
+	{ ++i; ++outlen; }
+    }
+    // Alloc conversion buffer + NULL
+    out = new char[outlen+1];
+    // Handle \n -> \r\n conversion
+    for ( i=in, o=out, lencount = inlen; lencount--; ) {
+      if ( *i == '\r' && *(i+1) == '\n' )	// leave \r\n untranslated
+        { *o++ = *i++; *o++ = *i++; }
+      else if ( *i == '\n' )			// \n by itself? insert \r
+        { *o++ = '\r'; *o++ = *i++; }
+      else
+        { *o++ = *i++; }
+    }
+    *o++ = 0;
+  }
+  ~Lf2CrlfConvert() {
+    delete[] out;
+  }
+  int GetLength() const { return(outlen); }
+  const char* GetValue() const { return(out); }
+};
+
+// call this when you create a selection:
+void fltk3::copy(const char *stuff, int len, int clipboard) {
+  if (!stuff || len<0) return;
+
+  // Convert \n -> \r\n (for old apps like Notepad, DOS)
+  Lf2CrlfConvert buf(stuff, len);
+  len = buf.GetLength();
+  stuff = buf.GetValue();
+
+  if (len+1 > fl_selection_buffer_length[clipboard]) {
+    delete[] fl_selection_buffer[clipboard];
+    fl_selection_buffer[clipboard] = new char[len+100];
+    fl_selection_buffer_length[clipboard] = len+100;
+  }
+  memcpy(fl_selection_buffer[clipboard], stuff, len);
+  fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
+  fl_selection_length[clipboard] = len;
+  if (clipboard) {
+    // set up for "delayed rendering":
+    if (OpenClipboard(NULL)) {
+      // if the system clipboard works, use it
+      int utf16_len = fltk3::utf8toUtf16(fl_selection_buffer[clipboard], fl_selection_length[clipboard], 0, 0);
+      EmptyClipboard();
+      HGLOBAL hMem = GlobalAlloc(GHND, utf16_len * 2 + 2); // moveable and zero'ed mem alloc.
+      LPVOID memLock = GlobalLock(hMem);
+      fltk3::utf8toUtf16(fl_selection_buffer[clipboard], fl_selection_length[clipboard], (unsigned short*) memLock, utf16_len + 1);
+      GlobalUnlock(hMem);
+      SetClipboardData(CF_UNICODETEXT, hMem);
+      CloseClipboard();
+      GlobalFree(hMem);
+      fl_i_own_selection[clipboard] = 0;
+    } else {
+      // only if it fails, instruct paste() to use the internal buffers
+      fl_i_own_selection[clipboard] = 1;
+    }
+  }
+}
+
+// Call this when a "paste" operation happens:
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
+  if (!clipboard || fl_i_own_selection[clipboard]) {
+    // We already have it, do it quickly without window server.
+    // Notice that the text is clobbered if set_selection is
+    // called in response to fltk3::PASTE!
+
+    // Convert \r\n -> \n
+    char *i = fl_selection_buffer[clipboard];
+    if (i==0L) {
+      fltk3::e_text = 0; 
+      return;
+    }
+    fltk3::e_text = new char[fl_selection_length[clipboard]+1];
+    char *o = fltk3::e_text;
+    while (*i) {
+      if ( *i == '\r' && *(i+1) == '\n') i++;
+      else *o++ = *i++;
+    }
+    *o = 0;
+    fltk3::e_length = o - fltk3::e_text;
+    receiver.handle(fltk3::PASTE);
+    delete [] fltk3::e_text;
+    fltk3::e_text = 0;
+  } else {
+    if (!OpenClipboard(NULL)) return;
+    HANDLE h = GetClipboardData(CF_UNICODETEXT);
+    if (h) {
+      wchar_t *memLock = (wchar_t*) GlobalLock(h);
+      int utf16_len = wcslen(memLock);
+      fltk3::e_text = (char*) malloc (utf16_len * 4 + 1);
+      int utf8_len = fltk3::utf8fromwc(fltk3::e_text, utf16_len * 4, memLock, utf16_len);
+      *(fltk3::e_text + utf8_len) = 0;
+      LPSTR a,b;
+      a = b = fltk3::e_text;
+      while (*a) { // strip the CRLF pairs ($%$#@^)
+        if (*a == '\r' && a[1] == '\n') a++;
+        else *b++ = *a++;
+      }
+      *b = 0;
+      fltk3::e_length = b - fltk3::e_text;
+      receiver.handle(fltk3::PASTE);
+      GlobalUnlock(h);
+      free(fltk3::e_text);
+      fltk3::e_text = 0;
+    }
+    CloseClipboard();
+  }
+}
+
+////////////////////////////////////////////////////////////////
+char fl_is_ime = 0;
+void fl_get_codepage()
+{
+  HKL hkl = GetKeyboardLayout(0);
+  TCHAR ld[8];
+
+  GetLocaleInfo (LOWORD(hkl), LOCALE_IDEFAULTANSICODEPAGE, ld, 6);
+  DWORD ccp = atol(ld);
+  fl_is_ime = 0;
+
+  fl_codepage = ccp;
+  if (fl_aimm) {
+    fl_aimm->GetCodePageA(GetKeyboardLayout(0), &fl_codepage);
+  } else if (get_imm_module() && flImmIsIME(hkl)) {
+    fl_is_ime = 1;
+  }
+}
+
+HWND fl_capture;
+
+static int mouse_event(fltk3::Window *window, int what, int button,
+		       WPARAM wParam, LPARAM lParam)
+{
+  static int px, py, pmx, pmy;
+  POINT pt;
+  fltk3::e_x = pt.x = (signed short)LOWORD(lParam);
+  fltk3::e_y = pt.y = (signed short)HIWORD(lParam);
+  ClientToScreen(fl_xid(window), &pt);
+  fltk3::e_x_root = pt.x;
+  fltk3::e_y_root = pt.y;
+#ifdef USE_CAPTURE_MOUSE_WIN
+  fltk3::Window *mouse_window = window;	// save "mouse window"
+#endif
+  while (window->parent()) {
+    fltk3::e_x += window->x();
+    fltk3::e_y += window->y();
+    window = window->window();
+  }
+
+  ulong state = fltk3::e_state & 0xff0000; // keep shift key states
+#if 0
+  // mouse event reports some shift flags, perhaps save them?
+  if (wParam & MK_SHIFT) state |= fltk3::SHIFT;
+  if (wParam & MK_CONTROL) state |= fltk3::CTRL;
+#endif
+  if (wParam & MK_LBUTTON) state |= fltk3::BUTTON1;
+  if (wParam & MK_MBUTTON) state |= fltk3::BUTTON2;
+  if (wParam & MK_RBUTTON) state |= fltk3::BUTTON3;
+  fltk3::e_state = state;
+
+  switch (what) {
+  case 1: // double-click
+    if (fltk3::e_is_click) {fltk3::e_clicks++; goto J1;}
+  case 0: // single-click
+    fltk3::e_clicks = 0;
+  J1:
+#ifdef USE_CAPTURE_MOUSE_WIN
+    if (!fl_capture) SetCapture(fl_xid(mouse_window));  // use mouse window
+#else
+    if (!fl_capture) SetCapture(fl_xid(window));	// use main window
+#endif
+    fltk3::e_keysym = fltk3::MouseButton + button;
+    fltk3::e_is_click = 1;
+    px = pmx = fltk3::e_x_root; py = pmy = fltk3::e_y_root;
+    return fltk3::handle(fltk3::PUSH,window);
+
+  case 2: // release:
+    if (!fl_capture) ReleaseCapture();
+    fltk3::e_keysym = fltk3::MouseButton + button;
+    return fltk3::handle(fltk3::RELEASE,window);
+
+  case 3: // move:
+  default: // avoid compiler warning
+    // MSWindows produces extra events even if mouse does not move, ignore em:
+    if (fltk3::e_x_root == pmx && fltk3::e_y_root == pmy) return 1;
+    pmx = fltk3::e_x_root; pmy = fltk3::e_y_root;
+    if (abs(fltk3::e_x_root-px)>5 || abs(fltk3::e_y_root-py)>5) fltk3::e_is_click = 0;
+    return fltk3::handle(fltk3::MOVE,window);
+
+  }
+}
+
+// convert a MSWindows VK_x to an Fltk (X) Keysym:
+// See also the inverse converter in Fl_get_key_win32.cxx
+// This table is in numeric order by VK:
+static const struct {unsigned short vk, fltk, extended;} vktab[] = {
+  {VK_BACK,	fltk3::BackSpaceKey},
+  {VK_TAB,	fltk3::TabKey},
+  {VK_CLEAR,	fltk3::KPKey+'5',	0xff0b/*XK_Clear*/},
+  {VK_RETURN,	fltk3::EnterKey,	fltk3::KPEnterKey},
+  {VK_SHIFT,	fltk3::ShiftLKey,	fltk3::ShiftRKey},
+  {VK_CONTROL,	fltk3::ControlLKey,	fltk3::ControlRKey},
+  {VK_MENU,	fltk3::AltLKey,	fltk3::AltRKey},
+  {VK_PAUSE,	fltk3::PauseKey},
+  {VK_CAPITAL,	fltk3::CapsLockKey},
+  {VK_ESCAPE,	fltk3::EscapeKey},
+  {VK_SPACE,	' '},
+  {VK_PRIOR,	fltk3::KPKey+'9',	fltk3::PageUpKey},
+  {VK_NEXT,	fltk3::KPKey+'3',	fltk3::PageDownKey},
+  {VK_END,	fltk3::KPKey+'1',	fltk3::EndKey},
+  {VK_HOME,	fltk3::KPKey+'7',	fltk3::HomeKey},
+  {VK_LEFT,	fltk3::KPKey+'4',	fltk3::LeftKey},
+  {VK_UP,	fltk3::KPKey+'8',	fltk3::UpKey},
+  {VK_RIGHT,	fltk3::KPKey+'6',	fltk3::RightKey},
+  {VK_DOWN,	fltk3::KPKey+'2',	fltk3::DownKey},
+  {VK_SNAPSHOT,	fltk3::PrintKey},	// does not work on NT
+  {VK_INSERT,	fltk3::KPKey+'0',	fltk3::InsertKey},
+  {VK_DELETE,	fltk3::KPKey+'.',	fltk3::DeleteKey},
+  {VK_LWIN,	fltk3::MetaLKey},
+  {VK_RWIN,	fltk3::MetaRKey},
+  {VK_APPS,	fltk3::MenuKey},
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+  {VK_SLEEP,    fltk3::SleepKey},
+#endif
+  {VK_MULTIPLY,	fltk3::KPKey+'*'},
+  {VK_ADD,	fltk3::KPKey+'+'},
+  {VK_SUBTRACT,	fltk3::KPKey+'-'},
+  {VK_DECIMAL,	fltk3::KPKey+'.'},
+  {VK_DIVIDE,	fltk3::KPKey+'/'},
+  {VK_NUMLOCK,	fltk3::NumLockKey},
+  {VK_SCROLL,	fltk3::ScrollLockKey},
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+  {VK_BROWSER_BACK, fltk3::BackKey},
+  {VK_BROWSER_FORWARD, fltk3::ForwardKey},
+  {VK_BROWSER_REFRESH, fltk3::RefreshKey},
+  {VK_BROWSER_STOP, fltk3::StopKey},
+  {VK_BROWSER_SEARCH, fltk3::SearchKey},
+  {VK_BROWSER_FAVORITES, fltk3::FavoritesKey},
+  {VK_BROWSER_HOME, fltk3::HomePageKey},
+  {VK_VOLUME_MUTE, fltk3::VolumeMuteKey},
+  {VK_VOLUME_DOWN, fltk3::VolumeDownKey},
+  {VK_VOLUME_UP, fltk3::VolumeUpKey},
+  {VK_MEDIA_NEXT_TRACK, fltk3::MediaNextKey},
+  {VK_MEDIA_PREV_TRACK, fltk3::MediaPrevKey},
+  {VK_MEDIA_STOP, fltk3::MediaStopKey},
+  {VK_MEDIA_PLAY_PAUSE, fltk3::MediaPlayKey},
+  {VK_LAUNCH_MAIL, fltk3::MailKey},
+#endif
+  {0xba,	';'},
+  {0xbb,	'='},
+  {0xbc,	','},
+  {0xbd,	'-'},
+  {0xbe,	'.'},
+  {0xbf,	'/'},
+  {0xc0,	'`'},
+  {0xdb,	'['},
+  {0xdc,	'\\'},
+  {0xdd,	']'},
+  {0xde,	'\''}
+};
+static int ms2fltk(int vk, int extended) {
+  static unsigned short vklut[256];
+  static unsigned short extendedlut[256];
+  if (!vklut[1]) { // init the table
+    unsigned int i;
+    for (i = 0; i < 256; i++) vklut[i] = tolower(i);
+    for (i=VK_F1; i<=VK_F16; i++) vklut[i] = i+(fltk3::FKey-(VK_F1-1));
+    for (i=VK_NUMPAD0; i<=VK_NUMPAD9; i++) vklut[i] = i+(fltk3::KPKey+'0'-VK_NUMPAD0);
+    for (i = 0; i < sizeof(vktab)/sizeof(*vktab); i++) {
+      vklut[vktab[i].vk] = vktab[i].fltk;
+      extendedlut[vktab[i].vk] = vktab[i].extended;
+    }
+    for (i = 0; i < 256; i++) if (!extendedlut[i]) extendedlut[i] = vklut[i];
+  }
+  return extended ? extendedlut[vk] : vklut[vk];
+}
+
+#if USE_COLORMAP
+extern HPALETTE fl_select_palette(void); // in fl_color_win32.cxx
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////
+/// Win32 timers
+///
+
+struct Win32Timer
+{
+  UINT_PTR handle;
+  fltk3::TimeoutHandler callback;
+  void *data;
+};
+static Win32Timer* win32_timers;
+static int win32_timer_alloc;
+static int win32_timer_used;
+static HWND s_TimerWnd;
+
+static void realloc_timers()
+{
+  if (win32_timer_alloc == 0) {
+    win32_timer_alloc = 8;
+  }
+  win32_timer_alloc *= 2;
+  Win32Timer* new_timers = new Win32Timer[win32_timer_alloc];
+  memset(new_timers, 0, sizeof(Win32Timer) * win32_timer_used);
+  memcpy(new_timers, win32_timers, sizeof(Win32Timer) * win32_timer_used);
+  Win32Timer* delete_me = win32_timers;
+  win32_timers = new_timers;
+  delete [] delete_me;
+}
+
+static void delete_timer(Win32Timer& t)
+{
+  KillTimer(s_TimerWnd, t.handle);
+  memset(&t, 0, sizeof(Win32Timer));
+}
+
+/// END TIMERS
+/////////////////////////////////////////////////////////////////////////////
+
+static fltk3::Window* resize_bug_fix;
+
+extern void fl_save_pen(void);
+extern void fl_restore_pen(void);
+
+static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+  // Copy the message to fl_msg so add_handler code can see it, it is
+  // already there if this is called by DispatchMessage, but not if
+  // Windows calls this directly.
+  fl_msg.hwnd = hWnd;
+  fl_msg.message = uMsg;
+  fl_msg.wParam = wParam;
+  fl_msg.lParam = lParam;
+  //fl_msg.time = ???
+  //fl_msg.pt = ???
+  //fl_msg.lPrivate = ???
+
+  fltk3::Window *window = fl_find(hWnd);
+
+  if (window) switch (uMsg) {
+
+  case WM_QUIT: // this should not happen?
+    fltk3::fatal("WM_QUIT message");
+
+  case WM_CLOSE: // user clicked close box
+    fltk3::handle(fltk3::CLOSE, window);
+    PostQuitMessage(0);
+    return 0;
+
+  case WM_SYNCPAINT :
+  case WM_NCPAINT :
+  case WM_ERASEBKGND :
+    // Andreas Weitl - WM_SYNCPAINT needs to be passed to DefWindowProc
+    // so that Windows can generate the proper paint messages...
+    // Similarly, WM_NCPAINT and WM_ERASEBKGND need this, too...
+    break;
+
+  case WM_PAINT: {
+    fltk3::Region R;
+    Fl_X *i = Fl_X::i(window);
+    i->wait_for_expose = 0;
+    char redraw_whole_window = false;
+    if (!i->region && window->damage()) {
+      // Redraw the whole window...
+      i->region = CreateRectRgn(0, 0, window->w(), window->h());
+      redraw_whole_window = true;
+    }
+
+    // We need to merge WIN32's damage into FLTK's damage.
+    R = CreateRectRgn(0,0,0,0);
+    int r = GetUpdateRgn(hWnd,R,0);
+    if (r==NULLREGION && !redraw_whole_window) {
+      break;
+    }
+
+    if (i->region) {
+      // Also tell WIN32 that we are drawing someplace else as well...
+      CombineRgn(i->region, i->region, R, RGN_OR);
+      XDestroyRegion(R);
+    } else {
+      i->region = R;
+    }
+    if (window->type() == fltk3::DOUBLE_WINDOW) ValidateRgn(hWnd,0);
+    else ValidateRgn(hWnd,i->region);
+
+    window->clear_damage((uchar)(window->damage()|fltk3::DAMAGE_EXPOSE));
+    // These next two statements should not be here, so that all update
+    // is deferred until fltk3::flush() is called during idle.  However WIN32
+    // apparently is very unhappy if we don't obey it and draw right now.
+    // Very annoying!
+    fl_GetDC(hWnd); // Make sure we have a DC for this window...
+    fl_save_pen();
+    i->flush();
+    fl_restore_pen();
+    window->clear_damage();
+    } return 0;
+
+  case WM_LBUTTONDOWN:  mouse_event(window, 0, 1, wParam, lParam); return 0;
+  case WM_LBUTTONDBLCLK:mouse_event(window, 1, 1, wParam, lParam); return 0;
+  case WM_LBUTTONUP:    mouse_event(window, 2, 1, wParam, lParam); return 0;
+  case WM_MBUTTONDOWN:  mouse_event(window, 0, 2, wParam, lParam); return 0;
+  case WM_MBUTTONDBLCLK:mouse_event(window, 1, 2, wParam, lParam); return 0;
+  case WM_MBUTTONUP:    mouse_event(window, 2, 2, wParam, lParam); return 0;
+  case WM_RBUTTONDOWN:  mouse_event(window, 0, 3, wParam, lParam); return 0;
+  case WM_RBUTTONDBLCLK:mouse_event(window, 1, 3, wParam, lParam); return 0;
+  case WM_RBUTTONUP:    mouse_event(window, 2, 3, wParam, lParam); return 0;
+
+  case WM_MOUSEMOVE:
+#ifdef USE_TRACK_MOUSE
+    if (track_mouse_win != window) {
+      TRACKMOUSEEVENT tme;
+      tme.cbSize    = sizeof(TRACKMOUSEEVENT);
+      tme.dwFlags   = TME_LEAVE;
+      tme.hwndTrack = hWnd;
+      _TrackMouseEvent(&tme);
+      track_mouse_win = window;
+    }
+#endif // USE_TRACK_MOUSE
+    mouse_event(window, 3, 0, wParam, lParam);
+    return 0;
+
+  case WM_MOUSELEAVE:
+    if (track_mouse_win == window) { // we left the top level window !
+      fltk3::Window *tw = window;
+      while (tw->parent()) tw = tw->window(); // find top level window
+      fltk3::belowmouse(0);
+      fltk3::handle(fltk3::LEAVE, tw);
+    }
+    track_mouse_win = 0; // force TrackMouseEvent() restart
+    break;
+
+  case WM_SETFOCUS:
+    fltk3::handle(fltk3::FOCUS, window);
+    break;
+
+  case WM_KILLFOCUS:
+    fltk3::handle(fltk3::UNFOCUS, window);
+    fltk3::flush(); // it never returns to main loop when deactivated...
+    break;
+
+  case WM_SHOWWINDOW:
+    if (!window->parent()) {
+      fltk3::handle(wParam ? fltk3::SHOW : fltk3::HIDE, window);
+    }
+    break;
+
+  case WM_ACTIVATEAPP:
+    // From eric@vfx.sel.sony.com, we should process WM_ACTIVATEAPP
+    // messages to restore the correct state of the shift/ctrl/alt/lock
+    // keys...  Added control, shift, alt, and meta keys, and changed
+    // to use GetAsyncKeyState and do it when wParam is 1
+    // (that means we have focus...)
+    if (wParam)
+    {
+      ulong state = 0;
+      if (GetAsyncKeyState(VK_CAPITAL)) state |= fltk3::CAPS_LOCK;
+      if (GetAsyncKeyState(VK_NUMLOCK)) state |= fltk3::NUM_LOCK;
+      if (GetAsyncKeyState(VK_SCROLL)) state |= fltk3::SCROLL_LOCK;
+      if (GetAsyncKeyState(VK_CONTROL)&~1) state |= fltk3::CTRL;
+      if (GetAsyncKeyState(VK_SHIFT)&~1) state |= fltk3::SHIFT;
+      if (GetAsyncKeyState(VK_MENU)) state |= fltk3::ALT;
+      if ((GetAsyncKeyState(VK_LWIN)|GetAsyncKeyState(VK_RWIN))&~1) state |= fltk3::META;
+      fltk3::e_state = state;
+      return 0;
+    }
+    break;
+
+  case WM_INPUTLANGCHANGE:
+    fl_get_codepage();
+    break;
+  case WM_IME_COMPOSITION:
+//	if (!fl_is_nt4() && lParam & GCS_RESULTCLAUSE) {
+//		HIMC himc = ImmGetContext(hWnd);
+//		wlen = ImmGetCompositionStringW(himc, GCS_RESULTSTR,
+//			wbuf, sizeof(wbuf)) / sizeof(short);
+//		if (wlen < 0) wlen = 0;
+//		wbuf[wlen] = 0;
+//		ImmReleaseContext(hWnd, himc);
+//	}
+	break;
+  case WM_KEYDOWN:
+  case WM_SYSKEYDOWN:
+  case WM_KEYUP:
+  case WM_SYSKEYUP:
+    // save the keysym until we figure out the characters:
+    fltk3::e_keysym = fltk3::e_original_keysym = ms2fltk(wParam,lParam&(1<<24));
+    // See if TranslateMessage turned it into a WM_*CHAR message:
+    if (PeekMessageW(&fl_msg, hWnd, WM_CHAR, WM_SYSDEADCHAR, PM_REMOVE))
+    {
+      uMsg = fl_msg.message;
+      wParam = fl_msg.wParam;
+      lParam = fl_msg.lParam;
+    }
+  case WM_DEADCHAR:
+  case WM_SYSDEADCHAR:
+  case WM_CHAR:
+  case WM_SYSCHAR: {
+    ulong state = fltk3::e_state & 0xff000000; // keep the mouse button state
+    // if GetKeyState is expensive we might want to comment some of these out:
+    if (GetKeyState(VK_SHIFT)&~1) state |= fltk3::SHIFT;
+    if (GetKeyState(VK_CAPITAL)) state |= fltk3::CAPS_LOCK;
+    if (GetKeyState(VK_CONTROL)&~1) state |= fltk3::CTRL;
+    // Alt gets reported for the Alt-GR switch on foreign keyboards.
+    // so we need to check the event as well to get it right:
+    if ((lParam&(1<<29)) //same as GetKeyState(VK_MENU)
+	&& uMsg != WM_CHAR) state |= fltk3::ALT;
+    if (GetKeyState(VK_NUMLOCK)) state |= fltk3::NUM_LOCK;
+    if ((GetKeyState(VK_LWIN)|GetKeyState(VK_RWIN))&~1) {
+      // WIN32 bug?  GetKeyState returns garbage if the user hit the
+      // meta key to pop up start menu.  Sigh.
+      if ((GetAsyncKeyState(VK_LWIN)|GetAsyncKeyState(VK_RWIN))&~1)
+	state |= fltk3::META;
+    }
+    if (GetKeyState(VK_SCROLL)) state |= fltk3::SCROLL_LOCK;
+    fltk3::e_state = state;
+    static char buffer[1024];
+    if (uMsg == WM_CHAR || uMsg == WM_SYSCHAR) {
+
+      xchar u = (xchar) wParam;
+//    fltk3::e_length = fl_unicode2utf(&u, 1, buffer);
+      fltk3::e_length = fltk3::utf8fromwc(buffer, 1024, &u, 1);
+      buffer[fltk3::e_length] = 0;
+
+
+    } else if (fltk3::e_keysym >= fltk3::KPKey && fltk3::e_keysym <= fltk3::KPLastKey) {
+      if (state & fltk3::NUM_LOCK) {
+        // Convert to regular keypress...
+	buffer[0] = fltk3::e_keysym-fltk3::KPKey;
+	fltk3::e_length = 1;
+      } else {
+        // Convert to special keypress...
+	buffer[0] = 0;
+	fltk3::e_length = 0;
+	switch (fltk3::e_keysym) {
+	  case fltk3::KPKey + '0' :
+	    fltk3::e_keysym = fltk3::InsertKey;
+	    break;
+	  case fltk3::KPKey + '1' :
+	    fltk3::e_keysym = fltk3::EndKey;
+	    break;
+	  case fltk3::KPKey + '2' :
+	    fltk3::e_keysym = fltk3::DownKey;
+	    break;
+	  case fltk3::KPKey + '3' :
+	    fltk3::e_keysym = fltk3::PageDownKey;
+	    break;
+	  case fltk3::KPKey + '4' :
+	    fltk3::e_keysym = fltk3::LeftKey;
+	    break;
+	  case fltk3::KPKey + '6' :
+	    fltk3::e_keysym = fltk3::RightKey;
+	    break;
+	  case fltk3::KPKey + '7' :
+	    fltk3::e_keysym = fltk3::HomeKey;
+	    break;
+	  case fltk3::KPKey + '8' :
+	    fltk3::e_keysym = fltk3::UpKey;
+	    break;
+	  case fltk3::KPKey + '9' :
+	    fltk3::e_keysym = fltk3::PageUpKey;
+	    break;
+	  case fltk3::KPKey + '.' :
+	    fltk3::e_keysym = fltk3::DeleteKey;
+	    break;
+	  case fltk3::KPKey + '/' :
+	  case fltk3::KPKey + '*' :
+	  case fltk3::KPKey + '-' :
+	  case fltk3::KPKey + '+' :
+	    buffer[0] = fltk3::e_keysym-fltk3::KPKey;
+	    fltk3::e_length = 1;
+	    break;
+	}
+      }
+    } else if ((lParam & (1<<31))==0) {
+#ifdef FLTK_PREVIEW_DEAD_KEYS
+      if ((lParam & (1<<24))==0) { // clear if dead key (always?)
+        xchar u = (xchar) wParam;
+        fltk3::e_length = fltk3::utf8fromwc(buffer, 1024, &u, 1);
+        buffer[fltk3::e_length] = 0;
+      } else { // set if "extended key" (never printable?)
+        buffer[0] = 0;
+        fltk3::e_length = 0;
+      }
+#else
+      buffer[0] = 0;
+      fltk3::e_length = 0;
+#endif
+    }
+    fltk3::e_text = buffer;
+    if (lParam & (1<<31)) { // key up events.
+      if (fltk3::handle(fltk3::KEYUP, window)) return 0;
+      break;
+    }
+    // for (int i = lParam&0xff; i--;)
+    while (window->parent()) window = window->window();
+    if (fltk3::handle(fltk3::KEYBOARD,window)) {
+	  if (uMsg==WM_DEADCHAR || uMsg==WM_SYSDEADCHAR)
+		fltk3::compose_state = 1;
+	  return 0;
+	}
+    break;}
+
+  case WM_MOUSEWHEEL: {
+    static int delta = 0; // running total of all motion
+    delta += (SHORT)(HIWORD(wParam));
+    fltk3::e_dy = -delta / WHEEL_DELTA;
+    delta += fltk3::e_dy * WHEEL_DELTA;
+    if (fltk3::e_dy) fltk3::handle(fltk3::MOUSEWHEEL, window);
+    return 0;
+  }
+
+  case WM_GETMINMAXINFO:
+    Fl_X::i(window)->set_minmax((LPMINMAXINFO)lParam);
+    break;
+
+  case WM_SIZE:
+    if (!window->parent()) {
+      if (wParam == SIZE_MINIMIZED || wParam == SIZE_MAXHIDE) {
+	fltk3::handle(fltk3::HIDE, window);
+      } else {
+	fltk3::handle(fltk3::SHOW, window);
+	resize_bug_fix = window;
+	window->size(LOWORD(lParam), HIWORD(lParam));
+      }
+    }
+    break;
+
+  case WM_MOVE: {
+    resize_bug_fix = window;
+    int nx = LOWORD(lParam);
+    int ny = HIWORD(lParam);
+    if (nx & 0x8000) nx -= 65536;
+    if (ny & 0x8000) ny -= 65536;
+    window->position(nx, ny); }
+    break;
+
+  case WM_SETCURSOR:
+    if (LOWORD(lParam) == HTCLIENT) {
+      while (window->parent()) window = window->window();
+      SetCursor(Fl_X::i(window)->cursor);
+      return 0;
+    }
+    break;
+
+#if USE_COLORMAP
+  case WM_QUERYNEWPALETTE :
+    fl_GetDC(hWnd);
+    if (fl_select_palette()) InvalidateRect(hWnd, NULL, FALSE);
+    break;
+
+  case WM_PALETTECHANGED:
+    fl_GetDC(hWnd);
+    if ((HWND)wParam != hWnd && fl_select_palette()) UpdateColors(fl_gc);
+    break;
+
+  case WM_CREATE :
+    fl_GetDC(hWnd);
+    fl_select_palette();
+    break;
+#endif
+
+  case WM_DESTROYCLIPBOARD:
+    fl_i_own_selection[1] = 0;
+    return 1;
+
+  case WM_RENDERALLFORMATS:
+    fl_i_own_selection[1] = 0;
+    // Windoze seems unhappy unless I do these two steps. Documentation
+    // seems to vary on whether opening the clipboard is necessary or
+    // is in fact wrong:
+    CloseClipboard();
+    OpenClipboard(NULL);
+    // fall through...
+  case WM_RENDERFORMAT: {
+    HANDLE h;
+
+//  int l = fltk3::utf_nb_char((unsigned char*)fl_selection_buffer[1], fl_selection_length[1]);
+    int l = fltk3::utf8toUtf16(fl_selection_buffer[1], fl_selection_length[1], NULL, 0); // Pass NULL buffer to query length required
+    h = GlobalAlloc(GHND, (l+1) * sizeof(unsigned short));
+    if (h) {
+      unsigned short *g = (unsigned short*) GlobalLock(h);
+//    fl_utf2unicode((unsigned char *)fl_selection_buffer[1], fl_selection_length[1], (xchar*)g);
+      l = fltk3::utf8toUtf16(fl_selection_buffer[1], fl_selection_length[1], g, (l+1));
+      g[l] = 0;
+      GlobalUnlock(h);
+      SetClipboardData(CF_UNICODETEXT, h);
+    }
+
+    // Windoze also seems unhappy if I don't do this. Documentation very
+    // unclear on what is correct:
+    if (fl_msg.message == WM_RENDERALLFORMATS) CloseClipboard();
+    return 1;}
+
+  default:
+    if (fltk3::handle(0,0)) return 0;
+    break;
+  }
+
+
+  return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+}
+
+////////////////////////////////////////////////////////////////
+// This function gets the dimensions of the top/left borders and
+// the title bar, if there is one, based on the FL_BORDER, FL_MODAL
+// and FL_NONMODAL flags, and on the window's size range.
+// It returns the following values:
+//
+// value | border | title bar
+//   0   |  none  |   no
+//   1   |  fix   |   yes
+//   2   |  size  |   yes
+
+int Fl_X::fake_X_wm(const fltk3::Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
+  int W, H, xoff, yoff, dx, dy;
+  int ret = bx = by = bt = 0;
+
+  int fallback = 1;
+  if (!w->parent()) {
+    HWND hwnd = fl_xid(w);
+    if (hwnd) {
+      // The block below calculates the window borders by requesting the
+      // required decorated window rectangle for a desired client rectangle.
+      // If any part of the function above fails, we will drop to a 
+      // fallback to get the best guess which is always available.
+      HWND hwnd = fl_xid(w);
+      // request the style flags of this window, as WIN32 sees them
+      LONG style = GetWindowLong(hwnd, GWL_STYLE);
+      LONG exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+      RECT r;
+      r.left = w->x();
+      r.top = w->y();
+      r.right = w->x()+w->w();
+      r.bottom = w->y()+w->h();
+      // get the decoration rectangle for the desired client rectangle
+      BOOL ok = AdjustWindowRectEx(&r, style, FALSE, exstyle);
+      if (ok) {
+        X = r.left;
+        Y = r.top;
+        W = r.right - r.left;
+        H = r.bottom - r.top;
+        bx = w->x() - r.left;
+        by = r.bottom - w->y() - w->h(); // height of the bootm frame
+        bt = w->y() - r.top - by; // height of top caption bar
+        xoff = bx;
+        yoff = by + bt;
+        dx = W - w->w();
+        dy = H - w->h();
+        if (w->size_range_set && (w->maxw != w->minw || w->maxh != w->minh))
+          ret = 2;
+        else
+          ret = 1;
+        fallback = 0;
+      }
+    }
+  }
+  // This is the original (pre 1.1.7) routine to calculate window border sizes.
+  if (fallback) {
+    if (w->border() && !w->parent()) {
+      if (w->size_range_set && (w->maxw != w->minw || w->maxh != w->minh)) {
+        ret = 2;
+        bx = GetSystemMetrics(SM_CXSIZEFRAME);
+        by = GetSystemMetrics(SM_CYSIZEFRAME);
+      } else {
+        ret = 1;
+        bx = GetSystemMetrics(SM_CXFIXEDFRAME);
+        by = GetSystemMetrics(SM_CYFIXEDFRAME);
+      }
+      bt = GetSystemMetrics(SM_CYCAPTION);
+    }
+    //The coordinates of the whole window, including non-client area
+    xoff = bx;
+    yoff = by + bt;
+    dx = 2*bx;
+    dy = 2*by + bt;
+    X = w->x()-xoff;
+    Y = w->y()-yoff;
+    W = w->w()+dx;
+    H = w->h()+dy;
+  }
+
+  //Proceed to positioning the window fully inside the screen, if possible
+  //Find screen that contains most of the window
+  //FIXME: this ought to be the "work area" instead of the entire screen !
+  int scr_x, scr_y, scr_w, scr_h;
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y, W, H);
+  //Make border's lower right corner visible
+  if (scr_x+scr_w < X+W) X = scr_x+scr_w - W;
+  if (scr_y+scr_h < Y+H) Y = scr_y+scr_h - H;
+  //Make border's upper left corner visible
+  if (X<scr_x) X = scr_x;
+  if (Y<scr_y) Y = scr_y;
+  //Make client area's lower right corner visible
+  if (scr_x+scr_w < X+dx+ w->w()) X = scr_x+scr_w - w->w() - dx;
+  if (scr_y+scr_h < Y+dy+ w->h()) Y = scr_y+scr_h - w->h() - dy;
+  //Make client area's upper left corner visible
+  if (X+xoff < scr_x) X = scr_x-xoff;
+  if (Y+yoff < scr_y) Y = scr_y-yoff;
+  //Return the client area's top left corner in (X,Y)
+  X+=xoff;
+  Y+=yoff;
+
+  return ret;
+}
+
+////////////////////////////////////////////////////////////////
+
+void fltk3::Window::resize(int X,int Y,int W,int H) {
+  UINT flags = SWP_NOSENDCHANGING | SWP_NOZORDER 
+             | SWP_NOACTIVATE | SWP_NOOWNERZORDER;
+  int is_a_resize = (W != w() || H != h());
+  int resize_from_program = (this != resize_bug_fix);
+  if (!resize_from_program) resize_bug_fix = 0;
+  if (X != x() || Y != y()) {
+    force_position(1);
+  } else {
+    if (!is_a_resize) return;
+    flags |= SWP_NOMOVE;
+  }
+  if (is_a_resize) {
+    Group::resize(X,Y,W,H);
+    if (visible_r()) {
+      redraw(); 
+      // only wait for exposure if this window has a size - a window 
+      // with no width or height will never get an exposure event
+      if (i && W>0 && H>0)
+        i->wait_for_expose = 1;
+    }
+  } else {
+    x(X); y(Y);
+    flags |= SWP_NOSIZE;
+  }
+  if (!border()) flags |= SWP_NOACTIVATE;
+  if (resize_from_program && shown()) {
+    if (!resizable()) size_range(w(),h(),w(),h());
+    int dummy_x, dummy_y, bt, bx, by;
+    //Ignore window managing when resizing, so that windows (and more
+    //specifically menus) can be moved offscreen.
+    if (Fl_X::fake_X_wm(this, dummy_x, dummy_y, bt, bx, by)) {
+      X -= bx;
+      Y -= by+bt;
+      W += 2*bx;
+      H += 2*by+bt;
+    }
+    // avoid zero size windows. A zero sized window on Win32
+    // will cause continouly  new redraw events.
+    if (W<=0) W = 1;
+    if (H<=0) H = 1;
+    SetWindowPos(i->xid, 0, X, Y, W, H, flags);
+  }
+}
+
+////////////////////////////////////////////////////////////////
+
+/*
+ * This silly little class remembers the name of all window classes 
+ * we register to avoid double registration. It has the added bonus 
+ * of freeing everything on application close as well.
+ */
+class NameList {
+public:
+  NameList() { name = (char**)malloc(sizeof(char**)); NName = 1; nName = 0; }
+  ~NameList() { 
+    int i;
+    for (i=0; i<nName; i++) free(name[i]);
+    if (name) free(name); 
+  }
+  void add_name(const char *n) {
+    if (NName==nName) {
+      NName += 5;
+      name = (char**)realloc(name, NName * sizeof(char*));
+    }
+    name[nName++] = strdup(n);
+  }
+  char has_name(const char *n) {
+    int i;
+    for (i=0; i<nName; i++) {
+      if (strcmp(name[i], n)==0) return 1;
+    }
+    return 0;
+  }
+private:
+  char **name;
+  int nName, NName;
+};
+
+void fl_fix_focus(); // in Fl.cxx
+
+char fl_show_iconic;	// hack for fltk3::Window::iconic()
+// int fl_background_pixel = -1; // color to use for background
+HCURSOR fl_default_cursor;
+UINT fl_wake_msg = 0;
+int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
+
+Fl_X* Fl_X::make(fltk3::Window* w) {
+  fltk3::Group::current(0); // get rid of very common user bug: forgot end()
+
+  // if the window is a subwindow and our parent is not mapped yet, we
+  // mark this window visible, so that mapping the parent at a later
+  // point in time will call this function again to finally map the subwindow.
+  if (w->parent() && !Fl_X::i(w->window())) {
+    w->set_visible();
+    return 0L;
+  }
+
+  static NameList class_name_list;
+  static const char *first_class_name = 0L;
+  const char *class_name = w->xclass();
+  if (!class_name) class_name = first_class_name; // reuse first class name used
+  if (!class_name) class_name = "FLTK"; // default to create a "FLTK" WNDCLASS
+  if (!first_class_name) {
+    first_class_name = class_name;
+  }
+
+  wchar_t class_namew[100]; // (limited) buffer for Windows class name
+
+  // convert UTF-8 class_name to wchar_t for RegisterClassExW and CreateWindowExW
+
+  fltk3::utf8toUtf16(class_name,strlen(class_name),		// in
+		 (unsigned short*)class_namew,		// out
+		 sizeof(class_namew)/sizeof(wchar_t));	// max. size
+
+  if (!class_name_list.has_name(class_name)) {
+    WNDCLASSEXW wcw;
+    memset(&wcw, 0, sizeof(wcw));
+    wcw.cbSize = sizeof(WNDCLASSEXW);
+
+    // Documentation states a device context consumes about 800 bytes
+    // of memory... so who cares? If 800 bytes per window is what it
+    // takes to speed things up, I'm game.
+    //wc.style = CS_HREDRAW | CS_VREDRAW | CS_CLASSDC | CS_DBLCLKS;
+    wcw.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_DBLCLKS;
+    wcw.lpfnWndProc = (WNDPROC)WndProc;
+    wcw.cbClsExtra = wcw.cbWndExtra = 0;
+    wcw.hInstance = fl_display;
+    if (!w->icon())
+      w->icon((void *)LoadIcon(NULL, IDI_APPLICATION));
+    wcw.hIcon = wcw.hIconSm = (HICON)w->icon();
+    wcw.hCursor = fl_default_cursor = LoadCursor(NULL, IDC_ARROW);
+    //uchar r,g,b; fltk3::get_color(fltk3::GRAY,r,g,b);
+    //wc.hbrBackground = (HBRUSH)CreateSolidBrush(RGB(r,g,b));
+    wcw.hbrBackground = NULL;
+    wcw.lpszMenuName = NULL;
+    wcw.lpszClassName = class_namew;
+    RegisterClassExW(&wcw);
+    class_name_list.add_name(class_name);
+  }
+
+  const wchar_t* message_namew = L"FLTK::ThreadWakeup";
+  if (!fl_wake_msg) fl_wake_msg = RegisterWindowMessageW(message_namew);
+
+  HWND parent;
+  DWORD style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
+  DWORD styleEx = WS_EX_LEFT;
+
+  int xp = w->x();
+  int yp = w->y();
+  int wp = w->w();
+  int hp = w->h();
+
+  int showit = 1;
+
+  if (w->parent()) {
+    style |= WS_CHILD;
+    styleEx |= WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT;
+    parent = fl_xid(w->window());
+  } else {
+    if (!w->size_range_set) {
+      if (w->resizable()) {
+	fltk3::Widget *o = w->resizable();
+	int minw = o->w(); if (minw > 100) minw = 100;
+	int minh = o->h(); if (minh > 100) minh = 100;
+	w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
+      } else {
+	w->size_range(w->w(), w->h(), w->w(), w->h());
+      }
+    }
+    styleEx |= WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT;
+    int xwm = xp , ywm = yp , bt, bx, by;
+    switch (fake_X_wm(w, xwm, ywm, bt, bx, by)) {
+      // No border (used for menus)
+      case 0: style |= WS_POPUP;
+              styleEx |= WS_EX_TOOLWINDOW;
+	      break;
+
+      // Thin border and title bar
+      case 1: style |= WS_DLGFRAME | WS_CAPTION; break;
+
+      // Thick, resizable border and title bar, with maximize button
+      case 2: style |= WS_THICKFRAME | WS_MAXIMIZEBOX | WS_CAPTION ; break;
+    }
+    if (by+bt) {
+      if (!w->modal()) style |= WS_SYSMENU | WS_MINIMIZEBOX;
+      wp += 2*bx;
+      hp += 2*by+bt;
+    }
+    if (!w->force_position()) {
+      xp = yp = CW_USEDEFAULT;
+    } else {
+      if (!fltk3::grab()) {
+	xp = xwm; yp = ywm;
+        w->x(xp);w->y(yp);
+      }
+      xp -= bx;
+      yp -= by+bt;
+    }
+
+    parent = 0;
+    if (w->non_modal() && Fl_X::first && !fl_disable_transient_for) {
+      // find some other window to be "transient for":
+      fltk3::Window* w = Fl_X::first->w;
+      while (w->parent()) w = w->window();
+      parent = fl_xid(w);
+      if (!w->visible()) showit = 0;
+    } else if (fltk3::grab()) parent = fl_xid(fltk3::grab());
+  }
+
+  Fl_X* x = new Fl_X;
+  x->other_xid = 0;
+  x->setwindow(w);
+  x->region = 0;
+  x->private_dc = 0;
+  x->cursor = fl_default_cursor;
+  if (!fl_codepage) fl_get_codepage();
+
+  WCHAR *lab = NULL;
+  if (w->label()) {
+    int l = strlen(w->label());
+//  lab = (WCHAR*) malloc((l + 1) * sizeof(short));
+//  l = fl_utf2unicode((unsigned char*)w->label(), l, (xchar*)lab);
+//  lab[l] = 0;
+    unsigned wlen = fltk3::utf8toUtf16(w->label(), l, NULL, 0); // Pass NULL to query length
+    wlen++;
+    lab = (WCHAR *) malloc(sizeof(WCHAR)*wlen);
+    wlen = fltk3::utf8toUtf16(w->label(), l, (unsigned short*)lab, wlen);
+    lab[wlen] = 0;
+  }
+  x->xid = CreateWindowExW(
+    styleEx,
+    class_namew, lab, style,
+    xp, yp, wp, hp,
+    parent,
+    NULL, // menu
+    fl_display,
+    NULL // creation parameters
+  );
+  if (lab) free(lab);
+
+  x->next = Fl_X::first;
+  Fl_X::first = x;
+
+  x->wait_for_expose = 1;
+  if (fl_show_iconic) {showit = 0; fl_show_iconic = 0;}
+  if (showit) {
+    w->set_visible();
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::SHOW); // get child windows to appear
+    fltk3::e_number = old_event;
+    w->redraw(); // force draw to happen
+  }
+  // If we've captured the mouse, we dont want to activate any
+  // other windows from the code, or we lose the capture.
+  ShowWindow(x->xid, !showit ? SW_SHOWMINNOACTIVE :
+	     (fltk3::grab() || (style & WS_POPUP)) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL);
+
+  // Register all windows for potential drag'n'drop operations
+  fl_OleInitialize();
+  RegisterDragDrop(x->xid, flIDropTarget);
+
+  if (!fl_aimm) {
+    CoCreateInstance(CLSID_CActiveIMM, NULL, CLSCTX_INPROC_SERVER,
+		     IID_IActiveIMMApp, (void**) &fl_aimm);
+    if (fl_aimm) {
+      fl_aimm->Activate(TRUE);
+    }
+  }
+
+  if (w->modal()) {fltk3::modal_ = w; fl_fix_focus();}
+  return x;
+}
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+/// Win32 timers
+///
+
+
+static LRESULT CALLBACK s_TimerProc(HWND hwnd, UINT msg,
+                                    WPARAM wParam, LPARAM lParam)
+{
+  switch (msg) {
+  case WM_TIMER:
+    {
+      unsigned int id = wParam - 1;
+      if (id < (unsigned int)win32_timer_used && win32_timers[id].handle) {
+        fltk3::TimeoutHandler cb   = win32_timers[id].callback;
+        void*              data = win32_timers[id].data;
+        delete_timer(win32_timers[id]);
+        if (cb) {
+          (*cb)(data);
+        }
+      }
+    }
+    return 0;
+
+  default:
+    break;
+  }
+
+  return DefWindowProc(hwnd, msg, wParam, lParam);
+}
+
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void* data)
+{
+  repeat_timeout(time, cb, data);
+}
+
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void* data)
+{
+  int timer_id = -1;
+  for (int i = 0;  i < win32_timer_used;  ++i) {
+    if ( !win32_timers[i].handle ) {
+      timer_id = i;
+      break;
+    }
+  }
+  if (timer_id == -1) {
+    if (win32_timer_used == win32_timer_alloc) {
+      realloc_timers();
+    }
+    timer_id = win32_timer_used++;
+  }
+  unsigned int elapsed = (unsigned int)(time * 1000);
+
+  if ( !s_TimerWnd ) {
+    const char* timer_class = "FLTimer";
+    WNDCLASSEX wc;
+    memset(&wc, 0, sizeof(wc));
+    wc.cbSize = sizeof (wc);
+    wc.style = CS_CLASSDC;
+    wc.lpfnWndProc = (WNDPROC)s_TimerProc;
+    wc.hInstance = fl_display;
+    wc.lpszClassName = timer_class;
+    /*ATOM atom =*/ RegisterClassEx(&wc);
+    // create a zero size window to handle timer events
+    s_TimerWnd = CreateWindowEx(WS_EX_LEFT | WS_EX_TOOLWINDOW,
+                                timer_class, "",
+                                WS_POPUP,
+                                0, 0, 0, 0,
+                                NULL, NULL, fl_display, NULL);
+    // just in case this OS won't let us create a 0x0 size window:
+    if (!s_TimerWnd)
+      s_TimerWnd = CreateWindowEx(WS_EX_LEFT | WS_EX_TOOLWINDOW,
+				  timer_class, "",
+				  WS_POPUP,
+				  0, 0, 1, 1,
+				  NULL, NULL, fl_display, NULL);
+    ShowWindow(s_TimerWnd, SW_SHOWNOACTIVATE);
+  }
+
+  win32_timers[timer_id].callback = cb;
+  win32_timers[timer_id].data     = data;
+
+  win32_timers[timer_id].handle =
+    SetTimer(s_TimerWnd, timer_id + 1, elapsed, NULL);
+}
+
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void* data)
+{
+  for (int i = 0;  i < win32_timer_used;  ++i) {
+    Win32Timer& t = win32_timers[i];
+    if (t.handle  &&  t.callback == cb  &&  t.data == data) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void* data)
+{
+  int i;
+  for (i = 0;  i < win32_timer_used;  ++i) {
+    Win32Timer& t = win32_timers[i];
+    if (t.handle  &&  t.callback == cb  &&
+      (t.data == data  ||  data == NULL)) {
+      delete_timer(t);
+    }
+  }
+}
+
+/// END TIMERS
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////
+
+HINSTANCE fl_display = GetModuleHandle(NULL);
+
+void fltk3::Window::size_range_() {
+  size_range_set = 1;
+}
+
+void Fl_X::set_minmax(LPMINMAXINFO minmax)
+{
+  int td, wd, hd, dummy_x, dummy_y;
+
+  fake_X_wm(w, dummy_x, dummy_y, td, wd, hd);
+  wd *= 2;
+  hd *= 2;
+  hd += td;
+
+  minmax->ptMinTrackSize.x = w->minw + wd;
+  minmax->ptMinTrackSize.y = w->minh + hd;
+  if (w->maxw) {
+    minmax->ptMaxTrackSize.x = w->maxw + wd;
+    minmax->ptMaxSize.x = w->maxw + wd;
+  }
+  if (w->maxh) {
+    minmax->ptMaxTrackSize.y = w->maxh + hd;
+    minmax->ptMaxSize.y = w->maxh + hd;
+  }
+}
+
+////////////////////////////////////////////////////////////////
+
+#include <fltk3/filename.h> // need so FLTK3_EXPORT fltk3::filename_name works
+
+// returns pointer to the filename, or null if name ends with '/'
+const char *fltk3::filename_name(const char *name) {
+  const char *p,*q;
+  if (!name) return (0);
+  q = name;
+  if (q[0] && q[1]==':') q += 2; // skip leading drive letter
+  for (p = q; *p; p++) if (*p == '/' || *p == '\\') q = p+1;
+  return q;
+}
+
+void fltk3::Window::label(const char *name,const char *iname) {
+  Widget::label(name);
+  iconlabel_ = iname;
+  if (shown() && !parent()) {
+    if (!name) name = "";
+    int l = strlen(name);
+//  WCHAR *lab = (WCHAR*) malloc((l + 1) * sizeof(short));
+//  l = fl_utf2unicode((unsigned char*)name, l, (xchar*)lab);
+    unsigned wlen = fltk3::utf8toUtf16(name, l, NULL, 0); // Pass NULL to query length
+    wlen++;
+    unsigned short * lab = (unsigned short*)malloc(sizeof(unsigned short)*wlen);
+    wlen = fltk3::utf8toUtf16(name, l, lab, wlen);
+    lab[wlen] = 0;
+    SetWindowTextW(i->xid, (WCHAR *)lab);
+    free(lab);
+  }
+}
+
+////////////////////////////////////////////////////////////////
+// Implement the virtual functions for the base fltk3::Window class:
+
+// If the box is a filled rectangle, we can make the redisplay *look*
+// faster by using X's background pixel erasing.  We can make it
+// actually *be* faster by drawing the frame only, this is done by
+// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
+// For WIN32 it looks like all windows share a background color, so
+// I use fltk3::GRAY for this and only do this cheat for windows that are
+// that color.
+// Actually it is totally disabled.
+// fltk3::Widget *fl_boxcheat;
+//static inline int can_boxcheat(uchar b) {return (b==1 || (b&2) && b<=15);}
+
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
+    labeltype(fltk3::NORMAL_LABEL);
+    align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
+  } else {
+    labeltype(fltk3::NO_LABEL);
+  }
+  fltk3::Tooltip::exit(this);
+  if (!shown()) {
+    // if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color());
+    Fl_X::make(this);
+  } else {
+    // Once again, we would lose the capture if we activated the window.
+    if (IsIconic(i->xid)) OpenIcon(i->xid);
+    if (!fl_capture) BringWindowToTop(i->xid);
+    //ShowWindow(i->xid,fl_capture?SW_SHOWNOACTIVATE:SW_RESTORE);
+  }
+#ifdef USE_PRINT_BUTTON
+void preparePrintFront(void);
+preparePrintFront();
+#endif
+}
+
+fltk3::Window *fltk3::Window::current_;
+// the current context
+HDC fl_gc = 0;
+// the current window handle, initially set to -1 so we can correctly
+// allocate fl_GetDC(0)
+HWND fl_window = NULL;
+
+// Here we ensure only one GetDC is ever in place.
+HDC fl_GetDC(HWND w) {
+  if (fl_gc) {
+    if (w == fl_window  &&  fl_window != NULL) return fl_gc;
+    if (fl_window) fl_release_dc(fl_window, fl_gc); // ReleaseDC
+  }
+  fl_gc = GetDC(w);
+  fl_save_dc(w, fl_gc);
+  fl_window = w;
+  // calling GetDC seems to always reset these: (?)
+  SetTextAlign(fl_gc, TA_BASELINE|TA_LEFT);
+  SetBkMode(fl_gc, TRANSPARENT);
+
+  return fl_gc;
+}
+
+// make X drawing go into this window (called by subclass flush() impl.)
+void fltk3::Window::make_current() {
+  fl_GetDC(fl_xid(this));
+
+#if USE_COLORMAP
+  // Windows maintains a hardware and software color palette; the
+  // SelectPalette() call updates the current soft->hard mapping
+  // for all drawing calls, so we must select it here before any
+  // code does any drawing...
+
+  fl_select_palette();
+#endif // USE_COLORMAP
+
+  current_ = this;
+  fltk3::clip_region(0);
+
+
+}
+
+/* Make sure that all allocated fonts are released. This works only if 
+   fltk3::run() is allowed to exit by closing all windows. Calling 'exit(int)'
+   will not automatically free any fonts. */
+void fl_free_fonts(void)
+{
+// remove the Fl_Font_Descriptor chains
+  int i;
+  Fl_Fontdesc * s;
+  Fl_Font_Descriptor * f;
+  Fl_Font_Descriptor * ff;
+  for (i=0; i<fltk3::FREE_FONT; i++) {
+    s = fltk3::fonts + i;
+    for (f=s->first; f; f=ff) {
+      ff = f->next;
+      delete f;
+      s->first = ff;
+    }
+  }
+}
+
+
+///////////////////////////////////////////////////////////////////////
+//
+//  The following routines help fix a problem with the leaking of Windows
+//  Device Context (DC) objects. The 'proper' protocol is for a program to
+//  acquire a DC, save its state, do the modifications needed for drawing,
+//  perform the drawing, restore the initial state, and release the DC. In
+//  FLTK, the save and restore steps have previously been omitted and DCs are
+//  not properly released, leading to a great number of DC leaks. As some
+//  Windows "OSs" will hang when any process exceeds roughly 10,000 GDI objects,
+//  it is important to control GDI leaks, which are much more important than memory
+//  leaks. The following struct, global variable, and routines help implement
+//  the above protocol for those cases where the GetDC and RestoreDC are not in
+//  the same routine. For each GetDC, fl_save_dc is used to create an entry in 
+//  a linked list that saves the window handle, the DC handle, and the initial
+//  state. When the DC is to be released, 'fl_release_dc' is called. It restores
+//  the initial state and releases the DC. When the program exits, 'fl_cleanup_dc_list'
+//  frees any remaining nodes in the list.
+
+struct Win_DC_List {      // linked list 
+  HWND    window;         // window handle
+  HDC     dc;             // device context handle
+  int     saved_dc;       // initial state of DC
+  Win_DC_List * next;     // pointer to next item
+};
+
+static Win_DC_List * win_DC_list = 0;
+
+void fl_save_dc( HWND w, HDC dc) {
+  Win_DC_List * t;
+  t = new Win_DC_List;
+  t->window = w;
+  t->dc = dc;
+  t->saved_dc = SaveDC(dc);
+  if (win_DC_list)
+    t->next = win_DC_list;
+  else
+    t->next = NULL;
+  win_DC_list = t;
+}
+
+void fl_release_dc(HWND w, HDC dc) {
+  Win_DC_List * t= win_DC_list;
+  Win_DC_List * prev = 0;
+  if (!t)
+    return;
+  do {
+    if (t->dc == dc) {
+      RestoreDC(dc, t->saved_dc);
+      ReleaseDC(w, dc);
+      if (!prev) {
+        win_DC_list = t->next;   // delete first item
+      } else {
+        prev->next = t->next;       // one in the middle
+      }
+      delete (t);
+      return;
+    }
+    prev = t;
+    t = t->next;
+  } while (t);
+}
+
+void fl_cleanup_dc_list(void) {          // clean up the list
+  Win_DC_List * t = win_DC_list;
+  if (!t)return;
+  do {
+    RestoreDC(t->dc, t->saved_dc);
+    ReleaseDC(t->window, t->dc);
+    win_DC_list = t->next;
+    delete (t);
+    t = win_DC_list;
+  } while(t);
+}
+
+fltk3::Region XRectangleRegion(int x, int y, int w, int h) {
+  if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::DisplayDevice::class_id) return CreateRectRgn(x,y,x+w,y+h);
+  // because rotation may apply, the rectangle becomes a polygon in device coords
+  POINT pt[4] = { {x, y}, {x + w, y}, {x + w, y + h}, {x, y + h} };
+  LPtoDP(fl_gc, pt, 4);
+  return CreatePolygonRgn(pt, 4, ALTERNATE);
+}
+
+Window fl_xid_(const fltk3::Window *w) {
+  Fl_X *temp = Fl_X::i(w); 
+  return temp ? temp->xid : 0;
+}
+
+int fltk3::Window::decorated_w()
+{
+  if (!shown() || parent() || !border() || !visible()) return w();
+  int X, Y, bt, bx, by;
+  Fl_X::fake_X_wm(this, X, Y, bt, bx, by);
+  return w() + 2 * bx;
+}
+
+int fltk3::Window::decorated_h()
+{
+  if (!shown() || parent() || !border() || !visible()) return h();
+  int X, Y, bt, bx, by;
+  Fl_X::fake_X_wm(this, X, Y, bt, bx, by);
+  return h() + bt + 2 * by;
+}
+
+void fltk3::PagedDevice::print_window(fltk3::Window *win, int x_offset, int y_offset)
+{
+  if (!win->shown() || win->parent() || !win->border() || !win->visible()) {
+    this->print_widget(win, x_offset, y_offset);
+    return;
+  }
+  int X, Y, bt, bx, by, ww, wh; // compute the window border sizes
+  Fl_X::fake_X_wm(win, X, Y, bt, bx, by);
+  ww = win->w() + 2 * bx;
+  wh = win->h() + bt + 2 * by;
+  fltk3::DisplayDevice::display_device()->set_current(); // make window current
+  win->show();
+  fltk3::check();
+  win->make_current();
+  HDC save_gc = fl_gc;
+  fl_gc = GetDC(NULL); // get the screen device context
+  // capture the 4 window sides from screen
+  RECT r; GetWindowRect(fl_window, &r);
+  uchar *top_image = fltk3::read_image(NULL, r.left, r.top, ww, bt + by);
+  uchar *left_image = fltk3::read_image(NULL, r.left, r.top, bx, wh);
+  uchar *right_image = fltk3::read_image(NULL, r.right - bx, r.top, bx, wh);
+  uchar *bottom_image = fltk3::read_image(NULL, r.left, r.bottom-by, ww, by);
+  ReleaseDC(NULL, fl_gc); fl_gc = save_gc;
+  this->set_current();
+  // print the 4 window sides
+  fltk3::draw_image(top_image, x_offset, y_offset, ww, bt + by, 3);
+  fltk3::draw_image(left_image, x_offset, y_offset, bx, wh, 3);
+  fltk3::draw_image(right_image, x_offset + win->w() + bx, y_offset, bx, wh, 3);
+  fltk3::draw_image(bottom_image, x_offset, y_offset + win->h() + bt + by, ww, by, 3);
+  delete[] top_image;
+  delete[] left_image;
+  delete[] right_image;
+  delete[] bottom_image;
+  // print the window inner part
+  this->print_widget(win, x_offset + bx, y_offset + bt + by);
+  fl_gc = GetDC(fl_xid(win));
+  ReleaseDC(fl_xid(win), fl_gc);
+}  
+
+#ifdef USE_PRINT_BUTTON
+// to test the fltk3::Printer class creating a "Print front window" button in a separate window
+// contains also preparePrintFront call above
+#include <fltk3/Printer.h>
+#include <fltk3/Button.h>
+void printFront(fltk3::Widget *o, void *data)
+{
+  fltk3::Printer printer;
+  o->window()->hide();
+  fltk3::Window *win = fltk3::first_window();
+  if(!win) return;
+  int w, h;
+  if( printer.start_job(1) ) { o->window()->show(); return; }
+  if( printer.start_page() ) { o->window()->show(); return; }
+  printer.printable_rect(&w,&h);
+  int  wh, ww;
+  wh = win->decorated_h();
+  ww = win->decorated_w();
+  // scale the printer device so that the window fits on the page
+  float scale = 1;
+  if (ww > w || wh > h) {
+    scale = (float)w/ww;
+    if ((float)h/wh < scale) scale = (float)h/wh;
+    printer.scale(scale, scale);
+  }
+// #define ROTATE 20.0
+#ifdef ROTATE
+  printer.scale(scale * 0.8, scale * 0.8);
+  printer.printable_rect(&w, &h);
+  printer.origin(w/2, h/2 );
+  printer.rotate(ROTATE);
+  printer.print_widget( win, - win->w()/2, - win->h()/2 );
+  //printer.print_window_part( win, 0,0, win->w(), win->h(), - win->w()/2, - win->h()/2 );
+#else  
+  printer.print_window(win);
+#endif
+  printer.end_page();
+  printer.end_job();
+  o->window()->show();
+}
+
+void preparePrintFront(void)
+{
+  static BOOL first=TRUE;
+  if(!first) return;
+  first=FALSE;
+  static fltk3::Window w(0,0,120,30);
+  static fltk3::Button b(0,0,w.w(),w.h(), "Print front window");
+  b.callback(printFront);
+  w.end();
+  w.show();
+}
+#endif // USE_PRINT_BUTTON
+
+#endif // FLTK3_DOXYGEN
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Fl_x.cxx
===================================================================
--- branches/branch-3.0/src/core/Fl_x.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Fl_x.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2119 @@
+//
+// "$Id$"
+//
+// X specific code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifdef WIN32
+//#  include "Fl_win32.cxx"
+#elif defined(__APPLE__)
+//#  include "Fl_mac.cxx"
+#elif !defined(FLTK3_DOXYGEN)
+
+#  define CONSOLIDATE_MOTION 1
+/**** Define this if your keyboard lacks a backspace key... ****/
+/* #define BACKSPACE_HACK 1 */
+
+#  include <config.h>
+#  include <fltk3/run.h>
+#  include <fltk3/x.h>
+#  include <fltk3/Window.h>
+#  include <fltk3/utf8.h>
+#  include <fltk3/Tooltip.h>
+#  include <fltk3/draw.h>
+#  include <fltk3/PagedDevice.h>
+#  include <fltk3/filename.h>
+#  include <stdio.h>
+#  include <stdlib.h>
+#  include "flstring.h"
+#  include <unistd.h>
+#  include <sys/time.h>
+#  include <X11/Xmd.h>
+#  include <X11/Xlocale.h>
+#  include <X11/Xlib.h>
+#  include <X11/keysym.h>
+
+static fltk3::XlibGraphicsDriver fl_xlib_driver;
+static fltk3::DisplayDevice fl_xlib_display(&fl_xlib_driver);
+FLTK3_EXPORT fltk3::GraphicsDriver *fltk3::graphics_driver = (fltk3::GraphicsDriver*)&fl_xlib_driver; // the current target device of graphics operations
+fltk3::SurfaceDevice* fltk3::SurfaceDevice::_surface = (fltk3::SurfaceDevice*)&fl_xlib_display; // the current target surface of graphics operations
+fltk3::DisplayDevice *fltk3::DisplayDevice::_display = &fl_xlib_display;// the platform display
+
+////////////////////////////////////////////////////////////////
+// interface to poll/select call:
+
+#  if USE_POLL
+
+#    include <poll.h>
+static pollfd *pollfds = 0;
+
+#  else
+#    if HAVE_SYS_SELECT_H
+#      include <sys/select.h>
+#    endif /* HAVE_SYS_SELECT_H */
+
+// The following #define is only needed for HP-UX 9.x and earlier:
+//#define select(a,b,c,d,e) select((a),(int *)(b),(int *)(c),(int *)(d),(e))
+
+static fd_set fdsets[3];
+static int maxfd;
+#    define POLLIN 1
+#    define POLLOUT 4
+#    define POLLERR 8
+
+#  endif /* USE_POLL */
+
+static int nfds = 0;
+static int fd_array_size = 0;
+struct FD {
+#  if !USE_POLL
+  int fd;
+  short events;
+#  endif
+  void (*cb)(int, void*);
+  void* arg;
+};
+
+static FD *fd = 0;
+
+void fltk3::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
+  remove_fd(n,events);
+  int i = nfds++;
+  if (i >= fd_array_size) {
+    FD *temp;
+    fd_array_size = 2*fd_array_size+1;
+
+    if (!fd) temp = (FD*)malloc(fd_array_size*sizeof(FD));
+    else temp = (FD*)realloc(fd, fd_array_size*sizeof(FD));
+
+    if (!temp) return;
+    fd = temp;
+
+#  if USE_POLL
+    pollfd *tpoll;
+
+    if (!pollfds) tpoll = (pollfd*)malloc(fd_array_size*sizeof(pollfd));
+    else tpoll = (pollfd*)realloc(pollfds, fd_array_size*sizeof(pollfd));
+
+    if (!tpoll) return;
+    pollfds = tpoll;
+#  endif
+  }
+  fd[i].cb = cb;
+  fd[i].arg = v;
+#  if USE_POLL
+  pollfds[i].fd = n;
+  pollfds[i].events = events;
+#  else
+  fd[i].fd = n;
+  fd[i].events = events;
+  if (events & POLLIN) FD_SET(n, &fdsets[0]);
+  if (events & POLLOUT) FD_SET(n, &fdsets[1]);
+  if (events & POLLERR) FD_SET(n, &fdsets[2]);
+  if (n > maxfd) maxfd = n;
+#  endif
+}
+
+void fltk3::add_fd(int n, void (*cb)(int, void*), void* v) {
+  fltk3::add_fd(n, POLLIN, cb, v);
+}
+
+void fltk3::remove_fd(int n, int events) {
+  int i,j;
+# if !USE_POLL
+  maxfd = -1; // recalculate maxfd on the fly
+# endif
+  for (i=j=0; i<nfds; i++) {
+#  if USE_POLL
+    if (pollfds[i].fd == n) {
+      int e = pollfds[i].events & ~events;
+      if (!e) continue; // if no events left, delete this fd
+      pollfds[j].events = e;
+    }
+#  else
+    if (fd[i].fd == n) {
+      int e = fd[i].events & ~events;
+      if (!e) continue; // if no events left, delete this fd
+      fd[i].events = e;
+    }
+    if (fd[i].fd > maxfd) maxfd = fd[i].fd;
+#  endif
+    // move it down in the array if necessary:
+    if (j<i) {
+      fd[j] = fd[i];
+#  if USE_POLL
+      pollfds[j] = pollfds[i];
+#  endif
+    }
+    j++;
+  }
+  nfds = j;
+#  if !USE_POLL
+  if (events & POLLIN) FD_CLR(n, &fdsets[0]);
+  if (events & POLLOUT) FD_CLR(n, &fdsets[1]);
+  if (events & POLLERR) FD_CLR(n, &fdsets[2]);
+#  endif
+}
+
+void fltk3::remove_fd(int n) {
+  remove_fd(n, -1);
+}
+
+#if CONSOLIDATE_MOTION
+static fltk3::Window* send_motion;
+extern fltk3::Window* fl_xmousewin;
+#endif
+static bool in_a_window; // true if in any of our windows, even destroyed ones
+static void do_queued_events() {
+  in_a_window = true;
+  while (XEventsQueued(fl_display,QueuedAfterReading)) {
+    XEvent xevent;
+    XNextEvent(fl_display, &xevent);
+    fl_handle(xevent);
+  }
+  // we send fltk3::LEAVE only if the mouse did not enter some other window:
+  if (!in_a_window) fltk3::handle(fltk3::LEAVE, 0);
+#if CONSOLIDATE_MOTION
+  else if (send_motion == fl_xmousewin) {
+    send_motion = 0;
+    fltk3::handle(fltk3::MOVE, fl_xmousewin);
+  }
+#endif
+}
+
+// these pointers are set by the fltk3::lock() function:
+static void nothing() {}
+void (*fl_lock_function)() = nothing;
+void (*fl_unlock_function)() = nothing;
+
+// This is never called with time_to_wait < 0.0:
+// It should return negative on error, 0 if nothing happens before
+// timeout, and >0 if any callbacks were done.
+int fl_wait(double time_to_wait) {
+
+  // OpenGL and other broken libraries call XEventsQueued
+  // unnecessarily and thus cause the file descriptor to not be ready,
+  // so we must check for already-read events:
+  if (fl_display && XQLength(fl_display)) {do_queued_events(); return 1;}
+
+#  if !USE_POLL
+  fd_set fdt[3];
+  fdt[0] = fdsets[0];
+  fdt[1] = fdsets[1];
+  fdt[2] = fdsets[2];
+#  endif
+  int n;
+
+  fl_unlock_function();
+
+  if (time_to_wait < 2147483.648) {
+#  if USE_POLL
+    n = ::poll(pollfds, nfds, int(time_to_wait*1000 + .5));
+#  else
+    timeval t;
+    t.tv_sec = int(time_to_wait);
+    t.tv_usec = int(1000000 * (time_to_wait-t.tv_sec));
+    n = ::select(maxfd+1,&fdt[0],&fdt[1],&fdt[2],&t);
+#  endif
+  } else {
+#  if USE_POLL
+    n = ::poll(pollfds, nfds, -1);
+#  else
+    n = ::select(maxfd+1,&fdt[0],&fdt[1],&fdt[2],0);
+#  endif
+  }
+
+  fl_lock_function();
+
+  if (n > 0) {
+    for (int i=0; i<nfds; i++) {
+#  if USE_POLL
+      if (pollfds[i].revents) fd[i].cb(pollfds[i].fd, fd[i].arg);
+#  else
+      int f = fd[i].fd;
+      short revents = 0;
+      if (FD_ISSET(f,&fdt[0])) revents |= POLLIN;
+      if (FD_ISSET(f,&fdt[1])) revents |= POLLOUT;
+      if (FD_ISSET(f,&fdt[2])) revents |= POLLERR;
+      if (fd[i].events & revents) fd[i].cb(f, fd[i].arg);
+#  endif
+    }
+  }
+  return n;
+}
+
+// fl_ready() is just like fl_wait(0.0) except no callbacks are done:
+int fl_ready() {
+  if (XQLength(fl_display)) return 1;
+  if (!nfds) return 0; // nothing to select or poll
+#  if USE_POLL
+  return ::poll(pollfds, nfds, 0);
+#  else
+  timeval t;
+  t.tv_sec = 0;
+  t.tv_usec = 0;
+  fd_set fdt[3];
+  fdt[0] = fdsets[0];
+  fdt[1] = fdsets[1];
+  fdt[2] = fdsets[2];
+  return ::select(maxfd+1,&fdt[0],&fdt[1],&fdt[2],&t);
+#  endif
+}
+
+// replace \r\n by \n
+static void convert_crlf(unsigned char *string, long& len) {
+  unsigned char *a, *b;
+  a = b = string;
+  while (*a) {
+    if (*a == '\r' && a[1] == '\n') { a++; len--; }
+    else *b++ = *a++;
+  }
+  *b = 0;
+}
+
+////////////////////////////////////////////////////////////////
+
+Display *fl_display;
+namespace fltk3 {
+ ::Window message_window = 0;
+}
+int fl_screen;
+XVisualInfo *fl_visual;
+Colormap fl_colormap;
+XIM fl_xim_im = 0;
+XIC fl_xim_ic = 0;
+char fl_is_over_the_spot = 0;
+static XRectangle status_area;
+
+static Atom WM_DELETE_WINDOW;
+static Atom WM_PROTOCOLS;
+static Atom fl_MOTIF_WM_HINTS;
+static Atom TARGETS;
+static Atom CLIPBOARD;
+Atom fl_XdndAware;
+Atom fl_XdndSelection;
+Atom fl_XdndEnter;
+Atom fl_XdndTypeList;
+Atom fl_XdndPosition;
+Atom fl_XdndLeave;
+Atom fl_XdndDrop;
+Atom fl_XdndStatus;
+Atom fl_XdndActionCopy;
+Atom fl_XdndFinished;
+//Atom fl_XdndProxy;
+Atom fl_XdndURIList;
+Atom fl_Xatextplainutf;
+Atom fl_Xatextplain;
+static Atom fl_XaText;
+Atom fl_XaCompoundText;
+Atom fl_XaUtf8String;
+Atom fl_XaTextUriList;
+Atom fl_NET_WM_NAME;			// utf8 aware window label
+Atom fl_NET_WM_ICON_NAME;		// utf8 aware window icon name
+
+/*
+  X defines 32-bit-entities to have a format value of max. 32,
+  although sizeof(atom) can be 8 (64 bits) on a 64-bit OS.
+  See also fl_open_display() for sizeof(atom) < 4.
+  Used for XChangeProperty (see STR #2419).
+*/
+static int atom_bits = 32;
+
+static void fd_callback(int,void *) {
+  do_queued_events();
+}
+
+extern "C" {
+  static int io_error_handler(Display*) {
+    fltk3::fatal("X I/O error");
+    return 0;
+  }
+
+  static int xerror_handler(Display* d, XErrorEvent* e) {
+    char buf1[128], buf2[128];
+    sprintf(buf1, "XRequest.%d", e->request_code);
+    XGetErrorDatabaseText(d,"",buf1,buf1,buf2,128);
+    XGetErrorText(d, e->error_code, buf1, 128);
+    fltk3::warning("%s: %s 0x%lx", buf2, buf1, e->resourceid);
+    return 0;
+  }
+}
+
+extern char *fl_get_font_xfld(int fnum, int size);
+
+void fl_new_ic()
+{
+  XVaNestedList preedit_attr = NULL;
+  XVaNestedList status_attr = NULL;
+  static XFontSet fs = NULL;
+  char *fnt;
+  char **missing_list;
+  int missing_count;
+  char *def_string;
+  static XRectangle spot;
+  int predit = 0;
+  int sarea = 0;
+  XIMStyles* xim_styles = NULL;
+
+#if USE_XFT
+
+#if defined(__GNUC__)
+// FIXME: warning XFT support here
+#endif /*__GNUC__*/
+
+  if (!fs) {
+    fnt = (char*)"-misc-fixed-*";
+    fs = XCreateFontSet(fl_display, fnt, &missing_list,
+                        &missing_count, &def_string);
+  }
+#else
+  if (!fs) {
+    bool must_free_fnt = true;
+    fnt = fl_get_font_xfld(0, 14);
+    if (!fnt) {fnt = (char*)"-misc-fixed-*";must_free_fnt=false;}
+    fs = XCreateFontSet(fl_display, fnt, &missing_list,
+                        &missing_count, &def_string);
+    if (must_free_fnt) free(fnt);
+  }
+#endif
+  preedit_attr = XVaCreateNestedList(0,
+                                     XNSpotLocation, &spot,
+                                     XNFontSet, fs, NULL);
+  status_attr = XVaCreateNestedList(0,
+                                    XNAreaNeeded, &status_area,
+                                    XNFontSet, fs, NULL);
+
+  if (!XGetIMValues(fl_xim_im, XNQueryInputStyle,
+                    &xim_styles, NULL, NULL)) {
+    int i;
+    XIMStyle *style;
+    for (i = 0, style = xim_styles->supported_styles;
+         i < xim_styles->count_styles; i++, style++) {
+      if (*style == (XIMPreeditPosition | XIMStatusArea)) {
+        sarea = 1;
+        predit = 1;
+      } else if (*style == (XIMPreeditPosition | XIMStatusNothing)) {
+        predit = 1;
+      }
+    }
+  }
+  XFree(xim_styles);
+
+  if (sarea) {
+    fl_xim_ic = XCreateIC(fl_xim_im,
+                          XNInputStyle, (XIMPreeditPosition | XIMStatusArea),
+                          XNPreeditAttributes, preedit_attr,
+                          XNStatusAttributes, status_attr,
+                          NULL);
+  }
+
+  if (!fl_xim_ic && predit) {
+    fl_xim_ic = XCreateIC(fl_xim_im,
+                          XNInputStyle, (XIMPreeditPosition | XIMStatusNothing),
+                          XNPreeditAttributes, preedit_attr,
+                          NULL);
+  }
+  XFree(preedit_attr);
+  XFree(status_attr);
+  if (!fl_xim_ic) {
+    fl_is_over_the_spot = 0;
+    fl_xim_ic = XCreateIC(fl_xim_im,
+                          XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
+                          NULL);
+  } else {
+    fl_is_over_the_spot = 1;
+    XVaNestedList status_attr = NULL;
+    status_attr = XVaCreateNestedList(0, XNAreaNeeded, &status_area, NULL);
+
+    XGetICValues(fl_xim_ic, XNStatusAttributes, status_attr, NULL);
+    XFree(status_attr);
+  }
+}
+
+
+static XRectangle    spot;
+static int spotf = -1;
+static int spots = -1;
+
+void fltk3::reset_spot(void)
+{
+  spot.x = -1;
+  spot.y = -1;
+  //if (fl_xim_ic) XUnsetICFocus(fl_xim_ic);
+}
+
+void fltk3::set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
+{
+  int change = 0;
+  XVaNestedList preedit_attr;
+  static XFontSet fs = NULL;
+  char **missing_list;
+  int missing_count;
+  char *def_string;
+  char *fnt = NULL;
+  bool must_free_fnt =true;
+
+  static XIC ic = NULL;
+
+  if (!fl_xim_ic || !fl_is_over_the_spot) return;
+  //XSetICFocus(fl_xim_ic);
+  if (X != spot.x || Y != spot.y) {
+    spot.x = X;
+    spot.y = Y;
+    spot.height = H;
+    spot.width = W;
+    change = 1;
+  }
+  if (font != spotf || size != spots) {
+    spotf = font;
+    spots = size;
+    change = 1;
+    if (fs) {
+      XFreeFontSet(fl_display, fs);
+    }
+#if USE_XFT
+
+#if defined(__GNUC__)
+// FIXME: warning XFT support here
+#endif /*__GNUC__*/
+
+    fnt = NULL; // fl_get_font_xfld(font, size);
+    if (!fnt) {fnt = (char*)"-misc-fixed-*";must_free_fnt=false;}
+    fs = XCreateFontSet(fl_display, fnt, &missing_list,
+                        &missing_count, &def_string);
+#else
+    fnt = fl_get_font_xfld(font, size);
+    if (!fnt) {fnt = (char*)"-misc-fixed-*";must_free_fnt=false;}
+    fs = XCreateFontSet(fl_display, fnt, &missing_list,
+                        &missing_count, &def_string);
+#endif
+  }
+  if (fl_xim_ic != ic) {
+    ic = fl_xim_ic;
+    change = 1;
+  }
+
+  if (fnt && must_free_fnt) free(fnt);
+  if (!change) return;
+
+
+  preedit_attr = XVaCreateNestedList(0,
+                                     XNSpotLocation, &spot,
+                                     XNFontSet, fs, NULL);
+  XSetICValues(fl_xim_ic, XNPreeditAttributes, preedit_attr, NULL);
+  XFree(preedit_attr);
+}
+
+void fltk3::set_status(int x, int y, int w, int h)
+{
+  XVaNestedList status_attr;
+  status_area.x = x;
+  status_area.y = y;
+  status_area.width = w;
+  status_area.height = h;
+  if (!fl_xim_ic) return;
+  status_attr = XVaCreateNestedList(0, XNArea, &status_area, NULL);
+
+  XSetICValues(fl_xim_ic, XNStatusAttributes, status_attr, NULL);
+  XFree(status_attr);
+}
+
+void fl_init_xim() {
+  static int xim_warning = 2;
+  if (xim_warning > 0) xim_warning--;
+
+  //XIMStyle *style;
+  XIMStyles *xim_styles;
+  if (!fl_display) return;
+  if (fl_xim_im) return;
+
+  fl_xim_im = XOpenIM(fl_display, NULL, NULL, NULL);
+  xim_styles = NULL;
+  fl_xim_ic = NULL;
+
+  if (fl_xim_im) {
+    XGetIMValues (fl_xim_im, XNQueryInputStyle,
+                  &xim_styles, NULL, NULL);
+  } else {
+    if (xim_warning)
+      fltk3::warning("XOpenIM() failed");
+    // if xim_styles is allocated, free it now
+    if (xim_styles) XFree(xim_styles);
+    return;
+  }
+
+  if (xim_styles && xim_styles->count_styles) {
+    fl_new_ic();
+   } else {
+     if (xim_warning)
+       fltk3::warning("No XIM style found");
+     XCloseIM(fl_xim_im);
+     fl_xim_im = NULL;
+     // if xim_styles is allocated, free it now
+     if (xim_styles) XFree(xim_styles);
+     return;
+  }
+  if (!fl_xim_ic) {
+    if (xim_warning)
+      fltk3::warning("XCreateIC() failed");
+    XCloseIM(fl_xim_im);
+    fl_xim_im = NULL;
+  }
+  // if xim_styles is still allocated, free it now
+  if(xim_styles) XFree(xim_styles);
+}
+
+void fl_open_display() {
+  if (fl_display) return;
+
+  setlocale(LC_CTYPE, "");
+  XSetLocaleModifiers("");
+
+  XSetIOErrorHandler(io_error_handler);
+  XSetErrorHandler(xerror_handler);
+
+  Display *d = XOpenDisplay(0);
+  if (!d) fltk3::fatal("Can't open display: %s",XDisplayName(0));
+
+  fl_open_display(d);
+}
+
+void fl_open_display(Display* d) {
+  fl_display = d;
+
+  WM_DELETE_WINDOW      = XInternAtom(d, "WM_DELETE_WINDOW",    0);
+  WM_PROTOCOLS          = XInternAtom(d, "WM_PROTOCOLS",        0);
+  fl_MOTIF_WM_HINTS     = XInternAtom(d, "_MOTIF_WM_HINTS",     0);
+  TARGETS               = XInternAtom(d, "TARGETS",             0);
+  CLIPBOARD             = XInternAtom(d, "CLIPBOARD",           0);
+  fl_XdndAware          = XInternAtom(d, "XdndAware",           0);
+  fl_XdndSelection      = XInternAtom(d, "XdndSelection",       0);
+  fl_XdndEnter          = XInternAtom(d, "XdndEnter",           0);
+  fl_XdndTypeList       = XInternAtom(d, "XdndTypeList",        0);
+  fl_XdndPosition       = XInternAtom(d, "XdndPosition",        0);
+  fl_XdndLeave          = XInternAtom(d, "XdndLeave",           0);
+  fl_XdndDrop           = XInternAtom(d, "XdndDrop",            0);
+  fl_XdndStatus         = XInternAtom(d, "XdndStatus",          0);
+  fl_XdndActionCopy     = XInternAtom(d, "XdndActionCopy",      0);
+  fl_XdndFinished       = XInternAtom(d, "XdndFinished",        0);
+  //fl_XdndProxy        = XInternAtom(d, "XdndProxy",           0);
+  fl_XdndEnter          = XInternAtom(d, "XdndEnter",           0);
+  fl_XdndURIList        = XInternAtom(d, "text/uri-list",       0);
+  fl_Xatextplainutf     = XInternAtom(d, "text/plain;charset=UTF-8",0);
+  fl_Xatextplain        = XInternAtom(d, "text/plain",          0);
+  fl_XaText             = XInternAtom(d, "TEXT",                0);
+  fl_XaCompoundText     = XInternAtom(d, "COMPOUND_TEXT",       0);
+  fl_XaUtf8String       = XInternAtom(d, "UTF8_STRING",         0);
+  fl_XaTextUriList      = XInternAtom(d, "text/uri-list",       0);
+  fl_NET_WM_NAME        = XInternAtom(d, "_NET_WM_NAME",        0);
+  fl_NET_WM_ICON_NAME   = XInternAtom(d, "_NET_WM_ICON_NAME",   0);
+
+  if (sizeof(Atom) < 4)
+    atom_bits = sizeof(Atom) * 8;
+
+  fltk3::add_fd(ConnectionNumber(d), POLLIN, fd_callback);
+
+  fl_screen = DefaultScreen(d);
+
+  fltk3::message_window =
+    XCreateSimpleWindow(d, RootWindow(d,fl_screen), 0,0,1,1,0, 0, 0);
+
+// construct an XVisualInfo that matches the default Visual:
+  XVisualInfo templt; int num;
+  templt.visualid = XVisualIDFromVisual(DefaultVisual(d, fl_screen));
+  fl_visual = XGetVisualInfo(d, VisualIDMask, &templt, &num);
+  fl_colormap = DefaultColormap(d, fl_screen);
+  fl_init_xim();
+
+#if !USE_COLORMAP
+  fltk3::visual(fltk3::RGB);
+#endif
+}
+
+void fl_close_display() {
+  fltk3::remove_fd(ConnectionNumber(fl_display));
+  XCloseDisplay(fl_display);
+}
+
+static int fl_workarea_xywh[4] = { -1, -1, -1, -1 };
+
+static void fl_init_workarea() {
+  fl_open_display();
+
+  Atom _NET_WORKAREA = XInternAtom(fl_display, "_NET_WORKAREA", 0);
+  Atom actual;
+  unsigned long count, remaining;
+  int format;
+  unsigned *xywh;
+
+  if (XGetWindowProperty(fl_display, RootWindow(fl_display, fl_screen),
+                         _NET_WORKAREA, 0, 4 * sizeof(unsigned), False,
+                         XA_CARDINAL, &actual, &format, &count, &remaining,
+                         (unsigned char **)&xywh) || !xywh || !xywh[2] ||
+                         !xywh[3])
+  {
+    fl_workarea_xywh[0] = 0;
+    fl_workarea_xywh[1] = 0;
+    fl_workarea_xywh[2] = DisplayWidth(fl_display, fl_screen);
+    fl_workarea_xywh[3] = DisplayHeight(fl_display, fl_screen);
+  }
+  else
+  {
+    fl_workarea_xywh[0] = (int)xywh[0];
+    fl_workarea_xywh[1] = (int)xywh[1];
+    fl_workarea_xywh[2] = (int)xywh[2];
+    fl_workarea_xywh[3] = (int)xywh[3];
+    XFree(xywh);
+  }
+}
+
+int fltk3::x() {
+  if (fl_workarea_xywh[0] < 0) fl_init_workarea();
+  return fl_workarea_xywh[0];
+}
+
+int fltk3::y() {
+  if (fl_workarea_xywh[0] < 0) fl_init_workarea();
+  return fl_workarea_xywh[1];
+}
+
+int fltk3::w() {
+  if (fl_workarea_xywh[0] < 0) fl_init_workarea();
+  return fl_workarea_xywh[2];
+}
+
+int fltk3::h() {
+  if (fl_workarea_xywh[0] < 0) fl_init_workarea();
+  return fl_workarea_xywh[3];
+}
+
+void fltk3::get_mouse(int &xx, int &yy) {
+  fl_open_display();
+  ::Window root = RootWindow(fl_display, fl_screen);
+  ::Window c; int mx,my,cx,cy; unsigned int mask;
+  XQueryPointer(fl_display,root,&root,&c,&mx,&my,&cx,&cy,&mask);
+  xx = mx;
+  yy = my;
+}
+
+////////////////////////////////////////////////////////////////
+// Code used for paste and DnD into the program:
+
+fltk3::Widget *fl_selection_requestor;
+char *fl_selection_buffer[2];
+int fl_selection_length[2];
+int fl_selection_buffer_length[2];
+char fl_i_own_selection[2] = {0,0};
+
+// Call this when a "paste" operation happens:
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
+  if (fl_i_own_selection[clipboard]) {
+    // We already have it, do it quickly without window server.
+    // Notice that the text is clobbered if set_selection is
+    // called in response to fltk3::PASTE!
+    fltk3::e_text = fl_selection_buffer[clipboard];
+    fltk3::e_length = fl_selection_length[clipboard];
+    if (!fltk3::e_text) fltk3::e_text = (char *)"";
+    receiver.handle(fltk3::PASTE);
+    return;
+  }
+  // otherwise get the window server to return it:
+  fl_selection_requestor = &receiver;
+  Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
+  XConvertSelection(fl_display, property, TARGETS, property,
+                    fl_xid(fltk3::first_window()), fl_event_time);
+}
+
+::Window fl_dnd_source_window;
+Atom *fl_dnd_source_types; // null-terminated list of data types being supplied
+Atom fl_dnd_type;
+Atom fl_dnd_source_action;
+Atom fl_dnd_action;
+
+void fl_sendClientMessage(::Window window, Atom message,
+                                 unsigned long d0,
+                                 unsigned long d1=0,
+                                 unsigned long d2=0,
+                                 unsigned long d3=0,
+                                 unsigned long d4=0)
+{
+  XEvent e;
+  e.xany.type = ClientMessage;
+  e.xany.window = window;
+  e.xclient.message_type = message;
+  e.xclient.format = 32;
+  e.xclient.data.l[0] = (long)d0;
+  e.xclient.data.l[1] = (long)d1;
+  e.xclient.data.l[2] = (long)d2;
+  e.xclient.data.l[3] = (long)d3;
+  e.xclient.data.l[4] = (long)d4;
+  XSendEvent(fl_display, window, 0, 0, &e);
+}
+
+////////////////////////////////////////////////////////////////
+// Code for copying to clipboard and DnD out of the program:
+
+void fltk3::copy(const char *stuff, int len, int clipboard) {
+  if (!stuff || len<0) return;
+  if (len+1 > fl_selection_buffer_length[clipboard]) {
+    delete[] fl_selection_buffer[clipboard];
+    fl_selection_buffer[clipboard] = new char[len+100];
+    fl_selection_buffer_length[clipboard] = len+100;
+  }
+  memcpy(fl_selection_buffer[clipboard], stuff, len);
+  fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
+  fl_selection_length[clipboard] = len;
+  fl_i_own_selection[clipboard] = 1;
+  Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
+  XSetSelectionOwner(fl_display, property, fltk3::message_window, fl_event_time);
+}
+
+////////////////////////////////////////////////////////////////
+
+const XEvent* fl_xevent; // the current x event
+ulong fl_event_time; // the last timestamp from an x event
+
+char fl_key_vector[32]; // used by fltk3::get_key()
+
+// Record event mouse position and state from an XEvent:
+
+static int px, py;
+static ulong ptime;
+
+static void set_event_xy() {
+#  if CONSOLIDATE_MOTION
+  send_motion = 0;
+#  endif
+  fltk3::e_x_root  = fl_xevent->xbutton.x_root;
+  fltk3::e_x       = fl_xevent->xbutton.x;
+  fltk3::e_y_root  = fl_xevent->xbutton.y_root;
+  fltk3::e_y       = fl_xevent->xbutton.y;
+  fltk3::e_state   = fl_xevent->xbutton.state << 16;
+  fl_event_time = fl_xevent->xbutton.time;
+#  ifdef __sgi
+  // get the meta key off PC keyboards:
+  if (fl_key_vector[18]&0x18) fltk3::e_state |= fltk3::META;
+#  endif
+  // turn off is_click if enough time or mouse movement has passed:
+  if (abs(fltk3::e_x_root-px)+abs(fltk3::e_y_root-py) > 3 ||
+      fl_event_time >= ptime+1000)
+    fltk3::e_is_click = 0;
+}
+
+// if this is same event as last && is_click, increment click count:
+static inline void checkdouble() {
+  if (fltk3::e_is_click == fltk3::e_keysym)
+    fltk3::e_clicks++;
+  else {
+    fltk3::e_clicks = 0;
+    fltk3::e_is_click = fltk3::e_keysym;
+  }
+  px = fltk3::e_x_root;
+  py = fltk3::e_y_root;
+  ptime = fl_event_time;
+}
+
+static fltk3::Window* resize_bug_fix;
+
+////////////////////////////////////////////////////////////////
+
+static char unknown[] = "<unknown>";
+const int unknown_len = 10;
+
+extern "C" {
+
+static int xerror = 0;
+
+static int ignoreXEvents(Display *display, XErrorEvent *event) {
+  xerror = 1;
+  return 0;
+}
+
+static XErrorHandler catchXExceptions() {
+  xerror = 0;
+  return ignoreXEvents;
+}
+
+static int wasXExceptionRaised() {
+  return xerror;
+}
+
+}
+
+
+int fl_handle(const XEvent& thisevent)
+{
+  XEvent xevent = thisevent;
+  fl_xevent = &thisevent;
+  ::Window xid = xevent.xany.window;
+  static ::Window xim_win = 0;
+
+  if (fl_xim_ic && xevent.type == DestroyNotify &&
+        xid != xim_win && !fl_find(xid))
+  {
+    XIM xim_im;
+    xim_im = XOpenIM(fl_display, NULL, NULL, NULL);
+    if (!xim_im) {
+      /*  XIM server has crashed */
+      XSetLocaleModifiers("@im=");
+      fl_xim_im = NULL;
+      fl_init_xim();
+    } else {
+      XCloseIM(xim_im);	// see STR 2185 for comment
+    }
+    return 0;
+  }
+
+  if (fl_xim_ic && (xevent.type == FocusIn))
+  {
+#define POOR_XIM
+#ifdef POOR_XIM
+        if (xim_win != xid)
+        {
+                xim_win  = xid;
+                XDestroyIC(fl_xim_ic);
+                fl_xim_ic = NULL;
+                fl_new_ic();
+                XSetICValues(fl_xim_ic,
+                                XNFocusWindow, xevent.xclient.window,
+                                XNClientWindow, xid,
+                                NULL);
+        }
+        fltk3::set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
+#else
+    if (fltk3::first_window() && fltk3::first_window()->modal()) {
+      ::Window x  = fl_xid(fltk3::first_window());
+      if (x != xim_win) {
+        xim_win  = x;
+        XSetICValues(fl_xim_ic,
+                        XNFocusWindow, xim_win,
+                        XNClientWindow, xim_win,
+                        NULL);
+        fltk3::set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
+      }
+    } else if (xim_win != xid && xid) {
+      xim_win = xid;
+      XSetICValues(fl_xim_ic,
+                        XNFocusWindow, xevent.xclient.window,
+                        XNClientWindow, xid,
+                        //XNFocusWindow, xim_win,
+                        //XNClientWindow, xim_win,
+                        NULL);
+      fltk3::set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
+    }
+#endif
+  }
+
+  if ( XFilterEvent((XEvent *)&xevent, 0) )
+      return(1);
+
+  switch (xevent.type) {
+
+  case KeymapNotify:
+    memcpy(fl_key_vector, xevent.xkeymap.key_vector, 32);
+    return 0;
+
+  case MappingNotify:
+    XRefreshKeyboardMapping((XMappingEvent*)&xevent.xmapping);
+    return 0;
+
+  case SelectionNotify: {
+    if (!fl_selection_requestor) return 0;
+    static unsigned char* buffer = 0;
+    if (buffer) {XFree(buffer); buffer = 0;}
+    long bytesread = 0;
+    if (fl_xevent->xselection.property) for (;;) {
+      // The Xdnd code pastes 64K chunks together, possibly to avoid
+      // bugs in X servers, or maybe to avoid an extra round-trip to
+      // get the property length.  I copy this here:
+      Atom actual; int format; unsigned long count, remaining;
+      unsigned char* portion = NULL;
+      if (XGetWindowProperty(fl_display,
+                             fl_xevent->xselection.requestor,
+                             fl_xevent->xselection.property,
+                             bytesread/4, 65536, 1, 0,
+                             &actual, &format, &count, &remaining,
+                             &portion)) break; // quit on error
+      if (actual == TARGETS || actual == XA_ATOM) {
+	Atom type = XA_STRING;
+	for (unsigned i = 0; i<count; i++) {
+	  Atom t = ((Atom*)portion)[i];
+	    if (t == fl_Xatextplainutf ||
+		  t == fl_Xatextplain ||
+		  t == fl_XaUtf8String) {type = t; break;}
+	    // rest are only used if no utf-8 available:
+	    if (t == fl_XaText ||
+		  t == fl_XaTextUriList ||
+		  t == fl_XaCompoundText) type = t;
+	}
+	XFree(portion);
+	Atom property = xevent.xselection.property;
+	XConvertSelection(fl_display, property, type, property,
+	      fl_xid(fltk3::first_window()),
+	      fl_event_time);
+	return true;
+      }
+      // Make sure we got something sane...
+      if ((portion == NULL) || (format != 8) || (count == 0)) {
+        if (portion) XFree(portion);
+        return true;
+      }
+      buffer = (unsigned char*)realloc(buffer, bytesread+count+remaining+1);
+      memcpy(buffer+bytesread, portion, count);
+      XFree(portion);
+      bytesread += count;
+      // Cannot trust data to be null terminated
+      buffer[bytesread] = '\0';
+      if (!remaining) break;
+    }
+    if (buffer) {
+      buffer[bytesread] = 0;
+      convert_crlf(buffer, bytesread);
+    }
+    fltk3::e_text = buffer ? (char*)buffer : (char *)"";
+    fltk3::e_length = bytesread;
+    int old_event = fltk3::e_number;
+    fl_selection_requestor->handle(fltk3::e_number = fltk3::PASTE);
+    fltk3::e_number = old_event;
+    // Detect if this paste is due to Xdnd by the property name (I use
+    // XA_SECONDARY for that) and send an XdndFinished message. It is not
+    // clear if this has to be delayed until now or if it can be done
+    // immediatly after calling XConvertSelection.
+    if (fl_xevent->xselection.property == XA_SECONDARY &&
+        fl_dnd_source_window) {
+      fl_sendClientMessage(fl_dnd_source_window, fl_XdndFinished,
+                           fl_xevent->xselection.requestor);
+      fl_dnd_source_window = 0; // don't send a second time
+    }
+    return 1;}
+
+  case SelectionClear: {
+    int clipboard = fl_xevent->xselectionclear.selection == CLIPBOARD;
+    fl_i_own_selection[clipboard] = 0;
+    return 1;}
+
+  case SelectionRequest: {
+    XSelectionEvent e;
+    e.type = SelectionNotify;
+    e.requestor = fl_xevent->xselectionrequest.requestor;
+    e.selection = fl_xevent->xselectionrequest.selection;
+    int clipboard = e.selection == CLIPBOARD;
+    e.target = fl_xevent->xselectionrequest.target;
+    e.time = fl_xevent->xselectionrequest.time;
+    e.property = fl_xevent->xselectionrequest.property;
+    if (e.target == TARGETS) {
+      Atom a[3] = {fl_XaUtf8String, XA_STRING, fl_XaText};
+      XChangeProperty(fl_display, e.requestor, e.property,
+                      XA_ATOM, atom_bits, 0, (unsigned char*)a, 3);
+    } else if (/*e.target == XA_STRING &&*/ fl_selection_length[clipboard]) {
+    if (e.target == fl_XaUtf8String ||
+	     e.target == XA_STRING ||
+	     e.target == fl_XaCompoundText ||
+	     e.target == fl_XaText ||
+	     e.target == fl_Xatextplain ||
+	     e.target == fl_Xatextplainutf) {
+	// clobber the target type, this seems to make some applications
+	// behave that insist on asking for XA_TEXT instead of UTF8_STRING
+	// Does not change XA_STRING as that breaks xclipboard.
+	if (e.target != XA_STRING) e.target = fl_XaUtf8String;
+	XChangeProperty(fl_display, e.requestor, e.property,
+			 e.target, 8, 0,
+			 (unsigned char *)fl_selection_buffer[clipboard],
+			 fl_selection_length[clipboard]);
+      }
+    } else {
+//    char* x = XGetAtomName(fl_display,e.target);
+//    fprintf(stderr,"selection request of %s\n",x);
+//    XFree(x);
+      e.property = 0;
+    }
+    XSendEvent(fl_display, e.requestor, 0, 0, (XEvent *)&e);}
+    return 1;
+
+  // events where interesting window id is in a different place:
+  case CirculateNotify:
+  case CirculateRequest:
+  case ConfigureNotify:
+  case ConfigureRequest:
+  case CreateNotify:
+  case DestroyNotify:
+  case GravityNotify:
+  case MapNotify:
+  case MapRequest:
+  case ReparentNotify:
+  case UnmapNotify:
+    xid = xevent.xmaprequest.window;
+    break;
+  }
+
+  int event = 0;
+  fltk3::Window* window = fl_find(xid);
+
+  if (window) switch (xevent.type) {
+
+    case DestroyNotify: { // an X11 window was closed externally from the program
+      fltk3::handle(fltk3::CLOSE, window);
+      Fl_X* X = Fl_X::i(window);
+      if (X) { // indicates the FLTK window was not closed
+        X->xid = (::Window)0; // indicates the X11 window was already destroyed
+        window->hide();
+        int oldx = window->x(), oldy = window->y();
+        window->position(0, 0);
+        window->position(oldx, oldy);
+        window->show(); // recreate the X11 window in support of the FLTK window
+      }
+      return 1;
+    }
+    case ClientMessage: {
+    Atom message = fl_xevent->xclient.message_type;
+    const long* data = fl_xevent->xclient.data.l;
+    if ((Atom)(data[0]) == WM_DELETE_WINDOW) {
+      event = fltk3::CLOSE;
+    } else if (message == fl_XdndEnter) {
+      fl_xmousewin = window;
+      in_a_window = true;
+      fl_dnd_source_window = data[0];
+      // version number is data[1]>>24
+//      printf("XdndEnter, version %ld\n", data[1] >> 24);
+      if (data[1]&1) {
+        // get list of data types:
+        Atom actual; int format; unsigned long count, remaining;
+        unsigned char *buffer = 0;
+        XGetWindowProperty(fl_display, fl_dnd_source_window, fl_XdndTypeList,
+                           0, 0x8000000L, False, XA_ATOM, &actual, &format,
+                           &count, &remaining, &buffer);
+        if (actual != XA_ATOM || format != 32 || count<4 || !buffer)
+          goto FAILED;
+        delete [] fl_dnd_source_types;
+        fl_dnd_source_types = new Atom[count+1];
+        for (unsigned i = 0; i < count; i++) {
+          fl_dnd_source_types[i] = ((Atom*)buffer)[i];
+        }
+        fl_dnd_source_types[count] = 0;
+      } else {
+      FAILED:
+        // less than four data types, or if the above messes up:
+        if (!fl_dnd_source_types) fl_dnd_source_types = new Atom[4];
+        fl_dnd_source_types[0] = data[2];
+        fl_dnd_source_types[1] = data[3];
+        fl_dnd_source_types[2] = data[4];
+        fl_dnd_source_types[3] = 0;
+      }
+
+      // Loop through the source types and pick the first text type...
+      int i;
+
+      for (i = 0; fl_dnd_source_types[i]; i ++)
+      {
+//        printf("fl_dnd_source_types[%d] = %ld (%s)\n", i,
+//             fl_dnd_source_types[i],
+//             XGetAtomName(fl_display, fl_dnd_source_types[i]));
+
+        if (!strncmp(XGetAtomName(fl_display, fl_dnd_source_types[i]),
+                     "text/", 5))
+          break;
+      }
+
+      if (fl_dnd_source_types[i])
+        fl_dnd_type = fl_dnd_source_types[i];
+      else
+        fl_dnd_type = fl_dnd_source_types[0];
+
+      event = fltk3::DND_ENTER;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      break;
+
+    } else if (message == fl_XdndPosition) {
+      fl_xmousewin = window;
+      in_a_window = true;
+      fl_dnd_source_window = data[0];
+      fltk3::e_x_root = data[2]>>16;
+      fltk3::e_y_root = data[2]&0xFFFF;
+      if (window) {
+        fltk3::e_x = fltk3::e_x_root-window->x();
+        fltk3::e_y = fltk3::e_y_root-window->y();
+      }
+      fl_event_time = data[3];
+      fl_dnd_source_action = data[4];
+      fl_dnd_action = fl_XdndActionCopy;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      int accept = fltk3::handle(fltk3::DND_DRAG, window);
+      fl_sendClientMessage(data[0], fl_XdndStatus,
+                           fl_xevent->xclient.window,
+                           accept ? 1 : 0,
+                           0, // used for xy rectangle to not send position inside
+                           0, // used for width+height of rectangle
+                           accept ? fl_dnd_action : None);
+      return 1;
+
+    } else if (message == fl_XdndLeave) {
+      fl_dnd_source_window = 0; // don't send a finished message to it
+      event = fltk3::DND_LEAVE;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      break;
+
+    } else if (message == fl_XdndDrop) {
+      fl_xmousewin = window;
+      in_a_window = true;
+      fl_dnd_source_window = data[0];
+      fl_event_time = data[2];
+      ::Window to_window = fl_xevent->xclient.window;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      if (fltk3::handle(fltk3::DND_RELEASE, window)) {
+        fl_selection_requestor = fltk3::belowmouse();
+        XConvertSelection(fl_display, fl_XdndSelection,
+                          fl_dnd_type, XA_SECONDARY,
+                          to_window, fl_event_time);
+      } else {
+        // Send the finished message if I refuse the drop.
+        // It is not clear whether I can just send finished always,
+        // or if I have to wait for the SelectionNotify event as the
+        // code is currently doing.
+        fl_sendClientMessage(fl_dnd_source_window, fl_XdndFinished, to_window);
+        fl_dnd_source_window = 0;
+      }
+      return 1;
+
+    }
+    break;}
+
+  case UnmapNotify:
+    event = fltk3::HIDE;
+    break;
+
+  case Expose:
+    Fl_X::i(window)->wait_for_expose = 0;
+#  if 0
+    // try to keep windows on top even if WM_TRANSIENT_FOR does not work:
+    // opaque move/resize window managers do not like this, so I disabled it.
+    if (fltk3::first_window()->non_modal() && window != fltk3::first_window())
+      fltk3::first_window()->show();
+#  endif
+
+  case GraphicsExpose:
+    window->damage(fltk3::DAMAGE_EXPOSE, xevent.xexpose.x, xevent.xexpose.y,
+                   xevent.xexpose.width, xevent.xexpose.height);
+    return 1;
+
+  case FocusIn:
+    if (fl_xim_ic) XSetICFocus(fl_xim_ic);
+    event = fltk3::FOCUS;
+    break;
+
+  case FocusOut:
+    if (fl_xim_ic) XUnsetICFocus(fl_xim_ic);
+    event = fltk3::UNFOCUS;
+    break;
+
+  case KeyPress:
+  case KeyRelease: {
+  KEYPRESS:
+    int keycode = xevent.xkey.keycode;
+    fl_key_vector[keycode/8] |= (1 << (keycode%8));
+    static char *buffer = NULL;
+    static int buffer_len = 0;
+    int len;
+    KeySym keysym;
+    if (buffer_len == 0) {
+      buffer_len = 4096;
+      buffer = (char*) malloc(buffer_len);
+    }
+    if (xevent.type == KeyPress) {
+      event = fltk3::KEYDOWN;
+      int len = 0;
+
+      if (fl_xim_ic) {
+	Status status;
+	len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey,
+			     buffer, buffer_len, &keysym, &status);
+
+	while (status == XBufferOverflow && buffer_len < 50000) {
+	  buffer_len = buffer_len * 5 + 1;
+	  buffer = (char*)realloc(buffer, buffer_len);
+	  len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey,
+			     buffer, buffer_len, &keysym, &status);
+	}
+	keysym = XKeycodeToKeysym(fl_display, keycode, 0);
+      } else {
+        //static XComposeStatus compose;
+        len = XLookupString((XKeyEvent*)&(xevent.xkey),
+                             buffer, buffer_len, &keysym, 0/*&compose*/);
+        if (keysym && keysym < 0x400) { // a character in latin-1,2,3,4 sets
+          // force it to type a character (not sure if this ever is needed):
+          // if (!len) {buffer[0] = char(keysym); len = 1;}
+          len = fltk3::utf8encode(XKeysymToUcs(keysym), buffer);
+          if (len < 1) len = 1;
+          // ignore all effects of shift on the keysyms, which makes it a lot
+          // easier to program shortcuts and is Windoze-compatible:
+          keysym = XKeycodeToKeysym(fl_display, keycode, 0);
+        }
+      }
+      // MRS: Can't use fltk3::event_state(fltk3::CTRL) since the state is not
+      //      set until set_event_xy() is called later...
+      if ((xevent.xkey.state & ControlMask) && keysym == '-') buffer[0] = 0x1f; // ^_
+      buffer[len] = 0;
+      fltk3::e_text = buffer;
+      fltk3::e_length = len;
+    } else {
+      // Stupid X sends fake key-up events when a repeating key is held
+      // down, probably due to some back compatibility problem. Fortunately
+      // we can detect this because the repeating KeyPress event is in
+      // the queue, get it and execute it instead:
+
+      // Bool XkbSetDetectableAutorepeat ( display, detectable, supported_rtrn )
+      // Display * display ;
+      // Bool detectable ;
+      // Bool * supported_rtrn ;
+      // ...would be the easy way to corrct this isuue. Unfortunatly, this call is also
+      // broken on many Unix distros including Ubuntu and Solaris (as of Dec 2009)
+
+      // Bogus KeyUp events are generated by repeated KeyDown events. One
+      // neccessary condition is an identical key event pending right after
+      // the bogus KeyUp.
+      // The new code introduced Dec 2009 differs in that it only check the very
+      // next event in the queue, not the entire queue of events.
+      // This function wrongly detects a repeat key if a software keyboard
+      // sends a burst of events containing two consecutive equal keys. However,
+      // in every non-gaming situation, this is no problem because both KeyPress
+      // events will cause the expected behavior.
+      XEvent peekevent;
+      if (XPending(fl_display)) {
+        XPeekEvent(fl_display, &peekevent);
+        if (   (peekevent.type == KeyPress) // must be a KeyPress event
+            && (peekevent.xkey.keycode == xevent.xkey.keycode) // must be the same key
+            && (peekevent.xkey.time == xevent.xkey.time) // must be sent at the exact same time
+            ) {
+          XNextEvent(fl_display, &xevent);
+          goto KEYPRESS;
+        }
+      }
+
+      event = fltk3::KEYUP;
+      fl_key_vector[keycode/8] &= ~(1 << (keycode%8));
+      // keyup events just get the unshifted keysym:
+      keysym = XKeycodeToKeysym(fl_display, keycode, 0);
+    }
+#  ifdef __sgi
+    // You can plug a microsoft keyboard into an sgi but the extra shift
+    // keys are not translated.  Make them translate like XFree86 does:
+    if (!keysym) switch(keycode) {
+    case 147: keysym = fltk3::MetaLKey; break;
+    case 148: keysym = fltk3::MetaRKey; break;
+    case 149: keysym = fltk3::MenuKey; break;
+    }
+#  endif
+#  if BACKSPACE_HACK
+    // Attempt to fix keyboards that send "delete" for the key in the
+    // upper-right corner of the main keyboard.  But it appears that
+    // very few of these remain?
+    static int got_backspace = 0;
+    if (!got_backspace) {
+      if (keysym == fltk3::DeleteKey) keysym = fltk3::BackSpaceKey;
+      else if (keysym == fltk3::BackSpaceKey) got_backspace = 1;
+    }
+#  endif
+    // For the first few years, there wasn't a good consensus on what the
+    // Windows keys should be mapped to for X11. So we need to help out a
+    // bit and map all variants to the same FLTK key...
+    switch (keysym) {
+	case XK_Meta_L:
+	case XK_Hyper_L:
+	case XK_Super_L:
+	  keysym = fltk3::MetaLKey;
+	  break;
+	case XK_Meta_R:
+	case XK_Hyper_R:
+	case XK_Super_R:
+	  keysym = fltk3::MetaRKey;
+	  break;
+    }
+    // Convert the multimedia keys to safer, portable values
+    switch (keysym) { // XF names come from X11/XF86keysym.h
+      case 0x1008FF11: // XF86XK_AudioLowerVolume:
+        keysym = fltk3::VolumeDownKey;
+        break;
+      case 0x1008FF12: // XF86XK_AudioMute:
+        keysym = fltk3::VolumeMuteKey;
+        break;
+      case 0x1008FF13: // XF86XK_AudioRaiseVolume:
+        keysym = fltk3::VolumeUpKey;
+        break;
+      case 0x1008FF14: // XF86XK_AudioPlay:
+        keysym = fltk3::MediaPlayKey;
+        break;
+      case 0x1008FF15: // XF86XK_AudioStop:
+        keysym = fltk3::MediaStopKey;
+        break;
+      case 0x1008FF16: // XF86XK_AudioPrev:
+        keysym = fltk3::MediaPrevKey;
+        break;
+      case 0x1008FF17: // XF86XK_AudioNext:
+        keysym = fltk3::MediaNextKey;
+        break;
+      case 0x1008FF18: // XF86XK_HomePage:
+        keysym = fltk3::HomePageKey;
+        break;
+      case 0x1008FF19: // XF86XK_Mail:
+        keysym = fltk3::MailKey;
+        break;
+      case 0x1008FF1B: // XF86XK_Search:
+        keysym = fltk3::SearchKey;
+        break;
+      case 0x1008FF26: // XF86XK_Back:
+        keysym = fltk3::BackKey;
+        break;
+      case 0x1008FF27: // XF86XK_Forward:
+      	keysym = fltk3::ForwardKey;
+        break;
+      case 0x1008FF28: // XF86XK_Stop:
+        keysym = fltk3::StopKey;
+        break;
+      case 0x1008FF29: // XF86XK_Refresh:
+        keysym = fltk3::RefreshKey;
+        break;
+      case 0x1008FF2F: // XF86XK_Sleep:
+        keysym = fltk3::SleepKey;
+        break;
+      case 0x1008FF30: // XF86XK_Favorites:
+        keysym = fltk3::FavoritesKey;
+        break;
+    }
+    // We have to get rid of the XK_KP_function keys, because they are
+    // not produced on Windoze and thus case statements tend not to check
+    // for them.  There are 15 of these in the range 0xff91 ... 0xff9f
+    if (keysym >= 0xff91 && keysym <= 0xff9f) {
+      // Map keypad keysym to character or keysym depending on
+      // numlock state...
+      unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1);
+      if (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= fltk3::KPLastKey))
+        fltk3::e_original_keysym = (int)(keysym1 | fltk3::KPKey);
+      if ((xevent.xkey.state & Mod2Mask) &&
+          (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= fltk3::KPLastKey))) {
+        // Store ASCII numeric keypad value...
+        keysym = keysym1 | fltk3::KPKey;
+        buffer[0] = char(keysym1) & 0x7F;
+        len = 1;
+      } else {
+        // Map keypad to special key...
+        static const unsigned short table[15] = {
+          fltk3::FKey+1, fltk3::FKey+2, fltk3::FKey+3, fltk3::FKey+4,
+          fltk3::HomeKey, fltk3::LeftKey, fltk3::UpKey, fltk3::RightKey,
+          fltk3::DownKey, fltk3::PageUpKey, fltk3::PageDownKey, fltk3::EndKey,
+          0xff0b/*XK_Clear*/, fltk3::InsertKey, fltk3::DeleteKey};
+        keysym = table[keysym-0xff91];
+      }
+    } else {
+      // Store this so we can later know if the KP was used
+      fltk3::e_original_keysym = (int)keysym;
+    }
+    fltk3::e_keysym = int(keysym);
+
+    // replace XK_ISO_Left_Tab (Shift-TAB) with fltk3::TabKey (modifier flags are set correctly by X11)
+    if (fltk3::e_keysym == 0xfe20) fltk3::e_keysym = fltk3::TabKey;
+
+    set_event_xy();
+    fltk3::e_is_click = 0;
+    break;}
+
+  case ButtonPress:
+    fltk3::e_keysym = fltk3::MouseButton + xevent.xbutton.button;
+    set_event_xy();
+    if (xevent.xbutton.button == Button4) {
+      fltk3::e_dy = -1; // Up
+      event = fltk3::MOUSEWHEEL;
+    } else if (xevent.xbutton.button == Button5) {
+      fltk3::e_dy = +1; // Down
+      event = fltk3::MOUSEWHEEL;
+    } else {
+      fltk3::e_state |= (fltk3::BUTTON1 << (xevent.xbutton.button-1));
+      event = fltk3::PUSH;
+      checkdouble();
+    }
+
+    fl_xmousewin = window;
+    in_a_window = true;
+    break;
+
+  case MotionNotify:
+    set_event_xy();
+#  if CONSOLIDATE_MOTION
+    send_motion = fl_xmousewin = window;
+    in_a_window = true;
+    return 0;
+#  else
+    event = fltk3::MOVE;
+    fl_xmousewin = window;
+    in_a_window = true;
+    break;
+#  endif
+
+  case ButtonRelease:
+    fltk3::e_keysym = fltk3::MouseButton + xevent.xbutton.button;
+    set_event_xy();
+    fltk3::e_state &= ~(fltk3::BUTTON1 << (xevent.xbutton.button-1));
+    if (xevent.xbutton.button == Button4 ||
+        xevent.xbutton.button == Button5) return 0;
+    event = fltk3::RELEASE;
+
+    fl_xmousewin = window;
+    in_a_window = true;
+    break;
+
+  case EnterNotify:
+    if (xevent.xcrossing.detail == NotifyInferior) break;
+    // XInstallColormap(fl_display, Fl_X::i(window)->colormap);
+    set_event_xy();
+    fltk3::e_state = xevent.xcrossing.state << 16;
+    event = fltk3::ENTER;
+
+    fl_xmousewin = window;
+    in_a_window = true;
+    { XIMStyles *xim_styles = NULL;
+      if(!fl_xim_im || XGetIMValues(fl_xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL)) {
+	fl_init_xim();
+      }
+      if (xim_styles) XFree(xim_styles);
+    }
+    break;
+
+  case LeaveNotify:
+    if (xevent.xcrossing.detail == NotifyInferior) break;
+    set_event_xy();
+    fltk3::e_state = xevent.xcrossing.state << 16;
+    fl_xmousewin = 0;
+    in_a_window = false; // make do_queued_events produce fltk3::LEAVE event
+    return 0;
+
+  // We cannot rely on the x,y position in the configure notify event.
+  // I now think this is an unavoidable problem with X: it is impossible
+  // for a window manager to prevent the "real" notify event from being
+  // sent when it resizes the contents, even though it can send an
+  // artificial event with the correct position afterwards (and some
+  // window managers do not send this fake event anyway)
+  // So anyway, do a round trip to find the correct x,y:
+  case MapNotify:
+    event = fltk3::SHOW;
+
+  case ConfigureNotify: {
+    if (window->parent()) break; // ignore child windows
+
+    // figure out where OS really put window
+    XWindowAttributes actual;
+    XGetWindowAttributes(fl_display, fl_xid(window), &actual);
+    ::Window cr; int X, Y, W = actual.width, H = actual.height;
+    XTranslateCoordinates(fl_display, fl_xid(window), actual.root,
+                          0, 0, &X, &Y, &cr);
+
+    // tell fltk3::Window about it and set flag to prevent echoing:
+    resize_bug_fix = window;
+    window->resize(X, Y, W, H);
+    break; // allow add_handler to do something too
+    }
+
+  case ReparentNotify: {
+    int xpos, ypos;
+    ::Window junk;
+
+    // on some systems, the ReparentNotify event is not handled as we would expect.
+    XErrorHandler oldHandler = XSetErrorHandler(catchXExceptions());
+
+    //ReparentNotify gives the new position of the window relative to
+    //the new parent. FLTK cares about the position on the root window.
+    XTranslateCoordinates(fl_display, xevent.xreparent.parent,
+                          XRootWindow(fl_display, fl_screen),
+                          xevent.xreparent.x, xevent.xreparent.y,
+                          &xpos, &ypos, &junk);
+    XSetErrorHandler(oldHandler);
+
+    // tell fltk3::Window about it and set flag to prevent echoing:
+    if ( !wasXExceptionRaised() ) {
+      resize_bug_fix = window;
+      window->position(xpos, ypos);
+    }
+    break;
+    }
+  }
+
+  return fltk3::handle(event, window);
+}
+
+////////////////////////////////////////////////////////////////
+
+void fltk3::Window::resize(int X,int Y,int W,int H) {
+  int is_a_move = (X != x() || Y != y());
+  int is_a_resize = (W != w() || H != h());
+  int is_a_enlarge = (W > w() || H > h());
+  int resize_from_program = (this != resize_bug_fix);
+  if (!resize_from_program) resize_bug_fix = 0;
+  if (is_a_move && resize_from_program) set_flag(FORCE_POSITION);
+  else if (!is_a_resize && !is_a_move) return;
+  if (is_a_resize) {
+    fltk3::Group::resize(X,Y,W,H);
+    if (shown()) {redraw(); if(is_a_enlarge) i->wait_for_expose = 1;}
+  } else {
+    x(X); y(Y);
+  }
+
+  if (resize_from_program && is_a_resize && !resizable()) {
+    size_range(w(), h(), w(), h());
+  }
+
+  if (resize_from_program && shown()) {
+    if (is_a_resize) {
+      if (!resizable()) size_range(w(),h(),w(),h());
+      if (is_a_move) {
+        XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1);
+      } else {
+        XResizeWindow(fl_display, i->xid, W>0 ? W : 1, H>0 ? H : 1);
+      }
+    } else
+      XMoveWindow(fl_display, i->xid, X, Y);
+  }
+}
+
+////////////////////////////////////////////////////////////////
+
+// A subclass of fltk3::Window may call this to associate an X window it
+// creates with the fltk3::Window:
+
+void fl_fix_focus(); // in Fl.cxx
+
+Fl_X* Fl_X::set_xid(fltk3::Window* win, ::Window winxid) {
+  Fl_X* xp = new Fl_X;
+  xp->xid = winxid;
+  xp->other_xid = 0;
+  xp->setwindow(win);
+  xp->next = Fl_X::first;
+  xp->region = 0;
+  xp->wait_for_expose = 1;
+  xp->backbuffer_bad = 1;
+  Fl_X::first = xp;
+  if (win->modal()) {fltk3::modal_ = win; fl_fix_focus();}
+  return xp;
+}
+
+// More commonly a subclass calls this, because it hides the really
+// ugly parts of X and sets all the stuff for a window that is set
+// normally.  The global variables like fl_show_iconic are so that
+// subclasses of *that* class may change the behavior...
+
+char fl_show_iconic;    // hack for iconize()
+int fl_background_pixel = -1; // hack to speed up bg box drawing
+int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
+
+static const int childEventMask = ExposureMask;
+
+static const int XEventMask =
+ExposureMask|StructureNotifyMask
+|KeyPressMask|KeyReleaseMask|KeymapStateMask|FocusChangeMask
+|ButtonPressMask|ButtonReleaseMask
+|EnterWindowMask|LeaveWindowMask
+|PointerMotionMask;
+
+void Fl_X::make_xid(fltk3::Window* win, XVisualInfo *visual, Colormap colormap)
+{
+  fltk3::Group::current(0); // get rid of very common user bug: forgot end()
+
+  int X = win->x();
+  int Y = win->y();
+  int W = win->w();
+  if (W <= 0) W = 1; // X don't like zero...
+  int H = win->h();
+  if (H <= 0) H = 1; // X don't like zero...
+  if (!win->parent() && !fltk3::grab()) {
+    // center windows in case window manager does not do anything:
+#ifdef FL_CENTER_WINDOWS
+    if (!(win->flags() & fltk3::Widget::FORCE_POSITION)) {
+      win->x(X = scr_x+(scr_w-W)/2);
+      win->y(Y = scr_y+(scr_h-H)/2);
+    }
+#endif // FL_CENTER_WINDOWS
+
+    // force the window to be on-screen.  Usually the X window manager
+    // does this, but a few don't, so we do it here for consistency:
+    int scr_x, scr_y, scr_w, scr_h;
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
+
+    if (win->border()) {
+      // ensure border is on screen:
+      // (assume extremely minimal dimensions for this border)
+      const int top = 20;
+      const int left = 1;
+      const int right = 1;
+      const int bottom = 1;
+      if (X+W+right > scr_x+scr_w) X = scr_x+scr_w-right-W;
+      if (X-left < scr_x) X = scr_x+left;
+      if (Y+H+bottom > scr_y+scr_h) Y = scr_y+scr_h-bottom-H;
+      if (Y-top < scr_y) Y = scr_y+top;
+    }
+    // now insure contents are on-screen (more important than border):
+    if (X+W > scr_x+scr_w) X = scr_x+scr_w-W;
+    if (X < scr_x) X = scr_x;
+    if (Y+H > scr_y+scr_h) Y = scr_y+scr_h-H;
+    if (Y < scr_y) Y = scr_y;
+  }
+
+  // if the window is a subwindow and our parent is not mapped yet, we
+  // mark this window visible, so that mapping the parent at a later
+  // point in time will call this function again to finally map the subwindow.
+  if (win->parent() && !Fl_X::i(win->window())) {
+    win->set_visible();
+    return;
+  }
+
+  ulong root = win->parent() ?
+    fl_xid(win->window()) : RootWindow(fl_display, fl_screen);
+
+  XSetWindowAttributes attr;
+  int mask = CWBorderPixel|CWColormap|CWEventMask|CWBitGravity;
+  attr.event_mask = win->parent() ? childEventMask : XEventMask;
+  attr.colormap = colormap;
+  attr.border_pixel = 0;
+  attr.bit_gravity = 0; // StaticGravity;
+  if (win->override()) {
+    attr.override_redirect = 1;
+    attr.save_under = 1;
+    mask |= CWOverrideRedirect | CWSaveUnder;
+  } else attr.override_redirect = 0;
+  if (fltk3::grab()) {
+    attr.save_under = 1; mask |= CWSaveUnder;
+    if (!win->border()) {attr.override_redirect = 1; mask |= CWOverrideRedirect;}
+  }
+  if (fl_background_pixel >= 0) {
+    attr.background_pixel = fl_background_pixel;
+    fl_background_pixel = -1;
+    mask |= CWBackPixel;
+  }
+
+  Fl_X* xp =
+    set_xid(win, XCreateWindow(fl_display,
+                               root,
+                               X, Y, W, H,
+                               0, // borderwidth
+                               visual->depth,
+                               InputOutput,
+                               visual->visual,
+                               mask, &attr));
+  int showit = 1;
+
+  if (!win->parent() && !attr.override_redirect) {
+    // Communicate all kinds 'o junk to the X Window Manager:
+
+    win->label(win->label(), win->iconlabel());
+
+    XChangeProperty(fl_display, xp->xid, WM_PROTOCOLS,
+                    XA_ATOM, 32, 0, (uchar*)&WM_DELETE_WINDOW, 1);
+
+    // send size limits and border:
+    xp->sendxjunk();
+
+    // set the class property, which controls the icon used:
+    if (win->xclass()) {
+      char buffer[1024];
+      char *p; const char *q;
+      // truncate on any punctuation, because they break XResource lookup:
+      for (p = buffer, q = win->xclass(); isalnum(*q)||(*q&128);) *p++ = *q++;
+      *p++ = 0;
+      // create the capitalized version:
+      q = buffer;
+      *p = toupper(*q++); if (*p++ == 'X') *p++ = toupper(*q++);
+      while ((*p++ = *q++));
+      XChangeProperty(fl_display, xp->xid, XA_WM_CLASS, XA_STRING, 8, 0,
+                      (unsigned char *)buffer, p-buffer-1);
+    }
+
+    if (win->non_modal() && xp->next && !fl_disable_transient_for) {
+      // find some other window to be "transient for":
+      fltk3::Window* wp = xp->next->w;
+      while (wp->parent()) wp = wp->window();
+      XSetTransientForHint(fl_display, xp->xid, fl_xid(wp));
+      if (!wp->visible()) showit = 0; // guess that wm will not show it
+    }
+
+    // Make sure that borderless windows do not show in the task bar
+    if (!win->border()) {
+      Atom net_wm_state = XInternAtom (fl_display, "_NET_WM_STATE", 0);
+      Atom net_wm_state_skip_taskbar = XInternAtom (fl_display, "_NET_WM_STATE_SKIP_TASKBAR", 0);
+      XChangeProperty (fl_display, xp->xid, net_wm_state, XA_ATOM, 32,
+          PropModeAppend, (unsigned char*) &net_wm_state_skip_taskbar, 1);
+    }
+
+    // Make it receptive to DnD:
+    long version = 4;
+    XChangeProperty(fl_display, xp->xid, fl_XdndAware,
+                    XA_ATOM, sizeof(int)*8, 0, (unsigned char*)&version, 1);
+
+    XWMHints *hints = XAllocWMHints();
+    hints->input = True;
+    hints->flags = InputHint;
+    if (fl_show_iconic) {
+      hints->flags |= StateHint;
+      hints->initial_state = IconicState;
+      fl_show_iconic = 0;
+      showit = 0;
+    }
+    if (win->icon()) {
+      hints->icon_pixmap = (Pixmap)win->icon();
+      hints->flags       |= IconPixmapHint;
+    }
+    XSetWMHints(fl_display, xp->xid, hints);
+    XFree(hints);
+  }
+
+  // set the window type for menu and tooltip windows to avoid animations (compiz)
+  if (win->menu_window() || win->tooltip_window()) {
+    Atom net_wm_type = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE", False);
+    Atom net_wm_type_kind = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE_MENU", False);
+    XChangeProperty(fl_display, xp->xid, net_wm_type, XA_ATOM, 32, PropModeReplace, (unsigned char*)&net_wm_type_kind, 1);
+  }
+
+  XMapWindow(fl_display, xp->xid);
+  if (showit) {
+    win->set_visible();
+    int old_event = fltk3::e_number;
+    win->handle(fltk3::e_number = fltk3::SHOW); // get child windows to appear
+    fltk3::e_number = old_event;
+    win->redraw();
+  }
+}
+
+////////////////////////////////////////////////////////////////
+// Send X window stuff that can be changed over time:
+
+void Fl_X::sendxjunk() {
+  if (w->parent() || w->override()) return; // it's not a window manager window!
+
+  if (!w->size_range_set) { // default size_range based on resizable():
+    if (w->resizable()) {
+      fltk3::Widget *o = w->resizable();
+      int minw = o->w(); if (minw > 100) minw = 100;
+      int minh = o->h(); if (minh > 100) minh = 100;
+      w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
+    } else {
+      w->size_range(w->w(), w->h(), w->w(), w->h());
+    }
+    return; // because this recursively called here
+  }
+
+  XSizeHints *hints = XAllocSizeHints();
+  // memset(&hints, 0, sizeof(hints)); jreiser suggestion to fix purify?
+  hints->min_width = w->minw;
+  hints->min_height = w->minh;
+  hints->max_width = w->maxw;
+  hints->max_height = w->maxh;
+  hints->width_inc = w->dw;
+  hints->height_inc = w->dh;
+  hints->win_gravity = StaticGravity;
+
+  // see the file /usr/include/X11/Xm/MwmUtil.h:
+  // fill all fields to avoid bugs in kwm and perhaps other window managers:
+  // 0, MWM_FUNC_ALL, MWM_DECOR_ALL
+  long prop[5] = {0, 1, 1, 0, 0};
+
+  if (hints->min_width != hints->max_width ||
+      hints->min_height != hints->max_height) { // resizable
+    hints->flags = PMinSize|PWinGravity;
+    if (hints->max_width >= hints->min_width ||
+        hints->max_height >= hints->min_height) {
+      hints->flags = PMinSize|PMaxSize|PWinGravity;
+      // unfortunately we can't set just one maximum size.  Guess a
+      // value for the other one.  Some window managers will make the
+      // window fit on screen when maximized, others will put it off screen:
+      if (hints->max_width < hints->min_width) hints->max_width = fltk3::w();
+      if (hints->max_height < hints->min_height) hints->max_height = fltk3::h();
+    }
+    if (hints->width_inc && hints->height_inc) hints->flags |= PResizeInc;
+    if (w->aspect) {
+      // stupid X!  It could insist that the corner go on the
+      // straight line between min and max...
+      hints->min_aspect.x = hints->max_aspect.x = hints->min_width;
+      hints->min_aspect.y = hints->max_aspect.y = hints->min_height;
+      hints->flags |= PAspect;
+    }
+  } else { // not resizable:
+    hints->flags = PMinSize|PMaxSize|PWinGravity;
+    prop[0] = 1; // MWM_HINTS_FUNCTIONS
+    prop[1] = 1|2|16; // MWM_FUNC_ALL | MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE
+  }
+
+  if (w->flags() & fltk3::Widget::FORCE_POSITION) {
+    hints->flags |= USPosition;
+    hints->x = w->x();
+    hints->y = w->y();
+  }
+
+  if (!w->border()) {
+    prop[0] |= 2; // MWM_HINTS_DECORATIONS
+    prop[2] = 0; // no decorations
+  }
+
+  XSetWMNormalHints(fl_display, xid, hints);
+  XChangeProperty(fl_display, xid,
+                  fl_MOTIF_WM_HINTS, fl_MOTIF_WM_HINTS,
+                  32, 0, (unsigned char *)prop, 5);
+  XFree(hints);
+}
+
+void fltk3::Window::size_range_() {
+  size_range_set = 1;
+  if (shown()) i->sendxjunk();
+}
+
+////////////////////////////////////////////////////////////////
+
+// returns pointer to the filename, or null if name ends with '/'
+const char *fltk3::filename_name(const char *name) {
+  const char *p,*q;
+  if (!name) return (0);
+  for (p=q=name; *p;) if (*p++ == '/') q = p;
+  return q;
+}
+
+void fltk3::Window::label(const char *name,const char *iname) {
+  fltk3::Widget::label(name);
+  iconlabel_ = iname;
+  if (shown() && !parent()) {
+    if (!name) name = "";
+    int namelen = strlen(name);
+    if (!iname) iname = fltk3::filename_name(name);
+    int inamelen = strlen(iname);
+    XChangeProperty(fl_display, i->xid, fl_NET_WM_NAME,      fl_XaUtf8String, 8, 0, (uchar*)name,  namelen);	// utf8
+    XChangeProperty(fl_display, i->xid, XA_WM_NAME,          XA_STRING,       8, 0, (uchar*)name,  namelen);	// non-utf8
+    XChangeProperty(fl_display, i->xid, fl_NET_WM_ICON_NAME, fl_XaUtf8String, 8, 0, (uchar*)iname, inamelen);	// utf8
+    XChangeProperty(fl_display, i->xid, XA_WM_ICON_NAME,     XA_STRING,       8, 0, (uchar*)iname, inamelen);	// non-utf8
+  }
+}
+
+////////////////////////////////////////////////////////////////
+// Implement the virtual functions for the base fltk3::Window class:
+
+// If the box is a filled rectangle, we can make the redisplay *look*
+// faster by using X's background pixel erasing.  We can make it
+// actually *be* faster by drawing the frame only, this is done by
+// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
+//
+// On XFree86 (and prehaps all X's) this has a problem if the window
+// is resized while a save-behind window is atop it.  The previous
+// contents are restored to the area, but this assumes the area
+// is cleared to background color.  So this is disabled in this version.
+// fltk3::Window *fl_boxcheat;
+static inline int can_boxcheat(uchar b) {return (b==1 || ((b&2) && b<=15));}
+
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
+    labeltype(fltk3::NORMAL_LABEL);
+    align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
+  } else {
+    labeltype(fltk3::NO_LABEL);
+  }
+  fltk3::Tooltip::exit(this);
+  if (!shown()) {
+    fl_open_display();
+    // Don't set background pixel for double-buffered windows...
+    if (type() == fltk3::WINDOW && can_boxcheat(box())) {
+      fl_background_pixel = int(fl_xpixel(color()));
+    }
+    Fl_X::make_xid(this);
+  } else {
+    XMapRaised(fl_display, i->xid);
+  }
+#ifdef USE_PRINT_BUTTON
+void preparePrintFront(void);
+preparePrintFront();
+#endif
+}
+
+::Window fl_window;
+fltk3::Window *fltk3::Window::current_;
+GC fl_gc;
+
+// make X drawing go into this window (called by subclass flush() impl.)
+void fltk3::Window::make_current() {
+  static GC gc; // the GC used by all X windows
+  if (!gc) gc = XCreateGC(fl_display, i->xid, 0, 0);
+  fl_window = i->xid;
+  fl_gc = gc;
+  current_ = this;
+  fltk3::clip_region(0);
+
+#ifdef FLTK_USE_CAIRO
+  // update the cairo_t context
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this);
+#endif
+}
+
+::Window fl_xid_(const fltk3::Window* w)
+{
+  Fl_X *temp = Fl_X::i(w);
+  return temp ? temp->xid : 0;
+}
+
+static void decorated_win_size(fltk3::Window *win, int &w, int &h)
+{
+  w = win->w();
+  h = win->h();
+  if (!win->shown() || win->parent() || !win->border() || !win->visible()) return;
+  ::Window root, parent, *children;
+  unsigned n = 0;
+  Status status = XQueryTree(fl_display, Fl_X::i(win)->xid, &root, &parent, &children, &n); 
+  if (status != 0 && n) XFree(children);
+  // when compiz is used, root and parent are the same window 
+  // and I don't know where to find the window decoration
+  if (status == 0 || root == parent) return; 
+  XWindowAttributes attributes;
+  XGetWindowAttributes(fl_display, parent, &attributes);
+  w = attributes.width;
+  h = attributes.height;
+}
+
+int fltk3::Window::decorated_h()
+{
+  int w, h;
+  decorated_win_size(this, w, h);
+  return h;
+}
+
+int fltk3::Window::decorated_w()
+{
+  int w, h;
+  decorated_win_size(this, w, h);
+  return w;
+}
+
+void fltk3::PagedDevice::print_window(fltk3::Window *win, int x_offset, int y_offset)
+{
+  if (!win->shown() || win->parent() || !win->border() || !win->visible()) {
+    this->print_widget(win, x_offset, y_offset);
+    return;
+  }
+  fltk3::DisplayDevice::display_device()->set_current();
+  win->show();
+  fltk3::check();
+  win->make_current();
+  ::Window root, parent, *children, child_win, from;
+  unsigned n = 0;
+  int bx, bt, do_it;
+  from = fl_window;
+  do_it = (XQueryTree(fl_display, fl_window, &root, &parent, &children, &n) != 0 && 
+           XTranslateCoordinates(fl_display, fl_window, parent, 0, 0, &bx, &bt, &child_win) == True);
+  if (n) XFree(children);
+  // hack to bypass STR #2648: when compiz is used, root and parent are the same window 
+  // and I don't know where to find the window decoration
+  if (do_it && root == parent) do_it = 0; 
+  if (!do_it) {
+    this->set_current();
+    this->print_widget(win, x_offset, y_offset);
+    return;
+  }
+  fl_window = parent;
+  uchar *top_image = 0, *left_image = 0, *right_image = 0, *bottom_image = 0;
+  top_image = fltk3::read_image(NULL, 0, 0, - (win->w() + 2 * bx), bt);
+  if (bx) {
+    left_image = fltk3::read_image(NULL, 0, bt, -bx, win->h() + bx);
+    right_image = fltk3::read_image(NULL, win->w() + bx, bt, -bx, win->h() + bx);
+    bottom_image = fltk3::read_image(NULL, 0, bt + win->h(), -(win->w() + 2*bx), bx);
+  }
+  fl_window = from;
+  this->set_current();
+  if (top_image) {
+    fltk3::draw_image(top_image, x_offset, y_offset, win->w() + 2 * bx, bt, 3);
+    delete[] top_image;
+  }
+  if (bx) {
+    if (left_image) fltk3::draw_image(left_image, x_offset, y_offset + bt, bx, win->h() + bx, 3);
+    if (right_image) fltk3::draw_image(right_image, x_offset + win->w() + bx, y_offset + bt, bx, win->h() + bx, 3);
+    if (bottom_image) fltk3::draw_image(bottom_image, x_offset, y_offset + bt + win->h(), win->w() + 2*bx, bx, 3);
+    if (left_image) delete[] left_image;
+    if (right_image) delete[] right_image;
+    if (bottom_image) delete[] bottom_image;
+  }
+  this->print_widget( win, x_offset + bx, y_offset + bt );
+}
+
+
+#ifdef USE_PRINT_BUTTON
+// to test the fltk3::Printer class creating a "Print front window" button in a separate window
+// contains also preparePrintFront call above
+#include <fltk3/Printer.h>
+#include <fltk3/Button.h>
+void printFront(fltk3::Widget *o, void *data)
+{
+  fltk3::Printer printer;
+  o->window()->hide();
+  fltk3::Window *win = fltk3::first_window();
+  if(!win) return;
+  int w, h;
+  if( printer.start_job(1) ) { o->window()->show(); return; }
+  if( printer.start_page() ) { o->window()->show(); return; }
+  printer.printable_rect(&w,&h);
+  // scale the printer device so that the window fits on the page
+  float scale = 1;
+  int ww = win->decorated_w();
+  int wh = win->decorated_h();
+  if (ww > w || wh > h) {
+    scale = (float)w/ww;
+    if ((float)h/wh < scale) scale = (float)h/wh;
+    printer.scale(scale, scale);
+  }
+
+// #define ROTATE 20.0
+#ifdef ROTATE
+  printer.scale(scale * 0.8, scale * 0.8);
+  printer.printable_rect(&w, &h);
+  printer.origin(w/2, h/2 );
+  printer.rotate(ROTATE);
+  printer.print_widget( win, - win->w()/2, - win->h()/2 );
+  //printer.print_window_part( win, 0,0, win->w(), win->h(), - win->w()/2, - win->h()/2 );
+#else  
+  printer.print_window(win);
+#endif
+
+  printer.end_page();
+  printer.end_job();
+  o->window()->show();
+}
+
+void preparePrintFront(void)
+{
+  static int first=1;
+  if(!first) return;
+  first=0;
+  static fltk3::Window w(0,0,150,30);
+  static fltk3::Button b(0,0,w.w(),w.h(), "Print front window");
+  b.callback(printFront);
+  w.end();
+  w.show();
+}
+#endif // USE_PRINT_BUTTON
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Fl_x.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/Style.cxx
===================================================================
--- branches/branch-3.0/src/core/Style.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/Style.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,34 @@
+//
+// "$Id$"
+//
+// Base widget class for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/Style.h>
+
+// nothing to see here yet
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/Style.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/aimm.h
===================================================================
--- branches/branch-3.0/src/core/aimm.h	                        (rev 0)
+++ branches/branch-3.0/src/core/aimm.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,431 @@
+//
+// "$Id$"
+//
+// Standard dialog header file for the UTF-8 Fast Light Tool Kit (FLTK-UTF8).
+//
+// Copyright 2009-2010 by Bill Spitzak and others.
+//
+// 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
+// with exceptions that allow sub-classing and static linking in
+// non-LGPL compliant software. These exceptions are subject to
+// conditions, see the FLTK License for more details.
+//
+// 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 FLTK
+// License for more details.
+//
+// You should have received a copy of the FLTK License along with
+// this library; if not, write to  OksiD Software, Jean-Marc Lienher,
+// Rue de la Cheminee 1, CH-2065 Savagnier, Switzerland.
+//
+// Please report all bugs and problems to "oksid@bluewin.ch".
+//
+
+#ifndef AIMM_H
+#  define AIMM_H
+//#  define HANDLE_PTR HANDLE* 
+//#  define DWORD_PTR DWORD*
+//#  define CLSCTX_INPROC_SERVER 0x1
+const GUID IID_IActiveIMMApp = { 0x8c0e040, 0x62d1, 0x11d1, {0x93, 0x26, 0x00, 0x60, 0xb0, 0x67, 0xb8, 0x6e}};
+const GUID CLSID_CActiveIMM = { 0x4955dd33, 0xb159, 0x11d0, {0x8f, 0xcf, 0x00, 0xaa, 0x00, 0x6b, 0xcc, 0x59}};
+/*
+	class IUnknown
+    {
+    public:
+        
+        virtual long __stdcall QueryInterface( 
+            const GUID & riid,
+            void **ppvObject) = 0;
+        
+        virtual ULONG __stdcall AddRef( void) = 0;
+        
+        virtual ULONG __stdcall Release( void) = 0;
+    };
+
+extern "C" __declspec(dllimport) long __stdcall CoInitialize(void far *pvReserved);
+extern "C" __declspec(dllimport) long __stdcall CoCreateInstance(const GUID & rclsid, IUnknown * pUnkOuter,
+                    DWORD dwClsContext, const GUID & riid, LPVOID FAR* ppv);
+
+*/
+
+    class IActiveIMMApp : public IUnknown
+    {
+    public:
+        virtual long __stdcall AssociateContext( 
+             HWND hWnd,
+             HIMC hIME,
+             HIMC  *phPrev) = 0;
+        
+        virtual long __stdcall ConfigureIMEA( 
+             HKL hKL,
+             HWND hWnd,
+             DWORD dwMode,
+             void  *pData) = 0;
+        
+        virtual long __stdcall ConfigureIMEW( 
+             HKL hKL,
+             HWND hWnd,
+             DWORD dwMode,
+             void  *pData) = 0;
+        
+        virtual long __stdcall CreateContext( 
+             HIMC  *phIMC) = 0;
+        
+        virtual long __stdcall DestroyContext( 
+             HIMC hIME) = 0;
+        
+        virtual long __stdcall EnumRegisterWordA( 
+             HKL hKL,
+             LPSTR szReading,
+             DWORD dwStyle,
+             LPSTR szRegister,
+             LPVOID pData,
+             void  **pEnum) = 0;
+        
+        virtual long __stdcall EnumRegisterWordW( 
+             HKL hKL,
+             LPWSTR szReading,
+             DWORD dwStyle,
+             LPWSTR szRegister,
+             LPVOID pData,
+             void  **pEnum) = 0;
+        
+        virtual long __stdcall EscapeA( 
+             HKL hKL,
+             HIMC hIMC,
+             UINT uEscape,
+            /* [out][in] */ LPVOID pData,
+             LRESULT  *plResult) = 0;
+        
+        virtual long __stdcall EscapeW( 
+             HKL hKL,
+             HIMC hIMC,
+             UINT uEscape,
+            /* [out][in] */ LPVOID pData,
+             LRESULT  *plResult) = 0;
+        
+        virtual long __stdcall GetCandidateListA( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             UINT uBufLen,
+             void  *pCandList,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetCandidateListW( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             UINT uBufLen,
+             void  *pCandList,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetCandidateListCountA( 
+             HIMC hIMC,
+             DWORD  *pdwListSize,
+             DWORD  *pdwBufLen) = 0;
+        
+        virtual long __stdcall GetCandidateListCountW( 
+             HIMC hIMC,
+             DWORD  *pdwListSize,
+             DWORD  *pdwBufLen) = 0;
+        
+        virtual long __stdcall GetCandidateWindow( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             void  *pCandidate) = 0;
+        
+        virtual long __stdcall GetCompositionFontA( 
+             HIMC hIMC,
+             LOGFONTA  *plf) = 0;
+        
+        virtual long __stdcall GetCompositionFontW( 
+             HIMC hIMC,
+             LOGFONTW  *plf) = 0;
+        
+        virtual long __stdcall GetCompositionStringA( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             DWORD dwBufLen,
+             LONG  *plCopied,
+             LPVOID pBuf) = 0;
+        
+        virtual long __stdcall GetCompositionStringW( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             DWORD dwBufLen,
+             LONG  *plCopied,
+             LPVOID pBuf) = 0;
+        
+        virtual long __stdcall GetCompositionWindow( 
+             HIMC hIMC,
+             void  *pCompForm) = 0;
+        
+        virtual long __stdcall GetContext( 
+             HWND hWnd,
+             HIMC  *phIMC) = 0;
+        
+        virtual long __stdcall GetConversionListA( 
+             HKL hKL,
+             HIMC hIMC,
+             LPSTR pSrc,
+             UINT uBufLen,
+             UINT uFlag,
+             void  *pDst,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetConversionListW( 
+             HKL hKL,
+             HIMC hIMC,
+             LPWSTR pSrc,
+             UINT uBufLen,
+             UINT uFlag,
+             void  *pDst,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetConversionStatus( 
+             HIMC hIMC,
+             DWORD  *pfdwConversion,
+             DWORD  *pfdwSentence) = 0;
+        
+        virtual long __stdcall GetDefaultIMEWnd( 
+             HWND hWnd,
+             HWND  *phDefWnd) = 0;
+        
+        virtual long __stdcall GetDescriptionA( 
+             HKL hKL,
+             UINT uBufLen,
+             LPSTR szDescription,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetDescriptionW( 
+             HKL hKL,
+             UINT uBufLen,
+             LPWSTR szDescription,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetGuideLineA( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             DWORD dwBufLen,
+             LPSTR pBuf,
+             DWORD  *pdwResult) = 0;
+        
+        virtual long __stdcall GetGuideLineW( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             DWORD dwBufLen,
+             LPWSTR pBuf,
+             DWORD  *pdwResult) = 0;
+        
+        virtual long __stdcall GetIMEFileNameA( 
+             HKL hKL,
+             UINT uBufLen,
+             LPSTR szFileName,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetIMEFileNameW( 
+             HKL hKL,
+             UINT uBufLen,
+             LPWSTR szFileName,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetOpenStatus( 
+             HIMC hIMC) = 0;
+        
+        virtual long __stdcall GetProperty( 
+             HKL hKL,
+             DWORD fdwIndex,
+             DWORD  *pdwProperty) = 0;
+        
+        virtual long __stdcall GetRegisterWordStyleA( 
+             HKL hKL,
+             UINT nItem,
+             STYLEBUFA  *pStyleBuf,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetRegisterWordStyleW( 
+             HKL hKL,
+             UINT nItem,
+             STYLEBUFW  *pStyleBuf,
+             UINT  *puCopied) = 0;
+        
+        virtual long __stdcall GetStatusWindowPos( 
+             HIMC hIMC,
+             POINT  *pptPos) = 0;
+        
+        virtual long __stdcall GetVirtualKey( 
+             HWND hWnd,
+             UINT  *puVirtualKey) = 0;
+        
+        virtual long __stdcall InstallIMEA( 
+             LPSTR szIMEFileName,
+             LPSTR szLayoutText,
+             HKL  *phKL) = 0;
+        
+        virtual long __stdcall InstallIMEW( 
+             LPWSTR szIMEFileName,
+             LPWSTR szLayoutText,
+             HKL  *phKL) = 0;
+        
+        virtual long __stdcall IsIME( 
+             HKL hKL) = 0;
+        
+        virtual long __stdcall IsUIMessageA( 
+             HWND hWndIME,
+             UINT msg,
+             WPARAM wParam,
+             LPARAM lParam) = 0;
+        
+        virtual long __stdcall IsUIMessageW( 
+             HWND hWndIME,
+             UINT msg,
+             WPARAM wParam,
+             LPARAM lParam) = 0;
+        
+        virtual long __stdcall NotifyIME( 
+             HIMC hIMC,
+             DWORD dwAction,
+             DWORD dwIndex,
+             DWORD dwValue) = 0;
+        
+        virtual long __stdcall RegisterWordA( 
+             HKL hKL,
+             LPSTR szReading,
+             DWORD dwStyle,
+             LPSTR szRegister) = 0;
+        
+        virtual long __stdcall RegisterWordW( 
+             HKL hKL,
+             LPWSTR szReading,
+             DWORD dwStyle,
+             LPWSTR szRegister) = 0;
+        
+        virtual long __stdcall ReleaseContext( 
+             HWND hWnd,
+             HIMC hIMC) = 0;
+        
+        virtual long __stdcall SetCandidateWindow( 
+             HIMC hIMC,
+             void  *pCandidate) = 0;
+        
+        virtual long __stdcall SetCompositionFontA( 
+             HIMC hIMC,
+             LOGFONTA  *plf) = 0;
+        
+        virtual long __stdcall SetCompositionFontW( 
+             HIMC hIMC,
+             LOGFONTW  *plf) = 0;
+        
+        virtual long __stdcall SetCompositionStringA( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             LPVOID pComp,
+             DWORD dwCompLen,
+             LPVOID pRead,
+             DWORD dwReadLen) = 0;
+        
+        virtual long __stdcall SetCompositionStringW( 
+             HIMC hIMC,
+             DWORD dwIndex,
+             LPVOID pComp,
+             DWORD dwCompLen,
+             LPVOID pRead,
+             DWORD dwReadLen) = 0;
+        
+        virtual long __stdcall SetCompositionWindow( 
+             HIMC hIMC,
+             void  *pCompForm) = 0;
+        
+        virtual long __stdcall SetConversionStatus( 
+             HIMC hIMC,
+             DWORD fdwConversion,
+             DWORD fdwSentence) = 0;
+        
+        virtual long __stdcall SetOpenStatus( 
+             HIMC hIMC,
+             BOOL fOpen) = 0;
+        
+        virtual long __stdcall SetStatusWindowPos( 
+             HIMC hIMC,
+             POINT  *pptPos) = 0;
+        
+        virtual long __stdcall SimulateHotKey( 
+             HWND hWnd,
+             DWORD dwHotKeyID) = 0;
+        
+        virtual long __stdcall UnregisterWordA( 
+             HKL hKL,
+             LPSTR szReading,
+             DWORD dwStyle,
+             LPSTR szUnregister) = 0;
+        
+        virtual long __stdcall UnregisterWordW( 
+             HKL hKL,
+             LPWSTR szReading,
+             DWORD dwStyle,
+             LPWSTR szUnregister) = 0;
+        
+        virtual long __stdcall Activate( 
+             BOOL fRestoreLayout) = 0;
+        
+        virtual long __stdcall Deactivate( void) = 0;
+        
+        virtual long __stdcall OnDefWindowProc( 
+             HWND hWnd,
+             UINT Msg,
+             WPARAM wParam,
+             LPARAM lParam,
+             LRESULT  *plResult) = 0;
+        
+        virtual long __stdcall FilterClientWindows( 
+             ATOM  *aaClassList,
+             UINT uSize) = 0;
+        
+        virtual long __stdcall GetCodePageA( 
+             HKL hKL,
+             UINT  *uCodePage) = 0;
+        
+        virtual long __stdcall GetLangId( 
+             HKL hKL,
+             WORD  *plid) = 0;
+        
+        virtual long __stdcall AssociateContextEx( 
+             HWND hWnd,
+             HIMC hIMC,
+             DWORD dwFlags) = 0;
+        
+        virtual long __stdcall DisableIME( 
+             DWORD idThread) = 0;
+        
+        virtual long __stdcall GetImeMenuItemsA( 
+             HIMC hIMC,
+             DWORD dwFlags,
+             DWORD dwType,
+             void  *pImeParentMenu,
+             void  *pImeMenu,
+             DWORD dwSize,
+             DWORD  *pdwResult) = 0;
+        
+        virtual long __stdcall GetImeMenuItemsW( 
+             HIMC hIMC,
+             DWORD dwFlags,
+             DWORD dwType,
+             void  *pImeParentMenu,
+            void  *pImeMenu,
+             DWORD dwSize,
+             DWORD  *pdwResult) = 0;
+        
+        virtual long __stdcall EnumInputContext( 
+             DWORD idThread,
+             void  **ppEnum) = 0;
+        
+    };
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/aimm.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/allfiles.xbm
===================================================================
--- branches/branch-3.0/src/core/allfiles.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/allfiles.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define allfiles_width 16
+#define allfiles_height 16
+static unsigned char allfiles_bits[] = {
+   0xfc, 0x3f, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x84, 0x21, 0xa4, 0x25,
+   0xc4, 0x23, 0xf4, 0x2f, 0xf4, 0x2f, 0xc4, 0x23, 0xa4, 0x25, 0x84, 0x21,
+   0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0xfc, 0x3f};


Property changes on: branches/branch-3.0/src/core/allfiles.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/cgdebug.h
===================================================================
--- branches/branch-3.0/src/core/cgdebug.h	                        (rev 0)
+++ branches/branch-3.0/src/core/cgdebug.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,215 @@
+//
+// "$Id$"
+//
+// OS X Core Graphics debugging help for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This file allows easier debugging of Mac OS X Core Graphics 
+// code. This file is normally not included into any FLTK builds,
+// but since it has proven to be tremendously useful in debugging
+// the FLTK port to "Quartz", I decided to add this file in case
+// more bugs show up.
+//
+// This header is activated by adding the following
+// line to "config.h"
+//   #include "src/cgdebug.h"
+//
+// Running "./configure" will remove this line from "config.h".
+//
+// When used erreanously, Core Graphics prints warnings to 
+// stderr. This is helpful, however it is not possible to 
+// associate a line number or source file with the warning message.
+// This headr file outputs a trace of CG calls, interweaveing
+// them with CG warnings.
+//
+// Matthias
+
+#ifndef CGDEBUG
+#define CGDEBUG
+
+#include <stdio.h>
+#include <Carbon/Carbon.h>
+
+//+BitmapContextCreate
+//+BitmapContextGetData
+// ClipCGContextToRegion
+// QDBeginCGContext
+// QDEndCGContext
+
+//+AddArc
+//+AddLineToPoint
+// ClipToRect
+// ClosePath
+//+ConcatCTM
+//+DrawImage
+// FillPath
+// FillRect
+// Flush
+//+GetCTM
+// MoveToPoint
+//+Release
+// RestoreGState
+// SaveGState
+//+ScaleCTM
+//+SetLineCap
+//+SetLineDash
+//+SetLineJoin
+//+SetLineWidth
+//+SetRGBFillColor
+//+SetRGBStrokeColor
+//+SetShouldAntialias
+//+SetTextMatrix
+//+StrokePath
+//+TranslateCTM
+
+inline OSStatus dbgLocation(const char *file, int line) 
+{
+  fprintf(stderr, "%s:%d ", file, line);
+  return 0;
+}
+
+inline OSStatus dbgEndl()     
+{
+  fprintf(stderr, "\n");
+  return 0;
+}
+
+
+inline void dbgCGContextClipToRect(CGContextRef a, CGRect b)
+{
+  CGContextClipToRect(a, b);
+}
+
+#define CGContextClipToRect(a, b) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextClipToRect(a, b); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextFillRect(CGContextRef a, CGRect b)
+{
+  CGContextFillRect(a, b);
+}
+
+#define CGContextFillRect(a, b) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextFillRect(a, b); \
+  fprintf(stderr, "\n"); }
+
+inline OSStatus dbgQDEndCGContext(CGrafPtr a, CGContextRef *b) 
+{
+  return QDEndCGContext(a, b);
+}
+
+#define QDEndCGContext(a, b) ( \
+  dbgLocation(__FILE__, __LINE__) + \
+  dbgQDEndCGContext(a, b) + \
+  dbgEndl() )
+
+inline OSStatus dbgQDBeginCGContext(CGrafPtr a, CGContextRef *b) 
+{
+  return QDBeginCGContext(a, b);
+}
+
+#define QDBeginCGContext(a, b) ( \
+  dbgLocation(__FILE__, __LINE__) + \
+  dbgQDBeginCGContext(a, b) + \
+  dbgEndl() )
+
+inline void dbgClipCGContextToRegion(CGContextRef a, const Rect *b, RgnHandle c) 
+{
+  ClipCGContextToRegion(a, b, c);
+}
+
+#define ClipCGContextToRegion(a, b, c) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgClipCGContextToRegion(a, b, c); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextMoveToPoint(CGContextRef context, float x, float y)
+{
+  CGContextMoveToPoint(context, x, y);
+}
+
+#define CGContextMoveToPoint(a, b, c) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextMoveToPoint(a, b, c); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextFillPath(CGContextRef context)
+{ 
+  CGContextFillPath(context);
+}
+
+#define CGContextFillPath(a) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextFillPath(a); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextClosePath(CGContextRef context)
+{ 
+  CGContextClosePath(context);
+}
+
+#define CGContextClosePath(a) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextClosePath(a); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextFlush(CGContextRef context)
+{ 
+  CGContextFlush(context);
+}
+
+#define CGContextFlush(a) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextFlush(a); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextSaveGState(CGContextRef context)
+{ 
+  CGContextSaveGState(context);
+}
+
+#define CGContextSaveGState(a) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextSaveGState(a); \
+  fprintf(stderr, "\n"); }
+
+inline void dbgCGContextRestoreGState(CGContextRef context)
+{ 
+  CGContextRestoreGState(context);
+}
+
+#define CGContextRestoreGState(a) { \
+  fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \
+  dbgCGContextRestoreGState(a); \
+  fprintf(stderr, "\n"); }
+
+
+#endif
+
+//
+// End of "$Id$".
+//
+


Property changes on: branches/branch-3.0/src/core/cgdebug.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/cmap.cxx
===================================================================
--- branches/branch-3.0/src/core/cmap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/cmap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,183 @@
+//
+// "$Id$"
+//
+// Colormap generation program for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This program produces the contents of "fl_cmap.h" as stdout
+
+// #include <gl/gl.h>
+#include <stdio.h>
+
+// This table is initialized with color values I got by reading the
+// colormap on an IRIX 4.3 machine:
+
+// "full intensity colors" have been turned down some to make white
+// background less intense by default.  The hope is that this will make
+// fltk programs more friendly on color-adjusted screens.  If you want
+// pure colors you should get them out of the colormap.
+
+//#define III 244 // maximum intensity of the basic colors
+
+// that results in errors and unshared colormap entries, so full intensity:
+#define III 255 // maximum intensity of the basic colors
+
+static short cmap[256][3] = {
+// 3-bit colormap:
+  {  0,  0,  0},	// black
+  {III,  0,  0},	// red
+  {  0,III,  0},	// green
+  {III,III,  0},	// yellow
+  {  0,  0,III},	// blue
+  {III,  0,III},	// magenta
+  {  0,III,III},	// cyan
+  {III,III,III},	// white
+// pastel versions of those colors, from SGI's standard color map:
+  { 85, 85, 85},	// 1/3 gray
+  {198,113,113},	// salmon? pale red?
+  {113,198,113},	// pale green
+  {142,142, 56},	// khaki
+  {113,113,198},	// pale blue
+  {142, 56,142},	// purple, orchid, pale magenta
+  { 56,142,142},	// cadet blue, aquamarine, pale cyan
+// The next location is used for fltk3::SELECTION_COLOR. It formerly was 2/3 gray
+// but this is changed to be the Windows blue color. This allows the default
+// behavior on both X and Windows to match:
+  {  0,  0,128},
+//{170,170,170},	// old 2/3 gray color
+// These next 16 are the fltk3::FREE_COLOR area. In some versions of fltk
+// these were filled with random colors that a Irix 5.3 machine placed
+// in these locations. Other versions of fltk filled this with the 1/3
+// gray above to discourage their use. This newest version uses colors
+// that NewTek has assigned for their GUI:
+#if 0
+  // The Irix 5.3 colors:
+  { 16, 16, 16},
+  {128, 40,128},
+  {198, 30, 30},
+  { 66, 30, 30},
+  {176,140,140},
+  {  0, 20, 20},
+  { 20, 10, 10},
+  { 40, 20, 20},
+  { 60, 30, 30},
+  {  0, 80, 80},
+  {  0, 40, 40},
+  { 20, 20,  0},
+  { 40, 40,  0},
+  { 80, 80, 10},
+  {150,150, 20},
+  {160, 10, 10},
+#else
+  // The NewTek colors: (from George Yohng)
+  {168,168,152},
+  {232,232,216},
+  {104,104, 88},
+  {152,168,168},
+  {216,232,232},
+  { 88,104,104},
+  {156,156,168},
+  {220,220,232},
+  { 92, 92,104},
+  {156,168,156},
+  {220,232,220},
+  { 92,104, 92},
+  {144,144,144},
+  {192,192,192},
+  { 80, 80, 80},
+  {160,160,160},
+#endif
+// The rest of the colormap is a gray ramp and table, filled in below:
+};
+
+// This is fltk3::background from Fl_get_system_colors.cxx, with modifications:
+
+namespace fltk3 {
+  const unsigned int GRAY_RAMP = 32;
+  const unsigned int NUM_GRAY  = 24;
+  const unsigned int GRAY = 49; // old value is 47
+}
+typedef unsigned char uchar;
+#include <math.h>
+
+void background(uchar r, uchar g, uchar b) {
+  // replace the gray ramp so that color 47 (by default 2/3) is this color
+  if (!r) r = 1; else if (r==255) r = 254;
+  double powr = log(r/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
+  if (!g) g = 1; else if (g==255) g = 254;
+  double powg = log(g/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
+  if (!b) b = 1; else if (b==255) b = 254;
+  double powb = log(b/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
+  for (int i = 0; i < fltk3::NUM_GRAY; i++) {
+    double gray = i/(fltk3::NUM_GRAY-1.0);
+    cmap[i+fltk3::GRAY_RAMP][0] = uchar(pow(gray,powr)*255+.5);
+    cmap[i+fltk3::GRAY_RAMP][1] = uchar(pow(gray,powg)*255+.5);
+    cmap[i+fltk3::GRAY_RAMP][2] = uchar(pow(gray,powb)*255+.5);
+  }
+}
+
+int main() {
+  int i,r,g,b;
+#if 0
+  /* Read colormap colors into internal table */
+  long cmwin;
+  noport();
+  cmwin = winopen("CM");
+  for (i=0; i<256; i++)
+    getmcolor(i,&cmap[i][0],&cmap[i][1],&cmap[i][2]);
+  winclose(cmwin);
+#endif
+// overwrite the X allocation area with one color so people are
+// discouraged from using it:
+  //for (i=16; i<32; i++) {cmap[i][0]=cmap[i][1]=cmap[i][2] = 85;}
+
+  // fill in the gray ramp:
+  background(0xc0, 0xc0, 0xc0); // microsoft colors
+  // background(170, 170, 170); // old fltk colors
+  // copy the 1/3 and 2/3 gray to the closest locations in gray ramp:
+  cmap[39][0] = cmap[39][1] = cmap[39][2] = 85;
+  cmap[47][0] = cmap[47][1] = cmap[47][2] = 170;
+
+  // fill in the color cube
+  i = 56;
+  for (b=0; b<5; b++)
+    for (r=0; r<5; r++)
+      for (g=0; g<8; g++) {
+	cmap[i][0] = r*255/4;
+	cmap[i][1] = g*255/7;
+	cmap[i][2] = b*255/4;
+	i++;
+      }
+
+  for (i=0; i<256; i++) {
+    printf("\t0x%02x%02x%02x00",cmap[i][0],cmap[i][1],cmap[i][2]);
+    if (i < 255) printf(",\n");
+  }
+  printf("\n");
+  return 0;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/cmap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/d1.xbm
===================================================================
--- branches/branch-3.0/src/core/d1.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/d1.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define d1_width 16
+#define d1_height 16
+static unsigned char d1_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x38, 0x00, 0x78, 0x00,
+   0xe8, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x17, 0x00, 0x1e, 0x00, 0x1c,
+   0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/d1.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/d1_mask.xbm
===================================================================
--- branches/branch-3.0/src/core/d1_mask.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/d1_mask.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define d1_mask_width 16
+#define d1_mask_height 16
+static unsigned char d1_mask_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+   0xfc, 0x01, 0xec, 0x03, 0xc0, 0x37, 0x80, 0x3f, 0x00, 0x3f, 0x00, 0x3e,
+   0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/d1_mask.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/dump_compose.c
===================================================================
--- branches/branch-3.0/src/core/dump_compose.c	                        (rev 0)
+++ branches/branch-3.0/src/core/dump_compose.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,26 @@
+/* write out the documentation for the compose key */
+
+/* copy the string from fltk3::Input.C */
+static const char* const compose_pairs =
+"  ! @ # $ y=| & : c a <<~ - r _ * +-2 3 ' u p . , 1 o >>141234? "
+"A`A'A^A~A:A*AEC,E`E'E^E:I`I'I^I:D-N~O`O'O^O~O:x O/U`U'U^U:Y'DDss"
+"a`a'a^a~a:a*aec,e`e'e^e:i`i'i^i:d-n~o`o'o^o~o:-:o/u`u'u^u:y'ddy:";
+
+#include <stdio.h>
+
+int main() {
+  int x,y;
+  for (x = 0; x<16; x++) {
+    for (y = 0; y<6; y++) {
+      const char *p = compose_pairs + (16*y+x)*2;
+      if (p[1] == ' ')
+	printf("<td><code>%c&nbsp</code>&nbsp&nbsp&nbsp%c\n",
+	       p[0],(p-compose_pairs)/2+0xA0);
+      else
+	printf("<td><code>%c%c</code>&nbsp&nbsp&nbsp%c\n",
+	       p[0],p[1],(p-compose_pairs)/2+0xA0);
+    }
+    printf("<tr>");
+  }
+  return 0;
+}


Property changes on: branches/branch-3.0/src/core/dump_compose.c
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/ew.xbm
===================================================================
--- branches/branch-3.0/src/core/ew.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/ew.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,8 @@
+#define ew_width 16
+#define ew_height 16
+#define ew_x_hot 8
+#define ew_y_hot 8
+static unsigned char ew_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10,
+   0x0c, 0x30, 0xfe, 0x7f, 0xfe, 0x7f, 0x0c, 0x30, 0x08, 0x10, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/ew.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/ew_mask.xbm
===================================================================
--- branches/branch-3.0/src/core/ew_mask.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/ew_mask.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,8 @@
+#define ew_mask_width 16
+#define ew_mask_height 16
+#define ew_mask_x_hot 8
+#define ew_mask_y_hot 8
+static unsigned char ew_mask_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1c, 0x38,
+   0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0x1c, 0x38, 0x18, 0x18,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/ew_mask.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fastarrow.h
===================================================================
--- branches/branch-3.0/src/core/fastarrow.h	                        (rev 0)
+++ branches/branch-3.0/src/core/fastarrow.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define fastarrow_width 16
+#define fastarrow_height 16
+static unsigned char fastarrow_bits[] = {
+   0x00, 0x00, 0x00, 0x07, 0xe0, 0x07, 0xfc, 0x03, 0xff, 0xff, 0xfc, 0x03,
+   0xe0, 0x07, 0x00, 0x07, 0xe0, 0x00, 0xe0, 0x07, 0xc0, 0x3f, 0xff, 0xff,
+   0xc0, 0x3f, 0xe0, 0x07, 0xe0, 0x00, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/fastarrow.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_absolute.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_absolute.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_absolute.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,272 @@
+//
+// "$Id$"
+//
+// Filename expansion routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* expand a file name by prepending current directory, deleting . and
+   .. (not really correct for symbolic links) between the prepended
+   current directory.  Use $PWD if it exists.
+   Returns true if any changes were made.
+*/
+
+#include <fltk3/filename.h>
+#include <fltk3/utf8.h>
+#include <stdlib.h>
+#include "flstring.h"
+#include <ctype.h>
+#if defined(WIN32) && !defined(__CYGWIN__)
+# include <direct.h>
+#else
+#  include <unistd.h>
+#endif
+
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+inline int isdirsep(char c) {return c=='/' || c=='\\';}
+#else
+#define isdirsep(c) ((c)=='/')
+#endif
+
+/** Makes a filename absolute from a relative filename.
+    \code
+    #include <fltk3/filename.h>
+    [..]
+    chdir("/var/tmp");
+    fltk3::filename_absolute(out, sizeof(out), "foo.txt");         // out="/var/tmp/foo.txt"
+    fltk3::filename_absolute(out, sizeof(out), "./foo.txt");       // out="/var/tmp/foo.txt"
+    fltk3::filename_absolute(out, sizeof(out), "../log/messages"); // out="/var/log/messages"
+    \endcode
+    \param[out] to resulting absolute filename
+    \param[in]  tolen size of the absolute filename buffer 
+    \param[in]  from relative filename
+    \return 0 if no change, non zero otherwise
+ */
+int fltk3::filename_absolute(char *to, int tolen, const char *from) {
+  if (isdirsep(*from) || *from == '|'
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+      || from[1]==':'
+#endif
+      ) {
+    strlcpy(to, from, tolen);
+    return 0;
+  }
+
+  char *a;
+  char *temp = new char[tolen];
+  const char *start = from;
+
+  a = fltk3::getcwd(temp, tolen);
+  if (!a) {
+    strlcpy(to, from, tolen);
+    delete[] temp;
+    return 0;
+  }
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+  for (a = temp; *a; a++) if (*a=='\\') *a = '/'; // ha ha
+#else
+  a = temp+strlen(temp);
+#endif
+  if (isdirsep(*(a-1))) a--;
+  /* remove intermediate . and .. names: */
+  while (*start == '.') {
+    if (start[1]=='.' && isdirsep(start[2])) {
+      char *b;
+      for (b = a-1; b >= temp && !isdirsep(*b); b--);
+      if (b < temp) break;
+      a = b;
+      start += 3;
+    } else if (isdirsep(start[1])) {
+      start += 2;
+    } else if (!start[1]) {
+      start ++; // Skip lone "."
+      break;
+    } else
+      break;
+  }
+
+  *a++ = '/';
+  strlcpy(a,start,tolen - (a - temp));
+
+  strlcpy(to, temp, tolen);
+
+  delete[] temp;
+
+  return 1;
+}
+
+/** Makes a filename relative to the current working directory.
+    \code
+    #include <fltk3/filename.h>
+    [..]
+    chdir("/var/tmp/somedir");       // set cwd to /var/tmp/somedir
+    [..]
+    char out[FLTK3_PATH_MAX];
+    fltk3::filename_relative(out, sizeof(out), "/var/tmp/somedir/foo.txt");  // out="foo.txt",    return=1
+    fltk3::filename_relative(out, sizeof(out), "/var/tmp/foo.txt");          // out="../foo.txt", return=1
+    fltk3::filename_relative(out, sizeof(out), "foo.txt");                   // out="foo.txt",    return=0 (no change)
+    fltk3::filename_relative(out, sizeof(out), "./foo.txt");                 // out="./foo.txt",  return=0 (no change)
+    fltk3::filename_relative(out, sizeof(out), "../foo.txt");                // out="../foo.txt", return=0 (no change)
+    \endcode
+    \param[out] to resulting relative filename
+    \param[in]  tolen size of the relative filename buffer 
+    \param[in]  from absolute filename
+    \return 0 if no change, non zero otherwise
+ */
+int					// O - 0 if no change, 1 if changed
+fltk3::filename_relative(char       *to,	// O - Relative filename
+                     int        tolen,	// I - Size of "to" buffer
+                     const char *from)  // I - Absolute filename
+{
+  char cwd_buf[FLTK3_PATH_MAX];	// Current directory
+  // get the current directory and return if we can't
+  if (!fltk3::getcwd(cwd_buf, sizeof(cwd_buf))) {
+    strlcpy(to, from, tolen);
+    return 0;
+  }
+  return fltk3::filename_relative(to, tolen, from, cwd_buf);
+}
+
+
+/** Makes a filename relative to any other directory.
+ \param[out] to resulting relative filename
+ \param[in]  tolen size of the relative filename buffer 
+ \param[in]  from absolute filename
+ \param[in]  base relative to this absolute path
+ \return 0 if no change, non zero otherwise
+ */
+int					// O - 0 if no change, 1 if changed
+fltk3::filename_relative(char       *to,	// O - Relative filename
+                     int        tolen,	// I - Size of "to" buffer
+                     const char *from,  // I - Absolute filename
+                     const char *base) { // I - Find path relative to this path
+  
+  char          *newslash;		// Directory separator
+  const char	*slash;			// Directory separator
+  char          *cwd = 0L, *cwd_buf = 0L;
+  if (base) cwd = cwd_buf = strdup(base);
+  
+  // return if "from" is not an absolute path
+#if defined(WIN32) || defined(__EMX__)
+  if (from[0] == '\0' ||
+      (!isdirsep(*from) && !isalpha(*from) && from[1] != ':' &&
+       !isdirsep(from[2]))) {
+#else
+  if (from[0] == '\0' || !isdirsep(*from)) {
+#endif // WIN32 || __EMX__
+    strlcpy(to, from, tolen);
+    if (cwd_buf) free(cwd_buf);
+    return 0;
+  }
+        
+  // return if "cwd" is not an absolute path
+#if defined(WIN32) || defined(__EMX__)
+  if (!cwd || cwd[0] == '\0' ||
+      (!isdirsep(*cwd) && !isalpha(*cwd) && cwd[1] != ':' &&
+       !isdirsep(cwd[2]))) {
+#else
+  if (!cwd || cwd[0] == '\0' || !isdirsep(*cwd)) {
+#endif // WIN32 || __EMX__
+    strlcpy(to, from, tolen);
+    if (cwd_buf) free(cwd_buf);
+    return 0;
+  }
+              
+#if defined(WIN32) || defined(__EMX__)
+  // convert all backslashes into forward slashes
+  for (newslash = strchr(cwd, '\\'); newslash; newslash = strchr(newslash + 1, '\\'))
+    *newslash = '/';
+
+  // test for the exact same string and return "." if so
+  if (!strcasecmp(from, cwd)) {
+    strlcpy(to, ".", tolen);
+    free(cwd_buf);
+    return (1);
+  }
+
+  // test for the same drive. Return the absolute path if not
+  if (tolower(*from & 255) != tolower(*cwd & 255)) {
+    // Not the same drive...
+    strlcpy(to, from, tolen);
+    free(cwd_buf);
+    return 0;
+  }
+
+  // compare the path name without the drive prefix
+  from += 2; cwd += 2;
+#else
+  // test for the exact same string and return "." if so
+  if (!strcmp(from, cwd)) {
+    strlcpy(to, ".", tolen);
+    free(cwd_buf);
+    return (1);
+  }
+#endif // WIN32 || __EMX__
+
+  // compare both path names until we find a difference
+  for (slash = from, newslash = cwd;
+      *slash != '\0' && *newslash != '\0';
+       slash ++, newslash ++)
+    if (isdirsep(*slash) && isdirsep(*newslash)) continue;
+#if defined(WIN32) || defined(__EMX__) || defined(__APPLE__)
+    else if (tolower(*slash & 255) != tolower(*newslash & 255)) break;
+#else
+    else if (*slash != *newslash) break;
+#endif // WIN32 || __EMX__ || __APPLE__
+
+  // skip over trailing slashes
+  if ( *newslash == '\0' && *slash != '\0' && !isdirsep(*slash)
+     &&(newslash==cwd || !isdirsep(newslash[-1])) )
+    newslash--;
+
+  // now go back to the first character of the first differing paths segment
+  while (!isdirsep(*slash) && slash > from) slash --;
+  if (isdirsep(*slash)) slash ++;
+
+  // do the same for the current dir
+  if (isdirsep(*newslash)) newslash --;
+  if (*newslash != '\0')
+    while (!isdirsep(*newslash) && newslash > cwd) newslash --;
+
+  // prepare the destination buffer
+  to[0]         = '\0';
+  to[tolen - 1] = '\0';
+
+  // now add a "previous dir" sequence for every following slash in the cwd
+  while (*newslash != '\0') {
+    if (isdirsep(*newslash)) strlcat(to, "../", tolen);
+
+    newslash ++;
+  }
+
+  // finally add the differing path from "from"
+  strlcat(to, slash, tolen);
+
+  free(cwd_buf);
+  return 1;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_absolute.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_expand.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_expand.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_expand.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,134 @@
+//
+// "$Id$"
+//
+// Filename expansion routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* expand a file name by substuting environment variables and
+   home directories.  Returns true if any changes were made.
+   to & from may be the same buffer.
+*/
+
+#include <fltk3/filename.h>
+#include <fltk3/utf8.h>
+#include <stdlib.h>
+#include "flstring.h"
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <windows.h>
+#else
+# include <unistd.h>
+# include <pwd.h>
+#endif
+
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+static inline int isdirsep(char c) {return c=='/' || c=='\\';}
+#else
+#define isdirsep(c) ((c)=='/')
+#endif
+
+/** Expands a filename containing shell variables and tilde (~).
+    Currently handles these variants:
+    \code
+    "~username"               // if 'username' does not exist, result will be unchanged
+    "~/file"
+    "$VARNAME"                // does NOT handle ${VARNAME}
+    \endcode
+
+    \b Examples:
+    \code
+    #include <fltk3/filename.h>
+    [..]
+    putenv("TMPDIR=/var/tmp");
+    fltk3::filename_expand(out, sizeof(out), "~fred/.cshrc");     // out="/usr/fred/.cshrc"
+    fltk3::filename_expand(out, sizeof(out), "~/.cshrc");         // out="/usr/<yourname>/.cshrc"
+    fltk3::filename_expand(out, sizeof(out), "$TMPDIR/foo.txt");  // out="/var/tmp/foo.txt"
+    \endcode
+    \param[out] to resulting expanded filename
+    \param[in]  tolen size of the expanded filename buffer 
+    \param[in]  from filename containing shell variables
+    \return 0 if no change, non zero otherwise
+ */
+int fltk3::filename_expand(char *to,int tolen, const char *from) {
+
+  char *temp = new char[tolen];
+  strlcpy(temp,from, tolen);
+  char *start = temp;
+  char *end = temp+strlen(temp);
+
+  int ret = 0;
+
+  for (char *a=temp; a<end; ) {	// for each slash component
+    char *e; for (e=a; e<end && !isdirsep(*e); e++); // find next slash
+    const char *value = 0; // this will point at substitute value
+    switch (*a) {
+    case '~':	// a home directory name
+      if (e <= a+1) {	// current user's directory
+        value = fltk3::getenv("HOME");
+#ifndef WIN32
+      } else {	// another user's directory
+	struct passwd *pwd;
+	char t = *e; *(char *)e = 0; 
+        pwd = getpwnam(a+1); 
+        *(char *)e = t;
+	    if (pwd) value = pwd->pw_dir;
+#endif
+      }
+      break;
+    case '$':		/* an environment variable */
+      {char t = *e; *(char *)e = 0; value = fltk3::getenv(a+1); *(char *)e = t;}
+      break;
+    }
+    if (value) {
+      // substitutions that start with slash delete everything before them:
+      if (isdirsep(value[0])) start = a;
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+      // also if it starts with "A:"
+      if (value[0] && value[1]==':') start = a;
+#endif
+      int t = strlen(value); if (isdirsep(value[t-1])) t--;
+      if ((end+1-e+t) >= tolen) end += tolen - (end+1-e+t);
+      memmove(a+t, e, end+1-e);
+      end = a+t+(end-e);
+      *end = '\0';
+      memcpy(a, value, t);
+      ret++;
+    } else {
+      a = e+1;
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+      if (*e == '\\') {*e = '/'; ret++;} // ha ha!
+#endif
+    }
+  }
+
+  strlcpy(to, start, tolen);
+
+  delete[] temp;
+
+  return ret;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_expand.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_ext.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_ext.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_ext.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,58 @@
+//
+// "$Id$"
+//
+// Filename extension routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// returns pointer to the last '.' or to the null if none:
+
+#include <fltk3/filename.h>
+
+/** Gets the extensions of a filename.
+   \code
+   #include <fltk3/filename.h>
+   [..]
+   const char *out;
+   out = fltk3::filename_ext("/some/path/foo.txt");        // result: ".txt"
+   out = fltk3::filename_ext("/some/path/foo");            // result: NULL
+   \endcode
+   \param[in] buf the filename to be parsed
+   \return a pointer to the extension (including '.') if any or NULL otherwise
+ */
+const char *fltk3::filename_ext(const char *buf) {
+  const char *q = 0;
+  const char *p = buf;
+  for (p=buf; *p; p++) {
+    if (*p == '/') q = 0;
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+    else if (*p == '\\') q = 0;
+#endif
+    else if (*p == '.') q = p;
+  }
+  return q ? q : p;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_ext.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_isdir.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_isdir.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_isdir.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,103 @@
+//
+// "$Id$"
+//
+// Directory detection routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Used by fltk3::file_chooser
+
+#include "flstring.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <fltk3/filename.h>
+#include <fltk3/utf8.h>
+
+
+#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
+static inline int isdirsep(char c) {return c=='/' || c=='\\';}
+#else
+#define isdirsep(c) ((c)=='/')
+#endif
+
+int fltk3::_filename_isdir_quick(const char* n) {
+  // Do a quick optimization for filenames with a trailing slash...
+  if (*n && isdirsep(n[strlen(n) - 1])) return 1;
+  return fltk3::filename_isdir(n);
+}
+
+/**
+   Determines if a file exists and is a directory from its filename.
+   \code
+   #include <fltk3/filename.h>
+   [..]
+   fltk3::filename_isdir("/etc");		// returns non-zero
+   fltk3::filename_isdir("/etc/hosts");	// returns 0
+   \endcode
+   \param[in] n the filename to parse
+   \return non zero if file exists and is a directory, zero otherwise
+*/
+int fltk3::filename_isdir(const char* n) {
+  struct stat	s;
+  char		fn[FLTK3_PATH_MAX];
+  int		length;
+
+  length = strlen(n);
+
+#ifdef WIN32
+  // This workaround brought to you by the fine folks at Microsoft!
+  // (read lots of sarcasm in that...)
+  if (length < (int)(sizeof(fn) - 1)) {
+    if (length < 4 && isalpha(n[0]) && n[1] == ':' &&
+        (isdirsep(n[2]) || !n[2])) {
+      // Always use D:/ for drive letters
+      fn[0] = n[0];
+      strcpy(fn + 1, ":/");
+      n = fn;
+    } else if (length > 0 && isdirsep(n[length - 1])) {
+      // Strip trailing slash from name...
+      length --;
+      memcpy(fn, n, length);
+      fn[length] = '\0';
+      n = fn;
+    }
+  }
+#else
+  // Matt: Just in case, we strip the slash for other operating
+  // systems as well, avoid bugs by sloppy implementations
+  // of "stat".
+  if (length > 1 && isdirsep(n[length - 1])) {
+    length --;
+    memcpy(fn, n, length);
+    fn[length] = '\0';
+    n = fn;
+  }
+#endif
+
+  return !fltk3::stat(n, &s) && (s.st_mode&0170000)==0040000;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_isdir.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_list.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_list.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_list.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,206 @@
+//
+// "$Id$"
+//
+// Filename list routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Wrapper for scandir with const-correct function prototypes.
+
+#include <fltk3/filename.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <stdlib.h>
+
+
+extern "C" {
+#ifndef HAVE_SCANDIR
+  int fl_scandir (const char *dir, dirent ***namelist,
+	          int (*select)(dirent *),
+	          int (*compar)(dirent **, dirent **));
+#endif
+}
+
+int fltk3::alphasort(struct dirent **a, struct dirent **b) {
+  return strcmp((*a)->d_name, (*b)->d_name);
+}
+
+int fltk3::casealphasort(struct dirent **a, struct dirent **b) {
+  return strcasecmp((*a)->d_name, (*b)->d_name);
+}
+
+
+/**
+   Portable and const-correct wrapper for the scandir() function. 
+   For each file in that directory a "dirent" structure is created. 
+   The only portable thing about a dirent is that dirent.d_name is the nul-terminated file name. 
+   An pointers array to these dirent's is created and a pointer to the array is returned in *list.
+   The number of entries is given as a return value. 
+   If there is an error reading the directory a number less than zero is returned, 
+   and errno has the reason; errno does not work under WIN32. 
+
+   \b Include:
+   \code
+   #include <fltk3/filename.h>
+   \endcode
+
+   \param[in] d the name of the directory to list.  It does not matter if it has a trailing slash.
+   \param[out] list table containing the resulting directory listing
+   \param[in] sort sorting functor:
+    - fltk3::alphasort: The files are sorted in ascending alphabetical order; 
+        upper and lowercase letters are compared according to their ASCII ordering  uppercase before lowercase.
+    - fltk3::casealphasort: The files are sorted in ascending alphabetical order; 
+        upper and lowercase letters are compared equally case is not significant.
+    - fltk3::casenumericsort: The files are sorted in ascending "alphanumeric" order, where an attempt is made 
+        to put unpadded numbers in consecutive order; upper and lowercase letters 
+        are compared equally case is not significant.
+    - fltk3::numericsort: The files are sorted in ascending "alphanumeric" order, where an attempt is made 
+        to put unpadded numbers in consecutive order; upper and lowercase letters are compared 
+        according to their ASCII ordering - uppercase before lowercase. 
+   \return the number of entries if no error, a negative value otherwise.
+*/
+int fltk3::filename_list(const char *d, dirent ***list,
+                     fltk3::FileSortF *sort) {
+#if defined(WIN32) && !defined(__CYGWIN__) && !defined(HAVE_SCANDIR)
+  // For Windows we have a special scandir implementation that uses
+  // the Win32 "wide" functions for lookup, avoiding the code page mess
+  // entirely. It also fixes up the trailing '/'.
+  return fl_scandir(d, list, 0, sort);
+
+#else // WIN32
+
+  int dirlen;
+  char *dirloc;
+
+  // Assume that locale encoding is no less dense than UTF-8
+  dirlen = strlen(d);
+#ifdef __APPLE__
+  dirloc = (char *)d;
+#else
+  dirloc = (char *)malloc(dirlen + 1);
+  fltk3::utf8to_mb(d, dirlen, dirloc, dirlen + 1);
+#endif
+
+#ifndef HAVE_SCANDIR
+  // This version is when we define our own scandir
+  int n = fl_scandir(dirloc, list, 0, sort);
+#elif defined(HAVE_SCANDIR_POSIX) && !defined(__APPLE__)
+  // POSIX (2008) defines the comparison function like this:
+  int n = scandir(dirloc, list, 0, (int(*)(const dirent **, const dirent **))sort);
+#elif defined(__osf__)
+  // OSF, DU 4.0x
+  int n = scandir(dirloc, list, 0, (int(*)(dirent **, dirent **))sort);
+#elif defined(_AIX)
+  // AIX is almost standard...
+  int n = scandir(dirloc, list, 0, (int(*)(void*, void*))sort);
+#elif defined(__sgi)
+  int n = scandir(dirloc, list, 0, sort);
+#else
+  // The vast majority of UNIX systems want the sort function to have this
+  // prototype, most likely so that it can be passed to qsort without any
+  // changes:
+  int n = scandir(dirloc, list, 0, (int(*)(const void*,const void*))sort);
+#endif
+
+#ifndef __APPLE__
+  free(dirloc);
+#endif
+
+  // convert every filename to utf-8, and append a '/' to all
+  // filenames that are directories
+  int i;
+  char *fullname = (char*)malloc(dirlen+FLTK3_PATH_MAX+3); // Add enough extra for two /'s and a nul
+  // Use memcpy for speed since we already know the length of the string...
+  memcpy(fullname, d, dirlen+1);
+
+  char *name = fullname + dirlen;
+  if (name!=fullname && name[-1]!='/')
+    *name++ = '/';
+
+  for (i=0; i<n; i++) {
+    int newlen;
+    dirent *de = (*list)[i];
+    unsigned int len = strlen(de->d_name);
+#ifdef __APPLE__
+    newlen = len;
+#else
+    newlen = fltk3::utf8from_mb(NULL, 0, de->d_name, len);
+#endif
+    dirent *newde = (dirent*)malloc(de->d_name - (char*)de + newlen + 2); // Add space for a / and a nul
+
+    // Conversion to UTF-8
+    memcpy(newde, de, de->d_name - (char*)de);
+#ifdef __APPLE__
+    strcpy(newde->d_name, de->d_name);
+#else
+    fltk3::utf8from_mb(newde->d_name, newlen + 1, de->d_name, len);
+#endif
+
+    // Check if dir (checks done on "old" name as we need to interact with
+    // the underlying OS)
+    if (de->d_name[len-1]!='/' && len<=FLTK3_PATH_MAX) {
+      // Use memcpy for speed since we already know the length of the string...
+      memcpy(name, de->d_name, len+1);
+      if (fltk3::filename_isdir(fullname)) {
+        char *dst = newde->d_name + newlen;
+        *dst++ = '/';
+        *dst = 0;
+      }
+    }
+
+    free(de);
+    (*list)[i] = newde;
+  }
+  free(fullname);
+
+  return n;
+
+#endif // WIN32
+}
+
+/**
+ \brief Free the list of filenames that is generated by fltk3::filename_list().
+ 
+ Free everything that was allocated by a previous call to fltk3::filename_list().
+ Use the return values as parameters for this function.
+ 
+ \param[in,out] list table containing the resulting directory listing
+ \param[in] n number of entries in the list
+ */
+void fltk3::filename_free_list(struct dirent ***list, int n)
+{
+  if (n<0) return;
+  
+  int i;
+  for (i = 0; i < n; i ++) {
+    if ((*list)[i])
+      free((*list)[i]);
+  }  
+  free(*list);
+  *list = 0;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_list.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_match.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_match.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_match.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,128 @@
+//
+// "$Id$"
+//
+// Pattern matching routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/* Adapted from Rich Salz. */
+#include <fltk3/filename.h>
+#include <ctype.h>
+
+/**
+    Checks if a string \p s matches a pattern \p p. 
+    The following syntax is used for the pattern:
+    - * matches any sequence of 0 or more characters.
+    - ? matches any single character.
+    - [set] matches any character in the set. Set can contain any single characters, or a-z to represent a range. 
+      To match ] or - they must be the first characters. To match ^ or ! they must not be the first characters.
+    - [^set] or [!set] matches any character not in the set.
+    - {X|Y|Z} or {X,Y,Z} matches any one of the subexpressions literally.
+    - \\x quotes the character x so it has no special meaning.
+    - x all other characters must be matched exactly.
+
+    \b Include:
+    \code
+    #include <fltk3/filename.h>
+    \endcode
+
+    \param[in] s the string to check for a match
+    \param[in] p the string pattern 
+    \return non zero if the string matches the pattern
+*/
+int fltk3::filename_match(const char *s, const char *p) {
+  int matched;
+
+  for (;;) {
+    switch(*p++) {
+
+    case '?' :	// match any single character
+      if (!*s++) return 0;
+      break;
+
+    case '*' :	// match 0-n of any characters
+      if (!*p) return 1; // do trailing * quickly
+      while (!fltk3::filename_match(s, p)) if (!*s++) return 0;
+      return 1;
+
+    case '[': {	// match one character in set of form [abc-d] or [^a-b]
+      if (!*s) return 0;
+      int reverse = (*p=='^' || *p=='!'); if (reverse) p++;
+      matched = 0;
+      char last = 0;
+      while (*p) {
+	if (*p=='-' && last) {
+	  if (*s <= *++p && *s >= last ) matched = 1;
+	  last = 0;
+	} else {
+	  if (*s == *p) matched = 1;
+	}
+	last = *p++;
+	if (*p==']') break;
+      }
+      if (matched == reverse) return 0;
+      s++; p++;}
+    break;
+
+    case '{' : // {pattern1|pattern2|pattern3}
+    NEXTCASE:
+    if (fltk3::filename_match(s,p)) return 1;
+    for (matched = 0;;) {
+      switch (*p++) {
+      case '\\': if (*p) p++; break;
+      case '{': matched++; break;
+      case '}': if (!matched--) return 0; break;
+      case '|': case ',': if (matched==0) goto NEXTCASE;
+      case 0: return 0;
+      }
+    }
+    case '|':	// skip rest of |pattern|pattern} when called recursively
+    case ',':
+      for (matched = 0; *p && matched >= 0;) {
+	switch (*p++) {
+	case '\\': if (*p) p++; break;
+	case '{': matched++; break;
+	case '}': matched--; break;
+	}
+      }
+      break;
+    case '}':
+      break;
+
+    case 0:	// end of pattern
+      return !*s;
+
+    case '\\':	// quote next character
+      if (*p) p++;
+      /* FALLTHROUGH */
+    default:
+      if (tolower(*s) != tolower(*(p-1))) return 0;
+      s++;
+      break;
+    }
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_match.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/filename_setext.cxx
===================================================================
--- branches/branch-3.0/src/core/filename_setext.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/filename_setext.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,60 @@
+//
+// "$Id$"
+//
+// Filename extension routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Replace .ext with new extension
+
+#include <fltk3/filename.h>
+#include "flstring.h"
+
+/**
+   Replaces the extension in \p buf of max.<br>
+   size \p buflen with the extension in \p ext.<br>
+   If there's no '.' in \p buf, \p ext is appended.<br>
+   If \p ext is NULL, behaves as if it were an empty string ("").
+
+   \b Example
+   \code
+   #include <fltk3/filename.h>
+   [..]
+   char buf[FLTK3_PATH_MAX] = "/path/myfile.cxx";
+   fltk3::filename_setext(buf, sizeof(buf), ".txt");      // buf[] becomes "/path/myfile.txt"
+   \endcode
+
+   \return buf itself for calling convenience.
+*/
+char *fltk3::filename_setext(char *buf, int buflen, const char *ext) {
+  char *q = (char *)fltk3::filename_ext(buf);
+  if (ext) {
+    strlcpy(q,ext,buflen - (q - buf));
+  } else *q = 0;
+  return(buf);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/filename_setext.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_arc.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_arc.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_arc.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,91 @@
+//
+// "$Id$"
+//
+// Arc functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_arc.cxx
+  \brief Utility functions for drawing arcs and circles.
+*/
+
+// Utility for drawing arcs and circles.  They are added to
+// the current fl_begin/fltk3::vertex/fl_end path.
+// Incremental math implementation:
+
+#include <fltk3/draw.h>
+#include <fltk3/math.h>
+
+// avoid problems with some platforms that don't 
+// implement hypot.
+static double _fl_hypot(double x, double y) {
+  return sqrt(x*x + y*y);
+}
+
+void fltk3::GraphicsDriver::arc(double x, double y, double r, double start, double end) {
+
+  // draw start point accurately:
+  
+  double A = start*(M_PI/180);		// Initial angle (radians)
+  double X =  r*cos(A);			// Initial displacement, (X,Y)
+  double Y = -r*sin(A);			//   from center to initial point
+  fltk3::vertex(x+X,y+Y);			// Insert initial point
+
+  // Maximum arc length to approximate with chord with error <= 0.125
+  
+  double epsilon; {
+    double r1 = _fl_hypot(fltk3::transform_dx(r,0), // Horizontal "radius"
+		          fltk3::transform_dy(r,0));
+    double r2 = _fl_hypot(fltk3::transform_dx(0,r), // Vertical "radius"
+		          fltk3::transform_dy(0,r));
+		      
+    if (r1 > r2) r1 = r2;		// r1 = minimum "radius"
+    if (r1 < 2.) r1 = 2.;		// radius for circa 9 chords/circle
+    
+    epsilon = 2*acos(1.0 - 0.125/r1);	// Maximum arc angle
+  }
+  A = end*(M_PI/180) - A;		// Displacement angle (radians)
+  int i = int(ceil(fabs(A)/epsilon));	// Segments in approximation
+  
+  if (i) {
+    epsilon = A/i;			// Arc length for equal-size steps
+    double cos_e = cos(epsilon);	// Rotation coefficients
+    double sin_e = sin(epsilon);
+    do {
+      double Xnew =  cos_e*X + sin_e*Y;
+		Y = -sin_e*X + cos_e*Y;
+      fltk3::vertex(x + (X=Xnew), y + Y);
+    } while (--i);
+  }
+}
+
+#if 0 // portable version.  X-specific one in fltk3::vertex.cxx
+void fltk3::circle(double x,double y,double r) {
+  _fl_arc(x, y, r, r, 0, 360);
+}
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_arc.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_arci.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_arci.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_arci.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,131 @@
+//
+// "$Id$"
+//
+// Arc (integer) drawing functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_arci.cxx
+  \brief Utility functions for drawing circles using integers
+*/
+
+// "integer" circle drawing functions.  These draw the limited
+// circle types provided by X and NT graphics.  The advantage of
+// these is that small ones draw quite nicely (probably due to stored
+// hand-drawn bitmaps of small circles!) and may be implemented by
+// hardware and thus are fast.
+
+// Probably should add fltk3::chord.
+
+// 3/10/98: created
+
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#ifdef WIN32
+#  include <fltk3/math.h>
+#endif
+#include <config.h>
+
+void fltk3::GraphicsDriver::arc(int x,int y,int w,int h,double a1,double a2) {
+  if (w <= 0 || h <= 0) return;
+
+#if defined(USE_X11)
+  XDrawArc(fl_display, fl_window, fl_gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64));
+#elif defined(WIN32)
+  int xa = x+w/2+int(w*cos(a1/180.0*M_PI));
+  int ya = y+h/2-int(h*sin(a1/180.0*M_PI));
+  int xb = x+w/2+int(w*cos(a2/180.0*M_PI));
+  int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
+  if (fabs(a1 - a2) < 90) {
+    if (xa == xb && ya == yb) SetPixel(fl_gc, xa, ya, fl_RGB());
+    else Arc(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb);
+  } else Arc(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb);
+#elif defined(__APPLE_QUARTZ__)
+  a1 = (-a1)/180.0f*M_PI; a2 = (-a2)/180.0f*M_PI;
+  float cx = x + 0.5f*w - 0.5f, cy = y + 0.5f*h - 0.5f;
+  CGContextSetShouldAntialias(fl_gc, true);
+  if (w!=h) {
+    CGContextSaveGState(fl_gc);
+    CGContextTranslateCTM(fl_gc, cx, cy);
+    CGContextScaleCTM(fl_gc, w-1.0f, h-1.0f);
+    CGContextAddArc(fl_gc, 0, 0, 0.5, a1, a2, 1);
+    CGContextRestoreGState(fl_gc);
+  } else {
+    float r = (w+h)*0.25f-0.5f;
+    CGContextAddArc(fl_gc, cx, cy, r, a1, a2, 1);
+  }
+  CGContextStrokePath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::pie(int x,int y,int w,int h,double a1,double a2) {
+  if (w <= 0 || h <= 0) return;
+
+#if defined(USE_X11)
+  XFillArc(fl_display, fl_window, fl_gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64));
+#elif defined(WIN32)
+  if (a1 == a2) return;
+  int xa = x+w/2+int(w*cos(a1/180.0*M_PI));
+  int ya = y+h/2-int(h*sin(a1/180.0*M_PI));
+  int xb = x+w/2+int(w*cos(a2/180.0*M_PI));
+  int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
+  SelectObject(fl_gc, fl_brush());
+  if (fabs(a1 - a2) < 90) {
+    if (xa == xb && ya == yb) {
+      MoveToEx(fl_gc, x+w/2, y+h/2, 0L); 
+      LineTo(fl_gc, xa, ya);
+      SetPixel(fl_gc, xa, ya, fl_RGB());
+    } else Pie(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb);
+  } else Pie(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb); 
+#elif defined(__APPLE_QUARTZ__)
+  a1 = (-a1)/180.0f*M_PI; a2 = (-a2)/180.0f*M_PI;
+  float cx = x + 0.5f*w - 0.5f, cy = y + 0.5f*h - 0.5f;
+  CGContextSetShouldAntialias(fl_gc, true);
+  if (w!=h) {
+    CGContextSaveGState(fl_gc);
+    CGContextTranslateCTM(fl_gc, cx, cy);
+    CGContextScaleCTM(fl_gc, w, h);
+    CGContextAddArc(fl_gc, 0, 0, 0.5, a1, a2, 1);
+    CGContextAddLineToPoint(fl_gc, 0, 0);
+    CGContextClosePath(fl_gc);
+    CGContextRestoreGState(fl_gc);
+  } else {
+    float r = (w+h)*0.25f;
+    CGContextAddArc(fl_gc, cx, cy, r, a1, a2, 1);
+    CGContextAddLineToPoint(fl_gc, cx, cy);
+    CGContextClosePath(fl_gc);
+  }
+  CGContextFillPath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_arci.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_ask.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_ask.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_ask.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,579 @@
+//
+// "$Id$"
+//
+// Standard dialog functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Implementation of fltk3::message, fltk3::ask, fltk3::choice, fltk3::input
+// The three-message fl_show_x functions are for forms compatibility
+// mostly.  In most cases it is easier to get a multi-line message
+// by putting newlines in the message.
+
+#include <stdio.h>
+#include <stdarg.h>
+#include "flstring.h"
+
+#include <fltk3/run.h>
+
+#include <fltk3/ask.h>
+
+#include <fltk3/Box.h>
+#include <fltk3/Button.h>
+#include <fltk3/ReturnButton.h>
+#include <fltk3/Window.h>
+#include <fltk3/Input.h>
+#include <fltk3/SecretInput.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+
+static fltk3::Window *message_form;
+static fltk3::Box *message;
+static fltk3::Box *icon;
+static fltk3::Button *button[3];
+static fltk3::Input *input;
+static int ret_val;
+static const char *iconlabel = "?";
+static const char *message_title_default_;
+fltk3::Font fltk3::message_font_ = fltk3::HELVETICA;
+fltk3::Fontsize fltk3::message_size_ = -1;
+static int enableHotspot = 1;
+#ifdef __APPLE__
+extern "C" void NSBeep(void);
+#endif
+
+static char avoidRecursion = 0;
+
+// Sets the global return value (ret_val) and closes the window.
+// Note: this is used for the button callbacks and the window
+// callback (closing the window with the close button or menu).
+// The first argument (fltk3::Widget *) can either be an fltk3::Button*
+// pointer to one of the buttons or an fltk3::Window* pointer to the
+// message window (message_form).
+static void button_cb(fltk3::Widget *, void *val) {
+  ret_val = (fl_intptr_t)val;
+  message_form->hide();
+}
+
+static fltk3::Window *makeform() {
+ if (message_form) {
+   message_form->size(410,103);
+   return message_form;
+ }
+ // make sure that the dialog does not become the child of some
+ // current group
+ fltk3::Group *previously_current_group = fltk3::Group::current();
+ fltk3::Group::current(0);
+ // create a new top level window
+ fltk3::Window *w = message_form = new fltk3::Window(410,103);
+ message_form->callback(button_cb,(void *)0);
+ // w->clear_border();
+ // w->box(fltk3::UP_BOX);
+ (message = new fltk3::Box(60, 25, 340, 20))
+   ->align(fltk3::ALIGN_LEFT|fltk3::ALIGN_INSIDE|fltk3::ALIGN_WRAP);
+ (input = new fltk3::Input(60, 37, 340, 23))->hide();
+ {fltk3::Box* o = icon = new fltk3::Box(10, 10, 50, 50);
+  o->box(fltk3::THIN_UP_BOX);
+  o->labelfont(fltk3::TIMES_BOLD);
+  o->labelsize(34);
+  o->color(fltk3::WHITE);
+  o->labelcolor(fltk3::BLUE);
+ }
+ w->end(); // don't add the buttons automatically
+ // create the buttons (right to left)
+ int b, x;
+ for (b=0, x=310; b<3; b++, x -= 100) {
+   if (b==1)
+     button[b] = new fltk3::ReturnButton(x, 70, 90, 23);
+   else
+     button[b] = new fltk3::Button(x, 70, 90, 23);
+   button[b]->align(fltk3::ALIGN_INSIDE|fltk3::ALIGN_WRAP);
+   button[b]->callback(button_cb,(void *)b);
+ }
+ button[0]->shortcut(fltk3::EscapeKey);
+ // add the buttons (left to right)
+ for (b=2; b>=0; b--)
+   w->add(button[b]);
+ w->begin();
+ w->resizable(new fltk3::Box(60,10,110-60,27));
+ w->end();
+ w->set_modal();
+ fltk3::Group::current(previously_current_group);
+ return w;
+}
+
+/*
+ * 'resizeform()' - Resize the form and widgets so that they hold everything
+ *                  that is asked of them...
+ */
+
+void resizeform() {
+  int	i;
+  int	message_w, message_h;
+  int	text_height;
+  int	button_w[3], button_h[3];
+  int	x, w, h, max_w, max_h;
+	const int icon_size = 50;
+
+  fltk3::font(message->labelfont(), message->labelsize());
+  message_w = message_h = 0;
+  fltk3::measure(message->label(), message_w, message_h);
+
+  message_w += 10;
+  message_h += 10;
+  if (message_w < 340)
+    message_w = 340;
+  if (message_h < 30)
+    message_h = 30;
+
+  fltk3::font(button[0]->labelfont(), button[0]->labelsize());
+
+  memset(button_w, 0, sizeof(button_w));
+  memset(button_h, 0, sizeof(button_h));
+
+  for (max_h = 25, i = 0; i < 3; i ++)
+    if (button[i]->visible())
+    {
+      fltk3::measure(button[i]->label(), button_w[i], button_h[i]);
+
+      if (i == 1)
+        button_w[1] += 20;
+
+      button_w[i] += 30;
+      button_h[i] += 10;
+
+      if (button_h[i] > max_h)
+        max_h = button_h[i];
+    }
+
+  if (input->visible()) text_height = message_h + 25;
+  else text_height = message_h;
+
+  max_w = message_w + 10 + icon_size;
+  w     = button_w[0] + button_w[1] + button_w[2] - 10;
+
+  if (w > max_w)
+    max_w = w;
+
+  message_w = max_w - 10 - icon_size;
+
+  w = max_w + 20;
+  h = max_h + 30 + text_height;
+
+  message_form->size(w, h);
+  message_form->size_range(w, h, w, h);
+
+  message->resize(20 + icon_size, 10, message_w, message_h);
+  icon->resize(10, 10, icon_size, icon_size);
+  icon->labelsize(icon_size - 10);
+  input->resize(20 + icon_size, 10 + message_h, message_w, 25);
+
+  for (x = w, i = 0; i < 3; i ++)
+    if (button_w[i])
+    {
+      x -= button_w[i];
+      button[i]->resize(x, h - 10 - max_h, button_w[i] - 10, max_h);
+
+//      printf("button %d (%s) is %dx%d+%d,%d\n", i, button[i]->label(),
+//             button[i]->w(), button[i]->h(),
+//	     button[i]->x(), button[i]->y());
+    }
+}
+
+static int innards(const char* fmt, va_list ap,
+  const char *b0,
+  const char *b1,
+  const char *b2)
+{
+  fltk3::pushed(0); // stop dragging (STR #2159)
+
+  avoidRecursion = 1;
+
+  makeform();
+  char buffer[1024];
+  if (!strcmp(fmt,"%s")) {
+    message->label(va_arg(ap, const char*));
+  } else {
+    ::vsnprintf(buffer, 1024, fmt, ap);
+    message->label(buffer);
+  }
+
+  message->labelfont(fltk3::message_font_);
+  if (fltk3::message_size_ == -1)
+    message->labelsize(fltk3::NORMAL_SIZE);
+  else
+    message->labelsize(fltk3::message_size_);
+  if (b0) {button[0]->show(); button[0]->label(b0); button[1]->position(210,70);}
+  else {button[0]->hide(); button[1]->position(310,70);}
+  if (b1) {button[1]->show(); button[1]->label(b1);}
+  else button[1]->hide();
+  if (b2) {button[2]->show(); button[2]->label(b2);}
+  else button[2]->hide();
+  const char* prev_icon_label = icon->label();
+  if (!prev_icon_label) icon->label(iconlabel);
+
+  resizeform();
+
+  if (button[1]->visible() && !input->visible())
+    button[1]->take_focus();
+  if (enableHotspot)
+    message_form->hotspot(button[0]);
+  if (b0 && fltk3::Widget::label_shortcut(b0))
+    button[0]->shortcut((unsigned)0);
+  else
+    button[0]->shortcut(fltk3::EscapeKey);
+
+  // set default window title, if defined and a specific title is not set
+  if (!message_form->label() && message_title_default_)
+    message_form->label(message_title_default_);
+
+  // deactivate fltk3::grab(), because it is incompatible with modal windows
+  fltk3::Window* g = fltk3::grab();
+  if (g) fltk3::grab(0);
+  message_form->show();
+  while (message_form->shown()) fltk3::wait();
+  if (g) // regrab the previous popup menu, if there was one
+    fltk3::grab(g);
+  icon->label(prev_icon_label);
+  message_form->label(0); // reset window title
+
+  avoidRecursion = 0;
+  return ret_val;
+}
+
+ /** \addtogroup group_comdlg
+    @{ */
+
+// pointers you can use to change FLTK to another language:
+const char* fltk3::no = "No";        ///< string pointer used in common dialogs, you can change it to another language
+const char* fltk3::yes= "Yes";       ///< string pointer used in common dialogs, you can change it to another language
+const char* fltk3::ok = "OK";        ///< string pointer used in common dialogs, you can change it to another language
+const char* fltk3::cancel= "Cancel"; ///< string pointer used in common dialogs, you can change it to another language
+const char* fltk3::close= "Close";   ///< string pointer used in common dialogs, you can change it to another language
+
+// fltk functions:
+/**
+   Emits a system beep message.
+   \note \#include <fltk3/ask.h>
+ */
+void fltk3::beep(int type) {
+#ifdef WIN32
+  switch (type) {
+    case fltk3::BEEP_QUESTION :
+    case fltk3::BEEP_PASSWORD :
+      MessageBeep(MB_ICONQUESTION);
+      break;
+    case fltk3::BEEP_MESSAGE :
+      MessageBeep(MB_ICONASTERISK);
+      break;
+    case fltk3::BEEP_NOTIFICATION :
+      MessageBeep(MB_ICONASTERISK);
+      break;
+    case fltk3::BEEP_ERROR :
+      MessageBeep(MB_ICONERROR);
+      break;
+    default :
+      MessageBeep(0xFFFFFFFF);
+      break;
+  }
+#elif defined(__APPLE__)
+  switch (type) {
+    case fltk3::BEEP_DEFAULT :
+    case fltk3::BEEP_ERROR :
+      NSBeep();
+      break;
+    default :
+      break;
+  }
+#else
+  switch (type) {
+    case fltk3::BEEP_DEFAULT :
+    case fltk3::BEEP_ERROR :
+      if (!fl_display) fl_open_display();
+
+      XBell(fl_display, 100);
+      break;
+    default :
+      if (!fl_display) fl_open_display();
+
+      XBell(fl_display, 50);
+      break;
+  }
+#endif // WIN32
+}
+
+/** Shows an information message dialog box.
+
+   \note Common dialog boxes are application modal. No more than one common dialog box
+   can be open at any time. Requests for additional dialog boxes are ignored.
+   \note \#include <fltk3/ask.h>
+
+
+   \param[in] fmt can be used as an sprintf-like format and variables for the message text
+ */
+void fltk3::message(const char *fmt, ...) {
+  va_list ap;
+  va_start(ap, fmt);
+  vmessage(fmt, ap);
+  va_end(ap);
+}
+
+void fltk3::vmessage(const char *fmt, va_list ap) {
+  if (avoidRecursion) return;
+  fltk3::beep(fltk3::BEEP_MESSAGE);
+  iconlabel = "i";
+  innards(fmt, ap, 0, fltk3::close, 0);
+  iconlabel = "?";
+}
+
+/** Shows an alert message dialog box
+
+   \note Common dialog boxes are application modal. No more than one common dialog box
+   can be open at any time. Requests for additional dialog boxes are ignored.
+   \note \#include <fltk3/ask.h>
+
+   \param[in] fmt can be used as an sprintf-like format and variables for the message text
+ */
+void fltk3::alert(const char *fmt, ...) {
+  va_list ap;
+  va_start(ap, fmt);
+  valert(fmt, ap);
+  va_end(ap);
+}
+
+void fltk3::valert(const char *fmt, va_list ap) {
+  if (avoidRecursion) return;
+  fltk3::beep(fltk3::BEEP_ERROR);
+  iconlabel = "!";
+  innards(fmt, ap, 0, fltk3::close, 0);
+  iconlabel = "?";
+}
+
+/** Shows a dialog displaying the \p fmt message,
+    this dialog features 2 yes/no buttons
+
+   \note Common dialog boxes are application modal. No more than one common dialog box
+   can be open at any time. Requests for additional dialog boxes are ignored.
+   \note \#include <fltk3/ask.h>
+
+   \param[in] fmt can be used as an sprintf-like format and variables for the message text
+   \retval 0 if the no button is selected or another dialog box is still open
+   \retval 1 if yes is selected
+ */
+int fltk3::ask(const char *fmt, ...) {
+  va_list ap;
+  va_start(ap, fmt);
+  int ret = vask(fmt, ap);
+  va_end(ap);
+  return ret;
+}
+
+int fltk3::vask(const char *fmt, va_list ap) {
+  if (avoidRecursion) return 0;
+  fltk3::beep(fltk3::BEEP_QUESTION);
+  int r = innards(fmt, ap, fltk3::no, fltk3::yes, 0);
+  return r;
+}
+
+/** Shows a dialog displaying the \p fmt message,
+    this dialog features up to 3 customizable choice buttons
+
+   \note Common dialog boxes are application modal. No more than one common dialog box
+    can be open at any time. Requests for additional dialog boxes are ignored.
+   \note \#include <fltk3/ask.h>
+
+   \param[in] fmt can be used as an sprintf-like format and variables for the message text
+   \param[in] b0 text label of button 0
+   \param[in] b1 text label of button 1
+   \param[in] b2 text label of button 2
+   \retval 0 if the first button with \p b0 text is selected or another dialog box is still open
+   \retval 1 if the second button with \p b1 text is selected
+   \retval 2 if the third button with \p b2 text is selected
+ */
+int fltk3::choice(const char*fmt,const char *b0,const char *b1,const char *b2,...) {
+  va_list ap;
+  va_start(ap, b2);
+  int ret = vchoice(fmt, b0, b1, b2, ap);
+  va_end(ap);
+  return ret;
+}
+  
+int fltk3::vchoice(const char*fmt,const char *b0,const char *b1,const char *b2, va_list ap) {
+  if (avoidRecursion) return 0;
+  fltk3::beep(fltk3::BEEP_QUESTION);
+  int r = innards(fmt, ap, b0, b1, b2);
+  return r;
+}
+
+/** Gets the fltk3::Box icon container of the current default dialog used in
+    many common dialogs like fltk3::message(), fltk3::alert(),
+    fltk3::ask(), fltk3::choice(), fltk3::input(), fltk3::password()
+    \note \#include <fltk3/ask.h>
+*/
+fltk3::Widget *fltk3::message_icon() {makeform(); return icon;}
+
+static const char* input_innards(const char* fmt, va_list ap,
+				 const char* defstr, uchar type) {
+  makeform();
+  message->position(60,10);
+  input->type(type);
+  input->show();
+  input->value(defstr);
+  input->take_focus();
+
+  int r = innards(fmt, ap, fltk3::cancel, fltk3::ok, 0);
+  input->hide();
+  message->position(60,25);
+  return r ? input->value() : 0;
+}
+
+/** Shows an input dialog displaying the \p fmt message
+
+   \note Common dialog boxes are application modal. No more than one common dialog box
+   can be open at any time. Requests for additional dialog boxes are ignored.
+   \note \#include <fltk3/ask.h>
+
+   \param[in] fmt can be used as an sprintf-like format and variables for the message text
+   \param[in] defstr defines the default returned string if no text is entered
+   \return the user string input if OK was pushed, NULL if Cancel was pushed or another dialog box was still open
+ */
+const char* fltk3::input(const char *fmt, const char *defstr, ...) {
+  va_list ap;
+  va_start(ap, defstr);
+  const char *ret = vinput(fmt, defstr, ap);
+  va_end(ap);
+  return ret;
+}
+
+const char* fltk3::vinput(const char *fmt, const char *defstr, va_list ap) {
+  if (avoidRecursion) return 0;
+  fltk3::beep(fltk3::BEEP_QUESTION);
+  const char* r = input_innards(fmt, ap, defstr, fltk3::NORMAL_INPUT);
+  return r;
+}
+
+/** Shows an input dialog displaying the \p fmt message.
+
+    Like fltk3::input() except the input text is not shown,
+    '*' characters are displayed instead.
+
+   \note Common dialog boxes are application modal. No more than one common dialog box
+   can be open at any time. Requests for additional dialog boxes are ignored.
+   \note \#include <fltk3/ask.h>
+
+   \param[in] fmt can be used as an sprintf-like format and variables for the message text
+   \param[in] defstr defines the default returned string if no text is entered
+   \return the user string input if OK was pushed, NULL if Cancel was pushed or aother dialog box was still open
+ */
+const char *fltk3::password(const char *fmt, const char *defstr, ...) {
+  va_list ap;
+  va_start(ap, defstr);
+  const char *ret = vpassword(fmt, defstr, ap);
+  va_end(ap);
+  return ret;
+}
+
+const char *fltk3::vpassword(const char *fmt, const char *defstr, va_list ap) {
+  if (avoidRecursion) return 0;
+  fltk3::beep(fltk3::BEEP_PASSWORD);
+  const char* r = input_innards(fmt, ap, defstr, fltk3::SECRET_INPUT);
+  return r;
+}
+
+/** Sets whether or not to move the common message box used in
+    many common dialogs like fltk3::message(), fltk3::alert(),
+    fltk3::ask(), fltk3::choice(), fltk3::input(), fltk3::password() to follow
+    the mouse pointer.
+
+    The default is \e enabled, so that the default button is the
+    hotspot and appears at the mouse position.
+    \note \#include <fltk3/ask.h>
+    \param[in]	enable	non-zero enables hotspot behavior,
+			0 disables hotspot
+ */
+void fltk3::message_hotspot(int enable) {
+  enableHotspot = enable ? 1 : 0;
+}
+
+/** Gets whether or not to move the common message box used in
+    many common dialogs like fltk3::message(), fltk3::alert(),
+    fltk3::ask(), fltk3::choice(), fltk3::input(), fltk3::password() to follow
+    the mouse pointer.
+    \note \#include <fltk3/ask.h>
+    \return	0 if disable, non-zero otherwise
+    \see fltk3::message_hotspot(int)
+ */
+int fltk3::message_hotspot(void) {
+  return enableHotspot;
+}
+
+/** Sets the title of the dialog window used in many common dialogs.
+
+    This window \p title will be used in the next call of one of the
+    common dialogs like fltk3::message(), fltk3::alert(), fltk3::ask(), fltk3::choice(),
+    fltk3::input(), fltk3::password().
+
+    The \p title string is copied internally, so that you can use a
+    local variable or free the string immediately after this call. It
+    applies only to the \b next call of one of the common dialogs and
+    will be reset to an empty title (the default for all dialogs) after
+    that call.
+
+    \note \#include <fltk3/ask.h>
+    \param[in] title	window label, string copied internally
+*/
+void fltk3::message_title(const char *title) {
+  makeform();
+  message_form->copy_label(title);
+}
+
+/** Sets the default title of the dialog window used in many common dialogs.
+
+    This window \p title will be used in all subsequent calls of one of the
+    common dialogs like fltk3::message(), fltk3::alert(), fltk3::ask(), fltk3::choice(),
+    fltk3::input(), fltk3::password(), unless a specific title has been set
+    with fltk3::message_title(const char *title).
+    
+    The default is no title. You can override the default title for a
+    single dialog with fltk3::message_title(const char *title).
+
+    The \p title string is copied internally, so that you can use a
+    local variable or free the string immediately after this call.
+
+    \note \#include <fltk3/ask.h>
+    \param[in] title	default window label, string copied internally
+*/
+void fltk3::message_title_default(const char *title) {
+  if (message_title_default_) {
+    free ((void *)message_title_default);
+    message_title_default_ = 0;
+  }
+  if (title)
+    message_title_default_ = strdup(title);
+}
+
+/** @} */
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_ask.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_boxtype.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_boxtype.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_boxtype.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,472 @@
+//
+// "$Id$"
+//
+// Box drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_boxtype.cxx
+  \brief drawing code for common box types.
+*/
+
+// Box drawing code for the common box types and the table of
+// boxtypes.  Other box types are in separate files so they are not
+// linked in if not used.
+
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/draw.h>
+#include <config.h>
+
+////////////////////////////////////////////////////////////////
+
+static uchar active_ramp[24] = {
+  fltk3::GRAY_RAMP+0, fltk3::GRAY_RAMP+1, fltk3::GRAY_RAMP+2, fltk3::GRAY_RAMP+3,
+  fltk3::GRAY_RAMP+4, fltk3::GRAY_RAMP+5, fltk3::GRAY_RAMP+6, fltk3::GRAY_RAMP+7,
+  fltk3::GRAY_RAMP+8, fltk3::GRAY_RAMP+9, fltk3::GRAY_RAMP+10,fltk3::GRAY_RAMP+11,
+  fltk3::GRAY_RAMP+12,fltk3::GRAY_RAMP+13,fltk3::GRAY_RAMP+14,fltk3::GRAY_RAMP+15,
+  fltk3::GRAY_RAMP+16,fltk3::GRAY_RAMP+17,fltk3::GRAY_RAMP+18,fltk3::GRAY_RAMP+19,
+  fltk3::GRAY_RAMP+20,fltk3::GRAY_RAMP+21,fltk3::GRAY_RAMP+22,fltk3::GRAY_RAMP+23};
+static uchar inactive_ramp[24] = {
+  43, 43, 44, 44,
+  44, 45, 45, 46,
+  46, 46, 47, 47,
+  48, 48, 48, 49,
+  49, 49, 50, 50,
+  51, 51, 52, 52};
+static int draw_it_active = 1;
+
+/**
+  Determines if the current draw box is active or inactive. 
+  If inactive, the box color is changed by the inactive color.
+*/
+int fltk3::draw_box_active() { return draw_it_active; }
+
+namespace fltk3 {
+  uchar *gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';}
+}
+
+/**
+  Draws a series of line segments around the given box.
+  The string \p s must contain groups of 4 letters which specify one of 24
+  standard grayscale values, where 'A' is black and 'X' is white.
+  The order of each set of 4 characters is: top, left, bottom, right.
+  The result of calling fltk3::frame() with a string that is not a multiple
+  of 4 characters in length is undefined.
+  The only difference between this function and fltk3::frame2() is the order
+  of the line segments.
+  \param[in] s sets of 4 grayscale values in top, left, bottom, right order
+  \param[in] x, y, w, h position and size
+*/
+void fltk3::frame(const char* s, int x, int y, int w, int h) {
+  uchar *g = fltk3::gray_ramp();
+  if (h > 0 && w > 0) for (;*s;) {
+    // draw top line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::xyline(x, y, x+w-1);
+    y++; if (--h <= 0) break;
+    // draw left line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::yxline(x, y+h-1, y);
+    x++; if (--w <= 0) break;
+    // draw bottom line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::xyline(x, y+h-1, x+w-1);
+    if (--h <= 0) break;
+    // draw right line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::yxline(x+w-1, y+h-1, y);
+    if (--w <= 0) break;
+  }
+}
+
+/**
+  Draws a series of line segments around the given box.
+  The string \p s must contain groups of 4 letters which specify one of 24
+  standard grayscale values, where 'A' is black and 'X' is white.
+  The order of each set of 4 characters is: bottom, right, top, left.
+  The result of calling fltk3::frame2() with a string that is not a multiple
+  of 4 characters in length is undefined.
+  The only difference between this function and fltk3::frame() is the order
+  of the line segments.
+  \param[in] s sets of 4 grayscale values in bottom, right, top, left order
+  \param[in] x, y, w, h position and size
+*/
+void fltk3::frame2(const char* s, int x, int y, int w, int h) {
+  uchar *g = fltk3::gray_ramp();
+  if (h > 0 && w > 0) for (;*s;) {
+    // draw bottom line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::xyline(x, y+h-1, x+w-1);
+    if (--h <= 0) break;
+    // draw right line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::yxline(x+w-1, y+h-1, y);
+    if (--w <= 0) break;
+    // draw top line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::xyline(x, y, x+w-1);
+    y++; if (--h <= 0) break;
+    // draw left line:
+    fltk3::color(g[(int)*s++]);
+    fltk3::yxline(x, y+h-1, y);
+    x++; if (--w <= 0) break;
+  }
+}
+
+/** Draws a box of type fltk3::NO_BOX */
+void fl_no_box(int, int, int, int, fltk3::Color) {}
+
+/** Draws a frame of type fltk3::THIN_DOWN_FRAME */
+void fl_thin_down_frame(int x, int y, int w, int h, fltk3::Color) {
+  fltk3::frame2("WWHH",x,y,w,h);
+}
+
+/** Draws a box of type fltk3::THIN_DOWN_BOX */
+void fl_thin_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_thin_down_frame(x,y,w,h,c);
+  fltk3::color(draw_it_active ? c : fltk3::inactive(c));
+  fltk3::rectf(x+1, y+1, w-2, h-2);
+}
+
+/** Draws a frame of type fltk3::THIN_UP_FRAME */
+void fl_thin_up_frame(int x, int y, int w, int h, fltk3::Color) {
+  fltk3::frame2("HHWW",x,y,w,h);
+}
+
+/** Draws a box of type fltk3::THIN_UP_BOX */
+void fl_thin_up_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_thin_up_frame(x,y,w,h,c);
+  fltk3::color(draw_it_active ? c : fltk3::inactive(c));
+  fltk3::rectf(x+1, y+1, w-2, h-2);
+}
+
+/** Draws a frame of type fltk3::UP_FRAME */
+void fl_up_frame(int x, int y, int w, int h, fltk3::Color) {
+#if BORDER_WIDTH == 1
+  fltk3::frame2("HHWW",x,y,w,h);
+#else
+#if BORDER_WIDTH == 2
+  fltk3::frame2("AAWWMMTT",x,y,w,h);
+#else
+  fltk3::frame("AAAAWWJJUTNN",x,y,w,h);
+#endif
+#endif
+}
+
+#define D1 BORDER_WIDTH
+#define D2 (BORDER_WIDTH+BORDER_WIDTH)
+
+/** Draws a box of type fltk3::UP_BOX */
+void fl_up_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_up_frame(x,y,w,h,c);
+  fltk3::color(draw_it_active ? c : fltk3::inactive(c));
+  fltk3::rectf(x+D1, y+D1, w-D2, h-D2);
+}
+
+/** Draws a frame of type fltk3::DOWN_FRAME */
+void fl_down_frame(int x, int y, int w, int h, fltk3::Color) {
+#if BORDER_WIDTH == 1
+  fltk3::frame2("WWHH",x,y,w,h);
+#else
+#if BORDER_WIDTH == 2
+  fltk3::frame2("WWMMPPAA",x,y,w,h);
+#else
+  fltk3::frame("NNTUJJWWAAAA",x,y,w,h);
+#endif
+#endif
+}
+
+/** Draws a box of type fltk3::DOWN_BOX */
+void fl_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_down_frame(x,y,w,h,c);
+  fltk3::color(c); fltk3::rectf(x+D1, y+D1, w-D2, h-D2);
+}
+
+/** Draws a frame of type fltk3::ENGRAVED_FRAME */
+void fl_engraved_frame(int x, int y, int w, int h, fltk3::Color) {
+  fltk3::frame("HHWWWWHH",x,y,w,h);
+}
+
+/** Draws a box of type fltk3::ENGRAVED_BOX */
+void fl_engraved_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_engraved_frame(x,y,w,h,c);
+  fltk3::color(draw_it_active ? c : fltk3::inactive(c));
+  fltk3::rectf(x+2, y+2, w-4, h-4);
+}
+
+/** Draws a frame of type fltk3::EMBOSSED_FRAME */
+void fl_embossed_frame(int x, int y, int w, int h, fltk3::Color) {
+  fltk3::frame("WWHHHHWW",x,y,w,h);
+}
+
+/** Draws a box of type fltk3::EMBOSSED_BOX */
+void fl_embossed_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_embossed_frame(x,y,w,h,c);
+  fltk3::color(draw_it_active ? c : fltk3::inactive(c));
+  fltk3::rectf(x+2, y+2, w-4, h-4);
+}
+
+/**
+  Draws a bounded rectangle with a given position, size and color.
+  Equivalent to drawing a box of type fltk3::BORDER_BOX.
+*/
+void fl_rectbound(int x, int y, int w, int h, fltk3::Color bgcolor) {
+  fltk3::color(draw_it_active ? fltk3::BLACK : fltk3::inactive(fltk3::BLACK));
+  fltk3::rect(x, y, w, h);
+  fltk3::color(draw_it_active ? bgcolor : fltk3::inactive(bgcolor));
+  fltk3::rectf(x+1, y+1, w-2, h-2);
+}
+#define fl_border_box fl_rectbound	/**< allow consistent naming */
+
+/**
+  Draws a frame of type fltk3::BORDER_FRAME.
+*/
+void fl_border_frame(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(draw_it_active ? c : fltk3::inactive(c));
+  fltk3::rect(x, y, w, h);
+}
+
+////////////////////////////////////////////////////////////////
+
+void fl_diamond_down_box(int x,int y,int w,int h,fltk3::Color bgcolor);
+void fl_diamond_up_box(int x,int y,int w,int h,fltk3::Color bgcolor);
+void fl_shadow_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_shadow_box(int x, int y, int w, int h, fltk3::Color c);
+
+void fl_round_up_box(int x, int y, int w, int h, fltk3::Color bgcolor);
+void fl_round_down_box(int x, int y, int w, int h, fltk3::Color bgcolor);
+void fl_rflat_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_rounded_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_rounded_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_rshadow_box(int x, int y, int w, int h, fltk3::Color c);
+
+void fl_oval_shadow_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_oval_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_oval_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_oval_flat_box(int x, int y, int w, int h, fltk3::Color c);
+
+void fl_plastic_up_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_plastic_down_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_plastic_up_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_plastic_down_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_plastic_thin_up_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_plastic_up_round(int x, int y, int w, int h, fltk3::Color c);
+void fl_plastic_down_round(int x, int y, int w, int h, fltk3::Color c);
+
+void fl_gtk_up_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_up_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_down_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_down_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_thin_up_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_thin_up_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_thin_down_frame(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_thin_down_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_round_up_box(int x, int y, int w, int h, fltk3::Color c);
+void fl_gtk_round_down_box(int x, int y, int w, int h, fltk3::Color c);
+
+static struct {
+  fltk3::BoxDrawF *f;
+  uchar dx, dy, dw, dh;
+  int set;
+} fl_box_table[256] = {
+// must match list in enumerations.h!!!
+  {fl_no_box,                   0,0,0,0,1},		
+  {fltk3::rectf,                0,0,0,0,1}, // fltk3::FLAT_BOX
+  {fl_up_box,                   D1,D1,D2,D2,1},
+  {fl_down_box,                 D1,D1,D2,D2,1},
+  {fl_up_frame,                 D1,D1,D2,D2,1},
+  {fl_down_frame,               D1,D1,D2,D2,1},
+  {fl_thin_up_box,              1,1,2,2,1},
+  {fl_thin_down_box,            1,1,2,2,1},
+  {fl_thin_up_frame,            1,1,2,2,1},
+  {fl_thin_down_frame,          1,1,2,2,1},
+  {fl_engraved_box,             2,2,4,4,1},
+  {fl_embossed_box,             2,2,4,4,1},
+  {fl_engraved_frame,           2,2,4,4,1},
+  {fl_embossed_frame,           2,2,4,4,1},
+  {fl_border_box,               1,1,2,2,1},
+  {fl_shadow_box,               1,1,5,5,0}, // FL_SHADOW_BOX,
+  {fl_border_frame,             1,1,2,2,1},
+  {fl_shadow_frame,             1,1,5,5,0}, // FL_SHADOW_FRAME,
+  
+  {fl_rounded_box,              1,1,2,2,0}, // FL_ROUNDED_BOX,
+  {fl_rshadow_box,              1,1,2,2,0}, // FL_RSHADOW_BOX,
+  {fl_rounded_frame,            1,1,2,2,0}, // FL_ROUNDED_FRAME
+  {fl_rflat_box,		0,0,0,0,0}, // FL_RFLAT_BOX,
+  {fl_round_up_box,		3,3,6,6,0}, // FL_ROUND_UP_BOX
+  {fl_round_down_box,		3,3,6,6,0}, // FL_ROUND_DOWN_BOX,
+  {fl_diamond_up_box,		0,0,0,0,0}, // FL_DIAMOND_UP_BOX
+  {fl_diamond_down_box,		0,0,0,0,0}, // FL_DIAMOND_DOWN_BOX
+  
+  {fl_oval_box,                 1,1,2,2,0}, // FL_OVAL_BOX,
+  {fl_oval_shadow_box,          1,1,2,2,0}, // FL_OVAL_SHADOW_BOX,
+  {fl_oval_frame,               1,1,2,2,0}, // FL_OVAL_FRAME
+  {fl_oval_flat_box,		0,0,0,0,0}, // FL_OVAL_FLAT_BOX,
+  
+  {fl_plastic_up_box,		4,4,8,8,0}, // FL_PLASTIC_UP_BOX,
+  {fl_plastic_down_box,		2,2,4,4,0}, // FL_PLASTIC_DOWN_BOX,
+  {fl_plastic_up_frame,		2,2,4,4,0}, // FL_PLASTIC_UP_FRAME,
+  {fl_plastic_down_frame,	2,2,4,4,0}, // FL_PLASTIC_DOWN_FRAME,
+  {fl_plastic_thin_up_box,	2,2,4,4,0}, // FL_PLASTIC_THIN_UP_BOX,
+  {fl_plastic_down_box,		2,2,4,4,0}, // FL_PLASTIC_THIN_DOWN_BOX,
+  {fl_plastic_up_round,		2,2,4,4,0}, // FL_PLASTIC_ROUND_UP_BOX,
+  {fl_plastic_down_round,	2,2,4,4,0}, // FL_PLASTIC_ROUND_DOWN_BOX,
+  
+  {fl_gtk_up_box,		2,2,4,4,0}, // FL_GTK_UP_BOX,
+  {fl_gtk_down_box,		2,2,4,4,0}, // FL_GTK_DOWN_BOX,
+  {fl_gtk_up_frame,		2,2,4,4,0}, // FL_GTK_UP_FRAME,
+  {fl_gtk_down_frame,           2,2,4,4,0}, // FL_GTK_DOWN_FRAME,
+  {fl_gtk_thin_up_box,		1,1,2,2,0}, // FL_GTK_THIN_ROUND_UP_BOX,
+  {fl_gtk_thin_down_box,	1,1,2,2,0}, // FL_GTK_THIN_ROUND_DOWN_BOX,
+  {fl_gtk_thin_up_frame,	1,1,2,2,0}, // FL_GTK_THIN_UP_FRAME,
+  {fl_gtk_thin_down_frame,	1,1,2,2,0}, // FL_GTK_THIN_DOWN_FRAME,
+  {fl_gtk_round_up_box,		2,2,4,4,0}, // FL_GTK_ROUND_UP_BOX,
+  {fl_gtk_round_down_box,	2,2,4,4,0}, // FL_GTK_ROUND_DOWN_BOX,
+  
+  {fl_up_box,                   3,3,6,6,0}, // FL_FREE_BOX+0
+  {fl_down_box,                 3,3,6,6,0}, // FL_FREE_BOX+1
+  {fl_up_box,                   3,3,6,6,0}, // FL_FREE_BOX+2
+  {fl_down_box,                 3,3,6,6,0}, // FL_FREE_BOX+3
+  {fl_up_box,                   3,3,6,6,0}, // FL_FREE_BOX+4
+  {fl_down_box,                 3,3,6,6,0}, // FL_FREE_BOX+5
+  {fl_up_box,                   3,3,6,6,0}, // FL_FREE_BOX+6
+  {fl_down_box,                 3,3,6,6,0}, // FL_FREE_BOX+7
+};
+
+/**
+  Returns the X offset for the given boxtype.
+  \see box_dy()
+*/
+int fltk3::box_dx(fltk3::Boxtype t) {return fl_box_table[t].dx;}
+
+/**
+    Returns the Y offset for the given boxtype.
+
+    These functions return the offset values necessary for a given
+    boxtype, useful for computing the area inside a box's borders, to
+    prevent overdrawing the borders.
+
+    For instance, in the case of a boxtype like fltk3::DOWN_BOX
+    where the border width might be 2 pixels all around, the above 
+    functions would return 2, 2, 4, and 4 for box_dx, 
+    box_dy, box_dw, and box_dh respectively.
+
+    An example to compute the area inside a widget's box():
+    \code
+         int X = yourwidget->x() + fltk3::box_dx(yourwidget->box());
+         int Y = yourwidget->y() + fltk3::box_dy(yourwidget->box());
+         int W = yourwidget->w() - fltk3::box_dw(yourwidget->box());
+         int H = yourwidget->h() - fltk3::box_dh(yourwidget->box());
+    \endcode
+    These functions are mainly useful in the draw() code 
+    for deriving custom widgets, where one wants to avoid drawing 
+    over the widget's own border box().
+*/
+int fltk3::box_dy(fltk3::Boxtype t) {return fl_box_table[t].dy;}
+
+/**
+  Returns the width offset for the given boxtype.
+  \see box_dy().
+*/
+int fltk3::box_dw(fltk3::Boxtype t) {return fl_box_table[t].dw;}
+
+/**
+  Returns the height offset for the given boxtype.
+  \see box_dy().
+*/
+int fltk3::box_dh(fltk3::Boxtype t) {return fl_box_table[t].dh;}
+
+/**
+  Sets the drawing function for a given box type.
+  \param[in] t box type
+  \param[in] f box drawing function
+*/
+void fl_internal_boxtype(fltk3::Boxtype t, fltk3::BoxDrawF* f) {
+  if (!fl_box_table[t].set) {
+    fl_box_table[t].f   = f;
+    fl_box_table[t].set = 1;
+  }
+}
+
+/** Gets the current box drawing function for the specified box type. */
+fltk3::BoxDrawF *fltk3::get_boxtype(fltk3::Boxtype t) {
+  return fl_box_table[t].f;
+}
+/** Sets the function to call to draw a specific boxtype. */
+void fltk3::set_boxtype(fltk3::Boxtype t, fltk3::BoxDrawF* f,
+		      uchar a, uchar b, uchar c, uchar d) {
+  fl_box_table[t].f   = f;
+  fl_box_table[t].set = 1;
+  fl_box_table[t].dx  = a;
+  fl_box_table[t].dy  = b;
+  fl_box_table[t].dw  = c;
+  fl_box_table[t].dh  = d;
+}
+/** Copies the from boxtype. */
+void fltk3::set_boxtype(fltk3::Boxtype to, fltk3::Boxtype from) {
+  fl_box_table[to] = fl_box_table[from];
+}
+
+/**
+  Draws a box using given type, position, size and color.
+  \param[in] t box type
+  \param[in] x, y, w, h position and size
+  \param[in] c color
+*/
+void fltk3::draw_box(fltk3::Boxtype t, int x, int y, int w, int h, fltk3::Color c) {
+  if (t && fl_box_table[t].f) fl_box_table[t].f(x,y,w,h,c);
+}
+
+//extern fltk3::Widget *fl_boxcheat; // hack set by fltk3::Window.cxx
+/** Draws the widget box according its box style */
+void fltk3::Widget::draw_box() const {
+  if (box_) draw_box((fltk3::Boxtype)box_, x_, y_, w_, h_, color_);
+  draw_backdrop();
+}
+/** If fltk3::ALIGN_IMAGE_BACKDROP is set, the image or deimage will be drawn */
+void fltk3::Widget::draw_backdrop() const {
+  if (align() & fltk3::ALIGN_IMAGE_BACKDROP) {
+    const fltk3::Image *img = image();
+    // if there is no image, we will not draw the deimage either
+    if (img && deimage() && !active_r())
+      img = deimage();
+    if (img) 
+      ((fltk3::Image*)img)->draw(x_+(w_-img->w())/2, y_+(h_-img->h())/2);
+  }
+}
+/** Draws a box of type t, of color c at the widget's position and size. */
+void fltk3::Widget::draw_box(fltk3::Boxtype t, fltk3::Color c) const {
+  draw_box(t, x_, y_, w_, h_, c);
+}
+/** Draws a box of type t, of color c at the position X,Y and size W,H. */
+void fltk3::Widget::draw_box(fltk3::Boxtype t, int X, int Y, int W, int H, fltk3::Color c) const {
+  draw_it_active = active_r();
+  fl_box_table[t].f(X, Y, W, H, c);
+  draw_it_active = 1;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_boxtype.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_call_main.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_call_main.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_call_main.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,143 @@
+/*
+ * "$Id$"
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * fl_call_main() calls main() for you Windows people.  Needs to be done in C
+ * because Borland C++ won't let you call main() from C++.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ * This WinMain() function can be overridden by an application and
+ * is provided for compatibility with programs written for other
+ * operating systems that conform to the ANSI standard entry point
+ * "main()".  This will allow you to build a WIN32 Application
+ * without any special settings.
+ *
+ * Because of problems with the Microsoft Visual C++ header files
+ * and/or compiler, you cannot have a WinMain function in a DLL.
+ * I don't know why.  Thus, this nifty feature is only available
+ * if you link to the static library.
+ *
+ * Currently the debug version of this library will create a
+ * console window for your application so you can put printf()
+ * statements for debugging or informational purposes.  Ultimately
+ * we want to update this to always use the parent's console,
+ * but at present we have not identified a function or API in
+ * Microsoft(r) Windows(r) that allows for it.
+ */
+
+#if defined(WIN32) && !defined(FL_DLL) && !defined (__GNUC__)
+
+#  include <windows.h>
+#  include <stdio.h>
+#  include <stdlib.h>
+#  include <fltk3/utf8.h>
+
+extern int main(int, char *[]);
+
+#  ifdef BORLAND5
+#    define __argc _argc
+#    define __argv _argv
+#  endif /* BORLAND5 */
+
+/* static int mbcs2utf(const char *s, int l, char *dst, unsigned dstlen) */
+static int mbcs2utf(const char *s, int l, char *dst)
+{
+  static xchar *mbwbuf;
+  unsigned dstlen = 0;
+  if (!s) return 0;
+  dstlen = (l * 6) + 6;
+  mbwbuf = (xchar*)malloc(dstlen * sizeof(xchar));
+  l = mbstowcs(mbwbuf, s, l);
+/* l = fl_unicode2utf(mbwbuf, l, dst); */
+  l = fltk3::utf8fromwc(dst, dstlen, mbwbuf, l);
+  dst[l] = 0;
+  free(mbwbuf);
+  return l;
+}
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+                             LPSTR lpCmdLine, int nCmdShow) {
+  int rc, i;
+  char **ar;
+
+#  ifdef _DEBUG
+ /*
+  * If we are using compiling in debug mode, open a console window so
+  * we can see any printf's, etc...
+  *
+  * While we can detect if the program was run from the command-line -
+  * look at the CMDLINE environment variable, it will be "WIN" for
+  * programs started from the GUI - the shell seems to run all WIN32
+  * applications in the background anyways...
+  */
+
+  AllocConsole();
+  freopen("conin$", "r", stdin);
+  freopen("conout$", "w", stdout);
+  freopen("conout$", "w", stderr);
+#  endif /* _DEBUG */
+
+  ar = (char**) malloc(sizeof(char*) * (__argc + 1));
+  i = 0;
+  while (i < __argc) {
+    int l;
+    unsigned dstlen;
+    if (__wargv ) {
+      for (l = 0; __wargv[i] && __wargv[i][l]; l++) {}; /* is this just wstrlen??? */
+      dstlen = (l * 5) + 1;
+      ar[i] = (char*) malloc(dstlen);
+/*    ar[i][fl_unicode2utf(__wargv[i], l, ar[i])] = 0; */
+      dstlen = fltk3::utf8fromwc(ar[i], dstlen, __wargv[i], l);
+      ar[i][dstlen] = 0;
+    } else {
+      for (l = 0; __argv[i] && __argv[i][l]; l++) {};
+      dstlen = (l * 5) + 1;
+      ar[i] = (char*) malloc(dstlen);
+/*      ar[i][mbcs2utf(__argv[i], l, ar[i], dstlen)] = 0; */
+      ar[i][mbcs2utf(__argv[i], l, ar[i])] = 0;
+    }
+    i++;
+  }
+  ar[__argc] = 0;
+  /* Run the standard main entry point function... */
+  rc = main(__argc, ar);
+
+#  ifdef _DEBUG
+  fclose(stdin);
+  fclose(stdout);
+  fclose(stderr);
+#  endif /* _DEBUG */
+
+  return rc;
+}
+
+#elif defined(__hpux)
+/* This code to prevent "empty translation unit" or similar warnings... */
+static void dummy(void) {}
+#endif /* WIN32 && !FL_DLL && !__GNUC__ */
+
+/*
+ * End of "$Id$".
+ */
+


Property changes on: branches/branch-3.0/src/core/fl_call_main.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_cmap.h
===================================================================
--- branches/branch-3.0/src/core/fl_cmap.h	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_cmap.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,256 @@
+	0x00000000,
+	0xff000000,
+	0x00ff0000,
+	0xffff0000,
+	0x0000ff00,
+	0xff00ff00,
+	0x00ffff00,
+	0xffffff00,
+	0x55555500,
+	0xc6717100,
+	0x71c67100,
+	0x8e8e3800,
+	0x7171c600,
+	0x8e388e00,
+	0x388e8e00,
+	0x00008000,
+	0xa8a89800,
+	0xe8e8d800,
+	0x68685800,
+	0x98a8a800,
+	0xd8e8e800,
+	0x58686800,
+	0x9c9ca800,
+	0xdcdce800,
+	0x5c5c6800,
+	0x9ca89c00,
+	0xdce8dc00,
+	0x5c685c00,
+	0x90909000,
+	0xc0c0c000,
+	0x50505000,
+	0xa0a0a000,
+	0x00000000,
+	0x0d0d0d00,
+	0x1a1a1a00,
+	0x26262600,
+	0x31313100,
+	0x3d3d3d00,
+	0x48484800,
+	0x55555500,
+	0x5f5f5f00,
+	0x6a6a6a00,
+	0x75757500,
+	0x80808000,
+	0x8a8a8a00,
+	0x95959500,
+	0xa0a0a000,
+	0xaaaaaa00,
+	0xb5b5b500,
+	0xc0c0c000,
+	0xcbcbcb00,
+	0xd5d5d500,
+	0xe0e0e000,
+	0xeaeaea00,
+	0xf5f5f500,
+	0xffffff00,
+	0x00000000,
+	0x00240000,
+	0x00480000,
+	0x006d0000,
+	0x00910000,
+	0x00b60000,
+	0x00da0000,
+	0x00ff0000,
+	0x3f000000,
+	0x3f240000,
+	0x3f480000,
+	0x3f6d0000,
+	0x3f910000,
+	0x3fb60000,
+	0x3fda0000,
+	0x3fff0000,
+	0x7f000000,
+	0x7f240000,
+	0x7f480000,
+	0x7f6d0000,
+	0x7f910000,
+	0x7fb60000,
+	0x7fda0000,
+	0x7fff0000,
+	0xbf000000,
+	0xbf240000,
+	0xbf480000,
+	0xbf6d0000,
+	0xbf910000,
+	0xbfb60000,
+	0xbfda0000,
+	0xbfff0000,
+	0xff000000,
+	0xff240000,
+	0xff480000,
+	0xff6d0000,
+	0xff910000,
+	0xffb60000,
+	0xffda0000,
+	0xffff0000,
+	0x00003f00,
+	0x00243f00,
+	0x00483f00,
+	0x006d3f00,
+	0x00913f00,
+	0x00b63f00,
+	0x00da3f00,
+	0x00ff3f00,
+	0x3f003f00,
+	0x3f243f00,
+	0x3f483f00,
+	0x3f6d3f00,
+	0x3f913f00,
+	0x3fb63f00,
+	0x3fda3f00,
+	0x3fff3f00,
+	0x7f003f00,
+	0x7f243f00,
+	0x7f483f00,
+	0x7f6d3f00,
+	0x7f913f00,
+	0x7fb63f00,
+	0x7fda3f00,
+	0x7fff3f00,
+	0xbf003f00,
+	0xbf243f00,
+	0xbf483f00,
+	0xbf6d3f00,
+	0xbf913f00,
+	0xbfb63f00,
+	0xbfda3f00,
+	0xbfff3f00,
+	0xff003f00,
+	0xff243f00,
+	0xff483f00,
+	0xff6d3f00,
+	0xff913f00,
+	0xffb63f00,
+	0xffda3f00,
+	0xffff3f00,
+	0x00007f00,
+	0x00247f00,
+	0x00487f00,
+	0x006d7f00,
+	0x00917f00,
+	0x00b67f00,
+	0x00da7f00,
+	0x00ff7f00,
+	0x3f007f00,
+	0x3f247f00,
+	0x3f487f00,
+	0x3f6d7f00,
+	0x3f917f00,
+	0x3fb67f00,
+	0x3fda7f00,
+	0x3fff7f00,
+	0x7f007f00,
+	0x7f247f00,
+	0x7f487f00,
+	0x7f6d7f00,
+	0x7f917f00,
+	0x7fb67f00,
+	0x7fda7f00,
+	0x7fff7f00,
+	0xbf007f00,
+	0xbf247f00,
+	0xbf487f00,
+	0xbf6d7f00,
+	0xbf917f00,
+	0xbfb67f00,
+	0xbfda7f00,
+	0xbfff7f00,
+	0xff007f00,
+	0xff247f00,
+	0xff487f00,
+	0xff6d7f00,
+	0xff917f00,
+	0xffb67f00,
+	0xffda7f00,
+	0xffff7f00,
+	0x0000bf00,
+	0x0024bf00,
+	0x0048bf00,
+	0x006dbf00,
+	0x0091bf00,
+	0x00b6bf00,
+	0x00dabf00,
+	0x00ffbf00,
+	0x3f00bf00,
+	0x3f24bf00,
+	0x3f48bf00,
+	0x3f6dbf00,
+	0x3f91bf00,
+	0x3fb6bf00,
+	0x3fdabf00,
+	0x3fffbf00,
+	0x7f00bf00,
+	0x7f24bf00,
+	0x7f48bf00,
+	0x7f6dbf00,
+	0x7f91bf00,
+	0x7fb6bf00,
+	0x7fdabf00,
+	0x7fffbf00,
+	0xbf00bf00,
+	0xbf24bf00,
+	0xbf48bf00,
+	0xbf6dbf00,
+	0xbf91bf00,
+	0xbfb6bf00,
+	0xbfdabf00,
+	0xbfffbf00,
+	0xff00bf00,
+	0xff24bf00,
+	0xff48bf00,
+	0xff6dbf00,
+	0xff91bf00,
+	0xffb6bf00,
+	0xffdabf00,
+	0xffffbf00,
+	0x0000ff00,
+	0x0024ff00,
+	0x0048ff00,
+	0x006dff00,
+	0x0091ff00,
+	0x00b6ff00,
+	0x00daff00,
+	0x00ffff00,
+	0x3f00ff00,
+	0x3f24ff00,
+	0x3f48ff00,
+	0x3f6dff00,
+	0x3f91ff00,
+	0x3fb6ff00,
+	0x3fdaff00,
+	0x3fffff00,
+	0x7f00ff00,
+	0x7f24ff00,
+	0x7f48ff00,
+	0x7f6dff00,
+	0x7f91ff00,
+	0x7fb6ff00,
+	0x7fdaff00,
+	0x7fffff00,
+	0xbf00ff00,
+	0xbf24ff00,
+	0xbf48ff00,
+	0xbf6dff00,
+	0xbf91ff00,
+	0xbfb6ff00,
+	0xbfdaff00,
+	0xbfffff00,
+	0xff00ff00,
+	0xff24ff00,
+	0xff48ff00,
+	0xff6dff00,
+	0xff91ff00,
+	0xffb6ff00,
+	0xffdaff00,
+	0xffffff00


Property changes on: branches/branch-3.0/src/core/fl_cmap.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_color.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_color.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_color.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,471 @@
+//
+// "$Id$"
+//
+// Color functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_color.cxx
+  \brief Color handling
+*/
+
+// Implementation of fltk3::color(i), fltk3::color(r,g,b).
+
+#ifdef WIN32
+#  include "fl_color_win32.cxx"
+#elif defined(__APPLE__)
+#  include "fl_color_mac.cxx"
+#else
+
+// Also code to look at the X visual and figure out the best way to turn
+// a color into a pixel value.
+
+// SGI compiler seems to have problems with unsigned char arguments
+// being used to index arrays.  So I always copy them to an integer
+// before use.
+
+#  include "Fl_XColor.H"
+#  include <fltk3/run.h>
+#  include <fltk3/x.h>
+#  include <fltk3/draw.h>
+
+////////////////////////////////////////////////////////////////
+// figure_out_visual() calculates masks & shifts for generating
+// pixels in true-color visuals:
+
+uchar fl_redmask;	/**< color mask used in current color map handling */
+uchar fl_greenmask;	/**< color mask used in current color map handling */
+uchar fl_bluemask;	/**< color mask used in current color map handling */
+
+int fl_redshift;	/**< color shift used in current color map handling */
+int fl_greenshift;	/**< color shift used in current color map handling */
+int fl_blueshift;	/**< color shift used in current color map handling */
+int fl_extrashift;	/**< color shift used in current color map handling */
+
+static uchar beenhere;
+
+static void figure_out_visual() {
+  beenhere = 1;
+  if (!fl_visual->red_mask || !fl_visual->green_mask || !fl_visual->blue_mask){
+#  if USE_COLORMAP
+    fl_redmask = 0;
+    return;
+#  else
+    fltk3::fatal("Requires true color visual");
+#  endif
+  }
+
+  // get the bit masks into a more useful form:
+  int i,j,m;
+
+  for (i = 0, m = 1; m; i++, m<<=1) if (fl_visual->red_mask & m) break;
+  for (j = i; m; j++, m<<=1) if (!(fl_visual->red_mask & m)) break;
+  fl_redshift = j-8;
+  fl_redmask = (j-i >= 8) ? 0xFF : 0xFF-(255>>(j-i));
+
+  for (i = 0, m = 1; m; i++, m<<=1) if (fl_visual->green_mask & m) break;
+  for (j = i; m; j++, m<<=1) if (!(fl_visual->green_mask & m)) break;
+  fl_greenshift = j-8;
+  fl_greenmask = (j-i >= 8) ? 0xFF : 0xFF-(255>>(j-i));
+
+  for (i = 0, m = 1; m; i++, m<<=1) if (fl_visual->blue_mask & m) break;
+  for (j = i; m; j++, m<<=1) if (!(fl_visual->blue_mask & m)) break;
+  fl_blueshift = j-8;
+  fl_bluemask = (j-i >= 8) ? 0xFF : 0xFF-(255>>(j-i));
+
+  i = fl_redshift;
+  if (fl_greenshift < i) i = fl_greenshift;
+  if (fl_blueshift < i) i = fl_blueshift;
+  if (i < 0) {
+    fl_extrashift = -i;
+    fl_redshift -= i; fl_greenshift -= i; fl_blueshift -= i;
+  } else
+    fl_extrashift = 0;
+
+}
+
+static unsigned fl_cmap[256] = {
+#include "fl_cmap.h" // this is a file produced by "cmap.cxx":
+};
+
+#  if HAVE_OVERLAY
+/** HAVE_OVERLAY determines whether fl_xmap is one or two planes */
+Fl_XColor fl_xmap[2][256];
+/** HAVE_OVERLAY determines whether fl_overlay is variable or defined as 0 */
+uchar fl_overlay;
+Colormap fl_overlay_colormap;
+XVisualInfo* fl_overlay_visual;
+ulong fl_transparent_pixel;
+#  else
+/** HAVE_OVERLAY determines whether fl_xmap is one or two planes */
+Fl_XColor fl_xmap[1][256];
+/** HAVE_OVERLAY determines whether fl_overlay is variable or defined as 0 */
+#    define fl_overlay 0
+#  endif
+
+void fltk3::XlibGraphicsDriver::color(fltk3::Color i) {
+  if (i & 0xffffff00) {
+    unsigned rgb = (unsigned)i;
+    fltk3::color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
+  } else {
+    fltk3::GraphicsDriver::color(i);
+    if(!fl_gc) return; // don't get a default gc if current window is not yet created/valid
+    XSetForeground(fl_display, fl_gc, fl_xpixel(i));
+  }
+}
+
+void fltk3::XlibGraphicsDriver::color(uchar r,uchar g,uchar b) {
+  fltk3::GraphicsDriver::color( fltk3::rgb_color(r, g, b) );
+  if(!fl_gc) return; // don't get a default gc if current window is not yet created/valid
+  XSetForeground(fl_display, fl_gc, fl_xpixel(r,g,b));
+}
+
+/** \addtogroup  fl_attributes
+    @{ */
+////////////////////////////////////////////////////////////////
+// Get an rgb color.  This is easy for a truecolor visual.  For
+// colormapped it picks the closest color out of the cube in the
+// fltk colormap.  However if this color cube entry has been
+// requested before, you will get the earlier requested color, and
+// even this may be approximated if the X colormap was full.
+
+/**
+  Returns the X pixel number used to draw the given rgb color.
+  This is the X pixel that fltk3::color() would use.
+  \param[in] r,g,b color components
+  \return X pixel number
+*/
+ulong fl_xpixel(uchar r,uchar g,uchar b) {
+  if (!beenhere) figure_out_visual();
+#  if USE_COLORMAP
+  if (!fl_redmask) {
+    // find closest entry in the colormap:
+    fltk3::Color i =
+      fltk3::color_cube(r*fltk3::NUM_RED/256,g*fltk3::NUM_GREEN/256,b*fltk3::NUM_BLUE/256);
+    Fl_XColor &xmap = fl_xmap[fl_overlay][i];
+    if (xmap.mapped) return xmap.pixel;
+    // if not black or white, change the entry to be an exact match:
+    if (i != fltk3::COLOR_CUBE && i != 0xFF)
+      fl_cmap[i] = (r<<24)|(g<<16)|(b<<8);
+    return fl_xpixel(i); // allocate an X color
+  }
+#  endif
+  return
+    (((r&fl_redmask) << fl_redshift)+
+     ((g&fl_greenmask)<<fl_greenshift)+
+     ((b&fl_bluemask)<< fl_blueshift)
+     ) >> fl_extrashift;
+}
+
+////////////////////////////////////////////////////////////////
+// Get a color out of the fltk colormap.  Again for truecolor
+// visuals this is easy.  For colormap this actually tries to allocate
+// an X color, and does a least-squares match to find the closest
+// color if X cannot allocate that color.
+
+// calculate what color is actually on the screen for a mask:
+static inline uchar realcolor(uchar color, uchar mask) {
+#  if 0
+  // accurate version if the display has linear gamma, but fltk3::draw_image
+  // works better with the simpler version on most screens...
+  uchar m = mask;
+  uchar result = color&m;
+  for (;;) {
+    while (m&mask) {m>>=1; color>>=1;}
+    if (!m) break;
+    mask = m;
+    result |= color&m;
+  }
+  return result;
+#  else
+  return (color&mask) | ( (~mask)&(mask>>1) );
+#  endif
+}
+
+/**
+  Returns the X pixel number used to draw the given FLTK color index.
+  This is the X pixel that fltk3::color() would use.
+  \param[in] i color index
+  \return X pixel number
+*/
+ulong fl_xpixel(fltk3::Color i) {
+  if (i & 0xffffff00) {
+    return fl_xpixel((i >> 24) & 255, (i >> 16) & 255, (i >> 8) & 255);
+  }
+
+  Fl_XColor &xmap = fl_xmap[fl_overlay][i];
+  if (xmap.mapped) return xmap.pixel;
+
+  if (!beenhere) figure_out_visual();
+
+  uchar r,g,b;
+  {unsigned c = fl_cmap[i]; r=uchar(c>>24); g=uchar(c>>16); b=uchar(c>>8);}
+
+#  if USE_COLORMAP
+  Colormap colormap = fl_colormap;
+#    if HAVE_OVERLAY
+  if (fl_overlay) colormap = fl_overlay_colormap; else
+#    endif
+  if (fl_redmask) {
+#  endif
+    // return color for a truecolor visual:
+    xmap.mapped = 2; // 2 prevents XFreeColor from being called
+    xmap.r = realcolor(r, fl_redmask);
+    xmap.g = realcolor(g, fl_greenmask);
+    xmap.b = realcolor(b, fl_bluemask);
+    return xmap.pixel = 
+      (((r&fl_redmask) << fl_redshift)+
+       ((g&fl_greenmask)<<fl_greenshift)+
+       ((b&fl_bluemask)<< fl_blueshift)
+       ) >> fl_extrashift;
+#  if USE_COLORMAP
+  }
+#    if HAVE_OVERLAY
+  static XColor* ac[2];
+  XColor*& allcolors = ac[fl_overlay];
+  static int nc[2];
+  int& numcolors = nc[fl_overlay];
+#    else
+  static XColor *allcolors;
+  static int numcolors;
+#    endif
+
+  // I don't try to allocate colors with XAllocColor once it fails
+  // with any color.  It is possible that it will work, since a color
+  // may have been freed, but some servers are extremely slow and this
+  // avoids one round trip:
+  if (!numcolors) { // don't try after a failure
+    XColor xcol;
+    xcol.red = r<<8; xcol.green = g<<8; xcol.blue = b<<8;
+    if (XAllocColor(fl_display, colormap, &xcol)) {
+      xmap.mapped = 1;
+      xmap.r = xcol.red>>8;
+      xmap.g = xcol.green>>8;
+      xmap.b = xcol.blue>>8;
+      return xmap.pixel = xcol.pixel;
+    }
+
+    // I only read the colormap once.  Again this is due to the slowness
+    // of round-trips to the X server, even though other programs may alter
+    // the colormap after this and make decisions here wrong.
+#    if HAVE_OVERLAY
+    if (fl_overlay) numcolors = fl_overlay_visual->colormap_size; else
+#    endif
+      numcolors = fl_visual->colormap_size;
+    if (!allcolors) allcolors = new XColor[numcolors];
+    for (int p = numcolors; p--;) allcolors[p].pixel = p;
+    XQueryColors(fl_display, colormap, allcolors, numcolors);
+  }
+
+  // find least-squares match:
+  int mindist = 0x7FFFFFFF;
+  unsigned int bestmatch = 0;
+  for (unsigned int n = numcolors; n--;) {
+#    if HAVE_OVERLAY
+    if (fl_overlay && n == fl_transparent_pixel) continue;
+#    endif
+    XColor &a = allcolors[n];
+    int d, t;
+    t = int(r)-int(a.red>>8); d = t*t;
+    t = int(g)-int(a.green>>8); d += t*t;
+    t = int(b)-int(a.blue>>8); d += t*t;
+    if (d <= mindist) {bestmatch = n; mindist = d;}
+  }
+  XColor &p = allcolors[bestmatch];
+
+  // It appears to "work" to not call this XAllocColor, which will
+  // avoid another round-trip to the server.  But then X does not
+  // know that this program "owns" this value, and can (and will)
+  // change it when the program that did allocate it exits:
+  if (XAllocColor(fl_display, colormap, &p)) {
+    xmap.mapped = 1;
+    xmap.pixel = p.pixel;
+  } else {
+    // However, if that XAllocColor fails, I have to give up and
+    // assume the pixel is ok for the duration of the program.  This
+    // is due to bugs (?) in the Solaris X and some X terminals
+    // where XAllocColor *always* fails when the colormap is full,
+    // even if we ask for a color already in it...
+    xmap.mapped = 2; // 2 prevents XFreeColor from being called
+    xmap.pixel = bestmatch;
+  }
+  xmap.r = p.red>>8;
+  xmap.g = p.green>>8;
+  xmap.b = p.blue>>8;
+  return xmap.pixel;
+#  endif
+}
+
+/**
+  Free color \p i if used, and clear mapping table entry.
+  \param[in] i color index
+  \param[in] overlay 0 for normal, 1 for overlay color
+*/
+void fltk3::free_color(fltk3::Color i, int overlay) {
+#  if HAVE_OVERLAY
+#  else
+  if (overlay) return;
+#  endif
+  if (fl_xmap[overlay][i].mapped) {
+#  if USE_COLORMAP
+#    if HAVE_OVERLAY
+    Colormap colormap = overlay ? fl_overlay_colormap : fl_colormap;
+#    else
+    Colormap colormap = fl_colormap;
+#    endif
+    if (fl_xmap[overlay][i].mapped == 1)
+      XFreeColors(fl_display, colormap, &(fl_xmap[overlay][i].pixel), 1, 0);
+#  endif
+    fl_xmap[overlay][i].mapped = 0;
+  }
+}
+
+/**
+  Set color mapping table entry \p i to color \p c
+  \param[in] i color index
+  \param[in] c color
+*/
+void fltk3::set_color(fltk3::Color i, unsigned c) {
+  if (fl_cmap[i] != c) {
+    free_color(i,0);
+#  if HAVE_OVERLAY
+    free_color(i,1);
+#  endif
+    fl_cmap[i] = c;
+  }
+}
+
+#endif // end of X-specific code
+/**
+    Returns the RGB value(s) for the given FLTK color index.
+    
+    This form returns the RGB values packed in a 32-bit unsigned
+    integer with the red value in the upper 8 bits, the green value
+    in the next 8 bits, and the blue value in bits 8-15.  The lower
+    8 bits will always be 0.
+*/
+unsigned fltk3::get_color(fltk3::Color i) {
+  if (i & 0xffffff00) return (i);
+  else return fl_cmap[i];
+}
+/**
+    Sets an entry in the fltk3::color index table.  You can set it to
+    any 8-bit RGB color.  The color is not allocated until fltk3::color(i)
+    is used.
+*/
+void fltk3::set_color(fltk3::Color i, uchar red, uchar green, uchar blue) {
+  fltk3::set_color((fltk3::Color)(i & 255),
+	((unsigned)red<<24)+((unsigned)green<<16)+((unsigned)blue<<8));
+}
+/**
+    Returns the RGB value(s) for the given FLTK color index. 
+    
+    This form returns the red, green, and blue values
+    separately in referenced variables.
+
+    See also unsigned get_color(fltk3::Color c)
+ */
+void fltk3::get_color(fltk3::Color i, uchar &red, uchar &green, uchar &blue) {
+  unsigned c;
+
+  if (i & 0xffffff00) c = (unsigned)i;
+  else c = fl_cmap[i];
+
+  red   = uchar(c>>24);
+  green = uchar(c>>16);
+  blue  = uchar(c>>8);
+}
+
+/**
+  Returns the weighted average color between the two given colors.
+  The red, green and blue values are averages using the following formula:
+  \code
+  color = color1 * weight  + color2 * (1 - weight)
+  \endcode
+  Thus, a \p weight value of 1.0 will return the first color, while a
+  value of 0.0 will return the second color.
+  \param[in] color1, color2 boundary colors
+  \param[in] weight weighting factor
+*/
+fltk3::Color fltk3::color_average(fltk3::Color color1, fltk3::Color color2, float weight) {
+  unsigned rgb1;
+  unsigned rgb2;
+  uchar r, g, b;
+
+  if (color1 & 0xffffff00) rgb1 = color1;
+  else rgb1 = fl_cmap[color1 & 255];
+
+  if (color2 & 0xffffff00) rgb2 = color2;
+  else rgb2 = fl_cmap[color2 & 255];
+
+  r = (uchar)(((uchar)(rgb1>>24))*weight + ((uchar)(rgb2>>24))*(1-weight));
+  g = (uchar)(((uchar)(rgb1>>16))*weight + ((uchar)(rgb2>>16))*(1-weight));
+  b = (uchar)(((uchar)(rgb1>>8))*weight + ((uchar)(rgb2>>8))*(1-weight));
+
+  return fltk3::rgb_color(r, g, b);
+}
+
+/**
+  Returns the inactive, dimmed version of the given color
+*/
+fltk3::Color fltk3::inactive(fltk3::Color c) {
+  return fltk3::color_average(c, fltk3::GRAY, .33f);
+}
+
+/**
+  Returns a color that contrasts with the background color.
+  This will be the foreground color if it contrasts sufficiently with the
+  background color. Otherwise, returns \p fltk3::WHITE or \p fltk3::BLACK depending
+  on which color provides the best contrast.
+  \param[in] fg,bg foreground and background colors
+  \return contrasting color
+*/
+fltk3::Color fltk3::contrast(fltk3::Color fg, fltk3::Color bg) {
+  unsigned c1, c2;	// RGB colors
+  int l1, l2;		// Luminosities
+
+
+  // Get the RGB values for each color...
+  if (fg & 0xffffff00) c1 = (unsigned)fg;
+  else c1 = fl_cmap[fg];
+
+  if (bg & 0xffffff00) c2 = (unsigned)bg;
+  else c2 = fl_cmap[bg];
+
+  // Compute the luminosity...
+  l1 = ((c1 >> 24) * 30 + ((c1 >> 16) & 255) * 59 + ((c1 >> 8) & 255) * 11) / 100;
+  l2 = ((c2 >> 24) * 30 + ((c2 >> 16) & 255) * 59 + ((c2 >> 8) & 255) * 11) / 100;
+
+  // Compare and return the contrasting color...
+  if ((l1 - l2) > 99) return fg;
+  else if ((l2 - l1) > 99) return fg;
+  else if (l2 > 127) return fltk3::BLACK;
+  else return fltk3::WHITE;
+}
+/**
+   @}
+*/
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_color.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_color_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_color_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_color_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,92 @@
+//
+// "$Id$"
+//
+// MacOS color functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// The fltk "colormap".  This allows ui colors to be stored in 8-bit
+// locations, and provides a level of indirection so that global color
+// changes can be made.  Not to be confused with the X colormap, which
+// I try to hide completely.
+
+// matt: Neither Quartz nor Quickdraw support colormaps in this implementation
+// matt: Quartz support done
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+
+static unsigned fl_cmap[256] = {
+#include "fl_cmap.h" // this is a file produced by "cmap.cxx":
+};
+
+// Translations to mac data structures:
+Fl_XMap fl_xmap[256];
+
+Fl_XMap* fl_current_xmap;
+
+void fltk3::QuartzGraphicsDriver::color(fltk3::Color i) {
+  fltk3::GraphicsDriver::color(i);
+  int index;
+  uchar r, g, b;
+  if (i & 0xFFFFFF00) {
+    // translate rgb colors into color index
+    r = i>>24;
+    g = i>>16;
+    b = i>> 8;
+  } else {
+    // translate index into rgb:
+    index = i;
+    unsigned c = fl_cmap[i];
+    r = c>>24;
+    g = c>>16;
+    b = c>> 8;
+  }
+  if (!fl_gc) return; // no context yet? We will assign the color later.
+  float fr = r/255.0f;
+  float fg = g/255.0f;
+  float fb = b/255.0f;
+  CGContextSetRGBFillColor(fl_gc, fr, fg, fb, 1.0f);
+  CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
+}
+
+void fltk3::QuartzGraphicsDriver::color(uchar r, uchar g, uchar b) {
+  fltk3::GraphicsDriver::color( fltk3::rgb_color(r, g, b) );
+  float fr = r/255.0f;
+  float fg = g/255.0f;
+  float fb = b/255.0f;
+  CGContextSetRGBFillColor(fl_gc, fr, fg, fb, 1.0f);
+  CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
+}
+
+void fltk3::set_color(fltk3::Color i, unsigned c) {
+  if (fl_cmap[i] != c) {
+    fl_cmap[i] = c;
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_color_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_color_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_color_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_color_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,252 @@
+//
+// "$Id$"
+//
+// WIN32 color functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// The fltk "colormap".  This allows ui colors to be stored in 8-bit
+// locations, and provides a level of indirection so that global color
+// changes can be made.  Not to be confused with the X colormap, which
+// I try to hide completely.
+
+// SGI compiler seems to have problems with unsigned char arguments
+// being used to index arrays.  So I always copy them to an integer
+// before use.
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+
+static unsigned fl_cmap[256] = {
+#include "fl_cmap.h" // this is a file produced by "cmap.cxx":
+};
+
+// Translations to win32 data structures:
+Fl_XMap fl_xmap[256];
+
+Fl_XMap* fl_current_xmap;
+
+HPALETTE fl_palette;
+static HGDIOBJ tmppen=0;
+static HPEN savepen=0;
+
+void fl_cleanup_pens(void) {
+  for (int i=0; i<256; i++) {
+    if (fl_xmap[i].pen) DeleteObject(fl_xmap[i].pen);
+  }
+}
+
+void fl_save_pen(void) {
+    if(!tmppen) tmppen = CreatePen(PS_SOLID, 1, 0);
+    savepen = (HPEN)SelectObject(fl_gc, tmppen);
+}
+
+void fl_restore_pen(void) {
+    if (savepen) SelectObject(fl_gc, savepen);
+    DeleteObject(tmppen);
+    tmppen = 0;
+    savepen = 0;
+}
+
+static void clear_xmap(Fl_XMap& xmap) {
+  if (xmap.pen) {
+    HGDIOBJ tmppen = GetStockObject(BLACK_PEN);
+    HGDIOBJ oldpen = SelectObject(fl_gc, tmppen);       // Push out the current pen of the gc
+    if(oldpen != xmap.pen) SelectObject(fl_gc, oldpen); // Put it back if it is not the one we are about to delete
+    DeleteObject((HGDIOBJ)(xmap.pen));
+    xmap.pen = 0;
+    xmap.brush = -1;
+  }
+}
+
+static void set_xmap(Fl_XMap& xmap, COLORREF c) {
+  xmap.rgb = c;
+  if (xmap.pen) {
+      HGDIOBJ oldpen = SelectObject(fl_gc,GetStockObject(BLACK_PEN)); // replace current pen with safe one
+      if (oldpen != xmap.pen)SelectObject(fl_gc,oldpen);              // if old one not xmap.pen, need to put it back
+      DeleteObject(xmap.pen);                                         // delete pen
+  }
+  xmap.pen = CreatePen(PS_SOLID, 1, xmap.rgb);                        // get a pen into xmap.pen
+  xmap.brush = -1;
+}
+
+void fltk3::GDIGraphicsDriver::color(fltk3::Color i) {
+  if (i & 0xffffff00) {
+    unsigned rgb = (unsigned)i;
+    fltk3::color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
+  } else {
+    GraphicsDriver::color(i);
+    Fl_XMap &xmap = fl_xmap[i];
+    if (!xmap.pen) {
+#if USE_COLORMAP
+      if (fl_palette) {
+	set_xmap(xmap, PALETTEINDEX(i));
+      } else {
+#endif
+	unsigned c = fl_cmap[i];
+	set_xmap(xmap, RGB(uchar(c>>24), uchar(c>>16), uchar(c>>8)));
+#if USE_COLORMAP
+      }
+#endif
+    }
+    fl_current_xmap = &xmap;
+    SelectObject(fl_gc, (HGDIOBJ)(xmap.pen));
+  }
+}
+
+void fltk3::GDIGraphicsDriver::color(uchar r, uchar g, uchar b) {
+  static Fl_XMap xmap;
+  COLORREF c = RGB(r,g,b);
+  GraphicsDriver::color( fltk3::rgb_color(r, g, b) );
+  if (!xmap.pen || c != xmap.rgb) {
+    clear_xmap(xmap);
+    set_xmap(xmap, c);
+  }
+  fl_current_xmap = &xmap;
+  SelectObject(fl_gc, (HGDIOBJ)(xmap.pen));
+}
+
+HBRUSH fl_brush() {
+  return fl_brush_action(0);
+}
+
+HBRUSH fl_brush_action(int action) {
+  Fl_XMap *xmap = fl_current_xmap;
+  // Wonko: we use some statistics to cache only a limited number
+  // of brushes:
+#define FL_N_BRUSH 16
+  static struct Fl_Brush {
+    HBRUSH brush;
+    unsigned short usage;
+    Fl_XMap* backref;
+  } brushes[FL_N_BRUSH];
+
+  if (action) {
+    SelectObject(fl_gc, GetStockObject(BLACK_BRUSH));  // Load stock object
+    for (int i=0; i<FL_N_BRUSH; i++) {
+      if (brushes[i].brush)
+        DeleteObject(brushes[i].brush); // delete all brushes in array
+    }
+    return NULL;
+  }
+
+  int i = xmap->brush; // find the associated brush
+  if (i != -1) { // if the brush was allready allocated
+    if (brushes[i].brush == NULL) goto CREATE_BRUSH;
+    if ( (++brushes[i].usage) > 32000 ) { // keep a usage statistic
+      for (int j=0; j<FL_N_BRUSH; j++) {
+	if (brushes[j].usage>16000)
+	  brushes[j].usage -= 16000;
+	else 
+	  brushes[j].usage = 0;
+      }
+    }
+    return brushes[i].brush;
+  } else {
+    int umin = 32000, imin = 0;
+    for (i=0; i<FL_N_BRUSH; i++) {
+      if (brushes[i].brush == NULL) goto CREATE_BRUSH;
+      if (brushes[i].usage<umin) {
+	umin = brushes[i].usage;
+	imin = i;
+      }
+    }
+    i = imin;
+    HGDIOBJ tmpbrush = GetStockObject(BLACK_BRUSH);  // get a stock brush
+    HGDIOBJ oldbrush = SelectObject(fl_gc,tmpbrush); // load in into current context
+    if (oldbrush != brushes[i].brush) SelectObject(fl_gc,oldbrush);  // reload old one
+    DeleteObject(brushes[i].brush);      // delete the one in list
+    brushes[i].brush = NULL;
+    brushes[i].backref->brush = -1;
+  }
+CREATE_BRUSH:
+  brushes[i].brush = CreateSolidBrush(xmap->rgb);
+  brushes[i].usage = 0;
+  brushes[i].backref = xmap;
+  xmap->brush = i;
+  return brushes[i].brush;
+}
+
+void fltk3::free_color(fltk3::Color i, int overlay) {
+  if (overlay) return; // do something about GL overlay?
+  clear_xmap(fl_xmap[i]);
+}
+
+void fltk3::set_color(fltk3::Color i, unsigned c) {
+  if (fl_cmap[i] != c) {
+    clear_xmap(fl_xmap[i]);
+    fl_cmap[i] = c;
+  }
+}
+
+#if USE_COLORMAP
+
+// 'fl_select_palette()' - Make a color palette for 8-bit displays if necessary
+// Thanks to Michael Sweet @ Easy Software Products for this
+
+HPALETTE
+fl_select_palette(void)
+{
+  static char beenhere;
+  if (!beenhere) {
+    beenhere = 1;
+
+    //if (GetDeviceCaps(fl_gc, BITSPIXEL) > 8) return NULL;
+    int nColors = GetDeviceCaps(fl_gc, SIZEPALETTE);
+    if (nColors <= 0 || nColors > 256) return NULL;
+    // this will try to work on < 256 color screens, but will probably
+    // come out quite badly.
+
+    // I lamely try to get this variable-sized object allocated on stack:
+    ulong foo[(sizeof(LOGPALETTE)+256*sizeof(PALETTEENTRY))/sizeof(ulong)+1];
+    LOGPALETTE *pPal = (LOGPALETTE*)foo;
+
+    pPal->palVersion    = 0x300;
+    pPal->palNumEntries = nColors;
+
+    // Build 256 colors from the standard FLTK colormap...
+
+    for (int i = 0; i < nColors; i ++) {
+      pPal->palPalEntry[i].peRed   = (fl_cmap[i] >> 24) & 255;
+      pPal->palPalEntry[i].peGreen = (fl_cmap[i] >> 16) & 255;
+      pPal->palPalEntry[i].peBlue  = (fl_cmap[i] >>  8) & 255;
+      pPal->palPalEntry[i].peFlags = 0;
+    };
+
+    // Create the palette:
+    fl_palette = CreatePalette(pPal);
+  }
+  if (fl_palette) {
+    SelectPalette(fl_gc, fl_palette, FALSE);
+    RealizePalette(fl_gc);
+  }
+  return fl_palette;
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_color_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_cursor.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_cursor.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_cursor.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,333 @@
+//
+// "$Id$"
+//
+// Mouse cursor support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Change the current cursor.
+// Under X the cursor is attached to the X window.  I tried to hide
+// this and pretend that changing the cursor is a drawing function.
+// This avoids a field in the fltk3::Window, and I suspect is more
+// portable to other systems.
+
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/x.h>
+#if !defined(WIN32) && !defined(__APPLE__)
+#  include <X11/cursorfont.h>
+#endif
+#include <fltk3/draw.h>
+
+/**
+  Sets the cursor for the current window to the specified shape and colors.
+  The cursors are defined in the <fltk3/enumerations.h> header file. 
+  */
+void fltk3::cursor(fltk3::Cursor c, fltk3::Color fg, fltk3::Color bg) {
+  if (fltk3::first_window()) fltk3::first_window()->cursor(c,fg,bg);
+}
+/** 
+    Sets the default window cursor as well as its color.
+
+    For back compatibility only.
+*/
+void fltk3::Window::default_cursor(fltk3::Cursor c, fltk3::Color fg, fltk3::Color bg) {
+//  if (c == fltk3::CURSOR_DEFAULT) c = fltk3::CURSOR_ARROW;
+
+  cursor_default = c;
+  cursor_fg      = fg;
+  cursor_bg      = bg;
+
+  cursor(c, fg, bg);
+}
+
+#ifdef WIN32
+
+#  ifndef IDC_HAND
+#    define IDC_HAND	MAKEINTRESOURCE(32649)
+#  endif // !IDC_HAND
+
+void fltk3::Window::cursor(fltk3::Cursor c, fltk3::Color c1, fltk3::Color c2) {
+  if (!shown()) return;
+  // the cursor must be set for the top level window, not for subwindows
+  fltk3::Window *w = window(), *toplevel = this;
+  while (w) { toplevel = w; w = w->window(); }
+  if (toplevel != this) { toplevel->cursor(c, c1, c2); return; }
+  // now set the actual cursor
+  if (c == fltk3::CURSOR_DEFAULT) {
+    c = cursor_default;
+  }
+  if (c > fltk3::CURSOR_NESW) {
+    i->cursor = 0;
+  } else if (c == fltk3::CURSOR_DEFAULT) {
+    i->cursor = fl_default_cursor;
+  } else {
+    LPSTR n;
+    switch (c) {
+    case fltk3::CURSOR_ARROW:	n = IDC_ARROW; break;
+    case fltk3::CURSOR_CROSS:	n = IDC_CROSS; break;
+    case fltk3::CURSOR_WAIT:	n = IDC_WAIT; break;
+    case fltk3::CURSOR_INSERT:	n = IDC_IBEAM; break;
+    case fltk3::CURSOR_HELP:	n = IDC_HELP; break;
+    case fltk3::CURSOR_HAND: {
+          OSVERSIONINFO osvi;
+
+          // Get the OS version: Windows 98 and 2000 have a standard
+	  // hand cursor.
+          memset(&osvi, 0, sizeof(OSVERSIONINFO));
+          osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+          GetVersionEx(&osvi);
+
+          if (osvi.dwMajorVersion > 4 ||
+  	      (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion > 0 &&
+  	       osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)) n = IDC_HAND;
+          else n = IDC_UPARROW;
+	} break;
+    case fltk3::CURSOR_MOVE:	n = IDC_SIZEALL; break;
+    case fltk3::CURSOR_N:
+    case fltk3::CURSOR_S:
+    case fltk3::CURSOR_NS:		n = IDC_SIZENS; break;
+    case fltk3::CURSOR_NE:
+    case fltk3::CURSOR_SW:
+    case fltk3::CURSOR_NESW:	n = IDC_SIZENESW; break;
+    case fltk3::CURSOR_E:
+    case fltk3::CURSOR_W:
+    case fltk3::CURSOR_WE:		n = IDC_SIZEWE; break;
+    case fltk3::CURSOR_SE:
+    case fltk3::CURSOR_NW:
+    case fltk3::CURSOR_NWSE:	n = IDC_SIZENWSE; break;
+    default:			n = IDC_NO; break;
+    }
+    i->cursor = LoadCursor(NULL, n);
+  }
+  SetCursor(i->cursor);
+}
+
+#elif defined(__APPLE__)
+
+#ifdef __BIG_ENDIAN__
+# define E(x) x
+#elif defined __LITTLE_ENDIAN__
+// Don't worry. This will be resolved at compile time
+# define E(x) (x>>8)|((x<<8)&0xff00)
+#else
+# error "Either __LITTLE_ENDIAN__ or __BIG_ENDIAN__ must be defined"
+#endif
+
+extern fltk3::Offscreen fl_create_offscreen_with_alpha(int w, int h);
+
+
+CGContextRef Fl_X::help_cursor_image(void)
+{
+  int w = 20, h = 20;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,w,h);
+  fltk3::color(fltk3::BLACK);
+  fltk3::font(fltk3::COURIER_BOLD, 20);
+  fltk3::draw("?", 1, h-1);
+  fl_end_offscreen();
+  return (CGContextRef)off;
+}
+
+CGContextRef Fl_X::none_cursor_image(void)
+{
+  int w = 20, h = 20;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,w,h);
+  fl_end_offscreen();
+  return (CGContextRef)off;
+}
+
+CGContextRef Fl_X::watch_cursor_image(void)
+{
+  int w, h, r = 5;
+  w = 2*r+6;
+  h = 4*r;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,w,h);
+  CGContextTranslateCTM( (CGContextRef)off, w/2, h/2);
+  fltk3::color(fltk3::WHITE);
+  fltk3::circle(0, 0, r+1);
+  fltk3::color(fltk3::BLACK);
+  fltk3::rectf(int(-r*0.7), int(-r*1.7), int(1.4*r), int(3.4*r));
+  fltk3::rectf(r-1, -1, 3, 3);
+  fltk3::color(fltk3::WHITE);
+  fltk3::pie(-r, -r, 2*r, 2*r, 0, 360);
+  fltk3::color(fltk3::BLACK);
+  fltk3::circle(0,0,r);
+  fltk3::xyline(0, 0, int(-r*.7));
+  fltk3::xyline(0, 0, 0, int(-r*.7));
+  fl_end_offscreen();
+  return (CGContextRef)off;
+}
+
+CGContextRef Fl_X::nesw_cursor_image(void)
+{
+  int c = 7, r = 2*c;
+  int w = r, h = r;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,w,h);
+  CGContextTranslateCTM( (CGContextRef)off, 0, h);
+  CGContextScaleCTM( (CGContextRef)off, 1, -1);
+  fltk3::color(fltk3::BLACK);
+  fltk3::polygon(0, 0, c, 0, 0, c);
+  fltk3::polygon(r, r, r, r-c, r-c, r);
+  fltk3::line_style(fltk3::SOLID, 2, 0);
+  fltk3::line(0,1, r,r+1);
+  fltk3::line_style(fltk3::SOLID, 0, 0);
+  fl_end_offscreen();
+  return (CGContextRef)off;
+}
+
+CGContextRef Fl_X::nwse_cursor_image(void)
+{
+  int c = 7, r = 2*c;
+  int w = r, h = r;
+  fltk3::Offscreen off = fl_create_offscreen_with_alpha(w, h);
+  fl_begin_offscreen(off);
+  CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+  fltk3::rectf(0,0,w,h);
+  CGContextTranslateCTM( (CGContextRef)off, 0, h);
+  CGContextScaleCTM( (CGContextRef)off, 1, -1);
+  fltk3::color(fltk3::BLACK);
+  fltk3::polygon(r-1, 0, r-1, c, r-1-c, 0);
+  fltk3::polygon(-1, r, c-1, r, -1, r-c);
+  fltk3::line_style(fltk3::SOLID, 2, 0);
+  fltk3::line(r-1,1, -1,r+1);
+  fltk3::line_style(fltk3::SOLID, 0, 0);
+  fl_end_offscreen();
+  return (CGContextRef)off;
+}
+
+void fltk3::Window::cursor(fltk3::Cursor c, fltk3::Color, fltk3::Color) {
+  if (c == fltk3::CURSOR_DEFAULT) {
+    c = cursor_default;
+  }
+  if (i) i->set_cursor(c);
+}
+
+#else
+
+// I like the MSWindows resize cursors, so I duplicate them here:
+
+#define CURSORSIZE 16
+#define HOTXY 7
+static struct TableEntry {
+  uchar bits[CURSORSIZE*CURSORSIZE/8];
+  uchar mask[CURSORSIZE*CURSORSIZE/8];
+  ::Cursor cursor;
+} table[] = {
+  {{	// fltk3::CURSOR_NS
+   0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0x80, 0x01, 0x80, 0x01,
+   0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
+   0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00},
+   {
+   0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0xf0, 0x0f, 0xc0, 0x03,
+   0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f,
+   0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01}},
+  {{	// fltk3::CURSOR_EW
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10,
+   0x0c, 0x30, 0xfe, 0x7f, 0xfe, 0x7f, 0x0c, 0x30, 0x08, 0x10, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+   {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1c, 0x38,
+   0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0x1c, 0x38, 0x18, 0x18,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
+  {{	// fltk3::CURSOR_NWSE
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x38, 0x00, 0x78, 0x00,
+   0xe8, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x17, 0x00, 0x1e, 0x00, 0x1c,
+   0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+   {
+   0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x7c, 0x00, 0xfc, 0x00,
+   0xfc, 0x01, 0xec, 0x03, 0xc0, 0x37, 0x80, 0x3f, 0x00, 0x3f, 0x00, 0x3e,
+   0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00}},
+  {{	// fltk3::CURSOR_NESW
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x1e,
+   0x00, 0x17, 0x80, 0x03, 0xc0, 0x01, 0xe8, 0x00, 0x78, 0x00, 0x38, 0x00,
+   0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+   {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3f,
+   0x80, 0x3f, 0xc0, 0x37, 0xec, 0x03, 0xfc, 0x01, 0xfc, 0x00, 0x7c, 0x00,
+   0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00}},
+  {{0}, {0}} // fltk3::CURSOR_NONE & unknown
+};
+
+void fltk3::Window::cursor(fltk3::Cursor c, fltk3::Color fg, fltk3::Color bg) {
+  if (!shown()) return;
+  ::Cursor xc;
+  int deleteit = 0;
+  if (c == fltk3::CURSOR_DEFAULT) {
+    c  = cursor_default;
+    fg = cursor_fg;
+    bg = cursor_bg;
+  }
+
+  if (!c) {
+    xc = None;
+  } else {
+    if (c >= fltk3::CURSOR_NS) {
+      TableEntry *q = (c > fltk3::CURSOR_NESW) ? table+4 : table+(c-fltk3::CURSOR_NS);
+      if (!(q->cursor)) {
+	XColor dummy = { 0 };
+	::Pixmap p = XCreateBitmapFromData(fl_display,
+	  RootWindow(fl_display, fl_screen), (const char*)(q->bits),
+	  CURSORSIZE, CURSORSIZE);
+	::Pixmap m = XCreateBitmapFromData(fl_display,
+	  RootWindow(fl_display, fl_screen), (const char*)(q->mask),
+	  CURSORSIZE, CURSORSIZE);
+	q->cursor = XCreatePixmapCursor(fl_display, p,m,&dummy, &dummy,
+					HOTXY, HOTXY);
+	XFreePixmap(fl_display, m);
+	XFreePixmap(fl_display, p);
+      }
+      xc = q->cursor;
+    } else {
+      xc = XCreateFontCursor(fl_display, (c-1)*2);
+      deleteit = 1;
+    }
+    XColor fgc;
+    uchar r,g,b;
+    fltk3::get_color(fg,r,g,b);
+    fgc.red = r<<8; fgc.green = g<<8; fgc.blue = b<<8;
+    XColor bgc;
+    fltk3::get_color(bg,r,g,b);
+    bgc.red = r<<8; bgc.green = g<<8; bgc.blue = b<<8;
+    XRecolorCursor(fl_display, xc, &fgc, &bgc);
+  }
+  XDefineCursor(fl_display, fl_xid(this), xc);
+  if (deleteit) XFreeCursor(fl_display, xc);
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_cursor.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_curve.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_curve.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_curve.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,110 @@
+//
+// "$Id$"
+//
+// Bezier curve functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_curve.cxx
+  \brief Utility for drawing Bezier curves, adding the points to the
+         current fl_begin/fltk3::vertex/fl_end path.
+
+  Incremental math implementation:
+  I very much doubt this is optimal!  From Foley/vanDam page 511.
+  If anybody has a better algorithm, please send it!
+*/
+
+#include <fltk3/draw.h>
+#include <math.h>
+
+void fltk3::GraphicsDriver::curve(double X0, double Y0,
+	      double X1, double Y1,
+	      double X2, double Y2,
+	      double X3, double Y3) {
+
+  double x = fltk3::transform_x(X0,Y0);
+  double y = fltk3::transform_y(X0,Y0);
+
+  // draw point 0:
+  fltk3::transformed_vertex(x,y);
+
+  double x1 = fltk3::transform_x(X1,Y1);
+  double yy1 = fltk3::transform_y(X1,Y1);
+  double x2 = fltk3::transform_x(X2,Y2);
+  double y2 = fltk3::transform_y(X2,Y2);
+  double x3 = fltk3::transform_x(X3,Y3);
+  double y3 = fltk3::transform_y(X3,Y3);
+
+  // find the area:
+  double a = fabs((x-x2)*(y3-yy1)-(y-y2)*(x3-x1));
+  double b = fabs((x-x3)*(y2-yy1)-(y-y3)*(x2-x1));
+  if (b > a) a = b;
+
+  // use that to guess at the number of segments:
+  int n = int(sqrt(a)/4);
+  if (n > 1) {
+    if (n > 100) n = 100; // make huge curves not hang forever
+
+    double e = 1.0/n;
+
+    // calculate the coefficients of 3rd order equation:
+    double xa = (x3-3*x2+3*x1-x);
+    double xb = 3*(x2-2*x1+x);
+    double xc = 3*(x1-x);
+    // calculate the forward differences:
+    double dx1 = ((xa*e+xb)*e+xc)*e;
+    double dx3 = 6*xa*e*e*e;
+    double dx2 = dx3 + 2*xb*e*e;
+
+    // calculate the coefficients of 3rd order equation:
+    double ya = (y3-3*y2+3*yy1-y);
+    double yb = 3*(y2-2*yy1+y);
+    double yc = 3*(yy1-y);
+    // calculate the forward differences:
+    double dy1 = ((ya*e+yb)*e+yc)*e;
+    double dy3 = 6*ya*e*e*e;
+    double dy2 = dy3 + 2*yb*e*e;
+
+    // draw points 1 .. n-2:
+    for (int m=2; m<n; m++) {
+      x += dx1;
+      dx1 += dx2;
+      dx2 += dx3;
+      y += dy1;
+      dy1 += dy2;
+      dy2 += dy3;
+      fltk3::transformed_vertex(x,y);
+    }
+
+    // draw point n-1:
+    fltk3::transformed_vertex(x+dx1, y+dy1);
+  }
+
+  // draw point n:
+  fltk3::transformed_vertex(x3,y3);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_curve.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_diamond_box.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_diamond_box.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_diamond_box.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,76 @@
+//
+// "$Id$"
+//
+// Diamond box code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in separate files so they are not linked
+// in if not used.
+
+// The diamond box draws best if the area is square!
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+namespace fltk3 {
+  extern uchar* gray_ramp();
+}
+
+void fl_diamond_up_box(int x,int y,int w,int h,fltk3::Color bgcolor) {
+  w &= -2;
+  h &= -2;
+  int x1 = x+w/2;
+  int y1 = y+h/2;
+  fltk3::color(bgcolor); fltk3::polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
+  uchar *g = fltk3::gray_ramp();
+  fltk3::color(g['W']); fltk3::line(x+1, y1, x1, y+1, x+w-1, y1);
+  fltk3::color(g['U']); fltk3::line(x+2, y1, x1, y+2, x+w-2, y1);
+  fltk3::color(g['S']); fltk3::line(x+3, y1, x1, y+3, x+w-3, y1);
+  fltk3::color(g['P']); fltk3::line(x+3, y1, x1, y+h-3, x+w-3, y1);
+  fltk3::color(g['N']); fltk3::line(x+2, y1, x1, y+h-2, x+w-2, y1);
+  fltk3::color(g['H']); fltk3::line(x+1, y1, x1, y+h-1, x+w-1, y1);
+  fltk3::color(g['A']); fltk3::loop(x, y1, x1, y, x+w, y1, x1, y+h);
+}
+
+void fl_diamond_down_box(int x,int y,int w,int h,fltk3::Color bgcolor) {
+  w &= -2;
+  h &= -2;
+  int x1 = x+w/2;
+  int y1 = y+h/2;
+  uchar *g = fltk3::gray_ramp();
+  fltk3::color(g['P']); fltk3::line(x+0, y1, x1, y+0, x+w-0, y1);
+  fltk3::color(g['N']); fltk3::line(x+1, y1, x1, y+1, x+w-1, y1);
+  fltk3::color(g['H']); fltk3::line(x+2, y1, x1, y+2, x+w-2, y1);
+  fltk3::color(g['W']); fltk3::line(x+2, y1, x1, y+h-2, x+w-2, y1);
+  fltk3::color(g['U']); fltk3::line(x+1, y1, x1, y+h-1, x+w-1, y1);
+  fltk3::color(g['S']); fltk3::line(x+0, y1, x1, y+h-0, x+w-0, y1);
+  fltk3::color(bgcolor); fltk3::polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
+  fltk3::color(g['A']); fltk3::loop(x+3, y1, x1, y+3, x+w-3, y1, x1, y+h-3);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_diamond_box.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_dnd.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_dnd.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_dnd.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,38 @@
+//
+// "$Id$"
+//
+// Drag & Drop code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifdef WIN32
+#  include "fl_dnd_win32.cxx"
+#elif defined(__APPLE__)
+//#  include "fl_dnd_mac.cxx"
+#else
+#  include "fl_dnd_x.cxx"
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_dnd.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_dnd_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_dnd_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_dnd_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,555 @@
+//
+// "$Id$"
+//
+// Drag & Drop code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+
+// This file contains win32-specific code for fltk which is always linked
+// in.  Search other files for "WIN32" or filenames ending in _win32.cxx
+// for other system-specific code.
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/Window.h>
+#include <fltk3/utf8.h>
+#include "flstring.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <objidl.h>
+#include <time.h>
+#if defined(__CYGWIN__)
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+
+extern char *fl_selection_buffer[2];
+extern int fl_selection_length[2];
+extern int fl_selection_buffer_length[2];
+extern char fl_i_own_selection[2];
+extern char *fl_locale2utf8(const char *s, UINT codepage = 0);
+extern unsigned int fl_codepage;
+
+fltk3::Window *fl_dnd_target_window = 0;
+
+#include <ole2.h>
+#include <shellapi.h>
+#include <shlobj.h>
+
+
+/**
+ * subclass the IDropTarget to receive data from DnD operations
+ */
+class FLDropTarget : public IDropTarget
+{
+  DWORD m_cRefCount;
+  DWORD lastEffect;
+  int px, py;
+public:
+  FLDropTarget() : m_cRefCount(0) { } // initialize
+  HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) {
+    if (IID_IUnknown==riid || IID_IDropTarget==riid)
+    {
+      *ppvObject=this;
+      ((LPUNKNOWN)*ppvObject)->AddRef();
+      return S_OK;
+    }
+    *ppvObject = NULL;
+    return E_NOINTERFACE;
+  }
+  ULONG STDMETHODCALLTYPE AddRef() { return ++m_cRefCount; }
+  ULONG STDMETHODCALLTYPE Release() {
+    long nTemp;
+    nTemp = --m_cRefCount;
+    if(nTemp==0)
+      delete this;
+    return nTemp;
+  }
+  HRESULT STDMETHODCALLTYPE DragEnter( IDataObject *pDataObj, DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) {
+    if( !pDataObj ) return E_INVALIDARG;
+    // set e_modifiers here from grfKeyState, set e_x and e_root_x
+    // check if FLTK handles this drag and return if it can't (i.e. BMP drag without filename)
+    POINT ppt;
+    fltk3::e_x_root = ppt.x = pt.x;
+    fltk3::e_y_root = ppt.y = pt.y;
+    HWND hWnd = WindowFromPoint( ppt );
+    fltk3::Window *target = fl_find( hWnd );
+    if (target) {
+      fltk3::e_x = fltk3::e_x_root-target->x();
+      fltk3::e_y = fltk3::e_y_root-target->y();
+    }
+    fl_dnd_target_window = target;
+    px = pt.x; py = pt.y;
+    if (fillCurrentDragData(pDataObj)) {
+      // FLTK has no mechanism yet for the different drop effects, so we allow move and copy
+      if ( target && fltk3::handle( fltk3::DND_ENTER, target ) )
+        *pdwEffect = DROPEFFECT_MOVE|DROPEFFECT_COPY; //|DROPEFFECT_LINK;
+      else
+        *pdwEffect = DROPEFFECT_NONE;
+    } else {
+      *pdwEffect = DROPEFFECT_NONE;
+    }
+    lastEffect = *pdwEffect;
+    return S_OK;
+  }
+  HRESULT STDMETHODCALLTYPE DragOver( DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) {
+    if ( px==pt.x && py==pt.y )
+    {
+      *pdwEffect = lastEffect;
+      return S_OK;
+    }
+    if ( !fl_dnd_target_window )
+    {
+      *pdwEffect = lastEffect = DROPEFFECT_NONE;
+      return S_OK;
+    }
+    // set e_modifiers here from grfKeyState, set e_x and e_root_x
+    fltk3::e_x_root = pt.x;
+    fltk3::e_y_root = pt.y;
+    if (fl_dnd_target_window) {
+      fltk3::e_x = fltk3::e_x_root-fl_dnd_target_window->x();
+      fltk3::e_y = fltk3::e_y_root-fl_dnd_target_window->y();
+    }
+    if (fillCurrentDragData(0)) {
+      // fltk3::Group will change DND_DRAG into DND_ENTER and DND_LEAVE if needed
+      if ( fltk3::handle( fltk3::DND_DRAG, fl_dnd_target_window ) )
+        *pdwEffect = DROPEFFECT_MOVE|DROPEFFECT_COPY; //|DROPEFFECT_LINK;
+      else
+        *pdwEffect = DROPEFFECT_NONE;
+    } else {
+      *pdwEffect = DROPEFFECT_NONE;
+    }
+    px = pt.x; py = pt.y;
+    lastEffect = *pdwEffect;
+    return S_OK;
+  }
+  HRESULT STDMETHODCALLTYPE DragLeave() {
+    if ( fl_dnd_target_window && fillCurrentDragData(0))
+    {
+      fltk3::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
+      fl_dnd_target_window = 0;
+      clearCurrentDragData();
+    }
+    return S_OK;
+  }
+  HRESULT STDMETHODCALLTYPE Drop( IDataObject *data, DWORD /*grfKeyState*/, POINTL pt, DWORD* /*pdwEffect*/) {
+    if ( !fl_dnd_target_window )
+      return S_OK;
+    fltk3::Window *target = fl_dnd_target_window;
+    fl_dnd_target_window = 0;
+    fltk3::e_x_root = pt.x;
+    fltk3::e_y_root = pt.y;
+    if (target) {
+      fltk3::e_x = fltk3::e_x_root-target->x();
+      fltk3::e_y = fltk3::e_y_root-target->y();
+    }
+    // tell FLTK that the user released an object on this widget
+    if ( !fltk3::handle( fltk3::DND_RELEASE, target ) )
+      return S_OK;
+
+    fltk3::Widget *w = target;
+    while (w->parent()) w = w->window();
+    HWND hwnd = fl_xid( (fltk3::Window*)w );
+    if (fillCurrentDragData(data)) {
+      int old_event = fltk3::e_number;
+      char *a, *b;
+      a = b = currDragData;
+      while (*a) { // strip the CRLF pairs
+	if (*a == '\r' && a[1] == '\n') a++;
+	else *b++ = *a++;
+      }
+      *b = 0;
+      fltk3::e_text = currDragData;
+      fltk3::e_length = b - currDragData;
+      fltk3::belowmouse()->handle(fltk3::e_number = fltk3::PASTE); // e_text will be invalid after this call
+      fltk3::e_number = old_event;
+      SetForegroundWindow( hwnd );
+      clearCurrentDragData();
+      return S_OK;
+    }
+    return S_OK;
+  }
+private:
+
+  static IDataObject *currDragRef;
+  static char *currDragData;
+  static int currDragSize;
+  static char currDragResult;
+
+  static void clearCurrentDragData() {
+    currDragRef = 0;
+    if (currDragData) free(currDragData);
+    currDragData = 0;
+    currDragSize = 0;
+    currDragResult = 0;
+  }
+  static char fillCurrentDragData(IDataObject *data) {
+    // shortcut through this whole procedure if there is no fresh data
+    if (!data) 
+      return currDragResult;
+    // shortcut through this whole procedure if this is still the same drag event
+    // (* this is safe, because 'currDragRef' is cleared on Leave and Drop events)
+    if (data==currDragRef)
+      return currDragResult;
+
+    // clear currDrag* for a new drag event
+    clearCurrentDragData();
+    
+    currDragRef = data;
+    // fill currDrag* with UTF-8 data, if available
+    FORMATETC fmt = { 0 };
+    STGMEDIUM medium = { 0 };
+    fmt.tymed = TYMED_HGLOBAL;
+    fmt.dwAspect = DVASPECT_CONTENT;
+    fmt.lindex = -1;
+    fmt.cfFormat = CF_UNICODETEXT;
+    // if it is UNICODE text, return a UTF-8-converted copy of it
+    if ( data->GetData( &fmt, &medium )==S_OK )
+    {
+      void *stuff = GlobalLock( medium.hGlobal );
+      unsigned srclen = 0;
+      const wchar_t *wstuff = (const wchar_t *)stuff;
+      while (*wstuff++) srclen++;
+      wstuff = (const wchar_t *)stuff;
+      unsigned utf8len = fltk3::utf8fromwc(NULL, 0, wstuff, srclen);
+      currDragSize = utf8len;
+      currDragData = (char*)malloc(utf8len + 1);
+      fltk3::utf8fromwc(currDragData, currDragSize+1, wstuff, srclen+1); // include null-byte
+      GlobalUnlock( medium.hGlobal );
+      ReleaseStgMedium( &medium );
+      currDragResult = 1;
+      return currDragResult;
+    }
+    fmt.cfFormat = CF_TEXT;
+    // if it is CP1252 text, return a UTF-8-converted copy of it
+    if ( data->GetData( &fmt, &medium )==S_OK )
+    {
+      int len;
+      char *p, *q, *last;
+      unsigned u;
+      void *stuff = GlobalLock( medium.hGlobal );
+      currDragData = (char*)malloc(3 * strlen((char*)stuff) + 10);
+      p = (char*)stuff; 
+      last = p + strlen(p);
+      q = currDragData;
+      while (p < last) {
+	u = fltk3::utf8decode(p, last, &len);
+	p += len;
+	len = fltk3::utf8encode(u, q);
+	q += len;
+	}
+      *q = 0;
+      currDragSize = q - currDragData;
+      currDragData = (char*)realloc(currDragData, currDragSize + 1);
+      GlobalUnlock( medium.hGlobal );
+      ReleaseStgMedium( &medium );
+      currDragResult = 1;
+      return currDragResult;
+    }
+    // else fill currDrag* with filenames, if possible
+    memset(&fmt, 0, sizeof(fmt));
+    fmt.tymed = TYMED_HGLOBAL;
+    fmt.dwAspect = DVASPECT_CONTENT;
+    fmt.lindex = -1;
+    fmt.cfFormat = CF_HDROP;
+    // if it is a pathname list, send an fltk3::PASTE with a \n separated list of filepaths
+    if ( data->GetData( &fmt, &medium )==S_OK )
+    {
+      HDROP hdrop = (HDROP)medium.hGlobal;
+      int i, n, nn = 0, nf = DragQueryFileW( hdrop, (UINT)-1, 0, 0 );
+        for ( i=0; i<nf; i++ ) nn += DragQueryFileW( hdrop, i, 0, 0 );
+      nn += nf;
+        xchar *dst = (xchar *)malloc(nn * sizeof(xchar));
+        xchar *bu = dst;
+      for ( i=0; i<nf; i++ ) {
+          n = DragQueryFileW( hdrop, i, (WCHAR*)dst, nn );
+          dst += n;
+          if ( i<nf-1 ) {
+            *dst++ = L'\n';
+          }
+        }
+         *dst=0;
+
+        currDragData = (char*) malloc(nn * 5 + 1);
+//      fltk3::e_length = fl_unicode2utf(bu, nn, fltk3::e_text);
+        currDragSize = fltk3::utf8fromwc(currDragData, (nn*5+1), bu, nn);
+        currDragData[currDragSize] = 0;
+        free(bu);
+
+//    fltk3::belowmouse()->handle(FL_DROP);
+//      free( fltk3::e_text );
+      ReleaseStgMedium( &medium );
+      currDragResult = 1;
+      return currDragResult;
+    }
+    currDragResult = 0;
+    return currDragResult;
+  }
+} flDropTarget;
+
+IDropTarget *flIDropTarget = &flDropTarget;
+
+IDataObject *FLDropTarget::currDragRef = 0;
+char *FLDropTarget::currDragData = 0;
+int FLDropTarget::currDragSize = 0;
+char FLDropTarget::currDragResult = 0;
+
+/**
+ * this class is needed to allow FLTK apps to be a DnD source
+ */
+class FLDropSource : public IDropSource
+{
+  DWORD m_cRefCount;
+public:
+  FLDropSource() { m_cRefCount = 0; }
+  HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) {
+    if (IID_IUnknown==riid || IID_IDropSource==riid)
+    {
+      *ppvObject=this;
+      ((LPUNKNOWN)*ppvObject)->AddRef();
+      return S_OK;
+    }
+    *ppvObject = NULL;
+    return E_NOINTERFACE;
+  }
+  ULONG STDMETHODCALLTYPE AddRef() { return ++m_cRefCount; }
+  ULONG STDMETHODCALLTYPE Release() {
+    long nTemp;
+    nTemp = --m_cRefCount;
+    if(nTemp==0)
+      delete this;
+    return nTemp;
+  }
+  STDMETHODIMP GiveFeedback( ulong ) { return DRAGDROP_S_USEDEFAULTCURSORS; }
+  STDMETHODIMP QueryContinueDrag( BOOL esc, DWORD keyState ) {
+    if ( esc )
+      return DRAGDROP_S_CANCEL;
+    if ( !(keyState & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON)) )
+      return DRAGDROP_S_DROP;
+    return S_OK;
+  }
+};
+class FLEnum : public IEnumFORMATETC
+{
+public:
+  int n;
+  LONG m_lRefCount;
+
+  ULONG __stdcall AddRef(void) {
+    return InterlockedIncrement(&m_lRefCount);
+  }
+
+  ULONG __stdcall Release(void) {
+    LONG count = InterlockedDecrement(&m_lRefCount);
+    if(count == 0) {
+      delete this;
+      return 0;
+    } else {
+      return count;
+    }
+  }
+
+
+  HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject) {
+    if(iid == IID_IEnumFORMATETC || iid == IID_IUnknown) {
+       AddRef();
+       *ppvObject = this;
+       return S_OK;
+    } else {
+        *ppvObject = 0;
+        return E_NOINTERFACE;
+    }
+  }
+
+  HRESULT __stdcall Next(ULONG celt, FORMATETC * rgelt, ULONG *pceltFetched) {
+    if (n > 0) return S_FALSE;
+    for (ULONG i = 0; i < celt; i++) {
+      n++;
+      rgelt->cfFormat = CF_HDROP;
+      rgelt->dwAspect = DVASPECT_CONTENT;
+      rgelt->lindex = -1;
+      rgelt->ptd = NULL;
+      rgelt->tymed = TYMED_HGLOBAL;
+    }
+    if (pceltFetched) *pceltFetched = celt;
+    return S_OK;
+  }
+
+  HRESULT __stdcall Skip(ULONG celt) {
+    n += celt;
+    return  (n == 0) ? S_OK : S_FALSE;
+  }
+
+  HRESULT __stdcall Reset(void) {
+	n = 0;
+	return S_OK;
+  }
+
+  HRESULT __stdcall Clone(IEnumFORMATETC  **ppenum){
+    *ppenum = new FLEnum();
+    return S_OK;
+  }
+
+  FLEnum(void) {
+    m_lRefCount   = 1;
+    n = 0;
+  }
+
+  virtual ~FLEnum(void) {
+    n = 0;
+  }
+};
+
+
+/**
+  This is the actual object that FLTK can drop somewhere.
+
+  The implementation is minimal, but it should work with all decent Win32 drop targets
+*/
+class FLDataObject : public IDataObject
+{
+  DWORD m_cRefCount;
+  FLEnum *m_EnumF;
+public:
+  FLDataObject() { m_cRefCount = 1; }// m_EnumF = new FLEnum();}
+  HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, LPVOID *ppvObject ) {
+    if (IID_IUnknown==riid || IID_IDataObject==riid)
+    {
+      *ppvObject=this;
+      ((LPUNKNOWN)*ppvObject)->AddRef();
+      return S_OK;
+    }
+    *ppvObject = NULL;
+    return E_NOINTERFACE;
+  }
+  ULONG STDMETHODCALLTYPE AddRef() { return ++m_cRefCount; }
+  ULONG STDMETHODCALLTYPE Release() {
+    long nTemp;
+    nTemp = --m_cRefCount;
+    if(nTemp==0)
+      delete this;
+    return nTemp;
+  }
+  // GetData currently allows UNICODE text through Global Memory only
+  HRESULT STDMETHODCALLTYPE GetData( FORMATETC *pformatetcIn, STGMEDIUM *pmedium ) {
+    if ((pformatetcIn->dwAspect & DVASPECT_CONTENT) &&
+        (pformatetcIn->tymed & TYMED_HGLOBAL) &&
+        (pformatetcIn->cfFormat == CF_UNICODETEXT))
+    {
+      int utf16_len = fltk3::utf8toUtf16(fl_selection_buffer[0], fl_selection_length[0], 0, 0);
+      HGLOBAL gh = GlobalAlloc( GHND, utf16_len * 2 + 2 );
+      char *pMem = (char*)GlobalLock( gh );
+      fltk3::utf8toUtf16(fl_selection_buffer[0], fl_selection_length[0], (unsigned short*)pMem, utf16_len + 1);
+//      HGLOBAL gh = GlobalAlloc( GHND| GMEM_SHARE,
+//                            (fl_selection_length[0]+4) * sizeof(short)
+//                            + sizeof(DROPFILES));
+//      unsigned char *pMem = (unsigned char*)GlobalLock( gh );
+//      if (!pMem) {
+//        GlobalFree(gh);
+//        return DV_E_FORMATETC;
+//      }
+//      DROPFILES *df =(DROPFILES*) pMem;
+//      int l;
+//      df->pFiles = sizeof(DROPFILES);
+//      df->pt.x = 0;
+//      df->pt.y = 0;
+//      df->fNC = FALSE;
+//      for (int i = 0; i < fl_selection_length[0]; i++) {
+//        if (fl_selection_buffer[0][i] == '\n') {
+//          fl_selection_buffer[0][i] = '\0';
+//        }
+//      }
+//
+//        df->fWide = TRUE;
+//        l = fl_utf2unicode((unsigned char*)fl_selection_buffer[0],
+//                             fl_selection_length[0], (xchar*)(((char*)pMem)
+//                              + sizeof(DROPFILES)));
+//
+//      pMem[l * sizeof(WCHAR) + sizeof(DROPFILES)] = 0;
+//      pMem[l * sizeof(WCHAR) + 1 + sizeof(DROPFILES)] = 0;
+//      pMem[l * sizeof(WCHAR) + 2 + sizeof(DROPFILES)] = 0;
+//      pMem[l * sizeof(WCHAR) + 3 + sizeof(DROPFILES)] = 0;
+      pmedium->tymed	      = TYMED_HGLOBAL;
+      pmedium->hGlobal	      = gh;
+      pmedium->pUnkForRelease = NULL;
+      GlobalUnlock( gh );
+      return S_OK;
+    }
+    return DV_E_FORMATETC;
+  }
+  HRESULT STDMETHODCALLTYPE QueryGetData( FORMATETC *pformatetc )
+  {
+    if ((pformatetc->dwAspect & DVASPECT_CONTENT) &&
+        (pformatetc->tymed & TYMED_HGLOBAL) &&
+        (pformatetc->cfFormat == CF_UNICODETEXT))
+      return S_OK;
+    return DV_E_FORMATETC;
+  }
+//  HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD dir, IEnumFORMATETC** ppenumFormatEtc) {
+//	*ppenumFormatEtc = m_EnumF;
+//	return S_OK;
+//  }
+
+  // all the following methods are not really needed for a DnD object
+  HRESULT STDMETHODCALLTYPE GetDataHere( FORMATETC* /*pformatetcIn*/, STGMEDIUM* /*pmedium*/) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc( FORMATETC* /*in*/, FORMATETC* /*out*/) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE SetData( FORMATETC* /*pformatetc*/, STGMEDIUM* /*pmedium*/, BOOL /*fRelease*/) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD /*dir*/, IEnumFORMATETC** /*ppenumFormatEtc*/) { return E_NOTIMPL; }
+//  HRESULT STDMETHODCALLTYPE EnumFormatEtc( DWORD dir, IEnumFORMATETC** ppenumFormatEtc) {*ppenumFormatEtc = m_EnumF; return S_OK;}
+  HRESULT STDMETHODCALLTYPE DAdvise( FORMATETC* /*pformatetc*/, DWORD /*advf*/,
+      IAdviseSink* /*pAdvSink*/, DWORD* /*pdwConnection*/) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE DUnadvise( DWORD /*dwConnection*/) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE EnumDAdvise( IEnumSTATDATA** /*ppenumAdvise*/) { return E_NOTIMPL; }
+};
+
+
+int fltk3::dnd()
+{
+  DWORD dropEffect;
+  ReleaseCapture();
+
+  FLDataObject *fdo = new FLDataObject;
+  fdo->AddRef();
+  FLDropSource *fds = new FLDropSource;
+  fds->AddRef();
+
+  HRESULT ret = DoDragDrop( fdo, fds, DROPEFFECT_MOVE|DROPEFFECT_LINK|DROPEFFECT_COPY, &dropEffect );
+
+  fdo->Release();
+  fds->Release();
+
+  fltk3::Widget *w = fltk3::pushed();
+  if ( w )
+  {
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::RELEASE);
+    fltk3::e_number = old_event;
+    fltk3::pushed( 0 );
+  }
+  if ( ret==DRAGDROP_S_DROP ) return 1; // or DD_S_CANCEL
+  return 0;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_dnd_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_dnd_x.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_dnd_x.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_dnd_x.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,202 @@
+//
+// "$Id$"
+//
+// Drag & Drop code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/x.h>
+#include "flstring.h"
+
+
+extern Atom fl_XdndAware;
+extern Atom fl_XdndSelection;
+extern Atom fl_XdndEnter;
+extern Atom fl_XdndTypeList;
+extern Atom fl_XdndPosition;
+extern Atom fl_XdndLeave;
+extern Atom fl_XdndDrop;
+extern Atom fl_XdndStatus;
+extern Atom fl_XdndActionCopy;
+extern Atom fl_XdndFinished;
+//extern Atom fl_XdndProxy;
+extern Atom fl_XdndURIList;
+extern Atom fl_XaUtf8String;
+
+extern char fl_i_own_selection[2];
+extern char *fl_selection_buffer[2];
+
+extern void fl_sendClientMessage(::Window window, Atom message,
+                                 unsigned long d0,
+                                 unsigned long d1=0,
+                                 unsigned long d2=0,
+                                 unsigned long d3=0,
+                                 unsigned long d4=0);
+
+// return version # of Xdnd this window supports.  Also change the
+// window to the proxy if it uses a proxy:
+static int dnd_aware(::Window& window) {
+  Atom actual; int format; unsigned long count, remaining;
+  unsigned char *data = 0;
+  XGetWindowProperty(fl_display, window, fl_XdndAware,
+		     0, 4, False, XA_ATOM,
+		     &actual, &format,
+		     &count, &remaining, &data);
+  if (actual == XA_ATOM && format==32 && count && data)
+    return int(*(Atom*)data);
+  return 0;
+}
+
+static int grabfunc(int event) {
+  if (event == fltk3::RELEASE) fltk3::pushed(0);
+  return 0;
+}
+
+extern int (*fl_local_grab)(int); // in Fl.cxx
+
+// send an event to an fltk window belonging to this program:
+static int local_handle(int event, fltk3::Window* window) {
+  fl_local_grab = 0;
+  fltk3::e_x = fltk3::e_x_root-window->x();
+  fltk3::e_y = fltk3::e_y_root-window->y();
+  int ret = fltk3::handle(event,window);
+  fl_local_grab = grabfunc;
+  return ret;
+}
+
+int fltk3::dnd() {
+  fltk3::Window *source_fl_win = fltk3::first_window();
+  fltk3::first_window()->cursor(fltk3::CURSOR_MOVE);
+  ::Window source_window = fl_xid(fltk3::first_window());
+  fl_local_grab = grabfunc;
+  ::Window target_window = 0;
+  fltk3::Window* local_window = 0;
+  int dndversion = 4; int dest_x, dest_y;
+  XSetSelectionOwner(fl_display, fl_XdndSelection, fltk3::message_window, fl_event_time);
+
+  while (fltk3::pushed()) {
+
+    // figure out what window we are pointing at:
+    ::Window new_window = 0; int new_version = 0;
+    fltk3::Window* new_local_window = 0;
+    for (::Window child = RootWindow(fl_display, fl_screen);;) {
+      ::Window root; unsigned int junk3;
+      XQueryPointer(fl_display, child, &root, &child,
+		    &e_x_root, &e_y_root, &dest_x, &dest_y, &junk3);
+      if (!child) {
+	if (!new_window && (new_version = dnd_aware(root))) new_window = root;
+	break;
+      }
+      new_window = child;
+      if ((new_local_window = fl_find(child))) break;
+      if ((new_version = dnd_aware(new_window))) break;
+    }
+
+    if (new_window != target_window) {
+      if (local_window) {
+	local_handle(fltk3::DND_LEAVE, local_window);
+      } else if (dndversion) {
+	fl_sendClientMessage(target_window, fl_XdndLeave, source_window);
+      }
+      dndversion = new_version;
+      target_window = new_window;
+      local_window = new_local_window;
+      if (local_window) {
+	local_handle(fltk3::DND_ENTER, local_window);
+      } else if (dndversion) {
+        // Send an X-DND message to the target window.  In order to
+	// support dragging of files/URLs as well as arbitrary text,
+	// we look at the selection buffer - if the buffer starts
+	// with a common URI scheme, does not contain spaces, and
+	// contains at least one CR LF, then we flag the data as
+	// both a URI list (MIME media type "text/uri-list") and
+	// plain text.  Otherwise, we just say it is plain text.
+        if ((!strncmp(fl_selection_buffer[0], "file:///", 8) ||
+	     !strncmp(fl_selection_buffer[0], "ftp://";, 6) ||
+	     !strncmp(fl_selection_buffer[0], "http://";, 7) ||
+	     !strncmp(fl_selection_buffer[0], "https://";, 8) ||
+	     !strncmp(fl_selection_buffer[0], "ipp://", 6) ||
+	     !strncmp(fl_selection_buffer[0], "ldap:", 5) ||
+	     !strncmp(fl_selection_buffer[0], "mailto:";, 7) ||
+	     !strncmp(fl_selection_buffer[0], "news:";, 5) ||
+	     !strncmp(fl_selection_buffer[0], "smb://", 6)) &&
+	    !strchr(fl_selection_buffer[0], ' ') &&
+	    strstr(fl_selection_buffer[0], "\r\n")) {
+	  // Send file/URI list...
+	  fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
+			       dndversion<<24, fl_XdndURIList, XA_STRING, 0);
+        } else {
+	  // Send plain text...
+	  fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
+			       dndversion<<24, fl_XaUtf8String, 0, 0);
+	}
+      }
+    }
+    if (local_window) {
+      local_handle(fltk3::DND_DRAG, local_window);
+    } else if (dndversion) {
+      fl_sendClientMessage(target_window, fl_XdndPosition, source_window,
+			   0, (e_x_root<<16)|e_y_root, fl_event_time,
+			   fl_XdndActionCopy);
+    }
+    fltk3::wait();
+  }
+
+  if (local_window) {
+    fl_i_own_selection[0] = 1;
+    if (local_handle(fltk3::DND_RELEASE, local_window)) paste(*belowmouse(), 0);
+  } else if (dndversion) {
+    fl_sendClientMessage(target_window, fl_XdndDrop, source_window,
+			 0, fl_event_time);
+  } else if (target_window) {
+    // fake a drop by clicking the middle mouse button:
+    XButtonEvent msg;
+    msg.type = ButtonPress;
+    msg.window = target_window;
+    msg.root = RootWindow(fl_display, fl_screen);
+    msg.subwindow = 0;
+    msg.time = fl_event_time+1;
+    msg.x = dest_x;
+    msg.y = dest_y;
+    msg.x_root = fltk3::e_x_root;
+    msg.y_root = fltk3::e_y_root;
+    msg.state = 0x0;
+    msg.button = Button2;
+    XSendEvent(fl_display, target_window, False, 0L, (XEvent*)&msg);
+    msg.time++;
+    msg.state = 0x200;
+    msg.type = ButtonRelease;
+    XSendEvent(fl_display, target_window, False, 0L, (XEvent*)&msg);
+  }
+
+  fl_local_grab = 0;
+  source_fl_win->cursor(fltk3::CURSOR_DEFAULT);
+  return 1;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_dnd_x.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_draw.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_draw.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_draw.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,486 @@
+//
+// "$Id$"
+//
+// Label drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Implementation of fltk3::draw(const char*,int,int,int,int,fltk3::Align)
+// Used to draw all the labels and text, this routine:
+// Word wraps the labels to fit into their bounding box.
+// Breaks them into lines at the newlines.
+// Expands all unprintable characters to ^X or \nnn notation
+// Aligns them against the inside of the box.
+
+#include <fltk3/utf8.h>
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/Image.h>
+
+#include "flstring.h"
+#include <ctype.h>
+#include <math.h>
+
+#define MAXBUF 1024
+
+char fltk3::draw_shortcut;	// set by fl_labeltypes.cxx
+
+static char* underline_at;
+
+/** 
+    utf8 multibyte char seq. detection an pass-thru routine.
+    \retval false if no utf8 seq detected, no change made. true if utf8 and d copied with s seq.
+    note that for n bytes copied dest incremented of n, but s of n-1 for compatible loop use see below.
+*/
+#define C_IN(c,a,b) ((c)>=(a) && (c)<=(b)) 
+#define C_UTF8(c)   C_IN(c,0x80,0xBF)
+
+static bool handle_utf8_seq(const char * &s,char * &d) {
+  register const unsigned char* p=(const unsigned char*)s;
+  if (p[0] < 0xc2 || p[0] > 0xf4)
+    return false; // not adressed in this function
+  else if ( C_IN(p[0], 0xc2, 0xdf) && C_UTF8(p[1]) ) {
+    d[0]=s[0]; d[1]=s[1];
+    d+=2; s++;
+    // non-overlong 2-byte
+  }
+  else if ( p[0]==0xe0 && C_IN(p[1], 0xa0, 0xbf) && C_UTF8(p[2]) ) {
+    d[0]=s[0]; d[1]=s[1];d[2]=s[2];
+    d+=3; s+=2;
+    //  excluding overlongs
+  }
+  else if (p[0]==0xed && C_IN(p[1], 0x80, 0x9f) && C_UTF8(p[2]) ) {
+    d[0]=s[0]; d[1]=s[1];d[2]=s[2];
+    d+=3; s+=2;
+    //  excluding surrogates
+  }
+  else if (p[0]!=0xed && C_IN(p[0], 0xe1, 0xef) && C_UTF8(p[1]) && C_UTF8(p[2]) ) {
+    d[0]=s[0]; d[1]=s[1];d[2]=s[2];
+    d+=3; s+=2;
+    // straight 3-byte
+  }
+  else if (p[0]==0xf0 && C_IN(p[1], 0x90, 0xbf)   && C_UTF8(p[2]) && C_UTF8(p[3]) ) {
+    d[0]=s[0]; d[1]=s[1]; d[2]=s[2]; d[3]=s[3];
+    d+=4; s+=3;
+    // planes 1-3
+  }
+  else if (C_IN(p[0], 0xf1, 0xf3) && C_UTF8(p[1]) && C_UTF8(p[2]) && C_UTF8(p[3]) ) {
+    d[0]=s[0]; d[1]=s[1]; d[2]=s[2]; d[3]=s[3];
+    d+=4; s+=3;
+    // planes 4-15
+  }
+  else if (p[0]==0xf4 && C_IN(p[1], 0x80, 0x8f)   && C_UTF8(p[2]) && C_UTF8(p[3]) ) {
+    d[0]=s[0]; d[1]=s[1]; d[2]=s[2]; d[3]=s[3];
+    d+=4; s+=3;
+    // planes 16
+  } else { // non utf8 compliant, maybe CP125x or broken utf8 string
+    // fprintf(stderr, "Not UTF8 char \n");
+    return false; 
+  }
+  return true; //  we did handled and copied the utf8 multibyte char seq.
+}
+
+/**
+ Copy \p from to \p buf, replacing unprintable characters with ^X and \\nnn.
+
+ Stop at a newline or if MAXBUF characters written to buffer.
+ Also word-wrap if width exceeds maxw.
+ Returns a pointer to the start of the next line of characters.
+ Sets n to the number of characters put into the buffer.
+ Sets width to the width of the string in the current font.
+*/
+const char*
+fltk3::expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n, 
+	double &width, int wrap, int draw_symbols) {
+  char* o = buf;
+  char* e = buf+(maxbuf-4);
+  underline_at = 0;
+  char* word_end = o;
+  const char* word_start = from;
+  double w = 0;
+
+  const char* p = from;
+  for (;; p++) {
+
+    int c = *p & 255;
+
+    if (!c || c == ' ' || c == '\n') {
+      // test for word-wrap:
+      if (word_start < p && wrap) {
+	double newwidth = w + fltk3::width(word_end, o-word_end);
+	if (word_end > buf && newwidth > maxw) { // break before this word
+	  o = word_end;
+	  p = word_start;
+	  break;
+	}
+	word_end = o;
+	w = newwidth;
+      }
+      if (!c) break;
+      else if (c == '\n') {p++; break;}
+      word_start = p+1;
+    }
+
+    if (o > e) break; // don't overflow buffer
+
+    if (c == '\t') {
+      for (c = fltk3::utf_nb_char((uchar*)buf, o-buf)%8; c<8 && o<e; c++) 
+           *o++ = ' ';
+    } else if (c == '&' && fltk3::draw_shortcut && *(p+1)) {
+      if (*(p+1) == '&') {p++; *o++ = '&';}
+      else if (fltk3::draw_shortcut != 2) underline_at = o;
+    } else if (c < ' ' || c == 127) { // ^X
+      *o++ = '^';
+      *o++ = c ^ 0x40;
+    } else  if (handle_utf8_seq(p, o)) { // figure out if we have an utf8 valid sequence before we determine the nbsp test validity:
+#ifdef __APPLE__
+    } else if (c == 0xCA) { // non-breaking space in MacRoman
+#else
+    } else if (c == 0xA0) { // non-breaking space in ISO 8859
+#endif
+      *o++ = ' ';
+       
+    } else if (c == '@' && draw_symbols) { // Symbol???
+      if (p[1] && p[1] != '@')  break;
+      *o++ = c;
+      if (p[1]) p++;
+    } else {
+      *o++ = c;
+    }
+  }
+
+  width = w + fltk3::width(word_end, o-word_end);
+  *o = 0;
+  n = o-buf;
+  return p;
+}
+
+/**
+  The same as fltk3::draw(const char*,int,int,int,int,fltk3::Align,fltk3::Image*,int) with
+  the addition of the \p callthis parameter, which is a pointer to a text drawing
+  function such as fltk3::draw(const char*, int, int, int) to do the real work
+*/
+void fltk3::draw(
+    const char* str,	// the (multi-line) string
+    int x, int y, int w, int h,	// bounding box
+    fltk3::Align align,
+    void (*callthis)(const char*,int,int,int),
+    fltk3::Image* img, int draw_symbols) 
+{
+  const char* p;
+  const char* e;
+  char buf[MAXBUF];
+  int buflen;
+  char symbol[2][255], *symptr;
+  int symwidth[2], symoffset, symtotal, imgtotal;
+
+  // count how many lines and put the last one into the buffer:
+  int lines;
+  double width;
+
+  // if the image is set as a backdrop, ignore it here
+  if (img && (align & fltk3::ALIGN_IMAGE_BACKDROP)) img = 0;
+      
+  symbol[0][0] = '\0';
+  symwidth[0]  = 0;
+
+  symbol[1][0] = '\0';
+  symwidth[1]  = 0;
+
+  if (draw_symbols) {
+    if (str && str[0] == '@' && str[1] && str[1] != '@') {
+      // Start with a symbol...
+      for (symptr = symbol[0];
+           *str && !isspace(*str) && symptr < (symbol[0] + sizeof(symbol[0]) - 1);
+           *symptr++ = *str++);
+      *symptr = '\0';
+      if (isspace(*str)) str++;
+      symwidth[0] = (w < h ? w : h);
+    }
+
+    if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1) && p[-1] != '@') {
+      strlcpy(symbol[1], p, sizeof(symbol[1]));
+      symwidth[1] = (w < h ? w : h);
+    }
+  }
+
+  symtotal = symwidth[0] + symwidth[1];
+  imgtotal = (img && (align&fltk3::ALIGN_IMAGE_NEXT_TO_TEXT)) ? img->w() : 0;
+  
+  int strw = 0;
+  int strh;
+
+  if (str) {
+    for (p = str, lines=0; p;) {
+      e = fltk3::expand_text(p, buf, MAXBUF, w - symtotal - imgtotal, buflen, width, 
+                         align&fltk3::ALIGN_WRAP, draw_symbols);
+      if (strw<width) strw = (int)width;
+      lines++;
+      if (!*e || (*e == '@' && e[1] != '@' && draw_symbols)) break;
+      p = e;
+    }
+  } else lines = 0;
+  
+  if ((symwidth[0] || symwidth[1]) && lines) {
+    if (symwidth[0]) symwidth[0] = lines * fltk3::height();
+    if (symwidth[1]) symwidth[1] = lines * fltk3::height();
+  }
+
+  symtotal = symwidth[0] + symwidth[1];
+  strh = lines * fltk3::height();
+  
+  // figure out vertical position of the first line:
+  int xpos;
+  int ypos;
+  int height = fltk3::height();
+  int imgvert = ((align&fltk3::ALIGN_IMAGE_NEXT_TO_TEXT)==0);
+  int imgh = img && imgvert ? img->h() : 0;
+  int imgw[2] = {0, 0};
+
+  symoffset = 0;
+
+  if (align & fltk3::ALIGN_BOTTOM) ypos = y+h-(lines-1)*height-imgh;
+  else if (align & fltk3::ALIGN_TOP) ypos = y+height;
+  else ypos = y+(h-lines*height-imgh)/2+height;
+
+  // draw the image unless the "text over image" alignment flag is set...
+  if (img && imgvert && !(align & fltk3::ALIGN_TEXT_OVER_IMAGE)) {
+    if (img->w() > symoffset) symoffset = img->w();
+
+    if (align & fltk3::ALIGN_LEFT) xpos = x + symwidth[0];
+    else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - img->w() - symwidth[1];
+    else xpos = x + (w - img->w() - symtotal) / 2 + symwidth[0];
+
+    img->draw(xpos, ypos - height);
+    ypos += img->h();
+  }
+
+  // draw the image to the side of the text
+  if (img && !imgvert /* && (align & !fltk3::ALIGN_TEXT_NEXT_TO_IMAGE)*/ ) {
+    if (align & fltk3::ALIGN_TEXT_OVER_IMAGE) { // image is right of text
+      imgw[1] = img->w();
+      if (align & fltk3::ALIGN_LEFT) xpos = x + symwidth[0] + strw + 1;
+      else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - symwidth[1] - imgw[1] + 1;
+      else xpos = x + (w - strw - symtotal - imgw[1]) / 2 + symwidth[0] + strw + 1;
+    } else { // image is to the left of the text
+      imgw[0] = img->w();
+      if (align & fltk3::ALIGN_LEFT) xpos = x + symwidth[0] - 1;
+      else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - symwidth[1] - strw - imgw[0] - 1;
+      else xpos = x + (w - strw - symtotal - imgw[0]) / 2 - 1;
+    }
+    int yimg = ypos - height;
+    if (align & fltk3::ALIGN_TOP) ;
+    else if (align & fltk3::ALIGN_BOTTOM) yimg += strh - img->h() - 1;
+    else yimg += (strh - img->h() - 1) / 2;
+    img->draw(xpos, yimg);
+  }
+  
+  // now draw all the lines:
+  if (str) {
+    int desc = fltk3::descent();
+    for (p=str; ; ypos += height) {
+      if (lines>1) e = fltk3::expand_text(p, buf, MAXBUF, w - symtotal - imgtotal, buflen, 
+				width, align&fltk3::ALIGN_WRAP, draw_symbols);
+      else e = "";
+
+      if (width > symoffset) symoffset = (int)(width + 0.5);
+
+      if (align & fltk3::ALIGN_LEFT) xpos = x + symwidth[0] + imgw[0];
+      else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - (int)(width + .5) - symwidth[1] - imgw[1];
+      else xpos = x + (w - (int)(width + .5) - symtotal - imgw[0] - imgw[1]) / 2 + symwidth[0] + imgw[0];
+
+      callthis(buf,buflen,xpos,ypos-desc);
+
+      if (underline_at && underline_at >= buf && underline_at < (buf + buflen))
+	callthis("_",1,xpos+int(fltk3::width(buf,underline_at-buf)),ypos-desc);
+
+      if (!*e || (*e == '@' && e[1] != '@')) break;
+      p = e;
+    }
+  }
+
+  // draw the image if the "text over image" alignment flag is set...
+  if (img && imgvert && (align & fltk3::ALIGN_TEXT_OVER_IMAGE)) {
+    if (img->w() > symoffset) symoffset = img->w();
+
+    if (align & fltk3::ALIGN_LEFT) xpos = x + symwidth[0];
+    else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - img->w() - symwidth[1];
+    else xpos = x + (w - img->w() - symtotal) / 2 + symwidth[0];
+
+    img->draw(xpos, ypos);
+  }
+
+  // draw the symbols, if any...
+  if (symwidth[0]) {
+    // draw to the left
+    if (align & fltk3::ALIGN_LEFT) xpos = x;
+    else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - symtotal - symoffset;
+    else xpos = x + (w - symoffset - symtotal) / 2;
+
+    if (align & fltk3::ALIGN_BOTTOM) ypos = y + h - symwidth[0];
+    else if (align & fltk3::ALIGN_TOP) ypos = y;
+    else ypos = y + (h - symwidth[0]) / 2;
+
+    fltk3::draw_symbol(symbol[0], xpos, ypos, symwidth[0], symwidth[0], fltk3::color());
+  }
+
+  if (symwidth[1]) {
+    // draw to the right
+    if (align & fltk3::ALIGN_LEFT) xpos = x + symoffset + symwidth[0];
+    else if (align & fltk3::ALIGN_RIGHT) xpos = x + w - symwidth[1];
+    else xpos = x + (w - symoffset - symtotal) / 2 + symoffset + symwidth[0];
+
+    if (align & fltk3::ALIGN_BOTTOM) ypos = y + h - symwidth[1];
+    else if (align & fltk3::ALIGN_TOP) ypos = y;
+    else ypos = y + (h - symwidth[1]) / 2;
+
+    fltk3::draw_symbol(symbol[1], xpos, ypos, symwidth[1], symwidth[1], fltk3::color());
+  }
+}
+
+/**
+  Fancy string drawing function which is used to draw all the labels.
+
+  The string is formatted and aligned inside the passed box.
+  Handles '\\t' and '\\n', expands all other control characters to '^X',
+  and aligns inside or against the edges of the box.
+  See fltk3::Widget::align() for values of \p align. The value fltk3::ALIGN_INSIDE
+  is ignored, as this function always prints inside the box.
+  If \p img is provided and is not \p NULL, the image is drawn above or
+  below the text as specified by the \p align value.
+  The \p draw_symbols argument specifies whether or not to look for symbol
+  names starting with the '\@' character'
+  The text length is limited to 1024 characters per line.
+*/
+void fltk3::draw(
+  const char* str,
+  int x, int y, int w, int h,
+  fltk3::Align align,
+  fltk3::Image* img,
+  int draw_symbols)
+{
+  if ((!str || !*str) && !img) return;
+  if (w && h && !fltk3::not_clipped(x, y, w, h) && (align & fltk3::ALIGN_INSIDE)) return;
+  if (align & fltk3::ALIGN_CLIP) 
+    fltk3::push_clip(x, y, w, h);
+  fltk3::draw(str, x, y, w, h, align, fltk3::draw, img, draw_symbols);
+  if (align & fltk3::ALIGN_CLIP) 
+    fltk3::pop_clip();
+}
+
+/**
+  Measure how wide and tall the string will be when printed by the
+  fltk3::draw() function with \p align parameter. If the incoming \p w
+  is non-zero it will wrap to that width.
+  \param[in] str nul-terminated string
+  \param[out] w,h width and height of string in current font
+  \param[in] draw_symbols non-zero to enable @@symbol handling [default=1]
+*/
+void fltk3::measure(const char* str, int& w, int& h, int draw_symbols) {
+  if (!str || !*str) {w = 0; h = 0; return;}
+  h = fltk3::height();
+  const char* p;
+  const char* e;
+  char buf[MAXBUF];
+  int buflen;
+  int lines;
+  double width=0;
+  int W = 0;
+  char symbol[2][255], *symptr;
+  int symwidth[2], symtotal;
+
+  // count how many lines and put the last one into the buffer:
+  symbol[0][0] = '\0';
+  symwidth[0]  = 0;
+
+  symbol[1][0] = '\0';
+  symwidth[1]  = 0;
+
+  if (draw_symbols) {
+    if (str && str[0] == '@' && str[1] && str[1] != '@') {
+      // Start with a symbol...
+      for (symptr = symbol[0];
+           *str && !isspace(*str) && symptr < (symbol[0] + sizeof(symbol[0]) - 1);
+           *symptr++ = *str++);
+      *symptr = '\0';
+      if (isspace(*str)) str++;
+      symwidth[0] = h;
+    }
+
+    if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1) && p[-1]!='@') {
+      strlcpy(symbol[1], p, sizeof(symbol[1]));
+      symwidth[1] = h;
+    }
+  }
+
+  symtotal = symwidth[0] + symwidth[1];
+  
+  for (p = str, lines=0; p;) {
+//    e = expand(p, buf, w - symtotal, buflen, width, w != 0, draw_symbols);
+    e = fltk3::expand_text(p, buf, MAXBUF, w - symtotal, buflen, width, 
+			w != 0, draw_symbols);
+    if ((int)ceil(width) > W) W = (int)ceil(width);
+    lines++;
+    if (!*e || (*e == '@' && e[1] != '@' && draw_symbols)) break;
+    p = e;
+  }
+
+  if ((symwidth[0] || symwidth[1]) && lines) {
+    if (symwidth[0]) symwidth[0] = lines * fltk3::height();
+    if (symwidth[1]) symwidth[1] = lines * fltk3::height();
+  }
+
+  symtotal = symwidth[0] + symwidth[1];
+
+  w = W + symtotal;
+  h = lines*h;
+}
+
+/**
+  This function returns the actual height of the specified \p font
+  and \p size. Normally the font height should always be 'size',
+  but with the advent of XFT, there are (currently) complexities
+  that seem to only be solved by asking the font what its actual
+  font height is. (See STR#2115)
+  
+  This function was originally undocumented in 1.1.x, and was used
+  only by fltk3::TextDisplay. We're now documenting it in 1.3.x so that
+  apps that need precise height info can get it with this function.
+
+  \returns the height of the font in pixels.
+  
+  \todo  In the future, when the XFT issues are resolved, this function
+         should simply return the 'size' value.
+*/
+int fltk3::height(int font, int size) {
+    if ( font == fltk3::font() && size == fltk3::size() ) return(fltk3::height());
+    int tf = fltk3::font(), ts = fltk3::size();   // save
+    fltk3::font(font,size);
+    int height = fltk3::height();
+    fltk3::font(tf,ts);                       // restore
+    return(height);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_draw.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_draw_image.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_draw_image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_draw_image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,578 @@
+//
+// "$Id$"
+//
+// Image drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// I hope a simple and portable method of drawing color and monochrome
+// images.  To keep this simple, only a single storage type is
+// supported: 8 bit unsigned data, byte order RGB, and pixels are
+// stored packed into rows with the origin at the top-left.  It is
+// possible to alter the size of pixels with the "delta" argument, to
+// add alpha or other information per pixel.  It is also possible to
+// change the origin and direction of the image data by messing with
+// the "delta" and "linedelta", making them negative, though this may
+// defeat some of the shortcuts in translating the image for X.
+
+#ifdef WIN32
+#  include "fl_draw_image_win32.cxx"
+#elif defined(__APPLE__)
+#  include "fl_draw_image_mac.cxx"
+#else
+
+// A list of assumptions made about the X display:
+
+// bits_per_pixel must be one of 8, 16, 24, 32.
+
+// scanline_pad must be a power of 2 and greater or equal to 8.
+
+// PsuedoColor visuals must have 8 bits_per_pixel (although the depth
+// may be less than 8).  This is the only limitation that affects any
+// modern X displays, you can't use 12 or 16 bit colormaps.
+
+// The mask bits in TrueColor visuals for each color are
+// contiguous and have at least one bit of each color.  This
+// is not checked for.
+
+// For 24 and 32 bit visuals there must be at least 8 bits of each color.
+
+////////////////////////////////////////////////////////////////
+
+#  include <fltk3/run.h>
+#  include <fltk3/draw.h>
+#  include <fltk3/x.h>
+#  include "Fl_XColor.H"
+#  include "flstring.h"
+
+static XImage xi;	// template used to pass info to X
+static int bytes_per_pixel;
+static int scanline_add;
+static int scanline_mask;
+
+static void (*converter)(const uchar *from, uchar *to, int w, int delta);
+static void (*mono_converter)(const uchar *from, uchar *to, int w, int delta);
+
+static int dir;		// direction-alternator
+static int ri,gi,bi;	// saved error-diffusion value
+
+#  if USE_COLORMAP
+////////////////////////////////////////////////////////////////
+// 8-bit converter with error diffusion
+
+static void color8_converter(const uchar *from, uchar *to, int w, int delta) {
+  int r=ri, g=gi, b=bi;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    to = to+(w-1);
+    d = -delta;
+    td = -1;
+  } else {
+    dir = 1;
+    d = delta;
+    td = 1;
+  }
+  for (; w--; from += d, to += td) {
+    r += from[0]; if (r < 0) r = 0; else if (r>255) r = 255;
+    g += from[1]; if (g < 0) g = 0; else if (g>255) g = 255;
+    b += from[2]; if (b < 0) b = 0; else if (b>255) b = 255;
+    fltk3::Color i = fltk3::color_cube(r*fltk3::NUM_RED/256,g*fltk3::NUM_GREEN/256,b*fltk3::NUM_BLUE/256);
+    Fl_XColor& xmap = fl_xmap[0][i];
+    if (!xmap.mapped) {if (!fl_redmask) fl_xpixel(r,g,b); else fl_xpixel(i);}
+    r -= xmap.r;
+    g -= xmap.g;
+    b -= xmap.b;
+    *to = uchar(xmap.pixel);
+  }
+  ri = r; gi = g; bi = b;
+}
+
+static void mono8_converter(const uchar *from, uchar *to, int w, int delta) {
+  int r=ri, g=gi, b=bi;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    to = to+(w-1);
+    d = -delta;
+    td = -1;
+  } else {
+    dir = 1;
+    d = delta;
+    td = 1;
+  }
+  for (; w--; from += d, to += td) {
+    r += from[0]; if (r < 0) r = 0; else if (r>255) r = 255;
+    g += from[0]; if (g < 0) g = 0; else if (g>255) g = 255;
+    b += from[0]; if (b < 0) b = 0; else if (b>255) b = 255;
+    fltk3::Color i = fltk3::color_cube(r*fltk3::NUM_RED/256,g*fltk3::NUM_GREEN/256,b*fltk3::NUM_BLUE/256);
+    Fl_XColor& xmap = fl_xmap[0][i];
+    if (!xmap.mapped) {if (!fl_redmask) fl_xpixel(r,g,b); else fl_xpixel(i);}
+    r -= xmap.r;
+    g -= xmap.g;
+    b -= xmap.b;
+    *to = uchar(xmap.pixel);
+  }
+  ri = r; gi = g; bi = b;
+}
+
+#  endif
+
+////////////////////////////////////////////////////////////////
+// 16 bit TrueColor converters with error diffusion
+// Cray computers have no 16-bit type, so we use character pointers
+// (which may be slow)
+
+#  ifdef U16
+#    define OUTTYPE U16
+#    define OUTSIZE 1
+#    define OUTASSIGN(v) *t = v
+#  else
+#    define OUTTYPE uchar
+#    define OUTSIZE 2
+#    define OUTASSIGN(v) int tt=v; t[0] = uchar(tt>>8); t[1] = uchar(tt)
+#  endif
+
+static void color16_converter(const uchar *from, uchar *to, int w, int delta) {
+  OUTTYPE *t = (OUTTYPE *)to;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    t = t+(w-1)*OUTSIZE;
+    d = -delta;
+    td = -OUTSIZE;
+  } else {
+    dir = 1;
+    d = delta;
+    td = OUTSIZE;
+  }
+  int r=ri, g=gi, b=bi;
+  for (; w--; from += d, t += td) {
+    r = (r&~fl_redmask)  +from[0]; if (r>255) r = 255;
+    g = (g&~fl_greenmask)+from[1]; if (g>255) g = 255;
+    b = (b&~fl_bluemask) +from[2]; if (b>255) b = 255;
+    OUTASSIGN((
+      ((r&fl_redmask)<<fl_redshift)+
+      ((g&fl_greenmask)<<fl_greenshift)+
+      ((b&fl_bluemask)<<fl_blueshift)
+      ) >> fl_extrashift);
+  }
+  ri = r; gi = g; bi = b;
+}
+
+static void mono16_converter(const uchar *from,uchar *to,int w, int delta) {
+  OUTTYPE *t = (OUTTYPE *)to;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    t = t+(w-1)*OUTSIZE;
+    d = -delta;
+    td = -OUTSIZE;
+  } else {
+    dir = 1;
+    d = delta;
+    td = OUTSIZE;
+  }
+  uchar mask = fl_redmask & fl_greenmask & fl_bluemask;
+  int r=ri;
+  for (; w--; from += d, t += td) {
+    r = (r&~mask) + *from; if (r > 255) r = 255;
+    uchar m = r&mask;
+    OUTASSIGN((
+      (m<<fl_redshift)+
+      (m<<fl_greenshift)+
+      (m<<fl_blueshift)
+      ) >> fl_extrashift);
+  }
+  ri = r;
+}
+
+// special-case the 5r6g5b layout used by XFree86:
+
+static void c565_converter(const uchar *from, uchar *to, int w, int delta) {
+  OUTTYPE *t = (OUTTYPE *)to;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    t = t+(w-1)*OUTSIZE;
+    d = -delta;
+    td = -OUTSIZE;
+  } else {
+    dir = 1;
+    d = delta;
+    td = OUTSIZE;
+  }
+  int r=ri, g=gi, b=bi;
+  for (; w--; from += d, t += td) {
+    r = (r&7)+from[0]; if (r>255) r = 255;
+    g = (g&3)+from[1]; if (g>255) g = 255;
+    b = (b&7)+from[2]; if (b>255) b = 255;
+    OUTASSIGN(((r&0xf8)<<8) + ((g&0xfc)<<3) + (b>>3));
+  }
+  ri = r; gi = g; bi = b;
+}
+
+static void m565_converter(const uchar *from,uchar *to,int w, int delta) {
+  OUTTYPE *t = (OUTTYPE *)to;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    t = t+(w-1)*OUTSIZE;
+    d = -delta;
+    td = -OUTSIZE;
+  } else {
+    dir = 1;
+    d = delta;
+    td = OUTSIZE;
+  }
+  int r=ri;
+  for (; w--; from += d, t += td) {
+    r = (r&7) + *from; if (r > 255) r = 255;
+    OUTASSIGN((r>>3) * 0x841);
+  }
+  ri = r;
+}
+
+////////////////////////////////////////////////////////////////
+// 24bit TrueColor converters:
+
+static void rgb_converter(const uchar *from, uchar *to, int w, int delta) {
+  int d = delta-3;
+  for (; w--; from += d) {
+    *to++ = *from++;
+    *to++ = *from++;
+    *to++ = *from++;
+  }
+}
+
+static void bgr_converter(const uchar *from, uchar *to, int w, int delta) {
+  for (; w--; from += delta) {
+    uchar r = from[0];
+    uchar g = from[1];
+    *to++ = from[2];
+    *to++ = g;
+    *to++ = r;
+  }
+}
+
+static void rrr_converter(const uchar *from, uchar *to, int w, int delta) {
+  for (; w--; from += delta) {
+    *to++ = *from;
+    *to++ = *from;
+    *to++ = *from;
+  }
+}
+
+////////////////////////////////////////////////////////////////
+// 32bit TrueColor converters on a 32 or 64-bit machine:
+
+#  ifdef U64
+#    define STORETYPE U64
+#    if WORDS_BIGENDIAN
+#      define INNARDS32(f) \
+  U64 *t = (U64*)to; \
+  int w1 = w/2; \
+  for (; w1--; from += delta) {U64 i = f; from += delta; *t++ = (i<<32)|(f);} \
+  if (w&1) *t++ = (U64)(f)<<32;
+#    else
+#      define INNARDS32(f) \
+  U64 *t = (U64*)to; \
+  int w1 = w/2; \
+  for (; w1--; from += delta) {U64 i = f; from += delta; *t++ = ((U64)(f)<<32)|i;} \
+  if (w&1) *t++ = (U64)(f);
+#    endif
+#  else
+#    define STORETYPE U32
+#    define INNARDS32(f) \
+  U32 *t = (U32*)to; for (; w--; from += delta) *t++ = f
+#  endif
+
+static void rgbx_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32((unsigned(from[0])<<24)+(from[1]<<16)+(from[2]<<8));
+}
+
+static void xbgr_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32((from[0])+(from[1]<<8)+(from[2]<<16));
+}
+
+static void xrgb_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32((from[0]<<16)+(from[1]<<8)+(from[2]));
+}
+
+static void bgrx_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32((from[0]<<8)+(from[1]<<16)+(unsigned(from[2])<<24));
+}
+
+static void rrrx_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32(unsigned(*from) * 0x1010100U);
+}
+
+static void xrrr_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32(*from * 0x10101U);
+}
+
+static void
+color32_converter(const uchar *from, uchar *to, int w, int delta) {
+  INNARDS32(
+    (from[0]<<fl_redshift)+(from[1]<<fl_greenshift)+(from[2]<<fl_blueshift));
+}
+
+static void
+mono32_converter(const uchar *from,uchar *to,int w, int delta) {
+  INNARDS32(
+    (*from << fl_redshift)+(*from << fl_greenshift)+(*from << fl_blueshift));
+}
+
+////////////////////////////////////////////////////////////////
+
+static void figure_out_visual() {
+
+  fl_xpixel(fltk3::BLACK); // setup fl_redmask, etc, in fltk3::color.cxx
+  fl_xpixel(fltk3::WHITE); // also make sure white is allocated
+
+  static XPixmapFormatValues *pfvlist;
+  static int NUM_pfv;
+  if (!pfvlist) pfvlist = XListPixmapFormats(fl_display,&NUM_pfv);
+  XPixmapFormatValues *pfv;
+  for (pfv = pfvlist; pfv < pfvlist+NUM_pfv; pfv++)
+    if (pfv->depth == fl_visual->depth) break;
+  xi.format = ZPixmap;
+  xi.byte_order = ImageByteOrder(fl_display);
+//i.bitmap_unit = 8;
+//i.bitmap_bit_order = MSBFirst;
+//i.bitmap_pad = 8;
+  xi.depth = fl_visual->depth;
+  xi.bits_per_pixel = pfv->bits_per_pixel;
+
+  if (xi.bits_per_pixel & 7) bytes_per_pixel = 0; // produce fatal error
+  else bytes_per_pixel = xi.bits_per_pixel/8;
+
+  unsigned int n = pfv->scanline_pad/8;
+  if (pfv->scanline_pad & 7 || (n&(n-1)))
+    fltk3::fatal("Can't do scanline_pad of %d",pfv->scanline_pad);
+  if (n < sizeof(STORETYPE)) n = sizeof(STORETYPE);
+  scanline_add = n-1;
+  scanline_mask = -n;
+
+#  if USE_COLORMAP
+  if (bytes_per_pixel == 1) {
+    converter = color8_converter;
+    mono_converter = mono8_converter;
+    return;
+  }
+  if (!fl_visual->red_mask)
+    fltk3::fatal("Can't do %d bits_per_pixel colormap",xi.bits_per_pixel);
+#  endif
+
+  // otherwise it is a TrueColor visual:
+
+  int rs = fl_redshift;
+  int gs = fl_greenshift;
+  int bs = fl_blueshift;
+
+  switch (bytes_per_pixel) {
+
+  case 2:
+    // All 16-bit TrueColor visuals are supported on any machine with
+    // 24 or more bits per integer.
+#  ifdef U16
+    xi.byte_order = WORDS_BIGENDIAN;
+#  else
+    xi.byte_order = 1;
+#  endif
+    if (rs == 11 && gs == 6 && bs == 0 && fl_extrashift == 3) {
+      converter = c565_converter;
+      mono_converter = m565_converter;
+    } else {
+      converter = color16_converter;
+      mono_converter = mono16_converter;
+    }
+    break;
+
+  case 3:
+    if (xi.byte_order) {rs = 16-rs; gs = 16-gs; bs = 16-bs;}
+    if (rs == 0 && gs == 8 && bs == 16) {
+      converter = rgb_converter;
+      mono_converter = rrr_converter;
+    } else if (rs == 16 && gs == 8 && bs == 0) {
+      converter = bgr_converter;
+      mono_converter = rrr_converter;
+    } else {
+      fltk3::fatal("Can't do arbitrary 24bit color");
+    }
+    break;
+
+  case 4:
+    if ((xi.byte_order!=0) != WORDS_BIGENDIAN)
+      {rs = 24-rs; gs = 24-gs; bs = 24-bs;}
+    if (rs == 0 && gs == 8 && bs == 16) {
+      converter = xbgr_converter;
+      mono_converter = xrrr_converter;
+    } else if (rs == 24 && gs == 16 && bs == 8) {
+      converter = rgbx_converter;
+      mono_converter = rrrx_converter;
+    } else if (rs == 8 && gs == 16 && bs == 24) {
+      converter = bgrx_converter;
+      mono_converter = rrrx_converter;
+    } else if (rs == 16 && gs == 8 && bs == 0) {
+      converter = xrgb_converter;
+      mono_converter = xrrr_converter;
+    } else {
+      xi.byte_order = WORDS_BIGENDIAN;
+      converter = color32_converter;
+      mono_converter = mono32_converter;
+    }
+    break;
+
+  default:
+    fltk3::fatal("Can't do %d bits_per_pixel",xi.bits_per_pixel);
+  }
+
+}
+
+#  define MAXBUFFER 0x40000 // 256k
+
+static void innards(const uchar *buf, int X, int Y, int W, int H,
+		    int delta, int linedelta, int mono,
+		    fltk3::DrawImageCb cb, void* userdata)
+{
+  if (!linedelta) linedelta = W*delta;
+
+  int dx, dy, w, h;
+  fltk3::clip_box(X,Y,W,H,dx,dy,w,h);
+  if (w<=0 || h<=0) return;
+  dx -= X;
+  dy -= Y;
+
+  if (!bytes_per_pixel) figure_out_visual();
+  xi.width = w;
+  xi.height = h;
+
+  void (*conv)(const uchar *from, uchar *to, int w, int delta) = converter;
+  if (mono) conv = mono_converter;
+
+  // See if the data is already in the right format.  Unfortunately
+  // some 32-bit x servers (XFree86) care about the unknown 8 bits
+  // and they must be zero.  I can't confirm this for user-supplied
+  // data, so the 32-bit shortcut is disabled...
+  // This can set bytes_per_line negative if image is bottom-to-top
+  // I tested it on Linux, but it may fail on other Xlib implementations:
+  if (buf && (
+#  if 0	// set this to 1 to allow 32-bit shortcut
+      delta == 4 &&
+#    if WORDS_BIGENDIAN
+      conv == rgbx_converter
+#    else
+      conv == xbgr_converter
+#    endif
+      ||
+#  endif
+      conv == rgb_converter && delta==3
+      ) && !(linedelta&scanline_add)) {
+    xi.data = (char *)(buf+delta*dx+linedelta*dy);
+    xi.bytes_per_line = linedelta;
+
+  } else {
+    int linesize = ((w*bytes_per_pixel+scanline_add)&scanline_mask)/sizeof(STORETYPE);
+    int blocking = h;
+    static STORETYPE *buffer;	// our storage, always word aligned
+    static long buffer_size;
+    {int size = linesize*h;
+    if (size > MAXBUFFER) {
+      size = MAXBUFFER;
+      blocking = MAXBUFFER/linesize;
+    }
+    if (size > buffer_size) {
+      delete[] buffer;
+      buffer_size = size;
+      buffer = new STORETYPE[size];
+    }}
+    xi.data = (char *)buffer;
+    xi.bytes_per_line = linesize*sizeof(STORETYPE);
+    if (buf) {
+      buf += delta*dx+linedelta*dy;
+      for (int j=0; j<h; ) {
+	STORETYPE *to = buffer;
+	int k;
+	for (k = 0; j<h && k<blocking; k++, j++) {
+	  conv(buf, (uchar*)to, w, delta);
+	  buf += linedelta;
+	  to += linesize;
+	}
+	XPutImage(fl_display,fl_window,fl_gc, &xi, 0, 0, X+dx, Y+dy+j-k, w, k);
+      }
+    } else {
+      STORETYPE* linebuf = new STORETYPE[(W*delta+(sizeof(STORETYPE)-1))/sizeof(STORETYPE)];
+      for (int j=0; j<h; ) {
+	STORETYPE *to = buffer;
+	int k;
+	for (k = 0; j<h && k<blocking; k++, j++) {
+	  cb(userdata, dx, dy+j, w, (uchar*)linebuf);
+	  conv((uchar*)linebuf, (uchar*)to, w, delta);
+	  to += linesize;
+	}
+	XPutImage(fl_display,fl_window,fl_gc, &xi, 0, 0, X+dx, Y+dy+j-k, w, k);
+      }
+
+      delete[] linebuf;
+    }
+  }
+}
+
+void fltk3::XlibGraphicsDriver::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){
+  innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0);
+}
+void fltk3::XlibGraphicsDriver::draw_image(fltk3::DrawImageCb cb, void* data,
+		   int x, int y, int w, int h,int d) {
+  innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data);
+}
+void fltk3::XlibGraphicsDriver::draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l){
+  innards(buf,x,y,w,h,d,l,1,0,0);
+}
+void fltk3::XlibGraphicsDriver::draw_image_mono(fltk3::DrawImageCb cb, void* data,
+		   int x, int y, int w, int h,int d) {
+  innards(0,x,y,w,h,d,0,1,cb,data);
+}
+
+void fltk3::rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
+  if (fl_visual->depth > 16) {
+    fltk3::color(r,g,b);
+    fltk3::rectf(x,y,w,h);
+  } else {
+    uchar c[3];
+    c[0] = r; c[1] = g; c[2] = b;
+    innards(c,x,y,w,h,0,0,0,0,0);
+  }
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_draw_image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_draw_image_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_draw_image_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_draw_image_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,176 @@
+//
+// "$Id$"
+//
+// MacOS image drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+////////////////////////////////////////////////////////////////
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/Printer.h>
+#include <fltk3/x.h>
+
+#define MAXBUFFER 0x40000 // 256k
+
+static void dataReleaseCB(void *info, const void *data, size_t size)
+{
+  delete[] (uchar *)data;
+}
+
+/*
+ * draw an image based on the input parameters
+ *
+ * buf:       image source data
+ * X, Y:      position (in buffer?!)
+ * W, H:      size of picture (in pixel?)
+ * delta:     distance from pixel to pixel in buf in bytes
+ * linedelta: distance from line to line in buf in bytes
+ * mono:      if set, pixel is one byte - if zero, pixel is 3 byte
+ * cb:        callback to copy image data into (RGB?) buffer
+ *   buf:       pointer to first byte in image source
+ *   x, y:      position in buffer
+ *   w:         width (in bytes?)
+ *   dst:       destination buffer
+ * userdata:  ?
+ */
+static void innards(const uchar *buf, int X, int Y, int W, int H,
+		    int delta, int linedelta, int mono,
+		    fltk3::DrawImageCb cb, void* userdata)
+{
+  if (!linedelta) linedelta = W*delta;
+
+  const void *array = buf;
+  uchar *tmpBuf = 0;
+  if (cb || fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) {
+    tmpBuf = new uchar[ H*W*delta ];
+    if (cb) {
+      for (int i=0; i<H; i++) {
+	cb(userdata, 0, i, W, tmpBuf+i*W*delta);
+      }
+    } else {
+      uchar *p = tmpBuf;
+      for (int i=0; i<H; i++) {
+	memcpy(p, buf+i*linedelta, W*delta);
+	p += W*delta;
+	}
+    }
+    array = (void*)tmpBuf;
+    linedelta = W*delta;
+  }
+  // create an image context
+  CGColorSpaceRef   lut = 0;
+  if (delta<=2) 
+    lut = CGColorSpaceCreateDeviceGray();
+  else
+    lut = CGColorSpaceCreateDeviceRGB();
+  // a release callback is necessary when the fl_gc is a print context because the image data
+  // must be kept until the page is closed. Thus tmpBuf can't be deleted here. It's too early.
+  CGDataProviderRef src = CGDataProviderCreateWithData( 0L, array, linedelta*H, 
+						       tmpBuf ? dataReleaseCB : NULL
+						       );
+  CGImageRef        img = CGImageCreate( W, H, 8, 8*delta, linedelta,
+                            lut, delta&1?kCGImageAlphaNone:kCGImageAlphaNoneSkipLast,
+                            //lut, delta&1?kCGImageAlphaNone:kCGImageAlphaLast,
+                            src, 0L, false, kCGRenderingIntentDefault);
+  // draw the image into the destination context
+  if (img) {
+    CGRect rect = { { X, Y }, { W, H } };
+    Fl_X::q_begin_image(rect, 0, 0, W, H);
+    CGContextDrawImage(fl_gc, rect, img);
+    Fl_X::q_end_image();
+    // release all allocated resources
+    CGImageRelease(img);
+  }
+  CGColorSpaceRelease(lut);
+  CGDataProviderRelease(src);
+  if (img) return; // else fall through to slow mode
+  // following the very save (and very slow) way to write the image into the give port
+  CGContextSetShouldAntialias(fl_gc, false);
+  if ( cb )
+  {
+    uchar *tmpBuf = new uchar[ W*4 ];
+    for ( int i=0; i<H; i++ )
+    {
+      uchar *src = tmpBuf;
+      cb( userdata, 0, i, W, tmpBuf );
+      for ( int j=0; j<W; j++ )
+      {
+        if ( mono )
+          { fltk3::color( src[0], src[0], src[0] ); }
+        else
+          { fltk3::color( src[0], src[1], src[2] ); }
+        CGContextMoveToPoint(fl_gc, X+j, Y+i);
+        CGContextAddLineToPoint(fl_gc, X+j, Y+i);
+        CGContextStrokePath(fl_gc);
+        src+=delta;
+      }
+    }
+    delete[] tmpBuf;
+  }
+  else
+  {
+    for ( int i=0; i<H; i++ )
+    {
+      const uchar *src = buf+i*linedelta;
+      for ( int j=0; j<W; j++ )
+      {
+        if ( mono )
+          fltk3::color( src[0], src[0], src[0] );
+        else
+          fltk3::color( src[0], src[1], src[2] );
+        CGContextMoveToPoint(fl_gc, X+j, Y+i);
+        CGContextAddLineToPoint(fl_gc, X+j, Y+i);
+        CGContextStrokePath(fl_gc);
+        src += delta;
+      }
+    }
+  }
+  CGContextSetShouldAntialias(fl_gc, true);
+}
+
+void fltk3::QuartzGraphicsDriver::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){
+  innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0);
+}
+void fltk3::QuartzGraphicsDriver::draw_image(fltk3::DrawImageCb cb, void* data,
+		   int x, int y, int w, int h,int d) {
+  innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data);
+}
+void fltk3::QuartzGraphicsDriver::draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l){
+  innards(buf,x,y,w,h,d,l,1,0,0);
+}
+void fltk3::QuartzGraphicsDriver::draw_image_mono(fltk3::DrawImageCb cb, void* data,
+		   int x, int y, int w, int h,int d) {
+  innards(0,x,y,w,h,d,0,1,cb,data);
+}
+
+void fltk3::rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
+  fltk3::color(r,g,b);
+  fltk3::rectf(x,y,w,h);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_draw_image_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_draw_image_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_draw_image_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_draw_image_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,345 @@
+//
+// "$Id$"
+//
+// WIN32 image drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// I hope a simple and portable method of drawing color and monochrome
+// images.  To keep this simple, only a single storage type is
+// supported: 8 bit unsigned data, byte order RGB, and pixels are
+// stored packed into rows with the origin at the top-left.  It is
+// possible to alter the size of pixels with the "delta" argument, to
+// add alpha or other information per pixel.  It is also possible to
+// change the origin and direction of the image data by messing with
+// the "delta" and "linedelta", making them negative, though this may
+// defeat some of the shortcuts in translating the image for X.
+
+// Unbelievably (since it conflicts with how most PC software works)
+// Micro$oft picked a bottom-up and BGR storage format for their
+// DIB images.  I'm pretty certain there is a way around this, but
+// I can't find any other than the brute-force method of drawing
+// each line as a separate image.  This may also need to be done
+// if the delta is any amount other than 1, 3, or 4.
+
+////////////////////////////////////////////////////////////////
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/Printer.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+
+#define MAXBUFFER 0x40000 // 256k
+
+#if USE_COLORMAP
+
+// error-diffusion dither into the FLTK colormap
+static void dither(uchar* to, const uchar* from, int w, int delta) {
+  static int ri, gi, bi, dir;
+  int r=ri, g=gi, b=bi;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    to = to+(w-1);
+    d = -delta;
+    td = -1;
+  } else {
+    dir = 1;
+    d = delta;
+    td = 1;
+  }
+  for (; w--; from += d, to += td) {
+    r += from[0]; if (r < 0) r = 0; else if (r>255) r = 255;
+    int rr = r*fltk3::NUM_RED/256;
+    r -= rr*255/(fltk3::NUM_RED-1);
+    g += from[1]; if (g < 0) g = 0; else if (g>255) g = 255;
+    int gg = g*fltk3::NUM_GREEN/256;
+    g -= gg*255/(fltk3::NUM_GREEN-1);
+    b += from[2]; if (b < 0) b = 0; else if (b>255) b = 255;
+    int bb = b*fltk3::NUM_BLUE/256;
+    b -= bb*255/(fltk3::NUM_BLUE-1);
+    *to = uchar(fltk3::COLOR_CUBE+(bb*fltk3::NUM_RED+rr)*fltk3::NUM_GREEN+gg);
+  }
+  ri = r; gi = g; bi = b;
+}
+
+// error-diffusion dither into the FLTK colormap
+static void monodither(uchar* to, const uchar* from, int w, int delta) {
+  static int ri,dir;
+  int r=ri;
+  int d, td;
+  if (dir) {
+    dir = 0;
+    from = from+(w-1)*delta;
+    to = to+(w-1);
+    d = -delta;
+    td = -1;
+  } else {
+    dir = 1;
+    d = delta;
+    td = 1;
+  }
+  for (; w--; from += d, to += td) {
+    r += *from; if (r < 0) r = 0; else if (r>255) r = 255;
+    int rr = r*fltk3::NUM_GRAY/256;
+    r -= rr*255/(fltk3::NUM_GRAY-1);
+    *to = uchar(fltk3::GRAY_RAMP+rr);
+  }
+  ri = r;
+}
+
+#endif // USE_COLORMAP
+
+static void innards(const uchar *buf, int X, int Y, int W, int H,
+		    int delta, int linedelta, int depth,
+		    fltk3::DrawImageCb cb, void* userdata)
+{
+  char indexed = 0;
+
+#if USE_COLORMAP
+  indexed = (fl_palette != 0);
+#endif
+
+  if (depth==0) depth = 3;
+  if (indexed || !fltk3::can_do_alpha_blending()) 
+    depth = (depth-1)|1;
+
+  if (!linedelta) linedelta = W*delta;
+
+  int x, y, w, h;
+  fltk3::clip_box(X,Y,W,H,x,y,w,h);
+  if (w<=0 || h<=0) return;
+  if (buf) buf += (x-X)*delta + (y-Y)*linedelta;
+
+  static U32 bmibuffer[256+12];
+  BITMAPINFO &bmi = *((BITMAPINFO*)bmibuffer);
+  if (!bmi.bmiHeader.biSize) {
+    bmi.bmiHeader.biSize = sizeof(bmi)-4; // does it use this to determine type?
+    bmi.bmiHeader.biPlanes = 1;
+    bmi.bmiHeader.biCompression = BI_RGB;
+    bmi.bmiHeader.biXPelsPerMeter = 0;
+    bmi.bmiHeader.biYPelsPerMeter = 0;
+    bmi.bmiHeader.biClrUsed = 0;
+    bmi.bmiHeader.biClrImportant = 0;
+  }
+#if USE_COLORMAP
+  if (indexed) {
+    for (short i=0; i<256; i++) {
+      *((short*)(bmi.bmiColors)+i) = i;
+    }
+  } else
+#endif
+  if (depth<3) {
+    for (int i=0; i<256; i++) {
+      bmi.bmiColors[i].rgbBlue = (uchar)i;
+      bmi.bmiColors[i].rgbGreen = (uchar)i;
+      bmi.bmiColors[i].rgbRed = (uchar)i;
+      bmi.bmiColors[i].rgbReserved = (uchar)0; // must be zero
+    }
+  }
+  bmi.bmiHeader.biWidth = w;
+#if USE_COLORMAP
+  bmi.bmiHeader.biBitCount = indexed ? 8 : depth*8;
+  int pixelsize = indexed ? 1 : depth;
+#else
+  bmi.bmiHeader.biBitCount = depth*8;
+  int pixelsize = depth;
+#endif
+  if (depth==2) { // special case: gray with alpha
+    bmi.bmiHeader.biBitCount = 32;
+    pixelsize = 4;
+  }
+  int linesize = (pixelsize*w+3)&~3;
+  
+  static U32* buffer;
+  static long buffer_size;
+  int blocking = h;
+  {int size = linesize*h;
+  // when printing, don't limit buffer size not to get a crash in StretchDIBits
+  if (size > MAXBUFFER && fltk3::SurfaceDevice::surface()->class_name() != fltk3::Printer::class_id) {
+    size = MAXBUFFER;
+    blocking = MAXBUFFER/linesize;
+  }
+  if (size > buffer_size) {
+    delete[] buffer;
+    buffer_size = size;
+    buffer = new U32[(size+3)/4];
+  }}
+  bmi.bmiHeader.biHeight = blocking;
+  static U32* line_buffer;
+  if (!buf) {
+    int size = W*delta;
+    static int line_buf_size;
+    if (size > line_buf_size) {
+      delete[] line_buffer;
+      line_buf_size = size;
+      line_buffer = new U32[(size+3)/4];
+    }
+  }
+  for (int j=0; j<h; ) {
+    int k;
+    for (k = 0; j<h && k<blocking; k++, j++) {
+      const uchar* from;
+      if (!buf) { // run the converter:
+	cb(userdata, x-X, y-Y+j, w, (uchar*)line_buffer);
+	from = (uchar*)line_buffer;
+      } else {
+	from = buf;
+	buf += linedelta;
+      }
+      uchar *to = (uchar*)buffer+(blocking-k-1)*linesize;
+#if USE_COLORMAP
+      if (indexed) {
+	if (depth<3)
+	  monodither(to, from, w, delta);
+	else 
+	  dither(to, from, w, delta);
+	to += w;
+      } else
+#endif
+      {
+        int i;
+        switch (depth) {
+          case 1: 
+            for (i=w; i--; from += delta) *to++ = *from;
+            break;
+          case 2:
+	    for (i=w; i--; from += delta, to += 4) {
+	      uchar a = from[1];
+	      uchar gray = (from[0]*a)>>8;
+	      to[0] = gray;
+	      to[1] = gray;
+	      to[2] = gray;
+	      to[3] = a;
+            }
+            break;
+          case 3:
+	    for (i=w; i--; from += delta, to += 3) {
+	      uchar r = from[0];
+	      to[0] = from[2];
+	      to[1] = from[1];
+	      to[2] = r;
+            }
+            break;          
+          case 4:
+	    for (i=w; i--; from += delta, to += 4) {
+              uchar a = from[3];
+	      uchar r = from[0];
+	      to[0] = (from[2]*a)>>8;
+	      to[1] = (from[1]*a)>>8;
+	      to[2] = (r*a)>>8;
+	      to[3] = from[3];
+            }
+            break;          
+        }            
+      }
+    }
+    if(fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) {
+      // if print context, device and logical units are not equal, so SetDIBitsToDevice
+      // does not do the expected job, whereas StretchDIBits does it.
+      StretchDIBits(fl_gc, x, y+j-k, w, k, 0, 0, w, k,
+		    (LPSTR)((uchar*)buffer+(blocking-k)*linesize),
+		    &bmi,
+#if USE_COLORMAP
+		    indexed ? DIB_PAL_COLORS : DIB_RGB_COLORS
+#else
+		    DIB_RGB_COLORS
+#endif
+		    , SRCCOPY );
+      delete[] buffer;
+      buffer = NULL;
+      buffer_size = 0;
+    }
+    else {
+      SetDIBitsToDevice(fl_gc, x, y+j-k, w, k, 0, 0, 0, k,
+			(LPSTR)((uchar*)buffer+(blocking-k)*linesize),
+			&bmi,
+#if USE_COLORMAP
+			indexed ? DIB_PAL_COLORS : DIB_RGB_COLORS
+#else
+			DIB_RGB_COLORS
+#endif
+			);
+      }
+  }
+}
+
+static int fl_abs(int v) { return v<0 ? -v : v; }
+
+void fltk3::GDIGraphicsDriver::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){
+  if (fl_abs(d)&fltk3::IMAGE_WITH_ALPHA) {
+    d ^= fltk3::IMAGE_WITH_ALPHA;
+    innards(buf,x,y,w,h,d,l,fl_abs(d),0,0);
+  } else {
+    innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0);
+  }
+}
+
+void fltk3::GDIGraphicsDriver::draw_image(fltk3::DrawImageCb cb, void* data,
+		   int x, int y, int w, int h,int d) {
+  if (fl_abs(d)&fltk3::IMAGE_WITH_ALPHA) {
+    d ^= fltk3::IMAGE_WITH_ALPHA;
+    innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data);
+  } else {
+    innards(0,x,y,w,h,d,0,(d<3&&d>-3),cb,data);
+  }
+}
+
+void fltk3::GDIGraphicsDriver::draw_image_mono(const uchar* buf, int x, int y, int w, int h, int d, int l){
+  if (fl_abs(d)&fltk3::IMAGE_WITH_ALPHA) {
+    d ^= fltk3::IMAGE_WITH_ALPHA;
+    innards(buf,x,y,w,h,d,l,1,0,0);
+  } else {
+    innards(buf,x,y,w,h,d,l,1,0,0);
+  }
+}
+
+void fltk3::GDIGraphicsDriver::draw_image_mono(fltk3::DrawImageCb cb, void* data,
+		   int x, int y, int w, int h,int d) {
+  if (fl_abs(d)&fltk3::IMAGE_WITH_ALPHA) {
+    d ^= fltk3::IMAGE_WITH_ALPHA;
+    innards(0,x,y,w,h,d,0,1,cb,data);
+  } else {
+    innards(0,x,y,w,h,d,0,1,cb,data);
+  }
+}
+
+void fltk3::rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
+#if USE_COLORMAP
+  // use the error diffusion dithering code to produce a much nicer block:
+  if (fl_palette) {
+    uchar c[3];
+    c[0] = r; c[1] = g; c[2] = b;
+    innards(c,x,y,w,h,0,0,0,0,0);
+    return;
+  }
+#endif
+  fltk3::color(r,g,b);
+  fltk3::rectf(x,y,w,h);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_draw_image_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_draw_pixmap.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_draw_pixmap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_draw_pixmap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,429 @@
+//
+// "$Id$"
+//
+// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Implemented without using the xpm library (which I can't use because
+// it interferes with the color cube used by fltk3::draw_image).
+// Current implementation is cheap and slow, and works best on a full-color
+// display.  Transparency is not handled, and colors are dithered to
+// the color cube.  Color index is achieved by adding the id
+// characters together!  Also mallocs a lot of temporary memory!
+// Notice that there is no pixmap file interface.  This is on purpose,
+// as I want to discourage programs that require support files to work.
+// All data needed by a program ui should be compiled in!!!
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include <stdio.h>
+#include "flstring.h"
+
+static int ncolors, chars_per_pixel;
+
+/**
+  Get the dimensions of a pixmap.
+  An XPM image contains the dimensions in its data. This function
+  returns te width and height.
+  \param[in]  data pointer to XPM image data.
+  \param[out] w,h  width and height of image
+  \returns non-zero if the dimensions were parsed OK
+  \returns 0 if there were any problems
+  */
+int fltk3::measure_pixmap(/*const*/ char* const* data, int &w, int &h) {
+  return fltk3::measure_pixmap((const char*const*)data,w,h);
+}
+
+/**
+  Get the dimensions of a pixmap.
+  \see fltk3::measure_pixmap(char* const* data, int &w, int &h)
+  */
+int fltk3::measure_pixmap(const char * const *cdata, int &w, int &h) {
+  int i = sscanf(cdata[0],"%d%d%d%d",&w,&h,&ncolors,&chars_per_pixel);
+  if (i<4 || w<=0 || h<=0 ||
+      (chars_per_pixel!=1 && chars_per_pixel!=2) ) return w=0;
+  return 1;
+}
+
+#ifdef U64
+
+// The callback from fltk3::draw_image to get a row of data passes this:
+struct pixmap_data {
+  int w, h;
+  const uchar*const* data;
+  union {
+    U64 colors[256];
+    U64* byte1[256];
+  };
+};
+
+// callback for 1 byte per pixel:
+static void cb1(void*v, int x, int y, int w, uchar* buf) {
+  pixmap_data& d = *(pixmap_data*)v;
+  const uchar* p = d.data[y]+x;
+  U64* q = (U64*)buf;
+  for (int X=w; X>0; X-=2, p += 2) {
+    if (X>1) {
+#  if WORDS_BIGENDIAN
+      *q++ = (d.colors[p[0]]<<32) | d.colors[p[1]];
+#  else
+      *q++ = (d.colors[p[1]]<<32) | d.colors[p[0]];
+#  endif
+    } else {
+#  if WORDS_BIGENDIAN
+      *q++ = d.colors[p[0]]<<32;
+#  else
+      *q++ = d.colors[p[0]];
+#  endif
+    }
+  }
+}
+
+// callback for 2 bytes per pixel:
+static void cb2(void*v, int x, int y, int w, uchar* buf) {
+  pixmap_data& d = *(pixmap_data*)v;
+  const uchar* p = d.data[y]+2*x;
+  U64* q = (U64*)buf;
+  for (int X=w; X>0; X-=2) {
+    U64* colors = d.byte1[*p++];
+    int index = *p++;
+    if (X>1) {
+      U64* colors1 = d.byte1[*p++];
+      int index1 = *p++;
+#  if WORDS_BIGENDIAN
+      *q++ = (colors[index]<<32) | colors1[index1];
+#  else
+      *q++ = (colors1[index1]<<32) | colors[index];
+#  endif
+    } else {
+#  if WORDS_BIGENDIAN
+      *q++ = colors[index]<<32;
+#  else
+      *q++ = colors[index];
+#  endif
+    }
+  }
+}
+
+#else // U32
+
+// The callback from fltk3::draw_image to get a row of data passes this:
+struct pixmap_data {
+  int w, h;
+  const uchar*const* data;
+  union {
+    U32 colors[256];
+    U32* byte1[256];
+  };
+};
+
+// callback for 1 byte per pixel:
+static void cb1(void*v, int x, int y, int w, uchar* buf) {
+  pixmap_data& d = *(pixmap_data*)v;
+  const uchar* p = d.data[y]+x;
+  U32* q = (U32*)buf;
+  for (int X=w; X--;) *q++ = d.colors[*p++];
+}
+
+// callback for 2 bytes per pixel:
+static void cb2(void*v, int x, int y, int w, uchar* buf) {
+  pixmap_data& d = *(pixmap_data*)v;
+  const uchar* p = d.data[y]+2*x;
+  U32* q = (U32*)buf;
+  for (int X=w; X--;) {
+    U32* colors = d.byte1[*p++];
+    *q++ = colors[*p++];
+  }
+}
+
+#endif // U64 else U32
+
+uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here
+
+/**
+  Draw XPM image data, with the top-left corner at the given position.
+  The image is dithered on 8-bit displays so you won't lose color
+  space for programs displaying both images and pixmaps.
+  \param[in] data pointer to XPM image data
+  \param[in] x,y  position of top-left corner
+  \param[in] bg   background color
+  \returns 0 if there was any error decoding the XPM data.
+  */
+int fltk3::draw_pixmap(/*const*/ char* const* data, int x,int y,fltk3::Color bg) {
+  return fltk3::draw_pixmap((const char*const*)data,x,y,bg);
+}
+
+#ifdef WIN32
+// to compute an unused color to be used for the pixmap background
+FLTK3_EXPORT UINT win_pixmap_bg_color; // the RGB() of the pixmap background color
+static int color_count; // # of non-transparent colors used in pixmap
+static uchar *used_colors; // used_colors[3*i+j] j=0,1,2 are the RGB values of the ith used color
+
+static void make_unused_color(uchar &r, uchar &g, uchar &b)
+// makes an RGB triplet different from all the colors used in the pixmap
+// and compute win_pixmap_bg_color from this triplet
+{
+  int i;
+  r = 2; g = 3; b = 4;
+  while (1) {
+    for ( i = 0; i < color_count; i++) {
+      if(used_colors[3*i] == r && used_colors[3*i+1] == g && used_colors[3*i+2] == b) break;
+      }
+    if (i >= color_count) {
+      free(used_colors);
+      win_pixmap_bg_color = RGB(r, g, b);
+      return;
+      }
+    if (r < 255) r++;
+    else {
+      r = 0;
+      if (g < 255) g++;
+      else {
+	g = 0;
+	b++;
+	}
+      }
+    }
+}
+#endif
+
+/**
+  Draw XPM image data, with the top-left corner at the given position.
+  \see fltk3::draw_pixmap(char* const* data, int x, int y, fltk3::Color bg)
+  */
+int fltk3::draw_pixmap(const char*const* cdata, int x, int y, fltk3::Color bg) {
+  pixmap_data d;
+  if (!fltk3::measure_pixmap(cdata, d.w, d.h)) return 0;
+  const uchar*const* data = (const uchar*const*)(cdata+1);
+  int transparent_index = -1;
+  uchar *transparent_c = (uchar *)0; // such that transparent_c[0,1,2] are the RGB of the transparent color
+#ifdef WIN32
+  color_count = 0;
+  used_colors = (uchar *)malloc(abs(ncolors)*3*sizeof(uchar));
+#endif
+
+  if (ncolors < 0) {	// FLTK (non standard) compressed colormap
+    ncolors = -ncolors;
+    const uchar *p = *data++;
+    // if first color is ' ' it is transparent (put it later to make
+    // it not be transparent):
+    if (*p == ' ') {
+      uchar* c = (uchar*)&d.colors[(int)' '];
+#ifdef U64
+      *(U64*)c = 0;
+#  if WORDS_BIGENDIAN
+      c += 4;
+#  endif
+#endif
+      transparent_index = ' ';
+      fltk3::get_color(bg, c[0], c[1], c[2]); c[3] = 0;
+      transparent_c = c;
+      p += 4;
+      ncolors--;
+    }
+    // read all the rest of the colors:
+    for (int i=0; i < ncolors; i++) {
+      uchar* c = (uchar*)&d.colors[*p++];
+#ifdef U64
+      *(U64*)c = 0;
+#  if WORDS_BIGENDIAN
+      c += 4;
+#  endif
+#endif
+#ifdef WIN32
+      used_colors[3*color_count] = *p;
+      used_colors[3*color_count+1] = *(p+1);
+      used_colors[3*color_count+2] = *(p+2);
+      color_count++;
+#endif
+      *c++ = *p++;
+      *c++ = *p++;
+      *c++ = *p++;
+#ifdef __APPLE_QUARTZ__
+      *c = 255;
+#else
+      *c = 0;
+#endif
+    }
+  } else {	// normal XPM colormap with names
+    if (chars_per_pixel>1) memset(d.byte1, 0, sizeof(d.byte1));
+    for (int i=0; i<ncolors; i++) {
+      const uchar *p = *data++;
+      // the first 1 or 2 characters are the color index:
+      int ind = *p++;
+      uchar* c;
+      if (chars_per_pixel>1) {
+#ifdef U64
+	U64* colors = d.byte1[ind];
+	if (!colors) colors = d.byte1[ind] = new U64[256];
+#else
+	U32* colors = d.byte1[ind];
+	if (!colors) colors = d.byte1[ind] = new U32[256];
+#endif
+	c = (uchar*)&colors[*p];
+	ind = (ind<<8)|*p++;
+      } else {
+	c = (uchar *)&d.colors[ind];
+      }
+      // look for "c word", or last word if none:
+      const uchar *previous_word = p;
+      for (;;) {
+	while (*p && isspace(*p)) p++;
+	uchar what = *p++;
+	while (*p && !isspace(*p)) p++;
+	while (*p && isspace(*p)) p++;
+	if (!*p) {p = previous_word; break;}
+	if (what == 'c') break;
+	previous_word = p;
+	while (*p && !isspace(*p)) p++;
+      }
+#ifdef U64
+      *(U64*)c = 0;
+#  if WORDS_BIGENDIAN
+      c += 4;
+#  endif
+#endif
+#ifdef __APPLE_QUARTZ__
+      c[3] = 255;
+#endif
+      int parse = fl_parse_color((const char*)p, c[0], c[1], c[2]);
+      if (parse) {
+#ifdef WIN32
+	used_colors[3*color_count] = c[0];
+	used_colors[3*color_count+1] = c[1];
+	used_colors[3*color_count+2] = c[2];
+	color_count++;
+#endif
+	}
+      else {
+        // assume "None" or "#transparent" for any errors
+	// "bg" should be transparent...
+	fltk3::get_color(bg, c[0], c[1], c[2]);
+#ifdef __APPLE_QUARTZ__
+        c[3] = 0;
+#endif
+	transparent_index = ind;
+	transparent_c = c;
+      }
+    }
+  }
+  d.data = data;
+#ifdef WIN32
+  if (transparent_c) {
+    make_unused_color(transparent_c[0], transparent_c[1], transparent_c[2]);
+  }
+  else {
+    uchar r, g, b;
+    make_unused_color(r, g, b);
+  }
+#endif
+  
+#ifdef  __APPLE_QUARTZ__
+  if (fltk3::graphics_driver->class_name() == fltk3::QuartzGraphicsDriver::class_id ) {
+    bool transparent = (transparent_index>=0);
+    transparent = true;
+    U32 *array = new U32[d.w * d.h], *q = array;
+    for (int Y = 0; Y < d.h; Y++) {
+      const uchar* p = data[Y];
+      if (chars_per_pixel <= 1) {
+	for (int X = 0; X < d.w; X++) {
+	  *q++ = d.colors[*p++];
+	}
+      } else {
+	for (int X = 0; X < d.w; X++) {
+	  U32* colors = (U32*)d.byte1[*p++];
+	  *q++ = colors[*p++];
+	}
+      }
+    }
+    CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
+    CGDataProviderRef src = CGDataProviderCreateWithData( 0L, array, d.w * d.h * 4, 0L);
+    CGImageRef img = CGImageCreate(d.w, d.h, 8, 4*8, 4*d.w,
+				   lut, transparent?kCGImageAlphaLast:kCGImageAlphaNoneSkipLast,
+				   src, 0L, false, kCGRenderingIntentDefault);
+    CGColorSpaceRelease(lut);
+    CGDataProviderRelease(src);
+    CGRect rect = { { x, y} , { d.w, d.h } };
+    Fl_X::q_begin_image(rect, 0, 0, d.w, d.h);
+    CGContextDrawImage(fl_gc, rect, img);
+    Fl_X::q_end_image();
+    CGImageRelease(img);
+    delete[] array;
+    }
+  else {
+#endif // __APPLE_QUARTZ__
+
+  // build the mask bitmap used by fltk3::Pixmap:
+  if (fl_mask_bitmap && transparent_index >= 0) {
+    int W = (d.w+7)/8;
+    uchar* bitmap = new uchar[W * d.h];
+    *fl_mask_bitmap = bitmap;
+    for (int Y = 0; Y < d.h; Y++) {
+      const uchar* p = data[Y];
+      if (chars_per_pixel <= 1) {
+	int dw = d.w;
+	for (int X = 0; X < W; X++) {
+	  uchar b = (dw-->0 && *p++ != transparent_index);
+	  if (dw-->0 && *p++ != transparent_index) b |= 2;
+	  if (dw-->0 && *p++ != transparent_index) b |= 4;
+	  if (dw-->0 && *p++ != transparent_index) b |= 8;
+	  if (dw-->0 && *p++ != transparent_index) b |= 16;
+	  if (dw-->0 && *p++ != transparent_index) b |= 32;
+	  if (dw-->0 && *p++ != transparent_index) b |= 64;
+	  if (dw-->0 && *p++ != transparent_index) b |= 128;
+	  *bitmap++ = b;
+	}
+      } else {
+        uchar b = 0, bit = 1;
+	for (int X = 0; X < d.w; X++) {
+	  int ind = *p++;
+	  ind = (ind<<8) | (*p++);
+	  if (ind != transparent_index) b |= bit;
+
+          if (bit < 128) bit <<= 1;
+	  else {
+	    *bitmap++ = b;
+	    b = 0;
+	    bit = 1;
+	  }
+	}
+
+        if (bit > 1) *bitmap++ = b;
+      }
+    }
+  }
+
+  fltk3::draw_image(chars_per_pixel==1 ? cb1 : cb2, &d, x, y, d.w, d.h, 4);
+#ifdef __APPLE_QUARTZ__
+    }
+#endif
+
+  if (chars_per_pixel > 1) for (int i = 0; i < 256; i++) delete[] d.byte1[i];
+  return 1;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_draw_pixmap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_encoding_latin1.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_encoding_latin1.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_encoding_latin1.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,137 @@
+//
+// "$Id$"
+//
+// Convert MSWindows-1252 (Latin-1) encoded text to the local encoding.
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/draw.h>
+#include <fltk3/enumerations.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+#ifdef __APPLE__
+ 
+// These function assume a western code page. If you need to support 
+// scripts that are not part of this code page, you might want to
+// take a look at FLTK2, which uses utf8 for text encoding.
+//
+// By keeping these conversion tables in their own module, they will not
+// be statically linked (by a smart linker) unless actually used.
+//
+// On MS-Windows, nothing need to be converted. We simply return the 
+// original pointer.
+//
+// Most X11 implementations seem to default to Latin-1 as a code since it
+// is a superset of ISO 8859-1, the original wetsern codepage on X11.
+//
+// Apple's OS X however renders text in MacRoman for western settings. The
+// lookup tables below will convert all common character codes and replace
+// unknown characters with an upsidedown question mark.
+
+// This table converts MSWindows-1252/Latin 1 into MacRoman encoding
+static uchar latin2roman[128] = {
+0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0, 
+0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9, 
+0xca, 0xc1, 0xa2, 0xa3, 0xc0, 0xb4, 0xc0, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0xc0, 0xa8, 0xf8, 
+0xa1, 0xb1, 0xc0, 0xc0, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0xc0, 0xbc, 0xc8, 0xc0, 0xc0, 0xc0, 0xc0, 
+0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 
+0xc0, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0xc0, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xc0, 0xc0, 0xa7, 
+0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 
+0xc0, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xc0, 0xc0, 0xd8
+};
+
+// This table converts MacRoman into MSWindows-1252/Latin 1
+static uchar roman2latin[128] = {
+0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, 
+0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc, 
+0x86, 0xb0, 0xa2, 0xa3, 0xa7, 0x95, 0xb6, 0xdf, 0xae, 0xa9, 0x99, 0xb4, 0xa8, 0xbf, 0xc6, 0xd8, 
+0xbf, 0xb1, 0xbf, 0xbf, 0xa5, 0xb5, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xaa, 0xba, 0xbf, 0xe6, 0xf8, 
+0xbf, 0xa1, 0xac, 0xbf, 0x83, 0xbf, 0xbf, 0xab, 0xbb, 0x85, 0xa0, 0xc0, 0xc3, 0xd5, 0x8c, 0x9c, 
+0x96, 0x97, 0x93, 0x94, 0x91, 0x92, 0xf7, 0xbf, 0xff, 0x9f, 0xbf, 0x80, 0x8b, 0x9b, 0xbf, 0xbf, 
+0x87, 0xb7, 0x82, 0x84, 0x89, 0xc2, 0xca, 0xc1, 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4, 
+0xbf, 0xd2, 0xda, 0xdb, 0xd9, 0xbf, 0x88, 0x98, 0xaf, 0xbf, 0xbf, 0xbf, 0xb8, 0xbf, 0xbf, 0xbf
+};
+
+static char *buf = 0;
+static int n_buf = 0;
+
+const char *fltk3::latin1_to_local(const char *t, int n)  
+{
+  if (n==-1) n = strlen(t);
+  if (n<=n_buf) {
+    n_buf = (n + 257) & 0x7fffff00;
+    if (buf) free(buf);
+    buf = (char*)malloc(n_buf);
+  }
+  const uchar *src = (const uchar*)t;
+  uchar *dst = (uchar*)buf;
+  for ( ; n>0; n--) {
+    uchar c = *src++;
+    if (c>127) 
+      *dst = latin2roman[c-128];
+    else
+      *dst = c;
+  }
+  //*dst = 0; // this would be wrong!
+  return buf;
+}
+
+const char *fltk3::local_to_latin1(const char *t, int n)
+{
+  if (n==-1) n = strlen(t);
+  if (n<=n_buf) {
+    n_buf = (n + 257) & 0x7fffff00;
+    if (buf) free(buf);
+    buf = (char*)malloc(n_buf);
+  }
+  const uchar *src = (const uchar*)t;
+  uchar *dst = (uchar*)buf;
+  for ( ; n>0; n--) {
+    uchar c = *src++;
+    if (c>127)
+      *dst++ = roman2latin[c-128];
+    else
+      *dst++ = c;
+  }
+  //*dst = 0; // this would be wrong
+  return buf;
+}
+
+#else 
+
+const char *fltk3::latin1_to_local(const char *t, int) 
+{
+  return t;
+}
+
+const char *fltk3::local_to_latin1(const char *t, int)
+{
+  return t;
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_encoding_latin1.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_encoding_mac_roman.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_encoding_mac_roman.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_encoding_mac_roman.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,134 @@
+//
+// "$Id$"
+//
+// Convert Mac Roman encoded text to the local encoding.
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/draw.h>
+#include <fltk3/enumerations.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+// These function assume a western code page. If you need to support 
+// scripts that are not part of this code page, you might want to
+// take a look at FLTK2, which uses utf8 for text encoding.
+//
+// By keeping these conversion tables in their own module, they will not
+// be statically linked (by a smart linker) unless actually used.
+//
+// On Mac OS X, nothing need to be converted. We simply return the 
+// original pointer.
+//
+// MSWindows and X11 render text in ISO or Latin-1 for western settings. The
+// lookup tables below will convert all common character codes and replace
+// unknown characters with an upsidedown question mark.
+
+#ifdef __APPLE__
+
+const char *fltk3::mac_roman_to_local(const char *t, int)
+{
+  return t;
+}
+
+const char *fltk3::local_to_mac_roman(const char *t, int)
+{
+  return t;
+}
+
+#else
+
+// This table converts MSWindows-1252/Latin 1 into MacRoman encoding
+static uchar latin2roman[128] = {
+0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0, 
+0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9, 
+0xca, 0xc1, 0xa2, 0xa3, 0xc0, 0xb4, 0xc0, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0xc0, 0xa8, 0xf8, 
+0xa1, 0xb1, 0xc0, 0xc0, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0xc0, 0xbc, 0xc8, 0xc0, 0xc0, 0xc0, 0xc0, 
+0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 
+0xc0, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0xc0, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xc0, 0xc0, 0xa7, 
+0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 
+0xc0, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xc0, 0xc0, 0xd8
+};
+
+// This table converts MacRoman into MSWindows-1252/Latin 1
+static uchar roman2latin[128] = {
+0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, 
+0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc, 
+0x86, 0xb0, 0xa2, 0xa3, 0xa7, 0x95, 0xb6, 0xdf, 0xae, 0xa9, 0x99, 0xb4, 0xa8, 0xbf, 0xc6, 0xd8, 
+0xbf, 0xb1, 0xbf, 0xbf, 0xa5, 0xb5, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xaa, 0xba, 0xbf, 0xe6, 0xf8, 
+0xbf, 0xa1, 0xac, 0xbf, 0x83, 0xbf, 0xbf, 0xab, 0xbb, 0x85, 0xa0, 0xc0, 0xc3, 0xd5, 0x8c, 0x9c, 
+0x96, 0x97, 0x93, 0x94, 0x91, 0x92, 0xf7, 0xbf, 0xff, 0x9f, 0xbf, 0x80, 0x8b, 0x9b, 0xbf, 0xbf, 
+0x87, 0xb7, 0x82, 0x84, 0x89, 0xc2, 0xca, 0xc1, 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4, 
+0xbf, 0xd2, 0xda, 0xdb, 0xd9, 0xbf, 0x88, 0x98, 0xaf, 0xbf, 0xbf, 0xbf, 0xb8, 0xbf, 0xbf, 0xbf
+};
+
+static char *buf = 0;
+static int n_buf = 0;
+
+const char *fltk3::local_to_mac_roman(const char *t, int n)  
+{
+  if (n==-1) n = strlen(t);
+  if (n<=n_buf) {
+    n_buf = (n + 257) & 0x7fffff00;
+    if (buf) free(buf);
+    buf = (char*)malloc(n_buf);
+  }
+  const uchar *src = (const uchar*)t;
+  uchar *dst = (uchar*)buf;
+  for ( ; n>0; n--) {
+    uchar c = *src;
+    if (c>127) 
+      *dst = latin2roman[c-128];
+    else
+      *dst = c;
+  }
+  //*dst = 0; // this would be wrong!
+  return buf;
+}
+
+const char *fltk3::mac_roman_to_local(const char *t, int n)
+{
+  if (n==-1) n = strlen(t);
+  if (n<=n_buf) {
+    n_buf = (n + 257) & 0x7fffff00;
+    if (buf) free(buf);
+    buf = (char*)malloc(n_buf);
+  }
+  const uchar *src = (const uchar*)t;
+  uchar *dst = (uchar*)buf;
+  for ( ; n>0; n--) {
+    uchar c = *src++;
+    if (c>127)
+      *dst++ = roman2latin[c-128];
+    else
+      *dst++ = c;
+  }
+  //*dst = 0; // this would be wrong
+  return buf;
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_encoding_mac_roman.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_engraved_label.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_engraved_label.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_engraved_label.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,77 @@
+//
+// "$Id$"
+//
+// Engraved label drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Drawing code for XForms style engraved & embossed labels
+
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/draw.h>
+
+// data[] is dx, dy, color triples
+
+static void innards(
+    const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align,
+    int data[][3], int n)
+{
+  fltk3::Align a1 = align;
+  if (a1 & fltk3::ALIGN_CLIP) {
+    fltk3::push_clip(X, Y, W, H); a1 = (fltk3::Align)(a1&~fltk3::ALIGN_CLIP);}
+  fltk3::font((fltk3::Font)o->font, o->size);
+  for (int i = 0; i < n; i++) {
+    fltk3::color((fltk3::Color)(i < n-1 ? data[i][2] : o->color));
+    fltk3::draw(o->value, X+data[i][0], Y+data[i][1], W, H, a1);
+  }
+  if (align & fltk3::ALIGN_CLIP) fltk3::pop_clip();
+}
+
+void fl_shadow_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align)
+{
+  static int data[2][3] = {{2,2,fltk3::DARK3},{0,0,0}};
+  innards(o, X, Y, W, H, align, data, 2);
+}
+
+void fl_engraved_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align)
+{
+  static int data[7][3] = {
+    {1,0,fltk3::LIGHT3},{1,1,fltk3::LIGHT3},{0,1,fltk3::LIGHT3},
+    {-1,0,fltk3::DARK3},{-1,-1,fltk3::DARK3},{0,-1,fltk3::DARK3},
+    {0,0,0}};
+  innards(o, X, Y, W, H, align, data, 7);
+}
+
+void fl_embossed_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align)
+{
+  static int data[7][3] = {
+    {-1,0,fltk3::LIGHT3},{-1,-1,fltk3::LIGHT3},{0,-1,fltk3::LIGHT3},
+    {1,0,fltk3::DARK3},{1,1,fltk3::DARK3},{0,1,fltk3::DARK3},
+    {0,0,0}};
+  innards(o, X, Y, W, H, align, data, 7);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_engraved_label.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_file_dir.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_file_dir.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_file_dir.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,200 @@
+//
+// "$Id$"
+//
+// File chooser widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include "flstring.h"
+#include <fltk3/filename.h>
+#include <fltk3/FileChooser.h>
+#include <fltk3/ask.h>
+
+
+static fltk3::FileChooser	*fc = (fltk3::FileChooser *)0;
+static void		(*current_callback)(const char*) = 0;
+static const char	*current_label = fltk3::ok;
+
+
+// Do a file chooser callback...
+static void callback(fltk3::FileChooser *, void*) {
+  if (current_callback && fc->value())
+    (*current_callback)(fc->value());
+}
+
+/** \addtogroup  group_comdlg 
+    @{ */
+
+/** 
+    Set the file chooser callback
+    \note \#include <fltk3/FileChooser.h>
+    \relates fltk3::FileChooser
+*/
+void fltk3::file_chooser_callback(void (*cb)(const char*)) {
+  current_callback = cb;
+}
+
+
+/** 
+    Set the "OK" button label
+    \note \#include <fltk3/FileChooser.h>
+    \relates fltk3::FileChooser
+*/
+void fltk3::file_chooser_ok_label(const char *l) {
+  if (l) current_label = l;
+  else current_label = fltk3::ok;
+}
+
+/** 
+    Shows a file chooser dialog and gets a filename. 
+    \note \#include <fltk3/FileChooser.h>
+    \image html fltk3::FileChooser.jpg 
+    \image latex  fltk3::FileChooser.jpg "fltk3::FileChooser" width=12cm
+    \param[in] message text in title bar
+    \param[in] pat filename pattern filter
+    \param[in] fname initial/default filename selection
+    \param[in] relative 0 for absolute path name, relative path name otherwise
+    \return the user selected filename, in absolute or relative format 
+            or NULL if user cancels
+    \relates fltk3::FileChooser
+*/
+char *					// O - Filename or NULL
+fltk3::file_chooser(const char *message,	// I - Message in titlebar
+                const char *pat,	// I - Filename pattern
+		const char *fname,	// I - Initial filename selection
+		int        relative) {	// I - 0 for absolute path
+  static char	retname[FLTK3_PATH_MAX];		// Returned filename
+
+  if (!fc) {
+    if (!fname || !*fname) fname = ".";
+
+    fc = new fltk3::FileChooser(fname, pat, fltk3::FileChooser::CREATE, message);
+    fc->callback(callback, 0);
+  } else {
+    fc->type(fltk3::FileChooser::CREATE);
+    // see, if we use the same pattern between calls
+    char same_pattern = 0;
+    const char *fcf = fc->filter();
+    if ( fcf && pat && strcmp(fcf, pat)==0)
+      same_pattern = 1;
+    else if ( (fcf==0L || *fcf==0) && (pat==0L || *pat==0) )
+      same_pattern = 1;
+    // now set the pattern to the new pattern (even if they are the same)
+    fc->filter(pat);
+    fc->label(message);
+
+    if (!fname) { // null pointer reuses same filename if pattern didn't change
+      if (!same_pattern && fc->value()) {
+	// if pattern is different, remove name but leave old directory:
+	strlcpy(retname, fc->value(), sizeof(retname));
+
+	char *p = strrchr(retname, '/');
+
+        if (p) {
+	  // If the filename is "/foo", then the directory will be "/", not
+	  // ""...
+	  if (p == retname)
+	    retname[1] = '\0';
+	  else
+	    *p = '\0';
+	}
+	// Set the directory...
+	fc->value(retname);
+      } else {
+        // re-use the previously selected name
+      }
+    } else if (!*fname) { // empty filename reuses directory with empty name
+      const char *fcv = fc->value();
+      if (fcv) 
+        strlcpy(retname, fc->value(), sizeof(retname));
+      else 
+        *retname = 0;
+      const char *n = fltk3::filename_name(retname);
+      if (n) *((char*)n) = 0;
+      fc->value("");
+      fc->directory(retname);
+    } else {
+       fc->value(fname);
+    }
+  }
+
+  fc->ok_label(current_label);
+  fc->show();
+
+  while (fc->shown())
+    fltk3::wait();
+
+  if (fc->value() && relative) {
+    fltk3::filename_relative(retname, sizeof(retname), fc->value());
+
+    return retname;
+  } else if (fc->value()) return (char *)fc->value();
+  else return 0;
+}
+
+/** Shows a file chooser dialog and gets a directory.
+    \note \#include <fltk3/FileChooser.h>
+    \param[in] message title bar text
+    \param[in] fname initial/default directory name
+    \param[in] relative 0 for absolute path return, relative otherwise
+    \return the directory path string chosen by the user or NULL if user cancels
+    \relates fltk3::FileChooser
+*/
+char *					// O - Directory or NULL
+fltk3::dir_chooser(const char *message,	// I - Message for titlebar
+               const char *fname,	// I - Initial directory name
+	       int        relative)	// I - 0 for absolute
+{
+  static char	retname[FLTK3_PATH_MAX];		// Returned directory name
+
+  if (!fc) {
+    if (!fname || !*fname) fname = ".";
+
+    fc = new fltk3::FileChooser(fname, "*", fltk3::FileChooser::CREATE |
+                                         fltk3::FileChooser::DIRECTORY, message);
+    fc->callback(callback, 0);
+  } else {
+    fc->type(fltk3::FileChooser::CREATE | fltk3::FileChooser::DIRECTORY);
+    fc->filter("*");
+    if (fname && *fname) fc->value(fname);
+    fc->label(message);
+  }
+
+  fc->show();
+
+  while (fc->shown())
+    fltk3::wait();
+
+  if (fc->value() && relative) {
+    fltk3::filename_relative(retname, sizeof(retname), fc->value());
+
+    return retname;
+  } else if (fc->value()) return (char *)fc->value();
+  else return 0;
+}
+/** @} */
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_file_dir.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_font.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_font.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_font.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,103 @@
+//
+// "$Id$"
+//
+// Font selection code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifdef WIN32
+# ifndef WIN32_LEAN_AND_MEAN
+#  define WIN32_LEAN_AND_MEAN
+# endif
+/* We require Windows 2000 features such as GetGlyphIndices */
+# if !defined(WINVER) || (WINVER < 0x0500)
+#  ifdef WINVER
+#   undef WINVER
+#  endif
+#  define WINVER 0x0500
+# endif
+# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
+#  ifdef _WIN32_WINNT
+#   undef _WIN32_WINNT
+#  endif
+#  define _WIN32_WINNT 0x0500
+# endif
+#endif
+
+// Select fonts from the FLTK font table.
+#include "flstring.h"
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include "Fl_Font.H"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef WIN32
+#  include "fl_font_win32.cxx"
+#elif defined(__APPLE__)
+#  include "fl_font_mac.cxx"
+#elif USE_XFT
+#  include "fl_font_xft.cxx"
+#else
+#  include "fl_font_x.cxx"
+#endif // WIN32
+
+namespace fltk3 {
+  
+  double width(const char* c) {
+    if (c) return width(c, strlen(c));
+    else return 0.0f;
+  }
+  
+  void draw(const char* str, int x, int y) {
+    draw(str, strlen(str), x, y);
+  }
+  
+  void draw(int angle, const char* str, int x, int y) {
+    draw(angle, str, strlen(str), x, y);//must be fixed!
+  }
+  
+  void text_extents(const char *c, int &dx, int &dy, int &w, int &h) {
+    if (c)  fltk3::text_extents(c, strlen(c), dx, dy, w, h);
+    else {
+      w = 0; h = 0;
+      dx = 0; dy = 0;
+    }
+  } // fltk3::text_extents
+  
+  
+  void draw(const char* str, int l, float x, float y) {
+#ifdef __APPLE__
+    fltk3::graphics_driver->draw(str, l, x, y);
+#else
+    fltk3::draw(str, l, (int)x, (int)y);
+#endif
+  }
+  
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_font.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_font_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_font_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_font_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,541 @@
+//
+// "$Id$"
+//
+// MacOS font selection routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+
+/* from fl_utf.c */
+extern unsigned fltk3::utf8toUtf16(const char* src, unsigned srclen, unsigned short* dst, unsigned dstlen);
+
+static CGAffineTransform font_mx = { 1, 0, 0, -1, 0, 0 };
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+static CFMutableDictionaryRef attributes = NULL;
+#endif
+
+Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, fltk3::Fontsize Size) {
+  next = 0;
+#  if HAVE_GL
+  listbase = 0;
+#  endif
+
+//  knowWidths = 0;
+    // OpenGL needs those for its font handling
+  q_name = strdup(name);
+  size = Size;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+if (fl_mac_os_version >= 100500) {//unfortunately, CTFontCreateWithName != NULL on 10.4 also!
+  CFStringRef str = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
+  fontref = CTFontCreateWithName(str, size, NULL);
+  CGGlyph glyph[2];
+  const UniChar A[2]={'W','.'};
+  CTFontGetGlyphsForCharacters(fontref, A, glyph, 2);
+  CGSize advances[2];
+  double w;
+  CTFontGetAdvancesForGlyphs(fontref, kCTFontHorizontalOrientation, glyph, advances, 2);
+  w = advances[0].width;
+  if ( abs(advances[0].width - advances[1].width) < 1E-2 ) {//this is a fixed-width font
+    // slightly rescale fixed-width fonts so the character width has an integral value
+    CFRelease(fontref);
+    CGFloat fsize = size / ( w/floor(w + 0.5) );
+    fontref = CTFontCreateWithName(str, fsize, NULL);
+    w = CTFontGetAdvancesForGlyphs(fontref, kCTFontHorizontalOrientation, glyph, NULL, 1);
+  }
+  CFRelease(str);
+  ascent = (short)(CTFontGetAscent(fontref) + 0.5);
+  descent = (short)(CTFontGetDescent(fontref) + 0.5);
+  q_width = w + 0.5;
+  for (unsigned i = 0; i < sizeof(width)/sizeof(float*); i++) width[i] = NULL;
+  if (!attributes) {
+    static CFNumberRef zero_ref;
+    float zero = 0.;
+    zero_ref = CFNumberCreate(NULL, kCFNumberFloat32Type, &zero);
+    // deactivate kerning for all fonts, so that string width = sum of character widths
+    // which allows fast fltk3::width() implementation.
+    attributes = CFDictionaryCreateMutable(kCFAllocatorDefault,
+					   3,
+					   &kCFTypeDictionaryKeyCallBacks,
+					   &kCFTypeDictionaryValueCallBacks);
+    CFDictionarySetValue (attributes, kCTKernAttributeName, zero_ref);
+  }
+  if (ascent == 0) { // this may happen with some third party fonts
+    CFDictionarySetValue (attributes, kCTFontAttributeName, fontref);
+    CFAttributedStringRef mastr = CFAttributedStringCreate(kCFAllocatorDefault, CFSTR("Wj"), attributes);
+    CTLineRef ctline = CTLineCreateWithAttributedString(mastr);
+    CFRelease(mastr);
+    CGFloat fascent, fdescent;
+    CTLineGetTypographicBounds(ctline, &fascent, &fdescent, NULL);
+    CFRelease(ctline);
+    ascent = (short)(fascent + 0.5);
+    descent = (short)(fdescent + 0.5);
+    }
+}
+else {
+#endif
+#if ! __LP64__
+  OSStatus err;
+    // fill our structure with a few default values
+  ascent = Size*3/4;
+  descent = Size-ascent;
+  q_width = Size*2/3;
+	// now use ATS to get the actual Glyph size information
+	// say that our passed-in name is encoded as UTF-8, since this works for plain ASCII names too...
+  CFStringRef cfname = CFStringCreateWithCString(0L, name, kCFStringEncodingUTF8);
+  ATSFontRef font = ATSFontFindFromName(cfname, kATSOptionFlagsDefault);
+  if (font) {
+    ATSFontMetrics m = { 0 };
+    ATSFontGetHorizontalMetrics(font, kATSOptionFlagsDefault, &m);
+    if (m.avgAdvanceWidth) q_width = int(m.avgAdvanceWidth*Size);
+      // playing with the offsets a little to make standard sizes fit
+    if (m.ascent) ascent  = int(m.ascent*Size-0.5f);
+    if (m.descent) descent = -int(m.descent*Size-1.5f);
+  }
+  CFRelease(cfname);
+    // now we allocate everything needed to render text in this font later
+    // get us the default layout and style
+  err = ATSUCreateTextLayout(&layout);
+  UniChar mTxt[2] = { 65, 0 };
+  err = ATSUSetTextPointerLocation(layout, mTxt, kATSUFromTextBeginning, 1, 1);
+  err = ATSUCreateStyle(&style);
+  err = ATSUSetRunStyle(layout, style, kATSUFromTextBeginning, kATSUToTextEnd);
+    // now set the actual font, size and attributes. We also set the font matrix to
+    // render our font up-side-down, so when rendered through our inverted CGContext,
+    // text will appear normal again.
+  Fixed fsize = IntToFixed(Size);
+//  ATSUFontID fontID = FMGetFontFromATSFontRef(font);
+  ATSUFontID fontID;
+  ATSUFindFontFromName(name, strlen(name), kFontFullName, kFontMacintoshPlatform, kFontRomanScript, kFontEnglishLanguage, &fontID);
+
+  // draw the font upside-down... Compensate for fltk/OSX origin differences
+  ATSUAttributeTag sTag[] = { kATSUFontTag, kATSUSizeTag, kATSUFontMatrixTag };
+  ByteCount sBytes[] = { sizeof(ATSUFontID), sizeof(Fixed), sizeof(CGAffineTransform) };
+  ATSUAttributeValuePtr sAttr[] = { &fontID, &fsize, &font_mx };
+  err = ATSUSetAttributes(style, 3, sTag, sBytes, sAttr);
+    // next, make sure that Quartz will only render at integer coordinates
+  ATSLineLayoutOptions llo = kATSLineUseDeviceMetrics | kATSLineDisableAllLayoutOperations;
+  ATSUAttributeTag aTag[] = { kATSULineLayoutOptionsTag };
+  ByteCount aBytes[] = { sizeof(ATSLineLayoutOptions) };
+  ATSUAttributeValuePtr aAttr[] = { &llo };
+  err = ATSUSetLineControls (layout, kATSUFromTextBeginning, 1, aTag, aBytes, aAttr);
+    // now we are finally ready to measure some letter to get the bounding box
+  Fixed bBefore, bAfter, bAscent, bDescent;
+  err = ATSUGetUnjustifiedBounds(layout, kATSUFromTextBeginning, 1, &bBefore, &bAfter, &bAscent, &bDescent);
+    // Requesting a certain height font on Mac does not guarantee that ascent+descent
+    // equal the requested height. fltk3::height will reflect the actual height that we got.
+    // The font "Apple Chancery" is a pretty extreme example of overlapping letters.
+  float fa = -FixedToFloat(bAscent), fd = -FixedToFloat(bDescent);
+  if (fa>0.0f && fd>0.0f) {
+    //float f = Size/(fa+fd);
+    ascent = int(fa); //int(fa*f+0.5f);
+    descent = int(fd); //Size - ascent;
+  }
+  int w = FixedToInt(bAfter);
+  if (w)
+    q_width = FixedToInt(bAfter);
+
+# define ENABLE_TRANSIENT_FONTS  1
+
+# ifdef ENABLE_TRANSIENT_FONTS
+  // Now, by way of experiment, try enabling Transient Font Matching, this will
+  // cause ATSU to find a suitable font to render any chars the current font can't do...
+  ATSUSetTransientFontMatching (layout, true);
+# endif
+#endif//__LP64__
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  }
+#endif
+}
+
+Fl_Font_Descriptor::~Fl_Font_Descriptor() {
+/*
+#if HAVE_GL
+ // ++ todo: remove OpenGL font alocations
+// Delete list created by gl_draw().  This is not done by this code
+// as it will link in GL unnecessarily.  There should be some kind
+// of "free" routine pointer, or a subclass?
+// if (listbase) {
+//  int base = font->min_char_or_byte2;
+//  int size = font->max_char_or_byte2-base+1;
+//  int base = 0; int size = 256;
+//  glDeleteLists(listbase+base,size);
+// }
+#endif
+  */
+  if (this == fltk3::graphics_driver->font_descriptor()) fltk3::graphics_driver->font_descriptor(NULL);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  if (fl_mac_os_version >= 100500)  {
+    CFRelease(fontref);
+    for (unsigned i = 0; i < sizeof(width)/sizeof(float*); i++) {
+      if (width[i]) free(width[i]);
+      }
+  }
+#endif
+}
+
+////////////////////////////////////////////////////////////////
+
+static Fl_Fontdesc built_in_table[] = {
+{"Arial"},
+{"Arial Bold"},
+{"Arial Italic"},
+{"Arial Bold Italic"},
+{"Courier New"},
+{"Courier New Bold"},
+{"Courier New Italic"},
+{"Courier New Bold Italic"},
+{"Times New Roman"},
+{"Times New Roman Bold"},
+{"Times New Roman Italic"},
+{"Times New Roman Bold Italic"},
+{"Symbol"},
+{"Monaco"},
+{"Andale Mono"}, // there is no bold Monaco font on standard Mac
+{"Webdings"},
+};
+
+static UniChar *utfWbuf = 0;
+static unsigned utfWlen = 0;
+
+static UniChar *mac_Utf8_to_Utf16(const char *txt, int len, int *new_len)
+{
+  unsigned wlen = fltk3::utf8toUtf16(txt, len, (unsigned short*)utfWbuf, utfWlen);
+  if (wlen >= utfWlen)
+  {
+    utfWlen = wlen + 100;
+	if (utfWbuf) free(utfWbuf);
+    utfWbuf = (UniChar*)malloc((utfWlen)*sizeof(UniChar));
+	wlen = fltk3::utf8toUtf16(txt, len, (unsigned short*)utfWbuf, utfWlen);
+  }
+  *new_len = wlen;
+  return utfWbuf;
+} // mac_Utf8_to_Utf16
+
+Fl_Fontdesc* fltk3::fonts = built_in_table;
+
+static Fl_Font_Descriptor* find(fltk3::Font fnum, fltk3::Fontsize size) {
+  Fl_Fontdesc* s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // use 0 if fnum undefined
+  Fl_Font_Descriptor* f;
+  for (f = s->first; f; f = f->next)
+    if (f->size == size) return f;
+  f = new Fl_Font_Descriptor(s->name, size);
+  f->next = s->first;
+  s->first = f;
+  return f;
+}
+
+////////////////////////////////////////////////////////////////
+// Public interface:
+
+void fltk3::QuartzGraphicsDriver::font(fltk3::Font fnum, fltk3::Fontsize size) {
+  if (fnum==-1) {
+    fltk3::GraphicsDriver::font(0, 0);
+    return;
+  }
+  fltk3::GraphicsDriver::font(fnum, size);
+  this->font_descriptor( find(fnum, size) );
+}
+
+int fltk3::QuartzGraphicsDriver::height() {
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  return fontsize->ascent + fontsize->descent;
+}
+
+int fltk3::QuartzGraphicsDriver::descent() {
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  return fontsize->descent+1;
+}
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+// returns width of a pair of UniChar's in the surrogate range
+static CGFloat surrogate_width(const UniChar *txt, Fl_Font_Descriptor *fontsize)
+{
+  CTFontRef font2 = fontsize->fontref;
+  bool must_release = false;
+  CGGlyph glyphs[2];
+  bool b = CTFontGetGlyphsForCharacters(font2, txt, glyphs, 2);
+  CGSize a;
+  if(!b) { // the current font doesn't contain this char
+    CFStringRef str = CFStringCreateWithCharactersNoCopy(NULL, txt, 2, kCFAllocatorNull);
+    // find a font that contains it
+    font2 = CTFontCreateForString(font2, str, CFRangeMake(0,2));
+    must_release = true;
+    CFRelease(str);
+    b = CTFontGetGlyphsForCharacters(font2, txt, glyphs, 2);
+  }
+  if (b) CTFontGetAdvancesForGlyphs(font2, kCTFontHorizontalOrientation, glyphs, &a, 1);
+  else a.width = fontsize->q_width;
+  if(must_release) CFRelease(font2);
+  return a.width;
+}
+#endif
+
+static double fl_mac_width(const UniChar* txt, int n, Fl_Font_Descriptor *fontsize) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+if (fl_mac_os_version >= 100500) {
+  double retval = 0;
+  UniChar uni;
+  int i;
+  for (i = 0; i < n; i++) { // loop over txt
+    uni = txt[i];
+    if (uni >= 0xD800 && uni <= 0xDBFF) { // handles the surrogate range
+      retval += surrogate_width(&txt[i], fontsize);
+      i++; // because a pair of UniChar's represent a single character
+      continue;
+    }
+    const int block = 0x10000 / (sizeof(fontsize->width)/sizeof(float*)); // block size
+    // r: index of the character block containing uni
+    unsigned int r = uni >> 7; // change 7 if sizeof(width) is changed
+    if (!fontsize->width[r]) { // this character block has not been hit yet
+//fprintf(stderr,"r=%d size=%d name=%s\n",r,fltk3::fontsize->size, fltk3::fontsize->q_name);
+      // allocate memory to hold width of each character in the block
+      fontsize->width[r] = (float*) malloc(sizeof(float) * block);
+      UniChar ii = r * block;
+      CGSize advance_size;
+      CGGlyph glyph;
+      for (int j = 0; j < block; j++) { // loop over the block
+	CTFontRef font2 = fontsize->fontref;
+	bool must_release = false;
+	// ii spans all characters of this block
+	bool b = CTFontGetGlyphsForCharacters(font2, &ii, &glyph, 1);
+	if (!b) { // the current font doesn't contain this char
+	  CFStringRef str = CFStringCreateWithCharactersNoCopy(NULL, &ii, 1, kCFAllocatorNull);
+	  // find a font that contains it
+	  font2 = CTFontCreateForString(font2, str, CFRangeMake(0,1));
+	  must_release = true;
+	  CFRelease(str);
+	  b = CTFontGetGlyphsForCharacters(font2, &ii, &glyph, 1);
+	  }
+	if (b) CTFontGetAdvancesForGlyphs(font2, kCTFontHorizontalOrientation, &glyph, &advance_size, 1);
+	else advance_size.width = 0.;
+	// the width of one character of this block of characters
+	fontsize->width[r][j] = advance_size.width;
+	if (must_release) CFRelease(font2);
+	ii++;
+      }
+    }
+    // sum the widths of all characters of txt
+    retval += fontsize->width[r][uni & (block-1)];
+  }
+  return retval;
+} else {
+#endif
+#if ! __LP64__
+  OSStatus err;
+  Fixed bBefore, bAfter, bAscent, bDescent;
+  ATSUTextLayout layout;
+  ByteCount iSize;
+  ATSUAttributeTag iTag;
+  ATSUAttributeValuePtr iValuePtr;
+
+  // Here's my ATSU text measuring attempt... This seems to do the Right Thing
+  // now collect our ATSU resources and measure our text string
+  layout = fltk3::fontsize->layout;
+  // activate the current GC
+  iSize = sizeof(CGContextRef);
+  iTag = kATSUCGContextTag;
+  iValuePtr = &fl_gc;
+  ATSUSetLayoutControls(layout, 1, &iTag, &iSize, &iValuePtr);
+  // now measure the bounding box
+  err = ATSUSetTextPointerLocation(layout, txt, kATSUFromTextBeginning, n, n);
+  err = ATSUGetUnjustifiedBounds(layout, kATSUFromTextBeginning, n, &bBefore, &bAfter, &bAscent, &bDescent);
+  // If err is OK then return length, else return 0. Or something...
+  int len = FixedToInt(bAfter);
+  return len;
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  }
+#endif
+  return 0;
+}
+
+double fltk3::QuartzGraphicsDriver::width(const char* txt, int n) {
+  int wc_len = n;
+  UniChar *uniStr = mac_Utf8_to_Utf16(txt, n, &wc_len);
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  return fl_mac_width(uniStr, wc_len, font_descriptor());
+}
+
+double fltk3::QuartzGraphicsDriver::width(unsigned int wc) {
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+
+  UniChar utf16[3];
+  int l = 1;
+  if (wc <= 0xFFFF) {
+    *utf16 = wc;
+  }
+  else {
+//    char buf[4];
+//    l = fltk3::utf8encode(wc, buf);
+//    l = (int)fltk3::utf8toUtf16(buf, l, utf16, 3);
+    l = (int)fltk3::ucs_to_Utf16(wc, utf16, 3);
+  }
+  return fl_mac_width(utf16, l, font_descriptor());
+}
+
+// text extent calculation
+void fltk3::QuartzGraphicsDriver::text_extents(const char *str8, int n, int &dx, int &dy, int &w, int &h) {
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  UniChar *txt = mac_Utf8_to_Utf16(str8, n, &n);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+if (fl_mac_os_version >= 100500) {
+  CFStringRef str16 = CFStringCreateWithCharactersNoCopy(NULL, txt, n,  kCFAllocatorNull);
+  CFDictionarySetValue (attributes, kCTFontAttributeName, fontsize->fontref);
+  CFAttributedStringRef mastr = CFAttributedStringCreate(kCFAllocatorDefault, str16, attributes);
+  CFRelease(str16);
+  CTLineRef ctline = CTLineCreateWithAttributedString(mastr);
+  CFRelease(mastr);
+  CGContextSetTextPosition(fl_gc, 0, 0);
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGRect rect = CTLineGetImageBounds(ctline, fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+  CFRelease(ctline);
+  dx = floor(rect.origin.x + 0.5);
+  dy = floor(- rect.origin.y - rect.size.height + 0.5);
+  w = rect.size.width + 0.5;
+  h = rect.size.height + 0.5;
+  }
+else {
+#endif
+#if ! __LP64__
+  OSStatus err;
+  ATSUTextLayout layout;
+  ByteCount iSize;
+  ATSUAttributeTag iTag;
+  ATSUAttributeValuePtr iValuePtr;
+
+// Here's my ATSU text measuring attempt... This seems to do the Right Thing
+  // now collect our ATSU resources and measure our text string
+  layout = fltk3::fontsize->layout;
+        // activate the current GC
+  iSize = sizeof(CGContextRef);
+  iTag = kATSUCGContextTag;
+  iValuePtr = &fl_gc;
+      ATSUSetLayoutControls(layout, 1, &iTag, &iSize, &iValuePtr);
+        // now measure the bounding box
+  err = ATSUSetTextPointerLocation(layout, txt, kATSUFromTextBeginning, n, n);
+  Rect bbox;
+  err = ATSUMeasureTextImage(layout, kATSUFromTextBeginning, n, 0, 0, &bbox);
+  w = bbox.right - bbox.left;
+  h = bbox.bottom - bbox.top;
+  dx = bbox.left;
+  dy = -bbox.bottom;
+//printf("r: %d l: %d t: %d b: %d w: %d h: %d\n", bbox.right, bbox.left, bbox.top, bbox.bottom, w, h);
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  }
+#endif
+  return;
+} // fltk3::text_extents
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+static CGColorRef flcolortocgcolor(fltk3::Color i)
+{
+  uchar r, g, b;
+  fltk3::get_color(i, r, g, b);
+  CGFloat components[4] = {r/255.0f, g/255.0f, b/255.0f, 1.};
+  static CGColorSpaceRef cspace = NULL;
+  if (cspace == NULL) {
+    cspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
+    }
+  return CGColorCreate(cspace, components);
+}
+#endif
+
+static void fl_mac_draw(const char *str, int n, float x, float y, fltk3::GraphicsDriver *driver) {
+  // convert to UTF-16 first
+  UniChar *uniStr = mac_Utf8_to_Utf16(str, n, &n);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  if (fl_mac_os_version >= 100500) {
+    CFStringRef str16 = CFStringCreateWithCharactersNoCopy(NULL, uniStr, n,  kCFAllocatorNull);
+    if (str16 == NULL) return; // shd not happen
+    CGColorRef color = flcolortocgcolor(driver->color());
+    CFDictionarySetValue (attributes, kCTFontAttributeName, driver->font_descriptor()->fontref);
+    CFDictionarySetValue (attributes, kCTForegroundColorAttributeName, color);
+    CFAttributedStringRef mastr = CFAttributedStringCreate(kCFAllocatorDefault, str16, attributes);
+    CFRelease(str16);
+    CFRelease(color);
+    CTLineRef ctline = CTLineCreateWithAttributedString(mastr);
+    CFRelease(mastr);
+    CGContextSetTextMatrix(fl_gc, font_mx);
+    CGContextSetTextPosition(fl_gc, x, y);
+    CGContextSetShouldAntialias(fl_gc, true);
+    CTLineDraw(ctline, fl_gc);
+    CGContextSetShouldAntialias(fl_gc, false);
+    CFRelease(ctline);
+  } else {
+#endif
+#if ! __LP64__
+  OSStatus err;
+  // now collect our ATSU resources
+  ATSUTextLayout layout = driver->font_descriptor()->layout;
+
+  ByteCount iSize = sizeof(CGContextRef);
+  ATSUAttributeTag iTag = kATSUCGContextTag;
+  ATSUAttributeValuePtr iValuePtr=&fl_gc;
+  ATSUSetLayoutControls(layout, 1, &iTag, &iSize, &iValuePtr);
+
+  err = ATSUSetTextPointerLocation(layout, uniStr, kATSUFromTextBeginning, n, n);
+  CGContextSetShouldAntialias(fl_gc, true);
+  err = ATSUDrawText(layout, kATSUFromTextBeginning, n, FloatToFixed(x), FloatToFixed(y));
+  CGContextSetShouldAntialias(fl_gc, false);
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  }
+#endif
+}
+
+void fltk3::QuartzGraphicsDriver::draw(const char *str, int n, float x, float y) {
+  // avoid a crash if no font has been selected by user yet !
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  fl_mac_draw(str, n, x, y, this);
+}
+
+void fltk3::QuartzGraphicsDriver::draw(const char* str, int n, int x, int y) {
+  // avoid a crash if no font has been selected by user yet !
+  if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  fl_mac_draw(str, n, (float)x-0.0f, (float)y+0.5f, this);
+}
+
+void fltk3::QuartzGraphicsDriver::draw(int angle, const char *str, int n, int x, int y) {
+  CGContextSaveGState(fl_gc);
+  CGContextTranslateCTM(fl_gc, x, y);
+  CGContextRotateCTM(fl_gc, - angle*(M_PI/180) );
+  draw(str, n, 0, 0);
+  CGContextRestoreGState(fl_gc);
+}
+
+void fltk3::QuartzGraphicsDriver::rtl_draw(const char* c, int n, int x, int y) {
+  int dx, dy, w, h;
+  text_extents(c, n, dx, dy, w, h);
+  draw(c, n, x - w - dx, y);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_font_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_font_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_font_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_font_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,452 @@
+//
+// "$Id$"
+//
+// WIN32 font selection routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/Printer.h>
+
+static int fl_angle_ = 0;
+
+#ifndef FLTK3_DOXYGEN
+Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, fltk3::Fontsize fsize) {
+  int weight = FW_NORMAL;
+  int italic = 0;
+  switch (*name++) {
+  case 'I': italic = 1; break;
+  case 'P': italic = 1;
+  case 'B': weight = FW_BOLD; break;
+  case ' ': break;
+  default: name--;
+  }
+  fid = CreateFont(
+    -fsize, // negative makes it use "char size"
+    0,	            // logical average character width
+    fl_angle_*10,	            // angle of escapement
+    fl_angle_*10,	            // base-line orientation angle
+    weight,
+    italic,
+    FALSE,	        // underline attribute flag
+    FALSE,	        // strikeout attribute flag
+    DEFAULT_CHARSET,    // character set identifier
+    OUT_DEFAULT_PRECIS,	// output precision
+    CLIP_DEFAULT_PRECIS,// clipping precision
+    DEFAULT_QUALITY,	// output quality
+    DEFAULT_PITCH,	// pitch and family
+    name	        // pointer to typeface name string
+    );
+  angle = fl_angle_;
+  if (!fl_gc) fl_GetDC(0);
+  SelectObject(fl_gc, fid);
+  GetTextMetrics(fl_gc, &metr);
+//  BOOL ret = GetCharWidthFloat(fl_gc, metr.tmFirstChar, metr.tmLastChar, font->width+metr.tmFirstChar);
+// ...would be the right call, but is not implemented into Window95! (WinNT?)
+  //GetCharWidth(fl_gc, 0, 255, width);
+  int i;
+  for (i = 0; i < 64; i++) width[i] = NULL;
+#if HAVE_GL
+  listbase = 0;
+  for (i = 0; i < 64; i++) glok[i] = 0;
+#endif
+  size = fsize;
+}
+
+Fl_Font_Descriptor::~Fl_Font_Descriptor() {
+#if HAVE_GL
+// Delete list created by gl_draw().  This is not done by this code
+// as it will link in GL unnecessarily.  There should be some kind
+// of "free" routine pointer, or a subclass?
+// if (listbase) {
+//  int base = font->min_char_or_byte2;
+//  int size = font->max_char_or_byte2-base+1;
+//  int base = 0; int size = 256;
+//  glDeleteLists(listbase+base,size);
+// }
+#endif
+  if (this == fltk3::graphics_driver->font_descriptor()) fltk3::graphics_driver->font_descriptor(NULL);
+  DeleteObject(fid);
+  int i;
+  for (i = 0; i < 64; i++) free(width[i]);
+}
+
+////////////////////////////////////////////////////////////////
+
+// WARNING: if you add to this table, you must redefine fltk3::FREE_FONT
+// in enumerations.h & recompile!!
+static Fl_Fontdesc built_in_table[] = {
+{" Arial"},
+{"BArial"},
+{"IArial"},
+{"PArial"},
+{" Courier New"},
+{"BCourier New"},
+{"ICourier New"},
+{"PCourier New"},
+{" Times New Roman"},
+{"BTimes New Roman"},
+{"ITimes New Roman"},
+{"PTimes New Roman"},
+{" Symbol"},
+{" Terminal"},
+{"BTerminal"},
+{" Wingdings"},
+};
+
+Fl_Fontdesc* fltk3::fonts = built_in_table;
+
+static Fl_Font_Descriptor* find(fltk3::Font fnum, fltk3::Fontsize size, int angle) {
+  Fl_Fontdesc* s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // use 0 if fnum undefined
+  Fl_Font_Descriptor* f;
+  for (f = s->first; f; f = f->next)
+    if (f->size == size && f->angle == angle) return f;
+  f = new Fl_Font_Descriptor(s->name, size);
+  f->next = s->first;
+  s->first = f;
+  return f;
+}
+
+////////////////////////////////////////////////////////////////
+// Public interface:
+
+static void set_font(fltk3::GraphicsDriver *driver, fltk3::Font fnum, fltk3::Fontsize size, int angle) {
+  if (fnum==-1) { // just make sure that we will load a new font next time
+    fl_angle_ = 0;
+    driver->GraphicsDriver::font(0, 0);
+    return;
+  }
+  if (fnum == driver->GraphicsDriver::font() && size == driver->size() && angle == fl_angle_) return;
+  fl_angle_ = angle;
+  driver->GraphicsDriver::font(fnum, size);
+  driver->font_descriptor( find(fnum, size, angle) );
+}
+
+void fltk3::GDIGraphicsDriver::font(fltk3::Font fnum, fltk3::Fontsize size) {
+  ::set_font(this, fnum, size, 0);
+}
+
+int fltk3::GDIGraphicsDriver::height() {
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  if (fontsize) return (fontsize->metr.tmAscent + fontsize->metr.tmDescent);
+  else return -1;
+}
+
+int fltk3::GDIGraphicsDriver::descent() {
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  if (fontsize) return fontsize->metr.tmDescent;
+  else return -1;
+}
+
+// Unicode string buffer
+static unsigned short *wstr = NULL;
+static int wstr_len    = 0;
+
+
+double fltk3::GDIGraphicsDriver::width(const char* c, int n) {
+  int i = 0;
+  if (!font_descriptor()) return -1.0;
+  double w = 0.0;
+  char *end = (char *)&c[n];
+  while (i < n) {
+    unsigned int ucs;
+    int l;
+    ucs = fltk3::utf8decode((const char*)(c + i), end, &l);
+//  if (l < 1) l = 1;
+    i += l;
+    if (!fltk3::nonspacing(ucs)) {
+      w += width(ucs);
+    }
+  }
+  return w;
+}
+
+double fltk3::GDIGraphicsDriver::width(unsigned int c) {
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  unsigned int r;
+  SIZE s;
+  // Special Case Handling of Unicode points over U+FFFF.
+  // The logic (below) computes a lookup table for char widths
+  // on-the-fly, but the table only covers codepoints up to
+  // U+FFFF, which covers the basic multilingual plane, but
+  // not any higher plane, or glyphs that require surrogate-pairs
+  // to encode them in WinXX, which is UTF16.
+  // This code assumes that these glyphs are rarely used and simply
+  // measures them explicitly if they occur - This will be slow...
+  if(c > 0x0000FFFF) { // UTF16 surrogate pair is needed
+    if (!fl_gc) { // We have no valid gc, so nothing to measure - bail out
+      return 0.0;
+    }
+    int cc; // cell count
+    unsigned short u16[4]; // Array for UTF16 representation of c
+    // Creates a UTF16 string from a UCS code point.
+    cc = fltk3::ucs_to_Utf16(c, u16, 4);
+    // Make sure the current font is selected before we make the measurement
+    SelectObject(fl_gc, fontsize->fid);
+    // measure the glyph width
+    GetTextExtentPoint32W(fl_gc, (WCHAR*)u16, cc, &s);
+    return (double)s.cx;
+  }
+  // else - this falls through to the lookup-table for glyph widths
+  // in the basic multilingual plane
+  r = (c & 0xFC00) >> 10;
+  if (!fontsize->width[r]) {
+    fontsize->width[r] = (int*) malloc(sizeof(int) * 0x0400);
+    unsigned short i = 0, ii = r * 0x400;
+    // The following code makes a best effort attempt to obtain a valid fl_gc.
+    // If no fl_gc is available at the time we call fltk3::width(), then we first
+    // try to obtain a gc from the first fltk window.
+    // If that is null then we attempt to obtain the gc from the current screen
+    // using (GetDC(NULL)).
+    // This should resolve STR #2086
+    HDC gc = fl_gc;
+    HWND hWnd = 0;
+    if (!gc) { // We have no valid gc, try and obtain one
+      // Use our first fltk window, or fallback to using the screen via GetDC(NULL)
+      hWnd = fltk3::first_window() ? fl_xid(fltk3::first_window()) : NULL;
+      gc = GetDC(hWnd);
+    }
+    if (!gc)
+	fltk3::fatal("Invalid graphic context: fltk3::width() failed because no valid HDC was found!");
+    SelectObject(gc, fontsize->fid);
+    for (; i < 0x400; i++) {
+      GetTextExtentPoint32W(gc, (WCHAR*)&ii, 1, &s);
+      fontsize->width[r][i] = s.cx;
+      ii++;
+    }
+    if (gc && gc!=fl_gc) ReleaseDC(hWnd, gc);
+  }
+  return (double) fontsize->width[r][c & 0x03FF];
+}
+
+/* Add function pointer to allow us to access GetGlyphIndicesW on systems that have it,
+ * without crashing on systems that do not. */
+/* DWORD WINAPI GetGlyphIndicesW(HDC,LPCWSTR,int,LPWORD,DWORD) */
+typedef DWORD (WINAPI* fl_GetGlyphIndices_func)(HDC,LPCWSTR,int,LPWORD,DWORD);
+
+static fl_GetGlyphIndices_func fl_GetGlyphIndices = NULL; // used to hold a proc pointer for GetGlyphIndicesW
+static int have_loaded_GetGlyphIndices = 0; // Set this non-zero once we have tried to load GetGlyphIndices
+
+// Function that tries to dynamically load GetGlyphIndicesW at runtime
+static void GetGlyphIndices_init() {
+  // Since not all versions of Windows include GetGlyphIndicesW support,
+  // we do a run-time check for the required function.
+  HMODULE hMod = GetModuleHandle("GDI32.DLL");
+  if (hMod) {
+    // check that GetGlyphIndicesW is available
+    fl_GetGlyphIndices = (fl_GetGlyphIndices_func)GetProcAddress(hMod, "GetGlyphIndicesW");
+  }
+  have_loaded_GetGlyphIndices = -1; // set this non-zero when we have attempted to load GetGlyphIndicesW
+} // GetGlyphIndices_init function
+
+static void on_printer_extents_update(int &dx, int &dy, int &w, int &h)
+// converts text extents from device coords to logical coords
+{
+  POINT pt[3] = { {0, 0}, {dx, dy}, {dx+w, dy+h} };
+  DPtoLP(fl_gc, pt, 3);
+  w = pt[2].x - pt[1].x;
+  h = pt[2].y - pt[1].y;
+  dx = pt[1].x - pt[0].x;
+  dy = pt[1].y - pt[0].y;
+}
+
+// if printer context, extents shd be converted to logical coords
+#define EXTENTS_UPDATE(x,y,w,h) \
+  if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) { on_printer_extents_update(x,y,w,h); }
+
+// Function to determine the extent of the "inked" area of the glyphs in a string
+void fltk3::GDIGraphicsDriver::text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
+
+  Fl_Font_Descriptor *fontsize = font_descriptor();
+  if (!fontsize) { // no valid font, nothing to measure
+    w = 0; h = 0;
+    dx = dy = 0;
+    return;
+  }
+
+  static unsigned short *ext_buff = NULL; // UTF-16 converted version of input UTF-8 string
+  static WORD  *w_buff = NULL; // glyph indices array
+  static unsigned wc_len = 0;  // current string buffer dimensions
+  static const MAT2 matrix = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 1 } }; // identity mat for GetGlyphOutlineW
+  GLYPHMETRICS metrics;
+  int maxw = 0, maxh = 0, dh;
+  int minx = 0, miny = -999999;
+  unsigned len = 0, idx = 0, ll;
+  HWND hWnd = 0;
+  HDC gc = fl_gc; // local copy of current gc - make a copy in case we change it...
+  int has_surrogates; // will be set if the string contains surrogate pairs
+
+  // Have we loaded the GetGlyphIndicesW function yet?
+  if (have_loaded_GetGlyphIndices == 0) {
+    GetGlyphIndices_init();
+  }
+  // Do we have a usable GetGlyphIndices function?
+  if(!fl_GetGlyphIndices) goto exit_error; // No GetGlyphIndices function, use fallback mechanism instead
+
+  // The following code makes a best effort attempt to obtain a valid fl_gc.
+  // See description in fltk3::width() above for an explanation.
+  if (!gc) { // We have no valid gc, try and obtain one
+    // Use our first fltk window, or fallback to using the screen via GetDC(NULL)
+    hWnd = fltk3::first_window() ? fl_xid(fltk3::first_window()) : NULL;
+    gc = GetDC(hWnd);
+  }
+  if (!gc) goto exit_error; // no valid gc, attempt to use fallback measure
+
+  // now convert the string to WCHAR and measure it
+  len = fltk3::utf8toUtf16(c, n, ext_buff, wc_len);
+  if(len >= wc_len) {
+    if(ext_buff) {delete [] ext_buff;}
+    if(w_buff) {delete [] w_buff;}
+    wc_len = len + 64;
+    ext_buff = new unsigned short[wc_len];
+    w_buff = new WORD[wc_len];
+    len = fltk3::utf8toUtf16(c, n, ext_buff, wc_len);
+  }
+  SelectObject(gc, fontsize->fid);
+
+  // Are there surrogate-pairs in this string? If so GetGlyphIndicesW will fail
+  // since it can only handle the BMP range.
+  // We ideally want to use GetGlyphIndicesW, as it is the Right Thing, but it
+  // only works for the BMP, so we leverage GetCharacterPlacementW instead, which
+  // is not ideal, but works adequately well, and does handle surrogate pairs.
+  has_surrogates = 0;
+  for(ll = 0; ll < len; ll++) {
+    if((ext_buff[ll] >= 0xD800) && (ext_buff[ll] < 0xE000)) {
+      has_surrogates = -1;
+      break;
+    }
+  }
+  if (has_surrogates) {
+    // GetGlyphIndices will not work - use GetCharacterPlacementW() instead
+    GCP_RESULTSW gcp_res;
+    memset(w_buff, 0, (sizeof(WORD) * wc_len));
+    memset(&gcp_res, 0, sizeof(GCP_RESULTSW));
+    gcp_res.lpGlyphs = (LPWSTR)w_buff;
+    gcp_res.nGlyphs = wc_len;
+    gcp_res.lStructSize = sizeof(gcp_res);
+
+    DWORD dr = GetCharacterPlacementW(gc, (WCHAR*)ext_buff, len, 0, &gcp_res, GCP_GLYPHSHAPE);
+    if(dr) {
+      len = gcp_res.nGlyphs;
+    } else goto exit_error;
+  } else {
+    if (fl_GetGlyphIndices(gc, (WCHAR*)ext_buff, len, w_buff, GGI_MARK_NONEXISTING_GLYPHS) == GDI_ERROR) {
+      // some error occured here - just return fltk3::measure values
+      goto exit_error;
+    }
+  }
+
+  // now we have the glyph array we measure each glyph in turn...
+  for(idx = 0; idx < len; idx++){
+    if (GetGlyphOutlineW (gc, w_buff[idx], GGO_METRICS | GGO_GLYPH_INDEX,
+                          &metrics, 0, NULL, &matrix) == GDI_ERROR) {
+      goto exit_error;
+    }
+    maxw += metrics.gmCellIncX;
+    if(idx == 0) minx = metrics.gmptGlyphOrigin.x;
+    dh = metrics.gmBlackBoxY - metrics.gmptGlyphOrigin.y;
+    if(dh > maxh) maxh = dh;
+    if(miny < metrics.gmptGlyphOrigin.y) miny = metrics.gmptGlyphOrigin.y;
+  }
+  // for the last cell, we only want the bounding X-extent, not the glyphs increment step
+  maxw = maxw - metrics.gmCellIncX + metrics.gmBlackBoxX + metrics.gmptGlyphOrigin.x;
+  w = maxw - minx;
+  h = maxh + miny;
+  dx = minx;
+  dy = -miny;
+  EXTENTS_UPDATE(dx, dy, w, h);
+  return; // normal exit
+
+exit_error:
+  // some error here - just return fltk3::measure values
+  w = (int)width(c, n);
+  h = height();
+  dx = 0;
+  dy = descent() - h;
+  EXTENTS_UPDATE(dx, dy, w, h);
+  return;
+} // fltk3::text_extents
+
+void fltk3::GDIGraphicsDriver::draw(const char* str, int n, int x, int y) {
+  COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
+  SelectObject(fl_gc, font_descriptor()->fid);
+  int wn = fltk3::utf8toUtf16(str, n, wstr, wstr_len);
+  if(wn >= wstr_len) {
+    wstr = (unsigned short*) realloc(wstr, sizeof(unsigned short) * (wn + 1));
+    wstr_len = wn + 1;
+    wn = fltk3::utf8toUtf16(str, n, wstr, wstr_len);
+  }
+  TextOutW(fl_gc, x, y, (WCHAR*)wstr, wn);
+  SetTextColor(fl_gc, oldColor); // restore initial state
+}
+
+void fltk3::GDIGraphicsDriver::draw(int angle, const char* str, int n, int x, int y) {
+  ::set_font(this, GraphicsDriver::font(), size(), angle);
+  int wn = 0; // count of UTF16 cells to render full string
+  COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
+  SelectObject(fl_gc, font_descriptor()->fid);
+  wn = fltk3::utf8toUtf16(str, n, wstr, wstr_len);
+  if(wn >= wstr_len) { // Array too small
+    wstr = (unsigned short*) realloc(wstr, sizeof(unsigned short) * (wn + 1));
+    wstr_len = wn + 1;
+    wn = fltk3::utf8toUtf16(str, n, wstr, wstr_len); // respin the translation
+  }
+  TextOutW(fl_gc, x, y, (WCHAR*)wstr, wn);
+  SetTextColor(fl_gc, oldColor);
+  ::set_font(this, GraphicsDriver::font(), size(), 0);
+}
+
+void fltk3::GDIGraphicsDriver::rtl_draw(const char* c, int n, int x, int y) {
+  int wn;
+  wn = fltk3::utf8toUtf16(c, n, wstr, wstr_len);
+  if(wn >= wstr_len) {
+    wstr = (unsigned short*) realloc(wstr, sizeof(unsigned short) * (wn + 1));
+    wstr_len = wn + 1;
+    wn = fltk3::utf8toUtf16(c, n, wstr, wstr_len);
+  }
+
+  COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
+  SelectObject(fl_gc, font_descriptor()->fid);
+#ifdef RTL_CHAR_BY_CHAR
+  int i = 0;
+  int lx = 0;
+  while (i < wn) { // output char by char is very bad for Arabic but coherent with fltk3::width()
+    lx = (int) width(wstr[i]);
+    x -= lx;
+    TextOutW(fl_gc, x, y, (WCHAR*)wstr + i, 1);
+    if (fltk3::nonspacing(wstr[i])) {
+      x += lx;
+    }
+    i++;
+  }
+#else
+  UINT old_align = SetTextAlign(fl_gc, TA_RIGHT | TA_RTLREADING);
+  TextOutW(fl_gc, x, y - height() + descent(), (WCHAR*)wstr, wn);
+  SetTextAlign(fl_gc, old_align);
+#endif
+  SetTextColor(fl_gc, oldColor);
+}
+#endif
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_font_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_font_x.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_font_x.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_font_x.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,344 @@
+//
+// "$Id$"
+//
+// Standard X11 font selection code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+#ifndef FLTK3_DOXYGEN
+
+Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name) {
+  font = XCreateUtf8FontStruct(fl_display, name);
+  if (!font) {
+    fltk3::warning("bad font: %s", name);
+    font = XCreateUtf8FontStruct(fl_display, "fixed");
+  }
+#  if HAVE_GL
+  listbase = 0;
+  for (int u = 0; u < 64; u++) glok[u] = 0;
+#  endif
+}
+
+Fl_XFont_On_Demand fl_xfont;
+
+Fl_Font_Descriptor::~Fl_Font_Descriptor() {
+#  if HAVE_GL
+// Delete list created by gl_draw().  This is not done by this code
+// as it will link in GL unnecessarily.  There should be some kind
+// of "free" routine pointer, or a subclass?
+// if (listbase) {
+//  int base = font->min_char_or_byte2;
+//  int size = font->max_char_or_byte2-base+1;
+//  int base = 0; int size = 256;
+//  glDeleteLists(listbase+base,size);
+// }
+#  endif
+  if (this == fltk3::graphics_driver->font_descriptor()) {
+    fltk3::graphics_driver->font_descriptor(NULL);
+    fl_xfont = 0;
+  }
+  XFreeUtf8FontStruct(fl_display, font);
+}
+
+////////////////////////////////////////////////////////////////
+
+// WARNING: if you add to this table, you must redefine fltk3::FREE_FONT
+// in enumerations.h & recompile!!
+static Fl_Fontdesc built_in_table[] = {
+{"-*-helvetica-medium-r-normal--*"},
+{"-*-helvetica-bold-r-normal--*"},
+{"-*-helvetica-medium-o-normal--*"},
+{"-*-helvetica-bold-o-normal--*"},
+{"-*-courier-medium-r-normal--*"},
+{"-*-courier-bold-r-normal--*"},
+{"-*-courier-medium-o-normal--*"},
+{"-*-courier-bold-o-normal--*"},
+{"-*-times-medium-r-normal--*"},
+{"-*-times-bold-r-normal--*"},
+{"-*-times-medium-i-normal--*"},
+{"-*-times-bold-i-normal--*"},
+{"-*-symbol-*"},
+{"-*-lucidatypewriter-medium-r-normal-sans-*"},
+{"-*-lucidatypewriter-bold-r-normal-sans-*"},
+{"-*-*zapf dingbats-*"}
+};
+
+Fl_Fontdesc* fltk3::fonts = built_in_table;
+
+#define MAXSIZE 32767
+
+// return dash number N, or pointer to ending null if none:
+const char* fltk3::font_word(const char* p, int n) {
+  while (*p) {if (*p=='-') {if (!--n) break;} p++;}
+  return p;
+}
+
+// return a pointer to a number we think is "point size":
+char* fl_find_fontsize(char* name) {
+  char* c = name;
+  // for standard x font names, try after 7th dash:
+  if (*c == '-') {
+    c = (char*)fltk3::font_word(c,7);
+    if (*c++ && isdigit(*c)) return c;
+    return 0; // malformed x font name?
+  }
+  char* r = 0;
+  // find last set of digits:
+  for (c++;* c; c++)
+    if (isdigit(*c) && !isdigit(*(c-1))) r = c;
+  return r;
+}
+
+//const char* fl_encoding = "iso8859-1";
+const char* fl_encoding = "iso10646-1";
+
+// return true if this matches fl_encoding:
+int fl_correct_encoding(const char* name) {
+  if (*name != '-') return 0;
+  const char* c = fltk3::font_word(name,13);
+  return (*c++ && !strcmp(c,fl_encoding));
+}
+
+static const char *find_best_font(const char *fname, int size) {
+  int cnt;
+  static char **list = NULL;
+// locate or create an Fl_Font_Descriptor for a given Fl_Fontdesc and size:
+  if (list) XFreeFontNames(list);
+  list = XListFonts(fl_display, fname, 100, &cnt);
+  if (!list) return "fixed";
+
+  // search for largest <= font size:
+  char* name = list[0]; int ptsize = 0;     // best one found so far
+  int matchedlength = 32767;
+  char namebuffer[1024];        // holds scalable font name
+  int found_encoding = 0;
+  int m = cnt; if (m<0) m = -m;
+  for (int n=0; n < m; n++) {
+    char* thisname = list[n];
+    if (fl_correct_encoding(thisname)) {
+      if (!found_encoding) ptsize = 0; // force it to choose this
+      found_encoding = 1;
+    } else {
+      if (found_encoding) continue;
+    }
+    char* c = (char*)fl_find_fontsize(thisname);
+    int thissize = c ? atoi(c) : MAXSIZE;
+    int thislength = strlen(thisname);
+    if (thissize == size && thislength < matchedlength) {
+      // exact match, use it:
+      name = thisname;
+      ptsize = size;
+      matchedlength = thislength;
+    } else if (!thissize && ptsize!=size) {
+      // whoa!  A scalable font!  Use unless exact match found:
+      int l = c-thisname;
+      memcpy(namebuffer,thisname,l);
+      l += sprintf(namebuffer+l,"%d",size);
+      while (*c == '0') c++;
+      strcpy(namebuffer+l,c);
+      name = namebuffer;
+      ptsize = size;
+    } else if (!ptsize ||	// no fonts yet
+	       (thissize < ptsize && ptsize > size) || // current font too big
+	       (thissize > ptsize && thissize <= size) // current too small
+      ) {
+      name = thisname;
+      ptsize = thissize;
+      matchedlength = thislength;
+    }
+  }
+
+//  if (ptsize != size) { // see if we already found this unscalable font:
+//    for (f = s->first; f; f = f->next) {
+//      if (f->minsize <= ptsize && f->maxsize >= ptsize) {
+//	if (f->minsize > size) f->minsize = size;
+//	if (f->maxsize < size) f->maxsize = size;
+//	return f;
+//      }
+//    }
+//  }
+//
+//  // okay, we definately have some name, make the font:
+//  f = new Fl_Font_Descriptor(name);
+//  if (ptsize < size) {f->minsize = ptsize; f->maxsize = size;}
+//  else {f->minsize = size; f->maxsize = ptsize;}
+//  f->next = s->first;
+//  s->first = f;
+//  return f;
+
+  return name;
+}
+
+static char *put_font_size(const char *n, int size)
+{
+        int i = 0;
+        char *buf;
+        const char *ptr;
+        const char *f;
+        char *name;
+        int nbf = 1;
+        name = strdup(n);
+        while (name[i]) {
+                if (name[i] == ',') {nbf++; name[i] = '\0';}
+                i++;
+        }
+
+        buf = (char*) malloc(nbf * 256);
+        buf[0] = '\0';
+        ptr = name;
+        i = 0;
+        while (ptr && nbf > 0) {
+                f = find_best_font(ptr, size);
+                while (*f) {
+                        buf[i] = *f;
+                        f++; i++;
+                }
+                nbf--;
+                while (*ptr) ptr++;
+                if (nbf) {
+                        ptr++;
+                        buf[i] = ',';
+                        i++;
+                }
+                while(isspace(*ptr)) ptr++;
+        }
+        buf[i] = '\0';
+        free(name);
+        return buf;
+}
+
+
+char *fl_get_font_xfld(int fnum, int size) {
+  Fl_Fontdesc* s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // use font 0 if still undefined
+  fl_open_display();
+  return put_font_size(s->name, size);
+}
+
+// locate or create an Fl_Font_Descriptor for a given Fl_Fontdesc and size:
+static Fl_Font_Descriptor* find(int fnum, int size) {
+  char *name;
+  Fl_Fontdesc* s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // use font 0 if still undefined
+  Fl_Font_Descriptor* f;
+  for (f = s->first; f; f = f->next)
+    if (f->size == size) return f;
+  fl_open_display();
+
+  name = put_font_size(s->name, size);
+  f = new Fl_Font_Descriptor(name);
+  f->size = size;
+  f->next = s->first;
+  s->first = f;
+  free(name);
+  return f;
+}
+
+
+////////////////////////////////////////////////////////////////
+// Public interface:
+
+void *fl_xftfont = 0;
+static GC font_gc;
+
+XFontStruct* Fl_XFont_On_Demand::value() {
+  return ptr;
+}
+
+void Fl_Xlib_Graphics_Driver::font(fltk3::Font fnum, fltk3::Fontsize size) {
+  if (fnum==-1) {
+    fltk3::GraphicsDriver::font(0, 0);
+    return;
+  }
+  if (fnum == fltk3::GraphicsDriver::font() && size == fltk3::GraphicsDriver::size()) return;
+  fltk3::GraphicsDriver::font(fnum, size);
+  Fl_Font_Descriptor* f = find(fnum, size);
+  if (f != this->font_descriptor()) {
+    this->font_descriptor(f);
+    fl_xfont = f->font->fonts[0];
+    font_gc = 0;
+  }
+}
+
+int Fl_Xlib_Graphics_Driver::height() {
+  if (font_descriptor()) return font_descriptor()->font->ascent + font_descriptor()->font->descent;
+  else return -1;
+}
+
+int Fl_Xlib_Graphics_Driver::descent() {
+  if (font_descriptor()) return font_descriptor()->font->descent;
+  else return -1;
+}
+
+double Fl_Xlib_Graphics_Driver::width(const char* c, int n) {
+  if (font_descriptor()) return (double) XUtf8TextWidth(font_descriptor()->font, c, n);
+  else return -1;
+}
+
+double Fl_Xlib_Graphics_Driver::width(unsigned int c) {
+  if (font_descriptor()) return (double) XUtf8UcsWidth(font_descriptor()->font, c);
+  else return -1;
+}
+
+void Fl_Xlib_Graphics_Driver::text_extents(const char *c, int n, int &dx, int &dy, int &W, int &H) {
+  if (font_gc != fl_gc) {
+    if (!font_descriptor()) font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+    font_gc = fl_gc;
+    XSetFont(fl_display, fl_gc, font_descriptor()->font->fid);
+  }
+  int xx, yy, ww, hh;
+  xx = yy = ww = hh = 0;
+  if (fl_gc) XUtf8_measure_extents(fl_display, fl_window, font_descriptor()->font, fl_gc, &xx, &yy, &ww, &hh, c, n);
+
+  W = ww; H = hh; dx = xx; dy = yy;
+// This is the safe but mostly wrong thing we used to do...
+//  W = 0; H = 0;
+//  fltk3::measure(c, W, H, 0);
+//  dx = 0;
+//  dy = fltk3::descent() - H;
+}
+
+void Fl_Xlib_Graphics_Driver::draw(const char* c, int n, int x, int y) {
+  if (font_gc != fl_gc) {
+    if (!font_descriptor()) this->font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+    font_gc = fl_gc;
+    XSetFont(fl_display, fl_gc, font_descriptor()->font->fid);
+  }
+  if (fl_gc) XUtf8DrawString(fl_display, fl_window, font_descriptor()->font, fl_gc, x, y, c, n);
+}
+
+void Fl_Xlib_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) {
+  fprintf(stderr,"ROTATING TEXT NOT IMPLEMENTED\n");
+  this->draw(str, n, (int)x, (int)y);
+}
+
+void Fl_Xlib_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
+  if (font_gc != fl_gc) {
+    if (!font_descriptor()) this->font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+    font_gc = fl_gc;
+  }
+  if (fl_gc) XUtf8DrawRtlString(fl_display, fl_window, font_descriptor()->font, fl_gc, x, y, c, n);
+}
+#endif // FLTK3_DOXYGEN
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_font_x.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_font_xft.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_font_xft.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_font_xft.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,706 @@
+//
+// "$Id$"
+//
+// Xft font code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2001-2011 Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//
+// Draw fonts using Keith Packard's Xft library to provide anti-
+// aliased text. Yow!
+//
+// Many thanks to Carl for making the original version of this.
+//
+// This font code only requires libXft to work.  Contrary to popular
+// belief there is no need to have FreeType, or the Xrender extension
+// available to use this code.  You will just get normal Xlib fonts
+// (Xft calls them "core" fonts) The Xft algorithms for choosing
+// these is about as good as the FLTK ones (I hope to fix it so it is
+// exactly as good...), plus it can cache its results and share them
+// between programs, so using this should be a win in all cases. Also
+// it should be obvious by comparing this file and fltk3::font_x.cxx that
+// it is a lot easier to program with Xft than with Xlib.
+//
+// Also, Xft supports UTF-8 text rendering directly, which will allow
+// us to support UTF-8 on all platforms more easily.
+//
+// To actually get antialiasing you need the following:
+//
+//     1. You have XFree86 4
+//     2. You have the XRender extension
+//     3. Your X device driver supports the render extension
+//     4. You have libXft
+//     5. Your libXft has FreeType2 support compiled in
+//     6. You have the FreeType2 library
+//
+// Distributions that have XFree86 4.0.3 or later should have all of this...
+//
+// Unlike some other Xft packages, I tried to keep this simple and not
+// to work around the current problems in Xft by making the "patterns"
+// complicated. I believe doing this defeats our ability to improve Xft
+// itself. You should edit the ~/.xftconfig file to "fix" things, there
+// are several web pages of information on how to do this.
+//
+#ifndef FLTK3_DOXYGEN
+
+#include <X11/Xft/Xft.h>
+
+#include <math.h>
+
+// The predefined fonts that FLTK has:
+static Fl_Fontdesc built_in_table[] = {
+#if 1
+{" sans"},
+{"Bsans"},
+{"Isans"},
+{"Psans"},
+{" mono"},
+{"Bmono"},
+{"Imono"},
+{"Pmono"},
+{" serif"},
+{"Bserif"},
+{"Iserif"},
+{"Pserif"},
+{" symbol"},
+{" screen"},
+{"Bscreen"},
+{" zapf dingbats"},
+#else
+{" helvetica"},
+{"Bhelvetica"},
+{"Ihelvetica"},
+{"Phelvetica"},
+{" courier"},
+{"Bcourier"},
+{"Icourier"},
+{"Pcourier"},
+{" times"},
+{"Btimes"},
+{"Itimes"},
+{"Ptimes"},
+{" symbol"},
+{" lucidatypewriter"},
+{"Blucidatypewriter"},
+{" zapf dingbats"},
+#endif
+};
+
+Fl_Fontdesc* fltk3::fonts = built_in_table;
+
+Fl_XFont_On_Demand fl_xfont;
+void *fl_xftfont = 0;
+//const char* fl_encoding_ = "iso8859-1";
+const char* fl_encoding_ = "iso10646-1";
+
+static void fl_xft_font(fltk3::XlibGraphicsDriver *driver, fltk3::Font fnum, fltk3::Fontsize size, int angle) {
+  if (fnum==-1) { // special case to stop font caching
+    driver->fltk3::GraphicsDriver::font(0, 0);
+    return;
+  }
+  Fl_Font_Descriptor* f = driver->font_descriptor();
+  if (fnum == driver->fltk3::GraphicsDriver::font() && size == driver->size() && f && f->angle == angle)
+    return;
+  driver->fltk3::GraphicsDriver::font(fnum, size);
+  Fl_Fontdesc *font = fltk3::fonts + fnum;
+  // search the fontsizes we have generated already
+  for (f = font->first; f; f = f->next) {
+    if (f->size == size && f->angle == angle)// && !strcasecmp(f->encoding, fl_encoding_))
+      break;
+  }
+  if (!f) {
+    f = new Fl_Font_Descriptor(font->name, size, angle);
+    f->next = font->first;
+    font->first = f;
+  }
+  driver->font_descriptor(f);
+#if XFT_MAJOR < 2
+  fl_xfont    = f->font->u.core.font;
+#else
+  fl_xfont    = NULL; // invalidate
+#endif // XFT_MAJOR < 2
+  fl_xftfont = (void*)f->font;
+}
+
+void fltk3::XlibGraphicsDriver::font(fltk3::Font fnum, fltk3::Fontsize size) {
+  fl_xft_font(this,fnum,size,0);
+}
+
+static XftFont* fontopen(const char* name, fltk3::Fontsize size, bool core, int angle) {
+  // Check: does it look like we have been passed an old-school XLFD fontname?
+  bool is_xlfd = false;
+  int hyphen_count = 0;
+  int comma_count = 0;
+  unsigned len = strlen(name);
+  if (len > 512) len = 512; // ensure we are not passed an unbounded font name
+  for(unsigned idx = 0; idx < len; idx++) {
+    if(name[idx] == '-') hyphen_count++; // check for XLFD hyphens
+    if(name[idx] == ',') comma_count++;  // are there multiple names?
+  }
+  if(hyphen_count >= 14) is_xlfd = true; // Not a robust check, but good enough?
+
+  fl_open_display();
+
+  if(!is_xlfd) { // Not an XLFD - open as a XFT style name
+    XftFont *the_font; // the font we will return;
+    XftPattern *fnt_pat = XftPatternCreate(); // the pattern we will use for matching
+    int slant = XFT_SLANT_ROMAN;
+    int weight = XFT_WEIGHT_MEDIUM;
+
+    /* This "converts" FLTK-style font names back into "regular" names, extracting
+     * the BOLD and ITALIC codes as it does so - all FLTK font names are prefixed
+     * by 'I' (italic) 'B' (bold) 'P' (bold italic) or ' ' (regular) modifiers.
+     * This gives a fairly limited font selection ability, but is retained for
+     * compatibility reasons. If you really need a more complex choice, you are best
+     * calling fltk3::set_fonts(*) then selecting the font by font-index rather than by
+     * name anyway. Probably.
+     * If you want to load a font who's name does actually begin with I, B or P, you
+     * MUST use a leading space OR simply use lowercase for the name...
+     */
+    /* This may be efficient, but it is non-obvious. */
+    switch (*name++) {
+    case 'I': slant = XFT_SLANT_ITALIC; break; // italic
+    case 'P': slant = XFT_SLANT_ITALIC;        // bold-italic (falls-through)
+    case 'B': weight = XFT_WEIGHT_BOLD; break; // bold
+    case ' ': break;                           // regular
+    default: name--;                           // no prefix, restore name
+    }
+
+    if(comma_count) { // multiple comma-separated names were passed
+      char *local_name = strdup(name); // duplicate the full name so we can edit the copy
+      char *curr = local_name; // points to first name in string
+      char *nxt; // next name in string
+      do {
+        nxt = strchr(curr, ','); // find comma separator
+        if (nxt) {
+          *nxt = 0; // terminate first name
+          nxt++; // first char of next name
+        }
+
+	// Add the current name to the match pattern
+	XftPatternAddString(fnt_pat, XFT_FAMILY, curr);
+
+        if(nxt) curr = nxt; // move onto next name (if it exists)
+	// Now do a cut-down version of the FLTK name conversion.
+	// NOTE: we only use the slant and weight of the first name,
+	// subsequent names we ignore this for... But we still need to do the check.
+        switch (*curr++) {
+        case 'I': break; // italic
+        case 'P':        // bold-italic (falls-through)
+        case 'B': break; // bold
+        case ' ': break; // regular
+        default: curr--; // no prefix, restore name
+        }
+
+        comma_count--; // decrement name sections count
+      } while (comma_count >= 0);
+      free(local_name); // release our local copy of font names
+    }
+    else { // single name was passed - add it directly
+      XftPatternAddString(fnt_pat, XFT_FAMILY, name);
+    }
+
+    // Construct a match pattern for the font we want...
+    XftPatternAddInteger(fnt_pat, XFT_WEIGHT, weight);
+    XftPatternAddInteger(fnt_pat, XFT_SLANT, slant);
+    XftPatternAddDouble (fnt_pat, XFT_PIXEL_SIZE, (double)size);
+    XftPatternAddString (fnt_pat, XFT_ENCODING, fl_encoding_);
+
+    // rotate font if angle!=0
+    if (angle !=0) {
+      XftMatrix m;
+      XftMatrixInit(&m);
+      XftMatrixRotate(&m,cos(M_PI*angle/180.),sin(M_PI*angle/180.));
+      XftPatternAddMatrix (fnt_pat, XFT_MATRIX,&m);
+    }
+
+    if (core) {
+      XftPatternAddBool(fnt_pat, XFT_CORE, FcTrue);
+      XftPatternAddBool(fnt_pat, XFT_RENDER, FcFalse);
+    }
+
+    XftPattern *match_pat;  // the best available match on the system
+    XftResult match_result; // the result of our matching attempt
+
+    // query the system to find a match for this font
+    match_pat = XftFontMatch(fl_display, fl_screen, fnt_pat, &match_result);
+
+#if 0 // the XftResult never seems to get set to anything... abandon this code?
+    switch(match_result) { // how good a match is this font for our request?
+      case XftResultMatch:
+	puts("Object exists with the specified ID");
+	break;
+
+      case XftResultTypeMismatch:
+	puts("Object exists, but the type does not match");
+	break;
+
+      case XftResultNoId:
+	puts("Object exists, but has fewer values than specified");
+	break;
+
+      case FcResultOutOfMemory:
+	puts("FcResult: Malloc failed");
+	break;
+
+      case XftResultNoMatch:
+	puts("Object does not exist at all");
+	break;
+
+      default:
+	printf("Invalid XftResult status %d \n", match_result);
+	break;
+    }
+#endif
+
+#if 0 // diagnostic to print the "full name" of the font we matched. This works.
+    FcChar8 *picked_name =  FcNameUnparse(match_pat);
+    printf("Match: %s\n", picked_name);
+    free(picked_name);
+#endif
+
+    if (!match_pat) {
+      // last chance, just open any font in the right size
+      the_font = XftFontOpen (fl_display, fl_screen,
+                        XFT_FAMILY, XftTypeString, "sans",
+                        XFT_SIZE, XftTypeDouble, (double)size,
+                        NULL);
+      XftPatternDestroy(fnt_pat);
+      if (!the_font) {
+        fltk3::error("Unable to find fonts. Check your FontConfig configuration.\n");
+        exit(1);
+      }
+      return the_font;
+    }
+
+    // open the matched font
+    the_font = XftFontOpenPattern(fl_display, match_pat);
+
+#if 0 // diagnostic to print the "full name" of the font we actually opened. This works.
+    FcChar8 *picked_name2 =  FcNameUnparse(the_font->pattern);
+    printf("Open : %s\n", picked_name2);
+    free(picked_name2);
+#endif
+
+    XftPatternDestroy(fnt_pat);
+//  XftPatternDestroy(match_pat); // FontConfig will destroy this resource for us. We must not!
+
+    return the_font;
+  }
+  else { // We were passed a font name in XLFD format
+    /* OksiD's X font code could handle being passed a comma separated list
+     * of XLFD's. It then attempted to find which font was "best" from this list.
+     * But XftFontOpenXlfd can not do this, so if a list is passed, we just
+     * terminate it at the first comma.
+     * A "better" solution might be to use XftXlfdParse() on each of the passed
+     * XLFD's to construct a "super-pattern" that incorporates attributes from all
+     * XLFD's and use that to perform a XftFontMatch(). Maybe...
+     */
+    char *local_name = strdup(name);
+    if(comma_count) { // This means we were passed multiple XLFD's
+      char *pc = strchr(local_name, ',');
+      *pc = 0; // terminate the XLFD at the first comma
+    }
+    XftFont *the_font = XftFontOpenXlfd(fl_display, fl_screen, local_name);
+    free(local_name);
+#if 0 // diagnostic to print the "full name" of the font we actually opened. This works.
+puts("Font Opened"); fflush(stdout);
+    FcChar8 *picked_name2 =  FcNameUnparse(the_font->pattern);
+    printf("Open : %s\n", picked_name2); fflush(stdout);
+    free(picked_name2);
+#endif
+   return the_font;
+  }
+} // end of fontopen
+
+Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, fltk3::Fontsize fsize, int fangle) {
+//  encoding = fl_encoding_;
+  size = fsize;
+  angle = fangle;
+#if HAVE_GL
+  listbase = 0;
+#endif // HAVE_GL
+  font = fontopen(name, fsize, false, angle);
+}
+
+Fl_Font_Descriptor::~Fl_Font_Descriptor() {
+  if (this == fltk3::graphics_driver->font_descriptor()) fltk3::graphics_driver->font_descriptor(NULL);
+//  XftFontClose(fl_display, font);
+}
+
+/* decodes the input UTF-8 string into a series of wchar_t characters.
+ n is set upon return to the number of characters.
+ Don't deallocate the returned memory.
+ */
+static const wchar_t *utf8reformat(const char *str, int& n)
+{
+  static const wchar_t empty[] = {0};
+  static wchar_t *buffer;
+  static int lbuf = 0;
+  int newn;
+  if (n == 0) return empty;
+  newn = fltk3::utf8towc(str, n, (wchar_t*)buffer, lbuf);
+  if (newn >= lbuf) {
+    lbuf = newn + 100;
+    if (buffer) free(buffer);
+    buffer = (wchar_t*)malloc(lbuf * sizeof(wchar_t));
+    n = fltk3::utf8towc(str, n, (wchar_t*)buffer, lbuf);
+  } else {
+    n = newn;
+  }
+  return buffer;
+}
+
+static void utf8extents(Fl_Font_Descriptor *desc, const char *str, int n, XGlyphInfo *extents)
+{
+  memset(extents, 0, sizeof(XGlyphInfo));
+  const wchar_t *buffer = utf8reformat(str, n);
+#ifdef __CYGWIN__
+    XftTextExtents16(fl_display, desc->font, (XftChar16 *)buffer, n, extents);
+#else
+    XftTextExtents32(fl_display, desc->font, (XftChar32 *)buffer, n, extents);
+#endif
+}
+
+int fltk3::XlibGraphicsDriver::height() {
+  if (font_descriptor()) return font_descriptor()->font->ascent + font_descriptor()->font->descent;
+  else return -1;
+}
+
+int fltk3::XlibGraphicsDriver::descent() {
+  if (font_descriptor()) return font_descriptor()->font->descent;
+  else return -1;
+}
+
+double fltk3::XlibGraphicsDriver::width(const char* str, int n) {
+  if (!font_descriptor()) return -1.0;
+  XGlyphInfo i;
+  utf8extents(font_descriptor(), str, n, &i);
+  return i.xOff;
+}
+
+/*double fltk3::width(uchar c) {
+  return fltk3::graphics_driver->width((const char *)(&c), 1);
+}*/
+
+static double fl_xft_width(Fl_Font_Descriptor *desc, FcChar32 *str, int n) {
+  if (!desc) return -1.0;
+  XGlyphInfo i;
+  XftTextExtents32(fl_display, desc->font, str, n, &i);
+  return i.xOff;
+}
+
+double fltk3::XlibGraphicsDriver::width(unsigned int c) {
+  return fl_xft_width(font_descriptor(), (FcChar32 *)(&c), 1);
+}
+
+void fltk3::XlibGraphicsDriver::text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
+  if (!font_descriptor()) {
+    w = h = 0;
+    dx = dy = 0;
+    return;
+  }
+  XGlyphInfo gi;
+  utf8extents(font_descriptor(), c, n, &gi);
+
+  w = gi.width;
+  h = gi.height;
+  dx = -gi.x;
+  dy = -gi.y;
+} // fltk3::text_extents
+
+
+/* This code is used (mainly by opengl) to get a bitmapped font. The
+ * original XFT-1 code used XFT's "core" fonts methods to load an XFT
+ * font that was actually a X-bitmap font, that could then be readily
+ * used with GL.  But XFT-2 does not provide that ability, and there
+ * is no easy method to use an XFT font directly with GL. So...
+*/
+
+#  if XFT_MAJOR > 1
+// This function attempts, on XFT2 systems, to find a suitable "core" Xfont
+// for GL or other bitmap font needs (we dont have an XglUseXftFont(...) function.)
+// There's probably a better way to do this. I can't believe it is this hard...
+// Anyway... This code attempts to make an XLFD out of the fltk-style font
+// name it is passed, then tries to load that font. Surprisingly, this quite
+// often works - boxes that have XFT generally also have a fontserver that
+// can serve TTF and other fonts to X, and so the font name that fltk makes
+// from the XFT name often also "exists" as an "core" X font...
+// If this code fails to load the requested font, it falls back through a
+// series of tried 'n tested alternatives, ultimately resorting to what the
+// original fltk code did.
+// NOTE: On my test boxes (FC6, FC7, FC8, ubuntu8.04, 9.04, 9.10) this works 
+//       well for the fltk "built-in" font names.
+static XFontStruct* load_xfont_for_xft2(fltk3::GraphicsDriver *driver) {
+  XFontStruct* xgl_font = 0;
+  int size = driver->size();
+  int fnum = driver->font();
+  const char *wt_med = "medium";
+  const char *wt_bold = "bold";
+  const char *weight = wt_med; // no specifc weight requested - accept any
+  char slant = 'r';   // regular non-italic by default
+  char xlfd[128];     // we will put our synthetic XLFD in here
+  char *pc = strdup(fltk3::fonts[fnum].name); // what font were we asked for?
+  const char *name = pc;    // keep a handle to the original name for freeing later
+  // Parse the "fltk-name" of the font
+  switch (*name++) {
+  case 'I': slant = 'i'; break;       // italic
+  case 'P': slant = 'i';              // bold-italic (falls-through)
+  case 'B': weight = wt_bold; break;  // bold
+  case ' ': break;                    // regular
+  default: name--;                    // no prefix, restore name
+  }
+
+  // first, we do a query with no prefered size, to see if the font exists at all
+  snprintf(xlfd, 128, "-*-%s-%s-%c-*--*-*-*-*-*-*-*-*", name, weight, slant); // make up xlfd style name
+  xgl_font = XLoadQueryFont(fl_display, xlfd);
+  if(xgl_font) { // the face exists, but can we get it in a suitable size?
+    XFreeFont(fl_display, xgl_font); // release the non-sized version
+    snprintf(xlfd, 128, "-*-%s-%s-%c-*--*-%d-*-*-*-*-*-*", name, weight, slant, (size*10));
+    xgl_font = XLoadQueryFont(fl_display, xlfd); // attempt to load the font at the right size
+  }
+//puts(xlfd);
+
+  // try alternative names
+  if (!xgl_font) {
+    if (!strcmp(name, "sans")) {
+      name = "helvetica";
+    } else if (!strcmp(name, "mono")) {
+      name = "courier";
+    } else if (!strcmp(name, "serif")) {
+      name = "times";
+    } else if (!strcmp(name, "screen")) {
+      name = "lucidatypewriter";
+    } else if (!strcmp(name, "dingbats")) {
+      name = "zapf dingbats";
+    }
+    snprintf(xlfd, 128, "-*-*%s*-%s-%c-*--*-%d-*-*-*-*-*-*", name, weight, slant, (size*10));
+    xgl_font = XLoadQueryFont(fl_display, xlfd);
+  }  
+  free(pc); // release our copy of the font name
+  
+  // if we have nothing loaded, try a generic proportional font
+  if(!xgl_font) {
+    snprintf(xlfd, 128, "-*-helvetica-*-%c-*--*-%d-*-*-*-*-*-*", slant, (size*10));
+    xgl_font = XLoadQueryFont(fl_display, xlfd);
+  }
+  // If that still didn't work, try this instead
+  if(!xgl_font) {
+    snprintf(xlfd, 128, "-*-courier-medium-%c-*--*-%d-*-*-*-*-*-*", slant, (size*10));
+    xgl_font = XLoadQueryFont(fl_display, xlfd);
+  }
+//printf("glf: %d\n%s\n%s\n", size, xlfd, fltk3::fonts[fltk3::font_].name);
+//if(xgl_font) puts("ok");
+
+  // Last chance fallback - this usually loads something...
+  if (!xgl_font) xgl_font = XLoadQueryFont(fl_display, "fixed");
+
+  return xgl_font;
+} // end of load_xfont_for_xft2
+#  endif
+
+static XFontStruct* fl_xxfont(fltk3::GraphicsDriver *driver) {
+#  if XFT_MAJOR > 1
+  // kludge! XFT 2 and later does not provide core fonts for us to use with GL
+  // try to load a bitmap X font instead
+  static XFontStruct* xgl_font = 0;
+  static int glsize = 0;
+  static int glfont = -1;
+  // Do we need to load a new font?
+  if ((!xgl_font) || (glsize != driver->size()) || (glfont != driver->font())) {
+    // create a dummy XLFD for some font of the appropriate size...
+    if (xgl_font) XFreeFont(fl_display, xgl_font); // font already loaded, free it - this *might* be a Bad Idea
+    glsize = driver->size(); // record current font size
+    glfont = driver->font(); // and face
+    xgl_font = load_xfont_for_xft2(driver);
+  }
+  return xgl_font;
+#  else // XFT-1 provides a means to load a "core" font directly
+  if (driver->font_descriptor()->font->core) {
+    return driver->font_descriptor()->font->u.core.font; // is the current font a "core" font? If so, use it.
+    }
+  static XftFont* xftfont;
+  if (xftfont) XftFontClose (fl_display, xftfont);
+  xftfont = fontopen(fltk3::fonts[driver->font()].name, driver->size(), true, 0); // else request XFT to load a suitable "core" font instead.
+  return xftfont->u.core.font;
+#  endif // XFT_MAJOR > 1
+}
+
+XFontStruct* Fl_XFont_On_Demand::value() {
+  if (!ptr) ptr = fl_xxfont(fltk3::graphics_driver);
+  return ptr;
+}
+
+#if USE_OVERLAY
+// Currently Xft does not work with colormapped visuals, so this probably
+// does not work unless you have a true-color overlay.
+extern bool fl_overlay;
+extern Colormap fl_overlay_colormap;
+extern XVisualInfo* fl_overlay_visual;
+#endif
+
+// For some reason Xft produces errors if you destroy a window whose id
+// still exists in an XftDraw structure. It would be nice if this is not
+// true, a lot of junk is needed to try to stop this:
+
+static XftDraw* draw_;
+static Window draw_window;
+#if USE_OVERLAY
+static XftDraw* draw_overlay;
+static Window draw_overlay_window;
+#endif
+
+void fl_destroy_xft_draw(Window id) {
+  if (id == draw_window)
+    XftDrawChange(draw_, draw_window = fltk3::message_window);
+#if USE_OVERLAY
+  if (id == draw_overlay_window)
+    XftDrawChange(draw_overlay, draw_overlay_window = fltk3::message_window);
+#endif
+}
+
+void fltk3::XlibGraphicsDriver::draw(const char *str, int n, int x, int y) {
+  if ( !this->font_descriptor() ) {
+    this->font(fltk3::HELVETICA, fltk3::NORMAL_SIZE);
+  }
+#if USE_OVERLAY
+  XftDraw*& draw_ = fl_overlay ? draw_overlay : ::draw_;
+  if (fl_overlay) {
+    if (!draw_)
+      draw_ = XftDrawCreate(fl_display, draw_overlay_window = fl_window,
+			   fl_overlay_visual->visual, fl_overlay_colormap);
+    else //if (draw_overlay_window != fl_window)
+      XftDrawChange(draw_, draw_overlay_window = fl_window);
+  } else
+#endif
+  if (!draw_)
+    draw_ = XftDrawCreate(fl_display, draw_window = fl_window,
+			 fl_visual->visual, fl_colormap);
+  else //if (draw_window != fl_window)
+    XftDrawChange(draw_, draw_window = fl_window);
+
+  Region region = fltk3::clip_region();
+  if (region && XEmptyRegion(region)) return;
+  XftDrawSetClip(draw_, region);
+
+  // Use fltk's color allocator, copy the results to match what
+  // XftCollorAllocValue returns:
+  XftColor color;
+  color.pixel = fl_xpixel(fltk3::GraphicsDriver::color());
+  uchar r,g,b; fltk3::get_color(fltk3::GraphicsDriver::color(), r,g,b);
+  color.color.red   = ((int)r)*0x101;
+  color.color.green = ((int)g)*0x101;
+  color.color.blue  = ((int)b)*0x101;
+  color.color.alpha = 0xffff;
+  
+  const wchar_t *buffer = utf8reformat(str, n);
+#ifdef __CYGWIN__
+  XftDrawString16(draw_, &color, font_descriptor()->font, x, y, (XftChar16 *)buffer, n);
+#else
+  XftDrawString32(draw_, &color, font_descriptor()->font, x, y, (XftChar32 *)buffer, n);
+#endif
+}
+
+void fltk3::XlibGraphicsDriver::draw(int angle, const char *str, int n, int x, int y) {
+  fl_xft_font(this, this->fltk3::GraphicsDriver::font(), this->size(), angle);
+  this->draw(str, n, (int)x, (int)y);
+  fl_xft_font(this, this->fltk3::GraphicsDriver::font(), this->size(), 0);
+}
+
+static void fl_drawUCS4(fltk3::GraphicsDriver *driver, const FcChar32 *str, int n, int x, int y) {
+#if USE_OVERLAY
+  XftDraw*& draw_ = fl_overlay ? draw_overlay : ::draw_;
+  if (fl_overlay) {
+    if (!draw_)
+      draw_ = XftDrawCreate(fl_display, draw_overlay_window = fl_window,
+			   fl_overlay_visual->visual, fl_overlay_colormap);
+    else //if (draw_overlay_window != fl_window)
+      XftDrawChange(draw_, draw_overlay_window = fl_window);
+  } else
+#endif
+  if (!draw_)
+    draw_ = XftDrawCreate(fl_display, draw_window = fl_window,
+			 fl_visual->visual, fl_colormap);
+  else //if (draw_window != fl_window)
+    XftDrawChange(draw_, draw_window = fl_window);
+
+  Region region = fltk3::clip_region();
+  if (region && XEmptyRegion(region)) return;
+  XftDrawSetClip(draw_, region);
+
+  // Use fltk's color allocator, copy the results to match what
+  // XftCollorAllocValue returns:
+  XftColor color;
+  color.pixel = fl_xpixel(driver->color());
+  uchar r,g,b; fltk3::get_color(driver->color(), r,g,b);
+  color.color.red   = ((int)r)*0x101;
+  color.color.green = ((int)g)*0x101;
+  color.color.blue  = ((int)b)*0x101;
+  color.color.alpha = 0xffff;
+
+  XftDrawString32(draw_, &color, driver->font_descriptor()->font, x, y, (FcChar32 *)str, n);
+}
+
+
+void fltk3::XlibGraphicsDriver::rtl_draw(const char* c, int n, int x, int y) {
+
+#if defined(__GNUC__)
+// FIXME: warning Need to improve this XFT right to left draw function
+#endif /*__GNUC__*/
+
+// This actually draws LtoR, but aligned to R edge with the glyph order reversed...
+// but you can't just byte-rev a UTF-8 string, that isn't valid.
+// You can reverse a UCS4 string though...
+  int num_chars, wid, utf_len = strlen(c);
+  FcChar8 *u8 = (FcChar8 *)c;
+  FcBool valid = FcUtf8Len(u8, utf_len, &num_chars, &wid);
+  if (!valid)
+  {
+    // badly formed Utf-8 input string
+    return;
+  }
+  if (num_chars < n) n = num_chars; // limit drawing to usable characters in input array
+  FcChar32 *ucs_txt = new FcChar32[n+1];
+  FcChar32* pu;
+  int in, out, sz;
+  ucs_txt[n] = 0;
+  in = 0; out = n-1;
+  while ((out >= 0) && (utf_len > 0))
+  {
+    pu = &ucs_txt[out];
+    sz = FcUtf8ToUcs4(u8, pu, utf_len);
+    utf_len = utf_len - sz;
+    u8 = u8 + sz;
+    out = out - 1;
+  }
+  // Now we have a UCS4 version of the input text, reversed, in ucs_txt
+  int offs = (int)fl_xft_width(font_descriptor(), ucs_txt, n);
+  fl_drawUCS4(this, ucs_txt, n, (x-offs), y);
+
+  delete[] ucs_txt;
+}
+#endif
+
+//
+// End of "$Id$"
+//


Property changes on: branches/branch-3.0/src/core/fl_font_xft.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_gtk.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_gtk.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_gtk.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,289 @@
+//
+// "$Id$"
+//
+// "GTK" drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a GTK+ look, based on Red Hat's Bluecurve
+// theme...
+//
+// Copyright 2006-2010 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in separate files so they are not linked
+// in if not used.
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+extern void fl_internal_boxtype(fltk3::Boxtype, fltk3::BoxDrawF*);
+
+
+static void gtk_color(fltk3::Color c) {
+  if (fltk3::draw_box_active()) fltk3::color(c);
+  else fltk3::color(fltk3::inactive(c));
+}
+
+
+void fl_gtk_up_frame(int x, int y, int w, int h, fltk3::Color c) {
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.5));
+  fltk3::xyline(x + 2, y + 1, x + w - 3);
+  fltk3::yxline(x + 1, y + 2, y + h - 3);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.5));
+  fltk3::begin_loop();
+    fltk3::vertex(x, y + 2);
+    fltk3::vertex(x + 2, y);
+    fltk3::vertex(x + w - 3, y);
+    fltk3::vertex(x + w - 1, y + 2);
+    fltk3::vertex(x + w - 1, y + h - 3);
+    fltk3::vertex(x + w - 3, y + h - 1);
+    fltk3::vertex(x + 2, y + h - 1);
+    fltk3::vertex(x, y + h - 3);
+  fltk3::end_loop();
+}
+
+
+void fl_gtk_up_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_gtk_up_frame(x, y, w, h, c);
+
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.4f));
+  fltk3::xyline(x + 2, y + 2, x + w - 3);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.2f));
+  fltk3::xyline(x + 2, y + 3, x + w - 3);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.1f));
+  fltk3::xyline(x + 2, y + 4, x + w - 3);
+  gtk_color(c);
+  fltk3::rectf(x + 2, y + 5, w - 4, h - 7);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.025f));
+  fltk3::xyline(x + 2, y + h - 4, x + w - 3);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.05f));
+  fltk3::xyline(x + 2, y + h - 3, x + w - 3);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.1f));
+  fltk3::xyline(x + 2, y + h - 2, x + w - 3);
+  fltk3::yxline(x + w - 2, y + 2, y + h - 3);
+}
+
+
+void fl_gtk_down_frame(int x, int y, int w, int h, fltk3::Color c) {
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.5));
+  fltk3::begin_loop();
+    fltk3::vertex(x, y + 2);
+    fltk3::vertex(x + 2, y);
+    fltk3::vertex(x + w - 3, y);
+    fltk3::vertex(x + w - 1, y + 2);
+    fltk3::vertex(x + w - 1, y + h - 3);
+    fltk3::vertex(x + w - 3, y + h - 1);
+    fltk3::vertex(x + 2, y + h - 1);
+    fltk3::vertex(x, y + h - 3);
+  fltk3::end_loop();
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.1f));
+  fltk3::xyline(x + 2, y + 1, x + w - 3);
+  fltk3::yxline(x + 1, y + 2, y + h - 3);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.05f));
+  fltk3::yxline(x + 2, y + h - 2, y + 2, x + w - 2);
+}
+
+
+void fl_gtk_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_gtk_down_frame(x, y, w, h, c);
+
+  gtk_color(c);
+  fltk3::rectf(x + 3, y + 3, w - 5, h - 4);
+  fltk3::yxline(x + w - 2, y + 3, y + h - 3);
+}
+
+
+void fl_gtk_thin_up_frame(int x, int y, int w, int h, fltk3::Color c) {
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.6f));
+  fltk3::xyline(x + 1, y, x + w - 2);
+  fltk3::yxline(x, y + 1, y + h - 2);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.4f));
+  fltk3::xyline(x + 1, y + h - 1, x + w - 2);
+  fltk3::yxline(x + w - 1, y + 1, y + h - 2);
+}
+
+
+void fl_gtk_thin_up_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_gtk_thin_up_frame(x, y, w, h, c);
+
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.4f));
+  fltk3::xyline(x + 1, y + 1, x + w - 2);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.2f));
+  fltk3::xyline(x + 1, y + 2, x + w - 2);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.1f));
+  fltk3::xyline(x + 1, y + 3, x + w - 2);
+  gtk_color(c);
+  fltk3::rectf(x + 1, y + 4, w - 2, h - 8);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.025f));
+  fltk3::xyline(x + 1, y + h - 4, x + w - 2);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.05f));
+  fltk3::xyline(x + 1, y + h - 3, x + w - 2);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.1f));
+  fltk3::xyline(x + 1, y + h - 2, x + w - 2);
+}
+
+
+void fl_gtk_thin_down_frame(int x, int y, int w, int h, fltk3::Color c) {
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.4f));
+  fltk3::xyline(x + 1, y, x + w - 2);
+  fltk3::yxline(x, y + 1, y + h - 2);
+
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.6f));
+  fltk3::xyline(x + 1, y + h - 1, x + w - 2);
+  fltk3::yxline(x + w - 1, y + 1, y + h - 2);
+}
+
+
+void fl_gtk_thin_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_gtk_thin_down_frame(x, y, w, h, c);
+
+  gtk_color(c);
+  fltk3::rectf(x + 1, y + 1, w - 2, h - 2);
+}
+
+//------------------------
+// new GTK+ style for round buttons
+#if 1
+
+static void arc_i(int x,int y,int w,int h,double a1,double a2) {
+  fltk3::arc(x,y,w,h,a1,a2);
+}
+
+enum {UPPER_LEFT, LOWER_RIGHT, CLOSED, FILL};
+
+static void draw(int which, int x,int y,int w,int h, int inset)
+{
+  if (inset*2 >= w) inset = (w-1)/2;
+  if (inset*2 >= h) inset = (h-1)/2;
+  x += inset;
+  y += inset;
+  w -= 2*inset;
+  h -= 2*inset;
+  int d = w <= h ? w : h;
+  if (d <= 1) return;
+  void (*f)(int,int,int,int,double,double);
+  f = (which==FILL) ? fltk3::pie : arc_i;
+  if (which >= CLOSED) {
+    f(x+w-d, y, d, d, w<=h ? 0 : -90, w<=h ? 180 : 90);
+    f(x, y+h-d, d, d, w<=h ? 180 : 90, w<=h ? 360 : 270);
+  } else if (which == UPPER_LEFT) {
+    f(x+w-d, y, d, d, 45, w<=h ? 180 : 90);
+    f(x, y+h-d, d, d, w<=h ? 180 : 90, 225);
+  } else { // LOWER_RIGHT
+    f(x, y+h-d, d, d, 225, w<=h ? 360 : 270);
+    f(x+w-d, y, d, d, w<=h ? 360 : 270, 360+45);
+  }
+  if (which == FILL) {
+    if (w < h)
+      fltk3::rectf(x, y+d/2, w, h-(d&-2));
+    else if (w > h)
+      fltk3::rectf(x+d/2, y, w-(d&-2), h);
+  } else {
+    if (w < h) {
+      if (which != UPPER_LEFT) fltk3::yxline(x+w-1, y+d/2-1, y+h-d/2+1);
+      if (which != LOWER_RIGHT) fltk3::yxline(x, y+d/2-1, y+h-d/2+1);
+    } else if (w > h) {
+      if (which != UPPER_LEFT) fltk3::xyline(x+d/2-1, y+h-1, x+w-d/2+1);
+      if (which != LOWER_RIGHT) fltk3::xyline(x+d/2-1, y, x+w-d/2+1);
+    }
+  }
+}
+
+void fl_gtk_round_up_box(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c);
+  draw(FILL,	    x,   y, w,   h, 2);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.025f));
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 2);
+  draw(LOWER_RIGHT, x,   y, w,   h, 3);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.05f));
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 1);
+  draw(LOWER_RIGHT, x,   y, w,   h, 2);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.1f));
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 0);
+  draw(LOWER_RIGHT, x,   y, w,   h, 1);
+
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.1f));
+  draw(UPPER_LEFT,  x,   y, w,   h, 4);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 3);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.2f));
+  draw(UPPER_LEFT,  x,   y, w,   h, 3);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 2);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.4f));
+  draw(UPPER_LEFT,  x,   y, w,   h, 2);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 1);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.5f));
+  draw(UPPER_LEFT,  x,   y, w,   h, 1);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 0);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.5f));
+  draw(CLOSED,	    x,   y, w,   h, 0);
+}
+
+void fl_gtk_round_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c);
+  draw(FILL,	    x,   y, w,   h, 2);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.05f));
+  draw(UPPER_LEFT,  x,   y, w,   h, 2);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 1);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.1f));
+  draw(UPPER_LEFT,  x,   y, w,   h, 1);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 0);
+
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.5f));
+  draw(CLOSED,	    x,   y, w,   h, 0);
+}
+
+#else
+
+void fl_gtk_round_up_box(int x, int y, int w, int h, fltk3::Color c) {
+  gtk_color(c);
+  fltk3::pie(x, y, w, h, 0.0, 360.0);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.5f));
+  fltk3::arc(x, y, w, h, 45.0, 180.0);
+  gtk_color(fltk3::color_average(fltk3::WHITE, c, 0.25f));
+  fltk3::arc(x, y, w, h, 180.0, 405.0);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.5f));
+  fltk3::arc(x, y, w, h, 225.0, 360.0);
+}
+
+
+void fl_gtk_round_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  gtk_color(c);
+  fltk3::pie(x, y, w, h, 0.0, 360.0);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.2));
+  fltk3::arc(x + 1, y, w, h, 90.0, 210.0);
+  gtk_color(fltk3::color_average(fltk3::BLACK, c, 0.6));
+  fltk3::arc(x, y, w, h, 0.0, 360.0);
+}
+
+#endif
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_gtk.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_images_core.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_images_core.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_images_core.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,106 @@
+//
+// "$Id$"
+//
+// FLTK images library core.
+//
+// Copyright 1997-2010 by Easy Software Products.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// Contents:
+//
+//   fltk3::register_images() - Register the image formats.
+//   fl_check_images()    - Check for a supported image format.
+//
+
+//
+// Include necessary header files...
+//
+
+#include <fltk3/SharedImage.h>
+#include <fltk3/BMPImage.h>
+#include <fltk3/GIFImage.h>
+#include <fltk3/JPEGImage.h>
+#include <fltk3/PNGImage.h>
+#include <fltk3/PNMImage.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "flstring.h"
+
+
+//
+// Define a simple global image registration function that registers
+// the extra image formats that aren't part of the core FLTK library.
+//
+
+static fltk3::Image	*fl_check_images(const char *name, uchar *header, int headerlen);
+
+
+/**
+\brief Register the image formats.
+ *
+ This function is provided in the fltk_images library and 
+ registers all of the "extra" image file formats that are not part
+ of the core FLTK library.
+*/
+void fltk3::register_images() {
+  fltk3::SharedImage::add_handler(fl_check_images);
+}
+
+
+//
+// 'fl_check_images()' - Check for a supported image format.
+//
+
+fltk3::Image *					// O - Image, if found
+fl_check_images(const char *name,		// I - Filename
+                uchar      *header,		// I - Header data from file
+		int) {				// I - Amount of data (not used)
+  if (memcmp(header, "GIF87a", 6) == 0 ||
+      memcmp(header, "GIF89a", 6) == 0)	// GIF file
+    return new fltk3::GIFImage(name);
+
+  if (memcmp(header, "BM", 2) == 0)	// BMP file
+    return new fltk3::BMPImage(name);
+
+  if (header[0] == 'P' && header[1] >= '1' && header[1] <= '7')
+					// Portable anymap
+    return new fltk3::PNMImage(name);
+
+#ifdef HAVE_LIBPNG
+  if (memcmp(header, "\211PNG", 4) == 0)// PNG file
+    return new fltk3::PNGImage(name);
+#endif // HAVE_LIBPNG
+
+#ifdef HAVE_LIBJPEG
+  if (memcmp(header, "\377\330\377", 3) == 0 &&
+					// Start-of-Image
+      header[3] >= 0xc0 && header[3] <= 0xef)
+	   				// APPn for JPEG file
+    return new fltk3::JPEGImage(name);
+#endif // HAVE_LIBJPEG
+
+  return 0;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_images_core.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_labeltype.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_labeltype.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_labeltype.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,162 @@
+//
+// "$Id$"
+//
+// Label drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Drawing code for the (one) common label types.
+// Other label types (symbols) are in their own source files
+// to avoid linking if not used.
+
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/Group.h>
+#include <fltk3/draw.h>
+#include <fltk3/Image.h>
+
+void
+fl_no_label(const fltk3::Label*,int,int,int,int,fltk3::Align) {}
+
+void
+fl_normal_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align)
+{
+  fltk3::font(o->font, o->size);
+  fltk3::color((fltk3::Color)o->color);
+  fltk3::draw(o->value, X, Y, W, H, align, o->image);
+}
+
+void
+fl_normal_measure(const fltk3::Label* o, int& W, int& H) {
+  fltk3::font(o->font, o->size);
+  fltk3::measure(o->value, W, H);
+  if (o->image) {
+    if (o->image->w() > W) W = o->image->w();
+    H += o->image->h();
+  }
+}
+
+#define MAX_LABELTYPE 16
+
+void fl_shadow_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align);
+void fl_engraved_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align);
+void fl_embossed_label(const fltk3::Label* o, int X, int Y, int W, int H, fltk3::Align align);
+void fl_multi_labeltype(const fltk3::Label* o, int x, int y, int w, int h, fltk3::Align a);
+void fl_multi_measure(const fltk3::Label* o, int& w, int& h);
+void fl_icon_labeltype(const fltk3::Label* o, int x, int y, int w, int h, fltk3::Align a);
+
+static fltk3::LabelDrawF* table[MAX_LABELTYPE] = {
+  fl_normal_label,
+  fl_no_label,
+  fl_shadow_label,      // fltk3::SHADOW_LABEL,
+  fl_engraved_label,    // fltk3::ENGRAVED_LABEL,
+  fl_embossed_label,    // fltk3::EMBOSSED_LABEL,
+  fl_multi_labeltype,   // fltk3::MULTI_LABEL,
+  fl_icon_labeltype,    // fltk3::ICON_LABEL,
+  fltk3::Image::labeltype, // fltk3::IMAGE_LABEL
+  // fltk3::FREE_LABELTYPE+n:
+  fl_no_label, fl_no_label,
+  fl_no_label, fl_no_label, fl_no_label,
+  fl_no_label, fl_no_label, fl_no_label
+};
+
+static fltk3::LabelMeasureF* measure[MAX_LABELTYPE] = {
+  0L, // normal
+  0L, // no
+  0L, // shadow
+  0L, // engraved
+  0L, // embossed
+  fl_multi_measure, // multi
+  0L, //icon
+  fltk3::Image::measure // image
+};
+
+/** Sets the functions to call to draw and measure a specific labeltype. */
+void fltk3::set_labeltype(fltk3::Labeltype t,fltk3::LabelDrawF* f,fltk3::LabelMeasureF*m) 
+{
+  table[t] = f; ::measure[t] = m;
+}
+
+////////////////////////////////////////////////////////////////
+
+/** Draws a label with arbitrary alignment in an arbitrary box. */
+void fltk3::Label::draw(int X, int Y, int W, int H, fltk3::Align align) const {
+  if (!value && !image) return;
+  table[type](this, X, Y, W, H, align);
+}
+
+/** 
+    Measures the size of the label.
+    \param[in,out] W, H : this is the requested size for the label text plus image;
+         on return, this will contain the size needed to fit the label
+*/
+void fltk3::Label::measure(int& W, int& H) const {
+  if (!value && !image) {
+    W = H = 0;
+    return;
+  }
+
+  fltk3::LabelMeasureF* f = ::measure[type]; if (!f) f = fl_normal_measure;
+  f(this, W, H);
+}
+
+/** Draws the widget's label at the defined label position.
+    This is the normal call for a widget's draw() method.
+ */
+void fltk3::Widget::draw_label() const {
+  int X = x_+fltk3::box_dx(box());
+  int W = w_-fltk3::box_dw(box());
+  if (W > 11 && align()&(fltk3::ALIGN_LEFT|fltk3::ALIGN_RIGHT)) {X += 3; W -= 6;}
+  draw_label(X, y_+fltk3::box_dy(box()), W, h_-fltk3::box_dh(box()));
+}
+
+/** Draws the label in an arbitrary bounding box.
+    draw() can use this instead of draw_label(void) to change the bounding box
+ */
+void fltk3::Widget::draw_label(int X, int Y, int W, int H) const {
+  // quit if we are not drawing a label inside the widget:
+  if ((align()&15) && !(align() & fltk3::ALIGN_INSIDE)) return;
+  draw_label(X,Y,W,H,align());
+}
+
+/** Draws the label in an arbitrary bounding box with an arbitrary alignment.
+    Anybody can call this to force the label to draw anywhere.
+ */
+void fltk3::Widget::draw_label(int X, int Y, int W, int H, fltk3::Align a) const {
+  if (flags()&SHORTCUT_LABEL) fltk3::draw_shortcut = 1;
+  fltk3::Label l1 = label_;
+  if (!active_r()) {
+    l1.color = fltk3::inactive((fltk3::Color)l1.color);
+    if (l1.deimage) l1.image = l1.deimage;
+  }
+  l1.draw(X,Y,W,H,a);
+  fltk3::draw_shortcut = 0;
+}
+
+// include these vars here so they can be referenced without including
+// fltk3::Input_ code:
+#include <fltk3/Input_.h>
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_labeltype.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_line_style.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_line_style.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_line_style.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,174 @@
+//
+// "$Id$"
+//
+// Line style code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_line_style.cxx
+  \brief Line style drawing utility hiding different platforms.
+*/
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include <fltk3/Printer.h>
+#include "flstring.h"
+#include <stdio.h>
+
+// We save the current line width (absolute value) here.
+// This is currently used only for X11 clipping, see src/fltk3::rect.cxx.
+// FIXME: this would probably better be in class fltk3::
+int fl_line_width_ = 0;
+
+#ifdef __APPLE_QUARTZ__
+float fl_quartz_line_width_ = 1.0f;
+static enum CGLineCap fl_quartz_line_cap_ = kCGLineCapButt;
+static enum CGLineJoin fl_quartz_line_join_ = kCGLineJoinMiter;
+static CGFloat *fl_quartz_line_pattern = 0;
+static int fl_quartz_line_pattern_size = 0;
+void fl_quartz_restore_line_style_() {
+  CGContextSetLineWidth(fl_gc, fl_quartz_line_width_);
+  CGContextSetLineCap(fl_gc, fl_quartz_line_cap_);
+  CGContextSetLineJoin(fl_gc, fl_quartz_line_join_);
+  CGContextSetLineDash(fl_gc, 0, fl_quartz_line_pattern, fl_quartz_line_pattern_size);
+}
+#endif
+
+void fltk3::GraphicsDriver::line_style(int style, int width, char* dashes) {
+
+  // save line width in global variable for X11 clipping
+  if (width == 0) fl_line_width_ = 1;
+  else fl_line_width_ = width>0 ? width : -width;
+
+#if defined(USE_X11)
+  int ndashes = dashes ? strlen(dashes) : 0;
+  // emulate the WIN32 dash patterns on X
+  char buf[7];
+  if (!ndashes && (style&0xff)) {
+    int w = width ? width : 1;
+    char dash, dot, gap;
+    // adjust lengths to account for cap:
+    if (style & 0x200) {
+      dash = char(2*w);
+      dot = 1; // unfortunately 0 does not work
+      gap = char(2*w-1);
+    } else {
+      dash = char(3*w);
+      dot = gap = char(w);
+    }
+    char* p = dashes = buf;
+    switch (style & 0xff) {
+    case fltk3::DASH:	*p++ = dash; *p++ = gap; break;
+    case fltk3::DOT:	*p++ = dot; *p++ = gap; break;
+    case fltk3::DASHDOT:	*p++ = dash; *p++ = gap; *p++ = dot; *p++ = gap; break;
+    case fltk3::DASHDOTDOT: *p++ = dash; *p++ = gap; *p++ = dot; *p++ = gap; *p++ = dot; *p++ = gap; break;
+    }
+    ndashes = p-buf;
+  }
+  static int Cap[4] = {CapButt, CapButt, CapRound, CapProjecting};
+  static int Join[4] = {JoinMiter, JoinMiter, JoinRound, JoinBevel};
+  XSetLineAttributes(fl_display, fl_gc, width, 
+		     ndashes ? LineOnOffDash : LineSolid,
+		     Cap[(style>>8)&3], Join[(style>>12)&3]);
+  if (ndashes) XSetDashes(fl_display, fl_gc, 0, dashes, ndashes);
+#elif defined(WIN32)
+  // According to Bill, the "default" cap and join should be the
+  // "fastest" mode supported for the platform.  I don't know why
+  // they should be different (same graphics cards, etc., right?) MRS
+  static DWORD Cap[4]= {PS_ENDCAP_FLAT, PS_ENDCAP_FLAT, PS_ENDCAP_ROUND, PS_ENDCAP_SQUARE};
+  static DWORD Join[4]={PS_JOIN_ROUND, PS_JOIN_MITER, PS_JOIN_ROUND, PS_JOIN_BEVEL};
+  int s1 = PS_GEOMETRIC | Cap[(style>>8)&3] | Join[(style>>12)&3];
+  DWORD a[16]; int n = 0;
+  if (dashes && dashes[0]) {
+    s1 |= PS_USERSTYLE;
+    for (n = 0; n < 16 && *dashes; n++) a[n] = *dashes++;
+  } else {
+    s1 |= style & 0xff; // allow them to pass any low 8 bits for style
+  }
+  if ((style || n) && !width) width = 1; // fix cards that do nothing for 0?
+  LOGBRUSH penbrush = {BS_SOLID,fl_RGB(),0}; // can this be fl_brush()?
+  HPEN newpen = ExtCreatePen(s1, width, &penbrush, n, n ? a : 0);
+  if (!newpen) {
+    fltk3::error("fltk3::line_style(): Could not create GDI pen object.");
+    return;
+  }
+  HPEN oldpen = (HPEN)SelectObject(fl_gc, newpen);
+  DeleteObject(oldpen);
+  DeleteObject(fl_current_xmap->pen);
+  fl_current_xmap->pen = newpen;
+#elif defined(__APPLE_QUARTZ__)
+  static enum CGLineCap Cap[4] = { kCGLineCapButt, kCGLineCapButt, 
+                                   kCGLineCapRound, kCGLineCapSquare };
+  static enum CGLineJoin Join[4] = { kCGLineJoinMiter, kCGLineJoinMiter, 
+                                    kCGLineJoinRound, kCGLineJoinBevel };
+  if (width<1) width = 1;
+  fl_quartz_line_width_ = (float)width; 
+  fl_quartz_line_cap_ = Cap[(style>>8)&3];
+  // when printing kCGLineCapSquare seems better for solid lines
+  if ( fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id && style == fltk3::SOLID && dashes == NULL ) {
+    fl_quartz_line_cap_ = kCGLineCapSquare;
+    }
+  fl_quartz_line_join_ = Join[(style>>12)&3];
+  char *d = dashes; 
+  static CGFloat pattern[16];
+  if (d && *d) {
+	CGFloat *p = pattern;
+    while (*d) { *p++ = (float)*d++; }
+    fl_quartz_line_pattern = pattern;
+    fl_quartz_line_pattern_size = d-dashes;
+  } else if (style & 0xff) {
+    char dash, dot, gap;
+    // adjust lengths to account for cap:
+    if (style & 0x200) {
+      dash = char(2*width);
+      dot = 1; 
+      gap = char(2*width-1);
+    } else {
+      dash = char(3*width);
+      dot = gap = char(width);
+    }
+	CGFloat *p = pattern;
+    switch (style & 0xff) {
+    case fltk3::DASH:       *p++ = dash; *p++ = gap; break;
+    case fltk3::DOT:        *p++ = dot; *p++ = gap; break;
+    case fltk3::DASHDOT:    *p++ = dash; *p++ = gap; *p++ = dot; *p++ = gap; break;
+    case fltk3::DASHDOTDOT: *p++ = dash; *p++ = gap; *p++ = dot; *p++ = gap; *p++ = dot; *p++ = gap; break;
+    }
+    fl_quartz_line_pattern_size = p-pattern;
+    fl_quartz_line_pattern = pattern;
+  } else {
+    fl_quartz_line_pattern = 0; 
+		fl_quartz_line_pattern_size = 0;
+  }
+  fl_quartz_restore_line_style_();
+#else
+# error unsupported platform
+#endif
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_line_style.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_open_uri.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_open_uri.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_open_uri.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,383 @@
+//
+// "$Id$"
+//
+// fltk3::open_uri() code for FLTK.
+//
+// Test with:
+//
+//    gcc -I/fltk/dir -I/fltk/dir/src -DTEST -o fltk3::open_uri fltk3::open_uri.cxx -lfltk
+//
+// Copyright 2003-2010 by Michael R Sweet
+//
+// 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.
+//
+
+//
+// Include necessary headers...
+//
+
+#include <fltk3/filename.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#include "flstring.h"
+#ifdef WIN32
+#  include <windows.h>
+#  include <shellapi.h>
+#else
+#  include <sys/wait.h>
+#  include <signal.h>
+#  include <fcntl.h>
+#  include <unistd.h>
+#endif // WIN32
+
+
+//
+// Local functions...
+//
+
+#if !defined(WIN32) && !defined(__APPLE__)
+static char	*path_find(const char *program, char *filename, int filesize);
+#endif // !WIN32 && !__APPLE__
+#ifndef WIN32
+static int	run_program(const char *program, char **argv, char *msg, int msglen);
+#endif // !WIN32
+
+/** \addtogroup filenames
+ @{ */
+
+/**
+ * Opens the specified Uniform Resource Identifier (URI).
+ * Uses an operating-system dependent program or interface. For URIs
+ * using the "ftp", "http", or "https" schemes, the system default web
+ * browser is used to open the URI, while "mailto" and "news" URIs are
+ * typically opened using the system default mail reader and "file" URIs
+ * are opened using the file system navigator.
+ *
+ * On success, the (optional) msg buffer is filled with the command that
+ * was run to open the URI; on Windows, this will always be "open uri".
+ *
+ * On failure, the msg buffer is filled with an English error message.
+ *
+ * \b Example
+ * \code
+ * #include <fltk3/filename.h>
+ * [..]
+ * char errmsg[512];
+ * if ( !fltk3::open_uri("http://google.com/";, errmsg, sizeof(errmsg)) ) {
+ *     char warnmsg[768];
+ *     sprintf(warnmsg, "Error: %s", errmsg);
+ *     fltk3::alert(warnmsg);
+ * }
+ * \endcode
+ *
+ * @param uri The URI to open
+ * @param msg Optional buffer which contains the command or error message
+ * @param msglen Length of optional buffer
+ * @return 1 on success, 0 on failure
+ */
+
+int
+fltk3::open_uri(const char *uri, char *msg, int msglen) {
+  // Supported URI schemes...
+  static const char * const schemes[] = {
+    "file://",
+    "ftp://";,
+    "http://";,
+    "https://";,
+    "mailto:";,
+    "news://";,
+    NULL
+  };
+
+  // Validate the URI scheme...
+  int i;
+  for (i = 0; schemes[i]; i ++)
+    if (!strncmp(uri, schemes[i], strlen(schemes[i])))
+      break;
+
+  if (!schemes[i]) {
+    if (msg) {
+      char scheme[255];
+      if (sscanf(uri, "%254[^:]", scheme) == 1) {
+        snprintf(msg, msglen, "URI scheme \"%s\" not supported.", scheme);
+      } else {
+        snprintf(msg, msglen, "Bad URI \"%s\"", uri);
+      }
+    }
+
+    return 0;
+  }
+
+#ifdef WIN32
+  if (msg) snprintf(msg, msglen, "open %s", uri);
+
+  return (int)(ShellExecute(HWND_DESKTOP, "open", uri, NULL, NULL, SW_SHOW) > (void *)32);
+
+#elif defined(__APPLE__)
+  char	*argv[3];			// Command-line arguments
+
+  argv[0] = (char*)"open";
+  argv[1] = (char*)uri;
+  argv[2] = (char*)0;
+
+  if (msg) snprintf(msg, msglen, "open %s", uri);
+
+  return run_program("/usr/bin/open", argv, msg, msglen) != 0;
+
+#else // !WIN32 && !__APPLE__
+  // Run any of several well-known commands to open the URI.
+  //
+  // We give preference to the Portland group's xdg-utils
+  // programs which run the user's preferred web browser, etc.
+  // based on the current desktop environment in use.  We fall
+  // back on older standards and then finally test popular programs
+  // until we find one we can use.
+  //
+  // Note that we specifically do not support the MAILER and
+  // BROWSER environment variables because we have no idea whether
+  // we need to run the listed commands in a terminal program.
+
+  char	command[FLTK3_PATH_MAX],		// Command to run...
+	*argv[4],			// Command-line arguments
+	remote[1024];			// Remote-mode command...
+  const char * const *commands;		// Array of commands to check...
+  static const char * const browsers[] = {
+    "xdg-open", // Portland
+    "htmlview", // Freedesktop.org
+    "firefox",
+    "mozilla",
+    "netscape",
+    "konqueror", // KDE
+    "opera",
+    "hotjava", // Solaris
+    "mosaic",
+    NULL
+  };
+  static const char * const readers[] = {
+    "xdg-email", // Portland
+    "thunderbird",
+    "mozilla",
+    "netscape",
+    "evolution", // GNOME
+    "kmailservice", // KDE
+    NULL
+  };
+  static const char * const managers[] = {
+    "xdg-open", // Portland
+    "fm", // IRIX
+    "dtaction", // CDE
+    "nautilus", // GNOME
+    "konqueror", // KDE
+    NULL
+  };
+
+  // Figure out which commands to check for...
+  if (!strncmp(uri, "file://", 7)) commands = managers;
+  else if (!strncmp(uri, "mailto:";, 7) ||
+           !strncmp(uri, "news:";, 5)) commands = readers;
+  else commands = browsers;
+
+  // Find the command to run...
+  for (i = 0; commands[i]; i ++)
+    if (path_find(commands[i], command, sizeof(command))) break;
+
+  if (!commands[i]) {
+    if (msg) {
+      snprintf(msg, msglen, "No helper application found for \"%s\"", uri);
+    }
+
+    return 0;
+  }
+
+  // Handle command-specific arguments...
+  argv[0] = (char *)commands[i];
+
+  if (!strcmp(commands[i], "firefox") ||
+      !strcmp(commands[i], "mozilla") ||
+      !strcmp(commands[i], "netscape") ||
+      !strcmp(commands[i], "thunderbird")) {
+    // program -remote openURL(uri)
+    snprintf(remote, sizeof(remote), "openURL(%s)", uri);
+
+    argv[1] = (char *)"-remote";
+    argv[2] = remote;
+    argv[3] = 0;
+  } else if (!strcmp(commands[i], "dtaction")) {
+    // dtaction open uri
+    argv[1] = (char *)"open";
+    argv[2] = (char *)uri;
+    argv[3] = 0;
+  } else {
+    // program uri
+    argv[1] = (char *)uri;
+    argv[2] = 0;
+  }
+
+  if (msg) {
+    strlcpy(msg, argv[0], msglen);
+
+    for (i = 1; argv[i]; i ++) {
+      strlcat(msg, " ", msglen);
+      strlcat(msg, argv[i], msglen);
+    }
+  }
+
+  return run_program(command, argv, msg, msglen) != 0;
+#endif // WIN32
+}
+
+/**   @} */
+
+#if !defined(WIN32) && !defined(__APPLE__)
+// Find a program in the path...
+static char *path_find(const char *program, char *filename, int filesize) {
+  const char	*path;			// Search path
+  char		*ptr,			// Pointer into filename
+		*end;			// End of filename buffer
+
+
+  if ((path = getenv("PATH")) == NULL) path = "/bin:/usr/bin";
+
+  for (ptr = filename, end = filename + filesize - 1; *path; path ++) {
+    if (*path == ':') {
+      if (ptr > filename && ptr[-1] != '/' && ptr < end) *ptr++ = '/';
+
+      strlcpy(ptr, program, end - ptr + 1);
+
+      if (!access(filename, X_OK)) return filename;
+
+      ptr = filename;
+    } else if (ptr < end) *ptr++ = *path;
+  }
+
+  if (ptr > filename) {
+    if (ptr[-1] != '/' && ptr < end) *ptr++ = '/';
+
+    strlcpy(ptr, program, end - ptr + 1);
+
+    if (!access(filename, X_OK)) return filename;
+  }
+
+  return 0;
+}
+#endif // !WIN32 && !__APPLE__
+
+
+#ifndef WIN32
+// Run the specified program, returning 1 on success and 0 on failure
+static int
+run_program(const char *program, char **argv, char *msg, int msglen) {
+  pid_t	pid;				// Process ID of first child
+  int status;				// Exit status from first child
+  sigset_t set, oldset;			// Signal masks
+
+
+  // Block SIGCHLD while we run the program...
+  //
+  // Note that I only use the POSIX signal APIs, however older operating
+  // systems may either not support POSIX signals or have side effects.
+  // IRIX, for example, provides three separate and incompatible signal
+  // APIs, so it is possible that an application setting a signal handler
+  // via signal() or sigset() will not have its SIGCHLD signals blocked...
+
+  sigemptyset(&set);
+  sigaddset(&set, SIGCHLD);
+  sigprocmask(SIG_BLOCK, &set, &oldset);
+
+  // Create child processes that actually run the program for us...
+  if ((pid = fork()) == 0) {
+    // First child comes here, fork a second child and exit...
+    if (!fork()) {
+      // Second child comes here, redirect stdin/out/err to /dev/null...
+      close(0);
+      open("/dev/null", O_RDONLY);
+
+      close(1);
+      open("/dev/null", O_WRONLY);
+
+      close(2);
+      open("/dev/null", O_WRONLY);
+
+      // Detach from the current process group...
+      setsid();
+
+      // Run the program...
+      execv(program, argv);
+      _exit(0);
+    } else {
+      // First child gets here, exit immediately...
+      _exit(0);
+    }
+  } else if (pid < 0) {
+    // Restore signal handling...
+    sigprocmask(SIG_SETMASK, &oldset, NULL);
+
+    // Return indicating failure...
+    return 0;
+  }
+
+  // Wait for the first child to exit...
+  while (waitpid(pid, &status, 0) < 0) {
+    if (errno != EINTR) {
+      // Someone else grabbed the child status...
+      if (msg) snprintf(msg, msglen, "waitpid(%ld) failed: %s", (long)pid,
+                        strerror(errno));
+
+      // Restore signal handling...
+      sigprocmask(SIG_SETMASK, &oldset, NULL);
+
+      // Return indicating failure...
+      return 0;
+    }
+  }
+
+  // Restore signal handling...
+  sigprocmask(SIG_SETMASK, &oldset, NULL);
+
+  // Return indicating success...
+  return 1;
+}
+#endif // !WIN32
+
+
+#ifdef TEST
+//
+// Test code...
+//
+
+// Open the URI on the command-line...
+int main(int argc, char **argv) {
+  char msg[1024];
+
+
+  if (argc != 2) {
+    puts("Usage: fltk3::open_uri URI");
+    return 1;
+  }
+
+  if (!fltk3::open_uri(argv[1], msg, sizeof(msg))) {
+    puts(msg);
+    return 1;
+  } else return 0;
+}
+#endif // TEST
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_open_uri.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_oval_box.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_oval_box.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_oval_box.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,57 @@
+//
+// "$Id$"
+//
+// Oval box drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+// Less-used box types are in separate files so they are not linked
+// in if not used.
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+void fl_oval_flat_box(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c);
+  fltk3::pie(x, y, w, h, 0, 360);
+}
+
+void fl_oval_frame(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c);
+  fltk3::arc(x, y, w, h, 0, 360);
+}
+
+void fl_oval_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_oval_flat_box(x,y,w,h,c);
+  fl_oval_frame(x,y,w,h,fltk3::BLACK);
+}
+
+void fl_oval_shadow_box(int x, int y, int w, int h, fltk3::Color c) {
+  fl_oval_flat_box(x+3,y+3,w,h,fltk3::DARK3);
+  fl_oval_box(x,y,w,h,c);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_oval_box.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_overlay.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_overlay.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_overlay.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,129 @@
+//
+// "$Id$"
+//
+// Overlay support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Extremely limited "overlay" support.  You can use this to drag out
+// a rectangle in response to mouse events.  It is your responsibility
+// to erase the overlay before drawing anything that might intersect
+// it.
+
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+#ifdef __APPLE__
+#include <config.h>
+#endif
+
+//#define USE_XOR
+
+static int px,py,pw,ph;
+
+#ifndef USE_XOR
+#include <stdlib.h>
+static uchar *bgN = 0L, *bgS = 0L, *bgE = 0L, *bgW = 0L;
+static int bgx, bgy, bgw, bgh;
+#endif
+
+static void draw_current_rect() {
+#ifdef USE_XOR
+# if defined(USE_X11)
+  XSetFunction(fl_display, fl_gc, GXxor);
+  XSetForeground(fl_display, fl_gc, 0xffffffff);
+  XDrawRectangle(fl_display, fl_window, fl_gc, px, py, pw, ph);
+  XSetFunction(fl_display, fl_gc, GXcopy);
+# elif defined(WIN32)
+  int old = SetROP2(fl_gc, R2_NOT);
+  fltk3::rect(px, py, pw, ph);
+  SetROP2(fl_gc, old);
+# elif defined(__APPLE_QUARTZ__)
+  // warning: Quartz does not support xor drawing
+  // Use the fltk3::OverlayWindow instead.
+  fltk3::color(fltk3::WHITE);
+  fltk3::rect(px, py, pw, ph);
+# else
+#  error unsupported platform
+# endif
+#else
+  if (bgN) { free(bgN); bgN = 0L; }
+  if (bgS) { free(bgS); bgS = 0L; }
+  if (bgE) { free(bgE); bgE = 0L; }
+  if (bgW) { free(bgW); bgW = 0L; }
+  if (pw>0 && ph>0) {
+    bgE = fltk3::read_image(0L, px+pw-1, py, 1, ph);
+    bgW = fltk3::read_image(0L, px, py, 1, ph);
+    bgS = fltk3::read_image(0L, px, py+ph-1, pw, 1);
+    bgN = fltk3::read_image(0L, px, py, pw, 1);
+    bgx = px; bgy = py;
+    bgw = pw; bgh = ph;
+  }
+  fltk3::color(fltk3::WHITE);
+  fltk3::line_style(fltk3::SOLID);
+  fltk3::rect(px, py, pw, ph);
+  fltk3::color(fltk3::BLACK);
+  fltk3::line_style(fltk3::DOT);
+  fltk3::rect(px, py, pw, ph);
+  fltk3::line_style(fltk3::SOLID);
+#endif
+}
+
+static void erase_current_rect() {
+#ifdef USE_XOR
+# ifdef __APPLE_QUARTZ__
+  fltk3::rect(px, py, pw, ph);
+# else
+  draw_current_rect();
+# endif
+#else
+  if (bgN) fltk3::draw_image(bgN, bgx, bgy, bgw, 1);
+  if (bgS) fltk3::draw_image(bgS, bgx, bgy+bgh-1, bgw, 1);
+  if (bgW) fltk3::draw_image(bgW, bgx, bgy, 1, bgh);
+  if (bgE) fltk3::draw_image(bgE, bgx+bgw-1, bgy, 1, bgh);
+#endif
+}
+
+/**
+  Erase a selection rectangle without drawing a new one
+  */
+void fltk3::overlay_clear() {
+  if (pw > 0) {erase_current_rect(); pw = 0;}
+}
+
+/**
+  Draws a selection rectangle, erasing a previous one by XOR'ing it first.
+  */
+void fltk3::overlay_rect(int x, int y, int w, int h) {
+  if (w < 0) {x += w; w = -w;} else if (!w) w = 1;
+  if (h < 0) {y += h; h = -h;} else if (!h) h = 1;
+  if (pw > 0) {
+    if (x==px && y==py && w==pw && h==ph) return;
+    erase_current_rect();
+  }
+  px = x; py = y; pw = w; ph = h;
+  draw_current_rect();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_overlay.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_overlay_visual.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_overlay_visual.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_overlay_visual.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,105 @@
+//
+// "$Id$"
+//
+// X overlay support for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Return an overlay visual, if any.  Also allocate a colormap and
+// record the depth for fltk3::color() to use.
+// Another disgusting X interface, based on code extracted and
+// purified with great difficulty from XLayerUtil.cxx:
+
+#include <config.h>
+#if HAVE_OVERLAY
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+
+// SERVER_OVERLAY_VISUALS property element:
+struct OverlayInfo {
+  long overlay_visual;
+  long transparent_type;
+  long value;
+  long layer;
+};
+
+extern Colormap fl_overlay_colormap;
+extern XVisualInfo* fl_overlay_visual;
+extern ulong fl_transparent_pixel;
+
+XVisualInfo *fl_find_overlay_visual() {
+  static char beenhere;
+  if (beenhere) return fl_overlay_visual;
+  beenhere = 1;
+
+  fl_open_display();
+  Atom overlayVisualsAtom =
+    XInternAtom(fl_display,"SERVER_OVERLAY_VISUALS",1);
+  if (!overlayVisualsAtom) return 0;
+  OverlayInfo *overlayInfo;
+  ulong sizeData, bytesLeft;
+  Atom actualType;
+  int actualFormat;
+  if (XGetWindowProperty(fl_display, RootWindow(fl_display, fl_screen),
+			 overlayVisualsAtom, 0L, 10000L, False,
+			 overlayVisualsAtom, &actualType, &actualFormat,
+			 &sizeData, &bytesLeft,
+			 (unsigned char **) &overlayInfo)) return 0;
+
+  if (actualType == overlayVisualsAtom && actualFormat == 32) {
+    int n = int(sizeData/4);
+    XVisualInfo* v = 0;
+    // find the greatest depth that has a transparent pixel:
+    for (int i = 0; i < n; i++) {
+      if (overlayInfo[i].transparent_type != 1) continue;
+      if (overlayInfo[i].layer <= 0) continue;
+      XVisualInfo templt;
+      templt.visualid = overlayInfo[i].overlay_visual;
+      int num;
+      XVisualInfo *v1=XGetVisualInfo(fl_display, VisualIDMask, &templt, &num);
+      if (v1->screen == fl_screen && v1->c_class == PseudoColor
+	  && (!v || v1->depth > v->depth && v1->depth <= 8)) {
+	if (v) XFree((char*)v);
+	v = v1;
+	fl_transparent_pixel = overlayInfo[i].value;
+      } else {
+	XFree((char*)v1);
+      }
+    }
+    if (v) {
+      fl_overlay_visual = v;
+      fl_overlay_colormap = 
+	XCreateColormap(fl_display, RootWindow(fl_display, fl_screen),
+			v->visual, AllocNone);
+    }
+  }
+  XFree((char*)overlayInfo);
+  //printf("overlay visual %ld selected\n", fl_overlay_visual->visualid);
+  return fl_overlay_visual;
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_overlay_visual.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_plastic.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_plastic.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_plastic.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,367 @@
+//
+// "$Id$"
+//
+// "Plastic" drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a cross between Aqua and KDE buttons; kindof
+// like translucent plastic buttons...
+//
+// Copyright 2001-2010 by Michael Sweet.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in separate files so they are not linked
+// in if not used.
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include "flstring.h"
+
+//
+// Uncomment the following line to restore the old plastic box type
+// appearance.
+//
+
+//#define USE_OLD_PLASTIC_BOX
+#define USE_OLD_PLASTIC_COLOR
+
+namespace fltk3 {
+  extern uchar* gray_ramp();
+}
+
+
+inline fltk3::Color shade_color(uchar gc, fltk3::Color bc) {
+#ifdef USE_OLD_PLASTIC_COLOR
+  return fltk3::color_average((fltk3::Color)gc, bc, 0.75f);
+#else
+  unsigned	grgb = fltk3::get_color((fltk3::Color)gc),
+		brgb = fltk3::get_color(bc);
+  int		red, green, blue, gray;
+
+
+  gray  = ((grgb >> 24) & 255);
+  red   = gray * ((brgb >> 24) & 255) / 255 + gray * gray / 510;
+  gray  = ((grgb >> 16) & 255);
+  green = gray * ((brgb >> 16) & 255) / 255 + gray * gray / 510;
+  gray  = ((grgb >> 8) & 255);
+  blue  = gray * ((brgb >> 8) & 255) / 255 + gray * gray / 510;
+
+  if (red > 255)
+    red = 255;
+
+  if (green > 255)
+    green = 255;
+
+  if (blue > 255)
+    blue = 255;
+
+  if (fltk3::draw_box_active())
+    return fltk3::rgb_color(red, green, blue);
+  else
+    return fltk3::color_average(fltk3::GRAY, fltk3::rgb_color(red, green, blue), 0.75f);
+#endif // USE_OLD_PLASTIC_COLOR
+}
+
+
+static void frame_rect(int x, int y, int w, int h, const char *c, fltk3::Color bc) {
+  uchar *g = fltk3::gray_ramp();
+  int b = strlen(c) / 4 + 1;
+
+  for (x += b, y += b, w -= 2 * b, h -= 2 * b; b > 1; b --)
+  {
+    // Draw lines around the perimeter of the button, 4 colors per
+    // circuit.
+    fltk3::color(shade_color(g[(int)*c++], bc));
+    fltk3::line(x, y + h + b, x + w - 1, y + h + b, x + w + b - 1, y + h);
+    fltk3::color(shade_color(g[(int)*c++], bc));
+    fltk3::line(x + w + b - 1, y + h, x + w + b - 1, y, x + w - 1, y - b);
+    fltk3::color(shade_color(g[(int)*c++], bc));
+    fltk3::line(x + w - 1, y - b, x, y - b, x - b, y);
+    fltk3::color(shade_color(g[(int)*c++], bc));
+    fltk3::line(x - b, y, x - b, y + h, x, y + h + b);
+  }
+}
+
+
+static void frame_round(int x, int y, int w, int h, const char *c, fltk3::Color bc) {
+  uchar *g = fltk3::gray_ramp();
+  int b = strlen(c) / 4 + 1;
+
+  if (w==h) {
+    for (; b > 1; b --, x ++, y ++, w -= 2, h -= 2)
+    {
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, w, h, 45.0, 135.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, w, h, 315.0, 405.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, w, h, 225.0, 315.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, w, h, 135.0, 225.0);
+    }
+  } else if (w>h) {
+    int d = h/2;
+    for (; b > 1; d--, b --, x ++, y ++, w -= 2, h -= 2)
+    {
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, h, h, 90.0, 135.0);
+      fltk3::xyline(x+d, y, x+w-d);
+      fltk3::arc(x+w-h, y, h, h, 45.0, 90.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x+w-h, y, h, h, 315.0, 405.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x+w-h, y, h, h, 270.0, 315.0);
+      fltk3::xyline(x+d, y+h-1, x+w-d);
+      fltk3::arc(x, y, h, h, 225.0, 270.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, h, h, 135.0, 225.0);
+    }
+  } else if (w<h) {
+    int d = w/2;
+    for (; b > 1; d--, b --, x ++, y ++, w -= 2, h -= 2)
+    {
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, w, w, 45.0, 135.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y, w, w, 0.0, 45.0);
+      fltk3::yxline(x+w-1, y+d, y+h-d);
+      fltk3::arc(x, y+h-w, w, w, 315.0, 360.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y+h-w, w, w, 225.0, 315.0);
+      fltk3::color(shade_color(g[(int)*c++], bc));
+      fltk3::arc(x, y+h-w, w, w, 180.0, 225.0);
+      fltk3::yxline(x, y+d, y+h-d);
+      fltk3::arc(x, y, w, w, 135.0, 180.0);
+    }
+  }
+}
+
+
+static void shade_rect(int x, int y, int w, int h, const char *c, fltk3::Color bc) {
+  uchar		*g = fltk3::gray_ramp();
+  int		i, j;
+  int		clen = strlen(c) - 1;
+  int		chalf = clen / 2;
+  int		cstep = 1;
+
+  if (h < (w * 2)) {
+    // Horizontal shading...
+    if (clen >= h) cstep = 2;
+
+    for (i = 0, j = 0; j < chalf; i ++, j += cstep) {
+      // Draw the top line and points...
+      fltk3::color(shade_color(g[(int)c[i]], bc));
+      fltk3::xyline(x + 1, y + i, x + w - 2);
+
+      fltk3::color(shade_color(g[c[i] - 2], bc));
+      fltk3::point(x, y + i + 1);
+      fltk3::point(x + w - 1, y + i + 1);
+
+      // Draw the bottom line and points...
+      fltk3::color(shade_color(g[(int)c[clen - i]], bc));
+      fltk3::xyline(x + 1, y + h - i, x + w - 2);
+
+      fltk3::color(shade_color(g[c[clen - i] - 2], bc));
+      fltk3::point(x, y + h - i);
+      fltk3::point(x + w - 1, y + h - i);
+    }
+
+    // Draw the interior and sides...
+    i = chalf / cstep;
+
+    fltk3::color(shade_color(g[(int)c[chalf]], bc));
+    fltk3::rectf(x + 1, y + i, w - 2, h - 2 * i + 1);
+
+    fltk3::color(shade_color(g[c[chalf] - 2], bc));
+    fltk3::yxline(x, y + i, y + h - i);
+    fltk3::yxline(x + w - 1, y + i, y + h - i);
+  } else {
+    // Vertical shading...
+    if (clen >= w) cstep = 2;
+
+    for (i = 0, j = 0; j < chalf; i ++, j += cstep) {
+      // Draw the left line and points...
+      fltk3::color(shade_color(g[(int)c[i]], bc));
+      fltk3::yxline(x + i, y + 1, y + h - 1);
+
+      fltk3::color(shade_color(g[c[i] - 2], bc));
+      fltk3::point(x + i + 1, y);
+      fltk3::point(x + i + 1, y + h);
+
+      // Draw the right line and points...
+      fltk3::color(shade_color(g[(int)c[clen - i]], bc));
+      fltk3::yxline(x + w - 1 - i, y + 1, y + h - 1);
+
+      fltk3::color(shade_color(g[c[clen - i] - 2], bc));
+      fltk3::point(x + w - 2 - i, y);
+      fltk3::point(x + w - 2 - i, y + h);
+    }
+
+    // Draw the interior, top, and bottom...
+    i = chalf / cstep;
+
+    fltk3::color(shade_color(g[(int)c[chalf]], bc));
+    fltk3::rectf(x + i, y + 1, w - 2 * i, h - 1);
+
+    fltk3::color(shade_color(g[c[chalf] - 2], bc));
+    fltk3::xyline(x + i, y, x + w - i);
+    fltk3::xyline(x + i, y + h, x + w - i);
+  }
+}
+
+static void shade_round(int x, int y, int w, int h, const char *c, fltk3::Color bc) {
+  uchar		*g = fltk3::gray_ramp();
+  int		i;
+  int		clen = strlen(c) - 1;
+  int		chalf = clen / 2;
+
+  if (w>h) {
+    int d = h/2;
+    const int na = 8;
+    for (i=0; i<chalf; i++, d--, x++, y++, w-=2, h-=2)
+    {
+      fltk3::color(shade_color(g[(int)c[i]], bc));
+      fltk3::pie(x, y, h, h, 90.0, 135.0+i*na);
+      fltk3::xyline(x+d, y, x+w-d);
+      fltk3::pie(x+w-h, y, h, h, 45.0+i*na, 90.0);
+      fltk3::color(shade_color(g[(int)c[i] - 2], bc));
+      fltk3::pie(x+w-h, y, h, h, 315.0+i*na, 405.0+i*na);
+      fltk3::color(shade_color(g[(int)c[clen - i]], bc));
+      fltk3::pie(x+w-h, y, h, h, 270.0, 315.0+i*na);
+      fltk3::xyline(x+d, y+h-1, x+w-d);
+      fltk3::pie(x, y, h, h, 225.0+i*na, 270.0);
+      fltk3::color(shade_color(g[c[(int)clen - i] - 2], bc));
+      fltk3::pie(x, y, h, h, 135.0+i*na, 225.0+i*na);
+    }
+    fltk3::color(shade_color(g[(int)c[chalf]], bc));
+    fltk3::rectf(x+d, y, w-h+1, h+1);
+    fltk3::pie(x, y, h, h, 90.0, 270.0);
+    fltk3::pie(x+w-h, y, h, h, 270.0, 90.0);
+  } else {
+    int d = w/2;
+    const int na = 8;
+    for (i=0; i<chalf; i++, d--, x++, y++, w-=2, h-=2)
+    {
+      fltk3::color(shade_color(g[(int)c[i]], bc));
+      fltk3::pie(x, y, w, w, 45.0+i*na, 135.0+i*na);
+      fltk3::color(shade_color(g[c[i] - 2], bc));
+      fltk3::pie(x, y, w, w, 0.0, 45.0+i*na);
+      fltk3::yxline(x+w-1, y+d, y+h-d);
+      fltk3::pie(x, y+h-w, w, w, 315.0+i*na, 360.0);
+      fltk3::color(shade_color(g[(int)c[clen - i]], bc));
+      fltk3::pie(x, y+h-w, w, w, 225.0+i*na, 315.0+i*na);
+      fltk3::color(shade_color(g[c[clen - i] - 2], bc));
+      fltk3::pie(x, y+h-w, w, w, 180.0, 225.0+i*na);
+      fltk3::yxline(x, y+d, y+h-d);
+      fltk3::pie(x, y, w, w, 135.0+i*na, 180.0);
+    }
+    fltk3::color(shade_color(g[(int)c[chalf]], bc));
+    fltk3::rectf(x, y+d, w+1, h-w+1);
+    fltk3::pie(x, y, w, w, 0.0, 180.0);
+    fltk3::pie(x, y+h-w, w, w, 180.0, 360.0);
+  }
+}
+
+
+void fl_plastic_up_frame(int x, int y, int w, int h, fltk3::Color c) {
+  frame_rect(x, y, w, h - 1, "KLDIIJLM", c);
+}
+
+
+static void narrow_thin_box(int x, int y, int w, int h, fltk3::Color c) {
+  if (h<=0 || w<=0) return;
+  uchar *g = fltk3::gray_ramp();
+  fltk3::color(shade_color(g['R'], c));
+  fltk3::rectf(x+1, y+1, w-2, h-2);
+  fltk3::color(shade_color(g['I'], c));
+  if (w > 1) {
+    fltk3::xyline(x+1, y, x+w-2);
+    fltk3::xyline(x+1, y+h-1, x+w-2);
+  }
+  if (h > 1) {
+    fltk3::yxline(x, y+1, y+h-2);
+    fltk3::yxline(x+w-1, y+1, y+h-2);
+  }
+}
+
+
+void fl_plastic_thin_up_box(int x, int y, int w, int h, fltk3::Color c) {
+#ifdef USE_OLD_PLASTIC_BOX
+  shade_rect(x + 2, y + 2, w - 4, h - 5, "RVQNOPQRSTUVWVQ", c);
+  up_frame(x, y, w, h, c);
+#else
+  if (w > 4 && h > 4) {
+    shade_rect(x + 1, y + 1, w - 2, h - 3, "RQOQSUWQ", c);
+    frame_rect(x, y, w, h - 1, "IJLM", c);
+  } else {
+    narrow_thin_box(x, y, w, h, c);
+  }
+#endif // USE_OLD_PLASTIC_BOX
+}
+
+
+void fl_plastic_up_box(int x, int y, int w, int h, fltk3::Color c) {
+#ifdef USE_OLD_PLASTIC_BOX
+  shade_rect(x + 2, y + 2, w - 4, h - 5, "RVQNOPQRSTUVWVQ", c);
+  up_frame(x, y, w, h, c);
+#else
+  if (w > 8 && h > 8) {
+    shade_rect(x + 1, y + 1, w - 2, h - 3, "RVQNOPQRSTUVWVQ", c);
+    frame_rect(x, y, w, h - 1, "IJLM", c);
+  } else {
+    fl_plastic_thin_up_box(x, y, w, h, c);
+  }
+#endif // USE_OLD_PLASTIC_BOX
+}
+
+
+void fl_plastic_up_round(int x, int y, int w, int h, fltk3::Color c) {
+  shade_round(x, y, w, h, "RVQNOPQRSTUVWVQ", c);
+  frame_round(x, y, w, h, "IJLM", c);
+}
+
+
+void fl_plastic_down_frame(int x, int y, int w, int h, fltk3::Color c) {
+  frame_rect(x, y, w, h - 1, "LLLLTTRR", c);
+}
+
+
+void fl_plastic_down_box(int x, int y, int w, int h, fltk3::Color c) {
+  if (w > 6 && h > 6) {
+    shade_rect(x + 2, y + 2, w - 4, h - 5, "STUVWWWVT", c);
+    fl_plastic_down_frame(x, y, w, h, c);
+  }
+  else {
+    narrow_thin_box(x, y, w, h, c);
+  }
+}
+
+
+void fl_plastic_down_round(int x, int y, int w, int h, fltk3::Color c) {
+  shade_round(x, y, w, h, "STUVWWWVT", c);
+  frame_round(x, y, w, h, "IJLM", c);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_plastic.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_read_image.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_read_image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_read_image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,509 @@
+//
+// "$Id$"
+//
+// X11 image reading routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/x.h>
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include "flstring.h"
+
+#ifdef DEBUG
+#  include <stdio.h>
+#endif // DEBUG
+
+#ifdef WIN32
+#  include "fl_read_image_win32.cxx"
+#elif defined(__APPLE__)
+#  include "fl_read_image_mac.cxx"
+#else
+#  include <X11/Xutil.h>
+#  ifdef __sgi
+#    include <X11/extensions/readdisplay.h>
+#  else
+#    include <stdlib.h>
+#  endif // __sgi
+
+// Defined in fltk3::color.cxx
+extern uchar fl_redmask, fl_greenmask, fl_bluemask;
+extern int fl_redshift, fl_greenshift, fl_blueshift, fl_extrashift;
+
+//
+// 'fl_subimage_offsets()' - Calculate subimage offsets for an axis
+static inline int
+fl_subimage_offsets(int a, int aw, int b, int bw, int &obw)
+{
+  int off;
+  int ob;
+
+  if (b >= a) {
+    ob = b;
+    off = 0;
+  } else {
+    ob = a;
+    off = a - b;
+  }
+
+  bw -= off;
+
+  if (ob + bw <= a + aw) {
+    obw = bw;
+  } else {
+    obw = (a + aw) - ob;
+  }
+
+  return off;
+}
+
+// this handler will catch and ignore exceptions during XGetImage
+// to avoid an application crash
+static int xgetimageerrhandler(Display *display, XErrorEvent *error) {
+  return 0;
+}
+
+//
+// 'fltk3::read_image()' - Read an image from the current window.
+//
+
+uchar *				// O - Pixel buffer or NULL if failed
+fltk3::read_image(uchar *p,		// I - Pixel buffer or NULL to allocate
+              int   X,		// I - Left position
+	      int   Y,		// I - Top position
+	      int   w,		// I - Width of area to read
+	                        // negative allows capture of window title bar and frame
+	      int   h,		// I - Height of area to read
+	      int   alpha) {	// I - Alpha value for image (0 for none)
+  XImage	*image;		// Captured image
+  int		i, maxindex;	// Looping vars
+  int           x, y;		// Current X & Y in image
+  int		d;		// Depth of image
+  unsigned char *line,		// Array to hold image row
+		*line_ptr;	// Pointer to current line image
+  unsigned char	*pixel;		// Current color value
+  XColor	colors[4096];	// Colors from the colormap...
+  unsigned char	cvals[4096][3];	// Color values from the colormap...
+  unsigned	index_mask,
+		index_shift,
+		red_mask,
+		red_shift,
+		green_mask,
+		green_shift,
+		blue_mask,
+		blue_shift;
+
+
+  //
+  // Under X11 we have the option of the XGetImage() interface or SGI's
+  // ReadDisplay extension which does all of the really hard work for
+  // us...
+  //
+  int allow_outside = w < 0;    // negative w allows negative X or Y, that is, window frame
+  if (w < 0) w = - w;
+
+#  ifdef __sgi
+  if (XReadDisplayQueryExtension(fl_display, &i, &i)) {
+    image = XReadDisplay(fl_display, fl_window, X, Y, w, h, 0, NULL);
+  } else
+#  else
+  image = 0;
+#  endif // __sgi
+
+  if (!image) {
+    // fetch absolute coordinates
+    int dx, dy, sx, sy, sw, sh;
+    ::Window child_win;
+    
+    fltk3::Window *win;
+    if (allow_outside) win = (fltk3::Window*)1;
+    else win = fl_find(fl_window);
+    if (win) {
+      XTranslateCoordinates(fl_display, fl_window,
+          RootWindow(fl_display, fl_screen), X, Y, &dx, &dy, &child_win);
+      // screen dimensions
+      fltk3::screen_xywh(sx, sy, sw, sh, fl_screen);
+    }
+    if (!win || (dx >= sx && dy >= sy && dx + w <= sw && dy + h <= sh)) {
+      // the image is fully contained, we can use the traditional method
+      // however, if the window is obscured etc. the function will still fail. Make sure we
+      // catch the error and continue, otherwise an exception will be thrown.
+      XErrorHandler old_handler = XSetErrorHandler(xgetimageerrhandler);
+      image = XGetImage(fl_display, fl_window, X, Y, w, h, AllPlanes, ZPixmap);
+      XSetErrorHandler(old_handler);
+    } else {
+      // image is crossing borders, determine visible region
+      int nw, nh, noffx, noffy;
+      noffx = fl_subimage_offsets(sx, sw, dx, w, nw);
+      noffy = fl_subimage_offsets(sy, sh, dy, h, nh);
+      if (nw <= 0 || nh <= 0) return 0;
+
+      // allocate the image
+      int bpp = fl_visual->depth + ((fl_visual->depth / 8) % 2) * 8;
+      char* buf = (char*)malloc(bpp / 8 * w * h);
+      image = XCreateImage(fl_display, fl_visual->visual,
+	  fl_visual->depth, ZPixmap, 0, buf, w, h, bpp, 0);
+      if (!image) {
+	if (buf) free(buf);
+	return 0;
+      }
+
+      XErrorHandler old_handler = XSetErrorHandler(xgetimageerrhandler);
+      XImage *subimg = XGetSubImage(fl_display, fl_window, X + noffx, Y + noffy,
+                                    nw, nh, AllPlanes, ZPixmap, image, noffx, noffy);
+      XSetErrorHandler(old_handler);
+      if (!subimg) {
+        XDestroyImage(image);
+        return 0;
+      }
+    }
+  }
+
+  if (!image) return 0;
+
+#ifdef DEBUG
+  printf("width            = %d\n", image->width);
+  printf("height           = %d\n", image->height);
+  printf("xoffset          = %d\n", image->xoffset);
+  printf("format           = %d\n", image->format);
+  printf("data             = %p\n", image->data);
+  printf("byte_order       = %d\n", image->byte_order);
+  printf("bitmap_unit      = %d\n", image->bitmap_unit);
+  printf("bitmap_bit_order = %d\n", image->bitmap_bit_order);
+  printf("bitmap_pad       = %d\n", image->bitmap_pad);
+  printf("depth            = %d\n", image->depth);
+  printf("bytes_per_line   = %d\n", image->bytes_per_line);
+  printf("bits_per_pixel   = %d\n", image->bits_per_pixel);
+  printf("red_mask         = %08x\n", image->red_mask);
+  printf("green_mask       = %08x\n", image->green_mask);
+  printf("blue_mask        = %08x\n", image->blue_mask);
+  printf("map_entries      = %d\n", fl_visual->visual->map_entries);
+#endif // DEBUG
+
+  d = alpha ? 4 : 3;
+
+  // Allocate the image data array as needed...
+  if (!p) p = new uchar[w * h * d];
+
+  // Initialize the default colors/alpha in the whole image...
+  memset(p, alpha, w * h * d);
+
+  // Check that we have valid mask/shift values...
+  if (!image->red_mask && image->bits_per_pixel > 12) {
+    // Greater than 12 bits must be TrueColor...
+    image->red_mask   = fl_visual->visual->red_mask;
+    image->green_mask = fl_visual->visual->green_mask;
+    image->blue_mask  = fl_visual->visual->blue_mask;
+
+#ifdef DEBUG
+    puts("\n---- UPDATED ----");
+    printf("fl_redmask       = %08x\n", fl_redmask);
+    printf("fl_redshift      = %d\n", fl_redshift);
+    printf("fl_greenmask     = %08x\n", fl_greenmask);
+    printf("fl_greenshift    = %d\n", fl_greenshift);
+    printf("fl_bluemask      = %08x\n", fl_bluemask);
+    printf("fl_blueshift     = %d\n", fl_blueshift);
+    printf("red_mask         = %08x\n", image->red_mask);
+    printf("green_mask       = %08x\n", image->green_mask);
+    printf("blue_mask        = %08x\n", image->blue_mask);
+#endif // DEBUG
+  }
+
+  // Check if we have colormap image...
+  if (!image->red_mask) {
+    // Get the colormap entries for this window...
+    maxindex = fl_visual->visual->map_entries;
+
+    for (i = 0; i < maxindex; i ++) colors[i].pixel = i;
+
+    XQueryColors(fl_display, fl_colormap, colors, maxindex);
+
+    for (i = 0; i < maxindex; i ++) {
+      cvals[i][0] = colors[i].red >> 8;
+      cvals[i][1] = colors[i].green >> 8;
+      cvals[i][2] = colors[i].blue >> 8;
+    }
+
+    // Read the pixels and output an RGB image...
+    for (y = 0; y < image->height; y ++) {
+      pixel = (unsigned char *)(image->data + y * image->bytes_per_line);
+      line  = p + y * w * d;
+
+      switch (image->bits_per_pixel) {
+        case 1 :
+	  for (x = image->width, line_ptr = line, index_mask = 128;
+	       x > 0;
+	       x --, line_ptr += d) {
+	    if (*pixel & index_mask) {
+	      line_ptr[0] = cvals[1][0];
+	      line_ptr[1] = cvals[1][1];
+	      line_ptr[2] = cvals[1][2];
+            } else {
+	      line_ptr[0] = cvals[0][0];
+	      line_ptr[1] = cvals[0][1];
+	      line_ptr[2] = cvals[0][2];
+            }
+
+            if (index_mask > 1) {
+	      index_mask >>= 1;
+	    } else {
+              index_mask = 128;
+              pixel ++;
+            }
+	  }
+          break;
+
+        case 2 :
+	  for (x = image->width, line_ptr = line, index_shift = 6;
+	       x > 0;
+	       x --, line_ptr += d) {
+	    i = (*pixel >> index_shift) & 3;
+
+	    line_ptr[0] = cvals[i][0];
+	    line_ptr[1] = cvals[i][1];
+	    line_ptr[2] = cvals[i][2];
+
+            if (index_shift > 0) {
+              index_mask >>= 2;
+              index_shift -= 2;
+            } else {
+              index_mask  = 192;
+              index_shift = 6;
+              pixel ++;
+            }
+	  }
+          break;
+
+        case 4 :
+	  for (x = image->width, line_ptr = line, index_shift = 4;
+	       x > 0;
+	       x --, line_ptr += d) {
+	    if (index_shift == 4) i = (*pixel >> 4) & 15;
+	    else i = *pixel & 15;
+
+	    line_ptr[0] = cvals[i][0];
+	    line_ptr[1] = cvals[i][1];
+	    line_ptr[2] = cvals[i][2];
+
+            if (index_shift > 0) {
+              index_shift = 0;
+	    } else {
+              index_shift = 4;
+              pixel ++;
+            }
+	  }
+          break;
+
+        case 8 :
+	  for (x = image->width, line_ptr = line;
+	       x > 0;
+	       x --, line_ptr += d, pixel ++) {
+	    line_ptr[0] = cvals[*pixel][0];
+	    line_ptr[1] = cvals[*pixel][1];
+	    line_ptr[2] = cvals[*pixel][2];
+	  }
+          break;
+
+        case 12 :
+	  for (x = image->width, line_ptr = line, index_shift = 0;
+	       x > 0;
+	       x --, line_ptr += d) {
+	    if (index_shift == 0) {
+	      i = ((pixel[0] << 4) | (pixel[1] >> 4)) & 4095;
+	    } else {
+	      i = ((pixel[1] << 8) | pixel[2]) & 4095;
+	    }
+
+	    line_ptr[0] = cvals[i][0];
+	    line_ptr[1] = cvals[i][1];
+	    line_ptr[2] = cvals[i][2];
+
+            if (index_shift == 0) {
+              index_shift = 4;
+            } else {
+              index_shift = 0;
+              pixel += 3;
+            }
+	  }
+          break;
+      }
+    }
+  } else {
+    // RGB(A) image, so figure out the shifts & masks...
+    red_mask  = image->red_mask;
+    red_shift = 0;
+
+    while ((red_mask & 1) == 0) {
+      red_mask >>= 1;
+      red_shift ++;
+    }
+
+    green_mask  = image->green_mask;
+    green_shift = 0;
+
+    while ((green_mask & 1) == 0) {
+      green_mask >>= 1;
+      green_shift ++;
+    }
+
+    blue_mask  = image->blue_mask;
+    blue_shift = 0;
+
+    while ((blue_mask & 1) == 0) {
+      blue_mask >>= 1;
+      blue_shift ++;
+    }
+
+    // Read the pixels and output an RGB image...
+    for (y = 0; y < image->height; y ++) {
+      pixel = (unsigned char *)(image->data + y * image->bytes_per_line);
+      line  = p + y * w * d;
+
+      switch (image->bits_per_pixel) {
+        case 8 :
+	  for (x = image->width, line_ptr = line;
+	       x > 0;
+	       x --, line_ptr += d, pixel ++) {
+	    i = *pixel;
+
+	    line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	    line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	    line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	  }
+          break;
+
+        case 12 :
+	  for (x = image->width, line_ptr = line, index_shift = 0;
+	       x > 0;
+	       x --, line_ptr += d) {
+	    if (index_shift == 0) {
+	      i = ((pixel[0] << 4) | (pixel[1] >> 4)) & 4095;
+	    } else {
+	      i = ((pixel[1] << 8) | pixel[2]) & 4095;
+            }
+
+	    line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	    line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	    line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+
+            if (index_shift == 0) {
+              index_shift = 4;
+            } else {
+              index_shift = 0;
+              pixel += 3;
+            }
+	  }
+          break;
+
+        case 16 :
+          if (image->byte_order == LSBFirst) {
+            // Little-endian...
+	    for (x = image->width, line_ptr = line;
+	         x > 0;
+	         x --, line_ptr += d, pixel += 2) {
+	      i = (pixel[1] << 8) | pixel[0];
+
+	      line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	      line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	      line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	    }
+	  } else {
+            // Big-endian...
+	    for (x = image->width, line_ptr = line;
+	         x > 0;
+	         x --, line_ptr += d, pixel += 2) {
+	      i = (pixel[0] << 8) | pixel[1];
+
+	      line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	      line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	      line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	    }
+	  }
+          break;
+
+        case 24 :
+          if (image->byte_order == LSBFirst) {
+            // Little-endian...
+	    for (x = image->width, line_ptr = line;
+	         x > 0;
+	         x --, line_ptr += d, pixel += 3) {
+	      i = (((pixel[2] << 8) | pixel[1]) << 8) | pixel[0];
+
+	      line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	      line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	      line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	    }
+	  } else {
+            // Big-endian...
+	    for (x = image->width, line_ptr = line;
+	         x > 0;
+	         x --, line_ptr += d, pixel += 3) {
+	      i = (((pixel[0] << 8) | pixel[1]) << 8) | pixel[2];
+
+	      line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	      line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	      line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	    }
+	  }
+          break;
+
+        case 32 :
+          if (image->byte_order == LSBFirst) {
+            // Little-endian...
+	    for (x = image->width, line_ptr = line;
+	         x > 0;
+	         x --, line_ptr += d, pixel += 4) {
+	      i = (((((pixel[3] << 8) | pixel[2]) << 8) | pixel[1]) << 8) | pixel[0];
+
+	      line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	      line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	      line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	    }
+	  } else {
+            // Big-endian...
+	    for (x = image->width, line_ptr = line;
+	         x > 0;
+	         x --, line_ptr += d, pixel += 4) {
+	      i = (((((pixel[0] << 8) | pixel[1]) << 8) | pixel[2]) << 8) | pixel[3];
+
+	      line_ptr[0] = 255 * ((i >> red_shift) & red_mask) / red_mask;
+	      line_ptr[1] = 255 * ((i >> green_shift) & green_mask) / green_mask;
+	      line_ptr[2] = 255 * ((i >> blue_shift) & blue_mask) / blue_mask;
+	    }
+	  }
+          break;
+      }
+    }
+  }
+
+  // Destroy the X image we've read and return the RGB(A) image...
+  XDestroyImage(image);
+
+  return p;
+}
+
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_read_image.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_read_image_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_read_image_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_read_image_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,82 @@
+//
+// "$Id$"
+//
+// WIN32 image reading routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+
+//
+// 'fltk3::read_image()' - Read an image from the current window or off-screen buffer.
+//
+
+uchar *				// O - Pixel buffer or NULL if failed
+fltk3::read_image(uchar *p,		// I - Pixel buffer or NULL to allocate
+              int   x,		// I - Left position
+	      int   y,		// I - Top position
+	      int   w,		// I - Width of area to read
+	      int   h,		// I - Height of area to read
+	      int   alpha) {	// I - Alpha value for image (0 for none)
+  uchar *base;
+  int rowBytes, delta;
+  if(fl_window == NULL) { // reading from an offscreen buffer
+    CGContextRef src = (CGContextRef)fl_gc;   // get bitmap context
+    base = (uchar *)CGBitmapContextGetData(src);  // get data
+    if(!base) return NULL;
+    int sw = CGBitmapContextGetWidth(src);
+    int sh = CGBitmapContextGetHeight(src);
+    rowBytes = CGBitmapContextGetBytesPerRow(src);
+    delta = CGBitmapContextGetBitsPerPixel(src)/8;
+    if( (sw - x < w) || (sh - y < h) )  return NULL;
+    }
+  else { // reading from current window
+    fltk3::Window *window = fltk3::Window::current();
+    while(window->window()) window = window->window();
+    base = Fl_X::bitmap_from_window_rect(window,x,y,w,h,&delta);
+    rowBytes = delta*w;
+    x = y = 0;
+    }
+  // Allocate the image data array as needed...
+  int d = alpha ? 4 : 3;
+  if (!p) p = new uchar[w * h * d];
+  // Initialize the default colors/alpha in the whole image...
+  memset(p, alpha, w * h * d);
+  // Copy the image from the off-screen buffer to the memory buffer.
+  int           idx, idy;	// Current X & Y in image
+  uchar *pdst, *psrc;
+  for (idy = y, pdst = p; idy < h + y; idy ++) {
+    for (idx = 0, psrc = base + idy * rowBytes + x * delta; idx < w; idx ++, psrc += delta, pdst += d) {
+      pdst[0] = psrc[0];  // R
+      pdst[1] = psrc[1];  // G
+      pdst[2] = psrc[2];  // B
+    }
+  }
+  if(fl_window != NULL) delete[] base;
+  return p;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_read_image_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_read_image_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_read_image_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_read_image_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,133 @@
+//
+// "$Id$"
+//
+// WIN32 image reading routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//
+// 'fltk3::read_image()' - Read an image from the current window.
+//
+
+uchar *				// O - Pixel buffer or NULL if failed
+fltk3::read_image(uchar *p,		// I - Pixel buffer or NULL to allocate
+              int   X,		// I - Left position
+	      int   Y,		// I - Top position
+	      int   w,		// I - Width of area to read
+	      int   h,		// I - Height of area to read
+	      int   alpha) {	// I - Alpha value for image (0 for none)
+
+  int	d;			// Depth of image
+
+  // Allocate the image data array as needed...
+  d = alpha ? 4 : 3;
+
+  if (!p) p = new uchar[w * h * d];
+
+  // Initialize the default colors/alpha in the whole image...
+  memset(p, alpha, w * h * d);
+
+  // Grab all of the pixels in the image...
+
+  // Assure that we are not trying to read non-existing data. If it is so, the
+  // function should still work, but the out-of-bounds part of the image is
+  // untouched (initialized with the alpha value or 0 (black), resp.).
+
+  int ww = w; // We need the original width for output data line size
+
+  int shift_x = 0; // X target shift if X modified
+  int shift_y = 0; // Y target shift if X modified
+
+  if (X < 0) {
+    shift_x = -X;
+    w += X;
+    X = 0;
+  }
+  if (Y < 0) {
+    shift_y = -Y;
+    h += Y;
+    Y = 0;
+  }
+
+  if (h < 1 || w < 1) return p;		// nothing to copy
+
+  int line_size = ((3*w+3)/4) * 4;	// each line is aligned on a DWORD (4 bytes)
+  uchar *dib = new uchar[line_size*h];	// create temporary buffer to read DIB
+
+  // fill in bitmap info for GetDIBits
+
+  BITMAPINFO   bi;
+  bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+  bi.bmiHeader.biWidth = w;
+  bi.bmiHeader.biHeight = -h;		// negative => top-down DIB
+  bi.bmiHeader.biPlanes = 1;
+  bi.bmiHeader.biBitCount = 24;		// 24 bits RGB
+  bi.bmiHeader.biCompression = BI_RGB;
+  bi.bmiHeader.biSizeImage = 0;
+  bi.bmiHeader.biXPelsPerMeter = 0;
+  bi.bmiHeader.biYPelsPerMeter = 0;
+  bi.bmiHeader.biClrUsed = 0;
+  bi.bmiHeader.biClrImportant = 0;
+
+  // copy bitmap from original DC (Window, fltk3::Offscreen, ...)
+
+  HDC hdc = CreateCompatibleDC(fl_gc);
+  HBITMAP hbm = CreateCompatibleBitmap(fl_gc,w,h);
+
+  int save_dc = SaveDC(hdc);			// save context for cleanup
+  SelectObject(hdc,hbm);			// select bitmap
+  BitBlt(hdc,0,0,w,h,fl_gc,X,Y,SRCCOPY);	// copy image section to DDB
+
+  // copy RGB image data to the allocated DIB
+
+  GetDIBits(hdc, hbm, 0, h, dib, (BITMAPINFO *)&bi, DIB_RGB_COLORS);
+
+  // finally copy the image data to the user buffer
+
+  for (int j = 0; j<h; j++) {
+    const uchar *src = dib + j * line_size;			// source line
+    uchar *tg = p + (j + shift_y) * d * ww + shift_x * d;	// target line
+    for (int i = 0; i<w; i++) {
+      uchar b = *src++;
+      uchar g = *src++;
+      *tg++ = *src++;	// R
+      *tg++ = g;	// G
+      *tg++ = b;	// B
+      if (alpha)
+	*tg++ = alpha;	// alpha
+    }
+  }
+
+  // free used GDI and other structures
+
+  RestoreDC(hdc,save_dc);	// reset DC
+  DeleteDC(hdc);
+  DeleteObject(hbm);
+  delete[] dib;		// delete DIB temporary buffer
+
+  return p;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_read_image_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_rect.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_rect.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_rect.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,727 @@
+//
+// "$Id$"
+//
+// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_rect.cxx
+  \brief Drawing and clipping routines for rectangles.
+*/
+
+// These routines from draw.h are used by the standard boxtypes
+// and thus are always linked into an fltk program.
+// Also all fl_clip routines, since they are always linked in so
+// that minimal update works.
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/Printer.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+
+// fl_line_width_ must contain the absolute value of the current
+// line width to be used for X11 clipping (see below).
+// This is defined in src/fltk3::line_style.cxx
+extern int fl_line_width_;
+
+#ifdef __APPLE_QUARTZ__
+extern float fl_quartz_line_width_;
+#define USINGQUARTZPRINTER  (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id)
+#endif
+
+#ifdef USE_X11
+
+#ifndef SHRT_MAX
+#define SHRT_MAX (32767)
+#endif
+
+/*
+  We need to check some coordinates for areas for clipping before we
+  use X functions, because X can't handle coordinates outside the 16-bit
+  range. Since all windows use relative coordinates > 0, we do also
+  check for negative values. X11 only, see also STR #2304.
+  
+  Note that this is only necessary for large objects, where only a
+  part of the object is visible. The draw() functions (e.g. box
+  drawing) must be clipped correctly. This is usually only a matter
+  for large container widgets. The individual child widgets will be
+  clipped completely.
+
+  We define the usable X coordinate space as [ -LW : SHRT_MAX - LW ]
+  where LW = current line width for drawing. This is done so that
+  horizontal and vertical line drawing works correctly, even in real
+  border cases, e.g. drawing a rectangle slightly outside the top left
+  window corner, but with a line width so that a part of the line should
+  be visible (in this case 2 of 5 pixels):
+
+    fltk3::line_style (fltk3::SOLID,5);	// line width = 5
+    fltk3::rect (-1,-1,100,100);	// top/left: 2 pixels visible
+  
+  In this example case, no clipping would be done, because X can
+  handle it and clip unneeded pixels.
+  
+  Note that we must also take care of the case where fl_line_width_
+  is zero (maybe unitialized). If this is the case, we assume a line
+  width of 1.
+
+  Todo: Arbitrary line drawings (e.g. polygons) and clip regions
+  are not yet done.
+
+  Note:
+
+  We could use max. screen coordinates instead of SHRT_MAX, but that
+  would need more work and would probably be slower. We assume that
+  all window coordinates are >= 0 and that no window extends up to
+  32767 - LW (where LW = current line width). Thus it is safe to clip
+  all coordinates to this range before calling X functions. If this
+  is not true, then clip_to_short() and clip_x() must be redefined.
+
+  It would be somewhat easier if we had fl_clip_w and fl_clip_h, as
+  defined in FLTK 2.0 (for the upper clipping bounds)...
+*/
+
+/*
+  clip_to_short() returns 1, if the area is invisible (clipped),
+  because ...
+
+    (a) w or h are <= 0		i.e. nothing is visible
+    (b) x+w or y+h are < kmin	i.e. left of or above visible area
+    (c) x or y are > kmax	i.e. right of or below visible area
+
+  kmin and kmax are the minimal and maximal X coordinate values,
+  as defined above. In this case x, y, w, and h are not changed.
+
+  It returns 0, if the area is potentially visible and X can handle
+  clipping. x, y, w, and h may have been adjusted to fit into the
+  X coordinate space.
+
+  Use this for clipping rectangles, as used in fltk3::rect() and
+  fltk3::rectf().
+*/
+
+static int clip_to_short(int &x, int &y, int &w, int &h) {
+
+  int lw = (fl_line_width_ > 0) ? fl_line_width_ : 1;
+  int kmin = -lw;
+  int kmax = SHRT_MAX - lw;
+
+  if (w <= 0 || h <= 0) return 1;		// (a)
+  if (x+w < kmin || y+h < kmin) return 1;	// (b)
+  if (x > kmax || y > kmax) return 1;		// (c)
+
+  if (x < kmin) { w -= (kmin-x); x = kmin; }
+  if (y < kmin) { h -= (kmin-y); y = kmin; }
+  if (x+w > kmax) w = kmax - x;
+  if (y+h > kmax) h = kmax - y;
+
+  return 0;
+}
+
+/*
+  clip_x() returns a coordinate value clipped to the 16-bit coordinate
+  space (see above). This can be used to draw horizontal and vertical
+  lines that can be handled by X11. Each single coordinate value can
+  be clipped individually, and the result can be used directly, e.g.
+  in fltk3::xyline() and fltk3::yxline(). Note that this can't be used for
+  arbitrary lines (not horizontal or vertical).
+*/
+static int clip_x (int x) {
+
+  int lw = (fl_line_width_ > 0) ? fl_line_width_ : 1;
+  int kmin = -lw;
+  int kmax = SHRT_MAX - lw;
+
+  if (x < kmin)
+    x = kmin;
+  else if (x > kmax)
+    x = kmax;
+  return x;
+}
+
+#endif	// USE_X11
+
+
+void fltk3::GraphicsDriver::rect(int x, int y, int w, int h) {
+
+  if (w<=0 || h<=0) return;
+#if defined(USE_X11)
+  if (!clip_to_short(x, y, w, h))
+    XDrawRectangle(fl_display, fl_window, fl_gc, x, y, w-1, h-1);
+#elif defined(WIN32)
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x+w-1, y);
+  LineTo(fl_gc, x+w-1, y+h-1);
+  LineTo(fl_gc, x, y+h-1);
+  LineTo(fl_gc, x, y);
+#elif defined(__APPLE_QUARTZ__)
+  if ( (!USINGQUARTZPRINTER) && fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGRect rect = CGRectMake(x, y, w-1, h-1);
+  CGContextStrokeRect(fl_gc, rect);
+  if ( (!USINGQUARTZPRINTER) && fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::rectf(int x, int y, int w, int h) {
+  if (w<=0 || h<=0) return;
+#if defined(USE_X11)
+  if (!clip_to_short(x, y, w, h))
+    XFillRectangle(fl_display, fl_window, fl_gc, x, y, w, h);
+#elif defined(WIN32)
+  RECT rect;
+  rect.left = x; rect.top = y;  
+  rect.right = x + w; rect.bottom = y + h;
+  FillRect(fl_gc, &rect, fl_brush());
+#elif defined(__APPLE_QUARTZ__)
+  CGFloat delta_size =  0.9;
+  CGFloat delta_ori = 0;
+  if (USINGQUARTZPRINTER) {
+    delta_size = 0;
+    delta_ori = 0.5;
+    }
+  CGRect  rect = CGRectMake(x - delta_ori, y - delta_ori, w - delta_size , h - delta_size);
+  CGContextFillRect(fl_gc, rect);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::xyline(int x, int y, int x1) {
+#if defined(USE_X11)
+  XDrawLine(fl_display, fl_window, fl_gc, clip_x(x), clip_x(y), clip_x(x1), clip_x(y));
+#elif defined(WIN32)
+  MoveToEx(fl_gc, x, y, 0L); LineTo(fl_gc, x1+1, y);
+#elif defined(__APPLE_QUARTZ__)
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y);
+  CGContextStrokePath(fl_gc);
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::xyline(int x, int y, int x1, int y2) {
+#if defined (USE_X11)
+  XPoint p[3];
+  p[0].x = clip_x(x);  p[0].y = p[1].y = clip_x(y);
+  p[1].x = p[2].x = clip_x(x1); p[2].y = clip_x(y2);
+  XDrawLines(fl_display, fl_window, fl_gc, p, 3, 0);
+#elif defined(WIN32)
+  if (y2 < y) y2--;
+  else y2++;
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x1, y);
+  LineTo(fl_gc, x1, y2);
+#elif defined(__APPLE_QUARTZ__)
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y);
+  CGContextAddLineToPoint(fl_gc, x1, y2);
+  CGContextStrokePath(fl_gc);
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+#error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::xyline(int x, int y, int x1, int y2, int x3) {
+#if defined(USE_X11)
+  XPoint p[4];
+  p[0].x = clip_x(x);  p[0].y = p[1].y = clip_x(y);
+  p[1].x = p[2].x = clip_x(x1); p[2].y = p[3].y = clip_x(y2);
+  p[3].x = clip_x(x3);
+  XDrawLines(fl_display, fl_window, fl_gc, p, 4, 0);
+#elif defined(WIN32)
+  if(x3 < x1) x3--;
+  else x3++;
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x1, y);
+  LineTo(fl_gc, x1, y2);
+  LineTo(fl_gc, x3, y2);
+#elif defined(__APPLE_QUARTZ__)
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y);
+  CGContextAddLineToPoint(fl_gc, x1, y2);
+  CGContextAddLineToPoint(fl_gc, x3, y2);
+  CGContextStrokePath(fl_gc);
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::yxline(int x, int y, int y1) {
+#if defined(USE_X11)
+  XDrawLine(fl_display, fl_window, fl_gc, clip_x(x), clip_x(y), clip_x(x), clip_x(y1));
+#elif defined(WIN32)
+  if (y1 < y) y1--;
+  else y1++;
+  MoveToEx(fl_gc, x, y, 0L); LineTo(fl_gc, x, y1);
+#elif defined(__APPLE_QUARTZ__)
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x, y1);
+  CGContextStrokePath(fl_gc);
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::yxline(int x, int y, int y1, int x2) {
+#if defined(USE_X11)
+  XPoint p[3];
+  p[0].x = p[1].x = clip_x(x);  p[0].y = clip_x(y);
+  p[1].y = p[2].y = clip_x(y1); p[2].x = clip_x(x2);
+  XDrawLines(fl_display, fl_window, fl_gc, p, 3, 0);
+#elif defined(WIN32)
+  if (x2 > x) x2++;
+  else x2--;
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x, y1);
+  LineTo(fl_gc, x2, y1);
+#elif defined(__APPLE_QUARTZ__)
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y1);
+  CGContextStrokePath(fl_gc);
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::yxline(int x, int y, int y1, int x2, int y3) {
+#if defined(USE_X11)
+  XPoint p[4];
+  p[0].x = p[1].x = clip_x(x);  p[0].y = clip_x(y);
+  p[1].y = p[2].y = clip_x(y1); p[2].x = p[3].x = clip_x(x2);
+  p[3].y = clip_x(y3);
+  XDrawLines(fl_display, fl_window, fl_gc, p, 4, 0);
+#elif defined(WIN32)
+  if(y3<y1) y3--;
+  else y3++;
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x, y1);
+  LineTo(fl_gc, x2, y1);
+  LineTo(fl_gc, x2, y3);
+#elif defined(__APPLE_QUARTZ__)
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y3);
+  CGContextStrokePath(fl_gc);
+  if (USINGQUARTZPRINTER || fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::line(int x, int y, int x1, int y1) {
+#if defined(USE_X11)
+  XDrawLine(fl_display, fl_window, fl_gc, x, y, x1, y1);
+#elif defined(WIN32)
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x1, y1);
+  // Draw the last point *again* because the GDI line drawing
+  // functions will not draw the last point ("it's a feature!"...)
+  SetPixel(fl_gc, x1, y1, fl_RGB());
+#elif defined(__APPLE_QUARTZ__)
+  if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y1);
+  CGContextStrokePath(fl_gc);
+  if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::line(int x, int y, int x1, int y1, int x2, int y2) {
+#if defined(USE_X11)
+  XPoint p[3];
+  p[0].x = x;  p[0].y = y;
+  p[1].x = x1; p[1].y = y1;
+  p[2].x = x2; p[2].y = y2;
+  XDrawLines(fl_display, fl_window, fl_gc, p, 3, 0);
+#elif defined(WIN32)
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x1, y1);
+  LineTo(fl_gc, x2, y2);
+  // Draw the last point *again* because the GDI line drawing
+  // functions will not draw the last point ("it's a feature!"...)
+  SetPixel(fl_gc, x2, y2, fl_RGB());
+#elif defined(__APPLE_QUARTZ__)
+  if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y2);
+  CGContextStrokePath(fl_gc);
+  if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::loop(int x, int y, int x1, int y1, int x2, int y2) {
+#if defined(USE_X11)
+  XPoint p[4];
+  p[0].x = x;  p[0].y = y;
+  p[1].x = x1; p[1].y = y1;
+  p[2].x = x2; p[2].y = y2;
+  p[3].x = x;  p[3].y = y;
+  XDrawLines(fl_display, fl_window, fl_gc, p, 4, 0);
+#elif defined(WIN32)
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x1, y1);
+  LineTo(fl_gc, x2, y2);
+  LineTo(fl_gc, x, y);
+#elif defined(__APPLE_QUARTZ__)
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y2);
+  CGContextClosePath(fl_gc);
+  CGContextStrokePath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) {
+#if defined(USE_X11)
+  XPoint p[5];
+  p[0].x = x;  p[0].y = y;
+  p[1].x = x1; p[1].y = y1;
+  p[2].x = x2; p[2].y = y2;
+  p[3].x = x3; p[3].y = y3;
+  p[4].x = x;  p[4].y = y;
+  XDrawLines(fl_display, fl_window, fl_gc, p, 5, 0);
+#elif defined(WIN32)
+  MoveToEx(fl_gc, x, y, 0L); 
+  LineTo(fl_gc, x1, y1);
+  LineTo(fl_gc, x2, y2);
+  LineTo(fl_gc, x3, y3);
+  LineTo(fl_gc, x, y);
+#elif defined(__APPLE_QUARTZ__)
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y2);
+  CGContextAddLineToPoint(fl_gc, x3, y3);
+  CGContextClosePath(fl_gc);
+  CGContextStrokePath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::polygon(int x, int y, int x1, int y1, int x2, int y2) {
+  XPoint p[4];
+  p[0].x = x;  p[0].y = y;
+  p[1].x = x1; p[1].y = y1;
+  p[2].x = x2; p[2].y = y2;
+#if defined (USE_X11)
+  p[3].x = x;  p[3].y = y;
+  XFillPolygon(fl_display, fl_window, fl_gc, p, 3, Convex, 0);
+  XDrawLines(fl_display, fl_window, fl_gc, p, 4, 0);
+#elif defined(WIN32)
+  SelectObject(fl_gc, fl_brush());
+  Polygon(fl_gc, p, 3);
+#elif defined(__APPLE_QUARTZ__)
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y2);
+  CGContextClosePath(fl_gc);
+  CGContextFillPath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) {
+  XPoint p[5];
+  p[0].x = x;  p[0].y = y;
+  p[1].x = x1; p[1].y = y1;
+  p[2].x = x2; p[2].y = y2;
+  p[3].x = x3; p[3].y = y3;
+#if defined(USE_X11)
+  p[4].x = x;  p[4].y = y;
+  XFillPolygon(fl_display, fl_window, fl_gc, p, 4, Convex, 0);
+  XDrawLines(fl_display, fl_window, fl_gc, p, 5, 0);
+#elif defined(WIN32)
+  SelectObject(fl_gc, fl_brush());
+  Polygon(fl_gc, p, 4);
+#elif defined(__APPLE_QUARTZ__)
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, x, y);
+  CGContextAddLineToPoint(fl_gc, x1, y1);
+  CGContextAddLineToPoint(fl_gc, x2, y2);
+  CGContextAddLineToPoint(fl_gc, x3, y3);
+  CGContextClosePath(fl_gc);
+  CGContextFillPath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::point(int x, int y) {
+#if defined(USE_X11)
+  XDrawPoint(fl_display, fl_window, fl_gc, clip_x(x), clip_x(y));
+#elif defined(WIN32)
+  SetPixel(fl_gc, x, y, fl_RGB());
+#elif defined(__APPLE_QUARTZ__)
+  CGContextFillRect(fl_gc, CGRectMake(x - 0.5, y - 0.5, 1, 1) );
+#else
+# error unsupported platform
+#endif
+}
+
+////////////////////////////////////////////////////////////////
+
+#if !defined(WIN32) && !defined(__APPLE__)
+// Missing X call: (is this the fastest way to init a 1-rectangle region?)
+// MSWindows equivalent exists, implemented inline in win32.h
+fltk3::Region XRectangleRegion(int x, int y, int w, int h) {
+  XRectangle R;
+  clip_to_short(x, y, w, h);
+  R.x = x; R.y = y; R.width = w; R.height = h;
+  fltk3::Region r = XCreateRegion();
+  XUnionRectWithRegion(&R, r, r);
+  return r;
+}
+#endif
+
+void fltk3::GraphicsDriver::restore_clip() {
+  fl_clip_state_number++;
+  fltk3::Region r = rstack[rstackptr];
+#if defined(USE_X11)
+  if (r) XSetRegion(fl_display, fl_gc, r);
+  else XSetClipMask(fl_display, fl_gc, 0);
+#elif defined(WIN32)
+  SelectClipRgn(fl_gc, r); //if r is NULL, clip is automatically cleared
+#elif defined(__APPLE_QUARTZ__)
+  if ( fl_window ) { // clipping for a true window
+    Fl_X::q_clear_clipping();
+    Fl_X::q_fill_context();//flip coords if bitmap context
+    //apply program clip
+    if (r) {
+      CGContextClipToRects(fl_gc, r->rects, r->count);
+    }
+  } else if (fl_gc) { // clipping for an offscreen drawing world (CGBitmap)
+    Fl_X::q_clear_clipping();
+    Fl_X::q_fill_context();
+    if (r) {
+      CGContextClipToRects(fl_gc, r->rects, r->count);
+    }
+  }
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::clip_region(fltk3::Region r) {
+  fltk3::Region oldr = rstack[rstackptr];
+  if (oldr) XDestroyRegion(oldr);
+  rstack[rstackptr] = r;
+  fltk3::restore_clip();
+}
+
+fltk3::Region fltk3::GraphicsDriver::clip_region() {
+  return rstack[rstackptr];
+}
+
+void fltk3::GraphicsDriver::push_clip(int x, int y, int w, int h) {
+  fltk3::Region r;
+  if (w > 0 && h > 0) {
+    r = XRectangleRegion(x,y,w,h);
+    fltk3::Region current = rstack[rstackptr];
+    if (current) {
+#if defined(USE_X11)
+      fltk3::Region temp = XCreateRegion();
+      XIntersectRegion(current, r, temp);
+      XDestroyRegion(r);
+      r = temp;
+#elif defined(WIN32)
+      CombineRgn(r,r,current,RGN_AND);
+#elif defined(__APPLE_QUARTZ__)
+      XDestroyRegion(r);
+      r = Fl_X::intersect_region_and_rect(current, x,y,w,h);
+#else
+# error unsupported platform
+#endif
+    }
+  } else { // make empty clip region:
+#if defined(USE_X11)
+    r = XCreateRegion();
+#elif defined(WIN32)
+    r = CreateRectRgn(0,0,0,0);
+#elif defined(__APPLE_QUARTZ__)
+    r = XRectangleRegion(0,0,0,0);
+#else
+# error unsupported platform
+#endif
+  }
+  if (rstackptr < region_stack_max) rstack[++rstackptr] = r;
+  else fltk3::warning("fltk3::push_clip: clip stack overflow!\n");
+  fltk3::restore_clip();
+}
+
+// make there be no clip (used by fl_begin_offscreen() only!)
+void fltk3::GraphicsDriver::push_no_clip() {
+  if (rstackptr < region_stack_max) rstack[++rstackptr] = 0;
+  else fltk3::warning("fltk3::push_no_clip: clip stack overflow!\n");
+  fltk3::restore_clip();
+}
+
+// pop back to previous clip:
+void fltk3::GraphicsDriver::pop_clip() {
+  if (rstackptr > 0) {
+    fltk3::Region oldr = rstack[rstackptr--];
+    if (oldr) XDestroyRegion(oldr);
+  } else fltk3::warning("fltk3::pop_clip: clip stack underflow!\n");
+  fltk3::restore_clip();
+}
+
+int fltk3::GraphicsDriver::not_clipped(int x, int y, int w, int h) {
+  if (x+w <= 0 || y+h <= 0) return 0;
+  fltk3::Region r = rstack[rstackptr];
+  if (!r) return 1;
+#if defined (USE_X11)
+  // get rid of coordinates outside the 16-bit range the X calls take.
+  if (clip_to_short(x,y,w,h)) return 0;	// clipped
+  return XRectInRegion(r, x, y, w, h);
+#elif defined(WIN32)
+  RECT rect;
+  if (fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) { // in case of print context, convert coords from logical to device
+    POINT pt[2] = { {x, y}, {x + w, y + h} };
+    LPtoDP(fl_gc, pt, 2);
+    rect.left = pt[0].x; rect.top = pt[0].y; rect.right = pt[1].x; rect.bottom = pt[1].y;
+  } else {
+    rect.left = x; rect.top = y; rect.right = x+w; rect.bottom = y+h;
+  }
+  return RectInRegion(r,&rect);
+#elif defined(__APPLE_QUARTZ__)
+  CGRect arg = fl_cgrectmake_cocoa(x, y, w, h);
+  for (int i = 0; i < r->count; i++) {
+    CGRect test = CGRectIntersection(r->rects[i], arg);
+    if (!CGRectIsEmpty(test)) return 1;
+  }
+  return 0;
+#else
+# error unsupported platform
+#endif
+}
+
+// return rectangle surrounding intersection of this rectangle and clip:
+int fltk3::GraphicsDriver::clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){
+  X = x; Y = y; W = w; H = h;
+  fltk3::Region r = rstack[rstackptr];
+  if (!r) return 0;
+#if defined(USE_X11)
+  switch (XRectInRegion(r, x, y, w, h)) {
+  case 0: // completely outside
+    W = H = 0;
+    return 2;
+  case 1: // completely inside:
+    return 0;
+  default: // partial:
+    break;
+  }
+  fltk3::Region rr = XRectangleRegion(x,y,w,h);
+  fltk3::Region temp = XCreateRegion();
+  XIntersectRegion(r, rr, temp);
+  XRectangle rect;
+  XClipBox(temp, &rect);
+  X = rect.x; Y = rect.y; W = rect.width; H = rect.height;
+  XDestroyRegion(temp);
+  XDestroyRegion(rr);
+  return 1;
+#elif defined(WIN32)
+// The win32 API makes no distinction between partial and complete
+// intersection, so we have to check for partial intersection ourselves.
+// However, given that the regions may be composite, we have to do
+// some voodoo stuff...
+  fltk3::Region rr = XRectangleRegion(x,y,w,h);
+  fltk3::Region temp = CreateRectRgn(0,0,0,0);
+  int ret;
+  if (CombineRgn(temp, rr, r, RGN_AND) == NULLREGION) { // disjoint
+    W = H = 0;
+    ret = 2;
+  } else if (EqualRgn(temp, rr)) { // complete
+    ret = 0;
+  } else {	// partial intersection
+    RECT rect;
+    GetRgnBox(temp, &rect);
+    if(fltk3::SurfaceDevice::surface()->class_name() == fltk3::Printer::class_id) { // if print context, convert coords from device to logical
+      POINT pt[2] = { {rect.left, rect.top}, {rect.right, rect.bottom} };
+      DPtoLP(fl_gc, pt, 2);
+      X = pt[0].x; Y = pt[0].y; W = pt[1].x - X; H = pt[1].y - Y;
+    }
+    else {
+      X = rect.left; Y = rect.top; W = rect.right - X; H = rect.bottom - Y;
+      }
+    ret = 1;
+  }
+  DeleteObject(temp);
+  DeleteObject(rr);
+  return ret;
+#elif defined(__APPLE_QUARTZ__)
+  CGRect arg = fl_cgrectmake_cocoa(x, y, w, h);
+  CGRect u = CGRectMake(0,0,0,0);
+  CGRect test;
+  for(int i = 0; i < r->count; i++) {
+    test = CGRectIntersection(r->rects[i], arg);
+    if( ! CGRectIsEmpty(test) ) {
+      if(CGRectIsEmpty(u)) u = test;
+      else u = CGRectUnion(u, test);
+    }
+  }
+  X = int(u.origin.x);
+  Y = int(u.origin.y);
+  W = int(u.size.width + 1);
+  H = int(u.size.height + 1);
+  if(CGRectIsEmpty(u)) W = H = 0;
+  return ! CGRectEqualToRect(arg, u);
+#else
+# error unsupported platform
+#endif
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_rect.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_round_box.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_round_box.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_round_box.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,120 @@
+//
+// "$Id$"
+//
+// Round box drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in separate files so they are not linked
+// in if not used.
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+namespace fltk3 {
+  extern uchar* gray_ramp();
+}
+
+
+// A compiler from a certain very large software company will not compile
+// the function pointer assignment due to the name conflict with fltk3::arc.
+// This function is to fix that:
+static void arc_i(int x,int y,int w,int h,double a1,double a2) {
+  fltk3::arc(x,y,w,h,a1,a2);
+}
+
+enum {UPPER_LEFT, LOWER_RIGHT, CLOSED, FILL};
+
+static void draw(int which, int x,int y,int w,int h, int inset, fltk3::Color color)
+{
+  if (inset*2 >= w) inset = (w-1)/2;
+  if (inset*2 >= h) inset = (h-1)/2;
+  x += inset;
+  y += inset;
+  w -= 2*inset;
+  h -= 2*inset;
+  int d = w <= h ? w : h;
+  if (d <= 1) return;
+  fltk3::color(color);
+  fltk3::line_style(0,1);
+  void (*f)(int,int,int,int,double,double);
+  f = (which==FILL) ? fltk3::pie : arc_i;
+  if (which >= CLOSED) {
+    f(x+w-d, y, d, d, w<=h ? 0 : -90, w<=h ? 180 : 90);
+    f(x, y+h-d, d, d, w<=h ? 180 : 90, w<=h ? 360 : 270);
+  } else if (which == UPPER_LEFT) {
+    f(x+w-d, y, d, d, 45, w<=h ? 180 : 90);
+    f(x, y+h-d, d, d, w<=h ? 180 : 90, 225);
+  } else { // LOWER_RIGHT
+    f(x, y+h-d, d, d, 225, w<=h ? 360 : 270);
+    f(x+w-d, y, d, d, w<=h ? 360 : 270, 360+45);
+  }
+  if (which == FILL) {
+    if (w < h)
+      fltk3::rectf(x, y+d/2, w, h-(d&-2));
+    else if (w > h)
+      fltk3::rectf(x+d/2, y, w-(d&-2), h);
+  } else {
+    if (w < h) {
+      if (which != UPPER_LEFT) fltk3::yxline(x+w-1, y+d/2-1, y+h-d/2+1);
+      if (which != LOWER_RIGHT) fltk3::yxline(x, y+d/2-1, y+h-d/2+1);
+    } else if (w > h) {
+      if (which != UPPER_LEFT) fltk3::xyline(x+d/2-1, y+h-1, x+w-d/2+1);
+      if (which != LOWER_RIGHT) fltk3::xyline(x+d/2-1, y, x+w-d/2+1);
+    }
+  }
+  fltk3::line_style(0);
+}
+
+void fl_round_down_box(int x, int y, int w, int h, fltk3::Color bgcolor) {
+  uchar *g = fltk3::gray_ramp();
+  draw(FILL,	    x,   y, w,   h, 2, bgcolor);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 0, (fltk3::Color)g['N']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 1, (fltk3::Color)g['H']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 0, (fltk3::Color)g['N']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 1, (fltk3::Color)g['H']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 0, (fltk3::Color)g['S']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (fltk3::Color)g['U']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 1, (fltk3::Color)g['U']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (fltk3::Color)g['W']);
+  draw(CLOSED,	    x,   y, w,   h, 2, (fltk3::Color)g['A']);
+}
+
+void fl_round_up_box(int x, int y, int w, int h, fltk3::Color bgcolor) {
+  uchar *g = fltk3::gray_ramp();
+  draw(FILL,	    x,   y, w,   h, 2, bgcolor);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (fltk3::Color)g['H']);
+  draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (fltk3::Color)g['N']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 1, (fltk3::Color)g['H']);
+  draw(LOWER_RIGHT, x,   y, w,   h, 2, (fltk3::Color)g['N']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 2, (fltk3::Color)g['U']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 1, (fltk3::Color)g['S']);
+  draw(UPPER_LEFT,  x,   y, w,   h, 1, (fltk3::Color)g['W']);
+  draw(UPPER_LEFT,  x+1, y, w-2, h, 0, (fltk3::Color)g['U']);
+  draw(CLOSED,	    x,   y, w,   h, 0, (fltk3::Color)g['A']);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_round_box.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_rounded_box.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_rounded_box.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_rounded_box.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,81 @@
+//
+// "$Id$"
+//
+// Rounded box drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+#define RN	5
+#define RS	15
+#define BW	3
+
+static double offset[RN] = { 0.0, 0.07612, 0.29289, 0.61732, 1.0};
+
+static void rbox(int fill, int x, int y, int w, int h) {
+  int i;
+  int rsx ,rsy, rs;
+  rsx = w*2/5; rsy = h*2/5;
+  if (rsx > rsy) rs = rsy; else  rs = rsx;
+  if (rs > RS) rs = RS;
+  rsx = rs; rsy = rs;
+
+  if (fill) fltk3::begin_polygon(); else fltk3::begin_loop();
+  for (i=0; i<RN; i++)
+    fltk3::vertex(x + offset[RN-i-1]*rsx, y + offset[i] * rsy);
+  for (i=0; i<RN; i++)
+    fltk3::vertex(x + offset[i]*rsx, y + h-1 - offset[RN-i-1] * rsy);
+  for (i=0; i<RN; i++)
+    fltk3::vertex(x + w-1 - offset[RN-i-1]*rsx, y + h-1 - offset[i] * rsy);
+  for (i=0; i<RN; i++)
+    fltk3::vertex(x + w-1 - offset[i]*rsx, y + offset[RN-i-1] * rsy);
+  if (fill) fltk3::end_polygon(); else fltk3::end_loop();
+}
+
+void fl_rflat_box(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c); rbox(1, x, y, w, h); rbox(0, x, y, w, h);
+}
+
+void fl_rounded_frame(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c); rbox(0, x, y, w, h);
+}
+
+void fl_rounded_box(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c); rbox(1, x, y, w, h);
+  fltk3::color(fltk3::BLACK); rbox(0, x, y, w, h);
+}
+
+void fl_rshadow_box(int x, int y, int w, int h, fltk3::Color c) {
+  // draw shadow:
+  fltk3::color(fltk3::DARK3);
+  rbox(1, x+BW, y+BW, w, h);
+  rbox(0, x+BW, y+BW, w, h);
+  // draw the box:
+  fl_rounded_box(x, y, w, h, c);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_rounded_box.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_scroll_area.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_scroll_area.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_scroll_area.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,169 @@
+//
+// "$Id$"
+//
+// Scrolling routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Drawing function to move the contents of a rectangle.  This is passed
+// a "callback" which is called to draw rectangular areas that are moved
+// into the drawing area.
+
+#include <config.h>
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+
+// scroll a rectangle and redraw the newly exposed portions:
+/**
+  Scroll a rectangle and draw the newly exposed portions.
+  \param[in] X,Y       position of top-left of rectangle
+  \param[in] W,H       size of rectangle
+  \param[in] dx,dy     pixel offsets for shifting rectangle
+  \param[in] draw_area callback function to draw rectangular areas
+  \param[in] data      pointer to user data for callback
+  The contents of the rectangular area is first shifted by \p dx
+  and \p dy pixels. The \p draw_area callback is then called for
+  every newly exposed rectangular area.
+  */
+void fltk3::scroll(int X, int Y, int W, int H, int dx, int dy,
+               void (*draw_area)(void*, int,int,int,int), void* data)
+{
+  if (!dx && !dy) return;
+  if (dx <= -W || dx >= W || dy <= -H || dy >= H) {
+    // no intersection of old an new scroll
+    draw_area(data,X,Y,W,H);
+    return;
+  }
+  int src_x, src_w, dest_x, clip_x, clip_w;
+  if (dx > 0) {
+    src_x = X;
+    dest_x = X+dx;
+    src_w = W-dx;
+    clip_x = X;
+    clip_w = dx;
+  } else {
+    src_x = X-dx;
+    dest_x = X;
+    src_w = W+dx;
+    clip_x = X+src_w;
+    clip_w = W-src_w;
+  }
+  int src_y, src_h, dest_y, clip_y, clip_h;
+  if (dy > 0) {
+    src_y = Y;
+    dest_y = Y+dy;
+    src_h = H-dy;
+    clip_y = Y;
+    clip_h = dy;
+  } else {
+    src_y = Y-dy;
+    dest_y = Y;
+    src_h = H+dy;
+    clip_y = Y+src_h;
+    clip_h = H-src_h;
+  }
+
+#if defined(USE_X11)
+  XCopyArea(fl_display, fl_window, fl_window, fl_gc,
+	    src_x, src_y, src_w, src_h, dest_x, dest_y);
+  // we have to sync the display and get the GraphicsExpose events! (sigh)
+  for (;;) {
+    XEvent e; XWindowEvent(fl_display, fl_window, ExposureMask, &e);
+    if (e.type == NoExpose) break;
+    // otherwise assume it is a GraphicsExpose event:
+    draw_area(data, e.xexpose.x, e.xexpose.y,
+	      e.xexpose.width, e.xexpose.height);
+    if (!e.xgraphicsexpose.count) break;
+  }
+#elif defined(WIN32)
+  typedef int (WINAPI* fl_GetRandomRgn_func)(HDC, HRGN, INT);
+  static fl_GetRandomRgn_func fl_GetRandomRgn = 0L;
+  static char first_time = 1;
+
+  // We will have to do some Region magic now, so let's see if the 
+  // required function is available (and it should be staring w/Win95)
+  if (first_time) {
+    HMODULE hMod = GetModuleHandle("GDI32.DLL");
+    if (hMod) {
+      fl_GetRandomRgn = (fl_GetRandomRgn_func)GetProcAddress(hMod, "GetRandomRgn");
+    }
+    first_time = 0;
+  }
+
+  // Now check if the source scrolling area is fully visible.
+  // If it is, we will do a quick scroll and just update the 
+  // newly exposed area. If it is not, we go the safe route and 
+  // re-render the full area instead.
+  // Note 1: we could go and find the areas that are actually
+  // obscured and recursively call fltk3::scroll for the newly found
+  // rectangles. However, this practice would rely on the 
+  // elements of the undocumented Rgn structure.
+  // Note 2: although this method should take care of most 
+  // multi-screen solutions, it will not solve issues scrolling
+  // from a different resolution screen onto another.
+  // Note 3: this has been tested with image maps, too.
+  if (fl_GetRandomRgn) {
+    // get the DC region minus all overlapping windows
+    HRGN sys_rgn = CreateRectRgn(0, 0, 0, 0);
+    fl_GetRandomRgn(fl_gc, sys_rgn, 4);
+    // now get the source scrolling rectangle 
+    HRGN src_rgn = CreateRectRgn(src_x, src_y, src_x+src_w, src_y+src_h);
+    POINT offset = { 0, 0 };
+    if (GetDCOrgEx(fl_gc, &offset)) {
+      OffsetRgn(src_rgn, offset.x, offset.y);
+    }
+    // see if all source pixels are available in the system region
+    // Note: we could be a bit more merciful and subtract the 
+    // scroll destination region as well.
+    HRGN dst_rgn = CreateRectRgn(0, 0, 0, 0);
+    int r = CombineRgn(dst_rgn, src_rgn, sys_rgn, RGN_DIFF);
+    DeleteObject(dst_rgn);
+    DeleteObject(src_rgn);
+    DeleteObject(sys_rgn);
+    if (r!=NULLREGION) {
+      draw_area(data,X,Y,W,H);
+      return;
+    }
+  }
+
+  // Great, we can do an accelerated scroll instead of re-rendering
+  BitBlt(fl_gc, dest_x, dest_y, src_w, src_h, fl_gc, src_x, src_y,SRCCOPY);
+
+#elif defined(__APPLE_QUARTZ__)
+  CGImageRef img = Fl_X::CGImage_from_window_rect(fltk3::Window::current(), src_x, src_y, src_w, src_h);
+  CGRect rect = { { dest_x, dest_y }, { src_w, src_h } };
+  Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
+  CGContextDrawImage(fl_gc, rect, img);
+  Fl_X::q_end_image();
+  CFRelease(img);
+#else
+# error unsupported platform
+#endif
+  if (dx) draw_area(data, clip_x, dest_y, clip_w, src_h);
+  if (dy) draw_area(data, X, clip_y, W, clip_h);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_scroll_area.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_set_font.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_set_font.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_set_font.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,97 @@
+//
+// "$Id$"
+//
+// Font utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Add a font to the internal table.
+// Also see fl_set_fonts.cxx which adds all possible fonts.
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+#include "flstring.h"
+#include "Fl_Font.H"
+#include <stdlib.h>
+
+static int table_size;
+/**
+  Changes a face.  The string pointer is simply stored,
+  the string is not copied, so the string must be in static memory.
+*/    
+void fltk3::set_font(fltk3::Font fnum, const char* name) {
+  while (fnum >= table_size) {
+    int i = table_size;
+    if (!i) {	// don't realloc the built-in table
+      table_size = 2*fltk3::FREE_FONT;
+      i = fltk3::FREE_FONT;
+      Fl_Fontdesc* t = (Fl_Fontdesc*)malloc(table_size*sizeof(Fl_Fontdesc));
+      memcpy(t, fltk3::fonts, fltk3::FREE_FONT*sizeof(Fl_Fontdesc));
+      fltk3::fonts = t;
+    } else {
+      table_size = 2*table_size;
+      fltk3::fonts=(Fl_Fontdesc*)realloc(fltk3::fonts, table_size*sizeof(Fl_Fontdesc));
+    }
+    for (; i < table_size; i++) {
+      fltk3::fonts[i].fontname[0] = 0;
+      fltk3::fonts[i].name = 0;
+#if !defined(WIN32) && !defined(__APPLE__)
+      fltk3::fonts[i].xlist = 0;
+      fltk3::fonts[i].n = 0;
+#endif // !WIN32 && !__APPLE__
+    }
+  }
+  Fl_Fontdesc* s = fltk3::fonts+fnum;
+  if (s->name) {
+    if (!strcmp(s->name, name)) {s->name = name; return;}
+#if !defined(WIN32) && !defined(__APPLE__)
+    if (s->xlist && s->n >= 0) XFreeFontNames(s->xlist);
+#endif
+    for (Fl_Font_Descriptor* f = s->first; f;) {
+      Fl_Font_Descriptor* n = f->next; delete f; f = n;
+    }
+    s->first = 0;
+  }
+  s->name = name;
+  s->fontname[0] = 0;
+#if !defined(WIN32) && !defined(__APPLE__)
+  s->xlist = 0;
+#endif
+  s->first = 0;
+  fltk3::font(-1, 0);
+}
+/** Copies one face to another. */
+void fltk3::set_font(fltk3::Font fnum, fltk3::Font from) {
+  fltk3::set_font(fnum, get_font(from));
+}
+/**
+    Gets the string for this face.  This string is different for each
+    face. Under X this value is passed to XListFonts to get all the sizes
+    of this face.
+*/
+const char* fltk3::get_font(fltk3::Font fnum) {return fltk3::fonts[fnum].name;}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_set_font.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_set_fonts.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_set_fonts.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_set_fonts.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,46 @@
+//
+// "$Id$"
+//
+// More font utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include "Fl_Font.H"
+#include "flstring.h"
+#include <stdlib.h>
+
+#ifdef WIN32
+#  include "fl_set_fonts_win32.cxx"
+#elif defined(__APPLE__)
+#  include "fl_set_fonts_mac.cxx"
+#elif USE_XFT
+#  include "fl_set_fonts_xft.cxx"
+#else
+#  include "fl_set_fonts_x.cxx"
+#endif // WIN32
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_set_fonts.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_set_fonts_mac.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_set_fonts_mac.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_set_fonts_mac.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,164 @@
+//
+// "$Id$"
+//
+// MacOS font utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <config.h>
+
+// #inclde <SFNTTypes.h>
+
+// This function fills in the fltk font table with all the fonts that
+// are found on the X server.  It tries to place the fonts into families
+// and to sort them so the first 4 in a family are normal, bold, italic,
+// and bold italic.
+
+// Bug: older versions calculated the value for *ap as a side effect of
+// making the name, and then forgot about it. To avoid having to change
+// the header files I decided to store this value in the last character
+// of the font name array.
+#define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
+
+// turn a stored font name into a pretty name:
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
+  Fl_Fontdesc *f = fltk3::fonts + fnum;
+  if (!f->fontname[0]) {
+    const char* p = f->name;
+    if (!p || !*p) {if (ap) *ap = 0; return "";}
+    strlcpy(f->fontname, p, ENDOFBUFFER);
+    int type = 0;
+    if (strstr(f->name, "Bold")) type |= fltk3::BOLD;
+    if (strstr(f->name, "Italic")) type |= fltk3::ITALIC;
+    f->fontname[ENDOFBUFFER] = (char)type;
+  }
+  if (ap) *ap = f->fontname[ENDOFBUFFER];
+  return f->fontname;
+}
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+static int name_compare(const void *a, const void *b)
+{
+  return strcmp(*(char**)a, *(char**)b);
+}
+#endif
+
+static int fl_free_font = fltk3::FREE_FONT;
+
+fltk3::Font fltk3::set_fonts(const char* xstarname) {
+#pragma unused ( xstarname )
+if (fl_free_font > fltk3::FREE_FONT) return (fltk3::Font)fl_free_font; // if already called
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+if(fl_mac_os_version >= 100500) {
+//if(CTFontCreateWithFontDescriptor != NULL) {// CTFontCreateWithFontDescriptor != NULL on 10.4 also!
+  int value[1] = {1};
+  CFDictionaryRef dict = CFDictionaryCreate(NULL, 
+					    (const void **)kCTFontCollectionRemoveDuplicatesOption, 
+					    (const void **)&value, 1, NULL, NULL);
+  CTFontCollectionRef fcref = CTFontCollectionCreateFromAvailableFonts(dict);
+  CFRelease(dict);
+  CFArrayRef arrayref = CTFontCollectionCreateMatchingFontDescriptors(fcref);
+  CFRelease(fcref);
+  CFIndex count = CFArrayGetCount(arrayref);
+  CFIndex i;
+  char **tabfontnames = new char*[count];
+  for (i = 0; i < count; i++) {
+	CTFontDescriptorRef fdesc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(arrayref, i);
+	CTFontRef font = CTFontCreateWithFontDescriptor(fdesc, 0., NULL);
+	CFStringRef cfname = CTFontCopyFullName(font);
+	CFRelease(font);
+	static char fname[100];
+	CFStringGetCString(cfname, fname, sizeof(fname), kCFStringEncodingUTF8);
+	tabfontnames[i] = strdup(fname); // never free'ed
+	CFRelease(cfname);
+	}
+  CFRelease(arrayref);
+  qsort(tabfontnames, count, sizeof(char*), name_compare);
+  for (i = 0; i < count; i++) {
+    fltk3::set_font((fltk3::Font)(fl_free_font++), tabfontnames[i]);
+    }
+  delete[] tabfontnames;
+  return (fltk3::Font)fl_free_font;
+}
+else {
+#endif
+#if ! __LP64__
+  ItemCount oFontCount, oCountAgain;
+  ATSUFontID *oFontIDs;
+  // How many fonts?
+  ATSUFontCount (&oFontCount);
+  // now allocate space for them...
+  oFontIDs = (ATSUFontID *)malloc((oFontCount+1) * sizeof(ATSUFontID));
+  ATSUGetFontIDs (oFontIDs, oFontCount, &oCountAgain);
+  // Now oFontIDs should contain a list of all the available Unicode fonts
+  // Iterate through the list to get each font name
+  for (ItemCount idx = 0; idx < oFontCount; idx++)
+  {
+//  ByteCount actualLength = 0;
+//	Ptr oName;
+    // How to get the name - Apples docs say call this twice, once to get the length, then again 
+	// to get the actual name...
+//    ATSUFindFontName (oFontIDs[idx], kFontFullName, kFontMacintoshPlatform, kFontRomanScript, kFontEnglishLanguage,
+//                      0, NULL, &actualLength, NULL);
+    // Now actualLength tells us the length of buffer we need
+//	oName = (Ptr)malloc(actualLength + 8);
+// But who's got time for that nonsense? Let's just hard code a fixed buffer (urgh!)
+    ByteCount actualLength = 511;
+	char oName[512];
+    ATSUFindFontName (oFontIDs[idx], kFontFullName, kFontMacintoshPlatform, kFontRomanScript, kFontEnglishLanguage,
+                      actualLength, oName, &actualLength, &oCountAgain);
+    // bounds check and terminate the returned name
+    if(actualLength > 511)
+      oName[511] = 0;
+    else
+      oName[actualLength] = 0;
+	fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(oName));
+//	free(oName);
+  }
+  free(oFontIDs);
+  return (fltk3::Font)fl_free_font;
+#endif //__LP64__
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  }
+#endif
+  return 0;
+}
+
+static int array[128];
+int fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+  Fl_Fontdesc *s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // empty slot in table, use entry 0
+  int cnt = 0;
+
+  // ATS supports all font size 
+  array[0] = 0;
+  sizep = array;
+  cnt = 1;
+
+  return cnt;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_set_fonts_mac.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_set_fonts_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_set_fonts_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_set_fonts_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,173 @@
+//
+// "$Id$"
+//
+// WIN32 font utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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 this7 library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This function fills in the FLTK font table with all the fonts that
+// are found on the X server.  It tries to place the fonts into families
+// and to sort them so the first 4 in a family are normal, bold, italic,
+// and bold italic.
+#include <fltk3/utf8.h>
+#ifdef __CYGWIN__
+# include <wchar.h>
+#endif
+
+// Bug: older versions calculated the value for *ap as a side effect of
+// making the name, and then forgot about it. To avoid having to change
+// the header files I decided to store this value in the last character
+// of the font name array.
+#define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
+
+// turn a stored font name into a pretty name:
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
+  Fl_Fontdesc *f = fltk3::fonts + fnum;
+  if (!f->fontname[0]) {
+    const char* p = f->name;
+    if (!p || !*p) {if (ap) *ap = 0; return "";}
+    int type;
+    switch (*p) {
+    case 'B': type = fltk3::BOLD; break;
+    case 'I': type = fltk3::ITALIC; break;
+    case 'P': type = fltk3::BOLD | fltk3::ITALIC; break;
+    default:  type = 0; break;
+    }
+    strlcpy(f->fontname, p+1, ENDOFBUFFER);
+    if (type & fltk3::BOLD) strlcat(f->fontname, " bold", ENDOFBUFFER);
+    if (type & fltk3::ITALIC) strlcat(f->fontname, " italic", ENDOFBUFFER);
+    f->fontname[ENDOFBUFFER] = (char)type;
+  }
+  if (ap) *ap = f->fontname[ENDOFBUFFER];
+  return f->fontname;
+}
+
+static int fl_free_font = fltk3::FREE_FONT;
+
+static int CALLBACK
+enumcbw(CONST LOGFONTW    *lpelf,
+        CONST TEXTMETRICW * /*lpntm*/,
+       DWORD            /*FontType*/,
+       LPARAM           p) {
+  if (!p && lpelf->lfCharSet != ANSI_CHARSET) return 1;
+  char *n = NULL;
+  int l = wcslen(lpelf->lfFaceName);
+  unsigned dstlen = fltk3::utf8fromwc(n, 0, (xchar*)lpelf->lfFaceName, l) + 1; // measure the string
+  n = (char*) malloc(dstlen);
+//n[fl_unicode2utf((xchar*)lpelf->lfFaceName, l, n)] = 0;
+  dstlen = fltk3::utf8fromwc(n, dstlen, (xchar*)lpelf->lfFaceName, l); // convert the string
+  n[dstlen] = 0;
+  for (int i=0; i<fltk3::FREE_FONT; i++) // skip if one of our built-in fonts
+	  if (!strcmp(fltk3::get_font_name((fltk3::Font)i),n)) {free(n);return 1;}
+  char buffer[LF_FACESIZE + 1];
+  strcpy(buffer+1, n);
+  buffer[0] = ' '; fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+  if (lpelf->lfWeight <= 400)
+    buffer[0] = 'B', fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+  buffer[0] = 'I'; fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+  if (lpelf->lfWeight <= 400)
+    buffer[0] = 'P', fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+  free(n);
+  return 1;
+} /* enumcbw */
+
+fltk3::Font fltk3::set_fonts(const char* xstarname) {
+  if (fl_free_font == fltk3::FREE_FONT) {// if not already been called
+    if (!fl_gc) fl_GetDC(0);
+
+      EnumFontFamiliesW(fl_gc, NULL, (FONTENUMPROCW)enumcbw, xstarname != 0);
+
+  }
+  return (fltk3::Font)fl_free_font;
+}
+
+
+static int nbSize;
+static int cyPerInch;
+static int sizes[128];
+static int CALLBACK
+
+EnumSizeCbW(CONST LOGFONTW    * /*lpelf*/,
+           CONST TEXTMETRICW *lpntm,
+           DWORD            fontType,
+           LPARAM           /*p*/) {
+  if ((fontType & RASTER_FONTTYPE) == 0) {
+    sizes[0] = 0;
+    nbSize = 1;
+
+    // Scalable font
+    return 0;
+  }
+
+  int add = lpntm->tmHeight - lpntm->tmInternalLeading;
+  add = MulDiv(add, 72, cyPerInch);
+
+  int start = 0;
+  while ((start < nbSize) && (sizes[start] < add)) {
+    start++;
+  }
+
+  if ((start < nbSize) && (sizes[start] == add)) {
+    return 1;
+  }
+
+  for (int i=nbSize; i>start; i--) sizes[i] = sizes[i - 1];
+
+  sizes[start] = add;
+  nbSize++;
+
+  // Stop enum if buffer overflow
+  return nbSize < 128;
+}
+
+
+int
+fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+  nbSize = 0;
+  Fl_Fontdesc *s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // empty slot in table, use entry 0
+
+  if (!fl_gc) fl_GetDC(0);
+  cyPerInch = GetDeviceCaps(fl_gc, LOGPIXELSY);
+  if (cyPerInch < 1) cyPerInch = 1;
+
+//  int l = fltk3::utf_nb_char((unsigned char*)s->name+1, strlen(s->name+1));
+//  unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short));
+//  fl_utf2unicode((unsigned char*)s->name+1, l, (xchar*)b);
+	const char *nm = (const char*)s->name+1;
+	int len = strlen(s->name+1);
+    int l = fltk3::utf8toUtf16(nm, len, NULL, 0); // Pass NULL to query length required
+    unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short));
+    l = fltk3::utf8toUtf16(nm, len, b, (l+1)); // Now do the conversion
+    b[l] = 0;
+    EnumFontFamiliesW(fl_gc, (WCHAR*)b, (FONTENUMPROCW)EnumSizeCbW, 0);
+	free(b);
+
+  sizep = sizes;
+  return nbSize;
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_set_fonts_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_set_fonts_x.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_set_fonts_x.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_set_fonts_x.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,350 @@
+//
+// "$Id$"
+//
+// X11 font utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// This function fills in the fltk font table with all the fonts that
+// are found on the X server.  It tries to place the fonts into families
+// and to sort them so the first 4 in a family are normal, bold, italic,
+// and bold italic.
+
+// Standard X fonts are matched by a pattern that is always of
+// this form, and this pattern is put in the table:
+// "-*-family-weight-slant-width1-style-*-registry-encoding"
+
+// Non-standard font names (those not starting with '-') are matched
+// by a pattern of the form "prefix*suffix", where the '*' is where
+// fltk thinks the point size is, or by the actual font name if no
+// point size is found.
+
+// Fltk knows how to pull an "attribute" out of a font name, such as
+// bold or italic, by matching known x font field values.  All words
+// that don't match a known attribute are combined into the "name"
+// of the font.  Names are compared before attributes for sorting, this
+// makes the bold and plain version of a font come out next to each
+// other despite the poor X font naming scheme.
+
+// By default fl_set_fonts() only does iso8859-1 encoded fonts.  You can
+// do all normal X fonts by passing "-*" or every possible font with "*".
+
+// fltk3::set_font will take strings other than the ones this stores
+// and can identify any font on X that way.  You may want to write your
+// own system of font management and not use this code.
+
+// turn word N of a X font name into either some attribute bits
+// (right now 0, fltk3::BOLD, or fltk3::ITALIC), or into -1 indicating that
+// the word should be put into the name:
+
+static int attribute(int n, const char *p) {
+  // don't put blank things into name:
+  if (!*p || *p=='-' || *p=='*') return 0;
+  if (n == 3) { // weight
+    if (!strncmp(p,"normal",6) ||
+	!strncmp(p,"light",5) ||
+	!strncmp(p,"medium",6) ||
+	!strncmp(p,"book",4)) return 0;
+    if (!strncmp(p,"bold",4) || !strncmp(p,"demi",4)) return fltk3::BOLD;
+  } else if (n == 4) { // slant
+    if (*p == 'r') return 0;
+    if (*p == 'i' || *p == 'o') return fltk3::ITALIC;
+  } else if (n == 5) { // sWidth
+    if (!strncmp(p,"normal",6)) return 0;
+  }
+  return -1;
+}
+
+// return non-zero if the registry-encoding should be used:
+extern const char* fl_encoding;
+static int use_registry(const char *p) {
+  return *p && *p!='*' && strcmp(p,fl_encoding);
+}
+
+// Bug: older versions calculated the value for *ap as a side effect of
+// making the name, and then forgot about it. To avoid having to change
+// the header files I decided to store this value in the last character
+// of the font name array.
+#define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
+
+// turn a stored (with *'s) X font name into a pretty name:
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
+  Fl_Fontdesc *f = fltk3::fonts + fnum;
+  if (!f->fontname[0]) {
+    int type = 0;
+    const char* p = f->name;
+    if (!p) {
+      if (ap) *ap = 0;
+      return "";
+    }
+    char *o = f->fontname;
+
+    if (*p != '-') { // non-standard font, just replace * with spaces:
+      if (strstr(p,"bold")) type = fltk3::BOLD;
+      if (strstr(p,"ital")) type |= fltk3::ITALIC;
+      for (;*p; p++) {
+	if (*p == '*' || *p == ' ' || *p == '-') {
+	  do p++; while (*p == '*' || *p == ' ' || *p == '-');
+	  if (!*p) break;
+	  if (o < (f->fontname + ENDOFBUFFER - 1)) *o++ = ' ';
+	}
+	if (o < (f->fontname + ENDOFBUFFER - 1)) *o++ = *p;
+      }
+      *o = 0;
+
+    } else { // standard dash-separated font:
+
+      // get the family:
+      const char *x = fltk3::font_word(p,2); if (*x) x++; if (*x=='*') x++;
+      if (!*x) {
+	if (ap) *ap = 0;
+	return p;
+      }
+      const char *e = fltk3::font_word(x,1);
+      if ((e - x) < (int)(ENDOFBUFFER - 1)) {
+	// MRS: we want strncpy here, not strlcpy...
+	strncpy(o,x,e-x);
+	o += e-x;
+      } else {
+	strlcpy(f->fontname, x, ENDOFBUFFER);
+	o = f->fontname+ENDOFBUFFER-1;
+      }
+
+      // collect all the attribute words:
+      for (int n = 3; n <= 6; n++) {
+	// get the next word:
+	if (*e) e++; x = e; e = fltk3::font_word(x,1);
+	int t = attribute(n,x);
+	if (t < 0) {
+	  if (o < (f->fontname + ENDOFBUFFER - 1)) *o++ = ' ';
+	  if ((e - x) < (int)(ENDOFBUFFER - (o - f->fontname) - 1)) {
+	    // MRS: we want strncpy here, not strlcpy...
+	    strncpy(o,x,e-x);
+	    o += e-x;
+	  } else {
+	    strlcpy(o,x, ENDOFBUFFER - (o - f->fontname) - 1);
+	    o = f->fontname+ENDOFBUFFER-1;
+	  }
+	} else type |= t;
+      }
+
+      // skip over the '*' for the size and get the registry-encoding:
+      x = fltk3::font_word(e,2);
+      if (*x) {x++; *o++ = '('; while (*x) *o++ = *x++; *o++ = ')';}
+
+      *o = 0;
+      if (type & fltk3::BOLD) strlcat(f->fontname, " bold", ENDOFBUFFER);
+      if (type & fltk3::ITALIC) strlcat(f->fontname, " italic", ENDOFBUFFER);
+    }
+    f->fontname[ENDOFBUFFER] = (char)type;
+  }
+  if (ap) *ap = f->fontname[ENDOFBUFFER];
+  return f->fontname;
+}
+
+extern "C" {
+// sort raw (non-'*') X font names into perfect order:
+
+static int ultrasort(const void *aa, const void *bb) {
+  const char *a = *(char **)aa;
+  const char *b = *(char **)bb;
+
+  // sort all non x-fonts at the end:
+  if (*a != '-') {
+    if (*b == '-') return 1;
+    // 2 non-x fonts are matched by "numeric sort"
+    int ret = 0;
+    for (;;) {
+      if (isdigit(*a) && isdigit(*b)) {
+	int na = strtol(a, (char **)&a, 10);
+	int nb = strtol(b, (char **)&b, 10);
+	if (!ret) ret = na-nb;
+      } else if (*a != *b) {
+	return (*a-*b);
+      } else if (!*a) {
+	return ret;
+      } else {
+	a++; b++;
+      }
+    }
+  } else {
+    if (*b != '-') return -1;
+  }
+
+  // skip the foundry (assume equal):
+  for (a++; *a && *a++!='-';);
+  for (b++; *b && *b++!='-';);
+
+  // compare the family and all the attribute words:
+  int atype = 0;
+  int btype = 0;
+  for (int n = 2; n <= 6; n++) {
+    int at = attribute(n,a);
+    int bt = attribute(n,b);
+    if (at < 0) {
+      if (bt >= 0) return 1;
+      for (;;) {if (*a!=*b) return *a-*b; b++; if (!*a || *a++=='-') break;}
+    } else {
+      if (bt < 0) return -1;
+      a = fltk3::font_word(a,1); if (*a) a++;
+      b = fltk3::font_word(b,1); if (*b) b++;
+      atype |= at; btype |= bt;
+    }
+  }
+
+  // remember the pixel size:
+  int asize = atoi(a);
+  int bsize = atoi(b);
+
+  // compare the registry/encoding:
+  a = fltk3::font_word(a,6); if (*a) a++;
+  b = fltk3::font_word(b,6); if (*b) b++;
+  if (use_registry(a)) {
+    if (!use_registry(b)) return 1;
+    int r = strcmp(a,b); if (r) return r;
+  } else {
+    if (use_registry(b)) return -1;
+  }
+
+  if (atype != btype) return atype-btype;
+  if (asize != bsize) return asize-bsize;
+
+  // something wrong, just do a string compare...
+  return strcmp(*(char**)aa, *(char**)bb);
+}
+}
+
+// converts a X font name to a standard starname, returns point size:
+static int to_canonical(char *to, const char *from, size_t tolen) {
+  char* c = fl_find_fontsize((char*)from);
+  if (!c) return -1; // no point size found...
+  const char* endptr;
+  int size = strtol(c,(char**)&endptr,10);
+  if (from[0] == '-') {
+    // replace the "foundry" with -*-:
+    *to++ = '-'; *to++ = '*';
+    for (from++; *from && *from != '-'; from++);
+    // skip to the registry-encoding:
+    endptr = (char*)fltk3::font_word(endptr,6);
+    if (*endptr && !use_registry(endptr+1)) endptr = "";
+  }
+  int n = c-from;
+  // MRS: we want strncpy here, not strlcpy...
+  if (n > (int)(tolen - 1)) return -1;
+  strncpy(to,from,n);
+  to[n++] = '*';
+  strlcpy(to+n,endptr, tolen - n);
+  return size;
+}
+
+static unsigned int fl_free_font = fltk3::FREE_FONT;
+
+fltk3::Font fltk3::set_fonts(const char* xstarname) {
+  if (fl_free_font > (unsigned)fltk3::FREE_FONT) // already been here
+    return (fltk3::Font)fl_free_font;
+  fl_open_display();
+  int xlistsize;
+  char buf[20];
+  if (!xstarname) {
+    strcpy(buf,"-*-"); strcpy(buf+3,fl_encoding);
+    xstarname = buf;
+  }
+  char **xlist = XListFonts(fl_display, xstarname, 10000, &xlistsize);
+  if (!xlist) return (fltk3::Font)fl_free_font;
+  qsort(xlist, xlistsize, sizeof(*xlist), ultrasort);
+  int used_xlist = 0;
+  for (int i=0; i<xlistsize;) {
+    int first_xlist = i;
+    const char *p = xlist[i++];
+    char canon[1024];
+    int size = to_canonical(canon, p, sizeof(canon));
+    if (size >= 0) {
+      for (;;) { // find all matching fonts:
+	if (i >= xlistsize) break;
+	const char *q = xlist[i];
+	char this_canon[1024];
+	if (to_canonical(this_canon, q, sizeof(this_canon)) < 0) break;
+	if (strcmp(canon, this_canon)) break;
+	i++;
+      }
+      /*if (*p=='-' || i > first_xlist+1)*/ p = canon;
+    }
+    unsigned int j;
+    for (j = 0;; j++) {
+      /*if (j < fltk3::FREE_FONT) {
+	// see if it is one of our built-in fonts:
+	// if so, set the list of x fonts, since we have it anyway
+	if (fltk3::fonts[j].name && !strcmp(fltk3::fonts[j].name, p)) break;
+      } else */{
+	j = fl_free_font++;
+	if (p == canon) p = strdup(p); else used_xlist = 1;
+	fltk3::set_font((fltk3::Font)j, p);
+	break;
+      }
+    }
+    if (!fltk3::fonts[j].xlist) {
+      fltk3::fonts[j].xlist = xlist+first_xlist;
+      fltk3::fonts[j].n = -(i-first_xlist);
+      used_xlist = 1;
+    }
+  }
+  if (!used_xlist) XFreeFontNames(xlist);
+  return (fltk3::Font)fl_free_font;
+}
+
+int fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+  Fl_Fontdesc *s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // empty slot in table, use entry 0
+  if (!s->xlist) {
+    fl_open_display();
+    s->xlist = XListFonts(fl_display, s->name, 100, &(s->n));
+    if (!s->xlist) return 0;
+  }
+  int listsize = s->n; if (listsize<0) listsize = -listsize;
+  static int sizes[128];
+  int numsizes = 0;
+  for (int i = 0; i < listsize; i++) {
+    char *q = s->xlist[i];
+    char *d = fl_find_fontsize(q);
+    if (!d) continue;
+    int s = strtol(d,0,10);
+    if (!numsizes || sizes[numsizes-1] < s) {
+      sizes[numsizes++] = s;
+    } else {
+      // insert-sort the new size into list:
+      int n;
+      for (n = numsizes-1; n > 0; n--) if (sizes[n-1] < s) break;
+      if (sizes[n] != s) {
+	for (int m = numsizes; m > n; m--) sizes[m] = sizes[m-1];
+	sizes[n] = s;
+	numsizes++;
+      }
+    }
+  }
+  sizep = sizes;
+  return numsizes;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_set_fonts_x.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_set_fonts_xft.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_set_fonts_xft.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_set_fonts_xft.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,385 @@
+//
+// "$Id$"
+//
+// More font utilities for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <X11/Xft/Xft.h>
+
+// This function fills in the fltk font table with all the fonts that
+// are found on the X server.  It tries to place the fonts into families
+// and to sort them so the first 4 in a family are normal, bold, italic,
+// and bold italic.
+
+// Bug: older versions calculated the value for *ap as a side effect of
+// making the name, and then forgot about it. To avoid having to change
+// the header files I decided to store this value in the last character
+// of the font name array.
+#define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
+
+// turn a stored font name into a pretty name:
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
+  Fl_Fontdesc *f = fltk3::fonts + fnum;
+  if (!f->fontname[0]) {
+    const char* p = f->name;
+    int type;
+    switch (p[0]) {
+    case 'B': type = fltk3::BOLD; break;
+    case 'I': type = fltk3::ITALIC; break;
+    case 'P': type = fltk3::BOLD | fltk3::ITALIC; break;
+    default:  type = 0; break;
+    }
+
+  // NOTE: This can cause duplications in fonts that already have Bold or Italic in
+  // their "name". Maybe we need to find a cleverer way?
+    strlcpy(f->fontname, p+1, ENDOFBUFFER);
+    if (type & fltk3::BOLD) strlcat(f->fontname, " bold", ENDOFBUFFER);
+    if (type & fltk3::ITALIC) strlcat(f->fontname, " italic", ENDOFBUFFER);
+    f->fontname[ENDOFBUFFER] = (char)type;
+  }
+  if (ap) *ap = f->fontname[ENDOFBUFFER];
+  return f->fontname;
+}
+
+///////////////////////////////////////////////////////////
+#define LOCAL_RAW_NAME_MAX 256
+
+extern "C" {
+// sort returned fontconfig font names
+static int name_sort(const void *aa, const void *bb) {
+  // What should we do here? Just do a string compare for now...
+  // NOTE: This yeilds some oddities - in particular a Blah Bold font will be
+  // listed before Blah...
+  // Also - the fontconfig listing returns some faces that are effectively duplicates
+  // as far as fltk is concerned, e.g. where there are ko or ja variants that we
+  // can't distinguish (since we are not yet fully UTF-*) - should we strip them here?
+  return strcasecmp(*(char**)aa, *(char**)bb);
+} // end of name_sort
+} // end of extern C section
+
+
+// Read the "pretty" name we have derived from fontconfig then convert
+// it into the format fltk uses internally for Xft names...
+// This is just a mess - I should have tokenised the strings and gone from there,
+// but I really thought this would be easier!
+static void make_raw_name(char *raw, char *pretty)
+{
+  // Input name will be "Some Name:style = Bold Italic" or whatever
+  // The plan is this:
+  // - the first char in the "raw" name becomes either I, B, P or " " for
+  //   italic, bold, bold italic or normal - this seems to be the fltk way...
+
+  char *style = strchr(pretty, ':');
+  char *last = style + strlen(style) - 2;
+
+  if (style)
+  {
+    *style = 0; // Terminate "name" string
+    style ++;   // point to start of style section
+  }
+
+  // It is still possible that the "pretty" name has multiple comma separated entries
+  // I've seen this often in CJK fonts, for example... Keep only the first one... This
+  // is not ideal, the CJK fonts often have the name in utf8 in several languages. What
+  // we ought to do is use fontconfig to query the available languages and pick one... But which?
+#if 0 // loop to keep the LAST name entry...
+  char *nm1 = pretty;
+  char *nm2 = strchr(nm1, ',');
+  while(nm2) {
+    nm1 = nm2 + 1;
+    nm2 = strchr(nm1, ',');
+  }
+  raw[0] = ' '; raw[1] = 0; // Default start of "raw name" text
+  strncat(raw, nm1, LOCAL_RAW_NAME_MAX);
+#else // keep the first remaining name entry
+  char *nm2 = strchr(pretty, ',');
+  if(nm2) *nm2 = 0; // terminate name after first entry
+  raw[0] = ' '; raw[1] = 0; // Default start of "raw name" text
+  strncat(raw, pretty, LOCAL_RAW_NAME_MAX-1);
+#endif
+  // At this point, the name is "marked" as regular...
+  if (style)
+  {
+#define PLAIN   0
+#define BOLD    1
+#define ITALIC  2
+#define BITALIC (BOLD | ITALIC)
+    int mods = PLAIN;
+    // Now try and parse the style string - look for the "=" sign
+    style = strchr(style, '=');
+    while ((style) && (style < last))
+    {
+      int type;
+      while ((*style == '=') || (*style == ' ') || (*style == '\t'))
+      {
+        style++; // Start of Style string
+        if ((style >= last) || (*style == 0)) continue;
+      }
+      type = toupper(style[0]);
+      switch (type)
+      {
+      // Things we might see: Regular Normal Bold Italic Oblique (??what??) Medium
+      // Roman Light Demi Sans SemiCondensed SuperBold Book... etc...
+      // Things we actually care about: Bold Italic Oblique SuperBold - Others???
+      case 'I':
+        if (strncasecmp(style, "Italic", 6) == 0)
+        {
+          mods |= ITALIC;
+        }
+        goto NEXT_STYLE;
+
+      case 'B':
+        if (strncasecmp(style, "Bold", 4) == 0)
+        {
+          mods |= BOLD;
+        }
+        goto NEXT_STYLE;
+
+      case 'O':
+        if (strncasecmp(style, "Oblique", 7) == 0)
+        {
+          mods |= ITALIC;
+        }
+        goto NEXT_STYLE;
+          
+      case 's':
+        if (strncasecmp(style, "SuperBold", 9) == 0)
+        {
+          mods |= BOLD;
+        }
+        goto NEXT_STYLE;
+          
+      default: // find the next gap
+        goto NEXT_STYLE;
+      } // switch end
+NEXT_STYLE:
+      while ((*style != ' ') && (*style != '\t'))
+      {
+        style++;
+        if ((style >= last) || (*style == 0)) goto STYLE_DONE;
+      }
+    }
+STYLE_DONE:
+    // Set the "modifier" character in the raw string
+    switch(mods)
+    {
+    case BOLD: raw[0] = 'B';
+      break;
+    case ITALIC: raw[0] = 'I';
+      break;
+    case BITALIC: raw[0] = 'P';
+      break;
+    default: raw[0] = ' ';
+      break;
+    }
+  }
+} // make_raw_name
+
+///////////////////////////////////////////////////////////
+
+static int fl_free_font = fltk3::FREE_FONT;
+
+// Uses the fontconfig lib to construct a list of all installed fonts.
+// I tried using XftListFonts for this, but the API is tricky - and when
+// I looked at the XftList* code, it calls the Fc* functions anyway, so...
+//
+// Also, for now I'm ignoring the "pattern_name" and just getting everything...
+// AND I don't try and skip the fonts we've already loaded in the defaults.
+// Blimey! What a hack!
+fltk3::Font fltk3::set_fonts(const char* pattern_name)
+{
+  FcFontSet  *fnt_set;     // Will hold the list of fonts we find
+  FcPattern   *fnt_pattern; // Holds the generic "match all names" pattern
+  FcObjectSet *fnt_obj_set = 0; // Holds the generic "match all objects" 
+  
+  int j; // loop iterator variable
+  int font_count; // Total number of fonts found to process
+  char **full_list; // The list of font names we build
+
+  if (fl_free_font > fltk3::FREE_FONT) // already been here
+    return (fltk3::Font)fl_free_font;
+  
+  fl_open_display(); // Just in case...
+    
+  // Make sure fontconfig is ready... is this necessary? The docs say it is
+  // safe to call it multiple times, so just go for it anyway!
+  if (!FcInit())
+  {
+    // What to do? Just return defaults...
+    return fltk3::FREE_FONT;
+  }
+
+  // Create a search pattern that will match every font name - I think this
+  // does the Right Thing, but am not certain...
+  //
+  // This could possibly be "enhanced" to pay attention to the requested
+  // "pattern_name"?
+  fnt_pattern = FcPatternCreate();
+  fnt_obj_set = FcObjectSetBuild(FC_FAMILY, FC_STYLE, (void *)0);
+    
+  // Hopefully, this is a set of all the fonts...
+  fnt_set = FcFontList(0, fnt_pattern, fnt_obj_set);
+  
+  // We don't need the fnt_pattern and fnt_obj_set any more, release them
+  FcPatternDestroy(fnt_pattern);
+  FcObjectSetDestroy(fnt_obj_set);
+
+  // Now, if we got any fonts, iterate through them...
+  if (fnt_set)
+  {
+    char *stop;
+    char *start;
+    char *first;
+    
+    font_count = fnt_set->nfont; // How many fonts?
+    
+    // Allocate array of char*'s to hold the name strings
+    full_list = (char **)malloc(sizeof(char *) * font_count);
+    
+    // iterate through all the font patterns and get the names out...
+      for (j = 0; j < font_count; j++)
+      {
+      // NOTE: FcChar8 is a typedef of "unsigned char"...
+      FcChar8 *font; // String to hold the font's name
+            
+      // Convert from fontconfig internal pattern to human readable name
+      // NOTE: This WILL malloc storage, so we need to free it later...
+      font = FcNameUnparse(fnt_set->fonts[j]);
+            
+      // The returned strings look like this...
+      // Century Schoolbook:style=Bold Italic,fed kursiv,Fett Kursiv,...
+      // So the bit we want is up to the first comma - BUT some strings have
+      // more than one name, separated by, guess what?, a comma...
+      stop = start = first = 0;
+      stop = strchr((char *)font, ',');
+      start = strchr((char *)font, ':');
+      if ((stop) && (start) && (stop < start))
+      {
+        first = stop + 1; // discard first version of name
+        // find first comma *after* the end of the name
+        stop = strchr((char *)start, ',');
+      }
+      else
+      {
+        first = (char *)font; // name is just what was returned
+      }
+      // Truncate the name after the (english) modifiers description
+      if (stop)
+      {
+        *stop = 0; // Terminate the string at the first comma, if there is one
+      }
+
+      // Copy the font description into our list
+      if (first == (char *)font)
+      { // The listed name is still OK
+        full_list[j] = (char *)font;
+      }
+      else
+      { // The listed name has been modified
+        full_list[j] = strdup(first);
+        // Free the font name storage
+        free (font);
+      }
+      // replace "style=Regular" so strcmp sorts it first
+      if (start) {
+        char *reg = strstr(full_list[j], "=Regular");
+        if (reg) reg[1]='.';
+      }
+    }
+        
+    // Release the fnt_set - we don't need it any more
+    FcFontSetDestroy(fnt_set);
+        
+    // Sort the list into alphabetic order
+    qsort(full_list, font_count, sizeof(*full_list), name_sort);
+    
+    // Now let us add the names we got to fltk's font list...
+    for (j = 0; j < font_count; j++)
+    {
+      if (full_list[j])
+      {
+        char xft_name[LOCAL_RAW_NAME_MAX];
+        char *stored_name;
+        // Parse the strings into FLTK-XFT style..
+        make_raw_name(xft_name, full_list[j]);
+        // NOTE: This just adds on AFTER the default fonts - no attempt is made
+        // to identify already loaded fonts. Is this bad?
+        stored_name = strdup(xft_name);
+        fltk3::set_font((fltk3::Font)(j + fltk3::FREE_FONT), stored_name);
+        fl_free_font ++;
+        
+        free(full_list[j]); // release that name from our internal array
+      }
+    }
+    // Now we are done with the list, release it fully
+    free(full_list);
+  }
+  return (fltk3::Font)fl_free_font;
+} // ::set_fonts
+////////////////////////////////////////////////////////////////
+
+
+extern "C" {
+static int int_sort(const void *aa, const void *bb) {
+  return (*(int*)aa)-(*(int*)bb);
+}
+}
+
+////////////////////////////////////////////////////////////////
+
+// Return all the point sizes supported by this font:
+// Suprisingly enough Xft works exactly like fltk does and returns
+// the same list. Except there is no way to tell if the font is scalable.
+int fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+  Fl_Fontdesc *s = fltk3::fonts+fnum;
+  if (!s->name) s = fltk3::fonts; // empty slot in table, use entry 0
+
+  fl_open_display();
+  XftFontSet* fs = XftListFonts(fl_display, fl_screen,
+                                XFT_FAMILY, XftTypeString, s->name+1,
+				(void *)0,
+                                XFT_PIXEL_SIZE,
+				(void *)0);
+  static int* array = 0;
+  static int array_size = 0;
+  if (fs->nfont >= array_size) {
+    delete[] array;
+    array = new int[array_size = fs->nfont+1];
+  }
+  array[0] = 0; int j = 1; // claim all fonts are scalable
+  for (int i = 0; i < fs->nfont; i++) {
+    double v;
+    if (XftPatternGetDouble(fs->fonts[i], XFT_PIXEL_SIZE, 0, &v) == XftResultMatch) {
+      array[j++] = int(v);
+    }
+  }
+  qsort(array+1, j-1, sizeof(int), int_sort);
+  XftFontSetDestroy(fs);
+  sizep = array;
+  return j;
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_set_fonts_xft.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_shadow_box.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_shadow_box.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_shadow_box.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,50 @@
+//
+// "$Id$"
+//
+// Shadow box drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+
+#define BW 3
+
+void fl_shadow_frame(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(fltk3::DARK3);
+  fltk3::rectf(x+BW, y+h-BW,  w - BW, BW);
+  fltk3::rectf(x+w-BW,  y+BW, BW,  h - BW);
+  fltk3::color(c);
+  fltk3::rect(x,y,w-BW,h-BW);
+}
+
+void fl_shadow_box(int x, int y, int w, int h, fltk3::Color c) {
+  fltk3::color(c);
+  fltk3::rectf(x+1,y+1,w-2-BW,h-2-BW);
+  fl_shadow_frame(x,y,w,h,fltk3::GRAY0);
+}
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_shadow_box.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_shortcut.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_shortcut.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_shortcut.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,386 @@
+//
+// "$Id$"
+//
+// Shortcut support routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Code to test and parse fltk shortcut numbers.
+//
+// A shortcut is a keysym or'd with shift flags.  In the simplest
+// sense a shortcut is matched if the shift state is exactly as
+// given and the key returning that keysym is pressed.
+//
+// To make it easier to match some things it is more complex:
+//
+// Only fltk3::META, fltk3::ALT, fltk3::SHIFT, and fltk3::CTRL must be "off".  A
+// zero in the other shift flags indicates "don't care".
+//
+// It also checks against the first character of fltk3::event_text(),
+// and zero for fltk3::SHIFT means "don't care".
+// This allows punctuation shortcuts like "#" to work (rather than
+// calling it "shift+3" on a US keyboard)
+
+#include <fltk3/run.h>
+#include <fltk3/Widget.h>
+#include <fltk3/Button.h>
+#include <fltk3/draw.h>
+#include <ctype.h>
+#include "flstring.h"
+#if !defined(WIN32) && !defined(__APPLE__)
+#include <fltk3/x.h>
+#endif
+
+/**
+  Tests the current event, which must be an fltk3::KEYBOARD or
+  fltk3::SHORTCUT, against a shortcut value (described in fltk3::Button).
+
+  Not to be confused with fltk3::Widget::test_shortcut().
+
+  \return non-zero if there is a match.
+*/
+int fltk3::test_shortcut(unsigned int shortcut) {
+  if (!shortcut) return 0;
+
+  unsigned int v = shortcut & fltk3::KEY_MASK;
+  if (((unsigned)fltk3::tolower(v))!=v) {
+    shortcut |= fltk3::SHIFT;
+  }
+
+  int shift = fltk3::event_state();
+  // see if any required shift flags are off:
+  if ((shortcut&shift) != (shortcut&0x7fff0000)) return 0;
+  // record shift flags that are wrong:
+  int mismatch = (shortcut^shift)&0x7fff0000;
+  // these three must always be correct:
+  if (mismatch&(fltk3::META|fltk3::ALT|fltk3::CTRL)) return 0;
+
+  unsigned int key = shortcut & fltk3::KEY_MASK;
+
+  // if shift is also correct, check for exactly equal keysyms:
+  if (!(mismatch&(fltk3::SHIFT)) && key == (unsigned)fltk3::event_key()) return 1;
+
+  // try matching utf8, ignore shift:
+  unsigned int firstChar = fltk3::utf8decode(fltk3::event_text(), fltk3::event_text()+fltk3::event_length(), 0);
+  if ( ! (fltk3::CAPS_LOCK&shift) && key==firstChar) return 1;
+
+  // kludge so that Ctrl+'_' works (as opposed to Ctrl+'^_'):
+  if ((shift&fltk3::CTRL) && key >= 0x3f && key <= 0x5F
+      && firstChar==(key^0x40)) return 1; // firstChar should be within a-z
+  return 0;
+}
+
+// This table must be in numeric order by fltk (X) keysym number:
+struct Keyname {unsigned int key; const char* name;};
+#if defined(WIN32)
+static Keyname table[] = {
+  {' ', "Space"},
+  {fltk3::BackSpaceKey, "Backspace"},
+  {fltk3::TabKey,	"Tab"},
+  {0xff0b/*XK_Clear*/, "Clear"},
+  {fltk3::EnterKey,	"Enter"}, // X says "Enter"
+  {fltk3::PauseKey,	"Pause"},
+  {fltk3::ScrollLockKey, "Scroll_Lock"},
+  {fltk3::EscapeKey,	"Escape"},
+  {fltk3::HomeKey,	"Home"},
+  {fltk3::LeftKey,	"Left"},
+  {fltk3::UpKey,	"Up"},
+  {fltk3::RightKey,	"Right"},
+  {fltk3::DownKey,	"Down"},
+  {fltk3::PageUpKey,	"Page_Up"}, // X says "Prior"
+  {fltk3::PageDownKey,"Page_Down"}, // X says "Next"
+  {fltk3::EndKey,	"End"},
+  {fltk3::PrintKey,	"Print"},
+  {fltk3::InsertKey,	"Insert"},
+  {fltk3::MenuKey,	"Menu"},
+  {fltk3::NumLockKey,	"Num_Lock"},
+  {fltk3::KPEnterKey,	"KP_Enter"},
+  {fltk3::ShiftLKey,	"Shift_L"},
+  {fltk3::ShiftRKey,	"Shift_R"},
+  {fltk3::ControlLKey,"Control_L"},
+  {fltk3::ControlRKey,"Control_R"},
+  {fltk3::CapsLockKey,"Caps_Lock"},
+  {fltk3::MetaLKey,	"Meta_L"},
+  {fltk3::MetaRKey,	"Meta_R"},
+  {fltk3::AltLKey,	"Alt_L"},
+  {fltk3::AltRKey,	"Alt_R"},
+  {fltk3::DeleteKey,	"Delete"}
+};
+#elif defined(__APPLE__) 
+static Keyname table[] = {
+                                 // v - this column contains UTF-8 characters
+  {' ', "Space"},
+  {fltk3::BackSpaceKey,"\xe2\x8c\xab"}, // erase to the left
+  {fltk3::TabKey,	"\xe2\x87\xa5"}, // rightwards arrow to bar
+  {0xff0b,      "\xe2\x8c\xa6"}, // erase to the right
+  {fltk3::EnterKey,	"\xe2\x86\xa9"}, // leftwards arrow with hook
+  {fltk3::PauseKey,	"Pause"},
+  {fltk3::ScrollLockKey, "Scroll_Lock"},
+  {fltk3::EscapeKey,	"\xe2\x90\x9b"},
+  {fltk3::HomeKey,	"\xe2\x86\x96"}, // north west arrow
+  {fltk3::LeftKey,	"\xe2\x86\x90"}, // leftwards arrow
+  {fltk3::UpKey,	"\xe2\x86\x91"}, // upwards arrow
+  {fltk3::RightKey,	"\xe2\x86\x92"}, // rightwards arrow
+  {fltk3::DownKey,	"\xe2\x86\x93"}, // downwards arrow
+  {fltk3::PageUpKey,	"\xe2\x87\x9e"}, // upwards arrow with double stroke
+  {fltk3::PageDownKey,"\xe2\x87\x9f"}, // downwards arrow with double stroke
+  {fltk3::EndKey,	"\xe2\x86\x98"}, // south east arrow
+  {fltk3::PrintKey,	"Print"},
+  {fltk3::InsertKey,	"Insert"},
+  {fltk3::MenuKey,	"Menu"},
+  {fltk3::NumLockKey,	"Num_Lock"},
+  {fltk3::KPEnterKey,	"\xe2\x8c\xa4"}, // up arrow head between two horizontal bars
+  {fltk3::ShiftLKey,	"Shift_L"},
+  {fltk3::ShiftRKey,	"Shift_R"},
+  {fltk3::ControlLKey,"Control_L"},
+  {fltk3::ControlRKey,"Control_R"},
+  {fltk3::CapsLockKey,"\xe2\x87\xaa"}, // upwards white arrow from bar
+  {fltk3::MetaLKey,	"Meta_L"},
+  {fltk3::MetaRKey,	"Meta_R"},
+  {fltk3::AltLKey,	"Alt_L"},
+  {fltk3::AltRKey,	"Alt_R"},
+  {fltk3::DeleteKey,	"\xe2\x8c\xa7"}  // x in a rectangle box
+};
+#endif
+
+/**
+  Get a human-readable string from a shortcut value.
+
+  Unparse a shortcut value as used by fltk3::Button or fltk3::MenuItem into
+  a human-readable string like "Alt+N". This only works if the shortcut
+  is a character key or a numbered function key. If the shortcut is
+  zero then an empty string is returned. The return value points at
+  a static buffer that is overwritten with each call.
+
+  \param [in] shortcut the integer value containing the ascii character or extended keystroke plus modifiers
+  \return a pointer to a static buffer containing human readable text for the shortcut
+  */
+const char* fltk3::shortcut_label(unsigned int shortcut) {
+  return fltk3::shortcut_label(shortcut, 0L);
+}
+
+/** 
+  Get a human-readable string from a shortcut value.
+
+  \param [in] shortcut the integer value containing the ascii character or extended keystroke plus modifiers
+  \param [in] eom if this pointer is set, it will receive a pointer to the end of the modifier text
+  \return a pointer to a static buffer containing human readable text for the shortcut
+  \see fltk3::shortcut_label(unsigned int shortcut)
+  */
+const char* fltk3::shortcut_label(unsigned int shortcut, const char **eom) {
+  static char buf[20];
+  char *p = buf;
+  if (eom) *eom = p;
+  if (!shortcut) {*p = 0; return buf;}
+  // fix upper case shortcuts
+  unsigned int v = shortcut & fltk3::KEY_MASK;
+  if (((unsigned)fltk3::tolower(v))!=v) {
+    shortcut |= fltk3::SHIFT;
+  }
+#ifdef __APPLE__
+  //                        this column contains utf8 characters - v
+  if (shortcut & fltk3::SHIFT) {strcpy(p,"\xe2\x87\xa7"); p += 3;}  // upwards white arrow
+  if (shortcut & fltk3::CTRL)  {strcpy(p,"\xe2\x8c\x83"); p += 3;}  // up arrowhead
+  if (shortcut & fltk3::ALT)   {strcpy(p,"\xe2\x8c\xa5"); p += 3;}  // alternative key symbol
+  if (shortcut & fltk3::META)  {strcpy(p,"\xe2\x8c\x98"); p += 3;}  // place of interest sign
+#else
+  if (shortcut & fltk3::META) {strcpy(p,"Meta+"); p += 5;}
+  if (shortcut & fltk3::ALT) {strcpy(p,"Alt+"); p += 4;}
+  if (shortcut & fltk3::SHIFT) {strcpy(p,"Shift+"); p += 6;}
+  if (shortcut & fltk3::CTRL) {strcpy(p,"Ctrl+"); p += 5;}
+#endif // __APPLE__
+  if (eom) *eom = p;
+  unsigned int key = shortcut & fltk3::KEY_MASK;
+#if defined(WIN32) || defined(__APPLE__) // if not X
+  if (key >= fltk3::FKey && key <= fltk3::FLastKey) {
+    *p++ = 'F';
+    if (key > fltk3::FKey+9) *p++ = (key-fltk3::FKey)/10+'0';
+    *p++ = (key-fltk3::FKey)%10 + '0';
+  } else {
+    // binary search the table for a match:
+    int a = 0;
+    int b = sizeof(table)/sizeof(*table);
+    while (a < b) {
+      int c = (a+b)/2;
+      if (table[c].key == key) {
+        if (p > buf) {
+          strcpy(p,table[c].name); 
+          return buf;
+        } else {
+          const char *sp = table[c].name;
+          if (eom) *eom = sp;
+          return sp;
+        }
+      }
+      if (table[c].key < key) a = c+1;
+      else b = c;
+    }
+    if (key >= fltk3::KPKey && key <= fltk3::KPLastKey) {
+      // mark keypad keys with KP_ prefix
+      strcpy(p,"KP_"); p += 3;
+      *p++ = uchar(key & 127);
+    } else {
+      // if none found, use the keystroke as a match:
+      p += fltk3::utf8encode(fltk3::toupper(key), p); 
+    }
+  }
+  *p = 0;
+  return buf;
+#else
+  const char* q;
+  if (key == fltk3::EnterKey || key == '\r') q="Enter";  // don't use Xlib's "Return":
+  else if (key > 32 && key < 0x100) q = 0;
+  else q = XKeysymToString(key);
+  if (!q) {
+    p += fltk3::utf8encode(fltk3::toupper(key), p); 
+    *p = 0; 
+    return buf;
+  }
+  if (p > buf) {
+    strcpy(p,q); 
+    return buf;
+  } else {
+    if (eom) *eom = q;
+    return q;
+  }
+#endif
+}
+
+// Emulation of XForms named shortcuts
+#include <stdlib.h>
+/**
+  Emulation of XForms named shortcuts.
+
+  Converts ascii shortcut specifications (eg. "^c") 
+  into the FLTK integer equivalent (eg. fltk3::CTRL+'c')
+
+  These ascii characters are used to specify the various keyboard modifier keys:
+  \verbatim
+   # - Alt
+   + - Shift
+   ^ - Control
+  \endverbatim
+*/
+unsigned int fltk3::old_shortcut(const char* s) {
+  if (!s || !*s) return 0;
+  unsigned int n = 0;
+  if (*s == '#') {n |= fltk3::ALT; s++;}
+  if (*s == '+') {n |= fltk3::SHIFT; s++;}
+  if (*s == '^') {n |= fltk3::CTRL; s++;}
+  if (*s && s[1]) return n | (int)strtol(s,0,0); // allow 0xf00 to get any key
+  return n | *s;
+}
+
+// Tests for &x shortcuts in button labels:
+
+/** Returns the Unicode value of the '&x' shortcut in a given text.
+
+  The given text \p t (usually a widget's label or a menu text) is
+  searched for a '&x' shortcut label, and if found, the Unicode
+  value (code point) of the '&x' shortcut is returned.
+
+  \param t text or label to search for '&x' shortcut.
+
+  \return Unicode (UCS-4) value of shortcut in \p t or 0.
+
+  \note Internal use only.
+*/
+unsigned int fltk3::Widget::label_shortcut(const char *t) {
+  if (!t) return 0;
+  for (;;) {
+    if (*t==0) return 0;
+    if (*t=='&') {
+      unsigned int s = fltk3::utf8decode(t+1, 0, 0);
+      if (s==0) return 0;
+      else if (s==(unsigned int)'&') t++;
+      else return s;
+    }
+    t++;
+  }
+}
+
+/** Returns true if the given text \p t contains the entered '&x' shortcut.
+
+  This method must only be called in handle() methods or callbacks after
+  a keypress event (usually fltk3::KEYDOWN or fltk3::SHORTCUT). The given text
+  \p t (usually a widget's label or menu text) is searched for a '&x'
+  shortcut, and if found, this is compared with the entered key value.
+
+  fltk3::event_text() is used to get the entered key value.
+  fltk3::event_state() is used to get the Alt modifier, if \p require_alt
+  is true.
+
+  \param t text or label to search for '&x' shortcut.
+  \param require_alt if true: match only if Alt key is pressed.
+
+  \return true, if the entered text matches the '&x' shortcut in \p t
+	  false (0) otherwise.
+
+  \note Internal use only.
+*/
+int fltk3::Widget::test_shortcut(const char *t, const bool require_alt) {
+  if (!t) return 0;
+  // for menubars etc. shortcuts must work only if the Alt modifier is pressed
+  if (require_alt && fltk3::event_state(fltk3::ALT)==0) return 0;
+  unsigned int c = fltk3::utf8decode(fltk3::event_text(), fltk3::event_text()+fltk3::event_length(), 0);
+#ifdef __APPLE__
+  // this line makes underline shortcuts work the same way they do on MSWindow
+  // and Linux. 
+  if (c && fltk3::event_state(fltk3::ALT)) 
+    c = fltk3::event_key();
+#endif
+  if (!c) return 0;
+  unsigned int ls = label_shortcut(t);
+  if (c == ls)
+    return 1;
+#ifdef __APPLE__
+  // On OS X, we need to simulate the upper case keystroke as well
+  if (fltk3::event_state(fltk3::ALT) && c<128 && isalpha(c) && (unsigned)toupper(c)==ls)
+    return 1;
+#endif
+  return 0;
+}
+
+/** Returns true if the widget's label contains the entered '&x' shortcut.
+
+  This method must only be called in handle() methods or callbacks after
+  a keypress event (usually fltk3::KEYDOWN or fltk3::SHORTCUT).
+  The widget's label is searched for a '&x'
+  shortcut, and if found, this is compared with the entered key value.
+
+  fltk3::event_text() is used to get the entered key value.
+
+  \return true, if the entered text matches the widget's'&x' shortcut,
+	  false (0) otherwise.
+
+  \note Internal use only.
+*/
+
+int fltk3::Widget::test_shortcut() {
+  if (!(flags()&SHORTCUT_LABEL)) return 0;
+  return test_shortcut(label());
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_shortcut.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_show_colormap.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_show_colormap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_show_colormap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,169 @@
+//
+// "$Id$"
+//
+// Colormap color selection dialog for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/run.h>
+#include <fltk3/SingleWindow.h>
+#include <fltk3/draw.h>
+#include <fltk3/show_colormap.h>
+#include <fltk3/Wrapper.h>
+#include <config.h>
+
+#define BOXSIZE 14
+#define BORDER 4
+
+namespace fltk3 {
+  
+  /** 
+   This widget creates a modal window for selecting a color from the colormap.
+   Pretty much unchanged from Forms.
+   */
+  class ColorMenu : public fltk3::Window {
+    fltk3::Color initial;
+    fltk3::Color which, previous;
+    int done;
+    void drawbox(fltk3::Color);
+    void draw();
+    int handle(int);
+  public:
+    ColorMenu(fltk3::Color oldcol);
+    fltk3::Color run();
+  };
+  
+  ColorMenu::ColorMenu(fltk3::Color oldcol) :
+  fltk3::Window(BOXSIZE*8+1+2*BORDER, BOXSIZE*32+1+2*BORDER) {
+    clear_border();
+    set_modal();
+    initial = which = oldcol;
+  }
+  
+  void ColorMenu::drawbox(fltk3::Color c) {
+    if (c < 0 || c > 255) return;
+    int X = (c%8)*BOXSIZE+BORDER;
+    int Y = (c/8)*BOXSIZE+BORDER;
+#if BORDER_WIDTH < 3
+    if (c == which) fltk3::draw_box(fltk3::DOWN_BOX, X+1, Y+1, BOXSIZE-1, BOXSIZE-1, c);
+    else fltk3::draw_box(fltk3::BORDER_BOX, X, Y, BOXSIZE+1, BOXSIZE+1, c);
+#else
+    fltk3::draw_box(c == which ? fltk3::DOWN_BOX : fltk3::BORDER_BOX,
+                    X, Y, BOXSIZE+1, BOXSIZE+1, c);
+#endif
+  }
+  
+  void ColorMenu::draw() {
+    FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+    if (damage() != fltk3::DAMAGE_CHILD) {
+      fltk3::draw_box(fltk3::UP_BOX,0,0,w(),h(),color());
+      for (int c = 0; c < 256; c++) drawbox((fltk3::Color)c);
+    } else {
+      drawbox(previous);
+      drawbox(which);
+    }
+    previous = which;
+  }
+  
+  int ColorMenu::handle(int e) {
+    FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(e), Handle)
+    fltk3::Color c = which;
+    switch (e) {
+      case fltk3::PUSH:
+      case fltk3::DRAG: {
+        int X = (fltk3::event_x_root() - x() - BORDER);
+        if (X >= 0) X = X/BOXSIZE;
+        int Y = (fltk3::event_y_root() - y() - BORDER);
+        if (Y >= 0) Y = Y/BOXSIZE;
+        if (X >= 0 && X < 8 && Y >= 0 && Y < 32)
+          c = 8*Y + X;
+        else
+          c = initial;
+      } break;
+      case fltk3::RELEASE:
+        done = 1;
+        return 1;
+      case fltk3::KEYBOARD:
+        switch (fltk3::event_key()) {
+          case fltk3::UpKey: if (c > 7) c -= 8; break;
+          case fltk3::DownKey: if (c < 256-8) c += 8; break;
+          case fltk3::LeftKey: if (c > 0) c--; break;
+          case fltk3::RightKey: if (c < 255) c++; break;
+          case fltk3::EscapeKey: which = initial; done = 1; return 1;
+          case fltk3::KPEnterKey:
+          case fltk3::EnterKey: done = 1; return 1;
+          default: return 0;
+        }
+        break;
+      default:
+        return 0;
+    }
+    if (c != which) {
+      which = (fltk3::Color)c; damage(fltk3::DAMAGE_CHILD);
+      int bx = (c%8)*BOXSIZE+BORDER;
+      int by = (c/8)*BOXSIZE+BORDER;
+      int px = x();
+      int py = y();
+      int scr_x, scr_y, scr_w, scr_h;
+      fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+      if (px < scr_x) px = scr_x;
+      if (px+bx+BOXSIZE+BORDER >= scr_x+scr_w) px = scr_x+scr_w-bx-BOXSIZE-BORDER;
+      if (py < scr_y) py = scr_y;
+      if (py+by+BOXSIZE+BORDER >= scr_y+scr_h) py = scr_y+scr_h-by-BOXSIZE-BORDER;
+      if (px+bx < BORDER) px = BORDER-bx;
+      if (py+by < BORDER) py = BORDER-by;
+      position(px,py);
+    }
+    return 1;
+  }
+  
+  extern char fl_override_redirect; // hack for menus
+  
+#ifdef _MSC_VER
+#pragma optimize("a",off) // needed to get the done check to work
+#endif
+  fltk3::Color ColorMenu::run() {
+    if (which < 0 || which > 255) {
+      position(fltk3::event_x_root()-w()/2, fltk3::event_y_root()-y()/2);
+    } else {
+      position(fltk3::event_x_root()-(initial%8)*BOXSIZE-BOXSIZE/2-BORDER,
+               fltk3::event_y_root()-(initial/8)*BOXSIZE-BOXSIZE/2-BORDER);
+    }
+    show();
+    fltk3::grab(*this);
+    done = 0;
+    while (!done) fltk3::wait();
+    fltk3::grab(0);
+    return which;
+  }
+  
+  fltk3::Color show_colormap(fltk3::Color oldcol) {
+    ColorMenu m(oldcol);
+    return m.run();
+  }
+  
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_show_colormap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_symbols.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_symbols.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_symbols.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,714 @@
+//
+// "$Id$"
+//
+// Symbol drawing code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// These are small graphics drawn by the normal label-drawing
+// code when the string starts with an '@' sign.
+
+// Adapted from original code written by:
+
+// Written by Mark Overmars
+// Version 2.1 a
+// Date: Oct  2, 1992
+
+#include <fltk3/run.h>
+#include <fltk3/draw.h>
+#include <fltk3/math.h>
+#include "flstring.h"
+
+typedef struct {
+  const char *name;
+  void (*drawit)(fltk3::Color);
+  char scalable;
+  char notempty;
+} SYMBOL;
+
+#define MAXSYMBOL       211
+   /* Maximal number of symbols in table. Only half of them are
+      used. Should be prime. */
+
+static SYMBOL symbols[MAXSYMBOL];      /* The symbols */
+static int symbnumb = -1;              /* Their number */
+
+static int find(const char *name) {
+// returns hash entry if it exists, or first empty slot:
+  int pos = name[0] ? (
+    name[1] ? (
+      name[2] ? 71*name[0]+31*name[1]+name[2] : 31*name[0]+name[1]
+    ) :
+      name[0]
+  ) : 0;
+  pos %= MAXSYMBOL;
+  int hh2 = name[0] ? (
+    (name[1]) ? 51*name[0]+3*name[1] : 3*name[0]
+    ) : 1;
+  hh2 %= MAXSYMBOL; if (!hh2) hh2 = 1;
+  for (;;) {
+    if (!symbols[pos].notempty) return pos;
+    if (!strcmp(symbols[pos].name,name)) return pos;
+    pos = (pos + hh2) % MAXSYMBOL;
+  }
+}
+
+static void fl_init_symbols(void);
+
+/**************** The routines seen by the user *************************/
+
+/**
+  Adds a symbol to the system.
+  \param[in] name     name of symbol (without the "@")
+  \param[in] drawit   function to draw symbol
+  \param[in] scalable set to 1 if \p drawit uses scalable vector drawing
+  \returns 1 on success, 0 on failure
+  */
+int fltk3::add_symbol(const char *name, void (*drawit)(fltk3::Color), int scalable)
+{
+  fl_init_symbols();
+  int pos;
+  if (symbnumb > MAXSYMBOL / 2) return 0;	// table is full
+  pos = find(name);
+  symbols[pos].name = name;
+  symbols[pos].drawit = drawit;
+  symbols[pos].notempty = 1;
+  symbols[pos].scalable = scalable;
+  symbnumb++;
+  return 1;
+}
+
+int fl_return_arrow(int x,int y,int w,int h);
+
+/**
+  Draw the named symbol in the given rectangle using the given color
+  \param[in] label name of symbol
+  \param[in] x,y   position of symbol
+  \param[in] w,h   size of symbol
+  \param[in] col   color of symbox
+  \returns 1 on success, 0 on failure
+  */
+// provided for back compatibility:
+int fltk3::draw_symbol(const char *label,int x,int y,int w,int h,fltk3::Color col) {  
+  const char *p = label;
+  if (*p++ != '@') return 0;
+  fl_init_symbols();
+  int equalscale = 0;
+  if (*p == '#') {equalscale = 1; p++;}
+  if (*p == '-' && p[1]>='1' && p[1]<='9') {
+    int n = p[1]-'0';
+    x += n; y += n; w -= 2*n; h -= 2*n;
+    p += 2;
+  } else if (*p == '+' && p[1]>='1' && p[1]<='9') {
+    int n = p[1]-'0';
+    x -= n; y -= n; w += 2*n; h += 2*n;
+    p += 2;
+  }
+  if (w < 10) {x -= (10-w)/2; w = 10;}
+  if (h < 10) {y -= (10-h)/2; h = 10;}
+  w = (w-1)|1; h = (h-1)|1;
+  char flip_x = 0, flip_y = 0;
+  if (*p=='$') {
+    flip_x = 1;
+    p++;
+  }
+  if (*p=='%') {
+    flip_y = 1;
+    p++;
+  }
+  int rotangle;
+  switch (*p++) {
+  case '0':
+    rotangle = 1000*(p[1]-'0') + 100*(p[2]-'0') + 10*(p[3]-'0');
+    p += 4;
+    break;
+  case '1': rotangle = 2250; break;
+  case '2': rotangle = 2700; break;
+  case '3': rotangle = 3150; break;
+  case '4': rotangle = 1800; break;
+  case '5':
+  case '6': rotangle = 0; break;
+  case '7': rotangle = 1350; break;
+  case '8': rotangle =  900; break;
+  case '9': rotangle =  450; break;
+  default: rotangle = 0; p--; break;
+  }
+  int pos = find(p);
+  if (!symbols[pos].notempty) return 0;
+  if (symbols[pos].scalable == 3) { // kludge to detect return arrow
+    fl_return_arrow(x,y,w,h);
+    return 1;
+  }
+  fltk3::push_matrix();
+  fltk3::translate(x+w/2,y+h/2);
+  if (symbols[pos].scalable) {
+    if (equalscale) {if (w<h) h = w; else w = h;}
+    fltk3::scale(0.5*w, 0.5*h);
+    fltk3::rotate(rotangle/10.0);
+    if (flip_x) fltk3::scale(-1.0, 1.0);
+    if (flip_y) fltk3::scale(1.0, -1.0);
+  }
+  (symbols[pos].drawit)(col);
+  fltk3::pop_matrix();
+  return 1;
+}
+
+/******************** THE DEFAULT SYMBOLS ****************************/
+
+/* Some help stuff */
+
+#define BP fltk3::begin_polygon()
+#define EP fltk3::end_polygon()
+#define BCP fltk3::begin_complex_polygon()
+#define ECP fltk3::end_complex_polygon()
+#define BL fltk3::begin_line()
+#define EL fltk3::end_line()
+#define BC fltk3::begin_loop()
+#define EC fltk3::end_loop()
+#define vv(x,y) fltk3::vertex(x,y)
+
+//for the outline color
+static void set_outline_color(fltk3::Color c) {
+  fltk3::color(fltk3::darker(c));
+}
+
+static void rectangle(double x,double y,double x2,double y2,fltk3::Color col) {
+  fltk3::color(col);
+  BP; vv(x,y); vv(x2,y); vv(x2,y2); vv(x,y2); EP;
+  set_outline_color(col);
+  BC; vv(x,y); vv(x2,y); vv(x2,y2); vv(x,y2); EC;
+}
+
+/* The drawing routines */
+
+static void draw_fltk(fltk3::Color col) 
+{
+  fltk3::color(col);
+  // F fill
+  BCP; vv(-2.0, -0.5); vv(-1.0, -0.5); vv(-1.0, -0.3); vv(-1.8, -0.3);
+  vv(-1.8, -0.1); vv(-1.2, -0.1); vv(-1.2, 0.1); vv(-1.8, 0.1);
+  vv(-1.8, 0.5); vv(-2.0, 0.5); ECP;
+  // L fill
+  BCP; vv(-1.0, -0.5); vv(-0.8, -0.5); vv(-0.8, 0.3); vv(0.0, 0.3);
+  vv(0.0, 0.5); vv(-1.0, 0.5); ECP;
+  // T outline
+  BCP; vv(-0.1, -0.5); vv(1.1, -0.5); vv(1.1, -0.3); vv(0.6, -0.3);
+  vv(0.6, 0.5); vv(0.4, 0.5); vv(0.4, -0.3); vv(-0.1, -0.3); ECP;
+  // K outline
+  BCP; vv(1.1, -0.5); vv(1.3, -0.5); vv(1.3, -0.15); vv(1.70, -0.5);
+  vv(2.0, -0.5); vv(1.43, 0.0); vv(2.0, 0.5); vv(1.70, 0.5);
+  vv(1.3, 0.15); vv(1.3, 0.5); vv(1.1, 0.5); ECP;
+  set_outline_color(col);
+  // F outline
+  BC; vv(-2.0, -0.5); vv(-1.0, -0.5); vv(-1.0, -0.3); vv(-1.8, -0.3);
+  vv(-1.8, -0.1); vv(-1.2, -0.1); vv(-1.2, 0.1); vv(-1.8, 0.1);
+  vv(-1.8, 0.5); vv(-2.0, 0.5); EC;
+  // L outline
+  BC; vv(-1.0, -0.5); vv(-0.8, -0.5); vv(-0.8, 0.3); vv(0.0, 0.3);
+  vv(0.0, 0.5); vv(-1.0, 0.5); EC;
+  // T outline
+  BC; vv(-0.1, -0.5); vv(1.1, -0.5); vv(1.1, -0.3); vv(0.6, -0.3);
+  vv(0.6, 0.5); vv(0.4, 0.5); vv(0.4, -0.3); vv(-0.1, -0.3); EC;
+  // K outline
+  BC; vv(1.1, -0.5); vv(1.3, -0.5); vv(1.3, -0.15); vv(1.70, -0.5);
+  vv(2.0, -0.5); vv(1.43, 0.0); vv(2.0, 0.5); vv(1.70, 0.5);
+  vv(1.3, 0.15); vv(1.3, 0.5); vv(1.1, 0.5); EC;
+}
+
+static void draw_search(fltk3::Color col) 
+{
+  fltk3::color(col);
+  BP; vv(-.4, .13); vv(-1.0, .73); vv(-.73, 1.0); vv(-.13, .4); EP;
+  set_outline_color(col);
+  fltk3::line_style(fltk3::SOLID, 3, 0);
+  BC; fltk3::circle(.2, -.2, .6); EC;
+  fltk3::line_style(fltk3::SOLID, 1, 0);
+  BC; vv(-.4, .13); vv(-1.0, .73); vv(-.73, 1.0); vv(-.13, .4); EC;
+}
+
+static void draw_arrow1(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(-0.8,-0.4); vv(-0.8,0.4); vv(0.0,0.4); vv(0.0,-0.4); EP;
+  BP; vv(0.0,0.8); vv(0.8,0.0); vv(0.0,-0.8); vv(0.0,-0.4); vv(0.0,0.4); EP;
+  set_outline_color(col);
+  BC; vv(-0.8,-0.4); vv(-0.8,0.4); vv(0.0,0.4); vv(0.0,0.8); vv(0.8,0.0);
+      vv(0.0,-0.8); vv(0.0,-0.4); EC;
+}
+
+static void draw_arrow1bar(fltk3::Color col)
+{
+  draw_arrow1(col);
+  rectangle(.6,-.8,.9,.8,col);
+}
+
+static void draw_arrow2(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(-0.3,0.8); vv(0.50,0.0); vv(-0.3,-0.8); EP;
+  set_outline_color(col);
+  BC; vv(-0.3,0.8); vv(0.50,0.0); vv(-0.3,-0.8); EC;
+}
+
+static void draw_arrow3(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EP;
+  BP; vv(-0.7,0.8); vv(0.1,0.0); vv(-0.7,-0.8); EP;
+  set_outline_color(col);
+  BC; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EC;
+  BC; vv(-0.7,0.8); vv(0.1,0.0); vv(-0.7,-0.8); EC;
+}
+
+static void draw_arrowbar(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EP;
+  BP; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EP;
+  set_outline_color(col);
+  BC; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EC;
+  BC; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EC;
+}
+
+static void draw_arrowbox(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EP;
+  BC; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EC;
+  set_outline_color(col);
+  BC; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EC;
+  BC; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EC;
+}
+
+static void draw_bararrow(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EP;
+  BP; vv(-0.5,0.8); vv(-0.1,0.8); vv(-0.1,-0.8); vv(-0.5,-0.8); EP;
+  set_outline_color(col);
+  BC; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EC;
+  BC; vv(-0.5,0.8); vv(-0.1,0.8); vv(-0.1,-0.8); vv(-0.5,-0.8); EC;
+}
+
+static void draw_doublebar(fltk3::Color col) { 
+  rectangle(-0.6,-0.8,-.1,.8,col);
+  rectangle(.1,-0.8,.6,.8,col); 
+}
+
+static void draw_arrow01(fltk3::Color col)
+  { fltk3::rotate(180); draw_arrow1(col); }
+
+static void draw_arrow02(fltk3::Color col)
+  { fltk3::rotate(180); draw_arrow2(col); }
+
+static void draw_arrow03(fltk3::Color col)
+  { fltk3::rotate(180); draw_arrow3(col); }
+
+static void draw_0arrowbar(fltk3::Color col)
+  { fltk3::rotate(180); draw_arrowbar(col); }
+
+static void draw_0arrowbox(fltk3::Color col)
+  { fltk3::rotate(180); draw_arrowbox(col); }
+
+static void draw_0bararrow(fltk3::Color col)
+  { fltk3::rotate(180); draw_bararrow(col); }
+
+static void draw_doublearrow(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(-0.35,-0.4); vv(-0.35,0.4); vv(0.35,0.4); vv(0.35,-0.4); EP;
+  BP; vv(0.15,0.8); vv(0.95,0.0); vv(0.15,-0.8); EP;
+  BP; vv(-0.15,0.8); vv(-0.95,0.0); vv(-0.15,-0.8); EP;
+  set_outline_color(col);
+  BC; vv(-0.15,0.4); vv(0.15,0.4); vv(0.15,0.8); vv(0.95,0.0);
+      vv(0.15,-0.8); vv(0.15,-0.4); vv(-0.15,-0.4); vv(-0.15,-0.8);
+      vv(-0.95,0.0); vv(-0.15,0.8); EC;
+}
+
+static void draw_arrow(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(0.65,0.1); vv(1.0,0.0); vv(0.65,-0.1); EP;
+  BL; vv(-1.0,0.0); vv(0.65,0.0); EL;
+  set_outline_color(col);
+  BL; vv(-1.0,0.0); vv(0.65,0.0); EL;
+  BC; vv(0.65,0.1); vv(1.0,0.0); vv(0.65,-0.1); EC;
+}
+
+static void draw_square(fltk3::Color col)
+  { rectangle(-1,-1,1,1,col); }
+
+static void draw_circle(fltk3::Color col) {
+  fltk3::color(col); BP; fltk3::circle(0,0,1); EP;
+  set_outline_color(col);
+  BC; fltk3::circle(0,0,1); EC;
+}
+
+static void draw_line(fltk3::Color col)
+  { fltk3::color(col); BL; vv(-1.0,0.0); vv(1.0,0.0); EL; }
+
+static void draw_plus(fltk3::Color col)
+{
+  fltk3::color(col);
+  BP; vv(-0.9,-0.15); vv(-0.9,0.15); vv(0.9,0.15); vv(0.9,-0.15); EP;
+  BP; vv(-0.15,-0.9); vv(-0.15,0.9); vv(0.15,0.9); vv(0.15,-0.9); EP;
+  set_outline_color(col);
+  BC;
+  vv(-0.9,-0.15); vv(-0.9,0.15); vv(-0.15,0.15); vv(-0.15,0.9);
+  vv(0.15,0.9); vv(0.15,0.15); vv(0.9,0.15); vv(0.9,-0.15);
+  vv(0.15,-0.15); vv(0.15,-0.9); vv(-0.15,-0.9); vv(-0.15,-0.15);
+  EC;
+}
+
+static void draw_uparrow(fltk3::Color) {
+  fltk3::color(fltk3::LIGHT3);
+  BL; vv(-.8,.8); vv(-.8,-.8); vv(.8,0); EL;
+  fltk3::color(fltk3::DARK3);
+  BL; vv(-.8,.8); vv(.8, 0); EL;
+}
+
+static void draw_downarrow(fltk3::Color) {
+  fltk3::color(fltk3::DARK3);
+  BL; vv(-.8,.8); vv(-.8,-.8); vv(.8,0); EL;
+  fltk3::color(fltk3::LIGHT3);
+  BL; vv(-.8,.8); vv(.8, 0); EL;
+}
+
+static void draw_menu(fltk3::Color col)
+{
+  rectangle(-0.65, 0.85, 0.65, -0.25, col);
+  rectangle(-0.65, -0.6, 0.65, -1.0, col);
+}
+
+// Standard UI icons...
+static void draw_filenew(fltk3::Color c) {
+  fltk3::color(c);
+  BCP;
+    vv(-0.7, -1.0);
+    vv(0.1, -1.0);
+    vv(0.1, -0.4);
+    vv(0.7, -0.4);
+    vv(0.7, 1.0);
+    vv(-0.7, 1.0);
+  ECP;
+
+  fltk3::color(fltk3::lighter(c));
+  BP;
+    vv(0.1, -1.0);
+    vv(0.1, -0.4);
+    vv(0.7, -0.4);
+  EP;
+
+  fltk3::color(fltk3::darker(c));
+  BC;
+    vv(-0.7, -1.0);
+    vv(0.1, -1.0);
+    vv(0.1, -0.4);
+    vv(0.7, -0.4);
+    vv(0.7, 1.0);
+    vv(-0.7, 1.0);
+  EC;
+
+  BL;
+    vv(0.1, -1.0);
+    vv(0.7, -0.4);
+  EL;
+}
+
+static void draw_fileopen(fltk3::Color c) {
+  fltk3::color(c);
+  BP;
+    vv(-1.0, -0.7);
+    vv(-0.9, -0.8);
+    vv(-0.4, -0.8);
+    vv(-0.3, -0.7);
+    vv(0.6, -0.7);
+    vv(0.6, 0.7);
+    vv(-1.0, 0.7);
+  EP;
+
+  fltk3::color(fltk3::darker(c));
+  BC;
+    vv(-1.0, -0.7);
+    vv(-0.9, -0.8);
+    vv(-0.4, -0.8);
+    vv(-0.3, -0.7);
+    vv(0.6, -0.7);
+    vv(0.6, 0.7);
+    vv(-1.0, 0.7);
+  EC;
+
+  fltk3::color(fltk3::lighter(c));
+  BP;
+    vv(-1.0, 0.7);
+    vv(-0.6, -0.3);
+    vv(1.0, -0.3);
+    vv(0.6, 0.7);
+  EP;
+
+  fltk3::color(fltk3::darker(c));
+  BC;
+    vv(-1.0, 0.7);
+    vv(-0.6, -0.3);
+    vv(1.0, -0.3);
+    vv(0.6, 0.7);
+  EC;
+}
+
+static void draw_filesave(fltk3::Color c) {
+  fltk3::color(c);
+  BP;
+    vv(-0.9, -1.0);
+    vv(0.9, -1.0);
+    vv(1.0, -0.9);
+    vv(1.0, 0.9);
+    vv(0.9, 1.0);
+    vv(-0.9, 1.0);
+    vv(-1.0, 0.9);
+    vv(-1.0, -0.9);
+  EP;
+
+  fltk3::color(fltk3::lighter(c));
+  BP;
+    vv(-0.7, -1.0);
+    vv(0.7, -1.0);
+    vv(0.7, -0.4);
+    vv(-0.7, -0.4);
+  EP;
+
+  BP;
+    vv(-0.7, 0.0);
+    vv(0.7, 0.0);
+    vv(0.7, 1.0);
+    vv(-0.7, 1.0);
+  EP;
+
+  fltk3::color(c);
+  BP;
+    vv(-0.5, -0.9);
+    vv(-0.3, -0.9);
+    vv(-0.3, -0.5);
+    vv(-0.5, -0.5);
+  EP;
+
+  fltk3::color(fltk3::darker(c));
+  BC;
+    vv(-0.9, -1.0);
+    vv(0.9, -1.0);
+    vv(1.0, -0.9);
+    vv(1.0, 0.9);
+    vv(0.9, 1.0);
+    vv(-0.9, 1.0);
+    vv(-1.0, 0.9);
+    vv(-1.0, -0.9);
+  EC;
+}
+
+static void draw_filesaveas(fltk3::Color c) {
+  draw_filesave(c);
+
+  fltk3::color(fltk3::color_average(c, fltk3::WHITE, 0.25f));
+  BP;
+    vv(0.6, -0.8);
+    vv(1.0, -0.4);
+    vv(0.0, 0.6);
+    vv(-0.4, 0.6);
+    vv(-0.4, 0.2);
+  EP;
+
+  fltk3::color(fltk3::darker(c));
+  BC;
+    vv(0.6, -0.8);
+    vv(1.0, -0.4);
+    vv(0.0, 0.6);
+    vv(-0.4, 0.6);
+    vv(-0.4, 0.2);
+  EC;
+
+  BP;
+    vv(-0.1, 0.6);
+    vv(-0.4, 0.6);
+    vv(-0.4, 0.3);
+  EP;
+}
+
+static void draw_fileprint(fltk3::Color c) {
+  fltk3::color(c);
+  BP;
+    vv(-0.8, 0.0);
+    vv(0.8, 0.0);
+    vv(1.0, 0.2);
+    vv(1.0, 1.0);
+    vv(-1.0, 1.0);
+    vv(-1.0, 0.2);
+  EP;
+
+  fltk3::color(fltk3::color_average(c, fltk3::WHITE, 0.25f));
+  BP;
+    vv(-0.6, 0.0);
+    vv(-0.6, -1.0);
+    vv(0.6, -1.0);
+    vv(0.6, 0.0);
+  EP;
+
+  fltk3::color(fltk3::lighter(c));
+  BP;
+    vv(-0.6, 0.6);
+    vv(0.6, 0.6);
+    vv(0.6, 1.0);
+    vv(-0.6, 1.0);
+  EP;
+
+  fltk3::color(fltk3::darker(c));
+  BC;
+    vv(-0.8, 0.0);
+    vv(-0.6, 0.0);
+    vv(-0.6, -1.0);
+    vv(0.6, -1.0);
+    vv(0.6, 0.0);
+    vv(0.8, 0.0);
+    vv(1.0, 0.2);
+    vv(1.0, 1.0);
+    vv(-1.0, 1.0);
+    vv(-1.0, 0.2);
+  EC;
+
+  BC;
+    vv(-0.6, 0.6);
+    vv(0.6, 0.6);
+    vv(0.6, 1.0);
+    vv(-0.6, 1.0);
+  EC;
+}
+
+static void draw_round_arrow(fltk3::Color c, float da=5.0) {
+  double a, r, dr1=0.005, dr2=0.015;
+  int i, j;
+  for (j=0; j<2; j++) {
+    if (j&1) {
+      fltk3::color(c);
+      set_outline_color(c);
+      BC;
+    } else {
+      fltk3::color(c);
+      BCP;
+    }
+    vv(-0.1, 0.0);
+    vv(-1.0, 0.0);
+    vv(-1.0, 0.9);
+    for (i=27, a=140.0, r=1.0; i>0; i--, a-=da, r-=dr1) {
+      double ar = a/180.0 * M_PI;
+      vv(cos(ar)*r, sin(ar)*r);
+    }
+    for (i=27; i>=0; a+=da, i--, r-=dr2) {
+      double ar = a/180.0 * M_PI;
+      vv(cos(ar)*r, sin(ar)*r);
+    }
+    if (j&1) {
+      EC;
+    } else {
+      ECP;
+    }
+  }
+}
+
+static void draw_refresh(fltk3::Color c) {
+  draw_round_arrow(c);
+  fltk3::rotate(180.0);
+  draw_round_arrow(c);
+  fltk3::rotate(-180.0);
+}
+
+static void draw_reload(fltk3::Color c) {
+  fltk3::rotate(-135.0);
+  draw_round_arrow(c, 10);
+  fltk3::rotate(135.0);
+}
+
+static void draw_undo(fltk3::Color c) {
+  fltk3::translate(0.0, 0.2);
+  fltk3::scale(1.0, -1.0);
+  draw_round_arrow(c, 6);
+  fltk3::scale(1.0, -1.0);
+  fltk3::translate(0.0, -0.2);
+}
+
+static void draw_redo(fltk3::Color c) {
+  fltk3::scale(-1.0, 1.0);
+  draw_undo(c);
+  fltk3::scale(-1.0, 1.0);
+}
+
+static void fl_init_symbols(void) {
+  static char beenhere;
+  if (beenhere) return;
+  beenhere = 1;
+  symbnumb = 0;
+
+  fltk3::add_symbol("",		draw_arrow1,		1);
+  fltk3::add_symbol("->",		draw_arrow1,		1);
+  fltk3::add_symbol(">",		draw_arrow2,		1);
+  fltk3::add_symbol(">>",		draw_arrow3,		1);
+  fltk3::add_symbol(">|",		draw_arrowbar,		1);
+  fltk3::add_symbol(">[]",		draw_arrowbox,		1);
+  fltk3::add_symbol("|>",		draw_bararrow,		1);
+  fltk3::add_symbol("<-",		draw_arrow01,		1);
+  fltk3::add_symbol("<",		draw_arrow02,		1);
+  fltk3::add_symbol("<<",		draw_arrow03,		1);
+  fltk3::add_symbol("|<",		draw_0arrowbar,		1);
+  fltk3::add_symbol("[]<",		draw_0arrowbox,		1);
+  fltk3::add_symbol("<|",		draw_0bararrow,		1);
+  fltk3::add_symbol("<->",		draw_doublearrow,	1);
+  fltk3::add_symbol("-->",		draw_arrow,		1);
+  fltk3::add_symbol("+",		draw_plus,		1);
+  fltk3::add_symbol("->|",		draw_arrow1bar,		1);
+  fltk3::add_symbol("arrow",	draw_arrow,		1);
+  fltk3::add_symbol("returnarrow",	0,			3);
+  fltk3::add_symbol("square",	draw_square,		1);
+  fltk3::add_symbol("circle",	draw_circle,		1);
+  fltk3::add_symbol("line",		draw_line,		1);
+  fltk3::add_symbol("plus",		draw_plus,		1);
+  fltk3::add_symbol("menu",		draw_menu,		1);
+  fltk3::add_symbol("UpArrow",	draw_uparrow,		1);
+  fltk3::add_symbol("DnArrow",	draw_downarrow,		1);
+  fltk3::add_symbol("||",		draw_doublebar,		1);
+  fltk3::add_symbol("search",       draw_search,            1);
+  fltk3::add_symbol("FLTK",         draw_fltk,              1);
+
+  fltk3::add_symbol("filenew",      draw_filenew,           1);
+  fltk3::add_symbol("fileopen",     draw_fileopen,          1);
+  fltk3::add_symbol("filesave",     draw_filesave,          1);
+  fltk3::add_symbol("filesaveas",   draw_filesaveas,        1);
+  fltk3::add_symbol("fileprint",    draw_fileprint,         1);
+
+  fltk3::add_symbol("refresh",      draw_refresh,           1);
+  fltk3::add_symbol("reload",       draw_reload,            1);
+  fltk3::add_symbol("undo",         draw_undo,              1);
+  fltk3::add_symbol("redo",         draw_redo,              1);
+
+//  fltk3::add_symbol("file",      draw_file,           1);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_symbols.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_utf.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_utf.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_utf.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,995 @@
+/*
+ * "$Id$"
+ *
+ * This is the utf.c file from fltk2 adapted for use in my fltk1.1 port
+ */
+/* Copyright 2006-2011 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/* Modified to obey rfc3629, which limits unicode to 0-0x10ffff */
+
+#include <fltk3/utf8.h>
+#include <string.h>
+#include <stdlib.h>
+
+/** \addtogroup fl_unicode
+    @{
+*/
+
+
+#if 0
+  /**
+   \defgroup fl_unichar Unicode Character Functions
+   Global Functions Handling Single Unicode Characters
+   @{ */
+
+  /**
+   Converts a Unicode character into a utf-8 sequence.
+   \param[in] uc Unicode character
+   \param[out] text utf-8 sequence will be written here; if this pointer is
+   \c NULL, only the length of the utf-8 sequence is calculated
+   \return length of the sequence in bytes
+   */
+  /* FLTK3_EXPORT int fl_unichar_to_utf8(unsigned int uc, char *text); */
+
+  /** @} */
+
+  /**
+   \defgroup fl_utf8 Unicode String Functions
+   Global Functions Handling Unicode Text
+   @{ */
+
+  /**
+   Calculate the size of a utf-8 sequence for a Unicode character.
+   \param[in] uc Unicode character
+   \return length of the sequence in bytes
+   */
+  /* FLTK3_EXPORT int fl_utf8_size(unsigned int uc); */
+
+  /** @} */
+#endif /* 0 */
+
+/*!Set to 1 to turn bad UTF8 bytes into ISO-8859-1. If this is to zero
+   they are instead turned into the Unicode REPLACEMENT CHARACTER, of
+   value 0xfffd.
+   If this is on fltk3::utf8decode() will correctly map most (perhaps all)
+   human-readable text that is in ISO-8859-1. This may allow you
+   to completely ignore character sets in your code because virtually
+   everything is either ISO-8859-1 or UTF-8.
+*/
+#define ERRORS_TO_ISO8859_1 1
+
+/*!Set to 1 to turn bad UTF8 bytes in the 0x80-0x9f range into the
+   Unicode index for Microsoft's CP1252 character set. You should
+   also set ERRORS_TO_ISO8859_1. With this a huge amount of more
+   available text (such as all web pages) are correctly converted
+   to Unicode.
+*/
+#define ERRORS_TO_CP1252 1
+
+/*!A number of Unicode code points are in fact illegal and should not
+   be produced by a UTF-8 converter. Turn this on will replace the
+   bytes in those encodings with errors. If you do this then converting
+   arbitrary 16-bit data to UTF-8 and then back is not an identity,
+   which will probably break a lot of software.
+*/
+#define STRICT_RFC3629 0
+
+#if ERRORS_TO_CP1252
+/* Codes 0x80..0x9f from the Microsoft CP1252 character set, translated
+ * to Unicode:
+ */
+static unsigned short cp1252[32] = {
+  0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x017d, 0x008f,
+  0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+  0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x017e, 0x0178
+};
+#endif
+
+/*! Decode a single UTF-8 encoded character starting at \e p. The
+    resulting Unicode value (in the range 0-0x10ffff) is returned,
+    and \e len is set to the number of bytes in the UTF-8 encoding
+    (adding \e len to \e p will point at the next character).
+
+    If \p p points at an illegal UTF-8 encoding, including one that
+    would go past \e end, or where a code is uses more bytes than
+    necessary, then *(unsigned char*)p is translated as though it is
+    in the Microsoft CP1252 character set and \e len is set to 1.
+    Treating errors this way allows this to decode almost any
+    ISO-8859-1 or CP1252 text that has been mistakenly placed where
+    UTF-8 is expected, and has proven very useful.
+
+    If you want errors to be converted to error characters (as the
+    standards recommend), adding a test to see if the length is
+    unexpectedly 1 will work:
+
+    \code
+    if (*p & 0x80) {              // what should be a multibyte encoding
+      code = fltk3::utf8decode(p,end,&len);
+      if (len<2) code = 0xFFFD;   // Turn errors into REPLACEMENT CHARACTER
+    } else {                      // handle the 1-byte utf8 encoding:
+      code = *p;
+      len = 1;
+    }
+    \endcode
+
+    Direct testing for the 1-byte case (as shown above) will also
+    speed up the scanning of strings where the majority of characters
+    are ASCII.
+*/
+unsigned fltk3::utf8decode(const char* p, const char* end, int* len)
+{
+  unsigned char c = *(unsigned char*)p;
+  if (c < 0x80) {
+    if (len) *len = 1;
+    return c;
+#if ERRORS_TO_CP1252
+  } else if (c < 0xa0) {
+    if (len) *len = 1;
+    return cp1252[c-0x80];
+#endif
+  } else if (c < 0xc2) {
+    goto FAIL;
+  }
+  if ( (end && p+1 >= end) || (p[1]&0xc0) != 0x80) goto FAIL;
+  if (c < 0xe0) {
+    if (len) *len = 2;
+    return
+      ((p[0] & 0x1f) << 6) +
+      ((p[1] & 0x3f));
+  } else if (c == 0xe0) {
+    if (((unsigned char*)p)[1] < 0xa0) goto FAIL;
+    goto UTF8_3;
+#if STRICT_RFC3629
+  } else if (c == 0xed) {
+    /* RFC 3629 says surrogate chars are illegal. */
+    if (((unsigned char*)p)[1] >= 0xa0) goto FAIL;
+    goto UTF8_3;
+  } else if (c == 0xef) {
+    /* 0xfffe and 0xffff are also illegal characters */
+    if (((unsigned char*)p)[1]==0xbf &&
+	((unsigned char*)p)[2]>=0xbe) goto FAIL;
+    goto UTF8_3;
+#endif
+  } else if (c < 0xf0) {
+  UTF8_3:
+    if ( (end && p+2 >= end) || (p[2]&0xc0) != 0x80) goto FAIL;
+    if (len) *len = 3;
+    return
+      ((p[0] & 0x0f) << 12) +
+      ((p[1] & 0x3f) << 6) +
+      ((p[2] & 0x3f));
+  } else if (c == 0xf0) {
+    if (((unsigned char*)p)[1] < 0x90) goto FAIL;
+    goto UTF8_4;
+  } else if (c < 0xf4) {
+  UTF8_4:
+    if ( (end && p+3 >= end) || (p[2]&0xc0) != 0x80 || (p[3]&0xc0) != 0x80) goto FAIL;
+    if (len) *len = 4;
+#if STRICT_RFC3629
+    /* RFC 3629 says all codes ending in fffe or ffff are illegal: */
+    if ((p[1]&0xf)==0xf &&
+	((unsigned char*)p)[2] == 0xbf &&
+	((unsigned char*)p)[3] >= 0xbe) goto FAIL;
+#endif
+    return
+      ((p[0] & 0x07) << 18) +
+      ((p[1] & 0x3f) << 12) +
+      ((p[2] & 0x3f) << 6) +
+      ((p[3] & 0x3f));
+  } else if (c == 0xf4) {
+    if (((unsigned char*)p)[1] > 0x8f) goto FAIL; /* after 0x10ffff */
+    goto UTF8_4;
+  } else {
+  FAIL:
+    if (len) *len = 1;
+#if ERRORS_TO_ISO8859_1
+    return c;
+#else
+    return 0xfffd; /* Unicode REPLACEMENT CHARACTER */
+#endif
+  }
+}
+
+/*! Move \p p forward until it points to the start of a UTF-8
+  character. If it already points at the start of one then it
+  is returned unchanged. Any UTF-8 errors are treated as though each
+  byte of the error is an individual character.
+
+  \e start is the start of the string and is used to limit the
+  backwards search for the start of a utf8 character.
+
+  \e end is the end of the string and is assumed to be a break
+  between characters. It is assumed to be greater than p.
+
+  This function is for moving a pointer that was jumped to the
+  middle of a string, such as when doing a binary search for
+  a position. You should use either this or fltk3::utf8back() depending
+  on which direction your algorithim can handle the pointer
+  moving. Do not use this to scan strings, use fltk3::utf8decode()
+  instead.
+*/
+const char* fltk3::utf8fwd(const char* p, const char* start, const char* end)
+{
+  const char* a;
+  int len;
+  /* if we are not pointing at a continuation character, we are done: */
+  if ((*p&0xc0) != 0x80) return p;
+  /* search backwards for a 0xc0 starting the character: */
+  for (a = p-1; ; --a) {
+    if (a < start) return p;
+    if (!(a[0]&0x80)) return p;
+    if ((a[0]&0x40)) break;
+  }
+  fltk3::utf8decode(a,end,&len);
+  a += len;
+  if (a > p) return a;
+  return p;
+}
+
+/*! Move \p p backward until it points to the start of a UTF-8
+  character. If it already points at the start of one then it
+  is returned unchanged. Any UTF-8 errors are treated as though each
+  byte of the error is an individual character.
+
+  \e start is the start of the string and is used to limit the
+  backwards search for the start of a UTF-8 character.
+
+  \e end is the end of the string and is assumed to be a break
+  between characters. It is assumed to be greater than p.
+
+  If you wish to decrement a UTF-8 pointer, pass p-1 to this.
+*/
+const char* fltk3::utf8back(const char* p, const char* start, const char* end)
+{
+  const char* a;
+  int len;
+  /* if we are not pointing at a continuation character, we are done: */
+  if ((*p&0xc0) != 0x80) return p;
+  /* search backwards for a 0xc0 starting the character: */
+  for (a = p-1; ; --a) {
+    if (a < start) return p;
+    if (!(a[0]&0x80)) return p;
+    if ((a[0]&0x40)) break;
+  }
+  fltk3::utf8decode(a,end,&len);
+  if (a+len > p) return a;
+  return p;
+}
+
+/*! Returns number of bytes that utf8encode() will use to encode the
+  character \p ucs. */
+int fltk3::utf8bytes(unsigned ucs) {
+  if (ucs < 0x000080U) {
+    return 1;
+  } else if (ucs < 0x000800U) {
+    return 2;
+  } else if (ucs < 0x010000U) {
+    return 3;
+  } else if (ucs <= 0x10ffffU) {
+    return 4;
+  } else {
+    return 3; /* length of the illegal character encoding */
+  }
+}
+
+/*! Write the UTF-8 encoding of \e ucs into \e buf and return the
+    number of bytes written. Up to 4 bytes may be written. If you know
+    that \p ucs is less than 0x10000 then at most 3 bytes will be written.
+    If you wish to speed this up, remember that anything less than 0x80
+    is written as a single byte.
+
+    If ucs is greater than 0x10ffff this is an illegal character
+    according to RFC 3629. These are converted as though they are
+    0xFFFD (REPLACEMENT CHARACTER).
+
+    RFC 3629 also says many other values for \p ucs are illegal (in
+    the range 0xd800 to 0xdfff, or ending with 0xfffe or
+    0xffff). However I encode these as though they are legal, so that
+    utf8encode/fltk3::utf8decode will be the identity for all codes between 0
+    and 0x10ffff.
+*/
+int fltk3::utf8encode(unsigned ucs, char* buf) {
+  if (ucs < 0x000080U) {
+    buf[0] = ucs;
+    return 1;
+  } else if (ucs < 0x000800U) {
+    buf[0] = 0xc0 | (ucs >> 6);
+    buf[1] = 0x80 | (ucs & 0x3F);
+    return 2;
+  } else if (ucs < 0x010000U) {
+    buf[0] = 0xe0 | (ucs >> 12);
+    buf[1] = 0x80 | ((ucs >> 6) & 0x3F);
+    buf[2] = 0x80 | (ucs & 0x3F);
+    return 3;
+  } else if (ucs <= 0x0010ffffU) {
+    buf[0] = 0xf0 | (ucs >> 18);
+    buf[1] = 0x80 | ((ucs >> 12) & 0x3F);
+    buf[2] = 0x80 | ((ucs >> 6) & 0x3F);
+    buf[3] = 0x80 | (ucs & 0x3F);
+    return 4;
+  } else {
+    /* encode 0xfffd: */
+    buf[0] = 0xefU;
+    buf[1] = 0xbfU;
+    buf[2] = 0xbdU;
+    return 3;
+  }
+}
+
+/*! Convert a single 32-bit Unicode codepoint into an array of 16-bit
+    characters. These are used by some system calls, especially on Windows.
+
+    \p ucs is the value to convert.
+
+    \p dst points at an array to write, and \p dstlen is the number of
+    locations in this array. At most \p dstlen words will be
+    written, and a 0 terminating word will be added if \p dstlen is
+    large enough. Thus this function will never overwrite the buffer
+    and will attempt return a zero-terminated string if space permits.
+    If \p dstlen is zero then \p dst can be set to NULL and no data
+    is written, but the length is returned.
+
+    The return value is the number of 16-bit words that \e would be written
+    to \p dst if it is large enough, not counting any terminating
+    zero.
+
+    If the return value is greater than \p dstlen it indicates truncation,
+    you should then allocate a new array of size return+1 and call this again.
+
+    Unicode characters in the range 0x10000 to 0x10ffff are converted to
+    "surrogate pairs" which take two words each (in UTF-16 encoding).
+    Typically, setting \p dstlen to 2 will ensure that any valid Unicode
+    value can be converted, and setting \p dstlen to 3 or more will allow
+    a NULL terminated sequence to be returned.
+*/
+unsigned fltk3::ucs_to_Utf16(const unsigned ucs, unsigned short *dst, const unsigned dstlen)
+{
+  /* The rule for direct conversion from UCS to UTF16 is:
+   * - if UCS >  0x0010FFFF then UCS is invalid
+   * - if UCS >= 0xD800 && UCS <= 0xDFFF UCS is invalid
+   * - if UCS <= 0x0000FFFF then U16 = UCS, len = 1
+   * - else
+   * -- U16[0] = ((UCS - 0x00010000) >> 10) & 0x3FF + 0xD800
+   * -- U16[1] = (UCS & 0x3FF) + 0xDC00
+   * -- len = 2;
+   */
+  unsigned count;        /* Count of converted UTF16 cells */
+  unsigned short u16[4]; /* Alternate buffer if dst is not set */
+  unsigned short *out;   /* points to the active buffer */
+  /* Ensure we have a valid buffer to write to */
+  if((!dstlen) || (!dst)) {
+    out = u16;
+  } else {
+    out = dst;
+  }
+  /* Convert from UCS to UTF16 */
+  if((ucs > 0x0010FFFF) || /* UCS is too large */
+  ((ucs > 0xD7FF) && (ucs < 0xE000))) { /* UCS in invalid range */
+    out[0] = 0xFFFD; /* REPLACEMENT CHARACTER */
+    count = 1;
+  } else if(ucs < 0x00010000) {
+    out[0] = (unsigned short)ucs;
+    count = 1;
+  } else if(dstlen < 2) { /* dst is too small for the result */
+    out[0] = 0xFFFD; /* REPLACEMENT CHARACTER */
+    count = 2;
+  } else {
+    out[0] = (((ucs - 0x00010000) >> 10) & 0x3FF) + 0xD800;
+    out[1] = (ucs & 0x3FF) + 0xDC00;
+    count = 2;
+  }
+  /* NULL terminate the output, if there is space */
+  if(count < dstlen) { out[count] = 0; }
+  return count;
+} /* fltk3::ucs_to_Utf16 */
+
+/*! Convert a UTF-8 sequence into an array of 16-bit characters. These
+    are used by some system calls, especially on Windows.
+
+    \p src points at the UTF-8, and \p srclen is the number of bytes to
+    convert.
+
+    \p dst points at an array to write, and \p dstlen is the number of
+    locations in this array. At most \p dstlen-1 words will be
+    written there, plus a 0 terminating word. Thus this function
+    will never overwrite the buffer and will always return a
+    zero-terminated string. If \p dstlen is zero then \p dst can be
+    null and no data is written, but the length is returned.
+
+    The return value is the number of 16-bit words that \e would be written
+    to \p dst if it were long enough, not counting the terminating
+    zero. If the return value is greater or equal to \p dstlen it
+    indicates truncation, you can then allocate a new array of size
+    return+1 and call this again.
+
+    Errors in the UTF-8 are converted as though each byte in the
+    erroneous string is in the Microsoft CP1252 encoding. This allows
+    ISO-8859-1 text mistakenly identified as UTF-8 to be printed
+    correctly.
+
+    Unicode characters in the range 0x10000 to 0x10ffff are converted to
+    "surrogate pairs" which take two words each (this is called UTF-16
+    encoding).
+*/
+unsigned fltk3::utf8toUtf16(const char* src, unsigned srclen,
+		  unsigned short* dst, unsigned dstlen)
+{
+  const char* p = src;
+  const char* e = src+srclen;
+  unsigned count = 0;
+  if (dstlen) for (;;) {
+    if (p >= e) {dst[count] = 0; return count;}
+    if (!(*p & 0x80)) { /* ascii */
+      dst[count] = *p++;
+    } else {
+      int len; unsigned ucs = fltk3::utf8decode(p,e,&len);
+      p += len;
+      if (ucs < 0x10000) {
+	dst[count] = ucs;
+      } else {
+	/* make a surrogate pair: */
+	if (count+2 >= dstlen) {dst[count] = 0; count += 2; break;}
+	dst[count] = (((ucs-0x10000u)>>10)&0x3ff) | 0xd800;
+	dst[++count] = (ucs&0x3ff) | 0xdc00;
+      }
+    }
+    if (++count == dstlen) {dst[count-1] = 0; break;}
+  }
+  /* we filled dst, measure the rest: */
+  while (p < e) {
+    if (!(*p & 0x80)) p++;
+    else {
+      int len; unsigned ucs = fltk3::utf8decode(p,e,&len);
+      p += len;
+      if (ucs >= 0x10000) ++count;
+    }
+    ++count;
+  }
+  return count;
+}
+
+
+/**
+  Converts a UTF-8 string into a wide character string.
+
+  This function generates 32-bit wchar_t (e.g. "ucs4" as it were) except
+  on Windows where it is equivalent to fltk3::utf8toUtf16 and returns
+  UTF-16.
+
+  \p src points at the UTF-8, and \p srclen is the number of bytes to
+  convert.
+
+  \p dst points at an array to write, and \p dstlen is the number of
+  locations in this array. At most \p dstlen-1 wchar_t will be
+  written there, plus a 0 terminating wchar_t.
+
+  The return value is the number of wchar_t that \e would be written
+  to \p dst if it were long enough, not counting the terminating
+  zero. If the return value is greater or equal to \p dstlen it
+  indicates truncation, you can then allocate a new array of size
+  return+1 and call this again.
+
+  Notice that sizeof(wchar_t) is 2 on Windows and is 4 on Linux
+  and most other systems. Where wchar_t is 16 bits, Unicode
+  characters in the range 0x10000 to 0x10ffff are converted to
+  "surrogate pairs" which take two words each (this is called UTF-16
+  encoding). If wchar_t is 32 bits this rather nasty problem is
+  avoided.
+
+  Note that Windows includes Cygwin, i.e. compiled with Cygwin's POSIX
+  layer (cygwin1.dll, --enable-cygwin), either native (GDI) or X11.
+  */
+unsigned fltk3::utf8towc(const char* src, unsigned srclen,
+		  wchar_t* dst, unsigned dstlen)
+{
+#if defined(WIN32) || defined(__CYGWIN__)
+  return fltk3::utf8toUtf16(src, srclen, (unsigned short*)dst, dstlen);
+#else
+  const char* p = src;
+  const char* e = src+srclen;
+  unsigned count = 0;
+  if (dstlen) for (;;) {
+    if (p >= e) {
+      dst[count] = 0;
+      return count;
+    }
+    if (!(*p & 0x80)) { /* ascii */
+      dst[count] = *p++;
+    } else {
+      int len; unsigned ucs = fltk3::utf8decode(p,e,&len);
+      p += len;
+      dst[count] = (wchar_t)ucs;
+    }
+    if (++count == dstlen) {dst[count-1] = 0; break;}
+  }
+  /* we filled dst, measure the rest: */
+  while (p < e) {
+    if (!(*p & 0x80)) p++;
+    else {
+      int len; fltk3::utf8decode(p,e,&len);
+      p += len;
+    }
+    ++count;
+  }
+  return count;
+#endif
+}
+
+/*! Convert a UTF-8 sequence into an array of 1-byte characters.
+
+    If the UTF-8 decodes to a character greater than 0xff then it is
+    replaced with '?'.
+
+    Errors in the UTF-8 are converted as individual bytes, same as
+    fltk3::utf8decode() does. This allows ISO-8859-1 text mistakenly identified
+    as UTF-8 to be printed correctly (and possibly CP1512 on Windows).
+
+    \p src points at the UTF-8, and \p srclen is the number of bytes to
+    convert.
+
+    Up to \p dstlen bytes are written to \p dst, including a null
+    terminator. The return value is the number of bytes that would be
+    written, not counting the null terminator. If greater or equal to
+    \p dstlen then if you malloc a new array of size n+1 you will have
+    the space needed for the entire string. If \p dstlen is zero then
+    nothing is written and this call just measures the storage space
+    needed.
+*/
+unsigned fltk3::utf8toa(const char* src, unsigned srclen,
+		 char* dst, unsigned dstlen)
+{
+  const char* p = src;
+  const char* e = src+srclen;
+  unsigned count = 0;
+  if (dstlen) for (;;) {
+    unsigned char c;
+    if (p >= e) {dst[count] = 0; return count;}
+    c = *(unsigned char*)p;
+    if (c < 0xC2) { /* ascii or bad code */
+      dst[count] = c;
+      p++;
+    } else {
+      int len; unsigned ucs = fltk3::utf8decode(p,e,&len);
+      p += len;
+      if (ucs < 0x100) dst[count] = ucs;
+      else dst[count] = '?';
+    }
+    if (++count >= dstlen) {dst[count-1] = 0; break;}
+  }
+  /* we filled dst, measure the rest: */
+  while (p < e) {
+    if (!(*p & 0x80)) p++;
+    else {
+      int len;
+      fltk3::utf8decode(p,e,&len);
+      p += len;
+    }
+    ++count;
+  }
+  return count;
+}
+
+/*! Turn "wide characters" as returned by some system calls
+    (especially on Windows) into UTF-8.
+
+    Up to \p dstlen bytes are written to \p dst, including a null
+    terminator. The return value is the number of bytes that would be
+    written, not counting the null terminator. If greater or equal to
+    \p dstlen then if you malloc a new array of size n+1 you will have
+    the space needed for the entire string. If \p dstlen is zero then
+    nothing is written and this call just measures the storage space
+    needed.
+
+    \p srclen is the number of words in \p src to convert. On Windows
+    this is not necessarily the number of characters, due to there
+    possibly being "surrogate pairs" in the UTF-16 encoding used.
+    On Unix wchar_t is 32 bits and each location is a character.
+
+    On Unix if a \p src word is greater than 0x10ffff then this is an
+    illegal character according to RFC 3629. These are converted as
+    though they are 0xFFFD (REPLACEMENT CHARACTER). Characters in the
+    range 0xd800 to 0xdfff, or ending with 0xfffe or 0xffff are also
+    illegal according to RFC 3629. However I encode these as though
+    they are legal, so that fltk3::utf8towc will return the original data.
+
+    On Windows "surrogate pairs" are converted to a single character
+    and UTF-8 encoded (as 4 bytes). Mismatched halves of surrogate
+    pairs are converted as though they are individual characters.
+*/
+unsigned fltk3::utf8fromwc(char* dst, unsigned dstlen,
+		    const wchar_t* src, unsigned srclen) {
+  unsigned i = 0;
+  unsigned count = 0;
+  if (dstlen) for (;;) {
+    unsigned ucs;
+    if (i >= srclen) {dst[count] = 0; return count;}
+    ucs = src[i++];
+    if (ucs < 0x80U) {
+      dst[count++] = ucs;
+      if (count >= dstlen) {dst[count-1] = 0; break;}
+    } else if (ucs < 0x800U) { /* 2 bytes */
+      if (count+2 >= dstlen) {dst[count] = 0; count += 2; break;}
+      dst[count++] = 0xc0 | (ucs >> 6);
+      dst[count++] = 0x80 | (ucs & 0x3F);
+#if defined(WIN32) || defined(__CYGWIN__)
+    } else if (ucs >= 0xd800 && ucs <= 0xdbff && i < srclen &&
+	       src[i] >= 0xdc00 && src[i] <= 0xdfff) {
+      /* surrogate pair */
+      unsigned ucs2 = src[i++];
+      ucs = 0x10000U + ((ucs&0x3ff)<<10) + (ucs2&0x3ff);
+      /* all surrogate pairs turn into 4-byte utf8 */
+#else
+    } else if (ucs >= 0x10000) {
+      if (ucs > 0x10ffff) {
+	ucs = 0xfffd;
+	goto J1;
+      }
+#endif
+      if (count+4 >= dstlen) {dst[count] = 0; count += 4; break;}
+      dst[count++] = 0xf0 | (ucs >> 18);
+      dst[count++] = 0x80 | ((ucs >> 12) & 0x3F);
+      dst[count++] = 0x80 | ((ucs >> 6) & 0x3F);
+      dst[count++] = 0x80 | (ucs & 0x3F);
+    } else {
+#if !(defined(WIN32) || defined(__CYGWIN__))
+    J1:
+#endif
+      /* all others are 3 bytes: */
+      if (count+3 >= dstlen) {dst[count] = 0; count += 3; break;}
+      dst[count++] = 0xe0 | (ucs >> 12);
+      dst[count++] = 0x80 | ((ucs >> 6) & 0x3F);
+      dst[count++] = 0x80 | (ucs & 0x3F);
+    }
+  }
+  /* we filled dst, measure the rest: */
+  while (i < srclen) {
+    unsigned ucs = src[i++];
+    if (ucs < 0x80U) {
+      count++;
+    } else if (ucs < 0x800U) { /* 2 bytes */
+      count += 2;
+#if defined(WIN32) || defined(__CYGWIN__)
+    } else if (ucs >= 0xd800 && ucs <= 0xdbff && i < srclen-1 &&
+	       src[i+1] >= 0xdc00 && src[i+1] <= 0xdfff) {
+      /* surrogate pair */
+      ++i;
+#else
+    } else if (ucs >= 0x10000 && ucs <= 0x10ffff) {
+#endif
+      count += 4;
+    } else {
+      count += 3;
+    }
+  }
+  return count;
+}
+
+/*! Convert an ISO-8859-1 (ie normal c-string) byte stream to UTF-8.
+
+    It is possible this should convert Microsoft's CP1252 to UTF-8
+    instead. This would translate the codes in the range 0x80-0x9f
+    to different characters. Currently it does not do this.
+
+    Up to \p dstlen bytes are written to \p dst, including a null
+    terminator. The return value is the number of bytes that would be
+    written, not counting the null terminator. If greater or equal to
+    \p dstlen then if you malloc a new array of size n+1 you will have
+    the space needed for the entire string. If \p dstlen is zero then
+    nothing is written and this call just measures the storage space
+    needed.
+
+    \p srclen is the number of bytes in \p src to convert.
+
+    If the return value equals \p srclen then this indicates that
+    no conversion is necessary, as only ASCII characters are in the
+    string.
+*/
+unsigned fltk3::utf8froma(char* dst, unsigned dstlen,
+		   const char* src, unsigned srclen) {
+  const char* p = src;
+  const char* e = src+srclen;
+  unsigned count = 0;
+  if (dstlen) for (;;) {
+    unsigned char ucs;
+    if (p >= e) {dst[count] = 0; return count;}
+    ucs = *(unsigned char*)p++;
+    if (ucs < 0x80U) {
+      dst[count++] = ucs;
+      if (count >= dstlen) {dst[count-1] = 0; break;}
+    } else { /* 2 bytes (note that CP1252 translate could make 3 bytes!) */
+      if (count+2 >= dstlen) {dst[count] = 0; count += 2; break;}
+      dst[count++] = 0xc0 | (ucs >> 6);
+      dst[count++] = 0x80 | (ucs & 0x3F);
+    }
+  }
+  /* we filled dst, measure the rest: */
+  while (p < e) {
+    unsigned char ucs = *(unsigned char*)p++;
+    if (ucs < 0x80U) {
+      count++;
+    } else {
+      count += 2;
+    }
+  }
+  return count;
+}
+
+#ifdef WIN32
+# include <windows.h>
+#endif
+
+/*! Return true if the "locale" seems to indicate that UTF-8 encoding
+    is used. If true the fltk3::utf8to_mb and fltk3::utf8from_mb don't do anything
+    useful.
+
+    <i>It is highly recommended that you change your system so this
+    does return true.</i> On Windows this is done by setting the
+    "codepage" to CP_UTF8.  On Unix this is done by setting $LC_CTYPE
+    to a string containing the letters "utf" or "UTF" in it, or by
+    deleting all $LC* and $LANG environment variables. In the future
+    it is likely that all non-Asian Unix systems will return true,
+    due to the compatibility of UTF-8 with ISO-8859-1.
+*/
+int fltk3::utf8locale(void) {
+  static int ret = 2;
+  if (ret == 2) {
+#ifdef WIN32
+    ret = GetACP() == CP_UTF8;
+#else
+    char* s;
+    ret = 1; /* assume UTF-8 if no locale */
+    if (((s = getenv("LC_CTYPE")) && *s) ||
+	((s = getenv("LC_ALL"))   && *s) ||
+	((s = getenv("LANG"))     && *s)) {
+      ret = (strstr(s,"utf") || strstr(s,"UTF"));
+    }
+#endif
+  }
+  return ret;
+}
+
+/*! Convert the UTF-8 used by FLTK to the locale-specific encoding
+    used for filenames (and sometimes used for data in files).
+    Unfortunately due to stupid design you will have to do this as
+    needed for filenames. This is a bug on both Unix and Windows.
+
+    Up to \p dstlen bytes are written to \p dst, including a null
+    terminator. The return value is the number of bytes that would be
+    written, not counting the null terminator. If greater or equal to
+    \p dstlen then if you malloc a new array of size n+1 you will have
+    the space needed for the entire string. If \p dstlen is zero then
+    nothing is written and this call just measures the storage space
+    needed.
+
+    If fltk3::utf8locale() returns true then this does not change the data.
+*/
+unsigned fltk3::utf8to_mb(const char* src, unsigned srclen,
+		  char* dst, unsigned dstlen)
+{
+  if (!fltk3::utf8locale()) {
+#ifdef WIN32
+    wchar_t lbuf[1024];
+    wchar_t* buf = lbuf;
+    unsigned length = fltk3::utf8towc(src, srclen, buf, 1024);
+    unsigned ret;
+    if (length >= 1024) {
+      buf = (wchar_t*)(malloc((length+1)*sizeof(wchar_t)));
+      fltk3::utf8towc(src, srclen, buf, length+1);
+    }
+    if (dstlen) {
+      /* apparently this does not null-terminate, even though msdn
+       * documentation claims it does:
+       */
+      ret =
+        WideCharToMultiByte(GetACP(), 0, buf, length, dst, dstlen, 0, 0);
+      dst[ret] = 0;
+    }
+    /* if it overflows or measuring length, get the actual length: */
+    if (dstlen==0 || ret >= dstlen-1)
+      ret =
+	WideCharToMultiByte(GetACP(), 0, buf, length, 0, 0, 0, 0);
+    if (buf != lbuf) free((void*)buf);
+    return ret;
+#else
+    wchar_t lbuf[1024];
+    wchar_t* buf = lbuf;
+    unsigned length = fltk3::utf8towc(src, srclen, buf, 1024);
+    unsigned ret;
+    if (length >= 1024) {
+      buf = (wchar_t*)(malloc((length+1)*sizeof(wchar_t)));
+      fltk3::utf8towc(src, srclen, buf, length+1);
+    }
+    if (dstlen) {
+      ret = wcstombs(dst, buf, dstlen);
+      if (ret >= dstlen-1) ret = wcstombs(0,buf,0);
+    } else {
+      ret = wcstombs(0,buf,0);
+    }
+    if (buf != lbuf) free((void*)buf);
+    if (ret >= 0) return (unsigned)ret;
+    /* on any errors we return the UTF-8 as raw text...*/
+#endif
+  }
+  /* identity transform: */
+  if (srclen < dstlen) {
+    memcpy(dst, src, srclen);
+    dst[srclen] = 0;
+  } else {
+    /* Buffer insufficent or buffer query */
+  }
+  return srclen;
+}
+
+/*! Convert a filename from the locale-specific multibyte encoding
+    used by Windows to UTF-8 as used by FLTK.
+
+    Up to \p dstlen bytes are written to \p dst, including a null
+    terminator. The return value is the number of bytes that would be
+    written, not counting the null terminator. If greater or equal to
+    \p dstlen then if you malloc a new array of size n+1 you will have
+    the space needed for the entire string. If \p dstlen is zero then
+    nothing is written and this call just measures the storage space
+    needed.
+
+    On Unix or on Windows when a UTF-8 locale is in effect, this
+    does not change the data.
+    You may also want to check if fltk3::utf8test() returns non-zero, so that
+    the filesystem can store filenames in UTF-8 encoding regardless of
+    the locale.
+*/
+unsigned fltk3::utf8from_mb(char* dst, unsigned dstlen,
+		    const char* src, unsigned srclen)
+{
+  if (!fltk3::utf8locale()) {
+#ifdef WIN32
+    wchar_t lbuf[1024];
+    wchar_t* buf = lbuf;
+    unsigned length;
+    unsigned ret;
+    length = MultiByteToWideChar(GetACP(), 0, src, srclen, buf, 1024);
+    if ((length == 0)&&(GetLastError()==ERROR_INSUFFICIENT_BUFFER)) {
+      length = MultiByteToWideChar(GetACP(), 0, src, srclen, 0, 0);
+      buf = (wchar_t*)(malloc(length*sizeof(wchar_t)));
+      MultiByteToWideChar(GetACP(), 0, src, srclen, buf, length);
+    }
+    ret = fltk3::utf8fromwc(dst, dstlen, buf, length);
+    if (buf != lbuf) free((void*)buf);
+    return ret;
+#else
+    wchar_t lbuf[1024];
+    wchar_t* buf = lbuf;
+    int length;
+    unsigned ret;
+    length = mbstowcs(buf, src, 1024);
+    if (length >= 1024) {
+      length = mbstowcs(0, src, 0)+1;
+      buf = (wchar_t*)(malloc(length*sizeof(wchar_t)));
+      mbstowcs(buf, src, length);
+    }
+    if (length >= 0) {
+      ret = fltk3::utf8fromwc(dst, dstlen, buf, length);
+      if (buf != lbuf) free((void*)buf);
+      return ret;
+    }
+    /* errors in conversion return the UTF-8 unchanged */
+#endif
+  }
+  /* identity transform: */
+  if (srclen < dstlen) {
+    memcpy(dst, src, srclen);
+    dst[srclen] = 0;
+  } else {
+    /* Buffer insufficent or buffer query */
+  }
+  return srclen;
+}
+
+/*! Examines the first \p srclen bytes in \p src and returns a verdict
+    on whether it is UTF-8 or not.
+    - Returns 0 if there is any illegal UTF-8 sequences, using the
+      same rules as fltk3::utf8decode(). Note that some UCS values considered
+      illegal by RFC 3629, such as 0xffff, are considered legal by this.
+    - Returns 1 if there are only single-byte characters (ie no bytes
+      have the high bit set). This is legal UTF-8, but also indicates
+      plain ASCII. It also returns 1 if \p srclen is zero.
+    - Returns 2 if there are only characters less than 0x800.
+    - Returns 3 if there are only characters less than 0x10000.
+    - Returns 4 if there are characters in the 0x10000 to 0x10ffff range.
+
+    Because there are many illegal sequences in UTF-8, it is almost
+    impossible for a string in another encoding to be confused with
+    UTF-8. This is very useful for transitioning Unix to UTF-8
+    filenames, you can simply test each filename with this to decide
+    if it is UTF-8 or in the locale encoding. My hope is that if
+    this is done we will be able to cleanly transition to a locale-less
+    encoding.
+*/
+int fltk3::utf8test(const char* src, unsigned srclen) {
+  int ret = 1;
+  const char* p = src;
+  const char* e = src+srclen;
+  while (p < e) {
+    if (*p & 0x80) {
+      int len; fltk3::utf8decode(p,e,&len);
+      if (len < 2) return 0;
+      if (len > ret) ret = len;
+      p += len;
+    } else {
+      p++;
+    }
+  }
+  return ret;
+}
+
+/* forward declare mk_wcwidth() as static so the name is not visible.
+ */
+ static int mk_wcwidth(unsigned int ucs);
+
+ /* include the c source directly so it's contents are only visible here
+  */
+#include "xutf8/mk_wcwidth.c"
+
+/** wrapper to adapt Markus Kuhn's implementation of wcwidth() for FLTK
+    \param [in] ucs Unicode character value
+    \returns width of character in columns
+
+    See http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c for Markus Kuhn's
+    original implementation of wcwidth() and wcswidth()
+    (defined in IEEE Std 1002.1-2001) for Unicode.
+
+    \b WARNING: this function returns widths for "raw" Unicode characters.
+    It does not even try to map C1 control characters (0x80 to 0x9F) to
+    CP1252, and C0/C1 control characters and DEL will return -1.
+    You are advised to use fltk3::width(const char* src) instead.
+ */
+int fltk3::wcwidth_(unsigned int ucs) {
+  return mk_wcwidth(ucs);
+}
+
+/** extended wrapper around  fltk3::wcwidth_(unsigned int ucs) function.
+    \param[in] src pointer to start of UTF-8 byte sequence
+    \returns width of character in columns
+
+    Depending on build options, this function may map C1 control
+    characters (0x80 to 0x9f) to CP1252, and return the width of
+    that character instead. This is not the same behaviour as
+    fltk3::wcwidth_(unsigned int ucs) .
+
+    Note that other control characters and DEL will still return -1,
+    so if you want different behaviour, you need to test for those
+    characters before calling fltk3::wcwidth(), and handle them separately.
+ */
+int fltk3::wcwidth(const char* src) {
+  int len = fltk3::utf8len(*src);
+  int ret = 0;
+  unsigned int ucs = fltk3::utf8decode(src, src+len, &ret);
+  int width = fltk3::wcwidth_(ucs);
+  return width;
+}
+
+/** @} */
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/fl_utf.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_utf8.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_utf8.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_utf8.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,854 @@
+//
+// "$Id$"
+//
+// Unicode to UTF-8 conversion functions.
+//
+// Author: Jean-Marc Lienher ( http://oksid.ch )
+// Copyright 2000-2010 by O'ksi'D.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+
+
+#include <config.h>
+#include <fltk3/filename.h>
+#include <stdarg.h>
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+# include <ctype.h>
+# include <io.h>
+# include <windows.h>
+# include <winbase.h>
+# include <process.h>
+#ifdef __CYGWIN__
+#include  <wchar.h>
+#else
+#include  <direct.h>
+#endif
+extern "C" {
+  int XUtf8Tolower(int ucs);
+  unsigned short XUtf8IsNonSpacing(unsigned int ucs);
+};
+
+#elif defined(__APPLE__)
+# include <stdio.h>
+# include <time.h>
+//# include <unix.h>
+# include <fcntl.h>
+# include <unistd.h>
+# include <wchar.h>
+# include <stdlib.h>
+#   include <sys/types.h>
+# include <sys/stat.h>
+
+extern "C" {
+  int XUtf8Tolower(int ucs);
+  unsigned short XUtf8IsNonSpacing(unsigned int ucs);
+}
+
+#else // X-windows platform
+
+# include <fltk3/Xutf8.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# include <unistd.h>
+#endif // WIN32
+
+#include <fltk3/utf8.h>
+#include <string.h>
+#include <stdlib.h>
+
+
+/** \addtogroup fl_unicode
+ @{
+ */
+
+/*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
+/***        but only 16 bits are really used under Linux and win32  ***/
+
+
+#define NBC 0xFFFF + 1
+
+static int
+Toupper(
+	int ucs)
+{
+  long i;
+  static unsigned short *table = NULL;
+  
+  if (!table) {
+    table = (unsigned short*) malloc(
+                                     sizeof(unsigned short) * (NBC));
+    for (i = 0; i < NBC; i++) {
+      table[i] = (unsigned short) i;
+    }
+    for (i = 0; i < NBC; i++) {
+      int l;
+      l = XUtf8Tolower(i);
+      if (l != i) table[l] = (unsigned short) i;
+    }
+    
+  }
+  if (ucs >= NBC || ucs < 0) return ucs;
+  return table[ucs];
+}
+
+/**
+ return the byte length of the UTF-8 sequence with first byte \p c,
+ or -1 if \p c is not valid.
+ This function is helpful for finding faulty UTF8 sequences.
+ \see fltk3::utf8len1
+ */
+int fltk3::utf8len(char c)
+{
+  if (!(c & 0x80)) return 1;
+  if (c & 0x40) {
+    if (c & 0x20) {
+      if (c & 0x10) {
+        if (c & 0x08) {
+          if (c & 0x04) {
+            return 6;
+          }
+          return 5;
+        }
+        return 4;
+      }
+      return 3;
+    }
+    return 2;
+  }
+  return -1;
+} // fltk3::utf8len
+
+
+/**
+ Return the byte length of the UTF-8 sequence with first byte \p c,
+ or 1 if \p c is not valid. 
+ This function can be used to scan faulty UTF8 sequence, albeit ignoring invalid
+ codes.
+ \see fltk3::utf8len
+ */
+int fltk3::utf8len1(char c)
+{
+  if (!(c & 0x80)) return 1;
+  if (c & 0x40) {
+    if (c & 0x20) {
+      if (c & 0x10) {
+        if (c & 0x08) {
+          if (c & 0x04) {
+            return 6;
+          }
+          return 5;
+        }
+        return 4;
+      }
+      return 3;
+    }
+    return 2;
+  }
+  return 1;
+} // fltk3::utf8len1
+
+
+/**
+ returns the number of Unicode chars in the UTF-8 string
+ */
+int
+fltk3::utf_nb_char(
+               const unsigned char 	*buf,
+               int 			len)
+{
+  int i = 0;
+  int nbc = 0;
+  while (i < len) {
+    int cl = fltk3::utf8len((buf+i)[0]);//fl_utflen(buf + i, len - i);
+    if (cl < 1) cl = 1;
+    nbc++;
+    i += cl;
+  }
+  return nbc;
+}
+
+/*
+ * compare only the first n bytes
+ * return 0 if the strings are equal;
+ * return 1 if s1 is greater than s2
+ * return -1 if s1 is less than s2
+ */
+/**
+ UTF-8 aware strncasecmp - converts to lower case Unicode and tests.
+ 
+ \todo Correct the incorrect logic where length of strings tested
+ \todo Clarify whether n means number of bytes, or characters.
+ */
+int fltk3::utf_strncasecmp(const char *s1, const char *s2, int n)
+{
+  int i;
+  int s1_l;
+  int s2_l;
+  char *e1, *e2; // string end pointers
+  
+  s1_l = 0;
+  while (s1_l < n && s1[s1_l]) s1_l++;
+  s2_l = 0;
+  while (s2_l < n && s2[s2_l]) s2_l++;
+  
+  if (s1_l < s2_l) {
+    return -1;
+  } else if (s1_l > s2_l) {
+    return 1;
+  }
+  e1 = (char *)&s1[s1_l]; // last char to test
+  e2 = (char *)&s2[s2_l];
+  for (i = 0; i < n;) {
+    int l1, l2;
+    unsigned int u1, u2;
+    int res;
+    
+    //              l1 = fl_utf2ucs((unsigned char*)s1 + i, n - i, &u1);
+    u1 = fltk3::utf8decode(s1 + i, e1, &l1);
+    //              l2 = fl_utf2ucs((unsigned char*)s2 + i, n - i, &u2);
+    u2 = fltk3::utf8decode(s2 + i, e2, &l2);
+    if (l1 - l2 != 0) return l1 - l2;
+    res = XUtf8Tolower(u1) - XUtf8Tolower(u2);
+    if (res != 0) return res;
+    if (l1 < 1) {
+      i += 1;
+    } else {
+      i += l1;
+    }
+  }
+  return 0;
+}
+
+/*
+ * return 0 if the strings are equal;
+ * return 1 if s1 is greater than s2
+ * return -1 if s1 is less than s2
+ */
+/**
+ UTF-8 aware strcasecmp - converts to Unicode and tests.
+ 
+ \todo Correct the incorrect logic where length of strings tested
+ */
+int fltk3::utf_strcasecmp(const char *s1, const char *s2)
+{
+  int s1_l = strlen(s1);
+  int s2_l = strlen(s2);
+  
+  if (s1_l < s2_l) {
+    return -1;
+  } else if (s1_l > s2_l) {
+    return 1;
+  }
+  return fltk3::utf_strncasecmp(s1, s2, s1_l);
+}
+
+/**
+ return the Unicode lower case value of \p ucs
+ */
+int fltk3::tolower(unsigned int ucs)
+{
+  return XUtf8Tolower(ucs);
+}
+
+/**
+ return the Unicode upper case value of \p ucs
+ */
+int fltk3::toupper(unsigned int ucs)
+{
+  return Toupper(ucs);
+}
+
+/**
+ converts the str string to the lower case equivalent into buf.
+ Warning: to be safe buf length must be at least 3 * len [for 16-bit Unicode]
+ */
+int fltk3::utf_tolower(const unsigned char *str, int len, char *buf)
+{
+  int i;
+  int l = 0;
+  char *end = (char *)&str[len];
+  for (i = 0; i < len;) {
+    int l1, l2;
+    unsigned int u1;
+    
+    //              l1 = fl_utf2ucs((unsigned char*)str + i, len - i, &u1);
+    u1 = fltk3::utf8decode((const char*)(str + i), end, &l1);
+    l2 = fltk3::utf8encode((unsigned int) XUtf8Tolower(u1), buf + l);
+    if (l1 < 1) {
+      i += 1;
+    } else {
+      i += l1;
+    }
+    if (l2 < 1) {
+      l += 1;
+    } else {
+      l += l2;
+    }
+    
+  }
+  return l;
+}
+
+/**
+ converts the str string to the upper case equivalent into buf.
+ Warning: to be safe buf length must be at least 3 * len [for 16-bit Unicode]
+ */
+int fltk3::utf_toupper(const unsigned char *str, int len, char *buf)
+{
+  int i;
+  int l = 0;
+  char *end = (char *)&str[len];
+  for (i = 0; i < len;) {
+    int l1, l2;
+    unsigned int u1;
+    
+    //              l1 = fl_utf2ucs((unsigned char*)str + i, len - i, &u1);
+    u1 = fltk3::utf8decode((const char*)(str + i), end, &l1);
+    l2 = fltk3::utf8encode((unsigned int) Toupper(u1), buf + l);
+    if (l1 < 1) {
+      i += 1;
+    } else {
+      i += l1;
+    }
+    if (l2 < 1) {
+      l += 1;
+    } else {
+      l += l2;
+    }
+  }
+  return l;
+}
+
+#if 0 // deprecated in favour of FLTK2's fltk3::utf8toa
+/*
+ * convert UTF-8 str to latin1
+ * Warning: buf must be at least len long
+ */
+int fl_utf2latin1(const unsigned char *str, int len, char *buf)
+{
+  int i;
+  int l = 0;
+  char *end = (char *)&str[len];
+  for (i = 0; i < len;) {
+    unsigned int u1;
+    int l1;
+    
+    //              l1 = fl_utf2ucs((unsigned char*)str + i, len - i, &u1);
+    u1 = fltk3::utf8decode((const char*)(str + i), end, &l1);
+    if (u1 > 0xFF) u1 = '?';
+    buf[l] = (char) u1;
+    if (l1 < 1) {
+      i += 1;
+    } else {
+      i += l1;
+    }
+    l++;
+    
+  }
+  return l;
+}
+#endif
+
+#if 0 // deprecated in favour of FLTK2's fltk3::utf8froma
+/*
+ * convert latin1 str to UTF-8
+ * Warning: buf must be at least 2 * len long
+ */
+int fl_latin12utf(const unsigned char *str, int len, char *buf)
+{
+  int i;
+  int l = 0;
+  int l1 = 0;
+  for (i = 0; i < len; i++) {
+    unsigned int n = (unsigned int) str[i];
+    l1 = fltk3::utf8encode(n, buf + l);
+    if (l1 < 1) {
+      l = l + 1;
+    } else {
+      l = l + l1;
+    }
+    
+  }
+  return l;
+}
+#endif
+
+/**
+ returns true if the character is non-spacing.
+ \todo explain what non-spacing means.
+ */
+unsigned int fltk3::nonspacing(unsigned int ucs)
+{
+#ifdef __APPLE__
+  return (ucs==0x20); // FIXME: what does this really do?
+#else
+  return (unsigned int) XUtf8IsNonSpacing(ucs);
+#endif
+}
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+static xchar *mbwbuf = NULL;
+#endif
+
+#ifdef WIN32
+unsigned int fl_codepage = 0;
+#endif
+
+#if defined (WIN32) && !defined(__CYGWIN__)
+
+static char *buf = NULL;
+static int buf_len = 0;
+static unsigned short *wbufa = NULL;
+
+// FIXME: This should *maybe* return 'const char *' instead of 'char *'
+char *fltk3::utf8_to_locale(const char *s, int len, UINT codepage)
+{
+  if (!s) return (char *)"";
+  int l = 0;
+  //	if (buf_len < len * 2 + 1) {
+  //		buf_len = len * 2 + 1;
+  //		buf = (char*) realloc(buf, buf_len);
+  //		wbufa = (unsigned short*) realloc(wbufa, buf_len * sizeof(short));
+  //	}
+  unsigned wn = fltk3::utf8toUtf16(s, len, NULL, 0); // Query length
+  wn = wn * 2 + 1;
+  if (wn >= (unsigned)buf_len) {
+    buf_len = wn;
+    buf = (char*) realloc(buf, buf_len);
+    wbufa = (unsigned short*) realloc(wbufa, buf_len * sizeof(short));
+  }
+  if (codepage < 1) codepage = fl_codepage;
+  //	l = fl_utf2unicode((const unsigned char *)s, len, (xchar*) wbufa);
+  l = fltk3::utf8toUtf16(s, len, wbufa, wn); // Convert string
+  wbufa[l] = 0;
+  buf[l] = 0;
+  l = WideCharToMultiByte(codepage, 0, (WCHAR*)wbufa, l, buf, buf_len, NULL, NULL);
+  if (l < 0) l = 0;
+  buf[l] = 0;
+  return buf;
+}
+
+// FIXME: This should maybe return 'const char *' instead of 'char *'
+char *fltk3::locale_to_utf8(const char *s, int len, UINT codepage)
+{
+  if (!s) return (char *)"";
+  int l = 0;
+  if (buf_len < len * 5 + 1) {
+    buf_len = len * 5 + 1;
+    buf = (char*) realloc(buf, buf_len);
+    wbufa = (unsigned short*) realloc(wbufa, buf_len * sizeof(short));
+  }
+  if (codepage < 1) codepage = fl_codepage;
+  buf[l] = 0;
+  
+  l = MultiByteToWideChar(codepage, 0, s, len, (WCHAR*)wbufa, buf_len);
+  if (l < 0) l = 0;
+  wbufa[l] = 0;
+  //	l = fl_unicode2utf((xchar*)wbufa, l, buf);
+  l = fltk3::utf8fromwc(buf, buf_len, (xchar*)wbufa, l);
+  buf[l] = 0;
+  return buf;
+}
+#endif
+
+/**
+ converts UTF8 to a local multi-byte character string.
+ */
+char * fltk3::utf2mbcs(const char *s)
+{
+  if (!s) return NULL;
+#if defined(WIN32) && !defined(__CYGWIN__)
+  int l = strlen(s);
+  static char *buf = NULL;
+  
+  //	mbwbuf = (xchar*)realloc(mbwbuf, (l+6) * sizeof(xchar));
+  //	l = fl_utf2unicode((unsigned char*)s, l, mbwbuf);
+  //	mbwbuf[l] = 0;
+  unsigned wn = fltk3::utf8toUtf16(s, l, NULL, 0) + 7; // Query length
+  mbwbuf = (xchar*)realloc(mbwbuf, sizeof(xchar)*wn);
+  l = fltk3::utf8toUtf16(s, l, (unsigned short *)mbwbuf, wn); // Convert string
+  mbwbuf[l] = 0;
+  
+  buf = (char*)realloc(buf, l * 6 + 1);
+  l = wcstombs(buf, mbwbuf, l * 6);
+  buf[l] = 0;
+  return buf;
+#else
+  return (char*) s;
+#endif
+}
+
+
+#if 0 // deprecated in favour of FLTK2's fltk3::utf8from_mb
+char * fl_mbcs2utf(const char *s)
+{
+  if (!s) return NULL;
+#if defined(WIN32)
+  int l = strlen(s);
+  unsigned dstlen;
+  static char *buf = NULL;
+  
+  mbwbuf = (xchar*)realloc(mbwbuf,(l * 6 + 6) * sizeof(xchar));
+  l = mbstowcs(mbwbuf, s, l);
+  dstlen = l * 6 + 1;
+  buf = (char*)realloc(buf, dstlen);
+  //	l = fl_unicode2utf(mbwbuf, l, buf);
+  l = fltk3::utf8fromwc(buf, dstlen, mbwbuf, l);
+  buf[l] = 0;
+  return buf;
+#else
+  return (char*) s;
+#endif
+} // fl_mbcs2utf
+#endif
+
+#if defined(WIN32)  && !defined(__CYGWIN__)
+static xchar *wbuf = NULL;
+static xchar *wbuf1 = NULL;
+#endif
+
+
+char *fltk3::getenv(const char* v)
+{
+#if defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(v);
+  //	static xchar* wbuf = NULL;
+  //	wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //	wbuf[fl_utf2unicode((const unsigned char*)v, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(v, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(v, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  xchar *ret = ::_wgetenv(wbuf);
+  static char *buf = NULL;
+  if (ret) {
+    l = wcslen(ret);
+    wn = fltk3::utf8fromwc(NULL, 0, ret, l) + 1; // query length
+    buf = (char*) realloc(buf, wn);
+    //		buf[fl_unicode2utf(ret, l, buf)] = 0;
+    wn = fltk3::utf8fromwc(buf, wn, ret, l); // convert string
+    buf[wn] = 0;
+    return buf;
+  } else {
+    return NULL;
+  }
+#else
+  return ::getenv(v);
+#endif
+}
+
+int fltk3::open(const char* f, int oflags, ...)
+{
+  va_list ap;
+  va_start(ap, oflags);
+  int ret = fltk3::vopen(f, oflags, ap);
+  va_end(ap);
+  return ret;
+}
+
+int fltk3::vopen(const char* f, int oflags, va_list ap) {
+  int pmode;
+  pmode = va_arg(ap, int);
+#if defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  if (pmode == -1) return ::_wopen(wbuf, oflags);
+  else return ::_wopen(wbuf, oflags, pmode);
+#else
+  if (pmode == -1) return ::open(f, oflags);
+  else return ::open(f, oflags, pmode);
+#endif
+}
+
+FILE *fltk3::fopen(const char* f, const char *mode)
+{
+#if  defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  l = strlen(mode);
+  //		wbuf1 = (xchar*)realloc(wbuf1, sizeof(xchar) * (l+1));
+  //		wbuf1[fl_utf2unicode((const unsigned char*)mode, l, wbuf1)] = 0;
+  wn = fltk3::utf8toUtf16(mode, l, NULL, 0) + 1; // Query length
+  wbuf1 = (xchar*)realloc(wbuf1, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(mode, l, (unsigned short *)wbuf1, wn); // Convert string
+  wbuf1[wn] = 0;
+  return ::_wfopen(wbuf, wbuf1);
+#else
+  return ::fopen(f, mode);
+#endif
+}
+
+int fltk3::system(const char* f)
+{
+#if  defined (WIN32) && !defined(__CYGWIN__)
+#  ifdef __MINGW32__
+  return system(fltk3::utf2mbcs(f));
+#  else
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_wsystem(wbuf);
+#  endif
+#else
+  return ::system(f);
+#endif
+}
+
+int fltk3::execvp(const char *file, char *const *argv)
+{
+#if  defined (WIN32) && !defined(__CYGWIN__)
+#ifdef __MINGW32__
+  return _execvp(fltk3::utf2mbcs(file), argv);
+#else
+  int l = strlen(file);
+  int i, n, ret;
+  xchar **ar;
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)file, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(file, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(file, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  
+  i = 0; n = 0;
+  while (argv[i]) {i++; n++;}
+  ar = (xchar**) malloc(sizeof(xchar*) * (n + 1));
+  i = 0;
+  while (i <= n) {
+    unsigned wn;
+    l = strlen(argv[i]);
+    //			ar[i] = (xchar *)malloc(sizeof(xchar) * (l+1));
+    //			ar[i][fl_utf2unicode((const unsigned char*)argv[i], l, ar[i])] = 0;
+    wn = fltk3::utf8toUtf16(argv[i], l, NULL, 0) + 1; // Query length
+    ar[i] = (xchar *)malloc(sizeof(xchar)*wn);
+    wn = fltk3::utf8toUtf16(argv[i], l, (unsigned short *)ar[i], wn); // Convert string
+    ar[i][wn] = 0;
+    i++;
+  }
+  ar[n] = NULL;
+  ret = ::_wexecvp(wbuf, ar);
+  i = 0;
+  while (i <= n) {
+    free(ar[i]);
+    i++;
+  }
+  free(ar);
+  return ret;
+#endif
+#else
+  return ::execvp(file, argv);
+#endif
+}
+
+
+
+int fltk3::chmod(const char* f, int mode)
+{
+#if  defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_wchmod(wbuf, mode);
+#else
+  return ::chmod(f, mode);
+#endif
+}
+
+int fltk3::access(const char* f, int mode)
+{
+#if defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_waccess(wbuf, mode);
+#else
+  return ::access(f, mode);
+#endif
+}
+
+
+int fltk3::stat(const char* f, struct stat *b)
+{
+#if defined(WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_wstat(wbuf, (struct _stat*)b);
+#else
+  return ::stat(f, b);
+#endif
+}
+
+char *fltk3::getcwd(char* b, int l)
+{
+  if (b == NULL) {
+    b = (char*) malloc(l+1);
+  }
+#if defined(WIN32) && !defined(__CYGWIN__)
+  static xchar *wbuf = NULL;
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		xchar *ret = _wgetcwd(wbuf, l / 5);
+  xchar *ret = ::_wgetcwd(wbuf, l);
+  if (ret) {
+    unsigned dstlen = l;
+    l = wcslen(wbuf);
+    //			b[fl_unicode2utf(wbuf, l, b)] = 0;
+    dstlen = fltk3::utf8fromwc(b, dstlen, wbuf, l);
+    b[dstlen] = 0;
+    return b;
+  } else {
+    return NULL;
+  }
+#else
+  return ::getcwd(b, l);
+#endif
+}
+
+
+int fltk3::unlink(const char* f)
+{
+#if defined(WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_wunlink(wbuf);
+#else
+  return ::unlink(f);
+#endif
+}
+
+int fltk3::mkdir(const char* f, int mode)
+{
+#if defined(WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(short) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_wmkdir(wbuf);
+#else
+  return ::mkdir(f, mode);
+#endif
+}
+
+
+int fltk3::rmdir(const char* f)
+{
+#if defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  //		wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
+  //		wbuf[fl_utf2unicode((const unsigned char*)f, l, wbuf)] = 0;
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  return ::_wrmdir(wbuf);
+#else
+  return ::rmdir(f);
+#endif
+}
+
+int fltk3::rename(const char* f, const char *n)
+{
+#if defined (WIN32) && !defined(__CYGWIN__)
+  int l = strlen(f);
+  unsigned wn = fltk3::utf8toUtf16(f, l, NULL, 0) + 1; // Query length
+  wbuf = (xchar*)realloc(wbuf, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(f, l, (unsigned short *)wbuf, wn); // Convert string
+  wbuf[wn] = 0;
+  l = strlen(n);
+  wn = fltk3::utf8toUtf16(n, l, NULL, 0) + 1; // Query length
+  wbuf1 = (xchar*)realloc(wbuf1, sizeof(xchar)*wn);
+  wn = fltk3::utf8toUtf16(n, l, (unsigned short *)wbuf1, wn); // Convert string
+  wbuf1[wn] = 0;
+  return ::_wrename(wbuf, wbuf1);
+#else
+  return ::rename(f, n);
+#endif
+}
+
+// recursively create a path in the file system
+char fltk3::make_path( const char *path ) {
+  if (fltk3::access(path, 0)) {
+    const char *s = strrchr( path, '/' );
+    if ( !s ) return 0;
+    int len = s-path;
+    char *p = (char*)malloc( len+1 );
+    memcpy( p, path, len );
+    p[len] = 0;
+    fltk3::make_path( p );
+    free( p );
+    fltk3::mkdir(path, 0700);
+  }
+  return 1;
+}
+
+// strip the filename and create a path
+void fltk3::make_path_for_file( const char *path )
+{
+  const char *s = strrchr( path, '/' );
+  if ( !s ) return;
+  int len = s-path;
+  char *p = (char*)malloc( len+1 );
+  memcpy( p, path, len );
+  p[len] = 0;
+  fltk3::make_path( p );
+  free( p );
+}
+
+/** @} */
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_utf8.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/fl_vertex.cxx
===================================================================
--- branches/branch-3.0/src/core/fl_vertex.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/fl_vertex.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,286 @@
+//
+// "$Id$"
+//
+// Portable drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+/**
+  \file fl_vertex.cxx
+  \brief  Portable drawing code for drawing arbitrary shapes with
+          simple 2D transformations.
+*/
+
+// Portable drawing code for drawing arbitrary shapes with
+// simple 2D transformations.  See also fltk3::arc.cxx
+
+// matt: the Quartz implementation purposely doesn't use the Quartz matrix
+//       operations for reasons of compatibility and maintainability
+
+#include <config.h>
+#include <fltk3/draw.h>
+#include <fltk3/x.h>
+#include <fltk3/run.h>
+#include <fltk3/math.h>
+#include <stdlib.h>
+
+void fltk3::GraphicsDriver::push_matrix() {
+  if (sptr==matrix_stack_size)
+    fltk3::error("fltk3::push_matrix(): matrix stack overflow.");
+  else
+    stack[sptr++] = m;
+}
+
+void fltk3::GraphicsDriver::pop_matrix() {
+  if (sptr==0)
+    fltk3::error("fltk3::pop_matrix(): matrix stack underflow.");
+  else 
+    m = stack[--sptr];
+}
+
+void fltk3::GraphicsDriver::mult_matrix(double a, double b, double c, double d, double x, double y) {
+  matrix o;
+  o.a = a*m.a + b*m.c;
+  o.b = a*m.b + b*m.d;
+  o.c = c*m.a + d*m.c;
+  o.d = c*m.b + d*m.d;
+  o.x = x*m.a + y*m.c + m.x;
+  o.y = x*m.b + y*m.d + m.y;
+  m = o;
+}
+
+void fltk3::GraphicsDriver::rotate(double d) {
+  if (d) {
+    double s, c;
+    if (d == 0) {s = 0; c = 1;}
+    else if (d == 90) {s = 1; c = 0;}
+    else if (d == 180) {s = 0; c = -1;}
+    else if (d == 270 || d == -90) {s = -1; c = 0;}
+    else {s = sin(d*M_PI/180); c = cos(d*M_PI/180);}
+    mult_matrix(c,-s,s,c,0,0);
+  }
+}
+
+void fltk3::GraphicsDriver::begin_points() {n = 0; what = POINT_;}
+
+void fltk3::GraphicsDriver::begin_line() {n = 0; what = LINE;}
+
+void fltk3::GraphicsDriver::begin_loop() {n = 0; what = LOOP;}
+
+void fltk3::GraphicsDriver::begin_polygon() {n = 0; what = POLYGON;}
+
+double fltk3::GraphicsDriver::transform_x(double x, double y) {return x*m.a + y*m.c + m.x;}
+
+double fltk3::GraphicsDriver::transform_y(double x, double y) {return x*m.b + y*m.d + m.y;}
+
+double fltk3::GraphicsDriver::transform_dx(double x, double y) {return x*m.a + y*m.c;}
+
+double fltk3::GraphicsDriver::transform_dy(double x, double y) {return x*m.b + y*m.d;}
+
+void fltk3::GraphicsDriver::transformed_vertex0(COORD_T x, COORD_T y) {
+  if (!n || x != p[n-1].x || y != p[n-1].y) {
+    if (n >= p_size) {
+      p_size = p ? 2*p_size : 16;
+      p = (XPOINT*)realloc((void*)p, p_size*sizeof(*p));
+    }
+    p[n].x = x;
+    p[n].y = y;
+    n++;
+  }
+}
+
+void fltk3::GraphicsDriver::transformed_vertex(double xf, double yf) {
+#ifdef __APPLE_QUARTZ__
+  transformed_vertex0(COORD_T(xf), COORD_T(yf));
+#else
+  transformed_vertex0(COORD_T(rint(xf)), COORD_T(rint(yf)));
+#endif
+}
+
+void fltk3::GraphicsDriver::vertex(double x,double y) {
+  transformed_vertex0(COORD_T(x*m.a + y*m.c + m.x), COORD_T(x*m.b + y*m.d + m.y));
+}
+
+void fltk3::GraphicsDriver::end_points() {
+#if defined(USE_X11)
+  if (n>1) XDrawPoints(fl_display, fl_window, fl_gc, p, n, 0);
+#elif defined(WIN32)
+  for (int i=0; i<n; i++) SetPixel(fl_gc, p[i].x, p[i].y, fl_RGB());
+#elif defined(__APPLE_QUARTZ__)
+  if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, true);
+  for (int i=0; i<n; i++) { 
+    CGContextMoveToPoint(fl_gc, p[i].x, p[i].y);
+    CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
+    CGContextStrokePath(fl_gc);
+  }
+  if (fl_quartz_line_width_ > 1.5f) CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::end_line() {
+  if (n < 2) {
+    fltk3::end_points();
+    return;
+  }
+#if defined(USE_X11)
+  if (n>1) XDrawLines(fl_display, fl_window, fl_gc, p, n, 0);
+#elif defined(WIN32)
+  if (n>1) Polyline(fl_gc, p, n);
+#elif defined(__APPLE_QUARTZ__)
+  if (n<=1) return;
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, p[0].x, p[0].y);
+  for (int i=1; i<n; i++)
+    CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
+  CGContextStrokePath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::fixloop() {  // remove equal points from closed path
+  while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--;
+}
+
+void fltk3::GraphicsDriver::end_loop() {
+  fixloop();
+  if (n>2) fltk3::transformed_vertex((COORD_T)p[0].x, (COORD_T)p[0].y);
+  fltk3::end_line();
+}
+
+void fltk3::GraphicsDriver::end_polygon() {
+  fixloop();
+  if (n < 3) {
+    fltk3::end_line();
+    return;
+  }
+#if defined(USE_X11)
+  if (n>2) XFillPolygon(fl_display, fl_window, fl_gc, p, n, Convex, 0);
+#elif defined(WIN32)
+  if (n>2) {
+    SelectObject(fl_gc, fl_brush());
+    Polygon(fl_gc, p, n);
+  }
+#elif defined(__APPLE_QUARTZ__)
+  if (n<=1) return;
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, p[0].x, p[0].y);
+  for (int i=1; i<n; i++) 
+    CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
+  CGContextClosePath(fl_gc);
+  CGContextFillPath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+void fltk3::GraphicsDriver::begin_complex_polygon() {
+  fltk3::begin_polygon();
+  gap_ = 0;
+#if defined(WIN32)
+  numcount = 0;
+#endif
+}
+
+void fltk3::GraphicsDriver::gap() {
+  while (n>gap_+2 && p[n-1].x == p[gap_].x && p[n-1].y == p[gap_].y) n--;
+  if (n > gap_+2) {
+    fltk3::transformed_vertex((COORD_T)p[gap_].x, (COORD_T)p[gap_].y);
+#if defined(WIN32)
+    counts[numcount++] = n-gap_;
+#endif
+    gap_ = n;
+  } else {
+    n = gap_;
+  }
+}
+
+void fltk3::GraphicsDriver::end_complex_polygon() {
+  fltk3::gap();
+  if (n < 3) {
+    fltk3::end_line();
+    return;
+  }
+#if defined(USE_X11)
+  if (n>2) XFillPolygon(fl_display, fl_window, fl_gc, p, n, 0, 0);
+#elif defined(WIN32)
+  if (n>2) {
+    SelectObject(fl_gc, fl_brush());
+    PolyPolygon(fl_gc, p, counts, numcount);
+  }
+#elif defined(__APPLE_QUARTZ__)
+  if (n<=1) return;
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextMoveToPoint(fl_gc, p[0].x, p[0].y);
+  for (int i=1; i<n; i++)
+    CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
+  CGContextClosePath(fl_gc);
+  CGContextFillPath(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+// shortcut the closed circles so they use XDrawArc:
+// warning: these do not draw rotated ellipses correctly!
+// See fltk3::arc.c for portable version.
+
+void fltk3::GraphicsDriver::circle(double x, double y,double r) {
+  double xt = fltk3::transform_x(x,y);
+  double yt = fltk3::transform_y(x,y);
+  double rx = r * (m.c ? sqrt(m.a*m.a+m.c*m.c) : fabs(m.a));
+  double ry = r * (m.b ? sqrt(m.b*m.b+m.d*m.d) : fabs(m.d));
+  int llx = (int)rint(xt-rx);
+  int w = (int)rint(xt+rx)-llx;
+  int lly = (int)rint(yt-ry);
+  int h = (int)rint(yt+ry)-lly;
+
+#if defined(USE_X11)
+  (what == POLYGON ? XFillArc : XDrawArc)
+    (fl_display, fl_window, fl_gc, llx, lly, w, h, 0, 360*64);
+#elif defined(WIN32)
+  if (what==POLYGON) {
+    SelectObject(fl_gc, fl_brush());
+    Pie(fl_gc, llx, lly, llx+w, lly+h, 0,0, 0,0); 
+  } else
+    Arc(fl_gc, llx, lly, llx+w, lly+h, 0,0, 0,0); 
+#elif defined(__APPLE_QUARTZ__)
+  // Quartz warning: circle won't scale to current matrix!
+  // Last argument must be 0 (counter-clockwise) or it draws nothing under __LP64__ !!!!
+  CGContextSetShouldAntialias(fl_gc, true);
+  CGContextAddArc(fl_gc, xt, yt, (w+h)*0.25f, 0, 2.0f*M_PI, 0);
+  (what == POLYGON ? CGContextFillPath : CGContextStrokePath)(fl_gc);
+  CGContextSetShouldAntialias(fl_gc, false);
+#else
+# error unsupported platform
+#endif
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/fl_vertex.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/flstring.c
===================================================================
--- branches/branch-3.0/src/core/flstring.c	                        (rev 0)
+++ branches/branch-3.0/src/core/flstring.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,105 @@
+/*
+ * "$Id$"
+ *
+ * BSD string functions for the Fast Light Tool Kit (FLTK).
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#include "flstring.h"
+
+
+/*
+ * 'fl_strlcat()' - Safely concatenate two strings.
+ */
+
+size_t				/* O - Length of string */
+fl_strlcat(char       *dst,	/* O - Destination string */
+           const char *src,	/* I - Source string */
+	   size_t     size) {	/* I - Size of destination string buffer */
+  size_t	srclen;		/* Length of source string */
+  size_t	dstlen;		/* Length of destination string */
+
+
+ /*
+  * Figure out how much room is left...
+  */
+
+  dstlen = strlen(dst);
+  size   -= dstlen + 1;
+
+  if (!size) return (dstlen);	/* No room, return immediately... */
+
+ /*
+  * Figure out how much room is needed...
+  */
+
+  srclen = strlen(src);
+
+ /*
+  * Copy the appropriate amount...
+  */
+
+  if (srclen > size) srclen = size;
+
+  memcpy(dst + dstlen, src, srclen);
+  dst[dstlen + srclen] = '\0';
+
+  return (dstlen + srclen);
+}
+
+
+/*
+ * 'fl_strlcpy()' - Safely copy two strings.
+ */
+
+size_t				/* O - Length of string */
+fl_strlcpy(char       *dst,	/* O - Destination string */
+           const char *src,	/* I - Source string */
+	   size_t      size) {	/* I - Size of destination string buffer */
+  size_t	srclen;		/* Length of source string */
+
+
+ /*
+  * Figure out how much room is needed...
+  */
+
+  size --;
+
+  srclen = strlen(src);
+
+ /*
+  * Copy the appropriate amount...
+  */
+
+  if (srclen > size) srclen = size;
+
+  memcpy(dst, src, srclen);
+  dst[srclen] = '\0';
+
+  return (srclen);
+}
+
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/flstring.c
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/flstring.h
===================================================================
--- branches/branch-3.0/src/core/flstring.h	                        (rev 0)
+++ branches/branch-3.0/src/core/flstring.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,104 @@
+/*
+ * "$Id$"
+ *
+ * Common string header file for the Fast Light Tool Kit (FLTK).
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#ifndef flstring_h
+#  define flstring_h
+
+#  include <fltk3/Export.h>
+#  include <config.h>
+#  include <stdio.h>
+#  include <stdarg.h>
+#  include <string.h>
+#  ifdef HAVE_STRINGS_H
+#    include <strings.h>
+#  endif /* HAVE_STRINGS_H */
+#  include <ctype.h>
+
+/*
+ * Apparently Unixware defines "index" to strchr (!) rather than
+ * providing a proper entry point or not providing the (obsolete)
+ * BSD function.  Make sure index is not defined...
+ */
+
+#  ifdef index
+#    undef index
+#  endif /* index */
+
+#  if defined(WIN32) && !defined(__CYGWIN__)
+#    define strcasecmp(s,t)	_stricmp((s), (t))
+#    define strncasecmp(s,t,n)	_strnicmp((s), (t), (n))
+/* Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
+ * on Windows, which is supposed to be POSIX compliant...  Some of these
+ * functions are also defined in ISO C99...
+ */
+#    ifndef __WATCOMC__
+#      define strdup _strdup
+#      define unlink _unlink
+#    endif /* !__WATCOMC__ */
+#  elif defined(__EMX__)
+#    define strcasecmp(s,t)	stricmp((s), (t))
+#    define strncasecmp(s,t,n)	strnicmp((s), (t), (n))
+#  endif /* WIN32 */
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif /* __cplusplus */
+
+FLTK3_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...);
+#  if !HAVE_SNPRINTF
+#    define snprintf fl_snprintf
+#  endif /* !HAVE_SNPRINTF */
+
+FLTK3_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap);
+#  if !HAVE_VSNPRINTF
+#    define vsnprintf fl_vsnprintf
+#  endif /* !HAVE_VSNPRINTF */
+
+/*
+ * strlcpy() and strlcat() are some really useful BSD string functions
+ * that work the way strncpy() and strncat() *should* have worked.
+ */
+
+FLTK3_EXPORT extern size_t fl_strlcat(char *, const char *, size_t);
+#  if !HAVE_STRLCAT
+#    define strlcat fl_strlcat
+#  endif /* !HAVE_STRLCAT */
+
+FLTK3_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
+#  if !HAVE_STRLCPY
+#    define strlcpy fl_strlcpy
+#  endif /* !HAVE_STRLCPY */
+
+#  ifdef __cplusplus
+}
+#  endif /* __cplusplus */
+#endif /* !flstring_h */
+
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/flstring.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/forms_bitmap.cxx
===================================================================
--- branches/branch-3.0/src/core/forms_bitmap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/forms_bitmap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,54 @@
+//
+// "$Id$"
+//
+// Forms compatible bitmap function for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/forms.h>
+/** Creates a bitmap widget from a box type, position, size and optional label specification */
+Fl_FormsBitmap::Fl_FormsBitmap(
+  fltk3::Boxtype t, int X, int Y, int W, int H, const char* l)
+: fltk3::Widget(X, Y, W, H, l) {
+  box(t);
+  b = 0;
+  color(fltk3::BLACK);
+  align(fltk3::ALIGN_BOTTOM);
+}
+/** Sets a new bitmap bits with size W,H. Deletes the previous one.*/
+void Fl_FormsBitmap::set(int W, int H, const uchar *bits) {
+  delete b;
+  bitmap(new fltk3::Bitmap(bits, W, H));
+}
+
+/** Draws the bitmap and its associated box. */
+void Fl_FormsBitmap::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw_box(box(), selection_color());
+  if (b) {fltk3::color(color()); b->draw(x(), y(), w(), h());}
+  draw_label();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/forms_bitmap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/forms_compatability.cxx
===================================================================
--- branches/branch-3.0/src/core/forms_compatability.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/forms_compatability.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,214 @@
+//
+// "$Id$"
+//
+// Forms compatibility functions for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Forms library compatibility functions.
+// Many more functions are defined as inlines in forms.h!
+
+#include <fltk3/forms.h>
+#include <stdlib.h>
+
+char fl_flip = 2;
+void fl_end_form() {
+  while (fltk3::Group::current()) fltk3::Group::current()->forms_end();
+}
+void fltk3::Group::forms_end() {
+  // set the dimensions of a group to surround contents
+  if (children() && !w()) {
+    fltk3::Widget*const* a = array();
+    fltk3::Widget* o = *a++;
+    int rx = o->x();
+    int ry = o->y();
+    int rw = rx+o->w();
+    int rh = ry+o->h();
+    for (int i=children_-1; i--;) {
+      o = *a++;
+      if (o->x() < rx) rx = o->x();
+      if (o->y() < ry) ry = o->y();
+      if (o->x()+o->w() > rw) rw = o->x()+o->w();
+      if (o->y()+o->h() > rh) rh = o->y()+o->h();
+    }
+    x(rx);
+    y(ry);
+    w(rw-rx);
+    h(rh-ry);
+  }
+  // flip all the children's coordinate systems:
+  if (fl_flip) {
+    fltk3::Widget* o = (type()>=fltk3::WINDOW) ? this : window();
+    int Y = o->h();
+    fltk3::Widget*const* a = array();
+    for (int i=children(); i--;) {
+      fltk3::Widget* ow = *a++;
+      int newy = Y-ow->y()-ow->h();
+      ow->y(newy);
+    }
+  }
+  end();
+}
+
+static int initargc;
+static char **initargv;
+
+void fl_initialize(int *argc, char **argv, const char *, FL_CMD_OPT *, int) {
+  initargc = *argc;
+  initargv = new char*[*argc+1];
+  int i,j;
+  for (i=0; i<=*argc; i++) initargv[i] = argv[i];
+  for (i=j=1; i<*argc; ) {
+    if (fltk3::arg(*argc,argv,i));
+    else argv[j++] = argv[i++];
+  }
+  argv[j] = 0;
+  *argc = j;
+  if (fl_flip==2) fl_flip = 0;
+}
+
+char fl_modal_next; // set by fl_freeze_forms()
+
+void fl_show_form(fltk3::Window *f,int place,int b,const char *n) {
+
+  f->label(n);
+  if (!b) f->clear_border();
+  if (fl_modal_next || b==FL_TRANSIENT) {f->set_modal(); fl_modal_next = 0;}
+
+  if (place & FL_PLACE_MOUSE) f->hotspot(f);
+
+  if (place & FL_PLACE_CENTER) {
+    int scr_x, scr_y, scr_w, scr_h;
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+    f->position(scr_x+(scr_w-f->w())/2, scr_y+(scr_h-f->h())/2);
+  }
+
+  if (place & FL_PLACE_FULLSCREEN)
+    f->fullscreen();
+
+  if (place & (FL_PLACE_POSITION | FL_PLACE_GEOMETRY))
+    f->position(
+      (f->x() < 0) ? fltk3::w()-f->w()+f->x()-1 : f->x(),
+      (f->y() < 0) ? fltk3::h()-f->h()+f->y()-1 : f->y());
+
+// if (place & FL_PLACE_ASPECT) {
+// this is not yet implemented
+// it can be done by setting size_range().
+
+  if (place == FL_PLACE_FREE || place == FL_PLACE_SIZE)
+    f->free_position();
+
+  if (place == FL_PLACE_FREE || place & FL_FREE_SIZE)
+    if (!f->resizable()) f->resizable(f);
+
+  if (initargc) {f->show(initargc,initargv); initargc = 0;}
+  else f->show();
+}
+
+fltk3::Widget *fl_do_forms(void) {
+  fltk3::Widget *obj;
+  while (!(obj = fltk3::readqueue())) if (!fltk3::wait()) exit(0);
+  return obj;
+}
+
+fltk3::Widget *fl_check_forms() {
+  fltk3::check();
+  return fltk3::readqueue();
+}
+
+void fl_set_graphics_mode(int /*r*/,int /*d*/) {}
+
+#ifndef FLTK3_DOXYGEN // FIXME: suppress doxygen warning
+void Fl_FormsText::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw_box();
+  align(align()|fltk3::ALIGN_INSIDE); // questionable method of compatibility
+  draw_label();
+}
+#endif
+
+// Create a forms button by selecting correct fltk subclass:
+
+#include <fltk3/ReturnButton.h>
+#include <fltk3/RepeatButton.h>
+
+fltk3::Button *fl_add_button(uchar t,int x,int y,int w,int h,const char *l) {
+  fltk3::Button *b;
+  switch (t) {
+  case FL_RETURN_BUTTON:
+  case FL_HIDDEN_RET_BUTTON:
+    b = new fltk3::ReturnButton(x,y,w,h,l);
+    break;
+  case FL_TOUCH_BUTTON:
+    b = new fltk3::RepeatButton(x,y,w,h,l);
+    break;
+  default:
+    b = new fltk3::Button(x,y,w,h,l);
+  }
+  switch (t) {
+  case fltk3::TOGGLE_BUTTON:
+  case fltk3::RADIO_BUTTON:
+    b->type(t);
+    break;
+  case fltk3::HIDDEN_BUTTON:
+  case FL_HIDDEN_RET_BUTTON:
+    b->type(fltk3::HIDDEN_BUTTON);
+    break;
+  case FL_INOUT_BUTTON:
+    b->when(fltk3::WHEN_CHANGED);
+    break;
+  }
+  return b;
+}
+
+void fl_show_message(const char *q1,const char *q2,const char *q3) {
+  fltk3::message("%s\n%s\n%s", q1?q1:"", q2?q2:"", q3?q3:"");
+}
+
+void fl_show_alert(const char *q1,const char *q2,const char *q3,int) {
+  fltk3::alert("%s\n%s\n%s", q1?q1:"", q2?q2:"", q3?q3:"");
+}
+
+int fl_show_question(const char *q1,const char *q2,const char *q3) {
+  return fltk3::choice("%s\n%s\n%s", "No", "Yes", 0L, q1?q1:"", q2?q2:"", q3?q3:"");
+}
+
+int fl_show_choice(
+  const char *q1,
+  const char *q2,
+  const char *q3,
+  int, // number of buttons, ignored
+  const char *b0,
+  const char *b1,
+  const char *b2) {
+  return fltk3::choice("%s\n%s\n%s", q1?q1:"", q2?q2:"", q3?q3:"", b0,b1,b2)+1;
+}
+
+char *fl_show_simple_input(const char *str1, const char *defstr) {
+  const char *r = fltk3::input("%s", defstr, str1);
+  return (char *)(r ? r : defstr);
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/forms_compatability.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/forms_fselect.cxx
===================================================================
--- branches/branch-3.0/src/core/forms_fselect.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/forms_fselect.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,67 @@
+//
+// "$Id$"
+//
+// Forms file selection routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Emulate the Forms file chooser using the fltk file chooser.
+
+#include <fltk3/forms.h>
+#include "flstring.h"
+
+static char fl_directory[FLTK3_PATH_MAX];
+static const char *fl_pattern;  // assumed passed value is static
+static char fl_filename[FLTK3_PATH_MAX];
+
+char* fl_show_file_selector(const char *message,const char *dir,
+			    const char *pat,const char *fname) {
+  if (dir && dir[0]) strlcpy(fl_directory,dir,sizeof(fl_directory));
+  if (pat && pat[0]) fl_pattern = pat;
+  if (fname && fname[0]) strlcpy(fl_filename,fname,sizeof(fl_filename));
+  char *p = fl_directory+strlen(fl_directory);
+  if (p > fl_directory && *(p-1)!='/'
+#ifdef WIN32
+      && *(p-1)!='\\' && *(p-1)!=':'
+#endif
+      ) *p++ = '/';
+  strlcpy(p,fl_filename,sizeof(fl_directory) - (p - fl_directory));
+  const char *q = fltk3::file_chooser(message,fl_pattern,fl_directory);
+  if (!q) return 0;
+  strlcpy(fl_directory, q, sizeof(fl_directory));
+  p = (char *)fltk3::filename_name(fl_directory);
+  strlcpy(fl_filename, p, sizeof(fl_filename));
+  if (p > fl_directory+1) p--;
+  *p = 0;
+  return (char *)q;
+}
+
+char*	fl_get_directory() {return fl_directory;}
+
+char*	fl_get_pattern() {return (char *)fl_pattern;}
+
+char*	fl_get_filename() {return fl_filename;}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/forms_fselect.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/forms_pixmap.cxx
===================================================================
--- branches/branch-3.0/src/core/forms_pixmap.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/forms_pixmap.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,64 @@
+//
+// "$Id$"
+//
+// Forms pixmap drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#include <fltk3/forms.h>
+
+/**
+  Creates a new Fl_FormsPixmap widget using the given box type, position,
+  size and label string.
+  \param[in] t box type
+  \param[in] X, Y, W, H position and size
+  \param[in] L widget label, default is no label
+*/
+Fl_FormsPixmap::Fl_FormsPixmap(
+  fltk3::Boxtype t, int X, int Y, int W, int H, const char* L)
+: fltk3::Widget(X, Y, W, H, L) {
+  box(t);
+  b = 0;
+  color(fltk3::BLACK);
+  align(fltk3::ALIGN_BOTTOM);
+}
+
+/**
+  Set/create the internal pixmap using raw data.
+  \param[in] bits raw data
+*/
+void Fl_FormsPixmap::set(char*const* bits) {
+  delete b;
+  b = new fltk3::Pixmap(bits);
+}
+
+void Fl_FormsPixmap::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  draw_box(box(), selection_color());
+  if (b) {fltk3::color(color()); b->draw(x(), y(), w(), h());}
+  draw_label();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/forms_pixmap.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/forms_timer.cxx
===================================================================
--- branches/branch-3.0/src/core/forms_timer.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/forms_timer.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,188 @@
+//
+// "$Id$"
+//
+// Forms timer object for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Emulate the Forms Timer object
+// You don't want to use this if you just want a timeout, call
+// fltk3::add_timeout directly!
+
+#include <fltk3/run.h>
+#include <fltk3/Timer.h>
+#include <fltk3/draw.h>
+#ifdef WIN32
+#  ifdef __MWERKS__
+#    include <time.h>
+#  else
+#    include <sys/types.h> 
+#    include <sys/timeb.h>
+#  endif
+#else
+#  include <time.h>
+#  include <sys/time.h>
+#endif
+#include <stdio.h>
+
+#define FL_TIMER_BLINKRATE	0.2
+
+void fl_gettime(long* sec, long* usec) {
+#ifdef WIN32
+# ifdef __MWERKS__
+  time_t localTime = time(NULL);
+  struct tm *now = localtime(&localTime);
+  *sec = now->tm_sec + 60*now->tm_min + 3600*now->tm_hour + 24*3600*now->tm_yday;
+  *usec = 0;
+# else
+  struct timeb tp;
+  ftime(&tp);
+  *sec = tp.time;
+  *usec = tp.millitm * 1000;
+# endif
+#else
+  struct timeval tp;
+  struct timezone tzp;
+  gettimeofday(&tp, &tzp);
+  *sec = tp.tv_sec;
+  *usec = tp.tv_usec;
+#endif
+}
+
+void fltk3::Timer::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  int tt;
+  fltk3::Color col;
+  char str[32];
+  if (!on || delay>0.0)
+    col = color();
+  else if ((int) (delay / FL_TIMER_BLINKRATE) % 2)
+    col = color();
+  else
+    col = selection_color();
+  draw_box(box(), col);
+  if (type() == fltk3::VALUE_TIMER && delay>0.0) {
+    double d = direction_ ? total-delay : delay;
+    if (d < 60.0)
+      sprintf(str, "%.1f", d);
+    else {
+      tt = (int) ((d+0.05) / 60.0);
+      sprintf(str, "%d:%04.1f", tt, d - 60.0 * tt);
+    }
+    fltk3::font(labelfont(), labelsize());
+    fltk3::color(labelcolor());
+    fltk3::draw(str, x(), y(), w(), h(), fltk3::ALIGN_CENTER);
+  } else
+    draw_label();
+}
+
+void fltk3::Timer::stepcb(void* v) {
+  ((fltk3::Timer*)v)->step();
+}
+
+void fltk3::Timer::step() {
+  if (!on) return;
+  double lastdelay = delay;
+  long sec, usec; fl_gettime(&sec, &usec);
+  delay -= (double) (sec - lastsec) + (double) (usec - lastusec) / 1000000.0;
+  lastsec = sec; lastusec = usec;
+  if (lastdelay > 0.0 && delay <= 0.0) {
+    if (type() == fltk3::HIDDEN_TIMER) {
+      on = 0;
+      delay = 0;
+    } else {
+      redraw();
+      fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+    }
+    set_changed();
+    do_callback();
+  } else {
+    if (type() == fltk3::VALUE_TIMER) redraw();
+    fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+  }
+}
+
+int fltk3::Timer::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  if (event == fltk3::RELEASE && delay <= 0) value(0.0);
+  return 0;
+}
+
+/**
+ Destroys the timer and removes the timeout.
+*/
+fltk3::Timer::~Timer() {
+  fltk3::remove_timeout(stepcb, this);
+}
+
+/**
+  Creates a new fltk3::Timer widget using the given type, position,
+  size, and label string. The type parameter can be any of the
+  following symbolic constants:
+
+  \li	fltk3::NORMAL_TIMER - The timer just does the callback and
+	displays the string "Timer" in the widget.
+  \li	fltk3::VALUE_TIMER - The timer does the callback and displays
+	the current timer value in the widget.
+  \li	fltk3::HIDDEN_TIMER - The timer just does the callback and
+	does not display anything.
+*/
+fltk3::Timer::Timer(uchar t, int X, int Y, int W, int H, const char* l)
+
+: fltk3::Widget(X, Y, W, H, l) {
+  box(fltk3::DOWN_BOX);
+  selection_color(fltk3::RED);
+  delay = 0;
+  on = 0;
+  direction_ = 0;
+  type(t);
+  if (t == fltk3::HIDDEN_TIMER) clear_visible();
+  if (t == fltk3::VALUE_TIMER) align(fltk3::ALIGN_LEFT);
+}
+/** Sets the current timer value */
+void fltk3::Timer::value(double d) {
+  delay = total = d;
+  on = (d > 0.0);
+  fl_gettime(&(lastsec), &(lastusec));
+  if (type() != fltk3::HIDDEN_TIMER) redraw();
+  fltk3::remove_timeout(stepcb, this);
+  if (on) fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+}
+
+/** Gets or sets whether the timer is suspended.*/
+void fltk3::Timer::suspended(char d) {
+  if (!d) {
+    if (on) return;
+    on = (delay > 0.0);
+    fl_gettime(&(lastsec), &(lastusec));
+    if (on) fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+  } else {
+    if (!on) return;
+    on = 0;
+    fltk3::remove_timeout(stepcb, this);
+  }
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/forms_timer.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/freeglut_geometry.cxx
===================================================================
--- branches/branch-3.0/src/core/freeglut_geometry.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/freeglut_geometry.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1110 @@
+/*
+ * freeglut_geometry.c
+ *
+ * Freeglut geometry rendering methods.
+ *
+ * Copyright (c) 1999-2010 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Creation date: Fri Dec 3 1999
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <fltk3/glut.h>
+#include <fltk3/math.h>
+#include <stdlib.h>
+
+/*
+ * TODO BEFORE THE STABLE RELEASE:
+ *
+ * Following functions have been contributed by Andreas Umbach.
+ *
+ *      glutWireCube()          -- looks OK
+ *      glutSolidCube()         -- OK
+ *
+ * Those functions have been implemented by John Fay.
+ *
+ *      glutWireTorus()         -- looks OK
+ *      glutSolidTorus()        -- looks OK
+ *      glutWireDodecahedron()  -- looks OK
+ *      glutSolidDodecahedron() -- looks OK
+ *      glutWireOctahedron()    -- looks OK
+ *      glutSolidOctahedron()   -- looks OK
+ *      glutWireTetrahedron()   -- looks OK
+ *      glutSolidTetrahedron()  -- looks OK
+ *      glutWireIcosahedron()   -- looks OK
+ *      glutSolidIcosahedron()  -- looks OK
+ *
+ *  The Following functions have been updated by Nigel Stewart, based
+ *  on FreeGLUT 2.0.0 implementations:
+ *
+ *      glutWireSphere()        -- looks OK
+ *      glutSolidSphere()       -- looks OK
+ *      glutWireCone()          -- looks OK
+ *      glutSolidCone()         -- looks OK
+ */
+
+
+/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
+
+/*
+ * Draws a wireframed cube. Code contributed by Andreas Umbach <marvin@dataway.ch>
+ */
+void glutWireCube( GLdouble dSize )
+{
+    double size = dSize * 0.5;
+
+#   define V(a,b,c) glVertex3d( a size, b size, c size );
+#   define N(a,b,c) glNormal3d( a, b, c );
+
+    /* PWO: I dared to convert the code to use macros... */
+    glBegin( GL_LINE_LOOP ); N( 1.0, 0.0, 0.0); V(+,-,+); V(+,-,-); V(+,+,-); V(+,+,+); glEnd();
+    glBegin( GL_LINE_LOOP ); N( 0.0, 1.0, 0.0); V(+,+,+); V(+,+,-); V(-,+,-); V(-,+,+); glEnd();
+    glBegin( GL_LINE_LOOP ); N( 0.0, 0.0, 1.0); V(+,+,+); V(-,+,+); V(-,-,+); V(+,-,+); glEnd();
+    glBegin( GL_LINE_LOOP ); N(-1.0, 0.0, 0.0); V(-,-,+); V(-,+,+); V(-,+,-); V(-,-,-); glEnd();
+    glBegin( GL_LINE_LOOP ); N( 0.0,-1.0, 0.0); V(-,-,+); V(-,-,-); V(+,-,-); V(+,-,+); glEnd();
+    glBegin( GL_LINE_LOOP ); N( 0.0, 0.0,-1.0); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-); glEnd();
+
+#   undef V
+#   undef N
+}
+
+/*
+ * Draws a solid cube. Code contributed by Andreas Umbach <marvin@dataway.ch>
+ */
+void glutSolidCube( GLdouble dSize )
+{
+    double size = dSize * 0.5;
+
+#   define V(a,b,c) glVertex3d( a size, b size, c size );
+#   define N(a,b,c) glNormal3d( a, b, c );
+
+    /* PWO: Again, I dared to convert the code to use macros... */
+    glBegin( GL_QUADS );
+        N( 1.0, 0.0, 0.0); V(+,-,+); V(+,-,-); V(+,+,-); V(+,+,+);
+        N( 0.0, 1.0, 0.0); V(+,+,+); V(+,+,-); V(-,+,-); V(-,+,+);
+        N( 0.0, 0.0, 1.0); V(+,+,+); V(-,+,+); V(-,-,+); V(+,-,+);
+        N(-1.0, 0.0, 0.0); V(-,-,+); V(-,+,+); V(-,+,-); V(-,-,-);
+        N( 0.0,-1.0, 0.0); V(-,-,+); V(-,-,-); V(+,-,-); V(+,-,+);
+        N( 0.0, 0.0,-1.0); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-);
+    glEnd();
+
+#   undef V
+#   undef N
+}
+
+/*
+ * Compute lookup table of cos and sin values forming a cirle
+ *
+ * Notes:
+ *    It is the responsibility of the caller to free these tables
+ *    The size of the table is (n+1) to form a connected loop
+ *    The last entry is exactly the same as the first
+ *    The sign of n can be flipped to get the reverse loop
+ */
+
+static void fghCircleTable(double **sint,double **cost,const int n)
+{
+    int i;
+
+    /* Table size, the sign of n flips the circle direction */
+
+    const int size = abs(n);
+
+    /* Determine the angle between samples */
+
+    const double angle = 2*M_PI/(double)( ( n == 0 ) ? 1 : n );
+
+    /* Allocate memory for n samples, plus duplicate of first entry at the end */
+
+    *sint = (double *) calloc(sizeof(double), size+1);
+    *cost = (double *) calloc(sizeof(double), size+1);
+
+    /* Bail out if memory allocation fails, fgError never returns */
+
+    if (!(*sint) || !(*cost))
+    {
+      if (*sint) free(*sint);
+      if (*cost) free(*cost);
+      return;
+    }
+
+    /* Compute cos and sin around the circle */
+
+    (*sint)[0] = 0.0;
+    (*cost)[0] = 1.0;
+
+    for (i=1; i<size; i++)
+    {
+        (*sint)[i] = sin(angle*i);
+        (*cost)[i] = cos(angle*i);
+    }
+
+    /* Last sample is duplicate of the first */
+
+    (*sint)[size] = (*sint)[0];
+    (*cost)[size] = (*cost)[0];
+}
+
+/*
+ * Draws a solid sphere
+ */
+void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)
+{
+    int i,j;
+
+    /* Adjust z and radius as stacks are drawn. */
+
+    double z0,z1;
+    double r0,r1;
+
+    /* Pre-computed circle */
+
+    double *sint1,*cost1;
+    double *sint2,*cost2;
+
+    fghCircleTable(&sint1,&cost1,-slices);
+    fghCircleTable(&sint2,&cost2,stacks*2);
+
+    /* The top stack is covered with a triangle fan */
+
+    z0 = 1.0;
+    z1 = cost2[(stacks>0)?1:0];
+    r0 = 0.0;
+    r1 = sint2[(stacks>0)?1:0];
+
+    glBegin(GL_TRIANGLE_FAN);
+
+        glNormal3d(0,0,1);
+        glVertex3d(0,0,radius);
+
+        for (j=slices; j>=0; j--)
+        {
+            glNormal3d(cost1[j]*r1,        sint1[j]*r1,        z1       );
+            glVertex3d(cost1[j]*r1*radius, sint1[j]*r1*radius, z1*radius);
+        }
+
+    glEnd();
+
+    /* Cover each stack with a quad strip, except the top and bottom stacks */
+
+    for( i=1; i<stacks-1; i++ )
+    {
+        z0 = z1; z1 = cost2[i+1];
+        r0 = r1; r1 = sint2[i+1];
+
+        glBegin(GL_QUAD_STRIP);
+
+            for(j=0; j<=slices; j++)
+            {
+                glNormal3d(cost1[j]*r1,        sint1[j]*r1,        z1       );
+                glVertex3d(cost1[j]*r1*radius, sint1[j]*r1*radius, z1*radius);
+                glNormal3d(cost1[j]*r0,        sint1[j]*r0,        z0       );
+                glVertex3d(cost1[j]*r0*radius, sint1[j]*r0*radius, z0*radius);
+            }
+
+        glEnd();
+    }
+
+    /* The bottom stack is covered with a triangle fan */
+
+    z0 = z1;
+    r0 = r1;
+
+    glBegin(GL_TRIANGLE_FAN);
+
+        glNormal3d(0,0,-1);
+        glVertex3d(0,0,-radius);
+
+        for (j=0; j<=slices; j++)
+        {
+            glNormal3d(cost1[j]*r0,        sint1[j]*r0,        z0       );
+            glVertex3d(cost1[j]*r0*radius, sint1[j]*r0*radius, z0*radius);
+        }
+
+    glEnd();
+
+    /* Release sin and cos tables */
+
+    free(sint1);
+    free(cost1);
+    free(sint2);
+    free(cost2);
+}
+
+/*
+ * Draws a wire sphere
+ */
+void glutWireSphere(GLdouble radius, GLint slices, GLint stacks)
+{
+    int i,j;
+
+    /* Adjust z and radius as stacks and slices are drawn. */
+
+    double r;
+    double x,y,z;
+
+    /* Pre-computed circle */
+
+    double *sint1,*cost1;
+    double *sint2,*cost2;
+
+    fghCircleTable(&sint1,&cost1,-slices  );
+    fghCircleTable(&sint2,&cost2, stacks*2);
+
+    /* Draw a line loop for each stack */
+
+    for (i=1; i<stacks; i++)
+    {
+        z = cost2[i];
+        r = sint2[i];
+
+        glBegin(GL_LINE_LOOP);
+
+            for(j=0; j<=slices; j++)
+            {
+                x = cost1[j];
+                y = sint1[j];
+
+                glNormal3d(x,y,z);
+                glVertex3d(x*r*radius,y*r*radius,z*radius);
+            }
+
+        glEnd();
+    }
+
+    /* Draw a line loop for each slice */
+
+    for (i=0; i<slices; i++)
+    {
+        glBegin(GL_LINE_STRIP);
+
+            for(j=0; j<=stacks; j++)
+            {
+                x = cost1[i]*sint2[j];
+                y = sint1[i]*sint2[j];
+                z = cost2[j];
+
+                glNormal3d(x,y,z);
+                glVertex3d(x*radius,y*radius,z*radius);
+            }
+
+        glEnd();
+    }
+
+    /* Release sin and cos tables */
+
+    free(sint1);
+    free(cost1);
+    free(sint2);
+    free(cost2);
+}
+
+/*
+ * Draws a solid cone
+ */
+void glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks )
+{
+    int i,j;
+
+    /* Step in z and radius as stacks are drawn. */
+
+    double z0,z1;
+    double r0,r1;
+
+    const double zStep = height / ( ( stacks > 0 ) ? stacks : 1 );
+    const double rStep = base / ( ( stacks > 0 ) ? stacks : 1 );
+
+    /* Scaling factors for vertex normals */
+
+    const double cosn = ( height / sqrt ( height * height + base * base ));
+    const double sinn = ( base   / sqrt ( height * height + base * base ));
+
+    /* Pre-computed circle */
+
+    double *sint,*cost;
+
+    fghCircleTable(&sint,&cost,-slices);
+
+    /* Cover the circular base with a triangle fan... */
+
+    z0 = 0.0;
+    z1 = zStep;
+
+    r0 = base;
+    r1 = r0 - rStep;
+
+    glBegin(GL_TRIANGLE_FAN);
+
+        glNormal3d(0.0,0.0,-1.0);
+        glVertex3d(0.0,0.0, z0 );
+
+        for (j=0; j<=slices; j++)
+            glVertex3d(cost[j]*r0, sint[j]*r0, z0);
+
+    glEnd();
+
+    /* Cover each stack with a quad strip, except the top stack */
+
+    for( i=0; i<stacks-1; i++ )
+    {
+        glBegin(GL_QUAD_STRIP);
+
+            for(j=0; j<=slices; j++)
+            {
+                glNormal3d(cost[j]*sinn, sint[j]*sinn, cosn);
+                glVertex3d(cost[j]*r0,   sint[j]*r0,   z0  );
+                glVertex3d(cost[j]*r1,   sint[j]*r1,   z1  );
+            }
+
+            z0 = z1; z1 += zStep;
+            r0 = r1; r1 -= rStep;
+
+        glEnd();
+    }
+
+    /* The top stack is covered with individual triangles */
+
+    glBegin(GL_TRIANGLES);
+
+        glNormal3d(cost[0]*sinn, sint[0]*sinn, cosn);
+
+        for (j=0; j<slices; j++)
+        {
+            glVertex3d(cost[j+0]*r0,   sint[j+0]*r0,   z0    );
+            glVertex3d(0,              0,              height);
+            glNormal3d(cost[j+1]*sinn, sint[j+1]*sinn, cosn  );
+            glVertex3d(cost[j+1]*r0,   sint[j+1]*r0,   z0    );
+        }
+
+    glEnd();
+
+    /* Release sin and cos tables */
+
+    free(sint);
+    free(cost);
+}
+
+/*
+ * Draws a wire cone
+ */
+void glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks)
+{
+    int i,j;
+
+    /* Step in z and radius as stacks are drawn. */
+
+    double z = 0.0;
+    double r = base;
+
+    const double zStep = height / ( ( stacks > 0 ) ? stacks : 1 );
+    const double rStep = base / ( ( stacks > 0 ) ? stacks : 1 );
+
+    /* Scaling factors for vertex normals */
+
+    const double cosn = ( height / sqrt ( height * height + base * base ));
+    const double sinn = ( base   / sqrt ( height * height + base * base ));
+
+    /* Pre-computed circle */
+
+    double *sint,*cost;
+
+    fghCircleTable(&sint,&cost,-slices);
+
+    /* Draw the stacks... */
+
+    for (i=0; i<stacks; i++)
+    {
+        glBegin(GL_LINE_LOOP);
+
+            for( j=0; j<slices; j++ )
+            {
+                glNormal3d(cost[j]*sinn, sint[j]*sinn, cosn);
+                glVertex3d(cost[j]*r,    sint[j]*r,    z   );
+            }
+
+        glEnd();
+
+        z += zStep;
+        r -= rStep;
+    }
+
+    /* Draw the slices */
+
+    r = base;
+
+    glBegin(GL_LINES);
+
+        for (j=0; j<slices; j++)
+        {
+            glNormal3d(cost[j]*sinn, sint[j]*sinn, cosn  );
+            glVertex3d(cost[j]*r,    sint[j]*r,    0.0   );
+            glVertex3d(0.0,          0.0,          height);
+        }
+
+    glEnd();
+
+    /* Release sin and cos tables */
+
+    free(sint);
+    free(cost);
+}
+
+
+/*
+ * Draws a solid cylinder
+ */
+void glutSolidCylinder(GLdouble radius, GLdouble height, GLint slices, GLint stacks)
+{
+    int i,j;
+
+    /* Step in z and radius as stacks are drawn. */
+
+    double z0,z1;
+    const double zStep = height / ( ( stacks > 0 ) ? stacks : 1 );
+
+    /* Pre-computed circle */
+
+    double *sint,*cost;
+
+    fghCircleTable(&sint,&cost,-slices);
+
+    /* Cover the base and top */
+
+    glBegin(GL_TRIANGLE_FAN);
+        glNormal3d(0.0, 0.0, -1.0 );
+        glVertex3d(0.0, 0.0,  0.0 );
+        for (j=0; j<=slices; j++)
+          glVertex3d(cost[j]*radius, sint[j]*radius, 0.0);
+    glEnd();
+
+    glBegin(GL_TRIANGLE_FAN);
+        glNormal3d(0.0, 0.0, 1.0   );
+        glVertex3d(0.0, 0.0, height);
+        for (j=slices; j>=0; j--)
+          glVertex3d(cost[j]*radius, sint[j]*radius, height);
+    glEnd();
+
+    /* Do the stacks */
+
+    z0 = 0.0;
+    z1 = zStep;
+
+    for (i=1; i<=stacks; i++)
+    {
+        if (i==stacks)
+            z1 = height;
+
+        glBegin(GL_QUAD_STRIP);
+            for (j=0; j<=slices; j++ )
+            {
+                glNormal3d(cost[j],        sint[j],        0.0 );
+                glVertex3d(cost[j]*radius, sint[j]*radius, z0  );
+                glVertex3d(cost[j]*radius, sint[j]*radius, z1  );
+            }
+        glEnd();
+
+        z0 = z1; z1 += zStep;
+    }
+
+    /* Release sin and cos tables */
+
+    free(sint);
+    free(cost);
+}
+
+/*
+ * Draws a wire cylinder
+ */
+void glutWireCylinder(GLdouble radius, GLdouble height, GLint slices, GLint stacks)
+{
+    int i,j;
+
+    /* Step in z and radius as stacks are drawn. */
+
+          double z = 0.0;
+    const double zStep = height / ( ( stacks > 0 ) ? stacks : 1 );
+
+    /* Pre-computed circle */
+
+    double *sint,*cost;
+
+    fghCircleTable(&sint,&cost,-slices);
+
+    /* Draw the stacks... */
+
+    for (i=0; i<=stacks; i++)
+    {
+        if (i==stacks)
+            z = height;
+
+        glBegin(GL_LINE_LOOP);
+
+            for( j=0; j<slices; j++ )
+            {
+                glNormal3d(cost[j],        sint[j],        0.0);
+                glVertex3d(cost[j]*radius, sint[j]*radius, z  );
+            }
+
+        glEnd();
+
+        z += zStep;
+    }
+
+    /* Draw the slices */
+
+    glBegin(GL_LINES);
+
+        for (j=0; j<slices; j++)
+        {
+            glNormal3d(cost[j],        sint[j],        0.0   );
+            glVertex3d(cost[j]*radius, sint[j]*radius, 0.0   );
+            glVertex3d(cost[j]*radius, sint[j]*radius, height);
+        }
+
+    glEnd();
+
+    /* Release sin and cos tables */
+
+    free(sint);
+    free(cost);
+}
+
+/*
+ * Draws a wire torus
+ */
+void glutWireTorus( GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings )
+{
+  double  iradius = dInnerRadius, oradius = dOuterRadius, phi, psi, dpsi, dphi;
+  double *vertex, *normal;
+  int    i, j;
+  double spsi, cpsi, sphi, cphi ;
+
+  if ( nSides < 1 ) nSides = 1;
+  if ( nRings < 1 ) nRings = 1;
+
+  /* Allocate the vertices array */
+  vertex = (double *)calloc( sizeof(double), 3 * nSides * nRings );
+  normal = (double *)calloc( sizeof(double), 3 * nSides * nRings );
+
+  glPushMatrix();
+
+  dpsi =  2.0 * M_PI / (double)nRings ;
+  dphi = -2.0 * M_PI / (double)nSides ;
+  psi  = 0.0;
+
+  for( j=0; j<nRings; j++ )
+  {
+    cpsi = cos ( psi ) ;
+    spsi = sin ( psi ) ;
+    phi = 0.0;
+
+    for( i=0; i<nSides; i++ )
+    {
+      int offset = 3 * ( j * nSides + i ) ;
+      cphi = cos ( phi ) ;
+      sphi = sin ( phi ) ;
+      *(vertex + offset + 0) = cpsi * ( oradius + cphi * iradius ) ;
+      *(vertex + offset + 1) = spsi * ( oradius + cphi * iradius ) ;
+      *(vertex + offset + 2) =                    sphi * iradius  ;
+      *(normal + offset + 0) = cpsi * cphi ;
+      *(normal + offset + 1) = spsi * cphi ;
+      *(normal + offset + 2) =        sphi ;
+      phi += dphi;
+    }
+
+    psi += dpsi;
+  }
+
+  for( i=0; i<nSides; i++ )
+  {
+    glBegin( GL_LINE_LOOP );
+
+    for( j=0; j<nRings; j++ )
+    {
+      int offset = 3 * ( j * nSides + i ) ;
+      glNormal3dv( normal + offset );
+      glVertex3dv( vertex + offset );
+    }
+
+    glEnd();
+  }
+
+  for( j=0; j<nRings; j++ )
+  {
+    glBegin(GL_LINE_LOOP);
+
+    for( i=0; i<nSides; i++ )
+    {
+      int offset = 3 * ( j * nSides + i ) ;
+      glNormal3dv( normal + offset );
+      glVertex3dv( vertex + offset );
+    }
+
+    glEnd();
+  }
+
+  free ( vertex ) ;
+  free ( normal ) ;
+  glPopMatrix();
+}
+
+/*
+ * Draws a solid torus
+ */
+void glutSolidTorus( GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings )
+{
+  double  iradius = dInnerRadius, oradius = dOuterRadius, phi, psi, dpsi, dphi;
+  double *vertex, *normal;
+  int    i, j;
+  double spsi, cpsi, sphi, cphi ;
+
+  if ( nSides < 1 ) nSides = 1;
+  if ( nRings < 1 ) nRings = 1;
+
+  /* Increment the number of sides and rings to allow for one more point than surface */
+  nSides ++ ;
+  nRings ++ ;
+
+  /* Allocate the vertices array */
+  vertex = (double *)calloc( sizeof(double), 3 * nSides * nRings );
+  normal = (double *)calloc( sizeof(double), 3 * nSides * nRings );
+
+  glPushMatrix();
+
+  dpsi =  2.0 * M_PI / (double)(nRings - 1) ;
+  dphi = -2.0 * M_PI / (double)(nSides - 1) ;
+  psi  = 0.0;
+
+  for( j=0; j<nRings; j++ )
+  {
+    cpsi = cos ( psi ) ;
+    spsi = sin ( psi ) ;
+    phi = 0.0;
+
+    for( i=0; i<nSides; i++ )
+    {
+      int offset = 3 * ( j * nSides + i ) ;
+      cphi = cos ( phi ) ;
+      sphi = sin ( phi ) ;
+      *(vertex + offset + 0) = cpsi * ( oradius + cphi * iradius ) ;
+      *(vertex + offset + 1) = spsi * ( oradius + cphi * iradius ) ;
+      *(vertex + offset + 2) =                    sphi * iradius  ;
+      *(normal + offset + 0) = cpsi * cphi ;
+      *(normal + offset + 1) = spsi * cphi ;
+      *(normal + offset + 2) =        sphi ;
+      phi += dphi;
+    }
+
+    psi += dpsi;
+  }
+
+    glBegin( GL_QUADS );
+  for( i=0; i<nSides-1; i++ )
+  {
+    for( j=0; j<nRings-1; j++ )
+    {
+      int offset = 3 * ( j * nSides + i ) ;
+      glNormal3dv( normal + offset );
+      glVertex3dv( vertex + offset );
+      glNormal3dv( normal + offset + 3 );
+      glVertex3dv( vertex + offset + 3 );
+      glNormal3dv( normal + offset + 3 * nSides + 3 );
+      glVertex3dv( vertex + offset + 3 * nSides + 3 );
+      glNormal3dv( normal + offset + 3 * nSides );
+      glVertex3dv( vertex + offset + 3 * nSides );
+    }
+  }
+
+  glEnd();
+
+  free ( vertex ) ;
+  free ( normal ) ;
+  glPopMatrix();
+}
+
+/*
+ *
+ */
+void glutWireDodecahedron( void )
+{
+  /* Magic Numbers:  It is possible to create a dodecahedron by attaching two pentagons to each face of
+   * of a cube.  The coordinates of the points are:
+   *   (+-x,0, z); (+-1, 1, 1); (0, z, x )
+   * where x = (-1 + sqrt(5))/2, z = (1 + sqrt(5))/2  or
+   *       x = 0.61803398875 and z = 1.61803398875.
+   */
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.0,  0.525731112119,  0.850650808354 ) ; glVertex3d (  0.0,  1.61803398875,  0.61803398875 ) ; glVertex3d ( -1.0,  1.0,  1.0 ) ; glVertex3d ( -0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d (  0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d (  1.0,  1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.0,  0.525731112119, -0.850650808354 ) ; glVertex3d (  0.0,  1.61803398875, -0.61803398875 ) ; glVertex3d (  1.0,  1.0, -1.0 ) ; glVertex3d (  0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d ( -0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d ( -1.0,  1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.0, -0.525731112119,  0.850650808354 ) ; glVertex3d (  0.0, -1.61803398875,  0.61803398875 ) ; glVertex3d (  1.0, -1.0,  1.0 ) ; glVertex3d (  0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d ( -0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d ( -1.0, -1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.0, -0.525731112119, -0.850650808354 ) ; glVertex3d (  0.0, -1.61803398875, -0.61803398875 ) ; glVertex3d ( -1.0, -1.0, -1.0 ) ; glVertex3d ( -0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d (  0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d (  1.0, -1.0, -1.0 ) ;
+  glEnd () ;
+
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.850650808354,  0.0,  0.525731112119 ) ; glVertex3d (  0.61803398875,  0.0,  1.61803398875 ) ; glVertex3d (  1.0, -1.0,  1.0 ) ; glVertex3d (  1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d (  1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d (  1.0,  1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d ( -0.850650808354,  0.0,  0.525731112119 ) ; glVertex3d ( -0.61803398875,  0.0,  1.61803398875 ) ; glVertex3d ( -1.0,  1.0,  1.0 ) ; glVertex3d ( -1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d ( -1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d ( -1.0, -1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.850650808354,  0.0, -0.525731112119 ) ; glVertex3d (  0.61803398875,  0.0, -1.61803398875 ) ; glVertex3d (  1.0,  1.0, -1.0 ) ; glVertex3d (  1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d (  1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d (  1.0, -1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d ( -0.850650808354,  0.0, -0.525731112119 ) ; glVertex3d ( -0.61803398875,  0.0, -1.61803398875 ) ; glVertex3d ( -1.0, -1.0, -1.0 ) ; glVertex3d ( -1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d ( -1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d ( -1.0,  1.0, -1.0 ) ;
+  glEnd () ;
+
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.525731112119,  0.850650808354,  0.0 ) ; glVertex3d (  1.61803398875,  0.61803398875,  0.0 ) ; glVertex3d (  1.0,  1.0, -1.0 ) ; glVertex3d ( 0.0,  1.61803398875, -0.61803398875 ) ; glVertex3d ( 0.0,  1.61803398875,  0.61803398875 ) ; glVertex3d (  1.0,  1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d (  0.525731112119, -0.850650808354,  0.0 ) ; glVertex3d (  1.61803398875, -0.61803398875,  0.0 ) ; glVertex3d (  1.0, -1.0,  1.0 ) ; glVertex3d ( 0.0, -1.61803398875,  0.61803398875 ) ; glVertex3d ( 0.0, -1.61803398875, -0.61803398875 ) ; glVertex3d (  1.0, -1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d ( -0.525731112119,  0.850650808354,  0.0 ) ; glVertex3d ( -1.61803398875,  0.61803398875,  0.0 ) ; glVertex3d ( -1.0,  1.0,  1.0 ) ; glVertex3d ( 0.0,  1.61803398875,  0.61803398875 ) ; glVertex3d ( 0.0,  1.61803398875, -0.61803398875 ) ; glVertex3d ( -1.0,  1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_LINE_LOOP ) ;
+  glNormal3d ( -0.525731112119, -0.850650808354,  0.0 ) ; glVertex3d ( -1.61803398875, -0.61803398875,  0.0 ) ; glVertex3d ( -1.0, -1.0, -1.0 ) ; glVertex3d ( 0.0, -1.61803398875, -0.61803398875 ) ; glVertex3d ( 0.0, -1.61803398875,  0.61803398875 ) ; glVertex3d ( -1.0, -1.0,  1.0 ) ;
+  glEnd () ;
+}
+
+/*
+ *
+ */
+void glutSolidDodecahedron( void )
+{
+  /* Magic Numbers:  It is possible to create a dodecahedron by attaching two pentagons to each face of
+   * of a cube.  The coordinates of the points are:
+   *   (+-x,0, z); (+-1, 1, 1); (0, z, x )
+   * where x = (-1 + sqrt(5))/2, z = (1 + sqrt(5))/2 or
+   *       x = 0.61803398875 and z = 1.61803398875.
+   */
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.0,  0.525731112119,  0.850650808354 ) ; glVertex3d (  0.0,  1.61803398875,  0.61803398875 ) ; glVertex3d ( -1.0,  1.0,  1.0 ) ; glVertex3d ( -0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d (  0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d (  1.0,  1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.0,  0.525731112119, -0.850650808354 ) ; glVertex3d (  0.0,  1.61803398875, -0.61803398875 ) ; glVertex3d (  1.0,  1.0, -1.0 ) ; glVertex3d (  0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d ( -0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d ( -1.0,  1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.0, -0.525731112119,  0.850650808354 ) ; glVertex3d (  0.0, -1.61803398875,  0.61803398875 ) ; glVertex3d (  1.0, -1.0,  1.0 ) ; glVertex3d (  0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d ( -0.61803398875, 0.0,  1.61803398875 ) ; glVertex3d ( -1.0, -1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.0, -0.525731112119, -0.850650808354 ) ; glVertex3d (  0.0, -1.61803398875, -0.61803398875 ) ; glVertex3d ( -1.0, -1.0, -1.0 ) ; glVertex3d ( -0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d (  0.61803398875, 0.0, -1.61803398875 ) ; glVertex3d (  1.0, -1.0, -1.0 ) ;
+  glEnd () ;
+
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.850650808354,  0.0,  0.525731112119 ) ; glVertex3d (  0.61803398875,  0.0,  1.61803398875 ) ; glVertex3d (  1.0, -1.0,  1.0 ) ; glVertex3d (  1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d (  1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d (  1.0,  1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d ( -0.850650808354,  0.0,  0.525731112119 ) ; glVertex3d ( -0.61803398875,  0.0,  1.61803398875 ) ; glVertex3d ( -1.0,  1.0,  1.0 ) ; glVertex3d ( -1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d ( -1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d ( -1.0, -1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.850650808354,  0.0, -0.525731112119 ) ; glVertex3d (  0.61803398875,  0.0, -1.61803398875 ) ; glVertex3d (  1.0,  1.0, -1.0 ) ; glVertex3d (  1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d (  1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d (  1.0, -1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d ( -0.850650808354,  0.0, -0.525731112119 ) ; glVertex3d ( -0.61803398875,  0.0, -1.61803398875 ) ; glVertex3d ( -1.0, -1.0, -1.0 ) ; glVertex3d ( -1.61803398875, -0.61803398875, 0.0 ) ; glVertex3d ( -1.61803398875,  0.61803398875, 0.0 ) ; glVertex3d ( -1.0,  1.0, -1.0 ) ;
+  glEnd () ;
+
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.525731112119,  0.850650808354,  0.0 ) ; glVertex3d (  1.61803398875,  0.61803398875,  0.0 ) ; glVertex3d (  1.0,  1.0, -1.0 ) ; glVertex3d ( 0.0,  1.61803398875, -0.61803398875 ) ; glVertex3d ( 0.0,  1.61803398875,  0.61803398875 ) ; glVertex3d (  1.0,  1.0,  1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d (  0.525731112119, -0.850650808354,  0.0 ) ; glVertex3d (  1.61803398875, -0.61803398875,  0.0 ) ; glVertex3d (  1.0, -1.0,  1.0 ) ; glVertex3d ( 0.0, -1.61803398875,  0.61803398875 ) ; glVertex3d ( 0.0, -1.61803398875, -0.61803398875 ) ; glVertex3d (  1.0, -1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d ( -0.525731112119,  0.850650808354,  0.0 ) ; glVertex3d ( -1.61803398875,  0.61803398875,  0.0 ) ; glVertex3d ( -1.0,  1.0,  1.0 ) ; glVertex3d ( 0.0,  1.61803398875,  0.61803398875 ) ; glVertex3d ( 0.0,  1.61803398875, -0.61803398875 ) ; glVertex3d ( -1.0,  1.0, -1.0 ) ;
+  glEnd () ;
+  glBegin ( GL_POLYGON ) ;
+  glNormal3d ( -0.525731112119, -0.850650808354,  0.0 ) ; glVertex3d ( -1.61803398875, -0.61803398875,  0.0 ) ; glVertex3d ( -1.0, -1.0, -1.0 ) ; glVertex3d ( 0.0, -1.61803398875, -0.61803398875 ) ; glVertex3d ( 0.0, -1.61803398875,  0.61803398875 ) ; glVertex3d ( -1.0, -1.0,  1.0 ) ;
+  glEnd () ;
+}
+
+/*
+ *
+ */
+void glutWireOctahedron( void )
+{
+#define RADIUS    1.0f
+  glBegin( GL_LINE_LOOP );
+    glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
+    glNormal3d( 0.577350269189, 0.577350269189,-0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS ); glVertex3d( 0.0, RADIUS, 0.0 );
+    glNormal3d( 0.577350269189,-0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS ); glVertex3d( 0.0,-RADIUS, 0.0 );
+    glNormal3d( 0.577350269189,-0.577350269189,-0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0,-RADIUS, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS );
+    glNormal3d(-0.577350269189, 0.577350269189, 0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS ); glVertex3d( 0.0, RADIUS, 0.0 );
+    glNormal3d(-0.577350269189, 0.577350269189,-0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS );
+    glNormal3d(-0.577350269189,-0.577350269189, 0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0,-RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
+    glNormal3d(-0.577350269189,-0.577350269189,-0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS ); glVertex3d( 0.0,-RADIUS, 0.0 );
+  glEnd();
+#undef RADIUS
+}
+
+/*
+ *
+ */
+void glutSolidOctahedron( void )
+{
+#define RADIUS    1.0f
+  glBegin( GL_TRIANGLES );
+    glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
+    glNormal3d( 0.577350269189, 0.577350269189,-0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS ); glVertex3d( 0.0, RADIUS, 0.0 );
+    glNormal3d( 0.577350269189,-0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS ); glVertex3d( 0.0,-RADIUS, 0.0 );
+    glNormal3d( 0.577350269189,-0.577350269189,-0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0,-RADIUS, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS );
+    glNormal3d(-0.577350269189, 0.577350269189, 0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS ); glVertex3d( 0.0, RADIUS, 0.0 );
+    glNormal3d(-0.577350269189, 0.577350269189,-0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS );
+    glNormal3d(-0.577350269189,-0.577350269189, 0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0,-RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
+    glNormal3d(-0.577350269189,-0.577350269189,-0.577350269189); glVertex3d(-RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, 0.0,-RADIUS ); glVertex3d( 0.0,-RADIUS, 0.0 );
+  glEnd();
+#undef RADIUS
+}
+
+/* Magic Numbers:  r0 = ( 1, 0, 0 )
+ *                 r1 = ( -1/3, 2 sqrt(2) / 3, 0 )
+ *                 r2 = ( -1/3, -sqrt(2) / 3, sqrt(6) / 3 )
+ *                 r3 = ( -1/3, -sqrt(2) / 3, -sqrt(6) / 3 )
+ * |r0| = |r1| = |r2| = |r3| = 1
+ * Distance between any two points is 2 sqrt(6) / 3
+ *
+ * Normals:  The unit normals are simply the negative of the coordinates of the point not on the surface.
+ */
+
+#define NUM_TETR_FACES     4
+
+static GLdouble tet_r[4][3] = { {             1.0,             0.0,             0.0 },
+                                { -0.333333333333,  0.942809041582,             0.0 },
+                                { -0.333333333333, -0.471404520791,  0.816496580928 },
+                                { -0.333333333333, -0.471404520791, -0.816496580928 } } ;
+
+static GLint tet_i[4][3] =  /* Vertex indices */
+{
+  { 1, 3, 2 }, { 0, 2, 3 }, { 0, 3, 1 }, { 0, 1, 2 }
+} ;
+
+/*
+ *
+ */
+void glutWireTetrahedron( void )
+{
+  glBegin( GL_LINE_LOOP ) ;
+    glNormal3d ( -tet_r[0][0], -tet_r[0][1], -tet_r[0][2] ) ; glVertex3dv ( tet_r[1] ) ; glVertex3dv ( tet_r[3] ) ; glVertex3dv ( tet_r[2] ) ;
+    glNormal3d ( -tet_r[1][0], -tet_r[1][1], -tet_r[1][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[2] ) ; glVertex3dv ( tet_r[3] ) ;
+    glNormal3d ( -tet_r[2][0], -tet_r[2][1], -tet_r[2][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[3] ) ; glVertex3dv ( tet_r[1] ) ;
+    glNormal3d ( -tet_r[3][0], -tet_r[3][1], -tet_r[3][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[1] ) ; glVertex3dv ( tet_r[2] ) ;
+  glEnd() ;
+}
+
+/*
+ *
+ */
+void glutSolidTetrahedron( void )
+{
+  glBegin( GL_TRIANGLES ) ;
+    glNormal3d ( -tet_r[0][0], -tet_r[0][1], -tet_r[0][2] ) ; glVertex3dv ( tet_r[1] ) ; glVertex3dv ( tet_r[3] ) ; glVertex3dv ( tet_r[2] ) ;
+    glNormal3d ( -tet_r[1][0], -tet_r[1][1], -tet_r[1][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[2] ) ; glVertex3dv ( tet_r[3] ) ;
+    glNormal3d ( -tet_r[2][0], -tet_r[2][1], -tet_r[2][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[3] ) ; glVertex3dv ( tet_r[1] ) ;
+    glNormal3d ( -tet_r[3][0], -tet_r[3][1], -tet_r[3][2] ) ; glVertex3dv ( tet_r[0] ) ; glVertex3dv ( tet_r[1] ) ; glVertex3dv ( tet_r[2] ) ;
+  glEnd() ;
+}
+
+/*
+ *
+ */
+double icos_r[12][3] = { { 1.0, 0.0, 0.0 },
+  {  0.447213595500,  0.894427191000, 0.0 }, {  0.447213595500,  0.276393202252, 0.850650808354 }, {  0.447213595500, -0.723606797748, 0.525731112119 }, {  0.447213595500, -0.723606797748, -0.525731112119 }, {  0.447213595500,  0.276393202252, -0.850650808354 },
+  { -0.447213595500, -0.894427191000, 0.0 }, { -0.447213595500, -0.276393202252, 0.850650808354 }, { -0.447213595500,  0.723606797748, 0.525731112119 }, { -0.447213595500,  0.723606797748, -0.525731112119 }, { -0.447213595500, -0.276393202252, -0.850650808354 },
+  { -1.0, 0.0, 0.0 } } ;
+int icos_v [20][3] = { { 0, 1, 2 }, { 0, 2, 3 }, { 0, 3, 4 }, { 0, 4, 5 }, { 0, 5, 1 },
+                       { 1, 8, 2 }, { 2, 7, 3 }, { 3, 6, 4 }, { 4, 10, 5 }, { 5, 9, 1 },
+                       { 1, 9, 8 }, { 2, 8, 7 }, { 3, 7, 6 }, { 4, 6, 10 }, { 5, 10, 9 },
+                       { 11, 9, 10 }, { 11, 8, 9 }, { 11, 7, 8 }, { 11, 6, 7 }, { 11, 10, 6 } } ;
+
+void glutWireIcosahedron( void )
+{
+  int i ;
+
+  for ( i = 0; i < 20; i++ )
+  {
+    double normal[3] ;
+    normal[0] = ( icos_r[icos_v[i][1]][1] - icos_r[icos_v[i][0]][1] ) * ( icos_r[icos_v[i][2]][2] - icos_r[icos_v[i][0]][2] ) - ( icos_r[icos_v[i][1]][2] - icos_r[icos_v[i][0]][2] ) * ( icos_r[icos_v[i][2]][1] - icos_r[icos_v[i][0]][1] ) ;
+    normal[1] = ( icos_r[icos_v[i][1]][2] - icos_r[icos_v[i][0]][2] ) * ( icos_r[icos_v[i][2]][0] - icos_r[icos_v[i][0]][0] ) - ( icos_r[icos_v[i][1]][0] - icos_r[icos_v[i][0]][0] ) * ( icos_r[icos_v[i][2]][2] - icos_r[icos_v[i][0]][2] ) ;
+    normal[2] = ( icos_r[icos_v[i][1]][0] - icos_r[icos_v[i][0]][0] ) * ( icos_r[icos_v[i][2]][1] - icos_r[icos_v[i][0]][1] ) - ( icos_r[icos_v[i][1]][1] - icos_r[icos_v[i][0]][1] ) * ( icos_r[icos_v[i][2]][0] - icos_r[icos_v[i][0]][0] ) ;
+    glBegin ( GL_LINE_LOOP ) ;
+      glNormal3dv ( normal ) ;
+      glVertex3dv ( icos_r[icos_v[i][0]] ) ;
+      glVertex3dv ( icos_r[icos_v[i][1]] ) ;
+      glVertex3dv ( icos_r[icos_v[i][2]] ) ;
+    glEnd () ;
+  }
+}
+
+/*
+ *
+ */
+void glutSolidIcosahedron( void )
+{
+  int i ;
+
+  glBegin ( GL_TRIANGLES ) ;
+  for ( i = 0; i < 20; i++ )
+  {
+    double normal[3] ;
+    normal[0] = ( icos_r[icos_v[i][1]][1] - icos_r[icos_v[i][0]][1] ) * ( icos_r[icos_v[i][2]][2] - icos_r[icos_v[i][0]][2] ) - ( icos_r[icos_v[i][1]][2] - icos_r[icos_v[i][0]][2] ) * ( icos_r[icos_v[i][2]][1] - icos_r[icos_v[i][0]][1] ) ;
+    normal[1] = ( icos_r[icos_v[i][1]][2] - icos_r[icos_v[i][0]][2] ) * ( icos_r[icos_v[i][2]][0] - icos_r[icos_v[i][0]][0] ) - ( icos_r[icos_v[i][1]][0] - icos_r[icos_v[i][0]][0] ) * ( icos_r[icos_v[i][2]][2] - icos_r[icos_v[i][0]][2] ) ;
+    normal[2] = ( icos_r[icos_v[i][1]][0] - icos_r[icos_v[i][0]][0] ) * ( icos_r[icos_v[i][2]][1] - icos_r[icos_v[i][0]][1] ) - ( icos_r[icos_v[i][1]][1] - icos_r[icos_v[i][0]][1] ) * ( icos_r[icos_v[i][2]][0] - icos_r[icos_v[i][0]][0] ) ;
+      glNormal3dv ( normal ) ;
+      glVertex3dv ( icos_r[icos_v[i][0]] ) ;
+      glVertex3dv ( icos_r[icos_v[i][1]] ) ;
+      glVertex3dv ( icos_r[icos_v[i][2]] ) ;
+  }
+
+  glEnd () ;
+}
+
+/*
+ *
+ */
+double rdod_r[14][3] = { { 0.0, 0.0, 1.0 },
+  {  0.707106781187,  0.000000000000,  0.5 }, {  0.000000000000,  0.707106781187,  0.5 }, { -0.707106781187,  0.000000000000,  0.5 }, {  0.000000000000, -0.707106781187,  0.5 },
+  {  0.707106781187,  0.707106781187,  0.0 }, { -0.707106781187,  0.707106781187,  0.0 }, { -0.707106781187, -0.707106781187,  0.0 }, {  0.707106781187, -0.707106781187,  0.0 },
+  {  0.707106781187,  0.000000000000, -0.5 }, {  0.000000000000,  0.707106781187, -0.5 }, { -0.707106781187,  0.000000000000, -0.5 }, {  0.000000000000, -0.707106781187, -0.5 },
+  {  0.0, 0.0, -1.0 } } ;
+int rdod_v [12][4] = { { 0,  1,  5,  2 }, { 0,  2,  6,  3 }, { 0,  3,  7,  4 }, { 0,  4,  8, 1 },
+                       { 5, 10,  6,  2 }, { 6, 11,  7,  3 }, { 7, 12,  8,  4 }, { 8,  9,  5, 1 },
+                       { 5,  9, 13, 10 }, { 6, 10, 13, 11 }, { 7, 11, 13, 12 }, { 8, 12, 13, 9 } } ;
+double rdod_n[12][3] = {
+  {  0.353553390594,  0.353553390594,  0.5 }, { -0.353553390594,  0.353553390594,  0.5 }, { -0.353553390594, -0.353553390594,  0.5 }, {  0.353553390594, -0.353553390594,  0.5 },
+  {  0.000000000000,  1.000000000000,  0.0 }, { -1.000000000000,  0.000000000000,  0.0 }, {  0.000000000000, -1.000000000000,  0.0 }, {  1.000000000000,  0.000000000000,  0.0 },
+  {  0.353553390594,  0.353553390594, -0.5 }, { -0.353553390594,  0.353553390594, -0.5 }, { -0.353553390594, -0.353553390594, -0.5 }, {  0.353553390594, -0.353553390594, -0.5 }
+  } ;
+
+void glutWireRhombicDodecahedron( void )
+{
+  int i ;
+
+  for ( i = 0; i < 12; i++ )
+  {
+    glBegin ( GL_LINE_LOOP ) ;
+      glNormal3dv ( rdod_n[i] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][0]] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][1]] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][2]] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][3]] ) ;
+    glEnd () ;
+  }
+}
+
+/*
+ *
+ */
+void glutSolidRhombicDodecahedron( void )
+{
+  int i ;
+
+  glBegin ( GL_QUADS ) ;
+  for ( i = 0; i < 12; i++ )
+  {
+      glNormal3dv ( rdod_n[i] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][0]] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][1]] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][2]] ) ;
+      glVertex3dv ( rdod_r[rdod_v[i][3]] ) ;
+  }
+
+  glEnd () ;
+}
+
+void glutWireSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale )
+{
+  int i, j ;
+
+  if ( num_levels == 0 )
+  {
+
+    for ( i = 0 ; i < NUM_TETR_FACES ; i++ )
+    {
+      glBegin ( GL_LINE_LOOP ) ;
+      glNormal3d ( -tet_r[i][0], -tet_r[i][1], -tet_r[i][2] ) ;
+      for ( j = 0; j < 3; j++ )
+      {
+        double x = offset[0] + scale * tet_r[tet_i[i][j]][0] ;
+        double y = offset[1] + scale * tet_r[tet_i[i][j]][1] ;
+        double z = offset[2] + scale * tet_r[tet_i[i][j]][2] ;
+        glVertex3d ( x, y, z ) ;
+      }
+
+      glEnd () ;
+    }
+  }
+  else
+  {
+    GLdouble local_offset[3] ;  /* Use a local variable to avoid buildup of roundoff errors */
+    num_levels -- ;
+    scale /= 2.0 ;
+    for ( i = 0 ; i < NUM_TETR_FACES ; i++ )
+    {
+      local_offset[0] = offset[0] + scale * tet_r[i][0] ;
+      local_offset[1] = offset[1] + scale * tet_r[i][1] ;
+      local_offset[2] = offset[2] + scale * tet_r[i][2] ;
+      glutWireSierpinskiSponge ( num_levels, local_offset, scale ) ;
+    }
+  }
+}
+
+void glutSolidSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale )
+{
+  int i, j ;
+
+  if ( num_levels == 0 )
+  {
+    glBegin ( GL_TRIANGLES ) ;
+
+    for ( i = 0 ; i < NUM_TETR_FACES ; i++ )
+    {
+      glNormal3d ( -tet_r[i][0], -tet_r[i][1], -tet_r[i][2] ) ;
+      for ( j = 0; j < 3; j++ )
+      {
+        double x = offset[0] + scale * tet_r[tet_i[i][j]][0] ;
+        double y = offset[1] + scale * tet_r[tet_i[i][j]][1] ;
+        double z = offset[2] + scale * tet_r[tet_i[i][j]][2] ;
+        glVertex3d ( x, y, z ) ;
+      }
+    }
+
+    glEnd () ;
+  }
+  else
+  {
+    GLdouble local_offset[3] ;  /* Use a local variable to avoid buildup of roundoff errors */
+    num_levels -- ;
+    scale /= 2.0 ;
+    for ( i = 0 ; i < NUM_TETR_FACES ; i++ )
+    {
+      local_offset[0] = offset[0] + scale * tet_r[i][0] ;
+      local_offset[1] = offset[1] + scale * tet_r[i][1] ;
+      local_offset[2] = offset[2] + scale * tet_r[i][2] ;
+      glutSolidSierpinskiSponge ( num_levels, local_offset, scale ) ;
+    }
+  }
+}
+
+/*** END OF FILE ***/


Property changes on: branches/branch-3.0/src/core/freeglut_geometry.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/freeglut_stroke_mono_roman.cxx
===================================================================
--- branches/branch-3.0/src/core/freeglut_stroke_mono_roman.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/freeglut_stroke_mono_roman.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2848 @@
+/*
+ * freeglut_stroke_mono_roman.c
+ *
+ * freeglut Monospace Roman stroke font definition
+ *
+ * Copyright (c) 1999-2010 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Creation date: Thu Dec 16 1999
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/* This file has been automatically generated by the genstroke utility. */
+
+#include <fltk3/glut.h>
+
+/* char: 0x20 */
+
+static const Fl_Glut_StrokeStrip ch32st[] =
+{
+  { 0, 0 }
+};
+
+static const Fl_Glut_StrokeChar ch32 = {104.762f,0,ch32st};
+
+/* char: 0x21 */
+
+static const Fl_Glut_StrokeVertex ch33st0[] =
+{
+ {52.381f,100.0f},
+ {52.381f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch33st1[] =
+{
+ {52.381f,9.5238f},
+ {47.6191f,4.7619f},
+ {52.381f,0.0f},
+ {57.1429f,4.7619f},
+ {52.381f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch33st[] =
+{
+ {2,ch33st0},
+ {5,ch33st1}
+};
+
+static const Fl_Glut_StrokeChar ch33 = {104.762f,2,ch33st};
+
+/* char: 0x22 */
+
+static const Fl_Glut_StrokeVertex ch34st0[] =
+{
+ {33.3334f,100.0f},
+ {33.3334f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch34st1[] =
+{
+ {71.4286f,100.0f},
+ {71.4286f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch34st[] =
+{
+ {2,ch34st0},
+ {2,ch34st1}
+};
+
+static const Fl_Glut_StrokeChar ch34 = {104.762f,2,ch34st};
+
+/* char: 0x23 */
+
+static const Fl_Glut_StrokeVertex ch35st0[] =
+{
+ {54.7619f,119.048f},
+ {21.4286f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch35st1[] =
+{
+ {83.3334f,119.048f},
+ {50.0f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch35st2[] =
+{
+ {21.4286f,57.1429f},
+ {88.0952f,57.1429f}
+};
+
+static const Fl_Glut_StrokeVertex ch35st3[] =
+{
+ {16.6667f,28.5714f},
+ {83.3334f,28.5714f}
+};
+
+static const Fl_Glut_StrokeStrip ch35st[] =
+{
+ {2,ch35st0},
+ {2,ch35st1},
+ {2,ch35st2},
+ {2,ch35st3}
+};
+
+static const Fl_Glut_StrokeChar ch35 = {104.762f,4,ch35st};
+
+/* char: 0x24 */
+
+static const Fl_Glut_StrokeVertex ch36st0[] =
+{
+ {42.8571f,119.048f},
+ {42.8571f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch36st1[] =
+{
+ {61.9047f,119.048f},
+ {61.9047f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch36st2[] =
+{
+ {85.7143f,85.7143f},
+ {76.1905f,95.2381f},
+ {61.9047f,100.0f},
+ {42.8571f,100.0f},
+ {28.5714f,95.2381f},
+ {19.0476f,85.7143f},
+ {19.0476f,76.1905f},
+ {23.8095f,66.6667f},
+ {28.5714f,61.9048f},
+ {38.0952f,57.1429f},
+ {66.6666f,47.619f},
+ {76.1905f,42.8571f},
+ {80.9524f,38.0952f},
+ {85.7143f,28.5714f},
+ {85.7143f,14.2857f},
+ {76.1905f,4.7619f},
+ {61.9047f,0.0f},
+ {42.8571f,0.0f},
+ {28.5714f,4.7619f},
+ {19.0476f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch36st[] =
+{
+ {2,ch36st0},
+ {2,ch36st1},
+ {20,ch36st2}
+};
+
+static const Fl_Glut_StrokeChar ch36 = {104.762f,3,ch36st};
+
+/* char: 0x25 */
+
+static const Fl_Glut_StrokeVertex ch37st0[] =
+{
+ {95.2381f,100.0f},
+ {9.5238f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch37st1[] =
+{
+ {33.3333f,100.0f},
+ {42.8571f,90.4762f},
+ {42.8571f,80.9524f},
+ {38.0952f,71.4286f},
+ {28.5714f,66.6667f},
+ {19.0476f,66.6667f},
+ {9.5238f,76.1905f},
+ {9.5238f,85.7143f},
+ {14.2857f,95.2381f},
+ {23.8095f,100.0f},
+ {33.3333f,100.0f},
+ {42.8571f,95.2381f},
+ {57.1428f,90.4762f},
+ {71.4286f,90.4762f},
+ {85.7143f,95.2381f},
+ {95.2381f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch37st2[] =
+{
+ {76.1905f,33.3333f},
+ {66.6667f,28.5714f},
+ {61.9048f,19.0476f},
+ {61.9048f,9.5238f},
+ {71.4286f,0.0f},
+ {80.9524f,0.0f},
+ {90.4762f,4.7619f},
+ {95.2381f,14.2857f},
+ {95.2381f,23.8095f},
+ {85.7143f,33.3333f},
+ {76.1905f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch37st[] =
+{
+ {2,ch37st0},
+ {16,ch37st1},
+ {11,ch37st2}
+};
+
+static const Fl_Glut_StrokeChar ch37 = {104.762f,3,ch37st};
+
+/* char: 0x26 */
+
+static const Fl_Glut_StrokeVertex ch38st0[] =
+{
+ {100.0f,57.1429f},
+ {100.0f,61.9048f},
+ {95.2381f,66.6667f},
+ {90.4762f,66.6667f},
+ {85.7143f,61.9048f},
+ {80.9524f,52.381f},
+ {71.4286f,28.5714f},
+ {61.9048f,14.2857f},
+ {52.3809f,4.7619f},
+ {42.8571f,0.0f},
+ {23.8095f,0.0f},
+ {14.2857f,4.7619f},
+ {9.5238f,9.5238f},
+ {4.7619f,19.0476f},
+ {4.7619f,28.5714f},
+ {9.5238f,38.0952f},
+ {14.2857f,42.8571f},
+ {47.619f,61.9048f},
+ {52.3809f,66.6667f},
+ {57.1429f,76.1905f},
+ {57.1429f,85.7143f},
+ {52.3809f,95.2381f},
+ {42.8571f,100.0f},
+ {33.3333f,95.2381f},
+ {28.5714f,85.7143f},
+ {28.5714f,76.1905f},
+ {33.3333f,61.9048f},
+ {42.8571f,47.619f},
+ {66.6667f,14.2857f},
+ {76.1905f,4.7619f},
+ {85.7143f,0.0f},
+ {95.2381f,0.0f},
+ {100.0f,4.7619f},
+ {100.0f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch38st[] =
+{
+ {34,ch38st0}
+};
+
+static const Fl_Glut_StrokeChar ch38 = {104.762f,1,ch38st};
+
+/* char: 0x27 */
+
+static const Fl_Glut_StrokeVertex ch39st0[] =
+{
+ {52.381f,100.0f},
+ {52.381f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch39st[] =
+{
+ {2,ch39st0}
+};
+
+static const Fl_Glut_StrokeChar ch39 = {104.762f,1,ch39st};
+
+/* char: 0x28 */
+
+static const Fl_Glut_StrokeVertex ch40st0[] =
+{
+ {69.0476f,119.048f},
+ {59.5238f,109.524f},
+ {50.0f,95.2381f},
+ {40.4762f,76.1905f},
+ {35.7143f,52.381f},
+ {35.7143f,33.3333f},
+ {40.4762f,9.5238f},
+ {50.0f,-9.5238f},
+ {59.5238f,-23.8095f},
+ {69.0476f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch40st[] =
+{
+ {10,ch40st0}
+};
+
+static const Fl_Glut_StrokeChar ch40 = {104.762f,1,ch40st};
+
+/* char: 0x29 */
+
+static const Fl_Glut_StrokeVertex ch41st0[] =
+{
+ {35.7143f,119.048f},
+ {45.2381f,109.524f},
+ {54.7619f,95.2381f},
+ {64.2857f,76.1905f},
+ {69.0476f,52.381f},
+ {69.0476f,33.3333f},
+ {64.2857f,9.5238f},
+ {54.7619f,-9.5238f},
+ {45.2381f,-23.8095f},
+ {35.7143f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch41st[] =
+{
+ {10,ch41st0}
+};
+
+static const Fl_Glut_StrokeChar ch41 = {104.762f,1,ch41st};
+
+/* char: 0x2a */
+
+static const Fl_Glut_StrokeVertex ch42st0[] =
+{
+ {52.381f,71.4286f},
+ {52.381f,14.2857f}
+};
+
+static const Fl_Glut_StrokeVertex ch42st1[] =
+{
+ {28.5715f,57.1429f},
+ {76.1905f,28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch42st2[] =
+{
+ {76.1905f,57.1429f},
+ {28.5715f,28.5714f}
+};
+
+static const Fl_Glut_StrokeStrip ch42st[] =
+{
+ {2,ch42st0},
+ {2,ch42st1},
+ {2,ch42st2}
+};
+
+static const Fl_Glut_StrokeChar ch42 = {104.762f,3,ch42st};
+
+/* char: 0x2b */
+
+static const Fl_Glut_StrokeVertex ch43st0[] =
+{
+ {52.3809f,85.7143f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch43st1[] =
+{
+ {9.5238f,42.8571f},
+ {95.2381f,42.8571f}
+};
+
+static const Fl_Glut_StrokeStrip ch43st[] =
+{
+ {2,ch43st0},
+ {2,ch43st1}
+};
+
+static const Fl_Glut_StrokeChar ch43 = {104.762f,2,ch43st};
+
+/* char: 0x2c */
+
+static const Fl_Glut_StrokeVertex ch44st0[] =
+{
+ {57.1429f,4.7619f},
+ {52.381f,0.0f},
+ {47.6191f,4.7619f},
+ {52.381f,9.5238f},
+ {57.1429f,4.7619f},
+ {57.1429f,-4.7619f},
+ {52.381f,-14.2857f},
+ {47.6191f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch44st[] =
+{
+ {8,ch44st0}
+};
+
+static const Fl_Glut_StrokeChar ch44 = {104.762f,1,ch44st};
+
+/* char: 0x2d */
+
+static const Fl_Glut_StrokeVertex ch45st0[] =
+{
+ {9.5238f,42.8571f},
+ {95.2381f,42.8571f}
+};
+
+static const Fl_Glut_StrokeStrip ch45st[] =
+{
+ {2,ch45st0}
+};
+
+static const Fl_Glut_StrokeChar ch45 = {104.762f,1,ch45st};
+
+/* char: 0x2e */
+
+static const Fl_Glut_StrokeVertex ch46st0[] =
+{
+ {52.381f,9.5238f},
+ {47.6191f,4.7619f},
+ {52.381f,0.0f},
+ {57.1429f,4.7619f},
+ {52.381f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch46st[] =
+{
+ {5,ch46st0}
+};
+
+static const Fl_Glut_StrokeChar ch46 = {104.762f,1,ch46st};
+
+/* char: 0x2f */
+
+static const Fl_Glut_StrokeVertex ch47st0[] =
+{
+ {19.0476f,-14.2857f},
+ {85.7143f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch47st[] =
+{
+ {2,ch47st0}
+};
+
+static const Fl_Glut_StrokeChar ch47 = {104.762f,1,ch47st};
+
+/* char: 0x30 */
+
+static const Fl_Glut_StrokeVertex ch48st0[] =
+{
+ {47.619f,100.0f},
+ {33.3333f,95.2381f},
+ {23.8095f,80.9524f},
+ {19.0476f,57.1429f},
+ {19.0476f,42.8571f},
+ {23.8095f,19.0476f},
+ {33.3333f,4.7619f},
+ {47.619f,0.0f},
+ {57.1428f,0.0f},
+ {71.4286f,4.7619f},
+ {80.9524f,19.0476f},
+ {85.7143f,42.8571f},
+ {85.7143f,57.1429f},
+ {80.9524f,80.9524f},
+ {71.4286f,95.2381f},
+ {57.1428f,100.0f},
+ {47.619f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch48st[] =
+{
+ {17,ch48st0}
+};
+
+static const Fl_Glut_StrokeChar ch48 = {104.762f,1,ch48st};
+
+/* char: 0x31 */
+
+static const Fl_Glut_StrokeVertex ch49st0[] =
+{
+ {40.4762f,80.9524f},
+ {50.0f,85.7143f},
+ {64.2857f,100.0f},
+ {64.2857f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch49st[] =
+{
+ {4,ch49st0}
+};
+
+static const Fl_Glut_StrokeChar ch49 = {104.762f,1,ch49st};
+
+/* char: 0x32 */
+
+static const Fl_Glut_StrokeVertex ch50st0[] =
+{
+ {23.8095f,76.1905f},
+ {23.8095f,80.9524f},
+ {28.5714f,90.4762f},
+ {33.3333f,95.2381f},
+ {42.8571f,100.0f},
+ {61.9047f,100.0f},
+ {71.4286f,95.2381f},
+ {76.1905f,90.4762f},
+ {80.9524f,80.9524f},
+ {80.9524f,71.4286f},
+ {76.1905f,61.9048f},
+ {66.6666f,47.619f},
+ {19.0476f,0.0f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch50st[] =
+{
+ {14,ch50st0}
+};
+
+static const Fl_Glut_StrokeChar ch50 = {104.762f,1,ch50st};
+
+/* char: 0x33 */
+
+static const Fl_Glut_StrokeVertex ch51st0[] =
+{
+ {28.5714f,100.0f},
+ {80.9524f,100.0f},
+ {52.3809f,61.9048f},
+ {66.6666f,61.9048f},
+ {76.1905f,57.1429f},
+ {80.9524f,52.381f},
+ {85.7143f,38.0952f},
+ {85.7143f,28.5714f},
+ {80.9524f,14.2857f},
+ {71.4286f,4.7619f},
+ {57.1428f,0.0f},
+ {42.8571f,0.0f},
+ {28.5714f,4.7619f},
+ {23.8095f,9.5238f},
+ {19.0476f,19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch51st[] =
+{
+ {15,ch51st0}
+};
+
+static const Fl_Glut_StrokeChar ch51 = {104.762f,1,ch51st};
+
+/* char: 0x34 */
+
+static const Fl_Glut_StrokeVertex ch52st0[] =
+{
+ {64.2857f,100.0f},
+ {16.6667f,33.3333f},
+ {88.0952f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch52st1[] =
+{
+ {64.2857f,100.0f},
+ {64.2857f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch52st[] =
+{
+ {3,ch52st0},
+ {2,ch52st1}
+};
+
+static const Fl_Glut_StrokeChar ch52 = {104.762f,2,ch52st};
+
+/* char: 0x35 */
+
+static const Fl_Glut_StrokeVertex ch53st0[] =
+{
+ {76.1905f,100.0f},
+ {28.5714f,100.0f},
+ {23.8095f,57.1429f},
+ {28.5714f,61.9048f},
+ {42.8571f,66.6667f},
+ {57.1428f,66.6667f},
+ {71.4286f,61.9048f},
+ {80.9524f,52.381f},
+ {85.7143f,38.0952f},
+ {85.7143f,28.5714f},
+ {80.9524f,14.2857f},
+ {71.4286f,4.7619f},
+ {57.1428f,0.0f},
+ {42.8571f,0.0f},
+ {28.5714f,4.7619f},
+ {23.8095f,9.5238f},
+ {19.0476f,19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch53st[] =
+{
+ {17,ch53st0}
+};
+
+static const Fl_Glut_StrokeChar ch53 = {104.762f,1,ch53st};
+
+/* char: 0x36 */
+
+static const Fl_Glut_StrokeVertex ch54st0[] =
+{
+ {78.5714f,85.7143f},
+ {73.8096f,95.2381f},
+ {59.5238f,100.0f},
+ {50.0f,100.0f},
+ {35.7143f,95.2381f},
+ {26.1905f,80.9524f},
+ {21.4286f,57.1429f},
+ {21.4286f,33.3333f},
+ {26.1905f,14.2857f},
+ {35.7143f,4.7619f},
+ {50.0f,0.0f},
+ {54.7619f,0.0f},
+ {69.0476f,4.7619f},
+ {78.5714f,14.2857f},
+ {83.3334f,28.5714f},
+ {83.3334f,33.3333f},
+ {78.5714f,47.619f},
+ {69.0476f,57.1429f},
+ {54.7619f,61.9048f},
+ {50.0f,61.9048f},
+ {35.7143f,57.1429f},
+ {26.1905f,47.619f},
+ {21.4286f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch54st[] =
+{
+ {23,ch54st0}
+};
+
+static const Fl_Glut_StrokeChar ch54 = {104.762f,1,ch54st};
+
+/* char: 0x37 */
+
+static const Fl_Glut_StrokeVertex ch55st0[] =
+{
+ {85.7143f,100.0f},
+ {38.0952f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch55st1[] =
+{
+ {19.0476f,100.0f},
+ {85.7143f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch55st[] =
+{
+ {2,ch55st0},
+ {2,ch55st1}
+};
+
+static const Fl_Glut_StrokeChar ch55 = {104.762f,2,ch55st};
+
+/* char: 0x38 */
+
+static const Fl_Glut_StrokeVertex ch56st0[] =
+{
+ {42.8571f,100.0f},
+ {28.5714f,95.2381f},
+ {23.8095f,85.7143f},
+ {23.8095f,76.1905f},
+ {28.5714f,66.6667f},
+ {38.0952f,61.9048f},
+ {57.1428f,57.1429f},
+ {71.4286f,52.381f},
+ {80.9524f,42.8571f},
+ {85.7143f,33.3333f},
+ {85.7143f,19.0476f},
+ {80.9524f,9.5238f},
+ {76.1905f,4.7619f},
+ {61.9047f,0.0f},
+ {42.8571f,0.0f},
+ {28.5714f,4.7619f},
+ {23.8095f,9.5238f},
+ {19.0476f,19.0476f},
+ {19.0476f,33.3333f},
+ {23.8095f,42.8571f},
+ {33.3333f,52.381f},
+ {47.619f,57.1429f},
+ {66.6666f,61.9048f},
+ {76.1905f,66.6667f},
+ {80.9524f,76.1905f},
+ {80.9524f,85.7143f},
+ {76.1905f,95.2381f},
+ {61.9047f,100.0f},
+ {42.8571f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch56st[] =
+{
+ {29,ch56st0}
+};
+
+static const Fl_Glut_StrokeChar ch56 = {104.762f,1,ch56st};
+
+/* char: 0x39 */
+
+static const Fl_Glut_StrokeVertex ch57st0[] =
+{
+ {83.3334f,66.6667f},
+ {78.5714f,52.381f},
+ {69.0476f,42.8571f},
+ {54.7619f,38.0952f},
+ {50.0f,38.0952f},
+ {35.7143f,42.8571f},
+ {26.1905f,52.381f},
+ {21.4286f,66.6667f},
+ {21.4286f,71.4286f},
+ {26.1905f,85.7143f},
+ {35.7143f,95.2381f},
+ {50.0f,100.0f},
+ {54.7619f,100.0f},
+ {69.0476f,95.2381f},
+ {78.5714f,85.7143f},
+ {83.3334f,66.6667f},
+ {83.3334f,42.8571f},
+ {78.5714f,19.0476f},
+ {69.0476f,4.7619f},
+ {54.7619f,0.0f},
+ {45.2381f,0.0f},
+ {30.9524f,4.7619f},
+ {26.1905f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch57st[] =
+{
+ {23,ch57st0}
+};
+
+static const Fl_Glut_StrokeChar ch57 = {104.762f,1,ch57st};
+
+/* char: 0x3a */
+
+static const Fl_Glut_StrokeVertex ch58st0[] =
+{
+ {52.381f,66.6667f},
+ {47.6191f,61.9048f},
+ {52.381f,57.1429f},
+ {57.1429f,61.9048f},
+ {52.381f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch58st1[] =
+{
+ {52.381f,9.5238f},
+ {47.6191f,4.7619f},
+ {52.381f,0.0f},
+ {57.1429f,4.7619f},
+ {52.381f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch58st[] =
+{
+ {5,ch58st0},
+ {5,ch58st1}
+};
+
+static const Fl_Glut_StrokeChar ch58 = {104.762f,2,ch58st};
+
+/* char: 0x3b */
+
+static const Fl_Glut_StrokeVertex ch59st0[] =
+{
+ {52.381f,66.6667f},
+ {47.6191f,61.9048f},
+ {52.381f,57.1429f},
+ {57.1429f,61.9048f},
+ {52.381f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch59st1[] =
+{
+ {57.1429f,4.7619f},
+ {52.381f,0.0f},
+ {47.6191f,4.7619f},
+ {52.381f,9.5238f},
+ {57.1429f,4.7619f},
+ {57.1429f,-4.7619f},
+ {52.381f,-14.2857f},
+ {47.6191f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch59st[] =
+{
+ {5,ch59st0},
+ {8,ch59st1}
+};
+
+static const Fl_Glut_StrokeChar ch59 = {104.762f,2,ch59st};
+
+/* char: 0x3c */
+
+static const Fl_Glut_StrokeVertex ch60st0[] =
+{
+ {90.4762f,85.7143f},
+ {14.2857f,42.8571f},
+ {90.4762f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch60st[] =
+{
+ {3,ch60st0}
+};
+
+static const Fl_Glut_StrokeChar ch60 = {104.762f,1,ch60st};
+
+/* char: 0x3d */
+
+static const Fl_Glut_StrokeVertex ch61st0[] =
+{
+ {9.5238f,57.1429f},
+ {95.2381f,57.1429f}
+};
+
+static const Fl_Glut_StrokeVertex ch61st1[] =
+{
+ {9.5238f,28.5714f},
+ {95.2381f,28.5714f}
+};
+
+static const Fl_Glut_StrokeStrip ch61st[] =
+{
+ {2,ch61st0},
+ {2,ch61st1}
+};
+
+static const Fl_Glut_StrokeChar ch61 = {104.762f,2,ch61st};
+
+/* char: 0x3e */
+
+static const Fl_Glut_StrokeVertex ch62st0[] =
+{
+ {14.2857f,85.7143f},
+ {90.4762f,42.8571f},
+ {14.2857f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch62st[] =
+{
+ {3,ch62st0}
+};
+
+static const Fl_Glut_StrokeChar ch62 = {104.762f,1,ch62st};
+
+/* char: 0x3f */
+
+static const Fl_Glut_StrokeVertex ch63st0[] =
+{
+ {23.8095f,76.1905f},
+ {23.8095f,80.9524f},
+ {28.5714f,90.4762f},
+ {33.3333f,95.2381f},
+ {42.8571f,100.0f},
+ {61.9047f,100.0f},
+ {71.4285f,95.2381f},
+ {76.1905f,90.4762f},
+ {80.9524f,80.9524f},
+ {80.9524f,71.4286f},
+ {76.1905f,61.9048f},
+ {71.4285f,57.1429f},
+ {52.3809f,47.619f},
+ {52.3809f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch63st1[] =
+{
+ {52.3809f,9.5238f},
+ {47.619f,4.7619f},
+ {52.3809f,0.0f},
+ {57.1428f,4.7619f},
+ {52.3809f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch63st[] =
+{
+ {14,ch63st0},
+ {5,ch63st1}
+};
+
+static const Fl_Glut_StrokeChar ch63 = {104.762f,2,ch63st};
+
+/* char: 0x40 */
+
+static const Fl_Glut_StrokeVertex ch64st0[] =
+{
+ {64.2857f,52.381f},
+ {54.7619f,57.1429f},
+ {45.2381f,57.1429f},
+ {40.4762f,47.619f},
+ {40.4762f,42.8571f},
+ {45.2381f,33.3333f},
+ {54.7619f,33.3333f},
+ {64.2857f,38.0952f}
+};
+
+static const Fl_Glut_StrokeVertex ch64st1[] =
+{
+ {64.2857f,57.1429f},
+ {64.2857f,38.0952f},
+ {69.0476f,33.3333f},
+ {78.5714f,33.3333f},
+ {83.3334f,42.8571f},
+ {83.3334f,47.619f},
+ {78.5714f,61.9048f},
+ {69.0476f,71.4286f},
+ {54.7619f,76.1905f},
+ {50.0f,76.1905f},
+ {35.7143f,71.4286f},
+ {26.1905f,61.9048f},
+ {21.4286f,47.619f},
+ {21.4286f,42.8571f},
+ {26.1905f,28.5714f},
+ {35.7143f,19.0476f},
+ {50.0f,14.2857f},
+ {54.7619f,14.2857f},
+ {69.0476f,19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch64st[] =
+{
+ {8,ch64st0},
+ {19,ch64st1}
+};
+
+static const Fl_Glut_StrokeChar ch64 = {104.762f,2,ch64st};
+
+/* char: 0x41 */
+
+static const Fl_Glut_StrokeVertex ch65st0[] =
+{
+ {52.3809f,100.0f},
+ {14.2857f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch65st1[] =
+{
+ {52.3809f,100.0f},
+ {90.4762f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch65st2[] =
+{
+ {28.5714f,33.3333f},
+ {76.1905f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch65st[] =
+{
+ {2,ch65st0},
+ {2,ch65st1},
+ {2,ch65st2}
+};
+
+static const Fl_Glut_StrokeChar ch65 = {104.762f,3,ch65st};
+
+/* char: 0x42 */
+
+static const Fl_Glut_StrokeVertex ch66st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch66st1[] =
+{
+ {19.0476f,100.0f},
+ {61.9047f,100.0f},
+ {76.1905f,95.2381f},
+ {80.9524f,90.4762f},
+ {85.7143f,80.9524f},
+ {85.7143f,71.4286f},
+ {80.9524f,61.9048f},
+ {76.1905f,57.1429f},
+ {61.9047f,52.381f}
+};
+
+static const Fl_Glut_StrokeVertex ch66st2[] =
+{
+ {19.0476f,52.381f},
+ {61.9047f,52.381f},
+ {76.1905f,47.619f},
+ {80.9524f,42.8571f},
+ {85.7143f,33.3333f},
+ {85.7143f,19.0476f},
+ {80.9524f,9.5238f},
+ {76.1905f,4.7619f},
+ {61.9047f,0.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch66st[] =
+{
+ {2,ch66st0},
+ {9,ch66st1},
+ {10,ch66st2}
+};
+
+static const Fl_Glut_StrokeChar ch66 = {104.762f,3,ch66st};
+
+/* char: 0x43 */
+
+static const Fl_Glut_StrokeVertex ch67st0[] =
+{
+ {88.0952f,76.1905f},
+ {83.3334f,85.7143f},
+ {73.8096f,95.2381f},
+ {64.2857f,100.0f},
+ {45.2381f,100.0f},
+ {35.7143f,95.2381f},
+ {26.1905f,85.7143f},
+ {21.4286f,76.1905f},
+ {16.6667f,61.9048f},
+ {16.6667f,38.0952f},
+ {21.4286f,23.8095f},
+ {26.1905f,14.2857f},
+ {35.7143f,4.7619f},
+ {45.2381f,0.0f},
+ {64.2857f,0.0f},
+ {73.8096f,4.7619f},
+ {83.3334f,14.2857f},
+ {88.0952f,23.8095f}
+};
+
+static const Fl_Glut_StrokeStrip ch67st[] =
+{
+ {18,ch67st0}
+};
+
+static const Fl_Glut_StrokeChar ch67 = {104.762f,1,ch67st};
+
+/* char: 0x44 */
+
+static const Fl_Glut_StrokeVertex ch68st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch68st1[] =
+{
+ {19.0476f,100.0f},
+ {52.3809f,100.0f},
+ {66.6666f,95.2381f},
+ {76.1905f,85.7143f},
+ {80.9524f,76.1905f},
+ {85.7143f,61.9048f},
+ {85.7143f,38.0952f},
+ {80.9524f,23.8095f},
+ {76.1905f,14.2857f},
+ {66.6666f,4.7619f},
+ {52.3809f,0.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch68st[] =
+{
+ {2,ch68st0},
+ {12,ch68st1}
+};
+
+static const Fl_Glut_StrokeChar ch68 = {104.762f,2,ch68st};
+
+/* char: 0x45 */
+
+static const Fl_Glut_StrokeVertex ch69st0[] =
+{
+ {21.4286f,100.0f},
+ {21.4286f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch69st1[] =
+{
+ {21.4286f,100.0f},
+ {83.3334f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch69st2[] =
+{
+ {21.4286f,52.381f},
+ {59.5238f,52.381f}
+};
+
+static const Fl_Glut_StrokeVertex ch69st3[] =
+{
+ {21.4286f,0.0f},
+ {83.3334f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch69st[] =
+{
+ {2,ch69st0},
+ {2,ch69st1},
+ {2,ch69st2},
+ {2,ch69st3}
+};
+
+static const Fl_Glut_StrokeChar ch69 = {104.762f,4,ch69st};
+
+/* char: 0x46 */
+
+static const Fl_Glut_StrokeVertex ch70st0[] =
+{
+ {21.4286f,100.0f},
+ {21.4286f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch70st1[] =
+{
+ {21.4286f,100.0f},
+ {83.3334f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch70st2[] =
+{
+ {21.4286f,52.381f},
+ {59.5238f,52.381f}
+};
+
+static const Fl_Glut_StrokeStrip ch70st[] =
+{
+ {2,ch70st0},
+ {2,ch70st1},
+ {2,ch70st2}
+};
+
+static const Fl_Glut_StrokeChar ch70 = {104.762f,3,ch70st};
+
+/* char: 0x47 */
+
+static const Fl_Glut_StrokeVertex ch71st0[] =
+{
+ {88.0952f,76.1905f},
+ {83.3334f,85.7143f},
+ {73.8096f,95.2381f},
+ {64.2857f,100.0f},
+ {45.2381f,100.0f},
+ {35.7143f,95.2381f},
+ {26.1905f,85.7143f},
+ {21.4286f,76.1905f},
+ {16.6667f,61.9048f},
+ {16.6667f,38.0952f},
+ {21.4286f,23.8095f},
+ {26.1905f,14.2857f},
+ {35.7143f,4.7619f},
+ {45.2381f,0.0f},
+ {64.2857f,0.0f},
+ {73.8096f,4.7619f},
+ {83.3334f,14.2857f},
+ {88.0952f,23.8095f},
+ {88.0952f,38.0952f}
+};
+
+static const Fl_Glut_StrokeVertex ch71st1[] =
+{
+ {64.2857f,38.0952f},
+ {88.0952f,38.0952f}
+};
+
+static const Fl_Glut_StrokeStrip ch71st[] =
+{
+ {19,ch71st0},
+ {2,ch71st1}
+};
+
+static const Fl_Glut_StrokeChar ch71 = {104.762f,2,ch71st};
+
+/* char: 0x48 */
+
+static const Fl_Glut_StrokeVertex ch72st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch72st1[] =
+{
+ {85.7143f,100.0f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch72st2[] =
+{
+ {19.0476f,52.381f},
+ {85.7143f,52.381f}
+};
+
+static const Fl_Glut_StrokeStrip ch72st[] =
+{
+ {2,ch72st0},
+ {2,ch72st1},
+ {2,ch72st2}
+};
+
+static const Fl_Glut_StrokeChar ch72 = {104.762f,3,ch72st};
+
+/* char: 0x49 */
+
+static const Fl_Glut_StrokeVertex ch73st0[] =
+{
+ {52.381f,100.0f},
+ {52.381f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch73st[] =
+{
+ {2,ch73st0}
+};
+
+static const Fl_Glut_StrokeChar ch73 = {104.762f,1,ch73st};
+
+/* char: 0x4a */
+
+static const Fl_Glut_StrokeVertex ch74st0[] =
+{
+ {76.1905f,100.0f},
+ {76.1905f,23.8095f},
+ {71.4286f,9.5238f},
+ {66.6667f,4.7619f},
+ {57.1429f,0.0f},
+ {47.6191f,0.0f},
+ {38.0953f,4.7619f},
+ {33.3334f,9.5238f},
+ {28.5715f,23.8095f},
+ {28.5715f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch74st[] =
+{
+ {10,ch74st0}
+};
+
+static const Fl_Glut_StrokeChar ch74 = {104.762f,1,ch74st};
+
+/* char: 0x4b */
+
+static const Fl_Glut_StrokeVertex ch75st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch75st1[] =
+{
+ {85.7143f,100.0f},
+ {19.0476f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch75st2[] =
+{
+ {42.8571f,57.1429f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch75st[] =
+{
+ {2,ch75st0},
+ {2,ch75st1},
+ {2,ch75st2}
+};
+
+static const Fl_Glut_StrokeChar ch75 = {104.762f,3,ch75st};
+
+/* char: 0x4c */
+
+static const Fl_Glut_StrokeVertex ch76st0[] =
+{
+ {23.8095f,100.0f},
+ {23.8095f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch76st1[] =
+{
+ {23.8095f,0.0f},
+ {80.9524f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch76st[] =
+{
+ {2,ch76st0},
+ {2,ch76st1}
+};
+
+static const Fl_Glut_StrokeChar ch76 = {104.762f,2,ch76st};
+
+/* char: 0x4d */
+
+static const Fl_Glut_StrokeVertex ch77st0[] =
+{
+ {14.2857f,100.0f},
+ {14.2857f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch77st1[] =
+{
+ {14.2857f,100.0f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch77st2[] =
+{
+ {90.4762f,100.0f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch77st3[] =
+{
+ {90.4762f,100.0f},
+ {90.4762f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch77st[] =
+{
+ {2,ch77st0},
+ {2,ch77st1},
+ {2,ch77st2},
+ {2,ch77st3}
+};
+
+static const Fl_Glut_StrokeChar ch77 = {104.762f,4,ch77st};
+
+/* char: 0x4e */
+
+static const Fl_Glut_StrokeVertex ch78st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch78st1[] =
+{
+ {19.0476f,100.0f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch78st2[] =
+{
+ {85.7143f,100.0f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch78st[] =
+{
+ {2,ch78st0},
+ {2,ch78st1},
+ {2,ch78st2}
+};
+
+static const Fl_Glut_StrokeChar ch78 = {104.762f,3,ch78st};
+
+/* char: 0x4f */
+
+static const Fl_Glut_StrokeVertex ch79st0[] =
+{
+ {42.8571f,100.0f},
+ {33.3333f,95.2381f},
+ {23.8095f,85.7143f},
+ {19.0476f,76.1905f},
+ {14.2857f,61.9048f},
+ {14.2857f,38.0952f},
+ {19.0476f,23.8095f},
+ {23.8095f,14.2857f},
+ {33.3333f,4.7619f},
+ {42.8571f,0.0f},
+ {61.9047f,0.0f},
+ {71.4286f,4.7619f},
+ {80.9524f,14.2857f},
+ {85.7143f,23.8095f},
+ {90.4762f,38.0952f},
+ {90.4762f,61.9048f},
+ {85.7143f,76.1905f},
+ {80.9524f,85.7143f},
+ {71.4286f,95.2381f},
+ {61.9047f,100.0f},
+ {42.8571f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch79st[] =
+{
+ {21,ch79st0}
+};
+
+static const Fl_Glut_StrokeChar ch79 = {104.762f,1,ch79st};
+
+/* char: 0x50 */
+
+static const Fl_Glut_StrokeVertex ch80st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch80st1[] =
+{
+ {19.0476f,100.0f},
+ {61.9047f,100.0f},
+ {76.1905f,95.2381f},
+ {80.9524f,90.4762f},
+ {85.7143f,80.9524f},
+ {85.7143f,66.6667f},
+ {80.9524f,57.1429f},
+ {76.1905f,52.381f},
+ {61.9047f,47.619f},
+ {19.0476f,47.619f}
+};
+
+static const Fl_Glut_StrokeStrip ch80st[] =
+{
+ {2,ch80st0},
+ {10,ch80st1}
+};
+
+static const Fl_Glut_StrokeChar ch80 = {104.762f,2,ch80st};
+
+/* char: 0x51 */
+
+static const Fl_Glut_StrokeVertex ch81st0[] =
+{
+ {42.8571f,100.0f},
+ {33.3333f,95.2381f},
+ {23.8095f,85.7143f},
+ {19.0476f,76.1905f},
+ {14.2857f,61.9048f},
+ {14.2857f,38.0952f},
+ {19.0476f,23.8095f},
+ {23.8095f,14.2857f},
+ {33.3333f,4.7619f},
+ {42.8571f,0.0f},
+ {61.9047f,0.0f},
+ {71.4286f,4.7619f},
+ {80.9524f,14.2857f},
+ {85.7143f,23.8095f},
+ {90.4762f,38.0952f},
+ {90.4762f,61.9048f},
+ {85.7143f,76.1905f},
+ {80.9524f,85.7143f},
+ {71.4286f,95.2381f},
+ {61.9047f,100.0f},
+ {42.8571f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch81st1[] =
+{
+ {57.1428f,19.0476f},
+ {85.7143f,-9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch81st[] =
+{
+ {21,ch81st0},
+ {2,ch81st1}
+};
+
+static const Fl_Glut_StrokeChar ch81 = {104.762f,2,ch81st};
+
+/* char: 0x52 */
+
+static const Fl_Glut_StrokeVertex ch82st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch82st1[] =
+{
+ {19.0476f,100.0f},
+ {61.9047f,100.0f},
+ {76.1905f,95.2381f},
+ {80.9524f,90.4762f},
+ {85.7143f,80.9524f},
+ {85.7143f,71.4286f},
+ {80.9524f,61.9048f},
+ {76.1905f,57.1429f},
+ {61.9047f,52.381f},
+ {19.0476f,52.381f}
+};
+
+static const Fl_Glut_StrokeVertex ch82st2[] =
+{
+ {52.3809f,52.381f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch82st[] =
+{
+ {2,ch82st0},
+ {10,ch82st1},
+ {2,ch82st2}
+};
+
+static const Fl_Glut_StrokeChar ch82 = {104.762f,3,ch82st};
+
+/* char: 0x53 */
+
+static const Fl_Glut_StrokeVertex ch83st0[] =
+{
+ {85.7143f,85.7143f},
+ {76.1905f,95.2381f},
+ {61.9047f,100.0f},
+ {42.8571f,100.0f},
+ {28.5714f,95.2381f},
+ {19.0476f,85.7143f},
+ {19.0476f,76.1905f},
+ {23.8095f,66.6667f},
+ {28.5714f,61.9048f},
+ {38.0952f,57.1429f},
+ {66.6666f,47.619f},
+ {76.1905f,42.8571f},
+ {80.9524f,38.0952f},
+ {85.7143f,28.5714f},
+ {85.7143f,14.2857f},
+ {76.1905f,4.7619f},
+ {61.9047f,0.0f},
+ {42.8571f,0.0f},
+ {28.5714f,4.7619f},
+ {19.0476f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch83st[] =
+{
+ {20,ch83st0}
+};
+
+static const Fl_Glut_StrokeChar ch83 = {104.762f,1,ch83st};
+
+/* char: 0x54 */
+
+static const Fl_Glut_StrokeVertex ch84st0[] =
+{
+ {52.3809f,100.0f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch84st1[] =
+{
+ {19.0476f,100.0f},
+ {85.7143f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch84st[] =
+{
+ {2,ch84st0},
+ {2,ch84st1}
+};
+
+static const Fl_Glut_StrokeChar ch84 = {104.762f,2,ch84st};
+
+/* char: 0x55 */
+
+static const Fl_Glut_StrokeVertex ch85st0[] =
+{
+ {19.0476f,100.0f},
+ {19.0476f,28.5714f},
+ {23.8095f,14.2857f},
+ {33.3333f,4.7619f},
+ {47.619f,0.0f},
+ {57.1428f,0.0f},
+ {71.4286f,4.7619f},
+ {80.9524f,14.2857f},
+ {85.7143f,28.5714f},
+ {85.7143f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch85st[] =
+{
+ {10,ch85st0}
+};
+
+static const Fl_Glut_StrokeChar ch85 = {104.762f,1,ch85st};
+
+/* char: 0x56 */
+
+static const Fl_Glut_StrokeVertex ch86st0[] =
+{
+ {14.2857f,100.0f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch86st1[] =
+{
+ {90.4762f,100.0f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch86st[] =
+{
+ {2,ch86st0},
+ {2,ch86st1}
+};
+
+static const Fl_Glut_StrokeChar ch86 = {104.762f,2,ch86st};
+
+/* char: 0x57 */
+
+static const Fl_Glut_StrokeVertex ch87st0[] =
+{
+ {4.7619f,100.0f},
+ {28.5714f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch87st1[] =
+{
+ {52.3809f,100.0f},
+ {28.5714f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch87st2[] =
+{
+ {52.3809f,100.0f},
+ {76.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch87st3[] =
+{
+ {100.0f,100.0f},
+ {76.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch87st[] =
+{
+ {2,ch87st0},
+ {2,ch87st1},
+ {2,ch87st2},
+ {2,ch87st3}
+};
+
+static const Fl_Glut_StrokeChar ch87 = {104.762f,4,ch87st};
+
+/* char: 0x58 */
+
+static const Fl_Glut_StrokeVertex ch88st0[] =
+{
+ {19.0476f,100.0f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch88st1[] =
+{
+ {85.7143f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch88st[] =
+{
+ {2,ch88st0},
+ {2,ch88st1}
+};
+
+static const Fl_Glut_StrokeChar ch88 = {104.762f,2,ch88st};
+
+/* char: 0x59 */
+
+static const Fl_Glut_StrokeVertex ch89st0[] =
+{
+ {14.2857f,100.0f},
+ {52.3809f,52.381f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch89st1[] =
+{
+ {90.4762f,100.0f},
+ {52.3809f,52.381f}
+};
+
+static const Fl_Glut_StrokeStrip ch89st[] =
+{
+ {3,ch89st0},
+ {2,ch89st1}
+};
+
+static const Fl_Glut_StrokeChar ch89 = {104.762f,2,ch89st};
+
+/* char: 0x5a */
+
+static const Fl_Glut_StrokeVertex ch90st0[] =
+{
+ {85.7143f,100.0f},
+ {19.0476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch90st1[] =
+{
+ {19.0476f,100.0f},
+ {85.7143f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch90st2[] =
+{
+ {19.0476f,0.0f},
+ {85.7143f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch90st[] =
+{
+ {2,ch90st0},
+ {2,ch90st1},
+ {2,ch90st2}
+};
+
+static const Fl_Glut_StrokeChar ch90 = {104.762f,3,ch90st};
+
+/* char: 0x5b */
+
+static const Fl_Glut_StrokeVertex ch91st0[] =
+{
+ {35.7143f,119.048f},
+ {35.7143f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch91st1[] =
+{
+ {40.4762f,119.048f},
+ {40.4762f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch91st2[] =
+{
+ {35.7143f,119.048f},
+ {69.0476f,119.048f}
+};
+
+static const Fl_Glut_StrokeVertex ch91st3[] =
+{
+ {35.7143f,-33.3333f},
+ {69.0476f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch91st[] =
+{
+ {2,ch91st0},
+ {2,ch91st1},
+ {2,ch91st2},
+ {2,ch91st3}
+};
+
+static const Fl_Glut_StrokeChar ch91 = {104.762f,4,ch91st};
+
+/* char: 0x5c */
+
+static const Fl_Glut_StrokeVertex ch92st0[] =
+{
+ {19.0476f,100.0f},
+ {85.7143f,-14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch92st[] =
+{
+ {2,ch92st0}
+};
+
+static const Fl_Glut_StrokeChar ch92 = {104.762f,1,ch92st};
+
+/* char: 0x5d */
+
+static const Fl_Glut_StrokeVertex ch93st0[] =
+{
+ {64.2857f,119.048f},
+ {64.2857f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch93st1[] =
+{
+ {69.0476f,119.048f},
+ {69.0476f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch93st2[] =
+{
+ {35.7143f,119.048f},
+ {69.0476f,119.048f}
+};
+
+static const Fl_Glut_StrokeVertex ch93st3[] =
+{
+ {35.7143f,-33.3333f},
+ {69.0476f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch93st[] =
+{
+ {2,ch93st0},
+ {2,ch93st1},
+ {2,ch93st2},
+ {2,ch93st3}
+};
+
+static const Fl_Glut_StrokeChar ch93 = {104.762f,4,ch93st};
+
+/* char: 0x5e */
+
+static const Fl_Glut_StrokeVertex ch94st0[] =
+{
+ {52.3809f,109.524f},
+ {14.2857f,42.8571f}
+};
+
+static const Fl_Glut_StrokeVertex ch94st1[] =
+{
+ {52.3809f,109.524f},
+ {90.4762f,42.8571f}
+};
+
+static const Fl_Glut_StrokeStrip ch94st[] =
+{
+ {2,ch94st0},
+ {2,ch94st1}
+};
+
+static const Fl_Glut_StrokeChar ch94 = {104.762f,2,ch94st};
+
+/* char: 0x5f */
+
+static const Fl_Glut_StrokeVertex ch95st0[] =
+{
+ {0,-33.3333f},
+ {104.762f,-33.3333f},
+ {104.762f,-28.5714f},
+ {0,-28.5714f},
+ {0,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch95st[] =
+{
+ {5,ch95st0}
+};
+
+static const Fl_Glut_StrokeChar ch95 = {104.762f,1,ch95st};
+
+/* char: 0x60 */
+
+static const Fl_Glut_StrokeVertex ch96st0[] =
+{
+ {42.8572f,100.0f},
+ {66.6667f,71.4286f}
+};
+
+static const Fl_Glut_StrokeVertex ch96st1[] =
+{
+ {42.8572f,100.0f},
+ {38.0953f,95.2381f},
+ {66.6667f,71.4286f}
+};
+
+static const Fl_Glut_StrokeStrip ch96st[] =
+{
+ {2,ch96st0},
+ {3,ch96st1}
+};
+
+static const Fl_Glut_StrokeChar ch96 = {104.762f,2,ch96st};
+
+/* char: 0x61 */
+
+static const Fl_Glut_StrokeVertex ch97st0[] =
+{
+ {80.9524f,66.6667f},
+ {80.9524f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch97st1[] =
+{
+ {80.9524f,52.381f},
+ {71.4285f,61.9048f},
+ {61.9047f,66.6667f},
+ {47.619f,66.6667f},
+ {38.0952f,61.9048f},
+ {28.5714f,52.381f},
+ {23.8095f,38.0952f},
+ {23.8095f,28.5714f},
+ {28.5714f,14.2857f},
+ {38.0952f,4.7619f},
+ {47.619f,0.0f},
+ {61.9047f,0.0f},
+ {71.4285f,4.7619f},
+ {80.9524f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch97st[] =
+{
+ {2,ch97st0},
+ {14,ch97st1}
+};
+
+static const Fl_Glut_StrokeChar ch97 = {104.762f,2,ch97st};
+
+/* char: 0x62 */
+
+static const Fl_Glut_StrokeVertex ch98st0[] =
+{
+ {23.8095f,100.0f},
+ {23.8095f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch98st1[] =
+{
+ {23.8095f,52.381f},
+ {33.3333f,61.9048f},
+ {42.8571f,66.6667f},
+ {57.1428f,66.6667f},
+ {66.6666f,61.9048f},
+ {76.1905f,52.381f},
+ {80.9524f,38.0952f},
+ {80.9524f,28.5714f},
+ {76.1905f,14.2857f},
+ {66.6666f,4.7619f},
+ {57.1428f,0.0f},
+ {42.8571f,0.0f},
+ {33.3333f,4.7619f},
+ {23.8095f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch98st[] =
+{
+ {2,ch98st0},
+ {14,ch98st1}
+};
+
+static const Fl_Glut_StrokeChar ch98 = {104.762f,2,ch98st};
+
+/* char: 0x63 */
+
+static const Fl_Glut_StrokeVertex ch99st0[] =
+{
+ {80.9524f,52.381f},
+ {71.4285f,61.9048f},
+ {61.9047f,66.6667f},
+ {47.619f,66.6667f},
+ {38.0952f,61.9048f},
+ {28.5714f,52.381f},
+ {23.8095f,38.0952f},
+ {23.8095f,28.5714f},
+ {28.5714f,14.2857f},
+ {38.0952f,4.7619f},
+ {47.619f,0.0f},
+ {61.9047f,0.0f},
+ {71.4285f,4.7619f},
+ {80.9524f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch99st[] =
+{
+ {14,ch99st0}
+};
+
+static const Fl_Glut_StrokeChar ch99 = {104.762f,1,ch99st};
+
+/* char: 0x64 */
+
+static const Fl_Glut_StrokeVertex ch100st0[] =
+{
+ {80.9524f,100.0f},
+ {80.9524f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch100st1[] =
+{
+ {80.9524f,52.381f},
+ {71.4285f,61.9048f},
+ {61.9047f,66.6667f},
+ {47.619f,66.6667f},
+ {38.0952f,61.9048f},
+ {28.5714f,52.381f},
+ {23.8095f,38.0952f},
+ {23.8095f,28.5714f},
+ {28.5714f,14.2857f},
+ {38.0952f,4.7619f},
+ {47.619f,0.0f},
+ {61.9047f,0.0f},
+ {71.4285f,4.7619f},
+ {80.9524f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch100st[] =
+{
+ {2,ch100st0},
+ {14,ch100st1}
+};
+
+static const Fl_Glut_StrokeChar ch100 = {104.762f,2,ch100st};
+
+/* char: 0x65 */
+
+static const Fl_Glut_StrokeVertex ch101st0[] =
+{
+ {23.8095f,38.0952f},
+ {80.9524f,38.0952f},
+ {80.9524f,47.619f},
+ {76.1905f,57.1429f},
+ {71.4285f,61.9048f},
+ {61.9047f,66.6667f},
+ {47.619f,66.6667f},
+ {38.0952f,61.9048f},
+ {28.5714f,52.381f},
+ {23.8095f,38.0952f},
+ {23.8095f,28.5714f},
+ {28.5714f,14.2857f},
+ {38.0952f,4.7619f},
+ {47.619f,0.0f},
+ {61.9047f,0.0f},
+ {71.4285f,4.7619f},
+ {80.9524f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch101st[] =
+{
+ {17,ch101st0}
+};
+
+static const Fl_Glut_StrokeChar ch101 = {104.762f,1,ch101st};
+
+/* char: 0x66 */
+
+static const Fl_Glut_StrokeVertex ch102st0[] =
+{
+ {71.4286f,100.0f},
+ {61.9048f,100.0f},
+ {52.381f,95.2381f},
+ {47.6191f,80.9524f},
+ {47.6191f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch102st1[] =
+{
+ {33.3334f,66.6667f},
+ {66.6667f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch102st[] =
+{
+ {5,ch102st0},
+ {2,ch102st1}
+};
+
+static const Fl_Glut_StrokeChar ch102 = {104.762f,2,ch102st};
+
+/* char: 0x67 */
+
+static const Fl_Glut_StrokeVertex ch103st0[] =
+{
+ {80.9524f,66.6667f},
+ {80.9524f,-9.5238f},
+ {76.1905f,-23.8095f},
+ {71.4285f,-28.5714f},
+ {61.9047f,-33.3333f},
+ {47.619f,-33.3333f},
+ {38.0952f,-28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch103st1[] =
+{
+ {80.9524f,52.381f},
+ {71.4285f,61.9048f},
+ {61.9047f,66.6667f},
+ {47.619f,66.6667f},
+ {38.0952f,61.9048f},
+ {28.5714f,52.381f},
+ {23.8095f,38.0952f},
+ {23.8095f,28.5714f},
+ {28.5714f,14.2857f},
+ {38.0952f,4.7619f},
+ {47.619f,0.0f},
+ {61.9047f,0.0f},
+ {71.4285f,4.7619f},
+ {80.9524f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch103st[] =
+{
+ {7,ch103st0},
+ {14,ch103st1}
+};
+
+static const Fl_Glut_StrokeChar ch103 = {104.762f,2,ch103st};
+
+/* char: 0x68 */
+
+static const Fl_Glut_StrokeVertex ch104st0[] =
+{
+ {26.1905f,100.0f},
+ {26.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch104st1[] =
+{
+ {26.1905f,47.619f},
+ {40.4762f,61.9048f},
+ {50.0f,66.6667f},
+ {64.2857f,66.6667f},
+ {73.8095f,61.9048f},
+ {78.5715f,47.619f},
+ {78.5715f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch104st[] =
+{
+ {2,ch104st0},
+ {7,ch104st1}
+};
+
+static const Fl_Glut_StrokeChar ch104 = {104.762f,2,ch104st};
+
+/* char: 0x69 */
+
+static const Fl_Glut_StrokeVertex ch105st0[] =
+{
+ {47.6191f,100.0f},
+ {52.381f,95.2381f},
+ {57.1429f,100.0f},
+ {52.381f,104.762f},
+ {47.6191f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch105st1[] =
+{
+ {52.381f,66.6667f},
+ {52.381f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch105st[] =
+{
+ {5,ch105st0},
+ {2,ch105st1}
+};
+
+static const Fl_Glut_StrokeChar ch105 = {104.762f,2,ch105st};
+
+/* char: 0x6a */
+
+static const Fl_Glut_StrokeVertex ch106st0[] =
+{
+ {57.1429f,100.0f},
+ {61.9048f,95.2381f},
+ {66.6667f,100.0f},
+ {61.9048f,104.762f},
+ {57.1429f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch106st1[] =
+{
+ {61.9048f,66.6667f},
+ {61.9048f,-14.2857f},
+ {57.1429f,-28.5714f},
+ {47.6191f,-33.3333f},
+ {38.0953f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch106st[] =
+{
+ {5,ch106st0},
+ {5,ch106st1}
+};
+
+static const Fl_Glut_StrokeChar ch106 = {104.762f,2,ch106st};
+
+/* char: 0x6b */
+
+static const Fl_Glut_StrokeVertex ch107st0[] =
+{
+ {26.1905f,100.0f},
+ {26.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch107st1[] =
+{
+ {73.8095f,66.6667f},
+ {26.1905f,19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch107st2[] =
+{
+ {45.2381f,38.0952f},
+ {78.5715f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch107st[] =
+{
+ {2,ch107st0},
+ {2,ch107st1},
+ {2,ch107st2}
+};
+
+static const Fl_Glut_StrokeChar ch107 = {104.762f,3,ch107st};
+
+/* char: 0x6c */
+
+static const Fl_Glut_StrokeVertex ch108st0[] =
+{
+ {52.381f,100.0f},
+ {52.381f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch108st[] =
+{
+ {2,ch108st0}
+};
+
+static const Fl_Glut_StrokeChar ch108 = {104.762f,1,ch108st};
+
+/* char: 0x6d */
+
+static const Fl_Glut_StrokeVertex ch109st0[] =
+{
+ {0,66.6667f},
+ {0,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch109st1[] =
+{
+ {0,47.619f},
+ {14.2857f,61.9048f},
+ {23.8095f,66.6667f},
+ {38.0952f,66.6667f},
+ {47.619f,61.9048f},
+ {52.381f,47.619f},
+ {52.381f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch109st2[] =
+{
+ {52.381f,47.619f},
+ {66.6667f,61.9048f},
+ {76.1905f,66.6667f},
+ {90.4762f,66.6667f},
+ {100.0f,61.9048f},
+ {104.762f,47.619f},
+ {104.762f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch109st[] =
+{
+ {2,ch109st0},
+ {7,ch109st1},
+ {7,ch109st2}
+};
+
+static const Fl_Glut_StrokeChar ch109 = {104.762f,3,ch109st};
+
+/* char: 0x6e */
+
+static const Fl_Glut_StrokeVertex ch110st0[] =
+{
+ {26.1905f,66.6667f},
+ {26.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch110st1[] =
+{
+ {26.1905f,47.619f},
+ {40.4762f,61.9048f},
+ {50.0f,66.6667f},
+ {64.2857f,66.6667f},
+ {73.8095f,61.9048f},
+ {78.5715f,47.619f},
+ {78.5715f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch110st[] =
+{
+ {2,ch110st0},
+ {7,ch110st1}
+};
+
+static const Fl_Glut_StrokeChar ch110 = {104.762f,2,ch110st};
+
+/* char: 0x6f */
+
+static const Fl_Glut_StrokeVertex ch111st0[] =
+{
+ {45.2381f,66.6667f},
+ {35.7143f,61.9048f},
+ {26.1905f,52.381f},
+ {21.4286f,38.0952f},
+ {21.4286f,28.5714f},
+ {26.1905f,14.2857f},
+ {35.7143f,4.7619f},
+ {45.2381f,0.0f},
+ {59.5238f,0.0f},
+ {69.0476f,4.7619f},
+ {78.5714f,14.2857f},
+ {83.3334f,28.5714f},
+ {83.3334f,38.0952f},
+ {78.5714f,52.381f},
+ {69.0476f,61.9048f},
+ {59.5238f,66.6667f},
+ {45.2381f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch111st[] =
+{
+ {17,ch111st0}
+};
+
+static const Fl_Glut_StrokeChar ch111 = {104.762f,1,ch111st};
+
+/* char: 0x70 */
+
+static const Fl_Glut_StrokeVertex ch112st0[] =
+{
+ {23.8095f,66.6667f},
+ {23.8095f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch112st1[] =
+{
+ {23.8095f,52.381f},
+ {33.3333f,61.9048f},
+ {42.8571f,66.6667f},
+ {57.1428f,66.6667f},
+ {66.6666f,61.9048f},
+ {76.1905f,52.381f},
+ {80.9524f,38.0952f},
+ {80.9524f,28.5714f},
+ {76.1905f,14.2857f},
+ {66.6666f,4.7619f},
+ {57.1428f,0.0f},
+ {42.8571f,0.0f},
+ {33.3333f,4.7619f},
+ {23.8095f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch112st[] =
+{
+ {2,ch112st0},
+ {14,ch112st1}
+};
+
+static const Fl_Glut_StrokeChar ch112 = {104.762f,2,ch112st};
+
+/* char: 0x71 */
+
+static const Fl_Glut_StrokeVertex ch113st0[] =
+{
+ {80.9524f,66.6667f},
+ {80.9524f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch113st1[] =
+{
+ {80.9524f,52.381f},
+ {71.4285f,61.9048f},
+ {61.9047f,66.6667f},
+ {47.619f,66.6667f},
+ {38.0952f,61.9048f},
+ {28.5714f,52.381f},
+ {23.8095f,38.0952f},
+ {23.8095f,28.5714f},
+ {28.5714f,14.2857f},
+ {38.0952f,4.7619f},
+ {47.619f,0.0f},
+ {61.9047f,0.0f},
+ {71.4285f,4.7619f},
+ {80.9524f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch113st[] =
+{
+ {2,ch113st0},
+ {14,ch113st1}
+};
+
+static const Fl_Glut_StrokeChar ch113 = {104.762f,2,ch113st};
+
+/* char: 0x72 */
+
+static const Fl_Glut_StrokeVertex ch114st0[] =
+{
+ {33.3334f,66.6667f},
+ {33.3334f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch114st1[] =
+{
+ {33.3334f,38.0952f},
+ {38.0953f,52.381f},
+ {47.6191f,61.9048f},
+ {57.1429f,66.6667f},
+ {71.4286f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch114st[] =
+{
+ {2,ch114st0},
+ {5,ch114st1}
+};
+
+static const Fl_Glut_StrokeChar ch114 = {104.762f,2,ch114st};
+
+/* char: 0x73 */
+
+static const Fl_Glut_StrokeVertex ch115st0[] =
+{
+ {78.5715f,52.381f},
+ {73.8095f,61.9048f},
+ {59.5238f,66.6667f},
+ {45.2381f,66.6667f},
+ {30.9524f,61.9048f},
+ {26.1905f,52.381f},
+ {30.9524f,42.8571f},
+ {40.4762f,38.0952f},
+ {64.2857f,33.3333f},
+ {73.8095f,28.5714f},
+ {78.5715f,19.0476f},
+ {78.5715f,14.2857f},
+ {73.8095f,4.7619f},
+ {59.5238f,0.0f},
+ {45.2381f,0.0f},
+ {30.9524f,4.7619f},
+ {26.1905f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch115st[] =
+{
+ {17,ch115st0}
+};
+
+static const Fl_Glut_StrokeChar ch115 = {104.762f,1,ch115st};
+
+/* char: 0x74 */
+
+static const Fl_Glut_StrokeVertex ch116st0[] =
+{
+ {47.6191f,100.0f},
+ {47.6191f,19.0476f},
+ {52.381f,4.7619f},
+ {61.9048f,0.0f},
+ {71.4286f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch116st1[] =
+{
+ {33.3334f,66.6667f},
+ {66.6667f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch116st[] =
+{
+ {5,ch116st0},
+ {2,ch116st1}
+};
+
+static const Fl_Glut_StrokeChar ch116 = {104.762f,2,ch116st};
+
+/* char: 0x75 */
+
+static const Fl_Glut_StrokeVertex ch117st0[] =
+{
+ {26.1905f,66.6667f},
+ {26.1905f,19.0476f},
+ {30.9524f,4.7619f},
+ {40.4762f,0.0f},
+ {54.7619f,0.0f},
+ {64.2857f,4.7619f},
+ {78.5715f,19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch117st1[] =
+{
+ {78.5715f,66.6667f},
+ {78.5715f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch117st[] =
+{
+ {7,ch117st0},
+ {2,ch117st1}
+};
+
+static const Fl_Glut_StrokeChar ch117 = {104.762f,2,ch117st};
+
+/* char: 0x76 */
+
+static const Fl_Glut_StrokeVertex ch118st0[] =
+{
+ {23.8095f,66.6667f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch118st1[] =
+{
+ {80.9524f,66.6667f},
+ {52.3809f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch118st[] =
+{
+ {2,ch118st0},
+ {2,ch118st1}
+};
+
+static const Fl_Glut_StrokeChar ch118 = {104.762f,2,ch118st};
+
+/* char: 0x77 */
+
+static const Fl_Glut_StrokeVertex ch119st0[] =
+{
+ {14.2857f,66.6667f},
+ {33.3333f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch119st1[] =
+{
+ {52.3809f,66.6667f},
+ {33.3333f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch119st2[] =
+{
+ {52.3809f,66.6667f},
+ {71.4286f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch119st3[] =
+{
+ {90.4762f,66.6667f},
+ {71.4286f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch119st[] =
+{
+ {2,ch119st0},
+ {2,ch119st1},
+ {2,ch119st2},
+ {2,ch119st3}
+};
+
+static const Fl_Glut_StrokeChar ch119 = {104.762f,4,ch119st};
+
+/* char: 0x78 */
+
+static const Fl_Glut_StrokeVertex ch120st0[] =
+{
+ {26.1905f,66.6667f},
+ {78.5715f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch120st1[] =
+{
+ {78.5715f,66.6667f},
+ {26.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch120st[] =
+{
+ {2,ch120st0},
+ {2,ch120st1}
+};
+
+static const Fl_Glut_StrokeChar ch120 = {104.762f,2,ch120st};
+
+/* char: 0x79 */
+
+static const Fl_Glut_StrokeVertex ch121st0[] =
+{
+ {26.1905f,66.6667f},
+ {54.7619f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch121st1[] =
+{
+ {83.3334f,66.6667f},
+ {54.7619f,0.0f},
+ {45.2381f,-19.0476f},
+ {35.7143f,-28.5714f},
+ {26.1905f,-33.3333f},
+ {21.4286f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch121st[] =
+{
+ {2,ch121st0},
+ {6,ch121st1}
+};
+
+static const Fl_Glut_StrokeChar ch121 = {104.762f,2,ch121st};
+
+/* char: 0x7a */
+
+static const Fl_Glut_StrokeVertex ch122st0[] =
+{
+ {78.5715f,66.6667f},
+ {26.1905f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch122st1[] =
+{
+ {26.1905f,66.6667f},
+ {78.5715f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch122st2[] =
+{
+ {26.1905f,0.0f},
+ {78.5715f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch122st[] =
+{
+ {2,ch122st0},
+ {2,ch122st1},
+ {2,ch122st2}
+};
+
+static const Fl_Glut_StrokeChar ch122 = {104.762f,3,ch122st};
+
+/* char: 0x7b */
+
+static const Fl_Glut_StrokeVertex ch123st0[] =
+{
+ {64.2857f,119.048f},
+ {54.7619f,114.286f},
+ {50.0f,109.524f},
+ {45.2381f,100.0f},
+ {45.2381f,90.4762f},
+ {50.0f,80.9524f},
+ {54.7619f,76.1905f},
+ {59.5238f,66.6667f},
+ {59.5238f,57.1429f},
+ {50.0f,47.619f}
+};
+
+static const Fl_Glut_StrokeVertex ch123st1[] =
+{
+ {54.7619f,114.286f},
+ {50.0f,104.762f},
+ {50.0f,95.2381f},
+ {54.7619f,85.7143f},
+ {59.5238f,80.9524f},
+ {64.2857f,71.4286f},
+ {64.2857f,61.9048f},
+ {59.5238f,52.381f},
+ {40.4762f,42.8571f},
+ {59.5238f,33.3333f},
+ {64.2857f,23.8095f},
+ {64.2857f,14.2857f},
+ {59.5238f,4.7619f},
+ {54.7619f,0.0f},
+ {50.0f,-9.5238f},
+ {50.0f,-19.0476f},
+ {54.7619f,-28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch123st2[] =
+{
+ {50.0f,38.0952f},
+ {59.5238f,28.5714f},
+ {59.5238f,19.0476f},
+ {54.7619f,9.5238f},
+ {50.0f,4.7619f},
+ {45.2381f,-4.7619f},
+ {45.2381f,-14.2857f},
+ {50.0f,-23.8095f},
+ {54.7619f,-28.5714f},
+ {64.2857f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch123st[] =
+{
+ {10,ch123st0},
+ {17,ch123st1},
+ {10,ch123st2}
+};
+
+static const Fl_Glut_StrokeChar ch123 = {104.762f,3,ch123st};
+
+/* char: 0x7c */
+
+static const Fl_Glut_StrokeVertex ch124st0[] =
+{
+ {52.381f,119.048f},
+ {52.381f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch124st[] =
+{
+ {2,ch124st0}
+};
+
+static const Fl_Glut_StrokeChar ch124 = {104.762f,1,ch124st};
+
+/* char: 0x7d */
+
+static const Fl_Glut_StrokeVertex ch125st0[] =
+{
+ {40.4762f,119.048f},
+ {50.0f,114.286f},
+ {54.7619f,109.524f},
+ {59.5238f,100.0f},
+ {59.5238f,90.4762f},
+ {54.7619f,80.9524f},
+ {50.0f,76.1905f},
+ {45.2381f,66.6667f},
+ {45.2381f,57.1429f},
+ {54.7619f,47.619f}
+};
+
+static const Fl_Glut_StrokeVertex ch125st1[] =
+{
+ {50.0f,114.286f},
+ {54.7619f,104.762f},
+ {54.7619f,95.2381f},
+ {50.0f,85.7143f},
+ {45.2381f,80.9524f},
+ {40.4762f,71.4286f},
+ {40.4762f,61.9048f},
+ {45.2381f,52.381f},
+ {64.2857f,42.8571f},
+ {45.2381f,33.3333f},
+ {40.4762f,23.8095f},
+ {40.4762f,14.2857f},
+ {45.2381f,4.7619f},
+ {50.0f,0.0f},
+ {54.7619f,-9.5238f},
+ {54.7619f,-19.0476f},
+ {50.0f,-28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch125st2[] =
+{
+ {54.7619f,38.0952f},
+ {45.2381f,28.5714f},
+ {45.2381f,19.0476f},
+ {50.0f,9.5238f},
+ {54.7619f,4.7619f},
+ {59.5238f,-4.7619f},
+ {59.5238f,-14.2857f},
+ {54.7619f,-23.8095f},
+ {50.0f,-28.5714f},
+ {40.4762f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch125st[] =
+{
+ {10,ch125st0},
+ {17,ch125st1},
+ {10,ch125st2}
+};
+
+static const Fl_Glut_StrokeChar ch125 = {104.762f,3,ch125st};
+
+/* char: 0x7e */
+
+static const Fl_Glut_StrokeVertex ch126st0[] =
+{
+ {9.5238f,28.5714f},
+ {9.5238f,38.0952f},
+ {14.2857f,52.381f},
+ {23.8095f,57.1429f},
+ {33.3333f,57.1429f},
+ {42.8571f,52.381f},
+ {61.9048f,38.0952f},
+ {71.4286f,33.3333f},
+ {80.9524f,33.3333f},
+ {90.4762f,38.0952f},
+ {95.2381f,47.619f}
+};
+
+static const Fl_Glut_StrokeVertex ch126st1[] =
+{
+ {9.5238f,38.0952f},
+ {14.2857f,47.619f},
+ {23.8095f,52.381f},
+ {33.3333f,52.381f},
+ {42.8571f,47.619f},
+ {61.9048f,33.3333f},
+ {71.4286f,28.5714f},
+ {80.9524f,28.5714f},
+ {90.4762f,33.3333f},
+ {95.2381f,47.619f},
+ {95.2381f,57.1429f}
+};
+
+static const Fl_Glut_StrokeStrip ch126st[] =
+{
+ {11,ch126st0},
+ {11,ch126st1}
+};
+
+static const Fl_Glut_StrokeChar ch126 = {104.762f,2,ch126st};
+
+/* char: 0x7f */
+
+static const Fl_Glut_StrokeVertex ch127st0[] =
+{
+ {71.4286f,100.0f},
+ {33.3333f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch127st1[] =
+{
+ {47.619f,66.6667f},
+ {33.3333f,61.9048f},
+ {23.8095f,52.381f},
+ {19.0476f,38.0952f},
+ {19.0476f,23.8095f},
+ {23.8095f,14.2857f},
+ {33.3333f,4.7619f},
+ {47.619f,0.0f},
+ {57.1428f,0.0f},
+ {71.4286f,4.7619f},
+ {80.9524f,14.2857f},
+ {85.7143f,28.5714f},
+ {85.7143f,42.8571f},
+ {80.9524f,52.381f},
+ {71.4286f,61.9048f},
+ {57.1428f,66.6667f},
+ {47.619f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch127st[] =
+{
+ {2,ch127st0},
+ {17,ch127st1}
+};
+
+static const Fl_Glut_StrokeChar ch127 = {104.762f,2,ch127st};
+
+static const Fl_Glut_StrokeChar *chars[] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39,
+ &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47,
+ &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55,
+ &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63,
+ &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71,
+ &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79,
+ &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87,
+ &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95,
+ &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103,
+ &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111,
+ &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119,
+ &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, &ch127
+};
+
+Fl_Glut_StrokeFont glutStrokeMonoRoman = {(char *)"MonoRoman",128,152.381f,chars};


Property changes on: branches/branch-3.0/src/core/freeglut_stroke_mono_roman.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/freeglut_stroke_roman.cxx
===================================================================
--- branches/branch-3.0/src/core/freeglut_stroke_roman.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/freeglut_stroke_roman.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2848 @@
+/*
+ * freeglut_stroke_roman.c
+ *
+ * freeglut Roman stroke font definition
+ *
+ * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Creation date: Thu Dec 16 1999
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/* This file has been automatically generated by the genstroke utility. */
+
+#include <fltk3/glut.h>
+
+/* char: 0x20 */
+
+static const Fl_Glut_StrokeStrip ch32st[] =
+{
+  { 0, 0 }
+};
+
+static const Fl_Glut_StrokeChar ch32 = {104.762f,0,ch32st};
+
+/* char: 0x21 */
+
+static const Fl_Glut_StrokeVertex ch33st0[] =
+{
+ {13.3819f,100.0f},
+ {13.3819f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch33st1[] =
+{
+ {13.3819f,9.5238f},
+ {8.62f,4.7619f},
+ {13.3819f,0.0f},
+ {18.1438f,4.7619f},
+ {13.3819f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch33st[] =
+{
+ {2,ch33st0},
+ {5,ch33st1}
+};
+
+static const Fl_Glut_StrokeChar ch33 = {26.6238f,2,ch33st};
+
+/* char: 0x22 */
+
+static const Fl_Glut_StrokeVertex ch34st0[] =
+{
+ {4.02f,100.0f},
+ {4.02f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch34st1[] =
+{
+ {42.1152f,100.0f},
+ {42.1152f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch34st[] =
+{
+ {2,ch34st0},
+ {2,ch34st1}
+};
+
+static const Fl_Glut_StrokeChar ch34 = {51.4352f,2,ch34st};
+
+/* char: 0x23 */
+
+static const Fl_Glut_StrokeVertex ch35st0[] =
+{
+ {41.2952f,119.048f},
+ {7.9619f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch35st1[] =
+{
+ {69.8667f,119.048f},
+ {36.5333f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch35st2[] =
+{
+ {7.9619f,57.1429f},
+ {74.6286f,57.1429f}
+};
+
+static const Fl_Glut_StrokeVertex ch35st3[] =
+{
+ {3.2f,28.5714f},
+ {69.8667f,28.5714f}
+};
+
+static const Fl_Glut_StrokeStrip ch35st[] =
+{
+ {2,ch35st0},
+ {2,ch35st1},
+ {2,ch35st2},
+ {2,ch35st3}
+};
+
+static const Fl_Glut_StrokeChar ch35 = {79.4886f,4,ch35st};
+
+/* char: 0x24 */
+
+static const Fl_Glut_StrokeVertex ch36st0[] =
+{
+ {28.6295f,119.048f},
+ {28.6295f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch36st1[] =
+{
+ {47.6771f,119.048f},
+ {47.6771f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch36st2[] =
+{
+ {71.4867f,85.7143f},
+ {61.9629f,95.2381f},
+ {47.6771f,100.0f},
+ {28.6295f,100.0f},
+ {14.3438f,95.2381f},
+ {4.82f,85.7143f},
+ {4.82f,76.1905f},
+ {9.5819f,66.6667f},
+ {14.3438f,61.9048f},
+ {23.8676f,57.1429f},
+ {52.439f,47.619f},
+ {61.9629f,42.8571f},
+ {66.7248f,38.0952f},
+ {71.4867f,28.5714f},
+ {71.4867f,14.2857f},
+ {61.9629f,4.7619f},
+ {47.6771f,0.0f},
+ {28.6295f,0.0f},
+ {14.3438f,4.7619f},
+ {4.82f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch36st[] =
+{
+ {2,ch36st0},
+ {2,ch36st1},
+ {20,ch36st2}
+};
+
+static const Fl_Glut_StrokeChar ch36 = {76.2067f,3,ch36st};
+
+/* char: 0x25 */
+
+static const Fl_Glut_StrokeVertex ch37st0[] =
+{
+ {92.0743f,100.0f},
+ {6.36f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch37st1[] =
+{
+ {30.1695f,100.0f},
+ {39.6933f,90.4762f},
+ {39.6933f,80.9524f},
+ {34.9314f,71.4286f},
+ {25.4076f,66.6667f},
+ {15.8838f,66.6667f},
+ {6.36f,76.1905f},
+ {6.36f,85.7143f},
+ {11.1219f,95.2381f},
+ {20.6457f,100.0f},
+ {30.1695f,100.0f},
+ {39.6933f,95.2381f},
+ {53.979f,90.4762f},
+ {68.2648f,90.4762f},
+ {82.5505f,95.2381f},
+ {92.0743f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch37st2[] =
+{
+ {73.0267f,33.3333f},
+ {63.5029f,28.5714f},
+ {58.741f,19.0476f},
+ {58.741f,9.5238f},
+ {68.2648f,0.0f},
+ {77.7886f,0.0f},
+ {87.3124f,4.7619f},
+ {92.0743f,14.2857f},
+ {92.0743f,23.8095f},
+ {82.5505f,33.3333f},
+ {73.0267f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch37st[] =
+{
+ {2,ch37st0},
+ {16,ch37st1},
+ {11,ch37st2}
+};
+
+static const Fl_Glut_StrokeChar ch37 = {96.5743f,3,ch37st};
+
+/* char: 0x26 */
+
+static const Fl_Glut_StrokeVertex ch38st0[] =
+{
+ {101.218f,57.1429f},
+ {101.218f,61.9048f},
+ {96.4562f,66.6667f},
+ {91.6943f,66.6667f},
+ {86.9324f,61.9048f},
+ {82.1705f,52.381f},
+ {72.6467f,28.5714f},
+ {63.1229f,14.2857f},
+ {53.599f,4.7619f},
+ {44.0752f,0.0f},
+ {25.0276f,0.0f},
+ {15.5038f,4.7619f},
+ {10.7419f,9.5238f},
+ {5.98f,19.0476f},
+ {5.98f,28.5714f},
+ {10.7419f,38.0952f},
+ {15.5038f,42.8571f},
+ {48.8371f,61.9048f},
+ {53.599f,66.6667f},
+ {58.361f,76.1905f},
+ {58.361f,85.7143f},
+ {53.599f,95.2381f},
+ {44.0752f,100.0f},
+ {34.5514f,95.2381f},
+ {29.7895f,85.7143f},
+ {29.7895f,76.1905f},
+ {34.5514f,61.9048f},
+ {44.0752f,47.619f},
+ {67.8848f,14.2857f},
+ {77.4086f,4.7619f},
+ {86.9324f,0.0f},
+ {96.4562f,0.0f},
+ {101.218f,4.7619f},
+ {101.218f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch38st[] =
+{
+ {34,ch38st0}
+};
+
+static const Fl_Glut_StrokeChar ch38 = {101.758f,1,ch38st};
+
+/* char: 0x27 */
+
+static const Fl_Glut_StrokeVertex ch39st0[] =
+{
+ {4.44f,100.0f},
+ {4.44f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch39st[] =
+{
+ {2,ch39st0}
+};
+
+static const Fl_Glut_StrokeChar ch39 = {13.62f,1,ch39st};
+
+/* char: 0x28 */
+
+static const Fl_Glut_StrokeVertex ch40st0[] =
+{
+ {40.9133f,119.048f},
+ {31.3895f,109.524f},
+ {21.8657f,95.2381f},
+ {12.3419f,76.1905f},
+ {7.58f,52.381f},
+ {7.58f,33.3333f},
+ {12.3419f,9.5238f},
+ {21.8657f,-9.5238f},
+ {31.3895f,-23.8095f},
+ {40.9133f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch40st[] =
+{
+ {10,ch40st0}
+};
+
+static const Fl_Glut_StrokeChar ch40 = {47.1733f,1,ch40st};
+
+/* char: 0x29 */
+
+static const Fl_Glut_StrokeVertex ch41st0[] =
+{
+ {5.28f,119.048f},
+ {14.8038f,109.524f},
+ {24.3276f,95.2381f},
+ {33.8514f,76.1905f},
+ {38.6133f,52.381f},
+ {38.6133f,33.3333f},
+ {33.8514f,9.5238f},
+ {24.3276f,-9.5238f},
+ {14.8038f,-23.8095f},
+ {5.28f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch41st[] =
+{
+ {10,ch41st0}
+};
+
+static const Fl_Glut_StrokeChar ch41 = {47.5333f,1,ch41st};
+
+/* char: 0x2a */
+
+static const Fl_Glut_StrokeVertex ch42st0[] =
+{
+ {30.7695f,71.4286f},
+ {30.7695f,14.2857f}
+};
+
+static const Fl_Glut_StrokeVertex ch42st1[] =
+{
+ {6.96f,57.1429f},
+ {54.579f,28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch42st2[] =
+{
+ {54.579f,57.1429f},
+ {6.96f,28.5714f}
+};
+
+static const Fl_Glut_StrokeStrip ch42st[] =
+{
+ {2,ch42st0},
+ {2,ch42st1},
+ {2,ch42st2}
+};
+
+static const Fl_Glut_StrokeChar ch42 = {59.439f,3,ch42st};
+
+/* char: 0x2b */
+
+static const Fl_Glut_StrokeVertex ch43st0[] =
+{
+ {48.8371f,85.7143f},
+ {48.8371f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch43st1[] =
+{
+ {5.98f,42.8571f},
+ {91.6943f,42.8571f}
+};
+
+static const Fl_Glut_StrokeStrip ch43st[] =
+{
+ {2,ch43st0},
+ {2,ch43st1}
+};
+
+static const Fl_Glut_StrokeChar ch43 = {97.2543f,2,ch43st};
+
+/* char: 0x2c */
+
+static const Fl_Glut_StrokeVertex ch44st0[] =
+{
+ {18.2838f,4.7619f},
+ {13.5219f,0.0f},
+ {8.76f,4.7619f},
+ {13.5219f,9.5238f},
+ {18.2838f,4.7619f},
+ {18.2838f,-4.7619f},
+ {13.5219f,-14.2857f},
+ {8.76f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch44st[] =
+{
+ {8,ch44st0}
+};
+
+static const Fl_Glut_StrokeChar ch44 = {26.0638f,1,ch44st};
+
+/* char: 0x2d */
+
+static const Fl_Glut_StrokeVertex ch45st0[] =
+{
+ {7.38f,42.8571f},
+ {93.0943f,42.8571f}
+};
+
+static const Fl_Glut_StrokeStrip ch45st[] =
+{
+ {2,ch45st0}
+};
+
+static const Fl_Glut_StrokeChar ch45 = {100.754f,1,ch45st};
+
+/* char: 0x2e */
+
+static const Fl_Glut_StrokeVertex ch46st0[] =
+{
+ {13.1019f,9.5238f},
+ {8.34f,4.7619f},
+ {13.1019f,0.0f},
+ {17.8638f,4.7619f},
+ {13.1019f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch46st[] =
+{
+ {5,ch46st0}
+};
+
+static const Fl_Glut_StrokeChar ch46 = {26.4838f,1,ch46st};
+
+/* char: 0x2f */
+
+static const Fl_Glut_StrokeVertex ch47st0[] =
+{
+ {7.24f,-14.2857f},
+ {73.9067f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch47st[] =
+{
+ {2,ch47st0}
+};
+
+static const Fl_Glut_StrokeChar ch47 = {82.1067f,1,ch47st};
+
+/* char: 0x30 */
+
+static const Fl_Glut_StrokeVertex ch48st0[] =
+{
+ {33.5514f,100.0f},
+ {19.2657f,95.2381f},
+ {9.7419f,80.9524f},
+ {4.98f,57.1429f},
+ {4.98f,42.8571f},
+ {9.7419f,19.0476f},
+ {19.2657f,4.7619f},
+ {33.5514f,0.0f},
+ {43.0752f,0.0f},
+ {57.361f,4.7619f},
+ {66.8848f,19.0476f},
+ {71.6467f,42.8571f},
+ {71.6467f,57.1429f},
+ {66.8848f,80.9524f},
+ {57.361f,95.2381f},
+ {43.0752f,100.0f},
+ {33.5514f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch48st[] =
+{
+ {17,ch48st0}
+};
+
+static const Fl_Glut_StrokeChar ch48 = {77.0667f,1,ch48st};
+
+/* char: 0x31 */
+
+static const Fl_Glut_StrokeVertex ch49st0[] =
+{
+ {11.82f,80.9524f},
+ {21.3438f,85.7143f},
+ {35.6295f,100.0f},
+ {35.6295f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch49st[] =
+{
+ {4,ch49st0}
+};
+
+static const Fl_Glut_StrokeChar ch49 = {66.5295f,1,ch49st};
+
+/* char: 0x32 */
+
+static const Fl_Glut_StrokeVertex ch50st0[] =
+{
+ {10.1819f,76.1905f},
+ {10.1819f,80.9524f},
+ {14.9438f,90.4762f},
+ {19.7057f,95.2381f},
+ {29.2295f,100.0f},
+ {48.2771f,100.0f},
+ {57.801f,95.2381f},
+ {62.5629f,90.4762f},
+ {67.3248f,80.9524f},
+ {67.3248f,71.4286f},
+ {62.5629f,61.9048f},
+ {53.039f,47.619f},
+ {5.42f,0.0f},
+ {72.0867f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch50st[] =
+{
+ {14,ch50st0}
+};
+
+static const Fl_Glut_StrokeChar ch50 = {77.6467f,1,ch50st};
+
+/* char: 0x33 */
+
+static const Fl_Glut_StrokeVertex ch51st0[] =
+{
+ {14.5238f,100.0f},
+ {66.9048f,100.0f},
+ {38.3333f,61.9048f},
+ {52.619f,61.9048f},
+ {62.1429f,57.1429f},
+ {66.9048f,52.381f},
+ {71.6667f,38.0952f},
+ {71.6667f,28.5714f},
+ {66.9048f,14.2857f},
+ {57.381f,4.7619f},
+ {43.0952f,0.0f},
+ {28.8095f,0.0f},
+ {14.5238f,4.7619f},
+ {9.7619f,9.5238f},
+ {5.0f,19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch51st[] =
+{
+ {15,ch51st0}
+};
+
+static const Fl_Glut_StrokeChar ch51 = {77.0467f,1,ch51st};
+
+/* char: 0x34 */
+
+static const Fl_Glut_StrokeVertex ch52st0[] =
+{
+ {51.499f,100.0f},
+ {3.88f,33.3333f},
+ {75.3086f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch52st1[] =
+{
+ {51.499f,100.0f},
+ {51.499f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch52st[] =
+{
+ {3,ch52st0},
+ {2,ch52st1}
+};
+
+static const Fl_Glut_StrokeChar ch52 = {80.1686f,2,ch52st};
+
+/* char: 0x35 */
+
+static const Fl_Glut_StrokeVertex ch53st0[] =
+{
+ {62.0029f,100.0f},
+ {14.3838f,100.0f},
+ {9.6219f,57.1429f},
+ {14.3838f,61.9048f},
+ {28.6695f,66.6667f},
+ {42.9552f,66.6667f},
+ {57.241f,61.9048f},
+ {66.7648f,52.381f},
+ {71.5267f,38.0952f},
+ {71.5267f,28.5714f},
+ {66.7648f,14.2857f},
+ {57.241f,4.7619f},
+ {42.9552f,0.0f},
+ {28.6695f,0.0f},
+ {14.3838f,4.7619f},
+ {9.6219f,9.5238f},
+ {4.86f,19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch53st[] =
+{
+ {17,ch53st0}
+};
+
+static const Fl_Glut_StrokeChar ch53 = {77.6867f,1,ch53st};
+
+/* char: 0x36 */
+
+static const Fl_Glut_StrokeVertex ch54st0[] =
+{
+ {62.7229f,85.7143f},
+ {57.961f,95.2381f},
+ {43.6752f,100.0f},
+ {34.1514f,100.0f},
+ {19.8657f,95.2381f},
+ {10.3419f,80.9524f},
+ {5.58f,57.1429f},
+ {5.58f,33.3333f},
+ {10.3419f,14.2857f},
+ {19.8657f,4.7619f},
+ {34.1514f,0.0f},
+ {38.9133f,0.0f},
+ {53.199f,4.7619f},
+ {62.7229f,14.2857f},
+ {67.4848f,28.5714f},
+ {67.4848f,33.3333f},
+ {62.7229f,47.619f},
+ {53.199f,57.1429f},
+ {38.9133f,61.9048f},
+ {34.1514f,61.9048f},
+ {19.8657f,57.1429f},
+ {10.3419f,47.619f},
+ {5.58f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch54st[] =
+{
+ {23,ch54st0}
+};
+
+static const Fl_Glut_StrokeChar ch54 = {73.8048f,1,ch54st};
+
+/* char: 0x37 */
+
+static const Fl_Glut_StrokeVertex ch55st0[] =
+{
+ {72.2267f,100.0f},
+ {24.6076f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch55st1[] =
+{
+ {5.56f,100.0f},
+ {72.2267f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch55st[] =
+{
+ {2,ch55st0},
+ {2,ch55st1}
+};
+
+static const Fl_Glut_StrokeChar ch55 = {77.2267f,2,ch55st};
+
+/* char: 0x38 */
+
+static const Fl_Glut_StrokeVertex ch56st0[] =
+{
+ {29.4095f,100.0f},
+ {15.1238f,95.2381f},
+ {10.3619f,85.7143f},
+ {10.3619f,76.1905f},
+ {15.1238f,66.6667f},
+ {24.6476f,61.9048f},
+ {43.6952f,57.1429f},
+ {57.981f,52.381f},
+ {67.5048f,42.8571f},
+ {72.2667f,33.3333f},
+ {72.2667f,19.0476f},
+ {67.5048f,9.5238f},
+ {62.7429f,4.7619f},
+ {48.4571f,0.0f},
+ {29.4095f,0.0f},
+ {15.1238f,4.7619f},
+ {10.3619f,9.5238f},
+ {5.6f,19.0476f},
+ {5.6f,33.3333f},
+ {10.3619f,42.8571f},
+ {19.8857f,52.381f},
+ {34.1714f,57.1429f},
+ {53.219f,61.9048f},
+ {62.7429f,66.6667f},
+ {67.5048f,76.1905f},
+ {67.5048f,85.7143f},
+ {62.7429f,95.2381f},
+ {48.4571f,100.0f},
+ {29.4095f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch56st[] =
+{
+ {29,ch56st0}
+};
+
+static const Fl_Glut_StrokeChar ch56 = {77.6667f,1,ch56st};
+
+/* char: 0x39 */
+
+static const Fl_Glut_StrokeVertex ch57st0[] =
+{
+ {68.5048f,66.6667f},
+ {63.7429f,52.381f},
+ {54.219f,42.8571f},
+ {39.9333f,38.0952f},
+ {35.1714f,38.0952f},
+ {20.8857f,42.8571f},
+ {11.3619f,52.381f},
+ {6.6f,66.6667f},
+ {6.6f,71.4286f},
+ {11.3619f,85.7143f},
+ {20.8857f,95.2381f},
+ {35.1714f,100.0f},
+ {39.9333f,100.0f},
+ {54.219f,95.2381f},
+ {63.7429f,85.7143f},
+ {68.5048f,66.6667f},
+ {68.5048f,42.8571f},
+ {63.7429f,19.0476f},
+ {54.219f,4.7619f},
+ {39.9333f,0.0f},
+ {30.4095f,0.0f},
+ {16.1238f,4.7619f},
+ {11.3619f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch57st[] =
+{
+ {23,ch57st0}
+};
+
+static const Fl_Glut_StrokeChar ch57 = {74.0648f,1,ch57st};
+
+/* char: 0x3a */
+
+static const Fl_Glut_StrokeVertex ch58st0[] =
+{
+ {14.0819f,66.6667f},
+ {9.32f,61.9048f},
+ {14.0819f,57.1429f},
+ {18.8438f,61.9048f},
+ {14.0819f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch58st1[] =
+{
+ {14.0819f,9.5238f},
+ {9.32f,4.7619f},
+ {14.0819f,0.0f},
+ {18.8438f,4.7619f},
+ {14.0819f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch58st[] =
+{
+ {5,ch58st0},
+ {5,ch58st1}
+};
+
+static const Fl_Glut_StrokeChar ch58 = {26.2238f,2,ch58st};
+
+/* char: 0x3b */
+
+static const Fl_Glut_StrokeVertex ch59st0[] =
+{
+ {12.9619f,66.6667f},
+ {8.2f,61.9048f},
+ {12.9619f,57.1429f},
+ {17.7238f,61.9048f},
+ {12.9619f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch59st1[] =
+{
+ {17.7238f,4.7619f},
+ {12.9619f,0.0f},
+ {8.2f,4.7619f},
+ {12.9619f,9.5238f},
+ {17.7238f,4.7619f},
+ {17.7238f,-4.7619f},
+ {12.9619f,-14.2857f},
+ {8.2f,-19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch59st[] =
+{
+ {5,ch59st0},
+ {8,ch59st1}
+};
+
+static const Fl_Glut_StrokeChar ch59 = {26.3038f,2,ch59st};
+
+/* char: 0x3c */
+
+static const Fl_Glut_StrokeVertex ch60st0[] =
+{
+ {79.2505f,85.7143f},
+ {3.06f,42.8571f},
+ {79.2505f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch60st[] =
+{
+ {3,ch60st0}
+};
+
+static const Fl_Glut_StrokeChar ch60 = {81.6105f,1,ch60st};
+
+/* char: 0x3d */
+
+static const Fl_Glut_StrokeVertex ch61st0[] =
+{
+ {5.7f,57.1429f},
+ {91.4143f,57.1429f}
+};
+
+static const Fl_Glut_StrokeVertex ch61st1[] =
+{
+ {5.7f,28.5714f},
+ {91.4143f,28.5714f}
+};
+
+static const Fl_Glut_StrokeStrip ch61st[] =
+{
+ {2,ch61st0},
+ {2,ch61st1}
+};
+
+static const Fl_Glut_StrokeChar ch61 = {97.2543f,2,ch61st};
+
+/* char: 0x3e */
+
+static const Fl_Glut_StrokeVertex ch62st0[] =
+{
+ {2.78f,85.7143f},
+ {78.9705f,42.8571f},
+ {2.78f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch62st[] =
+{
+ {3,ch62st0}
+};
+
+static const Fl_Glut_StrokeChar ch62 = {81.6105f,1,ch62st};
+
+/* char: 0x3f */
+
+static const Fl_Glut_StrokeVertex ch63st0[] =
+{
+ {8.42f,76.1905f},
+ {8.42f,80.9524f},
+ {13.1819f,90.4762f},
+ {17.9438f,95.2381f},
+ {27.4676f,100.0f},
+ {46.5152f,100.0f},
+ {56.039f,95.2381f},
+ {60.801f,90.4762f},
+ {65.5629f,80.9524f},
+ {65.5629f,71.4286f},
+ {60.801f,61.9048f},
+ {56.039f,57.1429f},
+ {36.9914f,47.619f},
+ {36.9914f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch63st1[] =
+{
+ {36.9914f,9.5238f},
+ {32.2295f,4.7619f},
+ {36.9914f,0.0f},
+ {41.7533f,4.7619f},
+ {36.9914f,9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch63st[] =
+{
+ {14,ch63st0},
+ {5,ch63st1}
+};
+
+static const Fl_Glut_StrokeChar ch63 = {73.9029f,2,ch63st};
+
+/* char: 0x40 */
+
+static const Fl_Glut_StrokeVertex ch64st0[] =
+{
+ {49.2171f,52.381f},
+ {39.6933f,57.1429f},
+ {30.1695f,57.1429f},
+ {25.4076f,47.619f},
+ {25.4076f,42.8571f},
+ {30.1695f,33.3333f},
+ {39.6933f,33.3333f},
+ {49.2171f,38.0952f}
+};
+
+static const Fl_Glut_StrokeVertex ch64st1[] =
+{
+ {49.2171f,57.1429f},
+ {49.2171f,38.0952f},
+ {53.979f,33.3333f},
+ {63.5029f,33.3333f},
+ {68.2648f,42.8571f},
+ {68.2648f,47.619f},
+ {63.5029f,61.9048f},
+ {53.979f,71.4286f},
+ {39.6933f,76.1905f},
+ {34.9314f,76.1905f},
+ {20.6457f,71.4286f},
+ {11.1219f,61.9048f},
+ {6.36f,47.619f},
+ {6.36f,42.8571f},
+ {11.1219f,28.5714f},
+ {20.6457f,19.0476f},
+ {34.9314f,14.2857f},
+ {39.6933f,14.2857f},
+ {53.979f,19.0476f}
+};
+
+static const Fl_Glut_StrokeStrip ch64st[] =
+{
+ {8,ch64st0},
+ {19,ch64st1}
+};
+
+static const Fl_Glut_StrokeChar ch64 = {74.3648f,2,ch64st};
+
+/* char: 0x41 */
+
+static const Fl_Glut_StrokeVertex ch65st0[] =
+{
+ {40.5952f,100.0f},
+ {2.5f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch65st1[] =
+{
+ {40.5952f,100.0f},
+ {78.6905f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch65st2[] =
+{
+ {16.7857f,33.3333f},
+ {64.4048f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch65st[] =
+{
+ {2,ch65st0},
+ {2,ch65st1},
+ {2,ch65st2}
+};
+
+static const Fl_Glut_StrokeChar ch65 = {80.4905f,3,ch65st};
+
+/* char: 0x42 */
+
+static const Fl_Glut_StrokeVertex ch66st0[] =
+{
+ {11.42f,100.0f},
+ {11.42f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch66st1[] =
+{
+ {11.42f,100.0f},
+ {54.2771f,100.0f},
+ {68.5629f,95.2381f},
+ {73.3248f,90.4762f},
+ {78.0867f,80.9524f},
+ {78.0867f,71.4286f},
+ {73.3248f,61.9048f},
+ {68.5629f,57.1429f},
+ {54.2771f,52.381f}
+};
+
+static const Fl_Glut_StrokeVertex ch66st2[] =
+{
+ {11.42f,52.381f},
+ {54.2771f,52.381f},
+ {68.5629f,47.619f},
+ {73.3248f,42.8571f},
+ {78.0867f,33.3333f},
+ {78.0867f,19.0476f},
+ {73.3248f,9.5238f},
+ {68.5629f,4.7619f},
+ {54.2771f,0.0f},
+ {11.42f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch66st[] =
+{
+ {2,ch66st0},
+ {9,ch66st1},
+ {10,ch66st2}
+};
+
+static const Fl_Glut_StrokeChar ch66 = {83.6267f,3,ch66st};
+
+/* char: 0x43 */
+
+static const Fl_Glut_StrokeVertex ch67st0[] =
+{
+ {78.0886f,76.1905f},
+ {73.3267f,85.7143f},
+ {63.8029f,95.2381f},
+ {54.279f,100.0f},
+ {35.2314f,100.0f},
+ {25.7076f,95.2381f},
+ {16.1838f,85.7143f},
+ {11.4219f,76.1905f},
+ {6.66f,61.9048f},
+ {6.66f,38.0952f},
+ {11.4219f,23.8095f},
+ {16.1838f,14.2857f},
+ {25.7076f,4.7619f},
+ {35.2314f,0.0f},
+ {54.279f,0.0f},
+ {63.8029f,4.7619f},
+ {73.3267f,14.2857f},
+ {78.0886f,23.8095f}
+};
+
+static const Fl_Glut_StrokeStrip ch67st[] =
+{
+ {18,ch67st0}
+};
+
+static const Fl_Glut_StrokeChar ch67 = {84.4886f,1,ch67st};
+
+/* char: 0x44 */
+
+static const Fl_Glut_StrokeVertex ch68st0[] =
+{
+ {11.96f,100.0f},
+ {11.96f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch68st1[] =
+{
+ {11.96f,100.0f},
+ {45.2933f,100.0f},
+ {59.579f,95.2381f},
+ {69.1029f,85.7143f},
+ {73.8648f,76.1905f},
+ {78.6267f,61.9048f},
+ {78.6267f,38.0952f},
+ {73.8648f,23.8095f},
+ {69.1029f,14.2857f},
+ {59.579f,4.7619f},
+ {45.2933f,0.0f},
+ {11.96f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch68st[] =
+{
+ {2,ch68st0},
+ {12,ch68st1}
+};
+
+static const Fl_Glut_StrokeChar ch68 = {85.2867f,2,ch68st};
+
+/* char: 0x45 */
+
+static const Fl_Glut_StrokeVertex ch69st0[] =
+{
+ {11.42f,100.0f},
+ {11.42f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch69st1[] =
+{
+ {11.42f,100.0f},
+ {73.3248f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch69st2[] =
+{
+ {11.42f,52.381f},
+ {49.5152f,52.381f}
+};
+
+static const Fl_Glut_StrokeVertex ch69st3[] =
+{
+ {11.42f,0.0f},
+ {73.3248f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch69st[] =
+{
+ {2,ch69st0},
+ {2,ch69st1},
+ {2,ch69st2},
+ {2,ch69st3}
+};
+
+static const Fl_Glut_StrokeChar ch69 = {78.1848f,4,ch69st};
+
+/* char: 0x46 */
+
+static const Fl_Glut_StrokeVertex ch70st0[] =
+{
+ {11.42f,100.0f},
+ {11.42f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch70st1[] =
+{
+ {11.42f,100.0f},
+ {73.3248f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch70st2[] =
+{
+ {11.42f,52.381f},
+ {49.5152f,52.381f}
+};
+
+static const Fl_Glut_StrokeStrip ch70st[] =
+{
+ {2,ch70st0},
+ {2,ch70st1},
+ {2,ch70st2}
+};
+
+static const Fl_Glut_StrokeChar ch70 = {78.7448f,3,ch70st};
+
+/* char: 0x47 */
+
+static const Fl_Glut_StrokeVertex ch71st0[] =
+{
+ {78.4886f,76.1905f},
+ {73.7267f,85.7143f},
+ {64.2029f,95.2381f},
+ {54.679f,100.0f},
+ {35.6314f,100.0f},
+ {26.1076f,95.2381f},
+ {16.5838f,85.7143f},
+ {11.8219f,76.1905f},
+ {7.06f,61.9048f},
+ {7.06f,38.0952f},
+ {11.8219f,23.8095f},
+ {16.5838f,14.2857f},
+ {26.1076f,4.7619f},
+ {35.6314f,0.0f},
+ {54.679f,0.0f},
+ {64.2029f,4.7619f},
+ {73.7267f,14.2857f},
+ {78.4886f,23.8095f},
+ {78.4886f,38.0952f}
+};
+
+static const Fl_Glut_StrokeVertex ch71st1[] =
+{
+ {54.679f,38.0952f},
+ {78.4886f,38.0952f}
+};
+
+static const Fl_Glut_StrokeStrip ch71st[] =
+{
+ {19,ch71st0},
+ {2,ch71st1}
+};
+
+static const Fl_Glut_StrokeChar ch71 = {89.7686f,2,ch71st};
+
+/* char: 0x48 */
+
+static const Fl_Glut_StrokeVertex ch72st0[] =
+{
+ {11.42f,100.0f},
+ {11.42f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch72st1[] =
+{
+ {78.0867f,100.0f},
+ {78.0867f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch72st2[] =
+{
+ {11.42f,52.381f},
+ {78.0867f,52.381f}
+};
+
+static const Fl_Glut_StrokeStrip ch72st[] =
+{
+ {2,ch72st0},
+ {2,ch72st1},
+ {2,ch72st2}
+};
+
+static const Fl_Glut_StrokeChar ch72 = {89.0867f,3,ch72st};
+
+/* char: 0x49 */
+
+static const Fl_Glut_StrokeVertex ch73st0[] =
+{
+ {10.86f,100.0f},
+ {10.86f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch73st[] =
+{
+ {2,ch73st0}
+};
+
+static const Fl_Glut_StrokeChar ch73 = {21.3f,1,ch73st};
+
+/* char: 0x4a */
+
+static const Fl_Glut_StrokeVertex ch74st0[] =
+{
+ {50.119f,100.0f},
+ {50.119f,23.8095f},
+ {45.3571f,9.5238f},
+ {40.5952f,4.7619f},
+ {31.0714f,0.0f},
+ {21.5476f,0.0f},
+ {12.0238f,4.7619f},
+ {7.2619f,9.5238f},
+ {2.5f,23.8095f},
+ {2.5f,33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch74st[] =
+{
+ {10,ch74st0}
+};
+
+static const Fl_Glut_StrokeChar ch74 = {59.999f,1,ch74st};
+
+/* char: 0x4b */
+
+static const Fl_Glut_StrokeVertex ch75st0[] =
+{
+ {11.28f,100.0f},
+ {11.28f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch75st1[] =
+{
+ {77.9467f,100.0f},
+ {11.28f,33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch75st2[] =
+{
+ {35.0895f,57.1429f},
+ {77.9467f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch75st[] =
+{
+ {2,ch75st0},
+ {2,ch75st1},
+ {2,ch75st2}
+};
+
+static const Fl_Glut_StrokeChar ch75 = {79.3267f,3,ch75st};
+
+/* char: 0x4c */
+
+static const Fl_Glut_StrokeVertex ch76st0[] =
+{
+ {11.68f,100.0f},
+ {11.68f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch76st1[] =
+{
+ {11.68f,0.0f},
+ {68.8229f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch76st[] =
+{
+ {2,ch76st0},
+ {2,ch76st1}
+};
+
+static const Fl_Glut_StrokeChar ch76 = {71.3229f,2,ch76st};
+
+/* char: 0x4d */
+
+static const Fl_Glut_StrokeVertex ch77st0[] =
+{
+ {10.86f,100.0f},
+ {10.86f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch77st1[] =
+{
+ {10.86f,100.0f},
+ {48.9552f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch77st2[] =
+{
+ {87.0505f,100.0f},
+ {48.9552f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch77st3[] =
+{
+ {87.0505f,100.0f},
+ {87.0505f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch77st[] =
+{
+ {2,ch77st0},
+ {2,ch77st1},
+ {2,ch77st2},
+ {2,ch77st3}
+};
+
+static const Fl_Glut_StrokeChar ch77 = {97.2105f,4,ch77st};
+
+/* char: 0x4e */
+
+static const Fl_Glut_StrokeVertex ch78st0[] =
+{
+ {11.14f,100.0f},
+ {11.14f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch78st1[] =
+{
+ {11.14f,100.0f},
+ {77.8067f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch78st2[] =
+{
+ {77.8067f,100.0f},
+ {77.8067f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch78st[] =
+{
+ {2,ch78st0},
+ {2,ch78st1},
+ {2,ch78st2}
+};
+
+static const Fl_Glut_StrokeChar ch78 = {88.8067f,3,ch78st};
+
+/* char: 0x4f */
+
+static const Fl_Glut_StrokeVertex ch79st0[] =
+{
+ {34.8114f,100.0f},
+ {25.2876f,95.2381f},
+ {15.7638f,85.7143f},
+ {11.0019f,76.1905f},
+ {6.24f,61.9048f},
+ {6.24f,38.0952f},
+ {11.0019f,23.8095f},
+ {15.7638f,14.2857f},
+ {25.2876f,4.7619f},
+ {34.8114f,0.0f},
+ {53.859f,0.0f},
+ {63.3829f,4.7619f},
+ {72.9067f,14.2857f},
+ {77.6686f,23.8095f},
+ {82.4305f,38.0952f},
+ {82.4305f,61.9048f},
+ {77.6686f,76.1905f},
+ {72.9067f,85.7143f},
+ {63.3829f,95.2381f},
+ {53.859f,100.0f},
+ {34.8114f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch79st[] =
+{
+ {21,ch79st0}
+};
+
+static const Fl_Glut_StrokeChar ch79 = {88.8305f,1,ch79st};
+
+/* char: 0x50 */
+
+static const Fl_Glut_StrokeVertex ch80st0[] =
+{
+ {12.1f,100.0f},
+ {12.1f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch80st1[] =
+{
+ {12.1f,100.0f},
+ {54.9571f,100.0f},
+ {69.2429f,95.2381f},
+ {74.0048f,90.4762f},
+ {78.7667f,80.9524f},
+ {78.7667f,66.6667f},
+ {74.0048f,57.1429f},
+ {69.2429f,52.381f},
+ {54.9571f,47.619f},
+ {12.1f,47.619f}
+};
+
+static const Fl_Glut_StrokeStrip ch80st[] =
+{
+ {2,ch80st0},
+ {10,ch80st1}
+};
+
+static const Fl_Glut_StrokeChar ch80 = {85.6667f,2,ch80st};
+
+/* char: 0x51 */
+
+static const Fl_Glut_StrokeVertex ch81st0[] =
+{
+ {33.8714f,100.0f},
+ {24.3476f,95.2381f},
+ {14.8238f,85.7143f},
+ {10.0619f,76.1905f},
+ {5.3f,61.9048f},
+ {5.3f,38.0952f},
+ {10.0619f,23.8095f},
+ {14.8238f,14.2857f},
+ {24.3476f,4.7619f},
+ {33.8714f,0.0f},
+ {52.919f,0.0f},
+ {62.4429f,4.7619f},
+ {71.9667f,14.2857f},
+ {76.7286f,23.8095f},
+ {81.4905f,38.0952f},
+ {81.4905f,61.9048f},
+ {76.7286f,76.1905f},
+ {71.9667f,85.7143f},
+ {62.4429f,95.2381f},
+ {52.919f,100.0f},
+ {33.8714f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch81st1[] =
+{
+ {48.1571f,19.0476f},
+ {76.7286f,-9.5238f}
+};
+
+static const Fl_Glut_StrokeStrip ch81st[] =
+{
+ {21,ch81st0},
+ {2,ch81st1}
+};
+
+static const Fl_Glut_StrokeChar ch81 = {88.0905f,2,ch81st};
+
+/* char: 0x52 */
+
+static const Fl_Glut_StrokeVertex ch82st0[] =
+{
+ {11.68f,100.0f},
+ {11.68f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch82st1[] =
+{
+ {11.68f,100.0f},
+ {54.5371f,100.0f},
+ {68.8229f,95.2381f},
+ {73.5848f,90.4762f},
+ {78.3467f,80.9524f},
+ {78.3467f,71.4286f},
+ {73.5848f,61.9048f},
+ {68.8229f,57.1429f},
+ {54.5371f,52.381f},
+ {11.68f,52.381f}
+};
+
+static const Fl_Glut_StrokeVertex ch82st2[] =
+{
+ {45.0133f,52.381f},
+ {78.3467f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch82st[] =
+{
+ {2,ch82st0},
+ {10,ch82st1},
+ {2,ch82st2}
+};
+
+static const Fl_Glut_StrokeChar ch82 = {82.3667f,3,ch82st};
+
+/* char: 0x53 */
+
+static const Fl_Glut_StrokeVertex ch83st0[] =
+{
+ {74.6667f,85.7143f},
+ {65.1429f,95.2381f},
+ {50.8571f,100.0f},
+ {31.8095f,100.0f},
+ {17.5238f,95.2381f},
+ {8.0f,85.7143f},
+ {8.0f,76.1905f},
+ {12.7619f,66.6667f},
+ {17.5238f,61.9048f},
+ {27.0476f,57.1429f},
+ {55.619f,47.619f},
+ {65.1429f,42.8571f},
+ {69.9048f,38.0952f},
+ {74.6667f,28.5714f},
+ {74.6667f,14.2857f},
+ {65.1429f,4.7619f},
+ {50.8571f,0.0f},
+ {31.8095f,0.0f},
+ {17.5238f,4.7619f},
+ {8.0f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch83st[] =
+{
+ {20,ch83st0}
+};
+
+static const Fl_Glut_StrokeChar ch83 = {80.8267f,1,ch83st};
+
+/* char: 0x54 */
+
+static const Fl_Glut_StrokeVertex ch84st0[] =
+{
+ {35.6933f,100.0f},
+ {35.6933f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch84st1[] =
+{
+ {2.36f,100.0f},
+ {69.0267f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch84st[] =
+{
+ {2,ch84st0},
+ {2,ch84st1}
+};
+
+static const Fl_Glut_StrokeChar ch84 = {71.9467f,2,ch84st};
+
+/* char: 0x55 */
+
+static const Fl_Glut_StrokeVertex ch85st0[] =
+{
+ {11.54f,100.0f},
+ {11.54f,28.5714f},
+ {16.3019f,14.2857f},
+ {25.8257f,4.7619f},
+ {40.1114f,0.0f},
+ {49.6352f,0.0f},
+ {63.921f,4.7619f},
+ {73.4448f,14.2857f},
+ {78.2067f,28.5714f},
+ {78.2067f,100.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch85st[] =
+{
+ {10,ch85st0}
+};
+
+static const Fl_Glut_StrokeChar ch85 = {89.4867f,1,ch85st};
+
+/* char: 0x56 */
+
+static const Fl_Glut_StrokeVertex ch86st0[] =
+{
+ {2.36f,100.0f},
+ {40.4552f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch86st1[] =
+{
+ {78.5505f,100.0f},
+ {40.4552f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch86st[] =
+{
+ {2,ch86st0},
+ {2,ch86st1}
+};
+
+static const Fl_Glut_StrokeChar ch86 = {81.6105f,2,ch86st};
+
+/* char: 0x57 */
+
+static const Fl_Glut_StrokeVertex ch87st0[] =
+{
+ {2.22f,100.0f},
+ {26.0295f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch87st1[] =
+{
+ {49.839f,100.0f},
+ {26.0295f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch87st2[] =
+{
+ {49.839f,100.0f},
+ {73.6486f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch87st3[] =
+{
+ {97.4581f,100.0f},
+ {73.6486f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch87st[] =
+{
+ {2,ch87st0},
+ {2,ch87st1},
+ {2,ch87st2},
+ {2,ch87st3}
+};
+
+static const Fl_Glut_StrokeChar ch87 = {100.518f,4,ch87st};
+
+/* char: 0x58 */
+
+static const Fl_Glut_StrokeVertex ch88st0[] =
+{
+ {2.5f,100.0f},
+ {69.1667f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch88st1[] =
+{
+ {69.1667f,100.0f},
+ {2.5f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch88st[] =
+{
+ {2,ch88st0},
+ {2,ch88st1}
+};
+
+static const Fl_Glut_StrokeChar ch88 = {72.3667f,2,ch88st};
+
+/* char: 0x59 */
+
+static const Fl_Glut_StrokeVertex ch89st0[] =
+{
+ {1.52f,100.0f},
+ {39.6152f,52.381f},
+ {39.6152f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch89st1[] =
+{
+ {77.7105f,100.0f},
+ {39.6152f,52.381f}
+};
+
+static const Fl_Glut_StrokeStrip ch89st[] =
+{
+ {3,ch89st0},
+ {2,ch89st1}
+};
+
+static const Fl_Glut_StrokeChar ch89 = {79.6505f,2,ch89st};
+
+/* char: 0x5a */
+
+static const Fl_Glut_StrokeVertex ch90st0[] =
+{
+ {69.1667f,100.0f},
+ {2.5f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch90st1[] =
+{
+ {2.5f,100.0f},
+ {69.1667f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch90st2[] =
+{
+ {2.5f,0.0f},
+ {69.1667f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch90st[] =
+{
+ {2,ch90st0},
+ {2,ch90st1},
+ {2,ch90st2}
+};
+
+static const Fl_Glut_StrokeChar ch90 = {73.7467f,3,ch90st};
+
+/* char: 0x5b */
+
+static const Fl_Glut_StrokeVertex ch91st0[] =
+{
+ {7.78f,119.048f},
+ {7.78f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch91st1[] =
+{
+ {12.5419f,119.048f},
+ {12.5419f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch91st2[] =
+{
+ {7.78f,119.048f},
+ {41.1133f,119.048f}
+};
+
+static const Fl_Glut_StrokeVertex ch91st3[] =
+{
+ {7.78f,-33.3333f},
+ {41.1133f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch91st[] =
+{
+ {2,ch91st0},
+ {2,ch91st1},
+ {2,ch91st2},
+ {2,ch91st3}
+};
+
+static const Fl_Glut_StrokeChar ch91 = {46.1133f,4,ch91st};
+
+/* char: 0x5c */
+
+static const Fl_Glut_StrokeVertex ch92st0[] =
+{
+ {5.84f,100.0f},
+ {72.5067f,-14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch92st[] =
+{
+ {2,ch92st0}
+};
+
+static const Fl_Glut_StrokeChar ch92 = {78.2067f,1,ch92st};
+
+/* char: 0x5d */
+
+static const Fl_Glut_StrokeVertex ch93st0[] =
+{
+ {33.0114f,119.048f},
+ {33.0114f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch93st1[] =
+{
+ {37.7733f,119.048f},
+ {37.7733f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch93st2[] =
+{
+ {4.44f,119.048f},
+ {37.7733f,119.048f}
+};
+
+static const Fl_Glut_StrokeVertex ch93st3[] =
+{
+ {4.44f,-33.3333f},
+ {37.7733f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch93st[] =
+{
+ {2,ch93st0},
+ {2,ch93st1},
+ {2,ch93st2},
+ {2,ch93st3}
+};
+
+static const Fl_Glut_StrokeChar ch93 = {46.3933f,4,ch93st};
+
+/* char: 0x5e */
+
+static const Fl_Glut_StrokeVertex ch94st0[] =
+{
+ {44.0752f,109.524f},
+ {5.98f,42.8571f}
+};
+
+static const Fl_Glut_StrokeVertex ch94st1[] =
+{
+ {44.0752f,109.524f},
+ {82.1705f,42.8571f}
+};
+
+static const Fl_Glut_StrokeStrip ch94st[] =
+{
+ {2,ch94st0},
+ {2,ch94st1}
+};
+
+static const Fl_Glut_StrokeChar ch94 = {90.2305f,2,ch94st};
+
+/* char: 0x5f */
+
+static const Fl_Glut_StrokeVertex ch95st0[] =
+{
+ {-1.1f,-33.3333f},
+ {103.662f,-33.3333f},
+ {103.662f,-28.5714f},
+ {-1.1f,-28.5714f},
+ {-1.1f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch95st[] =
+{
+ {5,ch95st0}
+};
+
+static const Fl_Glut_StrokeChar ch95 = {104.062f,1,ch95st};
+
+/* char: 0x60 */
+
+static const Fl_Glut_StrokeVertex ch96st0[] =
+{
+ {33.0219f,100.0f},
+ {56.8314f,71.4286f}
+};
+
+static const Fl_Glut_StrokeVertex ch96st1[] =
+{
+ {33.0219f,100.0f},
+ {28.26f,95.2381f},
+ {56.8314f,71.4286f}
+};
+
+static const Fl_Glut_StrokeStrip ch96st[] =
+{
+ {2,ch96st0},
+ {3,ch96st1}
+};
+
+static const Fl_Glut_StrokeChar ch96 = {83.5714f,2,ch96st};
+
+/* char: 0x61 */
+
+static const Fl_Glut_StrokeVertex ch97st0[] =
+{
+ {63.8229f,66.6667f},
+ {63.8229f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch97st1[] =
+{
+ {63.8229f,52.381f},
+ {54.299f,61.9048f},
+ {44.7752f,66.6667f},
+ {30.4895f,66.6667f},
+ {20.9657f,61.9048f},
+ {11.4419f,52.381f},
+ {6.68f,38.0952f},
+ {6.68f,28.5714f},
+ {11.4419f,14.2857f},
+ {20.9657f,4.7619f},
+ {30.4895f,0.0f},
+ {44.7752f,0.0f},
+ {54.299f,4.7619f},
+ {63.8229f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch97st[] =
+{
+ {2,ch97st0},
+ {14,ch97st1}
+};
+
+static const Fl_Glut_StrokeChar ch97 = {66.6029f,2,ch97st};
+
+/* char: 0x62 */
+
+static const Fl_Glut_StrokeVertex ch98st0[] =
+{
+ {8.76f,100.0f},
+ {8.76f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch98st1[] =
+{
+ {8.76f,52.381f},
+ {18.2838f,61.9048f},
+ {27.8076f,66.6667f},
+ {42.0933f,66.6667f},
+ {51.6171f,61.9048f},
+ {61.141f,52.381f},
+ {65.9029f,38.0952f},
+ {65.9029f,28.5714f},
+ {61.141f,14.2857f},
+ {51.6171f,4.7619f},
+ {42.0933f,0.0f},
+ {27.8076f,0.0f},
+ {18.2838f,4.7619f},
+ {8.76f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch98st[] =
+{
+ {2,ch98st0},
+ {14,ch98st1}
+};
+
+static const Fl_Glut_StrokeChar ch98 = {70.4629f,2,ch98st};
+
+/* char: 0x63 */
+
+static const Fl_Glut_StrokeVertex ch99st0[] =
+{
+ {62.6629f,52.381f},
+ {53.139f,61.9048f},
+ {43.6152f,66.6667f},
+ {29.3295f,66.6667f},
+ {19.8057f,61.9048f},
+ {10.2819f,52.381f},
+ {5.52f,38.0952f},
+ {5.52f,28.5714f},
+ {10.2819f,14.2857f},
+ {19.8057f,4.7619f},
+ {29.3295f,0.0f},
+ {43.6152f,0.0f},
+ {53.139f,4.7619f},
+ {62.6629f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch99st[] =
+{
+ {14,ch99st0}
+};
+
+static const Fl_Glut_StrokeChar ch99 = {68.9229f,1,ch99st};
+
+/* char: 0x64 */
+
+static const Fl_Glut_StrokeVertex ch100st0[] =
+{
+ {61.7829f,100.0f},
+ {61.7829f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch100st1[] =
+{
+ {61.7829f,52.381f},
+ {52.259f,61.9048f},
+ {42.7352f,66.6667f},
+ {28.4495f,66.6667f},
+ {18.9257f,61.9048f},
+ {9.4019f,52.381f},
+ {4.64f,38.0952f},
+ {4.64f,28.5714f},
+ {9.4019f,14.2857f},
+ {18.9257f,4.7619f},
+ {28.4495f,0.0f},
+ {42.7352f,0.0f},
+ {52.259f,4.7619f},
+ {61.7829f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch100st[] =
+{
+ {2,ch100st0},
+ {14,ch100st1}
+};
+
+static const Fl_Glut_StrokeChar ch100 = {70.2629f,2,ch100st};
+
+/* char: 0x65 */
+
+static const Fl_Glut_StrokeVertex ch101st0[] =
+{
+ {5.72f,38.0952f},
+ {62.8629f,38.0952f},
+ {62.8629f,47.619f},
+ {58.101f,57.1429f},
+ {53.339f,61.9048f},
+ {43.8152f,66.6667f},
+ {29.5295f,66.6667f},
+ {20.0057f,61.9048f},
+ {10.4819f,52.381f},
+ {5.72f,38.0952f},
+ {5.72f,28.5714f},
+ {10.4819f,14.2857f},
+ {20.0057f,4.7619f},
+ {29.5295f,0.0f},
+ {43.8152f,0.0f},
+ {53.339f,4.7619f},
+ {62.8629f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch101st[] =
+{
+ {17,ch101st0}
+};
+
+static const Fl_Glut_StrokeChar ch101 = {68.5229f,1,ch101st};
+
+/* char: 0x66 */
+
+static const Fl_Glut_StrokeVertex ch102st0[] =
+{
+ {38.7752f,100.0f},
+ {29.2514f,100.0f},
+ {19.7276f,95.2381f},
+ {14.9657f,80.9524f},
+ {14.9657f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch102st1[] =
+{
+ {0.68f,66.6667f},
+ {34.0133f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch102st[] =
+{
+ {5,ch102st0},
+ {2,ch102st1}
+};
+
+static const Fl_Glut_StrokeChar ch102 = {38.6552f,2,ch102st};
+
+/* char: 0x67 */
+
+static const Fl_Glut_StrokeVertex ch103st0[] =
+{
+ {62.5029f,66.6667f},
+ {62.5029f,-9.5238f},
+ {57.741f,-23.8095f},
+ {52.979f,-28.5714f},
+ {43.4552f,-33.3333f},
+ {29.1695f,-33.3333f},
+ {19.6457f,-28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch103st1[] =
+{
+ {62.5029f,52.381f},
+ {52.979f,61.9048f},
+ {43.4552f,66.6667f},
+ {29.1695f,66.6667f},
+ {19.6457f,61.9048f},
+ {10.1219f,52.381f},
+ {5.36f,38.0952f},
+ {5.36f,28.5714f},
+ {10.1219f,14.2857f},
+ {19.6457f,4.7619f},
+ {29.1695f,0.0f},
+ {43.4552f,0.0f},
+ {52.979f,4.7619f},
+ {62.5029f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch103st[] =
+{
+ {7,ch103st0},
+ {14,ch103st1}
+};
+
+static const Fl_Glut_StrokeChar ch103 = {70.9829f,2,ch103st};
+
+/* char: 0x68 */
+
+static const Fl_Glut_StrokeVertex ch104st0[] =
+{
+ {9.6f,100.0f},
+ {9.6f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch104st1[] =
+{
+ {9.6f,47.619f},
+ {23.8857f,61.9048f},
+ {33.4095f,66.6667f},
+ {47.6952f,66.6667f},
+ {57.219f,61.9048f},
+ {61.981f,47.619f},
+ {61.981f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch104st[] =
+{
+ {2,ch104st0},
+ {7,ch104st1}
+};
+
+static const Fl_Glut_StrokeChar ch104 = {71.021f,2,ch104st};
+
+/* char: 0x69 */
+
+static const Fl_Glut_StrokeVertex ch105st0[] =
+{
+ {10.02f,100.0f},
+ {14.7819f,95.2381f},
+ {19.5438f,100.0f},
+ {14.7819f,104.762f},
+ {10.02f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch105st1[] =
+{
+ {14.7819f,66.6667f},
+ {14.7819f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch105st[] =
+{
+ {5,ch105st0},
+ {2,ch105st1}
+};
+
+static const Fl_Glut_StrokeChar ch105 = {28.8638f,2,ch105st};
+
+/* char: 0x6a */
+
+static const Fl_Glut_StrokeVertex ch106st0[] =
+{
+ {17.3876f,100.0f},
+ {22.1495f,95.2381f},
+ {26.9114f,100.0f},
+ {22.1495f,104.762f},
+ {17.3876f,100.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch106st1[] =
+{
+ {22.1495f,66.6667f},
+ {22.1495f,-14.2857f},
+ {17.3876f,-28.5714f},
+ {7.8638f,-33.3333f},
+ {-1.66f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch106st[] =
+{
+ {5,ch106st0},
+ {5,ch106st1}
+};
+
+static const Fl_Glut_StrokeChar ch106 = {36.2314f,2,ch106st};
+
+/* char: 0x6b */
+
+static const Fl_Glut_StrokeVertex ch107st0[] =
+{
+ {9.6f,100.0f},
+ {9.6f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch107st1[] =
+{
+ {57.219f,66.6667f},
+ {9.6f,19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch107st2[] =
+{
+ {28.6476f,38.0952f},
+ {61.981f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch107st[] =
+{
+ {2,ch107st0},
+ {2,ch107st1},
+ {2,ch107st2}
+};
+
+static const Fl_Glut_StrokeChar ch107 = {62.521f,3,ch107st};
+
+/* char: 0x6c */
+
+static const Fl_Glut_StrokeVertex ch108st0[] =
+{
+ {10.02f,100.0f},
+ {10.02f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch108st[] =
+{
+ {2,ch108st0}
+};
+
+static const Fl_Glut_StrokeChar ch108 = {19.34f,1,ch108st};
+
+/* char: 0x6d */
+
+static const Fl_Glut_StrokeVertex ch109st0[] =
+{
+ {9.6f,66.6667f},
+ {9.6f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch109st1[] =
+{
+ {9.6f,47.619f},
+ {23.8857f,61.9048f},
+ {33.4095f,66.6667f},
+ {47.6952f,66.6667f},
+ {57.219f,61.9048f},
+ {61.981f,47.619f},
+ {61.981f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch109st2[] =
+{
+ {61.981f,47.619f},
+ {76.2667f,61.9048f},
+ {85.7905f,66.6667f},
+ {100.076f,66.6667f},
+ {109.6f,61.9048f},
+ {114.362f,47.619f},
+ {114.362f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch109st[] =
+{
+ {2,ch109st0},
+ {7,ch109st1},
+ {7,ch109st2}
+};
+
+static const Fl_Glut_StrokeChar ch109 = {123.962f,3,ch109st};
+
+/* char: 0x6e */
+
+static const Fl_Glut_StrokeVertex ch110st0[] =
+{
+ {9.18f,66.6667f},
+ {9.18f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch110st1[] =
+{
+ {9.18f,47.619f},
+ {23.4657f,61.9048f},
+ {32.9895f,66.6667f},
+ {47.2752f,66.6667f},
+ {56.799f,61.9048f},
+ {61.561f,47.619f},
+ {61.561f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch110st[] =
+{
+ {2,ch110st0},
+ {7,ch110st1}
+};
+
+static const Fl_Glut_StrokeChar ch110 = {70.881f,2,ch110st};
+
+/* char: 0x6f */
+
+static const Fl_Glut_StrokeVertex ch111st0[] =
+{
+ {28.7895f,66.6667f},
+ {19.2657f,61.9048f},
+ {9.7419f,52.381f},
+ {4.98f,38.0952f},
+ {4.98f,28.5714f},
+ {9.7419f,14.2857f},
+ {19.2657f,4.7619f},
+ {28.7895f,0.0f},
+ {43.0752f,0.0f},
+ {52.599f,4.7619f},
+ {62.1229f,14.2857f},
+ {66.8848f,28.5714f},
+ {66.8848f,38.0952f},
+ {62.1229f,52.381f},
+ {52.599f,61.9048f},
+ {43.0752f,66.6667f},
+ {28.7895f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch111st[] =
+{
+ {17,ch111st0}
+};
+
+static const Fl_Glut_StrokeChar ch111 = {71.7448f,1,ch111st};
+
+/* char: 0x70 */
+
+static const Fl_Glut_StrokeVertex ch112st0[] =
+{
+ {9.46f,66.6667f},
+ {9.46f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch112st1[] =
+{
+ {9.46f,52.381f},
+ {18.9838f,61.9048f},
+ {28.5076f,66.6667f},
+ {42.7933f,66.6667f},
+ {52.3171f,61.9048f},
+ {61.841f,52.381f},
+ {66.6029f,38.0952f},
+ {66.6029f,28.5714f},
+ {61.841f,14.2857f},
+ {52.3171f,4.7619f},
+ {42.7933f,0.0f},
+ {28.5076f,0.0f},
+ {18.9838f,4.7619f},
+ {9.46f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch112st[] =
+{
+ {2,ch112st0},
+ {14,ch112st1}
+};
+
+static const Fl_Glut_StrokeChar ch112 = {70.8029f,2,ch112st};
+
+/* char: 0x71 */
+
+static const Fl_Glut_StrokeVertex ch113st0[] =
+{
+ {61.9829f,66.6667f},
+ {61.9829f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch113st1[] =
+{
+ {61.9829f,52.381f},
+ {52.459f,61.9048f},
+ {42.9352f,66.6667f},
+ {28.6495f,66.6667f},
+ {19.1257f,61.9048f},
+ {9.6019f,52.381f},
+ {4.84f,38.0952f},
+ {4.84f,28.5714f},
+ {9.6019f,14.2857f},
+ {19.1257f,4.7619f},
+ {28.6495f,0.0f},
+ {42.9352f,0.0f},
+ {52.459f,4.7619f},
+ {61.9829f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch113st[] =
+{
+ {2,ch113st0},
+ {14,ch113st1}
+};
+
+static const Fl_Glut_StrokeChar ch113 = {70.7429f,2,ch113st};
+
+/* char: 0x72 */
+
+static const Fl_Glut_StrokeVertex ch114st0[] =
+{
+ {9.46f,66.6667f},
+ {9.46f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch114st1[] =
+{
+ {9.46f,38.0952f},
+ {14.2219f,52.381f},
+ {23.7457f,61.9048f},
+ {33.2695f,66.6667f},
+ {47.5552f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch114st[] =
+{
+ {2,ch114st0},
+ {5,ch114st1}
+};
+
+static const Fl_Glut_StrokeChar ch114 = {49.4952f,2,ch114st};
+
+/* char: 0x73 */
+
+static const Fl_Glut_StrokeVertex ch115st0[] =
+{
+ {57.081f,52.381f},
+ {52.319f,61.9048f},
+ {38.0333f,66.6667f},
+ {23.7476f,66.6667f},
+ {9.4619f,61.9048f},
+ {4.7f,52.381f},
+ {9.4619f,42.8571f},
+ {18.9857f,38.0952f},
+ {42.7952f,33.3333f},
+ {52.319f,28.5714f},
+ {57.081f,19.0476f},
+ {57.081f,14.2857f},
+ {52.319f,4.7619f},
+ {38.0333f,0.0f},
+ {23.7476f,0.0f},
+ {9.4619f,4.7619f},
+ {4.7f,14.2857f}
+};
+
+static const Fl_Glut_StrokeStrip ch115st[] =
+{
+ {17,ch115st0}
+};
+
+static const Fl_Glut_StrokeChar ch115 = {62.321f,1,ch115st};
+
+/* char: 0x74 */
+
+static const Fl_Glut_StrokeVertex ch116st0[] =
+{
+ {14.8257f,100.0f},
+ {14.8257f,19.0476f},
+ {19.5876f,4.7619f},
+ {29.1114f,0.0f},
+ {38.6352f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch116st1[] =
+{
+ {0.54f,66.6667f},
+ {33.8733f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch116st[] =
+{
+ {5,ch116st0},
+ {2,ch116st1}
+};
+
+static const Fl_Glut_StrokeChar ch116 = {39.3152f,2,ch116st};
+
+/* char: 0x75 */
+
+static const Fl_Glut_StrokeVertex ch117st0[] =
+{
+ {9.46f,66.6667f},
+ {9.46f,19.0476f},
+ {14.2219f,4.7619f},
+ {23.7457f,0.0f},
+ {38.0314f,0.0f},
+ {47.5552f,4.7619f},
+ {61.841f,19.0476f}
+};
+
+static const Fl_Glut_StrokeVertex ch117st1[] =
+{
+ {61.841f,66.6667f},
+ {61.841f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch117st[] =
+{
+ {7,ch117st0},
+ {2,ch117st1}
+};
+
+static const Fl_Glut_StrokeChar ch117 = {71.161f,2,ch117st};
+
+/* char: 0x76 */
+
+static const Fl_Glut_StrokeVertex ch118st0[] =
+{
+ {1.8f,66.6667f},
+ {30.3714f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch118st1[] =
+{
+ {58.9429f,66.6667f},
+ {30.3714f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch118st[] =
+{
+ {2,ch118st0},
+ {2,ch118st1}
+};
+
+static const Fl_Glut_StrokeChar ch118 = {60.6029f,2,ch118st};
+
+/* char: 0x77 */
+
+static const Fl_Glut_StrokeVertex ch119st0[] =
+{
+ {2.5f,66.6667f},
+ {21.5476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch119st1[] =
+{
+ {40.5952f,66.6667f},
+ {21.5476f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch119st2[] =
+{
+ {40.5952f,66.6667f},
+ {59.6429f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch119st3[] =
+{
+ {78.6905f,66.6667f},
+ {59.6429f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch119st[] =
+{
+ {2,ch119st0},
+ {2,ch119st1},
+ {2,ch119st2},
+ {2,ch119st3}
+};
+
+static const Fl_Glut_StrokeChar ch119 = {80.4905f,4,ch119st};
+
+/* char: 0x78 */
+
+static const Fl_Glut_StrokeVertex ch120st0[] =
+{
+ {1.66f,66.6667f},
+ {54.041f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch120st1[] =
+{
+ {54.041f,66.6667f},
+ {1.66f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch120st[] =
+{
+ {2,ch120st0},
+ {2,ch120st1}
+};
+
+static const Fl_Glut_StrokeChar ch120 = {56.401f,2,ch120st};
+
+/* char: 0x79 */
+
+static const Fl_Glut_StrokeVertex ch121st0[] =
+{
+ {6.5619f,66.6667f},
+ {35.1333f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch121st1[] =
+{
+ {63.7048f,66.6667f},
+ {35.1333f,0.0f},
+ {25.6095f,-19.0476f},
+ {16.0857f,-28.5714f},
+ {6.5619f,-33.3333f},
+ {1.8f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch121st[] =
+{
+ {2,ch121st0},
+ {6,ch121st1}
+};
+
+static const Fl_Glut_StrokeChar ch121 = {66.0648f,2,ch121st};
+
+/* char: 0x7a */
+
+static const Fl_Glut_StrokeVertex ch122st0[] =
+{
+ {56.821f,66.6667f},
+ {4.44f,0.0f}
+};
+
+static const Fl_Glut_StrokeVertex ch122st1[] =
+{
+ {4.44f,66.6667f},
+ {56.821f,66.6667f}
+};
+
+static const Fl_Glut_StrokeVertex ch122st2[] =
+{
+ {4.44f,0.0f},
+ {56.821f,0.0f}
+};
+
+static const Fl_Glut_StrokeStrip ch122st[] =
+{
+ {2,ch122st0},
+ {2,ch122st1},
+ {2,ch122st2}
+};
+
+static const Fl_Glut_StrokeChar ch122 = {61.821f,3,ch122st};
+
+/* char: 0x7b */
+
+static const Fl_Glut_StrokeVertex ch123st0[] =
+{
+ {31.1895f,119.048f},
+ {21.6657f,114.286f},
+ {16.9038f,109.524f},
+ {12.1419f,100.0f},
+ {12.1419f,90.4762f},
+ {16.9038f,80.9524f},
+ {21.6657f,76.1905f},
+ {26.4276f,66.6667f},
+ {26.4276f,57.1429f},
+ {16.9038f,47.619f}
+};
+
+static const Fl_Glut_StrokeVertex ch123st1[] =
+{
+ {21.6657f,114.286f},
+ {16.9038f,104.762f},
+ {16.9038f,95.2381f},
+ {21.6657f,85.7143f},
+ {26.4276f,80.9524f},
+ {31.1895f,71.4286f},
+ {31.1895f,61.9048f},
+ {26.4276f,52.381f},
+ {7.38f,42.8571f},
+ {26.4276f,33.3333f},
+ {31.1895f,23.8095f},
+ {31.1895f,14.2857f},
+ {26.4276f,4.7619f},
+ {21.6657f,0.0f},
+ {16.9038f,-9.5238f},
+ {16.9038f,-19.0476f},
+ {21.6657f,-28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch123st2[] =
+{
+ {16.9038f,38.0952f},
+ {26.4276f,28.5714f},
+ {26.4276f,19.0476f},
+ {21.6657f,9.5238f},
+ {16.9038f,4.7619f},
+ {12.1419f,-4.7619f},
+ {12.1419f,-14.2857f},
+ {16.9038f,-23.8095f},
+ {21.6657f,-28.5714f},
+ {31.1895f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch123st[] =
+{
+ {10,ch123st0},
+ {17,ch123st1},
+ {10,ch123st2}
+};
+
+static const Fl_Glut_StrokeChar ch123 = {41.6295f,3,ch123st};
+
+/* char: 0x7c */
+
+static const Fl_Glut_StrokeVertex ch124st0[] =
+{
+ {11.54f,119.048f},
+ {11.54f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch124st[] =
+{
+ {2,ch124st0}
+};
+
+static const Fl_Glut_StrokeChar ch124 = {23.78f,1,ch124st};
+
+/* char: 0x7d */
+
+static const Fl_Glut_StrokeVertex ch125st0[] =
+{
+ {9.18f,119.048f},
+ {18.7038f,114.286f},
+ {23.4657f,109.524f},
+ {28.2276f,100.0f},
+ {28.2276f,90.4762f},
+ {23.4657f,80.9524f},
+ {18.7038f,76.1905f},
+ {13.9419f,66.6667f},
+ {13.9419f,57.1429f},
+ {23.4657f,47.619f}
+};
+
+static const Fl_Glut_StrokeVertex ch125st1[] =
+{
+ {18.7038f,114.286f},
+ {23.4657f,104.762f},
+ {23.4657f,95.2381f},
+ {18.7038f,85.7143f},
+ {13.9419f,80.9524f},
+ {9.18f,71.4286f},
+ {9.18f,61.9048f},
+ {13.9419f,52.381f},
+ {32.9895f,42.8571f},
+ {13.9419f,33.3333f},
+ {9.18f,23.8095f},
+ {9.18f,14.2857f},
+ {13.9419f,4.7619f},
+ {18.7038f,0.0f},
+ {23.4657f,-9.5238f},
+ {23.4657f,-19.0476f},
+ {18.7038f,-28.5714f}
+};
+
+static const Fl_Glut_StrokeVertex ch125st2[] =
+{
+ {23.4657f,38.0952f},
+ {13.9419f,28.5714f},
+ {13.9419f,19.0476f},
+ {18.7038f,9.5238f},
+ {23.4657f,4.7619f},
+ {28.2276f,-4.7619f},
+ {28.2276f,-14.2857f},
+ {23.4657f,-23.8095f},
+ {18.7038f,-28.5714f},
+ {9.18f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeStrip ch125st[] =
+{
+ {10,ch125st0},
+ {17,ch125st1},
+ {10,ch125st2}
+};
+
+static const Fl_Glut_StrokeChar ch125 = {41.4695f,3,ch125st};
+
+/* char: 0x7e */
+
+static const Fl_Glut_StrokeVertex ch126st0[] =
+{
+ {2.92f,28.5714f},
+ {2.92f,38.0952f},
+ {7.6819f,52.381f},
+ {17.2057f,57.1429f},
+ {26.7295f,57.1429f},
+ {36.2533f,52.381f},
+ {55.301f,38.0952f},
+ {64.8248f,33.3333f},
+ {74.3486f,33.3333f},
+ {83.8724f,38.0952f},
+ {88.6343f,47.619f}
+};
+
+static const Fl_Glut_StrokeVertex ch126st1[] =
+{
+ {2.92f,38.0952f},
+ {7.6819f,47.619f},
+ {17.2057f,52.381f},
+ {26.7295f,52.381f},
+ {36.2533f,47.619f},
+ {55.301f,33.3333f},
+ {64.8248f,28.5714f},
+ {74.3486f,28.5714f},
+ {83.8724f,33.3333f},
+ {88.6343f,47.619f},
+ {88.6343f,57.1429f}
+};
+
+static const Fl_Glut_StrokeStrip ch126st[] =
+{
+ {11,ch126st0},
+ {11,ch126st1}
+};
+
+static const Fl_Glut_StrokeChar ch126 = {91.2743f,2,ch126st};
+
+/* char: 0x7f */
+
+static const Fl_Glut_StrokeVertex ch127st0[] =
+{
+ {52.381f,100.0f},
+ {14.2857f,-33.3333f}
+};
+
+static const Fl_Glut_StrokeVertex ch127st1[] =
+{
+ {28.5714f,66.6667f},
+ {14.2857f,61.9048f},
+ {4.7619f,52.381f},
+ {0.0f,38.0952f},
+ {0.0f,23.8095f},
+ {4.7619f,14.2857f},
+ {14.2857f,4.7619f},
+ {28.5714f,0.0f},
+ {38.0952f,0.0f},
+ {52.381f,4.7619f},
+ {61.9048f,14.2857f},
+ {66.6667f,28.5714f},
+ {66.6667f,42.8571f},
+ {61.9048f,52.381f},
+ {52.381f,61.9048f},
+ {38.0952f,66.6667f},
+ {28.5714f,66.6667f}
+};
+
+static const Fl_Glut_StrokeStrip ch127st[] =
+{
+ {2,ch127st0},
+ {17,ch127st1}
+};
+
+static const Fl_Glut_StrokeChar ch127 = {66.6667f,2,ch127st};
+
+static const Fl_Glut_StrokeChar *chars[] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ &ch32, &ch33, &ch34, &ch35, &ch36, &ch37, &ch38, &ch39,
+ &ch40, &ch41, &ch42, &ch43, &ch44, &ch45, &ch46, &ch47,
+ &ch48, &ch49, &ch50, &ch51, &ch52, &ch53, &ch54, &ch55,
+ &ch56, &ch57, &ch58, &ch59, &ch60, &ch61, &ch62, &ch63,
+ &ch64, &ch65, &ch66, &ch67, &ch68, &ch69, &ch70, &ch71,
+ &ch72, &ch73, &ch74, &ch75, &ch76, &ch77, &ch78, &ch79,
+ &ch80, &ch81, &ch82, &ch83, &ch84, &ch85, &ch86, &ch87,
+ &ch88, &ch89, &ch90, &ch91, &ch92, &ch93, &ch94, &ch95,
+ &ch96, &ch97, &ch98, &ch99, &ch100, &ch101, &ch102, &ch103,
+ &ch104, &ch105, &ch106, &ch107, &ch108, &ch109, &ch110, &ch111,
+ &ch112, &ch113, &ch114, &ch115, &ch116, &ch117, &ch118, &ch119,
+ &ch120, &ch121, &ch122, &ch123, &ch124, &ch125, &ch126, &ch127
+};
+
+Fl_Glut_StrokeFont glutStrokeRoman = {(char *)"Roman",128,152.381f,chars};


Property changes on: branches/branch-3.0/src/core/freeglut_stroke_roman.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/freeglut_teapot.cxx
===================================================================
--- branches/branch-3.0/src/core/freeglut_teapot.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/freeglut_teapot.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,164 @@
+/*
+ * freeglut_teapot.c
+ *
+ * Teapot(tm) rendering code.
+ *
+ * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Creation date: Fri Dec 24 1999
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Original teapot code copyright follows:
+ */
+
+/*
+ * (c) Copyright 1993, Silicon Graphics, Inc.
+ *
+ * ALL RIGHTS RESERVED
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that
+ * both the copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Silicon
+ * Graphics, Inc. not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission.
+ *
+ * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
+ * "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
+ * OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  IN NO
+ * EVENT SHALL SILICON GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE
+ * ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
+ * INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
+ * SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
+ * NOT SILICON GRAPHICS, INC.  HAS BEEN ADVISED OF THE POSSIBILITY
+ * OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * US Government Users Restricted Rights
+ *
+ * Use, duplication, or disclosure by the Government is subject to
+ * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+ * (c)(1)(ii) of the Rights in Technical Data and Computer
+ * Software clause at DFARS 252.227-7013 and/or in similar or
+ * successor clauses in the FAR or the DOD or NASA FAR
+ * Supplement.  Unpublished-- rights reserved under the copyright
+ * laws of the United States.  Contractor/manufacturer is Silicon
+ * Graphics, Inc., 2011 N.  Shoreline Blvd., Mountain View, CA
+ * 94039-7311.
+ *
+ * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+ */
+
+#include <fltk3/glut.h>
+#include "freeglut_teapot_data.h"
+
+/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
+
+
+static void fghTeapot( GLint grid, GLdouble scale, GLenum type )
+{
+    double p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
+    long i, j, k, l;
+
+    glPushAttrib( GL_ENABLE_BIT | GL_EVAL_BIT );
+    glEnable( GL_AUTO_NORMAL );
+    glEnable( GL_NORMALIZE );
+    glEnable( GL_MAP2_VERTEX_3 );
+    glEnable( GL_MAP2_TEXTURE_COORD_2 );
+
+    glPushMatrix();
+    glRotated( 270.0, 1.0, 0.0, 0.0 );
+    glScaled( 0.5 * scale, 0.5 * scale, 0.5 * scale );
+    glTranslated( 0.0, 0.0, -1.5 );
+
+    for (i = 0; i < 10; i++) {
+      for (j = 0; j < 4; j++) {
+        for (k = 0; k < 4; k++) {
+          for (l = 0; l < 3; l++) {
+            p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
+            q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];
+            if (l == 1)
+              q[j][k][l] *= -1.0;
+            if (i < 6) {
+              r[j][k][l] =
+                cpdata[patchdata[i][j * 4 + (3 - k)]][l];
+              if (l == 0)
+                r[j][k][l] *= -1.0;
+              s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
+              if (l == 0)
+                s[j][k][l] *= -1.0;
+              if (l == 1)
+                s[j][k][l] *= -1.0;
+            }
+          }
+        }
+      }
+
+      glMap2d(GL_MAP2_TEXTURE_COORD_2, 0.0, 1.0, 2, 2, 0.0, 1.0, 4, 2,
+        &tex[0][0][0]);
+      glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
+        &p[0][0][0]);
+      glMapGrid2d(grid, 0.0, 1.0, grid, 0.0, 1.0);
+      glEvalMesh2(type, 0, grid, 0, grid);
+      glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
+        &q[0][0][0]);
+      glEvalMesh2(type, 0, grid, 0, grid);
+      if (i < 6) {
+        glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
+          &r[0][0][0]);
+        glEvalMesh2(type, 0, grid, 0, grid);
+        glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
+          &s[0][0][0]);
+        glEvalMesh2(type, 0, grid, 0, grid);
+      }
+    }
+
+    glPopMatrix();
+    glPopAttrib();
+}
+
+
+/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
+
+/*
+ * Renders a beautiful wired teapot...
+ */
+void glutWireTeapot( GLdouble size )
+{
+    /* We will use the general teapot rendering code */
+    fghTeapot( 10, size, GL_LINE );
+}
+
+/*
+ * Renders a beautiful filled teapot...
+ */
+void glutSolidTeapot( GLdouble size )
+{
+    /* We will use the general teapot rendering code */
+    fghTeapot( 7, size, GL_FILL );
+}
+
+/*** END OF FILE ***/


Property changes on: branches/branch-3.0/src/core/freeglut_teapot.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/freeglut_teapot_data.h
===================================================================
--- branches/branch-3.0/src/core/freeglut_teapot_data.h	                        (rev 0)
+++ branches/branch-3.0/src/core/freeglut_teapot_data.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,145 @@
+/*
+ * freeglut_teapot_data.h
+ *
+ * The freeglut library teapot data include file.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef  FREEGLUT_TEAPOT_DATA_H
+#define  FREEGLUT_TEAPOT_DATA_H
+
+/*
+ * Original teapot code copyright follows:
+ */
+
+/*
+ * (c) Copyright 1993, Silicon Graphics, Inc.
+ *
+ * ALL RIGHTS RESERVED
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that
+ * both the copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Silicon
+ * Graphics, Inc. not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission.
+ *
+ * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
+ * "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
+ * OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  IN NO
+ * EVENT SHALL SILICON GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE
+ * ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
+ * INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
+ * SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
+ * NOT SILICON GRAPHICS, INC.  HAS BEEN ADVISED OF THE POSSIBILITY
+ * OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * US Government Users Restricted Rights
+ *
+ * Use, duplication, or disclosure by the Government is subject to
+ * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+ * (c)(1)(ii) of the Rights in Technical Data and Computer
+ * Software clause at DFARS 252.227-7013 and/or in similar or
+ * successor clauses in the FAR or the DOD or NASA FAR
+ * Supplement.  Unpublished-- rights reserved under the copyright
+ * laws of the United States.  Contractor/manufacturer is Silicon
+ * Graphics, Inc., 2011 N.  Shoreline Blvd., Mountain View, CA
+ * 94039-7311.
+ *
+ * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+ */
+
+/*
+ * Rim, body, lid, and bottom data must be reflected in x and y;
+ * handle and spout data across the y axis only.
+ */
+static int patchdata[][16] =
+{
+    { 102, 103, 104, 105,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15 }, /* rim    */
+    {  12,  13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27 }, /* body   */
+    {  24,  25,  26,  27,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40 },
+    {  96,  96,  96,  96,  97,  98,  99, 100, 101, 101, 101, 101,   0,   1,   2,   3 }, /* lid    */
+    {   0,   1,   2,   3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117 },
+    { 118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120,  40,  39,  38,  37 }, /* bottom */
+    {  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56 }, /* handle */
+    {  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,  28,  65,  66,  67 },
+    {  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83 }, /* spout  */
+    {  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95 }
+};
+
+static double cpdata[][3] =
+{
+    {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0,
+    -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125},
+    {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375,
+    0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375,
+    2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84,
+    2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875},
+    {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75,
+    1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35},
+    {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2,
+    0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12,
+    0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225},
+    {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225},
+    {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0,
+    -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5,
+    -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3,
+    2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0,
+    2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0,
+    2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8},
+    {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3,
+    -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3,
+    1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2,
+    -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0,
+    1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0,
+    0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66,
+    0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1},
+    {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7,
+    -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0,
+    2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375},
+    {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475},
+    {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4},
+    {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0,
+    3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8,
+    3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4,
+    -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0,
+    2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4,
+    2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3,
+    2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4},
+    {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425,
+    -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425,
+    0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075},
+    {0.84, -1.5, 0.075}
+};
+
+static double tex[2][2][2] =
+{
+    { {0.0, 0.0}, {1.0, 0.0} },
+    { {0.0, 1.0}, {1.0, 1.0} }
+};
+
+
+#endif  /* FREEGLUT_TEAPOT_DATA_H */
+


Property changes on: branches/branch-3.0/src/core/freeglut_teapot_data.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/gl_draw.cxx
===================================================================
--- branches/branch-3.0/src/core/gl_draw.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/gl_draw.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,580 @@
+//
+// "$Id$"
+//
+// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2011 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Functions from <fltk3/gl.h>
+// See also fltk3::GlWindow and gl_start.cxx
+
+#include "flstring.h"
+#if HAVE_GL || defined(FLTK3_DOXYGEN)
+
+#include <fltk3/run.h>
+#include <fltk3/gl.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+#include <fltk3/Device.h>
+#include "Fl_Gl_Choice.H"
+#include "Fl_Font.H"
+#include <fltk3/utf8.h>
+
+#if !defined(WIN32) && !defined(__APPLE__)
+#include <fltk3/Xutf8.h>
+#endif
+
+#if USE_XFT
+//extern XFontStruct* fl_xxfont();
+#endif // USE_XFT
+
+/** Returns the current font's height */
+int   gl_height() {return fltk3::height();}
+/** Returns the current font's descent */
+int   gl_descent() {return fltk3::descent();}
+/** Returns the width of the string in the current fnt */
+double gl_width(const char* s) {return fltk3::width(s);}
+/** Returns the width of n characters of the string in the current font */
+double gl_width(const char* s, int n) {return fltk3::width(s,n);}
+/** Returns the width of the character in the current font */
+double gl_width(uchar c) {return fltk3::width(c);}
+
+static Fl_Font_Descriptor *gl_fontsize;
+
+#define GL_DRAW_USES_TEXTURES  (defined(__APPLE__) && !__ppc__) // 1 only for non-PPC OSX
+#ifndef __APPLE__
+#  define USE_OksiD_style_GL_font_selection 1  // Most hosts except OSX
+#else
+#  undef USE_OksiD_style_GL_font_selection  // OSX
+#endif
+
+#if USE_XFT
+#  undef USE_OksiD_style_GL_font_selection  // turn this off for XFT also
+#endif
+
+/**
+  Sets the current OpenGL font to the same font as calling fltk3::font()
+  */
+void  gl_font(int fontid, int size) {
+  fltk3::font(fontid, size);
+  Fl_Font_Descriptor *fontsize = fltk3::graphics_driver->font_descriptor();
+#if !GL_DRAW_USES_TEXTURES
+  if (!fontsize->listbase) {
+
+#ifdef  USE_OksiD_style_GL_font_selection
+    fontsize->listbase = glGenLists(0x10000);
+#else // Fltk-1.1.8 style GL font selection
+
+#if defined (USE_X11) // X-windows options follow, either XFT or "plain" X
+// FIXME:  warning Ideally, for XFT, we really need a glXUseXftFont implementation here...
+// FIXME:  warning GL font selection is basically wrong here
+/* OksiD had a fairly sophisticated scheme for storing multiple X fonts in a XUtf8FontStruct,
+ * then sorting through them at draw time (for normal X rendering) to find which one can
+ * render the current glyph... But for now, just use the first font in the list for GL...
+ */
+    XFontStruct *font = fl_xfont;
+    int base = font->min_char_or_byte2;
+    int count = font->max_char_or_byte2-base+1;
+    fontsize->listbase = glGenLists(256);
+    glXUseXFont(font->fid, base, count, fontsize->listbase+base);
+# elif defined(WIN32)
+    // this is unused because USE_OksiD_style_GL_font_selection == 1
+    int base = fontsize->metr.tmFirstChar;
+    int count = fontsize->metr.tmLastChar-base+1;
+    HFONT oldFid = (HFONT)SelectObject(fl_gc, fontsize->fid);
+    fontsize->listbase = glGenLists(256);
+    wglUseFontBitmaps(fl_gc, base, count, fontsize->listbase+base);
+    SelectObject(fl_gc, oldFid);
+# elif defined(__APPLE_QUARTZ__)
+//AGL is not supported for use in 64-bit applications:
+//http://developer.apple.com/mac/library/documentation/Carbon/Conceptual/Carbon64BitGuide/OtherAPIChanges/OtherAPIChanges.html
+    short font, face, size;
+    uchar fn[256];
+    fn[0]=strlen(fontsize->q_name);
+    strcpy((char*)(fn+1), fontsize->q_name);
+    GetFNum(fn, &font);
+    face = 0;
+    size = fontsize->size;
+    fontsize->listbase = glGenLists(256);
+	aglUseFont(aglGetCurrentContext(), font, face,
+               size, 0, 256, fontsize->listbase);
+# else 
+#   error unsupported platform
+# endif
+
+#endif // USE_OksiD_style_GL_font_selection
+  }
+  glListBase(fontsize->listbase);
+#endif // !GL_DRAW_USES_TEXTURES
+  gl_fontsize = fontsize;
+}
+
+#ifndef __APPLE__
+static void get_list(int r) {
+  gl_fontsize->glok[r] = 1;
+#if defined(USE_X11)
+# if USE_XFT
+// FIXME
+# else
+  unsigned int ii = r * 0x400;
+  for (int i = 0; i < 0x400; i++) {
+    XFontStruct *font = NULL;
+    unsigned short id;
+    XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id);
+    if (font) glXUseXFont(font->fid, id, 1, gl_fontsize->listbase+ii);
+    ii++;
+   }
+# endif
+#elif defined(WIN32)
+  unsigned int ii = r * 0x400;
+  HFONT oldFid = (HFONT)SelectObject(fl_gc, gl_fontsize->fid);
+  wglUseFontBitmapsW(fl_gc, ii, ii + 0x03ff, gl_fontsize->listbase+ii);
+  SelectObject(fl_gc, oldFid);
+#elif defined(__APPLE_QUARTZ__)
+// handled by textures
+#else
+#  error unsupported platform
+#endif
+} // get_list
+#endif
+
+void gl_remove_displaylist_fonts()
+{
+# if HAVE_GL
+
+  // clear variables used mostly in fltk3::font
+  fltk3::graphics_driver->font(0, 0);
+
+  for (int j = 0 ; j < fltk3::FREE_FONT ; ++j)
+  {
+    Fl_Font_Descriptor* past = 0;
+    Fl_Fontdesc* s    = fltk3::fonts + j ;
+    Fl_Font_Descriptor* f    = s->first;
+    while (f != 0) {
+      if(f->listbase) {
+        if(f == s->first) {
+          s->first = f->next;
+        }
+        else {
+          past->next = f->next;
+        }
+
+        // It would be nice if this next line was in a desctructor somewhere
+        glDeleteLists(f->listbase, 256);
+
+        Fl_Font_Descriptor* tmp = f;
+        f = f->next;
+        delete tmp;
+      }
+      else {
+        past = f;
+        f = f->next;
+      }
+    }
+  }
+
+#endif
+}
+
+#if GL_DRAW_USES_TEXTURES
+static void gl_draw_textures(const char* str, int n);
+#endif
+
+/**
+  Draws an array of n characters of the string in the current font
+  at the current position.
+ \see On the Mac OS X platform, see gl_texture_pile_height(int)
+  */
+void gl_draw(const char* str, int n) {
+#ifdef __APPLE__  
+  
+#if GL_DRAW_USES_TEXTURES
+  gl_draw_textures(str, n);
+#else
+  glCallLists(n, GL_UNSIGNED_BYTE, str);
+#endif
+  
+#else
+  static xchar *buf = NULL;
+  static int l = 0;
+  int wn = fltk3::utf8toUtf16(str, n, (unsigned short*)buf, l);
+  if(wn >= l) {
+    buf = (xchar*) realloc(buf, sizeof(xchar) * (wn + 1));
+    l = wn + 1;
+    wn = fltk3::utf8toUtf16(str, n, (unsigned short*)buf, l);
+  }
+  n = wn;
+
+  int i;
+  for (i = 0; i < n; i++) {
+    unsigned int r;
+    r = (str[i] & 0xFC00) >> 10;
+    if (!gl_fontsize->glok[r]) get_list(r);
+  }
+  glCallLists(n, GL_UNSIGNED_SHORT, buf);
+#endif
+}
+
+/**
+  Draws n characters of the string in the current font at the given position 
+ \see On the Mac OS X platform, see gl_texture_pile_height(int)
+  */
+void gl_draw(const char* str, int n, int x, int y) {
+  glRasterPos2i(x, y);
+  gl_draw(str, n);
+}
+
+/**
+  Draws n characters of the string in the current font at the given position 
+ \see On the Mac OS X platform, see gl_texture_pile_height(int)
+  */
+void gl_draw(const char* str, int n, float x, float y) {
+  glRasterPos2f(x, y);
+  gl_draw(str, n);
+}
+
+/**
+  Draws a nul-terminated string in the current font at the current position
+ \see On the Mac OS X platform, see gl_texture_pile_height(int)
+  */
+void gl_draw(const char* str) {
+  gl_draw(str, strlen(str));
+}
+
+/**
+  Draws a nul-terminated string in the current font at the given position 
+ \see On the Mac OS X platform, see gl_texture_pile_height(int)
+  */
+void gl_draw(const char* str, int x, int y) {
+  gl_draw(str, strlen(str), x, y);
+}
+
+/**
+  Draws a nul-terminated string in the current font at the given position 
+ \see On the Mac OS X platform, see gl_texture_pile_height(int)
+  */
+void gl_draw(const char* str, float x, float y) {
+  gl_draw(str, strlen(str), x, y);
+}
+
+static void gl_draw_invert(const char* str, int n, int x, int y) {
+  glRasterPos2i(x, -y);
+  gl_draw(str, n);
+}
+
+/**
+  Draws a string formatted into a box, with newlines and tabs expanded,
+  other control characters changed to ^X. and aligned with the edges or
+  center. Exactly the same output as fltk3::draw().
+  */
+void gl_draw(
+  const char* str, 	// the (multi-line) string
+  int x, int y, int w, int h, 	// bounding box
+  fltk3::Align align) {
+  fltk3::draw(str, x, -y-h, w, h, align, gl_draw_invert);
+}
+
+/** Measure how wide and tall the string will be when drawn by the gl_draw() function */
+void gl_measure(const char* str, int& x, int& y) {fltk3::measure(str,x,y);}
+
+/**
+  Outlines the given rectangle with the current color.
+  If fltk3::GlWindow::ortho() has been called, then the rectangle will
+  exactly fill the given pixel rectangle.
+  */
+void gl_rect(int x, int y, int w, int h) {
+  if (w < 0) {w = -w; x = x-w;}
+  if (h < 0) {h = -h; y = y-h;}
+  glBegin(GL_LINE_STRIP);
+  glVertex2i(x+w-1, y+h-1);
+  glVertex2i(x+w-1, y);
+  glVertex2i(x, y);
+  glVertex2i(x, y+h-1);
+  glVertex2i(x+w, y+h-1);
+  glEnd();
+}
+
+#if HAVE_GL_OVERLAY
+extern uchar fl_overlay;
+extern int fl_overlay_depth;
+#endif
+
+/**
+  Sets the curent OpenGL color to an FLTK color.
+
+  For color-index modes it will use fl_xpixel(c), which is only
+  right if the window uses the default colormap!
+  */
+void gl_color(fltk3::Color i) {
+#if HAVE_GL_OVERLAY
+#if defined(WIN32)
+  if (fl_overlay && fl_overlay_depth) {
+    if (fl_overlay_depth < 8) {
+      // only black & white produce the expected colors.  This could
+      // be improved by fixing the colormap set in Fl_Gl_Overlay.cxx
+      int size = 1<<fl_overlay_depth;
+      if (!i) glIndexi(size-2);
+      else if (i >= size-2) glIndexi(size-1);
+      else glIndexi(i);
+    } else {
+      glIndexi(i ? i : fltk3::GRAY_RAMP);
+    }
+    return;
+  }
+#else
+  if (fl_overlay) {glIndexi(int(fl_xpixel(i))); return;}
+#endif
+#endif
+  uchar red, green, blue;
+  fltk3::get_color(i, red, green, blue);
+  glColor3ub(red, green, blue);
+}
+
+void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) {
+  if (!ld) ld = w*d;
+  glPixelStorei(GL_UNPACK_ROW_LENGTH, ld/d);
+  glRasterPos2i(x,y);
+  glDrawPixels(w,h,d<4?GL_RGB:GL_RGBA,GL_UNSIGNED_BYTE,(const ulong*)b);
+}
+
+#if GL_DRAW_USES_TEXTURES || defined(FLTK3_DOXYGEN)
+
+#include <fltk3/glu.h>
+
+// manages a fifo pile of pre-computed string textures
+class gl_texture_fifo {
+  friend void gl_draw_textures(const char *, int);
+private:
+  typedef struct { // information for a pre-computed texture
+    GLuint texName; // its name
+    char *utf8; //its text
+    Fl_Font_Descriptor *fdesc; // its font
+    int width; // its width
+    int height; // its height
+  } data;
+  data *fifo; // array of pile elements
+  int size_; // pile height
+  int current; // the oldest texture to have entered the pile
+  int last; // pile top
+  int textures_generated; // true iff glGenTextures has been called
+  void display_texture(int rank);
+  int compute_texture(const char* str, int n);
+  int already_known(const char *str, int n);
+public:
+  gl_texture_fifo(int max = 100); // 100 = default height of texture pile
+  inline int size(void) {return size_; };
+  ~gl_texture_fifo(void);
+};
+
+gl_texture_fifo::gl_texture_fifo(int max)
+{
+  size_ = max;
+  last = current = -1;
+  textures_generated = 0;
+  fifo = (data*)calloc(size_, sizeof(data));
+}
+
+gl_texture_fifo::~gl_texture_fifo()
+{
+  for (int i = 0; i < size_; i++) {
+    if (fifo[i].utf8) free(fifo[i].utf8);
+    if (textures_generated) glDeleteTextures(1, &fifo[i].texName);
+    }
+  free(fifo);
+}
+
+// displays a pre-computed texture on the GL scene
+void gl_texture_fifo::display_texture(int rank)
+{
+  //setup matrices
+  GLint matrixMode;
+  glGetIntegerv (GL_MATRIX_MODE, &matrixMode);
+  glMatrixMode (GL_PROJECTION);
+  glPushMatrix();
+  glLoadIdentity ();
+  glMatrixMode (GL_MODELVIEW);
+  glPushMatrix();
+  glLoadIdentity ();
+  float winw = fltk3::Window::current()->w();
+  float winh = fltk3::Window::current()->h();
+  glScalef (2.0f / winw, 2.0f /  winh, 1.0f);
+  glTranslatef (-winw / 2.0f, -winh / 2.0f, 0.0f);
+  //write the texture on screen
+  GLfloat pos[4];
+  glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
+  CGRect bounds = CGRectMake (pos[0], pos[1] - fltk3::descent(), fifo[rank].width, fifo[rank].height);
+  
+  // GL_COLOR_BUFFER_BIT for glBlendFunc, GL_ENABLE_BIT for glEnable / glDisable
+  glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT); 
+  glDisable (GL_DEPTH_TEST); // ensure text is not removed by depth buffer test.
+  glEnable (GL_BLEND); // for text fading
+  glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); // ditto
+  glEnable (GL_TEXTURE_RECTANGLE_EXT);	
+  glDisable(GL_LIGHTING);
+  glBindTexture (GL_TEXTURE_RECTANGLE_EXT, fifo[rank].texName);
+  glBegin (GL_QUADS);
+  glTexCoord2f (0.0f, 0.0f); // draw lower left in world coordinates
+  glVertex2f (bounds.origin.x, bounds.origin.y);
+  
+  glTexCoord2f (0.0f, fifo[rank].height); // draw upper left in world coordinates
+  glVertex2f (bounds.origin.x, bounds.origin.y + bounds.size.height);
+  
+  glTexCoord2f (fifo[rank].width, fifo[rank].height); // draw upper right in world coordinates
+  glVertex2f (bounds.origin.x + bounds.size.width, bounds.origin.y + bounds.size.height);
+  
+  glTexCoord2f (fifo[rank].width, 0.0f); // draw lower right in world coordinates
+  glVertex2f (bounds.origin.x + bounds.size.width, bounds.origin.y);
+  glEnd ();
+  glPopAttrib();
+  
+  // reset original matrices
+  glPopMatrix(); // GL_MODELVIEW
+  glMatrixMode (GL_PROJECTION);
+  glPopMatrix();
+  glMatrixMode (matrixMode);
+  
+  //set the raster position to end of string
+  pos[0] += fifo[rank].width;
+  GLdouble modelmat[16];
+  glGetDoublev (GL_MODELVIEW_MATRIX, modelmat);
+  GLdouble projmat[16];
+  glGetDoublev (GL_PROJECTION_MATRIX, projmat);
+  GLdouble objX, objY, objZ;
+  GLint viewport[4];
+  glGetIntegerv (GL_VIEWPORT, viewport);
+  gluUnProject(pos[0], pos[1], pos[2], modelmat, projmat, viewport, &objX, &objY, &objZ);
+  glRasterPos2d(objX, objY);
+}
+
+// pre-computes a string texture
+int gl_texture_fifo::compute_texture(const char* str, int n)
+{
+  current = (current + 1) % size_;
+  if (current > last) last = current;
+  //write str to a bitmap just big enough  
+  if ( fifo[current].utf8 ) free(fifo[current].utf8);
+  fifo[current].utf8 = (char *)malloc(n + 1);
+  memcpy(fifo[current].utf8, str, n);
+  fifo[current].utf8[n] = 0;
+  fifo[current].width = 0, fifo[current].height = 0;
+  fltk3::measure(fifo[current].utf8, fifo[current].width, fifo[current].height, 0);
+  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
+  void *base = calloc(4*fifo[current].width, fifo[current].height);
+  if (base == NULL) return -1;
+  fl_gc = CGBitmapContextCreate(base, fifo[current].width, fifo[current].height, 8, fifo[current].width*4, lut, kCGImageAlphaPremultipliedLast);
+  CGColorSpaceRelease(lut);
+  fltk3::graphics_driver->font_descriptor(gl_fontsize);
+  GLfloat colors[4];
+  glGetFloatv(GL_CURRENT_COLOR, colors);
+  fltk3::color((uchar)(colors[0]*255), (uchar)(colors[1]*255), (uchar)(colors[2]*255));
+  fltk3::draw(str, n, 0, fifo[current].height - fltk3::descent());
+  //put this bitmap in a texture  
+  glPushAttrib(GL_TEXTURE_BIT);
+  glBindTexture (GL_TEXTURE_RECTANGLE_EXT, fifo[current].texName);
+  glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+  glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+  glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, fifo[current].width, fifo[current].height, 0,  GL_RGBA, GL_UNSIGNED_BYTE, base);
+  glPopAttrib();
+  CGContextRelease(fl_gc);
+  fl_gc = NULL;
+  free(base);
+  fifo[current].fdesc = gl_fontsize;
+  return current;
+}
+
+// returns rank of pre-computed texture for a string if it exists
+int gl_texture_fifo::already_known(const char *str, int n)
+{
+  int rank;
+  for ( rank = 0; rank <= last; rank++) {
+    if ( memcmp(str, fifo[rank].utf8, n) == 0 && fifo[rank].utf8[n] == 0 &&
+      fifo[rank].fdesc == gl_fontsize) return rank;
+  }
+  return -1;
+}
+
+static gl_texture_fifo *gl_fifo = NULL; // points to the texture pile class instance
+
+// draws a utf8 string using pre-computed texture if available
+static void gl_draw_textures(const char* str, int n) 
+{
+  if (! gl_fifo) gl_fifo = new gl_texture_fifo();
+  if (!gl_fifo->textures_generated) {
+    for (int i = 0; i < gl_fifo->size_; i++) glGenTextures (1, &(gl_fifo->fifo[i].texName));
+    gl_fifo->textures_generated = 1;
+  }
+  int rank = gl_fifo->already_known(str, n);
+  if (rank == -1) {
+    rank = gl_fifo->compute_texture(str, n);
+  }
+  gl_fifo->display_texture(rank);
+}
+
+/** \addtogroup group_macosx
+ @{ */
+
+/**
+ \brief Returns the current height of the pile of pre-computed string textures
+ *
+ The default value is 100
+ */
+int gl_texture_pile_height(void)
+{
+  if (! gl_fifo) gl_fifo = new gl_texture_fifo();
+  return gl_fifo->size();
+}
+
+/**
+ \brief Changes the height of the pile of pre-computed string textures
+ *
+ Strings that are often re-displayed can be processed much faster if
+ this pile is set high enough to hold all of them.
+ \param max Height of the texture pile
+ */
+void gl_texture_pile_height(int max)
+{
+  if (gl_fifo) delete gl_fifo;
+  gl_fifo = new gl_texture_fifo(max);
+}
+
+/** @} */
+
+#elif defined(__APPLE__)
+// used only if __ppc__
+int gl_texture_pile_height(void) {return 0;}
+void gl_texture_pile_height(int max) {}
+#endif // GL_DRAW_USES_TEXTURES
+#if defined(__APPLE__)
+void gl_texture_reset()
+{
+#if GL_DRAW_USES_TEXTURES
+  if (gl_fifo) gl_texture_pile_height(gl_texture_pile_height());
+#endif // GL_DRAW_USES_TEXTURES
+}
+#endif // __APPLE__
+
+#endif // HAVE_GL
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/gl_draw.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/gl_start.cxx
===================================================================
--- branches/branch-3.0/src/core/gl_start.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/gl_start.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,132 @@
+//
+// "$Id$"
+//
+// OpenGL context routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// You MUST use gl_visual() to select the default visual before doing
+// show() of any windows.  Mesa will crash if you try to use a visual
+// not returned by glxChooseVisual.
+
+// This does not work with fltk3::DoubleWindow's!  It will try to draw
+// into the front buffer.  Depending on the system this will either
+// crash or do nothing (when pixmaps are being used as back buffer
+// and GL is being done by hardware), work correctly (when GL is done
+// with software, such as Mesa), or draw into the front buffer and
+// be erased when the buffers are swapped (when double buffer hardware
+// is being used)
+
+#include <config.h>
+#if HAVE_GL
+
+#include <fltk3/run.h>
+#include <fltk3/Window.h>
+#include <fltk3/x.h>
+#include <fltk3/draw.h>
+#include "Fl_Gl_Choice.H"
+
+static GLContext context;
+static int clip_state_number=-1;
+static int pw, ph;
+
+#ifdef WIN32
+static fltk3::GlChoice* gl_choice;
+#endif
+
+#ifdef __APPLE__
+static fltk3::GlChoice* gl_choice;
+#endif
+
+fltk3::Region XRectangleRegion(int x, int y, int w, int h); // in fltk3::rect.cxx
+
+/** Creates an OpenGL context */
+void gl_start() {
+  if (!context) {
+#if defined(USE_X11)
+    context = fl_create_gl_context(fl_visual);
+#elif defined(WIN32)
+    if (!gl_choice) fltk3::gl_visual(0);
+    context = fl_create_gl_context(fltk3::Window::current(), gl_choice);
+#elif defined(__APPLE_QUARTZ__)
+    // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+    context = fl_create_gl_context(fltk3::Window::current(), gl_choice);
+#else
+#  error Unsupported platform
+#endif
+  }
+  fl_set_gl_context(fltk3::Window::current(), context);
+#if !defined(WIN32) && !defined(__APPLE__)
+  glXWaitX();
+#endif
+  if (pw != fltk3::Window::current()->w() || ph != fltk3::Window::current()->h()) {
+    pw = fltk3::Window::current()->w();
+    ph = fltk3::Window::current()->h();
+    glLoadIdentity();
+    glViewport(0, 0, pw, ph);
+    glOrtho(0, pw, 0, ph, -1, 1);
+    glDrawBuffer(GL_FRONT);
+  }
+  if (clip_state_number != fltk3::graphics_driver->fl_clip_state_number) {
+    clip_state_number = fltk3::graphics_driver->fl_clip_state_number;
+    int x, y, w, h;
+    if (fltk3::clip_box(0, 0, fltk3::Window::current()->w(), fltk3::Window::current()->h(),
+		    x, y, w, h)) {
+      fltk3::clip_region(XRectangleRegion(x,y,w,h));
+      glScissor(x, fltk3::Window::current()->h()-(y+h), w, h);
+      glEnable(GL_SCISSOR_TEST);
+    } else {
+      glDisable(GL_SCISSOR_TEST);
+    }
+  }
+}
+
+/** Releases an OpenGL context */
+void gl_finish() {
+  glFlush();
+#if !defined(WIN32) && !defined(__APPLE__)
+  glXWaitGL();
+#endif
+}
+
+int fltk3::gl_visual(int mode, int *alist) {
+  fltk3::GlChoice *c = fltk3::GlChoice::find(mode,alist);
+  if (!c) return 0;
+#if defined(USE_X11)
+  fl_visual = c->vis;
+  fl_colormap = c->colormap;
+#elif defined(WIN32)
+  gl_choice = c;
+#elif defined(__APPLE_QUARTZ__)
+  // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
+  gl_choice = c;
+#else
+#  error Unsupported platform
+#endif
+  return 1;
+}
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/gl_start.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/glut_compatability.cxx
===================================================================
--- branches/branch-3.0/src/core/glut_compatability.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/glut_compatability.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,526 @@
+//
+// "$Id$"
+//
+// GLUT emulation routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+// Emulation of Glut using fltk.
+
+// GLUT is Copyright (c) Mark J. Kilgard, 1994, 1995, 1996.
+// "This program is freely distributable without licensing fees  and is
+// provided without guarantee or warrantee expressed or  implied. This
+// program is -not- in the public domain."
+
+// Although I have copied the GLUT API, none of my code is based on
+// any Glut implementation details and is therefore covered by the LGPL.
+
+#include "flstring.h"
+#if HAVE_GL
+
+#  include <fltk3/glut.h>
+#  ifdef HAVE_GLXGETPROCADDRESSARB
+#    define GLX_GLXEXT_LEGACY
+#    include <GL/glx.h>
+#  endif // HAVE_GLXGETPROCADDRESSARB
+#  ifdef HAVE_DLFCN_H
+#    include <dlfcn.h>
+#  endif // HAVE_DLFCN_H
+#  define MAXWINDOWS 32
+#include <fltk3/Wrapper.h>
+
+static fltk3::GlutWindow *windows[MAXWINDOWS+1];
+
+static void (*glut_idle_func)() = 0; // global glut idle function
+
+fltk3::GlutWindow *glut_window;
+int glut_menu;
+void (*glut_menustate_function)(int);
+void (*glut_menustatus_function)(int,int,int);
+
+static void default_reshape(int w, int h) {glViewport(0,0,w,h);}
+static void default_display() {}
+
+void fltk3::GlutWindow::make_current() {
+  glut_window = this;
+  if (shown()) GlWindow::make_current();
+}
+
+static int indraw;
+void fltk3::GlutWindow::draw() {
+  FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
+  glut_window = this;
+  indraw = 1;
+  if (!valid()) {reshape(w(),h()); valid(1);}
+  display();
+  indraw = 0;
+}
+
+void glutSwapBuffers() {
+  if (!indraw) glut_window->swap_buffers();
+}
+
+void fltk3::GlutWindow::draw_overlay() {
+  glut_window = this;
+  if (!valid()) {reshape(w(),h()); valid(1);}
+  overlaydisplay();
+}
+
+static void domenu(int, int, int);
+
+int fltk3::GlutWindow::handle(int event) {
+  FLTK3_OBJECT_VCALLS_WRAPPER_RET(int, handle(event), Handle)
+  make_current();
+  int ex = fltk3::event_x();
+  int ey = fltk3::event_y();
+  int button;
+  switch (event) {
+
+  case fltk3::PUSH:
+    if (keyboard || special) fltk3::focus(this);
+    button = fltk3::event_button()-1;
+    if (button<0) button = 0;
+    if (button>2) button = 2;
+    if (menu[button]) {domenu(menu[button],ex,ey); return 1;}
+    mouse_down |= 1<<button;
+    if (mouse) {mouse(button,GLUT_DOWN,ex,ey); return 1;}
+    if (motion) return 1;
+    break;
+
+  case fltk3::MOUSEWHEEL:
+    button = fltk3::event_dy();
+    while (button < 0) {if (mouse) mouse(3,GLUT_DOWN,ex,ey); ++button;}
+    while (button > 0) {if (mouse) mouse(4,GLUT_DOWN,ex,ey); --button;}
+    return 1;
+
+  case fltk3::RELEASE:
+    for (button = 0; button < 3; button++) if (mouse_down & (1<<button)) {
+      if (mouse) mouse(button,GLUT_UP,ex,ey);
+    }
+    mouse_down = 0;
+    return 1;
+
+  case fltk3::ENTER:
+    if (entry) {entry(GLUT_ENTERED); return 1;}
+    if (passivemotion) return 1;
+    break;
+
+  case fltk3::LEAVE:
+    if (entry) {entry(GLUT_LEFT); return 1;}
+    if (passivemotion) return 1;
+    break;
+
+  case fltk3::DRAG:
+    if (motion) {motion(ex, ey); return 1;}
+    break;
+
+  case fltk3::MOVE:
+    if (passivemotion) {passivemotion(ex, ey); return 1;}
+    break;
+
+  case fltk3::FOCUS:
+    if (keyboard || special) return 1;
+    break;
+
+  case fltk3::SHORTCUT:
+    if (!keyboard && !special) break;
+
+  case fltk3::KEYBOARD:
+    if (fltk3::event_text()[0]) {
+      if (keyboard) {keyboard(fltk3::event_text()[0],ex,ey); return 1;}
+      break;
+    } else {
+      if (special) {
+	unsigned k = fltk3::event_key();
+	if (k > fltk3::FKey && k <= fltk3::FLastKey) k -= fltk3::FKey;
+	special(k,ex,ey);
+	return 1;
+      }
+      break;
+    }
+
+  case fltk3::HIDE:
+    if (visibility) visibility(GLUT_NOT_VISIBLE);
+    break;
+
+  case fltk3::SHOW:
+    if (visibility) visibility(GLUT_VISIBLE);
+    break;
+  }
+
+  return GlWindow::handle(event);
+}
+
+static int glut_mode = GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;
+
+void fltk3::GlutWindow::_init() {
+  for (number=1; number<MAXWINDOWS; number++) if (!windows[number]) break;
+  windows[number] = this;
+  menu[0] = menu[1] = menu[2] = 0;
+  reshape = default_reshape;
+  display = default_display;
+  overlaydisplay = default_display;
+  keyboard = 0;
+  mouse = 0;
+  motion = 0;
+  passivemotion = 0;
+  entry = 0;
+  visibility = 0;
+  special = 0;
+  mouse_down = 0;
+  mode(glut_mode);
+}
+
+/** Creates a glut window, registers to the glut windows list.*/
+fltk3::GlutWindow::GlutWindow(int W, int H, const char *t) :
+  fltk3::GlWindow(W,H,t) {_init();}
+
+/** Creates a glut window, registers to the glut windows list.*/
+fltk3::GlutWindow::GlutWindow(int X,int Y,int W,int H, const char *t) :
+  fltk3::GlWindow(X,Y,W,H,t) {_init();}
+
+static int initargc;
+static char **initargv;
+
+void glutInit(int *argc, char **argv) {
+  initargc = *argc;
+  initargv = new char*[*argc+1];
+  int i,j;
+  for (i=0; i<=*argc; i++) initargv[i] = argv[i];
+  for (i=j=1; i<*argc; ) {
+    if (fltk3::arg(*argc,argv,i));
+    else argv[j++] = argv[i++];
+  }
+  argv[j] = 0;
+  *argc = j;
+}
+
+void glutInitDisplayMode(unsigned int mode) {
+  glut_mode = mode;
+}
+
+void glutMainLoop() {fltk3::run();}
+
+////////////////////////////////////////////////////////////////
+
+static int initx=0, inity=0, initw=300, inith=300, initpos=0;
+
+void glutInitWindowPosition(int x, int y) {
+  initx = x; inity = y; initpos = 1;
+}
+
+void glutInitWindowSize(int w, int h) {
+  initw = w; inith = h;
+}
+
+int glutCreateWindow(char *title) {
+  return glutCreateWindow((const char*)title);
+}
+
+int glutCreateWindow(const char *title) {
+  fltk3::GlutWindow *W;
+  if (initpos) {
+    W = new fltk3::GlutWindow(initx,inity,initw,inith,title);
+    initpos = 0;
+  } else {
+    W = new fltk3::GlutWindow(initw,inith,title);
+  }
+  W->resizable(W);
+  if (initargc) {
+    W->show(initargc,initargv);
+    initargc = 0;
+  } else {
+    W->show();
+  }
+  W->valid(0);
+  W->context_valid(0);
+  W->make_current();
+  return W->number;
+}
+
+int glutCreateSubWindow(int win, int x, int y, int w, int h) {
+  fltk3::GlutWindow *W = new fltk3::GlutWindow(x,y,w,h,0);
+  windows[win]->add(W);
+  if (windows[win]->shown()) W->show();
+  W->make_current();
+  return W->number;
+}
+/** Destroys the glut window, first unregister it from the glut windows list */
+fltk3::GlutWindow::~GlutWindow() {
+  if (glut_window == this) glut_window = 0;
+  windows[number] = 0;
+}
+
+void glutDestroyWindow(int win) {
+  // should destroy children!!!
+  delete windows[win];
+}
+
+void glutPostWindowRedisplay(int win) {
+  windows[win]->redraw();
+}
+
+void glutSetWindow(int win) {
+  windows[win]->make_current();
+}
+
+////////////////////////////////////////////////////////////////
+#include <fltk3/MenuItem.h>
+
+struct menu {
+  void (*cb)(int);
+  fltk3::MenuItem *m;
+  int size;
+  int alloc;
+};
+
+#define MAXMENUS 32
+static menu menus[MAXMENUS+1];
+
+static void domenu(int n, int ex, int ey) {
+  glut_menu = n;
+  menu *m = &menus[n];
+  if (glut_menustate_function) glut_menustate_function(1);
+  if (glut_menustatus_function) glut_menustatus_function(1,ex,ey);
+  const fltk3::MenuItem* g = m->m->popup(fltk3::event_x(), fltk3::event_y(), 0);
+  if (g && g->callback_) ((void (*)(int))(g->callback_))(int(g->argument()));
+  if (glut_menustatus_function) glut_menustatus_function(0,ex,ey);
+  if (glut_menustate_function) glut_menustate_function(0);
+}
+
+int glutCreateMenu(void (*cb)(int)) {
+  int i;
+  for (i=1; i<MAXMENUS; i++) if (!menus[i].cb) break;
+  menu *m = &menus[i];
+  m->cb = cb;
+  return glut_menu = i;
+}
+
+void glutDestroyMenu(int n) {
+  menu *m = &menus[n];
+  delete[] m->m;
+  m->m = 0;
+  m->cb = 0;
+  m->size = m->alloc = 0;
+}
+
+static fltk3::MenuItem* additem(menu *m) {
+  if (m->size+1 >= m->alloc) {
+    m->alloc = m->size*2+10;
+    fltk3::MenuItem* nm = new fltk3::MenuItem[m->alloc];
+    for (int i=0; i<m->size; i++) nm[i] = m->m[i];
+    delete[] m->m;
+    m->m = nm;
+  }
+  int n = m->size++;
+  m->m[n+1].text = 0;
+  fltk3::MenuItem* i = &(m->m[n]);
+  i->shortcut_ = 0;
+  i->flags = 0;
+  i->labeltype_ = i->labelfont_ = i->labelsize_ = i->labelcolor_ = 0;
+  return i;
+}
+
+void glutAddMenuEntry(char *label, int value) {
+  menu *m = &menus[glut_menu];
+  fltk3::MenuItem* i = additem(m);
+  i->text = label;
+  i->callback_ = (fltk3::Callback*)(m->cb);
+  i->user_data_ = (void *)value;
+}
+
+void glutAddSubMenu(char *label, int submenu) {
+  menu *m = &menus[glut_menu];
+  fltk3::MenuItem* i = additem(m);
+  i->text = label;
+  i->callback_ = 0;
+  i->user_data_ = (void *)(menus[submenu].m);
+  i->flags = fltk3::SUBMENU;
+}
+
+void glutChangeToMenuEntry(int item, char *label, int value) {
+  menu *m = &menus[glut_menu];
+  fltk3::MenuItem* i = &m->m[item-1];
+  i->text = label;
+  i->callback_ = (fltk3::Callback*)(m->cb);
+  i->user_data_ = (void *)value;
+  i->flags = 0;
+}
+
+void glutChangeToSubMenu(int item, char *label, int submenu) {
+  menu *m = &menus[glut_menu];
+  fltk3::MenuItem* i = &m->m[item-1];
+  i->text = label;
+  i->callback_ = 0;
+  i->user_data_ = (void *)(menus[submenu].m);
+  i->flags = fltk3::SUBMENU;
+}
+
+void glutRemoveMenuItem(int item) {
+  menu *m = &menus[glut_menu];
+  if (item > m->size || item < 1) return;
+  for (int i = item-1; i <= m->size; i++) m->m[i] = m->m[i+1];
+  m->size--;
+}
+
+////////////////////////////////////////////////////////////////
+
+int glutGet(GLenum type) {
+  switch (type) {
+  case GLUT_RETURN_ZERO: return 0;
+  case GLUT_WINDOW_X: return glut_window->x();
+  case GLUT_WINDOW_Y: return glut_window->y();
+  case GLUT_WINDOW_WIDTH: return glut_window->w();
+  case GLUT_WINDOW_HEIGHT: return glut_window->h();
+  case GLUT_WINDOW_PARENT:
+    if (glut_window->parent())
+      return ((fltk3::GlutWindow *)(glut_window->parent()))->number;
+    else
+      return 0;
+//case GLUT_WINDOW_NUM_CHILDREN:
+//case GLUT_WINDOW_CURSOR: return 
+  case GLUT_SCREEN_WIDTH: return fltk3::w();
+  case GLUT_SCREEN_HEIGHT: return fltk3::h();
+//case GLUT_SCREEN_WIDTH_MM:
+//case GLUT_SCREEN_HEIGHT_MM:
+  case GLUT_MENU_NUM_ITEMS: return menus[glut_menu].size;
+  case GLUT_DISPLAY_MODE_POSSIBLE: return fltk3::GlWindow::can_do(glut_mode);
+  case GLUT_INIT_WINDOW_X: return initx;
+  case GLUT_INIT_WINDOW_Y: return inity;
+  case GLUT_INIT_WINDOW_WIDTH: return initw;
+  case GLUT_INIT_WINDOW_HEIGHT: return inith;
+  case GLUT_INIT_DISPLAY_MODE: return glut_mode;
+//case GLUT_ELAPSED_TIME:
+  case GLUT_WINDOW_BUFFER_SIZE:
+    if (glutGet(GLUT_WINDOW_RGBA))
+      return glutGet(GLUT_WINDOW_RED_SIZE)+
+	glutGet(GLUT_WINDOW_GREEN_SIZE)+
+	glutGet(GLUT_WINDOW_BLUE_SIZE)+
+	glutGet(GLUT_WINDOW_ALPHA_SIZE);
+    else
+      return glutGet(GLUT_WINDOW_COLORMAP_SIZE);
+  case GLUT_VERSION: return 20400;
+  default: {GLint p; glGetIntegerv(type, &p); return p;}
+  }
+}
+
+int glutLayerGet(GLenum type) {
+  switch (type) {
+  case GLUT_OVERLAY_POSSIBLE: return glut_window->can_do_overlay();
+//case GLUT_LAYER_IN_USE:
+//case GLUT_HAS_OVERLAY:
+  case GLUT_TRANSPARENT_INDEX: return 0; // true for SGI
+  case GLUT_NORMAL_DAMAGED: return glut_window->damage();
+  case GLUT_OVERLAY_DAMAGED: return 1; // kind of works...
+  default: return 0;
+  }
+}
+
+int glutDeviceGet(GLenum type) {
+  switch (type) {
+    case GLUT_HAS_KEYBOARD : return 1;
+    case GLUT_HAS_MOUSE : return 1;
+    case GLUT_NUM_MOUSE_BUTTONS : return 3;
+    default : return 0;
+  }
+}
+
+// Get extension function address...
+GLUTproc glutGetProcAddress(const char *procName) {
+#  ifdef WIN32
+  return (GLUTproc)wglGetProcAddress((LPCSTR)procName);
+
+#  elif defined(HAVE_DLSYM) && defined(HAVE_DLFCN_H)
+  char symbol[1024];
+
+  snprintf(symbol, sizeof(symbol), "_%s", procName);
+
+#    ifdef RTLD_DEFAULT
+  return (GLUTproc)dlsym(RTLD_DEFAULT, symbol);
+
+#    else // No RTLD_DEFAULT support, so open the current a.out symbols...
+  static void *rtld_default = 0;
+
+  if (!rtld_default) rtld_default = dlopen(0, RTLD_LAZY);
+
+  if (rtld_default) return (GLUTproc)dlsym(rtld_default, symbol);
+  else return 0;
+
+#    endif // RTLD_DEFAULT
+
+#  elif defined(HAVE_GLXGETPROCADDRESSARB)
+  return (GLUTproc)glXGetProcAddressARB((const GLubyte *)procName);
+
+#  else
+  return (GLUTproc)0;
+#  endif // WIN32
+}
+
+// Parse the GL_EXTENSIONS string to see if the named extension is
+// supported.
+//
+// This code was copied from FreeGLUT 2.4.0 which carries the
+// following notice:
+//
+//     Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+int glutExtensionSupported( const char* extension )
+{
+  if (!extension || strchr(extension, ' ')) return 0;
+
+  const char *extensions, *start;
+  const int len = strlen( extension );
+  
+  start = extensions = (const char *) glGetString(GL_EXTENSIONS);
+
+  if (!extensions) return 0;
+
+  for (;;) {
+    const char *p = strstr(extensions, extension);
+    if (!p) return 0;  /* not found */
+    /* check that the match isn't a super string */
+    if ((p == start || p[-1] == ' ') &&
+        (p[len] == ' ' || p[len] == 0)) return 1;
+    /* skip the false match and continue */
+    extensions = p + len;
+  }
+}
+
+// Add a mechanism to handle adding/removing the glut idle function
+// without depending on the (deprecated) set_idle method.
+void glutIdleFunc(void (*f)())
+{
+  // no change
+  if(glut_idle_func == f) return;
+  // remove current idle
+  if(glut_idle_func) fltk3::remove_idle((void (*)(void *))glut_idle_func);
+  // install new idle func - if one was passed
+  if(f) fltk3::add_idle((void (*)(void *))f);
+  // record new idle func - even if it is NULL
+  glut_idle_func = f;
+} // glutIdleFunc
+
+#endif // HAVE_GL
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/glut_compatability.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/glut_font.cxx
===================================================================
--- branches/branch-3.0/src/core/glut_font.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/glut_font.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,198 @@
+//
+// "$Id$"
+//
+// GLUT font routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+// The stroked text code was copied from FreeGLUT 2.4.0 which carries
+// the following notice:
+//
+//     Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+//
+
+// (sort of) emulation of Glut's bitmap drawing functions, using fltk3's
+// font stuff.  Not all the fonts match!
+
+#include <config.h>
+#if HAVE_GL
+#  include <fltk3/glut.h>
+
+Fl_Glut_Bitmap_Font glutBitmap9By15 = {fltk3::SCREEN, 15};
+Fl_Glut_Bitmap_Font glutBitmap8By13 = {fltk3::SCREEN, 13};
+Fl_Glut_Bitmap_Font glutBitmapTimesRoman10 = {fltk3::TIMES, 10};
+Fl_Glut_Bitmap_Font glutBitmapTimesRoman24 = {fltk3::TIMES, 24};
+Fl_Glut_Bitmap_Font glutBitmapHelvetica10 = {fltk3::HELVETICA, 10};
+Fl_Glut_Bitmap_Font glutBitmapHelvetica12 = {fltk3::HELVETICA, 12};
+Fl_Glut_Bitmap_Font glutBitmapHelvetica18 = {fltk3::HELVETICA, 18};
+
+void glutBitmapCharacter(void* font, int character) {
+  gl_font(((Fl_Glut_Bitmap_Font *)font)->font,((Fl_Glut_Bitmap_Font *)font)->size);
+  char a[1]; a[0] = character;
+  gl_draw(a,1);
+}
+
+int glutBitmapHeight(void* font) {
+  gl_font(((Fl_Glut_Bitmap_Font *)font)->font,((Fl_Glut_Bitmap_Font *)font)->size);
+  return gl_height();
+}
+
+int glutBitmapLength(void *font, const unsigned char *string) {
+  gl_font(((Fl_Glut_Bitmap_Font *)font)->font,((Fl_Glut_Bitmap_Font *)font)->size);
+  const char *s = (const char*)string;
+  return int(gl_width(s)+.5);
+}
+
+void glutBitmapString(void *font, const unsigned char *string) {
+  gl_font(((Fl_Glut_Bitmap_Font *)font)->font,((Fl_Glut_Bitmap_Font *)font)->size);
+  const char *s = (const char*)string;
+  gl_draw(s);
+}
+
+int glutBitmapWidth(void* font, int character) {
+  gl_font(((Fl_Glut_Bitmap_Font *)font)->font,((Fl_Glut_Bitmap_Font *)font)->size);
+  return int(gl_width(character)+.5);
+}
+
+
+/*
+ * Draw a stroke character
+ */
+void glutStrokeCharacter(void* fontID, int character) {
+  const Fl_Glut_StrokeChar *schar;
+  const Fl_Glut_StrokeStrip *strip;
+  int i, j;
+  Fl_Glut_StrokeFont* font = (Fl_Glut_StrokeFont *)fontID;
+
+  if (character < 0 || character >= font->Quantity) return;
+
+  schar = font->Characters[character];
+  if (!schar) return;
+
+  strip = schar->Strips;
+  
+  for (i = 0; i < schar->Number; i++, strip++)
+  {
+    glBegin(GL_LINE_STRIP);
+    for (j = 0; j < strip->Number; j++)
+      glVertex2f(strip->Vertices[j].X, strip->Vertices[j].Y);
+    glEnd();
+  }
+
+  glTranslatef(schar->Right, 0.0, 0.0);
+}
+
+void glutStrokeString(void* fontID, const unsigned char *string) {
+  unsigned char c;
+  int i, j;
+  float length = 0.0;
+  Fl_Glut_StrokeFont* font = (Fl_Glut_StrokeFont *)fontID;
+
+  if (!string || ! *string) return;
+  
+ /*
+  * Step through the string, drawing each character.
+  * A newline will simply translate the next character's insertion
+  * point back to the start of the line and down one line.
+  */
+  while ((c = *string++) != 0) {
+    if (c < font->Quantity) {
+      if (c == '\n') {
+	glTranslatef(-length, -(float)(font->Height), 0.0);
+	length = 0.0;
+      } else  {
+        /* Not an EOL, draw the bitmap character */
+	const Fl_Glut_StrokeChar *schar = font->Characters[c];
+	if (schar) {
+	  const Fl_Glut_StrokeStrip *strip = schar->Strips;
+
+	  for (i = 0; i < schar->Number; i++, strip++) {
+	    glBegin(GL_LINE_STRIP);
+	    for (j = 0; j < strip->Number; j++)
+	      glVertex2f(strip->Vertices[j].X, strip->Vertices[j].Y);
+	    glEnd();
+	  }
+
+	  length += schar->Right;
+	  glTranslatef(schar->Right, 0.0, 0.0);
+	}
+      }
+    }
+  }
+}
+
+/*
+ * Return the width in pixels of a stroke character
+ */
+int glutStrokeWidth( void* fontID, int character )
+{
+  const Fl_Glut_StrokeChar *schar;
+  Fl_Glut_StrokeFont* font = (Fl_Glut_StrokeFont *)fontID;
+  if (character < 0 || character >= font->Quantity) return 0;
+  schar = font->Characters[ character ];
+
+  return schar ? (int)(schar->Right + 0.5) : 0;
+}
+
+/*
+ * Return the width of a string drawn using a stroke font
+ */
+int glutStrokeLength(void* fontID, const unsigned char* string) {
+  unsigned char c;
+  float length = 0.0;
+  float this_line_length = 0.0;
+  Fl_Glut_StrokeFont* font = (Fl_Glut_StrokeFont *)fontID;
+
+  if (!string || ! *string) return 0;
+
+  while ((c = *string++) != 0) {
+    if (c < font->Quantity) {
+      if (c == '\n') {
+        /* EOL; reset the length of this line */
+	if (length < this_line_length) length = this_line_length;
+	this_line_length = 0.0;
+      } else {
+        /* Not an EOL, increment the length of this line */
+	const Fl_Glut_StrokeChar *schar = font->Characters[c];
+	if (schar) this_line_length += schar->Right;
+      }
+    }
+  }
+
+  if (length < this_line_length) length = this_line_length;
+
+  return (int)(length + 0.5);
+}
+
+/*
+ * Returns the height of a stroke font
+ */
+GLfloat glutStrokeHeight(void* fontID) {
+  Fl_Glut_StrokeFont* font = (Fl_Glut_StrokeFont *)fontID;
+  return font->Height;
+}
+
+#endif // HAVE_GL
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/glut_font.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/mediumarrow.h
===================================================================
--- branches/branch-3.0/src/core/mediumarrow.h	                        (rev 0)
+++ branches/branch-3.0/src/core/mediumarrow.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define mediumarrow_width 16
+#define mediumarrow_height 16
+static unsigned char mediumarrow_bits[] = {
+   0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0xfc, 0x3f, 0x78, 0x00,
+   0x70, 0x00, 0x60, 0x02, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0xfc, 0x3f,
+   0x00, 0x1e, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x02};


Property changes on: branches/branch-3.0/src/core/mediumarrow.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/new.xbm
===================================================================
--- branches/branch-3.0/src/core/new.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/new.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define new_width 16
+#define new_height 16
+static unsigned char new_bits[] = {
+   0x00, 0x00, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x01, 0xfe, 0x01, 0x80,
+   0x31, 0x80, 0x31, 0x80, 0xfd, 0x80, 0xfd, 0x80, 0x31, 0x80, 0x31, 0x80,
+   0x01, 0x80, 0x01, 0x80, 0xff, 0xff, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/new.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/ns.xbm
===================================================================
--- branches/branch-3.0/src/core/ns.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/ns.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,8 @@
+#define ns_width 16
+#define ns_height 16
+#define ns_x_hot 8
+#define ns_y_hot 8
+static unsigned char ns_bits[] = {
+   0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0x80, 0x01, 0x80, 0x01,
+   0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
+   0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/ns.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/ns_mask.xbm
===================================================================
--- branches/branch-3.0/src/core/ns_mask.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/ns_mask.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,8 @@
+#define ns_mask_width 16
+#define ns_mask_height 16
+#define ns_mask_x_hot 8
+#define ns_mask_y_hot 8
+static unsigned char ns_mask_bits[] = {
+   0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0xf0, 0x0f, 0xc0, 0x03,
+   0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f,
+   0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};


Property changes on: branches/branch-3.0/src/core/ns_mask.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/numericsort.cxx
===================================================================
--- branches/branch-3.0/src/core/numericsort.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/numericsort.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,110 @@
+/*
+ * "$Id$"
+ *
+ * Numeric sorting routine for the Fast Light Tool Kit (FLTK).
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/* My own scandir sorting function, useful for the film industry where
+   we have many files with numbers in their names: */
+
+#include <config.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#if !defined(WIN32) || defined(__CYGWIN__)
+#  ifdef HAVE_DIRENT_H
+#    include <dirent.h>
+#  else
+#    define dirent direct
+#    if HAVE_SYS_NDIR_H
+#      include <sys/ndir.h>
+#    endif /* HAVE_SYS_NDIR_H */
+#    if HAVE_SYS_DIR_H
+#      include <sys/dir.h>
+#    endif /* HAVE_SYS_DIR_H */
+#    if HAVE_NDIR_H
+#      include <ndir.h>
+#    endif /* HAVE_NDIR_H */
+#  endif /* HAVE_DIRENT_H */
+#endif /* !WIN32 || __CYGWIN__ */
+#include <fltk3/filename.h>
+
+/*
+ * 'numericsort()' - Compare two directory entries, possibly with
+ *                   a case-insensitive comparison...
+ */
+
+static int pNumericsort(struct dirent **A, struct dirent **B, int cs) {
+  const char* a = (*A)->d_name;
+  const char* b = (*B)->d_name;
+  int ret = 0;
+  for (;;) {
+    if (isdigit(*a & 255) && isdigit(*b & 255)) {
+      int diff,magdiff;
+      while (*a == '0') a++;
+      while (*b == '0') b++;
+      while (isdigit(*a & 255) && *a == *b) {a++; b++;}
+      diff = (isdigit(*a & 255) && isdigit(*b & 255)) ? *a - *b : 0;
+      magdiff = 0;
+      while (isdigit(*a & 255)) {magdiff++; a++;}
+      while (isdigit(*b & 255)) {magdiff--; b++;}
+      if (magdiff) {ret = magdiff; break;} /* compare # of significant digits*/
+      if (diff) {ret = diff; break;}	/* compare first non-zero digit */
+    } else {
+      if (cs) {
+      	/* compare case-sensitive */
+	if ((ret = *a-*b)) break;
+      } else {
+	/* compare case-insensitve */
+	if ((ret = tolower(*a & 255)-tolower(*b & 255))) break;
+      }
+
+      if (!*a) break;
+      a++; b++;
+    }
+  }
+  if (!ret) return 0;
+  else return (ret < 0) ? -1 : 1;
+}
+
+/*
+ * 'fltk3::casenumericsort()' - Compare directory entries with case-sensitivity.
+ */
+
+int fltk3::casenumericsort(struct dirent **A, struct dirent **B) {
+  return pNumericsort(A, B, 0);
+}
+
+/*
+ * 'fltk3::numericsort()' - Compare directory entries with case-sensitivity.
+ */
+
+int fltk3::numericsort(struct dirent **A, struct dirent **B) {
+  return pNumericsort(A, B, 1);
+}
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/numericsort.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/print_panel.cxx
===================================================================
--- branches/branch-3.0/src/core/print_panel.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/print_panel.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,597 @@
+//
+// "$Id$"
+//
+// Print panel for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//
+// This file is "work in progress".  The main parts have been copied
+// from fluid's print_panel{.fl|.h|.cxx} and hand-edited to produce
+// a working version w/o global variables.  The intention is to move
+// all static variables into an own class, and to name this class
+// Fl_Printer_Chooser or similar...
+//
+// Todo:
+//
+//   -	Currently preferences can't be saved, and there are options that
+//	are not yet used for printing.
+//   -	This file can only be used as an include file in Fl_PS_Printer.cxx
+//   -	The use of static variables should be avoided.
+//   -	Probably much more ...
+//
+
+#include "print_panel.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "../src/flstring.h"
+#include <fltk3/Preferences.h>
+#include <fltk3/IntInput.h>
+
+static fltk3::Preferences print_prefs(fltk3::Preferences::USER, "fltk.org", "printers");
+static fltk3::DoubleWindow *print_panel=(fltk3::DoubleWindow *)0;
+static fltk3::Group *print_panel_controls=(fltk3::Group *)0;
+static fltk3::Choice *print_choice=(fltk3::Choice *)0;
+static fltk3::Button *print_properties=(fltk3::Button *)0;
+static fltk3::Box *print_status=(fltk3::Box *)0;
+static fltk3::RoundButton *print_all=(fltk3::RoundButton *)0;
+static fltk3::RoundButton *print_pages=(fltk3::RoundButton *)0;
+static fltk3::RoundButton *print_selection=(fltk3::RoundButton *)0;
+static fltk3::CheckButton *print_collate_button=(fltk3::CheckButton *)0;
+static fltk3::Group *print_collate_group[2]={(fltk3::Group *)0};
+static fltk3::Progress *print_progress=(fltk3::Progress *)0;
+static fltk3::DoubleWindow *print_properties_panel=(fltk3::DoubleWindow *)0;
+static fltk3::Choice *print_page_size=(fltk3::Choice *)0;
+static fltk3::IntInput *print_from=(fltk3::IntInput *)0;
+static fltk3::IntInput *print_to=(fltk3::IntInput *)0;
+static fltk3::Spinner *print_copies=(fltk3::Spinner *)0;
+
+static int print_start = 0;	// 1 if print_okay has been clicked
+
+static void cb_print_choice(fltk3::Choice*, void*) {
+  print_update_status();
+}
+
+static void cb_print_properties(fltk3::Button*, void*) {
+  print_properties_panel->show();
+}
+
+static void cb_print_all(fltk3::RoundButton*, void*) {
+  print_from->deactivate();
+  print_to->deactivate();
+}
+
+static void cb_print_pages(fltk3::RoundButton*, void*) {
+  print_from->activate();
+  print_to->activate();
+}
+
+static void cb_print_selection(fltk3::RoundButton*, void*) {
+  print_from->deactivate();
+  print_to->deactivate();
+}
+
+static void cb_print_copies(fltk3::Spinner*, void*) {
+  if (print_copies->value() == 1) {
+    print_collate_button->deactivate();
+    print_collate_group[0]->deactivate();
+    print_collate_group[1]->deactivate();
+  } else {
+/*    print_collate_button->activate(); // TODO: manage collate options
+    print_collate_group[0]->activate();
+    print_collate_group[1]->activate(); */
+  };
+}
+
+static void cb_print_collate_button(fltk3::CheckButton*, void*) {
+  int i = print_collate_button->value() != 0;
+  print_collate_group[i]->show();
+  print_collate_group[1 - i]->hide();
+}
+
+static void cb_Cancel(fltk3::Button*, void*) {
+  print_start = 0;
+  print_panel->hide();
+}
+
+static void cb_print_properties_panel(fltk3::DoubleWindow*, void*) {
+  print_properties_panel->hide();
+  print_update_status();
+}
+
+static fltk3::MenuItem menu_print_page_size[] = {
+ {"Letter", 0,  0, 0, 0, fltk3::NORMAL_LABEL, 0, 14, 0},
+ {"A4", 0,  0, 0, 0, fltk3::NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0}
+};
+
+#include <fltk3/Pixmap.h>
+static const char *idata_print_color[] = {
+"24 24 17 1",
+" \tc None",
+".\tc #FFFF00",
+"+\tc #C8FF00",
+"@\tc #00FF00",
+"#\tc #FFC800",
+"$\tc #FF0000",
+"%\tc #00FFFF",
+"&\tc #000000",
+"*\tc #FF00FF",
+"=\tc #00FFC8",
+"-\tc #FF00C8",
+";\tc #00C800",
+">\tc #C80000",
+",\tc #0000C8",
+"\'\tc #0000FF",
+")\tc #00C8FF",
+"!\tc #C800FF",
+"         ......         ",
+"       ..........       ",
+"      ............      ",
+"     ..............     ",
+"     ..............     ",
+"    ................    ",
+"    ................    ",
+"    ................    ",
+"    +@@@@@@+#$$$$$$#    ",
+"   %@@@@@@@&&$$$$$$$*   ",
+"  %%@@@@@@&&&&$$$$$$**  ",
+" %%%=@@@@&&&&&&$$$$-*** ",
+" %%%%@@@;&&&&&&>$$$**** ",
+"%%%%%%@@&&&&&&&&$$******",
+"%%%%%%%@&&&&&&&&$*******",
+"%%%%%%%%,&&&&&&,********",
+"%%%%%%%%\'\'\'\'\'\'\'\'********",
+"%%%%%%%%\'\'\'\'\'\'\'\'********",
+"%%%%%%%%\'\'\'\'\'\'\'\'********",
+" %%%%%%%)\'\'\'\'\'\'!******* ",
+" %%%%%%%%\'\'\'\'\'\'******** ",
+"  %%%%%%%%\'\'\'\'********  ",
+"   %%%%%%%%\'\'********   ",
+"     %%%%%%  ******     "
+};
+static fltk3::Pixmap image_print_color(idata_print_color);
+
+static const char *idata_print_gray[] = {
+"24 24 17 1",
+" \tc None",
+".\tc #E3E3E3",
+"+\tc #D2D2D2",
+"@\tc #969696",
+"#\tc #C2C2C2",
+"$\tc #4C4C4C",
+"%\tc #B2B2B2",
+"&\tc #000000",
+"*\tc #696969",
+"=\tc #ACACAC",
+"-\tc #626262",
+";\tc #767676",
+">\tc #3C3C3C",
+",\tc #161616",
+"\'\tc #1C1C1C",
+")\tc #929292",
+"!\tc #585858",
+"         ......         ",
+"       ..........       ",
+"      ............      ",
+"     ..............     ",
+"     ..............     ",
+"    ................    ",
+"    ................    ",
+"    ................    ",
+"    +@@@@@@+#$$$$$$#    ",
+"   %@@@@@@@&&$$$$$$$*   ",
+"  %%@@@@@@&&&&$$$$$$**  ",
+" %%%=@@@@&&&&&&$$$$-*** ",
+" %%%%@@@;&&&&&&>$$$**** ",
+"%%%%%%@@&&&&&&&&$$******",
+"%%%%%%%@&&&&&&&&$*******",
+"%%%%%%%%,&&&&&&,********",
+"%%%%%%%%\'\'\'\'\'\'\'\'********",
+"%%%%%%%%\'\'\'\'\'\'\'\'********",
+"%%%%%%%%\'\'\'\'\'\'\'\'********",
+" %%%%%%%)\'\'\'\'\'\'!******* ",
+" %%%%%%%%\'\'\'\'\'\'******** ",
+"  %%%%%%%%\'\'\'\'********  ",
+"   %%%%%%%%\'\'********   ",
+"     %%%%%%  ******     "
+};
+static fltk3::Pixmap image_print_gray(idata_print_gray);
+
+static fltk3::Button *print_output_mode[4]={(fltk3::Button *)0};
+
+static void cb_Save(fltk3::ReturnButton*, void*) {
+  print_properties_panel->hide();
+
+  char name[1024];
+  int val;
+  const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data();
+
+  snprintf(name, sizeof(name), "%s/page_size", printer);
+  print_prefs.set(name, print_page_size->value());
+
+  snprintf(name, sizeof(name), "%s/output_mode", printer);
+  for (val = 0; val < 4; val ++) {
+    if (print_output_mode[val]->value()) break;
+  }
+  print_prefs.set(name, val);
+}
+
+static void cb_Cancel1(fltk3::Button*, void*) {
+  print_properties_panel->hide();
+  print_update_status();
+}
+
+static void cb_Use(fltk3::Button*, void*) {
+  print_properties_panel->hide();
+}
+
+fltk3::DoubleWindow* make_print_panel() {
+  { print_panel = new fltk3::DoubleWindow(465, 235, fltk3::Printer::dialog_title);
+    { print_panel_controls = new fltk3::Group(10, 10, 447, 216);
+      { print_choice = new fltk3::Choice(133, 10, 181, 25, fltk3::Printer::dialog_printer);
+        print_choice->down_box(fltk3::BORDER_BOX);
+        print_choice->labelfont(1);
+        print_choice->callback((fltk3::Callback*)cb_print_choice);
+        print_choice->when(fltk3::WHEN_CHANGED);
+      } // fltk3::Choice* print_choice
+      { print_properties = new fltk3::Button(314, 10, 115, 25, fltk3::Printer::dialog_properties);
+        print_properties->callback((fltk3::Callback*)cb_print_properties);
+      } // fltk3::Button* print_properties
+      { print_status = new fltk3::Box(0, 41, print_panel_controls->w(), 17, "printer/job status");
+        print_status->align(fltk3::Align(fltk3::ALIGN_CLIP|fltk3::ALIGN_INSIDE|fltk3::ALIGN_LEFT));
+      } // fltk3::Box* print_status
+      { fltk3::Group* o = new fltk3::Group(10, 86, 227, 105, fltk3::Printer::dialog_range);
+        o->box(fltk3::THIN_DOWN_BOX);
+        o->labelfont(1);
+        o->align(fltk3::Align(fltk3::ALIGN_TOP_LEFT));
+        { print_all = new fltk3::RoundButton(20, 96, 38, 25, fltk3::Printer::dialog_all);
+          print_all->type(102);
+          print_all->down_box(fltk3::ROUND_DOWN_BOX);
+          print_all->value(1);
+          print_all->callback((fltk3::Callback*)cb_print_all);
+        } // fltk3::RoundButton* print_all
+        { print_pages = new fltk3::RoundButton(20, 126, 64, 25, fltk3::Printer::dialog_pages);
+          print_pages->type(102);
+          print_pages->down_box(fltk3::ROUND_DOWN_BOX);
+          print_pages->callback((fltk3::Callback*)cb_print_pages);
+        } // fltk3::RoundButton* print_pages
+        { print_selection = new fltk3::RoundButton(20, 156, 82, 25, "Selection");
+          print_selection->type(102);
+          print_selection->down_box(fltk3::ROUND_DOWN_BOX);
+          print_selection->callback((fltk3::Callback*)cb_print_selection);
+        } // fltk3::RoundButton* print_selection
+        { print_from = new fltk3::IntInput(136, 126, 28, 25, fltk3::Printer::dialog_from);
+          print_from->type(2);
+          print_from->textfont(4);
+          print_from->deactivate();
+        } // fltk3::IntInput* print_from
+        { print_to = new fltk3::IntInput(199, 126, 28, 25, fltk3::Printer::dialog_to);
+          print_to->type(2);
+          print_to->textfont(4);
+          print_to->deactivate();
+        } // fltk3::IntInput* print_to
+        o->end();
+      } // fltk3::Group* o
+      { fltk3::Group* o = new fltk3::Group(247, 86, 210, 105, fltk3::Printer::dialog_copies);
+        o->box(fltk3::THIN_DOWN_BOX);
+        o->labelfont(1);
+        o->align(fltk3::Align(fltk3::ALIGN_TOP_LEFT));
+        { print_copies = new fltk3::Spinner(321, 96, 45, 25, fltk3::Printer::dialog_copyNo);
+          print_copies->callback((fltk3::Callback*)cb_print_copies);
+          print_copies->when(fltk3::WHEN_CHANGED);
+        } // fltk3::Spinner* print_copies
+        { print_collate_button = new fltk3::CheckButton(376, 96, 64, 25, "Collate");
+          print_collate_button->down_box(fltk3::DOWN_BOX);
+          print_collate_button->callback((fltk3::Callback*)cb_print_collate_button);
+          print_collate_button->when(fltk3::WHEN_CHANGED);
+          print_collate_button->deactivate();
+        } // fltk3::CheckButton* print_collate_button
+        { print_collate_group[0] = new fltk3::Group(257, 131, 191, 50);
+          print_collate_group[0]->deactivate();
+          { fltk3::Box* o = new fltk3::Box(287, 141, 30, 40, "1");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(272, 136, 30, 40, "1");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(257, 131, 30, 40, "1");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(352, 141, 30, 40, "2");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(337, 136, 30, 40, "2");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(322, 131, 30, 40, "2");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(417, 141, 30, 40, "3");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(402, 136, 30, 40, "3");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(387, 131, 30, 40, "3");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+            o->deactivate();
+          } // fltk3::Box* o
+          print_collate_group[0]->end();
+        } // fltk3::Group* print_collate_group[0]
+        { print_collate_group[1] = new fltk3::Group(257, 131, 191, 50);
+          print_collate_group[1]->hide();
+          print_collate_group[1]->deactivate();
+          { fltk3::Box* o = new fltk3::Box(287, 141, 30, 40, "3");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(272, 136, 30, 40, "2");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(257, 131, 30, 40, "1");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(352, 141, 30, 40, "3");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(337, 136, 30, 40, "2");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(322, 131, 30, 40, "1");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(417, 141, 30, 40, "3");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(402, 136, 30, 40, "2");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          { fltk3::Box* o = new fltk3::Box(387, 131, 30, 40, "1");
+            o->box(fltk3::BORDER_BOX);
+            o->color(fltk3::BACKGROUND2_COLOR);
+            o->labelsize(11);
+            o->align(fltk3::Align(fltk3::ALIGN_BOTTOM_RIGHT|fltk3::ALIGN_INSIDE));
+          } // fltk3::Box* o
+          print_collate_group[1]->end();
+        } // fltk3::Group* print_collate_group[1]
+        o->end();
+      } // fltk3::Group* o
+      { fltk3::ReturnButton* o = new fltk3::ReturnButton(279, 201, 100, 25, fltk3::Printer::dialog_print_button);
+        o->callback((fltk3::Callback*)print_cb);
+      } // fltk3::ReturnButton* o
+      { fltk3::Button* o = new fltk3::Button(389, 201, 68, 25, fltk3::Printer::dialog_cancel_button);
+        o->callback((fltk3::Callback*)cb_Cancel);
+      } // fltk3::Button* o
+      print_panel_controls->end();
+    } // fltk3::Group* print_panel_controls
+    { print_progress = new fltk3::Progress(10, 203, 289, 21);
+      print_progress->selection_color((fltk3::Color)4);
+      print_progress->hide();
+    } // fltk3::Progress* print_progress
+    print_panel->set_modal();
+    print_panel->end();
+  } // fltk3::DoubleWindow* print_panel
+  { print_properties_panel = new fltk3::DoubleWindow(290, 130, fltk3::Printer::property_title);
+    print_properties_panel->callback((fltk3::Callback*)cb_print_properties_panel);
+    { print_page_size = new fltk3::Choice(150, 10, 80, 25, fltk3::Printer::property_pagesize);
+      print_page_size->down_box(fltk3::BORDER_BOX);
+      print_page_size->labelfont(fltk3::HELVETICA);
+      print_page_size->menu(menu_print_page_size);
+    } // fltk3::Choice* print_page_size
+    { fltk3::Group* o = new fltk3::Group(110, 45, 170, 40, fltk3::Printer::property_mode);
+      o->labelfont(fltk3::HELVETICA);
+      o->align(fltk3::Align(fltk3::ALIGN_LEFT));
+      { print_output_mode[0] = new fltk3::Button(110, 45, 30, 40);
+        print_output_mode[0]->type(102);
+        print_output_mode[0]->box(fltk3::BORDER_BOX);
+        print_output_mode[0]->down_box(fltk3::BORDER_BOX);
+        print_output_mode[0]->value(1);
+        print_output_mode[0]->color(fltk3::BACKGROUND2_COLOR);
+        print_output_mode[0]->selection_color(fltk3::FOREGROUND_COLOR);
+        print_output_mode[0]->image(image_print_color);
+      } // fltk3::Button* print_output_mode[0]
+      { print_output_mode[1] = new fltk3::Button(150, 50, 40, 30);
+        print_output_mode[1]->type(102);
+        print_output_mode[1]->box(fltk3::BORDER_BOX);
+        print_output_mode[1]->down_box(fltk3::BORDER_BOX);
+        print_output_mode[1]->color(fltk3::BACKGROUND2_COLOR);
+        print_output_mode[1]->selection_color(fltk3::FOREGROUND_COLOR);
+        print_output_mode[1]->image(image_print_color);
+      } // fltk3::Button* print_output_mode[1]
+      { print_output_mode[2] = new fltk3::Button(200, 45, 30, 40);
+        print_output_mode[2]->type(102);
+        print_output_mode[2]->box(fltk3::BORDER_BOX);
+        print_output_mode[2]->down_box(fltk3::BORDER_BOX);
+        print_output_mode[2]->color(fltk3::BACKGROUND2_COLOR);
+        print_output_mode[2]->selection_color(fltk3::FOREGROUND_COLOR);
+        print_output_mode[2]->image(image_print_gray);
+      } // fltk3::Button* print_output_mode[2]
+      { print_output_mode[3] = new fltk3::Button(240, 50, 40, 30);
+        print_output_mode[3]->type(102);
+        print_output_mode[3]->box(fltk3::BORDER_BOX);
+        print_output_mode[3]->down_box(fltk3::BORDER_BOX);
+        print_output_mode[3]->color(fltk3::BACKGROUND2_COLOR);
+        print_output_mode[3]->selection_color(fltk3::FOREGROUND_COLOR);
+        print_output_mode[3]->image(image_print_gray);
+      } // fltk3::Button* print_output_mode[3]
+      o->end();
+    } // fltk3::Group* o
+    { fltk3::ReturnButton* o = new fltk3::ReturnButton(93, 95, 99, 25, fltk3::Printer::property_save);
+      o->callback((fltk3::Callback*)cb_Save);
+    } // fltk3::ReturnButton* o
+    { fltk3::Button* o = new fltk3::Button(202, 95, 78, 25, fltk3::Printer::property_cancel);
+      o->callback((fltk3::Callback*)cb_Cancel1);
+    } // fltk3::Button* o
+    { fltk3::Button* o = new fltk3::Button(10, 95, 73, 25, fltk3::Printer::property_use);
+      o->callback((fltk3::Callback*)cb_Use);
+    } // fltk3::Button* o
+    print_properties_panel->set_modal();
+    print_properties_panel->end();
+  } // fltk3::DoubleWindow* print_properties_panel
+  return print_properties_panel;
+}
+
+void print_cb(fltk3::ReturnButton *, void *) {
+  print_start = 1;
+  print_panel->hide();
+}
+
+void print_load() {
+  FILE *lpstat;
+  char line[1024], name[1024], *nptr, qname[2048], *qptr, defname[1024];
+  int i;
+
+  if (print_choice->size() > 1) {
+    for (i = 1; print_choice->text(i); i ++) {
+      free(print_choice->menu()[i].user_data());
+    }
+  }
+
+  print_choice->clear();
+  print_choice->add(fltk3::Printer::dialog_print_to_file, 0, 0, 0, fltk3::MENU_DIVIDER);
+  print_choice->value(0);
+  
+  print_start = 0;
+
+  defname[0] = '\0';
+
+  if ((lpstat = popen("LC_MESSAGES=C LANG=C lpstat -p -d", "r")) != NULL) {
+    while (fgets(line, sizeof(line), lpstat)) {
+      if (!strncmp(line, "printer ", 8) &&
+          sscanf(line + 8, "%s", name) == 1) {
+        for (nptr = name, qptr = qname; *nptr; *qptr++ = *nptr++) {
+          if (*nptr == '/') *qptr++ = '\\';
+        }
+        *qptr = '\0';
+
+        print_choice->add(qname, 0, 0, (void *)strdup(name), 0);
+      } else if (!strncmp(line, "system default destination: ", 28)) {
+        if (sscanf(line + 28, "%s", defname) != 1) defname[0] = '\0';
+      }
+    }
+    pclose(lpstat);
+  }
+
+  if (defname[0]) {
+    for (i = 1; print_choice->text(i); i ++) {
+      if (!strcmp((char *)print_choice->menu()[i].user_data(), defname)) {
+        print_choice->value(i);
+        break;
+      }
+    }
+  } else if (print_choice->size() > 2) print_choice->value(1);
+
+  print_update_status();
+
+} // print_load()
+
+void print_update_status() {
+  FILE *lpstat;
+  char command[1024];
+  static char status[1024];
+  const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data();
+
+  if (print_choice->value()) {
+    snprintf(command, sizeof(command), "lpstat -p '%s'", printer);
+    if ((lpstat = popen(command, "r")) != NULL) {
+      if (fgets(status, sizeof(status), lpstat)==0) { /* ignore */ }
+      pclose(lpstat);
+    } else strcpy(status, "printer status unavailable");
+  } else status[0] = '\0';
+
+  print_status->label(status);
+
+  char name[1024];
+  int val;
+
+  snprintf(name, sizeof(name), "%s/page_size", printer == NULL ? "" : printer);
+  print_prefs.get(name, val, 1);
+  print_page_size->value(val);
+
+  snprintf(name, sizeof(name), "%s/output_mode", printer == NULL ? "" : printer);
+  print_prefs.get(name, val, 0);
+  print_output_mode[val]->setonly();
+}
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/print_panel.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/print_panel.h
===================================================================
--- branches/branch-3.0/src/core/print_panel.h	                        (rev 0)
+++ branches/branch-3.0/src/core/print_panel.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,55 @@
+//
+// "$Id$"
+//
+// Print panel for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+//
+// This is a temporary file.  It is only for development and will
+// probably be removed later.
+//
+
+#ifndef print_panel_h
+#define print_panel_h
+#include <fltk3/run.h>
+#include <fltk3/DoubleWindow.h>
+#include <fltk3/Group.h>
+#include <fltk3/Choice.h>
+#include <fltk3/Button.h>
+#include <fltk3/Box.h>
+#include <fltk3/RoundButton.h>
+#include <fltk3/Input.h>
+#include <fltk3/Spinner.h>
+#include <fltk3/CheckButton.h>
+#include <fltk3/ReturnButton.h>
+#include <fltk3/Progress.h>
+static fltk3::DoubleWindow* make_print_panel();
+static void print_cb(fltk3::ReturnButton *, void *); 
+static void print_load();
+static void print_update_status();
+#endif
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/print_panel.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/ps_image.cxx
===================================================================
--- branches/branch-3.0/src/core/ps_image.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/ps_image.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,553 @@
+//
+// "$Id: image.cxx 4324 2005-05-09 21:47:22Z rokan $"
+//
+// Postscript image drawing implementation for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// 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.
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+#ifndef FLTK3_DOXYGEN
+
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+
+#include <fltk3/PostScript.h>
+#include <fltk3/run.h>
+#include <fltk3/Pixmap.h>
+#include <fltk3/Bitmap.h>
+ 
+int fltk3::PostScriptGraphicsDriver::alpha_mask(const uchar * data, int w, int h, int D, int LD){
+
+  mask = 0;
+  if ((D/2)*2 != D){ //no mask info
+    return 0;
+  }
+  int xx;
+  int i,j, k, l;
+  LD += w*D;
+  int V255=0;
+  int V0 =0;
+  int V_=0;
+  for (j=0;j<h;j++){
+    for (i=0;i<w;i++)
+      switch(data[j*LD+D*i+D-1]){
+        case 255: V255 = 1; break;
+        case 0: V0 = 1; break;
+        default: V_= 1;
+      }
+    if (V_) break;
+  };
+  if (!V_){
+    if (V0)
+      if (V255){// not true alpha, only masking
+        xx = (w+7)/8;
+        mask = new uchar[h * xx];
+        for (i=0;i<h * xx;i++) mask[i]=0;
+        for (j=0;j<h;j++)
+          for (i=0;i<w;i++)
+            if (data[j*LD+D*i+D-1])
+              mask[j*xx+i/8] |= 1 << (i % 8);
+        mx = w;
+        my = h; //mask imensions
+        return 0;
+      } else {
+        mask=0;
+        return 1; //everything masked
+      }
+    else
+      return 0;
+  }
+
+
+
+  /////   Alpha dither, generating (4*w) * 4 mask area       /////
+  /////         with Floyd-Steinberg error diffusion         /////
+
+  mask = new uchar[((w+1)/2) * h * 4];
+
+  for (i = 0; i<((w+1)/2) * h * 4; i++) mask[i] = 0; //cleaning
+
+
+
+  mx= w*4;
+  my=h*4; // mask dimensions
+
+  xx = (w+1)/2;                //  mask line width in bytes
+
+  short * errors1 = new short [w*4+2]; //  two rows of dither errors
+  short * errors2 = new short [w*4+2]; //  two rows of dither errors
+
+  for (i=0; i<w*4+2; i++) errors2[i] = 0; // cleaning,after first swap will become current
+  for (i=0; i<w*4+2; i++) errors1[i] = 0; // cleaning,after first swap will become current
+
+  short * current = errors1;
+  short * next = errors2;
+  short * swap;
+
+  for (j=0; j<h; j++){
+    for (l=0; l<4; ){           // generating 4 rows of mask lines for 1 RGB line
+      int jj = j*4+l;
+
+      /// mask row index
+      swap = next;
+      next = current;
+      current = swap;
+      *(next+1) = 0;          // must clean the first cell, next are overriden by *1
+      for (i=0; i<w; i++){
+        for (k=0; k<4; k++){   // generating 4 x-pixels for 1 RGB
+          short error, o1, o2, o3;
+          int ii = i*4+k;   // mask cell index
+          short val = data[j*LD+D*i+D-1] + current[1+ii];
+          if (val>127){
+            mask[jj*xx+ii/8]  |= 1 << (ii % 8); //set mask bit
+            error =  val-255;
+          }else
+            error = val;
+
+          ////// error spreading /////
+          if (error >0){
+            next[ii] +=  o1 = (error * 3 + 8)/16;
+            current[ii+2] += o2 = (error * 7 + 8)/16;
+            next[ii+2] = o3 =(error + 8)/16;  // *1 - ok replacing (cleaning)
+          } else {
+            next[ii] += o1 = (error * 3 - 8)/16;
+            current[ii+2] += o2 = (error * 7 - 8)/16;
+            next[ii+2] = o3 = (error - 8)/16;
+          }
+          next[1+ii] += error - o1 - o2 - o3;
+        }
+      }
+      l++;
+
+      ////// backward
+
+      jj = j*4+l;
+      swap = next;
+      next = current;
+      current = swap;
+      *(next+1) = 0;          // must clean the first cell, next are overriden by *1
+
+      for (i = w-1; i >= 0; i--){
+
+        for (k=3; k>=0; k--){   // generating 4 x-pixels for 1 RGB
+          short error, o1, o2, o3;
+
+          int ii = i*4+k;   // mask cell index
+          short val = data[j*LD+D*i+D-1] + current[1+ii];
+          if (val>127){
+
+            mask[jj*xx+ii/8]  |= 1 << (ii % 8); //set mask bit
+            error =  val-255;
+          } else
+            error = val;
+
+          ////// error spreading /////
+          if (error >0){
+            next[ii+2] +=  o1 = (error * 3 + 8)/16;
+            current[ii] += o2 = (error * 7 + 8)/16;
+            next[ii] = o3 =(error + 8)/16;  // *1 - ok replacing (cleaning)
+          } else {
+            next[ii+2] += o1 = (error * 3 - 8)/16;
+
+            current[ii] += o2 = (error * 7 - 8)/16;
+            next[ii] = o3 = (error - 8)/16;
+          }
+          next[1+ii] += error - o1 - o2 - o3;
+        }
+      }
+      l++;
+    }
+  }
+  delete[] errors1;
+  delete[] errors2;
+  return 0;
+}
+
+// bitwise inversion of all 4-bit quantities
+static const unsigned char swapped[16] = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15};
+
+// bitwise inversion of a byte
+static inline uchar swap_byte(const uchar b) {
+  return (swapped[b & 0xF] << 4) | swapped[b >> 4];
+}
+
+
+extern uchar **fl_mask_bitmap;
+
+
+void fltk3::PostScriptGraphicsDriver::draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD) {
+  double x = ix, y = iy, w = iw, h = ih;
+
+  if (D<3){ //mono
+    draw_image_mono(data, ix, iy, iw, ih, D, LD);
+    return;
+  }
+
+
+  int i,j, k;
+
+  fprintf(output,"save\n");
+
+  const char * interpol;
+  if (lang_level_>1){
+    if (interpolate_)
+      interpol="true";
+    else
+      interpol="false";
+    if (mask && lang_level_>2)
+      fprintf(output, "%g %g %g %g %i %i %i %i %s CIM\n", x , y+h , w , -h , iw , ih, mx, my, interpol);
+    else
+      fprintf(output, "%g %g %g %g %i %i %s CII\n", x , y+h , w , -h , iw , ih, interpol);
+  } else
+    fprintf(output , "%g %g %g %g %i %i CI", x , y+h , w , -h , iw , ih);
+
+
+  if (!LD) LD = iw*D;
+  uchar *curmask=mask;
+
+  for (j=0; j<ih;j++){
+    if (mask){
+
+      for (k=0;k<my/ih;k++){
+        for (i=0; i<((mx+7)/8);i++){
+          if (!(i%80)) fprintf(output, "\n");
+          fprintf(output, "%.2x",swap_byte(*curmask));
+          curmask++;
+        }
+        fprintf(output,"\n");
+      }
+    }
+    const uchar *curdata=data+j*LD;
+    for (i=0 ; i<iw ; i++) {
+      uchar r = curdata[0];
+      uchar g =  curdata[1];
+      uchar b =  curdata[2];
+      if (lang_level_<3 && D>3) { //can do  mixing using bg_* colors)
+        unsigned int a2 = curdata[3]; //must be int
+        unsigned int a = 255-a2;
+        r = (a2 * r + bg_r * a)/255;
+        g = (a2 * g + bg_g * a)/255;
+        b = (a2 * b + bg_b * a)/255;
+      }
+      if (!(i%40)) fprintf(output, "\n");
+      fprintf(output, "%.2x%.2x%.2x", r, g, b);
+      curdata +=D;
+    }
+    fprintf(output,"\n");
+
+  }
+
+  fprintf(output," >\nrestore\n" );
+
+
+}
+
+void fltk3::PostScriptGraphicsDriver::draw_image(fltk3::DrawImageCb call, void *data, int ix, int iy, int iw, int ih, int D) {
+  double x = ix, y = iy, w = iw, h = ih;
+
+  int level2_mask = 0;
+  fprintf(output,"save\n");
+  int i,j,k;
+  const char * interpol;
+  if (lang_level_ > 1) {
+    if (interpolate_) interpol="true";
+    else interpol="false";
+    if (mask && lang_level_ > 2) {
+      fprintf(output, "%g %g %g %g %i %i %i %i %s CIM\n", x , y+h , w , -h , iw , ih, mx, my, interpol);
+      }
+    else if (mask && lang_level_ == 2) {
+      level2_mask = 1; // use method for drawing masked color image with PostScript level 2
+      fprintf(output, " %g %g %g %g %d %d pixmap_plot\n", x, y, w, h, iw, ih);
+    }
+    else {
+      fprintf(output, "%g %g %g %g %i %i %s CII\n", x , y+h , w , -h , iw , ih, interpol);
+      }
+  } else {
+    fprintf(output , "%g %g %g %g %i %i CI", x , y+h , w , -h , iw , ih);
+    }
+
+  int LD=iw*D;
+  uchar *rgbdata=new uchar[LD];
+  uchar *curmask=mask;
+
+  if (level2_mask) {
+    for (j = ih - 1; j >= 0; j--) { // output full image data
+      call(data, 0, j, iw, rgbdata);
+      uchar *curdata = rgbdata;
+      for (i=0 ; i<iw ; i++) {
+	if (!(i%20)) fputs("\n", output);
+	fprintf(output, "%.2x%.2x%.2x", curdata[0], curdata[1], curdata[2]);
+	curdata += D;
+	}
+      fputs("\n", output);
+      }
+    fputs(">\n", output);
+    for (j = ih - 1; j >= 0; j--) { // output mask data
+      curmask = mask + j * (my/ih) * ((mx+7)/8);
+      for (k=0; k < my/ih; k++) {
+	for (i=0; i < ((mx+7)/8); i++) {
+	  if (!(i%40)) fputs("\n", output);
+	  fprintf(output, "%.2x",swap_byte(*curmask));
+	  curmask++;
+	}
+	fputs("\n", output);
+      }
+    }
+    fputs(">\n", output);
+  }
+  else {
+    for (j=0; j<ih;j++) {
+      if (mask && lang_level_ > 2) {  // InterleaveType 2 mask data
+	for (k=0; k<my/ih;k++) { //for alpha pseudo-masking
+	  for (i=0; i<((mx+7)/8);i++) {
+	    if (!(i%40)) fputs("\n", output);
+	    fprintf(output, "%.2x",swap_byte(*curmask));
+	    curmask++;
+	  }
+	  fprintf(output,"\n");
+	}
+      }
+      call(data,0,j,iw,rgbdata);
+      uchar *curdata=rgbdata;
+      for (i=0 ; i<iw ; i++) {
+	uchar r = curdata[0];
+	uchar g =  curdata[1];
+	uchar b =  curdata[2];
+
+	if (!(i%40)) 	fputs("\n", output);
+	fprintf(output, "%.2x%.2x%.2x", r, g, b);
+
+	curdata +=D;
+      }
+      fputs("\n", output);
+
+    }
+    fputs(">\n", output);
+    }
+
+  fprintf(output,"restore\n");
+  delete[] rgbdata;
+}
+
+void fltk3::PostScriptGraphicsDriver::draw_image_mono(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD) {
+  double x = ix, y = iy, w = iw, h = ih;
+
+  fprintf(output,"save\n");
+
+  int i,j, k;
+
+  const char * interpol;
+  if (lang_level_>1){
+    if (interpolate_)
+      interpol="true";
+    else
+      interpol="false";
+    if (mask && lang_level_>2)
+      fprintf(output, "%g %g %g %g %i %i %i %i %s GIM\n", x , y+h , w , -h , iw , ih, mx, my, interpol);
+    else
+      fprintf(output, "%g %g %g %g %i %i %s GII\n", x , y+h , w , -h , iw , ih, interpol);
+  }else
+    fprintf(output , "%g %g %g %g %i %i GI", x , y+h , w , -h , iw , ih);
+
+
+  if (!LD) LD = iw*D;
+
+
+  int bg = (bg_r + bg_g + bg_b)/3;
+
+  uchar *curmask=mask;
+  for (j=0; j<ih;j++){
+    if (mask){
+      for (k=0;k<my/ih;k++){
+        for (i=0; i<((mx+7)/8);i++){
+          if (!(i%80)) fprintf(output, "\n");
+          fprintf(output, "%.2x",swap_byte(*curmask));
+          curmask++;
+        }
+        fprintf(output,"\n");
+      }
+    }
+    const uchar *curdata=data+j*LD;
+    for (i=0 ; i<iw ; i++) {
+      if (!(i%80)) fprintf(output, "\n");
+      uchar r = curdata[0];
+      if (lang_level_<3 && D>1) { //can do  mixing
+
+        unsigned int a2 = curdata[1]; //must be int
+        unsigned int a = 255-a2;
+        r = (a2 * r + bg * a)/255;
+      }
+      if (!(i%120)) fprintf(output, "\n");
+      fprintf(output, "%.2x", r);
+      curdata +=D;
+    }
+    fprintf(output,"\n");
+
+  }
+
+  fprintf(output," >\nrestore\n" );
+
+}
+
+
+
+void fltk3::PostScriptGraphicsDriver::draw_image_mono(fltk3::DrawImageCb call, void *data, int ix, int iy, int iw, int ih, int D) {
+  double x = ix, y = iy, w = iw, h = ih;
+
+  fprintf(output,"save\n");
+  int i,j,k;
+  const char * interpol;
+  if (lang_level_>1){
+    if (interpolate_) interpol="true";
+    else interpol="false";
+    if (mask && lang_level_>2)
+      fprintf(output, "%g %g %g %g %i %i %i %i %s GIM\n", x , y+h , w , -h , iw , ih, mx, my, interpol);
+    else
+      fprintf(output, "%g %g %g %g %i %i %s GII\n", x , y+h , w , -h , iw , ih, interpol);
+  } else
+    fprintf(output , "%g %g %g %g %i %i GI", x , y+h , w , -h , iw , ih);
+
+  int LD=iw*D;
+  uchar *rgbdata=new uchar[LD];
+  uchar *curmask=mask;
+  for (j=0; j<ih;j++){
+
+    if (mask && lang_level_>2){  // InterleaveType 2 mask data
+      for (k=0; k<my/ih;k++){ //for alpha pseudo-masking
+        for (i=0; i<((mx+7)/8);i++){
+          if (!(i%40)) fprintf(output, "\n");
+          fprintf(output, "%.2x",swap_byte(*curmask));
+          curmask++;
+        }
+        fprintf(output,"\n");
+      }
+    }
+    call(data,0,j,iw,rgbdata);
+    uchar *curdata=rgbdata;
+    for (i=0 ; i<iw ; i++) {
+      uchar r = curdata[0];
+      if (!(i%120)) fprintf(output, "\n");
+      fprintf(output, "%.2x", r);
+      curdata +=D;
+    }
+    fprintf(output,"\n");
+  }
+  fprintf(output,">\n");
+  fprintf(output,"restore\n");
+  delete[] rgbdata;
+}
+
+
+////////////////////////////// Image classes //////////////////////
+
+
+void fltk3::PostScriptGraphicsDriver::draw(fltk3::Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy){
+  const char * const * di =pxm->data();
+  int w,h;
+  if (!fltk3::measure_pixmap(di, w, h)) return;
+  mask=0;
+  fl_mask_bitmap=&mask;
+  mx = WP;
+  my = HP;
+  push_clip(XP, YP, WP, HP);
+  fltk3::draw_pixmap(di,XP -cx, YP -cy, fltk3::BLACK );
+  pop_clip();
+  delete[] mask;
+  mask=0;
+  fl_mask_bitmap=0;
+}
+
+void fltk3::PostScriptGraphicsDriver::draw(fltk3::RGBImage * rgb,int XP, int YP, int WP, int HP, int cx, int cy){
+  const uchar  * di = rgb->array;
+  int w = rgb->w();
+  int h = rgb->h();
+  mask=0;
+  if (lang_level_>2) //when not true, not making alphamask, mixing colors instead...
+  if (alpha_mask(di, w, h, rgb->d(),rgb->ld())) return; //everthing masked, no need for painting!
+  push_clip(XP, YP, WP, HP);
+  draw_image(di, XP + cx, YP + cy, w, h, rgb->d(), rgb->ld());
+  pop_clip();
+  delete[]mask;
+  mask=0;
+}
+
+void fltk3::PostScriptGraphicsDriver::draw(fltk3::Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy){
+  const uchar  * di = bitmap->array;
+  int w,h;
+  int LD=(bitmap->w()+7)/8;
+  int xx;
+
+  if (WP> bitmap->w() - cx){// to assure that it does not go out of bounds;
+     w = bitmap->w() - cx;
+     xx = (bitmap->w()+7)/8 - cx/8; //length of mask in bytes
+  }else{
+    w =WP;
+    xx = (w+7)/8 - cx/8;
+  }
+  if ( HP > bitmap->h()-cy)
+    h = bitmap->h() - cy;
+  else
+    h = HP;
+
+  di += cy*LD + cx/8;
+  int si = cx % 8; // small shift to be clipped, it is simpler than shifting whole mask
+
+  int i,j;
+  push_clip(XP, YP, WP, HP);
+  fprintf(output , "%i %i %i %i %i %i MI", XP - si, YP + HP , WP , -HP , w , h);
+
+  for (j=0; j<HP; j++){
+    for (i=0; i<xx; i++){
+      if (!(i%80)) fprintf(output, "\n"); // not have lines longer than 255 chars
+      fprintf(output, "%.2x", swap_byte(*di) );
+      di++;
+    }
+    fprintf(output,"\n");
+  }
+  fprintf(output,">\n");
+  pop_clip();
+}
+
+#endif // FLTK3_DOXYGEN
+
+//
+// End of "$Id: image.cxx 4324 2005-05-09 21:47:22Z rokan $"
+//
+
+
+
+
+
+
+
+
+
+
+  
+
+
+
+
+
+
+

Added: branches/branch-3.0/src/core/scandir.cxx
===================================================================
--- branches/branch-3.0/src/core/scandir.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/scandir.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,124 @@
+/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C 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.
+
+The GNU C 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.  */
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+#  include "scandir_win32.cxx"
+#else
+
+#  include "flstring.h"
+
+#  if !HAVE_SCANDIR
+#    include <stdlib.h>
+#    include <sys/types.h>
+#    include <errno.h>
+
+#    if HAVE_DIRENT_H
+#      include <dirent.h>
+#      define NAMLEN(dirent) strlen((dirent)->d_name)
+#    else
+#      define dirent direct
+#      define NAMLEN(dirent) (dirent)->d_namlen
+#      if HAVE_SYS_NDIR_H
+#        include <sys/ndir.h>
+#      endif
+#      if HAVE_SYS_DIR_H
+#        include <sys/dir.h>
+#      endif
+#      if HAVE_NDIR_H
+#        include <ndir.h>
+#      endif
+#    endif
+
+int
+fl_scandir(const char *dir, struct dirent ***namelist,
+	   int (*select)(struct dirent *),
+	   int (*compar)(struct dirent **, struct dirent **))
+{
+  DIR *dp = opendir (dir);
+  struct dirent **v = NULL;
+  size_t vsize = 0, i;
+  struct dirent *d;
+  int save;
+
+  if (dp == NULL)
+    return -1;
+
+  save = errno;
+  errno = 0;
+
+  i = 0;
+  while ((d = readdir (dp)) != NULL)
+    if (select == NULL || (*select) (d))
+      {
+      size_t dsize;
+
+      if (i == vsize)
+        {
+          struct dirent **newv;
+          if (vsize == 0)
+            vsize = 10;
+          else
+            vsize *= 2;
+          newv = (struct dirent **) realloc (v, vsize * sizeof (*v));
+          if (newv == NULL)
+            {
+            lose:
+              errno = ENOMEM;
+              break;
+            }
+          v = newv;
+        }
+
+#    define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
+#    define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
+                              _D_EXACT_NAMLEN (d) + 1)
+
+      dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d;
+      v[i] = (struct dirent *) malloc (dsize);
+      if (v[i] == NULL)
+        goto lose;
+
+      memcpy (v[i++], d, dsize);
+      }
+
+  if (errno != 0)
+    {
+      save = errno;
+      (void) closedir (dp);
+      while (i > 0)
+      free (v[--i]);
+      free (v);
+      errno = save;
+      return -1;
+    }
+
+  (void) closedir (dp);
+  errno = save;
+
+  /* Sort the list if we have a comparison function to sort with.  */
+  if (compar) qsort (v, i, sizeof (*v), (int (*)(const void *, const void *))compar);
+  *namelist = v;
+  return i;
+}
+
+#  endif
+#endif
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/scandir.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/scandir_win32.cxx
===================================================================
--- branches/branch-3.0/src/core/scandir_win32.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/scandir_win32.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,141 @@
+/*
+ * "$Id$"
+ *
+ * WIN32 scandir function for the Fast Light Tool Kit (FLTK).
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#ifndef __CYGWIN__
+/* Emulation of posix scandir() call */
+#include <fltk3/utf8.h>
+#include <fltk3/filename.h>
+#include "flstring.h"
+#include <windows.h>
+#include <stdlib.h>
+
+extern "C" {
+int fl_scandir(const char *dirname, struct dirent ***namelist,
+	       int (*select)(struct dirent *),
+	       int (*compar)(struct dirent **, struct dirent **));
+}
+
+int fl_scandir(const char *dirname, struct dirent ***namelist,
+	       int (*select)(struct dirent *),
+	       int (*compar)(struct dirent **, struct dirent **)) {
+  int len;
+  char *findIn, *d, is_dir = 0;
+  WIN32_FIND_DATAW findw;
+  HANDLE h;
+  int nDir = 0, NDir = 0;
+  struct dirent **dir = 0, *selectDir;
+  unsigned long ret;
+
+  len    = strlen(dirname);
+  findIn = (char *)malloc((size_t)(len+10));
+  if (!findIn) return -1;
+  strcpy(findIn, dirname);
+
+  /* #if defined(__GNUC__) */
+  /* #warning FIXME This probably needs to be MORE UTF8 aware now */
+  /* #endif */
+  for (d = findIn; *d; d++) if (*d=='/') *d='\\';
+  if ((len==0)) { strcpy(findIn, ".\\*"); }
+  if ((len==2)&&findIn[1]==':'&&isalpha(findIn[0])) { *d++ = '\\'; *d = 0; }
+  if ((len==1)&& (d[-1]=='.')) { strcpy(findIn, ".\\*"); is_dir = 1; }
+  if ((len>0) && (d[-1]=='\\')) { *d++ = '*'; *d = 0; is_dir = 1; }
+  if ((len>1) && (d[-1]=='.') && (d[-2]=='\\')) { d[-1] = '*'; is_dir = 1; }
+  if (!is_dir) { /* this file may still be a directory that we need to list */
+    DWORD attr = GetFileAttributes(findIn);
+    if (attr&FILE_ATTRIBUTE_DIRECTORY)
+      strcpy(d, "\\*");
+  }
+  { /* Create a block to limit the scope while we find the initial "wide" filename */
+     /* unsigned short * wbuf = (unsigned short*)malloc(sizeof(short) *(len + 10)); */
+     /* wbuf[fl_utf2unicode(findIn, strlen(findIn), wbuf)] = 0; */
+	unsigned short *wbuf = NULL;
+	unsigned wlen = fltk3::utf8toUtf16(findIn, strlen(findIn), NULL, 0); /* Pass NULL to query length */
+	wlen++; /* add a little extra for termination etc. */
+	wbuf = (unsigned short*)malloc(sizeof(unsigned short)*wlen);
+	wlen = fltk3::utf8toUtf16(findIn, strlen(findIn), wbuf, wlen); /* actually convert the filename */
+	wbuf[wlen] = 0; /* NULL terminate the resultant string */
+	h = FindFirstFileW((LPCWSTR)wbuf, &findw); /* get a handle to the first filename in the search */
+	free(wbuf); /* release the "wide" buffer before the pointer goes out of scope */
+  }
+  if (h==INVALID_HANDLE_VALUE) {
+    free(findIn);
+    ret = GetLastError();
+    if (ret != ERROR_NO_MORE_FILES) {
+      nDir = -1;
+    }
+    *namelist = dir;
+    return nDir;
+  }
+  do {
+	int l = wcslen(findw.cFileName);
+	int dstlen = l * 5 + 1;
+	selectDir=(struct dirent*)malloc(sizeof(struct dirent)+dstlen);
+
+     /* l = fl_unicode2utf(findw.cFileName, l, selectDir->d_name); */
+	l = fltk3::utf8fromwc(selectDir->d_name, dstlen, findw.cFileName, l);
+
+	selectDir->d_name[l] = 0;
+	if (findw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+		/* Append a trailing slash to directory names... */
+		strcat(selectDir->d_name, "/");
+	}
+	if (!select || (*select)(selectDir)) {
+		if (nDir==NDir) {
+	struct dirent **tempDir = (struct dirent **)calloc(sizeof(struct dirent*), (size_t)(NDir+33));
+	if (NDir) memcpy(tempDir, dir, sizeof(struct dirent*)*NDir);
+	if (dir) free(dir);
+	dir = tempDir;
+	NDir += 32;
+		}
+		dir[nDir] = selectDir;
+		nDir++;
+		dir[nDir] = 0;
+	} else {
+		free(selectDir);
+	}
+   } while (FindNextFileW(h, &findw));
+  ret = GetLastError();
+  if (ret != ERROR_NO_MORE_FILES) {
+    /* don't return an error code, because the dir list may still be valid
+       up to this point */
+  }
+  FindClose(h);
+
+  free (findIn);
+
+  if (compar) qsort(dir, (size_t)nDir, sizeof(*dir),
+		    (int(*)(const void*, const void*))compar);
+
+  *namelist = dir;
+  return nDir;
+}
+
+#endif
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/scandir_win32.cxx
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/screen_xywh.cxx
===================================================================
--- branches/branch-3.0/src/core/screen_xywh.cxx	                        (rev 0)
+++ branches/branch-3.0/src/core/screen_xywh.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,342 @@
+//
+// "$Id$"
+//
+// Screen/monitor bounding box API for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+//     http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+//     http://www.fltk.org/str.php
+//
+
+
+#include <fltk3/run.h>
+#include <fltk3/x.h>
+#include <config.h>
+
+
+// Number of screens returned by multi monitor aware API; -1 before init
+static int num_screens = -1;
+
+#ifdef WIN32
+#  if !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500)
+#    define COMPILE_MULTIMON_STUBS
+#    include <multimon.h>
+#  endif // !HMONITOR_DECLARED && _WIN32_WINNT < 0x0500
+
+// We go the much more difficult route of individually picking some multi-screen
+// functions from the USER32.DLL . If these functions are not available, we
+// will gracefully fall back to single monitor support.
+//
+// If we were to insist on the existence of "EnumDisplayMonitors" and 
+// "GetMonitorInfoA", it would be impossible to use FLTK on Windows 2000
+// before SP2 or earlier.
+
+// BOOL EnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM)
+typedef BOOL (WINAPI* fl_edm_func)(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
+// BOOL GetMonitorInfo(HMONITOR, LPMONITORINFO)
+typedef BOOL (WINAPI* fl_gmi_func)(HMONITOR, LPMONITORINFO);
+
+static fl_gmi_func fl_gmi = NULL; // used to get a proc pointer for GetMonitorInfoA
+
+static RECT screens[16];
+static float dpi[16][2];
+
+static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM) {
+  if (num_screens >= 16) return TRUE;
+
+  MONITORINFOEX mi;
+  mi.cbSize = sizeof(mi);
+
+//  GetMonitorInfo(mon, &mi);
+//  (but we use our self-aquired function pointer instead)
+  if (fl_gmi(mon, &mi)) {
+    screens[num_screens] = mi.rcMonitor;
+// If we also want to record the work area, we would also store mi.rcWork at this point
+//  work_area[num_screens] = mi.rcWork;
+
+    // find the pixel size
+    if (mi.cbSize == sizeof(mi)) {
+      HDC screen = CreateDC(mi.szDevice, NULL, NULL, NULL);
+      if (screen) {
+        dpi[num_screens][0] = (float)GetDeviceCaps(screen, LOGPIXELSX);
+        dpi[num_screens][1] = (float)GetDeviceCaps(screen, LOGPIXELSY);
+      }
+      ReleaseDC(0L, screen);
+    }
+    
+    num_screens ++;
+  }
+  return TRUE;
+}
+
+static void screen_init() {
+  // Since not all versions of Windows include multiple monitor support,
+  // we do a run-time check for the required functions...
+  HMODULE hMod = GetModuleHandle("USER32.DLL");
+
+  if (hMod) {
+    // check that EnumDisplayMonitors is available
+    fl_edm_func fl_edm = (fl_edm_func)GetProcAddress(hMod, "EnumDisplayMonitors");
+
+    if (fl_edm) {
+      // we have EnumDisplayMonitors - do we also have GetMonitorInfoA ?
+      fl_gmi = (fl_gmi_func)GetProcAddress(hMod, "GetMonitorInfoA");
+      if (fl_gmi) {
+        // We have GetMonitorInfoA, enumerate all the screens...
+//      EnumDisplayMonitors(0,0,screen_cb,0);
+//      (but we use our self-aquired function pointer instead)
+//      NOTE: num_screens is incremented in screen_cb so we must first reset it here...
+        num_screens = 0;
+        fl_edm(0, 0, screen_cb, 0);
+        return;
+      }
+    }
+  }
+
+  // If we get here, assume we have 1 monitor...
+  num_screens = 1;
+  screens[0].top      = 0;
+  screens[0].left      = 0;
+  screens[0].right  = GetSystemMetrics(SM_CXSCREEN);
+  screens[0].bottom = GetSystemMetrics(SM_CYSCREEN);
+}
+#elif defined(__APPLE__)
+static XRectangle screens[16];
+static float dpi_h[16];
+static float dpi_v[16];
+
+static void screen_init() {
+  CGDirectDisplayID displays[16];
+  CGDisplayCount count, i;
+  CGRect r;
+  CGGetActiveDisplayList(16, displays, &count);
+  for( i = 0; i < count; i++) {
+    r = CGDisplayBounds(displays[i]);
+    screens[i].x      = int(r.origin.x);
+    screens[i].y      = int(r.origin.y);
+    screens[i].width  = int(r.size.width);
+    screens[i].height = int(r.size.height);
+    CGSize s = CGDisplayScreenSize(displays[i]);
+    dpi_h[i] = screens[i].width / (s.width/25.4);
+    dpi_v[i] = screens[i].height / (s.height/25.4);
+  }
+  num_screens = count;
+}
+#elif HAVE_XINERAMA
+#  include <X11/extensions/Xinerama.h>
+
+// Screen data...
+static XineramaScreenInfo *screens;
+static float dpi[16][2];
+
+static void screen_init() {
+  if (!fl_display) fl_open_display();
+
+  if (XineramaIsActive(fl_display)) {
+    screens = XineramaQueryScreens(fl_display, &num_screens);
+    int i;
+    // Xlib and Xinerama may disagree on the screen count. Sigh...
+    // Use the minimum of the reported counts.
+    // Use the previous screen's info for non-existent ones.
+    int sc = ScreenCount(fl_display); // Xlib screen count
+    for (i=0; i<num_screens; i++) {
+      int mm = (i < sc) ? DisplayWidthMM(fl_display, i) : 0;
+      dpi[i][0] = mm ? screens[i].width*25.4f/mm : (i > 0) ? dpi[i-1][0] : 0.0f;
+      mm = (i < sc) ? DisplayHeightMM(fl_display, i) : 0;
+      dpi[i][1] = mm ? screens[i].height*25.4f/mm : (i > 0) ? dpi[i-1][1] : 0.0f;
+    }
+  } else { // ! XineramaIsActive()
+    num_screens = 1;
+    int mm = DisplayWidthMM(fl_display, fl_screen);
+    dpi[0][0] = mm ? fltk3::w()*25.4f/mm : 0.0f;
+    mm = DisplayHeightMM(fl_display, fl_screen);
+    dpi[0][1] = mm ? fltk3::h()*25.4f/mm : dpi[0][0];
+  }
+}
+#else
+static float dpi[2];
+static void screen_init() {
+  num_screens = 1;
+  if (!fl_display) fl_open_display();
+  int mm = DisplayWidthMM(fl_display, fl_screen);
+  dpi[0] = mm ? fltk3::w()*25.4f/mm : 0.0f;
+  mm = DisplayHeightMM(fl_display, fl_screen);
+  dpi[1] = mm ? fltk3::h()*25.4f/mm : dpi[0];  
+}
+#endif // WIN32
+
+
+/**
+  Gets the number of available screens.
+*/
+int fltk3::screen_count() {
+  if (num_screens < 0) screen_init();
+  
+  return num_screens ? num_screens : 1;
+}
+
+/**
+ Gets the bounding box of a screen 
+ that contains the specified screen position \p mx, \p my
+ \param[out]  X,Y,W,H the corresponding screen bounding box
+ \param[in] mx, my the absolute screen position
+ */
+void fltk3::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my) {
+  int screen = 0;
+  int i;
+  
+  if (num_screens < 0) screen_init();
+  
+  for (i = 0; i < num_screens; i ++) {
+    int sx, sy, sw, sh;
+    fltk3::screen_xywh(sx, sy, sw, sh, i);
+    if ((mx >= sx) && (mx < (sx+sw)) && (my >= sy) && (my < (sy+sh))) {
+      screen = i;
+      break;
+    }
+  }
+  
+  screen_xywh(X, Y, W, H, screen);
+}
+
+
+/**
+ Gets the screen bounding rect for the given screen. 
+ \param[out]  X,Y,W,H the corresponding screen bounding box
+ \param[in] n the screen number (0 to Fl::screen_count() - 1)
+ \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
+ */
+void fltk3::screen_xywh(int &X, int &Y, int &W, int &H, int n) {
+  if (num_screens < 0) screen_init();
+  
+  if ((n < 0) || (n >= num_screens))
+    n = 0;
+  
+#ifdef WIN32
+  if (num_screens > 0) {
+    X = screens[n].left;
+    Y = screens[n].top;
+    W = screens[n].right - screens[n].left;
+    H = screens[n].bottom - screens[n].top;
+  } else {
+    /* Fallback if something is broken... */
+    X = 0;
+    Y = 0;
+    W = GetSystemMetrics(SM_CXSCREEN);
+    H = GetSystemMetrics(SM_CYSCREEN);
+  }
+#elif defined(__APPLE__)
+  if (num_screens > 0) {
+    X = screens[n].x;
+    Y = screens[n].y;
+    W = screens[n].width;
+    H = screens[n].height;
+  } else {
+    /* Fallback if something is broken... */
+    X = fltk3::x();
+    Y = fltk3::y();
+    W = fltk3::w();
+    H = fltk3::h();
+  }
+#else
+#if HAVE_XINERAMA
+  if (num_screens > 0 && screens) {
+    X = screens[n].x_org;
+    Y = screens[n].y_org;
+    W = screens[n].width;
+    H = screens[n].height;
+  } else
+#endif // HAVE_XINERAMA
+  {
+    /* Fallback if something is broken (or no Xinerama)... */
+    X = 0;
+    Y = 0;
+    W = DisplayWidth(fl_display, fl_screen);
+    H = DisplayHeight(fl_display, fl_screen);
+  }
+#endif // WIN32
+}
+
+static inline float fl_intersection(int x1, int y1, int w1, int h1,
+                        int x2, int y2, int w2, int h2) {
+  if(x1+w1 < x2 || x2+w2 < x1 || y1+h1 < y2 || y2+h2 < y1)
+    return 0.;
+  int int_left = x1 > x2 ? x1 : x2;
+  int int_right = x1+w1 > x2+w2 ? x2+w2 : x1+w1;
+  int int_top = y1 > y2 ? y1 : y2;
+  int int_bottom = y1+h1 > y2+h2 ? y2+h2 : y1+h1;
+  return (float)(int_right - int_left) * (int_bottom - int_top);
+}
+
+/**
+  Gets the screen bounding rect for the screen
+  which intersects the most with the rectangle
+  defined by \p mx, \p my, \p mw, \p mh.
+  \param[out]  X,Y,W,H the corresponding screen bounding box
+  \param[in] mx, my, mw, mh the rectangle to search for intersection with
+  \see void screen_xywh(int &X, int &Y, int &W, int &H, int n)
+  */
+void fltk3::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh) {
+  int best_screen = 0;
+  float best_intersection = 0.;
+  for(int i = 0; i < fltk3::screen_count(); i++) {
+    int sx, sy, sw, sh;
+    fltk3::screen_xywh(sx, sy, sw, sh, i);
+    float sintersection = fl_intersection(mx, my, mw, mh, sx, sy, sw, sh);
+    if(sintersection > best_intersection) {
+      best_screen = i;
+      best_intersection = sintersection;
+    }
+  }
+  screen_xywh(X, Y, W, H, best_screen);
+}
+  
+
+
+/**
+ Gets the screen resolution in dots-per-inch for the given screen. 
+ \param[out]  h, v  horizontal and vertical resolution
+ \param[in]   n     the screen number (0 to fltk3::screen_count() - 1)
+ \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
+ */
+void fltk3::screen_dpi(float &h, float &v, int n)
+{
+  if (num_screens < 0) screen_init();
+  h = v = 0.0f;
+  
+#ifdef WIN32
+  if (n >= 0 && n < num_screens) {
+    h = float(dpi[n][0]);
+    v = float(dpi[n][1]);
+  }
+#elif defined(__APPLE__)
+  if (n >= 0 && n < num_screens) {
+    h = dpi_h[n];
+    v = dpi_v[n];
+  }
+#elif HAVE_XINERAMA
+  if (n >= 0 && n < num_screens) {
+    h = dpi[n][0];
+    v = dpi[n][1];
+  }
+#else
+  if (n >= 0 && n < num_screens) {
+    h = dpi[0];
+    v = dpi[1];
+  }
+#endif // WIN32
+}
+
+
+
+//
+// End of "$Id$".
+//


Property changes on: branches/branch-3.0/src/core/screen_xywh.cxx
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/slowarrow.h
===================================================================
--- branches/branch-3.0/src/core/slowarrow.h	                        (rev 0)
+++ branches/branch-3.0/src/core/slowarrow.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define slowarrow_width 16
+#define slowarrow_height 16
+static unsigned char slowarrow_bits[] = {
+   0x40, 0x00, 0x40, 0x00, 0x60, 0x00, 0x60, 0x00, 0xf0, 0x0f, 0x60, 0x00,
+   0x60, 0x00, 0x40, 0x02, 0x40, 0x02, 0x00, 0x06, 0x00, 0x06, 0xf0, 0x0f,
+   0x00, 0x06, 0x00, 0x06, 0x00, 0x02, 0x00, 0x02};


Property changes on: branches/branch-3.0/src/core/slowarrow.h
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Copied: branches/branch-3.0/src/core/tile.xpm (from rev 8987, branches/branch-3.0/src/tile.xpm)
===================================================================
--- branches/branch-3.0/src/core/tile.xpm	                        (rev 0)
+++ branches/branch-3.0/src/core/tile.xpm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,91 @@
+/* XPM */
+static char	tile_cmap[3][32] = {
+"O c #FFFFFF",
+"o c #EFEFEF",
+". c #E8E8E8"
+};
+static const char * tile_xpm[] = {
+"64 64 3 1",
+tile_cmap[0],
+tile_cmap[1],
+tile_cmap[2],
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
+
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"................................................................",
+"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"};

Added: branches/branch-3.0/src/core/up.xbm
===================================================================
--- branches/branch-3.0/src/core/up.xbm	                        (rev 0)
+++ branches/branch-3.0/src/core/up.xbm	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6 @@
+#define up_width 16
+#define up_height 16
+static unsigned char up_bits[] = {
+   0x00, 0x00, 0x78, 0x00, 0x84, 0x00, 0x02, 0x01, 0x31, 0xfe, 0x79, 0x80,
+   0xfd, 0x80, 0x31, 0x80, 0x31, 0x80, 0x31, 0x80, 0x31, 0x80, 0x31, 0x80,
+   0x01, 0x80, 0x01, 0x80, 0xff, 0xff, 0x00, 0x00};


Property changes on: branches/branch-3.0/src/core/up.xbm
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/vsnprintf.c
===================================================================
--- branches/branch-3.0/src/core/vsnprintf.c	                        (rev 0)
+++ branches/branch-3.0/src/core/vsnprintf.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,281 @@
+/*
+ * "$Id$"
+ *
+ * snprintf() and vsnprintf() functions for the Fast Light Tool Kit (FLTK).
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#include <stdio.h>
+#include "flstring.h"
+
+#ifdef HAVE_SYS_STDTYPES_H
+#  include <sys/stdtypes.h>
+#endif /* HAVE_SYS_STDTYPES_H */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
+  char		*bufptr,		/* Pointer to position in buffer */
+		*bufend,		/* Pointer to end of buffer */
+		sign,			/* Sign of format width */
+		size,			/* Size character (h, l, L) */
+		type;			/* Format type character */
+  int		width,			/* Width of field */
+		prec;			/* Number of characters of precision */
+  char		tformat[100],		/* Temporary format string for sprintf() */
+		*tptr,			/* Pointer into temporary format */
+		temp[1024];		/* Buffer for formatted numbers */
+  char		*s;			/* Pointer to string */
+  int		slen;			/* Length of string */
+  int		bytes;			/* Total number of bytes needed */
+
+
+ /*
+  * Loop through the format string, formatting as needed...
+  */
+
+  bufptr = buffer;
+  bufend = buffer + bufsize - 1;
+  bytes  = 0;
+
+  while (*format) {
+    if (*format == '%') {
+      tptr = tformat;
+      *tptr++ = *format++;
+
+      if (*format == '%') {
+        if (bufptr && bufptr < bufend) *bufptr++ = *format;
+        bytes ++;
+        format ++;
+	continue;
+      } else if (strchr(" -+#\'", *format)) {
+        *tptr++ = *format;
+        sign = *format++;
+      } else sign = 0;
+
+      if (*format == '*') {
+        /* Get width from argument... */
+	format ++;
+	width = va_arg(ap, int);
+	snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", width);
+	tptr += strlen(tptr);
+      } else {
+	width = 0;
+	while (isdigit(*format & 255)) {
+	  if (tptr < (tformat + sizeof(tformat) - 1)) *tptr++ = *format;
+	  width = width * 10 + *format++ - '0';
+	}
+      }
+
+      if (*format == '.') {
+	if (tptr < (tformat + sizeof(tformat) - 1)) *tptr++ = *format;
+        format ++;
+
+        if (*format == '*') {
+          /* Get precision from argument... */
+	  format ++;
+	  prec = va_arg(ap, int);
+	  snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", prec);
+	  tptr += strlen(tptr);
+	} else {
+	  prec = 0;
+	  while (isdigit(*format & 255)) {
+	    if (tptr < (tformat + sizeof(tformat) - 1)) *tptr++ = *format;
+	    prec = prec * 10 + *format++ - '0';
+	  }
+	}
+      } else prec = -1;
+
+      size = '\0';
+
+      if (*format == 'l' && format[1] == 'l') {
+        size = 'L';
+	if (tptr < (tformat + sizeof(tformat) - 2)) {
+	  *tptr++ = 'l';
+	  *tptr++ = 'l';
+	}
+	format += 2;
+      } else if (*format == 'h' || *format == 'l' || *format == 'L') {
+	if (tptr < (tformat + sizeof(tformat) - 1)) *tptr++ = *format;
+        size = *format++;
+      }
+
+      if (!*format) break;
+
+      if (tptr < (tformat + sizeof(tformat) - 1)) *tptr++ = *format;
+      type  = *format++;
+      *tptr = '\0';
+
+      switch (type) {
+	case 'E' : /* Floating point formats */
+	case 'G' :
+	case 'e' :
+	case 'f' :
+	case 'g' :
+	  if ((width + 2) > sizeof(temp)) break;
+
+	  sprintf(temp, tformat, va_arg(ap, double));
+
+          bytes += strlen(temp);
+
+          if (bufptr) {
+	    if ((bufptr + strlen(temp)) > bufend) {
+	      strncpy(bufptr, temp, (size_t)(bufend - bufptr));
+	      bufptr = bufend;
+	    } else {
+	      strcpy(bufptr, temp);
+	      bufptr += strlen(temp);
+	    }
+	  }
+	  break;
+
+        case 'B' : /* Integer formats */
+	case 'X' :
+	case 'b' :
+        case 'd' :
+	case 'i' :
+	case 'o' :
+	case 'u' :
+	case 'x' :
+	  if ((width + 2) > sizeof(temp)) break;
+
+#ifdef HAVE_LONG_LONG
+	  if (size == 'L')
+	    sprintf(temp, tformat, va_arg(ap, long long));
+	  else
+#endif /* HAVE_LONG_LONG */
+	  if (size == 'l')
+	    sprintf(temp, tformat, va_arg(ap, long));
+	  else
+	    sprintf(temp, tformat, va_arg(ap, int));
+
+          bytes += strlen(temp);
+
+	  if (bufptr) {
+	    if ((bufptr + strlen(temp)) > bufend) {
+	      strncpy(bufptr, temp, (size_t)(bufend - bufptr));
+	      bufptr = bufend;
+	    } else {
+	      strcpy(bufptr, temp);
+	      bufptr += strlen(temp);
+	    }
+	  }
+	  break;
+	    
+	case 'p' : /* Pointer value */
+	  if ((width + 2) > sizeof(temp)) break;
+
+	  sprintf(temp, tformat, va_arg(ap, void *));
+
+          bytes += strlen(temp);
+
+	  if (bufptr) {
+	    if ((bufptr + strlen(temp)) > bufend) {
+	      strncpy(bufptr, temp, (size_t)(bufend - bufptr));
+	      bufptr = bufend;
+	    } else {
+	      strcpy(bufptr, temp);
+	      bufptr += strlen(temp);
+	    }
+	  }
+	  break;
+
+        case 'c' : /* Character or character array */
+	  bytes += width;
+
+	  if (bufptr) {
+	    if (width <= 1) *bufptr++ = va_arg(ap, int);
+	    else {
+	      if ((bufptr + width) > bufend) width = bufend - bufptr;
+
+	      memcpy(bufptr, va_arg(ap, char *), (size_t)width);
+	      bufptr += width;
+	    }
+	  }
+	  break;
+
+	case 's' : /* String */
+	  if ((s = va_arg(ap, char *)) == NULL) s = "(null)";
+
+	  slen = strlen(s);
+	  if (slen > width && prec != width) width = slen;
+
+          bytes += width;
+
+	  if (bufptr) {
+	    if ((bufptr + width) > bufend) width = bufend - bufptr;
+
+            if (slen > width) slen = width;
+
+	    if (sign == '-') {
+	      strncpy(bufptr, s, (size_t)slen);
+	      memset(bufptr + slen, ' ', (size_t)(width - slen));
+	    } else {
+	      memset(bufptr, ' ', (size_t)(width - slen));
+	      strncpy(bufptr + width - slen, s, (size_t)slen);
+	    }
+
+	    bufptr += width;
+	  }
+	  break;
+
+	case 'n' : /* Output number of chars so far */
+	  *(va_arg(ap, int *)) = bytes;
+	  break;
+      }
+    } else {
+      bytes ++;
+
+      if (bufptr && bufptr < bufend) *bufptr++ = *format;
+      format ++;
+    }
+  }
+
+ /*
+  * Nul-terminate the string and return the number of characters needed.
+  */
+
+  if (bufptr) *bufptr = '\0';
+
+  return (bytes);
+}
+
+int fl_snprintf(char* str, size_t size, const char* fmt, ...) {
+  int ret;
+  va_list ap;
+  va_start(ap, fmt);
+  ret = vsnprintf(str, size, fmt, ap);
+  va_end(ap);
+  return ret;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*
+ * End of "$Id$".
+ */
+


Property changes on: branches/branch-3.0/src/core/vsnprintf.c
___________________________________________________________________
Name: svn:keywords
   + author date id revision
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/xutf8/COPYING
===================================================================
--- branches/branch-3.0/src/core/xutf8/COPYING	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/COPYING	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,50 @@
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+
+
+		lcUniConv directory: 
+
+Copyright (c) 1999-2000  Free Software Foundation, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+FREE SOFTWARE FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the Free Software Foundation
+shall not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from the
+Free Software Foundation.
+
+

Added: branches/branch-3.0/src/core/xutf8/README
===================================================================
--- branches/branch-3.0/src/core/xutf8/README	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/README	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,67 @@
+
+
+
+supported encodings :
+---------------------
+iso10646-1
+iso8859-1 
+iso8859-2 
+iso8859-3 
+iso8859-4 
+iso8859-5 
+iso8859-6 
+iso8859-7 
+iso8859-8  
+iso8859-9 
+iso8859-10
+iso8859-11
+iso8859-13 
+iso8859-14 
+iso8859-15 
+koi8-r 
+koi8-u 
+big5-0 
+gbk
+gb2312.1980-0 
+jisx0201.1976-0 
+jisx0208.1983-0 
+jisx0212.1990-0 
+ksc5601.1987-0
+symbol 
+dingbats
+
+
+TIPS:
+=====
+
+You must add "-lXutf8" to the library list in your Makefile. 
+
+When using "GNU autoconf" add these lines to your "configure.in" :
+
+dnl Test to see if libXutf8 is on this machine:
+XUTFLIB=
+AC_CHECK_LIB(Xutf8, XUtf8IsNonSpacing, \
+        AC_DEFINE(HAVE_XUTF8) XUTFLIB=" -lXutf8", ,\
+        -lX11 $X_EXTRA_LIBS)
+AC_SUBST(XUTFLIB)
+
+
+ORIGINAL FILES :
+================
+
+The directory lcUniConv is copied from the xfree project cvs system.
+(
+export CVS_RSH=ssh
+export CVSROOT=anoncvs@anoncvs.xfree86.org:/cvs
+cvs checkout xc/lib/X11/lcUniConv
+password: anoncvs
+)
+
+The file imKStoUCS.c is copied from the xfree project cvs system.
+(
+export CVS_RSH=ssh
+export CVSROOT=anoncvs@anoncvs.xfree86.org:/cvs
+cvs checkout xc/lib/X11
+password: anoncvs
+)
+

Added: branches/branch-3.0/src/core/xutf8/Ximint.h
===================================================================

Added: branches/branch-3.0/src/core/xutf8/Xlibint.h
===================================================================

Added: branches/branch-3.0/src/core/xutf8/case.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/case.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/case.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,126 @@
+/*
+ * "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2010 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ * This file is required on all platforms for utf8 support
+ */
+
+#include "headers/case.h"
+#include <stdlib.h>
+
+int 
+XUtf8Tolower(int ucs) {
+  int ret;
+  if (ucs <= 0x02B6) {
+    if (ucs >= 0x0041) {
+      ret = ucs_table_0041[ucs - 0x0041];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0x0556) {
+    if (ucs >= 0x0386) {
+      ret = ucs_table_0386[ucs - 0x0386];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0x10C5) {
+    if (ucs >= 0x10A0) {
+      ret = ucs_table_10A0[ucs - 0x10A0];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0x1FFC) {
+    if (ucs >= 0x1E00) {
+      ret = ucs_table_1E00[ucs - 0x1E00];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0x2133) {
+    if (ucs >= 0x2102) {
+      ret = ucs_table_2102[ucs - 0x2102];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0x24CF) {
+    if (ucs >= 0x24B6) {
+      ret = ucs_table_24B6[ucs - 0x24B6];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0x33CE) {
+    if (ucs >= 0x33CE) {
+      ret = ucs_table_33CE[ucs - 0x33CE];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  if (ucs <= 0xFF3A) {
+    if (ucs >= 0xFF21) {
+      ret = ucs_table_FF21[ucs - 0xFF21];
+      if (ret > 0) return ret;
+    }
+    return ucs;
+  }
+
+  return ucs;
+}
+
+int 
+XUtf8Toupper(int ucs) {
+  int i;
+  static unsigned short *table = NULL;
+
+  if (!table) {
+    table = (unsigned short*) malloc(sizeof(unsigned short) * 0x10000);
+    for (i = 0; i < 0x10000; i++) {
+      table[i] = (unsigned short) i;
+    }
+    for (i = 0; i < 0x10000; i++) {
+      int l;
+      l = XUtf8Tolower(i);
+      if (l != i) table[l] = (unsigned short) i;
+    }
+  }
+  if (ucs >= 0x10000 || ucs < 0) return ucs;
+  return table[ucs];
+}
+
+/*
+* End of "$Id$".
+*/

Added: branches/branch-3.0/src/core/xutf8/fl_wcwidth.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/fl_wcwidth.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/fl_wcwidth.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,53 @@
+/*
+ * "$Id$"
+ *
+ * wrapper(s) around Markus Kuhn's wcwidth() implementation.
+ *
+ * Copyright 2006-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/* include Markus Kuhn's wcwidth() implementation.
+ * Note: only the filename has been changes at the moment.
+ * forward declare the routines as static to avoid name leakage.
+ */
+
+#if 0
+#include <stdio.h>              /* for size_t only */
+#endif
+
+static int mk_wcwidth(unsigned int ucs);
+#if 0
+static int mk_wcswidth(const unsigned int *pwcs, size_t n);
+static int mk_wcwidth_cjk(unsigned int ucs);
+static int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n);
+#endif
+
+#include "mk_wcwidth.c"
+
+int fltk3::wcwidth(unsigned int ucs) {
+  /* warning: we have problems if sizeof(wchar_t) == 2 and ucs > 0xffff */
+  return mk_wcwidth(ucs);
+}
+
+/*
+ * End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/xutf8/fl_wcwidth.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/branch-3.0/src/core/xutf8/headers/case.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/case.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/case.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1770 @@
+/* spacing */
+
+static const unsigned short ucs_table_0041[] = {
+/* U+0041 */ 0x0061,
+/* U+0042 */ 0x0062,
+/* U+0043 */ 0x0063,
+/* U+0044 */ 0x0064,
+/* U+0045 */ 0x0065,
+/* U+0046 */ 0x0066,
+/* U+0047 */ 0x0067,
+/* U+0048 */ 0x0068,
+/* U+0049 */ 0x0069,
+/* U+004A */ 0x006A,
+/* U+004B */ 0x006B,
+/* U+004C */ 0x006C,
+/* U+004D */ 0x006D,
+/* U+004E */ 0x006E,
+/* U+004F */ 0x006F,
+/* U+0050 */ 0x0070,
+/* U+0051 */ 0x0071,
+/* U+0052 */ 0x0072,
+/* U+0053 */ 0x0073,
+/* U+0054 */ 0x0074,
+/* U+0055 */ 0x0075,
+/* U+0056 */ 0x0076,
+/* U+0057 */ 0x0077,
+/* U+0058 */ 0x0078,
+/* U+0059 */ 0x0079,
+/* U+005A */ 0x007A,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+00C0 */ 0x00E0,
+/* U+00C1 */ 0x00E1,
+/* U+00C2 */ 0x00E2,
+/* U+00C3 */ 0x00E3,
+/* U+00C4 */ 0x00E4,
+/* U+00C5 */ 0x00E5,
+/* U+00C6 */ 0x00E6,
+/* U+00C7 */ 0x00E7,
+/* U+00C8 */ 0x00E8,
+/* U+00C9 */ 0x00E9,
+/* U+00CA */ 0x00EA,
+/* U+00CB */ 0x00EB,
+/* U+00CC */ 0x00EC,
+/* U+00CD */ 0x00ED,
+/* U+00CE */ 0x00EE,
+/* U+00CF */ 0x00EF,
+/* U+00D0 */ 0x00F0,
+/* U+00D1 */ 0x00F1,
+/* U+00D2 */ 0x00F2,
+/* U+00D3 */ 0x00F3,
+/* U+00D4 */ 0x00F4,
+/* U+00D5 */ 0x00F5,
+/* U+00D6 */ 0x00F6,
+0x00,
+/* U+00D8 */ 0x00F8,
+/* U+00D9 */ 0x00F9,
+/* U+00DA */ 0x00FA,
+/* U+00DB */ 0x00FB,
+/* U+00DC */ 0x00FC,
+/* U+00DD */ 0x00FD,
+/* U+00DE */ 0x00FE,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0100 */ 0x0101,
+0x00,
+/* U+0102 */ 0x0103,
+0x00,
+/* U+0104 */ 0x0105,
+0x00,
+/* U+0106 */ 0x0107,
+0x00,
+/* U+0108 */ 0x0109,
+0x00,
+/* U+010A */ 0x010B,
+0x00,
+/* U+010C */ 0x010D,
+0x00,
+/* U+010E */ 0x010F,
+0x00,
+/* U+0110 */ 0x0111,
+0x00,
+/* U+0112 */ 0x0113,
+0x00,
+/* U+0114 */ 0x0115,
+0x00,
+/* U+0116 */ 0x0117,
+0x00,
+/* U+0118 */ 0x0119,
+0x00,
+/* U+011A */ 0x011B,
+0x00,
+/* U+011C */ 0x011D,
+0x00,
+/* U+011E */ 0x011F,
+0x00,
+/* U+0120 */ 0x0121,
+0x00,
+/* U+0122 */ 0x0123,
+0x00,
+/* U+0124 */ 0x0125,
+0x00,
+/* U+0126 */ 0x0127,
+0x00,
+/* U+0128 */ 0x0129,
+0x00,
+/* U+012A */ 0x012B,
+0x00,
+/* U+012C */ 0x012D,
+0x00,
+/* U+012E */ 0x012F,
+0x00,
+/* U+0130 */ 0x0,
+0x00,
+/* U+0132 */ 0x0133,
+0x00,
+/* U+0134 */ 0x0135,
+0x00,
+/* U+0136 */ 0x0137,
+0x00,
+0x00,
+/* U+0139 */ 0x013A,
+0x00,
+/* U+013B */ 0x013C,
+0x00,
+/* U+013D */ 0x013E,
+0x00,
+/* U+013F */ 0x0140,
+0x00,
+/* U+0141 */ 0x0142,
+0x00,
+/* U+0143 */ 0x0144,
+0x00,
+/* U+0145 */ 0x0146,
+0x00,
+/* U+0147 */ 0x0148,
+0x00,
+0x00,
+/* U+014A */ 0x014B,
+0x00,
+/* U+014C */ 0x014D,
+0x00,
+/* U+014E */ 0x014F,
+0x00,
+/* U+0150 */ 0x0151,
+0x00,
+/* U+0152 */ 0x0153,
+0x00,
+/* U+0154 */ 0x0155,
+0x00,
+/* U+0156 */ 0x0157,
+0x00,
+/* U+0158 */ 0x0159,
+0x00,
+/* U+015A */ 0x015B,
+0x00,
+/* U+015C */ 0x015D,
+0x00,
+/* U+015E */ 0x015F,
+0x00,
+/* U+0160 */ 0x0161,
+0x00,
+/* U+0162 */ 0x0163,
+0x00,
+/* U+0164 */ 0x0165,
+0x00,
+/* U+0166 */ 0x0167,
+0x00,
+/* U+0168 */ 0x0169,
+0x00,
+/* U+016A */ 0x016B,
+0x00,
+/* U+016C */ 0x016D,
+0x00,
+/* U+016E */ 0x016F,
+0x00,
+/* U+0170 */ 0x0171,
+0x00,
+/* U+0172 */ 0x0173,
+0x00,
+/* U+0174 */ 0x0175,
+0x00,
+/* U+0176 */ 0x0177,
+0x00,
+/* U+0178 */ 0x00FF,
+/* U+0179 */ 0x017A,
+0x00,
+/* U+017B */ 0x017C,
+0x00,
+/* U+017D */ 0x017E,
+0x00,
+0x00,
+0x00,
+/* U+0181 */ 0x0253,
+/* U+0182 */ 0x0183,
+0x00,
+/* U+0184 */ 0x0185,
+0x00,
+/* U+0186 */ 0x0254,
+/* U+0187 */ 0x0188,
+0x00,
+/* U+0189 */ 0x0,
+/* U+018A */ 0x0257,
+/* U+018B */ 0x018C,
+0x00,
+0x00,
+/* U+018E */ 0x0258,
+/* U+018F */ 0x0259,
+/* U+0190 */ 0x025B,
+/* U+0191 */ 0x0192,
+0x00,
+/* U+0193 */ 0x0260,
+/* U+0194 */ 0x0263,
+0x00,
+/* U+0196 */ 0x0269,
+/* U+0197 */ 0x0268,
+/* U+0198 */ 0x0199,
+0x00,
+0x00,
+0x00,
+/* U+019C */ 0x026F,
+/* U+019D */ 0x0272,
+0x00,
+/* U+019F */ 0x0,
+/* U+01A0 */ 0x01A1,
+0x00,
+/* U+01A2 */ 0x01A3,
+0x00,
+/* U+01A4 */ 0x01A5,
+0x00,
+0x00,
+/* U+01A7 */ 0x01A8,
+0x00,
+/* U+01A9 */ 0x0283,
+0x00,
+0x00,
+/* U+01AC */ 0x01AD,
+0x00,
+/* U+01AE */ 0x0288,
+/* U+01AF */ 0x01B0,
+0x00,
+/* U+01B1 */ 0x028A,
+/* U+01B2 */ 0x028B,
+/* U+01B3 */ 0x01B4,
+0x00,
+/* U+01B5 */ 0x01B6,
+0x00,
+/* U+01B7 */ 0x0292,
+/* U+01B8 */ 0x01B9,
+0x00,
+0x00,
+0x00,
+/* U+01BC */ 0x01BD,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+01C4 */ 0x01C6,
+/* U+01C5 */ 0x0,
+0x00,
+/* U+01C7 */ 0x01C9,
+/* U+01C8 */ 0x0,
+0x00,
+/* U+01CA */ 0x01CC,
+/* U+01CB */ 0x0,
+0x00,
+/* U+01CD */ 0x01CE,
+0x00,
+/* U+01CF */ 0x01D0,
+0x00,
+/* U+01D1 */ 0x01D2,
+0x00,
+/* U+01D3 */ 0x01D4,
+0x00,
+/* U+01D5 */ 0x01D6,
+0x00,
+/* U+01D7 */ 0x01D8,
+0x00,
+/* U+01D9 */ 0x01DA,
+0x00,
+/* U+01DB */ 0x01DC,
+0x00,
+0x00,
+/* U+01DE */ 0x01DF,
+0x00,
+/* U+01E0 */ 0x01E1,
+0x00,
+/* U+01E2 */ 0x01E3,
+0x00,
+/* U+01E4 */ 0x01E5,
+0x00,
+/* U+01E6 */ 0x01E7,
+0x00,
+/* U+01E8 */ 0x01E9,
+0x00,
+/* U+01EA */ 0x01EB,
+0x00,
+/* U+01EC */ 0x01ED,
+0x00,
+/* U+01EE */ 0x01EF,
+0x00,
+0x00,
+/* U+01F1 */ 0x01F3,
+/* U+01F2 */ 0x0,
+0x00,
+/* U+01F4 */ 0x01F5,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+01FA */ 0x01FB,
+0x00,
+/* U+01FC */ 0x01FD,
+0x00,
+/* U+01FE */ 0x01FF,
+0x00,
+/* U+0200 */ 0x0201,
+0x00,
+/* U+0202 */ 0x0203,
+0x00,
+/* U+0204 */ 0x0205,
+0x00,
+/* U+0206 */ 0x0207,
+0x00,
+/* U+0208 */ 0x0209,
+0x00,
+/* U+020A */ 0x020B,
+0x00,
+/* U+020C */ 0x020D,
+0x00,
+/* U+020E */ 0x020F,
+0x00,
+/* U+0210 */ 0x0211,
+0x00,
+/* U+0212 */ 0x0213,
+0x00,
+/* U+0214 */ 0x0215,
+0x00,
+/* U+0216 */ 0x0217,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0262 */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+026A */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0274 */ 0x0,
+0x00,
+/* U+0276 */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0280 */ 0x0,
+/* U+0281 */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+028F */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0299 */ 0x0,
+0x00,
+/* U+029B */ 0x0,
+/* U+029C */ 0x0,
+0x00,
+0x00,
+/* U+029F */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+02B6 */ 0x0,
+};
+
+static const unsigned short ucs_table_0386[] = {
+/* U+0386 */ 0x03AC,
+0x00,
+/* U+0388 */ 0x03AD,
+/* U+0389 */ 0x03AE,
+/* U+038A */ 0x03AF,
+0x00,
+/* U+038C */ 0x03CC,
+0x00,
+/* U+038E */ 0x03CD,
+/* U+038F */ 0x03CE,
+0x00,
+/* U+0391 */ 0x03B1,
+/* U+0392 */ 0x03B2,
+/* U+0393 */ 0x03B3,
+/* U+0394 */ 0x03B4,
+/* U+0395 */ 0x03B5,
+/* U+0396 */ 0x03B6,
+/* U+0397 */ 0x03B7,
+/* U+0398 */ 0x03B8,
+/* U+0399 */ 0x03B9,
+/* U+039A */ 0x03BA,
+/* U+039B */ 0x03BB,
+/* U+039C */ 0x03BC,
+/* U+039D */ 0x03BD,
+/* U+039E */ 0x03BE,
+/* U+039F */ 0x03BF,
+/* U+03A0 */ 0x03C0,
+/* U+03A1 */ 0x03C1,
+0x00,
+/* U+03A3 */ 0x03C3,
+/* U+03A4 */ 0x03C4,
+/* U+03A5 */ 0x03C5,
+/* U+03A6 */ 0x03C6,
+/* U+03A7 */ 0x03C7,
+/* U+03A8 */ 0x03C8,
+/* U+03A9 */ 0x03C9,
+/* U+03AA */ 0x03CA,
+/* U+03AB */ 0x03CB,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+03D2 */ 0x03D2,
+/* U+03D3 */ 0x03D3,
+/* U+03D4 */ 0x03D4,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+03DA */ 0x03DA,
+0x00,
+/* U+03DC */ 0x03DC,
+0x00,
+/* U+03DE */ 0x03DE,
+0x00,
+/* U+03E0 */ 0x03E0,
+0x00,
+/* U+03E2 */ 0x03E3,
+0x00,
+/* U+03E4 */ 0x03E5,
+0x00,
+/* U+03E6 */ 0x03E7,
+0x00,
+/* U+03E8 */ 0x03E9,
+0x00,
+/* U+03EA */ 0x03EB,
+0x00,
+/* U+03EC */ 0x03ED,
+0x00,
+/* U+03EE */ 0x03EF,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0401 */ 0x0451,
+/* U+0402 */ 0x0452,
+/* U+0403 */ 0x0453,
+/* U+0404 */ 0x0454,
+/* U+0405 */ 0x0455,
+/* U+0406 */ 0x0456,
+/* U+0407 */ 0x0457,
+/* U+0408 */ 0x0458,
+/* U+0409 */ 0x0459,
+/* U+040A */ 0x045A,
+/* U+040B */ 0x045B,
+/* U+040C */ 0x045C,
+0x00,
+/* U+040E */ 0x045E,
+/* U+040F */ 0x045F,
+/* U+0410 */ 0x0430,
+/* U+0411 */ 0x0431,
+/* U+0412 */ 0x0432,
+/* U+0413 */ 0x0433,
+/* U+0414 */ 0x0434,
+/* U+0415 */ 0x0435,
+/* U+0416 */ 0x0436,
+/* U+0417 */ 0x0437,
+/* U+0418 */ 0x0438,
+/* U+0419 */ 0x0439,
+/* U+041A */ 0x043A,
+/* U+041B */ 0x043B,
+/* U+041C */ 0x043C,
+/* U+041D */ 0x043D,
+/* U+041E */ 0x043E,
+/* U+041F */ 0x043F,
+/* U+0420 */ 0x0440,
+/* U+0421 */ 0x0441,
+/* U+0422 */ 0x0442,
+/* U+0423 */ 0x0443,
+/* U+0424 */ 0x0444,
+/* U+0425 */ 0x0445,
+/* U+0426 */ 0x0446,
+/* U+0427 */ 0x0447,
+/* U+0428 */ 0x0448,
+/* U+0429 */ 0x0449,
+/* U+042A */ 0x044A,
+/* U+042B */ 0x044B,
+/* U+042C */ 0x044C,
+/* U+042D */ 0x044D,
+/* U+042E */ 0x044E,
+/* U+042F */ 0x044F,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0460 */ 0x0461,
+0x00,
+/* U+0462 */ 0x0463,
+0x00,
+/* U+0464 */ 0x0465,
+0x00,
+/* U+0466 */ 0x0467,
+0x00,
+/* U+0468 */ 0x0469,
+0x00,
+/* U+046A */ 0x046B,
+0x00,
+/* U+046C */ 0x046D,
+0x00,
+/* U+046E */ 0x046F,
+0x00,
+/* U+0470 */ 0x0471,
+0x00,
+/* U+0472 */ 0x0473,
+0x00,
+/* U+0474 */ 0x0475,
+0x00,
+/* U+0476 */ 0x0477,
+0x00,
+/* U+0478 */ 0x0479,
+0x00,
+/* U+047A */ 0x047B,
+0x00,
+/* U+047C */ 0x047D,
+0x00,
+/* U+047E */ 0x047F,
+0x00,
+/* U+0480 */ 0x0481,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0490 */ 0x0491,
+0x00,
+/* U+0492 */ 0x0493,
+0x00,
+/* U+0494 */ 0x0495,
+0x00,
+/* U+0496 */ 0x0497,
+0x00,
+/* U+0498 */ 0x0499,
+0x00,
+/* U+049A */ 0x049B,
+0x00,
+/* U+049C */ 0x049D,
+0x00,
+/* U+049E */ 0x049F,
+0x00,
+/* U+04A0 */ 0x04A1,
+0x00,
+/* U+04A2 */ 0x04A3,
+0x00,
+/* U+04A4 */ 0x04A5,
+0x00,
+/* U+04A6 */ 0x04A7,
+0x00,
+/* U+04A8 */ 0x04A9,
+0x00,
+/* U+04AA */ 0x04AB,
+0x00,
+/* U+04AC */ 0x04AD,
+0x00,
+/* U+04AE */ 0x04AF,
+0x00,
+/* U+04B0 */ 0x04B1,
+0x00,
+/* U+04B2 */ 0x04B3,
+0x00,
+/* U+04B4 */ 0x04B5,
+0x00,
+/* U+04B6 */ 0x04B7,
+0x00,
+/* U+04B8 */ 0x04B9,
+0x00,
+/* U+04BA */ 0x04BB,
+0x00,
+/* U+04BC */ 0x04BD,
+0x00,
+/* U+04BE */ 0x04BF,
+0x00,
+0x00,
+/* U+04C1 */ 0x04C2,
+0x00,
+/* U+04C3 */ 0x04C4,
+0x00,
+0x00,
+0x00,
+/* U+04C7 */ 0x04C8,
+0x00,
+0x00,
+0x00,
+/* U+04CB */ 0x04CC,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+04D0 */ 0x04D1,
+0x00,
+/* U+04D2 */ 0x04D3,
+0x00,
+/* U+04D4 */ 0x04D5,
+0x00,
+/* U+04D6 */ 0x04D7,
+0x00,
+/* U+04D8 */ 0x04D9,
+0x00,
+/* U+04DA */ 0x04DB,
+0x00,
+/* U+04DC */ 0x04DD,
+0x00,
+/* U+04DE */ 0x04DF,
+0x00,
+/* U+04E0 */ 0x04E1,
+0x00,
+/* U+04E2 */ 0x04E3,
+0x00,
+/* U+04E4 */ 0x04E5,
+0x00,
+/* U+04E6 */ 0x04E7,
+0x00,
+/* U+04E8 */ 0x04E9,
+0x00,
+/* U+04EA */ 0x04EB,
+0x00,
+0x00,
+0x00,
+/* U+04EE */ 0x04EF,
+0x00,
+/* U+04F0 */ 0x04F1,
+0x00,
+/* U+04F2 */ 0x04F3,
+0x00,
+/* U+04F4 */ 0x04F5,
+0x00,
+0x00,
+0x00,
+/* U+04F8 */ 0x04F9,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0531 */ 0x0561,
+/* U+0532 */ 0x0562,
+/* U+0533 */ 0x0563,
+/* U+0534 */ 0x0564,
+/* U+0535 */ 0x0565,
+/* U+0536 */ 0x0566,
+/* U+0537 */ 0x0567,
+/* U+0538 */ 0x0568,
+/* U+0539 */ 0x0569,
+/* U+053A */ 0x056A,
+/* U+053B */ 0x056B,
+/* U+053C */ 0x056C,
+/* U+053D */ 0x056D,
+/* U+053E */ 0x056E,
+/* U+053F */ 0x056F,
+/* U+0540 */ 0x0570,
+/* U+0541 */ 0x0571,
+/* U+0542 */ 0x0572,
+/* U+0543 */ 0x0573,
+/* U+0544 */ 0x0574,
+/* U+0545 */ 0x0575,
+/* U+0546 */ 0x0576,
+/* U+0547 */ 0x0577,
+/* U+0548 */ 0x0578,
+/* U+0549 */ 0x0579,
+/* U+054A */ 0x057A,
+/* U+054B */ 0x057B,
+/* U+054C */ 0x057C,
+/* U+054D */ 0x057D,
+/* U+054E */ 0x057E,
+/* U+054F */ 0x057F,
+/* U+0550 */ 0x0580,
+/* U+0551 */ 0x0581,
+/* U+0552 */ 0x0582,
+/* U+0553 */ 0x0583,
+/* U+0554 */ 0x0584,
+/* U+0555 */ 0x0585,
+/* U+0556 */ 0x0586,
+};
+
+static const unsigned short ucs_table_10A0[] = {
+/* U+10A0 */ 0x10D0,
+/* U+10A1 */ 0x10D1,
+/* U+10A2 */ 0x10D2,
+/* U+10A3 */ 0x10D3,
+/* U+10A4 */ 0x10D4,
+/* U+10A5 */ 0x10D5,
+/* U+10A6 */ 0x10D6,
+/* U+10A7 */ 0x10D7,
+/* U+10A8 */ 0x10D8,
+/* U+10A9 */ 0x10D9,
+/* U+10AA */ 0x10DA,
+/* U+10AB */ 0x10DB,
+/* U+10AC */ 0x10DC,
+/* U+10AD */ 0x10DD,
+/* U+10AE */ 0x10DE,
+/* U+10AF */ 0x10DF,
+/* U+10B0 */ 0x10E0,
+/* U+10B1 */ 0x10E1,
+/* U+10B2 */ 0x10E2,
+/* U+10B3 */ 0x10E3,
+/* U+10B4 */ 0x10E4,
+/* U+10B5 */ 0x10E5,
+/* U+10B6 */ 0x10E6,
+/* U+10B7 */ 0x10E7,
+/* U+10B8 */ 0x10E8,
+/* U+10B9 */ 0x10E9,
+/* U+10BA */ 0x10EA,
+/* U+10BB */ 0x10EB,
+/* U+10BC */ 0x10EC,
+/* U+10BD */ 0x10ED,
+/* U+10BE */ 0x10EE,
+/* U+10BF */ 0x10EF,
+/* U+10C0 */ 0x10F0,
+/* U+10C1 */ 0x10F1,
+/* U+10C2 */ 0x10F2,
+/* U+10C3 */ 0x10F3,
+/* U+10C4 */ 0x10F4,
+/* U+10C5 */ 0x10F5,
+};
+
+static const unsigned short ucs_table_1E00[] = {
+/* U+1E00 */ 0x1E01,
+0x00,
+/* U+1E02 */ 0x1E03,
+0x00,
+/* U+1E04 */ 0x1E05,
+0x00,
+/* U+1E06 */ 0x1E07,
+0x00,
+/* U+1E08 */ 0x1E09,
+0x00,
+/* U+1E0A */ 0x1E0B,
+0x00,
+/* U+1E0C */ 0x1E0D,
+0x00,
+/* U+1E0E */ 0x1E0F,
+0x00,
+/* U+1E10 */ 0x1E11,
+0x00,
+/* U+1E12 */ 0x1E13,
+0x00,
+/* U+1E14 */ 0x1E15,
+0x00,
+/* U+1E16 */ 0x1E17,
+0x00,
+/* U+1E18 */ 0x1E19,
+0x00,
+/* U+1E1A */ 0x1E1B,
+0x00,
+/* U+1E1C */ 0x1E1D,
+0x00,
+/* U+1E1E */ 0x1E1F,
+0x00,
+/* U+1E20 */ 0x1E21,
+0x00,
+/* U+1E22 */ 0x1E23,
+0x00,
+/* U+1E24 */ 0x1E25,
+0x00,
+/* U+1E26 */ 0x1E27,
+0x00,
+/* U+1E28 */ 0x1E29,
+0x00,
+/* U+1E2A */ 0x1E2B,
+0x00,
+/* U+1E2C */ 0x1E2D,
+0x00,
+/* U+1E2E */ 0x1E2F,
+0x00,
+/* U+1E30 */ 0x1E31,
+0x00,
+/* U+1E32 */ 0x1E33,
+0x00,
+/* U+1E34 */ 0x1E35,
+0x00,
+/* U+1E36 */ 0x1E37,
+0x00,
+/* U+1E38 */ 0x1E39,
+0x00,
+/* U+1E3A */ 0x1E3B,
+0x00,
+/* U+1E3C */ 0x1E3D,
+0x00,
+/* U+1E3E */ 0x1E3F,
+0x00,
+/* U+1E40 */ 0x1E41,
+0x00,
+/* U+1E42 */ 0x1E43,
+0x00,
+/* U+1E44 */ 0x1E45,
+0x00,
+/* U+1E46 */ 0x1E47,
+0x00,
+/* U+1E48 */ 0x1E49,
+0x00,
+/* U+1E4A */ 0x1E4B,
+0x00,
+/* U+1E4C */ 0x1E4D,
+0x00,
+/* U+1E4E */ 0x1E4F,
+0x00,
+/* U+1E50 */ 0x1E51,
+0x00,
+/* U+1E52 */ 0x1E53,
+0x00,
+/* U+1E54 */ 0x1E55,
+0x00,
+/* U+1E56 */ 0x1E57,
+0x00,
+/* U+1E58 */ 0x1E59,
+0x00,
+/* U+1E5A */ 0x1E5B,
+0x00,
+/* U+1E5C */ 0x1E5D,
+0x00,
+/* U+1E5E */ 0x1E5F,
+0x00,
+/* U+1E60 */ 0x1E61,
+0x00,
+/* U+1E62 */ 0x1E63,
+0x00,
+/* U+1E64 */ 0x1E65,
+0x00,
+/* U+1E66 */ 0x1E67,
+0x00,
+/* U+1E68 */ 0x1E69,
+0x00,
+/* U+1E6A */ 0x1E6B,
+0x00,
+/* U+1E6C */ 0x1E6D,
+0x00,
+/* U+1E6E */ 0x1E6F,
+0x00,
+/* U+1E70 */ 0x1E71,
+0x00,
+/* U+1E72 */ 0x1E73,
+0x00,
+/* U+1E74 */ 0x1E75,
+0x00,
+/* U+1E76 */ 0x1E77,
+0x00,
+/* U+1E78 */ 0x1E79,
+0x00,
+/* U+1E7A */ 0x1E7B,
+0x00,
+/* U+1E7C */ 0x1E7D,
+0x00,
+/* U+1E7E */ 0x1E7F,
+0x00,
+/* U+1E80 */ 0x1E81,
+0x00,
+/* U+1E82 */ 0x1E83,
+0x00,
+/* U+1E84 */ 0x1E85,
+0x00,
+/* U+1E86 */ 0x1E87,
+0x00,
+/* U+1E88 */ 0x1E89,
+0x00,
+/* U+1E8A */ 0x1E8B,
+0x00,
+/* U+1E8C */ 0x1E8D,
+0x00,
+/* U+1E8E */ 0x1E8F,
+0x00,
+/* U+1E90 */ 0x1E91,
+0x00,
+/* U+1E92 */ 0x1E93,
+0x00,
+/* U+1E94 */ 0x1E95,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1EA0 */ 0x1EA1,
+0x00,
+/* U+1EA2 */ 0x1EA3,
+0x00,
+/* U+1EA4 */ 0x1EA5,
+0x00,
+/* U+1EA6 */ 0x1EA7,
+0x00,
+/* U+1EA8 */ 0x1EA9,
+0x00,
+/* U+1EAA */ 0x1EAB,
+0x00,
+/* U+1EAC */ 0x1EAD,
+0x00,
+/* U+1EAE */ 0x1EAF,
+0x00,
+/* U+1EB0 */ 0x1EB1,
+0x00,
+/* U+1EB2 */ 0x1EB3,
+0x00,
+/* U+1EB4 */ 0x1EB5,
+0x00,
+/* U+1EB6 */ 0x1EB7,
+0x00,
+/* U+1EB8 */ 0x1EB9,
+0x00,
+/* U+1EBA */ 0x1EBB,
+0x00,
+/* U+1EBC */ 0x1EBD,
+0x00,
+/* U+1EBE */ 0x1EBF,
+0x00,
+/* U+1EC0 */ 0x1EC1,
+0x00,
+/* U+1EC2 */ 0x1EC3,
+0x00,
+/* U+1EC4 */ 0x1EC5,
+0x00,
+/* U+1EC6 */ 0x1EC7,
+0x00,
+/* U+1EC8 */ 0x1EC9,
+0x00,
+/* U+1ECA */ 0x1ECB,
+0x00,
+/* U+1ECC */ 0x1ECD,
+0x00,
+/* U+1ECE */ 0x1ECF,
+0x00,
+/* U+1ED0 */ 0x1ED1,
+0x00,
+/* U+1ED2 */ 0x1ED3,
+0x00,
+/* U+1ED4 */ 0x1ED5,
+0x00,
+/* U+1ED6 */ 0x1ED7,
+0x00,
+/* U+1ED8 */ 0x1ED9,
+0x00,
+/* U+1EDA */ 0x1EDB,
+0x00,
+/* U+1EDC */ 0x1EDD,
+0x00,
+/* U+1EDE */ 0x1EDF,
+0x00,
+/* U+1EE0 */ 0x1EE1,
+0x00,
+/* U+1EE2 */ 0x1EE3,
+0x00,
+/* U+1EE4 */ 0x1EE5,
+0x00,
+/* U+1EE6 */ 0x1EE7,
+0x00,
+/* U+1EE8 */ 0x1EE9,
+0x00,
+/* U+1EEA */ 0x1EEB,
+0x00,
+/* U+1EEC */ 0x1EED,
+0x00,
+/* U+1EEE */ 0x1EEF,
+0x00,
+/* U+1EF0 */ 0x1EF1,
+0x00,
+/* U+1EF2 */ 0x1EF3,
+0x00,
+/* U+1EF4 */ 0x1EF5,
+0x00,
+/* U+1EF6 */ 0x1EF7,
+0x00,
+/* U+1EF8 */ 0x1EF9,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F08 */ 0x1F00,
+/* U+1F09 */ 0x1F01,
+/* U+1F0A */ 0x1F02,
+/* U+1F0B */ 0x1F03,
+/* U+1F0C */ 0x1F04,
+/* U+1F0D */ 0x1F05,
+/* U+1F0E */ 0x1F06,
+/* U+1F0F */ 0x1F07,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F18 */ 0x1F10,
+/* U+1F19 */ 0x1F11,
+/* U+1F1A */ 0x1F12,
+/* U+1F1B */ 0x1F13,
+/* U+1F1C */ 0x1F14,
+/* U+1F1D */ 0x1F15,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F28 */ 0x1F20,
+/* U+1F29 */ 0x1F21,
+/* U+1F2A */ 0x1F22,
+/* U+1F2B */ 0x1F23,
+/* U+1F2C */ 0x1F24,
+/* U+1F2D */ 0x1F25,
+/* U+1F2E */ 0x1F26,
+/* U+1F2F */ 0x1F27,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F38 */ 0x1F30,
+/* U+1F39 */ 0x1F31,
+/* U+1F3A */ 0x1F32,
+/* U+1F3B */ 0x1F33,
+/* U+1F3C */ 0x1F34,
+/* U+1F3D */ 0x1F35,
+/* U+1F3E */ 0x1F36,
+/* U+1F3F */ 0x1F37,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F48 */ 0x1F40,
+/* U+1F49 */ 0x1F41,
+/* U+1F4A */ 0x1F42,
+/* U+1F4B */ 0x1F43,
+/* U+1F4C */ 0x1F44,
+/* U+1F4D */ 0x1F45,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F59 */ 0x1F51,
+0x00,
+/* U+1F5B */ 0x1F53,
+0x00,
+/* U+1F5D */ 0x1F55,
+0x00,
+/* U+1F5F */ 0x1F57,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F68 */ 0x1F60,
+/* U+1F69 */ 0x1F61,
+/* U+1F6A */ 0x1F62,
+/* U+1F6B */ 0x1F63,
+/* U+1F6C */ 0x1F64,
+/* U+1F6D */ 0x1F65,
+/* U+1F6E */ 0x1F66,
+/* U+1F6F */ 0x1F67,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F88 */ 0x0,
+/* U+1F89 */ 0x0,
+/* U+1F8A */ 0x0,
+/* U+1F8B */ 0x0,
+/* U+1F8C */ 0x0,
+/* U+1F8D */ 0x0,
+/* U+1F8E */ 0x0,
+/* U+1F8F */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1F98 */ 0x0,
+/* U+1F99 */ 0x0,
+/* U+1F9A */ 0x0,
+/* U+1F9B */ 0x0,
+/* U+1F9C */ 0x0,
+/* U+1F9D */ 0x0,
+/* U+1F9E */ 0x0,
+/* U+1F9F */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1FA8 */ 0x0,
+/* U+1FA9 */ 0x0,
+/* U+1FAA */ 0x0,
+/* U+1FAB */ 0x0,
+/* U+1FAC */ 0x0,
+/* U+1FAD */ 0x0,
+/* U+1FAE */ 0x0,
+/* U+1FAF */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1FB8 */ 0x1FB0,
+/* U+1FB9 */ 0x1FB1,
+/* U+1FBA */ 0x1F70,
+/* U+1FBB */ 0x1F71,
+/* U+1FBC */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1FC8 */ 0x1F72,
+/* U+1FC9 */ 0x1F73,
+/* U+1FCA */ 0x1F74,
+/* U+1FCB */ 0x1F75,
+/* U+1FCC */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1FD8 */ 0x1FD0,
+/* U+1FD9 */ 0x1FD1,
+/* U+1FDA */ 0x1F76,
+/* U+1FDB */ 0x1F77,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1FE8 */ 0x1FE0,
+/* U+1FE9 */ 0x1FE1,
+/* U+1FEA */ 0x1F7A,
+/* U+1FEB */ 0x1F7B,
+/* U+1FEC */ 0x1FE5,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+1FF8 */ 0x1F78,
+/* U+1FF9 */ 0x1F79,
+/* U+1FFA */ 0x1F7C,
+/* U+1FFB */ 0x1F7D,
+/* U+1FFC */ 0x0,
+};
+
+static const unsigned short ucs_table_2102[] = {
+/* U+2102 */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+210B */ 0x0,
+/* U+210C */ 0x0,
+/* U+210D */ 0x0,
+0x00,
+0x00,
+/* U+2110 */ 0x0,
+/* U+2111 */ 0x0,
+/* U+2112 */ 0x2113,
+0x00,
+0x00,
+/* U+2115 */ 0x0,
+0x00,
+0x00,
+/* U+2118 */ 0x0,
+/* U+2119 */ 0x0,
+/* U+211A */ 0x0,
+/* U+211B */ 0x0,
+/* U+211C */ 0x0,
+/* U+211D */ 0x0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2124 */ 0x0,
+0x00,
+0x00,
+0x00,
+/* U+2128 */ 0x0,
+0x00,
+0x00,
+0x00,
+/* U+212C */ 0x0,
+/* U+212D */ 0x0,
+0x00,
+0x00,
+/* U+2130 */ 0x212F,
+/* U+2131 */ 0x0,
+/* U+2132 */ 0x0,
+/* U+2133 */ 0x0,
+};
+
+static const unsigned short ucs_table_24B6[] = {
+/* U+24B6 */ 0x24D0,
+/* U+24B7 */ 0x24D1,
+/* U+24B8 */ 0x24D2,
+/* U+24B9 */ 0x24D3,
+/* U+24BA */ 0x24D4,
+/* U+24BB */ 0x24D5,
+/* U+24BC */ 0x24D6,
+/* U+24BD */ 0x24D7,
+/* U+24BE */ 0x24D8,
+/* U+24BF */ 0x24D9,
+/* U+24C0 */ 0x24DA,
+/* U+24C1 */ 0x24DB,
+/* U+24C2 */ 0x24DC,
+/* U+24C3 */ 0x24DD,
+/* U+24C4 */ 0x24DE,
+/* U+24C5 */ 0x24DF,
+/* U+24C6 */ 0x24E0,
+/* U+24C7 */ 0x24E1,
+/* U+24C8 */ 0x24E2,
+/* U+24C9 */ 0x24E3,
+/* U+24CA */ 0x24E4,
+/* U+24CB */ 0x24E5,
+/* U+24CC */ 0x24E6,
+/* U+24CD */ 0x24E7,
+/* U+24CE */ 0x24E8,
+/* U+24CF */ 0x24E9,
+};
+
+static const unsigned short ucs_table_33CE[] = {
+/* U+33CE */ 0x0,
+};
+
+static const unsigned short ucs_table_FF21[] = {
+/* U+FF21 */ 0xFF41,
+/* U+FF22 */ 0xFF42,
+/* U+FF23 */ 0xFF43,
+/* U+FF24 */ 0xFF44,
+/* U+FF25 */ 0xFF45,
+/* U+FF26 */ 0xFF46,
+/* U+FF27 */ 0xFF47,
+/* U+FF28 */ 0xFF48,
+/* U+FF29 */ 0xFF49,
+/* U+FF2A */ 0xFF4A,
+/* U+FF2B */ 0xFF4B,
+/* U+FF2C */ 0xFF4C,
+/* U+FF2D */ 0xFF4D,
+/* U+FF2E */ 0xFF4E,
+/* U+FF2F */ 0xFF4F,
+/* U+FF30 */ 0xFF50,
+/* U+FF31 */ 0xFF51,
+/* U+FF32 */ 0xFF52,
+/* U+FF33 */ 0xFF53,
+/* U+FF34 */ 0xFF54,
+/* U+FF35 */ 0xFF55,
+/* U+FF36 */ 0xFF56,
+/* U+FF37 */ 0xFF57,
+/* U+FF38 */ 0xFF58,
+/* U+FF39 */ 0xFF59,
+/* U+FF3A */ 0xFF5A,
+};

Added: branches/branch-3.0/src/core/xutf8/headers/case_tbl.txt
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/case_tbl.txt	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/case_tbl.txt	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,8 @@
+ucs_table_0041[]; 	/* end: U+02B6 */
+ucs_table_0386[]; 	/* end: U+0556 */
+ucs_table_10A0[]; 	/* end: U+10C5 */
+ucs_table_1E00[]; 	/* end: U+1FFC */
+ucs_table_2102[]; 	/* end: U+2133 */
+ucs_table_24B6[]; 	/* end: U+24CF */
+ucs_table_33CE[]; 	/* end: U+33CE */
+ucs_table_FF21[]; 	/* end: U+FF3A */

Added: branches/branch-3.0/src/core/xutf8/headers/dingbats_.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/dingbats_.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/dingbats_.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,565 @@
+/* dingbats */
+
+static const char unicode_to_dingbats_1b_0020[] = {
+/* U+0020 */ 0x20,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+00A0 */ 0x20,
+};
+
+static const char unicode_to_dingbats_1b_2192[] = {
+/* U+2192 */ 0xD5,
+0x00,
+/* U+2194 */ 0xD6,
+/* U+2195 */ 0xD7,
+};
+
+static const char unicode_to_dingbats_1b_2460[] = {
+/* U+2460 */ 0xAC,
+/* U+2461 */ 0xAD,
+/* U+2462 */ 0xAE,
+/* U+2463 */ 0xAF,
+/* U+2464 */ 0xB0,
+/* U+2465 */ 0xB1,
+/* U+2466 */ 0xB2,
+/* U+2467 */ 0xB3,
+/* U+2468 */ 0xB4,
+/* U+2469 */ 0xB5,
+};
+
+static const char unicode_to_dingbats_1b_25A0[] = {
+/* U+25A0 */ 0x6E,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+25B2 */ 0x73,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+25BC */ 0x74,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+25C6 */ 0x75,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+25CF */ 0x6C,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+25D7 */ 0x77,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2605 */ 0x48,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+260E */ 0x25,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+261B */ 0x2A,
+0x00,
+0x00,
+/* U+261E */ 0x2B,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2660 */ 0xAB,
+0x00,
+0x00,
+/* U+2663 */ 0xA8,
+0x00,
+/* U+2665 */ 0xAA,
+/* U+2666 */ 0xA9,
+};
+
+static const char unicode_to_dingbats_1b_2701[] = {
+/* U+2701 */ 0x21,
+/* U+2702 */ 0x22,
+/* U+2703 */ 0x23,
+/* U+2704 */ 0x24,
+0x00,
+/* U+2706 */ 0x26,
+/* U+2707 */ 0x27,
+/* U+2708 */ 0x28,
+/* U+2709 */ 0x29,
+0x00,
+0x00,
+/* U+270C */ 0x2C,
+/* U+270D */ 0x2D,
+/* U+270E */ 0x2E,
+/* U+270F */ 0x2F,
+/* U+2710 */ 0x30,
+/* U+2711 */ 0x31,
+/* U+2712 */ 0x32,
+/* U+2713 */ 0x33,
+/* U+2714 */ 0x34,
+/* U+2715 */ 0x35,
+/* U+2716 */ 0x36,
+/* U+2717 */ 0x37,
+/* U+2718 */ 0x38,
+/* U+2719 */ 0x39,
+/* U+271A */ 0x3A,
+/* U+271B */ 0x3B,
+/* U+271C */ 0x3C,
+/* U+271D */ 0x3D,
+/* U+271E */ 0x3E,
+/* U+271F */ 0x3F,
+/* U+2720 */ 0x40,
+/* U+2721 */ 0x41,
+/* U+2722 */ 0x42,
+/* U+2723 */ 0x43,
+/* U+2724 */ 0x44,
+/* U+2725 */ 0x45,
+/* U+2726 */ 0x46,
+/* U+2727 */ 0x47,
+0x00,
+/* U+2729 */ 0x49,
+/* U+272A */ 0x4A,
+/* U+272B */ 0x4B,
+/* U+272C */ 0x4C,
+/* U+272D */ 0x4D,
+/* U+272E */ 0x4E,
+/* U+272F */ 0x4F,
+/* U+2730 */ 0x50,
+/* U+2731 */ 0x51,
+/* U+2732 */ 0x52,
+/* U+2733 */ 0x53,
+/* U+2734 */ 0x54,
+/* U+2735 */ 0x55,
+/* U+2736 */ 0x56,
+/* U+2737 */ 0x57,
+/* U+2738 */ 0x58,
+/* U+2739 */ 0x59,
+/* U+273A */ 0x5A,
+/* U+273B */ 0x5B,
+/* U+273C */ 0x5C,
+/* U+273D */ 0x5D,
+/* U+273E */ 0x5E,
+/* U+273F */ 0x5F,
+/* U+2740 */ 0x60,
+/* U+2741 */ 0x61,
+/* U+2742 */ 0x62,
+/* U+2743 */ 0x63,
+/* U+2744 */ 0x64,
+/* U+2745 */ 0x65,
+/* U+2746 */ 0x66,
+/* U+2747 */ 0x67,
+/* U+2748 */ 0x68,
+/* U+2749 */ 0x69,
+/* U+274A */ 0x6A,
+/* U+274B */ 0x6B,
+0x00,
+/* U+274D */ 0x6D,
+0x00,
+/* U+274F */ 0x6F,
+/* U+2750 */ 0x70,
+/* U+2751 */ 0x71,
+/* U+2752 */ 0x72,
+0x00,
+0x00,
+0x00,
+/* U+2756 */ 0x76,
+0x00,
+/* U+2758 */ 0x78,
+/* U+2759 */ 0x79,
+/* U+275A */ 0x7A,
+/* U+275B */ 0x7B,
+/* U+275C */ 0x7C,
+/* U+275D */ 0x7D,
+/* U+275E */ 0x7E,
+0x00,
+0x00,
+/* U+2761 */ 0xA1,
+/* U+2762 */ 0xA2,
+/* U+2763 */ 0xA3,
+/* U+2764 */ 0xA4,
+/* U+2765 */ 0xA5,
+/* U+2766 */ 0xA6,
+/* U+2767 */ 0xA7,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2776 */ 0xB6,
+/* U+2777 */ 0xB7,
+/* U+2778 */ 0xB8,
+/* U+2779 */ 0xB9,
+/* U+277A */ 0xBA,
+/* U+277B */ 0xBB,
+/* U+277C */ 0xBC,
+/* U+277D */ 0xBD,
+/* U+277E */ 0xBE,
+/* U+277F */ 0xBF,
+/* U+2780 */ 0xC0,
+/* U+2781 */ 0xC1,
+/* U+2782 */ 0xC2,
+/* U+2783 */ 0xC3,
+/* U+2784 */ 0xC4,
+/* U+2785 */ 0xC5,
+/* U+2786 */ 0xC6,
+/* U+2787 */ 0xC7,
+/* U+2788 */ 0xC8,
+/* U+2789 */ 0xC9,
+/* U+278A */ 0xCA,
+/* U+278B */ 0xCB,
+/* U+278C */ 0xCC,
+/* U+278D */ 0xCD,
+/* U+278E */ 0xCE,
+/* U+278F */ 0xCF,
+/* U+2790 */ 0xD0,
+/* U+2791 */ 0xD1,
+/* U+2792 */ 0xD2,
+/* U+2793 */ 0xD3,
+/* U+2794 */ 0xD4,
+0x00,
+0x00,
+0x00,
+/* U+2798 */ 0xD8,
+/* U+2799 */ 0xD9,
+/* U+279A */ 0xDA,
+/* U+279B */ 0xDB,
+/* U+279C */ 0xDC,
+/* U+279D */ 0xDD,
+/* U+279E */ 0xDE,
+/* U+279F */ 0xDF,
+/* U+27A0 */ 0xE0,
+/* U+27A1 */ 0xE1,
+/* U+27A2 */ 0xE2,
+/* U+27A3 */ 0xE3,
+/* U+27A4 */ 0xE4,
+/* U+27A5 */ 0xE5,
+/* U+27A6 */ 0xE6,
+/* U+27A7 */ 0xE7,
+/* U+27A8 */ 0xE8,
+/* U+27A9 */ 0xE9,
+/* U+27AA */ 0xEA,
+/* U+27AB */ 0xEB,
+/* U+27AC */ 0xEC,
+/* U+27AD */ 0xED,
+/* U+27AE */ 0xEE,
+/* U+27AF */ 0xEF,
+0x00,
+/* U+27B1 */ 0xF1,
+/* U+27B2 */ 0xF2,
+/* U+27B3 */ 0xF3,
+/* U+27B4 */ 0xF4,
+/* U+27B5 */ 0xF5,
+/* U+27B6 */ 0xF6,
+/* U+27B7 */ 0xF7,
+/* U+27B8 */ 0xF8,
+/* U+27B9 */ 0xF9,
+/* U+27BA */ 0xFA,
+/* U+27BB */ 0xFB,
+/* U+27BC */ 0xFC,
+/* U+27BD */ 0xFD,
+/* U+27BE */ 0xFE,
+};
+
+static const char unicode_to_dingbats_1b_F8D7[] = {
+/* U+F8D7 */ 0x80,
+/* U+F8D8 */ 0x81,
+/* U+F8D9 */ 0x82,
+/* U+F8DA */ 0x83,
+/* U+F8DB */ 0x84,
+/* U+F8DC */ 0x85,
+/* U+F8DD */ 0x86,
+/* U+F8DE */ 0x87,
+/* U+F8DF */ 0x88,
+/* U+F8E0 */ 0x89,
+/* U+F8E1 */ 0x8A,
+/* U+F8E2 */ 0x8B,
+/* U+F8E3 */ 0x8C,
+/* U+F8E4 */ 0x8D,
+};

Added: branches/branch-3.0/src/core/xutf8/headers/spacing.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/spacing.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/spacing.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1978 @@
+/* spacing */
+
+static const unsigned short ucs_table_0300[] = {
+/* U+0300 */ 0x0060,
+/* U+0301 */ 0x00B4,
+/* U+0302 */ 0x005E,
+/* U+0303 */ 0x02DC,
+/* U+0304 */ 0x00AF,
+/* U+0305 */ 0x203E,
+/* U+0306 */ 0x02D8,
+/* U+0307 */ 0x02D9,
+/* U+0308 */ 0x00A8,
+/* U+0309 */ 0x0309,
+/* U+030A */ 0x02DA,
+/* U+030B */ 0x02DD,
+/* U+030C */ 0x030C,
+/* U+030D */ 0x030D,
+/* U+030E */ 0x030E,
+/* U+030F */ 0x030F,
+/* U+0310 */ 0x0310,
+/* U+0311 */ 0x0311,
+/* U+0312 */ 0x0312,
+/* U+0313 */ 0x1FBD,
+/* U+0314 */ 0x1FFE,
+/* U+0315 */ 0x0315,
+/* U+0316 */ 0x0316,
+/* U+0317 */ 0x0317,
+/* U+0318 */ 0x0318,
+/* U+0319 */ 0x0319,
+/* U+031A */ 0x031A,
+/* U+031B */ 0x031B,
+/* U+031C */ 0x031C,
+/* U+031D */ 0x031D,
+/* U+031E */ 0x031E,
+/* U+031F */ 0x031F,
+/* U+0320 */ 0x0320,
+/* U+0321 */ 0x0321,
+/* U+0322 */ 0x0322,
+/* U+0323 */ 0x0323,
+/* U+0324 */ 0x0324,
+/* U+0325 */ 0x0325,
+/* U+0326 */ 0x0326,
+/* U+0327 */ 0x00B8,
+/* U+0328 */ 0x02DB,
+/* U+0329 */ 0x0329,
+/* U+032A */ 0x032A,
+/* U+032B */ 0x032B,
+/* U+032C */ 0x032C,
+/* U+032D */ 0x032D,
+/* U+032E */ 0x032E,
+/* U+032F */ 0x032F,
+/* U+0330 */ 0x0330,
+/* U+0331 */ 0x0331,
+/* U+0332 */ 0x005F,
+/* U+0333 */ 0x2017,
+/* U+0334 */ 0x0334,
+/* U+0335 */ 0x0335,
+/* U+0336 */ 0x0336,
+/* U+0337 */ 0x0337,
+/* U+0338 */ 0x0338,
+/* U+0339 */ 0x0339,
+/* U+033A */ 0x033A,
+/* U+033B */ 0x033B,
+/* U+033C */ 0x033C,
+/* U+033D */ 0x033D,
+/* U+033E */ 0x033E,
+/* U+033F */ 0x033F,
+/* U+0340 */ 0x0340,
+/* U+0341 */ 0x0341,
+/* U+0342 */ 0x1FC0,
+/* U+0343 */ 0x0343,
+/* U+0344 */ 0x0344,
+/* U+0345 */ 0x037A,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0360 */ 0x0360,
+/* U+0361 */ 0x0361,
+};
+
+static const unsigned short ucs_table_0483[] = {
+/* U+0483 */ 0x0483,
+/* U+0484 */ 0x0484,
+/* U+0485 */ 0x0485,
+/* U+0486 */ 0x0486,
+};
+
+static const unsigned short ucs_table_0591[] = {
+/* U+0591 */ 0x0591,
+/* U+0592 */ 0x0592,
+/* U+0593 */ 0x0593,
+/* U+0594 */ 0x0594,
+/* U+0595 */ 0x0595,
+/* U+0596 */ 0x0596,
+/* U+0597 */ 0x0597,
+/* U+0598 */ 0x0598,
+/* U+0599 */ 0x0599,
+/* U+059A */ 0x059A,
+/* U+059B */ 0x059B,
+/* U+059C */ 0x059C,
+/* U+059D */ 0x059D,
+/* U+059E */ 0x059E,
+/* U+059F */ 0x059F,
+/* U+05A0 */ 0x05A0,
+/* U+05A1 */ 0x05A1,
+0x00,
+/* U+05A3 */ 0x05A3,
+/* U+05A4 */ 0x05A4,
+/* U+05A5 */ 0x05A5,
+/* U+05A6 */ 0x05A6,
+/* U+05A7 */ 0x05A7,
+/* U+05A8 */ 0x05A8,
+/* U+05A9 */ 0x05A9,
+/* U+05AA */ 0x05AA,
+/* U+05AB */ 0x05AB,
+/* U+05AC */ 0x05AC,
+/* U+05AD */ 0x05AD,
+/* U+05AE */ 0x05AE,
+/* U+05AF */ 0x05AF,
+/* U+05B0 */ 0x05B0,
+/* U+05B1 */ 0x05B1,
+/* U+05B2 */ 0x05B2,
+/* U+05B3 */ 0x05B3,
+/* U+05B4 */ 0x05B4,
+/* U+05B5 */ 0x05B5,
+/* U+05B6 */ 0x05B6,
+/* U+05B7 */ 0x05B7,
+/* U+05B8 */ 0x05B8,
+/* U+05B9 */ 0x05B9,
+0x00,
+/* U+05BB */ 0x05BB,
+/* U+05BC */ 0x05BC,
+/* U+05BD */ 0x05BD,
+0x00,
+/* U+05BF */ 0x05BF,
+0x00,
+/* U+05C1 */ 0x05C1,
+/* U+05C2 */ 0x05C2,
+0x00,
+/* U+05C4 */ 0x05C4,
+};
+
+static const unsigned short ucs_table_064B[] = {
+/* U+064B */ 0xFE70,
+/* U+064C */ 0xFE72,
+/* U+064D */ 0xFE74,
+/* U+064E */ 0xFE76,
+/* U+064F */ 0xFE78,
+/* U+0650 */ 0xFE7A,
+/* U+0651 */ 0xFE7C,
+/* U+0652 */ 0xFE7E,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0670 */ 0x0670,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+06D6 */ 0x06D6,
+/* U+06D7 */ 0x06D7,
+/* U+06D8 */ 0x06D8,
+/* U+06D9 */ 0x06D9,
+/* U+06DA */ 0x06DA,
+/* U+06DB */ 0x06DB,
+/* U+06DC */ 0x06DC,
+0x00,
+0x00,
+/* U+06DF */ 0x06DF,
+/* U+06E0 */ 0x06E0,
+/* U+06E1 */ 0x06E1,
+/* U+06E2 */ 0x06E2,
+/* U+06E3 */ 0x06E3,
+/* U+06E4 */ 0x06E4,
+0x00,
+0x00,
+/* U+06E7 */ 0x06E7,
+/* U+06E8 */ 0x06E8,
+0x00,
+/* U+06EA */ 0x06EA,
+/* U+06EB */ 0x06EB,
+/* U+06EC */ 0x06EC,
+/* U+06ED */ 0x06ED,
+};
+
+static const unsigned short ucs_table_0901[] = {
+/* U+0901 */ 0x0901,
+/* U+0902 */ 0x0902,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+093C */ 0x093C,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0941 */ 0x0941,
+/* U+0942 */ 0x0942,
+/* U+0943 */ 0x0943,
+/* U+0944 */ 0x0944,
+/* U+0945 */ 0x0945,
+/* U+0946 */ 0x0946,
+/* U+0947 */ 0x0947,
+/* U+0948 */ 0x0948,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+094D */ 0x094D,
+0x00,
+0x00,
+0x00,
+/* U+0951 */ 0x0951,
+/* U+0952 */ 0x0952,
+/* U+0953 */ 0x0953,
+/* U+0954 */ 0x0954,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0962 */ 0x0962,
+/* U+0963 */ 0x0963,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0981 */ 0x0981,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+09BC */ 0x09BC,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+09C1 */ 0x09C1,
+/* U+09C2 */ 0x09C2,
+/* U+09C3 */ 0x09C3,
+/* U+09C4 */ 0x09C4,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+09CD */ 0x09CD,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+09E2 */ 0x09E2,
+/* U+09E3 */ 0x09E3,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0A02 */ 0x0A02,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0A3C */ 0x0A3C,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0A41 */ 0x0A41,
+/* U+0A42 */ 0x0A42,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0A47 */ 0x0A47,
+/* U+0A48 */ 0x0A48,
+0x00,
+0x00,
+/* U+0A4B */ 0x0A4B,
+/* U+0A4C */ 0x0A4C,
+/* U+0A4D */ 0x0A4D,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0A70 */ 0x0A70,
+/* U+0A71 */ 0x0A71,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0A81 */ 0x0A81,
+/* U+0A82 */ 0x0A82,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0ABC */ 0x0ABC,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0AC1 */ 0x0AC1,
+/* U+0AC2 */ 0x0AC2,
+/* U+0AC3 */ 0x0AC3,
+/* U+0AC4 */ 0x0AC4,
+/* U+0AC5 */ 0x0AC5,
+0x00,
+/* U+0AC7 */ 0x0AC7,
+/* U+0AC8 */ 0x0AC8,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0ACD */ 0x0ACD,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0B01 */ 0x0B01,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0B3C */ 0x0B3C,
+0x00,
+0x00,
+/* U+0B3F */ 0x0B3F,
+0x00,
+/* U+0B41 */ 0x0B41,
+/* U+0B42 */ 0x0B42,
+/* U+0B43 */ 0x0B43,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0B4D */ 0x0B4D,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0B56 */ 0x0B56,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0B82 */ 0x0B82,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0BC0 */ 0x0BC0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0BCD */ 0x0BCD,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0C3E */ 0x0C3E,
+/* U+0C3F */ 0x0C3F,
+/* U+0C40 */ 0x0C40,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0C46 */ 0x0C46,
+/* U+0C47 */ 0x0C47,
+/* U+0C48 */ 0x0C48,
+0x00,
+/* U+0C4A */ 0x0C4A,
+/* U+0C4B */ 0x0C4B,
+/* U+0C4C */ 0x0C4C,
+/* U+0C4D */ 0x0C4D,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0C55 */ 0x0C55,
+/* U+0C56 */ 0x0C56,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0CBF */ 0x0CBF,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0CC6 */ 0x0CC6,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0CCC */ 0x0CCC,
+/* U+0CCD */ 0x0CCD,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0D41 */ 0x0D41,
+/* U+0D42 */ 0x0D42,
+/* U+0D43 */ 0x0D43,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0D4D */ 0x0D4D,
+};
+
+static const unsigned short ucs_table_0E31[] = {
+/* U+0E31 */ 0x0E31,
+0x00,
+0x00,
+/* U+0E34 */ 0x0E34,
+/* U+0E35 */ 0x0E35,
+/* U+0E36 */ 0x0E36,
+/* U+0E37 */ 0x0E37,
+/* U+0E38 */ 0x0E38,
+/* U+0E39 */ 0x0E39,
+/* U+0E3A */ 0x0E3A,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0E47 */ 0x0E47,
+/* U+0E48 */ 0x0E48,
+/* U+0E49 */ 0x0E49,
+/* U+0E4A */ 0x0E4A,
+/* U+0E4B */ 0x0E4B,
+/* U+0E4C */ 0x0E4C,
+/* U+0E4D */ 0x0E4D,
+/* U+0E4E */ 0x0E4E,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0EB1 */ 0x0EB1,
+0x00,
+0x00,
+/* U+0EB4 */ 0x0EB4,
+/* U+0EB5 */ 0x0EB5,
+/* U+0EB6 */ 0x0EB6,
+/* U+0EB7 */ 0x0EB7,
+/* U+0EB8 */ 0x0EB8,
+/* U+0EB9 */ 0x0EB9,
+0x00,
+/* U+0EBB */ 0x0EBB,
+/* U+0EBC */ 0x0EBC,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0EC8 */ 0x0EC8,
+/* U+0EC9 */ 0x0EC9,
+/* U+0ECA */ 0x0ECA,
+/* U+0ECB */ 0x0ECB,
+/* U+0ECC */ 0x0ECC,
+/* U+0ECD */ 0x0ECD,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0F18 */ 0x0F18,
+/* U+0F19 */ 0x0F19,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0F35 */ 0x0F35,
+0x00,
+/* U+0F37 */ 0x0F37,
+0x00,
+/* U+0F39 */ 0x0F39,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0F71 */ 0x0F71,
+/* U+0F72 */ 0x0F72,
+/* U+0F73 */ 0x0F73,
+/* U+0F74 */ 0x0F74,
+/* U+0F75 */ 0x0F75,
+/* U+0F76 */ 0x0F76,
+/* U+0F77 */ 0x0F77,
+/* U+0F78 */ 0x0F78,
+/* U+0F79 */ 0x0F79,
+/* U+0F7A */ 0x0F7A,
+/* U+0F7B */ 0x0F7B,
+/* U+0F7C */ 0x0F7C,
+/* U+0F7D */ 0x0F7D,
+/* U+0F7E */ 0x0F7E,
+0x00,
+/* U+0F80 */ 0x0F80,
+/* U+0F81 */ 0x0F81,
+/* U+0F82 */ 0x0F82,
+/* U+0F83 */ 0x0F83,
+/* U+0F84 */ 0x0F84,
+0x00,
+/* U+0F86 */ 0x0F86,
+/* U+0F87 */ 0x0F87,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+0F90 */ 0x0F90,
+/* U+0F91 */ 0x0F91,
+/* U+0F92 */ 0x0F92,
+/* U+0F93 */ 0x0F93,
+/* U+0F94 */ 0x0F94,
+/* U+0F95 */ 0x0F95,
+0x00,
+/* U+0F97 */ 0x0F97,
+0x00,
+/* U+0F99 */ 0x0F99,
+/* U+0F9A */ 0x0F9A,
+/* U+0F9B */ 0x0F9B,
+/* U+0F9C */ 0x0F9C,
+/* U+0F9D */ 0x0F9D,
+/* U+0F9E */ 0x0F9E,
+/* U+0F9F */ 0x0F9F,
+/* U+0FA0 */ 0x0FA0,
+/* U+0FA1 */ 0x0FA1,
+/* U+0FA2 */ 0x0FA2,
+/* U+0FA3 */ 0x0FA3,
+/* U+0FA4 */ 0x0FA4,
+/* U+0FA5 */ 0x0FA5,
+/* U+0FA6 */ 0x0FA6,
+/* U+0FA7 */ 0x0FA7,
+/* U+0FA8 */ 0x0FA8,
+/* U+0FA9 */ 0x0FA9,
+/* U+0FAA */ 0x0FAA,
+/* U+0FAB */ 0x0FAB,
+/* U+0FAC */ 0x0FAC,
+/* U+0FAD */ 0x0FAD,
+0x00,
+0x00,
+0x00,
+/* U+0FB1 */ 0x0FB1,
+/* U+0FB2 */ 0x0FB2,
+/* U+0FB3 */ 0x0FB3,
+/* U+0FB4 */ 0x0FB4,
+/* U+0FB5 */ 0x0FB5,
+/* U+0FB6 */ 0x0FB6,
+/* U+0FB7 */ 0x0FB7,
+0x00,
+/* U+0FB9 */ 0x0FB9,
+};
+
+static const unsigned short ucs_table_20D0[] = {
+/* U+20D0 */ 0x20D0,
+/* U+20D1 */ 0x20D1,
+/* U+20D2 */ 0x20D2,
+/* U+20D3 */ 0x20D3,
+/* U+20D4 */ 0x20D4,
+/* U+20D5 */ 0x20D5,
+/* U+20D6 */ 0x20D6,
+/* U+20D7 */ 0x20D7,
+/* U+20D8 */ 0x20D8,
+/* U+20D9 */ 0x20D9,
+/* U+20DA */ 0x20DA,
+/* U+20DB */ 0x20DB,
+/* U+20DC */ 0x20DC,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+20E1 */ 0x20E1,
+};
+
+static const unsigned short ucs_table_302A[] = {
+/* U+302A */ 0x302A,
+/* U+302B */ 0x302B,
+/* U+302C */ 0x302C,
+/* U+302D */ 0x302D,
+/* U+302E */ 0x302E,
+/* U+302F */ 0x302F,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+3099 */ 0x309B,
+/* U+309A */ 0x309C,
+};
+
+static const unsigned short ucs_table_FB1E[] = {
+/* U+FB1E */ 0xFB1E,
+};
+
+static const unsigned short ucs_table_FE20[] = {
+/* U+FE20 */ 0xFE20,
+/* U+FE21 */ 0xFE21,
+/* U+FE22 */ 0xFE22,
+/* U+FE23 */ 0xFE23,
+};

Added: branches/branch-3.0/src/core/xutf8/headers/spacing_tbl.txt
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/spacing_tbl.txt	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/spacing_tbl.txt	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,10 @@
+ucs_table_0300[]; 	/* end: U+0361 */
+ucs_table_0483[]; 	/* end: U+0486 */
+ucs_table_0591[]; 	/* end: U+05C4 */
+ucs_table_064B[]; 	/* end: U+06ED */
+ucs_table_0901[]; 	/* end: U+0D4D */
+ucs_table_0E31[]; 	/* end: U+0FB9 */
+ucs_table_20D0[]; 	/* end: U+20E1 */
+ucs_table_302A[]; 	/* end: U+309A */
+ucs_table_FB1E[]; 	/* end: U+FB1E */
+ucs_table_FE20[]; 	/* end: U+FE23 */

Added: branches/branch-3.0/src/core/xutf8/headers/symbol_.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/symbol_.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/symbol_.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1126 @@
+/* symbol */
+
+static const char unicode_to_symbol_1b_0020[] = {
+/* U+0020 */ 0x20,
+/* U+0021 */ 0x21,
+0x00,
+/* U+0023 */ 0x23,
+0x00,
+/* U+0025 */ 0x25,
+/* U+0026 */ 0x26,
+0x00,
+/* U+0028 */ 0x28,
+/* U+0029 */ 0x29,
+0x00,
+/* U+002B */ 0x2B,
+/* U+002C */ 0x2C,
+0x00,
+/* U+002E */ 0x2E,
+/* U+002F */ 0x2F,
+/* U+0030 */ 0x30,
+/* U+0031 */ 0x31,
+/* U+0032 */ 0x32,
+/* U+0033 */ 0x33,
+/* U+0034 */ 0x34,
+/* U+0035 */ 0x35,
+/* U+0036 */ 0x36,
+/* U+0037 */ 0x37,
+/* U+0038 */ 0x38,
+/* U+0039 */ 0x39,
+/* U+003A */ 0x3A,
+/* U+003B */ 0x3B,
+/* U+003C */ 0x3C,
+/* U+003D */ 0x3D,
+/* U+003E */ 0x3E,
+/* U+003F */ 0x3F,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+005B */ 0x5B,
+0x00,
+/* U+005D */ 0x5D,
+0x00,
+/* U+005F */ 0x5F,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+007B */ 0x7B,
+/* U+007C */ 0x7C,
+/* U+007D */ 0x7D,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+00A0 */ 0x20,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+00AC */ 0xD8,
+0x00,
+0x00,
+0x00,
+/* U+00B0 */ 0xB0,
+/* U+00B1 */ 0xB1,
+0x00,
+0x00,
+0x00,
+/* U+00B5 */ 0x6D,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+00D7 */ 0xB4,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+00F7 */ 0xB8,
+};
+
+static const char unicode_to_symbol_1b_0192[] = {
+/* U+0192 */ 0xA6,
+};
+
+static const char unicode_to_symbol_1b_0391[] = {
+/* U+0391 */ 0x41,
+/* U+0392 */ 0x42,
+/* U+0393 */ 0x47,
+/* U+0394 */ 0x44,
+/* U+0395 */ 0x45,
+/* U+0396 */ 0x5A,
+/* U+0397 */ 0x48,
+/* U+0398 */ 0x51,
+/* U+0399 */ 0x49,
+/* U+039A */ 0x4B,
+/* U+039B */ 0x4C,
+/* U+039C */ 0x4D,
+/* U+039D */ 0x4E,
+/* U+039E */ 0x58,
+/* U+039F */ 0x4F,
+/* U+03A0 */ 0x50,
+/* U+03A1 */ 0x52,
+0x00,
+/* U+03A3 */ 0x53,
+/* U+03A4 */ 0x54,
+/* U+03A5 */ 0x55,
+/* U+03A6 */ 0x46,
+/* U+03A7 */ 0x43,
+/* U+03A8 */ 0x59,
+/* U+03A9 */ 0x57,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+03B1 */ 0x61,
+/* U+03B2 */ 0x62,
+/* U+03B3 */ 0x67,
+/* U+03B4 */ 0x64,
+/* U+03B5 */ 0x65,
+/* U+03B6 */ 0x7A,
+/* U+03B7 */ 0x68,
+/* U+03B8 */ 0x71,
+/* U+03B9 */ 0x69,
+/* U+03BA */ 0x6B,
+/* U+03BB */ 0x6C,
+/* U+03BC */ 0x6D,
+/* U+03BD */ 0x6E,
+/* U+03BE */ 0x78,
+/* U+03BF */ 0x6F,
+/* U+03C0 */ 0x70,
+/* U+03C1 */ 0x72,
+/* U+03C2 */ 0x56,
+/* U+03C3 */ 0x73,
+/* U+03C4 */ 0x74,
+/* U+03C5 */ 0x75,
+/* U+03C6 */ 0x66,
+/* U+03C7 */ 0x63,
+/* U+03C8 */ 0x79,
+/* U+03C9 */ 0x77,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+03D1 */ 0x4A,
+/* U+03D2 */ 0xA1,
+0x00,
+0x00,
+/* U+03D5 */ 0x6A,
+/* U+03D6 */ 0x76,
+};
+
+static const char unicode_to_symbol_1b_2022[] = {
+/* U+2022 */ 0xB7,
+0x00,
+0x00,
+0x00,
+/* U+2026 */ 0xBC,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2032 */ 0xA2,
+/* U+2033 */ 0xB2,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2044 */ 0xA4,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+20AC */ 0xA0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2111 */ 0xC1,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2118 */ 0xC3,
+0x00,
+0x00,
+0x00,
+/* U+211C */ 0xC2,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2126 */ 0x57,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2135 */ 0xC0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2190 */ 0xAC,
+/* U+2191 */ 0xAD,
+/* U+2192 */ 0xAE,
+/* U+2193 */ 0xAF,
+/* U+2194 */ 0xAB,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+21B5 */ 0xBF,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+21D0 */ 0xDC,
+/* U+21D1 */ 0xDD,
+/* U+21D2 */ 0xDE,
+/* U+21D3 */ 0xDF,
+/* U+21D4 */ 0xDB,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2200 */ 0x22,
+0x00,
+/* U+2202 */ 0xB6,
+/* U+2203 */ 0x24,
+0x00,
+/* U+2205 */ 0xC6,
+/* U+2206 */ 0x44,
+/* U+2207 */ 0xD1,
+/* U+2208 */ 0xCE,
+/* U+2209 */ 0xCF,
+0x00,
+/* U+220B */ 0x27,
+0x00,
+0x00,
+0x00,
+/* U+220F */ 0xD5,
+0x00,
+/* U+2211 */ 0xE5,
+/* U+2212 */ 0x2D,
+0x00,
+0x00,
+/* U+2215 */ 0xA4,
+0x00,
+/* U+2217 */ 0x2A,
+0x00,
+0x00,
+/* U+221A */ 0xD6,
+0x00,
+0x00,
+/* U+221D */ 0xB5,
+/* U+221E */ 0xA5,
+0x00,
+/* U+2220 */ 0xD0,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2227 */ 0xD9,
+/* U+2228 */ 0xDA,
+/* U+2229 */ 0xC7,
+/* U+222A */ 0xC8,
+/* U+222B */ 0xF2,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2234 */ 0x5C,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+223C */ 0x7E,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2245 */ 0x40,
+0x00,
+0x00,
+/* U+2248 */ 0xBB,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2260 */ 0xB9,
+/* U+2261 */ 0xBA,
+0x00,
+0x00,
+/* U+2264 */ 0xA3,
+/* U+2265 */ 0xB3,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2282 */ 0xCC,
+/* U+2283 */ 0xC9,
+/* U+2284 */ 0xCB,
+0x00,
+/* U+2286 */ 0xCD,
+/* U+2287 */ 0xCA,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2295 */ 0xC5,
+0x00,
+/* U+2297 */ 0xC4,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+22A5 */ 0x5E,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+22C5 */ 0xD7,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2320 */ 0xF3,
+/* U+2321 */ 0xF5,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2329 */ 0xE1,
+/* U+232A */ 0xF1,
+};
+
+static const char unicode_to_symbol_1b_25CA[] = {
+/* U+25CA */ 0xE0,
+};
+
+static const char unicode_to_symbol_1b_2660[] = {
+/* U+2660 */ 0xAA,
+0x00,
+0x00,
+/* U+2663 */ 0xA7,
+0x00,
+/* U+2665 */ 0xA9,
+/* U+2666 */ 0xA8,
+};
+
+static const char unicode_to_symbol_1b_F6D9[] = {
+/* U+F6D9 */ 0xD3,
+/* U+F6DA */ 0xD2,
+/* U+F6DB */ 0xD4,
+};
+
+static const char unicode_to_symbol_1b_F8E5[] = {
+/* U+F8E5 */ 0x60,
+/* U+F8E6 */ 0xBD,
+/* U+F8E7 */ 0xBE,
+/* U+F8E8 */ 0xE2,
+/* U+F8E9 */ 0xE3,
+/* U+F8EA */ 0xE4,
+/* U+F8EB */ 0xE6,
+/* U+F8EC */ 0xE7,
+/* U+F8ED */ 0xE8,
+/* U+F8EE */ 0xE9,
+/* U+F8EF */ 0xEA,
+/* U+F8F0 */ 0xEB,
+/* U+F8F1 */ 0xEC,
+/* U+F8F2 */ 0xED,
+/* U+F8F3 */ 0xEE,
+/* U+F8F4 */ 0xEF,
+/* U+F8F5 */ 0xF4,
+/* U+F8F6 */ 0xF6,
+/* U+F8F7 */ 0xF7,
+/* U+F8F8 */ 0xF8,
+/* U+F8F9 */ 0xF9,
+/* U+F8FA */ 0xFA,
+/* U+F8FB */ 0xFB,
+/* U+F8FC */ 0xFC,
+/* U+F8FD */ 0xFD,
+/* U+F8FE */ 0xFE,
+};

Added: branches/branch-3.0/src/core/xutf8/headers/tbl.txt
===================================================================
--- branches/branch-3.0/src/core/xutf8/headers/tbl.txt	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/headers/tbl.txt	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,122 @@
+unicode_to_iso8859_1_1b_0001[]; 	/* end: U+00FF */
+unicode_to_iso8859_2_1b_0001[]; 	/* end: U+017E */
+unicode_to_iso8859_2_1b_02C7[]; 	/* end: U+02DD */
+unicode_to_iso8859_3_1b_0001[]; 	/* end: U+017C */
+unicode_to_iso8859_3_1b_02D8[]; 	/* end: U+02D9 */
+unicode_to_iso8859_4_1b_0001[]; 	/* end: U+017E */
+unicode_to_iso8859_4_1b_02C7[]; 	/* end: U+02DB */
+unicode_to_iso8859_5_1b_0001[]; 	/* end: U+00AD */
+unicode_to_iso8859_5_1b_0401[]; 	/* end: U+045F */
+unicode_to_iso8859_5_1b_2116[]; 	/* end: U+2116 */
+unicode_to_iso8859_6_1b_0001[]; 	/* end: U+00AD */
+unicode_to_iso8859_6_1b_060C[]; 	/* end: U+0652 */
+unicode_to_iso8859_7_1b_0001[]; 	/* end: U+00BD */
+unicode_to_iso8859_7_1b_0384[]; 	/* end: U+03CE */
+unicode_to_iso8859_7_1b_2015[]; 	/* end: U+2019 */
+unicode_to_iso8859_8_1b_0001[]; 	/* end: U+00F7 */
+unicode_to_iso8859_8_1b_05D0[]; 	/* end: U+05EA */
+unicode_to_iso8859_8_1b_200E[]; 	/* end: U+2017 */
+unicode_to_iso8859_9_1b_0001[]; 	/* end: U+015F */
+unicode_to_iso8859_10_1b_0001[]; 	/* end: U+017E */
+unicode_to_iso8859_10_1b_2015[]; 	/* end: U+2015 */
+unicode_to_iso8859_13_1b_0001[]; 	/* end: U+017E */
+unicode_to_iso8859_13_1b_2019[]; 	/* end: U+201E */
+unicode_to_iso8859_14_1b_0001[]; 	/* end: U+0178 */
+unicode_to_iso8859_14_1b_1E02[]; 	/* end: U+1EF3 */
+unicode_to_iso8859_15_1b_0001[]; 	/* end: U+017E */
+unicode_to_iso8859_15_1b_20AC[]; 	/* end: U+20AC */
+unicode_to_koi8_1_1b_0001[]; 	/* end: U+00F7 */
+unicode_to_koi8_1_1b_0401[]; 	/* end: U+0451 */
+unicode_to_koi8_1_1b_2219[]; 	/* end: U+2265 */
+unicode_to_koi8_1_1b_2320[]; 	/* end: U+2321 */
+unicode_to_koi8_1_1b_2500[]; 	/* end: U+25A0 */
+unicode_to_big5_0_2b_00A2[]; 	/* end: U+00F7 */
+unicode_to_big5_0_2b_02C7[]; 	/* end: U+02D9 */
+unicode_to_big5_0_2b_0391[]; 	/* end: U+0451 */
+unicode_to_big5_0_2b_2013[]; 	/* end: U+203E */
+unicode_to_big5_0_2b_2103[]; 	/* end: U+2199 */
+unicode_to_big5_0_2b_221A[]; 	/* end: U+22BF */
+unicode_to_big5_0_2b_2460[]; 	/* end: U+247D */
+unicode_to_big5_0_2b_2500[]; 	/* end: U+2642 */
+unicode_to_big5_0_2b_3000[]; 	/* end: U+3129 */
+unicode_to_big5_0_2b_32A3[]; 	/* end: U+32A3 */
+unicode_to_big5_0_2b_338E[]; 	/* end: U+33D5 */
+unicode_to_big5_0_2b_4E00[]; 	/* end: U+7E9C */
+unicode_to_big5_0_2b_7F36[]; 	/* end: U+8B9F */
+unicode_to_big5_0_2b_8C37[]; 	/* end: U+9483 */
+unicode_to_big5_0_2b_9577[]; 	/* end: U+9FA4 */
+unicode_to_big5_0_2b_FA0C[]; 	/* end: U+FA0D */
+unicode_to_big5_0_2b_FE30[]; 	/* end: U+FE6B */
+unicode_to_big5_0_2b_FF01[]; 	/* end: U+FF64 */
+unicode_to_big5_0_2b_FFFD[]; 	/* end: U+FFFD */
+unicode_to_ksc5601_1987_0_2b_00A1[]; 	/* end: U+0167 */
+unicode_to_ksc5601_1987_0_2b_02C7[]; 	/* end: U+02DD */
+unicode_to_ksc5601_1987_0_2b_0391[]; 	/* end: U+0451 */
+unicode_to_ksc5601_1987_0_2b_2015[]; 	/* end: U+2312 */
+unicode_to_ksc5601_1987_0_2b_2460[]; 	/* end: U+266D */
+unicode_to_ksc5601_1987_0_2b_3000[]; 	/* end: U+327F */
+unicode_to_ksc5601_1987_0_2b_3380[]; 	/* end: U+33DD */
+unicode_to_ksc5601_1987_0_2b_4E00[]; 	/* end: U+7E9C */
+unicode_to_ksc5601_1987_0_2b_7F36[]; 	/* end: U+8B9A */
+unicode_to_ksc5601_1987_0_2b_8C37[]; 	/* end: U+947F */
+unicode_to_ksc5601_1987_0_2b_9577[]; 	/* end: U+9C57 */
+unicode_to_ksc5601_1987_0_2b_9CE5[]; 	/* end: U+9F9C */
+unicode_to_ksc5601_1987_0_2b_AC00[]; 	/* end: U+D79D */
+unicode_to_ksc5601_1987_0_2b_F900[]; 	/* end: U+FA0B */
+unicode_to_ksc5601_1987_0_2b_FF01[]; 	/* end: U+FF5E */
+unicode_to_ksc5601_1987_0_2b_FFE0[]; 	/* end: U+FFE6 */
+unicode_to_gb2312_1980_0_2b_00A4[]; 	/* end: U+01DC */
+unicode_to_gb2312_1980_0_2b_02C7[]; 	/* end: U+02C9 */
+unicode_to_gb2312_1980_0_2b_0391[]; 	/* end: U+0451 */
+unicode_to_gb2312_1980_0_2b_2015[]; 	/* end: U+203B */
+unicode_to_gb2312_1980_0_2b_2103[]; 	/* end: U+2312 */
+unicode_to_gb2312_1980_0_2b_2460[]; 	/* end: U+2642 */
+unicode_to_gb2312_1980_0_2b_3000[]; 	/* end: U+3129 */
+unicode_to_gb2312_1980_0_2b_3220[]; 	/* end: U+3229 */
+unicode_to_gb2312_1980_0_2b_4E00[]; 	/* end: U+7DAE */
+unicode_to_gb2312_1980_0_2b_7E3B[]; 	/* end: U+8C98 */
+unicode_to_gb2312_1980_0_2b_8D1D[]; 	/* end: U+8ECE */
+unicode_to_gb2312_1980_0_2b_8F66[]; 	/* end: U+91DC */
+unicode_to_gb2312_1980_0_2b_9274[]; 	/* end: U+99A8 */
+unicode_to_gb2312_1980_0_2b_9A6C[]; 	/* end: U+9B54 */
+unicode_to_gb2312_1980_0_2b_9C7C[]; 	/* end: U+9CE2 */
+unicode_to_gb2312_1980_0_2b_9E1F[]; 	/* end: U+9FA0 */
+unicode_to_gb2312_1980_0_2b_FF01[]; 	/* end: U+FF5E */
+unicode_to_gb2312_1980_0_2b_FFE0[]; 	/* end: U+FFE5 */
+unicode_to_jisx0201_1976_0_1b_0020[]; 	/* end: U+00A5 */
+unicode_to_jisx0201_1976_0_1b_203E[]; 	/* end: U+203E */
+unicode_to_jisx0201_1976_0_1b_FF61[]; 	/* end: U+FF9F */
+unicode_to_jisx0208_1983_0_2b_005C[]; 	/* end: U+00F7 */
+unicode_to_jisx0208_1983_0_2b_0391[]; 	/* end: U+0451 */
+unicode_to_jisx0208_1983_0_2b_2010[]; 	/* end: U+203B */
+unicode_to_jisx0208_1983_0_2b_2103[]; 	/* end: U+2312 */
+unicode_to_jisx0208_1983_0_2b_2500[]; 	/* end: U+266F */
+unicode_to_jisx0208_1983_0_2b_3000[]; 	/* end: U+30FE */
+unicode_to_jisx0208_1983_0_2b_4E00[]; 	/* end: U+7E9C */
+unicode_to_jisx0208_1983_0_2b_7F36[]; 	/* end: U+8B9A */
+unicode_to_jisx0208_1983_0_2b_8C37[]; 	/* end: U+9481 */
+unicode_to_jisx0208_1983_0_2b_9577[]; 	/* end: U+9FA0 */
+unicode_to_jisx0208_1983_0_2b_FF01[]; 	/* end: U+FF5D */
+unicode_to_jisx0208_1983_0_2b_FFE3[]; 	/* end: U+FFE5 */
+unicode_to_jisx0212_1990_0_2b_007E[]; 	/* end: U+01F5 */
+unicode_to_jisx0212_1990_0_2b_02C7[]; 	/* end: U+02DD */
+unicode_to_jisx0212_1990_0_2b_0384[]; 	/* end: U+045F */
+unicode_to_jisx0212_1990_0_2b_2116[]; 	/* end: U+2122 */
+unicode_to_jisx0212_1990_0_2b_4E02[]; 	/* end: U+7E9E */
+unicode_to_jisx0212_1990_0_2b_7F3B[]; 	/* end: U+8B9F */
+unicode_to_jisx0212_1990_0_2b_8C38[]; 	/* end: U+9484 */
+unicode_to_jisx0212_1990_0_2b_9578[]; 	/* end: U+9FA5 */
+unicode_to_symbol_1b_0020[]; 	/* end: U+00F7 */
+unicode_to_symbol_1b_0192[]; 	/* end: U+0192 */
+unicode_to_symbol_1b_0391[]; 	/* end: U+03D6 */
+unicode_to_symbol_1b_2022[]; 	/* end: U+232A */
+unicode_to_symbol_1b_25CA[]; 	/* end: U+25CA */
+unicode_to_symbol_1b_2660[]; 	/* end: U+2666 */
+unicode_to_symbol_1b_F6D9[]; 	/* end: U+F6DB */
+unicode_to_symbol_1b_F8E5[]; 	/* end: U+F8FE */
+unicode_to_dingbats_1b_0020[]; 	/* end: U+00A0 */
+unicode_to_dingbats_1b_2192[]; 	/* end: U+2195 */
+unicode_to_dingbats_1b_2460[]; 	/* end: U+2469 */
+unicode_to_dingbats_1b_25A0[]; 	/* end: U+2666 */
+unicode_to_dingbats_1b_2701[]; 	/* end: U+27BE */
+unicode_to_dingbats_1b_F8D7[]; 	/* end: U+F8E4 */

Added: branches/branch-3.0/src/core/xutf8/imKStoUCS.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/imKStoUCS.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/imKStoUCS.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,324 @@
+/* $XFree86: xc/lib/X11/imKStoUCS.c,v 1.5 2003/11/17 22:20:11 dawes Exp $ */
+
+#include "Xlibint.h"
+#include "Ximint.h"
+
+static unsigned short const keysym_to_unicode_1a1_1ff[] = {
+            0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, /* 0x01a0-0x01a7 */
+    0x0000, 0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, /* 0x01a8-0x01af */
+    0x0000, 0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, /* 0x01b0-0x01b7 */
+    0x0000, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, /* 0x01b8-0x01bf */
+    0x0154, 0x0000, 0x0000, 0x0102, 0x0000, 0x0139, 0x0106, 0x0000, /* 0x01c0-0x01c7 */
+    0x010c, 0x0000, 0x0118, 0x0000, 0x011a, 0x0000, 0x0000, 0x010e, /* 0x01c8-0x01cf */
+    0x0110, 0x0143, 0x0147, 0x0000, 0x0000, 0x0150, 0x0000, 0x0000, /* 0x01d0-0x01d7 */
+    0x0158, 0x016e, 0x0000, 0x0170, 0x0000, 0x0000, 0x0162, 0x0000, /* 0x01d8-0x01df */
+    0x0155, 0x0000, 0x0000, 0x0103, 0x0000, 0x013a, 0x0107, 0x0000, /* 0x01e0-0x01e7 */
+    0x010d, 0x0000, 0x0119, 0x0000, 0x011b, 0x0000, 0x0000, 0x010f, /* 0x01e8-0x01ef */
+    0x0111, 0x0144, 0x0148, 0x0000, 0x0000, 0x0151, 0x0000, 0x0000, /* 0x01f0-0x01f7 */
+    0x0159, 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9  /* 0x01f8-0x01ff */
+};
+
+static unsigned short const keysym_to_unicode_2a1_2fe[] = {
+            0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, /* 0x02a0-0x02a7 */
+    0x0000, 0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, /* 0x02a8-0x02af */
+    0x0000, 0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, /* 0x02b0-0x02b7 */
+    0x0000, 0x0131, 0x0000, 0x011f, 0x0135, 0x0000, 0x0000, 0x0000, /* 0x02b8-0x02bf */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x010a, 0x0108, 0x0000, /* 0x02c0-0x02c7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x02c8-0x02cf */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0120, 0x0000, 0x0000, /* 0x02d0-0x02d7 */
+    0x011c, 0x0000, 0x0000, 0x0000, 0x0000, 0x016c, 0x015c, 0x0000, /* 0x02d8-0x02df */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x010b, 0x0109, 0x0000, /* 0x02e0-0x02e7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x02e8-0x02ef */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0121, 0x0000, 0x0000, /* 0x02f0-0x02f7 */
+    0x011d, 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d          /* 0x02f8-0x02ff */
+};
+
+static unsigned short const keysym_to_unicode_3a2_3fe[] = {
+                    0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, /* 0x03a0-0x03a7 */
+    0x0000, 0x0000, 0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, /* 0x03a8-0x03af */
+    0x0000, 0x0000, 0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, /* 0x03b0-0x03b7 */
+    0x0000, 0x0000, 0x0113, 0x0123, 0x0167, 0x014a, 0x0000, 0x014b, /* 0x03b8-0x03bf */
+    0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012e, /* 0x03c0-0x03c7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0116, 0x0000, 0x0000, 0x012a, /* 0x03c8-0x03cf */
+    0x0000, 0x0145, 0x014c, 0x0136, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x03d0-0x03d7 */
+    0x0000, 0x0172, 0x0000, 0x0000, 0x0000, 0x0168, 0x016a, 0x0000, /* 0x03d8-0x03df */
+    0x0101, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012f, /* 0x03e0-0x03e7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0117, 0x0000, 0x0000, 0x012b, /* 0x03e8-0x03ef */
+    0x0000, 0x0146, 0x014d, 0x0137, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x03f0-0x03f7 */
+    0x0000, 0x0173, 0x0000, 0x0000, 0x0000, 0x0169, 0x016b          /* 0x03f8-0x03ff */
+};
+
+static unsigned short const keysym_to_unicode_4a1_4df[] = {
+            0x3002, 0x3008, 0x3009, 0x3001, 0x30fb, 0x30f2, 0x30a1, /* 0x04a0-0x04a7 */
+    0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, /* 0x04a8-0x04af */
+    0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, 0x30ab, 0x30ad, /* 0x04b0-0x04b7 */
+    0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, 0x30bb, 0x30bd, /* 0x04b8-0x04bf */
+    0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, 0x30cb, 0x30cc, /* 0x04c0-0x04c7 */
+    0x30cd, 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, 0x30db, 0x30de, /* 0x04c8-0x04cf */
+    0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e4, 0x30e6, 0x30e8, 0x30e9, /* 0x04d0-0x04d7 */
+    0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, 0x309b, 0x309c  /* 0x04d8-0x04df */
+};
+
+static unsigned short const keysym_to_unicode_590_5fe[] = {
+    0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */
+    0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */
+	
+    0x067e, 0x0686, 0x0688, 0x0691, 0x060c, 0x0000, 0x06d4, 0x0000, /* 0x05ac-0x05af */
+    0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, /* 0x05b0-0x05b7 */
+    0x0668, 0x0669, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, /* 0x05b8-0x05bf */
+    0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, /* 0x05c0-0x05c7 */
+    0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, /* 0x05c8-0x05cf */
+    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, /* 0x05d0-0x05d7 */
+    0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x05d8-0x05df */
+    0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, /* 0x05e0-0x05e7 */
+    0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, /* 0x05e8-0x05ef */
+    0x0650, 0x0651, 0x0652, 0x0653, 0x0654, 0x0655, 0x0698, 0x06a4, /* 0x05f0-0x05f7 */
+    0x06a9, 0x06af, 0x06ba, 0x06be, 0x06cc, 0x06d2, 0x06c1          /* 0x05f8-0x05fe */
+};
+
+static unsigned short keysym_to_unicode_680_6ff[] = {
+    0x0492, 0x0496, 0x049a, 0x049c, 0x04a2, 0x04ae, 0x04b0, 0x04b2, /* 0x0680-0x0687 */
+    0x04b6, 0x04b8, 0x04ba, 0x0000, 0x04d8, 0x04e2, 0x04e8, 0x04ee, /* 0x0688-0x068f */
+    0x0493, 0x0497, 0x049b, 0x049d, 0x04a3, 0x04af, 0x04b1, 0x04b3, /* 0x0690-0x0697 */
+    0x04b7, 0x04b9, 0x04bb, 0x0000, 0x04d9, 0x04e3, 0x04e9, 0x04ef, /* 0x0698-0x069f */
+    0x0000, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, /* 0x06a0-0x06a7 */
+    0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x0491, 0x045e, 0x045f, /* 0x06a8-0x06af */
+    0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, /* 0x06b0-0x06b7 */
+    0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x0490, 0x040e, 0x040f, /* 0x06b8-0x06bf */
+    0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0x06c0-0x06c7 */
+    0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0x06c8-0x06cf */
+    0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0x06d0-0x06d7 */
+    0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0x06d8-0x06df */
+    0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0x06e0-0x06e7 */
+    0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0x06e8-0x06ef */
+    0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0x06f0-0x06f7 */
+    0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a  /* 0x06f8-0x06ff */
+};
+
+static unsigned short const keysym_to_unicode_7a1_7f9[] = {
+            0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, /* 0x07a0-0x07a7 */
+    0x038e, 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, /* 0x07a8-0x07af */
+    0x0000, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, /* 0x07b0-0x07b7 */
+    0x03cd, 0x03cb, 0x03b0, 0x03ce, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x07b8-0x07bf */
+    0x0000, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, /* 0x07c0-0x07c7 */
+    0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, /* 0x07c8-0x07cf */
+    0x03a0, 0x03a1, 0x03a3, 0x0000, 0x03a4, 0x03a5, 0x03a6, 0x03a7, /* 0x07d0-0x07d7 */
+    0x03a8, 0x03a9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x07d8-0x07df */
+    0x0000, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, /* 0x07e0-0x07e7 */
+    0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, /* 0x07e8-0x07ef */
+    0x03c0, 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, /* 0x07f0-0x07f7 */
+    0x03c8, 0x03c9                                                  /* 0x07f8-0x07ff */
+};
+
+static unsigned short const keysym_to_unicode_8a4_8fe[] = {
+                                    0x2320, 0x2321, 0x0000, 0x231c, /* 0x08a0-0x08a7 */
+    0x231d, 0x231e, 0x231f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08a8-0x08af */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08b0-0x08b7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, /* 0x08b8-0x08bf */
+    0x2234, 0x0000, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, /* 0x08c0-0x08c7 */
+    0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x22a2, 0x0000, /* 0x08c8-0x08cf */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, /* 0x08d0-0x08d7 */
+    0x0000, 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, /* 0x08d8-0x08df */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e0-0x08e7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e8-0x08ef */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, /* 0x08f0-0x08f7 */
+    0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193          /* 0x08f8-0x08ff */
+};
+
+static unsigned short const keysym_to_unicode_9df_9f8[] = {
+                                                            0x2422, /* 0x09d8-0x09df */
+    0x2666, 0x25a6, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, /* 0x09e0-0x09e7 */
+    0x240a, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x2500, /* 0x09e8-0x09ef */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x251c, 0x2524, 0x2534, 0x252c, /* 0x09f0-0x09f7 */
+    0x2502                                                          /* 0x09f8-0x09ff */
+};
+
+static unsigned short const keysym_to_unicode_aa1_afe[] = {
+            0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, /* 0x0aa0-0x0aa7 */
+    0x200a, 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, /* 0x0aa8-0x0aaf */
+    0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, /* 0x0ab0-0x0ab7 */
+    0x2105, 0x0000, 0x0000, 0x2012, 0x2039, 0x2024, 0x203a, 0x0000, /* 0x0ab8-0x0abf */
+    0x0000, 0x0000, 0x0000, 0x215b, 0x215c, 0x215d, 0x215e, 0x0000, /* 0x0ac0-0x0ac7 */
+    0x0000, 0x2122, 0x2120, 0x0000, 0x25c1, 0x25b7, 0x25cb, 0x25ad, /* 0x0ac8-0x0acf */
+    0x2018, 0x2019, 0x201c, 0x201d, 0x211e, 0x0000, 0x2032, 0x2033, /* 0x0ad0-0x0ad7 */
+    0x0000, 0x271d, 0x0000, 0x220e, 0x25c2, 0x2023, 0x25cf, 0x25ac, /* 0x0ad8-0x0adf */
+    0x25e6, 0x25ab, 0x25ae, 0x25b5, 0x25bf, 0x2606, 0x2022, 0x25aa, /* 0x0ae0-0x0ae7 */
+    0x25b4, 0x25be, 0x261a, 0x261b, 0x2663, 0x2666, 0x2665, 0x0000, /* 0x0ae8-0x0aef */
+    0x2720, 0x2020, 0x2021, 0x2713, 0x2612, 0x266f, 0x266d, 0x2642, /* 0x0af0-0x0af7 */
+    0x2640, 0x2121, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e          /* 0x0af8-0x0aff */
+};
+
+/* none of the APL keysyms match the Unicode characters */
+
+static unsigned short const keysym_to_unicode_cdf_cfa[] = {
+                                                            0x2017, /* 0x0cd8-0x0cdf */
+    0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, /* 0x0ce0-0x0ce7 */
+    0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, /* 0x0ce8-0x0cef */
+    0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, /* 0x0cf0-0x0cf7 */
+    0x05e8, 0x05e9, 0x05ea                                          /* 0x0cf8-0x0cff */
+};
+
+static unsigned short const keysym_to_unicode_da1_df9[] = {
+            0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, /* 0x0da0-0x0da7 */
+    0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, /* 0x0da8-0x0daf */
+    0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, /* 0x0db0-0x0db7 */
+    0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, /* 0x0db8-0x0dbf */
+    0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, /* 0x0dc0-0x0dc7 */
+    0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, /* 0x0dc8-0x0dcf */
+    0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, /* 0x0dd0-0x0dd7 */
+    0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0e3e, 0x0e3f, /* 0x0dd8-0x0ddf */
+    0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, /* 0x0de0-0x0de7 */
+    0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0000, 0x0000, /* 0x0de8-0x0def */
+    0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, /* 0x0df0-0x0df7 */
+    0x0e58, 0x0e59                                                  /* 0x0df8-0x0dff */
+};
+
+static unsigned short const keysym_to_unicode_ea0_eff[] = {
+    0x0000, 0x1101, 0x1101, 0x11aa, 0x1102, 0x11ac, 0x11ad, 0x1103, /* 0x0ea0-0x0ea7 */
+    0x1104, 0x1105, 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, 0x11b5, /* 0x0ea8-0x0eaf */
+    0x11b6, 0x1106, 0x1107, 0x1108, 0x11b9, 0x1109, 0x110a, 0x110b, /* 0x0eb0-0x0eb7 */
+    0x110c, 0x110d, 0x110e, 0x110f, 0x1110, 0x1111, 0x1112, 0x1161, /* 0x0eb8-0x0ebf */
+    0x1162, 0x1163, 0x1164, 0x1165, 0x1166, 0x1167, 0x1168, 0x1169, /* 0x0ec0-0x0ec7 */
+    0x116a, 0x116b, 0x116c, 0x116d, 0x116e, 0x116f, 0x1170, 0x1171, /* 0x0ec8-0x0ecf */
+    0x1172, 0x1173, 0x1174, 0x1175, 0x11a8, 0x11a9, 0x11aa, 0x11ab, /* 0x0ed0-0x0ed7 */
+    0x11ac, 0x11ad, 0x11ae, 0x11af, 0x11b0, 0x11b1, 0x11b2, 0x11b3, /* 0x0ed8-0x0edf */
+    0x11b4, 0x11b5, 0x11b6, 0x11b7, 0x11b8, 0x11b9, 0x11ba, 0x11bb, /* 0x0ee0-0x0ee7 */
+    0x11bc, 0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x0000, /* 0x0ee8-0x0eef */
+    0x0000, 0x0000, 0x1140, 0x0000, 0x0000, 0x1159, 0x119e, 0x0000, /* 0x0ef0-0x0ef7 */
+    0x11eb, 0x0000, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9, /* 0x0ef8-0x0eff */
+};
+
+static unsigned short keysym_to_unicode_12a1_12fe[] = {
+            0x1e02, 0x1e03, 0x0000, 0x0000, 0x0000, 0x1e0a, 0x0000, /* 0x12a0-0x12a7 */
+    0x1e80, 0x0000, 0x1e82, 0x1e0b, 0x1ef2, 0x0000, 0x0000, 0x0000, /* 0x12a8-0x12af */
+    0x1e1e, 0x1e1f, 0x0000, 0x0000, 0x1e40, 0x1e41, 0x0000, 0x1e56, /* 0x12b0-0x12b7 */
+    0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, /* 0x12b8-0x12bf */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12c0-0x12c7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12c8-0x12cf */
+    0x0174, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6a, /* 0x12d0-0x12d7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0176, 0x0000, /* 0x12d8-0x12df */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12e0-0x12e7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12e8-0x12ef */
+    0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177          /* 0x12f0-0x12ff */
+};
+		
+static unsigned short const keysym_to_unicode_13bc_13be[] = {
+                                    0x0152, 0x0153, 0x0178          /* 0x13b8-0x13bf */
+};
+
+static unsigned short keysym_to_unicode_14a1_14ff[] = {
+            0x2741, 0x00a7, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, /* 0x14a0-0x14a7 */
+    0x2014, 0x002e, 0x055d, 0x002c, 0x2013, 0x058a, 0x2026, 0x055c, /* 0x14a8-0x14af */
+    0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563, /* 0x14b0-0x14b7 */
+    0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567, /* 0x14b8-0x14bf */
+    0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b, /* 0x14c0-0x14c7 */
+    0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f, /* 0x14c8-0x14cf */
+    0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573, /* 0x14d0-0x14d7 */
+    0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577, /* 0x14d8-0x14df */
+    0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b, /* 0x14e0-0x14e7 */
+    0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f, /* 0x14e8-0x14ef */
+    0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583, /* 0x14f0-0x14f7 */
+    0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x2019, 0x0027, /* 0x14f8-0x14ff */
+};
+
+static unsigned short keysym_to_unicode_15d0_15f6[] = {
+    0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7, /* 0x15d0-0x15d7 */
+    0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df, /* 0x15d8-0x15df */
+    0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10e4, 0x10e5, 0x10e6, 0x10e7, /* 0x15e0-0x15e7 */
+    0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec, 0x10ed, 0x10ee, 0x10ef, /* 0x15e8-0x15ef */
+    0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6          /* 0x15f0-0x15f7 */
+};
+
+static unsigned short keysym_to_unicode_16a0_16f6[] = {
+    0x0000, 0x0000, 0xf0a2, 0x1e8a, 0x0000, 0xf0a5, 0x012c, 0xf0a7, /* 0x16a0-0x16a7 */
+    0xf0a8, 0x01b5, 0x01e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x019f, /* 0x16a8-0x16af */
+    0x0000, 0x0000, 0xf0b2, 0x1e8b, 0x01d1, 0xf0b5, 0x012d, 0xf0b7, /* 0x16b0-0x16b7 */
+    0xf0b8, 0x01b6, 0x01e7, 0x0000, 0x0000, 0x01d2, 0x0000, 0x0275, /* 0x16b8-0x16bf */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x018f, 0x0000, /* 0x16c0-0x16c7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16c8-0x16cf */
+    0x0000, 0x1e36, 0xf0d2, 0xf0d3, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16d0-0x16d7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16d8-0x16df */
+    0x0000, 0x1e37, 0xf0e2, 0xf0e3, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16e0-0x16e7 */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16e8-0x16ef */
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0259          /* 0x16f0-0x16f6 */
+};
+
+static unsigned short const keysym_to_unicode_1e9f_1eff[] = {
+                                                            0x0303,
+    0x1ea0, 0x1ea1, 0x1ea2, 0x1ea3, 0x1ea4, 0x1ea5, 0x1ea6, 0x1ea7, /* 0x1ea0-0x1ea7 */
+    0x1ea8, 0x1ea9, 0x1eaa, 0x1eab, 0x1eac, 0x1ead, 0x1eae, 0x1eaf, /* 0x1ea8-0x1eaf */
+    0x1eb0, 0x1eb1, 0x1eb2, 0x1eb3, 0x1eb4, 0x1eb5, 0x1eb6, 0x1eb7, /* 0x1eb0-0x1eb7 */
+    0x1eb8, 0x1eb9, 0x1eba, 0x1ebb, 0x1ebc, 0x1ebd, 0x1ebe, 0x1ebf, /* 0x1eb8-0x1ebf */
+    0x1ec0, 0x1ec1, 0x1ec2, 0x1ec3, 0x1ec4, 0x1ec5, 0x1ec6, 0x1ec7, /* 0x1ec0-0x1ec7 */
+    0x1ec8, 0x1ec9, 0x1eca, 0x1ecb, 0x1ecc, 0x1ecd, 0x1ece, 0x1ecf, /* 0x1ec8-0x1ecf */
+    0x1ed0, 0x1ed1, 0x1ed2, 0x1ed3, 0x1ed4, 0x1ed5, 0x1ed6, 0x1ed7, /* 0x1ed0-0x1ed7 */
+    0x1ed8, 0x1ed9, 0x1eda, 0x1edb, 0x1edc, 0x1edd, 0x1ede, 0x1edf, /* 0x1ed8-0x1edf */
+    0x1ee0, 0x1ee1, 0x1ee2, 0x1ee3, 0x1ee4, 0x1ee5, 0x1ee6, 0x1ee7, /* 0x1ee0-0x1ee7 */
+    0x1ee8, 0x1ee9, 0x1eea, 0x1eeb, 0x1eec, 0x1eed, 0x1eee, 0x1eef, /* 0x1ee8-0x1eef */
+    0x1ef0, 0x1ef1, 0x0300, 0x0301, 0x1ef4, 0x1ef5, 0x1ef6, 0x1ef7, /* 0x1ef0-0x1ef7 */
+    0x1ef8, 0x1ef9, 0x01a0, 0x01a1, 0x01af, 0x01b0, 0x0309, 0x0323  /* 0x1ef8-0x1eff */
+};
+
+static unsigned short const keysym_to_unicode_20a0_20ac[] = {
+    0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, /* 0x20a0-0x20a7 */
+    0x20a8, 0x20a9, 0x20aa, 0x20ab, 0x20ac                          /* 0x20a8-0x20af */
+};
+
+unsigned int
+KeySymToUcs4(KeySym keysym)
+{
+    /* 'Unicode keysym' */
+    if ((keysym & 0xff000000) == 0x01000000)
+        return (keysym & 0x00ffffff);
+
+    if (keysym > 0 && keysym < 0x100)
+	return keysym;
+    else if (keysym > 0x1a0 && keysym < 0x200)
+	return keysym_to_unicode_1a1_1ff[keysym - 0x1a1];
+    else if (keysym > 0x2a0 && keysym < 0x2ff)
+	return keysym_to_unicode_2a1_2fe[keysym - 0x2a1];
+    else if (keysym > 0x3a1 && keysym < 0x3ff)
+	return keysym_to_unicode_3a2_3fe[keysym - 0x3a2];
+    else if (keysym > 0x4a0 && keysym < 0x4e0)
+	return keysym_to_unicode_4a1_4df[keysym - 0x4a1];
+    else if (keysym > 0x589 && keysym < 0x5ff)
+	return keysym_to_unicode_590_5fe[keysym - 0x590];
+    else if (keysym > 0x67f && keysym < 0x700)
+	return keysym_to_unicode_680_6ff[keysym - 0x680];
+    else if (keysym > 0x7a0 && keysym < 0x7fa)
+	return keysym_to_unicode_7a1_7f9[keysym - 0x7a1];
+    else if (keysym > 0x8a3 && keysym < 0x8ff)
+	return keysym_to_unicode_8a4_8fe[keysym - 0x8a4];
+    else if (keysym > 0x9de && keysym < 0x9f9)
+	return keysym_to_unicode_9df_9f8[keysym - 0x9df];
+    else if (keysym > 0xaa0 && keysym < 0xaff)
+	return keysym_to_unicode_aa1_afe[keysym - 0xaa1];
+    else if (keysym > 0xcde && keysym < 0xcfb)
+	return keysym_to_unicode_cdf_cfa[keysym - 0xcdf];
+    else if (keysym > 0xda0 && keysym < 0xdfa)
+	return keysym_to_unicode_da1_df9[keysym - 0xda1];
+    else if (keysym > 0xe9f && keysym < 0xf00)
+	return keysym_to_unicode_ea0_eff[keysym - 0xea0];
+    else if (keysym > 0x12a0 && keysym < 0x12ff)
+	return keysym_to_unicode_12a1_12fe[keysym - 0x12a1];
+    else if (keysym > 0x13bb && keysym < 0x13bf)
+	return keysym_to_unicode_13bc_13be[keysym - 0x13bc];
+    else if (keysym > 0x14a0 && keysym < 0x1500)
+        return keysym_to_unicode_14a1_14ff[keysym - 0x14a1];
+    else if (keysym > 0x15cf && keysym < 0x15f7)
+	return keysym_to_unicode_15d0_15f6[keysym - 0x15d0];
+    else if (keysym > 0x169f && keysym < 0x16f7)
+	return keysym_to_unicode_16a0_16f6[keysym - 0x16a0];
+    else if (keysym > 0x1e9e && keysym < 0x1f00)
+	return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f];
+    else if (keysym > 0x209f && keysym < 0x20ad)
+	return keysym_to_unicode_20a0_20ac[keysym - 0x20a0];
+    else 
+	return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/is_right2left.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/is_right2left.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/is_right2left.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,84 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2010 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ * This file is required on all platforms for utf8 support
+ */
+
+unsigned short 
+XUtf8IsRightToLeft(unsigned int ucs) {
+
+#if 0
+  /* for debug only */
+  if (ucs <= 0x005A) {
+    if (ucs >= 0x0041) return 1;
+    return 0;
+  }
+#endif
+
+  /* HEBREW */
+  if (ucs <= 0x05F4) {
+    if (ucs >= 0x0591) return 1;
+    return 0;
+  }
+  
+  /* ARABIC */
+  if (ucs <= 0x06ED) {
+    if (ucs >= 0x060C)  return 1;
+    return 0;
+  }
+
+  if (ucs <= 0x06F9) {
+    if (ucs >= 0x06F0) return 1;
+    return 0;
+  }
+
+  if (ucs == 0x200F) return 1;
+
+  if (ucs == 0x202B) return 1;
+
+  if (ucs == 0x202E) return 1;
+
+  if (ucs <= 0xFB4F) {
+    if (ucs >= 0xFB1E) return 1;
+    return 0;
+  }
+  
+  if (ucs <= 0xFDFB) {
+    if (ucs >= 0xFB50) return 1;
+    return 0;
+  }
+
+  if (ucs <= 0xFEFC) {
+    if (ucs >= 0xFE70) return 1;
+    return 0;
+  }
+
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/is_spacing.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/is_spacing.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/is_spacing.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,90 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2010 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ * This file is required on all platforms for utf8 support
+ */
+
+#include "headers/spacing.h"
+
+unsigned short 
+XUtf8IsNonSpacing(unsigned int ucs) {
+
+  if (ucs <= 0x0361) {
+    if (ucs >= 0x0300) return ucs_table_0300[ucs - 0x0300];
+    return 0;
+  }
+
+  if (ucs <= 0x0486) {
+    if (ucs >= 0x0483) return ucs_table_0483[ucs - 0x0483];
+    return 0;
+  }
+
+  if (ucs <= 0x05C4) {
+    if (ucs >= 0x0591) return ucs_table_0591[ucs - 0x0591];
+    return 0;
+  }
+
+  if (ucs <= 0x06ED) {
+    if (ucs >= 0x064B) return ucs_table_064B[ucs - 0x064B];
+    return 0;
+  }
+
+  if (ucs <= 0x0D4D) {
+    if (ucs >= 0x0901) return ucs_table_0901[ucs - 0x0901];
+    return 0;
+  }
+
+  if (ucs <= 0x0FB9) {
+    if (ucs >= 0x0E31) return ucs_table_0E31[ucs - 0x0E31];
+    return 0;
+  }
+
+  if (ucs <= 0x20E1) {
+    if (ucs >= 0x20D0) return ucs_table_20D0[ucs - 0x20D0];
+    return 0;
+  }
+
+  if (ucs <= 0x309A) {
+    if (ucs >= 0x302A) return ucs_table_302A[ucs - 0x302A];
+    return 0;
+  }
+
+  if (ucs <= 0xFB1E) {
+    if (ucs >= 0xFB1E) return ucs_table_FB1E[ucs - 0xFB1E];
+    return 0;
+  }
+
+  if (ucs <= 0xFE23) {
+    if (ucs >= 0xFE20) return ucs_table_FE20[ucs - 0xFE20];
+    return 0;
+  }
+
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/keysym2Ucs.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/keysym2Ucs.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/keysym2Ucs.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,41 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#define KEYSYM2UCS_INCLUDED
+
+#if !defined(WIN32) && !defined(__APPLE__)
+
+#include "../../fltk3/Xutf8.h"
+#include "imKStoUCS.c"
+
+long XKeysymToUcs(KeySym keysym) {
+  return (long) KeySymToUcs4(keysym);
+}
+
+#endif /* X11 only */
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/8bit_tab_to_h.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/8bit_tab_to_h.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/8bit_tab_to_h.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,536 @@
+/* $XFree86: xc/lib/X11/lcUniConv/8bit_tab_to_h.c,v 1.3 2001/02/09 00:02:54 dawes Exp $ */
+
+/*
+ * Generates an 8-bit character set table from a .TXT table as found on
+ * ftp.unicode.org or from a table containing the 256 Unicode values as
+ * hexadecimal integers.
+ * Examples:
+ *
+ *   ./8bit_tab_to_h ISO-8859-1 iso8859_1 < tab8859_1
+ *   ./8bit_tab_to_h ISO-8859-2 iso8859_2 < tab8859_2
+ *   ./8bit_tab_to_h ISO-8859-3 iso8859_3 < tab8859_3
+ *   ./8bit_tab_to_h ISO-8859-4 iso8859_4 < tab8859_4
+ *   ./8bit_tab_to_h ISO-8859-5 iso8859_5 < tab8859_5
+ *   ./8bit_tab_to_h ISO-8859-6 iso8859_6 < tab8859_6
+ *   ./8bit_tab_to_h ISO-8859-7 iso8859_7 < tab8859_7
+ *   ./8bit_tab_to_h ISO-8859-8 iso8859_8 < tab8859_8
+ *   ./8bit_tab_to_h ISO-8859-9 iso8859_9 < tab8859_9
+ *   ./8bit_tab_to_h ISO-8859-10 iso8859_10 < tab8859_10
+ *   ./8bit_tab_to_h ISO-8859-14 iso8859_14 < tab8859_14
+ *   ./8bit_tab_to_h ISO-8859-15 iso8859_15 < tab8859_15
+ *   ./8bit_tab_to_h JISX0201.1976-0 jisx0201 < jis0201
+ *   ./8bit_tab_to_h TIS620-0 tis620 < tabtis620
+ *   ./8bit_tab_to_h KOI8-R koi8_r < tabkoi8_r
+ *   ./8bit_tab_to_h KOI8-U koi8_u < tabkoi8_u
+ *   ./8bit_tab_to_h ARMSCII-8 armscii_8 < tabarmscii_8
+ *   ./8bit_tab_to_h CP1133 cp1133 < tabibm_cp1133
+ *   ./8bit_tab_to_h MULELAO-1 mulelao < tabmulelao_1
+ *   ./8bit_tab_to_h VISCII1.1-1 viscii1 < tabviscii
+ *   ./8bit_tab_to_h TCVN-5712 tcvn < tabtcvn
+ *   ./8bit_tab_to_h GEORGIAN-ACADEMY georgian_ac < tabgeorgian_academy
+ *   ./8bit_tab_to_h GEORGIAN-PS georgian_ps < tabgeorgian_ps
+ *
+ *   ./8bit_tab_to_h ISO-8859-1 iso8859_1 < 8859-1.TXT
+ *   ./8bit_tab_to_h ISO-8859-2 iso8859_2 < 8859-2.TXT
+ *   ./8bit_tab_to_h ISO-8859-3 iso8859_3 < 8859-3.TXT
+ *   ./8bit_tab_to_h ISO-8859-4 iso8859_4 < 8859-4.TXT
+ *   ./8bit_tab_to_h ISO-8859-5 iso8859_5 < 8859-5.TXT
+ *   ./8bit_tab_to_h ISO-8859-6 iso8859_6 < 8859-6.TXT
+ *   ./8bit_tab_to_h ISO-8859-7 iso8859_7 < 8859-7.TXT
+ *   ./8bit_tab_to_h ISO-8859-8 iso8859_8 < 8859-8.TXT
+ *   ./8bit_tab_to_h ISO-8859-9 iso8859_9 < 8859-9.TXT
+ *   ./8bit_tab_to_h ISO-8859-10 iso8859_10 < 8859-10.TXT
+ *   ./8bit_tab_to_h ISO-8859-14 iso8859_14 < 8859-14.TXT
+ *   ./8bit_tab_to_h ISO-8859-15 iso8859_15 < 8859-15.TXT
+ *   ./8bit_tab_to_h JISX0201.1976-0 jisx0201 < JIS0201.TXT
+ *   ./8bit_tab_to_h KOI8-R koi8_r < KOI8-R.TXT
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+int main (int argc, char *argv[])
+{
+  const char* charsetname;
+  const char* c_charsetname;
+  const char* filename;
+  const char* directory;
+  int charset2uni[0x100];
+
+  if (argc != 3 && argc != 4 && argc != 5)
+    exit(1);
+  charsetname = argv[1];
+  c_charsetname = argv[2];
+  if (argc > 3) {
+    filename = argv[3];
+  } else {
+    char* s = (char*) malloc(strlen(c_charsetname)+strlen(".h")+1);
+    strcpy(s,c_charsetname); strcat(s,".h");
+    filename = s;
+  }
+  directory = (argc > 4 ? argv[4] : "");
+
+  fprintf(stderr, "Creating %s%s\n", directory, filename);
+
+  {
+    int i, c;
+    c = getc(stdin);
+    ungetc(c,stdin);
+    if (c == '#') {
+      /* Read a unicode.org style .TXT file. */
+      for (i = 0; i < 0x100; i++)
+        charset2uni[i] = 0xfffd;
+      for (;;) {
+        c = getc(stdin);
+        if (c == EOF)
+          break;
+        if (c == '\n' || c == ' ' || c == '\t')
+          continue;
+        if (c == '#') {
+          do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
+          continue;
+        }
+        ungetc(c,stdin);
+        if (scanf("0x%x", &i) != 1 || !(i >= 0 && i < 0x100))
+          exit(1);
+        do { c = getc(stdin); } while (c == ' ' || c == '\t');
+        if (c != EOF)
+          ungetc(c,stdin);
+        if (c == '\n' || c == '#')
+          continue;
+        if (scanf("0x%x", &charset2uni[i]) != 1)
+          exit(1);
+      }
+    } else {
+      /* Read a table of hexadecimal Unicode values. */
+      for (i = 0; i < 0x100; i++) {
+        if (scanf("%x", &charset2uni[i]) != 1)
+          exit(1);
+        if (charset2uni[i] < 0 || charset2uni[i] == 0xffff)
+          charset2uni[i] = 0xfffd;
+      }
+      if (scanf("%x", &i) != EOF)
+        exit(1);
+    }
+  }
+
+  /* Write the output file. */
+  {
+    FILE* f;
+
+    {
+      char* fname = malloc(strlen(directory)+strlen(filename)+1);
+      strcpy(fname,directory); strcat(fname,filename);
+      f = fopen(fname,"w");
+      if (f == NULL)
+        exit(1);
+    }
+
+    fprintf(f, "\n");
+    fprintf(f, "/*\n");
+    fprintf(f, " * %s\n", charsetname);
+    fprintf(f, " */\n");
+    fprintf(f, "\n");
+
+    {
+      int i, i1, i2, i3;
+      int line[16];
+      int tableno;
+      struct { int minline; int maxline; } tables[16];
+      bool some_invalid;
+      bool final_ret_reached;
+
+      for (i1 = 0; i1 < 16; i1++) {
+        bool all_invalid = true;
+        bool all_identity = true;
+        for (i2 = 0; i2 < 16; i2++) {
+          i = 16*i1+i2;
+          if (charset2uni[i] != 0xfffd)
+            all_invalid = false;
+          if (charset2uni[i] != i)
+            all_identity = false;
+        }
+        if (all_invalid)
+          line[i1] = -2;
+        else if (all_identity)
+          line[i1] = -1;
+        else
+          line[i1] = 0;
+      }
+      tableno = 0;
+      for (i1 = 0; i1 < 16; i1++) {
+        if (line[i1] >= 0) {
+          if (i1 > 0 && tableno > 0 && line[i1-1] == tableno-1) {
+            line[i1] = tableno-1;
+            tables[tableno-1].maxline = i1;
+          } else {
+            tableno++;
+            line[i1] = tableno-1;
+            tables[tableno-1].minline = tables[tableno-1].maxline = i1;
+          }
+        }
+      }
+      some_invalid = false;
+      for (i = 0; i < 0x100; i++)
+        if (charset2uni[i] == 0xfffd)
+          some_invalid = true;
+      if (tableno > 0) {
+        int t;
+        for (t = 0; t < tableno; t++) {
+          fprintf(f, "static const unsigned short %s_2uni", c_charsetname);
+          if (tableno > 1)
+            fprintf(f, "_%d", t+1);
+          fprintf(f, "[%d] = {\n", 16*(tables[t].maxline-tables[t].minline+1));
+          for (i1 = tables[t].minline; i1 <= tables[t].maxline; i1++) {
+            fprintf(f, "  /* 0x%02x */\n", 16*i1);
+            for (i2 = 0; i2 < 2; i2++) {
+              fprintf(f, " ");
+              for (i3 = 0; i3 < 8; i3++) {
+                i = 16*i1+8*i2+i3;
+                fprintf(f, " 0x%04x,", charset2uni[i]);
+              }
+              fprintf(f, "\n");
+            }
+          }
+          fprintf(f, "};\n");
+        }
+        fprintf(f, "\n");
+      }
+      final_ret_reached = false;
+      fprintf(f, "static int\n%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n", c_charsetname);
+      fprintf(f, "{\n");
+      fprintf(f, "  unsigned char c = *s;\n");
+      if (some_invalid) {
+        for (i1 = 0; i1 < 16;) {
+          int t = line[i1];
+          const char* indent;
+          for (i2 = i1; i2 < 16 && line[i2] == t; i2++);
+          indent = (i1 == 0 && i2 == 16 ? "  " : "    ");
+          if (i1 == 0) {
+            if (i2 == 16) {
+            } else {
+              fprintf(f, "  if (c < 0x%02x) {\n", 16*i2);
+            }
+          } else {
+            if (i2 == 16) {
+              fprintf(f, "  else {\n");
+            } else {
+              fprintf(f, "  else if (c < 0x%02x) {\n", 16*i2);
+            }
+          }
+          if (t == -2) {
+            final_ret_reached = true;
+          } else if (t == -1) {
+            fprintf(f, "%s*pwc = (ucs4_t) c;\n", indent);
+            fprintf(f, "%sreturn 1;\n", indent);
+          } else {
+            fprintf(f, "%s", indent);
+            some_invalid = false;
+            for (i = 16*i1; i < 16*i2; i++)
+              if (charset2uni[i] == 0xfffd)
+                some_invalid = true;
+            if (some_invalid)
+              fprintf(f, "unsigned short wc = ");
+            else
+              fprintf(f, "*pwc = (ucs4_t) ");
+            fprintf(f, "%s_2uni", c_charsetname);
+            if (tableno > 1)
+              fprintf(f, "_%d", t+1);
+            fprintf(f, "[c");
+            if (tables[t].minline > 0)
+              fprintf(f, "-0x%02x", 16*tables[t].minline);
+            fprintf(f, "];\n");
+            if (some_invalid) {
+              fprintf(f, "%sif (wc != 0xfffd) {\n", indent);
+              fprintf(f, "%s  *pwc = (ucs4_t) wc;\n", indent);
+              fprintf(f, "%s  return 1;\n", indent);
+              fprintf(f, "%s}\n", indent);
+              final_ret_reached = true;
+            } else {
+              fprintf(f, "%sreturn 1;\n", indent);
+            }
+          }
+          if (!(i1 == 0 && i2 == 16))
+            fprintf(f, "  }\n");
+          i1 = i2;
+        }
+        if (final_ret_reached)
+          fprintf(f, "  return RET_ILSEQ;\n");
+      } else {
+        for (i1 = 0; i1 < 16;) {
+          int t = line[i1];
+          for (i2 = i1; i2 < 16 && line[i2] == t; i2++);
+          if (i1 == 0) {
+            if (i2 == 16) {
+              fprintf(f, "  ");
+            } else {
+              fprintf(f, "  if (c < 0x%02x)\n    ", 16*i2);
+            }
+          } else {
+            if (i2 == 16) {
+              fprintf(f, "  else\n    ");
+            } else {
+              fprintf(f, "  else if (c < 0x%02x)\n    ", 16*i2);
+            }
+          }
+          if (t == -1)
+            fprintf(f, "*pwc = (ucs4_t) c;\n");
+          else {
+            fprintf(f, "*pwc = (ucs4_t) %s_2uni", c_charsetname);
+            if (tableno > 1)
+              fprintf(f, "_%d", t+1);
+            fprintf(f, "[c");
+            if (tables[t].minline > 0)
+              fprintf(f, "-0x%02x", 16*tables[t].minline);
+            fprintf(f, "];\n");
+          }
+          i1 = i2;
+        }
+        fprintf(f, "  return 1;\n");
+      }
+      fprintf(f, "}\n");
+
+    }
+
+    fprintf(f, "\n");
+
+    {
+      int uni2charset[0x10000];
+      bool pages[0x100];
+      int line[0x2000];
+      int tableno;
+      struct { int minline; int maxline; int usecount; const char* suffix; } tables[0x2000];
+      bool need_c;
+      bool fix_0000;
+      int i, j, p, j1, j2, t;
+
+      for (j = 0; j < 0x10000; j++)
+        uni2charset[j] = 0;
+      for (p = 0; p < 0x100; p++)
+        pages[p] = false;
+      for (i = 0; i < 0x100; i++) {
+        j = charset2uni[i];
+        if (j != 0xfffd) {
+          uni2charset[j] = i;
+          pages[j>>8] = true;
+        }
+      }
+      for (j1 = 0; j1 < 0x2000; j1++) {
+        bool all_invalid = true;
+        bool all_identity = true;
+        for (j2 = 0; j2 < 8; j2++) {
+          j = 8*j1+j2;
+          if (uni2charset[j] != 0)
+            all_invalid = false;
+          if (uni2charset[j] != j)
+            all_identity = false;
+        }
+        if (all_invalid)
+          line[j1] = -2;
+        else if (all_identity)
+          line[j1] = -1;
+        else
+          line[j1] = 0;
+      }
+      tableno = 0;
+      for (j1 = 0; j1 < 0x2000; j1++) {
+        if (line[j1] >= 0) {
+          if (tableno > 0
+              && ((j1 > 0 && line[j1-1] == tableno-1)
+                  || ((tables[tableno-1].maxline >> 5) == (j1 >> 5)
+                      && j1 - tables[tableno-1].maxline <= 8))) {
+            line[j1] = tableno-1;
+            tables[tableno-1].maxline = j1;
+          } else {
+            tableno++;
+            line[j1] = tableno-1;
+            tables[tableno-1].minline = tables[tableno-1].maxline = j1;
+          }
+        }
+      }
+      for (t = 0; t < tableno; t++) {
+        tables[t].usecount = 0;
+        j1 = 8*tables[t].minline;
+        j2 = 8*(tables[t].maxline+1);
+        for (j = j1; j < j2; j++)
+          if (uni2charset[j] != 0)
+            tables[t].usecount++;
+      }
+      for (t = 0, p = -1, i = 0; t < tableno; t++) {
+        if (tables[t].usecount > 1) {
+          char* s;
+          if (p == tables[t].minline >> 5) {
+            s = (char*) malloc(5+1);
+            sprintf(s, "%02x_%d", p, ++i);
+          } else {
+            p = tables[t].minline >> 5;
+            s = (char*) malloc(2+1);
+            sprintf(s, "%02x", p);
+          }
+          tables[t].suffix = s;
+        } else
+          tables[t].suffix = NULL;
+      }
+      {
+        p = -1;
+        for (t = 0; t < tableno; t++)
+          if (tables[t].usecount > 1) {
+            p = 0;
+            fprintf(f, "static const unsigned char %s_page%s[%d] = {\n", c_charsetname, tables[t].suffix, 8*(tables[t].maxline-tables[t].minline+1));
+            for (j1 = tables[t].minline; j1 <= tables[t].maxline; j1++) {
+              if ((j1 % 0x20) == 0 && j1 > tables[t].minline)
+                fprintf(f, "  /* 0x%04x */\n", 8*j1);
+              fprintf(f, " ");
+              for (j2 = 0; j2 < 8; j2++) {
+                j = 8*j1+j2;
+                fprintf(f, " 0x%02x,", uni2charset[j]);
+              }
+              fprintf(f, " /* 0x%02x-0x%02x */\n", 8*(j1 % 0x20), 8*(j1 % 0x20)+7);
+            }
+            fprintf(f, "};\n");
+          }
+        if (p >= 0)
+          fprintf(f, "\n");
+      }
+      need_c = false;
+      for (j1 = 0; j1 < 0x2000;) {
+        t = line[j1];
+        for (j2 = j1; j2 < 0x2000 && line[j2] == t; j2++);
+        if (t >= 0)
+          j2 = tables[t].maxline+1;
+        if (!(t == -2 || (t == -1 && j1 == 0)))
+          need_c = true;
+        j1 = j2;
+      }
+      fix_0000 = false;
+      fprintf(f, "static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", c_charsetname);
+      fprintf(f, "{\n");
+      if (need_c)
+        fprintf(f, "  unsigned char c = 0;\n");
+      for (j1 = 0; j1 < 0x2000;) {
+        t = line[j1];
+        for (j2 = j1; j2 < 0x2000 && line[j2] == t; j2++);
+        if (t >= 0) {
+          if (j1 != tables[t].minline) abort();
+          if (j2 > tables[t].maxline+1) abort();
+          j2 = tables[t].maxline+1;
+        }
+        if (t == -2) {
+        } else {
+          if (j1 == 0)
+            fprintf(f, "  ");
+          else
+            fprintf(f, "  else ");
+          if (t >= 0 && tables[t].usecount == 0) abort();
+          if (t >= 0 && tables[t].usecount == 1) {
+            if (j2 != j1+1) abort();
+            for (j = 8*j1; j < 8*j2; j++)
+              if (uni2charset[j] != 0) {
+                fprintf(f, "if (wc == 0x%04x)\n    c = 0x%02x;\n", j, uni2charset[j]);
+                break;
+              }
+          } else {
+            if (j1 == 0) {
+              fprintf(f, "if (wc < 0x%04x)", 8*j2);
+            } else {
+              fprintf(f, "if (wc >= 0x%04x && wc < 0x%04x)", 8*j1, 8*j2);
+            }
+            if (t == -1) {
+              if (j1 == 0)
+                /* If wc == 0, the function must return 1, not -1. */
+                fprintf(f, " {\n    *r = wc;\n    return 1;\n  }\n");
+              else
+                fprintf(f, "\n    c = wc;\n");
+            } else {
+              fprintf(f, "\n    c = %s_page%s[wc", c_charsetname, tables[t].suffix);
+              if (tables[t].minline > 0)
+                fprintf(f, "-0x%04x", 8*j1);
+              fprintf(f, "];\n");
+              if (j1 == 0 && uni2charset[0] == 0)
+                /* If wc == 0, the function must return 1, not -1. */
+                fix_0000 = true;
+            }
+          }
+        }
+        j1 = j2;
+      }
+      if (need_c) {
+        if (fix_0000)
+          fprintf(f, "  if (c != 0 || wc == 0) {\n");
+        else
+          fprintf(f, "  if (c != 0) {\n");
+        fprintf(f, "    *r = c;\n");
+        fprintf(f, "    return 1;\n");
+        fprintf(f, "  }\n");
+      }
+      fprintf(f, "  return RET_ILSEQ;\n");
+      fprintf(f, "}\n");
+
+    }
+
+    if (ferror(f) || fclose(f))
+      exit(1);
+  }
+
+#if 0
+
+    int i1, i2, i3, i1_min, i1_max, j1, j2;
+
+  i1_min = 16;
+  i1_max = -1;
+  for (i1 = 0; i1 < 16; i1++)
+    for (i2 = 0; i2 < 16; i2++)
+      if (charset2uni[16*i1+i2] != 0xfffd) {
+        if (i1_min > i1) i1_min = i1;
+        if (i1_max < i1) i1_max = i1;
+      }
+  printf("static const unsigned short %s_2uni[%d] = {\n",
+         name, 16*(i1_max-i1_min+1));
+  for (i1 = i1_min; i1 <= i1_max; i1++) {
+    printf("  /""* 0x%02x *""/\n", 16*i1);
+    for (i2 = 0; i2 < 2; i2++) {
+      printf("  ");
+      for (i3 = 0; i3 < 8; i3++) {
+        if (i3 > 0) printf(" ");
+        printf("0x%04x,", charset2uni[16*i1+8*i2+i3]);
+      }
+      printf("\n");
+    }
+  }
+  printf("};\n");
+  printf("\n");
+
+  for (p = 0; p < 0x100; p++)
+    pages[p] = 0;
+  for (i = 0; i < 0x100; i++)
+    if (charset2uni[i] != 0xfffd)
+      pages[charset2uni[i]>>8] = 1;
+  for (p = 0; p < 0x100; p++)
+    if (pages[p]) {
+      int j1_min = 32;
+      int j1_max = -1;
+      for (j1 = 0; j1 < 32; j1++)
+        for (j2 = 0; j2 < 8; j2++)
+          if (uni2charset[256*p+8*j1+j2] != 0) {
+            if (j1_min > j1) j1_min = j1;
+            if (j1_max < j1) j1_max = j1;
+          }
+      printf("static const unsigned char %s_page%02x[%d] = {\n",
+             name, p, 8*(j1_max-j1_min+1));
+      for (j1 = j1_min; j1 <= j1_max; j1++) {
+        printf("  ");
+        for (j2 = 0; j2 < 8; j2++)
+          printf("0x%02x, ", uni2charset[256*p+8*j1+j2]);
+        printf("/""* 0x%02x-0x%02x *""/\n", 8*j1, 8*j1+7);
+      }
+      printf("};\n");
+    }
+  printf("\n");
+
+}
+#endif
+
+  exit(0);
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/COPYRIGHT
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/COPYRIGHT	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/COPYRIGHT	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,39 @@
+This notice applies to the files in this directory. They are taken from
+the libiconv-1.1 package, which is covered by the LGPL license. The files
+in this directory have been placed under the following copyright, with
+permission from the Free Software Foundation.
+
+
+Copyright (c) 1999-2000  Free Software Foundation, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+FREE SOFTWARE FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the Free Software Foundation
+shall not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from the
+Free Software Foundation.
+
+
+Notes:
+
+1. This copyright applies only to the files in this directory, and not to
+the remaining files in libiconv.
+
+2. The Free Software Foundation does not encourage the use of the above
+license for newly written software.
+

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/README
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/README	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/README	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,12 @@
+$XFree86: xc/lib/X11/lcUniConv/README,v 1.3 2003/10/24 15:34:01 tsi Exp $
+
+The files in this directory are taken from the libiconv-1.1 package.
+
+The *.h files were generated from tables (mostly from ftp.unicode.org) using
+the programs '8bit_tab_to_h.c', 'cjk_tab_to_h.c' and 'gbk_tab_to_h.c'. On some of them, further
+optimizations were applied by hand.
+
+If you find a bug in these files, instead of modifying them in XFree86
+and let it diverge from libiconv, please notify the libiconv maintainer
+(currently <bruno@clisp.org>) so he can fix both in synch.
+

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/armscii_8.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/armscii_8.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/armscii_8.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,98 @@
+/* $XFree86: xc/lib/X11/lcUniConv/armscii_8.h,v 1.4 2003/07/15 17:33:45 pascal Exp $ */
+
+/*
+ * ARMSCII-8
+ */
+
+static const unsigned short armscii_8_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0xfffd, 0x0587, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab,
+  0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x058a, 0x2026, 0x055c,
+  /* 0xb0 */
+  0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563,
+  0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567,
+  /* 0xc0 */
+  0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b,
+  0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f,
+  /* 0xd0 */
+  0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573,
+  0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577,
+  /* 0xe0 */
+  0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b,
+  0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f,
+  /* 0xf0 */
+  0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583,
+  0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, 0xfffd,
+};
+
+static int
+armscii_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = armscii_8_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+
+static const unsigned char armscii_8_page00[8] = {
+  0xa5, 0xa4, 0x2a, 0x2b, 0xab, 0xac, 0xa9, 0x2f, /* 0x28-0x2f */
+};
+static const unsigned char armscii_8_page00_1[32] = {
+  0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+};
+static const unsigned char armscii_8_page05[96] = {
+  0x00, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, /* 0x30-0x37 */
+  0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, /* 0x38-0x3f */
+  0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, /* 0x40-0x47 */
+  0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, /* 0x48-0x4f */
+  0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0xfe, 0xb0, 0xaf, 0xaa, 0xb1, 0x00, /* 0x58-0x5f */
+  0x00, 0xb3, 0xb5, 0xb7, 0xb9, 0xbb, 0xbd, 0xbf, /* 0x60-0x67 */
+  0xc1, 0xc3, 0xc5, 0xc7, 0xc9, 0xcb, 0xcd, 0xcf, /* 0x68-0x6f */
+  0xd1, 0xd3, 0xd5, 0xd7, 0xd9, 0xdb, 0xdd, 0xdf, /* 0x70-0x77 */
+  0xe1, 0xe3, 0xe5, 0xe7, 0xe9, 0xeb, 0xed, 0xef, /* 0x78-0x7f */
+  0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0xa2, /* 0x80-0x87 */
+  0x00, 0xa3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+};
+static const unsigned char armscii_8_page20[24] = {
+  0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x20-0x27 */
+};
+
+static int
+armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0028) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x0028 && wc < 0x0030)
+    c = armscii_8_page00[wc-0x0028];
+  else if (wc >= 0x0030 && wc < 0x00a0)
+    c = wc;
+  else if (wc >= 0x00a0 && wc < 0x00c0)
+    c = armscii_8_page00_1[wc-0x00a0];
+  else if (wc >= 0x0530 && wc < 0x0590)
+    c = armscii_8_page05[wc-0x0530];
+  else if (wc >= 0x2010 && wc < 0x2028)
+    c = armscii_8_page20[wc-0x2010];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/ascii.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/ascii.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/ascii.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,26 @@
+/* $XFree86: xc/lib/X11/lcUniConv/ascii.h,v 1.3 2000/11/29 17:40:28 dawes Exp $ */
+
+/*
+ * ASCII
+ */
+
+static int
+ascii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+
+static int
+ascii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/big5.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/big5.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/big5.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,4145 @@
+/* $XFree86: xc/lib/X11/lcUniConv/big5.h,v 1.2 2003/05/27 22:26:28 tsi Exp $ */
+
+/*
+ * BIG5
+ */
+#ifdef NEED_TOWC
+static const unsigned short big5_2uni_pagea1[6121] = {
+  /* 0xa1 */
+  0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2022, 0xff1b, 0xff1a,
+  0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xff64, 0xfe52,
+  0x00b7, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xff5c, 0x2013, 0xfe31,
+  0x2014, 0xfe33, 0xfffd, 0xfe34, 0xfe4f, 0xff08, 0xff09, 0xfe35,
+  0xfe36, 0xff5b, 0xff5d, 0xfe37, 0xfe38, 0x3014, 0x3015, 0xfe39,
+  0xfe3a, 0x3010, 0x3011, 0xfe3b, 0xfe3c, 0x300a, 0x300b, 0xfe3d,
+  0xfe3e, 0x3008, 0x3009, 0xfe3f, 0xfe40, 0x300c, 0x300d, 0xfe41,
+  0xfe42, 0x300e, 0x300f, 0xfe43, 0xfe44, 0xfe59, 0xfe5a, 0xfe5b,
+  0xfe5c, 0xfe5d, 0xfe5e, 0x2018, 0x2019, 0x201c, 0x201d, 0x301d,
+  0x301e, 0x2035, 0x2032, 0xff03, 0xff06, 0xff0a, 0x203b, 0x00a7,
+  0x3003, 0x25cb, 0x25cf, 0x25b3, 0x25b2, 0x25ce, 0x2606, 0x2605,
+  0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25bd, 0x25bc, 0x32a3, 0x2105,
+  0x203e, 0xfffd, 0xff3f, 0xfffd, 0xfe49, 0xfe4a, 0xfe4d, 0xfe4e,
+  0xfe4b, 0xfe4c, 0xfe5f, 0xfe60, 0xfe61, 0xff0b, 0xff0d, 0x00d7,
+  0x00f7, 0x00b1, 0x221a, 0xff1c, 0xff1e, 0xff1d, 0x2266, 0x2267,
+  0x2260, 0x221e, 0x2252, 0x2261, 0xfe62, 0xfe63, 0xfe64, 0xfe65,
+  0xfe66, 0x223c, 0x2229, 0x222a, 0x22a5, 0x2220, 0x221f, 0x22bf,
+  0x33d2, 0x33d1, 0x222b, 0x222e, 0x2235, 0x2234, 0x2640, 0x2642,
+  0x2641, 0x2609, 0x2191, 0x2193, 0x2190, 0x2192, 0x2196, 0x2197,
+  0x2199, 0x2198, 0x2225, 0x2223, 0xfffd,
+  /* 0xa2 */
+  0xfffd, 0xff0f, 0xff3c, 0xff04, 0x00a5, 0x3012, 0x00a2, 0x00a3,
+  0xff05, 0xff20, 0x2103, 0x2109, 0xfe69, 0xfe6a, 0xfe6b, 0x33d5,
+  0x339c, 0x339d, 0x339e, 0x33ce, 0x33a1, 0x338e, 0x338f, 0x33c4,
+  0x00b0, 0x5159, 0x515b, 0x515e, 0x515d, 0x5161, 0x5163, 0x55e7,
+  0x74e9, 0x7cce, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586,
+  0x2587, 0x2588, 0x258f, 0x258e, 0x258d, 0x258c, 0x258b, 0x258a,
+  0x2589, 0x253c, 0x2534, 0x252c, 0x2524, 0x251c, 0x2594, 0x2500,
+  0x2502, 0x2595, 0x250c, 0x2510, 0x2514, 0x2518, 0x256d, 0x256e,
+  0x2570, 0x256f, 0x2550, 0x255e, 0x256a, 0x2561, 0x25e2, 0x25e3,
+  0x25e5, 0x25e4, 0x2571, 0x2572, 0x2573, 0xff10, 0xff11, 0xff12,
+  0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x2160,
+  0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168,
+  0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027,
+  0x3028, 0x3029, 0xfffd, 0x5344, 0xfffd, 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, 0xff41,
+  0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49,
+  0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51,
+  0xff52, 0xff53, 0xff54, 0xff55, 0xff56,
+  /* 0xa3 */
+  0xff57, 0xff58, 0xff59, 0xff5a, 0x0391, 0x0392, 0x0393, 0x0394,
+  0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c,
+  0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5,
+  0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, 0x03b3, 0x03b4,
+  0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc,
+  0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5,
+  0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x3105, 0x3106, 0x3107, 0x3108,
+  0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, 0x3110,
+  0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118,
+  0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120,
+  0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128,
+  0x3129, 0x02d9, 0x02c9, 0x02ca, 0x02c7, 0x02cb, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa4 */
+  0x4e00, 0x4e59, 0x4e01, 0x4e03, 0x4e43, 0x4e5d, 0x4e86, 0x4e8c,
+  0x4eba, 0x513f, 0x5165, 0x516b, 0x51e0, 0x5200, 0x5201, 0x529b,
+  0x5315, 0x5341, 0x535c, 0x53c8, 0x4e09, 0x4e0b, 0x4e08, 0x4e0a,
+  0x4e2b, 0x4e38, 0x51e1, 0x4e45, 0x4e48, 0x4e5f, 0x4e5e, 0x4e8e,
+  0x4ea1, 0x5140, 0x5203, 0x52fa, 0x5343, 0x53c9, 0x53e3, 0x571f,
+  0x58eb, 0x5915, 0x5927, 0x5973, 0x5b50, 0x5b51, 0x5b53, 0x5bf8,
+  0x5c0f, 0x5c22, 0x5c38, 0x5c71, 0x5ddd, 0x5de5, 0x5df1, 0x5df2,
+  0x5df3, 0x5dfe, 0x5e72, 0x5efe, 0x5f0b, 0x5f13, 0x624d, 0x4e11,
+  0x4e10, 0x4e0d, 0x4e2d, 0x4e30, 0x4e39, 0x4e4b, 0x5c39, 0x4e88,
+  0x4e91, 0x4e95, 0x4e92, 0x4e94, 0x4ea2, 0x4ec1, 0x4ec0, 0x4ec3,
+  0x4ec6, 0x4ec7, 0x4ecd, 0x4eca, 0x4ecb, 0x4ec4, 0x5143, 0x5141,
+  0x5167, 0x516d, 0x516e, 0x516c, 0x5197, 0x51f6, 0x5206, 0x5207,
+  0x5208, 0x52fb, 0x52fe, 0x52ff, 0x5316, 0x5339, 0x5348, 0x5347,
+  0x5345, 0x535e, 0x5384, 0x53cb, 0x53ca, 0x53cd, 0x58ec, 0x5929,
+  0x592b, 0x592a, 0x592d, 0x5b54, 0x5c11, 0x5c24, 0x5c3a, 0x5c6f,
+  0x5df4, 0x5e7b, 0x5eff, 0x5f14, 0x5f15, 0x5fc3, 0x6208, 0x6236,
+  0x624b, 0x624e, 0x652f, 0x6587, 0x6597, 0x65a4, 0x65b9, 0x65e5,
+  0x66f0, 0x6708, 0x6728, 0x6b20, 0x6b62, 0x6b79, 0x6bcb, 0x6bd4,
+  0x6bdb, 0x6c0f, 0x6c34, 0x706b, 0x722a, 0x7236, 0x723b, 0x7247,
+  0x7259, 0x725b, 0x72ac, 0x738b, 0x4e19,
+  /* 0xa5 */
+  0x4e16, 0x4e15, 0x4e14, 0x4e18, 0x4e3b, 0x4e4d, 0x4e4f, 0x4e4e,
+  0x4ee5, 0x4ed8, 0x4ed4, 0x4ed5, 0x4ed6, 0x4ed7, 0x4ee3, 0x4ee4,
+  0x4ed9, 0x4ede, 0x5145, 0x5144, 0x5189, 0x518a, 0x51ac, 0x51f9,
+  0x51fa, 0x51f8, 0x520a, 0x52a0, 0x529f, 0x5305, 0x5306, 0x5317,
+  0x531d, 0x4edf, 0x534a, 0x5349, 0x5361, 0x5360, 0x536f, 0x536e,
+  0x53bb, 0x53ef, 0x53e4, 0x53f3, 0x53ec, 0x53ee, 0x53e9, 0x53e8,
+  0x53fc, 0x53f8, 0x53f5, 0x53eb, 0x53e6, 0x53ea, 0x53f2, 0x53f1,
+  0x53f0, 0x53e5, 0x53ed, 0x53fb, 0x56db, 0x56da, 0x5916, 0x592e,
+  0x5931, 0x5974, 0x5976, 0x5b55, 0x5b83, 0x5c3c, 0x5de8, 0x5de7,
+  0x5de6, 0x5e02, 0x5e03, 0x5e73, 0x5e7c, 0x5f01, 0x5f18, 0x5f17,
+  0x5fc5, 0x620a, 0x6253, 0x6254, 0x6252, 0x6251, 0x65a5, 0x65e6,
+  0x672e, 0x672c, 0x672a, 0x672b, 0x672d, 0x6b63, 0x6bcd, 0x6c11,
+  0x6c10, 0x6c38, 0x6c41, 0x6c40, 0x6c3e, 0x72af, 0x7384, 0x7389,
+  0x74dc, 0x74e6, 0x7518, 0x751f, 0x7528, 0x7529, 0x7530, 0x7531,
+  0x7532, 0x7533, 0x758b, 0x767d, 0x76ae, 0x76bf, 0x76ee, 0x77db,
+  0x77e2, 0x77f3, 0x793a, 0x79be, 0x7a74, 0x7acb, 0x4e1e, 0x4e1f,
+  0x4e52, 0x4e53, 0x4e69, 0x4e99, 0x4ea4, 0x4ea6, 0x4ea5, 0x4eff,
+  0x4f09, 0x4f19, 0x4f0a, 0x4f15, 0x4f0d, 0x4f10, 0x4f11, 0x4f0f,
+  0x4ef2, 0x4ef6, 0x4efb, 0x4ef0, 0x4ef3, 0x4efd, 0x4f01, 0x4f0b,
+  0x5149, 0x5147, 0x5146, 0x5148, 0x5168,
+  /* 0xa6 */
+  0x5171, 0x518d, 0x51b0, 0x5217, 0x5211, 0x5212, 0x520e, 0x5216,
+  0x52a3, 0x5308, 0x5321, 0x5320, 0x5370, 0x5371, 0x5409, 0x540f,
+  0x540c, 0x540a, 0x5410, 0x5401, 0x540b, 0x5404, 0x5411, 0x540d,
+  0x5408, 0x5403, 0x540e, 0x5406, 0x5412, 0x56e0, 0x56de, 0x56dd,
+  0x5733, 0x5730, 0x5728, 0x572d, 0x572c, 0x572f, 0x5729, 0x5919,
+  0x591a, 0x5937, 0x5938, 0x5984, 0x5978, 0x5983, 0x597d, 0x5979,
+  0x5982, 0x5981, 0x5b57, 0x5b58, 0x5b87, 0x5b88, 0x5b85, 0x5b89,
+  0x5bfa, 0x5c16, 0x5c79, 0x5dde, 0x5e06, 0x5e76, 0x5e74, 0x5f0f,
+  0x5f1b, 0x5fd9, 0x5fd6, 0x620e, 0x620c, 0x620d, 0x6210, 0x6263,
+  0x625b, 0x6258, 0x6536, 0x65e9, 0x65e8, 0x65ec, 0x65ed, 0x66f2,
+  0x66f3, 0x6709, 0x673d, 0x6734, 0x6731, 0x6735, 0x6b21, 0x6b64,
+  0x6b7b, 0x6c16, 0x6c5d, 0x6c57, 0x6c59, 0x6c5f, 0x6c60, 0x6c50,
+  0x6c55, 0x6c61, 0x6c5b, 0x6c4d, 0x6c4e, 0x7070, 0x725f, 0x725d,
+  0x767e, 0x7af9, 0x7c73, 0x7cf8, 0x7f36, 0x7f8a, 0x7fbd, 0x8001,
+  0x8003, 0x800c, 0x8012, 0x8033, 0x807f, 0x8089, 0x808b, 0x808c,
+  0x81e3, 0x81ea, 0x81f3, 0x81fc, 0x820c, 0x821b, 0x821f, 0x826e,
+  0x8272, 0x827e, 0x866b, 0x8840, 0x884c, 0x8863, 0x897f, 0x9621,
+  0x4e32, 0x4ea8, 0x4f4d, 0x4f4f, 0x4f47, 0x4f57, 0x4f5e, 0x4f34,
+  0x4f5b, 0x4f55, 0x4f30, 0x4f50, 0x4f51, 0x4f3d, 0x4f3a, 0x4f38,
+  0x4f43, 0x4f54, 0x4f3c, 0x4f46, 0x4f63,
+  /* 0xa7 */
+  0x4f5c, 0x4f60, 0x4f2f, 0x4f4e, 0x4f36, 0x4f59, 0x4f5d, 0x4f48,
+  0x4f5a, 0x514c, 0x514b, 0x514d, 0x5175, 0x51b6, 0x51b7, 0x5225,
+  0x5224, 0x5229, 0x522a, 0x5228, 0x52ab, 0x52a9, 0x52aa, 0x52ac,
+  0x5323, 0x5373, 0x5375, 0x541d, 0x542d, 0x541e, 0x543e, 0x5426,
+  0x544e, 0x5427, 0x5446, 0x5443, 0x5433, 0x5448, 0x5442, 0x541b,
+  0x5429, 0x544a, 0x5439, 0x543b, 0x5438, 0x542e, 0x5435, 0x5436,
+  0x5420, 0x543c, 0x5440, 0x5431, 0x542b, 0x541f, 0x542c, 0x56ea,
+  0x56f0, 0x56e4, 0x56eb, 0x574a, 0x5751, 0x5740, 0x574d, 0x5747,
+  0x574e, 0x573e, 0x5750, 0x574f, 0x573b, 0x58ef, 0x593e, 0x599d,
+  0x5992, 0x59a8, 0x599e, 0x59a3, 0x5999, 0x5996, 0x598d, 0x59a4,
+  0x5993, 0x598a, 0x59a5, 0x5b5d, 0x5b5c, 0x5b5a, 0x5b5b, 0x5b8c,
+  0x5b8b, 0x5b8f, 0x5c2c, 0x5c40, 0x5c41, 0x5c3f, 0x5c3e, 0x5c90,
+  0x5c91, 0x5c94, 0x5c8c, 0x5deb, 0x5e0c, 0x5e8f, 0x5e87, 0x5e8a,
+  0x5ef7, 0x5f04, 0x5f1f, 0x5f64, 0x5f62, 0x5f77, 0x5f79, 0x5fd8,
+  0x5fcc, 0x5fd7, 0x5fcd, 0x5ff1, 0x5feb, 0x5ff8, 0x5fea, 0x6212,
+  0x6211, 0x6284, 0x6297, 0x6296, 0x6280, 0x6276, 0x6289, 0x626d,
+  0x628a, 0x627c, 0x627e, 0x6279, 0x6273, 0x6292, 0x626f, 0x6298,
+  0x626e, 0x6295, 0x6293, 0x6291, 0x6286, 0x6539, 0x653b, 0x6538,
+  0x65f1, 0x66f4, 0x675f, 0x674e, 0x674f, 0x6750, 0x6751, 0x675c,
+  0x6756, 0x675e, 0x6749, 0x6746, 0x6760,
+  /* 0xa8 */
+  0x6753, 0x6757, 0x6b65, 0x6bcf, 0x6c42, 0x6c5e, 0x6c99, 0x6c81,
+  0x6c88, 0x6c89, 0x6c85, 0x6c9b, 0x6c6a, 0x6c7a, 0x6c90, 0x6c70,
+  0x6c8c, 0x6c68, 0x6c96, 0x6c92, 0x6c7d, 0x6c83, 0x6c72, 0x6c7e,
+  0x6c74, 0x6c86, 0x6c76, 0x6c8d, 0x6c94, 0x6c98, 0x6c82, 0x7076,
+  0x707c, 0x707d, 0x7078, 0x7262, 0x7261, 0x7260, 0x72c4, 0x72c2,
+  0x7396, 0x752c, 0x752b, 0x7537, 0x7538, 0x7682, 0x76ef, 0x77e3,
+  0x79c1, 0x79c0, 0x79bf, 0x7a76, 0x7cfb, 0x7f55, 0x8096, 0x8093,
+  0x809d, 0x8098, 0x809b, 0x809a, 0x80b2, 0x826f, 0x8292, 0x828b,
+  0x828d, 0x898b, 0x89d2, 0x8a00, 0x8c37, 0x8c46, 0x8c55, 0x8c9d,
+  0x8d64, 0x8d70, 0x8db3, 0x8eab, 0x8eca, 0x8f9b, 0x8fb0, 0x8fc2,
+  0x8fc6, 0x8fc5, 0x8fc4, 0x5de1, 0x9091, 0x90a2, 0x90aa, 0x90a6,
+  0x90a3, 0x9149, 0x91c6, 0x91cc, 0x9632, 0x962e, 0x9631, 0x962a,
+  0x962c, 0x4e26, 0x4e56, 0x4e73, 0x4e8b, 0x4e9b, 0x4e9e, 0x4eab,
+  0x4eac, 0x4f6f, 0x4f9d, 0x4f8d, 0x4f73, 0x4f7f, 0x4f6c, 0x4f9b,
+  0x4f8b, 0x4f86, 0x4f83, 0x4f70, 0x4f75, 0x4f88, 0x4f69, 0x4f7b,
+  0x4f96, 0x4f7e, 0x4f8f, 0x4f91, 0x4f7a, 0x5154, 0x5152, 0x5155,
+  0x5169, 0x5177, 0x5176, 0x5178, 0x51bd, 0x51fd, 0x523b, 0x5238,
+  0x5237, 0x523a, 0x5230, 0x522e, 0x5236, 0x5241, 0x52be, 0x52bb,
+  0x5352, 0x5354, 0x5353, 0x5351, 0x5366, 0x5377, 0x5378, 0x5379,
+  0x53d6, 0x53d4, 0x53d7, 0x5473, 0x5475,
+  /* 0xa9 */
+  0x5496, 0x5478, 0x5495, 0x5480, 0x547b, 0x5477, 0x5484, 0x5492,
+  0x5486, 0x547c, 0x5490, 0x5471, 0x5476, 0x548c, 0x549a, 0x5462,
+  0x5468, 0x548b, 0x547d, 0x548e, 0x56fa, 0x5783, 0x5777, 0x576a,
+  0x5769, 0x5761, 0x5766, 0x5764, 0x577c, 0x591c, 0x5949, 0x5947,
+  0x5948, 0x5944, 0x5954, 0x59be, 0x59bb, 0x59d4, 0x59b9, 0x59ae,
+  0x59d1, 0x59c6, 0x59d0, 0x59cd, 0x59cb, 0x59d3, 0x59ca, 0x59af,
+  0x59b3, 0x59d2, 0x59c5, 0x5b5f, 0x5b64, 0x5b63, 0x5b97, 0x5b9a,
+  0x5b98, 0x5b9c, 0x5b99, 0x5b9b, 0x5c1a, 0x5c48, 0x5c45, 0x5c46,
+  0x5cb7, 0x5ca1, 0x5cb8, 0x5ca9, 0x5cab, 0x5cb1, 0x5cb3, 0x5e18,
+  0x5e1a, 0x5e16, 0x5e15, 0x5e1b, 0x5e11, 0x5e78, 0x5e9a, 0x5e97,
+  0x5e9c, 0x5e95, 0x5e96, 0x5ef6, 0x5f26, 0x5f27, 0x5f29, 0x5f80,
+  0x5f81, 0x5f7f, 0x5f7c, 0x5fdd, 0x5fe0, 0x5ffd, 0x5ff5, 0x5fff,
+  0x600f, 0x6014, 0x602f, 0x6035, 0x6016, 0x602a, 0x6015, 0x6021,
+  0x6027, 0x6029, 0x602b, 0x601b, 0x6216, 0x6215, 0x623f, 0x623e,
+  0x6240, 0x627f, 0x62c9, 0x62cc, 0x62c4, 0x62bf, 0x62c2, 0x62b9,
+  0x62d2, 0x62db, 0x62ab, 0x62d3, 0x62d4, 0x62cb, 0x62c8, 0x62a8,
+  0x62bd, 0x62bc, 0x62d0, 0x62d9, 0x62c7, 0x62cd, 0x62b5, 0x62da,
+  0x62b1, 0x62d8, 0x62d6, 0x62d7, 0x62c6, 0x62ac, 0x62ce, 0x653e,
+  0x65a7, 0x65bc, 0x65fa, 0x6614, 0x6613, 0x660c, 0x6606, 0x6602,
+  0x660e, 0x6600, 0x660f, 0x6615, 0x660a,
+  /* 0xaa */
+  0x6607, 0x670d, 0x670b, 0x676d, 0x678b, 0x6795, 0x6771, 0x679c,
+  0x6773, 0x6777, 0x6787, 0x679d, 0x6797, 0x676f, 0x6770, 0x677f,
+  0x6789, 0x677e, 0x6790, 0x6775, 0x679a, 0x6793, 0x677c, 0x676a,
+  0x6772, 0x6b23, 0x6b66, 0x6b67, 0x6b7f, 0x6c13, 0x6c1b, 0x6ce3,
+  0x6ce8, 0x6cf3, 0x6cb1, 0x6ccc, 0x6ce5, 0x6cb3, 0x6cbd, 0x6cbe,
+  0x6cbc, 0x6ce2, 0x6cab, 0x6cd5, 0x6cd3, 0x6cb8, 0x6cc4, 0x6cb9,
+  0x6cc1, 0x6cae, 0x6cd7, 0x6cc5, 0x6cf1, 0x6cbf, 0x6cbb, 0x6ce1,
+  0x6cdb, 0x6cca, 0x6cac, 0x6cef, 0x6cdc, 0x6cd6, 0x6ce0, 0x7095,
+  0x708e, 0x7092, 0x708a, 0x7099, 0x722c, 0x722d, 0x7238, 0x7248,
+  0x7267, 0x7269, 0x72c0, 0x72ce, 0x72d9, 0x72d7, 0x72d0, 0x73a9,
+  0x73a8, 0x739f, 0x73ab, 0x73a5, 0x753d, 0x759d, 0x7599, 0x759a,
+  0x7684, 0x76c2, 0x76f2, 0x76f4, 0x77e5, 0x77fd, 0x793e, 0x7940,
+  0x7941, 0x79c9, 0x79c8, 0x7a7a, 0x7a79, 0x7afa, 0x7cfe, 0x7f54,
+  0x7f8c, 0x7f8b, 0x8005, 0x80ba, 0x80a5, 0x80a2, 0x80b1, 0x80a1,
+  0x80ab, 0x80a9, 0x80b4, 0x80aa, 0x80af, 0x81e5, 0x81fe, 0x820d,
+  0x82b3, 0x829d, 0x8299, 0x82ad, 0x82bd, 0x829f, 0x82b9, 0x82b1,
+  0x82ac, 0x82a5, 0x82af, 0x82b8, 0x82a3, 0x82b0, 0x82be, 0x82b7,
+  0x864e, 0x8671, 0x521d, 0x8868, 0x8ecb, 0x8fce, 0x8fd4, 0x8fd1,
+  0x90b5, 0x90b8, 0x90b1, 0x90b6, 0x91c7, 0x91d1, 0x9577, 0x9580,
+  0x961c, 0x9640, 0x963f, 0x963b, 0x9644,
+  /* 0xab */
+  0x9642, 0x96b9, 0x96e8, 0x9752, 0x975e, 0x4e9f, 0x4ead, 0x4eae,
+  0x4fe1, 0x4fb5, 0x4faf, 0x4fbf, 0x4fe0, 0x4fd1, 0x4fcf, 0x4fdd,
+  0x4fc3, 0x4fb6, 0x4fd8, 0x4fdf, 0x4fca, 0x4fd7, 0x4fae, 0x4fd0,
+  0x4fc4, 0x4fc2, 0x4fda, 0x4fce, 0x4fde, 0x4fb7, 0x5157, 0x5192,
+  0x5191, 0x51a0, 0x524e, 0x5243, 0x524a, 0x524d, 0x524c, 0x524b,
+  0x5247, 0x52c7, 0x52c9, 0x52c3, 0x52c1, 0x530d, 0x5357, 0x537b,
+  0x539a, 0x53db, 0x54ac, 0x54c0, 0x54a8, 0x54ce, 0x54c9, 0x54b8,
+  0x54a6, 0x54b3, 0x54c7, 0x54c2, 0x54bd, 0x54aa, 0x54c1, 0x54c4,
+  0x54c8, 0x54af, 0x54ab, 0x54b1, 0x54bb, 0x54a9, 0x54a7, 0x54bf,
+  0x56ff, 0x5782, 0x578b, 0x57a0, 0x57a3, 0x57a2, 0x57ce, 0x57ae,
+  0x5793, 0x5955, 0x5951, 0x594f, 0x594e, 0x5950, 0x59dc, 0x59d8,
+  0x59ff, 0x59e3, 0x59e8, 0x5a03, 0x59e5, 0x59ea, 0x59da, 0x59e6,
+  0x5a01, 0x59fb, 0x5b69, 0x5ba3, 0x5ba6, 0x5ba4, 0x5ba2, 0x5ba5,
+  0x5c01, 0x5c4e, 0x5c4f, 0x5c4d, 0x5c4b, 0x5cd9, 0x5cd2, 0x5df7,
+  0x5e1d, 0x5e25, 0x5e1f, 0x5e7d, 0x5ea0, 0x5ea6, 0x5efa, 0x5f08,
+  0x5f2d, 0x5f65, 0x5f88, 0x5f85, 0x5f8a, 0x5f8b, 0x5f87, 0x5f8c,
+  0x5f89, 0x6012, 0x601d, 0x6020, 0x6025, 0x600e, 0x6028, 0x604d,
+  0x6070, 0x6068, 0x6062, 0x6046, 0x6043, 0x606c, 0x606b, 0x606a,
+  0x6064, 0x6241, 0x62dc, 0x6316, 0x6309, 0x62fc, 0x62ed, 0x6301,
+  0x62ee, 0x62fd, 0x6307, 0x62f1, 0x62f7,
+  /* 0xac */
+  0x62ef, 0x62ec, 0x62fe, 0x62f4, 0x6311, 0x6302, 0x653f, 0x6545,
+  0x65ab, 0x65bd, 0x65e2, 0x6625, 0x662d, 0x6620, 0x6627, 0x662f,
+  0x661f, 0x6628, 0x6631, 0x6624, 0x66f7, 0x67ff, 0x67d3, 0x67f1,
+  0x67d4, 0x67d0, 0x67ec, 0x67b6, 0x67af, 0x67f5, 0x67e9, 0x67ef,
+  0x67c4, 0x67d1, 0x67b4, 0x67da, 0x67e5, 0x67b8, 0x67cf, 0x67de,
+  0x67f3, 0x67b0, 0x67d9, 0x67e2, 0x67dd, 0x67d2, 0x6b6a, 0x6b83,
+  0x6b86, 0x6bb5, 0x6bd2, 0x6bd7, 0x6c1f, 0x6cc9, 0x6d0b, 0x6d32,
+  0x6d2a, 0x6d41, 0x6d25, 0x6d0c, 0x6d31, 0x6d1e, 0x6d17, 0x6d3b,
+  0x6d3d, 0x6d3e, 0x6d36, 0x6d1b, 0x6cf5, 0x6d39, 0x6d27, 0x6d38,
+  0x6d29, 0x6d2e, 0x6d35, 0x6d0e, 0x6d2b, 0x70ab, 0x70ba, 0x70b3,
+  0x70ac, 0x70af, 0x70ad, 0x70b8, 0x70ae, 0x70a4, 0x7230, 0x7272,
+  0x726f, 0x7274, 0x72e9, 0x72e0, 0x72e1, 0x73b7, 0x73ca, 0x73bb,
+  0x73b2, 0x73cd, 0x73c0, 0x73b3, 0x751a, 0x752d, 0x754f, 0x754c,
+  0x754e, 0x754b, 0x75ab, 0x75a4, 0x75a5, 0x75a2, 0x75a3, 0x7678,
+  0x7686, 0x7687, 0x7688, 0x76c8, 0x76c6, 0x76c3, 0x76c5, 0x7701,
+  0x76f9, 0x76f8, 0x7709, 0x770b, 0x76fe, 0x76fc, 0x7707, 0x77dc,
+  0x7802, 0x7814, 0x780c, 0x780d, 0x7946, 0x7949, 0x7948, 0x7947,
+  0x79b9, 0x79ba, 0x79d1, 0x79d2, 0x79cb, 0x7a7f, 0x7a81, 0x7aff,
+  0x7afd, 0x7c7d, 0x7d02, 0x7d05, 0x7d00, 0x7d09, 0x7d07, 0x7d04,
+  0x7d06, 0x7f38, 0x7f8e, 0x7fbf, 0x8004,
+  /* 0xad */
+  0x8010, 0x800d, 0x8011, 0x8036, 0x80d6, 0x80e5, 0x80da, 0x80c3,
+  0x80c4, 0x80cc, 0x80e1, 0x80db, 0x80ce, 0x80de, 0x80e4, 0x80dd,
+  0x81f4, 0x8222, 0x82e7, 0x8303, 0x8305, 0x82e3, 0x82db, 0x82e6,
+  0x8304, 0x82e5, 0x8302, 0x8309, 0x82d2, 0x82d7, 0x82f1, 0x8301,
+  0x82dc, 0x82d4, 0x82d1, 0x82de, 0x82d3, 0x82df, 0x82ef, 0x8306,
+  0x8650, 0x8679, 0x867b, 0x867a, 0x884d, 0x886b, 0x8981, 0x89d4,
+  0x8a08, 0x8a02, 0x8a03, 0x8c9e, 0x8ca0, 0x8d74, 0x8d73, 0x8db4,
+  0x8ecd, 0x8ecc, 0x8ff0, 0x8fe6, 0x8fe2, 0x8fea, 0x8fe5, 0x8fed,
+  0x8feb, 0x8fe4, 0x8fe8, 0x90ca, 0x90ce, 0x90c1, 0x90c3, 0x914b,
+  0x914a, 0x91cd, 0x9582, 0x9650, 0x964b, 0x964c, 0x964d, 0x9762,
+  0x9769, 0x97cb, 0x97ed, 0x97f3, 0x9801, 0x98a8, 0x98db, 0x98df,
+  0x9996, 0x9999, 0x4e58, 0x4eb3, 0x500c, 0x500d, 0x5023, 0x4fef,
+  0x5026, 0x5025, 0x4ff8, 0x5029, 0x5016, 0x5006, 0x503c, 0x501f,
+  0x501a, 0x5012, 0x5011, 0x4ffa, 0x5000, 0x5014, 0x5028, 0x4ff1,
+  0x5021, 0x500b, 0x5019, 0x5018, 0x4ff3, 0x4fee, 0x502d, 0x502a,
+  0x4ffe, 0x502b, 0x5009, 0x517c, 0x51a4, 0x51a5, 0x51a2, 0x51cd,
+  0x51cc, 0x51c6, 0x51cb, 0x5256, 0x525c, 0x5254, 0x525b, 0x525d,
+  0x532a, 0x537f, 0x539f, 0x539d, 0x53df, 0x54e8, 0x5510, 0x5501,
+  0x5537, 0x54fc, 0x54e5, 0x54f2, 0x5506, 0x54fa, 0x5514, 0x54e9,
+  0x54ed, 0x54e1, 0x5509, 0x54ee, 0x54ea,
+  /* 0xae */
+  0x54e6, 0x5527, 0x5507, 0x54fd, 0x550f, 0x5703, 0x5704, 0x57c2,
+  0x57d4, 0x57cb, 0x57c3, 0x5809, 0x590f, 0x5957, 0x5958, 0x595a,
+  0x5a11, 0x5a18, 0x5a1c, 0x5a1f, 0x5a1b, 0x5a13, 0x59ec, 0x5a20,
+  0x5a23, 0x5a29, 0x5a25, 0x5a0c, 0x5a09, 0x5b6b, 0x5c58, 0x5bb0,
+  0x5bb3, 0x5bb6, 0x5bb4, 0x5bae, 0x5bb5, 0x5bb9, 0x5bb8, 0x5c04,
+  0x5c51, 0x5c55, 0x5c50, 0x5ced, 0x5cfd, 0x5cfb, 0x5cea, 0x5ce8,
+  0x5cf0, 0x5cf6, 0x5d01, 0x5cf4, 0x5dee, 0x5e2d, 0x5e2b, 0x5eab,
+  0x5ead, 0x5ea7, 0x5f31, 0x5f92, 0x5f91, 0x5f90, 0x6059, 0x6063,
+  0x6065, 0x6050, 0x6055, 0x606d, 0x6069, 0x606f, 0x6084, 0x609f,
+  0x609a, 0x608d, 0x6094, 0x608c, 0x6085, 0x6096, 0x6247, 0x62f3,
+  0x6308, 0x62ff, 0x634e, 0x633e, 0x632f, 0x6355, 0x6342, 0x6346,
+  0x634f, 0x6349, 0x633a, 0x6350, 0x633d, 0x632a, 0x632b, 0x6328,
+  0x634d, 0x634c, 0x6548, 0x6549, 0x6599, 0x65c1, 0x65c5, 0x6642,
+  0x6649, 0x664f, 0x6643, 0x6652, 0x664c, 0x6645, 0x6641, 0x66f8,
+  0x6714, 0x6715, 0x6717, 0x6821, 0x6838, 0x6848, 0x6846, 0x6853,
+  0x6839, 0x6842, 0x6854, 0x6829, 0x68b3, 0x6817, 0x684c, 0x6851,
+  0x683d, 0x67f4, 0x6850, 0x6840, 0x683c, 0x6843, 0x682a, 0x6845,
+  0x6813, 0x6818, 0x6841, 0x6b8a, 0x6b89, 0x6bb7, 0x6c23, 0x6c27,
+  0x6c28, 0x6c26, 0x6c24, 0x6cf0, 0x6d6a, 0x6d95, 0x6d88, 0x6d87,
+  0x6d66, 0x6d78, 0x6d77, 0x6d59, 0x6d93,
+  /* 0xaf */
+  0x6d6c, 0x6d89, 0x6d6e, 0x6d5a, 0x6d74, 0x6d69, 0x6d8c, 0x6d8a,
+  0x6d79, 0x6d85, 0x6d65, 0x6d94, 0x70ca, 0x70d8, 0x70e4, 0x70d9,
+  0x70c8, 0x70cf, 0x7239, 0x7279, 0x72fc, 0x72f9, 0x72fd, 0x72f8,
+  0x72f7, 0x7386, 0x73ed, 0x7409, 0x73ee, 0x73e0, 0x73ea, 0x73de,
+  0x7554, 0x755d, 0x755c, 0x755a, 0x7559, 0x75be, 0x75c5, 0x75c7,
+  0x75b2, 0x75b3, 0x75bd, 0x75bc, 0x75b9, 0x75c2, 0x75b8, 0x768b,
+  0x76b0, 0x76ca, 0x76cd, 0x76ce, 0x7729, 0x771f, 0x7720, 0x7728,
+  0x77e9, 0x7830, 0x7827, 0x7838, 0x781d, 0x7834, 0x7837, 0x7825,
+  0x782d, 0x7820, 0x781f, 0x7832, 0x7955, 0x7950, 0x7960, 0x795f,
+  0x7956, 0x795e, 0x795d, 0x7957, 0x795a, 0x79e4, 0x79e3, 0x79e7,
+  0x79df, 0x79e6, 0x79e9, 0x79d8, 0x7a84, 0x7a88, 0x7ad9, 0x7b06,
+  0x7b11, 0x7c89, 0x7d21, 0x7d17, 0x7d0b, 0x7d0a, 0x7d20, 0x7d22,
+  0x7d14, 0x7d10, 0x7d15, 0x7d1a, 0x7d1c, 0x7d0d, 0x7d19, 0x7d1b,
+  0x7f3a, 0x7f5f, 0x7f94, 0x7fc5, 0x7fc1, 0x8006, 0x8018, 0x8015,
+  0x8019, 0x8017, 0x803d, 0x803f, 0x80f1, 0x8102, 0x80f0, 0x8105,
+  0x80ed, 0x80f4, 0x8106, 0x80f8, 0x80f3, 0x8108, 0x80fd, 0x810a,
+  0x80fc, 0x80ef, 0x81ed, 0x81ec, 0x8200, 0x8210, 0x822a, 0x822b,
+  0x8228, 0x822c, 0x82bb, 0x832b, 0x8352, 0x8354, 0x834a, 0x8338,
+  0x8350, 0x8349, 0x8335, 0x8334, 0x834f, 0x8332, 0x8339, 0x8336,
+  0x8317, 0x8340, 0x8331, 0x8328, 0x8343,
+  /* 0xb0 */
+  0x8654, 0x868a, 0x86aa, 0x8693, 0x86a4, 0x86a9, 0x868c, 0x86a3,
+  0x869c, 0x8870, 0x8877, 0x8881, 0x8882, 0x887d, 0x8879, 0x8a18,
+  0x8a10, 0x8a0e, 0x8a0c, 0x8a15, 0x8a0a, 0x8a17, 0x8a13, 0x8a16,
+  0x8a0f, 0x8a11, 0x8c48, 0x8c7a, 0x8c79, 0x8ca1, 0x8ca2, 0x8d77,
+  0x8eac, 0x8ed2, 0x8ed4, 0x8ecf, 0x8fb1, 0x9001, 0x9006, 0x8ff7,
+  0x9000, 0x8ffa, 0x8ff4, 0x9003, 0x8ffd, 0x9005, 0x8ff8, 0x9095,
+  0x90e1, 0x90dd, 0x90e2, 0x9152, 0x914d, 0x914c, 0x91d8, 0x91dd,
+  0x91d7, 0x91dc, 0x91d9, 0x9583, 0x9662, 0x9663, 0x9661, 0x965b,
+  0x965d, 0x9664, 0x9658, 0x965e, 0x96bb, 0x98e2, 0x99ac, 0x9aa8,
+  0x9ad8, 0x9b25, 0x9b32, 0x9b3c, 0x4e7e, 0x507a, 0x507d, 0x505c,
+  0x5047, 0x5043, 0x504c, 0x505a, 0x5049, 0x5065, 0x5076, 0x504e,
+  0x5055, 0x5075, 0x5074, 0x5077, 0x504f, 0x500f, 0x506f, 0x506d,
+  0x515c, 0x5195, 0x51f0, 0x526a, 0x526f, 0x52d2, 0x52d9, 0x52d8,
+  0x52d5, 0x5310, 0x530f, 0x5319, 0x533f, 0x5340, 0x533e, 0x53c3,
+  0x66fc, 0x5546, 0x556a, 0x5566, 0x5544, 0x555e, 0x5561, 0x5543,
+  0x554a, 0x5531, 0x5556, 0x554f, 0x5555, 0x552f, 0x5564, 0x5538,
+  0x552e, 0x555c, 0x552c, 0x5563, 0x5533, 0x5541, 0x5557, 0x5708,
+  0x570b, 0x5709, 0x57df, 0x5805, 0x580a, 0x5806, 0x57e0, 0x57e4,
+  0x57fa, 0x5802, 0x5835, 0x57f7, 0x57f9, 0x5920, 0x5962, 0x5a36,
+  0x5a41, 0x5a49, 0x5a66, 0x5a6a, 0x5a40,
+  /* 0xb1 */
+  0x5a3c, 0x5a62, 0x5a5a, 0x5a46, 0x5a4a, 0x5b70, 0x5bc7, 0x5bc5,
+  0x5bc4, 0x5bc2, 0x5bbf, 0x5bc6, 0x5c09, 0x5c08, 0x5c07, 0x5c60,
+  0x5c5c, 0x5c5d, 0x5d07, 0x5d06, 0x5d0e, 0x5d1b, 0x5d16, 0x5d22,
+  0x5d11, 0x5d29, 0x5d14, 0x5d19, 0x5d24, 0x5d27, 0x5d17, 0x5de2,
+  0x5e38, 0x5e36, 0x5e33, 0x5e37, 0x5eb7, 0x5eb8, 0x5eb6, 0x5eb5,
+  0x5ebe, 0x5f35, 0x5f37, 0x5f57, 0x5f6c, 0x5f69, 0x5f6b, 0x5f97,
+  0x5f99, 0x5f9e, 0x5f98, 0x5fa1, 0x5fa0, 0x5f9c, 0x607f, 0x60a3,
+  0x6089, 0x60a0, 0x60a8, 0x60cb, 0x60b4, 0x60e6, 0x60bd, 0x60c5,
+  0x60bb, 0x60b5, 0x60dc, 0x60bc, 0x60d8, 0x60d5, 0x60c6, 0x60df,
+  0x60b8, 0x60da, 0x60c7, 0x621a, 0x621b, 0x6248, 0x63a0, 0x63a7,
+  0x6372, 0x6396, 0x63a2, 0x63a5, 0x6377, 0x6367, 0x6398, 0x63aa,
+  0x6371, 0x63a9, 0x6389, 0x6383, 0x639b, 0x636b, 0x63a8, 0x6384,
+  0x6388, 0x6399, 0x63a1, 0x63ac, 0x6392, 0x638f, 0x6380, 0x637b,
+  0x6369, 0x6368, 0x637a, 0x655d, 0x6556, 0x6551, 0x6559, 0x6557,
+  0x555f, 0x654f, 0x6558, 0x6555, 0x6554, 0x659c, 0x659b, 0x65ac,
+  0x65cf, 0x65cb, 0x65cc, 0x65ce, 0x665d, 0x665a, 0x6664, 0x6668,
+  0x6666, 0x665e, 0x66f9, 0x52d7, 0x671b, 0x6881, 0x68af, 0x68a2,
+  0x6893, 0x68b5, 0x687f, 0x6876, 0x68b1, 0x68a7, 0x6897, 0x68b0,
+  0x6883, 0x68c4, 0x68ad, 0x6886, 0x6885, 0x6894, 0x689d, 0x68a8,
+  0x689f, 0x68a1, 0x6882, 0x6b32, 0x6bba,
+  /* 0xb2 */
+  0x6beb, 0x6bec, 0x6c2b, 0x6d8e, 0x6dbc, 0x6df3, 0x6dd9, 0x6db2,
+  0x6de1, 0x6dcc, 0x6de4, 0x6dfb, 0x6dfa, 0x6e05, 0x6dc7, 0x6dcb,
+  0x6daf, 0x6dd1, 0x6dae, 0x6dde, 0x6df9, 0x6db8, 0x6df7, 0x6df5,
+  0x6dc5, 0x6dd2, 0x6e1a, 0x6db5, 0x6dda, 0x6deb, 0x6dd8, 0x6dea,
+  0x6df1, 0x6dee, 0x6de8, 0x6dc6, 0x6dc4, 0x6daa, 0x6dec, 0x6dbf,
+  0x6de6, 0x70f9, 0x7109, 0x710a, 0x70fd, 0x70ef, 0x723d, 0x727d,
+  0x7281, 0x731c, 0x731b, 0x7316, 0x7313, 0x7319, 0x7387, 0x7405,
+  0x740a, 0x7403, 0x7406, 0x73fe, 0x740d, 0x74e0, 0x74f6, 0x74f7,
+  0x751c, 0x7522, 0x7565, 0x7566, 0x7562, 0x7570, 0x758f, 0x75d4,
+  0x75d5, 0x75b5, 0x75ca, 0x75cd, 0x768e, 0x76d4, 0x76d2, 0x76db,
+  0x7737, 0x773e, 0x773c, 0x7736, 0x7738, 0x773a, 0x786b, 0x7843,
+  0x784e, 0x7965, 0x7968, 0x796d, 0x79fb, 0x7a92, 0x7a95, 0x7b20,
+  0x7b28, 0x7b1b, 0x7b2c, 0x7b26, 0x7b19, 0x7b1e, 0x7b2e, 0x7c92,
+  0x7c97, 0x7c95, 0x7d46, 0x7d43, 0x7d71, 0x7d2e, 0x7d39, 0x7d3c,
+  0x7d40, 0x7d30, 0x7d33, 0x7d44, 0x7d2f, 0x7d42, 0x7d32, 0x7d31,
+  0x7f3d, 0x7f9e, 0x7f9a, 0x7fcc, 0x7fce, 0x7fd2, 0x801c, 0x804a,
+  0x8046, 0x812f, 0x8116, 0x8123, 0x812b, 0x8129, 0x8130, 0x8124,
+  0x8202, 0x8235, 0x8237, 0x8236, 0x8239, 0x838e, 0x839e, 0x8398,
+  0x8378, 0x83a2, 0x8396, 0x83bd, 0x83ab, 0x8392, 0x838a, 0x8393,
+  0x8389, 0x83a0, 0x8377, 0x837b, 0x837c,
+  /* 0xb3 */
+  0x8386, 0x83a7, 0x8655, 0x5f6a, 0x86c7, 0x86c0, 0x86b6, 0x86c4,
+  0x86b5, 0x86c6, 0x86cb, 0x86b1, 0x86af, 0x86c9, 0x8853, 0x889e,
+  0x8888, 0x88ab, 0x8892, 0x8896, 0x888d, 0x888b, 0x8993, 0x898f,
+  0x8a2a, 0x8a1d, 0x8a23, 0x8a25, 0x8a31, 0x8a2d, 0x8a1f, 0x8a1b,
+  0x8a22, 0x8c49, 0x8c5a, 0x8ca9, 0x8cac, 0x8cab, 0x8ca8, 0x8caa,
+  0x8ca7, 0x8d67, 0x8d66, 0x8dbe, 0x8dba, 0x8edb, 0x8edf, 0x9019,
+  0x900d, 0x901a, 0x9017, 0x9023, 0x901f, 0x901d, 0x9010, 0x9015,
+  0x901e, 0x9020, 0x900f, 0x9022, 0x9016, 0x901b, 0x9014, 0x90e8,
+  0x90ed, 0x90fd, 0x9157, 0x91ce, 0x91f5, 0x91e6, 0x91e3, 0x91e7,
+  0x91ed, 0x91e9, 0x9589, 0x966a, 0x9675, 0x9673, 0x9678, 0x9670,
+  0x9674, 0x9676, 0x9677, 0x966c, 0x96c0, 0x96ea, 0x96e9, 0x7ae0,
+  0x7adf, 0x9802, 0x9803, 0x9b5a, 0x9ce5, 0x9e75, 0x9e7f, 0x9ea5,
+  0x9ebb, 0x50a2, 0x508d, 0x5085, 0x5099, 0x5091, 0x5080, 0x5096,
+  0x5098, 0x509a, 0x6700, 0x51f1, 0x5272, 0x5274, 0x5275, 0x5269,
+  0x52de, 0x52dd, 0x52db, 0x535a, 0x53a5, 0x557b, 0x5580, 0x55a7,
+  0x557c, 0x558a, 0x559d, 0x5598, 0x5582, 0x559c, 0x55aa, 0x5594,
+  0x5587, 0x558b, 0x5583, 0x55b3, 0x55ae, 0x559f, 0x553e, 0x55b2,
+  0x559a, 0x55bb, 0x55ac, 0x55b1, 0x557e, 0x5589, 0x55ab, 0x5599,
+  0x570d, 0x582f, 0x582a, 0x5834, 0x5824, 0x5830, 0x5831, 0x5821,
+  0x581d, 0x5820, 0x58f9, 0x58fa, 0x5960,
+  /* 0xb4 */
+  0x5a77, 0x5a9a, 0x5a7f, 0x5a92, 0x5a9b, 0x5aa7, 0x5b73, 0x5b71,
+  0x5bd2, 0x5bcc, 0x5bd3, 0x5bd0, 0x5c0a, 0x5c0b, 0x5c31, 0x5d4c,
+  0x5d50, 0x5d34, 0x5d47, 0x5dfd, 0x5e45, 0x5e3d, 0x5e40, 0x5e43,
+  0x5e7e, 0x5eca, 0x5ec1, 0x5ec2, 0x5ec4, 0x5f3c, 0x5f6d, 0x5fa9,
+  0x5faa, 0x5fa8, 0x60d1, 0x60e1, 0x60b2, 0x60b6, 0x60e0, 0x611c,
+  0x6123, 0x60fa, 0x6115, 0x60f0, 0x60fb, 0x60f4, 0x6168, 0x60f1,
+  0x610e, 0x60f6, 0x6109, 0x6100, 0x6112, 0x621f, 0x6249, 0x63a3,
+  0x638c, 0x63cf, 0x63c0, 0x63e9, 0x63c9, 0x63c6, 0x63cd, 0x63d2,
+  0x63e3, 0x63d0, 0x63e1, 0x63d6, 0x63ed, 0x63ee, 0x6376, 0x63f4,
+  0x63ea, 0x63db, 0x6452, 0x63da, 0x63f9, 0x655e, 0x6566, 0x6562,
+  0x6563, 0x6591, 0x6590, 0x65af, 0x666e, 0x6670, 0x6674, 0x6676,
+  0x666f, 0x6691, 0x667a, 0x667e, 0x6677, 0x66fe, 0x66ff, 0x671f,
+  0x671d, 0x68fa, 0x68d5, 0x68e0, 0x68d8, 0x68d7, 0x6905, 0x68df,
+  0x68f5, 0x68ee, 0x68e7, 0x68f9, 0x68d2, 0x68f2, 0x68e3, 0x68cb,
+  0x68cd, 0x690d, 0x6912, 0x690e, 0x68c9, 0x68da, 0x696e, 0x68fb,
+  0x6b3e, 0x6b3a, 0x6b3d, 0x6b98, 0x6b96, 0x6bbc, 0x6bef, 0x6c2e,
+  0x6c2f, 0x6c2c, 0x6e2f, 0x6e38, 0x6e54, 0x6e21, 0x6e32, 0x6e67,
+  0x6e4a, 0x6e20, 0x6e25, 0x6e23, 0x6e1b, 0x6e5b, 0x6e58, 0x6e24,
+  0x6e56, 0x6e6e, 0x6e2d, 0x6e26, 0x6e6f, 0x6e34, 0x6e4d, 0x6e3a,
+  0x6e2c, 0x6e43, 0x6e1d, 0x6e3e, 0x6ecb,
+  /* 0xb5 */
+  0x6e89, 0x6e19, 0x6e4e, 0x6e63, 0x6e44, 0x6e72, 0x6e69, 0x6e5f,
+  0x7119, 0x711a, 0x7126, 0x7130, 0x7121, 0x7136, 0x716e, 0x711c,
+  0x724c, 0x7284, 0x7280, 0x7336, 0x7325, 0x7334, 0x7329, 0x743a,
+  0x742a, 0x7433, 0x7422, 0x7425, 0x7435, 0x7436, 0x7434, 0x742f,
+  0x741b, 0x7426, 0x7428, 0x7525, 0x7526, 0x756b, 0x756a, 0x75e2,
+  0x75db, 0x75e3, 0x75d9, 0x75d8, 0x75de, 0x75e0, 0x767b, 0x767c,
+  0x7696, 0x7693, 0x76b4, 0x76dc, 0x774f, 0x77ed, 0x785d, 0x786c,
+  0x786f, 0x7a0d, 0x7a08, 0x7a0b, 0x7a05, 0x7a00, 0x7a98, 0x7a97,
+  0x7a96, 0x7ae5, 0x7ae3, 0x7b49, 0x7b56, 0x7b46, 0x7b50, 0x7b52,
+  0x7b54, 0x7b4d, 0x7b4b, 0x7b4f, 0x7b51, 0x7c9f, 0x7ca5, 0x7d5e,
+  0x7d50, 0x7d68, 0x7d55, 0x7d2b, 0x7d6e, 0x7d72, 0x7d61, 0x7d66,
+  0x7d62, 0x7d70, 0x7d73, 0x5584, 0x7fd4, 0x7fd5, 0x800b, 0x8052,
+  0x8085, 0x8155, 0x8154, 0x814b, 0x8151, 0x814e, 0x8139, 0x8146,
+  0x813e, 0x814c, 0x8153, 0x8174, 0x8212, 0x821c, 0x83e9, 0x8403,
+  0x83f8, 0x840d, 0x83e0, 0x83c5, 0x840b, 0x83c1, 0x83ef, 0x83f1,
+  0x83f4, 0x8457, 0x840a, 0x83f0, 0x840c, 0x83cc, 0x83fd, 0x83f2,
+  0x83ca, 0x8438, 0x840e, 0x8404, 0x83dc, 0x8407, 0x83d4, 0x83df,
+  0x865b, 0x86df, 0x86d9, 0x86ed, 0x86d4, 0x86db, 0x86e4, 0x86d0,
+  0x86de, 0x8857, 0x88c1, 0x88c2, 0x88b1, 0x8983, 0x8996, 0x8a3b,
+  0x8a60, 0x8a55, 0x8a5e, 0x8a3c, 0x8a41,
+  /* 0xb6 */
+  0x8a54, 0x8a5b, 0x8a50, 0x8a46, 0x8a34, 0x8a3a, 0x8a36, 0x8a56,
+  0x8c61, 0x8c82, 0x8caf, 0x8cbc, 0x8cb3, 0x8cbd, 0x8cc1, 0x8cbb,
+  0x8cc0, 0x8cb4, 0x8cb7, 0x8cb6, 0x8cbf, 0x8cb8, 0x8d8a, 0x8d85,
+  0x8d81, 0x8dce, 0x8ddd, 0x8dcb, 0x8dda, 0x8dd1, 0x8dcc, 0x8ddb,
+  0x8dc6, 0x8efb, 0x8ef8, 0x8efc, 0x8f9c, 0x902e, 0x9035, 0x9031,
+  0x9038, 0x9032, 0x9036, 0x9102, 0x90f5, 0x9109, 0x90fe, 0x9163,
+  0x9165, 0x91cf, 0x9214, 0x9215, 0x9223, 0x9209, 0x921e, 0x920d,
+  0x9210, 0x9207, 0x9211, 0x9594, 0x958f, 0x958b, 0x9591, 0x9593,
+  0x9592, 0x958e, 0x968a, 0x968e, 0x968b, 0x967d, 0x9685, 0x9686,
+  0x968d, 0x9672, 0x9684, 0x96c1, 0x96c5, 0x96c4, 0x96c6, 0x96c7,
+  0x96ef, 0x96f2, 0x97cc, 0x9805, 0x9806, 0x9808, 0x98e7, 0x98ea,
+  0x98ef, 0x98e9, 0x98f2, 0x98ed, 0x99ae, 0x99ad, 0x9ec3, 0x9ecd,
+  0x9ed1, 0x4e82, 0x50ad, 0x50b5, 0x50b2, 0x50b3, 0x50c5, 0x50be,
+  0x50ac, 0x50b7, 0x50bb, 0x50af, 0x50c7, 0x527f, 0x5277, 0x527d,
+  0x52df, 0x52e6, 0x52e4, 0x52e2, 0x52e3, 0x532f, 0x55df, 0x55e8,
+  0x55d3, 0x55e6, 0x55ce, 0x55dc, 0x55c7, 0x55d1, 0x55e3, 0x55e4,
+  0x55ef, 0x55da, 0x55e1, 0x55c5, 0x55c6, 0x55e5, 0x55c9, 0x5712,
+  0x5713, 0x585e, 0x5851, 0x5858, 0x5857, 0x585a, 0x5854, 0x586b,
+  0x584c, 0x586d, 0x584a, 0x5862, 0x5852, 0x584b, 0x5967, 0x5ac1,
+  0x5ac9, 0x5acc, 0x5abe, 0x5abd, 0x5abc,
+  /* 0xb7 */
+  0x5ab3, 0x5ac2, 0x5ab2, 0x5d69, 0x5d6f, 0x5e4c, 0x5e79, 0x5ec9,
+  0x5ec8, 0x5f12, 0x5f59, 0x5fac, 0x5fae, 0x611a, 0x610f, 0x6148,
+  0x611f, 0x60f3, 0x611b, 0x60f9, 0x6101, 0x6108, 0x614e, 0x614c,
+  0x6144, 0x614d, 0x613e, 0x6134, 0x6127, 0x610d, 0x6106, 0x6137,
+  0x6221, 0x6222, 0x6413, 0x643e, 0x641e, 0x642a, 0x642d, 0x643d,
+  0x642c, 0x640f, 0x641c, 0x6414, 0x640d, 0x6436, 0x6416, 0x6417,
+  0x6406, 0x656c, 0x659f, 0x65b0, 0x6697, 0x6689, 0x6687, 0x6688,
+  0x6696, 0x6684, 0x6698, 0x668d, 0x6703, 0x6994, 0x696d, 0x695a,
+  0x6977, 0x6960, 0x6954, 0x6975, 0x6930, 0x6982, 0x694a, 0x6968,
+  0x696b, 0x695e, 0x6953, 0x6979, 0x6986, 0x695d, 0x6963, 0x695b,
+  0x6b47, 0x6b72, 0x6bc0, 0x6bbf, 0x6bd3, 0x6bfd, 0x6ea2, 0x6eaf,
+  0x6ed3, 0x6eb6, 0x6ec2, 0x6e90, 0x6e9d, 0x6ec7, 0x6ec5, 0x6ea5,
+  0x6e98, 0x6ebc, 0x6eba, 0x6eab, 0x6ed1, 0x6e96, 0x6e9c, 0x6ec4,
+  0x6ed4, 0x6eaa, 0x6ea7, 0x6eb4, 0x714e, 0x7159, 0x7169, 0x7164,
+  0x7149, 0x7167, 0x715c, 0x716c, 0x7166, 0x714c, 0x7165, 0x715e,
+  0x7146, 0x7168, 0x7156, 0x723a, 0x7252, 0x7337, 0x7345, 0x733f,
+  0x733e, 0x746f, 0x745a, 0x7455, 0x745f, 0x745e, 0x7441, 0x743f,
+  0x7459, 0x745b, 0x745c, 0x7576, 0x7578, 0x7600, 0x75f0, 0x7601,
+  0x75f2, 0x75f1, 0x75fa, 0x75ff, 0x75f4, 0x75f3, 0x76de, 0x76df,
+  0x775b, 0x776b, 0x7766, 0x775e, 0x7763,
+  /* 0xb8 */
+  0x7779, 0x776a, 0x776c, 0x775c, 0x7765, 0x7768, 0x7762, 0x77ee,
+  0x788e, 0x78b0, 0x7897, 0x7898, 0x788c, 0x7889, 0x787c, 0x7891,
+  0x7893, 0x787f, 0x797a, 0x797f, 0x7981, 0x842c, 0x79bd, 0x7a1c,
+  0x7a1a, 0x7a20, 0x7a14, 0x7a1f, 0x7a1e, 0x7a9f, 0x7aa0, 0x7b77,
+  0x7bc0, 0x7b60, 0x7b6e, 0x7b67, 0x7cb1, 0x7cb3, 0x7cb5, 0x7d93,
+  0x7d79, 0x7d91, 0x7d81, 0x7d8f, 0x7d5b, 0x7f6e, 0x7f69, 0x7f6a,
+  0x7f72, 0x7fa9, 0x7fa8, 0x7fa4, 0x8056, 0x8058, 0x8086, 0x8084,
+  0x8171, 0x8170, 0x8178, 0x8165, 0x816e, 0x8173, 0x816b, 0x8179,
+  0x817a, 0x8166, 0x8205, 0x8247, 0x8482, 0x8477, 0x843d, 0x8431,
+  0x8475, 0x8466, 0x846b, 0x8449, 0x846c, 0x845b, 0x843c, 0x8435,
+  0x8461, 0x8463, 0x8469, 0x846d, 0x8446, 0x865e, 0x865c, 0x865f,
+  0x86f9, 0x8713, 0x8708, 0x8707, 0x8700, 0x86fe, 0x86fb, 0x8702,
+  0x8703, 0x8706, 0x870a, 0x8859, 0x88df, 0x88d4, 0x88d9, 0x88dc,
+  0x88d8, 0x88dd, 0x88e1, 0x88ca, 0x88d5, 0x88d2, 0x899c, 0x89e3,
+  0x8a6b, 0x8a72, 0x8a73, 0x8a66, 0x8a69, 0x8a70, 0x8a87, 0x8a7c,
+  0x8a63, 0x8aa0, 0x8a71, 0x8a85, 0x8a6d, 0x8a62, 0x8a6e, 0x8a6c,
+  0x8a79, 0x8a7b, 0x8a3e, 0x8a68, 0x8c62, 0x8c8a, 0x8c89, 0x8cca,
+  0x8cc7, 0x8cc8, 0x8cc4, 0x8cb2, 0x8cc3, 0x8cc2, 0x8cc5, 0x8de1,
+  0x8ddf, 0x8de8, 0x8def, 0x8df3, 0x8dfa, 0x8dea, 0x8de4, 0x8de6,
+  0x8eb2, 0x8f03, 0x8f09, 0x8efe, 0x8f0a,
+  /* 0xb9 */
+  0x8f9f, 0x8fb2, 0x904b, 0x904a, 0x9053, 0x9042, 0x9054, 0x903c,
+  0x9055, 0x9050, 0x9047, 0x904f, 0x904e, 0x904d, 0x9051, 0x903e,
+  0x9041, 0x9112, 0x9117, 0x916c, 0x916a, 0x9169, 0x91c9, 0x9237,
+  0x9257, 0x9238, 0x923d, 0x9240, 0x923e, 0x925b, 0x924b, 0x9264,
+  0x9251, 0x9234, 0x9249, 0x924d, 0x9245, 0x9239, 0x923f, 0x925a,
+  0x9598, 0x9698, 0x9694, 0x9695, 0x96cd, 0x96cb, 0x96c9, 0x96ca,
+  0x96f7, 0x96fb, 0x96f9, 0x96f6, 0x9756, 0x9774, 0x9776, 0x9810,
+  0x9811, 0x9813, 0x980a, 0x9812, 0x980c, 0x98fc, 0x98f4, 0x98fd,
+  0x98fe, 0x99b3, 0x99b1, 0x99b4, 0x9ae1, 0x9ce9, 0x9e82, 0x9f0e,
+  0x9f13, 0x9f20, 0x50e7, 0x50ee, 0x50e5, 0x50d6, 0x50ed, 0x50da,
+  0x50d5, 0x50cf, 0x50d1, 0x50f1, 0x50ce, 0x50e9, 0x5162, 0x51f3,
+  0x5283, 0x5282, 0x5331, 0x53ad, 0x55fe, 0x5600, 0x561b, 0x5617,
+  0x55fd, 0x5614, 0x5606, 0x5609, 0x560d, 0x560e, 0x55f7, 0x5616,
+  0x561f, 0x5608, 0x5610, 0x55f6, 0x5718, 0x5716, 0x5875, 0x587e,
+  0x5883, 0x5893, 0x588a, 0x5879, 0x5885, 0x587d, 0x58fd, 0x5925,
+  0x5922, 0x5924, 0x596a, 0x5969, 0x5ae1, 0x5ae6, 0x5ae9, 0x5ad7,
+  0x5ad6, 0x5ad8, 0x5ae3, 0x5b75, 0x5bde, 0x5be7, 0x5be1, 0x5be5,
+  0x5be6, 0x5be8, 0x5be2, 0x5be4, 0x5bdf, 0x5c0d, 0x5c62, 0x5d84,
+  0x5d87, 0x5e5b, 0x5e63, 0x5e55, 0x5e57, 0x5e54, 0x5ed3, 0x5ed6,
+  0x5f0a, 0x5f46, 0x5f70, 0x5fb9, 0x6147,
+  /* 0xba */
+  0x613f, 0x614b, 0x6177, 0x6162, 0x6163, 0x615f, 0x615a, 0x6158,
+  0x6175, 0x622a, 0x6487, 0x6458, 0x6454, 0x64a4, 0x6478, 0x645f,
+  0x647a, 0x6451, 0x6467, 0x6434, 0x646d, 0x647b, 0x6572, 0x65a1,
+  0x65d7, 0x65d6, 0x66a2, 0x66a8, 0x669d, 0x699c, 0x69a8, 0x6995,
+  0x69c1, 0x69ae, 0x69d3, 0x69cb, 0x699b, 0x69b7, 0x69bb, 0x69ab,
+  0x69b4, 0x69d0, 0x69cd, 0x69ad, 0x69cc, 0x69a6, 0x69c3, 0x69a3,
+  0x6b49, 0x6b4c, 0x6c33, 0x6f33, 0x6f14, 0x6efe, 0x6f13, 0x6ef4,
+  0x6f29, 0x6f3e, 0x6f20, 0x6f2c, 0x6f0f, 0x6f02, 0x6f22, 0x6eff,
+  0x6eef, 0x6f06, 0x6f31, 0x6f38, 0x6f32, 0x6f23, 0x6f15, 0x6f2b,
+  0x6f2f, 0x6f88, 0x6f2a, 0x6eec, 0x6f01, 0x6ef2, 0x6ecc, 0x6ef7,
+  0x7194, 0x7199, 0x717d, 0x718a, 0x7184, 0x7192, 0x723e, 0x7292,
+  0x7296, 0x7344, 0x7350, 0x7464, 0x7463, 0x746a, 0x7470, 0x746d,
+  0x7504, 0x7591, 0x7627, 0x760d, 0x760b, 0x7609, 0x7613, 0x76e1,
+  0x76e3, 0x7784, 0x777d, 0x777f, 0x7761, 0x78c1, 0x789f, 0x78a7,
+  0x78b3, 0x78a9, 0x78a3, 0x798e, 0x798f, 0x798d, 0x7a2e, 0x7a31,
+  0x7aaa, 0x7aa9, 0x7aed, 0x7aef, 0x7ba1, 0x7b95, 0x7b8b, 0x7b75,
+  0x7b97, 0x7b9d, 0x7b94, 0x7b8f, 0x7bb8, 0x7b87, 0x7b84, 0x7cb9,
+  0x7cbd, 0x7cbe, 0x7dbb, 0x7db0, 0x7d9c, 0x7dbd, 0x7dbe, 0x7da0,
+  0x7dca, 0x7db4, 0x7db2, 0x7db1, 0x7dba, 0x7da2, 0x7dbf, 0x7db5,
+  0x7db8, 0x7dad, 0x7dd2, 0x7dc7, 0x7dac,
+  /* 0xbb */
+  0x7f70, 0x7fe0, 0x7fe1, 0x7fdf, 0x805e, 0x805a, 0x8087, 0x8150,
+  0x8180, 0x818f, 0x8188, 0x818a, 0x817f, 0x8182, 0x81e7, 0x81fa,
+  0x8207, 0x8214, 0x821e, 0x824b, 0x84c9, 0x84bf, 0x84c6, 0x84c4,
+  0x8499, 0x849e, 0x84b2, 0x849c, 0x84cb, 0x84b8, 0x84c0, 0x84d3,
+  0x8490, 0x84bc, 0x84d1, 0x84ca, 0x873f, 0x871c, 0x873b, 0x8722,
+  0x8725, 0x8734, 0x8718, 0x8755, 0x8737, 0x8729, 0x88f3, 0x8902,
+  0x88f4, 0x88f9, 0x88f8, 0x88fd, 0x88e8, 0x891a, 0x88ef, 0x8aa6,
+  0x8a8c, 0x8a9e, 0x8aa3, 0x8a8d, 0x8aa1, 0x8a93, 0x8aa4, 0x8aaa,
+  0x8aa5, 0x8aa8, 0x8a98, 0x8a91, 0x8a9a, 0x8aa7, 0x8c6a, 0x8c8d,
+  0x8c8c, 0x8cd3, 0x8cd1, 0x8cd2, 0x8d6b, 0x8d99, 0x8d95, 0x8dfc,
+  0x8f14, 0x8f12, 0x8f15, 0x8f13, 0x8fa3, 0x9060, 0x9058, 0x905c,
+  0x9063, 0x9059, 0x905e, 0x9062, 0x905d, 0x905b, 0x9119, 0x9118,
+  0x911e, 0x9175, 0x9178, 0x9177, 0x9174, 0x9278, 0x9280, 0x9285,
+  0x9298, 0x9296, 0x927b, 0x9293, 0x929c, 0x92a8, 0x927c, 0x9291,
+  0x95a1, 0x95a8, 0x95a9, 0x95a3, 0x95a5, 0x95a4, 0x9699, 0x969c,
+  0x969b, 0x96cc, 0x96d2, 0x9700, 0x977c, 0x9785, 0x97f6, 0x9817,
+  0x9818, 0x98af, 0x98b1, 0x9903, 0x9905, 0x990c, 0x9909, 0x99c1,
+  0x9aaf, 0x9ab0, 0x9ae6, 0x9b41, 0x9b42, 0x9cf4, 0x9cf6, 0x9cf3,
+  0x9ebc, 0x9f3b, 0x9f4a, 0x5104, 0x5100, 0x50fb, 0x50f5, 0x50f9,
+  0x5102, 0x5108, 0x5109, 0x5105, 0x51dc,
+  /* 0xbc */
+  0x5287, 0x5288, 0x5289, 0x528d, 0x528a, 0x52f0, 0x53b2, 0x562e,
+  0x563b, 0x5639, 0x5632, 0x563f, 0x5634, 0x5629, 0x5653, 0x564e,
+  0x5657, 0x5674, 0x5636, 0x562f, 0x5630, 0x5880, 0x589f, 0x589e,
+  0x58b3, 0x589c, 0x58ae, 0x58a9, 0x58a6, 0x596d, 0x5b09, 0x5afb,
+  0x5b0b, 0x5af5, 0x5b0c, 0x5b08, 0x5bee, 0x5bec, 0x5be9, 0x5beb,
+  0x5c64, 0x5c65, 0x5d9d, 0x5d94, 0x5e62, 0x5e5f, 0x5e61, 0x5ee2,
+  0x5eda, 0x5edf, 0x5edd, 0x5ee3, 0x5ee0, 0x5f48, 0x5f71, 0x5fb7,
+  0x5fb5, 0x6176, 0x6167, 0x616e, 0x615d, 0x6155, 0x6182, 0x617c,
+  0x6170, 0x616b, 0x617e, 0x61a7, 0x6190, 0x61ab, 0x618e, 0x61ac,
+  0x619a, 0x61a4, 0x6194, 0x61ae, 0x622e, 0x6469, 0x646f, 0x6479,
+  0x649e, 0x64b2, 0x6488, 0x6490, 0x64b0, 0x64a5, 0x6493, 0x6495,
+  0x64a9, 0x6492, 0x64ae, 0x64ad, 0x64ab, 0x649a, 0x64ac, 0x6499,
+  0x64a2, 0x64b3, 0x6575, 0x6577, 0x6578, 0x66ae, 0x66ab, 0x66b4,
+  0x66b1, 0x6a23, 0x6a1f, 0x69e8, 0x6a01, 0x6a1e, 0x6a19, 0x69fd,
+  0x6a21, 0x6a13, 0x6a0a, 0x69f3, 0x6a02, 0x6a05, 0x69ed, 0x6a11,
+  0x6b50, 0x6b4e, 0x6ba4, 0x6bc5, 0x6bc6, 0x6f3f, 0x6f7c, 0x6f84,
+  0x6f51, 0x6f66, 0x6f54, 0x6f86, 0x6f6d, 0x6f5b, 0x6f78, 0x6f6e,
+  0x6f8e, 0x6f7a, 0x6f70, 0x6f64, 0x6f97, 0x6f58, 0x6ed5, 0x6f6f,
+  0x6f60, 0x6f5f, 0x719f, 0x71ac, 0x71b1, 0x71a8, 0x7256, 0x729b,
+  0x734e, 0x7357, 0x7469, 0x748b, 0x7483,
+  /* 0xbd */
+  0x747e, 0x7480, 0x757f, 0x7620, 0x7629, 0x761f, 0x7624, 0x7626,
+  0x7621, 0x7622, 0x769a, 0x76ba, 0x76e4, 0x778e, 0x7787, 0x778c,
+  0x7791, 0x778b, 0x78cb, 0x78c5, 0x78ba, 0x78ca, 0x78be, 0x78d5,
+  0x78bc, 0x78d0, 0x7a3f, 0x7a3c, 0x7a40, 0x7a3d, 0x7a37, 0x7a3b,
+  0x7aaf, 0x7aae, 0x7bad, 0x7bb1, 0x7bc4, 0x7bb4, 0x7bc6, 0x7bc7,
+  0x7bc1, 0x7ba0, 0x7bcc, 0x7cca, 0x7de0, 0x7df4, 0x7def, 0x7dfb,
+  0x7dd8, 0x7dec, 0x7ddd, 0x7de8, 0x7de3, 0x7dda, 0x7dde, 0x7de9,
+  0x7d9e, 0x7dd9, 0x7df2, 0x7df9, 0x7f75, 0x7f77, 0x7faf, 0x7fe9,
+  0x8026, 0x819b, 0x819c, 0x819d, 0x81a0, 0x819a, 0x8198, 0x8517,
+  0x853d, 0x851a, 0x84ee, 0x852c, 0x852d, 0x8513, 0x8511, 0x8523,
+  0x8521, 0x8514, 0x84ec, 0x8525, 0x84ff, 0x8506, 0x8782, 0x8774,
+  0x8776, 0x8760, 0x8766, 0x8778, 0x8768, 0x8759, 0x8757, 0x874c,
+  0x8753, 0x885b, 0x885d, 0x8910, 0x8907, 0x8912, 0x8913, 0x8915,
+  0x890a, 0x8abc, 0x8ad2, 0x8ac7, 0x8ac4, 0x8a95, 0x8acb, 0x8af8,
+  0x8ab2, 0x8ac9, 0x8ac2, 0x8abf, 0x8ab0, 0x8ad6, 0x8acd, 0x8ab6,
+  0x8ab9, 0x8adb, 0x8c4c, 0x8c4e, 0x8c6c, 0x8ce0, 0x8cde, 0x8ce6,
+  0x8ce4, 0x8cec, 0x8ced, 0x8ce2, 0x8ce3, 0x8cdc, 0x8cea, 0x8ce1,
+  0x8d6d, 0x8d9f, 0x8da3, 0x8e2b, 0x8e10, 0x8e1d, 0x8e22, 0x8e0f,
+  0x8e29, 0x8e1f, 0x8e21, 0x8e1e, 0x8eba, 0x8f1d, 0x8f1b, 0x8f1f,
+  0x8f29, 0x8f26, 0x8f2a, 0x8f1c, 0x8f1e,
+  /* 0xbe */
+  0x8f25, 0x9069, 0x906e, 0x9068, 0x906d, 0x9077, 0x9130, 0x912d,
+  0x9127, 0x9131, 0x9187, 0x9189, 0x918b, 0x9183, 0x92c5, 0x92bb,
+  0x92b7, 0x92ea, 0x92ac, 0x92e4, 0x92c1, 0x92b3, 0x92bc, 0x92d2,
+  0x92c7, 0x92f0, 0x92b2, 0x95ad, 0x95b1, 0x9704, 0x9706, 0x9707,
+  0x9709, 0x9760, 0x978d, 0x978b, 0x978f, 0x9821, 0x982b, 0x981c,
+  0x98b3, 0x990a, 0x9913, 0x9912, 0x9918, 0x99dd, 0x99d0, 0x99df,
+  0x99db, 0x99d1, 0x99d5, 0x99d2, 0x99d9, 0x9ab7, 0x9aee, 0x9aef,
+  0x9b27, 0x9b45, 0x9b44, 0x9b77, 0x9b6f, 0x9d06, 0x9d09, 0x9d03,
+  0x9ea9, 0x9ebe, 0x9ece, 0x58a8, 0x9f52, 0x5112, 0x5118, 0x5114,
+  0x5110, 0x5115, 0x5180, 0x51aa, 0x51dd, 0x5291, 0x5293, 0x52f3,
+  0x5659, 0x566b, 0x5679, 0x5669, 0x5664, 0x5678, 0x566a, 0x5668,
+  0x5665, 0x5671, 0x566f, 0x566c, 0x5662, 0x5676, 0x58c1, 0x58be,
+  0x58c7, 0x58c5, 0x596e, 0x5b1d, 0x5b34, 0x5b78, 0x5bf0, 0x5c0e,
+  0x5f4a, 0x61b2, 0x6191, 0x61a9, 0x618a, 0x61cd, 0x61b6, 0x61be,
+  0x61ca, 0x61c8, 0x6230, 0x64c5, 0x64c1, 0x64cb, 0x64bb, 0x64bc,
+  0x64da, 0x64c4, 0x64c7, 0x64c2, 0x64cd, 0x64bf, 0x64d2, 0x64d4,
+  0x64be, 0x6574, 0x66c6, 0x66c9, 0x66b9, 0x66c4, 0x66c7, 0x66b8,
+  0x6a3d, 0x6a38, 0x6a3a, 0x6a59, 0x6a6b, 0x6a58, 0x6a39, 0x6a44,
+  0x6a62, 0x6a61, 0x6a4b, 0x6a47, 0x6a35, 0x6a5f, 0x6a48, 0x6b59,
+  0x6b77, 0x6c05, 0x6fc2, 0x6fb1, 0x6fa1,
+  /* 0xbf */
+  0x6fc3, 0x6fa4, 0x6fc1, 0x6fa7, 0x6fb3, 0x6fc0, 0x6fb9, 0x6fb6,
+  0x6fa6, 0x6fa0, 0x6fb4, 0x71be, 0x71c9, 0x71d0, 0x71d2, 0x71c8,
+  0x71d5, 0x71b9, 0x71ce, 0x71d9, 0x71dc, 0x71c3, 0x71c4, 0x7368,
+  0x749c, 0x74a3, 0x7498, 0x749f, 0x749e, 0x74e2, 0x750c, 0x750d,
+  0x7634, 0x7638, 0x763a, 0x76e7, 0x76e5, 0x77a0, 0x779e, 0x779f,
+  0x77a5, 0x78e8, 0x78da, 0x78ec, 0x78e7, 0x79a6, 0x7a4d, 0x7a4e,
+  0x7a46, 0x7a4c, 0x7a4b, 0x7aba, 0x7bd9, 0x7c11, 0x7bc9, 0x7be4,
+  0x7bdb, 0x7be1, 0x7be9, 0x7be6, 0x7cd5, 0x7cd6, 0x7e0a, 0x7e11,
+  0x7e08, 0x7e1b, 0x7e23, 0x7e1e, 0x7e1d, 0x7e09, 0x7e10, 0x7f79,
+  0x7fb2, 0x7ff0, 0x7ff1, 0x7fee, 0x8028, 0x81b3, 0x81a9, 0x81a8,
+  0x81fb, 0x8208, 0x8258, 0x8259, 0x854a, 0x8559, 0x8548, 0x8568,
+  0x8569, 0x8543, 0x8549, 0x856d, 0x856a, 0x855e, 0x8783, 0x879f,
+  0x879e, 0x87a2, 0x878d, 0x8861, 0x892a, 0x8932, 0x8925, 0x892b,
+  0x8921, 0x89aa, 0x89a6, 0x8ae6, 0x8afa, 0x8aeb, 0x8af1, 0x8b00,
+  0x8adc, 0x8ae7, 0x8aee, 0x8afe, 0x8b01, 0x8b02, 0x8af7, 0x8aed,
+  0x8af3, 0x8af6, 0x8afc, 0x8c6b, 0x8c6d, 0x8c93, 0x8cf4, 0x8e44,
+  0x8e31, 0x8e34, 0x8e42, 0x8e39, 0x8e35, 0x8f3b, 0x8f2f, 0x8f38,
+  0x8f33, 0x8fa8, 0x8fa6, 0x9075, 0x9074, 0x9078, 0x9072, 0x907c,
+  0x907a, 0x9134, 0x9192, 0x9320, 0x9336, 0x92f8, 0x9333, 0x932f,
+  0x9322, 0x92fc, 0x932b, 0x9304, 0x931a,
+  /* 0xc0 */
+  0x9310, 0x9326, 0x9321, 0x9315, 0x932e, 0x9319, 0x95bb, 0x96a7,
+  0x96a8, 0x96aa, 0x96d5, 0x970e, 0x9711, 0x9716, 0x970d, 0x9713,
+  0x970f, 0x975b, 0x975c, 0x9766, 0x9798, 0x9830, 0x9838, 0x983b,
+  0x9837, 0x982d, 0x9839, 0x9824, 0x9910, 0x9928, 0x991e, 0x991b,
+  0x9921, 0x991a, 0x99ed, 0x99e2, 0x99f1, 0x9ab8, 0x9abc, 0x9afb,
+  0x9aed, 0x9b28, 0x9b91, 0x9d15, 0x9d23, 0x9d26, 0x9d28, 0x9d12,
+  0x9d1b, 0x9ed8, 0x9ed4, 0x9f8d, 0x9f9c, 0x512a, 0x511f, 0x5121,
+  0x5132, 0x52f5, 0x568e, 0x5680, 0x5690, 0x5685, 0x5687, 0x568f,
+  0x58d5, 0x58d3, 0x58d1, 0x58ce, 0x5b30, 0x5b2a, 0x5b24, 0x5b7a,
+  0x5c37, 0x5c68, 0x5dbc, 0x5dba, 0x5dbd, 0x5db8, 0x5e6b, 0x5f4c,
+  0x5fbd, 0x61c9, 0x61c2, 0x61c7, 0x61e6, 0x61cb, 0x6232, 0x6234,
+  0x64ce, 0x64ca, 0x64d8, 0x64e0, 0x64f0, 0x64e6, 0x64ec, 0x64f1,
+  0x64e2, 0x64ed, 0x6582, 0x6583, 0x66d9, 0x66d6, 0x6a80, 0x6a94,
+  0x6a84, 0x6aa2, 0x6a9c, 0x6adb, 0x6aa3, 0x6a7e, 0x6a97, 0x6a90,
+  0x6aa0, 0x6b5c, 0x6bae, 0x6bda, 0x6c08, 0x6fd8, 0x6ff1, 0x6fdf,
+  0x6fe0, 0x6fdb, 0x6fe4, 0x6feb, 0x6fef, 0x6f80, 0x6fec, 0x6fe1,
+  0x6fe9, 0x6fd5, 0x6fee, 0x6ff0, 0x71e7, 0x71df, 0x71ee, 0x71e6,
+  0x71e5, 0x71ed, 0x71ec, 0x71f4, 0x71e0, 0x7235, 0x7246, 0x7370,
+  0x7372, 0x74a9, 0x74b0, 0x74a6, 0x74a8, 0x7646, 0x7642, 0x764c,
+  0x76ea, 0x77b3, 0x77aa, 0x77b0, 0x77ac,
+  /* 0xc1 */
+  0x77a7, 0x77ad, 0x77ef, 0x78f7, 0x78fa, 0x78f4, 0x78ef, 0x7901,
+  0x79a7, 0x79aa, 0x7a57, 0x7abf, 0x7c07, 0x7c0d, 0x7bfe, 0x7bf7,
+  0x7c0c, 0x7be0, 0x7ce0, 0x7cdc, 0x7cde, 0x7ce2, 0x7cdf, 0x7cd9,
+  0x7cdd, 0x7e2e, 0x7e3e, 0x7e46, 0x7e37, 0x7e32, 0x7e43, 0x7e2b,
+  0x7e3d, 0x7e31, 0x7e45, 0x7e41, 0x7e34, 0x7e39, 0x7e48, 0x7e35,
+  0x7e3f, 0x7e2f, 0x7f44, 0x7ff3, 0x7ffc, 0x8071, 0x8072, 0x8070,
+  0x806f, 0x8073, 0x81c6, 0x81c3, 0x81ba, 0x81c2, 0x81c0, 0x81bf,
+  0x81bd, 0x81c9, 0x81be, 0x81e8, 0x8209, 0x8271, 0x85aa, 0x8584,
+  0x857e, 0x859c, 0x8591, 0x8594, 0x85af, 0x859b, 0x8587, 0x85a8,
+  0x858a, 0x8667, 0x87c0, 0x87d1, 0x87b3, 0x87d2, 0x87c6, 0x87ab,
+  0x87bb, 0x87ba, 0x87c8, 0x87cb, 0x893b, 0x8936, 0x8944, 0x8938,
+  0x893d, 0x89ac, 0x8b0e, 0x8b17, 0x8b19, 0x8b1b, 0x8b0a, 0x8b20,
+  0x8b1d, 0x8b04, 0x8b10, 0x8c41, 0x8c3f, 0x8c73, 0x8cfa, 0x8cfd,
+  0x8cfc, 0x8cf8, 0x8cfb, 0x8da8, 0x8e49, 0x8e4b, 0x8e48, 0x8e4a,
+  0x8f44, 0x8f3e, 0x8f42, 0x8f45, 0x8f3f, 0x907f, 0x907d, 0x9084,
+  0x9081, 0x9082, 0x9080, 0x9139, 0x91a3, 0x919e, 0x919c, 0x934d,
+  0x9382, 0x9328, 0x9375, 0x934a, 0x9365, 0x934b, 0x9318, 0x937e,
+  0x936c, 0x935b, 0x9370, 0x935a, 0x9354, 0x95ca, 0x95cb, 0x95cc,
+  0x95c8, 0x95c6, 0x96b1, 0x96b8, 0x96d6, 0x971c, 0x971e, 0x97a0,
+  0x97d3, 0x9846, 0x98b6, 0x9935, 0x9a01,
+  /* 0xc2 */
+  0x99ff, 0x9bae, 0x9bab, 0x9baa, 0x9bad, 0x9d3b, 0x9d3f, 0x9e8b,
+  0x9ecf, 0x9ede, 0x9edc, 0x9edd, 0x9edb, 0x9f3e, 0x9f4b, 0x53e2,
+  0x5695, 0x56ae, 0x58d9, 0x58d8, 0x5b38, 0x5f5d, 0x61e3, 0x6233,
+  0x64f4, 0x64f2, 0x64fe, 0x6506, 0x64fa, 0x64fb, 0x64f7, 0x65b7,
+  0x66dc, 0x6726, 0x6ab3, 0x6aac, 0x6ac3, 0x6abb, 0x6ab8, 0x6ac2,
+  0x6aae, 0x6aaf, 0x6b5f, 0x6b78, 0x6baf, 0x7009, 0x700b, 0x6ffe,
+  0x7006, 0x6ffa, 0x7011, 0x700f, 0x71fb, 0x71fc, 0x71fe, 0x71f8,
+  0x7377, 0x7375, 0x74a7, 0x74bf, 0x7515, 0x7656, 0x7658, 0x7652,
+  0x77bd, 0x77bf, 0x77bb, 0x77bc, 0x790e, 0x79ae, 0x7a61, 0x7a62,
+  0x7a60, 0x7ac4, 0x7ac5, 0x7c2b, 0x7c27, 0x7c2a, 0x7c1e, 0x7c23,
+  0x7c21, 0x7ce7, 0x7e54, 0x7e55, 0x7e5e, 0x7e5a, 0x7e61, 0x7e52,
+  0x7e59, 0x7f48, 0x7ff9, 0x7ffb, 0x8077, 0x8076, 0x81cd, 0x81cf,
+  0x820a, 0x85cf, 0x85a9, 0x85cd, 0x85d0, 0x85c9, 0x85b0, 0x85ba,
+  0x85b9, 0x85a6, 0x87ef, 0x87ec, 0x87f2, 0x87e0, 0x8986, 0x89b2,
+  0x89f4, 0x8b28, 0x8b39, 0x8b2c, 0x8b2b, 0x8c50, 0x8d05, 0x8e59,
+  0x8e63, 0x8e66, 0x8e64, 0x8e5f, 0x8e55, 0x8ec0, 0x8f49, 0x8f4d,
+  0x9087, 0x9083, 0x9088, 0x91ab, 0x91ac, 0x91d0, 0x9394, 0x938a,
+  0x9396, 0x93a2, 0x93b3, 0x93ae, 0x93ac, 0x93b0, 0x9398, 0x939a,
+  0x9397, 0x95d4, 0x95d6, 0x95d0, 0x95d5, 0x96e2, 0x96dc, 0x96d9,
+  0x96db, 0x96de, 0x9724, 0x97a3, 0x97a6,
+  /* 0xc3 */
+  0x97ad, 0x97f9, 0x984d, 0x984f, 0x984c, 0x984e, 0x9853, 0x98ba,
+  0x993e, 0x993f, 0x993d, 0x992e, 0x99a5, 0x9a0e, 0x9ac1, 0x9b03,
+  0x9b06, 0x9b4f, 0x9b4e, 0x9b4d, 0x9bca, 0x9bc9, 0x9bfd, 0x9bc8,
+  0x9bc0, 0x9d51, 0x9d5d, 0x9d60, 0x9ee0, 0x9f15, 0x9f2c, 0x5133,
+  0x56a5, 0x58de, 0x58df, 0x58e2, 0x5bf5, 0x9f90, 0x5eec, 0x61f2,
+  0x61f7, 0x61f6, 0x61f5, 0x6500, 0x650f, 0x66e0, 0x66dd, 0x6ae5,
+  0x6add, 0x6ada, 0x6ad3, 0x701b, 0x701f, 0x7028, 0x701a, 0x701d,
+  0x7015, 0x7018, 0x7206, 0x720d, 0x7258, 0x72a2, 0x7378, 0x737a,
+  0x74bd, 0x74ca, 0x74e3, 0x7587, 0x7586, 0x765f, 0x7661, 0x77c7,
+  0x7919, 0x79b1, 0x7a6b, 0x7a69, 0x7c3e, 0x7c3f, 0x7c38, 0x7c3d,
+  0x7c37, 0x7c40, 0x7e6b, 0x7e6d, 0x7e79, 0x7e69, 0x7e6a, 0x7f85,
+  0x7e73, 0x7fb6, 0x7fb9, 0x7fb8, 0x81d8, 0x85e9, 0x85dd, 0x85ea,
+  0x85d5, 0x85e4, 0x85e5, 0x85f7, 0x87fb, 0x8805, 0x880d, 0x87f9,
+  0x87fe, 0x8960, 0x895f, 0x8956, 0x895e, 0x8b41, 0x8b5c, 0x8b58,
+  0x8b49, 0x8b5a, 0x8b4e, 0x8b4f, 0x8b46, 0x8b59, 0x8d08, 0x8d0a,
+  0x8e7c, 0x8e72, 0x8e87, 0x8e76, 0x8e6c, 0x8e7a, 0x8e74, 0x8f54,
+  0x8f4e, 0x8fad, 0x908a, 0x908b, 0x91b1, 0x91ae, 0x93e1, 0x93d1,
+  0x93df, 0x93c3, 0x93c8, 0x93dc, 0x93dd, 0x93d6, 0x93e2, 0x93cd,
+  0x93d8, 0x93e4, 0x93d7, 0x93e8, 0x95dc, 0x96b4, 0x96e3, 0x972a,
+  0x9727, 0x9761, 0x97dc, 0x97fb, 0x985e,
+  /* 0xc4 */
+  0x9858, 0x985b, 0x98bc, 0x9945, 0x9949, 0x9a16, 0x9a19, 0x9b0d,
+  0x9be8, 0x9be7, 0x9bd6, 0x9bdb, 0x9d89, 0x9d61, 0x9d72, 0x9d6a,
+  0x9d6c, 0x9e92, 0x9e97, 0x9e93, 0x9eb4, 0x52f8, 0x56a8, 0x56b7,
+  0x56b6, 0x56b4, 0x56bc, 0x58e4, 0x5b40, 0x5b43, 0x5b7d, 0x5bf6,
+  0x5dc9, 0x61f8, 0x61fa, 0x6518, 0x6514, 0x6519, 0x66e6, 0x6727,
+  0x6aec, 0x703e, 0x7030, 0x7032, 0x7210, 0x737b, 0x74cf, 0x7662,
+  0x7665, 0x7926, 0x792a, 0x792c, 0x792b, 0x7ac7, 0x7af6, 0x7c4c,
+  0x7c43, 0x7c4d, 0x7cef, 0x7cf0, 0x8fae, 0x7e7d, 0x7e7c, 0x7e82,
+  0x7f4c, 0x8000, 0x81da, 0x8266, 0x85fb, 0x85f9, 0x8611, 0x85fa,
+  0x8606, 0x860b, 0x8607, 0x860a, 0x8814, 0x8815, 0x8964, 0x89ba,
+  0x89f8, 0x8b70, 0x8b6c, 0x8b66, 0x8b6f, 0x8b5f, 0x8b6b, 0x8d0f,
+  0x8d0d, 0x8e89, 0x8e81, 0x8e85, 0x8e82, 0x91b4, 0x91cb, 0x9418,
+  0x9403, 0x93fd, 0x95e1, 0x9730, 0x98c4, 0x9952, 0x9951, 0x99a8,
+  0x9a2b, 0x9a30, 0x9a37, 0x9a35, 0x9c13, 0x9c0d, 0x9e79, 0x9eb5,
+  0x9ee8, 0x9f2f, 0x9f5f, 0x9f63, 0x9f61, 0x5137, 0x5138, 0x56c1,
+  0x56c0, 0x56c2, 0x5914, 0x5c6c, 0x5dcd, 0x61fc, 0x61fe, 0x651d,
+  0x651c, 0x6595, 0x66e9, 0x6afb, 0x6b04, 0x6afa, 0x6bb2, 0x704c,
+  0x721b, 0x72a7, 0x74d6, 0x74d4, 0x7669, 0x77d3, 0x7c50, 0x7e8f,
+  0x7e8c, 0x7fbc, 0x8617, 0x862d, 0x861a, 0x8823, 0x8822, 0x8821,
+  0x881f, 0x896a, 0x896c, 0x89bd, 0x8b74,
+  /* 0xc5 */
+  0x8b77, 0x8b7d, 0x8d13, 0x8e8a, 0x8e8d, 0x8e8b, 0x8f5f, 0x8faf,
+  0x91ba, 0x942e, 0x9433, 0x9435, 0x943a, 0x9438, 0x9432, 0x942b,
+  0x95e2, 0x9738, 0x9739, 0x9732, 0x97ff, 0x9867, 0x9865, 0x9957,
+  0x9a45, 0x9a43, 0x9a40, 0x9a3e, 0x9acf, 0x9b54, 0x9b51, 0x9c2d,
+  0x9c25, 0x9daf, 0x9db4, 0x9dc2, 0x9db8, 0x9e9d, 0x9eef, 0x9f19,
+  0x9f5c, 0x9f66, 0x9f67, 0x513c, 0x513b, 0x56c8, 0x56ca, 0x56c9,
+  0x5b7f, 0x5dd4, 0x5dd2, 0x5f4e, 0x61ff, 0x6524, 0x6b0a, 0x6b61,
+  0x7051, 0x7058, 0x7380, 0x74e4, 0x758a, 0x766e, 0x766c, 0x79b3,
+  0x7c60, 0x7c5f, 0x807e, 0x807d, 0x81df, 0x8972, 0x896f, 0x89fc,
+  0x8b80, 0x8d16, 0x8d17, 0x8e91, 0x8e93, 0x8f61, 0x9148, 0x9444,
+  0x9451, 0x9452, 0x973d, 0x973e, 0x97c3, 0x97c1, 0x986b, 0x9955,
+  0x9a55, 0x9a4d, 0x9ad2, 0x9b1a, 0x9c49, 0x9c31, 0x9c3e, 0x9c3b,
+  0x9dd3, 0x9dd7, 0x9f34, 0x9f6c, 0x9f6a, 0x9f94, 0x56cc, 0x5dd6,
+  0x6200, 0x6523, 0x652b, 0x652a, 0x66ec, 0x6b10, 0x74da, 0x7aca,
+  0x7c64, 0x7c63, 0x7c65, 0x7e93, 0x7e96, 0x7e94, 0x81e2, 0x8638,
+  0x863f, 0x8831, 0x8b8a, 0x9090, 0x908f, 0x9463, 0x9460, 0x9464,
+  0x9768, 0x986f, 0x995c, 0x9a5a, 0x9a5b, 0x9a57, 0x9ad3, 0x9ad4,
+  0x9ad1, 0x9c54, 0x9c57, 0x9c56, 0x9de5, 0x9e9f, 0x9ef4, 0x56d1,
+  0x58e9, 0x652c, 0x705e, 0x7671, 0x7672, 0x77d7, 0x7f50, 0x7f88,
+  0x8836, 0x8839, 0x8862, 0x8b93, 0x8b92,
+  /* 0xc6 */
+  0x8b96, 0x8277, 0x8d1b, 0x91c0, 0x946a, 0x9742, 0x9748, 0x9744,
+  0x97c6, 0x9870, 0x9a5f, 0x9b22, 0x9b58, 0x9c5f, 0x9df9, 0x9dfa,
+  0x9e7c, 0x9e7d, 0x9f07, 0x9f77, 0x9f72, 0x5ef3, 0x6b16, 0x7063,
+  0x7c6c, 0x7c6e, 0x883b, 0x89c0, 0x8ea1, 0x91c1, 0x9472, 0x9470,
+  0x9871, 0x995e, 0x9ad6, 0x9b23, 0x9ecc, 0x7064, 0x77da, 0x8b9a,
+  0x9477, 0x97c9, 0x9a62, 0x9a65, 0x7e9c, 0x8b9c, 0x8eaa, 0x91c5,
+  0x947d, 0x947e, 0x947c, 0x9c77, 0x9c78, 0x9ef7, 0x8c54, 0x947f,
+  0x9e1a, 0x7228, 0x9a6a, 0x9b31, 0x9e1b, 0x9e1e, 0x7c72, 0x30fe,
+  0x309d, 0x309e, 0x3005, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045,
+  0x3046, 0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d,
+  0x304e, 0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055,
+  0x3056, 0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d,
+  0x305e, 0x305f, 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065,
+  0x3066, 0x3067, 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d,
+  0x306e, 0x306f, 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075,
+  0x3076, 0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d,
+  0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085,
+  0x3086, 0x3087, 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d,
+  0x308e, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093, 0x30a1, 0x30a2,
+  0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7,
+  /* 0xc7 */
+  0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af,
+  0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7,
+  0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf,
+  0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7,
+  0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf,
+  0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7,
+  0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df,
+  0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7,
+  0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef,
+  0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x0414,
+  0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b,
+  0x041c, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429,
+  0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0x0430, 0x0431,
+  0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 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, 0x2460,
+  0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468,
+  0x2469, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a,
+  0x247b, 0x247c, 0x247d,
+};
+static const unsigned short big5_2uni_pagec9[7652] = {
+  /* 0xc9 */
+  0x4e42, 0x4e5c, 0x51f5, 0x531a, 0x5382, 0x4e07, 0x4e0c, 0x4e47,
+  0x4e8d, 0x56d7, 0xfa0c, 0x5c6e, 0x5f73, 0x4e0f, 0x5187, 0x4e0e,
+  0x4e2e, 0x4e93, 0x4ec2, 0x4ec9, 0x4ec8, 0x5198, 0x52fc, 0x536c,
+  0x53b9, 0x5720, 0x5903, 0x592c, 0x5c10, 0x5dff, 0x65e1, 0x6bb3,
+  0x6bcc, 0x6c14, 0x723f, 0x4e31, 0x4e3c, 0x4ee8, 0x4edc, 0x4ee9,
+  0x4ee1, 0x4edd, 0x4eda, 0x520c, 0x531c, 0x534c, 0x5722, 0x5723,
+  0x5917, 0x592f, 0x5b81, 0x5b84, 0x5c12, 0x5c3b, 0x5c74, 0x5c73,
+  0x5e04, 0x5e80, 0x5e82, 0x5fc9, 0x6209, 0x6250, 0x6c15, 0x6c36,
+  0x6c43, 0x6c3f, 0x6c3b, 0x72ae, 0x72b0, 0x738a, 0x79b8, 0x808a,
+  0x961e, 0x4f0e, 0x4f18, 0x4f2c, 0x4ef5, 0x4f14, 0x4ef1, 0x4f00,
+  0x4ef7, 0x4f08, 0x4f1d, 0x4f02, 0x4f05, 0x4f22, 0x4f13, 0x4f04,
+  0x4ef4, 0x4f12, 0x51b1, 0x5213, 0x5209, 0x5210, 0x52a6, 0x5322,
+  0x531f, 0x534d, 0x538a, 0x5407, 0x56e1, 0x56df, 0x572e, 0x572a,
+  0x5734, 0x593c, 0x5980, 0x597c, 0x5985, 0x597b, 0x597e, 0x5977,
+  0x597f, 0x5b56, 0x5c15, 0x5c25, 0x5c7c, 0x5c7a, 0x5c7b, 0x5c7e,
+  0x5ddf, 0x5e75, 0x5e84, 0x5f02, 0x5f1a, 0x5f74, 0x5fd5, 0x5fd4,
+  0x5fcf, 0x625c, 0x625e, 0x6264, 0x6261, 0x6266, 0x6262, 0x6259,
+  0x6260, 0x625a, 0x6265, 0x65ef, 0x65ee, 0x673e, 0x6739, 0x6738,
+  0x673b, 0x673a, 0x673f, 0x673c, 0x6733, 0x6c18, 0x6c46, 0x6c52,
+  0x6c5c, 0x6c4f, 0x6c4a, 0x6c54, 0x6c4b,
+  /* 0xca */
+  0x6c4c, 0x7071, 0x725e, 0x72b4, 0x72b5, 0x738e, 0x752a, 0x767f,
+  0x7a75, 0x7f51, 0x8278, 0x827c, 0x8280, 0x827d, 0x827f, 0x864d,
+  0x897e, 0x9099, 0x9097, 0x9098, 0x909b, 0x9094, 0x9622, 0x9624,
+  0x9620, 0x9623, 0x4f56, 0x4f3b, 0x4f62, 0x4f49, 0x4f53, 0x4f64,
+  0x4f3e, 0x4f67, 0x4f52, 0x4f5f, 0x4f41, 0x4f58, 0x4f2d, 0x4f33,
+  0x4f3f, 0x4f61, 0x518f, 0x51b9, 0x521c, 0x521e, 0x5221, 0x52ad,
+  0x52ae, 0x5309, 0x5363, 0x5372, 0x538e, 0x538f, 0x5430, 0x5437,
+  0x542a, 0x5454, 0x5445, 0x5419, 0x541c, 0x5425, 0x5418, 0x543d,
+  0x544f, 0x5441, 0x5428, 0x5424, 0x5447, 0x56ee, 0x56e7, 0x56e5,
+  0x5741, 0x5745, 0x574c, 0x5749, 0x574b, 0x5752, 0x5906, 0x5940,
+  0x59a6, 0x5998, 0x59a0, 0x5997, 0x598e, 0x59a2, 0x5990, 0x598f,
+  0x59a7, 0x59a1, 0x5b8e, 0x5b92, 0x5c28, 0x5c2a, 0x5c8d, 0x5c8f,
+  0x5c88, 0x5c8b, 0x5c89, 0x5c92, 0x5c8a, 0x5c86, 0x5c93, 0x5c95,
+  0x5de0, 0x5e0a, 0x5e0e, 0x5e8b, 0x5e89, 0x5e8c, 0x5e88, 0x5e8d,
+  0x5f05, 0x5f1d, 0x5f78, 0x5f76, 0x5fd2, 0x5fd1, 0x5fd0, 0x5fed,
+  0x5fe8, 0x5fee, 0x5ff3, 0x5fe1, 0x5fe4, 0x5fe3, 0x5ffa, 0x5fef,
+  0x5ff7, 0x5ffb, 0x6000, 0x5ff4, 0x623a, 0x6283, 0x628c, 0x628e,
+  0x628f, 0x6294, 0x6287, 0x6271, 0x627b, 0x627a, 0x6270, 0x6281,
+  0x6288, 0x6277, 0x627d, 0x6272, 0x6274, 0x6537, 0x65f0, 0x65f4,
+  0x65f3, 0x65f2, 0x65f5, 0x6745, 0x6747,
+  /* 0xcb */
+  0x6759, 0x6755, 0x674c, 0x6748, 0x675d, 0x674d, 0x675a, 0x674b,
+  0x6bd0, 0x6c19, 0x6c1a, 0x6c78, 0x6c67, 0x6c6b, 0x6c84, 0x6c8b,
+  0x6c8f, 0x6c71, 0x6c6f, 0x6c69, 0x6c9a, 0x6c6d, 0x6c87, 0x6c95,
+  0x6c9c, 0x6c66, 0x6c73, 0x6c65, 0x6c7b, 0x6c8e, 0x7074, 0x707a,
+  0x7263, 0x72bf, 0x72bd, 0x72c3, 0x72c6, 0x72c1, 0x72ba, 0x72c5,
+  0x7395, 0x7397, 0x7393, 0x7394, 0x7392, 0x753a, 0x7539, 0x7594,
+  0x7595, 0x7681, 0x793d, 0x8034, 0x8095, 0x8099, 0x8090, 0x8092,
+  0x809c, 0x8290, 0x828f, 0x8285, 0x828e, 0x8291, 0x8293, 0x828a,
+  0x8283, 0x8284, 0x8c78, 0x8fc9, 0x8fbf, 0x909f, 0x90a1, 0x90a5,
+  0x909e, 0x90a7, 0x90a0, 0x9630, 0x9628, 0x962f, 0x962d, 0x4e33,
+  0x4f98, 0x4f7c, 0x4f85, 0x4f7d, 0x4f80, 0x4f87, 0x4f76, 0x4f74,
+  0x4f89, 0x4f84, 0x4f77, 0x4f4c, 0x4f97, 0x4f6a, 0x4f9a, 0x4f79,
+  0x4f81, 0x4f78, 0x4f90, 0x4f9c, 0x4f94, 0x4f9e, 0x4f92, 0x4f82,
+  0x4f95, 0x4f6b, 0x4f6e, 0x519e, 0x51bc, 0x51be, 0x5235, 0x5232,
+  0x5233, 0x5246, 0x5231, 0x52bc, 0x530a, 0x530b, 0x533c, 0x5392,
+  0x5394, 0x5487, 0x547f, 0x5481, 0x5491, 0x5482, 0x5488, 0x546b,
+  0x547a, 0x547e, 0x5465, 0x546c, 0x5474, 0x5466, 0x548d, 0x546f,
+  0x5461, 0x5460, 0x5498, 0x5463, 0x5467, 0x5464, 0x56f7, 0x56f9,
+  0x576f, 0x5772, 0x576d, 0x576b, 0x5771, 0x5770, 0x5776, 0x5780,
+  0x5775, 0x577b, 0x5773, 0x5774, 0x5762,
+  /* 0xcc */
+  0x5768, 0x577d, 0x590c, 0x5945, 0x59b5, 0x59ba, 0x59cf, 0x59ce,
+  0x59b2, 0x59cc, 0x59c1, 0x59b6, 0x59bc, 0x59c3, 0x59d6, 0x59b1,
+  0x59bd, 0x59c0, 0x59c8, 0x59b4, 0x59c7, 0x5b62, 0x5b65, 0x5b93,
+  0x5b95, 0x5c44, 0x5c47, 0x5cae, 0x5ca4, 0x5ca0, 0x5cb5, 0x5caf,
+  0x5ca8, 0x5cac, 0x5c9f, 0x5ca3, 0x5cad, 0x5ca2, 0x5caa, 0x5ca7,
+  0x5c9d, 0x5ca5, 0x5cb6, 0x5cb0, 0x5ca6, 0x5e17, 0x5e14, 0x5e19,
+  0x5f28, 0x5f22, 0x5f23, 0x5f24, 0x5f54, 0x5f82, 0x5f7e, 0x5f7d,
+  0x5fde, 0x5fe5, 0x602d, 0x6026, 0x6019, 0x6032, 0x600b, 0x6034,
+  0x600a, 0x6017, 0x6033, 0x601a, 0x601e, 0x602c, 0x6022, 0x600d,
+  0x6010, 0x602e, 0x6013, 0x6011, 0x600c, 0x6009, 0x601c, 0x6214,
+  0x623d, 0x62ad, 0x62b4, 0x62d1, 0x62be, 0x62aa, 0x62b6, 0x62ca,
+  0x62ae, 0x62b3, 0x62af, 0x62bb, 0x62a9, 0x62b0, 0x62b8, 0x653d,
+  0x65a8, 0x65bb, 0x6609, 0x65fc, 0x6604, 0x6612, 0x6608, 0x65fb,
+  0x6603, 0x660b, 0x660d, 0x6605, 0x65fd, 0x6611, 0x6610, 0x66f6,
+  0x670a, 0x6785, 0x676c, 0x678e, 0x6792, 0x6776, 0x677b, 0x6798,
+  0x6786, 0x6784, 0x6774, 0x678d, 0x678c, 0x677a, 0x679f, 0x6791,
+  0x6799, 0x6783, 0x677d, 0x6781, 0x6778, 0x6779, 0x6794, 0x6b25,
+  0x6b80, 0x6b7e, 0x6bde, 0x6c1d, 0x6c93, 0x6cec, 0x6ceb, 0x6cee,
+  0x6cd9, 0x6cb6, 0x6cd4, 0x6cad, 0x6ce7, 0x6cb7, 0x6cd0, 0x6cc2,
+  0x6cba, 0x6cc3, 0x6cc6, 0x6ced, 0x6cf2,
+  /* 0xcd */
+  0x6cd2, 0x6cdd, 0x6cb4, 0x6c8a, 0x6c9d, 0x6c80, 0x6cde, 0x6cc0,
+  0x6d30, 0x6ccd, 0x6cc7, 0x6cb0, 0x6cf9, 0x6ccf, 0x6ce9, 0x6cd1,
+  0x7094, 0x7098, 0x7085, 0x7093, 0x7086, 0x7084, 0x7091, 0x7096,
+  0x7082, 0x709a, 0x7083, 0x726a, 0x72d6, 0x72cb, 0x72d8, 0x72c9,
+  0x72dc, 0x72d2, 0x72d4, 0x72da, 0x72cc, 0x72d1, 0x73a4, 0x73a1,
+  0x73ad, 0x73a6, 0x73a2, 0x73a0, 0x73ac, 0x739d, 0x74dd, 0x74e8,
+  0x753f, 0x7540, 0x753e, 0x758c, 0x7598, 0x76af, 0x76f3, 0x76f1,
+  0x76f0, 0x76f5, 0x77f8, 0x77fc, 0x77f9, 0x77fb, 0x77fa, 0x77f7,
+  0x7942, 0x793f, 0x79c5, 0x7a78, 0x7a7b, 0x7afb, 0x7c75, 0x7cfd,
+  0x8035, 0x808f, 0x80ae, 0x80a3, 0x80b8, 0x80b5, 0x80ad, 0x8220,
+  0x82a0, 0x82c0, 0x82ab, 0x829a, 0x8298, 0x829b, 0x82b5, 0x82a7,
+  0x82ae, 0x82bc, 0x829e, 0x82ba, 0x82b4, 0x82a8, 0x82a1, 0x82a9,
+  0x82c2, 0x82a4, 0x82c3, 0x82b6, 0x82a2, 0x8670, 0x866f, 0x866d,
+  0x866e, 0x8c56, 0x8fd2, 0x8fcb, 0x8fd3, 0x8fcd, 0x8fd6, 0x8fd5,
+  0x8fd7, 0x90b2, 0x90b4, 0x90af, 0x90b3, 0x90b0, 0x9639, 0x963d,
+  0x963c, 0x963a, 0x9643, 0x4fcd, 0x4fc5, 0x4fd3, 0x4fb2, 0x4fc9,
+  0x4fcb, 0x4fc1, 0x4fd4, 0x4fdc, 0x4fd9, 0x4fbb, 0x4fb3, 0x4fdb,
+  0x4fc7, 0x4fd6, 0x4fba, 0x4fc0, 0x4fb9, 0x4fec, 0x5244, 0x5249,
+  0x52c0, 0x52c2, 0x533d, 0x537c, 0x5397, 0x5396, 0x5399, 0x5398,
+  0x54ba, 0x54a1, 0x54ad, 0x54a5, 0x54cf,
+  /* 0xce */
+  0x54c3, 0x830d, 0x54b7, 0x54ae, 0x54d6, 0x54b6, 0x54c5, 0x54c6,
+  0x54a0, 0x5470, 0x54bc, 0x54a2, 0x54be, 0x5472, 0x54de, 0x54b0,
+  0x57b5, 0x579e, 0x579f, 0x57a4, 0x578c, 0x5797, 0x579d, 0x579b,
+  0x5794, 0x5798, 0x578f, 0x5799, 0x57a5, 0x579a, 0x5795, 0x58f4,
+  0x590d, 0x5953, 0x59e1, 0x59de, 0x59ee, 0x5a00, 0x59f1, 0x59dd,
+  0x59fa, 0x59fd, 0x59fc, 0x59f6, 0x59e4, 0x59f2, 0x59f7, 0x59db,
+  0x59e9, 0x59f3, 0x59f5, 0x59e0, 0x59fe, 0x59f4, 0x59ed, 0x5ba8,
+  0x5c4c, 0x5cd0, 0x5cd8, 0x5ccc, 0x5cd7, 0x5ccb, 0x5cdb, 0x5cde,
+  0x5cda, 0x5cc9, 0x5cc7, 0x5cca, 0x5cd6, 0x5cd3, 0x5cd4, 0x5ccf,
+  0x5cc8, 0x5cc6, 0x5cce, 0x5cdf, 0x5cf8, 0x5df9, 0x5e21, 0x5e22,
+  0x5e23, 0x5e20, 0x5e24, 0x5eb0, 0x5ea4, 0x5ea2, 0x5e9b, 0x5ea3,
+  0x5ea5, 0x5f07, 0x5f2e, 0x5f56, 0x5f86, 0x6037, 0x6039, 0x6054,
+  0x6072, 0x605e, 0x6045, 0x6053, 0x6047, 0x6049, 0x605b, 0x604c,
+  0x6040, 0x6042, 0x605f, 0x6024, 0x6044, 0x6058, 0x6066, 0x606e,
+  0x6242, 0x6243, 0x62cf, 0x630d, 0x630b, 0x62f5, 0x630e, 0x6303,
+  0x62eb, 0x62f9, 0x630f, 0x630c, 0x62f8, 0x62f6, 0x6300, 0x6313,
+  0x6314, 0x62fa, 0x6315, 0x62fb, 0x62f0, 0x6541, 0x6543, 0x65aa,
+  0x65bf, 0x6636, 0x6621, 0x6632, 0x6635, 0x661c, 0x6626, 0x6622,
+  0x6633, 0x662b, 0x663a, 0x661d, 0x6634, 0x6639, 0x662e, 0x670f,
+  0x6710, 0x67c1, 0x67f2, 0x67c8, 0x67ba,
+  /* 0xcf */
+  0x67dc, 0x67bb, 0x67f8, 0x67d8, 0x67c0, 0x67b7, 0x67c5, 0x67eb,
+  0x67e4, 0x67df, 0x67b5, 0x67cd, 0x67b3, 0x67f7, 0x67f6, 0x67ee,
+  0x67e3, 0x67c2, 0x67b9, 0x67ce, 0x67e7, 0x67f0, 0x67b2, 0x67fc,
+  0x67c6, 0x67ed, 0x67cc, 0x67ae, 0x67e6, 0x67db, 0x67fa, 0x67c9,
+  0x67ca, 0x67c3, 0x67ea, 0x67cb, 0x6b28, 0x6b82, 0x6b84, 0x6bb6,
+  0x6bd6, 0x6bd8, 0x6be0, 0x6c20, 0x6c21, 0x6d28, 0x6d34, 0x6d2d,
+  0x6d1f, 0x6d3c, 0x6d3f, 0x6d12, 0x6d0a, 0x6cda, 0x6d33, 0x6d04,
+  0x6d19, 0x6d3a, 0x6d1a, 0x6d11, 0x6d00, 0x6d1d, 0x6d42, 0x6d01,
+  0x6d18, 0x6d37, 0x6d03, 0x6d0f, 0x6d40, 0x6d07, 0x6d20, 0x6d2c,
+  0x6d08, 0x6d22, 0x6d09, 0x6d10, 0x70b7, 0x709f, 0x70be, 0x70b1,
+  0x70b0, 0x70a1, 0x70b4, 0x70b5, 0x70a9, 0x7241, 0x7249, 0x724a,
+  0x726c, 0x7270, 0x7273, 0x726e, 0x72ca, 0x72e4, 0x72e8, 0x72eb,
+  0x72df, 0x72ea, 0x72e6, 0x72e3, 0x7385, 0x73cc, 0x73c2, 0x73c8,
+  0x73c5, 0x73b9, 0x73b6, 0x73b5, 0x73b4, 0x73eb, 0x73bf, 0x73c7,
+  0x73be, 0x73c3, 0x73c6, 0x73b8, 0x73cb, 0x74ec, 0x74ee, 0x752e,
+  0x7547, 0x7548, 0x75a7, 0x75aa, 0x7679, 0x76c4, 0x7708, 0x7703,
+  0x7704, 0x7705, 0x770a, 0x76f7, 0x76fb, 0x76fa, 0x77e7, 0x77e8,
+  0x7806, 0x7811, 0x7812, 0x7805, 0x7810, 0x780f, 0x780e, 0x7809,
+  0x7803, 0x7813, 0x794a, 0x794c, 0x794b, 0x7945, 0x7944, 0x79d5,
+  0x79cd, 0x79cf, 0x79d6, 0x79ce, 0x7a80,
+  /* 0xd0 */
+  0x7a7e, 0x7ad1, 0x7b00, 0x7b01, 0x7c7a, 0x7c78, 0x7c79, 0x7c7f,
+  0x7c80, 0x7c81, 0x7d03, 0x7d08, 0x7d01, 0x7f58, 0x7f91, 0x7f8d,
+  0x7fbe, 0x8007, 0x800e, 0x800f, 0x8014, 0x8037, 0x80d8, 0x80c7,
+  0x80e0, 0x80d1, 0x80c8, 0x80c2, 0x80d0, 0x80c5, 0x80e3, 0x80d9,
+  0x80dc, 0x80ca, 0x80d5, 0x80c9, 0x80cf, 0x80d7, 0x80e6, 0x80cd,
+  0x81ff, 0x8221, 0x8294, 0x82d9, 0x82fe, 0x82f9, 0x8307, 0x82e8,
+  0x8300, 0x82d5, 0x833a, 0x82eb, 0x82d6, 0x82f4, 0x82ec, 0x82e1,
+  0x82f2, 0x82f5, 0x830c, 0x82fb, 0x82f6, 0x82f0, 0x82ea, 0x82e4,
+  0x82e0, 0x82fa, 0x82f3, 0x82ed, 0x8677, 0x8674, 0x867c, 0x8673,
+  0x8841, 0x884e, 0x8867, 0x886a, 0x8869, 0x89d3, 0x8a04, 0x8a07,
+  0x8d72, 0x8fe3, 0x8fe1, 0x8fee, 0x8fe0, 0x90f1, 0x90bd, 0x90bf,
+  0x90d5, 0x90c5, 0x90be, 0x90c7, 0x90cb, 0x90c8, 0x91d4, 0x91d3,
+  0x9654, 0x964f, 0x9651, 0x9653, 0x964a, 0x964e, 0x501e, 0x5005,
+  0x5007, 0x5013, 0x5022, 0x5030, 0x501b, 0x4ff5, 0x4ff4, 0x5033,
+  0x5037, 0x502c, 0x4ff6, 0x4ff7, 0x5017, 0x501c, 0x5020, 0x5027,
+  0x5035, 0x502f, 0x5031, 0x500e, 0x515a, 0x5194, 0x5193, 0x51ca,
+  0x51c4, 0x51c5, 0x51c8, 0x51ce, 0x5261, 0x525a, 0x5252, 0x525e,
+  0x525f, 0x5255, 0x5262, 0x52cd, 0x530e, 0x539e, 0x5526, 0x54e2,
+  0x5517, 0x5512, 0x54e7, 0x54f3, 0x54e4, 0x551a, 0x54ff, 0x5504,
+  0x5508, 0x54eb, 0x5511, 0x5505, 0x54f1,
+  /* 0xd1 */
+  0x550a, 0x54fb, 0x54f7, 0x54f8, 0x54e0, 0x550e, 0x5503, 0x550b,
+  0x5701, 0x5702, 0x57cc, 0x5832, 0x57d5, 0x57d2, 0x57ba, 0x57c6,
+  0x57bd, 0x57bc, 0x57b8, 0x57b6, 0x57bf, 0x57c7, 0x57d0, 0x57b9,
+  0x57c1, 0x590e, 0x594a, 0x5a19, 0x5a16, 0x5a2d, 0x5a2e, 0x5a15,
+  0x5a0f, 0x5a17, 0x5a0a, 0x5a1e, 0x5a33, 0x5b6c, 0x5ba7, 0x5bad,
+  0x5bac, 0x5c03, 0x5c56, 0x5c54, 0x5cec, 0x5cff, 0x5cee, 0x5cf1,
+  0x5cf7, 0x5d00, 0x5cf9, 0x5e29, 0x5e28, 0x5ea8, 0x5eae, 0x5eaa,
+  0x5eac, 0x5f33, 0x5f30, 0x5f67, 0x605d, 0x605a, 0x6067, 0x6041,
+  0x60a2, 0x6088, 0x6080, 0x6092, 0x6081, 0x609d, 0x6083, 0x6095,
+  0x609b, 0x6097, 0x6087, 0x609c, 0x608e, 0x6219, 0x6246, 0x62f2,
+  0x6310, 0x6356, 0x632c, 0x6344, 0x6345, 0x6336, 0x6343, 0x63e4,
+  0x6339, 0x634b, 0x634a, 0x633c, 0x6329, 0x6341, 0x6334, 0x6358,
+  0x6354, 0x6359, 0x632d, 0x6347, 0x6333, 0x635a, 0x6351, 0x6338,
+  0x6357, 0x6340, 0x6348, 0x654a, 0x6546, 0x65c6, 0x65c3, 0x65c4,
+  0x65c2, 0x664a, 0x665f, 0x6647, 0x6651, 0x6712, 0x6713, 0x681f,
+  0x681a, 0x6849, 0x6832, 0x6833, 0x683b, 0x684b, 0x684f, 0x6816,
+  0x6831, 0x681c, 0x6835, 0x682b, 0x682d, 0x682f, 0x684e, 0x6844,
+  0x6834, 0x681d, 0x6812, 0x6814, 0x6826, 0x6828, 0x682e, 0x684d,
+  0x683a, 0x6825, 0x6820, 0x6b2c, 0x6b2f, 0x6b2d, 0x6b31, 0x6b34,
+  0x6b6d, 0x8082, 0x6b88, 0x6be6, 0x6be4,
+  /* 0xd2 */
+  0x6be8, 0x6be3, 0x6be2, 0x6be7, 0x6c25, 0x6d7a, 0x6d63, 0x6d64,
+  0x6d76, 0x6d0d, 0x6d61, 0x6d92, 0x6d58, 0x6d62, 0x6d6d, 0x6d6f,
+  0x6d91, 0x6d8d, 0x6def, 0x6d7f, 0x6d86, 0x6d5e, 0x6d67, 0x6d60,
+  0x6d97, 0x6d70, 0x6d7c, 0x6d5f, 0x6d82, 0x6d98, 0x6d2f, 0x6d68,
+  0x6d8b, 0x6d7e, 0x6d80, 0x6d84, 0x6d16, 0x6d83, 0x6d7b, 0x6d7d,
+  0x6d75, 0x6d90, 0x70dc, 0x70d3, 0x70d1, 0x70dd, 0x70cb, 0x7f39,
+  0x70e2, 0x70d7, 0x70d2, 0x70de, 0x70e0, 0x70d4, 0x70cd, 0x70c5,
+  0x70c6, 0x70c7, 0x70da, 0x70ce, 0x70e1, 0x7242, 0x7278, 0x7277,
+  0x7276, 0x7300, 0x72fa, 0x72f4, 0x72fe, 0x72f6, 0x72f3, 0x72fb,
+  0x7301, 0x73d3, 0x73d9, 0x73e5, 0x73d6, 0x73bc, 0x73e7, 0x73e3,
+  0x73e9, 0x73dc, 0x73d2, 0x73db, 0x73d4, 0x73dd, 0x73da, 0x73d7,
+  0x73d8, 0x73e8, 0x74de, 0x74df, 0x74f4, 0x74f5, 0x7521, 0x755b,
+  0x755f, 0x75b0, 0x75c1, 0x75bb, 0x75c4, 0x75c0, 0x75bf, 0x75b6,
+  0x75ba, 0x768a, 0x76c9, 0x771d, 0x771b, 0x7710, 0x7713, 0x7712,
+  0x7723, 0x7711, 0x7715, 0x7719, 0x771a, 0x7722, 0x7727, 0x7823,
+  0x782c, 0x7822, 0x7835, 0x782f, 0x7828, 0x782e, 0x782b, 0x7821,
+  0x7829, 0x7833, 0x782a, 0x7831, 0x7954, 0x795b, 0x794f, 0x795c,
+  0x7953, 0x7952, 0x7951, 0x79eb, 0x79ec, 0x79e0, 0x79ee, 0x79ed,
+  0x79ea, 0x79dc, 0x79de, 0x79dd, 0x7a86, 0x7a89, 0x7a85, 0x7a8b,
+  0x7a8c, 0x7a8a, 0x7a87, 0x7ad8, 0x7b10,
+  /* 0xd3 */
+  0x7b04, 0x7b13, 0x7b05, 0x7b0f, 0x7b08, 0x7b0a, 0x7b0e, 0x7b09,
+  0x7b12, 0x7c84, 0x7c91, 0x7c8a, 0x7c8c, 0x7c88, 0x7c8d, 0x7c85,
+  0x7d1e, 0x7d1d, 0x7d11, 0x7d0e, 0x7d18, 0x7d16, 0x7d13, 0x7d1f,
+  0x7d12, 0x7d0f, 0x7d0c, 0x7f5c, 0x7f61, 0x7f5e, 0x7f60, 0x7f5d,
+  0x7f5b, 0x7f96, 0x7f92, 0x7fc3, 0x7fc2, 0x7fc0, 0x8016, 0x803e,
+  0x8039, 0x80fa, 0x80f2, 0x80f9, 0x80f5, 0x8101, 0x80fb, 0x8100,
+  0x8201, 0x822f, 0x8225, 0x8333, 0x832d, 0x8344, 0x8319, 0x8351,
+  0x8325, 0x8356, 0x833f, 0x8341, 0x8326, 0x831c, 0x8322, 0x8342,
+  0x834e, 0x831b, 0x832a, 0x8308, 0x833c, 0x834d, 0x8316, 0x8324,
+  0x8320, 0x8337, 0x832f, 0x8329, 0x8347, 0x8345, 0x834c, 0x8353,
+  0x831e, 0x832c, 0x834b, 0x8327, 0x8348, 0x8653, 0x8652, 0x86a2,
+  0x86a8, 0x8696, 0x868d, 0x8691, 0x869e, 0x8687, 0x8697, 0x8686,
+  0x868b, 0x869a, 0x8685, 0x86a5, 0x8699, 0x86a1, 0x86a7, 0x8695,
+  0x8698, 0x868e, 0x869d, 0x8690, 0x8694, 0x8843, 0x8844, 0x886d,
+  0x8875, 0x8876, 0x8872, 0x8880, 0x8871, 0x887f, 0x886f, 0x8883,
+  0x887e, 0x8874, 0x887c, 0x8a12, 0x8c47, 0x8c57, 0x8c7b, 0x8ca4,
+  0x8ca3, 0x8d76, 0x8d78, 0x8db5, 0x8db7, 0x8db6, 0x8ed1, 0x8ed3,
+  0x8ffe, 0x8ff5, 0x9002, 0x8fff, 0x8ffb, 0x9004, 0x8ffc, 0x8ff6,
+  0x90d6, 0x90e0, 0x90d9, 0x90da, 0x90e3, 0x90df, 0x90e5, 0x90d8,
+  0x90db, 0x90d7, 0x90dc, 0x90e4, 0x9150,
+  /* 0xd4 */
+  0x914e, 0x914f, 0x91d5, 0x91e2, 0x91da, 0x965c, 0x965f, 0x96bc,
+  0x98e3, 0x9adf, 0x9b2f, 0x4e7f, 0x5070, 0x506a, 0x5061, 0x505e,
+  0x5060, 0x5053, 0x504b, 0x505d, 0x5072, 0x5048, 0x504d, 0x5041,
+  0x505b, 0x504a, 0x5062, 0x5015, 0x5045, 0x505f, 0x5069, 0x506b,
+  0x5063, 0x5064, 0x5046, 0x5040, 0x506e, 0x5073, 0x5057, 0x5051,
+  0x51d0, 0x526b, 0x526d, 0x526c, 0x526e, 0x52d6, 0x52d3, 0x532d,
+  0x539c, 0x5575, 0x5576, 0x553c, 0x554d, 0x5550, 0x5534, 0x552a,
+  0x5551, 0x5562, 0x5536, 0x5535, 0x5530, 0x5552, 0x5545, 0x550c,
+  0x5532, 0x5565, 0x554e, 0x5539, 0x5548, 0x552d, 0x553b, 0x5540,
+  0x554b, 0x570a, 0x5707, 0x57fb, 0x5814, 0x57e2, 0x57f6, 0x57dc,
+  0x57f4, 0x5800, 0x57ed, 0x57fd, 0x5808, 0x57f8, 0x580b, 0x57f3,
+  0x57cf, 0x5807, 0x57ee, 0x57e3, 0x57f2, 0x57e5, 0x57ec, 0x57e1,
+  0x580e, 0x57fc, 0x5810, 0x57e7, 0x5801, 0x580c, 0x57f1, 0x57e9,
+  0x57f0, 0x580d, 0x5804, 0x595c, 0x5a60, 0x5a58, 0x5a55, 0x5a67,
+  0x5a5e, 0x5a38, 0x5a35, 0x5a6d, 0x5a50, 0x5a5f, 0x5a65, 0x5a6c,
+  0x5a53, 0x5a64, 0x5a57, 0x5a43, 0x5a5d, 0x5a52, 0x5a44, 0x5a5b,
+  0x5a48, 0x5a8e, 0x5a3e, 0x5a4d, 0x5a39, 0x5a4c, 0x5a70, 0x5a69,
+  0x5a47, 0x5a51, 0x5a56, 0x5a42, 0x5a5c, 0x5b72, 0x5b6e, 0x5bc1,
+  0x5bc0, 0x5c59, 0x5d1e, 0x5d0b, 0x5d1d, 0x5d1a, 0x5d20, 0x5d0c,
+  0x5d28, 0x5d0d, 0x5d26, 0x5d25, 0x5d0f,
+  /* 0xd5 */
+  0x5d30, 0x5d12, 0x5d23, 0x5d1f, 0x5d2e, 0x5e3e, 0x5e34, 0x5eb1,
+  0x5eb4, 0x5eb9, 0x5eb2, 0x5eb3, 0x5f36, 0x5f38, 0x5f9b, 0x5f96,
+  0x5f9f, 0x608a, 0x6090, 0x6086, 0x60be, 0x60b0, 0x60ba, 0x60d3,
+  0x60d4, 0x60cf, 0x60e4, 0x60d9, 0x60dd, 0x60c8, 0x60b1, 0x60db,
+  0x60b7, 0x60ca, 0x60bf, 0x60c3, 0x60cd, 0x60c0, 0x6332, 0x6365,
+  0x638a, 0x6382, 0x637d, 0x63bd, 0x639e, 0x63ad, 0x639d, 0x6397,
+  0x63ab, 0x638e, 0x636f, 0x6387, 0x6390, 0x636e, 0x63af, 0x6375,
+  0x639c, 0x636d, 0x63ae, 0x637c, 0x63a4, 0x633b, 0x639f, 0x6378,
+  0x6385, 0x6381, 0x6391, 0x638d, 0x6370, 0x6553, 0x65cd, 0x6665,
+  0x6661, 0x665b, 0x6659, 0x665c, 0x6662, 0x6718, 0x6879, 0x6887,
+  0x6890, 0x689c, 0x686d, 0x686e, 0x68ae, 0x68ab, 0x6956, 0x686f,
+  0x68a3, 0x68ac, 0x68a9, 0x6875, 0x6874, 0x68b2, 0x688f, 0x6877,
+  0x6892, 0x687c, 0x686b, 0x6872, 0x68aa, 0x6880, 0x6871, 0x687e,
+  0x689b, 0x6896, 0x688b, 0x68a0, 0x6889, 0x68a4, 0x6878, 0x687b,
+  0x6891, 0x688c, 0x688a, 0x687d, 0x6b36, 0x6b33, 0x6b37, 0x6b38,
+  0x6b91, 0x6b8f, 0x6b8d, 0x6b8e, 0x6b8c, 0x6c2a, 0x6dc0, 0x6dab,
+  0x6db4, 0x6db3, 0x6e74, 0x6dac, 0x6de9, 0x6de2, 0x6db7, 0x6df6,
+  0x6dd4, 0x6e00, 0x6dc8, 0x6de0, 0x6ddf, 0x6dd6, 0x6dbe, 0x6de5,
+  0x6ddc, 0x6ddd, 0x6ddb, 0x6df4, 0x6dca, 0x6dbd, 0x6ded, 0x6df0,
+  0x6dba, 0x6dd5, 0x6dc2, 0x6dcf, 0x6dc9,
+  /* 0xd6 */
+  0x6dd0, 0x6df2, 0x6dd3, 0x6dfd, 0x6dd7, 0x6dcd, 0x6de3, 0x6dbb,
+  0x70fa, 0x710d, 0x70f7, 0x7117, 0x70f4, 0x710c, 0x70f0, 0x7104,
+  0x70f3, 0x7110, 0x70fc, 0x70ff, 0x7106, 0x7113, 0x7100, 0x70f8,
+  0x70f6, 0x710b, 0x7102, 0x710e, 0x727e, 0x727b, 0x727c, 0x727f,
+  0x731d, 0x7317, 0x7307, 0x7311, 0x7318, 0x730a, 0x7308, 0x72ff,
+  0x730f, 0x731e, 0x7388, 0x73f6, 0x73f8, 0x73f5, 0x7404, 0x7401,
+  0x73fd, 0x7407, 0x7400, 0x73fa, 0x73fc, 0x73ff, 0x740c, 0x740b,
+  0x73f4, 0x7408, 0x7564, 0x7563, 0x75ce, 0x75d2, 0x75cf, 0x75cb,
+  0x75cc, 0x75d1, 0x75d0, 0x768f, 0x7689, 0x76d3, 0x7739, 0x772f,
+  0x772d, 0x7731, 0x7732, 0x7734, 0x7733, 0x773d, 0x7725, 0x773b,
+  0x7735, 0x7848, 0x7852, 0x7849, 0x784d, 0x784a, 0x784c, 0x7826,
+  0x7845, 0x7850, 0x7964, 0x7967, 0x7969, 0x796a, 0x7963, 0x796b,
+  0x7961, 0x79bb, 0x79fa, 0x79f8, 0x79f6, 0x79f7, 0x7a8f, 0x7a94,
+  0x7a90, 0x7b35, 0x7b47, 0x7b34, 0x7b25, 0x7b30, 0x7b22, 0x7b24,
+  0x7b33, 0x7b18, 0x7b2a, 0x7b1d, 0x7b31, 0x7b2b, 0x7b2d, 0x7b2f,
+  0x7b32, 0x7b38, 0x7b1a, 0x7b23, 0x7c94, 0x7c98, 0x7c96, 0x7ca3,
+  0x7d35, 0x7d3d, 0x7d38, 0x7d36, 0x7d3a, 0x7d45, 0x7d2c, 0x7d29,
+  0x7d41, 0x7d47, 0x7d3e, 0x7d3f, 0x7d4a, 0x7d3b, 0x7d28, 0x7f63,
+  0x7f95, 0x7f9c, 0x7f9d, 0x7f9b, 0x7fca, 0x7fcb, 0x7fcd, 0x7fd0,
+  0x7fd1, 0x7fc7, 0x7fcf, 0x7fc9, 0x801f,
+  /* 0xd7 */
+  0x801e, 0x801b, 0x8047, 0x8043, 0x8048, 0x8118, 0x8125, 0x8119,
+  0x811b, 0x812d, 0x811f, 0x812c, 0x811e, 0x8121, 0x8115, 0x8127,
+  0x811d, 0x8122, 0x8211, 0x8238, 0x8233, 0x823a, 0x8234, 0x8232,
+  0x8274, 0x8390, 0x83a3, 0x83a8, 0x838d, 0x837a, 0x8373, 0x83a4,
+  0x8374, 0x838f, 0x8381, 0x8395, 0x8399, 0x8375, 0x8394, 0x83a9,
+  0x837d, 0x8383, 0x838c, 0x839d, 0x839b, 0x83aa, 0x838b, 0x837e,
+  0x83a5, 0x83af, 0x8388, 0x8397, 0x83b0, 0x837f, 0x83a6, 0x8387,
+  0x83ae, 0x8376, 0x839a, 0x8659, 0x8656, 0x86bf, 0x86b7, 0x86c2,
+  0x86c1, 0x86c5, 0x86ba, 0x86b0, 0x86c8, 0x86b9, 0x86b3, 0x86b8,
+  0x86cc, 0x86b4, 0x86bb, 0x86bc, 0x86c3, 0x86bd, 0x86be, 0x8852,
+  0x8889, 0x8895, 0x88a8, 0x88a2, 0x88aa, 0x889a, 0x8891, 0x88a1,
+  0x889f, 0x8898, 0x88a7, 0x8899, 0x889b, 0x8897, 0x88a4, 0x88ac,
+  0x888c, 0x8893, 0x888e, 0x8982, 0x89d6, 0x89d9, 0x89d5, 0x8a30,
+  0x8a27, 0x8a2c, 0x8a1e, 0x8c39, 0x8c3b, 0x8c5c, 0x8c5d, 0x8c7d,
+  0x8ca5, 0x8d7d, 0x8d7b, 0x8d79, 0x8dbc, 0x8dc2, 0x8db9, 0x8dbf,
+  0x8dc1, 0x8ed8, 0x8ede, 0x8edd, 0x8edc, 0x8ed7, 0x8ee0, 0x8ee1,
+  0x9024, 0x900b, 0x9011, 0x901c, 0x900c, 0x9021, 0x90ef, 0x90ea,
+  0x90f0, 0x90f4, 0x90f2, 0x90f3, 0x90d4, 0x90eb, 0x90ec, 0x90e9,
+  0x9156, 0x9158, 0x915a, 0x9153, 0x9155, 0x91ec, 0x91f4, 0x91f1,
+  0x91f3, 0x91f8, 0x91e4, 0x91f9, 0x91ea,
+  /* 0xd8 */
+  0x91eb, 0x91f7, 0x91e8, 0x91ee, 0x957a, 0x9586, 0x9588, 0x967c,
+  0x966d, 0x966b, 0x9671, 0x966f, 0x96bf, 0x976a, 0x9804, 0x98e5,
+  0x9997, 0x509b, 0x5095, 0x5094, 0x509e, 0x508b, 0x50a3, 0x5083,
+  0x508c, 0x508e, 0x509d, 0x5068, 0x509c, 0x5092, 0x5082, 0x5087,
+  0x515f, 0x51d4, 0x5312, 0x5311, 0x53a4, 0x53a7, 0x5591, 0x55a8,
+  0x55a5, 0x55ad, 0x5577, 0x5645, 0x55a2, 0x5593, 0x5588, 0x558f,
+  0x55b5, 0x5581, 0x55a3, 0x5592, 0x55a4, 0x557d, 0x558c, 0x55a6,
+  0x557f, 0x5595, 0x55a1, 0x558e, 0x570c, 0x5829, 0x5837, 0x5819,
+  0x581e, 0x5827, 0x5823, 0x5828, 0x57f5, 0x5848, 0x5825, 0x581c,
+  0x581b, 0x5833, 0x583f, 0x5836, 0x582e, 0x5839, 0x5838, 0x582d,
+  0x582c, 0x583b, 0x5961, 0x5aaf, 0x5a94, 0x5a9f, 0x5a7a, 0x5aa2,
+  0x5a9e, 0x5a78, 0x5aa6, 0x5a7c, 0x5aa5, 0x5aac, 0x5a95, 0x5aae,
+  0x5a37, 0x5a84, 0x5a8a, 0x5a97, 0x5a83, 0x5a8b, 0x5aa9, 0x5a7b,
+  0x5a7d, 0x5a8c, 0x5a9c, 0x5a8f, 0x5a93, 0x5a9d, 0x5bea, 0x5bcd,
+  0x5bcb, 0x5bd4, 0x5bd1, 0x5bca, 0x5bce, 0x5c0c, 0x5c30, 0x5d37,
+  0x5d43, 0x5d6b, 0x5d41, 0x5d4b, 0x5d3f, 0x5d35, 0x5d51, 0x5d4e,
+  0x5d55, 0x5d33, 0x5d3a, 0x5d52, 0x5d3d, 0x5d31, 0x5d59, 0x5d42,
+  0x5d39, 0x5d49, 0x5d38, 0x5d3c, 0x5d32, 0x5d36, 0x5d40, 0x5d45,
+  0x5e44, 0x5e41, 0x5f58, 0x5fa6, 0x5fa5, 0x5fab, 0x60c9, 0x60b9,
+  0x60cc, 0x60e2, 0x60ce, 0x60c4, 0x6114,
+  /* 0xd9 */
+  0x60f2, 0x610a, 0x6116, 0x6105, 0x60f5, 0x6113, 0x60f8, 0x60fc,
+  0x60fe, 0x60c1, 0x6103, 0x6118, 0x611d, 0x6110, 0x60ff, 0x6104,
+  0x610b, 0x624a, 0x6394, 0x63b1, 0x63b0, 0x63ce, 0x63e5, 0x63e8,
+  0x63ef, 0x63c3, 0x649d, 0x63f3, 0x63ca, 0x63e0, 0x63f6, 0x63d5,
+  0x63f2, 0x63f5, 0x6461, 0x63df, 0x63be, 0x63dd, 0x63dc, 0x63c4,
+  0x63d8, 0x63d3, 0x63c2, 0x63c7, 0x63cc, 0x63cb, 0x63c8, 0x63f0,
+  0x63d7, 0x63d9, 0x6532, 0x6567, 0x656a, 0x6564, 0x655c, 0x6568,
+  0x6565, 0x658c, 0x659d, 0x659e, 0x65ae, 0x65d0, 0x65d2, 0x667c,
+  0x666c, 0x667b, 0x6680, 0x6671, 0x6679, 0x666a, 0x6672, 0x6701,
+  0x690c, 0x68d3, 0x6904, 0x68dc, 0x692a, 0x68ec, 0x68ea, 0x68f1,
+  0x690f, 0x68d6, 0x68f7, 0x68eb, 0x68e4, 0x68f6, 0x6913, 0x6910,
+  0x68f3, 0x68e1, 0x6907, 0x68cc, 0x6908, 0x6970, 0x68b4, 0x6911,
+  0x68ef, 0x68c6, 0x6914, 0x68f8, 0x68d0, 0x68fd, 0x68fc, 0x68e8,
+  0x690b, 0x690a, 0x6917, 0x68ce, 0x68c8, 0x68dd, 0x68de, 0x68e6,
+  0x68f4, 0x68d1, 0x6906, 0x68d4, 0x68e9, 0x6915, 0x6925, 0x68c7,
+  0x6b39, 0x6b3b, 0x6b3f, 0x6b3c, 0x6b94, 0x6b97, 0x6b99, 0x6b95,
+  0x6bbd, 0x6bf0, 0x6bf2, 0x6bf3, 0x6c30, 0x6dfc, 0x6e46, 0x6e47,
+  0x6e1f, 0x6e49, 0x6e88, 0x6e3c, 0x6e3d, 0x6e45, 0x6e62, 0x6e2b,
+  0x6e3f, 0x6e41, 0x6e5d, 0x6e73, 0x6e1c, 0x6e33, 0x6e4b, 0x6e40,
+  0x6e51, 0x6e3b, 0x6e03, 0x6e2e, 0x6e5e,
+  /* 0xda */
+  0x6e68, 0x6e5c, 0x6e61, 0x6e31, 0x6e28, 0x6e60, 0x6e71, 0x6e6b,
+  0x6e39, 0x6e22, 0x6e30, 0x6e53, 0x6e65, 0x6e27, 0x6e78, 0x6e64,
+  0x6e77, 0x6e55, 0x6e79, 0x6e52, 0x6e66, 0x6e35, 0x6e36, 0x6e5a,
+  0x7120, 0x711e, 0x712f, 0x70fb, 0x712e, 0x7131, 0x7123, 0x7125,
+  0x7122, 0x7132, 0x711f, 0x7128, 0x713a, 0x711b, 0x724b, 0x725a,
+  0x7288, 0x7289, 0x7286, 0x7285, 0x728b, 0x7312, 0x730b, 0x7330,
+  0x7322, 0x7331, 0x7333, 0x7327, 0x7332, 0x732d, 0x7326, 0x7323,
+  0x7335, 0x730c, 0x742e, 0x742c, 0x7430, 0x742b, 0x7416, 0x741a,
+  0x7421, 0x742d, 0x7431, 0x7424, 0x7423, 0x741d, 0x7429, 0x7420,
+  0x7432, 0x74fb, 0x752f, 0x756f, 0x756c, 0x75e7, 0x75da, 0x75e1,
+  0x75e6, 0x75dd, 0x75df, 0x75e4, 0x75d7, 0x7695, 0x7692, 0x76da,
+  0x7746, 0x7747, 0x7744, 0x774d, 0x7745, 0x774a, 0x774e, 0x774b,
+  0x774c, 0x77de, 0x77ec, 0x7860, 0x7864, 0x7865, 0x785c, 0x786d,
+  0x7871, 0x786a, 0x786e, 0x7870, 0x7869, 0x7868, 0x785e, 0x7862,
+  0x7974, 0x7973, 0x7972, 0x7970, 0x7a02, 0x7a0a, 0x7a03, 0x7a0c,
+  0x7a04, 0x7a99, 0x7ae6, 0x7ae4, 0x7b4a, 0x7b3b, 0x7b44, 0x7b48,
+  0x7b4c, 0x7b4e, 0x7b40, 0x7b58, 0x7b45, 0x7ca2, 0x7c9e, 0x7ca8,
+  0x7ca1, 0x7d58, 0x7d6f, 0x7d63, 0x7d53, 0x7d56, 0x7d67, 0x7d6a,
+  0x7d4f, 0x7d6d, 0x7d5c, 0x7d6b, 0x7d52, 0x7d54, 0x7d69, 0x7d51,
+  0x7d5f, 0x7d4e, 0x7f3e, 0x7f3f, 0x7f65,
+  /* 0xdb */
+  0x7f66, 0x7fa2, 0x7fa0, 0x7fa1, 0x7fd7, 0x8051, 0x804f, 0x8050,
+  0x80fe, 0x80d4, 0x8143, 0x814a, 0x8152, 0x814f, 0x8147, 0x813d,
+  0x814d, 0x813a, 0x81e6, 0x81ee, 0x81f7, 0x81f8, 0x81f9, 0x8204,
+  0x823c, 0x823d, 0x823f, 0x8275, 0x833b, 0x83cf, 0x83f9, 0x8423,
+  0x83c0, 0x83e8, 0x8412, 0x83e7, 0x83e4, 0x83fc, 0x83f6, 0x8410,
+  0x83c6, 0x83c8, 0x83eb, 0x83e3, 0x83bf, 0x8401, 0x83dd, 0x83e5,
+  0x83d8, 0x83ff, 0x83e1, 0x83cb, 0x83ce, 0x83d6, 0x83f5, 0x83c9,
+  0x8409, 0x840f, 0x83de, 0x8411, 0x8406, 0x83c2, 0x83f3, 0x83d5,
+  0x83fa, 0x83c7, 0x83d1, 0x83ea, 0x8413, 0x83c3, 0x83ec, 0x83ee,
+  0x83c4, 0x83fb, 0x83d7, 0x83e2, 0x841b, 0x83db, 0x83fe, 0x86d8,
+  0x86e2, 0x86e6, 0x86d3, 0x86e3, 0x86da, 0x86ea, 0x86dd, 0x86eb,
+  0x86dc, 0x86ec, 0x86e9, 0x86d7, 0x86e8, 0x86d1, 0x8848, 0x8856,
+  0x8855, 0x88ba, 0x88d7, 0x88b9, 0x88b8, 0x88c0, 0x88be, 0x88b6,
+  0x88bc, 0x88b7, 0x88bd, 0x88b2, 0x8901, 0x88c9, 0x8995, 0x8998,
+  0x8997, 0x89dd, 0x89da, 0x89db, 0x8a4e, 0x8a4d, 0x8a39, 0x8a59,
+  0x8a40, 0x8a57, 0x8a58, 0x8a44, 0x8a45, 0x8a52, 0x8a48, 0x8a51,
+  0x8a4a, 0x8a4c, 0x8a4f, 0x8c5f, 0x8c81, 0x8c80, 0x8cba, 0x8cbe,
+  0x8cb0, 0x8cb9, 0x8cb5, 0x8d84, 0x8d80, 0x8d89, 0x8dd8, 0x8dd3,
+  0x8dcd, 0x8dc7, 0x8dd6, 0x8ddc, 0x8dcf, 0x8dd5, 0x8dd9, 0x8dc8,
+  0x8dd7, 0x8dc5, 0x8eef, 0x8ef7, 0x8efa,
+  /* 0xdc */
+  0x8ef9, 0x8ee6, 0x8eee, 0x8ee5, 0x8ef5, 0x8ee7, 0x8ee8, 0x8ef6,
+  0x8eeb, 0x8ef1, 0x8eec, 0x8ef4, 0x8ee9, 0x902d, 0x9034, 0x902f,
+  0x9106, 0x912c, 0x9104, 0x90ff, 0x90fc, 0x9108, 0x90f9, 0x90fb,
+  0x9101, 0x9100, 0x9107, 0x9105, 0x9103, 0x9161, 0x9164, 0x915f,
+  0x9162, 0x9160, 0x9201, 0x920a, 0x9225, 0x9203, 0x921a, 0x9226,
+  0x920f, 0x920c, 0x9200, 0x9212, 0x91ff, 0x91fd, 0x9206, 0x9204,
+  0x9227, 0x9202, 0x921c, 0x9224, 0x9219, 0x9217, 0x9205, 0x9216,
+  0x957b, 0x958d, 0x958c, 0x9590, 0x9687, 0x967e, 0x9688, 0x9689,
+  0x9683, 0x9680, 0x96c2, 0x96c8, 0x96c3, 0x96f1, 0x96f0, 0x976c,
+  0x9770, 0x976e, 0x9807, 0x98a9, 0x98eb, 0x9ce6, 0x9ef9, 0x4e83,
+  0x4e84, 0x4eb6, 0x50bd, 0x50bf, 0x50c6, 0x50ae, 0x50c4, 0x50ca,
+  0x50b4, 0x50c8, 0x50c2, 0x50b0, 0x50c1, 0x50ba, 0x50b1, 0x50cb,
+  0x50c9, 0x50b6, 0x50b8, 0x51d7, 0x527a, 0x5278, 0x527b, 0x527c,
+  0x55c3, 0x55db, 0x55cc, 0x55d0, 0x55cb, 0x55ca, 0x55dd, 0x55c0,
+  0x55d4, 0x55c4, 0x55e9, 0x55bf, 0x55d2, 0x558d, 0x55cf, 0x55d5,
+  0x55e2, 0x55d6, 0x55c8, 0x55f2, 0x55cd, 0x55d9, 0x55c2, 0x5714,
+  0x5853, 0x5868, 0x5864, 0x584f, 0x584d, 0x5849, 0x586f, 0x5855,
+  0x584e, 0x585d, 0x5859, 0x5865, 0x585b, 0x583d, 0x5863, 0x5871,
+  0x58fc, 0x5ac7, 0x5ac4, 0x5acb, 0x5aba, 0x5ab8, 0x5ab1, 0x5ab5,
+  0x5ab0, 0x5abf, 0x5ac8, 0x5abb, 0x5ac6,
+  /* 0xdd */
+  0x5ab7, 0x5ac0, 0x5aca, 0x5ab4, 0x5ab6, 0x5acd, 0x5ab9, 0x5a90,
+  0x5bd6, 0x5bd8, 0x5bd9, 0x5c1f, 0x5c33, 0x5d71, 0x5d63, 0x5d4a,
+  0x5d65, 0x5d72, 0x5d6c, 0x5d5e, 0x5d68, 0x5d67, 0x5d62, 0x5df0,
+  0x5e4f, 0x5e4e, 0x5e4a, 0x5e4d, 0x5e4b, 0x5ec5, 0x5ecc, 0x5ec6,
+  0x5ecb, 0x5ec7, 0x5f40, 0x5faf, 0x5fad, 0x60f7, 0x6149, 0x614a,
+  0x612b, 0x6145, 0x6136, 0x6132, 0x612e, 0x6146, 0x612f, 0x614f,
+  0x6129, 0x6140, 0x6220, 0x9168, 0x6223, 0x6225, 0x6224, 0x63c5,
+  0x63f1, 0x63eb, 0x6410, 0x6412, 0x6409, 0x6420, 0x6424, 0x6433,
+  0x6443, 0x641f, 0x6415, 0x6418, 0x6439, 0x6437, 0x6422, 0x6423,
+  0x640c, 0x6426, 0x6430, 0x6428, 0x6441, 0x6435, 0x642f, 0x640a,
+  0x641a, 0x6440, 0x6425, 0x6427, 0x640b, 0x63e7, 0x641b, 0x642e,
+  0x6421, 0x640e, 0x656f, 0x6592, 0x65d3, 0x6686, 0x668c, 0x6695,
+  0x6690, 0x668b, 0x668a, 0x6699, 0x6694, 0x6678, 0x6720, 0x6966,
+  0x695f, 0x6938, 0x694e, 0x6962, 0x6971, 0x693f, 0x6945, 0x696a,
+  0x6939, 0x6942, 0x6957, 0x6959, 0x697a, 0x6948, 0x6949, 0x6935,
+  0x696c, 0x6933, 0x693d, 0x6965, 0x68f0, 0x6978, 0x6934, 0x6969,
+  0x6940, 0x696f, 0x6944, 0x6976, 0x6958, 0x6941, 0x6974, 0x694c,
+  0x693b, 0x694b, 0x6937, 0x695c, 0x694f, 0x6951, 0x6932, 0x6952,
+  0x692f, 0x697b, 0x693c, 0x6b46, 0x6b45, 0x6b43, 0x6b42, 0x6b48,
+  0x6b41, 0x6b9b, 0xfa0d, 0x6bfb, 0x6bfc,
+  /* 0xde */
+  0x6bf9, 0x6bf7, 0x6bf8, 0x6e9b, 0x6ed6, 0x6ec8, 0x6e8f, 0x6ec0,
+  0x6e9f, 0x6e93, 0x6e94, 0x6ea0, 0x6eb1, 0x6eb9, 0x6ec6, 0x6ed2,
+  0x6ebd, 0x6ec1, 0x6e9e, 0x6ec9, 0x6eb7, 0x6eb0, 0x6ecd, 0x6ea6,
+  0x6ecf, 0x6eb2, 0x6ebe, 0x6ec3, 0x6edc, 0x6ed8, 0x6e99, 0x6e92,
+  0x6e8e, 0x6e8d, 0x6ea4, 0x6ea1, 0x6ebf, 0x6eb3, 0x6ed0, 0x6eca,
+  0x6e97, 0x6eae, 0x6ea3, 0x7147, 0x7154, 0x7152, 0x7163, 0x7160,
+  0x7141, 0x715d, 0x7162, 0x7172, 0x7178, 0x716a, 0x7161, 0x7142,
+  0x7158, 0x7143, 0x714b, 0x7170, 0x715f, 0x7150, 0x7153, 0x7144,
+  0x714d, 0x715a, 0x724f, 0x728d, 0x728c, 0x7291, 0x7290, 0x728e,
+  0x733c, 0x7342, 0x733b, 0x733a, 0x7340, 0x734a, 0x7349, 0x7444,
+  0x744a, 0x744b, 0x7452, 0x7451, 0x7457, 0x7440, 0x744f, 0x7450,
+  0x744e, 0x7442, 0x7446, 0x744d, 0x7454, 0x74e1, 0x74ff, 0x74fe,
+  0x74fd, 0x751d, 0x7579, 0x7577, 0x6983, 0x75ef, 0x760f, 0x7603,
+  0x75f7, 0x75fe, 0x75fc, 0x75f9, 0x75f8, 0x7610, 0x75fb, 0x75f6,
+  0x75ed, 0x75f5, 0x75fd, 0x7699, 0x76b5, 0x76dd, 0x7755, 0x775f,
+  0x7760, 0x7752, 0x7756, 0x775a, 0x7769, 0x7767, 0x7754, 0x7759,
+  0x776d, 0x77e0, 0x7887, 0x789a, 0x7894, 0x788f, 0x7884, 0x7895,
+  0x7885, 0x7886, 0x78a1, 0x7883, 0x7879, 0x7899, 0x7880, 0x7896,
+  0x787b, 0x797c, 0x7982, 0x797d, 0x7979, 0x7a11, 0x7a18, 0x7a19,
+  0x7a12, 0x7a17, 0x7a15, 0x7a22, 0x7a13,
+  /* 0xdf */
+  0x7a1b, 0x7a10, 0x7aa3, 0x7aa2, 0x7a9e, 0x7aeb, 0x7b66, 0x7b64,
+  0x7b6d, 0x7b74, 0x7b69, 0x7b72, 0x7b65, 0x7b73, 0x7b71, 0x7b70,
+  0x7b61, 0x7b78, 0x7b76, 0x7b63, 0x7cb2, 0x7cb4, 0x7caf, 0x7d88,
+  0x7d86, 0x7d80, 0x7d8d, 0x7d7f, 0x7d85, 0x7d7a, 0x7d8e, 0x7d7b,
+  0x7d83, 0x7d7c, 0x7d8c, 0x7d94, 0x7d84, 0x7d7d, 0x7d92, 0x7f6d,
+  0x7f6b, 0x7f67, 0x7f68, 0x7f6c, 0x7fa6, 0x7fa5, 0x7fa7, 0x7fdb,
+  0x7fdc, 0x8021, 0x8164, 0x8160, 0x8177, 0x815c, 0x8169, 0x815b,
+  0x8162, 0x8172, 0x6721, 0x815e, 0x8176, 0x8167, 0x816f, 0x8144,
+  0x8161, 0x821d, 0x8249, 0x8244, 0x8240, 0x8242, 0x8245, 0x84f1,
+  0x843f, 0x8456, 0x8476, 0x8479, 0x848f, 0x848d, 0x8465, 0x8451,
+  0x8440, 0x8486, 0x8467, 0x8430, 0x844d, 0x847d, 0x845a, 0x8459,
+  0x8474, 0x8473, 0x845d, 0x8507, 0x845e, 0x8437, 0x843a, 0x8434,
+  0x847a, 0x8443, 0x8478, 0x8432, 0x8445, 0x8429, 0x83d9, 0x844b,
+  0x842f, 0x8442, 0x842d, 0x845f, 0x8470, 0x8439, 0x844e, 0x844c,
+  0x8452, 0x846f, 0x84c5, 0x848e, 0x843b, 0x8447, 0x8436, 0x8433,
+  0x8468, 0x847e, 0x8444, 0x842b, 0x8460, 0x8454, 0x846e, 0x8450,
+  0x870b, 0x8704, 0x86f7, 0x870c, 0x86fa, 0x86d6, 0x86f5, 0x874d,
+  0x86f8, 0x870e, 0x8709, 0x8701, 0x86f6, 0x870d, 0x8705, 0x88d6,
+  0x88cb, 0x88cd, 0x88ce, 0x88de, 0x88db, 0x88da, 0x88cc, 0x88d0,
+  0x8985, 0x899b, 0x89df, 0x89e5, 0x89e4,
+  /* 0xe0 */
+  0x89e1, 0x89e0, 0x89e2, 0x89dc, 0x89e6, 0x8a76, 0x8a86, 0x8a7f,
+  0x8a61, 0x8a3f, 0x8a77, 0x8a82, 0x8a84, 0x8a75, 0x8a83, 0x8a81,
+  0x8a74, 0x8a7a, 0x8c3c, 0x8c4b, 0x8c4a, 0x8c65, 0x8c64, 0x8c66,
+  0x8c86, 0x8c84, 0x8c85, 0x8ccc, 0x8d68, 0x8d69, 0x8d91, 0x8d8c,
+  0x8d8e, 0x8d8f, 0x8d8d, 0x8d93, 0x8d94, 0x8d90, 0x8d92, 0x8df0,
+  0x8de0, 0x8dec, 0x8df1, 0x8dee, 0x8dd0, 0x8de9, 0x8de3, 0x8de2,
+  0x8de7, 0x8df2, 0x8deb, 0x8df4, 0x8f06, 0x8eff, 0x8f01, 0x8f00,
+  0x8f05, 0x8f07, 0x8f08, 0x8f02, 0x8f0b, 0x9052, 0x903f, 0x9044,
+  0x9049, 0x903d, 0x9110, 0x910d, 0x910f, 0x9111, 0x9116, 0x9114,
+  0x910b, 0x910e, 0x916e, 0x916f, 0x9248, 0x9252, 0x9230, 0x923a,
+  0x9266, 0x9233, 0x9265, 0x925e, 0x9283, 0x922e, 0x924a, 0x9246,
+  0x926d, 0x926c, 0x924f, 0x9260, 0x9267, 0x926f, 0x9236, 0x9261,
+  0x9270, 0x9231, 0x9254, 0x9263, 0x9250, 0x9272, 0x924e, 0x9253,
+  0x924c, 0x9256, 0x9232, 0x959f, 0x959c, 0x959e, 0x959b, 0x9692,
+  0x9693, 0x9691, 0x9697, 0x96ce, 0x96fa, 0x96fd, 0x96f8, 0x96f5,
+  0x9773, 0x9777, 0x9778, 0x9772, 0x980f, 0x980d, 0x980e, 0x98ac,
+  0x98f6, 0x98f9, 0x99af, 0x99b2, 0x99b0, 0x99b5, 0x9aad, 0x9aab,
+  0x9b5b, 0x9cea, 0x9ced, 0x9ce7, 0x9e80, 0x9efd, 0x50e6, 0x50d4,
+  0x50d7, 0x50e8, 0x50f3, 0x50db, 0x50ea, 0x50dd, 0x50e4, 0x50d3,
+  0x50ec, 0x50f0, 0x50ef, 0x50e3, 0x50e0,
+  /* 0xe1 */
+  0x51d8, 0x5280, 0x5281, 0x52e9, 0x52eb, 0x5330, 0x53ac, 0x5627,
+  0x5615, 0x560c, 0x5612, 0x55fc, 0x560f, 0x561c, 0x5601, 0x5613,
+  0x5602, 0x55fa, 0x561d, 0x5604, 0x55ff, 0x55f9, 0x5889, 0x587c,
+  0x5890, 0x5898, 0x5886, 0x5881, 0x587f, 0x5874, 0x588b, 0x587a,
+  0x5887, 0x5891, 0x588e, 0x5876, 0x5882, 0x5888, 0x587b, 0x5894,
+  0x588f, 0x58fe, 0x596b, 0x5adc, 0x5aee, 0x5ae5, 0x5ad5, 0x5aea,
+  0x5ada, 0x5aed, 0x5aeb, 0x5af3, 0x5ae2, 0x5ae0, 0x5adb, 0x5aec,
+  0x5ade, 0x5add, 0x5ad9, 0x5ae8, 0x5adf, 0x5b77, 0x5be0, 0x5be3,
+  0x5c63, 0x5d82, 0x5d80, 0x5d7d, 0x5d86, 0x5d7a, 0x5d81, 0x5d77,
+  0x5d8a, 0x5d89, 0x5d88, 0x5d7e, 0x5d7c, 0x5d8d, 0x5d79, 0x5d7f,
+  0x5e58, 0x5e59, 0x5e53, 0x5ed8, 0x5ed1, 0x5ed7, 0x5ece, 0x5edc,
+  0x5ed5, 0x5ed9, 0x5ed2, 0x5ed4, 0x5f44, 0x5f43, 0x5f6f, 0x5fb6,
+  0x612c, 0x6128, 0x6141, 0x615e, 0x6171, 0x6173, 0x6152, 0x6153,
+  0x6172, 0x616c, 0x6180, 0x6174, 0x6154, 0x617a, 0x615b, 0x6165,
+  0x613b, 0x616a, 0x6161, 0x6156, 0x6229, 0x6227, 0x622b, 0x642b,
+  0x644d, 0x645b, 0x645d, 0x6474, 0x6476, 0x6472, 0x6473, 0x647d,
+  0x6475, 0x6466, 0x64a6, 0x644e, 0x6482, 0x645e, 0x645c, 0x644b,
+  0x6453, 0x6460, 0x6450, 0x647f, 0x643f, 0x646c, 0x646b, 0x6459,
+  0x6465, 0x6477, 0x6573, 0x65a0, 0x66a1, 0x66a0, 0x669f, 0x6705,
+  0x6704, 0x6722, 0x69b1, 0x69b6, 0x69c9,
+  /* 0xe2 */
+  0x69a0, 0x69ce, 0x6996, 0x69b0, 0x69ac, 0x69bc, 0x6991, 0x6999,
+  0x698e, 0x69a7, 0x698d, 0x69a9, 0x69be, 0x69af, 0x69bf, 0x69c4,
+  0x69bd, 0x69a4, 0x69d4, 0x69b9, 0x69ca, 0x699a, 0x69cf, 0x69b3,
+  0x6993, 0x69aa, 0x69a1, 0x699e, 0x69d9, 0x6997, 0x6990, 0x69c2,
+  0x69b5, 0x69a5, 0x69c6, 0x6b4a, 0x6b4d, 0x6b4b, 0x6b9e, 0x6b9f,
+  0x6ba0, 0x6bc3, 0x6bc4, 0x6bfe, 0x6ece, 0x6ef5, 0x6ef1, 0x6f03,
+  0x6f25, 0x6ef8, 0x6f37, 0x6efb, 0x6f2e, 0x6f09, 0x6f4e, 0x6f19,
+  0x6f1a, 0x6f27, 0x6f18, 0x6f3b, 0x6f12, 0x6eed, 0x6f0a, 0x6f36,
+  0x6f73, 0x6ef9, 0x6eee, 0x6f2d, 0x6f40, 0x6f30, 0x6f3c, 0x6f35,
+  0x6eeb, 0x6f07, 0x6f0e, 0x6f43, 0x6f05, 0x6efd, 0x6ef6, 0x6f39,
+  0x6f1c, 0x6efc, 0x6f3a, 0x6f1f, 0x6f0d, 0x6f1e, 0x6f08, 0x6f21,
+  0x7187, 0x7190, 0x7189, 0x7180, 0x7185, 0x7182, 0x718f, 0x717b,
+  0x7186, 0x7181, 0x7197, 0x7244, 0x7253, 0x7297, 0x7295, 0x7293,
+  0x7343, 0x734d, 0x7351, 0x734c, 0x7462, 0x7473, 0x7471, 0x7475,
+  0x7472, 0x7467, 0x746e, 0x7500, 0x7502, 0x7503, 0x757d, 0x7590,
+  0x7616, 0x7608, 0x760c, 0x7615, 0x7611, 0x760a, 0x7614, 0x76b8,
+  0x7781, 0x777c, 0x7785, 0x7782, 0x776e, 0x7780, 0x776f, 0x777e,
+  0x7783, 0x78b2, 0x78aa, 0x78b4, 0x78ad, 0x78a8, 0x787e, 0x78ab,
+  0x789e, 0x78a5, 0x78a0, 0x78ac, 0x78a2, 0x78a4, 0x7998, 0x798a,
+  0x798b, 0x7996, 0x7995, 0x7994, 0x7993,
+  /* 0xe3 */
+  0x7997, 0x7988, 0x7992, 0x7990, 0x7a2b, 0x7a4a, 0x7a30, 0x7a2f,
+  0x7a28, 0x7a26, 0x7aa8, 0x7aab, 0x7aac, 0x7aee, 0x7b88, 0x7b9c,
+  0x7b8a, 0x7b91, 0x7b90, 0x7b96, 0x7b8d, 0x7b8c, 0x7b9b, 0x7b8e,
+  0x7b85, 0x7b98, 0x5284, 0x7b99, 0x7ba4, 0x7b82, 0x7cbb, 0x7cbf,
+  0x7cbc, 0x7cba, 0x7da7, 0x7db7, 0x7dc2, 0x7da3, 0x7daa, 0x7dc1,
+  0x7dc0, 0x7dc5, 0x7d9d, 0x7dce, 0x7dc4, 0x7dc6, 0x7dcb, 0x7dcc,
+  0x7daf, 0x7db9, 0x7d96, 0x7dbc, 0x7d9f, 0x7da6, 0x7dae, 0x7da9,
+  0x7da1, 0x7dc9, 0x7f73, 0x7fe2, 0x7fe3, 0x7fe5, 0x7fde, 0x8024,
+  0x805d, 0x805c, 0x8189, 0x8186, 0x8183, 0x8187, 0x818d, 0x818c,
+  0x818b, 0x8215, 0x8497, 0x84a4, 0x84a1, 0x849f, 0x84ba, 0x84ce,
+  0x84c2, 0x84ac, 0x84ae, 0x84ab, 0x84b9, 0x84b4, 0x84c1, 0x84cd,
+  0x84aa, 0x849a, 0x84b1, 0x84d0, 0x849d, 0x84a7, 0x84bb, 0x84a2,
+  0x8494, 0x84c7, 0x84cc, 0x849b, 0x84a9, 0x84af, 0x84a8, 0x84d6,
+  0x8498, 0x84b6, 0x84cf, 0x84a0, 0x84d7, 0x84d4, 0x84d2, 0x84db,
+  0x84b0, 0x8491, 0x8661, 0x8733, 0x8723, 0x8728, 0x876b, 0x8740,
+  0x872e, 0x871e, 0x8721, 0x8719, 0x871b, 0x8743, 0x872c, 0x8741,
+  0x873e, 0x8746, 0x8720, 0x8732, 0x872a, 0x872d, 0x873c, 0x8712,
+  0x873a, 0x8731, 0x8735, 0x8742, 0x8726, 0x8727, 0x8738, 0x8724,
+  0x871a, 0x8730, 0x8711, 0x88f7, 0x88e7, 0x88f1, 0x88f2, 0x88fa,
+  0x88fe, 0x88ee, 0x88fc, 0x88f6, 0x88fb,
+  /* 0xe4 */
+  0x88f0, 0x88ec, 0x88eb, 0x899d, 0x89a1, 0x899f, 0x899e, 0x89e9,
+  0x89eb, 0x89e8, 0x8aab, 0x8a99, 0x8a8b, 0x8a92, 0x8a8f, 0x8a96,
+  0x8c3d, 0x8c68, 0x8c69, 0x8cd5, 0x8ccf, 0x8cd7, 0x8d96, 0x8e09,
+  0x8e02, 0x8dff, 0x8e0d, 0x8dfd, 0x8e0a, 0x8e03, 0x8e07, 0x8e06,
+  0x8e05, 0x8dfe, 0x8e00, 0x8e04, 0x8f10, 0x8f11, 0x8f0e, 0x8f0d,
+  0x9123, 0x911c, 0x9120, 0x9122, 0x911f, 0x911d, 0x911a, 0x9124,
+  0x9121, 0x911b, 0x917a, 0x9172, 0x9179, 0x9173, 0x92a5, 0x92a4,
+  0x9276, 0x929b, 0x927a, 0x92a0, 0x9294, 0x92aa, 0x928d, 0x92a6,
+  0x929a, 0x92ab, 0x9279, 0x9297, 0x927f, 0x92a3, 0x92ee, 0x928e,
+  0x9282, 0x9295, 0x92a2, 0x927d, 0x9288, 0x92a1, 0x928a, 0x9286,
+  0x928c, 0x9299, 0x92a7, 0x927e, 0x9287, 0x92a9, 0x929d, 0x928b,
+  0x922d, 0x969e, 0x96a1, 0x96ff, 0x9758, 0x977d, 0x977a, 0x977e,
+  0x9783, 0x9780, 0x9782, 0x977b, 0x9784, 0x9781, 0x977f, 0x97ce,
+  0x97cd, 0x9816, 0x98ad, 0x98ae, 0x9902, 0x9900, 0x9907, 0x999d,
+  0x999c, 0x99c3, 0x99b9, 0x99bb, 0x99ba, 0x99c2, 0x99bd, 0x99c7,
+  0x9ab1, 0x9ae3, 0x9ae7, 0x9b3e, 0x9b3f, 0x9b60, 0x9b61, 0x9b5f,
+  0x9cf1, 0x9cf2, 0x9cf5, 0x9ea7, 0x50ff, 0x5103, 0x5130, 0x50f8,
+  0x5106, 0x5107, 0x50f6, 0x50fe, 0x510b, 0x510c, 0x50fd, 0x510a,
+  0x528b, 0x528c, 0x52f1, 0x52ef, 0x5648, 0x5642, 0x564c, 0x5635,
+  0x5641, 0x564a, 0x5649, 0x5646, 0x5658,
+  /* 0xe5 */
+  0x565a, 0x5640, 0x5633, 0x563d, 0x562c, 0x563e, 0x5638, 0x562a,
+  0x563a, 0x571a, 0x58ab, 0x589d, 0x58b1, 0x58a0, 0x58a3, 0x58af,
+  0x58ac, 0x58a5, 0x58a1, 0x58ff, 0x5aff, 0x5af4, 0x5afd, 0x5af7,
+  0x5af6, 0x5b03, 0x5af8, 0x5b02, 0x5af9, 0x5b01, 0x5b07, 0x5b05,
+  0x5b0f, 0x5c67, 0x5d99, 0x5d97, 0x5d9f, 0x5d92, 0x5da2, 0x5d93,
+  0x5d95, 0x5da0, 0x5d9c, 0x5da1, 0x5d9a, 0x5d9e, 0x5e69, 0x5e5d,
+  0x5e60, 0x5e5c, 0x7df3, 0x5edb, 0x5ede, 0x5ee1, 0x5f49, 0x5fb2,
+  0x618b, 0x6183, 0x6179, 0x61b1, 0x61b0, 0x61a2, 0x6189, 0x619b,
+  0x6193, 0x61af, 0x61ad, 0x619f, 0x6192, 0x61aa, 0x61a1, 0x618d,
+  0x6166, 0x61b3, 0x622d, 0x646e, 0x6470, 0x6496, 0x64a0, 0x6485,
+  0x6497, 0x649c, 0x648f, 0x648b, 0x648a, 0x648c, 0x64a3, 0x649f,
+  0x6468, 0x64b1, 0x6498, 0x6576, 0x657a, 0x6579, 0x657b, 0x65b2,
+  0x65b3, 0x66b5, 0x66b0, 0x66a9, 0x66b2, 0x66b7, 0x66aa, 0x66af,
+  0x6a00, 0x6a06, 0x6a17, 0x69e5, 0x69f8, 0x6a15, 0x69f1, 0x69e4,
+  0x6a20, 0x69ff, 0x69ec, 0x69e2, 0x6a1b, 0x6a1d, 0x69fe, 0x6a27,
+  0x69f2, 0x69ee, 0x6a14, 0x69f7, 0x69e7, 0x6a40, 0x6a08, 0x69e6,
+  0x69fb, 0x6a0d, 0x69fc, 0x69eb, 0x6a09, 0x6a04, 0x6a18, 0x6a25,
+  0x6a0f, 0x69f6, 0x6a26, 0x6a07, 0x69f4, 0x6a16, 0x6b51, 0x6ba5,
+  0x6ba3, 0x6ba2, 0x6ba6, 0x6c01, 0x6c00, 0x6bff, 0x6c02, 0x6f41,
+  0x6f26, 0x6f7e, 0x6f87, 0x6fc6, 0x6f92,
+  /* 0xe6 */
+  0x6f8d, 0x6f89, 0x6f8c, 0x6f62, 0x6f4f, 0x6f85, 0x6f5a, 0x6f96,
+  0x6f76, 0x6f6c, 0x6f82, 0x6f55, 0x6f72, 0x6f52, 0x6f50, 0x6f57,
+  0x6f94, 0x6f93, 0x6f5d, 0x6f00, 0x6f61, 0x6f6b, 0x6f7d, 0x6f67,
+  0x6f90, 0x6f53, 0x6f8b, 0x6f69, 0x6f7f, 0x6f95, 0x6f63, 0x6f77,
+  0x6f6a, 0x6f7b, 0x71b2, 0x71af, 0x719b, 0x71b0, 0x71a0, 0x719a,
+  0x71a9, 0x71b5, 0x719d, 0x71a5, 0x719e, 0x71a4, 0x71a1, 0x71aa,
+  0x719c, 0x71a7, 0x71b3, 0x7298, 0x729a, 0x7358, 0x7352, 0x735e,
+  0x735f, 0x7360, 0x735d, 0x735b, 0x7361, 0x735a, 0x7359, 0x7362,
+  0x7487, 0x7489, 0x748a, 0x7486, 0x7481, 0x747d, 0x7485, 0x7488,
+  0x747c, 0x7479, 0x7508, 0x7507, 0x757e, 0x7625, 0x761e, 0x7619,
+  0x761d, 0x761c, 0x7623, 0x761a, 0x7628, 0x761b, 0x769c, 0x769d,
+  0x769e, 0x769b, 0x778d, 0x778f, 0x7789, 0x7788, 0x78cd, 0x78bb,
+  0x78cf, 0x78cc, 0x78d1, 0x78ce, 0x78d4, 0x78c8, 0x78c3, 0x78c4,
+  0x78c9, 0x799a, 0x79a1, 0x79a0, 0x799c, 0x79a2, 0x799b, 0x6b76,
+  0x7a39, 0x7ab2, 0x7ab4, 0x7ab3, 0x7bb7, 0x7bcb, 0x7bbe, 0x7bac,
+  0x7bce, 0x7baf, 0x7bb9, 0x7bca, 0x7bb5, 0x7cc5, 0x7cc8, 0x7ccc,
+  0x7ccb, 0x7df7, 0x7ddb, 0x7dea, 0x7de7, 0x7dd7, 0x7de1, 0x7e03,
+  0x7dfa, 0x7de6, 0x7df6, 0x7df1, 0x7df0, 0x7dee, 0x7ddf, 0x7f76,
+  0x7fac, 0x7fb0, 0x7fad, 0x7fed, 0x7feb, 0x7fea, 0x7fec, 0x7fe6,
+  0x7fe8, 0x8064, 0x8067, 0x81a3, 0x819f,
+  /* 0xe7 */
+  0x819e, 0x8195, 0x81a2, 0x8199, 0x8197, 0x8216, 0x824f, 0x8253,
+  0x8252, 0x8250, 0x824e, 0x8251, 0x8524, 0x853b, 0x850f, 0x8500,
+  0x8529, 0x850e, 0x8509, 0x850d, 0x851f, 0x850a, 0x8527, 0x851c,
+  0x84fb, 0x852b, 0x84fa, 0x8508, 0x850c, 0x84f4, 0x852a, 0x84f2,
+  0x8515, 0x84f7, 0x84eb, 0x84f3, 0x84fc, 0x8512, 0x84ea, 0x84e9,
+  0x8516, 0x84fe, 0x8528, 0x851d, 0x852e, 0x8502, 0x84fd, 0x851e,
+  0x84f6, 0x8531, 0x8526, 0x84e7, 0x84e8, 0x84f0, 0x84ef, 0x84f9,
+  0x8518, 0x8520, 0x8530, 0x850b, 0x8519, 0x852f, 0x8662, 0x8756,
+  0x8763, 0x8764, 0x8777, 0x87e1, 0x8773, 0x8758, 0x8754, 0x875b,
+  0x8752, 0x8761, 0x875a, 0x8751, 0x875e, 0x876d, 0x876a, 0x8750,
+  0x874e, 0x875f, 0x875d, 0x876f, 0x876c, 0x877a, 0x876e, 0x875c,
+  0x8765, 0x874f, 0x877b, 0x8775, 0x8762, 0x8767, 0x8769, 0x885a,
+  0x8905, 0x890c, 0x8914, 0x890b, 0x8917, 0x8918, 0x8919, 0x8906,
+  0x8916, 0x8911, 0x890e, 0x8909, 0x89a2, 0x89a4, 0x89a3, 0x89ed,
+  0x89f0, 0x89ec, 0x8acf, 0x8ac6, 0x8ab8, 0x8ad3, 0x8ad1, 0x8ad4,
+  0x8ad5, 0x8abb, 0x8ad7, 0x8abe, 0x8ac0, 0x8ac5, 0x8ad8, 0x8ac3,
+  0x8aba, 0x8abd, 0x8ad9, 0x8c3e, 0x8c4d, 0x8c8f, 0x8ce5, 0x8cdf,
+  0x8cd9, 0x8ce8, 0x8cda, 0x8cdd, 0x8ce7, 0x8da0, 0x8d9c, 0x8da1,
+  0x8d9b, 0x8e20, 0x8e23, 0x8e25, 0x8e24, 0x8e2e, 0x8e15, 0x8e1b,
+  0x8e16, 0x8e11, 0x8e19, 0x8e26, 0x8e27,
+  /* 0xe8 */
+  0x8e14, 0x8e12, 0x8e18, 0x8e13, 0x8e1c, 0x8e17, 0x8e1a, 0x8f2c,
+  0x8f24, 0x8f18, 0x8f1a, 0x8f20, 0x8f23, 0x8f16, 0x8f17, 0x9073,
+  0x9070, 0x906f, 0x9067, 0x906b, 0x912f, 0x912b, 0x9129, 0x912a,
+  0x9132, 0x9126, 0x912e, 0x9185, 0x9186, 0x918a, 0x9181, 0x9182,
+  0x9184, 0x9180, 0x92d0, 0x92c3, 0x92c4, 0x92c0, 0x92d9, 0x92b6,
+  0x92cf, 0x92f1, 0x92df, 0x92d8, 0x92e9, 0x92d7, 0x92dd, 0x92cc,
+  0x92ef, 0x92c2, 0x92e8, 0x92ca, 0x92c8, 0x92ce, 0x92e6, 0x92cd,
+  0x92d5, 0x92c9, 0x92e0, 0x92de, 0x92e7, 0x92d1, 0x92d3, 0x92b5,
+  0x92e1, 0x92c6, 0x92b4, 0x957c, 0x95ac, 0x95ab, 0x95ae, 0x95b0,
+  0x96a4, 0x96a2, 0x96d3, 0x9705, 0x9708, 0x9702, 0x975a, 0x978a,
+  0x978e, 0x9788, 0x97d0, 0x97cf, 0x981e, 0x981d, 0x9826, 0x9829,
+  0x9828, 0x9820, 0x981b, 0x9827, 0x98b2, 0x9908, 0x98fa, 0x9911,
+  0x9914, 0x9916, 0x9917, 0x9915, 0x99dc, 0x99cd, 0x99cf, 0x99d3,
+  0x99d4, 0x99ce, 0x99c9, 0x99d6, 0x99d8, 0x99cb, 0x99d7, 0x99cc,
+  0x9ab3, 0x9aec, 0x9aeb, 0x9af3, 0x9af2, 0x9af1, 0x9b46, 0x9b43,
+  0x9b67, 0x9b74, 0x9b71, 0x9b66, 0x9b76, 0x9b75, 0x9b70, 0x9b68,
+  0x9b64, 0x9b6c, 0x9cfc, 0x9cfa, 0x9cfd, 0x9cff, 0x9cf7, 0x9d07,
+  0x9d00, 0x9cf9, 0x9cfb, 0x9d08, 0x9d05, 0x9d04, 0x9e83, 0x9ed3,
+  0x9f0f, 0x9f10, 0x511c, 0x5113, 0x5117, 0x511a, 0x5111, 0x51de,
+  0x5334, 0x53e1, 0x5670, 0x5660, 0x566e,
+  /* 0xe9 */
+  0x5673, 0x5666, 0x5663, 0x566d, 0x5672, 0x565e, 0x5677, 0x571c,
+  0x571b, 0x58c8, 0x58bd, 0x58c9, 0x58bf, 0x58ba, 0x58c2, 0x58bc,
+  0x58c6, 0x5b17, 0x5b19, 0x5b1b, 0x5b21, 0x5b14, 0x5b13, 0x5b10,
+  0x5b16, 0x5b28, 0x5b1a, 0x5b20, 0x5b1e, 0x5bef, 0x5dac, 0x5db1,
+  0x5da9, 0x5da7, 0x5db5, 0x5db0, 0x5dae, 0x5daa, 0x5da8, 0x5db2,
+  0x5dad, 0x5daf, 0x5db4, 0x5e67, 0x5e68, 0x5e66, 0x5e6f, 0x5ee9,
+  0x5ee7, 0x5ee6, 0x5ee8, 0x5ee5, 0x5f4b, 0x5fbc, 0x619d, 0x61a8,
+  0x6196, 0x61c5, 0x61b4, 0x61c6, 0x61c1, 0x61cc, 0x61ba, 0x61bf,
+  0x61b8, 0x618c, 0x64d7, 0x64d6, 0x64d0, 0x64cf, 0x64c9, 0x64bd,
+  0x6489, 0x64c3, 0x64db, 0x64f3, 0x64d9, 0x6533, 0x657f, 0x657c,
+  0x65a2, 0x66c8, 0x66be, 0x66c0, 0x66ca, 0x66cb, 0x66cf, 0x66bd,
+  0x66bb, 0x66ba, 0x66cc, 0x6723, 0x6a34, 0x6a66, 0x6a49, 0x6a67,
+  0x6a32, 0x6a68, 0x6a3e, 0x6a5d, 0x6a6d, 0x6a76, 0x6a5b, 0x6a51,
+  0x6a28, 0x6a5a, 0x6a3b, 0x6a3f, 0x6a41, 0x6a6a, 0x6a64, 0x6a50,
+  0x6a4f, 0x6a54, 0x6a6f, 0x6a69, 0x6a60, 0x6a3c, 0x6a5e, 0x6a56,
+  0x6a55, 0x6a4d, 0x6a4e, 0x6a46, 0x6b55, 0x6b54, 0x6b56, 0x6ba7,
+  0x6baa, 0x6bab, 0x6bc8, 0x6bc7, 0x6c04, 0x6c03, 0x6c06, 0x6fad,
+  0x6fcb, 0x6fa3, 0x6fc7, 0x6fbc, 0x6fce, 0x6fc8, 0x6f5e, 0x6fc4,
+  0x6fbd, 0x6f9e, 0x6fca, 0x6fa8, 0x7004, 0x6fa5, 0x6fae, 0x6fba,
+  0x6fac, 0x6faa, 0x6fcf, 0x6fbf, 0x6fb8,
+  /* 0xea */
+  0x6fa2, 0x6fc9, 0x6fab, 0x6fcd, 0x6faf, 0x6fb2, 0x6fb0, 0x71c5,
+  0x71c2, 0x71bf, 0x71b8, 0x71d6, 0x71c0, 0x71c1, 0x71cb, 0x71d4,
+  0x71ca, 0x71c7, 0x71cf, 0x71bd, 0x71d8, 0x71bc, 0x71c6, 0x71da,
+  0x71db, 0x729d, 0x729e, 0x7369, 0x7366, 0x7367, 0x736c, 0x7365,
+  0x736b, 0x736a, 0x747f, 0x749a, 0x74a0, 0x7494, 0x7492, 0x7495,
+  0x74a1, 0x750b, 0x7580, 0x762f, 0x762d, 0x7631, 0x763d, 0x7633,
+  0x763c, 0x7635, 0x7632, 0x7630, 0x76bb, 0x76e6, 0x779a, 0x779d,
+  0x77a1, 0x779c, 0x779b, 0x77a2, 0x77a3, 0x7795, 0x7799, 0x7797,
+  0x78dd, 0x78e9, 0x78e5, 0x78ea, 0x78de, 0x78e3, 0x78db, 0x78e1,
+  0x78e2, 0x78ed, 0x78df, 0x78e0, 0x79a4, 0x7a44, 0x7a48, 0x7a47,
+  0x7ab6, 0x7ab8, 0x7ab5, 0x7ab1, 0x7ab7, 0x7bde, 0x7be3, 0x7be7,
+  0x7bdd, 0x7bd5, 0x7be5, 0x7bda, 0x7be8, 0x7bf9, 0x7bd4, 0x7bea,
+  0x7be2, 0x7bdc, 0x7beb, 0x7bd8, 0x7bdf, 0x7cd2, 0x7cd4, 0x7cd7,
+  0x7cd0, 0x7cd1, 0x7e12, 0x7e21, 0x7e17, 0x7e0c, 0x7e1f, 0x7e20,
+  0x7e13, 0x7e0e, 0x7e1c, 0x7e15, 0x7e1a, 0x7e22, 0x7e0b, 0x7e0f,
+  0x7e16, 0x7e0d, 0x7e14, 0x7e25, 0x7e24, 0x7f43, 0x7f7b, 0x7f7c,
+  0x7f7a, 0x7fb1, 0x7fef, 0x802a, 0x8029, 0x806c, 0x81b1, 0x81a6,
+  0x81ae, 0x81b9, 0x81b5, 0x81ab, 0x81b0, 0x81ac, 0x81b4, 0x81b2,
+  0x81b7, 0x81a7, 0x81f2, 0x8255, 0x8256, 0x8257, 0x8556, 0x8545,
+  0x856b, 0x854d, 0x8553, 0x8561, 0x8558,
+  /* 0xeb */
+  0x8540, 0x8546, 0x8564, 0x8541, 0x8562, 0x8544, 0x8551, 0x8547,
+  0x8563, 0x853e, 0x855b, 0x8571, 0x854e, 0x856e, 0x8575, 0x8555,
+  0x8567, 0x8560, 0x858c, 0x8566, 0x855d, 0x8554, 0x8565, 0x856c,
+  0x8663, 0x8665, 0x8664, 0x879b, 0x878f, 0x8797, 0x8793, 0x8792,
+  0x8788, 0x8781, 0x8796, 0x8798, 0x8779, 0x8787, 0x87a3, 0x8785,
+  0x8790, 0x8791, 0x879d, 0x8784, 0x8794, 0x879c, 0x879a, 0x8789,
+  0x891e, 0x8926, 0x8930, 0x892d, 0x892e, 0x8927, 0x8931, 0x8922,
+  0x8929, 0x8923, 0x892f, 0x892c, 0x891f, 0x89f1, 0x8ae0, 0x8ae2,
+  0x8af2, 0x8af4, 0x8af5, 0x8add, 0x8b14, 0x8ae4, 0x8adf, 0x8af0,
+  0x8ac8, 0x8ade, 0x8ae1, 0x8ae8, 0x8aff, 0x8aef, 0x8afb, 0x8c91,
+  0x8c92, 0x8c90, 0x8cf5, 0x8cee, 0x8cf1, 0x8cf0, 0x8cf3, 0x8d6c,
+  0x8d6e, 0x8da5, 0x8da7, 0x8e33, 0x8e3e, 0x8e38, 0x8e40, 0x8e45,
+  0x8e36, 0x8e3c, 0x8e3d, 0x8e41, 0x8e30, 0x8e3f, 0x8ebd, 0x8f36,
+  0x8f2e, 0x8f35, 0x8f32, 0x8f39, 0x8f37, 0x8f34, 0x9076, 0x9079,
+  0x907b, 0x9086, 0x90fa, 0x9133, 0x9135, 0x9136, 0x9193, 0x9190,
+  0x9191, 0x918d, 0x918f, 0x9327, 0x931e, 0x9308, 0x931f, 0x9306,
+  0x930f, 0x937a, 0x9338, 0x933c, 0x931b, 0x9323, 0x9312, 0x9301,
+  0x9346, 0x932d, 0x930e, 0x930d, 0x92cb, 0x931d, 0x92fa, 0x9325,
+  0x9313, 0x92f9, 0x92f7, 0x9334, 0x9302, 0x9324, 0x92ff, 0x9329,
+  0x9339, 0x9335, 0x932a, 0x9314, 0x930c,
+  /* 0xec */
+  0x930b, 0x92fe, 0x9309, 0x9300, 0x92fb, 0x9316, 0x95bc, 0x95cd,
+  0x95be, 0x95b9, 0x95ba, 0x95b6, 0x95bf, 0x95b5, 0x95bd, 0x96a9,
+  0x96d4, 0x970b, 0x9712, 0x9710, 0x9799, 0x9797, 0x9794, 0x97f0,
+  0x97f8, 0x9835, 0x982f, 0x9832, 0x9924, 0x991f, 0x9927, 0x9929,
+  0x999e, 0x99ee, 0x99ec, 0x99e5, 0x99e4, 0x99f0, 0x99e3, 0x99ea,
+  0x99e9, 0x99e7, 0x9ab9, 0x9abf, 0x9ab4, 0x9abb, 0x9af6, 0x9afa,
+  0x9af9, 0x9af7, 0x9b33, 0x9b80, 0x9b85, 0x9b87, 0x9b7c, 0x9b7e,
+  0x9b7b, 0x9b82, 0x9b93, 0x9b92, 0x9b90, 0x9b7a, 0x9b95, 0x9b7d,
+  0x9b88, 0x9d25, 0x9d17, 0x9d20, 0x9d1e, 0x9d14, 0x9d29, 0x9d1d,
+  0x9d18, 0x9d22, 0x9d10, 0x9d19, 0x9d1f, 0x9e88, 0x9e86, 0x9e87,
+  0x9eae, 0x9ead, 0x9ed5, 0x9ed6, 0x9efa, 0x9f12, 0x9f3d, 0x5126,
+  0x5125, 0x5122, 0x5124, 0x5120, 0x5129, 0x52f4, 0x5693, 0x568c,
+  0x568d, 0x5686, 0x5684, 0x5683, 0x567e, 0x5682, 0x567f, 0x5681,
+  0x58d6, 0x58d4, 0x58cf, 0x58d2, 0x5b2d, 0x5b25, 0x5b32, 0x5b23,
+  0x5b2c, 0x5b27, 0x5b26, 0x5b2f, 0x5b2e, 0x5b7b, 0x5bf1, 0x5bf2,
+  0x5db7, 0x5e6c, 0x5e6a, 0x5fbe, 0x5fbb, 0x61c3, 0x61b5, 0x61bc,
+  0x61e7, 0x61e0, 0x61e5, 0x61e4, 0x61e8, 0x61de, 0x64ef, 0x64e9,
+  0x64e3, 0x64eb, 0x64e4, 0x64e8, 0x6581, 0x6580, 0x65b6, 0x65da,
+  0x66d2, 0x6a8d, 0x6a96, 0x6a81, 0x6aa5, 0x6a89, 0x6a9f, 0x6a9b,
+  0x6aa1, 0x6a9e, 0x6a87, 0x6a93, 0x6a8e,
+  /* 0xed */
+  0x6a95, 0x6a83, 0x6aa8, 0x6aa4, 0x6a91, 0x6a7f, 0x6aa6, 0x6a9a,
+  0x6a85, 0x6a8c, 0x6a92, 0x6b5b, 0x6bad, 0x6c09, 0x6fcc, 0x6fa9,
+  0x6ff4, 0x6fd4, 0x6fe3, 0x6fdc, 0x6fed, 0x6fe7, 0x6fe6, 0x6fde,
+  0x6ff2, 0x6fdd, 0x6fe2, 0x6fe8, 0x71e1, 0x71f1, 0x71e8, 0x71f2,
+  0x71e4, 0x71f0, 0x71e2, 0x7373, 0x736e, 0x736f, 0x7497, 0x74b2,
+  0x74ab, 0x7490, 0x74aa, 0x74ad, 0x74b1, 0x74a5, 0x74af, 0x7510,
+  0x7511, 0x7512, 0x750f, 0x7584, 0x7643, 0x7648, 0x7649, 0x7647,
+  0x76a4, 0x76e9, 0x77b5, 0x77ab, 0x77b2, 0x77b7, 0x77b6, 0x77b4,
+  0x77b1, 0x77a8, 0x77f0, 0x78f3, 0x78fd, 0x7902, 0x78fb, 0x78fc,
+  0x78f2, 0x7905, 0x78f9, 0x78fe, 0x7904, 0x79ab, 0x79a8, 0x7a5c,
+  0x7a5b, 0x7a56, 0x7a58, 0x7a54, 0x7a5a, 0x7abe, 0x7ac0, 0x7ac1,
+  0x7c05, 0x7c0f, 0x7bf2, 0x7c00, 0x7bff, 0x7bfb, 0x7c0e, 0x7bf4,
+  0x7c0b, 0x7bf3, 0x7c02, 0x7c09, 0x7c03, 0x7c01, 0x7bf8, 0x7bfd,
+  0x7c06, 0x7bf0, 0x7bf1, 0x7c10, 0x7c0a, 0x7ce8, 0x7e2d, 0x7e3c,
+  0x7e42, 0x7e33, 0x9848, 0x7e38, 0x7e2a, 0x7e49, 0x7e40, 0x7e47,
+  0x7e29, 0x7e4c, 0x7e30, 0x7e3b, 0x7e36, 0x7e44, 0x7e3a, 0x7f45,
+  0x7f7f, 0x7f7e, 0x7f7d, 0x7ff4, 0x7ff2, 0x802c, 0x81bb, 0x81c4,
+  0x81cc, 0x81ca, 0x81c5, 0x81c7, 0x81bc, 0x81e9, 0x825b, 0x825a,
+  0x825c, 0x8583, 0x8580, 0x858f, 0x85a7, 0x8595, 0x85a0, 0x858b,
+  0x85a3, 0x857b, 0x85a4, 0x859a, 0x859e,
+  /* 0xee */
+  0x8577, 0x857c, 0x8589, 0x85a1, 0x857a, 0x8578, 0x8557, 0x858e,
+  0x8596, 0x8586, 0x858d, 0x8599, 0x859d, 0x8581, 0x85a2, 0x8582,
+  0x8588, 0x8585, 0x8579, 0x8576, 0x8598, 0x8590, 0x859f, 0x8668,
+  0x87be, 0x87aa, 0x87ad, 0x87c5, 0x87b0, 0x87ac, 0x87b9, 0x87b5,
+  0x87bc, 0x87ae, 0x87c9, 0x87c3, 0x87c2, 0x87cc, 0x87b7, 0x87af,
+  0x87c4, 0x87ca, 0x87b4, 0x87b6, 0x87bf, 0x87b8, 0x87bd, 0x87de,
+  0x87b2, 0x8935, 0x8933, 0x893c, 0x893e, 0x8941, 0x8952, 0x8937,
+  0x8942, 0x89ad, 0x89af, 0x89ae, 0x89f2, 0x89f3, 0x8b1e, 0x8b18,
+  0x8b16, 0x8b11, 0x8b05, 0x8b0b, 0x8b22, 0x8b0f, 0x8b12, 0x8b15,
+  0x8b07, 0x8b0d, 0x8b08, 0x8b06, 0x8b1c, 0x8b13, 0x8b1a, 0x8c4f,
+  0x8c70, 0x8c72, 0x8c71, 0x8c6f, 0x8c95, 0x8c94, 0x8cf9, 0x8d6f,
+  0x8e4e, 0x8e4d, 0x8e53, 0x8e50, 0x8e4c, 0x8e47, 0x8f43, 0x8f40,
+  0x9085, 0x907e, 0x9138, 0x919a, 0x91a2, 0x919b, 0x9199, 0x919f,
+  0x91a1, 0x919d, 0x91a0, 0x93a1, 0x9383, 0x93af, 0x9364, 0x9356,
+  0x9347, 0x937c, 0x9358, 0x935c, 0x9376, 0x9349, 0x9350, 0x9351,
+  0x9360, 0x936d, 0x938f, 0x934c, 0x936a, 0x9379, 0x9357, 0x9355,
+  0x9352, 0x934f, 0x9371, 0x9377, 0x937b, 0x9361, 0x935e, 0x9363,
+  0x9367, 0x9380, 0x934e, 0x9359, 0x95c7, 0x95c0, 0x95c9, 0x95c3,
+  0x95c5, 0x95b7, 0x96ae, 0x96b0, 0x96ac, 0x9720, 0x971f, 0x9718,
+  0x971d, 0x9719, 0x979a, 0x97a1, 0x979c,
+  /* 0xef */
+  0x979e, 0x979d, 0x97d5, 0x97d4, 0x97f1, 0x9841, 0x9844, 0x984a,
+  0x9849, 0x9845, 0x9843, 0x9925, 0x992b, 0x992c, 0x992a, 0x9933,
+  0x9932, 0x992f, 0x992d, 0x9931, 0x9930, 0x9998, 0x99a3, 0x99a1,
+  0x9a02, 0x99fa, 0x99f4, 0x99f7, 0x99f9, 0x99f8, 0x99f6, 0x99fb,
+  0x99fd, 0x99fe, 0x99fc, 0x9a03, 0x9abe, 0x9afe, 0x9afd, 0x9b01,
+  0x9afc, 0x9b48, 0x9b9a, 0x9ba8, 0x9b9e, 0x9b9b, 0x9ba6, 0x9ba1,
+  0x9ba5, 0x9ba4, 0x9b86, 0x9ba2, 0x9ba0, 0x9baf, 0x9d33, 0x9d41,
+  0x9d67, 0x9d36, 0x9d2e, 0x9d2f, 0x9d31, 0x9d38, 0x9d30, 0x9d45,
+  0x9d42, 0x9d43, 0x9d3e, 0x9d37, 0x9d40, 0x9d3d, 0x7ff5, 0x9d2d,
+  0x9e8a, 0x9e89, 0x9e8d, 0x9eb0, 0x9ec8, 0x9eda, 0x9efb, 0x9eff,
+  0x9f24, 0x9f23, 0x9f22, 0x9f54, 0x9fa0, 0x5131, 0x512d, 0x512e,
+  0x5698, 0x569c, 0x5697, 0x569a, 0x569d, 0x5699, 0x5970, 0x5b3c,
+  0x5c69, 0x5c6a, 0x5dc0, 0x5e6d, 0x5e6e, 0x61d8, 0x61df, 0x61ed,
+  0x61ee, 0x61f1, 0x61ea, 0x61f0, 0x61eb, 0x61d6, 0x61e9, 0x64ff,
+  0x6504, 0x64fd, 0x64f8, 0x6501, 0x6503, 0x64fc, 0x6594, 0x65db,
+  0x66da, 0x66db, 0x66d8, 0x6ac5, 0x6ab9, 0x6abd, 0x6ae1, 0x6ac6,
+  0x6aba, 0x6ab6, 0x6ab7, 0x6ac7, 0x6ab4, 0x6aad, 0x6b5e, 0x6bc9,
+  0x6c0b, 0x7007, 0x700c, 0x700d, 0x7001, 0x7005, 0x7014, 0x700e,
+  0x6fff, 0x7000, 0x6ffb, 0x7026, 0x6ffc, 0x6ff7, 0x700a, 0x7201,
+  0x71ff, 0x71f9, 0x7203, 0x71fd, 0x7376,
+  /* 0xf0 */
+  0x74b8, 0x74c0, 0x74b5, 0x74c1, 0x74be, 0x74b6, 0x74bb, 0x74c2,
+  0x7514, 0x7513, 0x765c, 0x7664, 0x7659, 0x7650, 0x7653, 0x7657,
+  0x765a, 0x76a6, 0x76bd, 0x76ec, 0x77c2, 0x77ba, 0x78ff, 0x790c,
+  0x7913, 0x7914, 0x7909, 0x7910, 0x7912, 0x7911, 0x79ad, 0x79ac,
+  0x7a5f, 0x7c1c, 0x7c29, 0x7c19, 0x7c20, 0x7c1f, 0x7c2d, 0x7c1d,
+  0x7c26, 0x7c28, 0x7c22, 0x7c25, 0x7c30, 0x7e5c, 0x7e50, 0x7e56,
+  0x7e63, 0x7e58, 0x7e62, 0x7e5f, 0x7e51, 0x7e60, 0x7e57, 0x7e53,
+  0x7fb5, 0x7fb3, 0x7ff7, 0x7ff8, 0x8075, 0x81d1, 0x81d2, 0x81d0,
+  0x825f, 0x825e, 0x85b4, 0x85c6, 0x85c0, 0x85c3, 0x85c2, 0x85b3,
+  0x85b5, 0x85bd, 0x85c7, 0x85c4, 0x85bf, 0x85cb, 0x85ce, 0x85c8,
+  0x85c5, 0x85b1, 0x85b6, 0x85d2, 0x8624, 0x85b8, 0x85b7, 0x85be,
+  0x8669, 0x87e7, 0x87e6, 0x87e2, 0x87db, 0x87eb, 0x87ea, 0x87e5,
+  0x87df, 0x87f3, 0x87e4, 0x87d4, 0x87dc, 0x87d3, 0x87ed, 0x87d8,
+  0x87e3, 0x87a4, 0x87d7, 0x87d9, 0x8801, 0x87f4, 0x87e8, 0x87dd,
+  0x8953, 0x894b, 0x894f, 0x894c, 0x8946, 0x8950, 0x8951, 0x8949,
+  0x8b2a, 0x8b27, 0x8b23, 0x8b33, 0x8b30, 0x8b35, 0x8b47, 0x8b2f,
+  0x8b3c, 0x8b3e, 0x8b31, 0x8b25, 0x8b37, 0x8b26, 0x8b36, 0x8b2e,
+  0x8b24, 0x8b3b, 0x8b3d, 0x8b3a, 0x8c42, 0x8c75, 0x8c99, 0x8c98,
+  0x8c97, 0x8cfe, 0x8d04, 0x8d02, 0x8d00, 0x8e5c, 0x8e62, 0x8e60,
+  0x8e57, 0x8e56, 0x8e5e, 0x8e65, 0x8e67,
+  /* 0xf1 */
+  0x8e5b, 0x8e5a, 0x8e61, 0x8e5d, 0x8e69, 0x8e54, 0x8f46, 0x8f47,
+  0x8f48, 0x8f4b, 0x9128, 0x913a, 0x913b, 0x913e, 0x91a8, 0x91a5,
+  0x91a7, 0x91af, 0x91aa, 0x93b5, 0x938c, 0x9392, 0x93b7, 0x939b,
+  0x939d, 0x9389, 0x93a7, 0x938e, 0x93aa, 0x939e, 0x93a6, 0x9395,
+  0x9388, 0x9399, 0x939f, 0x938d, 0x93b1, 0x9391, 0x93b2, 0x93a4,
+  0x93a8, 0x93b4, 0x93a3, 0x93a5, 0x95d2, 0x95d3, 0x95d1, 0x96b3,
+  0x96d7, 0x96da, 0x5dc2, 0x96df, 0x96d8, 0x96dd, 0x9723, 0x9722,
+  0x9725, 0x97ac, 0x97ae, 0x97a8, 0x97ab, 0x97a4, 0x97aa, 0x97a2,
+  0x97a5, 0x97d7, 0x97d9, 0x97d6, 0x97d8, 0x97fa, 0x9850, 0x9851,
+  0x9852, 0x98b8, 0x9941, 0x993c, 0x993a, 0x9a0f, 0x9a0b, 0x9a09,
+  0x9a0d, 0x9a04, 0x9a11, 0x9a0a, 0x9a05, 0x9a07, 0x9a06, 0x9ac0,
+  0x9adc, 0x9b08, 0x9b04, 0x9b05, 0x9b29, 0x9b35, 0x9b4a, 0x9b4c,
+  0x9b4b, 0x9bc7, 0x9bc6, 0x9bc3, 0x9bbf, 0x9bc1, 0x9bb5, 0x9bb8,
+  0x9bd3, 0x9bb6, 0x9bc4, 0x9bb9, 0x9bbd, 0x9d5c, 0x9d53, 0x9d4f,
+  0x9d4a, 0x9d5b, 0x9d4b, 0x9d59, 0x9d56, 0x9d4c, 0x9d57, 0x9d52,
+  0x9d54, 0x9d5f, 0x9d58, 0x9d5a, 0x9e8e, 0x9e8c, 0x9edf, 0x9f01,
+  0x9f00, 0x9f16, 0x9f25, 0x9f2b, 0x9f2a, 0x9f29, 0x9f28, 0x9f4c,
+  0x9f55, 0x5134, 0x5135, 0x5296, 0x52f7, 0x53b4, 0x56ab, 0x56ad,
+  0x56a6, 0x56a7, 0x56aa, 0x56ac, 0x58da, 0x58dd, 0x58db, 0x5912,
+  0x5b3d, 0x5b3e, 0x5b3f, 0x5dc3, 0x5e70,
+  /* 0xf2 */
+  0x5fbf, 0x61fb, 0x6507, 0x6510, 0x650d, 0x6509, 0x650c, 0x650e,
+  0x6584, 0x65de, 0x65dd, 0x66de, 0x6ae7, 0x6ae0, 0x6acc, 0x6ad1,
+  0x6ad9, 0x6acb, 0x6adf, 0x6adc, 0x6ad0, 0x6aeb, 0x6acf, 0x6acd,
+  0x6ade, 0x6b60, 0x6bb0, 0x6c0c, 0x7019, 0x7027, 0x7020, 0x7016,
+  0x702b, 0x7021, 0x7022, 0x7023, 0x7029, 0x7017, 0x7024, 0x701c,
+  0x702a, 0x720c, 0x720a, 0x7207, 0x7202, 0x7205, 0x72a5, 0x72a6,
+  0x72a4, 0x72a3, 0x72a1, 0x74cb, 0x74c5, 0x74b7, 0x74c3, 0x7516,
+  0x7660, 0x77c9, 0x77ca, 0x77c4, 0x77f1, 0x791d, 0x791b, 0x7921,
+  0x791c, 0x7917, 0x791e, 0x79b0, 0x7a67, 0x7a68, 0x7c33, 0x7c3c,
+  0x7c39, 0x7c2c, 0x7c3b, 0x7cec, 0x7cea, 0x7e76, 0x7e75, 0x7e78,
+  0x7e70, 0x7e77, 0x7e6f, 0x7e7a, 0x7e72, 0x7e74, 0x7e68, 0x7f4b,
+  0x7f4a, 0x7f83, 0x7f86, 0x7fb7, 0x7ffd, 0x7ffe, 0x8078, 0x81d7,
+  0x81d5, 0x8264, 0x8261, 0x8263, 0x85eb, 0x85f1, 0x85ed, 0x85d9,
+  0x85e1, 0x85e8, 0x85da, 0x85d7, 0x85ec, 0x85f2, 0x85f8, 0x85d8,
+  0x85df, 0x85e3, 0x85dc, 0x85d1, 0x85f0, 0x85e6, 0x85ef, 0x85de,
+  0x85e2, 0x8800, 0x87fa, 0x8803, 0x87f6, 0x87f7, 0x8809, 0x880c,
+  0x880b, 0x8806, 0x87fc, 0x8808, 0x87ff, 0x880a, 0x8802, 0x8962,
+  0x895a, 0x895b, 0x8957, 0x8961, 0x895c, 0x8958, 0x895d, 0x8959,
+  0x8988, 0x89b7, 0x89b6, 0x89f6, 0x8b50, 0x8b48, 0x8b4a, 0x8b40,
+  0x8b53, 0x8b56, 0x8b54, 0x8b4b, 0x8b55,
+  /* 0xf3 */
+  0x8b51, 0x8b42, 0x8b52, 0x8b57, 0x8c43, 0x8c77, 0x8c76, 0x8c9a,
+  0x8d06, 0x8d07, 0x8d09, 0x8dac, 0x8daa, 0x8dad, 0x8dab, 0x8e6d,
+  0x8e78, 0x8e73, 0x8e6a, 0x8e6f, 0x8e7b, 0x8ec2, 0x8f52, 0x8f51,
+  0x8f4f, 0x8f50, 0x8f53, 0x8fb4, 0x9140, 0x913f, 0x91b0, 0x91ad,
+  0x93de, 0x93c7, 0x93cf, 0x93c2, 0x93da, 0x93d0, 0x93f9, 0x93ec,
+  0x93cc, 0x93d9, 0x93a9, 0x93e6, 0x93ca, 0x93d4, 0x93ee, 0x93e3,
+  0x93d5, 0x93c4, 0x93ce, 0x93c0, 0x93d2, 0x93e7, 0x957d, 0x95da,
+  0x95db, 0x96e1, 0x9729, 0x972b, 0x972c, 0x9728, 0x9726, 0x97b3,
+  0x97b7, 0x97b6, 0x97dd, 0x97de, 0x97df, 0x985c, 0x9859, 0x985d,
+  0x9857, 0x98bf, 0x98bd, 0x98bb, 0x98be, 0x9948, 0x9947, 0x9943,
+  0x99a6, 0x99a7, 0x9a1a, 0x9a15, 0x9a25, 0x9a1d, 0x9a24, 0x9a1b,
+  0x9a22, 0x9a20, 0x9a27, 0x9a23, 0x9a1e, 0x9a1c, 0x9a14, 0x9ac2,
+  0x9b0b, 0x9b0a, 0x9b0e, 0x9b0c, 0x9b37, 0x9bea, 0x9beb, 0x9be0,
+  0x9bde, 0x9be4, 0x9be6, 0x9be2, 0x9bf0, 0x9bd4, 0x9bd7, 0x9bec,
+  0x9bdc, 0x9bd9, 0x9be5, 0x9bd5, 0x9be1, 0x9bda, 0x9d77, 0x9d81,
+  0x9d8a, 0x9d84, 0x9d88, 0x9d71, 0x9d80, 0x9d78, 0x9d86, 0x9d8b,
+  0x9d8c, 0x9d7d, 0x9d6b, 0x9d74, 0x9d75, 0x9d70, 0x9d69, 0x9d85,
+  0x9d73, 0x9d7b, 0x9d82, 0x9d6f, 0x9d79, 0x9d7f, 0x9d87, 0x9d68,
+  0x9e94, 0x9e91, 0x9ec0, 0x9efc, 0x9f2d, 0x9f40, 0x9f41, 0x9f4d,
+  0x9f56, 0x9f57, 0x9f58, 0x5337, 0x56b2,
+  /* 0xf4 */
+  0x56b5, 0x56b3, 0x58e3, 0x5b45, 0x5dc6, 0x5dc7, 0x5eee, 0x5eef,
+  0x5fc0, 0x5fc1, 0x61f9, 0x6517, 0x6516, 0x6515, 0x6513, 0x65df,
+  0x66e8, 0x66e3, 0x66e4, 0x6af3, 0x6af0, 0x6aea, 0x6ae8, 0x6af9,
+  0x6af1, 0x6aee, 0x6aef, 0x703c, 0x7035, 0x702f, 0x7037, 0x7034,
+  0x7031, 0x7042, 0x7038, 0x703f, 0x703a, 0x7039, 0x7040, 0x703b,
+  0x7033, 0x7041, 0x7213, 0x7214, 0x72a8, 0x737d, 0x737c, 0x74ba,
+  0x76ab, 0x76aa, 0x76be, 0x76ed, 0x77cc, 0x77ce, 0x77cf, 0x77cd,
+  0x77f2, 0x7925, 0x7923, 0x7927, 0x7928, 0x7924, 0x7929, 0x79b2,
+  0x7a6e, 0x7a6c, 0x7a6d, 0x7af7, 0x7c49, 0x7c48, 0x7c4a, 0x7c47,
+  0x7c45, 0x7cee, 0x7e7b, 0x7e7e, 0x7e81, 0x7e80, 0x7fba, 0x7fff,
+  0x8079, 0x81db, 0x81d9, 0x820b, 0x8268, 0x8269, 0x8622, 0x85ff,
+  0x8601, 0x85fe, 0x861b, 0x8600, 0x85f6, 0x8604, 0x8609, 0x8605,
+  0x860c, 0x85fd, 0x8819, 0x8810, 0x8811, 0x8817, 0x8813, 0x8816,
+  0x8963, 0x8966, 0x89b9, 0x89f7, 0x8b60, 0x8b6a, 0x8b5d, 0x8b68,
+  0x8b63, 0x8b65, 0x8b67, 0x8b6d, 0x8dae, 0x8e86, 0x8e88, 0x8e84,
+  0x8f59, 0x8f56, 0x8f57, 0x8f55, 0x8f58, 0x8f5a, 0x908d, 0x9143,
+  0x9141, 0x91b7, 0x91b5, 0x91b2, 0x91b3, 0x940b, 0x9413, 0x93fb,
+  0x9420, 0x940f, 0x9414, 0x93fe, 0x9415, 0x9410, 0x9428, 0x9419,
+  0x940d, 0x93f5, 0x9400, 0x93f7, 0x9407, 0x940e, 0x9416, 0x9412,
+  0x93fa, 0x9409, 0x93f8, 0x940a, 0x93ff,
+  /* 0xf5 */
+  0x93fc, 0x940c, 0x93f6, 0x9411, 0x9406, 0x95de, 0x95e0, 0x95df,
+  0x972e, 0x972f, 0x97b9, 0x97bb, 0x97fd, 0x97fe, 0x9860, 0x9862,
+  0x9863, 0x985f, 0x98c1, 0x98c2, 0x9950, 0x994e, 0x9959, 0x994c,
+  0x994b, 0x9953, 0x9a32, 0x9a34, 0x9a31, 0x9a2c, 0x9a2a, 0x9a36,
+  0x9a29, 0x9a2e, 0x9a38, 0x9a2d, 0x9ac7, 0x9aca, 0x9ac6, 0x9b10,
+  0x9b12, 0x9b11, 0x9c0b, 0x9c08, 0x9bf7, 0x9c05, 0x9c12, 0x9bf8,
+  0x9c40, 0x9c07, 0x9c0e, 0x9c06, 0x9c17, 0x9c14, 0x9c09, 0x9d9f,
+  0x9d99, 0x9da4, 0x9d9d, 0x9d92, 0x9d98, 0x9d90, 0x9d9b, 0x9da0,
+  0x9d94, 0x9d9c, 0x9daa, 0x9d97, 0x9da1, 0x9d9a, 0x9da2, 0x9da8,
+  0x9d9e, 0x9da3, 0x9dbf, 0x9da9, 0x9d96, 0x9da6, 0x9da7, 0x9e99,
+  0x9e9b, 0x9e9a, 0x9ee5, 0x9ee4, 0x9ee7, 0x9ee6, 0x9f30, 0x9f2e,
+  0x9f5b, 0x9f60, 0x9f5e, 0x9f5d, 0x9f59, 0x9f91, 0x513a, 0x5139,
+  0x5298, 0x5297, 0x56c3, 0x56bd, 0x56be, 0x5b48, 0x5b47, 0x5dcb,
+  0x5dcf, 0x5ef1, 0x61fd, 0x651b, 0x6b02, 0x6afc, 0x6b03, 0x6af8,
+  0x6b00, 0x7043, 0x7044, 0x704a, 0x7048, 0x7049, 0x7045, 0x7046,
+  0x721d, 0x721a, 0x7219, 0x737e, 0x7517, 0x766a, 0x77d0, 0x792d,
+  0x7931, 0x792f, 0x7c54, 0x7c53, 0x7cf2, 0x7e8a, 0x7e87, 0x7e88,
+  0x7e8b, 0x7e86, 0x7e8d, 0x7f4d, 0x7fbb, 0x8030, 0x81dd, 0x8618,
+  0x862a, 0x8626, 0x861f, 0x8623, 0x861c, 0x8619, 0x8627, 0x862e,
+  0x8621, 0x8620, 0x8629, 0x861e, 0x8625,
+  /* 0xf6 */
+  0x8829, 0x881d, 0x881b, 0x8820, 0x8824, 0x881c, 0x882b, 0x884a,
+  0x896d, 0x8969, 0x896e, 0x896b, 0x89fa, 0x8b79, 0x8b78, 0x8b45,
+  0x8b7a, 0x8b7b, 0x8d10, 0x8d14, 0x8daf, 0x8e8e, 0x8e8c, 0x8f5e,
+  0x8f5b, 0x8f5d, 0x9146, 0x9144, 0x9145, 0x91b9, 0x943f, 0x943b,
+  0x9436, 0x9429, 0x943d, 0x943c, 0x9430, 0x9439, 0x942a, 0x9437,
+  0x942c, 0x9440, 0x9431, 0x95e5, 0x95e4, 0x95e3, 0x9735, 0x973a,
+  0x97bf, 0x97e1, 0x9864, 0x98c9, 0x98c6, 0x98c0, 0x9958, 0x9956,
+  0x9a39, 0x9a3d, 0x9a46, 0x9a44, 0x9a42, 0x9a41, 0x9a3a, 0x9a3f,
+  0x9acd, 0x9b15, 0x9b17, 0x9b18, 0x9b16, 0x9b3a, 0x9b52, 0x9c2b,
+  0x9c1d, 0x9c1c, 0x9c2c, 0x9c23, 0x9c28, 0x9c29, 0x9c24, 0x9c21,
+  0x9db7, 0x9db6, 0x9dbc, 0x9dc1, 0x9dc7, 0x9dca, 0x9dcf, 0x9dbe,
+  0x9dc5, 0x9dc3, 0x9dbb, 0x9db5, 0x9dce, 0x9db9, 0x9dba, 0x9dac,
+  0x9dc8, 0x9db1, 0x9dad, 0x9dcc, 0x9db3, 0x9dcd, 0x9db2, 0x9e7a,
+  0x9e9c, 0x9eeb, 0x9eee, 0x9eed, 0x9f1b, 0x9f18, 0x9f1a, 0x9f31,
+  0x9f4e, 0x9f65, 0x9f64, 0x9f92, 0x4eb9, 0x56c6, 0x56c5, 0x56cb,
+  0x5971, 0x5b4b, 0x5b4c, 0x5dd5, 0x5dd1, 0x5ef2, 0x6521, 0x6520,
+  0x6526, 0x6522, 0x6b0b, 0x6b08, 0x6b09, 0x6c0d, 0x7055, 0x7056,
+  0x7057, 0x7052, 0x721e, 0x721f, 0x72a9, 0x737f, 0x74d8, 0x74d5,
+  0x74d9, 0x74d7, 0x766d, 0x76ad, 0x7935, 0x79b4, 0x7a70, 0x7a71,
+  0x7c57, 0x7c5c, 0x7c59, 0x7c5b, 0x7c5a,
+  /* 0xf7 */
+  0x7cf4, 0x7cf1, 0x7e91, 0x7f4f, 0x7f87, 0x81de, 0x826b, 0x8634,
+  0x8635, 0x8633, 0x862c, 0x8632, 0x8636, 0x882c, 0x8828, 0x8826,
+  0x882a, 0x8825, 0x8971, 0x89bf, 0x89be, 0x89fb, 0x8b7e, 0x8b84,
+  0x8b82, 0x8b86, 0x8b85, 0x8b7f, 0x8d15, 0x8e95, 0x8e94, 0x8e9a,
+  0x8e92, 0x8e90, 0x8e96, 0x8e97, 0x8f60, 0x8f62, 0x9147, 0x944c,
+  0x9450, 0x944a, 0x944b, 0x944f, 0x9447, 0x9445, 0x9448, 0x9449,
+  0x9446, 0x973f, 0x97e3, 0x986a, 0x9869, 0x98cb, 0x9954, 0x995b,
+  0x9a4e, 0x9a53, 0x9a54, 0x9a4c, 0x9a4f, 0x9a48, 0x9a4a, 0x9a49,
+  0x9a52, 0x9a50, 0x9ad0, 0x9b19, 0x9b2b, 0x9b3b, 0x9b56, 0x9b55,
+  0x9c46, 0x9c48, 0x9c3f, 0x9c44, 0x9c39, 0x9c33, 0x9c41, 0x9c3c,
+  0x9c37, 0x9c34, 0x9c32, 0x9c3d, 0x9c36, 0x9ddb, 0x9dd2, 0x9dde,
+  0x9dda, 0x9dcb, 0x9dd0, 0x9ddc, 0x9dd1, 0x9ddf, 0x9de9, 0x9dd9,
+  0x9dd8, 0x9dd6, 0x9df5, 0x9dd5, 0x9ddd, 0x9eb6, 0x9ef0, 0x9f35,
+  0x9f33, 0x9f32, 0x9f42, 0x9f6b, 0x9f95, 0x9fa2, 0x513d, 0x5299,
+  0x58e8, 0x58e7, 0x5972, 0x5b4d, 0x5dd8, 0x882f, 0x5f4f, 0x6201,
+  0x6203, 0x6204, 0x6529, 0x6525, 0x6596, 0x66eb, 0x6b11, 0x6b12,
+  0x6b0f, 0x6bca, 0x705b, 0x705a, 0x7222, 0x7382, 0x7381, 0x7383,
+  0x7670, 0x77d4, 0x7c67, 0x7c66, 0x7e95, 0x826c, 0x863a, 0x8640,
+  0x8639, 0x863c, 0x8631, 0x863b, 0x863e, 0x8830, 0x8832, 0x882e,
+  0x8833, 0x8976, 0x8974, 0x8973, 0x89fe,
+  /* 0xf8 */
+  0x8b8c, 0x8b8e, 0x8b8b, 0x8b88, 0x8c45, 0x8d19, 0x8e98, 0x8f64,
+  0x8f63, 0x91bc, 0x9462, 0x9455, 0x945d, 0x9457, 0x945e, 0x97c4,
+  0x97c5, 0x9800, 0x9a56, 0x9a59, 0x9b1e, 0x9b1f, 0x9b20, 0x9c52,
+  0x9c58, 0x9c50, 0x9c4a, 0x9c4d, 0x9c4b, 0x9c55, 0x9c59, 0x9c4c,
+  0x9c4e, 0x9dfb, 0x9df7, 0x9def, 0x9de3, 0x9deb, 0x9df8, 0x9de4,
+  0x9df6, 0x9de1, 0x9dee, 0x9de6, 0x9df2, 0x9df0, 0x9de2, 0x9dec,
+  0x9df4, 0x9df3, 0x9de8, 0x9ded, 0x9ec2, 0x9ed0, 0x9ef2, 0x9ef3,
+  0x9f06, 0x9f1c, 0x9f38, 0x9f37, 0x9f36, 0x9f43, 0x9f4f, 0x9f71,
+  0x9f70, 0x9f6e, 0x9f6f, 0x56d3, 0x56cd, 0x5b4e, 0x5c6d, 0x652d,
+  0x66ed, 0x66ee, 0x6b13, 0x705f, 0x7061, 0x705d, 0x7060, 0x7223,
+  0x74db, 0x74e5, 0x77d5, 0x7938, 0x79b7, 0x79b6, 0x7c6a, 0x7e97,
+  0x7f89, 0x826d, 0x8643, 0x8838, 0x8837, 0x8835, 0x884b, 0x8b94,
+  0x8b95, 0x8e9e, 0x8e9f, 0x8ea0, 0x8e9d, 0x91be, 0x91bd, 0x91c2,
+  0x946b, 0x9468, 0x9469, 0x96e5, 0x9746, 0x9743, 0x9747, 0x97c7,
+  0x97e5, 0x9a5e, 0x9ad5, 0x9b59, 0x9c63, 0x9c67, 0x9c66, 0x9c62,
+  0x9c5e, 0x9c60, 0x9e02, 0x9dfe, 0x9e07, 0x9e03, 0x9e06, 0x9e05,
+  0x9e00, 0x9e01, 0x9e09, 0x9dff, 0x9dfd, 0x9e04, 0x9ea0, 0x9f1e,
+  0x9f46, 0x9f74, 0x9f75, 0x9f76, 0x56d4, 0x652e, 0x65b8, 0x6b18,
+  0x6b19, 0x6b17, 0x6b1a, 0x7062, 0x7226, 0x72aa, 0x77d8, 0x77d9,
+  0x7939, 0x7c69, 0x7c6b, 0x7cf6, 0x7e9a,
+  /* 0xf9 */
+  0x7e98, 0x7e9b, 0x7e99, 0x81e0, 0x81e1, 0x8646, 0x8647, 0x8648,
+  0x8979, 0x897a, 0x897c, 0x897b, 0x89ff, 0x8b98, 0x8b99, 0x8ea5,
+  0x8ea4, 0x8ea3, 0x946e, 0x946d, 0x946f, 0x9471, 0x9473, 0x9749,
+  0x9872, 0x995f, 0x9c68, 0x9c6e, 0x9c6d, 0x9e0b, 0x9e0d, 0x9e10,
+  0x9e0f, 0x9e12, 0x9e11, 0x9ea1, 0x9ef5, 0x9f09, 0x9f47, 0x9f78,
+  0x9f7b, 0x9f7a, 0x9f79, 0x571e, 0x7066, 0x7c6f, 0x883c, 0x8db2,
+  0x8ea6, 0x91c3, 0x9474, 0x9478, 0x9476, 0x9475, 0x9a60, 0x9c74,
+  0x9c73, 0x9c71, 0x9c75, 0x9e14, 0x9e13, 0x9ef6, 0x9f0a, 0x9fa4,
+  0x7068, 0x7065, 0x7cf7, 0x866a, 0x883e, 0x883d, 0x883f, 0x8b9e,
+  0x8c9c, 0x8ea9, 0x8ec9, 0x974b, 0x9873, 0x9874, 0x98cc, 0x9961,
+  0x99ab, 0x9a64, 0x9a66, 0x9a67, 0x9b24, 0x9e15, 0x9e17, 0x9f48,
+  0x6207, 0x6b1e, 0x7227, 0x864c, 0x8ea8, 0x9482, 0x9480, 0x9481,
+  0x9a69, 0x9a68, 0x9b2e, 0x9e19, 0x7229, 0x864b, 0x8b9f, 0x9483,
+  0x9c79, 0x9eb7, 0x7675, 0x9a6b, 0x9c7a, 0x9e1d, 0x7069, 0x706a,
+  0x9ea4, 0x9f7e, 0x9f49, 0x9f98,
+};
+
+static int
+big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = s[0];
+  if ((c1 >= 0xa1 && c1 <= 0xc7) || (c1 >= 0xc9 && c1 <= 0xf9)) {
+    if (n >= 2) {
+      unsigned char c2 = s[1];
+      if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
+        unsigned int i = 157 * (c1 - 0xa1) + (c2 - (c2 >= 0xa1 ? 0x62 : 0x40));
+        unsigned short wc = 0xfffd;
+        if (i < 6280) {
+          if (i < 6121)
+            wc = big5_2uni_pagea1[i];
+        } else {
+          if (i < 13932)
+            wc = big5_2uni_pagec9[i-6280];
+        }
+        if (wc != 0xfffd) {
+          *pwc = (ucs4_t) wc;
+          return 2;
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned short big5_2charset[13703] = {
+  0xa246, 0xa247, 0xa244, 0xa1b1, 0xa258, 0xa1d3, 0xa150, 0xa1d1,
+  0xa1d2, 0xa3be, 0xa3bc, 0xa3bd, 0xa3bf, 0xa3bb, 0xa344, 0xa345,
+  0xa346, 0xa347, 0xa348, 0xa349, 0xa34a, 0xa34b, 0xa34c, 0xa34d,
+  0xa34e, 0xa34f, 0xa350, 0xa351, 0xa352, 0xa353, 0xa354, 0xa355,
+  0xa356, 0xa357, 0xa358, 0xa359, 0xa35a, 0xa35b, 0xa35c, 0xa35d,
+  0xa35e, 0xa35f, 0xa360, 0xa361, 0xa362, 0xa363, 0xa364, 0xa365,
+  0xa366, 0xa367, 0xa368, 0xa369, 0xa36a, 0xa36b, 0xa36c, 0xa36d,
+  0xa36e, 0xa36f, 0xa370, 0xa371, 0xa372, 0xa373, 0xc7b3, 0xc7b1,
+  0xc7b2, 0xc7b4, 0xc7b5, 0xc7b6, 0xc7b7, 0xc7b8, 0xc7b9, 0xc7ba,
+  0xc7bb, 0xc7bc, 0xc7bd, 0xc7be, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c2,
+  0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0xc7c8, 0xc7c9, 0xc7ca,
+  0xc7cb, 0xc7cc, 0xc7cd, 0xc7cf, 0xc7d0, 0xc7d1, 0xc7d2, 0xc7d3,
+  0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, 0xc7d8, 0xc7d9, 0xc7da, 0xc7db,
+  0xc7dc, 0xc7dd, 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2, 0xc7e3,
+  0xc7e4, 0xc7e5, 0xc7e6, 0xc7e7, 0xc7e8, 0xc7ce, 0xa156, 0xa158,
+  0xa1a5, 0xa1a6, 0xa1a7, 0xa1a8, 0xa145, 0xa14c, 0xa14b, 0xa1ac,
+  0xa1ab, 0xa1b0, 0xa1c2, 0xa24a, 0xa1c1, 0xa24b, 0xa2b9, 0xa2ba,
+  0xa2bb, 0xa2bc, 0xa2bd, 0xa2be, 0xa2bf, 0xa2c0, 0xa2c1, 0xa2c2,
+  0xa1f6, 0xa1f4, 0xa1f7, 0xa1f5, 0xa1f8, 0xa1f9, 0xa1fb, 0xa1fa,
+  0xa1d4, 0xa1db, 0xa1e8, 0xa1e7, 0xa1fd, 0xa1fc, 0xa1e4, 0xa1e5,
+  0xa1ec, 0xa1ed, 0xa1ef, 0xa1ee, 0xa1e3, 0xa1dc, 0xa1da, 0xa1dd,
+  0xa1d8, 0xa1d9, 0xa1e6, 0xa1e9, 0xc7e9, 0xc7ea, 0xc7eb, 0xc7ec,
+  0xc7ed, 0xc7ee, 0xc7ef, 0xc7f0, 0xc7f1, 0xc7f2, 0xc7f3, 0xc7f4,
+  0xc7f5, 0xc7f6, 0xc7f7, 0xc7f8, 0xc7f9, 0xc7fa, 0xc7fb, 0xc7fc,
+  0xa277, 0xa278, 0xa27a, 0xa27b, 0xa27c, 0xa27d, 0xa275, 0xa274,
+  0xa273, 0xa272, 0xa271, 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa27e,
+  0xa2a1, 0xa2a3, 0xa2a2, 0xa2ac, 0xa2ad, 0xa2ae, 0xa262, 0xa263,
+  0xa264, 0xa265, 0xa266, 0xa267, 0xa268, 0xa269, 0xa270, 0xa26f,
+  0xa26e, 0xa26d, 0xa26c, 0xa26b, 0xa26a, 0xa276, 0xa279, 0xa1bd,
+  0xa1bc, 0xa1b6, 0xa1b5, 0xa1bf, 0xa1be, 0xa1bb, 0xa1ba, 0xa1b3,
+  0xa1b7, 0xa1b4, 0xa2a8, 0xa2a9, 0xa2ab, 0xa2aa, 0xa1b9, 0xa1b8,
+  0xa1f3, 0xa1f0, 0xa1f2, 0xa1f1, 0xa140, 0xa142, 0xa143, 0xa1b2,
+  0xc6a4, 0xa171, 0xa172, 0xa16d, 0xa16e, 0xa175, 0xa176, 0xa179,
+  0xa17a, 0xa169, 0xa16a, 0xa245, 0xa165, 0xa166, 0xa1a9, 0xa1aa,
+  0xa2c3, 0xa2c4, 0xa2c5, 0xa2c6, 0xa2c7, 0xa2c8, 0xa2c9, 0xa2ca,
+  0xa2cb, 0xc6a5, 0xc6a6, 0xc6a7, 0xc6a8, 0xc6a9, 0xc6aa, 0xc6ab,
+  0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, 0xc6b0, 0xc6b1, 0xc6b2, 0xc6b3,
+  0xc6b4, 0xc6b5, 0xc6b6, 0xc6b7, 0xc6b8, 0xc6b9, 0xc6ba, 0xc6bb,
+  0xc6bc, 0xc6bd, 0xc6be, 0xc6bf, 0xc6c0, 0xc6c1, 0xc6c2, 0xc6c3,
+  0xc6c4, 0xc6c5, 0xc6c6, 0xc6c7, 0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb,
+  0xc6cc, 0xc6cd, 0xc6ce, 0xc6cf, 0xc6d0, 0xc6d1, 0xc6d2, 0xc6d3,
+  0xc6d4, 0xc6d5, 0xc6d6, 0xc6d7, 0xc6d8, 0xc6d9, 0xc6da, 0xc6db,
+  0xc6dc, 0xc6dd, 0xc6de, 0xc6df, 0xc6e0, 0xc6e1, 0xc6e2, 0xc6e3,
+  0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, 0xc6e8, 0xc6e9, 0xc6ea, 0xc6eb,
+  0xc6ec, 0xc6ed, 0xc6ee, 0xc6ef, 0xc6f0, 0xc6f1, 0xc6f2, 0xc6f3,
+  0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7, 0xc6a2, 0xc6a3, 0xc6f8, 0xc6f9,
+  0xc6fa, 0xc6fb, 0xc6fc, 0xc6fd, 0xc6fe, 0xc740, 0xc741, 0xc742,
+  0xc743, 0xc744, 0xc745, 0xc746, 0xc747, 0xc748, 0xc749, 0xc74a,
+  0xc74b, 0xc74c, 0xc74d, 0xc74e, 0xc74f, 0xc750, 0xc751, 0xc752,
+  0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc759, 0xc75a,
+  0xc75b, 0xc75c, 0xc75d, 0xc75e, 0xc75f, 0xc760, 0xc761, 0xc762,
+  0xc763, 0xc764, 0xc765, 0xc766, 0xc767, 0xc768, 0xc769, 0xc76a,
+  0xc76b, 0xc76c, 0xc76d, 0xc76e, 0xc76f, 0xc770, 0xc771, 0xc772,
+  0xc773, 0xc774, 0xc775, 0xc776, 0xc777, 0xc778, 0xc779, 0xc77a,
+  0xc77b, 0xc77c, 0xc77d, 0xc77e, 0xc7a1, 0xc7a2, 0xc7a3, 0xc7a4,
+  0xc7a5, 0xc7a6, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0xc7ac,
+  0xc7ad, 0xc7ae, 0xc7af, 0xc7b0, 0xc6a1, 0xa374, 0xa375, 0xa376,
+  0xa377, 0xa378, 0xa379, 0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa37e,
+  0xa3a1, 0xa3a2, 0xa3a3, 0xa3a4, 0xa3a5, 0xa3a6, 0xa3a7, 0xa3a8,
+  0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, 0xa3b0,
+  0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, 0xa3b8,
+  0xa3b9, 0xa3ba, 0xa1c0, 0xa255, 0xa256, 0xa250, 0xa251, 0xa252,
+  0xa254, 0xa257, 0xa253, 0xa1eb, 0xa1ea, 0xa24f, 0xa440, 0xa442,
+  0xa443, 0xc945, 0xa456, 0xa454, 0xa457, 0xa455, 0xc946, 0xa4a3,
+  0xc94f, 0xc94d, 0xa4a2, 0xa4a1, 0xa542, 0xa541, 0xa540, 0xa543,
+  0xa4fe, 0xa5e0, 0xa5e1, 0xa8c3, 0xa458, 0xa4a4, 0xc950, 0xa4a5,
+  0xc963, 0xa6ea, 0xcbb1, 0xa459, 0xa4a6, 0xa544, 0xc964, 0xc940,
+  0xa444, 0xa45b, 0xc947, 0xa45c, 0xa4a7, 0xa545, 0xa547, 0xa546,
+  0xa5e2, 0xa5e3, 0xa8c4, 0xadbc, 0xa441, 0xc941, 0xa445, 0xa45e,
+  0xa45d, 0xa5e4, 0xa8c5, 0xb0ae, 0xd44b, 0xb6c3, 0xdcb1, 0xdcb2,
+  0xa446, 0xa4a9, 0xa8c6, 0xa447, 0xc948, 0xa45f, 0xa4aa, 0xa4ac,
+  0xc951, 0xa4ad, 0xa4ab, 0xa5e5, 0xa8c7, 0xa8c8, 0xab45, 0xa460,
+  0xa4ae, 0xa5e6, 0xa5e8, 0xa5e7, 0xa6eb, 0xa8c9, 0xa8ca, 0xab46,
+  0xab47, 0xadbd, 0xdcb3, 0xf6d6, 0xa448, 0xa4b0, 0xa4af, 0xc952,
+  0xa4b1, 0xa4b7, 0xa4b2, 0xa4b3, 0xc954, 0xc953, 0xa4b5, 0xa4b6,
+  0xa4b4, 0xa54a, 0xa54b, 0xa54c, 0xa54d, 0xa549, 0xa550, 0xc96a,
+  0xc966, 0xc969, 0xa551, 0xa561, 0xc968, 0xa54e, 0xa54f, 0xa548,
+  0xc965, 0xc967, 0xa5f5, 0xc9b0, 0xa5f2, 0xa5f6, 0xc9ba, 0xc9ae,
+  0xa5f3, 0xc9b2, 0xa5f4, 0xa5f7, 0xa5e9, 0xc9b1, 0xa5f8, 0xc9b5,
+  0xc9b9, 0xc9b6, 0xc9b3, 0xa5ea, 0xa5ec, 0xa5f9, 0xa5ee, 0xc9ab,
+  0xa5f1, 0xa5ef, 0xa5f0, 0xc9bb, 0xc9b8, 0xc9af, 0xa5ed, 0xc9ac,
+  0xa5eb, 0xc9b4, 0xc9b7, 0xc9ad, 0xca66, 0xa742, 0xa6f4, 0xca67,
+  0xa6f1, 0xa744, 0xa6f9, 0xa6f8, 0xca5b, 0xa6fc, 0xa6f7, 0xca60,
+  0xca68, 0xca64, 0xa6fa, 0xa6fd, 0xa6ee, 0xa747, 0xca5d, 0xcbbd,
+  0xa6ec, 0xa743, 0xa6ed, 0xa6f5, 0xa6f6, 0xca62, 0xca5e, 0xa6fb,
+  0xa6f3, 0xca5a, 0xa6ef, 0xca65, 0xa745, 0xa748, 0xa6f2, 0xa740,
+  0xa746, 0xa6f0, 0xca63, 0xa741, 0xca69, 0xca5c, 0xa6fe, 0xca5f,
+  0xca61, 0xa8d8, 0xcbbf, 0xcbcb, 0xa8d0, 0xcbcc, 0xa8cb, 0xa8d5,
+  0xa8ce, 0xcbb9, 0xa8d6, 0xcbb8, 0xcbbc, 0xcbc3, 0xcbc1, 0xa8de,
+  0xa8d9, 0xcbb3, 0xcbb5, 0xa8db, 0xa8cf, 0xcbb6, 0xcbc2, 0xcbc9,
+  0xa8d4, 0xcbbb, 0xcbb4, 0xa8d3, 0xcbb7, 0xa8d7, 0xcbba, 0xa8d2,
+  0xa8cd, 0xa8dc, 0xcbc4, 0xa8dd, 0xcbc8, 0xcbc6, 0xcbca, 0xa8da,
+  0xcbbe, 0xcbb2, 0xcbc0, 0xa8d1, 0xcbc5, 0xa8cc, 0xcbc7, 0xab56,
+  0xab4a, 0xcde0, 0xcde8, 0xab49, 0xab51, 0xab5d, 0xcdee, 0xcdec,
+  0xcde7, 0xab4b, 0xcded, 0xcde3, 0xab59, 0xab50, 0xab58, 0xcdde,
+  0xcdea, 0xcde1, 0xab54, 0xcde2, 0xcddd, 0xab5b, 0xab4e, 0xab57,
+  0xab4d, 0xcddf, 0xcde4, 0xcdeb, 0xab55, 0xab52, 0xcde6, 0xab5a,
+  0xcde9, 0xcde5, 0xab4f, 0xab5c, 0xab53, 0xab4c, 0xab48, 0xcdef,
+  0xadd7, 0xadc1, 0xadd1, 0xadd6, 0xd0d0, 0xd0cf, 0xd0d4, 0xd0d5,
+  0xadc4, 0xadcd, 0xadda, 0xadce, 0xd0c9, 0xadc7, 0xd0ca, 0xaddc,
+  0xadd3, 0xadbe, 0xadbf, 0xd0dd, 0xb0bf, 0xadcc, 0xadcb, 0xd0cb,
+  0xadcf, 0xd45b, 0xadc6, 0xd0d6, 0xadd5, 0xadd4, 0xadca, 0xd0ce,
+  0xd0d7, 0xd0c8, 0xadc9, 0xd0d8, 0xadd2, 0xd0cc, 0xadc0, 0xadc3,
+  0xadc2, 0xd0d9, 0xadd0, 0xadc5, 0xadd9, 0xaddb, 0xd0d3, 0xadd8,
+  0xd0db, 0xd0cd, 0xd0dc, 0xd0d1, 0xd0da, 0xd0d2, 0xadc8, 0xd463,
+  0xd457, 0xb0b3, 0xd45c, 0xd462, 0xb0b2, 0xd455, 0xb0b6, 0xd459,
+  0xd452, 0xb0b4, 0xd456, 0xb0b9, 0xb0be, 0xd467, 0xd451, 0xb0ba,
+  0xd466, 0xb0b5, 0xd458, 0xb0b1, 0xd453, 0xd44f, 0xd45d, 0xd450,
+  0xd44e, 0xd45a, 0xd460, 0xd461, 0xb0b7, 0xd85b, 0xd45e, 0xd44d,
+  0xd45f, 0xb0c1, 0xd464, 0xb0c0, 0xd44c, 0xd454, 0xd465, 0xb0bc,
+  0xb0bb, 0xb0b8, 0xb0bd, 0xb0af, 0xb0b0, 0xb3c8, 0xd85e, 0xd857,
+  0xb3c5, 0xd85f, 0xd855, 0xd858, 0xb3c4, 0xd859, 0xb3c7, 0xd85d,
+  0xd853, 0xd852, 0xb3c9, 0xb3ca, 0xb3c6, 0xb3cb, 0xd851, 0xd85c,
+  0xd85a, 0xd854, 0xb3c3, 0xd856, 0xb6ca, 0xb6c4, 0xdcb7, 0xb6cd,
+  0xdcbd, 0xdcc0, 0xb6c6, 0xb6c7, 0xdcba, 0xb6c5, 0xdcc3, 0xb6cb,
+  0xdcc4, 0xdcbf, 0xb6cc, 0xdcb4, 0xb6c9, 0xdcb5, 0xdcbe, 0xdcbc,
+  0xdcb8, 0xb6c8, 0xdcb6, 0xb6ce, 0xdcbb, 0xdcc2, 0xdcb9, 0xdcc1,
+  0xb9b6, 0xb9b3, 0xb9b4, 0xe0f9, 0xe0f1, 0xb9b2, 0xb9af, 0xe0f2,
+  0xb9b1, 0xe0f5, 0xe0f7, 0xe0fe, 0xe0fd, 0xe0f8, 0xb9ae, 0xe0f0,
+  0xb9ac, 0xe0f3, 0xb9b7, 0xe0f6, 0xe0fa, 0xb9b0, 0xb9ad, 0xe0fc,
+  0xe0fb, 0xb9b5, 0xe0f4, 0xbbf8, 0xe4ec, 0xe4e9, 0xbbf9, 0xbbf7,
+  0xe4f0, 0xe4ed, 0xe4e6, 0xbbf6, 0xbbfa, 0xe4e7, 0xbbf5, 0xbbfd,
+  0xe4ea, 0xe4eb, 0xbbfb, 0xbbfc, 0xe4f1, 0xe4ee, 0xe4ef, 0xbeaa,
+  0xe8f8, 0xbea7, 0xe8f5, 0xbea9, 0xbeab, 0xe8f6, 0xbea8, 0xe8f7,
+  0xe8f4, 0xc076, 0xecbd, 0xc077, 0xecbb, 0xecbc, 0xecba, 0xecb9,
+  0xecbe, 0xc075, 0xefb8, 0xefb9, 0xe4e8, 0xefb7, 0xc078, 0xc35f,
+  0xf1eb, 0xf1ec, 0xc4d7, 0xc4d8, 0xf5c1, 0xf5c0, 0xc56c, 0xc56b,
+  0xf7d0, 0xa449, 0xa461, 0xa4b9, 0xa4b8, 0xa553, 0xa552, 0xa5fc,
+  0xa5fb, 0xa5fd, 0xa5fa, 0xa74a, 0xa749, 0xa74b, 0xa8e0, 0xa8df,
+  0xa8e1, 0xab5e, 0xa259, 0xd0de, 0xa25a, 0xb0c2, 0xa25c, 0xa25b,
+  0xd860, 0xa25d, 0xb9b8, 0xa25e, 0xa44a, 0xa4ba, 0xa5fe, 0xa8e2,
+  0xa44b, 0xa4bd, 0xa4bb, 0xa4bc, 0xa640, 0xa74c, 0xa8e4, 0xa8e3,
+  0xa8e5, 0xaddd, 0xbeac, 0xc94e, 0xa554, 0xa555, 0xa641, 0xca6a,
+  0xab60, 0xab5f, 0xd0e0, 0xd0df, 0xb0c3, 0xa4be, 0xc955, 0xcbcd,
+  0xab61, 0xade0, 0xadde, 0xaddf, 0xbead, 0xa556, 0xa642, 0xc9bc,
+  0xa74d, 0xa74e, 0xca6b, 0xcbce, 0xa8e6, 0xcbcf, 0xd0e2, 0xd0e3,
+  0xade3, 0xd0e4, 0xd0e1, 0xade4, 0xade2, 0xade1, 0xd0e5, 0xd468,
+  0xd861, 0xdcc5, 0xe140, 0xbbfe, 0xbeae, 0xe8f9, 0xa44c, 0xa45a,
+  0xb0c4, 0xb3cd, 0xb9b9, 0xc942, 0xa4bf, 0xa559, 0xa557, 0xa558,
+  0xa8e7, 0xa44d, 0xa44e, 0xa462, 0xa4c0, 0xa4c1, 0xa4c2, 0xc9be,
+  0xa55a, 0xc96b, 0xa646, 0xc9bf, 0xa644, 0xa645, 0xc9bd, 0xa647,
+  0xa643, 0xca6c, 0xaaec, 0xca6d, 0xca6e, 0xa750, 0xa74f, 0xa753,
+  0xa751, 0xa752, 0xa8ed, 0xa8ec, 0xcbd4, 0xcbd1, 0xcbd2, 0xcbd0,
+  0xa8ee, 0xa8ea, 0xa8e9, 0xa8eb, 0xa8e8, 0xa8ef, 0xab63, 0xcdf0,
+  0xcbd3, 0xab68, 0xcdf1, 0xab64, 0xab67, 0xab66, 0xab65, 0xab62,
+  0xd0e8, 0xade7, 0xd0eb, 0xade5, 0xd0e7, 0xade8, 0xade6, 0xade9,
+  0xd0e9, 0xd0ea, 0xd0e6, 0xd0ec, 0xb3d1, 0xb0c5, 0xd469, 0xd46b,
+  0xd46a, 0xd46c, 0xb0c6, 0xb3ce, 0xb3cf, 0xb3d0, 0xb6d0, 0xdcc7,
+  0xdcc6, 0xdcc8, 0xdcc9, 0xb6d1, 0xb6cf, 0xe141, 0xe142, 0xb9bb,
+  0xb9ba, 0xe35a, 0xbc40, 0xbc41, 0xbc42, 0xbc44, 0xe4f2, 0xe4f3,
+  0xbc43, 0xbeaf, 0xbeb0, 0xf1ed, 0xf5c3, 0xf5c2, 0xf7d1, 0xa44f,
+  0xa55c, 0xa55b, 0xa648, 0xc9c0, 0xa755, 0xa756, 0xa754, 0xa757,
+  0xca6f, 0xca70, 0xa8f1, 0xcbd5, 0xa8f0, 0xcdf2, 0xab6c, 0xcdf3,
+  0xab6b, 0xab69, 0xab6a, 0xd0ed, 0xb0c7, 0xd46e, 0xb0ca, 0xd46d,
+  0xb1e5, 0xb0c9, 0xb0c8, 0xb3d4, 0xb3d3, 0xb3d2, 0xb6d2, 0xb6d5,
+  0xb6d6, 0xb6d4, 0xb6d3, 0xe143, 0xe144, 0xe4f5, 0xbc45, 0xe4f4,
+  0xbeb1, 0xecbf, 0xc079, 0xf1ee, 0xc455, 0xa463, 0xa4c3, 0xc956,
+  0xa4c4, 0xa4c5, 0xa55d, 0xa55e, 0xa649, 0xca71, 0xcbd6, 0xcbd7,
+  0xab6d, 0xd0ee, 0xb0cc, 0xb0cb, 0xd863, 0xd862, 0xa450, 0xa4c6,
+  0xa55f, 0xb0cd, 0xc943, 0xc96c, 0xa560, 0xc9c2, 0xa64b, 0xa64a,
+  0xc9c1, 0xa758, 0xadea, 0xd46f, 0xb6d7, 0xe145, 0xb9bc, 0xe8fa,
+  0xf3fd, 0xa4c7, 0xcbd8, 0xcdf4, 0xb0d0, 0xb0ce, 0xb0cf, 0xa451,
+  0xa464, 0xa2cd, 0xa4ca, 0xa4c9, 0xa4c8, 0xa563, 0xa562, 0xc96d,
+  0xc9c3, 0xa8f5, 0xa8f2, 0xa8f4, 0xa8f3, 0xab6e, 0xb3d5, 0xa452,
+  0xa4cb, 0xa565, 0xa564, 0xca72, 0xa8f6, 0xc957, 0xa567, 0xa566,
+  0xa64c, 0xa64d, 0xca73, 0xa759, 0xa75a, 0xa8f7, 0xa8f8, 0xa8f9,
+  0xab6f, 0xcdf5, 0xadeb, 0xc944, 0xa4cc, 0xc9c4, 0xca74, 0xca75,
+  0xcbd9, 0xcbda, 0xcdf7, 0xcdf6, 0xcdf9, 0xcdf8, 0xab70, 0xd470,
+  0xaded, 0xd0ef, 0xadec, 0xd864, 0xb3d6, 0xd865, 0xe146, 0xb9bd,
+  0xbc46, 0xf1ef, 0xc958, 0xa568, 0xb0d1, 0xa453, 0xa465, 0xa4ce,
+  0xa4cd, 0xa4cf, 0xa8fb, 0xa8fa, 0xa8fc, 0xab71, 0xadee, 0xe8fb,
+  0xc24f, 0xa466, 0xa56a, 0xa579, 0xa574, 0xa56f, 0xa56e, 0xa575,
+  0xa573, 0xa56c, 0xa57a, 0xa56d, 0xa569, 0xa578, 0xa577, 0xa576,
+  0xa56b, 0xa572, 0xa571, 0xa57b, 0xa570, 0xa653, 0xa659, 0xa655,
+  0xa65b, 0xc9c5, 0xa658, 0xa64e, 0xa651, 0xa654, 0xa650, 0xa657,
+  0xa65a, 0xa64f, 0xa652, 0xa656, 0xa65c, 0xca7e, 0xca7b, 0xa767,
+  0xca7c, 0xa75b, 0xa75d, 0xa775, 0xa770, 0xcaa5, 0xca7d, 0xa75f,
+  0xa761, 0xcaa4, 0xa768, 0xca78, 0xa774, 0xa776, 0xa75c, 0xa76d,
+  0xca76, 0xa773, 0xa764, 0xa76e, 0xa76f, 0xca77, 0xa76c, 0xa76a,
+  0xa76b, 0xa771, 0xcaa1, 0xa75e, 0xa772, 0xcaa3, 0xa766, 0xa763,
+  0xca7a, 0xa762, 0xcaa6, 0xa765, 0xa769, 0xa760, 0xcaa2, 0xca79,
+  0xcbeb, 0xcbea, 0xa94f, 0xcbed, 0xcbef, 0xcbe4, 0xcbe7, 0xcbee,
+  0xa950, 0xcbe1, 0xcbe5, 0xcbe9, 0xce49, 0xa94b, 0xce4d, 0xa8fd,
+  0xcbe6, 0xa8fe, 0xa94c, 0xa945, 0xa941, 0xcbe2, 0xa944, 0xa949,
+  0xa952, 0xcbe3, 0xcbdc, 0xa943, 0xcbdd, 0xcbdf, 0xa946, 0xa948,
+  0xcbdb, 0xcbe0, 0xa951, 0xa94d, 0xcbe8, 0xa953, 0xa94a, 0xcbde,
+  0xa947, 0xa942, 0xa940, 0xcbec, 0xa94e, 0xce48, 0xcdfb, 0xce4b,
+  0xcdfd, 0xab78, 0xaba8, 0xab74, 0xaba7, 0xab7d, 0xaba4, 0xab72,
+  0xcdfc, 0xce43, 0xaba3, 0xce4f, 0xaba5, 0xab79, 0xce45, 0xce42,
+  0xab77, 0xcdfa, 0xaba6, 0xce4a, 0xab7c, 0xce4c, 0xaba9, 0xab73,
+  0xab7e, 0xab7b, 0xce40, 0xaba1, 0xce46, 0xce47, 0xab7a, 0xaba2,
+  0xab76, 0xab75, 0xcdfe, 0xce44, 0xce4e, 0xd144, 0xadfb, 0xd0f1,
+  0xd0f6, 0xadf4, 0xae40, 0xd0f4, 0xadef, 0xadf9, 0xadfe, 0xd0fb,
+  0xadfa, 0xadfd, 0xd0fe, 0xadf5, 0xd0f5, 0xd142, 0xd143, 0xadf7,
+  0xd141, 0xadf3, 0xae43, 0xd0f8, 0xadf1, 0xd146, 0xd0f9, 0xd0fd,
+  0xadf6, 0xae42, 0xd0fa, 0xadfc, 0xd140, 0xd147, 0xd4a1, 0xd145,
+  0xae44, 0xadf0, 0xd0fc, 0xd0f3, 0xadf8, 0xd0f2, 0xd0f7, 0xd0f0,
+  0xae41, 0xd477, 0xb0e4, 0xd4a7, 0xb0e2, 0xb0df, 0xd47c, 0xb0db,
+  0xd4a2, 0xb0e6, 0xd476, 0xd47b, 0xd47a, 0xadf2, 0xb0e1, 0xd4a5,
+  0xd4a8, 0xd473, 0xb3e8, 0xd4a9, 0xb0e7, 0xb0d9, 0xb0d6, 0xd47e,
+  0xb0d3, 0xd4a6, 0xb0da, 0xd4aa, 0xd474, 0xd4a4, 0xb0dd, 0xd475,
+  0xd478, 0xd47d, 0xb0de, 0xb0dc, 0xb0e8, 0xb0e3, 0xb0d7, 0xb1d2,
+  0xb0d8, 0xd479, 0xb0e5, 0xb0e0, 0xd4a3, 0xb0d5, 0xb0d4, 0xd471,
+  0xd472, 0xd86a, 0xb3d7, 0xb3da, 0xd875, 0xb3ee, 0xd878, 0xb3d8,
+  0xd871, 0xb3de, 0xb3e4, 0xb5bd, 0xb3e2, 0xd86e, 0xb3ef, 0xb3db,
+  0xb3e3, 0xd876, 0xdcd7, 0xd87b, 0xd86f, 0xd866, 0xd873, 0xd86d,
+  0xb3e1, 0xd879, 0xb3dd, 0xb3f1, 0xb3ea, 0xb3df, 0xb3dc, 0xb3e7,
+  0xd87a, 0xd86c, 0xd872, 0xd874, 0xd868, 0xd877, 0xb3d9, 0xd867,
+  0xb3e0, 0xb3f0, 0xb3ec, 0xd869, 0xb3e6, 0xb3ed, 0xb3e9, 0xb3e5,
+  0xd870, 0xb3eb, 0xdcd5, 0xdcd1, 0xdce0, 0xdcca, 0xdcd3, 0xb6e5,
+  0xb6e6, 0xb6de, 0xdcdc, 0xb6e8, 0xdccf, 0xdcce, 0xdccc, 0xdcde,
+  0xb6dc, 0xdcd8, 0xdccd, 0xb6df, 0xdcd6, 0xb6da, 0xdcd2, 0xdcd9,
+  0xdcdb, 0xdcdf, 0xb6e3, 0xdccb, 0xb6dd, 0xdcd0, 0xb6d8, 0xb6e4,
+  0xdcda, 0xb6e0, 0xb6e1, 0xb6e7, 0xb6db, 0xa25f, 0xb6d9, 0xdcd4,
+  0xb6e2, 0xdcdd, 0xb9cd, 0xb9c8, 0xe155, 0xe151, 0xe14b, 0xb9c2,
+  0xb9be, 0xe154, 0xb9bf, 0xe14e, 0xe150, 0xe153, 0xb9c4, 0xb9cb,
+  0xb9c5, 0xe149, 0xb9c6, 0xb9c7, 0xe14c, 0xb9cc, 0xe14a, 0xe14f,
+  0xb9c3, 0xe148, 0xb9c9, 0xb9c1, 0xb9c0, 0xe14d, 0xe152, 0xb9ca,
+  0xe147, 0xbc4d, 0xe547, 0xe544, 0xbc47, 0xbc53, 0xbc54, 0xbc4a,
+  0xe542, 0xbc4c, 0xe4f9, 0xbc52, 0xe546, 0xbc49, 0xe548, 0xbc48,
+  0xe543, 0xe545, 0xbc4b, 0xe541, 0xe4fa, 0xe4f7, 0xd86b, 0xe4fd,
+  0xe4f6, 0xe4fc, 0xe4fb, 0xe4f8, 0xbc4f, 0xbc4e, 0xbc50, 0xe4fe,
+  0xbeb2, 0xe540, 0xe945, 0xe8fd, 0xbebe, 0xe942, 0xbeb6, 0xbeba,
+  0xe941, 0xbeb9, 0xbeb5, 0xbeb8, 0xbeb3, 0xbebd, 0xe943, 0xe8fe,
+  0xbebc, 0xe8fc, 0xbebb, 0xe944, 0xe940, 0xbc51, 0xbebf, 0xe946,
+  0xbeb7, 0xbeb4, 0xecc6, 0xecc8, 0xc07b, 0xecc9, 0xecc7, 0xecc5,
+  0xecc4, 0xc07d, 0xecc3, 0xc07e, 0xecc1, 0xecc2, 0xc07a, 0xc0a1,
+  0xc07c, 0xecc0, 0xc250, 0xefbc, 0xefba, 0xefbf, 0xefbd, 0xefbb,
+  0xefbe, 0xc360, 0xf1f2, 0xf1f3, 0xc456, 0xf1f4, 0xf1f0, 0xf1f5,
+  0xf1f1, 0xc251, 0xf3fe, 0xf441, 0xc459, 0xf440, 0xc458, 0xc457,
+  0xc45a, 0xf5c5, 0xf5c6, 0xc4da, 0xc4d9, 0xc4db, 0xf5c4, 0xf6d8,
+  0xf6d7, 0xc56d, 0xc56f, 0xc56e, 0xf6d9, 0xc5c8, 0xf8a6, 0xc5f1,
+  0xf8a5, 0xf8ee, 0xc949, 0xa57d, 0xa57c, 0xa65f, 0xa65e, 0xc9c7,
+  0xa65d, 0xc9c6, 0xa779, 0xcaa9, 0xcaa8, 0xa777, 0xa77a, 0xcaa7,
+  0xa778, 0xcbf0, 0xcbf1, 0xa954, 0xabaa, 0xd148, 0xd149, 0xae45,
+  0xae46, 0xd4ac, 0xb0e9, 0xb0eb, 0xd4ab, 0xb0ea, 0xd87c, 0xb3f2,
+  0xb6e9, 0xb6ea, 0xdce1, 0xb9cf, 0xb9ce, 0xe549, 0xe948, 0xe947,
+  0xf96b, 0xa467, 0xc959, 0xc96e, 0xc96f, 0xa662, 0xa666, 0xc9c9,
+  0xa664, 0xa663, 0xc9c8, 0xa665, 0xa661, 0xa660, 0xc9ca, 0xa7a6,
+  0xa7a3, 0xa77d, 0xcaaa, 0xcaab, 0xa7a1, 0xcaad, 0xa77b, 0xcaae,
+  0xcaac, 0xa77e, 0xa7a2, 0xa7a5, 0xa7a4, 0xa77c, 0xcaaf, 0xa959,
+  0xcbfe, 0xa95b, 0xa95a, 0xcc40, 0xa958, 0xa957, 0xcbf5, 0xcbf4,
+  0xcbf2, 0xcbf7, 0xcbf6, 0xcbf3, 0xcbfc, 0xcbfd, 0xcbfa, 0xcbf8,
+  0xa956, 0xcbfb, 0xa95c, 0xcc41, 0xcbf9, 0xabab, 0xa955, 0xabac,
+  0xce54, 0xce5a, 0xabb2, 0xce58, 0xce5e, 0xce55, 0xce59, 0xce5b,
+  0xce5d, 0xce57, 0xce56, 0xce51, 0xce52, 0xabad, 0xabaf, 0xabae,
+  0xce53, 0xce5c, 0xabb1, 0xce50, 0xd153, 0xd152, 0xd157, 0xd14e,
+  0xd151, 0xd150, 0xd154, 0xd158, 0xae47, 0xae4a, 0xd14f, 0xd155,
+  0xae49, 0xd14a, 0xabb0, 0xd4ba, 0xd156, 0xd14d, 0xae48, 0xd14c,
+  0xd4b1, 0xb0ec, 0xb0f0, 0xd4c1, 0xd4af, 0xd4bd, 0xb0f1, 0xd4bf,
+  0xd4c5, 0xd4c9, 0xd4c0, 0xd4b4, 0xd4bc, 0xd4ca, 0xd4c8, 0xd4be,
+  0xd4b9, 0xd4b2, 0xd8a6, 0xd4b0, 0xb0f5, 0xd4b7, 0xb0f6, 0xb0f2,
+  0xd4ad, 0xd4c3, 0xd4b5, 0xd4b3, 0xd4c6, 0xb0f3, 0xd4cc, 0xb0ed,
+  0xb0ef, 0xd4bb, 0xd4b6, 0xae4b, 0xb0ee, 0xd4b8, 0xd4c7, 0xd4cb,
+  0xd4c2, 0xd4c4, 0xd4ae, 0xd8a1, 0xd8aa, 0xd8a9, 0xb3fa, 0xd8a2,
+  0xb3fb, 0xb3f9, 0xd8a4, 0xb3f6, 0xd8a8, 0xd8a3, 0xd8a5, 0xd87d,
+  0xb3f4, 0xd8b2, 0xd8b1, 0xd8ae, 0xb3f3, 0xb3f7, 0xb3f8, 0xd14b,
+  0xd8ab, 0xb3f5, 0xb0f4, 0xd8ad, 0xd87e, 0xd8b0, 0xd8af, 0xd8b3,
+  0xdcef, 0xd8ac, 0xd8a7, 0xdce7, 0xb6f4, 0xb6f7, 0xb6f2, 0xdce6,
+  0xdcea, 0xdce5, 0xb6ec, 0xb6f6, 0xdce2, 0xb6f0, 0xdce9, 0xb6ee,
+  0xb6ed, 0xdcec, 0xb6ef, 0xdcee, 0xdceb, 0xb6eb, 0xb6f5, 0xdcf0,
+  0xdce4, 0xdced, 0xdce3, 0xb6f1, 0xb6f3, 0xdce8, 0xdcf1, 0xe15d,
+  0xb9d0, 0xe163, 0xb9d5, 0xe15f, 0xe166, 0xe157, 0xb9d7, 0xb9d1,
+  0xe15c, 0xbc55, 0xe15b, 0xe164, 0xb9d2, 0xb9d6, 0xe15a, 0xe160,
+  0xe165, 0xe156, 0xb9d4, 0xe15e, 0xe162, 0xe168, 0xe158, 0xe161,
+  0xb9d3, 0xe167, 0xe159, 0xbc59, 0xe54b, 0xbc57, 0xbc56, 0xe54d,
+  0xe552, 0xe54e, 0xe551, 0xbc5c, 0xbea5, 0xbc5b, 0xe54a, 0xe550,
+  0xbc5a, 0xe54f, 0xe54c, 0xbc58, 0xe94d, 0xe94f, 0xe94a, 0xbec1,
+  0xe94c, 0xbec0, 0xe94e, 0xbec3, 0xe950, 0xbec2, 0xe949, 0xe94b,
+  0xc0a5, 0xeccc, 0xc0a4, 0xeccd, 0xc0a3, 0xeccb, 0xc0a2, 0xecca,
+  0xc253, 0xc252, 0xf1f6, 0xf1f8, 0xf1f7, 0xc361, 0xc362, 0xc363,
+  0xf442, 0xc45b, 0xf7d3, 0xf7d2, 0xc5f2, 0xa468, 0xa4d0, 0xa7a7,
+  0xce5f, 0xb3fc, 0xb3fd, 0xdcf2, 0xb9d8, 0xe169, 0xe553, 0xc95a,
+  0xcab0, 0xcc42, 0xce60, 0xd159, 0xae4c, 0xf1f9, 0xc4dc, 0xa469,
+  0xa57e, 0xc970, 0xa667, 0xa668, 0xa95d, 0xb0f7, 0xb9da, 0xb9db,
+  0xb9d9, 0xa46a, 0xa4d1, 0xa4d3, 0xa4d2, 0xc95b, 0xa4d4, 0xa5a1,
+  0xc971, 0xa5a2, 0xa669, 0xa66a, 0xc9cb, 0xa7a8, 0xcab1, 0xa961,
+  0xcc43, 0xa95f, 0xa960, 0xa95e, 0xd15a, 0xabb6, 0xabb5, 0xabb7,
+  0xabb4, 0xce61, 0xa962, 0xabb3, 0xae4d, 0xae4e, 0xae4f, 0xd4cd,
+  0xb3fe, 0xd8b4, 0xb0f8, 0xb6f8, 0xb9dd, 0xb9dc, 0xe16a, 0xbc5d,
+  0xbec4, 0xefc0, 0xf6da, 0xf7d4, 0xa46b, 0xa5a3, 0xa5a4, 0xc9d1,
+  0xa66c, 0xa66f, 0xc9cf, 0xc9cd, 0xa66e, 0xc9d0, 0xc9d2, 0xc9cc,
+  0xa671, 0xa670, 0xa66d, 0xa66b, 0xc9ce, 0xa7b3, 0xa7b0, 0xcab6,
+  0xcab9, 0xcab8, 0xa7aa, 0xa7b2, 0xa7af, 0xcab5, 0xcab3, 0xa7ae,
+  0xa7a9, 0xa7ac, 0xcab4, 0xcabb, 0xcab7, 0xa7ad, 0xa7b1, 0xa7b4,
+  0xcab2, 0xcaba, 0xa7ab, 0xa967, 0xa96f, 0xcc4f, 0xcc48, 0xa970,
+  0xcc53, 0xcc44, 0xcc4b, 0xa966, 0xcc45, 0xa964, 0xcc4c, 0xcc50,
+  0xa963, 0xcc51, 0xcc4a, 0xcc4d, 0xa972, 0xa969, 0xcc54, 0xcc52,
+  0xa96e, 0xa96c, 0xcc49, 0xa96b, 0xcc47, 0xcc46, 0xa96a, 0xa968,
+  0xa971, 0xa96d, 0xa965, 0xcc4e, 0xabb9, 0xabc0, 0xce6f, 0xabb8,
+  0xce67, 0xce63, 0xce73, 0xce62, 0xabbb, 0xce6c, 0xabbe, 0xabc1,
+  0xabbc, 0xce70, 0xabbf, 0xae56, 0xce76, 0xce64, 0xce66, 0xce6d,
+  0xce71, 0xce75, 0xce72, 0xce6b, 0xce6e, 0xce68, 0xabc3, 0xce6a,
+  0xce69, 0xce74, 0xabba, 0xce65, 0xabc2, 0xabbd, 0xae5c, 0xd162,
+  0xae5b, 0xd160, 0xae50, 0xae55, 0xd15f, 0xd15c, 0xd161, 0xae51,
+  0xd15b, 0xae54, 0xae52, 0xd163, 0xae53, 0xae57, 0xae58, 0xae5a,
+  0xae59, 0xd15d, 0xd15e, 0xd164, 0xd4d4, 0xb0f9, 0xd8c2, 0xd4d3,
+  0xd4e6, 0xb140, 0xd4e4, 0xb0fe, 0xb0fa, 0xd4ed, 0xd4dd, 0xd4e0,
+  0xb143, 0xd4ea, 0xd4e2, 0xb0fb, 0xb144, 0xd4e7, 0xd4e5, 0xd4d6,
+  0xd4eb, 0xd4df, 0xd4da, 0xd4d0, 0xd4ec, 0xd4dc, 0xd4cf, 0xb142,
+  0xd4e1, 0xd4ee, 0xd4de, 0xd4d2, 0xd4d7, 0xd4ce, 0xb141, 0xd4db,
+  0xd4d8, 0xb0fc, 0xd4d1, 0xd4e9, 0xb0fd, 0xd4d9, 0xd4d5, 0xd4e8,
+  0xb440, 0xd8bb, 0xd8b8, 0xd8c9, 0xd8bd, 0xd8ca, 0xb442, 0xd8c6,
+  0xd8c3, 0xd8c4, 0xd8c7, 0xd8cb, 0xd4e3, 0xd8cd, 0xdd47, 0xb443,
+  0xd8ce, 0xd8b6, 0xd8c0, 0xd8c5, 0xb441, 0xb444, 0xd8cc, 0xd8cf,
+  0xd8ba, 0xd8b7, 0xd8b9, 0xd8be, 0xd8bc, 0xb445, 0xd8c8, 0xd8bf,
+  0xd8c1, 0xd8b5, 0xdcfa, 0xdcf8, 0xb742, 0xb740, 0xdd43, 0xdcf9,
+  0xdd44, 0xdd40, 0xdcf7, 0xdd46, 0xdcf6, 0xdcfd, 0xb6fe, 0xb6fd,
+  0xb6fc, 0xdcfb, 0xdd41, 0xb6f9, 0xb741, 0xdcf4, 0xdcfe, 0xdcf3,
+  0xdcfc, 0xb6fa, 0xdd42, 0xdcf5, 0xb6fb, 0xdd45, 0xe16e, 0xb9e2,
+  0xb9e1, 0xb9e3, 0xe17a, 0xe170, 0xe176, 0xe16b, 0xe179, 0xe178,
+  0xe17c, 0xe175, 0xb9de, 0xe174, 0xb9e4, 0xe16d, 0xb9df, 0xe17b,
+  0xb9e0, 0xe16f, 0xe172, 0xe177, 0xe171, 0xe16c, 0xe173, 0xe555,
+  0xbc61, 0xe558, 0xe557, 0xe55a, 0xe55c, 0xbc5f, 0xe556, 0xe554,
+  0xe55d, 0xe55b, 0xe559, 0xe55f, 0xe55e, 0xbc63, 0xbc5e, 0xbc60,
+  0xbc62, 0xe560, 0xe957, 0xe956, 0xe955, 0xe958, 0xe951, 0xe952,
+  0xe95a, 0xe953, 0xbec5, 0xe95c, 0xe95b, 0xe954, 0xecd1, 0xc0a8,
+  0xeccf, 0xecd4, 0xecd3, 0xe959, 0xc0a7, 0xecd2, 0xecce, 0xecd6,
+  0xecd5, 0xc0a6, 0xecd0, 0xbec6, 0xc254, 0xefc1, 0xf1fa, 0xf1fb,
+  0xf1fc, 0xc45c, 0xc45d, 0xf443, 0xf5c8, 0xf5c7, 0xf6db, 0xf6dc,
+  0xf7d5, 0xf8a7, 0xa46c, 0xa46d, 0xa46e, 0xa4d5, 0xa5a5, 0xc9d3,
+  0xa672, 0xa673, 0xa7b7, 0xa7b8, 0xa7b6, 0xa7b5, 0xa973, 0xcc55,
+  0xa975, 0xa974, 0xcc56, 0xabc4, 0xae5d, 0xd165, 0xd4f0, 0xb145,
+  0xb447, 0xd4ef, 0xb446, 0xb9e5, 0xe17d, 0xbec7, 0xc0a9, 0xecd7,
+  0xc45e, 0xc570, 0xc972, 0xa5a6, 0xc973, 0xa676, 0xa674, 0xa675,
+  0xa677, 0xa7ba, 0xa7b9, 0xcabc, 0xa7bb, 0xcabd, 0xcc57, 0xcc58,
+  0xa976, 0xa978, 0xa97a, 0xa977, 0xa97b, 0xa979, 0xabc8, 0xabc5,
+  0xabc7, 0xabc9, 0xabc6, 0xd166, 0xce77, 0xd168, 0xd167, 0xae63,
+  0xae5f, 0xae60, 0xae62, 0xae64, 0xae61, 0xae66, 0xae65, 0xb14a,
+  0xd4f2, 0xd4f1, 0xb149, 0xb148, 0xb147, 0xb14b, 0xb146, 0xd8d5,
+  0xd8d2, 0xb449, 0xd8d1, 0xd8d6, 0xb44b, 0xd8d4, 0xb448, 0xb44a,
+  0xd8d3, 0xdd48, 0xdd49, 0xdd4a, 0xb9e6, 0xb9ee, 0xe17e, 0xb9e8,
+  0xb9ec, 0xe1a1, 0xb9ed, 0xb9e9, 0xb9ea, 0xb9e7, 0xb9eb, 0xbc66,
+  0xd8d0, 0xbc67, 0xbc65, 0xbc64, 0xe95d, 0xbec8, 0xecd8, 0xecd9,
+  0xc364, 0xc45f, 0xa46f, 0xa678, 0xabca, 0xd169, 0xae67, 0xb14e,
+  0xb14d, 0xb14c, 0xb44c, 0xb44d, 0xd8d7, 0xb9ef, 0xbec9, 0xa470,
+  0xc95c, 0xa4d6, 0xc974, 0xc9d4, 0xa679, 0xa97c, 0xdd4b, 0xa471,
+  0xa4d7, 0xc9d5, 0xcabe, 0xcabf, 0xa7bc, 0xd8d8, 0xb44e, 0xdd4c,
+  0xc0aa, 0xa472, 0xa4a8, 0xa4d8, 0xc975, 0xa5a7, 0xa7c0, 0xa7bf,
+  0xa7bd, 0xa7be, 0xcc59, 0xa97e, 0xa9a1, 0xcc5a, 0xa97d, 0xabce,
+  0xce78, 0xabcd, 0xabcb, 0xabcc, 0xae6a, 0xae68, 0xd16b, 0xae69,
+  0xd16a, 0xae5e, 0xd4f3, 0xb150, 0xb151, 0xb14f, 0xb9f0, 0xe1a2,
+  0xbc68, 0xbc69, 0xe561, 0xc0ab, 0xefc2, 0xefc3, 0xc4dd, 0xf8a8,
+  0xc94b, 0xa4d9, 0xa473, 0xc977, 0xc976, 0xa67a, 0xc9d7, 0xc9d8,
+  0xc9d6, 0xc9d9, 0xcac7, 0xcac2, 0xcac4, 0xcac6, 0xcac3, 0xa7c4,
+  0xcac0, 0xcac1, 0xa7c1, 0xa7c2, 0xcac5, 0xcac8, 0xa7c3, 0xcac9,
+  0xcc68, 0xcc62, 0xcc5d, 0xa9a3, 0xcc65, 0xcc63, 0xcc5c, 0xcc69,
+  0xcc6c, 0xcc67, 0xcc60, 0xa9a5, 0xcc66, 0xa9a6, 0xcc61, 0xcc64,
+  0xcc5b, 0xcc5f, 0xcc6b, 0xa9a7, 0xa9a8, 0xcc5e, 0xcc6a, 0xa9a2,
+  0xa9a4, 0xceab, 0xcea4, 0xceaa, 0xcea3, 0xcea5, 0xce7d, 0xce7b,
+  0xceac, 0xcea9, 0xce79, 0xabd0, 0xcea7, 0xcea8, 0xcea6, 0xce7c,
+  0xce7a, 0xabcf, 0xcea2, 0xce7e, 0xcea1, 0xcead, 0xae6f, 0xae6e,
+  0xd16c, 0xae6b, 0xd16e, 0xae70, 0xd16f, 0xae73, 0xae71, 0xd170,
+  0xceae, 0xd172, 0xae6d, 0xae6c, 0xd16d, 0xd171, 0xae72, 0xb153,
+  0xb152, 0xd4f5, 0xd4f9, 0xd4fb, 0xb154, 0xd4fe, 0xb158, 0xd541,
+  0xb15a, 0xb156, 0xb15e, 0xb15b, 0xd4f7, 0xb155, 0xd4f6, 0xd4f4,
+  0xd543, 0xd4f8, 0xb157, 0xd542, 0xb15c, 0xd4fd, 0xd4fc, 0xb15d,
+  0xd4fa, 0xb159, 0xd544, 0xd540, 0xd8e7, 0xd8ee, 0xd8e3, 0xb451,
+  0xd8df, 0xd8ef, 0xd8d9, 0xd8ec, 0xd8ea, 0xd8e4, 0xd8ed, 0xd8e6,
+  0xd8de, 0xd8f0, 0xd8dc, 0xd8e9, 0xd8da, 0xd8f1, 0xb452, 0xd8eb,
+  0xdd4f, 0xd8dd, 0xb44f, 0xd8e1, 0xb450, 0xd8e0, 0xd8e5, 0xd8e2,
+  0xd8e8, 0xdd53, 0xdd56, 0xdd4e, 0xdd50, 0xdd55, 0xdd54, 0xb743,
+  0xd8db, 0xdd52, 0xb744, 0xdd4d, 0xdd51, 0xe1a9, 0xe1b0, 0xe1a7,
+  0xe1ae, 0xe1a5, 0xe1ad, 0xe1b1, 0xe1a4, 0xe1a8, 0xe1a3, 0xb9f1,
+  0xe1a6, 0xb9f2, 0xe1ac, 0xe1ab, 0xe1aa, 0xe1af, 0xe565, 0xe567,
+  0xbc6b, 0xe568, 0xe563, 0xe562, 0xe56c, 0xe56a, 0xbc6a, 0xe56d,
+  0xe564, 0xe569, 0xe56b, 0xe566, 0xe961, 0xe966, 0xe960, 0xe965,
+  0xe95e, 0xe968, 0xe964, 0xe969, 0xe963, 0xe95f, 0xe967, 0xe96a,
+  0xe962, 0xecda, 0xc0af, 0xc0ad, 0xc0ac, 0xc0ae, 0xefc4, 0xf172,
+  0xf1fd, 0xf444, 0xf445, 0xc460, 0xf5c9, 0xc4de, 0xf5ca, 0xf6de,
+  0xc572, 0xc571, 0xf6dd, 0xc5c9, 0xf7d6, 0xa474, 0xa67b, 0xc9da,
+  0xcaca, 0xa8b5, 0xb15f, 0xa475, 0xa5aa, 0xa5a9, 0xa5a8, 0xa7c5,
+  0xae74, 0xdd57, 0xa476, 0xa477, 0xa478, 0xa4da, 0xabd1, 0xceaf,
+  0xb453, 0xa479, 0xc95d, 0xa5ab, 0xa5ac, 0xc978, 0xa67c, 0xcacb,
+  0xa7c6, 0xcacc, 0xa9ae, 0xcc6e, 0xa9ac, 0xa9ab, 0xcc6d, 0xa9a9,
+  0xcc6f, 0xa9aa, 0xa9ad, 0xabd2, 0xabd4, 0xceb3, 0xceb0, 0xceb1,
+  0xceb2, 0xceb4, 0xabd3, 0xd174, 0xd173, 0xae76, 0xae75, 0xb162,
+  0xd546, 0xb161, 0xb163, 0xb160, 0xb455, 0xd545, 0xb456, 0xd8f3,
+  0xb457, 0xd8f2, 0xb454, 0xdd5a, 0xdd5c, 0xb745, 0xdd5b, 0xdd59,
+  0xdd58, 0xe1b4, 0xb9f7, 0xb9f5, 0xb9f6, 0xe1b2, 0xe1b3, 0xb9f3,
+  0xe571, 0xe56f, 0xbc6d, 0xe570, 0xbc6e, 0xbc6c, 0xb9f4, 0xe96d,
+  0xe96b, 0xe96c, 0xe56e, 0xecdc, 0xc0b0, 0xecdb, 0xefc5, 0xefc6,
+  0xe96e, 0xf1fe, 0xa47a, 0xa5ad, 0xa67e, 0xc9db, 0xa67d, 0xa9af,
+  0xb746, 0xa4db, 0xa5ae, 0xabd5, 0xb458, 0xc979, 0xc97a, 0xc9dc,
+  0xa7c8, 0xcad0, 0xcace, 0xa7c9, 0xcacd, 0xcacf, 0xcad1, 0xa7c7,
+  0xa9b3, 0xa9b4, 0xa9b1, 0xa9b0, 0xceb8, 0xa9b2, 0xabd6, 0xceb7,
+  0xceb9, 0xceb6, 0xceba, 0xabd7, 0xae79, 0xd175, 0xd177, 0xae77,
+  0xd178, 0xae78, 0xd176, 0xceb5, 0xd547, 0xd54a, 0xd54b, 0xd548,
+  0xb167, 0xb166, 0xb164, 0xb165, 0xd549, 0xb168, 0xb45a, 0xb45b,
+  0xb45c, 0xdd5d, 0xdd5f, 0xdd61, 0xb748, 0xb747, 0xb459, 0xdd60,
+  0xdd5e, 0xe1b8, 0xe1b6, 0xe1bc, 0xb9f8, 0xe1bd, 0xe1ba, 0xb9f9,
+  0xe1b7, 0xe1b5, 0xe1bb, 0xbc70, 0xe573, 0xe1b9, 0xbc72, 0xe574,
+  0xbc71, 0xbc74, 0xe575, 0xbc6f, 0xbc73, 0xe973, 0xe971, 0xe970,
+  0xe972, 0xe96f, 0xc366, 0xf446, 0xf447, 0xf5cb, 0xf6df, 0xc655,
+  0xa9b5, 0xa7ca, 0xabd8, 0xa47b, 0xa4dc, 0xa5af, 0xc9dd, 0xa7cb,
+  0xcad2, 0xcebb, 0xabd9, 0xb9fa, 0xa47c, 0xa6a1, 0xb749, 0xa47d,
+  0xa4dd, 0xa4de, 0xa5b1, 0xa5b0, 0xc9de, 0xa6a2, 0xcad3, 0xa7cc,
+  0xcc71, 0xcc72, 0xcc73, 0xa9b6, 0xa9b7, 0xcc70, 0xa9b8, 0xabda,
+  0xcebc, 0xd17a, 0xae7a, 0xd179, 0xb169, 0xd54c, 0xb16a, 0xd54d,
+  0xb45d, 0xdd62, 0xe1bf, 0xe1be, 0xb9fb, 0xbc75, 0xe576, 0xbeca,
+  0xe974, 0xc0b1, 0xc573, 0xf7d8, 0xcc74, 0xcebd, 0xb16b, 0xd8f4,
+  0xb74a, 0xc255, 0xa7ce, 0xa7cd, 0xabdb, 0xd17b, 0xb16d, 0xb343,
+  0xb16e, 0xb16c, 0xb45e, 0xe1c0, 0xb9fc, 0xbc76, 0xc94c, 0xc9df,
+  0xcad5, 0xa7cf, 0xcad4, 0xa7d0, 0xa9bc, 0xcc77, 0xcc76, 0xa9bb,
+  0xa9b9, 0xa9ba, 0xcc75, 0xabdd, 0xcebe, 0xabe0, 0xabdc, 0xabe2,
+  0xabde, 0xabdf, 0xabe1, 0xae7d, 0xae7c, 0xae7b, 0xd54f, 0xb16f,
+  0xb172, 0xb170, 0xd54e, 0xb175, 0xb171, 0xd550, 0xb174, 0xb173,
+  0xd8f6, 0xd8f5, 0xb461, 0xb45f, 0xb460, 0xd8f7, 0xb74b, 0xdd64,
+  0xb74c, 0xdd63, 0xe577, 0xbc78, 0xe1c1, 0xbc77, 0xb9fd, 0xecde,
+  0xe975, 0xc0b2, 0xecdd, 0xf240, 0xf448, 0xf449, 0xa4df, 0xa5b2,
+  0xc97b, 0xa7d2, 0xa7d4, 0xc9e2, 0xcad8, 0xcad7, 0xcad6, 0xc9e1,
+  0xc9e0, 0xa6a4, 0xa7d3, 0xa7d1, 0xa6a3, 0xa9bd, 0xcc78, 0xa9be,
+  0xcadd, 0xcadf, 0xcade, 0xcc79, 0xcada, 0xa7d8, 0xa7d6, 0xcad9,
+  0xcadb, 0xcae1, 0xa7d5, 0xcadc, 0xcae5, 0xa9c0, 0xcae2, 0xa7d7,
+  0xcae0, 0xcae3, 0xa9bf, 0xa9c1, 0xcae4, 0xccaf, 0xcca2, 0xcc7e,
+  0xccae, 0xcca9, 0xabe7, 0xa9c2, 0xccaa, 0xccad, 0xabe3, 0xccac,
+  0xa9c3, 0xa9c8, 0xa9c6, 0xcca3, 0xcc7c, 0xcca5, 0xa9cd, 0xccb0,
+  0xabe4, 0xcca6, 0xabe5, 0xa9c9, 0xcca8, 0xcecd, 0xabe6, 0xcc7b,
+  0xa9ca, 0xabe8, 0xa9cb, 0xa9c7, 0xa9cc, 0xcca7, 0xcc7a, 0xccab,
+  0xa9c4, 0xcc7d, 0xcca4, 0xcca1, 0xa9c5, 0xcebf, 0xcec0, 0xceca,
+  0xd1a1, 0xcecb, 0xabee, 0xcece, 0xcec4, 0xabed, 0xcec6, 0xcec7,
+  0xcec9, 0xabe9, 0xaea3, 0xcec5, 0xcec1, 0xaea4, 0xcecf, 0xae7e,
+  0xd17d, 0xcec8, 0xd17c, 0xcec3, 0xcecc, 0xabec, 0xaea1, 0xabf2,
+  0xaea2, 0xced0, 0xd17e, 0xabeb, 0xaea6, 0xabf1, 0xabf0, 0xabef,
+  0xaea5, 0xced1, 0xaea7, 0xabea, 0xcec2, 0xb176, 0xd1a4, 0xd1a6,
+  0xd1a8, 0xaea8, 0xaeae, 0xd553, 0xd1ac, 0xd1a3, 0xb178, 0xd551,
+  0xaead, 0xaeab, 0xd1ae, 0xd552, 0xd1a5, 0xaeac, 0xd1a9, 0xaeaf,
+  0xd1ab, 0xaeaa, 0xd1aa, 0xd1ad, 0xd1a7, 0xaea9, 0xb179, 0xd1a2,
+  0xb177, 0xb17a, 0xd555, 0xd55e, 0xb464, 0xb17c, 0xb1a3, 0xb465,
+  0xd560, 0xb1aa, 0xd8f9, 0xd556, 0xb1a2, 0xb1a5, 0xb17e, 0xd554,
+  0xd562, 0xd565, 0xd949, 0xd563, 0xd8fd, 0xb1a1, 0xb1a8, 0xb1ac,
+  0xd55d, 0xd8f8, 0xd561, 0xb17b, 0xd8fa, 0xd564, 0xd8fc, 0xd559,
+  0xb462, 0xd557, 0xd558, 0xb1a7, 0xb1a6, 0xd55b, 0xb1ab, 0xd55f,
+  0xb1a4, 0xd55c, 0xb1a9, 0xb466, 0xb463, 0xd8fb, 0xd55a, 0xb17d,
+  0xb46b, 0xb46f, 0xd940, 0xb751, 0xb46d, 0xd944, 0xb471, 0xdd65,
+  0xd946, 0xb753, 0xb469, 0xb46c, 0xd947, 0xd948, 0xd94e, 0xb473,
+  0xb754, 0xd94a, 0xd94f, 0xd943, 0xb75e, 0xb755, 0xb472, 0xd941,
+  0xd950, 0xb75d, 0xb470, 0xb74e, 0xd94d, 0xb474, 0xd945, 0xd8fe,
+  0xb46a, 0xd942, 0xd94b, 0xb74d, 0xb752, 0xb467, 0xd94c, 0xb750,
+  0xb468, 0xb75c, 0xe1c3, 0xdd70, 0xdd68, 0xe1c2, 0xdd6c, 0xdd6e,
+  0xdd6b, 0xb75b, 0xdd6a, 0xb75f, 0xe1d2, 0xb75a, 0xba40, 0xdd71,
+  0xe1c4, 0xb758, 0xdd69, 0xdd6d, 0xb9fe, 0xb74f, 0xdd66, 0xdd67,
+  0xba41, 0xb757, 0xb759, 0xb756, 0xdd6f, 0xe1c8, 0xe1c9, 0xe1ce,
+  0xbc7d, 0xe1d5, 0xba47, 0xba46, 0xe1d0, 0xbc7c, 0xe1c5, 0xba45,
+  0xe1d4, 0xba43, 0xba44, 0xe1d1, 0xe5aa, 0xbc7a, 0xb46e, 0xe1d3,
+  0xbca3, 0xe1cb, 0xbc7b, 0xbca2, 0xe1c6, 0xe1ca, 0xe1c7, 0xe1cd,
+  0xba48, 0xbc79, 0xba42, 0xe57a, 0xe1cf, 0xbca1, 0xbca4, 0xe1cc,
+  0xbc7e, 0xe579, 0xe57e, 0xbece, 0xe578, 0xe9a3, 0xe5a9, 0xbca8,
+  0xbca6, 0xbecc, 0xe5a6, 0xe5a2, 0xbcac, 0xe978, 0xbcaa, 0xe5a1,
+  0xe976, 0xe5a5, 0xe5a8, 0xe57d, 0xbcab, 0xbca5, 0xe977, 0xbecd,
+  0xe5a7, 0xbca7, 0xbca9, 0xe5a4, 0xbcad, 0xe5a3, 0xe57c, 0xe57b,
+  0xbecb, 0xe5ab, 0xe97a, 0xece0, 0xbed0, 0xe9a2, 0xe97e, 0xece1,
+  0xbed1, 0xe9a1, 0xe97c, 0xc0b4, 0xecdf, 0xe979, 0xe97b, 0xc0b5,
+  0xbed3, 0xc0b3, 0xbed2, 0xc0b7, 0xe97d, 0xbecf, 0xefcf, 0xefc7,
+  0xece7, 0xefc8, 0xece3, 0xc256, 0xece5, 0xece4, 0xc0b6, 0xece2,
+  0xece6, 0xefd0, 0xefcc, 0xefce, 0xefc9, 0xefca, 0xefcd, 0xefcb,
+  0xc367, 0xc36a, 0xc369, 0xc368, 0xc461, 0xf44a, 0xc462, 0xf241,
+  0xc4df, 0xf5cc, 0xc4e0, 0xc574, 0xc5ca, 0xf7d9, 0xf7da, 0xf7db,
+  0xf9ba, 0xa4e0, 0xc97c, 0xa5b3, 0xa6a6, 0xa6a7, 0xa6a5, 0xa6a8,
+  0xa7da, 0xa7d9, 0xccb1, 0xa9cf, 0xa9ce, 0xd1af, 0xb1ad, 0xb1ae,
+  0xb475, 0xdd72, 0xb760, 0xb761, 0xdd74, 0xdd76, 0xdd75, 0xe1d7,
+  0xe1d6, 0xba49, 0xe1d8, 0xe5ac, 0xbcae, 0xbed4, 0xc0b8, 0xc257,
+  0xc0b9, 0xa4e1, 0xcae6, 0xccb2, 0xa9d1, 0xa9d0, 0xa9d2, 0xabf3,
+  0xced2, 0xced3, 0xd1b0, 0xaeb0, 0xb1af, 0xb476, 0xd951, 0xa4e2,
+  0xa47e, 0xa4e3, 0xc97d, 0xa5b7, 0xa5b6, 0xa5b4, 0xa5b5, 0xa6ab,
+  0xc9e9, 0xc9eb, 0xa6aa, 0xc9e3, 0xc9e4, 0xc9ea, 0xc9e6, 0xc9e8,
+  0xa6a9, 0xc9e5, 0xc9ec, 0xc9e7, 0xa7e1, 0xa7ea, 0xa7e8, 0xcaf0,
+  0xcaed, 0xcaf5, 0xa7e6, 0xcaf6, 0xa7df, 0xcaf3, 0xa7e5, 0xcaef,
+  0xcaee, 0xa7e3, 0xcaf4, 0xa7e4, 0xa9d3, 0xa7de, 0xcaf1, 0xcae7,
+  0xa7db, 0xa7ee, 0xcaec, 0xcaf2, 0xa7e0, 0xa7e2, 0xcae8, 0xcae9,
+  0xcaea, 0xa7ed, 0xa7e7, 0xa7ec, 0xcaeb, 0xa7eb, 0xa7dd, 0xa7dc,
+  0xa7e9, 0xa9e1, 0xccbe, 0xccb7, 0xa9dc, 0xa9ef, 0xccb3, 0xccba,
+  0xccbc, 0xccbf, 0xa9ea, 0xccbb, 0xccb4, 0xa9e8, 0xccb8, 0xccc0,
+  0xa9d9, 0xccbd, 0xa9e3, 0xa9e2, 0xccb6, 0xa9d7, 0xa9d8, 0xa9d6,
+  0xa9ee, 0xa9e6, 0xa9e0, 0xa9d4, 0xccb9, 0xa9df, 0xa9d5, 0xa9e7,
+  0xa9f0, 0xced4, 0xa9e4, 0xccb5, 0xa9da, 0xa9dd, 0xa9de, 0xa9ec,
+  0xa9ed, 0xa9eb, 0xa9e5, 0xa9e9, 0xa9db, 0xabf4, 0xceda, 0xac41,
+  0xabf8, 0xabfa, 0xac40, 0xcee6, 0xabfd, 0xd1b1, 0xaeb1, 0xac43,
+  0xced7, 0xcedf, 0xabfe, 0xcede, 0xcedb, 0xcee3, 0xcee5, 0xabf7,
+  0xabfb, 0xac42, 0xaeb3, 0xcee0, 0xabf9, 0xac45, 0xced9, 0xabfc,
+  0xaeb2, 0xabf6, 0xced6, 0xcedd, 0xced5, 0xced8, 0xcedc, 0xd1b2,
+  0xac44, 0xcee1, 0xcee2, 0xcee4, 0xabf5, 0xaec1, 0xd1be, 0xaebf,
+  0xaec0, 0xd1b4, 0xd1c4, 0xaeb6, 0xd566, 0xd1c6, 0xd1c0, 0xd1b7,
+  0xd1c9, 0xd1ba, 0xaebc, 0xd57d, 0xd1bd, 0xaebe, 0xaeb5, 0xd1cb,
+  0xd1bf, 0xaeb8, 0xd1b8, 0xd1b5, 0xd1b6, 0xaeb9, 0xd1c5, 0xd1cc,
+  0xaebb, 0xd1bc, 0xd1bb, 0xaec3, 0xaec2, 0xaeb4, 0xaeba, 0xaebd,
+  0xd1c8, 0xd1c2, 0xaeb7, 0xd1b3, 0xd1ca, 0xd1c1, 0xd1c3, 0xd1c7,
+  0xd567, 0xb1b7, 0xb1cb, 0xb1ca, 0xb1bf, 0xd579, 0xd575, 0xd572,
+  0xd5a6, 0xb1ba, 0xb1b2, 0xd577, 0xb4a8, 0xb1b6, 0xd5a1, 0xb1cc,
+  0xb1c9, 0xd57b, 0xd56a, 0xb1c8, 0xd5a3, 0xd569, 0xb1bd, 0xb1c1,
+  0xd5a2, 0xd573, 0xb1c2, 0xb1bc, 0xd568, 0xb478, 0xd5a5, 0xd571,
+  0xb1c7, 0xd574, 0xd5a4, 0xb1c6, 0xd952, 0xb1b3, 0xd56f, 0xb1b8,
+  0xb1c3, 0xb1be, 0xd578, 0xd56e, 0xd56c, 0xd57e, 0xb1b0, 0xb1c4,
+  0xb1b4, 0xb477, 0xd57c, 0xb1b5, 0xb1b1, 0xb1c0, 0xb1bb, 0xb1b9,
+  0xd570, 0xb1c5, 0xd56d, 0xd57a, 0xd576, 0xd954, 0xd953, 0xd56b,
+  0xd964, 0xb47a, 0xd96a, 0xd959, 0xd967, 0xdd77, 0xb47d, 0xd96b,
+  0xd96e, 0xb47c, 0xd95c, 0xd96d, 0xd96c, 0xb47e, 0xd955, 0xb479,
+  0xb4a3, 0xb4a1, 0xd969, 0xd95f, 0xb4a5, 0xd970, 0xd968, 0xd971,
+  0xb4ad, 0xb4ab, 0xd966, 0xd965, 0xd963, 0xd95d, 0xb4a4, 0xb4a2,
+  0xd1b9, 0xd956, 0xddb7, 0xd957, 0xb47b, 0xb4aa, 0xdd79, 0xb4a6,
+  0xb4a7, 0xd958, 0xd96f, 0xdd78, 0xd960, 0xd95b, 0xb4a9, 0xd961,
+  0xd95e, 0xb4ae, 0xb770, 0xdd7c, 0xddb1, 0xddb6, 0xddaa, 0xb76c,
+  0xddbb, 0xb769, 0xdd7a, 0xdd7b, 0xb762, 0xb76b, 0xdda4, 0xb76e,
+  0xb76f, 0xdda5, 0xddb2, 0xddb8, 0xb76a, 0xb764, 0xdda3, 0xdd7d,
+  0xddba, 0xdda8, 0xdda9, 0xdd7e, 0xddb4, 0xddab, 0xddb5, 0xddad,
+  0xb765, 0xe1d9, 0xb768, 0xb766, 0xddb9, 0xddb0, 0xddac, 0xdda1,
+  0xba53, 0xddaf, 0xb76d, 0xdda7, 0xdda6, 0xb767, 0xb763, 0xe1ee,
+  0xddb3, 0xddae, 0xdda2, 0xe1e9, 0xe1da, 0xe1e5, 0xe1ec, 0xba51,
+  0xb4ac, 0xe1ea, 0xba4c, 0xba4b, 0xe1f1, 0xe1db, 0xe1e8, 0xe1dc,
+  0xe1e7, 0xba4f, 0xe1eb, 0xd962, 0xe1f2, 0xe1e3, 0xba52, 0xe5ba,
+  0xbcaf, 0xe1f0, 0xe1ef, 0xba54, 0xe5ad, 0xbcb0, 0xe5ae, 0xe1df,
+  0xe1e0, 0xe1dd, 0xe1e2, 0xe1de, 0xe1f3, 0xba4e, 0xbcb1, 0xba50,
+  0xba55, 0xe1e1, 0xe1ed, 0xe1e6, 0xe5b1, 0xba4a, 0xbcb4, 0xe9aa,
+  0xe5b6, 0xe5b5, 0xe5b7, 0xe5b4, 0xbcb5, 0xbcbb, 0xbcb8, 0xbcb9,
+  0xe5af, 0xe5b2, 0xe5bc, 0xbcc1, 0xbcbf, 0xe5b3, 0xd95a, 0xbcb2,
+  0xe5b9, 0xe5b0, 0xbcc2, 0xe5b8, 0xba4d, 0xbcb7, 0xe1e4, 0xbcba,
+  0xbcbe, 0xbcc0, 0xbcbd, 0xbcbc, 0xbcb6, 0xe5bb, 0xbcb3, 0xbcc3,
+  0xbed8, 0xbed9, 0xe9a9, 0xbee2, 0xbedf, 0xbed6, 0xbedd, 0xe9ab,
+  0xbedb, 0xbed5, 0xbedc, 0xe9a8, 0xc0bb, 0xbed7, 0xbede, 0xc0ba,
+  0xe9a7, 0xe9a6, 0xbee0, 0xbee1, 0xe9a5, 0xe9a4, 0xc0bc, 0xe9ae,
+  0xbeda, 0xe9ac, 0xc0bd, 0xc0c2, 0xecea, 0xecec, 0xc0bf, 0xeced,
+  0xece9, 0xeceb, 0xc0c0, 0xc0c3, 0xece8, 0xc0be, 0xc0c1, 0xc259,
+  0xe9ad, 0xc258, 0xc25e, 0xefd4, 0xc25c, 0xc25d, 0xefd7, 0xefd3,
+  0xc25a, 0xefd1, 0xc36b, 0xefd5, 0xefd6, 0xefd2, 0xc25b, 0xf242,
+  0xf245, 0xf246, 0xf244, 0xf247, 0xc36c, 0xf243, 0xf44e, 0xc464,
+  0xf44d, 0xf44c, 0xf44b, 0xc463, 0xc465, 0xf5cd, 0xc4e2, 0xc4e1,
+  0xf6e1, 0xf6e0, 0xf6e3, 0xc5cb, 0xc575, 0xf7dd, 0xf6e2, 0xf7dc,
+  0xc5cd, 0xc5cc, 0xc5f3, 0xf8a9, 0xf8ef, 0xa4e4, 0xd972, 0xe9af,
+  0xa6ac, 0xcaf7, 0xa7f1, 0xa7ef, 0xa7f0, 0xccc1, 0xa9f1, 0xac46,
+  0xcee7, 0xcee8, 0xac47, 0xd1ce, 0xaec4, 0xaec5, 0xd1cd, 0xb1d3,
+  0xb1cf, 0xd5a7, 0xb1d6, 0xb1d5, 0xb1ce, 0xb1d1, 0xb1d4, 0xb1d0,
+  0xd976, 0xb1cd, 0xb4af, 0xb4b1, 0xb4b2, 0xd975, 0xd978, 0xb4b0,
+  0xd973, 0xd977, 0xd974, 0xb771, 0xddbc, 0xba56, 0xe1f4, 0xbee3,
+  0xbcc4, 0xe5bd, 0xbcc5, 0xbcc6, 0xe5bf, 0xe5be, 0xe5c0, 0xe9b1,
+  0xe9b0, 0xecef, 0xecee, 0xc0c4, 0xc0c5, 0xf248, 0xa4e5, 0xd979,
+  0xb4b4, 0xb4b3, 0xddbd, 0xefd8, 0xc4e3, 0xf7de, 0xa4e6, 0xaec6,
+  0xb1d8, 0xb1d7, 0xd97a, 0xd97b, 0xb772, 0xe1f5, 0xba57, 0xe9b2,
+  0xa4e7, 0xa5b8, 0xa9f2, 0xccc2, 0xcee9, 0xac48, 0xb1d9, 0xd97c,
+  0xb4b5, 0xb773, 0xe5c1, 0xe5c2, 0xecf0, 0xc25f, 0xf8f0, 0xa4e8,
+  0xccc3, 0xa9f3, 0xac49, 0xceea, 0xaec7, 0xd1d2, 0xd1d0, 0xd1d1,
+  0xaec8, 0xd1cf, 0xb1db, 0xb1dc, 0xd5a8, 0xb1dd, 0xb1da, 0xd97d,
+  0xd97e, 0xddbe, 0xba59, 0xba58, 0xecf1, 0xefd9, 0xf24a, 0xf249,
+  0xf44f, 0xc95e, 0xac4a, 0xa4e9, 0xa5b9, 0xa6ae, 0xa6ad, 0xa6af,
+  0xa6b0, 0xc9ee, 0xc9ed, 0xcaf8, 0xa7f2, 0xcafb, 0xcafa, 0xcaf9,
+  0xcafc, 0xa9f4, 0xccc9, 0xccc5, 0xccce, 0xa9fb, 0xa9f9, 0xccca,
+  0xccc6, 0xcccd, 0xa9f8, 0xaa40, 0xccc8, 0xccc4, 0xa9fe, 0xcccb,
+  0xa9f7, 0xcccc, 0xa9fa, 0xa9fc, 0xccd0, 0xcccf, 0xccc7, 0xa9f6,
+  0xa9f5, 0xa9fd, 0xceef, 0xcef5, 0xac50, 0xac4d, 0xceec, 0xcef1,
+  0xac53, 0xac4b, 0xcef0, 0xac4e, 0xac51, 0xcef3, 0xac4c, 0xcef8,
+  0xac4f, 0xac52, 0xceed, 0xcef2, 0xcef6, 0xceee, 0xceeb, 0xcef7,
+  0xcef4, 0xaed0, 0xaec9, 0xaecc, 0xaecf, 0xd1d5, 0xaeca, 0xd1d3,
+  0xaece, 0xaecb, 0xd1d6, 0xaecd, 0xd5ac, 0xb1df, 0xd5ab, 0xd5ad,
+  0xb1de, 0xb1e3, 0xd1d4, 0xd5aa, 0xd5ae, 0xb1e0, 0xd5a9, 0xb1e2,
+  0xb1e1, 0xd9a7, 0xd9a2, 0xb4b6, 0xb4ba, 0xb4b7, 0xd9a5, 0xd9a8,
+  0xb4b8, 0xb4b9, 0xb4be, 0xddc7, 0xd9a6, 0xb4bc, 0xd9a3, 0xd9a1,
+  0xb4bd, 0xd9a4, 0xb779, 0xddbf, 0xb776, 0xb777, 0xb775, 0xddc4,
+  0xddc3, 0xddc0, 0xb77b, 0xddc2, 0xb4bb, 0xddc6, 0xddc1, 0xb778,
+  0xb774, 0xb77a, 0xddc5, 0xba5c, 0xe1f8, 0xe1f7, 0xe1f6, 0xba5a,
+  0xba5b, 0xe5c5, 0xe5c8, 0xbcc8, 0xbcc7, 0xe5c9, 0xe5c4, 0xbcca,
+  0xe5c6, 0xbcc9, 0xe5c3, 0xe5c7, 0xbee9, 0xbee6, 0xe9bb, 0xe9ba,
+  0xe9b9, 0xe9b4, 0xe9b5, 0xbee7, 0xbee4, 0xbee8, 0xe9b3, 0xbee5,
+  0xe9b6, 0xe9b7, 0xe9bc, 0xe9b8, 0xecf2, 0xc0c7, 0xefdc, 0xc0c6,
+  0xefda, 0xefdb, 0xc260, 0xc36e, 0xf24b, 0xc36d, 0xf451, 0xf452,
+  0xc466, 0xf450, 0xc4e4, 0xf7df, 0xc5ce, 0xf8aa, 0xf8ab, 0xa4ea,
+  0xa6b1, 0xa6b2, 0xa7f3, 0xccd1, 0xac54, 0xaed1, 0xb1e4, 0xb0d2,
+  0xb4bf, 0xb4c0, 0xb3cc, 0xd9a9, 0xb77c, 0xe1fa, 0xe1f9, 0xa4eb,
+  0xa6b3, 0xccd2, 0xaa42, 0xaa41, 0xcef9, 0xcefa, 0xd1d7, 0xd1d8,
+  0xaed2, 0xaed3, 0xaed4, 0xd5af, 0xb1e6, 0xb4c2, 0xb4c1, 0xddc8,
+  0xdf7a, 0xe1fb, 0xe9bd, 0xc261, 0xc467, 0xa4ec, 0xa5bc, 0xa5bd,
+  0xa5bb, 0xa5be, 0xa5ba, 0xa6b6, 0xc9f6, 0xa6b5, 0xa6b7, 0xc9f1,
+  0xc9f0, 0xc9f3, 0xc9f2, 0xc9f5, 0xa6b4, 0xc9ef, 0xc9f4, 0xcafd,
+  0xa7fd, 0xcafe, 0xcb43, 0xa7fc, 0xcb47, 0xcb42, 0xcb45, 0xa7f5,
+  0xa7f6, 0xa7f7, 0xa7f8, 0xa840, 0xcb41, 0xa7fa, 0xa841, 0xcb40,
+  0xcb46, 0xa7f9, 0xcb44, 0xa7fb, 0xa7f4, 0xa7fe, 0xaa57, 0xccd4,
+  0xaa43, 0xaa4d, 0xaa4e, 0xaa46, 0xaa58, 0xaa48, 0xccdc, 0xaa53,
+  0xccd7, 0xaa49, 0xcce6, 0xcce7, 0xccdf, 0xccd8, 0xaa56, 0xcce4,
+  0xaa51, 0xaa4f, 0xcce5, 0xcce3, 0xccdb, 0xccd3, 0xccda, 0xaa4a,
+  0xaa50, 0xaa44, 0xccde, 0xccdd, 0xccd5, 0xaa52, 0xcce1, 0xccd6,
+  0xaa55, 0xcce8, 0xaa45, 0xaa4c, 0xccd9, 0xcce2, 0xaa54, 0xaa47,
+  0xaa4b, 0xcce0, 0xcf5b, 0xac5c, 0xac69, 0xcf56, 0xcf4c, 0xac62,
+  0xcf4a, 0xac5b, 0xcf45, 0xac65, 0xcf52, 0xcefe, 0xcf41, 0xcf44,
+  0xcefb, 0xcf51, 0xcf61, 0xac60, 0xcf46, 0xcf58, 0xcefd, 0xcf5f,
+  0xcf60, 0xcf63, 0xcf5a, 0xcf4b, 0xcf53, 0xac66, 0xac59, 0xac61,
+  0xac6d, 0xac56, 0xac58, 0xcf43, 0xac6a, 0xac63, 0xcf5d, 0xcf40,
+  0xac6c, 0xac67, 0xcf49, 0xac6b, 0xcf50, 0xcf48, 0xac64, 0xcf5c,
+  0xcf54, 0xac5e, 0xcf62, 0xcf47, 0xac5a, 0xcf59, 0xcf4f, 0xac5f,
+  0xcf55, 0xac57, 0xcefc, 0xac68, 0xaee3, 0xac5d, 0xcf4e, 0xcf4d,
+  0xcf42, 0xcf5e, 0xcf57, 0xac55, 0xd1ec, 0xaeea, 0xd1ed, 0xd1e1,
+  0xaedf, 0xaeeb, 0xd1da, 0xd1e3, 0xd1eb, 0xd1d9, 0xd1f4, 0xaed5,
+  0xd1f3, 0xd1ee, 0xd1ef, 0xaedd, 0xaee8, 0xd1e5, 0xd1e6, 0xd1f0,
+  0xd1e7, 0xd1e2, 0xd1dc, 0xd1dd, 0xd1ea, 0xd1e4, 0xaed6, 0xaeda,
+  0xd1f2, 0xd1de, 0xaee6, 0xaee2, 0xaee5, 0xaeec, 0xaedb, 0xaee7,
+  0xd1e9, 0xaee9, 0xaed8, 0xaed7, 0xd1db, 0xd1df, 0xaee0, 0xd1f1,
+  0xd1e8, 0xd1e0, 0xaee4, 0xaee1, 0xaed9, 0xaedc, 0xd5c4, 0xd5b4,
+  0xd5b5, 0xd5b9, 0xd5c8, 0xd5c5, 0xd5be, 0xd5bd, 0xb1ed, 0xd5c1,
+  0xd5d0, 0xd5b0, 0xd5d1, 0xd5c3, 0xd5d5, 0xd5c9, 0xb1ec, 0xd5c7,
+  0xb1e7, 0xb1fc, 0xb1f2, 0xb1f6, 0xb1f5, 0xd5b1, 0xd5ce, 0xd5d4,
+  0xd5cc, 0xd5d3, 0xd5c0, 0xd5b2, 0xd5d2, 0xd5c2, 0xb1ea, 0xb1f7,
+  0xd5cb, 0xb1f0, 0xd5ca, 0xd5b3, 0xb1f8, 0xb1fa, 0xd5cd, 0xb1fb,
+  0xb1e9, 0xd5ba, 0xd5cf, 0xb1ef, 0xb1f9, 0xd5bc, 0xd5c6, 0xd5b7,
+  0xd5bb, 0xb1f4, 0xd5b6, 0xb1e8, 0xb1f1, 0xb1ee, 0xd5bf, 0xaede,
+  0xd9c0, 0xb1eb, 0xb1f3, 0xd9c3, 0xd9d9, 0xd9ce, 0xb4d6, 0xb4d1,
+  0xd9bd, 0xb4d2, 0xd9cd, 0xd9c6, 0xd9d3, 0xb4ce, 0xd9ab, 0xd9d5,
+  0xb4c4, 0xd9b3, 0xb4c7, 0xb4c6, 0xb4d7, 0xd9ad, 0xd9cf, 0xd9d0,
+  0xb4c9, 0xb4c5, 0xd9bb, 0xb4d0, 0xd9b6, 0xd9d1, 0xb4cc, 0xd9c9,
+  0xd9d6, 0xd9b0, 0xd9b5, 0xd9af, 0xb4cb, 0xd9c2, 0xddde, 0xd9b1,
+  0xb4cf, 0xd9ba, 0xd9d2, 0xb4ca, 0xd9b7, 0xd9b4, 0xd9c5, 0xb4cd,
+  0xb4c3, 0xb4d9, 0xd9c8, 0xd9c7, 0xd9ac, 0xb4c8, 0xd9d4, 0xd9bc,
+  0xd9be, 0xd9cb, 0xd9ca, 0xd9aa, 0xb4d3, 0xb4d5, 0xd9b2, 0xd9b9,
+  0xd9c1, 0xb4d4, 0xd9b8, 0xd9c4, 0xd9d7, 0xd9cc, 0xd9d8, 0xd9ae,
+  0xddf2, 0xb7a6, 0xddf0, 0xdddb, 0xdde0, 0xddd9, 0xddec, 0xddcb,
+  0xddd2, 0xddea, 0xddf4, 0xdddc, 0xddcf, 0xdde2, 0xdde7, 0xddd3,
+  0xdde4, 0xddd0, 0xddd7, 0xddd8, 0xb7a8, 0xddeb, 0xdde9, 0xddcc,
+  0xddee, 0xddef, 0xddf1, 0xb7ac, 0xb7a4, 0xd5b8, 0xddd4, 0xdde6,
+  0xddd5, 0xb7a1, 0xb7b1, 0xdded, 0xb7af, 0xb7ab, 0xddca, 0xb7a3,
+  0xddcd, 0xb7b0, 0xdddd, 0xddc9, 0xb7a9, 0xdde1, 0xddd1, 0xb7aa,
+  0xddda, 0xb77e, 0xb4d8, 0xdde3, 0xd9bf, 0xddce, 0xdde8, 0xb7a5,
+  0xdde5, 0xb7a2, 0xdddf, 0xb7ad, 0xddd6, 0xddf3, 0xb7a7, 0xdec6,
+  0xb7ae, 0xe24a, 0xe248, 0xe25e, 0xe246, 0xe258, 0xb77d, 0xba5f,
+  0xe242, 0xe25d, 0xe247, 0xe255, 0xba64, 0xba5d, 0xe25b, 0xe240,
+  0xe25a, 0xba6f, 0xe251, 0xe261, 0xba6d, 0xe249, 0xba5e, 0xe24b,
+  0xe259, 0xba67, 0xe244, 0xba6b, 0xba61, 0xe24d, 0xe243, 0xe1fc,
+  0xe257, 0xba68, 0xe260, 0xe1fd, 0xba65, 0xe253, 0xba66, 0xe245,
+  0xe250, 0xe24c, 0xe24e, 0xba60, 0xe25f, 0xba6e, 0xe24f, 0xe262,
+  0xe1fe, 0xe254, 0xba63, 0xba6c, 0xba6a, 0xe241, 0xe256, 0xba69,
+  0xba62, 0xe252, 0xe25c, 0xe5d5, 0xe5d1, 0xe5cd, 0xe5e1, 0xe5de,
+  0xbccd, 0xe5e5, 0xe5d4, 0xbcd8, 0xe5db, 0xe5d0, 0xe5da, 0xbcd5,
+  0xe5ee, 0xe5eb, 0xe5dd, 0xe5ce, 0xe5e2, 0xe5e4, 0xbcd1, 0xe5d8,
+  0xe5d3, 0xe5ca, 0xbcce, 0xbcd6, 0xe5e7, 0xbcd7, 0xe5cb, 0xe5ed,
+  0xe5e0, 0xe5e6, 0xbcd4, 0xe5e3, 0xe5ea, 0xbcd9, 0xbcd3, 0xe5dc,
+  0xe5cf, 0xe5ef, 0xe5cc, 0xe5e8, 0xbcd0, 0xe5d6, 0xe5d7, 0xbccf,
+  0xbccc, 0xe5d2, 0xbcd2, 0xbccb, 0xe5e9, 0xe5ec, 0xe5d9, 0xe9ca,
+  0xe9c2, 0xe9be, 0xbef6, 0xbeeb, 0xbef0, 0xbeec, 0xe9cc, 0xe9d7,
+  0xbeea, 0xe9c4, 0xe9cd, 0xe5df, 0xe9ce, 0xbef1, 0xe9dd, 0xbef5,
+  0xbef8, 0xe9c0, 0xbef4, 0xe9db, 0xe9dc, 0xe9d2, 0xe9d1, 0xe9c9,
+  0xe9d3, 0xe9da, 0xe9d9, 0xbeef, 0xbeed, 0xe9cb, 0xe9c8, 0xe9c5,
+  0xe9d8, 0xbef7, 0xe9d6, 0xbef3, 0xbef2, 0xe9d0, 0xe9bf, 0xe9c1,
+  0xe9c3, 0xe9d5, 0xe9cf, 0xbeee, 0xe9c6, 0xe9d4, 0xe9c7, 0xc0cf,
+  0xed45, 0xc0c8, 0xecf5, 0xed41, 0xc0ca, 0xed48, 0xecfc, 0xecf7,
+  0xed49, 0xecf3, 0xecfe, 0xc0d1, 0xed44, 0xed4a, 0xecfd, 0xc0c9,
+  0xed40, 0xecf4, 0xc0d0, 0xed47, 0xecf9, 0xc0cc, 0xecfb, 0xecf8,
+  0xc0d2, 0xecfa, 0xc0cb, 0xc0ce, 0xed43, 0xecf6, 0xed46, 0xed42,
+  0xc263, 0xefe7, 0xc268, 0xc269, 0xc262, 0xefe6, 0xefe3, 0xefe4,
+  0xc266, 0xefde, 0xefe2, 0xc265, 0xefdf, 0xc267, 0xc264, 0xefdd,
+  0xefe1, 0xefe5, 0xf251, 0xf24e, 0xf257, 0xf256, 0xf254, 0xf24f,
+  0xc372, 0xf250, 0xc371, 0xc0cd, 0xf253, 0xc370, 0xf258, 0xf252,
+  0xf24d, 0xefe0, 0xc36f, 0xf24c, 0xf456, 0xf455, 0xf255, 0xc468,
+  0xf459, 0xf45a, 0xf454, 0xf458, 0xf453, 0xf5d1, 0xf457, 0xc4e7,
+  0xc4e5, 0xf5cf, 0xf5d2, 0xf5ce, 0xf5d0, 0xc4e6, 0xf6e5, 0xf6e6,
+  0xc576, 0xf6e4, 0xf7e2, 0xc5cf, 0xf7e0, 0xf7e1, 0xf8ac, 0xc656,
+  0xf8f3, 0xf8f1, 0xf8f2, 0xf8f4, 0xf9bb, 0xa4ed, 0xa6b8, 0xaa59,
+  0xcce9, 0xcf64, 0xd1f5, 0xd1f7, 0xd1f6, 0xd1f8, 0xb1fd, 0xd5d7,
+  0xd1f9, 0xd5d6, 0xd5d8, 0xd5d9, 0xd9da, 0xb4db, 0xd9db, 0xd9dd,
+  0xb4dc, 0xb4da, 0xd9dc, 0xddfa, 0xddf8, 0xddf7, 0xddf6, 0xddf5,
+  0xb7b2, 0xddf9, 0xba70, 0xe263, 0xe265, 0xba71, 0xe264, 0xbcdb,
+  0xbcda, 0xe5f0, 0xe9df, 0xe9de, 0xe9e0, 0xbef9, 0xed4b, 0xc0d3,
+  0xefe8, 0xc26a, 0xf259, 0xc577, 0xa4ee, 0xa5bf, 0xa6b9, 0xa842,
+  0xaa5a, 0xaa5b, 0xac6e, 0xd1fa, 0xb7b3, 0xe6d1, 0xbefa, 0xc26b,
+  0xa4ef, 0xa6ba, 0xcceb, 0xaa5c, 0xccea, 0xcf65, 0xac6f, 0xcf66,
+  0xac70, 0xd1fc, 0xaeee, 0xaeed, 0xd5de, 0xd5dc, 0xd5dd, 0xd5db,
+  0xd5da, 0xd9de, 0xd9e1, 0xb4de, 0xd9df, 0xb4dd, 0xd9e0, 0xddfb,
+  0xe266, 0xe267, 0xe268, 0xe5f3, 0xe5f2, 0xbcdc, 0xe5f1, 0xe5f4,
+  0xe9e1, 0xe9e2, 0xe9e3, 0xed4c, 0xc0d4, 0xc26c, 0xf25a, 0xc4e8,
+  0xc95f, 0xac71, 0xcf67, 0xaeef, 0xb1fe, 0xb4df, 0xd9e2, 0xb7b5,
+  0xb7b4, 0xe269, 0xe26a, 0xbcdd, 0xbcde, 0xe9e5, 0xe9e4, 0xefe9,
+  0xf7e3, 0xa4f0, 0xc960, 0xa5c0, 0xa843, 0xcb48, 0xac72, 0xb7b6,
+  0xa4f1, 0xcf68, 0xac73, 0xcf69, 0xc0d5, 0xa4f2, 0xccec, 0xcf6a,
+  0xd242, 0xd241, 0xd1fe, 0xd1fd, 0xd243, 0xd240, 0xb240, 0xb241,
+  0xb4e0, 0xd9e3, 0xd9e4, 0xd9e5, 0xde41, 0xde42, 0xde40, 0xddfd,
+  0xddfe, 0xb7b7, 0xe26b, 0xe5f7, 0xe5f6, 0xe5f5, 0xe5f8, 0xe9e7,
+  0xe9e6, 0xbefb, 0xe9e8, 0xc0d6, 0xed4d, 0xefea, 0xf25b, 0xf6e7,
+  0xa4f3, 0xa5c2, 0xa5c1, 0xaa5d, 0xc961, 0xc97e, 0xa6bb, 0xc9f7,
+  0xcb49, 0xcb4a, 0xaa5e, 0xcced, 0xac74, 0xcf6b, 0xcf6c, 0xaef0,
+  0xaef4, 0xd244, 0xaef3, 0xaef1, 0xaef2, 0xd5df, 0xb242, 0xb4e3,
+  0xb4e1, 0xb4e2, 0xd9e6, 0xba72, 0xa4f4, 0xc9a1, 0xa5c3, 0xc9a4,
+  0xa5c6, 0xc9a3, 0xa5c5, 0xa5c4, 0xa844, 0xc9a2, 0xc9f8, 0xc9fc,
+  0xc9fe, 0xca40, 0xa6c5, 0xa6c6, 0xc9fb, 0xa6c1, 0xc9f9, 0xc9fd,
+  0xa6c2, 0xa6bd, 0xa6be, 0xa6c4, 0xc9fa, 0xa6bc, 0xa845, 0xa6bf,
+  0xa6c0, 0xa6c3, 0xcb5b, 0xcb59, 0xcb4c, 0xa851, 0xcb53, 0xa84c,
+  0xcb4d, 0xcb55, 0xcb52, 0xa84f, 0xcb51, 0xa856, 0xcb5a, 0xa858,
+  0xa85a, 0xcb4b, 0xa84d, 0xcb5c, 0xa854, 0xa857, 0xcd45, 0xa847,
+  0xa85e, 0xa855, 0xcb4e, 0xa84a, 0xa859, 0xcb56, 0xa848, 0xa849,
+  0xcd43, 0xcb4f, 0xa850, 0xa85b, 0xcb5d, 0xcb50, 0xa84e, 0xa853,
+  0xccee, 0xa85c, 0xcb57, 0xa852, 0xa85d, 0xa846, 0xcb54, 0xa84b,
+  0xcb58, 0xcd44, 0xaa6a, 0xaa7a, 0xccf5, 0xaa71, 0xcd4b, 0xaa62,
+  0xaa65, 0xcd42, 0xccf3, 0xccf7, 0xaa6d, 0xaa6f, 0xccfa, 0xaa76,
+  0xaa68, 0xaa66, 0xaa67, 0xaa75, 0xcd47, 0xaa70, 0xccf9, 0xccfb,
+  0xaa6e, 0xaa73, 0xccfc, 0xcd4a, 0xac75, 0xaa79, 0xaa63, 0xcd49,
+  0xcd4d, 0xccf8, 0xcd4f, 0xcd40, 0xaa6c, 0xccf4, 0xaa6b, 0xaa7d,
+  0xaa72, 0xccf2, 0xcf75, 0xaa78, 0xaa7c, 0xcd41, 0xcd46, 0xaa7e,
+  0xaa77, 0xaa69, 0xaa5f, 0xaa64, 0xccf6, 0xaa60, 0xcd4e, 0xccf0,
+  0xccef, 0xccfd, 0xccf1, 0xaa7b, 0xaef5, 0xaa74, 0xccfe, 0xaa61,
+  0xaca6, 0xcd4c, 0xcf7c, 0xcfa1, 0xcfa4, 0xcf77, 0xcfa7, 0xcfaa,
+  0xcfac, 0xcf74, 0xac76, 0xac7b, 0xd249, 0xacad, 0xcfa5, 0xcfad,
+  0xcf7b, 0xcf73, 0xd264, 0xac7e, 0xcfa2, 0xcf78, 0xcf7a, 0xaca5,
+  0xcf7d, 0xac7d, 0xcf70, 0xcfa8, 0xcfab, 0xac7a, 0xaca8, 0xcf6d,
+  0xacaa, 0xac78, 0xacae, 0xcfa9, 0xcf6f, 0xacab, 0xd25e, 0xcd48,
+  0xac7c, 0xac77, 0xcf76, 0xcf6e, 0xacac, 0xaca4, 0xcfa3, 0xaca9,
+  0xaca7, 0xcf79, 0xaca1, 0xcf71, 0xaca2, 0xaca3, 0xcf72, 0xcfa6,
+  0xac79, 0xcf7e, 0xd24c, 0xaefd, 0xaf43, 0xd255, 0xd25b, 0xd257,
+  0xd24a, 0xd24d, 0xd246, 0xd247, 0xaf4a, 0xaefa, 0xd256, 0xd25f,
+  0xaf45, 0xaef6, 0xaf40, 0xd24e, 0xaf42, 0xd24f, 0xd259, 0xaf44,
+  0xd268, 0xd248, 0xaefc, 0xaefb, 0xaf48, 0xd245, 0xd266, 0xd25a,
+  0xd267, 0xd261, 0xd253, 0xd262, 0xd25c, 0xd265, 0xd263, 0xaf49,
+  0xd254, 0xaef9, 0xaef8, 0xaf41, 0xaf47, 0xd260, 0xaf46, 0xd251,
+  0xb243, 0xd269, 0xd250, 0xd24b, 0xaefe, 0xaf4b, 0xaef7, 0xd258,
+  0xd25d, 0xb265, 0xd5e1, 0xd5e5, 0xb252, 0xb250, 0xb247, 0xd5e3,
+  0xd5e2, 0xb25b, 0xd5e8, 0xb255, 0xd5fa, 0xd647, 0xb244, 0xd5f7,
+  0xd5f0, 0xb267, 0xd5e0, 0xd5fc, 0xb264, 0xb258, 0xb263, 0xb24e,
+  0xd5ec, 0xd5fe, 0xd5f6, 0xb24f, 0xb249, 0xd645, 0xd5fd, 0xd640,
+  0xb251, 0xb259, 0xd642, 0xd5ea, 0xd5fb, 0xd5ef, 0xd644, 0xb25e,
+  0xb246, 0xb25c, 0xd5f4, 0xd5f2, 0xd5f3, 0xb253, 0xd5ee, 0xd5ed,
+  0xb248, 0xd5e7, 0xd646, 0xb24a, 0xd5f1, 0xb268, 0xb262, 0xd5e6,
+  0xb25f, 0xb25d, 0xb266, 0xd5f8, 0xb261, 0xd252, 0xd5f9, 0xb260,
+  0xd641, 0xb245, 0xd5f5, 0xb257, 0xd5e9, 0xb256, 0xb254, 0xb24c,
+  0xb24b, 0xd9e7, 0xd643, 0xd5eb, 0xd9fc, 0xb24d, 0xb541, 0xb25a,
+  0xb4ee, 0xd9f6, 0xb4fc, 0xd9ea, 0xb4eb, 0xb4e7, 0xda49, 0xb4ed,
+  0xb4f1, 0xb4ec, 0xb4f5, 0xda4d, 0xda44, 0xd9f1, 0xb4fa, 0xb4f4,
+  0xd9fd, 0xb4e4, 0xda4a, 0xda43, 0xb4e8, 0xd9f7, 0xb4f7, 0xda55,
+  0xda56, 0xb4e5, 0xda48, 0xb4f9, 0xd9fb, 0xd9ed, 0xd9ee, 0xb4fd,
+  0xd9f2, 0xd9f9, 0xd9f3, 0xb4fb, 0xb544, 0xd9ef, 0xd9e8, 0xd9e9,
+  0xd9eb, 0xb4ea, 0xd9f8, 0xb4f8, 0xb542, 0xd9fa, 0xda53, 0xda4b,
+  0xb4e6, 0xda51, 0xb4f2, 0xb4f0, 0xda57, 0xb4ef, 0xda41, 0xd9f4,
+  0xd9fe, 0xb547, 0xda45, 0xda42, 0xd9f0, 0xb543, 0xda4f, 0xda4c,
+  0xda54, 0xb4e9, 0xda40, 0xb546, 0xda47, 0xb4f3, 0xb4f6, 0xda46,
+  0xb545, 0xd9f5, 0xd5e4, 0xda50, 0xda4e, 0xda52, 0xd9ec, 0xb540,
+  0xde61, 0xde60, 0xde46, 0xb7bd, 0xde5f, 0xde49, 0xde4a, 0xb7c7,
+  0xde68, 0xb7c2, 0xde5e, 0xde43, 0xb7c8, 0xb7be, 0xde52, 0xde48,
+  0xde4b, 0xde63, 0xb7b8, 0xde6a, 0xde62, 0xb7c1, 0xde57, 0xb7cc,
+  0xb7cb, 0xb7c5, 0xde69, 0xb7b9, 0xde55, 0xde4c, 0xde59, 0xde65,
+  0xb7cd, 0xb7bb, 0xde54, 0xde4d, 0xb7c4, 0xb7c3, 0xde50, 0xde5a,
+  0xde64, 0xde47, 0xde51, 0xb7bc, 0xde5b, 0xb7c9, 0xb7c0, 0xde4e,
+  0xb7bf, 0xde45, 0xde53, 0xde67, 0xb4fe, 0xbab0, 0xde56, 0xe26c,
+  0xde58, 0xde66, 0xb7c6, 0xde4f, 0xb7ba, 0xb7ca, 0xbcf0, 0xde44,
+  0xde5d, 0xde5c, 0xe2aa, 0xbaad, 0xe27d, 0xe2a4, 0xbaa2, 0xe26e,
+  0xbaaf, 0xba77, 0xe26d, 0xe2b0, 0xbab1, 0xe271, 0xe2a3, 0xe273,
+  0xe2b3, 0xe2af, 0xba75, 0xbaa1, 0xe653, 0xbaae, 0xba7d, 0xe26f,
+  0xe2ae, 0xbaa3, 0xe2ab, 0xe2b8, 0xe275, 0xe27e, 0xe2b6, 0xe2ac,
+  0xba7c, 0xe27c, 0xba76, 0xba74, 0xbaa8, 0xe27a, 0xe277, 0xe278,
+  0xe2b2, 0xe2b7, 0xe2b5, 0xba7a, 0xe2b9, 0xba7e, 0xbaa7, 0xe270,
+  0xe5fa, 0xe279, 0xba78, 0xbaac, 0xbaa9, 0xba7b, 0xe2a5, 0xe274,
+  0xbaaa, 0xe2a7, 0xbaa4, 0xbaa6, 0xba73, 0xe2a9, 0xe2a1, 0xe272,
+  0xbaa5, 0xe2b1, 0xe2b4, 0xe27b, 0xe2a8, 0xba79, 0xbcdf, 0xe2a6,
+  0xe5f9, 0xe2ad, 0xe276, 0xe644, 0xe64e, 0xbce2, 0xe64d, 0xe659,
+  0xbce4, 0xe64b, 0xe64f, 0xbcef, 0xe646, 0xbce7, 0xe652, 0xe9f0,
+  0xbcf3, 0xbcf2, 0xe654, 0xe643, 0xe65e, 0xbced, 0xbce3, 0xe657,
+  0xe65b, 0xe660, 0xe655, 0xe649, 0xbce6, 0xbce9, 0xbcf1, 0xbcec,
+  0xe64c, 0xe2a2, 0xe648, 0xe65f, 0xbce8, 0xbceb, 0xe661, 0xbce0,
+  0xe656, 0xe5fb, 0xe65c, 0xc0df, 0xe64a, 0xbce1, 0xe645, 0xbce5,
+  0xe5fc, 0xbaab, 0xe641, 0xe65a, 0xe642, 0xe640, 0xbcea, 0xe658,
+  0xe5fe, 0xe651, 0xe650, 0xe65d, 0xe647, 0xbcee, 0xe9f3, 0xbf49,
+  0xbefe, 0xea40, 0xe9eb, 0xbf41, 0xe9f7, 0xbf48, 0xbf43, 0xe9f5,
+  0xed4f, 0xe9fb, 0xea42, 0xe9fa, 0xe9e9, 0xe9f8, 0xea44, 0xea46,
+  0xbefd, 0xea45, 0xbf44, 0xbf4a, 0xbf47, 0xe9fe, 0xbf46, 0xe9f9,
+  0xe9ed, 0xe9f2, 0xe9fd, 0xbf45, 0xbf42, 0xbefc, 0xbf40, 0xe9f1,
+  0xe5fd, 0xe9ec, 0xe9ef, 0xea41, 0xe9f4, 0xe9ea, 0xed4e, 0xea43,
+  0xe9ee, 0xe9fc, 0xed51, 0xc0e3, 0xc0d7, 0xc0db, 0xed53, 0xed59,
+  0xed57, 0xc0d9, 0xc0da, 0xc0e1, 0xed5a, 0xed52, 0xc0dc, 0xed56,
+  0xed55, 0xed5b, 0xc0e2, 0xc0dd, 0xc0e0, 0xed54, 0xc0e4, 0xc0de,
+  0xc0e5, 0xc0d8, 0xed58, 0xed50, 0xeff7, 0xc271, 0xeff4, 0xeff6,
+  0xc26f, 0xeff2, 0xeff3, 0xefee, 0xe9f6, 0xefef, 0xc270, 0xefeb,
+  0xc26d, 0xeff8, 0xc26e, 0xefec, 0xefed, 0xeff1, 0xc273, 0xc272,
+  0xeff0, 0xc378, 0xf25f, 0xf265, 0xc379, 0xf25c, 0xc376, 0xc373,
+  0xf267, 0xc377, 0xc374, 0xf25e, 0xf261, 0xf262, 0xf263, 0xf266,
+  0xeff5, 0xf25d, 0xc375, 0xf264, 0xf268, 0xf260, 0xf45d, 0xc46a,
+  0xf460, 0xc46b, 0xf468, 0xf45f, 0xf45c, 0xf45e, 0xf462, 0xf465,
+  0xf464, 0xf467, 0xf45b, 0xc469, 0xf463, 0xf466, 0xf469, 0xf461,
+  0xf5d3, 0xf5d4, 0xf5d8, 0xf5d9, 0xf5d6, 0xf5d7, 0xf5d5, 0xc4e9,
+  0xc578, 0xf6eb, 0xf6e8, 0xf6e9, 0xf6ea, 0xc579, 0xf7e5, 0xf7e4,
+  0xf8af, 0xc5f4, 0xf8ad, 0xf8b0, 0xf8ae, 0xf8f5, 0xc657, 0xc665,
+  0xf9a3, 0xf96c, 0xf9a2, 0xf9d0, 0xf9d1, 0xa4f5, 0xa6c7, 0xca41,
+  0xcb5e, 0xa85f, 0xa862, 0xcb5f, 0xa860, 0xa861, 0xcd58, 0xcd5a,
+  0xcd55, 0xcd52, 0xcd54, 0xaaa4, 0xaaa2, 0xcd56, 0xaaa3, 0xcd53,
+  0xcd50, 0xaaa1, 0xcd57, 0xcd51, 0xaaa5, 0xcd59, 0xcfaf, 0xcfb3,
+  0xacb7, 0xcfb6, 0xacaf, 0xacb2, 0xacb4, 0xacb6, 0xacb3, 0xcfb2,
+  0xcfb1, 0xacb1, 0xcfb4, 0xcfb5, 0xcfae, 0xacb5, 0xacb0, 0xcfb0,
+  0xd277, 0xd278, 0xd279, 0xaf50, 0xaf4c, 0xd26e, 0xd276, 0xd27b,
+  0xaf51, 0xd26c, 0xd272, 0xd26b, 0xd275, 0xd271, 0xaf4d, 0xaf4f,
+  0xd27a, 0xd26a, 0xd26d, 0xd273, 0xd274, 0xd27c, 0xd270, 0xaf4e,
+  0xb26d, 0xd64e, 0xd650, 0xd64c, 0xd658, 0xd64a, 0xd657, 0xb269,
+  0xd648, 0xda5b, 0xd652, 0xb26c, 0xd653, 0xd656, 0xd65a, 0xd64f,
+  0xd654, 0xb26a, 0xb26b, 0xd659, 0xd64d, 0xd649, 0xd65b, 0xd651,
+  0xd655, 0xd64b, 0xb548, 0xb549, 0xda65, 0xb54f, 0xda59, 0xda62,
+  0xda58, 0xb54c, 0xda60, 0xda5e, 0xda5f, 0xb54a, 0xda63, 0xda5c,
+  0xda5a, 0xb54b, 0xda5d, 0xda61, 0xb54d, 0xda64, 0xde70, 0xde77,
+  0xde79, 0xdea1, 0xb7da, 0xde6b, 0xb7d2, 0xde7a, 0xb7d7, 0xdea2,
+  0xb7ce, 0xde7d, 0xde6d, 0xde7e, 0xde6c, 0xb7dc, 0xde78, 0xb7cf,
+  0xdea3, 0xb7d4, 0xde71, 0xb7d9, 0xde7c, 0xde6f, 0xde76, 0xde72,
+  0xde6e, 0xb7d1, 0xb7d8, 0xb7d6, 0xb7d3, 0xb7db, 0xb7d0, 0xde75,
+  0xb7d5, 0xb54e, 0xde7b, 0xde73, 0xde74, 0xe2c1, 0xbab4, 0xe2bd,
+  0xe2c3, 0xe2bf, 0xbab6, 0xe2be, 0xe2c2, 0xe2ba, 0xe2bc, 0xbab5,
+  0xe2c0, 0xe2bb, 0xbab7, 0xbab2, 0xe2c4, 0xbab3, 0xe667, 0xe664,
+  0xe670, 0xe66a, 0xe66c, 0xbcf4, 0xe666, 0xe66e, 0xe66d, 0xe66b,
+  0xe671, 0xbcf7, 0xe668, 0xe66f, 0xbcf5, 0xe663, 0xe665, 0xbcf6,
+  0xe662, 0xe672, 0xe669, 0xea4a, 0xbf51, 0xea55, 0xea53, 0xbf4b,
+  0xea49, 0xea4c, 0xea4d, 0xea48, 0xbf55, 0xbf56, 0xea47, 0xea56,
+  0xea51, 0xbf4f, 0xbf4c, 0xea50, 0xea4e, 0xbf52, 0xea52, 0xbf4d,
+  0xbf4e, 0xea4f, 0xbf50, 0xea4b, 0xea54, 0xbf53, 0xea57, 0xea58,
+  0xbf54, 0xc0e7, 0xc0ee, 0xed5c, 0xed62, 0xed60, 0xc0ea, 0xc0e9,
+  0xc0e6, 0xed5e, 0xc0ec, 0xc0eb, 0xc0e8, 0xed61, 0xed5d, 0xed5f,
+  0xc0ed, 0xc277, 0xeffb, 0xc274, 0xc275, 0xeffd, 0xc276, 0xeffa,
+  0xeff9, 0xf26c, 0xeffc, 0xf26d, 0xc37a, 0xf26b, 0xf26a, 0xf269,
+  0xc37b, 0xc46c, 0xf46a, 0xf46b, 0xf5dc, 0xf5db, 0xc4ea, 0xf5da,
+  0xf6ec, 0xf6ed, 0xf7e6, 0xf8b1, 0xf8f6, 0xf9bc, 0xc679, 0xf9c6,
+  0xa4f6, 0xaaa6, 0xaaa7, 0xacb8, 0xc0ef, 0xa4f7, 0xaaa8, 0xaf52,
+  0xb7dd, 0xa4f8, 0xb26e, 0xbab8, 0xc962, 0xcfb7, 0xd27d, 0xe2c5,
+  0xc0f0, 0xa4f9, 0xaaa9, 0xcfb8, 0xcfb9, 0xda66, 0xb550, 0xdea4,
+  0xb7de, 0xe2c6, 0xbcf8, 0xc37c, 0xa4fa, 0xda67, 0xa4fb, 0xa6c9,
+  0xca42, 0xa6c8, 0xa865, 0xa864, 0xa863, 0xcb60, 0xaaaa, 0xaaab,
+  0xcd5b, 0xcfba, 0xcfbd, 0xacba, 0xcfbb, 0xacb9, 0xcfbc, 0xacbb,
+  0xd2a2, 0xd2a1, 0xd27e, 0xaf53, 0xd65d, 0xd65e, 0xb26f, 0xd65c,
+  0xd65f, 0xb552, 0xb270, 0xb551, 0xda6b, 0xda6a, 0xda68, 0xda69,
+  0xda6c, 0xdea6, 0xdea5, 0xdea9, 0xdea8, 0xdea7, 0xbab9, 0xe2c9,
+  0xe2c8, 0xbaba, 0xe2c7, 0xe673, 0xe674, 0xbcf9, 0xea59, 0xea5a,
+  0xf272, 0xc37d, 0xf271, 0xf270, 0xf26e, 0xf26f, 0xc4eb, 0xf46c,
+  0xf6ee, 0xf8f7, 0xa4fc, 0xc9a5, 0xa5c7, 0xc9a6, 0xca43, 0xca44,
+  0xcb66, 0xcb62, 0xcb61, 0xaaac, 0xcb65, 0xa867, 0xcb63, 0xa866,
+  0xcb67, 0xcb64, 0xcd5f, 0xcfbe, 0xcd5d, 0xcd64, 0xaaad, 0xaab0,
+  0xcd65, 0xcd61, 0xcd62, 0xcd5c, 0xaaaf, 0xcd5e, 0xaaae, 0xcd63,
+  0xcd60, 0xcfc2, 0xacbd, 0xacbe, 0xcfc5, 0xcfbf, 0xcfc4, 0xcfc0,
+  0xacbc, 0xcfc3, 0xcfc1, 0xd2a8, 0xd2a5, 0xd2a7, 0xaf58, 0xaf57,
+  0xaf55, 0xd2a4, 0xd2a9, 0xaf54, 0xaf56, 0xd2a6, 0xd667, 0xd2a3,
+  0xd2aa, 0xd662, 0xd666, 0xd665, 0xda6e, 0xda79, 0xd668, 0xd663,
+  0xda6d, 0xb274, 0xb273, 0xd661, 0xd664, 0xb275, 0xb272, 0xb271,
+  0xd660, 0xd669, 0xda70, 0xda77, 0xb554, 0xda76, 0xda73, 0xb556,
+  0xda75, 0xda6f, 0xda71, 0xda74, 0xda72, 0xb555, 0xda78, 0xb553,
+  0xb7df, 0xdead, 0xdeac, 0xdeaa, 0xb7e2, 0xb7e1, 0xdeae, 0xdeab,
+  0xe2ca, 0xbabb, 0xb7e0, 0xdeb0, 0xdeaf, 0xe2cd, 0xe2cb, 0xbcfa,
+  0xbabc, 0xe2cc, 0xe676, 0xbcfb, 0xe675, 0xe67e, 0xe67d, 0xe67b,
+  0xe67a, 0xe677, 0xe678, 0xe679, 0xe67c, 0xe6a1, 0xea5f, 0xea5c,
+  0xea5d, 0xbf57, 0xea5b, 0xea61, 0xea60, 0xea5e, 0xed64, 0xed65,
+  0xc0f1, 0xc0f2, 0xed63, 0xc279, 0xeffe, 0xc278, 0xc37e, 0xc3a1,
+  0xc46d, 0xf46e, 0xf46d, 0xf5dd, 0xf6ef, 0xc57a, 0xf7e8, 0xf7e7,
+  0xf7e9, 0xa5c8, 0xcfc6, 0xaf59, 0xb276, 0xd66a, 0xa5c9, 0xc9a7,
+  0xa4fd, 0xca45, 0xcb6c, 0xcb6a, 0xcb6b, 0xcb68, 0xa868, 0xcb69,
+  0xcd6d, 0xaab3, 0xcd6b, 0xcd67, 0xcd6a, 0xcd66, 0xaab5, 0xcd69,
+  0xaab2, 0xaab1, 0xaab4, 0xcd6c, 0xcd68, 0xacc2, 0xacc5, 0xcfce,
+  0xcfcd, 0xcfcc, 0xacbf, 0xcfd5, 0xcfcb, 0xacc1, 0xd2af, 0xcfd2,
+  0xcfd0, 0xacc4, 0xcfc8, 0xcfd3, 0xcfca, 0xcfd4, 0xcfd1, 0xcfc9,
+  0xacc0, 0xcfd6, 0xcfc7, 0xacc3, 0xd2b4, 0xd2ab, 0xd2b6, 0xd2ae,
+  0xd2b9, 0xd2ba, 0xd2ac, 0xd2b8, 0xd2b5, 0xd2b3, 0xd2b7, 0xaf5f,
+  0xaf5d, 0xd2b1, 0xd2ad, 0xd2b0, 0xd2bb, 0xd2b2, 0xaf5e, 0xcfcf,
+  0xaf5a, 0xaf5c, 0xd678, 0xd66d, 0xd66b, 0xd66c, 0xd673, 0xd674,
+  0xd670, 0xb27b, 0xd675, 0xd672, 0xd66f, 0xb279, 0xd66e, 0xb277,
+  0xb27a, 0xd671, 0xd679, 0xaf5b, 0xb278, 0xd677, 0xd676, 0xb27c,
+  0xda7e, 0xdaa1, 0xb560, 0xdaa7, 0xdaa9, 0xdaa2, 0xb55a, 0xdaa6,
+  0xdaa5, 0xb55b, 0xb561, 0xb562, 0xdaa8, 0xb558, 0xda7d, 0xda7b,
+  0xdaa3, 0xda7a, 0xb55f, 0xda7c, 0xdaa4, 0xdaaa, 0xb559, 0xb55e,
+  0xb55c, 0xb55d, 0xb557, 0xb7e9, 0xdeb7, 0xb7e8, 0xdebb, 0xdeb1,
+  0xdebc, 0xdeb2, 0xdeb3, 0xdebd, 0xdeba, 0xdeb8, 0xdeb9, 0xdeb5,
+  0xdeb4, 0xdebe, 0xb7e5, 0xdeb6, 0xb7ea, 0xb7e4, 0xb7eb, 0xb7ec,
+  0xb7e7, 0xb7e6, 0xe2ce, 0xbabe, 0xbabd, 0xe2d3, 0xbcfc, 0xbabf,
+  0xbac1, 0xe2d4, 0xb7e3, 0xbac0, 0xe2d0, 0xe2d2, 0xe2cf, 0xe2d1,
+  0xe6ab, 0xe6aa, 0xe6a7, 0xbd40, 0xea62, 0xbd41, 0xe6a6, 0xbcfe,
+  0xe6a8, 0xe6a5, 0xe6a2, 0xe6a9, 0xe6a3, 0xe6a4, 0xbcfd, 0xed69,
+  0xea66, 0xea65, 0xea67, 0xed66, 0xbf5a, 0xea63, 0xbf58, 0xbf5c,
+  0xbf5b, 0xea64, 0xea68, 0xbf59, 0xed6d, 0xc0f5, 0xc27a, 0xc0f6,
+  0xc0f3, 0xed6a, 0xed68, 0xed6b, 0xed6e, 0xc0f4, 0xed6c, 0xed67,
+  0xf042, 0xf045, 0xf275, 0xf040, 0xf46f, 0xf046, 0xc3a2, 0xf044,
+  0xc27b, 0xf041, 0xf043, 0xf047, 0xf276, 0xf274, 0xc3a3, 0xf273,
+  0xc46e, 0xc4ed, 0xf6f1, 0xc4ec, 0xf6f3, 0xf6f0, 0xf6f2, 0xc5d0,
+  0xf8b2, 0xa5ca, 0xcd6e, 0xd2bc, 0xd2bd, 0xb27d, 0xdebf, 0xbf5d,
+  0xc3a4, 0xc57b, 0xf8b3, 0xa5cb, 0xcd6f, 0xa260, 0xcfd7, 0xcfd8,
+  0xd2be, 0xd2bf, 0xb27e, 0xb2a1, 0xdaab, 0xdec2, 0xdec1, 0xdec0,
+  0xe2d5, 0xe2d6, 0xe2d7, 0xbac2, 0xe6ad, 0xe6ac, 0xea69, 0xbf5e,
+  0xbf5f, 0xed72, 0xed6f, 0xed70, 0xed71, 0xf049, 0xf048, 0xc27c,
+  0xf277, 0xf5de, 0xa5cc, 0xacc6, 0xb2a2, 0xdec3, 0xa5cd, 0xd2c0,
+  0xb2a3, 0xb563, 0xb564, 0xa5ce, 0xa5cf, 0xca46, 0xa86a, 0xa869,
+  0xacc7, 0xcfd9, 0xdaac, 0xa5d0, 0xa5d1, 0xa5d2, 0xa5d3, 0xa86b,
+  0xa86c, 0xcb6e, 0xcb6d, 0xaab6, 0xcd72, 0xcd70, 0xcd71, 0xcfda,
+  0xcfdb, 0xaccb, 0xacc9, 0xacca, 0xacc8, 0xaf60, 0xaf64, 0xaf63,
+  0xd2c1, 0xaf62, 0xaf61, 0xd2c2, 0xb2a6, 0xd67b, 0xd67a, 0xb2a4,
+  0xb2a5, 0xb566, 0xb565, 0xdaae, 0xdaad, 0xb2a7, 0xb7ed, 0xdec5,
+  0xb7ee, 0xdec4, 0xe2d8, 0xe6ae, 0xbd42, 0xea6a, 0xed73, 0xc3a6,
+  0xc3a5, 0xc57c, 0xa5d4, 0xcd73, 0xb2a8, 0xe2d9, 0xbac3, 0xcb6f,
+  0xcb70, 0xcd74, 0xaab8, 0xaab9, 0xaab7, 0xaccf, 0xacd0, 0xaccd,
+  0xacce, 0xcfdc, 0xcfdd, 0xaccc, 0xd2c3, 0xaf68, 0xaf69, 0xb2ab,
+  0xd2c9, 0xaf6e, 0xaf6c, 0xd2ca, 0xd2c5, 0xaf6b, 0xaf6a, 0xaf65,
+  0xd2c8, 0xd2c7, 0xd2c4, 0xaf6d, 0xd2c6, 0xaf66, 0xaf67, 0xb2ac,
+  0xd6a1, 0xd6a2, 0xb2ad, 0xd67c, 0xd67e, 0xd6a4, 0xd6a3, 0xd67d,
+  0xb2a9, 0xb2aa, 0xdab6, 0xb56b, 0xb56a, 0xdab0, 0xb568, 0xdab3,
+  0xb56c, 0xdab4, 0xb56d, 0xdab1, 0xb567, 0xb569, 0xdab5, 0xdab2,
+  0xdaaf, 0xded2, 0xdec7, 0xb7f0, 0xb7f3, 0xb7f2, 0xb7f7, 0xb7f6,
+  0xded3, 0xded1, 0xdeca, 0xdece, 0xdecd, 0xb7f4, 0xded0, 0xdecc,
+  0xded4, 0xdecb, 0xb7f5, 0xb7ef, 0xb7f1, 0xdec9, 0xe2db, 0xbac7,
+  0xe2df, 0xbac6, 0xe2dc, 0xbac5, 0xdec8, 0xdecf, 0xe2de, 0xbac8,
+  0xe2e0, 0xe2dd, 0xe2da, 0xe6b1, 0xe6b5, 0xe6b7, 0xe6b3, 0xe6b2,
+  0xe6b0, 0xbd45, 0xbd43, 0xbd48, 0xbd49, 0xe6b4, 0xbd46, 0xe6af,
+  0xbd47, 0xbac4, 0xe6b6, 0xbd44, 0xea6c, 0xea6b, 0xea73, 0xea6d,
+  0xea72, 0xea6f, 0xbf60, 0xea71, 0xbf61, 0xbf62, 0xea70, 0xea6e,
+  0xc0f8, 0xed74, 0xc0f7, 0xed77, 0xed75, 0xed76, 0xc0f9, 0xf04d,
+  0xc2a1, 0xf04e, 0xc27d, 0xf04f, 0xc27e, 0xf04c, 0xf050, 0xf04a,
+  0xc3a7, 0xf278, 0xc3a8, 0xc46f, 0xf04b, 0xc470, 0xc4ee, 0xf5df,
+  0xc57e, 0xf6f4, 0xc57d, 0xf7ea, 0xc5f5, 0xc5f6, 0xf9cc, 0xacd1,
+  0xcfde, 0xb56e, 0xb56f, 0xa5d5, 0xa6ca, 0xca47, 0xcb71, 0xa86d,
+  0xaaba, 0xacd2, 0xacd3, 0xacd4, 0xd6a6, 0xd2cb, 0xaf6f, 0xb2ae,
+  0xd6a5, 0xdab8, 0xb571, 0xdab7, 0xb570, 0xded5, 0xbd4a, 0xe6bb,
+  0xe6b8, 0xe6b9, 0xe6ba, 0xed78, 0xf051, 0xf471, 0xf470, 0xf6f5,
+  0xa5d6, 0xcd75, 0xaf70, 0xb572, 0xded6, 0xe2e1, 0xbd4b, 0xea74,
+  0xf052, 0xf472, 0xa5d7, 0xaabb, 0xacd7, 0xcfdf, 0xacd8, 0xacd6,
+  0xacd5, 0xd2cc, 0xaf71, 0xaf72, 0xaf73, 0xb2b0, 0xd6a7, 0xb2af,
+  0xdab9, 0xb2b1, 0xb573, 0xded7, 0xb7f8, 0xb7f9, 0xbac9, 0xbaca,
+  0xbd4c, 0xbf64, 0xea75, 0xbf63, 0xed79, 0xc0fa, 0xf053, 0xf473,
+  0xa5d8, 0xa86e, 0xcd78, 0xcd77, 0xaabc, 0xcd76, 0xaabd, 0xcd79,
+  0xcfe5, 0xacdb, 0xacda, 0xcfe7, 0xcfe6, 0xacdf, 0xacde, 0xacd9,
+  0xcfe1, 0xcfe2, 0xcfe3, 0xace0, 0xcfe0, 0xacdc, 0xcfe4, 0xacdd,
+  0xd2cf, 0xd2d3, 0xd2d1, 0xd2d0, 0xd2d4, 0xd2d5, 0xd2d6, 0xd2ce,
+  0xd2cd, 0xaf75, 0xaf76, 0xd2d7, 0xd2d2, 0xd6b0, 0xd2d8, 0xaf77,
+  0xaf74, 0xd6aa, 0xd6a9, 0xd6ab, 0xd6ac, 0xd6ae, 0xd6ad, 0xd6b2,
+  0xb2b5, 0xb2b2, 0xb2b6, 0xd6a8, 0xb2b7, 0xd6b1, 0xb2b4, 0xd6af,
+  0xb2b3, 0xdabc, 0xdabe, 0xdaba, 0xdabb, 0xdabf, 0xdac1, 0xdac2,
+  0xdabd, 0xdac0, 0xb574, 0xdedb, 0xdee0, 0xded8, 0xdedc, 0xdee1,
+  0xdedd, 0xb7fa, 0xb843, 0xb7fd, 0xded9, 0xdeda, 0xbace, 0xb846,
+  0xb7fe, 0xb844, 0xb7fc, 0xdedf, 0xb845, 0xdede, 0xb841, 0xb7fb,
+  0xb842, 0xdee2, 0xe2e6, 0xe2e8, 0xb840, 0xe2e3, 0xbacc, 0xe2e9,
+  0xbacd, 0xe2e7, 0xe2e2, 0xe2e5, 0xe2ea, 0xbacb, 0xe2e4, 0xbd4e,
+  0xe6bf, 0xe6be, 0xbd51, 0xbd4f, 0xe6bc, 0xbd4d, 0xe6bd, 0xbd50,
+  0xea7d, 0xeaa1, 0xea7e, 0xea76, 0xea7a, 0xea79, 0xea77, 0xbf66,
+  0xbf67, 0xbf65, 0xea78, 0xea7b, 0xea7c, 0xbf68, 0xc140, 0xeda3,
+  0xc0fc, 0xed7b, 0xc0fe, 0xc141, 0xc0fd, 0xeda2, 0xed7c, 0xc0fb,
+  0xeda1, 0xed7a, 0xed7e, 0xed7d, 0xf055, 0xc2a4, 0xc2a5, 0xc2a2,
+  0xc2a3, 0xf054, 0xf27b, 0xc3a9, 0xf279, 0xf27a, 0xf474, 0xf477,
+  0xf475, 0xf476, 0xf5e0, 0xc4ef, 0xf7eb, 0xf8b4, 0xc5f7, 0xf8f8,
+  0xf8f9, 0xc666, 0xa5d9, 0xace1, 0xdac3, 0xdee3, 0xa5da, 0xa86f,
+  0xaabe, 0xcfe8, 0xcfe9, 0xaf78, 0xdac4, 0xb575, 0xb847, 0xc142,
+  0xeda4, 0xf27c, 0xf478, 0xa5db, 0xcda1, 0xcd7a, 0xcd7c, 0xcd7e,
+  0xcd7d, 0xcd7b, 0xaabf, 0xace2, 0xcff2, 0xcfed, 0xcfea, 0xcff1,
+  0xace4, 0xace5, 0xcff0, 0xcfef, 0xcfee, 0xcfeb, 0xcfec, 0xcff3,
+  0xace3, 0xaf7c, 0xafa4, 0xafa3, 0xd2e1, 0xd2db, 0xd2d9, 0xafa1,
+  0xd6b9, 0xaf7a, 0xd2de, 0xd2e2, 0xd2e4, 0xd2e0, 0xd2da, 0xafa2,
+  0xd2df, 0xd2dd, 0xaf79, 0xd2e5, 0xafa5, 0xd2e3, 0xaf7d, 0xd2dc,
+  0xaf7e, 0xaf7b, 0xb2b9, 0xd6ba, 0xd6b3, 0xd6b5, 0xd6b7, 0xd6b8,
+  0xd6b6, 0xb2ba, 0xd6bb, 0xd6b4, 0xdac8, 0xb576, 0xdad0, 0xdac5,
+  0xdad1, 0xdac6, 0xdac7, 0xdacf, 0xdace, 0xdacb, 0xb2b8, 0xb577,
+  0xdac9, 0xdacc, 0xb578, 0xdacd, 0xdaca, 0xdeee, 0xdef2, 0xb84e,
+  0xe2f0, 0xb851, 0xdef0, 0xdeed, 0xdee8, 0xdeea, 0xdeeb, 0xdee4,
+  0xb84d, 0xb84c, 0xb848, 0xdee7, 0xb84f, 0xb850, 0xdee6, 0xdee9,
+  0xdef1, 0xb84a, 0xb84b, 0xdeef, 0xdee5, 0xe2f2, 0xbad0, 0xe2f4,
+  0xdeec, 0xe2f6, 0xbad4, 0xe2f7, 0xe2f3, 0xbad1, 0xe2ef, 0xbad3,
+  0xe2ec, 0xe2f1, 0xe2f5, 0xe2ee, 0xb849, 0xe2eb, 0xbad2, 0xe2ed,
+  0xbd54, 0xe6c1, 0xbd58, 0xbd56, 0xbacf, 0xe6c8, 0xe6c9, 0xbd53,
+  0xe6c7, 0xe6ca, 0xbd55, 0xbd52, 0xe6c3, 0xe6c0, 0xe6c5, 0xe6c2,
+  0xbd59, 0xe6c4, 0xe6c6, 0xbd57, 0xbf6a, 0xeaa8, 0xeaa2, 0xeaa6,
+  0xeaac, 0xeaad, 0xeaa9, 0xeaaa, 0xeaa7, 0xeaa4, 0xbf6c, 0xbf69,
+  0xeaa3, 0xeaa5, 0xbf6b, 0xeaab, 0xc146, 0xedaa, 0xeda5, 0xc145,
+  0xc143, 0xedac, 0xc144, 0xeda8, 0xeda9, 0xeda6, 0xedad, 0xf056,
+  0xc147, 0xeda7, 0xedae, 0xedab, 0xf05a, 0xf057, 0xc2a6, 0xf05b,
+  0xf05d, 0xf05c, 0xf058, 0xf059, 0xf2a3, 0xc3aa, 0xf27e, 0xf2a2,
+  0xf27d, 0xf2a4, 0xf2a1, 0xf47a, 0xf47d, 0xf479, 0xc471, 0xf47b,
+  0xf47c, 0xf47e, 0xc472, 0xc474, 0xc473, 0xf5e1, 0xf5e3, 0xf5e2,
+  0xf6f6, 0xf8b5, 0xf8fa, 0xa5dc, 0xcb72, 0xaac0, 0xcda3, 0xaac1,
+  0xaac2, 0xcda2, 0xcff8, 0xcff7, 0xace6, 0xace9, 0xace8, 0xace7,
+  0xcff4, 0xcff6, 0xcff5, 0xd2e8, 0xafa7, 0xd2ec, 0xd2eb, 0xd2ea,
+  0xd2e6, 0xafa6, 0xafaa, 0xafad, 0xafae, 0xd2e7, 0xd2e9, 0xafac,
+  0xafab, 0xafa9, 0xafa8, 0xd6c2, 0xd6c0, 0xd6bc, 0xb2bb, 0xd6bd,
+  0xb2bc, 0xd6be, 0xd6bf, 0xd6c1, 0xb2bd, 0xdad5, 0xdad4, 0xdad3,
+  0xdad2, 0xdef6, 0xb852, 0xdef3, 0xdef5, 0xb853, 0xb854, 0xdef4,
+  0xe341, 0xe2f9, 0xe2fa, 0xbad7, 0xbad5, 0xbad6, 0xe343, 0xe342,
+  0xe2fe, 0xe2fd, 0xe2fc, 0xe2fb, 0xe340, 0xe2f8, 0xe6cb, 0xe6d0,
+  0xe6ce, 0xe6cd, 0xe6cc, 0xe6cf, 0xeaae, 0xbf6d, 0xc148, 0xedb0,
+  0xc149, 0xedaf, 0xf05f, 0xf05e, 0xc2a7, 0xf2a5, 0xc3ab, 0xf4a1,
+  0xc5a1, 0xf6f7, 0xf8b7, 0xf8b6, 0xc9a8, 0xacea, 0xaceb, 0xd6c3,
+  0xb856, 0xa5dd, 0xa872, 0xa871, 0xa870, 0xcda4, 0xaac4, 0xaac3,
+  0xacee, 0xcffa, 0xcffd, 0xcffb, 0xacec, 0xaced, 0xcff9, 0xcffc,
+  0xafb5, 0xd2f3, 0xd2f5, 0xd2f4, 0xafb2, 0xd2ef, 0xafb0, 0xafaf,
+  0xafb3, 0xafb1, 0xafb4, 0xd2f2, 0xd2ed, 0xd2ee, 0xd2f1, 0xd2f0,
+  0xd6c6, 0xd6c7, 0xd6c5, 0xd6c4, 0xb2be, 0xb57d, 0xdad6, 0xdad8,
+  0xdada, 0xb57c, 0xb57a, 0xdad7, 0xb57b, 0xdad9, 0xb579, 0xdf41,
+  0xdef7, 0xdefa, 0xdefe, 0xb85a, 0xdefc, 0xdefb, 0xdef8, 0xdef9,
+  0xb858, 0xdf40, 0xb857, 0xb85c, 0xb85b, 0xb859, 0xdefd, 0xe349,
+  0xe348, 0xe344, 0xbad8, 0xe347, 0xe346, 0xbad9, 0xbd5e, 0xe6d2,
+  0xbd5f, 0xbd5b, 0xbd5d, 0xbd5a, 0xbd5c, 0xeaaf, 0xbf70, 0xeab1,
+  0xeab0, 0xe345, 0xbf72, 0xbf71, 0xbf6e, 0xbf6f, 0xedb5, 0xedb3,
+  0xc14a, 0xedb4, 0xedb6, 0xedb2, 0xedb1, 0xf060, 0xc2aa, 0xc2a8,
+  0xc2a9, 0xf2a6, 0xf2a7, 0xc3ad, 0xc3ac, 0xf4a3, 0xf4a4, 0xf4a2,
+  0xf6f8, 0xf6f9, 0xa5de, 0xca48, 0xa873, 0xcda5, 0xaac6, 0xaac5,
+  0xcda6, 0xd040, 0xacef, 0xcffe, 0xacf0, 0xafb6, 0xd2f8, 0xd2f6,
+  0xd2fc, 0xafb7, 0xd2f7, 0xd2fb, 0xd2f9, 0xd2fa, 0xd6c8, 0xd6ca,
+  0xb2bf, 0xd6c9, 0xb2c0, 0xb5a2, 0xb5a1, 0xb57e, 0xdadb, 0xdf44,
+  0xb85d, 0xb85e, 0xdf43, 0xdf42, 0xe34a, 0xbadb, 0xbada, 0xe34b,
+  0xe34c, 0xbd61, 0xbd60, 0xeab5, 0xe6d3, 0xe6d5, 0xe6d4, 0xeab4,
+  0xeab2, 0xeab6, 0xeab3, 0xbf73, 0xedb7, 0xc14b, 0xedb8, 0xedb9,
+  0xc2ab, 0xc2ac, 0xc475, 0xc5d1, 0xa5df, 0xd041, 0xd2fd, 0xafb8,
+  0xb3ba, 0xb3b9, 0xb5a4, 0xdadd, 0xb5a3, 0xdadc, 0xdf45, 0xbadc,
+  0xe34d, 0xbadd, 0xc476, 0xf4a5, 0xa6cb, 0xaac7, 0xcda7, 0xacf2,
+  0xacf1, 0xd042, 0xd043, 0xd340, 0xd342, 0xafb9, 0xd344, 0xd347,
+  0xd345, 0xd346, 0xd343, 0xd2fe, 0xafba, 0xd348, 0xd341, 0xd6d3,
+  0xb2c6, 0xd6dc, 0xb2c3, 0xd6d5, 0xb2c7, 0xb2c1, 0xd6d0, 0xd6dd,
+  0xd6d1, 0xd6ce, 0xb2c5, 0xb2c2, 0xd6d4, 0xd6d7, 0xb2c4, 0xd6d8,
+  0xb2c8, 0xd6d9, 0xd6cf, 0xd6d6, 0xd6da, 0xd6d2, 0xd6cd, 0xd6cb,
+  0xd6db, 0xdadf, 0xdae4, 0xdae0, 0xdae6, 0xb5a7, 0xd6cc, 0xdae1,
+  0xb5a5, 0xdade, 0xb5ac, 0xdae2, 0xb5ab, 0xdae3, 0xb5ad, 0xb5a8,
+  0xb5ae, 0xb5a9, 0xb5aa, 0xb5a6, 0xdae5, 0xb861, 0xdf50, 0xdf53,
+  0xdf47, 0xdf4c, 0xdf46, 0xb863, 0xdf4a, 0xdf48, 0xb862, 0xdf4f,
+  0xdf4e, 0xdf4b, 0xdf4d, 0xdf49, 0xbae1, 0xdf52, 0xb85f, 0xdf51,
+  0xe35d, 0xbae8, 0xe358, 0xbae7, 0xe34e, 0xe350, 0xbae0, 0xe355,
+  0xe354, 0xe357, 0xbae5, 0xe352, 0xe351, 0xbae4, 0xbadf, 0xe353,
+  0xbae2, 0xe359, 0xe35b, 0xe356, 0xe34f, 0xbae3, 0xbd69, 0xbade,
+  0xe35c, 0xe6d9, 0xbd62, 0xe6db, 0xbd63, 0xbd65, 0xe6de, 0xe6d6,
+  0xbae6, 0xe6dc, 0xe6d8, 0xb860, 0xbd68, 0xbd64, 0xbd66, 0xbd67,
+  0xbf76, 0xe6dd, 0xe6d7, 0xbd6a, 0xe6da, 0xeac0, 0xeabb, 0xeac5,
+  0xbf74, 0xeabd, 0xbf78, 0xeac3, 0xeaba, 0xeab7, 0xeac6, 0xc151,
+  0xbf79, 0xeac2, 0xeab8, 0xbf77, 0xeabc, 0xbf7b, 0xeab9, 0xeabe,
+  0xbf7a, 0xeac1, 0xeac4, 0xedcb, 0xedcc, 0xedbc, 0xedc3, 0xedc1,
+  0xc14f, 0xedc8, 0xeabf, 0xedbf, 0xedc9, 0xc14e, 0xedbe, 0xedbd,
+  0xedc7, 0xedc4, 0xedc6, 0xedba, 0xedca, 0xc14c, 0xedc5, 0xedce,
+  0xedc2, 0xc150, 0xc14d, 0xedc0, 0xedbb, 0xedcd, 0xbf75, 0xf063,
+  0xf061, 0xf067, 0xc2b0, 0xf065, 0xf064, 0xc2b2, 0xf06a, 0xc2b1,
+  0xf06b, 0xf068, 0xc2ae, 0xf069, 0xf062, 0xc2af, 0xc2ad, 0xf2ab,
+  0xf066, 0xf06c, 0xf2a8, 0xc3b2, 0xc3b0, 0xf2aa, 0xf2ac, 0xf2a9,
+  0xc3b1, 0xc3ae, 0xc3af, 0xc3b3, 0xc478, 0xf4aa, 0xf4a9, 0xf4a7,
+  0xf4a6, 0xf4a8, 0xc477, 0xc479, 0xc4f0, 0xf5e5, 0xf5e4, 0xf6fa,
+  0xf6fc, 0xf6fe, 0xf6fd, 0xf6fb, 0xc5a3, 0xc5a2, 0xc5d3, 0xc5d2,
+  0xc5d4, 0xf7ed, 0xf7ec, 0xf8fb, 0xf8b8, 0xf8fc, 0xc658, 0xc659,
+  0xf96d, 0xc67e, 0xa6cc, 0xcda8, 0xd045, 0xd046, 0xd044, 0xacf3,
+  0xd047, 0xd048, 0xd049, 0xd349, 0xd34f, 0xd34d, 0xafbb, 0xd34b,
+  0xd34c, 0xd34e, 0xd34a, 0xb2c9, 0xd6de, 0xb2cb, 0xd6e0, 0xb2ca,
+  0xd6df, 0xdae8, 0xb5af, 0xdaea, 0xdae7, 0xd6e1, 0xb5b0, 0xdae9,
+  0xdf56, 0xb864, 0xdf54, 0xb865, 0xdf55, 0xb866, 0xbae9, 0xe361,
+  0xe35e, 0xe360, 0xbaea, 0xbaeb, 0xe35f, 0xe6df, 0xe6e0, 0xbd6b,
+  0xe6e2, 0xe6e1, 0xa261, 0xeaca, 0xeacb, 0xeac7, 0xeac8, 0xbf7c,
+  0xbf7d, 0xeac9, 0xc157, 0xc153, 0xc158, 0xc154, 0xc156, 0xc152,
+  0xc155, 0xc2b3, 0xedcf, 0xf2ae, 0xf2ad, 0xf4ab, 0xc47a, 0xc47b,
+  0xf741, 0xf5e6, 0xf740, 0xf8fd, 0xf9a4, 0xa6cd, 0xa874, 0xcda9,
+  0xaac8, 0xacf6, 0xd04c, 0xacf4, 0xd04a, 0xacf9, 0xacf5, 0xacfa,
+  0xacf8, 0xd04b, 0xacf7, 0xafbf, 0xafbe, 0xd35a, 0xafc7, 0xd353,
+  0xd359, 0xafc3, 0xd352, 0xd358, 0xd356, 0xafc2, 0xafc4, 0xd355,
+  0xafbd, 0xd354, 0xafc8, 0xafc5, 0xafc9, 0xafc6, 0xd351, 0xd350,
+  0xd357, 0xafc0, 0xafbc, 0xafc1, 0xd6f0, 0xd6e9, 0xb5b5, 0xd6e8,
+  0xb2cf, 0xb2d6, 0xb2d3, 0xb2d9, 0xb2d8, 0xb2d4, 0xd6e2, 0xd6e5,
+  0xd6e4, 0xb2d0, 0xd6e6, 0xd6ef, 0xb2d1, 0xd6e3, 0xd6ec, 0xd6ed,
+  0xb2d2, 0xd6ea, 0xb2d7, 0xb2cd, 0xb2d5, 0xd6e7, 0xb2cc, 0xd6eb,
+  0xd6ee, 0xdafb, 0xdaf2, 0xb5b2, 0xdaf9, 0xdaf6, 0xdaee, 0xdaf7,
+  0xb5b4, 0xdaef, 0xdaeb, 0xb86c, 0xdaf4, 0xb5b1, 0xdafa, 0xb5b8,
+  0xb5ba, 0xdaed, 0xb5b9, 0xdaf0, 0xb5b3, 0xdaf8, 0xdaf1, 0xdaf5,
+  0xdaf3, 0xb5b6, 0xdaec, 0xb5bb, 0xb2ce, 0xb5b7, 0xb5bc, 0xb868,
+  0xdf5d, 0xdf5f, 0xdf61, 0xdf65, 0xdf5b, 0xdf59, 0xb86a, 0xdf60,
+  0xdf64, 0xdf5c, 0xdf58, 0xdf57, 0xdf62, 0xdf5a, 0xdf5e, 0xb86b,
+  0xb869, 0xdf66, 0xb867, 0xdf63, 0xe372, 0xbaee, 0xe36a, 0xbd78,
+  0xe374, 0xbaf1, 0xe378, 0xbaf7, 0xe365, 0xe375, 0xe362, 0xe377,
+  0xe366, 0xbafe, 0xbafb, 0xe376, 0xe370, 0xbaed, 0xbaf5, 0xbaf4,
+  0xbaf3, 0xbaf9, 0xe363, 0xbafa, 0xe371, 0xbaf6, 0xbaec, 0xe373,
+  0xbaef, 0xbaf0, 0xbaf8, 0xe368, 0xe367, 0xe364, 0xe36c, 0xe369,
+  0xe36d, 0xbafd, 0xe379, 0xbaf2, 0xe36e, 0xe36f, 0xe36b, 0xbafc,
+  0xe6e7, 0xbd70, 0xbd79, 0xbd75, 0xe6e4, 0xbd72, 0xbd76, 0xe6f0,
+  0xbd6c, 0xe6e8, 0xbd74, 0xe6eb, 0xe6e6, 0xbd73, 0xbd77, 0xe6e5,
+  0xbd71, 0xe6ef, 0xbd6e, 0xe6ee, 0xe6ed, 0xbd7a, 0xe572, 0xbd6d,
+  0xe6ec, 0xe6e3, 0xbd7b, 0xe6ea, 0xbd6f, 0xe6e9, 0xbfa2, 0xbfa7,
+  0xbf7e, 0xead8, 0xeacf, 0xeadb, 0xead3, 0xead9, 0xbfa8, 0xbfa1,
+  0xeacc, 0xead2, 0xeadc, 0xead5, 0xeada, 0xeace, 0xead6, 0xbfa3,
+  0xead4, 0xbfa6, 0xbfa5, 0xead0, 0xead1, 0xeacd, 0xead7, 0xbfa4,
+  0xeade, 0xeadd, 0xedda, 0xedd6, 0xc15f, 0xedd0, 0xc159, 0xc169,
+  0xeddc, 0xc161, 0xc15d, 0xedd3, 0xc164, 0xc167, 0xedde, 0xc15c,
+  0xedd5, 0xc165, 0xede0, 0xeddd, 0xedd1, 0xc160, 0xc15a, 0xc168,
+  0xedd8, 0xc163, 0xedd2, 0xc15e, 0xeddf, 0xc162, 0xc15b, 0xedd9,
+  0xc166, 0xedd7, 0xeddb, 0xf06e, 0xf074, 0xc2b9, 0xf077, 0xc2b4,
+  0xc2b5, 0xf06f, 0xf076, 0xf071, 0xc2ba, 0xc2b7, 0xf06d, 0xc2b6,
+  0xf073, 0xf075, 0xc2b8, 0xf072, 0xf070, 0xf2b8, 0xc3b7, 0xc3b8,
+  0xc3b4, 0xc3b5, 0xf2b4, 0xf2b2, 0xf2b6, 0xc3ba, 0xf2b7, 0xf2b0,
+  0xf2af, 0xf2b3, 0xf2b1, 0xc3b6, 0xf2b5, 0xf4ac, 0xc47e, 0xc47d,
+  0xf4ad, 0xf4af, 0xf4ae, 0xc4a1, 0xf5eb, 0xf5e8, 0xf5e9, 0xf5e7,
+  0xf5ea, 0xc4f2, 0xf5ec, 0xc4f1, 0xf742, 0xc5d5, 0xc5d7, 0xf7ee,
+  0xc5d6, 0xf8b9, 0xf940, 0xf942, 0xf8fe, 0xf941, 0xc66c, 0xa6ce,
+  0xacfb, 0xd26f, 0xafca, 0xb2da, 0xdafc, 0xdafd, 0xeadf, 0xc16a,
+  0xede1, 0xc2bb, 0xf2ba, 0xf2b9, 0xc4a2, 0xf5ed, 0xf743, 0xc5f8,
+  0xca49, 0xaac9, 0xa875, 0xd04d, 0xd360, 0xd35b, 0xd35f, 0xd35d,
+  0xafcb, 0xd35e, 0xd35c, 0xd6f1, 0xdafe, 0xdb40, 0xdf69, 0xdf6a,
+  0xb86e, 0xb86f, 0xdf68, 0xdf6b, 0xdf67, 0xb86d, 0xbb40, 0xb870,
+  0xe37a, 0xbd7c, 0xe6f1, 0xbd7d, 0xbfa9, 0xeae2, 0xeae0, 0xeae1,
+  0xede4, 0xede3, 0xede2, 0xf2bb, 0xc3b9, 0xf2bc, 0xf744, 0xc5f9,
+  0xf8ba, 0xa6cf, 0xaacb, 0xaaca, 0xd04f, 0xacfc, 0xd04e, 0xd362,
+  0xafcc, 0xd6f2, 0xd361, 0xb2dc, 0xd6f5, 0xd6f3, 0xd6f4, 0xb2db,
+  0xdb42, 0xdb43, 0xdb41, 0xb873, 0xdf6d, 0xdf6c, 0xdf6e, 0xb872,
+  0xb871, 0xe6f2, 0xe6f4, 0xbd7e, 0xe6f3, 0xeae3, 0xbfaa, 0xf079,
+  0xf078, 0xc3bb, 0xf2bd, 0xc3bd, 0xc3bc, 0xf4b0, 0xf5ee, 0xc4f3,
+  0xa6d0, 0xd050, 0xacfd, 0xd365, 0xafce, 0xd364, 0xd363, 0xafcd,
+  0xd6fb, 0xd6fd, 0xd6f6, 0xd6f7, 0xb2dd, 0xd6f8, 0xb2de, 0xd6fc,
+  0xd6f9, 0xd6fa, 0xb2df, 0xb5be, 0xb5bf, 0xdb44, 0xdf6f, 0xdf70,
+  0xe37e, 0xbb43, 0xbb41, 0xbb42, 0xe37b, 0xe37c, 0xe37d, 0xe6f9,
+  0xe6fa, 0xbda1, 0xe6f7, 0xe6f6, 0xe6f8, 0xe6f5, 0xbfad, 0xeae4,
+  0xbfab, 0xbfac, 0xede6, 0xc16b, 0xede5, 0xefa8, 0xf07a, 0xf07b,
+  0xc2bc, 0xc2bd, 0xc16c, 0xf2be, 0xf2bf, 0xf4b1, 0xc4a3, 0xa6d1,
+  0xa6d2, 0xacfe, 0xaacc, 0xafcf, 0xd051, 0xb5c0, 0xa6d3, 0xad41,
+  0xd052, 0xd053, 0xad40, 0xad42, 0xa6d4, 0xd054, 0xafd1, 0xd366,
+  0xafd3, 0xafd0, 0xafd2, 0xd741, 0xb2e0, 0xd740, 0xd6fe, 0xdf71,
+  0xe3a1, 0xbda2, 0xbfae, 0xeae6, 0xeae5, 0xede7, 0xf5ef, 0xa6d5,
+  0xcb73, 0xcdaa, 0xad43, 0xd055, 0xd368, 0xafd4, 0xd367, 0xafd5,
+  0xd743, 0xb2e2, 0xd742, 0xd744, 0xb2e1, 0xdb46, 0xdb47, 0xdb45,
+  0xb5c1, 0xb874, 0xb875, 0xbb45, 0xe3a3, 0xe3a2, 0xbb44, 0xe6fb,
+  0xe6fc, 0xeae7, 0xc170, 0xc16f, 0xc16d, 0xc16e, 0xc171, 0xf07c,
+  0xc2bf, 0xc2be, 0xf2c0, 0xf4b2, 0xc5a5, 0xc5a4, 0xa6d6, 0xd1fb,
+  0xb877, 0xb5c2, 0xb876, 0xbb46, 0xa6d7, 0xc9a9, 0xa6d8, 0xa6d9,
+  0xcdab, 0xcb76, 0xcb77, 0xa877, 0xcb74, 0xa876, 0xa879, 0xcb75,
+  0xa87b, 0xa87a, 0xcb78, 0xa878, 0xaad1, 0xaacf, 0xcdad, 0xaace,
+  0xaad3, 0xaad5, 0xaad2, 0xcdb0, 0xcdac, 0xaad6, 0xaad0, 0xa87c,
+  0xaad4, 0xcdaf, 0xcdae, 0xaacd, 0xd05b, 0xad47, 0xad48, 0xd05d,
+  0xd057, 0xd05a, 0xd063, 0xd061, 0xad49, 0xd067, 0xad4c, 0xd064,
+  0xd05c, 0xd059, 0xdb49, 0xd062, 0xad44, 0xd065, 0xd056, 0xd05f,
+  0xad46, 0xad4b, 0xd060, 0xad4f, 0xad4d, 0xd058, 0xad4a, 0xd05e,
+  0xad4e, 0xad45, 0xd066, 0xafda, 0xafe3, 0xafd8, 0xafd6, 0xd36a,
+  0xafde, 0xafdb, 0xd36c, 0xafdd, 0xd36b, 0xd369, 0xd36e, 0xafe2,
+  0xafe0, 0xdb48, 0xd36f, 0xd36d, 0xafd7, 0xafd9, 0xafdc, 0xafdf,
+  0xafe1, 0xd74e, 0xb2e4, 0xd745, 0xd747, 0xd748, 0xd750, 0xd74c,
+  0xd74a, 0xd74d, 0xd751, 0xb2e5, 0xb2e9, 0xd746, 0xd74f, 0xb2e7,
+  0xb2e6, 0xd74b, 0xd749, 0xb2e3, 0xb2e8, 0xb5c8, 0xdb51, 0xdb4f,
+  0xb5ca, 0xdb4a, 0xdfa1, 0xb5c9, 0xdb4e, 0xdb4b, 0xb5c5, 0xb5cb,
+  0xdb50, 0xb5c7, 0xdb4d, 0xbb47, 0xb5c6, 0xdb4c, 0xb5cc, 0xb5c4,
+  0xb5c3, 0xdf77, 0xdf75, 0xdf7b, 0xdf73, 0xdfa2, 0xdf78, 0xdf72,
+  0xb87b, 0xb8a3, 0xdf7d, 0xdf76, 0xb87e, 0xb87c, 0xdf7e, 0xb879,
+  0xb878, 0xdf79, 0xb87d, 0xb5cd, 0xdf7c, 0xdf74, 0xb87a, 0xb8a1,
+  0xb8a2, 0xbb4c, 0xbb48, 0xbb4d, 0xe3a6, 0xe3a5, 0xe3a7, 0xbb4a,
+  0xe3a4, 0xbb4b, 0xe3aa, 0xe3a9, 0xe3a8, 0xbb49, 0xe741, 0xe744,
+  0xbda8, 0xe743, 0xbda7, 0xbda3, 0xbda4, 0xbda5, 0xe740, 0xe6fe,
+  0xbda6, 0xe742, 0xe6fd, 0xeae9, 0xeaf3, 0xbfb1, 0xbfb0, 0xeaed,
+  0xeaef, 0xeaea, 0xeaee, 0xeae8, 0xeaf1, 0xbfaf, 0xeaf0, 0xeaec,
+  0xeaf2, 0xeaeb, 0xc174, 0xede8, 0xedee, 0xc178, 0xc17a, 0xc177,
+  0xc176, 0xc175, 0xc173, 0xede9, 0xedec, 0xc172, 0xeded, 0xc179,
+  0xedeb, 0xedea, 0xc2c0, 0xc2c1, 0xf0a1, 0xf07d, 0xf07e, 0xf2c2,
+  0xf2c1, 0xc3be, 0xf4b4, 0xc4a4, 0xf4b3, 0xf5f0, 0xf745, 0xc5a6,
+  0xf943, 0xf944, 0xc5d8, 0xa6da, 0xaad7, 0xdb52, 0xbb4e, 0xc17b,
+  0xedef, 0xa6db, 0xafe5, 0xafe4, 0xdb53, 0xeaf4, 0xa6dc, 0xad50,
+  0xdb54, 0xdb55, 0xdb56, 0xbb4f, 0xbfb2, 0xa6dd, 0xaad8, 0xd068,
+  0xafe6, 0xd370, 0xb2ea, 0xdb57, 0xb8a4, 0xbb50, 0xbfb3, 0xc17c,
+  0xc2c2, 0xf4b5, 0xa6de, 0xaad9, 0xafe7, 0xd752, 0xb5ce, 0xbb51,
+  0xe3ab, 0xe745, 0xa6df, 0xb5cf, 0xdfa3, 0xbb52, 0xa6e0, 0xcdb1,
+  0xd069, 0xad51, 0xd372, 0xafea, 0xafe8, 0xafe9, 0xafeb, 0xd371,
+  0xd757, 0xd754, 0xd756, 0xb2eb, 0xb2ed, 0xb2ec, 0xd753, 0xb2ee,
+  0xd755, 0xdb58, 0xdb59, 0xdb5a, 0xdfa6, 0xdfa7, 0xdfa5, 0xdfa8,
+  0xb8a5, 0xdfa4, 0xbb53, 0xe74a, 0xe746, 0xe749, 0xe74b, 0xe748,
+  0xe747, 0xeaf5, 0xeaf6, 0xeaf7, 0xbfb4, 0xbfb5, 0xedf1, 0xedf0,
+  0xedf2, 0xf0a3, 0xf0a2, 0xf2c4, 0xf2c5, 0xf2c3, 0xc4a5, 0xf4b6,
+  0xf4b7, 0xf746, 0xf7ef, 0xf8bb, 0xa6e1, 0xa87d, 0xc17d, 0xa6e2,
+  0xd758, 0xdb5b, 0xc641, 0xca4a, 0xca4b, 0xca4d, 0xa6e3, 0xca4e,
+  0xca4c, 0xcba2, 0xcba3, 0xcb7b, 0xcba1, 0xa8a1, 0xa8a2, 0xcb7c,
+  0xcb7a, 0xcb79, 0xcb7d, 0xa87e, 0xcb7e, 0xd06a, 0xcdb6, 0xaadc,
+  0xcdb5, 0xcdb7, 0xaadb, 0xcdbc, 0xaadf, 0xcdb2, 0xcdc0, 0xcdc6,
+  0xaae6, 0xcdc3, 0xaae3, 0xcdb9, 0xcdbf, 0xcdc1, 0xcdb4, 0xaae2,
+  0xaadd, 0xcdba, 0xaae4, 0xaae7, 0xaae1, 0xaada, 0xcdbe, 0xcdb8,
+  0xcdc5, 0xaae9, 0xaae5, 0xaae0, 0xcdbd, 0xafec, 0xcdbb, 0xaade,
+  0xaae8, 0xcdb3, 0xcdc2, 0xcdc4, 0xad62, 0xad5c, 0xad64, 0xad61,
+  0xd071, 0xd074, 0xad5d, 0xd06b, 0xad56, 0xad60, 0xad63, 0xad65,
+  0xd0a2, 0xd077, 0xad55, 0xd0a1, 0xad59, 0xad57, 0xad52, 0xd06f,
+  0xd07e, 0xd073, 0xd076, 0xd0a5, 0xad66, 0xd07d, 0xad5e, 0xd078,
+  0xd0a4, 0xd075, 0xd079, 0xd07c, 0xd06d, 0xd0a3, 0xd07b, 0xd06c,
+  0xd070, 0xad5f, 0xad5a, 0xad53, 0xad58, 0xad54, 0xad67, 0xd06e,
+  0xd3a5, 0xad5b, 0xd07a, 0xce41, 0xd3a8, 0xaffa, 0xd376, 0xd3a3,
+  0xd37d, 0xd3b2, 0xd3aa, 0xd37e, 0xd3a9, 0xd378, 0xd37c, 0xd3b5,
+  0xaffd, 0xd3ad, 0xd3a4, 0xafed, 0xd3b3, 0xd374, 0xd3ac, 0xaffc,
+  0xaff7, 0xd373, 0xaff5, 0xaff4, 0xaff9, 0xd3ab, 0xaff1, 0xaff8,
+  0xd072, 0xdb5c, 0xd3a6, 0xd37a, 0xaffb, 0xd37b, 0xd3a1, 0xaffe,
+  0xd375, 0xd3af, 0xd3ae, 0xd3b6, 0xaff3, 0xaff0, 0xd3b4, 0xd3b0,
+  0xd3a7, 0xd3a2, 0xaff6, 0xaff2, 0xd377, 0xafee, 0xd3b1, 0xafef,
+  0xd379, 0xd75e, 0xd760, 0xd765, 0xd779, 0xb2fc, 0xb2f2, 0xd75d,
+  0xb2fd, 0xb2fe, 0xd768, 0xd76f, 0xd775, 0xd762, 0xd769, 0xb340,
+  0xd777, 0xd772, 0xb2fa, 0xb2f8, 0xd76e, 0xd76a, 0xd75c, 0xb2ef,
+  0xd761, 0xd759, 0xb2f7, 0xb2f9, 0xd766, 0xd763, 0xb2f4, 0xd773,
+  0xb2f1, 0xd764, 0xd77a, 0xd76c, 0xd76b, 0xb2f0, 0xb2fb, 0xb2f3,
+  0xd75a, 0xd75f, 0xd770, 0xd776, 0xb341, 0xd75b, 0xd767, 0xd76d,
+  0xb2f6, 0xd778, 0xd771, 0xd774, 0xb2f5, 0xdb6c, 0xdb60, 0xb5d7,
+  0xdb7d, 0xdba7, 0xdbaa, 0xb5d5, 0xdb68, 0xdba3, 0xdb69, 0xdb77,
+  0xb5e2, 0xdb73, 0xb5df, 0xdb74, 0xdb5d, 0xdba4, 0xb5e8, 0xdba1,
+  0xdb75, 0xdbac, 0xdb70, 0xdfc8, 0xdbaf, 0xb5e6, 0xdb6e, 0xdb7a,
+  0xb5e9, 0xb5d4, 0xdb72, 0xdbad, 0xdb6b, 0xdb64, 0xdb6f, 0xdb63,
+  0xdb61, 0xb5d0, 0xdba5, 0xdb6a, 0xdba8, 0xdba9, 0xb5d8, 0xb5dd,
+  0xb5d9, 0xb5e1, 0xdb7e, 0xb5da, 0xdb76, 0xdb66, 0xb5d2, 0xdb5e,
+  0xdba2, 0xdbab, 0xdb65, 0xb5e0, 0xdbb0, 0xdb71, 0xdb6d, 0xb5d1,
+  0xb5e5, 0xdb7c, 0xb5e7, 0xdb78, 0xb5dc, 0xb5d6, 0xb5de, 0xb5d3,
+  0xb5e4, 0xdb79, 0xdb67, 0xdb7b, 0xdb62, 0xdba6, 0xdbae, 0xdb5f,
+  0xdfc7, 0xdfdd, 0xb855, 0xdfcc, 0xdfca, 0xdfb5, 0xb8a9, 0xdfc5,
+  0xdfd9, 0xdfc1, 0xb8b1, 0xdfd8, 0xdfbf, 0xb5e3, 0xdfcf, 0xdfc0,
+  0xdfd6, 0xb8b0, 0xb8a8, 0xdfaa, 0xdfb2, 0xdfcb, 0xdfc3, 0xdfdc,
+  0xdfc6, 0xb8b6, 0xdfd7, 0xb8ad, 0xdfc9, 0xdfd1, 0xdfb6, 0xdfd0,
+  0xdfe1, 0xdfb1, 0xdfd2, 0xdfdf, 0xdfab, 0xb5db, 0xdfb9, 0xdfb8,
+  0xb8af, 0xdfbc, 0xdfbe, 0xdfcd, 0xdfde, 0xb8b2, 0xb8b3, 0xdfb0,
+  0xb8ab, 0xdfb4, 0xdfda, 0xb8b4, 0xb8ac, 0xb8ae, 0xb8b5, 0xdfe0,
+  0xdfd3, 0xdfce, 0xdfbb, 0xdfba, 0xb8aa, 0xdfac, 0xb8a7, 0xdfc4,
+  0xdfad, 0xdfc2, 0xdfb7, 0xdfdb, 0xb8a6, 0xdfb3, 0xdfaf, 0xdfd5,
+  0xdfae, 0xbb60, 0xe3d3, 0xe3c2, 0xe3ac, 0xe3ca, 0xbb58, 0xe3bb,
+  0xe3c5, 0xbb5b, 0xe3be, 0xbb59, 0xe3af, 0xe3cd, 0xe3ae, 0xe3c1,
+  0xe3ad, 0xe3bf, 0xe3c8, 0xe3c6, 0xe3ba, 0xe3b5, 0xe3b3, 0xe3b4,
+  0xe3c7, 0xe3d2, 0xe3bc, 0xbb5a, 0xe3b7, 0xe3cb, 0xbb5d, 0xe3b6,
+  0xe3b0, 0xe3c0, 0xbb61, 0xbb55, 0xbb5e, 0xe3b8, 0xe3b2, 0xbb57,
+  0xdfd4, 0xbb56, 0xe3c3, 0xbb54, 0xbb63, 0xbb5c, 0xe3c4, 0xe3b9,
+  0xe3b1, 0xe3cc, 0xe3bd, 0xbb62, 0xe3d0, 0xbb5f, 0xe3cf, 0xe3c9,
+  0xe3ce, 0xe3d1, 0xe773, 0xe774, 0xe767, 0xe766, 0xe762, 0xbdb4,
+  0xbdac, 0xe776, 0xe775, 0xdfa9, 0xe75f, 0xe763, 0xe75d, 0xe770,
+  0xe761, 0xe777, 0xe75a, 0xe758, 0xe764, 0xe76e, 0xe769, 0xbdb6,
+  0xe74f, 0xe76d, 0xbdb7, 0xdfbd, 0xe75b, 0xe752, 0xe755, 0xe77b,
+  0xe75c, 0xe753, 0xe751, 0xe74e, 0xbdb0, 0xe765, 0xbdaf, 0xbdb3,
+  0xe760, 0xe768, 0xbda9, 0xe778, 0xe77c, 0xbdab, 0xe757, 0xe76b,
+  0xe76f, 0xe754, 0xe779, 0xbdb2, 0xbdb1, 0xe74c, 0xbdb5, 0xe772,
+  0xe756, 0xe76a, 0xe750, 0xe75e, 0xe759, 0xbdad, 0xbdae, 0xe76c,
+  0xe77d, 0xe77a, 0xe771, 0xe74d, 0xbdaa, 0xeb49, 0xeb40, 0xeb43,
+  0xbfbb, 0xeb45, 0xeaf9, 0xeb41, 0xeb47, 0xbfb8, 0xbfbc, 0xbfb6,
+  0xeafb, 0xeb4c, 0xeb46, 0xeafc, 0xeb55, 0xeb4f, 0xeaf8, 0xee46,
+  0xeafe, 0xbfb7, 0xeb4a, 0xeb54, 0xbfbf, 0xeb51, 0xeafd, 0xeb44,
+  0xeb48, 0xeb42, 0xeb56, 0xeb53, 0xeb50, 0xbfb9, 0xbfba, 0xbfbe,
+  0xeafa, 0xeb57, 0xbfbd, 0xeb4d, 0xeb4b, 0xeb4e, 0xee53, 0xee40,
+  0xee45, 0xee52, 0xee44, 0xedfb, 0xee41, 0xc1a2, 0xedf4, 0xee4d,
+  0xee4f, 0xedf3, 0xc1a1, 0xee51, 0xee49, 0xc1a8, 0xee50, 0xee42,
+  0xc1aa, 0xedf9, 0xeb52, 0xee4a, 0xee47, 0xedf5, 0xee55, 0xc1a4,
+  0xc1a5, 0xedf7, 0xee48, 0xee54, 0xee4b, 0xedfd, 0xc1a7, 0xc1a3,
+  0xee4c, 0xedfe, 0xee56, 0xedf8, 0xee43, 0xee4e, 0xedfa, 0xedfc,
+  0xc2cb, 0xedf6, 0xc1a9, 0xc2c4, 0xc17e, 0xc1a6, 0xc2c8, 0xf0b3,
+  0xf0a9, 0xf0a4, 0xf0aa, 0xf0b4, 0xf0b8, 0xf0b7, 0xc2ca, 0xc2c9,
+  0xf0ab, 0xf0b9, 0xf0ae, 0xf0a6, 0xf0a8, 0xf0a7, 0xf0ad, 0xf0b2,
+  0xf0a5, 0xf0ac, 0xf0b1, 0xc2c7, 0xf0af, 0xc2c5, 0xf0b0, 0xc2c3,
+  0xc2c6, 0xf2d5, 0xf0b5, 0xc3c2, 0xf2cd, 0xf2d1, 0xf2c9, 0xf2cc,
+  0xf2d4, 0xc3c0, 0xf2d9, 0xf2d2, 0xf2ca, 0xf2da, 0xf2d3, 0xc3c3,
+  0xc3c4, 0xf2d7, 0xf2cb, 0xc3bf, 0xc3c1, 0xf2c6, 0xf2ce, 0xf2c8,
+  0xf2d8, 0xf2d6, 0xf2c7, 0xf2cf, 0xf4be, 0xc3c5, 0xf2d0, 0xc4a7,
+  0xc4a9, 0xc4a6, 0xf4c3, 0xf4bb, 0xf4b9, 0xf4bd, 0xf4ba, 0xf4bf,
+  0xf4c1, 0xc4aa, 0xc4ac, 0xf4c0, 0xc4ad, 0xc4ab, 0xf4c2, 0xc4a8,
+  0xc4f4, 0xf5f1, 0xf5f7, 0xc4f6, 0xf4bc, 0xf5f6, 0xf5fd, 0xf5f4,
+  0xf5fb, 0xf5fa, 0xf4b8, 0xf5f5, 0xf0b6, 0xf5fe, 0xf5f3, 0xf5f8,
+  0xf5fc, 0xf5f2, 0xf74a, 0xc4f5, 0xf5f9, 0xf7f4, 0xf74b, 0xf749,
+  0xf747, 0xf748, 0xf74c, 0xc5d9, 0xf7f2, 0xf7f0, 0xf7f5, 0xf7f3,
+  0xf7f6, 0xc5da, 0xf7f1, 0xf8bc, 0xf945, 0xf946, 0xf947, 0xf9c7,
+  0xf9bd, 0xca4f, 0xaaea, 0xad68, 0xd3b8, 0xd3b7, 0xb040, 0xb342,
+  0xd77c, 0xd77b, 0xb5ea, 0xb8b8, 0xb8b7, 0xb8b9, 0xe3d4, 0xe77e,
+  0xeb58, 0xeb5a, 0xeb59, 0xc1ab, 0xee57, 0xf0ba, 0xf9a5, 0xa6e4,
+  0xcdc9, 0xcdca, 0xcdc8, 0xcdc7, 0xaaeb, 0xd0a9, 0xd0a7, 0xd0a6,
+  0xad69, 0xad6b, 0xad6a, 0xd0a8, 0xd3c4, 0xd3c1, 0xd3bf, 0xb041,
+  0xd3c2, 0xb046, 0xd3bc, 0xd3cb, 0xd3cd, 0xd3bd, 0xb043, 0xd3ce,
+  0xd3c9, 0xd3bb, 0xd3c0, 0xd3ca, 0xd3c6, 0xd3c3, 0xb048, 0xd3cc,
+  0xd3be, 0xd3c7, 0xd3b9, 0xb047, 0xb044, 0xd3c5, 0xd3c8, 0xd3ba,
+  0xb045, 0xb042, 0xb34c, 0xd7a5, 0xb34b, 0xd7a8, 0xd7ab, 0xb348,
+  0xb346, 0xd77e, 0xd7a9, 0xd7a7, 0xd7a4, 0xd7ac, 0xd7ad, 0xd7af,
+  0xd7b0, 0xd77d, 0xb345, 0xd7a2, 0xd7a1, 0xd7ae, 0xb347, 0xd7a3,
+  0xb349, 0xb344, 0xd7a6, 0xb34d, 0xb34a, 0xd7aa, 0xb5f1, 0xdbbf,
+  0xdbb4, 0xb5ee, 0xdfe7, 0xdbbd, 0xdbb1, 0xb5ec, 0xdbb6, 0xb5ef,
+  0xdbba, 0xdbb8, 0xb5f2, 0xb5eb, 0xdbb2, 0xdbb5, 0xb5f0, 0xdbb3,
+  0xdbbe, 0xdbbc, 0xdbb7, 0xdbb9, 0xdbbb, 0xb5ed, 0xdfe8, 0xdfee,
+  0xdfe4, 0xdfea, 0xb8ba, 0xdfe6, 0xb8c0, 0xb8bf, 0xb8be, 0xdfed,
+  0xb8c1, 0xb8c2, 0xdfe3, 0xdff0, 0xb8c3, 0xb8bd, 0xb8bc, 0xdfec,
+  0xb8c4, 0xdfe2, 0xdfe5, 0xdfef, 0xdfeb, 0xe3f4, 0xe3e9, 0xb8bb,
+  0xbb6a, 0xe3dd, 0xe3f2, 0xe3de, 0xbb65, 0xe3db, 0xe3e4, 0xe3dc,
+  0xbb67, 0xe3d6, 0xe3f1, 0xbb68, 0xe3ee, 0xe3ef, 0xe3d7, 0xbb6d,
+  0xe3e6, 0xe3e0, 0xe3e7, 0xe3da, 0xe3f3, 0xe3eb, 0xe3e5, 0xe3d5,
+  0xbb69, 0xe3ec, 0xbb6c, 0xe3f0, 0xe3ea, 0xbb66, 0xe3e8, 0xe3e2,
+  0xbb64, 0xe3d9, 0xe3e1, 0xe3ed, 0xe3df, 0xe3e3, 0xbdc1, 0xdfe9,
+  0xe7b2, 0xe7bb, 0xe7b1, 0xe7ad, 0xe7aa, 0xbdc2, 0xe7a8, 0xbb6b,
+  0xe7a1, 0xbdc0, 0xe7a7, 0xbdbf, 0xe7ac, 0xe7a9, 0xe7b9, 0xe7b4,
+  0xe7ae, 0xe7b3, 0xbdbb, 0xe7ab, 0xe7be, 0xe7a2, 0xe7a3, 0xe7ba,
+  0xbdbc, 0xe7bf, 0xbdbe, 0xe7c0, 0xe7b0, 0xe3d8, 0xe7b6, 0xe7af,
+  0xe7b8, 0xe7b5, 0xe7a6, 0xbdb9, 0xe7bd, 0xbdba, 0xe7a4, 0xbdbd,
+  0xeb64, 0xe7b7, 0xe7bc, 0xeb61, 0xbdb8, 0xbfc0, 0xeb6b, 0xeb67,
+  0xeb65, 0xeb60, 0xeb6f, 0xbfc4, 0xeb5c, 0xeb68, 0xeb69, 0xeb5f,
+  0xeb5e, 0xeb6c, 0xeb62, 0xeb5d, 0xeb63, 0xeb6e, 0xeb5b, 0xeb6d,
+  0xeb6a, 0xbfc2, 0xbfc1, 0xbfc3, 0xeb66, 0xf0cb, 0xee59, 0xc1b1,
+  0xee5d, 0xee5a, 0xee61, 0xee67, 0xee5c, 0xee70, 0xc1ae, 0xee6a,
+  0xee5f, 0xee6b, 0xee66, 0xee6d, 0xee5e, 0xc1b3, 0xc1b2, 0xee60,
+  0xee6e, 0xee58, 0xee6c, 0xc1ac, 0xee64, 0xee63, 0xee68, 0xee5b,
+  0xc1b0, 0xc1b4, 0xee62, 0xee69, 0xc1b5, 0xee65, 0xc1ad, 0xc1af,
+  0xf0c7, 0xf0c5, 0xf0cc, 0xf0c9, 0xf0cd, 0xf0be, 0xf0c6, 0xf0d1,
+  0xee6f, 0xf0c2, 0xc2cf, 0xe7a5, 0xf0bd, 0xf0ca, 0xf0c4, 0xf0c1,
+  0xf0bc, 0xf0bb, 0xf0d0, 0xf0c0, 0xf0bf, 0xc2cd, 0xf0c8, 0xc2cc,
+  0xc2ce, 0xf0c3, 0xf0cf, 0xf2de, 0xf2df, 0xc3c9, 0xf2dc, 0xc3c6,
+  0xf2e4, 0xc3ca, 0xf2e6, 0xf2db, 0xf0ce, 0xf2e8, 0xf2dd, 0xc3c7,
+  0xf2e3, 0xf2e5, 0xf2e0, 0xf2e7, 0xf2e2, 0xf2e1, 0xc3c8, 0xf4c5,
+  0xf4c6, 0xf4c8, 0xc4ae, 0xc4af, 0xf4c9, 0xf4c7, 0xf4c4, 0xf642,
+  0xf645, 0xf641, 0xc4fa, 0xf643, 0xc4f9, 0xc4f8, 0xc4f7, 0xf644,
+  0xf751, 0xf74f, 0xf74e, 0xf640, 0xf750, 0xf646, 0xf74d, 0xf7f9,
+  0xf7d7, 0xf7f7, 0xc5db, 0xf7f8, 0xf7fa, 0xf8bf, 0xc5fa, 0xf8be,
+  0xf8bd, 0xc5fb, 0xc65a, 0xf96e, 0xf9a7, 0xf9a6, 0xf9a8, 0xa6e5,
+  0xd0aa, 0xd3cf, 0xd3d0, 0xdbc0, 0xf647, 0xf8c0, 0xa6e6, 0xad6c,
+  0xd0ab, 0xd7b1, 0xb34e, 0xdbc2, 0xdbc1, 0xb5f3, 0xb8c5, 0xe7c1,
+  0xbdc3, 0xbdc4, 0xbfc5, 0xc5fc, 0xa6e7, 0xd0ac, 0xaaed, 0xd0ae,
+  0xd0ad, 0xad6d, 0xd3d1, 0xd3d8, 0xb049, 0xd3d6, 0xd3d4, 0xd3db,
+  0xd3d2, 0xd3d3, 0xb04a, 0xb04e, 0xd3dc, 0xb04d, 0xd3da, 0xd3d7,
+  0xd3d5, 0xb04b, 0xb04c, 0xd3d9, 0xb350, 0xd7b2, 0xb355, 0xd7c2,
+  0xb354, 0xd7c4, 0xd7b8, 0xb352, 0xd7c3, 0xd7b3, 0xb353, 0xd7bf,
+  0xd7bb, 0xd7bd, 0xd7b7, 0xd7be, 0xb34f, 0xd7ba, 0xd7b9, 0xd7b5,
+  0xd7c0, 0xd7bc, 0xd7b4, 0xd7b6, 0xb351, 0xd7c1, 0xb5f6, 0xdbcd,
+  0xdbc9, 0xdbcb, 0xdbc6, 0xdbc5, 0xdbc3, 0xdbca, 0xdbcc, 0xdbc8,
+  0xdbc7, 0xb5f4, 0xb5f5, 0xdbcf, 0xb8cd, 0xdff2, 0xdff8, 0xdff3,
+  0xdff4, 0xdff9, 0xb8cf, 0xb8c7, 0xb8ce, 0xdff1, 0xdbc4, 0xb8ca,
+  0xb8c8, 0xdff7, 0xdff6, 0xb8c9, 0xb8cb, 0xdff5, 0xb8c6, 0xb8cc,
+  0xe3f6, 0xbb74, 0xe442, 0xe441, 0xe3fb, 0xbb76, 0xe440, 0xe3f7,
+  0xe3f8, 0xbb6e, 0xbb70, 0xe3fd, 0xe3f5, 0xbb72, 0xbb71, 0xe3f9,
+  0xe3fe, 0xe3fc, 0xbb73, 0xe3fa, 0xdbce, 0xbb6f, 0xe7c2, 0xe7c9,
+  0xbdc6, 0xe7cd, 0xbdca, 0xe7c5, 0xe7c3, 0xe7cc, 0xbdc5, 0xe7cb,
+  0xbdc7, 0xbdc8, 0xe7c4, 0xbdc9, 0xe7ca, 0xe7c6, 0xe7c7, 0xe7c8,
+  0xbb75, 0xeb70, 0xeb7c, 0xbfca, 0xeb77, 0xeb79, 0xbfc8, 0xeb71,
+  0xeb75, 0xeb78, 0xbfc6, 0xbfc9, 0xeb7b, 0xeb73, 0xeb74, 0xeb7a,
+  0xeb72, 0xeb76, 0xbfc7, 0xee72, 0xee71, 0xc1b7, 0xee77, 0xc1b9,
+  0xc1b6, 0xee73, 0xc1ba, 0xee74, 0xee75, 0xee78, 0xc1b8, 0xf0d6,
+  0xf0d9, 0xf0d3, 0xf0d5, 0xf0d4, 0xf0d7, 0xf0d8, 0xee76, 0xf0d2,
+  0xc3cd, 0xf2ec, 0xf2ef, 0xf2f1, 0xf2ea, 0xf2eb, 0xf2ee, 0xf2f0,
+  0xc3ce, 0xc3cc, 0xc3cb, 0xf2ed, 0xf2e9, 0xf4ca, 0xc4b0, 0xf4cb,
+  0xf649, 0xc4fb, 0xf64b, 0xc4fc, 0xf648, 0xf64a, 0xc5a8, 0xf752,
+  0xc5a7, 0xf7fd, 0xf7fc, 0xf7fb, 0xf948, 0xf949, 0xf94b, 0xf94a,
+  0xca50, 0xa6e8, 0xad6e, 0xd7c5, 0xb5f7, 0xdffa, 0xc2d0, 0xf2f2,
+  0xa8a3, 0xb357, 0xb356, 0xdbd0, 0xb5f8, 0xdbd2, 0xdbd1, 0xdffb,
+  0xb8d0, 0xe443, 0xe446, 0xe445, 0xe444, 0xe7ce, 0xe7d0, 0xe7cf,
+  0xbfcc, 0xbfcb, 0xc1bb, 0xee79, 0xee7b, 0xee7a, 0xc2d1, 0xf2f4,
+  0xf2f3, 0xf4cc, 0xc4b1, 0xc4fd, 0xf754, 0xf753, 0xc65b, 0xa8a4,
+  0xd0af, 0xad6f, 0xd7c8, 0xd7c6, 0xd7c7, 0xdbd4, 0xdbd5, 0xe043,
+  0xdbd3, 0xdffc, 0xe041, 0xe040, 0xe042, 0xb8d1, 0xdffe, 0xdffd,
+  0xe044, 0xe449, 0xe447, 0xe448, 0xe7d3, 0xe7d1, 0xe7d2, 0xeb7d,
+  0xee7c, 0xee7d, 0xc2d2, 0xf2f5, 0xf4cd, 0xc4b2, 0xf64c, 0xf755,
+  0xc5a9, 0xf7fe, 0xf94c, 0xa8a5, 0xad71, 0xad72, 0xd0b0, 0xd0b1,
+  0xad70, 0xb054, 0xb052, 0xb051, 0xb058, 0xb050, 0xb059, 0xd3dd,
+  0xb056, 0xb053, 0xb057, 0xb055, 0xb04f, 0xb35f, 0xb359, 0xd7cc,
+  0xb35e, 0xb360, 0xb35a, 0xb35b, 0xd7ca, 0xb358, 0xd7cb, 0xb35d,
+  0xd7c9, 0xb35c, 0xb644, 0xb646, 0xdbd8, 0xb645, 0xb5f9, 0xb5fd,
+  0xb8e4, 0xe049, 0xdbda, 0xb5fe, 0xdbdd, 0xdbde, 0xb643, 0xdbe0,
+  0xdbe2, 0xdbe3, 0xdbd7, 0xdbd6, 0xdbe4, 0xb642, 0xdbe1, 0xdbdf,
+  0xb640, 0xb5fb, 0xb647, 0xdbdb, 0xdbdc, 0xdbd9, 0xb641, 0xb5fc,
+  0xb5fa, 0xe048, 0xb8df, 0xb8da, 0xb8d5, 0xb8e5, 0xb8d6, 0xb8d2,
+  0xb8e1, 0xb8de, 0xb8e0, 0xb8d7, 0xb8dc, 0xb8d3, 0xb8d4, 0xe050,
+  0xe04d, 0xe045, 0xe04a, 0xb8e2, 0xe051, 0xb8e3, 0xb8d9, 0xe047,
+  0xe04f, 0xe04b, 0xe04e, 0xe04c, 0xb8dd, 0xe046, 0xb8d8, 0xe44c,
+  0xbb78, 0xbb7b, 0xe44e, 0xbba5, 0xe44d, 0xbb7d, 0xbdcf, 0xe44f,
+  0xbba4, 0xe44b, 0xbba6, 0xbb79, 0xb8db, 0xbb7c, 0xbb7a, 0xbb7e,
+  0xbba2, 0xbb77, 0xbba7, 0xbba3, 0xbba1, 0xe44a, 0xbdd6, 0xbdd2,
+  0xbdd9, 0xe7d6, 0xbdda, 0xe7e2, 0xe7db, 0xbdcb, 0xe7e3, 0xe7dd,
+  0xbdd5, 0xe7de, 0xbdd4, 0xe7e1, 0xbdce, 0xe7df, 0xe7d5, 0xbdcd,
+  0xebaa, 0xbdd3, 0xbdd0, 0xbdd8, 0xe7d4, 0xe7d8, 0xbdcc, 0xe7d7,
+  0xe7d9, 0xe7da, 0xbdd7, 0xe7dc, 0xe7e0, 0xe7e4, 0xbddb, 0xbfd2,
+  0xeba5, 0xebab, 0xeba8, 0xeb7e, 0xebac, 0xeba1, 0xeba7, 0xbfcd,
+  0xbfd3, 0xebad, 0xbfcf, 0xbfd9, 0xbfd4, 0xebaf, 0xeba9, 0xbfd0,
+  0xeba2, 0xbfda, 0xeba3, 0xeba4, 0xbfdb, 0xbfd8, 0xbdd1, 0xbfce,
+  0xebb0, 0xbfdc, 0xbfd5, 0xebae, 0xbfd1, 0xbfd6, 0xbfd7, 0xc1c3,
+  0xeea4, 0xeead, 0xeeaa, 0xeeac, 0xc1c0, 0xeea5, 0xeeab, 0xc1bc,
+  0xeea7, 0xc1c4, 0xeea3, 0xeea8, 0xeeaf, 0xeba6, 0xeea9, 0xeea2,
+  0xc1bd, 0xeea1, 0xc1be, 0xeeb0, 0xc1bf, 0xeeae, 0xc1c2, 0xee7e,
+  0xc1c1, 0xeea6, 0xf0dc, 0xf0ea, 0xf0e5, 0xf0e7, 0xf0db, 0xc2d3,
+  0xf0da, 0xc2d6, 0xc2d5, 0xf0e9, 0xf0e1, 0xf0de, 0xf0e4, 0xf0dd,
+  0xf0df, 0xf0e8, 0xf0e6, 0xc2d4, 0xf0ed, 0xf0eb, 0xf0e2, 0xf0ec,
+  0xf0e3, 0xf2f9, 0xc3cf, 0xf341, 0xf64f, 0xc3d6, 0xf0e0, 0xf2f7,
+  0xc3d2, 0xf2f8, 0xf2fd, 0xc3d4, 0xc3d5, 0xf2f6, 0xf340, 0xf342,
+  0xf2fa, 0xf2fc, 0xf2fe, 0xf2fb, 0xf343, 0xc3d1, 0xc3d7, 0xc3d3,
+  0xc3d0, 0xf4d0, 0xc4b7, 0xf4ce, 0xf4d2, 0xf4d3, 0xc4b5, 0xf4d4,
+  0xf4d1, 0xf4cf, 0xc4b8, 0xc4b4, 0xf4d5, 0xc4b6, 0xc4b3, 0xc4fe,
+  0xc540, 0xf64e, 0xf64d, 0xf650, 0xf651, 0xc541, 0xf756, 0xf75b,
+  0xc5aa, 0xf758, 0xf757, 0xf75a, 0xf759, 0xf843, 0xc5dc, 0xf842,
+  0xf840, 0xf841, 0xc5fe, 0xc5fd, 0xf8c1, 0xf8c2, 0xc640, 0xf94d,
+  0xf94e, 0xc667, 0xc66d, 0xf9a9, 0xf9c8, 0xa8a6, 0xd7cd, 0xd7ce,
+  0xe052, 0xe450, 0xe7e5, 0xc1c6, 0xc1c5, 0xf0ee, 0xf344, 0xf844,
+  0xa8a7, 0xd3de, 0xb05a, 0xb361, 0xe054, 0xe053, 0xbddc, 0xe7e6,
+  0xbddd, 0xeeb1, 0xc2d7, 0xc676, 0xa8a8, 0xcdcb, 0xd3df, 0xb362,
+  0xd7cf, 0xd7d0, 0xdbe5, 0xb648, 0xb8e6, 0xe056, 0xe055, 0xe057,
+  0xe451, 0xe452, 0xbba8, 0xbfdd, 0xbdde, 0xbfde, 0xeeb5, 0xeeb2,
+  0xeeb4, 0xeeb3, 0xc1c7, 0xf0ef, 0xf346, 0xf345, 0xcba4, 0xb05c,
+  0xb05b, 0xd3e0, 0xd7d1, 0xdbe7, 0xdbe6, 0xb649, 0xe059, 0xe05a,
+  0xe058, 0xb8e8, 0xb8e7, 0xbbaa, 0xbba9, 0xe7e7, 0xebb3, 0xebb1,
+  0xebb2, 0xbfdf, 0xeeb7, 0xeeb6, 0xf0f2, 0xf0f1, 0xf0f0, 0xf347,
+  0xf9aa, 0xa8a9, 0xad73, 0xad74, 0xb05d, 0xb05e, 0xd3e2, 0xd3e1,
+  0xd7d2, 0xb368, 0xb366, 0xb363, 0xb367, 0xb365, 0xb364, 0xb64a,
+  0xdbea, 0xb8ed, 0xb64c, 0xb651, 0xdbec, 0xb653, 0xb652, 0xb655,
+  0xdbeb, 0xdbe8, 0xb64f, 0xb64b, 0xb64d, 0xdbe9, 0xb654, 0xb650,
+  0xb64e, 0xb8ef, 0xb8ee, 0xb8ec, 0xb8f0, 0xb8ea, 0xb8eb, 0xb8e9,
+  0xe05b, 0xe454, 0xbbac, 0xbbad, 0xbbab, 0xe453, 0xe455, 0xe7ea,
+  0xe7ec, 0xbde7, 0xe7ed, 0xbde0, 0xe7e9, 0xbddf, 0xbde9, 0xbde5,
+  0xbde6, 0xbde2, 0xe7e8, 0xbde1, 0xe7ee, 0xe7eb, 0xbde8, 0xbde3,
+  0xbde4, 0xebb5, 0xebb7, 0xebb6, 0xebb8, 0xbfe0, 0xebb4, 0xc1cb,
+  0xeeb8, 0xc1c8, 0xc1cc, 0xc1ca, 0xc1c9, 0xf0f3, 0xf0f6, 0xf0f5,
+  0xf0f4, 0xc2d8, 0xf348, 0xf349, 0xc3d8, 0xf34a, 0xc3d9, 0xc4ba,
+  0xc4b9, 0xf652, 0xc542, 0xf653, 0xf75c, 0xc5ab, 0xc5ac, 0xf845,
+  0xc642, 0xa8aa, 0xb36a, 0xb369, 0xe05c, 0xe05d, 0xbbae, 0xebb9,
+  0xbdea, 0xebba, 0xeeb9, 0xa8ab, 0xd0b2, 0xad76, 0xad75, 0xd3e3,
+  0xb05f, 0xd3e4, 0xd7d5, 0xd7d4, 0xd7d3, 0xdbee, 0xb658, 0xdbed,
+  0xb657, 0xdbef, 0xb656, 0xe05f, 0xe062, 0xe060, 0xe061, 0xe065,
+  0xe05e, 0xe066, 0xe063, 0xe064, 0xbbb0, 0xe456, 0xbbaf, 0xe7f2,
+  0xe7f0, 0xbdeb, 0xe7ef, 0xe7f1, 0xbdec, 0xebbb, 0xebbc, 0xc1cd,
+  0xf34c, 0xf34e, 0xf34b, 0xf34d, 0xf4d6, 0xf654, 0xf96f, 0xa8ac,
+  0xad77, 0xd3e5, 0xd3e7, 0xd3e6, 0xd7d8, 0xb36c, 0xd7d6, 0xb36b,
+  0xd7d9, 0xd7da, 0xd7d7, 0xdbfb, 0xb660, 0xdbf3, 0xdbf9, 0xb65b,
+  0xb65e, 0xdbf2, 0xb659, 0xdbf6, 0xe06c, 0xb65d, 0xdbf1, 0xdbf7,
+  0xdbf4, 0xdbfa, 0xdbf0, 0xdbf8, 0xb65c, 0xb65f, 0xdbf5, 0xb65a,
+  0xb8f2, 0xe068, 0xb8f1, 0xe06f, 0xe06e, 0xb8f8, 0xb8f9, 0xe070,
+  0xb8f3, 0xe06d, 0xb8f7, 0xe072, 0xe069, 0xe06b, 0xb8f4, 0xe067,
+  0xe06a, 0xe071, 0xb8f5, 0xe073, 0xb8f6, 0xbbb1, 0xe45b, 0xe461,
+  0xe459, 0xe462, 0xe458, 0xe45d, 0xe463, 0xe460, 0xe45f, 0xe45e,
+  0xe457, 0xe45c, 0xe45a, 0xbdf1, 0xbdee, 0xe7fb, 0xe841, 0xe843,
+  0xe840, 0xe7f8, 0xe7fa, 0xe845, 0xe842, 0xe7fc, 0xe846, 0xe7f9,
+  0xe844, 0xbdef, 0xbdf5, 0xbdf3, 0xe7f3, 0xbdf4, 0xbdf0, 0xe7f4,
+  0xe7f6, 0xe7f5, 0xe7fd, 0xe7fe, 0xbdf2, 0xbded, 0xe7f7, 0xebc6,
+  0xbfe2, 0xebbd, 0xbfe3, 0xbfe6, 0xebc2, 0xebbf, 0xbfe5, 0xebc3,
+  0xebc4, 0xebbe, 0xebc7, 0xebc0, 0xebc5, 0xbfe4, 0xbfe1, 0xebc1,
+  0xeebf, 0xc1d0, 0xc1ce, 0xc1d1, 0xc1cf, 0xeebe, 0xeebb, 0xeeba,
+  0xeebd, 0xeebc, 0xf145, 0xc2de, 0xf0fb, 0xf0fa, 0xc2d9, 0xf141,
+  0xf140, 0xf0f7, 0xf143, 0xf0fc, 0xc2dd, 0xf0f9, 0xf142, 0xf0f8,
+  0xc2da, 0xc2dc, 0xf0fd, 0xc2db, 0xf0fe, 0xf144, 0xf352, 0xc3de,
+  0xf34f, 0xf353, 0xc3db, 0xf351, 0xc3e0, 0xc3dd, 0xf350, 0xc3df,
+  0xf354, 0xc3da, 0xc4bc, 0xc4be, 0xf4d9, 0xc4bd, 0xf4d7, 0xc3dc,
+  0xf4d8, 0xc4bb, 0xc543, 0xc545, 0xf656, 0xc544, 0xf655, 0xf761,
+  0xc5ad, 0xf760, 0xc5ae, 0xf75e, 0xf75d, 0xf762, 0xf763, 0xf846,
+  0xf75f, 0xf8c6, 0xf8c3, 0xf8c4, 0xf8c5, 0xc65c, 0xf951, 0xf950,
+  0xf94f, 0xf970, 0xf9be, 0xf9ab, 0xc66e, 0xa8ad, 0xb060, 0xb8fa,
+  0xbdf6, 0xebc8, 0xc2df, 0xf355, 0xf9ac, 0xa8ae, 0xaaee, 0xad79,
+  0xad78, 0xb063, 0xd3e8, 0xb061, 0xd3e9, 0xb062, 0xd7df, 0xd7db,
+  0xb36d, 0xd7de, 0xd7dd, 0xd7dc, 0xb36e, 0xd7e0, 0xd7e1, 0xdc43,
+  0xdc41, 0xdc45, 0xdc46, 0xdc4c, 0xdc48, 0xdc4a, 0xdc42, 0xdbfc,
+  0xdc49, 0xdc4b, 0xdc44, 0xdc47, 0xdbfd, 0xb662, 0xdc40, 0xdbfe,
+  0xb661, 0xb663, 0xb8fd, 0xe075, 0xe077, 0xe076, 0xe07b, 0xb8fb,
+  0xe078, 0xe074, 0xe079, 0xe07a, 0xb8fc, 0xb8fe, 0xe07c, 0xe467,
+  0xe466, 0xe464, 0xe465, 0xbbb3, 0xbbb5, 0xbbb2, 0xbbb4, 0xe84d,
+  0xe84e, 0xe849, 0xe84a, 0xbdf8, 0xbdfd, 0xbdf7, 0xbdfe, 0xbdf9,
+  0xe84b, 0xe84c, 0xe848, 0xbe40, 0xbdfb, 0xbdfa, 0xbdfc, 0xe847,
+  0xebca, 0xbfe8, 0xebcc, 0xbfea, 0xebcf, 0xebcb, 0xebc9, 0xebce,
+  0xbfe9, 0xebcd, 0xbfe7, 0xc1d3, 0xc1d6, 0xeec1, 0xc1d4, 0xeec0,
+  0xc1d2, 0xc1d5, 0xf146, 0xf147, 0xf148, 0xc2e0, 0xf149, 0xc2e1,
+  0xc3e2, 0xf358, 0xf359, 0xf357, 0xf356, 0xf35a, 0xc3e1, 0xf4dd,
+  0xf4db, 0xf4dc, 0xf4de, 0xf4da, 0xf4df, 0xf658, 0xf659, 0xf657,
+  0xc546, 0xf764, 0xc5af, 0xf765, 0xf848, 0xf847, 0xa8af, 0xb664,
+  0xb940, 0xbbb6, 0xbfec, 0xbfeb, 0xc3e3, 0xc47c, 0xc547, 0xa8b0,
+  0xb064, 0xb941, 0xf35b, 0xcba6, 0xa8b1, 0xa8b4, 0xa8b3, 0xa8b2,
+  0xcba5, 0xcdcd, 0xcdcf, 0xaaef, 0xaaf1, 0xcdcc, 0xcdce, 0xaaf0,
+  0xcdd1, 0xcdd0, 0xcdd2, 0xd0b6, 0xd0b4, 0xad7c, 0xd0b3, 0xada3,
+  0xad7e, 0xad7b, 0xada4, 0xad7d, 0xada2, 0xada1, 0xd0b5, 0xad7a,
+  0xb06a, 0xd3eb, 0xd3f1, 0xb067, 0xb06e, 0xb069, 0xd3ee, 0xd3f0,
+  0xb06c, 0xd3ea, 0xd3ed, 0xb068, 0xb065, 0xd3ec, 0xb06b, 0xd3ef,
+  0xb06d, 0xb066, 0xd7e3, 0xd7e6, 0xb370, 0xb37a, 0xb376, 0xd7e4,
+  0xb37e, 0xb377, 0xb37c, 0xb372, 0xb36f, 0xb371, 0xb37d, 0xd7e5,
+  0xb375, 0xb378, 0xb374, 0xb379, 0xd7e7, 0xb37b, 0xb373, 0xd7e2,
+  0xdc4d, 0xb665, 0xdc4f, 0xb667, 0xb669, 0xdc4e, 0xb666, 0xb66a,
+  0xb668, 0xb947, 0xe0a3, 0xb94f, 0xe07e, 0xb950, 0xb945, 0xe0a1,
+  0xb94a, 0xe0a2, 0xb943, 0xb942, 0xb94d, 0xb94c, 0xb94b, 0xb949,
+  0xb94e, 0xe07d, 0xb944, 0xb946, 0xb948, 0xbbb8, 0xbbbb, 0xbbbf,
+  0xbbb9, 0xbbbe, 0xbbbc, 0xbbb7, 0xbbbd, 0xbbba, 0xe852, 0xbe43,
+  0xbe41, 0xe853, 0xbe44, 0xbe42, 0xe851, 0xe850, 0xbff0, 0xe84f,
+  0xbfee, 0xbfed, 0xebd0, 0xbe45, 0xbfef, 0xebd1, 0xbff2, 0xebd2,
+  0xbff1, 0xc1d8, 0xeec3, 0xc1d7, 0xc1dc, 0xc1da, 0xc1db, 0xc2e3,
+  0xc1d9, 0xeec2, 0xebd3, 0xc2e2, 0xc2e4, 0xc3e4, 0xc3e5, 0xf4e0,
+  0xc5de, 0xc5dd, 0xa8b6, 0xca55, 0xb06f, 0xca52, 0xca53, 0xca51,
+  0xca54, 0xcbaa, 0xcba7, 0xcbac, 0xcba8, 0xa8b7, 0xa8ba, 0xcba9,
+  0xa8b9, 0xcbab, 0xa8b8, 0xcdd5, 0xcdd7, 0xaaf4, 0xcdd3, 0xcdd6,
+  0xcdd4, 0xaaf2, 0xaaf5, 0xaaf3, 0xd0b8, 0xd0bc, 0xd0b9, 0xada7,
+  0xada8, 0xd0bb, 0xd0bd, 0xd0bf, 0xada5, 0xd0be, 0xada6, 0xd7ee,
+  0xd0ba, 0xd3f2, 0xd3fb, 0xd3f9, 0xd3f4, 0xd3f5, 0xd3fa, 0xd3fc,
+  0xb071, 0xd3f7, 0xd3f3, 0xb070, 0xb072, 0xd3f6, 0xd3fd, 0xd3f8,
+  0xb3a1, 0xd7f1, 0xd7e9, 0xd7ef, 0xd7f0, 0xb3a2, 0xd7e8, 0xd7ea,
+  0xd0b7, 0xd7ec, 0xd7ed, 0xd7eb, 0xb66c, 0xdc56, 0xebd4, 0xdc57,
+  0xdc54, 0xb3a3, 0xb66e, 0xdc53, 0xdc59, 0xdc58, 0xb66b, 0xdc5c,
+  0xdc52, 0xdc5b, 0xdc50, 0xdc5a, 0xdc55, 0xb66d, 0xe0aa, 0xe0a5,
+  0xe0ab, 0xe0a6, 0xe0a4, 0xe0a7, 0xb951, 0xe0a9, 0xe0a8, 0xb952,
+  0xbbc1, 0xbbc0, 0xe46e, 0xe471, 0xe469, 0xe46d, 0xbbc2, 0xe46c,
+  0xe46a, 0xe470, 0xe46b, 0xe468, 0xe46f, 0xe859, 0xbe48, 0xf14a,
+  0xe856, 0xe857, 0xe855, 0xdc51, 0xbe47, 0xe85a, 0xe854, 0xbe46,
+  0xbe49, 0xe858, 0xebd5, 0xbff3, 0xebd6, 0xebd7, 0xeec4, 0xc1dd,
+  0xf14b, 0xf14c, 0xf14d, 0xf35d, 0xf35c, 0xf4e2, 0xf4e1, 0xf65b,
+  0xf65c, 0xf65a, 0xf766, 0xc5b0, 0xa8bb, 0xadaa, 0xada9, 0xb075,
+  0xb074, 0xd440, 0xd441, 0xd3fe, 0xb073, 0xd7f5, 0xd7f6, 0xd7f2,
+  0xb3a4, 0xd7f3, 0xd7f4, 0xdc5f, 0xdc61, 0xdc5d, 0xdc60, 0xb66f,
+  0xdc5e, 0xb670, 0xdd73, 0xb955, 0xb954, 0xb953, 0xe0ac, 0xe0ad,
+  0xe473, 0xe475, 0xbbc6, 0xbbc3, 0xbbc5, 0xbbc4, 0xe474, 0xe472,
+  0xe861, 0xe85e, 0xe85f, 0xbe4d, 0xe860, 0xe85b, 0xe85c, 0xbe4a,
+  0xbe4b, 0xe85d, 0xbe4c, 0xebdb, 0xebdc, 0xebd9, 0xebda, 0xbff4,
+  0xebd8, 0xeec8, 0xeec5, 0xeec7, 0xc1e0, 0xeecb, 0xc1df, 0xeec9,
+  0xeecc, 0xeeca, 0xeec6, 0xc1de, 0xf14f, 0xf150, 0xf14e, 0xf152,
+  0xc2e5, 0xc2e6, 0xf35f, 0xc3e7, 0xf151, 0xf35e, 0xc3e6, 0xf4e5,
+  0xf4e6, 0xc4bf, 0xf4e4, 0xf4e3, 0xf65d, 0xc548, 0xf849, 0xf8c8,
+  0xf8c7, 0xc643, 0xc65d, 0xf8c9, 0xf971, 0xc66f, 0xa8bc, 0xaaf6,
+  0xb956, 0xc4c0, 0xa8bd, 0xadab, 0xb3a5, 0xb671, 0xc2e7, 0xaaf7,
+  0xd0c1, 0xd0c0, 0xd442, 0xb078, 0xb076, 0xb07a, 0xd444, 0xb079,
+  0xb077, 0xd443, 0xb3a8, 0xd7fc, 0xb3a7, 0xb3a9, 0xd842, 0xb3ab,
+  0xd7fe, 0xd840, 0xd7f7, 0xb3aa, 0xd843, 0xd7f9, 0xd7fa, 0xd7f8,
+  0xb3a6, 0xd841, 0xd7fb, 0xd7fd, 0xdc6d, 0xdc6c, 0xdc6a, 0xdc62,
+  0xdc71, 0xdc65, 0xdc6f, 0xdc76, 0xdc6e, 0xb679, 0xb675, 0xdc63,
+  0xdc69, 0xb677, 0xdc68, 0xb678, 0xb67a, 0xdc6b, 0xb672, 0xb673,
+  0xdc77, 0xdc75, 0xdc74, 0xdc66, 0xdc72, 0xb676, 0xb674, 0xdc73,
+  0xdc64, 0xdc67, 0xdc70, 0xe4ba, 0xe0b7, 0xe0b0, 0xe0c3, 0xe0cc,
+  0xe0b3, 0xb961, 0xe0c0, 0xb957, 0xb959, 0xb965, 0xe0b1, 0xb95a,
+  0xb95c, 0xb966, 0xb95b, 0xb964, 0xe0b9, 0xe0ae, 0xb962, 0xe0b8,
+  0xb95e, 0xe0ca, 0xb963, 0xe0c8, 0xe0bc, 0xe0c6, 0xb960, 0xe0af,
+  0xe0c9, 0xe0c4, 0xe0cb, 0xb958, 0xb967, 0xb95d, 0xe0b5, 0xe0bd,
+  0xe0c1, 0xe0c5, 0xb95f, 0xe0b4, 0xe0b2, 0xe0be, 0xe0bb, 0xe0ba,
+  0xe0bf, 0xe0c2, 0xe0c7, 0xe478, 0xbbc7, 0xe4a4, 0xe47a, 0xbbcc,
+  0xbbd0, 0xe4ad, 0xe4b5, 0xe4a6, 0xbbc8, 0xe4aa, 0xe0b6, 0xbbc9,
+  0xe4b1, 0xe4b6, 0xe4ae, 0xe4b0, 0xe4b9, 0xe4b2, 0xe47e, 0xe4a9,
+  0xbbd1, 0xbbcd, 0xe47c, 0xe4ab, 0xbbcb, 0xe4a5, 0xbbca, 0xe4b3,
+  0xe4a2, 0xe479, 0xbbce, 0xe4b8, 0xe47b, 0xe4af, 0xe4ac, 0xe4a7,
+  0xe477, 0xe476, 0xe4a1, 0xe4b4, 0xbbcf, 0xe4b7, 0xe47d, 0xe4a3,
+  0xbe52, 0xbe5a, 0xbe55, 0xe8a4, 0xe8a1, 0xe867, 0xbe50, 0xbe4f,
+  0xbe56, 0xe865, 0xbe54, 0xe871, 0xe863, 0xe864, 0xbe4e, 0xe8a3,
+  0xbe58, 0xe874, 0xe879, 0xe873, 0xebee, 0xe86f, 0xe877, 0xe875,
+  0xe868, 0xe862, 0xe87d, 0xbe57, 0xe87e, 0xe878, 0xe86d, 0xe86b,
+  0xe866, 0xe86e, 0xe87b, 0xe86a, 0xe87a, 0xe8a2, 0xbe53, 0xe876,
+  0xe87c, 0xe872, 0xe86c, 0xbe51, 0xe4a8, 0xe870, 0xbe59, 0xe869,
+  0xebf4, 0xbff7, 0xebf3, 0xebf0, 0xec44, 0xbffb, 0xec41, 0xebf8,
+  0xec43, 0xebe9, 0xebf6, 0xbffd, 0xebe1, 0xebdf, 0xec42, 0xec40,
+  0xebfe, 0xebed, 0xebec, 0xebe2, 0xc040, 0xebe8, 0xebf2, 0xebfd,
+  0xc043, 0xec45, 0xc1e8, 0xc045, 0xbffe, 0xebe6, 0xebef, 0xebde,
+  0xebe0, 0xbff5, 0xc042, 0xbffa, 0xebe7, 0xebf7, 0xebf1, 0xc041,
+  0xebdd, 0xc1e3, 0xebf9, 0xebfc, 0xbffc, 0xebeb, 0xc044, 0xbff9,
+  0xbff8, 0xebf5, 0xebfb, 0xbff6, 0xebe4, 0xebfa, 0xebe5, 0xebea,
+  0xeed2, 0xeed7, 0xc1e5, 0xc1e7, 0xeedd, 0xc1e1, 0xeeec, 0xeee3,
+  0xeed8, 0xeed9, 0xeee2, 0xc1ee, 0xeee1, 0xeed1, 0xeee0, 0xeed4,
+  0xeeed, 0xc1ed, 0xc1eb, 0xeed5, 0xeee8, 0xeeda, 0xeee7, 0xeee9,
+  0xeed0, 0xc1e6, 0xeeea, 0xeede, 0xc1ea, 0xeedb, 0xc1ec, 0xeee4,
+  0xc1e4, 0xeed6, 0xeee5, 0xeedf, 0xebe3, 0xeee6, 0xeed3, 0xc1e9,
+  0xeeeb, 0xc1e2, 0xeece, 0xf160, 0xf159, 0xc2e9, 0xf154, 0xf163,
+  0xf15b, 0xeedc, 0xf165, 0xf155, 0xc2e8, 0xf15f, 0xc2ea, 0xc2f2,
+  0xc2f0, 0xf161, 0xc2f1, 0xf157, 0xf158, 0xf15d, 0xf162, 0xeecd,
+  0xc2eb, 0xf16a, 0xf167, 0xf16b, 0xf15e, 0xf15a, 0xf168, 0xf36a,
+  0xf15c, 0xc2ee, 0xc2ed, 0xeecf, 0xc2ef, 0xf164, 0xf166, 0xc2ec,
+  0xf169, 0xf153, 0xf156, 0xf373, 0xf363, 0xc3eb, 0xf371, 0xf361,
+  0xc3ec, 0xf36c, 0xf368, 0xc3f1, 0xf372, 0xf362, 0xf365, 0xc3e9,
+  0xf374, 0xf36d, 0xf370, 0xc3ef, 0xc3f4, 0xc3f2, 0xf369, 0xf364,
+  0xc3ed, 0xc3ee, 0xf360, 0xc3ea, 0xc3e8, 0xc3f0, 0xf36f, 0xc3f3,
+  0xf36b, 0xf375, 0xc3f5, 0xf367, 0xf36e, 0xf4f3, 0xf542, 0xf4f5,
+  0xf4fc, 0xf366, 0xf4fa, 0xf4e9, 0xf540, 0xc4c3, 0xf4ed, 0xf4fe,
+  0xf4f4, 0xc4c2, 0xf544, 0xf4f6, 0xf4fb, 0xf4fd, 0xf4e7, 0xf541,
+  0xf4f2, 0xf4f7, 0xf4eb, 0xf4ef, 0xf543, 0xf4f9, 0xf4e8, 0xf4ec,
+  0xf4ee, 0xf4f8, 0xc4c1, 0xf4f1, 0xf4ea, 0xf4f0, 0xf661, 0xf666,
+  0xc54f, 0xf668, 0xc549, 0xf664, 0xf66a, 0xc54e, 0xc54a, 0xc54b,
+  0xf660, 0xf667, 0xc54d, 0xf665, 0xc54c, 0xf65f, 0xf663, 0xf662,
+  0xf65e, 0xf669, 0xc5b1, 0xf76d, 0xf770, 0xf76c, 0xf76e, 0xf76f,
+  0xf769, 0xf76a, 0xf767, 0xf76b, 0xf768, 0xc5b2, 0xc5b3, 0xf84b,
+  0xf84d, 0xf84c, 0xf84e, 0xc5e0, 0xf84a, 0xc5df, 0xc5e1, 0xf8cb,
+  0xf8cc, 0xc644, 0xf8ca, 0xf953, 0xf952, 0xf954, 0xc65f, 0xf955,
+  0xc65e, 0xf956, 0xf972, 0xf975, 0xf974, 0xc668, 0xf973, 0xc672,
+  0xc670, 0xc671, 0xc677, 0xf9c0, 0xf9c1, 0xf9bf, 0xf9c9, 0xaaf8,
+  0xd844, 0xdc78, 0xe8a5, 0xf376, 0xaaf9, 0xadac, 0xb07b, 0xd845,
+  0xd846, 0xb3ac, 0xb67d, 0xdc7a, 0xdc79, 0xb6a3, 0xb67c, 0xdc7b,
+  0xb67e, 0xb6a2, 0xb6a1, 0xb67b, 0xb968, 0xe0d0, 0xe0ce, 0xe0cf,
+  0xe0cd, 0xbbd2, 0xbbd5, 0xbbd7, 0xbbd6, 0xbbd3, 0xbbd4, 0xe8a7,
+  0xe8a6, 0xbe5b, 0xe8a8, 0xe8a9, 0xbe5c, 0xec4d, 0xec4b, 0xeef3,
+  0xec49, 0xec4a, 0xc046, 0xec46, 0xec4e, 0xec48, 0xec4c, 0xeeef,
+  0xeef1, 0xeef2, 0xc1f3, 0xeeee, 0xc1f2, 0xeef0, 0xc1ef, 0xc1f0,
+  0xc1f1, 0xec47, 0xc2f5, 0xf16e, 0xf16c, 0xf16d, 0xc2f3, 0xc2f6,
+  0xc2f4, 0xf377, 0xf378, 0xc3f6, 0xf545, 0xf547, 0xf546, 0xc4c4,
+  0xc550, 0xf66d, 0xf66c, 0xf66b, 0xaafa, 0xc9aa, 0xca58, 0xa6e9,
+  0xca56, 0xca59, 0xca57, 0xcbae, 0xa8c1, 0xa8c2, 0xcbb0, 0xa8bf,
+  0xcbaf, 0xcbad, 0xa8c0, 0xa8be, 0xcdd8, 0xcddb, 0xaafd, 0xcdda,
+  0xcdd9, 0xaafc, 0xaafb, 0xab40, 0xcddc, 0xaafe, 0xd0c6, 0xadae,
+  0xadaf, 0xadb0, 0xd0c7, 0xd0c3, 0xadad, 0xd0c4, 0xd0c5, 0xd0c2,
+  0xb0a4, 0xb0a1, 0xd445, 0xb0a2, 0xb0a5, 0xd446, 0xb07e, 0xb07c,
+  0xb07d, 0xb0a3, 0xb3ad, 0xd849, 0xb3b5, 0xd848, 0xd84b, 0xb3b1,
+  0xd84a, 0xb6ab, 0xb3af, 0xb3b2, 0xb3ae, 0xb3b3, 0xb3b4, 0xb3b0,
+  0xd847, 0xb6a7, 0xdc7d, 0xdca3, 0xdca2, 0xb6ac, 0xb6a8, 0xb6a9,
+  0xdc7c, 0xdc7e, 0xdca1, 0xb6a4, 0xb6a6, 0xb6aa, 0xb6a5, 0xe0d3,
+  0xe0d1, 0xe0d2, 0xb96a, 0xb96b, 0xe0d4, 0xb969, 0xbbd8, 0xbbda,
+  0xbbd9, 0xe4bb, 0xe4bc, 0xe8ab, 0xe8aa, 0xc047, 0xc048, 0xec4f,
+  0xc049, 0xeef6, 0xeef4, 0xeef5, 0xc1f4, 0xf16f, 0xc3f7, 0xc1f5,
+  0xab41, 0xb0a6, 0xd447, 0xd84c, 0xb3b6, 0xb6ad, 0xdca4, 0xdca6,
+  0xb6af, 0xb6ae, 0xb6b0, 0xb6b1, 0xdca5, 0xb96e, 0xb96f, 0xb96d,
+  0xbbdb, 0xb96c, 0xe0d5, 0xbbdc, 0xe8ac, 0xec50, 0xc04a, 0xc1f6,
+  0xf170, 0xf174, 0xc2f9, 0xf171, 0xc2fa, 0xc2f8, 0xf175, 0xc2fb,
+  0xf173, 0xf379, 0xc2f7, 0xc3f8, 0xf8cd, 0xab42, 0xb3b8, 0xb3b7,
+  0xb6b2, 0xdca8, 0xdca7, 0xb6b3, 0xe0d9, 0xb973, 0xb970, 0xe0d8,
+  0xb972, 0xe0d6, 0xb971, 0xe0d7, 0xe4bd, 0xbbdd, 0xe8af, 0xbe5d,
+  0xe8ad, 0xbe5e, 0xbe5f, 0xe8ae, 0xbe60, 0xec51, 0xc04e, 0xc04b,
+  0xc050, 0xec53, 0xc04c, 0xec52, 0xc04f, 0xc04d, 0xeef9, 0xeefb,
+  0xc1f7, 0xeefa, 0xc1f8, 0xeef8, 0xeef7, 0xf177, 0xf176, 0xc2fc,
+  0xf178, 0xf37e, 0xc3fa, 0xf37d, 0xf37a, 0xc3f9, 0xf37b, 0xf37c,
+  0xf548, 0xf549, 0xc4c5, 0xc553, 0xf66e, 0xc551, 0xc552, 0xf66f,
+  0xc5b4, 0xc5b5, 0xf771, 0xc645, 0xf8cf, 0xc647, 0xf8ce, 0xf8d0,
+  0xc646, 0xf957, 0xf9ad, 0xab43, 0xb974, 0xe4be, 0xe8b0, 0xc051,
+  0xc052, 0xab44, 0xbe61, 0xc3fb, 0xadb1, 0xc053, 0xc5e2, 0xadb2,
+  0xd84d, 0xdca9, 0xdcab, 0xdcaa, 0xe0dd, 0xe0da, 0xb975, 0xb976,
+  0xe0db, 0xe0dc, 0xe4c0, 0xe4c5, 0xbbde, 0xe4bf, 0xe4c1, 0xe4c8,
+  0xe4c3, 0xe4c7, 0xe4c4, 0xe4c2, 0xe4c6, 0xbbdf, 0xe8b3, 0xe8b1,
+  0xbe63, 0xbe62, 0xe8b2, 0xbe64, 0xec56, 0xec55, 0xc054, 0xec54,
+  0xeefc, 0xeefe, 0xef41, 0xef40, 0xc1f9, 0xeefd, 0xf1a1, 0xc2fd,
+  0xf17d, 0xf1a2, 0xc2fe, 0xf17b, 0xf17e, 0xf17c, 0xf179, 0xc340,
+  0xf17a, 0xf3a1, 0xf3a3, 0xf3a2, 0xf54a, 0xf54b, 0xf670, 0xc5b7,
+  0xc5b6, 0xf84f, 0xf850, 0xc648, 0xf8d1, 0xc669, 0xadb3, 0xb6b4,
+  0xe4ca, 0xe4c9, 0xe8b5, 0xe8b4, 0xc1fa, 0xef43, 0xef42, 0xf1a5,
+  0xf1a3, 0xf1a6, 0xf1a4, 0xc3fc, 0xf3a4, 0xf3a5, 0xf3a6, 0xf671,
+  0xf772, 0xf8d2, 0xadb4, 0xec57, 0xef44, 0xadb5, 0xbbe0, 0xec58,
+  0xc341, 0xf1a7, 0xc3fd, 0xf54c, 0xf54d, 0xc554, 0xf851, 0xadb6,
+  0xb3bb, 0xb3bc, 0xd84e, 0xb6b5, 0xb6b6, 0xdcac, 0xb6b7, 0xb97a,
+  0xb97c, 0xe0df, 0xe0e0, 0xe0de, 0xb977, 0xb978, 0xb97b, 0xb979,
+  0xe4cb, 0xbbe1, 0xbbe2, 0xe8bc, 0xbe67, 0xe8b7, 0xe8b6, 0xe8bb,
+  0xbe65, 0xc05b, 0xe8b8, 0xe8bd, 0xe8ba, 0xe8b9, 0xbe66, 0xc059,
+  0xec5a, 0xc055, 0xec5b, 0xec59, 0xc058, 0xc056, 0xc05a, 0xc057,
+  0xef45, 0xef4a, 0xef46, 0xef49, 0xc1fb, 0xedd4, 0xef48, 0xef47,
+  0xc344, 0xc342, 0xc345, 0xc343, 0xf1a8, 0xf1a9, 0xf1aa, 0xc346,
+  0xf3aa, 0xc440, 0xf3a8, 0xc441, 0xf3a7, 0xf3a9, 0xc3fe, 0xf551,
+  0xf54e, 0xf54f, 0xf550, 0xf672, 0xc556, 0xc555, 0xf774, 0xf773,
+  0xc5b8, 0xc5e3, 0xc649, 0xc660, 0xf958, 0xf9ae, 0xf9af, 0xadb7,
+  0xdcad, 0xe0e1, 0xe4cc, 0xe4cd, 0xbbe3, 0xbbe4, 0xe8be, 0xbe68,
+  0xc1fc, 0xf1ab, 0xc347, 0xf3ad, 0xc442, 0xf3ac, 0xf3ae, 0xf3ab,
+  0xf675, 0xf552, 0xf553, 0xc4c6, 0xf674, 0xf673, 0xf775, 0xf9b0,
+  0xadb8, 0xadb9, 0xb0a7, 0xd448, 0xd84f, 0xb6b8, 0xb6bb, 0xb6b9,
+  0xdcae, 0xb6bd, 0xb6ba, 0xb6bc, 0xb97e, 0xe0e2, 0xe0e3, 0xe8c0,
+  0xb97d, 0xb9a1, 0xb9a2, 0xe4cf, 0xe4ce, 0xbbe5, 0xbbe6, 0xe4d0,
+  0xe8bf, 0xbbe8, 0xbe69, 0xbbe7, 0xc05c, 0xe8c1, 0xbe6b, 0xbe6a,
+  0xe8c2, 0xe8c5, 0xe8c3, 0xe8c4, 0xbe6c, 0xc061, 0xc05f, 0xc05e,
+  0xec5d, 0xc060, 0xec5c, 0xef4b, 0xec5e, 0xc05d, 0xec5f, 0xef4e,
+  0xef4c, 0xef4d, 0xef52, 0xc34b, 0xef51, 0xef54, 0xef53, 0xef50,
+  0xef4f, 0xc1fd, 0xf1ae, 0xf1ad, 0xc34a, 0xc348, 0xc349, 0xf1ac,
+  0xf3b1, 0xc443, 0xf3b0, 0xf3af, 0xc444, 0xf558, 0xf557, 0xf555,
+  0xf554, 0xc4c8, 0xc4c7, 0xf559, 0xf776, 0xc5b9, 0xf677, 0xc557,
+  0xf676, 0xf556, 0xf777, 0xc5e4, 0xc661, 0xf959, 0xf9b1, 0xadba,
+  0xd850, 0xef55, 0xadbb, 0xe4d2, 0xe4d1, 0xec60, 0xef57, 0xef56,
+  0xc34c, 0xf3b2, 0xf3b3, 0xc4c9, 0xf9b2, 0xb0a8, 0xb6bf, 0xb6be,
+  0xe0e4, 0xe0e6, 0xb9a4, 0xe0e5, 0xb9a3, 0xb9a5, 0xe0e7, 0xe4d4,
+  0xe4d6, 0xe4d5, 0xe4d8, 0xbbe9, 0xe4d7, 0xe4d3, 0xe4d9, 0xe8cc,
+  0xe8cf, 0xe8d1, 0xe8c7, 0xe8cb, 0xe8c8, 0xbe6e, 0xbe71, 0xbe73,
+  0xe8c9, 0xe8ca, 0xbe72, 0xe8cd, 0xe8d0, 0xe8ce, 0xbe74, 0xbe70,
+  0xe8c6, 0xbe6d, 0xbe6f, 0xc063, 0xec66, 0xec64, 0xec63, 0xec69,
+  0xec68, 0xec67, 0xec62, 0xc062, 0xec61, 0xec65, 0xc064, 0xef5a,
+  0xef5e, 0xef5b, 0xef5d, 0xef5c, 0xef59, 0xef5f, 0xef62, 0xef60,
+  0xef61, 0xc240, 0xc1fe, 0xef58, 0xef63, 0xf1b3, 0xf1b6, 0xf1b8,
+  0xf1b7, 0xf1b1, 0xf1b5, 0xf1b0, 0xf1b2, 0xc34d, 0xf1af, 0xf1b4,
+  0xf3c0, 0xf3b5, 0xc445, 0xc446, 0xf3b4, 0xf3b9, 0xf3bf, 0xf3b7,
+  0xf3be, 0xf3bb, 0xf3ba, 0xf3bd, 0xf3b8, 0xf3b6, 0xf3bc, 0xf560,
+  0xf55e, 0xc4ca, 0xf55d, 0xf563, 0xf561, 0xc4cb, 0xf55c, 0xf55a,
+  0xf55b, 0xc4cd, 0xf55f, 0xc4cc, 0xf562, 0xf678, 0xf67e, 0xf679,
+  0xc55b, 0xf6a1, 0xc55a, 0xf67d, 0xf67c, 0xc559, 0xf67b, 0xc558,
+  0xf67a, 0xf77d, 0xf7a1, 0xf77e, 0xf77b, 0xc5bb, 0xf778, 0xf77c,
+  0xf7a3, 0xf7a2, 0xf779, 0xf77a, 0xc5ba, 0xf852, 0xc5e7, 0xf853,
+  0xc5e5, 0xc5e6, 0xf8d3, 0xc64a, 0xf976, 0xc66a, 0xf9b3, 0xc66b,
+  0xf9b4, 0xf9b5, 0xf9c3, 0xf9c2, 0xc67a, 0xf9cd, 0xb0a9, 0xe0e9,
+  0xe0e8, 0xbbea, 0xbbeb, 0xe4da, 0xe8d2, 0xec6c, 0xbe75, 0xc065,
+  0xec6a, 0xec6d, 0xc066, 0xef64, 0xec6b, 0xf1b9, 0xc34e, 0xf3c1,
+  0xf566, 0xf564, 0xf565, 0xf6a2, 0xc55c, 0xf7a4, 0xc5ea, 0xc5bc,
+  0xc5e8, 0xc5e9, 0xf8d4, 0xc662, 0xb0aa, 0xf1ba, 0xd449, 0xb9a6,
+  0xe4db, 0xbbec, 0xe4dc, 0xe8d4, 0xe8d3, 0xc068, 0xbe76, 0xbe77,
+  0xe8d7, 0xe8d6, 0xe8d5, 0xec6e, 0xec71, 0xec70, 0xec6f, 0xc067,
+  0xef68, 0xef66, 0xef65, 0xef67, 0xc34f, 0xf1bc, 0xf1bd, 0xc350,
+  0xf1bb, 0xf3c3, 0xf3c2, 0xf3c5, 0xc447, 0xf3c4, 0xf567, 0xf569,
+  0xf568, 0xf6a3, 0xf6a6, 0xf6a4, 0xf6a5, 0xf7a5, 0xc5bd, 0xf854,
+  0xf855, 0xf856, 0xc64b, 0xc663, 0xf9b6, 0xb0ab, 0xbe78, 0xc069,
+  0xf1be, 0xf7a6, 0xf9c4, 0xd44a, 0xc67b, 0xb0ac, 0xec72, 0xf1bf,
+  0xf3c6, 0xf6a7, 0xf7a7, 0xb0ad, 0xe4dd, 0xe4de, 0xbbed, 0xbbee,
+  0xe8d9, 0xbe7a, 0xbe79, 0xe8d8, 0xef69, 0xf1c0, 0xf1c2, 0xf1c1,
+  0xc353, 0xc352, 0xc351, 0xc55e, 0xf6a8, 0xc55d, 0xf7a9, 0xf7a8,
+  0xc64c, 0xf8d5, 0xb3bd, 0xe0ea, 0xe4e1, 0xe4df, 0xe4e0, 0xe8e2,
+  0xe8dd, 0xe8da, 0xe8e1, 0xe8e3, 0xbe7c, 0xe8e0, 0xe8dc, 0xe8db,
+  0xe8df, 0xe8de, 0xbe7b, 0xec7d, 0xec78, 0xec76, 0xeca1, 0xec77,
+  0xec73, 0xec79, 0xec74, 0xef72, 0xec75, 0xeca2, 0xec7c, 0xc06a,
+  0xec7b, 0xec7a, 0xec7e, 0xef6a, 0xef6d, 0xef6c, 0xef74, 0xef6f,
+  0xef73, 0xef71, 0xef70, 0xef6e, 0xef6b, 0xc243, 0xc242, 0xc244,
+  0xc241, 0xef75, 0xf1c8, 0xf1cb, 0xf1c9, 0xf1cd, 0xf1ce, 0xf1c6,
+  0xc358, 0xf1c7, 0xf1c5, 0xf1cc, 0xf1c4, 0xf1c3, 0xc357, 0xc355,
+  0xc354, 0xf1ca, 0xf3cf, 0xf3d5, 0xc44a, 0xf3d0, 0xf3d3, 0xf3d7,
+  0xc44b, 0xf3d2, 0xf3ca, 0xf3c9, 0xf3d6, 0xf3cd, 0xf3cb, 0xf3d4,
+  0xf3cc, 0xc449, 0xc448, 0xf3c7, 0xf3c8, 0xf3d1, 0xf3ce, 0xf56c,
+  0xf56f, 0xc356, 0xf56d, 0xf573, 0xf571, 0xf56b, 0xf576, 0xf56a,
+  0xc4cf, 0xf572, 0xf56e, 0xc4ce, 0xf575, 0xf574, 0xf6ab, 0xf6aa,
+  0xf6b1, 0xf6ad, 0xf6b0, 0xc560, 0xf6ae, 0xf6af, 0xf6a9, 0xf6ac,
+  0xc55f, 0xc5bf, 0xf7b4, 0xf7af, 0xf7b3, 0xf7b6, 0xf7b2, 0xf7ae,
+  0xc5c1, 0xf7b1, 0xf7b5, 0xc5c0, 0xf7ac, 0xf570, 0xf7b0, 0xf7ad,
+  0xf7aa, 0xf7ab, 0xc5be, 0xf85a, 0xf85c, 0xf85f, 0xf85b, 0xf860,
+  0xf859, 0xf857, 0xc5eb, 0xf85d, 0xc5ed, 0xc5ec, 0xf858, 0xf85e,
+  0xf8da, 0xc64d, 0xf8db, 0xf8d9, 0xf8d6, 0xf8d8, 0xf8d7, 0xf95a,
+  0xf95c, 0xf95b, 0xf979, 0xf978, 0xf977, 0xf97a, 0xc673, 0xc674,
+  0xf9ca, 0xf9ce, 0xb3be, 0xdcaf, 0xe0ed, 0xb9a7, 0xe0eb, 0xe0ec,
+  0xe4e2, 0xe4e3, 0xbbf1, 0xbbef, 0xe4e4, 0xbbf0, 0xe8e8, 0xe8eb,
+  0xe8e5, 0xe8ec, 0xe8e4, 0xe8e6, 0xe8e7, 0xe8ea, 0xbea1, 0xe8ef,
+  0xe8ee, 0xbe7d, 0xe8e9, 0xe8ed, 0xbe7e, 0xecac, 0xc06f, 0xeca7,
+  0xc06b, 0xeca4, 0xecaa, 0xecad, 0xc070, 0xeca9, 0xeca6, 0xecae,
+  0xeca5, 0xecab, 0xc06c, 0xeca3, 0xc06d, 0xc06e, 0xeca8, 0xefa9,
+  0xef7a, 0xef7b, 0xef7e, 0xef7c, 0xef76, 0xef79, 0xefa5, 0xef7d,
+  0xc245, 0xefa7, 0xefa4, 0xc246, 0xefa6, 0xef77, 0xefa2, 0xefa3,
+  0xefa1, 0xf1d2, 0xf1d4, 0xf1d7, 0xf1d1, 0xc359, 0xf1d9, 0xf1d0,
+  0xf1da, 0xf1d6, 0xf1d8, 0xf1dc, 0xf1d5, 0xf1dd, 0xf1d3, 0xf1cf,
+  0xc35a, 0xf1db, 0xc35b, 0xc44d, 0xef78, 0xf3f1, 0xf3e8, 0xc44f,
+  0xf3e4, 0xc450, 0xf3ed, 0xf3e7, 0xf3dd, 0xc44e, 0xf3ea, 0xf3e5,
+  0xf3e6, 0xf3d8, 0xf3df, 0xf3ee, 0xf3eb, 0xf3e3, 0xf3ef, 0xf3de,
+  0xf3d9, 0xf3ec, 0xf3db, 0xf3e9, 0xf3e0, 0xf3f0, 0xf3dc, 0xc44c,
+  0xf3da, 0xf3e1, 0xf3e2, 0xf57d, 0xf57b, 0xf5a2, 0xf5ae, 0xf5a5,
+  0xf57c, 0xf578, 0xf5a7, 0xf57e, 0xf5a3, 0xf57a, 0xf5aa, 0xf577,
+  0xf5a1, 0xf5a6, 0xf5a8, 0xf5ab, 0xf579, 0xf5af, 0xf5b0, 0xf5a9,
+  0xf5ad, 0xf5a4, 0xf6c1, 0xf6c4, 0xc561, 0xf6c3, 0xf6c8, 0xf6c6,
+  0xc562, 0xf6bd, 0xf6b3, 0xf6b2, 0xc564, 0xf6bf, 0xf6c0, 0xf6bc,
+  0xf6b4, 0xf6b9, 0xf5ac, 0xf6b5, 0xc563, 0xf6bb, 0xf6ba, 0xf6b6,
+  0xf6c2, 0xf6b7, 0xf7bb, 0xf6c5, 0xf6c7, 0xf6be, 0xf6b8, 0xf7bc,
+  0xf7be, 0xf7b8, 0xc5c2, 0xf7c5, 0xf7c3, 0xc5c3, 0xf7c2, 0xf7c1,
+  0xf7ba, 0xf7b7, 0xf7bd, 0xf7c6, 0xf7b9, 0xf7bf, 0xf869, 0xf86e,
+  0xf864, 0xf867, 0xc5ee, 0xf86b, 0xf872, 0xf7c0, 0xf865, 0xf86f,
+  0xf873, 0xf86a, 0xf863, 0xf86d, 0xf86c, 0xf871, 0xf870, 0xf7c4,
+  0xf868, 0xf862, 0xf866, 0xc64e, 0xc64f, 0xf861, 0xf8e6, 0xf8dd,
+  0xf8e5, 0xf8e2, 0xf8e3, 0xf8dc, 0xf8df, 0xf8e7, 0xf8e1, 0xf8e0,
+  0xf8de, 0xf8e4, 0xf95d, 0xf95e, 0xf960, 0xf95f, 0xf962, 0xf961,
+  0xf97c, 0xf97b, 0xf9b7, 0xf9b8, 0xf9c5, 0xc678, 0xc67c, 0xf9cf,
+  0xc67d, 0xb3bf, 0xc4d0, 0xf6c9, 0xc650, 0xc651, 0xb3c0, 0xe0ee,
+  0xb9a8, 0xe8f0, 0xecb0, 0xecb1, 0xecaf, 0xefab, 0xefaa, 0xc247,
+  0xf1df, 0xefac, 0xf1de, 0xf3f3, 0xc451, 0xc453, 0xf3f2, 0xc452,
+  0xf5b1, 0xf5b3, 0xf5b2, 0xf6ca, 0xc565, 0xc5ef, 0xf8e8, 0xf963,
+  0xf9d2, 0xb3c1, 0xe4e5, 0xbea2, 0xecb3, 0xecb2, 0xefad, 0xc454,
+  0xc4d1, 0xf7c7, 0xf9cb, 0xb3c2, 0xbbf2, 0xbea3, 0xf3f4, 0xf874,
+  0xb6c0, 0xefae, 0xc664, 0xb6c1, 0xbea4, 0xc248, 0xf875, 0xb6c2,
+  0xe8f1, 0xc072, 0xecb4, 0xecb5, 0xc071, 0xefaf, 0xc24c, 0xc24a,
+  0xc24b, 0xc249, 0xf1e0, 0xc35c, 0xf5b5, 0xf5b4, 0xf5b7, 0xf5b6,
+  0xc4d2, 0xf6cb, 0xf6cd, 0xf6cc, 0xc566, 0xf7c8, 0xf876, 0xf877,
+  0xc5f0, 0xf964, 0xf97d, 0xc675, 0xdcb0, 0xecb6, 0xefb0, 0xf3f5,
+  0xe0ef, 0xefb1, 0xf1e2, 0xf1e1, 0xf878, 0xc652, 0xf965, 0xf97e,
+  0xb9a9, 0xe8f2, 0xe8f3, 0xecb7, 0xb9aa, 0xc35d, 0xf1e3, 0xf6cf,
+  0xc567, 0xf6d0, 0xf6ce, 0xf879, 0xf8e9, 0xb9ab, 0xefb4, 0xefb3,
+  0xefb2, 0xf1e4, 0xf1e8, 0xf1e7, 0xf1e6, 0xf1e5, 0xc35e, 0xf3f6,
+  0xf5b9, 0xc4d3, 0xf5b8, 0xf6d1, 0xf7cb, 0xf7ca, 0xc5c4, 0xf7c9,
+  0xf87c, 0xf87b, 0xf87a, 0xbbf3, 0xecb8, 0xc24d, 0xf3f7, 0xf3f8,
+  0xf7cc, 0xf87d, 0xf8ea, 0xf966, 0xf9b9, 0xf9d4, 0xbbf4, 0xc24e,
+  0xf1e9, 0xf3f9, 0xf6d2, 0xf87e, 0xbea6, 0xefb5, 0xf1ea, 0xf3fa,
+  0xf3fb, 0xf3fc, 0xf5be, 0xf5ba, 0xc568, 0xf5bd, 0xf5bc, 0xc4d4,
+  0xf5bb, 0xc4d6, 0xc4d5, 0xf6d4, 0xf6d3, 0xc569, 0xc56a, 0xc5c6,
+  0xf7cd, 0xc5c5, 0xf8a3, 0xf8a4, 0xf8a2, 0xf8a1, 0xc654, 0xf8eb,
+  0xf8ec, 0xf8ed, 0xc653, 0xf967, 0xf96a, 0xf969, 0xf968, 0xf9d3,
+  0xc073, 0xc365, 0xf5bf, 0xf6d5, 0xc5c7, 0xf7ce, 0xf9d5, 0xc074,
+  0xefb6, 0xf7cf, 0xf9a1, 0xc94a, 0xddfc, 0xa14a, 0xa157, 0xa159,
+  0xa15b, 0xa15f, 0xa160, 0xa163, 0xa164, 0xa167, 0xa168, 0xa16b,
+  0xa16c, 0xa16f, 0xa170, 0xa173, 0xa174, 0xa177, 0xa178, 0xa17b,
+  0xa17c, 0xa1c6, 0xa1c7, 0xa1ca, 0xa1cb, 0xa1c8, 0xa1c9, 0xa15c,
+  0xa14d, 0xa14f, 0xa151, 0xa152, 0xa153, 0xa154, 0xa17d, 0xa17e,
+  0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1cc, 0xa1cd, 0xa1ce, 0xa1de,
+  0xa1df, 0xa1e0, 0xa1e1, 0xa1e2, 0xa24c, 0xa24d, 0xa24e, 0xa149,
+  0xa1ad, 0xa243, 0xa248, 0xa1ae, 0xa15d, 0xa15e, 0xa1af, 0xa1cf,
+  0xa141, 0xa1d0, 0xa144, 0xa241, 0xa2af, 0xa2b0, 0xa2b1, 0xa2b2,
+  0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6, 0xa2b7, 0xa2b8, 0xa147, 0xa146,
+  0xa1d5, 0xa1d7, 0xa1d6, 0xa148, 0xa249, 0xa2cf, 0xa2d0, 0xa2d1,
+  0xa2d2, 0xa2d3, 0xa2d4, 0xa2d5, 0xa2d6, 0xa2d7, 0xa2d8, 0xa2d9,
+  0xa2da, 0xa2db, 0xa2dc, 0xa2dd, 0xa2de, 0xa2df, 0xa2e0, 0xa2e1,
+  0xa2e2, 0xa2e3, 0xa2e4, 0xa2e5, 0xa2e6, 0xa2e7, 0xa2e8, 0xa242,
+  0xa1c4, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, 0xa2ed, 0xa2ee, 0xa2ef,
+  0xa2f0, 0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7,
+  0xa2f8, 0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0xa2fd, 0xa2fe, 0xa340,
+  0xa341, 0xa342, 0xa343, 0xa161, 0xa155, 0xa162, 0xa14e,
+};
+
+static const Summary16 big5_uni2indx_page00[16] = {
+  /* 0x0000 */
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x00ac }, {    4, 0x0083 },
+  {    7, 0x0000 }, {    7, 0x0080 }, {    8, 0x0000 }, {    8, 0x0080 },
+};
+static const Summary16 big5_uni2indx_page02[38] = {
+  /* 0x0200 */
+  {    9, 0x0000 }, {    9, 0x0000 }, {    9, 0x0000 }, {    9, 0x0000 },
+  {    9, 0x0000 }, {    9, 0x0000 }, {    9, 0x0000 }, {    9, 0x0000 },
+  {    9, 0x0000 }, {    9, 0x0000 }, {    9, 0x0000 }, {    9, 0x0000 },
+  {    9, 0x0e80 }, {   13, 0x0200 }, {   14, 0x0000 }, {   14, 0x0000 },
+  /* 0x0300 */
+  {   14, 0x0000 }, {   14, 0x0000 }, {   14, 0x0000 }, {   14, 0x0000 },
+  {   14, 0x0000 }, {   14, 0x0000 }, {   14, 0x0000 }, {   14, 0x0000 },
+  {   14, 0x0000 }, {   14, 0xfffe }, {   29, 0x03fb }, {   38, 0xfffe },
+  {   53, 0x03fb }, {   62, 0x0000 }, {   62, 0x0000 }, {   62, 0x0000 },
+  /* 0x0400 */
+  {   62, 0x0002 }, {   63, 0x1ff0 }, {   72, 0xfff8 }, {   85, 0xffff },
+  {  101, 0xffff }, {  117, 0x0002 },
+};
+static const Summary16 big5_uni2indx_page20[44] = {
+  /* 0x2000 */
+  {  118, 0x0000 }, {  118, 0x3318 }, {  124, 0x0064 }, {  127, 0x4824 },
+  {  131, 0x0000 }, {  131, 0x0000 }, {  131, 0x0000 }, {  131, 0x0000 },
+  {  131, 0x0000 }, {  131, 0x0000 }, {  131, 0x0000 }, {  131, 0x0000 },
+  {  131, 0x0000 }, {  131, 0x0000 }, {  131, 0x0000 }, {  131, 0x0000 },
+  /* 0x2100 */
+  {  131, 0x0228 }, {  134, 0x0000 }, {  134, 0x0000 }, {  134, 0x0000 },
+  {  134, 0x0000 }, {  134, 0x0000 }, {  134, 0x03ff }, {  144, 0x0000 },
+  {  144, 0x0000 }, {  144, 0x03cf }, {  152, 0x0000 }, {  152, 0x0000 },
+  {  152, 0x0000 }, {  152, 0x0000 }, {  152, 0x0000 }, {  152, 0x0000 },
+  /* 0x2200 */
+  {  152, 0x0000 }, {  152, 0xc400 }, {  155, 0x4e29 }, {  162, 0x1030 },
+  {  165, 0x0000 }, {  165, 0x0004 }, {  166, 0x00c3 }, {  170, 0x0000 },
+  {  170, 0x0000 }, {  170, 0x0000 }, {  170, 0x0020 }, {  171, 0x8000 },
+};
+static const Summary16 big5_uni2indx_page24[37] = {
+  /* 0x2400 */
+  {  172, 0x0000 }, {  172, 0x0000 }, {  172, 0x0000 }, {  172, 0x0000 },
+  {  172, 0x0000 }, {  172, 0x0000 }, {  172, 0x03ff }, {  182, 0x3ff0 },
+  {  192, 0x0000 }, {  192, 0x0000 }, {  192, 0x0000 }, {  192, 0x0000 },
+  {  192, 0x0000 }, {  192, 0x0000 }, {  192, 0x0000 }, {  192, 0x0000 },
+  /* 0x2500 */
+  {  192, 0x1005 }, {  195, 0x1111 }, {  199, 0x1010 }, {  201, 0x1010 },
+  {  203, 0x0000 }, {  203, 0x4001 }, {  205, 0xe402 }, {  210, 0x000f },
+  {  214, 0xfffe }, {  229, 0x0030 }, {  231, 0x0003 }, {  233, 0x300c },
+  {  237, 0xc8c0 }, {  242, 0x0000 }, {  242, 0x003c }, {  246, 0x0000 },
+  /* 0x2600 */
+  {  246, 0x0260 }, {  249, 0x0000 }, {  249, 0x0000 }, {  249, 0x0000 },
+  {  249, 0x0007 },
+};
+static const Summary16 big5_uni2indx_page30[62] = {
+  /* 0x3000 */
+  {  252, 0xff2f }, {  265, 0x6037 }, {  272, 0x03fe }, {  281, 0x0000 },
+  {  281, 0xfffe }, {  296, 0xffff }, {  312, 0xffff }, {  328, 0xffff },
+  {  344, 0xffff }, {  360, 0x600f }, {  366, 0xfffe }, {  381, 0xffff },
+  {  397, 0xffff }, {  413, 0xffff }, {  429, 0xffff }, {  445, 0x407f },
+  /* 0x3100 */
+  {  453, 0xffe0 }, {  464, 0xffff }, {  480, 0x03ff }, {  490, 0x0000 },
+  {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 },
+  {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 },
+  {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 },
+  /* 0x3200 */
+  {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 },
+  {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0000 },
+  {  490, 0x0000 }, {  490, 0x0000 }, {  490, 0x0008 }, {  491, 0x0000 },
+  {  491, 0x0000 }, {  491, 0x0000 }, {  491, 0x0000 }, {  491, 0x0000 },
+  /* 0x3300 */
+  {  491, 0x0000 }, {  491, 0x0000 }, {  491, 0x0000 }, {  491, 0x0000 },
+  {  491, 0x0000 }, {  491, 0x0000 }, {  491, 0x0000 }, {  491, 0x0000 },
+  {  491, 0xc000 }, {  493, 0x7000 }, {  496, 0x0002 }, {  497, 0x0000 },
+  {  497, 0x4010 }, {  499, 0x0026 },
+};
+static const Summary16 big5_uni2indx_page4e[1307] = {
+  /* 0x4e00 */
+  {  502, 0xff8b }, {  514, 0xc373 }, {  523, 0x6840 }, {  527, 0x1b0f },
+  {  535, 0xe9ac }, {  544, 0xf34c }, {  553, 0x0200 }, {  554, 0xc008 },
+  {  557, 0x795c }, {  566, 0xca3e }, {  575, 0x7976 }, {  585, 0x0648 },
+  {  589, 0x2fdf }, {  601, 0xf7f0 }, {  612, 0x033a }, {  618, 0xa8ff },
+  /* 0x4f00 */
+  {  629, 0xef37 }, {  641, 0x233f }, {  650, 0xb004 }, {  654, 0xfd59 },
+  {  665, 0xf3ca }, {  675, 0xffff }, {  691, 0xde9f }, {  703, 0xfff9 },
+  {  717, 0xabff }, {  730, 0x7df7 }, {  743, 0xc000 }, {  745, 0x8eec },
+  {  754, 0xeebf }, {  767, 0xffdb }, {  781, 0xd003 }, {  786, 0x45fa },
+  /* 0x5000 */
+  {  795, 0xfae1 }, {  805, 0xdffe }, {  819, 0xbfef }, {  833, 0x10ab },
+  {  839, 0xffeb }, {  853, 0xfcaa }, {  863, 0xef3f }, {  876, 0x24fd },
+  {  885, 0x78ad }, {  894, 0x7f76 }, {  906, 0xf00c }, {  912, 0xedff },
+  {  926, 0xcff6 }, {  938, 0x2cfa }, {  947, 0xf7f9 }, {  960, 0xeb6b },
+  /* 0x5100 */
+  {  971, 0x1ffd }, {  983, 0x95bf }, {  994, 0x6677 }, { 1004, 0xbfbf },
+  { 1018, 0x3bfb }, { 1030, 0xfeb4 }, { 1041, 0x7bae }, { 1052, 0x11e2 },
+  { 1058, 0xa681 }, { 1064, 0x41be }, { 1072, 0x1435 }, { 1078, 0x72c3 },
+  { 1086, 0x7d70 }, { 1095, 0x7191 }, { 1102, 0x0003 }, { 1104, 0x276b },
+  /* 0x5200 */
+  { 1113, 0x57cb }, { 1123, 0x70cf }, { 1132, 0x4732 }, { 1139, 0x0def },
+  { 1149, 0x7eda }, { 1160, 0xfc74 }, { 1170, 0xfe06 }, { 1179, 0xbdb4 },
+  { 1189, 0x3f9f }, { 1201, 0x8bca }, { 1209, 0x7e49 }, { 1218, 0x5800 },
+  { 1221, 0x228f }, { 1228, 0xebec }, { 1239, 0x8a5c }, { 1246, 0xddbb },
+  /* 0x5300 */
+  { 1258, 0xef60 }, { 1267, 0xb6e7 }, { 1278, 0xa40f }, { 1285, 0xf293 },
+  { 1294, 0x37bb }, { 1305, 0x549e }, { 1313, 0xd04b }, { 1320, 0x9baf },
+  { 1331, 0xc414 }, { 1336, 0xf7d4 }, { 1347, 0x30b0 }, { 1352, 0x0a14 },
+  { 1356, 0x2f08 }, { 1362, 0x88d0 }, { 1367, 0xff7e }, { 1381, 0x192f },
+  /* 0x5400 */
+  { 1389, 0xffda }, { 1402, 0xfb07 }, { 1412, 0x7ff1 }, { 1424, 0x7beb },
+  { 1436, 0xc5ef }, { 1447, 0x0010 }, { 1448, 0x99ff }, { 1460, 0xfdff },
+  { 1475, 0x79d7 }, { 1486, 0x0567 }, { 1493, 0xffe7 }, { 1507, 0xfdcb },
+  { 1519, 0xc3ff }, { 1531, 0x4040 }, { 1533, 0x6ff7 }, { 1546, 0xbd8e },
+  /* 0x5500 */
+  { 1556, 0xdffa }, { 1569, 0x0497 }, { 1575, 0xf4c0 }, { 1582, 0x5bff },
+  { 1595, 0xed7b }, { 1607, 0xd0e7 }, { 1616, 0x047e }, { 1623, 0xf8e0 },
+  { 1631, 0xff9f }, { 1645, 0xb73e }, { 1656, 0x7dfe }, { 1669, 0x882e },
+  { 1675, 0xfffd }, { 1690, 0xbe7f }, { 1703, 0x83fe }, { 1713, 0xf6c4 },
+  /* 0x5600 */
+  { 1722, 0xf357 }, { 1733, 0xb8fd }, { 1744, 0xd680 }, { 1750, 0xef7d },
+  { 1763, 0x5767 }, { 1773, 0x4788 }, { 1779, 0xff7d }, { 1793, 0xc3df },
+  { 1804, 0xf0ff }, { 1816, 0x37a9 }, { 1825, 0x7de0 }, { 1834, 0x70fc },
+  { 1843, 0x3f6f }, { 1855, 0xec9a }, { 1864, 0x4cb3 }, { 1872, 0x8681 },
+  /* 0x5700 */
+  { 1877, 0x3f9e }, { 1888, 0xdd5c }, { 1898, 0xf70d }, { 1908, 0x4819 },
+  { 1913, 0xfea3 }, { 1924, 0x0007 }, { 1927, 0xaf56 }, { 1937, 0x38ff },
+  { 1948, 0x980d }, { 1954, 0xefb8 }, { 1965, 0x403d }, { 1971, 0xb760 },
+  { 1979, 0xd8ce }, { 1988, 0x9035 }, { 1994, 0x72bf }, { 2005, 0x3fff },
+  /* 0x5800 */
+  { 2019, 0x7ff7 }, { 2033, 0x7a11 }, { 2040, 0xf7bb }, { 2053, 0xabff },
+  { 2066, 0xff00 }, { 2074, 0x6fbe }, { 2086, 0xa93c }, { 2094, 0xfe72 },
+  { 2105, 0xcfef }, { 2118, 0xf11b }, { 2127, 0xdb6b }, { 2138, 0xf40a },
+  { 2145, 0xc3e6 }, { 2154, 0xef7e }, { 2167, 0x9b9c }, { 2176, 0xf610 },
+  /* 0x5900 */
+  { 2183, 0xf048 }, { 2189, 0x16f4 }, { 2197, 0xfeb5 }, { 2209, 0x5182 },
+  { 2214, 0xc7b1 }, { 2223, 0x15bb }, { 2232, 0x6e87 }, { 2241, 0xfbdf },
+  { 2255, 0xe43f }, { 2265, 0x63cd }, { 2274, 0xc1ff }, { 2285, 0x7e7e },
+  { 2297, 0xfdeb }, { 2310, 0x7d5f }, { 2322, 0x777b }, { 2334, 0xfcfe },
+  /* 0x5a00 */
+  { 2347, 0x960b }, { 2354, 0xdbea }, { 2365, 0x6229 }, { 2371, 0x53e8 },
+  { 2379, 0x37df }, { 2391, 0xfdef }, { 2405, 0x36f5 }, { 2415, 0xbd81 },
+  { 2423, 0xdc18 }, { 2430, 0xfcbd }, { 2442, 0xd2e4 }, { 2450, 0xffff },
+  { 2466, 0x3fd7 }, { 2478, 0xffe0 }, { 2489, 0x7f6f }, { 2502, 0xabf8 },
+  /* 0x5b00 */
+  { 2512, 0x9bae }, { 2522, 0x6ed9 }, { 2532, 0xf5fb }, { 2545, 0xf115 },
+  { 2553, 0x79a9 }, { 2562, 0xbdfb }, { 2575, 0x5a3c }, { 2583, 0xadaf },
+  { 2594, 0xdbba }, { 2605, 0x1fac }, { 2614, 0x71fc }, { 2624, 0x8379 },
+  { 2632, 0x7cf7 }, { 2644, 0xc35f }, { 2654, 0xdfff }, { 2669, 0x0567 },
+  /* 0x5c00 */
+  { 2676, 0xff9a }, { 2688, 0x8467 }, { 2695, 0x1534 }, { 2701, 0xdf8b },
+  { 2712, 0xf9f3 }, { 2724, 0x3373 }, { 2733, 0xf7bd }, { 2746, 0x5e1a },
+  { 2754, 0xbf40 }, { 2762, 0xa03f }, { 2770, 0xffff }, { 2786, 0x01eb },
+  { 2793, 0xdfc0 }, { 2802, 0xcfdd }, { 2814, 0x7500 }, { 2819, 0xabd3 },
+  /* 0x5d00 */
+  { 2829, 0xf8c3 }, { 2838, 0xeed6 }, { 2849, 0x43fd }, { 2859, 0xb7ff },
+  { 2873, 0x5eaf }, { 2884, 0x4227 }, { 2890, 0x9bac }, { 2899, 0xf686 },
+  { 2908, 0x27d7 }, { 2918, 0xf6bc }, { 2929, 0xf787 }, { 2940, 0x35b7 },
+  { 2950, 0xaacd }, { 2959, 0xe176 }, { 2968, 0x49e7 }, { 2977, 0xe29f },
+  /* 0x5e00 */
+  { 2987, 0x545c }, { 2994, 0xaff2 }, { 3005, 0x2b3f }, { 3015, 0x61d8 },
+  { 3022, 0xfc3b }, { 3033, 0xbbb8 }, { 3043, 0xffcf }, { 3057, 0x7b7d },
+  { 3069, 0xbf95 }, { 3080, 0x1ce0 }, { 3086, 0x7dfd }, { 3099, 0x43ff },
+  { 3110, 0x5ff6 }, { 3122, 0xfffe }, { 3137, 0xd3ef }, { 3149, 0xc4ce },
+  /* 0x5f00 */
+  { 3157, 0x8db6 }, { 3166, 0xadbc }, { 3176, 0x63dc }, { 3185, 0x11eb },
+  { 3193, 0xdf59 }, { 3204, 0x23d0 }, { 3210, 0xbeb4 }, { 3220, 0xf3db },
+  { 3232, 0x1fe7 }, { 3243, 0xdbc7 }, { 3254, 0xff63 }, { 3266, 0xfae4 },
+  { 3276, 0xb22b }, { 3284, 0x63f7 }, { 3295, 0xed3b }, { 3306, 0xadba },
+  /* 0x6000 */
+  { 3316, 0xfe01 }, { 3324, 0x7eff }, { 3338, 0xfff7 }, { 3353, 0x02bc },
+  { 3359, 0x32ff }, { 3370, 0xef39 }, { 3381, 0xfffc }, { 3395, 0x8005 },
+  { 3398, 0x77fb }, { 3411, 0xbcf5 }, { 3422, 0x010d }, { 3426, 0xfff7 },
+  { 3441, 0xfffb }, { 3456, 0xbf3a }, { 3467, 0x0057 }, { 3472, 0xdfff },
+  /* 0x6100 */
+  { 3487, 0xef7b }, { 3500, 0xbd7d }, { 3512, 0xdb88 }, { 3520, 0xc8d4 },
+  { 3527, 0xfff3 }, { 3541, 0xed7c }, { 3552, 0x5dee }, { 3563, 0x56ff },
+  { 3575, 0x7e0d }, { 3584, 0xac5f }, { 3594, 0xff96 }, { 3606, 0xd57f },
+  { 3618, 0x3fee }, { 3630, 0xc140 }, { 3634, 0x6ff9 }, { 3646, 0xffe7 },
+  /* 0x6200 */
+  { 3660, 0x779b }, { 3671, 0x8e77 }, { 3681, 0x6ebf }, { 3693, 0xe45d },
+  { 3702, 0x6fcf }, { 3714, 0x5f1f }, { 3725, 0xe07f }, { 3735, 0xfedf },
+  { 3749, 0xd7db }, { 3761, 0x01fe }, { 3769, 0xff00 }, { 3777, 0xfb7b },
+  { 3790, 0xffd4 }, { 3802, 0x1fdf }, { 3814, 0xf800 }, { 3819, 0xffff },
+  /* 0x6300 */
+  { 3835, 0xfb8f }, { 3847, 0x007b }, { 3853, 0xbf00 }, { 3860, 0x7f5c },
+  { 3871, 0xffff }, { 3887, 0x07f3 }, { 3896, 0xeba0 }, { 3904, 0x3de7 },
+  { 3915, 0xf7bf }, { 3929, 0xfbd7 }, { 3942, 0xffbf }, { 3957, 0x6003 },
+  { 3961, 0xfffd }, { 3976, 0xbfed }, { 3989, 0xefbb }, { 4002, 0x027f },
+  /* 0x6400 */
+  { 4010, 0xfe40 }, { 4018, 0xddfd }, { 4031, 0xfdff }, { 4046, 0xe2f9 },
+  { 4056, 0x680b }, { 4062, 0xfb1f }, { 4074, 0xfbe3 }, { 4086, 0xaffd },
+  { 4099, 0x9fa4 }, { 4108, 0xf7ed }, { 4121, 0x7a7d }, { 4132, 0xf80f },
+  { 4141, 0xeebe }, { 4153, 0x0fd5 }, { 4162, 0xbb5d }, { 4173, 0xfd9f },
+  /* 0x6500 */
+  { 4186, 0xf2db }, { 4197, 0x3bf9 }, { 4208, 0xfe7f }, { 4222, 0xebcc },
+  { 4232, 0x876a }, { 4240, 0x73fa }, { 4251, 0x95fc }, { 4261, 0x9ffc },
+  { 4273, 0x109f }, { 4280, 0xfaf7 }, { 4293, 0xddb7 }, { 4305, 0xbbcd },
+  { 4316, 0xf87e }, { 4327, 0xeccd }, { 4337, 0xf366 }, { 4347, 0x3c3f },
+  /* 0x6600 */
+  { 4357, 0xfffd }, { 4372, 0xb03f }, { 4381, 0xe9f7 }, { 4393, 0x067e },
+  { 4401, 0x96ae }, { 4410, 0xfe06 }, { 4419, 0xd576 }, { 4429, 0x5fd7 },
+  { 4441, 0x3fd1 }, { 4451, 0xa3f3 }, { 4461, 0xcf07 }, { 4470, 0x6fb7 },
+  { 4482, 0x9fd1 }, { 4492, 0x7f44 }, { 4501, 0x7b59 }, { 4511, 0xd3dd },
+  /* 0x6700 */
+  { 4522, 0xaf3b }, { 4533, 0xa9bd }, { 4543, 0x7dcf }, { 4555, 0xff3a },
+  { 4567, 0xfbe0 }, { 4577, 0xf6eb }, { 4589, 0xb401 }, { 4594, 0xffff },
+  { 4610, 0x7afa }, { 4621, 0xb7bf }, { 4634, 0xc000 }, { 4636, 0x0ffd },
+  { 4647, 0xff7f }, { 4662, 0xff1f }, { 4675, 0xfefc }, { 4688, 0x95ff },
+  /* 0x6800 */
+  { 4700, 0x0000 }, { 4700, 0xb5dc }, { 4710, 0xef63 }, { 4721, 0x3f3e },
+  { 4732, 0xfb7f }, { 4746, 0x001b }, { 4750, 0xe800 }, { 4754, 0xfbf6 },
+  { 4767, 0x9eef }, { 4779, 0xb8df }, { 4790, 0xff9f }, { 4804, 0x003f },
+  { 4810, 0x7bd0 }, { 4819, 0xf5ff }, { 4833, 0xdfdb }, { 4846, 0x3fff },
+  /* 0x6900 */
+  { 4860, 0xfdf0 }, { 4871, 0x00bf }, { 4878, 0x8420 }, { 4881, 0xbbbd },
+  { 4893, 0xdf37 }, { 4905, 0xffde }, { 4919, 0xff6d }, { 4932, 0x0ff3 },
+  { 4942, 0x604c }, { 4947, 0x5efb }, { 4959, 0xfffb }, { 4974, 0xfafb },
+  { 4987, 0xfe5e }, { 4999, 0x0219 }, { 5003, 0x79f4 }, { 5013, 0xf9de },
+  /* 0x6a00 */
+  { 5025, 0xa7f7 }, { 5037, 0xebfa }, { 5049, 0x01eb }, { 5056, 0xff34 },
+  { 5067, 0xebd3 }, { 5078, 0xef73 }, { 5090, 0xafd7 }, { 5102, 0xc040 },
+  { 5105, 0x72bb }, { 5115, 0xdcff }, { 5128, 0xf17f }, { 5140, 0x2fd8 },
+  { 5149, 0xb8ec }, { 5158, 0xfe0b }, { 5168, 0xdda3 }, { 5178, 0x1f0b },
+  /* 0x6b00 */
+  { 5186, 0x8f1d }, { 5195, 0x47cf }, { 5205, 0xb12b }, { 5213, 0xffde },
+  { 5227, 0x7fee }, { 5240, 0xda73 }, { 5250, 0x24ff }, { 5260, 0xcbc4 },
+  { 5268, 0xf75d }, { 5280, 0xcbf2 }, { 5290, 0xecfd }, { 5302, 0xb4ed },
+  { 5312, 0xbff9 }, { 5325, 0x4ddd }, { 5335, 0x99dd }, { 5345, 0xfb8d },
+  /* 0x6c00 */
+  { 5356, 0xbb7f }, { 5369, 0xaf7b }, { 5381, 0xddfb }, { 5394, 0xc959 },
+  { 5402, 0xfc4f }, { 5413, 0xfab5 }, { 5424, 0xafe3 }, { 5435, 0x6d5f },
+  { 5446, 0xffff }, { 5462, 0x3f7d }, { 5474, 0x7800 }, { 5478, 0xffdb },
+  { 5492, 0xb6ff }, { 5505, 0x7eff }, { 5519, 0xfbaf }, { 5532, 0x022f },
+  /* 0x6d00 */
+  { 5538, 0xff9b }, { 5551, 0xefc7 }, { 5563, 0xffa5 }, { 5575, 0xffff },
+  { 5591, 0x0007 }, { 5594, 0xc700 }, { 5599, 0xf7ff }, { 5614, 0xfff1 },
+  { 5627, 0x7ffd }, { 5641, 0x01bf }, { 5649, 0xdc00 }, { 5654, 0xfdbc },
+  { 5666, 0xbff5 }, { 5679, 0xffff }, { 5695, 0xff7f }, { 5710, 0x3eff },
+  /* 0x6e00 */
+  { 5723, 0x0029 }, { 5726, 0xbe00 }, { 5732, 0xf9ff }, { 5746, 0xff7f },
+  { 5761, 0x6efb }, { 5773, 0xfd7e }, { 5786, 0xcbff }, { 5799, 0x039e },
+  { 5806, 0xe300 }, { 5811, 0xfbdd }, { 5824, 0xccff }, { 5836, 0xf6df },
+  { 5849, 0xffff }, { 5865, 0x117f }, { 5874, 0xf800 }, { 5879, 0xfbf6 },
+  /* 0x6f00 */
+  { 5892, 0xe7ef }, { 5905, 0xd73c }, { 5915, 0xfeef }, { 5929, 0xdfef },
+  { 5943, 0xc00b }, { 5948, 0xedbf }, { 5961, 0xfedf }, { 5975, 0xfdcd },
+  { 5987, 0x7bf5 }, { 5999, 0x40fd }, { 6007, 0xffff }, { 6023, 0xb75f },
+  { 6035, 0xffdf }, { 6050, 0xf930 }, { 6058, 0xfbdf }, { 6072, 0xdc97 },
+  /* 0x7000 */
+  { 6082, 0xfef3 }, { 6095, 0xbff2 }, { 6107, 0x8fdf }, { 6119, 0xdfbf },
+  { 6133, 0x177f }, { 6144, 0xede6 }, { 6155, 0x0f7f }, { 6166, 0x3553 },
+  { 6174, 0x447c }, { 6181, 0x877e }, { 6191, 0xfa12 }, { 6199, 0x45bb },
+  { 6208, 0xede0 }, { 6217, 0x779e }, { 6228, 0x8017 }, { 6233, 0xbfd9 },
+  /* 0x7100 */
+  { 6245, 0x7e55 }, { 6255, 0xde89 }, { 6264, 0xc16f }, { 6273, 0x0447 },
+  { 6278, 0x7ade }, { 6289, 0xf75d }, { 6301, 0x57ff }, { 6314, 0x2905 },
+  { 6319, 0x86f7 }, { 6329, 0xfe95 }, { 6340, 0x97b3 }, { 6350, 0xf32f },
+  { 6361, 0xcfff }, { 6375, 0x9f75 }, { 6386, 0x71f7 }, { 6397, 0xfb17 },
+  /* 0x7200 */
+  { 6408, 0x34ee }, { 6417, 0xee19 }, { 6426, 0x37cc }, { 6435, 0xef61 },
+  { 6445, 0x9fd6 }, { 6456, 0xef4c }, { 6466, 0xd68f }, { 6476, 0xfbdd },
+  { 6489, 0x7b73 }, { 6500, 0x6def }, { 6512, 0xd7fe }, { 6525, 0xa431 },
+  { 6531, 0x5e7f }, { 6543, 0x97d7 }, { 6554, 0x0f5b }, { 6563, 0xffd8 },
+  /* 0x7300 */
+  { 6575, 0x9d83 }, { 6583, 0x7bce }, { 6594, 0x22ec }, { 6601, 0xdcff },
+  { 6614, 0x763d }, { 6624, 0xef87 }, { 6635, 0xdfe7 }, { 6648, 0xfded },
+  { 6661, 0x4fff }, { 6674, 0xa0fc }, { 6682, 0x3b77 }, { 6693, 0xdbfc },
+  { 6705, 0x3ded }, { 6716, 0x7fdc }, { 6728, 0x6fa9 }, { 6738, 0xf570 },
+  /* 0x7400 */
+  { 6747, 0x3ffb }, { 6760, 0x2c40 }, { 6764, 0xff7f }, { 6779, 0x847f },
+  { 6788, 0xec57 }, { 6798, 0xdeb7 }, { 6810, 0xe69c }, { 6819, 0xf22f },
+  { 6829, 0x0feb }, { 6839, 0xd5b5 }, { 6849, 0xafeb }, { 6861, 0xede7 },
+  { 6873, 0x8c2f }, { 6881, 0xfff0 }, { 6893, 0x537f }, { 6904, 0xe8f0 },
+  /* 0x7500 */
+  { 6912, 0xb99d }, { 6922, 0xb5ff }, { 6935, 0xff66 }, { 6947, 0xe78f },
+  { 6958, 0xd981 }, { 6965, 0xbe10 }, { 6972, 0x9c7c }, { 6981, 0xe3c1 },
+  { 6989, 0x9cd1 }, { 6997, 0x2733 }, { 7005, 0x0cbc }, { 7012, 0xff6d },
+  { 7025, 0xfcb7 }, { 7037, 0xefb7 }, { 7050, 0xa0df }, { 7059, 0xffff },
+  /* 0x7600 */
+  { 7075, 0xbf0b }, { 7085, 0xfe7b }, { 7098, 0xa3ff }, { 7110, 0x353f },
+  { 7120, 0x13cc }, { 7127, 0x97cd }, { 7137, 0x7637 }, { 7147, 0xfb27 },
+  { 7158, 0xcfd6 }, { 7169, 0x7e6c }, { 7179, 0xec50 }, { 7186, 0xed31 },
+  { 7195, 0x677c }, { 7205, 0xfc1c }, { 7214, 0xf6fa }, { 7226, 0x5fbf },
+  /* 0x7700 */
+  { 7239, 0x0fba }, { 7248, 0xae2f }, { 7258, 0xa3ad }, { 7267, 0x7ffe },
+  { 7281, 0xfcf0 }, { 7291, 0xde74 }, { 7301, 0xffef }, { 7316, 0xf200 },
+  { 7321, 0xfbbf }, { 7335, 0xfea2 }, { 7345, 0x3daf }, { 7356, 0xbcff },
+  { 7369, 0xf694 }, { 7378, 0x5fb9 }, { 7389, 0xf3ad }, { 7400, 0x3f8f },
+  /* 0x7800 */
+  { 7411, 0xf26c }, { 7420, 0xa01f }, { 7427, 0xffef }, { 7442, 0x01bf },
+  { 7450, 0x7728 }, { 7458, 0x7005 }, { 7463, 0xff35 }, { 7475, 0xda03 },
+  { 7482, 0xd2f9 }, { 7492, 0xc7fa }, { 7503, 0x3fbf }, { 7516, 0x5c1d },
+  { 7524, 0xff3a }, { 7536, 0xec33 }, { 7545, 0xb7af }, { 7557, 0xfe9c },
+  /* 0x7900 */
+  { 7568, 0x5236 }, { 7575, 0x7a9f }, { 7586, 0xbffa }, { 7599, 0xe722 },
+  { 7607, 0x9ff7 }, { 7620, 0xfcff }, { 7634, 0x2fbb }, { 7645, 0xb61d },
+  { 7654, 0xed06 }, { 7662, 0x1dfd }, { 7673, 0x7dd7 }, { 7685, 0xefdf },
+  { 7699, 0xeb23 }, { 7708, 0xf166 }, { 7717, 0x7ed9 }, { 7728, 0x0dc0 },
+  /* 0x7a00 */
+  { 7733, 0x3d3d }, { 7743, 0xdfbf }, { 7757, 0xc945 }, { 7764, 0xba83 },
+  { 7772, 0x7dd1 }, { 7782, 0x9dd0 }, { 7790, 0x7b87 }, { 7800, 0xcf73 },
+  { 7811, 0x9ff3 }, { 7823, 0xc3f5 }, { 7833, 0xdf0d }, { 7843, 0xc5fe },
+  { 7854, 0x0cb3 }, { 7861, 0x8302 }, { 7865, 0xe879 }, { 7874, 0xaec0 },
+  /* 0x7b00 */
+  { 7881, 0xc773 }, { 7891, 0x6f0f }, { 7901, 0xfd7d }, { 7914, 0x093f },
+  { 7922, 0xfff1 }, { 7935, 0x0157 }, { 7941, 0x62fb }, { 7951, 0x01ff },
+  { 7960, 0xfdb4 }, { 7971, 0x3bf3 }, { 7982, 0xb013 }, { 7988, 0x43b2 },
+  { 7995, 0x5ed3 }, { 8005, 0xff30 }, { 8015, 0x0fff }, { 8027, 0xeb9f },
+  /* 0x7c00 */
+  { 8039, 0xfeef }, { 8053, 0xf203 }, { 8060, 0x3fef }, { 8073, 0xfb89 },
+  { 8083, 0x37a9 }, { 8092, 0x9e99 }, { 8101, 0xdef9 }, { 8113, 0xa72c },
+  { 8121, 0x3733 }, { 8130, 0xc1f6 }, { 8139, 0x812e }, { 8145, 0xfe3e },
+  { 8157, 0x5d20 }, { 8163, 0xf2f7 }, { 8175, 0xd585 }, { 8183, 0x69d7 },
+  /* 0x7d00 */
+  { 8193, 0xffff }, { 8209, 0xffff }, { 8225, 0xdb07 }, { 8234, 0xff6f },
+  { 8248, 0xc4ff }, { 8259, 0xd97f }, { 8271, 0xefce }, { 8283, 0xbe0f },
+  { 8293, 0xf17b }, { 8304, 0xf05e }, { 8313, 0xf6cf }, { 8325, 0xffb7 },
+  { 8339, 0x5ef7 }, { 8351, 0xef84 }, { 8360, 0xd7cb }, { 8371, 0x0edf },
+  /* 0x7e00 */
+  { 8381, 0xff08 }, { 8390, 0xfcff }, { 8404, 0xee3f }, { 8416, 0xffff },
+  { 8432, 0x13ff }, { 8443, 0xd7ff }, { 8457, 0xaf0f }, { 8467, 0x7ffd },
+  { 8481, 0xbdc7 }, { 8492, 0x1ffa }, { 8503, 0x0000 }, { 8503, 0x0000 },
+  { 8503, 0x0000 }, { 8503, 0x0000 }, { 8503, 0x0000 }, { 8503, 0x0000 },
+  /* 0x7f00 */
+  { 8503, 0x0000 }, { 8503, 0x0000 }, { 8503, 0x0000 }, { 8503, 0xe740 },
+  { 8510, 0xbd38 }, { 8519, 0xf933 }, { 8529, 0x7feb }, { 8542, 0xfeed },
+  { 8555, 0x7fe8 }, { 8566, 0x7c76 }, { 8576, 0xb3f7 }, { 8588, 0xffef },
+  { 8603, 0xfeaf }, { 8616, 0xd8b7 }, { 8626, 0xff6f }, { 8640, 0xfbbf },
+  /* 0x8000 */
+  { 8654, 0xf8fb }, { 8666, 0xdbf7 }, { 8679, 0x1752 }, { 8686, 0xe2f9 },
+  { 8696, 0x85c8 }, { 8702, 0x7547 }, { 8711, 0x9090 }, { 8715, 0xe3ef },
+  { 8727, 0x9ef4 }, { 8737, 0x3f6d }, { 8748, 0xee2e }, { 8758, 0x0536 },
+  { 8764, 0xf7bc }, { 8776, 0x7ff3 }, { 8789, 0xa07b }, { 8797, 0x7f3f },
+  /* 0x8100 */
+  { 8810, 0x0567 }, { 8817, 0xeb60 }, { 8825, 0xbabe }, { 8836, 0x6601 },
+  { 8841, 0xfcd8 }, { 8851, 0x583f }, { 8860, 0xcaf7 }, { 8871, 0x87df },
+  { 8882, 0xbfcd }, { 8894, 0xffa0 }, { 8904, 0x5bcd }, { 8914, 0xfebf },
+  { 8928, 0xb6fd }, { 8940, 0xefa7 }, { 8952, 0x77ef }, { 8965, 0xdf9c },
+  /* 0x8200 */
+  { 8976, 0x3fb7 }, { 8988, 0xf877 }, { 8999, 0x9d27 }, { 9008, 0xb7fc },
+  { 9020, 0xcab5 }, { 9029, 0xdfef }, { 9043, 0xfb5a }, { 9054, 0xf1b6 },
+  { 9064, 0xec39 }, { 9073, 0xef1f }, { 9085, 0xfbbf }, { 9099, 0x7ffb },
+  { 9113, 0x000d }, { 9116, 0xdafe }, { 9128, 0xbdfb }, { 9141, 0x4e7f },
+  /* 0x8300 */
+  { 9152, 0x33ff }, { 9164, 0x5ac0 }, { 9170, 0xbff5 }, { 9183, 0x9ffe },
+  { 9196, 0xffbf }, { 9211, 0x005f }, { 9217, 0x0000 }, { 9217, 0xfdf8 },
+  { 9229, 0xffca }, { 9241, 0x6ffd }, { 9254, 0xcffd }, { 9267, 0xa001 },
+  { 9270, 0xdfff }, { 9285, 0xfbf2 }, { 9297, 0xdfbf }, { 9311, 0xff7f },
+  /* 0x8400 */
+  { 9326, 0xfeda }, { 9338, 0x080f }, { 9343, 0xba08 }, { 9349, 0xbfff },
+  { 9364, 0x7afd }, { 9376, 0xeed7 }, { 9388, 0xfbeb }, { 9401, 0x67f9 },
+  { 9412, 0xe044 }, { 9417, 0xff93 }, { 9429, 0xdf97 }, { 9441, 0x9f57 },
+  { 9452, 0xfef7 }, { 9466, 0x08df }, { 9474, 0xdf80 }, { 9482, 0xfedf },
+  /* 0x8500 */
+  { 9496, 0xffc5 }, { 9508, 0xf7fe }, { 9522, 0xfffb }, { 9537, 0x6803 },
+  { 9542, 0x67fb }, { 9554, 0x6bfa }, { 9565, 0x7fff }, { 9580, 0x5fe2 },
+  { 9590, 0xffff }, { 9606, 0xff73 }, { 9619, 0x87df }, { 9630, 0xe7fb },
+  { 9643, 0xebfd }, { 9656, 0xf7a7 }, { 9668, 0xbf7e }, { 9681, 0xefc7 },
+  /* 0x8600 */
+  { 9693, 0x1ef3 }, { 9703, 0xdf82 }, { 9712, 0x76ff }, { 9725, 0xdf7e },
+  { 9738, 0x79c9 }, { 9747, 0xda7d }, { 9758, 0xefbe }, { 9771, 0x1e9b },
+  { 9780, 0x7ce0 }, { 9788, 0x77fb }, { 9801, 0x87be }, { 9811, 0xfffb },
+  { 9826, 0x1bff }, { 9838, 0xffdb }, { 9852, 0x3f5c }, { 9862, 0x4fe0 },
+  /* 0x8700 */
+  { 9870, 0x7fff }, { 9885, 0x5f0e }, { 9894, 0x77ff }, { 9908, 0xddbf },
+  { 9921, 0xf04f }, { 9930, 0xffff }, { 9946, 0xffff }, { 9962, 0x0ff8 },
+  { 9971, 0xa3be }, { 9981, 0xfddf }, { 9995, 0xfc1c }, { 10004, 0xfffd },
+  { 10019, 0x1f7d }, { 10030, 0xfb9e }, { 10042, 0xbdff }, { 10056, 0xdedc },
+  /* 0x8800 */
+  { 10067, 0x3f6f }, { 10079, 0xbafb }, { 10091, 0xdf7f }, { 10105, 0xfbef },
+  { 10119, 0x7d1b }, { 10129, 0x2eec }, { 10138, 0xaf8e }, { 10148, 0xf2f7 },
+  { 10160, 0x7b0f }, { 10170, 0xcfee }, { 10182, 0x1d96 }, { 10190, 0x77c6 },
+  { 10200, 0x7e07 }, { 10209, 0xfff5 }, { 10223, 0xd982 }, { 10230, 0x7fdf },
+  /* 0x8900 */
+  { 10244, 0x5ee6 }, { 10254, 0xc7ff }, { 10267, 0xfeee }, { 10280, 0x79ef },
+  { 10292, 0x9a56 }, { 10300, 0xffcf }, { 10314, 0xfe5f }, { 10327, 0xde5e },
+  { 10338, 0x896e }, { 10346, 0xf9e8 }, { 10356, 0xf45e }, { 10366, 0xe6c4 },
+  { 10374, 0x0001 }, { 10375, 0xbe7c }, { 10386, 0x3b7f }, { 10398, 0xdddf },
+  /* 0x8a00 */
+  { 10411, 0xd59d }, { 10421, 0xe9ef }, { 10433, 0x34ac }, { 10440, 0xde53 },
+  { 10450, 0xf573 }, { 10461, 0x4bf7 }, { 10472, 0x7b4f }, { 10483, 0x9eff },
+  { 10496, 0xb8fe }, { 10507, 0x476e }, { 10516, 0x0dfb }, { 10526, 0xff45 },
+  { 10537, 0xabfd }, { 10549, 0xfbfe }, { 10563, 0xe9d7 }, { 10574, 0xddff },
+  /* 0x8b00 */
+  { 10588, 0xedf7 }, { 10601, 0x7fff }, { 10616, 0xddfd }, { 10629, 0x7eeb },
+  { 10641, 0xcfe7 }, { 10653, 0xb7ff }, { 10667, 0xbde9 }, { 10678, 0xef91 },
+  { 10688, 0x5d75 }, { 10698, 0xd77c }, { 10709, 0x0000 }, { 10709, 0x0000 },
+  { 10709, 0x0000 }, { 10709, 0x0000 }, { 10709, 0x0000 }, { 10709, 0x0000 },
+  /* 0x8c00 */
+  { 10709, 0x0000 }, { 10709, 0x0000 }, { 10709, 0x0000 }, { 10709, 0xfa80 },
+  { 10716, 0xffee }, { 10730, 0xb4f1 }, { 10739, 0xbf76 }, { 10751, 0x2fef },
+  { 10763, 0xb677 }, { 10774, 0x77bf }, { 10787, 0x9fbf }, { 10800, 0xfffd },
+  { 10815, 0x95bf }, { 10826, 0xf6ae }, { 10837, 0x75ff }, { 10850, 0x7f3b },
+  /* 0x8d00 */
+  { 10862, 0xa7f5 }, { 10873, 0x0af9 }, { 10881, 0x0000 }, { 10881, 0x0000 },
+  { 10881, 0x0000 }, { 10881, 0x0000 }, { 10881, 0xfbd0 }, { 10891, 0x2bdd },
+  { 10901, 0xf633 }, { 10911, 0x9a7f }, { 10922, 0xfdab }, { 10934, 0xd6fc },
+  { 10945, 0xf9e6 }, { 10956, 0xbfeb }, { 10969, 0xdfdf }, { 10983, 0xf41f },
+  /* 0x8e00 */
+  { 10993, 0xa6fd }, { 11004, 0xffff }, { 11020, 0x4aff }, { 11031, 0xf37b },
+  { 11043, 0x7fb7 }, { 11056, 0xfef9 }, { 11069, 0xb6ff }, { 11082, 0x1d5c },
+  { 11090, 0x7ff6 }, { 11103, 0xe5ff }, { 11116, 0x1f7b }, { 11127, 0x2404 },
+  { 11130, 0xbe05 }, { 11138, 0xf99e }, { 11149, 0xdbe3 }, { 11160, 0xdff2 },
+  /* 0x8f00 */
+  { 11172, 0x6fef }, { 11185, 0xfdff }, { 11200, 0xd679 }, { 11210, 0xcbfc },
+  { 11221, 0xebfd }, { 11234, 0xefff }, { 11249, 0x001f }, { 11254, 0x0000 },
+  { 11254, 0x0000 }, { 11254, 0x9800 }, { 11257, 0xe148 }, { 11263, 0x8017 },
+  { 11268, 0x6a74 }, { 11276, 0x00fe }, { 11283, 0x6d7f }, { 11295, 0xfdf1 },
+  /* 0x9000 */
+  { 11307, 0xb87f }, { 11318, 0xfef3 }, { 11331, 0xe01f }, { 11339, 0xf176 },
+  { 11349, 0xee96 }, { 11359, 0x7b3f }, { 11371, 0xeb8d }, { 11381, 0xfffd },
+  { 11396, 0xadff }, { 11409, 0xcbb3 }, { 11419, 0x84ef }, { 11428, 0xe17f },
+  { 11439, 0x4daa }, { 11447, 0xbff0 }, { 11458, 0xbf3f }, { 11471, 0xfe3f },
+  /* 0x9100 */
+  { 11484, 0xebff }, { 11498, 0xffd7 }, { 11512, 0xffdf }, { 11527, 0xcf7f },
+  { 11540, 0xfffb }, { 11555, 0x85ed }, { 11564, 0xd73f }, { 11576, 0x07bc },
+  { 11584, 0xaeff }, { 11597, 0xfe0f }, { 11608, 0xfdaf }, { 11621, 0x76bf },
+  { 11633, 0xfaef }, { 11646, 0x37bb }, { 11657, 0x7fdc }, { 11669, 0xa3ba },
+  /* 0x9200 */
+  { 11678, 0xb6ff }, { 11691, 0x56f7 }, { 11702, 0x60f8 }, { 11709, 0xe7df },
+  { 11722, 0xff61 }, { 11733, 0x4cdf }, { 11743, 0xb0fb }, { 11753, 0xff45 },
+  { 11764, 0x7ded }, { 11776, 0x3ffa }, { 11788, 0x1fff }, { 11801, 0x18fc },
+  { 11809, 0xffff }, { 11825, 0xe3af }, { 11836, 0xc7d3 }, { 11846, 0xdf83 },
+  /* 0x9300 */
+  { 11856, 0xfb57 }, { 11868, 0xef7d }, { 11881, 0xefff }, { 11896, 0x1378 },
+  { 11903, 0xfec0 }, { 11912, 0x5ff7 }, { 11925, 0x34bb }, { 11934, 0x5ee3 },
+  { 11944, 0xf70d }, { 11954, 0xeff6 }, { 11967, 0xd7fe }, { 11980, 0x00bf },
+  { 11987, 0xf59d }, { 11998, 0xf7f7 }, { 12012, 0x51de }, { 12021, 0xffe0 },
+  /* 0x9400 */
+  { 12032, 0xfec9 }, { 12043, 0x037f }, { 12052, 0x5f01 }, { 12059, 0xbfef },
+  { 12073, 0x9ff1 }, { 12084, 0x60a7 }, { 12091, 0xef1d }, { 12102, 0xf1ff },
+  { 12115, 0x000f }, { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x0000 },
+  { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x0000 },
+  /* 0x9500 */
+  { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x0000 },
+  { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x0000 }, { 12119, 0x3c80 },
+  { 12124, 0xfb4d }, { 12135, 0xd91f }, { 12145, 0x7b3a }, { 12155, 0xfee3 },
+  { 12167, 0x3fe9 }, { 12178, 0xdc7f }, { 12190, 0x003f }, { 12196, 0x0000 },
+  /* 0x9600 */
+  { 12196, 0x0000 }, { 12196, 0x5000 }, { 12198, 0xf51f }, { 12209, 0xbe07 },
+  { 12218, 0xfc1d }, { 12228, 0xf91b }, { 12238, 0xbc1e }, { 12247, 0x71ff },
+  { 12259, 0x6ff9 }, { 12271, 0x5bbe }, { 12282, 0x5796 }, { 12291, 0x9b1b },
+  { 12300, 0x7fff }, { 12315, 0xfffc }, { 12329, 0x872e }, { 12337, 0xafe7 },
+  /* 0x9700 */
+  { 12349, 0xebf5 }, { 12361, 0xf34f }, { 12372, 0xdffd }, { 12386, 0xe725 },
+  { 12395, 0x0bdc }, { 12403, 0x5d44 }, { 12410, 0x5747 }, { 12419, 0xfddd },
+  { 12432, 0xed3f }, { 12444, 0x7790 }, { 12452, 0x7d7f }, { 12465, 0x8ac8 },
+  { 12471, 0xfafa }, { 12483, 0xf3f9 }, { 12495, 0x202a }, { 12499, 0xef4b },
+  /* 0x9800 */
+  { 12510, 0xf5ff }, { 12524, 0x79cf }, { 12535, 0xabd3 }, { 12545, 0x0ba5 },
+  { 12552, 0xf77a }, { 12564, 0xfb8f }, { 12576, 0x8ebd }, { 12586, 0x001f },
+  { 12591, 0x0000 }, { 12591, 0x0000 }, { 12591, 0xf300 }, { 12597, 0xfd4e },
+  { 12608, 0x1a57 }, { 12616, 0x8800 }, { 12618, 0xaeac }, { 12627, 0x7654 },
+  /* 0x9900 */
+  { 12635, 0x17ad }, { 12644, 0xcdff }, { 12657, 0xffb2 }, { 12669, 0xf42f },
+  { 12679, 0x5baa }, { 12688, 0xdbff }, { 12702, 0x0002 }, { 12703, 0x0000 },
+  { 12703, 0x0000 }, { 12703, 0x73c0 }, { 12710, 0xf9ea }, { 12721, 0x2e3f },
+  { 12731, 0xfa8e }, { 12741, 0xbbff }, { 12755, 0x76bc }, { 12765, 0xffd3 },
+  /* 0x9a00 */
+  { 12778, 0xeefe }, { 12791, 0x7e72 }, { 12801, 0x7ebd }, { 12813, 0xe7f7 },
+  { 12826, 0xf77f }, { 12840, 0xcefd }, { 12852, 0x0ff5 }, { 12862, 0x0000 },
+  { 12862, 0x0000 }, { 12862, 0x0000 }, { 12862, 0xa900 }, { 12866, 0xdb9b },
+  { 12877, 0xa4c7 }, { 12885, 0x917f }, { 12895, 0xf8ca }, { 12904, 0x7ece },
+  /* 0x9b00 */
+  { 12915, 0x7d7a }, { 12926, 0xc7e7 }, { 12937, 0xcbbd }, { 12948, 0xdcae },
+  { 12958, 0xfd7e }, { 12971, 0x8f76 }, { 12981, 0x91d3 }, { 12989, 0x7cf3 },
+  { 13000, 0x01e5 }, { 13006, 0x4c2f }, { 13014, 0xed77 }, { 13026, 0xa360 },
+  { 13032, 0x07db }, { 13041, 0x5ef8 }, { 13051, 0x1df7 }, { 13062, 0x2181 },
+  /* 0x9c00 */
+  { 13066, 0x6be0 }, { 13074, 0x309c }, { 13080, 0x3b3a }, { 13089, 0xfade },
+  { 13101, 0x7f53 }, { 13112, 0xc3f5 }, { 13122, 0x61cd }, { 13130, 0x07ba },
+  { 13138, 0x0000 }, { 13138, 0x0000 }, { 13138, 0x0000 }, { 13138, 0x0000 },
+  { 13138, 0x0000 }, { 13138, 0x0000 }, { 13138, 0x26e0 }, { 13144, 0xbefe },
+  /* 0x9d00 */
+  { 13157, 0x03f9 }, { 13165, 0xebb5 }, { 13176, 0xe36d }, { 13186, 0xe9cb },
+  { 13196, 0x9c2f }, { 13205, 0xbfde }, { 13218, 0x9f83 }, { 13227, 0xabbf },
+  { 13239, 0x1ff7 }, { 13251, 0xffd5 }, { 13264, 0xb7df }, { 13277, 0xdffe },
+  { 13291, 0xfdae }, { 13303, 0xffef }, { 13318, 0xfb7e }, { 13331, 0xeffd },
+  /* 0x9e00 */
+  { 13345, 0xaaff }, { 13357, 0x6ebf }, { 13369, 0x0000 }, { 13369, 0x0000 },
+  { 13369, 0x0000 }, { 13369, 0x0000 }, { 13369, 0x0000 }, { 13369, 0xb620 },
+  { 13375, 0x7fcd }, { 13387, 0xbe9e }, { 13398, 0x62b3 }, { 13406, 0x58f1 },
+  { 13414, 0xf10d }, { 13422, 0xfd7b }, { 13435, 0xe9f1 }, { 13445, 0xbefd },
+  /* 0x9f00 */
+  { 13458, 0xc6c3 }, { 13466, 0x5f6d }, { 13477, 0xff3d }, { 13490, 0x69ff },
+  { 13502, 0xffcf }, { 13516, 0xfbf4 }, { 13528, 0xdcfb }, { 13540, 0x4ff7 },
+  { 13552, 0x2000 }, { 13553, 0x1137 }, { 13560, 0x0015 },
+};
+static const Summary16 big5_uni2indx_pagefa[1] = {
+  /* 0xfa00 */
+  { 13563, 0x3000 },
+};
+static const Summary16 big5_uni2indx_pagefe[23] = {
+  /* 0xfe00 */
+  { 13565, 0x0000 }, { 13565, 0x0000 }, { 13565, 0x0000 }, { 13565, 0xfffb },
+  { 13580, 0xfe1f }, { 13592, 0xfef5 }, { 13605, 0x0e7f }, { 13615, 0x0000 },
+  { 13615, 0x0000 }, { 13615, 0x0000 }, { 13615, 0x0000 }, { 13615, 0x0000 },
+  { 13615, 0x0000 }, { 13615, 0x0000 }, { 13615, 0x0000 }, { 13615, 0x0000 },
+  /* 0xff00 */
+  { 13615, 0xff7a }, { 13628, 0xffff }, { 13644, 0xffff }, { 13660, 0x97ff },
+  { 13673, 0xfffe }, { 13688, 0x3fff }, { 13702, 0x0010 },
+};
+
+static int
+big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    const Summary16 *summary = NULL;
+    if (wc < 0x0100)
+      summary = &big5_uni2indx_page00[(wc>>4)];
+    else if (wc >= 0x0200 && wc < 0x0460)
+      summary = &big5_uni2indx_page02[(wc>>4)-0x020];
+    else if (wc >= 0x2000 && wc < 0x22c0)
+      summary = &big5_uni2indx_page20[(wc>>4)-0x200];
+    else if (wc >= 0x2400 && wc < 0x2650)
+      summary = &big5_uni2indx_page24[(wc>>4)-0x240];
+    else if (wc >= 0x3000 && wc < 0x33e0)
+      summary = &big5_uni2indx_page30[(wc>>4)-0x300];
+    else if (wc >= 0x4e00 && wc < 0x9fb0)
+      summary = &big5_uni2indx_page4e[(wc>>4)-0x4e0];
+    else if (wc >= 0xfa00 && wc < 0xfa10)
+      summary = &big5_uni2indx_pagefa[(wc>>4)-0xfa0];
+    else if (wc >= 0xfe00 && wc < 0xff70)
+      summary = &big5_uni2indx_pagefe[(wc>>4)-0xfe0];
+    if (summary) {
+      unsigned short used = summary->used;
+      unsigned int i = wc & 0x0f;
+      if (used & ((unsigned short) 1 << i)) {
+        unsigned short c;
+        /* Keep in `used' only the bits 0..i-1. */
+        used &= ((unsigned short) 1 << i) - 1;
+        /* Add `summary->indx' and the number of bits set in `used'. */
+        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);
+        used = (used & 0x3333) + ((used & 0xcccc) >> 2);
+        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);
+        used = (used & 0x00ff) + (used >> 8);
+        c = big5_2charset[summary->indx + used];
+        r[0] = (c >> 8); r[1] = (c & 0xff);
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/big5_emacs.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/big5_emacs.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/big5_emacs.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,164 @@
+/* $XFree86: xc/lib/X11/lcUniConv/big5_emacs.h,v 1.1 2000/11/28 18:50:06 dawes Exp $ */
+
+/*
+ * BIG5-0 and BIG5-1
+ */
+
+/*
+   BIG5 with its 13494 characters doesn't fit in a single 94x94 or 96x96
+   block. Therefore Emacs/Mule developers, in a typically Japanese way of
+   thinking, have developed an alternative encoding of BIG5 in two 94x94
+   planes, very similar to the SHIFT_JIS encoding for JISX0208.
+
+   Conversion between BIG5 codes (s1,s2) and BIG5-0 codes (c1,c2):
+   Example. (s1,s2) = 0xA140, (c1,c2) = 0x2121.
+   0xA1 <= s1 <= 0xC7, 0x40 <= s2 <= 0x7E || 0xA1 <= s2 <= 0xFE,
+   0x21 <= c1 <= 0x62, 0x21 <= c2 <= 0x7E.
+   Invariant:
+     157*(s1-0xA1) + (s2 < 0x80 ? s2-0x40 : s2-0x62)
+     = 94*(c1-0x21)+(c2-0x21)
+   Conversion (s1,s2) -> (c1,c2):
+     t := 157*(s1-0xA1) + (s2 < 0x80 ? s2-0x40 : s2-0x62)
+     c1 := (t div 94) + 0x21
+     c2 := (t mod 94) + 0x21
+   Conversion (c1,c2) -> (s1,s2):
+     t := 94*(c1-0x21)+(c2-0x21)
+     t2 := t mod 157
+     s1 := (t div 157) + 0xA1
+     s2 := (t2 < 0x3F ? t2+0x40 : t2+0x62)
+
+   Conversion between BIG5 codes (s1,s2) and BIG5-1 codes (c1,c2):
+   Example. (s1,s2) = 0xC940, (c1,c2) = 0x2121.
+   0xC9 <= s1 <= 0xF9, 0x40 <= s2 <= 0x7E || 0xA1 <= s2 <= 0xFE,
+   0x21 <= c1 <= 0x72, 0x21 <= c2 <= 0x7E.
+   Invariant:
+     157*(s1-0xC9) + (s2 < 0x80 ? s2-0x40 : s2-0x62)
+     = 94*(c1-0x21)+(c2-0x21)
+   Conversion (s1,s2) -> (c1,c2):
+     t := 157*(s1-0xC9) + (s2 < 0x80 ? s2-0x40 : s2-0x62)
+     c1 := (t div 94) + 0x21
+     c2 := (t mod 94) + 0x21
+   Conversion (c1,c2) -> (s1,s2):
+     t := 94*(c1-0x21)+(c2-0x21)
+     t2 := t mod 157
+     s1 := (t div 157) + 0xC9
+     s2 := (t2 < 0x3F ? t2+0x40 : t2+0x62)
+ */
+
+static int
+big5_0_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = s[0];
+  if (c1 >= 0x21 && c1 <= 0x62) {
+    if (n >= 2) {
+      unsigned char c2 = s[1];
+      if (c2 >= 0x21 && c2 <= 0x7e) {
+        unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
+        if (0) {
+          /* Unoptimized. */
+          unsigned char buf[2];
+          buf[0] = (i / 157) + 0xa1;
+          i = i % 157;
+          buf[1] = i + (i < 0x3f ? 0x40 : 0x62);
+          return big5_mbtowc(conv,pwc,buf,2);
+        } else {
+          /* Inline the implementation of big5_mbtowc. */
+          if (i < 6121) {
+            unsigned short wc = big5_2uni_pagea1[i];
+            if (wc != 0xfffd) {
+              *pwc = (ucs4_t) wc;
+              return 2;
+            }
+          }
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+
+static int
+big5_1_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = s[0];
+  if (c1 >= 0x21 && c1 <= 0x72) {
+    if (n >= 2) {
+      unsigned char c2 = s[1];
+      if (c2 >= 0x21 && c2 <= 0x7e) {
+        unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
+        if (0) {
+          /* Unoptimized. */
+          unsigned char buf[2];
+          buf[0] = (i / 157) + 0xc9;
+          i = i % 157;
+          buf[1] = i + (i < 0x3f ? 0x40 : 0x62);
+          return big5_mbtowc(conv,pwc,buf,2);
+        } else {
+          /* Inline the implementation of big5_mbtowc. */
+          if (i < 7652) {
+            unsigned short wc = big5_2uni_pagec9[i];
+            if (wc != 0xfffd) {
+              *pwc = (ucs4_t) wc;
+              return 2;
+            }
+          }
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+
+static int
+big5_0_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    unsigned char buf[2];
+    int ret = big5_wctomb(conv,buf,wc,2);
+    if (ret != RET_ILSEQ) {
+      unsigned char s1, s2;
+      if (ret != 2) abort();
+      s1 = buf[0];
+      s2 = buf[1];
+      if (!(s1 >= 0xa1)) abort();
+      if (!((s2 >= 0x40 && s2 <= 0x7e) || (s2 >= 0xa1 && s2 <= 0xfe))) abort();
+      if (s1 < 0xc9) {
+        unsigned int t = 157 * (s1 - 0xa1) + s2 - (s2 < 0x80 ? 0x40 : 0x62);
+        r[0] = (t / 94) + 0x21;
+        r[1] = (t % 94) + 0x21;
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+
+static int
+big5_1_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    unsigned char buf[2];
+    int ret = big5_wctomb(conv,buf,wc,2);
+    if (ret != RET_ILSEQ) {
+      unsigned char s1, s2;
+      if (ret != 2) abort();
+      s1 = buf[0];
+      s2 = buf[1];
+      if (!(s1 <= 0xf9)) abort();
+      if (!((s2 >= 0x40 && s2 <= 0x7e) || (s2 >= 0xa1 && s2 <= 0xfe))) abort();
+      if (s1 >= 0xc9) {
+        unsigned int t = 157 * (s1 - 0xc9) + s2 - (s2 < 0x80 ? 0x40 : 0x62);
+        r[0] = (t / 94) + 0x21;
+        r[1] = (t % 94) + 0x21;
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/cjk_tab_to_h.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/cjk_tab_to_h.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/cjk_tab_to_h.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1025 @@
+/* $XFree86: xc/lib/X11/lcUniConv/cjk_tab_to_h.c,v 1.2 2000/12/04 18:49:31 dawes Exp $ */
+
+/*
+ * Generates a CJK character set table from a .TXT table as found on
+ * ftp.unicode.org or in the X nls directory.
+ * Examples:
+ *
+ *   ./cjk_tab_to_h GB2312.1980-0 gb2312 > gb2312.h < gb2312
+ *   ./cjk_tab_to_h JISX0208.1983-0 jisx0208 > jisx0208.h < jis0208
+ *   ./cjk_tab_to_h KSC5601.1987-0 ksc5601 > ksc5601.h < ksc5601
+ *
+ *   ./cjk_tab_to_h GB2312.1980-0 gb2312 > gb2312.h < GB2312.TXT
+ *   ./cjk_tab_to_h JISX0208.1983-0 jisx0208 > jisx0208.h < JIS0208.TXT
+ *   ./cjk_tab_to_h JISX0212.1990-0 jisx0212 > jisx0212.h < JIS0212.TXT
+ *   ./cjk_tab_to_h KSC5601.1987-0 ksc5601 > ksc5601.h < KSC5601.TXT
+ *   ./cjk_tab_to_h KSX1001.1992-0 ksc5601 > ksc5601.h < KSX1001.TXT
+ *
+ *   ./cjk_tab_to_h BIG5 big5 > big5.h < BIG5.TXT
+ *
+ *   ./cjk_tab_to_h JOHAB johab > johab.h < JOHAB.TXT
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+typedef struct {
+  int start;
+  int end;
+} Block;
+
+typedef struct {
+  int rows;    /* number of possible values for the 1st byte */
+  int cols;    /* number of possible values for the 2nd byte */
+  int (*row_byte) (int row); /* returns the 1st byte value for a given row */
+  int (*col_byte) (int col); /* returns the 2nd byte value for a given col */
+  int (*byte_row) (int byte); /* converts a 1st byte value to a row, else -1 */
+  int (*byte_col) (int byte); /* converts a 2nd byte value to a col, else -1 */
+  const char* check_row_expr; /* format string for 1st byte value checking */
+  const char* check_col_expr; /* format string for 2nd byte value checking */
+  const char* byte_row_expr; /* format string for 1st byte value to row */
+  const char* byte_col_expr; /* format string for 2nd byte value to col */
+  int** charset2uni; /* charset2uni[0..rows-1][0..cols-1] is valid */
+  /* You'll understand the terms "row" and "col" when you buy Ken Lunde's book.
+     Once a row is fixed, choosing a "col" is the same as choosing a "cell". */
+  int* charsetpage; /* charsetpage[0..rows]: how large is a page for a row */
+  int ncharsetblocks;
+  Block* charsetblocks; /* blocks[0..nblocks-1] */
+  int* uni2charset; /* uni2charset[0x0000..0xffff] */
+} Encoding;
+
+/*
+ * Outputs the file title.
+ */
+static void output_title (const char *charsetname)
+{
+  printf("\n");
+  printf("/*\n");
+  printf(" * %s\n", charsetname);
+  printf(" */\n");
+  printf("\n");
+}
+
+/*
+ * Reads the charset2uni table from standard input.
+ */
+static void read_table (Encoding* enc)
+{
+  int row, col, i, i1, i2, c, j;
+
+  enc->charset2uni = (int**) malloc(enc->rows*sizeof(int*));
+  for (row = 0; row < enc->rows; row++)
+    enc->charset2uni[row] = (int*) malloc(enc->cols*sizeof(int));
+
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++)
+      enc->charset2uni[row][col] = 0xfffd;
+
+  c = getc(stdin);
+  ungetc(c,stdin);
+  if (c == '#') {
+    /* Read a unicode.org style .TXT file. */
+    for (;;) {
+      c = getc(stdin);
+      if (c == EOF)
+        break;
+      if (c == '\n' || c == ' ' || c == '\t')
+        continue;
+      if (c == '#') {
+        do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
+        continue;
+      }
+      ungetc(c,stdin);
+      if (scanf("0x%x", &j) != 1)
+        exit(1);
+      i1 = j >> 8;
+      i2 = j & 0xff;
+      row = enc->byte_row(i1);
+      col = enc->byte_col(i2);
+      if (row < 0 || col < 0) {
+        fprintf(stderr, "lost entry for %02x %02x\n", i1, i2);
+        exit(1);
+      }
+      if (scanf(" 0x%x", &enc->charset2uni[row][col]) != 1)
+        exit(1);
+    }
+  } else {
+    /* Read a table of hexadecimal Unicode values. */
+    for (i1 = 32; i1 < 132; i1++)
+      for (i2 = 32; i2 < 132; i2++) {
+        i = scanf("%x", &j);
+        if (i == EOF)
+          goto read_done;
+        if (i != 1)
+          exit(1);
+        if (j < 0 || j == 0xffff)
+          j = 0xfffd;
+        if (j != 0xfffd) {
+          if (enc->byte_row(i1) < 0 || enc->byte_col(i2) < 0) {
+            fprintf(stderr, "lost entry at %02x %02x\n", i1, i2);
+            exit (1);
+          }
+          enc->charset2uni[enc->byte_row(i1)][enc->byte_col(i2)] = j;
+        }
+      }
+   read_done: ;
+  }
+}
+
+/*
+ * Computes the charsetpage[0..rows] array.
+ */
+static void find_charset2uni_pages (Encoding* enc)
+{
+  int row, col;
+
+  enc->charsetpage = (int*) malloc((enc->rows+1)*sizeof(int));
+
+  for (row = 0; row <= enc->rows; row++)
+    enc->charsetpage[row] = 0;
+
+  for (row = 0; row < enc->rows; row++) {
+    int used = 0;
+    for (col = 0; col < enc->cols; col++)
+      if (enc->charset2uni[row][col] != 0xfffd)
+        used = col+1;
+    enc->charsetpage[row] = used;
+  }
+}
+
+/*
+ * Fills in nblocks and blocks.
+ */
+static void find_charset2uni_blocks (Encoding* enc)
+{
+  int n, row, lastrow;
+
+  enc->charsetblocks = (Block*) malloc(enc->rows*sizeof(Block));
+
+  n = 0;
+  for (row = 0; row < enc->rows; row++)
+    if (enc->charsetpage[row] > 0 && (row == 0 || enc->charsetpage[row-1] == 0)) {
+      for (lastrow = row; enc->charsetpage[lastrow+1] > 0; lastrow++);
+      enc->charsetblocks[n].start = row * enc->cols;
+      enc->charsetblocks[n].end = lastrow * enc->cols + enc->charsetpage[lastrow];
+      n++;
+    }
+  enc->ncharsetblocks = n;
+}
+
+/*
+ * Outputs the charset to unicode table and function.
+ */
+static void output_charset2uni (const char* name, Encoding* enc)
+{
+  int row, col, lastrow, col_max, i, i1_min, i1_max;
+
+  find_charset2uni_pages(enc);
+
+  find_charset2uni_blocks(enc);
+
+  for (row = 0; row < enc->rows; row++)
+    if (enc->charsetpage[row] > 0) {
+      if (row == 0 || enc->charsetpage[row-1] == 0) {
+        /* Start a new block. */
+        for (lastrow = row; enc->charsetpage[lastrow+1] > 0; lastrow++);
+        printf("static const unsigned short %s_2uni_page%02x[%d] = {\n",
+               name, enc->row_byte(row),
+               (lastrow-row) * enc->cols + enc->charsetpage[lastrow]);
+      }
+      printf("  /""* 0x%02x *""/\n ", enc->row_byte(row));
+      col_max = (enc->charsetpage[row+1] > 0 ? enc->cols : enc->charsetpage[row]);
+      for (col = 0; col < col_max; col++) {
+        printf(" 0x%04x,", enc->charset2uni[row][col]);
+        if ((col % 8) == 7 && (col+1 < col_max)) printf("\n ");
+      }
+      printf("\n");
+      if (enc->charsetpage[row+1] == 0) {
+        /* End a block. */
+        printf("};\n");
+      }
+    }
+  printf("\n");
+
+  printf("static int\n");
+  printf("%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n", name);
+  printf("{\n");
+  printf("  unsigned char c1 = s[0];\n");
+  printf("  if (");
+  for (i = 0; i < enc->ncharsetblocks; i++) {
+    i1_min = enc->row_byte(enc->charsetblocks[i].start / enc->cols);
+    i1_max = enc->row_byte((enc->charsetblocks[i].end-1) / enc->cols);
+    if (i > 0)
+      printf(" || ");
+    if (i1_min == i1_max)
+      printf("(c1 == 0x%02x)", i1_min);
+    else
+      printf("(c1 >= 0x%02x && c1 <= 0x%02x)", i1_min, i1_max);
+  }
+  printf(") {\n");
+  printf("    if (n >= 2) {\n");
+  printf("      unsigned char c2 = s[1];\n");
+  printf("      if (");
+  printf(enc->check_col_expr, "c2");
+  printf(") {\n");
+  printf("        unsigned int i = %d * (", enc->cols);
+  printf(enc->byte_row_expr, "c1");
+  printf(") + (");
+  printf(enc->byte_col_expr, "c2");
+  printf(");\n");
+  printf("        unsigned short wc = 0xfffd;\n");
+  for (i = 0; i < enc->ncharsetblocks; i++) {
+    printf("        ");
+    if (i > 0)
+      printf("} else ");
+    if (i < enc->ncharsetblocks-1)
+      printf("if (i < %d) ", enc->charsetblocks[i+1].start);
+    printf("{\n");
+    printf("          if (i < %d)\n", enc->charsetblocks[i].end);
+    printf("            wc = %s_2uni_page%02x[i", name, enc->row_byte(enc->charsetblocks[i].start / enc->cols));
+    if (enc->charsetblocks[i].start > 0)
+      printf("-%d", enc->charsetblocks[i].start);
+    printf("];\n");
+  }
+  printf("        }\n");
+  printf("        if (wc != 0xfffd) {\n");
+  printf("          *pwc = (ucs4_t) wc;\n");
+  printf("          return 2;\n");
+  printf("        }\n");
+  printf("      }\n");
+  printf("      return RET_ILSEQ;\n");
+  printf("    }\n");
+  printf("    return RET_TOOFEW(0);\n");
+  printf("  }\n");
+  printf("  return RET_ILSEQ;\n");
+  printf("}\n");
+  printf("\n");
+}
+
+/*
+ * Computes the uni2charset[0x0000..0xffff] array.
+ */
+static void invert (Encoding* enc)
+{
+  int row, col, j;
+
+  enc->uni2charset = (int*) malloc(0x10000*sizeof(int));
+
+  for (j = 0; j < 0x10000; j++)
+    enc->uni2charset[j] = 0;
+
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++) {
+      j = enc->charset2uni[row][col];
+      if (j != 0xfffd)
+        enc->uni2charset[j] = 0x100 * enc->row_byte(row) + enc->col_byte(col);
+    }
+}
+
+/*
+ * Outputs the unicode to charset table and function, using a linear array.
+ * (Suitable if the table is dense.)
+ */
+static void output_uni2charset_dense (const char* name, Encoding* enc)
+{
+  /* Like in 8bit_tab_to_h.c */
+  bool pages[0x100];
+  int line[0x2000];
+  int tableno;
+  struct { int minline; int maxline; int usecount; } tables[0x2000];
+  bool first;
+  int row, col, j, p, j1, j2, t;
+
+  for (p = 0; p < 0x100; p++)
+    pages[p] = false;
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++) {
+      j = enc->charset2uni[row][col];
+      if (j != 0xfffd)
+        pages[j>>8] = true;
+    }
+  for (j1 = 0; j1 < 0x2000; j1++) {
+    bool all_invalid = true;
+    for (j2 = 0; j2 < 8; j2++) {
+      j = 8*j1+j2;
+      if (enc->uni2charset[j] != 0)
+        all_invalid = false;
+    }
+    if (all_invalid)
+      line[j1] = -1;
+    else
+      line[j1] = 0;
+  }
+  tableno = 0;
+  for (j1 = 0; j1 < 0x2000; j1++) {
+    if (line[j1] >= 0) {
+      if (tableno > 0
+          && ((j1 > 0 && line[j1-1] == tableno-1)
+              || ((tables[tableno-1].maxline >> 5) == (j1 >> 5)
+                  && j1 - tables[tableno-1].maxline <= 8))) {
+        line[j1] = tableno-1;
+        tables[tableno-1].maxline = j1;
+      } else {
+        tableno++;
+        line[j1] = tableno-1;
+        tables[tableno-1].minline = tables[tableno-1].maxline = j1;
+      }
+    }
+  }
+  for (t = 0; t < tableno; t++) {
+    tables[t].usecount = 0;
+    j1 = 8*tables[t].minline;
+    j2 = 8*(tables[t].maxline+1);
+    for (j = j1; j < j2; j++)
+      if (enc->uni2charset[j] != 0)
+        tables[t].usecount++;
+  }
+  {
+    p = -1;
+    for (t = 0; t < tableno; t++)
+      if (tables[t].usecount > 1) {
+        p = tables[t].minline >> 5;
+        printf("static const unsigned short %s_page%02x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1));
+        for (j1 = tables[t].minline; j1 <= tables[t].maxline; j1++) {
+          if ((j1 % 0x20) == 0 && j1 > tables[t].minline)
+            printf("  /* 0x%04x */\n", 8*j1);
+          printf(" ");
+          for (j2 = 0; j2 < 8; j2++) {
+            j = 8*j1+j2;
+            printf(" 0x%04x,", enc->uni2charset[j]);
+          }
+          printf(" /*0x%02x-0x%02x*/\n", 8*(j1 % 0x20), 8*(j1 % 0x20)+7);
+        }
+        printf("};\n");
+      }
+    if (p >= 0)
+      printf("\n");
+  }
+  printf("static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", name);
+  printf("{\n");
+  printf("  if (n >= 2) {\n");
+  printf("    unsigned short c = 0;\n");
+  first = true;
+  for (j1 = 0; j1 < 0x2000;) {
+    t = line[j1];
+    for (j2 = j1; j2 < 0x2000 && line[j2] == t; j2++);
+    if (t >= 0) {
+      if (j1 != tables[t].minline) abort();
+      if (j2 > tables[t].maxline+1) abort();
+      j2 = tables[t].maxline+1;
+      if (first)
+        printf("    ");
+      else
+        printf("    else ");
+      first = false;
+      if (tables[t].usecount == 0) abort();
+      if (tables[t].usecount == 1) {
+        if (j2 != j1+1) abort();
+        for (j = 8*j1; j < 8*j2; j++)
+          if (enc->uni2charset[j] != 0) {
+            printf("if (wc == 0x%04x)\n      c = 0x%02x;\n", j, enc->uni2charset[j]);
+            break;
+          }
+      } else {
+        if (j1 == 0) {
+          printf("if (wc < 0x%04x)", 8*j2);
+        } else {
+          printf("if (wc >= 0x%04x && wc < 0x%04x)", 8*j1, 8*j2);
+        }
+        printf("\n      c = %s_page%02x[wc", name, j1 >> 5);
+        if (tables[t].minline > 0)
+          printf("-0x%04x", 8*j1);
+        printf("];\n");
+      }
+    }
+    j1 = j2;
+  }
+  printf("    if (c != 0) {\n");
+  printf("      r[0] = (c >> 8); r[1] = (c & 0xff);\n");
+  printf("      return 2;\n");
+  printf("    }\n");
+  printf("    return RET_ILSEQ;\n");
+  printf("  }\n");
+  printf("  return RET_TOOSMALL;\n");
+  printf("}\n");
+}
+
+/*
+ * Outputs the unicode to charset table and function, using a packed array.
+ * (Suitable if the table is sparse.)
+ */
+static void output_uni2charset_sparse (const char* name, Encoding* enc)
+{
+  bool pages[0x100];
+  Block pageblocks[0x100]; int npageblocks;
+  int indx2charset[0x10000];
+  int summary_indx[0x1000];
+  int summary_used[0x1000];
+  int i, row, col, j, p, j1, j2, indx;
+
+  /* Fill pages[0x100]. */
+  for (p = 0; p < 0x100; p++)
+    pages[p] = false;
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++) {
+      j = enc->charset2uni[row][col];
+      if (j != 0xfffd)
+        pages[j>>8] = true;
+    }
+
+#if 0
+  for (p = 0; p < 0x100; p++)
+    if (pages[p]) {
+      printf("static const unsigned short %s_page%02x[256] = {\n", name, p);
+      for (j1 = 0; j1 < 32; j1++) {
+        printf("  ");
+        for (j2 = 0; j2 < 8; j2++)
+          printf("0x%04x, ", enc->uni2charset[256*p+8*j1+j2]);
+        printf("/""*0x%02x-0x%02x*""/\n", 8*j1, 8*j1+7);
+      }
+      printf("};\n");
+    }
+  printf("\n");
+#endif
+
+  /* Fill summary_indx[] and summary_used[]. */
+  indx = 0;
+  for (j1 = 0; j1 < 0x1000; j1++) {
+    summary_indx[j1] = indx;
+    summary_used[j1] = 0;
+    for (j2 = 0; j2 < 16; j2++) {
+      j = 16*j1+j2;
+      if (enc->uni2charset[j] != 0) {
+        indx2charset[indx++] = enc->uni2charset[j];
+        summary_used[j1] |= (1 << j2);
+      }
+    }
+  }
+
+  /* Fill npageblocks and pageblocks[]. */
+  npageblocks = 0;
+  for (p = 0; p < 0x100; ) {
+    if (pages[p] && (p == 0 || !pages[p-1])) {
+      pageblocks[npageblocks].start = 16*p;
+      do p++; while (p < 0x100 && pages[p]);
+      j1 = 16*p;
+      while (summary_used[j1-1] == 0) j1--;
+      pageblocks[npageblocks].end = j1;
+      npageblocks++;
+    } else
+      p++;
+  }
+
+  printf("static const unsigned short %s_2charset[%d] = {\n", name, indx);
+  for (i = 0; i < indx; ) {
+    if ((i % 8) == 0) printf(" ");
+    printf(" 0x%04x,", indx2charset[i]);
+    i++;
+    if ((i % 8) == 0 || i == indx) printf("\n");
+  }
+  printf("};\n");
+  printf("\n");
+  for (i = 0; i < npageblocks; i++) {
+    printf("static const Summary16 %s_uni2indx_page%02x[%d] = {\n", name,
+           pageblocks[i].start/16, pageblocks[i].end-pageblocks[i].start);
+    for (j1 = pageblocks[i].start; j1 < pageblocks[i].end; ) {
+      if (((16*j1) % 0x100) == 0) printf("  /""* 0x%04x *""/\n", 16*j1);
+      if ((j1 % 4) == 0) printf(" ");
+      printf(" { %4d, 0x%04x },", summary_indx[j1], summary_used[j1]);
+      j1++;
+      if ((j1 % 4) == 0 || j1 == pageblocks[i].end) printf("\n");
+    }
+    printf("};\n");
+  }
+  printf("\n");
+
+  printf("static int\n");
+  printf("%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", name);
+  printf("{\n");
+  printf("  if (n >= 2) {\n");
+  printf("    const Summary16 *summary = NULL;\n");
+  for (i = 0; i < npageblocks; i++) {
+    printf("    ");
+    if (i > 0)
+      printf("else ");
+    printf("if (wc >= 0x%04x && wc < 0x%04x)\n",
+           16*pageblocks[i].start, 16*pageblocks[i].end);
+    printf("      summary = &%s_uni2indx_page%02x[(wc>>4)", name,
+           pageblocks[i].start/16);
+    if (pageblocks[i].start > 0)
+      printf("-0x%03x", pageblocks[i].start);
+    printf("];\n");
+  }
+  printf("    if (summary) {\n");
+  printf("      unsigned short used = summary->used;\n");
+  printf("      unsigned int i = wc & 0x0f;\n");
+  printf("      if (used & ((unsigned short) 1 << i)) {\n");
+  printf("        unsigned short c;\n");
+  printf("        /* Keep in `used' only the bits 0..i-1. */\n");
+  printf("        used &= ((unsigned short) 1 << i) - 1;\n");
+  printf("        /* Add `summary->indx' and the number of bits set in `used'. */\n");
+  printf("        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);\n");
+  printf("        used = (used & 0x3333) + ((used & 0xcccc) >> 2);\n");
+  printf("        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);\n");
+  printf("        used = (used & 0x00ff) + (used >> 8);\n");
+  printf("        c = %s_2charset[summary->indx + used];\n", name);
+  printf("        r[0] = (c >> 8); r[1] = (c & 0xff);\n");
+  printf("        return 2;\n");
+  printf("      }\n");
+  printf("    }\n");
+  printf("    return RET_ILSEQ;\n");
+  printf("  }\n");
+  printf("  return RET_TOOSMALL;\n");
+  printf("}\n");
+}
+
+/* ISO-2022/EUC specifics */
+
+static int row_byte_normal (int row) { return 0x21+row; }
+static int col_byte_normal (int col) { return 0x21+col; }
+static int byte_row_normal (int byte) { return byte-0x21; }
+static int byte_col_normal (int byte) { return byte-0x21; }
+
+static void do_normal (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_normal;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_normal;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Note: On first sight, the jisx0212_2charset[] table seems to be in order,
+   starting from the charset=0x3021/uni=0x4e02 pair. But it's only mostly in
+   order. There are 75 out-of-order values, scattered all throughout the table.
+ */
+
+static void do_normal_only_charset2uni (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_normal;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_normal;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+}
+
+/* CNS 11643 specifics - trick to put two tables into one */
+
+static int row_byte_cns11643 (int row) {
+  return 0x100 * (row / 94) + (row % 94) + 0x21;
+}
+static int byte_row_cns11643 (int byte) {
+  return (byte >= 0x100 && byte < 0x200 ? byte-0x121 :
+          byte >= 0x200 && byte < 0x300 ? byte-0x221+94 :
+          byte >= 0x300 && byte < 0x400 ? byte-0x321+2*94 :
+          -1);
+}
+
+static void do_cns11643_only_uni2charset (const char* name)
+{
+  Encoding enc;
+  int j, x;
+
+  enc.rows = 3*94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_cns11643;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_cns11643;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table(&enc);
+  invert(&enc);
+  /* Move the 2 plane bits into the unused bits 15 and 7. */
+  for (j = 0; j < 0x10000; j++) {
+    x = enc.uni2charset[j];
+    if (x != 0) {
+      if (x & 0x8080) abort();
+      switch (x >> 16) {
+        case 0: /* plane 1 */ x = (x & 0xffff) | 0x0000; break;
+        case 1: /* plane 2 */ x = (x & 0xffff) | 0x0080; break;
+        case 2: /* plane 3 */ x = (x & 0xffff) | 0x8000; break;
+        default: abort();
+      }
+      enc.uni2charset[j] = x;
+    }
+  }
+  output_uni2charset_sparse(name,&enc);
+}
+
+/* GBK specifics */
+
+static int row_byte_gbk1 (int row) {
+  return 0x81+row;
+}
+static int col_byte_gbk1 (int col) {
+  return (col >= 0x3f ? 0x41 : 0x40) + col;
+}
+static int byte_row_gbk1 (int byte) {
+  if (byte >= 0x81 && byte < 0xff)
+    return byte-0x81;
+  else
+    return -1;
+}
+static int byte_col_gbk1 (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0x80 && byte < 0xff)
+    return byte-0x41;
+  else
+    return -1;
+}
+
+static void do_gbk1 (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 190;
+  enc.row_byte = row_byte_gbk1;
+  enc.col_byte = col_byte_gbk1;
+  enc.byte_row = byte_row_gbk1;
+  enc.byte_col = byte_col_gbk1;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_dense(name,&enc);
+}
+
+static void do_gbk1_only_charset2uni (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 190;
+  enc.row_byte = row_byte_gbk1;
+  enc.col_byte = col_byte_gbk1;
+  enc.byte_row = byte_row_gbk1;
+  enc.byte_col = byte_col_gbk1;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+}
+
+static int row_byte_gbk2 (int row) {
+  return 0x81+row;
+}
+static int col_byte_gbk2 (int col) {
+  return (col >= 0x3f ? 0x41 : 0x40) + col;
+}
+static int byte_row_gbk2 (int byte) {
+  if (byte >= 0x81 && byte < 0xff)
+    return byte-0x81;
+  else
+    return -1;
+}
+static int byte_col_gbk2 (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0x80 && byte < 0xa1)
+    return byte-0x41;
+  else
+    return -1;
+}
+
+static void do_gbk2_only_charset2uni (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 96;
+  enc.row_byte = row_byte_gbk2;
+  enc.col_byte = col_byte_gbk2;
+  enc.byte_row = byte_row_gbk2;
+  enc.byte_col = byte_col_gbk2;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xa1)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+}
+
+static void do_gbk1_only_uni2charset (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 190;
+  enc.row_byte = row_byte_gbk1;
+  enc.col_byte = col_byte_gbk1;
+  enc.byte_row = byte_row_gbk1;
+  enc.byte_col = byte_col_gbk1;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* KSC 5601 specifics */
+
+/*
+ * Reads the charset2uni table from standard input.
+ */
+static void read_table_ksc5601 (Encoding* enc)
+{
+  int row, col, i, i1, i2, c, j;
+
+  enc->charset2uni = (int**) malloc(enc->rows*sizeof(int*));
+  for (row = 0; row < enc->rows; row++)
+    enc->charset2uni[row] = (int*) malloc(enc->cols*sizeof(int));
+
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++)
+      enc->charset2uni[row][col] = 0xfffd;
+
+  c = getc(stdin);
+  ungetc(c,stdin);
+  if (c == '#') {
+    /* Read a unicode.org style .TXT file. */
+    for (;;) {
+      c = getc(stdin);
+      if (c == EOF)
+        break;
+      if (c == '\n' || c == ' ' || c == '\t')
+        continue;
+      if (c == '#') {
+        do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
+        continue;
+      }
+      ungetc(c,stdin);
+      if (scanf("0x%x", &j) != 1)
+        exit(1);
+      i1 = j >> 8;
+      i2 = j & 0xff;
+      if (scanf(" 0x%x", &j) != 1)
+        exit(1);
+      /* Take only the range covered by KS C 5601.1987-0 = KS C 5601.1989-0
+         = KS X 1001.1992, ignore the rest. */
+      if (!(i1 >= 128+33 && i1 < 128+127 && i2 >= 128+33 && i2 < 128+127))
+        continue;  /* KSC5601 specific */
+      i1 &= 0x7f;  /* KSC5601 specific */
+      i2 &= 0x7f;  /* KSC5601 specific */
+      row = enc->byte_row(i1);
+      col = enc->byte_col(i2);
+      if (row < 0 || col < 0) {
+        fprintf(stderr, "lost entry for %02x %02x\n", i1, i2);
+        exit(1);
+      }
+      enc->charset2uni[row][col] = j;
+    }
+  } else {
+    /* Read a table of hexadecimal Unicode values. */
+    for (i1 = 33; i1 < 127; i1++)
+      for (i2 = 33; i2 < 127; i2++) {
+        i = scanf("%x", &j);
+        if (i == EOF)
+          goto read_done;
+        if (i != 1)
+          exit(1);
+        if (j < 0 || j == 0xffff)
+          j = 0xfffd;
+        if (j != 0xfffd) {
+          if (enc->byte_row(i1) < 0 || enc->byte_col(i2) < 0) {
+            fprintf(stderr, "lost entry at %02x %02x\n", i1, i2);
+            exit (1);
+          }
+          enc->charset2uni[enc->byte_row(i1)][enc->byte_col(i2)] = j;
+        }
+      }
+   read_done: ;
+  }
+}
+
+static void do_ksc5601 (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_normal;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_normal;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table_ksc5601(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Big5 specifics */
+
+static int row_byte_big5 (int row) {
+  return 0xa1+row;
+}
+static int col_byte_big5 (int col) {
+  return (col >= 0x3f ? 0x62 : 0x40) + col;
+}
+static int byte_row_big5 (int byte) {
+  if (byte >= 0xa1 && byte < 0xff)
+    return byte-0xa1;
+  else
+    return -1;
+}
+static int byte_col_big5 (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0xa1 && byte < 0xff)
+    return byte-0x62;
+  else
+    return -1;
+}
+
+static void do_big5 (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 157;
+  enc.row_byte = row_byte_big5;
+  enc.col_byte = col_byte_big5;
+  enc.byte_row = byte_row_big5;
+  enc.byte_col = byte_col_big5;
+  enc.check_row_expr = "%1$s >= 0xa1 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0xa1 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0xa1";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0xa1 ? 0x62 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Johab Hangul specifics */
+
+static int row_byte_johab_hangul (int row) {
+  return 0x84+row;
+}
+static int col_byte_johab_hangul (int col) {
+  return (col >= 0x3e ? 0x43 : 0x41) + col;
+}
+static int byte_row_johab_hangul (int byte) {
+  if (byte >= 0x84 && byte < 0xd4)
+    return byte-0x84;
+  else
+    return -1;
+}
+static int byte_col_johab_hangul (int byte) {
+  if (byte >= 0x41 && byte < 0x7f)
+    return byte-0x41;
+  else if (byte >= 0x81 && byte < 0xff)
+    return byte-0x43;
+  else
+    return -1;
+}
+
+static void do_johab_hangul (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 80;
+  enc.cols = 188;
+  enc.row_byte = row_byte_johab_hangul;
+  enc.col_byte = col_byte_johab_hangul;
+  enc.byte_row = byte_row_johab_hangul;
+  enc.byte_col = byte_col_johab_hangul;
+  enc.check_row_expr = "%1$s >= 0x84 && %1$s < 0xd4";
+  enc.check_col_expr = "(%1$s >= 0x41 && %1$s < 0x7f) || (%1$s >= 0x81 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x84";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x81 ? 0x43 : 0x41)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_dense(name,&enc);
+}
+
+/* SJIS specifics */
+
+static int row_byte_sjis (int row) {
+  return (row >= 0x1f ? 0xc1 : 0x81) + row;
+}
+static int col_byte_sjis (int col) {
+  return (col >= 0x3f ? 0x41 : 0x40) + col;
+}
+static int byte_row_sjis (int byte) {
+  if (byte >= 0x81 && byte < 0xa0)
+    return byte-0x81;
+  else if (byte >= 0xe0)
+    return byte-0xc1;
+  else
+    return -1;
+}
+static int byte_col_sjis (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0x80 && byte < 0xfd)
+    return byte-0x41;
+  else
+    return -1;
+}
+
+static void do_sjis (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 188;
+  enc.row_byte = row_byte_sjis;
+  enc.col_byte = col_byte_sjis;
+  enc.byte_row = byte_row_sjis;
+  enc.byte_col = byte_col_sjis;
+  enc.check_row_expr = "(%1$s >= 0x81 && %1$s < 0xa0) || (%1$s >= 0xe0)";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xfd)";
+  enc.byte_row_expr = "%1$s - (%1$s >= 0xe0 ? 0xc1 : 0x81)";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Main program */
+
+int main (int argc, char *argv[])
+{
+  const char* charsetname;
+  const char* name;
+
+  if (argc != 3)
+    exit(1);
+  charsetname = argv[1];
+  name = argv[2];
+
+  output_title(charsetname);
+
+  if (!strcmp(name,"gb2312") || !strcmp(name,"gb12345ext")
+      || !strcmp(name,"jisx0208") || !strcmp(name,"jisx0212"))
+    do_normal(name);
+  else if (!strcmp(name,"cns11643_1") || !strcmp(name,"cns11643_2")
+           || !strcmp(name,"cns11643_3"))
+    do_normal_only_charset2uni(name);
+  else if (!strcmp(name,"cns11643_inv"))
+    do_cns11643_only_uni2charset(name);
+  else if (!strcmp(name,"gbkext1"))
+    do_gbk1_only_charset2uni(name);
+  else if (!strcmp(name,"gbkext2"))
+    do_gbk2_only_charset2uni(name);
+  else if (!strcmp(name,"gbkext_inv"))
+    do_gbk1_only_uni2charset(name);
+  else if (!strcmp(name,"cp936ext"))
+    do_gbk1(name);
+  else if (!strcmp(name,"ksc5601"))
+    do_ksc5601(name);
+  else if (!strcmp(name,"big5") || !strcmp(name,"cp950ext"))
+    do_big5(name);
+  else if (!strcmp(name,"johab_hangul"))
+    do_johab_hangul(name);
+  else if (!strcmp(name,"cp932ext"))
+    do_sjis(name);
+  else
+    exit(1);
+
+  return 0;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/cp1133.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/cp1133.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/cp1133.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,92 @@
+/* $XFree86: xc/lib/X11/lcUniConv/cp1133.h,v 1.3 2000/11/29 17:40:28 dawes Exp $ */
+
+/*
+ * IBM-CP1133
+ */
+
+static const unsigned short cp1133_2uni_1[64] = {
+  /* 0xa0 */
+  0x00a0, 0x0e81, 0x0e82, 0x0e84, 0x0e87, 0x0e88, 0x0eaa, 0x0e8a,
+  0x0e8d, 0x0e94, 0x0e95, 0x0e96, 0x0e97, 0x0e99, 0x0e9a, 0x0e9b,
+  /* 0xb0 */
+  0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f, 0x0ea1, 0x0ea2, 0x0ea3, 0x0ea5,
+  0x0ea7, 0x0eab, 0x0ead, 0x0eae, 0xfffd, 0xfffd, 0xfffd, 0x0eaf,
+  /* 0xc0 */
+  0x0eb0, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7, 0x0eb8,
+  0x0eb9, 0x0ebc, 0x0eb1, 0x0ebb, 0x0ebd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xd0 */
+  0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0x0ec8, 0x0ec9, 0x0eca,
+  0x0ecb, 0x0ecc, 0x0ecd, 0x0ec6, 0xfffd, 0x0edc, 0x0edd, 0x20ad,
+};
+static const unsigned short cp1133_2uni_2[16] = {
+  /* 0xf0 */
+  0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7,
+  0x0ed8, 0x0ed9, 0xfffd, 0xfffd, 0x00a2, 0x00ac, 0x00a6, 0xfffd,
+};
+
+static int
+cp1133_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else if (c < 0xe0) {
+    unsigned short wc = cp1133_2uni_1[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  else if (c < 0xf0) {
+  }
+  else {
+    unsigned short wc = cp1133_2uni_2[c-0xf0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+
+static const unsigned char cp1133_page00[16] = {
+  0xa0, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
+};
+static const unsigned char cp1133_page0e[96] = {
+  0x00, 0xa1, 0xa2, 0x00, 0xa3, 0x00, 0x00, 0xa4, /* 0x80-0x87 */
+  0xa5, 0x00, 0xa7, 0x00, 0x00, 0xa8, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x00, 0x00, 0xa9, 0xaa, 0xab, 0xac, /* 0x90-0x97 */
+  0x00, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, /* 0x98-0x9f */
+  0x00, 0xb4, 0xb5, 0xb6, 0x00, 0xb7, 0x00, 0xb8, /* 0xa0-0xa7 */
+  0x00, 0x00, 0xa6, 0xb9, 0x00, 0xba, 0xbb, 0xbf, /* 0xa8-0xaf */
+  0xc0, 0xca, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, /* 0xb0-0xb7 */
+  0xc7, 0xc8, 0x00, 0xcb, 0xc9, 0xcc, 0x00, 0x00, /* 0xb8-0xbf */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0x00, 0xdb, 0x00, /* 0xc0-0xc7 */
+  0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x00, 0x00, /* 0xc8-0xcf */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xd0-0xd7 */
+  0xf8, 0xf9, 0x00, 0x00, 0xdd, 0xde, 0x00, 0x00, /* 0xd8-0xdf */
+};
+
+static int
+cp1133_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00b0)
+    c = cp1133_page00[wc-0x00a0];
+  else if (wc >= 0x0e80 && wc < 0x0ee0)
+    c = cp1133_page0e[wc-0x0e80];
+  else if (wc == 0x20ad)
+    c = 0xdf;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/cp1251.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/cp1251.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/cp1251.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,117 @@
+/* $XFree86: xc/lib/X11/lcUniConv/cp1251.h,v 1.1 2000/12/04 18:49:32 dawes Exp $ */
+
+/*
+ * CP1251
+ */
+#ifdef NEED_TOWC
+
+static const unsigned short cp1251_2uni[128] = {
+  /* 0x80 */
+  0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
+  /* 0x90 */
+  0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+  0xfffd, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
+  /* 0xa0 */
+  0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7,
+  0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7,
+  0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457,
+  /* 0xc0 */
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+  0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
+  /* 0xd0 */
+  0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+  0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
+  /* 0xe0 */
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+  0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
+  /* 0xf0 */
+  0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+  0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
+};
+
+static int
+cp1251_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = cp1251_2uni[c-0x80];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char cp1251_page00[32] = {
+  0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0x00, 0x00, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+};
+static const unsigned char cp1251_page04[152] = {
+  0x00, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf, /* 0x00-0x07 */
+  0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0x00, 0xa1, 0x8f, /* 0x08-0x0f */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x10-0x17 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x18-0x1f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x20-0x27 */
+  0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0x28-0x2f */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x30-0x37 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x38-0x3f */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x40-0x47 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0x48-0x4f */
+  0x00, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf, /* 0x50-0x57 */
+  0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0x00, 0xa2, 0x9f, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0xa5, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+};
+static const unsigned char cp1251_page20[48] = {
+  0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
+  0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+};
+
+static int
+cp1251_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00c0)
+    c = cp1251_page00[wc-0x00a0];
+  else if (wc >= 0x0400 && wc < 0x0498)
+    c = cp1251_page04[wc-0x0400];
+  else if (wc >= 0x2010 && wc < 0x2040)
+    c = cp1251_page20[wc-0x2010];
+  else if (wc == 0x20ac)
+    c = 0x88;
+  else if (wc == 0x2116)
+    c = 0xb9;
+  else if (wc == 0x2122)
+    c = 0x99;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/cp1255.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/cp1255.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/cp1255.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,121 @@
+/* $XFree86: xc/lib/X11/lcUniConv/cp1255.h,v 1.1 2000/12/04 18:49:33 dawes Exp $ */
+
+/*
+ * CP1255
+ */
+
+static const unsigned short cp1255_2uni[128] = {
+  /* 0x80 */
+  0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x02c6, 0x2030, 0xfffd, 0x2039, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x90 */
+  0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+  0x02dc, 0x2122, 0xfffd, 0x203a, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa0 */
+  0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20aa, 0x00a5, 0x00a6, 0x00a7,
+  0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+  0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
+  /* 0xc0 */
+  0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7,
+  0x05b8, 0x05b9, 0xfffd, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf,
+  /* 0xd0 */
+  0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05f0, 0x05f1, 0x05f2, 0x05f3,
+  0x05f4, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xe0 */
+  0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
+  0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
+  /* 0xf0 */
+  0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
+  0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd,
+};
+
+static int
+cp1255_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = cp1255_2uni[c-0x80];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+
+static const unsigned char cp1255_page00[88] = {
+  0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0xb8, 0xb9, 0x00, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, /* 0xf0-0xf7 */
+};
+static const unsigned char cp1255_page02[32] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+};
+static const unsigned char cp1255_page05[72] = {
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xb0-0xb7 */
+  0xc8, 0xc9, 0x00, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xb8-0xbf */
+  0xd0, 0xd1, 0xd2, 0xd3, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xd0-0xd7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xd8-0xdf */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xe0-0xe7 */
+  0xf8, 0xf9, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+  0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
+};
+static const unsigned char cp1255_page20[56] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0xfe, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
+  0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+};
+
+static int
+cp1255_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00f8)
+    c = cp1255_page00[wc-0x00a0];
+  else if (wc == 0x0192)
+    c = 0x83;
+  else if (wc >= 0x02c0 && wc < 0x02e0)
+    c = cp1255_page02[wc-0x02c0];
+  else if (wc >= 0x05b0 && wc < 0x05f8)
+    c = cp1255_page05[wc-0x05b0];
+  else if (wc >= 0x2008 && wc < 0x2040)
+    c = cp1255_page20[wc-0x2008];
+  else if (wc == 0x20aa)
+    c = 0xa4;
+  else if (wc == 0x20ac)
+    c = 0x80;
+  else if (wc == 0x2122)
+    c = 0x99;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/cp1256.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/cp1256.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/cp1256.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,135 @@
+/* $XFree86: xc/lib/X11/lcUniConv/cp1256.h,v 1.1 2000/12/04 18:49:34 dawes Exp $ */
+
+/*
+ * CP1256
+ */
+
+static const unsigned short cp1256_2uni[128] = {
+  /* 0x80 */
+  0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
+  /* 0x90 */
+  0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+  0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba,
+  /* 0xa0 */
+  0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
+  0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+  0x00b8, 0x00b9, 0x061b, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x061f,
+  /* 0xc0 */
+  0x06c1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+  0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
+  /* 0xd0 */
+  0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00d7,
+  0x0637, 0x0638, 0x0639, 0x063a, 0x0640, 0x0641, 0x0642, 0x0643,
+  /* 0xe0 */
+  0x00e0, 0x0644, 0x00e2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00e7,
+  0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7,
+  0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2,
+};
+
+static int
+cp1256_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) cp1256_2uni[c-0x80];
+  return 1;
+}
+
+static const unsigned char cp1256_page00[96] = {
+  0xa0, 0x00, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0xb8, 0xb9, 0x00, 0xbb, 0xbc, 0xbd, 0xbe, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0xe0, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, 0xe7, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0x00, 0x00, 0xee, 0xef, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0xf7, /* 0xf0-0xf7 */
+  0x00, 0xf9, 0x00, 0xfb, 0xfc, 0x00, 0x00, 0x00, /* 0xf8-0xff */
+};
+static const unsigned char cp1256_page01[72] = {
+  0x00, 0x00, 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+};
+static const unsigned char cp1256_page06[208] = {
+  0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0xba, 0x00, 0x00, 0x00, 0xbf, /* 0x18-0x1f */
+  0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd8, /* 0x30-0x37 */
+  0xd9, 0xda, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0xdc, 0xdd, 0xde, 0xdf, 0xe1, 0xe3, 0xe4, 0xe5, /* 0x40-0x47 */
+  0xe6, 0xec, 0xed, 0xf0, 0xf1, 0xf2, 0xf3, 0xf5, /* 0x48-0x4f */
+  0xf6, 0xf8, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x00, /* 0x80-0x87 */
+  0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0xa8-0xaf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0xaa, 0x00, /* 0xb8-0xbf */
+  0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+};
+static const unsigned char cp1256_page20[56] = {
+  0x00, 0x00, 0x00, 0x00, 0x9d, 0x9e, 0xfd, 0xfe, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
+  0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+};
+
+static int
+cp1256_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0100)
+    c = cp1256_page00[wc-0x00a0];
+  else if (wc >= 0x0150 && wc < 0x0198)
+    c = cp1256_page01[wc-0x0150];
+  else if (wc == 0x02c6)
+    c = 0x88;
+  else if (wc >= 0x0608 && wc < 0x06d8)
+    c = cp1256_page06[wc-0x0608];
+  else if (wc >= 0x2008 && wc < 0x2040)
+    c = cp1256_page20[wc-0x2008];
+  else if (wc == 0x20ac)
+    c = 0x80;
+  else if (wc == 0x2122)
+    c = 0x99;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/cp936ext.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/cp936ext.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/cp936ext.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,6259 @@
+/*
+ * "$Id$"
+ *
+ * Character encoding support for the Fast Light Tool Kit (FLTK).
+ *
+ * Copyright 1998-2010 by Bill Spitzak and others.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#if !defined(WIN32) && !defined(__APPLE__)
+
+#ifndef CP936
+#ifdef NEED_TOWC
+static int
+cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  return 0;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+static int
+cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  return 0;
+}
+#endif /* NEED_TOMB */
+
+#else
+/*
+ * CP936EXT
+ */
+#ifdef NEED_TOWC
+
+static const unsigned short cp936ext_2uni_page81[23766] = {
+  /* 0x81 */
+  0x4e02, 0x4e04, 0x4e05, 0x4e06, 0x4e0f, 0x4e12, 0x4e17, 0x4e1f,
+  0x4e20, 0x4e21, 0x4e23, 0x4e26, 0x4e29, 0x4e2e, 0x4e2f, 0x4e31,
+  0x4e33, 0x4e35, 0x4e37, 0x4e3c, 0x4e40, 0x4e41, 0x4e42, 0x4e44,
+  0x4e46, 0x4e4a, 0x4e51, 0x4e55, 0x4e57, 0x4e5a, 0x4e5b, 0x4e62,
+  0x4e63, 0x4e64, 0x4e65, 0x4e67, 0x4e68, 0x4e6a, 0x4e6b, 0x4e6c,
+  0x4e6d, 0x4e6e, 0x4e6f, 0x4e72, 0x4e74, 0x4e75, 0x4e76, 0x4e77,
+  0x4e78, 0x4e79, 0x4e7a, 0x4e7b, 0x4e7c, 0x4e7d, 0x4e7f, 0x4e80,
+  0x4e81, 0x4e82, 0x4e83, 0x4e84, 0x4e85, 0x4e87, 0x4e8a, 0x4e90,
+  0x4e96, 0x4e97, 0x4e99, 0x4e9c, 0x4e9d, 0x4e9e, 0x4ea3, 0x4eaa,
+  0x4eaf, 0x4eb0, 0x4eb1, 0x4eb4, 0x4eb6, 0x4eb7, 0x4eb8, 0x4eb9,
+  0x4ebc, 0x4ebd, 0x4ebe, 0x4ec8, 0x4ecc, 0x4ecf, 0x4ed0, 0x4ed2,
+  0x4eda, 0x4edb, 0x4edc, 0x4ee0, 0x4ee2, 0x4ee6, 0x4ee7, 0x4ee9,
+  0x4eed, 0x4eee, 0x4eef, 0x4ef1, 0x4ef4, 0x4ef8, 0x4ef9, 0x4efa,
+  0x4efc, 0x4efe, 0x4f00, 0x4f02, 0x4f03, 0x4f04, 0x4f05, 0x4f06,
+  0x4f07, 0x4f08, 0x4f0b, 0x4f0c, 0x4f12, 0x4f13, 0x4f14, 0x4f15,
+  0x4f16, 0x4f1c, 0x4f1d, 0x4f21, 0x4f23, 0x4f28, 0x4f29, 0x4f2c,
+  0x4f2d, 0x4f2e, 0x4f31, 0x4f33, 0x4f35, 0x4f37, 0x4f39, 0x4f3b,
+  0x4f3e, 0x4f3f, 0x4f40, 0x4f41, 0x4f42, 0x4f44, 0x4f45, 0x4f47,
+  0x4f48, 0x4f49, 0x4f4a, 0x4f4b, 0x4f4c, 0x4f52, 0x4f54, 0x4f56,
+  0x4f61, 0x4f62, 0x4f66, 0x4f68, 0x4f6a, 0x4f6b, 0x4f6d, 0x4f6e,
+  0x4f71, 0x4f72, 0x4f75, 0x4f77, 0x4f78, 0x4f79, 0x4f7a, 0x4f7d,
+  0x4f80, 0x4f81, 0x4f82, 0x4f85, 0x4f86, 0x4f87, 0x4f8a, 0x4f8c,
+  0x4f8e, 0x4f90, 0x4f92, 0x4f93, 0x4f95, 0x4f96, 0x4f98, 0x4f99,
+  0x4f9a, 0x4f9c, 0x4f9e, 0x4f9f, 0x4fa1, 0x4fa2,
+  /* 0x82 */
+  0x4fa4, 0x4fab, 0x4fad, 0x4fb0, 0x4fb1, 0x4fb2, 0x4fb3, 0x4fb4,
+  0x4fb6, 0x4fb7, 0x4fb8, 0x4fb9, 0x4fba, 0x4fbb, 0x4fbc, 0x4fbd,
+  0x4fbe, 0x4fc0, 0x4fc1, 0x4fc2, 0x4fc6, 0x4fc7, 0x4fc8, 0x4fc9,
+  0x4fcb, 0x4fcc, 0x4fcd, 0x4fd2, 0x4fd3, 0x4fd4, 0x4fd5, 0x4fd6,
+  0x4fd9, 0x4fdb, 0x4fe0, 0x4fe2, 0x4fe4, 0x4fe5, 0x4fe7, 0x4feb,
+  0x4fec, 0x4ff0, 0x4ff2, 0x4ff4, 0x4ff5, 0x4ff6, 0x4ff7, 0x4ff9,
+  0x4ffb, 0x4ffc, 0x4ffd, 0x4fff, 0x5000, 0x5001, 0x5002, 0x5003,
+  0x5004, 0x5005, 0x5006, 0x5007, 0x5008, 0x5009, 0x500a, 0x500b,
+  0x500e, 0x5010, 0x5011, 0x5013, 0x5015, 0x5016, 0x5017, 0x501b,
+  0x501d, 0x501e, 0x5020, 0x5022, 0x5023, 0x5024, 0x5027, 0x502b,
+  0x502f, 0x5030, 0x5031, 0x5032, 0x5033, 0x5034, 0x5035, 0x5036,
+  0x5037, 0x5038, 0x5039, 0x503b, 0x503d, 0x503f, 0x5040, 0x5041,
+  0x5042, 0x5044, 0x5045, 0x5046, 0x5049, 0x504a, 0x504b, 0x504d,
+  0x5050, 0x5051, 0x5052, 0x5053, 0x5054, 0x5056, 0x5057, 0x5058,
+  0x5059, 0x505b, 0x505d, 0x505e, 0x505f, 0x5060, 0x5061, 0x5062,
+  0x5063, 0x5064, 0x5066, 0x5067, 0x5068, 0x5069, 0x506a, 0x506b,
+  0x506d, 0x506e, 0x506f, 0x5070, 0x5071, 0x5072, 0x5073, 0x5074,
+  0x5075, 0x5078, 0x5079, 0x507a, 0x507c, 0x507d, 0x5081, 0x5082,
+  0x5083, 0x5084, 0x5086, 0x5087, 0x5089, 0x508a, 0x508b, 0x508c,
+  0x508e, 0x508f, 0x5090, 0x5091, 0x5092, 0x5093, 0x5094, 0x5095,
+  0x5096, 0x5097, 0x5098, 0x5099, 0x509a, 0x509b, 0x509c, 0x509d,
+  0x509e, 0x509f, 0x50a0, 0x50a1, 0x50a2, 0x50a4, 0x50a6, 0x50aa,
+  0x50ab, 0x50ad, 0x50ae, 0x50af, 0x50b0, 0x50b1, 0x50b3, 0x50b4,
+  0x50b5, 0x50b6, 0x50b7, 0x50b8, 0x50b9, 0x50bc,
+  /* 0x83 */
+  0x50bd, 0x50be, 0x50bf, 0x50c0, 0x50c1, 0x50c2, 0x50c3, 0x50c4,
+  0x50c5, 0x50c6, 0x50c7, 0x50c8, 0x50c9, 0x50ca, 0x50cb, 0x50cc,
+  0x50cd, 0x50ce, 0x50d0, 0x50d1, 0x50d2, 0x50d3, 0x50d4, 0x50d5,
+  0x50d7, 0x50d8, 0x50d9, 0x50db, 0x50dc, 0x50dd, 0x50de, 0x50df,
+  0x50e0, 0x50e1, 0x50e2, 0x50e3, 0x50e4, 0x50e5, 0x50e8, 0x50e9,
+  0x50ea, 0x50eb, 0x50ef, 0x50f0, 0x50f1, 0x50f2, 0x50f4, 0x50f6,
+  0x50f7, 0x50f8, 0x50f9, 0x50fa, 0x50fc, 0x50fd, 0x50fe, 0x50ff,
+  0x5100, 0x5101, 0x5102, 0x5103, 0x5104, 0x5105, 0x5108, 0x5109,
+  0x510a, 0x510c, 0x510d, 0x510e, 0x510f, 0x5110, 0x5111, 0x5113,
+  0x5114, 0x5115, 0x5116, 0x5117, 0x5118, 0x5119, 0x511a, 0x511b,
+  0x511c, 0x511d, 0x511e, 0x511f, 0x5120, 0x5122, 0x5123, 0x5124,
+  0x5125, 0x5126, 0x5127, 0x5128, 0x5129, 0x512a, 0x512b, 0x512c,
+  0x512d, 0x512e, 0x512f, 0x5130, 0x5131, 0x5132, 0x5133, 0x5134,
+  0x5135, 0x5136, 0x5137, 0x5138, 0x5139, 0x513a, 0x513b, 0x513c,
+  0x513d, 0x513e, 0x5142, 0x5147, 0x514a, 0x514c, 0x514e, 0x514f,
+  0x5150, 0x5152, 0x5153, 0x5157, 0x5158, 0x5159, 0x515b, 0x515d,
+  0x515e, 0x515f, 0x5160, 0x5161, 0x5163, 0x5164, 0x5166, 0x5167,
+  0x5169, 0x516a, 0x516f, 0x5172, 0x517a, 0x517e, 0x517f, 0x5183,
+  0x5184, 0x5186, 0x5187, 0x518a, 0x518b, 0x518e, 0x518f, 0x5190,
+  0x5191, 0x5193, 0x5194, 0x5198, 0x519a, 0x519d, 0x519e, 0x519f,
+  0x51a1, 0x51a3, 0x51a6, 0x51a7, 0x51a8, 0x51a9, 0x51aa, 0x51ad,
+  0x51ae, 0x51b4, 0x51b8, 0x51b9, 0x51ba, 0x51be, 0x51bf, 0x51c1,
+  0x51c2, 0x51c3, 0x51c5, 0x51c8, 0x51ca, 0x51cd, 0x51ce, 0x51d0,
+  0x51d2, 0x51d3, 0x51d4, 0x51d5, 0x51d6, 0x51d7,
+  /* 0x84 */
+  0x51d8, 0x51d9, 0x51da, 0x51dc, 0x51de, 0x51df, 0x51e2, 0x51e3,
+  0x51e5, 0x51e6, 0x51e7, 0x51e8, 0x51e9, 0x51ea, 0x51ec, 0x51ee,
+  0x51f1, 0x51f2, 0x51f4, 0x51f7, 0x51fe, 0x5204, 0x5205, 0x5209,
+  0x520b, 0x520c, 0x520f, 0x5210, 0x5213, 0x5214, 0x5215, 0x521c,
+  0x521e, 0x521f, 0x5221, 0x5222, 0x5223, 0x5225, 0x5226, 0x5227,
+  0x522a, 0x522c, 0x522f, 0x5231, 0x5232, 0x5234, 0x5235, 0x523c,
+  0x523e, 0x5244, 0x5245, 0x5246, 0x5247, 0x5248, 0x5249, 0x524b,
+  0x524e, 0x524f, 0x5252, 0x5253, 0x5255, 0x5257, 0x5258, 0x5259,
+  0x525a, 0x525b, 0x525d, 0x525f, 0x5260, 0x5262, 0x5263, 0x5264,
+  0x5266, 0x5268, 0x526b, 0x526c, 0x526d, 0x526e, 0x5270, 0x5271,
+  0x5273, 0x5274, 0x5275, 0x5276, 0x5277, 0x5278, 0x5279, 0x527a,
+  0x527b, 0x527c, 0x527e, 0x5280, 0x5283, 0x5284, 0x5285, 0x5286,
+  0x5287, 0x5289, 0x528a, 0x528b, 0x528c, 0x528d, 0x528e, 0x528f,
+  0x5291, 0x5292, 0x5294, 0x5295, 0x5296, 0x5297, 0x5298, 0x5299,
+  0x529a, 0x529c, 0x52a4, 0x52a5, 0x52a6, 0x52a7, 0x52ae, 0x52af,
+  0x52b0, 0x52b4, 0x52b5, 0x52b6, 0x52b7, 0x52b8, 0x52b9, 0x52ba,
+  0x52bb, 0x52bc, 0x52bd, 0x52c0, 0x52c1, 0x52c2, 0x52c4, 0x52c5,
+  0x52c6, 0x52c8, 0x52ca, 0x52cc, 0x52cd, 0x52ce, 0x52cf, 0x52d1,
+  0x52d3, 0x52d4, 0x52d5, 0x52d7, 0x52d9, 0x52da, 0x52db, 0x52dc,
+  0x52dd, 0x52de, 0x52e0, 0x52e1, 0x52e2, 0x52e3, 0x52e5, 0x52e6,
+  0x52e7, 0x52e8, 0x52e9, 0x52ea, 0x52eb, 0x52ec, 0x52ed, 0x52ee,
+  0x52ef, 0x52f1, 0x52f2, 0x52f3, 0x52f4, 0x52f5, 0x52f6, 0x52f7,
+  0x52f8, 0x52fb, 0x52fc, 0x52fd, 0x5301, 0x5302, 0x5303, 0x5304,
+  0x5307, 0x5309, 0x530a, 0x530b, 0x530c, 0x530e,
+  /* 0x85 */
+  0x5311, 0x5312, 0x5313, 0x5314, 0x5318, 0x531b, 0x531c, 0x531e,
+  0x531f, 0x5322, 0x5324, 0x5325, 0x5327, 0x5328, 0x5329, 0x532b,
+  0x532c, 0x532d, 0x532f, 0x5330, 0x5331, 0x5332, 0x5333, 0x5334,
+  0x5335, 0x5336, 0x5337, 0x5338, 0x533c, 0x533d, 0x5340, 0x5342,
+  0x5344, 0x5346, 0x534b, 0x534c, 0x534d, 0x5350, 0x5354, 0x5358,
+  0x5359, 0x535b, 0x535d, 0x5365, 0x5368, 0x536a, 0x536c, 0x536d,
+  0x5372, 0x5376, 0x5379, 0x537b, 0x537c, 0x537d, 0x537e, 0x5380,
+  0x5381, 0x5383, 0x5387, 0x5388, 0x538a, 0x538e, 0x538f, 0x5390,
+  0x5391, 0x5392, 0x5393, 0x5394, 0x5396, 0x5397, 0x5399, 0x539b,
+  0x539c, 0x539e, 0x53a0, 0x53a1, 0x53a4, 0x53a7, 0x53aa, 0x53ab,
+  0x53ac, 0x53ad, 0x53af, 0x53b0, 0x53b1, 0x53b2, 0x53b3, 0x53b4,
+  0x53b5, 0x53b7, 0x53b8, 0x53b9, 0x53ba, 0x53bc, 0x53bd, 0x53be,
+  0x53c0, 0x53c3, 0x53c4, 0x53c5, 0x53c6, 0x53c7, 0x53ce, 0x53cf,
+  0x53d0, 0x53d2, 0x53d3, 0x53d5, 0x53da, 0x53dc, 0x53dd, 0x53de,
+  0x53e1, 0x53e2, 0x53e7, 0x53f4, 0x53fa, 0x53fe, 0x53ff, 0x5400,
+  0x5402, 0x5405, 0x5407, 0x540b, 0x5414, 0x5418, 0x5419, 0x541a,
+  0x541c, 0x5422, 0x5424, 0x5425, 0x542a, 0x5430, 0x5433, 0x5436,
+  0x5437, 0x543a, 0x543d, 0x543f, 0x5441, 0x5442, 0x5444, 0x5445,
+  0x5447, 0x5449, 0x544c, 0x544d, 0x544e, 0x544f, 0x5451, 0x545a,
+  0x545d, 0x545e, 0x545f, 0x5460, 0x5461, 0x5463, 0x5465, 0x5467,
+  0x5469, 0x546a, 0x546b, 0x546c, 0x546d, 0x546e, 0x546f, 0x5470,
+  0x5474, 0x5479, 0x547a, 0x547e, 0x547f, 0x5481, 0x5483, 0x5485,
+  0x5487, 0x5488, 0x5489, 0x548a, 0x548d, 0x5491, 0x5493, 0x5497,
+  0x5498, 0x549c, 0x549e, 0x549f, 0x54a0, 0x54a1,
+  /* 0x86 */
+  0x54a2, 0x54a5, 0x54ae, 0x54b0, 0x54b2, 0x54b5, 0x54b6, 0x54b7,
+  0x54b9, 0x54ba, 0x54bc, 0x54be, 0x54c3, 0x54c5, 0x54ca, 0x54cb,
+  0x54d6, 0x54d8, 0x54db, 0x54e0, 0x54e1, 0x54e2, 0x54e3, 0x54e4,
+  0x54eb, 0x54ec, 0x54ef, 0x54f0, 0x54f1, 0x54f4, 0x54f5, 0x54f6,
+  0x54f7, 0x54f8, 0x54f9, 0x54fb, 0x54fe, 0x5500, 0x5502, 0x5503,
+  0x5504, 0x5505, 0x5508, 0x550a, 0x550b, 0x550c, 0x550d, 0x550e,
+  0x5512, 0x5513, 0x5515, 0x5516, 0x5517, 0x5518, 0x5519, 0x551a,
+  0x551c, 0x551d, 0x551e, 0x551f, 0x5521, 0x5525, 0x5526, 0x5528,
+  0x5529, 0x552b, 0x552d, 0x5532, 0x5534, 0x5535, 0x5536, 0x5538,
+  0x5539, 0x553a, 0x553b, 0x553d, 0x5540, 0x5542, 0x5545, 0x5547,
+  0x5548, 0x554b, 0x554c, 0x554d, 0x554e, 0x554f, 0x5551, 0x5552,
+  0x5553, 0x5554, 0x5557, 0x5558, 0x5559, 0x555a, 0x555b, 0x555d,
+  0x555e, 0x555f, 0x5560, 0x5562, 0x5563, 0x5568, 0x5569, 0x556b,
+  0x556f, 0x5570, 0x5571, 0x5572, 0x5573, 0x5574, 0x5579, 0x557a,
+  0x557d, 0x557f, 0x5585, 0x5586, 0x558c, 0x558d, 0x558e, 0x5590,
+  0x5592, 0x5593, 0x5595, 0x5596, 0x5597, 0x559a, 0x559b, 0x559e,
+  0x55a0, 0x55a1, 0x55a2, 0x55a3, 0x55a4, 0x55a5, 0x55a6, 0x55a8,
+  0x55a9, 0x55aa, 0x55ab, 0x55ac, 0x55ad, 0x55ae, 0x55af, 0x55b0,
+  0x55b2, 0x55b4, 0x55b6, 0x55b8, 0x55ba, 0x55bc, 0x55bf, 0x55c0,
+  0x55c1, 0x55c2, 0x55c3, 0x55c6, 0x55c7, 0x55c8, 0x55ca, 0x55cb,
+  0x55ce, 0x55cf, 0x55d0, 0x55d5, 0x55d7, 0x55d8, 0x55d9, 0x55da,
+  0x55db, 0x55de, 0x55e0, 0x55e2, 0x55e7, 0x55e9, 0x55ed, 0x55ee,
+  0x55f0, 0x55f1, 0x55f4, 0x55f6, 0x55f8, 0x55f9, 0x55fa, 0x55fb,
+  0x55fc, 0x55ff, 0x5602, 0x5603, 0x5604, 0x5605,
+  /* 0x87 */
+  0x5606, 0x5607, 0x560a, 0x560b, 0x560d, 0x5610, 0x5611, 0x5612,
+  0x5613, 0x5614, 0x5615, 0x5616, 0x5617, 0x5619, 0x561a, 0x561c,
+  0x561d, 0x5620, 0x5621, 0x5622, 0x5625, 0x5626, 0x5628, 0x5629,
+  0x562a, 0x562b, 0x562e, 0x562f, 0x5630, 0x5633, 0x5635, 0x5637,
+  0x5638, 0x563a, 0x563c, 0x563d, 0x563e, 0x5640, 0x5641, 0x5642,
+  0x5643, 0x5644, 0x5645, 0x5646, 0x5647, 0x5648, 0x5649, 0x564a,
+  0x564b, 0x564f, 0x5650, 0x5651, 0x5652, 0x5653, 0x5655, 0x5656,
+  0x565a, 0x565b, 0x565d, 0x565e, 0x565f, 0x5660, 0x5661, 0x5663,
+  0x5665, 0x5666, 0x5667, 0x566d, 0x566e, 0x566f, 0x5670, 0x5672,
+  0x5673, 0x5674, 0x5675, 0x5677, 0x5678, 0x5679, 0x567a, 0x567d,
+  0x567e, 0x567f, 0x5680, 0x5681, 0x5682, 0x5683, 0x5684, 0x5687,
+  0x5688, 0x5689, 0x568a, 0x568b, 0x568c, 0x568d, 0x5690, 0x5691,
+  0x5692, 0x5694, 0x5695, 0x5696, 0x5697, 0x5698, 0x5699, 0x569a,
+  0x569b, 0x569c, 0x569d, 0x569e, 0x569f, 0x56a0, 0x56a1, 0x56a2,
+  0x56a4, 0x56a5, 0x56a6, 0x56a7, 0x56a8, 0x56a9, 0x56aa, 0x56ab,
+  0x56ac, 0x56ad, 0x56ae, 0x56b0, 0x56b1, 0x56b2, 0x56b3, 0x56b4,
+  0x56b5, 0x56b6, 0x56b8, 0x56b9, 0x56ba, 0x56bb, 0x56bd, 0x56be,
+  0x56bf, 0x56c0, 0x56c1, 0x56c2, 0x56c3, 0x56c4, 0x56c5, 0x56c6,
+  0x56c7, 0x56c8, 0x56c9, 0x56cb, 0x56cc, 0x56cd, 0x56ce, 0x56cf,
+  0x56d0, 0x56d1, 0x56d2, 0x56d3, 0x56d5, 0x56d6, 0x56d8, 0x56d9,
+  0x56dc, 0x56e3, 0x56e5, 0x56e6, 0x56e7, 0x56e8, 0x56e9, 0x56ea,
+  0x56ec, 0x56ee, 0x56ef, 0x56f2, 0x56f3, 0x56f6, 0x56f7, 0x56f8,
+  0x56fb, 0x56fc, 0x5700, 0x5701, 0x5702, 0x5705, 0x5707, 0x570b,
+  0x570c, 0x570d, 0x570e, 0x570f, 0x5710, 0x5711,
+  /* 0x88 */
+  0x5712, 0x5713, 0x5714, 0x5715, 0x5716, 0x5717, 0x5718, 0x5719,
+  0x571a, 0x571b, 0x571d, 0x571e, 0x5720, 0x5721, 0x5722, 0x5724,
+  0x5725, 0x5726, 0x5727, 0x572b, 0x5731, 0x5732, 0x5734, 0x5735,
+  0x5736, 0x5737, 0x5738, 0x573c, 0x573d, 0x573f, 0x5741, 0x5743,
+  0x5744, 0x5745, 0x5746, 0x5748, 0x5749, 0x574b, 0x5752, 0x5753,
+  0x5754, 0x5755, 0x5756, 0x5758, 0x5759, 0x5762, 0x5763, 0x5765,
+  0x5767, 0x576c, 0x576e, 0x5770, 0x5771, 0x5772, 0x5774, 0x5775,
+  0x5778, 0x5779, 0x577a, 0x577d, 0x577e, 0x577f, 0x5780, 0x5781,
+  0x5787, 0x5788, 0x5789, 0x578a, 0x578d, 0x578e, 0x578f, 0x5790,
+  0x5791, 0x5794, 0x5795, 0x5796, 0x5797, 0x5798, 0x5799, 0x579a,
+  0x579c, 0x579d, 0x579e, 0x579f, 0x57a5, 0x57a8, 0x57aa, 0x57ac,
+  0x57af, 0x57b0, 0x57b1, 0x57b3, 0x57b5, 0x57b6, 0x57b7, 0x57b9,
+  0x57ba, 0x57bb, 0x57bc, 0x57bd, 0x57be, 0x57bf, 0x57c0, 0x57c1,
+  0x57c4, 0x57c5, 0x57c6, 0x57c7, 0x57c8, 0x57c9, 0x57ca, 0x57cc,
+  0x57cd, 0x57d0, 0x57d1, 0x57d3, 0x57d6, 0x57d7, 0x57db, 0x57dc,
+  0x57de, 0x57e1, 0x57e2, 0x57e3, 0x57e5, 0x57e6, 0x57e7, 0x57e8,
+  0x57e9, 0x57ea, 0x57eb, 0x57ec, 0x57ee, 0x57f0, 0x57f1, 0x57f2,
+  0x57f3, 0x57f5, 0x57f6, 0x57f7, 0x57fb, 0x57fc, 0x57fe, 0x57ff,
+  0x5801, 0x5803, 0x5804, 0x5805, 0x5808, 0x5809, 0x580a, 0x580c,
+  0x580e, 0x580f, 0x5810, 0x5812, 0x5813, 0x5814, 0x5816, 0x5817,
+  0x5818, 0x581a, 0x581b, 0x581c, 0x581d, 0x581f, 0x5822, 0x5823,
+  0x5825, 0x5826, 0x5827, 0x5828, 0x5829, 0x582b, 0x582c, 0x582d,
+  0x582e, 0x582f, 0x5831, 0x5832, 0x5833, 0x5834, 0x5836, 0x5837,
+  0x5838, 0x5839, 0x583a, 0x583b, 0x583c, 0x583d,
+  /* 0x89 */
+  0x583e, 0x583f, 0x5840, 0x5841, 0x5842, 0x5843, 0x5845, 0x5846,
+  0x5847, 0x5848, 0x5849, 0x584a, 0x584b, 0x584e, 0x584f, 0x5850,
+  0x5852, 0x5853, 0x5855, 0x5856, 0x5857, 0x5859, 0x585a, 0x585b,
+  0x585c, 0x585d, 0x585f, 0x5860, 0x5861, 0x5862, 0x5863, 0x5864,
+  0x5866, 0x5867, 0x5868, 0x5869, 0x586a, 0x586d, 0x586e, 0x586f,
+  0x5870, 0x5871, 0x5872, 0x5873, 0x5874, 0x5875, 0x5876, 0x5877,
+  0x5878, 0x5879, 0x587a, 0x587b, 0x587c, 0x587d, 0x587f, 0x5882,
+  0x5884, 0x5886, 0x5887, 0x5888, 0x588a, 0x588b, 0x588c, 0x588d,
+  0x588e, 0x588f, 0x5890, 0x5891, 0x5894, 0x5895, 0x5896, 0x5897,
+  0x5898, 0x589b, 0x589c, 0x589d, 0x58a0, 0x58a1, 0x58a2, 0x58a3,
+  0x58a4, 0x58a5, 0x58a6, 0x58a7, 0x58aa, 0x58ab, 0x58ac, 0x58ad,
+  0x58ae, 0x58af, 0x58b0, 0x58b1, 0x58b2, 0x58b3, 0x58b4, 0x58b5,
+  0x58b6, 0x58b7, 0x58b8, 0x58b9, 0x58ba, 0x58bb, 0x58bd, 0x58be,
+  0x58bf, 0x58c0, 0x58c2, 0x58c3, 0x58c4, 0x58c6, 0x58c7, 0x58c8,
+  0x58c9, 0x58ca, 0x58cb, 0x58cc, 0x58cd, 0x58ce, 0x58cf, 0x58d0,
+  0x58d2, 0x58d3, 0x58d4, 0x58d6, 0x58d7, 0x58d8, 0x58d9, 0x58da,
+  0x58db, 0x58dc, 0x58dd, 0x58de, 0x58df, 0x58e0, 0x58e1, 0x58e2,
+  0x58e3, 0x58e5, 0x58e6, 0x58e7, 0x58e8, 0x58e9, 0x58ea, 0x58ed,
+  0x58ef, 0x58f1, 0x58f2, 0x58f4, 0x58f5, 0x58f7, 0x58f8, 0x58fa,
+  0x58fb, 0x58fc, 0x58fd, 0x58fe, 0x58ff, 0x5900, 0x5901, 0x5903,
+  0x5905, 0x5906, 0x5908, 0x5909, 0x590a, 0x590b, 0x590c, 0x590e,
+  0x5910, 0x5911, 0x5912, 0x5913, 0x5917, 0x5918, 0x591b, 0x591d,
+  0x591e, 0x5920, 0x5921, 0x5922, 0x5923, 0x5926, 0x5928, 0x592c,
+  0x5930, 0x5932, 0x5933, 0x5935, 0x5936, 0x593b,
+  /* 0x8a */
+  0x593d, 0x593e, 0x593f, 0x5940, 0x5943, 0x5945, 0x5946, 0x594a,
+  0x594c, 0x594d, 0x5950, 0x5952, 0x5953, 0x5959, 0x595b, 0x595c,
+  0x595d, 0x595e, 0x595f, 0x5961, 0x5963, 0x5964, 0x5966, 0x5967,
+  0x5968, 0x5969, 0x596a, 0x596b, 0x596c, 0x596d, 0x596e, 0x596f,
+  0x5970, 0x5971, 0x5972, 0x5975, 0x5977, 0x597a, 0x597b, 0x597c,
+  0x597e, 0x597f, 0x5980, 0x5985, 0x5989, 0x598b, 0x598c, 0x598e,
+  0x598f, 0x5990, 0x5991, 0x5994, 0x5995, 0x5998, 0x599a, 0x599b,
+  0x599c, 0x599d, 0x599f, 0x59a0, 0x59a1, 0x59a2, 0x59a6, 0x59a7,
+  0x59ac, 0x59ad, 0x59b0, 0x59b1, 0x59b3, 0x59b4, 0x59b5, 0x59b6,
+  0x59b7, 0x59b8, 0x59ba, 0x59bc, 0x59bd, 0x59bf, 0x59c0, 0x59c1,
+  0x59c2, 0x59c3, 0x59c4, 0x59c5, 0x59c7, 0x59c8, 0x59c9, 0x59cc,
+  0x59cd, 0x59ce, 0x59cf, 0x59d5, 0x59d6, 0x59d9, 0x59db, 0x59de,
+  0x59df, 0x59e0, 0x59e1, 0x59e2, 0x59e4, 0x59e6, 0x59e7, 0x59e9,
+  0x59ea, 0x59eb, 0x59ed, 0x59ee, 0x59ef, 0x59f0, 0x59f1, 0x59f2,
+  0x59f3, 0x59f4, 0x59f5, 0x59f6, 0x59f7, 0x59f8, 0x59fa, 0x59fc,
+  0x59fd, 0x59fe, 0x5a00, 0x5a02, 0x5a0a, 0x5a0b, 0x5a0d, 0x5a0e,
+  0x5a0f, 0x5a10, 0x5a12, 0x5a14, 0x5a15, 0x5a16, 0x5a17, 0x5a19,
+  0x5a1a, 0x5a1b, 0x5a1d, 0x5a1e, 0x5a21, 0x5a22, 0x5a24, 0x5a26,
+  0x5a27, 0x5a28, 0x5a2a, 0x5a2b, 0x5a2c, 0x5a2d, 0x5a2e, 0x5a2f,
+  0x5a30, 0x5a33, 0x5a35, 0x5a37, 0x5a38, 0x5a39, 0x5a3a, 0x5a3b,
+  0x5a3d, 0x5a3e, 0x5a3f, 0x5a41, 0x5a42, 0x5a43, 0x5a44, 0x5a45,
+  0x5a47, 0x5a48, 0x5a4b, 0x5a4c, 0x5a4d, 0x5a4e, 0x5a4f, 0x5a50,
+  0x5a51, 0x5a52, 0x5a53, 0x5a54, 0x5a56, 0x5a57, 0x5a58, 0x5a59,
+  0x5a5b, 0x5a5c, 0x5a5d, 0x5a5e, 0x5a5f, 0x5a60,
+  /* 0x8b */
+  0x5a61, 0x5a63, 0x5a64, 0x5a65, 0x5a66, 0x5a68, 0x5a69, 0x5a6b,
+  0x5a6c, 0x5a6d, 0x5a6e, 0x5a6f, 0x5a70, 0x5a71, 0x5a72, 0x5a73,
+  0x5a78, 0x5a79, 0x5a7b, 0x5a7c, 0x5a7d, 0x5a7e, 0x5a80, 0x5a81,
+  0x5a82, 0x5a83, 0x5a84, 0x5a85, 0x5a86, 0x5a87, 0x5a88, 0x5a89,
+  0x5a8a, 0x5a8b, 0x5a8c, 0x5a8d, 0x5a8e, 0x5a8f, 0x5a90, 0x5a91,
+  0x5a93, 0x5a94, 0x5a95, 0x5a96, 0x5a97, 0x5a98, 0x5a99, 0x5a9c,
+  0x5a9d, 0x5a9e, 0x5a9f, 0x5aa0, 0x5aa1, 0x5aa2, 0x5aa3, 0x5aa4,
+  0x5aa5, 0x5aa6, 0x5aa7, 0x5aa8, 0x5aa9, 0x5aab, 0x5aac, 0x5aad,
+  0x5aae, 0x5aaf, 0x5ab0, 0x5ab1, 0x5ab4, 0x5ab6, 0x5ab7, 0x5ab9,
+  0x5aba, 0x5abb, 0x5abc, 0x5abd, 0x5abf, 0x5ac0, 0x5ac3, 0x5ac4,
+  0x5ac5, 0x5ac6, 0x5ac7, 0x5ac8, 0x5aca, 0x5acb, 0x5acd, 0x5ace,
+  0x5acf, 0x5ad0, 0x5ad1, 0x5ad3, 0x5ad5, 0x5ad7, 0x5ad9, 0x5ada,
+  0x5adb, 0x5add, 0x5ade, 0x5adf, 0x5ae2, 0x5ae4, 0x5ae5, 0x5ae7,
+  0x5ae8, 0x5aea, 0x5aec, 0x5aed, 0x5aee, 0x5aef, 0x5af0, 0x5af2,
+  0x5af3, 0x5af4, 0x5af5, 0x5af6, 0x5af7, 0x5af8, 0x5af9, 0x5afa,
+  0x5afb, 0x5afc, 0x5afd, 0x5afe, 0x5aff, 0x5b00, 0x5b01, 0x5b02,
+  0x5b03, 0x5b04, 0x5b05, 0x5b06, 0x5b07, 0x5b08, 0x5b0a, 0x5b0b,
+  0x5b0c, 0x5b0d, 0x5b0e, 0x5b0f, 0x5b10, 0x5b11, 0x5b12, 0x5b13,
+  0x5b14, 0x5b15, 0x5b18, 0x5b19, 0x5b1a, 0x5b1b, 0x5b1c, 0x5b1d,
+  0x5b1e, 0x5b1f, 0x5b20, 0x5b21, 0x5b22, 0x5b23, 0x5b24, 0x5b25,
+  0x5b26, 0x5b27, 0x5b28, 0x5b29, 0x5b2a, 0x5b2b, 0x5b2c, 0x5b2d,
+  0x5b2e, 0x5b2f, 0x5b30, 0x5b31, 0x5b33, 0x5b35, 0x5b36, 0x5b38,
+  0x5b39, 0x5b3a, 0x5b3b, 0x5b3c, 0x5b3d, 0x5b3e, 0x5b3f, 0x5b41,
+  0x5b42, 0x5b43, 0x5b44, 0x5b45, 0x5b46, 0x5b47,
+  /* 0x8c */
+  0x5b48, 0x5b49, 0x5b4a, 0x5b4b, 0x5b4c, 0x5b4d, 0x5b4e, 0x5b4f,
+  0x5b52, 0x5b56, 0x5b5e, 0x5b60, 0x5b61, 0x5b67, 0x5b68, 0x5b6b,
+  0x5b6d, 0x5b6e, 0x5b6f, 0x5b72, 0x5b74, 0x5b76, 0x5b77, 0x5b78,
+  0x5b79, 0x5b7b, 0x5b7c, 0x5b7e, 0x5b7f, 0x5b82, 0x5b86, 0x5b8a,
+  0x5b8d, 0x5b8e, 0x5b90, 0x5b91, 0x5b92, 0x5b94, 0x5b96, 0x5b9f,
+  0x5ba7, 0x5ba8, 0x5ba9, 0x5bac, 0x5bad, 0x5bae, 0x5baf, 0x5bb1,
+  0x5bb2, 0x5bb7, 0x5bba, 0x5bbb, 0x5bbc, 0x5bc0, 0x5bc1, 0x5bc3,
+  0x5bc8, 0x5bc9, 0x5bca, 0x5bcb, 0x5bcd, 0x5bce, 0x5bcf, 0x5bd1,
+  0x5bd4, 0x5bd5, 0x5bd6, 0x5bd7, 0x5bd8, 0x5bd9, 0x5bda, 0x5bdb,
+  0x5bdc, 0x5be0, 0x5be2, 0x5be3, 0x5be6, 0x5be7, 0x5be9, 0x5bea,
+  0x5beb, 0x5bec, 0x5bed, 0x5bef, 0x5bf1, 0x5bf2, 0x5bf3, 0x5bf4,
+  0x5bf5, 0x5bf6, 0x5bf7, 0x5bfd, 0x5bfe, 0x5c00, 0x5c02, 0x5c03,
+  0x5c05, 0x5c07, 0x5c08, 0x5c0b, 0x5c0c, 0x5c0d, 0x5c0e, 0x5c10,
+  0x5c12, 0x5c13, 0x5c17, 0x5c19, 0x5c1b, 0x5c1e, 0x5c1f, 0x5c20,
+  0x5c21, 0x5c23, 0x5c26, 0x5c28, 0x5c29, 0x5c2a, 0x5c2b, 0x5c2d,
+  0x5c2e, 0x5c2f, 0x5c30, 0x5c32, 0x5c33, 0x5c35, 0x5c36, 0x5c37,
+  0x5c43, 0x5c44, 0x5c46, 0x5c47, 0x5c4c, 0x5c4d, 0x5c52, 0x5c53,
+  0x5c54, 0x5c56, 0x5c57, 0x5c58, 0x5c5a, 0x5c5b, 0x5c5c, 0x5c5d,
+  0x5c5f, 0x5c62, 0x5c64, 0x5c67, 0x5c68, 0x5c69, 0x5c6a, 0x5c6b,
+  0x5c6c, 0x5c6d, 0x5c70, 0x5c72, 0x5c73, 0x5c74, 0x5c75, 0x5c76,
+  0x5c77, 0x5c78, 0x5c7b, 0x5c7c, 0x5c7d, 0x5c7e, 0x5c80, 0x5c83,
+  0x5c84, 0x5c85, 0x5c86, 0x5c87, 0x5c89, 0x5c8a, 0x5c8b, 0x5c8e,
+  0x5c8f, 0x5c92, 0x5c93, 0x5c95, 0x5c9d, 0x5c9e, 0x5c9f, 0x5ca0,
+  0x5ca1, 0x5ca4, 0x5ca5, 0x5ca6, 0x5ca7, 0x5ca8,
+  /* 0x8d */
+  0x5caa, 0x5cae, 0x5caf, 0x5cb0, 0x5cb2, 0x5cb4, 0x5cb6, 0x5cb9,
+  0x5cba, 0x5cbb, 0x5cbc, 0x5cbe, 0x5cc0, 0x5cc2, 0x5cc3, 0x5cc5,
+  0x5cc6, 0x5cc7, 0x5cc8, 0x5cc9, 0x5cca, 0x5ccc, 0x5ccd, 0x5cce,
+  0x5ccf, 0x5cd0, 0x5cd1, 0x5cd3, 0x5cd4, 0x5cd5, 0x5cd6, 0x5cd7,
+  0x5cd8, 0x5cda, 0x5cdb, 0x5cdc, 0x5cdd, 0x5cde, 0x5cdf, 0x5ce0,
+  0x5ce2, 0x5ce3, 0x5ce7, 0x5ce9, 0x5ceb, 0x5cec, 0x5cee, 0x5cef,
+  0x5cf1, 0x5cf2, 0x5cf3, 0x5cf4, 0x5cf5, 0x5cf6, 0x5cf7, 0x5cf8,
+  0x5cf9, 0x5cfa, 0x5cfc, 0x5cfd, 0x5cfe, 0x5cff, 0x5d00, 0x5d01,
+  0x5d04, 0x5d05, 0x5d08, 0x5d09, 0x5d0a, 0x5d0b, 0x5d0c, 0x5d0d,
+  0x5d0f, 0x5d10, 0x5d11, 0x5d12, 0x5d13, 0x5d15, 0x5d17, 0x5d18,
+  0x5d19, 0x5d1a, 0x5d1c, 0x5d1d, 0x5d1f, 0x5d20, 0x5d21, 0x5d22,
+  0x5d23, 0x5d25, 0x5d28, 0x5d2a, 0x5d2b, 0x5d2c, 0x5d2f, 0x5d30,
+  0x5d31, 0x5d32, 0x5d33, 0x5d35, 0x5d36, 0x5d37, 0x5d38, 0x5d39,
+  0x5d3a, 0x5d3b, 0x5d3c, 0x5d3f, 0x5d40, 0x5d41, 0x5d42, 0x5d43,
+  0x5d44, 0x5d45, 0x5d46, 0x5d48, 0x5d49, 0x5d4d, 0x5d4e, 0x5d4f,
+  0x5d50, 0x5d51, 0x5d52, 0x5d53, 0x5d54, 0x5d55, 0x5d56, 0x5d57,
+  0x5d59, 0x5d5a, 0x5d5c, 0x5d5e, 0x5d5f, 0x5d60, 0x5d61, 0x5d62,
+  0x5d63, 0x5d64, 0x5d65, 0x5d66, 0x5d67, 0x5d68, 0x5d6a, 0x5d6d,
+  0x5d6e, 0x5d70, 0x5d71, 0x5d72, 0x5d73, 0x5d75, 0x5d76, 0x5d77,
+  0x5d78, 0x5d79, 0x5d7a, 0x5d7b, 0x5d7c, 0x5d7d, 0x5d7e, 0x5d7f,
+  0x5d80, 0x5d81, 0x5d83, 0x5d84, 0x5d85, 0x5d86, 0x5d87, 0x5d88,
+  0x5d89, 0x5d8a, 0x5d8b, 0x5d8c, 0x5d8d, 0x5d8e, 0x5d8f, 0x5d90,
+  0x5d91, 0x5d92, 0x5d93, 0x5d94, 0x5d95, 0x5d96, 0x5d97, 0x5d98,
+  0x5d9a, 0x5d9b, 0x5d9c, 0x5d9e, 0x5d9f, 0x5da0,
+  /* 0x8e */
+  0x5da1, 0x5da2, 0x5da3, 0x5da4, 0x5da5, 0x5da6, 0x5da7, 0x5da8,
+  0x5da9, 0x5daa, 0x5dab, 0x5dac, 0x5dad, 0x5dae, 0x5daf, 0x5db0,
+  0x5db1, 0x5db2, 0x5db3, 0x5db4, 0x5db5, 0x5db6, 0x5db8, 0x5db9,
+  0x5dba, 0x5dbb, 0x5dbc, 0x5dbd, 0x5dbe, 0x5dbf, 0x5dc0, 0x5dc1,
+  0x5dc2, 0x5dc3, 0x5dc4, 0x5dc6, 0x5dc7, 0x5dc8, 0x5dc9, 0x5dca,
+  0x5dcb, 0x5dcc, 0x5dce, 0x5dcf, 0x5dd0, 0x5dd1, 0x5dd2, 0x5dd3,
+  0x5dd4, 0x5dd5, 0x5dd6, 0x5dd7, 0x5dd8, 0x5dd9, 0x5dda, 0x5ddc,
+  0x5ddf, 0x5de0, 0x5de3, 0x5de4, 0x5dea, 0x5dec, 0x5ded, 0x5df0,
+  0x5df5, 0x5df6, 0x5df8, 0x5df9, 0x5dfa, 0x5dfb, 0x5dfc, 0x5dff,
+  0x5e00, 0x5e04, 0x5e07, 0x5e09, 0x5e0a, 0x5e0b, 0x5e0d, 0x5e0e,
+  0x5e12, 0x5e13, 0x5e17, 0x5e1e, 0x5e1f, 0x5e20, 0x5e21, 0x5e22,
+  0x5e23, 0x5e24, 0x5e25, 0x5e28, 0x5e29, 0x5e2a, 0x5e2b, 0x5e2c,
+  0x5e2f, 0x5e30, 0x5e32, 0x5e33, 0x5e34, 0x5e35, 0x5e36, 0x5e39,
+  0x5e3a, 0x5e3e, 0x5e3f, 0x5e40, 0x5e41, 0x5e43, 0x5e46, 0x5e47,
+  0x5e48, 0x5e49, 0x5e4a, 0x5e4b, 0x5e4d, 0x5e4e, 0x5e4f, 0x5e50,
+  0x5e51, 0x5e52, 0x5e53, 0x5e56, 0x5e57, 0x5e58, 0x5e59, 0x5e5a,
+  0x5e5c, 0x5e5d, 0x5e5f, 0x5e60, 0x5e63, 0x5e64, 0x5e65, 0x5e66,
+  0x5e67, 0x5e68, 0x5e69, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e,
+  0x5e6f, 0x5e70, 0x5e71, 0x5e75, 0x5e77, 0x5e79, 0x5e7e, 0x5e81,
+  0x5e82, 0x5e83, 0x5e85, 0x5e88, 0x5e89, 0x5e8c, 0x5e8d, 0x5e8e,
+  0x5e92, 0x5e98, 0x5e9b, 0x5e9d, 0x5ea1, 0x5ea2, 0x5ea3, 0x5ea4,
+  0x5ea8, 0x5ea9, 0x5eaa, 0x5eab, 0x5eac, 0x5eae, 0x5eaf, 0x5eb0,
+  0x5eb1, 0x5eb2, 0x5eb4, 0x5eba, 0x5ebb, 0x5ebc, 0x5ebd, 0x5ebf,
+  0x5ec0, 0x5ec1, 0x5ec2, 0x5ec3, 0x5ec4, 0x5ec5,
+  /* 0x8f */
+  0x5ec6, 0x5ec7, 0x5ec8, 0x5ecb, 0x5ecc, 0x5ecd, 0x5ece, 0x5ecf,
+  0x5ed0, 0x5ed4, 0x5ed5, 0x5ed7, 0x5ed8, 0x5ed9, 0x5eda, 0x5edc,
+  0x5edd, 0x5ede, 0x5edf, 0x5ee0, 0x5ee1, 0x5ee2, 0x5ee3, 0x5ee4,
+  0x5ee5, 0x5ee6, 0x5ee7, 0x5ee9, 0x5eeb, 0x5eec, 0x5eed, 0x5eee,
+  0x5eef, 0x5ef0, 0x5ef1, 0x5ef2, 0x5ef3, 0x5ef5, 0x5ef8, 0x5ef9,
+  0x5efb, 0x5efc, 0x5efd, 0x5f05, 0x5f06, 0x5f07, 0x5f09, 0x5f0c,
+  0x5f0d, 0x5f0e, 0x5f10, 0x5f12, 0x5f14, 0x5f16, 0x5f19, 0x5f1a,
+  0x5f1c, 0x5f1d, 0x5f1e, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0x5f28,
+  0x5f2b, 0x5f2c, 0x5f2e, 0x5f30, 0x5f32, 0x5f33, 0x5f34, 0x5f35,
+  0x5f36, 0x5f37, 0x5f38, 0x5f3b, 0x5f3d, 0x5f3e, 0x5f3f, 0x5f41,
+  0x5f42, 0x5f43, 0x5f44, 0x5f45, 0x5f46, 0x5f47, 0x5f48, 0x5f49,
+  0x5f4a, 0x5f4b, 0x5f4c, 0x5f4d, 0x5f4e, 0x5f4f, 0x5f51, 0x5f54,
+  0x5f59, 0x5f5a, 0x5f5b, 0x5f5c, 0x5f5e, 0x5f5f, 0x5f60, 0x5f63,
+  0x5f65, 0x5f67, 0x5f68, 0x5f6b, 0x5f6e, 0x5f6f, 0x5f72, 0x5f74,
+  0x5f75, 0x5f76, 0x5f78, 0x5f7a, 0x5f7d, 0x5f7e, 0x5f7f, 0x5f83,
+  0x5f86, 0x5f8d, 0x5f8e, 0x5f8f, 0x5f91, 0x5f93, 0x5f94, 0x5f96,
+  0x5f9a, 0x5f9b, 0x5f9d, 0x5f9e, 0x5f9f, 0x5fa0, 0x5fa2, 0x5fa3,
+  0x5fa4, 0x5fa5, 0x5fa6, 0x5fa7, 0x5fa9, 0x5fab, 0x5fac, 0x5faf,
+  0x5fb0, 0x5fb1, 0x5fb2, 0x5fb3, 0x5fb4, 0x5fb6, 0x5fb8, 0x5fb9,
+  0x5fba, 0x5fbb, 0x5fbe, 0x5fbf, 0x5fc0, 0x5fc1, 0x5fc2, 0x5fc7,
+  0x5fc8, 0x5fca, 0x5fcb, 0x5fce, 0x5fd3, 0x5fd4, 0x5fd5, 0x5fda,
+  0x5fdb, 0x5fdc, 0x5fde, 0x5fdf, 0x5fe2, 0x5fe3, 0x5fe5, 0x5fe6,
+  0x5fe8, 0x5fe9, 0x5fec, 0x5fef, 0x5ff0, 0x5ff2, 0x5ff3, 0x5ff4,
+  0x5ff6, 0x5ff7, 0x5ff9, 0x5ffa, 0x5ffc, 0x6007,
+  /* 0x90 */
+  0x6008, 0x6009, 0x600b, 0x600c, 0x6010, 0x6011, 0x6013, 0x6017,
+  0x6018, 0x601a, 0x601e, 0x601f, 0x6022, 0x6023, 0x6024, 0x602c,
+  0x602d, 0x602e, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6036,
+  0x6037, 0x6038, 0x6039, 0x603a, 0x603d, 0x603e, 0x6040, 0x6044,
+  0x6045, 0x6046, 0x6047, 0x6048, 0x6049, 0x604a, 0x604c, 0x604e,
+  0x604f, 0x6051, 0x6053, 0x6054, 0x6056, 0x6057, 0x6058, 0x605b,
+  0x605c, 0x605e, 0x605f, 0x6060, 0x6061, 0x6065, 0x6066, 0x606e,
+  0x6071, 0x6072, 0x6074, 0x6075, 0x6077, 0x607e, 0x6080, 0x6081,
+  0x6082, 0x6085, 0x6086, 0x6087, 0x6088, 0x608a, 0x608b, 0x608e,
+  0x608f, 0x6090, 0x6091, 0x6093, 0x6095, 0x6097, 0x6098, 0x6099,
+  0x609c, 0x609e, 0x60a1, 0x60a2, 0x60a4, 0x60a5, 0x60a7, 0x60a9,
+  0x60aa, 0x60ae, 0x60b0, 0x60b3, 0x60b5, 0x60b6, 0x60b7, 0x60b9,
+  0x60ba, 0x60bd, 0x60be, 0x60bf, 0x60c0, 0x60c1, 0x60c2, 0x60c3,
+  0x60c4, 0x60c7, 0x60c8, 0x60c9, 0x60cc, 0x60cd, 0x60ce, 0x60cf,
+  0x60d0, 0x60d2, 0x60d3, 0x60d4, 0x60d6, 0x60d7, 0x60d9, 0x60db,
+  0x60de, 0x60e1, 0x60e2, 0x60e3, 0x60e4, 0x60e5, 0x60ea, 0x60f1,
+  0x60f2, 0x60f5, 0x60f7, 0x60f8, 0x60fb, 0x60fc, 0x60fd, 0x60fe,
+  0x60ff, 0x6102, 0x6103, 0x6104, 0x6105, 0x6107, 0x610a, 0x610b,
+  0x610c, 0x6110, 0x6111, 0x6112, 0x6113, 0x6114, 0x6116, 0x6117,
+  0x6118, 0x6119, 0x611b, 0x611c, 0x611d, 0x611e, 0x6121, 0x6122,
+  0x6125, 0x6128, 0x6129, 0x612a, 0x612c, 0x612d, 0x612e, 0x612f,
+  0x6130, 0x6131, 0x6132, 0x6133, 0x6134, 0x6135, 0x6136, 0x6137,
+  0x6138, 0x6139, 0x613a, 0x613b, 0x613c, 0x613d, 0x613e, 0x6140,
+  0x6141, 0x6142, 0x6143, 0x6144, 0x6145, 0x6146,
+  /* 0x91 */
+  0x6147, 0x6149, 0x614b, 0x614d, 0x614f, 0x6150, 0x6152, 0x6153,
+  0x6154, 0x6156, 0x6157, 0x6158, 0x6159, 0x615a, 0x615b, 0x615c,
+  0x615e, 0x615f, 0x6160, 0x6161, 0x6163, 0x6164, 0x6165, 0x6166,
+  0x6169, 0x616a, 0x616b, 0x616c, 0x616d, 0x616e, 0x616f, 0x6171,
+  0x6172, 0x6173, 0x6174, 0x6176, 0x6178, 0x6179, 0x617a, 0x617b,
+  0x617c, 0x617d, 0x617e, 0x617f, 0x6180, 0x6181, 0x6182, 0x6183,
+  0x6184, 0x6185, 0x6186, 0x6187, 0x6188, 0x6189, 0x618a, 0x618c,
+  0x618d, 0x618f, 0x6190, 0x6191, 0x6192, 0x6193, 0x6195, 0x6196,
+  0x6197, 0x6198, 0x6199, 0x619a, 0x619b, 0x619c, 0x619e, 0x619f,
+  0x61a0, 0x61a1, 0x61a2, 0x61a3, 0x61a4, 0x61a5, 0x61a6, 0x61aa,
+  0x61ab, 0x61ad, 0x61ae, 0x61af, 0x61b0, 0x61b1, 0x61b2, 0x61b3,
+  0x61b4, 0x61b5, 0x61b6, 0x61b8, 0x61b9, 0x61ba, 0x61bb, 0x61bc,
+  0x61bd, 0x61bf, 0x61c0, 0x61c1, 0x61c3, 0x61c4, 0x61c5, 0x61c6,
+  0x61c7, 0x61c9, 0x61cc, 0x61cd, 0x61ce, 0x61cf, 0x61d0, 0x61d3,
+  0x61d5, 0x61d6, 0x61d7, 0x61d8, 0x61d9, 0x61da, 0x61db, 0x61dc,
+  0x61dd, 0x61de, 0x61df, 0x61e0, 0x61e1, 0x61e2, 0x61e3, 0x61e4,
+  0x61e5, 0x61e7, 0x61e8, 0x61e9, 0x61ea, 0x61eb, 0x61ec, 0x61ed,
+  0x61ee, 0x61ef, 0x61f0, 0x61f1, 0x61f2, 0x61f3, 0x61f4, 0x61f6,
+  0x61f7, 0x61f8, 0x61f9, 0x61fa, 0x61fb, 0x61fc, 0x61fd, 0x61fe,
+  0x6200, 0x6201, 0x6202, 0x6203, 0x6204, 0x6205, 0x6207, 0x6209,
+  0x6213, 0x6214, 0x6219, 0x621c, 0x621d, 0x621e, 0x6220, 0x6223,
+  0x6226, 0x6227, 0x6228, 0x6229, 0x622b, 0x622d, 0x622f, 0x6230,
+  0x6231, 0x6232, 0x6235, 0x6236, 0x6238, 0x6239, 0x623a, 0x623b,
+  0x623c, 0x6242, 0x6244, 0x6245, 0x6246, 0x624a,
+  /* 0x92 */
+  0x624f, 0x6250, 0x6255, 0x6256, 0x6257, 0x6259, 0x625a, 0x625c,
+  0x625d, 0x625e, 0x625f, 0x6260, 0x6261, 0x6262, 0x6264, 0x6265,
+  0x6268, 0x6271, 0x6272, 0x6274, 0x6275, 0x6277, 0x6278, 0x627a,
+  0x627b, 0x627d, 0x6281, 0x6282, 0x6283, 0x6285, 0x6286, 0x6287,
+  0x6288, 0x628b, 0x628c, 0x628d, 0x628e, 0x628f, 0x6290, 0x6294,
+  0x6299, 0x629c, 0x629d, 0x629e, 0x62a3, 0x62a6, 0x62a7, 0x62a9,
+  0x62aa, 0x62ad, 0x62ae, 0x62af, 0x62b0, 0x62b2, 0x62b3, 0x62b4,
+  0x62b6, 0x62b7, 0x62b8, 0x62ba, 0x62be, 0x62c0, 0x62c1, 0x62c3,
+  0x62cb, 0x62cf, 0x62d1, 0x62d5, 0x62dd, 0x62de, 0x62e0, 0x62e1,
+  0x62e4, 0x62ea, 0x62eb, 0x62f0, 0x62f2, 0x62f5, 0x62f8, 0x62f9,
+  0x62fa, 0x62fb, 0x6300, 0x6303, 0x6304, 0x6305, 0x6306, 0x630a,
+  0x630b, 0x630c, 0x630d, 0x630f, 0x6310, 0x6312, 0x6313, 0x6314,
+  0x6315, 0x6317, 0x6318, 0x6319, 0x631c, 0x6326, 0x6327, 0x6329,
+  0x632c, 0x632d, 0x632e, 0x6330, 0x6331, 0x6333, 0x6334, 0x6335,
+  0x6336, 0x6337, 0x6338, 0x633b, 0x633c, 0x633e, 0x633f, 0x6340,
+  0x6341, 0x6344, 0x6347, 0x6348, 0x634a, 0x6351, 0x6352, 0x6353,
+  0x6354, 0x6356, 0x6357, 0x6358, 0x6359, 0x635a, 0x635b, 0x635c,
+  0x635d, 0x6360, 0x6364, 0x6365, 0x6366, 0x6368, 0x636a, 0x636b,
+  0x636c, 0x636f, 0x6370, 0x6372, 0x6373, 0x6374, 0x6375, 0x6378,
+  0x6379, 0x637c, 0x637d, 0x637e, 0x637f, 0x6381, 0x6383, 0x6384,
+  0x6385, 0x6386, 0x638b, 0x638d, 0x6391, 0x6393, 0x6394, 0x6395,
+  0x6397, 0x6399, 0x639a, 0x639b, 0x639c, 0x639d, 0x639e, 0x639f,
+  0x63a1, 0x63a4, 0x63a6, 0x63ab, 0x63af, 0x63b1, 0x63b2, 0x63b5,
+  0x63b6, 0x63b9, 0x63bb, 0x63bd, 0x63bf, 0x63c0,
+  /* 0x93 */
+  0x63c1, 0x63c2, 0x63c3, 0x63c5, 0x63c7, 0x63c8, 0x63ca, 0x63cb,
+  0x63cc, 0x63d1, 0x63d3, 0x63d4, 0x63d5, 0x63d7, 0x63d8, 0x63d9,
+  0x63da, 0x63db, 0x63dc, 0x63dd, 0x63df, 0x63e2, 0x63e4, 0x63e5,
+  0x63e6, 0x63e7, 0x63e8, 0x63eb, 0x63ec, 0x63ee, 0x63ef, 0x63f0,
+  0x63f1, 0x63f3, 0x63f5, 0x63f7, 0x63f9, 0x63fa, 0x63fb, 0x63fc,
+  0x63fe, 0x6403, 0x6404, 0x6406, 0x6407, 0x6408, 0x6409, 0x640a,
+  0x640d, 0x640e, 0x6411, 0x6412, 0x6415, 0x6416, 0x6417, 0x6418,
+  0x6419, 0x641a, 0x641d, 0x641f, 0x6422, 0x6423, 0x6424, 0x6425,
+  0x6427, 0x6428, 0x6429, 0x642b, 0x642e, 0x642f, 0x6430, 0x6431,
+  0x6432, 0x6433, 0x6435, 0x6436, 0x6437, 0x6438, 0x6439, 0x643b,
+  0x643c, 0x643e, 0x6440, 0x6442, 0x6443, 0x6449, 0x644b, 0x644c,
+  0x644d, 0x644e, 0x644f, 0x6450, 0x6451, 0x6453, 0x6455, 0x6456,
+  0x6457, 0x6459, 0x645a, 0x645b, 0x645c, 0x645d, 0x645f, 0x6460,
+  0x6461, 0x6462, 0x6463, 0x6464, 0x6465, 0x6466, 0x6468, 0x646a,
+  0x646b, 0x646c, 0x646e, 0x646f, 0x6470, 0x6471, 0x6472, 0x6473,
+  0x6474, 0x6475, 0x6476, 0x6477, 0x647b, 0x647c, 0x647d, 0x647e,
+  0x647f, 0x6480, 0x6481, 0x6483, 0x6486, 0x6488, 0x6489, 0x648a,
+  0x648b, 0x648c, 0x648d, 0x648e, 0x648f, 0x6490, 0x6493, 0x6494,
+  0x6497, 0x6498, 0x649a, 0x649b, 0x649c, 0x649d, 0x649f, 0x64a0,
+  0x64a1, 0x64a2, 0x64a3, 0x64a5, 0x64a6, 0x64a7, 0x64a8, 0x64aa,
+  0x64ab, 0x64af, 0x64b1, 0x64b2, 0x64b3, 0x64b4, 0x64b6, 0x64b9,
+  0x64bb, 0x64bd, 0x64be, 0x64bf, 0x64c1, 0x64c3, 0x64c4, 0x64c6,
+  0x64c7, 0x64c8, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64cf, 0x64d1,
+  0x64d3, 0x64d4, 0x64d5, 0x64d6, 0x64d9, 0x64da,
+  /* 0x94 */
+  0x64db, 0x64dc, 0x64dd, 0x64df, 0x64e0, 0x64e1, 0x64e3, 0x64e5,
+  0x64e7, 0x64e8, 0x64e9, 0x64ea, 0x64eb, 0x64ec, 0x64ed, 0x64ee,
+  0x64ef, 0x64f0, 0x64f1, 0x64f2, 0x64f3, 0x64f4, 0x64f5, 0x64f6,
+  0x64f7, 0x64f8, 0x64f9, 0x64fa, 0x64fb, 0x64fc, 0x64fd, 0x64fe,
+  0x64ff, 0x6501, 0x6502, 0x6503, 0x6504, 0x6505, 0x6506, 0x6507,
+  0x6508, 0x650a, 0x650b, 0x650c, 0x650d, 0x650e, 0x650f, 0x6510,
+  0x6511, 0x6513, 0x6514, 0x6515, 0x6516, 0x6517, 0x6519, 0x651a,
+  0x651b, 0x651c, 0x651d, 0x651e, 0x651f, 0x6520, 0x6521, 0x6522,
+  0x6523, 0x6524, 0x6526, 0x6527, 0x6528, 0x6529, 0x652a, 0x652c,
+  0x652d, 0x6530, 0x6531, 0x6532, 0x6533, 0x6537, 0x653a, 0x653c,
+  0x653d, 0x6540, 0x6541, 0x6542, 0x6543, 0x6544, 0x6546, 0x6547,
+  0x654a, 0x654b, 0x654d, 0x654e, 0x6550, 0x6552, 0x6553, 0x6554,
+  0x6557, 0x6558, 0x655a, 0x655c, 0x655f, 0x6560, 0x6561, 0x6564,
+  0x6565, 0x6567, 0x6568, 0x6569, 0x656a, 0x656d, 0x656e, 0x656f,
+  0x6571, 0x6573, 0x6575, 0x6576, 0x6578, 0x6579, 0x657a, 0x657b,
+  0x657c, 0x657d, 0x657e, 0x657f, 0x6580, 0x6581, 0x6582, 0x6583,
+  0x6584, 0x6585, 0x6586, 0x6588, 0x6589, 0x658a, 0x658d, 0x658e,
+  0x658f, 0x6592, 0x6594, 0x6595, 0x6596, 0x6598, 0x659a, 0x659d,
+  0x659e, 0x65a0, 0x65a2, 0x65a3, 0x65a6, 0x65a8, 0x65aa, 0x65ac,
+  0x65ae, 0x65b1, 0x65b2, 0x65b3, 0x65b4, 0x65b5, 0x65b6, 0x65b7,
+  0x65b8, 0x65ba, 0x65bb, 0x65be, 0x65bf, 0x65c0, 0x65c2, 0x65c7,
+  0x65c8, 0x65c9, 0x65ca, 0x65cd, 0x65d0, 0x65d1, 0x65d3, 0x65d4,
+  0x65d5, 0x65d8, 0x65d9, 0x65da, 0x65db, 0x65dc, 0x65dd, 0x65de,
+  0x65df, 0x65e1, 0x65e3, 0x65e4, 0x65ea, 0x65eb,
+  /* 0x95 */
+  0x65f2, 0x65f3, 0x65f4, 0x65f5, 0x65f8, 0x65f9, 0x65fb, 0x65fc,
+  0x65fd, 0x65fe, 0x65ff, 0x6601, 0x6604, 0x6605, 0x6607, 0x6608,
+  0x6609, 0x660b, 0x660d, 0x6610, 0x6611, 0x6612, 0x6616, 0x6617,
+  0x6618, 0x661a, 0x661b, 0x661c, 0x661e, 0x6621, 0x6622, 0x6623,
+  0x6624, 0x6626, 0x6629, 0x662a, 0x662b, 0x662c, 0x662e, 0x6630,
+  0x6632, 0x6633, 0x6637, 0x6638, 0x6639, 0x663a, 0x663b, 0x663d,
+  0x663f, 0x6640, 0x6642, 0x6644, 0x6645, 0x6646, 0x6647, 0x6648,
+  0x6649, 0x664a, 0x664d, 0x664e, 0x6650, 0x6651, 0x6658, 0x6659,
+  0x665b, 0x665c, 0x665d, 0x665e, 0x6660, 0x6662, 0x6663, 0x6665,
+  0x6667, 0x6669, 0x666a, 0x666b, 0x666c, 0x666d, 0x6671, 0x6672,
+  0x6673, 0x6675, 0x6678, 0x6679, 0x667b, 0x667c, 0x667d, 0x667f,
+  0x6680, 0x6681, 0x6683, 0x6685, 0x6686, 0x6688, 0x6689, 0x668a,
+  0x668b, 0x668d, 0x668e, 0x668f, 0x6690, 0x6692, 0x6693, 0x6694,
+  0x6695, 0x6698, 0x6699, 0x669a, 0x669b, 0x669c, 0x669e, 0x669f,
+  0x66a0, 0x66a1, 0x66a2, 0x66a3, 0x66a4, 0x66a5, 0x66a6, 0x66a9,
+  0x66aa, 0x66ab, 0x66ac, 0x66ad, 0x66af, 0x66b0, 0x66b1, 0x66b2,
+  0x66b3, 0x66b5, 0x66b6, 0x66b7, 0x66b8, 0x66ba, 0x66bb, 0x66bc,
+  0x66bd, 0x66bf, 0x66c0, 0x66c1, 0x66c2, 0x66c3, 0x66c4, 0x66c5,
+  0x66c6, 0x66c7, 0x66c8, 0x66c9, 0x66ca, 0x66cb, 0x66cc, 0x66cd,
+  0x66ce, 0x66cf, 0x66d0, 0x66d1, 0x66d2, 0x66d3, 0x66d4, 0x66d5,
+  0x66d6, 0x66d7, 0x66d8, 0x66da, 0x66de, 0x66df, 0x66e0, 0x66e1,
+  0x66e2, 0x66e3, 0x66e4, 0x66e5, 0x66e7, 0x66e8, 0x66ea, 0x66eb,
+  0x66ec, 0x66ed, 0x66ee, 0x66ef, 0x66f1, 0x66f5, 0x66f6, 0x66f8,
+  0x66fa, 0x66fb, 0x66fd, 0x6701, 0x6702, 0x6703,
+  /* 0x96 */
+  0x6704, 0x6705, 0x6706, 0x6707, 0x670c, 0x670e, 0x670f, 0x6711,
+  0x6712, 0x6713, 0x6716, 0x6718, 0x6719, 0x671a, 0x671c, 0x671e,
+  0x6720, 0x6721, 0x6722, 0x6723, 0x6724, 0x6725, 0x6727, 0x6729,
+  0x672e, 0x6730, 0x6732, 0x6733, 0x6736, 0x6737, 0x6738, 0x6739,
+  0x673b, 0x673c, 0x673e, 0x673f, 0x6741, 0x6744, 0x6745, 0x6747,
+  0x674a, 0x674b, 0x674d, 0x6752, 0x6754, 0x6755, 0x6757, 0x6758,
+  0x6759, 0x675a, 0x675b, 0x675d, 0x6762, 0x6763, 0x6764, 0x6766,
+  0x6767, 0x676b, 0x676c, 0x676e, 0x6771, 0x6774, 0x6776, 0x6778,
+  0x6779, 0x677a, 0x677b, 0x677d, 0x6780, 0x6782, 0x6783, 0x6785,
+  0x6786, 0x6788, 0x678a, 0x678c, 0x678d, 0x678e, 0x678f, 0x6791,
+  0x6792, 0x6793, 0x6794, 0x6796, 0x6799, 0x679b, 0x679f, 0x67a0,
+  0x67a1, 0x67a4, 0x67a6, 0x67a9, 0x67ac, 0x67ae, 0x67b1, 0x67b2,
+  0x67b4, 0x67b9, 0x67ba, 0x67bb, 0x67bc, 0x67bd, 0x67be, 0x67bf,
+  0x67c0, 0x67c2, 0x67c5, 0x67c6, 0x67c7, 0x67c8, 0x67c9, 0x67ca,
+  0x67cb, 0x67cc, 0x67cd, 0x67ce, 0x67d5, 0x67d6, 0x67d7, 0x67db,
+  0x67df, 0x67e1, 0x67e3, 0x67e4, 0x67e6, 0x67e7, 0x67e8, 0x67ea,
+  0x67eb, 0x67ed, 0x67ee, 0x67f2, 0x67f5, 0x67f6, 0x67f7, 0x67f8,
+  0x67f9, 0x67fa, 0x67fb, 0x67fc, 0x67fe, 0x6801, 0x6802, 0x6803,
+  0x6804, 0x6806, 0x680d, 0x6810, 0x6812, 0x6814, 0x6815, 0x6818,
+  0x6819, 0x681a, 0x681b, 0x681c, 0x681e, 0x681f, 0x6820, 0x6822,
+  0x6823, 0x6824, 0x6825, 0x6826, 0x6827, 0x6828, 0x682b, 0x682c,
+  0x682d, 0x682e, 0x682f, 0x6830, 0x6831, 0x6834, 0x6835, 0x6836,
+  0x683a, 0x683b, 0x683f, 0x6847, 0x684b, 0x684d, 0x684f, 0x6852,
+  0x6856, 0x6857, 0x6858, 0x6859, 0x685a, 0x685b,
+  /* 0x97 */
+  0x685c, 0x685d, 0x685e, 0x685f, 0x686a, 0x686c, 0x686d, 0x686e,
+  0x686f, 0x6870, 0x6871, 0x6872, 0x6873, 0x6875, 0x6878, 0x6879,
+  0x687a, 0x687b, 0x687c, 0x687d, 0x687e, 0x687f, 0x6880, 0x6882,
+  0x6884, 0x6887, 0x6888, 0x6889, 0x688a, 0x688b, 0x688c, 0x688d,
+  0x688e, 0x6890, 0x6891, 0x6892, 0x6894, 0x6895, 0x6896, 0x6898,
+  0x6899, 0x689a, 0x689b, 0x689c, 0x689d, 0x689e, 0x689f, 0x68a0,
+  0x68a1, 0x68a3, 0x68a4, 0x68a5, 0x68a9, 0x68aa, 0x68ab, 0x68ac,
+  0x68ae, 0x68b1, 0x68b2, 0x68b4, 0x68b6, 0x68b7, 0x68b8, 0x68b9,
+  0x68ba, 0x68bb, 0x68bc, 0x68bd, 0x68be, 0x68bf, 0x68c1, 0x68c3,
+  0x68c4, 0x68c5, 0x68c6, 0x68c7, 0x68c8, 0x68ca, 0x68cc, 0x68ce,
+  0x68cf, 0x68d0, 0x68d1, 0x68d3, 0x68d4, 0x68d6, 0x68d7, 0x68d9,
+  0x68db, 0x68dc, 0x68dd, 0x68de, 0x68df, 0x68e1, 0x68e2, 0x68e4,
+  0x68e5, 0x68e6, 0x68e7, 0x68e8, 0x68e9, 0x68ea, 0x68eb, 0x68ec,
+  0x68ed, 0x68ef, 0x68f2, 0x68f3, 0x68f4, 0x68f6, 0x68f7, 0x68f8,
+  0x68fb, 0x68fd, 0x68fe, 0x68ff, 0x6900, 0x6902, 0x6903, 0x6904,
+  0x6906, 0x6907, 0x6908, 0x6909, 0x690a, 0x690c, 0x690f, 0x6911,
+  0x6913, 0x6914, 0x6915, 0x6916, 0x6917, 0x6918, 0x6919, 0x691a,
+  0x691b, 0x691c, 0x691d, 0x691e, 0x6921, 0x6922, 0x6923, 0x6925,
+  0x6926, 0x6927, 0x6928, 0x6929, 0x692a, 0x692b, 0x692c, 0x692e,
+  0x692f, 0x6931, 0x6932, 0x6933, 0x6935, 0x6936, 0x6937, 0x6938,
+  0x693a, 0x693b, 0x693c, 0x693e, 0x6940, 0x6941, 0x6943, 0x6944,
+  0x6945, 0x6946, 0x6947, 0x6948, 0x6949, 0x694a, 0x694b, 0x694c,
+  0x694d, 0x694e, 0x694f, 0x6950, 0x6951, 0x6952, 0x6953, 0x6955,
+  0x6956, 0x6958, 0x6959, 0x695b, 0x695c, 0x695f,
+  /* 0x98 */
+  0x6961, 0x6962, 0x6964, 0x6965, 0x6967, 0x6968, 0x6969, 0x696a,
+  0x696c, 0x696d, 0x696f, 0x6970, 0x6972, 0x6973, 0x6974, 0x6975,
+  0x6976, 0x697a, 0x697b, 0x697d, 0x697e, 0x697f, 0x6981, 0x6983,
+  0x6985, 0x698a, 0x698b, 0x698c, 0x698e, 0x698f, 0x6990, 0x6991,
+  0x6992, 0x6993, 0x6996, 0x6997, 0x6999, 0x699a, 0x699d, 0x699e,
+  0x699f, 0x69a0, 0x69a1, 0x69a2, 0x69a3, 0x69a4, 0x69a5, 0x69a6,
+  0x69a9, 0x69aa, 0x69ac, 0x69ae, 0x69af, 0x69b0, 0x69b2, 0x69b3,
+  0x69b5, 0x69b6, 0x69b8, 0x69b9, 0x69ba, 0x69bc, 0x69bd, 0x69be,
+  0x69bf, 0x69c0, 0x69c2, 0x69c3, 0x69c4, 0x69c5, 0x69c6, 0x69c7,
+  0x69c8, 0x69c9, 0x69cb, 0x69cd, 0x69cf, 0x69d1, 0x69d2, 0x69d3,
+  0x69d5, 0x69d6, 0x69d7, 0x69d8, 0x69d9, 0x69da, 0x69dc, 0x69dd,
+  0x69de, 0x69e1, 0x69e2, 0x69e3, 0x69e4, 0x69e5, 0x69e6, 0x69e7,
+  0x69e8, 0x69e9, 0x69ea, 0x69eb, 0x69ec, 0x69ee, 0x69ef, 0x69f0,
+  0x69f1, 0x69f3, 0x69f4, 0x69f5, 0x69f6, 0x69f7, 0x69f8, 0x69f9,
+  0x69fa, 0x69fb, 0x69fc, 0x69fe, 0x6a00, 0x6a01, 0x6a02, 0x6a03,
+  0x6a04, 0x6a05, 0x6a06, 0x6a07, 0x6a08, 0x6a09, 0x6a0b, 0x6a0c,
+  0x6a0d, 0x6a0e, 0x6a0f, 0x6a10, 0x6a11, 0x6a12, 0x6a13, 0x6a14,
+  0x6a15, 0x6a16, 0x6a19, 0x6a1a, 0x6a1b, 0x6a1c, 0x6a1d, 0x6a1e,
+  0x6a20, 0x6a22, 0x6a23, 0x6a24, 0x6a25, 0x6a26, 0x6a27, 0x6a29,
+  0x6a2b, 0x6a2c, 0x6a2d, 0x6a2e, 0x6a30, 0x6a32, 0x6a33, 0x6a34,
+  0x6a36, 0x6a37, 0x6a38, 0x6a39, 0x6a3a, 0x6a3b, 0x6a3c, 0x6a3f,
+  0x6a40, 0x6a41, 0x6a42, 0x6a43, 0x6a45, 0x6a46, 0x6a48, 0x6a49,
+  0x6a4a, 0x6a4b, 0x6a4c, 0x6a4d, 0x6a4e, 0x6a4f, 0x6a51, 0x6a52,
+  0x6a53, 0x6a54, 0x6a55, 0x6a56, 0x6a57, 0x6a5a,
+  /* 0x99 */
+  0x6a5c, 0x6a5d, 0x6a5e, 0x6a5f, 0x6a60, 0x6a62, 0x6a63, 0x6a64,
+  0x6a66, 0x6a67, 0x6a68, 0x6a69, 0x6a6a, 0x6a6b, 0x6a6c, 0x6a6d,
+  0x6a6e, 0x6a6f, 0x6a70, 0x6a72, 0x6a73, 0x6a74, 0x6a75, 0x6a76,
+  0x6a77, 0x6a78, 0x6a7a, 0x6a7b, 0x6a7d, 0x6a7e, 0x6a7f, 0x6a81,
+  0x6a82, 0x6a83, 0x6a85, 0x6a86, 0x6a87, 0x6a88, 0x6a89, 0x6a8a,
+  0x6a8b, 0x6a8c, 0x6a8d, 0x6a8f, 0x6a92, 0x6a93, 0x6a94, 0x6a95,
+  0x6a96, 0x6a98, 0x6a99, 0x6a9a, 0x6a9b, 0x6a9c, 0x6a9d, 0x6a9e,
+  0x6a9f, 0x6aa1, 0x6aa2, 0x6aa3, 0x6aa4, 0x6aa5, 0x6aa6, 0x6aa7,
+  0x6aa8, 0x6aaa, 0x6aad, 0x6aae, 0x6aaf, 0x6ab0, 0x6ab1, 0x6ab2,
+  0x6ab3, 0x6ab4, 0x6ab5, 0x6ab6, 0x6ab7, 0x6ab8, 0x6ab9, 0x6aba,
+  0x6abb, 0x6abc, 0x6abd, 0x6abe, 0x6abf, 0x6ac0, 0x6ac1, 0x6ac2,
+  0x6ac3, 0x6ac4, 0x6ac5, 0x6ac6, 0x6ac7, 0x6ac8, 0x6ac9, 0x6aca,
+  0x6acb, 0x6acc, 0x6acd, 0x6ace, 0x6acf, 0x6ad0, 0x6ad1, 0x6ad2,
+  0x6ad3, 0x6ad4, 0x6ad5, 0x6ad6, 0x6ad7, 0x6ad8, 0x6ad9, 0x6ada,
+  0x6adb, 0x6adc, 0x6add, 0x6ade, 0x6adf, 0x6ae0, 0x6ae1, 0x6ae2,
+  0x6ae3, 0x6ae4, 0x6ae5, 0x6ae6, 0x6ae7, 0x6ae8, 0x6ae9, 0x6aea,
+  0x6aeb, 0x6aec, 0x6aed, 0x6aee, 0x6aef, 0x6af0, 0x6af1, 0x6af2,
+  0x6af3, 0x6af4, 0x6af5, 0x6af6, 0x6af7, 0x6af8, 0x6af9, 0x6afa,
+  0x6afb, 0x6afc, 0x6afd, 0x6afe, 0x6aff, 0x6b00, 0x6b01, 0x6b02,
+  0x6b03, 0x6b04, 0x6b05, 0x6b06, 0x6b07, 0x6b08, 0x6b09, 0x6b0a,
+  0x6b0b, 0x6b0c, 0x6b0d, 0x6b0e, 0x6b0f, 0x6b10, 0x6b11, 0x6b12,
+  0x6b13, 0x6b14, 0x6b15, 0x6b16, 0x6b17, 0x6b18, 0x6b19, 0x6b1a,
+  0x6b1b, 0x6b1c, 0x6b1d, 0x6b1e, 0x6b1f, 0x6b25, 0x6b26, 0x6b28,
+  0x6b29, 0x6b2a, 0x6b2b, 0x6b2c, 0x6b2d, 0x6b2e,
+  /* 0x9a */
+  0x6b2f, 0x6b30, 0x6b31, 0x6b33, 0x6b34, 0x6b35, 0x6b36, 0x6b38,
+  0x6b3b, 0x6b3c, 0x6b3d, 0x6b3f, 0x6b40, 0x6b41, 0x6b42, 0x6b44,
+  0x6b45, 0x6b48, 0x6b4a, 0x6b4b, 0x6b4d, 0x6b4e, 0x6b4f, 0x6b50,
+  0x6b51, 0x6b52, 0x6b53, 0x6b54, 0x6b55, 0x6b56, 0x6b57, 0x6b58,
+  0x6b5a, 0x6b5b, 0x6b5c, 0x6b5d, 0x6b5e, 0x6b5f, 0x6b60, 0x6b61,
+  0x6b68, 0x6b69, 0x6b6b, 0x6b6c, 0x6b6d, 0x6b6e, 0x6b6f, 0x6b70,
+  0x6b71, 0x6b72, 0x6b73, 0x6b74, 0x6b75, 0x6b76, 0x6b77, 0x6b78,
+  0x6b7a, 0x6b7d, 0x6b7e, 0x6b7f, 0x6b80, 0x6b85, 0x6b88, 0x6b8c,
+  0x6b8e, 0x6b8f, 0x6b90, 0x6b91, 0x6b94, 0x6b95, 0x6b97, 0x6b98,
+  0x6b99, 0x6b9c, 0x6b9d, 0x6b9e, 0x6b9f, 0x6ba0, 0x6ba2, 0x6ba3,
+  0x6ba4, 0x6ba5, 0x6ba6, 0x6ba7, 0x6ba8, 0x6ba9, 0x6bab, 0x6bac,
+  0x6bad, 0x6bae, 0x6baf, 0x6bb0, 0x6bb1, 0x6bb2, 0x6bb6, 0x6bb8,
+  0x6bb9, 0x6bba, 0x6bbb, 0x6bbc, 0x6bbd, 0x6bbe, 0x6bc0, 0x6bc3,
+  0x6bc4, 0x6bc6, 0x6bc7, 0x6bc8, 0x6bc9, 0x6bca, 0x6bcc, 0x6bce,
+  0x6bd0, 0x6bd1, 0x6bd8, 0x6bda, 0x6bdc, 0x6bdd, 0x6bde, 0x6bdf,
+  0x6be0, 0x6be2, 0x6be3, 0x6be4, 0x6be5, 0x6be6, 0x6be7, 0x6be8,
+  0x6be9, 0x6bec, 0x6bed, 0x6bee, 0x6bf0, 0x6bf1, 0x6bf2, 0x6bf4,
+  0x6bf6, 0x6bf7, 0x6bf8, 0x6bfa, 0x6bfb, 0x6bfc, 0x6bfe, 0x6bff,
+  0x6c00, 0x6c01, 0x6c02, 0x6c03, 0x6c04, 0x6c08, 0x6c09, 0x6c0a,
+  0x6c0b, 0x6c0c, 0x6c0e, 0x6c12, 0x6c17, 0x6c1c, 0x6c1d, 0x6c1e,
+  0x6c20, 0x6c23, 0x6c25, 0x6c2b, 0x6c2c, 0x6c2d, 0x6c31, 0x6c33,
+  0x6c36, 0x6c37, 0x6c39, 0x6c3a, 0x6c3b, 0x6c3c, 0x6c3e, 0x6c3f,
+  0x6c43, 0x6c44, 0x6c45, 0x6c48, 0x6c4b, 0x6c4c, 0x6c4d, 0x6c4e,
+  0x6c4f, 0x6c51, 0x6c52, 0x6c53, 0x6c56, 0x6c58,
+  /* 0x9b */
+  0x6c59, 0x6c5a, 0x6c62, 0x6c63, 0x6c65, 0x6c66, 0x6c67, 0x6c6b,
+  0x6c6c, 0x6c6d, 0x6c6e, 0x6c6f, 0x6c71, 0x6c73, 0x6c75, 0x6c77,
+  0x6c78, 0x6c7a, 0x6c7b, 0x6c7c, 0x6c7f, 0x6c80, 0x6c84, 0x6c87,
+  0x6c8a, 0x6c8b, 0x6c8d, 0x6c8e, 0x6c91, 0x6c92, 0x6c95, 0x6c96,
+  0x6c97, 0x6c98, 0x6c9a, 0x6c9c, 0x6c9d, 0x6c9e, 0x6ca0, 0x6ca2,
+  0x6ca8, 0x6cac, 0x6caf, 0x6cb0, 0x6cb4, 0x6cb5, 0x6cb6, 0x6cb7,
+  0x6cba, 0x6cc0, 0x6cc1, 0x6cc2, 0x6cc3, 0x6cc6, 0x6cc7, 0x6cc8,
+  0x6ccb, 0x6ccd, 0x6cce, 0x6ccf, 0x6cd1, 0x6cd2, 0x6cd8, 0x6cd9,
+  0x6cda, 0x6cdc, 0x6cdd, 0x6cdf, 0x6ce4, 0x6ce6, 0x6ce7, 0x6ce9,
+  0x6cec, 0x6ced, 0x6cf2, 0x6cf4, 0x6cf9, 0x6cff, 0x6d00, 0x6d02,
+  0x6d03, 0x6d05, 0x6d06, 0x6d08, 0x6d09, 0x6d0a, 0x6d0d, 0x6d0f,
+  0x6d10, 0x6d11, 0x6d13, 0x6d14, 0x6d15, 0x6d16, 0x6d18, 0x6d1c,
+  0x6d1d, 0x6d1f, 0x6d20, 0x6d21, 0x6d22, 0x6d23, 0x6d24, 0x6d26,
+  0x6d28, 0x6d29, 0x6d2c, 0x6d2d, 0x6d2f, 0x6d30, 0x6d34, 0x6d36,
+  0x6d37, 0x6d38, 0x6d3a, 0x6d3f, 0x6d40, 0x6d42, 0x6d44, 0x6d49,
+  0x6d4c, 0x6d50, 0x6d55, 0x6d56, 0x6d57, 0x6d58, 0x6d5b, 0x6d5d,
+  0x6d5f, 0x6d61, 0x6d62, 0x6d64, 0x6d65, 0x6d67, 0x6d68, 0x6d6b,
+  0x6d6c, 0x6d6d, 0x6d70, 0x6d71, 0x6d72, 0x6d73, 0x6d75, 0x6d76,
+  0x6d79, 0x6d7a, 0x6d7b, 0x6d7d, 0x6d7e, 0x6d7f, 0x6d80, 0x6d81,
+  0x6d83, 0x6d84, 0x6d86, 0x6d87, 0x6d8a, 0x6d8b, 0x6d8d, 0x6d8f,
+  0x6d90, 0x6d92, 0x6d96, 0x6d97, 0x6d98, 0x6d99, 0x6d9a, 0x6d9c,
+  0x6da2, 0x6da5, 0x6dac, 0x6dad, 0x6db0, 0x6db1, 0x6db3, 0x6db4,
+  0x6db6, 0x6db7, 0x6db9, 0x6dba, 0x6dbb, 0x6dbc, 0x6dbd, 0x6dbe,
+  0x6dc1, 0x6dc2, 0x6dc3, 0x6dc8, 0x6dc9, 0x6dca,
+  /* 0x9c */
+  0x6dcd, 0x6dce, 0x6dcf, 0x6dd0, 0x6dd2, 0x6dd3, 0x6dd4, 0x6dd5,
+  0x6dd7, 0x6dda, 0x6ddb, 0x6ddc, 0x6ddf, 0x6de2, 0x6de3, 0x6de5,
+  0x6de7, 0x6de8, 0x6de9, 0x6dea, 0x6ded, 0x6def, 0x6df0, 0x6df2,
+  0x6df4, 0x6df5, 0x6df6, 0x6df8, 0x6dfa, 0x6dfd, 0x6dfe, 0x6dff,
+  0x6e00, 0x6e01, 0x6e02, 0x6e03, 0x6e04, 0x6e06, 0x6e07, 0x6e08,
+  0x6e09, 0x6e0b, 0x6e0f, 0x6e12, 0x6e13, 0x6e15, 0x6e18, 0x6e19,
+  0x6e1b, 0x6e1c, 0x6e1e, 0x6e1f, 0x6e22, 0x6e26, 0x6e27, 0x6e28,
+  0x6e2a, 0x6e2c, 0x6e2e, 0x6e30, 0x6e31, 0x6e33, 0x6e35, 0x6e36,
+  0x6e37, 0x6e39, 0x6e3b, 0x6e3c, 0x6e3d, 0x6e3e, 0x6e3f, 0x6e40,
+  0x6e41, 0x6e42, 0x6e45, 0x6e46, 0x6e47, 0x6e48, 0x6e49, 0x6e4a,
+  0x6e4b, 0x6e4c, 0x6e4f, 0x6e50, 0x6e51, 0x6e52, 0x6e55, 0x6e57,
+  0x6e59, 0x6e5a, 0x6e5c, 0x6e5d, 0x6e5e, 0x6e60, 0x6e61, 0x6e62,
+  0x6e63, 0x6e64, 0x6e65, 0x6e66, 0x6e67, 0x6e68, 0x6e69, 0x6e6a,
+  0x6e6c, 0x6e6d, 0x6e6f, 0x6e70, 0x6e71, 0x6e72, 0x6e73, 0x6e74,
+  0x6e75, 0x6e76, 0x6e77, 0x6e78, 0x6e79, 0x6e7a, 0x6e7b, 0x6e7c,
+  0x6e7d, 0x6e80, 0x6e81, 0x6e82, 0x6e84, 0x6e87, 0x6e88, 0x6e8a,
+  0x6e8b, 0x6e8c, 0x6e8d, 0x6e8e, 0x6e91, 0x6e92, 0x6e93, 0x6e94,
+  0x6e95, 0x6e96, 0x6e97, 0x6e99, 0x6e9a, 0x6e9b, 0x6e9d, 0x6e9e,
+  0x6ea0, 0x6ea1, 0x6ea3, 0x6ea4, 0x6ea6, 0x6ea8, 0x6ea9, 0x6eab,
+  0x6eac, 0x6ead, 0x6eae, 0x6eb0, 0x6eb3, 0x6eb5, 0x6eb8, 0x6eb9,
+  0x6ebc, 0x6ebe, 0x6ebf, 0x6ec0, 0x6ec3, 0x6ec4, 0x6ec5, 0x6ec6,
+  0x6ec8, 0x6ec9, 0x6eca, 0x6ecc, 0x6ecd, 0x6ece, 0x6ed0, 0x6ed2,
+  0x6ed6, 0x6ed8, 0x6ed9, 0x6edb, 0x6edc, 0x6edd, 0x6ee3, 0x6ee7,
+  0x6eea, 0x6eeb, 0x6eec, 0x6eed, 0x6eee, 0x6eef,
+  /* 0x9d */
+  0x6ef0, 0x6ef1, 0x6ef2, 0x6ef3, 0x6ef5, 0x6ef6, 0x6ef7, 0x6ef8,
+  0x6efa, 0x6efb, 0x6efc, 0x6efd, 0x6efe, 0x6eff, 0x6f00, 0x6f01,
+  0x6f03, 0x6f04, 0x6f05, 0x6f07, 0x6f08, 0x6f0a, 0x6f0b, 0x6f0c,
+  0x6f0d, 0x6f0e, 0x6f10, 0x6f11, 0x6f12, 0x6f16, 0x6f17, 0x6f18,
+  0x6f19, 0x6f1a, 0x6f1b, 0x6f1c, 0x6f1d, 0x6f1e, 0x6f1f, 0x6f21,
+  0x6f22, 0x6f23, 0x6f25, 0x6f26, 0x6f27, 0x6f28, 0x6f2c, 0x6f2e,
+  0x6f30, 0x6f32, 0x6f34, 0x6f35, 0x6f37, 0x6f38, 0x6f39, 0x6f3a,
+  0x6f3b, 0x6f3c, 0x6f3d, 0x6f3f, 0x6f40, 0x6f41, 0x6f42, 0x6f43,
+  0x6f44, 0x6f45, 0x6f48, 0x6f49, 0x6f4a, 0x6f4c, 0x6f4e, 0x6f4f,
+  0x6f50, 0x6f51, 0x6f52, 0x6f53, 0x6f54, 0x6f55, 0x6f56, 0x6f57,
+  0x6f59, 0x6f5a, 0x6f5b, 0x6f5d, 0x6f5f, 0x6f60, 0x6f61, 0x6f63,
+  0x6f64, 0x6f65, 0x6f67, 0x6f68, 0x6f69, 0x6f6a, 0x6f6b, 0x6f6c,
+  0x6f6f, 0x6f70, 0x6f71, 0x6f73, 0x6f75, 0x6f76, 0x6f77, 0x6f79,
+  0x6f7b, 0x6f7d, 0x6f7e, 0x6f7f, 0x6f80, 0x6f81, 0x6f82, 0x6f83,
+  0x6f85, 0x6f86, 0x6f87, 0x6f8a, 0x6f8b, 0x6f8f, 0x6f90, 0x6f91,
+  0x6f92, 0x6f93, 0x6f94, 0x6f95, 0x6f96, 0x6f97, 0x6f98, 0x6f99,
+  0x6f9a, 0x6f9b, 0x6f9d, 0x6f9e, 0x6f9f, 0x6fa0, 0x6fa2, 0x6fa3,
+  0x6fa4, 0x6fa5, 0x6fa6, 0x6fa8, 0x6fa9, 0x6faa, 0x6fab, 0x6fac,
+  0x6fad, 0x6fae, 0x6faf, 0x6fb0, 0x6fb1, 0x6fb2, 0x6fb4, 0x6fb5,
+  0x6fb7, 0x6fb8, 0x6fba, 0x6fbb, 0x6fbc, 0x6fbd, 0x6fbe, 0x6fbf,
+  0x6fc1, 0x6fc3, 0x6fc4, 0x6fc5, 0x6fc6, 0x6fc7, 0x6fc8, 0x6fca,
+  0x6fcb, 0x6fcc, 0x6fcd, 0x6fce, 0x6fcf, 0x6fd0, 0x6fd3, 0x6fd4,
+  0x6fd5, 0x6fd6, 0x6fd7, 0x6fd8, 0x6fd9, 0x6fda, 0x6fdb, 0x6fdc,
+  0x6fdd, 0x6fdf, 0x6fe2, 0x6fe3, 0x6fe4, 0x6fe5,
+  /* 0x9e */
+  0x6fe6, 0x6fe7, 0x6fe8, 0x6fe9, 0x6fea, 0x6feb, 0x6fec, 0x6fed,
+  0x6ff0, 0x6ff1, 0x6ff2, 0x6ff3, 0x6ff4, 0x6ff5, 0x6ff6, 0x6ff7,
+  0x6ff8, 0x6ff9, 0x6ffa, 0x6ffb, 0x6ffc, 0x6ffd, 0x6ffe, 0x6fff,
+  0x7000, 0x7001, 0x7002, 0x7003, 0x7004, 0x7005, 0x7006, 0x7007,
+  0x7008, 0x7009, 0x700a, 0x700b, 0x700c, 0x700d, 0x700e, 0x700f,
+  0x7010, 0x7012, 0x7013, 0x7014, 0x7015, 0x7016, 0x7017, 0x7018,
+  0x7019, 0x701c, 0x701d, 0x701e, 0x701f, 0x7020, 0x7021, 0x7022,
+  0x7024, 0x7025, 0x7026, 0x7027, 0x7028, 0x7029, 0x702a, 0x702b,
+  0x702c, 0x702d, 0x702e, 0x702f, 0x7030, 0x7031, 0x7032, 0x7033,
+  0x7034, 0x7036, 0x7037, 0x7038, 0x703a, 0x703b, 0x703c, 0x703d,
+  0x703e, 0x703f, 0x7040, 0x7041, 0x7042, 0x7043, 0x7044, 0x7045,
+  0x7046, 0x7047, 0x7048, 0x7049, 0x704a, 0x704b, 0x704d, 0x704e,
+  0x7050, 0x7051, 0x7052, 0x7053, 0x7054, 0x7055, 0x7056, 0x7057,
+  0x7058, 0x7059, 0x705a, 0x705b, 0x705c, 0x705d, 0x705f, 0x7060,
+  0x7061, 0x7062, 0x7063, 0x7064, 0x7065, 0x7066, 0x7067, 0x7068,
+  0x7069, 0x706a, 0x706e, 0x7071, 0x7072, 0x7073, 0x7074, 0x7077,
+  0x7079, 0x707a, 0x707b, 0x707d, 0x7081, 0x7082, 0x7083, 0x7084,
+  0x7086, 0x7087, 0x7088, 0x708b, 0x708c, 0x708d, 0x708f, 0x7090,
+  0x7091, 0x7093, 0x7097, 0x7098, 0x709a, 0x709b, 0x709e, 0x709f,
+  0x70a0, 0x70a1, 0x70a2, 0x70a3, 0x70a4, 0x70a5, 0x70a6, 0x70a7,
+  0x70a8, 0x70a9, 0x70aa, 0x70b0, 0x70b2, 0x70b4, 0x70b5, 0x70b6,
+  0x70ba, 0x70be, 0x70bf, 0x70c4, 0x70c5, 0x70c6, 0x70c7, 0x70c9,
+  0x70cb, 0x70cc, 0x70cd, 0x70ce, 0x70cf, 0x70d0, 0x70d1, 0x70d2,
+  0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d7, 0x70da,
+  /* 0x9f */
+  0x70dc, 0x70dd, 0x70de, 0x70e0, 0x70e1, 0x70e2, 0x70e3, 0x70e5,
+  0x70ea, 0x70ee, 0x70f0, 0x70f1, 0x70f2, 0x70f3, 0x70f4, 0x70f5,
+  0x70f6, 0x70f8, 0x70fa, 0x70fb, 0x70fc, 0x70fe, 0x70ff, 0x7100,
+  0x7101, 0x7102, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x7108,
+  0x710b, 0x710c, 0x710d, 0x710e, 0x710f, 0x7111, 0x7112, 0x7114,
+  0x7117, 0x711b, 0x711c, 0x711d, 0x711e, 0x711f, 0x7120, 0x7121,
+  0x7122, 0x7123, 0x7124, 0x7125, 0x7127, 0x7128, 0x7129, 0x712a,
+  0x712b, 0x712c, 0x712d, 0x712e, 0x7132, 0x7133, 0x7134, 0x7135,
+  0x7137, 0x7138, 0x7139, 0x713a, 0x713b, 0x713c, 0x713d, 0x713e,
+  0x713f, 0x7140, 0x7141, 0x7142, 0x7143, 0x7144, 0x7146, 0x7147,
+  0x7148, 0x7149, 0x714b, 0x714d, 0x714f, 0x7150, 0x7151, 0x7152,
+  0x7153, 0x7154, 0x7155, 0x7156, 0x7157, 0x7158, 0x7159, 0x715a,
+  0x715b, 0x715d, 0x715f, 0x7160, 0x7161, 0x7162, 0x7163, 0x7165,
+  0x7169, 0x716a, 0x716b, 0x716c, 0x716d, 0x716f, 0x7170, 0x7171,
+  0x7174, 0x7175, 0x7176, 0x7177, 0x7179, 0x717b, 0x717c, 0x717e,
+  0x717f, 0x7180, 0x7181, 0x7182, 0x7183, 0x7185, 0x7186, 0x7187,
+  0x7188, 0x7189, 0x718b, 0x718c, 0x718d, 0x718e, 0x7190, 0x7191,
+  0x7192, 0x7193, 0x7195, 0x7196, 0x7197, 0x719a, 0x719b, 0x719c,
+  0x719d, 0x719e, 0x71a1, 0x71a2, 0x71a3, 0x71a4, 0x71a5, 0x71a6,
+  0x71a7, 0x71a9, 0x71aa, 0x71ab, 0x71ad, 0x71ae, 0x71af, 0x71b0,
+  0x71b1, 0x71b2, 0x71b4, 0x71b6, 0x71b7, 0x71b8, 0x71ba, 0x71bb,
+  0x71bc, 0x71bd, 0x71be, 0x71bf, 0x71c0, 0x71c1, 0x71c2, 0x71c4,
+  0x71c5, 0x71c6, 0x71c7, 0x71c8, 0x71c9, 0x71ca, 0x71cb, 0x71cc,
+  0x71cd, 0x71cf, 0x71d0, 0x71d1, 0x71d2, 0x71d3,
+  /* 0xa0 */
+  0x71d6, 0x71d7, 0x71d8, 0x71d9, 0x71da, 0x71db, 0x71dc, 0x71dd,
+  0x71de, 0x71df, 0x71e1, 0x71e2, 0x71e3, 0x71e4, 0x71e6, 0x71e8,
+  0x71e9, 0x71ea, 0x71eb, 0x71ec, 0x71ed, 0x71ef, 0x71f0, 0x71f1,
+  0x71f2, 0x71f3, 0x71f4, 0x71f5, 0x71f6, 0x71f7, 0x71f8, 0x71fa,
+  0x71fb, 0x71fc, 0x71fd, 0x71fe, 0x71ff, 0x7200, 0x7201, 0x7202,
+  0x7203, 0x7204, 0x7205, 0x7207, 0x7208, 0x7209, 0x720a, 0x720b,
+  0x720c, 0x720d, 0x720e, 0x720f, 0x7210, 0x7211, 0x7212, 0x7213,
+  0x7214, 0x7215, 0x7216, 0x7217, 0x7218, 0x7219, 0x721a, 0x721b,
+  0x721c, 0x721e, 0x721f, 0x7220, 0x7221, 0x7222, 0x7223, 0x7224,
+  0x7225, 0x7226, 0x7227, 0x7229, 0x722b, 0x722d, 0x722e, 0x722f,
+  0x7232, 0x7233, 0x7234, 0x723a, 0x723c, 0x723e, 0x7240, 0x7241,
+  0x7242, 0x7243, 0x7244, 0x7245, 0x7246, 0x7249, 0x724a, 0x724b,
+  0x724e, 0x724f, 0x7250, 0x7251, 0x7253, 0x7254, 0x7255, 0x7257,
+  0x7258, 0x725a, 0x725c, 0x725e, 0x7260, 0x7263, 0x7264, 0x7265,
+  0x7268, 0x726a, 0x726b, 0x726c, 0x726d, 0x7270, 0x7271, 0x7273,
+  0x7274, 0x7276, 0x7277, 0x7278, 0x727b, 0x727c, 0x727d, 0x7282,
+  0x7283, 0x7285, 0x7286, 0x7287, 0x7288, 0x7289, 0x728c, 0x728e,
+  0x7290, 0x7291, 0x7293, 0x7294, 0x7295, 0x7296, 0x7297, 0x7298,
+  0x7299, 0x729a, 0x729b, 0x729c, 0x729d, 0x729e, 0x72a0, 0x72a1,
+  0x72a2, 0x72a3, 0x72a4, 0x72a5, 0x72a6, 0x72a7, 0x72a8, 0x72a9,
+  0x72aa, 0x72ab, 0x72ae, 0x72b1, 0x72b2, 0x72b3, 0x72b5, 0x72ba,
+  0x72bb, 0x72bc, 0x72bd, 0x72be, 0x72bf, 0x72c0, 0x72c5, 0x72c6,
+  0x72c7, 0x72c9, 0x72ca, 0x72cb, 0x72cc, 0x72cf, 0x72d1, 0x72d3,
+  0x72d4, 0x72d5, 0x72d6, 0x72d8, 0x72da, 0x72db,
+  /* 0xa1 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x3000, 0x3001, 0x3002, 0x00b7, 0x02c9, 0x02c7, 0x00a8, 0x3003,
+  0x3005, 0x2014, 0xff5e, 0x2016, 0x2026, 0x2018, 0x2019, 0x201c,
+  0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c,
+  0x300d, 0x300e, 0x300f, 0x3016, 0x3017, 0x3010, 0x3011, 0x00b1,
+  0x00d7, 0x00f7, 0x2236, 0x2227, 0x2228, 0x2211, 0x220f, 0x222a,
+  0x2229, 0x2208, 0x2237, 0x221a, 0x22a5, 0x2225, 0x2220, 0x2312,
+  0x2299, 0x222b, 0x222e, 0x2261, 0x224c, 0x2248, 0x223d, 0x221d,
+  0x2260, 0x226e, 0x226f, 0x2264, 0x2265, 0x221e, 0x2235, 0x2234,
+  0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xff04, 0x00a4,
+  0xffe0, 0xffe1, 0x2030, 0x00a7, 0x2116, 0x2606, 0x2605, 0x25cb,
+  0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2,
+  0x203b, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,
+  /* 0xa2 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+  0x2178, 0x2179, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f,
+  0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497,
+  0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476, 0x2477,
+  0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f,
+  0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487,
+  0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
+  0x2468, 0x2469, 0xfffd, 0xfffd, 0x3220, 0x3221, 0x3222, 0x3223,
+  0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0xfffd, 0xfffd,
+  0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167,
+  0x2168, 0x2169, 0x216a, 0x216b, 0xfffd, 0xfffd,
+  /* 0xa3 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07, 0xff08,
+  0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10,
+  0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
+  0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20,
+  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, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, 0xff40,
+  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, 0xff5b, 0xff5c, 0xff5d, 0xffe3,
+  /* 0xa4 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
+  0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
+  0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
+  0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
+  0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
+  0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
+  0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
+  0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
+  0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
+  0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
+  0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa5 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
+  0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
+  0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
+  0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
+  0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
+  0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
+  0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
+  0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
+  0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
+  0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
+  0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa6 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
+  0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
+  0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
+  0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
+  0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfe35,
+  0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e, 0xfe41,
+  0xfe42, 0xfe43, 0xfe44, 0xfffd, 0xfffd, 0xfe3b, 0xfe3c, 0xfe37,
+  0xfe38, 0xfe31, 0xfffd, 0xfe33, 0xfe34, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa7 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa8 */
+  0x02ca, 0x02cb, 0x02d9, 0x2013, 0x2015, 0x2025, 0x2035, 0x2105,
+  0x2109, 0x2196, 0x2197, 0x2198, 0x2199, 0x2215, 0x221f, 0x2223,
+  0x2252, 0x2266, 0x2267, 0x22bf, 0x2550, 0x2551, 0x2552, 0x2553,
+  0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b,
+  0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x2562, 0x2563,
+  0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b,
+  0x256c, 0x256d, 0x256e, 0x256f, 0x2570, 0x2571, 0x2572, 0x2573,
+  0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, 0x2588,
+  0x2589, 0x258a, 0x258b, 0x258c, 0x258d, 0x258e, 0x258f, 0x2593,
+  0x2594, 0x2595, 0x25bc, 0x25bd, 0x25e2, 0x25e3, 0x25e4, 0x25e5,
+  0x2609, 0x2295, 0x3012, 0x301d, 0x301e, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b, 0x00e8,
+  0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2, 0x00f2,
+  0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da, 0x01dc,
+  0x00fc, 0x00ea, 0x0251, 0xfffd, 0x0144, 0x0148, 0xfffd, 0x0261,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x3105, 0x3106, 0x3107, 0x3108,
+  0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, 0x3110,
+  0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118,
+  0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120,
+  0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128,
+  0x3129, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xa9 */
+  0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028,
+  0x3029, 0x32a3, 0x338e, 0x338f, 0x339c, 0x339d, 0x339e, 0x33a1,
+  0x33c4, 0x33ce, 0x33d1, 0x33d2, 0x33d5, 0xfe30, 0xffe2, 0xffe4,
+  0xfffd, 0x2121, 0x3231, 0xfffd, 0x2010, 0xfffd, 0xfffd, 0xfffd,
+  0x30fc, 0x309b, 0x309c, 0x30fd, 0x30fe, 0x3006, 0x309d, 0x309e,
+  0xfe49, 0xfe4a, 0xfe4b, 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50,
+  0xfe51, 0xfe52, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe59, 0xfe5a,
+  0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfe62,
+  0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe68, 0xfe69, 0xfe6a, 0xfe6b,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x3007, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0x2500, 0x2501, 0x2502, 0x2503, 0x2504,
+  0x2505, 0x2506, 0x2507, 0x2508, 0x2509, 0x250a, 0x250b, 0x250c,
+  0x250d, 0x250e, 0x250f, 0x2510, 0x2511, 0x2512, 0x2513, 0x2514,
+  0x2515, 0x2516, 0x2517, 0x2518, 0x2519, 0x251a, 0x251b, 0x251c,
+  0x251d, 0x251e, 0x251f, 0x2520, 0x2521, 0x2522, 0x2523, 0x2524,
+  0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a, 0x252b, 0x252c,
+  0x252d, 0x252e, 0x252f, 0x2530, 0x2531, 0x2532, 0x2533, 0x2534,
+  0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x253a, 0x253b, 0x253c,
+  0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542, 0x2543, 0x2544,
+  0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x254b, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xaa */
+  0x72dc, 0x72dd, 0x72df, 0x72e2, 0x72e3, 0x72e4, 0x72e5, 0x72e6,
+  0x72e7, 0x72ea, 0x72eb, 0x72f5, 0x72f6, 0x72f9, 0x72fd, 0x72fe,
+  0x72ff, 0x7300, 0x7302, 0x7304, 0x7305, 0x7306, 0x7307, 0x7308,
+  0x7309, 0x730b, 0x730c, 0x730d, 0x730f, 0x7310, 0x7311, 0x7312,
+  0x7314, 0x7318, 0x7319, 0x731a, 0x731f, 0x7320, 0x7323, 0x7324,
+  0x7326, 0x7327, 0x7328, 0x732d, 0x732f, 0x7330, 0x7332, 0x7333,
+  0x7335, 0x7336, 0x733a, 0x733b, 0x733c, 0x733d, 0x7340, 0x7341,
+  0x7342, 0x7343, 0x7344, 0x7345, 0x7346, 0x7347, 0x7348, 0x7349,
+  0x734a, 0x734b, 0x734c, 0x734e, 0x734f, 0x7351, 0x7353, 0x7354,
+  0x7355, 0x7356, 0x7358, 0x7359, 0x735a, 0x735b, 0x735c, 0x735d,
+  0x735e, 0x735f, 0x7361, 0x7362, 0x7363, 0x7364, 0x7365, 0x7366,
+  0x7367, 0x7368, 0x7369, 0x736a, 0x736b, 0x736e, 0x7370, 0x7371,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xab */
+  0x7372, 0x7373, 0x7374, 0x7375, 0x7376, 0x7377, 0x7378, 0x7379,
+  0x737a, 0x737b, 0x737c, 0x737d, 0x737f, 0x7380, 0x7381, 0x7382,
+  0x7383, 0x7385, 0x7386, 0x7388, 0x738a, 0x738c, 0x738d, 0x738f,
+  0x7390, 0x7392, 0x7393, 0x7394, 0x7395, 0x7397, 0x7398, 0x7399,
+  0x739a, 0x739c, 0x739d, 0x739e, 0x73a0, 0x73a1, 0x73a3, 0x73a4,
+  0x73a5, 0x73a6, 0x73a7, 0x73a8, 0x73aa, 0x73ac, 0x73ad, 0x73b1,
+  0x73b4, 0x73b5, 0x73b6, 0x73b8, 0x73b9, 0x73bc, 0x73bd, 0x73be,
+  0x73bf, 0x73c1, 0x73c3, 0x73c4, 0x73c5, 0x73c6, 0x73c7, 0x73cb,
+  0x73cc, 0x73ce, 0x73d2, 0x73d3, 0x73d4, 0x73d5, 0x73d6, 0x73d7,
+  0x73d8, 0x73da, 0x73db, 0x73dc, 0x73dd, 0x73df, 0x73e1, 0x73e2,
+  0x73e3, 0x73e4, 0x73e6, 0x73e8, 0x73ea, 0x73eb, 0x73ec, 0x73ee,
+  0x73ef, 0x73f0, 0x73f1, 0x73f3, 0x73f4, 0x73f5, 0x73f6, 0x73f7,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xac */
+  0x73f8, 0x73f9, 0x73fa, 0x73fb, 0x73fc, 0x73fd, 0x73fe, 0x73ff,
+  0x7400, 0x7401, 0x7402, 0x7404, 0x7407, 0x7408, 0x740b, 0x740c,
+  0x740d, 0x740e, 0x7411, 0x7412, 0x7413, 0x7414, 0x7415, 0x7416,
+  0x7417, 0x7418, 0x7419, 0x741c, 0x741d, 0x741e, 0x741f, 0x7420,
+  0x7421, 0x7423, 0x7424, 0x7427, 0x7429, 0x742b, 0x742d, 0x742f,
+  0x7431, 0x7432, 0x7437, 0x7438, 0x7439, 0x743a, 0x743b, 0x743d,
+  0x743e, 0x743f, 0x7440, 0x7442, 0x7443, 0x7444, 0x7445, 0x7446,
+  0x7447, 0x7448, 0x7449, 0x744a, 0x744b, 0x744c, 0x744d, 0x744e,
+  0x744f, 0x7450, 0x7451, 0x7452, 0x7453, 0x7454, 0x7456, 0x7458,
+  0x745d, 0x7460, 0x7461, 0x7462, 0x7463, 0x7464, 0x7465, 0x7466,
+  0x7467, 0x7468, 0x7469, 0x746a, 0x746b, 0x746c, 0x746e, 0x746f,
+  0x7471, 0x7472, 0x7473, 0x7474, 0x7475, 0x7478, 0x7479, 0x747a,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xad */
+  0x747b, 0x747c, 0x747d, 0x747f, 0x7482, 0x7484, 0x7485, 0x7486,
+  0x7488, 0x7489, 0x748a, 0x748c, 0x748d, 0x748f, 0x7491, 0x7492,
+  0x7493, 0x7494, 0x7495, 0x7496, 0x7497, 0x7498, 0x7499, 0x749a,
+  0x749b, 0x749d, 0x749f, 0x74a0, 0x74a1, 0x74a2, 0x74a3, 0x74a4,
+  0x74a5, 0x74a6, 0x74aa, 0x74ab, 0x74ac, 0x74ad, 0x74ae, 0x74af,
+  0x74b0, 0x74b1, 0x74b2, 0x74b3, 0x74b4, 0x74b5, 0x74b6, 0x74b7,
+  0x74b8, 0x74b9, 0x74bb, 0x74bc, 0x74bd, 0x74be, 0x74bf, 0x74c0,
+  0x74c1, 0x74c2, 0x74c3, 0x74c4, 0x74c5, 0x74c6, 0x74c7, 0x74c8,
+  0x74c9, 0x74ca, 0x74cb, 0x74cc, 0x74cd, 0x74ce, 0x74cf, 0x74d0,
+  0x74d1, 0x74d3, 0x74d4, 0x74d5, 0x74d6, 0x74d7, 0x74d8, 0x74d9,
+  0x74da, 0x74db, 0x74dd, 0x74df, 0x74e1, 0x74e5, 0x74e7, 0x74e8,
+  0x74e9, 0x74ea, 0x74eb, 0x74ec, 0x74ed, 0x74f0, 0x74f1, 0x74f2,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xae */
+  0x74f3, 0x74f5, 0x74f8, 0x74f9, 0x74fa, 0x74fb, 0x74fc, 0x74fd,
+  0x74fe, 0x7500, 0x7501, 0x7502, 0x7503, 0x7505, 0x7506, 0x7507,
+  0x7508, 0x7509, 0x750a, 0x750b, 0x750c, 0x750e, 0x7510, 0x7512,
+  0x7514, 0x7515, 0x7516, 0x7517, 0x751b, 0x751d, 0x751e, 0x7520,
+  0x7521, 0x7522, 0x7523, 0x7524, 0x7526, 0x7527, 0x752a, 0x752e,
+  0x7534, 0x7536, 0x7539, 0x753c, 0x753d, 0x753f, 0x7541, 0x7542,
+  0x7543, 0x7544, 0x7546, 0x7547, 0x7549, 0x754a, 0x754d, 0x7550,
+  0x7551, 0x7552, 0x7553, 0x7555, 0x7556, 0x7557, 0x7558, 0x755d,
+  0x755e, 0x755f, 0x7560, 0x7561, 0x7562, 0x7563, 0x7564, 0x7567,
+  0x7568, 0x7569, 0x756b, 0x756c, 0x756d, 0x756e, 0x756f, 0x7570,
+  0x7571, 0x7573, 0x7575, 0x7576, 0x7577, 0x757a, 0x757b, 0x757c,
+  0x757d, 0x757e, 0x7580, 0x7581, 0x7582, 0x7584, 0x7585, 0x7587,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xaf */
+  0x7588, 0x7589, 0x758a, 0x758c, 0x758d, 0x758e, 0x7590, 0x7593,
+  0x7595, 0x7598, 0x759b, 0x759c, 0x759e, 0x75a2, 0x75a6, 0x75a7,
+  0x75a8, 0x75a9, 0x75aa, 0x75ad, 0x75b6, 0x75b7, 0x75ba, 0x75bb,
+  0x75bf, 0x75c0, 0x75c1, 0x75c6, 0x75cb, 0x75cc, 0x75ce, 0x75cf,
+  0x75d0, 0x75d1, 0x75d3, 0x75d7, 0x75d9, 0x75da, 0x75dc, 0x75dd,
+  0x75df, 0x75e0, 0x75e1, 0x75e5, 0x75e9, 0x75ec, 0x75ed, 0x75ee,
+  0x75ef, 0x75f2, 0x75f3, 0x75f5, 0x75f6, 0x75f7, 0x75f8, 0x75fa,
+  0x75fb, 0x75fd, 0x75fe, 0x7602, 0x7604, 0x7606, 0x7607, 0x7608,
+  0x7609, 0x760b, 0x760d, 0x760e, 0x760f, 0x7611, 0x7612, 0x7613,
+  0x7614, 0x7616, 0x761a, 0x761c, 0x761d, 0x761e, 0x7621, 0x7623,
+  0x7627, 0x7628, 0x762c, 0x762e, 0x762f, 0x7631, 0x7632, 0x7636,
+  0x7637, 0x7639, 0x763a, 0x763b, 0x763d, 0x7641, 0x7642, 0x7644,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xb0 */
+  0x7645, 0x7646, 0x7647, 0x7648, 0x7649, 0x764a, 0x764b, 0x764e,
+  0x764f, 0x7650, 0x7651, 0x7652, 0x7653, 0x7655, 0x7657, 0x7658,
+  0x7659, 0x765a, 0x765b, 0x765d, 0x765f, 0x7660, 0x7661, 0x7662,
+  0x7664, 0x7665, 0x7666, 0x7667, 0x7668, 0x7669, 0x766a, 0x766c,
+  0x766d, 0x766e, 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x7675,
+  0x7676, 0x7677, 0x7679, 0x767a, 0x767c, 0x767f, 0x7680, 0x7681,
+  0x7683, 0x7685, 0x7689, 0x768a, 0x768c, 0x768d, 0x768f, 0x7690,
+  0x7692, 0x7694, 0x7695, 0x7697, 0x7698, 0x769a, 0x769b, 0x769c,
+  0x769d, 0x769e, 0x769f, 0x76a0, 0x76a1, 0x76a2, 0x76a3, 0x76a5,
+  0x76a6, 0x76a7, 0x76a8, 0x76a9, 0x76aa, 0x76ab, 0x76ac, 0x76ad,
+  0x76af, 0x76b0, 0x76b3, 0x76b5, 0x76b6, 0x76b7, 0x76b8, 0x76b9,
+  0x76ba, 0x76bb, 0x76bc, 0x76bd, 0x76be, 0x76c0, 0x76c1, 0x76c3,
+  0x554a, 0x963f, 0x57c3, 0x6328, 0x54ce, 0x5509, 0x54c0, 0x7691,
+  0x764c, 0x853c, 0x77ee, 0x827e, 0x788d, 0x7231, 0x9698, 0x978d,
+  0x6c28, 0x5b89, 0x4ffa, 0x6309, 0x6697, 0x5cb8, 0x80fa, 0x6848,
+  0x80ae, 0x6602, 0x76ce, 0x51f9, 0x6556, 0x71ac, 0x7ff1, 0x8884,
+  0x50b2, 0x5965, 0x61ca, 0x6fb3, 0x82ad, 0x634c, 0x6252, 0x53ed,
+  0x5427, 0x7b06, 0x516b, 0x75a4, 0x5df4, 0x62d4, 0x8dcb, 0x9776,
+  0x628a, 0x8019, 0x575d, 0x9738, 0x7f62, 0x7238, 0x767d, 0x67cf,
+  0x767e, 0x6446, 0x4f70, 0x8d25, 0x62dc, 0x7a17, 0x6591, 0x73ed,
+  0x642c, 0x6273, 0x822c, 0x9881, 0x677f, 0x7248, 0x626e, 0x62cc,
+  0x4f34, 0x74e3, 0x534a, 0x529e, 0x7eca, 0x90a6, 0x5e2e, 0x6886,
+  0x699c, 0x8180, 0x7ed1, 0x68d2, 0x78c5, 0x868c, 0x9551, 0x508d,
+  0x8c24, 0x82de, 0x80de, 0x5305, 0x8912, 0x5265,
+  /* 0xb1 */
+  0x76c4, 0x76c7, 0x76c9, 0x76cb, 0x76cc, 0x76d3, 0x76d5, 0x76d9,
+  0x76da, 0x76dc, 0x76dd, 0x76de, 0x76e0, 0x76e1, 0x76e2, 0x76e3,
+  0x76e4, 0x76e6, 0x76e7, 0x76e8, 0x76e9, 0x76ea, 0x76eb, 0x76ec,
+  0x76ed, 0x76f0, 0x76f3, 0x76f5, 0x76f6, 0x76f7, 0x76fa, 0x76fb,
+  0x76fd, 0x76ff, 0x7700, 0x7702, 0x7703, 0x7705, 0x7706, 0x770a,
+  0x770c, 0x770e, 0x770f, 0x7710, 0x7711, 0x7712, 0x7713, 0x7714,
+  0x7715, 0x7716, 0x7717, 0x7718, 0x771b, 0x771c, 0x771d, 0x771e,
+  0x7721, 0x7723, 0x7724, 0x7725, 0x7727, 0x772a, 0x772b, 0x772c,
+  0x772e, 0x7730, 0x7731, 0x7732, 0x7733, 0x7734, 0x7739, 0x773b,
+  0x773d, 0x773e, 0x773f, 0x7742, 0x7744, 0x7745, 0x7746, 0x7748,
+  0x7749, 0x774a, 0x774b, 0x774c, 0x774d, 0x774e, 0x774f, 0x7752,
+  0x7753, 0x7754, 0x7755, 0x7756, 0x7757, 0x7758, 0x7759, 0x775c,
+  0x8584, 0x96f9, 0x4fdd, 0x5821, 0x9971, 0x5b9d, 0x62b1, 0x62a5,
+  0x66b4, 0x8c79, 0x9c8d, 0x7206, 0x676f, 0x7891, 0x60b2, 0x5351,
+  0x5317, 0x8f88, 0x80cc, 0x8d1d, 0x94a1, 0x500d, 0x72c8, 0x5907,
+  0x60eb, 0x7119, 0x88ab, 0x5954, 0x82ef, 0x672c, 0x7b28, 0x5d29,
+  0x7ef7, 0x752d, 0x6cf5, 0x8e66, 0x8ff8, 0x903c, 0x9f3b, 0x6bd4,
+  0x9119, 0x7b14, 0x5f7c, 0x78a7, 0x84d6, 0x853d, 0x6bd5, 0x6bd9,
+  0x6bd6, 0x5e01, 0x5e87, 0x75f9, 0x95ed, 0x655d, 0x5f0a, 0x5fc5,
+  0x8f9f, 0x58c1, 0x81c2, 0x907f, 0x965b, 0x97ad, 0x8fb9, 0x7f16,
+  0x8d2c, 0x6241, 0x4fbf, 0x53d8, 0x535e, 0x8fa8, 0x8fa9, 0x8fab,
+  0x904d, 0x6807, 0x5f6a, 0x8198, 0x8868, 0x9cd6, 0x618b, 0x522b,
+  0x762a, 0x5f6c, 0x658c, 0x6fd2, 0x6ee8, 0x5bbe, 0x6448, 0x5175,
+  0x51b0, 0x67c4, 0x4e19, 0x79c9, 0x997c, 0x70b3,
+  /* 0xb2 */
+  0x775d, 0x775e, 0x775f, 0x7760, 0x7764, 0x7767, 0x7769, 0x776a,
+  0x776d, 0x776e, 0x776f, 0x7770, 0x7771, 0x7772, 0x7773, 0x7774,
+  0x7775, 0x7776, 0x7777, 0x7778, 0x777a, 0x777b, 0x777c, 0x7781,
+  0x7782, 0x7783, 0x7786, 0x7787, 0x7788, 0x7789, 0x778a, 0x778b,
+  0x778f, 0x7790, 0x7793, 0x7794, 0x7795, 0x7796, 0x7797, 0x7798,
+  0x7799, 0x779a, 0x779b, 0x779c, 0x779d, 0x779e, 0x77a1, 0x77a3,
+  0x77a4, 0x77a6, 0x77a8, 0x77ab, 0x77ad, 0x77ae, 0x77af, 0x77b1,
+  0x77b2, 0x77b4, 0x77b6, 0x77b7, 0x77b8, 0x77b9, 0x77ba, 0x77bc,
+  0x77be, 0x77c0, 0x77c1, 0x77c2, 0x77c3, 0x77c4, 0x77c5, 0x77c6,
+  0x77c7, 0x77c8, 0x77c9, 0x77ca, 0x77cb, 0x77cc, 0x77ce, 0x77cf,
+  0x77d0, 0x77d1, 0x77d2, 0x77d3, 0x77d4, 0x77d5, 0x77d6, 0x77d8,
+  0x77d9, 0x77da, 0x77dd, 0x77de, 0x77df, 0x77e0, 0x77e1, 0x77e4,
+  0x75c5, 0x5e76, 0x73bb, 0x83e0, 0x64ad, 0x62e8, 0x94b5, 0x6ce2,
+  0x535a, 0x52c3, 0x640f, 0x94c2, 0x7b94, 0x4f2f, 0x5e1b, 0x8236,
+  0x8116, 0x818a, 0x6e24, 0x6cca, 0x9a73, 0x6355, 0x535c, 0x54fa,
+  0x8865, 0x57e0, 0x4e0d, 0x5e03, 0x6b65, 0x7c3f, 0x90e8, 0x6016,
+  0x64e6, 0x731c, 0x88c1, 0x6750, 0x624d, 0x8d22, 0x776c, 0x8e29,
+  0x91c7, 0x5f69, 0x83dc, 0x8521, 0x9910, 0x53c2, 0x8695, 0x6b8b,
+  0x60ed, 0x60e8, 0x707f, 0x82cd, 0x8231, 0x4ed3, 0x6ca7, 0x85cf,
+  0x64cd, 0x7cd9, 0x69fd, 0x66f9, 0x8349, 0x5395, 0x7b56, 0x4fa7,
+  0x518c, 0x6d4b, 0x5c42, 0x8e6d, 0x63d2, 0x53c9, 0x832c, 0x8336,
+  0x67e5, 0x78b4, 0x643d, 0x5bdf, 0x5c94, 0x5dee, 0x8be7, 0x62c6,
+  0x67f4, 0x8c7a, 0x6400, 0x63ba, 0x8749, 0x998b, 0x8c17, 0x7f20,
+  0x94f2, 0x4ea7, 0x9610, 0x98a4, 0x660c, 0x7316,
+  /* 0xb3 */
+  0x77e6, 0x77e8, 0x77ea, 0x77ef, 0x77f0, 0x77f1, 0x77f2, 0x77f4,
+  0x77f5, 0x77f7, 0x77f9, 0x77fa, 0x77fb, 0x77fc, 0x7803, 0x7804,
+  0x7805, 0x7806, 0x7807, 0x7808, 0x780a, 0x780b, 0x780e, 0x780f,
+  0x7810, 0x7813, 0x7815, 0x7819, 0x781b, 0x781e, 0x7820, 0x7821,
+  0x7822, 0x7824, 0x7828, 0x782a, 0x782b, 0x782e, 0x782f, 0x7831,
+  0x7832, 0x7833, 0x7835, 0x7836, 0x783d, 0x783f, 0x7841, 0x7842,
+  0x7843, 0x7844, 0x7846, 0x7848, 0x7849, 0x784a, 0x784b, 0x784d,
+  0x784f, 0x7851, 0x7853, 0x7854, 0x7858, 0x7859, 0x785a, 0x785b,
+  0x785c, 0x785e, 0x785f, 0x7860, 0x7861, 0x7862, 0x7863, 0x7864,
+  0x7865, 0x7866, 0x7867, 0x7868, 0x7869, 0x786f, 0x7870, 0x7871,
+  0x7872, 0x7873, 0x7874, 0x7875, 0x7876, 0x7878, 0x7879, 0x787a,
+  0x787b, 0x787d, 0x787e, 0x787f, 0x7880, 0x7881, 0x7882, 0x7883,
+  0x573a, 0x5c1d, 0x5e38, 0x957f, 0x507f, 0x80a0, 0x5382, 0x655e,
+  0x7545, 0x5531, 0x5021, 0x8d85, 0x6284, 0x949e, 0x671d, 0x5632,
+  0x6f6e, 0x5de2, 0x5435, 0x7092, 0x8f66, 0x626f, 0x64a4, 0x63a3,
+  0x5f7b, 0x6f88, 0x90f4, 0x81e3, 0x8fb0, 0x5c18, 0x6668, 0x5ff1,
+  0x6c89, 0x9648, 0x8d81, 0x886c, 0x6491, 0x79f0, 0x57ce, 0x6a59,
+  0x6210, 0x5448, 0x4e58, 0x7a0b, 0x60e9, 0x6f84, 0x8bda, 0x627f,
+  0x901e, 0x9a8b, 0x79e4, 0x5403, 0x75f4, 0x6301, 0x5319, 0x6c60,
+  0x8fdf, 0x5f1b, 0x9a70, 0x803b, 0x9f7f, 0x4f88, 0x5c3a, 0x8d64,
+  0x7fc5, 0x65a5, 0x70bd, 0x5145, 0x51b2, 0x866b, 0x5d07, 0x5ba0,
+  0x62bd, 0x916c, 0x7574, 0x8e0c, 0x7a20, 0x6101, 0x7b79, 0x4ec7,
+  0x7ef8, 0x7785, 0x4e11, 0x81ed, 0x521d, 0x51fa, 0x6a71, 0x53a8,
+  0x8e87, 0x9504, 0x96cf, 0x6ec1, 0x9664, 0x695a,
+  /* 0xb4 */
+  0x7884, 0x7885, 0x7886, 0x7888, 0x788a, 0x788b, 0x788f, 0x7890,
+  0x7892, 0x7894, 0x7895, 0x7896, 0x7899, 0x789d, 0x789e, 0x78a0,
+  0x78a2, 0x78a4, 0x78a6, 0x78a8, 0x78a9, 0x78aa, 0x78ab, 0x78ac,
+  0x78ad, 0x78ae, 0x78af, 0x78b5, 0x78b6, 0x78b7, 0x78b8, 0x78ba,
+  0x78bb, 0x78bc, 0x78bd, 0x78bf, 0x78c0, 0x78c2, 0x78c3, 0x78c4,
+  0x78c6, 0x78c7, 0x78c8, 0x78cc, 0x78cd, 0x78ce, 0x78cf, 0x78d1,
+  0x78d2, 0x78d3, 0x78d6, 0x78d7, 0x78d8, 0x78da, 0x78db, 0x78dc,
+  0x78dd, 0x78de, 0x78df, 0x78e0, 0x78e1, 0x78e2, 0x78e3, 0x78e4,
+  0x78e5, 0x78e6, 0x78e7, 0x78e9, 0x78ea, 0x78eb, 0x78ed, 0x78ee,
+  0x78ef, 0x78f0, 0x78f1, 0x78f3, 0x78f5, 0x78f6, 0x78f8, 0x78f9,
+  0x78fb, 0x78fc, 0x78fd, 0x78fe, 0x78ff, 0x7900, 0x7902, 0x7903,
+  0x7904, 0x7906, 0x7907, 0x7908, 0x7909, 0x790a, 0x790b, 0x790c,
+  0x7840, 0x50a8, 0x77d7, 0x6410, 0x89e6, 0x5904, 0x63e3, 0x5ddd,
+  0x7a7f, 0x693d, 0x4f20, 0x8239, 0x5598, 0x4e32, 0x75ae, 0x7a97,
+  0x5e62, 0x5e8a, 0x95ef, 0x521b, 0x5439, 0x708a, 0x6376, 0x9524,
+  0x5782, 0x6625, 0x693f, 0x9187, 0x5507, 0x6df3, 0x7eaf, 0x8822,
+  0x6233, 0x7ef0, 0x75b5, 0x8328, 0x78c1, 0x96cc, 0x8f9e, 0x6148,
+  0x74f7, 0x8bcd, 0x6b64, 0x523a, 0x8d50, 0x6b21, 0x806a, 0x8471,
+  0x56f1, 0x5306, 0x4ece, 0x4e1b, 0x51d1, 0x7c97, 0x918b, 0x7c07,
+  0x4fc3, 0x8e7f, 0x7be1, 0x7a9c, 0x6467, 0x5d14, 0x50ac, 0x8106,
+  0x7601, 0x7cb9, 0x6dec, 0x7fe0, 0x6751, 0x5b58, 0x5bf8, 0x78cb,
+  0x64ae, 0x6413, 0x63aa, 0x632b, 0x9519, 0x642d, 0x8fbe, 0x7b54,
+  0x7629, 0x6253, 0x5927, 0x5446, 0x6b79, 0x50a3, 0x6234, 0x5e26,
+  0x6b86, 0x4ee3, 0x8d37, 0x888b, 0x5f85, 0x902e,
+  /* 0xb5 */
+  0x790d, 0x790e, 0x790f, 0x7910, 0x7911, 0x7912, 0x7914, 0x7915,
+  0x7916, 0x7917, 0x7918, 0x7919, 0x791a, 0x791b, 0x791c, 0x791d,
+  0x791f, 0x7920, 0x7921, 0x7922, 0x7923, 0x7925, 0x7926, 0x7927,
+  0x7928, 0x7929, 0x792a, 0x792b, 0x792c, 0x792d, 0x792e, 0x792f,
+  0x7930, 0x7931, 0x7932, 0x7933, 0x7935, 0x7936, 0x7937, 0x7938,
+  0x7939, 0x793d, 0x793f, 0x7942, 0x7943, 0x7944, 0x7945, 0x7947,
+  0x794a, 0x794b, 0x794c, 0x794d, 0x794e, 0x794f, 0x7950, 0x7951,
+  0x7952, 0x7954, 0x7955, 0x7958, 0x7959, 0x7961, 0x7963, 0x7964,
+  0x7966, 0x7969, 0x796a, 0x796b, 0x796c, 0x796e, 0x7970, 0x7971,
+  0x7972, 0x7973, 0x7974, 0x7975, 0x7976, 0x7979, 0x797b, 0x797c,
+  0x797d, 0x797e, 0x797f, 0x7982, 0x7983, 0x7986, 0x7987, 0x7988,
+  0x7989, 0x798b, 0x798c, 0x798d, 0x798e, 0x7990, 0x7991, 0x7992,
+  0x6020, 0x803d, 0x62c5, 0x4e39, 0x5355, 0x90f8, 0x63b8, 0x80c6,
+  0x65e6, 0x6c2e, 0x4f46, 0x60ee, 0x6de1, 0x8bde, 0x5f39, 0x86cb,
+  0x5f53, 0x6321, 0x515a, 0x8361, 0x6863, 0x5200, 0x6363, 0x8e48,
+  0x5012, 0x5c9b, 0x7977, 0x5bfc, 0x5230, 0x7a3b, 0x60bc, 0x9053,
+  0x76d7, 0x5fb7, 0x5f97, 0x7684, 0x8e6c, 0x706f, 0x767b, 0x7b49,
+  0x77aa, 0x51f3, 0x9093, 0x5824, 0x4f4e, 0x6ef4, 0x8fea, 0x654c,
+  0x7b1b, 0x72c4, 0x6da4, 0x7fdf, 0x5ae1, 0x62b5, 0x5e95, 0x5730,
+  0x8482, 0x7b2c, 0x5e1d, 0x5f1f, 0x9012, 0x7f14, 0x98a0, 0x6382,
+  0x6ec7, 0x7898, 0x70b9, 0x5178, 0x975b, 0x57ab, 0x7535, 0x4f43,
+  0x7538, 0x5e97, 0x60e6, 0x5960, 0x6dc0, 0x6bbf, 0x7889, 0x53fc,
+  0x96d5, 0x51cb, 0x5201, 0x6389, 0x540a, 0x9493, 0x8c03, 0x8dcc,
+  0x7239, 0x789f, 0x8776, 0x8fed, 0x8c0d, 0x53e0,
+  /* 0xb6 */
+  0x7993, 0x7994, 0x7995, 0x7996, 0x7997, 0x7998, 0x7999, 0x799b,
+  0x799c, 0x799d, 0x799e, 0x799f, 0x79a0, 0x79a1, 0x79a2, 0x79a3,
+  0x79a4, 0x79a5, 0x79a6, 0x79a8, 0x79a9, 0x79aa, 0x79ab, 0x79ac,
+  0x79ad, 0x79ae, 0x79af, 0x79b0, 0x79b1, 0x79b2, 0x79b4, 0x79b5,
+  0x79b6, 0x79b7, 0x79b8, 0x79bc, 0x79bf, 0x79c2, 0x79c4, 0x79c5,
+  0x79c7, 0x79c8, 0x79ca, 0x79cc, 0x79ce, 0x79cf, 0x79d0, 0x79d3,
+  0x79d4, 0x79d6, 0x79d7, 0x79d9, 0x79da, 0x79db, 0x79dc, 0x79dd,
+  0x79de, 0x79e0, 0x79e1, 0x79e2, 0x79e5, 0x79e8, 0x79ea, 0x79ec,
+  0x79ee, 0x79f1, 0x79f2, 0x79f3, 0x79f4, 0x79f5, 0x79f6, 0x79f7,
+  0x79f9, 0x79fa, 0x79fc, 0x79fe, 0x79ff, 0x7a01, 0x7a04, 0x7a05,
+  0x7a07, 0x7a08, 0x7a09, 0x7a0a, 0x7a0c, 0x7a0f, 0x7a10, 0x7a11,
+  0x7a12, 0x7a13, 0x7a15, 0x7a16, 0x7a18, 0x7a19, 0x7a1b, 0x7a1c,
+  0x4e01, 0x76ef, 0x53ee, 0x9489, 0x9876, 0x9f0e, 0x952d, 0x5b9a,
+  0x8ba2, 0x4e22, 0x4e1c, 0x51ac, 0x8463, 0x61c2, 0x52a8, 0x680b,
+  0x4f97, 0x606b, 0x51bb, 0x6d1e, 0x515c, 0x6296, 0x6597, 0x9661,
+  0x8c46, 0x9017, 0x75d8, 0x90fd, 0x7763, 0x6bd2, 0x728a, 0x72ec,
+  0x8bfb, 0x5835, 0x7779, 0x8d4c, 0x675c, 0x9540, 0x809a, 0x5ea6,
+  0x6e21, 0x5992, 0x7aef, 0x77ed, 0x953b, 0x6bb5, 0x65ad, 0x7f0e,
+  0x5806, 0x5151, 0x961f, 0x5bf9, 0x58a9, 0x5428, 0x8e72, 0x6566,
+  0x987f, 0x56e4, 0x949d, 0x76fe, 0x9041, 0x6387, 0x54c6, 0x591a,
+  0x593a, 0x579b, 0x8eb2, 0x6735, 0x8dfa, 0x8235, 0x5241, 0x60f0,
+  0x5815, 0x86fe, 0x5ce8, 0x9e45, 0x4fc4, 0x989d, 0x8bb9, 0x5a25,
+  0x6076, 0x5384, 0x627c, 0x904f, 0x9102, 0x997f, 0x6069, 0x800c,
+  0x513f, 0x8033, 0x5c14, 0x9975, 0x6d31, 0x4e8c,
+  /* 0xb7 */
+  0x7a1d, 0x7a1f, 0x7a21, 0x7a22, 0x7a24, 0x7a25, 0x7a26, 0x7a27,
+  0x7a28, 0x7a29, 0x7a2a, 0x7a2b, 0x7a2c, 0x7a2d, 0x7a2e, 0x7a2f,
+  0x7a30, 0x7a31, 0x7a32, 0x7a34, 0x7a35, 0x7a36, 0x7a38, 0x7a3a,
+  0x7a3e, 0x7a40, 0x7a41, 0x7a42, 0x7a43, 0x7a44, 0x7a45, 0x7a47,
+  0x7a48, 0x7a49, 0x7a4a, 0x7a4b, 0x7a4c, 0x7a4d, 0x7a4e, 0x7a4f,
+  0x7a50, 0x7a52, 0x7a53, 0x7a54, 0x7a55, 0x7a56, 0x7a58, 0x7a59,
+  0x7a5a, 0x7a5b, 0x7a5c, 0x7a5d, 0x7a5e, 0x7a5f, 0x7a60, 0x7a61,
+  0x7a62, 0x7a63, 0x7a64, 0x7a65, 0x7a66, 0x7a67, 0x7a68, 0x7a69,
+  0x7a6a, 0x7a6b, 0x7a6c, 0x7a6d, 0x7a6e, 0x7a6f, 0x7a71, 0x7a72,
+  0x7a73, 0x7a75, 0x7a7b, 0x7a7c, 0x7a7d, 0x7a7e, 0x7a82, 0x7a85,
+  0x7a87, 0x7a89, 0x7a8a, 0x7a8b, 0x7a8c, 0x7a8e, 0x7a8f, 0x7a90,
+  0x7a93, 0x7a94, 0x7a99, 0x7a9a, 0x7a9b, 0x7a9e, 0x7aa1, 0x7aa2,
+  0x8d30, 0x53d1, 0x7f5a, 0x7b4f, 0x4f10, 0x4e4f, 0x9600, 0x6cd5,
+  0x73d0, 0x85e9, 0x5e06, 0x756a, 0x7ffb, 0x6a0a, 0x77fe, 0x9492,
+  0x7e41, 0x51e1, 0x70e6, 0x53cd, 0x8fd4, 0x8303, 0x8d29, 0x72af,
+  0x996d, 0x6cdb, 0x574a, 0x82b3, 0x65b9, 0x80aa, 0x623f, 0x9632,
+  0x59a8, 0x4eff, 0x8bbf, 0x7eba, 0x653e, 0x83f2, 0x975e, 0x5561,
+  0x98de, 0x80a5, 0x532a, 0x8bfd, 0x5420, 0x80ba, 0x5e9f, 0x6cb8,
+  0x8d39, 0x82ac, 0x915a, 0x5429, 0x6c1b, 0x5206, 0x7eb7, 0x575f,
+  0x711a, 0x6c7e, 0x7c89, 0x594b, 0x4efd, 0x5fff, 0x6124, 0x7caa,
+  0x4e30, 0x5c01, 0x67ab, 0x8702, 0x5cf0, 0x950b, 0x98ce, 0x75af,
+  0x70fd, 0x9022, 0x51af, 0x7f1d, 0x8bbd, 0x5949, 0x51e4, 0x4f5b,
+  0x5426, 0x592b, 0x6577, 0x80a4, 0x5b75, 0x6276, 0x62c2, 0x8f90,
+  0x5e45, 0x6c1f, 0x7b26, 0x4f0f, 0x4fd8, 0x670d,
+  /* 0xb8 */
+  0x7aa3, 0x7aa4, 0x7aa7, 0x7aa9, 0x7aaa, 0x7aab, 0x7aae, 0x7aaf,
+  0x7ab0, 0x7ab1, 0x7ab2, 0x7ab4, 0x7ab5, 0x7ab6, 0x7ab7, 0x7ab8,
+  0x7ab9, 0x7aba, 0x7abb, 0x7abc, 0x7abd, 0x7abe, 0x7ac0, 0x7ac1,
+  0x7ac2, 0x7ac3, 0x7ac4, 0x7ac5, 0x7ac6, 0x7ac7, 0x7ac8, 0x7ac9,
+  0x7aca, 0x7acc, 0x7acd, 0x7ace, 0x7acf, 0x7ad0, 0x7ad1, 0x7ad2,
+  0x7ad3, 0x7ad4, 0x7ad5, 0x7ad7, 0x7ad8, 0x7ada, 0x7adb, 0x7adc,
+  0x7add, 0x7ae1, 0x7ae2, 0x7ae4, 0x7ae7, 0x7ae8, 0x7ae9, 0x7aea,
+  0x7aeb, 0x7aec, 0x7aee, 0x7af0, 0x7af1, 0x7af2, 0x7af3, 0x7af4,
+  0x7af5, 0x7af6, 0x7af7, 0x7af8, 0x7afb, 0x7afc, 0x7afe, 0x7b00,
+  0x7b01, 0x7b02, 0x7b05, 0x7b07, 0x7b09, 0x7b0c, 0x7b0d, 0x7b0e,
+  0x7b10, 0x7b12, 0x7b13, 0x7b16, 0x7b17, 0x7b18, 0x7b1a, 0x7b1c,
+  0x7b1d, 0x7b1f, 0x7b21, 0x7b22, 0x7b23, 0x7b27, 0x7b29, 0x7b2d,
+  0x6d6e, 0x6daa, 0x798f, 0x88b1, 0x5f17, 0x752b, 0x629a, 0x8f85,
+  0x4fef, 0x91dc, 0x65a7, 0x812f, 0x8151, 0x5e9c, 0x8150, 0x8d74,
+  0x526f, 0x8986, 0x8d4b, 0x590d, 0x5085, 0x4ed8, 0x961c, 0x7236,
+  0x8179, 0x8d1f, 0x5bcc, 0x8ba3, 0x9644, 0x5987, 0x7f1a, 0x5490,
+  0x5676, 0x560e, 0x8be5, 0x6539, 0x6982, 0x9499, 0x76d6, 0x6e89,
+  0x5e72, 0x7518, 0x6746, 0x67d1, 0x7aff, 0x809d, 0x8d76, 0x611f,
+  0x79c6, 0x6562, 0x8d63, 0x5188, 0x521a, 0x94a2, 0x7f38, 0x809b,
+  0x7eb2, 0x5c97, 0x6e2f, 0x6760, 0x7bd9, 0x768b, 0x9ad8, 0x818f,
+  0x7f94, 0x7cd5, 0x641e, 0x9550, 0x7a3f, 0x544a, 0x54e5, 0x6b4c,
+  0x6401, 0x6208, 0x9e3d, 0x80f3, 0x7599, 0x5272, 0x9769, 0x845b,
+  0x683c, 0x86e4, 0x9601, 0x9694, 0x94ec, 0x4e2a, 0x5404, 0x7ed9,
+  0x6839, 0x8ddf, 0x8015, 0x66f4, 0x5e9a, 0x7fb9,
+  /* 0xb9 */
+  0x7b2f, 0x7b30, 0x7b32, 0x7b34, 0x7b35, 0x7b36, 0x7b37, 0x7b39,
+  0x7b3b, 0x7b3d, 0x7b3f, 0x7b40, 0x7b41, 0x7b42, 0x7b43, 0x7b44,
+  0x7b46, 0x7b48, 0x7b4a, 0x7b4d, 0x7b4e, 0x7b53, 0x7b55, 0x7b57,
+  0x7b59, 0x7b5c, 0x7b5e, 0x7b5f, 0x7b61, 0x7b63, 0x7b64, 0x7b65,
+  0x7b66, 0x7b67, 0x7b68, 0x7b69, 0x7b6a, 0x7b6b, 0x7b6c, 0x7b6d,
+  0x7b6f, 0x7b70, 0x7b73, 0x7b74, 0x7b76, 0x7b78, 0x7b7a, 0x7b7c,
+  0x7b7d, 0x7b7f, 0x7b81, 0x7b82, 0x7b83, 0x7b84, 0x7b86, 0x7b87,
+  0x7b88, 0x7b89, 0x7b8a, 0x7b8b, 0x7b8c, 0x7b8e, 0x7b8f, 0x7b91,
+  0x7b92, 0x7b93, 0x7b96, 0x7b98, 0x7b99, 0x7b9a, 0x7b9b, 0x7b9e,
+  0x7b9f, 0x7ba0, 0x7ba3, 0x7ba4, 0x7ba5, 0x7bae, 0x7baf, 0x7bb0,
+  0x7bb2, 0x7bb3, 0x7bb5, 0x7bb6, 0x7bb7, 0x7bb9, 0x7bba, 0x7bbb,
+  0x7bbc, 0x7bbd, 0x7bbe, 0x7bbf, 0x7bc0, 0x7bc2, 0x7bc3, 0x7bc4,
+  0x57c2, 0x803f, 0x6897, 0x5de5, 0x653b, 0x529f, 0x606d, 0x9f9a,
+  0x4f9b, 0x8eac, 0x516c, 0x5bab, 0x5f13, 0x5de9, 0x6c5e, 0x62f1,
+  0x8d21, 0x5171, 0x94a9, 0x52fe, 0x6c9f, 0x82df, 0x72d7, 0x57a2,
+  0x6784, 0x8d2d, 0x591f, 0x8f9c, 0x83c7, 0x5495, 0x7b8d, 0x4f30,
+  0x6cbd, 0x5b64, 0x59d1, 0x9f13, 0x53e4, 0x86ca, 0x9aa8, 0x8c37,
+  0x80a1, 0x6545, 0x987e, 0x56fa, 0x96c7, 0x522e, 0x74dc, 0x5250,
+  0x5be1, 0x6302, 0x8902, 0x4e56, 0x62d0, 0x602a, 0x68fa, 0x5173,
+  0x5b98, 0x51a0, 0x89c2, 0x7ba1, 0x9986, 0x7f50, 0x60ef, 0x704c,
+  0x8d2f, 0x5149, 0x5e7f, 0x901b, 0x7470, 0x89c4, 0x572d, 0x7845,
+  0x5f52, 0x9f9f, 0x95fa, 0x8f68, 0x9b3c, 0x8be1, 0x7678, 0x6842,
+  0x67dc, 0x8dea, 0x8d35, 0x523d, 0x8f8a, 0x6eda, 0x68cd, 0x9505,
+  0x90ed, 0x56fd, 0x679c, 0x88f9, 0x8fc7, 0x54c8,
+  /* 0xba */
+  0x7bc5, 0x7bc8, 0x7bc9, 0x7bca, 0x7bcb, 0x7bcd, 0x7bce, 0x7bcf,
+  0x7bd0, 0x7bd2, 0x7bd4, 0x7bd5, 0x7bd6, 0x7bd7, 0x7bd8, 0x7bdb,
+  0x7bdc, 0x7bde, 0x7bdf, 0x7be0, 0x7be2, 0x7be3, 0x7be4, 0x7be7,
+  0x7be8, 0x7be9, 0x7beb, 0x7bec, 0x7bed, 0x7bef, 0x7bf0, 0x7bf2,
+  0x7bf3, 0x7bf4, 0x7bf5, 0x7bf6, 0x7bf8, 0x7bf9, 0x7bfa, 0x7bfb,
+  0x7bfd, 0x7bff, 0x7c00, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c05,
+  0x7c06, 0x7c08, 0x7c09, 0x7c0a, 0x7c0d, 0x7c0e, 0x7c10, 0x7c11,
+  0x7c12, 0x7c13, 0x7c14, 0x7c15, 0x7c17, 0x7c18, 0x7c19, 0x7c1a,
+  0x7c1b, 0x7c1c, 0x7c1d, 0x7c1e, 0x7c20, 0x7c21, 0x7c22, 0x7c23,
+  0x7c24, 0x7c25, 0x7c28, 0x7c29, 0x7c2b, 0x7c2c, 0x7c2d, 0x7c2e,
+  0x7c2f, 0x7c30, 0x7c31, 0x7c32, 0x7c33, 0x7c34, 0x7c35, 0x7c36,
+  0x7c37, 0x7c39, 0x7c3a, 0x7c3b, 0x7c3c, 0x7c3d, 0x7c3e, 0x7c42,
+  0x9ab8, 0x5b69, 0x6d77, 0x6c26, 0x4ea5, 0x5bb3, 0x9a87, 0x9163,
+  0x61a8, 0x90af, 0x97e9, 0x542b, 0x6db5, 0x5bd2, 0x51fd, 0x558a,
+  0x7f55, 0x7ff0, 0x64bc, 0x634d, 0x65f1, 0x61be, 0x608d, 0x710a,
+  0x6c57, 0x6c49, 0x592f, 0x676d, 0x822a, 0x58d5, 0x568e, 0x8c6a,
+  0x6beb, 0x90dd, 0x597d, 0x8017, 0x53f7, 0x6d69, 0x5475, 0x559d,
+  0x8377, 0x83cf, 0x6838, 0x79be, 0x548c, 0x4f55, 0x5408, 0x76d2,
+  0x8c89, 0x9602, 0x6cb3, 0x6db8, 0x8d6b, 0x8910, 0x9e64, 0x8d3a,
+  0x563f, 0x9ed1, 0x75d5, 0x5f88, 0x72e0, 0x6068, 0x54fc, 0x4ea8,
+  0x6a2a, 0x8861, 0x6052, 0x8f70, 0x54c4, 0x70d8, 0x8679, 0x9e3f,
+  0x6d2a, 0x5b8f, 0x5f18, 0x7ea2, 0x5589, 0x4faf, 0x7334, 0x543c,
+  0x539a, 0x5019, 0x540e, 0x547c, 0x4e4e, 0x5ffd, 0x745a, 0x58f6,
+  0x846b, 0x80e1, 0x8774, 0x72d0, 0x7cca, 0x6e56,
+  /* 0xbb */
+  0x7c43, 0x7c44, 0x7c45, 0x7c46, 0x7c47, 0x7c48, 0x7c49, 0x7c4a,
+  0x7c4b, 0x7c4c, 0x7c4e, 0x7c4f, 0x7c50, 0x7c51, 0x7c52, 0x7c53,
+  0x7c54, 0x7c55, 0x7c56, 0x7c57, 0x7c58, 0x7c59, 0x7c5a, 0x7c5b,
+  0x7c5c, 0x7c5d, 0x7c5e, 0x7c5f, 0x7c60, 0x7c61, 0x7c62, 0x7c63,
+  0x7c64, 0x7c65, 0x7c66, 0x7c67, 0x7c68, 0x7c69, 0x7c6a, 0x7c6b,
+  0x7c6c, 0x7c6d, 0x7c6e, 0x7c6f, 0x7c70, 0x7c71, 0x7c72, 0x7c75,
+  0x7c76, 0x7c77, 0x7c78, 0x7c79, 0x7c7a, 0x7c7e, 0x7c7f, 0x7c80,
+  0x7c81, 0x7c82, 0x7c83, 0x7c84, 0x7c85, 0x7c86, 0x7c87, 0x7c88,
+  0x7c8a, 0x7c8b, 0x7c8c, 0x7c8d, 0x7c8e, 0x7c8f, 0x7c90, 0x7c93,
+  0x7c94, 0x7c96, 0x7c99, 0x7c9a, 0x7c9b, 0x7ca0, 0x7ca1, 0x7ca3,
+  0x7ca6, 0x7ca7, 0x7ca8, 0x7ca9, 0x7cab, 0x7cac, 0x7cad, 0x7caf,
+  0x7cb0, 0x7cb4, 0x7cb5, 0x7cb6, 0x7cb7, 0x7cb8, 0x7cba, 0x7cbb,
+  0x5f27, 0x864e, 0x552c, 0x62a4, 0x4e92, 0x6caa, 0x6237, 0x82b1,
+  0x54d7, 0x534e, 0x733e, 0x6ed1, 0x753b, 0x5212, 0x5316, 0x8bdd,
+  0x69d0, 0x5f8a, 0x6000, 0x6dee, 0x574f, 0x6b22, 0x73af, 0x6853,
+  0x8fd8, 0x7f13, 0x6362, 0x60a3, 0x5524, 0x75ea, 0x8c62, 0x7115,
+  0x6da3, 0x5ba6, 0x5e7b, 0x8352, 0x614c, 0x9ec4, 0x78fa, 0x8757,
+  0x7c27, 0x7687, 0x51f0, 0x60f6, 0x714c, 0x6643, 0x5e4c, 0x604d,
+  0x8c0e, 0x7070, 0x6325, 0x8f89, 0x5fbd, 0x6062, 0x86d4, 0x56de,
+  0x6bc1, 0x6094, 0x6167, 0x5349, 0x60e0, 0x6666, 0x8d3f, 0x79fd,
+  0x4f1a, 0x70e9, 0x6c47, 0x8bb3, 0x8bf2, 0x7ed8, 0x8364, 0x660f,
+  0x5a5a, 0x9b42, 0x6d51, 0x6df7, 0x8c41, 0x6d3b, 0x4f19, 0x706b,
+  0x83b7, 0x6216, 0x60d1, 0x970d, 0x8d27, 0x7978, 0x51fb, 0x573e,
+  0x57fa, 0x673a, 0x7578, 0x7a3d, 0x79ef, 0x7b95,
+  /* 0xbc */
+  0x7cbf, 0x7cc0, 0x7cc2, 0x7cc3, 0x7cc4, 0x7cc6, 0x7cc9, 0x7ccb,
+  0x7cce, 0x7ccf, 0x7cd0, 0x7cd1, 0x7cd2, 0x7cd3, 0x7cd4, 0x7cd8,
+  0x7cda, 0x7cdb, 0x7cdd, 0x7cde, 0x7ce1, 0x7ce2, 0x7ce3, 0x7ce4,
+  0x7ce5, 0x7ce6, 0x7ce7, 0x7ce9, 0x7cea, 0x7ceb, 0x7cec, 0x7ced,
+  0x7cee, 0x7cf0, 0x7cf1, 0x7cf2, 0x7cf3, 0x7cf4, 0x7cf5, 0x7cf6,
+  0x7cf7, 0x7cf9, 0x7cfa, 0x7cfc, 0x7cfd, 0x7cfe, 0x7cff, 0x7d00,
+  0x7d01, 0x7d02, 0x7d03, 0x7d04, 0x7d05, 0x7d06, 0x7d07, 0x7d08,
+  0x7d09, 0x7d0b, 0x7d0c, 0x7d0d, 0x7d0e, 0x7d0f, 0x7d10, 0x7d11,
+  0x7d12, 0x7d13, 0x7d14, 0x7d15, 0x7d16, 0x7d17, 0x7d18, 0x7d19,
+  0x7d1a, 0x7d1b, 0x7d1c, 0x7d1d, 0x7d1e, 0x7d1f, 0x7d21, 0x7d23,
+  0x7d24, 0x7d25, 0x7d26, 0x7d28, 0x7d29, 0x7d2a, 0x7d2c, 0x7d2d,
+  0x7d2e, 0x7d30, 0x7d31, 0x7d32, 0x7d33, 0x7d34, 0x7d35, 0x7d36,
+  0x808c, 0x9965, 0x8ff9, 0x6fc0, 0x8ba5, 0x9e21, 0x59ec, 0x7ee9,
+  0x7f09, 0x5409, 0x6781, 0x68d8, 0x8f91, 0x7c4d, 0x96c6, 0x53ca,
+  0x6025, 0x75be, 0x6c72, 0x5373, 0x5ac9, 0x7ea7, 0x6324, 0x51e0,
+  0x810a, 0x5df1, 0x84df, 0x6280, 0x5180, 0x5b63, 0x4f0e, 0x796d,
+  0x5242, 0x60b8, 0x6d4e, 0x5bc4, 0x5bc2, 0x8ba1, 0x8bb0, 0x65e2,
+  0x5fcc, 0x9645, 0x5993, 0x7ee7, 0x7eaa, 0x5609, 0x67b7, 0x5939,
+  0x4f73, 0x5bb6, 0x52a0, 0x835a, 0x988a, 0x8d3e, 0x7532, 0x94be,
+  0x5047, 0x7a3c, 0x4ef7, 0x67b6, 0x9a7e, 0x5ac1, 0x6b7c, 0x76d1,
+  0x575a, 0x5c16, 0x7b3a, 0x95f4, 0x714e, 0x517c, 0x80a9, 0x8270,
+  0x5978, 0x7f04, 0x8327, 0x68c0, 0x67ec, 0x78b1, 0x7877, 0x62e3,
+  0x6361, 0x7b80, 0x4fed, 0x526a, 0x51cf, 0x8350, 0x69db, 0x9274,
+  0x8df5, 0x8d31, 0x89c1, 0x952e, 0x7bad, 0x4ef6,
+  /* 0xbd */
+  0x7d37, 0x7d38, 0x7d39, 0x7d3a, 0x7d3b, 0x7d3c, 0x7d3d, 0x7d3e,
+  0x7d3f, 0x7d40, 0x7d41, 0x7d42, 0x7d43, 0x7d44, 0x7d45, 0x7d46,
+  0x7d47, 0x7d48, 0x7d49, 0x7d4a, 0x7d4b, 0x7d4c, 0x7d4d, 0x7d4e,
+  0x7d4f, 0x7d50, 0x7d51, 0x7d52, 0x7d53, 0x7d54, 0x7d55, 0x7d56,
+  0x7d57, 0x7d58, 0x7d59, 0x7d5a, 0x7d5b, 0x7d5c, 0x7d5d, 0x7d5e,
+  0x7d5f, 0x7d60, 0x7d61, 0x7d62, 0x7d63, 0x7d64, 0x7d65, 0x7d66,
+  0x7d67, 0x7d68, 0x7d69, 0x7d6a, 0x7d6b, 0x7d6c, 0x7d6d, 0x7d6f,
+  0x7d70, 0x7d71, 0x7d72, 0x7d73, 0x7d74, 0x7d75, 0x7d76, 0x7d78,
+  0x7d79, 0x7d7a, 0x7d7b, 0x7d7c, 0x7d7d, 0x7d7e, 0x7d7f, 0x7d80,
+  0x7d81, 0x7d82, 0x7d83, 0x7d84, 0x7d85, 0x7d86, 0x7d87, 0x7d88,
+  0x7d89, 0x7d8a, 0x7d8b, 0x7d8c, 0x7d8d, 0x7d8e, 0x7d8f, 0x7d90,
+  0x7d91, 0x7d92, 0x7d93, 0x7d94, 0x7d95, 0x7d96, 0x7d97, 0x7d98,
+  0x5065, 0x8230, 0x5251, 0x996f, 0x6e10, 0x6e85, 0x6da7, 0x5efa,
+  0x50f5, 0x59dc, 0x5c06, 0x6d46, 0x6c5f, 0x7586, 0x848b, 0x6868,
+  0x5956, 0x8bb2, 0x5320, 0x9171, 0x964d, 0x8549, 0x6912, 0x7901,
+  0x7126, 0x80f6, 0x4ea4, 0x90ca, 0x6d47, 0x9a84, 0x5a07, 0x56bc,
+  0x6405, 0x94f0, 0x77eb, 0x4fa5, 0x811a, 0x72e1, 0x89d2, 0x997a,
+  0x7f34, 0x7ede, 0x527f, 0x6559, 0x9175, 0x8f7f, 0x8f83, 0x53eb,
+  0x7a96, 0x63ed, 0x63a5, 0x7686, 0x79f8, 0x8857, 0x9636, 0x622a,
+  0x52ab, 0x8282, 0x6854, 0x6770, 0x6377, 0x776b, 0x7aed, 0x6d01,
+  0x7ed3, 0x89e3, 0x59d0, 0x6212, 0x85c9, 0x82a5, 0x754c, 0x501f,
+  0x4ecb, 0x75a5, 0x8beb, 0x5c4a, 0x5dfe, 0x7b4b, 0x65a4, 0x91d1,
+  0x4eca, 0x6d25, 0x895f, 0x7d27, 0x9526, 0x4ec5, 0x8c28, 0x8fdb,
+  0x9773, 0x664b, 0x7981, 0x8fd1, 0x70ec, 0x6d78,
+  /* 0xbe */
+  0x7d99, 0x7d9a, 0x7d9b, 0x7d9c, 0x7d9d, 0x7d9e, 0x7d9f, 0x7da0,
+  0x7da1, 0x7da2, 0x7da3, 0x7da4, 0x7da5, 0x7da7, 0x7da8, 0x7da9,
+  0x7daa, 0x7dab, 0x7dac, 0x7dad, 0x7daf, 0x7db0, 0x7db1, 0x7db2,
+  0x7db3, 0x7db4, 0x7db5, 0x7db6, 0x7db7, 0x7db8, 0x7db9, 0x7dba,
+  0x7dbb, 0x7dbc, 0x7dbd, 0x7dbe, 0x7dbf, 0x7dc0, 0x7dc1, 0x7dc2,
+  0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dc7, 0x7dc8, 0x7dc9, 0x7dca,
+  0x7dcb, 0x7dcc, 0x7dcd, 0x7dce, 0x7dcf, 0x7dd0, 0x7dd1, 0x7dd2,
+  0x7dd3, 0x7dd4, 0x7dd5, 0x7dd6, 0x7dd7, 0x7dd8, 0x7dd9, 0x7dda,
+  0x7ddb, 0x7ddc, 0x7ddd, 0x7dde, 0x7ddf, 0x7de0, 0x7de1, 0x7de2,
+  0x7de3, 0x7de4, 0x7de5, 0x7de6, 0x7de7, 0x7de8, 0x7de9, 0x7dea,
+  0x7deb, 0x7dec, 0x7ded, 0x7dee, 0x7def, 0x7df0, 0x7df1, 0x7df2,
+  0x7df3, 0x7df4, 0x7df5, 0x7df6, 0x7df7, 0x7df8, 0x7df9, 0x7dfa,
+  0x5c3d, 0x52b2, 0x8346, 0x5162, 0x830e, 0x775b, 0x6676, 0x9cb8,
+  0x4eac, 0x60ca, 0x7cbe, 0x7cb3, 0x7ecf, 0x4e95, 0x8b66, 0x666f,
+  0x9888, 0x9759, 0x5883, 0x656c, 0x955c, 0x5f84, 0x75c9, 0x9756,
+  0x7adf, 0x7ade, 0x51c0, 0x70af, 0x7a98, 0x63ea, 0x7a76, 0x7ea0,
+  0x7396, 0x97ed, 0x4e45, 0x7078, 0x4e5d, 0x9152, 0x53a9, 0x6551,
+  0x65e7, 0x81fc, 0x8205, 0x548e, 0x5c31, 0x759a, 0x97a0, 0x62d8,
+  0x72d9, 0x75bd, 0x5c45, 0x9a79, 0x83ca, 0x5c40, 0x5480, 0x77e9,
+  0x4e3e, 0x6cae, 0x805a, 0x62d2, 0x636e, 0x5de8, 0x5177, 0x8ddd,
+  0x8e1e, 0x952f, 0x4ff1, 0x53e5, 0x60e7, 0x70ac, 0x5267, 0x6350,
+  0x9e43, 0x5a1f, 0x5026, 0x7737, 0x5377, 0x7ee2, 0x6485, 0x652b,
+  0x6289, 0x6398, 0x5014, 0x7235, 0x89c9, 0x51b3, 0x8bc0, 0x7edd,
+  0x5747, 0x83cc, 0x94a7, 0x519b, 0x541b, 0x5cfb,
+  /* 0xbf */
+  0x7dfb, 0x7dfc, 0x7dfd, 0x7dfe, 0x7dff, 0x7e00, 0x7e01, 0x7e02,
+  0x7e03, 0x7e04, 0x7e05, 0x7e06, 0x7e07, 0x7e08, 0x7e09, 0x7e0a,
+  0x7e0b, 0x7e0c, 0x7e0d, 0x7e0e, 0x7e0f, 0x7e10, 0x7e11, 0x7e12,
+  0x7e13, 0x7e14, 0x7e15, 0x7e16, 0x7e17, 0x7e18, 0x7e19, 0x7e1a,
+  0x7e1b, 0x7e1c, 0x7e1d, 0x7e1e, 0x7e1f, 0x7e20, 0x7e21, 0x7e22,
+  0x7e23, 0x7e24, 0x7e25, 0x7e26, 0x7e27, 0x7e28, 0x7e29, 0x7e2a,
+  0x7e2b, 0x7e2c, 0x7e2d, 0x7e2e, 0x7e2f, 0x7e30, 0x7e31, 0x7e32,
+  0x7e33, 0x7e34, 0x7e35, 0x7e36, 0x7e37, 0x7e38, 0x7e39, 0x7e3a,
+  0x7e3c, 0x7e3d, 0x7e3e, 0x7e3f, 0x7e40, 0x7e42, 0x7e43, 0x7e44,
+  0x7e45, 0x7e46, 0x7e48, 0x7e49, 0x7e4a, 0x7e4b, 0x7e4c, 0x7e4d,
+  0x7e4e, 0x7e4f, 0x7e50, 0x7e51, 0x7e52, 0x7e53, 0x7e54, 0x7e55,
+  0x7e56, 0x7e57, 0x7e58, 0x7e59, 0x7e5a, 0x7e5b, 0x7e5c, 0x7e5d,
+  0x4fca, 0x7ae3, 0x6d5a, 0x90e1, 0x9a8f, 0x5580, 0x5496, 0x5361,
+  0x54af, 0x5f00, 0x63e9, 0x6977, 0x51ef, 0x6168, 0x520a, 0x582a,
+  0x52d8, 0x574e, 0x780d, 0x770b, 0x5eb7, 0x6177, 0x7ce0, 0x625b,
+  0x6297, 0x4ea2, 0x7095, 0x8003, 0x62f7, 0x70e4, 0x9760, 0x5777,
+  0x82db, 0x67ef, 0x68f5, 0x78d5, 0x9897, 0x79d1, 0x58f3, 0x54b3,
+  0x53ef, 0x6e34, 0x514b, 0x523b, 0x5ba2, 0x8bfe, 0x80af, 0x5543,
+  0x57a6, 0x6073, 0x5751, 0x542d, 0x7a7a, 0x6050, 0x5b54, 0x63a7,
+  0x62a0, 0x53e3, 0x6263, 0x5bc7, 0x67af, 0x54ed, 0x7a9f, 0x82e6,
+  0x9177, 0x5e93, 0x88e4, 0x5938, 0x57ae, 0x630e, 0x8de8, 0x80ef,
+  0x5757, 0x7b77, 0x4fa9, 0x5feb, 0x5bbd, 0x6b3e, 0x5321, 0x7b50,
+  0x72c2, 0x6846, 0x77ff, 0x7736, 0x65f7, 0x51b5, 0x4e8f, 0x76d4,
+  0x5cbf, 0x7aa5, 0x8475, 0x594e, 0x9b41, 0x5080,
+  /* 0xc0 */
+  0x7e5e, 0x7e5f, 0x7e60, 0x7e61, 0x7e62, 0x7e63, 0x7e64, 0x7e65,
+  0x7e66, 0x7e67, 0x7e68, 0x7e69, 0x7e6a, 0x7e6b, 0x7e6c, 0x7e6d,
+  0x7e6e, 0x7e6f, 0x7e70, 0x7e71, 0x7e72, 0x7e73, 0x7e74, 0x7e75,
+  0x7e76, 0x7e77, 0x7e78, 0x7e79, 0x7e7a, 0x7e7b, 0x7e7c, 0x7e7d,
+  0x7e7e, 0x7e7f, 0x7e80, 0x7e81, 0x7e83, 0x7e84, 0x7e85, 0x7e86,
+  0x7e87, 0x7e88, 0x7e89, 0x7e8a, 0x7e8b, 0x7e8c, 0x7e8d, 0x7e8e,
+  0x7e8f, 0x7e90, 0x7e91, 0x7e92, 0x7e93, 0x7e94, 0x7e95, 0x7e96,
+  0x7e97, 0x7e98, 0x7e99, 0x7e9a, 0x7e9c, 0x7e9d, 0x7e9e, 0x7eae,
+  0x7eb4, 0x7ebb, 0x7ebc, 0x7ed6, 0x7ee4, 0x7eec, 0x7ef9, 0x7f0a,
+  0x7f10, 0x7f1e, 0x7f37, 0x7f39, 0x7f3b, 0x7f3c, 0x7f3d, 0x7f3e,
+  0x7f3f, 0x7f40, 0x7f41, 0x7f43, 0x7f46, 0x7f47, 0x7f48, 0x7f49,
+  0x7f4a, 0x7f4b, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f4f, 0x7f52, 0x7f53,
+  0x9988, 0x6127, 0x6e83, 0x5764, 0x6606, 0x6346, 0x56f0, 0x62ec,
+  0x6269, 0x5ed3, 0x9614, 0x5783, 0x62c9, 0x5587, 0x8721, 0x814a,
+  0x8fa3, 0x5566, 0x83b1, 0x6765, 0x8d56, 0x84dd, 0x5a6a, 0x680f,
+  0x62e6, 0x7bee, 0x9611, 0x5170, 0x6f9c, 0x8c30, 0x63fd, 0x89c8,
+  0x61d2, 0x7f06, 0x70c2, 0x6ee5, 0x7405, 0x6994, 0x72fc, 0x5eca,
+  0x90ce, 0x6717, 0x6d6a, 0x635e, 0x52b3, 0x7262, 0x8001, 0x4f6c,
+  0x59e5, 0x916a, 0x70d9, 0x6d9d, 0x52d2, 0x4e50, 0x96f7, 0x956d,
+  0x857e, 0x78ca, 0x7d2f, 0x5121, 0x5792, 0x64c2, 0x808b, 0x7c7b,
+  0x6cea, 0x68f1, 0x695e, 0x51b7, 0x5398, 0x68a8, 0x7281, 0x9ece,
+  0x7bf1, 0x72f8, 0x79bb, 0x6f13, 0x7406, 0x674e, 0x91cc, 0x9ca4,
+  0x793c, 0x8389, 0x8354, 0x540f, 0x6817, 0x4e3d, 0x5389, 0x52b1,
+  0x783e, 0x5386, 0x5229, 0x5088, 0x4f8b, 0x4fd0,
+  /* 0xc1 */
+  0x7f56, 0x7f59, 0x7f5b, 0x7f5c, 0x7f5d, 0x7f5e, 0x7f60, 0x7f63,
+  0x7f64, 0x7f65, 0x7f66, 0x7f67, 0x7f6b, 0x7f6c, 0x7f6d, 0x7f6f,
+  0x7f70, 0x7f73, 0x7f75, 0x7f76, 0x7f77, 0x7f78, 0x7f7a, 0x7f7b,
+  0x7f7c, 0x7f7d, 0x7f7f, 0x7f80, 0x7f82, 0x7f83, 0x7f84, 0x7f85,
+  0x7f86, 0x7f87, 0x7f88, 0x7f89, 0x7f8b, 0x7f8d, 0x7f8f, 0x7f90,
+  0x7f91, 0x7f92, 0x7f93, 0x7f95, 0x7f96, 0x7f97, 0x7f98, 0x7f99,
+  0x7f9b, 0x7f9c, 0x7fa0, 0x7fa2, 0x7fa3, 0x7fa5, 0x7fa6, 0x7fa8,
+  0x7fa9, 0x7faa, 0x7fab, 0x7fac, 0x7fad, 0x7fae, 0x7fb1, 0x7fb3,
+  0x7fb4, 0x7fb5, 0x7fb6, 0x7fb7, 0x7fba, 0x7fbb, 0x7fbe, 0x7fc0,
+  0x7fc2, 0x7fc3, 0x7fc4, 0x7fc6, 0x7fc7, 0x7fc8, 0x7fc9, 0x7fcb,
+  0x7fcd, 0x7fcf, 0x7fd0, 0x7fd1, 0x7fd2, 0x7fd3, 0x7fd6, 0x7fd7,
+  0x7fd9, 0x7fda, 0x7fdb, 0x7fdc, 0x7fdd, 0x7fde, 0x7fe2, 0x7fe3,
+  0x75e2, 0x7acb, 0x7c92, 0x6ca5, 0x96b6, 0x529b, 0x7483, 0x54e9,
+  0x4fe9, 0x8054, 0x83b2, 0x8fde, 0x9570, 0x5ec9, 0x601c, 0x6d9f,
+  0x5e18, 0x655b, 0x8138, 0x94fe, 0x604b, 0x70bc, 0x7ec3, 0x7cae,
+  0x51c9, 0x6881, 0x7cb1, 0x826f, 0x4e24, 0x8f86, 0x91cf, 0x667e,
+  0x4eae, 0x8c05, 0x64a9, 0x804a, 0x50da, 0x7597, 0x71ce, 0x5be5,
+  0x8fbd, 0x6f66, 0x4e86, 0x6482, 0x9563, 0x5ed6, 0x6599, 0x5217,
+  0x88c2, 0x70c8, 0x52a3, 0x730e, 0x7433, 0x6797, 0x78f7, 0x9716,
+  0x4e34, 0x90bb, 0x9cde, 0x6dcb, 0x51db, 0x8d41, 0x541d, 0x62ce,
+  0x73b2, 0x83f1, 0x96f6, 0x9f84, 0x94c3, 0x4f36, 0x7f9a, 0x51cc,
+  0x7075, 0x9675, 0x5cad, 0x9886, 0x53e6, 0x4ee4, 0x6e9c, 0x7409,
+  0x69b4, 0x786b, 0x998f, 0x7559, 0x5218, 0x7624, 0x6d41, 0x67f3,
+  0x516d, 0x9f99, 0x804b, 0x5499, 0x7b3c, 0x7abf,
+  /* 0xc2 */
+  0x7fe4, 0x7fe7, 0x7fe8, 0x7fea, 0x7feb, 0x7fec, 0x7fed, 0x7fef,
+  0x7ff2, 0x7ff4, 0x7ff5, 0x7ff6, 0x7ff7, 0x7ff8, 0x7ff9, 0x7ffa,
+  0x7ffd, 0x7ffe, 0x7fff, 0x8002, 0x8007, 0x8008, 0x8009, 0x800a,
+  0x800e, 0x800f, 0x8011, 0x8013, 0x801a, 0x801b, 0x801d, 0x801e,
+  0x801f, 0x8021, 0x8023, 0x8024, 0x802b, 0x802c, 0x802d, 0x802e,
+  0x802f, 0x8030, 0x8032, 0x8034, 0x8039, 0x803a, 0x803c, 0x803e,
+  0x8040, 0x8041, 0x8044, 0x8045, 0x8047, 0x8048, 0x8049, 0x804e,
+  0x804f, 0x8050, 0x8051, 0x8053, 0x8055, 0x8056, 0x8057, 0x8059,
+  0x805b, 0x805c, 0x805d, 0x805e, 0x805f, 0x8060, 0x8061, 0x8062,
+  0x8063, 0x8064, 0x8065, 0x8066, 0x8067, 0x8068, 0x806b, 0x806c,
+  0x806d, 0x806e, 0x806f, 0x8070, 0x8072, 0x8073, 0x8074, 0x8075,
+  0x8076, 0x8077, 0x8078, 0x8079, 0x807a, 0x807b, 0x807c, 0x807d,
+  0x9686, 0x5784, 0x62e2, 0x9647, 0x697c, 0x5a04, 0x6402, 0x7bd3,
+  0x6f0f, 0x964b, 0x82a6, 0x5362, 0x9885, 0x5e90, 0x7089, 0x63b3,
+  0x5364, 0x864f, 0x9c81, 0x9e93, 0x788c, 0x9732, 0x8def, 0x8d42,
+  0x9e7f, 0x6f5e, 0x7984, 0x5f55, 0x9646, 0x622e, 0x9a74, 0x5415,
+  0x94dd, 0x4fa3, 0x65c5, 0x5c65, 0x5c61, 0x7f15, 0x8651, 0x6c2f,
+  0x5f8b, 0x7387, 0x6ee4, 0x7eff, 0x5ce6, 0x631b, 0x5b6a, 0x6ee6,
+  0x5375, 0x4e71, 0x63a0, 0x7565, 0x62a1, 0x8f6e, 0x4f26, 0x4ed1,
+  0x6ca6, 0x7eb6, 0x8bba, 0x841d, 0x87ba, 0x7f57, 0x903b, 0x9523,
+  0x7ba9, 0x9aa1, 0x88f8, 0x843d, 0x6d1b, 0x9a86, 0x7edc, 0x5988,
+  0x9ebb, 0x739b, 0x7801, 0x8682, 0x9a6c, 0x9a82, 0x561b, 0x5417,
+  0x57cb, 0x4e70, 0x9ea6, 0x5356, 0x8fc8, 0x8109, 0x7792, 0x9992,
+  0x86ee, 0x6ee1, 0x8513, 0x66fc, 0x6162, 0x6f2b,
+  /* 0xc3 */
+  0x807e, 0x8081, 0x8082, 0x8085, 0x8088, 0x808a, 0x808d, 0x808e,
+  0x808f, 0x8090, 0x8091, 0x8092, 0x8094, 0x8095, 0x8097, 0x8099,
+  0x809e, 0x80a3, 0x80a6, 0x80a7, 0x80a8, 0x80ac, 0x80b0, 0x80b3,
+  0x80b5, 0x80b6, 0x80b8, 0x80b9, 0x80bb, 0x80c5, 0x80c7, 0x80c8,
+  0x80c9, 0x80ca, 0x80cb, 0x80cf, 0x80d0, 0x80d1, 0x80d2, 0x80d3,
+  0x80d4, 0x80d5, 0x80d8, 0x80df, 0x80e0, 0x80e2, 0x80e3, 0x80e6,
+  0x80ee, 0x80f5, 0x80f7, 0x80f9, 0x80fb, 0x80fe, 0x80ff, 0x8100,
+  0x8101, 0x8103, 0x8104, 0x8105, 0x8107, 0x8108, 0x810b, 0x810c,
+  0x8115, 0x8117, 0x8119, 0x811b, 0x811c, 0x811d, 0x811f, 0x8120,
+  0x8121, 0x8122, 0x8123, 0x8124, 0x8125, 0x8126, 0x8127, 0x8128,
+  0x8129, 0x812a, 0x812b, 0x812d, 0x812e, 0x8130, 0x8133, 0x8134,
+  0x8135, 0x8137, 0x8139, 0x813a, 0x813b, 0x813c, 0x813d, 0x813f,
+  0x8c29, 0x8292, 0x832b, 0x76f2, 0x6c13, 0x5fd9, 0x83bd, 0x732b,
+  0x8305, 0x951a, 0x6bdb, 0x77db, 0x94c6, 0x536f, 0x8302, 0x5192,
+  0x5e3d, 0x8c8c, 0x8d38, 0x4e48, 0x73ab, 0x679a, 0x6885, 0x9176,
+  0x9709, 0x7164, 0x6ca1, 0x7709, 0x5a92, 0x9541, 0x6bcf, 0x7f8e,
+  0x6627, 0x5bd0, 0x59b9, 0x5a9a, 0x95e8, 0x95f7, 0x4eec, 0x840c,
+  0x8499, 0x6aac, 0x76df, 0x9530, 0x731b, 0x68a6, 0x5b5f, 0x772f,
+  0x919a, 0x9761, 0x7cdc, 0x8ff7, 0x8c1c, 0x5f25, 0x7c73, 0x79d8,
+  0x89c5, 0x6ccc, 0x871c, 0x5bc6, 0x5e42, 0x68c9, 0x7720, 0x7ef5,
+  0x5195, 0x514d, 0x52c9, 0x5a29, 0x7f05, 0x9762, 0x82d7, 0x63cf,
+  0x7784, 0x85d0, 0x79d2, 0x6e3a, 0x5e99, 0x5999, 0x8511, 0x706d,
+  0x6c11, 0x62bf, 0x76bf, 0x654f, 0x60af, 0x95fd, 0x660e, 0x879f,
+  0x9e23, 0x94ed, 0x540d, 0x547d, 0x8c2c, 0x6478,
+  /* 0xc4 */
+  0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8147, 0x8149,
+  0x814d, 0x814e, 0x814f, 0x8152, 0x8156, 0x8157, 0x8158, 0x815b,
+  0x815c, 0x815d, 0x815e, 0x815f, 0x8161, 0x8162, 0x8163, 0x8164,
+  0x8166, 0x8168, 0x816a, 0x816b, 0x816c, 0x816f, 0x8172, 0x8173,
+  0x8175, 0x8176, 0x8177, 0x8178, 0x8181, 0x8183, 0x8184, 0x8185,
+  0x8186, 0x8187, 0x8189, 0x818b, 0x818c, 0x818d, 0x818e, 0x8190,
+  0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, 0x8199, 0x819a,
+  0x819e, 0x819f, 0x81a0, 0x81a1, 0x81a2, 0x81a4, 0x81a5, 0x81a7,
+  0x81a9, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1,
+  0x81b2, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, 0x81bc,
+  0x81bd, 0x81be, 0x81bf, 0x81c4, 0x81c5, 0x81c7, 0x81c8, 0x81c9,
+  0x81cb, 0x81cd, 0x81ce, 0x81cf, 0x81d0, 0x81d1, 0x81d2, 0x81d3,
+  0x6479, 0x8611, 0x6a21, 0x819c, 0x78e8, 0x6469, 0x9b54, 0x62b9,
+  0x672b, 0x83ab, 0x58a8, 0x9ed8, 0x6cab, 0x6f20, 0x5bde, 0x964c,
+  0x8c0b, 0x725f, 0x67d0, 0x62c7, 0x7261, 0x4ea9, 0x59c6, 0x6bcd,
+  0x5893, 0x66ae, 0x5e55, 0x52df, 0x6155, 0x6728, 0x76ee, 0x7766,
+  0x7267, 0x7a46, 0x62ff, 0x54ea, 0x5450, 0x94a0, 0x90a3, 0x5a1c,
+  0x7eb3, 0x6c16, 0x4e43, 0x5976, 0x8010, 0x5948, 0x5357, 0x7537,
+  0x96be, 0x56ca, 0x6320, 0x8111, 0x607c, 0x95f9, 0x6dd6, 0x5462,
+  0x9981, 0x5185, 0x5ae9, 0x80fd, 0x59ae, 0x9713, 0x502a, 0x6ce5,
+  0x5c3c, 0x62df, 0x4f60, 0x533f, 0x817b, 0x9006, 0x6eba, 0x852b,
+  0x62c8, 0x5e74, 0x78be, 0x64b5, 0x637b, 0x5ff5, 0x5a18, 0x917f,
+  0x9e1f, 0x5c3f, 0x634f, 0x8042, 0x5b7d, 0x556e, 0x954a, 0x954d,
+  0x6d85, 0x60a8, 0x67e0, 0x72de, 0x51dd, 0x5b81,
+  /* 0xc5 */
+  0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, 0x81d9, 0x81da, 0x81db,
+  0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, 0x81e1, 0x81e2, 0x81e4,
+  0x81e5, 0x81e6, 0x81e8, 0x81e9, 0x81eb, 0x81ee, 0x81ef, 0x81f0,
+  0x81f1, 0x81f2, 0x81f5, 0x81f6, 0x81f7, 0x81f8, 0x81f9, 0x81fa,
+  0x81fd, 0x81ff, 0x8203, 0x8207, 0x8208, 0x8209, 0x820a, 0x820b,
+  0x820e, 0x820f, 0x8211, 0x8213, 0x8215, 0x8216, 0x8217, 0x8218,
+  0x8219, 0x821a, 0x821d, 0x8220, 0x8224, 0x8225, 0x8226, 0x8227,
+  0x8229, 0x822e, 0x8232, 0x823a, 0x823c, 0x823d, 0x823f, 0x8240,
+  0x8241, 0x8242, 0x8243, 0x8245, 0x8246, 0x8248, 0x824a, 0x824c,
+  0x824d, 0x824e, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255,
+  0x8256, 0x8257, 0x8259, 0x825b, 0x825c, 0x825d, 0x825e, 0x8260,
+  0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, 0x8267, 0x8269,
+  0x62e7, 0x6cde, 0x725b, 0x626d, 0x94ae, 0x7ebd, 0x8113, 0x6d53,
+  0x519c, 0x5f04, 0x5974, 0x52aa, 0x6012, 0x5973, 0x6696, 0x8650,
+  0x759f, 0x632a, 0x61e6, 0x7cef, 0x8bfa, 0x54e6, 0x6b27, 0x9e25,
+  0x6bb4, 0x85d5, 0x5455, 0x5076, 0x6ca4, 0x556a, 0x8db4, 0x722c,
+  0x5e15, 0x6015, 0x7436, 0x62cd, 0x6392, 0x724c, 0x5f98, 0x6e43,
+  0x6d3e, 0x6500, 0x6f58, 0x76d8, 0x78d0, 0x76fc, 0x7554, 0x5224,
+  0x53db, 0x4e53, 0x5e9e, 0x65c1, 0x802a, 0x80d6, 0x629b, 0x5486,
+  0x5228, 0x70ae, 0x888d, 0x8dd1, 0x6ce1, 0x5478, 0x80da, 0x57f9,
+  0x88f4, 0x8d54, 0x966a, 0x914d, 0x4f69, 0x6c9b, 0x55b7, 0x76c6,
+  0x7830, 0x62a8, 0x70f9, 0x6f8e, 0x5f6d, 0x84ec, 0x68da, 0x787c,
+  0x7bf7, 0x81a8, 0x670b, 0x9e4f, 0x6367, 0x78b0, 0x576f, 0x7812,
+  0x9739, 0x6279, 0x62ab, 0x5288, 0x7435, 0x6bd7,
+  /* 0xc6 */
+  0x826a, 0x826b, 0x826c, 0x826d, 0x8271, 0x8275, 0x8276, 0x8277,
+  0x8278, 0x827b, 0x827c, 0x8280, 0x8281, 0x8283, 0x8285, 0x8286,
+  0x8287, 0x8289, 0x828c, 0x8290, 0x8293, 0x8294, 0x8295, 0x8296,
+  0x829a, 0x829b, 0x829e, 0x82a0, 0x82a2, 0x82a3, 0x82a7, 0x82b2,
+  0x82b5, 0x82b6, 0x82ba, 0x82bb, 0x82bc, 0x82bf, 0x82c0, 0x82c2,
+  0x82c3, 0x82c5, 0x82c6, 0x82c9, 0x82d0, 0x82d6, 0x82d9, 0x82da,
+  0x82dd, 0x82e2, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82ec, 0x82ed,
+  0x82ee, 0x82f0, 0x82f2, 0x82f3, 0x82f5, 0x82f6, 0x82f8, 0x82fa,
+  0x82fc, 0x82fd, 0x82fe, 0x82ff, 0x8300, 0x830a, 0x830b, 0x830d,
+  0x8310, 0x8312, 0x8313, 0x8316, 0x8318, 0x8319, 0x831d, 0x831e,
+  0x831f, 0x8320, 0x8321, 0x8322, 0x8323, 0x8324, 0x8325, 0x8326,
+  0x8329, 0x832a, 0x832e, 0x8330, 0x8332, 0x8337, 0x833b, 0x833d,
+  0x5564, 0x813e, 0x75b2, 0x76ae, 0x5339, 0x75de, 0x50fb, 0x5c41,
+  0x8b6c, 0x7bc7, 0x504f, 0x7247, 0x9a97, 0x98d8, 0x6f02, 0x74e2,
+  0x7968, 0x6487, 0x77a5, 0x62fc, 0x9891, 0x8d2b, 0x54c1, 0x8058,
+  0x4e52, 0x576a, 0x82f9, 0x840d, 0x5e73, 0x51ed, 0x74f6, 0x8bc4,
+  0x5c4f, 0x5761, 0x6cfc, 0x9887, 0x5a46, 0x7834, 0x9b44, 0x8feb,
+  0x7c95, 0x5256, 0x6251, 0x94fa, 0x4ec6, 0x8386, 0x8461, 0x83e9,
+  0x84b2, 0x57d4, 0x6734, 0x5703, 0x666e, 0x6d66, 0x8c31, 0x66dd,
+  0x7011, 0x671f, 0x6b3a, 0x6816, 0x621a, 0x59bb, 0x4e03, 0x51c4,
+  0x6f06, 0x67d2, 0x6c8f, 0x5176, 0x68cb, 0x5947, 0x6b67, 0x7566,
+  0x5d0e, 0x8110, 0x9f50, 0x65d7, 0x7948, 0x7941, 0x9a91, 0x8d77,
+  0x5c82, 0x4e5e, 0x4f01, 0x542f, 0x5951, 0x780c, 0x5668, 0x6c14,
+  0x8fc4, 0x5f03, 0x6c7d, 0x6ce3, 0x8bab, 0x6390,
+  /* 0xc7 */
+  0x833e, 0x833f, 0x8341, 0x8342, 0x8344, 0x8345, 0x8348, 0x834a,
+  0x834b, 0x834c, 0x834d, 0x834e, 0x8353, 0x8355, 0x8356, 0x8357,
+  0x8358, 0x8359, 0x835d, 0x8362, 0x8370, 0x8371, 0x8372, 0x8373,
+  0x8374, 0x8375, 0x8376, 0x8379, 0x837a, 0x837e, 0x837f, 0x8380,
+  0x8381, 0x8382, 0x8383, 0x8384, 0x8387, 0x8388, 0x838a, 0x838b,
+  0x838c, 0x838d, 0x838f, 0x8390, 0x8391, 0x8394, 0x8395, 0x8396,
+  0x8397, 0x8399, 0x839a, 0x839d, 0x839f, 0x83a1, 0x83a2, 0x83a3,
+  0x83a4, 0x83a5, 0x83a6, 0x83a7, 0x83ac, 0x83ad, 0x83ae, 0x83af,
+  0x83b5, 0x83bb, 0x83be, 0x83bf, 0x83c2, 0x83c3, 0x83c4, 0x83c6,
+  0x83c8, 0x83c9, 0x83cb, 0x83cd, 0x83ce, 0x83d0, 0x83d1, 0x83d2,
+  0x83d3, 0x83d5, 0x83d7, 0x83d9, 0x83da, 0x83db, 0x83de, 0x83e2,
+  0x83e3, 0x83e4, 0x83e6, 0x83e7, 0x83e8, 0x83eb, 0x83ec, 0x83ed,
+  0x6070, 0x6d3d, 0x7275, 0x6266, 0x948e, 0x94c5, 0x5343, 0x8fc1,
+  0x7b7e, 0x4edf, 0x8c26, 0x4e7e, 0x9ed4, 0x94b1, 0x94b3, 0x524d,
+  0x6f5c, 0x9063, 0x6d45, 0x8c34, 0x5811, 0x5d4c, 0x6b20, 0x6b49,
+  0x67aa, 0x545b, 0x8154, 0x7f8c, 0x5899, 0x8537, 0x5f3a, 0x62a2,
+  0x6a47, 0x9539, 0x6572, 0x6084, 0x6865, 0x77a7, 0x4e54, 0x4fa8,
+  0x5de7, 0x9798, 0x64ac, 0x7fd8, 0x5ced, 0x4fcf, 0x7a8d, 0x5207,
+  0x8304, 0x4e14, 0x602f, 0x7a83, 0x94a6, 0x4fb5, 0x4eb2, 0x79e6,
+  0x7434, 0x52e4, 0x82b9, 0x64d2, 0x79bd, 0x5bdd, 0x6c81, 0x9752,
+  0x8f7b, 0x6c22, 0x503e, 0x537f, 0x6e05, 0x64ce, 0x6674, 0x6c30,
+  0x60c5, 0x9877, 0x8bf7, 0x5e86, 0x743c, 0x7a77, 0x79cb, 0x4e18,
+  0x90b1, 0x7403, 0x6c42, 0x56da, 0x914b, 0x6cc5, 0x8d8b, 0x533a,
+  0x86c6, 0x66f2, 0x8eaf, 0x5c48, 0x9a71, 0x6e20,
+  /* 0xc8 */
+  0x83ee, 0x83ef, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7, 0x83fa,
+  0x83fb, 0x83fc, 0x83fe, 0x83ff, 0x8400, 0x8402, 0x8405, 0x8407,
+  0x8408, 0x8409, 0x840a, 0x8410, 0x8412, 0x8413, 0x8414, 0x8415,
+  0x8416, 0x8417, 0x8419, 0x841a, 0x841b, 0x841e, 0x841f, 0x8420,
+  0x8421, 0x8422, 0x8423, 0x8429, 0x842a, 0x842b, 0x842c, 0x842d,
+  0x842e, 0x842f, 0x8430, 0x8432, 0x8433, 0x8434, 0x8435, 0x8436,
+  0x8437, 0x8439, 0x843a, 0x843b, 0x843e, 0x843f, 0x8440, 0x8441,
+  0x8442, 0x8443, 0x8444, 0x8445, 0x8447, 0x8448, 0x8449, 0x844a,
+  0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450, 0x8452, 0x8453,
+  0x8454, 0x8455, 0x8456, 0x8458, 0x845d, 0x845e, 0x845f, 0x8460,
+  0x8462, 0x8464, 0x8465, 0x8466, 0x8467, 0x8468, 0x846a, 0x846e,
+  0x846f, 0x8470, 0x8472, 0x8474, 0x8477, 0x8479, 0x847b, 0x847c,
+  0x53d6, 0x5a36, 0x9f8b, 0x8da3, 0x53bb, 0x5708, 0x98a7, 0x6743,
+  0x919b, 0x6cc9, 0x5168, 0x75ca, 0x62f3, 0x72ac, 0x5238, 0x529d,
+  0x7f3a, 0x7094, 0x7638, 0x5374, 0x9e4a, 0x69b7, 0x786e, 0x96c0,
+  0x88d9, 0x7fa4, 0x7136, 0x71c3, 0x5189, 0x67d3, 0x74e4, 0x58e4,
+  0x6518, 0x56b7, 0x8ba9, 0x9976, 0x6270, 0x7ed5, 0x60f9, 0x70ed,
+  0x58ec, 0x4ec1, 0x4eba, 0x5fcd, 0x97e7, 0x4efb, 0x8ba4, 0x5203,
+  0x598a, 0x7eab, 0x6254, 0x4ecd, 0x65e5, 0x620e, 0x8338, 0x84c9,
+  0x8363, 0x878d, 0x7194, 0x6eb6, 0x5bb9, 0x7ed2, 0x5197, 0x63c9,
+  0x67d4, 0x8089, 0x8339, 0x8815, 0x5112, 0x5b7a, 0x5982, 0x8fb1,
+  0x4e73, 0x6c5d, 0x5165, 0x8925, 0x8f6f, 0x962e, 0x854a, 0x745e,
+  0x9510, 0x95f0, 0x6da6, 0x82e5, 0x5f31, 0x6492, 0x6d12, 0x8428,
+  0x816e, 0x9cc3, 0x585e, 0x8d5b, 0x4e09, 0x53c1,
+  /* 0xc9 */
+  0x847d, 0x847e, 0x847f, 0x8480, 0x8481, 0x8483, 0x8484, 0x8485,
+  0x8486, 0x848a, 0x848d, 0x848f, 0x8490, 0x8491, 0x8492, 0x8493,
+  0x8494, 0x8495, 0x8496, 0x8498, 0x849a, 0x849b, 0x849d, 0x849e,
+  0x849f, 0x84a0, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7,
+  0x84a8, 0x84a9, 0x84aa, 0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84b0,
+  0x84b1, 0x84b3, 0x84b5, 0x84b6, 0x84b7, 0x84bb, 0x84bc, 0x84be,
+  0x84c0, 0x84c2, 0x84c3, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84cb,
+  0x84cc, 0x84ce, 0x84cf, 0x84d2, 0x84d4, 0x84d5, 0x84d7, 0x84d8,
+  0x84d9, 0x84da, 0x84db, 0x84dc, 0x84de, 0x84e1, 0x84e2, 0x84e4,
+  0x84e7, 0x84e8, 0x84e9, 0x84ea, 0x84eb, 0x84ed, 0x84ee, 0x84ef,
+  0x84f1, 0x84f2, 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, 0x84f8,
+  0x84f9, 0x84fa, 0x84fb, 0x84fd, 0x84fe, 0x8500, 0x8501, 0x8502,
+  0x4f1e, 0x6563, 0x6851, 0x55d3, 0x4e27, 0x6414, 0x9a9a, 0x626b,
+  0x5ac2, 0x745f, 0x8272, 0x6da9, 0x68ee, 0x50e7, 0x838e, 0x7802,
+  0x6740, 0x5239, 0x6c99, 0x7eb1, 0x50bb, 0x5565, 0x715e, 0x7b5b,
+  0x6652, 0x73ca, 0x82eb, 0x6749, 0x5c71, 0x5220, 0x717d, 0x886b,
+  0x95ea, 0x9655, 0x64c5, 0x8d61, 0x81b3, 0x5584, 0x6c55, 0x6247,
+  0x7f2e, 0x5892, 0x4f24, 0x5546, 0x8d4f, 0x664c, 0x4e0a, 0x5c1a,
+  0x88f3, 0x68a2, 0x634e, 0x7a0d, 0x70e7, 0x828d, 0x52fa, 0x97f6,
+  0x5c11, 0x54e8, 0x90b5, 0x7ecd, 0x5962, 0x8d4a, 0x86c7, 0x820c,
+  0x820d, 0x8d66, 0x6444, 0x5c04, 0x6151, 0x6d89, 0x793e, 0x8bbe,
+  0x7837, 0x7533, 0x547b, 0x4f38, 0x8eab, 0x6df1, 0x5a20, 0x7ec5,
+  0x795e, 0x6c88, 0x5ba1, 0x5a76, 0x751a, 0x80be, 0x614e, 0x6e17,
+  0x58f0, 0x751f, 0x7525, 0x7272, 0x5347, 0x7ef3,
+  /* 0xca */
+  0x8503, 0x8504, 0x8505, 0x8506, 0x8507, 0x8508, 0x8509, 0x850a,
+  0x850b, 0x850d, 0x850e, 0x850f, 0x8510, 0x8512, 0x8514, 0x8515,
+  0x8516, 0x8518, 0x8519, 0x851b, 0x851c, 0x851d, 0x851e, 0x8520,
+  0x8522, 0x8523, 0x8524, 0x8525, 0x8526, 0x8527, 0x8528, 0x8529,
+  0x852a, 0x852d, 0x852e, 0x852f, 0x8530, 0x8531, 0x8532, 0x8533,
+  0x8534, 0x8535, 0x8536, 0x853e, 0x853f, 0x8540, 0x8541, 0x8542,
+  0x8544, 0x8545, 0x8546, 0x8547, 0x854b, 0x854c, 0x854d, 0x854e,
+  0x854f, 0x8550, 0x8551, 0x8552, 0x8553, 0x8554, 0x8555, 0x8557,
+  0x8558, 0x855a, 0x855b, 0x855c, 0x855d, 0x855f, 0x8560, 0x8561,
+  0x8562, 0x8563, 0x8565, 0x8566, 0x8567, 0x8569, 0x856a, 0x856b,
+  0x856c, 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8573, 0x8575,
+  0x8576, 0x8577, 0x8578, 0x857c, 0x857d, 0x857f, 0x8580, 0x8581,
+  0x7701, 0x76db, 0x5269, 0x80dc, 0x5723, 0x5e08, 0x5931, 0x72ee,
+  0x65bd, 0x6e7f, 0x8bd7, 0x5c38, 0x8671, 0x5341, 0x77f3, 0x62fe,
+  0x65f6, 0x4ec0, 0x98df, 0x8680, 0x5b9e, 0x8bc6, 0x53f2, 0x77e2,
+  0x4f7f, 0x5c4e, 0x9a76, 0x59cb, 0x5f0f, 0x793a, 0x58eb, 0x4e16,
+  0x67ff, 0x4e8b, 0x62ed, 0x8a93, 0x901d, 0x52bf, 0x662f, 0x55dc,
+  0x566c, 0x9002, 0x4ed5, 0x4f8d, 0x91ca, 0x9970, 0x6c0f, 0x5e02,
+  0x6043, 0x5ba4, 0x89c6, 0x8bd5, 0x6536, 0x624b, 0x9996, 0x5b88,
+  0x5bff, 0x6388, 0x552e, 0x53d7, 0x7626, 0x517d, 0x852c, 0x67a2,
+  0x68b3, 0x6b8a, 0x6292, 0x8f93, 0x53d4, 0x8212, 0x6dd1, 0x758f,
+  0x4e66, 0x8d4e, 0x5b70, 0x719f, 0x85af, 0x6691, 0x66d9, 0x7f72,
+  0x8700, 0x9ecd, 0x9f20, 0x5c5e, 0x672f, 0x8ff0, 0x6811, 0x675f,
+  0x620d, 0x7ad6, 0x5885, 0x5eb6, 0x6570, 0x6f31,
+  /* 0xcb */
+  0x8582, 0x8583, 0x8586, 0x8588, 0x8589, 0x858a, 0x858b, 0x858c,
+  0x858d, 0x858e, 0x8590, 0x8591, 0x8592, 0x8593, 0x8594, 0x8595,
+  0x8596, 0x8597, 0x8598, 0x8599, 0x859a, 0x859d, 0x859e, 0x859f,
+  0x85a0, 0x85a1, 0x85a2, 0x85a3, 0x85a5, 0x85a6, 0x85a7, 0x85a9,
+  0x85ab, 0x85ac, 0x85ad, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5,
+  0x85b6, 0x85b8, 0x85ba, 0x85bb, 0x85bc, 0x85bd, 0x85be, 0x85bf,
+  0x85c0, 0x85c2, 0x85c3, 0x85c4, 0x85c5, 0x85c6, 0x85c7, 0x85c8,
+  0x85ca, 0x85cb, 0x85cc, 0x85cd, 0x85ce, 0x85d1, 0x85d2, 0x85d4,
+  0x85d6, 0x85d7, 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dd, 0x85de,
+  0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e5, 0x85e6, 0x85e7,
+  0x85e8, 0x85ea, 0x85eb, 0x85ec, 0x85ed, 0x85ee, 0x85ef, 0x85f0,
+  0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5, 0x85f6, 0x85f7, 0x85f8,
+  0x6055, 0x5237, 0x800d, 0x6454, 0x8870, 0x7529, 0x5e05, 0x6813,
+  0x62f4, 0x971c, 0x53cc, 0x723d, 0x8c01, 0x6c34, 0x7761, 0x7a0e,
+  0x542e, 0x77ac, 0x987a, 0x821c, 0x8bf4, 0x7855, 0x6714, 0x70c1,
+  0x65af, 0x6495, 0x5636, 0x601d, 0x79c1, 0x53f8, 0x4e1d, 0x6b7b,
+  0x8086, 0x5bfa, 0x55e3, 0x56db, 0x4f3a, 0x4f3c, 0x9972, 0x5df3,
+  0x677e, 0x8038, 0x6002, 0x9882, 0x9001, 0x5b8b, 0x8bbc, 0x8bf5,
+  0x641c, 0x8258, 0x64de, 0x55fd, 0x82cf, 0x9165, 0x4fd7, 0x7d20,
+  0x901f, 0x7c9f, 0x50f3, 0x5851, 0x6eaf, 0x5bbf, 0x8bc9, 0x8083,
+  0x9178, 0x849c, 0x7b97, 0x867d, 0x968b, 0x968f, 0x7ee5, 0x9ad3,
+  0x788e, 0x5c81, 0x7a57, 0x9042, 0x96a7, 0x795f, 0x5b59, 0x635f,
+  0x7b0b, 0x84d1, 0x68ad, 0x5506, 0x7f29, 0x7410, 0x7d22, 0x9501,
+  0x6240, 0x584c, 0x4ed6, 0x5b83, 0x5979, 0x5854,
+  /* 0xcc */
+  0x85f9, 0x85fa, 0x85fc, 0x85fd, 0x85fe, 0x8600, 0x8601, 0x8602,
+  0x8603, 0x8604, 0x8606, 0x8607, 0x8608, 0x8609, 0x860a, 0x860b,
+  0x860c, 0x860d, 0x860e, 0x860f, 0x8610, 0x8612, 0x8613, 0x8614,
+  0x8615, 0x8617, 0x8618, 0x8619, 0x861a, 0x861b, 0x861c, 0x861d,
+  0x861e, 0x861f, 0x8620, 0x8621, 0x8622, 0x8623, 0x8624, 0x8625,
+  0x8626, 0x8628, 0x862a, 0x862b, 0x862c, 0x862d, 0x862e, 0x862f,
+  0x8630, 0x8631, 0x8632, 0x8633, 0x8634, 0x8635, 0x8636, 0x8637,
+  0x8639, 0x863a, 0x863b, 0x863d, 0x863e, 0x863f, 0x8640, 0x8641,
+  0x8642, 0x8643, 0x8644, 0x8645, 0x8646, 0x8647, 0x8648, 0x8649,
+  0x864a, 0x864b, 0x864c, 0x8652, 0x8653, 0x8655, 0x8656, 0x8657,
+  0x8658, 0x8659, 0x865b, 0x865c, 0x865d, 0x865f, 0x8660, 0x8661,
+  0x8663, 0x8664, 0x8665, 0x8666, 0x8667, 0x8668, 0x8669, 0x866a,
+  0x736d, 0x631e, 0x8e4b, 0x8e0f, 0x80ce, 0x82d4, 0x62ac, 0x53f0,
+  0x6cf0, 0x915e, 0x592a, 0x6001, 0x6c70, 0x574d, 0x644a, 0x8d2a,
+  0x762b, 0x6ee9, 0x575b, 0x6a80, 0x75f0, 0x6f6d, 0x8c2d, 0x8c08,
+  0x5766, 0x6bef, 0x8892, 0x78b3, 0x63a2, 0x53f9, 0x70ad, 0x6c64,
+  0x5858, 0x642a, 0x5802, 0x68e0, 0x819b, 0x5510, 0x7cd6, 0x5018,
+  0x8eba, 0x6dcc, 0x8d9f, 0x70eb, 0x638f, 0x6d9b, 0x6ed4, 0x7ee6,
+  0x8404, 0x6843, 0x9003, 0x6dd8, 0x9676, 0x8ba8, 0x5957, 0x7279,
+  0x85e4, 0x817e, 0x75bc, 0x8a8a, 0x68af, 0x5254, 0x8e22, 0x9511,
+  0x63d0, 0x9898, 0x8e44, 0x557c, 0x4f53, 0x66ff, 0x568f, 0x60d5,
+  0x6d95, 0x5243, 0x5c49, 0x5929, 0x6dfb, 0x586b, 0x7530, 0x751c,
+  0x606c, 0x8214, 0x8146, 0x6311, 0x6761, 0x8fe2, 0x773a, 0x8df3,
+  0x8d34, 0x94c1, 0x5e16, 0x5385, 0x542c, 0x70c3,
+  /* 0xcd */
+  0x866d, 0x866f, 0x8670, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676,
+  0x8677, 0x8678, 0x8683, 0x8684, 0x8685, 0x8686, 0x8687, 0x8688,
+  0x8689, 0x868e, 0x868f, 0x8690, 0x8691, 0x8692, 0x8694, 0x8696,
+  0x8697, 0x8698, 0x8699, 0x869a, 0x869b, 0x869e, 0x869f, 0x86a0,
+  0x86a1, 0x86a2, 0x86a5, 0x86a6, 0x86ab, 0x86ad, 0x86ae, 0x86b2,
+  0x86b3, 0x86b7, 0x86b8, 0x86b9, 0x86bb, 0x86bc, 0x86bd, 0x86be,
+  0x86bf, 0x86c1, 0x86c2, 0x86c3, 0x86c5, 0x86c8, 0x86cc, 0x86cd,
+  0x86d2, 0x86d3, 0x86d5, 0x86d6, 0x86d7, 0x86da, 0x86dc, 0x86dd,
+  0x86e0, 0x86e1, 0x86e2, 0x86e3, 0x86e5, 0x86e6, 0x86e7, 0x86e8,
+  0x86ea, 0x86eb, 0x86ec, 0x86ef, 0x86f5, 0x86f6, 0x86f7, 0x86fa,
+  0x86fb, 0x86fc, 0x86fd, 0x86ff, 0x8701, 0x8704, 0x8705, 0x8706,
+  0x870b, 0x870c, 0x870e, 0x870f, 0x8710, 0x8711, 0x8714, 0x8716,
+  0x6c40, 0x5ef7, 0x505c, 0x4ead, 0x5ead, 0x633a, 0x8247, 0x901a,
+  0x6850, 0x916e, 0x77b3, 0x540c, 0x94dc, 0x5f64, 0x7ae5, 0x6876,
+  0x6345, 0x7b52, 0x7edf, 0x75db, 0x5077, 0x6295, 0x5934, 0x900f,
+  0x51f8, 0x79c3, 0x7a81, 0x56fe, 0x5f92, 0x9014, 0x6d82, 0x5c60,
+  0x571f, 0x5410, 0x5154, 0x6e4d, 0x56e2, 0x63a8, 0x9893, 0x817f,
+  0x8715, 0x892a, 0x9000, 0x541e, 0x5c6f, 0x81c0, 0x62d6, 0x6258,
+  0x8131, 0x9e35, 0x9640, 0x9a6e, 0x9a7c, 0x692d, 0x59a5, 0x62d3,
+  0x553e, 0x6316, 0x54c7, 0x86d9, 0x6d3c, 0x5a03, 0x74e6, 0x889c,
+  0x6b6a, 0x5916, 0x8c4c, 0x5f2f, 0x6e7e, 0x73a9, 0x987d, 0x4e38,
+  0x70f7, 0x5b8c, 0x7897, 0x633d, 0x665a, 0x7696, 0x60cb, 0x5b9b,
+  0x5a49, 0x4e07, 0x8155, 0x6c6a, 0x738b, 0x4ea1, 0x6789, 0x7f51,
+  0x5f80, 0x65fa, 0x671b, 0x5fd8, 0x5984, 0x5a01,
+  /* 0xce */
+  0x8719, 0x871b, 0x871d, 0x871f, 0x8720, 0x8724, 0x8726, 0x8727,
+  0x8728, 0x872a, 0x872b, 0x872c, 0x872d, 0x872f, 0x8730, 0x8732,
+  0x8733, 0x8735, 0x8736, 0x8738, 0x8739, 0x873a, 0x873c, 0x873d,
+  0x8740, 0x8741, 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x874a,
+  0x874b, 0x874d, 0x874f, 0x8750, 0x8751, 0x8752, 0x8754, 0x8755,
+  0x8756, 0x8758, 0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f,
+  0x8761, 0x8762, 0x8766, 0x8767, 0x8768, 0x8769, 0x876a, 0x876b,
+  0x876c, 0x876d, 0x876f, 0x8771, 0x8772, 0x8773, 0x8775, 0x8777,
+  0x8778, 0x8779, 0x877a, 0x877f, 0x8780, 0x8781, 0x8784, 0x8786,
+  0x8787, 0x8789, 0x878a, 0x878c, 0x878e, 0x878f, 0x8790, 0x8791,
+  0x8792, 0x8794, 0x8795, 0x8796, 0x8798, 0x8799, 0x879a, 0x879b,
+  0x879c, 0x879d, 0x879e, 0x87a0, 0x87a1, 0x87a2, 0x87a3, 0x87a4,
+  0x5dcd, 0x5fae, 0x5371, 0x97e6, 0x8fdd, 0x6845, 0x56f4, 0x552f,
+  0x60df, 0x4e3a, 0x6f4d, 0x7ef4, 0x82c7, 0x840e, 0x59d4, 0x4f1f,
+  0x4f2a, 0x5c3e, 0x7eac, 0x672a, 0x851a, 0x5473, 0x754f, 0x80c3,
+  0x5582, 0x9b4f, 0x4f4d, 0x6e2d, 0x8c13, 0x5c09, 0x6170, 0x536b,
+  0x761f, 0x6e29, 0x868a, 0x6587, 0x95fb, 0x7eb9, 0x543b, 0x7a33,
+  0x7d0a, 0x95ee, 0x55e1, 0x7fc1, 0x74ee, 0x631d, 0x8717, 0x6da1,
+  0x7a9d, 0x6211, 0x65a1, 0x5367, 0x63e1, 0x6c83, 0x5deb, 0x545c,
+  0x94a8, 0x4e4c, 0x6c61, 0x8bec, 0x5c4b, 0x65e0, 0x829c, 0x68a7,
+  0x543e, 0x5434, 0x6bcb, 0x6b66, 0x4e94, 0x6342, 0x5348, 0x821e,
+  0x4f0d, 0x4fae, 0x575e, 0x620a, 0x96fe, 0x6664, 0x7269, 0x52ff,
+  0x52a1, 0x609f, 0x8bef, 0x6614, 0x7199, 0x6790, 0x897f, 0x7852,
+  0x77fd, 0x6670, 0x563b, 0x5438, 0x9521, 0x727a,
+  /* 0xcf */
+  0x87a5, 0x87a6, 0x87a7, 0x87a9, 0x87aa, 0x87ae, 0x87b0, 0x87b1,
+  0x87b2, 0x87b4, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87bb, 0x87bc,
+  0x87be, 0x87bf, 0x87c1, 0x87c2, 0x87c3, 0x87c4, 0x87c5, 0x87c7,
+  0x87c8, 0x87c9, 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d4,
+  0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87dc, 0x87dd,
+  0x87de, 0x87df, 0x87e1, 0x87e2, 0x87e3, 0x87e4, 0x87e6, 0x87e7,
+  0x87e8, 0x87e9, 0x87eb, 0x87ec, 0x87ed, 0x87ef, 0x87f0, 0x87f1,
+  0x87f2, 0x87f3, 0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0x87fa,
+  0x87fb, 0x87fc, 0x87fd, 0x87ff, 0x8800, 0x8801, 0x8802, 0x8804,
+  0x8805, 0x8806, 0x8807, 0x8808, 0x8809, 0x880b, 0x880c, 0x880d,
+  0x880e, 0x880f, 0x8810, 0x8811, 0x8812, 0x8814, 0x8817, 0x8818,
+  0x8819, 0x881a, 0x881c, 0x881d, 0x881e, 0x881f, 0x8820, 0x8823,
+  0x7a00, 0x606f, 0x5e0c, 0x6089, 0x819d, 0x5915, 0x60dc, 0x7184,
+  0x70ef, 0x6eaa, 0x6c50, 0x7280, 0x6a84, 0x88ad, 0x5e2d, 0x4e60,
+  0x5ab3, 0x559c, 0x94e3, 0x6d17, 0x7cfb, 0x9699, 0x620f, 0x7ec6,
+  0x778e, 0x867e, 0x5323, 0x971e, 0x8f96, 0x6687, 0x5ce1, 0x4fa0,
+  0x72ed, 0x4e0b, 0x53a6, 0x590f, 0x5413, 0x6380, 0x9528, 0x5148,
+  0x4ed9, 0x9c9c, 0x7ea4, 0x54b8, 0x8d24, 0x8854, 0x8237, 0x95f2,
+  0x6d8e, 0x5f26, 0x5acc, 0x663e, 0x9669, 0x73b0, 0x732e, 0x53bf,
+  0x817a, 0x9985, 0x7fa1, 0x5baa, 0x9677, 0x9650, 0x7ebf, 0x76f8,
+  0x53a2, 0x9576, 0x9999, 0x7bb1, 0x8944, 0x6e58, 0x4e61, 0x7fd4,
+  0x7965, 0x8be6, 0x60f3, 0x54cd, 0x4eab, 0x9879, 0x5df7, 0x6a61,
+  0x50cf, 0x5411, 0x8c61, 0x8427, 0x785d, 0x9704, 0x524a, 0x54ee,
+  0x56a3, 0x9500, 0x6d88, 0x5bb5, 0x6dc6, 0x6653,
+  /* 0xd0 */
+  0x8824, 0x8825, 0x8826, 0x8827, 0x8828, 0x8829, 0x882a, 0x882b,
+  0x882c, 0x882d, 0x882e, 0x882f, 0x8830, 0x8831, 0x8833, 0x8834,
+  0x8835, 0x8836, 0x8837, 0x8838, 0x883a, 0x883b, 0x883d, 0x883e,
+  0x883f, 0x8841, 0x8842, 0x8843, 0x8846, 0x8847, 0x8848, 0x8849,
+  0x884a, 0x884b, 0x884e, 0x884f, 0x8850, 0x8851, 0x8852, 0x8853,
+  0x8855, 0x8856, 0x8858, 0x885a, 0x885b, 0x885c, 0x885d, 0x885e,
+  0x885f, 0x8860, 0x8866, 0x8867, 0x886a, 0x886d, 0x886f, 0x8871,
+  0x8873, 0x8874, 0x8875, 0x8876, 0x8878, 0x8879, 0x887a, 0x887b,
+  0x887c, 0x8880, 0x8883, 0x8886, 0x8887, 0x8889, 0x888a, 0x888c,
+  0x888e, 0x888f, 0x8890, 0x8891, 0x8893, 0x8894, 0x8895, 0x8897,
+  0x8898, 0x8899, 0x889a, 0x889b, 0x889d, 0x889e, 0x889f, 0x88a0,
+  0x88a1, 0x88a3, 0x88a5, 0x88a6, 0x88a7, 0x88a8, 0x88a9, 0x88aa,
+  0x5c0f, 0x5b5d, 0x6821, 0x8096, 0x5578, 0x7b11, 0x6548, 0x6954,
+  0x4e9b, 0x6b47, 0x874e, 0x978b, 0x534f, 0x631f, 0x643a, 0x90aa,
+  0x659c, 0x80c1, 0x8c10, 0x5199, 0x68b0, 0x5378, 0x87f9, 0x61c8,
+  0x6cc4, 0x6cfb, 0x8c22, 0x5c51, 0x85aa, 0x82af, 0x950c, 0x6b23,
+  0x8f9b, 0x65b0, 0x5ffb, 0x5fc3, 0x4fe1, 0x8845, 0x661f, 0x8165,
+  0x7329, 0x60fa, 0x5174, 0x5211, 0x578b, 0x5f62, 0x90a2, 0x884c,
+  0x9192, 0x5e78, 0x674f, 0x6027, 0x59d3, 0x5144, 0x51f6, 0x80f8,
+  0x5308, 0x6c79, 0x96c4, 0x718a, 0x4f11, 0x4fee, 0x7f9e, 0x673d,
+  0x55c5, 0x9508, 0x79c0, 0x8896, 0x7ee3, 0x589f, 0x620c, 0x9700,
+  0x865a, 0x5618, 0x987b, 0x5f90, 0x8bb8, 0x84c4, 0x9157, 0x53d9,
+  0x65ed, 0x5e8f, 0x755c, 0x6064, 0x7d6e, 0x5a7f, 0x7eea, 0x7eed,
+  0x8f69, 0x55a7, 0x5ba3, 0x60ac, 0x65cb, 0x7384,
+  /* 0xd1 */
+  0x88ac, 0x88ae, 0x88af, 0x88b0, 0x88b2, 0x88b3, 0x88b4, 0x88b5,
+  0x88b6, 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bd, 0x88be, 0x88bf,
+  0x88c0, 0x88c3, 0x88c4, 0x88c7, 0x88c8, 0x88ca, 0x88cb, 0x88cc,
+  0x88cd, 0x88cf, 0x88d0, 0x88d1, 0x88d3, 0x88d6, 0x88d7, 0x88da,
+  0x88db, 0x88dc, 0x88dd, 0x88de, 0x88e0, 0x88e1, 0x88e6, 0x88e7,
+  0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, 0x88f2,
+  0x88f5, 0x88f6, 0x88f7, 0x88fa, 0x88fb, 0x88fd, 0x88ff, 0x8900,
+  0x8901, 0x8903, 0x8904, 0x8905, 0x8906, 0x8907, 0x8908, 0x8909,
+  0x890b, 0x890c, 0x890d, 0x890e, 0x890f, 0x8911, 0x8914, 0x8915,
+  0x8916, 0x8917, 0x8918, 0x891c, 0x891d, 0x891e, 0x891f, 0x8920,
+  0x8922, 0x8923, 0x8924, 0x8926, 0x8927, 0x8928, 0x8929, 0x892c,
+  0x892d, 0x892e, 0x892f, 0x8931, 0x8932, 0x8933, 0x8935, 0x8937,
+  0x9009, 0x7663, 0x7729, 0x7eda, 0x9774, 0x859b, 0x5b66, 0x7a74,
+  0x96ea, 0x8840, 0x52cb, 0x718f, 0x5faa, 0x65ec, 0x8be2, 0x5bfb,
+  0x9a6f, 0x5de1, 0x6b89, 0x6c5b, 0x8bad, 0x8baf, 0x900a, 0x8fc5,
+  0x538b, 0x62bc, 0x9e26, 0x9e2d, 0x5440, 0x4e2b, 0x82bd, 0x7259,
+  0x869c, 0x5d16, 0x8859, 0x6daf, 0x96c5, 0x54d1, 0x4e9a, 0x8bb6,
+  0x7109, 0x54bd, 0x9609, 0x70df, 0x6df9, 0x76d0, 0x4e25, 0x7814,
+  0x8712, 0x5ca9, 0x5ef6, 0x8a00, 0x989c, 0x960e, 0x708e, 0x6cbf,
+  0x5944, 0x63a9, 0x773c, 0x884d, 0x6f14, 0x8273, 0x5830, 0x71d5,
+  0x538c, 0x781a, 0x96c1, 0x5501, 0x5f66, 0x7130, 0x5bb4, 0x8c1a,
+  0x9a8c, 0x6b83, 0x592e, 0x9e2f, 0x79e7, 0x6768, 0x626c, 0x4f6f,
+  0x75a1, 0x7f8a, 0x6d0b, 0x9633, 0x6c27, 0x4ef0, 0x75d2, 0x517b,
+  0x6837, 0x6f3e, 0x9080, 0x8170, 0x5996, 0x7476,
+  /* 0xd2 */
+  0x8938, 0x8939, 0x893a, 0x893b, 0x893c, 0x893d, 0x893e, 0x893f,
+  0x8940, 0x8942, 0x8943, 0x8945, 0x8946, 0x8947, 0x8948, 0x8949,
+  0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f, 0x8950, 0x8951,
+  0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957, 0x8958, 0x8959,
+  0x895a, 0x895b, 0x895c, 0x895d, 0x8960, 0x8961, 0x8962, 0x8963,
+  0x8964, 0x8965, 0x8967, 0x8968, 0x8969, 0x896a, 0x896b, 0x896c,
+  0x896d, 0x896e, 0x896f, 0x8970, 0x8971, 0x8972, 0x8973, 0x8974,
+  0x8975, 0x8976, 0x8977, 0x8978, 0x8979, 0x897a, 0x897c, 0x897d,
+  0x897e, 0x8980, 0x8982, 0x8984, 0x8985, 0x8987, 0x8988, 0x8989,
+  0x898a, 0x898b, 0x898c, 0x898d, 0x898e, 0x898f, 0x8990, 0x8991,
+  0x8992, 0x8993, 0x8994, 0x8995, 0x8996, 0x8997, 0x8998, 0x8999,
+  0x899a, 0x899b, 0x899c, 0x899d, 0x899e, 0x899f, 0x89a0, 0x89a1,
+  0x6447, 0x5c27, 0x9065, 0x7a91, 0x8c23, 0x59da, 0x54ac, 0x8200,
+  0x836f, 0x8981, 0x8000, 0x6930, 0x564e, 0x8036, 0x7237, 0x91ce,
+  0x51b6, 0x4e5f, 0x9875, 0x6396, 0x4e1a, 0x53f6, 0x66f3, 0x814b,
+  0x591c, 0x6db2, 0x4e00, 0x58f9, 0x533b, 0x63d6, 0x94f1, 0x4f9d,
+  0x4f0a, 0x8863, 0x9890, 0x5937, 0x9057, 0x79fb, 0x4eea, 0x80f0,
+  0x7591, 0x6c82, 0x5b9c, 0x59e8, 0x5f5d, 0x6905, 0x8681, 0x501a,
+  0x5df2, 0x4e59, 0x77e3, 0x4ee5, 0x827a, 0x6291, 0x6613, 0x9091,
+  0x5c79, 0x4ebf, 0x5f79, 0x81c6, 0x9038, 0x8084, 0x75ab, 0x4ea6,
+  0x88d4, 0x610f, 0x6bc5, 0x5fc6, 0x4e49, 0x76ca, 0x6ea2, 0x8be3,
+  0x8bae, 0x8c0a, 0x8bd1, 0x5f02, 0x7ffc, 0x7fcc, 0x7ece, 0x8335,
+  0x836b, 0x56e0, 0x6bb7, 0x97f3, 0x9634, 0x59fb, 0x541f, 0x94f6,
+  0x6deb, 0x5bc5, 0x996e, 0x5c39, 0x5f15, 0x9690,
+  /* 0xd3 */
+  0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, 0x89a9,
+  0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1,
+  0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9,
+  0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, 0x89c0, 0x89c3,
+  0x89cd, 0x89d3, 0x89d4, 0x89d5, 0x89d7, 0x89d8, 0x89d9, 0x89db,
+  0x89dd, 0x89df, 0x89e0, 0x89e1, 0x89e2, 0x89e4, 0x89e7, 0x89e8,
+  0x89e9, 0x89ea, 0x89ec, 0x89ed, 0x89ee, 0x89f0, 0x89f1, 0x89f2,
+  0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, 0x89fa, 0x89fb,
+  0x89fc, 0x89fd, 0x89fe, 0x89ff, 0x8a01, 0x8a02, 0x8a03, 0x8a04,
+  0x8a05, 0x8a06, 0x8a08, 0x8a09, 0x8a0a, 0x8a0b, 0x8a0c, 0x8a0d,
+  0x8a0e, 0x8a0f, 0x8a10, 0x8a11, 0x8a12, 0x8a13, 0x8a14, 0x8a15,
+  0x8a16, 0x8a17, 0x8a18, 0x8a19, 0x8a1a, 0x8a1b, 0x8a1c, 0x8a1d,
+  0x5370, 0x82f1, 0x6a31, 0x5a74, 0x9e70, 0x5e94, 0x7f28, 0x83b9,
+  0x8424, 0x8425, 0x8367, 0x8747, 0x8fce, 0x8d62, 0x76c8, 0x5f71,
+  0x9896, 0x786c, 0x6620, 0x54df, 0x62e5, 0x4f63, 0x81c3, 0x75c8,
+  0x5eb8, 0x96cd, 0x8e0a, 0x86f9, 0x548f, 0x6cf3, 0x6d8c, 0x6c38,
+  0x607f, 0x52c7, 0x7528, 0x5e7d, 0x4f18, 0x60a0, 0x5fe7, 0x5c24,
+  0x7531, 0x90ae, 0x94c0, 0x72b9, 0x6cb9, 0x6e38, 0x9149, 0x6709,
+  0x53cb, 0x53f3, 0x4f51, 0x91c9, 0x8bf1, 0x53c8, 0x5e7c, 0x8fc2,
+  0x6de4, 0x4e8e, 0x76c2, 0x6986, 0x865e, 0x611a, 0x8206, 0x4f59,
+  0x4fde, 0x903e, 0x9c7c, 0x6109, 0x6e1d, 0x6e14, 0x9685, 0x4e88,
+  0x5a31, 0x96e8, 0x4e0e, 0x5c7f, 0x79b9, 0x5b87, 0x8bed, 0x7fbd,
+  0x7389, 0x57df, 0x828b, 0x90c1, 0x5401, 0x9047, 0x55bb, 0x5cea,
+  0x5fa1, 0x6108, 0x6b32, 0x72f1, 0x80b2, 0x8a89,
+  /* 0xd4 */
+  0x8a1e, 0x8a1f, 0x8a20, 0x8a21, 0x8a22, 0x8a23, 0x8a24, 0x8a25,
+  0x8a26, 0x8a27, 0x8a28, 0x8a29, 0x8a2a, 0x8a2b, 0x8a2c, 0x8a2d,
+  0x8a2e, 0x8a2f, 0x8a30, 0x8a31, 0x8a32, 0x8a33, 0x8a34, 0x8a35,
+  0x8a36, 0x8a37, 0x8a38, 0x8a39, 0x8a3a, 0x8a3b, 0x8a3c, 0x8a3d,
+  0x8a3f, 0x8a40, 0x8a41, 0x8a42, 0x8a43, 0x8a44, 0x8a45, 0x8a46,
+  0x8a47, 0x8a49, 0x8a4a, 0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f,
+  0x8a50, 0x8a51, 0x8a52, 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57,
+  0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x8a5f,
+  0x8a60, 0x8a61, 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67,
+  0x8a68, 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f,
+  0x8a70, 0x8a71, 0x8a72, 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77,
+  0x8a78, 0x8a7a, 0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8a7f, 0x8a80,
+  0x6d74, 0x5bd3, 0x88d5, 0x9884, 0x8c6b, 0x9a6d, 0x9e33, 0x6e0a,
+  0x51a4, 0x5143, 0x57a3, 0x8881, 0x539f, 0x63f4, 0x8f95, 0x56ed,
+  0x5458, 0x5706, 0x733f, 0x6e90, 0x7f18, 0x8fdc, 0x82d1, 0x613f,
+  0x6028, 0x9662, 0x66f0, 0x7ea6, 0x8d8a, 0x8dc3, 0x94a5, 0x5cb3,
+  0x7ca4, 0x6708, 0x60a6, 0x9605, 0x8018, 0x4e91, 0x90e7, 0x5300,
+  0x9668, 0x5141, 0x8fd0, 0x8574, 0x915d, 0x6655, 0x97f5, 0x5b55,
+  0x531d, 0x7838, 0x6742, 0x683d, 0x54c9, 0x707e, 0x5bb0, 0x8f7d,
+  0x518d, 0x5728, 0x54b1, 0x6512, 0x6682, 0x8d5e, 0x8d43, 0x810f,
+  0x846c, 0x906d, 0x7cdf, 0x51ff, 0x85fb, 0x67a3, 0x65e9, 0x6fa1,
+  0x86a4, 0x8e81, 0x566a, 0x9020, 0x7682, 0x7076, 0x71e5, 0x8d23,
+  0x62e9, 0x5219, 0x6cfd, 0x8d3c, 0x600e, 0x589e, 0x618e, 0x66fe,
+  0x8d60, 0x624e, 0x55b3, 0x6e23, 0x672d, 0x8f67,
+  /* 0xd5 */
+  0x8a81, 0x8a82, 0x8a83, 0x8a84, 0x8a85, 0x8a86, 0x8a87, 0x8a88,
+  0x8a8b, 0x8a8c, 0x8a8d, 0x8a8e, 0x8a8f, 0x8a90, 0x8a91, 0x8a92,
+  0x8a94, 0x8a95, 0x8a96, 0x8a97, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b,
+  0x8a9c, 0x8a9d, 0x8a9e, 0x8a9f, 0x8aa0, 0x8aa1, 0x8aa2, 0x8aa3,
+  0x8aa4, 0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab,
+  0x8aac, 0x8aad, 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3,
+  0x8ab4, 0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, 0x8aba, 0x8abb,
+  0x8abc, 0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, 0x8ac3,
+  0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, 0x8acb,
+  0x8acc, 0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad2, 0x8ad3,
+  0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, 0x8adb,
+  0x8adc, 0x8add, 0x8ade, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3,
+  0x94e1, 0x95f8, 0x7728, 0x6805, 0x69a8, 0x548b, 0x4e4d, 0x70b8,
+  0x8bc8, 0x6458, 0x658b, 0x5b85, 0x7a84, 0x503a, 0x5be8, 0x77bb,
+  0x6be1, 0x8a79, 0x7c98, 0x6cbe, 0x76cf, 0x65a9, 0x8f97, 0x5d2d,
+  0x5c55, 0x8638, 0x6808, 0x5360, 0x6218, 0x7ad9, 0x6e5b, 0x7efd,
+  0x6a1f, 0x7ae0, 0x5f70, 0x6f33, 0x5f20, 0x638c, 0x6da8, 0x6756,
+  0x4e08, 0x5e10, 0x8d26, 0x4ed7, 0x80c0, 0x7634, 0x969c, 0x62db,
+  0x662d, 0x627e, 0x6cbc, 0x8d75, 0x7167, 0x7f69, 0x5146, 0x8087,
+  0x53ec, 0x906e, 0x6298, 0x54f2, 0x86f0, 0x8f99, 0x8005, 0x9517,
+  0x8517, 0x8fd9, 0x6d59, 0x73cd, 0x659f, 0x771f, 0x7504, 0x7827,
+  0x81fb, 0x8d1e, 0x9488, 0x4fa6, 0x6795, 0x75b9, 0x8bca, 0x9707,
+  0x632f, 0x9547, 0x9635, 0x84b8, 0x6323, 0x7741, 0x5f81, 0x72f0,
+  0x4e89, 0x6014, 0x6574, 0x62ef, 0x6b63, 0x653f,
+  /* 0xd6 */
+  0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb,
+  0x8aec, 0x8aed, 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3,
+  0x8af4, 0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0x8afa, 0x8afb,
+  0x8afc, 0x8afd, 0x8afe, 0x8aff, 0x8b00, 0x8b01, 0x8b02, 0x8b03,
+  0x8b04, 0x8b05, 0x8b06, 0x8b08, 0x8b09, 0x8b0a, 0x8b0b, 0x8b0c,
+  0x8b0d, 0x8b0e, 0x8b0f, 0x8b10, 0x8b11, 0x8b12, 0x8b13, 0x8b14,
+  0x8b15, 0x8b16, 0x8b17, 0x8b18, 0x8b19, 0x8b1a, 0x8b1b, 0x8b1c,
+  0x8b1d, 0x8b1e, 0x8b1f, 0x8b20, 0x8b21, 0x8b22, 0x8b23, 0x8b24,
+  0x8b25, 0x8b27, 0x8b28, 0x8b29, 0x8b2a, 0x8b2b, 0x8b2c, 0x8b2d,
+  0x8b2e, 0x8b2f, 0x8b30, 0x8b31, 0x8b32, 0x8b33, 0x8b34, 0x8b35,
+  0x8b36, 0x8b37, 0x8b38, 0x8b39, 0x8b3a, 0x8b3b, 0x8b3c, 0x8b3d,
+  0x8b3e, 0x8b3f, 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0x8b45,
+  0x5e27, 0x75c7, 0x90d1, 0x8bc1, 0x829d, 0x679d, 0x652f, 0x5431,
+  0x8718, 0x77e5, 0x80a2, 0x8102, 0x6c41, 0x4e4b, 0x7ec7, 0x804c,
+  0x76f4, 0x690d, 0x6b96, 0x6267, 0x503c, 0x4f84, 0x5740, 0x6307,
+  0x6b62, 0x8dbe, 0x53ea, 0x65e8, 0x7eb8, 0x5fd7, 0x631a, 0x63b7,
+  0x81f3, 0x81f4, 0x7f6e, 0x5e1c, 0x5cd9, 0x5236, 0x667a, 0x79e9,
+  0x7a1a, 0x8d28, 0x7099, 0x75d4, 0x6ede, 0x6cbb, 0x7a92, 0x4e2d,
+  0x76c5, 0x5fe0, 0x949f, 0x8877, 0x7ec8, 0x79cd, 0x80bf, 0x91cd,
+  0x4ef2, 0x4f17, 0x821f, 0x5468, 0x5dde, 0x6d32, 0x8bcc, 0x7ca5,
+  0x8f74, 0x8098, 0x5e1a, 0x5492, 0x76b1, 0x5b99, 0x663c, 0x9aa4,
+  0x73e0, 0x682a, 0x86db, 0x6731, 0x732a, 0x8bf8, 0x8bdb, 0x9010,
+  0x7af9, 0x70db, 0x716e, 0x62c4, 0x77a9, 0x5631, 0x4e3b, 0x8457,
+  0x67f1, 0x52a9, 0x86c0, 0x8d2e, 0x94f8, 0x7b51,
+  /* 0xd7 */
+  0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d,
+  0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55,
+  0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d,
+  0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65,
+  0x8b67, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6d, 0x8b6e, 0x8b6f,
+  0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77,
+  0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, 0x8b7e, 0x8b7f,
+  0x8b80, 0x8b81, 0x8b82, 0x8b83, 0x8b84, 0x8b85, 0x8b86, 0x8b87,
+  0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0x8b8d, 0x8b8e, 0x8b8f,
+  0x8b90, 0x8b91, 0x8b92, 0x8b93, 0x8b94, 0x8b95, 0x8b96, 0x8b97,
+  0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, 0x8b9e, 0x8b9f,
+  0x8bac, 0x8bb1, 0x8bbb, 0x8bc7, 0x8bd0, 0x8bea, 0x8c09, 0x8c1e,
+  0x4f4f, 0x6ce8, 0x795d, 0x9a7b, 0x6293, 0x722a, 0x62fd, 0x4e13,
+  0x7816, 0x8f6c, 0x64b0, 0x8d5a, 0x7bc6, 0x6869, 0x5e84, 0x88c5,
+  0x5986, 0x649e, 0x58ee, 0x72b6, 0x690e, 0x9525, 0x8ffd, 0x8d58,
+  0x5760, 0x7f00, 0x8c06, 0x51c6, 0x6349, 0x62d9, 0x5353, 0x684c,
+  0x7422, 0x8301, 0x914c, 0x5544, 0x7740, 0x707c, 0x6d4a, 0x5179,
+  0x54a8, 0x8d44, 0x59ff, 0x6ecb, 0x6dc4, 0x5b5c, 0x7d2b, 0x4ed4,
+  0x7c7d, 0x6ed3, 0x5b50, 0x81ea, 0x6e0d, 0x5b57, 0x9b03, 0x68d5,
+  0x8e2a, 0x5b97, 0x7efc, 0x603b, 0x7eb5, 0x90b9, 0x8d70, 0x594f,
+  0x63cd, 0x79df, 0x8db3, 0x5352, 0x65cf, 0x7956, 0x8bc5, 0x963b,
+  0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a, 0x5c0a,
+  0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c, 0x5750,
+  0x5ea7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xd8 */
+  0x8c38, 0x8c39, 0x8c3a, 0x8c3b, 0x8c3c, 0x8c3d, 0x8c3e, 0x8c3f,
+  0x8c40, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c48, 0x8c4a, 0x8c4b,
+  0x8c4d, 0x8c4e, 0x8c4f, 0x8c50, 0x8c51, 0x8c52, 0x8c53, 0x8c54,
+  0x8c56, 0x8c57, 0x8c58, 0x8c59, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e,
+  0x8c5f, 0x8c60, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0x8c68,
+  0x8c69, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70, 0x8c71, 0x8c72,
+  0x8c74, 0x8c75, 0x8c76, 0x8c77, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e,
+  0x8c7f, 0x8c80, 0x8c81, 0x8c83, 0x8c84, 0x8c86, 0x8c87, 0x8c88,
+  0x8c8b, 0x8c8d, 0x8c8e, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, 0x8c93,
+  0x8c95, 0x8c96, 0x8c97, 0x8c99, 0x8c9a, 0x8c9b, 0x8c9c, 0x8c9d,
+  0x8c9e, 0x8c9f, 0x8ca0, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, 0x8ca5,
+  0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa, 0x8cab, 0x8cac, 0x8cad,
+  0x4e8d, 0x4e0c, 0x5140, 0x4e10, 0x5eff, 0x5345, 0x4e15, 0x4e98,
+  0x4e1e, 0x9b32, 0x5b6c, 0x5669, 0x4e28, 0x79ba, 0x4e3f, 0x5315,
+  0x4e47, 0x592d, 0x723b, 0x536e, 0x6c10, 0x56df, 0x80e4, 0x9997,
+  0x6bd3, 0x777e, 0x9f17, 0x4e36, 0x4e9f, 0x9f10, 0x4e5c, 0x4e69,
+  0x4e93, 0x8288, 0x5b5b, 0x556c, 0x560f, 0x4ec4, 0x538d, 0x539d,
+  0x53a3, 0x53a5, 0x53ae, 0x9765, 0x8d5d, 0x531a, 0x53f5, 0x5326,
+  0x532e, 0x533e, 0x8d5c, 0x5366, 0x5363, 0x5202, 0x5208, 0x520e,
+  0x522d, 0x5233, 0x523f, 0x5240, 0x524c, 0x525e, 0x5261, 0x525c,
+  0x84af, 0x527d, 0x5282, 0x5281, 0x5290, 0x5293, 0x5182, 0x7f54,
+  0x4ebb, 0x4ec3, 0x4ec9, 0x4ec2, 0x4ee8, 0x4ee1, 0x4eeb, 0x4ede,
+  0x4f1b, 0x4ef3, 0x4f22, 0x4f64, 0x4ef5, 0x4f25, 0x4f27, 0x4f09,
+  0x4f2b, 0x4f5e, 0x4f67, 0x6538, 0x4f5a, 0x4f5d,
+  /* 0xd9 */
+  0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2, 0x8cb3, 0x8cb4, 0x8cb5,
+  0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, 0x8cbb, 0x8cbc, 0x8cbd,
+  0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2, 0x8cc3, 0x8cc4, 0x8cc5,
+  0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca, 0x8ccb, 0x8ccc, 0x8ccd,
+  0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2, 0x8cd3, 0x8cd4, 0x8cd5,
+  0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, 0x8cdb, 0x8cdc, 0x8cdd,
+  0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, 0x8ce2, 0x8ce3, 0x8ce4, 0x8ce5,
+  0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, 0x8ced,
+  0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2, 0x8cf3, 0x8cf4, 0x8cf5,
+  0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd,
+  0x8cfe, 0x8cff, 0x8d00, 0x8d01, 0x8d02, 0x8d03, 0x8d04, 0x8d05,
+  0x8d06, 0x8d07, 0x8d08, 0x8d09, 0x8d0a, 0x8d0b, 0x8d0c, 0x8d0d,
+  0x4f5f, 0x4f57, 0x4f32, 0x4f3d, 0x4f76, 0x4f74, 0x4f91, 0x4f89,
+  0x4f83, 0x4f8f, 0x4f7e, 0x4f7b, 0x4faa, 0x4f7c, 0x4fac, 0x4f94,
+  0x4fe6, 0x4fe8, 0x4fea, 0x4fc5, 0x4fda, 0x4fe3, 0x4fdc, 0x4fd1,
+  0x4fdf, 0x4ff8, 0x5029, 0x504c, 0x4ff3, 0x502c, 0x500f, 0x502e,
+  0x502d, 0x4ffe, 0x501c, 0x500c, 0x5025, 0x5028, 0x507e, 0x5043,
+  0x5055, 0x5048, 0x504e, 0x506c, 0x507b, 0x50a5, 0x50a7, 0x50a9,
+  0x50ba, 0x50d6, 0x5106, 0x50ed, 0x50ec, 0x50e6, 0x50ee, 0x5107,
+  0x510b, 0x4edd, 0x6c3d, 0x4f58, 0x4f65, 0x4fce, 0x9fa0, 0x6c46,
+  0x7c74, 0x516e, 0x5dfd, 0x9ec9, 0x9998, 0x5181, 0x5914, 0x52f9,
+  0x530d, 0x8a07, 0x5310, 0x51eb, 0x5919, 0x5155, 0x4ea0, 0x5156,
+  0x4eb3, 0x886e, 0x88a4, 0x4eb5, 0x8114, 0x88d2, 0x7980, 0x5b34,
+  0x8803, 0x7fb8, 0x51ab, 0x51b1, 0x51bd, 0x51bc,
+  /* 0xda */
+  0x8d0e, 0x8d0f, 0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15,
+  0x8d16, 0x8d17, 0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d20,
+  0x8d51, 0x8d52, 0x8d57, 0x8d5f, 0x8d65, 0x8d68, 0x8d69, 0x8d6a,
+  0x8d6c, 0x8d6e, 0x8d6f, 0x8d71, 0x8d72, 0x8d78, 0x8d79, 0x8d7a,
+  0x8d7b, 0x8d7c, 0x8d7d, 0x8d7e, 0x8d7f, 0x8d80, 0x8d82, 0x8d83,
+  0x8d86, 0x8d87, 0x8d88, 0x8d89, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f,
+  0x8d90, 0x8d92, 0x8d93, 0x8d95, 0x8d96, 0x8d97, 0x8d98, 0x8d99,
+  0x8d9a, 0x8d9b, 0x8d9c, 0x8d9d, 0x8d9e, 0x8da0, 0x8da1, 0x8da2,
+  0x8da4, 0x8da5, 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab,
+  0x8dac, 0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db2, 0x8db6, 0x8db7,
+  0x8db9, 0x8dbb, 0x8dbd, 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc5, 0x8dc7,
+  0x8dc8, 0x8dc9, 0x8dca, 0x8dcd, 0x8dd0, 0x8dd2, 0x8dd3, 0x8dd4,
+  0x51c7, 0x5196, 0x51a2, 0x51a5, 0x8ba0, 0x8ba6, 0x8ba7, 0x8baa,
+  0x8bb4, 0x8bb5, 0x8bb7, 0x8bc2, 0x8bc3, 0x8bcb, 0x8bcf, 0x8bce,
+  0x8bd2, 0x8bd3, 0x8bd4, 0x8bd6, 0x8bd8, 0x8bd9, 0x8bdc, 0x8bdf,
+  0x8be0, 0x8be4, 0x8be8, 0x8be9, 0x8bee, 0x8bf0, 0x8bf3, 0x8bf6,
+  0x8bf9, 0x8bfc, 0x8bff, 0x8c00, 0x8c02, 0x8c04, 0x8c07, 0x8c0c,
+  0x8c0f, 0x8c11, 0x8c12, 0x8c14, 0x8c15, 0x8c16, 0x8c19, 0x8c1b,
+  0x8c18, 0x8c1d, 0x8c1f, 0x8c20, 0x8c21, 0x8c25, 0x8c27, 0x8c2a,
+  0x8c2b, 0x8c2e, 0x8c2f, 0x8c32, 0x8c33, 0x8c35, 0x8c36, 0x5369,
+  0x537a, 0x961d, 0x9622, 0x9621, 0x9631, 0x962a, 0x963d, 0x963c,
+  0x9642, 0x9649, 0x9654, 0x965f, 0x9667, 0x966c, 0x9672, 0x9674,
+  0x9688, 0x968d, 0x9697, 0x96b0, 0x9097, 0x909b, 0x909d, 0x9099,
+  0x90ac, 0x90a1, 0x90b4, 0x90b3, 0x90b6, 0x90ba,
+  /* 0xdb */
+  0x8dd5, 0x8dd8, 0x8dd9, 0x8ddc, 0x8de0, 0x8de1, 0x8de2, 0x8de5,
+  0x8de6, 0x8de7, 0x8de9, 0x8ded, 0x8dee, 0x8df0, 0x8df1, 0x8df2,
+  0x8df4, 0x8df6, 0x8dfc, 0x8dfe, 0x8dff, 0x8e00, 0x8e01, 0x8e02,
+  0x8e03, 0x8e04, 0x8e06, 0x8e07, 0x8e08, 0x8e0b, 0x8e0d, 0x8e0e,
+  0x8e10, 0x8e11, 0x8e12, 0x8e13, 0x8e15, 0x8e16, 0x8e17, 0x8e18,
+  0x8e19, 0x8e1a, 0x8e1b, 0x8e1c, 0x8e20, 0x8e21, 0x8e24, 0x8e25,
+  0x8e26, 0x8e27, 0x8e28, 0x8e2b, 0x8e2d, 0x8e30, 0x8e32, 0x8e33,
+  0x8e34, 0x8e36, 0x8e37, 0x8e38, 0x8e3b, 0x8e3c, 0x8e3e, 0x8e3f,
+  0x8e43, 0x8e45, 0x8e46, 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, 0x8e50,
+  0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, 0x8e58, 0x8e5a, 0x8e5b,
+  0x8e5c, 0x8e5d, 0x8e5e, 0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0x8e63,
+  0x8e64, 0x8e65, 0x8e67, 0x8e68, 0x8e6a, 0x8e6b, 0x8e6e, 0x8e71,
+  0x90b8, 0x90b0, 0x90cf, 0x90c5, 0x90be, 0x90d0, 0x90c4, 0x90c7,
+  0x90d3, 0x90e6, 0x90e2, 0x90dc, 0x90d7, 0x90db, 0x90eb, 0x90ef,
+  0x90fe, 0x9104, 0x9122, 0x911e, 0x9123, 0x9131, 0x912f, 0x9139,
+  0x9143, 0x9146, 0x520d, 0x5942, 0x52a2, 0x52ac, 0x52ad, 0x52be,
+  0x54ff, 0x52d0, 0x52d6, 0x52f0, 0x53df, 0x71ee, 0x77cd, 0x5ef4,
+  0x51f5, 0x51fc, 0x9b2f, 0x53b6, 0x5f01, 0x755a, 0x5def, 0x574c,
+  0x57a9, 0x57a1, 0x587e, 0x58bc, 0x58c5, 0x58d1, 0x5729, 0x572c,
+  0x572a, 0x5733, 0x5739, 0x572e, 0x572f, 0x575c, 0x573b, 0x5742,
+  0x5769, 0x5785, 0x576b, 0x5786, 0x577c, 0x577b, 0x5768, 0x576d,
+  0x5776, 0x5773, 0x57ad, 0x57a4, 0x578c, 0x57b2, 0x57cf, 0x57a7,
+  0x57b4, 0x5793, 0x57a0, 0x57d5, 0x57d8, 0x57da, 0x57d9, 0x57d2,
+  0x57b8, 0x57f4, 0x57ef, 0x57f8, 0x57e4, 0x57dd,
+  /* 0xdc */
+  0x8e73, 0x8e75, 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7d,
+  0x8e7e, 0x8e80, 0x8e82, 0x8e83, 0x8e84, 0x8e86, 0x8e88, 0x8e89,
+  0x8e8a, 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0x8e91, 0x8e92, 0x8e93,
+  0x8e95, 0x8e96, 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0x8e9d,
+  0x8e9f, 0x8ea0, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6,
+  0x8ea7, 0x8ea8, 0x8ea9, 0x8eaa, 0x8ead, 0x8eae, 0x8eb0, 0x8eb1,
+  0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, 0x8eb8, 0x8eb9, 0x8ebb,
+  0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0, 0x8ec1, 0x8ec2, 0x8ec3,
+  0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, 0x8ec9, 0x8eca, 0x8ecb,
+  0x8ecc, 0x8ecd, 0x8ecf, 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4,
+  0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, 0x8edc,
+  0x8edd, 0x8ede, 0x8edf, 0x8ee0, 0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4,
+  0x580b, 0x580d, 0x57fd, 0x57ed, 0x5800, 0x581e, 0x5819, 0x5844,
+  0x5820, 0x5865, 0x586c, 0x5881, 0x5889, 0x589a, 0x5880, 0x99a8,
+  0x9f19, 0x61ff, 0x8279, 0x827d, 0x827f, 0x828f, 0x828a, 0x82a8,
+  0x8284, 0x828e, 0x8291, 0x8297, 0x8299, 0x82ab, 0x82b8, 0x82be,
+  0x82b0, 0x82c8, 0x82ca, 0x82e3, 0x8298, 0x82b7, 0x82ae, 0x82cb,
+  0x82cc, 0x82c1, 0x82a9, 0x82b4, 0x82a1, 0x82aa, 0x829f, 0x82c4,
+  0x82ce, 0x82a4, 0x82e1, 0x8309, 0x82f7, 0x82e4, 0x830f, 0x8307,
+  0x82dc, 0x82f4, 0x82d2, 0x82d8, 0x830c, 0x82fb, 0x82d3, 0x8311,
+  0x831a, 0x8306, 0x8314, 0x8315, 0x82e0, 0x82d5, 0x831c, 0x8351,
+  0x835b, 0x835c, 0x8308, 0x8392, 0x833c, 0x8334, 0x8331, 0x839b,
+  0x835e, 0x832f, 0x834f, 0x8347, 0x8343, 0x835f, 0x8340, 0x8317,
+  0x8360, 0x832d, 0x833a, 0x8333, 0x8366, 0x8365,
+  /* 0xdd */
+  0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0x8eec,
+  0x8eed, 0x8eee, 0x8eef, 0x8ef0, 0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4,
+  0x8ef5, 0x8ef6, 0x8ef7, 0x8ef8, 0x8ef9, 0x8efa, 0x8efb, 0x8efc,
+  0x8efd, 0x8efe, 0x8eff, 0x8f00, 0x8f01, 0x8f02, 0x8f03, 0x8f04,
+  0x8f05, 0x8f06, 0x8f07, 0x8f08, 0x8f09, 0x8f0a, 0x8f0b, 0x8f0c,
+  0x8f0d, 0x8f0e, 0x8f0f, 0x8f10, 0x8f11, 0x8f12, 0x8f13, 0x8f14,
+  0x8f15, 0x8f16, 0x8f17, 0x8f18, 0x8f19, 0x8f1a, 0x8f1b, 0x8f1c,
+  0x8f1d, 0x8f1e, 0x8f1f, 0x8f20, 0x8f21, 0x8f22, 0x8f23, 0x8f24,
+  0x8f25, 0x8f26, 0x8f27, 0x8f28, 0x8f29, 0x8f2a, 0x8f2b, 0x8f2c,
+  0x8f2d, 0x8f2e, 0x8f2f, 0x8f30, 0x8f31, 0x8f32, 0x8f33, 0x8f34,
+  0x8f35, 0x8f36, 0x8f37, 0x8f38, 0x8f39, 0x8f3a, 0x8f3b, 0x8f3c,
+  0x8f3d, 0x8f3e, 0x8f3f, 0x8f40, 0x8f41, 0x8f42, 0x8f43, 0x8f44,
+  0x8368, 0x831b, 0x8369, 0x836c, 0x836a, 0x836d, 0x836e, 0x83b0,
+  0x8378, 0x83b3, 0x83b4, 0x83a0, 0x83aa, 0x8393, 0x839c, 0x8385,
+  0x837c, 0x83b6, 0x83a9, 0x837d, 0x83b8, 0x837b, 0x8398, 0x839e,
+  0x83a8, 0x83ba, 0x83bc, 0x83c1, 0x8401, 0x83e5, 0x83d8, 0x5807,
+  0x8418, 0x840b, 0x83dd, 0x83fd, 0x83d6, 0x841c, 0x8438, 0x8411,
+  0x8406, 0x83d4, 0x83df, 0x840f, 0x8403, 0x83f8, 0x83f9, 0x83ea,
+  0x83c5, 0x83c0, 0x8426, 0x83f0, 0x83e1, 0x845c, 0x8451, 0x845a,
+  0x8459, 0x8473, 0x8487, 0x8488, 0x847a, 0x8489, 0x8478, 0x843c,
+  0x8446, 0x8469, 0x8476, 0x848c, 0x848e, 0x8431, 0x846d, 0x84c1,
+  0x84cd, 0x84d0, 0x84e6, 0x84bd, 0x84d3, 0x84ca, 0x84bf, 0x84ba,
+  0x84e0, 0x84a1, 0x84b9, 0x84b4, 0x8497, 0x84e5, 0x84e3, 0x850c,
+  0x750d, 0x8538, 0x84f0, 0x8539, 0x851f, 0x853a,
+  /* 0xde */
+  0x8f45, 0x8f46, 0x8f47, 0x8f48, 0x8f49, 0x8f4a, 0x8f4b, 0x8f4c,
+  0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, 0x8f53, 0x8f54,
+  0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, 0x8f5b, 0x8f5c,
+  0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, 0x8f61, 0x8f62, 0x8f63, 0x8f64,
+  0x8f65, 0x8f6a, 0x8f80, 0x8f8c, 0x8f92, 0x8f9d, 0x8fa0, 0x8fa1,
+  0x8fa2, 0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, 0x8faa, 0x8fac, 0x8fad,
+  0x8fae, 0x8faf, 0x8fb2, 0x8fb3, 0x8fb4, 0x8fb5, 0x8fb7, 0x8fb8,
+  0x8fba, 0x8fbb, 0x8fbc, 0x8fbf, 0x8fc0, 0x8fc3, 0x8fc6, 0x8fc9,
+  0x8fca, 0x8fcb, 0x8fcc, 0x8fcd, 0x8fcf, 0x8fd2, 0x8fd6, 0x8fd7,
+  0x8fda, 0x8fe0, 0x8fe1, 0x8fe3, 0x8fe7, 0x8fec, 0x8fef, 0x8ff1,
+  0x8ff2, 0x8ff4, 0x8ff5, 0x8ff6, 0x8ffa, 0x8ffb, 0x8ffc, 0x8ffe,
+  0x8fff, 0x9007, 0x9008, 0x900c, 0x900e, 0x9013, 0x9015, 0x9018,
+  0x8556, 0x853b, 0x84ff, 0x84fc, 0x8559, 0x8548, 0x8568, 0x8564,
+  0x855e, 0x857a, 0x77a2, 0x8543, 0x8572, 0x857b, 0x85a4, 0x85a8,
+  0x8587, 0x858f, 0x8579, 0x85ae, 0x859c, 0x8585, 0x85b9, 0x85b7,
+  0x85b0, 0x85d3, 0x85c1, 0x85dc, 0x85ff, 0x8627, 0x8605, 0x8629,
+  0x8616, 0x863c, 0x5efe, 0x5f08, 0x593c, 0x5941, 0x8037, 0x5955,
+  0x595a, 0x5958, 0x530f, 0x5c22, 0x5c25, 0x5c2c, 0x5c34, 0x624c,
+  0x626a, 0x629f, 0x62bb, 0x62ca, 0x62da, 0x62d7, 0x62ee, 0x6322,
+  0x62f6, 0x6339, 0x634b, 0x6343, 0x63ad, 0x63f6, 0x6371, 0x637a,
+  0x638e, 0x63b4, 0x636d, 0x63ac, 0x638a, 0x6369, 0x63ae, 0x63bc,
+  0x63f2, 0x63f8, 0x63e0, 0x63ff, 0x63c4, 0x63de, 0x63ce, 0x6452,
+  0x63c6, 0x63be, 0x6445, 0x6441, 0x640b, 0x641b, 0x6420, 0x640c,
+  0x6426, 0x6421, 0x645e, 0x6484, 0x646d, 0x6496,
+  /* 0xdf */
+  0x9019, 0x901c, 0x9023, 0x9024, 0x9025, 0x9027, 0x9028, 0x9029,
+  0x902a, 0x902b, 0x902c, 0x9030, 0x9031, 0x9032, 0x9033, 0x9034,
+  0x9037, 0x9039, 0x903a, 0x903d, 0x903f, 0x9040, 0x9043, 0x9045,
+  0x9046, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, 0x904e, 0x9054,
+  0x9055, 0x9056, 0x9059, 0x905a, 0x905c, 0x905d, 0x905e, 0x905f,
+  0x9060, 0x9061, 0x9064, 0x9066, 0x9067, 0x9069, 0x906a, 0x906b,
+  0x906c, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, 0x9076, 0x9077,
+  0x9078, 0x9079, 0x907a, 0x907b, 0x907c, 0x907e, 0x9081, 0x9084,
+  0x9085, 0x9086, 0x9087, 0x9089, 0x908a, 0x908c, 0x908d, 0x908e,
+  0x908f, 0x9090, 0x9092, 0x9094, 0x9096, 0x9098, 0x909a, 0x909c,
+  0x909e, 0x909f, 0x90a0, 0x90a4, 0x90a5, 0x90a7, 0x90a8, 0x90a9,
+  0x90ab, 0x90ad, 0x90b2, 0x90b7, 0x90bc, 0x90bd, 0x90bf, 0x90c0,
+  0x647a, 0x64b7, 0x64b8, 0x6499, 0x64ba, 0x64c0, 0x64d0, 0x64d7,
+  0x64e4, 0x64e2, 0x6509, 0x6525, 0x652e, 0x5f0b, 0x5fd2, 0x7519,
+  0x5f11, 0x535f, 0x53f1, 0x53fd, 0x53e9, 0x53e8, 0x53fb, 0x5412,
+  0x5416, 0x5406, 0x544b, 0x5452, 0x5453, 0x5454, 0x5456, 0x5443,
+  0x5421, 0x5457, 0x5459, 0x5423, 0x5432, 0x5482, 0x5494, 0x5477,
+  0x5471, 0x5464, 0x549a, 0x549b, 0x5484, 0x5476, 0x5466, 0x549d,
+  0x54d0, 0x54ad, 0x54c2, 0x54b4, 0x54d2, 0x54a7, 0x54a6, 0x54d3,
+  0x54d4, 0x5472, 0x54a3, 0x54d5, 0x54bb, 0x54bf, 0x54cc, 0x54d9,
+  0x54da, 0x54dc, 0x54a9, 0x54aa, 0x54a4, 0x54dd, 0x54cf, 0x54de,
+  0x551b, 0x54e7, 0x5520, 0x54fd, 0x5514, 0x54f3, 0x5522, 0x5523,
+  0x550f, 0x5511, 0x5527, 0x552a, 0x5567, 0x558f, 0x55b5, 0x5549,
+  0x556d, 0x5541, 0x5555, 0x553f, 0x5550, 0x553c,
+  /* 0xe0 */
+  0x90c2, 0x90c3, 0x90c6, 0x90c8, 0x90c9, 0x90cb, 0x90cc, 0x90cd,
+  0x90d2, 0x90d4, 0x90d5, 0x90d6, 0x90d8, 0x90d9, 0x90da, 0x90de,
+  0x90df, 0x90e0, 0x90e3, 0x90e4, 0x90e5, 0x90e9, 0x90ea, 0x90ec,
+  0x90ee, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f5, 0x90f6, 0x90f7,
+  0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90ff, 0x9100, 0x9101, 0x9103,
+  0x9105, 0x9106, 0x9107, 0x9108, 0x9109, 0x910a, 0x910b, 0x910c,
+  0x910d, 0x910e, 0x910f, 0x9110, 0x9111, 0x9112, 0x9113, 0x9114,
+  0x9115, 0x9116, 0x9117, 0x9118, 0x911a, 0x911b, 0x911c, 0x911d,
+  0x911f, 0x9120, 0x9121, 0x9124, 0x9125, 0x9126, 0x9127, 0x9128,
+  0x9129, 0x912a, 0x912b, 0x912c, 0x912d, 0x912e, 0x9130, 0x9132,
+  0x9133, 0x9134, 0x9135, 0x9136, 0x9137, 0x9138, 0x913a, 0x913b,
+  0x913c, 0x913d, 0x913e, 0x913f, 0x9140, 0x9141, 0x9142, 0x9144,
+  0x5537, 0x5556, 0x5575, 0x5576, 0x5577, 0x5533, 0x5530, 0x555c,
+  0x558b, 0x55d2, 0x5583, 0x55b1, 0x55b9, 0x5588, 0x5581, 0x559f,
+  0x557e, 0x55d6, 0x5591, 0x557b, 0x55df, 0x55bd, 0x55be, 0x5594,
+  0x5599, 0x55ea, 0x55f7, 0x55c9, 0x561f, 0x55d1, 0x55eb, 0x55ec,
+  0x55d4, 0x55e6, 0x55dd, 0x55c4, 0x55ef, 0x55e5, 0x55f2, 0x55f3,
+  0x55cc, 0x55cd, 0x55e8, 0x55f5, 0x55e4, 0x8f94, 0x561e, 0x5608,
+  0x560c, 0x5601, 0x5624, 0x5623, 0x55fe, 0x5600, 0x5627, 0x562d,
+  0x5658, 0x5639, 0x5657, 0x562c, 0x564d, 0x5662, 0x5659, 0x565c,
+  0x564c, 0x5654, 0x5686, 0x5664, 0x5671, 0x566b, 0x567b, 0x567c,
+  0x5685, 0x5693, 0x56af, 0x56d4, 0x56d7, 0x56dd, 0x56e1, 0x56f5,
+  0x56eb, 0x56f9, 0x56ff, 0x5704, 0x570a, 0x5709, 0x571c, 0x5e0f,
+  0x5e19, 0x5e14, 0x5e11, 0x5e31, 0x5e3b, 0x5e3c,
+  /* 0xe1 */
+  0x9145, 0x9147, 0x9148, 0x9151, 0x9153, 0x9154, 0x9155, 0x9156,
+  0x9158, 0x9159, 0x915b, 0x915c, 0x915f, 0x9160, 0x9166, 0x9167,
+  0x9168, 0x916b, 0x916d, 0x9173, 0x917a, 0x917b, 0x917c, 0x9180,
+  0x9181, 0x9182, 0x9183, 0x9184, 0x9186, 0x9188, 0x918a, 0x918e,
+  0x918f, 0x9193, 0x9194, 0x9195, 0x9196, 0x9197, 0x9198, 0x9199,
+  0x919c, 0x919d, 0x919e, 0x919f, 0x91a0, 0x91a1, 0x91a4, 0x91a5,
+  0x91a6, 0x91a7, 0x91a8, 0x91a9, 0x91ab, 0x91ac, 0x91b0, 0x91b1,
+  0x91b2, 0x91b3, 0x91b6, 0x91b7, 0x91b8, 0x91b9, 0x91bb, 0x91bc,
+  0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, 0x91c2, 0x91c3, 0x91c4,
+  0x91c5, 0x91c6, 0x91c8, 0x91cb, 0x91d0, 0x91d2, 0x91d3, 0x91d4,
+  0x91d5, 0x91d6, 0x91d7, 0x91d8, 0x91d9, 0x91da, 0x91db, 0x91dd,
+  0x91de, 0x91df, 0x91e0, 0x91e1, 0x91e2, 0x91e3, 0x91e4, 0x91e5,
+  0x5e37, 0x5e44, 0x5e54, 0x5e5b, 0x5e5e, 0x5e61, 0x5c8c, 0x5c7a,
+  0x5c8d, 0x5c90, 0x5c96, 0x5c88, 0x5c98, 0x5c99, 0x5c91, 0x5c9a,
+  0x5c9c, 0x5cb5, 0x5ca2, 0x5cbd, 0x5cac, 0x5cab, 0x5cb1, 0x5ca3,
+  0x5cc1, 0x5cb7, 0x5cc4, 0x5cd2, 0x5ce4, 0x5ccb, 0x5ce5, 0x5d02,
+  0x5d03, 0x5d27, 0x5d26, 0x5d2e, 0x5d24, 0x5d1e, 0x5d06, 0x5d1b,
+  0x5d58, 0x5d3e, 0x5d34, 0x5d3d, 0x5d6c, 0x5d5b, 0x5d6f, 0x5d5d,
+  0x5d6b, 0x5d4b, 0x5d4a, 0x5d69, 0x5d74, 0x5d82, 0x5d99, 0x5d9d,
+  0x8c73, 0x5db7, 0x5dc5, 0x5f73, 0x5f77, 0x5f82, 0x5f87, 0x5f89,
+  0x5f8c, 0x5f95, 0x5f99, 0x5f9c, 0x5fa8, 0x5fad, 0x5fb5, 0x5fbc,
+  0x8862, 0x5f61, 0x72ad, 0x72b0, 0x72b4, 0x72b7, 0x72b8, 0x72c3,
+  0x72c1, 0x72ce, 0x72cd, 0x72d2, 0x72e8, 0x72ef, 0x72e9, 0x72f2,
+  0x72f4, 0x72f7, 0x7301, 0x72f3, 0x7303, 0x72fa,
+  /* 0xe2 */
+  0x91e6, 0x91e7, 0x91e8, 0x91e9, 0x91ea, 0x91eb, 0x91ec, 0x91ed,
+  0x91ee, 0x91ef, 0x91f0, 0x91f1, 0x91f2, 0x91f3, 0x91f4, 0x91f5,
+  0x91f6, 0x91f7, 0x91f8, 0x91f9, 0x91fa, 0x91fb, 0x91fc, 0x91fd,
+  0x91fe, 0x91ff, 0x9200, 0x9201, 0x9202, 0x9203, 0x9204, 0x9205,
+  0x9206, 0x9207, 0x9208, 0x9209, 0x920a, 0x920b, 0x920c, 0x920d,
+  0x920e, 0x920f, 0x9210, 0x9211, 0x9212, 0x9213, 0x9214, 0x9215,
+  0x9216, 0x9217, 0x9218, 0x9219, 0x921a, 0x921b, 0x921c, 0x921d,
+  0x921e, 0x921f, 0x9220, 0x9221, 0x9222, 0x9223, 0x9224, 0x9225,
+  0x9226, 0x9227, 0x9228, 0x9229, 0x922a, 0x922b, 0x922c, 0x922d,
+  0x922e, 0x922f, 0x9230, 0x9231, 0x9232, 0x9233, 0x9234, 0x9235,
+  0x9236, 0x9237, 0x9238, 0x9239, 0x923a, 0x923b, 0x923c, 0x923d,
+  0x923e, 0x923f, 0x9240, 0x9241, 0x9242, 0x9243, 0x9244, 0x9245,
+  0x72fb, 0x7317, 0x7313, 0x7321, 0x730a, 0x731e, 0x731d, 0x7315,
+  0x7322, 0x7339, 0x7325, 0x732c, 0x7338, 0x7331, 0x7350, 0x734d,
+  0x7357, 0x7360, 0x736c, 0x736f, 0x737e, 0x821b, 0x5925, 0x98e7,
+  0x5924, 0x5902, 0x9963, 0x9967, 0x9968, 0x9969, 0x996a, 0x996b,
+  0x996c, 0x9974, 0x9977, 0x997d, 0x9980, 0x9984, 0x9987, 0x998a,
+  0x998d, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, 0x5e80, 0x5e91,
+  0x5e8b, 0x5e96, 0x5ea5, 0x5ea0, 0x5eb9, 0x5eb5, 0x5ebe, 0x5eb3,
+  0x8d53, 0x5ed2, 0x5ed1, 0x5edb, 0x5ee8, 0x5eea, 0x81ba, 0x5fc4,
+  0x5fc9, 0x5fd6, 0x5fcf, 0x6003, 0x5fee, 0x6004, 0x5fe1, 0x5fe4,
+  0x5ffe, 0x6005, 0x6006, 0x5fea, 0x5fed, 0x5ff8, 0x6019, 0x6035,
+  0x6026, 0x601b, 0x600f, 0x600d, 0x6029, 0x602b, 0x600a, 0x603f,
+  0x6021, 0x6078, 0x6079, 0x607b, 0x607a, 0x6042,
+  /* 0xe3 */
+  0x9246, 0x9247, 0x9248, 0x9249, 0x924a, 0x924b, 0x924c, 0x924d,
+  0x924e, 0x924f, 0x9250, 0x9251, 0x9252, 0x9253, 0x9254, 0x9255,
+  0x9256, 0x9257, 0x9258, 0x9259, 0x925a, 0x925b, 0x925c, 0x925d,
+  0x925e, 0x925f, 0x9260, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265,
+  0x9266, 0x9267, 0x9268, 0x9269, 0x926a, 0x926b, 0x926c, 0x926d,
+  0x926e, 0x926f, 0x9270, 0x9271, 0x9272, 0x9273, 0x9275, 0x9276,
+  0x9277, 0x9278, 0x9279, 0x927a, 0x927b, 0x927c, 0x927d, 0x927e,
+  0x927f, 0x9280, 0x9281, 0x9282, 0x9283, 0x9284, 0x9285, 0x9286,
+  0x9287, 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, 0x928d, 0x928f,
+  0x9290, 0x9291, 0x9292, 0x9293, 0x9294, 0x9295, 0x9296, 0x9297,
+  0x9298, 0x9299, 0x929a, 0x929b, 0x929c, 0x929d, 0x929e, 0x929f,
+  0x92a0, 0x92a1, 0x92a2, 0x92a3, 0x92a4, 0x92a5, 0x92a6, 0x92a7,
+  0x606a, 0x607d, 0x6096, 0x609a, 0x60ad, 0x609d, 0x6083, 0x6092,
+  0x608c, 0x609b, 0x60ec, 0x60bb, 0x60b1, 0x60dd, 0x60d8, 0x60c6,
+  0x60da, 0x60b4, 0x6120, 0x6126, 0x6115, 0x6123, 0x60f4, 0x6100,
+  0x610e, 0x612b, 0x614a, 0x6175, 0x61ac, 0x6194, 0x61a7, 0x61b7,
+  0x61d4, 0x61f5, 0x5fdd, 0x96b3, 0x95e9, 0x95eb, 0x95f1, 0x95f3,
+  0x95f5, 0x95f6, 0x95fc, 0x95fe, 0x9603, 0x9604, 0x9606, 0x9608,
+  0x960a, 0x960b, 0x960c, 0x960d, 0x960f, 0x9612, 0x9615, 0x9616,
+  0x9617, 0x9619, 0x961a, 0x4e2c, 0x723f, 0x6215, 0x6c35, 0x6c54,
+  0x6c5c, 0x6c4a, 0x6ca3, 0x6c85, 0x6c90, 0x6c94, 0x6c8c, 0x6c68,
+  0x6c69, 0x6c74, 0x6c76, 0x6c86, 0x6ca9, 0x6cd0, 0x6cd4, 0x6cad,
+  0x6cf7, 0x6cf8, 0x6cf1, 0x6cd7, 0x6cb2, 0x6ce0, 0x6cd6, 0x6cfa,
+  0x6ceb, 0x6cee, 0x6cb1, 0x6cd3, 0x6cef, 0x6cfe,
+  /* 0xe4 */
+  0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac, 0x92ad, 0x92af, 0x92b0,
+  0x92b1, 0x92b2, 0x92b3, 0x92b4, 0x92b5, 0x92b6, 0x92b7, 0x92b8,
+  0x92b9, 0x92ba, 0x92bb, 0x92bc, 0x92bd, 0x92be, 0x92bf, 0x92c0,
+  0x92c1, 0x92c2, 0x92c3, 0x92c4, 0x92c5, 0x92c6, 0x92c7, 0x92c9,
+  0x92ca, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1,
+  0x92d2, 0x92d3, 0x92d4, 0x92d5, 0x92d6, 0x92d7, 0x92d8, 0x92d9,
+  0x92da, 0x92db, 0x92dc, 0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1,
+  0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, 0x92e8, 0x92e9,
+  0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, 0x92f1,
+  0x92f2, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9,
+  0x92fa, 0x92fb, 0x92fc, 0x92fd, 0x92fe, 0x92ff, 0x9300, 0x9301,
+  0x9302, 0x9303, 0x9304, 0x9305, 0x9306, 0x9307, 0x9308, 0x9309,
+  0x6d39, 0x6d27, 0x6d0c, 0x6d43, 0x6d48, 0x6d07, 0x6d04, 0x6d19,
+  0x6d0e, 0x6d2b, 0x6d4d, 0x6d2e, 0x6d35, 0x6d1a, 0x6d4f, 0x6d52,
+  0x6d54, 0x6d33, 0x6d91, 0x6d6f, 0x6d9e, 0x6da0, 0x6d5e, 0x6d93,
+  0x6d94, 0x6d5c, 0x6d60, 0x6d7c, 0x6d63, 0x6e1a, 0x6dc7, 0x6dc5,
+  0x6dde, 0x6e0e, 0x6dbf, 0x6de0, 0x6e11, 0x6de6, 0x6ddd, 0x6dd9,
+  0x6e16, 0x6dab, 0x6e0c, 0x6dae, 0x6e2b, 0x6e6e, 0x6e4e, 0x6e6b,
+  0x6eb2, 0x6e5f, 0x6e86, 0x6e53, 0x6e54, 0x6e32, 0x6e25, 0x6e44,
+  0x6edf, 0x6eb1, 0x6e98, 0x6ee0, 0x6f2d, 0x6ee2, 0x6ea5, 0x6ea7,
+  0x6ebd, 0x6ebb, 0x6eb7, 0x6ed7, 0x6eb4, 0x6ecf, 0x6e8f, 0x6ec2,
+  0x6e9f, 0x6f62, 0x6f46, 0x6f47, 0x6f24, 0x6f15, 0x6ef9, 0x6f2f,
+  0x6f36, 0x6f4b, 0x6f74, 0x6f2a, 0x6f09, 0x6f29, 0x6f89, 0x6f8d,
+  0x6f8c, 0x6f78, 0x6f72, 0x6f7c, 0x6f7a, 0x6fd1,
+  /* 0xe5 */
+  0x930a, 0x930b, 0x930c, 0x930d, 0x930e, 0x930f, 0x9310, 0x9311,
+  0x9312, 0x9313, 0x9314, 0x9315, 0x9316, 0x9317, 0x9318, 0x9319,
+  0x931a, 0x931b, 0x931c, 0x931d, 0x931e, 0x931f, 0x9320, 0x9321,
+  0x9322, 0x9323, 0x9324, 0x9325, 0x9326, 0x9327, 0x9328, 0x9329,
+  0x932a, 0x932b, 0x932c, 0x932d, 0x932e, 0x932f, 0x9330, 0x9331,
+  0x9332, 0x9333, 0x9334, 0x9335, 0x9336, 0x9337, 0x9338, 0x9339,
+  0x933a, 0x933b, 0x933c, 0x933d, 0x933f, 0x9340, 0x9341, 0x9342,
+  0x9343, 0x9344, 0x9345, 0x9346, 0x9347, 0x9348, 0x9349, 0x934a,
+  0x934b, 0x934c, 0x934d, 0x934e, 0x934f, 0x9350, 0x9351, 0x9352,
+  0x9353, 0x9354, 0x9355, 0x9356, 0x9357, 0x9358, 0x9359, 0x935a,
+  0x935b, 0x935c, 0x935d, 0x935e, 0x935f, 0x9360, 0x9361, 0x9362,
+  0x9363, 0x9364, 0x9365, 0x9366, 0x9367, 0x9368, 0x9369, 0x936b,
+  0x6fc9, 0x6fa7, 0x6fb9, 0x6fb6, 0x6fc2, 0x6fe1, 0x6fee, 0x6fde,
+  0x6fe0, 0x6fef, 0x701a, 0x7023, 0x701b, 0x7039, 0x7035, 0x704f,
+  0x705e, 0x5b80, 0x5b84, 0x5b95, 0x5b93, 0x5ba5, 0x5bb8, 0x752f,
+  0x9a9e, 0x6434, 0x5be4, 0x5bee, 0x8930, 0x5bf0, 0x8e47, 0x8b07,
+  0x8fb6, 0x8fd3, 0x8fd5, 0x8fe5, 0x8fee, 0x8fe4, 0x8fe9, 0x8fe6,
+  0x8ff3, 0x8fe8, 0x9005, 0x9004, 0x900b, 0x9026, 0x9011, 0x900d,
+  0x9016, 0x9021, 0x9035, 0x9036, 0x902d, 0x902f, 0x9044, 0x9051,
+  0x9052, 0x9050, 0x9068, 0x9058, 0x9062, 0x905b, 0x66b9, 0x9074,
+  0x907d, 0x9082, 0x9088, 0x9083, 0x908b, 0x5f50, 0x5f57, 0x5f56,
+  0x5f58, 0x5c3b, 0x54ab, 0x5c50, 0x5c59, 0x5b71, 0x5c63, 0x5c66,
+  0x7fbc, 0x5f2a, 0x5f29, 0x5f2d, 0x8274, 0x5f3c, 0x9b3b, 0x5c6e,
+  0x5981, 0x5983, 0x598d, 0x59a9, 0x59aa, 0x59a3,
+  /* 0xe6 */
+  0x936c, 0x936d, 0x936e, 0x936f, 0x9370, 0x9371, 0x9372, 0x9373,
+  0x9374, 0x9375, 0x9376, 0x9377, 0x9378, 0x9379, 0x937a, 0x937b,
+  0x937c, 0x937d, 0x937e, 0x937f, 0x9380, 0x9381, 0x9382, 0x9383,
+  0x9384, 0x9385, 0x9386, 0x9387, 0x9388, 0x9389, 0x938a, 0x938b,
+  0x938c, 0x938d, 0x938e, 0x9390, 0x9391, 0x9392, 0x9393, 0x9394,
+  0x9395, 0x9396, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, 0x939c,
+  0x939d, 0x939e, 0x939f, 0x93a0, 0x93a1, 0x93a2, 0x93a3, 0x93a4,
+  0x93a5, 0x93a6, 0x93a7, 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x93ac,
+  0x93ad, 0x93ae, 0x93af, 0x93b0, 0x93b1, 0x93b2, 0x93b3, 0x93b4,
+  0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc,
+  0x93bd, 0x93be, 0x93bf, 0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4,
+  0x93c5, 0x93c6, 0x93c7, 0x93c8, 0x93c9, 0x93cb, 0x93cc, 0x93cd,
+  0x5997, 0x59ca, 0x59ab, 0x599e, 0x59a4, 0x59d2, 0x59b2, 0x59af,
+  0x59d7, 0x59be, 0x5a05, 0x5a06, 0x59dd, 0x5a08, 0x59e3, 0x59d8,
+  0x59f9, 0x5a0c, 0x5a09, 0x5a32, 0x5a34, 0x5a11, 0x5a23, 0x5a13,
+  0x5a40, 0x5a67, 0x5a4a, 0x5a55, 0x5a3c, 0x5a62, 0x5a75, 0x80ec,
+  0x5aaa, 0x5a9b, 0x5a77, 0x5a7a, 0x5abe, 0x5aeb, 0x5ab2, 0x5ad2,
+  0x5ad4, 0x5ab8, 0x5ae0, 0x5ae3, 0x5af1, 0x5ad6, 0x5ae6, 0x5ad8,
+  0x5adc, 0x5b09, 0x5b17, 0x5b16, 0x5b32, 0x5b37, 0x5b40, 0x5c15,
+  0x5c1c, 0x5b5a, 0x5b65, 0x5b73, 0x5b51, 0x5b53, 0x5b62, 0x9a75,
+  0x9a77, 0x9a78, 0x9a7a, 0x9a7f, 0x9a7d, 0x9a80, 0x9a81, 0x9a85,
+  0x9a88, 0x9a8a, 0x9a90, 0x9a92, 0x9a93, 0x9a96, 0x9a98, 0x9a9b,
+  0x9a9c, 0x9a9d, 0x9a9f, 0x9aa0, 0x9aa2, 0x9aa3, 0x9aa5, 0x9aa7,
+  0x7e9f, 0x7ea1, 0x7ea3, 0x7ea5, 0x7ea8, 0x7ea9,
+  /* 0xe7 */
+  0x93ce, 0x93cf, 0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5,
+  0x93d7, 0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de,
+  0x93df, 0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6,
+  0x93e7, 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee,
+  0x93ef, 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6,
+  0x93f7, 0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe,
+  0x93ff, 0x9400, 0x9401, 0x9402, 0x9403, 0x9404, 0x9405, 0x9406,
+  0x9407, 0x9408, 0x9409, 0x940a, 0x940b, 0x940c, 0x940d, 0x940e,
+  0x940f, 0x9410, 0x9411, 0x9412, 0x9413, 0x9414, 0x9415, 0x9416,
+  0x9417, 0x9418, 0x9419, 0x941a, 0x941b, 0x941c, 0x941d, 0x941e,
+  0x941f, 0x9420, 0x9421, 0x9422, 0x9423, 0x9424, 0x9425, 0x9426,
+  0x9427, 0x9428, 0x9429, 0x942a, 0x942b, 0x942c, 0x942d, 0x942e,
+  0x7ead, 0x7eb0, 0x7ebe, 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec9, 0x7ecb,
+  0x7ecc, 0x7ed0, 0x7ed4, 0x7ed7, 0x7edb, 0x7ee0, 0x7ee1, 0x7ee8,
+  0x7eeb, 0x7eee, 0x7eef, 0x7ef1, 0x7ef2, 0x7f0d, 0x7ef6, 0x7efa,
+  0x7efb, 0x7efe, 0x7f01, 0x7f02, 0x7f03, 0x7f07, 0x7f08, 0x7f0b,
+  0x7f0c, 0x7f0f, 0x7f11, 0x7f12, 0x7f17, 0x7f19, 0x7f1c, 0x7f1b,
+  0x7f1f, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, 0x7f27,
+  0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2f, 0x7f30, 0x7f31, 0x7f32,
+  0x7f33, 0x7f35, 0x5e7a, 0x757f, 0x5ddb, 0x753e, 0x9095, 0x738e,
+  0x7391, 0x73ae, 0x73a2, 0x739f, 0x73cf, 0x73c2, 0x73d1, 0x73b7,
+  0x73b3, 0x73c0, 0x73c9, 0x73c8, 0x73e5, 0x73d9, 0x987c, 0x740a,
+  0x73e9, 0x73e7, 0x73de, 0x73ba, 0x73f2, 0x740f, 0x742a, 0x745b,
+  0x7426, 0x7425, 0x7428, 0x7430, 0x742e, 0x742c,
+  /* 0xe8 */
+  0x942f, 0x9430, 0x9431, 0x9432, 0x9433, 0x9434, 0x9435, 0x9436,
+  0x9437, 0x9438, 0x9439, 0x943a, 0x943b, 0x943c, 0x943d, 0x943f,
+  0x9440, 0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447,
+  0x9448, 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f,
+  0x9450, 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457,
+  0x9458, 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f,
+  0x9460, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467,
+  0x9468, 0x9469, 0x946a, 0x946c, 0x946d, 0x946e, 0x946f, 0x9470,
+  0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, 0x9478,
+  0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x947f, 0x9480,
+  0x9481, 0x9482, 0x9483, 0x9484, 0x9491, 0x9496, 0x9498, 0x94c7,
+  0x94cf, 0x94d3, 0x94d4, 0x94da, 0x94e6, 0x94fb, 0x951c, 0x9520,
+  0x741b, 0x741a, 0x7441, 0x745c, 0x7457, 0x7455, 0x7459, 0x7477,
+  0x746d, 0x747e, 0x749c, 0x748e, 0x7480, 0x7481, 0x7487, 0x748b,
+  0x749e, 0x74a8, 0x74a9, 0x7490, 0x74a7, 0x74d2, 0x74ba, 0x97ea,
+  0x97eb, 0x97ec, 0x674c, 0x6753, 0x675e, 0x6748, 0x6769, 0x67a5,
+  0x6787, 0x676a, 0x6773, 0x6798, 0x67a7, 0x6775, 0x67a8, 0x679e,
+  0x67ad, 0x678b, 0x6777, 0x677c, 0x67f0, 0x6809, 0x67d8, 0x680a,
+  0x67e9, 0x67b0, 0x680c, 0x67d9, 0x67b5, 0x67da, 0x67b3, 0x67dd,
+  0x6800, 0x67c3, 0x67b8, 0x67e2, 0x680e, 0x67c1, 0x67fd, 0x6832,
+  0x6833, 0x6860, 0x6861, 0x684e, 0x6862, 0x6844, 0x6864, 0x6883,
+  0x681d, 0x6855, 0x6866, 0x6841, 0x6867, 0x6840, 0x683e, 0x684a,
+  0x6849, 0x6829, 0x68b5, 0x688f, 0x6874, 0x6877, 0x6893, 0x686b,
+  0x68c2, 0x696e, 0x68fc, 0x691f, 0x6920, 0x68f9,
+  /* 0xe9 */
+  0x9527, 0x9533, 0x953d, 0x9543, 0x9548, 0x954b, 0x9555, 0x955a,
+  0x9560, 0x956e, 0x9574, 0x9575, 0x9577, 0x9578, 0x9579, 0x957a,
+  0x957b, 0x957c, 0x957d, 0x957e, 0x9580, 0x9581, 0x9582, 0x9583,
+  0x9584, 0x9585, 0x9586, 0x9587, 0x9588, 0x9589, 0x958a, 0x958b,
+  0x958c, 0x958d, 0x958e, 0x958f, 0x9590, 0x9591, 0x9592, 0x9593,
+  0x9594, 0x9595, 0x9596, 0x9597, 0x9598, 0x9599, 0x959a, 0x959b,
+  0x959c, 0x959d, 0x959e, 0x959f, 0x95a0, 0x95a1, 0x95a2, 0x95a3,
+  0x95a4, 0x95a5, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0x95ab,
+  0x95ac, 0x95ad, 0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b2, 0x95b3,
+  0x95b4, 0x95b5, 0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, 0x95bb,
+  0x95bc, 0x95bd, 0x95be, 0x95bf, 0x95c0, 0x95c1, 0x95c2, 0x95c3,
+  0x95c4, 0x95c5, 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0x95ca, 0x95cb,
+  0x6924, 0x68f0, 0x690b, 0x6901, 0x6957, 0x68e3, 0x6910, 0x6971,
+  0x6939, 0x6960, 0x6942, 0x695d, 0x6984, 0x696b, 0x6980, 0x6998,
+  0x6978, 0x6934, 0x69cc, 0x6987, 0x6988, 0x69ce, 0x6989, 0x6966,
+  0x6963, 0x6979, 0x699b, 0x69a7, 0x69bb, 0x69ab, 0x69ad, 0x69d4,
+  0x69b1, 0x69c1, 0x69ca, 0x69df, 0x6995, 0x69e0, 0x698d, 0x69ff,
+  0x6a2f, 0x69ed, 0x6a17, 0x6a18, 0x6a65, 0x69f2, 0x6a44, 0x6a3e,
+  0x6aa0, 0x6a50, 0x6a5b, 0x6a35, 0x6a8e, 0x6a79, 0x6a3d, 0x6a28,
+  0x6a58, 0x6a7c, 0x6a91, 0x6a90, 0x6aa9, 0x6a97, 0x6aab, 0x7337,
+  0x7352, 0x6b81, 0x6b82, 0x6b87, 0x6b84, 0x6b92, 0x6b93, 0x6b8d,
+  0x6b9a, 0x6b9b, 0x6ba1, 0x6baa, 0x8f6b, 0x8f6d, 0x8f71, 0x8f72,
+  0x8f73, 0x8f75, 0x8f76, 0x8f78, 0x8f77, 0x8f79, 0x8f7a, 0x8f7c,
+  0x8f7e, 0x8f81, 0x8f82, 0x8f84, 0x8f87, 0x8f8b,
+  /* 0xea */
+  0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, 0x95d3,
+  0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, 0x95db,
+  0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, 0x95e3,
+  0x95e4, 0x95e5, 0x95e6, 0x95e7, 0x95ec, 0x95ff, 0x9607, 0x9613,
+  0x9618, 0x961b, 0x961e, 0x9620, 0x9623, 0x9624, 0x9625, 0x9626,
+  0x9627, 0x9628, 0x9629, 0x962b, 0x962c, 0x962d, 0x962f, 0x9630,
+  0x9637, 0x9638, 0x9639, 0x963a, 0x963e, 0x9641, 0x9643, 0x964a,
+  0x964e, 0x964f, 0x9651, 0x9652, 0x9653, 0x9656, 0x9657, 0x9658,
+  0x9659, 0x965a, 0x965c, 0x965d, 0x965e, 0x9660, 0x9663, 0x9665,
+  0x9666, 0x966b, 0x966d, 0x966e, 0x966f, 0x9670, 0x9671, 0x9673,
+  0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e, 0x967f,
+  0x9680, 0x9681, 0x9682, 0x9683, 0x9684, 0x9687, 0x9689, 0x968a,
+  0x8f8d, 0x8f8e, 0x8f8f, 0x8f98, 0x8f9a, 0x8ece, 0x620b, 0x6217,
+  0x621b, 0x621f, 0x6222, 0x6221, 0x6225, 0x6224, 0x622c, 0x81e7,
+  0x74ef, 0x74f4, 0x74ff, 0x750f, 0x7511, 0x7513, 0x6534, 0x65ee,
+  0x65ef, 0x65f0, 0x660a, 0x6619, 0x6772, 0x6603, 0x6615, 0x6600,
+  0x7085, 0x66f7, 0x661d, 0x6634, 0x6631, 0x6636, 0x6635, 0x8006,
+  0x665f, 0x6654, 0x6641, 0x664f, 0x6656, 0x6661, 0x6657, 0x6677,
+  0x6684, 0x668c, 0x66a7, 0x669d, 0x66be, 0x66db, 0x66dc, 0x66e6,
+  0x66e9, 0x8d32, 0x8d33, 0x8d36, 0x8d3b, 0x8d3d, 0x8d40, 0x8d45,
+  0x8d46, 0x8d48, 0x8d49, 0x8d47, 0x8d4d, 0x8d55, 0x8d59, 0x89c7,
+  0x89ca, 0x89cb, 0x89cc, 0x89ce, 0x89cf, 0x89d0, 0x89d1, 0x726e,
+  0x729f, 0x725d, 0x7266, 0x726f, 0x727e, 0x727f, 0x7284, 0x728b,
+  0x728d, 0x728f, 0x7292, 0x6308, 0x6332, 0x63b0,
+  /* 0xeb */
+  0x968c, 0x968e, 0x9691, 0x9692, 0x9693, 0x9695, 0x9696, 0x969a,
+  0x969b, 0x969d, 0x969e, 0x969f, 0x96a0, 0x96a1, 0x96a2, 0x96a3,
+  0x96a4, 0x96a5, 0x96a6, 0x96a8, 0x96a9, 0x96aa, 0x96ab, 0x96ac,
+  0x96ad, 0x96ae, 0x96af, 0x96b1, 0x96b2, 0x96b4, 0x96b5, 0x96b7,
+  0x96b8, 0x96ba, 0x96bb, 0x96bf, 0x96c2, 0x96c3, 0x96c8, 0x96ca,
+  0x96cb, 0x96d0, 0x96d1, 0x96d3, 0x96d4, 0x96d6, 0x96d7, 0x96d8,
+  0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e1,
+  0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96eb, 0x96ec,
+  0x96ed, 0x96ee, 0x96f0, 0x96f1, 0x96f2, 0x96f4, 0x96f5, 0x96f8,
+  0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96ff, 0x9702, 0x9703, 0x9705,
+  0x970a, 0x970b, 0x970c, 0x9710, 0x9711, 0x9712, 0x9714, 0x9715,
+  0x9717, 0x9718, 0x9719, 0x971a, 0x971b, 0x971d, 0x971f, 0x9720,
+  0x643f, 0x64d8, 0x8004, 0x6bea, 0x6bf3, 0x6bfd, 0x6bf5, 0x6bf9,
+  0x6c05, 0x6c07, 0x6c06, 0x6c0d, 0x6c15, 0x6c18, 0x6c19, 0x6c1a,
+  0x6c21, 0x6c29, 0x6c24, 0x6c2a, 0x6c32, 0x6535, 0x6555, 0x656b,
+  0x724d, 0x7252, 0x7256, 0x7230, 0x8662, 0x5216, 0x809f, 0x809c,
+  0x8093, 0x80bc, 0x670a, 0x80bd, 0x80b1, 0x80ab, 0x80ad, 0x80b4,
+  0x80b7, 0x80e7, 0x80e8, 0x80e9, 0x80ea, 0x80db, 0x80c2, 0x80c4,
+  0x80d9, 0x80cd, 0x80d7, 0x6710, 0x80dd, 0x80eb, 0x80f1, 0x80f4,
+  0x80ed, 0x810d, 0x810e, 0x80f2, 0x80fc, 0x6715, 0x8112, 0x8c5a,
+  0x8136, 0x811e, 0x812c, 0x8118, 0x8132, 0x8148, 0x814c, 0x8153,
+  0x8174, 0x8159, 0x815a, 0x8171, 0x8160, 0x8169, 0x817c, 0x817d,
+  0x816d, 0x8167, 0x584d, 0x5ab5, 0x8188, 0x8182, 0x8191, 0x6ed5,
+  0x81a3, 0x81aa, 0x81cc, 0x6726, 0x81ca, 0x81bb,
+  /* 0xec */
+  0x9721, 0x9722, 0x9723, 0x9724, 0x9725, 0x9726, 0x9727, 0x9728,
+  0x9729, 0x972b, 0x972c, 0x972e, 0x972f, 0x9731, 0x9733, 0x9734,
+  0x9735, 0x9736, 0x9737, 0x973a, 0x973b, 0x973c, 0x973d, 0x973f,
+  0x9740, 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747,
+  0x9748, 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f,
+  0x9750, 0x9751, 0x9754, 0x9755, 0x9757, 0x9758, 0x975a, 0x975c,
+  0x975d, 0x975f, 0x9763, 0x9764, 0x9766, 0x9767, 0x9768, 0x976a,
+  0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, 0x9772,
+  0x9775, 0x9777, 0x9778, 0x9779, 0x977a, 0x977b, 0x977d, 0x977e,
+  0x977f, 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9786, 0x9787,
+  0x9788, 0x9789, 0x978a, 0x978c, 0x978e, 0x978f, 0x9790, 0x9793,
+  0x9795, 0x9796, 0x9797, 0x9799, 0x979a, 0x979b, 0x979c, 0x979d,
+  0x81c1, 0x81a6, 0x6b24, 0x6b37, 0x6b39, 0x6b43, 0x6b46, 0x6b59,
+  0x98d1, 0x98d2, 0x98d3, 0x98d5, 0x98d9, 0x98da, 0x6bb3, 0x5f40,
+  0x6bc2, 0x89f3, 0x6590, 0x9f51, 0x6593, 0x65bc, 0x65c6, 0x65c4,
+  0x65c3, 0x65cc, 0x65ce, 0x65d2, 0x65d6, 0x7080, 0x709c, 0x7096,
+  0x709d, 0x70bb, 0x70c0, 0x70b7, 0x70ab, 0x70b1, 0x70e8, 0x70ca,
+  0x7110, 0x7113, 0x7116, 0x712f, 0x7131, 0x7173, 0x715c, 0x7168,
+  0x7145, 0x7172, 0x714a, 0x7178, 0x717a, 0x7198, 0x71b3, 0x71b5,
+  0x71a8, 0x71a0, 0x71e0, 0x71d4, 0x71e7, 0x71f9, 0x721d, 0x7228,
+  0x706c, 0x7118, 0x7166, 0x71b9, 0x623e, 0x623d, 0x6243, 0x6248,
+  0x6249, 0x793b, 0x7940, 0x7946, 0x7949, 0x795b, 0x795c, 0x7953,
+  0x795a, 0x7962, 0x7957, 0x7960, 0x796f, 0x7967, 0x797a, 0x7985,
+  0x798a, 0x799a, 0x79a7, 0x79b3, 0x5fd1, 0x5fd0,
+  /* 0xed */
+  0x979e, 0x979f, 0x97a1, 0x97a2, 0x97a4, 0x97a5, 0x97a6, 0x97a7,
+  0x97a8, 0x97a9, 0x97aa, 0x97ac, 0x97ae, 0x97b0, 0x97b1, 0x97b3,
+  0x97b5, 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc,
+  0x97bd, 0x97be, 0x97bf, 0x97c0, 0x97c1, 0x97c2, 0x97c3, 0x97c4,
+  0x97c5, 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc,
+  0x97cd, 0x97ce, 0x97cf, 0x97d0, 0x97d1, 0x97d2, 0x97d3, 0x97d4,
+  0x97d5, 0x97d6, 0x97d7, 0x97d8, 0x97d9, 0x97da, 0x97db, 0x97dc,
+  0x97dd, 0x97de, 0x97df, 0x97e0, 0x97e1, 0x97e2, 0x97e3, 0x97e4,
+  0x97e5, 0x97e8, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f4,
+  0x97f7, 0x97f8, 0x97f9, 0x97fa, 0x97fb, 0x97fc, 0x97fd, 0x97fe,
+  0x97ff, 0x9800, 0x9801, 0x9802, 0x9803, 0x9804, 0x9805, 0x9806,
+  0x9807, 0x9808, 0x9809, 0x980a, 0x980b, 0x980c, 0x980d, 0x980e,
+  0x603c, 0x605d, 0x605a, 0x6067, 0x6041, 0x6059, 0x6063, 0x60ab,
+  0x6106, 0x610d, 0x615d, 0x61a9, 0x619d, 0x61cb, 0x61d1, 0x6206,
+  0x8080, 0x807f, 0x6c93, 0x6cf6, 0x6dfc, 0x77f6, 0x77f8, 0x7800,
+  0x7809, 0x7817, 0x7818, 0x7811, 0x65ab, 0x782d, 0x781c, 0x781d,
+  0x7839, 0x783a, 0x783b, 0x781f, 0x783c, 0x7825, 0x782c, 0x7823,
+  0x7829, 0x784e, 0x786d, 0x7856, 0x7857, 0x7826, 0x7850, 0x7847,
+  0x784c, 0x786a, 0x789b, 0x7893, 0x789a, 0x7887, 0x789c, 0x78a1,
+  0x78a3, 0x78b2, 0x78b9, 0x78a5, 0x78d4, 0x78d9, 0x78c9, 0x78ec,
+  0x78f2, 0x7905, 0x78f4, 0x7913, 0x7924, 0x791e, 0x7934, 0x9f9b,
+  0x9ef9, 0x9efb, 0x9efc, 0x76f1, 0x7704, 0x770d, 0x76f9, 0x7707,
+  0x7708, 0x771a, 0x7722, 0x7719, 0x772d, 0x7726, 0x7735, 0x7738,
+  0x7750, 0x7751, 0x7747, 0x7743, 0x775a, 0x7768,
+  /* 0xee */
+  0x980f, 0x9810, 0x9811, 0x9812, 0x9813, 0x9814, 0x9815, 0x9816,
+  0x9817, 0x9818, 0x9819, 0x981a, 0x981b, 0x981c, 0x981d, 0x981e,
+  0x981f, 0x9820, 0x9821, 0x9822, 0x9823, 0x9824, 0x9825, 0x9826,
+  0x9827, 0x9828, 0x9829, 0x982a, 0x982b, 0x982c, 0x982d, 0x982e,
+  0x982f, 0x9830, 0x9831, 0x9832, 0x9833, 0x9834, 0x9835, 0x9836,
+  0x9837, 0x9838, 0x9839, 0x983a, 0x983b, 0x983c, 0x983d, 0x983e,
+  0x983f, 0x9840, 0x9841, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846,
+  0x9847, 0x9848, 0x9849, 0x984a, 0x984b, 0x984c, 0x984d, 0x984e,
+  0x984f, 0x9850, 0x9851, 0x9852, 0x9853, 0x9854, 0x9855, 0x9856,
+  0x9857, 0x9858, 0x9859, 0x985a, 0x985b, 0x985c, 0x985d, 0x985e,
+  0x985f, 0x9860, 0x9861, 0x9862, 0x9863, 0x9864, 0x9865, 0x9866,
+  0x9867, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e,
+  0x7762, 0x7765, 0x777f, 0x778d, 0x777d, 0x7780, 0x778c, 0x7791,
+  0x779f, 0x77a0, 0x77b0, 0x77b5, 0x77bd, 0x753a, 0x7540, 0x754e,
+  0x754b, 0x7548, 0x755b, 0x7572, 0x7579, 0x7583, 0x7f58, 0x7f61,
+  0x7f5f, 0x8a48, 0x7f68, 0x7f74, 0x7f71, 0x7f79, 0x7f81, 0x7f7e,
+  0x76cd, 0x76e5, 0x8832, 0x9485, 0x9486, 0x9487, 0x948b, 0x948a,
+  0x948c, 0x948d, 0x948f, 0x9490, 0x9494, 0x9497, 0x9495, 0x949a,
+  0x949b, 0x949c, 0x94a3, 0x94a4, 0x94ab, 0x94aa, 0x94ad, 0x94ac,
+  0x94af, 0x94b0, 0x94b2, 0x94b4, 0x94b6, 0x94b7, 0x94b8, 0x94b9,
+  0x94ba, 0x94bc, 0x94bd, 0x94bf, 0x94c4, 0x94c8, 0x94c9, 0x94ca,
+  0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94d0, 0x94d1, 0x94d2, 0x94d5,
+  0x94d6, 0x94d7, 0x94d9, 0x94d8, 0x94db, 0x94de, 0x94df, 0x94e0,
+  0x94e2, 0x94e4, 0x94e5, 0x94e7, 0x94e8, 0x94ea,
+  /* 0xef */
+  0x986f, 0x9870, 0x9871, 0x9872, 0x9873, 0x9874, 0x988b, 0x988e,
+  0x9892, 0x9895, 0x9899, 0x98a3, 0x98a8, 0x98a9, 0x98aa, 0x98ab,
+  0x98ac, 0x98ad, 0x98ae, 0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3,
+  0x98b4, 0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb,
+  0x98bc, 0x98bd, 0x98be, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3,
+  0x98c4, 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb,
+  0x98cc, 0x98cd, 0x98cf, 0x98d0, 0x98d4, 0x98d6, 0x98d7, 0x98db,
+  0x98dc, 0x98dd, 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0x98e5,
+  0x98e6, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, 0x98ef,
+  0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, 0x98f7,
+  0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe, 0x98ff,
+  0x9900, 0x9901, 0x9902, 0x9903, 0x9904, 0x9905, 0x9906, 0x9907,
+  0x94e9, 0x94eb, 0x94ee, 0x94ef, 0x94f3, 0x94f4, 0x94f5, 0x94f7,
+  0x94f9, 0x94fc, 0x94fd, 0x94ff, 0x9503, 0x9502, 0x9506, 0x9507,
+  0x9509, 0x950a, 0x950d, 0x950e, 0x950f, 0x9512, 0x9513, 0x9514,
+  0x9515, 0x9516, 0x9518, 0x951b, 0x951d, 0x951e, 0x951f, 0x9522,
+  0x952a, 0x952b, 0x9529, 0x952c, 0x9531, 0x9532, 0x9534, 0x9536,
+  0x9537, 0x9538, 0x953c, 0x953e, 0x953f, 0x9542, 0x9535, 0x9544,
+  0x9545, 0x9546, 0x9549, 0x954c, 0x954e, 0x954f, 0x9552, 0x9553,
+  0x9554, 0x9556, 0x9557, 0x9558, 0x9559, 0x955b, 0x955e, 0x955f,
+  0x955d, 0x9561, 0x9562, 0x9564, 0x9565, 0x9566, 0x9567, 0x9568,
+  0x9569, 0x956a, 0x956b, 0x956c, 0x956f, 0x9571, 0x9572, 0x9573,
+  0x953a, 0x77e7, 0x77ec, 0x96c9, 0x79d5, 0x79ed, 0x79e3, 0x79eb,
+  0x7a06, 0x5d47, 0x7a03, 0x7a02, 0x7a1e, 0x7a14,
+  /* 0xf0 */
+  0x9908, 0x9909, 0x990a, 0x990b, 0x990c, 0x990e, 0x990f, 0x9911,
+  0x9912, 0x9913, 0x9914, 0x9915, 0x9916, 0x9917, 0x9918, 0x9919,
+  0x991a, 0x991b, 0x991c, 0x991d, 0x991e, 0x991f, 0x9920, 0x9921,
+  0x9922, 0x9923, 0x9924, 0x9925, 0x9926, 0x9927, 0x9928, 0x9929,
+  0x992a, 0x992b, 0x992c, 0x992d, 0x992f, 0x9930, 0x9931, 0x9932,
+  0x9933, 0x9934, 0x9935, 0x9936, 0x9937, 0x9938, 0x9939, 0x993a,
+  0x993b, 0x993c, 0x993d, 0x993e, 0x993f, 0x9940, 0x9941, 0x9942,
+  0x9943, 0x9944, 0x9945, 0x9946, 0x9947, 0x9948, 0x9949, 0x994a,
+  0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, 0x9952,
+  0x9953, 0x9956, 0x9957, 0x9958, 0x9959, 0x995a, 0x995b, 0x995c,
+  0x995d, 0x995e, 0x995f, 0x9960, 0x9961, 0x9962, 0x9964, 0x9966,
+  0x9973, 0x9978, 0x9979, 0x997b, 0x997e, 0x9982, 0x9983, 0x9989,
+  0x7a39, 0x7a37, 0x7a51, 0x9ecf, 0x99a5, 0x7a70, 0x7688, 0x768e,
+  0x7693, 0x7699, 0x76a4, 0x74de, 0x74e0, 0x752c, 0x9e20, 0x9e22,
+  0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e32, 0x9e31, 0x9e36,
+  0x9e38, 0x9e37, 0x9e39, 0x9e3a, 0x9e3e, 0x9e41, 0x9e42, 0x9e44,
+  0x9e46, 0x9e47, 0x9e48, 0x9e49, 0x9e4b, 0x9e4c, 0x9e4e, 0x9e51,
+  0x9e55, 0x9e57, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5e, 0x9e63, 0x9e66,
+  0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e71, 0x9e6d,
+  0x9e73, 0x7592, 0x7594, 0x7596, 0x75a0, 0x759d, 0x75ac, 0x75a3,
+  0x75b3, 0x75b4, 0x75b8, 0x75c4, 0x75b1, 0x75b0, 0x75c3, 0x75c2,
+  0x75d6, 0x75cd, 0x75e3, 0x75e8, 0x75e6, 0x75e4, 0x75eb, 0x75e7,
+  0x7603, 0x75f1, 0x75fc, 0x75ff, 0x7610, 0x7600, 0x7605, 0x760c,
+  0x7617, 0x760a, 0x7625, 0x7618, 0x7615, 0x7619,
+  /* 0xf1 */
+  0x998c, 0x998e, 0x999a, 0x999b, 0x999c, 0x999d, 0x999e, 0x999f,
+  0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a6, 0x99a7, 0x99a9,
+  0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1,
+  0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9,
+  0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, 0x99c0, 0x99c1,
+  0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9,
+  0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1,
+  0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0x99d9,
+  0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, 0x99e0, 0x99e1,
+  0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, 0x99e9,
+  0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, 0x99f1,
+  0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, 0x99f9,
+  0x761b, 0x763c, 0x7622, 0x7620, 0x7640, 0x762d, 0x7630, 0x763f,
+  0x7635, 0x7643, 0x763e, 0x7633, 0x764d, 0x765e, 0x7654, 0x765c,
+  0x7656, 0x766b, 0x766f, 0x7fca, 0x7ae6, 0x7a78, 0x7a79, 0x7a80,
+  0x7a86, 0x7a88, 0x7a95, 0x7aa6, 0x7aa0, 0x7aac, 0x7aa8, 0x7aad,
+  0x7ab3, 0x8864, 0x8869, 0x8872, 0x887d, 0x887f, 0x8882, 0x88a2,
+  0x88c6, 0x88b7, 0x88bc, 0x88c9, 0x88e2, 0x88ce, 0x88e3, 0x88e5,
+  0x88f1, 0x891a, 0x88fc, 0x88e8, 0x88fe, 0x88f0, 0x8921, 0x8919,
+  0x8913, 0x891b, 0x890a, 0x8934, 0x892b, 0x8936, 0x8941, 0x8966,
+  0x897b, 0x758b, 0x80e5, 0x76b2, 0x76b4, 0x77dc, 0x8012, 0x8014,
+  0x8016, 0x801c, 0x8020, 0x8022, 0x8025, 0x8026, 0x8027, 0x8029,
+  0x8028, 0x8031, 0x800b, 0x8035, 0x8043, 0x8046, 0x804d, 0x8052,
+  0x8069, 0x8071, 0x8983, 0x9878, 0x9880, 0x9883,
+  /* 0xf2 */
+  0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x99ff, 0x9a00, 0x9a01,
+  0x9a02, 0x9a03, 0x9a04, 0x9a05, 0x9a06, 0x9a07, 0x9a08, 0x9a09,
+  0x9a0a, 0x9a0b, 0x9a0c, 0x9a0d, 0x9a0e, 0x9a0f, 0x9a10, 0x9a11,
+  0x9a12, 0x9a13, 0x9a14, 0x9a15, 0x9a16, 0x9a17, 0x9a18, 0x9a19,
+  0x9a1a, 0x9a1b, 0x9a1c, 0x9a1d, 0x9a1e, 0x9a1f, 0x9a20, 0x9a21,
+  0x9a22, 0x9a23, 0x9a24, 0x9a25, 0x9a26, 0x9a27, 0x9a28, 0x9a29,
+  0x9a2a, 0x9a2b, 0x9a2c, 0x9a2d, 0x9a2e, 0x9a2f, 0x9a30, 0x9a31,
+  0x9a32, 0x9a33, 0x9a34, 0x9a35, 0x9a36, 0x9a37, 0x9a38, 0x9a39,
+  0x9a3a, 0x9a3b, 0x9a3c, 0x9a3d, 0x9a3e, 0x9a3f, 0x9a40, 0x9a41,
+  0x9a42, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, 0x9a48, 0x9a49,
+  0x9a4a, 0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51,
+  0x9a52, 0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, 0x9a58, 0x9a59,
+  0x9889, 0x988c, 0x988d, 0x988f, 0x9894, 0x989a, 0x989b, 0x989e,
+  0x989f, 0x98a1, 0x98a2, 0x98a5, 0x98a6, 0x864d, 0x8654, 0x866c,
+  0x866e, 0x867f, 0x867a, 0x867c, 0x867b, 0x86a8, 0x868d, 0x868b,
+  0x86ac, 0x869d, 0x86a7, 0x86a3, 0x86aa, 0x8693, 0x86a9, 0x86b6,
+  0x86c4, 0x86b5, 0x86ce, 0x86b0, 0x86ba, 0x86b1, 0x86af, 0x86c9,
+  0x86cf, 0x86b4, 0x86e9, 0x86f1, 0x86f2, 0x86ed, 0x86f3, 0x86d0,
+  0x8713, 0x86de, 0x86f4, 0x86df, 0x86d8, 0x86d1, 0x8703, 0x8707,
+  0x86f8, 0x8708, 0x870a, 0x870d, 0x8709, 0x8723, 0x873b, 0x871e,
+  0x8725, 0x872e, 0x871a, 0x873e, 0x8748, 0x8734, 0x8731, 0x8729,
+  0x8737, 0x873f, 0x8782, 0x8722, 0x877d, 0x877e, 0x877b, 0x8760,
+  0x8770, 0x874c, 0x876e, 0x878b, 0x8753, 0x8763, 0x877c, 0x8764,
+  0x8759, 0x8765, 0x8793, 0x87af, 0x87a8, 0x87d2,
+  /* 0xf3 */
+  0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, 0x9a60, 0x9a61,
+  0x9a62, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69,
+  0x9a6a, 0x9a6b, 0x9a72, 0x9a83, 0x9a89, 0x9a8d, 0x9a8e, 0x9a94,
+  0x9a95, 0x9a99, 0x9aa6, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, 0x9aad,
+  0x9aae, 0x9aaf, 0x9ab2, 0x9ab3, 0x9ab4, 0x9ab5, 0x9ab9, 0x9abb,
+  0x9abd, 0x9abe, 0x9abf, 0x9ac3, 0x9ac4, 0x9ac6, 0x9ac7, 0x9ac8,
+  0x9ac9, 0x9aca, 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad2, 0x9ad4,
+  0x9ad5, 0x9ad6, 0x9ad7, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, 0x9add,
+  0x9ade, 0x9ae0, 0x9ae2, 0x9ae3, 0x9ae4, 0x9ae5, 0x9ae7, 0x9ae8,
+  0x9ae9, 0x9aea, 0x9aec, 0x9aee, 0x9af0, 0x9af1, 0x9af2, 0x9af3,
+  0x9af4, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9afa, 0x9afc, 0x9afd,
+  0x9afe, 0x9aff, 0x9b00, 0x9b01, 0x9b02, 0x9b04, 0x9b05, 0x9b06,
+  0x87c6, 0x8788, 0x8785, 0x87ad, 0x8797, 0x8783, 0x87ab, 0x87e5,
+  0x87ac, 0x87b5, 0x87b3, 0x87cb, 0x87d3, 0x87bd, 0x87d1, 0x87c0,
+  0x87ca, 0x87db, 0x87ea, 0x87e0, 0x87ee, 0x8816, 0x8813, 0x87fe,
+  0x880a, 0x881b, 0x8821, 0x8839, 0x883c, 0x7f36, 0x7f42, 0x7f44,
+  0x7f45, 0x8210, 0x7afa, 0x7afd, 0x7b08, 0x7b03, 0x7b04, 0x7b15,
+  0x7b0a, 0x7b2b, 0x7b0f, 0x7b47, 0x7b38, 0x7b2a, 0x7b19, 0x7b2e,
+  0x7b31, 0x7b20, 0x7b25, 0x7b24, 0x7b33, 0x7b3e, 0x7b1e, 0x7b58,
+  0x7b5a, 0x7b45, 0x7b75, 0x7b4c, 0x7b5d, 0x7b60, 0x7b6e, 0x7b7b,
+  0x7b62, 0x7b72, 0x7b71, 0x7b90, 0x7ba6, 0x7ba7, 0x7bb8, 0x7bac,
+  0x7b9d, 0x7ba8, 0x7b85, 0x7baa, 0x7b9c, 0x7ba2, 0x7bab, 0x7bb4,
+  0x7bd1, 0x7bc1, 0x7bcc, 0x7bdd, 0x7bda, 0x7be5, 0x7be6, 0x7bea,
+  0x7c0c, 0x7bfe, 0x7bfc, 0x7c0f, 0x7c16, 0x7c0b,
+  /* 0xf4 */
+  0x9b07, 0x9b09, 0x9b0a, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e, 0x9b10,
+  0x9b11, 0x9b12, 0x9b14, 0x9b15, 0x9b16, 0x9b17, 0x9b18, 0x9b19,
+  0x9b1a, 0x9b1b, 0x9b1c, 0x9b1d, 0x9b1e, 0x9b20, 0x9b21, 0x9b22,
+  0x9b24, 0x9b25, 0x9b26, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2b,
+  0x9b2c, 0x9b2d, 0x9b2e, 0x9b30, 0x9b31, 0x9b33, 0x9b34, 0x9b35,
+  0x9b36, 0x9b37, 0x9b38, 0x9b39, 0x9b3a, 0x9b3d, 0x9b3e, 0x9b3f,
+  0x9b40, 0x9b46, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4e, 0x9b50, 0x9b52,
+  0x9b53, 0x9b55, 0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0x9b5b,
+  0x9b5c, 0x9b5d, 0x9b5e, 0x9b5f, 0x9b60, 0x9b61, 0x9b62, 0x9b63,
+  0x9b64, 0x9b65, 0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, 0x9b6b,
+  0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, 0x9b73,
+  0x9b74, 0x9b75, 0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, 0x9b7b,
+  0x7c1f, 0x7c2a, 0x7c26, 0x7c38, 0x7c41, 0x7c40, 0x81fe, 0x8201,
+  0x8202, 0x8204, 0x81ec, 0x8844, 0x8221, 0x8222, 0x8223, 0x822d,
+  0x822f, 0x8228, 0x822b, 0x8238, 0x823b, 0x8233, 0x8234, 0x823e,
+  0x8244, 0x8249, 0x824b, 0x824f, 0x825a, 0x825f, 0x8268, 0x887e,
+  0x8885, 0x8888, 0x88d8, 0x88df, 0x895e, 0x7f9d, 0x7f9f, 0x7fa7,
+  0x7faf, 0x7fb0, 0x7fb2, 0x7c7c, 0x6549, 0x7c91, 0x7c9d, 0x7c9c,
+  0x7c9e, 0x7ca2, 0x7cb2, 0x7cbc, 0x7cbd, 0x7cc1, 0x7cc7, 0x7ccc,
+  0x7ccd, 0x7cc8, 0x7cc5, 0x7cd7, 0x7ce8, 0x826e, 0x66a8, 0x7fbf,
+  0x7fce, 0x7fd5, 0x7fe5, 0x7fe1, 0x7fe6, 0x7fe9, 0x7fee, 0x7ff3,
+  0x7cf8, 0x7d77, 0x7da6, 0x7dae, 0x7e47, 0x7e9b, 0x9eb8, 0x9eb4,
+  0x8d73, 0x8d84, 0x8d94, 0x8d91, 0x8db1, 0x8d67, 0x8d6d, 0x8c47,
+  0x8c49, 0x914a, 0x9150, 0x914e, 0x914f, 0x9164,
+  /* 0xf5 */
+  0x9b7c, 0x9b7d, 0x9b7e, 0x9b7f, 0x9b80, 0x9b81, 0x9b82, 0x9b83,
+  0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b88, 0x9b89, 0x9b8a, 0x9b8b,
+  0x9b8c, 0x9b8d, 0x9b8e, 0x9b8f, 0x9b90, 0x9b91, 0x9b92, 0x9b93,
+  0x9b94, 0x9b95, 0x9b96, 0x9b97, 0x9b98, 0x9b99, 0x9b9a, 0x9b9b,
+  0x9b9c, 0x9b9d, 0x9b9e, 0x9b9f, 0x9ba0, 0x9ba1, 0x9ba2, 0x9ba3,
+  0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0x9ba8, 0x9ba9, 0x9baa, 0x9bab,
+  0x9bac, 0x9bad, 0x9bae, 0x9baf, 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3,
+  0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, 0x9bb8, 0x9bb9, 0x9bba, 0x9bbb,
+  0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf, 0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3,
+  0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7, 0x9bc8, 0x9bc9, 0x9bca, 0x9bcb,
+  0x9bcc, 0x9bcd, 0x9bce, 0x9bcf, 0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3,
+  0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7, 0x9bd8, 0x9bd9, 0x9bda, 0x9bdb,
+  0x9162, 0x9161, 0x9170, 0x9169, 0x916f, 0x917d, 0x917e, 0x9172,
+  0x9174, 0x9179, 0x918c, 0x9185, 0x9190, 0x918d, 0x9191, 0x91a2,
+  0x91a3, 0x91aa, 0x91ad, 0x91ae, 0x91af, 0x91b5, 0x91b4, 0x91ba,
+  0x8c55, 0x9e7e, 0x8db8, 0x8deb, 0x8e05, 0x8e59, 0x8e69, 0x8db5,
+  0x8dbf, 0x8dbc, 0x8dba, 0x8dc4, 0x8dd6, 0x8dd7, 0x8dda, 0x8dde,
+  0x8dce, 0x8dcf, 0x8ddb, 0x8dc6, 0x8dec, 0x8df7, 0x8df8, 0x8de3,
+  0x8df9, 0x8dfb, 0x8de4, 0x8e09, 0x8dfd, 0x8e14, 0x8e1d, 0x8e1f,
+  0x8e2c, 0x8e2e, 0x8e23, 0x8e2f, 0x8e3a, 0x8e40, 0x8e39, 0x8e35,
+  0x8e3d, 0x8e31, 0x8e49, 0x8e41, 0x8e42, 0x8e51, 0x8e52, 0x8e4a,
+  0x8e70, 0x8e76, 0x8e7c, 0x8e6f, 0x8e74, 0x8e85, 0x8e8f, 0x8e94,
+  0x8e90, 0x8e9c, 0x8e9e, 0x8c78, 0x8c82, 0x8c8a, 0x8c85, 0x8c98,
+  0x8c94, 0x659b, 0x89d6, 0x89de, 0x89da, 0x89dc,
+  /* 0xf6 */
+  0x9bdc, 0x9bdd, 0x9bde, 0x9bdf, 0x9be0, 0x9be1, 0x9be2, 0x9be3,
+  0x9be4, 0x9be5, 0x9be6, 0x9be7, 0x9be8, 0x9be9, 0x9bea, 0x9beb,
+  0x9bec, 0x9bed, 0x9bee, 0x9bef, 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3,
+  0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb,
+  0x9bfc, 0x9bfd, 0x9bfe, 0x9bff, 0x9c00, 0x9c01, 0x9c02, 0x9c03,
+  0x9c04, 0x9c05, 0x9c06, 0x9c07, 0x9c08, 0x9c09, 0x9c0a, 0x9c0b,
+  0x9c0c, 0x9c0d, 0x9c0e, 0x9c0f, 0x9c10, 0x9c11, 0x9c12, 0x9c13,
+  0x9c14, 0x9c15, 0x9c16, 0x9c17, 0x9c18, 0x9c19, 0x9c1a, 0x9c1b,
+  0x9c1c, 0x9c1d, 0x9c1e, 0x9c1f, 0x9c20, 0x9c21, 0x9c22, 0x9c23,
+  0x9c24, 0x9c25, 0x9c26, 0x9c27, 0x9c28, 0x9c29, 0x9c2a, 0x9c2b,
+  0x9c2c, 0x9c2d, 0x9c2e, 0x9c2f, 0x9c30, 0x9c31, 0x9c32, 0x9c33,
+  0x9c34, 0x9c35, 0x9c36, 0x9c37, 0x9c38, 0x9c39, 0x9c3a, 0x9c3b,
+  0x89e5, 0x89eb, 0x89ef, 0x8a3e, 0x8b26, 0x9753, 0x96e9, 0x96f3,
+  0x96ef, 0x9706, 0x9701, 0x9708, 0x970f, 0x970e, 0x972a, 0x972d,
+  0x9730, 0x973e, 0x9f80, 0x9f83, 0x9f85, 0x9f86, 0x9f87, 0x9f88,
+  0x9f89, 0x9f8a, 0x9f8c, 0x9efe, 0x9f0b, 0x9f0d, 0x96b9, 0x96bc,
+  0x96bd, 0x96ce, 0x96d2, 0x77bf, 0x96e0, 0x928e, 0x92ae, 0x92c8,
+  0x933e, 0x936a, 0x93ca, 0x938f, 0x943e, 0x946b, 0x9c7f, 0x9c82,
+  0x9c85, 0x9c86, 0x9c87, 0x9c88, 0x7a23, 0x9c8b, 0x9c8e, 0x9c90,
+  0x9c91, 0x9c92, 0x9c94, 0x9c95, 0x9c9a, 0x9c9b, 0x9c9e, 0x9c9f,
+  0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8,
+  0x9ca9, 0x9cab, 0x9cad, 0x9cae, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3,
+  0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd,
+  0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cca, 0x9ccb,
+  /* 0xf7 */
+  0x9c3c, 0x9c3d, 0x9c3e, 0x9c3f, 0x9c40, 0x9c41, 0x9c42, 0x9c43,
+  0x9c44, 0x9c45, 0x9c46, 0x9c47, 0x9c48, 0x9c49, 0x9c4a, 0x9c4b,
+  0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, 0x9c50, 0x9c51, 0x9c52, 0x9c53,
+  0x9c54, 0x9c55, 0x9c56, 0x9c57, 0x9c58, 0x9c59, 0x9c5a, 0x9c5b,
+  0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c60, 0x9c61, 0x9c62, 0x9c63,
+  0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68, 0x9c69, 0x9c6a, 0x9c6b,
+  0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, 0x9c71, 0x9c72, 0x9c73,
+  0x9c74, 0x9c75, 0x9c76, 0x9c77, 0x9c78, 0x9c79, 0x9c7a, 0x9c7b,
+  0x9c7d, 0x9c7e, 0x9c80, 0x9c83, 0x9c84, 0x9c89, 0x9c8a, 0x9c8c,
+  0x9c8f, 0x9c93, 0x9c96, 0x9c97, 0x9c98, 0x9c99, 0x9c9d, 0x9caa,
+  0x9cac, 0x9caf, 0x9cb9, 0x9cbe, 0x9cbf, 0x9cc0, 0x9cc1, 0x9cc2,
+  0x9cc8, 0x9cc9, 0x9cd1, 0x9cd2, 0x9cda, 0x9cdb, 0x9ce0, 0x9ce1,
+  0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd3, 0x9cd4, 0x9cd5,
+  0x9cd7, 0x9cd8, 0x9cd9, 0x9cdc, 0x9cdd, 0x9cdf, 0x9ce2, 0x977c,
+  0x9785, 0x9791, 0x9792, 0x9794, 0x97af, 0x97ab, 0x97a3, 0x97b2,
+  0x97b4, 0x9ab1, 0x9ab0, 0x9ab7, 0x9e58, 0x9ab6, 0x9aba, 0x9abc,
+  0x9ac1, 0x9ac0, 0x9ac5, 0x9ac2, 0x9acb, 0x9acc, 0x9ad1, 0x9b45,
+  0x9b43, 0x9b47, 0x9b49, 0x9b48, 0x9b4d, 0x9b51, 0x98e8, 0x990d,
+  0x992e, 0x9955, 0x9954, 0x9adf, 0x9ae1, 0x9ae6, 0x9aef, 0x9aeb,
+  0x9afb, 0x9aed, 0x9af9, 0x9b08, 0x9b0f, 0x9b13, 0x9b1f, 0x9b23,
+  0x9ebd, 0x9ebe, 0x7e3b, 0x9e82, 0x9e87, 0x9e88, 0x9e8b, 0x9e92,
+  0x93d6, 0x9e9d, 0x9e9f, 0x9edb, 0x9edc, 0x9edd, 0x9ee0, 0x9edf,
+  0x9ee2, 0x9ee9, 0x9ee7, 0x9ee5, 0x9eea, 0x9eef, 0x9f22, 0x9f2c,
+  0x9f2f, 0x9f39, 0x9f37, 0x9f3d, 0x9f3e, 0x9f44,
+  /* 0xf8 */
+  0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea,
+  0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf2,
+  0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa,
+  0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9cff, 0x9d00, 0x9d01, 0x9d02,
+  0x9d03, 0x9d04, 0x9d05, 0x9d06, 0x9d07, 0x9d08, 0x9d09, 0x9d0a,
+  0x9d0b, 0x9d0c, 0x9d0d, 0x9d0e, 0x9d0f, 0x9d10, 0x9d11, 0x9d12,
+  0x9d13, 0x9d14, 0x9d15, 0x9d16, 0x9d17, 0x9d18, 0x9d19, 0x9d1a,
+  0x9d1b, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d1f, 0x9d20, 0x9d21, 0x9d22,
+  0x9d23, 0x9d24, 0x9d25, 0x9d26, 0x9d27, 0x9d28, 0x9d29, 0x9d2a,
+  0x9d2b, 0x9d2c, 0x9d2d, 0x9d2e, 0x9d2f, 0x9d30, 0x9d31, 0x9d32,
+  0x9d33, 0x9d34, 0x9d35, 0x9d36, 0x9d37, 0x9d38, 0x9d39, 0x9d3a,
+  0x9d3b, 0x9d3c, 0x9d3d, 0x9d3e, 0x9d3f, 0x9d40, 0x9d41, 0x9d42,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xf9 */
+  0x9d43, 0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, 0x9d49, 0x9d4a,
+  0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, 0x9d51, 0x9d52,
+  0x9d53, 0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a,
+  0x9d5b, 0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, 0x9d60, 0x9d61, 0x9d62,
+  0x9d63, 0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a,
+  0x9d6b, 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72,
+  0x9d73, 0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a,
+  0x9d7b, 0x9d7c, 0x9d7d, 0x9d7e, 0x9d7f, 0x9d80, 0x9d81, 0x9d82,
+  0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, 0x9d88, 0x9d89, 0x9d8a,
+  0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, 0x9d91, 0x9d92,
+  0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9d99, 0x9d9a,
+  0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0x9da1, 0x9da2,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xfa */
+  0x9da3, 0x9da4, 0x9da5, 0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa,
+  0x9dab, 0x9dac, 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db2,
+  0x9db3, 0x9db4, 0x9db5, 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba,
+  0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2,
+  0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca,
+  0x9dcb, 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2,
+  0x9dd3, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, 0x9dda,
+  0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, 0x9de0, 0x9de1, 0x9de2,
+  0x9de3, 0x9de4, 0x9de5, 0x9de6, 0x9de7, 0x9de8, 0x9de9, 0x9dea,
+  0x9deb, 0x9dec, 0x9ded, 0x9dee, 0x9def, 0x9df0, 0x9df1, 0x9df2,
+  0x9df3, 0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0x9dfa,
+  0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9dff, 0x9e00, 0x9e01, 0x9e02,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xfb */
+  0x9e03, 0x9e04, 0x9e05, 0x9e06, 0x9e07, 0x9e08, 0x9e09, 0x9e0a,
+  0x9e0b, 0x9e0c, 0x9e0d, 0x9e0e, 0x9e0f, 0x9e10, 0x9e11, 0x9e12,
+  0x9e13, 0x9e14, 0x9e15, 0x9e16, 0x9e17, 0x9e18, 0x9e19, 0x9e1a,
+  0x9e1b, 0x9e1c, 0x9e1d, 0x9e1e, 0x9e24, 0x9e27, 0x9e2e, 0x9e30,
+  0x9e34, 0x9e3b, 0x9e3c, 0x9e40, 0x9e4d, 0x9e50, 0x9e52, 0x9e53,
+  0x9e54, 0x9e56, 0x9e59, 0x9e5d, 0x9e5f, 0x9e60, 0x9e61, 0x9e62,
+  0x9e65, 0x9e6e, 0x9e6f, 0x9e72, 0x9e74, 0x9e75, 0x9e76, 0x9e77,
+  0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e80, 0x9e81,
+  0x9e83, 0x9e84, 0x9e85, 0x9e86, 0x9e89, 0x9e8a, 0x9e8c, 0x9e8d,
+  0x9e8e, 0x9e8f, 0x9e90, 0x9e91, 0x9e94, 0x9e95, 0x9e96, 0x9e97,
+  0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9e, 0x9ea0, 0x9ea1,
+  0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea7, 0x9ea8, 0x9ea9, 0x9eaa,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xfc */
+  0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb1, 0x9eb2,
+  0x9eb3, 0x9eb5, 0x9eb6, 0x9eb7, 0x9eb9, 0x9eba, 0x9ebc, 0x9ebf,
+  0x9ec0, 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8,
+  0x9eca, 0x9ecb, 0x9ecc, 0x9ed0, 0x9ed2, 0x9ed3, 0x9ed5, 0x9ed6,
+  0x9ed7, 0x9ed9, 0x9eda, 0x9ede, 0x9ee1, 0x9ee3, 0x9ee4, 0x9ee6,
+  0x9ee8, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9ef0, 0x9ef1, 0x9ef2,
+  0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, 0x9ef8, 0x9efa, 0x9efd,
+  0x9eff, 0x9f00, 0x9f01, 0x9f02, 0x9f03, 0x9f04, 0x9f05, 0x9f06,
+  0x9f07, 0x9f08, 0x9f09, 0x9f0a, 0x9f0c, 0x9f0f, 0x9f11, 0x9f12,
+  0x9f14, 0x9f15, 0x9f16, 0x9f18, 0x9f1a, 0x9f1b, 0x9f1c, 0x9f1d,
+  0x9f1e, 0x9f1f, 0x9f21, 0x9f23, 0x9f24, 0x9f25, 0x9f26, 0x9f27,
+  0x9f28, 0x9f29, 0x9f2a, 0x9f2b, 0x9f2d, 0x9f2e, 0x9f30, 0x9f31,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xfd */
+  0x9f32, 0x9f33, 0x9f34, 0x9f35, 0x9f36, 0x9f38, 0x9f3a, 0x9f3c,
+  0x9f3f, 0x9f40, 0x9f41, 0x9f42, 0x9f43, 0x9f45, 0x9f46, 0x9f47,
+  0x9f48, 0x9f49, 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f,
+  0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59,
+  0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, 0x9f60, 0x9f61,
+  0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69,
+  0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71,
+  0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0x9f79,
+  0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f81, 0x9f82, 0x9f8d,
+  0x9f8e, 0x9f8f, 0x9f90, 0x9f91, 0x9f92, 0x9f93, 0x9f94, 0x9f95,
+  0x9f96, 0x9f97, 0x9f98, 0x9f9c, 0x9f9d, 0x9f9e, 0x9fa1, 0x9fa2,
+  0x9fa3, 0x9fa4, 0x9fa5, 0xf92c, 0xf979, 0xf995, 0xf9e7, 0xf9f1,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xfe */
+  0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, 0xfa11, 0xfa13, 0xfa14, 0xfa18,
+  0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29,
+};
+
+static int
+cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = s[0];
+  if ((c1 >= 0x81 && c1 <= 0xfe)) {
+    if (n >= 2) {
+      unsigned char c2 = s[1];
+      if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0x80 && c2 < 0xff)) {
+        unsigned int i = 190 * (c1 - 0x81) + (c2 - (c2 >= 0x80 ? 0x41 : 0x40));
+        unsigned short wc = 0xfffd;
+        {
+          if (i < 23766)
+            wc = cp936ext_2uni_page81[i];
+        }
+        if (wc != 0xfffd) {
+          *pwc = (ucs4_t) wc;
+          return 2;
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+
+static const unsigned short cp936ext_page0014[208] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa1e8, 0x0000, 0x0000, 0xa1ec, /*0xa0-0xa7*/
+  0xa1a7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa8-0xaf*/
+  0xa1e3, 0xa1c0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1a4, /*0xb0-0xb7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xb8-0xbf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xc0-0xc7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xc8-0xcf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1c1, /*0xd0-0xd7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xd8-0xdf*/
+  0xa8a4, 0xa8a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xe0-0xe7*/
+  0xa8a8, 0xa8a6, 0xa8ba, 0x0000, 0xa8ac, 0xa8aa, 0x0000, 0x0000, /*0xe8-0xef*/
+  0x0000, 0x0000, 0xa8b0, 0xa8ae, 0x0000, 0x0000, 0x0000, 0xa1c2, /*0xf0-0xf7*/
+  0x0000, 0xa8b4, 0xa8b2, 0x0000, 0xa8b9, 0x0000, 0x0000, 0x0000, /*0xf8-0xff*/
+  /* 0x0100 */
+  0x0000, 0xa8a1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x00-0x07*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x08-0x0f*/
+  0x0000, 0x0000, 0x0000, 0xa8a5, 0x0000, 0x0000, 0x0000, 0x0000, /*0x10-0x17*/
+  0x0000, 0x0000, 0x0000, 0xa8a7, 0x0000, 0x0000, 0x0000, 0x0000, /*0x18-0x1f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x20-0x27*/
+  0x0000, 0x0000, 0x0000, 0xa8a9, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x30-0x37*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x38-0x3f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa8bd, 0x0000, 0x0000, 0x0000, /*0x40-0x47*/
+  0xa8be, 0x0000, 0x0000, 0x0000, 0x0000, 0xa8ad, 0x0000, 0x0000, /*0x48-0x4f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x50-0x57*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x58-0x5f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x60-0x67*/
+  0x0000, 0x0000, 0x0000, 0xa8b1, 0x0000, 0x0000, 0x0000, 0x0000, /*0x68-0x6f*/
+};
+static const unsigned short cp936ext_page0039[24] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa8a3, 0x0000, /*0xc8-0xcf*/
+  0xa8ab, 0x0000, 0xa8af, 0x0000, 0xa8b3, 0x0000, 0xa8b5, 0x0000, /*0xd0-0xd7*/
+  0xa8b6, 0x0000, 0xa8b7, 0x0000, 0xa8b8, 0x0000, 0x0000, 0x0000, /*0xd8-0xdf*/
+};
+static const unsigned short cp936ext_page004a[24] = {
+  0x0000, 0xa8bb, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x50-0x57*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x58-0x5f*/
+  0x0000, 0xa8c0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x60-0x67*/
+};
+static const unsigned short cp936ext_page0058[32] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1a6, /*0xc0-0xc7*/
+  0x0000, 0xa1a5, 0xa840, 0xa841, 0x0000, 0x0000, 0x0000, 0x0000, /*0xc8-0xcf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xd0-0xd7*/
+  0x0000, 0xa842, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xd8-0xdf*/
+};
+static const unsigned short cp936ext_page0072[64] = {
+  0x0000, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, 0xa6a5, 0xa6a6, 0xa6a7, /*0x90-0x97*/
+  0xa6a8, 0xa6a9, 0xa6aa, 0xa6ab, 0xa6ac, 0xa6ad, 0xa6ae, 0xa6af, /*0x98-0x9f*/
+  0xa6b0, 0xa6b1, 0x0000, 0xa6b2, 0xa6b3, 0xa6b4, 0xa6b5, 0xa6b6, /*0xa0-0xa7*/
+  0xa6b7, 0xa6b8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa8-0xaf*/
+  0x0000, 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7, /*0xb0-0xb7*/
+  0xa6c8, 0xa6c9, 0xa6ca, 0xa6cb, 0xa6cc, 0xa6cd, 0xa6ce, 0xa6cf, /*0xb8-0xbf*/
+  0xa6d0, 0xa6d1, 0x0000, 0xa6d2, 0xa6d3, 0xa6d4, 0xa6d5, 0xa6d6, /*0xc0-0xc7*/
+  0xa6d7, 0xa6d8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xc8-0xcf*/
+};
+static const unsigned short cp936ext_page0080[88] = {
+  0x0000, 0xa7a7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x00-0x07*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x08-0x0f*/
+  0xa7a1, 0xa7a2, 0xa7a3, 0xa7a4, 0xa7a5, 0xa7a6, 0xa7a8, 0xa7a9, /*0x10-0x17*/
+  0xa7aa, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7af, 0xa7b0, 0xa7b1, /*0x18-0x1f*/
+  0xa7b2, 0xa7b3, 0xa7b4, 0xa7b5, 0xa7b6, 0xa7b7, 0xa7b8, 0xa7b9, /*0x20-0x27*/
+  0xa7ba, 0xa7bb, 0xa7bc, 0xa7bd, 0xa7be, 0xa7bf, 0xa7c0, 0xa7c1, /*0x28-0x2f*/
+  0xa7d1, 0xa7d2, 0xa7d3, 0xa7d4, 0xa7d5, 0xa7d6, 0xa7d8, 0xa7d9, /*0x30-0x37*/
+  0xa7da, 0xa7db, 0xa7dc, 0xa7dd, 0xa7de, 0xa7df, 0xa7e0, 0xa7e1, /*0x38-0x3f*/
+  0xa7e2, 0xa7e3, 0xa7e4, 0xa7e5, 0xa7e6, 0xa7e7, 0xa7e8, 0xa7e9, /*0x40-0x47*/
+  0xa7ea, 0xa7eb, 0xa7ec, 0xa7ed, 0xa7ee, 0xa7ef, 0xa7f0, 0xa7f1, /*0x48-0x4f*/
+  0x0000, 0xa7d7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x50-0x57*/
+};
+static const unsigned short cp936ext_page0402[48] = {
+  0xa95c, 0x0000, 0x0000, 0xa843, 0xa1aa, 0xa844, 0xa1ac, 0x0000, /*0x10-0x17*/
+  0xa1ae, 0xa1af, 0x0000, 0x0000, 0xa1b0, 0xa1b1, 0x0000, 0x0000, /*0x18-0x1f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa845, 0xa1ad, 0x0000, /*0x20-0x27*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+  0xa1eb, 0x0000, 0xa1e4, 0xa1e5, 0x0000, 0xa846, 0x0000, 0x0000, /*0x30-0x37*/
+  0x0000, 0x0000, 0x0000, 0xa1f9, 0x0000, 0x0000, 0x0000, 0x0000, /*0x38-0x3f*/
+};
+static const unsigned short cp936ext_page0420[160] = {
+  0x0000, 0x0000, 0x0000, 0xa1e6, 0x0000, 0xa847, 0x0000, 0x0000, /*0x00-0x07*/
+  0x0000, 0xa848, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x08-0x0f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1ed, 0x0000, /*0x10-0x17*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x18-0x1f*/
+  0x0000, 0xa959, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x20-0x27*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x30-0x37*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x38-0x3f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x40-0x47*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x48-0x4f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x50-0x57*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x58-0x5f*/
+  0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, 0xa2f8, /*0x60-0x67*/
+  0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0x0000, 0x0000, 0x0000, 0x0000, /*0x68-0x6f*/
+  0xa2a1, 0xa2a2, 0xa2a3, 0xa2a4, 0xa2a5, 0xa2a6, 0xa2a7, 0xa2a8, /*0x70-0x77*/
+  0xa2a9, 0xa2aa, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x78-0x7f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x80-0x87*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x88-0x8f*/
+  0xa1fb, 0xa1fc, 0xa1fa, 0xa1fd, 0x0000, 0x0000, 0xa849, 0xa84a, /*0x90-0x97*/
+  0xa84b, 0xa84c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x98-0x9f*/
+};
+static const unsigned short cp936ext_page0441[184] = {
+  0xa1ca, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1c7, /*0x08-0x0f*/
+  0x0000, 0xa1c6, 0x0000, 0x0000, 0x0000, 0xa84d, 0x0000, 0x0000, /*0x10-0x17*/
+  0x0000, 0x0000, 0xa1cc, 0x0000, 0x0000, 0xa1d8, 0xa1de, 0xa84e, /*0x18-0x1f*/
+  0xa1cf, 0x0000, 0x0000, 0xa84f, 0x0000, 0xa1ce, 0x0000, 0xa1c4, /*0x20-0x27*/
+  0xa1c5, 0xa1c9, 0xa1c8, 0xa1d2, 0x0000, 0x0000, 0xa1d3, 0x0000, /*0x28-0x2f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa1e0, 0xa1df, 0xa1c3, 0xa1cb, /*0x30-0x37*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1d7, 0x0000, 0x0000, /*0x38-0x3f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x40-0x47*/
+  0xa1d6, 0x0000, 0x0000, 0x0000, 0xa1d5, 0x0000, 0x0000, 0x0000, /*0x48-0x4f*/
+  0x0000, 0x0000, 0xa850, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x50-0x57*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x58-0x5f*/
+  0xa1d9, 0xa1d4, 0x0000, 0x0000, 0xa1dc, 0xa1dd, 0xa851, 0xa852, /*0x60-0x67*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1da, 0xa1db, /*0x68-0x6f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x70-0x77*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x78-0x7f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x80-0x87*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x88-0x8f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa892, 0x0000, 0x0000, /*0x90-0x97*/
+  0x0000, 0xa1d1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x98-0x9f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1cd, 0x0000, 0x0000, /*0xa0-0xa7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa8-0xaf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xb0-0xb7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa853, /*0xb8-0xbf*/
+};
+static const unsigned short cp936ext_page048c[64] = {
+  0xa2d9, 0xa2da, 0xa2db, 0xa2dc, 0xa2dd, 0xa2de, 0xa2df, 0xa2e0, /*0x60-0x67*/
+  0xa2e1, 0xa2e2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x68-0x6f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa2c5, 0xa2c6, 0xa2c7, 0xa2c8, /*0x70-0x77*/
+  0xa2c9, 0xa2ca, 0xa2cb, 0xa2cc, 0xa2cd, 0xa2ce, 0xa2cf, 0xa2d0, /*0x78-0x7f*/
+  0xa2d1, 0xa2d2, 0xa2d3, 0xa2d4, 0xa2d5, 0xa2d6, 0xa2d7, 0xa2d8, /*0x80-0x87*/
+  0xa2b1, 0xa2b2, 0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6, 0xa2b7, 0xa2b8, /*0x88-0x8f*/
+  0xa2b9, 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bd, 0xa2be, 0xa2bf, 0xa2c0, /*0x90-0x97*/
+  0xa2c1, 0xa2c2, 0xa2c3, 0xa2c4, 0x0000, 0x0000, 0x0000, 0x0000, /*0x98-0x9f*/
+};
+static const unsigned short cp936ext_page04a0[232] = {
+  0xa9a4, 0xa9a5, 0xa9a6, 0xa9a7, 0xa9a8, 0xa9a9, 0xa9aa, 0xa9ab, /*0x00-0x07*/
+  0xa9ac, 0xa9ad, 0xa9ae, 0xa9af, 0xa9b0, 0xa9b1, 0xa9b2, 0xa9b3, /*0x08-0x0f*/
+  0xa9b4, 0xa9b5, 0xa9b6, 0xa9b7, 0xa9b8, 0xa9b9, 0xa9ba, 0xa9bb, /*0x10-0x17*/
+  0xa9bc, 0xa9bd, 0xa9be, 0xa9bf, 0xa9c0, 0xa9c1, 0xa9c2, 0xa9c3, /*0x18-0x1f*/
+  0xa9c4, 0xa9c5, 0xa9c6, 0xa9c7, 0xa9c8, 0xa9c9, 0xa9ca, 0xa9cb, /*0x20-0x27*/
+  0xa9cc, 0xa9cd, 0xa9ce, 0xa9cf, 0xa9d0, 0xa9d1, 0xa9d2, 0xa9d3, /*0x28-0x2f*/
+  0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, 0xa9d8, 0xa9d9, 0xa9da, 0xa9db, /*0x30-0x37*/
+  0xa9dc, 0xa9dd, 0xa9de, 0xa9df, 0xa9e0, 0xa9e1, 0xa9e2, 0xa9e3, /*0x38-0x3f*/
+  0xa9e4, 0xa9e5, 0xa9e6, 0xa9e7, 0xa9e8, 0xa9e9, 0xa9ea, 0xa9eb, /*0x40-0x47*/
+  0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, 0x0000, 0x0000, 0x0000, 0x0000, /*0x48-0x4f*/
+  0xa854, 0xa855, 0xa856, 0xa857, 0xa858, 0xa859, 0xa85a, 0xa85b, /*0x50-0x57*/
+  0xa85c, 0xa85d, 0xa85e, 0xa85f, 0xa860, 0xa861, 0xa862, 0xa863, /*0x58-0x5f*/
+  0xa864, 0xa865, 0xa866, 0xa867, 0xa868, 0xa869, 0xa86a, 0xa86b, /*0x60-0x67*/
+  0xa86c, 0xa86d, 0xa86e, 0xa86f, 0xa870, 0xa871, 0xa872, 0xa873, /*0x68-0x6f*/
+  0xa874, 0xa875, 0xa876, 0xa877, 0x0000, 0x0000, 0x0000, 0x0000, /*0x70-0x77*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x78-0x7f*/
+  0x0000, 0xa878, 0xa879, 0xa87a, 0xa87b, 0xa87c, 0xa87d, 0xa87e, /*0x80-0x87*/
+  0xa880, 0xa881, 0xa882, 0xa883, 0xa884, 0xa885, 0xa886, 0xa887, /*0x88-0x8f*/
+  0x0000, 0x0000, 0x0000, 0xa888, 0xa889, 0xa88a, 0x0000, 0x0000, /*0x90-0x97*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x98-0x9f*/
+  0xa1f6, 0xa1f5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa0-0xa7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa8-0xaf*/
+  0x0000, 0x0000, 0xa1f8, 0xa1f7, 0x0000, 0x0000, 0x0000, 0x0000, /*0xb0-0xb7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa88b, 0xa88c, 0x0000, 0x0000, /*0xb8-0xbf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1f4, 0xa1f3, /*0xc0-0xc7*/
+  0x0000, 0x0000, 0x0000, 0xa1f0, 0x0000, 0x0000, 0xa1f2, 0xa1f1, /*0xc8-0xcf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xd0-0xd7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xd8-0xdf*/
+  0x0000, 0x0000, 0xa88d, 0xa88e, 0xa88f, 0xa890, 0x0000, 0x0000, /*0xe0-0xe7*/
+};
+static const unsigned short cp936ext_page04c0[72] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa1ef, 0xa1ee, 0x0000, /*0x00-0x07*/
+  0x0000, 0xa891, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x08-0x0f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x10-0x17*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x18-0x1f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x20-0x27*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x30-0x37*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x38-0x3f*/
+  0xa1e2, 0x0000, 0xa1e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x40-0x47*/
+};
+static const unsigned short cp936ext_page0600[304] = {
+  0xa1a1, 0xa1a2, 0xa1a3, 0xa1a8, 0x0000, 0xa1a9, 0xa965, 0xa996, /*0x00-0x07*/
+  0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b8, 0xa1b9, 0xa1ba, 0xa1bb, /*0x08-0x0f*/
+  0xa1be, 0xa1bf, 0xa893, 0xa1fe, 0xa1b2, 0xa1b3, 0xa1bc, 0xa1bd, /*0x10-0x17*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa894, 0xa895, 0x0000, /*0x18-0x1f*/
+  0x0000, 0xa940, 0xa941, 0xa942, 0xa943, 0xa944, 0xa945, 0xa946, /*0x20-0x27*/
+  0xa947, 0xa948, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x30-0x37*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x38-0x3f*/
+  0x0000, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, /*0x40-0x47*/
+  0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, /*0x48-0x4f*/
+  0xa4b0, 0xa4b1, 0xa4b2, 0xa4b3, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, /*0x50-0x57*/
+  0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, 0xa4be, 0xa4bf, /*0x58-0x5f*/
+  0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, 0xa4c6, 0xa4c7, /*0x60-0x67*/
+  0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, /*0x68-0x6f*/
+  0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0xa4d4, 0xa4d5, 0xa4d6, 0xa4d7, /*0x70-0x77*/
+  0xa4d8, 0xa4d9, 0xa4da, 0xa4db, 0xa4dc, 0xa4dd, 0xa4de, 0xa4df, /*0x78-0x7f*/
+  0xa4e0, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, 0xa4e5, 0xa4e6, 0xa4e7, /*0x80-0x87*/
+  0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef, /*0x88-0x8f*/
+  0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0x0000, 0x0000, 0x0000, 0x0000, /*0x90-0x97*/
+  0x0000, 0x0000, 0x0000, 0xa961, 0xa962, 0xa966, 0xa967, 0x0000, /*0x98-0x9f*/
+  0x0000, 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7, /*0xa0-0xa7*/
+  0xa5a8, 0xa5a9, 0xa5aa, 0xa5ab, 0xa5ac, 0xa5ad, 0xa5ae, 0xa5af, /*0xa8-0xaf*/
+  0xa5b0, 0xa5b1, 0xa5b2, 0xa5b3, 0xa5b4, 0xa5b5, 0xa5b6, 0xa5b7, /*0xb0-0xb7*/
+  0xa5b8, 0xa5b9, 0xa5ba, 0xa5bb, 0xa5bc, 0xa5bd, 0xa5be, 0xa5bf, /*0xb8-0xbf*/
+  0xa5c0, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7, /*0xc0-0xc7*/
+  0xa5c8, 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf, /*0xc8-0xcf*/
+  0xa5d0, 0xa5d1, 0xa5d2, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6, 0xa5d7, /*0xd0-0xd7*/
+  0xa5d8, 0xa5d9, 0xa5da, 0xa5db, 0xa5dc, 0xa5dd, 0xa5de, 0xa5df, /*0xd8-0xdf*/
+  0xa5e0, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7, /*0xe0-0xe7*/
+  0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef, /*0xe8-0xef*/
+  0xa5f0, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, 0x0000, /*0xf0-0xf7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa960, 0xa963, 0xa964, 0x0000, /*0xf8-0xff*/
+  /* 0x3100 */
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa8c5, 0xa8c6, 0xa8c7, /*0x00-0x07*/
+  0xa8c8, 0xa8c9, 0xa8ca, 0xa8cb, 0xa8cc, 0xa8cd, 0xa8ce, 0xa8cf, /*0x08-0x0f*/
+  0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6, 0xa8d7, /*0x10-0x17*/
+  0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, 0xa8dd, 0xa8de, 0xa8df, /*0x18-0x1f*/
+  0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, 0xa8e5, 0xa8e6, 0xa8e7, /*0x20-0x27*/
+  0xa8e8, 0xa8e9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+};
+static const unsigned short cp936ext_page0644[24] = {
+  0xa2e5, 0xa2e6, 0xa2e7, 0xa2e8, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, /*0x20-0x27*/
+  0xa2ed, 0xa2ee, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+  0x0000, 0xa95a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x30-0x37*/
+};
+static const unsigned short cp936ext_page0671[80] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa94a, 0xa94b, /*0x88-0x8f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x90-0x97*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa94c, 0xa94d, 0xa94e, 0x0000, /*0x98-0x9f*/
+  0x0000, 0xa94f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa0-0xa7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xa8-0xaf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xb0-0xb7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xb8-0xbf*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0xa950, 0x0000, 0x0000, 0x0000, /*0xc0-0xc7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa951, 0x0000, /*0xc8-0xcf*/
+  0x0000, 0xa952, 0xa953, 0x0000, 0x0000, 0xa954, 0x0000, 0x0000, /*0xd0-0xd7*/
+};
+static const unsigned short cp936ext_page09c0[20904] = {
+  0xd2bb, 0xb6a1, 0x8140, 0xc6df, 0x8141, 0x8142, 0x8143, 0xcdf2, /*0x00-0x07*/
+  0xd5c9, 0xc8fd, 0xc9cf, 0xcfc2, 0xd8a2, 0xb2bb, 0xd3eb, 0x8144, /*0x08-0x0f*/
+  0xd8a4, 0xb3f3, 0x8145, 0xd7a8, 0xc7d2, 0xd8a7, 0xcac0, 0x8146, /*0x10-0x17*/
+  0xc7f0, 0xb1fb, 0xd2b5, 0xb4d4, 0xb6ab, 0xcbbf, 0xd8a9, 0x8147, /*0x18-0x1f*/
+  0x8148, 0x8149, 0xb6aa, 0x814a, 0xc1bd, 0xd1cf, 0x814b, 0xc9a5, /*0x20-0x27*/
+  0xd8ad, 0x814c, 0xb8f6, 0xd1be, 0xe3dc, 0xd6d0, 0x814d, 0x814e, /*0x28-0x2f*/
+  0xb7e1, 0x814f, 0xb4ae, 0x8150, 0xc1d9, 0x8151, 0xd8bc, 0x8152, /*0x30-0x37*/
+  0xcde8, 0xb5a4, 0xceaa, 0xd6f7, 0x8153, 0xc0f6, 0xbed9, 0xd8af, /*0x38-0x3f*/
+  0x8154, 0x8155, 0x8156, 0xc4cb, 0x8157, 0xbec3, 0x8158, 0xd8b1, /*0x40-0x47*/
+  0xc3b4, 0xd2e5, 0x8159, 0xd6ae, 0xceda, 0xd5a7, 0xbaf5, 0xb7a6, /*0x48-0x4f*/
+  0xc0d6, 0x815a, 0xc6b9, 0xc5d2, 0xc7c7, 0x815b, 0xb9d4, 0x815c, /*0x50-0x57*/
+  0xb3cb, 0xd2d2, 0x815d, 0x815e, 0xd8bf, 0xbec5, 0xc6f2, 0xd2b2, /*0x58-0x5f*/
+  0xcfb0, 0xcfe7, 0x815f, 0x8160, 0x8161, 0x8162, 0xcae9, 0x8163, /*0x60-0x67*/
+  0x8164, 0xd8c0, 0x8165, 0x8166, 0x8167, 0x8168, 0x8169, 0x816a, /*0x68-0x6f*/
+  0xc2f2, 0xc2d2, 0x816b, 0xc8e9, 0x816c, 0x816d, 0x816e, 0x816f, /*0x70-0x77*/
+  0x8170, 0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0xc7ac, 0x8176, /*0x78-0x7f*/
+  0x8177, 0x8178, 0x8179, 0x817a, 0x817b, 0x817c, 0xc1cb, 0x817d, /*0x80-0x87*/
+  0xd3e8, 0xd5f9, 0x817e, 0xcac2, 0xb6fe, 0xd8a1, 0xd3da, 0xbff7, /*0x88-0x8f*/
+  0x8180, 0xd4c6, 0xbba5, 0xd8c1, 0xcee5, 0xbeae, 0x8181, 0x8182, /*0x90-0x97*/
+  0xd8a8, 0x8183, 0xd1c7, 0xd0a9, 0x8184, 0x8185, 0x8186, 0xd8bd, /*0x98-0x9f*/
+  0xd9ef, 0xcdf6, 0xbfba, 0x8187, 0xbdbb, 0xbaa5, 0xd2e0, 0xb2fa, /*0xa0-0xa7*/
+  0xbae0, 0xc4b6, 0x8188, 0xcfed, 0xbea9, 0xcda4, 0xc1c1, 0x8189, /*0xa8-0xaf*/
+  0x818a, 0x818b, 0xc7d7, 0xd9f1, 0x818c, 0xd9f4, 0x818d, 0x818e, /*0xb0-0xb7*/
+  0x818f, 0x8190, 0xc8cb, 0xd8e9, 0x8191, 0x8192, 0x8193, 0xd2da, /*0xb8-0xbf*/
+  0xcab2, 0xc8ca, 0xd8ec, 0xd8ea, 0xd8c6, 0xbdf6, 0xc6cd, 0xb3f0, /*0xc0-0xc7*/
+  0x8194, 0xd8eb, 0xbdf1, 0xbde9, 0x8195, 0xc8d4, 0xb4d3, 0x8196, /*0xc8-0xcf*/
+  0x8197, 0xc2d8, 0x8198, 0xb2d6, 0xd7d0, 0xcacb, 0xcbfb, 0xd5cc, /*0xd0-0xd7*/
+  0xb8b6, 0xcfc9, 0x8199, 0x819a, 0x819b, 0xd9da, 0xd8f0, 0xc7aa, /*0xd8-0xdf*/
+  0x819c, 0xd8ee, 0x819d, 0xb4fa, 0xc1ee, 0xd2d4, 0x819e, 0x819f, /*0xe0-0xe7*/
+  0xd8ed, 0x81a0, 0xd2c7, 0xd8ef, 0xc3c7, 0x81a1, 0x81a2, 0x81a3, /*0xe8-0xef*/
+  0xd1f6, 0x81a4, 0xd6d9, 0xd8f2, 0x81a5, 0xd8f5, 0xbcfe, 0xbcdb, /*0xf0-0xf7*/
+  0x81a6, 0x81a7, 0x81a8, 0xc8ce, 0x81a9, 0xb7dd, 0x81aa, 0xb7c2, /*0xf8-0xff*/
+  /* 0x4f00 */
+  0x81ab, 0xc6f3, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1, /*0x00-0x07*/
+  0x81b2, 0xd8f8, 0xd2c1, 0x81b3, 0x81b4, 0xcee9, 0xbcbf, 0xb7fc, /*0x08-0x0f*/
+  0xb7a5, 0xd0dd, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, 0xd6da, /*0x10-0x17*/
+  0xd3c5, 0xbbef, 0xbbe1, 0xd8f1, 0x81ba, 0x81bb, 0xc9a1, 0xceb0, /*0x18-0x1f*/
+  0xb4ab, 0x81bc, 0xd8f3, 0x81bd, 0xc9cb, 0xd8f6, 0xc2d7, 0xd8f7, /*0x20-0x27*/
+  0x81be, 0x81bf, 0xceb1, 0xd8f9, 0x81c0, 0x81c1, 0x81c2, 0xb2ae, /*0x28-0x2f*/
+  0xb9c0, 0x81c3, 0xd9a3, 0x81c4, 0xb0e9, 0x81c5, 0xc1e6, 0x81c6, /*0x30-0x37*/
+  0xc9ec, 0x81c7, 0xcbc5, 0x81c8, 0xcbc6, 0xd9a4, 0x81c9, 0x81ca, /*0x38-0x3f*/
+  0x81cb, 0x81cc, 0x81cd, 0xb5e8, 0x81ce, 0x81cf, 0xb5ab, 0x81d0, /*0x40-0x47*/
+  0x81d1, 0x81d2, 0x81d3, 0x81d4, 0x81d5, 0xcebb, 0xb5cd, 0xd7a1, /*0x48-0x4f*/
+  0xd7f4, 0xd3d3, 0x81d6, 0xcce5, 0x81d7, 0xbace, 0x81d8, 0xd9a2, /*0x50-0x57*/
+  0xd9dc, 0xd3e0, 0xd8fd, 0xb7f0, 0xd7f7, 0xd8fe, 0xd8fa, 0xd9a1, /*0x58-0x5f*/
+  0xc4e3, 0x81d9, 0x81da, 0xd3b6, 0xd8f4, 0xd9dd, 0x81db, 0xd8fb, /*0x60-0x67*/
+  0x81dc, 0xc5e5, 0x81dd, 0x81de, 0xc0d0, 0x81df, 0x81e0, 0xd1f0, /*0x68-0x6f*/
+  0xb0db, 0x81e1, 0x81e2, 0xbcd1, 0xd9a6, 0x81e3, 0xd9a5, 0x81e4, /*0x70-0x77*/
+  0x81e5, 0x81e6, 0x81e7, 0xd9ac, 0xd9ae, 0x81e8, 0xd9ab, 0xcab9, /*0x78-0x7f*/
+  0x81e9, 0x81ea, 0x81eb, 0xd9a9, 0xd6b6, 0x81ec, 0x81ed, 0x81ee, /*0x80-0x87*/
+  0xb3de, 0xd9a8, 0x81ef, 0xc0fd, 0x81f0, 0xcacc, 0x81f1, 0xd9aa, /*0x88-0x8f*/
+  0x81f2, 0xd9a7, 0x81f3, 0x81f4, 0xd9b0, 0x81f5, 0x81f6, 0xb6b1, /*0x90-0x97*/
+  0x81f7, 0x81f8, 0x81f9, 0xb9a9, 0x81fa, 0xd2c0, 0x81fb, 0x81fc, /*0x98-0x9f*/
+  0xcfc0, 0x81fd, 0x81fe, 0xc2c2, 0x8240, 0xbdc4, 0xd5ec, 0xb2e0, /*0xa0-0xa7*/
+  0xc7c8, 0xbfeb, 0xd9ad, 0x8241, 0xd9af, 0x8242, 0xceea, 0xbaee, /*0xa8-0xaf*/
+  0x8243, 0x8244, 0x8245, 0x8246, 0x8247, 0xc7d6, 0x8248, 0x8249, /*0xb0-0xb7*/
+  0x824a, 0x824b, 0x824c, 0x824d, 0x824e, 0x824f, 0x8250, 0xb1e3, /*0xb8-0xbf*/
+  0x8251, 0x8252, 0x8253, 0xb4d9, 0xb6ed, 0xd9b4, 0x8254, 0x8255, /*0xc0-0xc7*/
+  0x8256, 0x8257, 0xbfa1, 0x8258, 0x8259, 0x825a, 0xd9de, 0xc7ce, /*0xc8-0xcf*/
+  0xc0fe, 0xd9b8, 0x825b, 0x825c, 0x825d, 0x825e, 0x825f, 0xcbd7, /*0xd0-0xd7*/
+  0xb7fd, 0x8260, 0xd9b5, 0x8261, 0xd9b7, 0xb1a3, 0xd3e1, 0xd9b9, /*0xd8-0xdf*/
+  0x8262, 0xd0c5, 0x8263, 0xd9b6, 0x8264, 0x8265, 0xd9b1, 0x8266, /*0xe0-0xe7*/
+  0xd9b2, 0xc1a9, 0xd9b3, 0x8267, 0x8268, 0xbcf3, 0xd0de, 0xb8a9, /*0xe8-0xef*/
+  0x8269, 0xbee3, 0x826a, 0xd9bd, 0x826b, 0x826c, 0x826d, 0x826e, /*0xf0-0xf7*/
+  0xd9ba, 0x826f, 0xb0b3, 0x8270, 0x8271, 0x8272, 0xd9c2, 0x8273, /*0xf8-0xff*/
+  /* 0x5000 */
+  0x8274, 0x8275, 0x8276, 0x8277, 0x8278, 0x8279, 0x827a, 0x827b, /*0x00-0x07*/
+  0x827c, 0x827d, 0x827e, 0x8280, 0xd9c4, 0xb1b6, 0x8281, 0xd9bf, /*0x08-0x0f*/
+  0x8282, 0x8283, 0xb5b9, 0x8284, 0xbef3, 0x8285, 0x8286, 0x8287, /*0x10-0x17*/
+  0xccc8, 0xbaf2, 0xd2d0, 0x8288, 0xd9c3, 0x8289, 0x828a, 0xbde8, /*0x18-0x1f*/
+  0x828b, 0xb3ab, 0x828c, 0x828d, 0x828e, 0xd9c5, 0xbeeb, 0x828f, /*0x20-0x27*/
+  0xd9c6, 0xd9bb, 0xc4df, 0x8290, 0xd9be, 0xd9c1, 0xd9c0, 0x8291, /*0x28-0x2f*/
+  0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, 0x8298, 0x8299, /*0x30-0x37*/
+  0x829a, 0x829b, 0xd5ae, 0x829c, 0xd6b5, 0x829d, 0xc7e3, 0x829e, /*0x38-0x3f*/
+  0x829f, 0x82a0, 0x82a1, 0xd9c8, 0x82a2, 0x82a3, 0x82a4, 0xbcd9, /*0x40-0x47*/
+  0xd9ca, 0x82a5, 0x82a6, 0x82a7, 0xd9bc, 0x82a8, 0xd9cb, 0xc6ab, /*0x48-0x4f*/
+  0x82a9, 0x82aa, 0x82ab, 0x82ac, 0x82ad, 0xd9c9, 0x82ae, 0x82af, /*0x50-0x57*/
+  0x82b0, 0x82b1, 0xd7f6, 0x82b2, 0xcda3, 0x82b3, 0x82b4, 0x82b5, /*0x58-0x5f*/
+  0x82b6, 0x82b7, 0x82b8, 0x82b9, 0x82ba, 0xbda1, 0x82bb, 0x82bc, /*0x60-0x67*/
+  0x82bd, 0x82be, 0x82bf, 0x82c0, 0xd9cc, 0x82c1, 0x82c2, 0x82c3, /*0x68-0x6f*/
+  0x82c4, 0x82c5, 0x82c6, 0x82c7, 0x82c8, 0x82c9, 0xc5bc, 0xcdb5, /*0x70-0x77*/
+  0x82ca, 0x82cb, 0x82cc, 0xd9cd, 0x82cd, 0x82ce, 0xd9c7, 0xb3a5, /*0x78-0x7f*/
+  0xbffe, 0x82cf, 0x82d0, 0x82d1, 0x82d2, 0xb8b5, 0x82d3, 0x82d4, /*0x80-0x87*/
+  0xc0fc, 0x82d5, 0x82d6, 0x82d7, 0x82d8, 0xb0f8, 0x82d9, 0x82da, /*0x88-0x8f*/
+  0x82db, 0x82dc, 0x82dd, 0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e2, /*0x90-0x97*/
+  0x82e3, 0x82e4, 0x82e5, 0x82e6, 0x82e7, 0x82e8, 0x82e9, 0x82ea, /*0x98-0x9f*/
+  0x82eb, 0x82ec, 0x82ed, 0xb4f6, 0x82ee, 0xd9ce, 0x82ef, 0xd9cf, /*0xa0-0xa7*/
+  0xb4a2, 0xd9d0, 0x82f0, 0x82f1, 0xb4df, 0x82f2, 0x82f3, 0x82f4, /*0xa8-0xaf*/
+  0x82f5, 0x82f6, 0xb0c1, 0x82f7, 0x82f8, 0x82f9, 0x82fa, 0x82fb, /*0xb0-0xb7*/
+  0x82fc, 0x82fd, 0xd9d1, 0xc9b5, 0x82fe, 0x8340, 0x8341, 0x8342, /*0xb8-0xbf*/
+  0x8343, 0x8344, 0x8345, 0x8346, 0x8347, 0x8348, 0x8349, 0x834a, /*0xc0-0xc7*/
+  0x834b, 0x834c, 0x834d, 0x834e, 0x834f, 0x8350, 0x8351, 0xcff1, /*0xc8-0xcf*/
+  0x8352, 0x8353, 0x8354, 0x8355, 0x8356, 0x8357, 0xd9d2, 0x8358, /*0xd0-0xd7*/
+  0x8359, 0x835a, 0xc1c5, 0x835b, 0x835c, 0x835d, 0x835e, 0x835f, /*0xd8-0xdf*/
+  0x8360, 0x8361, 0x8362, 0x8363, 0x8364, 0x8365, 0xd9d6, 0xc9ae, /*0xe0-0xe7*/
+  0x8366, 0x8367, 0x8368, 0x8369, 0xd9d5, 0xd9d4, 0xd9d7, 0x836a, /*0xe8-0xef*/
+  0x836b, 0x836c, 0x836d, 0xcbdb, 0x836e, 0xbda9, 0x836f, 0x8370, /*0xf0-0xf7*/
+  0x8371, 0x8372, 0x8373, 0xc6a7, 0x8374, 0x8375, 0x8376, 0x8377, /*0xf8-0xff*/
+  /* 0x5100 */
+  0x8378, 0x8379, 0x837a, 0x837b, 0x837c, 0x837d, 0xd9d3, 0xd9d8, /*0x00-0x07*/
+  0x837e, 0x8380, 0x8381, 0xd9d9, 0x8382, 0x8383, 0x8384, 0x8385, /*0x08-0x0f*/
+  0x8386, 0x8387, 0xc8e5, 0x8388, 0x8389, 0x838a, 0x838b, 0x838c, /*0x10-0x17*/
+  0x838d, 0x838e, 0x838f, 0x8390, 0x8391, 0x8392, 0x8393, 0x8394, /*0x18-0x1f*/
+  0x8395, 0xc0dc, 0x8396, 0x8397, 0x8398, 0x8399, 0x839a, 0x839b, /*0x20-0x27*/
+  0x839c, 0x839d, 0x839e, 0x839f, 0x83a0, 0x83a1, 0x83a2, 0x83a3, /*0x28-0x2f*/
+  0x83a4, 0x83a5, 0x83a6, 0x83a7, 0x83a8, 0x83a9, 0x83aa, 0x83ab, /*0x30-0x37*/
+  0x83ac, 0x83ad, 0x83ae, 0x83af, 0x83b0, 0x83b1, 0x83b2, 0xb6f9, /*0x38-0x3f*/
+  0xd8a3, 0xd4ca, 0x83b3, 0xd4aa, 0xd0d6, 0xb3e4, 0xd5d7, 0x83b4, /*0x40-0x47*/
+  0xcfc8, 0xb9e2, 0x83b5, 0xbfcb, 0x83b6, 0xc3e2, 0x83b7, 0x83b8, /*0x48-0x4f*/
+  0x83b9, 0xb6d2, 0x83ba, 0x83bb, 0xcdc3, 0xd9ee, 0xd9f0, 0x83bc, /*0x50-0x57*/
+  0x83bd, 0x83be, 0xb5b3, 0x83bf, 0xb6b5, 0x83c0, 0x83c1, 0x83c2, /*0x58-0x5f*/
+  0x83c3, 0x83c4, 0xbea4, 0x83c5, 0x83c6, 0xc8eb, 0x83c7, 0x83c8, /*0x60-0x67*/
+  0xc8ab, 0x83c9, 0x83ca, 0xb0cb, 0xb9ab, 0xc1f9, 0xd9e2, 0x83cb, /*0x68-0x6f*/
+  0xc0bc, 0xb9b2, 0x83cc, 0xb9d8, 0xd0cb, 0xb1f8, 0xc6e4, 0xbedf, /*0x70-0x77*/
+  0xb5e4, 0xd7c8, 0x83cd, 0xd1f8, 0xbce6, 0xcade, 0x83ce, 0x83cf, /*0x78-0x7f*/
+  0xbcbd, 0xd9e6, 0xd8e7, 0x83d0, 0x83d1, 0xc4da, 0x83d2, 0x83d3, /*0x80-0x87*/
+  0xb8d4, 0xc8bd, 0x83d4, 0x83d5, 0xb2e1, 0xd4d9, 0x83d6, 0x83d7, /*0x88-0x8f*/
+  0x83d8, 0x83d9, 0xc3b0, 0x83da, 0x83db, 0xc3e1, 0xdaa2, 0xc8df, /*0x90-0x97*/
+  0x83dc, 0xd0b4, 0x83dd, 0xbefc, 0xc5a9, 0x83de, 0x83df, 0x83e0, /*0x98-0x9f*/
+  0xb9da, 0x83e1, 0xdaa3, 0x83e2, 0xd4a9, 0xdaa4, 0x83e3, 0x83e4, /*0xa0-0xa7*/
+  0x83e5, 0x83e6, 0x83e7, 0xd9fb, 0xb6ac, 0x83e8, 0x83e9, 0xb7eb, /*0xa8-0xaf*/
+  0xb1f9, 0xd9fc, 0xb3e5, 0xbef6, 0x83ea, 0xbff6, 0xd2b1, 0xc0e4, /*0xb0-0xb7*/
+  0x83eb, 0x83ec, 0x83ed, 0xb6b3, 0xd9fe, 0xd9fd, 0x83ee, 0x83ef, /*0xb8-0xbf*/
+  0xbebb, 0x83f0, 0x83f1, 0x83f2, 0xc6e0, 0x83f3, 0xd7bc, 0xdaa1, /*0xc0-0xc7*/
+  0x83f4, 0xc1b9, 0x83f5, 0xb5f2, 0xc1e8, 0x83f6, 0x83f7, 0xbcf5, /*0xc8-0xcf*/
+  0x83f8, 0xb4d5, 0x83f9, 0x83fa, 0x83fb, 0x83fc, 0x83fd, 0x83fe, /*0xd0-0xd7*/
+  0x8440, 0x8441, 0x8442, 0xc1dd, 0x8443, 0xc4fd, 0x8444, 0x8445, /*0xd8-0xdf*/
+  0xbcb8, 0xb7b2, 0x8446, 0x8447, 0xb7ef, 0x8448, 0x8449, 0x844a, /*0xe0-0xe7*/
+  0x844b, 0x844c, 0x844d, 0xd9ec, 0x844e, 0xc6be, 0x844f, 0xbfad, /*0xe8-0xef*/
+  0xbbcb, 0x8450, 0x8451, 0xb5ca, 0x8452, 0xdbc9, 0xd0d7, 0x8453, /*0xf0-0xf7*/
+  0xcdb9, 0xb0bc, 0xb3f6, 0xbbf7, 0xdbca, 0xbaaf, 0x8454, 0xd4e4, /*0xf8-0xff*/
+  /* 0x5200 */
+  0xb5b6, 0xb5f3, 0xd8d6, 0xc8d0, 0x8455, 0x8456, 0xb7d6, 0xc7d0, /*0x00-0x07*/
+  0xd8d7, 0x8457, 0xbfaf, 0x8458, 0x8459, 0xdbbb, 0xd8d8, 0x845a, /*0x08-0x0f*/
+  0x845b, 0xd0cc, 0xbbae, 0x845c, 0x845d, 0x845e, 0xebbe, 0xc1d0, /*0x10-0x17*/
+  0xc1f5, 0xd4f2, 0xb8d5, 0xb4b4, 0x845f, 0xb3f5, 0x8460, 0x8461, /*0x18-0x1f*/
+  0xc9be, 0x8462, 0x8463, 0x8464, 0xc5d0, 0x8465, 0x8466, 0x8467, /*0x20-0x27*/
+  0xc5d9, 0xc0fb, 0x8468, 0xb1f0, 0x8469, 0xd8d9, 0xb9ce, 0x846a, /*0x28-0x2f*/
+  0xb5bd, 0x846b, 0x846c, 0xd8da, 0x846d, 0x846e, 0xd6c6, 0xcba2, /*0x30-0x37*/
+  0xc8af, 0xc9b2, 0xb4cc, 0xbfcc, 0x846f, 0xb9f4, 0x8470, 0xd8db, /*0x38-0x3f*/
+  0xd8dc, 0xb6e7, 0xbcc1, 0xccea, 0x8471, 0x8472, 0x8473, 0x8474, /*0x40-0x47*/
+  0x8475, 0x8476, 0xcff7, 0x8477, 0xd8dd, 0xc7b0, 0x8478, 0x8479, /*0x48-0x4f*/
+  0xb9d0, 0xbda3, 0x847a, 0x847b, 0xccde, 0x847c, 0xc6ca, 0x847d, /*0x50-0x57*/
+  0x847e, 0x8480, 0x8481, 0x8482, 0xd8e0, 0x8483, 0xd8de, 0x8484, /*0x58-0x5f*/
+  0x8485, 0xd8df, 0x8486, 0x8487, 0x8488, 0xb0fe, 0x8489, 0xbee7, /*0x60-0x67*/
+  0x848a, 0xcaa3, 0xbcf4, 0x848b, 0x848c, 0x848d, 0x848e, 0xb8b1, /*0x68-0x6f*/
+  0x848f, 0x8490, 0xb8ee, 0x8491, 0x8492, 0x8493, 0x8494, 0x8495, /*0x70-0x77*/
+  0x8496, 0x8497, 0x8498, 0x8499, 0x849a, 0xd8e2, 0x849b, 0xbdcb, /*0x78-0x7f*/
+  0x849c, 0xd8e4, 0xd8e3, 0x849d, 0x849e, 0x849f, 0x84a0, 0x84a1, /*0x80-0x87*/
+  0xc5fc, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, 0x84a8, /*0x88-0x8f*/
+  0xd8e5, 0x84a9, 0x84aa, 0xd8e6, 0x84ab, 0x84ac, 0x84ad, 0x84ae, /*0x90-0x97*/
+  0x84af, 0x84b0, 0x84b1, 0xc1a6, 0x84b2, 0xc8b0, 0xb0ec, 0xb9a6, /*0x98-0x9f*/
+  0xbcd3, 0xcef1, 0xdbbd, 0xc1d3, 0x84b3, 0x84b4, 0x84b5, 0x84b6, /*0xa0-0xa7*/
+  0xb6af, 0xd6fa, 0xc5ac, 0xbdd9, 0xdbbe, 0xdbbf, 0x84b7, 0x84b8, /*0xa8-0xaf*/
+  0x84b9, 0xc0f8, 0xbea2, 0xc0cd, 0x84ba, 0x84bb, 0x84bc, 0x84bd, /*0xb0-0xb7*/
+  0x84be, 0x84bf, 0x84c0, 0x84c1, 0x84c2, 0x84c3, 0xdbc0, 0xcac6, /*0xb8-0xbf*/
+  0x84c4, 0x84c5, 0x84c6, 0xb2aa, 0x84c7, 0x84c8, 0x84c9, 0xd3c2, /*0xc0-0xc7*/
+  0x84ca, 0xc3e3, 0x84cb, 0xd1ab, 0x84cc, 0x84cd, 0x84ce, 0x84cf, /*0xc8-0xcf*/
+  0xdbc2, 0x84d0, 0xc0d5, 0x84d1, 0x84d2, 0x84d3, 0xdbc3, 0x84d4, /*0xd0-0xd7*/
+  0xbfb1, 0x84d5, 0x84d6, 0x84d7, 0x84d8, 0x84d9, 0x84da, 0xc4bc, /*0xd8-0xdf*/
+  0x84db, 0x84dc, 0x84dd, 0x84de, 0xc7da, 0x84df, 0x84e0, 0x84e1, /*0xe0-0xe7*/
+  0x84e2, 0x84e3, 0x84e4, 0x84e5, 0x84e6, 0x84e7, 0x84e8, 0x84e9, /*0xe8-0xef*/
+  0xdbc4, 0x84ea, 0x84eb, 0x84ec, 0x84ed, 0x84ee, 0x84ef, 0x84f0, /*0xf0-0xf7*/
+  0x84f1, 0xd9e8, 0xc9d7, 0x84f2, 0x84f3, 0x84f4, 0xb9b4, 0xcef0, /*0xf8-0xff*/
+  /* 0x5300 */
+  0xd4c8, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0xb0fc, 0xb4d2, 0x84f9, /*0x00-0x07*/
+  0xd0d9, 0x84fa, 0x84fb, 0x84fc, 0x84fd, 0xd9e9, 0x84fe, 0xdecb, /*0x08-0x0f*/
+  0xd9eb, 0x8540, 0x8541, 0x8542, 0x8543, 0xd8b0, 0xbbaf, 0xb1b1, /*0x10-0x17*/
+  0x8544, 0xb3d7, 0xd8ce, 0x8545, 0x8546, 0xd4d1, 0x8547, 0x8548, /*0x18-0x1f*/
+  0xbdb3, 0xbfef, 0x8549, 0xcfbb, 0x854a, 0x854b, 0xd8d0, 0x854c, /*0x20-0x27*/
+  0x854d, 0x854e, 0xb7cb, 0x854f, 0x8550, 0x8551, 0xd8d1, 0x8552, /*0x28-0x2f*/
+  0x8553, 0x8554, 0x8555, 0x8556, 0x8557, 0x8558, 0x8559, 0x855a, /*0x30-0x37*/
+  0x855b, 0xc6a5, 0xc7f8, 0xd2bd, 0x855c, 0x855d, 0xd8d2, 0xc4e4, /*0x38-0x3f*/
+  0x855e, 0xcaae, 0x855f, 0xc7a7, 0x8560, 0xd8a6, 0x8561, 0xc9fd, /*0x40-0x47*/
+  0xcee7, 0xbbdc, 0xb0eb, 0x8562, 0x8563, 0x8564, 0xbbaa, 0xd0ad, /*0x48-0x4f*/
+  0x8565, 0xb1b0, 0xd7e4, 0xd7bf, 0x8566, 0xb5a5, 0xc2f4, 0xc4cf, /*0x50-0x57*/
+  0x8567, 0x8568, 0xb2a9, 0x8569, 0xb2b7, 0x856a, 0xb1e5, 0xdfb2, /*0x58-0x5f*/
+  0xd5bc, 0xbfa8, 0xc2ac, 0xd8d5, 0xc2b1, 0x856b, 0xd8d4, 0xced4, /*0x60-0x67*/
+  0x856c, 0xdae0, 0x856d, 0xcec0, 0x856e, 0x856f, 0xd8b4, 0xc3ae, /*0x68-0x6f*/
+  0xd3a1, 0xcea3, 0x8570, 0xbcb4, 0xc8b4, 0xc2d1, 0x8571, 0xbeed, /*0x70-0x77*/
+  0xd0b6, 0x8572, 0xdae1, 0x8573, 0x8574, 0x8575, 0x8576, 0xc7e4, /*0x78-0x7f*/
+  0x8577, 0x8578, 0xb3a7, 0x8579, 0xb6f2, 0xccfc, 0xc0fa, 0x857a, /*0x80-0x87*/
+  0x857b, 0xc0f7, 0x857c, 0xd1b9, 0xd1e1, 0xd8c7, 0x857d, 0x857e, /*0x88-0x8f*/
+  0x8580, 0x8581, 0x8582, 0x8583, 0x8584, 0xb2de, 0x8585, 0x8586, /*0x90-0x97*/
+  0xc0e5, 0x8587, 0xbaf1, 0x8588, 0x8589, 0xd8c8, 0x858a, 0xd4ad, /*0x98-0x9f*/
+  0x858b, 0x858c, 0xcfe1, 0xd8c9, 0x858d, 0xd8ca, 0xcfc3, 0x858e, /*0xa0-0xa7*/
+  0xb3f8, 0xbec7, 0x858f, 0x8590, 0x8591, 0x8592, 0xd8cb, 0x8593, /*0xa8-0xaf*/
+  0x8594, 0x8595, 0x8596, 0x8597, 0x8598, 0x8599, 0xdbcc, 0x859a, /*0xb0-0xb7*/
+  0x859b, 0x859c, 0x859d, 0xc8a5, 0x859e, 0x859f, 0x85a0, 0xcfd8, /*0xb8-0xbf*/
+  0x85a1, 0xc8fe, 0xb2ce, 0x85a2, 0x85a3, 0x85a4, 0x85a5, 0x85a6, /*0xc0-0xc7*/
+  0xd3d6, 0xb2e6, 0xbcb0, 0xd3d1, 0xcbab, 0xb7b4, 0x85a7, 0x85a8, /*0xc8-0xcf*/
+  0x85a9, 0xb7a2, 0x85aa, 0x85ab, 0xcae5, 0x85ac, 0xc8a1, 0xcadc, /*0xd0-0xd7*/
+  0xb1e4, 0xd0f0, 0x85ad, 0xc5d1, 0x85ae, 0x85af, 0x85b0, 0xdbc5, /*0xd8-0xdf*/
+  0xb5fe, 0x85b1, 0x85b2, 0xbfda, 0xb9c5, 0xbee4, 0xc1ed, 0x85b3, /*0xe0-0xe7*/
+  0xdfb6, 0xdfb5, 0xd6bb, 0xbdd0, 0xd5d9, 0xb0c8, 0xb6a3, 0xbfc9, /*0xe8-0xef*/
+  0xcca8, 0xdfb3, 0xcab7, 0xd3d2, 0x85b4, 0xd8cf, 0xd2b6, 0xbac5, /*0xf0-0xf7*/
+  0xcbbe, 0xccbe, 0x85b5, 0xdfb7, 0xb5f0, 0xdfb4, 0x85b6, 0x85b7, /*0xf8-0xff*/
+  /* 0x5400 */
+  0x85b8, 0xd3f5, 0x85b9, 0xb3d4, 0xb8f7, 0x85ba, 0xdfba, 0x85bb, /*0x00-0x07*/
+  0xbacf, 0xbcaa, 0xb5f5, 0x85bc, 0xcdac, 0xc3fb, 0xbaf3, 0xc0f4, /*0x08-0x0f*/
+  0xcdc2, 0xcff2, 0xdfb8, 0xcfc5, 0x85bd, 0xc2c0, 0xdfb9, 0xc2f0, /*0x10-0x17*/
+  0x85be, 0x85bf, 0x85c0, 0xbefd, 0x85c1, 0xc1df, 0xcdcc, 0xd2f7, /*0x18-0x1f*/
+  0xb7cd, 0xdfc1, 0x85c2, 0xdfc4, 0x85c3, 0x85c4, 0xb7f1, 0xb0c9, /*0x20-0x27*/
+  0xb6d6, 0xb7d4, 0x85c5, 0xbaac, 0xccfd, 0xbfd4, 0xcbb1, 0xc6f4, /*0x28-0x2f*/
+  0x85c6, 0xd6a8, 0xdfc5, 0x85c7, 0xcee2, 0xb3b3, 0x85c8, 0x85c9, /*0x30-0x37*/
+  0xcefc, 0xb4b5, 0x85ca, 0xcec7, 0xbaf0, 0x85cb, 0xcee1, 0x85cc, /*0x38-0x3f*/
+  0xd1bd, 0x85cd, 0x85ce, 0xdfc0, 0x85cf, 0x85d0, 0xb4f4, 0x85d1, /*0x40-0x47*/
+  0xb3ca, 0x85d2, 0xb8e6, 0xdfbb, 0x85d3, 0x85d4, 0x85d5, 0x85d6, /*0x48-0x4f*/
+  0xc4c5, 0x85d7, 0xdfbc, 0xdfbd, 0xdfbe, 0xc5bb, 0xdfbf, 0xdfc2, /*0x50-0x57*/
+  0xd4b1, 0xdfc3, 0x85d8, 0xc7ba, 0xced8, 0x85d9, 0x85da, 0x85db, /*0x58-0x5f*/
+  0x85dc, 0x85dd, 0xc4d8, 0x85de, 0xdfca, 0x85df, 0xdfcf, 0x85e0, /*0x60-0x67*/
+  0xd6dc, 0x85e1, 0x85e2, 0x85e3, 0x85e4, 0x85e5, 0x85e6, 0x85e7, /*0x68-0x6f*/
+  0x85e8, 0xdfc9, 0xdfda, 0xceb6, 0x85e9, 0xbac7, 0xdfce, 0xdfc8, /*0x70-0x77*/
+  0xc5de, 0x85ea, 0x85eb, 0xc9eb, 0xbaf4, 0xc3fc, 0x85ec, 0x85ed, /*0x78-0x7f*/
+  0xbed7, 0x85ee, 0xdfc6, 0x85ef, 0xdfcd, 0x85f0, 0xc5d8, 0x85f1, /*0x80-0x87*/
+  0x85f2, 0x85f3, 0x85f4, 0xd5a6, 0xbacd, 0x85f5, 0xbecc, 0xd3bd, /*0x88-0x8f*/
+  0xb8c0, 0x85f6, 0xd6e4, 0x85f7, 0xdfc7, 0xb9be, 0xbfa7, 0x85f8, /*0x90-0x97*/
+  0x85f9, 0xc1fc, 0xdfcb, 0xdfcc, 0x85fa, 0xdfd0, 0x85fb, 0x85fc, /*0x98-0x9f*/
+  0x85fd, 0x85fe, 0x8640, 0xdfdb, 0xdfe5, 0x8641, 0xdfd7, 0xdfd6, /*0xa0-0xa7*/
+  0xd7c9, 0xdfe3, 0xdfe4, 0xe5eb, 0xd2a7, 0xdfd2, 0x8642, 0xbfa9, /*0xa8-0xaf*/
+  0x8643, 0xd4db, 0x8644, 0xbfc8, 0xdfd4, 0x8645, 0x8646, 0x8647, /*0xb0-0xb7*/
+  0xcfcc, 0x8648, 0x8649, 0xdfdd, 0x864a, 0xd1ca, 0x864b, 0xdfde, /*0xb8-0xbf*/
+  0xb0a7, 0xc6b7, 0xdfd3, 0x864c, 0xbae5, 0x864d, 0xb6df, 0xcddb, /*0xc0-0xc7*/
+  0xb9fe, 0xd4d5, 0x864e, 0x864f, 0xdfdf, 0xcfec, 0xb0a5, 0xdfe7, /*0xc8-0xcf*/
+  0xdfd1, 0xd1c6, 0xdfd5, 0xdfd8, 0xdfd9, 0xdfdc, 0x8650, 0xbba9, /*0xd0-0xd7*/
+  0x8651, 0xdfe0, 0xdfe1, 0x8652, 0xdfe2, 0xdfe6, 0xdfe8, 0xd3b4, /*0xd8-0xdf*/
+  0x8653, 0x8654, 0x8655, 0x8656, 0x8657, 0xb8e7, 0xc5b6, 0xdfea, /*0xe0-0xe7*/
+  0xc9da, 0xc1a8, 0xc4c4, 0x8658, 0x8659, 0xbfde, 0xcff8, 0x865a, /*0xe8-0xef*/
+  0x865b, 0x865c, 0xd5dc, 0xdfee, 0x865d, 0x865e, 0x865f, 0x8660, /*0xf0-0xf7*/
+  0x8661, 0x8662, 0xb2b8, 0x8663, 0xbadf, 0xdfec, 0x8664, 0xdbc1, /*0xf8-0xff*/
+  /* 0x5500 */
+  0x8665, 0xd1e4, 0x8666, 0x8667, 0x8668, 0x8669, 0xcbf4, 0xb4bd, /*0x00-0x07*/
+  0x866a, 0xb0a6, 0x866b, 0x866c, 0x866d, 0x866e, 0x866f, 0xdff1, /*0x08-0x0f*/
+  0xccc6, 0xdff2, 0x8670, 0x8671, 0xdfed, 0x8672, 0x8673, 0x8674, /*0x10-0x17*/
+  0x8675, 0x8676, 0x8677, 0xdfe9, 0x8678, 0x8679, 0x867a, 0x867b, /*0x18-0x1f*/
+  0xdfeb, 0x867c, 0xdfef, 0xdff0, 0xbbbd, 0x867d, 0x867e, 0xdff3, /*0x20-0x27*/
+  0x8680, 0x8681, 0xdff4, 0x8682, 0xbba3, 0x8683, 0xcadb, 0xcea8, /*0x28-0x2f*/
+  0xe0a7, 0xb3aa, 0x8684, 0xe0a6, 0x8685, 0x8686, 0x8687, 0xe0a1, /*0x30-0x37*/
+  0x8688, 0x8689, 0x868a, 0x868b, 0xdffe, 0x868c, 0xcdd9, 0xdffc, /*0x38-0x3f*/
+  0x868d, 0xdffa, 0x868e, 0xbfd0, 0xd7c4, 0x868f, 0xc9cc, 0x8690, /*0x40-0x47*/
+  0x8691, 0xdff8, 0xb0a1, 0x8692, 0x8693, 0x8694, 0x8695, 0x8696, /*0x48-0x4f*/
+  0xdffd, 0x8697, 0x8698, 0x8699, 0x869a, 0xdffb, 0xe0a2, 0x869b, /*0x50-0x57*/
+  0x869c, 0x869d, 0x869e, 0x869f, 0xe0a8, 0x86a0, 0x86a1, 0x86a2, /*0x58-0x5f*/
+  0x86a3, 0xb7c8, 0x86a4, 0x86a5, 0xc6a1, 0xc9b6, 0xc0b2, 0xdff5, /*0x60-0x67*/
+  0x86a6, 0x86a7, 0xc5be, 0x86a8, 0xd8c4, 0xdff9, 0xc4f6, 0x86a9, /*0x68-0x6f*/
+  0x86aa, 0x86ab, 0x86ac, 0x86ad, 0x86ae, 0xe0a3, 0xe0a4, 0xe0a5, /*0x70-0x77*/
+  0xd0a5, 0x86af, 0x86b0, 0xe0b4, 0xcce4, 0x86b1, 0xe0b1, 0x86b2, /*0x78-0x7f*/
+  0xbfa6, 0xe0af, 0xceb9, 0xe0ab, 0xc9c6, 0x86b3, 0x86b4, 0xc0ae, /*0x80-0x87*/
+  0xe0ae, 0xbaed, 0xbab0, 0xe0a9, 0x86b5, 0x86b6, 0x86b7, 0xdff6, /*0x88-0x8f*/
+  0x86b8, 0xe0b3, 0x86b9, 0x86ba, 0xe0b8, 0x86bb, 0x86bc, 0x86bd, /*0x90-0x97*/
+  0xb4ad, 0xe0b9, 0x86be, 0x86bf, 0xcfb2, 0xbac8, 0x86c0, 0xe0b0, /*0x98-0x9f*/
+  0x86c1, 0x86c2, 0x86c3, 0x86c4, 0x86c5, 0x86c6, 0x86c7, 0xd0fa, /*0xa0-0xa7*/
+  0x86c8, 0x86c9, 0x86ca, 0x86cb, 0x86cc, 0x86cd, 0x86ce, 0x86cf, /*0xa8-0xaf*/
+  0x86d0, 0xe0ac, 0x86d1, 0xd4fb, 0x86d2, 0xdff7, 0x86d3, 0xc5e7, /*0xb0-0xb7*/
+  0x86d4, 0xe0ad, 0x86d5, 0xd3f7, 0x86d6, 0xe0b6, 0xe0b7, 0x86d7, /*0xb8-0xbf*/
+  0x86d8, 0x86d9, 0x86da, 0x86db, 0xe0c4, 0xd0e1, 0x86dc, 0x86dd, /*0xc0-0xc7*/
+  0x86de, 0xe0bc, 0x86df, 0x86e0, 0xe0c9, 0xe0ca, 0x86e1, 0x86e2, /*0xc8-0xcf*/
+  0x86e3, 0xe0be, 0xe0aa, 0xc9a4, 0xe0c1, 0x86e4, 0xe0b2, 0x86e5, /*0xd0-0xd7*/
+  0x86e6, 0x86e7, 0x86e8, 0x86e9, 0xcac8, 0xe0c3, 0x86ea, 0xe0b5, /*0xd8-0xdf*/
+  0x86eb, 0xcecb, 0x86ec, 0xcbc3, 0xe0cd, 0xe0c6, 0xe0c2, 0x86ed, /*0xe0-0xe7*/
+  0xe0cb, 0x86ee, 0xe0ba, 0xe0bf, 0xe0c0, 0x86ef, 0x86f0, 0xe0c5, /*0xe8-0xef*/
+  0x86f1, 0x86f2, 0xe0c7, 0xe0c8, 0x86f3, 0xe0cc, 0x86f4, 0xe0bb, /*0xf0-0xf7*/
+  0x86f5, 0x86f6, 0x86f7, 0x86f8, 0x86f9, 0xcbd4, 0xe0d5, 0x86fa, /*0xf8-0xff*/
+  /* 0x5600 */
+  0xe0d6, 0xe0d2, 0x86fb, 0x86fc, 0x86fd, 0x86fe, 0x8740, 0x8741, /*0x00-0x07*/
+  0xe0d0, 0xbcce, 0x8742, 0x8743, 0xe0d1, 0x8744, 0xb8c2, 0xd8c5, /*0x08-0x0f*/
+  0x8745, 0x8746, 0x8747, 0x8748, 0x8749, 0x874a, 0x874b, 0x874c, /*0x10-0x17*/
+  0xd0ea, 0x874d, 0x874e, 0xc2ef, 0x874f, 0x8750, 0xe0cf, 0xe0bd, /*0x18-0x1f*/
+  0x8751, 0x8752, 0x8753, 0xe0d4, 0xe0d3, 0x8754, 0x8755, 0xe0d7, /*0x20-0x27*/
+  0x8756, 0x8757, 0x8758, 0x8759, 0xe0dc, 0xe0d8, 0x875a, 0x875b, /*0x28-0x2f*/
+  0x875c, 0xd6f6, 0xb3b0, 0x875d, 0xd7ec, 0x875e, 0xcbbb, 0x875f, /*0x30-0x37*/
+  0x8760, 0xe0da, 0x8761, 0xcefb, 0x8762, 0x8763, 0x8764, 0xbad9, /*0x38-0x3f*/
+  0x8765, 0x8766, 0x8767, 0x8768, 0x8769, 0x876a, 0x876b, 0x876c, /*0x40-0x47*/
+  0x876d, 0x876e, 0x876f, 0x8770, 0xe0e1, 0xe0dd, 0xd2ad, 0x8771, /*0x48-0x4f*/
+  0x8772, 0x8773, 0x8774, 0x8775, 0xe0e2, 0x8776, 0x8777, 0xe0db, /*0x50-0x57*/
+  0xe0d9, 0xe0df, 0x8778, 0x8779, 0xe0e0, 0x877a, 0x877b, 0x877c, /*0x58-0x5f*/
+  0x877d, 0x877e, 0xe0de, 0x8780, 0xe0e4, 0x8781, 0x8782, 0x8783, /*0x60-0x67*/
+  0xc6f7, 0xd8ac, 0xd4eb, 0xe0e6, 0xcac9, 0x8784, 0x8785, 0x8786, /*0x68-0x6f*/
+  0x8787, 0xe0e5, 0x8788, 0x8789, 0x878a, 0x878b, 0xb8c1, 0x878c, /*0x70-0x77*/
+  0x878d, 0x878e, 0x878f, 0xe0e7, 0xe0e8, 0x8790, 0x8791, 0x8792, /*0x78-0x7f*/
+  0x8793, 0x8794, 0x8795, 0x8796, 0x8797, 0xe0e9, 0xe0e3, 0x8798, /*0x80-0x87*/
+  0x8799, 0x879a, 0x879b, 0x879c, 0x879d, 0x879e, 0xbabf, 0xcce7, /*0x88-0x8f*/
+  0x879f, 0x87a0, 0x87a1, 0xe0ea, 0x87a2, 0x87a3, 0x87a4, 0x87a5, /*0x90-0x97*/
+  0x87a6, 0x87a7, 0x87a8, 0x87a9, 0x87aa, 0x87ab, 0x87ac, 0x87ad, /*0x98-0x9f*/
+  0x87ae, 0x87af, 0x87b0, 0xcff9, 0x87b1, 0x87b2, 0x87b3, 0x87b4, /*0xa0-0xa7*/
+  0x87b5, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87ba, 0x87bb, 0xe0eb, /*0xa8-0xaf*/
+  0x87bc, 0x87bd, 0x87be, 0x87bf, 0x87c0, 0x87c1, 0x87c2, 0xc8c2, /*0xb0-0xb7*/
+  0x87c3, 0x87c4, 0x87c5, 0x87c6, 0xbdc0, 0x87c7, 0x87c8, 0x87c9, /*0xb8-0xbf*/
+  0x87ca, 0x87cb, 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d1, /*0xc0-0xc7*/
+  0x87d2, 0x87d3, 0xc4d2, 0x87d4, 0x87d5, 0x87d6, 0x87d7, 0x87d8, /*0xc8-0xcf*/
+  0x87d9, 0x87da, 0x87db, 0x87dc, 0xe0ec, 0x87dd, 0x87de, 0xe0ed, /*0xd0-0xd7*/
+  0x87df, 0x87e0, 0xc7f4, 0xcbc4, 0x87e1, 0xe0ee, 0xbbd8, 0xd8b6, /*0xd8-0xdf*/
+  0xd2f2, 0xe0ef, 0xcdc5, 0x87e2, 0xb6da, 0x87e3, 0x87e4, 0x87e5, /*0xe0-0xe7*/
+  0x87e6, 0x87e7, 0x87e8, 0xe0f1, 0x87e9, 0xd4b0, 0x87ea, 0x87eb, /*0xe8-0xef*/
+  0xc0a7, 0xb4d1, 0x87ec, 0x87ed, 0xcea7, 0xe0f0, 0x87ee, 0x87ef, /*0xf0-0xf7*/
+  0x87f0, 0xe0f2, 0xb9cc, 0x87f1, 0x87f2, 0xb9fa, 0xcdbc, 0xe0f3, /*0xf8-0xff*/
+  /* 0x5700 */
+  0x87f3, 0x87f4, 0x87f5, 0xc6d4, 0xe0f4, 0x87f6, 0xd4b2, 0x87f7, /*0x00-0x07*/
+  0xc8a6, 0xe0f6, 0xe0f5, 0x87f8, 0x87f9, 0x87fa, 0x87fb, 0x87fc, /*0x08-0x0f*/
+  0x87fd, 0x87fe, 0x8840, 0x8841, 0x8842, 0x8843, 0x8844, 0x8845, /*0x10-0x17*/
+  0x8846, 0x8847, 0x8848, 0x8849, 0xe0f7, 0x884a, 0x884b, 0xcdc1, /*0x18-0x1f*/
+  0x884c, 0x884d, 0x884e, 0xcaa5, 0x884f, 0x8850, 0x8851, 0x8852, /*0x20-0x27*/
+  0xd4da, 0xdbd7, 0xdbd9, 0x8853, 0xdbd8, 0xb9e7, 0xdbdc, 0xdbdd, /*0x28-0x2f*/
+  0xb5d8, 0x8854, 0x8855, 0xdbda, 0x8856, 0x8857, 0x8858, 0x8859, /*0x30-0x37*/
+  0x885a, 0xdbdb, 0xb3a1, 0xdbdf, 0x885b, 0x885c, 0xbbf8, 0x885d, /*0x38-0x3f*/
+  0xd6b7, 0x885e, 0xdbe0, 0x885f, 0x8860, 0x8861, 0x8862, 0xbef9, /*0x40-0x47*/
+  0x8863, 0x8864, 0xb7bb, 0x8865, 0xdbd0, 0xccae, 0xbfb2, 0xbbb5, /*0x48-0x4f*/
+  0xd7f8, 0xbfd3, 0x8866, 0x8867, 0x8868, 0x8869, 0x886a, 0xbfe9, /*0x50-0x57*/
+  0x886b, 0x886c, 0xbce1, 0xccb3, 0xdbde, 0xb0d3, 0xceeb, 0xb7d8, /*0x58-0x5f*/
+  0xd7b9, 0xc6c2, 0x886d, 0x886e, 0xc0a4, 0x886f, 0xccb9, 0x8870, /*0x60-0x67*/
+  0xdbe7, 0xdbe1, 0xc6ba, 0xdbe3, 0x8871, 0xdbe8, 0x8872, 0xc5f7, /*0x68-0x6f*/
+  0x8873, 0x8874, 0x8875, 0xdbea, 0x8876, 0x8877, 0xdbe9, 0xbfc0, /*0x70-0x77*/
+  0x8878, 0x8879, 0x887a, 0xdbe6, 0xdbe5, 0x887b, 0x887c, 0x887d, /*0x78-0x7f*/
+  0x887e, 0x8880, 0xb4b9, 0xc0ac, 0xc2a2, 0xdbe2, 0xdbe4, 0x8881, /*0x80-0x87*/
+  0x8882, 0x8883, 0x8884, 0xd0cd, 0xdbed, 0x8885, 0x8886, 0x8887, /*0x88-0x8f*/
+  0x8888, 0x8889, 0xc0dd, 0xdbf2, 0x888a, 0x888b, 0x888c, 0x888d, /*0x90-0x97*/
+  0x888e, 0x888f, 0x8890, 0xb6e2, 0x8891, 0x8892, 0x8893, 0x8894, /*0x98-0x9f*/
+  0xdbf3, 0xdbd2, 0xb9b8, 0xd4ab, 0xdbec, 0x8895, 0xbfd1, 0xdbf0, /*0xa0-0xa7*/
+  0x8896, 0xdbd1, 0x8897, 0xb5e6, 0x8898, 0xdbeb, 0xbfe5, 0x8899, /*0xa8-0xaf*/
+  0x889a, 0x889b, 0xdbee, 0x889c, 0xdbf1, 0x889d, 0x889e, 0x889f, /*0xb0-0xb7*/
+  0xdbf9, 0x88a0, 0x88a1, 0x88a2, 0x88a3, 0x88a4, 0x88a5, 0x88a6, /*0xb8-0xbf*/
+  0x88a7, 0x88a8, 0xb9a1, 0xb0a3, 0x88a9, 0x88aa, 0x88ab, 0x88ac, /*0xc0-0xc7*/
+  0x88ad, 0x88ae, 0x88af, 0xc2f1, 0x88b0, 0x88b1, 0xb3c7, 0xdbef, /*0xc8-0xcf*/
+  0x88b2, 0x88b3, 0xdbf8, 0x88b4, 0xc6d2, 0xdbf4, 0x88b5, 0x88b6, /*0xd0-0xd7*/
+  0xdbf5, 0xdbf7, 0xdbf6, 0x88b7, 0x88b8, 0xdbfe, 0x88b9, 0xd3f2, /*0xd8-0xdf*/
+  0xb2ba, 0x88ba, 0x88bb, 0x88bc, 0xdbfd, 0x88bd, 0x88be, 0x88bf, /*0xe0-0xe7*/
+  0x88c0, 0x88c1, 0x88c2, 0x88c3, 0x88c4, 0xdca4, 0x88c5, 0xdbfb, /*0xe8-0xef*/
+  0x88c6, 0x88c7, 0x88c8, 0x88c9, 0xdbfa, 0x88ca, 0x88cb, 0x88cc, /*0xf0-0xf7*/
+  0xdbfc, 0xc5e0, 0xbbf9, 0x88cd, 0x88ce, 0xdca3, 0x88cf, 0x88d0, /*0xf8-0xff*/
+  /* 0x5800 */
+  0xdca5, 0x88d1, 0xccc3, 0x88d2, 0x88d3, 0x88d4, 0xb6d1, 0xddc0, /*0x00-0x07*/
+  0x88d5, 0x88d6, 0x88d7, 0xdca1, 0x88d8, 0xdca2, 0x88d9, 0x88da, /*0x08-0x0f*/
+  0x88db, 0xc7b5, 0x88dc, 0x88dd, 0x88de, 0xb6e9, 0x88df, 0x88e0, /*0x10-0x17*/
+  0x88e1, 0xdca7, 0x88e2, 0x88e3, 0x88e4, 0x88e5, 0xdca6, 0x88e6, /*0x18-0x1f*/
+  0xdca9, 0xb1a4, 0x88e7, 0x88e8, 0xb5cc, 0x88e9, 0x88ea, 0x88eb, /*0x20-0x27*/
+  0x88ec, 0x88ed, 0xbfb0, 0x88ee, 0x88ef, 0x88f0, 0x88f1, 0x88f2, /*0x28-0x2f*/
+  0xd1df, 0x88f3, 0x88f4, 0x88f5, 0x88f6, 0xb6c2, 0x88f7, 0x88f8, /*0x30-0x37*/
+  0x88f9, 0x88fa, 0x88fb, 0x88fc, 0x88fd, 0x88fe, 0x8940, 0x8941, /*0x38-0x3f*/
+  0x8942, 0x8943, 0x8944, 0x8945, 0xdca8, 0x8946, 0x8947, 0x8948, /*0x40-0x47*/
+  0x8949, 0x894a, 0x894b, 0x894c, 0xcbfa, 0xebf3, 0x894d, 0x894e, /*0x48-0x4f*/
+  0x894f, 0xcbdc, 0x8950, 0x8951, 0xcbfe, 0x8952, 0x8953, 0x8954, /*0x50-0x57*/
+  0xccc1, 0x8955, 0x8956, 0x8957, 0x8958, 0x8959, 0xc8fb, 0x895a, /*0x58-0x5f*/
+  0x895b, 0x895c, 0x895d, 0x895e, 0x895f, 0xdcaa, 0x8960, 0x8961, /*0x60-0x67*/
+  0x8962, 0x8963, 0x8964, 0xccee, 0xdcab, 0x8965, 0x8966, 0x8967, /*0x68-0x6f*/
+  0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, /*0x70-0x77*/
+  0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0xdbd3, 0x8976, /*0x78-0x7f*/
+  0xdcaf, 0xdcac, 0x8977, 0xbeb3, 0x8978, 0xcafb, 0x8979, 0x897a, /*0x80-0x87*/
+  0x897b, 0xdcad, 0x897c, 0x897d, 0x897e, 0x8980, 0x8981, 0x8982, /*0x88-0x8f*/
+  0x8983, 0x8984, 0xc9ca, 0xc4b9, 0x8985, 0x8986, 0x8987, 0x8988, /*0x90-0x97*/
+  0x8989, 0xc7bd, 0xdcae, 0x898a, 0x898b, 0x898c, 0xd4f6, 0xd0e6, /*0x98-0x9f*/
+  0x898d, 0x898e, 0x898f, 0x8990, 0x8991, 0x8992, 0x8993, 0x8994, /*0xa0-0xa7*/
+  0xc4ab, 0xb6d5, 0x8995, 0x8996, 0x8997, 0x8998, 0x8999, 0x899a, /*0xa8-0xaf*/
+  0x899b, 0x899c, 0x899d, 0x899e, 0x899f, 0x89a0, 0x89a1, 0x89a2, /*0xb0-0xb7*/
+  0x89a3, 0x89a4, 0x89a5, 0x89a6, 0xdbd4, 0x89a7, 0x89a8, 0x89a9, /*0xb8-0xbf*/
+  0x89aa, 0xb1da, 0x89ab, 0x89ac, 0x89ad, 0xdbd5, 0x89ae, 0x89af, /*0xc0-0xc7*/
+  0x89b0, 0x89b1, 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, /*0xc8-0xcf*/
+  0x89b8, 0xdbd6, 0x89b9, 0x89ba, 0x89bb, 0xbabe, 0x89bc, 0x89bd, /*0xd0-0xd7*/
+  0x89be, 0x89bf, 0x89c0, 0x89c1, 0x89c2, 0x89c3, 0x89c4, 0x89c5, /*0xd8-0xdf*/
+  0x89c6, 0x89c7, 0x89c8, 0x89c9, 0xc8c0, 0x89ca, 0x89cb, 0x89cc, /*0xe0-0xe7*/
+  0x89cd, 0x89ce, 0x89cf, 0xcabf, 0xc8c9, 0x89d0, 0xd7b3, 0x89d1, /*0xe8-0xef*/
+  0xc9f9, 0x89d2, 0x89d3, 0xbfc7, 0x89d4, 0x89d5, 0xbaf8, 0x89d6, /*0xf0-0xf7*/
+  0x89d7, 0xd2bc, 0x89d8, 0x89d9, 0x89da, 0x89db, 0x89dc, 0x89dd, /*0xf8-0xff*/
+  /* 0x5900 */
+  0x89de, 0x89df, 0xe2ba, 0x89e0, 0xb4a6, 0x89e1, 0x89e2, 0xb1b8, /*0x00-0x07*/
+  0x89e3, 0x89e4, 0x89e5, 0x89e6, 0x89e7, 0xb8b4, 0x89e8, 0xcfc4, /*0x08-0x0f*/
+  0x89e9, 0x89ea, 0x89eb, 0x89ec, 0xd9e7, 0xcfa6, 0xcde2, 0x89ed, /*0x10-0x17*/
+  0x89ee, 0xd9ed, 0xb6e0, 0x89ef, 0xd2b9, 0x89f0, 0x89f1, 0xb9bb, /*0x18-0x1f*/
+  0x89f2, 0x89f3, 0x89f4, 0x89f5, 0xe2b9, 0xe2b7, 0x89f6, 0xb4f3, /*0x20-0x27*/
+  0x89f7, 0xccec, 0xccab, 0xb7f2, 0x89f8, 0xd8b2, 0xd1eb, 0xbabb, /*0x28-0x2f*/
+  0x89f9, 0xcaa7, 0x89fa, 0x89fb, 0xcdb7, 0x89fc, 0x89fd, 0xd2c4, /*0x30-0x37*/
+  0xbfe4, 0xbcd0, 0xb6e1, 0x89fe, 0xdec5, 0x8a40, 0x8a41, 0x8a42, /*0x38-0x3f*/
+  0x8a43, 0xdec6, 0xdbbc, 0x8a44, 0xd1d9, 0x8a45, 0x8a46, 0xc6e6, /*0x40-0x47*/
+  0xc4ce, 0xb7ee, 0x8a47, 0xb7dc, 0x8a48, 0x8a49, 0xbffc, 0xd7e0, /*0x48-0x4f*/
+  0x8a4a, 0xc6f5, 0x8a4b, 0x8a4c, 0xb1bc, 0xdec8, 0xbdb1, 0xccd7, /*0x50-0x57*/
+  0xdeca, 0x8a4d, 0xdec9, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a52, /*0x58-0x5f*/
+  0xb5ec, 0x8a53, 0xc9dd, 0x8a54, 0x8a55, 0xb0c2, 0x8a56, 0x8a57, /*0x60-0x67*/
+  0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x8a5f, /*0x68-0x6f*/
+  0x8a60, 0x8a61, 0x8a62, 0xc5ae, 0xc5ab, 0x8a63, 0xc4cc, 0x8a64, /*0x70-0x77*/
+  0xbce9, 0xcbfd, 0x8a65, 0x8a66, 0x8a67, 0xbac3, 0x8a68, 0x8a69, /*0x78-0x7f*/
+  0x8a6a, 0xe5f9, 0xc8e7, 0xe5fa, 0xcdfd, 0x8a6b, 0xd7b1, 0xb8be, /*0x80-0x87*/
+  0xc2e8, 0x8a6c, 0xc8d1, 0x8a6d, 0x8a6e, 0xe5fb, 0x8a6f, 0x8a70, /*0x88-0x8f*/
+  0x8a71, 0x8a72, 0xb6ca, 0xbccb, 0x8a73, 0x8a74, 0xd1fd, 0xe6a1, /*0x90-0x97*/
+  0x8a75, 0xc3ee, 0x8a76, 0x8a77, 0x8a78, 0x8a79, 0xe6a4, 0x8a7a, /*0x98-0x9f*/
+  0x8a7b, 0x8a7c, 0x8a7d, 0xe5fe, 0xe6a5, 0xcdd7, 0x8a7e, 0x8a80, /*0xa0-0xa7*/
+  0xb7c1, 0xe5fc, 0xe5fd, 0xe6a3, 0x8a81, 0x8a82, 0xc4dd, 0xe6a8, /*0xa8-0xaf*/
+  0x8a83, 0x8a84, 0xe6a7, 0x8a85, 0x8a86, 0x8a87, 0x8a88, 0x8a89, /*0xb0-0xb7*/
+  0x8a8a, 0xc3c3, 0x8a8b, 0xc6de, 0x8a8c, 0x8a8d, 0xe6aa, 0x8a8e, /*0xb8-0xbf*/
+  0x8a8f, 0x8a90, 0x8a91, 0x8a92, 0x8a93, 0x8a94, 0xc4b7, 0x8a95, /*0xc0-0xc7*/
+  0x8a96, 0x8a97, 0xe6a2, 0xcabc, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, /*0xc8-0xcf*/
+  0xbde3, 0xb9c3, 0xe6a6, 0xd0d5, 0xceaf, 0x8a9c, 0x8a9d, 0xe6a9, /*0xd0-0xd7*/
+  0xe6b0, 0x8a9e, 0xd2a6, 0x8a9f, 0xbdaa, 0xe6ad, 0x8aa0, 0x8aa1, /*0xd8-0xdf*/
+  0x8aa2, 0x8aa3, 0x8aa4, 0xe6af, 0x8aa5, 0xc0d1, 0x8aa6, 0x8aa7, /*0xe0-0xe7*/
+  0xd2cc, 0x8aa8, 0x8aa9, 0x8aaa, 0xbca7, 0x8aab, 0x8aac, 0x8aad, /*0xe8-0xef*/
+  0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, 0x8ab5, /*0xf0-0xf7*/
+  0x8ab6, 0xe6b1, 0x8ab7, 0xd2f6, 0x8ab8, 0x8ab9, 0x8aba, 0xd7cb, /*0xf8-0xff*/
+  /* 0x5a00 */
+  0x8abb, 0xcdfe, 0x8abc, 0xcdde, 0xc2a6, 0xe6ab, 0xe6ac, 0xbdbf, /*0x00-0x07*/
+  0xe6ae, 0xe6b3, 0x8abd, 0x8abe, 0xe6b2, 0x8abf, 0x8ac0, 0x8ac1, /*0x08-0x0f*/
+  0x8ac2, 0xe6b6, 0x8ac3, 0xe6b8, 0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, /*0x10-0x17*/
+  0xc4ef, 0x8ac8, 0x8ac9, 0x8aca, 0xc4c8, 0x8acb, 0x8acc, 0xbeea, /*0x18-0x1f*/
+  0xc9ef, 0x8acd, 0x8ace, 0xe6b7, 0x8acf, 0xb6f0, 0x8ad0, 0x8ad1, /*0x20-0x27*/
+  0x8ad2, 0xc3e4, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, /*0x28-0x2f*/
+  0x8ad9, 0xd3e9, 0xe6b4, 0x8ada, 0xe6b5, 0x8adb, 0xc8a2, 0x8adc, /*0x30-0x37*/
+  0x8add, 0x8ade, 0x8adf, 0x8ae0, 0xe6bd, 0x8ae1, 0x8ae2, 0x8ae3, /*0x38-0x3f*/
+  0xe6b9, 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0xc6c5, 0x8ae9, /*0x40-0x47*/
+  0x8aea, 0xcdf1, 0xe6bb, 0x8aeb, 0x8aec, 0x8aed, 0x8aee, 0x8aef, /*0x48-0x4f*/
+  0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, 0xe6bc, 0x8af5, 0x8af6, /*0x50-0x57*/
+  0x8af7, 0x8af8, 0xbbe9, 0x8af9, 0x8afa, 0x8afb, 0x8afc, 0x8afd, /*0x58-0x5f*/
+  0x8afe, 0x8b40, 0xe6be, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0xe6ba, /*0x60-0x67*/
+  0x8b45, 0x8b46, 0xc0b7, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, /*0x68-0x6f*/
+  0x8b4c, 0x8b4d, 0x8b4e, 0x8b4f, 0xd3a4, 0xe6bf, 0xc9f4, 0xe6c3, /*0x70-0x77*/
+  0x8b50, 0x8b51, 0xe6c4, 0x8b52, 0x8b53, 0x8b54, 0x8b55, 0xd0f6, /*0x78-0x7f*/
+  0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, /*0x80-0x87*/
+  0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, /*0x88-0x8f*/
+  0x8b66, 0x8b67, 0xc3bd, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6c, /*0x90-0x97*/
+  0x8b6d, 0x8b6e, 0xc3c4, 0xe6c2, 0x8b6f, 0x8b70, 0x8b71, 0x8b72, /*0x98-0x9f*/
+  0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, 0x8b78, 0x8b79, 0x8b7a, /*0xa0-0xa7*/
+  0x8b7b, 0x8b7c, 0xe6c1, 0x8b7d, 0x8b7e, 0x8b80, 0x8b81, 0x8b82, /*0xa8-0xaf*/
+  0x8b83, 0x8b84, 0xe6c7, 0xcfb1, 0x8b85, 0xebf4, 0x8b86, 0x8b87, /*0xb0-0xb7*/
+  0xe6ca, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0xe6c5, 0x8b8d, /*0xb8-0xbf*/
+  0x8b8e, 0xbcde, 0xc9a9, 0x8b8f, 0x8b90, 0x8b91, 0x8b92, 0x8b93, /*0xc0-0xc7*/
+  0x8b94, 0xbcb5, 0x8b95, 0x8b96, 0xcfd3, 0x8b97, 0x8b98, 0x8b99, /*0xc8-0xcf*/
+  0x8b9a, 0x8b9b, 0xe6c8, 0x8b9c, 0xe6c9, 0x8b9d, 0xe6ce, 0x8b9e, /*0xd0-0xd7*/
+  0xe6d0, 0x8b9f, 0x8ba0, 0x8ba1, 0xe6d1, 0x8ba2, 0x8ba3, 0x8ba4, /*0xd8-0xdf*/
+  0xe6cb, 0xb5d5, 0x8ba5, 0xe6cc, 0x8ba6, 0x8ba7, 0xe6cf, 0x8ba8, /*0xe0-0xe7*/
+  0x8ba9, 0xc4db, 0x8baa, 0xe6c6, 0x8bab, 0x8bac, 0x8bad, 0x8bae, /*0xe8-0xef*/
+  0x8baf, 0xe6cd, 0x8bb0, 0x8bb1, 0x8bb2, 0x8bb3, 0x8bb4, 0x8bb5, /*0xf0-0xf7*/
+  0x8bb6, 0x8bb7, 0x8bb8, 0x8bb9, 0x8bba, 0x8bbb, 0x8bbc, 0x8bbd, /*0xf8-0xff*/
+  /* 0x5b00 */
+  0x8bbe, 0x8bbf, 0x8bc0, 0x8bc1, 0x8bc2, 0x8bc3, 0x8bc4, 0x8bc5, /*0x00-0x07*/
+  0x8bc6, 0xe6d2, 0x8bc7, 0x8bc8, 0x8bc9, 0x8bca, 0x8bcb, 0x8bcc, /*0x08-0x0f*/
+  0x8bcd, 0x8bce, 0x8bcf, 0x8bd0, 0x8bd1, 0x8bd2, 0xe6d4, 0xe6d3, /*0x10-0x17*/
+  0x8bd3, 0x8bd4, 0x8bd5, 0x8bd6, 0x8bd7, 0x8bd8, 0x8bd9, 0x8bda, /*0x18-0x1f*/
+  0x8bdb, 0x8bdc, 0x8bdd, 0x8bde, 0x8bdf, 0x8be0, 0x8be1, 0x8be2, /*0x20-0x27*/
+  0x8be3, 0x8be4, 0x8be5, 0x8be6, 0x8be7, 0x8be8, 0x8be9, 0x8bea, /*0x28-0x2f*/
+  0x8beb, 0x8bec, 0xe6d5, 0x8bed, 0xd9f8, 0x8bee, 0x8bef, 0xe6d6, /*0x30-0x37*/
+  0x8bf0, 0x8bf1, 0x8bf2, 0x8bf3, 0x8bf4, 0x8bf5, 0x8bf6, 0x8bf7, /*0x38-0x3f*/
+  0xe6d7, 0x8bf8, 0x8bf9, 0x8bfa, 0x8bfb, 0x8bfc, 0x8bfd, 0x8bfe, /*0x40-0x47*/
+  0x8c40, 0x8c41, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c46, 0x8c47, /*0x48-0x4f*/
+  0xd7d3, 0xe6dd, 0x8c48, 0xe6de, 0xbfd7, 0xd4d0, 0x8c49, 0xd7d6, /*0x50-0x57*/
+  0xb4e6, 0xcbef, 0xe6da, 0xd8c3, 0xd7ce, 0xd0a2, 0x8c4a, 0xc3cf, /*0x58-0x5f*/
+  0x8c4b, 0x8c4c, 0xe6df, 0xbcbe, 0xb9c2, 0xe6db, 0xd1a7, 0x8c4d, /*0x60-0x67*/
+  0x8c4e, 0xbaa2, 0xc2cf, 0x8c4f, 0xd8ab, 0x8c50, 0x8c51, 0x8c52, /*0x68-0x6f*/
+  0xcaeb, 0xe5ee, 0x8c53, 0xe6dc, 0x8c54, 0xb7f5, 0x8c55, 0x8c56, /*0x70-0x77*/
+  0x8c57, 0x8c58, 0xc8e6, 0x8c59, 0x8c5a, 0xc4f5, 0x8c5b, 0x8c5c, /*0x78-0x7f*/
+  0xe5b2, 0xc4fe, 0x8c5d, 0xcbfc, 0xe5b3, 0xd5ac, 0x8c5e, 0xd3ee, /*0x80-0x87*/
+  0xcad8, 0xb0b2, 0x8c5f, 0xcbce, 0xcdea, 0x8c60, 0x8c61, 0xbaea, /*0x88-0x8f*/
+  0x8c62, 0x8c63, 0x8c64, 0xe5b5, 0x8c65, 0xe5b4, 0x8c66, 0xd7da, /*0x90-0x97*/
+  0xb9d9, 0xd6e6, 0xb6a8, 0xcdf0, 0xd2cb, 0xb1a6, 0xcab5, 0x8c67, /*0x98-0x9f*/
+  0xb3e8, 0xc9f3, 0xbfcd, 0xd0fb, 0xcad2, 0xe5b6, 0xbbc2, 0x8c68, /*0xa0-0xa7*/
+  0x8c69, 0x8c6a, 0xcfdc, 0xb9ac, 0x8c6b, 0x8c6c, 0x8c6d, 0x8c6e, /*0xa8-0xaf*/
+  0xd4d7, 0x8c6f, 0x8c70, 0xbaa6, 0xd1e7, 0xcffc, 0xbcd2, 0x8c71, /*0xb0-0xb7*/
+  0xe5b7, 0xc8dd, 0x8c72, 0x8c73, 0x8c74, 0xbfed, 0xb1f6, 0xcbde, /*0xb8-0xbf*/
+  0x8c75, 0x8c76, 0xbcc5, 0x8c77, 0xbcc4, 0xd2fa, 0xc3dc, 0xbfdc, /*0xc0-0xc7*/
+  0x8c78, 0x8c79, 0x8c7a, 0x8c7b, 0xb8bb, 0x8c7c, 0x8c7d, 0x8c7e, /*0xc8-0xcf*/
+  0xc3c2, 0x8c80, 0xbaae, 0xd4a2, 0x8c81, 0x8c82, 0x8c83, 0x8c84, /*0xd0-0xd7*/
+  0x8c85, 0x8c86, 0x8c87, 0x8c88, 0x8c89, 0xc7de, 0xc4af, 0xb2ec, /*0xd8-0xdf*/
+  0x8c8a, 0xb9d1, 0x8c8b, 0x8c8c, 0xe5bb, 0xc1c8, 0x8c8d, 0x8c8e, /*0xe0-0xe7*/
+  0xd5af, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, 0x8c93, 0xe5bc, 0x8c94, /*0xe8-0xef*/
+  0xe5be, 0x8c95, 0x8c96, 0x8c97, 0x8c98, 0x8c99, 0x8c9a, 0x8c9b, /*0xf0-0xf7*/
+  0xb4e7, 0xb6d4, 0xcbc2, 0xd1b0, 0xb5bc, 0x8c9c, 0x8c9d, 0xcad9, /*0xf8-0xff*/
+  /* 0x5c00 */
+  0x8c9e, 0xb7e2, 0x8c9f, 0x8ca0, 0xc9e4, 0x8ca1, 0xbdab, 0x8ca2, /*0x00-0x07*/
+  0x8ca3, 0xcebe, 0xd7f0, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, 0xd0a1, /*0x08-0x0f*/
+  0x8ca8, 0xc9d9, 0x8ca9, 0x8caa, 0xb6fb, 0xe6d8, 0xbce2, 0x8cab, /*0x10-0x17*/
+  0xb3be, 0x8cac, 0xc9d0, 0x8cad, 0xe6d9, 0xb3a2, 0x8cae, 0x8caf, /*0x18-0x1f*/
+  0x8cb0, 0x8cb1, 0xdecc, 0x8cb2, 0xd3c8, 0xdecd, 0x8cb3, 0xd2a2, /*0x20-0x27*/
+  0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0xdece, 0x8cb8, 0x8cb9, 0x8cba, /*0x28-0x2f*/
+  0x8cbb, 0xbecd, 0x8cbc, 0x8cbd, 0xdecf, 0x8cbe, 0x8cbf, 0x8cc0, /*0x30-0x37*/
+  0xcaac, 0xd2fc, 0xb3df, 0xe5ea, 0xc4e1, 0xbea1, 0xceb2, 0xc4f2, /*0x38-0x3f*/
+  0xbed6, 0xc6a8, 0xb2e3, 0x8cc1, 0x8cc2, 0xbed3, 0x8cc3, 0x8cc4, /*0x40-0x47*/
+  0xc7fc, 0xcceb, 0xbdec, 0xcedd, 0x8cc5, 0x8cc6, 0xcaba, 0xc6c1, /*0x48-0x4f*/
+  0xe5ec, 0xd0bc, 0x8cc7, 0x8cc8, 0x8cc9, 0xd5b9, 0x8cca, 0x8ccb, /*0x50-0x57*/
+  0x8ccc, 0xe5ed, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0xcaf4, 0x8cd1, /*0x58-0x5f*/
+  0xcdc0, 0xc2c5, 0x8cd2, 0xe5ef, 0x8cd3, 0xc2c4, 0xe5f0, 0x8cd4, /*0x60-0x67*/
+  0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, 0xe5f8, 0xcdcd, /*0x68-0x6f*/
+  0x8cdb, 0xc9bd, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, /*0x70-0x77*/
+  0x8ce2, 0xd2d9, 0xe1a8, 0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0xd3ec, /*0x78-0x7f*/
+  0x8ce7, 0xcbea, 0xc6f1, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, /*0x80-0x87*/
+  0xe1ac, 0x8ced, 0x8cee, 0x8cef, 0xe1a7, 0xe1a9, 0x8cf0, 0x8cf1, /*0x88-0x8f*/
+  0xe1aa, 0xe1af, 0x8cf2, 0x8cf3, 0xb2ed, 0x8cf4, 0xe1ab, 0xb8da, /*0x90-0x97*/
+  0xe1ad, 0xe1ae, 0xe1b0, 0xb5ba, 0xe1b1, 0x8cf5, 0x8cf6, 0x8cf7, /*0x98-0x9f*/
+  0x8cf8, 0x8cf9, 0xe1b3, 0xe1b8, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd, /*0xa0-0xa7*/
+  0x8cfe, 0xd1d2, 0x8d40, 0xe1b6, 0xe1b5, 0xc1eb, 0x8d41, 0x8d42, /*0xa8-0xaf*/
+  0x8d43, 0xe1b7, 0x8d44, 0xd4c0, 0x8d45, 0xe1b2, 0x8d46, 0xe1ba, /*0xb0-0xb7*/
+  0xb0b6, 0x8d47, 0x8d48, 0x8d49, 0x8d4a, 0xe1b4, 0x8d4b, 0xbff9, /*0xb8-0xbf*/
+  0x8d4c, 0xe1b9, 0x8d4d, 0x8d4e, 0xe1bb, 0x8d4f, 0x8d50, 0x8d51, /*0xc0-0xc7*/
+  0x8d52, 0x8d53, 0x8d54, 0xe1be, 0x8d55, 0x8d56, 0x8d57, 0x8d58, /*0xc8-0xcf*/
+  0x8d59, 0x8d5a, 0xe1bc, 0x8d5b, 0x8d5c, 0x8d5d, 0x8d5e, 0x8d5f, /*0xd0-0xd7*/
+  0x8d60, 0xd6c5, 0x8d61, 0x8d62, 0x8d63, 0x8d64, 0x8d65, 0x8d66, /*0xd8-0xdf*/
+  0x8d67, 0xcfbf, 0x8d68, 0x8d69, 0xe1bd, 0xe1bf, 0xc2cd, 0x8d6a, /*0xe0-0xe7*/
+  0xb6eb, 0x8d6b, 0xd3f8, 0x8d6c, 0x8d6d, 0xc7cd, 0x8d6e, 0x8d6f, /*0xe8-0xef*/
+  0xb7e5, 0x8d70, 0x8d71, 0x8d72, 0x8d73, 0x8d74, 0x8d75, 0x8d76, /*0xf0-0xf7*/
+  0x8d77, 0x8d78, 0x8d79, 0xbefe, 0x8d7a, 0x8d7b, 0x8d7c, 0x8d7d, /*0xf8-0xff*/
+  /* 0x5d00 */
+  0x8d7e, 0x8d80, 0xe1c0, 0xe1c1, 0x8d81, 0x8d82, 0xe1c7, 0xb3e7, /*0x00-0x07*/
+  0x8d83, 0x8d84, 0x8d85, 0x8d86, 0x8d87, 0x8d88, 0xc6e9, 0x8d89, /*0x08-0x0f*/
+  0x8d8a, 0x8d8b, 0x8d8c, 0x8d8d, 0xb4de, 0x8d8e, 0xd1c2, 0x8d8f, /*0x10-0x17*/
+  0x8d90, 0x8d91, 0x8d92, 0xe1c8, 0x8d93, 0x8d94, 0xe1c6, 0x8d95, /*0x18-0x1f*/
+  0x8d96, 0x8d97, 0x8d98, 0x8d99, 0xe1c5, 0x8d9a, 0xe1c3, 0xe1c2, /*0x20-0x27*/
+  0x8d9b, 0xb1c0, 0x8d9c, 0x8d9d, 0x8d9e, 0xd5b8, 0xe1c4, 0x8d9f, /*0x28-0x2f*/
+  0x8da0, 0x8da1, 0x8da2, 0x8da3, 0xe1cb, 0x8da4, 0x8da5, 0x8da6, /*0x30-0x37*/
+  0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0xe1cc, 0xe1ca, 0x8dac, /*0x38-0x3f*/
+  0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db1, 0x8db2, 0x8db3, 0xeffa, /*0x40-0x47*/
+  0x8db4, 0x8db5, 0xe1d3, 0xe1d2, 0xc7b6, 0x8db6, 0x8db7, 0x8db8, /*0x48-0x4f*/
+  0x8db9, 0x8dba, 0x8dbb, 0x8dbc, 0x8dbd, 0x8dbe, 0x8dbf, 0x8dc0, /*0x50-0x57*/
+  0xe1c9, 0x8dc1, 0x8dc2, 0xe1ce, 0x8dc3, 0xe1d0, 0x8dc4, 0x8dc5, /*0x58-0x5f*/
+  0x8dc6, 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcb, 0x8dcc, 0x8dcd, /*0x60-0x67*/
+  0x8dce, 0xe1d4, 0x8dcf, 0xe1d1, 0xe1cd, 0x8dd0, 0x8dd1, 0xe1cf, /*0x68-0x6f*/
+  0x8dd2, 0x8dd3, 0x8dd4, 0x8dd5, 0xe1d5, 0x8dd6, 0x8dd7, 0x8dd8, /*0x70-0x77*/
+  0x8dd9, 0x8dda, 0x8ddb, 0x8ddc, 0x8ddd, 0x8dde, 0x8ddf, 0x8de0, /*0x78-0x7f*/
+  0x8de1, 0x8de2, 0xe1d6, 0x8de3, 0x8de4, 0x8de5, 0x8de6, 0x8de7, /*0x80-0x87*/
+  0x8de8, 0x8de9, 0x8dea, 0x8deb, 0x8dec, 0x8ded, 0x8dee, 0x8def, /*0x88-0x8f*/
+  0x8df0, 0x8df1, 0x8df2, 0x8df3, 0x8df4, 0x8df5, 0x8df6, 0x8df7, /*0x90-0x97*/
+  0x8df8, 0xe1d7, 0x8df9, 0x8dfa, 0x8dfb, 0xe1d8, 0x8dfc, 0x8dfd, /*0x98-0x9f*/
+  0x8dfe, 0x8e40, 0x8e41, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46, /*0xa0-0xa7*/
+  0x8e47, 0x8e48, 0x8e49, 0x8e4a, 0x8e4b, 0x8e4c, 0x8e4d, 0x8e4e, /*0xa8-0xaf*/
+  0x8e4f, 0x8e50, 0x8e51, 0x8e52, 0x8e53, 0x8e54, 0x8e55, 0xe1da, /*0xb0-0xb7*/
+  0x8e56, 0x8e57, 0x8e58, 0x8e59, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, /*0xb8-0xbf*/
+  0x8e5e, 0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0xe1db, 0x8e63, 0x8e64, /*0xc0-0xc7*/
+  0x8e65, 0x8e66, 0x8e67, 0x8e68, 0x8e69, 0xcea1, 0x8e6a, 0x8e6b, /*0xc8-0xcf*/
+  0x8e6c, 0x8e6d, 0x8e6e, 0x8e6f, 0x8e70, 0x8e71, 0x8e72, 0x8e73, /*0xd0-0xd7*/
+  0x8e74, 0x8e75, 0x8e76, 0xe7dd, 0x8e77, 0xb4a8, 0xd6dd, 0x8e78, /*0xd8-0xdf*/
+  0x8e79, 0xd1b2, 0xb3b2, 0x8e7a, 0x8e7b, 0xb9a4, 0xd7f3, 0xc7c9, /*0xe0-0xe7*/
+  0xbede, 0xb9ae, 0x8e7c, 0xced7, 0x8e7d, 0x8e7e, 0xb2ee, 0xdbcf, /*0xe8-0xef*/
+  0x8e80, 0xbcba, 0xd2d1, 0xcbc8, 0xb0cd, 0x8e81, 0x8e82, 0xcfef, /*0xf0-0xf7*/
+  0x8e83, 0x8e84, 0x8e85, 0x8e86, 0x8e87, 0xd9e3, 0xbded, 0x8e88, /*0xf8-0xff*/
+  /* 0x5e00 */
+  0x8e89, 0xb1d2, 0xcad0, 0xb2bc, 0x8e8a, 0xcba7, 0xb7ab, 0x8e8b, /*0x00-0x07*/
+  0xcaa6, 0x8e8c, 0x8e8d, 0x8e8e, 0xcfa3, 0x8e8f, 0x8e90, 0xe0f8, /*0x08-0x0f*/
+  0xd5ca, 0xe0fb, 0x8e91, 0x8e92, 0xe0fa, 0xc5c1, 0xccfb, 0x8e93, /*0x10-0x17*/
+  0xc1b1, 0xe0f9, 0xd6e3, 0xb2af, 0xd6c4, 0xb5db, 0x8e94, 0x8e95, /*0x18-0x1f*/
+  0x8e96, 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0xb4f8, 0xd6a1, /*0x20-0x27*/
+  0x8e9c, 0x8e9d, 0x8e9e, 0x8e9f, 0x8ea0, 0xcfaf, 0xb0ef, 0x8ea1, /*0x28-0x2f*/
+  0x8ea2, 0xe0fc, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, 0xe1a1, /*0x30-0x37*/
+  0xb3a3, 0x8ea8, 0x8ea9, 0xe0fd, 0xe0fe, 0xc3b1, 0x8eaa, 0x8eab, /*0x38-0x3f*/
+  0x8eac, 0x8ead, 0xc3dd, 0x8eae, 0xe1a2, 0xb7f9, 0x8eaf, 0x8eb0, /*0x40-0x47*/
+  0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0xbbcf, 0x8eb5, 0x8eb6, 0x8eb7, /*0x48-0x4f*/
+  0x8eb8, 0x8eb9, 0x8eba, 0x8ebb, 0xe1a3, 0xc4bb, 0x8ebc, 0x8ebd, /*0x50-0x57*/
+  0x8ebe, 0x8ebf, 0x8ec0, 0xe1a4, 0x8ec1, 0x8ec2, 0xe1a5, 0x8ec3, /*0x58-0x5f*/
+  0x8ec4, 0xe1a6, 0xb4b1, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, 0x8ec9, /*0x60-0x67*/
+  0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, 0x8ed0, 0x8ed1, /*0x68-0x6f*/
+  0x8ed2, 0x8ed3, 0xb8c9, 0xc6bd, 0xc4ea, 0x8ed4, 0xb2a2, 0x8ed5, /*0x70-0x77*/
+  0xd0d2, 0x8ed6, 0xe7db, 0xbbc3, 0xd3d7, 0xd3c4, 0x8ed7, 0xb9e3, /*0x78-0x7f*/
+  0xe2cf, 0x8ed8, 0x8ed9, 0x8eda, 0xd7af, 0x8edb, 0xc7ec, 0xb1d3, /*0x80-0x87*/
+  0x8edc, 0x8edd, 0xb4b2, 0xe2d1, 0x8ede, 0x8edf, 0x8ee0, 0xd0f2, /*0x88-0x8f*/
+  0xc2ae, 0xe2d0, 0x8ee1, 0xbfe2, 0xd3a6, 0xb5d7, 0xe2d2, 0xb5ea, /*0x90-0x97*/
+  0x8ee2, 0xc3ed, 0xb8fd, 0x8ee3, 0xb8ae, 0x8ee4, 0xc5d3, 0xb7cf, /*0x98-0x9f*/
+  0xe2d4, 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0xe2d3, 0xb6c8, 0xd7f9, /*0xa0-0xa7*/
+  0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0xcda5, 0x8eee, 0x8eef, /*0xa8-0xaf*/
+  0x8ef0, 0x8ef1, 0x8ef2, 0xe2d8, 0x8ef3, 0xe2d6, 0xcafc, 0xbfb5, /*0xb0-0xb7*/
+  0xd3b9, 0xe2d5, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, 0xe2d7, 0x8ef8, /*0xb8-0xbf*/
+  0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8f40, 0x8f41, /*0xc0-0xc7*/
+  0x8f42, 0xc1ae, 0xc0c8, 0x8f43, 0x8f44, 0x8f45, 0x8f46, 0x8f47, /*0xc8-0xcf*/
+  0x8f48, 0xe2db, 0xe2da, 0xc0aa, 0x8f49, 0x8f4a, 0xc1ce, 0x8f4b, /*0xd0-0xd7*/
+  0x8f4c, 0x8f4d, 0x8f4e, 0xe2dc, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, /*0xd8-0xdf*/
+  0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, /*0xe0-0xe7*/
+  0xe2dd, 0x8f5b, 0xe2de, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, /*0xe8-0xef*/
+  0x8f61, 0x8f62, 0x8f63, 0x8f64, 0xdbc8, 0x8f65, 0xd1d3, 0xcda2, /*0xf0-0xf7*/
+  0x8f66, 0x8f67, 0xbda8, 0x8f68, 0x8f69, 0x8f6a, 0xdec3, 0xd8a5, /*0xf8-0xff*/
+  /* 0x5f00 */
+  0xbfaa, 0xdbcd, 0xd2ec, 0xc6fa, 0xc5aa, 0x8f6b, 0x8f6c, 0x8f6d, /*0x00-0x07*/
+  0xdec4, 0x8f6e, 0xb1d7, 0xdfae, 0x8f6f, 0x8f70, 0x8f71, 0xcabd, /*0x08-0x0f*/
+  0x8f72, 0xdfb1, 0x8f73, 0xb9ad, 0x8f74, 0xd2fd, 0x8f75, 0xb8a5, /*0x10-0x17*/
+  0xbaeb, 0x8f76, 0x8f77, 0xb3da, 0x8f78, 0x8f79, 0x8f7a, 0xb5dc, /*0x18-0x1f*/
+  0xd5c5, 0x8f7b, 0x8f7c, 0x8f7d, 0x8f7e, 0xc3d6, 0xcfd2, 0xbba1, /*0x20-0x27*/
+  0x8f80, 0xe5f3, 0xe5f2, 0x8f81, 0x8f82, 0xe5f4, 0x8f83, 0xcde4, /*0x28-0x2f*/
+  0x8f84, 0xc8f5, 0x8f85, 0x8f86, 0x8f87, 0x8f88, 0x8f89, 0x8f8a, /*0x30-0x37*/
+  0x8f8b, 0xb5af, 0xc7bf, 0x8f8c, 0xe5f6, 0x8f8d, 0x8f8e, 0x8f8f, /*0x38-0x3f*/
+  0xecb0, 0x8f90, 0x8f91, 0x8f92, 0x8f93, 0x8f94, 0x8f95, 0x8f96, /*0x40-0x47*/
+  0x8f97, 0x8f98, 0x8f99, 0x8f9a, 0x8f9b, 0x8f9c, 0x8f9d, 0x8f9e, /*0x48-0x4f*/
+  0xe5e6, 0x8f9f, 0xb9e9, 0xb5b1, 0x8fa0, 0xc2bc, 0xe5e8, 0xe5e7, /*0x50-0x57*/
+  0xe5e9, 0x8fa1, 0x8fa2, 0x8fa3, 0x8fa4, 0xd2cd, 0x8fa5, 0x8fa6, /*0x58-0x5f*/
+  0x8fa7, 0xe1ea, 0xd0ce, 0x8fa8, 0xcdae, 0x8fa9, 0xd1e5, 0x8faa, /*0x60-0x67*/
+  0x8fab, 0xb2ca, 0xb1eb, 0x8fac, 0xb1f2, 0xc5ed, 0x8fad, 0x8fae, /*0x68-0x6f*/
+  0xd5c3, 0xd3b0, 0x8faf, 0xe1dc, 0x8fb0, 0x8fb1, 0x8fb2, 0xe1dd, /*0x70-0x77*/
+  0x8fb3, 0xd2db, 0x8fb4, 0xb3b9, 0xb1cb, 0x8fb5, 0x8fb6, 0x8fb7, /*0x78-0x7f*/
+  0xcdf9, 0xd5f7, 0xe1de, 0x8fb8, 0xbeb6, 0xb4fd, 0x8fb9, 0xe1df, /*0x80-0x87*/
+  0xbadc, 0xe1e0, 0xbbb2, 0xc2c9, 0xe1e1, 0x8fba, 0x8fbb, 0x8fbc, /*0x88-0x8f*/
+  0xd0ec, 0x8fbd, 0xcdbd, 0x8fbe, 0x8fbf, 0xe1e2, 0x8fc0, 0xb5c3, /*0x90-0x97*/
+  0xc5c7, 0xe1e3, 0x8fc1, 0x8fc2, 0xe1e4, 0x8fc3, 0x8fc4, 0x8fc5, /*0x98-0x9f*/
+  0x8fc6, 0xd3f9, 0x8fc7, 0x8fc8, 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, /*0xa0-0xa7*/
+  0xe1e5, 0x8fcd, 0xd1ad, 0x8fce, 0x8fcf, 0xe1e6, 0xcea2, 0x8fd0, /*0xa8-0xaf*/
+  0x8fd1, 0x8fd2, 0x8fd3, 0x8fd4, 0x8fd5, 0xe1e7, 0x8fd6, 0xb5c2, /*0xb0-0xb7*/
+  0x8fd7, 0x8fd8, 0x8fd9, 0x8fda, 0xe1e8, 0xbbd5, 0x8fdb, 0x8fdc, /*0xb8-0xbf*/
+  0x8fdd, 0x8fde, 0x8fdf, 0xd0c4, 0xe2e0, 0xb1d8, 0xd2e4, 0x8fe0, /*0xc0-0xc7*/
+  0x8fe1, 0xe2e1, 0x8fe2, 0x8fe3, 0xbcc9, 0xc8cc, 0x8fe4, 0xe2e3, /*0xc8-0xcf*/
+  0xecfe, 0xecfd, 0xdfaf, 0x8fe5, 0x8fe6, 0x8fe7, 0xe2e2, 0xd6be, /*0xd0-0xd7*/
+  0xcdfc, 0xc3a6, 0x8fe8, 0x8fe9, 0x8fea, 0xe3c3, 0x8feb, 0x8fec, /*0xd8-0xdf*/
+  0xd6d2, 0xe2e7, 0x8fed, 0x8fee, 0xe2e8, 0x8fef, 0x8ff0, 0xd3c7, /*0xe0-0xe7*/
+  0x8ff1, 0x8ff2, 0xe2ec, 0xbfec, 0x8ff3, 0xe2ed, 0xe2e5, 0x8ff4, /*0xe8-0xef*/
+  0x8ff5, 0xb3c0, 0x8ff6, 0x8ff7, 0x8ff8, 0xc4ee, 0x8ff9, 0x8ffa, /*0xf0-0xf7*/
+  0xe2ee, 0x8ffb, 0x8ffc, 0xd0c3, 0x8ffd, 0xbaf6, 0xe2e9, 0xb7de, /*0xf8-0xff*/
+  /* 0x6000 */
+  0xbbb3, 0xccac, 0xcbcb, 0xe2e4, 0xe2e6, 0xe2ea, 0xe2eb, 0x8ffe, /*0x00-0x07*/
+  0x9040, 0x9041, 0xe2f7, 0x9042, 0x9043, 0xe2f4, 0xd4f5, 0xe2f3, /*0x08-0x0f*/
+  0x9044, 0x9045, 0xc5ad, 0x9046, 0xd5fa, 0xc5c2, 0xb2c0, 0x9047, /*0x10-0x17*/
+  0x9048, 0xe2ef, 0x9049, 0xe2f2, 0xc1af, 0xcbbc, 0x904a, 0x904b, /*0x18-0x1f*/
+  0xb5a1, 0xe2f9, 0x904c, 0x904d, 0x904e, 0xbcb1, 0xe2f1, 0xd0d4, /*0x20-0x27*/
+  0xd4b9, 0xe2f5, 0xb9d6, 0xe2f6, 0x904f, 0x9050, 0x9051, 0xc7d3, /*0x28-0x2f*/
+  0x9052, 0x9053, 0x9054, 0x9055, 0x9056, 0xe2f0, 0x9057, 0x9058, /*0x30-0x37*/
+  0x9059, 0x905a, 0x905b, 0xd7dc, 0xeda1, 0x905c, 0x905d, 0xe2f8, /*0x38-0x3f*/
+  0x905e, 0xeda5, 0xe2fe, 0xcad1, 0x905f, 0x9060, 0x9061, 0x9062, /*0x40-0x47*/
+  0x9063, 0x9064, 0x9065, 0xc1b5, 0x9066, 0xbbd0, 0x9067, 0x9068, /*0x48-0x4f*/
+  0xbfd6, 0x9069, 0xbae3, 0x906a, 0x906b, 0xcba1, 0x906c, 0x906d, /*0x50-0x57*/
+  0x906e, 0xeda6, 0xeda3, 0x906f, 0x9070, 0xeda2, 0x9071, 0x9072, /*0x58-0x5f*/
+  0x9073, 0x9074, 0xbbd6, 0xeda7, 0xd0f4, 0x9075, 0x9076, 0xeda4, /*0x60-0x67*/
+  0xbade, 0xb6f7, 0xe3a1, 0xb6b2, 0xccf1, 0xb9a7, 0x9077, 0xcfa2, /*0x68-0x6f*/
+  0xc7a1, 0x9078, 0x9079, 0xbfd2, 0x907a, 0x907b, 0xb6f1, 0x907c, /*0x70-0x77*/
+  0xe2fa, 0xe2fb, 0xe2fd, 0xe2fc, 0xc4d5, 0xe3a2, 0x907d, 0xd3c1, /*0x78-0x7f*/
+  0x907e, 0x9080, 0x9081, 0xe3a7, 0xc7c4, 0x9082, 0x9083, 0x9084, /*0x80-0x87*/
+  0x9085, 0xcfa4, 0x9086, 0x9087, 0xe3a9, 0xbab7, 0x9088, 0x9089, /*0x88-0x8f*/
+  0x908a, 0x908b, 0xe3a8, 0x908c, 0xbbda, 0x908d, 0xe3a3, 0x908e, /*0x90-0x97*/
+  0x908f, 0x9090, 0xe3a4, 0xe3aa, 0x9091, 0xe3a6, 0x9092, 0xcef2, /*0x98-0x9f*/
+  0xd3c6, 0x9093, 0x9094, 0xbbbc, 0x9095, 0x9096, 0xd4c3, 0x9097, /*0xa0-0xa7*/
+  0xc4fa, 0x9098, 0x9099, 0xeda8, 0xd0fc, 0xe3a5, 0x909a, 0xc3f5, /*0xa8-0xaf*/
+  0x909b, 0xe3ad, 0xb1af, 0x909c, 0xe3b2, 0x909d, 0x909e, 0x909f, /*0xb0-0xb7*/
+  0xbcc2, 0x90a0, 0x90a1, 0xe3ac, 0xb5bf, 0x90a2, 0x90a3, 0x90a4, /*0xb8-0xbf*/
+  0x90a5, 0x90a6, 0x90a7, 0x90a8, 0x90a9, 0xc7e9, 0xe3b0, 0x90aa, /*0xc0-0xc7*/
+  0x90ab, 0x90ac, 0xbeaa, 0xcdef, 0x90ad, 0x90ae, 0x90af, 0x90b0, /*0xc8-0xcf*/
+  0x90b1, 0xbbf3, 0x90b2, 0x90b3, 0x90b4, 0xcce8, 0x90b5, 0x90b6, /*0xd0-0xd7*/
+  0xe3af, 0x90b7, 0xe3b1, 0x90b8, 0xcfa7, 0xe3ae, 0x90b9, 0xcea9, /*0xd8-0xdf*/
+  0xbbdd, 0x90ba, 0x90bb, 0x90bc, 0x90bd, 0x90be, 0xb5eb, 0xbee5, /*0xe0-0xe7*/
+  0xb2d2, 0xb3cd, 0x90bf, 0xb1b9, 0xe3ab, 0xb2d1, 0xb5ac, 0xb9df, /*0xe8-0xef*/
+  0xb6e8, 0x90c0, 0x90c1, 0xcfeb, 0xe3b7, 0x90c2, 0xbbcc, 0x90c3, /*0xf0-0xf7*/
+  0x90c4, 0xc8c7, 0xd0ca, 0x90c5, 0x90c6, 0x90c7, 0x90c8, 0x90c9, /*0xf8-0xff*/
+  /* 0x6100 */
+  0xe3b8, 0xb3ee, 0x90ca, 0x90cb, 0x90cc, 0x90cd, 0xeda9, 0x90ce, /*0x00-0x07*/
+  0xd3fa, 0xd3e4, 0x90cf, 0x90d0, 0x90d1, 0xedaa, 0xe3b9, 0xd2e2, /*0x08-0x0f*/
+  0x90d2, 0x90d3, 0x90d4, 0x90d5, 0x90d6, 0xe3b5, 0x90d7, 0x90d8, /*0x10-0x17*/
+  0x90d9, 0x90da, 0xd3de, 0x90db, 0x90dc, 0x90dd, 0x90de, 0xb8d0, /*0x18-0x1f*/
+  0xe3b3, 0x90df, 0x90e0, 0xe3b6, 0xb7df, 0x90e1, 0xe3b4, 0xc0a2, /*0x20-0x27*/
+  0x90e2, 0x90e3, 0x90e4, 0xe3ba, 0x90e5, 0x90e6, 0x90e7, 0x90e8, /*0x28-0x2f*/
+  0x90e9, 0x90ea, 0x90eb, 0x90ec, 0x90ed, 0x90ee, 0x90ef, 0x90f0, /*0x30-0x37*/
+  0x90f1, 0x90f2, 0x90f3, 0x90f4, 0x90f5, 0x90f6, 0x90f7, 0xd4b8, /*0x38-0x3f*/
+  0x90f8, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90fd, 0x90fe, 0x9140, /*0x40-0x47*/
+  0xb4c8, 0x9141, 0xe3bb, 0x9142, 0xbbc5, 0x9143, 0xc9f7, 0x9144, /*0x48-0x4f*/
+  0x9145, 0xc9e5, 0x9146, 0x9147, 0x9148, 0xc4bd, 0x9149, 0x914a, /*0x50-0x57*/
+  0x914b, 0x914c, 0x914d, 0x914e, 0x914f, 0xedab, 0x9150, 0x9151, /*0x58-0x5f*/
+  0x9152, 0x9153, 0xc2fd, 0x9154, 0x9155, 0x9156, 0x9157, 0xbbdb, /*0x60-0x67*/
+  0xbfae, 0x9158, 0x9159, 0x915a, 0x915b, 0x915c, 0x915d, 0x915e, /*0x68-0x6f*/
+  0xcebf, 0x915f, 0x9160, 0x9161, 0x9162, 0xe3bc, 0x9163, 0xbfb6, /*0x70-0x77*/
+  0x9164, 0x9165, 0x9166, 0x9167, 0x9168, 0x9169, 0x916a, 0x916b, /*0x78-0x7f*/
+  0x916c, 0x916d, 0x916e, 0x916f, 0x9170, 0x9171, 0x9172, 0x9173, /*0x80-0x87*/
+  0x9174, 0x9175, 0x9176, 0xb1ef, 0x9177, 0x9178, 0xd4f7, 0x9179, /*0x88-0x8f*/
+  0x917a, 0x917b, 0x917c, 0x917d, 0xe3be, 0x917e, 0x9180, 0x9181, /*0x90-0x97*/
+  0x9182, 0x9183, 0x9184, 0x9185, 0x9186, 0xedad, 0x9187, 0x9188, /*0x98-0x9f*/
+  0x9189, 0x918a, 0x918b, 0x918c, 0x918d, 0x918e, 0x918f, 0xe3bf, /*0xa0-0xa7*/
+  0xbaa9, 0xedac, 0x9190, 0x9191, 0xe3bd, 0x9192, 0x9193, 0x9194, /*0xa8-0xaf*/
+  0x9195, 0x9196, 0x9197, 0x9198, 0x9199, 0x919a, 0x919b, 0xe3c0, /*0xb0-0xb7*/
+  0x919c, 0x919d, 0x919e, 0x919f, 0x91a0, 0x91a1, 0xbab6, 0x91a2, /*0xb8-0xbf*/
+  0x91a3, 0x91a4, 0xb6ae, 0x91a5, 0x91a6, 0x91a7, 0x91a8, 0x91a9, /*0xc0-0xc7*/
+  0xd0b8, 0x91aa, 0xb0c3, 0xedae, 0x91ab, 0x91ac, 0x91ad, 0x91ae, /*0xc8-0xcf*/
+  0x91af, 0xedaf, 0xc0c1, 0x91b0, 0xe3c1, 0x91b1, 0x91b2, 0x91b3, /*0xd0-0xd7*/
+  0x91b4, 0x91b5, 0x91b6, 0x91b7, 0x91b8, 0x91b9, 0x91ba, 0x91bb, /*0xd8-0xdf*/
+  0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, 0xc5b3, 0x91c2, /*0xe0-0xe7*/
+  0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c7, 0x91c8, 0x91c9, 0x91ca, /*0xe8-0xef*/
+  0x91cb, 0x91cc, 0x91cd, 0x91ce, 0x91cf, 0xe3c2, 0x91d0, 0x91d1, /*0xf0-0xf7*/
+  0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0xdcb2, /*0xf8-0xff*/
+  /* 0x6200 */
+  0x91d9, 0x91da, 0x91db, 0x91dc, 0x91dd, 0x91de, 0xedb0, 0x91df, /*0x00-0x07*/
+  0xb8ea, 0x91e0, 0xceec, 0xeaa7, 0xd0e7, 0xcaf9, 0xc8d6, 0xcfb7, /*0x08-0x0f*/
+  0xb3c9, 0xced2, 0xbde4, 0x91e1, 0x91e2, 0xe3de, 0xbbf2, 0xeaa8, /*0x10-0x17*/
+  0xd5bd, 0x91e3, 0xc6dd, 0xeaa9, 0x91e4, 0x91e5, 0x91e6, 0xeaaa, /*0x18-0x1f*/
+  0x91e7, 0xeaac, 0xeaab, 0x91e8, 0xeaae, 0xeaad, 0x91e9, 0x91ea, /*0x20-0x27*/
+  0x91eb, 0x91ec, 0xbdd8, 0x91ed, 0xeaaf, 0x91ee, 0xc2be, 0x91ef, /*0x28-0x2f*/
+  0x91f0, 0x91f1, 0x91f2, 0xb4c1, 0xb4f7, 0x91f3, 0x91f4, 0xbba7, /*0x30-0x37*/
+  0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9, 0xece6, 0xece5, 0xb7bf, /*0x38-0x3f*/
+  0xcbf9, 0xb1e2, 0x91fa, 0xece7, 0x91fb, 0x91fc, 0x91fd, 0xc9c8, /*0x40-0x47*/
+  0xece8, 0xece9, 0x91fe, 0xcad6, 0xded0, 0xb2c5, 0xd4fa, 0x9240, /*0x48-0x4f*/
+  0x9241, 0xc6cb, 0xb0c7, 0xb4f2, 0xc8d3, 0x9242, 0x9243, 0x9244, /*0x50-0x57*/
+  0xcdd0, 0x9245, 0x9246, 0xbfb8, 0x9247, 0x9248, 0x9249, 0x924a, /*0x58-0x5f*/
+  0x924b, 0x924c, 0x924d, 0xbfdb, 0x924e, 0x924f, 0xc7a4, 0xd6b4, /*0x60-0x67*/
+  0x9250, 0xc0a9, 0xded1, 0xc9a8, 0xd1ef, 0xc5a4, 0xb0e7, 0xb3b6, /*0x68-0x6f*/
+  0xc8c5, 0x9251, 0x9252, 0xb0e2, 0x9253, 0x9254, 0xb7f6, 0x9255, /*0x70-0x77*/
+  0x9256, 0xc5fa, 0x9257, 0x9258, 0xb6f3, 0x9259, 0xd5d2, 0xb3d0, /*0x78-0x7f*/
+  0xbcbc, 0x925a, 0x925b, 0x925c, 0xb3ad, 0x925d, 0x925e, 0x925f, /*0x80-0x87*/
+  0x9260, 0xbef1, 0xb0d1, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, /*0x88-0x8f*/
+  0x9266, 0xd2d6, 0xcae3, 0xd7a5, 0x9267, 0xcdb6, 0xb6b6, 0xbfb9, /*0x90-0x97*/
+  0xd5db, 0x9268, 0xb8a7, 0xc5d7, 0x9269, 0x926a, 0x926b, 0xded2, /*0x98-0x9f*/
+  0xbfd9, 0xc2d5, 0xc7c0, 0x926c, 0xbba4, 0xb1a8, 0x926d, 0x926e, /*0xa0-0xa7*/
+  0xc5ea, 0x926f, 0x9270, 0xc5fb, 0xcca7, 0x9271, 0x9272, 0x9273, /*0xa8-0xaf*/
+  0x9274, 0xb1a7, 0x9275, 0x9276, 0x9277, 0xb5d6, 0x9278, 0x9279, /*0xb0-0xb7*/
+  0x927a, 0xc4a8, 0x927b, 0xded3, 0xd1ba, 0xb3e9, 0x927c, 0xc3f2, /*0xb8-0xbf*/
+  0x927d, 0x927e, 0xb7f7, 0x9280, 0xd6f4, 0xb5a3, 0xb2f0, 0xc4b4, /*0xc0-0xc7*/
+  0xc4e9, 0xc0ad, 0xded4, 0x9281, 0xb0e8, 0xc5c4, 0xc1e0, 0x9282, /*0xc8-0xcf*/
+  0xb9d5, 0x9283, 0xbedc, 0xcdd8, 0xb0ce, 0x9284, 0xcdcf, 0xded6, /*0xd0-0xd7*/
+  0xbed0, 0xd7be, 0xded5, 0xd5d0, 0xb0dd, 0x9285, 0x9286, 0xc4e2, /*0xd8-0xdf*/
+  0x9287, 0x9288, 0xc2a3, 0xbcf0, 0x9289, 0xd3b5, 0xc0b9, 0xc5a1, /*0xe0-0xe7*/
+  0xb2a6, 0xd4f1, 0x928a, 0x928b, 0xc0a8, 0xcac3, 0xded7, 0xd5fc, /*0xe8-0xef*/
+  0x928c, 0xb9b0, 0x928d, 0xc8ad, 0xcba9, 0x928e, 0xded9, 0xbfbd, /*0xf0-0xf7*/
+  0x928f, 0x9290, 0x9291, 0x9292, 0xc6b4, 0xd7a7, 0xcab0, 0xc4c3, /*0xf8-0xff*/
+  /* 0x6300 */
+  0x9293, 0xb3d6, 0xb9d2, 0x9294, 0x9295, 0x9296, 0x9297, 0xd6b8, /*0x00-0x07*/
+  0xeafc, 0xb0b4, 0x9298, 0x9299, 0x929a, 0x929b, 0xbfe6, 0x929c, /*0x08-0x0f*/
+  0x929d, 0xccf4, 0x929e, 0x929f, 0x92a0, 0x92a1, 0xcdda, 0x92a2, /*0x10-0x17*/
+  0x92a3, 0x92a4, 0xd6bf, 0xc2ce, 0x92a5, 0xcece, 0xcca2, 0xd0ae, /*0x18-0x1f*/
+  0xc4d3, 0xb5b2, 0xded8, 0xd5f5, 0xbcb7, 0xbbd3, 0x92a6, 0x92a7, /*0x20-0x27*/
+  0xb0a4, 0x92a8, 0xc5b2, 0xb4ec, 0x92a9, 0x92aa, 0x92ab, 0xd5f1, /*0x28-0x2f*/
+  0x92ac, 0x92ad, 0xeafd, 0x92ae, 0x92af, 0x92b0, 0x92b1, 0x92b2, /*0x30-0x37*/
+  0x92b3, 0xdeda, 0xcda6, 0x92b4, 0x92b5, 0xcdec, 0x92b6, 0x92b7, /*0x38-0x3f*/
+  0x92b8, 0x92b9, 0xcee6, 0xdedc, 0x92ba, 0xcdb1, 0xc0a6, 0x92bb, /*0x40-0x47*/
+  0x92bc, 0xd7bd, 0x92bd, 0xdedb, 0xb0c6, 0xbab4, 0xc9d3, 0xc4f3, /*0x48-0x4f*/
+  0xbee8, 0x92be, 0x92bf, 0x92c0, 0x92c1, 0xb2b6, 0x92c2, 0x92c3, /*0x50-0x57*/
+  0x92c4, 0x92c5, 0x92c6, 0x92c7, 0x92c8, 0x92c9, 0xc0cc, 0xcbf0, /*0x58-0x5f*/
+  0x92ca, 0xbcf1, 0xbbbb, 0xb5b7, 0x92cb, 0x92cc, 0x92cd, 0xc5f5, /*0x60-0x67*/
+  0x92ce, 0xdee6, 0x92cf, 0x92d0, 0x92d1, 0xdee3, 0xbedd, 0x92d2, /*0x68-0x6f*/
+  0x92d3, 0xdedf, 0x92d4, 0x92d5, 0x92d6, 0x92d7, 0xb4b7, 0xbddd, /*0x70-0x77*/
+  0x92d8, 0x92d9, 0xdee0, 0xc4ed, 0x92da, 0x92db, 0x92dc, 0x92dd, /*0x78-0x7f*/
+  0xcfc6, 0x92de, 0xb5e0, 0x92df, 0x92e0, 0x92e1, 0x92e2, 0xb6de, /*0x80-0x87*/
+  0xcada, 0xb5f4, 0xdee5, 0x92e3, 0xd5c6, 0x92e4, 0xdee1, 0xcccd, /*0x88-0x8f*/
+  0xc6fe, 0x92e5, 0xc5c5, 0x92e6, 0x92e7, 0x92e8, 0xd2b4, 0x92e9, /*0x90-0x97*/
+  0xbef2, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, /*0x98-0x9f*/
+  0xc2d3, 0x92f1, 0xccbd, 0xb3b8, 0x92f2, 0xbdd3, 0x92f3, 0xbfd8, /*0xa0-0xa7*/
+  0xcdc6, 0xd1da, 0xb4eb, 0x92f4, 0xdee4, 0xdedd, 0xdee7, 0x92f5, /*0xa8-0xaf*/
+  0xeafe, 0x92f6, 0x92f7, 0xc2b0, 0xdee2, 0x92f8, 0x92f9, 0xd6c0, /*0xb0-0xb7*/
+  0xb5a7, 0x92fa, 0xb2f4, 0x92fb, 0xdee8, 0x92fc, 0xdef2, 0x92fd, /*0xb8-0xbf*/
+  0x92fe, 0x9340, 0x9341, 0x9342, 0xdeed, 0x9343, 0xdef1, 0x9344, /*0xc0-0xc7*/
+  0x9345, 0xc8e0, 0x9346, 0x9347, 0x9348, 0xd7e1, 0xdeef, 0xc3e8, /*0xc8-0xcf*/
+  0xcce1, 0x9349, 0xb2e5, 0x934a, 0x934b, 0x934c, 0xd2be, 0x934d, /*0xd0-0xd7*/
+  0x934e, 0x934f, 0x9350, 0x9351, 0x9352, 0x9353, 0xdeee, 0x9354, /*0xd8-0xdf*/
+  0xdeeb, 0xced5, 0x9355, 0xb4a7, 0x9356, 0x9357, 0x9358, 0x9359, /*0xe0-0xe7*/
+  0x935a, 0xbfab, 0xbebe, 0x935b, 0x935c, 0xbdd2, 0x935d, 0x935e, /*0xe8-0xef*/
+  0x935f, 0x9360, 0xdee9, 0x9361, 0xd4ae, 0x9362, 0xdede, 0x9363, /*0xf0-0xf7*/
+  0xdeea, 0x9364, 0x9365, 0x9366, 0x9367, 0xc0bf, 0x9368, 0xdeec, /*0xf8-0xff*/
+  /* 0x6400 */
+  0xb2f3, 0xb8e9, 0xc2a7, 0x9369, 0x936a, 0xbdc1, 0x936b, 0x936c, /*0x00-0x07*/
+  0x936d, 0x936e, 0x936f, 0xdef5, 0xdef8, 0x9370, 0x9371, 0xb2ab, /*0x08-0x0f*/
+  0xb4a4, 0x9372, 0x9373, 0xb4ea, 0xc9a6, 0x9374, 0x9375, 0x9376, /*0x10-0x17*/
+  0x9377, 0x9378, 0x9379, 0xdef6, 0xcbd1, 0x937a, 0xb8e3, 0x937b, /*0x18-0x1f*/
+  0xdef7, 0xdefa, 0x937c, 0x937d, 0x937e, 0x9380, 0xdef9, 0x9381, /*0x20-0x27*/
+  0x9382, 0x9383, 0xccc2, 0x9384, 0xb0e1, 0xb4ee, 0x9385, 0x9386, /*0x28-0x2f*/
+  0x9387, 0x9388, 0x9389, 0x938a, 0xe5ba, 0x938b, 0x938c, 0x938d, /*0x30-0x37*/
+  0x938e, 0x938f, 0xd0af, 0x9390, 0x9391, 0xb2eb, 0x9392, 0xeba1, /*0x38-0x3f*/
+  0x9393, 0xdef4, 0x9394, 0x9395, 0xc9e3, 0xdef3, 0xb0da, 0xd2a1, /*0x40-0x47*/
+  0xb1f7, 0x9396, 0xccaf, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, /*0x48-0x4f*/
+  0x939c, 0x939d, 0xdef0, 0x939e, 0xcba4, 0x939f, 0x93a0, 0x93a1, /*0x50-0x57*/
+  0xd5aa, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0xdefb, 0x93a7, /*0x58-0x5f*/
+  0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x93ac, 0x93ad, 0x93ae, 0xb4dd, /*0x60-0x67*/
+  0x93af, 0xc4a6, 0x93b0, 0x93b1, 0x93b2, 0xdefd, 0x93b3, 0x93b4, /*0x68-0x6f*/
+  0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, /*0x70-0x77*/
+  0xc3fe, 0xc4a1, 0xdfa1, 0x93bd, 0x93be, 0x93bf, 0x93c0, 0x93c1, /*0x78-0x7f*/
+  0x93c2, 0x93c3, 0xc1cc, 0x93c4, 0xdefc, 0xbeef, 0x93c5, 0xc6b2, /*0x80-0x87*/
+  0x93c6, 0x93c7, 0x93c8, 0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, /*0x88-0x8f*/
+  0x93ce, 0xb3c5, 0xc8f6, 0x93cf, 0x93d0, 0xcbba, 0xdefe, 0x93d1, /*0x90-0x97*/
+  0x93d2, 0xdfa4, 0x93d3, 0x93d4, 0x93d5, 0x93d6, 0xd7b2, 0x93d7, /*0x98-0x9f*/
+  0x93d8, 0x93d9, 0x93da, 0x93db, 0xb3b7, 0x93dc, 0x93dd, 0x93de, /*0xa0-0xa7*/
+  0x93df, 0xc1c3, 0x93e0, 0x93e1, 0xc7cb, 0xb2a5, 0xb4e9, 0x93e2, /*0xa8-0xaf*/
+  0xd7ab, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0xc4ec, 0x93e7, 0xdfa2, /*0xb0-0xb7*/
+  0xdfa3, 0x93e8, 0xdfa5, 0x93e9, 0xbab3, 0x93ea, 0x93eb, 0x93ec, /*0xb8-0xbf*/
+  0xdfa6, 0x93ed, 0xc0de, 0x93ee, 0x93ef, 0xc9c3, 0x93f0, 0x93f1, /*0xc0-0xc7*/
+  0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0xb2d9, 0xc7e6, 0x93f7, /*0xc8-0xcf*/
+  0xdfa7, 0x93f8, 0xc7dc, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0xdfa8, /*0xd0-0xd7*/
+  0xeba2, 0x93fd, 0x93fe, 0x9440, 0x9441, 0x9442, 0xcbd3, 0x9443, /*0xd8-0xdf*/
+  0x9444, 0x9445, 0xdfaa, 0x9446, 0xdfa9, 0x9447, 0xb2c1, 0x9448, /*0xe0-0xe7*/
+  0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, 0x9450, /*0xe8-0xef*/
+  0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, 0x9458, /*0xf0-0xf7*/
+  0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, 0x9460, /*0xf8-0xff*/
+  /* 0x6500 */
+  0xc5ca, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, /*0x00-0x07*/
+  0x9468, 0xdfab, 0x9469, 0x946a, 0x946b, 0x946c, 0x946d, 0x946e, /*0x08-0x0f*/
+  0x946f, 0x9470, 0xd4dc, 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, /*0x10-0x17*/
+  0xc8c1, 0x9476, 0x9477, 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, /*0x18-0x1f*/
+  0x947d, 0x947e, 0x9480, 0x9481, 0x9482, 0xdfac, 0x9483, 0x9484, /*0x20-0x27*/
+  0x9485, 0x9486, 0x9487, 0xbef0, 0x9488, 0x9489, 0xdfad, 0xd6a7, /*0x28-0x2f*/
+  0x948a, 0x948b, 0x948c, 0x948d, 0xeab7, 0xebb6, 0xcad5, 0x948e, /*0x30-0x37*/
+  0xd8fc, 0xb8c4, 0x948f, 0xb9a5, 0x9490, 0x9491, 0xb7c5, 0xd5fe, /*0x38-0x3f*/
+  0x9492, 0x9493, 0x9494, 0x9495, 0x9496, 0xb9ca, 0x9497, 0x9498, /*0x40-0x47*/
+  0xd0a7, 0xf4cd, 0x9499, 0x949a, 0xb5d0, 0x949b, 0x949c, 0xc3f4, /*0x48-0x4f*/
+  0x949d, 0xbec8, 0x949e, 0x949f, 0x94a0, 0xebb7, 0xb0bd, 0x94a1, /*0x50-0x57*/
+  0x94a2, 0xbdcc, 0x94a3, 0xc1b2, 0x94a4, 0xb1d6, 0xb3a8, 0x94a5, /*0x58-0x5f*/
+  0x94a6, 0x94a7, 0xb8d2, 0xc9a2, 0x94a8, 0x94a9, 0xb6d8, 0x94aa, /*0x60-0x67*/
+  0x94ab, 0x94ac, 0x94ad, 0xebb8, 0xbeb4, 0x94ae, 0x94af, 0x94b0, /*0x68-0x6f*/
+  0xcafd, 0x94b1, 0xc7c3, 0x94b2, 0xd5fb, 0x94b3, 0x94b4, 0xb7f3, /*0x70-0x77*/
+  0x94b5, 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, 0x94bb, 0x94bc, /*0x78-0x7f*/
+  0x94bd, 0x94be, 0x94bf, 0x94c0, 0x94c1, 0x94c2, 0x94c3, 0xcec4, /*0x80-0x87*/
+  0x94c4, 0x94c5, 0x94c6, 0xd5ab, 0xb1f3, 0x94c7, 0x94c8, 0x94c9, /*0x88-0x8f*/
+  0xecb3, 0xb0df, 0x94ca, 0xecb5, 0x94cb, 0x94cc, 0x94cd, 0xb6b7, /*0x90-0x97*/
+  0x94ce, 0xc1cf, 0x94cf, 0xf5fa, 0xd0b1, 0x94d0, 0x94d1, 0xd5e5, /*0x98-0x9f*/
+  0x94d2, 0xced3, 0x94d3, 0x94d4, 0xbdef, 0xb3e2, 0x94d5, 0xb8ab, /*0xa0-0xa7*/
+  0x94d6, 0xd5b6, 0x94d7, 0xedbd, 0x94d8, 0xb6cf, 0x94d9, 0xcbb9, /*0xa8-0xaf*/
+  0xd0c2, 0x94da, 0x94db, 0x94dc, 0x94dd, 0x94de, 0x94df, 0x94e0, /*0xb0-0xb7*/
+  0x94e1, 0xb7bd, 0x94e2, 0x94e3, 0xecb6, 0xcaa9, 0x94e4, 0x94e5, /*0xb8-0xbf*/
+  0x94e6, 0xc5d4, 0x94e7, 0xecb9, 0xecb8, 0xc2c3, 0xecb7, 0x94e8, /*0xc0-0xc7*/
+  0x94e9, 0x94ea, 0x94eb, 0xd0fd, 0xecba, 0x94ec, 0xecbb, 0xd7e5, /*0xc8-0xcf*/
+  0x94ed, 0x94ee, 0xecbc, 0x94ef, 0x94f0, 0x94f1, 0xecbd, 0xc6ec, /*0xd0-0xd7*/
+  0x94f2, 0x94f3, 0x94f4, 0x94f5, 0x94f6, 0x94f7, 0x94f8, 0x94f9, /*0xd8-0xdf*/
+  0xcede, 0x94fa, 0xbcc8, 0x94fb, 0x94fc, 0xc8d5, 0xb5a9, 0xbec9, /*0xe0-0xe7*/
+  0xd6bc, 0xd4e7, 0x94fd, 0x94fe, 0xd1ae, 0xd0f1, 0xeab8, 0xeab9, /*0xe8-0xef*/
+  0xeaba, 0xbab5, 0x9540, 0x9541, 0x9542, 0x9543, 0xcab1, 0xbff5, /*0xf0-0xf7*/
+  0x9544, 0x9545, 0xcdfa, 0x9546, 0x9547, 0x9548, 0x9549, 0x954a, /*0xf8-0xff*/
+  /* 0x6600 */
+  0xeac0, 0x954b, 0xb0ba, 0xeabe, 0x954c, 0x954d, 0xc0a5, 0x954e, /*0x00-0x07*/
+  0x954f, 0x9550, 0xeabb, 0x9551, 0xb2fd, 0x9552, 0xc3f7, 0xbbe8, /*0x08-0x0f*/
+  0x9553, 0x9554, 0x9555, 0xd2d7, 0xcef4, 0xeabf, 0x9556, 0x9557, /*0x10-0x17*/
+  0x9558, 0xeabc, 0x9559, 0x955a, 0x955b, 0xeac3, 0x955c, 0xd0c7, /*0x18-0x1f*/
+  0xd3b3, 0x955d, 0x955e, 0x955f, 0x9560, 0xb4ba, 0x9561, 0xc3c1, /*0x20-0x27*/
+  0xd7f2, 0x9562, 0x9563, 0x9564, 0x9565, 0xd5d1, 0x9566, 0xcac7, /*0x28-0x2f*/
+  0x9567, 0xeac5, 0x9568, 0x9569, 0xeac4, 0xeac7, 0xeac6, 0x956a, /*0x30-0x37*/
+  0x956b, 0x956c, 0x956d, 0x956e, 0xd6e7, 0x956f, 0xcfd4, 0x9570, /*0x38-0x3f*/
+  0x9571, 0xeacb, 0x9572, 0xbbce, 0x9573, 0x9574, 0x9575, 0x9576, /*0x40-0x47*/
+  0x9577, 0x9578, 0x9579, 0xbdfa, 0xc9ce, 0x957a, 0x957b, 0xeacc, /*0x48-0x4f*/
+  0x957c, 0x957d, 0xc9b9, 0xcffe, 0xeaca, 0xd4ce, 0xeacd, 0xeacf, /*0x50-0x57*/
+  0x957e, 0x9580, 0xcded, 0x9581, 0x9582, 0x9583, 0x9584, 0xeac9, /*0x58-0x5f*/
+  0x9585, 0xeace, 0x9586, 0x9587, 0xceee, 0x9588, 0xbbde, 0x9589, /*0x60-0x67*/
+  0xb3bf, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0xc6d5, 0xbeb0, /*0x68-0x6f*/
+  0xcefa, 0x958f, 0x9590, 0x9591, 0xc7e7, 0x9592, 0xbea7, 0xead0, /*0x70-0x77*/
+  0x9593, 0x9594, 0xd6c7, 0x9595, 0x9596, 0x9597, 0xc1c0, 0x9598, /*0x78-0x7f*/
+  0x9599, 0x959a, 0xd4dd, 0x959b, 0xead1, 0x959c, 0x959d, 0xcfbe, /*0x80-0x87*/
+  0x959e, 0x959f, 0x95a0, 0x95a1, 0xead2, 0x95a2, 0x95a3, 0x95a4, /*0x88-0x8f*/
+  0x95a5, 0xcaee, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0xc5af, 0xb0b5, /*0x90-0x97*/
+  0x95aa, 0x95ab, 0x95ac, 0x95ad, 0x95ae, 0xead4, 0x95af, 0x95b0, /*0x98-0x9f*/
+  0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5, 0x95b6, 0x95b7, 0xead3, /*0xa0-0xa7*/
+  0xf4df, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0xc4ba, 0x95bd, /*0xa8-0xaf*/
+  0x95be, 0x95bf, 0x95c0, 0x95c1, 0xb1a9, 0x95c2, 0x95c3, 0x95c4, /*0xb0-0xb7*/
+  0x95c5, 0xe5df, 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0xead5, 0x95ca, /*0xb8-0xbf*/
+  0x95cb, 0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, /*0xc0-0xc7*/
+  0x95d3, 0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, /*0xc8-0xcf*/
+  0x95db, 0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, /*0xd0-0xd7*/
+  0x95e3, 0xcaef, 0x95e4, 0xead6, 0xead7, 0xc6d8, 0x95e5, 0x95e6, /*0xd8-0xdf*/
+  0x95e7, 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, 0xead8, 0x95ed, /*0xe0-0xe7*/
+  0x95ee, 0xead9, 0x95ef, 0x95f0, 0x95f1, 0x95f2, 0x95f3, 0x95f4, /*0xe8-0xef*/
+  0xd4bb, 0x95f5, 0xc7fa, 0xd2b7, 0xb8fc, 0x95f6, 0x95f7, 0xeac2, /*0xf0-0xf7*/
+  0x95f8, 0xb2dc, 0x95f9, 0x95fa, 0xc2fc, 0x95fb, 0xd4f8, 0xcce6, /*0xf8-0xff*/
+  /* 0x6700 */
+  0xd7ee, 0x95fc, 0x95fd, 0x95fe, 0x9640, 0x9641, 0x9642, 0x9643, /*0x00-0x07*/
+  0xd4c2, 0xd3d0, 0xebc3, 0xc5f3, 0x9644, 0xb7fe, 0x9645, 0x9646, /*0x08-0x0f*/
+  0xebd4, 0x9647, 0x9648, 0x9649, 0xcbb7, 0xebde, 0x964a, 0xc0ca, /*0x10-0x17*/
+  0x964b, 0x964c, 0x964d, 0xcdfb, 0x964e, 0xb3af, 0x964f, 0xc6da, /*0x18-0x1f*/
+  0x9650, 0x9651, 0x9652, 0x9653, 0x9654, 0x9655, 0xebfc, 0x9656, /*0x20-0x27*/
+  0xc4be, 0x9657, 0xceb4, 0xc4a9, 0xb1be, 0xd4fd, 0x9658, 0xcaf5, /*0x28-0x2f*/
+  0x9659, 0xd6ec, 0x965a, 0x965b, 0xc6d3, 0xb6e4, 0x965c, 0x965d, /*0x30-0x37*/
+  0x965e, 0x965f, 0xbbfa, 0x9660, 0x9661, 0xd0e0, 0x9662, 0x9663, /*0x38-0x3f*/
+  0xc9b1, 0x9664, 0xd4d3, 0xc8a8, 0x9665, 0x9666, 0xb8cb, 0x9667, /*0x40-0x47*/
+  0xe8be, 0xc9bc, 0x9668, 0x9669, 0xe8bb, 0x966a, 0xc0ee, 0xd0d3, /*0x48-0x4f*/
+  0xb2c4, 0xb4e5, 0x966b, 0xe8bc, 0x966c, 0x966d, 0xd5c8, 0x966e, /*0x50-0x57*/
+  0x966f, 0x9670, 0x9671, 0x9672, 0xb6c5, 0x9673, 0xe8bd, 0xcaf8, /*0x58-0x5f*/
+  0xb8dc, 0xccf5, 0x9674, 0x9675, 0x9676, 0xc0b4, 0x9677, 0x9678, /*0x60-0x67*/
+  0xd1ee, 0xe8bf, 0xe8c2, 0x9679, 0x967a, 0xbabc, 0x967b, 0xb1ad, /*0x68-0x6f*/
+  0xbddc, 0x967c, 0xeabd, 0xe8c3, 0x967d, 0xe8c6, 0x967e, 0xe8cb, /*0x70-0x77*/
+  0x9680, 0x9681, 0x9682, 0x9683, 0xe8cc, 0x9684, 0xcbc9, 0xb0e5, /*0x78-0x7f*/
+  0x9685, 0xbcab, 0x9686, 0x9687, 0xb9b9, 0x9688, 0x9689, 0xe8c1, /*0x80-0x87*/
+  0x968a, 0xcdf7, 0x968b, 0xe8ca, 0x968c, 0x968d, 0x968e, 0x968f, /*0x88-0x8f*/
+  0xcef6, 0x9690, 0x9691, 0x9692, 0x9693, 0xd5ed, 0x9694, 0xc1d6, /*0x90-0x97*/
+  0xe8c4, 0x9695, 0xc3b6, 0x9696, 0xb9fb, 0xd6a6, 0xe8c8, 0x9697, /*0x98-0x9f*/
+  0x9698, 0x9699, 0xcae0, 0xd4e6, 0x969a, 0xe8c0, 0x969b, 0xe8c5, /*0xa0-0xa7*/
+  0xe8c7, 0x969c, 0xc7b9, 0xb7e3, 0x969d, 0xe8c9, 0x969e, 0xbfdd, /*0xa8-0xaf*/
+  0xe8d2, 0x969f, 0x96a0, 0xe8d7, 0x96a1, 0xe8d5, 0xbcdc, 0xbccf, /*0xb0-0xb7*/
+  0xe8db, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a7, 0x96a8, /*0xb8-0xbf*/
+  0x96a9, 0xe8de, 0x96aa, 0xe8da, 0xb1fa, 0x96ab, 0x96ac, 0x96ad, /*0xc0-0xc7*/
+  0x96ae, 0x96af, 0x96b0, 0x96b1, 0x96b2, 0x96b3, 0x96b4, 0xb0d8, /*0xc8-0xcf*/
+  0xc4b3, 0xb8cc, 0xc6e2, 0xc8be, 0xc8e1, 0x96b5, 0x96b6, 0x96b7, /*0xd0-0xd7*/
+  0xe8cf, 0xe8d4, 0xe8d6, 0x96b8, 0xb9f1, 0xe8d8, 0xd7f5, 0x96b9, /*0xd8-0xdf*/
+  0xc4fb, 0x96ba, 0xe8dc, 0x96bb, 0x96bc, 0xb2e9, 0x96bd, 0x96be, /*0xe0-0xe7*/
+  0x96bf, 0xe8d1, 0x96c0, 0x96c1, 0xbced, 0x96c2, 0x96c3, 0xbfc2, /*0xe8-0xef*/
+  0xe8cd, 0xd6f9, 0x96c4, 0xc1f8, 0xb2f1, 0x96c5, 0x96c6, 0x96c7, /*0xf0-0xf7*/
+  0x96c8, 0x96c9, 0x96ca, 0x96cb, 0x96cc, 0xe8df, 0x96cd, 0xcac1, /*0xf8-0xff*/
+  /* 0x6800 */
+  0xe8d9, 0x96ce, 0x96cf, 0x96d0, 0x96d1, 0xd5a4, 0x96d2, 0xb1ea, /*0x00-0x07*/
+  0xd5bb, 0xe8ce, 0xe8d0, 0xb6b0, 0xe8d3, 0x96d3, 0xe8dd, 0xc0b8, /*0x08-0x0f*/
+  0x96d4, 0xcaf7, 0x96d5, 0xcba8, 0x96d6, 0x96d7, 0xc6dc, 0xc0f5, /*0x10-0x17*/
+  0x96d8, 0x96d9, 0x96da, 0x96db, 0x96dc, 0xe8e9, 0x96dd, 0x96de, /*0x18-0x1f*/
+  0x96df, 0xd0a3, 0x96e0, 0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, /*0x20-0x27*/
+  0x96e6, 0xe8f2, 0xd6ea, 0x96e7, 0x96e8, 0x96e9, 0x96ea, 0x96eb, /*0x28-0x2f*/
+  0x96ec, 0x96ed, 0xe8e0, 0xe8e1, 0x96ee, 0x96ef, 0x96f0, 0xd1f9, /*0x30-0x37*/
+  0xbacb, 0xb8f9, 0x96f1, 0x96f2, 0xb8f1, 0xd4d4, 0xe8ef, 0x96f3, /*0x38-0x3f*/
+  0xe8ee, 0xe8ec, 0xb9f0, 0xccd2, 0xe8e6, 0xcea6, 0xbff2, 0x96f4, /*0x40-0x47*/
+  0xb0b8, 0xe8f1, 0xe8f0, 0x96f5, 0xd7c0, 0x96f6, 0xe8e4, 0x96f7, /*0x48-0x4f*/
+  0xcda9, 0xc9a3, 0x96f8, 0xbbb8, 0xbddb, 0xe8ea, 0x96f9, 0x96fa, /*0x50-0x57*/
+  0x96fb, 0x96fc, 0x96fd, 0x96fe, 0x9740, 0x9741, 0x9742, 0x9743, /*0x58-0x5f*/
+  0xe8e2, 0xe8e3, 0xe8e5, 0xb5b5, 0xe8e7, 0xc7c5, 0xe8eb, 0xe8ed, /*0x60-0x67*/
+  0xbdb0, 0xd7ae, 0x9744, 0xe8f8, 0x9745, 0x9746, 0x9747, 0x9748, /*0x68-0x6f*/
+  0x9749, 0x974a, 0x974b, 0x974c, 0xe8f5, 0x974d, 0xcdb0, 0xe8f6, /*0x70-0x77*/
+  0x974e, 0x974f, 0x9750, 0x9751, 0x9752, 0x9753, 0x9754, 0x9755, /*0x78-0x7f*/
+  0x9756, 0xc1ba, 0x9757, 0xe8e8, 0x9758, 0xc3b7, 0xb0f0, 0x9759, /*0x80-0x87*/
+  0x975a, 0x975b, 0x975c, 0x975d, 0x975e, 0x975f, 0x9760, 0xe8f4, /*0x88-0x8f*/
+  0x9761, 0x9762, 0x9763, 0xe8f7, 0x9764, 0x9765, 0x9766, 0xb9a3, /*0x90-0x97*/
+  0x9767, 0x9768, 0x9769, 0x976a, 0x976b, 0x976c, 0x976d, 0x976e, /*0x98-0x9f*/
+  0x976f, 0x9770, 0xc9d2, 0x9771, 0x9772, 0x9773, 0xc3ce, 0xcee0, /*0xa0-0xa7*/
+  0xc0e6, 0x9774, 0x9775, 0x9776, 0x9777, 0xcbf3, 0x9778, 0xccdd, /*0xa8-0xaf*/
+  0xd0b5, 0x9779, 0x977a, 0xcae1, 0x977b, 0xe8f3, 0x977c, 0x977d, /*0xb0-0xb7*/
+  0x977e, 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9785, 0x9786, /*0xb8-0xbf*/
+  0xbcec, 0x9787, 0xe8f9, 0x9788, 0x9789, 0x978a, 0x978b, 0x978c, /*0xc0-0xc7*/
+  0x978d, 0xc3de, 0x978e, 0xc6e5, 0x978f, 0xb9f7, 0x9790, 0x9791, /*0xc8-0xcf*/
+  0x9792, 0x9793, 0xb0f4, 0x9794, 0x9795, 0xd7d8, 0x9796, 0x9797, /*0xd0-0xd7*/
+  0xbcac, 0x9798, 0xc5ef, 0x9799, 0x979a, 0x979b, 0x979c, 0x979d, /*0xd8-0xdf*/
+  0xccc4, 0x979e, 0x979f, 0xe9a6, 0x97a0, 0x97a1, 0x97a2, 0x97a3, /*0xe0-0xe7*/
+  0x97a4, 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0xc9ad, 0x97aa, /*0xe8-0xef*/
+  0xe9a2, 0xc0e2, 0x97ab, 0x97ac, 0x97ad, 0xbfc3, 0x97ae, 0x97af, /*0xf0-0xf7*/
+  0x97b0, 0xe8fe, 0xb9d7, 0x97b1, 0xe8fb, 0x97b2, 0x97b3, 0x97b4, /*0xf8-0xff*/
+  /* 0x6900 */
+  0x97b5, 0xe9a4, 0x97b6, 0x97b7, 0x97b8, 0xd2ce, 0x97b9, 0x97ba, /*0x00-0x07*/
+  0x97bb, 0x97bc, 0x97bd, 0xe9a3, 0x97be, 0xd6b2, 0xd7b5, 0x97bf, /*0x08-0x0f*/
+  0xe9a7, 0x97c0, 0xbdb7, 0x97c1, 0x97c2, 0x97c3, 0x97c4, 0x97c5, /*0x10-0x17*/
+  0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, 0xe8fc, /*0x18-0x1f*/
+  0xe8fd, 0x97cd, 0x97ce, 0x97cf, 0xe9a1, 0x97d0, 0x97d1, 0x97d2, /*0x20-0x27*/
+  0x97d3, 0x97d4, 0x97d5, 0x97d6, 0x97d7, 0xcdd6, 0x97d8, 0x97d9, /*0x28-0x2f*/
+  0xd2ac, 0x97da, 0x97db, 0x97dc, 0xe9b2, 0x97dd, 0x97de, 0x97df, /*0x30-0x37*/
+  0x97e0, 0xe9a9, 0x97e1, 0x97e2, 0x97e3, 0xb4aa, 0x97e4, 0xb4bb, /*0x38-0x3f*/
+  0x97e5, 0x97e6, 0xe9ab, 0x97e7, 0x97e8, 0x97e9, 0x97ea, 0x97eb, /*0x40-0x47*/
+  0x97ec, 0x97ed, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f3, /*0x48-0x4f*/
+  0x97f4, 0x97f5, 0x97f6, 0x97f7, 0xd0a8, 0x97f8, 0x97f9, 0xe9a5, /*0x50-0x57*/
+  0x97fa, 0x97fb, 0xb3fe, 0x97fc, 0x97fd, 0xe9ac, 0xc0e3, 0x97fe, /*0x58-0x5f*/
+  0xe9aa, 0x9840, 0x9841, 0xe9b9, 0x9842, 0x9843, 0xe9b8, 0x9844, /*0x60-0x67*/
+  0x9845, 0x9846, 0x9847, 0xe9ae, 0x9848, 0x9849, 0xe8fa, 0x984a, /*0x68-0x6f*/
+  0x984b, 0xe9a8, 0x984c, 0x984d, 0x984e, 0x984f, 0x9850, 0xbfac, /*0x70-0x77*/
+  0xe9b1, 0xe9ba, 0x9851, 0x9852, 0xc2a5, 0x9853, 0x9854, 0x9855, /*0x78-0x7f*/
+  0xe9af, 0x9856, 0xb8c5, 0x9857, 0xe9ad, 0x9858, 0xd3dc, 0xe9b4, /*0x80-0x87*/
+  0xe9b5, 0xe9b7, 0x9859, 0x985a, 0x985b, 0xe9c7, 0x985c, 0x985d, /*0x88-0x8f*/
+  0x985e, 0x985f, 0x9860, 0x9861, 0xc0c6, 0xe9c5, 0x9862, 0x9863, /*0x90-0x97*/
+  0xe9b0, 0x9864, 0x9865, 0xe9bb, 0xb0f1, 0x9866, 0x9867, 0x9868, /*0x98-0x9f*/
+  0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e, 0x986f, 0xe9bc, /*0xa0-0xa7*/
+  0xd5a5, 0x9870, 0x9871, 0xe9be, 0x9872, 0xe9bf, 0x9873, 0x9874, /*0xa8-0xaf*/
+  0x9875, 0xe9c1, 0x9876, 0x9877, 0xc1f1, 0x9878, 0x9879, 0xc8b6, /*0xb0-0xb7*/
+  0x987a, 0x987b, 0x987c, 0xe9bd, 0x987d, 0x987e, 0x9880, 0x9881, /*0xb8-0xbf*/
+  0x9882, 0xe9c2, 0x9883, 0x9884, 0x9885, 0x9886, 0x9887, 0x9888, /*0xc0-0xc7*/
+  0x9889, 0x988a, 0xe9c3, 0x988b, 0xe9b3, 0x988c, 0xe9b6, 0x988d, /*0xc8-0xcf*/
+  0xbbb1, 0x988e, 0x988f, 0x9890, 0xe9c0, 0x9891, 0x9892, 0x9893, /*0xd0-0xd7*/
+  0x9894, 0x9895, 0x9896, 0xbcf7, 0x9897, 0x9898, 0x9899, 0xe9c4, /*0xd8-0xdf*/
+  0xe9c6, 0x989a, 0x989b, 0x989c, 0x989d, 0x989e, 0x989f, 0x98a0, /*0xe0-0xe7*/
+  0x98a1, 0x98a2, 0x98a3, 0x98a4, 0x98a5, 0xe9ca, 0x98a6, 0x98a7, /*0xe8-0xef*/
+  0x98a8, 0x98a9, 0xe9ce, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, /*0xf0-0xf7*/
+  0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0xb2db, 0x98b4, 0xe9c8, /*0xf8-0xff*/
+  /* 0x6a00 */
+  0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, /*0x00-0x07*/
+  0x98bd, 0x98be, 0xb7ae, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, /*0x08-0x0f*/
+  0x98c4, 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0xe9cb, /*0x10-0x17*/
+  0xe9cc, 0x98cb, 0x98cc, 0x98cd, 0x98ce, 0x98cf, 0x98d0, 0xd5c1, /*0x18-0x1f*/
+  0x98d1, 0xc4a3, 0x98d2, 0x98d3, 0x98d4, 0x98d5, 0x98d6, 0x98d7, /*0x20-0x27*/
+  0xe9d8, 0x98d8, 0xbae1, 0x98d9, 0x98da, 0x98db, 0x98dc, 0xe9c9, /*0x28-0x2f*/
+  0x98dd, 0xd3a3, 0x98de, 0x98df, 0x98e0, 0xe9d4, 0x98e1, 0x98e2, /*0x30-0x37*/
+  0x98e3, 0x98e4, 0x98e5, 0x98e6, 0x98e7, 0xe9d7, 0xe9d0, 0x98e8, /*0x38-0x3f*/
+  0x98e9, 0x98ea, 0x98eb, 0x98ec, 0xe9cf, 0x98ed, 0x98ee, 0xc7c1, /*0x40-0x47*/
+  0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, /*0x48-0x4f*/
+  0xe9d2, 0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, /*0x50-0x57*/
+  0xe9d9, 0xb3c8, 0x98fe, 0xe9d3, 0x9940, 0x9941, 0x9942, 0x9943, /*0x58-0x5f*/
+  0x9944, 0xcff0, 0x9945, 0x9946, 0x9947, 0xe9cd, 0x9948, 0x9949, /*0x60-0x67*/
+  0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, /*0x68-0x6f*/
+  0x9952, 0xb3f7, 0x9953, 0x9954, 0x9955, 0x9956, 0x9957, 0x9958, /*0x70-0x77*/
+  0x9959, 0xe9d6, 0x995a, 0x995b, 0xe9da, 0x995c, 0x995d, 0x995e, /*0x78-0x7f*/
+  0xccb4, 0x995f, 0x9960, 0x9961, 0xcfad, 0x9962, 0x9963, 0x9964, /*0x80-0x87*/
+  0x9965, 0x9966, 0x9967, 0x9968, 0x9969, 0x996a, 0xe9d5, 0x996b, /*0x88-0x8f*/
+  0xe9dc, 0xe9db, 0x996c, 0x996d, 0x996e, 0x996f, 0x9970, 0xe9de, /*0x90-0x97*/
+  0x9971, 0x9972, 0x9973, 0x9974, 0x9975, 0x9976, 0x9977, 0x9978, /*0x98-0x9f*/
+  0xe9d1, 0x9979, 0x997a, 0x997b, 0x997c, 0x997d, 0x997e, 0x9980, /*0xa0-0xa7*/
+  0x9981, 0xe9dd, 0x9982, 0xe9df, 0xc3ca, 0x9983, 0x9984, 0x9985, /*0xa8-0xaf*/
+  0x9986, 0x9987, 0x9988, 0x9989, 0x998a, 0x998b, 0x998c, 0x998d, /*0xb0-0xb7*/
+  0x998e, 0x998f, 0x9990, 0x9991, 0x9992, 0x9993, 0x9994, 0x9995, /*0xb8-0xbf*/
+  0x9996, 0x9997, 0x9998, 0x9999, 0x999a, 0x999b, 0x999c, 0x999d, /*0xc0-0xc7*/
+  0x999e, 0x999f, 0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a5, /*0xc8-0xcf*/
+  0x99a6, 0x99a7, 0x99a8, 0x99a9, 0x99aa, 0x99ab, 0x99ac, 0x99ad, /*0xd0-0xd7*/
+  0x99ae, 0x99af, 0x99b0, 0x99b1, 0x99b2, 0x99b3, 0x99b4, 0x99b5, /*0xd8-0xdf*/
+  0x99b6, 0x99b7, 0x99b8, 0x99b9, 0x99ba, 0x99bb, 0x99bc, 0x99bd, /*0xe0-0xe7*/
+  0x99be, 0x99bf, 0x99c0, 0x99c1, 0x99c2, 0x99c3, 0x99c4, 0x99c5, /*0xe8-0xef*/
+  0x99c6, 0x99c7, 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, 0x99cd, /*0xf0-0xf7*/
+  0x99ce, 0x99cf, 0x99d0, 0x99d1, 0x99d2, 0x99d3, 0x99d4, 0x99d5, /*0xf8-0xff*/
+  /* 0x6b00 */
+  0x99d6, 0x99d7, 0x99d8, 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, /*0x00-0x07*/
+  0x99de, 0x99df, 0x99e0, 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, /*0x08-0x0f*/
+  0x99e6, 0x99e7, 0x99e8, 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, /*0x10-0x17*/
+  0x99ee, 0x99ef, 0x99f0, 0x99f1, 0x99f2, 0x99f3, 0x99f4, 0x99f5, /*0x18-0x1f*/
+  0xc7b7, 0xb4ce, 0xbbb6, 0xd0c0, 0xeca3, 0x99f6, 0x99f7, 0xc5b7, /*0x20-0x27*/
+  0x99f8, 0x99f9, 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x9a40, /*0x28-0x2f*/
+  0x9a41, 0x9a42, 0xd3fb, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0xeca4, /*0x30-0x37*/
+  0x9a47, 0xeca5, 0xc6db, 0x9a48, 0x9a49, 0x9a4a, 0xbfee, 0x9a4b, /*0x38-0x3f*/
+  0x9a4c, 0x9a4d, 0x9a4e, 0xeca6, 0x9a4f, 0x9a50, 0xeca7, 0xd0aa, /*0x40-0x47*/
+  0x9a51, 0xc7b8, 0x9a52, 0x9a53, 0xb8e8, 0x9a54, 0x9a55, 0x9a56, /*0x48-0x4f*/
+  0x9a57, 0x9a58, 0x9a59, 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, /*0x50-0x57*/
+  0x9a5f, 0xeca8, 0x9a60, 0x9a61, 0x9a62, 0x9a63, 0x9a64, 0x9a65, /*0x58-0x5f*/
+  0x9a66, 0x9a67, 0xd6b9, 0xd5fd, 0xb4cb, 0xb2bd, 0xcee4, 0xc6e7, /*0x60-0x67*/
+  0x9a68, 0x9a69, 0xcde1, 0x9a6a, 0x9a6b, 0x9a6c, 0x9a6d, 0x9a6e, /*0x68-0x6f*/
+  0x9a6f, 0x9a70, 0x9a71, 0x9a72, 0x9a73, 0x9a74, 0x9a75, 0x9a76, /*0x70-0x77*/
+  0x9a77, 0xb4f5, 0x9a78, 0xcbc0, 0xbcdf, 0x9a79, 0x9a7a, 0x9a7b, /*0x78-0x7f*/
+  0x9a7c, 0xe9e2, 0xe9e3, 0xd1ea, 0xe9e5, 0x9a7d, 0xb4f9, 0xe9e4, /*0x80-0x87*/
+  0x9a7e, 0xd1b3, 0xcae2, 0xb2d0, 0x9a80, 0xe9e8, 0x9a81, 0x9a82, /*0x88-0x8f*/
+  0x9a83, 0x9a84, 0xe9e6, 0xe9e7, 0x9a85, 0x9a86, 0xd6b3, 0x9a87, /*0x90-0x97*/
+  0x9a88, 0x9a89, 0xe9e9, 0xe9ea, 0x9a8a, 0x9a8b, 0x9a8c, 0x9a8d, /*0x98-0x9f*/
+  0x9a8e, 0xe9eb, 0x9a8f, 0x9a90, 0x9a91, 0x9a92, 0x9a93, 0x9a94, /*0xa0-0xa7*/
+  0x9a95, 0x9a96, 0xe9ec, 0x9a97, 0x9a98, 0x9a99, 0x9a9a, 0x9a9b, /*0xa8-0xaf*/
+  0x9a9c, 0x9a9d, 0x9a9e, 0xecaf, 0xc5b9, 0xb6ce, 0x9a9f, 0xd2f3, /*0xb0-0xb7*/
+  0x9aa0, 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4, 0x9aa5, 0x9aa6, 0xb5ee, /*0xb8-0xbf*/
+  0x9aa7, 0xbbd9, 0xecb1, 0x9aa8, 0x9aa9, 0xd2e3, 0x9aaa, 0x9aab, /*0xc0-0xc7*/
+  0x9aac, 0x9aad, 0x9aae, 0xcee3, 0x9aaf, 0xc4b8, 0x9ab0, 0xc3bf, /*0xc8-0xcf*/
+  0x9ab1, 0x9ab2, 0xb6be, 0xd8b9, 0xb1c8, 0xb1cf, 0xb1d1, 0xc5fe, /*0xd0-0xd7*/
+  0x9ab3, 0xb1d0, 0x9ab4, 0xc3ab, 0x9ab5, 0x9ab6, 0x9ab7, 0x9ab8, /*0xd8-0xdf*/
+  0x9ab9, 0xd5b1, 0x9aba, 0x9abb, 0x9abc, 0x9abd, 0x9abe, 0x9abf, /*0xe0-0xe7*/
+  0x9ac0, 0x9ac1, 0xeba4, 0xbac1, 0x9ac2, 0x9ac3, 0x9ac4, 0xccba, /*0xe8-0xef*/
+  0x9ac5, 0x9ac6, 0x9ac7, 0xeba5, 0x9ac8, 0xeba7, 0x9ac9, 0x9aca, /*0xf0-0xf7*/
+  0x9acb, 0xeba8, 0x9acc, 0x9acd, 0x9ace, 0xeba6, 0x9acf, 0x9ad0, /*0xf8-0xff*/
+  /* 0x6c00 */
+  0x9ad1, 0x9ad2, 0x9ad3, 0x9ad4, 0x9ad5, 0xeba9, 0xebab, 0xebaa, /*0x00-0x07*/
+  0x9ad6, 0x9ad7, 0x9ad8, 0x9ad9, 0x9ada, 0xebac, 0x9adb, 0xcacf, /*0x08-0x0f*/
+  0xd8b5, 0xc3f1, 0x9adc, 0xc3a5, 0xc6f8, 0xebad, 0xc4ca, 0x9add, /*0x10-0x17*/
+  0xebae, 0xebaf, 0xebb0, 0xb7d5, 0x9ade, 0x9adf, 0x9ae0, 0xb7fa, /*0x18-0x1f*/
+  0x9ae1, 0xebb1, 0xc7e2, 0x9ae2, 0xebb3, 0x9ae3, 0xbaa4, 0xd1f5, /*0x20-0x27*/
+  0xb0b1, 0xebb2, 0xebb4, 0x9ae4, 0x9ae5, 0x9ae6, 0xb5aa, 0xc2c8, /*0x28-0x2f*/
+  0xc7e8, 0x9ae7, 0xebb5, 0x9ae8, 0xcbae, 0xe3df, 0x9ae9, 0x9aea, /*0x30-0x37*/
+  0xd3c0, 0x9aeb, 0x9aec, 0x9aed, 0x9aee, 0xd9db, 0x9aef, 0x9af0, /*0x38-0x3f*/
+  0xcda1, 0xd6ad, 0xc7f3, 0x9af1, 0x9af2, 0x9af3, 0xd9e0, 0xbbe3, /*0x40-0x47*/
+  0x9af4, 0xbaba, 0xe3e2, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9af9, /*0x48-0x4f*/
+  0xcfab, 0x9afa, 0x9afb, 0x9afc, 0xe3e0, 0xc9c7, 0x9afd, 0xbab9, /*0x50-0x57*/
+  0x9afe, 0x9b40, 0x9b41, 0xd1b4, 0xe3e1, 0xc8ea, 0xb9af, 0xbdad, /*0x58-0x5f*/
+  0xb3d8, 0xcedb, 0x9b42, 0x9b43, 0xccc0, 0x9b44, 0x9b45, 0x9b46, /*0x60-0x67*/
+  0xe3e8, 0xe3e9, 0xcdf4, 0x9b47, 0x9b48, 0x9b49, 0x9b4a, 0x9b4b, /*0x68-0x6f*/
+  0xccad, 0x9b4c, 0xbcb3, 0x9b4d, 0xe3ea, 0x9b4e, 0xe3eb, 0x9b4f, /*0x70-0x77*/
+  0x9b50, 0xd0da, 0x9b51, 0x9b52, 0x9b53, 0xc6fb, 0xb7da, 0x9b54, /*0x78-0x7f*/
+  0x9b55, 0xc7df, 0xd2ca, 0xced6, 0x9b56, 0xe3e4, 0xe3ec, 0x9b57, /*0x80-0x87*/
+  0xc9f2, 0xb3c1, 0x9b58, 0x9b59, 0xe3e7, 0x9b5a, 0x9b5b, 0xc6e3, /*0x88-0x8f*/
+  0xe3e5, 0x9b5c, 0x9b5d, 0xedb3, 0xe3e6, 0x9b5e, 0x9b5f, 0x9b60, /*0x90-0x97*/
+  0x9b61, 0xc9b3, 0x9b62, 0xc5e6, 0x9b63, 0x9b64, 0x9b65, 0xb9b5, /*0x98-0x9f*/
+  0x9b66, 0xc3bb, 0x9b67, 0xe3e3, 0xc5bd, 0xc1a4, 0xc2d9, 0xb2d7, /*0xa0-0xa7*/
+  0x9b68, 0xe3ed, 0xbba6, 0xc4ad, 0x9b69, 0xe3f0, 0xbeda, 0x9b6a, /*0xa8-0xaf*/
+  0x9b6b, 0xe3fb, 0xe3f5, 0xbad3, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, /*0xb0-0xb7*/
+  0xb7d0, 0xd3cd, 0x9b70, 0xd6ce, 0xd5d3, 0xb9c1, 0xd5b4, 0xd1d8, /*0xb8-0xbf*/
+  0x9b71, 0x9b72, 0x9b73, 0x9b74, 0xd0b9, 0xc7f6, 0x9b75, 0x9b76, /*0xc0-0xc7*/
+  0x9b77, 0xc8aa, 0xb2b4, 0x9b78, 0xc3da, 0x9b79, 0x9b7a, 0x9b7b, /*0xc8-0xcf*/
+  0xe3ee, 0x9b7c, 0x9b7d, 0xe3fc, 0xe3ef, 0xb7a8, 0xe3f7, 0xe3f4, /*0xd0-0xd7*/
+  0x9b7e, 0x9b80, 0x9b81, 0xb7ba, 0x9b82, 0x9b83, 0xc5a2, 0x9b84, /*0xd8-0xdf*/
+  0xe3f6, 0xc5dd, 0xb2a8, 0xc6fc, 0x9b85, 0xc4e0, 0x9b86, 0x9b87, /*0xe0-0xe7*/
+  0xd7a2, 0x9b88, 0xc0e1, 0xe3f9, 0x9b89, 0x9b8a, 0xe3fa, 0xe3fd, /*0xe8-0xef*/
+  0xcca9, 0xe3f3, 0x9b8b, 0xd3be, 0x9b8c, 0xb1c3, 0xedb4, 0xe3f1, /*0xf0-0xf7*/
+  0xe3f2, 0x9b8d, 0xe3f8, 0xd0ba, 0xc6c3, 0xd4f3, 0xe3fe, 0x9b8e, /*0xf8-0xff*/
+  /* 0x6d00 */
+  0x9b8f, 0xbde0, 0x9b90, 0x9b91, 0xe4a7, 0x9b92, 0x9b93, 0xe4a6, /*0x00-0x07*/
+  0x9b94, 0x9b95, 0x9b96, 0xd1f3, 0xe4a3, 0x9b97, 0xe4a9, 0x9b98, /*0x08-0x0f*/
+  0x9b99, 0x9b9a, 0xc8f7, 0x9b9b, 0x9b9c, 0x9b9d, 0x9b9e, 0xcfb4, /*0x10-0x17*/
+  0x9b9f, 0xe4a8, 0xe4ae, 0xc2e5, 0x9ba0, 0x9ba1, 0xb6b4, 0x9ba2, /*0x18-0x1f*/
+  0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0xbdf2, 0x9ba8, 0xe4a2, /*0x20-0x27*/
+  0x9ba9, 0x9baa, 0xbae9, 0xe4aa, 0x9bab, 0x9bac, 0xe4ac, 0x9bad, /*0x28-0x2f*/
+  0x9bae, 0xb6fd, 0xd6de, 0xe4b2, 0x9baf, 0xe4ad, 0x9bb0, 0x9bb1, /*0x30-0x37*/
+  0x9bb2, 0xe4a1, 0x9bb3, 0xbbee, 0xcddd, 0xc7a2, 0xc5c9, 0x9bb4, /*0x38-0x3f*/
+  0x9bb5, 0xc1f7, 0x9bb6, 0xe4a4, 0x9bb7, 0xc7b3, 0xbdac, 0xbdbd, /*0x40-0x47*/
+  0xe4a5, 0x9bb8, 0xd7c7, 0xb2e2, 0x9bb9, 0xe4ab, 0xbcc3, 0xe4af, /*0x48-0x4f*/
+  0x9bba, 0xbbeb, 0xe4b0, 0xc5a8, 0xe4b1, 0x9bbb, 0x9bbc, 0x9bbd, /*0x50-0x57*/
+  0x9bbe, 0xd5e3, 0xbfa3, 0x9bbf, 0xe4ba, 0x9bc0, 0xe4b7, 0x9bc1, /*0x58-0x5f*/
+  0xe4bb, 0x9bc2, 0x9bc3, 0xe4bd, 0x9bc4, 0x9bc5, 0xc6d6, 0x9bc6, /*0x60-0x67*/
+  0x9bc7, 0xbac6, 0xc0cb, 0x9bc8, 0x9bc9, 0x9bca, 0xb8a1, 0xe4b4, /*0x68-0x6f*/
+  0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0xd4a1, 0x9bcf, 0x9bd0, 0xbaa3, /*0x70-0x77*/
+  0xbdfe, 0x9bd1, 0x9bd2, 0x9bd3, 0xe4bc, 0x9bd4, 0x9bd5, 0x9bd6, /*0x78-0x7f*/
+  0x9bd7, 0x9bd8, 0xcdbf, 0x9bd9, 0x9bda, 0xc4f9, 0x9bdb, 0x9bdc, /*0x80-0x87*/
+  0xcffb, 0xc9e6, 0x9bdd, 0x9bde, 0xd3bf, 0x9bdf, 0xcfd1, 0x9be0, /*0x88-0x8f*/
+  0x9be1, 0xe4b3, 0x9be2, 0xe4b8, 0xe4b9, 0xcce9, 0x9be3, 0x9be4, /*0x90-0x97*/
+  0x9be5, 0x9be6, 0x9be7, 0xccce, 0x9be8, 0xc0d4, 0xe4b5, 0xc1b0, /*0x98-0x9f*/
+  0xe4b6, 0xced0, 0x9be9, 0xbbc1, 0xb5d3, 0x9bea, 0xc8f3, 0xbda7, /*0xa0-0xa7*/
+  0xd5c7, 0xc9ac, 0xb8a2, 0xe4ca, 0x9beb, 0x9bec, 0xe4cc, 0xd1c4, /*0xa8-0xaf*/
+  0x9bed, 0x9bee, 0xd2ba, 0x9bef, 0x9bf0, 0xbaad, 0x9bf1, 0x9bf2, /*0xb0-0xb7*/
+  0xbad4, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, 0x9bf8, 0xe4c3, /*0xb8-0xbf*/
+  0xb5ed, 0x9bf9, 0x9bfa, 0x9bfb, 0xd7cd, 0xe4c0, 0xcffd, 0xe4bf, /*0xc0-0xc7*/
+  0x9bfc, 0x9bfd, 0x9bfe, 0xc1dc, 0xccca, 0x9c40, 0x9c41, 0x9c42, /*0xc8-0xcf*/
+  0x9c43, 0xcae7, 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0xc4d7, 0x9c48, /*0xd0-0xd7*/
+  0xccd4, 0xe4c8, 0x9c49, 0x9c4a, 0x9c4b, 0xe4c7, 0xe4c1, 0x9c4c, /*0xd8-0xdf*/
+  0xe4c4, 0xb5ad, 0x9c4d, 0x9c4e, 0xd3d9, 0x9c4f, 0xe4c6, 0x9c50, /*0xe0-0xe7*/
+  0x9c51, 0x9c52, 0x9c53, 0xd2f9, 0xb4e3, 0x9c54, 0xbbb4, 0x9c55, /*0xe8-0xef*/
+  0x9c56, 0xc9ee, 0x9c57, 0xb4be, 0x9c58, 0x9c59, 0x9c5a, 0xbbec, /*0xf0-0xf7*/
+  0x9c5b, 0xd1cd, 0x9c5c, 0xcced, 0xedb5, 0x9c5d, 0x9c5e, 0x9c5f, /*0xf8-0xff*/
+  /* 0x6e00 */
+  0x9c60, 0x9c61, 0x9c62, 0x9c63, 0x9c64, 0xc7e5, 0x9c65, 0x9c66, /*0x00-0x07*/
+  0x9c67, 0x9c68, 0xd4a8, 0x9c69, 0xe4cb, 0xd7d5, 0xe4c2, 0x9c6a, /*0x08-0x0f*/
+  0xbda5, 0xe4c5, 0x9c6b, 0x9c6c, 0xd3e6, 0x9c6d, 0xe4c9, 0xc9f8, /*0x10-0x17*/
+  0x9c6e, 0x9c6f, 0xe4be, 0x9c70, 0x9c71, 0xd3e5, 0x9c72, 0x9c73, /*0x18-0x1f*/
+  0xc7fe, 0xb6c9, 0x9c74, 0xd4fc, 0xb2b3, 0xe4d7, 0x9c75, 0x9c76, /*0x20-0x27*/
+  0x9c77, 0xcec2, 0x9c78, 0xe4cd, 0x9c79, 0xcebc, 0x9c7a, 0xb8db, /*0x28-0x2f*/
+  0x9c7b, 0x9c7c, 0xe4d6, 0x9c7d, 0xbfca, 0x9c7e, 0x9c80, 0x9c81, /*0x30-0x37*/
+  0xd3ce, 0x9c82, 0xc3ec, 0x9c83, 0x9c84, 0x9c85, 0x9c86, 0x9c87, /*0x38-0x3f*/
+  0x9c88, 0x9c89, 0x9c8a, 0xc5c8, 0xe4d8, 0x9c8b, 0x9c8c, 0x9c8d, /*0x40-0x47*/
+  0x9c8e, 0x9c8f, 0x9c90, 0x9c91, 0x9c92, 0xcdc4, 0xe4cf, 0x9c93, /*0x48-0x4f*/
+  0x9c94, 0x9c95, 0x9c96, 0xe4d4, 0xe4d5, 0x9c97, 0xbafe, 0x9c98, /*0x50-0x57*/
+  0xcfe6, 0x9c99, 0x9c9a, 0xd5bf, 0x9c9b, 0x9c9c, 0x9c9d, 0xe4d2, /*0x58-0x5f*/
+  0x9c9e, 0x9c9f, 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca4, 0x9ca5, /*0x60-0x67*/
+  0x9ca6, 0x9ca7, 0x9ca8, 0xe4d0, 0x9ca9, 0x9caa, 0xe4ce, 0x9cab, /*0x68-0x6f*/
+  0x9cac, 0x9cad, 0x9cae, 0x9caf, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3, /*0x70-0x77*/
+  0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cb8, 0x9cb9, 0xcde5, 0xcaaa, /*0x78-0x7f*/
+  0x9cba, 0x9cbb, 0x9cbc, 0xc0a3, 0x9cbd, 0xbda6, 0xe4d3, 0x9cbe, /*0x80-0x87*/
+  0x9cbf, 0xb8c8, 0x9cc0, 0x9cc1, 0x9cc2, 0x9cc3, 0x9cc4, 0xe4e7, /*0x88-0x8f*/
+  0xd4b4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cc8, 0x9cc9, 0x9cca, 0x9ccb, /*0x90-0x97*/
+  0xe4db, 0x9ccc, 0x9ccd, 0x9cce, 0xc1ef, 0x9ccf, 0x9cd0, 0xe4e9, /*0x98-0x9f*/
+  0x9cd1, 0x9cd2, 0xd2e7, 0x9cd3, 0x9cd4, 0xe4df, 0x9cd5, 0xe4e0, /*0xa0-0xa7*/
+  0x9cd6, 0x9cd7, 0xcfaa, 0x9cd8, 0x9cd9, 0x9cda, 0x9cdb, 0xcbdd, /*0xa8-0xaf*/
+  0x9cdc, 0xe4da, 0xe4d1, 0x9cdd, 0xe4e5, 0x9cde, 0xc8dc, 0xe4e3, /*0xb0-0xb7*/
+  0x9cdf, 0x9ce0, 0xc4e7, 0xe4e2, 0x9ce1, 0xe4e1, 0x9ce2, 0x9ce3, /*0xb8-0xbf*/
+  0x9ce4, 0xb3fc, 0xe4e8, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0xb5e1, /*0xc0-0xc7*/
+  0x9ce9, 0x9cea, 0x9ceb, 0xd7cc, 0x9cec, 0x9ced, 0x9cee, 0xe4e6, /*0xc8-0xcf*/
+  0x9cef, 0xbbac, 0x9cf0, 0xd7d2, 0xcccf, 0xebf8, 0x9cf1, 0xe4e4, /*0xd0-0xd7*/
+  0x9cf2, 0x9cf3, 0xb9f6, 0x9cf4, 0x9cf5, 0x9cf6, 0xd6cd, 0xe4d9, /*0xd8-0xdf*/
+  0xe4dc, 0xc2fa, 0xe4de, 0x9cf7, 0xc2cb, 0xc0c4, 0xc2d0, 0x9cf8, /*0xe0-0xe7*/
+  0xb1f5, 0xccb2, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, /*0xe8-0xef*/
+  0x9d40, 0x9d41, 0x9d42, 0x9d43, 0xb5ce, 0x9d44, 0x9d45, 0x9d46, /*0xf0-0xf7*/
+  0x9d47, 0xe4ef, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, /*0xf8-0xff*/
+  /* 0x6f00 */
+  0x9d4e, 0x9d4f, 0xc6af, 0x9d50, 0x9d51, 0x9d52, 0xc6e1, 0x9d53, /*0x00-0x07*/
+  0x9d54, 0xe4f5, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0xc2a9, /*0x08-0x0f*/
+  0x9d5a, 0x9d5b, 0x9d5c, 0xc0ec, 0xd1dd, 0xe4ee, 0x9d5d, 0x9d5e, /*0x10-0x17*/
+  0x9d5f, 0x9d60, 0x9d61, 0x9d62, 0x9d63, 0x9d64, 0x9d65, 0x9d66, /*0x18-0x1f*/
+  0xc4ae, 0x9d67, 0x9d68, 0x9d69, 0xe4ed, 0x9d6a, 0x9d6b, 0x9d6c, /*0x20-0x27*/
+  0x9d6d, 0xe4f6, 0xe4f4, 0xc2fe, 0x9d6e, 0xe4dd, 0x9d6f, 0xe4f0, /*0x28-0x2f*/
+  0x9d70, 0xcafe, 0x9d71, 0xd5c4, 0x9d72, 0x9d73, 0xe4f1, 0x9d74, /*0x30-0x37*/
+  0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0xd1fa, 0x9d7b, /*0x38-0x3f*/
+  0x9d7c, 0x9d7d, 0x9d7e, 0x9d80, 0x9d81, 0x9d82, 0xe4eb, 0xe4ec, /*0x40-0x47*/
+  0x9d83, 0x9d84, 0x9d85, 0xe4f2, 0x9d86, 0xceab, 0x9d87, 0x9d88, /*0x48-0x4f*/
+  0x9d89, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, /*0x50-0x57*/
+  0xc5cb, 0x9d91, 0x9d92, 0x9d93, 0xc7b1, 0x9d94, 0xc2ba, 0x9d95, /*0x58-0x5f*/
+  0x9d96, 0x9d97, 0xe4ea, 0x9d98, 0x9d99, 0x9d9a, 0xc1ca, 0x9d9b, /*0x60-0x67*/
+  0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0xccb6, 0xb3b1, 0x9da1, /*0x68-0x6f*/
+  0x9da2, 0x9da3, 0xe4fb, 0x9da4, 0xe4f3, 0x9da5, 0x9da6, 0x9da7, /*0x70-0x77*/
+  0xe4fa, 0x9da8, 0xe4fd, 0x9da9, 0xe4fc, 0x9daa, 0x9dab, 0x9dac, /*0x78-0x7f*/
+  0x9dad, 0x9dae, 0x9daf, 0x9db0, 0xb3ce, 0x9db1, 0x9db2, 0x9db3, /*0x80-0x87*/
+  0xb3ba, 0xe4f7, 0x9db4, 0x9db5, 0xe4f9, 0xe4f8, 0xc5ec, 0x9db6, /*0x88-0x8f*/
+  0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, /*0x90-0x97*/
+  0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, 0xc0bd, 0x9dc3, 0x9dc4, 0x9dc5, /*0x98-0x9f*/
+  0x9dc6, 0xd4e8, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0xe5a2, /*0xa0-0xa7*/
+  0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, /*0xa8-0xaf*/
+  0x9dd4, 0x9dd5, 0x9dd6, 0xb0c4, 0x9dd7, 0x9dd8, 0xe5a4, 0x9dd9, /*0xb0-0xb7*/
+  0x9dda, 0xe5a3, 0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, 0x9de0, /*0xb8-0xbf*/
+  0xbca4, 0x9de1, 0xe5a5, 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, /*0xc0-0xc7*/
+  0x9de7, 0xe5a1, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded, /*0xc8-0xcf*/
+  0x9dee, 0xe4fe, 0xb1f4, 0x9def, 0x9df0, 0x9df1, 0x9df2, 0x9df3, /*0xd0-0xd7*/
+  0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0xe5a8, 0x9dfa, /*0xd8-0xdf*/
+  0xe5a9, 0xe5a6, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9e40, 0x9e41, /*0xe0-0xe7*/
+  0x9e42, 0x9e43, 0x9e44, 0x9e45, 0x9e46, 0x9e47, 0xe5a7, 0xe5aa, /*0xe8-0xef*/
+  0x9e48, 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e, 0x9e4f, /*0xf0-0xf7*/
+  0x9e50, 0x9e51, 0x9e52, 0x9e53, 0x9e54, 0x9e55, 0x9e56, 0x9e57, /*0xf8-0xff*/
+  /* 0x7000 */
+  0x9e58, 0x9e59, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5d, 0x9e5e, 0x9e5f, /*0x00-0x07*/
+  0x9e60, 0x9e61, 0x9e62, 0x9e63, 0x9e64, 0x9e65, 0x9e66, 0x9e67, /*0x08-0x0f*/
+  0x9e68, 0xc6d9, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e6d, 0x9e6e, /*0x10-0x17*/
+  0x9e6f, 0x9e70, 0xe5ab, 0xe5ad, 0x9e71, 0x9e72, 0x9e73, 0x9e74, /*0x18-0x1f*/
+  0x9e75, 0x9e76, 0x9e77, 0xe5ac, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, /*0x20-0x27*/
+  0x9e7c, 0x9e7d, 0x9e7e, 0x9e80, 0x9e81, 0x9e82, 0x9e83, 0x9e84, /*0x28-0x2f*/
+  0x9e85, 0x9e86, 0x9e87, 0x9e88, 0x9e89, 0xe5af, 0x9e8a, 0x9e8b, /*0x30-0x37*/
+  0x9e8c, 0xe5ae, 0x9e8d, 0x9e8e, 0x9e8f, 0x9e90, 0x9e91, 0x9e92, /*0x38-0x3f*/
+  0x9e93, 0x9e94, 0x9e95, 0x9e96, 0x9e97, 0x9e98, 0x9e99, 0x9e9a, /*0x40-0x47*/
+  0x9e9b, 0x9e9c, 0x9e9d, 0x9e9e, 0xb9e0, 0x9e9f, 0x9ea0, 0xe5b0, /*0x48-0x4f*/
+  0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea6, 0x9ea7, 0x9ea8, /*0x50-0x57*/
+  0x9ea9, 0x9eaa, 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0xe5b1, 0x9eaf, /*0x58-0x5f*/
+  0x9eb0, 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb4, 0x9eb5, 0x9eb6, 0x9eb7, /*0x60-0x67*/
+  0x9eb8, 0x9eb9, 0x9eba, 0xbbf0, 0xece1, 0xc3f0, 0x9ebb, 0xb5c6, /*0x68-0x6f*/
+  0xbbd2, 0x9ebc, 0x9ebd, 0x9ebe, 0x9ebf, 0xc1e9, 0xd4ee, 0x9ec0, /*0x70-0x77*/
+  0xbec4, 0x9ec1, 0x9ec2, 0x9ec3, 0xd7c6, 0x9ec4, 0xd4d6, 0xb2d3, /*0x78-0x7f*/
+  0xecbe, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, 0xeac1, 0x9ec9, 0x9eca, /*0x80-0x87*/
+  0x9ecb, 0xc2af, 0xb4b6, 0x9ecc, 0x9ecd, 0x9ece, 0xd1d7, 0x9ecf, /*0x88-0x8f*/
+  0x9ed0, 0x9ed1, 0xb3b4, 0x9ed2, 0xc8b2, 0xbfbb, 0xecc0, 0x9ed3, /*0x90-0x97*/
+  0x9ed4, 0xd6cb, 0x9ed5, 0x9ed6, 0xecbf, 0xecc1, 0x9ed7, 0x9ed8, /*0x98-0x9f*/
+  0x9ed9, 0x9eda, 0x9edb, 0x9edc, 0x9edd, 0x9ede, 0x9edf, 0x9ee0, /*0xa0-0xa7*/
+  0x9ee1, 0x9ee2, 0x9ee3, 0xecc5, 0xbee6, 0xccbf, 0xc5da, 0xbebc, /*0xa8-0xaf*/
+  0x9ee4, 0xecc6, 0x9ee5, 0xb1fe, 0x9ee6, 0x9ee7, 0x9ee8, 0xecc4, /*0xb0-0xb7*/
+  0xd5a8, 0xb5e3, 0x9ee9, 0xecc2, 0xc1b6, 0xb3e3, 0x9eea, 0x9eeb, /*0xb8-0xbf*/
+  0xecc3, 0xcbb8, 0xc0c3, 0xccfe, 0x9eec, 0x9eed, 0x9eee, 0x9eef, /*0xc0-0xc7*/
+  0xc1d2, 0x9ef0, 0xecc8, 0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, /*0xc8-0xcf*/
+  0x9ef6, 0x9ef7, 0x9ef8, 0x9ef9, 0x9efa, 0x9efb, 0x9efc, 0x9efd, /*0xd0-0xd7*/
+  0xbae6, 0xc0d3, 0x9efe, 0xd6f2, 0x9f40, 0x9f41, 0x9f42, 0xd1cc, /*0xd8-0xdf*/
+  0x9f43, 0x9f44, 0x9f45, 0x9f46, 0xbfbe, 0x9f47, 0xb7b3, 0xc9d5, /*0xe0-0xe7*/
+  0xecc7, 0xbbe2, 0x9f48, 0xcccc, 0xbdfd, 0xc8c8, 0x9f49, 0xcfa9, /*0xe8-0xef*/
+  0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f50, 0xcde9, /*0xf0-0xf7*/
+  0x9f51, 0xc5eb, 0x9f52, 0x9f53, 0x9f54, 0xb7e9, 0x9f55, 0x9f56, /*0xf8-0xff*/
+  /* 0x7100 */
+  0x9f57, 0x9f58, 0x9f59, 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, /*0x00-0x07*/
+  0x9f5f, 0xd1c9, 0xbab8, 0x9f60, 0x9f61, 0x9f62, 0x9f63, 0x9f64, /*0x08-0x0f*/
+  0xecc9, 0x9f65, 0x9f66, 0xecca, 0x9f67, 0xbbc0, 0xeccb, 0x9f68, /*0x10-0x17*/
+  0xece2, 0xb1ba, 0xb7d9, 0x9f69, 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, /*0x18-0x1f*/
+  0x9f6e, 0x9f6f, 0x9f70, 0x9f71, 0x9f72, 0x9f73, 0xbdb9, 0x9f74, /*0x20-0x27*/
+  0x9f75, 0x9f76, 0x9f77, 0x9f78, 0x9f79, 0x9f7a, 0x9f7b, 0xeccc, /*0x28-0x2f*/
+  0xd1e6, 0xeccd, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f80, 0xc8bb, 0x9f81, /*0x30-0x37*/
+  0x9f82, 0x9f83, 0x9f84, 0x9f85, 0x9f86, 0x9f87, 0x9f88, 0x9f89, /*0x38-0x3f*/
+  0x9f8a, 0x9f8b, 0x9f8c, 0x9f8d, 0x9f8e, 0xecd1, 0x9f8f, 0x9f90, /*0x40-0x47*/
+  0x9f91, 0x9f92, 0xecd3, 0x9f93, 0xbbcd, 0x9f94, 0xbce5, 0x9f95, /*0x48-0x4f*/
+  0x9f96, 0x9f97, 0x9f98, 0x9f99, 0x9f9a, 0x9f9b, 0x9f9c, 0x9f9d, /*0x50-0x57*/
+  0x9f9e, 0x9f9f, 0x9fa0, 0x9fa1, 0xeccf, 0x9fa2, 0xc9b7, 0x9fa3, /*0x58-0x5f*/
+  0x9fa4, 0x9fa5, 0x9fa6, 0x9fa7, 0xc3ba, 0x9fa8, 0xece3, 0xd5d5, /*0x60-0x67*/
+  0xecd0, 0x9fa9, 0x9faa, 0x9fab, 0x9fac, 0x9fad, 0xd6f3, 0x9fae, /*0x68-0x6f*/
+  0x9faf, 0x9fb0, 0xecd2, 0xecce, 0x9fb1, 0x9fb2, 0x9fb3, 0x9fb4, /*0x70-0x77*/
+  0xecd4, 0x9fb5, 0xecd5, 0x9fb6, 0x9fb7, 0xc9bf, 0x9fb8, 0x9fb9, /*0x78-0x7f*/
+  0x9fba, 0x9fbb, 0x9fbc, 0x9fbd, 0xcfa8, 0x9fbe, 0x9fbf, 0x9fc0, /*0x80-0x87*/
+  0x9fc1, 0x9fc2, 0xd0dc, 0x9fc3, 0x9fc4, 0x9fc5, 0x9fc6, 0xd1ac, /*0x88-0x8f*/
+  0x9fc7, 0x9fc8, 0x9fc9, 0x9fca, 0xc8db, 0x9fcb, 0x9fcc, 0x9fcd, /*0x90-0x97*/
+  0xecd6, 0xcef5, 0x9fce, 0x9fcf, 0x9fd0, 0x9fd1, 0x9fd2, 0xcaec, /*0x98-0x9f*/
+  0xecda, 0x9fd3, 0x9fd4, 0x9fd5, 0x9fd6, 0x9fd7, 0x9fd8, 0x9fd9, /*0xa0-0xa7*/
+  0xecd9, 0x9fda, 0x9fdb, 0x9fdc, 0xb0be, 0x9fdd, 0x9fde, 0x9fdf, /*0xa8-0xaf*/
+  0x9fe0, 0x9fe1, 0x9fe2, 0xecd7, 0x9fe3, 0xecd8, 0x9fe4, 0x9fe5, /*0xb0-0xb7*/
+  0x9fe6, 0xece4, 0x9fe7, 0x9fe8, 0x9fe9, 0x9fea, 0x9feb, 0x9fec, /*0xb8-0xbf*/
+  0x9fed, 0x9fee, 0x9fef, 0xc8bc, 0x9ff0, 0x9ff1, 0x9ff2, 0x9ff3, /*0xc0-0xc7*/
+  0x9ff4, 0x9ff5, 0x9ff6, 0x9ff7, 0x9ff8, 0x9ff9, 0xc1c7, 0x9ffa, /*0xc8-0xcf*/
+  0x9ffb, 0x9ffc, 0x9ffd, 0x9ffe, 0xecdc, 0xd1e0, 0xa040, 0xa041, /*0xd0-0xd7*/
+  0xa042, 0xa043, 0xa044, 0xa045, 0xa046, 0xa047, 0xa048, 0xa049, /*0xd8-0xdf*/
+  0xecdb, 0xa04a, 0xa04b, 0xa04c, 0xa04d, 0xd4ef, 0xa04e, 0xecdd, /*0xe0-0xe7*/
+  0xa04f, 0xa050, 0xa051, 0xa052, 0xa053, 0xa054, 0xdbc6, 0xa055, /*0xe8-0xef*/
+  0xa056, 0xa057, 0xa058, 0xa059, 0xa05a, 0xa05b, 0xa05c, 0xa05d, /*0xf0-0xf7*/
+  0xa05e, 0xecde, 0xa05f, 0xa060, 0xa061, 0xa062, 0xa063, 0xa064, /*0xf8-0xff*/
+  /* 0x7200 */
+  0xa065, 0xa066, 0xa067, 0xa068, 0xa069, 0xa06a, 0xb1ac, 0xa06b, /*0x00-0x07*/
+  0xa06c, 0xa06d, 0xa06e, 0xa06f, 0xa070, 0xa071, 0xa072, 0xa073, /*0x08-0x0f*/
+  0xa074, 0xa075, 0xa076, 0xa077, 0xa078, 0xa079, 0xa07a, 0xa07b, /*0x10-0x17*/
+  0xa07c, 0xa07d, 0xa07e, 0xa080, 0xa081, 0xecdf, 0xa082, 0xa083, /*0x18-0x1f*/
+  0xa084, 0xa085, 0xa086, 0xa087, 0xa088, 0xa089, 0xa08a, 0xa08b, /*0x20-0x27*/
+  0xece0, 0xa08c, 0xd7a6, 0xa08d, 0xc5c0, 0xa08e, 0xa08f, 0xa090, /*0x28-0x2f*/
+  0xebbc, 0xb0ae, 0xa091, 0xa092, 0xa093, 0xbef4, 0xb8b8, 0xd2af, /*0x30-0x37*/
+  0xb0d6, 0xb5f9, 0xa094, 0xd8b3, 0xa095, 0xcbac, 0xa096, 0xe3dd, /*0x38-0x3f*/
+  0xa097, 0xa098, 0xa099, 0xa09a, 0xa09b, 0xa09c, 0xa09d, 0xc6ac, /*0x40-0x47*/
+  0xb0e6, 0xa09e, 0xa09f, 0xa0a0, 0xc5c6, 0xebb9, 0xa0a1, 0xa0a2, /*0x48-0x4f*/
+  0xa0a3, 0xa0a4, 0xebba, 0xa0a5, 0xa0a6, 0xa0a7, 0xebbb, 0xa0a8, /*0x50-0x57*/
+  0xa0a9, 0xd1c0, 0xa0aa, 0xc5a3, 0xa0ab, 0xeaf2, 0xa0ac, 0xc4b2, /*0x58-0x5f*/
+  0xa0ad, 0xc4b5, 0xc0ce, 0xa0ae, 0xa0af, 0xa0b0, 0xeaf3, 0xc4c1, /*0x60-0x67*/
+  0xa0b1, 0xceef, 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xeaf0, 0xeaf4, /*0x68-0x6f*/
+  0xa0b6, 0xa0b7, 0xc9fc, 0xa0b8, 0xa0b9, 0xc7a3, 0xa0ba, 0xa0bb, /*0x70-0x77*/
+  0xa0bc, 0xccd8, 0xcefe, 0xa0bd, 0xa0be, 0xa0bf, 0xeaf5, 0xeaf6, /*0x78-0x7f*/
+  0xcfac, 0xc0e7, 0xa0c0, 0xa0c1, 0xeaf7, 0xa0c2, 0xa0c3, 0xa0c4, /*0x80-0x87*/
+  0xa0c5, 0xa0c6, 0xb6bf, 0xeaf8, 0xa0c7, 0xeaf9, 0xa0c8, 0xeafa, /*0x88-0x8f*/
+  0xa0c9, 0xa0ca, 0xeafb, 0xa0cb, 0xa0cc, 0xa0cd, 0xa0ce, 0xa0cf, /*0x90-0x97*/
+  0xa0d0, 0xa0d1, 0xa0d2, 0xa0d3, 0xa0d4, 0xa0d5, 0xa0d6, 0xeaf1, /*0x98-0x9f*/
+  0xa0d7, 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, 0xa0de, /*0xa0-0xa7*/
+  0xa0df, 0xa0e0, 0xa0e1, 0xa0e2, 0xc8ae, 0xe1eb, 0xa0e3, 0xb7b8, /*0xa8-0xaf*/
+  0xe1ec, 0xa0e4, 0xa0e5, 0xa0e6, 0xe1ed, 0xa0e7, 0xd7b4, 0xe1ee, /*0xb0-0xb7*/
+  0xe1ef, 0xd3cc, 0xa0e8, 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, /*0xb8-0xbf*/
+  0xa0ee, 0xe1f1, 0xbff1, 0xe1f0, 0xb5d2, 0xa0ef, 0xa0f0, 0xa0f1, /*0xc0-0xc7*/
+  0xb1b7, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f5, 0xe1f3, 0xe1f2, 0xa0f6, /*0xc8-0xcf*/
+  0xbafc, 0xa0f7, 0xe1f4, 0xa0f8, 0xa0f9, 0xa0fa, 0xa0fb, 0xb9b7, /*0xd0-0xd7*/
+  0xa0fc, 0xbed1, 0xa0fd, 0xa0fe, 0xaa40, 0xaa41, 0xc4fc, 0xaa42, /*0xd8-0xdf*/
+  0xbadd, 0xbdc6, 0xaa43, 0xaa44, 0xaa45, 0xaa46, 0xaa47, 0xaa48, /*0xe0-0xe7*/
+  0xe1f5, 0xe1f7, 0xaa49, 0xaa4a, 0xb6c0, 0xcfc1, 0xcaa8, 0xe1f6, /*0xe8-0xef*/
+  0xd5f8, 0xd3fc, 0xe1f8, 0xe1fc, 0xe1f9, 0xaa4b, 0xaa4c, 0xe1fa, /*0xf0-0xf7*/
+  0xc0ea, 0xaa4d, 0xe1fe, 0xe2a1, 0xc0c7, 0xaa4e, 0xaa4f, 0xaa50, /*0xf8-0xff*/
+  /* 0x7300 */
+  0xaa51, 0xe1fb, 0xaa52, 0xe1fd, 0xaa53, 0xaa54, 0xaa55, 0xaa56, /*0x00-0x07*/
+  0xaa57, 0xaa58, 0xe2a5, 0xaa59, 0xaa5a, 0xaa5b, 0xc1d4, 0xaa5c, /*0x08-0x0f*/
+  0xaa5d, 0xaa5e, 0xaa5f, 0xe2a3, 0xaa60, 0xe2a8, 0xb2fe, 0xe2a2, /*0x10-0x17*/
+  0xaa61, 0xaa62, 0xaa63, 0xc3cd, 0xb2c2, 0xe2a7, 0xe2a6, 0xaa64, /*0x18-0x1f*/
+  0xaa65, 0xe2a4, 0xe2a9, 0xaa66, 0xaa67, 0xe2ab, 0xaa68, 0xaa69, /*0x20-0x27*/
+  0xaa6a, 0xd0c9, 0xd6ed, 0xc3a8, 0xe2ac, 0xaa6b, 0xcfd7, 0xaa6c, /*0x28-0x2f*/
+  0xaa6d, 0xe2ae, 0xaa6e, 0xaa6f, 0xbaef, 0xaa70, 0xaa71, 0xe9e0, /*0x30-0x37*/
+  0xe2ad, 0xe2aa, 0xaa72, 0xaa73, 0xaa74, 0xaa75, 0xbbab, 0xd4b3, /*0x38-0x3f*/
+  0xaa76, 0xaa77, 0xaa78, 0xaa79, 0xaa7a, 0xaa7b, 0xaa7c, 0xaa7d, /*0x40-0x47*/
+  0xaa7e, 0xaa80, 0xaa81, 0xaa82, 0xaa83, 0xe2b0, 0xaa84, 0xaa85, /*0x48-0x4f*/
+  0xe2af, 0xaa86, 0xe9e1, 0xaa87, 0xaa88, 0xaa89, 0xaa8a, 0xe2b1, /*0x50-0x57*/
+  0xaa8b, 0xaa8c, 0xaa8d, 0xaa8e, 0xaa8f, 0xaa90, 0xaa91, 0xaa92, /*0x58-0x5f*/
+  0xe2b2, 0xaa93, 0xaa94, 0xaa95, 0xaa96, 0xaa97, 0xaa98, 0xaa99, /*0x60-0x67*/
+  0xaa9a, 0xaa9b, 0xaa9c, 0xaa9d, 0xe2b3, 0xcca1, 0xaa9e, 0xe2b4, /*0x68-0x6f*/
+  0xaa9f, 0xaaa0, 0xab40, 0xab41, 0xab42, 0xab43, 0xab44, 0xab45, /*0x70-0x77*/
+  0xab46, 0xab47, 0xab48, 0xab49, 0xab4a, 0xab4b, 0xe2b5, 0xab4c, /*0x78-0x7f*/
+  0xab4d, 0xab4e, 0xab4f, 0xab50, 0xd0fe, 0xab51, 0xab52, 0xc2ca, /*0x80-0x87*/
+  0xab53, 0xd3f1, 0xab54, 0xcdf5, 0xab55, 0xab56, 0xe7e0, 0xab57, /*0x88-0x8f*/
+  0xab58, 0xe7e1, 0xab59, 0xab5a, 0xab5b, 0xab5c, 0xbec1, 0xab5d, /*0x90-0x97*/
+  0xab5e, 0xab5f, 0xab60, 0xc2ea, 0xab61, 0xab62, 0xab63, 0xe7e4, /*0x98-0x9f*/
+  0xab64, 0xab65, 0xe7e3, 0xab66, 0xab67, 0xab68, 0xab69, 0xab6a, /*0xa0-0xa7*/
+  0xab6b, 0xcde6, 0xab6c, 0xc3b5, 0xab6d, 0xab6e, 0xe7e2, 0xbbb7, /*0xa8-0xaf*/
+  0xcfd6, 0xab6f, 0xc1e1, 0xe7e9, 0xab70, 0xab71, 0xab72, 0xe7e8, /*0xb0-0xb7*/
+  0xab73, 0xab74, 0xe7f4, 0xb2a3, 0xab75, 0xab76, 0xab77, 0xab78, /*0xb8-0xbf*/
+  0xe7ea, 0xab79, 0xe7e6, 0xab7a, 0xab7b, 0xab7c, 0xab7d, 0xab7e, /*0xc0-0xc7*/
+  0xe7ec, 0xe7eb, 0xc9ba, 0xab80, 0xab81, 0xd5e4, 0xab82, 0xe7e5, /*0xc8-0xcf*/
+  0xb7a9, 0xe7e7, 0xab83, 0xab84, 0xab85, 0xab86, 0xab87, 0xab88, /*0xd0-0xd7*/
+  0xab89, 0xe7ee, 0xab8a, 0xab8b, 0xab8c, 0xab8d, 0xe7f3, 0xab8e, /*0xd8-0xdf*/
+  0xd6e9, 0xab8f, 0xab90, 0xab91, 0xab92, 0xe7ed, 0xab93, 0xe7f2, /*0xe0-0xe7*/
+  0xab94, 0xe7f1, 0xab95, 0xab96, 0xab97, 0xb0e0, 0xab98, 0xab99, /*0xe8-0xef*/
+  0xab9a, 0xab9b, 0xe7f5, 0xab9c, 0xab9d, 0xab9e, 0xab9f, 0xaba0, /*0xf0-0xf7*/
+  0xac40, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47, /*0xf8-0xff*/
+  /* 0x7400 */
+  0xac48, 0xac49, 0xac4a, 0xc7f2, 0xac4b, 0xc0c5, 0xc0ed, 0xac4c, /*0x00-0x07*/
+  0xac4d, 0xc1f0, 0xe7f0, 0xac4e, 0xac4f, 0xac50, 0xac51, 0xe7f6, /*0x08-0x0f*/
+  0xcbf6, 0xac52, 0xac53, 0xac54, 0xac55, 0xac56, 0xac57, 0xac58, /*0x10-0x17*/
+  0xac59, 0xac5a, 0xe8a2, 0xe8a1, 0xac5b, 0xac5c, 0xac5d, 0xac5e, /*0x18-0x1f*/
+  0xac5f, 0xac60, 0xd7c1, 0xac61, 0xac62, 0xe7fa, 0xe7f9, 0xac63, /*0x20-0x27*/
+  0xe7fb, 0xac64, 0xe7f7, 0xac65, 0xe7fe, 0xac66, 0xe7fd, 0xac67, /*0x28-0x2f*/
+  0xe7fc, 0xac68, 0xac69, 0xc1d5, 0xc7d9, 0xc5fd, 0xc5c3, 0xac6a, /*0x30-0x37*/
+  0xac6b, 0xac6c, 0xac6d, 0xac6e, 0xc7ed, 0xac6f, 0xac70, 0xac71, /*0x38-0x3f*/
+  0xac72, 0xe8a3, 0xac73, 0xac74, 0xac75, 0xac76, 0xac77, 0xac78, /*0x40-0x47*/
+  0xac79, 0xac7a, 0xac7b, 0xac7c, 0xac7d, 0xac7e, 0xac80, 0xac81, /*0x48-0x4f*/
+  0xac82, 0xac83, 0xac84, 0xac85, 0xac86, 0xe8a6, 0xac87, 0xe8a5, /*0x50-0x57*/
+  0xac88, 0xe8a7, 0xbaf7, 0xe7f8, 0xe8a4, 0xac89, 0xc8f0, 0xc9aa, /*0x58-0x5f*/
+  0xac8a, 0xac8b, 0xac8c, 0xac8d, 0xac8e, 0xac8f, 0xac90, 0xac91, /*0x60-0x67*/
+  0xac92, 0xac93, 0xac94, 0xac95, 0xac96, 0xe8a9, 0xac97, 0xac98, /*0x68-0x6f*/
+  0xb9e5, 0xac99, 0xac9a, 0xac9b, 0xac9c, 0xac9d, 0xd1fe, 0xe8a8, /*0x70-0x77*/
+  0xac9e, 0xac9f, 0xaca0, 0xad40, 0xad41, 0xad42, 0xe8aa, 0xad43, /*0x78-0x7f*/
+  0xe8ad, 0xe8ae, 0xad44, 0xc1a7, 0xad45, 0xad46, 0xad47, 0xe8af, /*0x80-0x87*/
+  0xad48, 0xad49, 0xad4a, 0xe8b0, 0xad4b, 0xad4c, 0xe8ac, 0xad4d, /*0x88-0x8f*/
+  0xe8b4, 0xad4e, 0xad4f, 0xad50, 0xad51, 0xad52, 0xad53, 0xad54, /*0x90-0x97*/
+  0xad55, 0xad56, 0xad57, 0xad58, 0xe8ab, 0xad59, 0xe8b1, 0xad5a, /*0x98-0x9f*/
+  0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f, 0xad60, 0xad61, 0xe8b5, /*0xa0-0xa7*/
+  0xe8b2, 0xe8b3, 0xad62, 0xad63, 0xad64, 0xad65, 0xad66, 0xad67, /*0xa8-0xaf*/
+  0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6c, 0xad6d, 0xad6e, 0xad6f, /*0xb0-0xb7*/
+  0xad70, 0xad71, 0xe8b7, 0xad72, 0xad73, 0xad74, 0xad75, 0xad76, /*0xb8-0xbf*/
+  0xad77, 0xad78, 0xad79, 0xad7a, 0xad7b, 0xad7c, 0xad7d, 0xad7e, /*0xc0-0xc7*/
+  0xad80, 0xad81, 0xad82, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, /*0xc8-0xcf*/
+  0xad88, 0xad89, 0xe8b6, 0xad8a, 0xad8b, 0xad8c, 0xad8d, 0xad8e, /*0xd0-0xd7*/
+  0xad8f, 0xad90, 0xad91, 0xad92, 0xb9cf, 0xad93, 0xf0ac, 0xad94, /*0xd8-0xdf*/
+  0xf0ad, 0xad95, 0xc6b0, 0xb0ea, 0xc8bf, 0xad96, 0xcddf, 0xad97, /*0xe0-0xe7*/
+  0xad98, 0xad99, 0xad9a, 0xad9b, 0xad9c, 0xad9d, 0xcecd, 0xeab1, /*0xe8-0xef*/
+  0xad9e, 0xad9f, 0xada0, 0xae40, 0xeab2, 0xae41, 0xc6bf, 0xb4c9, /*0xf0-0xf7*/
+  0xae42, 0xae43, 0xae44, 0xae45, 0xae46, 0xae47, 0xae48, 0xeab3, /*0xf8-0xff*/
+  /* 0x7500 */
+  0xae49, 0xae4a, 0xae4b, 0xae4c, 0xd5e7, 0xae4d, 0xae4e, 0xae4f, /*0x00-0x07*/
+  0xae50, 0xae51, 0xae52, 0xae53, 0xae54, 0xddf9, 0xae55, 0xeab4, /*0x08-0x0f*/
+  0xae56, 0xeab5, 0xae57, 0xeab6, 0xae58, 0xae59, 0xae5a, 0xae5b, /*0x10-0x17*/
+  0xb8ca, 0xdfb0, 0xc9f5, 0xae5c, 0xccf0, 0xae5d, 0xae5e, 0xc9fa, /*0x18-0x1f*/
+  0xae5f, 0xae60, 0xae61, 0xae62, 0xae63, 0xc9fb, 0xae64, 0xae65, /*0x20-0x27*/
+  0xd3c3, 0xcba6, 0xae66, 0xb8a6, 0xf0ae, 0xb1c2, 0xae67, 0xe5b8, /*0x28-0x2f*/
+  0xccef, 0xd3c9, 0xbcd7, 0xc9ea, 0xae68, 0xb5e7, 0xae69, 0xc4d0, /*0x30-0x37*/
+  0xb5e9, 0xae6a, 0xeeae, 0xbbad, 0xae6b, 0xae6c, 0xe7de, 0xae6d, /*0x38-0x3f*/
+  0xeeaf, 0xae6e, 0xae6f, 0xae70, 0xae71, 0xb3a9, 0xae72, 0xae73, /*0x40-0x47*/
+  0xeeb2, 0xae74, 0xae75, 0xeeb1, 0xbde7, 0xae76, 0xeeb0, 0xceb7, /*0x48-0x4f*/
+  0xae77, 0xae78, 0xae79, 0xae7a, 0xc5cf, 0xae7b, 0xae7c, 0xae7d, /*0x50-0x57*/
+  0xae7e, 0xc1f4, 0xdbce, 0xeeb3, 0xd0f3, 0xae80, 0xae81, 0xae82, /*0x58-0x5f*/
+  0xae83, 0xae84, 0xae85, 0xae86, 0xae87, 0xc2d4, 0xc6e8, 0xae88, /*0x60-0x67*/
+  0xae89, 0xae8a, 0xb7ac, 0xae8b, 0xae8c, 0xae8d, 0xae8e, 0xae8f, /*0x68-0x6f*/
+  0xae90, 0xae91, 0xeeb4, 0xae92, 0xb3eb, 0xae93, 0xae94, 0xae95, /*0x70-0x77*/
+  0xbbfb, 0xeeb5, 0xae96, 0xae97, 0xae98, 0xae99, 0xae9a, 0xe7dc, /*0x78-0x7f*/
+  0xae9b, 0xae9c, 0xae9d, 0xeeb6, 0xae9e, 0xae9f, 0xbdae, 0xaea0, /*0x80-0x87*/
+  0xaf40, 0xaf41, 0xaf42, 0xf1e2, 0xaf43, 0xaf44, 0xaf45, 0xcae8, /*0x88-0x8f*/
+  0xaf46, 0xd2c9, 0xf0da, 0xaf47, 0xf0db, 0xaf48, 0xf0dc, 0xc1c6, /*0x90-0x97*/
+  0xaf49, 0xb8ed, 0xbece, 0xaf4a, 0xaf4b, 0xf0de, 0xaf4c, 0xc5b1, /*0x98-0x9f*/
+  0xf0dd, 0xd1f1, 0xaf4d, 0xf0e0, 0xb0cc, 0xbdea, 0xaf4e, 0xaf4f, /*0xa0-0xa7*/
+  0xaf50, 0xaf51, 0xaf52, 0xd2df, 0xf0df, 0xaf53, 0xb4af, 0xb7e8, /*0xa8-0xaf*/
+  0xf0e6, 0xf0e5, 0xc6a3, 0xf0e1, 0xf0e2, 0xb4c3, 0xaf54, 0xaf55, /*0xb0-0xb7*/
+  0xf0e3, 0xd5ee, 0xaf56, 0xaf57, 0xccdb, 0xbed2, 0xbcb2, 0xaf58, /*0xb8-0xbf*/
+  0xaf59, 0xaf5a, 0xf0e8, 0xf0e7, 0xf0e4, 0xb2a1, 0xaf5b, 0xd6a2, /*0xc0-0xc7*/
+  0xd3b8, 0xbeb7, 0xc8ac, 0xaf5c, 0xaf5d, 0xf0ea, 0xaf5e, 0xaf5f, /*0xc8-0xcf*/
+  0xaf60, 0xaf61, 0xd1f7, 0xaf62, 0xd6cc, 0xbadb, 0xf0e9, 0xaf63, /*0xd0-0xd7*/
+  0xb6bb, 0xaf64, 0xaf65, 0xcdb4, 0xaf66, 0xaf67, 0xc6a6, 0xaf68, /*0xd8-0xdf*/
+  0xaf69, 0xaf6a, 0xc1a1, 0xf0eb, 0xf0ee, 0xaf6b, 0xf0ed, 0xf0f0, /*0xe0-0xe7*/
+  0xf0ec, 0xaf6c, 0xbbbe, 0xf0ef, 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, /*0xe8-0xef*/
+  0xccb5, 0xf0f2, 0xaf71, 0xaf72, 0xb3d5, 0xaf73, 0xaf74, 0xaf75, /*0xf0-0xf7*/
+  0xaf76, 0xb1d4, 0xaf77, 0xaf78, 0xf0f3, 0xaf79, 0xaf7a, 0xf0f4, /*0xf8-0xff*/
+  /* 0x7600 */
+  0xf0f6, 0xb4e1, 0xaf7b, 0xf0f1, 0xaf7c, 0xf0f7, 0xaf7d, 0xaf7e, /*0x00-0x07*/
+  0xaf80, 0xaf81, 0xf0fa, 0xaf82, 0xf0f8, 0xaf83, 0xaf84, 0xaf85, /*0x08-0x0f*/
+  0xf0f5, 0xaf86, 0xaf87, 0xaf88, 0xaf89, 0xf0fd, 0xaf8a, 0xf0f9, /*0x10-0x17*/
+  0xf0fc, 0xf0fe, 0xaf8b, 0xf1a1, 0xaf8c, 0xaf8d, 0xaf8e, 0xcec1, /*0x18-0x1f*/
+  0xf1a4, 0xaf8f, 0xf1a3, 0xaf90, 0xc1f6, 0xf0fb, 0xcadd, 0xaf91, /*0x20-0x27*/
+  0xaf92, 0xb4f1, 0xb1f1, 0xccb1, 0xaf93, 0xf1a6, 0xaf94, 0xaf95, /*0x28-0x2f*/
+  0xf1a7, 0xaf96, 0xaf97, 0xf1ac, 0xd5ce, 0xf1a9, 0xaf98, 0xaf99, /*0x30-0x37*/
+  0xc8b3, 0xaf9a, 0xaf9b, 0xaf9c, 0xf1a2, 0xaf9d, 0xf1ab, 0xf1a8, /*0x38-0x3f*/
+  0xf1a5, 0xaf9e, 0xaf9f, 0xf1aa, 0xafa0, 0xb040, 0xb041, 0xb042, /*0x40-0x47*/
+  0xb043, 0xb044, 0xb045, 0xb046, 0xb0a9, 0xf1ad, 0xb047, 0xb048, /*0x48-0x4f*/
+  0xb049, 0xb04a, 0xb04b, 0xb04c, 0xf1af, 0xb04d, 0xf1b1, 0xb04e, /*0x50-0x57*/
+  0xb04f, 0xb050, 0xb051, 0xb052, 0xf1b0, 0xb053, 0xf1ae, 0xb054, /*0x58-0x5f*/
+  0xb055, 0xb056, 0xb057, 0xd1a2, 0xb058, 0xb059, 0xb05a, 0xb05b, /*0x60-0x67*/
+  0xb05c, 0xb05d, 0xb05e, 0xf1b2, 0xb05f, 0xb060, 0xb061, 0xf1b3, /*0x68-0x6f*/
+  0xb062, 0xb063, 0xb064, 0xb065, 0xb066, 0xb067, 0xb068, 0xb069, /*0x70-0x77*/
+  0xb9ef, 0xb06a, 0xb06b, 0xb5c7, 0xb06c, 0xb0d7, 0xb0d9, 0xb06d, /*0x78-0x7f*/
+  0xb06e, 0xb06f, 0xd4ed, 0xb070, 0xb5c4, 0xb071, 0xbdd4, 0xbbca, /*0x80-0x87*/
+  0xf0a7, 0xb072, 0xb073, 0xb8de, 0xb074, 0xb075, 0xf0a8, 0xb076, /*0x88-0x8f*/
+  0xb077, 0xb0a8, 0xb078, 0xf0a9, 0xb079, 0xb07a, 0xcdee, 0xb07b, /*0x90-0x97*/
+  0xb07c, 0xf0aa, 0xb07d, 0xb07e, 0xb080, 0xb081, 0xb082, 0xb083, /*0x98-0x9f*/
+  0xb084, 0xb085, 0xb086, 0xb087, 0xf0ab, 0xb088, 0xb089, 0xb08a, /*0xa0-0xa7*/
+  0xb08b, 0xb08c, 0xb08d, 0xb08e, 0xb08f, 0xb090, 0xc6a4, 0xb091, /*0xa8-0xaf*/
+  0xb092, 0xd6e5, 0xf1e4, 0xb093, 0xf1e5, 0xb094, 0xb095, 0xb096, /*0xb0-0xb7*/
+  0xb097, 0xb098, 0xb099, 0xb09a, 0xb09b, 0xb09c, 0xb09d, 0xc3f3, /*0xb8-0xbf*/
+  0xb09e, 0xb09f, 0xd3db, 0xb0a0, 0xb140, 0xd6d1, 0xc5e8, 0xb141, /*0xc0-0xc7*/
+  0xd3af, 0xb142, 0xd2e6, 0xb143, 0xb144, 0xeec1, 0xb0bb, 0xd5b5, /*0xc8-0xcf*/
+  0xd1ce, 0xbce0, 0xbad0, 0xb145, 0xbff8, 0xb146, 0xb8c7, 0xb5c1, /*0xd0-0xd7*/
+  0xc5cc, 0xb147, 0xb148, 0xcaa2, 0xb149, 0xb14a, 0xb14b, 0xc3cb, /*0xd8-0xdf*/
+  0xb14c, 0xb14d, 0xb14e, 0xb14f, 0xb150, 0xeec2, 0xb151, 0xb152, /*0xe0-0xe7*/
+  0xb153, 0xb154, 0xb155, 0xb156, 0xb157, 0xb158, 0xc4bf, 0xb6a2, /*0xe8-0xef*/
+  0xb159, 0xedec, 0xc3a4, 0xb15a, 0xd6b1, 0xb15b, 0xb15c, 0xb15d, /*0xf0-0xf7*/
+  0xcfe0, 0xedef, 0xb15e, 0xb15f, 0xc5ce, 0xb160, 0xb6dc, 0xb161, /*0xf8-0xff*/
+  /* 0x7700 */
+  0xb162, 0xcaa1, 0xb163, 0xb164, 0xeded, 0xb165, 0xb166, 0xedf0, /*0x00-0x07*/
+  0xedf1, 0xc3bc, 0xb167, 0xbfb4, 0xb168, 0xedee, 0xb169, 0xb16a, /*0x08-0x0f*/
+  0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, 0xb170, 0xb171, 0xb172, /*0x10-0x17*/
+  0xb173, 0xedf4, 0xedf2, 0xb174, 0xb175, 0xb176, 0xb177, 0xd5e6, /*0x18-0x1f*/
+  0xc3df, 0xb178, 0xedf3, 0xb179, 0xb17a, 0xb17b, 0xedf6, 0xb17c, /*0x20-0x27*/
+  0xd5a3, 0xd1a3, 0xb17d, 0xb17e, 0xb180, 0xedf5, 0xb181, 0xc3d0, /*0x28-0x2f*/
+  0xb182, 0xb183, 0xb184, 0xb185, 0xb186, 0xedf7, 0xbff4, 0xbeec, /*0x30-0x37*/
+  0xedf8, 0xb187, 0xccf7, 0xb188, 0xd1db, 0xb189, 0xb18a, 0xb18b, /*0x38-0x3f*/
+  0xd7c5, 0xd5f6, 0xb18c, 0xedfc, 0xb18d, 0xb18e, 0xb18f, 0xedfb, /*0x40-0x47*/
+  0xb190, 0xb191, 0xb192, 0xb193, 0xb194, 0xb195, 0xb196, 0xb197, /*0x48-0x4f*/
+  0xedf9, 0xedfa, 0xb198, 0xb199, 0xb19a, 0xb19b, 0xb19c, 0xb19d, /*0x50-0x57*/
+  0xb19e, 0xb19f, 0xedfd, 0xbea6, 0xb1a0, 0xb240, 0xb241, 0xb242, /*0x58-0x5f*/
+  0xb243, 0xcbaf, 0xeea1, 0xb6bd, 0xb244, 0xeea2, 0xc4c0, 0xb245, /*0x60-0x67*/
+  0xedfe, 0xb246, 0xb247, 0xbdde, 0xb2c7, 0xb248, 0xb249, 0xb24a, /*0x68-0x6f*/
+  0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, 0xb252, /*0x70-0x77*/
+  0xb253, 0xb6c3, 0xb254, 0xb255, 0xb256, 0xeea5, 0xd8ba, 0xeea3, /*0x78-0x7f*/
+  0xeea6, 0xb257, 0xb258, 0xb259, 0xc3e9, 0xb3f2, 0xb25a, 0xb25b, /*0x80-0x87*/
+  0xb25c, 0xb25d, 0xb25e, 0xb25f, 0xeea7, 0xeea4, 0xcfb9, 0xb260, /*0x88-0x8f*/
+  0xb261, 0xeea8, 0xc2f7, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, /*0x90-0x97*/
+  0xb267, 0xb268, 0xb269, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xeea9, /*0x98-0x9f*/
+  0xeeaa, 0xb26e, 0xdeab, 0xb26f, 0xb270, 0xc6b3, 0xb271, 0xc7c6, /*0xa0-0xa7*/
+  0xb272, 0xd6f5, 0xb5c9, 0xb273, 0xcbb2, 0xb274, 0xb275, 0xb276, /*0xa8-0xaf*/
+  0xeeab, 0xb277, 0xb278, 0xcdab, 0xb279, 0xeeac, 0xb27a, 0xb27b, /*0xb0-0xb7*/
+  0xb27c, 0xb27d, 0xb27e, 0xd5b0, 0xb280, 0xeead, 0xb281, 0xf6c4, /*0xb8-0xbf*/
+  0xb282, 0xb283, 0xb284, 0xb285, 0xb286, 0xb287, 0xb288, 0xb289, /*0xc0-0xc7*/
+  0xb28a, 0xb28b, 0xb28c, 0xb28d, 0xb28e, 0xdbc7, 0xb28f, 0xb290, /*0xc8-0xcf*/
+  0xb291, 0xb292, 0xb293, 0xb294, 0xb295, 0xb296, 0xb297, 0xb4a3, /*0xd0-0xd7*/
+  0xb298, 0xb299, 0xb29a, 0xc3ac, 0xf1e6, 0xb29b, 0xb29c, 0xb29d, /*0xd8-0xdf*/
+  0xb29e, 0xb29f, 0xcab8, 0xd2d3, 0xb2a0, 0xd6aa, 0xb340, 0xeff2, /*0xe0-0xe7*/
+  0xb341, 0xbed8, 0xb342, 0xbdc3, 0xeff3, 0xb6cc, 0xb0ab, 0xb343, /*0xe8-0xef*/
+  0xb344, 0xb345, 0xb346, 0xcaaf, 0xb347, 0xb348, 0xedb6, 0xb349, /*0xf0-0xf7*/
+  0xedb7, 0xb34a, 0xb34b, 0xb34c, 0xb34d, 0xcef9, 0xb7af, 0xbff3, /*0xf8-0xff*/
+  /* 0x7800 */
+  0xedb8, 0xc2eb, 0xc9b0, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, /*0x00-0x07*/
+  0xb353, 0xedb9, 0xb354, 0xb355, 0xc6f6, 0xbfb3, 0xb356, 0xb357, /*0x08-0x0f*/
+  0xb358, 0xedbc, 0xc5f8, 0xb359, 0xd1d0, 0xb35a, 0xd7a9, 0xedba, /*0x10-0x17*/
+  0xedbb, 0xb35b, 0xd1e2, 0xb35c, 0xedbf, 0xedc0, 0xb35d, 0xedc4, /*0x18-0x1f*/
+  0xb35e, 0xb35f, 0xb360, 0xedc8, 0xb361, 0xedc6, 0xedce, 0xd5e8, /*0x20-0x27*/
+  0xb362, 0xedc9, 0xb363, 0xb364, 0xedc7, 0xedbe, 0xb365, 0xb366, /*0x28-0x2f*/
+  0xc5e9, 0xb367, 0xb368, 0xb369, 0xc6c6, 0xb36a, 0xb36b, 0xc9e9, /*0x30-0x37*/
+  0xd4d2, 0xedc1, 0xedc2, 0xedc3, 0xedc5, 0xb36c, 0xc0f9, 0xb36d, /*0x38-0x3f*/
+  0xb4a1, 0xb36e, 0xb36f, 0xb370, 0xb371, 0xb9e8, 0xb372, 0xedd0, /*0x40-0x47*/
+  0xb373, 0xb374, 0xb375, 0xb376, 0xedd1, 0xb377, 0xedca, 0xb378, /*0x48-0x4f*/
+  0xedcf, 0xb379, 0xcef8, 0xb37a, 0xb37b, 0xcbb6, 0xedcc, 0xedcd, /*0x50-0x57*/
+  0xb37c, 0xb37d, 0xb37e, 0xb380, 0xb381, 0xcff5, 0xb382, 0xb383, /*0x58-0x5f*/
+  0xb384, 0xb385, 0xb386, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, /*0x60-0x67*/
+  0xb38c, 0xb38d, 0xedd2, 0xc1f2, 0xd3b2, 0xedcb, 0xc8b7, 0xb38e, /*0x68-0x6f*/
+  0xb38f, 0xb390, 0xb391, 0xb392, 0xb393, 0xb394, 0xb395, 0xbcef, /*0x70-0x77*/
+  0xb396, 0xb397, 0xb398, 0xb399, 0xc5f0, 0xb39a, 0xb39b, 0xb39c, /*0x78-0x7f*/
+  0xb39d, 0xb39e, 0xb39f, 0xb3a0, 0xb440, 0xb441, 0xb442, 0xedd6, /*0x80-0x87*/
+  0xb443, 0xb5ef, 0xb444, 0xb445, 0xc2b5, 0xb0ad, 0xcbe9, 0xb446, /*0x88-0x8f*/
+  0xb447, 0xb1ae, 0xb448, 0xedd4, 0xb449, 0xb44a, 0xb44b, 0xcdeb, /*0x90-0x97*/
+  0xb5e2, 0xb44c, 0xedd5, 0xedd3, 0xedd7, 0xb44d, 0xb44e, 0xb5fa, /*0x98-0x9f*/
+  0xb44f, 0xedd8, 0xb450, 0xedd9, 0xb451, 0xeddc, 0xb452, 0xb1cc, /*0xa0-0xa7*/
+  0xb453, 0xb454, 0xb455, 0xb456, 0xb457, 0xb458, 0xb459, 0xb45a, /*0xa8-0xaf*/
+  0xc5f6, 0xbcee, 0xedda, 0xccbc, 0xb2ea, 0xb45b, 0xb45c, 0xb45d, /*0xb0-0xb7*/
+  0xb45e, 0xeddb, 0xb45f, 0xb460, 0xb461, 0xb462, 0xc4eb, 0xb463, /*0xb8-0xbf*/
+  0xb464, 0xb4c5, 0xb465, 0xb466, 0xb467, 0xb0f5, 0xb468, 0xb469, /*0xc0-0xc7*/
+  0xb46a, 0xeddf, 0xc0da, 0xb4e8, 0xb46b, 0xb46c, 0xb46d, 0xb46e, /*0xc8-0xcf*/
+  0xc5cd, 0xb46f, 0xb470, 0xb471, 0xeddd, 0xbfc4, 0xb472, 0xb473, /*0xd0-0xd7*/
+  0xb474, 0xedde, 0xb475, 0xb476, 0xb477, 0xb478, 0xb479, 0xb47a, /*0xd8-0xdf*/
+  0xb47b, 0xb47c, 0xb47d, 0xb47e, 0xb480, 0xb481, 0xb482, 0xb483, /*0xe0-0xe7*/
+  0xc4a5, 0xb484, 0xb485, 0xb486, 0xede0, 0xb487, 0xb488, 0xb489, /*0xe8-0xef*/
+  0xb48a, 0xb48b, 0xede1, 0xb48c, 0xede3, 0xb48d, 0xb48e, 0xc1d7, /*0xf0-0xf7*/
+  0xb48f, 0xb490, 0xbbc7, 0xb491, 0xb492, 0xb493, 0xb494, 0xb495, /*0xf8-0xff*/
+  /* 0x7900 */
+  0xb496, 0xbdb8, 0xb497, 0xb498, 0xb499, 0xede2, 0xb49a, 0xb49b, /*0x00-0x07*/
+  0xb49c, 0xb49d, 0xb49e, 0xb49f, 0xb4a0, 0xb540, 0xb541, 0xb542, /*0x08-0x0f*/
+  0xb543, 0xb544, 0xb545, 0xede4, 0xb546, 0xb547, 0xb548, 0xb549, /*0x10-0x17*/
+  0xb54a, 0xb54b, 0xb54c, 0xb54d, 0xb54e, 0xb54f, 0xede6, 0xb550, /*0x18-0x1f*/
+  0xb551, 0xb552, 0xb553, 0xb554, 0xede5, 0xb555, 0xb556, 0xb557, /*0x20-0x27*/
+  0xb558, 0xb559, 0xb55a, 0xb55b, 0xb55c, 0xb55d, 0xb55e, 0xb55f, /*0x28-0x2f*/
+  0xb560, 0xb561, 0xb562, 0xb563, 0xede7, 0xb564, 0xb565, 0xb566, /*0x30-0x37*/
+  0xb567, 0xb568, 0xcabe, 0xecea, 0xc0f1, 0xb569, 0xc9e7, 0xb56a, /*0x38-0x3f*/
+  0xeceb, 0xc6ee, 0xb56b, 0xb56c, 0xb56d, 0xb56e, 0xecec, 0xb56f, /*0x40-0x47*/
+  0xc6ed, 0xeced, 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, 0xb575, /*0x48-0x4f*/
+  0xb576, 0xb577, 0xb578, 0xecf0, 0xb579, 0xb57a, 0xd7e6, 0xecf3, /*0x50-0x57*/
+  0xb57b, 0xb57c, 0xecf1, 0xecee, 0xecef, 0xd7a3, 0xc9f1, 0xcbee, /*0x58-0x5f*/
+  0xecf4, 0xb57d, 0xecf2, 0xb57e, 0xb580, 0xcfe9, 0xb581, 0xecf6, /*0x60-0x67*/
+  0xc6b1, 0xb582, 0xb583, 0xb584, 0xb585, 0xbcc0, 0xb586, 0xecf5, /*0x68-0x6f*/
+  0xb587, 0xb588, 0xb589, 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb5bb, /*0x70-0x77*/
+  0xbbf6, 0xb58e, 0xecf7, 0xb58f, 0xb590, 0xb591, 0xb592, 0xb593, /*0x78-0x7f*/
+  0xd9f7, 0xbdfb, 0xb594, 0xb595, 0xc2bb, 0xecf8, 0xb596, 0xb597, /*0x80-0x87*/
+  0xb598, 0xb599, 0xecf9, 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb8a3, /*0x88-0x8f*/
+  0xb59e, 0xb59f, 0xb5a0, 0xb640, 0xb641, 0xb642, 0xb643, 0xb644, /*0x90-0x97*/
+  0xb645, 0xb646, 0xecfa, 0xb647, 0xb648, 0xb649, 0xb64a, 0xb64b, /*0x98-0x9f*/
+  0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, 0xb651, 0xb652, 0xecfb, /*0xa0-0xa7*/
+  0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, 0xb65a, /*0xa8-0xaf*/
+  0xb65b, 0xb65c, 0xb65d, 0xecfc, 0xb65e, 0xb65f, 0xb660, 0xb661, /*0xb0-0xb7*/
+  0xb662, 0xd3ed, 0xd8ae, 0xc0eb, 0xb663, 0xc7dd, 0xbacc, 0xb664, /*0xb8-0xbf*/
+  0xd0e3, 0xcbbd, 0xb665, 0xcdba, 0xb666, 0xb667, 0xb8d1, 0xb668, /*0xc0-0xc7*/
+  0xb669, 0xb1fc, 0xb66a, 0xc7ef, 0xb66b, 0xd6d6, 0xb66c, 0xb66d, /*0xc8-0xcf*/
+  0xb66e, 0xbfc6, 0xc3eb, 0xb66f, 0xb670, 0xeff5, 0xb671, 0xb672, /*0xd0-0xd7*/
+  0xc3d8, 0xb673, 0xb674, 0xb675, 0xb676, 0xb677, 0xb678, 0xd7e2, /*0xd8-0xdf*/
+  0xb679, 0xb67a, 0xb67b, 0xeff7, 0xb3d3, 0xb67c, 0xc7d8, 0xd1ed, /*0xe0-0xe7*/
+  0xb67d, 0xd6c8, 0xb67e, 0xeff8, 0xb680, 0xeff6, 0xb681, 0xbbfd, /*0xe8-0xef*/
+  0xb3c6, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, 0xb687, 0xb688, /*0xf0-0xf7*/
+  0xbdd5, 0xb689, 0xb68a, 0xd2c6, 0xb68b, 0xbbe0, 0xb68c, 0xb68d, /*0xf8-0xff*/
+  /* 0x7a00 */
+  0xcfa1, 0xb68e, 0xeffc, 0xeffb, 0xb68f, 0xb690, 0xeff9, 0xb691, /*0x00-0x07*/
+  0xb692, 0xb693, 0xb694, 0xb3cc, 0xb695, 0xc9d4, 0xcbb0, 0xb696, /*0x08-0x0f*/
+  0xb697, 0xb698, 0xb699, 0xb69a, 0xeffe, 0xb69b, 0xb69c, 0xb0de, /*0x10-0x17*/
+  0xb69d, 0xb69e, 0xd6c9, 0xb69f, 0xb6a0, 0xb740, 0xeffd, 0xb741, /*0x18-0x1f*/
+  0xb3ed, 0xb742, 0xb743, 0xf6d5, 0xb744, 0xb745, 0xb746, 0xb747, /*0x20-0x27*/
+  0xb748, 0xb749, 0xb74a, 0xb74b, 0xb74c, 0xb74d, 0xb74e, 0xb74f, /*0x28-0x2f*/
+  0xb750, 0xb751, 0xb752, 0xcec8, 0xb753, 0xb754, 0xb755, 0xf0a2, /*0x30-0x37*/
+  0xb756, 0xf0a1, 0xb757, 0xb5be, 0xbcda, 0xbbfc, 0xb758, 0xb8e5, /*0x38-0x3f*/
+  0xb759, 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xc4c2, 0xb75f, /*0x40-0x47*/
+  0xb760, 0xb761, 0xb762, 0xb763, 0xb764, 0xb765, 0xb766, 0xb767, /*0x48-0x4f*/
+  0xb768, 0xf0a3, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, 0xcbeb, /*0x50-0x57*/
+  0xb76e, 0xb76f, 0xb770, 0xb771, 0xb772, 0xb773, 0xb774, 0xb775, /*0x58-0x5f*/
+  0xb776, 0xb777, 0xb778, 0xb779, 0xb77a, 0xb77b, 0xb77c, 0xb77d, /*0x60-0x67*/
+  0xb77e, 0xb780, 0xb781, 0xb782, 0xb783, 0xb784, 0xb785, 0xb786, /*0x68-0x6f*/
+  0xf0a6, 0xb787, 0xb788, 0xb789, 0xd1a8, 0xb78a, 0xbebf, 0xc7ee, /*0x70-0x77*/
+  0xf1b6, 0xf1b7, 0xbfd5, 0xb78b, 0xb78c, 0xb78d, 0xb78e, 0xb4a9, /*0x78-0x7f*/
+  0xf1b8, 0xcdbb, 0xb78f, 0xc7d4, 0xd5ad, 0xb790, 0xf1b9, 0xb791, /*0x80-0x87*/
+  0xf1ba, 0xb792, 0xb793, 0xb794, 0xb795, 0xc7cf, 0xb796, 0xb797, /*0x88-0x8f*/
+  0xb798, 0xd2a4, 0xd6cf, 0xb799, 0xb79a, 0xf1bb, 0xbdd1, 0xb4b0, /*0x90-0x97*/
+  0xbebd, 0xb79b, 0xb79c, 0xb79d, 0xb4dc, 0xced1, 0xb79e, 0xbfdf, /*0x98-0x9f*/
+  0xf1bd, 0xb79f, 0xb7a0, 0xb840, 0xb841, 0xbffa, 0xf1bc, 0xb842, /*0xa0-0xa7*/
+  0xf1bf, 0xb843, 0xb844, 0xb845, 0xf1be, 0xf1c0, 0xb846, 0xb847, /*0xa8-0xaf*/
+  0xb848, 0xb849, 0xb84a, 0xf1c1, 0xb84b, 0xb84c, 0xb84d, 0xb84e, /*0xb0-0xb7*/
+  0xb84f, 0xb850, 0xb851, 0xb852, 0xb853, 0xb854, 0xb855, 0xc1fe, /*0xb8-0xbf*/
+  0xb856, 0xb857, 0xb858, 0xb859, 0xb85a, 0xb85b, 0xb85c, 0xb85d, /*0xc0-0xc7*/
+  0xb85e, 0xb85f, 0xb860, 0xc1a2, 0xb861, 0xb862, 0xb863, 0xb864, /*0xc8-0xcf*/
+  0xb865, 0xb866, 0xb867, 0xb868, 0xb869, 0xb86a, 0xcafa, 0xb86b, /*0xd0-0xd7*/
+  0xb86c, 0xd5be, 0xb86d, 0xb86e, 0xb86f, 0xb870, 0xbeba, 0xbeb9, /*0xd8-0xdf*/
+  0xd5c2, 0xb871, 0xb872, 0xbfa2, 0xb873, 0xcdaf, 0xf1b5, 0xb874, /*0xe0-0xe7*/
+  0xb875, 0xb876, 0xb877, 0xb878, 0xb879, 0xbddf, 0xb87a, 0xb6cb, /*0xe8-0xef*/
+  0xb87b, 0xb87c, 0xb87d, 0xb87e, 0xb880, 0xb881, 0xb882, 0xb883, /*0xf0-0xf7*/
+  0xb884, 0xd6f1, 0xf3c3, 0xb885, 0xb886, 0xf3c4, 0xb887, 0xb8cd, /*0xf8-0xff*/
+  /* 0x7b00 */
+  0xb888, 0xb889, 0xb88a, 0xf3c6, 0xf3c7, 0xb88b, 0xb0ca, 0xb88c, /*0x00-0x07*/
+  0xf3c5, 0xb88d, 0xf3c9, 0xcbf1, 0xb88e, 0xb88f, 0xb890, 0xf3cb, /*0x08-0x0f*/
+  0xb891, 0xd0a6, 0xb892, 0xb893, 0xb1ca, 0xf3c8, 0xb894, 0xb895, /*0x10-0x17*/
+  0xb896, 0xf3cf, 0xb897, 0xb5d1, 0xb898, 0xb899, 0xf3d7, 0xb89a, /*0x18-0x1f*/
+  0xf3d2, 0xb89b, 0xb89c, 0xb89d, 0xf3d4, 0xf3d3, 0xb7fb, 0xb89e, /*0x20-0x27*/
+  0xb1bf, 0xb89f, 0xf3ce, 0xf3ca, 0xb5da, 0xb8a0, 0xf3d0, 0xb940, /*0x28-0x2f*/
+  0xb941, 0xf3d1, 0xb942, 0xf3d5, 0xb943, 0xb944, 0xb945, 0xb946, /*0x30-0x37*/
+  0xf3cd, 0xb947, 0xbce3, 0xb948, 0xc1fd, 0xb949, 0xf3d6, 0xb94a, /*0x38-0x3f*/
+  0xb94b, 0xb94c, 0xb94d, 0xb94e, 0xb94f, 0xf3da, 0xb950, 0xf3cc, /*0x40-0x47*/
+  0xb951, 0xb5c8, 0xb952, 0xbdee, 0xf3dc, 0xb953, 0xb954, 0xb7a4, /*0x48-0x4f*/
+  0xbff0, 0xd6fe, 0xcdb2, 0xb955, 0xb4f0, 0xb956, 0xb2df, 0xb957, /*0x50-0x57*/
+  0xf3d8, 0xb958, 0xf3d9, 0xc9b8, 0xb959, 0xf3dd, 0xb95a, 0xb95b, /*0x58-0x5f*/
+  0xf3de, 0xb95c, 0xf3e1, 0xb95d, 0xb95e, 0xb95f, 0xb960, 0xb961, /*0x60-0x67*/
+  0xb962, 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, 0xf3df, 0xb968, /*0x68-0x6f*/
+  0xb969, 0xf3e3, 0xf3e2, 0xb96a, 0xb96b, 0xf3db, 0xb96c, 0xbfea, /*0x70-0x77*/
+  0xb96d, 0xb3ef, 0xb96e, 0xf3e0, 0xb96f, 0xb970, 0xc7a9, 0xb971, /*0x78-0x7f*/
+  0xbcf2, 0xb972, 0xb973, 0xb974, 0xb975, 0xf3eb, 0xb976, 0xb977, /*0x80-0x87*/
+  0xb978, 0xb979, 0xb97a, 0xb97b, 0xb97c, 0xb9bf, 0xb97d, 0xb97e, /*0x88-0x8f*/
+  0xf3e4, 0xb980, 0xb981, 0xb982, 0xb2ad, 0xbbfe, 0xb983, 0xcbe3, /*0x90-0x97*/
+  0xb984, 0xb985, 0xb986, 0xb987, 0xf3ed, 0xf3e9, 0xb988, 0xb989, /*0x98-0x9f*/
+  0xb98a, 0xb9dc, 0xf3ee, 0xb98b, 0xb98c, 0xb98d, 0xf3e5, 0xf3e6, /*0xa0-0xa7*/
+  0xf3ea, 0xc2e1, 0xf3ec, 0xf3ef, 0xf3e8, 0xbcfd, 0xb98e, 0xb98f, /*0xa8-0xaf*/
+  0xb990, 0xcfe4, 0xb991, 0xb992, 0xf3f0, 0xb993, 0xb994, 0xb995, /*0xb0-0xb7*/
+  0xf3e7, 0xb996, 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, /*0xb8-0xbf*/
+  0xb99d, 0xf3f2, 0xb99e, 0xb99f, 0xb9a0, 0xba40, 0xd7ad, 0xc6aa, /*0xc0-0xc7*/
+  0xba41, 0xba42, 0xba43, 0xba44, 0xf3f3, 0xba45, 0xba46, 0xba47, /*0xc8-0xcf*/
+  0xba48, 0xf3f1, 0xba49, 0xc2a8, 0xba4a, 0xba4b, 0xba4c, 0xba4d, /*0xd0-0xd7*/
+  0xba4e, 0xb8dd, 0xf3f5, 0xba4f, 0xba50, 0xf3f4, 0xba51, 0xba52, /*0xd8-0xdf*/
+  0xba53, 0xb4db, 0xba54, 0xba55, 0xba56, 0xf3f6, 0xf3f7, 0xba57, /*0xe0-0xe7*/
+  0xba58, 0xba59, 0xf3f8, 0xba5a, 0xba5b, 0xba5c, 0xc0ba, 0xba5d, /*0xe8-0xef*/
+  0xba5e, 0xc0e9, 0xba5f, 0xba60, 0xba61, 0xba62, 0xba63, 0xc5f1, /*0xf0-0xf7*/
+  0xba64, 0xba65, 0xba66, 0xba67, 0xf3fb, 0xba68, 0xf3fa, 0xba69, /*0xf8-0xff*/
+  /* 0x7c00 */
+  0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, 0xba70, 0xb4d8, /*0x00-0x07*/
+  0xba71, 0xba72, 0xba73, 0xf3fe, 0xf3f9, 0xba74, 0xba75, 0xf3fc, /*0x08-0x0f*/
+  0xba76, 0xba77, 0xba78, 0xba79, 0xba7a, 0xba7b, 0xf3fd, 0xba7c, /*0x10-0x17*/
+  0xba7d, 0xba7e, 0xba80, 0xba81, 0xba82, 0xba83, 0xba84, 0xf4a1, /*0x18-0x1f*/
+  0xba85, 0xba86, 0xba87, 0xba88, 0xba89, 0xba8a, 0xf4a3, 0xbbc9, /*0x20-0x27*/
+  0xba8b, 0xba8c, 0xf4a2, 0xba8d, 0xba8e, 0xba8f, 0xba90, 0xba91, /*0x28-0x2f*/
+  0xba92, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, /*0x30-0x37*/
+  0xf4a4, 0xba9a, 0xba9b, 0xba9c, 0xba9d, 0xba9e, 0xba9f, 0xb2be, /*0x38-0x3f*/
+  0xf4a6, 0xf4a5, 0xbaa0, 0xbb40, 0xbb41, 0xbb42, 0xbb43, 0xbb44, /*0x40-0x47*/
+  0xbb45, 0xbb46, 0xbb47, 0xbb48, 0xbb49, 0xbcae, 0xbb4a, 0xbb4b, /*0x48-0x4f*/
+  0xbb4c, 0xbb4d, 0xbb4e, 0xbb4f, 0xbb50, 0xbb51, 0xbb52, 0xbb53, /*0x50-0x57*/
+  0xbb54, 0xbb55, 0xbb56, 0xbb57, 0xbb58, 0xbb59, 0xbb5a, 0xbb5b, /*0x58-0x5f*/
+  0xbb5c, 0xbb5d, 0xbb5e, 0xbb5f, 0xbb60, 0xbb61, 0xbb62, 0xbb63, /*0x60-0x67*/
+  0xbb64, 0xbb65, 0xbb66, 0xbb67, 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, /*0x68-0x6f*/
+  0xbb6c, 0xbb6d, 0xbb6e, 0xc3d7, 0xd9e1, 0xbb6f, 0xbb70, 0xbb71, /*0x70-0x77*/
+  0xbb72, 0xbb73, 0xbb74, 0xc0e0, 0xf4cc, 0xd7d1, 0xbb75, 0xbb76, /*0x78-0x7f*/
+  0xbb77, 0xbb78, 0xbb79, 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb7e, /*0x80-0x87*/
+  0xbb80, 0xb7db, 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, /*0x88-0x8f*/
+  0xbb87, 0xf4ce, 0xc1a3, 0xbb88, 0xbb89, 0xc6c9, 0xbb8a, 0xb4d6, /*0x90-0x97*/
+  0xd5b3, 0xbb8b, 0xbb8c, 0xbb8d, 0xf4d0, 0xf4cf, 0xf4d1, 0xcbda, /*0x98-0x9f*/
+  0xbb8e, 0xbb8f, 0xf4d2, 0xbb90, 0xd4c1, 0xd6e0, 0xbb91, 0xbb92, /*0xa0-0xa7*/
+  0xbb93, 0xbb94, 0xb7e0, 0xbb95, 0xbb96, 0xbb97, 0xc1b8, 0xbb98, /*0xa8-0xaf*/
+  0xbb99, 0xc1bb, 0xf4d3, 0xbeac, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, /*0xb0-0xb7*/
+  0xbb9e, 0xb4e2, 0xbb9f, 0xbba0, 0xf4d4, 0xf4d5, 0xbeab, 0xbc40, /*0xb8-0xbf*/
+  0xbc41, 0xf4d6, 0xbc42, 0xbc43, 0xbc44, 0xf4db, 0xbc45, 0xf4d7, /*0xc0-0xc7*/
+  0xf4da, 0xbc46, 0xbafd, 0xbc47, 0xf4d8, 0xf4d9, 0xbc48, 0xbc49, /*0xc8-0xcf*/
+  0xbc4a, 0xbc4b, 0xbc4c, 0xbc4d, 0xbc4e, 0xb8e2, 0xccc7, 0xf4dc, /*0xd0-0xd7*/
+  0xbc4f, 0xb2da, 0xbc50, 0xbc51, 0xc3d3, 0xbc52, 0xbc53, 0xd4e3, /*0xd8-0xdf*/
+  0xbfb7, 0xbc54, 0xbc55, 0xbc56, 0xbc57, 0xbc58, 0xbc59, 0xbc5a, /*0xe0-0xe7*/
+  0xf4dd, 0xbc5b, 0xbc5c, 0xbc5d, 0xbc5e, 0xbc5f, 0xbc60, 0xc5b4, /*0xe8-0xef*/
+  0xbc61, 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, 0xbc68, /*0xf0-0xf7*/
+  0xf4e9, 0xbc69, 0xbc6a, 0xcfb5, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, /*0xf8-0xff*/
+  /* 0x7d00 */
+  0xbc6f, 0xbc70, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, /*0x00-0x07*/
+  0xbc77, 0xbc78, 0xcec9, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, /*0x08-0x0f*/
+  0xbc7e, 0xbc80, 0xbc81, 0xbc82, 0xbc83, 0xbc84, 0xbc85, 0xbc86, /*0x10-0x17*/
+  0xbc87, 0xbc88, 0xbc89, 0xbc8a, 0xbc8b, 0xbc8c, 0xbc8d, 0xbc8e, /*0x18-0x1f*/
+  0xcbd8, 0xbc8f, 0xcbf7, 0xbc90, 0xbc91, 0xbc92, 0xbc93, 0xbdf4, /*0x20-0x27*/
+  0xbc94, 0xbc95, 0xbc96, 0xd7cf, 0xbc97, 0xbc98, 0xbc99, 0xc0db, /*0x28-0x2f*/
+  0xbc9a, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, 0xbca0, 0xbd40, /*0x30-0x37*/
+  0xbd41, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd48, /*0x38-0x3f*/
+  0xbd49, 0xbd4a, 0xbd4b, 0xbd4c, 0xbd4d, 0xbd4e, 0xbd4f, 0xbd50, /*0x40-0x47*/
+  0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, 0xbd56, 0xbd57, 0xbd58, /*0x48-0x4f*/
+  0xbd59, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd5e, 0xbd5f, 0xbd60, /*0x50-0x57*/
+  0xbd61, 0xbd62, 0xbd63, 0xbd64, 0xbd65, 0xbd66, 0xbd67, 0xbd68, /*0x58-0x5f*/
+  0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, /*0x60-0x67*/
+  0xbd71, 0xbd72, 0xbd73, 0xbd74, 0xbd75, 0xbd76, 0xd0f5, 0xbd77, /*0x68-0x6f*/
+  0xbd78, 0xbd79, 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xf4ea, /*0x70-0x77*/
+  0xbd80, 0xbd81, 0xbd82, 0xbd83, 0xbd84, 0xbd85, 0xbd86, 0xbd87, /*0x78-0x7f*/
+  0xbd88, 0xbd89, 0xbd8a, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, /*0x80-0x87*/
+  0xbd90, 0xbd91, 0xbd92, 0xbd93, 0xbd94, 0xbd95, 0xbd96, 0xbd97, /*0x88-0x8f*/
+  0xbd98, 0xbd99, 0xbd9a, 0xbd9b, 0xbd9c, 0xbd9d, 0xbd9e, 0xbd9f, /*0x90-0x97*/
+  0xbda0, 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0xbe44, 0xbe45, 0xbe46, /*0x98-0x9f*/
+  0xbe47, 0xbe48, 0xbe49, 0xbe4a, 0xbe4b, 0xbe4c, 0xf4eb, 0xbe4d, /*0xa0-0xa7*/
+  0xbe4e, 0xbe4f, 0xbe50, 0xbe51, 0xbe52, 0xbe53, 0xf4ec, 0xbe54, /*0xa8-0xaf*/
+  0xbe55, 0xbe56, 0xbe57, 0xbe58, 0xbe59, 0xbe5a, 0xbe5b, 0xbe5c, /*0xb0-0xb7*/
+  0xbe5d, 0xbe5e, 0xbe5f, 0xbe60, 0xbe61, 0xbe62, 0xbe63, 0xbe64, /*0xb8-0xbf*/
+  0xbe65, 0xbe66, 0xbe67, 0xbe68, 0xbe69, 0xbe6a, 0xbe6b, 0xbe6c, /*0xc0-0xc7*/
+  0xbe6d, 0xbe6e, 0xbe6f, 0xbe70, 0xbe71, 0xbe72, 0xbe73, 0xbe74, /*0xc8-0xcf*/
+  0xbe75, 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7b, 0xbe7c, /*0xd0-0xd7*/
+  0xbe7d, 0xbe7e, 0xbe80, 0xbe81, 0xbe82, 0xbe83, 0xbe84, 0xbe85, /*0xd8-0xdf*/
+  0xbe86, 0xbe87, 0xbe88, 0xbe89, 0xbe8a, 0xbe8b, 0xbe8c, 0xbe8d, /*0xe0-0xe7*/
+  0xbe8e, 0xbe8f, 0xbe90, 0xbe91, 0xbe92, 0xbe93, 0xbe94, 0xbe95, /*0xe8-0xef*/
+  0xbe96, 0xbe97, 0xbe98, 0xbe99, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, /*0xf0-0xf7*/
+  0xbe9e, 0xbe9f, 0xbea0, 0xbf40, 0xbf41, 0xbf42, 0xbf43, 0xbf44, /*0xf8-0xff*/
+  /* 0x7e00 */
+  0xbf45, 0xbf46, 0xbf47, 0xbf48, 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, /*0x00-0x07*/
+  0xbf4d, 0xbf4e, 0xbf4f, 0xbf50, 0xbf51, 0xbf52, 0xbf53, 0xbf54, /*0x08-0x0f*/
+  0xbf55, 0xbf56, 0xbf57, 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, 0xbf5c, /*0x10-0x17*/
+  0xbf5d, 0xbf5e, 0xbf5f, 0xbf60, 0xbf61, 0xbf62, 0xbf63, 0xbf64, /*0x18-0x1f*/
+  0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, /*0x20-0x27*/
+  0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, 0xbf72, 0xbf73, 0xbf74, /*0x28-0x2f*/
+  0xbf75, 0xbf76, 0xbf77, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, /*0x30-0x37*/
+  0xbf7d, 0xbf7e, 0xbf80, 0xf7e3, 0xbf81, 0xbf82, 0xbf83, 0xbf84, /*0x38-0x3f*/
+  0xbf85, 0xb7b1, 0xbf86, 0xbf87, 0xbf88, 0xbf89, 0xbf8a, 0xf4ed, /*0x40-0x47*/
+  0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, 0xbf91, 0xbf92, /*0x48-0x4f*/
+  0xbf93, 0xbf94, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, /*0x50-0x57*/
+  0xbf9b, 0xbf9c, 0xbf9d, 0xbf9e, 0xbf9f, 0xbfa0, 0xc040, 0xc041, /*0x58-0x5f*/
+  0xc042, 0xc043, 0xc044, 0xc045, 0xc046, 0xc047, 0xc048, 0xc049, /*0x60-0x67*/
+  0xc04a, 0xc04b, 0xc04c, 0xc04d, 0xc04e, 0xc04f, 0xc050, 0xc051, /*0x68-0x6f*/
+  0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, 0xc058, 0xc059, /*0x70-0x77*/
+  0xc05a, 0xc05b, 0xc05c, 0xc05d, 0xc05e, 0xc05f, 0xc060, 0xc061, /*0x78-0x7f*/
+  0xc062, 0xc063, 0xd7eb, 0xc064, 0xc065, 0xc066, 0xc067, 0xc068, /*0x80-0x87*/
+  0xc069, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, 0xc070, /*0x88-0x8f*/
+  0xc071, 0xc072, 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, /*0x90-0x97*/
+  0xc079, 0xc07a, 0xc07b, 0xf4ee, 0xc07c, 0xc07d, 0xc07e, 0xe6f9, /*0x98-0x9f*/
+  0xbec0, 0xe6fa, 0xbaec, 0xe6fb, 0xcfcb, 0xe6fc, 0xd4bc, 0xbcb6, /*0xa0-0xa7*/
+  0xe6fd, 0xe6fe, 0xbccd, 0xc8d2, 0xceb3, 0xe7a1, 0xc080, 0xb4bf, /*0xa8-0xaf*/
+  0xe7a2, 0xc9b4, 0xb8d9, 0xc4c9, 0xc081, 0xd7dd, 0xc2da, 0xb7d7, /*0xb0-0xb7*/
+  0xd6bd, 0xcec6, 0xb7c4, 0xc082, 0xc083, 0xc5a6, 0xe7a3, 0xcfdf, /*0xb8-0xbf*/
+  0xe7a4, 0xe7a5, 0xe7a6, 0xc1b7, 0xd7e9, 0xc9f0, 0xcfb8, 0xd6af, /*0xc0-0xc7*/
+  0xd6d5, 0xe7a7, 0xb0ed, 0xe7a8, 0xe7a9, 0xc9dc, 0xd2ef, 0xbead, /*0xc8-0xcf*/
+  0xe7aa, 0xb0f3, 0xc8de, 0xbde1, 0xe7ab, 0xc8c6, 0xc084, 0xe7ac, /*0xd0-0xd7*/
+  0xbbe6, 0xb8f8, 0xd1a4, 0xe7ad, 0xc2e7, 0xbef8, 0xbdca, 0xcdb3, /*0xd8-0xdf*/
+  0xe7ae, 0xe7af, 0xbeee, 0xd0e5, 0xc085, 0xcbe7, 0xccd0, 0xbccc, /*0xe0-0xe7*/
+  0xe7b0, 0xbca8, 0xd0f7, 0xe7b1, 0xc086, 0xd0f8, 0xe7b2, 0xe7b3, /*0xe8-0xef*/
+  0xb4c2, 0xe7b4, 0xe7b5, 0xc9fe, 0xceac, 0xc3e0, 0xe7b7, 0xb1c1, /*0xf0-0xf7*/
+  0xb3f1, 0xc087, 0xe7b8, 0xe7b9, 0xd7db, 0xd5c0, 0xe7ba, 0xc2cc, /*0xf8-0xff*/
+  /* 0x7f00 */
+  0xd7ba, 0xe7bb, 0xe7bc, 0xe7bd, 0xbcea, 0xc3e5, 0xc0c2, 0xe7be, /*0x00-0x07*/
+  0xe7bf, 0xbca9, 0xc088, 0xe7c0, 0xe7c1, 0xe7b6, 0xb6d0, 0xe7c2, /*0x08-0x0f*/
+  0xc089, 0xe7c3, 0xe7c4, 0xbbba, 0xb5de, 0xc2c6, 0xb1e0, 0xe7c5, /*0x10-0x17*/
+  0xd4b5, 0xe7c6, 0xb8bf, 0xe7c8, 0xe7c7, 0xb7ec, 0xc08a, 0xe7c9, /*0x18-0x1f*/
+  0xb2f8, 0xe7ca, 0xe7cb, 0xe7cc, 0xe7cd, 0xe7ce, 0xe7cf, 0xe7d0, /*0x20-0x27*/
+  0xd3a7, 0xcbf5, 0xe7d1, 0xe7d2, 0xe7d3, 0xe7d4, 0xc9c9, 0xe7d5, /*0x28-0x2f*/
+  0xe7d6, 0xe7d7, 0xe7d8, 0xe7d9, 0xbdc9, 0xe7da, 0xf3be, 0xc08b, /*0x30-0x37*/
+  0xb8d7, 0xc08c, 0xc8b1, 0xc08d, 0xc08e, 0xc08f, 0xc090, 0xc091, /*0x38-0x3f*/
+  0xc092, 0xc093, 0xf3bf, 0xc094, 0xf3c0, 0xf3c1, 0xc095, 0xc096, /*0x40-0x47*/
+  0xc097, 0xc098, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, 0xc09e, /*0x48-0x4f*/
+  0xb9de, 0xcdf8, 0xc09f, 0xc0a0, 0xd8e8, 0xbab1, 0xc140, 0xc2de, /*0x50-0x57*/
+  0xeeb7, 0xc141, 0xb7a3, 0xc142, 0xc143, 0xc144, 0xc145, 0xeeb9, /*0x58-0x5f*/
+  0xc146, 0xeeb8, 0xb0d5, 0xc147, 0xc148, 0xc149, 0xc14a, 0xc14b, /*0x60-0x67*/
+  0xeebb, 0xd5d6, 0xd7ef, 0xc14c, 0xc14d, 0xc14e, 0xd6c3, 0xc14f, /*0x68-0x6f*/
+  0xc150, 0xeebd, 0xcaf0, 0xc151, 0xeebc, 0xc152, 0xc153, 0xc154, /*0x70-0x77*/
+  0xc155, 0xeebe, 0xc156, 0xc157, 0xc158, 0xc159, 0xeec0, 0xc15a, /*0x78-0x7f*/
+  0xc15b, 0xeebf, 0xc15c, 0xc15d, 0xc15e, 0xc15f, 0xc160, 0xc161, /*0x80-0x87*/
+  0xc162, 0xc163, 0xd1f2, 0xc164, 0xc7bc, 0xc165, 0xc3c0, 0xc166, /*0x88-0x8f*/
+  0xc167, 0xc168, 0xc169, 0xc16a, 0xb8e1, 0xc16b, 0xc16c, 0xc16d, /*0x90-0x97*/
+  0xc16e, 0xc16f, 0xc1e7, 0xc170, 0xc171, 0xf4c6, 0xd0df, 0xf4c7, /*0x98-0x9f*/
+  0xc172, 0xcfdb, 0xc173, 0xc174, 0xc8ba, 0xc175, 0xc176, 0xf4c8, /*0xa0-0xa7*/
+  0xc177, 0xc178, 0xc179, 0xc17a, 0xc17b, 0xc17c, 0xc17d, 0xf4c9, /*0xa8-0xaf*/
+  0xf4ca, 0xc17e, 0xf4cb, 0xc180, 0xc181, 0xc182, 0xc183, 0xc184, /*0xb0-0xb7*/
+  0xd9fa, 0xb8fe, 0xc185, 0xc186, 0xe5f1, 0xd3f0, 0xc187, 0xf4e0, /*0xb8-0xbf*/
+  0xc188, 0xcecc, 0xc189, 0xc18a, 0xc18b, 0xb3e1, 0xc18c, 0xc18d, /*0xc0-0xc7*/
+  0xc18e, 0xc18f, 0xf1b4, 0xc190, 0xd2ee, 0xc191, 0xf4e1, 0xc192, /*0xc8-0xcf*/
+  0xc193, 0xc194, 0xc195, 0xc196, 0xcfe8, 0xf4e2, 0xc197, 0xc198, /*0xd0-0xd7*/
+  0xc7cc, 0xc199, 0xc19a, 0xc19b, 0xc19c, 0xc19d, 0xc19e, 0xb5d4, /*0xd8-0xdf*/
+  0xb4e4, 0xf4e4, 0xc19f, 0xc1a0, 0xc240, 0xf4e3, 0xf4e5, 0xc241, /*0xe0-0xe7*/
+  0xc242, 0xf4e6, 0xc243, 0xc244, 0xc245, 0xc246, 0xf4e7, 0xc247, /*0xe8-0xef*/
+  0xbab2, 0xb0bf, 0xc248, 0xf4e8, 0xc249, 0xc24a, 0xc24b, 0xc24c, /*0xf0-0xf7*/
+  0xc24d, 0xc24e, 0xc24f, 0xb7ad, 0xd2ed, 0xc250, 0xc251, 0xc252, /*0xf8-0xff*/
+  /* 0x8000 */
+  0xd2ab, 0xc0cf, 0xc253, 0xbfbc, 0xeba3, 0xd5df, 0xeac8, 0xc254, /*0x00-0x07*/
+  0xc255, 0xc256, 0xc257, 0xf1f3, 0xb6f8, 0xcba3, 0xc258, 0xc259, /*0x08-0x0f*/
+  0xc4cd, 0xc25a, 0xf1e7, 0xc25b, 0xf1e8, 0xb8fb, 0xf1e9, 0xbac4, /*0x10-0x17*/
+  0xd4c5, 0xb0d2, 0xc25c, 0xc25d, 0xf1ea, 0xc25e, 0xc25f, 0xc260, /*0x18-0x1f*/
+  0xf1eb, 0xc261, 0xf1ec, 0xc262, 0xc263, 0xf1ed, 0xf1ee, 0xf1ef, /*0x20-0x27*/
+  0xf1f1, 0xf1f0, 0xc5d5, 0xc264, 0xc265, 0xc266, 0xc267, 0xc268, /*0x28-0x2f*/
+  0xc269, 0xf1f2, 0xc26a, 0xb6fa, 0xc26b, 0xf1f4, 0xd2ae, 0xdec7, /*0x30-0x37*/
+  0xcbca, 0xc26c, 0xc26d, 0xb3dc, 0xc26e, 0xb5a2, 0xc26f, 0xb9a2, /*0x38-0x3f*/
+  0xc270, 0xc271, 0xc4f4, 0xf1f5, 0xc272, 0xc273, 0xf1f6, 0xc274, /*0x40-0x47*/
+  0xc275, 0xc276, 0xc1c4, 0xc1fb, 0xd6b0, 0xf1f7, 0xc277, 0xc278, /*0x48-0x4f*/
+  0xc279, 0xc27a, 0xf1f8, 0xc27b, 0xc1aa, 0xc27c, 0xc27d, 0xc27e, /*0x50-0x57*/
+  0xc6b8, 0xc280, 0xbedb, 0xc281, 0xc282, 0xc283, 0xc284, 0xc285, /*0x58-0x5f*/
+  0xc286, 0xc287, 0xc288, 0xc289, 0xc28a, 0xc28b, 0xc28c, 0xc28d, /*0x60-0x67*/
+  0xc28e, 0xf1f9, 0xb4cf, 0xc28f, 0xc290, 0xc291, 0xc292, 0xc293, /*0x68-0x6f*/
+  0xc294, 0xf1fa, 0xc295, 0xc296, 0xc297, 0xc298, 0xc299, 0xc29a, /*0x70-0x77*/
+  0xc29b, 0xc29c, 0xc29d, 0xc29e, 0xc29f, 0xc2a0, 0xc340, 0xedb2, /*0x78-0x7f*/
+  0xedb1, 0xc341, 0xc342, 0xcbe0, 0xd2de, 0xc343, 0xcbc1, 0xd5d8, /*0x80-0x87*/
+  0xc344, 0xc8e2, 0xc345, 0xc0df, 0xbca1, 0xc346, 0xc347, 0xc348, /*0x88-0x8f*/
+  0xc349, 0xc34a, 0xc34b, 0xebc1, 0xc34c, 0xc34d, 0xd0a4, 0xc34e, /*0x90-0x97*/
+  0xd6e2, 0xc34f, 0xb6c7, 0xb8d8, 0xebc0, 0xb8ce, 0xc350, 0xebbf, /*0x98-0x9f*/
+  0xb3a6, 0xb9c9, 0xd6ab, 0xc351, 0xb7f4, 0xb7ca, 0xc352, 0xc353, /*0xa0-0xa7*/
+  0xc354, 0xbce7, 0xb7be, 0xebc6, 0xc355, 0xebc7, 0xb0b9, 0xbfcf, /*0xa8-0xaf*/
+  0xc356, 0xebc5, 0xd3fd, 0xc357, 0xebc8, 0xc358, 0xc359, 0xebc9, /*0xb0-0xb7*/
+  0xc35a, 0xc35b, 0xb7ce, 0xc35c, 0xebc2, 0xebc4, 0xc9f6, 0xd6d7, /*0xb8-0xbf*/
+  0xd5cd, 0xd0b2, 0xebcf, 0xceb8, 0xebd0, 0xc35d, 0xb5a8, 0xc35e, /*0xc0-0xc7*/
+  0xc35f, 0xc360, 0xc361, 0xc362, 0xb1b3, 0xebd2, 0xcca5, 0xc363, /*0xc8-0xcf*/
+  0xc364, 0xc365, 0xc366, 0xc367, 0xc368, 0xc369, 0xc5d6, 0xebd3, /*0xd0-0xd7*/
+  0xc36a, 0xebd1, 0xc5df, 0xebce, 0xcaa4, 0xebd5, 0xb0fb, 0xc36b, /*0xd8-0xdf*/
+  0xc36c, 0xbafa, 0xc36d, 0xc36e, 0xd8b7, 0xf1e3, 0xc36f, 0xebca, /*0xe0-0xe7*/
+  0xebcb, 0xebcc, 0xebcd, 0xebd6, 0xe6c0, 0xebd9, 0xc370, 0xbfe8, /*0xe8-0xef*/
+  0xd2c8, 0xebd7, 0xebdc, 0xb8ec, 0xebd8, 0xc371, 0xbdba, 0xc372, /*0xf0-0xf7*/
+  0xd0d8, 0xc373, 0xb0b7, 0xc374, 0xebdd, 0xc4dc, 0xc375, 0xc376, /*0xf8-0xff*/
+  /* 0x8100 */
+  0xc377, 0xc378, 0xd6ac, 0xc379, 0xc37a, 0xc37b, 0xb4e0, 0xc37c, /*0x00-0x07*/
+  0xc37d, 0xc2f6, 0xbcb9, 0xc37e, 0xc380, 0xebda, 0xebdb, 0xd4e0, /*0x08-0x0f*/
+  0xc6ea, 0xc4d4, 0xebdf, 0xc5a7, 0xd9f5, 0xc381, 0xb2b1, 0xc382, /*0x10-0x17*/
+  0xebe4, 0xc383, 0xbdc5, 0xc384, 0xc385, 0xc386, 0xebe2, 0xc387, /*0x18-0x1f*/
+  0xc388, 0xc389, 0xc38a, 0xc38b, 0xc38c, 0xc38d, 0xc38e, 0xc38f, /*0x20-0x27*/
+  0xc390, 0xc391, 0xc392, 0xc393, 0xebe3, 0xc394, 0xc395, 0xb8ac, /*0x28-0x2f*/
+  0xc396, 0xcdd1, 0xebe5, 0xc397, 0xc398, 0xc399, 0xebe1, 0xc39a, /*0x30-0x37*/
+  0xc1b3, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, 0xc6a2, 0xc3a0, /*0x38-0x3f*/
+  0xc440, 0xc441, 0xc442, 0xc443, 0xc444, 0xc445, 0xccf3, 0xc446, /*0x40-0x47*/
+  0xebe6, 0xc447, 0xc0b0, 0xd2b8, 0xebe7, 0xc448, 0xc449, 0xc44a, /*0x48-0x4f*/
+  0xb8af, 0xb8ad, 0xc44b, 0xebe8, 0xc7bb, 0xcdf3, 0xc44c, 0xc44d, /*0x50-0x57*/
+  0xc44e, 0xebea, 0xebeb, 0xc44f, 0xc450, 0xc451, 0xc452, 0xc453, /*0x58-0x5f*/
+  0xebed, 0xc454, 0xc455, 0xc456, 0xc457, 0xd0c8, 0xc458, 0xebf2, /*0x60-0x67*/
+  0xc459, 0xebee, 0xc45a, 0xc45b, 0xc45c, 0xebf1, 0xc8f9, 0xc45d, /*0x68-0x6f*/
+  0xd1fc, 0xebec, 0xc45e, 0xc45f, 0xebe9, 0xc460, 0xc461, 0xc462, /*0x70-0x77*/
+  0xc463, 0xb8b9, 0xcfd9, 0xc4e5, 0xebef, 0xebf0, 0xccda, 0xcdc8, /*0x78-0x7f*/
+  0xb0f2, 0xc464, 0xebf6, 0xc465, 0xc466, 0xc467, 0xc468, 0xc469, /*0x80-0x87*/
+  0xebf5, 0xc46a, 0xb2b2, 0xc46b, 0xc46c, 0xc46d, 0xc46e, 0xb8e0, /*0x88-0x8f*/
+  0xc46f, 0xebf7, 0xc470, 0xc471, 0xc472, 0xc473, 0xc474, 0xc475, /*0x90-0x97*/
+  0xb1ec, 0xc476, 0xc477, 0xccc5, 0xc4a4, 0xcfa5, 0xc478, 0xc479, /*0x98-0x9f*/
+  0xc47a, 0xc47b, 0xc47c, 0xebf9, 0xc47d, 0xc47e, 0xeca2, 0xc480, /*0xa0-0xa7*/
+  0xc5f2, 0xc481, 0xebfa, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, /*0xa8-0xaf*/
+  0xc487, 0xc488, 0xc489, 0xc9c5, 0xc48a, 0xc48b, 0xc48c, 0xc48d, /*0xb0-0xb7*/
+  0xc48e, 0xc48f, 0xe2df, 0xebfe, 0xc490, 0xc491, 0xc492, 0xc493, /*0xb8-0xbf*/
+  0xcdce, 0xeca1, 0xb1db, 0xd3b7, 0xc494, 0xc495, 0xd2dc, 0xc496, /*0xc0-0xc7*/
+  0xc497, 0xc498, 0xebfd, 0xc499, 0xebfb, 0xc49a, 0xc49b, 0xc49c, /*0xc8-0xcf*/
+  0xc49d, 0xc49e, 0xc49f, 0xc4a0, 0xc540, 0xc541, 0xc542, 0xc543, /*0xd0-0xd7*/
+  0xc544, 0xc545, 0xc546, 0xc547, 0xc548, 0xc549, 0xc54a, 0xc54b, /*0xd8-0xdf*/
+  0xc54c, 0xc54d, 0xc54e, 0xb3bc, 0xc54f, 0xc550, 0xc551, 0xeab0, /*0xe0-0xe7*/
+  0xc552, 0xc553, 0xd7d4, 0xc554, 0xf4ab, 0xb3f4, 0xc555, 0xc556, /*0xe8-0xef*/
+  0xc557, 0xc558, 0xc559, 0xd6c1, 0xd6c2, 0xc55a, 0xc55b, 0xc55c, /*0xf0-0xf7*/
+  0xc55d, 0xc55e, 0xc55f, 0xd5e9, 0xbeca, 0xc560, 0xf4a7, 0xc561, /*0xf8-0xff*/
+  /* 0x8200 */
+  0xd2a8, 0xf4a8, 0xf4a9, 0xc562, 0xf4aa, 0xbecb, 0xd3df, 0xc563, /*0x00-0x07*/
+  0xc564, 0xc565, 0xc566, 0xc567, 0xc9e0, 0xc9e1, 0xc568, 0xc569, /*0x08-0x0f*/
+  0xf3c2, 0xc56a, 0xcae6, 0xc56b, 0xccf2, 0xc56c, 0xc56d, 0xc56e, /*0x10-0x17*/
+  0xc56f, 0xc570, 0xc571, 0xe2b6, 0xcbb4, 0xc572, 0xcee8, 0xd6db, /*0x18-0x1f*/
+  0xc573, 0xf4ad, 0xf4ae, 0xf4af, 0xc574, 0xc575, 0xc576, 0xc577, /*0x20-0x27*/
+  0xf4b2, 0xc578, 0xbabd, 0xf4b3, 0xb0e3, 0xf4b0, 0xc579, 0xf4b1, /*0x28-0x2f*/
+  0xbda2, 0xb2d5, 0xc57a, 0xf4b6, 0xf4b7, 0xb6e6, 0xb2b0, 0xcfcf, /*0x30-0x37*/
+  0xf4b4, 0xb4ac, 0xc57b, 0xf4b5, 0xc57c, 0xc57d, 0xf4b8, 0xc57e, /*0x38-0x3f*/
+  0xc580, 0xc581, 0xc582, 0xc583, 0xf4b9, 0xc584, 0xc585, 0xcda7, /*0x40-0x47*/
+  0xc586, 0xf4ba, 0xc587, 0xf4bb, 0xc588, 0xc589, 0xc58a, 0xf4bc, /*0x48-0x4f*/
+  0xc58b, 0xc58c, 0xc58d, 0xc58e, 0xc58f, 0xc590, 0xc591, 0xc592, /*0x50-0x57*/
+  0xcbd2, 0xc593, 0xf4bd, 0xc594, 0xc595, 0xc596, 0xc597, 0xf4be, /*0x58-0x5f*/
+  0xc598, 0xc599, 0xc59a, 0xc59b, 0xc59c, 0xc59d, 0xc59e, 0xc59f, /*0x60-0x67*/
+  0xf4bf, 0xc5a0, 0xc640, 0xc641, 0xc642, 0xc643, 0xf4de, 0xc1bc, /*0x68-0x6f*/
+  0xbce8, 0xc644, 0xc9ab, 0xd1de, 0xe5f5, 0xc645, 0xc646, 0xc647, /*0x70-0x77*/
+  0xc648, 0xdcb3, 0xd2d5, 0xc649, 0xc64a, 0xdcb4, 0xb0ac, 0xdcb5, /*0x78-0x7f*/
+  0xc64b, 0xc64c, 0xbdda, 0xc64d, 0xdcb9, 0xc64e, 0xc64f, 0xc650, /*0x80-0x87*/
+  0xd8c2, 0xc651, 0xdcb7, 0xd3f3, 0xc652, 0xc9d6, 0xdcba, 0xdcb6, /*0x88-0x8f*/
+  0xc653, 0xdcbb, 0xc3a2, 0xc654, 0xc655, 0xc656, 0xc657, 0xdcbc, /*0x90-0x97*/
+  0xdcc5, 0xdcbd, 0xc658, 0xc659, 0xcedf, 0xd6a5, 0xc65a, 0xdccf, /*0x98-0x9f*/
+  0xc65b, 0xdccd, 0xc65c, 0xc65d, 0xdcd2, 0xbde6, 0xc2ab, 0xc65e, /*0xa0-0xa7*/
+  0xdcb8, 0xdccb, 0xdcce, 0xdcbe, 0xb7d2, 0xb0c5, 0xdcc7, 0xd0be, /*0xa8-0xaf*/
+  0xdcc1, 0xbba8, 0xc65f, 0xb7bc, 0xdccc, 0xc660, 0xc661, 0xdcc6, /*0xb0-0xb7*/
+  0xdcbf, 0xc7db, 0xc662, 0xc663, 0xc664, 0xd1bf, 0xdcc0, 0xc665, /*0xb8-0xbf*/
+  0xc666, 0xdcca, 0xc667, 0xc668, 0xdcd0, 0xc669, 0xc66a, 0xcead, /*0xc0-0xc7*/
+  0xdcc2, 0xc66b, 0xdcc3, 0xdcc8, 0xdcc9, 0xb2d4, 0xdcd1, 0xcbd5, /*0xc8-0xcf*/
+  0xc66c, 0xd4b7, 0xdcdb, 0xdcdf, 0xcca6, 0xdce6, 0xc66d, 0xc3e7, /*0xd0-0xd7*/
+  0xdcdc, 0xc66e, 0xc66f, 0xbfc1, 0xdcd9, 0xc670, 0xb0fa, 0xb9b6, /*0xd8-0xdf*/
+  0xdce5, 0xdcd3, 0xc671, 0xdcc4, 0xdcd6, 0xc8f4, 0xbfe0, 0xc672, /*0xe0-0xe7*/
+  0xc673, 0xc674, 0xc675, 0xc9bb, 0xc676, 0xc677, 0xc678, 0xb1bd, /*0xe8-0xef*/
+  0xc679, 0xd3a2, 0xc67a, 0xc67b, 0xdcda, 0xc67c, 0xc67d, 0xdcd5, /*0xf0-0xf7*/
+  0xc67e, 0xc6bb, 0xc680, 0xdcde, 0xc681, 0xc682, 0xc683, 0xc684, /*0xf8-0xff*/
+  /* 0x8300 */
+  0xc685, 0xd7c2, 0xc3af, 0xb7b6, 0xc7d1, 0xc3a9, 0xdce2, 0xdcd8, /*0x00-0x07*/
+  0xdceb, 0xdcd4, 0xc686, 0xc687, 0xdcdd, 0xc688, 0xbea5, 0xdcd7, /*0x08-0x0f*/
+  0xc689, 0xdce0, 0xc68a, 0xc68b, 0xdce3, 0xdce4, 0xc68c, 0xdcf8, /*0x10-0x17*/
+  0xc68d, 0xc68e, 0xdce1, 0xdda2, 0xdce7, 0xc68f, 0xc690, 0xc691, /*0x18-0x1f*/
+  0xc692, 0xc693, 0xc694, 0xc695, 0xc696, 0xc697, 0xc698, 0xbceb, /*0x20-0x27*/
+  0xb4c4, 0xc699, 0xc69a, 0xc3a3, 0xb2e7, 0xdcfa, 0xc69b, 0xdcf2, /*0x28-0x2f*/
+  0xc69c, 0xdcef, 0xc69d, 0xdcfc, 0xdcee, 0xd2f0, 0xb2e8, 0xc69e, /*0x30-0x37*/
+  0xc8d7, 0xc8e3, 0xdcfb, 0xc69f, 0xdced, 0xc6a0, 0xc740, 0xc741, /*0x38-0x3f*/
+  0xdcf7, 0xc742, 0xc743, 0xdcf5, 0xc744, 0xc745, 0xbea3, 0xdcf4, /*0x40-0x47*/
+  0xc746, 0xb2dd, 0xc747, 0xc748, 0xc749, 0xc74a, 0xc74b, 0xdcf3, /*0x48-0x4f*/
+  0xbcf6, 0xdce8, 0xbbc4, 0xc74c, 0xc0f3, 0xc74d, 0xc74e, 0xc74f, /*0x50-0x57*/
+  0xc750, 0xc751, 0xbcd4, 0xdce9, 0xdcea, 0xc752, 0xdcf1, 0xdcf6, /*0x58-0x5f*/
+  0xdcf9, 0xb5b4, 0xc753, 0xc8d9, 0xbbe7, 0xdcfe, 0xdcfd, 0xd3ab, /*0x60-0x67*/
+  0xdda1, 0xdda3, 0xdda5, 0xd2f1, 0xdda4, 0xdda6, 0xdda7, 0xd2a9, /*0x68-0x6f*/
+  0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc759, 0xc75a, 0xbac9, /*0x70-0x77*/
+  0xdda9, 0xc75b, 0xc75c, 0xddb6, 0xddb1, 0xddb4, 0xc75d, 0xc75e, /*0x78-0x7f*/
+  0xc75f, 0xc760, 0xc761, 0xc762, 0xc763, 0xddb0, 0xc6ce, 0xc764, /*0x80-0x87*/
+  0xc765, 0xc0f2, 0xc766, 0xc767, 0xc768, 0xc769, 0xc9af, 0xc76a, /*0x88-0x8f*/
+  0xc76b, 0xc76c, 0xdcec, 0xddae, 0xc76d, 0xc76e, 0xc76f, 0xc770, /*0x90-0x97*/
+  0xddb7, 0xc771, 0xc772, 0xdcf0, 0xddaf, 0xc773, 0xddb8, 0xc774, /*0x98-0x9f*/
+  0xddac, 0xc775, 0xc776, 0xc777, 0xc778, 0xc779, 0xc77a, 0xc77b, /*0xa0-0xa7*/
+  0xddb9, 0xddb3, 0xddad, 0xc4aa, 0xc77c, 0xc77d, 0xc77e, 0xc780, /*0xa8-0xaf*/
+  0xdda8, 0xc0b3, 0xc1ab, 0xddaa, 0xddab, 0xc781, 0xddb2, 0xbbf1, /*0xb0-0xb7*/
+  0xddb5, 0xd3a8, 0xddba, 0xc782, 0xddbb, 0xc3a7, 0xc783, 0xc784, /*0xb8-0xbf*/
+  0xddd2, 0xddbc, 0xc785, 0xc786, 0xc787, 0xddd1, 0xc788, 0xb9bd, /*0xc0-0xc7*/
+  0xc789, 0xc78a, 0xbed5, 0xc78b, 0xbefa, 0xc78c, 0xc78d, 0xbaca, /*0xc8-0xcf*/
+  0xc78e, 0xc78f, 0xc790, 0xc791, 0xddca, 0xc792, 0xddc5, 0xc793, /*0xd0-0xd7*/
+  0xddbf, 0xc794, 0xc795, 0xc796, 0xb2cb, 0xddc3, 0xc797, 0xddcb, /*0xd8-0xdf*/
+  0xb2a4, 0xddd5, 0xc798, 0xc799, 0xc79a, 0xddbe, 0xc79b, 0xc79c, /*0xe0-0xe7*/
+  0xc79d, 0xc6d0, 0xddd0, 0xc79e, 0xc79f, 0xc7a0, 0xc840, 0xc841, /*0xe8-0xef*/
+  0xddd4, 0xc1e2, 0xb7c6, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, /*0xf0-0xf7*/
+  0xddce, 0xddcf, 0xc847, 0xc848, 0xc849, 0xddc4, 0xc84a, 0xc84b, /*0xf8-0xff*/
+  /* 0x8400 */
+  0xc84c, 0xddbd, 0xc84d, 0xddcd, 0xccd1, 0xc84e, 0xddc9, 0xc84f, /*0x00-0x07*/
+  0xc850, 0xc851, 0xc852, 0xddc2, 0xc3c8, 0xc6bc, 0xceae, 0xddcc, /*0x08-0x0f*/
+  0xc853, 0xddc8, 0xc854, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, /*0x10-0x17*/
+  0xddc1, 0xc85a, 0xc85b, 0xc85c, 0xddc6, 0xc2dc, 0xc85d, 0xc85e, /*0x18-0x1f*/
+  0xc85f, 0xc860, 0xc861, 0xc862, 0xd3a9, 0xd3aa, 0xddd3, 0xcff4, /*0x20-0x27*/
+  0xc8f8, 0xc863, 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, /*0x28-0x2f*/
+  0xc86a, 0xdde6, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc870, /*0x30-0x37*/
+  0xddc7, 0xc871, 0xc872, 0xc873, 0xdde0, 0xc2e4, 0xc874, 0xc875, /*0x38-0x3f*/
+  0xc876, 0xc877, 0xc878, 0xc879, 0xc87a, 0xc87b, 0xdde1, 0xc87c, /*0x40-0x47*/
+  0xc87d, 0xc87e, 0xc880, 0xc881, 0xc882, 0xc883, 0xc884, 0xc885, /*0x48-0x4f*/
+  0xc886, 0xddd7, 0xc887, 0xc888, 0xc889, 0xc88a, 0xc88b, 0xd6f8, /*0x50-0x57*/
+  0xc88c, 0xddd9, 0xddd8, 0xb8f0, 0xddd6, 0xc88d, 0xc88e, 0xc88f, /*0x58-0x5f*/
+  0xc890, 0xc6cf, 0xc891, 0xb6ad, 0xc892, 0xc893, 0xc894, 0xc895, /*0x60-0x67*/
+  0xc896, 0xdde2, 0xc897, 0xbaf9, 0xd4e1, 0xdde7, 0xc898, 0xc899, /*0x68-0x6f*/
+  0xc89a, 0xb4d0, 0xc89b, 0xddda, 0xc89c, 0xbffb, 0xdde3, 0xc89d, /*0x70-0x77*/
+  0xdddf, 0xc89e, 0xdddd, 0xc89f, 0xc8a0, 0xc940, 0xc941, 0xc942, /*0x78-0x7f*/
+  0xc943, 0xc944, 0xb5d9, 0xc945, 0xc946, 0xc947, 0xc948, 0xdddb, /*0x80-0x87*/
+  0xdddc, 0xddde, 0xc949, 0xbdaf, 0xdde4, 0xc94a, 0xdde5, 0xc94b, /*0x88-0x8f*/
+  0xc94c, 0xc94d, 0xc94e, 0xc94f, 0xc950, 0xc951, 0xc952, 0xddf5, /*0x90-0x97*/
+  0xc953, 0xc3c9, 0xc954, 0xc955, 0xcbe2, 0xc956, 0xc957, 0xc958, /*0x98-0x9f*/
+  0xc959, 0xddf2, 0xc95a, 0xc95b, 0xc95c, 0xc95d, 0xc95e, 0xc95f, /*0xa0-0xa7*/
+  0xc960, 0xc961, 0xc962, 0xc963, 0xc964, 0xc965, 0xc966, 0xd8e1, /*0xa8-0xaf*/
+  0xc967, 0xc968, 0xc6d1, 0xc969, 0xddf4, 0xc96a, 0xc96b, 0xc96c, /*0xb0-0xb7*/
+  0xd5f4, 0xddf3, 0xddf0, 0xc96d, 0xc96e, 0xddec, 0xc96f, 0xddef, /*0xb8-0xbf*/
+  0xc970, 0xdde8, 0xc971, 0xc972, 0xd0ee, 0xc973, 0xc974, 0xc975, /*0xc0-0xc7*/
+  0xc976, 0xc8d8, 0xddee, 0xc977, 0xc978, 0xdde9, 0xc979, 0xc97a, /*0xc8-0xcf*/
+  0xddea, 0xcbf2, 0xc97b, 0xdded, 0xc97c, 0xc97d, 0xb1cd, 0xc97e, /*0xd0-0xd7*/
+  0xc980, 0xc981, 0xc982, 0xc983, 0xc984, 0xc0b6, 0xc985, 0xbcbb, /*0xd8-0xdf*/
+  0xddf1, 0xc986, 0xc987, 0xddf7, 0xc988, 0xddf6, 0xddeb, 0xc989, /*0xe0-0xe7*/
+  0xc98a, 0xc98b, 0xc98c, 0xc98d, 0xc5ee, 0xc98e, 0xc98f, 0xc990, /*0xe8-0xef*/
+  0xddfb, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, 0xc997, /*0xf0-0xf7*/
+  0xc998, 0xc999, 0xc99a, 0xc99b, 0xdea4, 0xc99c, 0xc99d, 0xdea3, /*0xf8-0xff*/
+  /* 0x8500 */
+  0xc99e, 0xc99f, 0xc9a0, 0xca40, 0xca41, 0xca42, 0xca43, 0xca44, /*0x00-0x07*/
+  0xca45, 0xca46, 0xca47, 0xca48, 0xddf8, 0xca49, 0xca4a, 0xca4b, /*0x08-0x0f*/
+  0xca4c, 0xc3ef, 0xca4d, 0xc2fb, 0xca4e, 0xca4f, 0xca50, 0xd5e1, /*0x10-0x17*/
+  0xca51, 0xca52, 0xceb5, 0xca53, 0xca54, 0xca55, 0xca56, 0xddfd, /*0x18-0x1f*/
+  0xca57, 0xb2cc, 0xca58, 0xca59, 0xca5a, 0xca5b, 0xca5c, 0xca5d, /*0x20-0x27*/
+  0xca5e, 0xca5f, 0xca60, 0xc4e8, 0xcadf, 0xca61, 0xca62, 0xca63, /*0x28-0x2f*/
+  0xca64, 0xca65, 0xca66, 0xca67, 0xca68, 0xca69, 0xca6a, 0xc7be, /*0x30-0x37*/
+  0xddfa, 0xddfc, 0xddfe, 0xdea2, 0xb0aa, 0xb1ce, 0xca6b, 0xca6c, /*0x38-0x3f*/
+  0xca6d, 0xca6e, 0xca6f, 0xdeac, 0xca70, 0xca71, 0xca72, 0xca73, /*0x40-0x47*/
+  0xdea6, 0xbdb6, 0xc8ef, 0xca74, 0xca75, 0xca76, 0xca77, 0xca78, /*0x48-0x4f*/
+  0xca79, 0xca7a, 0xca7b, 0xca7c, 0xca7d, 0xca7e, 0xdea1, 0xca80, /*0x50-0x57*/
+  0xca81, 0xdea5, 0xca82, 0xca83, 0xca84, 0xca85, 0xdea9, 0xca86, /*0x58-0x5f*/
+  0xca87, 0xca88, 0xca89, 0xca8a, 0xdea8, 0xca8b, 0xca8c, 0xca8d, /*0x60-0x67*/
+  0xdea7, 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca92, 0xca93, 0xca94, /*0x68-0x6f*/
+  0xca95, 0xca96, 0xdead, 0xca97, 0xd4cc, 0xca98, 0xca99, 0xca9a, /*0x70-0x77*/
+  0xca9b, 0xdeb3, 0xdeaa, 0xdeae, 0xca9c, 0xca9d, 0xc0d9, 0xca9e, /*0x78-0x7f*/
+  0xca9f, 0xcaa0, 0xcb40, 0xcb41, 0xb1a1, 0xdeb6, 0xcb42, 0xdeb1, /*0x80-0x87*/
+  0xcb43, 0xcb44, 0xcb45, 0xcb46, 0xcb47, 0xcb48, 0xcb49, 0xdeb2, /*0x88-0x8f*/
+  0xcb4a, 0xcb4b, 0xcb4c, 0xcb4d, 0xcb4e, 0xcb4f, 0xcb50, 0xcb51, /*0x90-0x97*/
+  0xcb52, 0xcb53, 0xcb54, 0xd1a6, 0xdeb5, 0xcb55, 0xcb56, 0xcb57, /*0x98-0x9f*/
+  0xcb58, 0xcb59, 0xcb5a, 0xcb5b, 0xdeaf, 0xcb5c, 0xcb5d, 0xcb5e, /*0xa0-0xa7*/
+  0xdeb0, 0xcb5f, 0xd0bd, 0xcb60, 0xcb61, 0xcb62, 0xdeb4, 0xcaed, /*0xa8-0xaf*/
+  0xdeb9, 0xcb63, 0xcb64, 0xcb65, 0xcb66, 0xcb67, 0xcb68, 0xdeb8, /*0xb0-0xb7*/
+  0xcb69, 0xdeb7, 0xcb6a, 0xcb6b, 0xcb6c, 0xcb6d, 0xcb6e, 0xcb6f, /*0xb8-0xbf*/
+  0xcb70, 0xdebb, 0xcb71, 0xcb72, 0xcb73, 0xcb74, 0xcb75, 0xcb76, /*0xc0-0xc7*/
+  0xcb77, 0xbde5, 0xcb78, 0xcb79, 0xcb7a, 0xcb7b, 0xcb7c, 0xb2d8, /*0xc8-0xcf*/
+  0xc3ea, 0xcb7d, 0xcb7e, 0xdeba, 0xcb80, 0xc5ba, 0xcb81, 0xcb82, /*0xd0-0xd7*/
+  0xcb83, 0xcb84, 0xcb85, 0xcb86, 0xdebc, 0xcb87, 0xcb88, 0xcb89, /*0xd8-0xdf*/
+  0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xccd9, 0xcb8e, 0xcb8f, 0xcb90, /*0xe0-0xe7*/
+  0xcb91, 0xb7aa, 0xcb92, 0xcb93, 0xcb94, 0xcb95, 0xcb96, 0xcb97, /*0xe8-0xef*/
+  0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9c, 0xcb9d, 0xcb9e, 0xcb9f, /*0xf0-0xf7*/
+  0xcba0, 0xcc40, 0xcc41, 0xd4e5, 0xcc42, 0xcc43, 0xcc44, 0xdebd, /*0xf8-0xff*/
+  /* 0x8600 */
+  0xcc45, 0xcc46, 0xcc47, 0xcc48, 0xcc49, 0xdebf, 0xcc4a, 0xcc4b, /*0x00-0x07*/
+  0xcc4c, 0xcc4d, 0xcc4e, 0xcc4f, 0xcc50, 0xcc51, 0xcc52, 0xcc53, /*0x08-0x0f*/
+  0xcc54, 0xc4a2, 0xcc55, 0xcc56, 0xcc57, 0xcc58, 0xdec1, 0xcc59, /*0x10-0x17*/
+  0xcc5a, 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, 0xcc60, 0xcc61, /*0x18-0x1f*/
+  0xcc62, 0xcc63, 0xcc64, 0xcc65, 0xcc66, 0xcc67, 0xcc68, 0xdebe, /*0x20-0x27*/
+  0xcc69, 0xdec0, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, 0xcc6f, /*0x28-0x2f*/
+  0xcc70, 0xcc71, 0xcc72, 0xcc73, 0xcc74, 0xcc75, 0xcc76, 0xcc77, /*0x30-0x37*/
+  0xd5ba, 0xcc78, 0xcc79, 0xcc7a, 0xdec2, 0xcc7b, 0xcc7c, 0xcc7d, /*0x38-0x3f*/
+  0xcc7e, 0xcc80, 0xcc81, 0xcc82, 0xcc83, 0xcc84, 0xcc85, 0xcc86, /*0x40-0x47*/
+  0xcc87, 0xcc88, 0xcc89, 0xcc8a, 0xcc8b, 0xf2ae, 0xbba2, 0xc2b2, /*0x48-0x4f*/
+  0xc5b0, 0xc2c7, 0xcc8c, 0xcc8d, 0xf2af, 0xcc8e, 0xcc8f, 0xcc90, /*0x50-0x57*/
+  0xcc91, 0xcc92, 0xd0e9, 0xcc93, 0xcc94, 0xcc95, 0xd3dd, 0xcc96, /*0x58-0x5f*/
+  0xcc97, 0xcc98, 0xebbd, 0xcc99, 0xcc9a, 0xcc9b, 0xcc9c, 0xcc9d, /*0x60-0x67*/
+  0xcc9e, 0xcc9f, 0xcca0, 0xb3e6, 0xf2b0, 0xcd40, 0xf2b1, 0xcd41, /*0x68-0x6f*/
+  0xcd42, 0xcaad, 0xcd43, 0xcd44, 0xcd45, 0xcd46, 0xcd47, 0xcd48, /*0x70-0x77*/
+  0xcd49, 0xbae7, 0xf2b3, 0xf2b5, 0xf2b4, 0xcbe4, 0xcfba, 0xf2b2, /*0x78-0x7f*/
+  0xcab4, 0xd2cf, 0xc2ec, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, /*0x80-0x87*/
+  0xcd4f, 0xcd50, 0xcec3, 0xf2b8, 0xb0f6, 0xf2b7, 0xcd51, 0xcd52, /*0x88-0x8f*/
+  0xcd53, 0xcd54, 0xcd55, 0xf2be, 0xcd56, 0xb2cf, 0xcd57, 0xcd58, /*0x90-0x97*/
+  0xcd59, 0xcd5a, 0xcd5b, 0xcd5c, 0xd1c1, 0xf2ba, 0xcd5d, 0xcd5e, /*0x98-0x9f*/
+  0xcd5f, 0xcd60, 0xcd61, 0xf2bc, 0xd4e9, 0xcd62, 0xcd63, 0xf2bb, /*0xa0-0xa7*/
+  0xf2b6, 0xf2bf, 0xf2bd, 0xcd64, 0xf2b9, 0xcd65, 0xcd66, 0xf2c7, /*0xa8-0xaf*/
+  0xf2c4, 0xf2c6, 0xcd67, 0xcd68, 0xf2ca, 0xf2c2, 0xf2c0, 0xcd69, /*0xb0-0xb7*/
+  0xcd6a, 0xcd6b, 0xf2c5, 0xcd6c, 0xcd6d, 0xcd6e, 0xcd6f, 0xcd70, /*0xb8-0xbf*/
+  0xd6fb, 0xcd71, 0xcd72, 0xcd73, 0xf2c1, 0xcd74, 0xc7f9, 0xc9df, /*0xc0-0xc7*/
+  0xcd75, 0xf2c8, 0xb9c6, 0xb5b0, 0xcd76, 0xcd77, 0xf2c3, 0xf2c9, /*0xc8-0xcf*/
+  0xf2d0, 0xf2d6, 0xcd78, 0xcd79, 0xbbd7, 0xcd7a, 0xcd7b, 0xcd7c, /*0xd0-0xd7*/
+  0xf2d5, 0xcddc, 0xcd7d, 0xd6eb, 0xcd7e, 0xcd80, 0xf2d2, 0xf2d4, /*0xd8-0xdf*/
+  0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xb8f2, 0xcd85, 0xcd86, 0xcd87, /*0xe0-0xe7*/
+  0xcd88, 0xf2cb, 0xcd89, 0xcd8a, 0xcd8b, 0xf2ce, 0xc2f9, 0xcd8c, /*0xe8-0xef*/
+  0xd5dd, 0xf2cc, 0xf2cd, 0xf2cf, 0xf2d3, 0xcd8d, 0xcd8e, 0xcd8f, /*0xf0-0xf7*/
+  0xf2d9, 0xd3bc, 0xcd90, 0xcd91, 0xcd92, 0xcd93, 0xb6ea, 0xcd94, /*0xf8-0xff*/
+  /* 0x8700 */
+  0xcaf1, 0xcd95, 0xb7e4, 0xf2d7, 0xcd96, 0xcd97, 0xcd98, 0xf2d8, /*0x00-0x07*/
+  0xf2da, 0xf2dd, 0xf2db, 0xcd99, 0xcd9a, 0xf2dc, 0xcd9b, 0xcd9c, /*0x08-0x0f*/
+  0xcd9d, 0xcd9e, 0xd1d1, 0xf2d1, 0xcd9f, 0xcdc9, 0xcda0, 0xcecf, /*0x10-0x17*/
+  0xd6a9, 0xce40, 0xf2e3, 0xce41, 0xc3db, 0xce42, 0xf2e0, 0xce43, /*0x18-0x1f*/
+  0xce44, 0xc0af, 0xf2ec, 0xf2de, 0xce45, 0xf2e1, 0xce46, 0xce47, /*0x20-0x27*/
+  0xce48, 0xf2e8, 0xce49, 0xce4a, 0xce4b, 0xce4c, 0xf2e2, 0xce4d, /*0x28-0x2f*/
+  0xce4e, 0xf2e7, 0xce4f, 0xce50, 0xf2e6, 0xce51, 0xce52, 0xf2e9, /*0x30-0x37*/
+  0xce53, 0xce54, 0xce55, 0xf2df, 0xce56, 0xce57, 0xf2e4, 0xf2ea, /*0x38-0x3f*/
+  0xce58, 0xce59, 0xce5a, 0xce5b, 0xce5c, 0xce5d, 0xce5e, 0xd3ac, /*0x40-0x47*/
+  0xf2e5, 0xb2f5, 0xce5f, 0xce60, 0xf2f2, 0xce61, 0xd0ab, 0xce62, /*0x48-0x4f*/
+  0xce63, 0xce64, 0xce65, 0xf2f5, 0xce66, 0xce67, 0xce68, 0xbbc8, /*0x50-0x57*/
+  0xce69, 0xf2f9, 0xce6a, 0xce6b, 0xce6c, 0xce6d, 0xce6e, 0xce6f, /*0x58-0x5f*/
+  0xf2f0, 0xce70, 0xce71, 0xf2f6, 0xf2f8, 0xf2fa, 0xce72, 0xce73, /*0x60-0x67*/
+  0xce74, 0xce75, 0xce76, 0xce77, 0xce78, 0xce79, 0xf2f3, 0xce7a, /*0x68-0x6f*/
+  0xf2f1, 0xce7b, 0xce7c, 0xce7d, 0xbafb, 0xce7e, 0xb5fb, 0xce80, /*0x70-0x77*/
+  0xce81, 0xce82, 0xce83, 0xf2ef, 0xf2f7, 0xf2ed, 0xf2ee, 0xce84, /*0x78-0x7f*/
+  0xce85, 0xce86, 0xf2eb, 0xf3a6, 0xce87, 0xf3a3, 0xce88, 0xce89, /*0x80-0x87*/
+  0xf3a2, 0xce8a, 0xce8b, 0xf2f4, 0xce8c, 0xc8da, 0xce8d, 0xce8e, /*0x88-0x8f*/
+  0xce8f, 0xce90, 0xce91, 0xf2fb, 0xce92, 0xce93, 0xce94, 0xf3a5, /*0x90-0x97*/
+  0xce95, 0xce96, 0xce97, 0xce98, 0xce99, 0xce9a, 0xce9b, 0xc3f8, /*0x98-0x9f*/
+  0xce9c, 0xce9d, 0xce9e, 0xce9f, 0xcea0, 0xcf40, 0xcf41, 0xcf42, /*0xa0-0xa7*/
+  0xf2fd, 0xcf43, 0xcf44, 0xf3a7, 0xf3a9, 0xf3a4, 0xcf45, 0xf2fc, /*0xa8-0xaf*/
+  0xcf46, 0xcf47, 0xcf48, 0xf3ab, 0xcf49, 0xf3aa, 0xcf4a, 0xcf4b, /*0xb0-0xb7*/
+  0xcf4c, 0xcf4d, 0xc2dd, 0xcf4e, 0xcf4f, 0xf3ae, 0xcf50, 0xcf51, /*0xb8-0xbf*/
+  0xf3b0, 0xcf52, 0xcf53, 0xcf54, 0xcf55, 0xcf56, 0xf3a1, 0xcf57, /*0xc0-0xc7*/
+  0xcf58, 0xcf59, 0xf3b1, 0xf3ac, 0xcf5a, 0xcf5b, 0xcf5c, 0xcf5d, /*0xc8-0xcf*/
+  0xcf5e, 0xf3af, 0xf2fe, 0xf3ad, 0xcf5f, 0xcf60, 0xcf61, 0xcf62, /*0xd0-0xd7*/
+  0xcf63, 0xcf64, 0xcf65, 0xf3b2, 0xcf66, 0xcf67, 0xcf68, 0xcf69, /*0xd8-0xdf*/
+  0xf3b4, 0xcf6a, 0xcf6b, 0xcf6c, 0xcf6d, 0xf3a8, 0xcf6e, 0xcf6f, /*0xe0-0xe7*/
+  0xcf70, 0xcf71, 0xf3b3, 0xcf72, 0xcf73, 0xcf74, 0xf3b5, 0xcf75, /*0xe8-0xef*/
+  0xcf76, 0xcf77, 0xcf78, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, /*0xf0-0xf7*/
+  0xcf7e, 0xd0b7, 0xcf80, 0xcf81, 0xcf82, 0xcf83, 0xf3b8, 0xcf84, /*0xf8-0xff*/
+  /* 0x8800 */
+  0xcf85, 0xcf86, 0xcf87, 0xd9f9, 0xcf88, 0xcf89, 0xcf8a, 0xcf8b, /*0x00-0x07*/
+  0xcf8c, 0xcf8d, 0xf3b9, 0xcf8e, 0xcf8f, 0xcf90, 0xcf91, 0xcf92, /*0x08-0x0f*/
+  0xcf93, 0xcf94, 0xcf95, 0xf3b7, 0xcf96, 0xc8e4, 0xf3b6, 0xcf97, /*0x10-0x17*/
+  0xcf98, 0xcf99, 0xcf9a, 0xf3ba, 0xcf9b, 0xcf9c, 0xcf9d, 0xcf9e, /*0x18-0x1f*/
+  0xcf9f, 0xf3bb, 0xb4c0, 0xcfa0, 0xd040, 0xd041, 0xd042, 0xd043, /*0x20-0x27*/
+  0xd044, 0xd045, 0xd046, 0xd047, 0xd048, 0xd049, 0xd04a, 0xd04b, /*0x28-0x2f*/
+  0xd04c, 0xd04d, 0xeec3, 0xd04e, 0xd04f, 0xd050, 0xd051, 0xd052, /*0x30-0x37*/
+  0xd053, 0xf3bc, 0xd054, 0xd055, 0xf3bd, 0xd056, 0xd057, 0xd058, /*0x38-0x3f*/
+  0xd1aa, 0xd059, 0xd05a, 0xd05b, 0xf4ac, 0xd0c6, 0xd05c, 0xd05d, /*0x40-0x47*/
+  0xd05e, 0xd05f, 0xd060, 0xd061, 0xd0d0, 0xd1dc, 0xd062, 0xd063, /*0x48-0x4f*/
+  0xd064, 0xd065, 0xd066, 0xd067, 0xcfce, 0xd068, 0xd069, 0xbdd6, /*0x50-0x57*/
+  0xd06a, 0xd1c3, 0xd06b, 0xd06c, 0xd06d, 0xd06e, 0xd06f, 0xd070, /*0x58-0x5f*/
+  0xd071, 0xbae2, 0xe1e9, 0xd2c2, 0xf1c2, 0xb2b9, 0xd072, 0xd073, /*0x60-0x67*/
+  0xb1ed, 0xf1c3, 0xd074, 0xc9c0, 0xb3c4, 0xd075, 0xd9f2, 0xd076, /*0x68-0x6f*/
+  0xcba5, 0xd077, 0xf1c4, 0xd078, 0xd079, 0xd07a, 0xd07b, 0xd6d4, /*0x70-0x77*/
+  0xd07c, 0xd07d, 0xd07e, 0xd080, 0xd081, 0xf1c5, 0xf4c0, 0xf1c6, /*0x78-0x7f*/
+  0xd082, 0xd4ac, 0xf1c7, 0xd083, 0xb0c0, 0xf4c1, 0xd084, 0xd085, /*0x80-0x87*/
+  0xf4c2, 0xd086, 0xd087, 0xb4fc, 0xd088, 0xc5db, 0xd089, 0xd08a, /*0x88-0x8f*/
+  0xd08b, 0xd08c, 0xccbb, 0xd08d, 0xd08e, 0xd08f, 0xd0e4, 0xd090, /*0x90-0x97*/
+  0xd091, 0xd092, 0xd093, 0xd094, 0xcde0, 0xd095, 0xd096, 0xd097, /*0x98-0x9f*/
+  0xd098, 0xd099, 0xf1c8, 0xd09a, 0xd9f3, 0xd09b, 0xd09c, 0xd09d, /*0xa0-0xa7*/
+  0xd09e, 0xd09f, 0xd0a0, 0xb1bb, 0xd140, 0xcfae, 0xd141, 0xd142, /*0xa8-0xaf*/
+  0xd143, 0xb8a4, 0xd144, 0xd145, 0xd146, 0xd147, 0xd148, 0xf1ca, /*0xb0-0xb7*/
+  0xd149, 0xd14a, 0xd14b, 0xd14c, 0xf1cb, 0xd14d, 0xd14e, 0xd14f, /*0xb8-0xbf*/
+  0xd150, 0xb2c3, 0xc1d1, 0xd151, 0xd152, 0xd7b0, 0xf1c9, 0xd153, /*0xc0-0xc7*/
+  0xd154, 0xf1cc, 0xd155, 0xd156, 0xd157, 0xd158, 0xf1ce, 0xd159, /*0xc8-0xcf*/
+  0xd15a, 0xd15b, 0xd9f6, 0xd15c, 0xd2e1, 0xd4a3, 0xd15d, 0xd15e, /*0xd0-0xd7*/
+  0xf4c3, 0xc8b9, 0xd15f, 0xd160, 0xd161, 0xd162, 0xd163, 0xf4c4, /*0xd8-0xdf*/
+  0xd164, 0xd165, 0xf1cd, 0xf1cf, 0xbfe3, 0xf1d0, 0xd166, 0xd167, /*0xe0-0xe7*/
+  0xf1d4, 0xd168, 0xd169, 0xd16a, 0xd16b, 0xd16c, 0xd16d, 0xd16e, /*0xe8-0xef*/
+  0xf1d6, 0xf1d1, 0xd16f, 0xc9d1, 0xc5e1, 0xd170, 0xd171, 0xd172, /*0xf0-0xf7*/
+  0xc2e3, 0xb9fc, 0xd173, 0xd174, 0xf1d3, 0xd175, 0xf1d5, 0xd176, /*0xf8-0xff*/
+  /* 0x8900 */
+  0xd177, 0xd178, 0xb9d3, 0xd179, 0xd17a, 0xd17b, 0xd17c, 0xd17d, /*0x00-0x07*/
+  0xd17e, 0xd180, 0xf1db, 0xd181, 0xd182, 0xd183, 0xd184, 0xd185, /*0x08-0x0f*/
+  0xbad6, 0xd186, 0xb0fd, 0xf1d9, 0xd187, 0xd188, 0xd189, 0xd18a, /*0x10-0x17*/
+  0xd18b, 0xf1d8, 0xf1d2, 0xf1da, 0xd18c, 0xd18d, 0xd18e, 0xd18f, /*0x18-0x1f*/
+  0xd190, 0xf1d7, 0xd191, 0xd192, 0xd193, 0xc8ec, 0xd194, 0xd195, /*0x20-0x27*/
+  0xd196, 0xd197, 0xcdca, 0xf1dd, 0xd198, 0xd199, 0xd19a, 0xd19b, /*0x28-0x2f*/
+  0xe5bd, 0xd19c, 0xd19d, 0xd19e, 0xf1dc, 0xd19f, 0xf1de, 0xd1a0, /*0x30-0x37*/
+  0xd240, 0xd241, 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, /*0x38-0x3f*/
+  0xd248, 0xf1df, 0xd249, 0xd24a, 0xcfe5, 0xd24b, 0xd24c, 0xd24d, /*0x40-0x47*/
+  0xd24e, 0xd24f, 0xd250, 0xd251, 0xd252, 0xd253, 0xd254, 0xd255, /*0x48-0x4f*/
+  0xd256, 0xd257, 0xd258, 0xd259, 0xd25a, 0xd25b, 0xd25c, 0xd25d, /*0x50-0x57*/
+  0xd25e, 0xd25f, 0xd260, 0xd261, 0xd262, 0xd263, 0xf4c5, 0xbdf3, /*0x58-0x5f*/
+  0xd264, 0xd265, 0xd266, 0xd267, 0xd268, 0xd269, 0xf1e0, 0xd26a, /*0x60-0x67*/
+  0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, 0xd270, 0xd271, 0xd272, /*0x68-0x6f*/
+  0xd273, 0xd274, 0xd275, 0xd276, 0xd277, 0xd278, 0xd279, 0xd27a, /*0x70-0x77*/
+  0xd27b, 0xd27c, 0xd27d, 0xf1e1, 0xd27e, 0xd280, 0xd281, 0xcef7, /*0x78-0x7f*/
+  0xd282, 0xd2aa, 0xd283, 0xf1fb, 0xd284, 0xd285, 0xb8b2, 0xd286, /*0x80-0x87*/
+  0xd287, 0xd288, 0xd289, 0xd28a, 0xd28b, 0xd28c, 0xd28d, 0xd28e, /*0x88-0x8f*/
+  0xd28f, 0xd290, 0xd291, 0xd292, 0xd293, 0xd294, 0xd295, 0xd296, /*0x90-0x97*/
+  0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29c, 0xd29d, 0xd29e, /*0x98-0x9f*/
+  0xd29f, 0xd2a0, 0xd340, 0xd341, 0xd342, 0xd343, 0xd344, 0xd345, /*0xa0-0xa7*/
+  0xd346, 0xd347, 0xd348, 0xd349, 0xd34a, 0xd34b, 0xd34c, 0xd34d, /*0xa8-0xaf*/
+  0xd34e, 0xd34f, 0xd350, 0xd351, 0xd352, 0xd353, 0xd354, 0xd355, /*0xb0-0xb7*/
+  0xd356, 0xd357, 0xd358, 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, /*0xb8-0xbf*/
+  0xd35e, 0xbcfb, 0xb9db, 0xd35f, 0xb9e6, 0xc3d9, 0xcad3, 0xeae8, /*0xc0-0xc7*/
+  0xc0c0, 0xbef5, 0xeae9, 0xeaea, 0xeaeb, 0xd360, 0xeaec, 0xeaed, /*0xc8-0xcf*/
+  0xeaee, 0xeaef, 0xbdc7, 0xd361, 0xd362, 0xd363, 0xf5fb, 0xd364, /*0xd0-0xd7*/
+  0xd365, 0xd366, 0xf5fd, 0xd367, 0xf5fe, 0xd368, 0xf5fc, 0xd369, /*0xd8-0xdf*/
+  0xd36a, 0xd36b, 0xd36c, 0xbde2, 0xd36d, 0xf6a1, 0xb4a5, 0xd36e, /*0xe0-0xe7*/
+  0xd36f, 0xd370, 0xd371, 0xf6a2, 0xd372, 0xd373, 0xd374, 0xf6a3, /*0xe8-0xef*/
+  0xd375, 0xd376, 0xd377, 0xecb2, 0xd378, 0xd379, 0xd37a, 0xd37b, /*0xf0-0xf7*/
+  0xd37c, 0xd37d, 0xd37e, 0xd380, 0xd381, 0xd382, 0xd383, 0xd384, /*0xf8-0xff*/
+  /* 0x8a00 */
+  0xd1d4, 0xd385, 0xd386, 0xd387, 0xd388, 0xd389, 0xd38a, 0xd9ea, /*0x00-0x07*/
+  0xd38b, 0xd38c, 0xd38d, 0xd38e, 0xd38f, 0xd390, 0xd391, 0xd392, /*0x08-0x0f*/
+  0xd393, 0xd394, 0xd395, 0xd396, 0xd397, 0xd398, 0xd399, 0xd39a, /*0x10-0x17*/
+  0xd39b, 0xd39c, 0xd39d, 0xd39e, 0xd39f, 0xd3a0, 0xd440, 0xd441, /*0x18-0x1f*/
+  0xd442, 0xd443, 0xd444, 0xd445, 0xd446, 0xd447, 0xd448, 0xd449, /*0x20-0x27*/
+  0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, 0xd44f, 0xd450, 0xd451, /*0x28-0x2f*/
+  0xd452, 0xd453, 0xd454, 0xd455, 0xd456, 0xd457, 0xd458, 0xd459, /*0x30-0x37*/
+  0xd45a, 0xd45b, 0xd45c, 0xd45d, 0xd45e, 0xd45f, 0xf6a4, 0xd460, /*0x38-0x3f*/
+  0xd461, 0xd462, 0xd463, 0xd464, 0xd465, 0xd466, 0xd467, 0xd468, /*0x40-0x47*/
+  0xeeba, 0xd469, 0xd46a, 0xd46b, 0xd46c, 0xd46d, 0xd46e, 0xd46f, /*0x48-0x4f*/
+  0xd470, 0xd471, 0xd472, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, /*0x50-0x57*/
+  0xd478, 0xd479, 0xd47a, 0xd47b, 0xd47c, 0xd47d, 0xd47e, 0xd480, /*0x58-0x5f*/
+  0xd481, 0xd482, 0xd483, 0xd484, 0xd485, 0xd486, 0xd487, 0xd488, /*0x60-0x67*/
+  0xd489, 0xd48a, 0xd48b, 0xd48c, 0xd48d, 0xd48e, 0xd48f, 0xd490, /*0x68-0x6f*/
+  0xd491, 0xd492, 0xd493, 0xd494, 0xd495, 0xd496, 0xd497, 0xd498, /*0x70-0x77*/
+  0xd499, 0xd5b2, 0xd49a, 0xd49b, 0xd49c, 0xd49d, 0xd49e, 0xd49f, /*0x78-0x7f*/
+  0xd4a0, 0xd540, 0xd541, 0xd542, 0xd543, 0xd544, 0xd545, 0xd546, /*0x80-0x87*/
+  0xd547, 0xd3fe, 0xccdc, 0xd548, 0xd549, 0xd54a, 0xd54b, 0xd54c, /*0x88-0x8f*/
+  0xd54d, 0xd54e, 0xd54f, 0xcac4, 0xd550, 0xd551, 0xd552, 0xd553, /*0x90-0x97*/
+  0xd554, 0xd555, 0xd556, 0xd557, 0xd558, 0xd559, 0xd55a, 0xd55b, /*0x98-0x9f*/
+  0xd55c, 0xd55d, 0xd55e, 0xd55f, 0xd560, 0xd561, 0xd562, 0xd563, /*0xa0-0xa7*/
+  0xd564, 0xd565, 0xd566, 0xd567, 0xd568, 0xd569, 0xd56a, 0xd56b, /*0xa8-0xaf*/
+  0xd56c, 0xd56d, 0xd56e, 0xd56f, 0xd570, 0xd571, 0xd572, 0xd573, /*0xb0-0xb7*/
+  0xd574, 0xd575, 0xd576, 0xd577, 0xd578, 0xd579, 0xd57a, 0xd57b, /*0xb8-0xbf*/
+  0xd57c, 0xd57d, 0xd57e, 0xd580, 0xd581, 0xd582, 0xd583, 0xd584, /*0xc0-0xc7*/
+  0xd585, 0xd586, 0xd587, 0xd588, 0xd589, 0xd58a, 0xd58b, 0xd58c, /*0xc8-0xcf*/
+  0xd58d, 0xd58e, 0xd58f, 0xd590, 0xd591, 0xd592, 0xd593, 0xd594, /*0xd0-0xd7*/
+  0xd595, 0xd596, 0xd597, 0xd598, 0xd599, 0xd59a, 0xd59b, 0xd59c, /*0xd8-0xdf*/
+  0xd59d, 0xd59e, 0xd59f, 0xd5a0, 0xd640, 0xd641, 0xd642, 0xd643, /*0xe0-0xe7*/
+  0xd644, 0xd645, 0xd646, 0xd647, 0xd648, 0xd649, 0xd64a, 0xd64b, /*0xe8-0xef*/
+  0xd64c, 0xd64d, 0xd64e, 0xd64f, 0xd650, 0xd651, 0xd652, 0xd653, /*0xf0-0xf7*/
+  0xd654, 0xd655, 0xd656, 0xd657, 0xd658, 0xd659, 0xd65a, 0xd65b, /*0xf8-0xff*/
+  /* 0x8b00 */
+  0xd65c, 0xd65d, 0xd65e, 0xd65f, 0xd660, 0xd661, 0xd662, 0xe5c0, /*0x00-0x07*/
+  0xd663, 0xd664, 0xd665, 0xd666, 0xd667, 0xd668, 0xd669, 0xd66a, /*0x08-0x0f*/
+  0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, 0xd670, 0xd671, 0xd672, /*0x10-0x17*/
+  0xd673, 0xd674, 0xd675, 0xd676, 0xd677, 0xd678, 0xd679, 0xd67a, /*0x18-0x1f*/
+  0xd67b, 0xd67c, 0xd67d, 0xd67e, 0xd680, 0xd681, 0xf6a5, 0xd682, /*0x20-0x27*/
+  0xd683, 0xd684, 0xd685, 0xd686, 0xd687, 0xd688, 0xd689, 0xd68a, /*0x28-0x2f*/
+  0xd68b, 0xd68c, 0xd68d, 0xd68e, 0xd68f, 0xd690, 0xd691, 0xd692, /*0x30-0x37*/
+  0xd693, 0xd694, 0xd695, 0xd696, 0xd697, 0xd698, 0xd699, 0xd69a, /*0x38-0x3f*/
+  0xd69b, 0xd69c, 0xd69d, 0xd69e, 0xd69f, 0xd6a0, 0xd740, 0xd741, /*0x40-0x47*/
+  0xd742, 0xd743, 0xd744, 0xd745, 0xd746, 0xd747, 0xd748, 0xd749, /*0x48-0x4f*/
+  0xd74a, 0xd74b, 0xd74c, 0xd74d, 0xd74e, 0xd74f, 0xd750, 0xd751, /*0x50-0x57*/
+  0xd752, 0xd753, 0xd754, 0xd755, 0xd756, 0xd757, 0xd758, 0xd759, /*0x58-0x5f*/
+  0xd75a, 0xd75b, 0xd75c, 0xd75d, 0xd75e, 0xd75f, 0xbeaf, 0xd760, /*0x60-0x67*/
+  0xd761, 0xd762, 0xd763, 0xd764, 0xc6a9, 0xd765, 0xd766, 0xd767, /*0x68-0x6f*/
+  0xd768, 0xd769, 0xd76a, 0xd76b, 0xd76c, 0xd76d, 0xd76e, 0xd76f, /*0x70-0x77*/
+  0xd770, 0xd771, 0xd772, 0xd773, 0xd774, 0xd775, 0xd776, 0xd777, /*0x78-0x7f*/
+  0xd778, 0xd779, 0xd77a, 0xd77b, 0xd77c, 0xd77d, 0xd77e, 0xd780, /*0x80-0x87*/
+  0xd781, 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, 0xd788, /*0x88-0x8f*/
+  0xd789, 0xd78a, 0xd78b, 0xd78c, 0xd78d, 0xd78e, 0xd78f, 0xd790, /*0x90-0x97*/
+  0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, 0xd797, 0xd798, /*0x98-0x9f*/
+  0xdaa5, 0xbcc6, 0xb6a9, 0xb8bc, 0xc8cf, 0xbca5, 0xdaa6, 0xdaa7, /*0xa0-0xa7*/
+  0xccd6, 0xc8c3, 0xdaa8, 0xc6fd, 0xd799, 0xd1b5, 0xd2e9, 0xd1b6, /*0xa8-0xaf*/
+  0xbcc7, 0xd79a, 0xbdb2, 0xbbe4, 0xdaa9, 0xdaaa, 0xd1c8, 0xdaab, /*0xb0-0xb7*/
+  0xd0ed, 0xb6ef, 0xc2db, 0xd79b, 0xcbcf, 0xb7ed, 0xc9e8, 0xb7c3, /*0xb8-0xbf*/
+  0xbef7, 0xd6a4, 0xdaac, 0xdaad, 0xc6c0, 0xd7e7, 0xcab6, 0xd79c, /*0xc0-0xc7*/
+  0xd5a9, 0xcbdf, 0xd5ef, 0xdaae, 0xd6df, 0xb4ca, 0xdab0, 0xdaaf, /*0xc8-0xcf*/
+  0xd79d, 0xd2eb, 0xdab1, 0xdab2, 0xdab3, 0xcad4, 0xdab4, 0xcaab, /*0xd0-0xd7*/
+  0xdab5, 0xdab6, 0xb3cf, 0xd6ef, 0xdab7, 0xbbb0, 0xb5ae, 0xdab8, /*0xd8-0xdf*/
+  0xdab9, 0xb9ee, 0xd1af, 0xd2e8, 0xdaba, 0xb8c3, 0xcfea, 0xb2ef, /*0xe0-0xe7*/
+  0xdabb, 0xdabc, 0xd79e, 0xbdeb, 0xcedc, 0xd3ef, 0xdabd, 0xcef3, /*0xe8-0xef*/
+  0xdabe, 0xd3d5, 0xbbe5, 0xdabf, 0xcbb5, 0xcbd0, 0xdac0, 0xc7eb, /*0xf0-0xf7*/
+  0xd6ee, 0xdac1, 0xc5b5, 0xb6c1, 0xdac2, 0xb7cc, 0xbfce, 0xdac3, /*0xf8-0xff*/
+  /* 0x8c00 */
+  0xdac4, 0xcbad, 0xdac5, 0xb5f7, 0xdac6, 0xc1c2, 0xd7bb, 0xdac7, /*0x00-0x07*/
+  0xccb8, 0xd79f, 0xd2ea, 0xc4b1, 0xdac8, 0xb5fd, 0xbbd1, 0xdac9, /*0x08-0x0f*/
+  0xd0b3, 0xdaca, 0xdacb, 0xcebd, 0xdacc, 0xdacd, 0xdace, 0xb2f7, /*0x10-0x17*/
+  0xdad1, 0xdacf, 0xd1e8, 0xdad0, 0xc3d5, 0xdad2, 0xd7a0, 0xdad3, /*0x18-0x1f*/
+  0xdad4, 0xdad5, 0xd0bb, 0xd2a5, 0xb0f9, 0xdad6, 0xc7ab, 0xdad7, /*0x20-0x27*/
+  0xbdf7, 0xc3a1, 0xdad8, 0xdad9, 0xc3fd, 0xccb7, 0xdada, 0xdadb, /*0x28-0x2f*/
+  0xc0be, 0xc6d7, 0xdadc, 0xdadd, 0xc7b4, 0xdade, 0xdadf, 0xb9c8, /*0x30-0x37*/
+  0xd840, 0xd841, 0xd842, 0xd843, 0xd844, 0xd845, 0xd846, 0xd847, /*0x38-0x3f*/
+  0xd848, 0xbbed, 0xd849, 0xd84a, 0xd84b, 0xd84c, 0xb6b9, 0xf4f8, /*0x40-0x47*/
+  0xd84d, 0xf4f9, 0xd84e, 0xd84f, 0xcde3, 0xd850, 0xd851, 0xd852, /*0x48-0x4f*/
+  0xd853, 0xd854, 0xd855, 0xd856, 0xd857, 0xf5b9, 0xd858, 0xd859, /*0x50-0x57*/
+  0xd85a, 0xd85b, 0xebe0, 0xd85c, 0xd85d, 0xd85e, 0xd85f, 0xd860, /*0x58-0x5f*/
+  0xd861, 0xcff3, 0xbbbf, 0xd862, 0xd863, 0xd864, 0xd865, 0xd866, /*0x60-0x67*/
+  0xd867, 0xd868, 0xbac0, 0xd4a5, 0xd869, 0xd86a, 0xd86b, 0xd86c, /*0x68-0x6f*/
+  0xd86d, 0xd86e, 0xd86f, 0xe1d9, 0xd870, 0xd871, 0xd872, 0xd873, /*0x70-0x77*/
+  0xf5f4, 0xb1aa, 0xb2f2, 0xd874, 0xd875, 0xd876, 0xd877, 0xd878, /*0x78-0x7f*/
+  0xd879, 0xd87a, 0xf5f5, 0xd87b, 0xd87c, 0xf5f7, 0xd87d, 0xd87e, /*0x80-0x87*/
+  0xd880, 0xbad1, 0xf5f6, 0xd881, 0xc3b2, 0xd882, 0xd883, 0xd884, /*0x88-0x8f*/
+  0xd885, 0xd886, 0xd887, 0xd888, 0xf5f9, 0xd889, 0xd88a, 0xd88b, /*0x90-0x97*/
+  0xf5f8, 0xd88c, 0xd88d, 0xd88e, 0xd88f, 0xd890, 0xd891, 0xd892, /*0x98-0x9f*/
+  0xd893, 0xd894, 0xd895, 0xd896, 0xd897, 0xd898, 0xd899, 0xd89a, /*0xa0-0xa7*/
+  0xd89b, 0xd89c, 0xd89d, 0xd89e, 0xd89f, 0xd8a0, 0xd940, 0xd941, /*0xa8-0xaf*/
+  0xd942, 0xd943, 0xd944, 0xd945, 0xd946, 0xd947, 0xd948, 0xd949, /*0xb0-0xb7*/
+  0xd94a, 0xd94b, 0xd94c, 0xd94d, 0xd94e, 0xd94f, 0xd950, 0xd951, /*0xb8-0xbf*/
+  0xd952, 0xd953, 0xd954, 0xd955, 0xd956, 0xd957, 0xd958, 0xd959, /*0xc0-0xc7*/
+  0xd95a, 0xd95b, 0xd95c, 0xd95d, 0xd95e, 0xd95f, 0xd960, 0xd961, /*0xc8-0xcf*/
+  0xd962, 0xd963, 0xd964, 0xd965, 0xd966, 0xd967, 0xd968, 0xd969, /*0xd0-0xd7*/
+  0xd96a, 0xd96b, 0xd96c, 0xd96d, 0xd96e, 0xd96f, 0xd970, 0xd971, /*0xd8-0xdf*/
+  0xd972, 0xd973, 0xd974, 0xd975, 0xd976, 0xd977, 0xd978, 0xd979, /*0xe0-0xe7*/
+  0xd97a, 0xd97b, 0xd97c, 0xd97d, 0xd97e, 0xd980, 0xd981, 0xd982, /*0xe8-0xef*/
+  0xd983, 0xd984, 0xd985, 0xd986, 0xd987, 0xd988, 0xd989, 0xd98a, /*0xf0-0xf7*/
+  0xd98b, 0xd98c, 0xd98d, 0xd98e, 0xd98f, 0xd990, 0xd991, 0xd992, /*0xf8-0xff*/
+  /* 0x8d00 */
+  0xd993, 0xd994, 0xd995, 0xd996, 0xd997, 0xd998, 0xd999, 0xd99a, /*0x00-0x07*/
+  0xd99b, 0xd99c, 0xd99d, 0xd99e, 0xd99f, 0xd9a0, 0xda40, 0xda41, /*0x08-0x0f*/
+  0xda42, 0xda43, 0xda44, 0xda45, 0xda46, 0xda47, 0xda48, 0xda49, /*0x10-0x17*/
+  0xda4a, 0xda4b, 0xda4c, 0xda4d, 0xda4e, 0xb1b4, 0xd5ea, 0xb8ba, /*0x18-0x1f*/
+  0xda4f, 0xb9b1, 0xb2c6, 0xd4f0, 0xcfcd, 0xb0dc, 0xd5cb, 0xbbf5, /*0x20-0x27*/
+  0xd6ca, 0xb7b7, 0xccb0, 0xc6b6, 0xb1e1, 0xb9ba, 0xd6fc, 0xb9e1, /*0x28-0x2f*/
+  0xb7a1, 0xbcfa, 0xeada, 0xeadb, 0xccf9, 0xb9f3, 0xeadc, 0xb4fb, /*0x30-0x37*/
+  0xc3b3, 0xb7d1, 0xbad8, 0xeadd, 0xd4f4, 0xeade, 0xbcd6, 0xbbdf, /*0x38-0x3f*/
+  0xeadf, 0xc1de, 0xc2b8, 0xd4df, 0xd7ca, 0xeae0, 0xeae1, 0xeae4, /*0x40-0x47*/
+  0xeae2, 0xeae3, 0xc9de, 0xb8b3, 0xb6c4, 0xeae5, 0xcaea, 0xc9cd, /*0x48-0x4f*/
+  0xb4cd, 0xda50, 0xda51, 0xe2d9, 0xc5e2, 0xeae6, 0xc0b5, 0xda52, /*0x50-0x57*/
+  0xd7b8, 0xeae7, 0xd7ac, 0xc8fc, 0xd8d3, 0xd8cd, 0xd4de, 0xda53, /*0x58-0x5f*/
+  0xd4f9, 0xc9c4, 0xd3ae, 0xb8d3, 0xb3e0, 0xda54, 0xc9e2, 0xf4f6, /*0x60-0x67*/
+  0xda55, 0xda56, 0xda57, 0xbad5, 0xda58, 0xf4f7, 0xda59, 0xda5a, /*0x68-0x6f*/
+  0xd7df, 0xda5b, 0xda5c, 0xf4f1, 0xb8b0, 0xd5d4, 0xb8cf, 0xc6f0, /*0x70-0x77*/
+  0xda5d, 0xda5e, 0xda5f, 0xda60, 0xda61, 0xda62, 0xda63, 0xda64, /*0x78-0x7f*/
+  0xda65, 0xb3c3, 0xda66, 0xda67, 0xf4f2, 0xb3ac, 0xda68, 0xda69, /*0x80-0x87*/
+  0xda6a, 0xda6b, 0xd4bd, 0xc7f7, 0xda6c, 0xda6d, 0xda6e, 0xda6f, /*0x88-0x8f*/
+  0xda70, 0xf4f4, 0xda71, 0xda72, 0xf4f3, 0xda73, 0xda74, 0xda75, /*0x90-0x97*/
+  0xda76, 0xda77, 0xda78, 0xda79, 0xda7a, 0xda7b, 0xda7c, 0xcccb, /*0x98-0x9f*/
+  0xda7d, 0xda7e, 0xda80, 0xc8a4, 0xda81, 0xda82, 0xda83, 0xda84, /*0xa0-0xa7*/
+  0xda85, 0xda86, 0xda87, 0xda88, 0xda89, 0xda8a, 0xda8b, 0xda8c, /*0xa8-0xaf*/
+  0xda8d, 0xf4f5, 0xda8e, 0xd7e3, 0xc5bf, 0xf5c0, 0xda8f, 0xda90, /*0xb0-0xb7*/
+  0xf5bb, 0xda91, 0xf5c3, 0xda92, 0xf5c2, 0xda93, 0xd6ba, 0xf5c1, /*0xb8-0xbf*/
+  0xda94, 0xda95, 0xda96, 0xd4be, 0xf5c4, 0xda97, 0xf5cc, 0xda98, /*0xc0-0xc7*/
+  0xda99, 0xda9a, 0xda9b, 0xb0cf, 0xb5f8, 0xda9c, 0xf5c9, 0xf5ca, /*0xc8-0xcf*/
+  0xda9d, 0xc5dc, 0xda9e, 0xda9f, 0xdaa0, 0xdb40, 0xf5c5, 0xf5c6, /*0xd0-0xd7*/
+  0xdb41, 0xdb42, 0xf5c7, 0xf5cb, 0xdb43, 0xbee0, 0xf5c8, 0xb8fa, /*0xd8-0xdf*/
+  0xdb44, 0xdb45, 0xdb46, 0xf5d0, 0xf5d3, 0xdb47, 0xdb48, 0xdb49, /*0xe0-0xe7*/
+  0xbfe7, 0xdb4a, 0xb9f2, 0xf5bc, 0xf5cd, 0xdb4b, 0xdb4c, 0xc2b7, /*0xe8-0xef*/
+  0xdb4d, 0xdb4e, 0xdb4f, 0xccf8, 0xdb50, 0xbcf9, 0xdb51, 0xf5ce, /*0xf0-0xf7*/
+  0xf5cf, 0xf5d1, 0xb6e5, 0xf5d2, 0xdb52, 0xf5d5, 0xdb53, 0xdb54, /*0xf8-0xff*/
+  /* 0x8e00 */
+  0xdb55, 0xdb56, 0xdb57, 0xdb58, 0xdb59, 0xf5bd, 0xdb5a, 0xdb5b, /*0x00-0x07*/
+  0xdb5c, 0xf5d4, 0xd3bb, 0xdb5d, 0xb3ec, 0xdb5e, 0xdb5f, 0xcca4, /*0x08-0x0f*/
+  0xdb60, 0xdb61, 0xdb62, 0xdb63, 0xf5d6, 0xdb64, 0xdb65, 0xdb66, /*0x10-0x17*/
+  0xdb67, 0xdb68, 0xdb69, 0xdb6a, 0xdb6b, 0xf5d7, 0xbee1, 0xf5d8, /*0x18-0x1f*/
+  0xdb6c, 0xdb6d, 0xccdf, 0xf5db, 0xdb6e, 0xdb6f, 0xdb70, 0xdb71, /*0x20-0x27*/
+  0xdb72, 0xb2c8, 0xd7d9, 0xdb73, 0xf5d9, 0xdb74, 0xf5da, 0xf5dc, /*0x28-0x2f*/
+  0xdb75, 0xf5e2, 0xdb76, 0xdb77, 0xdb78, 0xf5e0, 0xdb79, 0xdb7a, /*0x30-0x37*/
+  0xdb7b, 0xf5df, 0xf5dd, 0xdb7c, 0xdb7d, 0xf5e1, 0xdb7e, 0xdb80, /*0x38-0x3f*/
+  0xf5de, 0xf5e4, 0xf5e5, 0xdb81, 0xcce3, 0xdb82, 0xdb83, 0xe5bf, /*0x40-0x47*/
+  0xb5b8, 0xf5e3, 0xf5e8, 0xcca3, 0xdb84, 0xdb85, 0xdb86, 0xdb87, /*0x48-0x4f*/
+  0xdb88, 0xf5e6, 0xf5e7, 0xdb89, 0xdb8a, 0xdb8b, 0xdb8c, 0xdb8d, /*0x50-0x57*/
+  0xdb8e, 0xf5be, 0xdb8f, 0xdb90, 0xdb91, 0xdb92, 0xdb93, 0xdb94, /*0x58-0x5f*/
+  0xdb95, 0xdb96, 0xdb97, 0xdb98, 0xdb99, 0xdb9a, 0xb1c4, 0xdb9b, /*0x60-0x67*/
+  0xdb9c, 0xf5bf, 0xdb9d, 0xdb9e, 0xb5c5, 0xb2e4, 0xdb9f, 0xf5ec, /*0x68-0x6f*/
+  0xf5e9, 0xdba0, 0xb6d7, 0xdc40, 0xf5ed, 0xdc41, 0xf5ea, 0xdc42, /*0x70-0x77*/
+  0xdc43, 0xdc44, 0xdc45, 0xdc46, 0xf5eb, 0xdc47, 0xdc48, 0xb4da, /*0x78-0x7f*/
+  0xdc49, 0xd4ea, 0xdc4a, 0xdc4b, 0xdc4c, 0xf5ee, 0xdc4d, 0xb3f9, /*0x80-0x87*/
+  0xdc4e, 0xdc4f, 0xdc50, 0xdc51, 0xdc52, 0xdc53, 0xdc54, 0xf5ef, /*0x88-0x8f*/
+  0xf5f1, 0xdc55, 0xdc56, 0xdc57, 0xf5f0, 0xdc58, 0xdc59, 0xdc5a, /*0x90-0x97*/
+  0xdc5b, 0xdc5c, 0xdc5d, 0xdc5e, 0xf5f2, 0xdc5f, 0xf5f3, 0xdc60, /*0x98-0x9f*/
+  0xdc61, 0xdc62, 0xdc63, 0xdc64, 0xdc65, 0xdc66, 0xdc67, 0xdc68, /*0xa0-0xa7*/
+  0xdc69, 0xdc6a, 0xdc6b, 0xc9ed, 0xb9aa, 0xdc6c, 0xdc6d, 0xc7fb, /*0xa8-0xaf*/
+  0xdc6e, 0xdc6f, 0xb6e3, 0xdc70, 0xdc71, 0xdc72, 0xdc73, 0xdc74, /*0xb0-0xb7*/
+  0xdc75, 0xdc76, 0xccc9, 0xdc77, 0xdc78, 0xdc79, 0xdc7a, 0xdc7b, /*0xb8-0xbf*/
+  0xdc7c, 0xdc7d, 0xdc7e, 0xdc80, 0xdc81, 0xdc82, 0xdc83, 0xdc84, /*0xc0-0xc7*/
+  0xdc85, 0xdc86, 0xdc87, 0xdc88, 0xdc89, 0xdc8a, 0xeaa6, 0xdc8b, /*0xc8-0xcf*/
+  0xdc8c, 0xdc8d, 0xdc8e, 0xdc8f, 0xdc90, 0xdc91, 0xdc92, 0xdc93, /*0xd0-0xd7*/
+  0xdc94, 0xdc95, 0xdc96, 0xdc97, 0xdc98, 0xdc99, 0xdc9a, 0xdc9b, /*0xd8-0xdf*/
+  0xdc9c, 0xdc9d, 0xdc9e, 0xdc9f, 0xdca0, 0xdd40, 0xdd41, 0xdd42, /*0xe0-0xe7*/
+  0xdd43, 0xdd44, 0xdd45, 0xdd46, 0xdd47, 0xdd48, 0xdd49, 0xdd4a, /*0xe8-0xef*/
+  0xdd4b, 0xdd4c, 0xdd4d, 0xdd4e, 0xdd4f, 0xdd50, 0xdd51, 0xdd52, /*0xf0-0xf7*/
+  0xdd53, 0xdd54, 0xdd55, 0xdd56, 0xdd57, 0xdd58, 0xdd59, 0xdd5a, /*0xf8-0xff*/
+  /* 0x8f00 */
+  0xdd5b, 0xdd5c, 0xdd5d, 0xdd5e, 0xdd5f, 0xdd60, 0xdd61, 0xdd62, /*0x00-0x07*/
+  0xdd63, 0xdd64, 0xdd65, 0xdd66, 0xdd67, 0xdd68, 0xdd69, 0xdd6a, /*0x08-0x0f*/
+  0xdd6b, 0xdd6c, 0xdd6d, 0xdd6e, 0xdd6f, 0xdd70, 0xdd71, 0xdd72, /*0x10-0x17*/
+  0xdd73, 0xdd74, 0xdd75, 0xdd76, 0xdd77, 0xdd78, 0xdd79, 0xdd7a, /*0x18-0x1f*/
+  0xdd7b, 0xdd7c, 0xdd7d, 0xdd7e, 0xdd80, 0xdd81, 0xdd82, 0xdd83, /*0x20-0x27*/
+  0xdd84, 0xdd85, 0xdd86, 0xdd87, 0xdd88, 0xdd89, 0xdd8a, 0xdd8b, /*0x28-0x2f*/
+  0xdd8c, 0xdd8d, 0xdd8e, 0xdd8f, 0xdd90, 0xdd91, 0xdd92, 0xdd93, /*0x30-0x37*/
+  0xdd94, 0xdd95, 0xdd96, 0xdd97, 0xdd98, 0xdd99, 0xdd9a, 0xdd9b, /*0x38-0x3f*/
+  0xdd9c, 0xdd9d, 0xdd9e, 0xdd9f, 0xdda0, 0xde40, 0xde41, 0xde42, /*0x40-0x47*/
+  0xde43, 0xde44, 0xde45, 0xde46, 0xde47, 0xde48, 0xde49, 0xde4a, /*0x48-0x4f*/
+  0xde4b, 0xde4c, 0xde4d, 0xde4e, 0xde4f, 0xde50, 0xde51, 0xde52, /*0x50-0x57*/
+  0xde53, 0xde54, 0xde55, 0xde56, 0xde57, 0xde58, 0xde59, 0xde5a, /*0x58-0x5f*/
+  0xde5b, 0xde5c, 0xde5d, 0xde5e, 0xde5f, 0xde60, 0xb3b5, 0xd4fe, /*0x60-0x67*/
+  0xb9ec, 0xd0f9, 0xde61, 0xe9ed, 0xd7aa, 0xe9ee, 0xc2d6, 0xc8ed, /*0x68-0x6f*/
+  0xbae4, 0xe9ef, 0xe9f0, 0xe9f1, 0xd6e1, 0xe9f2, 0xe9f3, 0xe9f5, /*0x70-0x77*/
+  0xe9f4, 0xe9f6, 0xe9f7, 0xc7e1, 0xe9f8, 0xd4d8, 0xe9f9, 0xbdce, /*0x78-0x7f*/
+  0xde62, 0xe9fa, 0xe9fb, 0xbdcf, 0xe9fc, 0xb8a8, 0xc1be, 0xe9fd, /*0x80-0x87*/
+  0xb1b2, 0xbbd4, 0xb9f5, 0xe9fe, 0xde63, 0xeaa1, 0xeaa2, 0xeaa3, /*0x88-0x8f*/
+  0xb7f8, 0xbcad, 0xde64, 0xcae4, 0xe0ce, 0xd4af, 0xcfbd, 0xd5b7, /*0x90-0x97*/
+  0xeaa4, 0xd5de, 0xeaa5, 0xd0c1, 0xb9bc, 0xde65, 0xb4c7, 0xb1d9, /*0x98-0x9f*/
+  0xde66, 0xde67, 0xde68, 0xc0b1, 0xde69, 0xde6a, 0xde6b, 0xde6c, /*0xa0-0xa7*/
+  0xb1e6, 0xb1e7, 0xde6d, 0xb1e8, 0xde6e, 0xde6f, 0xde70, 0xde71, /*0xa8-0xaf*/
+  0xb3bd, 0xc8e8, 0xde72, 0xde73, 0xde74, 0xde75, 0xe5c1, 0xde76, /*0xb0-0xb7*/
+  0xde77, 0xb1df, 0xde78, 0xde79, 0xde7a, 0xc1c9, 0xb4ef, 0xde7b, /*0xb8-0xbf*/
+  0xde7c, 0xc7a8, 0xd3d8, 0xde7d, 0xc6f9, 0xd1b8, 0xde7e, 0xb9fd, /*0xc0-0xc7*/
+  0xc2f5, 0xde80, 0xde81, 0xde82, 0xde83, 0xde84, 0xd3ad, 0xde85, /*0xc8-0xcf*/
+  0xd4cb, 0xbdfc, 0xde86, 0xe5c2, 0xb7b5, 0xe5c3, 0xde87, 0xde88, /*0xd0-0xd7*/
+  0xbbb9, 0xd5e2, 0xde89, 0xbdf8, 0xd4b6, 0xcea5, 0xc1ac, 0xb3d9, /*0xd8-0xdf*/
+  0xde8a, 0xde8b, 0xccf6, 0xde8c, 0xe5c6, 0xe5c4, 0xe5c8, 0xde8d, /*0xe0-0xe7*/
+  0xe5ca, 0xe5c7, 0xb5cf, 0xc6c8, 0xde8e, 0xb5fc, 0xe5c5, 0xde8f, /*0xe8-0xef*/
+  0xcaf6, 0xde90, 0xde91, 0xe5c9, 0xde92, 0xde93, 0xde94, 0xc3d4, /*0xf0-0xf7*/
+  0xb1c5, 0xbca3, 0xde95, 0xde96, 0xde97, 0xd7b7, 0xde98, 0xde99, /*0xf8-0xff*/
+  /* 0x9000 */
+  0xcdcb, 0xcbcd, 0xcaca, 0xccd3, 0xe5cc, 0xe5cb, 0xc4e6, 0xde9a, /*0x00-0x07*/
+  0xde9b, 0xd1a1, 0xd1b7, 0xe5cd, 0xde9c, 0xe5d0, 0xde9d, 0xcdb8, /*0x08-0x0f*/
+  0xd6f0, 0xe5cf, 0xb5dd, 0xde9e, 0xcdbe, 0xde9f, 0xe5d1, 0xb6ba, /*0x10-0x17*/
+  0xdea0, 0xdf40, 0xcda8, 0xb9e4, 0xdf41, 0xcac5, 0xb3d1, 0xcbd9, /*0x18-0x1f*/
+  0xd4ec, 0xe5d2, 0xb7ea, 0xdf42, 0xdf43, 0xdf44, 0xe5ce, 0xdf45, /*0x20-0x27*/
+  0xdf46, 0xdf47, 0xdf48, 0xdf49, 0xdf4a, 0xe5d5, 0xb4fe, 0xe5d6, /*0x28-0x2f*/
+  0xdf4b, 0xdf4c, 0xdf4d, 0xdf4e, 0xdf4f, 0xe5d3, 0xe5d4, 0xdf50, /*0x30-0x37*/
+  0xd2dd, 0xdf51, 0xdf52, 0xc2df, 0xb1c6, 0xdf53, 0xd3e2, 0xdf54, /*0x38-0x3f*/
+  0xdf55, 0xb6dd, 0xcbec, 0xdf56, 0xe5d7, 0xdf57, 0xdf58, 0xd3f6, /*0x40-0x47*/
+  0xdf59, 0xdf5a, 0xdf5b, 0xdf5c, 0xdf5d, 0xb1e9, 0xdf5e, 0xb6f4, /*0x48-0x4f*/
+  0xe5da, 0xe5d8, 0xe5d9, 0xb5c0, 0xdf5f, 0xdf60, 0xdf61, 0xd2c5, /*0x50-0x57*/
+  0xe5dc, 0xdf62, 0xdf63, 0xe5de, 0xdf64, 0xdf65, 0xdf66, 0xdf67, /*0x58-0x5f*/
+  0xdf68, 0xdf69, 0xe5dd, 0xc7b2, 0xdf6a, 0xd2a3, 0xdf6b, 0xdf6c, /*0x60-0x67*/
+  0xe5db, 0xdf6d, 0xdf6e, 0xdf6f, 0xdf70, 0xd4e2, 0xd5da, 0xdf71, /*0x68-0x6f*/
+  0xdf72, 0xdf73, 0xdf74, 0xdf75, 0xe5e0, 0xd7f1, 0xdf76, 0xdf77, /*0x70-0x77*/
+  0xdf78, 0xdf79, 0xdf7a, 0xdf7b, 0xdf7c, 0xe5e1, 0xdf7d, 0xb1dc, /*0x78-0x7f*/
+  0xd1fb, 0xdf7e, 0xe5e2, 0xe5e4, 0xdf80, 0xdf81, 0xdf82, 0xdf83, /*0x80-0x87*/
+  0xe5e3, 0xdf84, 0xdf85, 0xe5e5, 0xdf86, 0xdf87, 0xdf88, 0xdf89, /*0x88-0x8f*/
+  0xdf8a, 0xd2d8, 0xdf8b, 0xb5cb, 0xdf8c, 0xe7df, 0xdf8d, 0xdaf5, /*0x90-0x97*/
+  0xdf8e, 0xdaf8, 0xdf8f, 0xdaf6, 0xdf90, 0xdaf7, 0xdf91, 0xdf92, /*0x98-0x9f*/
+  0xdf93, 0xdafa, 0xd0cf, 0xc4c7, 0xdf94, 0xdf95, 0xb0ee, 0xdf96, /*0xa0-0xa7*/
+  0xdf97, 0xdf98, 0xd0b0, 0xdf99, 0xdaf9, 0xdf9a, 0xd3ca, 0xbaaa, /*0xa8-0xaf*/
+  0xdba2, 0xc7f1, 0xdf9b, 0xdafc, 0xdafb, 0xc9db, 0xdafd, 0xdf9c, /*0xb0-0xb7*/
+  0xdba1, 0xd7de, 0xdafe, 0xc1da, 0xdf9d, 0xdf9e, 0xdba5, 0xdf9f, /*0xb8-0xbf*/
+  0xdfa0, 0xd3f4, 0xe040, 0xe041, 0xdba7, 0xdba4, 0xe042, 0xdba8, /*0xc0-0xc7*/
+  0xe043, 0xe044, 0xbdbc, 0xe045, 0xe046, 0xe047, 0xc0c9, 0xdba3, /*0xc8-0xcf*/
+  0xdba6, 0xd6a3, 0xe048, 0xdba9, 0xe049, 0xe04a, 0xe04b, 0xdbad, /*0xd0-0xd7*/
+  0xe04c, 0xe04d, 0xe04e, 0xdbae, 0xdbac, 0xbac2, 0xe04f, 0xe050, /*0xd8-0xdf*/
+  0xe051, 0xbfa4, 0xdbab, 0xe052, 0xe053, 0xe054, 0xdbaa, 0xd4c7, /*0xe0-0xe7*/
+  0xb2bf, 0xe055, 0xe056, 0xdbaf, 0xe057, 0xb9f9, 0xe058, 0xdbb0, /*0xe8-0xef*/
+  0xe059, 0xe05a, 0xe05b, 0xe05c, 0xb3bb, 0xe05d, 0xe05e, 0xe05f, /*0xf0-0xf7*/
+  0xb5a6, 0xe060, 0xe061, 0xe062, 0xe063, 0xb6bc, 0xdbb1, 0xe064, /*0xf8-0xff*/
+  /* 0x9100 */
+  0xe065, 0xe066, 0xb6f5, 0xe067, 0xdbb2, 0xe068, 0xe069, 0xe06a, /*0x00-0x07*/
+  0xe06b, 0xe06c, 0xe06d, 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, /*0x08-0x0f*/
+  0xe073, 0xe074, 0xe075, 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, /*0x10-0x17*/
+  0xe07b, 0xb1c9, 0xe07c, 0xe07d, 0xe07e, 0xe080, 0xdbb4, 0xe081, /*0x18-0x1f*/
+  0xe082, 0xe083, 0xdbb3, 0xdbb5, 0xe084, 0xe085, 0xe086, 0xe087, /*0x20-0x27*/
+  0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d, 0xe08e, 0xdbb7, /*0x28-0x2f*/
+  0xe08f, 0xdbb6, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095, /*0x30-0x37*/
+  0xe096, 0xdbb8, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, /*0x38-0x3f*/
+  0xe09d, 0xe09e, 0xe09f, 0xdbb9, 0xe0a0, 0xe140, 0xdbba, 0xe141, /*0x40-0x47*/
+  0xe142, 0xd3cf, 0xf4fa, 0xc7f5, 0xd7c3, 0xc5e4, 0xf4fc, 0xf4fd, /*0x48-0x4f*/
+  0xf4fb, 0xe143, 0xbec6, 0xe144, 0xe145, 0xe146, 0xe147, 0xd0ef, /*0x50-0x57*/
+  0xe148, 0xe149, 0xb7d3, 0xe14a, 0xe14b, 0xd4cd, 0xccaa, 0xe14c, /*0x58-0x5f*/
+  0xe14d, 0xf5a2, 0xf5a1, 0xbaa8, 0xf4fe, 0xcbd6, 0xe14e, 0xe14f, /*0x60-0x67*/
+  0xe150, 0xf5a4, 0xc0d2, 0xe151, 0xb3ea, 0xe152, 0xcdaa, 0xf5a5, /*0x68-0x6f*/
+  0xf5a3, 0xbdb4, 0xf5a8, 0xe153, 0xf5a9, 0xbdcd, 0xc3b8, 0xbfe1, /*0x70-0x77*/
+  0xcbe1, 0xf5aa, 0xe154, 0xe155, 0xe156, 0xf5a6, 0xf5a7, 0xc4f0, /*0x78-0x7f*/
+  0xe157, 0xe158, 0xe159, 0xe15a, 0xe15b, 0xf5ac, 0xe15c, 0xb4bc, /*0x80-0x87*/
+  0xe15d, 0xd7ed, 0xe15e, 0xb4d7, 0xf5ab, 0xf5ae, 0xe15f, 0xe160, /*0x88-0x8f*/
+  0xf5ad, 0xf5af, 0xd0d1, 0xe161, 0xe162, 0xe163, 0xe164, 0xe165, /*0x90-0x97*/
+  0xe166, 0xe167, 0xc3d1, 0xc8a9, 0xe168, 0xe169, 0xe16a, 0xe16b, /*0x98-0x9f*/
+  0xe16c, 0xe16d, 0xf5b0, 0xf5b1, 0xe16e, 0xe16f, 0xe170, 0xe171, /*0xa0-0xa7*/
+  0xe172, 0xe173, 0xf5b2, 0xe174, 0xe175, 0xf5b3, 0xf5b4, 0xf5b5, /*0xa8-0xaf*/
+  0xe176, 0xe177, 0xe178, 0xe179, 0xf5b7, 0xf5b6, 0xe17a, 0xe17b, /*0xb0-0xb7*/
+  0xe17c, 0xe17d, 0xf5b8, 0xe17e, 0xe180, 0xe181, 0xe182, 0xe183, /*0xb8-0xbf*/
+  0xe184, 0xe185, 0xe186, 0xe187, 0xe188, 0xe189, 0xe18a, 0xb2c9, /*0xc0-0xc7*/
+  0xe18b, 0xd3d4, 0xcacd, 0xe18c, 0xc0ef, 0xd6d8, 0xd2b0, 0xc1bf, /*0xc8-0xcf*/
+  0xe18d, 0xbdf0, 0xe18e, 0xe18f, 0xe190, 0xe191, 0xe192, 0xe193, /*0xd0-0xd7*/
+  0xe194, 0xe195, 0xe196, 0xe197, 0xb8aa, 0xe198, 0xe199, 0xe19a, /*0xd8-0xdf*/
+  0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f, 0xe1a0, 0xe240, 0xe241, /*0xe0-0xe7*/
+  0xe242, 0xe243, 0xe244, 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, /*0xe8-0xef*/
+  0xe24a, 0xe24b, 0xe24c, 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, /*0xf0-0xf7*/
+  0xe252, 0xe253, 0xe254, 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, /*0xf8-0xff*/
+  /* 0x9200 */
+  0xe25a, 0xe25b, 0xe25c, 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, /*0x00-0x07*/
+  0xe262, 0xe263, 0xe264, 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, /*0x08-0x0f*/
+  0xe26a, 0xe26b, 0xe26c, 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, /*0x10-0x17*/
+  0xe272, 0xe273, 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, /*0x18-0x1f*/
+  0xe27a, 0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe280, 0xe281, 0xe282, /*0x20-0x27*/
+  0xe283, 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a, /*0x28-0x2f*/
+  0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292, /*0x30-0x37*/
+  0xe293, 0xe294, 0xe295, 0xe296, 0xe297, 0xe298, 0xe299, 0xe29a, /*0x38-0x3f*/
+  0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, 0xe340, 0xe341, /*0x40-0x47*/
+  0xe342, 0xe343, 0xe344, 0xe345, 0xe346, 0xe347, 0xe348, 0xe349, /*0x48-0x4f*/
+  0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e, 0xe34f, 0xe350, 0xe351, /*0x50-0x57*/
+  0xe352, 0xe353, 0xe354, 0xe355, 0xe356, 0xe357, 0xe358, 0xe359, /*0x58-0x5f*/
+  0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e, 0xe35f, 0xe360, 0xe361, /*0x60-0x67*/
+  0xe362, 0xe363, 0xe364, 0xe365, 0xe366, 0xe367, 0xe368, 0xe369, /*0x68-0x6f*/
+  0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xbcf8, 0xe36e, 0xe36f, 0xe370, /*0x70-0x77*/
+  0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376, 0xe377, 0xe378, /*0x78-0x7f*/
+  0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e, 0xe380, 0xe381, /*0x80-0x87*/
+  0xe382, 0xe383, 0xe384, 0xe385, 0xe386, 0xe387, 0xf6c6, 0xe388, /*0x88-0x8f*/
+  0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e, 0xe38f, 0xe390, /*0x90-0x97*/
+  0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396, 0xe397, 0xe398, /*0x98-0x9f*/
+  0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e, 0xe39f, 0xe3a0, /*0xa0-0xa7*/
+  0xe440, 0xe441, 0xe442, 0xe443, 0xe444, 0xe445, 0xf6c7, 0xe446, /*0xa8-0xaf*/
+  0xe447, 0xe448, 0xe449, 0xe44a, 0xe44b, 0xe44c, 0xe44d, 0xe44e, /*0xb0-0xb7*/
+  0xe44f, 0xe450, 0xe451, 0xe452, 0xe453, 0xe454, 0xe455, 0xe456, /*0xb8-0xbf*/
+  0xe457, 0xe458, 0xe459, 0xe45a, 0xe45b, 0xe45c, 0xe45d, 0xe45e, /*0xc0-0xc7*/
+  0xf6c8, 0xe45f, 0xe460, 0xe461, 0xe462, 0xe463, 0xe464, 0xe465, /*0xc8-0xcf*/
+  0xe466, 0xe467, 0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, /*0xd0-0xd7*/
+  0xe46e, 0xe46f, 0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, /*0xd8-0xdf*/
+  0xe476, 0xe477, 0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, /*0xe0-0xe7*/
+  0xe47e, 0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486, /*0xe8-0xef*/
+  0xe487, 0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, /*0xf0-0xf7*/
+  0xe48f, 0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, /*0xf8-0xff*/
+  /* 0x9300 */
+  0xe497, 0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, /*0x00-0x07*/
+  0xe49f, 0xe4a0, 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545, /*0x08-0x0f*/
+  0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d, /*0x10-0x17*/
+  0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555, /*0x18-0x1f*/
+  0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d, /*0x20-0x27*/
+  0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0xe565, /*0x28-0x2f*/
+  0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c, 0xe56d, /*0x30-0x37*/
+  0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, 0xe573, 0xf6c9, 0xe574, /*0x38-0x3f*/
+  0xe575, 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c, /*0x40-0x47*/
+  0xe57d, 0xe57e, 0xe580, 0xe581, 0xe582, 0xe583, 0xe584, 0xe585, /*0x48-0x4f*/
+  0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c, 0xe58d, /*0x50-0x57*/
+  0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, 0xe593, 0xe594, 0xe595, /*0x58-0x5f*/
+  0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c, 0xe59d, /*0x60-0x67*/
+  0xe59e, 0xe59f, 0xf6ca, 0xe5a0, 0xe640, 0xe641, 0xe642, 0xe643, /*0x68-0x6f*/
+  0xe644, 0xe645, 0xe646, 0xe647, 0xe648, 0xe649, 0xe64a, 0xe64b, /*0x70-0x77*/
+  0xe64c, 0xe64d, 0xe64e, 0xe64f, 0xe650, 0xe651, 0xe652, 0xe653, /*0x78-0x7f*/
+  0xe654, 0xe655, 0xe656, 0xe657, 0xe658, 0xe659, 0xe65a, 0xe65b, /*0x80-0x87*/
+  0xe65c, 0xe65d, 0xe65e, 0xe65f, 0xe660, 0xe661, 0xe662, 0xf6cc, /*0x88-0x8f*/
+  0xe663, 0xe664, 0xe665, 0xe666, 0xe667, 0xe668, 0xe669, 0xe66a, /*0x90-0x97*/
+  0xe66b, 0xe66c, 0xe66d, 0xe66e, 0xe66f, 0xe670, 0xe671, 0xe672, /*0x98-0x9f*/
+  0xe673, 0xe674, 0xe675, 0xe676, 0xe677, 0xe678, 0xe679, 0xe67a, /*0xa0-0xa7*/
+  0xe67b, 0xe67c, 0xe67d, 0xe67e, 0xe680, 0xe681, 0xe682, 0xe683, /*0xa8-0xaf*/
+  0xe684, 0xe685, 0xe686, 0xe687, 0xe688, 0xe689, 0xe68a, 0xe68b, /*0xb0-0xb7*/
+  0xe68c, 0xe68d, 0xe68e, 0xe68f, 0xe690, 0xe691, 0xe692, 0xe693, /*0xb8-0xbf*/
+  0xe694, 0xe695, 0xe696, 0xe697, 0xe698, 0xe699, 0xe69a, 0xe69b, /*0xc0-0xc7*/
+  0xe69c, 0xe69d, 0xf6cb, 0xe69e, 0xe69f, 0xe6a0, 0xe740, 0xe741, /*0xc8-0xcf*/
+  0xe742, 0xe743, 0xe744, 0xe745, 0xe746, 0xe747, 0xf7e9, 0xe748, /*0xd0-0xd7*/
+  0xe749, 0xe74a, 0xe74b, 0xe74c, 0xe74d, 0xe74e, 0xe74f, 0xe750, /*0xd8-0xdf*/
+  0xe751, 0xe752, 0xe753, 0xe754, 0xe755, 0xe756, 0xe757, 0xe758, /*0xe0-0xe7*/
+  0xe759, 0xe75a, 0xe75b, 0xe75c, 0xe75d, 0xe75e, 0xe75f, 0xe760, /*0xe8-0xef*/
+  0xe761, 0xe762, 0xe763, 0xe764, 0xe765, 0xe766, 0xe767, 0xe768, /*0xf0-0xf7*/
+  0xe769, 0xe76a, 0xe76b, 0xe76c, 0xe76d, 0xe76e, 0xe76f, 0xe770, /*0xf8-0xff*/
+  /* 0x9400 */
+  0xe771, 0xe772, 0xe773, 0xe774, 0xe775, 0xe776, 0xe777, 0xe778, /*0x00-0x07*/
+  0xe779, 0xe77a, 0xe77b, 0xe77c, 0xe77d, 0xe77e, 0xe780, 0xe781, /*0x08-0x0f*/
+  0xe782, 0xe783, 0xe784, 0xe785, 0xe786, 0xe787, 0xe788, 0xe789, /*0x10-0x17*/
+  0xe78a, 0xe78b, 0xe78c, 0xe78d, 0xe78e, 0xe78f, 0xe790, 0xe791, /*0x18-0x1f*/
+  0xe792, 0xe793, 0xe794, 0xe795, 0xe796, 0xe797, 0xe798, 0xe799, /*0x20-0x27*/
+  0xe79a, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, 0xe7a0, 0xe840, /*0x28-0x2f*/
+  0xe841, 0xe842, 0xe843, 0xe844, 0xe845, 0xe846, 0xe847, 0xe848, /*0x30-0x37*/
+  0xe849, 0xe84a, 0xe84b, 0xe84c, 0xe84d, 0xe84e, 0xf6cd, 0xe84f, /*0x38-0x3f*/
+  0xe850, 0xe851, 0xe852, 0xe853, 0xe854, 0xe855, 0xe856, 0xe857, /*0x40-0x47*/
+  0xe858, 0xe859, 0xe85a, 0xe85b, 0xe85c, 0xe85d, 0xe85e, 0xe85f, /*0x48-0x4f*/
+  0xe860, 0xe861, 0xe862, 0xe863, 0xe864, 0xe865, 0xe866, 0xe867, /*0x50-0x57*/
+  0xe868, 0xe869, 0xe86a, 0xe86b, 0xe86c, 0xe86d, 0xe86e, 0xe86f, /*0x58-0x5f*/
+  0xe870, 0xe871, 0xe872, 0xe873, 0xe874, 0xe875, 0xe876, 0xe877, /*0x60-0x67*/
+  0xe878, 0xe879, 0xe87a, 0xf6ce, 0xe87b, 0xe87c, 0xe87d, 0xe87e, /*0x68-0x6f*/
+  0xe880, 0xe881, 0xe882, 0xe883, 0xe884, 0xe885, 0xe886, 0xe887, /*0x70-0x77*/
+  0xe888, 0xe889, 0xe88a, 0xe88b, 0xe88c, 0xe88d, 0xe88e, 0xe88f, /*0x78-0x7f*/
+  0xe890, 0xe891, 0xe892, 0xe893, 0xe894, 0xeec4, 0xeec5, 0xeec6, /*0x80-0x87*/
+  0xd5eb, 0xb6a4, 0xeec8, 0xeec7, 0xeec9, 0xeeca, 0xc7a5, 0xeecb, /*0x88-0x8f*/
+  0xeecc, 0xe895, 0xb7b0, 0xb5f6, 0xeecd, 0xeecf, 0xe896, 0xeece, /*0x90-0x97*/
+  0xe897, 0xb8c6, 0xeed0, 0xeed1, 0xeed2, 0xb6db, 0xb3ae, 0xd6d3, /*0x98-0x9f*/
+  0xc4c6, 0xb1b5, 0xb8d6, 0xeed3, 0xeed4, 0xd4bf, 0xc7d5, 0xbefb, /*0xa0-0xa7*/
+  0xced9, 0xb9b3, 0xeed6, 0xeed5, 0xeed8, 0xeed7, 0xc5a5, 0xeed9, /*0xa8-0xaf*/
+  0xeeda, 0xc7ae, 0xeedb, 0xc7af, 0xeedc, 0xb2a7, 0xeedd, 0xeede, /*0xb0-0xb7*/
+  0xeedf, 0xeee0, 0xeee1, 0xd7ea, 0xeee2, 0xeee3, 0xbcd8, 0xeee4, /*0xb8-0xbf*/
+  0xd3cb, 0xccfa, 0xb2ac, 0xc1e5, 0xeee5, 0xc7a6, 0xc3ad, 0xe898, /*0xc0-0xc7*/
+  0xeee6, 0xeee7, 0xeee8, 0xeee9, 0xeeea, 0xeeeb, 0xeeec, 0xe899, /*0xc8-0xcf*/
+  0xeeed, 0xeeee, 0xeeef, 0xe89a, 0xe89b, 0xeef0, 0xeef1, 0xeef2, /*0xd0-0xd7*/
+  0xeef4, 0xeef3, 0xe89c, 0xeef5, 0xcdad, 0xc2c1, 0xeef6, 0xeef7, /*0xd8-0xdf*/
+  0xeef8, 0xd5a1, 0xeef9, 0xcfb3, 0xeefa, 0xeefb, 0xe89d, 0xeefc, /*0xe0-0xe7*/
+  0xeefd, 0xefa1, 0xeefe, 0xefa2, 0xb8f5, 0xc3fa, 0xefa3, 0xefa4, /*0xe8-0xef*/
+  0xbdc2, 0xd2bf, 0xb2f9, 0xefa5, 0xefa6, 0xefa7, 0xd2f8, 0xefa8, /*0xf0-0xf7*/
+  0xd6fd, 0xefa9, 0xc6cc, 0xe89e, 0xefaa, 0xefab, 0xc1b4, 0xefac, /*0xf8-0xff*/
+  /* 0x9500 */
+  0xcffa, 0xcbf8, 0xefae, 0xefad, 0xb3fa, 0xb9f8, 0xefaf, 0xefb0, /*0x00-0x07*/
+  0xd0e2, 0xefb1, 0xefb2, 0xb7e6, 0xd0bf, 0xefb3, 0xefb4, 0xefb5, /*0x08-0x0f*/
+  0xc8f1, 0xcce0, 0xefb6, 0xefb7, 0xefb8, 0xefb9, 0xefba, 0xd5e0, /*0x10-0x17*/
+  0xefbb, 0xb4ed, 0xc3aa, 0xefbc, 0xe89f, 0xefbd, 0xefbe, 0xefbf, /*0x18-0x1f*/
+  0xe8a0, 0xcefd, 0xefc0, 0xc2e0, 0xb4b8, 0xd7b6, 0xbdf5, 0xe940, /*0x20-0x27*/
+  0xcfc7, 0xefc3, 0xefc1, 0xefc2, 0xefc4, 0xb6a7, 0xbcfc, 0xbee2, /*0x28-0x2f*/
+  0xc3cc, 0xefc5, 0xefc6, 0xe941, 0xefc7, 0xefcf, 0xefc8, 0xefc9, /*0x30-0x37*/
+  0xefca, 0xc7c2, 0xeff1, 0xb6cd, 0xefcb, 0xe942, 0xefcc, 0xefcd, /*0x38-0x3f*/
+  0xb6c6, 0xc3be, 0xefce, 0xe943, 0xefd0, 0xefd1, 0xefd2, 0xd5f2, /*0x40-0x47*/
+  0xe944, 0xefd3, 0xc4f7, 0xe945, 0xefd4, 0xc4f8, 0xefd5, 0xefd6, /*0x48-0x4f*/
+  0xb8e4, 0xb0f7, 0xefd7, 0xefd8, 0xefd9, 0xe946, 0xefda, 0xefdb, /*0x50-0x57*/
+  0xefdc, 0xefdd, 0xe947, 0xefde, 0xbeb5, 0xefe1, 0xefdf, 0xefe0, /*0x58-0x5f*/
+  0xe948, 0xefe2, 0xefe3, 0xc1cd, 0xefe4, 0xefe5, 0xefe6, 0xefe7, /*0x60-0x67*/
+  0xefe8, 0xefe9, 0xefea, 0xefeb, 0xefec, 0xc0d8, 0xe949, 0xefed, /*0x68-0x6f*/
+  0xc1ad, 0xefee, 0xefef, 0xeff0, 0xe94a, 0xe94b, 0xcfe2, 0xe94c, /*0x70-0x77*/
+  0xe94d, 0xe94e, 0xe94f, 0xe950, 0xe951, 0xe952, 0xe953, 0xb3a4, /*0x78-0x7f*/
+  0xe954, 0xe955, 0xe956, 0xe957, 0xe958, 0xe959, 0xe95a, 0xe95b, /*0x80-0x87*/
+  0xe95c, 0xe95d, 0xe95e, 0xe95f, 0xe960, 0xe961, 0xe962, 0xe963, /*0x88-0x8f*/
+  0xe964, 0xe965, 0xe966, 0xe967, 0xe968, 0xe969, 0xe96a, 0xe96b, /*0x90-0x97*/
+  0xe96c, 0xe96d, 0xe96e, 0xe96f, 0xe970, 0xe971, 0xe972, 0xe973, /*0x98-0x9f*/
+  0xe974, 0xe975, 0xe976, 0xe977, 0xe978, 0xe979, 0xe97a, 0xe97b, /*0xa0-0xa7*/
+  0xe97c, 0xe97d, 0xe97e, 0xe980, 0xe981, 0xe982, 0xe983, 0xe984, /*0xa8-0xaf*/
+  0xe985, 0xe986, 0xe987, 0xe988, 0xe989, 0xe98a, 0xe98b, 0xe98c, /*0xb0-0xb7*/
+  0xe98d, 0xe98e, 0xe98f, 0xe990, 0xe991, 0xe992, 0xe993, 0xe994, /*0xb8-0xbf*/
+  0xe995, 0xe996, 0xe997, 0xe998, 0xe999, 0xe99a, 0xe99b, 0xe99c, /*0xc0-0xc7*/
+  0xe99d, 0xe99e, 0xe99f, 0xe9a0, 0xea40, 0xea41, 0xea42, 0xea43, /*0xc8-0xcf*/
+  0xea44, 0xea45, 0xea46, 0xea47, 0xea48, 0xea49, 0xea4a, 0xea4b, /*0xd0-0xd7*/
+  0xea4c, 0xea4d, 0xea4e, 0xea4f, 0xea50, 0xea51, 0xea52, 0xea53, /*0xd8-0xdf*/
+  0xea54, 0xea55, 0xea56, 0xea57, 0xea58, 0xea59, 0xea5a, 0xea5b, /*0xe0-0xe7*/
+  0xc3c5, 0xe3c5, 0xc9c1, 0xe3c6, 0xea5c, 0xb1d5, 0xceca, 0xb4b3, /*0xe8-0xef*/
+  0xc8f2, 0xe3c7, 0xcfd0, 0xe3c8, 0xbce4, 0xe3c9, 0xe3ca, 0xc3c6, /*0xf0-0xf7*/
+  0xd5a2, 0xc4d6, 0xb9eb, 0xcec5, 0xe3cb, 0xc3f6, 0xe3cc, 0xea5d, /*0xf8-0xff*/
+  /* 0x9600 */
+  0xb7a7, 0xb8f3, 0xbad2, 0xe3cd, 0xe3ce, 0xd4c4, 0xe3cf, 0xea5e, /*0x00-0x07*/
+  0xe3d0, 0xd1cb, 0xe3d1, 0xe3d2, 0xe3d3, 0xe3d4, 0xd1d6, 0xe3d5, /*0x08-0x0f*/
+  0xb2fb, 0xc0bb, 0xe3d6, 0xea5f, 0xc0ab, 0xe3d7, 0xe3d8, 0xe3d9, /*0x10-0x17*/
+  0xea60, 0xe3da, 0xe3db, 0xea61, 0xb8b7, 0xdae2, 0xea62, 0xb6d3, /*0x18-0x1f*/
+  0xea63, 0xdae4, 0xdae3, 0xea64, 0xea65, 0xea66, 0xea67, 0xea68, /*0x20-0x27*/
+  0xea69, 0xea6a, 0xdae6, 0xea6b, 0xea6c, 0xea6d, 0xc8ee, 0xea6e, /*0x28-0x2f*/
+  0xea6f, 0xdae5, 0xb7c0, 0xd1f4, 0xd2f5, 0xd5f3, 0xbdd7, 0xea70, /*0x30-0x37*/
+  0xea71, 0xea72, 0xea73, 0xd7e8, 0xdae8, 0xdae7, 0xea74, 0xb0a2, /*0x38-0x3f*/
+  0xcdd3, 0xea75, 0xdae9, 0xea76, 0xb8bd, 0xbcca, 0xc2bd, 0xc2a4, /*0x40-0x47*/
+  0xb3c2, 0xdaea, 0xea77, 0xc2aa, 0xc4b0, 0xbdb5, 0xea78, 0xea79, /*0x48-0x4f*/
+  0xcfde, 0xea7a, 0xea7b, 0xea7c, 0xdaeb, 0xc9c2, 0xea7d, 0xea7e, /*0x50-0x57*/
+  0xea80, 0xea81, 0xea82, 0xb1dd, 0xea83, 0xea84, 0xea85, 0xdaec, /*0x58-0x5f*/
+  0xea86, 0xb6b8, 0xd4ba, 0xea87, 0xb3fd, 0xea88, 0xea89, 0xdaed, /*0x60-0x67*/
+  0xd4c9, 0xcfd5, 0xc5e3, 0xea8a, 0xdaee, 0xea8b, 0xea8c, 0xea8d, /*0x68-0x6f*/
+  0xea8e, 0xea8f, 0xdaef, 0xea90, 0xdaf0, 0xc1ea, 0xccd5, 0xcfdd, /*0x70-0x77*/
+  0xea91, 0xea92, 0xea93, 0xea94, 0xea95, 0xea96, 0xea97, 0xea98, /*0x78-0x7f*/
+  0xea99, 0xea9a, 0xea9b, 0xea9c, 0xea9d, 0xd3e7, 0xc2a1, 0xea9e, /*0x80-0x87*/
+  0xdaf1, 0xea9f, 0xeaa0, 0xcbe5, 0xeb40, 0xdaf2, 0xeb41, 0xcbe6, /*0x88-0x8f*/
+  0xd2fe, 0xeb42, 0xeb43, 0xeb44, 0xb8f4, 0xeb45, 0xeb46, 0xdaf3, /*0x90-0x97*/
+  0xb0af, 0xcfb6, 0xeb47, 0xeb48, 0xd5cf, 0xeb49, 0xeb4a, 0xeb4b, /*0x98-0x9f*/
+  0xeb4c, 0xeb4d, 0xeb4e, 0xeb4f, 0xeb50, 0xeb51, 0xeb52, 0xcbed, /*0xa0-0xa7*/
+  0xeb53, 0xeb54, 0xeb55, 0xeb56, 0xeb57, 0xeb58, 0xeb59, 0xeb5a, /*0xa8-0xaf*/
+  0xdaf4, 0xeb5b, 0xeb5c, 0xe3c4, 0xeb5d, 0xeb5e, 0xc1a5, 0xeb5f, /*0xb0-0xb7*/
+  0xeb60, 0xf6bf, 0xeb61, 0xeb62, 0xf6c0, 0xf6c1, 0xc4d1, 0xeb63, /*0xb8-0xbf*/
+  0xc8b8, 0xd1e3, 0xeb64, 0xeb65, 0xd0db, 0xd1c5, 0xbcaf, 0xb9cd, /*0xc0-0xc7*/
+  0xeb66, 0xeff4, 0xeb67, 0xeb68, 0xb4c6, 0xd3ba, 0xf6c2, 0xb3fb, /*0xc8-0xcf*/
+  0xeb69, 0xeb6a, 0xf6c3, 0xeb6b, 0xeb6c, 0xb5f1, 0xeb6d, 0xeb6e, /*0xd0-0xd7*/
+  0xeb6f, 0xeb70, 0xeb71, 0xeb72, 0xeb73, 0xeb74, 0xeb75, 0xeb76, /*0xd8-0xdf*/
+  0xf6c5, 0xeb77, 0xeb78, 0xeb79, 0xeb7a, 0xeb7b, 0xeb7c, 0xeb7d, /*0xe0-0xe7*/
+  0xd3ea, 0xf6a7, 0xd1a9, 0xeb7e, 0xeb80, 0xeb81, 0xeb82, 0xf6a9, /*0xe8-0xef*/
+  0xeb83, 0xeb84, 0xeb85, 0xf6a8, 0xeb86, 0xeb87, 0xc1e3, 0xc0d7, /*0xf0-0xf7*/
+  0xeb88, 0xb1a2, 0xeb89, 0xeb8a, 0xeb8b, 0xeb8c, 0xceed, 0xeb8d, /*0xf8-0xff*/
+  /* 0x9700 */
+  0xd0e8, 0xf6ab, 0xeb8e, 0xeb8f, 0xcff6, 0xeb90, 0xf6aa, 0xd5f0, /*0x00-0x07*/
+  0xf6ac, 0xc3b9, 0xeb91, 0xeb92, 0xeb93, 0xbbf4, 0xf6ae, 0xf6ad, /*0x08-0x0f*/
+  0xeb94, 0xeb95, 0xeb96, 0xc4de, 0xeb97, 0xeb98, 0xc1d8, 0xeb99, /*0x10-0x17*/
+  0xeb9a, 0xeb9b, 0xeb9c, 0xeb9d, 0xcbaa, 0xeb9e, 0xcfbc, 0xeb9f, /*0x18-0x1f*/
+  0xeba0, 0xec40, 0xec41, 0xec42, 0xec43, 0xec44, 0xec45, 0xec46, /*0x20-0x27*/
+  0xec47, 0xec48, 0xf6af, 0xec49, 0xec4a, 0xf6b0, 0xec4b, 0xec4c, /*0x28-0x2f*/
+  0xf6b1, 0xec4d, 0xc2b6, 0xec4e, 0xec4f, 0xec50, 0xec51, 0xec52, /*0x30-0x37*/
+  0xb0d4, 0xc5f9, 0xec53, 0xec54, 0xec55, 0xec56, 0xf6b2, 0xec57, /*0x38-0x3f*/
+  0xec58, 0xec59, 0xec5a, 0xec5b, 0xec5c, 0xec5d, 0xec5e, 0xec5f, /*0x40-0x47*/
+  0xec60, 0xec61, 0xec62, 0xec63, 0xec64, 0xec65, 0xec66, 0xec67, /*0x48-0x4f*/
+  0xec68, 0xec69, 0xc7e0, 0xf6a6, 0xec6a, 0xec6b, 0xbeb8, 0xec6c, /*0x50-0x57*/
+  0xec6d, 0xbeb2, 0xec6e, 0xb5e5, 0xec6f, 0xec70, 0xb7c7, 0xec71, /*0x58-0x5f*/
+  0xbfbf, 0xc3d2, 0xc3e6, 0xec72, 0xec73, 0xd8cc, 0xec74, 0xec75, /*0x60-0x67*/
+  0xec76, 0xb8ef, 0xec77, 0xec78, 0xec79, 0xec7a, 0xec7b, 0xec7c, /*0x68-0x6f*/
+  0xec7d, 0xec7e, 0xec80, 0xbdf9, 0xd1a5, 0xec81, 0xb0d0, 0xec82, /*0x70-0x77*/
+  0xec83, 0xec84, 0xec85, 0xec86, 0xf7b0, 0xec87, 0xec88, 0xec89, /*0x78-0x7f*/
+  0xec8a, 0xec8b, 0xec8c, 0xec8d, 0xec8e, 0xf7b1, 0xec8f, 0xec90, /*0x80-0x87*/
+  0xec91, 0xec92, 0xec93, 0xd0ac, 0xec94, 0xb0b0, 0xec95, 0xec96, /*0x88-0x8f*/
+  0xec97, 0xf7b2, 0xf7b3, 0xec98, 0xf7b4, 0xec99, 0xec9a, 0xec9b, /*0x90-0x97*/
+  0xc7ca, 0xec9c, 0xec9d, 0xec9e, 0xec9f, 0xeca0, 0xed40, 0xed41, /*0x98-0x9f*/
+  0xbecf, 0xed42, 0xed43, 0xf7b7, 0xed44, 0xed45, 0xed46, 0xed47, /*0xa0-0xa7*/
+  0xed48, 0xed49, 0xed4a, 0xf7b6, 0xed4b, 0xb1de, 0xed4c, 0xf7b5, /*0xa8-0xaf*/
+  0xed4d, 0xed4e, 0xf7b8, 0xed4f, 0xf7b9, 0xed50, 0xed51, 0xed52, /*0xb0-0xb7*/
+  0xed53, 0xed54, 0xed55, 0xed56, 0xed57, 0xed58, 0xed59, 0xed5a, /*0xb8-0xbf*/
+  0xed5b, 0xed5c, 0xed5d, 0xed5e, 0xed5f, 0xed60, 0xed61, 0xed62, /*0xc0-0xc7*/
+  0xed63, 0xed64, 0xed65, 0xed66, 0xed67, 0xed68, 0xed69, 0xed6a, /*0xc8-0xcf*/
+  0xed6b, 0xed6c, 0xed6d, 0xed6e, 0xed6f, 0xed70, 0xed71, 0xed72, /*0xd0-0xd7*/
+  0xed73, 0xed74, 0xed75, 0xed76, 0xed77, 0xed78, 0xed79, 0xed7a, /*0xd8-0xdf*/
+  0xed7b, 0xed7c, 0xed7d, 0xed7e, 0xed80, 0xed81, 0xcea4, 0xc8cd, /*0xe0-0xe7*/
+  0xed82, 0xbaab, 0xe8b8, 0xe8b9, 0xe8ba, 0xbec2, 0xed83, 0xed84, /*0xe8-0xef*/
+  0xed85, 0xed86, 0xed87, 0xd2f4, 0xed88, 0xd4cf, 0xc9d8, 0xed89, /*0xf0-0xf7*/
+  0xed8a, 0xed8b, 0xed8c, 0xed8d, 0xed8e, 0xed8f, 0xed90, 0xed91, /*0xf8-0xff*/
+  /* 0x9800 */
+  0xed92, 0xed93, 0xed94, 0xed95, 0xed96, 0xed97, 0xed98, 0xed99, /*0x00-0x07*/
+  0xed9a, 0xed9b, 0xed9c, 0xed9d, 0xed9e, 0xed9f, 0xeda0, 0xee40, /*0x08-0x0f*/
+  0xee41, 0xee42, 0xee43, 0xee44, 0xee45, 0xee46, 0xee47, 0xee48, /*0x10-0x17*/
+  0xee49, 0xee4a, 0xee4b, 0xee4c, 0xee4d, 0xee4e, 0xee4f, 0xee50, /*0x18-0x1f*/
+  0xee51, 0xee52, 0xee53, 0xee54, 0xee55, 0xee56, 0xee57, 0xee58, /*0x20-0x27*/
+  0xee59, 0xee5a, 0xee5b, 0xee5c, 0xee5d, 0xee5e, 0xee5f, 0xee60, /*0x28-0x2f*/
+  0xee61, 0xee62, 0xee63, 0xee64, 0xee65, 0xee66, 0xee67, 0xee68, /*0x30-0x37*/
+  0xee69, 0xee6a, 0xee6b, 0xee6c, 0xee6d, 0xee6e, 0xee6f, 0xee70, /*0x38-0x3f*/
+  0xee71, 0xee72, 0xee73, 0xee74, 0xee75, 0xee76, 0xee77, 0xee78, /*0x40-0x47*/
+  0xee79, 0xee7a, 0xee7b, 0xee7c, 0xee7d, 0xee7e, 0xee80, 0xee81, /*0x48-0x4f*/
+  0xee82, 0xee83, 0xee84, 0xee85, 0xee86, 0xee87, 0xee88, 0xee89, /*0x50-0x57*/
+  0xee8a, 0xee8b, 0xee8c, 0xee8d, 0xee8e, 0xee8f, 0xee90, 0xee91, /*0x58-0x5f*/
+  0xee92, 0xee93, 0xee94, 0xee95, 0xee96, 0xee97, 0xee98, 0xee99, /*0x60-0x67*/
+  0xee9a, 0xee9b, 0xee9c, 0xee9d, 0xee9e, 0xee9f, 0xeea0, 0xef40, /*0x68-0x6f*/
+  0xef41, 0xef42, 0xef43, 0xef44, 0xef45, 0xd2b3, 0xb6a5, 0xc7ea, /*0x70-0x77*/
+  0xf1fc, 0xcfee, 0xcbb3, 0xd0eb, 0xe7ef, 0xcde7, 0xb9cb, 0xb6d9, /*0x78-0x7f*/
+  0xf1fd, 0xb0e4, 0xcbcc, 0xf1fe, 0xd4a4, 0xc2ad, 0xc1ec, 0xc6c4, /*0x80-0x87*/
+  0xbeb1, 0xf2a1, 0xbcd5, 0xef46, 0xf2a2, 0xf2a3, 0xef47, 0xf2a4, /*0x88-0x8f*/
+  0xd2c3, 0xc6b5, 0xef48, 0xcdc7, 0xf2a5, 0xef49, 0xd3b1, 0xbfc5, /*0x90-0x97*/
+  0xcce2, 0xef4a, 0xf2a6, 0xf2a7, 0xd1d5, 0xb6ee, 0xf2a8, 0xf2a9, /*0x98-0x9f*/
+  0xb5df, 0xf2aa, 0xf2ab, 0xef4b, 0xb2fc, 0xf2ac, 0xf2ad, 0xc8a7, /*0xa0-0xa7*/
+  0xef4c, 0xef4d, 0xef4e, 0xef4f, 0xef50, 0xef51, 0xef52, 0xef53, /*0xa8-0xaf*/
+  0xef54, 0xef55, 0xef56, 0xef57, 0xef58, 0xef59, 0xef5a, 0xef5b, /*0xb0-0xb7*/
+  0xef5c, 0xef5d, 0xef5e, 0xef5f, 0xef60, 0xef61, 0xef62, 0xef63, /*0xb8-0xbf*/
+  0xef64, 0xef65, 0xef66, 0xef67, 0xef68, 0xef69, 0xef6a, 0xef6b, /*0xc0-0xc7*/
+  0xef6c, 0xef6d, 0xef6e, 0xef6f, 0xef70, 0xef71, 0xb7e7, 0xef72, /*0xc8-0xcf*/
+  0xef73, 0xeca9, 0xecaa, 0xecab, 0xef74, 0xecac, 0xef75, 0xef76, /*0xd0-0xd7*/
+  0xc6ae, 0xecad, 0xecae, 0xef77, 0xef78, 0xef79, 0xb7c9, 0xcab3, /*0xd8-0xdf*/
+  0xef7a, 0xef7b, 0xef7c, 0xef7d, 0xef7e, 0xef80, 0xef81, 0xe2b8, /*0xe0-0xe7*/
+  0xf7cf, 0xef82, 0xef83, 0xef84, 0xef85, 0xef86, 0xef87, 0xef88, /*0xe8-0xef*/
+  0xef89, 0xef8a, 0xef8b, 0xef8c, 0xef8d, 0xef8e, 0xef8f, 0xef90, /*0xf0-0xf7*/
+  0xef91, 0xef92, 0xef93, 0xef94, 0xef95, 0xef96, 0xef97, 0xef98, /*0xf8-0xff*/
+  /* 0x9900 */
+  0xef99, 0xef9a, 0xef9b, 0xef9c, 0xef9d, 0xef9e, 0xef9f, 0xefa0, /*0x00-0x07*/
+  0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf7d0, 0xf045, 0xf046, /*0x08-0x0f*/
+  0xb2cd, 0xf047, 0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, /*0x10-0x17*/
+  0xf04e, 0xf04f, 0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, /*0x18-0x1f*/
+  0xf056, 0xf057, 0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, /*0x20-0x27*/
+  0xf05e, 0xf05f, 0xf060, 0xf061, 0xf062, 0xf063, 0xf7d1, 0xf064, /*0x28-0x2f*/
+  0xf065, 0xf066, 0xf067, 0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, /*0x30-0x37*/
+  0xf06d, 0xf06e, 0xf06f, 0xf070, 0xf071, 0xf072, 0xf073, 0xf074, /*0x38-0x3f*/
+  0xf075, 0xf076, 0xf077, 0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, /*0x40-0x47*/
+  0xf07d, 0xf07e, 0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, /*0x48-0x4f*/
+  0xf086, 0xf087, 0xf088, 0xf089, 0xf7d3, 0xf7d2, 0xf08a, 0xf08b, /*0x50-0x57*/
+  0xf08c, 0xf08d, 0xf08e, 0xf08f, 0xf090, 0xf091, 0xf092, 0xf093, /*0x58-0x5f*/
+  0xf094, 0xf095, 0xf096, 0xe2bb, 0xf097, 0xbca2, 0xf098, 0xe2bc, /*0x60-0x67*/
+  0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, 0xe2c1, 0xb7b9, 0xd2fb, 0xbda4, /*0x68-0x6f*/
+  0xcace, 0xb1a5, 0xcbc7, 0xf099, 0xe2c2, 0xb6fc, 0xc8c4, 0xe2c3, /*0x70-0x77*/
+  0xf09a, 0xf09b, 0xbdc8, 0xf09c, 0xb1fd, 0xe2c4, 0xf09d, 0xb6f6, /*0x78-0x7f*/
+  0xe2c5, 0xc4d9, 0xf09e, 0xf09f, 0xe2c6, 0xcfda, 0xb9dd, 0xe2c7, /*0x80-0x87*/
+  0xc0a1, 0xf0a0, 0xe2c8, 0xb2f6, 0xf140, 0xe2c9, 0xf141, 0xc1f3, /*0x88-0x8f*/
+  0xe2ca, 0xe2cb, 0xc2f8, 0xe2cc, 0xe2cd, 0xe2ce, 0xcad7, 0xd8b8, /*0x90-0x97*/
+  0xd9e5, 0xcfe3, 0xf142, 0xf143, 0xf144, 0xf145, 0xf146, 0xf147, /*0x98-0x9f*/
+  0xf148, 0xf149, 0xf14a, 0xf14b, 0xf14c, 0xf0a5, 0xf14d, 0xf14e, /*0xa0-0xa7*/
+  0xdcb0, 0xf14f, 0xf150, 0xf151, 0xf152, 0xf153, 0xf154, 0xf155, /*0xa8-0xaf*/
+  0xf156, 0xf157, 0xf158, 0xf159, 0xf15a, 0xf15b, 0xf15c, 0xf15d, /*0xb0-0xb7*/
+  0xf15e, 0xf15f, 0xf160, 0xf161, 0xf162, 0xf163, 0xf164, 0xf165, /*0xb8-0xbf*/
+  0xf166, 0xf167, 0xf168, 0xf169, 0xf16a, 0xf16b, 0xf16c, 0xf16d, /*0xc0-0xc7*/
+  0xf16e, 0xf16f, 0xf170, 0xf171, 0xf172, 0xf173, 0xf174, 0xf175, /*0xc8-0xcf*/
+  0xf176, 0xf177, 0xf178, 0xf179, 0xf17a, 0xf17b, 0xf17c, 0xf17d, /*0xd0-0xd7*/
+  0xf17e, 0xf180, 0xf181, 0xf182, 0xf183, 0xf184, 0xf185, 0xf186, /*0xd8-0xdf*/
+  0xf187, 0xf188, 0xf189, 0xf18a, 0xf18b, 0xf18c, 0xf18d, 0xf18e, /*0xe0-0xe7*/
+  0xf18f, 0xf190, 0xf191, 0xf192, 0xf193, 0xf194, 0xf195, 0xf196, /*0xe8-0xef*/
+  0xf197, 0xf198, 0xf199, 0xf19a, 0xf19b, 0xf19c, 0xf19d, 0xf19e, /*0xf0-0xf7*/
+  0xf19f, 0xf1a0, 0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, /*0xf8-0xff*/
+  /* 0x9a00 */
+  0xf246, 0xf247, 0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, /*0x00-0x07*/
+  0xf24e, 0xf24f, 0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, /*0x08-0x0f*/
+  0xf256, 0xf257, 0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, /*0x10-0x17*/
+  0xf25e, 0xf25f, 0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, /*0x18-0x1f*/
+  0xf266, 0xf267, 0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d, /*0x20-0x27*/
+  0xf26e, 0xf26f, 0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275, /*0x28-0x2f*/
+  0xf276, 0xf277, 0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d, /*0x30-0x37*/
+  0xf27e, 0xf280, 0xf281, 0xf282, 0xf283, 0xf284, 0xf285, 0xf286, /*0x38-0x3f*/
+  0xf287, 0xf288, 0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d, 0xf28e, /*0x40-0x47*/
+  0xf28f, 0xf290, 0xf291, 0xf292, 0xf293, 0xf294, 0xf295, 0xf296, /*0x48-0x4f*/
+  0xf297, 0xf298, 0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d, 0xf29e, /*0x50-0x57*/
+  0xf29f, 0xf2a0, 0xf340, 0xf341, 0xf342, 0xf343, 0xf344, 0xf345, /*0x58-0x5f*/
+  0xf346, 0xf347, 0xf348, 0xf349, 0xf34a, 0xf34b, 0xf34c, 0xf34d, /*0x60-0x67*/
+  0xf34e, 0xf34f, 0xf350, 0xf351, 0xc2ed, 0xd4a6, 0xcdd4, 0xd1b1, /*0x68-0x6f*/
+  0xb3db, 0xc7fd, 0xf352, 0xb2b5, 0xc2bf, 0xe6e0, 0xcabb, 0xe6e1, /*0x70-0x77*/
+  0xe6e2, 0xbed4, 0xe6e3, 0xd7a4, 0xcdd5, 0xe6e5, 0xbcdd, 0xe6e4, /*0x78-0x7f*/
+  0xe6e6, 0xe6e7, 0xc2ee, 0xf353, 0xbdbe, 0xe6e8, 0xc2e6, 0xbaa7, /*0x80-0x87*/
+  0xe6e9, 0xf354, 0xe6ea, 0xb3d2, 0xd1e9, 0xf355, 0xf356, 0xbfa5, /*0x88-0x8f*/
+  0xe6eb, 0xc6ef, 0xe6ec, 0xe6ed, 0xf357, 0xf358, 0xe6ee, 0xc6ad, /*0x90-0x97*/
+  0xe6ef, 0xf359, 0xc9a7, 0xe6f0, 0xe6f1, 0xe6f2, 0xe5b9, 0xe6f3, /*0x98-0x9f*/
+  0xe6f4, 0xc2e2, 0xe6f5, 0xe6f6, 0xd6e8, 0xe6f7, 0xf35a, 0xe6f8, /*0xa0-0xa7*/
+  0xb9c7, 0xf35b, 0xf35c, 0xf35d, 0xf35e, 0xf35f, 0xf360, 0xf361, /*0xa8-0xaf*/
+  0xf7bb, 0xf7ba, 0xf362, 0xf363, 0xf364, 0xf365, 0xf7be, 0xf7bc, /*0xb0-0xb7*/
+  0xbaa1, 0xf366, 0xf7bf, 0xf367, 0xf7c0, 0xf368, 0xf369, 0xf36a, /*0xb8-0xbf*/
+  0xf7c2, 0xf7c1, 0xf7c4, 0xf36b, 0xf36c, 0xf7c3, 0xf36d, 0xf36e, /*0xc0-0xc7*/
+  0xf36f, 0xf370, 0xf371, 0xf7c5, 0xf7c6, 0xf372, 0xf373, 0xf374, /*0xc8-0xcf*/
+  0xf375, 0xf7c7, 0xf376, 0xcbe8, 0xf377, 0xf378, 0xf379, 0xf37a, /*0xd0-0xd7*/
+  0xb8df, 0xf37b, 0xf37c, 0xf37d, 0xf37e, 0xf380, 0xf381, 0xf7d4, /*0xd8-0xdf*/
+  0xf382, 0xf7d5, 0xf383, 0xf384, 0xf385, 0xf386, 0xf7d6, 0xf387, /*0xe0-0xe7*/
+  0xf388, 0xf389, 0xf38a, 0xf7d8, 0xf38b, 0xf7da, 0xf38c, 0xf7d7, /*0xe8-0xef*/
+  0xf38d, 0xf38e, 0xf38f, 0xf390, 0xf391, 0xf392, 0xf393, 0xf394, /*0xf0-0xf7*/
+  0xf395, 0xf7db, 0xf396, 0xf7d9, 0xf397, 0xf398, 0xf399, 0xf39a, /*0xf8-0xff*/
+  /* 0x9b00 */
+  0xf39b, 0xf39c, 0xf39d, 0xd7d7, 0xf39e, 0xf39f, 0xf3a0, 0xf440, /*0x00-0x07*/
+  0xf7dc, 0xf441, 0xf442, 0xf443, 0xf444, 0xf445, 0xf446, 0xf7dd, /*0x08-0x0f*/
+  0xf447, 0xf448, 0xf449, 0xf7de, 0xf44a, 0xf44b, 0xf44c, 0xf44d, /*0x10-0x17*/
+  0xf44e, 0xf44f, 0xf450, 0xf451, 0xf452, 0xf453, 0xf454, 0xf7df, /*0x18-0x1f*/
+  0xf455, 0xf456, 0xf457, 0xf7e0, 0xf458, 0xf459, 0xf45a, 0xf45b, /*0x20-0x27*/
+  0xf45c, 0xf45d, 0xf45e, 0xf45f, 0xf460, 0xf461, 0xf462, 0xdbcb, /*0x28-0x2f*/
+  0xf463, 0xf464, 0xd8aa, 0xf465, 0xf466, 0xf467, 0xf468, 0xf469, /*0x30-0x37*/
+  0xf46a, 0xf46b, 0xf46c, 0xe5f7, 0xb9ed, 0xf46d, 0xf46e, 0xf46f, /*0x38-0x3f*/
+  0xf470, 0xbffd, 0xbbea, 0xf7c9, 0xc6c7, 0xf7c8, 0xf471, 0xf7ca, /*0x40-0x47*/
+  0xf7cc, 0xf7cb, 0xf472, 0xf473, 0xf474, 0xf7cd, 0xf475, 0xceba, /*0x48-0x4f*/
+  0xf476, 0xf7ce, 0xf477, 0xf478, 0xc4a7, 0xf479, 0xf47a, 0xf47b, /*0x50-0x57*/
+  0xf47c, 0xf47d, 0xf47e, 0xf480, 0xf481, 0xf482, 0xf483, 0xf484, /*0x58-0x5f*/
+  0xf485, 0xf486, 0xf487, 0xf488, 0xf489, 0xf48a, 0xf48b, 0xf48c, /*0x60-0x67*/
+  0xf48d, 0xf48e, 0xf48f, 0xf490, 0xf491, 0xf492, 0xf493, 0xf494, /*0x68-0x6f*/
+  0xf495, 0xf496, 0xf497, 0xf498, 0xf499, 0xf49a, 0xf49b, 0xf49c, /*0x70-0x77*/
+  0xf49d, 0xf49e, 0xf49f, 0xf4a0, 0xf540, 0xf541, 0xf542, 0xf543, /*0x78-0x7f*/
+  0xf544, 0xf545, 0xf546, 0xf547, 0xf548, 0xf549, 0xf54a, 0xf54b, /*0x80-0x87*/
+  0xf54c, 0xf54d, 0xf54e, 0xf54f, 0xf550, 0xf551, 0xf552, 0xf553, /*0x88-0x8f*/
+  0xf554, 0xf555, 0xf556, 0xf557, 0xf558, 0xf559, 0xf55a, 0xf55b, /*0x90-0x97*/
+  0xf55c, 0xf55d, 0xf55e, 0xf55f, 0xf560, 0xf561, 0xf562, 0xf563, /*0x98-0x9f*/
+  0xf564, 0xf565, 0xf566, 0xf567, 0xf568, 0xf569, 0xf56a, 0xf56b, /*0xa0-0xa7*/
+  0xf56c, 0xf56d, 0xf56e, 0xf56f, 0xf570, 0xf571, 0xf572, 0xf573, /*0xa8-0xaf*/
+  0xf574, 0xf575, 0xf576, 0xf577, 0xf578, 0xf579, 0xf57a, 0xf57b, /*0xb0-0xb7*/
+  0xf57c, 0xf57d, 0xf57e, 0xf580, 0xf581, 0xf582, 0xf583, 0xf584, /*0xb8-0xbf*/
+  0xf585, 0xf586, 0xf587, 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c, /*0xc0-0xc7*/
+  0xf58d, 0xf58e, 0xf58f, 0xf590, 0xf591, 0xf592, 0xf593, 0xf594, /*0xc8-0xcf*/
+  0xf595, 0xf596, 0xf597, 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c, /*0xd0-0xd7*/
+  0xf59d, 0xf59e, 0xf59f, 0xf5a0, 0xf640, 0xf641, 0xf642, 0xf643, /*0xd8-0xdf*/
+  0xf644, 0xf645, 0xf646, 0xf647, 0xf648, 0xf649, 0xf64a, 0xf64b, /*0xe0-0xe7*/
+  0xf64c, 0xf64d, 0xf64e, 0xf64f, 0xf650, 0xf651, 0xf652, 0xf653, /*0xe8-0xef*/
+  0xf654, 0xf655, 0xf656, 0xf657, 0xf658, 0xf659, 0xf65a, 0xf65b, /*0xf0-0xf7*/
+  0xf65c, 0xf65d, 0xf65e, 0xf65f, 0xf660, 0xf661, 0xf662, 0xf663, /*0xf8-0xff*/
+  /* 0x9c00 */
+  0xf664, 0xf665, 0xf666, 0xf667, 0xf668, 0xf669, 0xf66a, 0xf66b, /*0x00-0x07*/
+  0xf66c, 0xf66d, 0xf66e, 0xf66f, 0xf670, 0xf671, 0xf672, 0xf673, /*0x08-0x0f*/
+  0xf674, 0xf675, 0xf676, 0xf677, 0xf678, 0xf679, 0xf67a, 0xf67b, /*0x10-0x17*/
+  0xf67c, 0xf67d, 0xf67e, 0xf680, 0xf681, 0xf682, 0xf683, 0xf684, /*0x18-0x1f*/
+  0xf685, 0xf686, 0xf687, 0xf688, 0xf689, 0xf68a, 0xf68b, 0xf68c, /*0x20-0x27*/
+  0xf68d, 0xf68e, 0xf68f, 0xf690, 0xf691, 0xf692, 0xf693, 0xf694, /*0x28-0x2f*/
+  0xf695, 0xf696, 0xf697, 0xf698, 0xf699, 0xf69a, 0xf69b, 0xf69c, /*0x30-0x37*/
+  0xf69d, 0xf69e, 0xf69f, 0xf6a0, 0xf740, 0xf741, 0xf742, 0xf743, /*0x38-0x3f*/
+  0xf744, 0xf745, 0xf746, 0xf747, 0xf748, 0xf749, 0xf74a, 0xf74b, /*0x40-0x47*/
+  0xf74c, 0xf74d, 0xf74e, 0xf74f, 0xf750, 0xf751, 0xf752, 0xf753, /*0x48-0x4f*/
+  0xf754, 0xf755, 0xf756, 0xf757, 0xf758, 0xf759, 0xf75a, 0xf75b, /*0x50-0x57*/
+  0xf75c, 0xf75d, 0xf75e, 0xf75f, 0xf760, 0xf761, 0xf762, 0xf763, /*0x58-0x5f*/
+  0xf764, 0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b, /*0x60-0x67*/
+  0xf76c, 0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773, /*0x68-0x6f*/
+  0xf774, 0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0xf77b, /*0x70-0x77*/
+  0xf77c, 0xf77d, 0xf77e, 0xf780, 0xd3e3, 0xf781, 0xf782, 0xf6cf, /*0x78-0x7f*/
+  0xf783, 0xc2b3, 0xf6d0, 0xf784, 0xf785, 0xf6d1, 0xf6d2, 0xf6d3, /*0x80-0x87*/
+  0xf6d4, 0xf786, 0xf787, 0xf6d6, 0xf788, 0xb1ab, 0xf6d7, 0xf789, /*0x88-0x8f*/
+  0xf6d8, 0xf6d9, 0xf6da, 0xf78a, 0xf6db, 0xf6dc, 0xf78b, 0xf78c, /*0x90-0x97*/
+  0xf78d, 0xf78e, 0xf6dd, 0xf6de, 0xcfca, 0xf78f, 0xf6df, 0xf6e0, /*0x98-0x9f*/
+  0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xc0f0, 0xf6e5, 0xf6e6, 0xf6e7, /*0xa0-0xa7*/
+  0xf6e8, 0xf6e9, 0xf790, 0xf6ea, 0xf791, 0xf6eb, 0xf6ec, 0xf792, /*0xa8-0xaf*/
+  0xf6ed, 0xf6ee, 0xf6ef, 0xf6f0, 0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, /*0xb0-0xb7*/
+  0xbea8, 0xf793, 0xf6f5, 0xf6f6, 0xf6f7, 0xf6f8, 0xf794, 0xf795, /*0xb8-0xbf*/
+  0xf796, 0xf797, 0xf798, 0xc8fa, 0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, /*0xc0-0xc7*/
+  0xf799, 0xf79a, 0xf6fd, 0xf6fe, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4, /*0xc8-0xcf*/
+  0xf7a5, 0xf79b, 0xf79c, 0xf7a6, 0xf7a7, 0xf7a8, 0xb1ee, 0xf7a9, /*0xd0-0xd7*/
+  0xf7aa, 0xf7ab, 0xf79d, 0xf79e, 0xf7ac, 0xf7ad, 0xc1db, 0xf7ae, /*0xd8-0xdf*/
+  0xf79f, 0xf7a0, 0xf7af, 0xf840, 0xf841, 0xf842, 0xf843, 0xf844, /*0xe0-0xe7*/
+  0xf845, 0xf846, 0xf847, 0xf848, 0xf849, 0xf84a, 0xf84b, 0xf84c, /*0xe8-0xef*/
+  0xf84d, 0xf84e, 0xf84f, 0xf850, 0xf851, 0xf852, 0xf853, 0xf854, /*0xf0-0xf7*/
+  0xf855, 0xf856, 0xf857, 0xf858, 0xf859, 0xf85a, 0xf85b, 0xf85c, /*0xf8-0xff*/
+  /* 0x9d00 */
+  0xf85d, 0xf85e, 0xf85f, 0xf860, 0xf861, 0xf862, 0xf863, 0xf864, /*0x00-0x07*/
+  0xf865, 0xf866, 0xf867, 0xf868, 0xf869, 0xf86a, 0xf86b, 0xf86c, /*0x08-0x0f*/
+  0xf86d, 0xf86e, 0xf86f, 0xf870, 0xf871, 0xf872, 0xf873, 0xf874, /*0x10-0x17*/
+  0xf875, 0xf876, 0xf877, 0xf878, 0xf879, 0xf87a, 0xf87b, 0xf87c, /*0x18-0x1f*/
+  0xf87d, 0xf87e, 0xf880, 0xf881, 0xf882, 0xf883, 0xf884, 0xf885, /*0x20-0x27*/
+  0xf886, 0xf887, 0xf888, 0xf889, 0xf88a, 0xf88b, 0xf88c, 0xf88d, /*0x28-0x2f*/
+  0xf88e, 0xf88f, 0xf890, 0xf891, 0xf892, 0xf893, 0xf894, 0xf895, /*0x30-0x37*/
+  0xf896, 0xf897, 0xf898, 0xf899, 0xf89a, 0xf89b, 0xf89c, 0xf89d, /*0x38-0x3f*/
+  0xf89e, 0xf89f, 0xf8a0, 0xf940, 0xf941, 0xf942, 0xf943, 0xf944, /*0x40-0x47*/
+  0xf945, 0xf946, 0xf947, 0xf948, 0xf949, 0xf94a, 0xf94b, 0xf94c, /*0x48-0x4f*/
+  0xf94d, 0xf94e, 0xf94f, 0xf950, 0xf951, 0xf952, 0xf953, 0xf954, /*0x50-0x57*/
+  0xf955, 0xf956, 0xf957, 0xf958, 0xf959, 0xf95a, 0xf95b, 0xf95c, /*0x58-0x5f*/
+  0xf95d, 0xf95e, 0xf95f, 0xf960, 0xf961, 0xf962, 0xf963, 0xf964, /*0x60-0x67*/
+  0xf965, 0xf966, 0xf967, 0xf968, 0xf969, 0xf96a, 0xf96b, 0xf96c, /*0x68-0x6f*/
+  0xf96d, 0xf96e, 0xf96f, 0xf970, 0xf971, 0xf972, 0xf973, 0xf974, /*0x70-0x77*/
+  0xf975, 0xf976, 0xf977, 0xf978, 0xf979, 0xf97a, 0xf97b, 0xf97c, /*0x78-0x7f*/
+  0xf97d, 0xf97e, 0xf980, 0xf981, 0xf982, 0xf983, 0xf984, 0xf985, /*0x80-0x87*/
+  0xf986, 0xf987, 0xf988, 0xf989, 0xf98a, 0xf98b, 0xf98c, 0xf98d, /*0x88-0x8f*/
+  0xf98e, 0xf98f, 0xf990, 0xf991, 0xf992, 0xf993, 0xf994, 0xf995, /*0x90-0x97*/
+  0xf996, 0xf997, 0xf998, 0xf999, 0xf99a, 0xf99b, 0xf99c, 0xf99d, /*0x98-0x9f*/
+  0xf99e, 0xf99f, 0xf9a0, 0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, /*0xa0-0xa7*/
+  0xfa45, 0xfa46, 0xfa47, 0xfa48, 0xfa49, 0xfa4a, 0xfa4b, 0xfa4c, /*0xa8-0xaf*/
+  0xfa4d, 0xfa4e, 0xfa4f, 0xfa50, 0xfa51, 0xfa52, 0xfa53, 0xfa54, /*0xb0-0xb7*/
+  0xfa55, 0xfa56, 0xfa57, 0xfa58, 0xfa59, 0xfa5a, 0xfa5b, 0xfa5c, /*0xb8-0xbf*/
+  0xfa5d, 0xfa5e, 0xfa5f, 0xfa60, 0xfa61, 0xfa62, 0xfa63, 0xfa64, /*0xc0-0xc7*/
+  0xfa65, 0xfa66, 0xfa67, 0xfa68, 0xfa69, 0xfa6a, 0xfa6b, 0xfa6c, /*0xc8-0xcf*/
+  0xfa6d, 0xfa6e, 0xfa6f, 0xfa70, 0xfa71, 0xfa72, 0xfa73, 0xfa74, /*0xd0-0xd7*/
+  0xfa75, 0xfa76, 0xfa77, 0xfa78, 0xfa79, 0xfa7a, 0xfa7b, 0xfa7c, /*0xd8-0xdf*/
+  0xfa7d, 0xfa7e, 0xfa80, 0xfa81, 0xfa82, 0xfa83, 0xfa84, 0xfa85, /*0xe0-0xe7*/
+  0xfa86, 0xfa87, 0xfa88, 0xfa89, 0xfa8a, 0xfa8b, 0xfa8c, 0xfa8d, /*0xe8-0xef*/
+  0xfa8e, 0xfa8f, 0xfa90, 0xfa91, 0xfa92, 0xfa93, 0xfa94, 0xfa95, /*0xf0-0xf7*/
+  0xfa96, 0xfa97, 0xfa98, 0xfa99, 0xfa9a, 0xfa9b, 0xfa9c, 0xfa9d, /*0xf8-0xff*/
+  /* 0x9e00 */
+  0xfa9e, 0xfa9f, 0xfaa0, 0xfb40, 0xfb41, 0xfb42, 0xfb43, 0xfb44, /*0x00-0x07*/
+  0xfb45, 0xfb46, 0xfb47, 0xfb48, 0xfb49, 0xfb4a, 0xfb4b, 0xfb4c, /*0x08-0x0f*/
+  0xfb4d, 0xfb4e, 0xfb4f, 0xfb50, 0xfb51, 0xfb52, 0xfb53, 0xfb54, /*0x10-0x17*/
+  0xfb55, 0xfb56, 0xfb57, 0xfb58, 0xfb59, 0xfb5a, 0xfb5b, 0xc4f1, /*0x18-0x1f*/
+  0xf0af, 0xbca6, 0xf0b0, 0xc3f9, 0xfb5c, 0xc5b8, 0xd1bb, 0xfb5d, /*0x20-0x27*/
+  0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xd1bc, 0xfb5e, 0xd1ec, /*0x28-0x2f*/
+  0xfb5f, 0xf0b7, 0xf0b6, 0xd4a7, 0xfb60, 0xcdd2, 0xf0b8, 0xf0ba, /*0x30-0x37*/
+  0xf0b9, 0xf0bb, 0xf0bc, 0xfb61, 0xfb62, 0xb8eb, 0xf0bd, 0xbae8, /*0x38-0x3f*/
+  0xfb63, 0xf0be, 0xf0bf, 0xbee9, 0xf0c0, 0xb6ec, 0xf0c1, 0xf0c2, /*0x40-0x47*/
+  0xf0c3, 0xf0c4, 0xc8b5, 0xf0c5, 0xf0c6, 0xfb64, 0xf0c7, 0xc5f4, /*0x48-0x4f*/
+  0xfb65, 0xf0c8, 0xfb66, 0xfb67, 0xfb68, 0xf0c9, 0xfb69, 0xf0ca, /*0x50-0x57*/
+  0xf7bd, 0xfb6a, 0xf0cb, 0xf0cc, 0xf0cd, 0xfb6b, 0xf0ce, 0xfb6c, /*0x58-0x5f*/
+  0xfb6d, 0xfb6e, 0xfb6f, 0xf0cf, 0xbad7, 0xfb70, 0xf0d0, 0xf0d1, /*0x60-0x67*/
+  0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d8, 0xfb71, 0xfb72, /*0x68-0x6f*/
+  0xd3a5, 0xf0d7, 0xfb73, 0xf0d9, 0xfb74, 0xfb75, 0xfb76, 0xfb77, /*0x70-0x77*/
+  0xfb78, 0xfb79, 0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d, 0xf5ba, 0xc2b9, /*0x78-0x7f*/
+  0xfb7e, 0xfb80, 0xf7e4, 0xfb81, 0xfb82, 0xfb83, 0xfb84, 0xf7e5, /*0x80-0x87*/
+  0xf7e6, 0xfb85, 0xfb86, 0xf7e7, 0xfb87, 0xfb88, 0xfb89, 0xfb8a, /*0x88-0x8f*/
+  0xfb8b, 0xfb8c, 0xf7e8, 0xc2b4, 0xfb8d, 0xfb8e, 0xfb8f, 0xfb90, /*0x90-0x97*/
+  0xfb91, 0xfb92, 0xfb93, 0xfb94, 0xfb95, 0xf7ea, 0xfb96, 0xf7eb, /*0x98-0x9f*/
+  0xfb97, 0xfb98, 0xfb99, 0xfb9a, 0xfb9b, 0xfb9c, 0xc2f3, 0xfb9d, /*0xa0-0xa7*/
+  0xfb9e, 0xfb9f, 0xfba0, 0xfc40, 0xfc41, 0xfc42, 0xfc43, 0xfc44, /*0xa8-0xaf*/
+  0xfc45, 0xfc46, 0xfc47, 0xfc48, 0xf4f0, 0xfc49, 0xfc4a, 0xfc4b, /*0xb0-0xb7*/
+  0xf4ef, 0xfc4c, 0xfc4d, 0xc2e9, 0xfc4e, 0xf7e1, 0xf7e2, 0xfc4f, /*0xb8-0xbf*/
+  0xfc50, 0xfc51, 0xfc52, 0xfc53, 0xbbc6, 0xfc54, 0xfc55, 0xfc56, /*0xc0-0xc7*/
+  0xfc57, 0xd9e4, 0xfc58, 0xfc59, 0xfc5a, 0xcaf2, 0xc0e8, 0xf0a4, /*0xc8-0xcf*/
+  0xfc5b, 0xbada, 0xfc5c, 0xfc5d, 0xc7ad, 0xfc5e, 0xfc5f, 0xfc60, /*0xd0-0xd7*/
+  0xc4ac, 0xfc61, 0xfc62, 0xf7ec, 0xf7ed, 0xf7ee, 0xfc63, 0xf7f0, /*0xd8-0xdf*/
+  0xf7ef, 0xfc64, 0xf7f1, 0xfc65, 0xfc66, 0xf7f4, 0xfc67, 0xf7f3, /*0xe0-0xe7*/
+  0xfc68, 0xf7f2, 0xf7f5, 0xfc69, 0xfc6a, 0xfc6b, 0xfc6c, 0xf7f6, /*0xe8-0xef*/
+  0xfc6d, 0xfc6e, 0xfc6f, 0xfc70, 0xfc71, 0xfc72, 0xfc73, 0xfc74, /*0xf0-0xf7*/
+  0xfc75, 0xede9, 0xfc76, 0xedea, 0xedeb, 0xfc77, 0xf6bc, 0xfc78, /*0xf8-0xff*/
+  /* 0x9f00 */
+  0xfc79, 0xfc7a, 0xfc7b, 0xfc7c, 0xfc7d, 0xfc7e, 0xfc80, 0xfc81, /*0x00-0x07*/
+  0xfc82, 0xfc83, 0xfc84, 0xf6bd, 0xfc85, 0xf6be, 0xb6a6, 0xfc86, /*0x08-0x0f*/
+  0xd8be, 0xfc87, 0xfc88, 0xb9c4, 0xfc89, 0xfc8a, 0xfc8b, 0xd8bb, /*0x10-0x17*/
+  0xfc8c, 0xdcb1, 0xfc8d, 0xfc8e, 0xfc8f, 0xfc90, 0xfc91, 0xfc92, /*0x18-0x1f*/
+  0xcaf3, 0xfc93, 0xf7f7, 0xfc94, 0xfc95, 0xfc96, 0xfc97, 0xfc98, /*0x20-0x27*/
+  0xfc99, 0xfc9a, 0xfc9b, 0xfc9c, 0xf7f8, 0xfc9d, 0xfc9e, 0xf7f9, /*0x28-0x2f*/
+  0xfc9f, 0xfca0, 0xfd40, 0xfd41, 0xfd42, 0xfd43, 0xfd44, 0xf7fb, /*0x30-0x37*/
+  0xfd45, 0xf7fa, 0xfd46, 0xb1c7, 0xfd47, 0xf7fc, 0xf7fd, 0xfd48, /*0x38-0x3f*/
+  0xfd49, 0xfd4a, 0xfd4b, 0xfd4c, 0xf7fe, 0xfd4d, 0xfd4e, 0xfd4f, /*0x40-0x47*/
+  0xfd50, 0xfd51, 0xfd52, 0xfd53, 0xfd54, 0xfd55, 0xfd56, 0xfd57, /*0x48-0x4f*/
+  0xc6eb, 0xecb4, 0xfd58, 0xfd59, 0xfd5a, 0xfd5b, 0xfd5c, 0xfd5d, /*0x50-0x57*/
+  0xfd5e, 0xfd5f, 0xfd60, 0xfd61, 0xfd62, 0xfd63, 0xfd64, 0xfd65, /*0x58-0x5f*/
+  0xfd66, 0xfd67, 0xfd68, 0xfd69, 0xfd6a, 0xfd6b, 0xfd6c, 0xfd6d, /*0x60-0x67*/
+  0xfd6e, 0xfd6f, 0xfd70, 0xfd71, 0xfd72, 0xfd73, 0xfd74, 0xfd75, /*0x68-0x6f*/
+  0xfd76, 0xfd77, 0xfd78, 0xfd79, 0xfd7a, 0xfd7b, 0xfd7c, 0xfd7d, /*0x70-0x77*/
+  0xfd7e, 0xfd80, 0xfd81, 0xfd82, 0xfd83, 0xfd84, 0xfd85, 0xb3dd, /*0x78-0x7f*/
+  0xf6b3, 0xfd86, 0xfd87, 0xf6b4, 0xc1e4, 0xf6b5, 0xf6b6, 0xf6b7, /*0x80-0x87*/
+  0xf6b8, 0xf6b9, 0xf6ba, 0xc8a3, 0xf6bb, 0xfd88, 0xfd89, 0xfd8a, /*0x88-0x8f*/
+  0xfd8b, 0xfd8c, 0xfd8d, 0xfd8e, 0xfd8f, 0xfd90, 0xfd91, 0xfd92, /*0x90-0x97*/
+  0xfd93, 0xc1fa, 0xb9a8, 0xede8, 0xfd94, 0xfd95, 0xfd96, 0xb9ea, /*0x98-0x9f*/
+  0xd9df, 0xfd97, 0xfd98, 0xfd99, 0xfd9a, 0xfd9b, 0x0000, 0x0000, /*0xa0-0xa7*/
+};
+static const unsigned short cp936ext_page1f2f[32] = {
+  0x0000, 0xfd9d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x78-0x7f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x80-0x87*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x88-0x8f*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfd9e, 0x0000, 0x0000, /*0x90-0x97*/
+};
+static const unsigned short cp936ext_page1f3c[24] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfd9f, /*0xe0-0xe7*/
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xe8-0xef*/
+  0x0000, 0xfda0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0xf0-0xf7*/
+};
+static const unsigned short cp936ext_page1f41[40] = {
+  0x0000, 0x0000, 0x0000, 0x0000, 0xfe40, 0xfe41, 0xfe42, 0xfe43, /*0x08-0x0f*/
+  0x0000, 0xfe44, 0x0000, 0xfe45, 0xfe46, 0x0000, 0x0000, 0x0000, /*0x10-0x17*/
+  0xfe47, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfe48, /*0x18-0x1f*/
+  0xfe49, 0xfe4a, 0x0000, 0xfe4b, 0xfe4c, 0x0000, 0x0000, 0xfe4d, /*0x20-0x27*/
+  0xfe4e, 0xfe4f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /*0x28-0x2f*/
+};
+static const unsigned short cp936ext_page1fc6[64] = {
+  0xa955, 0xa6f2, 0x0000, 0xa6f4, 0xa6f5, 0xa6e0, 0xa6e1, 0xa6f0, /*0x30-0x37*/
+  0xa6f1, 0xa6e2, 0xa6e3, 0xa6ee, 0xa6ef, 0xa6e6, 0xa6e7, 0xa6e4, /*0x38-0x3f*/
+  0xa6e5, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0x0000, 0x0000, 0x0000, /*0x40-0x47*/
+  0x0000, 0xa968, 0xa969, 0xa96a, 0xa96b, 0xa96c, 0xa96d, 0xa96e, /*0x48-0x4f*/
+  0xa96f, 0xa970, 0xa971, 0x0000, 0xa972, 0xa973, 0xa974, 0xa975, /*0x50-0x57*/
+  0x0000, 0xa976, 0xa977, 0xa978, 0xa979, 0xa97a, 0xa97b, 0xa97c, /*0x58-0x5f*/
+  0xa97d, 0xa97e, 0xa980, 0xa981, 0xa982, 0xa983, 0xa984, 0x0000, /*0x60-0x67*/
+  0xa985, 0xa986, 0xa987, 0xa988, 0x0000, 0x0000, 0x0000, 0x0000, /*0x68-0x6f*/
+};
+static const unsigned short cp936ext_page1fe0[96] = {
+  0x0000, 0xa3a1, 0xa3a2, 0xa3a3, 0xa1e7, 0xa3a5, 0xa3a6, 0xa3a7, /*0x00-0x07*/
+  0xa3a8, 0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, /*0x08-0x0f*/
+  0xa3b0, 0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, /*0x10-0x17*/
+  0xa3b8, 0xa3b9, 0xa3ba, 0xa3bb, 0xa3bc, 0xa3bd, 0xa3be, 0xa3bf, /*0x18-0x1f*/
+  0xa3c0, 0xa3c1, 0xa3c2, 0xa3c3, 0xa3c4, 0xa3c5, 0xa3c6, 0xa3c7, /*0x20-0x27*/
+  0xa3c8, 0xa3c9, 0xa3ca, 0xa3cb, 0xa3cc, 0xa3cd, 0xa3ce, 0xa3cf, /*0x28-0x2f*/
+  0xa3d0, 0xa3d1, 0xa3d2, 0xa3d3, 0xa3d4, 0xa3d5, 0xa3d6, 0xa3d7, /*0x30-0x37*/
+  0xa3d8, 0xa3d9, 0xa3da, 0xa3db, 0xa3dc, 0xa3dd, 0xa3de, 0xa3df, /*0x38-0x3f*/
+  0xa3e0, 0xa3e1, 0xa3e2, 0xa3e3, 0xa3e4, 0xa3e5, 0xa3e6, 0xa3e7, /*0x40-0x47*/
+  0xa3e8, 0xa3e9, 0xa3ea, 0xa3eb, 0xa3ec, 0xa3ed, 0xa3ee, 0xa3ef, /*0x48-0x4f*/
+  0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7, /*0x50-0x57*/
+  0xa3f8, 0xa3f9, 0xa3fa, 0xa3fb, 0xa3fc, 0xa3fd, 0xa1ab, 0x0000, /*0x58-0x5f*/
+};
+static const unsigned short cp936ext_page1ffc[8] = {
+  0xa1e9, 0xa1ea, 0xa956, 0xa3fe, 0xa957, 0xa3a4, 0x0000, 0x0000, /*0xe0-0xe7*/
+};
+
+static int
+cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    unsigned short c = 0;
+    if (wc >= 0x00a0 && wc < 0x0170)
+      c = cp936ext_page0014[wc-0x00a0];
+    else if (wc >= 0x01c8 && wc < 0x01e0)
+      c = cp936ext_page0039[wc-0x01c8];
+    else if (wc >= 0x0250 && wc < 0x0268)
+      c = cp936ext_page004a[wc-0x0250];
+    else if (wc >= 0x02c0 && wc < 0x02e0)
+      c = cp936ext_page0058[wc-0x02c0];
+    else if (wc >= 0x0390 && wc < 0x03d0)
+      c = cp936ext_page0072[wc-0x0390];
+    else if (wc >= 0x0400 && wc < 0x0458)
+      c = cp936ext_page0080[wc-0x0400];
+    else if (wc >= 0x2010 && wc < 0x2040)
+      c = cp936ext_page0402[wc-0x2010];
+    else if (wc >= 0x2100 && wc < 0x21a0)
+      c = cp936ext_page0420[wc-0x2100];
+    else if (wc >= 0x2208 && wc < 0x22c0)
+      c = cp936ext_page0441[wc-0x2208];
+    else if (wc == 0x2312)
+      c = 0xa1d0;
+    else if (wc >= 0x2460 && wc < 0x24a0)
+      c = cp936ext_page048c[wc-0x2460];
+    else if (wc >= 0x2500 && wc < 0x25e8)
+      c = cp936ext_page04a0[wc-0x2500];
+    else if (wc >= 0x2600 && wc < 0x2648)
+      c = cp936ext_page04c0[wc-0x2600];
+    else if (wc >= 0x3000 && wc < 0x3130)
+      c = cp936ext_page0600[wc-0x3000];
+    else if (wc >= 0x3220 && wc < 0x3238)
+      c = cp936ext_page0644[wc-0x3220];
+    else if (wc == 0x32a3)
+      c = 0xa949;
+    else if (wc >= 0x3388 && wc < 0x33d8)
+      c = cp936ext_page0671[wc-0x3388];
+    else if (wc >= 0x4e00 && wc < 0x9fa8)
+      c = cp936ext_page09c0[wc-0x4e00];
+    else if (wc == 0xf92c)
+      c = 0xfd9c;
+    else if (wc >= 0xf978 && wc < 0xf998)
+      c = cp936ext_page1f2f[wc-0xf978];
+    else if (wc >= 0xf9e0 && wc < 0xf9f8)
+      c = cp936ext_page1f3c[wc-0xf9e0];
+    else if (wc >= 0xfa08 && wc < 0xfa30)
+      c = cp936ext_page1f41[wc-0xfa08];
+    else if (wc >= 0xfe30 && wc < 0xfe70)
+      c = cp936ext_page1fc6[wc-0xfe30];
+    else if (wc >= 0xff00 && wc < 0xff60)
+      c = cp936ext_page1fe0[wc-0xff00];
+    else if (wc >= 0xffe0 && wc < 0xffe8)
+      c = cp936ext_page1ffc[wc-0xffe0];
+    if (c != 0) {
+      r[0] = (c >> 8); r[1] = (c & 0xff);
+      return 2;
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+#endif /* NEED_TOMB */
+
+#endif /* CP936 */
+
+#endif /* __APPLE__  WIN32 */
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/gb2312.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/gb2312.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/gb2312.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2556 @@
+/* $XFree86: xc/lib/X11/lcUniConv/gb2312.h,v 1.5 2003/05/27 22:26:29 tsi Exp $ */
+
+/*
+ * GB2312.1980-0
+ */
+#ifdef NEED_TOWC
+static const unsigned short gb2312_2uni_page21[831] = {
+  /* 0x21 */
+  0x3000, 0x3001, 0x3002, 0x30fb, 0x02c9, 0x02c7, 0x00a8, 0x3003,
+  0x3005, 0x2015, 0xff5e, 0x2016, 0x2026, 0x2018, 0x2019, 0x201c,
+  0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c,
+  0x300d, 0x300e, 0x300f, 0x3016, 0x3017, 0x3010, 0x3011, 0x00b1,
+  0x00d7, 0x00f7, 0x2236, 0x2227, 0x2228, 0x2211, 0x220f, 0x222a,
+  0x2229, 0x2208, 0x2237, 0x221a, 0x22a5, 0x2225, 0x2220, 0x2312,
+  0x2299, 0x222b, 0x222e, 0x2261, 0x224c, 0x2248, 0x223d, 0x221d,
+  0x2260, 0x226e, 0x226f, 0x2264, 0x2265, 0x221e, 0x2235, 0x2234,
+  0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xff04, 0x00a4,
+  0xffe0, 0xffe1, 0x2030, 0x00a7, 0x2116, 0x2606, 0x2605, 0x25cb,
+  0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2,
+  0x203b, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,
+  /* 0x22 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f,
+  0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497,
+  0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476, 0x2477,
+  0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f,
+  0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487,
+  0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
+  0x2468, 0x2469, 0xfffd, 0xfffd, 0x3220, 0x3221, 0x3222, 0x3223,
+  0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0xfffd, 0xfffd,
+  0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167,
+  0x2168, 0x2169, 0x216a, 0x216b, 0xfffd, 0xfffd,
+  /* 0x23 */
+  0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07, 0xff08,
+  0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10,
+  0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
+  0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20,
+  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, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, 0xff40,
+  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, 0xff5b, 0xff5c, 0xff5d, 0xffe3,
+  /* 0x24 */
+  0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
+  0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
+  0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
+  0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
+  0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
+  0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
+  0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
+  0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
+  0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
+  0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
+  0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x25 */
+  0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
+  0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
+  0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
+  0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
+  0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
+  0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
+  0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
+  0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
+  0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
+  0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
+  0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x26 */
+  0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
+  0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
+  0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
+  0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
+  0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x27 */
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x28 */
+  0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b, 0x00e8,
+  0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2, 0x00f2,
+  0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da, 0x01dc,
+  0x00fc, 0x00ea, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x3105, 0x3106, 0x3107, 0x3108,
+  0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, 0x3110,
+  0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118,
+  0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120,
+  0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128,
+  0x3129, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x29 */
+  0xfffd, 0xfffd, 0xfffd, 0x2500, 0x2501, 0x2502, 0x2503, 0x2504,
+  0x2505, 0x2506, 0x2507, 0x2508, 0x2509, 0x250a, 0x250b, 0x250c,
+  0x250d, 0x250e, 0x250f, 0x2510, 0x2511, 0x2512, 0x2513, 0x2514,
+  0x2515, 0x2516, 0x2517, 0x2518, 0x2519, 0x251a, 0x251b, 0x251c,
+  0x251d, 0x251e, 0x251f, 0x2520, 0x2521, 0x2522, 0x2523, 0x2524,
+  0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a, 0x252b, 0x252c,
+  0x252d, 0x252e, 0x252f, 0x2530, 0x2531, 0x2532, 0x2533, 0x2534,
+  0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x253a, 0x253b, 0x253c,
+  0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542, 0x2543, 0x2544,
+  0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x254b,
+};
+static const unsigned short gb2312_2uni_page30[6768] = {
+  /* 0x30 */
+  0x554a, 0x963f, 0x57c3, 0x6328, 0x54ce, 0x5509, 0x54c0, 0x7691,
+  0x764c, 0x853c, 0x77ee, 0x827e, 0x788d, 0x7231, 0x9698, 0x978d,
+  0x6c28, 0x5b89, 0x4ffa, 0x6309, 0x6697, 0x5cb8, 0x80fa, 0x6848,
+  0x80ae, 0x6602, 0x76ce, 0x51f9, 0x6556, 0x71ac, 0x7ff1, 0x8884,
+  0x50b2, 0x5965, 0x61ca, 0x6fb3, 0x82ad, 0x634c, 0x6252, 0x53ed,
+  0x5427, 0x7b06, 0x516b, 0x75a4, 0x5df4, 0x62d4, 0x8dcb, 0x9776,
+  0x628a, 0x8019, 0x575d, 0x9738, 0x7f62, 0x7238, 0x767d, 0x67cf,
+  0x767e, 0x6446, 0x4f70, 0x8d25, 0x62dc, 0x7a17, 0x6591, 0x73ed,
+  0x642c, 0x6273, 0x822c, 0x9881, 0x677f, 0x7248, 0x626e, 0x62cc,
+  0x4f34, 0x74e3, 0x534a, 0x529e, 0x7eca, 0x90a6, 0x5e2e, 0x6886,
+  0x699c, 0x8180, 0x7ed1, 0x68d2, 0x78c5, 0x868c, 0x9551, 0x508d,
+  0x8c24, 0x82de, 0x80de, 0x5305, 0x8912, 0x5265,
+  /* 0x31 */
+  0x8584, 0x96f9, 0x4fdd, 0x5821, 0x9971, 0x5b9d, 0x62b1, 0x62a5,
+  0x66b4, 0x8c79, 0x9c8d, 0x7206, 0x676f, 0x7891, 0x60b2, 0x5351,
+  0x5317, 0x8f88, 0x80cc, 0x8d1d, 0x94a1, 0x500d, 0x72c8, 0x5907,
+  0x60eb, 0x7119, 0x88ab, 0x5954, 0x82ef, 0x672c, 0x7b28, 0x5d29,
+  0x7ef7, 0x752d, 0x6cf5, 0x8e66, 0x8ff8, 0x903c, 0x9f3b, 0x6bd4,
+  0x9119, 0x7b14, 0x5f7c, 0x78a7, 0x84d6, 0x853d, 0x6bd5, 0x6bd9,
+  0x6bd6, 0x5e01, 0x5e87, 0x75f9, 0x95ed, 0x655d, 0x5f0a, 0x5fc5,
+  0x8f9f, 0x58c1, 0x81c2, 0x907f, 0x965b, 0x97ad, 0x8fb9, 0x7f16,
+  0x8d2c, 0x6241, 0x4fbf, 0x53d8, 0x535e, 0x8fa8, 0x8fa9, 0x8fab,
+  0x904d, 0x6807, 0x5f6a, 0x8198, 0x8868, 0x9cd6, 0x618b, 0x522b,
+  0x762a, 0x5f6c, 0x658c, 0x6fd2, 0x6ee8, 0x5bbe, 0x6448, 0x5175,
+  0x51b0, 0x67c4, 0x4e19, 0x79c9, 0x997c, 0x70b3,
+  /* 0x32 */
+  0x75c5, 0x5e76, 0x73bb, 0x83e0, 0x64ad, 0x62e8, 0x94b5, 0x6ce2,
+  0x535a, 0x52c3, 0x640f, 0x94c2, 0x7b94, 0x4f2f, 0x5e1b, 0x8236,
+  0x8116, 0x818a, 0x6e24, 0x6cca, 0x9a73, 0x6355, 0x535c, 0x54fa,
+  0x8865, 0x57e0, 0x4e0d, 0x5e03, 0x6b65, 0x7c3f, 0x90e8, 0x6016,
+  0x64e6, 0x731c, 0x88c1, 0x6750, 0x624d, 0x8d22, 0x776c, 0x8e29,
+  0x91c7, 0x5f69, 0x83dc, 0x8521, 0x9910, 0x53c2, 0x8695, 0x6b8b,
+  0x60ed, 0x60e8, 0x707f, 0x82cd, 0x8231, 0x4ed3, 0x6ca7, 0x85cf,
+  0x64cd, 0x7cd9, 0x69fd, 0x66f9, 0x8349, 0x5395, 0x7b56, 0x4fa7,
+  0x518c, 0x6d4b, 0x5c42, 0x8e6d, 0x63d2, 0x53c9, 0x832c, 0x8336,
+  0x67e5, 0x78b4, 0x643d, 0x5bdf, 0x5c94, 0x5dee, 0x8be7, 0x62c6,
+  0x67f4, 0x8c7a, 0x6400, 0x63ba, 0x8749, 0x998b, 0x8c17, 0x7f20,
+  0x94f2, 0x4ea7, 0x9610, 0x98a4, 0x660c, 0x7316,
+  /* 0x33 */
+  0x573a, 0x5c1d, 0x5e38, 0x957f, 0x507f, 0x80a0, 0x5382, 0x655e,
+  0x7545, 0x5531, 0x5021, 0x8d85, 0x6284, 0x949e, 0x671d, 0x5632,
+  0x6f6e, 0x5de2, 0x5435, 0x7092, 0x8f66, 0x626f, 0x64a4, 0x63a3,
+  0x5f7b, 0x6f88, 0x90f4, 0x81e3, 0x8fb0, 0x5c18, 0x6668, 0x5ff1,
+  0x6c89, 0x9648, 0x8d81, 0x886c, 0x6491, 0x79f0, 0x57ce, 0x6a59,
+  0x6210, 0x5448, 0x4e58, 0x7a0b, 0x60e9, 0x6f84, 0x8bda, 0x627f,
+  0x901e, 0x9a8b, 0x79e4, 0x5403, 0x75f4, 0x6301, 0x5319, 0x6c60,
+  0x8fdf, 0x5f1b, 0x9a70, 0x803b, 0x9f7f, 0x4f88, 0x5c3a, 0x8d64,
+  0x7fc5, 0x65a5, 0x70bd, 0x5145, 0x51b2, 0x866b, 0x5d07, 0x5ba0,
+  0x62bd, 0x916c, 0x7574, 0x8e0c, 0x7a20, 0x6101, 0x7b79, 0x4ec7,
+  0x7ef8, 0x7785, 0x4e11, 0x81ed, 0x521d, 0x51fa, 0x6a71, 0x53a8,
+  0x8e87, 0x9504, 0x96cf, 0x6ec1, 0x9664, 0x695a,
+  /* 0x34 */
+  0x7840, 0x50a8, 0x77d7, 0x6410, 0x89e6, 0x5904, 0x63e3, 0x5ddd,
+  0x7a7f, 0x693d, 0x4f20, 0x8239, 0x5598, 0x4e32, 0x75ae, 0x7a97,
+  0x5e62, 0x5e8a, 0x95ef, 0x521b, 0x5439, 0x708a, 0x6376, 0x9524,
+  0x5782, 0x6625, 0x693f, 0x9187, 0x5507, 0x6df3, 0x7eaf, 0x8822,
+  0x6233, 0x7ef0, 0x75b5, 0x8328, 0x78c1, 0x96cc, 0x8f9e, 0x6148,
+  0x74f7, 0x8bcd, 0x6b64, 0x523a, 0x8d50, 0x6b21, 0x806a, 0x8471,
+  0x56f1, 0x5306, 0x4ece, 0x4e1b, 0x51d1, 0x7c97, 0x918b, 0x7c07,
+  0x4fc3, 0x8e7f, 0x7be1, 0x7a9c, 0x6467, 0x5d14, 0x50ac, 0x8106,
+  0x7601, 0x7cb9, 0x6dec, 0x7fe0, 0x6751, 0x5b58, 0x5bf8, 0x78cb,
+  0x64ae, 0x6413, 0x63aa, 0x632b, 0x9519, 0x642d, 0x8fbe, 0x7b54,
+  0x7629, 0x6253, 0x5927, 0x5446, 0x6b79, 0x50a3, 0x6234, 0x5e26,
+  0x6b86, 0x4ee3, 0x8d37, 0x888b, 0x5f85, 0x902e,
+  /* 0x35 */
+  0x6020, 0x803d, 0x62c5, 0x4e39, 0x5355, 0x90f8, 0x63b8, 0x80c6,
+  0x65e6, 0x6c2e, 0x4f46, 0x60ee, 0x6de1, 0x8bde, 0x5f39, 0x86cb,
+  0x5f53, 0x6321, 0x515a, 0x8361, 0x6863, 0x5200, 0x6363, 0x8e48,
+  0x5012, 0x5c9b, 0x7977, 0x5bfc, 0x5230, 0x7a3b, 0x60bc, 0x9053,
+  0x76d7, 0x5fb7, 0x5f97, 0x7684, 0x8e6c, 0x706f, 0x767b, 0x7b49,
+  0x77aa, 0x51f3, 0x9093, 0x5824, 0x4f4e, 0x6ef4, 0x8fea, 0x654c,
+  0x7b1b, 0x72c4, 0x6da4, 0x7fdf, 0x5ae1, 0x62b5, 0x5e95, 0x5730,
+  0x8482, 0x7b2c, 0x5e1d, 0x5f1f, 0x9012, 0x7f14, 0x98a0, 0x6382,
+  0x6ec7, 0x7898, 0x70b9, 0x5178, 0x975b, 0x57ab, 0x7535, 0x4f43,
+  0x7538, 0x5e97, 0x60e6, 0x5960, 0x6dc0, 0x6bbf, 0x7889, 0x53fc,
+  0x96d5, 0x51cb, 0x5201, 0x6389, 0x540a, 0x9493, 0x8c03, 0x8dcc,
+  0x7239, 0x789f, 0x8776, 0x8fed, 0x8c0d, 0x53e0,
+  /* 0x36 */
+  0x4e01, 0x76ef, 0x53ee, 0x9489, 0x9876, 0x9f0e, 0x952d, 0x5b9a,
+  0x8ba2, 0x4e22, 0x4e1c, 0x51ac, 0x8463, 0x61c2, 0x52a8, 0x680b,
+  0x4f97, 0x606b, 0x51bb, 0x6d1e, 0x515c, 0x6296, 0x6597, 0x9661,
+  0x8c46, 0x9017, 0x75d8, 0x90fd, 0x7763, 0x6bd2, 0x728a, 0x72ec,
+  0x8bfb, 0x5835, 0x7779, 0x8d4c, 0x675c, 0x9540, 0x809a, 0x5ea6,
+  0x6e21, 0x5992, 0x7aef, 0x77ed, 0x953b, 0x6bb5, 0x65ad, 0x7f0e,
+  0x5806, 0x5151, 0x961f, 0x5bf9, 0x58a9, 0x5428, 0x8e72, 0x6566,
+  0x987f, 0x56e4, 0x949d, 0x76fe, 0x9041, 0x6387, 0x54c6, 0x591a,
+  0x593a, 0x579b, 0x8eb2, 0x6735, 0x8dfa, 0x8235, 0x5241, 0x60f0,
+  0x5815, 0x86fe, 0x5ce8, 0x9e45, 0x4fc4, 0x989d, 0x8bb9, 0x5a25,
+  0x6076, 0x5384, 0x627c, 0x904f, 0x9102, 0x997f, 0x6069, 0x800c,
+  0x513f, 0x8033, 0x5c14, 0x9975, 0x6d31, 0x4e8c,
+  /* 0x37 */
+  0x8d30, 0x53d1, 0x7f5a, 0x7b4f, 0x4f10, 0x4e4f, 0x9600, 0x6cd5,
+  0x73d0, 0x85e9, 0x5e06, 0x756a, 0x7ffb, 0x6a0a, 0x77fe, 0x9492,
+  0x7e41, 0x51e1, 0x70e6, 0x53cd, 0x8fd4, 0x8303, 0x8d29, 0x72af,
+  0x996d, 0x6cdb, 0x574a, 0x82b3, 0x65b9, 0x80aa, 0x623f, 0x9632,
+  0x59a8, 0x4eff, 0x8bbf, 0x7eba, 0x653e, 0x83f2, 0x975e, 0x5561,
+  0x98de, 0x80a5, 0x532a, 0x8bfd, 0x5420, 0x80ba, 0x5e9f, 0x6cb8,
+  0x8d39, 0x82ac, 0x915a, 0x5429, 0x6c1b, 0x5206, 0x7eb7, 0x575f,
+  0x711a, 0x6c7e, 0x7c89, 0x594b, 0x4efd, 0x5fff, 0x6124, 0x7caa,
+  0x4e30, 0x5c01, 0x67ab, 0x8702, 0x5cf0, 0x950b, 0x98ce, 0x75af,
+  0x70fd, 0x9022, 0x51af, 0x7f1d, 0x8bbd, 0x5949, 0x51e4, 0x4f5b,
+  0x5426, 0x592b, 0x6577, 0x80a4, 0x5b75, 0x6276, 0x62c2, 0x8f90,
+  0x5e45, 0x6c1f, 0x7b26, 0x4f0f, 0x4fd8, 0x670d,
+  /* 0x38 */
+  0x6d6e, 0x6daa, 0x798f, 0x88b1, 0x5f17, 0x752b, 0x629a, 0x8f85,
+  0x4fef, 0x91dc, 0x65a7, 0x812f, 0x8151, 0x5e9c, 0x8150, 0x8d74,
+  0x526f, 0x8986, 0x8d4b, 0x590d, 0x5085, 0x4ed8, 0x961c, 0x7236,
+  0x8179, 0x8d1f, 0x5bcc, 0x8ba3, 0x9644, 0x5987, 0x7f1a, 0x5490,
+  0x5676, 0x560e, 0x8be5, 0x6539, 0x6982, 0x9499, 0x76d6, 0x6e89,
+  0x5e72, 0x7518, 0x6746, 0x67d1, 0x7aff, 0x809d, 0x8d76, 0x611f,
+  0x79c6, 0x6562, 0x8d63, 0x5188, 0x521a, 0x94a2, 0x7f38, 0x809b,
+  0x7eb2, 0x5c97, 0x6e2f, 0x6760, 0x7bd9, 0x768b, 0x9ad8, 0x818f,
+  0x7f94, 0x7cd5, 0x641e, 0x9550, 0x7a3f, 0x544a, 0x54e5, 0x6b4c,
+  0x6401, 0x6208, 0x9e3d, 0x80f3, 0x7599, 0x5272, 0x9769, 0x845b,
+  0x683c, 0x86e4, 0x9601, 0x9694, 0x94ec, 0x4e2a, 0x5404, 0x7ed9,
+  0x6839, 0x8ddf, 0x8015, 0x66f4, 0x5e9a, 0x7fb9,
+  /* 0x39 */
+  0x57c2, 0x803f, 0x6897, 0x5de5, 0x653b, 0x529f, 0x606d, 0x9f9a,
+  0x4f9b, 0x8eac, 0x516c, 0x5bab, 0x5f13, 0x5de9, 0x6c5e, 0x62f1,
+  0x8d21, 0x5171, 0x94a9, 0x52fe, 0x6c9f, 0x82df, 0x72d7, 0x57a2,
+  0x6784, 0x8d2d, 0x591f, 0x8f9c, 0x83c7, 0x5495, 0x7b8d, 0x4f30,
+  0x6cbd, 0x5b64, 0x59d1, 0x9f13, 0x53e4, 0x86ca, 0x9aa8, 0x8c37,
+  0x80a1, 0x6545, 0x987e, 0x56fa, 0x96c7, 0x522e, 0x74dc, 0x5250,
+  0x5be1, 0x6302, 0x8902, 0x4e56, 0x62d0, 0x602a, 0x68fa, 0x5173,
+  0x5b98, 0x51a0, 0x89c2, 0x7ba1, 0x9986, 0x7f50, 0x60ef, 0x704c,
+  0x8d2f, 0x5149, 0x5e7f, 0x901b, 0x7470, 0x89c4, 0x572d, 0x7845,
+  0x5f52, 0x9f9f, 0x95fa, 0x8f68, 0x9b3c, 0x8be1, 0x7678, 0x6842,
+  0x67dc, 0x8dea, 0x8d35, 0x523d, 0x8f8a, 0x6eda, 0x68cd, 0x9505,
+  0x90ed, 0x56fd, 0x679c, 0x88f9, 0x8fc7, 0x54c8,
+  /* 0x3a */
+  0x9ab8, 0x5b69, 0x6d77, 0x6c26, 0x4ea5, 0x5bb3, 0x9a87, 0x9163,
+  0x61a8, 0x90af, 0x97e9, 0x542b, 0x6db5, 0x5bd2, 0x51fd, 0x558a,
+  0x7f55, 0x7ff0, 0x64bc, 0x634d, 0x65f1, 0x61be, 0x608d, 0x710a,
+  0x6c57, 0x6c49, 0x592f, 0x676d, 0x822a, 0x58d5, 0x568e, 0x8c6a,
+  0x6beb, 0x90dd, 0x597d, 0x8017, 0x53f7, 0x6d69, 0x5475, 0x559d,
+  0x8377, 0x83cf, 0x6838, 0x79be, 0x548c, 0x4f55, 0x5408, 0x76d2,
+  0x8c89, 0x9602, 0x6cb3, 0x6db8, 0x8d6b, 0x8910, 0x9e64, 0x8d3a,
+  0x563f, 0x9ed1, 0x75d5, 0x5f88, 0x72e0, 0x6068, 0x54fc, 0x4ea8,
+  0x6a2a, 0x8861, 0x6052, 0x8f70, 0x54c4, 0x70d8, 0x8679, 0x9e3f,
+  0x6d2a, 0x5b8f, 0x5f18, 0x7ea2, 0x5589, 0x4faf, 0x7334, 0x543c,
+  0x539a, 0x5019, 0x540e, 0x547c, 0x4e4e, 0x5ffd, 0x745a, 0x58f6,
+  0x846b, 0x80e1, 0x8774, 0x72d0, 0x7cca, 0x6e56,
+  /* 0x3b */
+  0x5f27, 0x864e, 0x552c, 0x62a4, 0x4e92, 0x6caa, 0x6237, 0x82b1,
+  0x54d7, 0x534e, 0x733e, 0x6ed1, 0x753b, 0x5212, 0x5316, 0x8bdd,
+  0x69d0, 0x5f8a, 0x6000, 0x6dee, 0x574f, 0x6b22, 0x73af, 0x6853,
+  0x8fd8, 0x7f13, 0x6362, 0x60a3, 0x5524, 0x75ea, 0x8c62, 0x7115,
+  0x6da3, 0x5ba6, 0x5e7b, 0x8352, 0x614c, 0x9ec4, 0x78fa, 0x8757,
+  0x7c27, 0x7687, 0x51f0, 0x60f6, 0x714c, 0x6643, 0x5e4c, 0x604d,
+  0x8c0e, 0x7070, 0x6325, 0x8f89, 0x5fbd, 0x6062, 0x86d4, 0x56de,
+  0x6bc1, 0x6094, 0x6167, 0x5349, 0x60e0, 0x6666, 0x8d3f, 0x79fd,
+  0x4f1a, 0x70e9, 0x6c47, 0x8bb3, 0x8bf2, 0x7ed8, 0x8364, 0x660f,
+  0x5a5a, 0x9b42, 0x6d51, 0x6df7, 0x8c41, 0x6d3b, 0x4f19, 0x706b,
+  0x83b7, 0x6216, 0x60d1, 0x970d, 0x8d27, 0x7978, 0x51fb, 0x573e,
+  0x57fa, 0x673a, 0x7578, 0x7a3d, 0x79ef, 0x7b95,
+  /* 0x3c */
+  0x808c, 0x9965, 0x8ff9, 0x6fc0, 0x8ba5, 0x9e21, 0x59ec, 0x7ee9,
+  0x7f09, 0x5409, 0x6781, 0x68d8, 0x8f91, 0x7c4d, 0x96c6, 0x53ca,
+  0x6025, 0x75be, 0x6c72, 0x5373, 0x5ac9, 0x7ea7, 0x6324, 0x51e0,
+  0x810a, 0x5df1, 0x84df, 0x6280, 0x5180, 0x5b63, 0x4f0e, 0x796d,
+  0x5242, 0x60b8, 0x6d4e, 0x5bc4, 0x5bc2, 0x8ba1, 0x8bb0, 0x65e2,
+  0x5fcc, 0x9645, 0x5993, 0x7ee7, 0x7eaa, 0x5609, 0x67b7, 0x5939,
+  0x4f73, 0x5bb6, 0x52a0, 0x835a, 0x988a, 0x8d3e, 0x7532, 0x94be,
+  0x5047, 0x7a3c, 0x4ef7, 0x67b6, 0x9a7e, 0x5ac1, 0x6b7c, 0x76d1,
+  0x575a, 0x5c16, 0x7b3a, 0x95f4, 0x714e, 0x517c, 0x80a9, 0x8270,
+  0x5978, 0x7f04, 0x8327, 0x68c0, 0x67ec, 0x78b1, 0x7877, 0x62e3,
+  0x6361, 0x7b80, 0x4fed, 0x526a, 0x51cf, 0x8350, 0x69db, 0x9274,
+  0x8df5, 0x8d31, 0x89c1, 0x952e, 0x7bad, 0x4ef6,
+  /* 0x3d */
+  0x5065, 0x8230, 0x5251, 0x996f, 0x6e10, 0x6e85, 0x6da7, 0x5efa,
+  0x50f5, 0x59dc, 0x5c06, 0x6d46, 0x6c5f, 0x7586, 0x848b, 0x6868,
+  0x5956, 0x8bb2, 0x5320, 0x9171, 0x964d, 0x8549, 0x6912, 0x7901,
+  0x7126, 0x80f6, 0x4ea4, 0x90ca, 0x6d47, 0x9a84, 0x5a07, 0x56bc,
+  0x6405, 0x94f0, 0x77eb, 0x4fa5, 0x811a, 0x72e1, 0x89d2, 0x997a,
+  0x7f34, 0x7ede, 0x527f, 0x6559, 0x9175, 0x8f7f, 0x8f83, 0x53eb,
+  0x7a96, 0x63ed, 0x63a5, 0x7686, 0x79f8, 0x8857, 0x9636, 0x622a,
+  0x52ab, 0x8282, 0x6854, 0x6770, 0x6377, 0x776b, 0x7aed, 0x6d01,
+  0x7ed3, 0x89e3, 0x59d0, 0x6212, 0x85c9, 0x82a5, 0x754c, 0x501f,
+  0x4ecb, 0x75a5, 0x8beb, 0x5c4a, 0x5dfe, 0x7b4b, 0x65a4, 0x91d1,
+  0x4eca, 0x6d25, 0x895f, 0x7d27, 0x9526, 0x4ec5, 0x8c28, 0x8fdb,
+  0x9773, 0x664b, 0x7981, 0x8fd1, 0x70ec, 0x6d78,
+  /* 0x3e */
+  0x5c3d, 0x52b2, 0x8346, 0x5162, 0x830e, 0x775b, 0x6676, 0x9cb8,
+  0x4eac, 0x60ca, 0x7cbe, 0x7cb3, 0x7ecf, 0x4e95, 0x8b66, 0x666f,
+  0x9888, 0x9759, 0x5883, 0x656c, 0x955c, 0x5f84, 0x75c9, 0x9756,
+  0x7adf, 0x7ade, 0x51c0, 0x70af, 0x7a98, 0x63ea, 0x7a76, 0x7ea0,
+  0x7396, 0x97ed, 0x4e45, 0x7078, 0x4e5d, 0x9152, 0x53a9, 0x6551,
+  0x65e7, 0x81fc, 0x8205, 0x548e, 0x5c31, 0x759a, 0x97a0, 0x62d8,
+  0x72d9, 0x75bd, 0x5c45, 0x9a79, 0x83ca, 0x5c40, 0x5480, 0x77e9,
+  0x4e3e, 0x6cae, 0x805a, 0x62d2, 0x636e, 0x5de8, 0x5177, 0x8ddd,
+  0x8e1e, 0x952f, 0x4ff1, 0x53e5, 0x60e7, 0x70ac, 0x5267, 0x6350,
+  0x9e43, 0x5a1f, 0x5026, 0x7737, 0x5377, 0x7ee2, 0x6485, 0x652b,
+  0x6289, 0x6398, 0x5014, 0x7235, 0x89c9, 0x51b3, 0x8bc0, 0x7edd,
+  0x5747, 0x83cc, 0x94a7, 0x519b, 0x541b, 0x5cfb,
+  /* 0x3f */
+  0x4fca, 0x7ae3, 0x6d5a, 0x90e1, 0x9a8f, 0x5580, 0x5496, 0x5361,
+  0x54af, 0x5f00, 0x63e9, 0x6977, 0x51ef, 0x6168, 0x520a, 0x582a,
+  0x52d8, 0x574e, 0x780d, 0x770b, 0x5eb7, 0x6177, 0x7ce0, 0x625b,
+  0x6297, 0x4ea2, 0x7095, 0x8003, 0x62f7, 0x70e4, 0x9760, 0x5777,
+  0x82db, 0x67ef, 0x68f5, 0x78d5, 0x9897, 0x79d1, 0x58f3, 0x54b3,
+  0x53ef, 0x6e34, 0x514b, 0x523b, 0x5ba2, 0x8bfe, 0x80af, 0x5543,
+  0x57a6, 0x6073, 0x5751, 0x542d, 0x7a7a, 0x6050, 0x5b54, 0x63a7,
+  0x62a0, 0x53e3, 0x6263, 0x5bc7, 0x67af, 0x54ed, 0x7a9f, 0x82e6,
+  0x9177, 0x5e93, 0x88e4, 0x5938, 0x57ae, 0x630e, 0x8de8, 0x80ef,
+  0x5757, 0x7b77, 0x4fa9, 0x5feb, 0x5bbd, 0x6b3e, 0x5321, 0x7b50,
+  0x72c2, 0x6846, 0x77ff, 0x7736, 0x65f7, 0x51b5, 0x4e8f, 0x76d4,
+  0x5cbf, 0x7aa5, 0x8475, 0x594e, 0x9b41, 0x5080,
+  /* 0x40 */
+  0x9988, 0x6127, 0x6e83, 0x5764, 0x6606, 0x6346, 0x56f0, 0x62ec,
+  0x6269, 0x5ed3, 0x9614, 0x5783, 0x62c9, 0x5587, 0x8721, 0x814a,
+  0x8fa3, 0x5566, 0x83b1, 0x6765, 0x8d56, 0x84dd, 0x5a6a, 0x680f,
+  0x62e6, 0x7bee, 0x9611, 0x5170, 0x6f9c, 0x8c30, 0x63fd, 0x89c8,
+  0x61d2, 0x7f06, 0x70c2, 0x6ee5, 0x7405, 0x6994, 0x72fc, 0x5eca,
+  0x90ce, 0x6717, 0x6d6a, 0x635e, 0x52b3, 0x7262, 0x8001, 0x4f6c,
+  0x59e5, 0x916a, 0x70d9, 0x6d9d, 0x52d2, 0x4e50, 0x96f7, 0x956d,
+  0x857e, 0x78ca, 0x7d2f, 0x5121, 0x5792, 0x64c2, 0x808b, 0x7c7b,
+  0x6cea, 0x68f1, 0x695e, 0x51b7, 0x5398, 0x68a8, 0x7281, 0x9ece,
+  0x7bf1, 0x72f8, 0x79bb, 0x6f13, 0x7406, 0x674e, 0x91cc, 0x9ca4,
+  0x793c, 0x8389, 0x8354, 0x540f, 0x6817, 0x4e3d, 0x5389, 0x52b1,
+  0x783e, 0x5386, 0x5229, 0x5088, 0x4f8b, 0x4fd0,
+  /* 0x41 */
+  0x75e2, 0x7acb, 0x7c92, 0x6ca5, 0x96b6, 0x529b, 0x7483, 0x54e9,
+  0x4fe9, 0x8054, 0x83b2, 0x8fde, 0x9570, 0x5ec9, 0x601c, 0x6d9f,
+  0x5e18, 0x655b, 0x8138, 0x94fe, 0x604b, 0x70bc, 0x7ec3, 0x7cae,
+  0x51c9, 0x6881, 0x7cb1, 0x826f, 0x4e24, 0x8f86, 0x91cf, 0x667e,
+  0x4eae, 0x8c05, 0x64a9, 0x804a, 0x50da, 0x7597, 0x71ce, 0x5be5,
+  0x8fbd, 0x6f66, 0x4e86, 0x6482, 0x9563, 0x5ed6, 0x6599, 0x5217,
+  0x88c2, 0x70c8, 0x52a3, 0x730e, 0x7433, 0x6797, 0x78f7, 0x9716,
+  0x4e34, 0x90bb, 0x9cde, 0x6dcb, 0x51db, 0x8d41, 0x541d, 0x62ce,
+  0x73b2, 0x83f1, 0x96f6, 0x9f84, 0x94c3, 0x4f36, 0x7f9a, 0x51cc,
+  0x7075, 0x9675, 0x5cad, 0x9886, 0x53e6, 0x4ee4, 0x6e9c, 0x7409,
+  0x69b4, 0x786b, 0x998f, 0x7559, 0x5218, 0x7624, 0x6d41, 0x67f3,
+  0x516d, 0x9f99, 0x804b, 0x5499, 0x7b3c, 0x7abf,
+  /* 0x42 */
+  0x9686, 0x5784, 0x62e2, 0x9647, 0x697c, 0x5a04, 0x6402, 0x7bd3,
+  0x6f0f, 0x964b, 0x82a6, 0x5362, 0x9885, 0x5e90, 0x7089, 0x63b3,
+  0x5364, 0x864f, 0x9c81, 0x9e93, 0x788c, 0x9732, 0x8def, 0x8d42,
+  0x9e7f, 0x6f5e, 0x7984, 0x5f55, 0x9646, 0x622e, 0x9a74, 0x5415,
+  0x94dd, 0x4fa3, 0x65c5, 0x5c65, 0x5c61, 0x7f15, 0x8651, 0x6c2f,
+  0x5f8b, 0x7387, 0x6ee4, 0x7eff, 0x5ce6, 0x631b, 0x5b6a, 0x6ee6,
+  0x5375, 0x4e71, 0x63a0, 0x7565, 0x62a1, 0x8f6e, 0x4f26, 0x4ed1,
+  0x6ca6, 0x7eb6, 0x8bba, 0x841d, 0x87ba, 0x7f57, 0x903b, 0x9523,
+  0x7ba9, 0x9aa1, 0x88f8, 0x843d, 0x6d1b, 0x9a86, 0x7edc, 0x5988,
+  0x9ebb, 0x739b, 0x7801, 0x8682, 0x9a6c, 0x9a82, 0x561b, 0x5417,
+  0x57cb, 0x4e70, 0x9ea6, 0x5356, 0x8fc8, 0x8109, 0x7792, 0x9992,
+  0x86ee, 0x6ee1, 0x8513, 0x66fc, 0x6162, 0x6f2b,
+  /* 0x43 */
+  0x8c29, 0x8292, 0x832b, 0x76f2, 0x6c13, 0x5fd9, 0x83bd, 0x732b,
+  0x8305, 0x951a, 0x6bdb, 0x77db, 0x94c6, 0x536f, 0x8302, 0x5192,
+  0x5e3d, 0x8c8c, 0x8d38, 0x4e48, 0x73ab, 0x679a, 0x6885, 0x9176,
+  0x9709, 0x7164, 0x6ca1, 0x7709, 0x5a92, 0x9541, 0x6bcf, 0x7f8e,
+  0x6627, 0x5bd0, 0x59b9, 0x5a9a, 0x95e8, 0x95f7, 0x4eec, 0x840c,
+  0x8499, 0x6aac, 0x76df, 0x9530, 0x731b, 0x68a6, 0x5b5f, 0x772f,
+  0x919a, 0x9761, 0x7cdc, 0x8ff7, 0x8c1c, 0x5f25, 0x7c73, 0x79d8,
+  0x89c5, 0x6ccc, 0x871c, 0x5bc6, 0x5e42, 0x68c9, 0x7720, 0x7ef5,
+  0x5195, 0x514d, 0x52c9, 0x5a29, 0x7f05, 0x9762, 0x82d7, 0x63cf,
+  0x7784, 0x85d0, 0x79d2, 0x6e3a, 0x5e99, 0x5999, 0x8511, 0x706d,
+  0x6c11, 0x62bf, 0x76bf, 0x654f, 0x60af, 0x95fd, 0x660e, 0x879f,
+  0x9e23, 0x94ed, 0x540d, 0x547d, 0x8c2c, 0x6478,
+  /* 0x44 */
+  0x6479, 0x8611, 0x6a21, 0x819c, 0x78e8, 0x6469, 0x9b54, 0x62b9,
+  0x672b, 0x83ab, 0x58a8, 0x9ed8, 0x6cab, 0x6f20, 0x5bde, 0x964c,
+  0x8c0b, 0x725f, 0x67d0, 0x62c7, 0x7261, 0x4ea9, 0x59c6, 0x6bcd,
+  0x5893, 0x66ae, 0x5e55, 0x52df, 0x6155, 0x6728, 0x76ee, 0x7766,
+  0x7267, 0x7a46, 0x62ff, 0x54ea, 0x5450, 0x94a0, 0x90a3, 0x5a1c,
+  0x7eb3, 0x6c16, 0x4e43, 0x5976, 0x8010, 0x5948, 0x5357, 0x7537,
+  0x96be, 0x56ca, 0x6320, 0x8111, 0x607c, 0x95f9, 0x6dd6, 0x5462,
+  0x9981, 0x5185, 0x5ae9, 0x80fd, 0x59ae, 0x9713, 0x502a, 0x6ce5,
+  0x5c3c, 0x62df, 0x4f60, 0x533f, 0x817b, 0x9006, 0x6eba, 0x852b,
+  0x62c8, 0x5e74, 0x78be, 0x64b5, 0x637b, 0x5ff5, 0x5a18, 0x917f,
+  0x9e1f, 0x5c3f, 0x634f, 0x8042, 0x5b7d, 0x556e, 0x954a, 0x954d,
+  0x6d85, 0x60a8, 0x67e0, 0x72de, 0x51dd, 0x5b81,
+  /* 0x45 */
+  0x62e7, 0x6cde, 0x725b, 0x626d, 0x94ae, 0x7ebd, 0x8113, 0x6d53,
+  0x519c, 0x5f04, 0x5974, 0x52aa, 0x6012, 0x5973, 0x6696, 0x8650,
+  0x759f, 0x632a, 0x61e6, 0x7cef, 0x8bfa, 0x54e6, 0x6b27, 0x9e25,
+  0x6bb4, 0x85d5, 0x5455, 0x5076, 0x6ca4, 0x556a, 0x8db4, 0x722c,
+  0x5e15, 0x6015, 0x7436, 0x62cd, 0x6392, 0x724c, 0x5f98, 0x6e43,
+  0x6d3e, 0x6500, 0x6f58, 0x76d8, 0x78d0, 0x76fc, 0x7554, 0x5224,
+  0x53db, 0x4e53, 0x5e9e, 0x65c1, 0x802a, 0x80d6, 0x629b, 0x5486,
+  0x5228, 0x70ae, 0x888d, 0x8dd1, 0x6ce1, 0x5478, 0x80da, 0x57f9,
+  0x88f4, 0x8d54, 0x966a, 0x914d, 0x4f69, 0x6c9b, 0x55b7, 0x76c6,
+  0x7830, 0x62a8, 0x70f9, 0x6f8e, 0x5f6d, 0x84ec, 0x68da, 0x787c,
+  0x7bf7, 0x81a8, 0x670b, 0x9e4f, 0x6367, 0x78b0, 0x576f, 0x7812,
+  0x9739, 0x6279, 0x62ab, 0x5288, 0x7435, 0x6bd7,
+  /* 0x46 */
+  0x5564, 0x813e, 0x75b2, 0x76ae, 0x5339, 0x75de, 0x50fb, 0x5c41,
+  0x8b6c, 0x7bc7, 0x504f, 0x7247, 0x9a97, 0x98d8, 0x6f02, 0x74e2,
+  0x7968, 0x6487, 0x77a5, 0x62fc, 0x9891, 0x8d2b, 0x54c1, 0x8058,
+  0x4e52, 0x576a, 0x82f9, 0x840d, 0x5e73, 0x51ed, 0x74f6, 0x8bc4,
+  0x5c4f, 0x5761, 0x6cfc, 0x9887, 0x5a46, 0x7834, 0x9b44, 0x8feb,
+  0x7c95, 0x5256, 0x6251, 0x94fa, 0x4ec6, 0x8386, 0x8461, 0x83e9,
+  0x84b2, 0x57d4, 0x6734, 0x5703, 0x666e, 0x6d66, 0x8c31, 0x66dd,
+  0x7011, 0x671f, 0x6b3a, 0x6816, 0x621a, 0x59bb, 0x4e03, 0x51c4,
+  0x6f06, 0x67d2, 0x6c8f, 0x5176, 0x68cb, 0x5947, 0x6b67, 0x7566,
+  0x5d0e, 0x8110, 0x9f50, 0x65d7, 0x7948, 0x7941, 0x9a91, 0x8d77,
+  0x5c82, 0x4e5e, 0x4f01, 0x542f, 0x5951, 0x780c, 0x5668, 0x6c14,
+  0x8fc4, 0x5f03, 0x6c7d, 0x6ce3, 0x8bab, 0x6390,
+  /* 0x47 */
+  0x6070, 0x6d3d, 0x7275, 0x6266, 0x948e, 0x94c5, 0x5343, 0x8fc1,
+  0x7b7e, 0x4edf, 0x8c26, 0x4e7e, 0x9ed4, 0x94b1, 0x94b3, 0x524d,
+  0x6f5c, 0x9063, 0x6d45, 0x8c34, 0x5811, 0x5d4c, 0x6b20, 0x6b49,
+  0x67aa, 0x545b, 0x8154, 0x7f8c, 0x5899, 0x8537, 0x5f3a, 0x62a2,
+  0x6a47, 0x9539, 0x6572, 0x6084, 0x6865, 0x77a7, 0x4e54, 0x4fa8,
+  0x5de7, 0x9798, 0x64ac, 0x7fd8, 0x5ced, 0x4fcf, 0x7a8d, 0x5207,
+  0x8304, 0x4e14, 0x602f, 0x7a83, 0x94a6, 0x4fb5, 0x4eb2, 0x79e6,
+  0x7434, 0x52e4, 0x82b9, 0x64d2, 0x79bd, 0x5bdd, 0x6c81, 0x9752,
+  0x8f7b, 0x6c22, 0x503e, 0x537f, 0x6e05, 0x64ce, 0x6674, 0x6c30,
+  0x60c5, 0x9877, 0x8bf7, 0x5e86, 0x743c, 0x7a77, 0x79cb, 0x4e18,
+  0x90b1, 0x7403, 0x6c42, 0x56da, 0x914b, 0x6cc5, 0x8d8b, 0x533a,
+  0x86c6, 0x66f2, 0x8eaf, 0x5c48, 0x9a71, 0x6e20,
+  /* 0x48 */
+  0x53d6, 0x5a36, 0x9f8b, 0x8da3, 0x53bb, 0x5708, 0x98a7, 0x6743,
+  0x919b, 0x6cc9, 0x5168, 0x75ca, 0x62f3, 0x72ac, 0x5238, 0x529d,
+  0x7f3a, 0x7094, 0x7638, 0x5374, 0x9e4a, 0x69b7, 0x786e, 0x96c0,
+  0x88d9, 0x7fa4, 0x7136, 0x71c3, 0x5189, 0x67d3, 0x74e4, 0x58e4,
+  0x6518, 0x56b7, 0x8ba9, 0x9976, 0x6270, 0x7ed5, 0x60f9, 0x70ed,
+  0x58ec, 0x4ec1, 0x4eba, 0x5fcd, 0x97e7, 0x4efb, 0x8ba4, 0x5203,
+  0x598a, 0x7eab, 0x6254, 0x4ecd, 0x65e5, 0x620e, 0x8338, 0x84c9,
+  0x8363, 0x878d, 0x7194, 0x6eb6, 0x5bb9, 0x7ed2, 0x5197, 0x63c9,
+  0x67d4, 0x8089, 0x8339, 0x8815, 0x5112, 0x5b7a, 0x5982, 0x8fb1,
+  0x4e73, 0x6c5d, 0x5165, 0x8925, 0x8f6f, 0x962e, 0x854a, 0x745e,
+  0x9510, 0x95f0, 0x6da6, 0x82e5, 0x5f31, 0x6492, 0x6d12, 0x8428,
+  0x816e, 0x9cc3, 0x585e, 0x8d5b, 0x4e09, 0x53c1,
+  /* 0x49 */
+  0x4f1e, 0x6563, 0x6851, 0x55d3, 0x4e27, 0x6414, 0x9a9a, 0x626b,
+  0x5ac2, 0x745f, 0x8272, 0x6da9, 0x68ee, 0x50e7, 0x838e, 0x7802,
+  0x6740, 0x5239, 0x6c99, 0x7eb1, 0x50bb, 0x5565, 0x715e, 0x7b5b,
+  0x6652, 0x73ca, 0x82eb, 0x6749, 0x5c71, 0x5220, 0x717d, 0x886b,
+  0x95ea, 0x9655, 0x64c5, 0x8d61, 0x81b3, 0x5584, 0x6c55, 0x6247,
+  0x7f2e, 0x5892, 0x4f24, 0x5546, 0x8d4f, 0x664c, 0x4e0a, 0x5c1a,
+  0x88f3, 0x68a2, 0x634e, 0x7a0d, 0x70e7, 0x828d, 0x52fa, 0x97f6,
+  0x5c11, 0x54e8, 0x90b5, 0x7ecd, 0x5962, 0x8d4a, 0x86c7, 0x820c,
+  0x820d, 0x8d66, 0x6444, 0x5c04, 0x6151, 0x6d89, 0x793e, 0x8bbe,
+  0x7837, 0x7533, 0x547b, 0x4f38, 0x8eab, 0x6df1, 0x5a20, 0x7ec5,
+  0x795e, 0x6c88, 0x5ba1, 0x5a76, 0x751a, 0x80be, 0x614e, 0x6e17,
+  0x58f0, 0x751f, 0x7525, 0x7272, 0x5347, 0x7ef3,
+  /* 0x4a */
+  0x7701, 0x76db, 0x5269, 0x80dc, 0x5723, 0x5e08, 0x5931, 0x72ee,
+  0x65bd, 0x6e7f, 0x8bd7, 0x5c38, 0x8671, 0x5341, 0x77f3, 0x62fe,
+  0x65f6, 0x4ec0, 0x98df, 0x8680, 0x5b9e, 0x8bc6, 0x53f2, 0x77e2,
+  0x4f7f, 0x5c4e, 0x9a76, 0x59cb, 0x5f0f, 0x793a, 0x58eb, 0x4e16,
+  0x67ff, 0x4e8b, 0x62ed, 0x8a93, 0x901d, 0x52bf, 0x662f, 0x55dc,
+  0x566c, 0x9002, 0x4ed5, 0x4f8d, 0x91ca, 0x9970, 0x6c0f, 0x5e02,
+  0x6043, 0x5ba4, 0x89c6, 0x8bd5, 0x6536, 0x624b, 0x9996, 0x5b88,
+  0x5bff, 0x6388, 0x552e, 0x53d7, 0x7626, 0x517d, 0x852c, 0x67a2,
+  0x68b3, 0x6b8a, 0x6292, 0x8f93, 0x53d4, 0x8212, 0x6dd1, 0x758f,
+  0x4e66, 0x8d4e, 0x5b70, 0x719f, 0x85af, 0x6691, 0x66d9, 0x7f72,
+  0x8700, 0x9ecd, 0x9f20, 0x5c5e, 0x672f, 0x8ff0, 0x6811, 0x675f,
+  0x620d, 0x7ad6, 0x5885, 0x5eb6, 0x6570, 0x6f31,
+  /* 0x4b */
+  0x6055, 0x5237, 0x800d, 0x6454, 0x8870, 0x7529, 0x5e05, 0x6813,
+  0x62f4, 0x971c, 0x53cc, 0x723d, 0x8c01, 0x6c34, 0x7761, 0x7a0e,
+  0x542e, 0x77ac, 0x987a, 0x821c, 0x8bf4, 0x7855, 0x6714, 0x70c1,
+  0x65af, 0x6495, 0x5636, 0x601d, 0x79c1, 0x53f8, 0x4e1d, 0x6b7b,
+  0x8086, 0x5bfa, 0x55e3, 0x56db, 0x4f3a, 0x4f3c, 0x9972, 0x5df3,
+  0x677e, 0x8038, 0x6002, 0x9882, 0x9001, 0x5b8b, 0x8bbc, 0x8bf5,
+  0x641c, 0x8258, 0x64de, 0x55fd, 0x82cf, 0x9165, 0x4fd7, 0x7d20,
+  0x901f, 0x7c9f, 0x50f3, 0x5851, 0x6eaf, 0x5bbf, 0x8bc9, 0x8083,
+  0x9178, 0x849c, 0x7b97, 0x867d, 0x968b, 0x968f, 0x7ee5, 0x9ad3,
+  0x788e, 0x5c81, 0x7a57, 0x9042, 0x96a7, 0x795f, 0x5b59, 0x635f,
+  0x7b0b, 0x84d1, 0x68ad, 0x5506, 0x7f29, 0x7410, 0x7d22, 0x9501,
+  0x6240, 0x584c, 0x4ed6, 0x5b83, 0x5979, 0x5854,
+  /* 0x4c */
+  0x736d, 0x631e, 0x8e4b, 0x8e0f, 0x80ce, 0x82d4, 0x62ac, 0x53f0,
+  0x6cf0, 0x915e, 0x592a, 0x6001, 0x6c70, 0x574d, 0x644a, 0x8d2a,
+  0x762b, 0x6ee9, 0x575b, 0x6a80, 0x75f0, 0x6f6d, 0x8c2d, 0x8c08,
+  0x5766, 0x6bef, 0x8892, 0x78b3, 0x63a2, 0x53f9, 0x70ad, 0x6c64,
+  0x5858, 0x642a, 0x5802, 0x68e0, 0x819b, 0x5510, 0x7cd6, 0x5018,
+  0x8eba, 0x6dcc, 0x8d9f, 0x70eb, 0x638f, 0x6d9b, 0x6ed4, 0x7ee6,
+  0x8404, 0x6843, 0x9003, 0x6dd8, 0x9676, 0x8ba8, 0x5957, 0x7279,
+  0x85e4, 0x817e, 0x75bc, 0x8a8a, 0x68af, 0x5254, 0x8e22, 0x9511,
+  0x63d0, 0x9898, 0x8e44, 0x557c, 0x4f53, 0x66ff, 0x568f, 0x60d5,
+  0x6d95, 0x5243, 0x5c49, 0x5929, 0x6dfb, 0x586b, 0x7530, 0x751c,
+  0x606c, 0x8214, 0x8146, 0x6311, 0x6761, 0x8fe2, 0x773a, 0x8df3,
+  0x8d34, 0x94c1, 0x5e16, 0x5385, 0x542c, 0x70c3,
+  /* 0x4d */
+  0x6c40, 0x5ef7, 0x505c, 0x4ead, 0x5ead, 0x633a, 0x8247, 0x901a,
+  0x6850, 0x916e, 0x77b3, 0x540c, 0x94dc, 0x5f64, 0x7ae5, 0x6876,
+  0x6345, 0x7b52, 0x7edf, 0x75db, 0x5077, 0x6295, 0x5934, 0x900f,
+  0x51f8, 0x79c3, 0x7a81, 0x56fe, 0x5f92, 0x9014, 0x6d82, 0x5c60,
+  0x571f, 0x5410, 0x5154, 0x6e4d, 0x56e2, 0x63a8, 0x9893, 0x817f,
+  0x8715, 0x892a, 0x9000, 0x541e, 0x5c6f, 0x81c0, 0x62d6, 0x6258,
+  0x8131, 0x9e35, 0x9640, 0x9a6e, 0x9a7c, 0x692d, 0x59a5, 0x62d3,
+  0x553e, 0x6316, 0x54c7, 0x86d9, 0x6d3c, 0x5a03, 0x74e6, 0x889c,
+  0x6b6a, 0x5916, 0x8c4c, 0x5f2f, 0x6e7e, 0x73a9, 0x987d, 0x4e38,
+  0x70f7, 0x5b8c, 0x7897, 0x633d, 0x665a, 0x7696, 0x60cb, 0x5b9b,
+  0x5a49, 0x4e07, 0x8155, 0x6c6a, 0x738b, 0x4ea1, 0x6789, 0x7f51,
+  0x5f80, 0x65fa, 0x671b, 0x5fd8, 0x5984, 0x5a01,
+  /* 0x4e */
+  0x5dcd, 0x5fae, 0x5371, 0x97e6, 0x8fdd, 0x6845, 0x56f4, 0x552f,
+  0x60df, 0x4e3a, 0x6f4d, 0x7ef4, 0x82c7, 0x840e, 0x59d4, 0x4f1f,
+  0x4f2a, 0x5c3e, 0x7eac, 0x672a, 0x851a, 0x5473, 0x754f, 0x80c3,
+  0x5582, 0x9b4f, 0x4f4d, 0x6e2d, 0x8c13, 0x5c09, 0x6170, 0x536b,
+  0x761f, 0x6e29, 0x868a, 0x6587, 0x95fb, 0x7eb9, 0x543b, 0x7a33,
+  0x7d0a, 0x95ee, 0x55e1, 0x7fc1, 0x74ee, 0x631d, 0x8717, 0x6da1,
+  0x7a9d, 0x6211, 0x65a1, 0x5367, 0x63e1, 0x6c83, 0x5deb, 0x545c,
+  0x94a8, 0x4e4c, 0x6c61, 0x8bec, 0x5c4b, 0x65e0, 0x829c, 0x68a7,
+  0x543e, 0x5434, 0x6bcb, 0x6b66, 0x4e94, 0x6342, 0x5348, 0x821e,
+  0x4f0d, 0x4fae, 0x575e, 0x620a, 0x96fe, 0x6664, 0x7269, 0x52ff,
+  0x52a1, 0x609f, 0x8bef, 0x6614, 0x7199, 0x6790, 0x897f, 0x7852,
+  0x77fd, 0x6670, 0x563b, 0x5438, 0x9521, 0x727a,
+  /* 0x4f */
+  0x7a00, 0x606f, 0x5e0c, 0x6089, 0x819d, 0x5915, 0x60dc, 0x7184,
+  0x70ef, 0x6eaa, 0x6c50, 0x7280, 0x6a84, 0x88ad, 0x5e2d, 0x4e60,
+  0x5ab3, 0x559c, 0x94e3, 0x6d17, 0x7cfb, 0x9699, 0x620f, 0x7ec6,
+  0x778e, 0x867e, 0x5323, 0x971e, 0x8f96, 0x6687, 0x5ce1, 0x4fa0,
+  0x72ed, 0x4e0b, 0x53a6, 0x590f, 0x5413, 0x6380, 0x9528, 0x5148,
+  0x4ed9, 0x9c9c, 0x7ea4, 0x54b8, 0x8d24, 0x8854, 0x8237, 0x95f2,
+  0x6d8e, 0x5f26, 0x5acc, 0x663e, 0x9669, 0x73b0, 0x732e, 0x53bf,
+  0x817a, 0x9985, 0x7fa1, 0x5baa, 0x9677, 0x9650, 0x7ebf, 0x76f8,
+  0x53a2, 0x9576, 0x9999, 0x7bb1, 0x8944, 0x6e58, 0x4e61, 0x7fd4,
+  0x7965, 0x8be6, 0x60f3, 0x54cd, 0x4eab, 0x9879, 0x5df7, 0x6a61,
+  0x50cf, 0x5411, 0x8c61, 0x8427, 0x785d, 0x9704, 0x524a, 0x54ee,
+  0x56a3, 0x9500, 0x6d88, 0x5bb5, 0x6dc6, 0x6653,
+  /* 0x50 */
+  0x5c0f, 0x5b5d, 0x6821, 0x8096, 0x5578, 0x7b11, 0x6548, 0x6954,
+  0x4e9b, 0x6b47, 0x874e, 0x978b, 0x534f, 0x631f, 0x643a, 0x90aa,
+  0x659c, 0x80c1, 0x8c10, 0x5199, 0x68b0, 0x5378, 0x87f9, 0x61c8,
+  0x6cc4, 0x6cfb, 0x8c22, 0x5c51, 0x85aa, 0x82af, 0x950c, 0x6b23,
+  0x8f9b, 0x65b0, 0x5ffb, 0x5fc3, 0x4fe1, 0x8845, 0x661f, 0x8165,
+  0x7329, 0x60fa, 0x5174, 0x5211, 0x578b, 0x5f62, 0x90a2, 0x884c,
+  0x9192, 0x5e78, 0x674f, 0x6027, 0x59d3, 0x5144, 0x51f6, 0x80f8,
+  0x5308, 0x6c79, 0x96c4, 0x718a, 0x4f11, 0x4fee, 0x7f9e, 0x673d,
+  0x55c5, 0x9508, 0x79c0, 0x8896, 0x7ee3, 0x589f, 0x620c, 0x9700,
+  0x865a, 0x5618, 0x987b, 0x5f90, 0x8bb8, 0x84c4, 0x9157, 0x53d9,
+  0x65ed, 0x5e8f, 0x755c, 0x6064, 0x7d6e, 0x5a7f, 0x7eea, 0x7eed,
+  0x8f69, 0x55a7, 0x5ba3, 0x60ac, 0x65cb, 0x7384,
+  /* 0x51 */
+  0x9009, 0x7663, 0x7729, 0x7eda, 0x9774, 0x859b, 0x5b66, 0x7a74,
+  0x96ea, 0x8840, 0x52cb, 0x718f, 0x5faa, 0x65ec, 0x8be2, 0x5bfb,
+  0x9a6f, 0x5de1, 0x6b89, 0x6c5b, 0x8bad, 0x8baf, 0x900a, 0x8fc5,
+  0x538b, 0x62bc, 0x9e26, 0x9e2d, 0x5440, 0x4e2b, 0x82bd, 0x7259,
+  0x869c, 0x5d16, 0x8859, 0x6daf, 0x96c5, 0x54d1, 0x4e9a, 0x8bb6,
+  0x7109, 0x54bd, 0x9609, 0x70df, 0x6df9, 0x76d0, 0x4e25, 0x7814,
+  0x8712, 0x5ca9, 0x5ef6, 0x8a00, 0x989c, 0x960e, 0x708e, 0x6cbf,
+  0x5944, 0x63a9, 0x773c, 0x884d, 0x6f14, 0x8273, 0x5830, 0x71d5,
+  0x538c, 0x781a, 0x96c1, 0x5501, 0x5f66, 0x7130, 0x5bb4, 0x8c1a,
+  0x9a8c, 0x6b83, 0x592e, 0x9e2f, 0x79e7, 0x6768, 0x626c, 0x4f6f,
+  0x75a1, 0x7f8a, 0x6d0b, 0x9633, 0x6c27, 0x4ef0, 0x75d2, 0x517b,
+  0x6837, 0x6f3e, 0x9080, 0x8170, 0x5996, 0x7476,
+  /* 0x52 */
+  0x6447, 0x5c27, 0x9065, 0x7a91, 0x8c23, 0x59da, 0x54ac, 0x8200,
+  0x836f, 0x8981, 0x8000, 0x6930, 0x564e, 0x8036, 0x7237, 0x91ce,
+  0x51b6, 0x4e5f, 0x9875, 0x6396, 0x4e1a, 0x53f6, 0x66f3, 0x814b,
+  0x591c, 0x6db2, 0x4e00, 0x58f9, 0x533b, 0x63d6, 0x94f1, 0x4f9d,
+  0x4f0a, 0x8863, 0x9890, 0x5937, 0x9057, 0x79fb, 0x4eea, 0x80f0,
+  0x7591, 0x6c82, 0x5b9c, 0x59e8, 0x5f5d, 0x6905, 0x8681, 0x501a,
+  0x5df2, 0x4e59, 0x77e3, 0x4ee5, 0x827a, 0x6291, 0x6613, 0x9091,
+  0x5c79, 0x4ebf, 0x5f79, 0x81c6, 0x9038, 0x8084, 0x75ab, 0x4ea6,
+  0x88d4, 0x610f, 0x6bc5, 0x5fc6, 0x4e49, 0x76ca, 0x6ea2, 0x8be3,
+  0x8bae, 0x8c0a, 0x8bd1, 0x5f02, 0x7ffc, 0x7fcc, 0x7ece, 0x8335,
+  0x836b, 0x56e0, 0x6bb7, 0x97f3, 0x9634, 0x59fb, 0x541f, 0x94f6,
+  0x6deb, 0x5bc5, 0x996e, 0x5c39, 0x5f15, 0x9690,
+  /* 0x53 */
+  0x5370, 0x82f1, 0x6a31, 0x5a74, 0x9e70, 0x5e94, 0x7f28, 0x83b9,
+  0x8424, 0x8425, 0x8367, 0x8747, 0x8fce, 0x8d62, 0x76c8, 0x5f71,
+  0x9896, 0x786c, 0x6620, 0x54df, 0x62e5, 0x4f63, 0x81c3, 0x75c8,
+  0x5eb8, 0x96cd, 0x8e0a, 0x86f9, 0x548f, 0x6cf3, 0x6d8c, 0x6c38,
+  0x607f, 0x52c7, 0x7528, 0x5e7d, 0x4f18, 0x60a0, 0x5fe7, 0x5c24,
+  0x7531, 0x90ae, 0x94c0, 0x72b9, 0x6cb9, 0x6e38, 0x9149, 0x6709,
+  0x53cb, 0x53f3, 0x4f51, 0x91c9, 0x8bf1, 0x53c8, 0x5e7c, 0x8fc2,
+  0x6de4, 0x4e8e, 0x76c2, 0x6986, 0x865e, 0x611a, 0x8206, 0x4f59,
+  0x4fde, 0x903e, 0x9c7c, 0x6109, 0x6e1d, 0x6e14, 0x9685, 0x4e88,
+  0x5a31, 0x96e8, 0x4e0e, 0x5c7f, 0x79b9, 0x5b87, 0x8bed, 0x7fbd,
+  0x7389, 0x57df, 0x828b, 0x90c1, 0x5401, 0x9047, 0x55bb, 0x5cea,
+  0x5fa1, 0x6108, 0x6b32, 0x72f1, 0x80b2, 0x8a89,
+  /* 0x54 */
+  0x6d74, 0x5bd3, 0x88d5, 0x9884, 0x8c6b, 0x9a6d, 0x9e33, 0x6e0a,
+  0x51a4, 0x5143, 0x57a3, 0x8881, 0x539f, 0x63f4, 0x8f95, 0x56ed,
+  0x5458, 0x5706, 0x733f, 0x6e90, 0x7f18, 0x8fdc, 0x82d1, 0x613f,
+  0x6028, 0x9662, 0x66f0, 0x7ea6, 0x8d8a, 0x8dc3, 0x94a5, 0x5cb3,
+  0x7ca4, 0x6708, 0x60a6, 0x9605, 0x8018, 0x4e91, 0x90e7, 0x5300,
+  0x9668, 0x5141, 0x8fd0, 0x8574, 0x915d, 0x6655, 0x97f5, 0x5b55,
+  0x531d, 0x7838, 0x6742, 0x683d, 0x54c9, 0x707e, 0x5bb0, 0x8f7d,
+  0x518d, 0x5728, 0x54b1, 0x6512, 0x6682, 0x8d5e, 0x8d43, 0x810f,
+  0x846c, 0x906d, 0x7cdf, 0x51ff, 0x85fb, 0x67a3, 0x65e9, 0x6fa1,
+  0x86a4, 0x8e81, 0x566a, 0x9020, 0x7682, 0x7076, 0x71e5, 0x8d23,
+  0x62e9, 0x5219, 0x6cfd, 0x8d3c, 0x600e, 0x589e, 0x618e, 0x66fe,
+  0x8d60, 0x624e, 0x55b3, 0x6e23, 0x672d, 0x8f67,
+  /* 0x55 */
+  0x94e1, 0x95f8, 0x7728, 0x6805, 0x69a8, 0x548b, 0x4e4d, 0x70b8,
+  0x8bc8, 0x6458, 0x658b, 0x5b85, 0x7a84, 0x503a, 0x5be8, 0x77bb,
+  0x6be1, 0x8a79, 0x7c98, 0x6cbe, 0x76cf, 0x65a9, 0x8f97, 0x5d2d,
+  0x5c55, 0x8638, 0x6808, 0x5360, 0x6218, 0x7ad9, 0x6e5b, 0x7efd,
+  0x6a1f, 0x7ae0, 0x5f70, 0x6f33, 0x5f20, 0x638c, 0x6da8, 0x6756,
+  0x4e08, 0x5e10, 0x8d26, 0x4ed7, 0x80c0, 0x7634, 0x969c, 0x62db,
+  0x662d, 0x627e, 0x6cbc, 0x8d75, 0x7167, 0x7f69, 0x5146, 0x8087,
+  0x53ec, 0x906e, 0x6298, 0x54f2, 0x86f0, 0x8f99, 0x8005, 0x9517,
+  0x8517, 0x8fd9, 0x6d59, 0x73cd, 0x659f, 0x771f, 0x7504, 0x7827,
+  0x81fb, 0x8d1e, 0x9488, 0x4fa6, 0x6795, 0x75b9, 0x8bca, 0x9707,
+  0x632f, 0x9547, 0x9635, 0x84b8, 0x6323, 0x7741, 0x5f81, 0x72f0,
+  0x4e89, 0x6014, 0x6574, 0x62ef, 0x6b63, 0x653f,
+  /* 0x56 */
+  0x5e27, 0x75c7, 0x90d1, 0x8bc1, 0x829d, 0x679d, 0x652f, 0x5431,
+  0x8718, 0x77e5, 0x80a2, 0x8102, 0x6c41, 0x4e4b, 0x7ec7, 0x804c,
+  0x76f4, 0x690d, 0x6b96, 0x6267, 0x503c, 0x4f84, 0x5740, 0x6307,
+  0x6b62, 0x8dbe, 0x53ea, 0x65e8, 0x7eb8, 0x5fd7, 0x631a, 0x63b7,
+  0x81f3, 0x81f4, 0x7f6e, 0x5e1c, 0x5cd9, 0x5236, 0x667a, 0x79e9,
+  0x7a1a, 0x8d28, 0x7099, 0x75d4, 0x6ede, 0x6cbb, 0x7a92, 0x4e2d,
+  0x76c5, 0x5fe0, 0x949f, 0x8877, 0x7ec8, 0x79cd, 0x80bf, 0x91cd,
+  0x4ef2, 0x4f17, 0x821f, 0x5468, 0x5dde, 0x6d32, 0x8bcc, 0x7ca5,
+  0x8f74, 0x8098, 0x5e1a, 0x5492, 0x76b1, 0x5b99, 0x663c, 0x9aa4,
+  0x73e0, 0x682a, 0x86db, 0x6731, 0x732a, 0x8bf8, 0x8bdb, 0x9010,
+  0x7af9, 0x70db, 0x716e, 0x62c4, 0x77a9, 0x5631, 0x4e3b, 0x8457,
+  0x67f1, 0x52a9, 0x86c0, 0x8d2e, 0x94f8, 0x7b51,
+  /* 0x57 */
+  0x4f4f, 0x6ce8, 0x795d, 0x9a7b, 0x6293, 0x722a, 0x62fd, 0x4e13,
+  0x7816, 0x8f6c, 0x64b0, 0x8d5a, 0x7bc6, 0x6869, 0x5e84, 0x88c5,
+  0x5986, 0x649e, 0x58ee, 0x72b6, 0x690e, 0x9525, 0x8ffd, 0x8d58,
+  0x5760, 0x7f00, 0x8c06, 0x51c6, 0x6349, 0x62d9, 0x5353, 0x684c,
+  0x7422, 0x8301, 0x914c, 0x5544, 0x7740, 0x707c, 0x6d4a, 0x5179,
+  0x54a8, 0x8d44, 0x59ff, 0x6ecb, 0x6dc4, 0x5b5c, 0x7d2b, 0x4ed4,
+  0x7c7d, 0x6ed3, 0x5b50, 0x81ea, 0x6e0d, 0x5b57, 0x9b03, 0x68d5,
+  0x8e2a, 0x5b97, 0x7efc, 0x603b, 0x7eb5, 0x90b9, 0x8d70, 0x594f,
+  0x63cd, 0x79df, 0x8db3, 0x5352, 0x65cf, 0x7956, 0x8bc5, 0x963b,
+  0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a, 0x5c0a,
+  0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c, 0x5750,
+  0x5ea7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x58 */
+  0x4e8d, 0x4e0c, 0x5140, 0x4e10, 0x5eff, 0x5345, 0x4e15, 0x4e98,
+  0x4e1e, 0x9b32, 0x5b6c, 0x5669, 0x4e28, 0x79ba, 0x4e3f, 0x5315,
+  0x4e47, 0x592d, 0x723b, 0x536e, 0x6c10, 0x56df, 0x80e4, 0x9997,
+  0x6bd3, 0x777e, 0x9f17, 0x4e36, 0x4e9f, 0x9f10, 0x4e5c, 0x4e69,
+  0x4e93, 0x8288, 0x5b5b, 0x556c, 0x560f, 0x4ec4, 0x538d, 0x539d,
+  0x53a3, 0x53a5, 0x53ae, 0x9765, 0x8d5d, 0x531a, 0x53f5, 0x5326,
+  0x532e, 0x533e, 0x8d5c, 0x5366, 0x5363, 0x5202, 0x5208, 0x520e,
+  0x522d, 0x5233, 0x523f, 0x5240, 0x524c, 0x525e, 0x5261, 0x525c,
+  0x84af, 0x527d, 0x5282, 0x5281, 0x5290, 0x5293, 0x5182, 0x7f54,
+  0x4ebb, 0x4ec3, 0x4ec9, 0x4ec2, 0x4ee8, 0x4ee1, 0x4eeb, 0x4ede,
+  0x4f1b, 0x4ef3, 0x4f22, 0x4f64, 0x4ef5, 0x4f25, 0x4f27, 0x4f09,
+  0x4f2b, 0x4f5e, 0x4f67, 0x6538, 0x4f5a, 0x4f5d,
+  /* 0x59 */
+  0x4f5f, 0x4f57, 0x4f32, 0x4f3d, 0x4f76, 0x4f74, 0x4f91, 0x4f89,
+  0x4f83, 0x4f8f, 0x4f7e, 0x4f7b, 0x4faa, 0x4f7c, 0x4fac, 0x4f94,
+  0x4fe6, 0x4fe8, 0x4fea, 0x4fc5, 0x4fda, 0x4fe3, 0x4fdc, 0x4fd1,
+  0x4fdf, 0x4ff8, 0x5029, 0x504c, 0x4ff3, 0x502c, 0x500f, 0x502e,
+  0x502d, 0x4ffe, 0x501c, 0x500c, 0x5025, 0x5028, 0x507e, 0x5043,
+  0x5055, 0x5048, 0x504e, 0x506c, 0x507b, 0x50a5, 0x50a7, 0x50a9,
+  0x50ba, 0x50d6, 0x5106, 0x50ed, 0x50ec, 0x50e6, 0x50ee, 0x5107,
+  0x510b, 0x4edd, 0x6c3d, 0x4f58, 0x4f65, 0x4fce, 0x9fa0, 0x6c46,
+  0x7c74, 0x516e, 0x5dfd, 0x9ec9, 0x9998, 0x5181, 0x5914, 0x52f9,
+  0x530d, 0x8a07, 0x5310, 0x51eb, 0x5919, 0x5155, 0x4ea0, 0x5156,
+  0x4eb3, 0x886e, 0x88a4, 0x4eb5, 0x8114, 0x88d2, 0x7980, 0x5b34,
+  0x8803, 0x7fb8, 0x51ab, 0x51b1, 0x51bd, 0x51bc,
+  /* 0x5a */
+  0x51c7, 0x5196, 0x51a2, 0x51a5, 0x8ba0, 0x8ba6, 0x8ba7, 0x8baa,
+  0x8bb4, 0x8bb5, 0x8bb7, 0x8bc2, 0x8bc3, 0x8bcb, 0x8bcf, 0x8bce,
+  0x8bd2, 0x8bd3, 0x8bd4, 0x8bd6, 0x8bd8, 0x8bd9, 0x8bdc, 0x8bdf,
+  0x8be0, 0x8be4, 0x8be8, 0x8be9, 0x8bee, 0x8bf0, 0x8bf3, 0x8bf6,
+  0x8bf9, 0x8bfc, 0x8bff, 0x8c00, 0x8c02, 0x8c04, 0x8c07, 0x8c0c,
+  0x8c0f, 0x8c11, 0x8c12, 0x8c14, 0x8c15, 0x8c16, 0x8c19, 0x8c1b,
+  0x8c18, 0x8c1d, 0x8c1f, 0x8c20, 0x8c21, 0x8c25, 0x8c27, 0x8c2a,
+  0x8c2b, 0x8c2e, 0x8c2f, 0x8c32, 0x8c33, 0x8c35, 0x8c36, 0x5369,
+  0x537a, 0x961d, 0x9622, 0x9621, 0x9631, 0x962a, 0x963d, 0x963c,
+  0x9642, 0x9649, 0x9654, 0x965f, 0x9667, 0x966c, 0x9672, 0x9674,
+  0x9688, 0x968d, 0x9697, 0x96b0, 0x9097, 0x909b, 0x909d, 0x9099,
+  0x90ac, 0x90a1, 0x90b4, 0x90b3, 0x90b6, 0x90ba,
+  /* 0x5b */
+  0x90b8, 0x90b0, 0x90cf, 0x90c5, 0x90be, 0x90d0, 0x90c4, 0x90c7,
+  0x90d3, 0x90e6, 0x90e2, 0x90dc, 0x90d7, 0x90db, 0x90eb, 0x90ef,
+  0x90fe, 0x9104, 0x9122, 0x911e, 0x9123, 0x9131, 0x912f, 0x9139,
+  0x9143, 0x9146, 0x520d, 0x5942, 0x52a2, 0x52ac, 0x52ad, 0x52be,
+  0x54ff, 0x52d0, 0x52d6, 0x52f0, 0x53df, 0x71ee, 0x77cd, 0x5ef4,
+  0x51f5, 0x51fc, 0x9b2f, 0x53b6, 0x5f01, 0x755a, 0x5def, 0x574c,
+  0x57a9, 0x57a1, 0x587e, 0x58bc, 0x58c5, 0x58d1, 0x5729, 0x572c,
+  0x572a, 0x5733, 0x5739, 0x572e, 0x572f, 0x575c, 0x573b, 0x5742,
+  0x5769, 0x5785, 0x576b, 0x5786, 0x577c, 0x577b, 0x5768, 0x576d,
+  0x5776, 0x5773, 0x57ad, 0x57a4, 0x578c, 0x57b2, 0x57cf, 0x57a7,
+  0x57b4, 0x5793, 0x57a0, 0x57d5, 0x57d8, 0x57da, 0x57d9, 0x57d2,
+  0x57b8, 0x57f4, 0x57ef, 0x57f8, 0x57e4, 0x57dd,
+  /* 0x5c */
+  0x580b, 0x580d, 0x57fd, 0x57ed, 0x5800, 0x581e, 0x5819, 0x5844,
+  0x5820, 0x5865, 0x586c, 0x5881, 0x5889, 0x589a, 0x5880, 0x99a8,
+  0x9f19, 0x61ff, 0x8279, 0x827d, 0x827f, 0x828f, 0x828a, 0x82a8,
+  0x8284, 0x828e, 0x8291, 0x8297, 0x8299, 0x82ab, 0x82b8, 0x82be,
+  0x82b0, 0x82c8, 0x82ca, 0x82e3, 0x8298, 0x82b7, 0x82ae, 0x82cb,
+  0x82cc, 0x82c1, 0x82a9, 0x82b4, 0x82a1, 0x82aa, 0x829f, 0x82c4,
+  0x82ce, 0x82a4, 0x82e1, 0x8309, 0x82f7, 0x82e4, 0x830f, 0x8307,
+  0x82dc, 0x82f4, 0x82d2, 0x82d8, 0x830c, 0x82fb, 0x82d3, 0x8311,
+  0x831a, 0x8306, 0x8314, 0x8315, 0x82e0, 0x82d5, 0x831c, 0x8351,
+  0x835b, 0x835c, 0x8308, 0x8392, 0x833c, 0x8334, 0x8331, 0x839b,
+  0x835e, 0x832f, 0x834f, 0x8347, 0x8343, 0x835f, 0x8340, 0x8317,
+  0x8360, 0x832d, 0x833a, 0x8333, 0x8366, 0x8365,
+  /* 0x5d */
+  0x8368, 0x831b, 0x8369, 0x836c, 0x836a, 0x836d, 0x836e, 0x83b0,
+  0x8378, 0x83b3, 0x83b4, 0x83a0, 0x83aa, 0x8393, 0x839c, 0x8385,
+  0x837c, 0x83b6, 0x83a9, 0x837d, 0x83b8, 0x837b, 0x8398, 0x839e,
+  0x83a8, 0x83ba, 0x83bc, 0x83c1, 0x8401, 0x83e5, 0x83d8, 0x5807,
+  0x8418, 0x840b, 0x83dd, 0x83fd, 0x83d6, 0x841c, 0x8438, 0x8411,
+  0x8406, 0x83d4, 0x83df, 0x840f, 0x8403, 0x83f8, 0x83f9, 0x83ea,
+  0x83c5, 0x83c0, 0x8426, 0x83f0, 0x83e1, 0x845c, 0x8451, 0x845a,
+  0x8459, 0x8473, 0x8487, 0x8488, 0x847a, 0x8489, 0x8478, 0x843c,
+  0x8446, 0x8469, 0x8476, 0x848c, 0x848e, 0x8431, 0x846d, 0x84c1,
+  0x84cd, 0x84d0, 0x84e6, 0x84bd, 0x84d3, 0x84ca, 0x84bf, 0x84ba,
+  0x84e0, 0x84a1, 0x84b9, 0x84b4, 0x8497, 0x84e5, 0x84e3, 0x850c,
+  0x750d, 0x8538, 0x84f0, 0x8539, 0x851f, 0x853a,
+  /* 0x5e */
+  0x8556, 0x853b, 0x84ff, 0x84fc, 0x8559, 0x8548, 0x8568, 0x8564,
+  0x855e, 0x857a, 0x77a2, 0x8543, 0x8572, 0x857b, 0x85a4, 0x85a8,
+  0x8587, 0x858f, 0x8579, 0x85ae, 0x859c, 0x8585, 0x85b9, 0x85b7,
+  0x85b0, 0x85d3, 0x85c1, 0x85dc, 0x85ff, 0x8627, 0x8605, 0x8629,
+  0x8616, 0x863c, 0x5efe, 0x5f08, 0x593c, 0x5941, 0x8037, 0x5955,
+  0x595a, 0x5958, 0x530f, 0x5c22, 0x5c25, 0x5c2c, 0x5c34, 0x624c,
+  0x626a, 0x629f, 0x62bb, 0x62ca, 0x62da, 0x62d7, 0x62ee, 0x6322,
+  0x62f6, 0x6339, 0x634b, 0x6343, 0x63ad, 0x63f6, 0x6371, 0x637a,
+  0x638e, 0x63b4, 0x636d, 0x63ac, 0x638a, 0x6369, 0x63ae, 0x63bc,
+  0x63f2, 0x63f8, 0x63e0, 0x63ff, 0x63c4, 0x63de, 0x63ce, 0x6452,
+  0x63c6, 0x63be, 0x6445, 0x6441, 0x640b, 0x641b, 0x6420, 0x640c,
+  0x6426, 0x6421, 0x645e, 0x6484, 0x646d, 0x6496,
+  /* 0x5f */
+  0x647a, 0x64b7, 0x64b8, 0x6499, 0x64ba, 0x64c0, 0x64d0, 0x64d7,
+  0x64e4, 0x64e2, 0x6509, 0x6525, 0x652e, 0x5f0b, 0x5fd2, 0x7519,
+  0x5f11, 0x535f, 0x53f1, 0x53fd, 0x53e9, 0x53e8, 0x53fb, 0x5412,
+  0x5416, 0x5406, 0x544b, 0x5452, 0x5453, 0x5454, 0x5456, 0x5443,
+  0x5421, 0x5457, 0x5459, 0x5423, 0x5432, 0x5482, 0x5494, 0x5477,
+  0x5471, 0x5464, 0x549a, 0x549b, 0x5484, 0x5476, 0x5466, 0x549d,
+  0x54d0, 0x54ad, 0x54c2, 0x54b4, 0x54d2, 0x54a7, 0x54a6, 0x54d3,
+  0x54d4, 0x5472, 0x54a3, 0x54d5, 0x54bb, 0x54bf, 0x54cc, 0x54d9,
+  0x54da, 0x54dc, 0x54a9, 0x54aa, 0x54a4, 0x54dd, 0x54cf, 0x54de,
+  0x551b, 0x54e7, 0x5520, 0x54fd, 0x5514, 0x54f3, 0x5522, 0x5523,
+  0x550f, 0x5511, 0x5527, 0x552a, 0x5567, 0x558f, 0x55b5, 0x5549,
+  0x556d, 0x5541, 0x5555, 0x553f, 0x5550, 0x553c,
+  /* 0x60 */
+  0x5537, 0x5556, 0x5575, 0x5576, 0x5577, 0x5533, 0x5530, 0x555c,
+  0x558b, 0x55d2, 0x5583, 0x55b1, 0x55b9, 0x5588, 0x5581, 0x559f,
+  0x557e, 0x55d6, 0x5591, 0x557b, 0x55df, 0x55bd, 0x55be, 0x5594,
+  0x5599, 0x55ea, 0x55f7, 0x55c9, 0x561f, 0x55d1, 0x55eb, 0x55ec,
+  0x55d4, 0x55e6, 0x55dd, 0x55c4, 0x55ef, 0x55e5, 0x55f2, 0x55f3,
+  0x55cc, 0x55cd, 0x55e8, 0x55f5, 0x55e4, 0x8f94, 0x561e, 0x5608,
+  0x560c, 0x5601, 0x5624, 0x5623, 0x55fe, 0x5600, 0x5627, 0x562d,
+  0x5658, 0x5639, 0x5657, 0x562c, 0x564d, 0x5662, 0x5659, 0x565c,
+  0x564c, 0x5654, 0x5686, 0x5664, 0x5671, 0x566b, 0x567b, 0x567c,
+  0x5685, 0x5693, 0x56af, 0x56d4, 0x56d7, 0x56dd, 0x56e1, 0x56f5,
+  0x56eb, 0x56f9, 0x56ff, 0x5704, 0x570a, 0x5709, 0x571c, 0x5e0f,
+  0x5e19, 0x5e14, 0x5e11, 0x5e31, 0x5e3b, 0x5e3c,
+  /* 0x61 */
+  0x5e37, 0x5e44, 0x5e54, 0x5e5b, 0x5e5e, 0x5e61, 0x5c8c, 0x5c7a,
+  0x5c8d, 0x5c90, 0x5c96, 0x5c88, 0x5c98, 0x5c99, 0x5c91, 0x5c9a,
+  0x5c9c, 0x5cb5, 0x5ca2, 0x5cbd, 0x5cac, 0x5cab, 0x5cb1, 0x5ca3,
+  0x5cc1, 0x5cb7, 0x5cc4, 0x5cd2, 0x5ce4, 0x5ccb, 0x5ce5, 0x5d02,
+  0x5d03, 0x5d27, 0x5d26, 0x5d2e, 0x5d24, 0x5d1e, 0x5d06, 0x5d1b,
+  0x5d58, 0x5d3e, 0x5d34, 0x5d3d, 0x5d6c, 0x5d5b, 0x5d6f, 0x5d5d,
+  0x5d6b, 0x5d4b, 0x5d4a, 0x5d69, 0x5d74, 0x5d82, 0x5d99, 0x5d9d,
+  0x8c73, 0x5db7, 0x5dc5, 0x5f73, 0x5f77, 0x5f82, 0x5f87, 0x5f89,
+  0x5f8c, 0x5f95, 0x5f99, 0x5f9c, 0x5fa8, 0x5fad, 0x5fb5, 0x5fbc,
+  0x8862, 0x5f61, 0x72ad, 0x72b0, 0x72b4, 0x72b7, 0x72b8, 0x72c3,
+  0x72c1, 0x72ce, 0x72cd, 0x72d2, 0x72e8, 0x72ef, 0x72e9, 0x72f2,
+  0x72f4, 0x72f7, 0x7301, 0x72f3, 0x7303, 0x72fa,
+  /* 0x62 */
+  0x72fb, 0x7317, 0x7313, 0x7321, 0x730a, 0x731e, 0x731d, 0x7315,
+  0x7322, 0x7339, 0x7325, 0x732c, 0x7338, 0x7331, 0x7350, 0x734d,
+  0x7357, 0x7360, 0x736c, 0x736f, 0x737e, 0x821b, 0x5925, 0x98e7,
+  0x5924, 0x5902, 0x9963, 0x9967, 0x9968, 0x9969, 0x996a, 0x996b,
+  0x996c, 0x9974, 0x9977, 0x997d, 0x9980, 0x9984, 0x9987, 0x998a,
+  0x998d, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, 0x5e80, 0x5e91,
+  0x5e8b, 0x5e96, 0x5ea5, 0x5ea0, 0x5eb9, 0x5eb5, 0x5ebe, 0x5eb3,
+  0x8d53, 0x5ed2, 0x5ed1, 0x5edb, 0x5ee8, 0x5eea, 0x81ba, 0x5fc4,
+  0x5fc9, 0x5fd6, 0x5fcf, 0x6003, 0x5fee, 0x6004, 0x5fe1, 0x5fe4,
+  0x5ffe, 0x6005, 0x6006, 0x5fea, 0x5fed, 0x5ff8, 0x6019, 0x6035,
+  0x6026, 0x601b, 0x600f, 0x600d, 0x6029, 0x602b, 0x600a, 0x603f,
+  0x6021, 0x6078, 0x6079, 0x607b, 0x607a, 0x6042,
+  /* 0x63 */
+  0x606a, 0x607d, 0x6096, 0x609a, 0x60ad, 0x609d, 0x6083, 0x6092,
+  0x608c, 0x609b, 0x60ec, 0x60bb, 0x60b1, 0x60dd, 0x60d8, 0x60c6,
+  0x60da, 0x60b4, 0x6120, 0x6126, 0x6115, 0x6123, 0x60f4, 0x6100,
+  0x610e, 0x612b, 0x614a, 0x6175, 0x61ac, 0x6194, 0x61a7, 0x61b7,
+  0x61d4, 0x61f5, 0x5fdd, 0x96b3, 0x95e9, 0x95eb, 0x95f1, 0x95f3,
+  0x95f5, 0x95f6, 0x95fc, 0x95fe, 0x9603, 0x9604, 0x9606, 0x9608,
+  0x960a, 0x960b, 0x960c, 0x960d, 0x960f, 0x9612, 0x9615, 0x9616,
+  0x9617, 0x9619, 0x961a, 0x4e2c, 0x723f, 0x6215, 0x6c35, 0x6c54,
+  0x6c5c, 0x6c4a, 0x6ca3, 0x6c85, 0x6c90, 0x6c94, 0x6c8c, 0x6c68,
+  0x6c69, 0x6c74, 0x6c76, 0x6c86, 0x6ca9, 0x6cd0, 0x6cd4, 0x6cad,
+  0x6cf7, 0x6cf8, 0x6cf1, 0x6cd7, 0x6cb2, 0x6ce0, 0x6cd6, 0x6cfa,
+  0x6ceb, 0x6cee, 0x6cb1, 0x6cd3, 0x6cef, 0x6cfe,
+  /* 0x64 */
+  0x6d39, 0x6d27, 0x6d0c, 0x6d43, 0x6d48, 0x6d07, 0x6d04, 0x6d19,
+  0x6d0e, 0x6d2b, 0x6d4d, 0x6d2e, 0x6d35, 0x6d1a, 0x6d4f, 0x6d52,
+  0x6d54, 0x6d33, 0x6d91, 0x6d6f, 0x6d9e, 0x6da0, 0x6d5e, 0x6d93,
+  0x6d94, 0x6d5c, 0x6d60, 0x6d7c, 0x6d63, 0x6e1a, 0x6dc7, 0x6dc5,
+  0x6dde, 0x6e0e, 0x6dbf, 0x6de0, 0x6e11, 0x6de6, 0x6ddd, 0x6dd9,
+  0x6e16, 0x6dab, 0x6e0c, 0x6dae, 0x6e2b, 0x6e6e, 0x6e4e, 0x6e6b,
+  0x6eb2, 0x6e5f, 0x6e86, 0x6e53, 0x6e54, 0x6e32, 0x6e25, 0x6e44,
+  0x6edf, 0x6eb1, 0x6e98, 0x6ee0, 0x6f2d, 0x6ee2, 0x6ea5, 0x6ea7,
+  0x6ebd, 0x6ebb, 0x6eb7, 0x6ed7, 0x6eb4, 0x6ecf, 0x6e8f, 0x6ec2,
+  0x6e9f, 0x6f62, 0x6f46, 0x6f47, 0x6f24, 0x6f15, 0x6ef9, 0x6f2f,
+  0x6f36, 0x6f4b, 0x6f74, 0x6f2a, 0x6f09, 0x6f29, 0x6f89, 0x6f8d,
+  0x6f8c, 0x6f78, 0x6f72, 0x6f7c, 0x6f7a, 0x6fd1,
+  /* 0x65 */
+  0x6fc9, 0x6fa7, 0x6fb9, 0x6fb6, 0x6fc2, 0x6fe1, 0x6fee, 0x6fde,
+  0x6fe0, 0x6fef, 0x701a, 0x7023, 0x701b, 0x7039, 0x7035, 0x704f,
+  0x705e, 0x5b80, 0x5b84, 0x5b95, 0x5b93, 0x5ba5, 0x5bb8, 0x752f,
+  0x9a9e, 0x6434, 0x5be4, 0x5bee, 0x8930, 0x5bf0, 0x8e47, 0x8b07,
+  0x8fb6, 0x8fd3, 0x8fd5, 0x8fe5, 0x8fee, 0x8fe4, 0x8fe9, 0x8fe6,
+  0x8ff3, 0x8fe8, 0x9005, 0x9004, 0x900b, 0x9026, 0x9011, 0x900d,
+  0x9016, 0x9021, 0x9035, 0x9036, 0x902d, 0x902f, 0x9044, 0x9051,
+  0x9052, 0x9050, 0x9068, 0x9058, 0x9062, 0x905b, 0x66b9, 0x9074,
+  0x907d, 0x9082, 0x9088, 0x9083, 0x908b, 0x5f50, 0x5f57, 0x5f56,
+  0x5f58, 0x5c3b, 0x54ab, 0x5c50, 0x5c59, 0x5b71, 0x5c63, 0x5c66,
+  0x7fbc, 0x5f2a, 0x5f29, 0x5f2d, 0x8274, 0x5f3c, 0x9b3b, 0x5c6e,
+  0x5981, 0x5983, 0x598d, 0x59a9, 0x59aa, 0x59a3,
+  /* 0x66 */
+  0x5997, 0x59ca, 0x59ab, 0x599e, 0x59a4, 0x59d2, 0x59b2, 0x59af,
+  0x59d7, 0x59be, 0x5a05, 0x5a06, 0x59dd, 0x5a08, 0x59e3, 0x59d8,
+  0x59f9, 0x5a0c, 0x5a09, 0x5a32, 0x5a34, 0x5a11, 0x5a23, 0x5a13,
+  0x5a40, 0x5a67, 0x5a4a, 0x5a55, 0x5a3c, 0x5a62, 0x5a75, 0x80ec,
+  0x5aaa, 0x5a9b, 0x5a77, 0x5a7a, 0x5abe, 0x5aeb, 0x5ab2, 0x5ad2,
+  0x5ad4, 0x5ab8, 0x5ae0, 0x5ae3, 0x5af1, 0x5ad6, 0x5ae6, 0x5ad8,
+  0x5adc, 0x5b09, 0x5b17, 0x5b16, 0x5b32, 0x5b37, 0x5b40, 0x5c15,
+  0x5c1c, 0x5b5a, 0x5b65, 0x5b73, 0x5b51, 0x5b53, 0x5b62, 0x9a75,
+  0x9a77, 0x9a78, 0x9a7a, 0x9a7f, 0x9a7d, 0x9a80, 0x9a81, 0x9a85,
+  0x9a88, 0x9a8a, 0x9a90, 0x9a92, 0x9a93, 0x9a96, 0x9a98, 0x9a9b,
+  0x9a9c, 0x9a9d, 0x9a9f, 0x9aa0, 0x9aa2, 0x9aa3, 0x9aa5, 0x9aa7,
+  0x7e9f, 0x7ea1, 0x7ea3, 0x7ea5, 0x7ea8, 0x7ea9,
+  /* 0x67 */
+  0x7ead, 0x7eb0, 0x7ebe, 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec9, 0x7ecb,
+  0x7ecc, 0x7ed0, 0x7ed4, 0x7ed7, 0x7edb, 0x7ee0, 0x7ee1, 0x7ee8,
+  0x7eeb, 0x7eee, 0x7eef, 0x7ef1, 0x7ef2, 0x7f0d, 0x7ef6, 0x7efa,
+  0x7efb, 0x7efe, 0x7f01, 0x7f02, 0x7f03, 0x7f07, 0x7f08, 0x7f0b,
+  0x7f0c, 0x7f0f, 0x7f11, 0x7f12, 0x7f17, 0x7f19, 0x7f1c, 0x7f1b,
+  0x7f1f, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, 0x7f27,
+  0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2f, 0x7f30, 0x7f31, 0x7f32,
+  0x7f33, 0x7f35, 0x5e7a, 0x757f, 0x5ddb, 0x753e, 0x9095, 0x738e,
+  0x7391, 0x73ae, 0x73a2, 0x739f, 0x73cf, 0x73c2, 0x73d1, 0x73b7,
+  0x73b3, 0x73c0, 0x73c9, 0x73c8, 0x73e5, 0x73d9, 0x987c, 0x740a,
+  0x73e9, 0x73e7, 0x73de, 0x73ba, 0x73f2, 0x740f, 0x742a, 0x745b,
+  0x7426, 0x7425, 0x7428, 0x7430, 0x742e, 0x742c,
+  /* 0x68 */
+  0x741b, 0x741a, 0x7441, 0x745c, 0x7457, 0x7455, 0x7459, 0x7477,
+  0x746d, 0x747e, 0x749c, 0x748e, 0x7480, 0x7481, 0x7487, 0x748b,
+  0x749e, 0x74a8, 0x74a9, 0x7490, 0x74a7, 0x74d2, 0x74ba, 0x97ea,
+  0x97eb, 0x97ec, 0x674c, 0x6753, 0x675e, 0x6748, 0x6769, 0x67a5,
+  0x6787, 0x676a, 0x6773, 0x6798, 0x67a7, 0x6775, 0x67a8, 0x679e,
+  0x67ad, 0x678b, 0x6777, 0x677c, 0x67f0, 0x6809, 0x67d8, 0x680a,
+  0x67e9, 0x67b0, 0x680c, 0x67d9, 0x67b5, 0x67da, 0x67b3, 0x67dd,
+  0x6800, 0x67c3, 0x67b8, 0x67e2, 0x680e, 0x67c1, 0x67fd, 0x6832,
+  0x6833, 0x6860, 0x6861, 0x684e, 0x6862, 0x6844, 0x6864, 0x6883,
+  0x681d, 0x6855, 0x6866, 0x6841, 0x6867, 0x6840, 0x683e, 0x684a,
+  0x6849, 0x6829, 0x68b5, 0x688f, 0x6874, 0x6877, 0x6893, 0x686b,
+  0x68c2, 0x696e, 0x68fc, 0x691f, 0x6920, 0x68f9,
+  /* 0x69 */
+  0x6924, 0x68f0, 0x690b, 0x6901, 0x6957, 0x68e3, 0x6910, 0x6971,
+  0x6939, 0x6960, 0x6942, 0x695d, 0x6984, 0x696b, 0x6980, 0x6998,
+  0x6978, 0x6934, 0x69cc, 0x6987, 0x6988, 0x69ce, 0x6989, 0x6966,
+  0x6963, 0x6979, 0x699b, 0x69a7, 0x69bb, 0x69ab, 0x69ad, 0x69d4,
+  0x69b1, 0x69c1, 0x69ca, 0x69df, 0x6995, 0x69e0, 0x698d, 0x69ff,
+  0x6a2f, 0x69ed, 0x6a17, 0x6a18, 0x6a65, 0x69f2, 0x6a44, 0x6a3e,
+  0x6aa0, 0x6a50, 0x6a5b, 0x6a35, 0x6a8e, 0x6a79, 0x6a3d, 0x6a28,
+  0x6a58, 0x6a7c, 0x6a91, 0x6a90, 0x6aa9, 0x6a97, 0x6aab, 0x7337,
+  0x7352, 0x6b81, 0x6b82, 0x6b87, 0x6b84, 0x6b92, 0x6b93, 0x6b8d,
+  0x6b9a, 0x6b9b, 0x6ba1, 0x6baa, 0x8f6b, 0x8f6d, 0x8f71, 0x8f72,
+  0x8f73, 0x8f75, 0x8f76, 0x8f78, 0x8f77, 0x8f79, 0x8f7a, 0x8f7c,
+  0x8f7e, 0x8f81, 0x8f82, 0x8f84, 0x8f87, 0x8f8b,
+  /* 0x6a */
+  0x8f8d, 0x8f8e, 0x8f8f, 0x8f98, 0x8f9a, 0x8ece, 0x620b, 0x6217,
+  0x621b, 0x621f, 0x6222, 0x6221, 0x6225, 0x6224, 0x622c, 0x81e7,
+  0x74ef, 0x74f4, 0x74ff, 0x750f, 0x7511, 0x7513, 0x6534, 0x65ee,
+  0x65ef, 0x65f0, 0x660a, 0x6619, 0x6772, 0x6603, 0x6615, 0x6600,
+  0x7085, 0x66f7, 0x661d, 0x6634, 0x6631, 0x6636, 0x6635, 0x8006,
+  0x665f, 0x6654, 0x6641, 0x664f, 0x6656, 0x6661, 0x6657, 0x6677,
+  0x6684, 0x668c, 0x66a7, 0x669d, 0x66be, 0x66db, 0x66dc, 0x66e6,
+  0x66e9, 0x8d32, 0x8d33, 0x8d36, 0x8d3b, 0x8d3d, 0x8d40, 0x8d45,
+  0x8d46, 0x8d48, 0x8d49, 0x8d47, 0x8d4d, 0x8d55, 0x8d59, 0x89c7,
+  0x89ca, 0x89cb, 0x89cc, 0x89ce, 0x89cf, 0x89d0, 0x89d1, 0x726e,
+  0x729f, 0x725d, 0x7266, 0x726f, 0x727e, 0x727f, 0x7284, 0x728b,
+  0x728d, 0x728f, 0x7292, 0x6308, 0x6332, 0x63b0,
+  /* 0x6b */
+  0x643f, 0x64d8, 0x8004, 0x6bea, 0x6bf3, 0x6bfd, 0x6bf5, 0x6bf9,
+  0x6c05, 0x6c07, 0x6c06, 0x6c0d, 0x6c15, 0x6c18, 0x6c19, 0x6c1a,
+  0x6c21, 0x6c29, 0x6c24, 0x6c2a, 0x6c32, 0x6535, 0x6555, 0x656b,
+  0x724d, 0x7252, 0x7256, 0x7230, 0x8662, 0x5216, 0x809f, 0x809c,
+  0x8093, 0x80bc, 0x670a, 0x80bd, 0x80b1, 0x80ab, 0x80ad, 0x80b4,
+  0x80b7, 0x80e7, 0x80e8, 0x80e9, 0x80ea, 0x80db, 0x80c2, 0x80c4,
+  0x80d9, 0x80cd, 0x80d7, 0x6710, 0x80dd, 0x80eb, 0x80f1, 0x80f4,
+  0x80ed, 0x810d, 0x810e, 0x80f2, 0x80fc, 0x6715, 0x8112, 0x8c5a,
+  0x8136, 0x811e, 0x812c, 0x8118, 0x8132, 0x8148, 0x814c, 0x8153,
+  0x8174, 0x8159, 0x815a, 0x8171, 0x8160, 0x8169, 0x817c, 0x817d,
+  0x816d, 0x8167, 0x584d, 0x5ab5, 0x8188, 0x8182, 0x8191, 0x6ed5,
+  0x81a3, 0x81aa, 0x81cc, 0x6726, 0x81ca, 0x81bb,
+  /* 0x6c */
+  0x81c1, 0x81a6, 0x6b24, 0x6b37, 0x6b39, 0x6b43, 0x6b46, 0x6b59,
+  0x98d1, 0x98d2, 0x98d3, 0x98d5, 0x98d9, 0x98da, 0x6bb3, 0x5f40,
+  0x6bc2, 0x89f3, 0x6590, 0x9f51, 0x6593, 0x65bc, 0x65c6, 0x65c4,
+  0x65c3, 0x65cc, 0x65ce, 0x65d2, 0x65d6, 0x7080, 0x709c, 0x7096,
+  0x709d, 0x70bb, 0x70c0, 0x70b7, 0x70ab, 0x70b1, 0x70e8, 0x70ca,
+  0x7110, 0x7113, 0x7116, 0x712f, 0x7131, 0x7173, 0x715c, 0x7168,
+  0x7145, 0x7172, 0x714a, 0x7178, 0x717a, 0x7198, 0x71b3, 0x71b5,
+  0x71a8, 0x71a0, 0x71e0, 0x71d4, 0x71e7, 0x71f9, 0x721d, 0x7228,
+  0x706c, 0x7118, 0x7166, 0x71b9, 0x623e, 0x623d, 0x6243, 0x6248,
+  0x6249, 0x793b, 0x7940, 0x7946, 0x7949, 0x795b, 0x795c, 0x7953,
+  0x795a, 0x7962, 0x7957, 0x7960, 0x796f, 0x7967, 0x797a, 0x7985,
+  0x798a, 0x799a, 0x79a7, 0x79b3, 0x5fd1, 0x5fd0,
+  /* 0x6d */
+  0x603c, 0x605d, 0x605a, 0x6067, 0x6041, 0x6059, 0x6063, 0x60ab,
+  0x6106, 0x610d, 0x615d, 0x61a9, 0x619d, 0x61cb, 0x61d1, 0x6206,
+  0x8080, 0x807f, 0x6c93, 0x6cf6, 0x6dfc, 0x77f6, 0x77f8, 0x7800,
+  0x7809, 0x7817, 0x7818, 0x7811, 0x65ab, 0x782d, 0x781c, 0x781d,
+  0x7839, 0x783a, 0x783b, 0x781f, 0x783c, 0x7825, 0x782c, 0x7823,
+  0x7829, 0x784e, 0x786d, 0x7856, 0x7857, 0x7826, 0x7850, 0x7847,
+  0x784c, 0x786a, 0x789b, 0x7893, 0x789a, 0x7887, 0x789c, 0x78a1,
+  0x78a3, 0x78b2, 0x78b9, 0x78a5, 0x78d4, 0x78d9, 0x78c9, 0x78ec,
+  0x78f2, 0x7905, 0x78f4, 0x7913, 0x7924, 0x791e, 0x7934, 0x9f9b,
+  0x9ef9, 0x9efb, 0x9efc, 0x76f1, 0x7704, 0x770d, 0x76f9, 0x7707,
+  0x7708, 0x771a, 0x7722, 0x7719, 0x772d, 0x7726, 0x7735, 0x7738,
+  0x7750, 0x7751, 0x7747, 0x7743, 0x775a, 0x7768,
+  /* 0x6e */
+  0x7762, 0x7765, 0x777f, 0x778d, 0x777d, 0x7780, 0x778c, 0x7791,
+  0x779f, 0x77a0, 0x77b0, 0x77b5, 0x77bd, 0x753a, 0x7540, 0x754e,
+  0x754b, 0x7548, 0x755b, 0x7572, 0x7579, 0x7583, 0x7f58, 0x7f61,
+  0x7f5f, 0x8a48, 0x7f68, 0x7f74, 0x7f71, 0x7f79, 0x7f81, 0x7f7e,
+  0x76cd, 0x76e5, 0x8832, 0x9485, 0x9486, 0x9487, 0x948b, 0x948a,
+  0x948c, 0x948d, 0x948f, 0x9490, 0x9494, 0x9497, 0x9495, 0x949a,
+  0x949b, 0x949c, 0x94a3, 0x94a4, 0x94ab, 0x94aa, 0x94ad, 0x94ac,
+  0x94af, 0x94b0, 0x94b2, 0x94b4, 0x94b6, 0x94b7, 0x94b8, 0x94b9,
+  0x94ba, 0x94bc, 0x94bd, 0x94bf, 0x94c4, 0x94c8, 0x94c9, 0x94ca,
+  0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94d0, 0x94d1, 0x94d2, 0x94d5,
+  0x94d6, 0x94d7, 0x94d9, 0x94d8, 0x94db, 0x94de, 0x94df, 0x94e0,
+  0x94e2, 0x94e4, 0x94e5, 0x94e7, 0x94e8, 0x94ea,
+  /* 0x6f */
+  0x94e9, 0x94eb, 0x94ee, 0x94ef, 0x94f3, 0x94f4, 0x94f5, 0x94f7,
+  0x94f9, 0x94fc, 0x94fd, 0x94ff, 0x9503, 0x9502, 0x9506, 0x9507,
+  0x9509, 0x950a, 0x950d, 0x950e, 0x950f, 0x9512, 0x9513, 0x9514,
+  0x9515, 0x9516, 0x9518, 0x951b, 0x951d, 0x951e, 0x951f, 0x9522,
+  0x952a, 0x952b, 0x9529, 0x952c, 0x9531, 0x9532, 0x9534, 0x9536,
+  0x9537, 0x9538, 0x953c, 0x953e, 0x953f, 0x9542, 0x9535, 0x9544,
+  0x9545, 0x9546, 0x9549, 0x954c, 0x954e, 0x954f, 0x9552, 0x9553,
+  0x9554, 0x9556, 0x9557, 0x9558, 0x9559, 0x955b, 0x955e, 0x955f,
+  0x955d, 0x9561, 0x9562, 0x9564, 0x9565, 0x9566, 0x9567, 0x9568,
+  0x9569, 0x956a, 0x956b, 0x956c, 0x956f, 0x9571, 0x9572, 0x9573,
+  0x953a, 0x77e7, 0x77ec, 0x96c9, 0x79d5, 0x79ed, 0x79e3, 0x79eb,
+  0x7a06, 0x5d47, 0x7a03, 0x7a02, 0x7a1e, 0x7a14,
+  /* 0x70 */
+  0x7a39, 0x7a37, 0x7a51, 0x9ecf, 0x99a5, 0x7a70, 0x7688, 0x768e,
+  0x7693, 0x7699, 0x76a4, 0x74de, 0x74e0, 0x752c, 0x9e20, 0x9e22,
+  0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e32, 0x9e31, 0x9e36,
+  0x9e38, 0x9e37, 0x9e39, 0x9e3a, 0x9e3e, 0x9e41, 0x9e42, 0x9e44,
+  0x9e46, 0x9e47, 0x9e48, 0x9e49, 0x9e4b, 0x9e4c, 0x9e4e, 0x9e51,
+  0x9e55, 0x9e57, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5e, 0x9e63, 0x9e66,
+  0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e71, 0x9e6d,
+  0x9e73, 0x7592, 0x7594, 0x7596, 0x75a0, 0x759d, 0x75ac, 0x75a3,
+  0x75b3, 0x75b4, 0x75b8, 0x75c4, 0x75b1, 0x75b0, 0x75c3, 0x75c2,
+  0x75d6, 0x75cd, 0x75e3, 0x75e8, 0x75e6, 0x75e4, 0x75eb, 0x75e7,
+  0x7603, 0x75f1, 0x75fc, 0x75ff, 0x7610, 0x7600, 0x7605, 0x760c,
+  0x7617, 0x760a, 0x7625, 0x7618, 0x7615, 0x7619,
+  /* 0x71 */
+  0x761b, 0x763c, 0x7622, 0x7620, 0x7640, 0x762d, 0x7630, 0x763f,
+  0x7635, 0x7643, 0x763e, 0x7633, 0x764d, 0x765e, 0x7654, 0x765c,
+  0x7656, 0x766b, 0x766f, 0x7fca, 0x7ae6, 0x7a78, 0x7a79, 0x7a80,
+  0x7a86, 0x7a88, 0x7a95, 0x7aa6, 0x7aa0, 0x7aac, 0x7aa8, 0x7aad,
+  0x7ab3, 0x8864, 0x8869, 0x8872, 0x887d, 0x887f, 0x8882, 0x88a2,
+  0x88c6, 0x88b7, 0x88bc, 0x88c9, 0x88e2, 0x88ce, 0x88e3, 0x88e5,
+  0x88f1, 0x891a, 0x88fc, 0x88e8, 0x88fe, 0x88f0, 0x8921, 0x8919,
+  0x8913, 0x891b, 0x890a, 0x8934, 0x892b, 0x8936, 0x8941, 0x8966,
+  0x897b, 0x758b, 0x80e5, 0x76b2, 0x76b4, 0x77dc, 0x8012, 0x8014,
+  0x8016, 0x801c, 0x8020, 0x8022, 0x8025, 0x8026, 0x8027, 0x8029,
+  0x8028, 0x8031, 0x800b, 0x8035, 0x8043, 0x8046, 0x804d, 0x8052,
+  0x8069, 0x8071, 0x8983, 0x9878, 0x9880, 0x9883,
+  /* 0x72 */
+  0x9889, 0x988c, 0x988d, 0x988f, 0x9894, 0x989a, 0x989b, 0x989e,
+  0x989f, 0x98a1, 0x98a2, 0x98a5, 0x98a6, 0x864d, 0x8654, 0x866c,
+  0x866e, 0x867f, 0x867a, 0x867c, 0x867b, 0x86a8, 0x868d, 0x868b,
+  0x86ac, 0x869d, 0x86a7, 0x86a3, 0x86aa, 0x8693, 0x86a9, 0x86b6,
+  0x86c4, 0x86b5, 0x86ce, 0x86b0, 0x86ba, 0x86b1, 0x86af, 0x86c9,
+  0x86cf, 0x86b4, 0x86e9, 0x86f1, 0x86f2, 0x86ed, 0x86f3, 0x86d0,
+  0x8713, 0x86de, 0x86f4, 0x86df, 0x86d8, 0x86d1, 0x8703, 0x8707,
+  0x86f8, 0x8708, 0x870a, 0x870d, 0x8709, 0x8723, 0x873b, 0x871e,
+  0x8725, 0x872e, 0x871a, 0x873e, 0x8748, 0x8734, 0x8731, 0x8729,
+  0x8737, 0x873f, 0x8782, 0x8722, 0x877d, 0x877e, 0x877b, 0x8760,
+  0x8770, 0x874c, 0x876e, 0x878b, 0x8753, 0x8763, 0x877c, 0x8764,
+  0x8759, 0x8765, 0x8793, 0x87af, 0x87a8, 0x87d2,
+  /* 0x73 */
+  0x87c6, 0x8788, 0x8785, 0x87ad, 0x8797, 0x8783, 0x87ab, 0x87e5,
+  0x87ac, 0x87b5, 0x87b3, 0x87cb, 0x87d3, 0x87bd, 0x87d1, 0x87c0,
+  0x87ca, 0x87db, 0x87ea, 0x87e0, 0x87ee, 0x8816, 0x8813, 0x87fe,
+  0x880a, 0x881b, 0x8821, 0x8839, 0x883c, 0x7f36, 0x7f42, 0x7f44,
+  0x7f45, 0x8210, 0x7afa, 0x7afd, 0x7b08, 0x7b03, 0x7b04, 0x7b15,
+  0x7b0a, 0x7b2b, 0x7b0f, 0x7b47, 0x7b38, 0x7b2a, 0x7b19, 0x7b2e,
+  0x7b31, 0x7b20, 0x7b25, 0x7b24, 0x7b33, 0x7b3e, 0x7b1e, 0x7b58,
+  0x7b5a, 0x7b45, 0x7b75, 0x7b4c, 0x7b5d, 0x7b60, 0x7b6e, 0x7b7b,
+  0x7b62, 0x7b72, 0x7b71, 0x7b90, 0x7ba6, 0x7ba7, 0x7bb8, 0x7bac,
+  0x7b9d, 0x7ba8, 0x7b85, 0x7baa, 0x7b9c, 0x7ba2, 0x7bab, 0x7bb4,
+  0x7bd1, 0x7bc1, 0x7bcc, 0x7bdd, 0x7bda, 0x7be5, 0x7be6, 0x7bea,
+  0x7c0c, 0x7bfe, 0x7bfc, 0x7c0f, 0x7c16, 0x7c0b,
+  /* 0x74 */
+  0x7c1f, 0x7c2a, 0x7c26, 0x7c38, 0x7c41, 0x7c40, 0x81fe, 0x8201,
+  0x8202, 0x8204, 0x81ec, 0x8844, 0x8221, 0x8222, 0x8223, 0x822d,
+  0x822f, 0x8228, 0x822b, 0x8238, 0x823b, 0x8233, 0x8234, 0x823e,
+  0x8244, 0x8249, 0x824b, 0x824f, 0x825a, 0x825f, 0x8268, 0x887e,
+  0x8885, 0x8888, 0x88d8, 0x88df, 0x895e, 0x7f9d, 0x7f9f, 0x7fa7,
+  0x7faf, 0x7fb0, 0x7fb2, 0x7c7c, 0x6549, 0x7c91, 0x7c9d, 0x7c9c,
+  0x7c9e, 0x7ca2, 0x7cb2, 0x7cbc, 0x7cbd, 0x7cc1, 0x7cc7, 0x7ccc,
+  0x7ccd, 0x7cc8, 0x7cc5, 0x7cd7, 0x7ce8, 0x826e, 0x66a8, 0x7fbf,
+  0x7fce, 0x7fd5, 0x7fe5, 0x7fe1, 0x7fe6, 0x7fe9, 0x7fee, 0x7ff3,
+  0x7cf8, 0x7d77, 0x7da6, 0x7dae, 0x7e47, 0x7e9b, 0x9eb8, 0x9eb4,
+  0x8d73, 0x8d84, 0x8d94, 0x8d91, 0x8db1, 0x8d67, 0x8d6d, 0x8c47,
+  0x8c49, 0x914a, 0x9150, 0x914e, 0x914f, 0x9164,
+  /* 0x75 */
+  0x9162, 0x9161, 0x9170, 0x9169, 0x916f, 0x917d, 0x917e, 0x9172,
+  0x9174, 0x9179, 0x918c, 0x9185, 0x9190, 0x918d, 0x9191, 0x91a2,
+  0x91a3, 0x91aa, 0x91ad, 0x91ae, 0x91af, 0x91b5, 0x91b4, 0x91ba,
+  0x8c55, 0x9e7e, 0x8db8, 0x8deb, 0x8e05, 0x8e59, 0x8e69, 0x8db5,
+  0x8dbf, 0x8dbc, 0x8dba, 0x8dc4, 0x8dd6, 0x8dd7, 0x8dda, 0x8dde,
+  0x8dce, 0x8dcf, 0x8ddb, 0x8dc6, 0x8dec, 0x8df7, 0x8df8, 0x8de3,
+  0x8df9, 0x8dfb, 0x8de4, 0x8e09, 0x8dfd, 0x8e14, 0x8e1d, 0x8e1f,
+  0x8e2c, 0x8e2e, 0x8e23, 0x8e2f, 0x8e3a, 0x8e40, 0x8e39, 0x8e35,
+  0x8e3d, 0x8e31, 0x8e49, 0x8e41, 0x8e42, 0x8e51, 0x8e52, 0x8e4a,
+  0x8e70, 0x8e76, 0x8e7c, 0x8e6f, 0x8e74, 0x8e85, 0x8e8f, 0x8e94,
+  0x8e90, 0x8e9c, 0x8e9e, 0x8c78, 0x8c82, 0x8c8a, 0x8c85, 0x8c98,
+  0x8c94, 0x659b, 0x89d6, 0x89de, 0x89da, 0x89dc,
+  /* 0x76 */
+  0x89e5, 0x89eb, 0x89ef, 0x8a3e, 0x8b26, 0x9753, 0x96e9, 0x96f3,
+  0x96ef, 0x9706, 0x9701, 0x9708, 0x970f, 0x970e, 0x972a, 0x972d,
+  0x9730, 0x973e, 0x9f80, 0x9f83, 0x9f85, 0x9f86, 0x9f87, 0x9f88,
+  0x9f89, 0x9f8a, 0x9f8c, 0x9efe, 0x9f0b, 0x9f0d, 0x96b9, 0x96bc,
+  0x96bd, 0x96ce, 0x96d2, 0x77bf, 0x96e0, 0x928e, 0x92ae, 0x92c8,
+  0x933e, 0x936a, 0x93ca, 0x938f, 0x943e, 0x946b, 0x9c7f, 0x9c82,
+  0x9c85, 0x9c86, 0x9c87, 0x9c88, 0x7a23, 0x9c8b, 0x9c8e, 0x9c90,
+  0x9c91, 0x9c92, 0x9c94, 0x9c95, 0x9c9a, 0x9c9b, 0x9c9e, 0x9c9f,
+  0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8,
+  0x9ca9, 0x9cab, 0x9cad, 0x9cae, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3,
+  0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd,
+  0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cca, 0x9ccb,
+  /* 0x77 */
+  0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd3, 0x9cd4, 0x9cd5,
+  0x9cd7, 0x9cd8, 0x9cd9, 0x9cdc, 0x9cdd, 0x9cdf, 0x9ce2, 0x977c,
+  0x9785, 0x9791, 0x9792, 0x9794, 0x97af, 0x97ab, 0x97a3, 0x97b2,
+  0x97b4, 0x9ab1, 0x9ab0, 0x9ab7, 0x9e58, 0x9ab6, 0x9aba, 0x9abc,
+  0x9ac1, 0x9ac0, 0x9ac5, 0x9ac2, 0x9acb, 0x9acc, 0x9ad1, 0x9b45,
+  0x9b43, 0x9b47, 0x9b49, 0x9b48, 0x9b4d, 0x9b51, 0x98e8, 0x990d,
+  0x992e, 0x9955, 0x9954, 0x9adf, 0x9ae1, 0x9ae6, 0x9aef, 0x9aeb,
+  0x9afb, 0x9aed, 0x9af9, 0x9b08, 0x9b0f, 0x9b13, 0x9b1f, 0x9b23,
+  0x9ebd, 0x9ebe, 0x7e3b, 0x9e82, 0x9e87, 0x9e88, 0x9e8b, 0x9e92,
+  0x93d6, 0x9e9d, 0x9e9f, 0x9edb, 0x9edc, 0x9edd, 0x9ee0, 0x9edf,
+  0x9ee2, 0x9ee9, 0x9ee7, 0x9ee5, 0x9eea, 0x9eef, 0x9f22, 0x9f2c,
+  0x9f2f, 0x9f39, 0x9f37, 0x9f3d, 0x9f3e, 0x9f44,
+};
+
+static int
+gb2312_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = (s[0] & 0x7F);
+  if ((c1 >= 0x21 && c1 <= 0x29) || (c1 >= 0x30 && c1 <= 0x77)) {
+    if (n >= 2) {
+      unsigned char c2 = (s[1] & 0x7F);
+      if (c2 >= 0x21 && c2 < 0x7f) {
+        unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
+        unsigned short wc = 0xfffd;
+        if (i < 1410) {
+          if (i < 831)
+            wc = gb2312_2uni_page21[i];
+        } else {
+          if (i < 8178)
+            wc = gb2312_2uni_page30[i-1410];
+        }
+        if (wc != 0xfffd) {
+          *pwc = (ucs4_t) wc;
+          return 2;
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+static const unsigned short gb2312_2charset[7445] = {
+  0x2168, 0x216c, 0x2127, 0x2163, 0x2140, 0x2141, 0x2824, 0x2822,
+  0x2828, 0x2826, 0x283a, 0x282c, 0x282a, 0x2830, 0x282e, 0x2142,
+  0x2834, 0x2832, 0x2839, 0x2821, 0x2825, 0x2827, 0x2829, 0x282d,
+  0x2831, 0x2823, 0x282b, 0x282f, 0x2833, 0x2835, 0x2836, 0x2837,
+  0x2838, 0x2126, 0x2125, 0x2621, 0x2622, 0x2623, 0x2624, 0x2625,
+  0x2626, 0x2627, 0x2628, 0x2629, 0x262a, 0x262b, 0x262c, 0x262d,
+  0x262e, 0x262f, 0x2630, 0x2631, 0x2632, 0x2633, 0x2634, 0x2635,
+  0x2636, 0x2637, 0x2638, 0x2641, 0x2642, 0x2643, 0x2644, 0x2645,
+  0x2646, 0x2647, 0x2648, 0x2649, 0x264a, 0x264b, 0x264c, 0x264d,
+  0x264e, 0x264f, 0x2650, 0x2651, 0x2652, 0x2653, 0x2654, 0x2655,
+  0x2656, 0x2657, 0x2658, 0x2727, 0x2721, 0x2722, 0x2723, 0x2724,
+  0x2725, 0x2726, 0x2728, 0x2729, 0x272a, 0x272b, 0x272c, 0x272d,
+  0x272e, 0x272f, 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2735,
+  0x2736, 0x2737, 0x2738, 0x2739, 0x273a, 0x273b, 0x273c, 0x273d,
+  0x273e, 0x273f, 0x2740, 0x2741, 0x2751, 0x2752, 0x2753, 0x2754,
+  0x2755, 0x2756, 0x2758, 0x2759, 0x275a, 0x275b, 0x275c, 0x275d,
+  0x275e, 0x275f, 0x2760, 0x2761, 0x2762, 0x2763, 0x2764, 0x2765,
+  0x2766, 0x2767, 0x2768, 0x2769, 0x276a, 0x276b, 0x276c, 0x276d,
+  0x276e, 0x276f, 0x2770, 0x2771, 0x2757, 0x212a, 0x212c, 0x212e,
+  0x212f, 0x2130, 0x2131, 0x212d, 0x216b, 0x2164, 0x2165, 0x2179,
+  0x2166, 0x216d, 0x2271, 0x2272, 0x2273, 0x2274, 0x2275, 0x2276,
+  0x2277, 0x2278, 0x2279, 0x227a, 0x227b, 0x227c, 0x217b, 0x217c,
+  0x217a, 0x217d, 0x214a, 0x2147, 0x2146, 0x214c, 0x2158, 0x215e,
+  0x214f, 0x214e, 0x2144, 0x2145, 0x2149, 0x2148, 0x2152, 0x2153,
+  0x2160, 0x215f, 0x2143, 0x214b, 0x2157, 0x2156, 0x2155, 0x2159,
+  0x2154, 0x215c, 0x215d, 0x215a, 0x215b, 0x2151, 0x214d, 0x2150,
+  0x2259, 0x225a, 0x225b, 0x225c, 0x225d, 0x225e, 0x225f, 0x2260,
+  0x2261, 0x2262, 0x2245, 0x2246, 0x2247, 0x2248, 0x2249, 0x224a,
+  0x224b, 0x224c, 0x224d, 0x224e, 0x224f, 0x2250, 0x2251, 0x2252,
+  0x2253, 0x2254, 0x2255, 0x2256, 0x2257, 0x2258, 0x2231, 0x2232,
+  0x2233, 0x2234, 0x2235, 0x2236, 0x2237, 0x2238, 0x2239, 0x223a,
+  0x223b, 0x223c, 0x223d, 0x223e, 0x223f, 0x2240, 0x2241, 0x2242,
+  0x2243, 0x2244, 0x2924, 0x2925, 0x2926, 0x2927, 0x2928, 0x2929,
+  0x292a, 0x292b, 0x292c, 0x292d, 0x292e, 0x292f, 0x2930, 0x2931,
+  0x2932, 0x2933, 0x2934, 0x2935, 0x2936, 0x2937, 0x2938, 0x2939,
+  0x293a, 0x293b, 0x293c, 0x293d, 0x293e, 0x293f, 0x2940, 0x2941,
+  0x2942, 0x2943, 0x2944, 0x2945, 0x2946, 0x2947, 0x2948, 0x2949,
+  0x294a, 0x294b, 0x294c, 0x294d, 0x294e, 0x294f, 0x2950, 0x2951,
+  0x2952, 0x2953, 0x2954, 0x2955, 0x2956, 0x2957, 0x2958, 0x2959,
+  0x295a, 0x295b, 0x295c, 0x295d, 0x295e, 0x295f, 0x2960, 0x2961,
+  0x2962, 0x2963, 0x2964, 0x2965, 0x2966, 0x2967, 0x2968, 0x2969,
+  0x296a, 0x296b, 0x296c, 0x296d, 0x296e, 0x296f, 0x2176, 0x2175,
+  0x2178, 0x2177, 0x2174, 0x2173, 0x2170, 0x2172, 0x2171, 0x216f,
+  0x216e, 0x2162, 0x2161, 0x2121, 0x2122, 0x2123, 0x2128, 0x2129,
+  0x2134, 0x2135, 0x2136, 0x2137, 0x2138, 0x2139, 0x213a, 0x213b,
+  0x213e, 0x213f, 0x217e, 0x2132, 0x2133, 0x213c, 0x213d, 0x2421,
+  0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427, 0x2428, 0x2429,
+  0x242a, 0x242b, 0x242c, 0x242d, 0x242e, 0x242f, 0x2430, 0x2431,
+  0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437, 0x2438, 0x2439,
+  0x243a, 0x243b, 0x243c, 0x243d, 0x243e, 0x243f, 0x2440, 0x2441,
+  0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447, 0x2448, 0x2449,
+  0x244a, 0x244b, 0x244c, 0x244d, 0x244e, 0x244f, 0x2450, 0x2451,
+  0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457, 0x2458, 0x2459,
+  0x245a, 0x245b, 0x245c, 0x245d, 0x245e, 0x245f, 0x2460, 0x2461,
+  0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469,
+  0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, 0x2470, 0x2471,
+  0x2472, 0x2473, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526,
+  0x2527, 0x2528, 0x2529, 0x252a, 0x252b, 0x252c, 0x252d, 0x252e,
+  0x252f, 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536,
+  0x2537, 0x2538, 0x2539, 0x253a, 0x253b, 0x253c, 0x253d, 0x253e,
+  0x253f, 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546,
+  0x2547, 0x2548, 0x2549, 0x254a, 0x254b, 0x254c, 0x254d, 0x254e,
+  0x254f, 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556,
+  0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e,
+  0x255f, 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566,
+  0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x256d, 0x256e,
+  0x256f, 0x2570, 0x2571, 0x2572, 0x2573, 0x2574, 0x2575, 0x2576,
+  0x2124, 0x2845, 0x2846, 0x2847, 0x2848, 0x2849, 0x284a, 0x284b,
+  0x284c, 0x284d, 0x284e, 0x284f, 0x2850, 0x2851, 0x2852, 0x2853,
+  0x2854, 0x2855, 0x2856, 0x2857, 0x2858, 0x2859, 0x285a, 0x285b,
+  0x285c, 0x285d, 0x285e, 0x285f, 0x2860, 0x2861, 0x2862, 0x2863,
+  0x2864, 0x2865, 0x2866, 0x2867, 0x2868, 0x2869, 0x2265, 0x2266,
+  0x2267, 0x2268, 0x2269, 0x226a, 0x226b, 0x226c, 0x226d, 0x226e,
+  0x523b, 0x3621, 0x465f, 0x4d72, 0x5549, 0x487d, 0x494f, 0x4f42,
+  0x5822, 0x323b, 0x536b, 0x5824, 0x3373, 0x5728, 0x4752, 0x5827,
+  0x4a40, 0x4770, 0x317b, 0x5235, 0x3454, 0x362b, 0x4b3f, 0x5829,
+  0x362a, 0x413d, 0x514f, 0x4925, 0x582d, 0x3876, 0x513e, 0x635c,
+  0x5650, 0x3761, 0x342e, 0x4159, 0x583c, 0x4d68, 0x3524, 0x4e2a,
+  0x5677, 0x4076, 0x3e59, 0x582f, 0x444b, 0x3e43, 0x5831, 0x4334,
+  0x5265, 0x562e, 0x4e5a, 0x5527, 0x3a75, 0x3726, 0x4056, 0x4639,
+  0x4552, 0x4747, 0x3954, 0x334b, 0x5252, 0x583f, 0x3e45, 0x4672,
+  0x5232, 0x4f30, 0x4f67, 0x4a69, 0x5840, 0x4272, 0x4252, 0x4869,
+  0x472c, 0x414b, 0x5368, 0x5579, 0x4a42, 0x367e, 0x5821, 0x535a,
+  0x3f77, 0x5446, 0x3b25, 0x5841, 0x4e65, 0x3e2e, 0x5828, 0x5147,
+  0x5029, 0x583d, 0x596f, 0x4d76, 0x3f3a, 0x3d3b, 0x3a25, 0x5260,
+  0x327a, 0x3a60, 0x4436, 0x4f6d, 0x3e29, 0x4d24, 0x4141, 0x4757,
+  0x5971, 0x5974, 0x484b, 0x5869, 0x525a, 0x4a32, 0x484a, 0x586c,
+  0x586a, 0x5846, 0x3d76, 0x464d, 0x3370, 0x586b, 0x3d71, 0x3d69,
+  0x4854, 0x3453, 0x4258, 0x3256, 0x5750, 0x4a4b, 0x4b7b, 0x554c,
+  0x3836, 0x4f49, 0x595a, 0x5870, 0x472a, 0x586e, 0x347a, 0x416e,
+  0x5254, 0x586d, 0x5247, 0x586f, 0x4347, 0x5176, 0x5659, 0x5872,
+  0x5875, 0x3c7e, 0x3c5b, 0x484e, 0x375d, 0x3742, 0x4673, 0x5878,
+  0x5241, 0x4e69, 0x3c3f, 0x377c, 0x3725, 0x505d, 0x565a, 0x5345,
+  0x3b6f, 0x3b61, 0x5871, 0x4921, 0x4e30, 0x342b, 0x5873, 0x494b,
+  0x5876, 0x4257, 0x5877, 0x4e31, 0x5879, 0x322e, 0x3940, 0x5923,
+  0x3069, 0x4166, 0x496c, 0x4b45, 0x4b46, 0x5924, 0x3568, 0x352b,
+  0x4e3b, 0x354d, 0x5721, 0x5774, 0x5353, 0x4c65, 0x3a4e, 0x5922,
+  0x595c, 0x5360, 0x587d, 0x3770, 0x5777, 0x587e, 0x587a, 0x5921,
+  0x4463, 0x5336, 0x5874, 0x595d, 0x587b, 0x4565, 0x4050, 0x5170,
+  0x305b, 0x3c51, 0x5926, 0x5925, 0x592c, 0x592e, 0x592b, 0x4a39,
+  0x5929, 0x5636, 0x335e, 0x5928, 0x407d, 0x4a4c, 0x592a, 0x5927,
+  0x5930, 0x3631, 0x3929, 0x5240, 0x4f40, 0x4242, 0x3d44, 0x556c,
+  0x3260, 0x4748, 0x3f6b, 0x592d, 0x592f, 0x4e6a, 0x3a6e, 0x4756,
+  0x3163, 0x3459, 0x366d, 0x5934, 0x3f21, 0x595e, 0x474e, 0x407e,
+  0x5938, 0x4b57, 0x377d, 0x5935, 0x5937, 0x3123, 0x5361, 0x5939,
+  0x5045, 0x5936, 0x5931, 0x5932, 0x4129, 0x5933, 0x3c73, 0x505e,
+  0x3829, 0x3e63, 0x593d, 0x593a, 0x3033, 0x5942, 0x5944, 0x3136,
+  0x593f, 0x3539, 0x3e73, 0x4c48, 0x3a72, 0x5250, 0x5943, 0x3d68,
+  0x332b, 0x5945, 0x3e6b, 0x5946, 0x593b, 0x445f, 0x593e, 0x5941,
+  0x5940, 0x552e, 0x5635, 0x4763, 0x5948, 0x3c59, 0x594a, 0x593c,
+  0x594b, 0x462b, 0x5949, 0x5776, 0x4d23, 0x3d21, 0x594c, 0x453c,
+  0x4d35, 0x594d, 0x5947, 0x3325, 0x3f7e, 0x3835, 0x407c, 0x3078,
+  0x3476, 0x594e, 0x594f, 0x3422, 0x5950, 0x345f, 0x3041, 0x5951,
+  0x4935, 0x4f71, 0x5952, 0x4145, 0x5956, 0x492e, 0x5955, 0x5954,
+  0x5957, 0x4b5b, 0x3d29, 0x4627, 0x5953, 0x5958, 0x5959, 0x4865,
+  0x405c, 0x3679, 0x5823, 0x544a, 0x542a, 0x5056, 0x3364, 0x5557,
+  0x4f48, 0x3962, 0x3f4b, 0x4362, 0x3652, 0x4d43, 0x596e, 0x5970,
+  0x3533, 0x3635, 0x3e24, 0x486b, 0x482b, 0x304b, 0x392b, 0x4179,
+  0x5962, 0x403c, 0x3932, 0x3958, 0x504b, 0x3178, 0x4664, 0x3e5f,
+  0x3564, 0x5748, 0x5178, 0x3c66, 0x4a5e, 0x3c3d, 0x5966, 0x5867,
+  0x445a, 0x3854, 0x483d, 0x3261, 0x5459, 0x4330, 0x4361, 0x5a22,
+  0x485f, 0x5034, 0x3e7c, 0x4529, 0x395a, 0x5a23, 0x5429, 0x5a24,
+  0x597b, 0x362c, 0x376b, 0x3179, 0x597c, 0x3365, 0x3e76, 0x3f76,
+  0x5231, 0x4064, 0x3633, 0x597e, 0x597d, 0x3e3b, 0x4660, 0x573c,
+  0x5a21, 0x4139, 0x3572, 0x4168, 0x3c75, 0x3455, 0x415d, 0x447d,
+  0x3c38, 0x3732, 0x376f, 0x596c, 0x463e, 0x3f2d, 0x3b4b, 0x354a,
+  0x5b49, 0x5057, 0x4d39, 0x303c, 0x3376, 0x3b77, 0x5b4a, 0x3a2f,
+  0x5464, 0x3536, 0x3573, 0x5856, 0x4850, 0x3756, 0x4750, 0x5857,
+  0x3f2f, 0x5b3b, 0x5858, 0x504c, 0x3b2e, 0x6b3e, 0x4150, 0x4175,
+  0x5472, 0x3855, 0x3434, 0x3375, 0x493e, 0x4550, 0x4559, 0x407b,
+  0x3170, 0x5859, 0x394e, 0x353d, 0x585a, 0x5646, 0x4b22, 0x482f,
+  0x4932, 0x344c, 0x3f4c, 0x3974, 0x585b, 0x585c, 0x3667, 0x3c41,
+  0x4c6a, 0x4f77, 0x585d, 0x4730, 0x3950, 0x3d23, 0x4c5e, 0x464a,
+  0x5860, 0x585e, 0x585f, 0x307e, 0x3e67, 0x4a23, 0x3c74, 0x3831,
+  0x386e, 0x5862, 0x3d4b, 0x5864, 0x5863, 0x457c, 0x5865, 0x5866,
+  0x4126, 0x4830, 0x306c, 0x3926, 0x3c53, 0x4e71, 0x5b3d, 0x4153,
+  0x362f, 0x567a, 0x452c, 0x3d59, 0x5b3e, 0x5b3f, 0x4078, 0x3e22,
+  0x404d, 0x5b40, 0x4a46, 0x322a, 0x5342, 0x4363, 0x512b, 0x5b42,
+  0x4055, 0x5b43, 0x3f31, 0x443c, 0x475a, 0x5b44, 0x5968, 0x4957,
+  0x3934, 0x4e70, 0x5448, 0x307c, 0x3452, 0x5059, 0x5969, 0x5e4b,
+  0x596b, 0x5830, 0x3b2f, 0x3131, 0x3357, 0x584e, 0x5451, 0x3d33,
+  0x3f6f, 0x4f3b, 0x5850, 0x374b, 0x5851, 0x4625, 0x4778, 0x523d,
+  0x5852, 0x4464, 0x4a2e, 0x4727, 0x5826, 0x497d, 0x4e67, 0x3b5c,
+  0x306b, 0x3b2a, 0x502d, 0x3130, 0x5764, 0x573f, 0x3525, 0x4274,
+  0x444f, 0x3229, 0x3237, 0x3165, 0x5f32, 0x553c, 0x3f28, 0x422c,
+  0x5855, 0x4231, 0x5854, 0x4e54, 0x5a60, 0x4e40, 0x5834, 0x432e,
+  0x5321, 0x4e23, 0x3c34, 0x4834, 0x4251, 0x3e6d, 0x5036, 0x5a61,
+  0x4764, 0x3327, 0x3672, 0x4c7c, 0x407a, 0x4077, 0x5139, 0x5161,
+  0x5847, 0x325e, 0x4065, 0x3a71, 0x5848, 0x542d, 0x4f61, 0x5849,
+  0x584a, 0x4f43, 0x3378, 0x3e47, 0x584b, 0x5b4c, 0x4825, 0x4f58,
+  0x487e, 0x324e, 0x5356, 0x3266, 0x3c30, 0x5351, 0x4b2b, 0x3734,
+  0x3722, 0x4a65, 0x4821, 0x4a5c, 0x3164, 0x5070, 0x4551, 0x5b45,
+  0x357e, 0x3f5a, 0x3945, 0x3e64, 0x416d, 0x5f36, 0x5f35, 0x563b,
+  0x3d50, 0x5559, 0x3048, 0x3623, 0x3f49, 0x4c28, 0x5f33, 0x4a37,
+  0x5352, 0x584f, 0x5236, 0x3a45, 0x4b3e, 0x4c3e, 0x5f37, 0x3570,
+  0x5f34, 0x5375, 0x3354, 0x3877, 0x5f3a, 0x3a4f, 0x3c2a, 0x3575,
+  0x4d2c, 0x437b, 0x3a73, 0x4074, 0x4d42, 0x4f72, 0x5f38, 0x4f45,
+  0x4240, 0x5f39, 0x4270, 0x3e7d, 0x415f, 0x4d4c, 0x5277, 0x374d,
+  0x5f41, 0x5f44, 0x3771, 0x3049, 0x3656, 0x3754, 0x3a2c, 0x4c7d,
+  0x3f54, 0x4b31, 0x4674, 0x5628, 0x5f45, 0x4e62, 0x3333, 0x4e7c,
+  0x3435, 0x4e47, 0x3a70, 0x4e61, 0x513d, 0x5f40, 0x3474, 0x334a,
+  0x3866, 0x5f3b, 0x4445, 0x5f3c, 0x5f3d, 0x5f3e, 0x453b, 0x5f3f,
+  0x5f42, 0x5431, 0x5f43, 0x473a, 0x4e58, 0x4458, 0x5f4a, 0x5f4f,
+  0x565c, 0x5f49, 0x5f5a, 0x4e36, 0x3a47, 0x5f4e, 0x5f48, 0x455e,
+  0x496b, 0x3a74, 0x437c, 0x3e57, 0x5f46, 0x5f4d, 0x4558, 0x5526,
+  0x3a4d, 0x3e4c, 0x533d, 0x3840, 0x5664, 0x5f47, 0x393e, 0x3f27,
+  0x417c, 0x5f4b, 0x5f4c, 0x5f50, 0x5f5b, 0x5f65, 0x5f57, 0x5f56,
+  0x5749, 0x5f63, 0x5f64, 0x656b, 0x5227, 0x5f52, 0x3f29, 0x545b,
+  0x3f48, 0x5f54, 0x4f4c, 0x5f5d, 0x514a, 0x5f5e, 0x3027, 0x4637,
+  0x5f53, 0x3a65, 0x365f, 0x4d5b, 0x397e, 0x5455, 0x5f5f, 0x4f6c,
+  0x3025, 0x5f67, 0x5f51, 0x5146, 0x5f55, 0x5f58, 0x5f59, 0x5f5c,
+  0x3b29, 0x5f60, 0x5f61, 0x5f62, 0x5f66, 0x5f68, 0x5334, 0x3867,
+  0x4536, 0x5f6a, 0x495a, 0x4128, 0x4444, 0x3f5e, 0x4f78, 0x555c,
+  0x5f6e, 0x3238, 0x3a5f, 0x5f6c, 0x5b41, 0x5164, 0x4b74, 0x343d,
+  0x3026, 0x5f71, 0x4c46, 0x5f72, 0x5f6d, 0x5f69, 0x5f6b, 0x5f6f,
+  0x5f70, 0x3b3d, 0x5f73, 0x5f74, 0x3b23, 0x4a5b, 0x4e28, 0x6027,
+  0x332a, 0x6026, 0x6021, 0x5f7e, 0x4d59, 0x5f7c, 0x5f7a, 0x3f50,
+  0x5744, 0x494c, 0x5f78, 0x3021, 0x5f7d, 0x5f7b, 0x6022, 0x6028,
+  0x3748, 0x4621, 0x4936, 0x4032, 0x5f75, 0x453e, 0x5844, 0x5f79,
+  0x4476, 0x6023, 0x6024, 0x6025, 0x5025, 0x6034, 0x4c64, 0x6031,
+  0x3f26, 0x602f, 0x4e39, 0x602b, 0x4946, 0x402e, 0x602e, 0x3a6d,
+  0x3a30, 0x6029, 0x5f76, 0x6033, 0x6038, 0x342d, 0x6039, 0x4f32,
+  0x3a48, 0x6030, 0x507a, 0x602c, 0x547b, 0x5f77, 0x4567, 0x602d,
+  0x5377, 0x6036, 0x6037, 0x6044, 0x5061, 0x603c, 0x6049, 0x604a,
+  0x603e, 0x602a, 0x4924, 0x6041, 0x6032, 0x4a48, 0x6043, 0x6035,
+  0x4e4b, 0x4b43, 0x604d, 0x6046, 0x6042, 0x604b, 0x603a, 0x603f,
+  0x6040, 0x6045, 0x6047, 0x6048, 0x604c, 0x603b, 0x4b54, 0x6055,
+  0x6056, 0x6052, 0x6050, 0x3c4e, 0x6051, 0x3842, 0x5845, 0x506a,
+  0x426f, 0x604f, 0x603d, 0x6054, 0x6053, 0x6057, 0x605c, 0x6058,
+  0x5676, 0x3330, 0x576c, 0x4b3b, 0x605a, 0x4e7b, 0x3a59, 0x6061,
+  0x605d, 0x522d, 0x6062, 0x605b, 0x6059, 0x605f, 0x6060, 0x605e,
+  0x6064, 0x4677, 0x582c, 0x546b, 0x6066, 0x4a49, 0x6065, 0x3841,
+  0x6067, 0x6068, 0x6069, 0x6063, 0x3a3f, 0x4c67, 0x606a, 0x4f79,
+  0x606b, 0x4842, 0x3d40, 0x4452, 0x606c, 0x606d, 0x4774, 0x4b44,
+  0x606e, 0x3b58, 0x5836, 0x5272, 0x606f, 0x4d45, 0x365a, 0x6071,
+  0x5430, 0x4027, 0x3451, 0x4e27, 0x6070, 0x6072, 0x394c, 0x397a,
+  0x4d3c, 0x6073, 0x4654, 0x6074, 0x5432, 0x4826, 0x6076, 0x6075,
+  0x6077, 0x4d41, 0x4a25, 0x545a, 0x5b57, 0x5b59, 0x5b58, 0x3967,
+  0x5b5c, 0x5b5d, 0x3558, 0x5b5a, 0x5b5b, 0x3321, 0x5b5f, 0x3b78,
+  0x5637, 0x5b60, 0x3e79, 0x373b, 0x5b50, 0x4c2e, 0x3f32, 0x3b35,
+  0x5778, 0x3f53, 0x3f69, 0x3c61, 0x4c33, 0x5b5e, 0x3053, 0x4e6b,
+  0x3758, 0x5739, 0x4642, 0x4024, 0x4c39, 0x5b67, 0x5b61, 0x463a,
+  0x5b63, 0x5b68, 0x4577, 0x5b6a, 0x5b69, 0x3f40, 0x5b66, 0x5b65,
+  0x3439, 0x402c, 0x4222, 0x5b62, 0x5b64, 0x504d, 0x5b6d, 0x405d,
+  0x5b72, 0x3662, 0x5b73, 0x5b52, 0x3938, 0x542b, 0x5b6c, 0x3f51,
+  0x5b70, 0x5b51, 0x3566, 0x5b6b, 0x3f65, 0x5b6e, 0x5b71, 0x5b79,
+  0x3921, 0x3023, 0x4271, 0x3347, 0x5b6f, 0x5b78, 0x4652, 0x5b74,
+  0x5b75, 0x5b77, 0x5b76, 0x5b7e, 0x5372, 0x323a, 0x5b7d, 0x5c24,
+  0x5b7b, 0x5b7a, 0x5b7c, 0x4560, 0x3b79, 0x5c23, 0x5c25, 0x4c43,
+  0x3651, 0x5d40, 0x5c21, 0x5c22, 0x4735, 0x3669, 0x5c27, 0x5c26,
+  0x5c29, 0x3124, 0x354c, 0x3f30, 0x515f, 0x3642, 0x5c28, 0x4b7a,
+  0x6b73, 0x4b5c, 0x4b7e, 0x4c41, 0x487b, 0x5c2a, 0x4c6e, 0x5c2b,
+  0x5b53, 0x5c2f, 0x5c2c, 0x3e33, 0x4a7b, 0x5c2d, 0x494a, 0x4439,
+  0x473d, 0x5c2e, 0x5476, 0x5066, 0x442b, 0x3655, 0x5b54, 0x315a,
+  0x5b55, 0x5b56, 0x3a3e, 0x4840, 0x4a3f, 0x4849, 0x5733, 0x4979,
+  0x3f47, 0x3a78, 0x523c, 0x623a, 0x3426, 0x3138, 0x3834, 0x4f44,
+  0x5967, 0x4f26, 0x4d62, 0x596d, 0x3660, 0x5239, 0x393b, 0x6239,
+  0x6237, 0x3473, 0x4c6c, 0x4c2b, 0x3772, 0x5832, 0x516b, 0x3a3b,
+  0x4a27, 0x4d37, 0x5244, 0x3f64, 0x3c50, 0x3661, 0x5e45, 0x5e46,
+  0x5b3c, 0x5159, 0x4666, 0x444e, 0x376e, 0x375c, 0x3f7c, 0x5760,
+  0x4675, 0x313c, 0x5e48, 0x3d31, 0x4c57, 0x5e4a, 0x5e49, 0x356c,
+  0x495d, 0x3042, 0x452e, 0x452b, 0x444c, 0x3c69, 0x4b7d, 0x3a43,
+  0x6579, 0x4867, 0x657a, 0x4d7d, 0x5731, 0x383e, 0x4268, 0x4851,
+  0x657b, 0x364a, 0x3c4b, 0x517d, 0x6621, 0x436e, 0x6624, 0x657e,
+  0x6625, 0x4d57, 0x3741, 0x657c, 0x657d, 0x6623, 0x445d, 0x6628,
+  0x6627, 0x4343, 0x465e, 0x662a, 0x4437, 0x6622, 0x4a3c, 0x3d63,
+  0x3943, 0x6626, 0x5055, 0x4e2f, 0x6629, 0x6630, 0x5226, 0x3d2a,
+  0x662d, 0x662f, 0x4051, 0x524c, 0x3c27, 0x6631, 0x5276, 0x574b,
+  0x4d7e, 0x4d5e, 0x4226, 0x662b, 0x662c, 0x3d3f, 0x662e, 0x6633,
+  0x6632, 0x6636, 0x6638, 0x446f, 0x4448, 0x3e6a, 0x496f, 0x6637,
+  0x3670, 0x4364, 0x5369, 0x6634, 0x6635, 0x4822, 0x663d, 0x6639,
+  0x4645, 0x4d71, 0x663b, 0x663c, 0x3b69, 0x663e, 0x663a, 0x4037,
+  0x5324, 0x663f, 0x4974, 0x6643, 0x6644, 0x5076, 0x433d, 0x4344,
+  0x6642, 0x6641, 0x6647, 0x4f31, 0x6b74, 0x664a, 0x6645, 0x3c5e,
+  0x4929, 0x3c35, 0x4f53, 0x6648, 0x6649, 0x664e, 0x6650, 0x6651,
+  0x664b, 0x3555, 0x664c, 0x664f, 0x445b, 0x6646, 0x664d, 0x6652,
+  0x6654, 0x6653, 0x6655, 0x5978, 0x6656, 0x6657, 0x5753, 0x665d,
+  0x665e, 0x3f57, 0x5450, 0x5756, 0x3466, 0x4b6f, 0x665a, 0x5843,
+  0x574e, 0x5022, 0x434f, 0x665f, 0x3c3e, 0x3942, 0x665b, 0x5127,
+  0x3a22, 0x424f, 0x582b, 0x4a6b, 0x656e, 0x665c, 0x3775, 0x4866,
+  0x4475, 0x6532, 0x447e, 0x4b7c, 0x6533, 0x552c, 0x536e, 0x4a58,
+  0x3032, 0x4b4e, 0x4d6a, 0x3a6a, 0x6535, 0x6534, 0x575a, 0x3959,
+  0x5666, 0x3628, 0x4d70, 0x524b, 0x3126, 0x4a35, 0x3368, 0x4973,
+  0x3f4d, 0x507b, 0x4a52, 0x6536, 0x3b42, 0x4f5c, 0x392c, 0x5457,
+  0x3a26, 0x5167, 0x4f7c, 0x3c52, 0x6537, 0x485d, 0x3f6d, 0x3176,
+  0x4b5e, 0x3c45, 0x3c44, 0x527a, 0x435c, 0x3f5c, 0x383b, 0x4342,
+  0x3a2e, 0x5422, 0x475e, 0x442f, 0x326c, 0x3951, 0x653b, 0x4148,
+  0x552f, 0x653c, 0x653e, 0x3467, 0x3654, 0x4b42, 0x5130, 0x353c,
+  0x4a59, 0x3762, 0x4964, 0x3d2b, 0x4e3e, 0x5770, 0x5021, 0x4959,
+  0x367b, 0x6658, 0x3c62, 0x333e, 0x4950, 0x6659, 0x3322, 0x5e4c,
+  0x5348, 0x5e4d, 0x5222, 0x5e4e, 0x3e4d, 0x5e4f, 0x4a2c, 0x527c,
+  0x335f, 0x656a, 0x4461, 0x3e21, 0x4e32, 0x4472, 0x3e56, 0x4628,
+  0x3263, 0x3e53, 0x477c, 0x4c6b, 0x3d6c, 0x4e5d, 0x4a3a, 0x4641,
+  0x656c, 0x503c, 0x5539, 0x656d, 0x4a74, 0x4d40, 0x4245, 0x656f,
+  0x4244, 0x6570, 0x6578, 0x4d4d, 0x493d, 0x5259, 0x6128, 0x536c,
+  0x4b6a, 0x4671, 0x612c, 0x6127, 0x6129, 0x612a, 0x612f, 0x326d,
+  0x612b, 0x385a, 0x612d, 0x612e, 0x6130, 0x353a, 0x6131, 0x6133,
+  0x6138, 0x5152, 0x6136, 0x6135, 0x416b, 0x6137, 0x5440, 0x6132,
+  0x613a, 0x3036, 0x6134, 0x3f79, 0x6139, 0x613b, 0x613e, 0x613c,
+  0x5645, 0x4f3f, 0x613d, 0x613f, 0x424d, 0x366b, 0x5378, 0x474d,
+  0x3765, 0x3e7e, 0x6140, 0x6141, 0x6147, 0x3367, 0x4669, 0x345e,
+  0x5142, 0x6148, 0x6146, 0x6145, 0x6143, 0x6142, 0x3140, 0x5538,
+  0x6144, 0x614b, 0x614c, 0x614a, 0x6f7a, 0x6153, 0x6152, 0x4736,
+  0x6149, 0x614e, 0x6150, 0x6154, 0x6151, 0x614d, 0x614f, 0x6155,
+  0x6156, 0x6157, 0x6158, 0x615a, 0x615b, 0x4e21, 0x675d, 0x3428,
+  0x565d, 0x5132, 0x3332, 0x3924, 0x5773, 0x4749, 0x3e5e, 0x392e,
+  0x4e57, 0x326e, 0x5b4f, 0x3c3a, 0x5251, 0x4b48, 0x304d, 0x4f6f,
+  0x5963, 0x3d6d, 0x3152, 0x4a50, 0x323c, 0x4b27, 0x372b, 0x4a26,
+  0x4f23, 0x6078, 0x554a, 0x607b, 0x607a, 0x4541, 0x4c7b, 0x4131,
+  0x6079, 0x5663, 0x322f, 0x5644, 0x355b, 0x3478, 0x5621, 0x4f2f,
+  0x306f, 0x607c, 0x6121, 0x3323, 0x607d, 0x607e, 0x4331, 0x435d,
+  0x6122, 0x3779, 0x3b4f, 0x6123, 0x443b, 0x6124, 0x6125, 0x6126,
+  0x3431, 0x3849, 0x463d, 0x446a, 0x3222, 0x5052, 0x675b, 0x3b43,
+  0x5357, 0x5344, 0x3963, 0x624f, 0x572f, 0x476c, 0x3153, 0x3432,
+  0x6251, 0x5072, 0x422e, 0x6250, 0x3f62, 0x5326, 0x3557, 0x6252,
+  0x356a, 0x436d, 0x387d, 0x382e, 0x4553, 0x374f, 0x6254, 0x6253,
+  0x3648, 0x5779, 0x4d25, 0x6258, 0x6256, 0x4a7c, 0x3f35, 0x5339,
+  0x6255, 0x6257, 0x412e, 0x4048, 0x625b, 0x625a, 0x402a, 0x414e,
+  0x625c, 0x625d, 0x625e, 0x5b48, 0x5153, 0x4d22, 0x3d28, 0x5e43,
+  0x5825, 0x3f2a, 0x5b4d, 0x526c, 0x467a, 0x452a, 0x5e44, 0x3157,
+  0x5f2e, 0x4a3d, 0x5f31, 0x392d, 0x527d, 0x3825, 0x3a6b, 0x335a,
+  0x355c, 0x5545, 0x4356, 0x4f52, 0x3b21, 0x6573, 0x6572, 0x6574,
+  0x4d64, 0x4875, 0x352f, 0x473f, 0x6576, 0x6c30, 0x6566, 0x3969,
+  0x3531, 0x423c, 0x6568, 0x6567, 0x6569, 0x524d, 0x616a, 0x504e,
+  0x4d2e, 0x5165, 0x324a, 0x316b, 0x3172, 0x456d, 0x5543, 0x5330,
+  0x615c, 0x615d, 0x525b, 0x3339, 0x314b, 0x4d79, 0x5577, 0x615e,
+  0x3e36, 0x347d, 0x615f, 0x3a5c, 0x6160, 0x3b32, 0x4249, 0x6161,
+  0x506c, 0x4d3d, 0x6162, 0x3543, 0x4547, 0x6163, 0x6164, 0x5379,
+  0x6165, 0x512d, 0x6166, 0x4e22, 0x6167, 0x3542, 0x6168, 0x3b55,
+  0x5044, 0x6260, 0x3158, 0x5264, 0x6261, 0x3c49, 0x484c, 0x6263,
+  0x6c7e, 0x6c7d, 0x5f2f, 0x6262, 0x563e, 0x4d7c, 0x4326, 0x6343,
+  0x5652, 0x6267, 0x6268, 0x5347, 0x626c, 0x3f6c, 0x626d, 0x6265,
+  0x3340, 0x446e, 0x626e, 0x5043, 0x3a76, 0x6269, 0x375e, 0x3b33,
+  0x4c2c, 0x4b4b, 0x6264, 0x6266, 0x626a, 0x626b, 0x6277, 0x6274,
+  0x5475, 0x6273, 0x452d, 0x557a, 0x4542, 0x3240, 0x626f, 0x6272,
+  0x412f, 0x4b3c, 0x3521, 0x6279, 0x3c31, 0x6271, 0x5054, 0x5439,
+  0x6275, 0x3956, 0x6276, 0x4753, 0x6270, 0x575c, 0x6d21, 0x6278,
+  0x6d25, 0x627e, 0x4a51, 0x4135, 0x3b50, 0x3f56, 0x3a63, 0x4b21,
+  0x6d26, 0x6d23, 0x6d22, 0x3b56, 0x6d27, 0x5074, 0x6d24, 0x3a5e,
+  0x3677, 0x6321, 0x3632, 0x4c71, 0x3927, 0x4f22, 0x4721, 0x3f52,
+  0x3671, 0x627a, 0x627b, 0x627d, 0x627c, 0x4455, 0x6322, 0x5341,
+  0x6327, 0x4744, 0x4f24, 0x6329, 0x3a37, 0x6328, 0x3b5a, 0x6323,
+  0x6324, 0x632a, 0x6326, 0x4e72, 0x5346, 0x3b3c, 0x5443, 0x447a,
+  0x6d28, 0x507c, 0x6325, 0x4375, 0x632d, 0x312f, 0x6332, 0x3c42,
+  0x632c, 0x353f, 0x4769, 0x6330, 0x3e2a, 0x4d6f, 0x3b73, 0x4c68,
+  0x632f, 0x6331, 0x4f27, 0x632e, 0x4e29, 0x3b5d, 0x356b, 0x3e65,
+  0x3252, 0x334d, 0x3139, 0x632b, 0x3251, 0x352c, 0x395f, 0x3668,
+  0x4f6b, 0x6337, 0x3b4c, 0x4847, 0x504a, 0x6338, 0x336e, 0x6d29,
+  0x537a, 0x5364, 0x6d2a, 0x6339, 0x5262, 0x6335, 0x535e, 0x3850,
+  0x6333, 0x6336, 0x375f, 0x6334, 0x4022, 0x633a, 0x5438, 0x3448,
+  0x633b, 0x3b45, 0x4977, 0x4965, 0x443d, 0x6d2b, 0x427d, 0x3b5b,
+  0x3f2e, 0x4e3f, 0x633c, 0x3f36, 0x316f, 0x5477, 0x633e, 0x6d2d,
+  0x633f, 0x3a29, 0x6d2c, 0x633d, 0x6340, 0x3a36, 0x362e, 0x5038,
+  0x3043, 0x6d2e, 0x6d2f, 0x4041, 0x6341, 0x4533, 0x6342, 0x5c32,
+  0x6d30, 0x386a, 0x4e6c, 0x6a27, 0x5067, 0x4a79, 0x4856, 0x4f37,
+  0x3349, 0x4e52, 0x3d64, 0x635e, 0x3b72, 0x6a28, 0x553d, 0x465d,
+  0x6a29, 0x6a2a, 0x6a2c, 0x6a2b, 0x6a2e, 0x6a2d, 0x3d58, 0x6a2f,
+  0x423e, 0x3441, 0x3477, 0x3b27, 0x6c66, 0x6c65, 0x373f, 0x4b79,
+  0x3162, 0x6c67, 0x4948, 0x6c68, 0x6c69, 0x4a56, 0x5e50, 0x3245,
+  0x547a, 0x464b, 0x3047, 0x3472, 0x4853, 0x4d50, 0x3f38, 0x3f5b,
+  0x4724, 0x5634, 0x4029, 0x5e51, 0x4928, 0x516f, 0x4524, 0x3067,
+  0x3336, 0x4845, 0x3062, 0x3776, 0x457a, 0x3673, 0x5552, 0x3350,
+  0x3c3c, 0x332d, 0x3e71, 0x3051, 0x5256, 0x4a63, 0x5725, 0x4d36,
+  0x3636, 0x3f39, 0x555b, 0x3827, 0x4557, 0x5e52, 0x3f59, 0x4255,
+  0x4740, 0x3b24, 0x3128, 0x456a, 0x457b, 0x4c27, 0x3127, 0x3556,
+  0x4428, 0x5e53, 0x513a, 0x3369, 0x4372, 0x3777, 0x5674, 0x3523,
+  0x3270, 0x4434, 0x4469, 0x402d, 0x5e54, 0x3068, 0x4544, 0x4160,
+  0x3955, 0x3e5c, 0x4d58, 0x304e, 0x4d4f, 0x5e56, 0x3e50, 0x573e,
+  0x5e55, 0x5550, 0x305d, 0x4462, 0x4223, 0x3c70, 0x5335, 0x4039,
+  0x4521, 0x3226, 0x5471, 0x4028, 0x4a43, 0x5e57, 0x557c, 0x3930,
+  0x482d, 0x4b29, 0x5e59, 0x3f3d, 0x4634, 0x5727, 0x4a30, 0x4443,
+  0x3356, 0x3952, 0x5638, 0x6a7c, 0x3034, 0x3f66, 0x4c74, 0x4d5a,
+  0x563f, 0x424e, 0x4e4e, 0x4c22, 0x502e, 0x4453, 0x3532, 0x5e58,
+  0x5575, 0x3c37, 0x3b53, 0x3024, 0x4532, 0x346c, 0x5571, 0x6a7d,
+  0x5e5a, 0x4d26, 0x4d6c, 0x4e66, 0x5e5c, 0x4d31, 0x4026, 0x573d,
+  0x5e5b, 0x3046, 0x3a34, 0x4953, 0x4473, 0x3e68, 0x3236, 0x404c,
+  0x4b70, 0x3c71, 0x3b3b, 0x3537, 0x4575, 0x5e66, 0x5e63, 0x3e5d,
+  0x5e5f, 0x3437, 0x3d5d, 0x5e60, 0x446d, 0x4f46, 0x3560, 0x365e,
+  0x4a5a, 0x3574, 0x5e65, 0x5546, 0x5e61, 0x4c4d, 0x467e, 0x4545,
+  0x5234, 0x3e72, 0x4253, 0x4c3d, 0x3338, 0x3d53, 0x3f58, 0x4d46,
+  0x515a, 0x346b, 0x5e64, 0x5e5d, 0x5e67, 0x6a7e, 0x4230, 0x5e62,
+  0x5640, 0x3527, 0x3274, 0x5e68, 0x5e72, 0x5e6d, 0x5e71, 0x4860,
+  0x5761, 0x5e6f, 0x4368, 0x4c61, 0x3265, 0x523e, 0x5e6e, 0x5e6b,
+  0x4e55, 0x3427, 0x3f2b, 0x3e3e, 0x3d52, 0x5e69, 0x542e, 0x5e5e,
+  0x5e6a, 0x403f, 0x5e6c, 0x3273, 0x3869, 0x4227, 0x3d41, 0x5e75,
+  0x5e78, 0x322b, 0x3424, 0x346a, 0x4926, 0x5e76, 0x4b51, 0x3863,
+  0x5e77, 0x5e7a, 0x5e79, 0x4c42, 0x3061, 0x346e, 0x653a, 0x502f,
+  0x326b, 0x6b21, 0x5e74, 0x4963, 0x5e73, 0x305a, 0x5221, 0x3177,
+  0x4c2f, 0x5e70, 0x4b24, 0x552a, 0x5e7b, 0x345d, 0x4426, 0x5e7d,
+  0x437e, 0x4421, 0x5f21, 0x414c, 0x5e7c, 0x3e6f, 0x4632, 0x3345,
+  0x4876, 0x4b3a, 0x5e7e, 0x5f24, 0x5732, 0x3337, 0x4143, 0x474b,
+  0x3225, 0x3469, 0x572b, 0x446c, 0x5f22, 0x5f23, 0x5f25, 0x3a33,
+  0x5f26, 0x405e, 0x4943, 0x3259, 0x4766, 0x5f27, 0x475c, 0x5f28,
+  0x6b22, 0x4b53, 0x5f2a, 0x5f29, 0x3241, 0x454a, 0x5f2b, 0x545c,
+  0x4841, 0x5f2c, 0x3e70, 0x5f2d, 0x5627, 0x6a37, 0x6b36, 0x4a55,
+  0x587c, 0x3844, 0x3925, 0x3745, 0x557e, 0x394a, 0x5027, 0x744d,
+  0x3550, 0x4374, 0x3e48, 0x6b37, 0x303d, 0x3d4c, 0x4132, 0x3156,
+  0x3328, 0x3852, 0x4922, 0x3658, 0x6b38, 0x3e34, 0x4a7d, 0x4743,
+  0x557b, 0x3773, 0x4e44, 0x552b, 0x3173, 0x6c33, 0x305f, 0x6c35,
+  0x3637, 0x414f, 0x757a, 0x5031, 0x5565, 0x4e53, 0x3d6f, 0x3362,
+  0x382b, 0x5536, 0x6d3d, 0x364f, 0x4b39, 0x5042, 0x373d, 0x6c36,
+  0x4a29, 0x4554, 0x6c39, 0x6c38, 0x4243, 0x6c37, 0x507d, 0x6c3a,
+  0x6c3b, 0x5765, 0x6c3c, 0x6c3d, 0x466c, 0x4e5e, 0x3c48, 0x4855,
+  0x3529, 0x3e49, 0x563c, 0x5467, 0x512e, 0x5071, 0x6a38, 0x6a39,
+  0x6a3a, 0x3a35, 0x4a31, 0x3f75, 0x4d7a, 0x6a40, 0x303a, 0x6a3e,
+  0x4025, 0x6a3b, 0x327d, 0x4377, 0x3b68, 0x5257, 0x4e74, 0x6a3f,
+  0x6a3c, 0x6a43, 0x5047, 0x5333, 0x343a, 0x4341, 0x5772, 0x5551,
+  0x4a47, 0x6a45, 0x6a44, 0x6a47, 0x6a46, 0x5667, 0x4f54, 0x6a4b,
+  0x3b4e, 0x3d7a, 0x494e, 0x6a4c, 0x4939, 0x4f7e, 0x6a4a, 0x544e,
+  0x6a4d, 0x6a4f, 0x4d6d, 0x6a49, 0x6a4e, 0x4e6e, 0x3b5e, 0x333f,
+  0x4655, 0x3e30, 0x4e7a, 0x4767, 0x3e27, 0x6a50, 0x5647, 0x4140,
+  0x545d, 0x6a51, 0x4f3e, 0x6a52, 0x4a6e, 0x452f, 0x3035, 0x6a54,
+  0x6a53, 0x745f, 0x443a, 0x3129, 0x655f, 0x6a55, 0x4a6f, 0x6a56,
+  0x6a57, 0x4658, 0x6a58, 0x6a59, 0x543b, 0x477a, 0x5237, 0x387c,
+  0x6a42, 0x325c, 0x427c, 0x5478, 0x4c66, 0x576e, 0x5442, 0x5350,
+  0x6b43, 0x4573, 0x377e, 0x6b54, 0x4b37, 0x6b5e, 0x404a, 0x4d7b,
+  0x332f, 0x465a, 0x6b7c, 0x443e, 0x4e34, 0x4429, 0x313e, 0x547d,
+  0x4a75, 0x566c, 0x4653, 0x3664, 0x3b7a, 0x5060, 0x4931, 0x5453,
+  0x4828, 0x384b, 0x683e, 0x493c, 0x683b, 0x406e, 0x5053, 0x3244,
+  0x3465, 0x683c, 0x5548, 0x3645, 0x683d, 0x4a78, 0x385c, 0x4c75,
+  0x4034, 0x516e, 0x683f, 0x6842, 0x3a3c, 0x312d, 0x3d5c, 0x6a3d,
+  0x6843, 0x6846, 0x684b, 0x684c, 0x4b49, 0x3065, 0x3c2b, 0x3939,
+  0x6841, 0x4d77, 0x684a, 0x4e76, 0x556d, 0x4156, 0x6844, 0x4336,
+  0x397b, 0x5626, 0x6848, 0x4a60, 0x5466, 0x6840, 0x6845, 0x6847,
+  0x4739, 0x3763, 0x6849, 0x3f5d, 0x6852, 0x6857, 0x6855, 0x3c5c,
+  0x3c4f, 0x685b, 0x685e, 0x685a, 0x317a, 0x3058, 0x4433, 0x384c,
+  0x4662, 0x483e, 0x4861, 0x684f, 0x6854, 0x6856, 0x3971, 0x6858,
+  0x5775, 0x447b, 0x685c, 0x3269, 0x6851, 0x3c6d, 0x3f42, 0x684d,
+  0x5679, 0x4178, 0x3271, 0x685f, 0x4a41, 0x6859, 0x5524, 0x316a,
+  0x553b, 0x684e, 0x6850, 0x3630, 0x6853, 0x685d, 0x4038, 0x4a77,
+  0x4b28, 0x465c, 0x4075, 0x6869, 0x5023, 0x6872, 0x566a, 0x6860,
+  0x6861, 0x5179, 0x3a4b, 0x3879, 0x3871, 0x5454, 0x686f, 0x686e,
+  0x686c, 0x3970, 0x4c52, 0x6866, 0x4e26, 0x3f72, 0x3038, 0x6871,
+  0x6870, 0x5740, 0x6864, 0x4d29, 0x4923, 0x3b38, 0x3d5b, 0x686a,
+  0x6862, 0x6863, 0x6865, 0x3535, 0x6867, 0x4745, 0x686b, 0x686d,
+  0x3d30, 0x572e, 0x6878, 0x6875, 0x4d30, 0x6876, 0x413a, 0x6868,
+  0x4337, 0x3070, 0x6874, 0x6877, 0x3923, 0x4952, 0x434e, 0x4e60,
+  0x4066, 0x4b73, 0x4c5d, 0x5035, 0x4a61, 0x6873, 0x3c6c, 0x6879,
+  0x435e, 0x4665, 0x3977, 0x3074, 0x5758, 0x3c2c, 0x456f, 0x4c44,
+  0x6926, 0x492d, 0x6922, 0x4062, 0x3f43, 0x687e, 0x3957, 0x687b,
+  0x6924, 0x524e, 0x6923, 0x5632, 0x5735, 0x6927, 0x3d37, 0x687c,
+  0x687d, 0x6921, 0x4d56, 0x522c, 0x6932, 0x6929, 0x342a, 0x343b,
+  0x692b, 0x5028, 0x6925, 0x337e, 0x692c, 0x4063, 0x692a, 0x6939,
+  0x6938, 0x692e, 0x687a, 0x6928, 0x3f2c, 0x6931, 0x693a, 0x4225,
+  0x692f, 0x3845, 0x692d, 0x535c, 0x6934, 0x6935, 0x6937, 0x6947,
+  0x4046, 0x6945, 0x6930, 0x693b, 0x3071, 0x693c, 0x5525, 0x693e,
+  0x693f, 0x6941, 0x4171, 0x4836, 0x693d, 0x6942, 0x6943, 0x6933,
+  0x6936, 0x3b31, 0x6940, 0x3c77, 0x6944, 0x6946, 0x694a, 0x694e,
+  0x325b, 0x6948, 0x372e, 0x694b, 0x694c, 0x5541, 0x4423, 0x6958,
+  0x3a61, 0x6949, 0x5323, 0x6954, 0x6957, 0x6950, 0x694f, 0x4741,
+  0x6952, 0x6959, 0x3348, 0x6953, 0x4f70, 0x694d, 0x3377, 0x6956,
+  0x695a, 0x4c34, 0x4f2d, 0x6955, 0x695c, 0x695b, 0x695e, 0x6951,
+  0x695d, 0x695f, 0x434a, 0x4737, 0x344e, 0x3b36, 0x5040, 0x6c23,
+  0x4537, 0x537b, 0x6c24, 0x6c25, 0x465b, 0x3f6e, 0x6c26, 0x6c27,
+  0x502a, 0x4738, 0x3868, 0x6c28, 0x5639, 0x557d, 0x344b, 0x323d,
+  0x4e64, 0x4667, 0x4d61, 0x3475, 0x4b40, 0x3c5f, 0x6962, 0x6963,
+  0x516a, 0x6965, 0x3479, 0x6964, 0x5133, 0x4a62, 0x3250, 0x6968,
+  0x6966, 0x6967, 0x5633, 0x6969, 0x696a, 0x696b, 0x696c, 0x6c2f,
+  0x4539, 0x364e, 0x5273, 0x356e, 0x3b59, 0x6c31, 0x5263, 0x4e63,
+  0x4438, 0x433f, 0x363e, 0x5839, 0x3148, 0x314f, 0x3151, 0x457e,
+  0x3150, 0x432b, 0x5531, 0x6b24, 0x3a41, 0x4c3a, 0x6b25, 0x6b27,
+  0x6b28, 0x6b26, 0x6b29, 0x6b2b, 0x6b2a, 0x6b2c, 0x4a4f, 0x5835,
+  0x4371, 0x4325, 0x4678, 0x6b2d, 0x444a, 0x6b2e, 0x6b2f, 0x6b30,
+  0x3755, 0x377a, 0x6b31, 0x4762, 0x6b33, 0x3a24, 0x5175, 0x3031,
+  0x6b32, 0x6b34, 0x352a, 0x4248, 0x4768, 0x6b35, 0x4b2e, 0x635f,
+  0x5340, 0x595b, 0x4d21, 0x562d, 0x4773, 0x5960, 0x3b63, 0x3a3a,
+  0x6362, 0x4f2b, 0x6360, 0x4947, 0x3a39, 0x5134, 0x6361, 0x486a,
+  0x392f, 0x3d2d, 0x3358, 0x4e5b, 0x4c40, 0x6368, 0x6369, 0x4d74,
+  0x4c2d, 0x3c33, 0x636a, 0x636b, 0x505a, 0x467b, 0x375a, 0x475f,
+  0x524a, 0x4e56, 0x6364, 0x636c, 0x4972, 0x3341, 0x6367, 0x4663,
+  0x6365, 0x6d33, 0x6366, 0x4933, 0x4566, 0x3935, 0x433b, 0x6363,
+  0x453d, 0x4124, 0x4259, 0x3257, 0x636d, 0x3b26, 0x442d, 0x6370,
+  0x3e5a, 0x637b, 0x6375, 0x3a53, 0x3750, 0x534d, 0x564e, 0x5553,
+  0x3941, 0x5534, 0x5158, 0x5039, 0x4776, 0x482a, 0x3234, 0x435a,
+  0x636e, 0x637c, 0x636f, 0x3728, 0x6377, 0x6374, 0x373a, 0x4522,
+  0x6376, 0x455d, 0x3228, 0x467c, 0x4460, 0x5722, 0x4061, 0x6379,
+  0x637a, 0x637d, 0x4c29, 0x6373, 0x533e, 0x3143, 0x6d34, 0x6371,
+  0x6372, 0x6378, 0x503a, 0x4643, 0x5473, 0x637e, 0x3d60, 0x6427,
+  0x6426, 0x5173, 0x6423, 0x6429, 0x4877, 0x4f34, 0x6428, 0x642e,
+  0x4265, 0x3634, 0x3d72, 0x6422, 0x3a69, 0x642a, 0x642c, 0x367d,
+  0x565e, 0x6432, 0x642d, 0x6421, 0x3b6e, 0x4d5d, 0x4722, 0x4549,
+  0x4177, 0x6424, 0x4733, 0x3d2c, 0x3d3d, 0x6425, 0x5747, 0x3262,
+  0x642b, 0x3c43, 0x642f, 0x3b6b, 0x6430, 0x4528, 0x6431, 0x5563,
+  0x3f23, 0x643a, 0x6437, 0x643b, 0x643d, 0x4656, 0x3a46, 0x404b,
+  0x3821, 0x6434, 0x5421, 0x3a23, 0x3d7e, 0x643c, 0x4d3f, 0x4479,
+  0x4f7b, 0x4966, 0x533f, 0x4f51, 0x6433, 0x6438, 0x6439, 0x4c69,
+  0x4c4e, 0x4054, 0x6435, 0x4130, 0x6436, 0x4e50, 0x3b41, 0x3553,
+  0x4873, 0x3d27, 0x5547, 0x492c, 0x3822, 0x644a, 0x644c, 0x5144,
+  0x523a, 0x3a2d, 0x3a54, 0x6443, 0x356d, 0x574d, 0x6440, 0x4f7d,
+  0x643f, 0x415c, 0x4c4a, 0x4a67, 0x4457, 0x4c54, 0x6448, 0x6447,
+  0x6441, 0x6444, 0x352d, 0x5359, 0x6446, 0x5279, 0x3463, 0x3b34,
+  0x496e, 0x343e, 0x3b6c, 0x514d, 0x4c6d, 0x6d35, 0x4765, 0x5428,
+  0x644b, 0x5755, 0x6442, 0x3d25, 0x6445, 0x5366, 0x6449, 0x4978,
+  0x643e, 0x5365, 0x477e, 0x3649, 0x547c, 0x3233, 0x6457, 0x4e42,
+  0x644d, 0x4e3c, 0x385b, 0x6456, 0x3f4a, 0x534e, 0x436c, 0x4548,
+  0x6458, 0x4d44, 0x644f, 0x6454, 0x6455, 0x3a7e, 0x4f66, 0x553f,
+  0x6452, 0x6450, 0x644e, 0x4d65, 0x4a2a, 0x4023, 0x3d26, 0x6453,
+  0x3848, 0x6467, 0x5434, 0x645b, 0x416f, 0x6469, 0x5267, 0x645f,
+  0x6460, 0x4f2a, 0x4b5d, 0x645a, 0x6451, 0x6465, 0x485c, 0x6463,
+  0x4467, 0x6462, 0x6461, 0x337c, 0x6468, 0x3561, 0x574c, 0x6466,
+  0x3b2c, 0x5752, 0x4c4f, 0x6b78, 0x6464, 0x3976, 0x564d, 0x6459,
+  0x645c, 0x427a, 0x645e, 0x424b, 0x4044, 0x4250, 0x3175, 0x4c32,
+  0x354e, 0x646f, 0x462f, 0x4661, 0x6475, 0x4229, 0x406c, 0x515d,
+  0x646e, 0x442e, 0x646d, 0x6476, 0x6474, 0x427e, 0x645d, 0x6470,
+  0x4a7e, 0x5544, 0x6471, 0x517a, 0x646b, 0x646c, 0x6472, 0x4e2b,
+  0x454b, 0x4731, 0x423a, 0x646a, 0x414a, 0x4c36, 0x3331, 0x647b,
+  0x6473, 0x647a, 0x647d, 0x647c, 0x334e, 0x333a, 0x6477, 0x6479,
+  0x6478, 0x456c, 0x403d, 0x5468, 0x6522, 0x3044, 0x6524, 0x6523,
+  0x3c24, 0x6525, 0x6521, 0x647e, 0x3174, 0x6528, 0x6529, 0x6526,
+  0x6527, 0x652a, 0x4659, 0x652b, 0x652d, 0x652c, 0x652f, 0x652e,
+  0x3960, 0x6530, 0x6531, 0x3b70, 0x6c61, 0x4370, 0x3546, 0x3b52,
+  0x4169, 0x546e, 0x3e44, 0x5746, 0x5456, 0x3253, 0x6c3e, 0x6a41,
+  0x422f, 0x3436, 0x5157, 0x3334, 0x4832, 0x3f3b, 0x6c40, 0x564b,
+  0x6c3f, 0x6c41, 0x6c45, 0x3e66, 0x4c3f, 0x455a, 0x3e3c, 0x6c46,
+  0x317e, 0x6c44, 0x5528, 0x3563, 0x6c42, 0x4136, 0x3363, 0x6c43,
+  0x4b38, 0x4043, 0x4c7e, 0x4152, 0x6c48, 0x3a66, 0x4053, 0x5672,
+  0x514c, 0x3f3e, 0x3733, 0x4955, 0x6c47, 0x3b62, 0x4c4c, 0x3d7d,
+  0x4848, 0x4f29, 0x4d69, 0x456b, 0x3769, 0x5149, 0x3a38, 0x6c49,
+  0x6c4a, 0x3b40, 0x6c4b, 0x6c62, 0x313a, 0x3759, 0x3d39, 0x6c4c,
+  0x5166, 0x6c4d, 0x483b, 0x6c51, 0x6c53, 0x3b4d, 0x3c65, 0x6c4f,
+  0x4937, 0x433a, 0x6c63, 0x5555, 0x6c50, 0x5673, 0x6c52, 0x6c4e,
+  0x6c54, 0x6c55, 0x493f, 0x4f28, 0x505c, 0x512c, 0x485b, 0x6c56,
+  0x4e75, 0x4a6c, 0x6c5a, 0x6c59, 0x303e, 0x6c57, 0x6c58, 0x6c64,
+  0x483c, 0x4147, 0x6c5c, 0x5160, 0x6c5b, 0x546f, 0x6c5d, 0x5b46,
+  0x6c5e, 0x312c, 0x6c5f, 0x6c60, 0x5726, 0x4540, 0x6b3c, 0x302e,
+  0x3e74, 0x3838, 0x522f, 0x3056, 0x3579, 0x5833, 0x4b2c, 0x635d,
+  0x462c, 0x3066, 0x4546, 0x6b39, 0x6b3a, 0x6b3b, 0x5140, 0x4523,
+  0x6a72, 0x4432, 0x4435, 0x404e, 0x6a73, 0x4441, 0x4e6f, 0x6a70,
+  0x6a74, 0x497c, 0x4723, 0x4c58, 0x4e7e, 0x6a75, 0x6a76, 0x4f2c,
+  0x4067, 0x6a77, 0x363f, 0x6a78, 0x6a79, 0x6a7a, 0x6a7b, 0x6a71,
+  0x482e, 0x616b, 0x3738, 0x616c, 0x616d, 0x5734, 0x616e, 0x616f,
+  0x534c, 0x6171, 0x3f71, 0x6170, 0x3552, 0x3137, 0x6173, 0x6172,
+  0x3a7c, 0x6174, 0x3937, 0x3e51, 0x447c, 0x3a5d, 0x3d46, 0x6175,
+  0x6177, 0x3640, 0x4f41, 0x4a28, 0x6176, 0x5578, 0x537c, 0x6178,
+  0x617c, 0x6179, 0x617a, 0x406a, 0x617e, 0x6221, 0x4047, 0x617b,
+  0x617d, 0x6225, 0x4154, 0x6223, 0x6228, 0x327e, 0x6222, 0x434d,
+  0x3242, 0x6227, 0x6226, 0x6224, 0x6229, 0x622b, 0x5049, 0x566d,
+  0x4328, 0x622c, 0x4f57, 0x622e, 0x3a6f, 0x6960, 0x622d, 0x622a,
+  0x3b2b, 0x5433, 0x6230, 0x622f, 0x6961, 0x6231, 0x6232, 0x6233,
+  0x4c21, 0x6234, 0x6235, 0x507e, 0x424a, 0x5371, 0x4d75, 0x6760,
+  0x6761, 0x3e41, 0x426a, 0x6764, 0x6763, 0x4d66, 0x4335, 0x6762,
+  0x3b37, 0x4f56, 0x4161, 0x6769, 0x6768, 0x6774, 0x3223, 0x676a,
+  0x6766, 0x676c, 0x676b, 0x493a, 0x5564, 0x6765, 0x3729, 0x6767,
+  0x676e, 0x6773, 0x5669, 0x676d, 0x6772, 0x6771, 0x3060, 0x6775,
+  0x4772, 0x4045, 0x406d, 0x4170, 0x6770, 0x6776, 0x4b76, 0x6822,
+  0x6821, 0x5741, 0x677a, 0x6779, 0x677b, 0x6777, 0x677e, 0x677d,
+  0x677c, 0x4155, 0x4759, 0x457d, 0x4543, 0x476d, 0x6823, 0x6826,
+  0x6825, 0x6827, 0x3a77, 0x6778, 0x6824, 0x4870, 0x492a, 0x6829,
+  0x3965, 0x517e, 0x6828, 0x682a, 0x682d, 0x682e, 0x4127, 0x682f,
+  0x6830, 0x682c, 0x6834, 0x682b, 0x6831, 0x6835, 0x6832, 0x6833,
+  0x6837, 0x6836, 0x394f, 0x702c, 0x702d, 0x4630, 0x306a, 0x483f,
+  0x4d5f, 0x4e4d, 0x6a31, 0x6a32, 0x463f, 0x3449, 0x6a33, 0x5567,
+  0x5d79, 0x6a34, 0x6a35, 0x6a36, 0x384a, 0x5f30, 0x4975, 0x4c70,
+  0x497a, 0x497b, 0x5343, 0x4b26, 0x3826, 0x702e, 0x3142, 0x6538,
+  0x4c6f, 0x5349, 0x3c57, 0x496a, 0x3567, 0x4450, 0x3569, 0x6e2e,
+  0x3b2d, 0x675e, 0x6e2f, 0x3329, 0x6e32, 0x6e31, 0x3d67, 0x6e30,
+  0x4e37, 0x454f, 0x4174, 0x5b4e, 0x6e33, 0x5073, 0x4254, 0x4668,
+  0x372c, 0x6e34, 0x336b, 0x3b7b, 0x6e35, 0x675c, 0x6e36, 0x3d2e,
+  0x7162, 0x4a68, 0x5249, 0x705a, 0x705b, 0x705c, 0x4146, 0x386d,
+  0x3e4e, 0x705e, 0x4531, 0x705d, 0x5171, 0x7060, 0x304c, 0x3d6a,
+  0x525f, 0x705f, 0x342f, 0x3768, 0x7066, 0x7065, 0x4623, 0x7061,
+  0x7062, 0x3443, 0x7063, 0x556e, 0x4c5b, 0x3e52, 0x3c32, 0x7068,
+  0x7067, 0x7064, 0x3221, 0x5622, 0x5338, 0x3e37, 0x482c, 0x706a,
+  0x5177, 0x564c, 0x3a5b, 0x7069, 0x363b, 0x4d34, 0x4626, 0x4121,
+  0x706b, 0x706e, 0x706d, 0x7070, 0x706c, 0x3b3e, 0x706f, 0x4c35,
+  0x7072, 0x3355, 0x3154, 0x7073, 0x7074, 0x7076, 0x3461, 0x7071,
+  0x7077, 0x707a, 0x7078, 0x7075, 0x707d, 0x7079, 0x707c, 0x707e,
+  0x7121, 0x4e41, 0x7124, 0x7123, 0x4176, 0x707b, 0x4a5d, 0x3471,
+  0x3171, 0x4c31, 0x7126, 0x7127, 0x712c, 0x554e, 0x7129, 0x4833,
+  0x7122, 0x712b, 0x7128, 0x7125, 0x712a, 0x3029, 0x712d, 0x712f,
+  0x7131, 0x7130, 0x712e, 0x5122, 0x7132, 0x7133, 0x396f, 0x3547,
+  0x3057, 0x3059, 0x546d, 0x3544, 0x3d54, 0x3b4a, 0x7027, 0x385e,
+  0x7028, 0x3028, 0x7029, 0x4d6e, 0x702a, 0x702b, 0x4624, 0x5665,
+  0x7164, 0x7165, 0x4373, 0x535b, 0x5651, 0x4568, 0x532f, 0x5266,
+  0x6e41, 0x303b, 0x5535, 0x514e, 0x3c60, 0x3a50, 0x3f78, 0x3847,
+  0x3541, 0x454c, 0x4a22, 0x434b, 0x6e42, 0x443f, 0x3622, 0x6d6c,
+  0x4324, 0x5631, 0x4f60, 0x6d6f, 0x454e, 0x365c, 0x4a21, 0x6d6d,
+  0x6d70, 0x6d71, 0x433c, 0x3f34, 0x6d6e, 0x6d74, 0x6d72, 0x5566,
+  0x435f, 0x6d73, 0x6d76, 0x5523, 0x5123, 0x6d75, 0x4350, 0x6d77,
+  0x3f74, 0x3e6c, 0x6d78, 0x4c77, 0x515b, 0x5745, 0x5576, 0x6d7c,
+  0x6d7b, 0x6d79, 0x6d7a, 0x6d7d, 0x3e26, 0x4b2f, 0x6e21, 0x363d,
+  0x6e22, 0x4440, 0x6d7e, 0x3d5e, 0x3247, 0x3643, 0x6e25, 0x583a,
+  0x6e23, 0x6e26, 0x4369, 0x3372, 0x6e27, 0x6e24, 0x4f39, 0x6e28,
+  0x4277, 0x6e29, 0x6e2a, 0x5e2b, 0x4633, 0x4746, 0x5675, 0x3549,
+  0x4b32, 0x6e2b, 0x4d2b, 0x6e2c, 0x5530, 0x6e2d, 0x7644, 0x5b47,
+  0x3423, 0x432c, 0x7166, 0x4a38, 0x5253, 0x562a, 0x6f72, 0x3e58,
+  0x3d43, 0x6f73, 0x364c, 0x302b, 0x4a2f, 0x6d36, 0x6d37, 0x4e79,
+  0x372f, 0x3f73, 0x6d38, 0x426b, 0x4930, 0x6d39, 0x4676, 0x3f33,
+  0x6d3c, 0x4578, 0x5150, 0x5729, 0x6d3a, 0x6d3b, 0x5162, 0x6d3f,
+  0x6d40, 0x6d44, 0x6d48, 0x6d46, 0x6d4e, 0x5568, 0x6d49, 0x6d47,
+  0x6d3e, 0x4569, 0x4646, 0x4969, 0x5452, 0x6d41, 0x6d42, 0x6d43,
+  0x6d45, 0x4079, 0x3421, 0x3968, 0x6d50, 0x6d51, 0x6d4a, 0x6d4f,
+  0x4e78, 0x4b36, 0x6d4c, 0x6d4d, 0x4f75, 0x6d52, 0x4172, 0x5332,
+  0x6d4b, 0x4837, 0x3c6f, 0x4570, 0x6d56, 0x356f, 0x4235, 0x302d,
+  0x4b69, 0x312e, 0x6d54, 0x4d6b, 0x3562, 0x6d55, 0x6d53, 0x6d57,
+  0x357a, 0x6d58, 0x6d59, 0x6d5c, 0x314c, 0x4576, 0x3c6e, 0x6d5a,
+  0x4c3c, 0x326a, 0x6d5b, 0x446b, 0x3445, 0x3075, 0x6d5f, 0x405a,
+  0x3468, 0x454d, 0x6d5d, 0x3f44, 0x6d5e, 0x4425, 0x6d60, 0x6d61,
+  0x6d63, 0x4157, 0x3b47, 0x3d38, 0x6d62, 0x6d64, 0x6d66, 0x6d65,
+  0x6d67, 0x4a3e, 0x6c6a, 0x4071, 0x4967, 0x6c6b, 0x466e, 0x6c6c,
+  0x466d, 0x6c6d, 0x6c70, 0x5766, 0x6c73, 0x6c71, 0x6c6e, 0x6c6f,
+  0x5723, 0x4971, 0x4b6e, 0x6c74, 0x6c72, 0x4f69, 0x6c76, 0x4631,
+  0x3c40, 0x6c75, 0x353b, 0x3b76, 0x6c77, 0x5977, 0x3d7b, 0x423b,
+  0x6c78, 0x6c79, 0x3823, 0x6c7a, 0x6c7b, 0x6c7c, 0x536d, 0x582e,
+  0x406b, 0x475d, 0x3a4c, 0x5063, 0x4b3d, 0x4d3a, 0x3851, 0x317c,
+  0x476f, 0x5656, 0x3f46, 0x436b, 0x6f75, 0x4358, 0x5762, 0x6f77,
+  0x3353, 0x4758, 0x516d, 0x5648, 0x6f78, 0x6f76, 0x3b7d, 0x3346,
+  0x3d55, 0x5246, 0x3b60, 0x4f21, 0x6f7c, 0x6f7b, 0x6f79, 0x334c,
+  0x4954, 0x4b30, 0x6f7e, 0x305e, 0x5649, 0x6f7d, 0x336d, 0x7655,
+  0x4e48, 0x7022, 0x7021, 0x353e, 0x3c5a, 0x3b7c, 0x3865, 0x4442,
+  0x7023, 0x4b6b, 0x7026, 0x5128, 0x3e3f, 0x476e, 0x7136, 0x7137,
+  0x3f55, 0x3429, 0x7138, 0x4d3b, 0x4754, 0x552d, 0x7139, 0x713a,
+  0x474f, 0x5224, 0x564f, 0x713b, 0x3d51, 0x3430, 0x3e3d, 0x345c,
+  0x4e51, 0x3f5f, 0x713d, 0x3f7a, 0x713c, 0x713f, 0x713e, 0x7140,
+  0x7141, 0x417e, 0x4122, 0x4a7a, 0x553e, 0x3e3a, 0x3e39, 0x5542,
+  0x3f22, 0x4d2f, 0x7135, 0x3d5f, 0x364b, 0x5671, 0x7343, 0x7344,
+  0x384d, 0x7346, 0x7347, 0x304a, 0x7345, 0x7349, 0x4b71, 0x734b,
+  0x5026, 0x314a, 0x7348, 0x734f, 0x3551, 0x7357, 0x7352, 0x7354,
+  0x7353, 0x377b, 0x313f, 0x734e, 0x734a, 0x355a, 0x7350, 0x7351,
+  0x7355, 0x734d, 0x3c63, 0x417d, 0x7356, 0x735a, 0x734c, 0x3548,
+  0x3d6e, 0x735c, 0x3724, 0x3f70, 0x567e, 0x4d32, 0x3470, 0x325f,
+  0x7358, 0x7359, 0x4938, 0x735d, 0x735e, 0x7361, 0x735f, 0x7363,
+  0x7362, 0x735b, 0x3f6a, 0x336f, 0x7360, 0x4729, 0x3c72, 0x736b,
+  0x393f, 0x7364, 0x322d, 0x3b7e, 0x4b63, 0x736d, 0x7369, 0x395c,
+  0x736e, 0x7365, 0x7366, 0x736a, 0x4261, 0x736c, 0x736f, 0x7368,
+  0x3c7d, 0x4f64, 0x7370, 0x7367, 0x7372, 0x572d, 0x462a, 0x7373,
+  0x7371, 0x4228, 0x385d, 0x7375, 0x7374, 0x345b, 0x7376, 0x7377,
+  0x7378, 0x403a, 0x4069, 0x4571, 0x737b, 0x737a, 0x3458, 0x737e,
+  0x7379, 0x737c, 0x737d, 0x7421, 0x7423, 0x3b49, 0x7422, 0x7424,
+  0x323e, 0x7426, 0x7425, 0x3c2e, 0x4357, 0x5961, 0x4060, 0x744c,
+  0x5751, 0x375b, 0x744e, 0x4123, 0x4649, 0x3456, 0x5533, 0x7450,
+  0x744f, 0x7451, 0x4b5a, 0x7452, 0x5441, 0x5660, 0x3760, 0x4138,
+  0x413b, 0x7453, 0x3e2c, 0x3462, 0x7454, 0x7455, 0x3e2b, 0x7456,
+  0x745b, 0x7457, 0x745a, 0x3a7d, 0x7458, 0x7459, 0x3862, 0x4c47,
+  0x745c, 0x325a, 0x4353, 0x5463, 0x3f37, 0x745d, 0x4534, 0x7469,
+  0x4f35, 0x4e49, 0x4b58, 0x4b77, 0x3d74, 0x574f, 0x405b, 0x5075,
+  0x746a, 0x746b, 0x746c, 0x7763, 0x3731, 0x746d, 0x576b, 0x746e,
+  0x6679, 0x3e40, 0x667a, 0x3a6c, 0x667b, 0x4f4b, 0x667c, 0x543c,
+  0x3c36, 0x667d, 0x667e, 0x3c4d, 0x4852, 0x4e33, 0x6721, 0x343f,
+  0x6722, 0x4934, 0x3859, 0x4449, 0x575d, 0x425a, 0x3757, 0x563d,
+  0x4e46, 0x3744, 0x4526, 0x6723, 0x4f5f, 0x6724, 0x6725, 0x6726,
+  0x4137, 0x5769, 0x4970, 0x4f38, 0x562f, 0x5655, 0x6727, 0x306d,
+  0x6728, 0x6729, 0x495c, 0x526f, 0x3e2d, 0x672a, 0x3073, 0x485e,
+  0x3d61, 0x672b, 0x4846, 0x672c, 0x3b66, 0x3878, 0x5124, 0x672d,
+  0x4267, 0x3e78, 0x3d4a, 0x4d33, 0x672e, 0x672f, 0x3e6e, 0x5065,
+  0x4b67, 0x4c50, 0x3c4c, 0x6730, 0x3c28, 0x5077, 0x6731, 0x5078,
+  0x6732, 0x6733, 0x3442, 0x6734, 0x6735, 0x497e, 0x4e2c, 0x4360,
+  0x6737, 0x3141, 0x3371, 0x6738, 0x6739, 0x575b, 0x5540, 0x673a,
+  0x424c, 0x573a, 0x673b, 0x673c, 0x673d, 0x3c6a, 0x4365, 0x4042,
+  0x673e, 0x673f, 0x3c29, 0x6740, 0x6741, 0x6736, 0x3650, 0x6742,
+  0x6743, 0x6744, 0x3b3a, 0x355e, 0x4246, 0x3160, 0x6745, 0x5435,
+  0x6746, 0x383f, 0x6748, 0x6747, 0x376c, 0x6749, 0x3278, 0x674a,
+  0x674b, 0x674c, 0x674d, 0x674e, 0x674f, 0x6750, 0x5327, 0x4b75,
+  0x6751, 0x6752, 0x6753, 0x6754, 0x4949, 0x6755, 0x6756, 0x6757,
+  0x6758, 0x6759, 0x3d49, 0x675a, 0x733e, 0x3857, 0x4831, 0x733f,
+  0x7340, 0x7341, 0x395e, 0x4d78, 0x5868, 0x3a31, 0x425e, 0x6e37,
+  0x3723, 0x6e39, 0x6e38, 0x3055, 0x6e3b, 0x5556, 0x576f, 0x5643,
+  0x6e3d, 0x4a70, 0x6e3c, 0x6e3e, 0x6e40, 0x6e3f, 0x5172, 0x473c,
+  0x4340, 0x3861, 0x4167, 0x7446, 0x505f, 0x7447, 0x4f5b, 0x483a,
+  0x7448, 0x7449, 0x744a, 0x744b, 0x597a, 0x387e, 0x6571, 0x5370,
+  0x7460, 0x4e4c, 0x3361, 0x7134, 0x526e, 0x7461, 0x4f68, 0x7462,
+  0x474c, 0x3554, 0x3464, 0x7464, 0x7463, 0x7465, 0x7466, 0x7467,
+  0x3a32, 0x303f, 0x7468, 0x372d, 0x526d, 0x522b, 0x404f, 0x3f3c,
+  0x6b23, 0x555f, 0x6a48, 0x7173, 0x3678, 0x4b23, 0x444d, 0x7167,
+  0x7168, 0x387b, 0x7169, 0x3a44, 0x5445, 0x3052, 0x716a, 0x716b,
+  0x716c, 0x716d, 0x716e, 0x716f, 0x7171, 0x7170, 0x4555, 0x7172,
+  0x367a, 0x7174, 0x522e, 0x5e47, 0x4b4a, 0x335c, 0x3522, 0x3922,
+  0x4474, 0x7175, 0x7176, 0x4144, 0x417b, 0x5630, 0x7177, 0x7178,
+  0x412a, 0x4638, 0x3e5b, 0x7179, 0x344f, 0x717a, 0x6d32, 0x6d31,
+  0x4b60, 0x525e, 0x4b41, 0x5558, 0x4862, 0x405f, 0x3c21, 0x6b41,
+  0x5024, 0x5662, 0x3647, 0x3858, 0x6b40, 0x384e, 0x6b3f, 0x3326,
+  0x3949, 0x562b, 0x3774, 0x374a, 0x3c67, 0x373e, 0x6b46, 0x6b47,
+  0x3039, 0x3f4f, 0x6b45, 0x537d, 0x6b48, 0x6b49, 0x374e, 0x6b42,
+  0x6b44, 0x4976, 0x5657, 0x554d, 0x5032, 0x6b4f, 0x4e38, 0x6b50,
+  0x3528, 0x3133, 0x6b52, 0x4c25, 0x4556, 0x6b53, 0x6b51, 0x455f,
+  0x6b4e, 0x4a24, 0x6b55, 0x307b, 0x3a7a, 0x5837, 0x7163, 0x6b4a,
+  0x6b4b, 0x6b4c, 0x6b4d, 0x6b56, 0x6640, 0x6b59, 0x3f68, 0x5248,
+  0x6b57, 0x6b5c, 0x386c, 0x6b58, 0x3d3a, 0x5058, 0x3037, 0x6b5d,
+  0x445c, 0x562c, 0x3460, 0x4276, 0x3c39, 0x6b5a, 0x6b5b, 0x5460,
+  0x466a, 0x4454, 0x6b5f, 0x4527, 0x5975, 0x3231, 0x6b64, 0x3d45,
+  0x6b62, 0x6b63, 0x382c, 0x4d51, 0x6b65, 0x6b61, 0x4133, 0x4622,
+  0x4c73, 0x6b66, 0x4030, 0x5238, 0x6b67, 0x382f, 0x382d, 0x6b68,
+  0x473b, 0x4d73, 0x6b6a, 0x6b6b, 0x6b6d, 0x5048, 0x6b72, 0x6b6e,
+  0x6b71, 0x4879, 0x517c, 0x6b6c, 0x6b69, 0x3839, 0x4f59, 0x4465,
+  0x6b6f, 0x6b70, 0x4c5a, 0x4d48, 0x3072, 0x6b76, 0x6b75, 0x3232,
+  0x3860, 0x6b77, 0x316c, 0x4c45, 0x4424, 0x4f25, 0x6b79, 0x6c22,
+  0x4572, 0x6b7a, 0x4945, 0x625f, 0x6b7e, 0x4d4e, 0x6c21, 0x315b,
+  0x5337, 0x525c, 0x6b7d, 0x6b7b, 0x333c, 0x6a30, 0x5754, 0x742b,
+  0x3374, 0x5641, 0x5642, 0x5569, 0x3e4a, 0x7427, 0x5228, 0x7428,
+  0x7429, 0x742a, 0x3e4b, 0x535f, 0x4960, 0x4961, 0x7342, 0x4a66,
+  0x4c72, 0x6236, 0x4b34, 0x4e68, 0x565b, 0x742d, 0x742e, 0x742f,
+  0x7432, 0x3a3d, 0x7433, 0x3063, 0x7430, 0x7431, 0x3d22, 0x3255,
+  0x7436, 0x7437, 0x3666, 0x3230, 0x4f4f, 0x7434, 0x342c, 0x7435,
+  0x7438, 0x7439, 0x4d27, 0x743a, 0x743b, 0x743c, 0x4b52, 0x743d,
+  0x743e, 0x743f, 0x745e, 0x413c, 0x3c68, 0x492b, 0x515e, 0x6575,
+  0x5c33, 0x5255, 0x5c34, 0x302c, 0x5c35, 0x3d5a, 0x5c39, 0x5842,
+  0x5c37, 0x5373, 0x4956, 0x5c3a, 0x5c36, 0x5c3b, 0x4322, 0x5c3c,
+  0x5c45, 0x5c3d, 0x4e5f, 0x5625, 0x5c4f, 0x5c4d, 0x5c52, 0x3d66,
+  0x422b, 0x5c38, 0x5c4b, 0x5c4e, 0x5c3e, 0x3752, 0x3045, 0x5c47,
+  0x503e, 0x5c41, 0x3b28, 0x373c, 0x5c4c, 0x5c46, 0x5c3f, 0x475b,
+  0x513f, 0x5c40, 0x5c4a, 0x5c50, 0x4e2d, 0x5c42, 0x5c43, 0x5c48,
+  0x5c49, 0x3254, 0x5c51, 0x4b55, 0x5437, 0x5c5b, 0x5c5f, 0x4c26,
+  0x5c66, 0x4367, 0x5c5c, 0x3f41, 0x5c59, 0x307a, 0x3936, 0x5c65,
+  0x5c53, 0x5c44, 0x5c56, 0x4874, 0x3f60, 0x493b, 0x313d, 0x5322,
+  0x5c5a, 0x5c55, 0x463b, 0x5c5e, 0x5742, 0x432f, 0x3736, 0x4751,
+  0x4329, 0x5c62, 0x5c58, 0x5c6b, 0x5c54, 0x5c5d, 0x3e25, 0x5c57,
+  0x5c60, 0x5c63, 0x5c64, 0x5c78, 0x5c61, 0x5d22, 0x5c67, 0x3c6b,
+  0x3444, 0x4323, 0x3267, 0x5c7a, 0x5c72, 0x5c6f, 0x5c7c, 0x5c6e,
+  0x5270, 0x3268, 0x4857, 0x4863, 0x5c7b, 0x5c6d, 0x5c77, 0x5c75,
+  0x3e23, 0x5c74, 0x325d, 0x5c73, 0x3c76, 0x5c68, 0x3b44, 0x4073,
+  0x3c54, 0x5c69, 0x5c6a, 0x5c71, 0x5c76, 0x5c79, 0x3534, 0x4859,
+  0x3b67, 0x5c7e, 0x5c7d, 0x532b, 0x5d21, 0x5d23, 0x5d25, 0x5271,
+  0x5d24, 0x5d26, 0x5d27, 0x5229, 0x3a49, 0x5d29, 0x5d36, 0x5d31,
+  0x5d34, 0x5d30, 0x464e, 0x4072, 0x492f, 0x5c6c, 0x5d2e, 0x5d37,
+  0x5c70, 0x5d2f, 0x5d38, 0x5d2c, 0x5d39, 0x5d33, 0x5d2d, 0x442a,
+  0x5d28, 0x4033, 0x412b, 0x5d2a, 0x5d2b, 0x5d32, 0x3b71, 0x5d35,
+  0x5328, 0x5d3a, 0x5d3b, 0x4327, 0x5d52, 0x5d3c, 0x5d51, 0x393d,
+  0x3e55, 0x3e7a, 0x3a4a, 0x5d4a, 0x5d45, 0x5d3f, 0x324b, 0x5d43,
+  0x5d4b, 0x3224, 0x5d55, 0x5d3e, 0x4650, 0x5d50, 0x5d54, 0x4162,
+  0x3746, 0x5d4e, 0x5d4f, 0x5d44, 0x5d3d, 0x5d4d, 0x4c51, 0x5d49,
+  0x5d42, 0x4348, 0x463c, 0x4e2e, 0x5d4c, 0x5d48, 0x5d41, 0x5d46,
+  0x425c, 0x5329, 0x532a, 0x5d53, 0x4f74, 0x4878, 0x5d66, 0x5d47,
+  0x5d60, 0x4264, 0x5d61, 0x5d57, 0x5678, 0x5d59, 0x5d58, 0x3870,
+  0x5d56, 0x464f, 0x362d, 0x5d62, 0x3a79, 0x5461, 0x5d67, 0x3450,
+  0x5d5a, 0x3f7b, 0x5d63, 0x5d5f, 0x5d5d, 0x3559, 0x5d5b, 0x5d5c,
+  0x5d5e, 0x3d2f, 0x5d64, 0x5d65, 0x5d75, 0x4349, 0x4b62, 0x5d72,
+  0x5861, 0x4651, 0x5d74, 0x5574, 0x5d73, 0x5d70, 0x5d6c, 0x5d6f,
+  0x5d68, 0x506e, 0x4858, 0x5d6e, 0x5d69, 0x5d6a, 0x4b72, 0x5d6d,
+  0x314d, 0x4036, 0x3c3b, 0x5d71, 0x5d77, 0x5d76, 0x5d6b, 0x456e,
+  0x5d7b, 0x5e24, 0x5e23, 0x5d78, 0x436f, 0x427b, 0x5561, 0x4e35,
+  0x5d7d, 0x324c, 0x4468, 0x4a5f, 0x473e, 0x5d7a, 0x5d7c, 0x5d7e,
+  0x5e22, 0x302a, 0x314e, 0x5e2c, 0x5e26, 0x3d36, 0x486f, 0x5e21,
+  0x5e25, 0x5e29, 0x5e28, 0x5e27, 0x5e2d, 0x544c, 0x5e33, 0x5e2a,
+  0x5e2e, 0x4059, 0x3121, 0x5e36, 0x5e31, 0x5e32, 0x5126, 0x5e35,
+  0x5e2f, 0x5e30, 0x503d, 0x5e34, 0x4a6d, 0x5e39, 0x5e38, 0x5e37,
+  0x5e3b, 0x3d65, 0x3258, 0x436a, 0x5e3a, 0x453a, 0x5e3c, 0x4c59,
+  0x372a, 0x5465, 0x5e3d, 0x5e3f, 0x4422, 0x5e41, 0x5e3e, 0x5e40,
+  0x553a, 0x5e42, 0x722e, 0x3b22, 0x4232, 0x4530, 0x4247, 0x722f,
+  0x5069, 0x535d, 0x6b3d, 0x3366, 0x7230, 0x7231, 0x4a2d, 0x3a67,
+  0x7233, 0x7235, 0x7234, 0x4b64, 0x4f3a, 0x7232, 0x4a34, 0x524f,
+  0x426c, 0x4e43, 0x7238, 0x3076, 0x7237, 0x723e, 0x324f, 0x5141,
+  0x723a, 0x723c, 0x5469, 0x723b, 0x7236, 0x723f, 0x723d, 0x7239,
+  0x7247, 0x7244, 0x7246, 0x724a, 0x7242, 0x7240, 0x7245, 0x567b,
+  0x7241, 0x4779, 0x495f, 0x7248, 0x3946, 0x3530, 0x7243, 0x7249,
+  0x7250, 0x7256, 0x3b57, 0x7255, 0x4d5c, 0x566b, 0x7252, 0x7254,
+  0x3872, 0x724b, 0x724e, 0x4279, 0x555d, 0x724c, 0x724d, 0x724f,
+  0x7253, 0x7259, 0x533c, 0x366a, 0x4a71, 0x3764, 0x7257, 0x7258,
+  0x725a, 0x725d, 0x725b, 0x725c, 0x5151, 0x7251, 0x4d49, 0x4e4f,
+  0x5629, 0x7263, 0x435b, 0x7260, 0x402f, 0x726c, 0x725e, 0x7261,
+  0x7268, 0x7262, 0x7267, 0x7266, 0x7269, 0x725f, 0x7264, 0x726a,
+  0x532c, 0x7265, 0x3275, 0x7272, 0x502b, 0x7275, 0x3b48, 0x7279,
+  0x7270, 0x7276, 0x7278, 0x727a, 0x7273, 0x7271, 0x3a7b, 0x357b,
+  0x726f, 0x7277, 0x726d, 0x726e, 0x726b, 0x7326, 0x7323, 0x7322,
+  0x7274, 0x485a, 0x727b, 0x7325, 0x4378, 0x727d, 0x7327, 0x7329,
+  0x7324, 0x727c, 0x732b, 0x732a, 0x425d, 0x732e, 0x7330, 0x7321,
+  0x7331, 0x732c, 0x732f, 0x727e, 0x732d, 0x7332, 0x7334, 0x7328,
+  0x7333, 0x7335, 0x5037, 0x7338, 0x5979, 0x7339, 0x7337, 0x4864,
+  0x7336, 0x733a, 0x733b, 0x3440, 0x6e43, 0x733c, 0x733d, 0x512a,
+  0x742c, 0x5046, 0x5050, 0x515c, 0x4f4e, 0x3d56, 0x5143, 0x3a62,
+  0x6169, 0x5242, 0x7142, 0x3239, 0x316d, 0x7143, 0x4940, 0x3344,
+  0x5972, 0x4b25, 0x7144, 0x5654, 0x7145, 0x7440, 0x7146, 0x542c,
+  0x7147, 0x3040, 0x7441, 0x7442, 0x347c, 0x455b, 0x4c3b, 0x5064,
+  0x4d60, 0x7148, 0x5973, 0x313b, 0x4f2e, 0x3824, 0x714a, 0x714b,
+  0x3243, 0x4151, 0x5730, 0x7149, 0x714c, 0x714e, 0x5976, 0x5261,
+  0x5423, 0x7443, 0x4839, 0x7444, 0x714d, 0x714f, 0x3f63, 0x7150,
+  0x7154, 0x7156, 0x7151, 0x4951, 0x4561, 0x4263, 0x397c, 0x7153,
+  0x7155, 0x3953, 0x715b, 0x3a56, 0x307d, 0x7159, 0x7158, 0x7152,
+  0x715a, 0x7157, 0x486c, 0x4d4a, 0x715d, 0x653d, 0x715c, 0x715e,
+  0x715f, 0x4f65, 0x7445, 0x3d73, 0x7160, 0x7161, 0x4e77, 0x522a,
+  0x717b, 0x3832, 0x3c7b, 0x395b, 0x3966, 0x4359, 0x4a53, 0x6a68,
+  0x4040, 0x3e75, 0x6a69, 0x6a6a, 0x6a6b, 0x6a6c, 0x6a6d, 0x6a6e,
+  0x6a6f, 0x3d47, 0x757b, 0x757d, 0x757e, 0x757c, 0x3d62, 0x7621,
+  0x3425, 0x7622, 0x7623, 0x6c32, 0x5154, 0x596a, 0x7624, 0x6e3a,
+  0x5532, 0x537e, 0x4c5c, 0x4a44, 0x6540, 0x7625, 0x3e2f, 0x4629,
+  0x5a25, 0x3c46, 0x3629, 0x383c, 0x484f, 0x3c25, 0x5a26, 0x5a27,
+  0x4c56, 0x4843, 0x5a28, 0x467d, 0x5135, 0x5269, 0x5136, 0x3c47,
+  0x3d32, 0x3b64, 0x5a29, 0x5a2a, 0x5148, 0x5a2b, 0x506d, 0x366f,
+  0x425b, 0x4b4f, 0x376d, 0x4968, 0x3743, 0x3e77, 0x5624, 0x5a2c,
+  0x5a2d, 0x4640, 0x5767, 0x4a36, 0x5529, 0x4b5f, 0x556f, 0x5a2e,
+  0x565f, 0x344a, 0x5a30, 0x5a2f, 0x526b, 0x5a31, 0x5a32, 0x5a33,
+  0x4a54, 0x5a34, 0x4a2b, 0x5a35, 0x5a36, 0x334f, 0x566f, 0x5a37,
+  0x3b30, 0x352e, 0x5a38, 0x5a39, 0x396e, 0x512f, 0x5268, 0x5a3a,
+  0x3843, 0x4f6a, 0x326f, 0x5a3b, 0x5a3c, 0x3d6b, 0x4e5c, 0x536f,
+  0x5a3d, 0x4e73, 0x5a3e, 0x5355, 0x3b65, 0x5a3f, 0x4b35, 0x4b50,
+  0x5a40, 0x476b, 0x566e, 0x5a41, 0x4535, 0x3641, 0x5a42, 0x374c,
+  0x3f4e, 0x5a43, 0x5a44, 0x4b2d, 0x5a45, 0x3577, 0x5a46, 0x4142,
+  0x573b, 0x5a47, 0x4c38, 0x526a, 0x4431, 0x5a48, 0x357d, 0x3b51,
+  0x5a49, 0x5033, 0x5a4a, 0x5a4b, 0x4e3d, 0x5a4c, 0x5a4d, 0x5a4e,
+  0x3277, 0x5a51, 0x5a4f, 0x5168, 0x5a50, 0x4355, 0x5a52, 0x5a53,
+  0x5a54, 0x5a55, 0x503b, 0x5225, 0x3079, 0x5a56, 0x472b, 0x5a57,
+  0x3d77, 0x4321, 0x5a58, 0x5a59, 0x437d, 0x4c37, 0x5a5a, 0x5a5b,
+  0x403e, 0x4657, 0x5a5c, 0x5a5d, 0x4734, 0x5a5e, 0x5a5f, 0x3948,
+  0x3b6d, 0x3639, 0x7478, 0x7479, 0x4d63, 0x7539, 0x6b60, 0x4f73,
+  0x3b3f, 0x3a40, 0x5425, 0x6159, 0x7574, 0x312a, 0x3272, 0x7575,
+  0x7577, 0x3a51, 0x7576, 0x4332, 0x7579, 0x7578, 0x3134, 0x556a,
+  0x383a, 0x3931, 0x3246, 0x5470, 0x4f4d, 0x305c, 0x554b, 0x3b75,
+  0x564a, 0x3737, 0x4c30, 0x4636, 0x3161, 0x393a, 0x567c, 0x3961,
+  0x3721, 0x3c7a, 0x6a5a, 0x6a5b, 0x4c79, 0x3973, 0x6a5c, 0x347b,
+  0x4333, 0x3751, 0x3a58, 0x6a5d, 0x5474, 0x6a5e, 0x3c56, 0x3b5f,
+  0x6a5f, 0x415e, 0x4238, 0x545f, 0x574a, 0x6a60, 0x6a61, 0x6a64,
+  0x6a62, 0x6a63, 0x495e, 0x3833, 0x3644, 0x6a65, 0x4a6a, 0x494d,
+  0x344d, 0x6259, 0x4562, 0x6a66, 0x4035, 0x5738, 0x6a67, 0x572c,
+  0x487c, 0x5853, 0x584d, 0x545e, 0x5479, 0x4944, 0x532e, 0x3853,
+  0x3360, 0x4962, 0x7476, 0x3a55, 0x7477, 0x575f, 0x7471, 0x3830,
+  0x5554, 0x384f, 0x4670, 0x3343, 0x7472, 0x332c, 0x543d, 0x4777,
+  0x7474, 0x7473, 0x4c4b, 0x4824, 0x7475, 0x5763, 0x453f, 0x7540,
+  0x753b, 0x7543, 0x7542, 0x563a, 0x7541, 0x543e, 0x7544, 0x754c,
+  0x304f, 0x3578, 0x7549, 0x754a, 0x455c, 0x7545, 0x7546, 0x7547,
+  0x754b, 0x3e60, 0x7548, 0x387a, 0x7550, 0x7553, 0x3f67, 0x3972,
+  0x753c, 0x754d, 0x4237, 0x4c78, 0x3c79, 0x754e, 0x754f, 0x7551,
+  0x3665, 0x7552, 0x7555, 0x753d, 0x7554, 0x533b, 0x336c, 0x4c24,
+  0x7556, 0x7557, 0x3e61, 0x7558, 0x4c5f, 0x755b, 0x3248, 0x5759,
+  0x7559, 0x755a, 0x755c, 0x7562, 0x7560, 0x755f, 0x755d, 0x7561,
+  0x755e, 0x7564, 0x7565, 0x4c63, 0x653f, 0x3538, 0x7563, 0x7568,
+  0x4c23, 0x7566, 0x7567, 0x753e, 0x3144, 0x753f, 0x3545, 0x3264,
+  0x756c, 0x7569, 0x3657, 0x756d, 0x756a, 0x756b, 0x345a, 0x546a,
+  0x756e, 0x3379, 0x756f, 0x7571, 0x7570, 0x7572, 0x7573, 0x496d,
+  0x392a, 0x477b, 0x3663, 0x4c49, 0x6a26, 0x3335, 0x547e, 0x396c,
+  0x5079, 0x696d, 0x572a, 0x696e, 0x4256, 0x486d, 0x3a64, 0x696f,
+  0x6970, 0x6971, 0x5661, 0x6972, 0x6973, 0x6975, 0x6974, 0x6976,
+  0x6977, 0x4761, 0x6978, 0x5458, 0x6979, 0x3d4e, 0x697a, 0x697b,
+  0x3d4f, 0x697c, 0x3828, 0x413e, 0x697d, 0x3132, 0x3b54, 0x3975,
+  0x697e, 0x6a21, 0x6a22, 0x6a23, 0x3778, 0x3c2d, 0x4a64, 0x604e,
+  0x542f, 0x4f3d, 0x5537, 0x6a24, 0x555e, 0x6a25, 0x5041, 0x393c,
+  0x3447, 0x3159, 0x4031, 0x3166, 0x3167, 0x3168, 0x333d, 0x4868,
+  0x6541, 0x315f, 0x4149, 0x346f, 0x4728, 0x5358, 0x4679, 0x5138,
+  0x397d, 0x4275, 0x532d, 0x544b, 0x3d7c, 0x6542, 0x3735, 0x6543,
+  0x3b39, 0x5562, 0x3d78, 0x5436, 0x4e25, 0x412c, 0x3359, 0x4c76,
+  0x6546, 0x6544, 0x6548, 0x654a, 0x6547, 0x354f, 0x4648, 0x357c,
+  0x6545, 0x4a76, 0x6549, 0x4354, 0x3145, 0x3c23, 0x5737, 0x4d4b,
+  0x4b4d, 0x4a4a, 0x4c53, 0x654c, 0x654b, 0x4466, 0x5121, 0x5137,
+  0x654d, 0x6550, 0x4d38, 0x5670, 0x654f, 0x355d, 0x4d3e, 0x6551,
+  0x363a, 0x4d28, 0x3964, 0x4a45, 0x3351, 0x4b59, 0x546c, 0x6552,
+  0x376a, 0x654e, 0x6555, 0x347e, 0x6556, 0x6553, 0x6554, 0x525d,
+  0x425f, 0x3146, 0x5362, 0x365d, 0x4b6c, 0x6557, 0x5376, 0x3169,
+  0x3674, 0x655a, 0x6558, 0x6559, 0x3540, 0x5245, 0x655c, 0x655e,
+  0x655d, 0x4732, 0x5223, 0x655b, 0x5462, 0x555a, 0x6560, 0x5771,
+  0x6561, 0x315c, 0x517b, 0x6562, 0x6564, 0x6563, 0x6565, 0x5258,
+  0x354b, 0x675f, 0x5a75, 0x5a78, 0x5a76, 0x5a77, 0x5a7a, 0x504f,
+  0x4447, 0x306e, 0x5030, 0x5a79, 0x534a, 0x3a2a, 0x5b22, 0x4771,
+  0x5a7c, 0x5a7b, 0x495b, 0x5a7d, 0x5b21, 0x575e, 0x5a7e, 0x415a,
+  0x5b25, 0x5374, 0x5b27, 0x5b24, 0x5b28, 0x3d3c, 0x4049, 0x5b23,
+  0x5b26, 0x5623, 0x5b29, 0x5b2d, 0x5b2e, 0x5b2c, 0x3a42, 0x3f24,
+  0x5b2b, 0x5b2a, 0x5447, 0x323f, 0x5b2f, 0x3979, 0x5b30, 0x333b,
+  0x3526, 0x363c, 0x5b31, 0x3675, 0x5b32, 0x3149, 0x5b34, 0x5b33,
+  0x5b35, 0x5b37, 0x5b36, 0x5b38, 0x5b39, 0x5b3a, 0x534f, 0x747a,
+  0x4775, 0x5743, 0x4564, 0x747c, 0x747d, 0x747b, 0x3e46, 0x506f,
+  0x3753, 0x544d, 0x4c2a, 0x7522, 0x7521, 0x3a28, 0x747e, 0x4b56,
+  0x7524, 0x4052, 0x336a, 0x4d2a, 0x7525, 0x7523, 0x3d34, 0x7528,
+  0x7529, 0x3d4d, 0x4338, 0x3f61, 0x4b61, 0x752a, 0x7526, 0x7527,
+  0x4470, 0x752c, 0x343c, 0x576d, 0x3457, 0x752b, 0x752e, 0x752d,
+  0x752f, 0x5051, 0x4351, 0x4829, 0x7530, 0x7531, 0x7532, 0x7533,
+  0x7534, 0x7535, 0x7537, 0x7536, 0x7538, 0x3249, 0x5354, 0x4a4d,
+  0x406f, 0x5658, 0x5230, 0x413f, 0x3d70, 0x382a, 0x3c78, 0x7646,
+  0x7647, 0x7648, 0x7649, 0x764a, 0x764c, 0x764b, 0x7769, 0x764d,
+  0x764e, 0x6e44, 0x6e45, 0x6e46, 0x556b, 0x3624, 0x6e48, 0x6e47,
+  0x6e49, 0x6e4a, 0x4725, 0x6e4b, 0x6e4c, 0x3730, 0x3576, 0x6e4d,
+  0x6e4f, 0x6e4e, 0x3846, 0x6e50, 0x6e51, 0x6e52, 0x365b, 0x332e,
+  0x5653, 0x4446, 0x3135, 0x3856, 0x6e53, 0x6e54, 0x543f, 0x4755,
+  0x3e7b, 0x4e59, 0x3933, 0x6e56, 0x6e55, 0x6e58, 0x6e57, 0x4525,
+  0x6e59, 0x6e5a, 0x472e, 0x6e5b, 0x472f, 0x6e5c, 0x3227, 0x6e5d,
+  0x6e5e, 0x6e5f, 0x6e60, 0x6e61, 0x576a, 0x6e62, 0x6e63, 0x3c58,
+  0x6e64, 0x534b, 0x4c7a, 0x322c, 0x4165, 0x6e65, 0x4726, 0x432d,
+  0x6e66, 0x6e67, 0x6e68, 0x6e69, 0x6e6a, 0x6e6b, 0x6e6c, 0x6e6d,
+  0x6e6e, 0x6e6f, 0x6e70, 0x6e71, 0x6e72, 0x6e74, 0x6e73, 0x6e75,
+  0x4d2d, 0x4241, 0x6e76, 0x6e77, 0x6e78, 0x5521, 0x6e79, 0x4f33,
+  0x6e7a, 0x6e7b, 0x6e7c, 0x6e7d, 0x6f21, 0x6e7e, 0x6f22, 0x3875,
+  0x437a, 0x6f23, 0x6f24, 0x3d42, 0x523f, 0x3279, 0x6f25, 0x6f26,
+  0x6f27, 0x5278, 0x6f28, 0x567d, 0x6f29, 0x464c, 0x6f2a, 0x6f2b,
+  0x4134, 0x6f2c, 0x4f7a, 0x4b78, 0x6f2e, 0x6f2d, 0x337a, 0x3978,
+  0x6f2f, 0x6f30, 0x5062, 0x6f31, 0x6f32, 0x3766, 0x503f, 0x6f33,
+  0x6f34, 0x6f35, 0x4871, 0x4c60, 0x6f36, 0x6f37, 0x6f38, 0x6f39,
+  0x6f3a, 0x5560, 0x6f3b, 0x346d, 0x432a, 0x6f3c, 0x6f3d, 0x6f3e,
+  0x6f3f, 0x4e7d, 0x6f40, 0x4260, 0x3438, 0x5736, 0x3d75, 0x4f47,
+  0x6f43, 0x6f41, 0x6f42, 0x6f44, 0x3627, 0x3c7c, 0x3e62, 0x434c,
+  0x6f45, 0x6f46, 0x6f47, 0x6f4f, 0x6f48, 0x6f49, 0x6f4a, 0x4742,
+  0x6f71, 0x364d, 0x6f4b, 0x6f4c, 0x6f4d, 0x3646, 0x433e, 0x6f4e,
+  0x6f50, 0x6f51, 0x6f52, 0x5572, 0x6f53, 0x4477, 0x6f54, 0x4478,
+  0x6f55, 0x6f56, 0x3864, 0x3077, 0x6f57, 0x6f58, 0x6f59, 0x6f5a,
+  0x6f5b, 0x6f5c, 0x6f5d, 0x6f5e, 0x3e35, 0x6f61, 0x6f5f, 0x6f60,
+  0x6f62, 0x6f63, 0x414d, 0x6f64, 0x6f65, 0x6f66, 0x6f67, 0x6f68,
+  0x6f69, 0x6f6a, 0x6f6b, 0x6f6c, 0x4058, 0x6f6d, 0x412d, 0x6f6e,
+  0x6f6f, 0x6f70, 0x4f62, 0x3324, 0x4345, 0x6345, 0x4941, 0x6346,
+  0x3155, 0x4e4a, 0x3433, 0x4872, 0x6347, 0x4f50, 0x6348, 0x3c64,
+  0x6349, 0x634a, 0x4346, 0x5522, 0x4456, 0x396b, 0x4e45, 0x634b,
+  0x4376, 0x634c, 0x3727, 0x3873, 0x3a52, 0x634d, 0x634e, 0x5444,
+  0x634f, 0x6350, 0x514b, 0x6351, 0x6352, 0x6353, 0x6354, 0x5156,
+  0x6355, 0x327b, 0x403b, 0x6356, 0x402b, 0x6357, 0x6358, 0x6359,
+  0x635a, 0x635b, 0x3837, 0x5a62, 0x3653, 0x5a64, 0x5a63, 0x5a66,
+  0x486e, 0x5a65, 0x3740, 0x5174, 0x5275, 0x5573, 0x3d57, 0x5768,
+  0x5a68, 0x5a67, 0x3022, 0x4d53, 0x5a69, 0x383d, 0x3c4a, 0x423d,
+  0x4224, 0x3342, 0x5a6a, 0x422a, 0x4430, 0x3d35, 0x4f5e, 0x5a6b,
+  0x4942, 0x315d, 0x5a6c, 0x3638, 0x543a, 0x337d, 0x5a6d, 0x5449,
+  0x4f55, 0x4563, 0x5a6e, 0x5a6f, 0x5a70, 0x416a, 0x4c55, 0x4f5d,
+  0x5367, 0x4221, 0x5a71, 0x4b65, 0x5a72, 0x4b66, 0x527e, 0x3874,
+  0x5a73, 0x302f, 0x4f36, 0x554f, 0x4b6d, 0x5a74, 0x6344, 0x4125,
+  0x763f, 0x7640, 0x7641, 0x4451, 0x4838, 0x5163, 0x505b, 0x5145,
+  0x3c2f, 0x394d, 0x6f74, 0x3446, 0x533a, 0x7642, 0x337b, 0x7643,
+  0x3571, 0x7645, 0x536a, 0x7627, 0x5129, 0x7629, 0x7628, 0x4163,
+  0x4057, 0x3122, 0x4e6d, 0x5068, 0x762b, 0x4f76, 0x762a, 0x5570,
+  0x762c, 0x4339, 0x3b74, 0x762e, 0x762d, 0x445e, 0x4158, 0x4b2a,
+  0x4f3c, 0x762f, 0x7630, 0x7631, 0x4236, 0x3054, 0x4579, 0x7632,
+  0x4760, 0x7626, 0x3e38, 0x3e32, 0x3565, 0x3747, 0x3f3f, 0x4352,
+  0x4366, 0x584c, 0x386f, 0x3d79, 0x5125, 0x3050, 0x7730, 0x7731,
+  0x502c, 0x3030, 0x7732, 0x7733, 0x7734, 0x474a, 0x3e4f, 0x7737,
+  0x7736, 0x315e, 0x7735, 0x7738, 0x7739, 0x4e24, 0x484d, 0x3a2b,
+  0x6838, 0x6839, 0x683a, 0x3e42, 0x5274, 0x544f, 0x4958, 0x5233,
+  0x3625, 0x476a, 0x717c, 0x4f6e, 0x4b33, 0x506b, 0x676f, 0x4d67,
+  0x394b, 0x3659, 0x717d, 0x3064, 0x4b4c, 0x717e, 0x5424, 0x422d,
+  0x416c, 0x4644, 0x3e31, 0x7221, 0x3c55, 0x7222, 0x7223, 0x7224,
+  0x5243, 0x4635, 0x4d47, 0x7225, 0x5331, 0x3f45, 0x4c62, 0x7226,
+  0x7227, 0x5155, 0x366e, 0x7228, 0x7229, 0x355f, 0x722a, 0x722b,
+  0x327c, 0x722c, 0x722d, 0x4827, 0x3767, 0x6c29, 0x6c2a, 0x6c2b,
+  0x6c2c, 0x462e, 0x6c2d, 0x6c2e, 0x3749, 0x4a33, 0x6238, 0x774f,
+  0x7750, 0x324d, 0x7751, 0x7753, 0x7752, 0x623b, 0x3c22, 0x623c,
+  0x623d, 0x623e, 0x623f, 0x6240, 0x6241, 0x3739, 0x527b, 0x3d24,
+  0x4a4e, 0x3125, 0x4b47, 0x6242, 0x367c, 0x4844, 0x6243, 0x3d48,
+  0x317d, 0x6244, 0x3676, 0x6245, 0x4459, 0x6246, 0x4f5a, 0x395d,
+  0x6247, 0x4021, 0x6248, 0x3276, 0x6249, 0x4173, 0x624a, 0x624b,
+  0x4278, 0x624c, 0x624d, 0x624e, 0x4a57, 0x5838, 0x5965, 0x4f63,
+  0x7025, 0x5c30, 0x426d, 0x5426, 0x4d54, 0x5131, 0x335b, 0x477d,
+  0x3235, 0x423f, 0x6660, 0x4a3b, 0x6661, 0x6662, 0x3e54, 0x6663,
+  0x5724, 0x4d55, 0x6665, 0x3c5d, 0x6664, 0x6666, 0x6667, 0x426e,
+  0x3d3e, 0x6668, 0x4266, 0x3a27, 0x6669, 0x666a, 0x3352, 0x5169,
+  0x3f25, 0x666b, 0x466f, 0x666c, 0x666d, 0x666e, 0x462d, 0x666f,
+  0x4927, 0x6670, 0x6671, 0x6672, 0x6539, 0x6673, 0x6674, 0x4262,
+  0x6675, 0x6676, 0x5668, 0x6677, 0x6678, 0x3947, 0x773b, 0x773a,
+  0x773e, 0x773c, 0x3a21, 0x773f, 0x7740, 0x7742, 0x7741, 0x7744,
+  0x7743, 0x7745, 0x7746, 0x7747, 0x4b68, 0x385f, 0x7754, 0x7755,
+  0x7756, 0x7758, 0x775a, 0x7757, 0x775b, 0x7759, 0x5757, 0x775c,
+  0x775d, 0x775e, 0x775f, 0x7760, 0x5b4b, 0x582a, 0x6577, 0x396d,
+  0x3f7d, 0x3b6a, 0x7749, 0x4647, 0x7748, 0x774a, 0x774c, 0x774b,
+  0x774d, 0x4e3a, 0x774e, 0x4427, 0x5363, 0x764f, 0x4233, 0x7650,
+  0x7651, 0x7652, 0x7653, 0x7654, 0x7656, 0x312b, 0x7657, 0x7658,
+  0x7659, 0x765a, 0x765b, 0x765c, 0x765d, 0x765e, 0x4f4a, 0x765f,
+  0x7660, 0x7661, 0x7662, 0x7663, 0x7664, 0x4070, 0x7665, 0x7666,
+  0x7667, 0x7668, 0x7669, 0x766a, 0x766b, 0x766c, 0x766d, 0x766e,
+  0x766f, 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x3e28, 0x7675,
+  0x7676, 0x7677, 0x7678, 0x487a, 0x7679, 0x767a, 0x767b, 0x767c,
+  0x767d, 0x767e, 0x7721, 0x7722, 0x7723, 0x7724, 0x7725, 0x7726,
+  0x7727, 0x7728, 0x316e, 0x7729, 0x772a, 0x772b, 0x772c, 0x772d,
+  0x415b, 0x772e, 0x772f, 0x4471, 0x702f, 0x3c26, 0x7030, 0x4379,
+  0x4538, 0x513b, 0x7031, 0x7032, 0x7033, 0x7034, 0x7035, 0x513c,
+  0x516c, 0x7037, 0x7036, 0x5427, 0x4d52, 0x7038, 0x703a, 0x7039,
+  0x703b, 0x703c, 0x386b, 0x703d, 0x3a68, 0x703e, 0x703f, 0x3e69,
+  0x7040, 0x366c, 0x7041, 0x7042, 0x7043, 0x7044, 0x4835, 0x7045,
+  0x7046, 0x7047, 0x4574, 0x7048, 0x7049, 0x704a, 0x773d, 0x704b,
+  0x704c, 0x704d, 0x704e, 0x704f, 0x3a57, 0x7050, 0x7051, 0x7052,
+  0x7053, 0x7054, 0x7055, 0x7056, 0x7058, 0x5325, 0x7057, 0x7059,
+  0x753a, 0x4239, 0x7764, 0x7765, 0x7766, 0x7767, 0x7768, 0x4234,
+  0x776a, 0x776b, 0x4273, 0x7470, 0x746f, 0x4269, 0x7761, 0x7762,
+  0x3b46, 0x5964, 0x4a72, 0x4068, 0x7024, 0x3a5a, 0x472d, 0x442c,
+  0x776c, 0x776d, 0x776e, 0x7770, 0x776f, 0x7771, 0x7774, 0x7773,
+  0x7772, 0x7775, 0x7776, 0x6d69, 0x6d6a, 0x6d6b, 0x763c, 0x763d,
+  0x763e, 0x3626, 0x583e, 0x3944, 0x583b, 0x5c31, 0x4a73, 0x7777,
+  0x7778, 0x7779, 0x777b, 0x777a, 0x3147, 0x777c, 0x777d, 0x777e,
+  0x466b, 0x6c34, 0x335d, 0x7633, 0x7634, 0x4164, 0x7635, 0x7636,
+  0x7637, 0x7638, 0x7639, 0x763a, 0x4823, 0x763b, 0x417a, 0x3928,
+  0x6d68, 0x396a, 0x595f, 0x2321, 0x2322, 0x2323, 0x2167, 0x2325,
+  0x2326, 0x2327, 0x2328, 0x2329, 0x232a, 0x232b, 0x232c, 0x232d,
+  0x232e, 0x232f, 0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335,
+  0x2336, 0x2337, 0x2338, 0x2339, 0x233a, 0x233b, 0x233c, 0x233d,
+  0x233e, 0x233f, 0x2340, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345,
+  0x2346, 0x2347, 0x2348, 0x2349, 0x234a, 0x234b, 0x234c, 0x234d,
+  0x234e, 0x234f, 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355,
+  0x2356, 0x2357, 0x2358, 0x2359, 0x235a, 0x235b, 0x235c, 0x235d,
+  0x235e, 0x235f, 0x2360, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365,
+  0x2366, 0x2367, 0x2368, 0x2369, 0x236a, 0x236b, 0x236c, 0x236d,
+  0x236e, 0x236f, 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375,
+  0x2376, 0x2377, 0x2378, 0x2379, 0x237a, 0x237b, 0x237c, 0x237d,
+  0x212b, 0x2169, 0x216a, 0x237e, 0x2324,
+};
+
+static const Summary16 gb2312_uni2indx_page00[70] = {
+  /* 0x0000 */
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0190 }, {    3, 0x0003 },
+  {    5, 0x0000 }, {    5, 0x0080 }, {    6, 0x3703 }, {   13, 0x168c },
+  /* 0x0100 */
+  {   19, 0x0002 }, {   20, 0x0808 }, {   22, 0x0800 }, {   23, 0x0000 },
+  {   23, 0x2000 }, {   24, 0x0000 }, {   24, 0x0800 }, {   25, 0x0000 },
+  {   25, 0x0000 }, {   25, 0x0000 }, {   25, 0x0000 }, {   25, 0x0000 },
+  {   25, 0x4000 }, {   26, 0x1555 }, {   33, 0x0000 }, {   33, 0x0000 },
+  /* 0x0200 */
+  {   33, 0x0000 }, {   33, 0x0000 }, {   33, 0x0000 }, {   33, 0x0000 },
+  {   33, 0x0000 }, {   33, 0x0000 }, {   33, 0x0000 }, {   33, 0x0000 },
+  {   33, 0x0000 }, {   33, 0x0000 }, {   33, 0x0000 }, {   33, 0x0000 },
+  {   33, 0x0280 }, {   35, 0x0000 }, {   35, 0x0000 }, {   35, 0x0000 },
+  /* 0x0300 */
+  {   35, 0x0000 }, {   35, 0x0000 }, {   35, 0x0000 }, {   35, 0x0000 },
+  {   35, 0x0000 }, {   35, 0x0000 }, {   35, 0x0000 }, {   35, 0x0000 },
+  {   35, 0x0000 }, {   35, 0xfffe }, {   50, 0x03fb }, {   59, 0xfffe },
+  {   74, 0x03fb }, {   83, 0x0000 }, {   83, 0x0000 }, {   83, 0x0000 },
+  /* 0x0400 */
+  {   83, 0x0002 }, {   84, 0xffff }, {  100, 0xffff }, {  116, 0xffff },
+  {  132, 0xffff }, {  148, 0x0002 },
+};
+static const Summary16 gb2312_uni2indx_page20[101] = {
+  /* 0x2000 */
+  {  149, 0x0000 }, {  149, 0x3360 }, {  155, 0x0040 }, {  156, 0x080d },
+  {  160, 0x0000 }, {  160, 0x0000 }, {  160, 0x0000 }, {  160, 0x0000 },
+  {  160, 0x0000 }, {  160, 0x0000 }, {  160, 0x0000 }, {  160, 0x0000 },
+  {  160, 0x0000 }, {  160, 0x0000 }, {  160, 0x0000 }, {  160, 0x0000 },
+  /* 0x2100 */
+  {  160, 0x0008 }, {  161, 0x0040 }, {  162, 0x0000 }, {  162, 0x0000 },
+  {  162, 0x0000 }, {  162, 0x0000 }, {  162, 0x0fff }, {  174, 0x0000 },
+  {  174, 0x0000 }, {  174, 0x000f }, {  178, 0x0000 }, {  178, 0x0000 },
+  {  178, 0x0000 }, {  178, 0x0000 }, {  178, 0x0000 }, {  178, 0x0000 },
+  /* 0x2200 */
+  {  178, 0x8100 }, {  180, 0x6402 }, {  184, 0x4fa1 }, {  192, 0x20f0 },
+  {  197, 0x1100 }, {  199, 0x0000 }, {  199, 0xc033 }, {  205, 0x0000 },
+  {  205, 0x0000 }, {  205, 0x0200 }, {  206, 0x0020 }, {  207, 0x0000 },
+  {  207, 0x0000 }, {  207, 0x0000 }, {  207, 0x0000 }, {  207, 0x0000 },
+  /* 0x2300 */
+  {  207, 0x0000 }, {  207, 0x0004 }, {  208, 0x0000 }, {  208, 0x0000 },
+  {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 },
+  {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 },
+  {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 },
+  /* 0x2400 */
+  {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x0000 },
+  {  208, 0x0000 }, {  208, 0x0000 }, {  208, 0x03ff }, {  218, 0xfff0 },
+  {  230, 0xffff }, {  246, 0x0fff }, {  258, 0x0000 }, {  258, 0x0000 },
+  {  258, 0x0000 }, {  258, 0x0000 }, {  258, 0x0000 }, {  258, 0x0000 },
+  /* 0x2500 */
+  {  258, 0xffff }, {  274, 0xffff }, {  290, 0xffff }, {  306, 0xffff },
+  {  322, 0x0fff }, {  334, 0x0000 }, {  334, 0x0000 }, {  334, 0x0000 },
+  {  334, 0x0000 }, {  334, 0x0000 }, {  334, 0x0003 }, {  336, 0x000c },
+  {  338, 0xc8c0 }, {  343, 0x0000 }, {  343, 0x0000 }, {  343, 0x0000 },
+  /* 0x2600 */
+  {  343, 0x0060 }, {  345, 0x0000 }, {  345, 0x0000 }, {  345, 0x0000 },
+  {  345, 0x0005 },
+};
+static const Summary16 gb2312_uni2indx_page30[35] = {
+  /* 0x3000 */
+  {  347, 0xff2f }, {  360, 0x00fb }, {  367, 0x0000 }, {  367, 0x0000 },
+  {  367, 0xfffe }, {  382, 0xffff }, {  398, 0xffff }, {  414, 0xffff },
+  {  430, 0xffff }, {  446, 0x000f }, {  450, 0xfffe }, {  465, 0xffff },
+  {  481, 0xffff }, {  497, 0xffff }, {  513, 0xffff }, {  529, 0x087f },
+  /* 0x3100 */
+  {  537, 0xffe0 }, {  548, 0xffff }, {  564, 0x03ff }, {  574, 0x0000 },
+  {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x0000 },
+  {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x0000 },
+  {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x0000 },
+  /* 0x3200 */
+  {  574, 0x0000 }, {  574, 0x0000 }, {  574, 0x03ff },
+};
+static const Summary16 gb2312_uni2indx_page4e[1263] = {
+  /* 0x4e00 */
+  {  584, 0x7f8b }, {  595, 0x7f7b }, {  608, 0x3db4 }, {  617, 0xef55 },
+  {  628, 0xfba8 }, {  638, 0xf35d }, {  649, 0x0243 }, {  653, 0x400b },
+  {  657, 0xfb40 }, {  665, 0x8d3e }, {  674, 0x7bf7 }, {  687, 0x8c2c },
+  {  693, 0x6eff }, {  706, 0xe3fa }, {  717, 0x1d3a }, {  725, 0xa8ed },
+  /* 0x4f00 */
+  {  734, 0xe602 }, {  740, 0xcf83 }, {  749, 0x8cf5 }, {  758, 0x3555 },
+  {  766, 0xe048 }, {  771, 0xffab }, {  784, 0x92b9 }, {  792, 0xd859 },
+  {  800, 0xab18 }, {  807, 0x2892 }, {  812, 0xd7e9 }, {  823, 0x8020 },
+  {  825, 0xc438 }, {  831, 0xf583 }, {  840, 0xe74a }, {  849, 0x450a },
+  /* 0x5000 */
+  {  854, 0xb000 }, {  857, 0x9714 }, {  864, 0x7762 }, {  873, 0x5400 },
+  {  876, 0xd188 }, {  882, 0x1420 }, {  885, 0x1020 }, {  887, 0xc8c0 },
+  {  892, 0x2121 }, {  896, 0x0000 }, {  896, 0x13a8 }, {  902, 0x0c04 },
+  {  905, 0x8000 }, {  906, 0x0440 }, {  908, 0x70c0 }, {  913, 0x0828 },
+  /* 0x5100 */
+  {  916, 0x08c0 }, {  919, 0x0004 }, {  920, 0x0002 }, {  921, 0x8000 },
+  {  922, 0x2b7b }, {  932, 0x1472 }, {  938, 0x7924 }, {  945, 0x3bfb },
+  {  957, 0x3327 }, {  965, 0x1ae4 }, {  972, 0x9835 }, {  979, 0x38ef },
+  {  989, 0x9ad1 }, {  997, 0x2802 }, { 1000, 0xa813 }, { 1006, 0xbf69 },
+  /* 0x5200 */
+  { 1017, 0x65cf }, { 1027, 0x2fc6 }, { 1036, 0x6b11 }, { 1043, 0xafc9 },
+  { 1053, 0x340f }, { 1060, 0x5053 }, { 1066, 0x86a2 }, { 1072, 0xa004 },
+  { 1075, 0x0106 }, { 1078, 0xe809 }, { 1084, 0x3f0f }, { 1094, 0xc00e },
+  { 1099, 0x0a88 }, { 1103, 0x8145 }, { 1108, 0x0010 }, { 1109, 0xc601 },
+  /* 0x5300 */
+  { 1114, 0xa161 }, { 1120, 0x26e1 }, { 1127, 0x444b }, { 1133, 0xce00 },
+  { 1138, 0xc7aa }, { 1147, 0xd4ee }, { 1157, 0xcadf }, { 1168, 0x85bb },
+  { 1177, 0x3a74 }, { 1185, 0xa520 }, { 1190, 0x436c }, { 1197, 0x8840 },
+  { 1200, 0x3f06 }, { 1208, 0x8bd2 }, { 1216, 0xff79 }, { 1229, 0x3bef },
+  /* 0x5400 */
+  { 1241, 0xf75a }, { 1252, 0xe8ef }, { 1263, 0xfbcb }, { 1275, 0x5b36 },
+  { 1284, 0x0d49 }, { 1290, 0x1bfd }, { 1301, 0x0154 }, { 1305, 0x39ee },
+  { 1315, 0xd855 }, { 1323, 0x2e75 }, { 1332, 0xbfd8 }, { 1343, 0xa91a },
+  { 1350, 0xf3d7 }, { 1362, 0xf6bf }, { 1375, 0x67e0 }, { 1383, 0xb40c },
+  /* 0x5500 */
+  { 1389, 0x82c2 }, { 1394, 0x0813 }, { 1398, 0xd49d }, { 1407, 0xd08b },
+  { 1414, 0x065a }, { 1420, 0x1061 }, { 1424, 0x74f2 }, { 1433, 0x59e0 },
+  { 1440, 0x8f9f }, { 1451, 0xb312 }, { 1458, 0x0080 }, { 1459, 0x6aaa },
+  { 1467, 0x3230 }, { 1472, 0xb05e }, { 1480, 0x9d7a }, { 1490, 0x60ac },
+  /* 0x5600 */
+  { 1496, 0xd303 }, { 1503, 0xc900 }, { 1507, 0x3098 }, { 1512, 0x8a56 },
+  { 1519, 0x7000 }, { 1522, 0x1390 }, { 1527, 0x1f14 }, { 1534, 0x1842 },
+  { 1538, 0xc060 }, { 1542, 0x0008 }, { 1543, 0x8008 }, { 1545, 0x1080 },
+  { 1547, 0x0400 }, { 1548, 0xec90 }, { 1555, 0x2817 }, { 1561, 0xe633 },
+  /* 0x5700 */
+  { 1570, 0x0758 }, { 1576, 0x9000 }, { 1578, 0xf708 }, { 1586, 0x4e09 },
+  { 1592, 0xf485 }, { 1600, 0xfc83 }, { 1609, 0xaf53 }, { 1619, 0x18c8 },
+  { 1624, 0x187c }, { 1631, 0x080c }, { 1634, 0x6adf }, { 1645, 0x0114 },
+  { 1648, 0xc80c }, { 1653, 0xa734 }, { 1661, 0xa011 }, { 1665, 0x2710 },
+  /* 0x5800 */
+  { 1670, 0x28c5 }, { 1676, 0x4222 }, { 1680, 0x0413 }, { 1684, 0x0021 },
+  { 1686, 0x3010 }, { 1689, 0x4112 }, { 1693, 0x1820 }, { 1696, 0x4000 },
+  { 1697, 0x022b }, { 1702, 0xc60c }, { 1708, 0x0300 }, { 1710, 0x1000 },
+  { 1711, 0x0022 }, { 1713, 0x0022 }, { 1715, 0x5810 }, { 1719, 0x0249 },
+  /* 0x5900 */
+  { 1723, 0xa094 }, { 1728, 0x9670 }, { 1735, 0xeeb0 }, { 1744, 0x1792 },
+  { 1751, 0xcb96 }, { 1760, 0x05f2 }, { 1767, 0x0025 }, { 1770, 0x2358 },
+  { 1776, 0x25de }, { 1785, 0x42cc }, { 1791, 0xcf38 }, { 1800, 0x4a04 },
+  { 1804, 0x0c40 }, { 1807, 0x359f }, { 1817, 0x1128 }, { 1821, 0x8a00 },
+  /* 0x5a00 */
+  { 1824, 0x13fa }, { 1833, 0x910a }, { 1838, 0x0229 }, { 1842, 0x1056 },
+  { 1847, 0x0641 }, { 1851, 0x0420 }, { 1853, 0x0484 }, { 1856, 0x84f0 },
+  { 1862, 0x0000 }, { 1862, 0x0c04 }, { 1865, 0x0400 }, { 1866, 0x412c },
+  { 1871, 0x1206 }, { 1875, 0x1154 }, { 1880, 0x0a4b }, { 1886, 0x0002 },
+  /* 0x5b00 */
+  { 1887, 0x0200 }, { 1888, 0x00c0 }, { 1890, 0x0000 }, { 1890, 0x0094 },
+  { 1893, 0x0001 }, { 1894, 0xbfbb }, { 1907, 0x167c }, { 1915, 0x242b },
+  { 1921, 0x9bbb }, { 1932, 0x7fa8 }, { 1942, 0x0c7f }, { 1951, 0xe379 },
+  { 1961, 0x10f4 }, { 1967, 0xe00d }, { 1973, 0x4132 }, { 1978, 0x9f01 },
+  /* 0x5c00 */
+  { 1985, 0x8652 }, { 1991, 0x3572 }, { 1999, 0x10b4 }, { 2004, 0xff12 },
+  { 2014, 0xcf27 }, { 2024, 0x4223 }, { 2029, 0xc06b }, { 2036, 0x8602 },
+  { 2040, 0x3106 }, { 2045, 0x1fd3 }, { 2055, 0x3a0c }, { 2061, 0xa1aa },
+  { 2068, 0x0812 }, { 2071, 0x0204 }, { 2073, 0x2572 }, { 2080, 0x0801 },
+  /* 0x5d00 */
+  { 2082, 0x40cc }, { 2087, 0x4850 }, { 2091, 0x62d0 }, { 2097, 0x6010 },
+  { 2100, 0x1c80 }, { 2104, 0x2900 }, { 2107, 0x9a00 }, { 2111, 0x0010 },
+  { 2112, 0x0004 }, { 2113, 0x2200 }, { 2115, 0x0000 }, { 2115, 0x0080 },
+  { 2116, 0x2020 }, { 2118, 0x6800 }, { 2121, 0xcbe6 }, { 2131, 0x609e },
+  /* 0x5e00 */
+  { 2138, 0x916e }, { 2146, 0x3f73 }, { 2157, 0x60c0 }, { 2161, 0x3982 },
+  { 2167, 0x1034 }, { 2171, 0x4830 }, { 2175, 0x0006 }, { 2177, 0xbd5c },
+  { 2187, 0x8cd1 }, { 2194, 0xd6fb }, { 2206, 0x20e1 }, { 2211, 0x43e8 },
+  { 2218, 0x0600 }, { 2220, 0x084e }, { 2225, 0x0500 }, { 2227, 0xc4d0 },
+  /* 0x5f00 */
+  { 2233, 0x8d1f }, { 2242, 0x89aa }, { 2249, 0xa6e1 }, { 2257, 0x1602 },
+  { 2261, 0x0001 }, { 2262, 0x21ed }, { 2270, 0x3656 }, { 2278, 0x1a8b },
+  { 2285, 0x1fb7 }, { 2296, 0x13a5 }, { 2303, 0x6502 }, { 2308, 0x30a0 },
+  { 2312, 0xb278 }, { 2320, 0x23c7 }, { 2328, 0x6c93 }, { 2336, 0xe922 },
+  /* 0x6000 */
+  { 2343, 0xe47f }, { 2354, 0x3a74 }, { 2362, 0x8fe3 }, { 2372, 0x9820 },
+  { 2376, 0x280e }, { 2381, 0x2625 }, { 2387, 0xbf9c }, { 2398, 0xbf49 },
+  { 2408, 0x3218 }, { 2413, 0xac54 }, { 2420, 0xb949 }, { 2428, 0x1916 },
+  { 2434, 0x0c60 }, { 2438, 0xb522 }, { 2445, 0xfbc1 }, { 2455, 0x0659 },
+  /* 0x6100 */
+  { 2461, 0xe343 }, { 2469, 0x8420 }, { 2472, 0x08d9 }, { 2478, 0x8000 },
+  { 2479, 0x5500 }, { 2483, 0x2022 }, { 2486, 0x0184 }, { 2489, 0x00a1 },
+  { 2492, 0x4800 }, { 2494, 0x2010 }, { 2496, 0x1380 }, { 2500, 0x4080 },
+  { 2502, 0x0d04 }, { 2506, 0x0016 }, { 2509, 0x0040 }, { 2510, 0x8020 },
+  /* 0x6200 */
+  { 2512, 0xfd40 }, { 2520, 0x8de7 }, { 2530, 0x5436 }, { 2537, 0xe098 },
+  { 2543, 0x7b8b }, { 2553, 0x091e }, { 2559, 0xfec8 }, { 2569, 0xd249 },
+  { 2576, 0x0611 }, { 2580, 0x8dee }, { 2590, 0x1937 }, { 2598, 0xba22 },
+  { 2605, 0x77f4 }, { 2616, 0x9fdd }, { 2628, 0xf3ec }, { 2639, 0xf0da },
+  /* 0x6300 */
+  { 2648, 0x4386 }, { 2654, 0xec42 }, { 2661, 0x8d3f }, { 2671, 0x2604 },
+  { 2675, 0xfa6c }, { 2685, 0xc021 }, { 2689, 0x628e }, { 2696, 0x0cc2 },
+  { 2701, 0xd785 }, { 2710, 0x0145 }, { 2714, 0x77ad }, { 2725, 0x5599 },
+  { 2733, 0xe250 }, { 2739, 0x4045 }, { 2743, 0x260b }, { 2749, 0xa154 },
+  /* 0x6400 */
+  { 2755, 0x9827 }, { 2762, 0x5819 }, { 2768, 0x3443 }, { 2774, 0xa410 },
+  { 2778, 0x05f2 }, { 2785, 0x4114 }, { 2789, 0x2280 }, { 2792, 0x0700 },
+  { 2795, 0x00b4 }, { 2799, 0x4266 }, { 2805, 0x7210 }, { 2810, 0x15a1 },
+  { 2816, 0x6025 }, { 2821, 0x4185 }, { 2826, 0x0054 }, { 2829, 0x0000 },
+  /* 0x6500 */
+  { 2829, 0x0201 }, { 2831, 0x0104 }, { 2833, 0xc820 }, { 2837, 0xcb70 },
+  { 2845, 0x9320 }, { 2850, 0x6a62 }, { 2857, 0x184c }, { 2862, 0x0095 },
+  { 2866, 0x1880 }, { 2869, 0x9a8b }, { 2877, 0xaab2 }, { 2885, 0x3201 },
+  { 2889, 0xd87a }, { 2898, 0x00c4 }, { 2901, 0xf3e5 }, { 2912, 0x04c3 },
+  /* 0x6600 */
+  { 2917, 0xd44d }, { 2925, 0xa238 }, { 2931, 0xa1a1 }, { 2937, 0x5072 },
+  { 2943, 0x980a }, { 2948, 0x84fc }, { 2956, 0xc152 }, { 2962, 0x44d1 },
+  { 2968, 0x1094 }, { 2972, 0x20c2 }, { 2976, 0x4180 }, { 2979, 0x4210 },
+  { 2982, 0x0000 }, { 2982, 0x3a00 }, { 2986, 0x0240 }, { 2988, 0xd29d },
+  /* 0x6700 */
+  { 2997, 0x2f01 }, { 3003, 0xa8b1 }, { 3010, 0xbd40 }, { 3017, 0x2432 },
+  { 3022, 0xd34d }, { 3031, 0xd04b }, { 3038, 0xa723 }, { 3046, 0xd0ad },
+  { 3054, 0x0a92 }, { 3059, 0x75a1 }, { 3067, 0xadac }, { 3076, 0x01e9 },
+  { 3082, 0x801a }, { 3086, 0x771f }, { 3097, 0x9225 }, { 3103, 0xa01b },
+  /* 0x6800 */
+  { 3109, 0xdfa1 }, { 3119, 0x20ca }, { 3124, 0x0602 }, { 3127, 0x738c },
+  { 3135, 0x577f }, { 3147, 0x003b }, { 3152, 0x0bff }, { 3163, 0x00d0 },
+  { 3166, 0x806a }, { 3171, 0x0088 }, { 3173, 0xa1c4 }, { 3179, 0x0029 },
+  { 3182, 0x2a05 }, { 3187, 0x0524 }, { 3191, 0x4009 }, { 3194, 0x1623 },
+  /* 0x6900 */
+  { 3200, 0x6822 }, { 3205, 0x8005 }, { 3208, 0x2011 }, { 3211, 0xa211 },
+  { 3216, 0x0004 }, { 3217, 0x6490 }, { 3222, 0x4849 }, { 3227, 0x1382 },
+  { 3232, 0x23d5 }, { 3240, 0x1930 }, { 3245, 0x2980 }, { 3249, 0x0892 },
+  { 3253, 0x5402 }, { 3257, 0x8811 }, { 3261, 0x2001 }, { 3263, 0xa004 },
+  /* 0x6a00 */
+  { 3266, 0x0400 }, { 3267, 0x8180 }, { 3270, 0x8502 }, { 3274, 0x6022 },
+  { 3278, 0x0090 }, { 3280, 0x0b01 }, { 3284, 0x0022 }, { 3286, 0x1202 },
+  { 3289, 0x4011 }, { 3292, 0x0083 }, { 3295, 0x1a01 }, { 3299, 0x0000 },
+  { 3299, 0x0000 }, { 3299, 0x0000 }, { 3299, 0x0000 }, { 3299, 0x0000 },
+  /* 0x6b00 */
+  { 3299, 0x0000 }, { 3299, 0x0000 }, { 3299, 0x009f }, { 3305, 0x4684 },
+  { 3310, 0x12c8 }, { 3315, 0x0200 }, { 3316, 0x04fc }, { 3323, 0x1a00 },
+  { 3326, 0x2ede }, { 3336, 0x0c4c }, { 3341, 0x0402 }, { 3343, 0x80b8 },
+  { 3348, 0xa826 }, { 3354, 0x0afc }, { 3362, 0x8c02 }, { 3366, 0x2228 },
+  /* 0x6c00 */
+  { 3370, 0xa0e0 }, { 3375, 0x8f7b }, { 3386, 0xc7d6 }, { 3396, 0x2135 },
+  { 3402, 0x06c7 }, { 3409, 0xf8b1 }, { 3418, 0x0713 }, { 3424, 0x6255 },
+  { 3431, 0x936e }, { 3440, 0x8a19 }, { 3446, 0x6efa }, { 3457, 0xfb0e },
+  { 3467, 0x1630 }, { 3472, 0x48f9 }, { 3480, 0xcd2f }, { 3490, 0x7deb },
+  /* 0x6d00 */
+  { 3502, 0x5892 }, { 3508, 0x4e84 }, { 3514, 0x4ca0 }, { 3519, 0x7a2e },
+  { 3528, 0xedea }, { 3539, 0x561e }, { 3547, 0xc649 }, { 3554, 0x1190 },
+  { 3558, 0x5324 }, { 3564, 0xe83a }, { 3572, 0xcfdb }, { 3584, 0x8124 },
+  { 3588, 0x18f1 }, { 3595, 0x6342 }, { 3601, 0x5853 }, { 3608, 0x1a8a },
+  /* 0x6e00 */
+  { 3614, 0x7420 }, { 3619, 0x24d3 }, { 3626, 0xaa3b }, { 3635, 0x0514 },
+  { 3639, 0x6018 }, { 3643, 0x8958 }, { 3649, 0x4800 }, { 3651, 0xc000 },
+  { 3653, 0x8268 }, { 3658, 0x9101 }, { 3662, 0x84a4 }, { 3667, 0x2cd6 },
+  { 3675, 0x8886 }, { 3680, 0xc4ba }, { 3688, 0x0377 }, { 3696, 0x0210 },
+  /* 0x6f00 */
+  { 3698, 0x8244 }, { 3702, 0x0038 }, { 3705, 0xae11 }, { 3712, 0x404a },
+  { 3716, 0x28c0 }, { 3720, 0x5100 }, { 3723, 0x6044 }, { 3727, 0x1514 },
+  { 3732, 0x7310 }, { 3738, 0x1000 }, { 3739, 0x0082 }, { 3741, 0x0248 },
+  { 3744, 0x0205 }, { 3747, 0x4006 }, { 3750, 0xc003 }, { 3754, 0x0000 },
+  /* 0x7000 */
+  { 3754, 0x0000 }, { 3754, 0x0c02 }, { 3757, 0x0008 }, { 3758, 0x0220 },
+  { 3760, 0x9000 }, { 3762, 0x4000 }, { 3763, 0xb800 }, { 3767, 0xd161 },
+  { 3774, 0x4621 }, { 3779, 0x3274 }, { 3786, 0xf800 }, { 3791, 0x3b8a },
+  { 3799, 0x050f }, { 3805, 0x8b00 }, { 3809, 0xbbd0 }, { 3818, 0x2280 },
+  /* 0x7100 */
+  { 3821, 0x0600 }, { 3823, 0x0769 }, { 3830, 0x8040 }, { 3832, 0x0043 },
+  { 3835, 0x5420 }, { 3839, 0x5000 }, { 3841, 0x41d0 }, { 3846, 0x250c },
+  { 3851, 0x8410 }, { 3854, 0x8310 }, { 3858, 0x1101 }, { 3861, 0x0228 },
+  { 3864, 0x4008 }, { 3866, 0x0030 }, { 3868, 0x40a1 }, { 3872, 0x0200 },
+  /* 0x7200 */
+  { 3873, 0x0040 }, { 3874, 0x2000 }, { 3875, 0x1500 }, { 3878, 0xabe3 },
+  { 3888, 0x3180 }, { 3892, 0xaa44 }, { 3898, 0xc2c6 }, { 3905, 0xc624 },
+  { 3911, 0xac13 }, { 3918, 0x8004 }, { 3920, 0xb000 }, { 3923, 0x03d1 },
+  { 3929, 0x611e }, { 3936, 0x4285 }, { 3941, 0xf303 }, { 3949, 0x1d9f },
+  /* 0x7300 */
+  { 3959, 0x440a }, { 3963, 0x78e8 }, { 3971, 0x5e26 }, { 3979, 0xc392 },
+  { 3986, 0x2000 }, { 3987, 0x0085 }, { 3990, 0xb001 }, { 3994, 0x4000 },
+  { 3995, 0x4a90 }, { 4000, 0x8842 }, { 4004, 0xca04 }, { 4009, 0x0c8d },
+  { 4015, 0xa705 }, { 4022, 0x4203 }, { 4026, 0x22a1 }, { 4031, 0x0004 },
+  /* 0x7400 */
+  { 4032, 0x8668 }, { 4038, 0x0c01 }, { 4041, 0x5564 }, { 4048, 0x1079 },
+  { 4054, 0x0002 }, { 4055, 0xdea0 }, { 4063, 0x2000 }, { 4064, 0x40c1 },
+  { 4068, 0x488b }, { 4074, 0x5001 }, { 4077, 0x0380 }, { 4080, 0x0400 },
+  { 4081, 0x0000 }, { 4081, 0x5004 }, { 4084, 0xc05d }, { 4091, 0x80d0 },
+  /* 0x7500 */
+  { 4095, 0xa010 }, { 4098, 0x970a }, { 4105, 0xbb20 }, { 4112, 0x4daf },
+  { 4122, 0xd921 }, { 4129, 0x1e10 }, { 4134, 0x0460 }, { 4137, 0x8314 },
+  { 4142, 0x8848 }, { 4146, 0xa6d6 }, { 4155, 0xd83b }, { 4164, 0x733f },
+  { 4175, 0x27bc }, { 4184, 0x4974 }, { 4191, 0x0ddc }, { 4199, 0x9213 },
+  /* 0x7600 */
+  { 4205, 0x142b }, { 4211, 0x8ba1 }, { 4218, 0x2e75 }, { 4227, 0xd139 },
+  { 4235, 0x3009 }, { 4239, 0x5050 }, { 4243, 0x8808 }, { 4246, 0x6900 },
+  { 4250, 0x49d4 }, { 4257, 0x024a }, { 4261, 0x4010 }, { 4263, 0x8016 },
+  { 4267, 0xe564 }, { 4275, 0x89d7 }, { 4284, 0xc020 }, { 4287, 0x5316 },
+  /* 0x7700 */
+  { 4294, 0x2b92 }, { 4301, 0x8600 }, { 4304, 0xa345 }, { 4311, 0x15e0 },
+  { 4317, 0x008b }, { 4321, 0x0c03 }, { 4325, 0x196e }, { 4333, 0xe200 },
+  { 4337, 0x7031 }, { 4343, 0x8006 }, { 4346, 0x16a5 }, { 4353, 0xa829 },
+  { 4359, 0x2000 }, { 4360, 0x1880 }, { 4363, 0x7aac }, { 4372, 0xe148 },
+  /* 0x7800 */
+  { 4378, 0x3207 }, { 4384, 0xb5d6 }, { 4394, 0x32e8 }, { 4401, 0x5f91 },
+  { 4410, 0x50a1 }, { 4415, 0x20e5 }, { 4421, 0x7c00 }, { 4426, 0x1080 },
+  { 4428, 0x7280 }, { 4433, 0x9d8a }, { 4441, 0x00aa }, { 4445, 0x421f },
+  { 4452, 0x0e22 }, { 4457, 0x0231 }, { 4461, 0x1100 }, { 4463, 0x0494 },
+  /* 0x7900 */
+  { 4467, 0x0022 }, { 4469, 0x4008 }, { 4471, 0x0010 }, { 4472, 0x5c10 },
+  { 4477, 0x0343 }, { 4482, 0xfcc8 }, { 4491, 0xa1a5 }, { 4498, 0x0580 },
+  { 4501, 0x8433 }, { 4507, 0x0400 }, { 4508, 0x0080 }, { 4509, 0x6e08 },
+  { 4515, 0x2a4b }, { 4522, 0x8126 }, { 4527, 0xaad8 }, { 4535, 0x2901 },
+  /* 0x7a00 */
+  { 4539, 0x684d }, { 4546, 0x4490 }, { 4550, 0x0009 }, { 4552, 0xba88 },
+  { 4559, 0x0040 }, { 4560, 0x0082 }, { 4562, 0x0000 }, { 4562, 0x87d1 },
+  { 4570, 0x215b }, { 4577, 0xb1e6 }, { 4586, 0x3161 }, { 4592, 0x8008 },
+  { 4594, 0x0800 }, { 4595, 0xc240 }, { 4599, 0xa069 }, { 4605, 0xa600 },
+  /* 0x7b00 */
+  { 4609, 0x8d58 }, { 4616, 0x4a32 }, { 4622, 0x5d71 }, { 4631, 0x550a },
+  { 4637, 0x9aa0 }, { 4643, 0x2d57 }, { 4652, 0x4005 }, { 4655, 0x4aa6 },
+  { 4662, 0x2021 }, { 4665, 0x30b1 }, { 4671, 0x3fc6 }, { 4681, 0x0112 },
+  { 4684, 0x10c2 }, { 4688, 0x260a }, { 4693, 0x4462 }, { 4698, 0x5082 },
+  /* 0x7c00 */
+  { 4702, 0x9880 }, { 4706, 0x8040 }, { 4708, 0x04c0 }, { 4711, 0x8100 },
+  { 4713, 0x2003 }, { 4716, 0x0000 }, { 4716, 0x0000 }, { 4716, 0x3818 },
+  { 4721, 0x0200 }, { 4722, 0xf1a6 }, { 4731, 0x4434 }, { 4736, 0x720e },
+  { 4743, 0x35a2 }, { 4750, 0x92e0 }, { 4756, 0x8101 }, { 4759, 0x0900 },
+  /* 0x7d00 */
+  { 4761, 0x0400 }, { 4762, 0x0000 }, { 4762, 0x8885 }, { 4767, 0x0000 },
+  { 4767, 0x0000 }, { 4767, 0x0000 }, { 4767, 0x4000 }, { 4768, 0x0080 },
+  { 4769, 0x0000 }, { 4769, 0x0000 }, { 4769, 0x4040 }, { 4771, 0x0000 },
+  { 4771, 0x0000 }, { 4771, 0x0000 }, { 4771, 0x0000 }, { 4771, 0x0000 },
+  /* 0x7e00 */
+  { 4771, 0x0000 }, { 4771, 0x0000 }, { 4771, 0x0000 }, { 4771, 0x0800 },
+  { 4772, 0x0082 }, { 4774, 0x0000 }, { 4774, 0x0000 }, { 4774, 0x0000 },
+  { 4774, 0x0004 }, { 4775, 0x8800 }, { 4777, 0xbfff }, { 4792, 0xe7ef },
+  { 4805, 0xffff }, { 4821, 0xffbf }, { 4836, 0xefef }, { 4850, 0xfdff },
+  /* 0x7f00 */
+  { 4865, 0xfbff }, { 4880, 0xbffe }, { 4894, 0xffff }, { 4910, 0x057f },
+  { 4919, 0x0034 }, { 4922, 0x85b3 }, { 4930, 0x4706 }, { 4936, 0x4216 },
+  { 4941, 0x5402 }, { 4945, 0xe410 }, { 4950, 0x8092 }, { 4954, 0xb305 },
+  { 4961, 0x5422 }, { 4966, 0x8130 }, { 4970, 0x4263 }, { 4976, 0x180b },
+  /* 0x8000 */
+  { 4981, 0x387b }, { 4990, 0x13f5 }, { 4999, 0x07e5 }, { 5007, 0xa9ea },
+  { 5016, 0x3c4c }, { 5023, 0x0514 }, { 5027, 0x0600 }, { 5029, 0x8002 },
+  { 5031, 0x1ad9 }, { 5039, 0xbd48 }, { 5047, 0xee37 }, { 5058, 0xf496 },
+  { 5067, 0x705f }, { 5076, 0x7ec0 }, { 5084, 0xbfb2 }, { 5095, 0x355f },
+  /* 0x8100 */
+  { 5105, 0xe644 }, { 5112, 0x455f }, { 5121, 0x9000 }, { 5123, 0x4146 },
+  { 5128, 0x1d40 }, { 5133, 0x063b }, { 5140, 0x62a1 }, { 5146, 0xfe13 },
+  { 5156, 0x8505 }, { 5161, 0x3902 }, { 5166, 0x0548 }, { 5170, 0x0c08 },
+  { 5173, 0x144f }, { 5180, 0x0000 }, { 5180, 0x3488 }, { 5185, 0x5818 },
+  /* 0x8200 */
+  { 5190, 0x3077 }, { 5198, 0xd815 }, { 5205, 0xbd0e }, { 5214, 0x4bfb },
+  { 5225, 0x8a90 }, { 5230, 0x8500 }, { 5233, 0xc100 }, { 5236, 0xe61d },
+  { 5245, 0xed14 }, { 5253, 0xb386 }, { 5261, 0xff72 }, { 5273, 0x639b },
+  { 5282, 0xfd92 }, { 5292, 0xd9be }, { 5303, 0x887b }, { 5311, 0x0a92 },
+  /* 0x8300 */
+  { 5316, 0xd3fe }, { 5328, 0x1cb2 }, { 5335, 0xb980 }, { 5341, 0x177a },
+  { 5350, 0x82c9 }, { 5356, 0xdc17 }, { 5365, 0xfffb }, { 5380, 0x3980 },
+  { 5385, 0x4260 }, { 5389, 0x590c }, { 5395, 0x0f01 }, { 5400, 0x37df },
+  { 5412, 0x94a3 }, { 5419, 0xb150 }, { 5425, 0x0623 }, { 5430, 0x2307 },
+  /* 0x8400 */
+  { 5436, 0xf85a }, { 5445, 0x3102 }, { 5449, 0x01f0 }, { 5454, 0x3102 },
+  { 5458, 0x0040 }, { 5459, 0x1e82 }, { 5465, 0x3a0a }, { 5471, 0x056a },
+  { 5477, 0x5b84 }, { 5484, 0x1280 }, { 5487, 0x8002 }, { 5489, 0xa714 },
+  { 5496, 0x2612 }, { 5501, 0xa04b }, { 5507, 0x1069 }, { 5512, 0x9001 },
+  /* 0x8500 */
+  { 5515, 0x1000 }, { 5516, 0x848a }, { 5521, 0x1802 }, { 5524, 0x3f80 },
+  { 5531, 0x0708 }, { 5535, 0x4240 }, { 5538, 0x0110 }, { 5540, 0x4e14 },
+  { 5546, 0x80b0 }, { 5550, 0x1800 }, { 5552, 0xc510 }, { 5557, 0x0281 },
+  { 5560, 0x8202 }, { 5563, 0x1029 }, { 5567, 0x0210 }, { 5569, 0x8800 },
+  /* 0x8600 */
+  { 5571, 0x0020 }, { 5572, 0x0042 }, { 5574, 0x0280 }, { 5576, 0x1100 },
+  { 5578, 0xe000 }, { 5581, 0x4413 }, { 5586, 0x5804 }, { 5590, 0xfe02 },
+  { 5598, 0x3c07 }, { 5605, 0x3028 }, { 5609, 0x9798 }, { 5617, 0x0473 },
+  { 5623, 0xced1 }, { 5632, 0xcb13 }, { 5640, 0x6210 }, { 5644, 0x431f },
+  /* 0x8700 */
+  { 5652, 0x278d }, { 5660, 0x55ac }, { 5668, 0x422e }, { 5674, 0xc892 },
+  { 5680, 0x5380 }, { 5685, 0x0288 }, { 5688, 0x4039 }, { 5693, 0x7851 },
+  { 5700, 0x292c }, { 5706, 0x8088 }, { 5709, 0xb900 }, { 5714, 0x2428 },
+  { 5718, 0x0c41 }, { 5722, 0x080e }, { 5726, 0x4421 }, { 5730, 0x4200 },
+  /* 0x8800 */
+  { 5732, 0x0408 }, { 5734, 0x0868 }, { 5738, 0x0006 }, { 5740, 0x1204 },
+  { 5743, 0x3031 }, { 5748, 0x0290 }, { 5751, 0x5b3e }, { 5761, 0xe085 },
+  { 5767, 0x2936 }, { 5774, 0x1044 }, { 5777, 0x2814 }, { 5781, 0x1082 },
+  { 5784, 0x4266 }, { 5790, 0x8334 }, { 5796, 0x013c }, { 5801, 0x531b },
+  /* 0x8900 */
+  { 5809, 0x0404 }, { 5811, 0x0e0d }, { 5817, 0x0c22 }, { 5821, 0x0051 },
+  { 5824, 0x0012 }, { 5826, 0xc000 }, { 5828, 0x0040 }, { 5829, 0x8800 },
+  { 5831, 0x004a }, { 5834, 0x0000 }, { 5834, 0x0000 }, { 5834, 0x0000 },
+  { 5834, 0xdff6 }, { 5847, 0x5447 }, { 5854, 0x8868 }, { 5859, 0x0008 },
+  /* 0x8a00 */
+  { 5860, 0x0081 }, { 5862, 0x0000 }, { 5862, 0x0000 }, { 5862, 0x4000 },
+  { 5863, 0x0100 }, { 5864, 0x0000 }, { 5864, 0x0000 }, { 5864, 0x0200 },
+  { 5865, 0x0600 }, { 5867, 0x0008 }, { 5868, 0x0000 }, { 5868, 0x0000 },
+  { 5868, 0x0000 }, { 5868, 0x0000 }, { 5868, 0x0000 }, { 5868, 0x0000 },
+  /* 0x8b00 */
+  { 5868, 0x0080 }, { 5869, 0x0000 }, { 5869, 0x0040 }, { 5870, 0x0000 },
+  { 5870, 0x0000 }, { 5870, 0x0000 }, { 5870, 0x1040 }, { 5872, 0x0000 },
+  { 5872, 0x0000 }, { 5872, 0x0000 }, { 5872, 0xefff }, { 5887, 0xf7fd },
+  { 5901, 0xff7f }, { 5916, 0xfffe }, { 5931, 0xfbff }, { 5946, 0xffff },
+  /* 0x8c00 */
+  { 5962, 0xfdff }, { 5977, 0xbfff }, { 5992, 0xffff }, { 6008, 0x00ff },
+  { 6016, 0x12c2 }, { 6021, 0x0420 }, { 6023, 0x0c06 }, { 6027, 0x0708 },
+  { 6031, 0x1624 }, { 6036, 0x0110 }, { 6038, 0x0000 }, { 6038, 0x0000 },
+  { 6038, 0x0000 }, { 6038, 0x0000 }, { 6038, 0x0000 }, { 6038, 0x0000 },
+  /* 0x8d00 */
+  { 6038, 0x0000 }, { 6038, 0xe000 }, { 6041, 0xfffe }, { 6056, 0xffff },
+  { 6072, 0xffff }, { 6088, 0x7f79 }, { 6100, 0x28df }, { 6109, 0x00f9 },
+  { 6115, 0x0c32 }, { 6120, 0x8012 }, { 6123, 0x0008 }, { 6124, 0xd53a },
+  { 6133, 0xd858 }, { 6140, 0xecc2 }, { 6148, 0x9d18 }, { 6155, 0x2fa8 },
+  /* 0x8e00 */
+  { 6163, 0x9620 }, { 6168, 0xe010 }, { 6172, 0xd60c }, { 6179, 0x2622 },
+  { 6184, 0x0f97 }, { 6193, 0x0206 }, { 6196, 0xb240 }, { 6201, 0x9055 },
+  { 6207, 0x80a2 }, { 6211, 0x5011 }, { 6215, 0x9800 }, { 6218, 0x0404 },
+  { 6220, 0x4000 }, { 6221, 0x0000 }, { 6221, 0x0000 }, { 6221, 0x0000 },
+  /* 0x8f00 */
+  { 6221, 0x0000 }, { 6221, 0x0000 }, { 6221, 0x0000 }, { 6221, 0x0000 },
+  { 6221, 0x0000 }, { 6221, 0x0000 }, { 6221, 0xfbc0 }, { 6230, 0xffff },
+  { 6246, 0xeffe }, { 6260, 0xdffb }, { 6274, 0x0b08 }, { 6278, 0x6243 },
+  { 6284, 0x41b6 }, { 6291, 0xfb3b }, { 6303, 0x6f74 }, { 6313, 0x2389 },
+  /* 0x9000 */
+  { 6319, 0xae7f }, { 6331, 0xecd7 }, { 6342, 0xe047 }, { 6349, 0x5960 },
+  { 6355, 0xa096 }, { 6361, 0x098f }, { 6368, 0x612c }, { 6374, 0xa030 },
+  { 6378, 0x090d }, { 6383, 0x2aaa }, { 6390, 0xd44e }, { 6398, 0x4f7b },
+  { 6409, 0xc4b2 }, { 6416, 0x388b }, { 6423, 0xa9c6 }, { 6431, 0x6110 },
+  /* 0x9100 */
+  { 6435, 0x0014 }, { 6437, 0x4200 }, { 6439, 0x800c }, { 6442, 0x0202 },
+  { 6444, 0xfe48 }, { 6453, 0x6485 }, { 6459, 0xd63e }, { 6469, 0xe3f7 },
+  { 6481, 0x3aa0 }, { 6487, 0x0c07 }, { 6492, 0xe40c }, { 6498, 0x0430 },
+  { 6501, 0xf680 }, { 6508, 0x1002 }, { 6510, 0x0000 }, { 6510, 0x0000 },
+  /* 0x9200 */
+  { 6510, 0x0000 }, { 6510, 0x0000 }, { 6510, 0x0000 }, { 6510, 0x0000 },
+  { 6510, 0x0000 }, { 6510, 0x0000 }, { 6510, 0x0000 }, { 6510, 0x0010 },
+  { 6511, 0x4000 }, { 6512, 0x0000 }, { 6512, 0x4000 }, { 6513, 0x0000 },
+  { 6513, 0x0100 }, { 6514, 0x0000 }, { 6514, 0x0000 }, { 6514, 0x0000 },
+  /* 0x9300 */
+  { 6514, 0x0000 }, { 6514, 0x0000 }, { 6514, 0x0000 }, { 6514, 0x4000 },
+  { 6515, 0x0000 }, { 6515, 0x0000 }, { 6515, 0x0400 }, { 6516, 0x0000 },
+  { 6516, 0x8000 }, { 6517, 0x0000 }, { 6517, 0x0000 }, { 6517, 0x0000 },
+  { 6517, 0x0400 }, { 6518, 0x0040 }, { 6519, 0x0000 }, { 6519, 0x0000 },
+  /* 0x9400 */
+  { 6519, 0x0000 }, { 6519, 0x0000 }, { 6519, 0x0000 }, { 6519, 0x4000 },
+  { 6520, 0x0000 }, { 6520, 0x0000 }, { 6520, 0x0800 }, { 6521, 0x0000 },
+  { 6521, 0xffe0 }, { 6532, 0xfebd }, { 6545, 0xffff }, { 6561, 0xffff },
+  { 6577, 0x7f7f }, { 6591, 0xfbe7 }, { 6604, 0xffbf }, { 6619, 0xf7ff },
+  /* 0x9500 */
+  { 6634, 0xffff }, { 6650, 0xefff }, { 6665, 0xff7e }, { 6679, 0xdff7 },
+  { 6693, 0xf6f7 }, { 6706, 0xfbdf }, { 6720, 0xbffe }, { 6734, 0x804f },
+  { 6740, 0x0000 }, { 6740, 0x0000 }, { 6740, 0x0000 }, { 6740, 0x0000 },
+  { 6740, 0x0000 }, { 6740, 0x0000 }, { 6740, 0xef00 }, { 6747, 0x7fff },
+  /* 0x9600 */
+  { 6762, 0xff7f }, { 6777, 0xb6f7 }, { 6789, 0x4406 }, { 6793, 0xb87e },
+  { 6803, 0x3bf5 }, { 6814, 0x8831 }, { 6819, 0x1796 }, { 6827, 0x00f4 },
+  { 6832, 0xa960 }, { 6838, 0x1391 }, { 6844, 0x0080 }, { 6845, 0x7249 },
+  { 6852, 0xf2f3 }, { 6863, 0x0024 }, { 6865, 0x8701 }, { 6870, 0x42c8 },
+  /* 0x9700 */
+  { 6875, 0xe3d3 }, { 6885, 0x5048 }, { 6889, 0x2400 }, { 6891, 0x4305 },
+  { 6896, 0x0000 }, { 6896, 0x4a4c }, { 6902, 0x0227 }, { 6907, 0x1058 },
+  { 6911, 0x2820 }, { 6914, 0x0116 }, { 6918, 0xa809 }, { 6923, 0x0014 },
+  { 6925, 0x0000 }, { 6925, 0x0000 }, { 6925, 0x3ec0 }, { 6932, 0x0068 },
+  /* 0x9800 */
+  { 6935, 0x0000 }, { 6935, 0x0000 }, { 6935, 0x0000 }, { 6935, 0x0000 },
+  { 6935, 0x0000 }, { 6935, 0x0000 }, { 6935, 0x0000 }, { 6935, 0xffe0 },
+  { 6946, 0xb7ff }, { 6960, 0xfddb }, { 6973, 0x00f7 }, { 6980, 0x0000 },
+  { 6980, 0x4000 }, { 6981, 0xc72e }, { 6990, 0x0180 }, { 6992, 0x0000 },
+  /* 0x9900 */
+  { 6992, 0x2000 }, { 6993, 0x0001 }, { 6994, 0x4000 }, { 6995, 0x0000 },
+  { 6995, 0x0000 }, { 6995, 0x0030 }, { 6997, 0xffa8 }, { 7008, 0xb4f7 },
+  { 7019, 0xadf3 }, { 7030, 0x03ff }, { 7040, 0x0120 }, { 7042, 0x0000 },
+  { 7042, 0x0000 }, { 7042, 0x0000 }, { 7042, 0x0000 }, { 7042, 0x0000 },
+  /* 0x9a00 */
+  { 7042, 0x0000 }, { 7042, 0x0000 }, { 7042, 0x0000 }, { 7042, 0x0000 },
+  { 7042, 0x0000 }, { 7042, 0x0000 }, { 7042, 0xf000 }, { 7046, 0xfffb },
+  { 7061, 0x9df7 }, { 7073, 0xfdcf }, { 7086, 0x01bf }, { 7094, 0x15c3 },
+  { 7101, 0x1827 }, { 7107, 0x810a }, { 7111, 0xa842 }, { 7116, 0x0a00 },
+  /* 0x9b00 */
+  { 7118, 0x8108 }, { 7121, 0x8008 }, { 7123, 0x8008 }, { 7125, 0x1804 },
+  { 7128, 0xa3be }, { 7138, 0x0012 }, { 7140, 0x0000 }, { 7140, 0x0000 },
+  { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 },
+  { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 },
+  /* 0x9c00 */
+  { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 },
+  { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x0000 }, { 7140, 0x9000 },
+  { 7142, 0x69e6 }, { 7151, 0xdc37 }, { 7161, 0x6bff }, { 7174, 0x3dff },
+  { 7187, 0xfcf8 }, { 7198, 0xf3f9 }, { 7210, 0x0004 },
+};
+static const Summary16 gb2312_uni2indx_page9e[27] = {
+  /* 0x9e00 */
+  { 7211, 0x0000 }, { 7211, 0x8000 }, { 7212, 0xbf6f }, { 7225, 0xe7ee },
+  { 7237, 0xdffe }, { 7251, 0x5da2 }, { 7259, 0x3fd8 }, { 7269, 0xc00b },
+  { 7274, 0x0984 }, { 7278, 0xa00c }, { 7282, 0x0040 }, { 7283, 0x6910 },
+  { 7288, 0xe210 }, { 7293, 0xb912 }, { 7300, 0x86a5 }, { 7307, 0x5a00 },
+  /* 0x9f00 */
+  { 7311, 0x6800 }, { 7314, 0x0289 }, { 7318, 0x9005 }, { 7322, 0x6a80 },
+  { 7327, 0x0010 }, { 7328, 0x0003 }, { 7330, 0x0000 }, { 7330, 0x8000 },
+  { 7331, 0x1ff9 }, { 7342, 0x8e00 }, { 7346, 0x0001 },
+};
+static const Summary16 gb2312_uni2indx_pageff[15] = {
+  /* 0xff00 */
+  { 7347, 0xfffe }, { 7362, 0xffff }, { 7378, 0xffff }, { 7394, 0xffff },
+  { 7410, 0xffff }, { 7426, 0x7fff }, { 7441, 0x0000 }, { 7441, 0x0000 },
+  { 7441, 0x0000 }, { 7441, 0x0000 }, { 7441, 0x0000 }, { 7441, 0x0000 },
+  { 7441, 0x0000 }, { 7441, 0x0000 }, { 7441, 0x002b },
+};
+
+static int
+gb2312_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    const Summary16 *summary = NULL;
+    if (wc < 0x0460)
+      summary = &gb2312_uni2indx_page00[(wc>>4)];
+    else if (wc >= 0x2000 && wc < 0x2650)
+      summary = &gb2312_uni2indx_page20[(wc>>4)-0x200];
+    else if (wc >= 0x3000 && wc < 0x3230)
+      summary = &gb2312_uni2indx_page30[(wc>>4)-0x300];
+    else if (wc >= 0x4e00 && wc < 0x9cf0)
+      summary = &gb2312_uni2indx_page4e[(wc>>4)-0x4e0];
+    else if (wc >= 0x9e00 && wc < 0x9fb0)
+      summary = &gb2312_uni2indx_page9e[(wc>>4)-0x9e0];
+    else if (wc >= 0xff00 && wc < 0xfff0)
+      summary = &gb2312_uni2indx_pageff[(wc>>4)-0xff0];
+    if (summary) {
+      unsigned short used = summary->used;
+      unsigned int i = wc & 0x0f;
+      if (used & ((unsigned short) 1 << i)) {
+        unsigned short c;
+        /* Keep in `used' only the bits 0..i-1. */
+        used &= ((unsigned short) 1 << i) - 1;
+        /* Add `summary->indx' and the number of bits set in `used'. */
+        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);
+        used = (used & 0x3333) + ((used & 0xcccc) >> 2);
+        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);
+        used = (used & 0x00ff) + (used >> 8);
+        c = gb2312_2charset[summary->indx + used];
+        r[0] = (c >> 8); r[1] = (c & 0xff);
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/gbk_tab_to_h.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/gbk_tab_to_h.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/gbk_tab_to_h.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1020 @@
+/* $XFree86: xc/lib/X11/lcUniConv/cjk_tab_to_h.c,v 1.2 2000/12/04 18:49:31 dawes Exp $ */
+
+/* 2009-02-17 <sparkaround@gmail.com>: Create gbk_tab_to_h.c from 
+ * cjk_tab_to_h.c to generate GBK(cp936ext) table correctly.
+ *
+ *
+ * Generates a CJK character set table from a .TXT table as found on
+ * ftp.unicode.org or in the X nls directory.
+ * Examples:
+ *
+ *   ./gbk_tab_to_h CP936EXT cp936ext > cp936ext.h < CP936EXT.TXT
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+typedef struct {
+  int start;
+  int end;
+} Block;
+
+typedef struct {
+  int rows;    /* number of possible values for the 1st byte */
+  int cols;    /* number of possible values for the 2nd byte */
+  int (*row_byte) (int row); /* returns the 1st byte value for a given row */
+  int (*col_byte) (int col); /* returns the 2nd byte value for a given col */
+  int (*byte_row) (int byte); /* converts a 1st byte value to a row, else -1 */
+  int (*byte_col) (int byte); /* converts a 2nd byte value to a col, else -1 */
+  const char* check_row_expr; /* format string for 1st byte value checking */
+  const char* check_col_expr; /* format string for 2nd byte value checking */
+  const char* byte_row_expr; /* format string for 1st byte value to row */
+  const char* byte_col_expr; /* format string for 2nd byte value to col */
+  int** charset2uni; /* charset2uni[0..rows-1][0..cols-1] is valid */
+  /* You'll understand the terms "row" and "col" when you buy Ken Lunde's book.
+     Once a row is fixed, choosing a "col" is the same as choosing a "cell". */
+  int* charsetpage; /* charsetpage[0..rows]: how large is a page for a row */
+  int ncharsetblocks;
+  Block* charsetblocks; /* blocks[0..nblocks-1] */
+  int* uni2charset; /* uni2charset[0x0000..0xffff] */
+} Encoding;
+
+/*
+ * Outputs the file title.
+ */
+static void output_title (const char *charsetname)
+{
+  printf("\n");
+  printf("/*\n");
+  printf(" * %s\n", charsetname);
+  printf(" */\n");
+  printf("\n");
+}
+
+/*
+ * Reads the charset2uni table from standard input.
+ */
+static void read_table (Encoding* enc)
+{
+  int row, col, i, i1, i2, c, j;
+
+  enc->charset2uni = (int**) malloc(enc->rows*sizeof(int*));
+  for (row = 0; row < enc->rows; row++)
+    enc->charset2uni[row] = (int*) malloc(enc->cols*sizeof(int));
+
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++)
+      enc->charset2uni[row][col] = 0xfffd;
+
+  c = getc(stdin);
+  ungetc(c,stdin);
+  if (c == '#') {
+    /* Read a unicode.org style .TXT file. */
+    for (;;) {
+      c = getc(stdin);
+      if (c == EOF)
+        break;
+      if (c == '\n' || c == ' ' || c == '\t')
+        continue;
+      if (c == '#') {
+        do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
+        continue;
+      }
+      ungetc(c,stdin);
+      if (scanf("0x%x", &j) != 1)
+        exit(1);
+      i1 = j >> 8;
+      i2 = j & 0xff;
+      row = enc->byte_row(i1);
+      col = enc->byte_col(i2);
+      if (row < 0 || col < 0) {
+        fprintf(stderr, "lost entry for %02x %02x\n", i1, i2);
+        exit(1);
+      }
+      if (scanf(" 0x%x", &enc->charset2uni[row][col]) != 1)
+        exit(1);
+    }
+  } else {
+    /* Read a table of hexadecimal Unicode values. */
+    for (i1 = 32; i1 < 132; i1++)
+      for (i2 = 32; i2 < 132; i2++) {
+        i = scanf("%x", &j);
+        if (i == EOF)
+          goto read_done;
+        if (i != 1)
+          exit(1);
+        if (j < 0 || j == 0xffff)
+          j = 0xfffd;
+        if (j != 0xfffd) {
+          if (enc->byte_row(i1) < 0 || enc->byte_col(i2) < 0) {
+            fprintf(stderr, "lost entry at %02x %02x\n", i1, i2);
+            exit (1);
+          }
+          enc->charset2uni[enc->byte_row(i1)][enc->byte_col(i2)] = j;
+        }
+      }
+   read_done: ;
+  }
+}
+
+/*
+ * Computes the charsetpage[0..rows] array.
+ */
+static void find_charset2uni_pages (Encoding* enc)
+{
+  int row, col;
+
+  enc->charsetpage = (int*) malloc((enc->rows+1)*sizeof(int));
+
+  for (row = 0; row <= enc->rows; row++)
+    enc->charsetpage[row] = 0;
+
+  for (row = 0; row < enc->rows; row++) {
+    int used = 0;
+    for (col = 0; col < enc->cols; col++)
+      if (enc->charset2uni[row][col] != 0xfffd)
+        used = col+1;
+    enc->charsetpage[row] = used;
+  }
+}
+
+/*
+ * Fills in nblocks and blocks.
+ */
+static void find_charset2uni_blocks (Encoding* enc)
+{
+  int n, row, lastrow;
+
+  enc->charsetblocks = (Block*) malloc(enc->rows*sizeof(Block));
+
+  n = 0;
+  for (row = 0; row < enc->rows; row++)
+    if (enc->charsetpage[row] > 0 && (row == 0 || enc->charsetpage[row-1] == 0)) {
+      for (lastrow = row; enc->charsetpage[lastrow+1] > 0; lastrow++);
+      enc->charsetblocks[n].start = row * enc->cols;
+      enc->charsetblocks[n].end = lastrow * enc->cols + enc->charsetpage[lastrow];
+      n++;
+    }
+  enc->ncharsetblocks = n;
+}
+
+/*
+ * Outputs the charset to unicode table and function.
+ */
+static void output_charset2uni (const char* name, Encoding* enc)
+{
+  int row, col, lastrow, col_max, i, i1_min, i1_max;
+
+  find_charset2uni_pages(enc);
+
+  find_charset2uni_blocks(enc);
+
+  for (row = 0; row < enc->rows; row++)
+    if (enc->charsetpage[row] > 0) {
+      if (row == 0 || enc->charsetpage[row-1] == 0) {
+        /* Start a new block. */
+        for (lastrow = row; enc->charsetpage[lastrow+1] > 0; lastrow++);
+        printf("static const unsigned short %s_2uni_page%02x[%d] = {\n",
+               name, enc->row_byte(row),
+               (lastrow-row) * enc->cols + enc->charsetpage[lastrow]);
+      }
+      printf("  /""* 0x%02x *""/\n ", enc->row_byte(row));
+      col_max = (enc->charsetpage[row+1] > 0 ? enc->cols : enc->charsetpage[row]);
+      for (col = 0; col < col_max; col++) {
+        printf(" 0x%04x,", enc->charset2uni[row][col]);
+        if ((col % 8) == 7 && (col+1 < col_max)) printf("\n ");
+      }
+      printf("\n");
+      if (enc->charsetpage[row+1] == 0) {
+        /* End a block. */
+        printf("};\n");
+      }
+    }
+  printf("\n");
+
+  printf("static int\n");
+  printf("%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n", name);
+  printf("{\n");
+  printf("  unsigned char c1 = s[0];\n");
+  printf("  if (");
+  for (i = 0; i < enc->ncharsetblocks; i++) {
+    i1_min = enc->row_byte(enc->charsetblocks[i].start / enc->cols);
+    i1_max = enc->row_byte((enc->charsetblocks[i].end-1) / enc->cols);
+    if (i > 0)
+      printf(" || ");
+    if (i1_min == i1_max)
+      printf("(c1 == 0x%02x)", i1_min);
+    else
+      printf("(c1 >= 0x%02x && c1 <= 0x%02x)", i1_min, i1_max);
+  }
+  printf(") {\n");
+  printf("    if (n >= 2) {\n");
+  printf("      unsigned char c2 = s[1];\n");
+  printf("      if (");
+  printf(enc->check_col_expr, "c2");
+  printf(") {\n");
+  printf("        unsigned int i = %d * (", enc->cols);
+  printf(enc->byte_row_expr, "c1");
+  printf(") + (");
+  printf(enc->byte_col_expr, "c2");
+  printf(");\n");
+  printf("        unsigned short wc = 0xfffd;\n");
+  for (i = 0; i < enc->ncharsetblocks; i++) {
+    printf("        ");
+    if (i > 0)
+      printf("} else ");
+    if (i < enc->ncharsetblocks-1)
+      printf("if (i < %d) ", enc->charsetblocks[i+1].start);
+    printf("{\n");
+    printf("          if (i < %d)\n", enc->charsetblocks[i].end);
+    printf("            wc = %s_2uni_page%02x[i", name, enc->row_byte(enc->charsetblocks[i].start / enc->cols));
+    if (enc->charsetblocks[i].start > 0)
+      printf("-%d", enc->charsetblocks[i].start);
+    printf("];\n");
+  }
+  printf("        }\n");
+  printf("        if (wc != 0xfffd) {\n");
+  printf("          *pwc = (ucs4_t) wc;\n");
+  printf("          return 2;\n");
+  printf("        }\n");
+  printf("      }\n");
+  printf("      return RET_ILSEQ;\n");
+  printf("    }\n");
+  printf("    return RET_TOOFEW(0);\n");
+  printf("  }\n");
+  printf("  return RET_ILSEQ;\n");
+  printf("}\n");
+  printf("\n");
+}
+
+/*
+ * Computes the uni2charset[0x0000..0xffff] array.
+ */
+static void invert (Encoding* enc)
+{
+  int row, col, j;
+
+  enc->uni2charset = (int*) malloc(0x10000*sizeof(int));
+
+  for (j = 0; j < 0x10000; j++)
+    enc->uni2charset[j] = 0;
+
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++) {
+      j = enc->charset2uni[row][col];
+      if (j != 0xfffd)
+        enc->uni2charset[j] = 0x100 * enc->row_byte(row) + enc->col_byte(col);
+    }
+}
+
+/*
+ * Outputs the unicode to charset table and function, using a linear array.
+ * (Suitable if the table is dense.)
+ */
+static void output_uni2charset_dense (const char* name, Encoding* enc)
+{
+  /* Like in 8bit_tab_to_h.c */
+  bool pages[0x100];
+  int line[0x2000];
+  int tableno;
+  struct { int minline; int maxline; int usecount; } tables[0x2000];
+  bool first;
+  int row, col, j, p, j1, j2, t;
+
+  for (p = 0; p < 0x100; p++)
+    pages[p] = false;
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++) {
+      j = enc->charset2uni[row][col];
+      if (j != 0xfffd)
+        pages[j>>8] = true;
+    }
+  for (j1 = 0; j1 < 0x2000; j1++) {
+    bool all_invalid = true;
+    for (j2 = 0; j2 < 8; j2++) {
+      j = 8*j1+j2;
+      if (enc->uni2charset[j] != 0)
+        all_invalid = false;
+    }
+    if (all_invalid)
+      line[j1] = -1;
+    else
+      line[j1] = 0;
+  }
+  tableno = 0;
+  for (j1 = 0; j1 < 0x2000; j1++) {
+    if (line[j1] >= 0) {
+      if (tableno > 0
+          && ((j1 > 0 && line[j1-1] == tableno-1)
+              || ((tables[tableno-1].maxline >> 5) == (j1 >> 5)
+                  && j1 - tables[tableno-1].maxline <= 8))) {
+        line[j1] = tableno-1;
+        tables[tableno-1].maxline = j1;
+      } else {
+        tableno++;
+        line[j1] = tableno-1;
+        tables[tableno-1].minline = tables[tableno-1].maxline = j1;
+      }
+    }
+  }
+  for (t = 0; t < tableno; t++) {
+    tables[t].usecount = 0;
+    j1 = 8*tables[t].minline;
+    j2 = 8*(tables[t].maxline+1);
+    for (j = j1; j < j2; j++)
+      if (enc->uni2charset[j] != 0)
+        tables[t].usecount++;
+  }
+  {
+    p = -1;
+    for (t = 0; t < tableno; t++)
+      if (tables[t].usecount > 1) {
+        /* p = tables[t].minline >> 5; */
+        p = tables[t].minline ;
+        /* printf("static const unsigned short %s_page%02x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1)); */
+        printf("static const unsigned short %s_page%04x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1));
+        for (j1 = tables[t].minline; j1 <= tables[t].maxline; j1++) {
+          if ((j1 % 0x20) == 0 && j1 > tables[t].minline)
+            printf("  /* 0x%04x */\n", 8*j1);
+          printf(" ");
+          for (j2 = 0; j2 < 8; j2++) {
+            j = 8*j1+j2;
+            printf(" 0x%04x,", enc->uni2charset[j]);
+          }
+          printf(" /*0x%02x-0x%02x*/\n", 8*(j1 % 0x20), 8*(j1 % 0x20)+7);
+        }
+        printf("};\n");
+      }
+    if (p >= 0)
+      printf("\n");
+  }
+  printf("static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", name);
+  printf("{\n");
+  printf("  if (n >= 2) {\n");
+  printf("    unsigned short c = 0;\n");
+  first = true;
+  for (j1 = 0; j1 < 0x2000;) {
+    t = line[j1];
+    for (j2 = j1; j2 < 0x2000 && line[j2] == t; j2++);
+    if (t >= 0) {
+      if (j1 != tables[t].minline) abort();
+      if (j2 > tables[t].maxline+1) abort();
+      j2 = tables[t].maxline+1;
+      if (first)
+        printf("    ");
+      else
+        printf("    else ");
+      first = false;
+      if (tables[t].usecount == 0) abort();
+      if (tables[t].usecount == 1) {
+        if (j2 != j1+1) abort();
+        for (j = 8*j1; j < 8*j2; j++)
+          if (enc->uni2charset[j] != 0) {
+            printf("if (wc == 0x%04x)\n      c = 0x%02x;\n", j, enc->uni2charset[j]);
+            break;
+          }
+      } else {
+        if (j1 == 0) {
+          printf("if (wc < 0x%04x)", 8*j2);
+        } else {
+          printf("if (wc >= 0x%04x && wc < 0x%04x)", 8*j1, 8*j2);
+        }
+        /* printf("\n      c = %s_page%02x[wc", name, j1 >> 5); */
+        printf("\n      c = %s_page%04x[wc", name, j1);
+        if (tables[t].minline > 0)
+          printf("-0x%04x", 8*j1);
+        printf("];\n");
+      }
+    }
+    j1 = j2;
+  }
+  printf("    if (c != 0) {\n");
+  printf("      r[0] = (c >> 8); r[1] = (c & 0xff);\n");
+  printf("      return 2;\n");
+  printf("    }\n");
+  printf("    return RET_ILSEQ;\n");
+  printf("  }\n");
+  printf("  return RET_TOOSMALL;\n");
+  printf("}\n");
+}
+
+/*
+ * Outputs the unicode to charset table and function, using a packed array.
+ * (Suitable if the table is sparse.)
+ */
+static void output_uni2charset_sparse (const char* name, Encoding* enc)
+{
+  bool pages[0x100];
+  Block pageblocks[0x100]; int npageblocks;
+  int indx2charset[0x10000];
+  int summary_indx[0x1000];
+  int summary_used[0x1000];
+  int i, row, col, j, p, j1, j2, indx;
+
+  /* Fill pages[0x100]. */
+  for (p = 0; p < 0x100; p++)
+    pages[p] = false;
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++) {
+      j = enc->charset2uni[row][col];
+      if (j != 0xfffd)
+        pages[j>>8] = true;
+    }
+
+#if 0
+  for (p = 0; p < 0x100; p++)
+    if (pages[p]) {
+      printf("static const unsigned short %s_page%02x[256] = {\n", name, p);
+      for (j1 = 0; j1 < 32; j1++) {
+        printf("  ");
+        for (j2 = 0; j2 < 8; j2++)
+          printf("0x%04x, ", enc->uni2charset[256*p+8*j1+j2]);
+        printf("/""*0x%02x-0x%02x*""/\n", 8*j1, 8*j1+7);
+      }
+      printf("};\n");
+    }
+  printf("\n");
+#endif
+
+  /* Fill summary_indx[] and summary_used[]. */
+  indx = 0;
+  for (j1 = 0; j1 < 0x1000; j1++) {
+    summary_indx[j1] = indx;
+    summary_used[j1] = 0;
+    for (j2 = 0; j2 < 16; j2++) {
+      j = 16*j1+j2;
+      if (enc->uni2charset[j] != 0) {
+        indx2charset[indx++] = enc->uni2charset[j];
+        summary_used[j1] |= (1 << j2);
+      }
+    }
+  }
+
+  /* Fill npageblocks and pageblocks[]. */
+  npageblocks = 0;
+  for (p = 0; p < 0x100; ) {
+    if (pages[p] && (p == 0 || !pages[p-1])) {
+      pageblocks[npageblocks].start = 16*p;
+      do p++; while (p < 0x100 && pages[p]);
+      j1 = 16*p;
+      while (summary_used[j1-1] == 0) j1--;
+      pageblocks[npageblocks].end = j1;
+      npageblocks++;
+    } else
+      p++;
+  }
+
+  printf("static const unsigned short %s_2charset[%d] = {\n", name, indx);
+  for (i = 0; i < indx; ) {
+    if ((i % 8) == 0) printf(" ");
+    printf(" 0x%04x,", indx2charset[i]);
+    i++;
+    if ((i % 8) == 0 || i == indx) printf("\n");
+  }
+  printf("};\n");
+  printf("\n");
+  for (i = 0; i < npageblocks; i++) {
+    printf("static const Summary16 %s_uni2indx_page%02x[%d] = {\n", name,
+           pageblocks[i].start/16, pageblocks[i].end-pageblocks[i].start);
+    for (j1 = pageblocks[i].start; j1 < pageblocks[i].end; ) {
+      if (((16*j1) % 0x100) == 0) printf("  /""* 0x%04x *""/\n", 16*j1);
+      if ((j1 % 4) == 0) printf(" ");
+      printf(" { %4d, 0x%04x },", summary_indx[j1], summary_used[j1]);
+      j1++;
+      if ((j1 % 4) == 0 || j1 == pageblocks[i].end) printf("\n");
+    }
+    printf("};\n");
+  }
+  printf("\n");
+
+  printf("static int\n");
+  printf("%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", name);
+  printf("{\n");
+  printf("  if (n >= 2) {\n");
+  printf("    const Summary16 *summary = NULL;\n");
+  for (i = 0; i < npageblocks; i++) {
+    printf("    ");
+    if (i > 0)
+      printf("else ");
+    printf("if (wc >= 0x%04x && wc < 0x%04x)\n",
+           16*pageblocks[i].start, 16*pageblocks[i].end);
+    printf("      summary = &%s_uni2indx_page%02x[(wc>>4)", name,
+           pageblocks[i].start/16);
+    if (pageblocks[i].start > 0)
+      printf("-0x%03x", pageblocks[i].start);
+    printf("];\n");
+  }
+  printf("    if (summary) {\n");
+  printf("      unsigned short used = summary->used;\n");
+  printf("      unsigned int i = wc & 0x0f;\n");
+  printf("      if (used & ((unsigned short) 1 << i)) {\n");
+  printf("        unsigned short c;\n");
+  printf("        /* Keep in `used' only the bits 0..i-1. */\n");
+  printf("        used &= ((unsigned short) 1 << i) - 1;\n");
+  printf("        /* Add `summary->indx' and the number of bits set in `used'. */\n");
+  printf("        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);\n");
+  printf("        used = (used & 0x3333) + ((used & 0xcccc) >> 2);\n");
+  printf("        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);\n");
+  printf("        used = (used & 0x00ff) + (used >> 8);\n");
+  printf("        c = %s_2charset[summary->indx + used];\n", name);
+  printf("        r[0] = (c >> 8); r[1] = (c & 0xff);\n");
+  printf("        return 2;\n");
+  printf("      }\n");
+  printf("    }\n");
+  printf("    return RET_ILSEQ;\n");
+  printf("  }\n");
+  printf("  return RET_TOOSMALL;\n");
+  printf("}\n");
+}
+
+/* ISO-2022/EUC specifics */
+
+static int row_byte_normal (int row) { return 0x21+row; }
+static int col_byte_normal (int col) { return 0x21+col; }
+static int byte_row_normal (int byte) { return byte-0x21; }
+static int byte_col_normal (int byte) { return byte-0x21; }
+
+static void do_normal (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_normal;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_normal;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Note: On first sight, the jisx0212_2charset[] table seems to be in order,
+   starting from the charset=0x3021/uni=0x4e02 pair. But it's only mostly in
+   order. There are 75 out-of-order values, scattered all throughout the table.
+ */
+
+static void do_normal_only_charset2uni (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_normal;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_normal;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+}
+
+/* CNS 11643 specifics - trick to put two tables into one */
+
+static int row_byte_cns11643 (int row) {
+  return 0x100 * (row / 94) + (row % 94) + 0x21;
+}
+static int byte_row_cns11643 (int byte) {
+  return (byte >= 0x100 && byte < 0x200 ? byte-0x121 :
+          byte >= 0x200 && byte < 0x300 ? byte-0x221+94 :
+          byte >= 0x300 && byte < 0x400 ? byte-0x321+2*94 :
+          -1);
+}
+
+static void do_cns11643_only_uni2charset (const char* name)
+{
+  Encoding enc;
+  int j, x;
+
+  enc.rows = 3*94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_cns11643;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_cns11643;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table(&enc);
+  invert(&enc);
+  /* Move the 2 plane bits into the unused bits 15 and 7. */
+  for (j = 0; j < 0x10000; j++) {
+    x = enc.uni2charset[j];
+    if (x != 0) {
+      if (x & 0x8080) abort();
+      switch (x >> 16) {
+        case 0: /* plane 1 */ x = (x & 0xffff) | 0x0000; break;
+        case 1: /* plane 2 */ x = (x & 0xffff) | 0x0080; break;
+        case 2: /* plane 3 */ x = (x & 0xffff) | 0x8000; break;
+        default: abort();
+      }
+      enc.uni2charset[j] = x;
+    }
+  }
+  output_uni2charset_sparse(name,&enc);
+}
+
+/* GBK specifics */
+
+static int row_byte_gbk1 (int row) {
+  return 0x81+row;
+}
+static int col_byte_gbk1 (int col) {
+  return (col >= 0x3f ? 0x41 : 0x40) + col;
+}
+static int byte_row_gbk1 (int byte) {
+  if (byte >= 0x81 && byte < 0xff)
+    return byte-0x81;
+  else
+    return -1;
+}
+static int byte_col_gbk1 (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0x80 && byte < 0xff)
+    return byte-0x41;
+  else
+    return -1;
+}
+
+static void do_gbk1 (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 190;
+  enc.row_byte = row_byte_gbk1;
+  enc.col_byte = col_byte_gbk1;
+  enc.byte_row = byte_row_gbk1;
+  enc.byte_col = byte_col_gbk1;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_dense(name,&enc);
+}
+
+static void do_gbk1_only_charset2uni (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 190;
+  enc.row_byte = row_byte_gbk1;
+  enc.col_byte = col_byte_gbk1;
+  enc.byte_row = byte_row_gbk1;
+  enc.byte_col = byte_col_gbk1;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+}
+
+static int row_byte_gbk2 (int row) {
+  return 0x81+row;
+}
+static int col_byte_gbk2 (int col) {
+  return (col >= 0x3f ? 0x41 : 0x40) + col;
+}
+static int byte_row_gbk2 (int byte) {
+  if (byte >= 0x81 && byte < 0xff)
+    return byte-0x81;
+  else
+    return -1;
+}
+static int byte_col_gbk2 (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0x80 && byte < 0xa1)
+    return byte-0x41;
+  else
+    return -1;
+}
+
+static void do_gbk2_only_charset2uni (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 96;
+  enc.row_byte = row_byte_gbk2;
+  enc.col_byte = col_byte_gbk2;
+  enc.byte_row = byte_row_gbk2;
+  enc.byte_col = byte_col_gbk2;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xa1)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+}
+
+static void do_gbk1_only_uni2charset (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 126;
+  enc.cols = 190;
+  enc.row_byte = row_byte_gbk1;
+  enc.col_byte = col_byte_gbk1;
+  enc.byte_row = byte_row_gbk1;
+  enc.byte_col = byte_col_gbk1;
+  enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x81";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* KSC 5601 specifics */
+
+/*
+ * Reads the charset2uni table from standard input.
+ */
+static void read_table_ksc5601 (Encoding* enc)
+{
+  int row, col, i, i1, i2, c, j;
+
+  enc->charset2uni = (int**) malloc(enc->rows*sizeof(int*));
+  for (row = 0; row < enc->rows; row++)
+    enc->charset2uni[row] = (int*) malloc(enc->cols*sizeof(int));
+
+  for (row = 0; row < enc->rows; row++)
+    for (col = 0; col < enc->cols; col++)
+      enc->charset2uni[row][col] = 0xfffd;
+
+  c = getc(stdin);
+  ungetc(c,stdin);
+  if (c == '#') {
+    /* Read a unicode.org style .TXT file. */
+    for (;;) {
+      c = getc(stdin);
+      if (c == EOF)
+        break;
+      if (c == '\n' || c == ' ' || c == '\t')
+        continue;
+      if (c == '#') {
+        do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
+        continue;
+      }
+      ungetc(c,stdin);
+      if (scanf("0x%x", &j) != 1)
+        exit(1);
+      i1 = j >> 8;
+      i2 = j & 0xff;
+      if (scanf(" 0x%x", &j) != 1)
+        exit(1);
+      /* Take only the range covered by KS C 5601.1987-0 = KS C 5601.1989-0
+         = KS X 1001.1992, ignore the rest. */
+      if (!(i1 >= 128+33 && i1 < 128+127 && i2 >= 128+33 && i2 < 128+127))
+        continue;  /* KSC5601 specific */
+      i1 &= 0x7f;  /* KSC5601 specific */
+      i2 &= 0x7f;  /* KSC5601 specific */
+      row = enc->byte_row(i1);
+      col = enc->byte_col(i2);
+      if (row < 0 || col < 0) {
+        fprintf(stderr, "lost entry for %02x %02x\n", i1, i2);
+        exit(1);
+      }
+      enc->charset2uni[row][col] = j;
+    }
+  } else {
+    /* Read a table of hexadecimal Unicode values. */
+    for (i1 = 33; i1 < 127; i1++)
+      for (i2 = 33; i2 < 127; i2++) {
+        i = scanf("%x", &j);
+        if (i == EOF)
+          goto read_done;
+        if (i != 1)
+          exit(1);
+        if (j < 0 || j == 0xffff)
+          j = 0xfffd;
+        if (j != 0xfffd) {
+          if (enc->byte_row(i1) < 0 || enc->byte_col(i2) < 0) {
+            fprintf(stderr, "lost entry at %02x %02x\n", i1, i2);
+            exit (1);
+          }
+          enc->charset2uni[enc->byte_row(i1)][enc->byte_col(i2)] = j;
+        }
+      }
+   read_done: ;
+  }
+}
+
+static void do_ksc5601 (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 94;
+  enc.row_byte = row_byte_normal;
+  enc.col_byte = col_byte_normal;
+  enc.byte_row = byte_row_normal;
+  enc.byte_col = byte_col_normal;
+  enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
+  enc.byte_row_expr = "%1$s - 0x21";
+  enc.byte_col_expr = "%1$s - 0x21";
+
+  read_table_ksc5601(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Big5 specifics */
+
+static int row_byte_big5 (int row) {
+  return 0xa1+row;
+}
+static int col_byte_big5 (int col) {
+  return (col >= 0x3f ? 0x62 : 0x40) + col;
+}
+static int byte_row_big5 (int byte) {
+  if (byte >= 0xa1 && byte < 0xff)
+    return byte-0xa1;
+  else
+    return -1;
+}
+static int byte_col_big5 (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0xa1 && byte < 0xff)
+    return byte-0x62;
+  else
+    return -1;
+}
+
+static void do_big5 (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 157;
+  enc.row_byte = row_byte_big5;
+  enc.col_byte = col_byte_big5;
+  enc.byte_row = byte_row_big5;
+  enc.byte_col = byte_col_big5;
+  enc.check_row_expr = "%1$s >= 0xa1 && %1$s < 0xff";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0xa1 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0xa1";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0xa1 ? 0x62 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Johab Hangul specifics */
+
+static int row_byte_johab_hangul (int row) {
+  return 0x84+row;
+}
+static int col_byte_johab_hangul (int col) {
+  return (col >= 0x3e ? 0x43 : 0x41) + col;
+}
+static int byte_row_johab_hangul (int byte) {
+  if (byte >= 0x84 && byte < 0xd4)
+    return byte-0x84;
+  else
+    return -1;
+}
+static int byte_col_johab_hangul (int byte) {
+  if (byte >= 0x41 && byte < 0x7f)
+    return byte-0x41;
+  else if (byte >= 0x81 && byte < 0xff)
+    return byte-0x43;
+  else
+    return -1;
+}
+
+static void do_johab_hangul (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 80;
+  enc.cols = 188;
+  enc.row_byte = row_byte_johab_hangul;
+  enc.col_byte = col_byte_johab_hangul;
+  enc.byte_row = byte_row_johab_hangul;
+  enc.byte_col = byte_col_johab_hangul;
+  enc.check_row_expr = "%1$s >= 0x84 && %1$s < 0xd4";
+  enc.check_col_expr = "(%1$s >= 0x41 && %1$s < 0x7f) || (%1$s >= 0x81 && %1$s < 0xff)";
+  enc.byte_row_expr = "%1$s - 0x84";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x81 ? 0x43 : 0x41)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_dense(name,&enc);
+}
+
+/* SJIS specifics */
+
+static int row_byte_sjis (int row) {
+  return (row >= 0x1f ? 0xc1 : 0x81) + row;
+}
+static int col_byte_sjis (int col) {
+  return (col >= 0x3f ? 0x41 : 0x40) + col;
+}
+static int byte_row_sjis (int byte) {
+  if (byte >= 0x81 && byte < 0xa0)
+    return byte-0x81;
+  else if (byte >= 0xe0)
+    return byte-0xc1;
+  else
+    return -1;
+}
+static int byte_col_sjis (int byte) {
+  if (byte >= 0x40 && byte < 0x7f)
+    return byte-0x40;
+  else if (byte >= 0x80 && byte < 0xfd)
+    return byte-0x41;
+  else
+    return -1;
+}
+
+static void do_sjis (const char* name)
+{
+  Encoding enc;
+
+  enc.rows = 94;
+  enc.cols = 188;
+  enc.row_byte = row_byte_sjis;
+  enc.col_byte = col_byte_sjis;
+  enc.byte_row = byte_row_sjis;
+  enc.byte_col = byte_col_sjis;
+  enc.check_row_expr = "(%1$s >= 0x81 && %1$s < 0xa0) || (%1$s >= 0xe0)";
+  enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xfd)";
+  enc.byte_row_expr = "%1$s - (%1$s >= 0xe0 ? 0xc1 : 0x81)";
+  enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
+
+  read_table(&enc);
+  output_charset2uni(name,&enc);
+  invert(&enc); output_uni2charset_sparse(name,&enc);
+}
+
+/* Main program */
+
+int main (int argc, char *argv[])
+{
+  const char* charsetname;
+  const char* name;
+
+  if (argc != 3)
+    exit(1);
+  charsetname = argv[1];
+  name = argv[2];
+
+  output_title(charsetname);
+
+  if (!strcmp(name,"gb2312") || !strcmp(name,"gb12345ext")
+      || !strcmp(name,"jisx0208") || !strcmp(name,"jisx0212"))
+    do_normal(name);
+  else if (!strcmp(name,"cns11643_1") || !strcmp(name,"cns11643_2")
+           || !strcmp(name,"cns11643_3"))
+    do_normal_only_charset2uni(name);
+  else if (!strcmp(name,"cns11643_inv"))
+    do_cns11643_only_uni2charset(name);
+  else if (!strcmp(name,"gbkext1"))
+    do_gbk1_only_charset2uni(name);
+  else if (!strcmp(name,"gbkext2"))
+    do_gbk2_only_charset2uni(name);
+  else if (!strcmp(name,"gbkext_inv"))
+    do_gbk1_only_uni2charset(name);
+  else if (!strcmp(name,"cp936ext"))
+    do_gbk1(name);
+  else if (!strcmp(name,"ksc5601"))
+    do_ksc5601(name);
+  else if (!strcmp(name,"big5") || !strcmp(name,"cp950ext"))
+    do_big5(name);
+  else if (!strcmp(name,"johab_hangul"))
+    do_johab_hangul(name);
+  else if (!strcmp(name,"cp932ext"))
+    do_sjis(name);
+  else
+    exit(1);
+
+  return 0;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_academy.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_academy.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_academy.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,88 @@
+/* $XFree86: xc/lib/X11/lcUniConv/georgian_academy.h,v 1.3 2000/11/29 17:40:29 dawes Exp $ */
+
+/*
+ * GEORGIAN-ACADEMY
+ */
+
+static const unsigned short georgian_academy_2uni[32] = {
+  /* 0x80 */
+  0x0080, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x008e, 0x008f,
+  /* 0x90 */
+  0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+  0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x009e, 0x0178,
+};
+
+static int
+georgian_academy_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0x80 && c < 0xa0)
+    *pwc = (ucs4_t) georgian_academy_2uni[c-0x80];
+  else if (c >= 0xc0 && c < 0xe7)
+    *pwc = (ucs4_t) c + 0x1010;
+  else
+    *pwc = (ucs4_t) c;
+  return 1;
+}
+
+static const unsigned char georgian_academy_page00[32] = {
+  0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */
+  0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x9e, 0x00, /* 0x98-0x9f */
+};
+static const unsigned char georgian_academy_page01[72] = {
+  0x00, 0x00, 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x8a, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+};
+static const unsigned char georgian_academy_page02[32] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+};
+static const unsigned char georgian_academy_page20[48] = {
+  0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
+  0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+};
+
+static int
+georgian_academy_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x0080 && wc < 0x00a0)
+    c = georgian_academy_page00[wc-0x0080];
+  else if ((wc >= 0x00a0 && wc < 0x00c0) || (wc >= 0x00e7 && wc < 0x0100))
+    c = wc;
+  else if (wc >= 0x0150 && wc < 0x0198)
+    c = georgian_academy_page01[wc-0x0150];
+  else if (wc >= 0x02c0 && wc < 0x02e0)
+    c = georgian_academy_page02[wc-0x02c0];
+  else if (wc >= 0x10d0 && wc < 0x10f7)
+    c = wc-0x1010;
+  else if (wc >= 0x2010 && wc < 0x2040)
+    c = georgian_academy_page20[wc-0x2010];
+  else if (wc == 0x2122)
+    c = 0x99;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_ps.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_ps.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/georgian_ps.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,105 @@
+/* $XFree86: xc/lib/X11/lcUniConv/georgian_ps.h,v 1.3 2000/11/29 17:40:29 dawes Exp $ */
+
+/*
+ * GEORGIAN-PS
+ */
+
+static const unsigned short georgian_ps_2uni_1[32] = {
+  /* 0x80 */
+  0x0080, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x008e, 0x008f,
+  /* 0x90 */
+  0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+  0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x009e, 0x0178,
+};
+static const unsigned short georgian_ps_2uni_2[39] = {
+  /* 0xc0 */
+  0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10f1,
+  0x10d7, 0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10f2, 0x10dd,
+  /* 0xd0 */
+  0x10de, 0x10df, 0x10e0, 0x10e1, 0x10e2, 0x10f3, 0x10e3, 0x10e4,
+  0x10e5, 0x10e6, 0x10e7, 0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec,
+  /* 0xe0 */
+  0x10ed, 0x10ee, 0x10f4, 0x10ef, 0x10f0, 0x10f5,
+};
+
+static int
+georgian_ps_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0x80 && c < 0xa0)
+    *pwc = (ucs4_t) georgian_ps_2uni_1[c-0x80];
+  else if (c >= 0xc0 && c < 0xe6)
+    *pwc = (ucs4_t) georgian_ps_2uni_2[c-0xc0];
+  else
+    *pwc = (ucs4_t) c;
+  return 1;
+}
+
+static const unsigned char georgian_ps_page00[32] = {
+  0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */
+  0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x9e, 0x00, /* 0x98-0x9f */
+};
+static const unsigned char georgian_ps_page01[72] = {
+  0x00, 0x00, 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x8a, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+};
+static const unsigned char georgian_ps_page02[32] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+};
+static const unsigned char georgian_ps_page10[40] = {
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, /* 0xd0-0xd7 */
+  0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xcf, 0xd0, 0xd1, /* 0xd8-0xdf */
+  0xd2, 0xd3, 0xd4, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, /* 0xe0-0xe7 */
+  0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe3, /* 0xe8-0xef */
+  0xe4, 0xc7, 0xce, 0xd5, 0xe2, 0xe5, 0x00, 0x00, /* 0xf0-0xf7 */
+};
+static const unsigned char georgian_ps_page20[48] = {
+  0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
+  0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+};
+
+static int
+georgian_ps_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x0080 && wc < 0x00a0)
+    c = georgian_ps_page00[wc-0x0080];
+  else if ((wc >= 0x00a0 && wc < 0x00c0) || (wc >= 0x00e6 && wc < 0x0100))
+    c = wc;
+  else if (wc >= 0x0150 && wc < 0x0198)
+    c = georgian_ps_page01[wc-0x0150];
+  else if (wc >= 0x02c0 && wc < 0x02e0)
+    c = georgian_ps_page02[wc-0x02c0];
+  else if (wc >= 0x10d0 && wc < 0x10f8)
+    c = georgian_ps_page10[wc-0x10d0];
+  else if (wc >= 0x2010 && wc < 0x2040)
+    c = georgian_ps_page20[wc-0x2010];
+  else if (wc == 0x2122)
+    c = 0x99;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_1.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_1.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_1.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,23 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_1.h,v 1.3 2000/11/29 17:40:30 dawes Exp $ */
+
+/*
+ * ISO-8859-1
+ */
+
+static int
+iso8859_1_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  *pwc = (ucs4_t) c;
+  return 1;
+}
+
+static int
+iso8859_1_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (wc < 0x0100) {
+    *r = wc;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_10.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_10.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_10.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,92 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_10.h,v 1.3 2000/11/29 17:40:30 dawes Exp $ */
+
+/*
+ * ISO-8859-10
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_10_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7,
+  0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
+  /* 0xb0 */
+  0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7,
+  0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b,
+  /* 0xc0 */
+  0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
+  0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf,
+  /* 0xd0 */
+  0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168,
+  0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
+  /* 0xe0 */
+  0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
+  0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169,
+  0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138,
+};
+
+static int
+iso8859_10_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) iso8859_10_2uni[c-0xa0];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_10_page00[224] = {
+  0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+  0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x00, /* 0xc0-0xc7 */
+  0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
+  0xd0, 0x00, 0x00, 0xd3, 0xd4, 0xd5, 0xd6, 0x00, /* 0xd0-0xd7 */
+  0xd8, 0x00, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0xd8-0xdf */
+  0x00, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x00, /* 0xe0-0xe7 */
+  0x00, 0xe9, 0x00, 0xeb, 0x00, 0xed, 0xee, 0xef, /* 0xe8-0xef */
+  0xf0, 0x00, 0x00, 0xf3, 0xf4, 0xf5, 0xf6, 0x00, /* 0xf0-0xf7 */
+  0xf8, 0x00, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x00, /* 0xf8-0xff */
+  /* 0x0100 */
+  0xc0, 0xe0, 0x00, 0x00, 0xa1, 0xb1, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0x00, 0x00, /* 0x08-0x0f */
+  0xa9, 0xb9, 0xa2, 0xb2, 0x00, 0x00, 0xcc, 0xec, /* 0x10-0x17 */
+  0xca, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0xa3, 0xb3, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0xa5, 0xb5, 0xa4, 0xb4, 0x00, 0x00, 0xc7, 0xe7, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0xb6, /* 0x30-0x37 */
+  0xff, 0x00, 0x00, 0xa8, 0xb8, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xf1, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0xaf, 0xbf, 0xd2, 0xf2, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0xaa, 0xba, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbb, /* 0x60-0x67 */
+  0xd7, 0xf7, 0xae, 0xbe, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0xd9, 0xf9, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0xbc, 0x00, /* 0x78-0x7f */
+};
+
+static int
+iso8859_10_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0180)
+    c = iso8859_10_page00[wc-0x00a0];
+  else if (wc == 0x2015)
+    c = 0xbd;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_11.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_11.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_11.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,82 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_11.h,v 1.2 2002/10/09 16:38:19 tsi Exp $ */
+
+/*
+ * ISO8859-11
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_11_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07,
+  0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
+  /* 0xb0 */
+  0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17,
+  0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
+  /* 0xc0 */
+  0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27,
+  0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
+  /* 0xd0 */
+  0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
+  0x0e38, 0x0e39, 0x0e3a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e3f,
+  /* 0xe0 */
+  0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
+  0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
+  /* 0xf0 */
+  0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
+  0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+};
+
+static int
+iso8859_11_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else if (c < 0xa0) {
+  }
+  else {
+    unsigned short wc = iso8859_11_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_11_page0e[96] = {
+  0x00, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */
+  0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x08-0x0f */
+  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x10-0x17 */
+  0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x18-0x1f */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
+  0xd8, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdf, /* 0x38-0x3f */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x50-0x57 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+};
+
+static int
+iso8859_11_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080 || wc == 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x0e00 && wc < 0x0e60)
+    c = iso8859_11_page0e[wc-0x0e00];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_13.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_13.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_13.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,95 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_13.h,v 1.2 2000/11/28 16:10:26 dawes Exp $ */
+
+/*
+ * ISO-8859-13
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_13_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7,
+  0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7,
+  0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6,
+  /* 0xc0 */
+  0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112,
+  0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b,
+  /* 0xd0 */
+  0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7,
+  0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df,
+  /* 0xe0 */
+  0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113,
+  0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c,
+  /* 0xf0 */
+  0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7,
+  0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019,
+};
+
+static int
+iso8859_13_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) iso8859_13_2uni[c-0xa0];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_13_page00[224] = {
+  0xa0, 0x00, 0xa2, 0xa3, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0xb9, 0x00, 0xbb, 0xbc, 0xbd, 0xbe, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0xc4, 0xc5, 0xaf, 0x00, /* 0xc0-0xc7 */
+  0x00, 0xc9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0xd3, 0x00, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */
+  0xa8, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0xe4, 0xe5, 0xbf, 0x00, /* 0xe0-0xe7 */
+  0x00, 0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0xf3, 0x00, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */
+  0xb8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* 0xf8-0xff */
+  /* 0x0100 */
+  0xc2, 0xe2, 0x00, 0x00, 0xc0, 0xe0, 0xc3, 0xe3, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0xc7, 0xe7, 0x00, 0x00, 0xcb, 0xeb, /* 0x10-0x17 */
+  0xc6, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0xcc, 0xec, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0xce, 0xee, 0x00, 0x00, 0xc1, 0xe1, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xed, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0xcf, 0xef, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0xd4, 0xf4, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xba, /* 0x50-0x57 */
+  0x00, 0x00, 0xda, 0xfa, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0xdb, 0xfb, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0xd8, 0xf8, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x00, /* 0x78-0x7f */
+};
+static const unsigned char iso8859_13_page20[8] = {
+  0x00, 0xff, 0x00, 0x00, 0xb4, 0xa1, 0xa5, 0x00, /* 0x18-0x1f */
+};
+
+static int
+iso8859_13_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0180)
+    c = iso8859_13_page00[wc-0x00a0];
+  else if (wc >= 0x2018 && wc < 0x2020)
+    c = iso8859_13_page20[wc-0x2018];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_14.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_14.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_14.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,113 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_14.h,v 1.3 2000/11/29 17:40:30 dawes Exp $ */
+
+/*
+ * ISO-8859-14
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_14_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7,
+  0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178,
+  /* 0xb0 */
+  0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56,
+  0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61,
+  /* 0xc0 */
+  0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
+  0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+  /* 0xd0 */
+  0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a,
+  0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df,
+  /* 0xe0 */
+  0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+  0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b,
+  0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff,
+};
+
+static int
+iso8859_14_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0xa0)
+    *pwc = (ucs4_t) iso8859_14_2uni[c-0xa0];
+  else
+    *pwc = (ucs4_t) c;
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_14_page00[96] = {
+  0xa0, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0x00, 0x00, 0x00, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xc0-0xc7 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
+  0x00, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x00, /* 0xd0-0xd7 */
+  0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x00, 0xdf, /* 0xd8-0xdf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
+  0x00, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x00, /* 0xf0-0xf7 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0x00, 0xff, /* 0xf8-0xff */
+};
+static const unsigned char iso8859_14_page01_0[32] = {
+  0x00, 0x00, 0xa4, 0xa5, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0xb2, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+};
+static const unsigned char iso8859_14_page01_1[16] = {
+  0x00, 0x00, 0x00, 0x00, 0xd0, 0xf0, 0xde, 0xfe, /* 0x70-0x77 */
+  0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+};
+static const unsigned char iso8859_14_page1e_0[136] = {
+  0x00, 0x00, 0xa1, 0xa2, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0xa6, 0xab, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xb1, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0xb4, 0xb5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0xb9, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0xbb, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0xd7, 0xf7, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0xa8, 0xb8, 0xaa, 0xba, 0xbd, 0xbe, 0x00, 0x00, /* 0x80-0x87 */
+};
+static const unsigned char iso8859_14_page1e_1[8] = {
+  0x00, 0x00, 0xac, 0xbc, 0x00, 0x00, 0x00, 0x00, /* 0xf0-0xf7 */
+};
+
+static int
+iso8859_14_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0100)
+    c = iso8859_14_page00[wc-0x00a0];
+  else if (wc >= 0x0108 && wc < 0x0128)
+    c = iso8859_14_page01_0[wc-0x0108];
+  else if (wc >= 0x0170 && wc < 0x0180)
+    c = iso8859_14_page01_1[wc-0x0170];
+  else if (wc >= 0x1e00 && wc < 0x1e88)
+    c = iso8859_14_page1e_0[wc-0x1e00];
+  else if (wc >= 0x1ef0 && wc < 0x1ef8)
+    c = iso8859_14_page1e_1[wc-0x1ef0];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_15.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_15.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_15.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,67 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_15.h,v 1.3 2000/11/29 17:40:31 dawes Exp $ */
+
+/*
+ * ISO-8859-15
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_15_2uni[32] = {
+  /* 0xa0 */
+  0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7,
+  0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7,
+  0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf,
+};
+
+static int
+iso8859_15_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0xa0 && c < 0xc0)
+    *pwc = (ucs4_t) iso8859_15_2uni[c-0xa0];
+  else
+    *pwc = (ucs4_t) c;
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_15_page00[32] = {
+  0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0xa5, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0xb9, 0xba, 0xbb, 0x00, 0x00, 0x00, 0xbf, /* 0xb8-0xbf */
+};
+static const unsigned char iso8859_15_page01[48] = {
+  0x00, 0x00, 0xbc, 0xbd, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0xa6, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0xbe, 0x00, 0x00, 0x00, 0x00, 0xb4, 0xb8, 0x00, /* 0x78-0x7f */
+};
+
+static int
+iso8859_15_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00c0)
+    c = iso8859_15_page00[wc-0x00a0];
+  else if (wc >= 0x00c0 && wc < 0x0100)
+    c = wc;
+  else if (wc >= 0x0150 && wc < 0x0180)
+    c = iso8859_15_page01[wc-0x0150];
+  else if (wc == 0x20ac)
+    c = 0xa4;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_16.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_16.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_16.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,98 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_16.h,v 1.4 2003/07/15 17:33:45 pascal Exp $ */
+
+/*
+ * ISO-8859-16
+ */
+
+static const unsigned short iso8859_16_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7,
+  0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7,
+  0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c,
+  /* 0xc0 */
+  0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7,
+  0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+  /* 0xd0 */
+  0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a,
+  0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df,
+  /* 0xe0 */
+  0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7,
+  0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b,
+  0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff,
+};
+
+static int
+iso8859_16_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) iso8859_16_2uni[c-0xa0];
+  return 1;
+}
+
+static const unsigned char iso8859_16_page00[224] = {
+  0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0xc0, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0xc6, 0xc7, /* 0xc0-0xc7 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
+  0x00, 0x00, 0xd2, 0xd3, 0xd4, 0x00, 0xd6, 0x00, /* 0xd0-0xd7 */
+  0x00, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
+  0xe0, 0xe1, 0xe2, 0x00, 0xe4, 0x00, 0xe6, 0xe7, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
+  0x00, 0x00, 0xf2, 0xf3, 0xf4, 0x00, 0xf6, 0x00, /* 0xf0-0xf7 */
+  0x00, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0xff, /* 0xf8-0xff */
+  /* 0x0100 */
+  0x00, 0x00, 0xc3, 0xe3, 0xa1, 0xa2, 0xc5, 0xe5, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0xb2, 0xb9, 0x00, 0x00, /* 0x08-0x0f */
+  0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0xdd, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0xa3, 0xb3, 0xd1, 0xf1, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0xd5, 0xf5, 0xbc, 0xbd, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0xd7, 0xf7, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0xa6, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0xd8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0xbe, 0xac, 0xae, 0xaf, 0xbf, 0xb4, 0xb8, 0x00, /* 0x78-0x7f */
+};
+static const unsigned char iso8859_16_page02[8] = {
+  0xaa, 0xba, 0xde, 0xfe, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+};
+static const unsigned char iso8859_16_page20[8] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0xa5, 0x00, /* 0x18-0x1f */
+};
+
+static int
+iso8859_16_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0180)
+    c = iso8859_16_page00[wc-0x00a0];
+  else if (wc >= 0x0218 && wc < 0x0220)
+    c = iso8859_16_page02[wc-0x0218];
+  else if (wc >= 0x2018 && wc < 0x2020)
+    c = iso8859_16_page20[wc-0x2018];
+  else if (wc == 0x20ac)
+    c = 0xa4;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_2.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_2.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_2.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,100 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_2.h,v 1.3 2000/11/29 17:40:31 dawes Exp $ */
+
+/*
+ * ISO-8859-2
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_2_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7,
+  0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
+  /* 0xb0 */
+  0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7,
+  0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
+  /* 0xc0 */
+  0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
+  0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
+  /* 0xd0 */
+  0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
+  0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
+  /* 0xe0 */
+  0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
+  0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
+  /* 0xf0 */
+  0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
+  0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
+};
+
+static int
+iso8859_2_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) iso8859_2_2uni[c-0xa0];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_2_page00[224] = {
+  0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+  0xb0, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+  0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0x00, 0xc7, /* 0xc0-0xc7 */
+  0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcd, 0xce, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0xd0-0xd7 */
+  0x00, 0x00, 0xda, 0x00, 0xdc, 0xdd, 0x00, 0xdf, /* 0xd8-0xdf */
+  0x00, 0xe1, 0xe2, 0x00, 0xe4, 0x00, 0x00, 0xe7, /* 0xe0-0xe7 */
+  0x00, 0xe9, 0x00, 0xeb, 0x00, 0xed, 0xee, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, /* 0xf0-0xf7 */
+  0x00, 0x00, 0xfa, 0x00, 0xfc, 0xfd, 0x00, 0x00, /* 0xf8-0xff */
+  /* 0x0100 */
+  0x00, 0x00, 0xc3, 0xe3, 0xa1, 0xb1, 0xc6, 0xe6, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0xcf, 0xef, /* 0x08-0x0f */
+  0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0xca, 0xea, 0xcc, 0xec, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0xc5, 0xe5, 0x00, 0x00, 0xa5, 0xb5, 0x00, /* 0x38-0x3f */
+  0x00, 0xa3, 0xb3, 0xd1, 0xf1, 0x00, 0x00, 0xd2, /* 0x40-0x47 */
+  0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0xd5, 0xf5, 0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, /* 0x50-0x57 */
+  0xd8, 0xf8, 0xa6, 0xb6, 0x00, 0x00, 0xaa, 0xba, /* 0x58-0x5f */
+  0xa9, 0xb9, 0xde, 0xfe, 0xab, 0xbb, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0xf9, /* 0x68-0x6f */
+  0xdb, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0xac, 0xbc, 0xaf, 0xbf, 0xae, 0xbe, 0x00, /* 0x78-0x7f */
+};
+static const unsigned char iso8859_2_page02[32] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0xa2, 0xff, 0x00, 0xb2, 0x00, 0xbd, 0x00, 0x00, /* 0xd8-0xdf */
+};
+
+/*
+static int
+iso8859_2_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0180)
+    c = iso8859_2_page00[wc-0x00a0];
+  else if (wc >= 0x02c0 && wc < 0x02e0)
+    c = iso8859_2_page02[wc-0x02c0];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+*/
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_3.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_3.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_3.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,104 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_3.h,v 1.3 2000/11/29 17:40:31 dawes Exp $ */
+
+/*
+ * ISO-8859-3
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_3_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0xfffd, 0x0124, 0x00a7,
+  0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0xfffd, 0x017b,
+  /* 0xb0 */
+  0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7,
+  0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0xfffd, 0x017c,
+  /* 0xc0 */
+  0x00c0, 0x00c1, 0x00c2, 0xfffd, 0x00c4, 0x010a, 0x0108, 0x00c7,
+  0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+  /* 0xd0 */
+  0xfffd, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7,
+  0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df,
+  /* 0xe0 */
+  0x00e0, 0x00e1, 0x00e2, 0xfffd, 0x00e4, 0x010b, 0x0109, 0x00e7,
+  0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0xfffd, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7,
+  0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9,
+};
+
+static int
+iso8859_3_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = iso8859_3_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_3_page00[96] = {
+  0xa0, 0x00, 0x00, 0xa3, 0xa4, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+  0xb0, 0x00, 0xb2, 0xb3, 0xb4, 0xb5, 0x00, 0xb7, /* 0xb0-0xb7 */
+  0xb8, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, /* 0xb8-0xbf */
+  0xc0, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0x00, 0xc7, /* 0xc0-0xc7 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
+  0x00, 0xd1, 0xd2, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0xd0-0xd7 */
+  0x00, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
+  0xe0, 0xe1, 0xe2, 0x00, 0xe4, 0x00, 0x00, 0xe7, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
+  0x00, 0xf1, 0xf2, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, /* 0xf0-0xf7 */
+  0x00, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0x00, /* 0xf8-0xff */
+};
+static const unsigned char iso8859_3_page01[120] = {
+  0xc6, 0xe6, 0xc5, 0xe5, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0xd8, 0xf8, 0xab, 0xbb, /* 0x18-0x1f */
+  0xd5, 0xf5, 0x00, 0x00, 0xa6, 0xb6, 0xa1, 0xb1, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0xa9, 0xb9, 0x00, 0x00, 0xac, 0xbc, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0xde, 0xfe, 0xaa, 0xba, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0xdd, 0xfd, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0xaf, 0xbf, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+};
+static const unsigned char iso8859_3_page02[8] = {
+  0xa2, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+};
+
+static int
+iso8859_3_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0100)
+    c = iso8859_3_page00[wc-0x00a0];
+  else if (wc >= 0x0108 && wc < 0x0180)
+    c = iso8859_3_page01[wc-0x0108];
+  else if (wc >= 0x02d8 && wc < 0x02e0)
+    c = iso8859_3_page02[wc-0x02d8];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_4.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_4.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_4.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,98 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_4.h,v 1.3 2000/11/29 17:40:31 dawes Exp $ */
+
+/*
+ * ISO-8859-4
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_4_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7,
+  0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
+  /* 0xb0 */
+  0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7,
+  0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
+  /* 0xc0 */
+  0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
+  0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
+  /* 0xd0 */
+  0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
+  0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
+  /* 0xe0 */
+  0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
+  0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
+  /* 0xf0 */
+  0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
+  0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9,
+};
+
+static int
+iso8859_4_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) iso8859_4_2uni[c-0xa0];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_4_page00[224] = {
+  0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0xaf, /* 0xa8-0xaf */
+  0xb0, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+  0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x00, /* 0xc0-0xc7 */
+  0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcd, 0xce, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */
+  0xd8, 0x00, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
+  0x00, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x00, /* 0xe0-0xe7 */
+  0x00, 0xe9, 0x00, 0xeb, 0x00, 0xed, 0xee, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0x00, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */
+  0xf8, 0x00, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0x00, /* 0xf8-0xff */
+  /* 0x0100 */
+  0xc0, 0xe0, 0x00, 0x00, 0xa1, 0xb1, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0x00, 0x00, /* 0x08-0x0f */
+  0xd0, 0xf0, 0xaa, 0xba, 0x00, 0x00, 0xcc, 0xec, /* 0x10-0x17 */
+  0xca, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0xab, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0xa5, 0xb5, 0xcf, 0xef, 0x00, 0x00, 0xc7, 0xe7, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0xf3, /* 0x30-0x37 */
+  0xa2, 0x00, 0x00, 0xa6, 0xb6, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xf1, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0xbd, 0xbf, 0xd2, 0xf2, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0xb3, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0xa9, 0xb9, 0x00, 0x00, 0x00, 0x00, 0xac, 0xbc, /* 0x60-0x67 */
+  0xdd, 0xfd, 0xde, 0xfe, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0xd9, 0xf9, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0xbe, 0x00, /* 0x78-0x7f */
+};
+static const unsigned char iso8859_4_page02[32] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0xff, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+};
+
+static int
+iso8859_4_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0180)
+    c = iso8859_4_page00[wc-0x00a0];
+  else if (wc >= 0x02c0 && wc < 0x02e0)
+    c = iso8859_4_page02[wc-0x02c0];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_5.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_5.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_5.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,81 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_5.h,v 1.3 2000/11/29 17:40:32 dawes Exp $ */
+
+/*
+ * ISO-8859-5
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_5_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
+  0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
+  /* 0xb0 */
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+  0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
+  /* 0xc0 */
+  0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+  0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
+  /* 0xd0 */
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+  0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
+  /* 0xe0 */
+  0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+  0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
+  /* 0xf0 */
+  0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+  0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
+};
+
+static int
+iso8859_5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) iso8859_5_2uni[c-0xa0];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_5_page00[16] = {
+  0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+};
+static const unsigned char iso8859_5_page04[96] = {
+  0x00, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */
+  0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x00, 0xae, 0xaf, /* 0x08-0x0f */
+  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x10-0x17 */
+  0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x18-0x1f */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
+  0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0x38-0x3f */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
+  0x00, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x50-0x57 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0xfe, 0xff, /* 0x58-0x5f */
+};
+
+static int
+iso8859_5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00b0)
+    c = iso8859_5_page00[wc-0x00a0];
+  else if (wc >= 0x0400 && wc < 0x0460)
+    c = iso8859_5_page04[wc-0x0400];
+  else if (wc == 0x2116)
+    c = 0xf0;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_6.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_6.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_6.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,84 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_6.h,v 1.3 2000/11/29 17:40:32 dawes Exp $ */
+
+/*
+ * ISO-8859-6
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_6_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0xfffd, 0xfffd, 0xfffd, 0x00a4, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x060c, 0x00ad, 0xfffd, 0xfffd,
+  /* 0xb0 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0x061b, 0xfffd, 0xfffd, 0xfffd, 0x061f,
+  /* 0xc0 */
+  0xfffd, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+  0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
+  /* 0xd0 */
+  0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
+  0x0638, 0x0639, 0x063a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xe0 */
+  0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
+  0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
+  /* 0xf0 */
+  0x0650, 0x0651, 0x0652, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+};
+
+static int
+iso8859_6_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = iso8859_6_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_6_page00[16] = {
+  0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+};
+static const unsigned char iso8859_6_page06[80] = {
+  0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xbf, /* 0x18-0x1f */
+  0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
+  0xd8, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
+  0xf0, 0xf1, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+};
+
+static int
+iso8859_6_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00b0)
+    c = iso8859_6_page00[wc-0x00a0];
+  else if (wc >= 0x0608 && wc < 0x0658)
+    c = iso8859_6_page06[wc-0x0608];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_7.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_7.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_7.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,92 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_7.h,v 1.3 2000/11/29 17:40:32 dawes Exp $ */
+
+/*
+ * ISO-8859-7
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_7_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x2018, 0x2019, 0x00a3, 0xfffd, 0xfffd, 0x00a6, 0x00a7,
+  0x00a8, 0x00a9, 0xfffd, 0x00ab, 0x00ac, 0x00ad, 0xfffd, 0x2015,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7,
+  0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
+  /* 0xc0 */
+  0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+  0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
+  /* 0xd0 */
+  0x03a0, 0x03a1, 0xfffd, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
+  0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
+  /* 0xe0 */
+  0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
+  0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
+  /* 0xf0 */
+  0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
+  0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd,
+};
+
+static int
+iso8859_7_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = iso8859_7_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_7_page00[32] = {
+  0xa0, 0x00, 0x00, 0xa3, 0x00, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0x00, 0x00, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0xbb, 0x00, 0xbd, 0x00, 0x00, /* 0xb8-0xbf */
+};
+static const unsigned char iso8859_7_page03[80] = {
+  0x00, 0x00, 0x00, 0x00, 0xb4, 0xb5, 0xb6, 0x00, /* 0x80-0x87 */
+  0xb8, 0xb9, 0xba, 0x00, 0xbc, 0x00, 0xbe, 0xbf, /* 0x88-0x8f */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x90-0x97 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x98-0x9f */
+  0xd0, 0xd1, 0x00, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xa0-0xa7 */
+  0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0xa8-0xaf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xb0-0xb7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xb8-0xbf */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xc0-0xc7 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x00, /* 0xc8-0xcf */
+};
+static const unsigned char iso8859_7_page20[16] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, /* 0x10-0x17 */
+  0xa1, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+};
+
+static int
+iso8859_7_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00c0)
+    c = iso8859_7_page00[wc-0x00a0];
+  else if (wc >= 0x0380 && wc < 0x03d0)
+    c = iso8859_7_page03[wc-0x0380];
+  else if (wc >= 0x2010 && wc < 0x2020)
+    c = iso8859_7_page20[wc-0x2010];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_8.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_8.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_8.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,93 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_8.h,v 1.3 2000/11/29 17:40:32 dawes Exp $ */
+
+/*
+ * ISO-8859-8
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_8_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0xfffd, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
+  0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+  0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0xfffd,
+  /* 0xc0 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0xd0 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2017,
+  /* 0xe0 */
+  0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
+  0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
+  /* 0xf0 */
+  0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
+  0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd,
+};
+
+static int
+iso8859_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0xa0) {
+    unsigned short wc = iso8859_8_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  else {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_8_page00[88] = {
+  0xa0, 0x00, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0xb8, 0xb9, 0x00, 0xbb, 0xbc, 0xbd, 0xbe, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, /* 0xf0-0xf7 */
+};
+static const unsigned char iso8859_8_page05[32] = {
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xd0-0xd7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xd8-0xdf */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xe0-0xe7 */
+  0xf8, 0xf9, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+};
+static const unsigned char iso8859_8_page20[16] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0xfe, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, /* 0x10-0x17 */
+};
+
+static int
+iso8859_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00f8)
+    c = iso8859_8_page00[wc-0x00a0];
+  else if (wc >= 0x05d0 && wc < 0x05f0)
+    c = iso8859_8_page05[wc-0x05d0];
+  else if (wc >= 0x2008 && wc < 0x2018)
+    c = iso8859_8_page20[wc-0x2008];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,71 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_9.h,v 1.3 2000/11/29 17:40:32 dawes Exp $ */
+
+/*
+ * ISO-8859-9
+ */
+
+#ifdef NEED_TOWC
+static const unsigned short iso8859_9_2uni[48] = {
+  /* 0xd0 */
+  0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
+  0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
+  /* 0xe0 */
+  0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+  0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
+  0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
+};
+
+static int
+iso8859_9_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0xd0)
+    *pwc = (ucs4_t) iso8859_9_2uni[c-0xd0];
+  else
+    *pwc = (ucs4_t) c;
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char iso8859_9_page00[48] = {
+  0x00, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */
+  0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
+  0x00, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0xff, /* 0xf8-0xff */
+};
+static const unsigned char iso8859_9_page01[72] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xf0, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0xdd, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0xfe, /* 0x58-0x5f */
+};
+
+static int
+iso8859_9_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00d0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00d0 && wc < 0x0100)
+    c = iso8859_9_page00[wc-0x00d0];
+  else if (wc >= 0x0118 && wc < 0x0160)
+    c = iso8859_9_page01[wc-0x0118];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9e.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9e.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/iso8859_9e.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,103 @@
+/* $XFree86: xc/lib/X11/lcUniConv/iso8859_9e.h,v 1.3 2000/11/28 16:10:28 dawes Exp $ */
+
+/*
+ * ISO-8859-9E
+ */
+
+static const unsigned short iso8859_9e_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x017d, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x012c, 0x00a7,
+  0x016c, 0x00a9, 0x01e6, 0x00ab, 0x014a, 0x00ad, 0x00ae, 0x01d1,
+  /* 0xb0 */
+  0x00b0, 0x017e, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x012d, 0x00b7,
+  0x016d, 0x00b9, 0x01e7, 0x00bb, 0x014b, 0x00bd, 0x0178, 0x01d2,
+  /* 0xc0 */
+  0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x018f, 0x00c7,
+  0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+  /* 0xd0 */
+  0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00dd,
+  0x019f, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
+  /* 0xe0 */
+  0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x0259, 0x00e7,
+  0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+  /* 0xf0 */
+  0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00fd,
+  0x0275, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
+};
+
+static int
+iso8859_9e_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c >= 0xa0)
+    *pwc = (ucs4_t) iso8859_9e_2uni[c-0xa0];
+  else
+    *pwc = (ucs4_t) c;
+  return 1;
+}
+
+static const unsigned char iso8859_9e_page00[96] = {
+  0xa0, 0x00, 0xa2, 0xa3, 0x00, 0xa5, 0x00, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
+  0xb0, 0x00, 0xb2, 0xb3, 0xb4, 0xb5, 0x00, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0xb9, 0x00, 0xbb, 0x00, 0xbd, 0x00, 0x00, /* 0xb8-0xbf */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0x00, 0xc7, /* 0xc0-0xc7 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
+  0x00, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x00, /* 0xd0-0xd7 */
+  0x00, 0xd9, 0xda, 0xdb, 0xdc, 0xd7, 0x00, 0xdf, /* 0xd8-0xdf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0x00, 0xe7, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
+  0x00, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x00, /* 0xf0-0xf7 */
+  0x00, 0xf9, 0xfa, 0xfb, 0xfc, 0xf7, 0x00, 0xff, /* 0xf8-0xff */
+};
+static const unsigned char iso8859_9e_page01[136] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xf0, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0xa6, 0xb6, 0x00, 0x00, /* 0x28-0x2f */
+  0xdd, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0xac, 0xbc, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0xfe, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0xa8, 0xb8, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0xbe, 0x00, 0x00, 0x00, 0x00, 0xa1, 0xb1, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, /* 0x88-0x8f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, /* 0x98-0x9f */
+};
+static const unsigned char iso8859_9e_page01_d[24] = {
+  0x00, 0xaf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xba, /* 0xe0-0xe7 */
+};
+  
+static int
+iso8859_9e_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x0100)
+    c = iso8859_9e_page00[wc-0x00a0];
+  else if (wc >= 0x0118 && wc < 0x01a0)
+    c = iso8859_9e_page01[wc-0x0118];
+  else if (wc >= 0x01d0 && wc < 0x01e8)
+    c = iso8859_9e_page01_d[wc-0x01d0];
+  else if (wc == 0x0259)
+    c = 0xe6;
+  else if (wc == 0x0275)
+    c = 0xf8;
+  else if (wc == 0x20ac)
+    c = 0xa4;
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0201.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0201.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0201.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,53 @@
+/* $XFree86: xc/lib/X11/lcUniConv/jisx0201.h,v 1.3 2000/11/29 17:40:33 dawes Exp $ */
+
+/*
+ * JISX0201.1976-0
+ */
+#ifdef NEED_TOWC
+
+static int
+jisx0201_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80) {
+    if (c == 0x5c)
+      *pwc = (ucs4_t) 0x00a5;
+    else if (c == 0x7e)
+      *pwc = (ucs4_t) 0x203e;
+    else
+      *pwc = (ucs4_t) c;
+    return 1;
+  } else {
+    if (c >= 0xa1 && c < 0xe0) {
+      *pwc = (ucs4_t) c + 0xfec0;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+
+static int
+jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (wc < 0x0080 && !(wc == 0x005c || wc == 0x007e)) {
+    *r = wc;
+    return 1;
+  }
+  if (wc == 0x00a5) {
+    *r = 0x5c;
+    return 1;
+  }
+  if (wc == 0x203e) {
+    *r = 0x7e;
+    return 1;
+  }
+  if (wc >= 0xff61 && wc < 0xffa0) {
+    *r = wc - 0xfec0;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0208.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0208.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0208.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2401 @@
+/* $XFree86: xc/lib/X11/lcUniConv/jisx0208.h,v 1.6 2003/05/27 22:26:31 tsi Exp $ */
+
+/*
+ * JISX0208.1990-0
+ */
+#ifdef NEED_TOWC
+
+static const unsigned short jisx0208_2uni_page21[690] = {
+  /* 0x21 */
+  0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b,
+  0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e,
+  0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd,
+  0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0xff3c,
+  0x301c, 0x2016, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c,
+  0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b,
+  0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e,
+  0x300f, 0x3010, 0x3011, 0xff0b, 0x2212, 0x00b1, 0x00d7, 0x00f7,
+  0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e, 0x2234,
+  0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5, 0xff04,
+  0x00a2, 0x00a3, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20, 0x00a7,
+  0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7,
+  /* 0x22 */
+  0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b,
+  0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a,
+  0x2229, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0x2227, 0x2228, 0x00ac, 0x21d2, 0x21d4, 0x2200, 0x2203,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207,
+  0x2261, 0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235,
+  0x222b, 0x222c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021,
+  0x00b6, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x25ef,
+  /* 0x23 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xff10,
+  0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
+  0xff19, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  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, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x24 */
+  0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
+  0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
+  0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
+  0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
+  0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
+  0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
+  0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
+  0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
+  0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
+  0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
+  0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x25 */
+  0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
+  0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
+  0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
+  0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
+  0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
+  0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
+  0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
+  0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
+  0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
+  0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
+  0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x26 */
+  0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
+  0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
+  0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
+  0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
+  0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x27 */
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x28 */
+  0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c,
+  0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b,
+  0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f,
+  0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542,
+};
+static const unsigned short jisx0208_2uni_page30[6398] = {
+  /* 0x30 */
+  0x4e9c, 0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, 0x59f6,
+  0x9022, 0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, 0x65ed,
+  0x8466, 0x82a6, 0x9bf5, 0x6893, 0x5727, 0x65a1, 0x6271, 0x5b9b,
+  0x59d0, 0x867b, 0x98f4, 0x7d62, 0x7dbe, 0x9b8e, 0x6216, 0x7c9f,
+  0x88b7, 0x5b89, 0x5eb5, 0x6309, 0x6697, 0x6848, 0x95c7, 0x978d,
+  0x674f, 0x4ee5, 0x4f0a, 0x4f4d, 0x4f9d, 0x5049, 0x56f2, 0x5937,
+  0x59d4, 0x5a01, 0x5c09, 0x60df, 0x610f, 0x6170, 0x6613, 0x6905,
+  0x70ba, 0x754f, 0x7570, 0x79fb, 0x7dad, 0x7def, 0x80c3, 0x840e,
+  0x8863, 0x8b02, 0x9055, 0x907a, 0x533b, 0x4e95, 0x4ea5, 0x57df,
+  0x80b2, 0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, 0x7a32,
+  0x8328, 0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, 0x56e0,
+  0x59fb, 0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d,
+  /* 0x31 */
+  0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, 0x70cf,
+  0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, 0x7893,
+  0x81fc, 0x6e26, 0x5618, 0x5504, 0x6b1d, 0x851a, 0x9c3b, 0x59e5,
+  0x53a9, 0x6d66, 0x74dc, 0x958f, 0x5642, 0x4e91, 0x904b, 0x96f2,
+  0x834f, 0x990c, 0x53e1, 0x55b6, 0x5b30, 0x5f71, 0x6620, 0x66f3,
+  0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, 0x9834,
+  0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, 0x99c5,
+  0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0x5712,
+  0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4, 0x6cbf,
+  0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01, 0x8276,
+  0x82d1, 0x8597, 0x9060, 0x925b, 0x9d1b, 0x5869, 0x65bc, 0x6c5a,
+  0x7525, 0x51f9, 0x592e, 0x5965, 0x5f80, 0x5fdc,
+  /* 0x32 */
+  0x62bc, 0x65fa, 0x6a2a, 0x6b27, 0x6bb4, 0x738b, 0x7fc1, 0x8956,
+  0x9d2c, 0x9d0e, 0x9ec4, 0x5ca1, 0x6c96, 0x837b, 0x5104, 0x5c4b,
+  0x61b6, 0x81c6, 0x6876, 0x7261, 0x4e59, 0x4ffa, 0x5378, 0x6069,
+  0x6e29, 0x7a4f, 0x97f3, 0x4e0b, 0x5316, 0x4eee, 0x4f55, 0x4f3d,
+  0x4fa1, 0x4f73, 0x52a0, 0x53ef, 0x5609, 0x590f, 0x5ac1, 0x5bb6,
+  0x5be1, 0x79d1, 0x6687, 0x679c, 0x67b6, 0x6b4c, 0x6cb3, 0x706b,
+  0x73c2, 0x798d, 0x79be, 0x7a3c, 0x7b87, 0x82b1, 0x82db, 0x8304,
+  0x8377, 0x83ef, 0x83d3, 0x8766, 0x8ab2, 0x5629, 0x8ca8, 0x8fe6,
+  0x904e, 0x971e, 0x868a, 0x4fc4, 0x5ce8, 0x6211, 0x7259, 0x753b,
+  0x81e5, 0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, 0x4ecb,
+  0x4f1a, 0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, 0x602a,
+  0x6094, 0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539,
+  /* 0x33 */
+  0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, 0x7d75,
+  0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, 0x5916,
+  0x54b3, 0x5bb3, 0x5d16, 0x6168, 0x6982, 0x6daf, 0x788d, 0x84cb,
+  0x8857, 0x8a72, 0x93a7, 0x9ab8, 0x6d6c, 0x99a8, 0x86d9, 0x57a3,
+  0x67ff, 0x86ce, 0x920e, 0x5283, 0x5687, 0x5404, 0x5ed3, 0x62e1,
+  0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, 0x899a,
+  0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, 0x5b66,
+  0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0x6a7f,
+  0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec, 0x6d3b,
+  0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39, 0x53f6,
+  0x691b, 0x6a3a, 0x9784, 0x682a, 0x515c, 0x7ac3, 0x84b2, 0x91dc,
+  0x938c, 0x565b, 0x9d28, 0x6822, 0x8305, 0x8431,
+  /* 0x34 */
+  0x7ca5, 0x5208, 0x82c5, 0x74e6, 0x4e7e, 0x4f83, 0x51a0, 0x5bd2,
+  0x520a, 0x52d8, 0x52e7, 0x5dfb, 0x559a, 0x582a, 0x59e6, 0x5b8c,
+  0x5b98, 0x5bdb, 0x5e72, 0x5e79, 0x60a3, 0x611f, 0x6163, 0x61be,
+  0x63db, 0x6562, 0x67d1, 0x6853, 0x68fa, 0x6b3e, 0x6b53, 0x6c57,
+  0x6f22, 0x6f97, 0x6f45, 0x74b0, 0x7518, 0x76e3, 0x770b, 0x7aff,
+  0x7ba1, 0x7c21, 0x7de9, 0x7f36, 0x7ff0, 0x809d, 0x8266, 0x839e,
+  0x89b3, 0x8acc, 0x8cab, 0x9084, 0x9451, 0x9593, 0x9591, 0x95a2,
+  0x9665, 0x97d3, 0x9928, 0x8218, 0x4e38, 0x542b, 0x5cb8, 0x5dcc,
+  0x73a9, 0x764c, 0x773c, 0x5ca9, 0x7feb, 0x8d0b, 0x96c1, 0x9811,
+  0x9854, 0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, 0x57fa,
+  0x5947, 0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, 0x63ee,
+  0x673a, 0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4,
+  /* 0x35 */
+  0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, 0x5b63,
+  0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, 0x8ecc,
+  0x8f1d, 0x98e2, 0x9a0e, 0x9b3c, 0x4e80, 0x507d, 0x5100, 0x5993,
+  0x5b9c, 0x622f, 0x6280, 0x64ec, 0x6b3a, 0x72a0, 0x7591, 0x7947,
+  0x7fa9, 0x87fb, 0x8abc, 0x8b70, 0x63ac, 0x83ca, 0x97a0, 0x5409,
+  0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, 0x9ecd,
+  0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, 0x4ec7,
+  0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0x673d,
+  0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae, 0x7b08,
+  0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45, 0x5de8,
+  0x62d2, 0x62e0, 0x6319, 0x6e20, 0x865a, 0x8a31, 0x8ddd, 0x92f8,
+  0x6f01, 0x79a6, 0x9b5a, 0x4ea8, 0x4eab, 0x4eac,
+  /* 0x36 */
+  0x4f9b, 0x4fa0, 0x50d1, 0x5147, 0x7af6, 0x5171, 0x51f6, 0x5354,
+  0x5321, 0x537f, 0x53eb, 0x55ac, 0x5883, 0x5ce1, 0x5f37, 0x5f4a,
+  0x602f, 0x6050, 0x606d, 0x631f, 0x6559, 0x6a4b, 0x6cc1, 0x72c2,
+  0x72ed, 0x77ef, 0x80f8, 0x8105, 0x8208, 0x854e, 0x90f7, 0x93e1,
+  0x97ff, 0x9957, 0x9a5a, 0x4ef0, 0x51dd, 0x5c2d, 0x6681, 0x696d,
+  0x5c40, 0x66f2, 0x6975, 0x7389, 0x6850, 0x7c81, 0x50c5, 0x52e4,
+  0x5747, 0x5dfe, 0x9326, 0x65a4, 0x6b23, 0x6b3d, 0x7434, 0x7981,
+  0x79bd, 0x7b4b, 0x7dca, 0x82b9, 0x83cc, 0x887f, 0x895f, 0x8b39,
+  0x8fd1, 0x91d1, 0x541f, 0x9280, 0x4e5d, 0x5036, 0x53e5, 0x533a,
+  0x72d7, 0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, 0x99d2,
+  0x5177, 0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, 0x9047,
+  0x9685, 0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48,
+  /* 0x37 */
+  0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, 0x9688,
+  0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, 0x85ab,
+  0x8a13, 0x7fa4, 0x8ecd, 0x90e1, 0x5366, 0x8888, 0x7941, 0x4fc2,
+  0x50be, 0x5211, 0x5144, 0x5553, 0x572d, 0x73ea, 0x578b, 0x5951,
+  0x5f62, 0x5f84, 0x6075, 0x6176, 0x6167, 0x61a9, 0x63b2, 0x643a,
+  0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, 0x7d4c,
+  0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, 0x8a63,
+  0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0x5287,
+  0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20, 0x6c7a,
+  0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6, 0x5039,
+  0x5026, 0x5065, 0x517c, 0x5238, 0x5263, 0x55a7, 0x570f, 0x5805,
+  0x5acc, 0x5efa, 0x61b2, 0x61f8, 0x62f3, 0x6372,
+  /* 0x38 */
+  0x691c, 0x6a29, 0x727d, 0x72ac, 0x732e, 0x7814, 0x786f, 0x7d79,
+  0x770c, 0x80a9, 0x898b, 0x8b19, 0x8ce2, 0x8ed2, 0x9063, 0x9375,
+  0x967a, 0x9855, 0x9a13, 0x9e78, 0x5143, 0x539f, 0x53b3, 0x5e7b,
+  0x5f26, 0x6e1b, 0x6e90, 0x7384, 0x73fe, 0x7d43, 0x8237, 0x8a00,
+  0x8afa, 0x9650, 0x4e4e, 0x500b, 0x53e4, 0x547c, 0x56fa, 0x59d1,
+  0x5b64, 0x5df1, 0x5eab, 0x5f27, 0x6238, 0x6545, 0x67af, 0x6e56,
+  0x72d0, 0x7cca, 0x88b4, 0x80a1, 0x80e1, 0x83f0, 0x864e, 0x8a87,
+  0x8de8, 0x9237, 0x96c7, 0x9867, 0x9f13, 0x4e94, 0x4e92, 0x4f0d,
+  0x5348, 0x5449, 0x543e, 0x5a2f, 0x5f8c, 0x5fa1, 0x609f, 0x68a7,
+  0x6a8e, 0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, 0x4e5e,
+  0x9bc9, 0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, 0x516c,
+  0x529f, 0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411,
+  /* 0x39 */
+  0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, 0x5b8f,
+  0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, 0x5f18,
+  0x6052, 0x614c, 0x6297, 0x62d8, 0x63a7, 0x653b, 0x6602, 0x6643,
+  0x66f4, 0x676d, 0x6821, 0x6897, 0x69cb, 0x6c5f, 0x6d2a, 0x6d69,
+  0x6e2f, 0x6e9d, 0x7532, 0x7687, 0x786c, 0x7a3f, 0x7ce0, 0x7d05,
+  0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, 0x8154,
+  0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, 0x8cfc,
+  0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0x9805,
+  0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408, 0x58d5,
+  0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b, 0x544a,
+  0x56fd, 0x7a40, 0x9177, 0x9d60, 0x9ed2, 0x7344, 0x6f09, 0x8170,
+  0x7511, 0x5ffd, 0x60da, 0x9aa8, 0x72db, 0x8fbc,
+  /* 0x3a */
+  0x6b64, 0x9803, 0x4eca, 0x56f0, 0x5764, 0x58be, 0x5a5a, 0x6068,
+  0x61c7, 0x660f, 0x6606, 0x6839, 0x68b1, 0x6df7, 0x75d5, 0x7d3a,
+  0x826e, 0x9b42, 0x4e9b, 0x4f50, 0x53c9, 0x5506, 0x5d6f, 0x5de6,
+  0x5dee, 0x67fb, 0x6c99, 0x7473, 0x7802, 0x8a50, 0x9396, 0x88df,
+  0x5750, 0x5ea7, 0x632b, 0x50b5, 0x50ac, 0x518d, 0x6700, 0x54c9,
+  0x585e, 0x59bb, 0x5bb0, 0x5f69, 0x624d, 0x63a1, 0x683d, 0x6b73,
+  0x6e08, 0x707d, 0x91c7, 0x7280, 0x7815, 0x7826, 0x796d, 0x658e,
+  0x7d30, 0x83dc, 0x88c1, 0x8f09, 0x969b, 0x5264, 0x5728, 0x6750,
+  0x7f6a, 0x8ca1, 0x51b4, 0x5742, 0x962a, 0x583a, 0x698a, 0x80b4,
+  0x54b2, 0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, 0x548b,
+  0x643e, 0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, 0x932f,
+  0x685c, 0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237,
+  /* 0x3b */
+  0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, 0x96d1,
+  0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, 0x4e09,
+  0x5098, 0x53c2, 0x5c71, 0x60e8, 0x6492, 0x6563, 0x685f, 0x71e6,
+  0x73ca, 0x7523, 0x7b97, 0x7e82, 0x8695, 0x8b83, 0x8cdb, 0x9178,
+  0x9910, 0x65ac, 0x66ab, 0x6b8b, 0x4ed5, 0x4ed4, 0x4f3a, 0x4f7f,
+  0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, 0x59c9,
+  0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, 0x6307,
+  0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0x6b7b,
+  0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b, 0x80a2,
+  0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c, 0x8aee,
+  0x8cc7, 0x8cdc, 0x96cc, 0x98fc, 0x6b6f, 0x4e8b, 0x4f3c, 0x4f8d,
+  0x5150, 0x5b57, 0x5bfa, 0x6148, 0x6301, 0x6642,
+  /* 0x3c */
+  0x6b21, 0x6ecb, 0x6cbb, 0x723e, 0x74bd, 0x75d4, 0x78c1, 0x793a,
+  0x800c, 0x8033, 0x81ea, 0x8494, 0x8f9e, 0x6c50, 0x9e7f, 0x5f0f,
+  0x8b58, 0x9d2b, 0x7afa, 0x8ef8, 0x5b8d, 0x96eb, 0x4e03, 0x53f1,
+  0x57f7, 0x5931, 0x5ac9, 0x5ba4, 0x6089, 0x6e7f, 0x6f06, 0x75be,
+  0x8cea, 0x5b9f, 0x8500, 0x7be0, 0x5072, 0x67f4, 0x829d, 0x5c61,
+  0x854a, 0x7e1e, 0x820e, 0x5199, 0x5c04, 0x6368, 0x8d66, 0x659c,
+  0x716e, 0x793e, 0x7d17, 0x8005, 0x8b1d, 0x8eca, 0x906e, 0x86c7,
+  0x90aa, 0x501f, 0x52fa, 0x5c3a, 0x6753, 0x707c, 0x7235, 0x914c,
+  0x91c8, 0x932b, 0x82e5, 0x5bc2, 0x5f31, 0x60f9, 0x4e3b, 0x53d6,
+  0x5b88, 0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, 0x816b,
+  0x8da3, 0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, 0x6388,
+  0x6a39, 0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468,
+  /* 0x3d */
+  0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, 0x79c0,
+  0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, 0x8846,
+  0x8972, 0x8b90, 0x8e74, 0x8f2f, 0x9031, 0x914b, 0x916c, 0x96c6,
+  0x919c, 0x4ec0, 0x4f4f, 0x5145, 0x5341, 0x5f93, 0x620e, 0x67d4,
+  0x6c41, 0x6e0b, 0x7363, 0x7e26, 0x91cd, 0x9283, 0x53d4, 0x5919,
+  0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, 0x51fa,
+  0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, 0x821c,
+  0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0x6e96,
+  0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806, 0x51e6,
+  0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2, 0x7f72,
+  0x66f8, 0x85af, 0x85f7, 0x8af8, 0x52a9, 0x53d9, 0x5973, 0x5e8f,
+  0x5f90, 0x6055, 0x92e4, 0x9664, 0x50b7, 0x511f,
+  /* 0x3e */
+  0x52dd, 0x5320, 0x5347, 0x53ec, 0x54e8, 0x5546, 0x5531, 0x5617,
+  0x5968, 0x59be, 0x5a3c, 0x5bb5, 0x5c06, 0x5c0f, 0x5c11, 0x5c1a,
+  0x5e84, 0x5e8a, 0x5ee0, 0x5f70, 0x627f, 0x6284, 0x62db, 0x638c,
+  0x6377, 0x6607, 0x660c, 0x662d, 0x6676, 0x677e, 0x68a2, 0x6a1f,
+  0x6a35, 0x6cbc, 0x6d88, 0x6e09, 0x6e58, 0x713c, 0x7126, 0x7167,
+  0x75c7, 0x7701, 0x785d, 0x7901, 0x7965, 0x79f0, 0x7ae0, 0x7b11,
+  0x7ca7, 0x7d39, 0x8096, 0x83d6, 0x848b, 0x8549, 0x885d, 0x88f3,
+  0x8a1f, 0x8a3c, 0x8a54, 0x8a73, 0x8c61, 0x8cde, 0x91a4, 0x9266,
+  0x937e, 0x9418, 0x969c, 0x9798, 0x4e0a, 0x4e08, 0x4e1e, 0x4e57,
+  0x5197, 0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, 0x60c5,
+  0x64fe, 0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, 0x84b8,
+  0x8b72, 0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe,
+  /* 0x3f */
+  0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, 0x89e6,
+  0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, 0x5507,
+  0x5a20, 0x5bdd, 0x5be9, 0x5fc3, 0x614e, 0x632f, 0x65b0, 0x664b,
+  0x68ee, 0x699b, 0x6d78, 0x6df1, 0x7533, 0x75b9, 0x771f, 0x795e,
+  0x79e6, 0x7d33, 0x81e3, 0x82af, 0x85aa, 0x89aa, 0x8a3a, 0x8eab,
+  0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, 0x5875,
+  0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, 0x9663,
+  0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0x9017,
+  0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761, 0x7c8b,
+  0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f, 0x745e,
+  0x9ac4, 0x5d07, 0x5d69, 0x6570, 0x67a2, 0x8da8, 0x96db, 0x636e,
+  0x6749, 0x6919, 0x83c5, 0x9817, 0x96c0, 0x88fe,
+  /* 0x40 */
+  0x6f84, 0x647a, 0x5bf8, 0x4e16, 0x702c, 0x755d, 0x662f, 0x51c4,
+  0x5236, 0x52e2, 0x59d3, 0x5f81, 0x6027, 0x6210, 0x653f, 0x6574,
+  0x661f, 0x6674, 0x68f2, 0x6816, 0x6b63, 0x6e05, 0x7272, 0x751f,
+  0x76db, 0x7cbe, 0x8056, 0x58f0, 0x88fd, 0x897f, 0x8aa0, 0x8a93,
+  0x8acb, 0x901d, 0x9192, 0x9752, 0x9759, 0x6589, 0x7a0e, 0x8106,
+  0x96bb, 0x5e2d, 0x60dc, 0x621a, 0x65a5, 0x6614, 0x6790, 0x77f3,
+  0x7a4d, 0x7c4d, 0x7e3e, 0x810a, 0x8cac, 0x8d64, 0x8de1, 0x8e5f,
+  0x78a9, 0x5207, 0x62d9, 0x63a5, 0x6442, 0x6298, 0x8a2d, 0x7a83,
+  0x7bc0, 0x8aac, 0x96ea, 0x7d76, 0x820c, 0x8749, 0x4ed9, 0x5148,
+  0x5343, 0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, 0x6247,
+  0x64b0, 0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, 0x6f5c,
+  0x714e, 0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda,
+  /* 0x41 */
+  0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, 0x8cce,
+  0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, 0x524d,
+  0x5584, 0x6f38, 0x7136, 0x5168, 0x7985, 0x7e55, 0x81b3, 0x7cce,
+  0x564c, 0x5851, 0x5ca8, 0x63aa, 0x66fe, 0x66fd, 0x695a, 0x72d9,
+  0x758f, 0x758e, 0x790e, 0x7956, 0x79df, 0x7c97, 0x7d20, 0x7d44,
+  0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, 0x53cc,
+  0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, 0x5c64,
+  0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0x64cd,
+  0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5, 0x4e89,
+  0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061, 0x8349,
+  0x8358, 0x846c, 0x84bc, 0x85fb, 0x88c5, 0x8d70, 0x9001, 0x906d,
+  0x9397, 0x971c, 0x9a12, 0x50cf, 0x5897, 0x618e,
+  /* 0x42 */
+  0x81d3, 0x8535, 0x8d08, 0x9020, 0x4fc3, 0x5074, 0x5247, 0x5373,
+  0x606f, 0x6349, 0x675f, 0x6e2c, 0x8db3, 0x901f, 0x4fd7, 0x5c5e,
+  0x8cca, 0x65cf, 0x7d9a, 0x5352, 0x8896, 0x5176, 0x63c3, 0x5b58,
+  0x5b6b, 0x5c0a, 0x640d, 0x6751, 0x905c, 0x4ed6, 0x591a, 0x592a,
+  0x6c70, 0x8a51, 0x553e, 0x5815, 0x59a5, 0x60f0, 0x6253, 0x67c1,
+  0x8235, 0x6955, 0x9640, 0x99c4, 0x9a28, 0x4f53, 0x5806, 0x5bfe,
+  0x8010, 0x5cb1, 0x5e2f, 0x5f85, 0x6020, 0x614b, 0x6234, 0x66ff,
+  0x6cf0, 0x6ede, 0x80ce, 0x817f, 0x82d4, 0x888b, 0x8cb8, 0x9000,
+  0x902e, 0x968a, 0x9edb, 0x9bdb, 0x4ee3, 0x53f0, 0x5927, 0x7b2c,
+  0x918d, 0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, 0x5b85,
+  0x6258, 0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, 0x9438,
+  0x6fc1, 0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea,
+  /* 0x43 */
+  0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, 0x7aea,
+  0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, 0x4e39,
+  0x5358, 0x5606, 0x5766, 0x62c5, 0x63a2, 0x65e6, 0x6b4e, 0x6de1,
+  0x6e5b, 0x70ad, 0x77ed, 0x7aef, 0x7baa, 0x7dbb, 0x803d, 0x80c6,
+  0x86cb, 0x8a95, 0x935b, 0x56e3, 0x58c7, 0x5f3e, 0x65ad, 0x6696,
+  0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, 0x5f1b,
+  0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, 0x8718,
+  0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0x9010,
+  0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2, 0x5b99,
+  0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877, 0x8a3b,
+  0x914e, 0x92f3, 0x99d0, 0x6a17, 0x7026, 0x732a, 0x82e7, 0x8457,
+  0x8caf, 0x4e01, 0x5146, 0x51cb, 0x558b, 0x5bf5,
+  /* 0x44 */
+  0x5e16, 0x5e33, 0x5e81, 0x5f14, 0x5f35, 0x5f6b, 0x5fb4, 0x61f2,
+  0x6311, 0x66a2, 0x671d, 0x6f6e, 0x7252, 0x753a, 0x773a, 0x8074,
+  0x8139, 0x8178, 0x8776, 0x8abf, 0x8adc, 0x8d85, 0x8df3, 0x929a,
+  0x9577, 0x9802, 0x9ce5, 0x52c5, 0x6357, 0x76f4, 0x6715, 0x6c88,
+  0x73cd, 0x8cc3, 0x93ae, 0x9673, 0x6d25, 0x589c, 0x690e, 0x69cc,
+  0x8ffd, 0x939a, 0x75db, 0x901a, 0x585a, 0x6802, 0x63b4, 0x69fb,
+  0x4f43, 0x6f2c, 0x67d8, 0x8fbb, 0x8526, 0x7db4, 0x9354, 0x693f,
+  0x6f70, 0x576a, 0x58f7, 0x5b2c, 0x7d2c, 0x722a, 0x540a, 0x91e3,
+  0x9db4, 0x4ead, 0x4f4e, 0x505c, 0x5075, 0x5243, 0x8c9e, 0x5448,
+  0x5824, 0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, 0x608c,
+  0x62b5, 0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, 0x7a0b,
+  0x7de0, 0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013,
+  /* 0x45 */
+  0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, 0x6575,
+  0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, 0x5fb9,
+  0x64a4, 0x8f4d, 0x8fed, 0x9244, 0x5178, 0x586b, 0x5929, 0x5c55,
+  0x5e97, 0x6dfb, 0x7e8f, 0x751c, 0x8cbc, 0x8ee2, 0x985b, 0x70b9,
+  0x4f1d, 0x6bbf, 0x6fb1, 0x7530, 0x96fb, 0x514e, 0x5410, 0x5835,
+  0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, 0x767b,
+  0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, 0x52aa,
+  0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0x51cd,
+  0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6, 0x5d8b,
+  0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df, 0x76d7,
+  0x6dd8, 0x6e6f, 0x6d9b, 0x706f, 0x71c8, 0x5f53, 0x75d8, 0x7977,
+  0x7b49, 0x7b54, 0x7b52, 0x7cd6, 0x7d71, 0x5230,
+  /* 0x46 */
+  0x8463, 0x8569, 0x85e4, 0x8a0e, 0x8b04, 0x8c46, 0x8e0f, 0x9003,
+  0x900f, 0x9419, 0x9676, 0x982d, 0x9a30, 0x95d8, 0x50cd, 0x52d5,
+  0x540c, 0x5802, 0x5c0e, 0x61a7, 0x649e, 0x6d1e, 0x77b3, 0x7ae5,
+  0x80f4, 0x8404, 0x9053, 0x9285, 0x5ce0, 0x9d07, 0x533f, 0x5f97,
+  0x5fb3, 0x6d9c, 0x7279, 0x7763, 0x79bf, 0x7be4, 0x6bd2, 0x72ec,
+  0x8aad, 0x6803, 0x6a61, 0x51f8, 0x7a81, 0x6934, 0x5c4a, 0x9cf6,
+  0x82eb, 0x5bc5, 0x9149, 0x701e, 0x5678, 0x5c6f, 0x60c7, 0x6566,
+  0x6c8c, 0x8c5a, 0x9041, 0x9813, 0x5451, 0x66c7, 0x920d, 0x5948,
+  0x90a3, 0x5185, 0x4e4d, 0x51ea, 0x8599, 0x8b0e, 0x7058, 0x637a,
+  0x934b, 0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, 0x8edf,
+  0x96e3, 0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, 0x8cd1,
+  0x8089, 0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165,
+  /* 0x47 */
+  0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, 0x6fe1,
+  0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, 0x5ff5,
+  0x637b, 0x649a, 0x71c3, 0x7c98, 0x4e43, 0x5efc, 0x4e4b, 0x57dc,
+  0x56a2, 0x60a9, 0x6fc3, 0x7d0d, 0x80fd, 0x8133, 0x81bf, 0x8fb2,
+  0x8997, 0x86a4, 0x5df4, 0x628a, 0x64ad, 0x8987, 0x6777, 0x6ce2,
+  0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, 0x4ff3,
+  0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, 0x80cc,
+  0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0x6973,
+  0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019, 0x877f,
+  0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd, 0x67cf,
+  0x6cca, 0x767d, 0x7b94, 0x7c95, 0x8236, 0x8584, 0x8feb, 0x66dd,
+  0x6f20, 0x7206, 0x7e1b, 0x83ab, 0x99c1, 0x9ea6,
+  /* 0x48 */
+  0x51fd, 0x7bb1, 0x7872, 0x7bb8, 0x8087, 0x7b48, 0x6ae8, 0x5e61,
+  0x808c, 0x7551, 0x7560, 0x516b, 0x9262, 0x6e8c, 0x767a, 0x9197,
+  0x9aea, 0x4f10, 0x7f70, 0x629c, 0x7b4f, 0x95a5, 0x9ce9, 0x567a,
+  0x5859, 0x86e4, 0x96bc, 0x4f34, 0x5224, 0x534a, 0x53cd, 0x53db,
+  0x5e06, 0x642c, 0x6591, 0x677f, 0x6c3e, 0x6c4e, 0x7248, 0x72af,
+  0x73ed, 0x7554, 0x7e41, 0x822c, 0x85e9, 0x8ca9, 0x7bc4, 0x91c6,
+  0x7169, 0x9812, 0x98ef, 0x633d, 0x6669, 0x756a, 0x76e4, 0x78d0,
+  0x8543, 0x86ee, 0x532a, 0x5351, 0x5426, 0x5983, 0x5e87, 0x5f7c,
+  0x60b2, 0x6249, 0x6279, 0x62ab, 0x6590, 0x6bd4, 0x6ccc, 0x75b2,
+  0x76ae, 0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, 0x8ab9,
+  0x8cbb, 0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, 0x5c3e,
+  0x5fae, 0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e,
+  /* 0x49 */
+  0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, 0x819d,
+  0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, 0x6867,
+  0x59eb, 0x5a9b, 0x7d10, 0x767e, 0x8b2c, 0x4ff5, 0x5f6a, 0x6a19,
+  0x6c37, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8a55, 0x8c79, 0x5edf,
+  0x63cf, 0x75c5, 0x79d2, 0x82d7, 0x9328, 0x92f2, 0x849c, 0x86ed,
+  0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, 0x8cd3,
+  0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, 0x5a66,
+  0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0x65a7,
+  0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299, 0x8b5c,
+  0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab, 0x6b66,
+  0x821e, 0x8461, 0x856a, 0x90e8, 0x5c01, 0x6953, 0x98a8, 0x847a,
+  0x8557, 0x4f0f, 0x526f, 0x5fa9, 0x5e45, 0x670d,
+  /* 0x4a */
+  0x798f, 0x8179, 0x8907, 0x8986, 0x6df5, 0x5f17, 0x6255, 0x6cb8,
+  0x4ecf, 0x7269, 0x9b92, 0x5206, 0x543b, 0x5674, 0x58b3, 0x61a4,
+  0x626e, 0x711a, 0x596e, 0x7c89, 0x7cde, 0x7d1b, 0x96f0, 0x6587,
+  0x805e, 0x4e19, 0x4f75, 0x5175, 0x5840, 0x5e63, 0x5e73, 0x5f0a,
+  0x67c4, 0x4e26, 0x853d, 0x9589, 0x965b, 0x7c73, 0x9801, 0x50fb,
+  0x58c1, 0x7656, 0x78a7, 0x5225, 0x77a5, 0x8511, 0x7b86, 0x504f,
+  0x5909, 0x7247, 0x7bc7, 0x7de8, 0x8fba, 0x8fd4, 0x904d, 0x4fbf,
+  0x52c9, 0x5a29, 0x5f01, 0x97ad, 0x4fdd, 0x8217, 0x92ea, 0x5703,
+  0x6355, 0x6b69, 0x752b, 0x88dc, 0x8f14, 0x7a42, 0x52df, 0x5893,
+  0x6155, 0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, 0x4ff8,
+  0x5305, 0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, 0x5d29,
+  0x5e96, 0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b,
+  /* 0x4b */
+  0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, 0x840c,
+  0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, 0x98fd,
+  0x9cf3, 0x9d6c, 0x4e4f, 0x4ea1, 0x508d, 0x5256, 0x574a, 0x59a8,
+  0x5e3d, 0x5fd8, 0x5fd9, 0x623f, 0x66b4, 0x671b, 0x67d0, 0x68d2,
+  0x5192, 0x7d21, 0x80aa, 0x81a8, 0x8b00, 0x8c8c, 0x8cbf, 0x927e,
+  0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, 0x64b2,
+  0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, 0x6b86,
+  0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0x6469,
+  0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a, 0x6bce,
+  0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe, 0x9c52,
+  0x685d, 0x4ea6, 0x4fe3, 0x53c8, 0x62b9, 0x672b, 0x6cab, 0x8fc4,
+  0x4fad, 0x7e6d, 0x9ebf, 0x4e07, 0x6162, 0x6e80,
+  /* 0x4c */
+  0x6f2b, 0x8513, 0x5473, 0x672a, 0x9b45, 0x5df3, 0x7b95, 0x5cac,
+  0x5bc6, 0x871c, 0x6e4a, 0x84d1, 0x7a14, 0x8108, 0x5999, 0x7c8d,
+  0x6c11, 0x7720, 0x52d9, 0x5922, 0x7121, 0x725f, 0x77db, 0x9727,
+  0x9d61, 0x690b, 0x5a7f, 0x5a18, 0x51a5, 0x540d, 0x547d, 0x660e,
+  0x76df, 0x8ff7, 0x9298, 0x9cf4, 0x59ea, 0x725d, 0x6ec5, 0x514d,
+  0x68c9, 0x7dbf, 0x7dec, 0x9762, 0x9eba, 0x6478, 0x6a21, 0x8302,
+  0x5984, 0x5b5f, 0x6bdb, 0x731b, 0x76f2, 0x7db2, 0x8017, 0x8499,
+  0x5132, 0x6728, 0x9ed9, 0x76ee, 0x6762, 0x52ff, 0x9905, 0x5c24,
+  0x623b, 0x7c7e, 0x8cb0, 0x554f, 0x60b6, 0x7d0b, 0x9580, 0x5301,
+  0x4e5f, 0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, 0x77e2,
+  0x5384, 0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, 0x67f3,
+  0x85ae, 0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652,
+  /* 0x4d */
+  0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, 0x5ba5,
+  0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, 0x6d8c,
+  0x7336, 0x7337, 0x7531, 0x7950, 0x88d5, 0x8a98, 0x904a, 0x9091,
+  0x90f5, 0x96c4, 0x878d, 0x5915, 0x4e88, 0x4f59, 0x4e0e, 0x8a89,
+  0x8f3f, 0x9810, 0x50ad, 0x5e7c, 0x5996, 0x5bb9, 0x5eb8, 0x63da,
+  0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, 0x7194,
+  0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, 0x8b21,
+  0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0x6c83,
+  0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8, 0x6765,
+  0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a, 0x4e71,
+  0x5375, 0x5d50, 0x6b04, 0x6feb, 0x85cd, 0x862d, 0x89a7, 0x5229,
+  0x540f, 0x5c65, 0x674e, 0x68a8, 0x7406, 0x7483,
+  /* 0x4e */
+  0x75e2, 0x88cf, 0x88e1, 0x91cc, 0x96e2, 0x9678, 0x5f8b, 0x7387,
+  0x7acb, 0x844e, 0x63a0, 0x7565, 0x5289, 0x6d41, 0x6e9c, 0x7409,
+  0x7559, 0x786b, 0x7c92, 0x9686, 0x7adc, 0x9f8d, 0x4fb6, 0x616e,
+  0x65c5, 0x865c, 0x4e86, 0x4eae, 0x50da, 0x4e21, 0x51cc, 0x5bee,
+  0x6599, 0x6881, 0x6dbc, 0x731f, 0x7642, 0x77ad, 0x7a1c, 0x7ce7,
+  0x826f, 0x8ad2, 0x907c, 0x91cf, 0x9675, 0x9818, 0x529b, 0x7dd1,
+  0x502b, 0x5398, 0x6797, 0x6dcb, 0x71d0, 0x7433, 0x81e8, 0x8f2a,
+  0x96a3, 0x9c57, 0x9e9f, 0x7460, 0x5841, 0x6d99, 0x7d2f, 0x985e,
+  0x4ee4, 0x4f36, 0x4f8b, 0x51b7, 0x52b1, 0x5dba, 0x601c, 0x73b2,
+  0x793c, 0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, 0x9f62,
+  0x66a6, 0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, 0x604b,
+  0x6190, 0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f,
+  /* 0x4f */
+  0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, 0x8cc2,
+  0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, 0x697c,
+  0x6994, 0x6d6a, 0x6f0f, 0x7262, 0x72fc, 0x7bed, 0x8001, 0x807e,
+  0x874b, 0x90ce, 0x516d, 0x9e93, 0x7984, 0x808b, 0x9332, 0x8ad6,
+  0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, 0x67a0,
+  0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, 0x6900,
+  0x6e7e, 0x7897, 0x8155, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x50 */
+  0x5f0c, 0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, 0x4e3f,
+  0x4e42, 0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, 0x8212,
+  0x5f0d, 0x4e8e, 0x4e9e, 0x4e9f, 0x4ea0, 0x4ea2, 0x4eb0, 0x4eb3,
+  0x4eb6, 0x4ece, 0x4ecd, 0x4ec4, 0x4ec6, 0x4ec2, 0x4ed7, 0x4ede,
+  0x4eed, 0x4edf, 0x4ef7, 0x4f09, 0x4f5a, 0x4f30, 0x4f5b, 0x4f5d,
+  0x4f57, 0x4f47, 0x4f76, 0x4f88, 0x4f8f, 0x4f98, 0x4f7b, 0x4f69,
+  0x4f70, 0x4f91, 0x4f6f, 0x4f86, 0x4f96, 0x5118, 0x4fd4, 0x4fdf,
+  0x4fce, 0x4fd8, 0x4fdb, 0x4fd1, 0x4fda, 0x4fd0, 0x4fe4, 0x4fe5,
+  0x501a, 0x5028, 0x5014, 0x502a, 0x5025, 0x5005, 0x4f1c, 0x4ff6,
+  0x5021, 0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, 0x5043,
+  0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, 0x506c,
+  0x5078, 0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2,
+  /* 0x51 */
+  0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, 0x50ed,
+  0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, 0x5116,
+  0x5115, 0x5114, 0x511a, 0x5121, 0x513a, 0x5137, 0x513c, 0x513b,
+  0x513f, 0x5140, 0x5152, 0x514c, 0x5154, 0x5162, 0x7af8, 0x5169,
+  0x516a, 0x516e, 0x5180, 0x5182, 0x56d8, 0x518c, 0x5189, 0x518f,
+  0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, 0x51a9,
+  0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, 0x51bd,
+  0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0x51f0,
+  0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227, 0x522a,
+  0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c, 0x525e,
+  0x5254, 0x526a, 0x5274, 0x5269, 0x5273, 0x527f, 0x527d, 0x528d,
+  0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8fa8,
+  /* 0x52 */
+  0x8fa7, 0x52ac, 0x52ad, 0x52bc, 0x52b5, 0x52c1, 0x52cd, 0x52d7,
+  0x52de, 0x52e3, 0x52e6, 0x98ed, 0x52e0, 0x52f3, 0x52f5, 0x52f8,
+  0x52f9, 0x5306, 0x5308, 0x7538, 0x530d, 0x5310, 0x530f, 0x5315,
+  0x531a, 0x5323, 0x532f, 0x5331, 0x5333, 0x5338, 0x5340, 0x5346,
+  0x5345, 0x4e17, 0x5349, 0x534d, 0x51d6, 0x535e, 0x5369, 0x536e,
+  0x5918, 0x537b, 0x5377, 0x5382, 0x5396, 0x53a0, 0x53a6, 0x53a5,
+  0x53ae, 0x53b0, 0x53b6, 0x53c3, 0x7c12, 0x96d9, 0x53df, 0x66fc,
+  0x71ee, 0x53ee, 0x53e8, 0x53ed, 0x53fa, 0x5401, 0x543d, 0x5440,
+  0x542c, 0x542d, 0x543c, 0x542e, 0x5436, 0x5429, 0x541d, 0x544e,
+  0x548f, 0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, 0x5492,
+  0x547b, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, 0x54a2,
+  0x54b8, 0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8,
+  /* 0x53 */
+  0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, 0x54e6,
+  0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, 0x5539,
+  0x5540, 0x5563, 0x554c, 0x552e, 0x555c, 0x5545, 0x5556, 0x5557,
+  0x5538, 0x5533, 0x555d, 0x5599, 0x5580, 0x54af, 0x558a, 0x559f,
+  0x557b, 0x557e, 0x5598, 0x559e, 0x55ae, 0x557c, 0x5583, 0x55a9,
+  0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, 0x55e4,
+  0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, 0x55f9,
+  0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0x566b,
+  0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a, 0x56a0,
+  0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2, 0x56bc,
+  0x56c1, 0x56c3, 0x56c0, 0x56c8, 0x56ce, 0x56d1, 0x56d3, 0x56d7,
+  0x56ee, 0x56f9, 0x5700, 0x56ff, 0x5704, 0x5709,
+  /* 0x54 */
+  0x5708, 0x570b, 0x570d, 0x5713, 0x5718, 0x5716, 0x55c7, 0x571c,
+  0x5726, 0x5737, 0x5738, 0x574e, 0x573b, 0x5740, 0x574f, 0x5769,
+  0x57c0, 0x5788, 0x5761, 0x577f, 0x5789, 0x5793, 0x57a0, 0x57b3,
+  0x57a4, 0x57aa, 0x57b0, 0x57c3, 0x57c6, 0x57d4, 0x57d2, 0x57d3,
+  0x580a, 0x57d6, 0x57e3, 0x580b, 0x5819, 0x581d, 0x5872, 0x5821,
+  0x5862, 0x584b, 0x5870, 0x6bc0, 0x5852, 0x583d, 0x5879, 0x5885,
+  0x58b9, 0x589f, 0x58ab, 0x58ba, 0x58de, 0x58bb, 0x58b8, 0x58ae,
+  0x58c5, 0x58d3, 0x58d1, 0x58d7, 0x58d9, 0x58d8, 0x58e5, 0x58dc,
+  0x58e4, 0x58df, 0x58ef, 0x58fa, 0x58f9, 0x58fb, 0x58fc, 0x58fd,
+  0x5902, 0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, 0x592d,
+  0x5932, 0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, 0x595a,
+  0x5958, 0x5962, 0x5960, 0x5967, 0x596c, 0x5969,
+  /* 0x55 */
+  0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, 0x59c6,
+  0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, 0x5a11,
+  0x5a1c, 0x5a09, 0x5a1a, 0x5a40, 0x5a6c, 0x5a49, 0x5a35, 0x5a36,
+  0x5a62, 0x5a6a, 0x5a9a, 0x5abc, 0x5abe, 0x5acb, 0x5ac2, 0x5abd,
+  0x5ae3, 0x5ad7, 0x5ae6, 0x5ae9, 0x5ad6, 0x5afa, 0x5afb, 0x5b0c,
+  0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, 0x5b43,
+  0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, 0x5b69,
+  0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0x5b83,
+  0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0, 0x5be4,
+  0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6, 0x5bf3,
+  0x5c05, 0x5c07, 0x5c08, 0x5c0d, 0x5c13, 0x5c20, 0x5c22, 0x5c28,
+  0x5c38, 0x5c39, 0x5c41, 0x5c46, 0x5c4e, 0x5c53,
+  /* 0x56 */
+  0x5c50, 0x5c4f, 0x5b71, 0x5c6c, 0x5c6e, 0x4e62, 0x5c76, 0x5c79,
+  0x5c8c, 0x5c91, 0x5c94, 0x599b, 0x5cab, 0x5cbb, 0x5cb6, 0x5cbc,
+  0x5cb7, 0x5cc5, 0x5cbe, 0x5cc7, 0x5cd9, 0x5ce9, 0x5cfd, 0x5cfa,
+  0x5ced, 0x5d8c, 0x5cea, 0x5d0b, 0x5d15, 0x5d17, 0x5d5c, 0x5d1f,
+  0x5d1b, 0x5d11, 0x5d14, 0x5d22, 0x5d1a, 0x5d19, 0x5d18, 0x5d4c,
+  0x5d52, 0x5d4e, 0x5d4b, 0x5d6c, 0x5d73, 0x5d76, 0x5d87, 0x5d84,
+  0x5d82, 0x5da2, 0x5d9d, 0x5dac, 0x5dae, 0x5dbd, 0x5d90, 0x5db7,
+  0x5dbc, 0x5dc9, 0x5dcd, 0x5dd3, 0x5dd2, 0x5dd6, 0x5ddb, 0x5deb,
+  0x5df2, 0x5df5, 0x5e0b, 0x5e1a, 0x5e19, 0x5e11, 0x5e1b, 0x5e36,
+  0x5e37, 0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, 0x5e5f,
+  0x5e62, 0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, 0x5e7f,
+  0x5ea0, 0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf,
+  /* 0x57 */
+  0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, 0x5ee8,
+  0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, 0x5efe,
+  0x5f03, 0x5f09, 0x5f5d, 0x5f5c, 0x5f0b, 0x5f11, 0x5f16, 0x5f29,
+  0x5f2d, 0x5f38, 0x5f41, 0x5f48, 0x5f4c, 0x5f4e, 0x5f2f, 0x5f51,
+  0x5f56, 0x5f57, 0x5f59, 0x5f61, 0x5f6d, 0x5f73, 0x5f77, 0x5f83,
+  0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, 0x5f99,
+  0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, 0x5fe4,
+  0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0x6019,
+  0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b, 0x6026,
+  0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f, 0x604a,
+  0x6046, 0x604d, 0x6063, 0x6043, 0x6064, 0x6042, 0x606c, 0x606b,
+  0x6059, 0x6081, 0x608d, 0x60e7, 0x6083, 0x609a,
+  /* 0x58 */
+  0x6084, 0x609b, 0x6096, 0x6097, 0x6092, 0x60a7, 0x608b, 0x60e1,
+  0x60b8, 0x60e0, 0x60d3, 0x60b4, 0x5ff0, 0x60bd, 0x60c6, 0x60b5,
+  0x60d8, 0x614d, 0x6115, 0x6106, 0x60f6, 0x60f7, 0x6100, 0x60f4,
+  0x60fa, 0x6103, 0x6121, 0x60fb, 0x60f1, 0x610d, 0x610e, 0x6147,
+  0x613e, 0x6128, 0x6127, 0x614a, 0x613f, 0x613c, 0x612c, 0x6134,
+  0x613d, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, 0x615a,
+  0x616b, 0x6174, 0x616f, 0x6165, 0x6171, 0x615f, 0x615d, 0x6153,
+  0x6175, 0x6199, 0x6196, 0x6187, 0x61ac, 0x6194, 0x619a, 0x618a,
+  0x6191, 0x61ab, 0x61ae, 0x61cc, 0x61ca, 0x61c9, 0x61f7, 0x61c8,
+  0x61c3, 0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, 0x61e3,
+  0x61f6, 0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, 0x6200,
+  0x6208, 0x6209, 0x620d, 0x620c, 0x6214, 0x621b,
+  /* 0x59 */
+  0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, 0x6241,
+  0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, 0x6282,
+  0x6289, 0x627e, 0x6292, 0x6293, 0x6296, 0x62d4, 0x6283, 0x6294,
+  0x62d7, 0x62d1, 0x62bb, 0x62cf, 0x62ff, 0x62c6, 0x64d4, 0x62c8,
+  0x62dc, 0x62cc, 0x62ca, 0x62c2, 0x62c7, 0x629b, 0x62c9, 0x630c,
+  0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, 0x6350,
+  0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, 0x63ab,
+  0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0x6369,
+  0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2, 0x63f6,
+  0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, 0x651d,
+  0x6417, 0x6428, 0x640f, 0x6467, 0x646f, 0x6476, 0x644e, 0x652a,
+  0x6495, 0x6493, 0x64a5, 0x64a9, 0x6488, 0x64bc,
+  /* 0x5a */
+  0x64da, 0x64d2, 0x64c5, 0x64c7, 0x64bb, 0x64d8, 0x64c2, 0x64f1,
+  0x64e7, 0x8209, 0x64e0, 0x64e1, 0x62ac, 0x64e3, 0x64ef, 0x652c,
+  0x64f6, 0x64f4, 0x64f2, 0x64fa, 0x6500, 0x64fd, 0x6518, 0x651c,
+  0x6505, 0x6524, 0x6523, 0x652b, 0x6534, 0x6535, 0x6537, 0x6536,
+  0x6538, 0x754b, 0x6548, 0x6556, 0x6555, 0x654d, 0x6558, 0x655e,
+  0x655d, 0x6572, 0x6578, 0x6582, 0x6583, 0x8b8a, 0x659b, 0x659f,
+  0x65ab, 0x65b7, 0x65c3, 0x65c6, 0x65c1, 0x65c4, 0x65cc, 0x65d2,
+  0x65db, 0x65d9, 0x65e0, 0x65e1, 0x65f1, 0x6772, 0x660a, 0x6603,
+  0x65fb, 0x6773, 0x6635, 0x6636, 0x6634, 0x661c, 0x664f, 0x6644,
+  0x6649, 0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, 0x665f,
+  0x6662, 0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, 0x6698,
+  0x669d, 0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc,
+  /* 0x5b */
+  0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, 0x66e9,
+  0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, 0x6727,
+  0x9738, 0x672e, 0x673f, 0x6736, 0x6741, 0x6738, 0x6737, 0x6746,
+  0x675e, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, 0x67a9,
+  0x677c, 0x676a, 0x678c, 0x678b, 0x67a6, 0x67a1, 0x6785, 0x67b7,
+  0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, 0x67de,
+  0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, 0x6a9c,
+  0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0x68b3,
+  0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f, 0x68ad,
+  0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874, 0x68b5,
+  0x68a0, 0x68ba, 0x690f, 0x688d, 0x687e, 0x6901, 0x68ca, 0x6908,
+  0x68d8, 0x6922, 0x6926, 0x68e1, 0x690c, 0x68cd,
+  /* 0x5c */
+  0x68d4, 0x68e7, 0x68d5, 0x6936, 0x6912, 0x6904, 0x68d7, 0x68e3,
+  0x6925, 0x68f9, 0x68e0, 0x68ef, 0x6928, 0x692a, 0x691a, 0x6923,
+  0x6921, 0x68c6, 0x6979, 0x6977, 0x695c, 0x6978, 0x696b, 0x6954,
+  0x697e, 0x696e, 0x6939, 0x6974, 0x693d, 0x6959, 0x6930, 0x6961,
+  0x695e, 0x695d, 0x6981, 0x696a, 0x69b2, 0x69ae, 0x69d0, 0x69bf,
+  0x69c1, 0x69d3, 0x69be, 0x69ce, 0x5be8, 0x69ca, 0x69dd, 0x69bb,
+  0x69c3, 0x69a7, 0x6a2e, 0x6991, 0x69a0, 0x699c, 0x6995, 0x69b4,
+  0x69de, 0x69e8, 0x6a02, 0x6a1b, 0x69ff, 0x6b0a, 0x69f9, 0x69f2,
+  0x69e7, 0x6a05, 0x69b1, 0x6a1e, 0x69ed, 0x6a14, 0x69eb, 0x6a0a,
+  0x6a12, 0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, 0x6a36,
+  0x6a78, 0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, 0x6a22,
+  0x6a90, 0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3,
+  /* 0x5d */
+  0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, 0x6aac,
+  0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, 0x6b05,
+  0x8616, 0x6afa, 0x6b12, 0x6b16, 0x9b31, 0x6b1f, 0x6b38, 0x6b37,
+  0x76dc, 0x6b39, 0x98ee, 0x6b47, 0x6b43, 0x6b49, 0x6b50, 0x6b59,
+  0x6b54, 0x6b5b, 0x6b5f, 0x6b61, 0x6b78, 0x6b79, 0x6b7f, 0x6b80,
+  0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, 0x6baa,
+  0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, 0x6bc6,
+  0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0x9ebe,
+  0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e, 0x6c55,
+  0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b, 0x6c7e,
+  0x6c68, 0x6c73, 0x6c92, 0x6c90, 0x6cc4, 0x6cf1, 0x6cd3, 0x6cbd,
+  0x6cd7, 0x6cc5, 0x6cdd, 0x6cae, 0x6cb1, 0x6cbe,
+  /* 0x5e */
+  0x6cba, 0x6cdb, 0x6cef, 0x6cd9, 0x6cea, 0x6d1f, 0x884d, 0x6d36,
+  0x6d2b, 0x6d3d, 0x6d38, 0x6d19, 0x6d35, 0x6d33, 0x6d12, 0x6d0c,
+  0x6d63, 0x6d93, 0x6d64, 0x6d5a, 0x6d79, 0x6d59, 0x6d8e, 0x6d95,
+  0x6fe4, 0x6d85, 0x6df9, 0x6e15, 0x6e0a, 0x6db5, 0x6dc7, 0x6de6,
+  0x6db8, 0x6dc6, 0x6dec, 0x6dde, 0x6dcc, 0x6de8, 0x6dd2, 0x6dc5,
+  0x6dfa, 0x6dd9, 0x6de4, 0x6dd5, 0x6dea, 0x6dee, 0x6e2d, 0x6e6e,
+  0x6e2e, 0x6e19, 0x6e72, 0x6e5f, 0x6e3e, 0x6e23, 0x6e6b, 0x6e2b,
+  0x6e76, 0x6e4d, 0x6e1f, 0x6e43, 0x6e3a, 0x6e4e, 0x6e24, 0x6eff,
+  0x6e1d, 0x6e38, 0x6e82, 0x6eaa, 0x6e98, 0x6ec9, 0x6eb7, 0x6ed3,
+  0x6ebd, 0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, 0x6ea5,
+  0x6ec2, 0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, 0x6efe,
+  0x6f3f, 0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc,
+  /* 0x5f */
+  0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, 0x6f80,
+  0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, 0x6f8e,
+  0x6f91, 0x6fc2, 0x6f66, 0x6fb3, 0x6fa3, 0x6fa1, 0x6fa4, 0x6fb9,
+  0x6fc6, 0x6faa, 0x6fdf, 0x6fd5, 0x6fec, 0x6fd4, 0x6fd8, 0x6ff1,
+  0x6fee, 0x6fdb, 0x7009, 0x700b, 0x6ffa, 0x7011, 0x7001, 0x700f,
+  0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, 0x7030,
+  0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, 0x70f1,
+  0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0x70d9,
+  0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188, 0x7166,
+  0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184, 0x7195,
+  0x71a8, 0x71ac, 0x71d7, 0x71b9, 0x71be, 0x71d2, 0x71c9, 0x71d4,
+  0x71ce, 0x71e0, 0x71ec, 0x71e7, 0x71f5, 0x71fc,
+  /* 0x60 */
+  0x71f9, 0x71ff, 0x720d, 0x7210, 0x721b, 0x7228, 0x722d, 0x722c,
+  0x7230, 0x7232, 0x723b, 0x723c, 0x723f, 0x7240, 0x7246, 0x724b,
+  0x7258, 0x7274, 0x727e, 0x7282, 0x7281, 0x7287, 0x7292, 0x7296,
+  0x72a2, 0x72a7, 0x72b9, 0x72b2, 0x72c3, 0x72c6, 0x72c4, 0x72ce,
+  0x72d2, 0x72e2, 0x72e0, 0x72e1, 0x72f9, 0x72f7, 0x500f, 0x7317,
+  0x730a, 0x731c, 0x7316, 0x731d, 0x7334, 0x732f, 0x7329, 0x7325,
+  0x733e, 0x734e, 0x734f, 0x9ed8, 0x7357, 0x736a, 0x7368, 0x7370,
+  0x7378, 0x7375, 0x737b, 0x737a, 0x73c8, 0x73b3, 0x73ce, 0x73bb,
+  0x73c0, 0x73e5, 0x73ee, 0x73de, 0x74a2, 0x7405, 0x746f, 0x7425,
+  0x73f8, 0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, 0x7441,
+  0x745c, 0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, 0x748b,
+  0x749e, 0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1,
+  /* 0x61 */
+  0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, 0x74f1,
+  0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, 0x750d,
+  0x7515, 0x7513, 0x751e, 0x7526, 0x752c, 0x753c, 0x7544, 0x754d,
+  0x754a, 0x7549, 0x755b, 0x7546, 0x755a, 0x7569, 0x7564, 0x7567,
+  0x756b, 0x756d, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, 0x758a,
+  0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, 0x75c2,
+  0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, 0x75cd,
+  0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0x75fc,
+  0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d, 0x7609,
+  0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, 0x7630,
+  0x763b, 0x7647, 0x7648, 0x7646, 0x765c, 0x7658, 0x7661, 0x7662,
+  0x7668, 0x7669, 0x766a, 0x7667, 0x766c, 0x7670,
+  /* 0x62 */
+  0x7672, 0x7676, 0x7678, 0x767c, 0x7680, 0x7683, 0x7688, 0x768b,
+  0x768e, 0x7696, 0x7693, 0x7699, 0x769a, 0x76b0, 0x76b4, 0x76b8,
+  0x76b9, 0x76ba, 0x76c2, 0x76cd, 0x76d6, 0x76d2, 0x76de, 0x76e1,
+  0x76e5, 0x76e7, 0x76ea, 0x862f, 0x76fb, 0x7708, 0x7707, 0x7704,
+  0x7729, 0x7724, 0x771e, 0x7725, 0x7726, 0x771b, 0x7737, 0x7738,
+  0x7747, 0x775a, 0x7768, 0x776b, 0x775b, 0x7765, 0x777f, 0x777e,
+  0x7779, 0x778e, 0x778b, 0x7791, 0x77a0, 0x779e, 0x77b0, 0x77b6,
+  0x77b9, 0x77bf, 0x77bc, 0x77bd, 0x77bb, 0x77c7, 0x77cd, 0x77d7,
+  0x77da, 0x77dc, 0x77e3, 0x77ee, 0x77fc, 0x780c, 0x7812, 0x7926,
+  0x7820, 0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, 0x789a,
+  0x788c, 0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, 0x78cb,
+  0x78d4, 0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec,
+  /* 0x63 */
+  0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, 0x7919,
+  0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, 0x7955,
+  0x7953, 0x797a, 0x797f, 0x798a, 0x799d, 0x79a7, 0x9f4b, 0x79aa,
+  0x79ae, 0x79b3, 0x79b9, 0x79ba, 0x79c9, 0x79d5, 0x79e7, 0x79ec,
+  0x79e1, 0x79e3, 0x7a08, 0x7a0d, 0x7a18, 0x7a19, 0x7a20, 0x7a1f,
+  0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, 0x7a49,
+  0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, 0x7a88,
+  0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0x7ab6,
+  0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd, 0x7acf,
+  0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2, 0x7ae6,
+  0x7aed, 0x7af0, 0x7b02, 0x7b0f, 0x7b0a, 0x7b06, 0x7b33, 0x7b18,
+  0x7b19, 0x7b1e, 0x7b35, 0x7b28, 0x7b36, 0x7b50,
+  /* 0x64 */
+  0x7b7a, 0x7b04, 0x7b4d, 0x7b0b, 0x7b4c, 0x7b45, 0x7b75, 0x7b65,
+  0x7b74, 0x7b67, 0x7b70, 0x7b71, 0x7b6c, 0x7b6e, 0x7b9d, 0x7b98,
+  0x7b9f, 0x7b8d, 0x7b9c, 0x7b9a, 0x7b8b, 0x7b92, 0x7b8f, 0x7b5d,
+  0x7b99, 0x7bcb, 0x7bc1, 0x7bcc, 0x7bcf, 0x7bb4, 0x7bc6, 0x7bdd,
+  0x7be9, 0x7c11, 0x7c14, 0x7be6, 0x7be5, 0x7c60, 0x7c00, 0x7c07,
+  0x7c13, 0x7bf3, 0x7bf7, 0x7c17, 0x7c0d, 0x7bf6, 0x7c23, 0x7c27,
+  0x7c2a, 0x7c1f, 0x7c37, 0x7c2b, 0x7c3d, 0x7c4c, 0x7c43, 0x7c54,
+  0x7c4f, 0x7c40, 0x7c50, 0x7c58, 0x7c5f, 0x7c64, 0x7c56, 0x7c65,
+  0x7c6c, 0x7c75, 0x7c83, 0x7c90, 0x7ca4, 0x7cad, 0x7ca2, 0x7cab,
+  0x7ca1, 0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, 0x7cbd,
+  0x7cc0, 0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, 0x9b3b,
+  0x7cef, 0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06,
+  /* 0x65 */
+  0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, 0x7d32,
+  0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, 0x7d68,
+  0x7d6e, 0x7d4f, 0x7d63, 0x7d93, 0x7d89, 0x7d5b, 0x7d8f, 0x7d7d,
+  0x7d9b, 0x7dba, 0x7dae, 0x7da3, 0x7db5, 0x7dc7, 0x7dbd, 0x7dab,
+  0x7e3d, 0x7da2, 0x7daf, 0x7ddc, 0x7db8, 0x7d9f, 0x7db0, 0x7dd8,
+  0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, 0x7e0a,
+  0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, 0x7e22,
+  0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0x7e32,
+  0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a, 0x7e79,
+  0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d, 0x8fae,
+  0x7e7f, 0x7e88, 0x7e89, 0x7e8c, 0x7e92, 0x7e90, 0x7e93, 0x7e94,
+  0x7e96, 0x7e8e, 0x7e9b, 0x7e9c, 0x7f38, 0x7f3a,
+  /* 0x66 */
+  0x7f45, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f50, 0x7f51, 0x7f55, 0x7f54,
+  0x7f58, 0x7f5f, 0x7f60, 0x7f68, 0x7f69, 0x7f67, 0x7f78, 0x7f82,
+  0x7f86, 0x7f83, 0x7f88, 0x7f87, 0x7f8c, 0x7f94, 0x7f9e, 0x7f9d,
+  0x7f9a, 0x7fa3, 0x7faf, 0x7fb2, 0x7fb9, 0x7fae, 0x7fb6, 0x7fb8,
+  0x8b71, 0x7fc5, 0x7fc6, 0x7fca, 0x7fd5, 0x7fd4, 0x7fe1, 0x7fe6,
+  0x7fe9, 0x7ff3, 0x7ff9, 0x98dc, 0x8006, 0x8004, 0x800b, 0x8012,
+  0x8018, 0x8019, 0x801c, 0x8021, 0x8028, 0x803f, 0x803b, 0x804a,
+  0x8046, 0x8052, 0x8058, 0x805a, 0x805f, 0x8062, 0x8068, 0x8073,
+  0x8072, 0x8070, 0x8076, 0x8079, 0x807d, 0x807f, 0x8084, 0x8086,
+  0x8085, 0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, 0x80db,
+  0x80e5, 0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, 0x80ef,
+  0x80f1, 0x811b, 0x8129, 0x8123, 0x812f, 0x814b,
+  /* 0x67 */
+  0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, 0x816e,
+  0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, 0x8182,
+  0x81a0, 0x8195, 0x81a4, 0x81a3, 0x815f, 0x8193, 0x81a9, 0x81b0,
+  0x81b5, 0x81be, 0x81b8, 0x81bd, 0x81c0, 0x81c2, 0x81ba, 0x81c9,
+  0x81cd, 0x81d1, 0x81d9, 0x81d8, 0x81c8, 0x81da, 0x81df, 0x81e0,
+  0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, 0x8207,
+  0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, 0x8233,
+  0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0x8262,
+  0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278, 0x827e,
+  0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1, 0x82e3,
+  0x82df, 0x82d2, 0x82f4, 0x82f3, 0x82fa, 0x8393, 0x8303, 0x82fb,
+  0x82f9, 0x82de, 0x8306, 0x82dc, 0x8309, 0x82d9,
+  /* 0x68 */
+  0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, 0x8350,
+  0x8345, 0x832f, 0x832b, 0x8317, 0x8318, 0x8385, 0x839a, 0x83aa,
+  0x839f, 0x83a2, 0x8396, 0x8323, 0x838e, 0x8387, 0x838a, 0x837c,
+  0x83b5, 0x8373, 0x8375, 0x83a0, 0x8389, 0x83a8, 0x83f4, 0x8413,
+  0x83eb, 0x83ce, 0x83fd, 0x8403, 0x83d8, 0x840b, 0x83c1, 0x83f7,
+  0x8407, 0x83e0, 0x83f2, 0x840d, 0x8422, 0x8420, 0x83bd, 0x8438,
+  0x8506, 0x83fb, 0x846d, 0x842a, 0x843c, 0x855a, 0x8484, 0x8477,
+  0x846b, 0x84ad, 0x846e, 0x8482, 0x8469, 0x8446, 0x842c, 0x846f,
+  0x8479, 0x8435, 0x84ca, 0x8462, 0x84b9, 0x84bf, 0x849f, 0x84d9,
+  0x84cd, 0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, 0x84a1,
+  0x8521, 0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, 0x8515,
+  0x8514, 0x84fc, 0x8540, 0x8563, 0x8558, 0x8548,
+  /* 0x69 */
+  0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, 0x8591,
+  0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, 0x859c,
+  0x8577, 0x857e, 0x8590, 0x85c9, 0x85ba, 0x85cf, 0x85b9, 0x85d0,
+  0x85d5, 0x85dd, 0x85e5, 0x85dc, 0x85f9, 0x860a, 0x8613, 0x860b,
+  0x85fe, 0x85fa, 0x8606, 0x8622, 0x861a, 0x8630, 0x863f, 0x864d,
+  0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, 0x86a9,
+  0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, 0x86b0,
+  0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0x86df,
+  0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, 0x86fb,
+  0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f, 0x8737,
+  0x873b, 0x8725, 0x8729, 0x871a, 0x8760, 0x875f, 0x8778, 0x874c,
+  0x874e, 0x8774, 0x8757, 0x8768, 0x876e, 0x8759,
+  /* 0x6a */
+  0x8753, 0x8763, 0x876a, 0x8805, 0x87a2, 0x879f, 0x8782, 0x87af,
+  0x87cb, 0x87bd, 0x87c0, 0x87d0, 0x96d6, 0x87ab, 0x87c4, 0x87b3,
+  0x87c7, 0x87c6, 0x87bb, 0x87ef, 0x87f2, 0x87e0, 0x880f, 0x880d,
+  0x87fe, 0x87f6, 0x87f7, 0x880e, 0x87d2, 0x8811, 0x8816, 0x8815,
+  0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883b, 0x8844,
+  0x8842, 0x8852, 0x8859, 0x885e, 0x8862, 0x886b, 0x8881, 0x887e,
+  0x889e, 0x8875, 0x887d, 0x88b5, 0x8872, 0x8882, 0x8897, 0x8892,
+  0x88ae, 0x8899, 0x88a2, 0x888d, 0x88a4, 0x88b0, 0x88bf, 0x88b1,
+  0x88c3, 0x88c4, 0x88d4, 0x88d8, 0x88d9, 0x88dd, 0x88f9, 0x8902,
+  0x88fc, 0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, 0x8913,
+  0x8943, 0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, 0x893b,
+  0x8936, 0x8938, 0x894c, 0x891d, 0x8960, 0x895e,
+  /* 0x6b */
+  0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, 0x897e,
+  0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, 0x89a6,
+  0x89ac, 0x89af, 0x89b2, 0x89ba, 0x89bd, 0x89bf, 0x89c0, 0x89da,
+  0x89dc, 0x89dd, 0x89e7, 0x89f4, 0x89f8, 0x8a03, 0x8a16, 0x8a10,
+  0x8a0c, 0x8a1b, 0x8a1d, 0x8a25, 0x8a36, 0x8a41, 0x8a5b, 0x8a52,
+  0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, 0x8a82,
+  0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, 0x8aa3,
+  0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0x8ae4,
+  0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb, 0x8b0c,
+  0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20, 0x8b33,
+  0x97ab, 0x8b26, 0x8b2b, 0x8b3e, 0x8b28, 0x8b41, 0x8b4c, 0x8b4f,
+  0x8b4e, 0x8b49, 0x8b56, 0x8b5b, 0x8b5a, 0x8b6b,
+  /* 0x6c */
+  0x8b5f, 0x8b6c, 0x8b6f, 0x8b74, 0x8b7d, 0x8b80, 0x8b8c, 0x8b8e,
+  0x8b92, 0x8b93, 0x8b96, 0x8b99, 0x8b9a, 0x8c3a, 0x8c41, 0x8c3f,
+  0x8c48, 0x8c4c, 0x8c4e, 0x8c50, 0x8c55, 0x8c62, 0x8c6c, 0x8c78,
+  0x8c7a, 0x8c82, 0x8c89, 0x8c85, 0x8c8a, 0x8c8d, 0x8c8e, 0x8c94,
+  0x8c7c, 0x8c98, 0x621d, 0x8cad, 0x8caa, 0x8cbd, 0x8cb2, 0x8cb3,
+  0x8cae, 0x8cb6, 0x8cc8, 0x8cc1, 0x8ce4, 0x8ce3, 0x8cda, 0x8cfd,
+  0x8cfa, 0x8cfb, 0x8d04, 0x8d05, 0x8d0a, 0x8d07, 0x8d0f, 0x8d0d,
+  0x8d10, 0x9f4e, 0x8d13, 0x8ccd, 0x8d14, 0x8d16, 0x8d67, 0x8d6d,
+  0x8d71, 0x8d73, 0x8d81, 0x8d99, 0x8dc2, 0x8dbe, 0x8dba, 0x8dcf,
+  0x8dda, 0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, 0x8ddf,
+  0x8de3, 0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, 0x8e10,
+  0x8e1f, 0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a,
+  /* 0x6d */
+  0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, 0x8e60,
+  0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, 0x8e87,
+  0x8e85, 0x8e84, 0x8e8b, 0x8e8a, 0x8e93, 0x8e91, 0x8e94, 0x8e99,
+  0x8eaa, 0x8ea1, 0x8eac, 0x8eb0, 0x8ec6, 0x8eb1, 0x8ebe, 0x8ec5,
+  0x8ec8, 0x8ecb, 0x8edb, 0x8ee3, 0x8efc, 0x8efb, 0x8eeb, 0x8efe,
+  0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, 0x8f1f,
+  0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, 0x8f42,
+  0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0x8f62,
+  0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf, 0x8fb7,
+  0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4, 0x9005,
+  0x8ff9, 0x8ffa, 0x9011, 0x9015, 0x9021, 0x900d, 0x901e, 0x9016,
+  0x900b, 0x9027, 0x9036, 0x9035, 0x9039, 0x8ff8,
+  /* 0x6e */
+  0x904f, 0x9050, 0x9051, 0x9052, 0x900e, 0x9049, 0x903e, 0x9056,
+  0x9058, 0x905e, 0x9068, 0x906f, 0x9076, 0x96a8, 0x9072, 0x9082,
+  0x907d, 0x9081, 0x9080, 0x908a, 0x9089, 0x908f, 0x90a8, 0x90af,
+  0x90b1, 0x90b5, 0x90e2, 0x90e4, 0x6248, 0x90db, 0x9102, 0x9112,
+  0x9119, 0x9132, 0x9130, 0x914a, 0x9156, 0x9158, 0x9163, 0x9165,
+  0x9169, 0x9173, 0x9172, 0x918b, 0x9189, 0x9182, 0x91a2, 0x91ab,
+  0x91af, 0x91aa, 0x91b5, 0x91b4, 0x91ba, 0x91c0, 0x91c1, 0x91c9,
+  0x91cb, 0x91d0, 0x91d6, 0x91df, 0x91e1, 0x91db, 0x91fc, 0x91f5,
+  0x91f6, 0x921e, 0x91ff, 0x9214, 0x922c, 0x9215, 0x9211, 0x925e,
+  0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, 0x924b,
+  0x9250, 0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, 0x92b9,
+  0x92b7, 0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e,
+  /* 0x6f */
+  0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, 0x935c,
+  0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, 0x9394,
+  0x93b9, 0x93d6, 0x93d7, 0x93e8, 0x93e5, 0x93d8, 0x93c3, 0x93dd,
+  0x93d0, 0x93c8, 0x93e4, 0x941a, 0x9414, 0x9413, 0x9403, 0x9407,
+  0x9410, 0x9436, 0x942b, 0x9435, 0x9421, 0x943a, 0x9441, 0x9452,
+  0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, 0x9470,
+  0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, 0x947f,
+  0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0x95a0,
+  0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be, 0x95ca,
+  0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6, 0x95dc,
+  0x95e1, 0x95e5, 0x95e2, 0x9621, 0x9628, 0x962e, 0x962f, 0x9642,
+  0x964c, 0x964f, 0x964b, 0x9677, 0x965c, 0x965e,
+  /* 0x70 */
+  0x965d, 0x965f, 0x9666, 0x9672, 0x966c, 0x968d, 0x9698, 0x9695,
+  0x9697, 0x96aa, 0x96a7, 0x96b1, 0x96b2, 0x96b0, 0x96b4, 0x96b6,
+  0x96b8, 0x96b9, 0x96ce, 0x96cb, 0x96c9, 0x96cd, 0x894d, 0x96dc,
+  0x970d, 0x96d5, 0x96f9, 0x9704, 0x9706, 0x9708, 0x9713, 0x970e,
+  0x9711, 0x970f, 0x9716, 0x9719, 0x9724, 0x972a, 0x9730, 0x9739,
+  0x973d, 0x973e, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, 0x975c,
+  0x9760, 0x9764, 0x9766, 0x9768, 0x52d2, 0x976b, 0x9771, 0x9779,
+  0x9785, 0x977c, 0x9781, 0x977a, 0x9786, 0x978b, 0x978f, 0x9790,
+  0x979c, 0x97a8, 0x97a6, 0x97a3, 0x97b3, 0x97b4, 0x97c3, 0x97c6,
+  0x97c8, 0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, 0x97f6,
+  0x97f5, 0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, 0x983d,
+  0x9846, 0x984f, 0x984b, 0x986b, 0x986f, 0x9870,
+  /* 0x71 */
+  0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, 0x98c4,
+  0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, 0x9914,
+  0x9918, 0x9921, 0x991d, 0x991e, 0x9924, 0x9920, 0x992c, 0x992e,
+  0x993d, 0x993e, 0x9942, 0x9949, 0x9945, 0x9950, 0x994b, 0x9951,
+  0x9952, 0x994c, 0x9955, 0x9997, 0x9998, 0x99a5, 0x99ad, 0x99ae,
+  0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, 0x99ee,
+  0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, 0x99e2,
+  0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0x9a3e,
+  0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65, 0x9a64,
+  0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0, 0x9acf,
+  0x9ad1, 0x9ad3, 0x9ad4, 0x9ade, 0x9adf, 0x9ae2, 0x9ae3, 0x9ae6,
+  0x9aef, 0x9aeb, 0x9aee, 0x9af4, 0x9af1, 0x9af7,
+  /* 0x72 */
+  0x9afb, 0x9b06, 0x9b18, 0x9b1a, 0x9b1f, 0x9b22, 0x9b23, 0x9b25,
+  0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2e, 0x9b2f, 0x9b32, 0x9b44,
+  0x9b43, 0x9b4f, 0x9b4d, 0x9b4e, 0x9b51, 0x9b58, 0x9b74, 0x9b93,
+  0x9b83, 0x9b91, 0x9b96, 0x9b97, 0x9b9f, 0x9ba0, 0x9ba8, 0x9bb4,
+  0x9bc0, 0x9bca, 0x9bb9, 0x9bc6, 0x9bcf, 0x9bd1, 0x9bd2, 0x9be3,
+  0x9be2, 0x9be4, 0x9bd4, 0x9be1, 0x9c3a, 0x9bf2, 0x9bf1, 0x9bf0,
+  0x9c15, 0x9c14, 0x9c09, 0x9c13, 0x9c0c, 0x9c06, 0x9c08, 0x9c12,
+  0x9c0a, 0x9c04, 0x9c2e, 0x9c1b, 0x9c25, 0x9c24, 0x9c21, 0x9c30,
+  0x9c47, 0x9c32, 0x9c46, 0x9c3e, 0x9c5a, 0x9c60, 0x9c67, 0x9c76,
+  0x9c78, 0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, 0x9d03,
+  0x9d06, 0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, 0x9d15,
+  0x9d12, 0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48,
+  /* 0x73 */
+  0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, 0x9d89,
+  0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, 0x9db2,
+  0x9dc4, 0x9dc1, 0x9dbb, 0x9db8, 0x9dba, 0x9dc6, 0x9dcf, 0x9dc2,
+  0x9dd9, 0x9dd3, 0x9df8, 0x9de6, 0x9ded, 0x9def, 0x9dfd, 0x9e1a,
+  0x9e1b, 0x9e1e, 0x9e75, 0x9e79, 0x9e7d, 0x9e81, 0x9e88, 0x9e8b,
+  0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, 0x9eb8,
+  0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, 0x9ed4,
+  0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0x9ef4,
+  0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07, 0x9f08,
+  0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52, 0x9f54,
+  0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c, 0x9f6a,
+  0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0,
+  /* 0x74 */
+  0x582f, 0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199,
+};
+
+static int
+jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = (s[0] & 0x7F);
+  if ((c1 >= 0x21 && c1 <= 0x28) || (c1 >= 0x30 && c1 <= 0x74)) {
+    if (n >= 2) {
+      unsigned char c2 = (s[1] & 0x7F);
+      if (c2 >= 0x21 && c2 < 0x7f) {
+        unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
+        unsigned short wc = 0xfffd;
+        if (i < 1410) {
+          if (i < 690)
+            wc = jisx0208_2uni_page21[i];
+        } else {
+          if (i < 7808)
+            wc = jisx0208_2uni_page30[i-1410];
+        }
+        if (wc != 0xfffd) {
+          *pwc = (ucs4_t) wc;
+          return 2;
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+static const unsigned short jisx0208_2charset[6879] = {
+  0x2140, 0x2171, 0x2172, 0x2178, 0x212f, 0x224c, 0x216b, 0x215e,
+  0x212d, 0x2279, 0x215f, 0x2160, 0x2621, 0x2622, 0x2623, 0x2624,
+  0x2625, 0x2626, 0x2627, 0x2628, 0x2629, 0x262a, 0x262b, 0x262c,
+  0x262d, 0x262e, 0x262f, 0x2630, 0x2631, 0x2632, 0x2633, 0x2634,
+  0x2635, 0x2636, 0x2637, 0x2638, 0x2641, 0x2642, 0x2643, 0x2644,
+  0x2645, 0x2646, 0x2647, 0x2648, 0x2649, 0x264a, 0x264b, 0x264c,
+  0x264d, 0x264e, 0x264f, 0x2650, 0x2651, 0x2652, 0x2653, 0x2654,
+  0x2655, 0x2656, 0x2657, 0x2658, 0x2727, 0x2721, 0x2722, 0x2723,
+  0x2724, 0x2725, 0x2726, 0x2728, 0x2729, 0x272a, 0x272b, 0x272c,
+  0x272d, 0x272e, 0x272f, 0x2730, 0x2731, 0x2732, 0x2733, 0x2734,
+  0x2735, 0x2736, 0x2737, 0x2738, 0x2739, 0x273a, 0x273b, 0x273c,
+  0x273d, 0x273e, 0x273f, 0x2740, 0x2741, 0x2751, 0x2752, 0x2753,
+  0x2754, 0x2755, 0x2756, 0x2758, 0x2759, 0x275a, 0x275b, 0x275c,
+  0x275d, 0x275e, 0x275f, 0x2760, 0x2761, 0x2762, 0x2763, 0x2764,
+  0x2765, 0x2766, 0x2767, 0x2768, 0x2769, 0x276a, 0x276b, 0x276c,
+  0x276d, 0x276e, 0x276f, 0x2770, 0x2771, 0x2757, 0x213e, 0x213d,
+  0x2142, 0x2146, 0x2147, 0x2148, 0x2149, 0x2277, 0x2278, 0x2145,
+  0x2144, 0x2273, 0x216c, 0x216d, 0x2228, 0x216e, 0x2272, 0x222b,
+  0x222c, 0x222a, 0x222d, 0x224d, 0x224e, 0x224f, 0x225f, 0x2250,
+  0x2260, 0x223a, 0x223b, 0x215d, 0x2265, 0x2267, 0x2167, 0x225c,
+  0x224a, 0x224b, 0x2241, 0x2240, 0x2269, 0x226a, 0x2168, 0x2268,
+  0x2266, 0x2262, 0x2162, 0x2261, 0x2165, 0x2166, 0x2263, 0x2264,
+  0x223e, 0x223f, 0x223c, 0x223d, 0x225d, 0x225e, 0x2821, 0x282c,
+  0x2822, 0x282d, 0x2823, 0x282e, 0x2824, 0x282f, 0x2826, 0x2831,
+  0x2825, 0x2830, 0x2827, 0x283c, 0x2837, 0x2832, 0x2829, 0x283e,
+  0x2839, 0x2834, 0x2828, 0x2838, 0x283d, 0x2833, 0x282a, 0x283a,
+  0x283f, 0x2835, 0x282b, 0x283b, 0x2840, 0x2836, 0x2223, 0x2222,
+  0x2225, 0x2224, 0x2227, 0x2226, 0x2221, 0x217e, 0x217b, 0x217d,
+  0x217c, 0x227e, 0x217a, 0x2179, 0x216a, 0x2169, 0x2276, 0x2275,
+  0x2274, 0x2121, 0x2122, 0x2123, 0x2137, 0x2139, 0x213a, 0x213b,
+  0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159,
+  0x215a, 0x215b, 0x2229, 0x222e, 0x214c, 0x214d, 0x2141, 0x2421,
+  0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427, 0x2428, 0x2429,
+  0x242a, 0x242b, 0x242c, 0x242d, 0x242e, 0x242f, 0x2430, 0x2431,
+  0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437, 0x2438, 0x2439,
+  0x243a, 0x243b, 0x243c, 0x243d, 0x243e, 0x243f, 0x2440, 0x2441,
+  0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447, 0x2448, 0x2449,
+  0x244a, 0x244b, 0x244c, 0x244d, 0x244e, 0x244f, 0x2450, 0x2451,
+  0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457, 0x2458, 0x2459,
+  0x245a, 0x245b, 0x245c, 0x245d, 0x245e, 0x245f, 0x2460, 0x2461,
+  0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469,
+  0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, 0x2470, 0x2471,
+  0x2472, 0x2473, 0x212b, 0x212c, 0x2135, 0x2136, 0x2521, 0x2522,
+  0x2523, 0x2524, 0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a,
+  0x252b, 0x252c, 0x252d, 0x252e, 0x252f, 0x2530, 0x2531, 0x2532,
+  0x2533, 0x2534, 0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x253a,
+  0x253b, 0x253c, 0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542,
+  0x2543, 0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a,
+  0x254b, 0x254c, 0x254d, 0x254e, 0x254f, 0x2550, 0x2551, 0x2552,
+  0x2553, 0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a,
+  0x255b, 0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x2562,
+  0x2563, 0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a,
+  0x256b, 0x256c, 0x256d, 0x256e, 0x256f, 0x2570, 0x2571, 0x2572,
+  0x2573, 0x2574, 0x2575, 0x2576, 0x2126, 0x213c, 0x2133, 0x2134,
+  0x306c, 0x437a, 0x3c37, 0x4b7c, 0x3e66, 0x3b30, 0x3e65, 0x323c,
+  0x4954, 0x4d3f, 0x5022, 0x312f, 0x336e, 0x5023, 0x4024, 0x5242,
+  0x3556, 0x4a3a, 0x3e67, 0x4e3e, 0x4a42, 0x5024, 0x4366, 0x5025,
+  0x367a, 0x5026, 0x345d, 0x4330, 0x3c67, 0x5027, 0x5028, 0x5029,
+  0x4735, 0x3557, 0x4737, 0x4663, 0x3843, 0x4b33, 0x6949, 0x502a,
+  0x3e68, 0x502b, 0x3235, 0x3665, 0x3870, 0x4c69, 0x5626, 0x4d70,
+  0x467d, 0x3425, 0x3535, 0x502c, 0x502d, 0x4e3b, 0x4d3d, 0x4168,
+  0x502f, 0x3b76, 0x4673, 0x5032, 0x313e, 0x385f, 0x385e, 0x3066,
+  0x4f4b, 0x4f4a, 0x3a33, 0x3021, 0x5033, 0x5034, 0x5035, 0x4b34,
+  0x5036, 0x3872, 0x3067, 0x4b72, 0x357c, 0x357d, 0x357e, 0x4462,
+  0x4e3c, 0x5037, 0x5038, 0x5039, 0x3f4d, 0x3d3a, 0x3f4e, 0x503e,
+  0x503c, 0x503d, 0x3558, 0x3a23, 0x3270, 0x503b, 0x503a, 0x4a29,
+  0x3b46, 0x3b45, 0x423e, 0x503f, 0x4955, 0x4067, 0x2138, 0x5040,
+  0x5042, 0x4265, 0x4e61, 0x304a, 0x5041, 0x323e, 0x3644, 0x4367,
+  0x376f, 0x5043, 0x4724, 0x346b, 0x5044, 0x304b, 0x3860, 0x346c,
+  0x497a, 0x4832, 0x3559, 0x3271, 0x5067, 0x4541, 0x476c, 0x5046,
+  0x483c, 0x4e62, 0x3f2d, 0x3b47, 0x3b77, 0x3240, 0x4451, 0x4322,
+  0x504a, 0x304c, 0x4463, 0x3d3b, 0x3a34, 0x4d24, 0x424e, 0x323f,
+  0x5049, 0x4d3e, 0x5045, 0x5047, 0x3a6e, 0x5048, 0x5524, 0x5050,
+  0x5053, 0x5051, 0x3242, 0x4a3b, 0x504b, 0x504f, 0x3873, 0x3b48,
+  0x3426, 0x5054, 0x504c, 0x4e63, 0x3b78, 0x504d, 0x5052, 0x5055,
+  0x504e, 0x3621, 0x304d, 0x3622, 0x3241, 0x5525, 0x4b79, 0x496e,
+  0x3874, 0x3f2f, 0x4e37, 0x4a58, 0x3738, 0x4225, 0x3264, 0x3d53,
+  0x5059, 0x505e, 0x505c, 0x5057, 0x422f, 0x505a, 0x505d, 0x505b,
+  0x4a5d, 0x5058, 0x3f2e, 0x4b73, 0x505f, 0x5060, 0x3d24, 0x506d,
+  0x4750, 0x4936, 0x5068, 0x4a70, 0x3236, 0x506c, 0x5066, 0x506f,
+  0x4152, 0x3844, 0x475c, 0x6047, 0x506e, 0x455d, 0x5063, 0x3876,
+  0x3875, 0x5061, 0x3c5a, 0x5069, 0x4a6f, 0x434d, 0x5065, 0x3771,
+  0x5062, 0x506a, 0x5064, 0x4e51, 0x506b, 0x4f41, 0x3666, 0x3770,
+  0x5070, 0x5071, 0x5075, 0x304e, 0x4a50, 0x5074, 0x5073, 0x5077,
+  0x5076, 0x4464, 0x3772, 0x5078, 0x3c45, 0x4226, 0x4465, 0x3676,
+  0x5079, 0x3536, 0x507a, 0x507c, 0x4b35, 0x3766, 0x3b31, 0x4877,
+  0x507b, 0x3a45, 0x4d43, 0x507e, 0x5123, 0x507d, 0x3a44, 0x3d7d,
+  0x3739, 0x5124, 0x364f, 0x5121, 0x5122, 0x462f, 0x417c, 0x3623,
+  0x4b4d, 0x5125, 0x4e3d, 0x5126, 0x5129, 0x5127, 0x414e, 0x5128,
+  0x512a, 0x512c, 0x512b, 0x4a48, 0x3537, 0x512e, 0x512f, 0x322f,
+  0x512d, 0x3c74, 0x5132, 0x5131, 0x5130, 0x5056, 0x5133, 0x3d7e,
+  0x5134, 0x4d25, 0x4c59, 0x5136, 0x5135, 0x5138, 0x5137, 0x5139,
+  0x513a, 0x3074, 0x3835, 0x373b, 0x3d3c, 0x437b, 0x3624, 0x4068,
+  0x3877, 0x396e, 0x513c, 0x4c48, 0x4546, 0x3b79, 0x513b, 0x513d,
+  0x455e, 0x3375, 0x513e, 0x467e, 0x4134, 0x5140, 0x5141, 0x482c,
+  0x3878, 0x4f3b, 0x5142, 0x3626, 0x4a3c, 0x4236, 0x3671, 0x4535,
+  0x3773, 0x5143, 0x5144, 0x4662, 0x315f, 0x5147, 0x3a7d, 0x5146,
+  0x3a46, 0x5148, 0x666e, 0x5149, 0x4b41, 0x514a, 0x514b, 0x514c,
+  0x3e69, 0x3c4c, 0x3427, 0x514f, 0x514d, 0x4c3d, 0x514e, 0x495a,
+  0x5150, 0x5151, 0x5152, 0x455f, 0x5156, 0x5154, 0x5155, 0x5153,
+  0x3a63, 0x5157, 0x4c6a, 0x4e64, 0x5158, 0x4028, 0x5159, 0x3d5a,
+  0x515a, 0x437c, 0x4e3f, 0x4560, 0x5245, 0x515b, 0x7425, 0x3645,
+  0x515c, 0x4b5e, 0x3d68, 0x427c, 0x515e, 0x4664, 0x515f, 0x5160,
+  0x332e, 0x5161, 0x3627, 0x464c, 0x317a, 0x3d50, 0x4821, 0x5162,
+  0x4561, 0x3f4f, 0x5163, 0x4a2c, 0x405a, 0x3422, 0x3429, 0x5164,
+  0x5166, 0x373a, 0x5165, 0x4e73, 0x3d69, 0x483d, 0x4a4c, 0x5167,
+  0x4d78, 0x5168, 0x5169, 0x457e, 0x516a, 0x4029, 0x3a7e, 0x3774,
+  0x516b, 0x3b49, 0x396f, 0x4466, 0x516d, 0x4227, 0x3a6f, 0x516e,
+  0x516f, 0x4130, 0x516c, 0x5171, 0x4b36, 0x3964, 0x5170, 0x3775,
+  0x3a5e, 0x476d, 0x5174, 0x5172, 0x497b, 0x3e6a, 0x517b, 0x3364,
+  0x5175, 0x5173, 0x414f, 0x5177, 0x5176, 0x3344, 0x3760, 0x517c,
+  0x4e2d, 0x5178, 0x517d, 0x517a, 0x5179, 0x4e4f, 0x3879, 0x3243,
+  0x4e74, 0x3d75, 0x4558, 0x3965, 0x5222, 0x5223, 0x4e65, 0x4f2b,
+  0x5225, 0x387a, 0x5224, 0x332f, 0x5226, 0x4b56, 0x443c, 0x4d26,
+  0x4a59, 0x5227, 0x7055, 0x4630, 0x5228, 0x342a, 0x4c33, 0x3e21,
+  0x5229, 0x4a67, 0x522d, 0x402a, 0x522a, 0x3650, 0x522b, 0x342b,
+  0x372e, 0x522e, 0x522f, 0x5230, 0x5231, 0x3c5b, 0x387b, 0x4c5e,
+  0x4c68, 0x4677, 0x4a71, 0x5232, 0x5233, 0x5235, 0x5237, 0x5236,
+  0x5238, 0x323d, 0x4b4c, 0x3a7c, 0x5239, 0x4159, 0x3e22, 0x3629,
+  0x523a, 0x485b, 0x523b, 0x523c, 0x523d, 0x523e, 0x4924, 0x3668,
+  0x3065, 0x463f, 0x523f, 0x3d3d, 0x4069, 0x5241, 0x5240, 0x3e23,
+  0x3861, 0x5243, 0x483e, 0x5244, 0x485c, 0x4234, 0x426e, 0x3628,
+  0x466e, 0x4331, 0x476e, 0x4b4e, 0x5246, 0x406a, 0x3735, 0x5247,
+  0x5248, 0x312c, 0x3075, 0x346d, 0x4228, 0x3551, 0x4d71, 0x524b,
+  0x3237, 0x524a, 0x362a, 0x524c, 0x4c71, 0x524d, 0x4e52, 0x387c,
+  0x3836, 0x524e, 0x5250, 0x524f, 0x3f5f, 0x3139, 0x315e, 0x5251,
+  0x5252, 0x3837, 0x5253, 0x356e, 0x3b32, 0x5254, 0x4b74, 0x3a35,
+  0x355a, 0x4d27, 0x4150, 0x483f, 0x3c7d, 0x3d47, 0x3c68, 0x3c75,
+  0x3d76, 0x4840, 0x5257, 0x3143, 0x4151, 0x387d, 0x3845, 0x3667,
+  0x525b, 0x4321, 0x427e, 0x362b, 0x3e24, 0x525c, 0x525a, 0x3244,
+  0x4266, 0x3c38, 0x3b4b, 0x3126, 0x3370, 0x3966, 0x3b4a, 0x525d,
+  0x525e, 0x3549, 0x3346, 0x3967, 0x3548, 0x445f, 0x3125, 0x4631,
+  0x4c3e, 0x3921, 0x4d79, 0x4547, 0x387e, 0x372f, 0x5267, 0x3663,
+  0x4b4a, 0x485d, 0x5266, 0x345e, 0x5261, 0x5262, 0x5264, 0x5265,
+  0x355b, 0x3f61, 0x4a2d, 0x5263, 0x525f, 0x3863, 0x5260, 0x4f24,
+  0x4a72, 0x4468, 0x3862, 0x3970, 0x5268, 0x465d, 0x526c, 0x3c7e,
+  0x3c76, 0x526f, 0x526d, 0x4c23, 0x526a, 0x5273, 0x526e, 0x5271,
+  0x3846, 0x4c3f, 0x5272, 0x5274, 0x5276, 0x3a70, 0x4f42, 0x526b,
+  0x5269, 0x5275, 0x5270, 0x5278, 0x5323, 0x527a, 0x527e, 0x5321,
+  0x527b, 0x533e, 0x3a69, 0x3331, 0x5279, 0x5325, 0x3076, 0x5324,
+  0x3025, 0x494a, 0x5322, 0x527c, 0x5277, 0x527d, 0x3a48, 0x5326,
+  0x3077, 0x532f, 0x5327, 0x5328, 0x3e25, 0x4b69, 0x532d, 0x532c,
+  0x452f, 0x532e, 0x532b, 0x3134, 0x3a36, 0x3f30, 0x5329, 0x4562,
+  0x532a, 0x3022, 0x5334, 0x4d23, 0x3e27, 0x533a, 0x5339, 0x5330,
+  0x4243, 0x5331, 0x426f, 0x5336, 0x3e26, 0x5333, 0x4c64, 0x373c,
+  0x5337, 0x5338, 0x5335, 0x533b, 0x5332, 0x5341, 0x5346, 0x5342,
+  0x533d, 0x5347, 0x4131, 0x5349, 0x3922, 0x533f, 0x437d, 0x5343,
+  0x533c, 0x342d, 0x346e, 0x3365, 0x5344, 0x5340, 0x3776, 0x534a,
+  0x5348, 0x4153, 0x354a, 0x362c, 0x5345, 0x3674, 0x3144, 0x534e,
+  0x534c, 0x5427, 0x5351, 0x534b, 0x534f, 0x534d, 0x3b4c, 0x5350,
+  0x5353, 0x5358, 0x5356, 0x5355, 0x4332, 0x3245, 0x5352, 0x5354,
+  0x3e28, 0x3133, 0x5357, 0x325e, 0x5362, 0x3e7c, 0x535e, 0x535c,
+  0x535d, 0x535f, 0x313d, 0x4139, 0x5359, 0x535a, 0x337a, 0x5361,
+  0x346f, 0x5364, 0x5360, 0x5363, 0x4a2e, 0x4655, 0x4838, 0x5366,
+  0x5365, 0x3345, 0x5367, 0x536a, 0x5369, 0x5368, 0x4739, 0x536b,
+  0x536c, 0x536e, 0x536d, 0x5370, 0x5373, 0x5371, 0x536f, 0x5372,
+  0x5374, 0x5375, 0x5376, 0x5377, 0x5378, 0x5145, 0x3c7c, 0x3b4d,
+  0x3273, 0x3078, 0x4344, 0x5379, 0x3a24, 0x304f, 0x3f5e, 0x537a,
+  0x3847, 0x3971, 0x537c, 0x537b, 0x4a60, 0x537d, 0x5421, 0x537e,
+  0x5422, 0x5423, 0x3777, 0x3160, 0x5424, 0x5426, 0x5425, 0x5428,
+  0x455a, 0x5429, 0x3035, 0x3a5f, 0x373d, 0x434f, 0x542a, 0x542b,
+  0x542d, 0x542e, 0x3a64, 0x3651, 0x4b37, 0x542c, 0x542f, 0x3a41,
+  0x3923, 0x5433, 0x3a25, 0x4333, 0x5430, 0x445a, 0x5434, 0x3f62,
+  0x5432, 0x5435, 0x373f, 0x5436, 0x5437, 0x3924, 0x3340, 0x5439,
+  0x543a, 0x543b, 0x5438, 0x5431, 0x543c, 0x543d, 0x4b64, 0x3e6b,
+  0x543f, 0x5440, 0x543e, 0x5442, 0x4738, 0x3068, 0x4956, 0x5443,
+  0x3e7d, 0x3c39, 0x475d, 0x3470, 0x3a6b, 0x4b59, 0x4632, 0x3778,
+  0x424f, 0x5441, 0x5444, 0x4244, 0x5445, 0x5446, 0x5448, 0x4469,
+  0x342e, 0x7421, 0x3161, 0x4a73, 0x3e6c, 0x4548, 0x3a66, 0x544e,
+  0x4a3d, 0x4e5d, 0x3274, 0x544a, 0x413a, 0x544d, 0x4563, 0x4549,
+  0x4564, 0x4839, 0x444d, 0x3a49, 0x5449, 0x3176, 0x4536, 0x544b,
+  0x5447, 0x3f50, 0x544f, 0x3d4e, 0x362d, 0x5450, 0x4a68, 0x417d,
+  0x4446, 0x5452, 0x4b4f, 0x5453, 0x5458, 0x4a2f, 0x5457, 0x5451,
+  0x5454, 0x5456, 0x3a26, 0x4a49, 0x5459, 0x4345, 0x3275, 0x3e6d,
+  0x545b, 0x545a, 0x3968, 0x545c, 0x545e, 0x545d, 0x5460, 0x5455,
+  0x5462, 0x5461, 0x545f, 0x3b4e, 0x3f51, 0x4154, 0x5463, 0x403c,
+  0x306d, 0x4764, 0x445b, 0x5465, 0x5464, 0x5466, 0x5467, 0x5468,
+  0x5469, 0x4a51, 0x546a, 0x3246, 0x546b, 0x4d3c, 0x3330, 0x5249,
+  0x3d48, 0x423f, 0x546c, 0x4c6b, 0x4c34, 0x546e, 0x4267, 0x4537,
+  0x4240, 0x4957, 0x546f, 0x5470, 0x317b, 0x3c3a, 0x5471, 0x3050,
+  0x5472, 0x5473, 0x3162, 0x3471, 0x4660, 0x4a74, 0x5477, 0x4155,
+  0x5476, 0x3740, 0x4b5b, 0x5475, 0x4565, 0x5479, 0x5478, 0x547b,
+  0x547a, 0x317c, 0x547c, 0x3e29, 0x547e, 0x4325, 0x547d, 0x4a33,
+  0x3d77, 0x455b, 0x5521, 0x3925, 0x5522, 0x4721, 0x485e, 0x4c51,
+  0x4725, 0x552b, 0x3538, 0x4d45, 0x4c2f, 0x562c, 0x5523, 0x5526,
+  0x4245, 0x4b38, 0x454a, 0x5527, 0x4b65, 0x3a4a, 0x3e2a, 0x5528,
+  0x3b50, 0x3b4f, 0x3039, 0x3848, 0x402b, 0x3051, 0x552c, 0x552d,
+  0x552a, 0x3138, 0x342f, 0x5529, 0x4c45, 0x4931, 0x3028, 0x3079,
+  0x3b51, 0x3052, 0x3023, 0x5532, 0x5530, 0x4c3c, 0x5533, 0x5531,
+  0x552f, 0x3f31, 0x552e, 0x4a5a, 0x3864, 0x5537, 0x5538, 0x3e2b,
+  0x5534, 0x4f2c, 0x474c, 0x5536, 0x3a27, 0x5539, 0x4958, 0x553a,
+  0x5535, 0x4c3b, 0x475e, 0x553b, 0x4932, 0x553c, 0x5540, 0x553d,
+  0x3247, 0x553f, 0x3c3b, 0x553e, 0x3779, 0x554c, 0x5545, 0x5542,
+  0x4364, 0x5541, 0x5543, 0x5544, 0x5546, 0x5547, 0x3472, 0x5549,
+  0x5548, 0x554a, 0x3e6e, 0x554d, 0x445c, 0x3145, 0x554b, 0x554e,
+  0x554f, 0x5552, 0x5550, 0x5551, 0x3b52, 0x5553, 0x3926, 0x5554,
+  0x3b7a, 0x4238, 0x5555, 0x5556, 0x3b5a, 0x3927, 0x4c52, 0x3528,
+  0x3849, 0x5557, 0x3358, 0x5558, 0x4239, 0x5559, 0x5623, 0x555a,
+  0x555b, 0x555c, 0x555e, 0x555f, 0x5560, 0x4270, 0x3127, 0x3c69,
+  0x3042, 0x4157, 0x3430, 0x3c35, 0x3928, 0x4566, 0x3d21, 0x3431,
+  0x4368, 0x446a, 0x3038, 0x3539, 0x4a75, 0x3c42, 0x3552, 0x406b,
+  0x3c3c, 0x4d28, 0x5561, 0x355c, 0x3a4b, 0x3332, 0x3163, 0x3e2c,
+  0x3248, 0x5562, 0x4d46, 0x3d49, 0x3c64, 0x5563, 0x3473, 0x4652,
+  0x4c29, 0x5564, 0x5565, 0x4959, 0x5567, 0x3428, 0x3677, 0x5566,
+  0x3432, 0x3f32, 0x556b, 0x3b21, 0x3249, 0x556a, 0x5568, 0x556c,
+  0x5569, 0x472b, 0x5c4d, 0x3f33, 0x556d, 0x4e40, 0x556e, 0x5570,
+  0x437e, 0x556f, 0x4023, 0x3b7b, 0x4250, 0x3c77, 0x4975, 0x406c,
+  0x3c4d, 0x5571, 0x3e2d, 0x5572, 0x5573, 0x3053, 0x423a, 0x3f52,
+  0x5574, 0x4633, 0x3e2e, 0x3e2f, 0x5575, 0x406d, 0x3e30, 0x5576,
+  0x5577, 0x4c60, 0x5578, 0x3646, 0x3d22, 0x5579, 0x557a, 0x3c5c,
+  0x3f2c, 0x4674, 0x3f54, 0x4878, 0x4722, 0x3649, 0x557b, 0x356f,
+  0x557c, 0x367e, 0x464f, 0x3230, 0x3b53, 0x557d, 0x5622, 0x5621,
+  0x367d, 0x557e, 0x4538, 0x4230, 0x454b, 0x3c48, 0x4158, 0x4d7a,
+  0x5624, 0x5625, 0x4656, 0x3b33, 0x5627, 0x5628, 0x5629, 0x3474,
+  0x562a, 0x562b, 0x322c, 0x413b, 0x3464, 0x562d, 0x4c28, 0x4252,
+  0x3359, 0x562f, 0x5631, 0x345f, 0x562e, 0x5630, 0x5633, 0x5632,
+  0x5634, 0x5635, 0x463d, 0x362e, 0x3265, 0x5636, 0x563b, 0x5639,
+  0x4a77, 0x4a76, 0x4567, 0x5638, 0x3d54, 0x5637, 0x3f72, 0x563c,
+  0x3a6a, 0x5642, 0x5643, 0x563d, 0x3333, 0x563e, 0x5647, 0x5646,
+  0x5645, 0x5641, 0x5640, 0x5644, 0x4a78, 0x564b, 0x5648, 0x564a,
+  0x4d72, 0x5649, 0x563f, 0x3f73, 0x564c, 0x3a37, 0x564d, 0x564e,
+  0x5651, 0x5650, 0x564f, 0x4568, 0x563a, 0x5657, 0x5653, 0x5652,
+  0x5654, 0x5655, 0x5658, 0x4e66, 0x5659, 0x5656, 0x565a, 0x3460,
+  0x565b, 0x565d, 0x565c, 0x565e, 0x565f, 0x406e, 0x3d23, 0x3d64,
+  0x4163, 0x3929, 0x3a38, 0x392a, 0x3570, 0x5660, 0x3a39, 0x384a,
+  0x5661, 0x4c26, 0x4743, 0x5662, 0x392b, 0x342c, 0x4327, 0x3652,
+  0x3b54, 0x495b, 0x4841, 0x5663, 0x3475, 0x5666, 0x4421, 0x5665,
+  0x5664, 0x5667, 0x446b, 0x3f63, 0x3b55, 0x404a, 0x4253, 0x3522,
+  0x4422, 0x5668, 0x5669, 0x3e6f, 0x4b39, 0x566c, 0x566b, 0x566a,
+  0x497d, 0x5673, 0x4b5a, 0x566d, 0x566f, 0x4b6b, 0x566e, 0x5670,
+  0x4828, 0x5671, 0x4a3e, 0x5672, 0x3433, 0x4a3f, 0x472f, 0x5674,
+  0x5675, 0x392c, 0x3434, 0x5676, 0x3838, 0x4d44, 0x4d29, 0x3476,
+  0x5678, 0x4423, 0x392d, 0x3e31, 0x485f, 0x3e32, 0x3d78, 0x446c,
+  0x4a79, 0x4539, 0x392e, 0x495c, 0x5679, 0x4559, 0x3a42, 0x384b,
+  0x446d, 0x3043, 0x3d6e, 0x392f, 0x4d47, 0x567a, 0x567b, 0x4751,
+  0x567c, 0x4e77, 0x4f2d, 0x567e, 0x567d, 0x3347, 0x5721, 0x5724,
+  0x5725, 0x5723, 0x4940, 0x3e33, 0x5727, 0x5726, 0x5722, 0x5728,
+  0x5729, 0x572a, 0x572d, 0x572b, 0x572c, 0x572e, 0x3164, 0x446e,
+  0x572f, 0x377a, 0x3276, 0x4736, 0x5730, 0x467b, 0x4a5b, 0x5731,
+  0x4f2e, 0x5732, 0x4a40, 0x5735, 0x5021, 0x5031, 0x3c30, 0x4675,
+  0x5736, 0x355d, 0x4424, 0x307a, 0x5737, 0x4a26, 0x3930, 0x4350,
+  0x446f, 0x4c6f, 0x3839, 0x384c, 0x5738, 0x5739, 0x573f, 0x3c65,
+  0x4425, 0x362f, 0x573a, 0x492b, 0x4346, 0x573b, 0x573c, 0x3630,
+  0x573d, 0x573e, 0x5740, 0x4576, 0x5741, 0x5742, 0x5743, 0x5734,
+  0x5733, 0x5744, 0x3741, 0x4927, 0x3a4c, 0x4937, 0x4426, 0x494b,
+  0x5745, 0x3e34, 0x3146, 0x5746, 0x5747, 0x4c72, 0x4860, 0x574a,
+  0x317d, 0x402c, 0x5749, 0x5748, 0x3742, 0x4254, 0x574e, 0x574c,
+  0x574b, 0x4e27, 0x3865, 0x3d79, 0x574d, 0x454c, 0x3d3e, 0x4640,
+  0x5751, 0x5750, 0x574f, 0x5752, 0x3866, 0x5753, 0x497c, 0x3d5b,
+  0x5754, 0x4879, 0x4641, 0x4427, 0x4530, 0x5755, 0x352b, 0x3f34,
+  0x492c, 0x3477, 0x4726, 0x5756, 0x3b56, 0x4b3a, 0x4b3b, 0x317e,
+  0x575b, 0x4369, 0x5758, 0x3277, 0x582d, 0x575a, 0x4730, 0x5759,
+  0x5757, 0x397a, 0x575d, 0x5763, 0x5769, 0x5761, 0x455c, 0x5766,
+  0x495d, 0x5760, 0x5765, 0x4e67, 0x3b57, 0x4255, 0x575e, 0x355e,
+  0x5768, 0x402d, 0x3165, 0x5762, 0x3278, 0x5767, 0x3631, 0x5764,
+  0x576a, 0x576c, 0x5776, 0x5774, 0x5771, 0x5770, 0x4e78, 0x5772,
+  0x3632, 0x3931, 0x3d7a, 0x5779, 0x576b, 0x576f, 0x575f, 0x327a,
+  0x5773, 0x5775, 0x4351, 0x3a28, 0x3238, 0x576d, 0x5778, 0x5777,
+  0x3633, 0x4229, 0x3366, 0x3743, 0x576e, 0x577a, 0x577d, 0x5821,
+  0x3c3d, 0x5827, 0x4470, 0x577b, 0x5825, 0x3279, 0x5823, 0x5824,
+  0x577e, 0x5822, 0x3867, 0x4d2a, 0x3435, 0x3159, 0x5826, 0x473a,
+  0x302d, 0x4861, 0x575c, 0x582c, 0x5830, 0x4c65, 0x5829, 0x4569,
+  0x582e, 0x3e70, 0x582f, 0x4657, 0x4f47, 0x582b, 0x5831, 0x397b,
+  0x404b, 0x3054, 0x582a, 0x5828, 0x415a, 0x577c, 0x3b34, 0x4246,
+  0x583d, 0x415b, 0x5838, 0x5835, 0x5836, 0x3c66, 0x5839, 0x583c,
+  0x5837, 0x3d25, 0x583a, 0x5834, 0x4c7c, 0x4c7b, 0x583e, 0x583f,
+  0x3055, 0x5833, 0x3672, 0x3026, 0x3436, 0x583b, 0x5843, 0x5842,
+  0x5847, 0x5848, 0x5846, 0x5849, 0x5841, 0x5845, 0x584a, 0x584b,
+  0x5840, 0x3b7c, 0x5844, 0x4256, 0x3932, 0x5832, 0x3f35, 0x5858,
+  0x4a69, 0x584e, 0x584f, 0x5850, 0x5857, 0x5856, 0x4b7d, 0x3437,
+  0x5854, 0x3745, 0x3334, 0x5851, 0x4e38, 0x5853, 0x3056, 0x5855,
+  0x584c, 0x5852, 0x5859, 0x3744, 0x584d, 0x4d5d, 0x4d2b, 0x585c,
+  0x5860, 0x417e, 0x4e79, 0x5861, 0x585e, 0x585b, 0x585a, 0x585f,
+  0x4a30, 0x4634, 0x3746, 0x5862, 0x585d, 0x5863, 0x377b, 0x3231,
+  0x586b, 0x3438, 0x5869, 0x586a, 0x3a29, 0x5868, 0x5866, 0x5865,
+  0x586c, 0x5864, 0x586e, 0x327b, 0x5870, 0x586f, 0x4428, 0x5873,
+  0x5871, 0x5867, 0x377c, 0x5872, 0x5876, 0x5875, 0x5877, 0x5874,
+  0x5878, 0x5879, 0x587a, 0x4a6a, 0x587c, 0x587b, 0x3d3f, 0x402e,
+  0x3266, 0x327c, 0x587d, 0x303f, 0x404c, 0x587e, 0x6c43, 0x5921,
+  0x3761, 0x5922, 0x406f, 0x5923, 0x5924, 0x353a, 0x5925, 0x5926,
+  0x5927, 0x4257, 0x384d, 0x4c61, 0x4b3c, 0x3d6a, 0x5928, 0x4070,
+  0x6e3d, 0x4862, 0x3c6a, 0x3a4d, 0x5929, 0x4247, 0x4a27, 0x4271,
+  0x592c, 0x592a, 0x592d, 0x592b, 0x592e, 0x4a31, 0x3037, 0x495e,
+  0x4863, 0x592f, 0x5932, 0x3e35, 0x353b, 0x5930, 0x5937, 0x3e36,
+  0x5931, 0x4744, 0x4d5e, 0x5933, 0x5934, 0x5938, 0x456a, 0x5935,
+  0x3933, 0x405e, 0x5946, 0x4834, 0x4272, 0x4864, 0x5a2d, 0x4a7a,
+  0x4471, 0x4b75, 0x593b, 0x3221, 0x436a, 0x5944, 0x4334, 0x593e,
+  0x5945, 0x5940, 0x5947, 0x5943, 0x5942, 0x476f, 0x593c, 0x327d,
+  0x593a, 0x3571, 0x4273, 0x5936, 0x5939, 0x3934, 0x405b, 0x3e37,
+  0x5941, 0x4752, 0x3572, 0x3348, 0x3367, 0x3f21, 0x5949, 0x594e,
+  0x594a, 0x377d, 0x594f, 0x3b22, 0x3969, 0x3d26, 0x593d, 0x3b7d,
+  0x594c, 0x3b58, 0x594d, 0x3044, 0x5948, 0x4429, 0x3573, 0x3634,
+  0x594b, 0x3027, 0x3a43, 0x3f36, 0x4472, 0x4854, 0x5951, 0x415e,
+  0x422a, 0x3b2b, 0x5952, 0x5954, 0x5950, 0x4a61, 0x443d, 0x415c,
+  0x4a7b, 0x3c4e, 0x5960, 0x595f, 0x3f78, 0x377e, 0x5959, 0x3e39,
+  0x4668, 0x4731, 0x5957, 0x415d, 0x3c78, 0x595c, 0x3e38, 0x5956,
+  0x595b, 0x4753, 0x5955, 0x3721, 0x335d, 0x595d, 0x4e2b, 0x3a4e,
+  0x4335, 0x595a, 0x405c, 0x3935, 0x3f64, 0x3166, 0x413c, 0x5958,
+  0x3545, 0x3747, 0x444f, 0x595e, 0x415f, 0x5961, 0x5963, 0x4237,
+  0x5969, 0x5964, 0x5966, 0x4941, 0x4473, 0x5967, 0x4d2c, 0x4d48,
+  0x3439, 0x302e, 0x5965, 0x5962, 0x3478, 0x3167, 0x5968, 0x4d49,
+  0x596c, 0x423b, 0x5973, 0x596d, 0x596a, 0x5971, 0x5953, 0x596e,
+  0x5972, 0x4842, 0x456b, 0x596b, 0x596f, 0x3748, 0x3a71, 0x405d,
+  0x5977, 0x4526, 0x5974, 0x4b60, 0x5975, 0x5976, 0x4c4e, 0x4022,
+  0x3762, 0x597d, 0x3b35, 0x597a, 0x5979, 0x4732, 0x4635, 0x4531,
+  0x597b, 0x597c, 0x496f, 0x4745, 0x3b23, 0x4071, 0x4b50, 0x3349,
+  0x5a25, 0x597e, 0x4d4a, 0x5a27, 0x5a23, 0x5a24, 0x4160, 0x5a22,
+  0x593f, 0x5a26, 0x5a21, 0x5a2b, 0x5a2c, 0x4527, 0x5a2e, 0x3b24,
+  0x5a29, 0x353c, 0x5a2f, 0x5a28, 0x5a33, 0x5a32, 0x5a31, 0x5a34,
+  0x5a36, 0x3e71, 0x5a35, 0x5a39, 0x5a37, 0x5a38, 0x5970, 0x5a3b,
+  0x5a3a, 0x5978, 0x5a3c, 0x5a30, 0x3b59, 0x5a3d, 0x5a3e, 0x5a40,
+  0x5a3f, 0x5a41, 0x327e, 0x3936, 0x4a7c, 0x402f, 0x384e, 0x5a43,
+  0x5a46, 0x4952, 0x355f, 0x5a45, 0x5a44, 0x4754, 0x5a47, 0x3635,
+  0x5a49, 0x5a48, 0x343a, 0x3b36, 0x4658, 0x3749, 0x3f74, 0x5a4a,
+  0x4030, 0x4528, 0x495f, 0x5a4b, 0x5a4c, 0x5a4d, 0x4a38, 0x555d,
+  0x4046, 0x494c, 0x3a58, 0x4865, 0x4843, 0x454d, 0x4e41, 0x5a4f,
+  0x3c50, 0x5a50, 0x3036, 0x3654, 0x404d, 0x4960, 0x5a51, 0x3b42,
+  0x4347, 0x3b5b, 0x3f37, 0x5a52, 0x4a7d, 0x3177, 0x3b5c, 0x5a55,
+  0x5a53, 0x5a56, 0x4e39, 0x5a54, 0x407b, 0x5a57, 0x4232, 0x5a58,
+  0x347a, 0x5a5a, 0x5a59, 0x5a5b, 0x5a5c, 0x347b, 0x467c, 0x4336,
+  0x356c, 0x3b5d, 0x4161, 0x3d5c, 0x3030, 0x5a5d, 0x3222, 0x5a61,
+  0x3937, 0x5a60, 0x3a2b, 0x3e3a, 0x5a5f, 0x3e3b, 0x4c40, 0x3a2a,
+  0x3057, 0x404e, 0x5a66, 0x4031, 0x3147, 0x3d55, 0x4b66, 0x3a72,
+  0x3e3c, 0x4027, 0x5a65, 0x5a63, 0x5a64, 0x436b, 0x5b26, 0x5a6a,
+  0x3b7e, 0x3938, 0x5a68, 0x5a69, 0x3f38, 0x5a67, 0x3b2f, 0x5a6c,
+  0x5a6b, 0x5a70, 0x5a71, 0x5a6d, 0x3322, 0x5a6e, 0x5a6f, 0x4855,
+  0x4961, 0x374a, 0x5a72, 0x4032, 0x3e3d, 0x4352, 0x3647, 0x5a73,
+  0x5a77, 0x324b, 0x5a74, 0x5a76, 0x5a75, 0x3d6b, 0x4348, 0x3045,
+  0x5a78, 0x5a79, 0x442a, 0x4e71, 0x3b43, 0x4a6b, 0x4b3d, 0x5b22,
+  0x5a7b, 0x5a7e, 0x5a7d, 0x5a7a, 0x5b21, 0x465e, 0x5a7c, 0x5b23,
+  0x3d6c, 0x5b24, 0x4d4b, 0x4778, 0x5b25, 0x5b27, 0x5b28, 0x5b29,
+  0x364a, 0x3148, 0x3939, 0x5b2a, 0x5b2b, 0x3d71, 0x4162, 0x5258,
+  0x413e, 0x413d, 0x4258, 0x3a47, 0x5072, 0x376e, 0x4d2d, 0x4a7e,
+  0x497e, 0x5b2c, 0x3a73, 0x443f, 0x5b2d, 0x4f2f, 0x4b3e, 0x442b,
+  0x5b2e, 0x347c, 0x5b2f, 0x5b30, 0x4c5a, 0x4c24, 0x4b76, 0x4b5c,
+  0x3b25, 0x5b32, 0x3c6b, 0x4b51, 0x5b34, 0x5b37, 0x5b36, 0x3479,
+  0x3560, 0x5b33, 0x5b35, 0x5b38, 0x3f79, 0x4d7b, 0x3049, 0x3a60,
+  0x423c, 0x3c5d, 0x3e73, 0x5b3b, 0x454e, 0x5b39, 0x422b, 0x5b3a,
+  0x3e72, 0x4c5d, 0x5b3c, 0x5b3d, 0x4d68, 0x5b42, 0x393a, 0x4755,
+  0x5b3f, 0x456c, 0x5a5e, 0x5a62, 0x354f, 0x4747, 0x5b41, 0x3e3e,
+  0x4844, 0x5b47, 0x487a, 0x5b3e, 0x5b44, 0x5b43, 0x404f, 0x4b6d,
+  0x4e53, 0x4b67, 0x324c, 0x3b5e, 0x4f48, 0x5b46, 0x3f75, 0x5b45,
+  0x5b40, 0x384f, 0x5b4c, 0x5b4a, 0x324d, 0x5b48, 0x5b4e, 0x5b54,
+  0x4248, 0x4a41, 0x5b56, 0x4922, 0x5b55, 0x4770, 0x4b3f, 0x343b,
+  0x4077, 0x3d40, 0x4453, 0x4d2e, 0x5b51, 0x5b50, 0x5b52, 0x5b4f,
+  0x5b57, 0x5b4d, 0x5b4b, 0x5b53, 0x5b49, 0x436c, 0x4c78, 0x3c46,
+  0x3a74, 0x3a3a, 0x4b6f, 0x3341, 0x444e, 0x464a, 0x3149, 0x4072,
+  0x4034, 0x372a, 0x5b59, 0x393b, 0x337c, 0x5b5b, 0x3374, 0x5b61,
+  0x5b5e, 0x4073, 0x334b, 0x3a2c, 0x334a, 0x3a4f, 0x5b5c, 0x3765,
+  0x374b, 0x456d, 0x5b5a, 0x3046, 0x5b5d, 0x5b5f, 0x364d, 0x372c,
+  0x343c, 0x354b, 0x5b62, 0x3a79, 0x4b71, 0x3b37, 0x5b63, 0x4930,
+  0x5b6f, 0x3233, 0x5b64, 0x5b75, 0x5b65, 0x4e42, 0x5b6c, 0x475f,
+  0x5b74, 0x5b67, 0x3034, 0x5b69, 0x393c, 0x5b6b, 0x5b6a, 0x5b66,
+  0x5b71, 0x3e3f, 0x546d, 0x3868, 0x4d7c, 0x5b68, 0x4474, 0x3323,
+  0x3a2d, 0x5b60, 0x5b70, 0x3361, 0x5b6e, 0x5b72, 0x456e, 0x347e,
+  0x5c32, 0x4c49, 0x5b77, 0x347d, 0x5b7e, 0x4b40, 0x5c21, 0x5c23,
+  0x5c27, 0x5b79, 0x432a, 0x456f, 0x5c2b, 0x5b7c, 0x5c28, 0x5c22,
+  0x3f39, 0x5c2c, 0x4033, 0x5c2a, 0x343d, 0x4f50, 0x5b76, 0x5c26,
+  0x3058, 0x5b78, 0x4c3a, 0x5b7d, 0x3f22, 0x4447, 0x5b73, 0x5c25,
+  0x3f7a, 0x5c2f, 0x3371, 0x3821, 0x5c31, 0x5b7a, 0x5c30, 0x5c29,
+  0x5b7b, 0x5c2d, 0x5c2e, 0x5c3f, 0x464e, 0x5c24, 0x5c3b, 0x5c3d,
+  0x4458, 0x4d4c, 0x4976, 0x5c38, 0x424a, 0x5c3e, 0x413f, 0x5c35,
+  0x5c42, 0x5c41, 0x466f, 0x5c40, 0x466a, 0x5c44, 0x5c37, 0x3648,
+  0x5c3a, 0x3d5d, 0x4760, 0x5c3c, 0x364b, 0x5c34, 0x5c36, 0x5c33,
+  0x4f30, 0x335a, 0x5c39, 0x5c43, 0x3335, 0x3a67, 0x315d, 0x5c54,
+  0x4f31, 0x5c57, 0x3f3a, 0x5c56, 0x5c55, 0x5c52, 0x5c46, 0x5c63,
+  0x5c45, 0x5c58, 0x5c50, 0x5c4b, 0x5c48, 0x5c49, 0x5c51, 0x7422,
+  0x5c4e, 0x393d, 0x4448, 0x4164, 0x5c4c, 0x5c47, 0x5c4a, 0x4d4d,
+  0x4b6a, 0x5c4f, 0x5c59, 0x5c61, 0x5c5a, 0x5c67, 0x5c65, 0x5c60,
+  0x5c5f, 0x4450, 0x4165, 0x5c5d, 0x5c5b, 0x5c62, 0x5c68, 0x4875,
+  0x5c6e, 0x5c69, 0x5c6c, 0x5c66, 0x4374, 0x4938, 0x5c5c, 0x5c64,
+  0x3e40, 0x4c4f, 0x5c78, 0x5c6b, 0x3822, 0x3223, 0x335f, 0x5c53,
+  0x3e41, 0x5c70, 0x5c77, 0x3c79, 0x3372, 0x432e, 0x5c6d, 0x5c72,
+  0x5c76, 0x3636, 0x354c, 0x5c74, 0x3521, 0x464b, 0x5c73, 0x5c75,
+  0x5c6f, 0x5c71, 0x3360, 0x4349, 0x5c7c, 0x5c7a, 0x3869, 0x5c79,
+  0x5d21, 0x5b58, 0x5c7b, 0x5c7d, 0x5c7e, 0x5d2c, 0x5d28, 0x5b6d,
+  0x5d27, 0x5d26, 0x5d23, 0x5c6a, 0x5d25, 0x5d24, 0x5d2a, 0x4f26,
+  0x5d2d, 0x367b, 0x5d29, 0x5d2b, 0x4827, 0x5d2e, 0x5d32, 0x5d2f,
+  0x4d73, 0x5d30, 0x5c5e, 0x5d33, 0x5d34, 0x3135, 0x5d36, 0x3767,
+  0x3c21, 0x3655, 0x3224, 0x4d5f, 0x5d38, 0x5d37, 0x5d3a, 0x353d,
+  0x3656, 0x343e, 0x5d3d, 0x5d3c, 0x5d3e, 0x324e, 0x4337, 0x5d3f,
+  0x343f, 0x5d41, 0x5d40, 0x5d42, 0x5d43, 0x5d44, 0x3b5f, 0x4035,
+  0x3a21, 0x4970, 0x4a62, 0x4f44, 0x3b75, 0x3a50, 0x4e72, 0x5d45,
+  0x5d46, 0x3b60, 0x5d47, 0x5d48, 0x5d4a, 0x5d49, 0x4b58, 0x3d5e,
+  0x3c6c, 0x3b44, 0x5d4b, 0x5d4d, 0x3f23, 0x5d4c, 0x5d4e, 0x5d4f,
+  0x5d50, 0x5d51, 0x5d52, 0x5d54, 0x5d53, 0x5d55, 0x3225, 0x434a,
+  0x5d56, 0x3b26, 0x334c, 0x5d57, 0x4542, 0x544c, 0x3523, 0x5d58,
+  0x5d59, 0x4a6c, 0x4b68, 0x4647, 0x5d5a, 0x4866, 0x487b, 0x4c53,
+  0x5d5b, 0x5d5d, 0x5d5c, 0x5d5f, 0x5d5e, 0x5d61, 0x3b61, 0x4c31,
+  0x5d62, 0x5d63, 0x3524, 0x5d64, 0x5d66, 0x5d65, 0x3f65, 0x4939,
+  0x314a, 0x4845, 0x4475, 0x3d41, 0x3561, 0x4846, 0x3c2e, 0x5d68,
+  0x3440, 0x3178, 0x4672, 0x5d67, 0x393e, 0x4353, 0x5d69, 0x5d71,
+  0x5d6a, 0x4241, 0x3562, 0x5d72, 0x3768, 0x3525, 0x5d70, 0x5d6e,
+  0x5d6b, 0x4d60, 0x4440, 0x4659, 0x5d6c, 0x5d74, 0x5d73, 0x3723,
+  0x322d, 0x3a3b, 0x5d6d, 0x5d6f, 0x4b57, 0x4274, 0x4b77, 0x5d7c,
+  0x5d7d, 0x324f, 0x4a28, 0x4c7d, 0x5e21, 0x3c23, 0x3e42, 0x5d78,
+  0x5d7e, 0x3168, 0x3637, 0x5d75, 0x5d7a, 0x4074, 0x4771, 0x4867,
+  0x5d77, 0x4b21, 0x5d79, 0x5e24, 0x5e22, 0x5d7b, 0x4b22, 0x4748,
+  0x3563, 0x4525, 0x436d, 0x5e25, 0x5e23, 0x4259, 0x5d76, 0x314b,
+  0x4d4e, 0x5e30, 0x5e2f, 0x4076, 0x5e2c, 0x4d6c, 0x4636, 0x5e26,
+  0x4445, 0x314c, 0x393f, 0x5e29, 0x3d27, 0x5e2e, 0x5e2d, 0x5e28,
+  0x5e2b, 0x3368, 0x5e2a, 0x4749, 0x4e2e, 0x3e74, 0x4075, 0x5e36,
+  0x5e34, 0x494d, 0x5e31, 0x5e33, 0x313a, 0x3940, 0x4f32, 0x333d,
+  0x4962, 0x4d61, 0x3324, 0x3f3b, 0x5e35, 0x5e3a, 0x3e43, 0x4d30,
+  0x5e37, 0x5e32, 0x5e38, 0x4e5e, 0x4573, 0x4642, 0x3336, 0x3155,
+  0x5e3e, 0x5e41, 0x4e43, 0x4d64, 0x5e48, 0x5e42, 0x5e3f, 0x4e54,
+  0x5e45, 0x3d4a, 0x5e47, 0x5e4c, 0x4571, 0x5e4a, 0x5e44, 0x4338,
+  0x5e4b, 0x5e40, 0x5e46, 0x5e4d, 0x307c, 0x5e43, 0x5e4e, 0x3f3c,
+  0x3d5f, 0x4a25, 0x3a2e, 0x5e3b, 0x5e49, 0x453a, 0x4036, 0x3369,
+  0x3a51, 0x3e44, 0x5e3d, 0x3d42, 0x374c, 0x5e3c, 0x5e52, 0x3d6d,
+  0x383a, 0x5e61, 0x5e5b, 0x3574, 0x454f, 0x5e56, 0x5e5f, 0x302f,
+  0x3132, 0x3239, 0x5e58, 0x422c, 0x5e4f, 0x5e51, 0x3941, 0x5e62,
+  0x5e5d, 0x5e55, 0x5e5c, 0x4c2b, 0x5e5a, 0x5e5e, 0x3850, 0x3e45,
+  0x4339, 0x5e54, 0x4d2f, 0x5e57, 0x5e50, 0x4572, 0x5e53, 0x5e59,
+  0x4f51, 0x3c3e, 0x4b7e, 0x5e63, 0x482e, 0x5e6f, 0x383b, 0x3d60,
+  0x5e65, 0x4e2f, 0x3942, 0x5e72, 0x306e, 0x5e70, 0x5e64, 0x5e6a,
+  0x5e6c, 0x4d4f, 0x5e67, 0x452e, 0x5e69, 0x5e71, 0x5e6b, 0x4c47,
+  0x5e66, 0x3c22, 0x5e7e, 0x336a, 0x5e68, 0x5e6d, 0x5e6e, 0x426c,
+  0x425a, 0x5e76, 0x5e7c, 0x5e7a, 0x4529, 0x5f23, 0x5e77, 0x5e78,
+  0x5e60, 0x3579, 0x493a, 0x3c3f, 0x3977, 0x4f33, 0x5e74, 0x5f22,
+  0x3169, 0x4166, 0x4779, 0x3441, 0x4e7a, 0x4c21, 0x4452, 0x5e7b,
+  0x5e7d, 0x4132, 0x5f21, 0x5e79, 0x5e73, 0x3443, 0x3769, 0x5f2f,
+  0x5f2a, 0x4078, 0x3363, 0x3d61, 0x5f33, 0x5f2c, 0x442c, 0x5f29,
+  0x4459, 0x5f4c, 0x5f26, 0x5f25, 0x5f2e, 0x5f28, 0x5f27, 0x5f2d,
+  0x4021, 0x5f24, 0x5f30, 0x5f31, 0x3442, 0x5f36, 0x5f35, 0x5f37,
+  0x5f3a, 0x4543, 0x5f34, 0x5f38, 0x3763, 0x4279, 0x5f32, 0x473b,
+  0x5f39, 0x5f3e, 0x5f3c, 0x5f3f, 0x5f42, 0x5f3b, 0x396a, 0x4728,
+  0x5e39, 0x4d74, 0x5f3d, 0x5f41, 0x4275, 0x5f40, 0x5f2b, 0x6f69,
+  0x5f45, 0x5f49, 0x5f47, 0x5f43, 0x5f44, 0x5f48, 0x5f46, 0x494e,
+  0x5f4e, 0x5f4b, 0x5f4a, 0x5f4d, 0x4654, 0x5f4f, 0x4375, 0x426d,
+  0x4025, 0x5f50, 0x5f52, 0x5f51, 0x5e75, 0x5f53, 0x4667, 0x5f54,
+  0x3250, 0x4574, 0x3325, 0x3564, 0x3c5e, 0x3a52, 0x4f27, 0x3f66,
+  0x316a, 0x5f56, 0x5f55, 0x5f59, 0x433a, 0x5f5c, 0x5f57, 0x5f5b,
+  0x5f5a, 0x4540, 0x3059, 0x4e75, 0x5f5e, 0x3128, 0x5f60, 0x5f5f,
+  0x5f5d, 0x5f58, 0x4b23, 0x5f62, 0x5f61, 0x316b, 0x5f64, 0x4a32,
+  0x5f63, 0x4c35, 0x3e47, 0x4133, 0x3e46, 0x4e7b, 0x5f6a, 0x4079,
+  0x5f66, 0x5f6b, 0x316c, 0x5f69, 0x4761, 0x5f65, 0x5f68, 0x3e48,
+  0x4851, 0x5f6c, 0x3c51, 0x407a, 0x5f6f, 0x5f67, 0x3727, 0x5f6d,
+  0x4d50, 0x5f70, 0x7426, 0x3d4f, 0x5f71, 0x5f72, 0x472e, 0x5f74,
+  0x5f75, 0x4733, 0x4575, 0x5f77, 0x5f79, 0x4e55, 0x5f76, 0x5f78,
+  0x316d, 0x5f73, 0x535b, 0x5f7a, 0x4167, 0x3b38, 0x5f7c, 0x5f7b,
+  0x3f24, 0x5259, 0x5f7d, 0x6021, 0x5f6e, 0x5f7e, 0x6022, 0x477a,
+  0x6023, 0x6024, 0x6025, 0x6026, 0x445e, 0x6028, 0x6027, 0x6029,
+  0x602a, 0x3c5f, 0x4963, 0x4c6c, 0x602b, 0x602c, 0x4156, 0x3c24,
+  0x602d, 0x602e, 0x602f, 0x4a52, 0x4847, 0x6030, 0x4757, 0x442d,
+  0x6031, 0x3267, 0x356d, 0x4c46, 0x4c36, 0x3234, 0x4f34, 0x4b52,
+  0x4a2a, 0x4037, 0x6032, 0x4643, 0x3823, 0x6033, 0x3a54, 0x6035,
+  0x6034, 0x6036, 0x6037, 0x6038, 0x353e, 0x6039, 0x603a, 0x3824,
+  0x4848, 0x603c, 0x3e75, 0x603b, 0x3638, 0x603d, 0x603f, 0x603e,
+  0x6040, 0x3851, 0x6041, 0x3669, 0x4140, 0x397d, 0x6043, 0x6044,
+  0x6042, 0x3c6d, 0x4648, 0x3639, 0x6046, 0x432c, 0x6045, 0x4f35,
+  0x4762, 0x6049, 0x604b, 0x6048, 0x4c54, 0x604a, 0x604c, 0x4e44,
+  0x6050, 0x604f, 0x4376, 0x472d, 0x3825, 0x604e, 0x604d, 0x4d31,
+  0x4d32, 0x6051, 0x316e, 0x3976, 0x3b62, 0x6052, 0x6053, 0x6055,
+  0x3d43, 0x6057, 0x6056, 0x6058, 0x334d, 0x605a, 0x6059, 0x605c,
+  0x605b, 0x383c, 0x4e28, 0x364c, 0x3226, 0x366a, 0x3461, 0x4e68,
+  0x605e, 0x6060, 0x6061, 0x3251, 0x605d, 0x3b39, 0x4441, 0x605f,
+  0x6064, 0x3c6e, 0x6062, 0x373e, 0x4849, 0x6063, 0x607e, 0x6069,
+  0x383d, 0x3565, 0x6066, 0x4d7d, 0x4e30, 0x4276, 0x6068, 0x606a,
+  0x4e56, 0x3657, 0x487c, 0x474a, 0x606b, 0x606d, 0x6070, 0x606c,
+  0x606f, 0x386a, 0x314d, 0x6071, 0x3f70, 0x606e, 0x4e5c, 0x6074,
+  0x7424, 0x6072, 0x6075, 0x6067, 0x6073, 0x3a3c, 0x6076, 0x6077,
+  0x4d7e, 0x6078, 0x6079, 0x6065, 0x607a, 0x3444, 0x3c25, 0x607b,
+  0x607c, 0x607d, 0x313b, 0x6121, 0x493b, 0x6122, 0x3424, 0x6123,
+  0x6124, 0x6125, 0x6127, 0x6128, 0x6126, 0x4953, 0x612a, 0x6129,
+  0x612c, 0x612b, 0x612d, 0x612e, 0x6130, 0x612f, 0x3979, 0x6132,
+  0x6131, 0x3445, 0x3f53, 0x453c, 0x6133, 0x4038, 0x3b3a, 0x3179,
+  0x6134, 0x4d51, 0x4a63, 0x6135, 0x4544, 0x4d33, 0x3943, 0x3f3d,
+  0x434b, 0x5234, 0x442e, 0x3268, 0x6136, 0x6137, 0x613c, 0x613a,
+  0x6139, 0x5a42, 0x3326, 0x6138, 0x305a, 0x482a, 0x484a, 0x4e31,
+  0x613d, 0x613b, 0x435c, 0x4026, 0x482b, 0x492d, 0x613f, 0x4e2c,
+  0x374d, 0x6140, 0x613e, 0x4856, 0x6141, 0x6142, 0x305b, 0x3e76,
+  0x6147, 0x6144, 0x466d, 0x6143, 0x3526, 0x614a, 0x6145, 0x6146,
+  0x6149, 0x6148, 0x4925, 0x4142, 0x4141, 0x353f, 0x614b, 0x614c,
+  0x614d, 0x614f, 0x614e, 0x3156, 0x6157, 0x4868, 0x6151, 0x6153,
+  0x6155, 0x3f3e, 0x6156, 0x6154, 0x3c40, 0x6150, 0x6152, 0x4942,
+  0x3e49, 0x6159, 0x6158, 0x615a, 0x3c26, 0x3a2f, 0x4577, 0x615b,
+  0x444b, 0x615d, 0x4e21, 0x615c, 0x4169, 0x6162, 0x6164, 0x6165,
+  0x4354, 0x6163, 0x6160, 0x615e, 0x615f, 0x6161, 0x6168, 0x6166,
+  0x6167, 0x6169, 0x616b, 0x616c, 0x616d, 0x616e, 0x616a, 0x6170,
+  0x616f, 0x6171, 0x4e45, 0x6174, 0x6172, 0x6173, 0x3462, 0x4c7e,
+  0x4a4a, 0x6176, 0x6175, 0x6177, 0x6178, 0x617c, 0x6179, 0x617a,
+  0x617b, 0x617d, 0x617e, 0x6221, 0x6222, 0x6223, 0x482f, 0x4550,
+  0x6224, 0x4772, 0x4934, 0x6225, 0x6226, 0x452a, 0x3327, 0x3944,
+  0x6227, 0x6228, 0x6229, 0x3b29, 0x622b, 0x622a, 0x622c, 0x622d,
+  0x4869, 0x622e, 0x622f, 0x7369, 0x6230, 0x6231, 0x6232, 0x3b2e,
+  0x6233, 0x4756, 0x4b5f, 0x314e, 0x3157, 0x6234, 0x6236, 0x6235,
+  0x4570, 0x4039, 0x5d39, 0x6237, 0x4c41, 0x6238, 0x3446, 0x4857,
+  0x6239, 0x623a, 0x623b, 0x4c5c, 0x4c55, 0x443e, 0x416a, 0x623d,
+  0x3d62, 0x3e4a, 0x6240, 0x623f, 0x623e, 0x487d, 0x3447, 0x3829,
+  0x6246, 0x6243, 0x3f3f, 0x4c32, 0x6242, 0x6244, 0x6245, 0x6241,
+  0x6247, 0x6248, 0x442f, 0x3463, 0x4365, 0x6249, 0x624a, 0x624d,
+  0x3f67, 0x4644, 0x624e, 0x4b53, 0x624b, 0x624c, 0x6251, 0x6250,
+  0x624f, 0x6253, 0x6252, 0x6254, 0x6256, 0x6255, 0x4a4d, 0x3d56,
+  0x4e46, 0x6257, 0x4637, 0x6258, 0x6259, 0x625d, 0x625b, 0x625c,
+  0x625a, 0x625e, 0x625f, 0x6260, 0x6261, 0x4c37, 0x6262, 0x4c70,
+  0x6263, 0x434e, 0x476a, 0x366b, 0x433b, 0x6264, 0x363a, 0x4050,
+  0x6265, 0x3a3d, 0x6266, 0x6267, 0x3826, 0x3a55, 0x6269, 0x4556,
+  0x3a56, 0x354e, 0x4b24, 0x474b, 0x4557, 0x395c, 0x626b, 0x3e4b,
+  0x4e32, 0x3945, 0x3827, 0x4823, 0x626d, 0x626f, 0x386b, 0x626e,
+  0x4476, 0x6271, 0x3337, 0x626c, 0x486a, 0x3130, 0x3a6c, 0x4f52,
+  0x6270, 0x6272, 0x4a4b, 0x4059, 0x6274, 0x6275, 0x6273, 0x334e,
+  0x627b, 0x627a, 0x3c27, 0x627c, 0x6277, 0x627d, 0x6278, 0x4858,
+  0x6276, 0x6279, 0x6322, 0x6321, 0x4b61, 0x627e, 0x306b, 0x6324,
+  0x6323, 0x3e4c, 0x6325, 0x4143, 0x6327, 0x6326, 0x6328, 0x6268,
+  0x626a, 0x632a, 0x6329, 0x3c28, 0x4e69, 0x3c52, 0x632b, 0x3737,
+  0x3540, 0x3527, 0x3b63, 0x4d34, 0x6331, 0x6330, 0x4144, 0x632d,
+  0x632f, 0x3d4b, 0x3f40, 0x632e, 0x632c, 0x472a, 0x3e4d, 0x493c,
+  0x3a57, 0x4578, 0x6332, 0x6333, 0x6349, 0x3658, 0x4f3d, 0x4135,
+  0x6334, 0x3252, 0x4477, 0x4a21, 0x6335, 0x357a, 0x6336, 0x6338,
+  0x6339, 0x4729, 0x633a, 0x633b, 0x633c, 0x3659, 0x3253, 0x4645,
+  0x3d28, 0x3b64, 0x633d, 0x3d29, 0x324a, 0x4943, 0x633e, 0x486b,
+  0x4145, 0x6341, 0x6342, 0x4769, 0x3f41, 0x633f, 0x4361, 0x6340,
+  0x3e4e, 0x305c, 0x3529, 0x6343, 0x4478, 0x6344, 0x4047, 0x4c2d,
+  0x4923, 0x6345, 0x6346, 0x4355, 0x4e47, 0x6348, 0x6347, 0x3c6f,
+  0x634a, 0x3070, 0x634d, 0x634b, 0x3254, 0x374e, 0x634c, 0x3946,
+  0x3972, 0x4a66, 0x634e, 0x4b54, 0x6350, 0x4051, 0x314f, 0x323a,
+  0x302c, 0x634f, 0x6351, 0x6352, 0x3e77, 0x6353, 0x334f, 0x6355,
+  0x376a, 0x3566, 0x6356, 0x3675, 0x6357, 0x407c, 0x464d, 0x4060,
+  0x3a75, 0x6358, 0x4362, 0x416b, 0x635a, 0x635c, 0x6359, 0x635b,
+  0x3722, 0x635d, 0x3726, 0x3567, 0x4d52, 0x635f, 0x6360, 0x312e,
+  0x6363, 0x3376, 0x6362, 0x6361, 0x6365, 0x635e, 0x6366, 0x4e29,
+  0x6367, 0x6368, 0x5474, 0x636a, 0x6369, 0x636b, 0x636c, 0x4e35,
+  0x636d, 0x706f, 0x3e4f, 0x636e, 0x636f, 0x3d57, 0x4638, 0x6370,
+  0x4328, 0x6371, 0x433c, 0x6372, 0x3625, 0x513f, 0x435d, 0x3c33,
+  0x3448, 0x6373, 0x6422, 0x6376, 0x3568, 0x6375, 0x6424, 0x6374,
+  0x3e50, 0x6378, 0x6379, 0x452b, 0x637a, 0x335e, 0x3f5a, 0x4964,
+  0x637c, 0x4268, 0x6377, 0x637b, 0x637d, 0x3a7b, 0x6426, 0x492e,
+  0x4826, 0x4579, 0x365a, 0x6425, 0x6423, 0x4835, 0x637e, 0x435e,
+  0x457b, 0x457a, 0x3a76, 0x6438, 0x6428, 0x642a, 0x642d, 0x642e,
+  0x642b, 0x642c, 0x6429, 0x6427, 0x6421, 0x4a4f, 0x3255, 0x6435,
+  0x6432, 0x6437, 0x6436, 0x4773, 0x4c27, 0x3b3b, 0x6430, 0x6439,
+  0x6434, 0x6433, 0x642f, 0x6431, 0x3449, 0x433d, 0x407d, 0x4822,
+  0x643e, 0x4824, 0x4061, 0x643b, 0x484f, 0x643f, 0x4a53, 0x435b,
+  0x643a, 0x643c, 0x643d, 0x6440, 0x3c44, 0x4646, 0x6445, 0x6444,
+  0x6441, 0x4f36, 0x644a, 0x644e, 0x644b, 0x6447, 0x6448, 0x644d,
+  0x6442, 0x5255, 0x6449, 0x6443, 0x644c, 0x6452, 0x344a, 0x644f,
+  0x6450, 0x6451, 0x6454, 0x6453, 0x4876, 0x6455, 0x4e7c, 0x4a6d,
+  0x645a, 0x6457, 0x6456, 0x4052, 0x6459, 0x645b, 0x6458, 0x645f,
+  0x645c, 0x645d, 0x6446, 0x645e, 0x6460, 0x6461, 0x4a46, 0x6462,
+  0x4c62, 0x364e, 0x3729, 0x6463, 0x4a34, 0x3f68, 0x4c30, 0x6464,
+  0x4e33, 0x4774, 0x4146, 0x4734, 0x3d4d, 0x3040, 0x6469, 0x6467,
+  0x6465, 0x3421, 0x3e51, 0x646a, 0x6468, 0x6466, 0x646e, 0x646d,
+  0x646c, 0x646b, 0x646f, 0x6470, 0x403a, 0x6471, 0x6473, 0x6472,
+  0x3852, 0x4138, 0x6475, 0x457c, 0x6474, 0x6476, 0x4a35, 0x416c,
+  0x3947, 0x6477, 0x4e48, 0x6479, 0x647a, 0x647b, 0x647c, 0x3b65,
+  0x647d, 0x374f, 0x356a, 0x352a, 0x6521, 0x4c73, 0x3948, 0x647e,
+  0x6524, 0x4c66, 0x473c, 0x4933, 0x3d63, 0x6523, 0x3c53, 0x3949,
+  0x3b66, 0x3569, 0x4a36, 0x6522, 0x4147, 0x4b42, 0x3a77, 0x3b67,
+  0x445d, 0x6527, 0x4e5f, 0x3a59, 0x6528, 0x3f42, 0x652a, 0x3e52,
+  0x3a30, 0x6529, 0x3d2a, 0x383e, 0x4148, 0x6525, 0x652b, 0x6526,
+  0x3750, 0x652e, 0x6532, 0x376b, 0x652d, 0x6536, 0x394a, 0x4d6d,
+  0x303c, 0x6533, 0x356b, 0x6530, 0x6531, 0x457d, 0x652f, 0x652c,
+  0x3328, 0x4064, 0x3828, 0x6538, 0x6535, 0x6537, 0x6534, 0x3751,
+  0x4233, 0x6539, 0x416e, 0x6546, 0x6542, 0x653c, 0x6540, 0x3c7a,
+  0x305d, 0x653b, 0x6543, 0x6547, 0x394b, 0x4c56, 0x4456, 0x653d,
+  0x6545, 0x653a, 0x433e, 0x653f, 0x303d, 0x4c4a, 0x653e, 0x365b,
+  0x486c, 0x416d, 0x4e50, 0x3d6f, 0x656e, 0x6548, 0x407e, 0x6544,
+  0x6549, 0x654b, 0x4479, 0x654e, 0x654a, 0x4a54, 0x344b, 0x4c4b,
+  0x305e, 0x654d, 0x4e7d, 0x654c, 0x316f, 0x466c, 0x654f, 0x6556,
+  0x6550, 0x6557, 0x6553, 0x477b, 0x3c4a, 0x6555, 0x6552, 0x6558,
+  0x6551, 0x3d44, 0x4b25, 0x3d4c, 0x6554, 0x6560, 0x655c, 0x655f,
+  0x655d, 0x6561, 0x655b, 0x6541, 0x4053, 0x484b, 0x655e, 0x6559,
+  0x4121, 0x3752, 0x3d2b, 0x3f25, 0x4136, 0x6564, 0x6566, 0x6567,
+  0x6563, 0x6565, 0x655a, 0x6562, 0x656a, 0x6569, 0x4b7a, 0x372b,
+  0x6568, 0x656c, 0x656b, 0x656f, 0x6571, 0x3b3c, 0x656d, 0x6572,
+  0x6573, 0x6574, 0x657a, 0x453b, 0x6576, 0x6575, 0x6577, 0x6578,
+  0x6579, 0x657b, 0x657c, 0x344c, 0x657d, 0x657e, 0x6621, 0x6622,
+  0x6623, 0x6624, 0x6625, 0x6626, 0x6628, 0x6627, 0x6629, 0x662a,
+  0x662b, 0x662e, 0x662c, 0x662d, 0x3a61, 0x3753, 0x4356, 0x4833,
+  0x3d70, 0x474d, 0x486d, 0x662f, 0x586d, 0x6630, 0x6632, 0x4d65,
+  0x6631, 0x6634, 0x6633, 0x4d53, 0x6635, 0x487e, 0x6636, 0x6639,
+  0x6638, 0x6637, 0x663a, 0x3732, 0x4122, 0x3541, 0x663e, 0x663b,
+  0x663c, 0x663f, 0x6640, 0x663d, 0x3129, 0x3227, 0x6642, 0x6643,
+  0x6644, 0x4d62, 0x3d2c, 0x6646, 0x6645, 0x3f69, 0x6647, 0x6648,
+  0x6649, 0x3465, 0x344d, 0x664a, 0x664b, 0x4b5d, 0x4d63, 0x4d54,
+  0x4f37, 0x394d, 0x664e, 0x3c54, 0x664d, 0x664f, 0x3c29, 0x4251,
+  0x6650, 0x394c, 0x4c57, 0x6651, 0x6652, 0x6653, 0x6654, 0x6655,
+  0x3c2a, 0x4c6d, 0x6657, 0x433f, 0x6656, 0x6659, 0x6658, 0x665a,
+  0x403b, 0x665b, 0x665c, 0x4a39, 0x665d, 0x416f, 0x665e, 0x665f,
+  0x4e7e, 0x6662, 0x6661, 0x6660, 0x4430, 0x6663, 0x3f26, 0x6664,
+  0x6665, 0x4f38, 0x6666, 0x6667, 0x6669, 0x6668, 0x4825, 0x4679,
+  0x4f3e, 0x4829, 0x666b, 0x3e53, 0x492a, 0x666c, 0x666a, 0x344e,
+  0x3854, 0x3b68, 0x486e, 0x382a, 0x4b43, 0x666f, 0x666d, 0x394e,
+  0x394f, 0x3069, 0x3a68, 0x4759, 0x305f, 0x6674, 0x4340, 0x4758,
+  0x425b, 0x6676, 0x6672, 0x6675, 0x6670, 0x6673, 0x4b26, 0x3855,
+  0x307d, 0x6671, 0x6678, 0x6679, 0x4639, 0x363b, 0x6726, 0x473d,
+  0x3b69, 0x363c, 0x4048, 0x4f46, 0x4c2e, 0x6677, 0x4054, 0x3553,
+  0x667a, 0x667c, 0x667b, 0x667d, 0x4326, 0x473e, 0x4431, 0x6723,
+  0x6722, 0x667e, 0x3f55, 0x4965, 0x6725, 0x6724, 0x3950, 0x4f53,
+  0x6735, 0x6729, 0x672a, 0x3c70, 0x6728, 0x3978, 0x6727, 0x672b,
+  0x4432, 0x4a22, 0x4123, 0x425c, 0x672f, 0x6730, 0x672c, 0x672d,
+  0x672e, 0x3951, 0x6736, 0x6732, 0x4966, 0x4b6c, 0x4928, 0x6731,
+  0x6734, 0x6733, 0x4b44, 0x6737, 0x6738, 0x4137, 0x6739, 0x673b,
+  0x673f, 0x673c, 0x673a, 0x473f, 0x673d, 0x673e, 0x3232, 0x6745,
+  0x6740, 0x6741, 0x6742, 0x4221, 0x6744, 0x6743, 0x6746, 0x6747,
+  0x6748, 0x3f43, 0x3269, 0x6749, 0x4e57, 0x3c2b, 0x3d2d, 0x3b6a,
+  0x4357, 0x674a, 0x674b, 0x3131, 0x674c, 0x674d, 0x674e, 0x674f,
+  0x6750, 0x363d, 0x5a2a, 0x6751, 0x4065, 0x6752, 0x3c4b, 0x6753,
+  0x5030, 0x6754, 0x4a5e, 0x345c, 0x4124, 0x3d58, 0x4971, 0x3d2e,
+  0x6755, 0x3952, 0x6756, 0x484c, 0x6764, 0x6758, 0x4249, 0x4775,
+  0x383f, 0x6757, 0x4125, 0x6759, 0x447a, 0x675b, 0x675a, 0x675d,
+  0x675c, 0x675e, 0x6760, 0x675f, 0x344f, 0x6761, 0x6762, 0x6763,
+  0x3a31, 0x4e49, 0x6765, 0x3f27, 0x3170, 0x6766, 0x6767, 0x6768,
+  0x3072, 0x6769, 0x676a, 0x4967, 0x3c47, 0x676c, 0x3329, 0x3032,
+  0x676b, 0x676e, 0x474e, 0x3f44, 0x3256, 0x4b27, 0x375d, 0x365c,
+  0x676d, 0x326a, 0x3423, 0x3171, 0x6772, 0x4e6a, 0x425d, 0x4944,
+  0x677e, 0x3257, 0x677c, 0x677a, 0x6771, 0x676f, 0x6770, 0x3c63,
+  0x366c, 0x4377, 0x4651, 0x3151, 0x6774, 0x6773, 0x6779, 0x6775,
+  0x6778, 0x4c50, 0x6777, 0x3258, 0x337d, 0x677b, 0x677d, 0x3754,
+  0x6823, 0x682c, 0x682d, 0x302b, 0x6834, 0x3071, 0x682b, 0x682a,
+  0x6825, 0x6824, 0x6822, 0x6821, 0x4363, 0x427b, 0x6827, 0x6826,
+  0x6829, 0x4170, 0x3755, 0x3141, 0x6828, 0x3953, 0x4171, 0x683a,
+  0x683b, 0x3259, 0x322e, 0x6838, 0x682e, 0x6836, 0x683d, 0x6837,
+  0x6835, 0x6776, 0x6833, 0x682f, 0x3450, 0x6831, 0x683c, 0x6832,
+  0x683e, 0x6830, 0x477c, 0x4d69, 0x6839, 0x684f, 0x6847, 0x3f7b,
+  0x3546, 0x365d, 0x6842, 0x325b, 0x3e54, 0x6845, 0x3a5a, 0x4551,
+  0x684a, 0x4a6e, 0x6841, 0x325a, 0x3856, 0x4929, 0x684b, 0x683f,
+  0x6848, 0x6852, 0x6843, 0x6844, 0x463a, 0x6849, 0x6846, 0x4b28,
+  0x684c, 0x3060, 0x6840, 0x684e, 0x684d, 0x476b, 0x6854, 0x685f,
+  0x337e, 0x6862, 0x6850, 0x6855, 0x4d6e, 0x685e, 0x4d55, 0x4e2a,
+  0x4378, 0x336b, 0x4972, 0x6864, 0x4621, 0x3031, 0x685d, 0x6859,
+  0x4172, 0x6853, 0x685b, 0x6860, 0x472c, 0x302a, 0x6858, 0x6861,
+  0x4978, 0x685c, 0x6857, 0x3e55, 0x3d2f, 0x3c2c, 0x4c58, 0x4947,
+  0x6867, 0x6870, 0x685a, 0x3377, 0x3e78, 0x6865, 0x686a, 0x4173,
+  0x6866, 0x686d, 0x435f, 0x686e, 0x4d56, 0x6863, 0x3338, 0x6869,
+  0x686c, 0x4c2c, 0x686f, 0x6868, 0x686b, 0x4b29, 0x4f21, 0x6873,
+  0x687a, 0x6872, 0x3c43, 0x6851, 0x4a4e, 0x4c22, 0x6879, 0x6878,
+  0x6874, 0x6875, 0x3136, 0x6877, 0x6871, 0x4455, 0x6876, 0x307e,
+  0x4222, 0x4a43, 0x687b, 0x6921, 0x4859, 0x687e, 0x3e56, 0x3c49,
+  0x6923, 0x363e, 0x6924, 0x4979, 0x687d, 0x6856, 0x687c, 0x4f4f,
+  0x4622, 0x4973, 0x692b, 0x6931, 0x6932, 0x6925, 0x4776, 0x692f,
+  0x6927, 0x6929, 0x6933, 0x6928, 0x692c, 0x3172, 0x4665, 0x692d,
+  0x6930, 0x6926, 0x4126, 0x692a, 0x3b27, 0x3f45, 0x3730, 0x4c74,
+  0x4c79, 0x3d72, 0x6937, 0x6935, 0x4f4e, 0x6934, 0x4d75, 0x6936,
+  0x6938, 0x6939, 0x693c, 0x693a, 0x4623, 0x693b, 0x484d, 0x692e,
+  0x3d73, 0x693d, 0x6942, 0x4174, 0x6941, 0x6922, 0x6943, 0x4149,
+  0x693e, 0x6940, 0x693f, 0x5d31, 0x5d22, 0x6945, 0x6944, 0x4d76,
+  0x623c, 0x6946, 0x6947, 0x6948, 0x3857, 0x3554, 0x694a, 0x515d,
+  0x3575, 0x4e3a, 0x3673, 0x694b, 0x694c, 0x436e, 0x694d, 0x467a,
+  0x303a, 0x3263, 0x6952, 0x6953, 0x694e, 0x3b3d, 0x694f, 0x4742,
+  0x6950, 0x6951, 0x695b, 0x6955, 0x6958, 0x6954, 0x6956, 0x6957,
+  0x3c58, 0x6959, 0x4341, 0x3756, 0x3342, 0x695c, 0x333f, 0x6961,
+  0x695d, 0x6960, 0x483a, 0x695e, 0x695f, 0x4948, 0x485a, 0x6962,
+  0x427d, 0x696c, 0x6968, 0x326b, 0x6966, 0x4b2a, 0x6967, 0x6964,
+  0x6965, 0x696a, 0x696d, 0x696b, 0x6969, 0x6963, 0x4358, 0x6974,
+  0x4c2a, 0x6972, 0x6973, 0x696e, 0x6970, 0x6971, 0x696f, 0x4066,
+  0x4f39, 0x6978, 0x6979, 0x6a21, 0x3f2a, 0x697b, 0x697e, 0x6976,
+  0x6975, 0x6a22, 0x325c, 0x697c, 0x6a23, 0x697d, 0x697a, 0x4433,
+  0x6977, 0x4768, 0x6a27, 0x4d3b, 0x6a26, 0x6a25, 0x6a2e, 0x6a28,
+  0x6a30, 0x4d66, 0x6a33, 0x6a2a, 0x6a2b, 0x6a2f, 0x6a32, 0x6a31,
+  0x6a29, 0x6a2c, 0x6a3d, 0x6a36, 0x6a34, 0x6a35, 0x6a3a, 0x6a3b,
+  0x332a, 0x3542, 0x6a39, 0x6a24, 0x6a38, 0x6a3c, 0x6a37, 0x6a3e,
+  0x6a40, 0x6a3f, 0x6a42, 0x6a41, 0x695a, 0x6a46, 0x6a43, 0x6a44,
+  0x6a45, 0x6a47, 0x376c, 0x6a49, 0x6a48, 0x3d30, 0x3954, 0x5e27,
+  0x6a4a, 0x3d51, 0x3339, 0x6a4b, 0x3152, 0x3e57, 0x6a4c, 0x3955,
+  0x6a4d, 0x3061, 0x493d, 0x6a4e, 0x3f6a, 0x6a55, 0x6a52, 0x436f,
+  0x6a53, 0x6a50, 0x365e, 0x6a4f, 0x6a56, 0x3736, 0x425e, 0x6a5c,
+  0x6a58, 0x4235, 0x6a57, 0x6a5a, 0x6a51, 0x6a5b, 0x6a5d, 0x486f,
+  0x6a59, 0x6a5e, 0x6a60, 0x3853, 0x6a54, 0x3041, 0x6a5f, 0x3a5b,
+  0x4e76, 0x6a61, 0x6a62, 0x4175, 0x4e22, 0x6a63, 0x4d35, 0x6a64,
+  0x6a65, 0x4a64, 0x6a66, 0x3a40, 0x4e23, 0x6a6b, 0x6a6c, 0x3e58,
+  0x6a6a, 0x4d67, 0x6a67, 0x6a69, 0x403d, 0x3f7e, 0x6a68, 0x6a6d,
+  0x4a23, 0x6a6f, 0x6a6e, 0x336c, 0x4b2b, 0x6a70, 0x6a7c, 0x6a72,
+  0x6a73, 0x6a74, 0x6a75, 0x6a79, 0x6a7a, 0x6a78, 0x6a76, 0x6a71,
+  0x6a77, 0x6a7b, 0x7037, 0x3228, 0x6a7e, 0x365f, 0x6a7d, 0x6b22,
+  0x6b21, 0x6b24, 0x6b23, 0x6b25, 0x3d31, 0x6b26, 0x6b27, 0x6b28,
+  0x403e, 0x4d57, 0x6b29, 0x4a24, 0x4746, 0x6b2a, 0x6b2b, 0x382b,
+  0x352c, 0x6b2c, 0x3b6b, 0x4741, 0x6b2d, 0x3350, 0x6b2e, 0x6b30,
+  0x4d77, 0x6b2f, 0x3f46, 0x6b31, 0x6b32, 0x6b33, 0x3451, 0x6b34,
+  0x6b35, 0x6b36, 0x6b37, 0x3351, 0x6b38, 0x6b39, 0x6b3a, 0x3272,
+  0x3f28, 0x6b3b, 0x6b3c, 0x6b3d, 0x3840, 0x447b, 0x6b3e, 0x3757,
+  0x3f56, 0x6b41, 0x4624, 0x6b40, 0x3731, 0x6b3f, 0x4277, 0x352d,
+  0x6b42, 0x6b43, 0x3e59, 0x376d, 0x6b44, 0x4b2c, 0x405f, 0x3576,
+  0x4c75, 0x414a, 0x6b45, 0x3f47, 0x4370, 0x3e5a, 0x6b46, 0x6b49,
+  0x6b4a, 0x3a3e, 0x4242, 0x6b48, 0x3e5b, 0x493e, 0x6b47, 0x3b6c,
+  0x3153, 0x6b4e, 0x3758, 0x3b6e, 0x3b6d, 0x4f4d, 0x6b4d, 0x6b4c,
+  0x4127, 0x354d, 0x4f43, 0x333a, 0x3e5c, 0x6b4b, 0x6b50, 0x6b51,
+  0x6b4f, 0x3858, 0x4d40, 0x3b6f, 0x4727, 0x6b54, 0x4040, 0x4342,
+  0x4d36, 0x6b57, 0x386c, 0x403f, 0x6b53, 0x6b58, 0x386d, 0x6b55,
+  0x6b56, 0x6b52, 0x4062, 0x4649, 0x432f, 0x325d, 0x4870, 0x3543,
+  0x4434, 0x6b5b, 0x6b59, 0x434c, 0x4041, 0x3452, 0x6b5a, 0x3f5b,
+  0x4e4a, 0x4f40, 0x6b5c, 0x6b67, 0x4435, 0x6b66, 0x6b63, 0x6b6b,
+  0x6b64, 0x6b60, 0x447c, 0x6b5f, 0x6b5d, 0x4d21, 0x3b70, 0x6b61,
+  0x6b5e, 0x6b65, 0x3d74, 0x3841, 0x427a, 0x4b45, 0x315a, 0x3062,
+  0x4625, 0x6b69, 0x6b68, 0x4666, 0x6b6d, 0x6b62, 0x6b6c, 0x6b6e,
+  0x382c, 0x6b6a, 0x3956, 0x3c55, 0x6b6f, 0x4d58, 0x6b72, 0x6b75,
+  0x6b73, 0x4935, 0x6b70, 0x3660, 0x6b74, 0x6b76, 0x6b7a, 0x6b77,
+  0x6b79, 0x6b78, 0x6b7b, 0x3c31, 0x6b7d, 0x6b7c, 0x4968, 0x6c21,
+  0x3759, 0x6b7e, 0x6c22, 0x6c23, 0x3544, 0x6641, 0x3e79, 0x6c24,
+  0x386e, 0x6c25, 0x6c26, 0x3b3e, 0x5a4e, 0x6c27, 0x6c28, 0x3d32,
+  0x6c29, 0x6c2a, 0x6c2b, 0x6c2c, 0x6c2d, 0x432b, 0x6c2e, 0x6c30,
+  0x6c2f, 0x4626, 0x6c31, 0x4b2d, 0x6c32, 0x6c33, 0x6c34, 0x6c35,
+  0x465a, 0x3e5d, 0x6c36, 0x396b, 0x502e, 0x6c37, 0x6c38, 0x493f,
+  0x6c39, 0x6c41, 0x6c3a, 0x6c3c, 0x6c3b, 0x6c3d, 0x4b46, 0x6c3e,
+  0x6c3f, 0x6c40, 0x6c42, 0x332d, 0x4467, 0x4969, 0x3a62, 0x3957,
+  0x494f, 0x325f, 0x484e, 0x6c45, 0x3453, 0x4055, 0x6c44, 0x6c49,
+  0x4379, 0x4c63, 0x6c47, 0x6c48, 0x352e, 0x6c4a, 0x4763, 0x425f,
+  0x4871, 0x453d, 0x6c46, 0x4b47, 0x326c, 0x6c4c, 0x4f28, 0x4442,
+  0x4f45, 0x3b71, 0x6c4b, 0x4231, 0x6c5c, 0x4128, 0x4678, 0x4950,
+  0x6c4f, 0x3b3f, 0x3b72, 0x3e5e, 0x4765, 0x382d, 0x6c4e, 0x6c4d,
+  0x496a, 0x3c41, 0x4552, 0x6c51, 0x6c52, 0x3958, 0x6c50, 0x6c53,
+  0x6c54, 0x6c56, 0x4223, 0x6c55, 0x3466, 0x6c58, 0x6c57, 0x6c59,
+  0x6c5b, 0x6c5d, 0x6c5e, 0x4056, 0x3c4f, 0x6c5f, 0x3352, 0x6c60,
+  0x4176, 0x6c61, 0x6c62, 0x496b, 0x352f, 0x6c63, 0x4436, 0x315b,
+  0x6c64, 0x3c71, 0x3f76, 0x422d, 0x6c67, 0x6c66, 0x6c65, 0x6c6d,
+  0x6c6b, 0x6c68, 0x6c6a, 0x6c69, 0x6c6c, 0x3577, 0x6c70, 0x4057,
+  0x6c71, 0x3859, 0x6c6e, 0x6c6f, 0x4f29, 0x4437, 0x4129, 0x6c72,
+  0x6c75, 0x6c73, 0x6c74, 0x4d59, 0x4627, 0x6c78, 0x6c76, 0x6c77,
+  0x6c79, 0x6d29, 0x6c7c, 0x6c7d, 0x6c7b, 0x6c7a, 0x447d, 0x6d21,
+  0x6d25, 0x6d22, 0x6c7e, 0x6d23, 0x6d24, 0x6d2b, 0x6d26, 0x4058,
+  0x6d28, 0x6d2a, 0x6d27, 0x6d2d, 0x3d33, 0x6d2c, 0x6d2e, 0x6d2f,
+  0x6d32, 0x6d31, 0x6d30, 0x6d34, 0x6d33, 0x4c76, 0x6d36, 0x6d35,
+  0x6d37, 0x6d38, 0x6d3a, 0x6d39, 0x3f48, 0x6d3b, 0x366d, 0x6d3c,
+  0x6d3e, 0x6d3f, 0x6d40, 0x6d3d, 0x6d41, 0x3c56, 0x6d42, 0x3530,
+  0x3733, 0x382e, 0x6d43, 0x4670, 0x453e, 0x6d44, 0x6d47, 0x3c34,
+  0x6d46, 0x6d45, 0x375a, 0x6d48, 0x3353, 0x6d4a, 0x3a5c, 0x6d49,
+  0x6d52, 0x6d4c, 0x6d4e, 0x4a65, 0x6d4b, 0x6d4d, 0x6d51, 0x6d4f,
+  0x3531, 0x6d50, 0x6d53, 0x475a, 0x4e58, 0x3d34, 0x6d54, 0x4d22,
+  0x6d56, 0x6d55, 0x6d59, 0x4d41, 0x6d58, 0x336d, 0x6d57, 0x6d5c,
+  0x6d5b, 0x6d5a, 0x4532, 0x6d5d, 0x6d5e, 0x6d5f, 0x396c, 0x3725,
+  0x6d60, 0x6d61, 0x6d62, 0x3f49, 0x6d63, 0x3c2d, 0x6d64, 0x6d65,
+  0x5221, 0x517e, 0x6d66, 0x6570, 0x6d67, 0x4324, 0x3f2b, 0x4740,
+  0x6d68, 0x4a55, 0x4454, 0x397e, 0x4329, 0x312a, 0x4b78, 0x3f57,
+  0x375e, 0x3661, 0x4a56, 0x6d69, 0x6d6b, 0x6d6a, 0x3260, 0x4676,
+  0x6d6c, 0x4777, 0x4533, 0x6d6d, 0x3d52, 0x6d6f, 0x4c42, 0x6d7e,
+  0x6d71, 0x6d72, 0x4449, 0x4260, 0x4177, 0x4628, 0x6d70, 0x3555,
+  0x6d79, 0x6d76, 0x6e25, 0x4629, 0x4360, 0x6d73, 0x447e, 0x4553,
+  0x6d74, 0x6d78, 0x3f60, 0x4767, 0x444c, 0x4042, 0x6d77, 0x422e,
+  0x4224, 0x6d75, 0x3029, 0x4f22, 0x6d7a, 0x4261, 0x3d35, 0x3f4a,
+  0x6d7c, 0x6d7b, 0x306f, 0x6d7d, 0x492f, 0x6e27, 0x465b, 0x3f6b,
+  0x4359, 0x3678, 0x6e26, 0x4d37, 0x313f, 0x4a57, 0x3261, 0x6e21,
+  0x6e22, 0x6e23, 0x6e24, 0x463b, 0x4323, 0x3063, 0x6e28, 0x6e29,
+  0x7423, 0x423d, 0x6e2a, 0x3173, 0x414c, 0x382f, 0x4d5a, 0x6e2b,
+  0x452c, 0x4178, 0x3c57, 0x6e2c, 0x6e2f, 0x3d65, 0x6e2d, 0x412b,
+  0x412a, 0x3064, 0x4e4b, 0x6e31, 0x4872, 0x6e33, 0x6e32, 0x6e30,
+  0x6364, 0x3454, 0x6d6e, 0x6e35, 0x6e34, 0x6e36, 0x4d38, 0x4661,
+  0x4b2e, 0x6e37, 0x3c59, 0x6e38, 0x6e39, 0x6e3a, 0x4521, 0x306a,
+  0x3959, 0x4f3a, 0x6e3e, 0x3734, 0x6e3b, 0x6e3c, 0x4974, 0x3354,
+  0x4d39, 0x363f, 0x4554, 0x6e3f, 0x6e40, 0x6e41, 0x4522, 0x6e43,
+  0x6e42, 0x4653, 0x6e44, 0x3d36, 0x3c60, 0x475b, 0x4371, 0x3c72,
+  0x3f6c, 0x6e45, 0x6e46, 0x3f5d, 0x6e47, 0x6e48, 0x6e49, 0x4d6f,
+  0x3d37, 0x6e4b, 0x6e4a, 0x395a, 0x3973, 0x3b40, 0x6e4e, 0x3d66,
+  0x6e4d, 0x6e4c, 0x4269, 0x386f, 0x4043, 0x4830, 0x3d39, 0x6e4f,
+  0x3e5f, 0x6e52, 0x6e50, 0x6e51, 0x6e54, 0x6e53, 0x3e7a, 0x6e55,
+  0x6e56, 0x6e57, 0x4850, 0x3a53, 0x3c61, 0x6e58, 0x6e59, 0x4e24,
+  0x3d45, 0x4c6e, 0x4e4c, 0x6e5a, 0x3662, 0x6e5b, 0x4523, 0x6e5e,
+  0x3378, 0x3f4b, 0x6e5c, 0x6e5d, 0x4460, 0x4b55, 0x367c, 0x6e60,
+  0x6e61, 0x6e5f, 0x6e63, 0x465f, 0x3343, 0x6e67, 0x6e64, 0x6e66,
+  0x6e62, 0x6f4f, 0x6e65, 0x4e6b, 0x385a, 0x6e6f, 0x4534, 0x6e6a,
+  0x6e6d, 0x6e6b, 0x6e70, 0x6e71, 0x6e69, 0x6e76, 0x3174, 0x6e68,
+  0x482d, 0x6e6c, 0x3e60, 0x395b, 0x4b48, 0x3664, 0x3d46, 0x463c,
+  0x412d, 0x6e74, 0x6e6e, 0x6e73, 0x4c43, 0x4438, 0x6e75, 0x6e72,
+  0x412c, 0x6e79, 0x6e78, 0x6e77, 0x4b2f, 0x3d7b, 0x6e7a, 0x4a5f,
+  0x3154, 0x4946, 0x4372, 0x3578, 0x6e7c, 0x395d, 0x3b2c, 0x6e7b,
+  0x3f6d, 0x3f6e, 0x6f21, 0x6f23, 0x3e7b, 0x6f22, 0x6f24, 0x3653,
+  0x4945, 0x3c62, 0x4f23, 0x6e7e, 0x3a78, 0x4f3f, 0x6f26, 0x6f25,
+  0x6f27, 0x6e7d, 0x4669, 0x4555, 0x4457, 0x6f2c, 0x4343, 0x6f28,
+  0x6f29, 0x372d, 0x6f2b, 0x3830, 0x6f2a, 0x3e61, 0x3379, 0x6f30,
+  0x3a3f, 0x4179, 0x444a, 0x333b, 0x6f2e, 0x6f2f, 0x4443, 0x6f2d,
+  0x6f31, 0x6f37, 0x6f3a, 0x6f39, 0x452d, 0x6f32, 0x6f33, 0x6f36,
+  0x6f38, 0x3640, 0x6f3b, 0x6f35, 0x6f34, 0x6f3f, 0x6f40, 0x6f41,
+  0x6f3e, 0x6f3d, 0x3e62, 0x462a, 0x6f3c, 0x6f45, 0x6f43, 0x6f44,
+  0x6f42, 0x4278, 0x6f46, 0x6f47, 0x6f49, 0x3455, 0x6f48, 0x4c7a,
+  0x6f54, 0x6f4a, 0x6f4d, 0x6f4b, 0x6f4c, 0x6f4e, 0x6f50, 0x6f51,
+  0x6f52, 0x6f55, 0x6f53, 0x6f56, 0x6f58, 0x6f57, 0x4439, 0x4c67,
+  0x6f59, 0x412e, 0x6f5a, 0x4a44, 0x6f5b, 0x332b, 0x313c, 0x3457,
+  0x3456, 0x6f5c, 0x6f5d, 0x6f5e, 0x6f5f, 0x6f60, 0x3458, 0x3355,
+  0x395e, 0x4836, 0x6f62, 0x6f61, 0x6f63, 0x315c, 0x6f66, 0x6f65,
+  0x6f64, 0x6f67, 0x6f6a, 0x3047, 0x6f68, 0x6f6c, 0x6f6b, 0x6f6e,
+  0x6f6d, 0x6f6f, 0x462e, 0x6f70, 0x6f71, 0x6f73, 0x6f72, 0x496c,
+  0x6f74, 0x6f75, 0x3a65, 0x6f76, 0x6f77, 0x4b49, 0x414b, 0x3024,
+  0x424b, 0x6f78, 0x496d, 0x6f7b, 0x6f79, 0x395f, 0x6f7a, 0x3842,
+  0x4a45, 0x6f7d, 0x7021, 0x6f7e, 0x7022, 0x3121, 0x3f58, 0x3d7c,
+  0x3459, 0x7023, 0x4766, 0x7025, 0x3122, 0x7024, 0x4444, 0x4e4d,
+  0x462b, 0x6f7c, 0x4e26, 0x3831, 0x4d5b, 0x3679, 0x4e34, 0x3728,
+  0x4262, 0x6721, 0x7026, 0x332c, 0x3f6f, 0x3356, 0x7028, 0x7029,
+  0x7027, 0x3764, 0x3a5d, 0x3e63, 0x3123, 0x4e59, 0x702b, 0x6e2e,
+  0x702a, 0x702e, 0x702c, 0x702d, 0x702f, 0x7030, 0x4e6c, 0x7031,
+  0x7032, 0x4049, 0x483b, 0x3f7d, 0x3467, 0x4d3a, 0x326d, 0x3d38,
+  0x385b, 0x7035, 0x7034, 0x3b73, 0x7036, 0x7033, 0x3b28, 0x703a,
+  0x6a2d, 0x5256, 0x3f77, 0x7038, 0x4e25, 0x4671, 0x312b, 0x4063,
+  0x3c36, 0x4a37, 0x3140, 0x4e6d, 0x4d6b, 0x703b, 0x4545, 0x3c7b,
+  0x703c, 0x703d, 0x3f4c, 0x703e, 0x4e6e, 0x7039, 0x7040, 0x7042,
+  0x7041, 0x703f, 0x7043, 0x7044, 0x417a, 0x3262, 0x7045, 0x4c38,
+  0x7046, 0x7047, 0x4f2a, 0x5b31, 0x7048, 0x7049, 0x704a, 0x704e,
+  0x704b, 0x704c, 0x704d, 0x704f, 0x4044, 0x4c77, 0x4045, 0x7050,
+  0x4873, 0x7051, 0x7353, 0x4c4c, 0x7052, 0x7053, 0x7054, 0x3357,
+  0x7056, 0x3f59, 0x7057, 0x3724, 0x7058, 0x705c, 0x705a, 0x705b,
+  0x3373, 0x7059, 0x705d, 0x705e, 0x3048, 0x705f, 0x7060, 0x3e64,
+  0x7061, 0x3547, 0x7064, 0x7063, 0x7062, 0x6b71, 0x4a5c, 0x7065,
+  0x7066, 0x7067, 0x7068, 0x7069, 0x706a, 0x345a, 0x706b, 0x706c,
+  0x4723, 0x706e, 0x323b, 0x7071, 0x7070, 0x3124, 0x3641, 0x4a47,
+  0x443a, 0x3a22, 0x3960, 0x3d67, 0x3f5c, 0x7073, 0x7072, 0x4d42,
+  0x3468, 0x4852, 0x465c, 0x3f7c, 0x4e4e, 0x375b, 0x7076, 0x7075,
+  0x4b4b, 0x462c, 0x3150, 0x7077, 0x7074, 0x4951, 0x4d6a, 0x7078,
+  0x7079, 0x707b, 0x426a, 0x335b, 0x335c, 0x707a, 0x3469, 0x3832,
+  0x346a, 0x453f, 0x4e60, 0x385c, 0x707c, 0x707d, 0x707e, 0x7121,
+  0x7123, 0x7122, 0x4977, 0x7124, 0x7125, 0x7126, 0x7127, 0x7129,
+  0x7128, 0x712a, 0x4874, 0x664c, 0x3f29, 0x3532, 0x712b, 0x712c,
+  0x522c, 0x5d3b, 0x4853, 0x307b, 0x303b, 0x3b74, 0x4b30, 0x3e7e,
+  0x712d, 0x4c5f, 0x712e, 0x4d5c, 0x3142, 0x3b41, 0x712f, 0x326e,
+  0x7130, 0x7131, 0x7133, 0x7134, 0x7136, 0x7132, 0x7135, 0x345b,
+  0x7137, 0x7138, 0x7139, 0x713a, 0x713b, 0x713d, 0x713c, 0x713f,
+  0x7142, 0x713e, 0x7140, 0x7141, 0x7143, 0x3642, 0x3c73, 0x7144,
+  0x7145, 0x3961, 0x7146, 0x333e, 0x474f, 0x7147, 0x7148, 0x435a,
+  0x466b, 0x7149, 0x477d, 0x424c, 0x3158, 0x366e, 0x366f, 0x4373,
+  0x714e, 0x3670, 0x326f, 0x714d, 0x714b, 0x714c, 0x714a, 0x7158,
+  0x714f, 0x7150, 0x7151, 0x7152, 0x7154, 0x7153, 0x3d59, 0x7155,
+  0x7157, 0x3533, 0x7156, 0x417b, 0x3833, 0x7159, 0x424d, 0x715a,
+  0x462d, 0x715b, 0x7160, 0x715e, 0x715d, 0x715f, 0x715c, 0x7162,
+  0x7161, 0x7164, 0x3643, 0x7163, 0x7165, 0x7166, 0x7168, 0x7167,
+  0x7169, 0x716b, 0x716a, 0x397c, 0x716c, 0x716d, 0x333c, 0x716e,
+  0x716f, 0x3f71, 0x7170, 0x7171, 0x7172, 0x7173, 0x3962, 0x7174,
+  0x7175, 0x7176, 0x7177, 0x7178, 0x4831, 0x717a, 0x4926, 0x717b,
+  0x7179, 0x717d, 0x717c, 0x717e, 0x7221, 0x7222, 0x7223, 0x7224,
+  0x7225, 0x7226, 0x7227, 0x7228, 0x7229, 0x722a, 0x722b, 0x722c,
+  0x722d, 0x722e, 0x5d35, 0x722f, 0x6478, 0x3534, 0x3321, 0x3a32,
+  0x7231, 0x7230, 0x4c25, 0x7233, 0x7234, 0x7232, 0x7235, 0x4b62,
+  0x7236, 0x357b, 0x4f25, 0x7237, 0x7239, 0x303e, 0x723a, 0x4a2b,
+  0x7238, 0x723b, 0x723c, 0x723d, 0x723e, 0x723f, 0x4b6e, 0x3b2d,
+  0x3a7a, 0x412f, 0x7240, 0x7243, 0x7241, 0x7244, 0x3871, 0x7242,
+  0x7245, 0x7246, 0x7247, 0x724b, 0x3b2a, 0x4264, 0x724c, 0x7249,
+  0x7248, 0x724a, 0x375f, 0x7250, 0x724f, 0x724e, 0x3033, 0x725a,
+  0x7256, 0x7257, 0x7253, 0x7259, 0x7255, 0x3362, 0x4f4c, 0x7258,
+  0x7254, 0x7252, 0x7251, 0x725c, 0x725f, 0x725e, 0x725d, 0x4949,
+  0x725b, 0x3073, 0x7260, 0x7262, 0x336f, 0x724d, 0x3137, 0x7264,
+  0x7263, 0x7261, 0x432d, 0x4b70, 0x4e5a, 0x7265, 0x7266, 0x7267,
+  0x7268, 0x7269, 0x443b, 0x726a, 0x4837, 0x726f, 0x726b, 0x726c,
+  0x4b31, 0x4c44, 0x4650, 0x7270, 0x7271, 0x463e, 0x726e, 0x726d,
+  0x322a, 0x7279, 0x7278, 0x3175, 0x7276, 0x7275, 0x7273, 0x337b,
+  0x7272, 0x3c32, 0x3229, 0x3963, 0x727c, 0x727b, 0x727a, 0x7277,
+  0x727d, 0x727e, 0x7325, 0x7324, 0x7326, 0x312d, 0x7321, 0x7322,
+  0x3974, 0x4c39, 0x7323, 0x4b32, 0x732b, 0x7327, 0x732c, 0x7329,
+  0x7328, 0x375c, 0x732d, 0x732e, 0x732f, 0x732a, 0x7274, 0x7330,
+  0x4461, 0x7334, 0x7335, 0x7333, 0x7332, 0x7338, 0x7331, 0x7336,
+  0x7337, 0x733a, 0x7339, 0x733c, 0x733d, 0x733e, 0x4f49, 0x733b,
+  0x426b, 0x3a6d, 0x733f, 0x7340, 0x7341, 0x7342, 0x7343, 0x3834,
+  0x7344, 0x7345, 0x3c2f, 0x7346, 0x7347, 0x7348, 0x7349, 0x734c,
+  0x734a, 0x4f3c, 0x734b, 0x4e6f, 0x734d, 0x4e5b, 0x734e, 0x477e,
+  0x734f, 0x7351, 0x7352, 0x7350, 0x396d, 0x4c4d, 0x4b63, 0x5677,
+  0x5d60, 0x4b7b, 0x322b, 0x7354, 0x3550, 0x7355, 0x7356, 0x7357,
+  0x3975, 0x7358, 0x6054, 0x4c5b, 0x4263, 0x7359, 0x735b, 0x735a,
+  0x735c, 0x735d, 0x735e, 0x735f, 0x7360, 0x7361, 0x7362, 0x7363,
+  0x7364, 0x7365, 0x7366, 0x7367, 0x7368, 0x4524, 0x385d, 0x736a,
+  0x414d, 0x736b, 0x736c, 0x4921, 0x736d, 0x736e, 0x6337, 0x6c5a,
+  0x706d, 0x736f, 0x7370, 0x7372, 0x7373, 0x7374, 0x4e70, 0x7371,
+  0x7375, 0x7376, 0x7378, 0x7377, 0x737a, 0x737b, 0x7379, 0x4e36,
+  0x737c, 0x737d, 0x6354, 0x737e, 0x212a, 0x2174, 0x2170, 0x2173,
+  0x2175, 0x214a, 0x214b, 0x2176, 0x215c, 0x2124, 0x2125, 0x213f,
+  0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337,
+  0x2338, 0x2339, 0x2127, 0x2128, 0x2163, 0x2161, 0x2164, 0x2129,
+  0x2177, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347,
+  0x2348, 0x2349, 0x234a, 0x234b, 0x234c, 0x234d, 0x234e, 0x234f,
+  0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357,
+  0x2358, 0x2359, 0x235a, 0x214e, 0x214f, 0x2130, 0x2132, 0x212e,
+  0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, 0x2368,
+  0x2369, 0x236a, 0x236b, 0x236c, 0x236d, 0x236e, 0x236f, 0x2370,
+  0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, 0x2378,
+  0x2379, 0x237a, 0x2150, 0x2143, 0x2151, 0x2131, 0x216f,
+};
+
+static const Summary16 jisx0208_uni2indx_page00[16] = {
+  /* 0x0000 */
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x1000 }, {    1, 0x0000 }, {    1, 0x0000 },
+  {    1, 0x0000 }, {    1, 0x0000 }, {    1, 0x118c }, {    6, 0x0053 },
+  {   10, 0x0000 }, {   10, 0x0080 }, {   11, 0x0000 }, {   11, 0x0080 },
+};
+static const Summary16 jisx0208_uni2indx_page03[22] = {
+  /* 0x0300 */
+  {   12, 0x0000 }, {   12, 0x0000 }, {   12, 0x0000 }, {   12, 0x0000 },
+  {   12, 0x0000 }, {   12, 0x0000 }, {   12, 0x0000 }, {   12, 0x0000 },
+  {   12, 0x0000 }, {   12, 0xfffe }, {   27, 0x03fb }, {   36, 0xfffe },
+  {   51, 0x03fb }, {   60, 0x0000 }, {   60, 0x0000 }, {   60, 0x0000 },
+  /* 0x0400 */
+  {   60, 0x0002 }, {   61, 0xffff }, {   77, 0xffff }, {   93, 0xffff },
+  {  109, 0xffff }, {  125, 0x0002 },
+};
+static const Summary16 jisx0208_uni2indx_page20[50] = {
+  /* 0x2000 */
+  {  126, 0x0000 }, {  126, 0x3361 }, {  133, 0x0063 }, {  137, 0x080d },
+  {  141, 0x0000 }, {  141, 0x0000 }, {  141, 0x0000 }, {  141, 0x0000 },
+  {  141, 0x0000 }, {  141, 0x0000 }, {  141, 0x0000 }, {  141, 0x0000 },
+  {  141, 0x0000 }, {  141, 0x0000 }, {  141, 0x0000 }, {  141, 0x0000 },
+  /* 0x2100 */
+  {  141, 0x0008 }, {  142, 0x0000 }, {  142, 0x0800 }, {  143, 0x0000 },
+  {  143, 0x0000 }, {  143, 0x0000 }, {  143, 0x0000 }, {  143, 0x0000 },
+  {  143, 0x0000 }, {  143, 0x000f }, {  147, 0x0000 }, {  147, 0x0000 },
+  {  147, 0x0000 }, {  147, 0x0014 }, {  149, 0x0000 }, {  149, 0x0000 },
+  /* 0x2200 */
+  {  149, 0x098d }, {  155, 0x6404 }, {  159, 0x1f81 }, {  166, 0x2030 },
+  {  169, 0x0000 }, {  169, 0x0004 }, {  170, 0x0cc3 }, {  176, 0x0000 },
+  {  176, 0x00cc }, {  180, 0x0000 }, {  180, 0x0020 }, {  181, 0x0000 },
+  {  181, 0x0000 }, {  181, 0x0000 }, {  181, 0x0000 }, {  181, 0x0000 },
+  /* 0x2300 */
+  {  181, 0x0000 }, {  181, 0x0004 },
+};
+static const Summary16 jisx0208_uni2indx_page25[23] = {
+  /* 0x2500 */
+  {  182, 0x900f }, {  188, 0x3999 }, {  196, 0x9939 }, {  204, 0x9999 },
+  {  212, 0x0804 }, {  214, 0x0000 }, {  214, 0x0000 }, {  214, 0x0000 },
+  {  214, 0x0000 }, {  214, 0x0000 }, {  214, 0x0003 }, {  216, 0x300c },
+  {  220, 0xc8c0 }, {  225, 0x0000 }, {  225, 0x8000 }, {  226, 0x0000 },
+  /* 0x2600 */
+  {  226, 0x0060 }, {  228, 0x0000 }, {  228, 0x0000 }, {  228, 0x0000 },
+  {  228, 0x0005 }, {  230, 0x0000 }, {  230, 0xa400 },
+};
+static const Summary16 jisx0208_uni2indx_page30[16] = {
+  /* 0x3000 */
+  {  233, 0xffef }, {  248, 0x103f }, {  255, 0x0000 }, {  255, 0x0000 },
+  {  255, 0xfffe }, {  270, 0xffff }, {  286, 0xffff }, {  302, 0xffff },
+  {  318, 0xffff }, {  334, 0x780f }, {  342, 0xfffe }, {  357, 0xffff },
+  {  373, 0xffff }, {  389, 0xffff }, {  405, 0xffff }, {  421, 0x787f },
+};
+static const Summary16 jisx0208_uni2indx_page4e[1307] = {
+  /* 0x4e00 */
+  {  432, 0x6f8b }, {  442, 0x43f3 }, {  451, 0x2442 }, {  455, 0x9b46 },
+  {  463, 0xe82c }, {  470, 0xe3e0 }, {  478, 0x0004 }, {  479, 0x400a },
+  {  482, 0x5f65 }, {  492, 0xdb36 }, {  502, 0x7977 }, {  513, 0x0449 },
+  {  517, 0xecd7 }, {  528, 0xe3f0 }, {  537, 0x6038 }, {  542, 0x08c5 },
+  /* 0x4f00 */
+  {  547, 0xe602 }, {  553, 0x3403 }, {  558, 0x8000 }, {  559, 0x3551 },
+  {  566, 0xe0c8 }, {  572, 0x7eab }, {  583, 0x8200 }, {  585, 0x9869 },
+  {  592, 0xa948 }, {  598, 0x2942 }, {  603, 0xe803 }, {  609, 0x8060 },
+  {  612, 0x441c }, {  617, 0xad93 }, {  626, 0xc03a }, {  632, 0x4568 },
+  /* 0x5000 */
+  {  638, 0xaa60 }, {  644, 0x8656 }, {  651, 0x3f7a }, {  662, 0x0240 },
+  {  664, 0x8388 }, {  669, 0x1461 }, {  674, 0x1020 }, {  676, 0x2174 },
+  {  682, 0x2021 }, {  685, 0x0702 }, {  689, 0x3000 }, {  691, 0x40bc },
+  {  697, 0xa624 }, {  703, 0x4462 }, {  708, 0x60a8 }, {  713, 0x0a20 },
+  /* 0x5100 */
+  {  716, 0x0217 }, {  721, 0x8574 }, {  728, 0x0402 }, {  730, 0x9c84 },
+  {  736, 0x7bfb }, {  749, 0x1415 }, {  754, 0x7f24 }, {  763, 0x11e2 },
+  {  769, 0xb665 }, {  778, 0x02ef }, {  786, 0x1f75 }, {  796, 0x20ff },
+  {  805, 0x3a70 }, {  812, 0x3840 }, {  816, 0x26c3 }, {  823, 0x6763 },
+  /* 0x5200 */
+  {  832, 0x4dd9 }, {  841, 0x2092 }, {  845, 0x46b0 }, {  851, 0x0fc9 },
+  {  859, 0xbc98 }, {  867, 0x4850 }, {  871, 0x8638 }, {  877, 0xa03f },
+  {  885, 0x2388 }, {  890, 0x8816 }, {  895, 0x3e09 }, {  902, 0x5232 },
+  {  908, 0x22aa }, {  914, 0xe3a4 }, {  922, 0x00dd }, {  928, 0xc72c },
+  /* 0x5300 */
+  {  936, 0xa166 }, {  943, 0x26e1 }, {  950, 0x840b }, {  955, 0x8f0a },
+  {  962, 0x27eb }, {  972, 0x559e }, {  981, 0xc241 }, {  986, 0x89bb },
+  {  995, 0x0014 }, {  997, 0x8540 }, { 1001, 0x6361 }, { 1008, 0x0849 },
+  { 1012, 0x7f0c }, { 1021, 0x8ad0 }, { 1027, 0xff3e }, { 1040, 0x05cf },
+  /* 0x5400 */
+  { 1048, 0xff1a }, { 1059, 0xa803 }, { 1064, 0x7a41 }, { 1071, 0x7b40 },
+  { 1078, 0x4745 }, { 1085, 0x8002 }, { 1087, 0x0500 }, { 1089, 0x38eb },
+  { 1098, 0xd851 }, { 1105, 0x0005 }, { 1107, 0x9934 }, { 1114, 0x710c },
+  { 1120, 0x0397 }, { 1127, 0x0100 }, { 1128, 0x6366 }, { 1136, 0x2404 },
+  /* 0x5500 */
+  { 1139, 0x80d0 }, { 1143, 0x0051 }, { 1146, 0xc000 }, { 1148, 0x430a },
+  { 1153, 0x9071 }, { 1159, 0x30c8 }, { 1164, 0x0008 }, { 1165, 0x5800 },
+  { 1168, 0x0e99 }, { 1175, 0xf700 }, { 1182, 0x5f80 }, { 1189, 0x0041 },
+  { 1191, 0x00b0 }, { 1194, 0x9410 }, { 1198, 0x0018 }, { 1200, 0x6280 },
+  /* 0x5600 */
+  { 1204, 0x0240 }, { 1206, 0x09d0 }, { 1211, 0x8200 }, { 1213, 0x0156 },
+  { 1218, 0x5004 }, { 1221, 0x0801 }, { 1223, 0x1d10 }, { 1228, 0x0510 },
+  { 1231, 0x84c1 }, { 1236, 0x0010 }, { 1237, 0x4025 }, { 1241, 0x1050 },
+  { 1244, 0x410f }, { 1250, 0x4d8a }, { 1257, 0x4009 }, { 1260, 0xa60d },
+  /* 0x5700 */
+  { 1267, 0xab19 }, { 1275, 0x914c }, { 1281, 0x21c0 }, { 1285, 0x0981 },
+  { 1289, 0xc485 }, { 1295, 0x0003 }, { 1297, 0x0652 }, { 1302, 0x8000 },
+  { 1303, 0x0b04 }, { 1307, 0x0008 }, { 1308, 0x041d }, { 1313, 0x0009 },
+  { 1315, 0x4849 }, { 1320, 0x905c }, { 1326, 0x0009 }, { 1328, 0x1690 },
+  /* 0x5800 */
+  { 1333, 0x0c65 }, { 1339, 0x2220 }, { 1342, 0x8412 }, { 1346, 0x2433 },
+  { 1352, 0x0c03 }, { 1356, 0x4796 }, { 1364, 0x0a04 }, { 1367, 0x4225 },
+  { 1372, 0x0028 }, { 1374, 0x9088 }, { 1378, 0x4900 }, { 1381, 0x4f08 },
+  { 1387, 0x14a2 }, { 1392, 0xd3aa }, { 1401, 0xd830 }, { 1407, 0x3e87 },
+  /* 0x5900 */
+  { 1416, 0x8604 }, { 1420, 0x1f61 }, { 1428, 0x7ea4 }, { 1437, 0x4186 },
+  { 1442, 0xc390 }, { 1448, 0x05b3 }, { 1455, 0x57a5 }, { 1464, 0x2118 },
+  { 1468, 0x241e }, { 1474, 0x2a48 }, { 1479, 0x1128 }, { 1483, 0x4a04 },
+  { 1487, 0x0a40 }, { 1490, 0x161b }, { 1497, 0x0d60 }, { 1502, 0x8840 },
+  /* 0x5a00 */
+  { 1505, 0x020a }, { 1508, 0x9502 }, { 1513, 0x8221 }, { 1517, 0x1060 },
+  { 1520, 0x0243 }, { 1524, 0x0400 }, { 1525, 0x1444 }, { 1529, 0x8000 },
+  { 1530, 0x0000 }, { 1530, 0x0c04 }, { 1533, 0x0000 }, { 1533, 0x7000 },
+  { 1536, 0x1a06 }, { 1541, 0x00c1 }, { 1544, 0x024a }, { 1548, 0x0c00 },
+  /* 0x5b00 */
+  { 1550, 0x1a00 }, { 1553, 0x0040 }, { 1554, 0x1404 }, { 1557, 0x4045 },
+  { 1561, 0x0029 }, { 1564, 0xbdb3 }, { 1575, 0x0a78 }, { 1581, 0x052b },
+  { 1587, 0xbba9 }, { 1597, 0xbfa0 }, { 1606, 0x407c }, { 1612, 0x8379 },
+  { 1620, 0x12fc }, { 1628, 0xe81d }, { 1636, 0x4bf6 }, { 1646, 0xc569 },
+  /* 0x5c00 */
+  { 1654, 0xeff6 }, { 1667, 0x044a }, { 1671, 0x2115 }, { 1676, 0xff02 },
+  { 1685, 0xed63 }, { 1695, 0x402b }, { 1700, 0xd033 }, { 1707, 0x0242 },
+  { 1710, 0x1000 }, { 1711, 0x0013 }, { 1714, 0x1b02 }, { 1719, 0x59ca },
+  { 1727, 0x00a0 }, { 1729, 0x0200 }, { 1730, 0xa703 }, { 1737, 0x2c41 },
+  /* 0x5d00 */
+  { 1742, 0x4880 }, { 1745, 0x8ff2 }, { 1755, 0x0204 }, { 1757, 0x0000 },
+  { 1757, 0x5800 }, { 1760, 0x1005 }, { 1763, 0x9200 }, { 1766, 0x0048 },
+  { 1768, 0x1894 }, { 1773, 0x2001 }, { 1775, 0x5004 }, { 1778, 0x3480 },
+  { 1782, 0x3200 }, { 1785, 0x684c }, { 1791, 0x49ea }, { 1799, 0x68be },
+  /* 0x5e00 */
+  { 1808, 0x184c }, { 1813, 0x2e42 }, { 1819, 0xa820 }, { 1823, 0x21c9 },
+  { 1829, 0x50b9 }, { 1836, 0x80b0 }, { 1840, 0x001e }, { 1844, 0xff7c },
+  { 1857, 0x849a }, { 1863, 0x14e0 }, { 1868, 0x28c1 }, { 1873, 0x01e0 },
+  { 1877, 0x870e }, { 1884, 0xac49 }, { 1891, 0x130f }, { 1898, 0xdddb },
+  /* 0x5f00 */
+  { 1910, 0xbe1a }, { 1919, 0x89fb }, { 1929, 0xa2e0 }, { 1935, 0x51a2 },
+  { 1941, 0x5502 }, { 1946, 0x32ca }, { 1953, 0x3e46 }, { 1961, 0x928b },
+  { 1968, 0x1dbf }, { 1979, 0x438f }, { 1987, 0x6703 }, { 1994, 0x3218 },
+  { 1999, 0x3028 }, { 2003, 0x33c0 }, { 2009, 0x0811 }, { 2012, 0xa923 },
+  /* 0x6000 */
+  { 2019, 0xc000 }, { 2021, 0x3a65 }, { 2029, 0x8fe3 }, { 2039, 0x0402 },
+  { 2041, 0x2c4e }, { 2048, 0x8625 }, { 2054, 0xbf3d }, { 2066, 0x00a1 },
+  { 2069, 0x3a1a }, { 2076, 0x8cd4 }, { 2083, 0x06c9 }, { 2089, 0x317c },
+  { 2097, 0x00e0 }, { 2100, 0x950a }, { 2106, 0x018b }, { 2111, 0x0edb },
+  /* 0x6100 */
+  { 2120, 0xe34b }, { 2129, 0x8c20 }, { 2133, 0x1182 }, { 2137, 0xf010 },
+  { 2142, 0x7d94 }, { 2151, 0xa728 }, { 2158, 0xc9ac }, { 2166, 0x40fb },
+  { 2174, 0x4484 }, { 2178, 0x0653 }, { 2184, 0x5a90 }, { 2190, 0x4444 },
+  { 2194, 0x3fc8 }, { 2203, 0x0001 }, { 2204, 0x0048 }, { 2206, 0xf5d4 },
+  /* 0x6200 */
+  { 2216, 0x7701 }, { 2223, 0xec57 }, { 2233, 0xc442 }, { 2238, 0x891d },
+  { 2245, 0x6b83 }, { 2253, 0x4928 }, { 2258, 0x4109 }, { 2262, 0xd242 },
+  { 2268, 0x061d }, { 2274, 0x59fe }, { 2285, 0x1800 }, { 2287, 0x3a22 },
+  { 2293, 0xb7e4 }, { 2303, 0x3b9f }, { 2314, 0xf003 }, { 2320, 0xc0ea },
+  /* 0x6300 */
+  { 2327, 0x1386 }, { 2333, 0x8202 }, { 2336, 0x8980 }, { 2340, 0xe400 },
+  { 2344, 0xb200 }, { 2348, 0x10a1 }, { 2352, 0x4b80 }, { 2357, 0x0cc4 },
+  { 2362, 0xd309 }, { 2369, 0x8944 }, { 2374, 0x1faf }, { 2385, 0x4834 },
+  { 2390, 0x8259 }, { 2396, 0x0c45 }, { 2401, 0x420a }, { 2405, 0x0450 },
+  /* 0x6400 */
+  { 2408, 0xa040 }, { 2411, 0x10c8 }, { 2415, 0x3140 }, { 2419, 0x4450 },
+  { 2423, 0x4004 }, { 2425, 0x0100 }, { 2426, 0x8280 }, { 2429, 0x0540 },
+  { 2432, 0x0108 }, { 2434, 0x442c }, { 2439, 0x6a30 }, { 2445, 0x1a05 },
+  { 2450, 0x20a6 }, { 2455, 0x0514 }, { 2459, 0x90cf }, { 2467, 0x6456 },
+  /* 0x6500 */
+  { 2474, 0x0021 }, { 2476, 0x3100 }, { 2479, 0x9c18 }, { 2485, 0xcbf0 },
+  { 2494, 0xa120 }, { 2498, 0x63e2 }, { 2506, 0x104c }, { 2510, 0x01b5 },
+  { 2516, 0x538c }, { 2523, 0x9a83 }, { 2530, 0xb8b2 }, { 2538, 0x3281 },
+  { 2543, 0x987a }, { 2551, 0x0a84 }, { 2555, 0x33e7 }, { 2565, 0x0c02 },
+  /* 0x6600 */
+  { 2568, 0xd4cc }, { 2576, 0x9018 }, { 2580, 0xa1a1 }, { 2586, 0x9070 },
+  { 2591, 0x8a1e }, { 2598, 0xe004 }, { 2602, 0xc3d4 }, { 2610, 0x0451 },
+  { 2614, 0x439a }, { 2621, 0x21c2 }, { 2626, 0x4844 }, { 2630, 0x5310 },
+  { 2635, 0x0292 }, { 2639, 0x3640 }, { 2644, 0x0241 }, { 2647, 0xf3bd },
+  /* 0x6700 */
+  { 2659, 0xab09 }, { 2666, 0xe8f0 }, { 2674, 0x7dc0 }, { 2682, 0xa5d2 },
+  { 2690, 0xc242 }, { 2695, 0xd24b }, { 2703, 0xa43f }, { 2712, 0xd0af },
+  { 2721, 0x1aa0 }, { 2726, 0x34a1 }, { 2732, 0x8247 }, { 2738, 0x03d8 },
+  { 2744, 0xc452 }, { 2750, 0x651b }, { 2758, 0xd294 }, { 2765, 0xc83a },
+  /* 0x6800 */
+  { 2772, 0x001c }, { 2775, 0x40c8 }, { 2779, 0x0e06 }, { 2784, 0x3314 },
+  { 2790, 0x614f }, { 2798, 0xb21b }, { 2806, 0x0088 }, { 2808, 0xc0d0 },
+  { 2813, 0xa02a }, { 2818, 0xa898 }, { 2824, 0xa1c5 }, { 2831, 0x166b },
+  { 2839, 0x2e50 }, { 2845, 0x85b4 }, { 2852, 0xc08b }, { 2858, 0x0604 },
+  /* 0x6900 */
+  { 2861, 0xf933 }, { 2871, 0x1e04 }, { 2876, 0x056e }, { 2883, 0xa251 },
+  { 2889, 0x0400 }, { 2890, 0x7638 }, { 2898, 0xec07 }, { 2906, 0x73b8 },
+  { 2915, 0x4406 }, { 2919, 0x1832 }, { 2924, 0x4081 }, { 2927, 0xc816 },
+  { 2933, 0x7c8a }, { 2941, 0x6309 }, { 2947, 0x2980 }, { 2951, 0xaa04 },
+  /* 0x6a00 */
+  { 2956, 0x1c24 }, { 2961, 0xca9c }, { 2969, 0x4e0e }, { 2976, 0x2760 },
+  { 2982, 0x0990 }, { 2986, 0x8300 }, { 2989, 0x0046 }, { 2992, 0x8104 },
+  { 2995, 0x6011 }, { 2999, 0x1081 }, { 3002, 0x540d }, { 3008, 0x0908 },
+  { 3011, 0x000e }, { 3014, 0xcc0a }, { 3020, 0x0500 }, { 3022, 0x0c00 },
+  /* 0x6b00 */
+  { 3024, 0x0430 }, { 3027, 0xa044 }, { 3031, 0x008b }, { 3035, 0x6784 },
+  { 3042, 0x5288 }, { 3047, 0x8a19 }, { 3053, 0x865e }, { 3061, 0x8b18 },
+  { 3067, 0x2e59 }, { 3075, 0x4160 }, { 3079, 0x8c10 }, { 3083, 0x9cbe },
+  { 3093, 0x6861 }, { 3099, 0x891c }, { 3105, 0x9800 }, { 3108, 0x0008 },
+  /* 0x6c00 */
+  { 3109, 0x8100 }, { 3111, 0x089a }, { 3116, 0x0018 }, { 3118, 0x4190 },
+  { 3122, 0x4007 }, { 3126, 0xe4a1 }, { 3133, 0x0505 }, { 3137, 0x640d },
+  { 3143, 0x310e }, { 3149, 0x0e4d }, { 3156, 0x4806 }, { 3160, 0xff0a },
+  { 3170, 0x1632 }, { 3176, 0x2aa8 }, { 3182, 0x852e }, { 3189, 0x000b },
+  /* 0x6d00 */
+  { 3192, 0x1800 }, { 3194, 0xca84 }, { 3200, 0x0e20 }, { 3204, 0x696c },
+  { 3212, 0x0032 }, { 3215, 0x1600 }, { 3218, 0x5658 }, { 3225, 0x0390 },
+  { 3229, 0x5120 }, { 3233, 0x1a28 }, { 3238, 0x8000 }, { 3239, 0x1124 },
+  { 3243, 0x18e1 }, { 3249, 0x4326 }, { 3255, 0x5d52 }, { 3263, 0x0eaa },
+  /* 0x6e00 */
+  { 3270, 0x0fa0 }, { 3276, 0xae28 }, { 3283, 0xfa7b }, { 3295, 0x4500 },
+  { 3298, 0x6408 }, { 3302, 0x8940 }, { 3306, 0xc880 }, { 3310, 0xc044 },
+  { 3314, 0x9005 }, { 3318, 0xb141 }, { 3324, 0x8424 }, { 3328, 0x24c4 },
+  { 3333, 0x1a34 }, { 3339, 0x603a }, { 3345, 0x9000 }, { 3347, 0xc194 },
+  /* 0x6f00 */
+  { 3353, 0x8246 }, { 3358, 0x003a }, { 3362, 0x180d }, { 3367, 0xc106 },
+  { 3372, 0x0022 }, { 3374, 0x9910 }, { 3379, 0xe050 }, { 3384, 0x1511 },
+  { 3389, 0x4057 }, { 3395, 0x0082 }, { 3397, 0x041a }, { 3401, 0x020a },
+  { 3404, 0x004f }, { 3409, 0x8930 }, { 3414, 0xd813 }, { 3421, 0x444a },
+  /* 0x7000 */
+  { 3426, 0x8a02 }, { 3430, 0xed22 }, { 3438, 0x10c0 }, { 3441, 0x4005 },
+  { 3444, 0x1000 }, { 3445, 0x0102 }, { 3447, 0x8808 }, { 3450, 0x3101 },
+  { 3454, 0x4600 }, { 3457, 0x0204 }, { 3459, 0xf000 }, { 3463, 0x0708 },
+  { 3467, 0x8900 }, { 3470, 0xa200 }, { 3473, 0x0000 }, { 3473, 0x2202 },
+  /* 0x7100 */
+  { 3476, 0x0200 }, { 3477, 0x1610 }, { 3481, 0x0042 }, { 3483, 0x1040 },
+  { 3485, 0x5200 }, { 3488, 0x0260 }, { 3491, 0x52f4 }, { 3499, 0x2000 },
+  { 3500, 0x8510 }, { 3504, 0x8230 }, { 3508, 0x1100 }, { 3510, 0x4202 },
+  { 3513, 0x4308 }, { 3517, 0x80b5 }, { 3523, 0x70e1 }, { 3530, 0x9a20 },
+  /* 0x7200 */
+  { 3535, 0x2040 }, { 3537, 0x0801 }, { 3539, 0x3500 }, { 3543, 0xfc65 },
+  { 3553, 0x19c1 }, { 3559, 0xab04 }, { 3565, 0x0286 }, { 3569, 0x6214 },
+  { 3574, 0x0087 }, { 3578, 0x0044 }, { 3580, 0x9085 }, { 3585, 0x0244 },
+  { 3588, 0x405c }, { 3593, 0x0a85 }, { 3598, 0x3207 }, { 3604, 0x3380 },
+  /* 0x7300 */
+  { 3609, 0x0400 }, { 3610, 0xb8c0 }, { 3616, 0xce20 }, { 3622, 0xc0d0 },
+  { 3627, 0xc030 }, { 3631, 0x0080 }, { 3632, 0x0508 }, { 3635, 0x0d25 },
+  { 3641, 0x0a90 }, { 3645, 0x0040 }, { 3646, 0x0200 }, { 3647, 0x080c },
+  { 3650, 0x6505 }, { 3656, 0x4000 }, { 3657, 0x6421 }, { 3662, 0x4102 },
+  /* 0x7400 */
+  { 3665, 0x0268 }, { 3669, 0x0000 }, { 3669, 0x0024 }, { 3671, 0x847c },
+  { 3678, 0x0002 }, { 3679, 0xde20 }, { 3686, 0x8619 }, { 3692, 0x4049 },
+  { 3696, 0x0808 }, { 3698, 0x4000 }, { 3699, 0x0084 }, { 3701, 0x2001 },
+  { 3703, 0x8400 }, { 3705, 0x1010 }, { 3707, 0x42cd }, { 3714, 0x01c7 },
+  /* 0x7500 */
+  { 3720, 0x7038 }, { 3726, 0xd52a }, { 3734, 0x1968 }, { 3740, 0x1d8f },
+  { 3749, 0xbe50 }, { 3757, 0x3e12 }, { 3764, 0x2ef5 }, { 3774, 0x81d9 },
+  { 3781, 0xcec4 }, { 3789, 0x2412 }, { 3793, 0x0828 }, { 3796, 0x732e },
+  { 3805, 0x24ac }, { 3811, 0x4b34 }, { 3818, 0x020c }, { 3821, 0xd41d },
+  /* 0x7600 */
+  { 3829, 0x2a02 }, { 3833, 0x8000 }, { 3834, 0x0097 }, { 3839, 0x0811 },
+  { 3842, 0x11c4 }, { 3847, 0x1144 }, { 3851, 0x1786 }, { 3858, 0x7d45 },
+  { 3867, 0x49d9 }, { 3875, 0x0649 }, { 3880, 0x4000 }, { 3881, 0x8791 },
+  { 3888, 0x254c }, { 3894, 0xd8c4 }, { 3901, 0x44ba }, { 3908, 0x4914 },
+  /* 0x7700 */
+  { 3913, 0x1b92 }, { 3920, 0xc800 }, { 3923, 0x0271 }, { 3928, 0x1580 },
+  { 3932, 0x0081 }, { 3934, 0x0c00 }, { 3936, 0x096a }, { 3942, 0xc200 },
+  { 3945, 0x4800 }, { 3947, 0x4002 }, { 3949, 0x3021 }, { 3953, 0xba49 },
+  { 3961, 0x2080 }, { 3963, 0x1c80 }, { 3967, 0xe2ac }, { 3975, 0x1008 },
+  /* 0x7800 */
+  { 3977, 0x1004 }, { 3979, 0x0034 }, { 3982, 0x00e1 }, { 3986, 0x8414 },
+  { 3990, 0x0020 }, { 3991, 0x2000 }, { 3992, 0x9800 }, { 3995, 0x1014 },
+  { 3998, 0x70c2 }, { 4004, 0x04aa }, { 4009, 0x8688 }, { 4014, 0x5420 },
+  { 4018, 0x0c62 }, { 4023, 0x0413 }, { 4027, 0x9180 }, { 4031, 0x2010 },
+  /* 0x7900 */
+  { 4033, 0x4082 }, { 4036, 0x0206 }, { 4039, 0x1c40 }, { 4043, 0x5400 },
+  { 4046, 0x0383 }, { 4051, 0xe4e9 }, { 4060, 0x2125 }, { 4065, 0x8480 },
+  { 4068, 0xe433 }, { 4076, 0x2000 }, { 4077, 0x44c0 }, { 4081, 0xe609 },
+  { 4088, 0x0a03 }, { 4092, 0x8126 }, { 4097, 0x12da }, { 4104, 0x0801 },
+  /* 0x7a00 */
+  { 4106, 0x6901 }, { 4111, 0x9790 }, { 4118, 0x4001 }, { 4120, 0xf886 },
+  { 4128, 0xe24d }, { 4136, 0x0081 }, { 4138, 0x0a0e }, { 4143, 0xa651 },
+  { 4150, 0x011a }, { 4154, 0x81ec }, { 4161, 0xc600 }, { 4165, 0x8441 },
+  { 4169, 0xadb8 }, { 4178, 0xb62c }, { 4186, 0xa46f }, { 4195, 0x8741 },
+  /* 0x7b00 */
+  { 4201, 0x8d54 }, { 4208, 0x4b02 }, { 4213, 0x1161 }, { 4218, 0x0268 },
+  { 4222, 0xbb60 }, { 4230, 0x2057 }, { 4236, 0x50a0 }, { 4240, 0x0433 },
+  { 4245, 0xa8c0 }, { 4250, 0xb7b4 }, { 4260, 0x2402 }, { 4263, 0x0112 },
+  { 4266, 0x9ad3 }, { 4275, 0x2000 }, { 4276, 0x2271 }, { 4282, 0x00c8 },
+  /* 0x7c00 */
+  { 4285, 0x2081 }, { 4288, 0x809e }, { 4294, 0x0c8a }, { 4299, 0xe180 },
+  { 4304, 0xb009 }, { 4309, 0x8151 }, { 4314, 0x1031 }, { 4318, 0x4028 },
+  { 4321, 0x2a0e }, { 4327, 0x89a5 }, { 4334, 0x69b6 }, { 4343, 0x620e },
+  { 4349, 0x4425 }, { 4354, 0xd144 }, { 4360, 0x8085 }, { 4364, 0x4d54 },
+  /* 0x7d00 */
+  { 4371, 0x2c75 }, { 4379, 0x1fb1 }, { 4388, 0xd807 }, { 4395, 0x862d },
+  { 4402, 0xd87c }, { 4411, 0x4841 }, { 4415, 0x414e }, { 4421, 0x226e },
+  { 4428, 0x8200 }, { 4430, 0x9e08 }, { 4436, 0xf80c }, { 4443, 0xed37 },
+  { 4454, 0x8c80 }, { 4458, 0x7526 }, { 4466, 0x9313 }, { 4473, 0x0814 },
+  /* 0x7e00 */
+  { 4476, 0x0e32 }, { 4482, 0xc804 }, { 4486, 0x484e }, { 4492, 0x6ea6 },
+  { 4501, 0x2c4a }, { 4507, 0x6670 }, { 4514, 0x26c0 }, { 4519, 0xba01 },
+  { 4525, 0xd30c }, { 4532, 0x185d }, { 4539, 0x0000 }, { 4539, 0x0000 },
+  { 4539, 0x0000 }, { 4539, 0x0000 }, { 4539, 0x0000 }, { 4539, 0x0000 },
+  /* 0x7f00 */
+  { 4539, 0x0000 }, { 4539, 0x0000 }, { 4539, 0x0000 }, { 4539, 0x0540 },
+  { 4542, 0x7020 }, { 4546, 0x8133 }, { 4552, 0x4f81 }, { 4559, 0x03a5 },
+  { 4565, 0x55ec }, { 4574, 0x6410 }, { 4578, 0xc318 }, { 4584, 0x2344 },
+  { 4589, 0x1462 }, { 4594, 0x0034 }, { 4597, 0x0a43 }, { 4602, 0x1a09 },
+  /* 0x8000 */
+  { 4607, 0x187b }, { 4615, 0x13a5 }, { 4622, 0x0102 }, { 4624, 0xa848 },
+  { 4629, 0x0440 }, { 4631, 0xc544 }, { 4637, 0x8106 }, { 4641, 0xe2dd },
+  { 4651, 0x1af0 }, { 4658, 0x2d48 }, { 4664, 0xb626 }, { 4672, 0x0416 },
+  { 4676, 0x5058 }, { 4681, 0x6e40 }, { 4687, 0x8032 }, { 4691, 0x3112 },
+  /* 0x8100 */
+  { 4696, 0x07e4 }, { 4703, 0x0c00 }, { 4705, 0x8208 }, { 4708, 0x420a },
+  { 4712, 0x4840 }, { 4715, 0x803b }, { 4721, 0x4860 }, { 4725, 0x8713 },
+  { 4732, 0x850d }, { 4738, 0x3428 }, { 4743, 0x0319 }, { 4748, 0xe529 },
+  { 4756, 0x2345 }, { 4762, 0x870a }, { 4768, 0x25a9 }, { 4775, 0x5c18 },
+  /* 0x8200 */
+  { 4781, 0x77a6 }, { 4791, 0xd9c5 }, { 4800, 0x5e00 }, { 4805, 0x03e8 },
+  { 4811, 0x0081 }, { 4813, 0xa700 }, { 4818, 0xcd54 }, { 4826, 0x41c6 },
+  { 4832, 0x2800 }, { 4834, 0xa204 }, { 4838, 0xb860 }, { 4844, 0x2b0a },
+  { 4850, 0x0020 }, { 4851, 0xda9e }, { 4861, 0x08ea }, { 4867, 0x0e1a },
+  /* 0x8300 */
+  { 4873, 0x427c }, { 4880, 0x11c0 }, { 4884, 0x8908 }, { 4888, 0x0376 },
+  { 4895, 0x8621 }, { 4900, 0x0105 }, { 4903, 0x0000 }, { 4903, 0x18a8 },
+  { 4908, 0x46a0 }, { 4913, 0xc448 }, { 4918, 0x0d05 }, { 4923, 0x2022 },
+  { 4926, 0x5422 }, { 4931, 0x9148 }, { 4936, 0x8a01 }, { 4940, 0x2897 },
+  /* 0x8400 */
+  { 4947, 0x7898 }, { 4954, 0x0008 }, { 4955, 0x1605 }, { 4960, 0x3122 },
+  { 4965, 0x4240 }, { 4968, 0x0880 }, { 4970, 0xfa4e }, { 4980, 0x06a2 },
+  { 4985, 0x0814 }, { 4988, 0x9211 }, { 4993, 0x2002 }, { 4995, 0x9b04 },
+  { 5001, 0x2e52 }, { 5008, 0x0643 }, { 5013, 0x5000 }, { 5015, 0x9010 },
+  /* 0x8500 */
+  { 5018, 0x0041 }, { 5020, 0x85ba }, { 5028, 0x3042 }, { 5032, 0x2020 },
+  { 5034, 0x4f0b }, { 5042, 0x05a0 }, { 5046, 0x2708 }, { 5051, 0x4080 },
+  { 5053, 0x0591 }, { 5058, 0x1a93 }, { 5065, 0xdf50 }, { 5074, 0x0600 },
+  { 5076, 0xa202 }, { 5080, 0x3021 }, { 5084, 0x0630 }, { 5088, 0x4e80 },
+  /* 0x8600 */
+  { 5093, 0x0cc4 }, { 5098, 0x04c8 }, { 5102, 0xa004 }, { 5105, 0x8001 },
+  { 5107, 0x6000 }, { 5109, 0xd431 }, { 5116, 0x0880 }, { 5118, 0x0a02 },
+  { 5121, 0x1c00 }, { 5124, 0x0028 }, { 5126, 0x8e18 }, { 5132, 0x0041 },
+  { 5134, 0x6ad0 }, { 5141, 0xca10 }, { 5146, 0xf210 }, { 5152, 0x4b00 },
+  /* 0x8700 */
+  { 5156, 0x274d }, { 5164, 0x1506 }, { 5169, 0x0220 }, { 5171, 0x8890 },
+  { 5175, 0x5a00 }, { 5179, 0x82a8 }, { 5184, 0x4549 }, { 5190, 0x8150 },
+  { 5194, 0x2004 }, { 5196, 0x8000 }, { 5197, 0x8804 }, { 5200, 0x2c08 },
+  { 5204, 0x08d1 }, { 5209, 0x0005 }, { 5211, 0x8001 }, { 5213, 0x4ac4 },
+  /* 0x8800 */
+  { 5219, 0xe020 }, { 5223, 0x0062 }, { 5226, 0x008e }, { 5230, 0x0a42 },
+  { 5234, 0x3055 }, { 5240, 0x6a8c }, { 5247, 0x090e }, { 5252, 0xe0a5 },
+  { 5259, 0x2906 }, { 5264, 0x42c4 }, { 5269, 0x4814 }, { 5273, 0x80b3 },
+  { 5279, 0x803e }, { 5285, 0xb330 }, { 5292, 0x0102 }, { 5294, 0x731c },
+  /* 0x8900 */
+  { 5302, 0x1494 }, { 5307, 0x600d }, { 5312, 0x0c20 }, { 5315, 0x0940 },
+  { 5318, 0x301a }, { 5323, 0xc040 }, { 5326, 0xa451 }, { 5332, 0xc094 },
+  { 5337, 0x8dca }, { 5345, 0x05c8 }, { 5350, 0x96c2 }, { 5357, 0xa40c },
+  { 5362, 0x0001 }, { 5363, 0x3404 }, { 5367, 0x00c8 }, { 5370, 0x0110 },
+  /* 0x8a00 */
+  { 5372, 0x550d }, { 5379, 0xa9c9 }, { 5387, 0x2428 }, { 5391, 0x1c5a },
+  { 5398, 0x0142 }, { 5401, 0x4837 }, { 5408, 0x7a4d }, { 5417, 0x100f },
+  { 5422, 0x32b4 }, { 5429, 0x452a }, { 5435, 0x317b }, { 5444, 0x9205 },
+  { 5449, 0xb894 }, { 5456, 0x5c44 }, { 5462, 0x68d7 }, { 5471, 0x458a },
+  /* 0x8b00 */
+  { 5477, 0x5097 }, { 5484, 0x2ed1 }, { 5492, 0x1943 }, { 5498, 0x4208 },
+  { 5501, 0xd202 }, { 5506, 0x9d40 }, { 5512, 0x9840 }, { 5516, 0x2097 },
+  { 5522, 0x5409 }, { 5527, 0x064d }, { 5533, 0x0000 }, { 5533, 0x0000 },
+  { 5533, 0x0000 }, { 5533, 0x0000 }, { 5533, 0x0000 }, { 5533, 0x0000 },
+  /* 0x8c00 */
+  { 5533, 0x0000 }, { 5533, 0x0000 }, { 5533, 0x0000 }, { 5533, 0x8480 },
+  { 5536, 0x5542 }, { 5542, 0x0421 }, { 5545, 0x1c06 }, { 5550, 0x1700 },
+  { 5554, 0x7624 }, { 5561, 0x6110 }, { 5565, 0xff87 }, { 5577, 0xb9dd },
+  { 5588, 0x659f }, { 5598, 0x5c0a }, { 5604, 0x245d }, { 5611, 0x3c00 },
+  /* 0x8d00 */
+  { 5615, 0xadb0 }, { 5623, 0x0059 }, { 5627, 0x0000 }, { 5627, 0x0000 },
+  { 5627, 0x0000 }, { 5627, 0x0000 }, { 5627, 0x28d0 }, { 5632, 0x009b },
+  { 5637, 0x0422 }, { 5640, 0x0200 }, { 5641, 0x0108 }, { 5643, 0x4408 },
+  { 5646, 0x9804 }, { 5650, 0xac40 }, { 5655, 0x8d0a }, { 5661, 0x9028 },
+  /* 0x8e00 */
+  { 5665, 0x8700 }, { 5669, 0xe001 }, { 5673, 0x0400 }, { 5674, 0x0031 },
+  { 5677, 0x1794 }, { 5684, 0x8221 }, { 5688, 0x0019 }, { 5691, 0x1054 },
+  { 5695, 0x2cb2 }, { 5702, 0x021a }, { 5706, 0x9c02 }, { 5711, 0x4003 },
+  { 5714, 0x3d60 }, { 5721, 0x8804 }, { 5724, 0x080c }, { 5727, 0x7900 },
+  /* 0x8f00 */
+  { 5732, 0x1628 }, { 5737, 0xba3c }, { 5746, 0x8640 }, { 5750, 0xcb08 },
+  { 5756, 0x7274 }, { 5764, 0x9080 }, { 5767, 0x001e }, { 5771, 0x0000 },
+  { 5771, 0x0000 }, { 5771, 0xd800 }, { 5775, 0xe188 }, { 5781, 0x9c87 },
+  { 5789, 0x4034 }, { 5793, 0x0412 }, { 5796, 0xae64 }, { 5804, 0x2791 },
+  /* 0x9000 */
+  { 5811, 0xe86b }, { 5820, 0xe6fb }, { 5832, 0x408f }, { 5838, 0x5366 },
+  { 5846, 0xeea6 }, { 5856, 0x537f }, { 5867, 0xe32b }, { 5876, 0xb5e4 },
+  { 5885, 0x869f }, { 5894, 0x0002 }, { 5895, 0x8548 }, { 5900, 0x0122 },
+  { 5903, 0x4402 }, { 5906, 0x0800 }, { 5907, 0x2116 }, { 5912, 0x20a0 },
+  /* 0x9100 */
+  { 5915, 0x0004 }, { 5916, 0x0204 }, { 5918, 0x2000 }, { 5919, 0x0005 },
+  { 5921, 0x7e00 }, { 5927, 0x0154 }, { 5931, 0x162c }, { 5937, 0x01ac },
+  { 5942, 0x2a84 }, { 5947, 0x1085 }, { 5951, 0x8c14 }, { 5956, 0x0530 },
+  { 5960, 0xfbc3 }, { 5971, 0xb943 }, { 5979, 0x00ca }, { 5983, 0x9060 },
+  /* 0x9200 */
+  { 5987, 0x6000 }, { 5989, 0x4032 }, { 5993, 0x1200 }, { 5995, 0x8090 },
+  { 5998, 0x0b30 }, { 6003, 0x4c81 }, { 6008, 0x0054 }, { 6011, 0x4002 },
+  { 6013, 0x0029 }, { 6016, 0x1d6a }, { 6024, 0x2000 }, { 6025, 0x0280 },
+  { 6027, 0x8000 }, { 6028, 0x0004 }, { 6029, 0x2610 }, { 6033, 0x150c },
+  /* 0x9300 */
+  { 6038, 0x8040 }, { 6040, 0x0701 }, { 6044, 0xd94d }, { 6053, 0x0c24 },
+  { 6057, 0x2810 }, { 6060, 0x1850 }, { 6064, 0x5001 }, { 6067, 0x5020 },
+  { 6070, 0x1000 }, { 6071, 0x04d0 }, { 6075, 0x7080 }, { 6079, 0x0201 },
+  { 6081, 0x0108 }, { 6083, 0x21c3 }, { 6089, 0x0132 }, { 6093, 0x0000 },
+  /* 0x9400 */
+  { 6093, 0x0088 }, { 6095, 0x0719 }, { 6101, 0x0802 }, { 6103, 0x0560 },
+  { 6107, 0x0012 }, { 6109, 0x4c0e }, { 6115, 0x0405 }, { 6118, 0xf0a1 },
+  { 6125, 0x0002 }, { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0000 },
+  { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0000 },
+  /* 0x9500 */
+  { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0000 },
+  { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0000 }, { 6126, 0x0080 },
+  { 6127, 0x8e8d }, { 6135, 0x035a }, { 6141, 0x21bd }, { 6149, 0x5a04 },
+  { 6154, 0x3488 }, { 6159, 0x1170 }, { 6164, 0x0026 }, { 6167, 0x0000 },
+  /* 0x9600 */
+  { 6167, 0x0000 }, { 6167, 0x1000 }, { 6168, 0xc502 }, { 6173, 0x8804 },
+  { 6176, 0xb815 }, { 6183, 0xf801 }, { 6189, 0x147c }, { 6196, 0x25ed },
+  { 6205, 0xed60 }, { 6213, 0x1bb0 }, { 6220, 0x0589 }, { 6225, 0x1bd7 },
+  { 6235, 0x7af3 }, { 6246, 0x1a62 }, { 6252, 0x0d0c }, { 6257, 0x0ac5 },
+  /* 0x9700 */
+  { 6263, 0xe5d1 }, { 6272, 0x524a }, { 6278, 0x0490 }, { 6281, 0x6305 },
+  { 6287, 0x0354 }, { 6292, 0x5244 }, { 6297, 0x2b57 }, { 6306, 0x1612 },
+  { 6311, 0xa872 }, { 6318, 0x1101 }, { 6321, 0x2949 }, { 6327, 0x0018 },
+  { 6329, 0x0948 }, { 6333, 0x1008 }, { 6335, 0x6000 }, { 6337, 0x886c },
+  /* 0x9800 */
+  { 6343, 0x916e }, { 6351, 0x058f }, { 6358, 0x3012 }, { 6362, 0x3990 },
+  { 6368, 0xf840 }, { 6374, 0x4930 }, { 6379, 0x8880 }, { 6382, 0x001b },
+  { 6386, 0x0000 }, { 6386, 0x0000 }, { 6386, 0x8500 }, { 6389, 0x0042 },
+  { 6391, 0x0058 }, { 6394, 0x9800 }, { 6397, 0xea04 }, { 6403, 0x7014 },
+  /* 0x9900 */
+  { 6408, 0x1628 }, { 6413, 0x611d }, { 6420, 0x5113 }, { 6426, 0x6000 },
+  { 6428, 0x1a24 }, { 6433, 0x00a7 }, { 6438, 0x0000 }, { 6438, 0x0000 },
+  { 6438, 0x0000 }, { 6438, 0x03c0 }, { 6442, 0x7120 }, { 6447, 0x1018 },
+  { 6450, 0x0172 }, { 6455, 0xa927 }, { 6463, 0x6004 }, { 6466, 0x8906 },
+  /* 0x9a00 */
+  { 6471, 0xc022 }, { 6475, 0x020c }, { 6478, 0x0900 }, { 6480, 0x4081 },
+  { 6483, 0x202d }, { 6488, 0x8ca0 }, { 6493, 0x0e34 }, { 6499, 0x0000 },
+  { 6499, 0x0000 }, { 6499, 0x0000 }, { 6499, 0x2100 }, { 6501, 0x1101 },
+  { 6504, 0x8011 }, { 6507, 0xc11a }, { 6513, 0xec4c }, { 6521, 0x0892 },
+  /* 0x9b00 */
+  { 6525, 0x0040 }, { 6526, 0x8500 }, { 6529, 0xc7ac }, { 6538, 0x1806 },
+  { 6542, 0xe03e }, { 6550, 0x0512 }, { 6554, 0x8000 }, { 6555, 0x0010 },
+  { 6556, 0x4008 }, { 6558, 0x80ce }, { 6564, 0x6d01 }, { 6570, 0x0210 },
+  { 6572, 0x8641 }, { 6577, 0x0856 }, { 6582, 0x011e }, { 6587, 0x0027 },
+  /* 0x9c00 */
+  { 6591, 0x3750 }, { 6598, 0x083d }, { 6604, 0xe032 }, { 6610, 0x4e05 },
+  { 6616, 0x01c0 }, { 6619, 0x0484 }, { 6622, 0x0081 }, { 6624, 0x0140 },
+  { 6626, 0x0000 }, { 6626, 0x0000 }, { 6626, 0x0000 }, { 6626, 0x0000 },
+  { 6626, 0x0000 }, { 6626, 0x0000 }, { 6626, 0x1aa0 }, { 6631, 0x0059 },
+  /* 0x9d00 */
+  { 6635, 0x43c8 }, { 6641, 0x8824 }, { 6645, 0x1d48 }, { 6651, 0xc800 },
+  { 6654, 0x0152 }, { 6658, 0x7203 }, { 6664, 0x9013 }, { 6669, 0x0404 },
+  { 6671, 0x8280 }, { 6674, 0x0400 }, { 6675, 0x8a10 }, { 6679, 0x0d14 },
+  { 6684, 0x8056 }, { 6689, 0x0208 }, { 6691, 0xa040 }, { 6694, 0x2704 },
+  /* 0x9e00 */
+  { 6699, 0x0000 }, { 6699, 0x4c00 }, { 6702, 0x0000 }, { 6702, 0x0000 },
+  { 6702, 0x0000 }, { 6702, 0x0000 }, { 6702, 0x0000 }, { 6702, 0xa320 },
+  { 6707, 0x1902 }, { 6711, 0xa0ae }, { 6718, 0x2660 }, { 6723, 0xdf00 },
+  { 6730, 0xf010 }, { 6735, 0x7b15 }, { 6744, 0x8121 }, { 6748, 0x3ad0 },
+  /* 0x9f00 */
+  { 6755, 0x4180 }, { 6758, 0x0028 }, { 6760, 0x1003 }, { 6763, 0x4800 },
+  { 6765, 0xcc00 }, { 6769, 0x8014 }, { 6772, 0x14cf }, { 6780, 0x00c4 },
+  { 6783, 0x2000 }, { 6784, 0x3020 }, { 6787, 0x0001 },
+};
+static const Summary16 jisx0208_uni2indx_pageff[15] = {
+  /* 0xff00 */
+  { 6788, 0xdf7a }, { 6800, 0xffff }, { 6816, 0xffff }, { 6832, 0xefff },
+  { 6847, 0xffff }, { 6863, 0x3fff }, { 6877, 0x0000 }, { 6877, 0x0000 },
+  { 6877, 0x0000 }, { 6877, 0x0000 }, { 6877, 0x0000 }, { 6877, 0x0000 },
+  { 6877, 0x0000 }, { 6877, 0x0000 }, { 6877, 0x0028 },
+};
+
+static int
+jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    const Summary16 *summary = NULL;
+    if (wc < 0x0100)
+      summary = &jisx0208_uni2indx_page00[(wc>>4)];
+    else if (wc >= 0x0300 && wc < 0x0460)
+      summary = &jisx0208_uni2indx_page03[(wc>>4)-0x030];
+    else if (wc >= 0x2000 && wc < 0x2320)
+      summary = &jisx0208_uni2indx_page20[(wc>>4)-0x200];
+    else if (wc >= 0x2500 && wc < 0x2670)
+      summary = &jisx0208_uni2indx_page25[(wc>>4)-0x250];
+    else if (wc >= 0x3000 && wc < 0x3100)
+      summary = &jisx0208_uni2indx_page30[(wc>>4)-0x300];
+    else if (wc >= 0x4e00 && wc < 0x9fb0)
+      summary = &jisx0208_uni2indx_page4e[(wc>>4)-0x4e0];
+    else if (wc >= 0xff00 && wc < 0xfff0)
+      summary = &jisx0208_uni2indx_pageff[(wc>>4)-0xff0];
+    if (summary) {
+      unsigned short used = summary->used;
+      unsigned int i = wc & 0x0f;
+      if (used & ((unsigned short) 1 << i)) {
+        unsigned short c;
+        /* Keep in `used' only the bits 0..i-1. */
+        used &= ((unsigned short) 1 << i) - 1;
+        /* Add `summary->indx' and the number of bits set in `used'. */
+        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);
+        used = (used & 0x3333) + ((used & 0xcccc) >> 2);
+        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);
+        used = (used & 0x00ff) + (used >> 8);
+        c = jisx0208_2charset[summary->indx + used];
+        r[0] = (c >> 8); r[1] = (c & 0xff);
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0212.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0212.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/jisx0212.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,2168 @@
+/* $XFree86: xc/lib/X11/lcUniConv/jisx0212.h,v 1.5 2003/05/27 22:26:31 tsi Exp $ */
+
+/*
+ * JISX0212.1990-0
+ */
+#ifdef NEED_TOWC
+
+static const unsigned short jisx0212_2uni_page22[81] = {
+  /* 0x22 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x02d8, 0x02c7,
+  0x00b8, 0x02d9, 0x02dd, 0x00af, 0x02db, 0x02da, 0x007e, 0x0384,
+  0x0385, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0x00a1, 0x00a6, 0x00bf, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0x00ba, 0x00aa, 0x00a9, 0x00ae, 0x2122, 0x00a4,
+  0x2116,
+};
+static const unsigned short jisx0212_2uni_page26[188] = {
+  /* 0x26 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0xfffd, 0x038c, 0xfffd,
+  0x038e, 0x03ab, 0xfffd, 0x038f, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, 0x03c2,
+  0x03cd, 0x03cb, 0x03b0, 0x03ce, 0xfffd, 0xfffd,
+  /* 0x27 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408,
+  0x0409, 0x040a, 0x040b, 0x040c, 0x040e, 0x040f, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458,
+  0x0459, 0x045a, 0x045b, 0x045c, 0x045e, 0x045f,
+};
+static const unsigned short jisx0212_2uni_page29[275] = {
+  /* 0x29 */
+  0x00c6, 0x0110, 0xfffd, 0x0126, 0xfffd, 0x0132, 0xfffd, 0x0141,
+  0x013f, 0xfffd, 0x014a, 0x00d8, 0x0152, 0xfffd, 0x0166, 0x00de,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, 0x0142,
+  0x0140, 0x0149, 0x014b, 0x00f8, 0x0153, 0x00df, 0x0167, 0x00fe,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x2a */
+  0x00c1, 0x00c0, 0x00c4, 0x00c2, 0x0102, 0x01cd, 0x0100, 0x0104,
+  0x00c5, 0x00c3, 0x0106, 0x0108, 0x010c, 0x00c7, 0x010a, 0x010e,
+  0x00c9, 0x00c8, 0x00cb, 0x00ca, 0x011a, 0x0116, 0x0112, 0x0118,
+  0xfffd, 0x011c, 0x011e, 0x0122, 0x0120, 0x0124, 0x00cd, 0x00cc,
+  0x00cf, 0x00ce, 0x01cf, 0x0130, 0x012a, 0x012e, 0x0128, 0x0134,
+  0x0136, 0x0139, 0x013d, 0x013b, 0x0143, 0x0147, 0x0145, 0x00d1,
+  0x00d3, 0x00d2, 0x00d6, 0x00d4, 0x01d1, 0x0150, 0x014c, 0x00d5,
+  0x0154, 0x0158, 0x0156, 0x015a, 0x015c, 0x0160, 0x015e, 0x0164,
+  0x0162, 0x00da, 0x00d9, 0x00dc, 0x00db, 0x016c, 0x01d3, 0x0170,
+  0x016a, 0x0172, 0x016e, 0x0168, 0x01d7, 0x01db, 0x01d9, 0x01d5,
+  0x0174, 0x00dd, 0x0178, 0x0176, 0x0179, 0x017d, 0x017b, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x2b */
+  0x00e1, 0x00e0, 0x00e4, 0x00e2, 0x0103, 0x01ce, 0x0101, 0x0105,
+  0x00e5, 0x00e3, 0x0107, 0x0109, 0x010d, 0x00e7, 0x010b, 0x010f,
+  0x00e9, 0x00e8, 0x00eb, 0x00ea, 0x011b, 0x0117, 0x0113, 0x0119,
+  0x01f5, 0x011d, 0x011f, 0xfffd, 0x0121, 0x0125, 0x00ed, 0x00ec,
+  0x00ef, 0x00ee, 0x01d0, 0xfffd, 0x012b, 0x012f, 0x0129, 0x0135,
+  0x0137, 0x013a, 0x013e, 0x013c, 0x0144, 0x0148, 0x0146, 0x00f1,
+  0x00f3, 0x00f2, 0x00f6, 0x00f4, 0x01d2, 0x0151, 0x014d, 0x00f5,
+  0x0155, 0x0159, 0x0157, 0x015b, 0x015d, 0x0161, 0x015f, 0x0165,
+  0x0163, 0x00fa, 0x00f9, 0x00fc, 0x00fb, 0x016d, 0x01d4, 0x0171,
+  0x016b, 0x0173, 0x016f, 0x0169, 0x01d8, 0x01dc, 0x01da, 0x01d6,
+  0x0175, 0x00fd, 0x00ff, 0x0177, 0x017a, 0x017e, 0x017c,
+};
+static const unsigned short jisx0212_2uni_page30[5801] = {
+  /* 0x30 */
+  0x4e02, 0x4e04, 0x4e05, 0x4e0c, 0x4e12, 0x4e1f, 0x4e23, 0x4e24,
+  0x4e28, 0x4e2b, 0x4e2e, 0x4e2f, 0x4e30, 0x4e35, 0x4e40, 0x4e41,
+  0x4e44, 0x4e47, 0x4e51, 0x4e5a, 0x4e5c, 0x4e63, 0x4e68, 0x4e69,
+  0x4e74, 0x4e75, 0x4e79, 0x4e7f, 0x4e8d, 0x4e96, 0x4e97, 0x4e9d,
+  0x4eaf, 0x4eb9, 0x4ec3, 0x4ed0, 0x4eda, 0x4edb, 0x4ee0, 0x4ee1,
+  0x4ee2, 0x4ee8, 0x4eef, 0x4ef1, 0x4ef3, 0x4ef5, 0x4efd, 0x4efe,
+  0x4eff, 0x4f00, 0x4f02, 0x4f03, 0x4f08, 0x4f0b, 0x4f0c, 0x4f12,
+  0x4f15, 0x4f16, 0x4f17, 0x4f19, 0x4f2e, 0x4f31, 0x4f60, 0x4f33,
+  0x4f35, 0x4f37, 0x4f39, 0x4f3b, 0x4f3e, 0x4f40, 0x4f42, 0x4f48,
+  0x4f49, 0x4f4b, 0x4f4c, 0x4f52, 0x4f54, 0x4f56, 0x4f58, 0x4f5f,
+  0x4f63, 0x4f6a, 0x4f6c, 0x4f6e, 0x4f71, 0x4f77, 0x4f78, 0x4f79,
+  0x4f7a, 0x4f7d, 0x4f7e, 0x4f81, 0x4f82, 0x4f84,
+  /* 0x31 */
+  0x4f85, 0x4f89, 0x4f8a, 0x4f8c, 0x4f8e, 0x4f90, 0x4f92, 0x4f93,
+  0x4f94, 0x4f97, 0x4f99, 0x4f9a, 0x4f9e, 0x4f9f, 0x4fb2, 0x4fb7,
+  0x4fb9, 0x4fbb, 0x4fbc, 0x4fbd, 0x4fbe, 0x4fc0, 0x4fc1, 0x4fc5,
+  0x4fc6, 0x4fc8, 0x4fc9, 0x4fcb, 0x4fcc, 0x4fcd, 0x4fcf, 0x4fd2,
+  0x4fdc, 0x4fe0, 0x4fe2, 0x4ff0, 0x4ff2, 0x4ffc, 0x4ffd, 0x4fff,
+  0x5000, 0x5001, 0x5004, 0x5007, 0x500a, 0x500c, 0x500e, 0x5010,
+  0x5013, 0x5017, 0x5018, 0x501b, 0x501c, 0x501d, 0x501e, 0x5022,
+  0x5027, 0x502e, 0x5030, 0x5032, 0x5033, 0x5035, 0x5040, 0x5041,
+  0x5042, 0x5045, 0x5046, 0x504a, 0x504c, 0x504e, 0x5051, 0x5052,
+  0x5053, 0x5057, 0x5059, 0x505f, 0x5060, 0x5062, 0x5063, 0x5066,
+  0x5067, 0x506a, 0x506d, 0x5070, 0x5071, 0x503b, 0x5081, 0x5083,
+  0x5084, 0x5086, 0x508a, 0x508e, 0x508f, 0x5090,
+  /* 0x32 */
+  0x5092, 0x5093, 0x5094, 0x5096, 0x509b, 0x509c, 0x509e, 0x509f,
+  0x50a0, 0x50a1, 0x50a2, 0x50aa, 0x50af, 0x50b0, 0x50b9, 0x50ba,
+  0x50bd, 0x50c0, 0x50c3, 0x50c4, 0x50c7, 0x50cc, 0x50ce, 0x50d0,
+  0x50d3, 0x50d4, 0x50d8, 0x50dc, 0x50dd, 0x50df, 0x50e2, 0x50e4,
+  0x50e6, 0x50e8, 0x50e9, 0x50ef, 0x50f1, 0x50f6, 0x50fa, 0x50fe,
+  0x5103, 0x5106, 0x5107, 0x5108, 0x510b, 0x510c, 0x510d, 0x510e,
+  0x50f2, 0x5110, 0x5117, 0x5119, 0x511b, 0x511c, 0x511d, 0x511e,
+  0x5123, 0x5127, 0x5128, 0x512c, 0x512d, 0x512f, 0x5131, 0x5133,
+  0x5134, 0x5135, 0x5138, 0x5139, 0x5142, 0x514a, 0x514f, 0x5153,
+  0x5155, 0x5157, 0x5158, 0x515f, 0x5164, 0x5166, 0x517e, 0x5183,
+  0x5184, 0x518b, 0x518e, 0x5198, 0x519d, 0x51a1, 0x51a3, 0x51ad,
+  0x51b8, 0x51ba, 0x51bc, 0x51be, 0x51bf, 0x51c2,
+  /* 0x33 */
+  0x51c8, 0x51cf, 0x51d1, 0x51d2, 0x51d3, 0x51d5, 0x51d8, 0x51de,
+  0x51e2, 0x51e5, 0x51ee, 0x51f2, 0x51f3, 0x51f4, 0x51f7, 0x5201,
+  0x5202, 0x5205, 0x5212, 0x5213, 0x5215, 0x5216, 0x5218, 0x5222,
+  0x5228, 0x5231, 0x5232, 0x5235, 0x523c, 0x5245, 0x5249, 0x5255,
+  0x5257, 0x5258, 0x525a, 0x525c, 0x525f, 0x5260, 0x5261, 0x5266,
+  0x526e, 0x5277, 0x5278, 0x5279, 0x5280, 0x5282, 0x5285, 0x528a,
+  0x528c, 0x5293, 0x5295, 0x5296, 0x5297, 0x5298, 0x529a, 0x529c,
+  0x52a4, 0x52a5, 0x52a6, 0x52a7, 0x52af, 0x52b0, 0x52b6, 0x52b7,
+  0x52b8, 0x52ba, 0x52bb, 0x52bd, 0x52c0, 0x52c4, 0x52c6, 0x52c8,
+  0x52cc, 0x52cf, 0x52d1, 0x52d4, 0x52d6, 0x52db, 0x52dc, 0x52e1,
+  0x52e5, 0x52e8, 0x52e9, 0x52ea, 0x52ec, 0x52f0, 0x52f1, 0x52f4,
+  0x52f6, 0x52f7, 0x5300, 0x5303, 0x530a, 0x530b,
+  /* 0x34 */
+  0x530c, 0x5311, 0x5313, 0x5318, 0x531b, 0x531c, 0x531e, 0x531f,
+  0x5325, 0x5327, 0x5328, 0x5329, 0x532b, 0x532c, 0x532d, 0x5330,
+  0x5332, 0x5335, 0x533c, 0x533d, 0x533e, 0x5342, 0x534c, 0x534b,
+  0x5359, 0x535b, 0x5361, 0x5363, 0x5365, 0x536c, 0x536d, 0x5372,
+  0x5379, 0x537e, 0x5383, 0x5387, 0x5388, 0x538e, 0x5393, 0x5394,
+  0x5399, 0x539d, 0x53a1, 0x53a4, 0x53aa, 0x53ab, 0x53af, 0x53b2,
+  0x53b4, 0x53b5, 0x53b7, 0x53b8, 0x53ba, 0x53bd, 0x53c0, 0x53c5,
+  0x53cf, 0x53d2, 0x53d3, 0x53d5, 0x53da, 0x53dd, 0x53de, 0x53e0,
+  0x53e6, 0x53e7, 0x53f5, 0x5402, 0x5413, 0x541a, 0x5421, 0x5427,
+  0x5428, 0x542a, 0x542f, 0x5431, 0x5434, 0x5435, 0x5443, 0x5444,
+  0x5447, 0x544d, 0x544f, 0x545e, 0x5462, 0x5464, 0x5466, 0x5467,
+  0x5469, 0x546b, 0x546d, 0x546e, 0x5474, 0x547f,
+  /* 0x35 */
+  0x5481, 0x5483, 0x5485, 0x5488, 0x5489, 0x548d, 0x5491, 0x5495,
+  0x5496, 0x549c, 0x549f, 0x54a1, 0x54a6, 0x54a7, 0x54a9, 0x54aa,
+  0x54ad, 0x54ae, 0x54b1, 0x54b7, 0x54b9, 0x54ba, 0x54bb, 0x54bf,
+  0x54c6, 0x54ca, 0x54cd, 0x54ce, 0x54e0, 0x54ea, 0x54ec, 0x54ef,
+  0x54f6, 0x54fc, 0x54fe, 0x54ff, 0x5500, 0x5501, 0x5505, 0x5508,
+  0x5509, 0x550c, 0x550d, 0x550e, 0x5515, 0x552a, 0x552b, 0x5532,
+  0x5535, 0x5536, 0x553b, 0x553c, 0x553d, 0x5541, 0x5547, 0x5549,
+  0x554a, 0x554d, 0x5550, 0x5551, 0x5558, 0x555a, 0x555b, 0x555e,
+  0x5560, 0x5561, 0x5564, 0x5566, 0x557f, 0x5581, 0x5582, 0x5586,
+  0x5588, 0x558e, 0x558f, 0x5591, 0x5592, 0x5593, 0x5594, 0x5597,
+  0x55a3, 0x55a4, 0x55ad, 0x55b2, 0x55bf, 0x55c1, 0x55c3, 0x55c6,
+  0x55c9, 0x55cb, 0x55cc, 0x55ce, 0x55d1, 0x55d2,
+  /* 0x36 */
+  0x55d3, 0x55d7, 0x55d8, 0x55db, 0x55de, 0x55e2, 0x55e9, 0x55f6,
+  0x55ff, 0x5605, 0x5608, 0x560a, 0x560d, 0x560e, 0x560f, 0x5610,
+  0x5611, 0x5612, 0x5619, 0x562c, 0x5630, 0x5633, 0x5635, 0x5637,
+  0x5639, 0x563b, 0x563c, 0x563d, 0x563f, 0x5640, 0x5641, 0x5643,
+  0x5644, 0x5646, 0x5649, 0x564b, 0x564d, 0x564f, 0x5654, 0x565e,
+  0x5660, 0x5661, 0x5662, 0x5663, 0x5666, 0x5669, 0x566d, 0x566f,
+  0x5671, 0x5672, 0x5675, 0x5684, 0x5685, 0x5688, 0x568b, 0x568c,
+  0x5695, 0x5699, 0x569a, 0x569d, 0x569e, 0x569f, 0x56a6, 0x56a7,
+  0x56a8, 0x56a9, 0x56ab, 0x56ac, 0x56ad, 0x56b1, 0x56b3, 0x56b7,
+  0x56be, 0x56c5, 0x56c9, 0x56ca, 0x56cb, 0x56cf, 0x56d0, 0x56cc,
+  0x56cd, 0x56d9, 0x56dc, 0x56dd, 0x56df, 0x56e1, 0x56e4, 0x56e5,
+  0x56e6, 0x56e7, 0x56e8, 0x56f1, 0x56eb, 0x56ed,
+  /* 0x37 */
+  0x56f6, 0x56f7, 0x5701, 0x5702, 0x5707, 0x570a, 0x570c, 0x5711,
+  0x5715, 0x571a, 0x571b, 0x571d, 0x5720, 0x5722, 0x5723, 0x5724,
+  0x5725, 0x5729, 0x572a, 0x572c, 0x572e, 0x572f, 0x5733, 0x5734,
+  0x573d, 0x573e, 0x573f, 0x5745, 0x5746, 0x574c, 0x574d, 0x5752,
+  0x5762, 0x5765, 0x5767, 0x5768, 0x576b, 0x576d, 0x576e, 0x576f,
+  0x5770, 0x5771, 0x5773, 0x5774, 0x5775, 0x5777, 0x5779, 0x577a,
+  0x577b, 0x577c, 0x577e, 0x5781, 0x5783, 0x578c, 0x5794, 0x5797,
+  0x5799, 0x579a, 0x579c, 0x579d, 0x579e, 0x579f, 0x57a1, 0x5795,
+  0x57a7, 0x57a8, 0x57a9, 0x57ac, 0x57b8, 0x57bd, 0x57c7, 0x57c8,
+  0x57cc, 0x57cf, 0x57d5, 0x57dd, 0x57de, 0x57e4, 0x57e6, 0x57e7,
+  0x57e9, 0x57ed, 0x57f0, 0x57f5, 0x57f6, 0x57f8, 0x57fd, 0x57fe,
+  0x57ff, 0x5803, 0x5804, 0x5808, 0x5809, 0x57e1,
+  /* 0x38 */
+  0x580c, 0x580d, 0x581b, 0x581e, 0x581f, 0x5820, 0x5826, 0x5827,
+  0x582d, 0x5832, 0x5839, 0x583f, 0x5849, 0x584c, 0x584d, 0x584f,
+  0x5850, 0x5855, 0x585f, 0x5861, 0x5864, 0x5867, 0x5868, 0x5878,
+  0x587c, 0x587f, 0x5880, 0x5881, 0x5887, 0x5888, 0x5889, 0x588a,
+  0x588c, 0x588d, 0x588f, 0x5890, 0x5894, 0x5896, 0x589d, 0x58a0,
+  0x58a1, 0x58a2, 0x58a6, 0x58a9, 0x58b1, 0x58b2, 0x58c4, 0x58bc,
+  0x58c2, 0x58c8, 0x58cd, 0x58ce, 0x58d0, 0x58d2, 0x58d4, 0x58d6,
+  0x58da, 0x58dd, 0x58e1, 0x58e2, 0x58e9, 0x58f3, 0x5905, 0x5906,
+  0x590b, 0x590c, 0x5912, 0x5913, 0x5914, 0x8641, 0x591d, 0x5921,
+  0x5923, 0x5924, 0x5928, 0x592f, 0x5930, 0x5933, 0x5935, 0x5936,
+  0x593f, 0x5943, 0x5946, 0x5952, 0x5953, 0x5959, 0x595b, 0x595d,
+  0x595e, 0x595f, 0x5961, 0x5963, 0x596b, 0x596d,
+  /* 0x39 */
+  0x596f, 0x5972, 0x5975, 0x5976, 0x5979, 0x597b, 0x597c, 0x598b,
+  0x598c, 0x598e, 0x5992, 0x5995, 0x5997, 0x599f, 0x59a4, 0x59a7,
+  0x59ad, 0x59ae, 0x59af, 0x59b0, 0x59b3, 0x59b7, 0x59ba, 0x59bc,
+  0x59c1, 0x59c3, 0x59c4, 0x59c8, 0x59ca, 0x59cd, 0x59d2, 0x59dd,
+  0x59de, 0x59df, 0x59e3, 0x59e4, 0x59e7, 0x59ee, 0x59ef, 0x59f1,
+  0x59f2, 0x59f4, 0x59f7, 0x5a00, 0x5a04, 0x5a0c, 0x5a0d, 0x5a0e,
+  0x5a12, 0x5a13, 0x5a1e, 0x5a23, 0x5a24, 0x5a27, 0x5a28, 0x5a2a,
+  0x5a2d, 0x5a30, 0x5a44, 0x5a45, 0x5a47, 0x5a48, 0x5a4c, 0x5a50,
+  0x5a55, 0x5a5e, 0x5a63, 0x5a65, 0x5a67, 0x5a6d, 0x5a77, 0x5a7a,
+  0x5a7b, 0x5a7e, 0x5a8b, 0x5a90, 0x5a93, 0x5a96, 0x5a99, 0x5a9c,
+  0x5a9e, 0x5a9f, 0x5aa0, 0x5aa2, 0x5aa7, 0x5aac, 0x5ab1, 0x5ab2,
+  0x5ab3, 0x5ab5, 0x5ab8, 0x5aba, 0x5abb, 0x5abf,
+  /* 0x3a */
+  0x5ac4, 0x5ac6, 0x5ac8, 0x5acf, 0x5ada, 0x5adc, 0x5ae0, 0x5ae5,
+  0x5aea, 0x5aee, 0x5af5, 0x5af6, 0x5afd, 0x5b00, 0x5b01, 0x5b08,
+  0x5b17, 0x5b34, 0x5b19, 0x5b1b, 0x5b1d, 0x5b21, 0x5b25, 0x5b2d,
+  0x5b38, 0x5b41, 0x5b4b, 0x5b4c, 0x5b52, 0x5b56, 0x5b5e, 0x5b68,
+  0x5b6e, 0x5b6f, 0x5b7c, 0x5b7d, 0x5b7e, 0x5b7f, 0x5b81, 0x5b84,
+  0x5b86, 0x5b8a, 0x5b8e, 0x5b90, 0x5b91, 0x5b93, 0x5b94, 0x5b96,
+  0x5ba8, 0x5ba9, 0x5bac, 0x5bad, 0x5baf, 0x5bb1, 0x5bb2, 0x5bb7,
+  0x5bba, 0x5bbc, 0x5bc0, 0x5bc1, 0x5bcd, 0x5bcf, 0x5bd6, 0x5bd7,
+  0x5bd8, 0x5bd9, 0x5bda, 0x5be0, 0x5bef, 0x5bf1, 0x5bf4, 0x5bfd,
+  0x5c0c, 0x5c17, 0x5c1e, 0x5c1f, 0x5c23, 0x5c26, 0x5c29, 0x5c2b,
+  0x5c2c, 0x5c2e, 0x5c30, 0x5c32, 0x5c35, 0x5c36, 0x5c59, 0x5c5a,
+  0x5c5c, 0x5c62, 0x5c63, 0x5c67, 0x5c68, 0x5c69,
+  /* 0x3b */
+  0x5c6d, 0x5c70, 0x5c74, 0x5c75, 0x5c7a, 0x5c7b, 0x5c7c, 0x5c7d,
+  0x5c87, 0x5c88, 0x5c8a, 0x5c8f, 0x5c92, 0x5c9d, 0x5c9f, 0x5ca0,
+  0x5ca2, 0x5ca3, 0x5ca6, 0x5caa, 0x5cb2, 0x5cb4, 0x5cb5, 0x5cba,
+  0x5cc9, 0x5ccb, 0x5cd2, 0x5cdd, 0x5cd7, 0x5cee, 0x5cf1, 0x5cf2,
+  0x5cf4, 0x5d01, 0x5d06, 0x5d0d, 0x5d12, 0x5d2b, 0x5d23, 0x5d24,
+  0x5d26, 0x5d27, 0x5d31, 0x5d34, 0x5d39, 0x5d3d, 0x5d3f, 0x5d42,
+  0x5d43, 0x5d46, 0x5d48, 0x5d55, 0x5d51, 0x5d59, 0x5d4a, 0x5d5f,
+  0x5d60, 0x5d61, 0x5d62, 0x5d64, 0x5d6a, 0x5d6d, 0x5d70, 0x5d79,
+  0x5d7a, 0x5d7e, 0x5d7f, 0x5d81, 0x5d83, 0x5d88, 0x5d8a, 0x5d92,
+  0x5d93, 0x5d94, 0x5d95, 0x5d99, 0x5d9b, 0x5d9f, 0x5da0, 0x5da7,
+  0x5dab, 0x5db0, 0x5db4, 0x5db8, 0x5db9, 0x5dc3, 0x5dc7, 0x5dcb,
+  0x5dd0, 0x5dce, 0x5dd8, 0x5dd9, 0x5de0, 0x5de4,
+  /* 0x3c */
+  0x5de9, 0x5df8, 0x5df9, 0x5e00, 0x5e07, 0x5e0d, 0x5e12, 0x5e14,
+  0x5e15, 0x5e18, 0x5e1f, 0x5e20, 0x5e2e, 0x5e28, 0x5e32, 0x5e35,
+  0x5e3e, 0x5e4b, 0x5e50, 0x5e49, 0x5e51, 0x5e56, 0x5e58, 0x5e5b,
+  0x5e5c, 0x5e5e, 0x5e68, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e,
+  0x5e70, 0x5e80, 0x5e8b, 0x5e8e, 0x5ea2, 0x5ea4, 0x5ea5, 0x5ea8,
+  0x5eaa, 0x5eac, 0x5eb1, 0x5eb3, 0x5ebd, 0x5ebe, 0x5ebf, 0x5ec6,
+  0x5ecc, 0x5ecb, 0x5ece, 0x5ed1, 0x5ed2, 0x5ed4, 0x5ed5, 0x5edc,
+  0x5ede, 0x5ee5, 0x5eeb, 0x5f02, 0x5f06, 0x5f07, 0x5f08, 0x5f0e,
+  0x5f19, 0x5f1c, 0x5f1d, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0x5f28,
+  0x5f2b, 0x5f2c, 0x5f2e, 0x5f30, 0x5f34, 0x5f36, 0x5f3b, 0x5f3d,
+  0x5f3f, 0x5f40, 0x5f44, 0x5f45, 0x5f47, 0x5f4d, 0x5f50, 0x5f54,
+  0x5f58, 0x5f5b, 0x5f60, 0x5f63, 0x5f64, 0x5f67,
+  /* 0x3d */
+  0x5f6f, 0x5f72, 0x5f74, 0x5f75, 0x5f78, 0x5f7a, 0x5f7d, 0x5f7e,
+  0x5f89, 0x5f8d, 0x5f8f, 0x5f96, 0x5f9c, 0x5f9d, 0x5fa2, 0x5fa7,
+  0x5fab, 0x5fa4, 0x5fac, 0x5faf, 0x5fb0, 0x5fb1, 0x5fb8, 0x5fc4,
+  0x5fc7, 0x5fc8, 0x5fc9, 0x5fcb, 0x5fd0, 0x5fd1, 0x5fd2, 0x5fd3,
+  0x5fd4, 0x5fde, 0x5fe1, 0x5fe2, 0x5fe8, 0x5fe9, 0x5fea, 0x5fec,
+  0x5fed, 0x5fee, 0x5fef, 0x5ff2, 0x5ff3, 0x5ff6, 0x5ffa, 0x5ffc,
+  0x6007, 0x600a, 0x600d, 0x6013, 0x6014, 0x6017, 0x6018, 0x601a,
+  0x601f, 0x6024, 0x602d, 0x6033, 0x6035, 0x6040, 0x6047, 0x6048,
+  0x6049, 0x604c, 0x6051, 0x6054, 0x6056, 0x6057, 0x605d, 0x6061,
+  0x6067, 0x6071, 0x607e, 0x607f, 0x6082, 0x6086, 0x6088, 0x608a,
+  0x608e, 0x6091, 0x6093, 0x6095, 0x6098, 0x609d, 0x609e, 0x60a2,
+  0x60a4, 0x60a5, 0x60a8, 0x60b0, 0x60b1, 0x60b7,
+  /* 0x3e */
+  0x60bb, 0x60be, 0x60c2, 0x60c4, 0x60c8, 0x60c9, 0x60ca, 0x60cb,
+  0x60ce, 0x60cf, 0x60d4, 0x60d5, 0x60d9, 0x60db, 0x60dd, 0x60de,
+  0x60e2, 0x60e5, 0x60f2, 0x60f5, 0x60f8, 0x60fc, 0x60fd, 0x6102,
+  0x6107, 0x610a, 0x610c, 0x6110, 0x6111, 0x6112, 0x6113, 0x6114,
+  0x6116, 0x6117, 0x6119, 0x611c, 0x611e, 0x6122, 0x612a, 0x612b,
+  0x6130, 0x6131, 0x6135, 0x6136, 0x6137, 0x6139, 0x6141, 0x6145,
+  0x6146, 0x6149, 0x615e, 0x6160, 0x616c, 0x6172, 0x6178, 0x617b,
+  0x617c, 0x617f, 0x6180, 0x6181, 0x6183, 0x6184, 0x618b, 0x618d,
+  0x6192, 0x6193, 0x6197, 0x6198, 0x619c, 0x619d, 0x619f, 0x61a0,
+  0x61a5, 0x61a8, 0x61aa, 0x61ad, 0x61b8, 0x61b9, 0x61bc, 0x61c0,
+  0x61c1, 0x61c2, 0x61ce, 0x61cf, 0x61d5, 0x61dc, 0x61dd, 0x61de,
+  0x61df, 0x61e1, 0x61e2, 0x61e7, 0x61e9, 0x61e5,
+  /* 0x3f */
+  0x61ec, 0x61ed, 0x61ef, 0x6201, 0x6203, 0x6204, 0x6207, 0x6213,
+  0x6215, 0x621c, 0x6220, 0x6222, 0x6223, 0x6227, 0x6229, 0x622b,
+  0x6239, 0x623d, 0x6242, 0x6243, 0x6244, 0x6246, 0x624c, 0x6250,
+  0x6251, 0x6252, 0x6254, 0x6256, 0x625a, 0x625c, 0x6264, 0x626d,
+  0x626f, 0x6273, 0x627a, 0x627d, 0x628d, 0x628e, 0x628f, 0x6290,
+  0x62a6, 0x62a8, 0x62b3, 0x62b6, 0x62b7, 0x62ba, 0x62be, 0x62bf,
+  0x62c4, 0x62ce, 0x62d5, 0x62d6, 0x62da, 0x62ea, 0x62f2, 0x62f4,
+  0x62fc, 0x62fd, 0x6303, 0x6304, 0x630a, 0x630b, 0x630d, 0x6310,
+  0x6313, 0x6316, 0x6318, 0x6329, 0x632a, 0x632d, 0x6335, 0x6336,
+  0x6339, 0x633c, 0x6341, 0x6342, 0x6343, 0x6344, 0x6346, 0x634a,
+  0x634b, 0x634e, 0x6352, 0x6353, 0x6354, 0x6358, 0x635b, 0x6365,
+  0x6366, 0x636c, 0x636d, 0x6371, 0x6374, 0x6375,
+  /* 0x40 */
+  0x6378, 0x637c, 0x637d, 0x637f, 0x6382, 0x6384, 0x6387, 0x638a,
+  0x6390, 0x6394, 0x6395, 0x6399, 0x639a, 0x639e, 0x63a4, 0x63a6,
+  0x63ad, 0x63ae, 0x63af, 0x63bd, 0x63c1, 0x63c5, 0x63c8, 0x63ce,
+  0x63d1, 0x63d3, 0x63d4, 0x63d5, 0x63dc, 0x63e0, 0x63e5, 0x63ea,
+  0x63ec, 0x63f2, 0x63f3, 0x63f5, 0x63f8, 0x63f9, 0x6409, 0x640a,
+  0x6410, 0x6412, 0x6414, 0x6418, 0x641e, 0x6420, 0x6422, 0x6424,
+  0x6425, 0x6429, 0x642a, 0x642f, 0x6430, 0x6435, 0x643d, 0x643f,
+  0x644b, 0x644f, 0x6451, 0x6452, 0x6453, 0x6454, 0x645a, 0x645b,
+  0x645c, 0x645d, 0x645f, 0x6460, 0x6461, 0x6463, 0x646d, 0x6473,
+  0x6474, 0x647b, 0x647d, 0x6485, 0x6487, 0x648f, 0x6490, 0x6491,
+  0x6498, 0x6499, 0x649b, 0x649d, 0x649f, 0x64a1, 0x64a3, 0x64a6,
+  0x64a8, 0x64ac, 0x64b3, 0x64bd, 0x64be, 0x64bf,
+  /* 0x41 */
+  0x64c4, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64ce, 0x64d0, 0x64d1,
+  0x64d5, 0x64d7, 0x64e4, 0x64e5, 0x64e9, 0x64ea, 0x64ed, 0x64f0,
+  0x64f5, 0x64f7, 0x64fb, 0x64ff, 0x6501, 0x6504, 0x6508, 0x6509,
+  0x650a, 0x650f, 0x6513, 0x6514, 0x6516, 0x6519, 0x651b, 0x651e,
+  0x651f, 0x6522, 0x6526, 0x6529, 0x652e, 0x6531, 0x653a, 0x653c,
+  0x653d, 0x6543, 0x6547, 0x6549, 0x6550, 0x6552, 0x6554, 0x655f,
+  0x6560, 0x6567, 0x656b, 0x657a, 0x657d, 0x6581, 0x6585, 0x658a,
+  0x6592, 0x6595, 0x6598, 0x659d, 0x65a0, 0x65a3, 0x65a6, 0x65ae,
+  0x65b2, 0x65b3, 0x65b4, 0x65bf, 0x65c2, 0x65c8, 0x65c9, 0x65ce,
+  0x65d0, 0x65d4, 0x65d6, 0x65d8, 0x65df, 0x65f0, 0x65f2, 0x65f4,
+  0x65f5, 0x65f9, 0x65fe, 0x65ff, 0x6600, 0x6604, 0x6608, 0x6609,
+  0x660d, 0x6611, 0x6612, 0x6615, 0x6616, 0x661d,
+  /* 0x42 */
+  0x661e, 0x6621, 0x6622, 0x6623, 0x6624, 0x6626, 0x6629, 0x662a,
+  0x662b, 0x662c, 0x662e, 0x6630, 0x6631, 0x6633, 0x6639, 0x6637,
+  0x6640, 0x6645, 0x6646, 0x664a, 0x664c, 0x6651, 0x664e, 0x6657,
+  0x6658, 0x6659, 0x665b, 0x665c, 0x6660, 0x6661, 0x66fb, 0x666a,
+  0x666b, 0x666c, 0x667e, 0x6673, 0x6675, 0x667f, 0x6677, 0x6678,
+  0x6679, 0x667b, 0x6680, 0x667c, 0x668b, 0x668c, 0x668d, 0x6690,
+  0x6692, 0x6699, 0x669a, 0x669b, 0x669c, 0x669f, 0x66a0, 0x66a4,
+  0x66ad, 0x66b1, 0x66b2, 0x66b5, 0x66bb, 0x66bf, 0x66c0, 0x66c2,
+  0x66c3, 0x66c8, 0x66cc, 0x66ce, 0x66cf, 0x66d4, 0x66db, 0x66df,
+  0x66e8, 0x66eb, 0x66ec, 0x66ee, 0x66fa, 0x6705, 0x6707, 0x670e,
+  0x6713, 0x6719, 0x671c, 0x6720, 0x6722, 0x6733, 0x673e, 0x6745,
+  0x6747, 0x6748, 0x674c, 0x6754, 0x6755, 0x675d,
+  /* 0x43 */
+  0x6766, 0x676c, 0x676e, 0x6774, 0x6776, 0x677b, 0x6781, 0x6784,
+  0x678e, 0x678f, 0x6791, 0x6793, 0x6796, 0x6798, 0x6799, 0x679b,
+  0x67b0, 0x67b1, 0x67b2, 0x67b5, 0x67bb, 0x67bc, 0x67bd, 0x67f9,
+  0x67c0, 0x67c2, 0x67c3, 0x67c5, 0x67c8, 0x67c9, 0x67d2, 0x67d7,
+  0x67d9, 0x67dc, 0x67e1, 0x67e6, 0x67f0, 0x67f2, 0x67f6, 0x67f7,
+  0x6852, 0x6814, 0x6819, 0x681d, 0x681f, 0x6828, 0x6827, 0x682c,
+  0x682d, 0x682f, 0x6830, 0x6831, 0x6833, 0x683b, 0x683f, 0x6844,
+  0x6845, 0x684a, 0x684c, 0x6855, 0x6857, 0x6858, 0x685b, 0x686b,
+  0x686e, 0x686f, 0x6870, 0x6871, 0x6872, 0x6875, 0x6879, 0x687a,
+  0x687b, 0x687c, 0x6882, 0x6884, 0x6886, 0x6888, 0x6896, 0x6898,
+  0x689a, 0x689c, 0x68a1, 0x68a3, 0x68a5, 0x68a9, 0x68aa, 0x68ae,
+  0x68b2, 0x68bb, 0x68c5, 0x68c8, 0x68cc, 0x68cf,
+  /* 0x44 */
+  0x68d0, 0x68d1, 0x68d3, 0x68d6, 0x68d9, 0x68dc, 0x68dd, 0x68e5,
+  0x68e8, 0x68ea, 0x68eb, 0x68ec, 0x68ed, 0x68f0, 0x68f1, 0x68f5,
+  0x68f6, 0x68fb, 0x68fc, 0x68fd, 0x6906, 0x6909, 0x690a, 0x6910,
+  0x6911, 0x6913, 0x6916, 0x6917, 0x6931, 0x6933, 0x6935, 0x6938,
+  0x693b, 0x6942, 0x6945, 0x6949, 0x694e, 0x6957, 0x695b, 0x6963,
+  0x6964, 0x6965, 0x6966, 0x6968, 0x6969, 0x696c, 0x6970, 0x6971,
+  0x6972, 0x697a, 0x697b, 0x697f, 0x6980, 0x698d, 0x6992, 0x6996,
+  0x6998, 0x69a1, 0x69a5, 0x69a6, 0x69a8, 0x69ab, 0x69ad, 0x69af,
+  0x69b7, 0x69b8, 0x69ba, 0x69bc, 0x69c5, 0x69c8, 0x69d1, 0x69d6,
+  0x69d7, 0x69e2, 0x69e5, 0x69ee, 0x69ef, 0x69f1, 0x69f3, 0x69f5,
+  0x69fe, 0x6a00, 0x6a01, 0x6a03, 0x6a0f, 0x6a11, 0x6a15, 0x6a1a,
+  0x6a1d, 0x6a20, 0x6a24, 0x6a28, 0x6a30, 0x6a32,
+  /* 0x45 */
+  0x6a34, 0x6a37, 0x6a3b, 0x6a3e, 0x6a3f, 0x6a45, 0x6a46, 0x6a49,
+  0x6a4a, 0x6a4e, 0x6a50, 0x6a51, 0x6a52, 0x6a55, 0x6a56, 0x6a5b,
+  0x6a64, 0x6a67, 0x6a6a, 0x6a71, 0x6a73, 0x6a7e, 0x6a81, 0x6a83,
+  0x6a86, 0x6a87, 0x6a89, 0x6a8b, 0x6a91, 0x6a9b, 0x6a9d, 0x6a9e,
+  0x6a9f, 0x6aa5, 0x6aab, 0x6aaf, 0x6ab0, 0x6ab1, 0x6ab4, 0x6abd,
+  0x6abe, 0x6abf, 0x6ac6, 0x6ac9, 0x6ac8, 0x6acc, 0x6ad0, 0x6ad4,
+  0x6ad5, 0x6ad6, 0x6adc, 0x6add, 0x6ae4, 0x6ae7, 0x6aec, 0x6af0,
+  0x6af1, 0x6af2, 0x6afc, 0x6afd, 0x6b02, 0x6b03, 0x6b06, 0x6b07,
+  0x6b09, 0x6b0f, 0x6b10, 0x6b11, 0x6b17, 0x6b1b, 0x6b1e, 0x6b24,
+  0x6b28, 0x6b2b, 0x6b2c, 0x6b2f, 0x6b35, 0x6b36, 0x6b3b, 0x6b3f,
+  0x6b46, 0x6b4a, 0x6b4d, 0x6b52, 0x6b56, 0x6b58, 0x6b5d, 0x6b60,
+  0x6b67, 0x6b6b, 0x6b6e, 0x6b70, 0x6b75, 0x6b7d,
+  /* 0x46 */
+  0x6b7e, 0x6b82, 0x6b85, 0x6b97, 0x6b9b, 0x6b9f, 0x6ba0, 0x6ba2,
+  0x6ba3, 0x6ba8, 0x6ba9, 0x6bac, 0x6bad, 0x6bae, 0x6bb0, 0x6bb8,
+  0x6bb9, 0x6bbd, 0x6bbe, 0x6bc3, 0x6bc4, 0x6bc9, 0x6bcc, 0x6bd6,
+  0x6bda, 0x6be1, 0x6be3, 0x6be6, 0x6be7, 0x6bee, 0x6bf1, 0x6bf7,
+  0x6bf9, 0x6bff, 0x6c02, 0x6c04, 0x6c05, 0x6c09, 0x6c0d, 0x6c0e,
+  0x6c10, 0x6c12, 0x6c19, 0x6c1f, 0x6c26, 0x6c27, 0x6c28, 0x6c2c,
+  0x6c2e, 0x6c33, 0x6c35, 0x6c36, 0x6c3a, 0x6c3b, 0x6c3f, 0x6c4a,
+  0x6c4b, 0x6c4d, 0x6c4f, 0x6c52, 0x6c54, 0x6c59, 0x6c5b, 0x6c5c,
+  0x6c6b, 0x6c6d, 0x6c6f, 0x6c74, 0x6c76, 0x6c78, 0x6c79, 0x6c7b,
+  0x6c85, 0x6c86, 0x6c87, 0x6c89, 0x6c94, 0x6c95, 0x6c97, 0x6c98,
+  0x6c9c, 0x6c9f, 0x6cb0, 0x6cb2, 0x6cb4, 0x6cc2, 0x6cc6, 0x6ccd,
+  0x6ccf, 0x6cd0, 0x6cd1, 0x6cd2, 0x6cd4, 0x6cd6,
+  /* 0x47 */
+  0x6cda, 0x6cdc, 0x6ce0, 0x6ce7, 0x6ce9, 0x6ceb, 0x6cec, 0x6cee,
+  0x6cf2, 0x6cf4, 0x6d04, 0x6d07, 0x6d0a, 0x6d0e, 0x6d0f, 0x6d11,
+  0x6d13, 0x6d1a, 0x6d26, 0x6d27, 0x6d28, 0x6c67, 0x6d2e, 0x6d2f,
+  0x6d31, 0x6d39, 0x6d3c, 0x6d3f, 0x6d57, 0x6d5e, 0x6d5f, 0x6d61,
+  0x6d65, 0x6d67, 0x6d6f, 0x6d70, 0x6d7c, 0x6d82, 0x6d87, 0x6d91,
+  0x6d92, 0x6d94, 0x6d96, 0x6d97, 0x6d98, 0x6daa, 0x6dac, 0x6db4,
+  0x6db7, 0x6db9, 0x6dbd, 0x6dbf, 0x6dc4, 0x6dc8, 0x6dca, 0x6dce,
+  0x6dcf, 0x6dd6, 0x6ddb, 0x6ddd, 0x6ddf, 0x6de0, 0x6de2, 0x6de5,
+  0x6de9, 0x6def, 0x6df0, 0x6df4, 0x6df6, 0x6dfc, 0x6e00, 0x6e04,
+  0x6e1e, 0x6e22, 0x6e27, 0x6e32, 0x6e36, 0x6e39, 0x6e3b, 0x6e3c,
+  0x6e44, 0x6e45, 0x6e48, 0x6e49, 0x6e4b, 0x6e4f, 0x6e51, 0x6e52,
+  0x6e53, 0x6e54, 0x6e57, 0x6e5c, 0x6e5d, 0x6e5e,
+  /* 0x48 */
+  0x6e62, 0x6e63, 0x6e68, 0x6e73, 0x6e7b, 0x6e7d, 0x6e8d, 0x6e93,
+  0x6e99, 0x6ea0, 0x6ea7, 0x6ead, 0x6eae, 0x6eb1, 0x6eb3, 0x6ebb,
+  0x6ebf, 0x6ec0, 0x6ec1, 0x6ec3, 0x6ec7, 0x6ec8, 0x6eca, 0x6ecd,
+  0x6ece, 0x6ecf, 0x6eeb, 0x6eed, 0x6eee, 0x6ef9, 0x6efb, 0x6efd,
+  0x6f04, 0x6f08, 0x6f0a, 0x6f0c, 0x6f0d, 0x6f16, 0x6f18, 0x6f1a,
+  0x6f1b, 0x6f26, 0x6f29, 0x6f2a, 0x6f2f, 0x6f30, 0x6f33, 0x6f36,
+  0x6f3b, 0x6f3c, 0x6f2d, 0x6f4f, 0x6f51, 0x6f52, 0x6f53, 0x6f57,
+  0x6f59, 0x6f5a, 0x6f5d, 0x6f5e, 0x6f61, 0x6f62, 0x6f68, 0x6f6c,
+  0x6f7d, 0x6f7e, 0x6f83, 0x6f87, 0x6f88, 0x6f8b, 0x6f8c, 0x6f8d,
+  0x6f90, 0x6f92, 0x6f93, 0x6f94, 0x6f96, 0x6f9a, 0x6f9f, 0x6fa0,
+  0x6fa5, 0x6fa6, 0x6fa7, 0x6fa8, 0x6fae, 0x6faf, 0x6fb0, 0x6fb5,
+  0x6fb6, 0x6fbc, 0x6fc5, 0x6fc7, 0x6fc8, 0x6fca,
+  /* 0x49 */
+  0x6fda, 0x6fde, 0x6fe8, 0x6fe9, 0x6ff0, 0x6ff5, 0x6ff9, 0x6ffc,
+  0x6ffd, 0x7000, 0x7005, 0x7006, 0x7007, 0x700d, 0x7017, 0x7020,
+  0x7023, 0x702f, 0x7034, 0x7037, 0x7039, 0x703c, 0x7043, 0x7044,
+  0x7048, 0x7049, 0x704a, 0x704b, 0x7054, 0x7055, 0x705d, 0x705e,
+  0x704e, 0x7064, 0x7065, 0x706c, 0x706e, 0x7075, 0x7076, 0x707e,
+  0x7081, 0x7085, 0x7086, 0x7094, 0x7095, 0x7096, 0x7097, 0x7098,
+  0x709b, 0x70a4, 0x70ab, 0x70b0, 0x70b1, 0x70b4, 0x70b7, 0x70ca,
+  0x70d1, 0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d8, 0x70dc, 0x70e4,
+  0x70fa, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x710b, 0x710c,
+  0x710f, 0x711e, 0x7120, 0x712b, 0x712d, 0x712f, 0x7130, 0x7131,
+  0x7138, 0x7141, 0x7145, 0x7146, 0x7147, 0x714a, 0x714b, 0x7150,
+  0x7152, 0x7157, 0x715a, 0x715c, 0x715e, 0x7160,
+  /* 0x4a */
+  0x7168, 0x7179, 0x7180, 0x7185, 0x7187, 0x718c, 0x7192, 0x719a,
+  0x719b, 0x71a0, 0x71a2, 0x71af, 0x71b0, 0x71b2, 0x71b3, 0x71ba,
+  0x71bf, 0x71c0, 0x71c1, 0x71c4, 0x71cb, 0x71cc, 0x71d3, 0x71d6,
+  0x71d9, 0x71da, 0x71dc, 0x71f8, 0x71fe, 0x7200, 0x7207, 0x7208,
+  0x7209, 0x7213, 0x7217, 0x721a, 0x721d, 0x721f, 0x7224, 0x722b,
+  0x722f, 0x7234, 0x7238, 0x7239, 0x7241, 0x7242, 0x7243, 0x7245,
+  0x724e, 0x724f, 0x7250, 0x7253, 0x7255, 0x7256, 0x725a, 0x725c,
+  0x725e, 0x7260, 0x7263, 0x7268, 0x726b, 0x726e, 0x726f, 0x7271,
+  0x7277, 0x7278, 0x727b, 0x727c, 0x727f, 0x7284, 0x7289, 0x728d,
+  0x728e, 0x7293, 0x729b, 0x72a8, 0x72ad, 0x72ae, 0x72b1, 0x72b4,
+  0x72be, 0x72c1, 0x72c7, 0x72c9, 0x72cc, 0x72d5, 0x72d6, 0x72d8,
+  0x72df, 0x72e5, 0x72f3, 0x72f4, 0x72fa, 0x72fb,
+  /* 0x4b */
+  0x72fe, 0x7302, 0x7304, 0x7305, 0x7307, 0x730b, 0x730d, 0x7312,
+  0x7313, 0x7318, 0x7319, 0x731e, 0x7322, 0x7324, 0x7327, 0x7328,
+  0x732c, 0x7331, 0x7332, 0x7335, 0x733a, 0x733b, 0x733d, 0x7343,
+  0x734d, 0x7350, 0x7352, 0x7356, 0x7358, 0x735d, 0x735e, 0x735f,
+  0x7360, 0x7366, 0x7367, 0x7369, 0x736b, 0x736c, 0x736e, 0x736f,
+  0x7371, 0x7377, 0x7379, 0x737c, 0x7380, 0x7381, 0x7383, 0x7385,
+  0x7386, 0x738e, 0x7390, 0x7393, 0x7395, 0x7397, 0x7398, 0x739c,
+  0x739e, 0x739f, 0x73a0, 0x73a2, 0x73a5, 0x73a6, 0x73aa, 0x73ab,
+  0x73ad, 0x73b5, 0x73b7, 0x73b9, 0x73bc, 0x73bd, 0x73bf, 0x73c5,
+  0x73c6, 0x73c9, 0x73cb, 0x73cc, 0x73cf, 0x73d2, 0x73d3, 0x73d6,
+  0x73d9, 0x73dd, 0x73e1, 0x73e3, 0x73e6, 0x73e7, 0x73e9, 0x73f4,
+  0x73f5, 0x73f7, 0x73f9, 0x73fa, 0x73fb, 0x73fd,
+  /* 0x4c */
+  0x73ff, 0x7400, 0x7401, 0x7404, 0x7407, 0x740a, 0x7411, 0x741a,
+  0x741b, 0x7424, 0x7426, 0x7428, 0x7429, 0x742a, 0x742b, 0x742c,
+  0x742d, 0x742e, 0x742f, 0x7430, 0x7431, 0x7439, 0x7440, 0x7443,
+  0x7444, 0x7446, 0x7447, 0x744b, 0x744d, 0x7451, 0x7452, 0x7457,
+  0x745d, 0x7462, 0x7466, 0x7467, 0x7468, 0x746b, 0x746d, 0x746e,
+  0x7471, 0x7472, 0x7480, 0x7481, 0x7485, 0x7486, 0x7487, 0x7489,
+  0x748f, 0x7490, 0x7491, 0x7492, 0x7498, 0x7499, 0x749a, 0x749c,
+  0x749f, 0x74a0, 0x74a1, 0x74a3, 0x74a6, 0x74a8, 0x74a9, 0x74aa,
+  0x74ab, 0x74ae, 0x74af, 0x74b1, 0x74b2, 0x74b5, 0x74b9, 0x74bb,
+  0x74bf, 0x74c8, 0x74c9, 0x74cc, 0x74d0, 0x74d3, 0x74d8, 0x74da,
+  0x74db, 0x74de, 0x74df, 0x74e4, 0x74e8, 0x74ea, 0x74eb, 0x74ef,
+  0x74f4, 0x74fa, 0x74fb, 0x74fc, 0x74ff, 0x7506,
+  /* 0x4d */
+  0x7512, 0x7516, 0x7517, 0x7520, 0x7521, 0x7524, 0x7527, 0x7529,
+  0x752a, 0x752f, 0x7536, 0x7539, 0x753d, 0x753e, 0x753f, 0x7540,
+  0x7543, 0x7547, 0x7548, 0x754e, 0x7550, 0x7552, 0x7557, 0x755e,
+  0x755f, 0x7561, 0x756f, 0x7571, 0x7579, 0x757a, 0x757b, 0x757c,
+  0x757d, 0x757e, 0x7581, 0x7585, 0x7590, 0x7592, 0x7593, 0x7595,
+  0x7599, 0x759c, 0x75a2, 0x75a4, 0x75b4, 0x75ba, 0x75bf, 0x75c0,
+  0x75c1, 0x75c4, 0x75c6, 0x75cc, 0x75ce, 0x75cf, 0x75d7, 0x75dc,
+  0x75df, 0x75e0, 0x75e1, 0x75e4, 0x75e7, 0x75ec, 0x75ee, 0x75ef,
+  0x75f1, 0x75f9, 0x7600, 0x7602, 0x7603, 0x7604, 0x7607, 0x7608,
+  0x760a, 0x760c, 0x760f, 0x7612, 0x7613, 0x7615, 0x7616, 0x7619,
+  0x761b, 0x761c, 0x761d, 0x761e, 0x7623, 0x7625, 0x7626, 0x7629,
+  0x762d, 0x7632, 0x7633, 0x7635, 0x7638, 0x7639,
+  /* 0x4e */
+  0x763a, 0x763c, 0x764a, 0x7640, 0x7641, 0x7643, 0x7644, 0x7645,
+  0x7649, 0x764b, 0x7655, 0x7659, 0x765f, 0x7664, 0x7665, 0x766d,
+  0x766e, 0x766f, 0x7671, 0x7674, 0x7681, 0x7685, 0x768c, 0x768d,
+  0x7695, 0x769b, 0x769c, 0x769d, 0x769f, 0x76a0, 0x76a2, 0x76a3,
+  0x76a4, 0x76a5, 0x76a6, 0x76a7, 0x76a8, 0x76aa, 0x76ad, 0x76bd,
+  0x76c1, 0x76c5, 0x76c9, 0x76cb, 0x76cc, 0x76ce, 0x76d4, 0x76d9,
+  0x76e0, 0x76e6, 0x76e8, 0x76ec, 0x76f0, 0x76f1, 0x76f6, 0x76f9,
+  0x76fc, 0x7700, 0x7706, 0x770a, 0x770e, 0x7712, 0x7714, 0x7715,
+  0x7717, 0x7719, 0x771a, 0x771c, 0x7722, 0x7728, 0x772d, 0x772e,
+  0x772f, 0x7734, 0x7735, 0x7736, 0x7739, 0x773d, 0x773e, 0x7742,
+  0x7745, 0x7746, 0x774a, 0x774d, 0x774e, 0x774f, 0x7752, 0x7756,
+  0x7757, 0x775c, 0x775e, 0x775f, 0x7760, 0x7762,
+  /* 0x4f */
+  0x7764, 0x7767, 0x776a, 0x776c, 0x7770, 0x7772, 0x7773, 0x7774,
+  0x777a, 0x777d, 0x7780, 0x7784, 0x778c, 0x778d, 0x7794, 0x7795,
+  0x7796, 0x779a, 0x779f, 0x77a2, 0x77a7, 0x77aa, 0x77ae, 0x77af,
+  0x77b1, 0x77b5, 0x77be, 0x77c3, 0x77c9, 0x77d1, 0x77d2, 0x77d5,
+  0x77d9, 0x77de, 0x77df, 0x77e0, 0x77e4, 0x77e6, 0x77ea, 0x77ec,
+  0x77f0, 0x77f1, 0x77f4, 0x77f8, 0x77fb, 0x7805, 0x7806, 0x7809,
+  0x780d, 0x780e, 0x7811, 0x781d, 0x7821, 0x7822, 0x7823, 0x782d,
+  0x782e, 0x7830, 0x7835, 0x7837, 0x7843, 0x7844, 0x7847, 0x7848,
+  0x784c, 0x784e, 0x7852, 0x785c, 0x785e, 0x7860, 0x7861, 0x7863,
+  0x7864, 0x7868, 0x786a, 0x786e, 0x787a, 0x787e, 0x788a, 0x788f,
+  0x7894, 0x7898, 0x78a1, 0x789d, 0x789e, 0x789f, 0x78a4, 0x78a8,
+  0x78ac, 0x78ad, 0x78b0, 0x78b1, 0x78b2, 0x78b3,
+  /* 0x50 */
+  0x78bb, 0x78bd, 0x78bf, 0x78c7, 0x78c8, 0x78c9, 0x78cc, 0x78ce,
+  0x78d2, 0x78d3, 0x78d5, 0x78d6, 0x78e4, 0x78db, 0x78df, 0x78e0,
+  0x78e1, 0x78e6, 0x78ea, 0x78f2, 0x78f3, 0x7900, 0x78f6, 0x78f7,
+  0x78fa, 0x78fb, 0x78ff, 0x7906, 0x790c, 0x7910, 0x791a, 0x791c,
+  0x791e, 0x791f, 0x7920, 0x7925, 0x7927, 0x7929, 0x792d, 0x7931,
+  0x7934, 0x7935, 0x793b, 0x793d, 0x793f, 0x7944, 0x7945, 0x7946,
+  0x794a, 0x794b, 0x794f, 0x7951, 0x7954, 0x7958, 0x795b, 0x795c,
+  0x7967, 0x7969, 0x796b, 0x7972, 0x7979, 0x797b, 0x797c, 0x797e,
+  0x798b, 0x798c, 0x7991, 0x7993, 0x7994, 0x7995, 0x7996, 0x7998,
+  0x799b, 0x799c, 0x79a1, 0x79a8, 0x79a9, 0x79ab, 0x79af, 0x79b1,
+  0x79b4, 0x79b8, 0x79bb, 0x79c2, 0x79c4, 0x79c7, 0x79c8, 0x79ca,
+  0x79cf, 0x79d4, 0x79d6, 0x79da, 0x79dd, 0x79de,
+  /* 0x51 */
+  0x79e0, 0x79e2, 0x79e5, 0x79ea, 0x79eb, 0x79ed, 0x79f1, 0x79f8,
+  0x79fc, 0x7a02, 0x7a03, 0x7a07, 0x7a09, 0x7a0a, 0x7a0c, 0x7a11,
+  0x7a15, 0x7a1b, 0x7a1e, 0x7a21, 0x7a27, 0x7a2b, 0x7a2d, 0x7a2f,
+  0x7a30, 0x7a34, 0x7a35, 0x7a38, 0x7a39, 0x7a3a, 0x7a44, 0x7a45,
+  0x7a47, 0x7a48, 0x7a4c, 0x7a55, 0x7a56, 0x7a59, 0x7a5c, 0x7a5d,
+  0x7a5f, 0x7a60, 0x7a65, 0x7a67, 0x7a6a, 0x7a6d, 0x7a75, 0x7a78,
+  0x7a7e, 0x7a80, 0x7a82, 0x7a85, 0x7a86, 0x7a8a, 0x7a8b, 0x7a90,
+  0x7a91, 0x7a94, 0x7a9e, 0x7aa0, 0x7aa3, 0x7aac, 0x7ab3, 0x7ab5,
+  0x7ab9, 0x7abb, 0x7abc, 0x7ac6, 0x7ac9, 0x7acc, 0x7ace, 0x7ad1,
+  0x7adb, 0x7ae8, 0x7ae9, 0x7aeb, 0x7aec, 0x7af1, 0x7af4, 0x7afb,
+  0x7afd, 0x7afe, 0x7b07, 0x7b14, 0x7b1f, 0x7b23, 0x7b27, 0x7b29,
+  0x7b2a, 0x7b2b, 0x7b2d, 0x7b2e, 0x7b2f, 0x7b30,
+  /* 0x52 */
+  0x7b31, 0x7b34, 0x7b3d, 0x7b3f, 0x7b40, 0x7b41, 0x7b47, 0x7b4e,
+  0x7b55, 0x7b60, 0x7b64, 0x7b66, 0x7b69, 0x7b6a, 0x7b6d, 0x7b6f,
+  0x7b72, 0x7b73, 0x7b77, 0x7b84, 0x7b89, 0x7b8e, 0x7b90, 0x7b91,
+  0x7b96, 0x7b9b, 0x7b9e, 0x7ba0, 0x7ba5, 0x7bac, 0x7baf, 0x7bb0,
+  0x7bb2, 0x7bb5, 0x7bb6, 0x7bba, 0x7bbb, 0x7bbc, 0x7bbd, 0x7bc2,
+  0x7bc5, 0x7bc8, 0x7bca, 0x7bd4, 0x7bd6, 0x7bd7, 0x7bd9, 0x7bda,
+  0x7bdb, 0x7be8, 0x7bea, 0x7bf2, 0x7bf4, 0x7bf5, 0x7bf8, 0x7bf9,
+  0x7bfa, 0x7bfc, 0x7bfe, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c06,
+  0x7c09, 0x7c0b, 0x7c0c, 0x7c0e, 0x7c0f, 0x7c19, 0x7c1b, 0x7c20,
+  0x7c25, 0x7c26, 0x7c28, 0x7c2c, 0x7c31, 0x7c33, 0x7c34, 0x7c36,
+  0x7c39, 0x7c3a, 0x7c46, 0x7c4a, 0x7c55, 0x7c51, 0x7c52, 0x7c53,
+  0x7c59, 0x7c5a, 0x7c5b, 0x7c5c, 0x7c5d, 0x7c5e,
+  /* 0x53 */
+  0x7c61, 0x7c63, 0x7c67, 0x7c69, 0x7c6d, 0x7c6e, 0x7c70, 0x7c72,
+  0x7c79, 0x7c7c, 0x7c7d, 0x7c86, 0x7c87, 0x7c8f, 0x7c94, 0x7c9e,
+  0x7ca0, 0x7ca6, 0x7cb0, 0x7cb6, 0x7cb7, 0x7cba, 0x7cbb, 0x7cbc,
+  0x7cbf, 0x7cc4, 0x7cc7, 0x7cc8, 0x7cc9, 0x7ccd, 0x7ccf, 0x7cd3,
+  0x7cd4, 0x7cd5, 0x7cd7, 0x7cd9, 0x7cda, 0x7cdd, 0x7ce6, 0x7ce9,
+  0x7ceb, 0x7cf5, 0x7d03, 0x7d07, 0x7d08, 0x7d09, 0x7d0f, 0x7d11,
+  0x7d12, 0x7d13, 0x7d16, 0x7d1d, 0x7d1e, 0x7d23, 0x7d26, 0x7d2a,
+  0x7d2d, 0x7d31, 0x7d3c, 0x7d3d, 0x7d3e, 0x7d40, 0x7d41, 0x7d47,
+  0x7d48, 0x7d4d, 0x7d51, 0x7d53, 0x7d57, 0x7d59, 0x7d5a, 0x7d5c,
+  0x7d5d, 0x7d65, 0x7d67, 0x7d6a, 0x7d70, 0x7d78, 0x7d7a, 0x7d7b,
+  0x7d7f, 0x7d81, 0x7d82, 0x7d83, 0x7d85, 0x7d86, 0x7d88, 0x7d8b,
+  0x7d8c, 0x7d8d, 0x7d91, 0x7d96, 0x7d97, 0x7d9d,
+  /* 0x54 */
+  0x7d9e, 0x7da6, 0x7da7, 0x7daa, 0x7db3, 0x7db6, 0x7db7, 0x7db9,
+  0x7dc2, 0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dcc, 0x7dcd, 0x7dce,
+  0x7dd7, 0x7dd9, 0x7e00, 0x7de2, 0x7de5, 0x7de6, 0x7dea, 0x7deb,
+  0x7ded, 0x7df1, 0x7df5, 0x7df6, 0x7df9, 0x7dfa, 0x7e08, 0x7e10,
+  0x7e11, 0x7e15, 0x7e17, 0x7e1c, 0x7e1d, 0x7e20, 0x7e27, 0x7e28,
+  0x7e2c, 0x7e2d, 0x7e2f, 0x7e33, 0x7e36, 0x7e3f, 0x7e44, 0x7e45,
+  0x7e47, 0x7e4e, 0x7e50, 0x7e52, 0x7e58, 0x7e5f, 0x7e61, 0x7e62,
+  0x7e65, 0x7e6b, 0x7e6e, 0x7e6f, 0x7e73, 0x7e78, 0x7e7e, 0x7e81,
+  0x7e86, 0x7e87, 0x7e8a, 0x7e8d, 0x7e91, 0x7e95, 0x7e98, 0x7e9a,
+  0x7e9d, 0x7e9e, 0x7f3c, 0x7f3b, 0x7f3d, 0x7f3e, 0x7f3f, 0x7f43,
+  0x7f44, 0x7f47, 0x7f4f, 0x7f52, 0x7f53, 0x7f5b, 0x7f5c, 0x7f5d,
+  0x7f61, 0x7f63, 0x7f64, 0x7f65, 0x7f66, 0x7f6d,
+  /* 0x55 */
+  0x7f71, 0x7f7d, 0x7f7e, 0x7f7f, 0x7f80, 0x7f8b, 0x7f8d, 0x7f8f,
+  0x7f90, 0x7f91, 0x7f96, 0x7f97, 0x7f9c, 0x7fa1, 0x7fa2, 0x7fa6,
+  0x7faa, 0x7fad, 0x7fb4, 0x7fbc, 0x7fbf, 0x7fc0, 0x7fc3, 0x7fc8,
+  0x7fce, 0x7fcf, 0x7fdb, 0x7fdf, 0x7fe3, 0x7fe5, 0x7fe8, 0x7fec,
+  0x7fee, 0x7fef, 0x7ff2, 0x7ffa, 0x7ffd, 0x7ffe, 0x7fff, 0x8007,
+  0x8008, 0x800a, 0x800d, 0x800e, 0x800f, 0x8011, 0x8013, 0x8014,
+  0x8016, 0x801d, 0x801e, 0x801f, 0x8020, 0x8024, 0x8026, 0x802c,
+  0x802e, 0x8030, 0x8034, 0x8035, 0x8037, 0x8039, 0x803a, 0x803c,
+  0x803e, 0x8040, 0x8044, 0x8060, 0x8064, 0x8066, 0x806d, 0x8071,
+  0x8075, 0x8081, 0x8088, 0x808e, 0x809c, 0x809e, 0x80a6, 0x80a7,
+  0x80ab, 0x80b8, 0x80b9, 0x80c8, 0x80cd, 0x80cf, 0x80d2, 0x80d4,
+  0x80d5, 0x80d7, 0x80d8, 0x80e0, 0x80ed, 0x80ee,
+  /* 0x56 */
+  0x80f0, 0x80f2, 0x80f3, 0x80f6, 0x80f9, 0x80fa, 0x80fe, 0x8103,
+  0x810b, 0x8116, 0x8117, 0x8118, 0x811c, 0x811e, 0x8120, 0x8124,
+  0x8127, 0x812c, 0x8130, 0x8135, 0x813a, 0x813c, 0x8145, 0x8147,
+  0x814a, 0x814c, 0x8152, 0x8157, 0x8160, 0x8161, 0x8167, 0x8168,
+  0x8169, 0x816d, 0x816f, 0x8177, 0x8181, 0x8190, 0x8184, 0x8185,
+  0x8186, 0x818b, 0x818e, 0x8196, 0x8198, 0x819b, 0x819e, 0x81a2,
+  0x81ae, 0x81b2, 0x81b4, 0x81bb, 0x81cb, 0x81c3, 0x81c5, 0x81ca,
+  0x81ce, 0x81cf, 0x81d5, 0x81d7, 0x81db, 0x81dd, 0x81de, 0x81e1,
+  0x81e4, 0x81eb, 0x81ec, 0x81f0, 0x81f1, 0x81f2, 0x81f5, 0x81f6,
+  0x81f8, 0x81f9, 0x81fd, 0x81ff, 0x8200, 0x8203, 0x820f, 0x8213,
+  0x8214, 0x8219, 0x821a, 0x821d, 0x8221, 0x8222, 0x8228, 0x8232,
+  0x8234, 0x823a, 0x8243, 0x8244, 0x8245, 0x8246,
+  /* 0x57 */
+  0x824b, 0x824e, 0x824f, 0x8251, 0x8256, 0x825c, 0x8260, 0x8263,
+  0x8267, 0x826d, 0x8274, 0x827b, 0x827d, 0x827f, 0x8280, 0x8281,
+  0x8283, 0x8284, 0x8287, 0x8289, 0x828a, 0x828e, 0x8291, 0x8294,
+  0x8296, 0x8298, 0x829a, 0x829b, 0x82a0, 0x82a1, 0x82a3, 0x82a4,
+  0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ae, 0x82b0, 0x82b2, 0x82b4,
+  0x82b7, 0x82ba, 0x82bc, 0x82be, 0x82bf, 0x82c6, 0x82d0, 0x82d5,
+  0x82da, 0x82e0, 0x82e2, 0x82e4, 0x82e8, 0x82ea, 0x82ed, 0x82ef,
+  0x82f6, 0x82f7, 0x82fd, 0x82fe, 0x8300, 0x8301, 0x8307, 0x8308,
+  0x830a, 0x830b, 0x8354, 0x831b, 0x831d, 0x831e, 0x831f, 0x8321,
+  0x8322, 0x832c, 0x832d, 0x832e, 0x8330, 0x8333, 0x8337, 0x833a,
+  0x833c, 0x833d, 0x8342, 0x8343, 0x8344, 0x8347, 0x834d, 0x834e,
+  0x8351, 0x8355, 0x8356, 0x8357, 0x8370, 0x8378,
+  /* 0x58 */
+  0x837d, 0x837f, 0x8380, 0x8382, 0x8384, 0x8386, 0x838d, 0x8392,
+  0x8394, 0x8395, 0x8398, 0x8399, 0x839b, 0x839c, 0x839d, 0x83a6,
+  0x83a7, 0x83a9, 0x83ac, 0x83be, 0x83bf, 0x83c0, 0x83c7, 0x83c9,
+  0x83cf, 0x83d0, 0x83d1, 0x83d4, 0x83dd, 0x8353, 0x83e8, 0x83ea,
+  0x83f6, 0x83f8, 0x83f9, 0x83fc, 0x8401, 0x8406, 0x840a, 0x840f,
+  0x8411, 0x8415, 0x8419, 0x83ad, 0x842f, 0x8439, 0x8445, 0x8447,
+  0x8448, 0x844a, 0x844d, 0x844f, 0x8451, 0x8452, 0x8456, 0x8458,
+  0x8459, 0x845a, 0x845c, 0x8460, 0x8464, 0x8465, 0x8467, 0x846a,
+  0x8470, 0x8473, 0x8474, 0x8476, 0x8478, 0x847c, 0x847d, 0x8481,
+  0x8485, 0x8492, 0x8493, 0x8495, 0x849e, 0x84a6, 0x84a8, 0x84a9,
+  0x84aa, 0x84af, 0x84b1, 0x84b4, 0x84ba, 0x84bd, 0x84be, 0x84c0,
+  0x84c2, 0x84c7, 0x84c8, 0x84cc, 0x84cf, 0x84d3,
+  /* 0x59 */
+  0x84dc, 0x84e7, 0x84ea, 0x84ef, 0x84f0, 0x84f1, 0x84f2, 0x84f7,
+  0x8532, 0x84fa, 0x84fb, 0x84fd, 0x8502, 0x8503, 0x8507, 0x850c,
+  0x850e, 0x8510, 0x851c, 0x851e, 0x8522, 0x8523, 0x8524, 0x8525,
+  0x8527, 0x852a, 0x852b, 0x852f, 0x8533, 0x8534, 0x8536, 0x853f,
+  0x8546, 0x854f, 0x8550, 0x8551, 0x8552, 0x8553, 0x8556, 0x8559,
+  0x855c, 0x855d, 0x855e, 0x855f, 0x8560, 0x8561, 0x8562, 0x8564,
+  0x856b, 0x856f, 0x8579, 0x857a, 0x857b, 0x857d, 0x857f, 0x8581,
+  0x8585, 0x8586, 0x8589, 0x858b, 0x858c, 0x858f, 0x8593, 0x8598,
+  0x859d, 0x859f, 0x85a0, 0x85a2, 0x85a5, 0x85a7, 0x85b4, 0x85b6,
+  0x85b7, 0x85b8, 0x85bc, 0x85bd, 0x85be, 0x85bf, 0x85c2, 0x85c7,
+  0x85ca, 0x85cb, 0x85ce, 0x85ad, 0x85d8, 0x85da, 0x85df, 0x85e0,
+  0x85e6, 0x85e8, 0x85ed, 0x85f3, 0x85f6, 0x85fc,
+  /* 0x5a */
+  0x85ff, 0x8600, 0x8604, 0x8605, 0x860d, 0x860e, 0x8610, 0x8611,
+  0x8612, 0x8618, 0x8619, 0x861b, 0x861e, 0x8621, 0x8627, 0x8629,
+  0x8636, 0x8638, 0x863a, 0x863c, 0x863d, 0x8640, 0x8642, 0x8646,
+  0x8652, 0x8653, 0x8656, 0x8657, 0x8658, 0x8659, 0x865d, 0x8660,
+  0x8661, 0x8662, 0x8663, 0x8664, 0x8669, 0x866c, 0x866f, 0x8675,
+  0x8676, 0x8677, 0x867a, 0x868d, 0x8691, 0x8696, 0x8698, 0x869a,
+  0x869c, 0x86a1, 0x86a6, 0x86a7, 0x86a8, 0x86ad, 0x86b1, 0x86b3,
+  0x86b4, 0x86b5, 0x86b7, 0x86b8, 0x86b9, 0x86bf, 0x86c0, 0x86c1,
+  0x86c3, 0x86c5, 0x86d1, 0x86d2, 0x86d5, 0x86d7, 0x86da, 0x86dc,
+  0x86e0, 0x86e3, 0x86e5, 0x86e7, 0x8688, 0x86fa, 0x86fc, 0x86fd,
+  0x8704, 0x8705, 0x8707, 0x870b, 0x870e, 0x870f, 0x8710, 0x8713,
+  0x8714, 0x8719, 0x871e, 0x871f, 0x8721, 0x8723,
+  /* 0x5b */
+  0x8728, 0x872e, 0x872f, 0x8731, 0x8732, 0x8739, 0x873a, 0x873c,
+  0x873d, 0x873e, 0x8740, 0x8743, 0x8745, 0x874d, 0x8758, 0x875d,
+  0x8761, 0x8764, 0x8765, 0x876f, 0x8771, 0x8772, 0x877b, 0x8783,
+  0x8784, 0x8785, 0x8786, 0x8787, 0x8788, 0x8789, 0x878b, 0x878c,
+  0x8790, 0x8793, 0x8795, 0x8797, 0x8798, 0x8799, 0x879e, 0x87a0,
+  0x87a3, 0x87a7, 0x87ac, 0x87ad, 0x87ae, 0x87b1, 0x87b5, 0x87be,
+  0x87bf, 0x87c1, 0x87c8, 0x87c9, 0x87ca, 0x87ce, 0x87d5, 0x87d6,
+  0x87d9, 0x87da, 0x87dc, 0x87df, 0x87e2, 0x87e3, 0x87e4, 0x87ea,
+  0x87eb, 0x87ed, 0x87f1, 0x87f3, 0x87f8, 0x87fa, 0x87ff, 0x8801,
+  0x8803, 0x8806, 0x8809, 0x880a, 0x880b, 0x8810, 0x8819, 0x8812,
+  0x8813, 0x8814, 0x8818, 0x881a, 0x881b, 0x881c, 0x881e, 0x881f,
+  0x8828, 0x882d, 0x882e, 0x8830, 0x8832, 0x8835,
+  /* 0x5c */
+  0x883a, 0x883c, 0x8841, 0x8843, 0x8845, 0x8848, 0x8849, 0x884a,
+  0x884b, 0x884e, 0x8851, 0x8855, 0x8856, 0x8858, 0x885a, 0x885c,
+  0x885f, 0x8860, 0x8864, 0x8869, 0x8871, 0x8879, 0x887b, 0x8880,
+  0x8898, 0x889a, 0x889b, 0x889c, 0x889f, 0x88a0, 0x88a8, 0x88aa,
+  0x88ba, 0x88bd, 0x88be, 0x88c0, 0x88ca, 0x88cb, 0x88cc, 0x88cd,
+  0x88ce, 0x88d1, 0x88d2, 0x88d3, 0x88db, 0x88de, 0x88e7, 0x88ef,
+  0x88f0, 0x88f1, 0x88f5, 0x88f7, 0x8901, 0x8906, 0x890d, 0x890e,
+  0x890f, 0x8915, 0x8916, 0x8918, 0x8919, 0x891a, 0x891c, 0x8920,
+  0x8926, 0x8927, 0x8928, 0x8930, 0x8931, 0x8932, 0x8935, 0x8939,
+  0x893a, 0x893e, 0x8940, 0x8942, 0x8945, 0x8946, 0x8949, 0x894f,
+  0x8952, 0x8957, 0x895a, 0x895b, 0x895c, 0x8961, 0x8962, 0x8963,
+  0x896b, 0x896e, 0x8970, 0x8973, 0x8975, 0x897a,
+  /* 0x5d */
+  0x897b, 0x897c, 0x897d, 0x8989, 0x898d, 0x8990, 0x8994, 0x8995,
+  0x899b, 0x899c, 0x899f, 0x89a0, 0x89a5, 0x89b0, 0x89b4, 0x89b5,
+  0x89b6, 0x89b7, 0x89bc, 0x89d4, 0x89d5, 0x89d6, 0x89d7, 0x89d8,
+  0x89e5, 0x89e9, 0x89eb, 0x89ed, 0x89f1, 0x89f3, 0x89f6, 0x89f9,
+  0x89fd, 0x89ff, 0x8a04, 0x8a05, 0x8a07, 0x8a0f, 0x8a11, 0x8a12,
+  0x8a14, 0x8a15, 0x8a1e, 0x8a20, 0x8a22, 0x8a24, 0x8a26, 0x8a2b,
+  0x8a2c, 0x8a2f, 0x8a35, 0x8a37, 0x8a3d, 0x8a3e, 0x8a40, 0x8a43,
+  0x8a45, 0x8a47, 0x8a49, 0x8a4d, 0x8a4e, 0x8a53, 0x8a56, 0x8a57,
+  0x8a58, 0x8a5c, 0x8a5d, 0x8a61, 0x8a65, 0x8a67, 0x8a75, 0x8a76,
+  0x8a77, 0x8a79, 0x8a7a, 0x8a7b, 0x8a7e, 0x8a7f, 0x8a80, 0x8a83,
+  0x8a86, 0x8a8b, 0x8a8f, 0x8a90, 0x8a92, 0x8a96, 0x8a97, 0x8a99,
+  0x8a9f, 0x8aa7, 0x8aa9, 0x8aae, 0x8aaf, 0x8ab3,
+  /* 0x5e */
+  0x8ab6, 0x8ab7, 0x8abb, 0x8abe, 0x8ac3, 0x8ac6, 0x8ac8, 0x8ac9,
+  0x8aca, 0x8ad1, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad7, 0x8add, 0x8adf,
+  0x8aec, 0x8af0, 0x8af4, 0x8af5, 0x8af6, 0x8afc, 0x8aff, 0x8b05,
+  0x8b06, 0x8b0b, 0x8b11, 0x8b1c, 0x8b1e, 0x8b1f, 0x8b0a, 0x8b2d,
+  0x8b30, 0x8b37, 0x8b3c, 0x8b42, 0x8b43, 0x8b44, 0x8b45, 0x8b46,
+  0x8b48, 0x8b52, 0x8b53, 0x8b54, 0x8b59, 0x8b4d, 0x8b5e, 0x8b63,
+  0x8b6d, 0x8b76, 0x8b78, 0x8b79, 0x8b7c, 0x8b7e, 0x8b81, 0x8b84,
+  0x8b85, 0x8b8b, 0x8b8d, 0x8b8f, 0x8b94, 0x8b95, 0x8b9c, 0x8b9e,
+  0x8b9f, 0x8c38, 0x8c39, 0x8c3d, 0x8c3e, 0x8c45, 0x8c47, 0x8c49,
+  0x8c4b, 0x8c4f, 0x8c51, 0x8c53, 0x8c54, 0x8c57, 0x8c58, 0x8c5b,
+  0x8c5d, 0x8c59, 0x8c63, 0x8c64, 0x8c66, 0x8c68, 0x8c69, 0x8c6d,
+  0x8c73, 0x8c75, 0x8c76, 0x8c7b, 0x8c7e, 0x8c86,
+  /* 0x5f */
+  0x8c87, 0x8c8b, 0x8c90, 0x8c92, 0x8c93, 0x8c99, 0x8c9b, 0x8c9c,
+  0x8ca4, 0x8cb9, 0x8cba, 0x8cc5, 0x8cc6, 0x8cc9, 0x8ccb, 0x8ccf,
+  0x8cd6, 0x8cd5, 0x8cd9, 0x8cdd, 0x8ce1, 0x8ce8, 0x8cec, 0x8cef,
+  0x8cf0, 0x8cf2, 0x8cf5, 0x8cf7, 0x8cf8, 0x8cfe, 0x8cff, 0x8d01,
+  0x8d03, 0x8d09, 0x8d12, 0x8d17, 0x8d1b, 0x8d65, 0x8d69, 0x8d6c,
+  0x8d6e, 0x8d7f, 0x8d82, 0x8d84, 0x8d88, 0x8d8d, 0x8d90, 0x8d91,
+  0x8d95, 0x8d9e, 0x8d9f, 0x8da0, 0x8da6, 0x8dab, 0x8dac, 0x8daf,
+  0x8db2, 0x8db5, 0x8db7, 0x8db9, 0x8dbb, 0x8dc0, 0x8dc5, 0x8dc6,
+  0x8dc7, 0x8dc8, 0x8dca, 0x8dce, 0x8dd1, 0x8dd4, 0x8dd5, 0x8dd7,
+  0x8dd9, 0x8de4, 0x8de5, 0x8de7, 0x8dec, 0x8df0, 0x8dbc, 0x8df1,
+  0x8df2, 0x8df4, 0x8dfd, 0x8e01, 0x8e04, 0x8e05, 0x8e06, 0x8e0b,
+  0x8e11, 0x8e14, 0x8e16, 0x8e20, 0x8e21, 0x8e22,
+  /* 0x60 */
+  0x8e23, 0x8e26, 0x8e27, 0x8e31, 0x8e33, 0x8e36, 0x8e37, 0x8e38,
+  0x8e39, 0x8e3d, 0x8e40, 0x8e41, 0x8e4b, 0x8e4d, 0x8e4e, 0x8e4f,
+  0x8e54, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, 0x8e61, 0x8e62, 0x8e69,
+  0x8e6c, 0x8e6d, 0x8e6f, 0x8e70, 0x8e71, 0x8e79, 0x8e7a, 0x8e7b,
+  0x8e82, 0x8e83, 0x8e89, 0x8e90, 0x8e92, 0x8e95, 0x8e9a, 0x8e9b,
+  0x8e9d, 0x8e9e, 0x8ea2, 0x8ea7, 0x8ea9, 0x8ead, 0x8eae, 0x8eb3,
+  0x8eb5, 0x8eba, 0x8ebb, 0x8ec0, 0x8ec1, 0x8ec3, 0x8ec4, 0x8ec7,
+  0x8ecf, 0x8ed1, 0x8ed4, 0x8edc, 0x8ee8, 0x8eee, 0x8ef0, 0x8ef1,
+  0x8ef7, 0x8ef9, 0x8efa, 0x8eed, 0x8f00, 0x8f02, 0x8f07, 0x8f08,
+  0x8f0f, 0x8f10, 0x8f16, 0x8f17, 0x8f18, 0x8f1e, 0x8f20, 0x8f21,
+  0x8f23, 0x8f25, 0x8f27, 0x8f28, 0x8f2c, 0x8f2d, 0x8f2e, 0x8f34,
+  0x8f35, 0x8f36, 0x8f37, 0x8f3a, 0x8f40, 0x8f41,
+  /* 0x61 */
+  0x8f43, 0x8f47, 0x8f4f, 0x8f51, 0x8f52, 0x8f53, 0x8f54, 0x8f55,
+  0x8f58, 0x8f5d, 0x8f5e, 0x8f65, 0x8f9d, 0x8fa0, 0x8fa1, 0x8fa4,
+  0x8fa5, 0x8fa6, 0x8fb5, 0x8fb6, 0x8fb8, 0x8fbe, 0x8fc0, 0x8fc1,
+  0x8fc6, 0x8fca, 0x8fcb, 0x8fcd, 0x8fd0, 0x8fd2, 0x8fd3, 0x8fd5,
+  0x8fe0, 0x8fe3, 0x8fe4, 0x8fe8, 0x8fee, 0x8ff1, 0x8ff5, 0x8ff6,
+  0x8ffb, 0x8ffe, 0x9002, 0x9004, 0x9008, 0x900c, 0x9018, 0x901b,
+  0x9028, 0x9029, 0x902f, 0x902a, 0x902c, 0x902d, 0x9033, 0x9034,
+  0x9037, 0x903f, 0x9043, 0x9044, 0x904c, 0x905b, 0x905d, 0x9062,
+  0x9066, 0x9067, 0x906c, 0x9070, 0x9074, 0x9079, 0x9085, 0x9088,
+  0x908b, 0x908c, 0x908e, 0x9090, 0x9095, 0x9097, 0x9098, 0x9099,
+  0x909b, 0x90a0, 0x90a1, 0x90a2, 0x90a5, 0x90b0, 0x90b2, 0x90b3,
+  0x90b4, 0x90b6, 0x90bd, 0x90cc, 0x90be, 0x90c3,
+  /* 0x62 */
+  0x90c4, 0x90c5, 0x90c7, 0x90c8, 0x90d5, 0x90d7, 0x90d8, 0x90d9,
+  0x90dc, 0x90dd, 0x90df, 0x90e5, 0x90d2, 0x90f6, 0x90eb, 0x90ef,
+  0x90f0, 0x90f4, 0x90fe, 0x90ff, 0x9100, 0x9104, 0x9105, 0x9106,
+  0x9108, 0x910d, 0x9110, 0x9114, 0x9116, 0x9117, 0x9118, 0x911a,
+  0x911c, 0x911e, 0x9120, 0x9125, 0x9122, 0x9123, 0x9127, 0x9129,
+  0x912e, 0x912f, 0x9131, 0x9134, 0x9136, 0x9137, 0x9139, 0x913a,
+  0x913c, 0x913d, 0x9143, 0x9147, 0x9148, 0x914f, 0x9153, 0x9157,
+  0x9159, 0x915a, 0x915b, 0x9161, 0x9164, 0x9167, 0x916d, 0x9174,
+  0x9179, 0x917a, 0x917b, 0x9181, 0x9183, 0x9185, 0x9186, 0x918a,
+  0x918e, 0x9191, 0x9193, 0x9194, 0x9195, 0x9198, 0x919e, 0x91a1,
+  0x91a6, 0x91a8, 0x91ac, 0x91ad, 0x91ae, 0x91b0, 0x91b1, 0x91b2,
+  0x91b3, 0x91b6, 0x91bb, 0x91bc, 0x91bd, 0x91bf,
+  /* 0x63 */
+  0x91c2, 0x91c3, 0x91c5, 0x91d3, 0x91d4, 0x91d7, 0x91d9, 0x91da,
+  0x91de, 0x91e4, 0x91e5, 0x91e9, 0x91ea, 0x91ec, 0x91ed, 0x91ee,
+  0x91ef, 0x91f0, 0x91f1, 0x91f7, 0x91f9, 0x91fb, 0x91fd, 0x9200,
+  0x9201, 0x9204, 0x9205, 0x9206, 0x9207, 0x9209, 0x920a, 0x920c,
+  0x9210, 0x9212, 0x9213, 0x9216, 0x9218, 0x921c, 0x921d, 0x9223,
+  0x9224, 0x9225, 0x9226, 0x9228, 0x922e, 0x922f, 0x9230, 0x9233,
+  0x9235, 0x9236, 0x9238, 0x9239, 0x923a, 0x923c, 0x923e, 0x9240,
+  0x9242, 0x9243, 0x9246, 0x9247, 0x924a, 0x924d, 0x924e, 0x924f,
+  0x9251, 0x9258, 0x9259, 0x925c, 0x925d, 0x9260, 0x9261, 0x9265,
+  0x9267, 0x9268, 0x9269, 0x926e, 0x926f, 0x9270, 0x9275, 0x9276,
+  0x9277, 0x9278, 0x9279, 0x927b, 0x927c, 0x927d, 0x927f, 0x9288,
+  0x9289, 0x928a, 0x928d, 0x928e, 0x9292, 0x9297,
+  /* 0x64 */
+  0x9299, 0x929f, 0x92a0, 0x92a4, 0x92a5, 0x92a7, 0x92a8, 0x92ab,
+  0x92af, 0x92b2, 0x92b6, 0x92b8, 0x92ba, 0x92bb, 0x92bc, 0x92bd,
+  0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c5, 0x92c6, 0x92c7,
+  0x92c8, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92d0, 0x92d3, 0x92d5,
+  0x92d7, 0x92d8, 0x92d9, 0x92dc, 0x92dd, 0x92df, 0x92e0, 0x92e1,
+  0x92e3, 0x92e5, 0x92e7, 0x92e8, 0x92ec, 0x92ee, 0x92f0, 0x92f9,
+  0x92fb, 0x92ff, 0x9300, 0x9302, 0x9308, 0x930d, 0x9311, 0x9314,
+  0x9315, 0x931c, 0x931d, 0x931e, 0x931f, 0x9321, 0x9324, 0x9325,
+  0x9327, 0x9329, 0x932a, 0x9333, 0x9334, 0x9336, 0x9337, 0x9347,
+  0x9348, 0x9349, 0x9350, 0x9351, 0x9352, 0x9355, 0x9357, 0x9358,
+  0x935a, 0x935e, 0x9364, 0x9365, 0x9367, 0x9369, 0x936a, 0x936d,
+  0x936f, 0x9370, 0x9371, 0x9373, 0x9374, 0x9376,
+  /* 0x65 */
+  0x937a, 0x937d, 0x937f, 0x9380, 0x9381, 0x9382, 0x9388, 0x938a,
+  0x938b, 0x938d, 0x938f, 0x9392, 0x9395, 0x9398, 0x939b, 0x939e,
+  0x93a1, 0x93a3, 0x93a4, 0x93a6, 0x93a8, 0x93ab, 0x93b4, 0x93b5,
+  0x93b6, 0x93ba, 0x93a9, 0x93c1, 0x93c4, 0x93c5, 0x93c6, 0x93c7,
+  0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, 0x93d3, 0x93d9, 0x93dc,
+  0x93de, 0x93df, 0x93e2, 0x93e6, 0x93e7, 0x93f9, 0x93f7, 0x93f8,
+  0x93fa, 0x93fb, 0x93fd, 0x9401, 0x9402, 0x9404, 0x9408, 0x9409,
+  0x940d, 0x940e, 0x940f, 0x9415, 0x9416, 0x9417, 0x941f, 0x942e,
+  0x942f, 0x9431, 0x9432, 0x9433, 0x9434, 0x943b, 0x943f, 0x943d,
+  0x9443, 0x9445, 0x9448, 0x944a, 0x944c, 0x9455, 0x9459, 0x945c,
+  0x945f, 0x9461, 0x9463, 0x9468, 0x946b, 0x946d, 0x946e, 0x946f,
+  0x9471, 0x9472, 0x9484, 0x9483, 0x9578, 0x9579,
+  /* 0x66 */
+  0x957e, 0x9584, 0x9588, 0x958c, 0x958d, 0x958e, 0x959d, 0x959e,
+  0x959f, 0x95a1, 0x95a6, 0x95a9, 0x95ab, 0x95ac, 0x95b4, 0x95b6,
+  0x95ba, 0x95bd, 0x95bf, 0x95c6, 0x95c8, 0x95c9, 0x95cb, 0x95d0,
+  0x95d1, 0x95d2, 0x95d3, 0x95d9, 0x95da, 0x95dd, 0x95de, 0x95df,
+  0x95e0, 0x95e4, 0x95e6, 0x961d, 0x961e, 0x9622, 0x9624, 0x9625,
+  0x9626, 0x962c, 0x9631, 0x9633, 0x9637, 0x9638, 0x9639, 0x963a,
+  0x963c, 0x963d, 0x9641, 0x9652, 0x9654, 0x9656, 0x9657, 0x9658,
+  0x9661, 0x966e, 0x9674, 0x967b, 0x967c, 0x967e, 0x967f, 0x9681,
+  0x9682, 0x9683, 0x9684, 0x9689, 0x9691, 0x9696, 0x969a, 0x969d,
+  0x969f, 0x96a4, 0x96a5, 0x96a6, 0x96a9, 0x96ae, 0x96af, 0x96b3,
+  0x96ba, 0x96ca, 0x96d2, 0x5db2, 0x96d8, 0x96da, 0x96dd, 0x96de,
+  0x96df, 0x96e9, 0x96ef, 0x96f1, 0x96fa, 0x9702,
+  /* 0x67 */
+  0x9703, 0x9705, 0x9709, 0x971a, 0x971b, 0x971d, 0x9721, 0x9722,
+  0x9723, 0x9728, 0x9731, 0x9733, 0x9741, 0x9743, 0x974a, 0x974e,
+  0x974f, 0x9755, 0x9757, 0x9758, 0x975a, 0x975b, 0x9763, 0x9767,
+  0x976a, 0x976e, 0x9773, 0x9776, 0x9777, 0x9778, 0x977b, 0x977d,
+  0x977f, 0x9780, 0x9789, 0x9795, 0x9796, 0x9797, 0x9799, 0x979a,
+  0x979e, 0x979f, 0x97a2, 0x97ac, 0x97ae, 0x97b1, 0x97b2, 0x97b5,
+  0x97b6, 0x97b8, 0x97b9, 0x97ba, 0x97bc, 0x97be, 0x97bf, 0x97c1,
+  0x97c4, 0x97c5, 0x97c7, 0x97c9, 0x97ca, 0x97cc, 0x97cd, 0x97ce,
+  0x97d0, 0x97d1, 0x97d4, 0x97d7, 0x97d8, 0x97d9, 0x97dd, 0x97de,
+  0x97e0, 0x97db, 0x97e1, 0x97e4, 0x97ef, 0x97f1, 0x97f4, 0x97f7,
+  0x97f8, 0x97fa, 0x9807, 0x980a, 0x9819, 0x980d, 0x980e, 0x9814,
+  0x9816, 0x981c, 0x981e, 0x9820, 0x9823, 0x9826,
+  /* 0x68 */
+  0x982b, 0x982e, 0x982f, 0x9830, 0x9832, 0x9833, 0x9835, 0x9825,
+  0x983e, 0x9844, 0x9847, 0x984a, 0x9851, 0x9852, 0x9853, 0x9856,
+  0x9857, 0x9859, 0x985a, 0x9862, 0x9863, 0x9865, 0x9866, 0x986a,
+  0x986c, 0x98ab, 0x98ad, 0x98ae, 0x98b0, 0x98b4, 0x98b7, 0x98b8,
+  0x98ba, 0x98bb, 0x98bf, 0x98c2, 0x98c5, 0x98c8, 0x98cc, 0x98e1,
+  0x98e3, 0x98e5, 0x98e6, 0x98e7, 0x98ea, 0x98f3, 0x98f6, 0x9902,
+  0x9907, 0x9908, 0x9911, 0x9915, 0x9916, 0x9917, 0x991a, 0x991b,
+  0x991c, 0x991f, 0x9922, 0x9926, 0x9927, 0x992b, 0x9931, 0x9932,
+  0x9933, 0x9934, 0x9935, 0x9939, 0x993a, 0x993b, 0x993c, 0x9940,
+  0x9941, 0x9946, 0x9947, 0x9948, 0x994d, 0x994e, 0x9954, 0x9958,
+  0x9959, 0x995b, 0x995c, 0x995e, 0x995f, 0x9960, 0x999b, 0x999d,
+  0x999f, 0x99a6, 0x99b0, 0x99b1, 0x99b2, 0x99b5,
+  /* 0x69 */
+  0x99b9, 0x99ba, 0x99bd, 0x99bf, 0x99c3, 0x99c9, 0x99d3, 0x99d4,
+  0x99d9, 0x99da, 0x99dc, 0x99de, 0x99e7, 0x99ea, 0x99eb, 0x99ec,
+  0x99f0, 0x99f4, 0x99f5, 0x99f9, 0x99fd, 0x99fe, 0x9a02, 0x9a03,
+  0x9a04, 0x9a0b, 0x9a0c, 0x9a10, 0x9a11, 0x9a16, 0x9a1e, 0x9a20,
+  0x9a22, 0x9a23, 0x9a24, 0x9a27, 0x9a2d, 0x9a2e, 0x9a33, 0x9a35,
+  0x9a36, 0x9a38, 0x9a47, 0x9a41, 0x9a44, 0x9a4a, 0x9a4b, 0x9a4c,
+  0x9a4e, 0x9a51, 0x9a54, 0x9a56, 0x9a5d, 0x9aaa, 0x9aac, 0x9aae,
+  0x9aaf, 0x9ab2, 0x9ab4, 0x9ab5, 0x9ab6, 0x9ab9, 0x9abb, 0x9abe,
+  0x9abf, 0x9ac1, 0x9ac3, 0x9ac6, 0x9ac8, 0x9ace, 0x9ad0, 0x9ad2,
+  0x9ad5, 0x9ad6, 0x9ad7, 0x9adb, 0x9adc, 0x9ae0, 0x9ae4, 0x9ae5,
+  0x9ae7, 0x9ae9, 0x9aec, 0x9af2, 0x9af3, 0x9af5, 0x9af9, 0x9afa,
+  0x9afd, 0x9aff, 0x9b00, 0x9b01, 0x9b02, 0x9b03,
+  /* 0x6a */
+  0x9b04, 0x9b05, 0x9b08, 0x9b09, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e,
+  0x9b10, 0x9b12, 0x9b16, 0x9b19, 0x9b1b, 0x9b1c, 0x9b20, 0x9b26,
+  0x9b2b, 0x9b2d, 0x9b33, 0x9b34, 0x9b35, 0x9b37, 0x9b39, 0x9b3a,
+  0x9b3d, 0x9b48, 0x9b4b, 0x9b4c, 0x9b55, 0x9b56, 0x9b57, 0x9b5b,
+  0x9b5e, 0x9b61, 0x9b63, 0x9b65, 0x9b66, 0x9b68, 0x9b6a, 0x9b6b,
+  0x9b6c, 0x9b6d, 0x9b6e, 0x9b73, 0x9b75, 0x9b77, 0x9b78, 0x9b79,
+  0x9b7f, 0x9b80, 0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b89, 0x9b8a,
+  0x9b8b, 0x9b8d, 0x9b8f, 0x9b90, 0x9b94, 0x9b9a, 0x9b9d, 0x9b9e,
+  0x9ba6, 0x9ba7, 0x9ba9, 0x9bac, 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb7,
+  0x9bb8, 0x9bbb, 0x9bbc, 0x9bbe, 0x9bbf, 0x9bc1, 0x9bc7, 0x9bc8,
+  0x9bce, 0x9bd0, 0x9bd7, 0x9bd8, 0x9bdd, 0x9bdf, 0x9be5, 0x9be7,
+  0x9bea, 0x9beb, 0x9bef, 0x9bf3, 0x9bf7, 0x9bf8,
+  /* 0x6b */
+  0x9bf9, 0x9bfa, 0x9bfd, 0x9bff, 0x9c00, 0x9c02, 0x9c0b, 0x9c0f,
+  0x9c11, 0x9c16, 0x9c18, 0x9c19, 0x9c1a, 0x9c1c, 0x9c1e, 0x9c22,
+  0x9c23, 0x9c26, 0x9c27, 0x9c28, 0x9c29, 0x9c2a, 0x9c31, 0x9c35,
+  0x9c36, 0x9c37, 0x9c3d, 0x9c41, 0x9c43, 0x9c44, 0x9c45, 0x9c49,
+  0x9c4a, 0x9c4e, 0x9c4f, 0x9c50, 0x9c53, 0x9c54, 0x9c56, 0x9c58,
+  0x9c5b, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c63, 0x9c69, 0x9c6a, 0x9c5c,
+  0x9c6b, 0x9c68, 0x9c6e, 0x9c70, 0x9c72, 0x9c75, 0x9c77, 0x9c7b,
+  0x9ce6, 0x9cf2, 0x9cf7, 0x9cf9, 0x9d0b, 0x9d02, 0x9d11, 0x9d17,
+  0x9d18, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d2f, 0x9d30, 0x9d32, 0x9d33,
+  0x9d34, 0x9d3a, 0x9d3c, 0x9d45, 0x9d3d, 0x9d42, 0x9d43, 0x9d47,
+  0x9d4a, 0x9d53, 0x9d54, 0x9d5f, 0x9d63, 0x9d62, 0x9d65, 0x9d69,
+  0x9d6a, 0x9d6b, 0x9d70, 0x9d76, 0x9d77, 0x9d7b,
+  /* 0x6c */
+  0x9d7c, 0x9d7e, 0x9d83, 0x9d84, 0x9d86, 0x9d8a, 0x9d8d, 0x9d8e,
+  0x9d92, 0x9d93, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9da1, 0x9daa,
+  0x9dac, 0x9dae, 0x9db1, 0x9db5, 0x9db9, 0x9dbc, 0x9dbf, 0x9dc3,
+  0x9dc7, 0x9dc9, 0x9dca, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dda,
+  0x9dde, 0x9ddf, 0x9de0, 0x9de5, 0x9de7, 0x9de9, 0x9deb, 0x9dee,
+  0x9df0, 0x9df3, 0x9df4, 0x9dfe, 0x9e0a, 0x9e02, 0x9e07, 0x9e0e,
+  0x9e10, 0x9e11, 0x9e12, 0x9e15, 0x9e16, 0x9e19, 0x9e1c, 0x9e1d,
+  0x9e7a, 0x9e7b, 0x9e7c, 0x9e80, 0x9e82, 0x9e83, 0x9e84, 0x9e85,
+  0x9e87, 0x9e8e, 0x9e8f, 0x9e96, 0x9e98, 0x9e9b, 0x9e9e, 0x9ea4,
+  0x9ea8, 0x9eac, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb3, 0x9eb4, 0x9eb5,
+  0x9ec6, 0x9ec8, 0x9ecb, 0x9ed5, 0x9edf, 0x9ee4, 0x9ee7, 0x9eec,
+  0x9eed, 0x9eee, 0x9ef0, 0x9ef1, 0x9ef2, 0x9ef5,
+  /* 0x6d */
+  0x9ef8, 0x9eff, 0x9f02, 0x9f03, 0x9f09, 0x9f0f, 0x9f10, 0x9f11,
+  0x9f12, 0x9f14, 0x9f16, 0x9f17, 0x9f19, 0x9f1a, 0x9f1b, 0x9f1f,
+  0x9f22, 0x9f26, 0x9f2a, 0x9f2b, 0x9f2f, 0x9f31, 0x9f32, 0x9f34,
+  0x9f37, 0x9f39, 0x9f3a, 0x9f3c, 0x9f3d, 0x9f3f, 0x9f41, 0x9f43,
+  0x9f44, 0x9f45, 0x9f46, 0x9f47, 0x9f53, 0x9f55, 0x9f56, 0x9f57,
+  0x9f58, 0x9f5a, 0x9f5d, 0x9f5e, 0x9f68, 0x9f69, 0x9f6d, 0x9f6e,
+  0x9f6f, 0x9f70, 0x9f71, 0x9f73, 0x9f75, 0x9f7a, 0x9f7d, 0x9f8f,
+  0x9f90, 0x9f91, 0x9f92, 0x9f94, 0x9f96, 0x9f97, 0x9f9e, 0x9fa1,
+  0x9fa2, 0x9fa3, 0x9fa5,
+};
+
+static int
+jisx0212_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = (s[0] & 0x7F);
+  if ((c1 == 0x22) || (c1 >= 0x26 && c1 <= 0x27) || (c1 >= 0x29 && c1 <= 0x2b) || (c1 >= 0x30 && c1 <= 0x6d)) {
+    if (n >= 2) {
+      unsigned char c2 = (s[1] & 0x7F);
+      if (c2 >= 0x21 && c2 < 0x7f) {
+        unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
+        unsigned short wc = 0xfffd;
+        if (i < 470) {
+          if (i < 175)
+            wc = jisx0212_2uni_page22[i-94];
+        } else if (i < 752) {
+          if (i < 658)
+            wc = jisx0212_2uni_page26[i-470];
+        } else if (i < 1410) {
+          if (i < 1027)
+            wc = jisx0212_2uni_page29[i-752];
+        } else {
+          if (i < 7211)
+            wc = jisx0212_2uni_page30[i-1410];
+        }
+        if (wc != 0xfffd) {
+          *pwc = (ucs4_t) wc;
+          return 2;
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+static const unsigned short jisx0212_2charset[6067] = {
+  0x2237, 0x2242, 0x2270, 0x2243, 0x226d, 0x226c, 0x226e, 0x2234,
+  0x2231, 0x226b, 0x2244, 0x2a22, 0x2a21, 0x2a24, 0x2a2a, 0x2a23,
+  0x2a29, 0x2921, 0x2a2e, 0x2a32, 0x2a31, 0x2a34, 0x2a33, 0x2a40,
+  0x2a3f, 0x2a42, 0x2a41, 0x2a50, 0x2a52, 0x2a51, 0x2a54, 0x2a58,
+  0x2a53, 0x292c, 0x2a63, 0x2a62, 0x2a65, 0x2a64, 0x2a72, 0x2930,
+  0x294e, 0x2b22, 0x2b21, 0x2b24, 0x2b2a, 0x2b23, 0x2b29, 0x2941,
+  0x2b2e, 0x2b32, 0x2b31, 0x2b34, 0x2b33, 0x2b40, 0x2b3f, 0x2b42,
+  0x2b41, 0x2943, 0x2b50, 0x2b52, 0x2b51, 0x2b54, 0x2b58, 0x2b53,
+  0x294c, 0x2b63, 0x2b62, 0x2b65, 0x2b64, 0x2b72, 0x2950, 0x2b73,
+  0x2a27, 0x2b27, 0x2a25, 0x2b25, 0x2a28, 0x2b28, 0x2a2b, 0x2b2b,
+  0x2a2c, 0x2b2c, 0x2a2f, 0x2b2f, 0x2a2d, 0x2b2d, 0x2a30, 0x2b30,
+  0x2922, 0x2942, 0x2a37, 0x2b37, 0x2a36, 0x2b36, 0x2a38, 0x2b38,
+  0x2a35, 0x2b35, 0x2a3a, 0x2b3a, 0x2a3b, 0x2b3b, 0x2a3d, 0x2b3d,
+  0x2a3c, 0x2a3e, 0x2b3e, 0x2924, 0x2944, 0x2a47, 0x2b47, 0x2a45,
+  0x2b45, 0x2a46, 0x2b46, 0x2a44, 0x2945, 0x2926, 0x2946, 0x2a48,
+  0x2b48, 0x2a49, 0x2b49, 0x2947, 0x2a4a, 0x2b4a, 0x2a4c, 0x2b4c,
+  0x2a4b, 0x2b4b, 0x2929, 0x2949, 0x2928, 0x2948, 0x2a4d, 0x2b4d,
+  0x2a4f, 0x2b4f, 0x2a4e, 0x2b4e, 0x294a, 0x292b, 0x294b, 0x2a57,
+  0x2b57, 0x2a56, 0x2b56, 0x292d, 0x294d, 0x2a59, 0x2b59, 0x2a5b,
+  0x2b5b, 0x2a5a, 0x2b5a, 0x2a5c, 0x2b5c, 0x2a5d, 0x2b5d, 0x2a5f,
+  0x2b5f, 0x2a5e, 0x2b5e, 0x2a61, 0x2b61, 0x2a60, 0x2b60, 0x292f,
+  0x294f, 0x2a6c, 0x2b6c, 0x2a69, 0x2b69, 0x2a66, 0x2b66, 0x2a6b,
+  0x2b6b, 0x2a68, 0x2b68, 0x2a6a, 0x2b6a, 0x2a71, 0x2b71, 0x2a74,
+  0x2b74, 0x2a73, 0x2a75, 0x2b75, 0x2a77, 0x2b77, 0x2a76, 0x2b76,
+  0x2a26, 0x2b26, 0x2a43, 0x2b43, 0x2a55, 0x2b55, 0x2a67, 0x2b67,
+  0x2a70, 0x2b70, 0x2a6d, 0x2b6d, 0x2a6f, 0x2b6f, 0x2a6e, 0x2b6e,
+  0x2b39, 0x2230, 0x222f, 0x2232, 0x2236, 0x2235, 0x2233, 0x2238,
+  0x2239, 0x2661, 0x2662, 0x2663, 0x2664, 0x2667, 0x2669, 0x266c,
+  0x2676, 0x2665, 0x266a, 0x2671, 0x2672, 0x2673, 0x2674, 0x267b,
+  0x2678, 0x2675, 0x267a, 0x2677, 0x2679, 0x267c, 0x2742, 0x2743,
+  0x2744, 0x2745, 0x2746, 0x2747, 0x2748, 0x2749, 0x274a, 0x274b,
+  0x274c, 0x274d, 0x274e, 0x2772, 0x2773, 0x2774, 0x2775, 0x2776,
+  0x2777, 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e,
+  0x2271, 0x226f, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026,
+  0x3027, 0x3028, 0x3029, 0x302a, 0x302b, 0x302c, 0x302d, 0x302e,
+  0x302f, 0x3030, 0x3031, 0x3032, 0x3033, 0x3034, 0x3035, 0x3036,
+  0x3037, 0x3038, 0x3039, 0x303a, 0x303b, 0x303c, 0x303d, 0x303e,
+  0x303f, 0x3040, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046,
+  0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e,
+  0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056,
+  0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e,
+  0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067,
+  0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f,
+  0x3070, 0x305f, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076,
+  0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e,
+  0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128,
+  0x3129, 0x312a, 0x312b, 0x312c, 0x312d, 0x312e, 0x312f, 0x3130,
+  0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138,
+  0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140,
+  0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
+  0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150,
+  0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158,
+  0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x3176, 0x315f,
+  0x3160, 0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167,
+  0x3168, 0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f,
+  0x3170, 0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3177, 0x3178,
+  0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x3221, 0x3222,
+  0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0x322a,
+  0x322b, 0x322c, 0x322d, 0x322e, 0x322f, 0x3230, 0x3231, 0x3232,
+  0x3233, 0x3234, 0x3235, 0x3236, 0x3237, 0x3238, 0x3239, 0x323a,
+  0x323b, 0x323c, 0x323d, 0x323e, 0x323f, 0x3240, 0x3241, 0x3242,
+  0x3243, 0x3244, 0x3245, 0x3251, 0x3246, 0x3247, 0x3248, 0x3249,
+  0x324a, 0x324b, 0x324c, 0x324d, 0x324e, 0x324f, 0x3250, 0x3252,
+  0x3253, 0x3254, 0x3255, 0x3256, 0x3257, 0x3258, 0x3259, 0x325a,
+  0x325b, 0x325c, 0x325d, 0x325e, 0x325f, 0x3260, 0x3261, 0x3262,
+  0x3263, 0x3264, 0x3265, 0x3266, 0x3267, 0x3268, 0x3269, 0x326a,
+  0x326b, 0x326c, 0x326d, 0x326e, 0x326f, 0x3270, 0x3271, 0x3272,
+  0x3273, 0x3274, 0x3275, 0x3276, 0x3277, 0x3278, 0x3279, 0x327a,
+  0x327b, 0x327c, 0x327d, 0x327e, 0x3321, 0x3322, 0x3323, 0x3324,
+  0x3325, 0x3326, 0x3327, 0x3328, 0x3329, 0x332a, 0x332b, 0x332c,
+  0x332d, 0x332e, 0x332f, 0x3330, 0x3331, 0x3332, 0x3333, 0x3334,
+  0x3335, 0x3336, 0x3337, 0x3338, 0x3339, 0x333a, 0x333b, 0x333c,
+  0x333d, 0x333e, 0x333f, 0x3340, 0x3341, 0x3342, 0x3343, 0x3344,
+  0x3345, 0x3346, 0x3347, 0x3348, 0x3349, 0x334a, 0x334b, 0x334c,
+  0x334d, 0x334e, 0x334f, 0x3350, 0x3351, 0x3352, 0x3353, 0x3354,
+  0x3355, 0x3356, 0x3357, 0x3358, 0x3359, 0x335a, 0x335b, 0x335c,
+  0x335d, 0x335e, 0x335f, 0x3360, 0x3361, 0x3362, 0x3363, 0x3364,
+  0x3365, 0x3366, 0x3367, 0x3368, 0x3369, 0x336a, 0x336b, 0x336c,
+  0x336d, 0x336e, 0x336f, 0x3370, 0x3371, 0x3372, 0x3373, 0x3374,
+  0x3375, 0x3376, 0x3377, 0x3378, 0x3379, 0x337a, 0x337b, 0x337c,
+  0x337d, 0x337e, 0x3421, 0x3422, 0x3423, 0x3424, 0x3425, 0x3426,
+  0x3427, 0x3428, 0x3429, 0x342a, 0x342b, 0x342c, 0x342d, 0x342e,
+  0x342f, 0x3430, 0x3431, 0x3432, 0x3433, 0x3434, 0x3435, 0x3436,
+  0x3438, 0x3437, 0x3439, 0x343a, 0x343b, 0x343c, 0x343d, 0x343e,
+  0x343f, 0x3440, 0x3441, 0x3442, 0x3443, 0x3444, 0x3445, 0x3446,
+  0x3447, 0x3448, 0x3449, 0x344a, 0x344b, 0x344c, 0x344d, 0x344e,
+  0x344f, 0x3450, 0x3451, 0x3452, 0x3453, 0x3454, 0x3455, 0x3456,
+  0x3457, 0x3458, 0x3459, 0x345a, 0x345b, 0x345c, 0x345d, 0x345e,
+  0x345f, 0x3460, 0x3461, 0x3462, 0x3463, 0x3464, 0x3465, 0x3466,
+  0x3467, 0x3468, 0x3469, 0x346a, 0x346b, 0x346c, 0x346d, 0x346e,
+  0x346f, 0x3470, 0x3471, 0x3472, 0x3473, 0x3474, 0x3475, 0x3476,
+  0x3477, 0x3478, 0x3479, 0x347a, 0x347b, 0x347c, 0x347d, 0x347e,
+  0x3521, 0x3522, 0x3523, 0x3524, 0x3525, 0x3526, 0x3527, 0x3528,
+  0x3529, 0x352a, 0x352b, 0x352c, 0x352d, 0x352e, 0x352f, 0x3530,
+  0x3531, 0x3532, 0x3533, 0x3534, 0x3535, 0x3536, 0x3537, 0x3538,
+  0x3539, 0x353a, 0x353b, 0x353c, 0x353d, 0x353e, 0x353f, 0x3540,
+  0x3541, 0x3542, 0x3543, 0x3544, 0x3545, 0x3546, 0x3547, 0x3548,
+  0x3549, 0x354a, 0x354b, 0x354c, 0x354d, 0x354e, 0x354f, 0x3550,
+  0x3551, 0x3552, 0x3553, 0x3554, 0x3555, 0x3556, 0x3557, 0x3558,
+  0x3559, 0x355a, 0x355b, 0x355c, 0x355d, 0x355e, 0x355f, 0x3560,
+  0x3561, 0x3562, 0x3563, 0x3564, 0x3565, 0x3566, 0x3567, 0x3568,
+  0x3569, 0x356a, 0x356b, 0x356c, 0x356d, 0x356e, 0x356f, 0x3570,
+  0x3571, 0x3572, 0x3573, 0x3574, 0x3575, 0x3576, 0x3577, 0x3578,
+  0x3579, 0x357a, 0x357b, 0x357c, 0x357d, 0x357e, 0x3621, 0x3622,
+  0x3623, 0x3624, 0x3625, 0x3626, 0x3627, 0x3628, 0x3629, 0x362a,
+  0x362b, 0x362c, 0x362d, 0x362e, 0x362f, 0x3630, 0x3631, 0x3632,
+  0x3633, 0x3634, 0x3635, 0x3636, 0x3637, 0x3638, 0x3639, 0x363a,
+  0x363b, 0x363c, 0x363d, 0x363e, 0x363f, 0x3640, 0x3641, 0x3642,
+  0x3643, 0x3644, 0x3645, 0x3646, 0x3647, 0x3648, 0x3649, 0x364a,
+  0x364b, 0x364c, 0x364d, 0x364e, 0x364f, 0x3650, 0x3651, 0x3652,
+  0x3653, 0x3654, 0x3655, 0x3656, 0x3657, 0x3658, 0x3659, 0x365a,
+  0x365b, 0x365c, 0x365d, 0x365e, 0x365f, 0x3660, 0x3661, 0x3662,
+  0x3663, 0x3664, 0x3665, 0x3666, 0x3667, 0x3668, 0x3669, 0x366a,
+  0x366b, 0x366c, 0x366d, 0x3670, 0x3671, 0x366e, 0x366f, 0x3672,
+  0x3673, 0x3674, 0x3675, 0x3676, 0x3677, 0x3678, 0x3679, 0x367a,
+  0x367b, 0x367d, 0x367e, 0x367c, 0x3721, 0x3722, 0x3723, 0x3724,
+  0x3725, 0x3726, 0x3727, 0x3728, 0x3729, 0x372a, 0x372b, 0x372c,
+  0x372d, 0x372e, 0x372f, 0x3730, 0x3731, 0x3732, 0x3733, 0x3734,
+  0x3735, 0x3736, 0x3737, 0x3738, 0x3739, 0x373a, 0x373b, 0x373c,
+  0x373d, 0x373e, 0x373f, 0x3740, 0x3741, 0x3742, 0x3743, 0x3744,
+  0x3745, 0x3746, 0x3747, 0x3748, 0x3749, 0x374a, 0x374b, 0x374c,
+  0x374d, 0x374e, 0x374f, 0x3750, 0x3751, 0x3752, 0x3753, 0x3754,
+  0x3755, 0x3756, 0x3757, 0x3760, 0x3758, 0x3759, 0x375a, 0x375b,
+  0x375c, 0x375d, 0x375e, 0x375f, 0x3761, 0x3762, 0x3763, 0x3764,
+  0x3765, 0x3766, 0x3767, 0x3768, 0x3769, 0x376a, 0x376b, 0x376c,
+  0x376d, 0x377e, 0x376e, 0x376f, 0x3770, 0x3771, 0x3772, 0x3773,
+  0x3774, 0x3775, 0x3776, 0x3777, 0x3778, 0x3779, 0x377a, 0x377b,
+  0x377c, 0x377d, 0x3821, 0x3822, 0x3823, 0x3824, 0x3825, 0x3826,
+  0x3827, 0x3828, 0x3829, 0x382a, 0x382b, 0x382c, 0x382d, 0x382e,
+  0x382f, 0x3830, 0x3831, 0x3832, 0x3833, 0x3834, 0x3835, 0x3836,
+  0x3837, 0x3838, 0x3839, 0x383a, 0x383b, 0x383c, 0x383d, 0x383e,
+  0x383f, 0x3840, 0x3841, 0x3842, 0x3843, 0x3844, 0x3845, 0x3846,
+  0x3847, 0x3848, 0x3849, 0x384a, 0x384b, 0x384c, 0x384d, 0x384e,
+  0x3850, 0x3851, 0x384f, 0x3852, 0x3853, 0x3854, 0x3855, 0x3856,
+  0x3857, 0x3858, 0x3859, 0x385a, 0x385b, 0x385c, 0x385d, 0x385e,
+  0x385f, 0x3860, 0x3861, 0x3862, 0x3863, 0x3864, 0x3865, 0x3867,
+  0x3868, 0x3869, 0x386a, 0x386b, 0x386c, 0x386d, 0x386e, 0x386f,
+  0x3870, 0x3871, 0x3872, 0x3873, 0x3874, 0x3875, 0x3876, 0x3877,
+  0x3878, 0x3879, 0x387a, 0x387b, 0x387c, 0x387d, 0x387e, 0x3921,
+  0x3922, 0x3923, 0x3924, 0x3925, 0x3926, 0x3927, 0x3928, 0x3929,
+  0x392a, 0x392b, 0x392c, 0x392d, 0x392e, 0x392f, 0x3930, 0x3931,
+  0x3932, 0x3933, 0x3934, 0x3935, 0x3936, 0x3937, 0x3938, 0x3939,
+  0x393a, 0x393b, 0x393c, 0x393d, 0x393e, 0x393f, 0x3940, 0x3941,
+  0x3942, 0x3943, 0x3944, 0x3945, 0x3946, 0x3947, 0x3948, 0x3949,
+  0x394a, 0x394b, 0x394c, 0x394d, 0x394e, 0x394f, 0x3950, 0x3951,
+  0x3952, 0x3953, 0x3954, 0x3955, 0x3956, 0x3957, 0x3958, 0x3959,
+  0x395a, 0x395b, 0x395c, 0x395d, 0x395e, 0x395f, 0x3960, 0x3961,
+  0x3962, 0x3963, 0x3964, 0x3965, 0x3966, 0x3967, 0x3968, 0x3969,
+  0x396a, 0x396b, 0x396c, 0x396d, 0x396e, 0x396f, 0x3970, 0x3971,
+  0x3972, 0x3973, 0x3974, 0x3975, 0x3976, 0x3977, 0x3978, 0x3979,
+  0x397a, 0x397b, 0x397c, 0x397d, 0x397e, 0x3a21, 0x3a22, 0x3a23,
+  0x3a24, 0x3a25, 0x3a26, 0x3a27, 0x3a28, 0x3a29, 0x3a2a, 0x3a2b,
+  0x3a2c, 0x3a2d, 0x3a2e, 0x3a2f, 0x3a30, 0x3a31, 0x3a33, 0x3a34,
+  0x3a35, 0x3a36, 0x3a37, 0x3a38, 0x3a32, 0x3a39, 0x3a3a, 0x3a3b,
+  0x3a3c, 0x3a3d, 0x3a3e, 0x3a3f, 0x3a40, 0x3a41, 0x3a42, 0x3a43,
+  0x3a44, 0x3a45, 0x3a46, 0x3a47, 0x3a48, 0x3a49, 0x3a4a, 0x3a4b,
+  0x3a4c, 0x3a4d, 0x3a4e, 0x3a4f, 0x3a50, 0x3a51, 0x3a52, 0x3a53,
+  0x3a54, 0x3a55, 0x3a56, 0x3a57, 0x3a58, 0x3a59, 0x3a5a, 0x3a5b,
+  0x3a5c, 0x3a5d, 0x3a5e, 0x3a5f, 0x3a60, 0x3a61, 0x3a62, 0x3a63,
+  0x3a64, 0x3a65, 0x3a66, 0x3a67, 0x3a68, 0x3a69, 0x3a6a, 0x3a6b,
+  0x3a6c, 0x3a6d, 0x3a6e, 0x3a6f, 0x3a70, 0x3a71, 0x3a72, 0x3a73,
+  0x3a74, 0x3a75, 0x3a76, 0x3a77, 0x3a78, 0x3a79, 0x3a7a, 0x3a7b,
+  0x3a7c, 0x3a7d, 0x3a7e, 0x3b21, 0x3b22, 0x3b23, 0x3b24, 0x3b25,
+  0x3b26, 0x3b27, 0x3b28, 0x3b29, 0x3b2a, 0x3b2b, 0x3b2c, 0x3b2d,
+  0x3b2e, 0x3b2f, 0x3b30, 0x3b31, 0x3b32, 0x3b33, 0x3b34, 0x3b35,
+  0x3b36, 0x3b37, 0x3b38, 0x3b39, 0x3b3a, 0x3b3b, 0x3b3d, 0x3b3c,
+  0x3b3e, 0x3b3f, 0x3b40, 0x3b41, 0x3b42, 0x3b43, 0x3b44, 0x3b45,
+  0x3b47, 0x3b48, 0x3b49, 0x3b4a, 0x3b46, 0x3b4b, 0x3b4c, 0x3b4d,
+  0x3b4e, 0x3b4f, 0x3b50, 0x3b51, 0x3b52, 0x3b53, 0x3b57, 0x3b55,
+  0x3b54, 0x3b56, 0x3b58, 0x3b59, 0x3b5a, 0x3b5b, 0x3b5c, 0x3b5d,
+  0x3b5e, 0x3b5f, 0x3b60, 0x3b61, 0x3b62, 0x3b63, 0x3b64, 0x3b65,
+  0x3b66, 0x3b67, 0x3b68, 0x3b69, 0x3b6a, 0x3b6b, 0x3b6c, 0x3b6d,
+  0x3b6e, 0x3b6f, 0x3b70, 0x3b71, 0x3b72, 0x6674, 0x3b73, 0x3b74,
+  0x3b75, 0x3b76, 0x3b77, 0x3b78, 0x3b7a, 0x3b79, 0x3b7b, 0x3b7c,
+  0x3b7d, 0x3b7e, 0x3c21, 0x3c22, 0x3c23, 0x3c24, 0x3c25, 0x3c26,
+  0x3c27, 0x3c28, 0x3c29, 0x3c2a, 0x3c2b, 0x3c2c, 0x3c2e, 0x3c2d,
+  0x3c2f, 0x3c30, 0x3c31, 0x3c34, 0x3c32, 0x3c33, 0x3c35, 0x3c36,
+  0x3c37, 0x3c38, 0x3c39, 0x3c3a, 0x3c3b, 0x3c3c, 0x3c3d, 0x3c3e,
+  0x3c3f, 0x3c40, 0x3c41, 0x3c42, 0x3c43, 0x3c44, 0x3c45, 0x3c46,
+  0x3c47, 0x3c48, 0x3c49, 0x3c4a, 0x3c4b, 0x3c4c, 0x3c4d, 0x3c4e,
+  0x3c4f, 0x3c50, 0x3c52, 0x3c51, 0x3c53, 0x3c54, 0x3c55, 0x3c56,
+  0x3c57, 0x3c58, 0x3c59, 0x3c5a, 0x3c5b, 0x3c5c, 0x3c5d, 0x3c5e,
+  0x3c5f, 0x3c60, 0x3c61, 0x3c62, 0x3c63, 0x3c64, 0x3c65, 0x3c66,
+  0x3c67, 0x3c68, 0x3c69, 0x3c6a, 0x3c6b, 0x3c6c, 0x3c6d, 0x3c6e,
+  0x3c6f, 0x3c70, 0x3c71, 0x3c72, 0x3c73, 0x3c74, 0x3c75, 0x3c76,
+  0x3c77, 0x3c78, 0x3c79, 0x3c7a, 0x3c7b, 0x3c7c, 0x3c7d, 0x3c7e,
+  0x3d21, 0x3d22, 0x3d23, 0x3d24, 0x3d25, 0x3d26, 0x3d27, 0x3d28,
+  0x3d29, 0x3d2a, 0x3d2b, 0x3d2c, 0x3d2d, 0x3d2e, 0x3d2f, 0x3d32,
+  0x3d30, 0x3d31, 0x3d33, 0x3d34, 0x3d35, 0x3d36, 0x3d37, 0x3d38,
+  0x3d39, 0x3d3a, 0x3d3b, 0x3d3c, 0x3d3d, 0x3d3e, 0x3d3f, 0x3d40,
+  0x3d41, 0x3d42, 0x3d43, 0x3d44, 0x3d45, 0x3d46, 0x3d47, 0x3d48,
+  0x3d49, 0x3d4a, 0x3d4b, 0x3d4c, 0x3d4d, 0x3d4e, 0x3d4f, 0x3d50,
+  0x3d51, 0x3d52, 0x3d53, 0x3d54, 0x3d55, 0x3d56, 0x3d57, 0x3d58,
+  0x3d59, 0x3d5a, 0x3d5b, 0x3d5c, 0x3d5d, 0x3d5e, 0x3d5f, 0x3d60,
+  0x3d61, 0x3d62, 0x3d63, 0x3d64, 0x3d65, 0x3d66, 0x3d67, 0x3d68,
+  0x3d69, 0x3d6a, 0x3d6b, 0x3d6c, 0x3d6d, 0x3d6e, 0x3d6f, 0x3d70,
+  0x3d71, 0x3d72, 0x3d73, 0x3d74, 0x3d75, 0x3d76, 0x3d77, 0x3d78,
+  0x3d79, 0x3d7a, 0x3d7b, 0x3d7c, 0x3d7d, 0x3d7e, 0x3e21, 0x3e22,
+  0x3e23, 0x3e24, 0x3e25, 0x3e26, 0x3e27, 0x3e28, 0x3e29, 0x3e2a,
+  0x3e2b, 0x3e2c, 0x3e2d, 0x3e2e, 0x3e2f, 0x3e30, 0x3e31, 0x3e32,
+  0x3e33, 0x3e34, 0x3e35, 0x3e36, 0x3e37, 0x3e38, 0x3e39, 0x3e3a,
+  0x3e3b, 0x3e3c, 0x3e3d, 0x3e3e, 0x3e3f, 0x3e40, 0x3e41, 0x3e42,
+  0x3e43, 0x3e44, 0x3e45, 0x3e46, 0x3e47, 0x3e48, 0x3e49, 0x3e4a,
+  0x3e4b, 0x3e4c, 0x3e4d, 0x3e4e, 0x3e4f, 0x3e50, 0x3e51, 0x3e52,
+  0x3e53, 0x3e54, 0x3e55, 0x3e56, 0x3e57, 0x3e58, 0x3e59, 0x3e5a,
+  0x3e5b, 0x3e5c, 0x3e5d, 0x3e5e, 0x3e5f, 0x3e60, 0x3e61, 0x3e62,
+  0x3e63, 0x3e64, 0x3e65, 0x3e66, 0x3e67, 0x3e68, 0x3e69, 0x3e6a,
+  0x3e6b, 0x3e6c, 0x3e6d, 0x3e6e, 0x3e6f, 0x3e70, 0x3e71, 0x3e72,
+  0x3e73, 0x3e74, 0x3e75, 0x3e76, 0x3e77, 0x3e78, 0x3e79, 0x3e7a,
+  0x3e7b, 0x3e7e, 0x3e7c, 0x3e7d, 0x3f21, 0x3f22, 0x3f23, 0x3f24,
+  0x3f25, 0x3f26, 0x3f27, 0x3f28, 0x3f29, 0x3f2a, 0x3f2b, 0x3f2c,
+  0x3f2d, 0x3f2e, 0x3f2f, 0x3f30, 0x3f31, 0x3f32, 0x3f33, 0x3f34,
+  0x3f35, 0x3f36, 0x3f37, 0x3f38, 0x3f39, 0x3f3a, 0x3f3b, 0x3f3c,
+  0x3f3d, 0x3f3e, 0x3f3f, 0x3f40, 0x3f41, 0x3f42, 0x3f43, 0x3f44,
+  0x3f45, 0x3f46, 0x3f47, 0x3f48, 0x3f49, 0x3f4a, 0x3f4b, 0x3f4c,
+  0x3f4d, 0x3f4e, 0x3f4f, 0x3f50, 0x3f51, 0x3f52, 0x3f53, 0x3f54,
+  0x3f55, 0x3f56, 0x3f57, 0x3f58, 0x3f59, 0x3f5a, 0x3f5b, 0x3f5c,
+  0x3f5d, 0x3f5e, 0x3f5f, 0x3f60, 0x3f61, 0x3f62, 0x3f63, 0x3f64,
+  0x3f65, 0x3f66, 0x3f67, 0x3f68, 0x3f69, 0x3f6a, 0x3f6b, 0x3f6c,
+  0x3f6d, 0x3f6e, 0x3f6f, 0x3f70, 0x3f71, 0x3f72, 0x3f73, 0x3f74,
+  0x3f75, 0x3f76, 0x3f77, 0x3f78, 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c,
+  0x3f7d, 0x3f7e, 0x4021, 0x4022, 0x4023, 0x4024, 0x4025, 0x4026,
+  0x4027, 0x4028, 0x4029, 0x402a, 0x402b, 0x402c, 0x402d, 0x402e,
+  0x402f, 0x4030, 0x4031, 0x4032, 0x4033, 0x4034, 0x4035, 0x4036,
+  0x4037, 0x4038, 0x4039, 0x403a, 0x403b, 0x403c, 0x403d, 0x403e,
+  0x403f, 0x4040, 0x4041, 0x4042, 0x4043, 0x4044, 0x4045, 0x4046,
+  0x4047, 0x4048, 0x4049, 0x404a, 0x404b, 0x404c, 0x404d, 0x404e,
+  0x404f, 0x4050, 0x4051, 0x4052, 0x4053, 0x4054, 0x4055, 0x4056,
+  0x4057, 0x4058, 0x4059, 0x405a, 0x405b, 0x405c, 0x405d, 0x405e,
+  0x405f, 0x4060, 0x4061, 0x4062, 0x4063, 0x4064, 0x4065, 0x4066,
+  0x4067, 0x4068, 0x4069, 0x406a, 0x406b, 0x406c, 0x406d, 0x406e,
+  0x406f, 0x4070, 0x4071, 0x4072, 0x4073, 0x4074, 0x4075, 0x4076,
+  0x4077, 0x4078, 0x4079, 0x407a, 0x407b, 0x407c, 0x407d, 0x407e,
+  0x4121, 0x4122, 0x4123, 0x4124, 0x4125, 0x4126, 0x4127, 0x4128,
+  0x4129, 0x412a, 0x412b, 0x412c, 0x412d, 0x412e, 0x412f, 0x4130,
+  0x4131, 0x4132, 0x4133, 0x4134, 0x4135, 0x4136, 0x4137, 0x4138,
+  0x4139, 0x413a, 0x413b, 0x413c, 0x413d, 0x413e, 0x413f, 0x4140,
+  0x4141, 0x4142, 0x4143, 0x4144, 0x4145, 0x4146, 0x4147, 0x4148,
+  0x4149, 0x414a, 0x414b, 0x414c, 0x414d, 0x414e, 0x414f, 0x4150,
+  0x4151, 0x4152, 0x4153, 0x4154, 0x4155, 0x4156, 0x4157, 0x4158,
+  0x4159, 0x415a, 0x415b, 0x415c, 0x415d, 0x415e, 0x415f, 0x4160,
+  0x4161, 0x4162, 0x4163, 0x4164, 0x4165, 0x4166, 0x4167, 0x4168,
+  0x4169, 0x416a, 0x416b, 0x416c, 0x416d, 0x416e, 0x416f, 0x4170,
+  0x4171, 0x4172, 0x4173, 0x4174, 0x4175, 0x4176, 0x4177, 0x4178,
+  0x4179, 0x417a, 0x417b, 0x417c, 0x417d, 0x417e, 0x4221, 0x4222,
+  0x4223, 0x4224, 0x4225, 0x4226, 0x4227, 0x4228, 0x4229, 0x422a,
+  0x422b, 0x422c, 0x422d, 0x422e, 0x4230, 0x422f, 0x4231, 0x4232,
+  0x4233, 0x4234, 0x4235, 0x4237, 0x4236, 0x4238, 0x4239, 0x423a,
+  0x423b, 0x423c, 0x423d, 0x423e, 0x4240, 0x4241, 0x4242, 0x4244,
+  0x4245, 0x4247, 0x4248, 0x4249, 0x424a, 0x424c, 0x4243, 0x4246,
+  0x424b, 0x424d, 0x424e, 0x424f, 0x4250, 0x4251, 0x4252, 0x4253,
+  0x4254, 0x4255, 0x4256, 0x4257, 0x4258, 0x4259, 0x425a, 0x425b,
+  0x425c, 0x425d, 0x425e, 0x425f, 0x4260, 0x4261, 0x4262, 0x4263,
+  0x4264, 0x4265, 0x4266, 0x4267, 0x4268, 0x4269, 0x426a, 0x426b,
+  0x426c, 0x426d, 0x423f, 0x426e, 0x426f, 0x4270, 0x4271, 0x4272,
+  0x4273, 0x4274, 0x4275, 0x4276, 0x4277, 0x4278, 0x4279, 0x427a,
+  0x427b, 0x427c, 0x427d, 0x427e, 0x4321, 0x4322, 0x4323, 0x4324,
+  0x4325, 0x4326, 0x4327, 0x4328, 0x4329, 0x432a, 0x432b, 0x432c,
+  0x432d, 0x432e, 0x432f, 0x4330, 0x4331, 0x4332, 0x4333, 0x4334,
+  0x4335, 0x4336, 0x4337, 0x4339, 0x433a, 0x433b, 0x433c, 0x433d,
+  0x433e, 0x433f, 0x4340, 0x4341, 0x4342, 0x4343, 0x4344, 0x4345,
+  0x4346, 0x4347, 0x4348, 0x4338, 0x434a, 0x434b, 0x434c, 0x434d,
+  0x434f, 0x434e, 0x4350, 0x4351, 0x4352, 0x4353, 0x4354, 0x4355,
+  0x4356, 0x4357, 0x4358, 0x4359, 0x435a, 0x435b, 0x4349, 0x435c,
+  0x435d, 0x435e, 0x435f, 0x4360, 0x4361, 0x4362, 0x4363, 0x4364,
+  0x4365, 0x4366, 0x4367, 0x4368, 0x4369, 0x436a, 0x436b, 0x436c,
+  0x436d, 0x436e, 0x436f, 0x4370, 0x4371, 0x4372, 0x4373, 0x4374,
+  0x4375, 0x4376, 0x4377, 0x4378, 0x4379, 0x437a, 0x437b, 0x437c,
+  0x437d, 0x437e, 0x4421, 0x4422, 0x4423, 0x4424, 0x4425, 0x4426,
+  0x4427, 0x4428, 0x4429, 0x442a, 0x442b, 0x442c, 0x442d, 0x442e,
+  0x442f, 0x4430, 0x4431, 0x4432, 0x4433, 0x4434, 0x4435, 0x4436,
+  0x4437, 0x4438, 0x4439, 0x443a, 0x443b, 0x443c, 0x443d, 0x443e,
+  0x443f, 0x4440, 0x4441, 0x4442, 0x4443, 0x4444, 0x4445, 0x4446,
+  0x4447, 0x4448, 0x4449, 0x444a, 0x444b, 0x444c, 0x444d, 0x444e,
+  0x444f, 0x4450, 0x4451, 0x4452, 0x4453, 0x4454, 0x4455, 0x4456,
+  0x4457, 0x4458, 0x4459, 0x445a, 0x445b, 0x445c, 0x445d, 0x445e,
+  0x445f, 0x4460, 0x4461, 0x4462, 0x4463, 0x4464, 0x4465, 0x4466,
+  0x4467, 0x4468, 0x4469, 0x446a, 0x446b, 0x446c, 0x446d, 0x446e,
+  0x446f, 0x4470, 0x4471, 0x4472, 0x4473, 0x4474, 0x4475, 0x4476,
+  0x4477, 0x4478, 0x4479, 0x447a, 0x447b, 0x447c, 0x447d, 0x447e,
+  0x4521, 0x4522, 0x4523, 0x4524, 0x4525, 0x4526, 0x4527, 0x4528,
+  0x4529, 0x452a, 0x452b, 0x452c, 0x452d, 0x452e, 0x452f, 0x4530,
+  0x4531, 0x4532, 0x4533, 0x4534, 0x4535, 0x4536, 0x4537, 0x4538,
+  0x4539, 0x453a, 0x453b, 0x453c, 0x453d, 0x453e, 0x453f, 0x4540,
+  0x4541, 0x4542, 0x4543, 0x4544, 0x4545, 0x4546, 0x4547, 0x4548,
+  0x4549, 0x454a, 0x454b, 0x454d, 0x454c, 0x454e, 0x454f, 0x4550,
+  0x4551, 0x4552, 0x4553, 0x4554, 0x4555, 0x4556, 0x4557, 0x4558,
+  0x4559, 0x455a, 0x455b, 0x455c, 0x455d, 0x455e, 0x455f, 0x4560,
+  0x4561, 0x4562, 0x4563, 0x4564, 0x4565, 0x4566, 0x4567, 0x4568,
+  0x4569, 0x456a, 0x456b, 0x456c, 0x456d, 0x456e, 0x456f, 0x4570,
+  0x4571, 0x4572, 0x4573, 0x4574, 0x4575, 0x4576, 0x4577, 0x4578,
+  0x4579, 0x457a, 0x457b, 0x457c, 0x457d, 0x457e, 0x4621, 0x4622,
+  0x4623, 0x4624, 0x4625, 0x4626, 0x4627, 0x4628, 0x4629, 0x462a,
+  0x462b, 0x462c, 0x462d, 0x462e, 0x462f, 0x4630, 0x4631, 0x4632,
+  0x4633, 0x4634, 0x4635, 0x4636, 0x4637, 0x4638, 0x4639, 0x463a,
+  0x463b, 0x463c, 0x463d, 0x463e, 0x463f, 0x4640, 0x4641, 0x4642,
+  0x4643, 0x4644, 0x4645, 0x4646, 0x4647, 0x4648, 0x4649, 0x464a,
+  0x464b, 0x464c, 0x464d, 0x464e, 0x464f, 0x4650, 0x4651, 0x4652,
+  0x4653, 0x4654, 0x4655, 0x4656, 0x4657, 0x4658, 0x4659, 0x465a,
+  0x465b, 0x465c, 0x465d, 0x465e, 0x465f, 0x4660, 0x4736, 0x4661,
+  0x4662, 0x4663, 0x4664, 0x4665, 0x4666, 0x4667, 0x4668, 0x4669,
+  0x466a, 0x466b, 0x466c, 0x466d, 0x466e, 0x466f, 0x4670, 0x4671,
+  0x4672, 0x4673, 0x4674, 0x4675, 0x4676, 0x4677, 0x4678, 0x4679,
+  0x467a, 0x467b, 0x467c, 0x467d, 0x467e, 0x4721, 0x4722, 0x4723,
+  0x4724, 0x4725, 0x4726, 0x4727, 0x4728, 0x4729, 0x472a, 0x472b,
+  0x472c, 0x472d, 0x472e, 0x472f, 0x4730, 0x4731, 0x4732, 0x4733,
+  0x4734, 0x4735, 0x4737, 0x4738, 0x4739, 0x473a, 0x473b, 0x473c,
+  0x473d, 0x473e, 0x473f, 0x4740, 0x4741, 0x4742, 0x4743, 0x4744,
+  0x4745, 0x4746, 0x4747, 0x4748, 0x4749, 0x474a, 0x474b, 0x474c,
+  0x474d, 0x474e, 0x474f, 0x4750, 0x4751, 0x4752, 0x4753, 0x4754,
+  0x4755, 0x4756, 0x4757, 0x4758, 0x4759, 0x475a, 0x475b, 0x475c,
+  0x475d, 0x475e, 0x475f, 0x4760, 0x4761, 0x4762, 0x4763, 0x4764,
+  0x4765, 0x4766, 0x4767, 0x4768, 0x4769, 0x476a, 0x476b, 0x476c,
+  0x476d, 0x476e, 0x476f, 0x4770, 0x4771, 0x4772, 0x4773, 0x4774,
+  0x4775, 0x4776, 0x4777, 0x4778, 0x4779, 0x477a, 0x477b, 0x477c,
+  0x477d, 0x477e, 0x4821, 0x4822, 0x4823, 0x4824, 0x4825, 0x4826,
+  0x4827, 0x4828, 0x4829, 0x482a, 0x482b, 0x482c, 0x482d, 0x482e,
+  0x482f, 0x4830, 0x4831, 0x4832, 0x4833, 0x4834, 0x4835, 0x4836,
+  0x4837, 0x4838, 0x4839, 0x483a, 0x483b, 0x483c, 0x483d, 0x483e,
+  0x483f, 0x4840, 0x4841, 0x4842, 0x4843, 0x4844, 0x4845, 0x4846,
+  0x4847, 0x4848, 0x4849, 0x484a, 0x484b, 0x484c, 0x4853, 0x484d,
+  0x484e, 0x484f, 0x4850, 0x4851, 0x4852, 0x4854, 0x4855, 0x4856,
+  0x4857, 0x4858, 0x4859, 0x485a, 0x485b, 0x485c, 0x485d, 0x485e,
+  0x485f, 0x4860, 0x4861, 0x4862, 0x4863, 0x4864, 0x4865, 0x4866,
+  0x4867, 0x4868, 0x4869, 0x486a, 0x486b, 0x486c, 0x486d, 0x486e,
+  0x486f, 0x4870, 0x4871, 0x4872, 0x4873, 0x4874, 0x4875, 0x4876,
+  0x4877, 0x4878, 0x4879, 0x487a, 0x487b, 0x487c, 0x487d, 0x487e,
+  0x4921, 0x4922, 0x4923, 0x4924, 0x4925, 0x4926, 0x4927, 0x4928,
+  0x4929, 0x492a, 0x492b, 0x492c, 0x492d, 0x492e, 0x492f, 0x4930,
+  0x4931, 0x4932, 0x4933, 0x4934, 0x4935, 0x4936, 0x4937, 0x4938,
+  0x4939, 0x493a, 0x493b, 0x493c, 0x4941, 0x493d, 0x493e, 0x493f,
+  0x4940, 0x4942, 0x4943, 0x4944, 0x4945, 0x4946, 0x4947, 0x4948,
+  0x4949, 0x494a, 0x494b, 0x494c, 0x494d, 0x494e, 0x494f, 0x4950,
+  0x4951, 0x4952, 0x4953, 0x4954, 0x4955, 0x4956, 0x4957, 0x4958,
+  0x4959, 0x495a, 0x495b, 0x495c, 0x495d, 0x495e, 0x495f, 0x4960,
+  0x4961, 0x4962, 0x4963, 0x4964, 0x4965, 0x4966, 0x4967, 0x4968,
+  0x4969, 0x496a, 0x496b, 0x496c, 0x496d, 0x496e, 0x496f, 0x4970,
+  0x4971, 0x4972, 0x4973, 0x4974, 0x4975, 0x4976, 0x4977, 0x4978,
+  0x4979, 0x497a, 0x497b, 0x497c, 0x497d, 0x497e, 0x4a21, 0x4a22,
+  0x4a23, 0x4a24, 0x4a25, 0x4a26, 0x4a27, 0x4a28, 0x4a29, 0x4a2a,
+  0x4a2b, 0x4a2c, 0x4a2d, 0x4a2e, 0x4a2f, 0x4a30, 0x4a31, 0x4a32,
+  0x4a33, 0x4a34, 0x4a35, 0x4a36, 0x4a37, 0x4a38, 0x4a39, 0x4a3a,
+  0x4a3b, 0x4a3c, 0x4a3d, 0x4a3e, 0x4a3f, 0x4a40, 0x4a41, 0x4a42,
+  0x4a43, 0x4a44, 0x4a45, 0x4a46, 0x4a47, 0x4a48, 0x4a49, 0x4a4a,
+  0x4a4b, 0x4a4c, 0x4a4d, 0x4a4e, 0x4a4f, 0x4a50, 0x4a51, 0x4a52,
+  0x4a53, 0x4a54, 0x4a55, 0x4a56, 0x4a57, 0x4a58, 0x4a59, 0x4a5a,
+  0x4a5b, 0x4a5c, 0x4a5d, 0x4a5e, 0x4a5f, 0x4a60, 0x4a61, 0x4a62,
+  0x4a63, 0x4a64, 0x4a65, 0x4a66, 0x4a67, 0x4a68, 0x4a69, 0x4a6a,
+  0x4a6b, 0x4a6c, 0x4a6d, 0x4a6e, 0x4a6f, 0x4a70, 0x4a71, 0x4a72,
+  0x4a73, 0x4a74, 0x4a75, 0x4a76, 0x4a77, 0x4a78, 0x4a79, 0x4a7a,
+  0x4a7b, 0x4a7c, 0x4a7d, 0x4a7e, 0x4b21, 0x4b22, 0x4b23, 0x4b24,
+  0x4b25, 0x4b26, 0x4b27, 0x4b28, 0x4b29, 0x4b2a, 0x4b2b, 0x4b2c,
+  0x4b2d, 0x4b2e, 0x4b2f, 0x4b30, 0x4b31, 0x4b32, 0x4b33, 0x4b34,
+  0x4b35, 0x4b36, 0x4b37, 0x4b38, 0x4b39, 0x4b3a, 0x4b3b, 0x4b3c,
+  0x4b3d, 0x4b3e, 0x4b3f, 0x4b40, 0x4b41, 0x4b42, 0x4b43, 0x4b44,
+  0x4b45, 0x4b46, 0x4b47, 0x4b48, 0x4b49, 0x4b4a, 0x4b4b, 0x4b4c,
+  0x4b4d, 0x4b4e, 0x4b4f, 0x4b50, 0x4b51, 0x4b52, 0x4b53, 0x4b54,
+  0x4b55, 0x4b56, 0x4b57, 0x4b58, 0x4b59, 0x4b5a, 0x4b5b, 0x4b5c,
+  0x4b5d, 0x4b5e, 0x4b5f, 0x4b60, 0x4b61, 0x4b62, 0x4b63, 0x4b64,
+  0x4b65, 0x4b66, 0x4b67, 0x4b68, 0x4b69, 0x4b6a, 0x4b6b, 0x4b6c,
+  0x4b6d, 0x4b6e, 0x4b6f, 0x4b70, 0x4b71, 0x4b72, 0x4b73, 0x4b74,
+  0x4b75, 0x4b76, 0x4b77, 0x4b78, 0x4b79, 0x4b7a, 0x4b7b, 0x4b7c,
+  0x4b7d, 0x4b7e, 0x4c21, 0x4c22, 0x4c23, 0x4c24, 0x4c25, 0x4c26,
+  0x4c27, 0x4c28, 0x4c29, 0x4c2a, 0x4c2b, 0x4c2c, 0x4c2d, 0x4c2e,
+  0x4c2f, 0x4c30, 0x4c31, 0x4c32, 0x4c33, 0x4c34, 0x4c35, 0x4c36,
+  0x4c37, 0x4c38, 0x4c39, 0x4c3a, 0x4c3b, 0x4c3c, 0x4c3d, 0x4c3e,
+  0x4c3f, 0x4c40, 0x4c41, 0x4c42, 0x4c43, 0x4c44, 0x4c45, 0x4c46,
+  0x4c47, 0x4c48, 0x4c49, 0x4c4a, 0x4c4b, 0x4c4c, 0x4c4d, 0x4c4e,
+  0x4c4f, 0x4c50, 0x4c51, 0x4c52, 0x4c53, 0x4c54, 0x4c55, 0x4c56,
+  0x4c57, 0x4c58, 0x4c59, 0x4c5a, 0x4c5b, 0x4c5c, 0x4c5d, 0x4c5e,
+  0x4c5f, 0x4c60, 0x4c61, 0x4c62, 0x4c63, 0x4c64, 0x4c65, 0x4c66,
+  0x4c67, 0x4c68, 0x4c69, 0x4c6a, 0x4c6b, 0x4c6c, 0x4c6d, 0x4c6e,
+  0x4c6f, 0x4c70, 0x4c71, 0x4c72, 0x4c73, 0x4c74, 0x4c75, 0x4c76,
+  0x4c77, 0x4c78, 0x4c79, 0x4c7a, 0x4c7b, 0x4c7c, 0x4c7d, 0x4c7e,
+  0x4d21, 0x4d22, 0x4d23, 0x4d24, 0x4d25, 0x4d26, 0x4d27, 0x4d28,
+  0x4d29, 0x4d2a, 0x4d2b, 0x4d2c, 0x4d2d, 0x4d2e, 0x4d2f, 0x4d30,
+  0x4d31, 0x4d32, 0x4d33, 0x4d34, 0x4d35, 0x4d36, 0x4d37, 0x4d38,
+  0x4d39, 0x4d3a, 0x4d3b, 0x4d3c, 0x4d3d, 0x4d3e, 0x4d3f, 0x4d40,
+  0x4d41, 0x4d42, 0x4d43, 0x4d44, 0x4d45, 0x4d46, 0x4d47, 0x4d48,
+  0x4d49, 0x4d4a, 0x4d4b, 0x4d4c, 0x4d4d, 0x4d4e, 0x4d4f, 0x4d50,
+  0x4d51, 0x4d52, 0x4d53, 0x4d54, 0x4d55, 0x4d56, 0x4d57, 0x4d58,
+  0x4d59, 0x4d5a, 0x4d5b, 0x4d5c, 0x4d5d, 0x4d5e, 0x4d5f, 0x4d60,
+  0x4d61, 0x4d62, 0x4d63, 0x4d64, 0x4d65, 0x4d66, 0x4d67, 0x4d68,
+  0x4d69, 0x4d6a, 0x4d6b, 0x4d6c, 0x4d6d, 0x4d6e, 0x4d6f, 0x4d70,
+  0x4d71, 0x4d72, 0x4d73, 0x4d74, 0x4d75, 0x4d76, 0x4d77, 0x4d78,
+  0x4d79, 0x4d7a, 0x4d7b, 0x4d7c, 0x4d7d, 0x4d7e, 0x4e21, 0x4e22,
+  0x4e24, 0x4e25, 0x4e26, 0x4e27, 0x4e28, 0x4e29, 0x4e23, 0x4e2a,
+  0x4e2b, 0x4e2c, 0x4e2d, 0x4e2e, 0x4e2f, 0x4e30, 0x4e31, 0x4e32,
+  0x4e33, 0x4e34, 0x4e35, 0x4e36, 0x4e37, 0x4e38, 0x4e39, 0x4e3a,
+  0x4e3b, 0x4e3c, 0x4e3d, 0x4e3e, 0x4e3f, 0x4e40, 0x4e41, 0x4e42,
+  0x4e43, 0x4e44, 0x4e45, 0x4e46, 0x4e47, 0x4e48, 0x4e49, 0x4e4a,
+  0x4e4b, 0x4e4c, 0x4e4d, 0x4e4e, 0x4e4f, 0x4e50, 0x4e51, 0x4e52,
+  0x4e53, 0x4e54, 0x4e55, 0x4e56, 0x4e57, 0x4e58, 0x4e59, 0x4e5a,
+  0x4e5b, 0x4e5c, 0x4e5d, 0x4e5e, 0x4e5f, 0x4e60, 0x4e61, 0x4e62,
+  0x4e63, 0x4e64, 0x4e65, 0x4e66, 0x4e67, 0x4e68, 0x4e69, 0x4e6a,
+  0x4e6b, 0x4e6c, 0x4e6d, 0x4e6e, 0x4e6f, 0x4e70, 0x4e71, 0x4e72,
+  0x4e73, 0x4e74, 0x4e75, 0x4e76, 0x4e77, 0x4e78, 0x4e79, 0x4e7a,
+  0x4e7b, 0x4e7c, 0x4e7d, 0x4e7e, 0x4f21, 0x4f22, 0x4f23, 0x4f24,
+  0x4f25, 0x4f26, 0x4f27, 0x4f28, 0x4f29, 0x4f2a, 0x4f2b, 0x4f2c,
+  0x4f2d, 0x4f2e, 0x4f2f, 0x4f30, 0x4f31, 0x4f32, 0x4f33, 0x4f34,
+  0x4f35, 0x4f36, 0x4f37, 0x4f38, 0x4f39, 0x4f3a, 0x4f3b, 0x4f3c,
+  0x4f3d, 0x4f3e, 0x4f3f, 0x4f40, 0x4f41, 0x4f42, 0x4f43, 0x4f44,
+  0x4f45, 0x4f46, 0x4f47, 0x4f48, 0x4f49, 0x4f4a, 0x4f4b, 0x4f4c,
+  0x4f4d, 0x4f4e, 0x4f4f, 0x4f50, 0x4f51, 0x4f52, 0x4f53, 0x4f54,
+  0x4f55, 0x4f56, 0x4f57, 0x4f58, 0x4f59, 0x4f5a, 0x4f5b, 0x4f5c,
+  0x4f5d, 0x4f5e, 0x4f5f, 0x4f60, 0x4f61, 0x4f62, 0x4f63, 0x4f64,
+  0x4f65, 0x4f66, 0x4f67, 0x4f68, 0x4f69, 0x4f6a, 0x4f6b, 0x4f6c,
+  0x4f6d, 0x4f6e, 0x4f6f, 0x4f70, 0x4f71, 0x4f72, 0x4f74, 0x4f75,
+  0x4f76, 0x4f73, 0x4f77, 0x4f78, 0x4f79, 0x4f7a, 0x4f7b, 0x4f7c,
+  0x4f7d, 0x4f7e, 0x5021, 0x5022, 0x5023, 0x5024, 0x5025, 0x5026,
+  0x5027, 0x5028, 0x5029, 0x502a, 0x502b, 0x502c, 0x502e, 0x502f,
+  0x5030, 0x5031, 0x502d, 0x5032, 0x5033, 0x5034, 0x5035, 0x5037,
+  0x5038, 0x5039, 0x503a, 0x503b, 0x5036, 0x503c, 0x503d, 0x503e,
+  0x503f, 0x5040, 0x5041, 0x5042, 0x5043, 0x5044, 0x5045, 0x5046,
+  0x5047, 0x5048, 0x5049, 0x504a, 0x504b, 0x504c, 0x504d, 0x504e,
+  0x504f, 0x5050, 0x5051, 0x5052, 0x5053, 0x5054, 0x5055, 0x5056,
+  0x5057, 0x5058, 0x5059, 0x505a, 0x505b, 0x505c, 0x505d, 0x505e,
+  0x505f, 0x5060, 0x5061, 0x5062, 0x5063, 0x5064, 0x5065, 0x5066,
+  0x5067, 0x5068, 0x5069, 0x506a, 0x506b, 0x506c, 0x506d, 0x506e,
+  0x506f, 0x5070, 0x5071, 0x5072, 0x5073, 0x5074, 0x5075, 0x5076,
+  0x5077, 0x5078, 0x5079, 0x507a, 0x507b, 0x507c, 0x507d, 0x507e,
+  0x5121, 0x5122, 0x5123, 0x5124, 0x5125, 0x5126, 0x5127, 0x5128,
+  0x5129, 0x512a, 0x512b, 0x512c, 0x512d, 0x512e, 0x512f, 0x5130,
+  0x5131, 0x5132, 0x5133, 0x5134, 0x5135, 0x5136, 0x5137, 0x5138,
+  0x5139, 0x513a, 0x513b, 0x513c, 0x513d, 0x513e, 0x513f, 0x5140,
+  0x5141, 0x5142, 0x5143, 0x5144, 0x5145, 0x5146, 0x5147, 0x5148,
+  0x5149, 0x514a, 0x514b, 0x514c, 0x514d, 0x514e, 0x514f, 0x5150,
+  0x5151, 0x5152, 0x5153, 0x5154, 0x5155, 0x5156, 0x5157, 0x5158,
+  0x5159, 0x515a, 0x515b, 0x515c, 0x515d, 0x515e, 0x515f, 0x5160,
+  0x5161, 0x5162, 0x5163, 0x5164, 0x5165, 0x5166, 0x5167, 0x5168,
+  0x5169, 0x516a, 0x516b, 0x516c, 0x516d, 0x516e, 0x516f, 0x5170,
+  0x5171, 0x5172, 0x5173, 0x5174, 0x5175, 0x5176, 0x5177, 0x5178,
+  0x5179, 0x517a, 0x517b, 0x517c, 0x517d, 0x517e, 0x5221, 0x5222,
+  0x5223, 0x5224, 0x5225, 0x5226, 0x5227, 0x5228, 0x5229, 0x522a,
+  0x522b, 0x522c, 0x522d, 0x522e, 0x522f, 0x5230, 0x5231, 0x5232,
+  0x5233, 0x5234, 0x5235, 0x5236, 0x5237, 0x5238, 0x5239, 0x523a,
+  0x523b, 0x523c, 0x523d, 0x523e, 0x523f, 0x5240, 0x5241, 0x5242,
+  0x5243, 0x5244, 0x5245, 0x5246, 0x5247, 0x5248, 0x5249, 0x524a,
+  0x524b, 0x524c, 0x524d, 0x524e, 0x524f, 0x5250, 0x5251, 0x5252,
+  0x5253, 0x5254, 0x5255, 0x5256, 0x5257, 0x5258, 0x5259, 0x525a,
+  0x525b, 0x525c, 0x525d, 0x525e, 0x525f, 0x5260, 0x5261, 0x5262,
+  0x5263, 0x5264, 0x5265, 0x5266, 0x5267, 0x5268, 0x5269, 0x526a,
+  0x526b, 0x526c, 0x526d, 0x526e, 0x526f, 0x5270, 0x5271, 0x5272,
+  0x5273, 0x5274, 0x5276, 0x5277, 0x5278, 0x5275, 0x5279, 0x527a,
+  0x527b, 0x527c, 0x527d, 0x527e, 0x5321, 0x5322, 0x5323, 0x5324,
+  0x5325, 0x5326, 0x5327, 0x5328, 0x5329, 0x532a, 0x532b, 0x532c,
+  0x532d, 0x532e, 0x532f, 0x5330, 0x5331, 0x5332, 0x5333, 0x5334,
+  0x5335, 0x5336, 0x5337, 0x5338, 0x5339, 0x533a, 0x533b, 0x533c,
+  0x533d, 0x533e, 0x533f, 0x5340, 0x5341, 0x5342, 0x5343, 0x5344,
+  0x5345, 0x5346, 0x5347, 0x5348, 0x5349, 0x534a, 0x534b, 0x534c,
+  0x534d, 0x534e, 0x534f, 0x5350, 0x5351, 0x5352, 0x5353, 0x5354,
+  0x5355, 0x5356, 0x5357, 0x5358, 0x5359, 0x535a, 0x535b, 0x535c,
+  0x535d, 0x535e, 0x535f, 0x5360, 0x5361, 0x5362, 0x5363, 0x5364,
+  0x5365, 0x5366, 0x5367, 0x5368, 0x5369, 0x536a, 0x536b, 0x536c,
+  0x536d, 0x536e, 0x536f, 0x5370, 0x5371, 0x5372, 0x5373, 0x5374,
+  0x5375, 0x5376, 0x5377, 0x5378, 0x5379, 0x537a, 0x537b, 0x537c,
+  0x537d, 0x537e, 0x5421, 0x5422, 0x5423, 0x5424, 0x5425, 0x5426,
+  0x5427, 0x5428, 0x5429, 0x542a, 0x542b, 0x542c, 0x542d, 0x542e,
+  0x542f, 0x5430, 0x5431, 0x5432, 0x5434, 0x5435, 0x5436, 0x5437,
+  0x5438, 0x5439, 0x543a, 0x543b, 0x543c, 0x543d, 0x543e, 0x5433,
+  0x543f, 0x5440, 0x5441, 0x5442, 0x5443, 0x5444, 0x5445, 0x5446,
+  0x5447, 0x5448, 0x5449, 0x544a, 0x544b, 0x544c, 0x544d, 0x544e,
+  0x544f, 0x5450, 0x5451, 0x5452, 0x5453, 0x5454, 0x5455, 0x5456,
+  0x5457, 0x5458, 0x5459, 0x545a, 0x545b, 0x545c, 0x545d, 0x545e,
+  0x545f, 0x5460, 0x5461, 0x5462, 0x5463, 0x5464, 0x5465, 0x5466,
+  0x5467, 0x5468, 0x5469, 0x546a, 0x546c, 0x546b, 0x546d, 0x546e,
+  0x546f, 0x5470, 0x5471, 0x5472, 0x5473, 0x5474, 0x5475, 0x5476,
+  0x5477, 0x5478, 0x5479, 0x547a, 0x547b, 0x547c, 0x547d, 0x547e,
+  0x5521, 0x5522, 0x5523, 0x5524, 0x5525, 0x5526, 0x5527, 0x5528,
+  0x5529, 0x552a, 0x552b, 0x552c, 0x552d, 0x552e, 0x552f, 0x5530,
+  0x5531, 0x5532, 0x5533, 0x5534, 0x5535, 0x5536, 0x5537, 0x5538,
+  0x5539, 0x553a, 0x553b, 0x553c, 0x553d, 0x553e, 0x553f, 0x5540,
+  0x5541, 0x5542, 0x5543, 0x5544, 0x5545, 0x5546, 0x5547, 0x5548,
+  0x5549, 0x554a, 0x554b, 0x554c, 0x554d, 0x554e, 0x554f, 0x5550,
+  0x5551, 0x5552, 0x5553, 0x5554, 0x5555, 0x5556, 0x5557, 0x5558,
+  0x5559, 0x555a, 0x555b, 0x555c, 0x555d, 0x555e, 0x555f, 0x5560,
+  0x5561, 0x5562, 0x5563, 0x5564, 0x5565, 0x5566, 0x5567, 0x5568,
+  0x5569, 0x556a, 0x556b, 0x556c, 0x556d, 0x556e, 0x556f, 0x5570,
+  0x5571, 0x5572, 0x5573, 0x5574, 0x5575, 0x5576, 0x5577, 0x5578,
+  0x5579, 0x557a, 0x557b, 0x557c, 0x557d, 0x557e, 0x5621, 0x5622,
+  0x5623, 0x5624, 0x5625, 0x5626, 0x5627, 0x5628, 0x5629, 0x562a,
+  0x562b, 0x562c, 0x562d, 0x562e, 0x562f, 0x5630, 0x5631, 0x5632,
+  0x5633, 0x5634, 0x5635, 0x5636, 0x5637, 0x5638, 0x5639, 0x563a,
+  0x563b, 0x563c, 0x563d, 0x563e, 0x563f, 0x5640, 0x5641, 0x5642,
+  0x5643, 0x5644, 0x5645, 0x5647, 0x5648, 0x5649, 0x564a, 0x564b,
+  0x5646, 0x564c, 0x564d, 0x564e, 0x564f, 0x5650, 0x5651, 0x5652,
+  0x5653, 0x5654, 0x5656, 0x5657, 0x5658, 0x5655, 0x5659, 0x565a,
+  0x565b, 0x565c, 0x565d, 0x565e, 0x565f, 0x5660, 0x5661, 0x5662,
+  0x5663, 0x5664, 0x5665, 0x5666, 0x5667, 0x5668, 0x5669, 0x566a,
+  0x566b, 0x566c, 0x566d, 0x566e, 0x566f, 0x5670, 0x5671, 0x5672,
+  0x5673, 0x5674, 0x5675, 0x5676, 0x5677, 0x5678, 0x5679, 0x567a,
+  0x567b, 0x567c, 0x567d, 0x567e, 0x5721, 0x5722, 0x5723, 0x5724,
+  0x5725, 0x5726, 0x5727, 0x5728, 0x5729, 0x572a, 0x572b, 0x572c,
+  0x572d, 0x572e, 0x572f, 0x5730, 0x5731, 0x5732, 0x5733, 0x5734,
+  0x5735, 0x5736, 0x5737, 0x5738, 0x5739, 0x573a, 0x573b, 0x573c,
+  0x573d, 0x573e, 0x573f, 0x5740, 0x5741, 0x5742, 0x5743, 0x5744,
+  0x5745, 0x5746, 0x5747, 0x5748, 0x5749, 0x574a, 0x574b, 0x574c,
+  0x574d, 0x574e, 0x574f, 0x5750, 0x5751, 0x5752, 0x5753, 0x5754,
+  0x5755, 0x5756, 0x5757, 0x5758, 0x5759, 0x575a, 0x575b, 0x575c,
+  0x575d, 0x575e, 0x575f, 0x5760, 0x5761, 0x5762, 0x5764, 0x5765,
+  0x5766, 0x5767, 0x5768, 0x5769, 0x576a, 0x576b, 0x576c, 0x576d,
+  0x576e, 0x576f, 0x5770, 0x5771, 0x5772, 0x5773, 0x5774, 0x5775,
+  0x5776, 0x5777, 0x5778, 0x5779, 0x583e, 0x5763, 0x577a, 0x577b,
+  0x577c, 0x577d, 0x577e, 0x5821, 0x5822, 0x5823, 0x5824, 0x5825,
+  0x5826, 0x5827, 0x5828, 0x5829, 0x582a, 0x582b, 0x582c, 0x582d,
+  0x582e, 0x582f, 0x5830, 0x5831, 0x5832, 0x5833, 0x584c, 0x5834,
+  0x5835, 0x5836, 0x5837, 0x5838, 0x5839, 0x583a, 0x583b, 0x583c,
+  0x583d, 0x583f, 0x5840, 0x5841, 0x5842, 0x5843, 0x5844, 0x5845,
+  0x5846, 0x5847, 0x5848, 0x5849, 0x584a, 0x584b, 0x584d, 0x584e,
+  0x584f, 0x5850, 0x5851, 0x5852, 0x5853, 0x5854, 0x5855, 0x5856,
+  0x5857, 0x5858, 0x5859, 0x585a, 0x585b, 0x585c, 0x585d, 0x585e,
+  0x585f, 0x5860, 0x5861, 0x5862, 0x5863, 0x5864, 0x5865, 0x5866,
+  0x5867, 0x5868, 0x5869, 0x586a, 0x586b, 0x586c, 0x586d, 0x586e,
+  0x586f, 0x5870, 0x5871, 0x5872, 0x5873, 0x5874, 0x5875, 0x5876,
+  0x5877, 0x5878, 0x5879, 0x587a, 0x587b, 0x587c, 0x587d, 0x587e,
+  0x5921, 0x5922, 0x5923, 0x5924, 0x5925, 0x5926, 0x5927, 0x5928,
+  0x592a, 0x592b, 0x592c, 0x592d, 0x592e, 0x592f, 0x5930, 0x5931,
+  0x5932, 0x5933, 0x5934, 0x5935, 0x5936, 0x5937, 0x5938, 0x5939,
+  0x593a, 0x593b, 0x593c, 0x5929, 0x593d, 0x593e, 0x593f, 0x5940,
+  0x5941, 0x5942, 0x5943, 0x5944, 0x5945, 0x5946, 0x5947, 0x5948,
+  0x5949, 0x594a, 0x594b, 0x594c, 0x594d, 0x594e, 0x594f, 0x5950,
+  0x5951, 0x5952, 0x5953, 0x5954, 0x5955, 0x5956, 0x5957, 0x5958,
+  0x5959, 0x595a, 0x595b, 0x595c, 0x595d, 0x595e, 0x595f, 0x5960,
+  0x5961, 0x5962, 0x5963, 0x5964, 0x5965, 0x5966, 0x5974, 0x5967,
+  0x5968, 0x5969, 0x596a, 0x596b, 0x596c, 0x596d, 0x596e, 0x596f,
+  0x5970, 0x5971, 0x5972, 0x5973, 0x5975, 0x5976, 0x5977, 0x5978,
+  0x5979, 0x597a, 0x597b, 0x597c, 0x597d, 0x597e, 0x5a21, 0x5a22,
+  0x5a23, 0x5a24, 0x5a25, 0x5a26, 0x5a27, 0x5a28, 0x5a29, 0x5a2a,
+  0x5a2b, 0x5a2c, 0x5a2d, 0x5a2e, 0x5a2f, 0x5a30, 0x5a31, 0x5a32,
+  0x5a33, 0x5a34, 0x5a35, 0x5a36, 0x3866, 0x5a37, 0x5a38, 0x5a39,
+  0x5a3a, 0x5a3b, 0x5a3c, 0x5a3d, 0x5a3e, 0x5a3f, 0x5a40, 0x5a41,
+  0x5a42, 0x5a43, 0x5a44, 0x5a45, 0x5a46, 0x5a47, 0x5a48, 0x5a49,
+  0x5a4a, 0x5a4b, 0x5a6d, 0x5a4c, 0x5a4d, 0x5a4e, 0x5a4f, 0x5a50,
+  0x5a51, 0x5a52, 0x5a53, 0x5a54, 0x5a55, 0x5a56, 0x5a57, 0x5a58,
+  0x5a59, 0x5a5a, 0x5a5b, 0x5a5c, 0x5a5d, 0x5a5e, 0x5a5f, 0x5a60,
+  0x5a61, 0x5a62, 0x5a63, 0x5a64, 0x5a65, 0x5a66, 0x5a67, 0x5a68,
+  0x5a69, 0x5a6a, 0x5a6b, 0x5a6c, 0x5a6e, 0x5a6f, 0x5a70, 0x5a71,
+  0x5a72, 0x5a73, 0x5a74, 0x5a75, 0x5a76, 0x5a77, 0x5a78, 0x5a79,
+  0x5a7a, 0x5a7b, 0x5a7c, 0x5a7d, 0x5a7e, 0x5b21, 0x5b22, 0x5b23,
+  0x5b24, 0x5b25, 0x5b26, 0x5b27, 0x5b28, 0x5b29, 0x5b2a, 0x5b2b,
+  0x5b2c, 0x5b2d, 0x5b2e, 0x5b2f, 0x5b30, 0x5b31, 0x5b32, 0x5b33,
+  0x5b34, 0x5b35, 0x5b36, 0x5b37, 0x5b38, 0x5b39, 0x5b3a, 0x5b3b,
+  0x5b3c, 0x5b3d, 0x5b3e, 0x5b3f, 0x5b40, 0x5b41, 0x5b42, 0x5b43,
+  0x5b44, 0x5b45, 0x5b46, 0x5b47, 0x5b48, 0x5b49, 0x5b4a, 0x5b4b,
+  0x5b4c, 0x5b4d, 0x5b4e, 0x5b4f, 0x5b50, 0x5b51, 0x5b52, 0x5b53,
+  0x5b54, 0x5b55, 0x5b56, 0x5b57, 0x5b58, 0x5b59, 0x5b5a, 0x5b5b,
+  0x5b5c, 0x5b5d, 0x5b5e, 0x5b5f, 0x5b60, 0x5b61, 0x5b62, 0x5b63,
+  0x5b64, 0x5b65, 0x5b66, 0x5b67, 0x5b68, 0x5b69, 0x5b6a, 0x5b6b,
+  0x5b6c, 0x5b6d, 0x5b6e, 0x5b70, 0x5b71, 0x5b72, 0x5b73, 0x5b6f,
+  0x5b74, 0x5b75, 0x5b76, 0x5b77, 0x5b78, 0x5b79, 0x5b7a, 0x5b7b,
+  0x5b7c, 0x5b7d, 0x5b7e, 0x5c21, 0x5c22, 0x5c23, 0x5c24, 0x5c25,
+  0x5c26, 0x5c27, 0x5c28, 0x5c29, 0x5c2a, 0x5c2b, 0x5c2c, 0x5c2d,
+  0x5c2e, 0x5c2f, 0x5c30, 0x5c31, 0x5c32, 0x5c33, 0x5c34, 0x5c35,
+  0x5c36, 0x5c37, 0x5c38, 0x5c39, 0x5c3a, 0x5c3b, 0x5c3c, 0x5c3d,
+  0x5c3e, 0x5c3f, 0x5c40, 0x5c41, 0x5c42, 0x5c43, 0x5c44, 0x5c45,
+  0x5c46, 0x5c47, 0x5c48, 0x5c49, 0x5c4a, 0x5c4b, 0x5c4c, 0x5c4d,
+  0x5c4e, 0x5c4f, 0x5c50, 0x5c51, 0x5c52, 0x5c53, 0x5c54, 0x5c55,
+  0x5c56, 0x5c57, 0x5c58, 0x5c59, 0x5c5a, 0x5c5b, 0x5c5c, 0x5c5d,
+  0x5c5e, 0x5c5f, 0x5c60, 0x5c61, 0x5c62, 0x5c63, 0x5c64, 0x5c65,
+  0x5c66, 0x5c67, 0x5c68, 0x5c69, 0x5c6a, 0x5c6b, 0x5c6c, 0x5c6d,
+  0x5c6e, 0x5c6f, 0x5c70, 0x5c71, 0x5c72, 0x5c73, 0x5c74, 0x5c75,
+  0x5c76, 0x5c77, 0x5c78, 0x5c79, 0x5c7a, 0x5c7b, 0x5c7c, 0x5c7d,
+  0x5c7e, 0x5d21, 0x5d22, 0x5d23, 0x5d24, 0x5d25, 0x5d26, 0x5d27,
+  0x5d28, 0x5d29, 0x5d2a, 0x5d2b, 0x5d2c, 0x5d2d, 0x5d2e, 0x5d2f,
+  0x5d30, 0x5d31, 0x5d32, 0x5d33, 0x5d34, 0x5d35, 0x5d36, 0x5d37,
+  0x5d38, 0x5d39, 0x5d3a, 0x5d3b, 0x5d3c, 0x5d3d, 0x5d3e, 0x5d3f,
+  0x5d40, 0x5d41, 0x5d42, 0x5d43, 0x5d44, 0x5d45, 0x5d46, 0x5d47,
+  0x5d48, 0x5d49, 0x5d4a, 0x5d4b, 0x5d4c, 0x5d4d, 0x5d4e, 0x5d4f,
+  0x5d50, 0x5d51, 0x5d52, 0x5d53, 0x5d54, 0x5d55, 0x5d56, 0x5d57,
+  0x5d58, 0x5d59, 0x5d5a, 0x5d5b, 0x5d5c, 0x5d5d, 0x5d5e, 0x5d5f,
+  0x5d60, 0x5d61, 0x5d62, 0x5d63, 0x5d64, 0x5d65, 0x5d66, 0x5d67,
+  0x5d68, 0x5d69, 0x5d6a, 0x5d6b, 0x5d6c, 0x5d6d, 0x5d6e, 0x5d6f,
+  0x5d70, 0x5d71, 0x5d72, 0x5d73, 0x5d74, 0x5d75, 0x5d76, 0x5d77,
+  0x5d78, 0x5d79, 0x5d7a, 0x5d7b, 0x5d7c, 0x5d7d, 0x5d7e, 0x5e21,
+  0x5e22, 0x5e23, 0x5e24, 0x5e25, 0x5e26, 0x5e27, 0x5e28, 0x5e29,
+  0x5e2a, 0x5e2b, 0x5e2c, 0x5e2d, 0x5e2e, 0x5e2f, 0x5e30, 0x5e31,
+  0x5e32, 0x5e33, 0x5e34, 0x5e35, 0x5e36, 0x5e37, 0x5e38, 0x5e39,
+  0x5e3f, 0x5e3a, 0x5e3b, 0x5e3c, 0x5e3d, 0x5e3e, 0x5e40, 0x5e41,
+  0x5e42, 0x5e43, 0x5e44, 0x5e45, 0x5e46, 0x5e47, 0x5e48, 0x5e49,
+  0x5e4e, 0x5e4a, 0x5e4b, 0x5e4c, 0x5e4d, 0x5e4f, 0x5e50, 0x5e51,
+  0x5e52, 0x5e53, 0x5e54, 0x5e55, 0x5e56, 0x5e57, 0x5e58, 0x5e59,
+  0x5e5a, 0x5e5b, 0x5e5c, 0x5e5d, 0x5e5e, 0x5e5f, 0x5e60, 0x5e61,
+  0x5e62, 0x5e63, 0x5e64, 0x5e65, 0x5e66, 0x5e67, 0x5e68, 0x5e69,
+  0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e, 0x5e6f, 0x5e72, 0x5e70,
+  0x5e71, 0x5e73, 0x5e74, 0x5e75, 0x5e76, 0x5e77, 0x5e78, 0x5e79,
+  0x5e7a, 0x5e7b, 0x5e7c, 0x5e7d, 0x5e7e, 0x5f21, 0x5f22, 0x5f23,
+  0x5f24, 0x5f25, 0x5f26, 0x5f27, 0x5f28, 0x5f29, 0x5f2a, 0x5f2b,
+  0x5f2c, 0x5f2d, 0x5f2e, 0x5f2f, 0x5f30, 0x5f32, 0x5f31, 0x5f33,
+  0x5f34, 0x5f35, 0x5f36, 0x5f37, 0x5f38, 0x5f39, 0x5f3a, 0x5f3b,
+  0x5f3c, 0x5f3d, 0x5f3e, 0x5f3f, 0x5f40, 0x5f41, 0x5f42, 0x5f43,
+  0x5f44, 0x5f45, 0x5f46, 0x5f47, 0x5f48, 0x5f49, 0x5f4a, 0x5f4b,
+  0x5f4c, 0x5f4d, 0x5f4e, 0x5f4f, 0x5f50, 0x5f51, 0x5f52, 0x5f53,
+  0x5f54, 0x5f55, 0x5f56, 0x5f57, 0x5f58, 0x5f59, 0x5f5a, 0x5f5b,
+  0x5f5c, 0x5f5d, 0x5f6f, 0x5f5e, 0x5f5f, 0x5f60, 0x5f61, 0x5f62,
+  0x5f63, 0x5f64, 0x5f65, 0x5f66, 0x5f67, 0x5f68, 0x5f69, 0x5f6a,
+  0x5f6b, 0x5f6c, 0x5f6d, 0x5f6e, 0x5f70, 0x5f71, 0x5f72, 0x5f73,
+  0x5f74, 0x5f75, 0x5f76, 0x5f77, 0x5f78, 0x5f79, 0x5f7a, 0x5f7b,
+  0x5f7c, 0x5f7d, 0x5f7e, 0x6021, 0x6022, 0x6023, 0x6024, 0x6025,
+  0x6026, 0x6027, 0x6028, 0x6029, 0x602a, 0x602b, 0x602c, 0x602d,
+  0x602e, 0x602f, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6035,
+  0x6036, 0x6037, 0x6038, 0x6039, 0x603a, 0x603b, 0x603c, 0x603d,
+  0x603e, 0x603f, 0x6040, 0x6041, 0x6042, 0x6043, 0x6044, 0x6045,
+  0x6046, 0x6047, 0x6048, 0x6049, 0x604a, 0x604b, 0x604c, 0x604d,
+  0x604e, 0x604f, 0x6050, 0x6051, 0x6052, 0x6053, 0x6054, 0x6055,
+  0x6056, 0x6057, 0x6058, 0x6059, 0x605a, 0x605b, 0x605c, 0x605d,
+  0x6064, 0x605e, 0x605f, 0x6060, 0x6061, 0x6062, 0x6063, 0x6065,
+  0x6066, 0x6067, 0x6068, 0x6069, 0x606a, 0x606b, 0x606c, 0x606d,
+  0x606e, 0x606f, 0x6070, 0x6071, 0x6072, 0x6073, 0x6074, 0x6075,
+  0x6076, 0x6077, 0x6078, 0x6079, 0x607a, 0x607b, 0x607c, 0x607d,
+  0x607e, 0x6121, 0x6122, 0x6123, 0x6124, 0x6125, 0x6126, 0x6127,
+  0x6128, 0x6129, 0x612a, 0x612b, 0x612c, 0x612d, 0x612e, 0x612f,
+  0x6130, 0x6131, 0x6132, 0x6133, 0x6134, 0x6135, 0x6136, 0x6137,
+  0x6138, 0x6139, 0x613a, 0x613b, 0x613c, 0x613d, 0x613e, 0x613f,
+  0x6140, 0x6141, 0x6142, 0x6143, 0x6144, 0x6145, 0x6146, 0x6147,
+  0x6148, 0x6149, 0x614a, 0x614b, 0x614c, 0x614d, 0x614e, 0x614f,
+  0x6150, 0x6151, 0x6152, 0x6154, 0x6155, 0x6156, 0x6153, 0x6157,
+  0x6158, 0x6159, 0x615a, 0x615b, 0x615c, 0x615d, 0x615e, 0x615f,
+  0x6160, 0x6161, 0x6162, 0x6163, 0x6164, 0x6165, 0x6166, 0x6167,
+  0x6168, 0x6169, 0x616a, 0x616b, 0x616c, 0x616d, 0x616e, 0x616f,
+  0x6170, 0x6171, 0x6172, 0x6173, 0x6174, 0x6175, 0x6176, 0x6177,
+  0x6178, 0x6179, 0x617a, 0x617b, 0x617d, 0x617e, 0x6221, 0x6222,
+  0x6223, 0x6224, 0x617c, 0x622d, 0x6225, 0x6226, 0x6227, 0x6228,
+  0x6229, 0x622a, 0x622b, 0x622c, 0x622f, 0x6230, 0x6231, 0x6232,
+  0x622e, 0x6233, 0x6234, 0x6235, 0x6236, 0x6237, 0x6238, 0x6239,
+  0x623a, 0x623b, 0x623c, 0x623d, 0x623e, 0x623f, 0x6240, 0x6241,
+  0x6242, 0x6243, 0x6245, 0x6246, 0x6244, 0x6247, 0x6248, 0x6249,
+  0x624a, 0x624b, 0x624c, 0x624d, 0x624e, 0x624f, 0x6250, 0x6251,
+  0x6252, 0x6253, 0x6254, 0x6255, 0x6256, 0x6257, 0x6258, 0x6259,
+  0x625a, 0x625b, 0x625c, 0x625d, 0x625e, 0x625f, 0x6260, 0x6261,
+  0x6262, 0x6263, 0x6264, 0x6265, 0x6266, 0x6267, 0x6268, 0x6269,
+  0x626a, 0x626b, 0x626c, 0x626d, 0x626e, 0x626f, 0x6270, 0x6271,
+  0x6272, 0x6273, 0x6274, 0x6275, 0x6276, 0x6277, 0x6278, 0x6279,
+  0x627a, 0x627b, 0x627c, 0x627d, 0x627e, 0x6321, 0x6322, 0x6323,
+  0x6324, 0x6325, 0x6326, 0x6327, 0x6328, 0x6329, 0x632a, 0x632b,
+  0x632c, 0x632d, 0x632e, 0x632f, 0x6330, 0x6331, 0x6332, 0x6333,
+  0x6334, 0x6335, 0x6336, 0x6337, 0x6338, 0x6339, 0x633a, 0x633b,
+  0x633c, 0x633d, 0x633e, 0x633f, 0x6340, 0x6341, 0x6342, 0x6343,
+  0x6344, 0x6345, 0x6346, 0x6347, 0x6348, 0x6349, 0x634a, 0x634b,
+  0x634c, 0x634d, 0x634e, 0x634f, 0x6350, 0x6351, 0x6352, 0x6353,
+  0x6354, 0x6355, 0x6356, 0x6357, 0x6358, 0x6359, 0x635a, 0x635b,
+  0x635c, 0x635d, 0x635e, 0x635f, 0x6360, 0x6361, 0x6362, 0x6363,
+  0x6364, 0x6365, 0x6366, 0x6367, 0x6368, 0x6369, 0x636a, 0x636b,
+  0x636c, 0x636d, 0x636e, 0x636f, 0x6370, 0x6371, 0x6372, 0x6373,
+  0x6374, 0x6375, 0x6376, 0x6377, 0x6378, 0x6379, 0x637a, 0x637b,
+  0x637c, 0x637d, 0x637e, 0x6421, 0x6422, 0x6423, 0x6424, 0x6425,
+  0x6426, 0x6427, 0x6428, 0x6429, 0x642a, 0x642b, 0x642c, 0x642d,
+  0x642e, 0x642f, 0x6430, 0x6431, 0x6432, 0x6433, 0x6434, 0x6435,
+  0x6436, 0x6437, 0x6438, 0x6439, 0x643a, 0x643b, 0x643c, 0x643d,
+  0x643e, 0x643f, 0x6440, 0x6441, 0x6442, 0x6443, 0x6444, 0x6445,
+  0x6446, 0x6447, 0x6448, 0x6449, 0x644a, 0x644b, 0x644c, 0x644d,
+  0x644e, 0x644f, 0x6450, 0x6451, 0x6452, 0x6453, 0x6454, 0x6455,
+  0x6456, 0x6457, 0x6458, 0x6459, 0x645a, 0x645b, 0x645c, 0x645d,
+  0x645e, 0x645f, 0x6460, 0x6461, 0x6462, 0x6463, 0x6464, 0x6465,
+  0x6466, 0x6467, 0x6468, 0x6469, 0x646a, 0x646b, 0x646c, 0x646d,
+  0x646e, 0x646f, 0x6470, 0x6471, 0x6472, 0x6473, 0x6474, 0x6475,
+  0x6476, 0x6477, 0x6478, 0x6479, 0x647a, 0x647b, 0x647c, 0x647d,
+  0x647e, 0x6521, 0x6522, 0x6523, 0x6524, 0x6525, 0x6526, 0x6527,
+  0x6528, 0x6529, 0x652a, 0x652b, 0x652c, 0x652d, 0x652e, 0x652f,
+  0x6530, 0x6531, 0x6532, 0x6533, 0x6534, 0x6535, 0x653b, 0x6536,
+  0x6537, 0x6538, 0x6539, 0x653a, 0x653c, 0x653d, 0x653e, 0x653f,
+  0x6540, 0x6541, 0x6542, 0x6543, 0x6544, 0x6545, 0x6546, 0x6547,
+  0x6548, 0x6549, 0x654a, 0x654b, 0x654c, 0x654d, 0x654f, 0x6550,
+  0x654e, 0x6551, 0x6552, 0x6553, 0x6554, 0x6555, 0x6556, 0x6557,
+  0x6558, 0x6559, 0x655a, 0x655b, 0x655c, 0x655d, 0x655e, 0x655f,
+  0x6560, 0x6561, 0x6562, 0x6563, 0x6564, 0x6565, 0x6566, 0x6568,
+  0x6567, 0x6569, 0x656a, 0x656b, 0x656c, 0x656d, 0x656e, 0x656f,
+  0x6570, 0x6571, 0x6572, 0x6573, 0x6574, 0x6575, 0x6576, 0x6577,
+  0x6578, 0x6579, 0x657a, 0x657c, 0x657b, 0x657d, 0x657e, 0x6621,
+  0x6622, 0x6623, 0x6624, 0x6625, 0x6626, 0x6627, 0x6628, 0x6629,
+  0x662a, 0x662b, 0x662c, 0x662d, 0x662e, 0x662f, 0x6630, 0x6631,
+  0x6632, 0x6633, 0x6634, 0x6635, 0x6636, 0x6637, 0x6638, 0x6639,
+  0x663a, 0x663b, 0x663c, 0x663d, 0x663e, 0x663f, 0x6640, 0x6641,
+  0x6642, 0x6643, 0x6644, 0x6645, 0x6646, 0x6647, 0x6648, 0x6649,
+  0x664a, 0x664b, 0x664c, 0x664d, 0x664e, 0x664f, 0x6650, 0x6651,
+  0x6652, 0x6653, 0x6654, 0x6655, 0x6656, 0x6657, 0x6658, 0x6659,
+  0x665a, 0x665b, 0x665c, 0x665d, 0x665e, 0x665f, 0x6660, 0x6661,
+  0x6662, 0x6663, 0x6664, 0x6665, 0x6666, 0x6667, 0x6668, 0x6669,
+  0x666a, 0x666b, 0x666c, 0x666d, 0x666e, 0x666f, 0x6670, 0x6671,
+  0x6672, 0x6673, 0x6675, 0x6676, 0x6677, 0x6678, 0x6679, 0x667a,
+  0x667b, 0x667c, 0x667d, 0x667e, 0x6721, 0x6722, 0x6723, 0x6724,
+  0x6725, 0x6726, 0x6727, 0x6728, 0x6729, 0x672a, 0x672b, 0x672c,
+  0x672d, 0x672e, 0x672f, 0x6730, 0x6731, 0x6732, 0x6733, 0x6734,
+  0x6735, 0x6736, 0x6737, 0x6738, 0x6739, 0x673a, 0x673b, 0x673c,
+  0x673d, 0x673e, 0x673f, 0x6740, 0x6741, 0x6742, 0x6743, 0x6744,
+  0x6745, 0x6746, 0x6747, 0x6748, 0x6749, 0x674a, 0x674b, 0x674c,
+  0x674d, 0x674e, 0x674f, 0x6750, 0x6751, 0x6752, 0x6753, 0x6754,
+  0x6755, 0x6756, 0x6757, 0x6758, 0x6759, 0x675a, 0x675b, 0x675c,
+  0x675d, 0x675e, 0x675f, 0x6760, 0x6761, 0x6762, 0x6763, 0x6764,
+  0x6765, 0x6766, 0x676a, 0x6767, 0x6768, 0x6769, 0x676b, 0x676c,
+  0x676d, 0x676e, 0x676f, 0x6770, 0x6771, 0x6772, 0x6773, 0x6774,
+  0x6776, 0x6777, 0x6778, 0x6779, 0x6775, 0x677a, 0x677b, 0x677c,
+  0x677d, 0x6828, 0x677e, 0x6821, 0x6822, 0x6823, 0x6824, 0x6825,
+  0x6826, 0x6827, 0x6829, 0x682a, 0x682b, 0x682c, 0x682d, 0x682e,
+  0x682f, 0x6830, 0x6831, 0x6832, 0x6833, 0x6834, 0x6835, 0x6836,
+  0x6837, 0x6838, 0x6839, 0x683a, 0x683b, 0x683c, 0x683d, 0x683e,
+  0x683f, 0x6840, 0x6841, 0x6842, 0x6843, 0x6844, 0x6845, 0x6846,
+  0x6847, 0x6848, 0x6849, 0x684a, 0x684b, 0x684c, 0x684d, 0x684e,
+  0x684f, 0x6850, 0x6851, 0x6852, 0x6853, 0x6854, 0x6855, 0x6856,
+  0x6857, 0x6858, 0x6859, 0x685a, 0x685b, 0x685c, 0x685d, 0x685e,
+  0x685f, 0x6860, 0x6861, 0x6862, 0x6863, 0x6864, 0x6865, 0x6866,
+  0x6867, 0x6868, 0x6869, 0x686a, 0x686b, 0x686c, 0x686d, 0x686e,
+  0x686f, 0x6870, 0x6871, 0x6872, 0x6873, 0x6874, 0x6875, 0x6876,
+  0x6877, 0x6878, 0x6879, 0x687a, 0x687b, 0x687c, 0x687d, 0x687e,
+  0x6921, 0x6922, 0x6923, 0x6924, 0x6925, 0x6926, 0x6927, 0x6928,
+  0x6929, 0x692a, 0x692b, 0x692c, 0x692d, 0x692e, 0x692f, 0x6930,
+  0x6931, 0x6932, 0x6933, 0x6934, 0x6935, 0x6936, 0x6937, 0x6938,
+  0x6939, 0x693a, 0x693b, 0x693c, 0x693d, 0x693e, 0x693f, 0x6940,
+  0x6941, 0x6942, 0x6943, 0x6944, 0x6945, 0x6946, 0x6947, 0x6948,
+  0x6949, 0x694a, 0x694c, 0x694d, 0x694b, 0x694e, 0x694f, 0x6950,
+  0x6951, 0x6952, 0x6953, 0x6954, 0x6955, 0x6956, 0x6957, 0x6958,
+  0x6959, 0x695a, 0x695b, 0x695c, 0x695d, 0x695e, 0x695f, 0x6960,
+  0x6961, 0x6962, 0x6963, 0x6964, 0x6965, 0x6966, 0x6967, 0x6968,
+  0x6969, 0x696a, 0x696b, 0x696c, 0x696d, 0x696e, 0x696f, 0x6970,
+  0x6971, 0x6972, 0x6973, 0x6974, 0x6975, 0x6976, 0x6977, 0x6978,
+  0x6979, 0x697a, 0x697b, 0x697c, 0x697d, 0x697e, 0x6a21, 0x6a22,
+  0x6a23, 0x6a24, 0x6a25, 0x6a26, 0x6a27, 0x6a28, 0x6a29, 0x6a2a,
+  0x6a2b, 0x6a2c, 0x6a2d, 0x6a2e, 0x6a2f, 0x6a30, 0x6a31, 0x6a32,
+  0x6a33, 0x6a34, 0x6a35, 0x6a36, 0x6a37, 0x6a38, 0x6a39, 0x6a3a,
+  0x6a3b, 0x6a3c, 0x6a3d, 0x6a3e, 0x6a3f, 0x6a40, 0x6a41, 0x6a42,
+  0x6a43, 0x6a44, 0x6a45, 0x6a46, 0x6a47, 0x6a48, 0x6a49, 0x6a4a,
+  0x6a4b, 0x6a4c, 0x6a4d, 0x6a4e, 0x6a4f, 0x6a50, 0x6a51, 0x6a52,
+  0x6a53, 0x6a54, 0x6a55, 0x6a56, 0x6a57, 0x6a58, 0x6a59, 0x6a5a,
+  0x6a5b, 0x6a5c, 0x6a5d, 0x6a5e, 0x6a5f, 0x6a60, 0x6a61, 0x6a62,
+  0x6a63, 0x6a64, 0x6a65, 0x6a66, 0x6a67, 0x6a68, 0x6a69, 0x6a6a,
+  0x6a6b, 0x6a6c, 0x6a6d, 0x6a6e, 0x6a6f, 0x6a70, 0x6a71, 0x6a72,
+  0x6a73, 0x6a74, 0x6a75, 0x6a76, 0x6a77, 0x6a78, 0x6a79, 0x6a7a,
+  0x6a7b, 0x6a7c, 0x6a7d, 0x6a7e, 0x6b21, 0x6b22, 0x6b23, 0x6b24,
+  0x6b25, 0x6b26, 0x6b27, 0x6b28, 0x6b29, 0x6b2a, 0x6b2b, 0x6b2c,
+  0x6b2d, 0x6b2e, 0x6b2f, 0x6b30, 0x6b31, 0x6b32, 0x6b33, 0x6b34,
+  0x6b35, 0x6b36, 0x6b37, 0x6b38, 0x6b39, 0x6b3a, 0x6b3b, 0x6b3c,
+  0x6b3d, 0x6b3e, 0x6b3f, 0x6b40, 0x6b41, 0x6b42, 0x6b43, 0x6b44,
+  0x6b45, 0x6b46, 0x6b47, 0x6b48, 0x6b49, 0x6b50, 0x6b4a, 0x6b4b,
+  0x6b4c, 0x6b4d, 0x6b52, 0x6b4e, 0x6b4f, 0x6b51, 0x6b53, 0x6b54,
+  0x6b55, 0x6b56, 0x6b57, 0x6b58, 0x6b59, 0x6b5a, 0x6b5b, 0x6b5c,
+  0x6b5e, 0x6b5d, 0x6b5f, 0x6b60, 0x6b61, 0x6b62, 0x6b63, 0x6b64,
+  0x6b65, 0x6b66, 0x6b67, 0x6b68, 0x6b69, 0x6b6a, 0x6b6b, 0x6b6d,
+  0x6b6e, 0x6b6f, 0x6b6c, 0x6b70, 0x6b71, 0x6b72, 0x6b73, 0x6b74,
+  0x6b76, 0x6b75, 0x6b77, 0x6b78, 0x6b79, 0x6b7a, 0x6b7b, 0x6b7c,
+  0x6b7d, 0x6b7e, 0x6c21, 0x6c22, 0x6c23, 0x6c24, 0x6c25, 0x6c26,
+  0x6c27, 0x6c28, 0x6c29, 0x6c2a, 0x6c2b, 0x6c2c, 0x6c2d, 0x6c2e,
+  0x6c2f, 0x6c30, 0x6c31, 0x6c32, 0x6c33, 0x6c34, 0x6c35, 0x6c36,
+  0x6c37, 0x6c38, 0x6c39, 0x6c3a, 0x6c3b, 0x6c3c, 0x6c3d, 0x6c3e,
+  0x6c3f, 0x6c40, 0x6c41, 0x6c42, 0x6c43, 0x6c44, 0x6c45, 0x6c46,
+  0x6c47, 0x6c48, 0x6c49, 0x6c4a, 0x6c4b, 0x6c4c, 0x6c4e, 0x6c4f,
+  0x6c4d, 0x6c50, 0x6c51, 0x6c52, 0x6c53, 0x6c54, 0x6c55, 0x6c56,
+  0x6c57, 0x6c58, 0x6c59, 0x6c5a, 0x6c5b, 0x6c5c, 0x6c5d, 0x6c5e,
+  0x6c5f, 0x6c60, 0x6c61, 0x6c62, 0x6c63, 0x6c64, 0x6c65, 0x6c66,
+  0x6c67, 0x6c68, 0x6c69, 0x6c6a, 0x6c6b, 0x6c6c, 0x6c6d, 0x6c6e,
+  0x6c6f, 0x6c70, 0x6c71, 0x6c72, 0x6c73, 0x6c74, 0x6c75, 0x6c76,
+  0x6c77, 0x6c78, 0x6c79, 0x6c7a, 0x6c7b, 0x6c7c, 0x6c7d, 0x6c7e,
+  0x6d21, 0x6d22, 0x6d23, 0x6d24, 0x6d25, 0x6d26, 0x6d27, 0x6d28,
+  0x6d29, 0x6d2a, 0x6d2b, 0x6d2c, 0x6d2d, 0x6d2e, 0x6d2f, 0x6d30,
+  0x6d31, 0x6d32, 0x6d33, 0x6d34, 0x6d35, 0x6d36, 0x6d37, 0x6d38,
+  0x6d39, 0x6d3a, 0x6d3b, 0x6d3c, 0x6d3d, 0x6d3e, 0x6d3f, 0x6d40,
+  0x6d41, 0x6d42, 0x6d43, 0x6d44, 0x6d45, 0x6d46, 0x6d47, 0x6d48,
+  0x6d49, 0x6d4a, 0x6d4b, 0x6d4c, 0x6d4d, 0x6d4e, 0x6d4f, 0x6d50,
+  0x6d51, 0x6d52, 0x6d53, 0x6d54, 0x6d55, 0x6d56, 0x6d57, 0x6d58,
+  0x6d59, 0x6d5a, 0x6d5b, 0x6d5c, 0x6d5d, 0x6d5e, 0x6d5f, 0x6d60,
+  0x6d61, 0x6d62, 0x6d63,
+};
+
+static const Summary16 jisx0212_uni2indx_page00[70] = {
+  /* 0x0000 */
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x4000 },
+  {    1, 0x0000 }, {    1, 0x0000 }, {    1, 0xc652 }, {    8, 0x8500 },
+  {   11, 0xffff }, {   27, 0xff7e }, {   41, 0xffff }, {   57, 0xff7f },
+  /* 0x0100 */
+  {   72, 0xffff }, {   88, 0xffcf }, {  102, 0xcff7 }, {  115, 0xffff },
+  {  131, 0x3fff }, {  145, 0xffff }, {  161, 0xffff }, {  177, 0x7fff },
+  {  192, 0x0000 }, {  192, 0x0000 }, {  192, 0x0000 }, {  192, 0x0000 },
+  {  192, 0xe000 }, {  195, 0x1fff }, {  208, 0x0000 }, {  208, 0x0020 },
+  /* 0x0200 */
+  {  209, 0x0000 }, {  209, 0x0000 }, {  209, 0x0000 }, {  209, 0x0000 },
+  {  209, 0x0000 }, {  209, 0x0000 }, {  209, 0x0000 }, {  209, 0x0000 },
+  {  209, 0x0000 }, {  209, 0x0000 }, {  209, 0x0000 }, {  209, 0x0000 },
+  {  209, 0x0080 }, {  210, 0x2f00 }, {  215, 0x0000 }, {  215, 0x0000 },
+  /* 0x0300 */
+  {  215, 0x0000 }, {  215, 0x0000 }, {  215, 0x0000 }, {  215, 0x0000 },
+  {  215, 0x0000 }, {  215, 0x0000 }, {  215, 0x0000 }, {  215, 0x0000 },
+  {  215, 0xd770 }, {  224, 0x0001 }, {  225, 0xfc00 }, {  231, 0x0001 },
+  {  232, 0x7c04 }, {  238, 0x0000 }, {  238, 0x0000 }, {  238, 0x0000 },
+  /* 0x0400 */
+  {  238, 0xdffc }, {  251, 0x0000 }, {  251, 0x0000 }, {  251, 0x0000 },
+  {  251, 0x0000 }, {  251, 0xdffc },
+};
+static const Summary16 jisx0212_uni2indx_page21[3] = {
+  /* 0x2100 */
+  {  264, 0x0000 }, {  264, 0x0040 }, {  265, 0x0004 },
+};
+static const Summary16 jisx0212_uni2indx_page4e[1307] = {
+  /* 0x4e00 */
+  {  266, 0x1034 }, {  270, 0x8004 }, {  272, 0xc918 }, {  278, 0x0021 },
+  {  280, 0x0093 }, {  284, 0x1402 }, {  287, 0x0308 }, {  290, 0x8230 },
+  {  294, 0x2000 }, {  295, 0x20c0 }, {  298, 0x8000 }, {  299, 0x0200 },
+  {  300, 0x0008 }, {  301, 0x0c01 }, {  304, 0x8107 }, {  309, 0xe02a },
+  /* 0x4f00 */
+  {  315, 0x190d }, {  321, 0x02e4 }, {  326, 0x4000 }, {  327, 0x4aaa },
+  {  334, 0x1b05 }, {  340, 0x8154 }, {  345, 0x5409 }, {  350, 0x6782 },
+  {  357, 0x5636 }, {  365, 0xc69d }, {  374, 0x0000 }, {  374, 0x7a84 },
+  {  381, 0xbb63 }, {  391, 0x1004 }, {  393, 0x0005 }, {  395, 0xb005 },
+  /* 0x5000 */
+  {  400, 0x5493 }, {  407, 0x7989 }, {  415, 0x4084 }, {  418, 0x082d },
+  {  423, 0x5467 }, {  431, 0x828e }, {  437, 0x24cd }, {  444, 0x0003 },
+  {  446, 0xc45a }, {  453, 0xd85d }, {  462, 0x8407 }, {  467, 0x2601 },
+  {  471, 0x5099 }, {  477, 0xb119 }, {  484, 0x8354 }, {  490, 0x4446 },
+  /* 0x5100 */
+  {  495, 0x79c8 }, {  503, 0x7a81 }, {  510, 0xb188 }, {  516, 0x033a },
+  {  522, 0x8404 }, {  525, 0x81a8 }, {  530, 0x0050 }, {  532, 0x4000 },
+  {  533, 0x4818 }, {  537, 0x2100 }, {  539, 0x200a }, {  542, 0xd500 },
+  {  547, 0x8104 }, {  550, 0x412e }, {  556, 0x4024 }, {  559, 0x009c },
+  /* 0x5200 */
+  {  563, 0x0026 }, {  566, 0x016c }, {  571, 0x0104 }, {  573, 0x1026 },
+  {  577, 0x0220 }, {  579, 0x95a0 }, {  585, 0x4043 }, {  589, 0x0380 },
+  {  592, 0x1425 }, {  597, 0x15e8 }, {  604, 0x80f0 }, {  609, 0x2dc1 },
+  {  616, 0x9151 }, {  622, 0x1852 }, {  627, 0x1722 }, {  633, 0x00d3 },
+  /* 0x5300 */
+  {  638, 0x1c09 }, {  643, 0xd90a }, {  650, 0x3ba0 }, {  657, 0x7025 },
+  {  663, 0x1804 }, {  666, 0x0a00 }, {  668, 0x302a }, {  673, 0x4204 },
+  {  676, 0x4188 }, {  680, 0x2218 }, {  684, 0x8c12 }, {  689, 0x25b4 },
+  {  696, 0x8021 }, {  699, 0x642c }, {  705, 0x00c1 }, {  708, 0x0020 },
+  /* 0x5400 */
+  {  709, 0x0004 }, {  710, 0x0408 }, {  712, 0x8582 }, {  717, 0x0032 },
+  {  720, 0xa098 }, {  725, 0x4000 }, {  726, 0x6ad4 }, {  734, 0x8010 },
+  {  736, 0x232a }, {  742, 0x9062 }, {  747, 0x66c2 }, {  754, 0x8e82 },
+  {  760, 0x6440 }, {  764, 0x0000 }, {  764, 0x9401 }, {  768, 0xd040 },
+  /* 0x5500 */
+  {  772, 0x7323 }, {  780, 0x0020 }, {  781, 0x0c00 }, {  783, 0x3864 },
+  {  789, 0x2682 }, {  794, 0x4d03 }, {  800, 0x0053 }, {  804, 0x8000 },
+  {  805, 0xc146 }, {  811, 0x009e }, {  816, 0x2018 }, {  819, 0x8004 },
+  {  821, 0x5a4a }, {  828, 0x498e }, {  835, 0x0204 }, {  837, 0x8040 },
+  /* 0x5600 */
+  {  839, 0xe520 }, {  845, 0x0207 }, {  849, 0x1000 }, {  850, 0xbaa9 },
+  {  859, 0xaa5b }, {  868, 0x4010 }, {  870, 0xa24f }, {  878, 0x0026 },
+  {  881, 0x1930 }, {  886, 0xe620 }, {  892, 0x3bc0 }, {  899, 0x408a },
+  {  903, 0xbe20 }, {  910, 0xb201 }, {  915, 0x29f2 }, {  923, 0x00c2 },
+  /* 0x5700 */
+  {  926, 0x1486 }, {  931, 0x2c22 }, {  936, 0xd63d }, {  946, 0xe018 },
+  {  951, 0x3060 }, {  955, 0x0004 }, {  956, 0xe9a4 }, {  964, 0x5ebb },
+  {  975, 0x100a }, {  978, 0xf6b0 }, {  987, 0x1382 }, {  992, 0x2100 },
+  {  994, 0x9180 }, {  998, 0x6020 }, { 1001, 0x22d2 }, { 1007, 0xe161 },
+  /* 0x5800 */
+  { 1014, 0x3318 }, { 1020, 0xc800 }, { 1023, 0x20c1 }, { 1027, 0x8204 },
+  { 1030, 0xb200 }, { 1034, 0x8021 }, { 1037, 0x0192 }, { 1041, 0x9100 },
+  { 1044, 0xb783 }, { 1053, 0x2051 }, { 1057, 0x0247 }, { 1062, 0x1006 },
+  { 1065, 0x6114 }, { 1070, 0x2455 }, { 1076, 0x0206 }, { 1079, 0x0008 },
+  /* 0x5900 */
+  { 1080, 0x1860 }, { 1084, 0x201c }, { 1088, 0x811a }, { 1093, 0x8069 },
+  { 1098, 0x0048 }, { 1100, 0xea0c }, { 1107, 0xa80a }, { 1112, 0x1a64 },
+  { 1118, 0x5800 }, { 1121, 0x80a4 }, { 1125, 0xe090 }, { 1130, 0x1489 },
+  { 1135, 0x251a }, { 1141, 0xe004 }, { 1145, 0xc098 }, { 1150, 0x0096 },
+  /* 0x5a00 */
+  { 1154, 0x7011 }, { 1159, 0x400c }, { 1162, 0x2598 }, { 1168, 0x0001 },
+  { 1169, 0x11b0 }, { 1174, 0x4021 }, { 1177, 0x20a8 }, { 1181, 0x4c80 },
+  { 1185, 0x0800 }, { 1186, 0xd249 }, { 1193, 0x1085 }, { 1197, 0x8d2e },
+  { 1205, 0x8150 }, { 1209, 0x1400 }, { 1211, 0x4421 }, { 1215, 0x2060 },
+  /* 0x5b00 */
+  { 1218, 0x0103 }, { 1221, 0x2a80 }, { 1225, 0x2022 }, { 1228, 0x0110 },
+  { 1230, 0x1802 }, { 1233, 0x4044 }, { 1236, 0xc100 }, { 1239, 0xf000 },
+  { 1243, 0x4452 }, { 1248, 0x005b }, { 1253, 0xb300 }, { 1258, 0x1486 },
+  { 1263, 0xa003 }, { 1267, 0x07c0 }, { 1272, 0x8001 }, { 1274, 0x2012 },
+  /* 0x5c00 */
+  { 1277, 0x1000 }, { 1278, 0xc080 }, { 1281, 0x5a48 }, { 1287, 0x0065 },
+  { 1291, 0x0000 }, { 1291, 0x1600 }, { 1294, 0x238c }, { 1300, 0x3c31 },
+  { 1307, 0x8580 }, { 1311, 0xa004 }, { 1314, 0x044d }, { 1319, 0x0434 },
+  { 1323, 0x0a00 }, { 1325, 0x2084 }, { 1328, 0x4000 }, { 1329, 0x0016 },
+  /* 0x5d00 */
+  { 1332, 0x2042 }, { 1335, 0x0004 }, { 1336, 0x08d8 }, { 1341, 0xa212 },
+  { 1346, 0x054c }, { 1351, 0x8222 }, { 1355, 0x2417 }, { 1361, 0xc601 },
+  { 1366, 0x050a }, { 1370, 0x8a3c }, { 1377, 0x0881 }, { 1380, 0x0315 },
+  { 1385, 0x4888 }, { 1389, 0x0301 }, { 1392, 0x0211 }, { 1395, 0x0300 },
+  /* 0x5e00 */
+  { 1397, 0x2081 }, { 1400, 0x8134 }, { 1405, 0x4101 }, { 1408, 0x4024 },
+  { 1411, 0x0a00 }, { 1413, 0x5943 }, { 1420, 0x7d00 }, { 1426, 0x0001 },
+  { 1427, 0x4801 }, { 1430, 0x0000 }, { 1430, 0x1534 }, { 1436, 0xe00a },
+  { 1441, 0x5840 }, { 1445, 0x5036 }, { 1451, 0x0820 }, { 1453, 0x0000 },
+  /* 0x5f00 */
+  { 1453, 0x41c4 }, { 1458, 0x3200 }, { 1461, 0x591e }, { 1469, 0xa851 },
+  { 1475, 0x20b1 }, { 1480, 0x0911 }, { 1484, 0x8099 }, { 1489, 0x6534 },
+  { 1496, 0xa200 }, { 1499, 0x3040 }, { 1502, 0x9894 }, { 1508, 0x0103 },
+  { 1511, 0x0b90 }, { 1516, 0x401f }, { 1522, 0xf706 }, { 1531, 0x144c },
+  /* 0x6000 */
+  { 1536, 0x2480 }, { 1539, 0x8598 }, { 1545, 0x2010 }, { 1547, 0x0028 },
+  { 1549, 0x1381 }, { 1554, 0x20d2 }, { 1559, 0x0082 }, { 1561, 0xc002 },
+  { 1564, 0x4544 }, { 1569, 0x612a }, { 1575, 0x0134 }, { 1579, 0x4883 },
+  { 1584, 0xcf14 }, { 1592, 0x6a30 }, { 1598, 0x0024 }, { 1600, 0x3124 },
+  /* 0x6100 */
+  { 1605, 0x1484 }, { 1609, 0x52df }, { 1619, 0x0c04 }, { 1622, 0x02e3 },
+  { 1628, 0x0262 }, { 1632, 0x4000 }, { 1633, 0x1001 }, { 1635, 0x9904 },
+  { 1640, 0x281b }, { 1646, 0xb18c }, { 1653, 0x2521 }, { 1658, 0x1300 },
+  { 1661, 0xc007 }, { 1666, 0xf020 }, { 1671, 0xb2a6 }, { 1679, 0x0000 },
+  /* 0x6200 */
+  { 1679, 0x009a }, { 1683, 0x1028 }, { 1686, 0x0a8d }, { 1692, 0x2200 },
+  { 1694, 0x105c }, { 1699, 0x1457 }, { 1706, 0xa010 }, { 1709, 0x2408 },
+  { 1712, 0xe000 }, { 1715, 0x0001 }, { 1716, 0x0140 }, { 1718, 0xc4c8 },
+  { 1724, 0x4010 }, { 1726, 0x0460 }, { 1729, 0x0400 }, { 1730, 0x3014 },
+  /* 0x6300 */
+  { 1734, 0x2c18 }, { 1739, 0x0149 }, { 1743, 0x2600 }, { 1746, 0x1260 },
+  { 1750, 0x4c5e }, { 1758, 0x091c }, { 1763, 0x3060 }, { 1767, 0xb132 },
+  { 1774, 0x0494 }, { 1778, 0x4631 }, { 1784, 0xe050 }, { 1789, 0x2000 },
+  { 1790, 0x4122 }, { 1794, 0x103a }, { 1799, 0x1421 }, { 1803, 0x032c },
+  /* 0x6400 */
+  { 1808, 0x0600 }, { 1810, 0x4115 }, { 1815, 0x8635 }, { 1822, 0xa021 },
+  { 1826, 0x8800 }, { 1828, 0xbc1e }, { 1837, 0x200b }, { 1841, 0x2818 },
+  { 1845, 0x80a0 }, { 1848, 0xab03 }, { 1855, 0x114a }, { 1860, 0xe008 },
+  { 1864, 0x5e10 }, { 1870, 0x00a3 }, { 1874, 0x2630 }, { 1879, 0x88a1 },
+  /* 0x6500 */
+  { 1884, 0x8712 }, { 1890, 0xca58 }, { 1897, 0x4244 }, { 1901, 0x3402 },
+  { 1905, 0x0288 }, { 1908, 0x8015 }, { 1912, 0x0881 }, { 1915, 0x2400 },
+  { 1917, 0x0422 }, { 1920, 0x2124 }, { 1924, 0x4049 }, { 1928, 0x801c },
+  { 1932, 0x4304 }, { 1936, 0x8151 }, { 1941, 0x0000 }, { 1941, 0xc235 },
+  /* 0x6600 */
+  { 1948, 0x2311 }, { 1953, 0x6066 }, { 1959, 0x5e5e }, { 1969, 0x028b },
+  { 1974, 0x5461 }, { 1980, 0x1b82 }, { 1986, 0x1c03 }, { 1991, 0xdba8 },
+  { 2000, 0x3801 }, { 2004, 0x9e05 }, { 2011, 0x2011 }, { 2014, 0x8826 },
+  { 2019, 0xd10d }, { 2026, 0x8810 }, { 2029, 0x5900 }, { 2033, 0x0c00 },
+  /* 0x6700 */
+  { 2035, 0x40a0 }, { 2038, 0x1208 }, { 2041, 0x0005 }, { 2043, 0x4008 },
+  { 2045, 0x11a0 }, { 2049, 0x2030 }, { 2052, 0x5040 }, { 2055, 0x0850 },
+  { 2058, 0xc012 }, { 2062, 0x0b4a }, { 2068, 0x0000 }, { 2068, 0x3827 },
+  { 2075, 0x032d }, { 2081, 0x1284 }, { 2085, 0x0042 }, { 2087, 0x02c5 },
+  /* 0x6800 */
+  { 2092, 0x0000 }, { 2092, 0xa210 }, { 2096, 0xb180 }, { 2101, 0x880b },
+  { 2106, 0x1430 }, { 2110, 0x09a4 }, { 2115, 0xc800 }, { 2118, 0x1e27 },
+  { 2126, 0x0154 }, { 2130, 0x1540 }, { 2134, 0x462a }, { 2140, 0x0804 },
+  { 2142, 0x9120 }, { 2146, 0x324b }, { 2153, 0x3d20 }, { 2159, 0x3863 },
+  /* 0x6900 */
+  { 2166, 0x0640 }, { 2169, 0x00cb }, { 2174, 0x0000 }, { 2174, 0x092a },
+  { 2179, 0x4224 }, { 2183, 0x0880 }, { 2185, 0x1378 }, { 2192, 0x8c07 },
+  { 2198, 0x2001 }, { 2200, 0x0144 }, { 2203, 0xa962 }, { 2210, 0x1580 },
+  { 2214, 0x0120 }, { 2216, 0x00c2 }, { 2219, 0xc024 }, { 2223, 0x402a },
+  /* 0x6a00 */
+  { 2227, 0x800b }, { 2231, 0x2422 }, { 2235, 0x0111 }, { 2238, 0xc895 },
+  { 2245, 0x4660 }, { 2250, 0x0867 }, { 2256, 0x0490 }, { 2259, 0x400a },
+  { 2262, 0x0aca }, { 2268, 0xe802 }, { 2273, 0x8820 }, { 2276, 0xe013 },
+  { 2282, 0x1340 }, { 2286, 0x3071 }, { 2292, 0x1090 }, { 2295, 0x3007 },
+  /* 0x6b00 */
+  { 2300, 0x82cc }, { 2306, 0x4883 }, { 2311, 0x9910 }, { 2316, 0x8860 },
+  { 2320, 0x2440 }, { 2323, 0x2144 }, { 2327, 0x4881 }, { 2331, 0x6021 },
+  { 2335, 0x0024 }, { 2337, 0x8880 }, { 2340, 0x730d }, { 2348, 0x6301 },
+  { 2353, 0x1218 }, { 2357, 0x0440 }, { 2359, 0x40ca }, { 2364, 0x8282 },
+  /* 0x6c00 */
+  { 2368, 0x6234 }, { 2374, 0x8205 }, { 2378, 0x51c0 }, { 2383, 0x8c68 },
+  { 2389, 0xac00 }, { 2393, 0x1a14 }, { 2398, 0xa880 }, { 2402, 0x0b50 },
+  { 2407, 0x02e0 }, { 2411, 0x91b0 }, { 2417, 0x0000 }, { 2417, 0x0015 },
+  { 2420, 0xa044 }, { 2424, 0x1457 }, { 2431, 0x5a81 }, { 2437, 0x0014 },
+  /* 0x6d00 */
+  { 2439, 0xc490 }, { 2444, 0x040a }, { 2447, 0xc1c0 }, { 2452, 0x9202 },
+  { 2456, 0x0000 }, { 2456, 0xc080 }, { 2459, 0x80a2 }, { 2463, 0x1001 },
+  { 2465, 0x0084 }, { 2467, 0x01d6 }, { 2473, 0x1400 }, { 2475, 0xa290 },
+  { 2480, 0xc510 }, { 2485, 0xa840 }, { 2489, 0x8225 }, { 2494, 0x1051 },
+  /* 0x6e00 */
+  { 2498, 0x0011 }, { 2500, 0x4000 }, { 2501, 0x0084 }, { 2503, 0x1a44 },
+  { 2508, 0x8b30 }, { 2514, 0x709e }, { 2522, 0x010c }, { 2525, 0x2808 },
+  { 2528, 0x2000 }, { 2529, 0x0208 }, { 2531, 0x6081 }, { 2535, 0x880a },
+  { 2539, 0xe58b }, { 2548, 0x0000 }, { 2548, 0x6800 }, { 2551, 0x2a00 },
+  /* 0x6f00 */
+  { 2554, 0x3510 }, { 2559, 0x0d40 }, { 2563, 0xa640 }, { 2568, 0x1849 },
+  { 2573, 0x8000 }, { 2574, 0x668e }, { 2582, 0x1106 }, { 2586, 0x6000 },
+  { 2588, 0x3988 }, { 2594, 0x845d }, { 2601, 0xc1e1 }, { 2608, 0x1061 },
+  { 2612, 0x05a0 }, { 2616, 0x4400 }, { 2618, 0x0300 }, { 2620, 0x3221 },
+  /* 0x7000 */
+  { 2625, 0x20e1 }, { 2630, 0x0080 }, { 2631, 0x8009 }, { 2634, 0x1290 },
+  { 2638, 0x4f18 }, { 2645, 0x6030 }, { 2649, 0x5030 }, { 2653, 0x4060 },
+  { 2656, 0x0062 }, { 2659, 0x09f0 }, { 2665, 0x0810 }, { 2667, 0x0093 },
+  { 2671, 0x0400 }, { 2672, 0x117a }, { 2679, 0x0010 }, { 2680, 0x0400 },
+  /* 0x7100 */
+  { 2681, 0x98f8 }, { 2689, 0x4000 }, { 2690, 0xa801 }, { 2694, 0x0103 },
+  { 2697, 0x0ce2 }, { 2703, 0x5485 }, { 2709, 0x0101 }, { 2711, 0x0200 },
+  { 2712, 0x10a1 }, { 2716, 0x0c04 }, { 2719, 0x8005 }, { 2722, 0x840d },
+  { 2727, 0x1813 }, { 2732, 0x1648 }, { 2737, 0x0000 }, { 2737, 0x4100 },
+  /* 0x7200 */
+  { 2739, 0x0381 }, { 2743, 0xa488 }, { 2748, 0x8810 }, { 2751, 0x0310 },
+  { 2754, 0xc02e }, { 2760, 0x5469 }, { 2767, 0xc909 }, { 2773, 0x9982 },
+  { 2779, 0x6210 }, { 2783, 0x0808 }, { 2785, 0x6100 }, { 2788, 0x4012 },
+  { 2791, 0x1282 }, { 2795, 0x8160 }, { 2799, 0x0020 }, { 2800, 0x4c18 },
+  /* 0x7300 */
+  { 2805, 0x28b4 }, { 2811, 0x430c }, { 2816, 0x1194 }, { 2821, 0x2c26 },
+  { 2827, 0x2008 }, { 2829, 0xe145 }, { 2836, 0xdac1 }, { 2844, 0x1282 },
+  { 2848, 0x406b }, { 2854, 0xd1a9 }, { 2862, 0x2c65 }, { 2869, 0xb2a0 },
+  { 2875, 0x9a60 }, { 2881, 0x224c }, { 2886, 0x02ca }, { 2891, 0xaeb0 },
+  /* 0x7400 */
+  { 2899, 0x0493 }, { 2904, 0x0c02 }, { 2907, 0xff50 }, { 2917, 0x0203 },
+  { 2920, 0x28d9 }, { 2927, 0x2086 }, { 2931, 0x69c4 }, { 2938, 0x0006 },
+  { 2940, 0x82e3 }, { 2947, 0x9707 }, { 2955, 0xcf4b }, { 2965, 0x8a26 },
+  { 2971, 0x1300 }, { 2974, 0xcd09 }, { 2981, 0x8d10 }, { 2986, 0x9c10 },
+  /* 0x7500 */
+  { 2991, 0x0040 }, { 2992, 0x00c4 }, { 2995, 0x8693 }, { 3002, 0xe240 },
+  { 3007, 0x4189 }, { 3012, 0xc085 }, { 3017, 0x8002 }, { 3019, 0x7e02 },
+  { 3026, 0x0022 }, { 3028, 0x122d }, { 3034, 0x0014 }, { 3036, 0x8410 },
+  { 3039, 0xd053 }, { 3046, 0x9080 }, { 3049, 0xd093 }, { 3056, 0x0202 },
+  /* 0x7600 */
+  { 3058, 0x959d }, { 3067, 0x7a6c }, { 3076, 0x2268 }, { 3081, 0x172c },
+  { 3088, 0x0e3b }, { 3096, 0x8220 }, { 3099, 0xe030 }, { 3104, 0x0012 },
+  { 3106, 0x3022 }, { 3110, 0xb820 }, { 3115, 0x25fd }, { 3125, 0x2000 },
+  { 3126, 0x5a22 }, { 3132, 0x0210 }, { 3134, 0x1141 }, { 3138, 0x1243 },
+  /* 0x7700 */
+  { 3143, 0x4441 }, { 3147, 0x16b4 }, { 3154, 0xe104 }, { 3159, 0x6270 },
+  { 3165, 0xe464 }, { 3172, 0xd0c4 }, { 3178, 0x1495 }, { 3184, 0x241d },
+  { 3190, 0x3011 }, { 3194, 0x8470 }, { 3199, 0xc484 }, { 3204, 0x4022 },
+  { 3207, 0x0208 }, { 3209, 0xc226 }, { 3215, 0x1451 }, { 3220, 0x0913 },
+  /* 0x7800 */
+  { 3225, 0x6260 }, { 3230, 0x2002 }, { 3232, 0x600e }, { 3237, 0x00a1 },
+  { 3240, 0x5198 }, { 3246, 0x5004 }, { 3249, 0x451b }, { 3256, 0x4400 },
+  { 3258, 0x8400 }, { 3260, 0xe110 }, { 3265, 0x3112 }, { 3270, 0xa80f },
+  { 3277, 0x5380 }, { 3282, 0x886c }, { 3288, 0x0453 }, { 3293, 0x8ccc },
+  /* 0x7900 */
+  { 3300, 0x1041 }, { 3303, 0xd401 }, { 3308, 0x22a1 }, { 3313, 0xa832 },
+  { 3319, 0x8c70 }, { 3325, 0x1912 }, { 3330, 0x0a80 }, { 3333, 0x5a04 },
+  { 3338, 0x1800 }, { 3340, 0x197a }, { 3348, 0x8b02 }, { 3353, 0x0912 },
+  { 3357, 0x8594 }, { 3363, 0x6450 }, { 3368, 0x2c25 }, { 3374, 0x1102 },
+  /* 0x7a00 */
+  { 3377, 0x168c }, { 3383, 0x4822 }, { 3387, 0xa882 }, { 3392, 0x0731 },
+  { 3398, 0x11b0 }, { 3403, 0xb260 }, { 3409, 0x24a1 }, { 3414, 0x4120 },
+  { 3417, 0x0c65 }, { 3423, 0x4013 }, { 3427, 0x1009 }, { 3430, 0x1a28 },
+  { 3435, 0x5240 }, { 3439, 0x0802 }, { 3441, 0x1b00 }, { 3445, 0x6812 },
+  /* 0x7b00 */
+  { 3450, 0x0080 }, { 3451, 0x8010 }, { 3453, 0xee88 }, { 3461, 0xa013 },
+  { 3466, 0x4083 }, { 3470, 0x0020 }, { 3471, 0xa651 }, { 3478, 0x008c },
+  { 3481, 0x4210 }, { 3484, 0x4843 }, { 3489, 0x9021 }, { 3493, 0x3c65 },
+  { 3501, 0x0524 }, { 3505, 0x0ed0 }, { 3511, 0x0500 }, { 3513, 0x5734 },
+  /* 0x7c00 */
+  { 3521, 0xda5e }, { 3531, 0x0a00 }, { 3533, 0x1161 }, { 3538, 0x065a },
+  { 3544, 0x0440 }, { 3546, 0x7e2e }, { 3556, 0x628a }, { 3562, 0x3205 },
+  { 3567, 0x80c0 }, { 3570, 0x4010 }, { 3572, 0x0041 }, { 3574, 0x9cc1 },
+  { 3581, 0xa390 }, { 3587, 0x26b8 }, { 3594, 0x0a40 }, { 3597, 0x0020 },
+  /* 0x7d00 */
+  { 3598, 0x8388 }, { 3603, 0x604e }, { 3609, 0x2448 }, { 3613, 0x7002 },
+  { 3617, 0x2183 }, { 3622, 0x368a }, { 3629, 0x04a0 }, { 3632, 0x8d01 },
+  { 3637, 0x396e }, { 3646, 0x60c2 }, { 3651, 0x04c0 }, { 3654, 0x02c8 },
+  { 3658, 0x707c }, { 3666, 0x0280 }, { 3668, 0x2c64 }, { 3674, 0x0662 },
+  /* 0x7e00 */
+  { 3679, 0x0101 }, { 3681, 0x30a3 }, { 3687, 0xb181 }, { 3693, 0x8048 },
+  { 3696, 0x40b0 }, { 3700, 0x8105 }, { 3704, 0xc826 }, { 3710, 0x4108 },
+  { 3713, 0x24c2 }, { 3718, 0x6522 }, { 3724, 0x0000 }, { 3724, 0x0000 },
+  { 3724, 0x0000 }, { 3724, 0x0000 }, { 3724, 0x0000 }, { 3724, 0x0000 },
+  /* 0x7f00 */
+  { 3724, 0x0000 }, { 3724, 0x0000 }, { 3724, 0x0000 }, { 3724, 0xf800 },
+  { 3729, 0x8098 }, { 3733, 0x380c }, { 3738, 0x207a }, { 3744, 0xe002 },
+  { 3748, 0xa801 }, { 3752, 0x10c3 }, { 3757, 0x2446 }, { 3762, 0x9010 },
+  { 3765, 0xc109 }, { 3770, 0x8800 }, { 3772, 0xd128 }, { 3778, 0xe404 },
+  /* 0x8000 */
+  { 3783, 0xe580 }, { 3789, 0xe05a }, { 3796, 0x5051 }, { 3801, 0x56b1 },
+  { 3809, 0x0011 }, { 3811, 0x0000 }, { 3811, 0x2051 }, { 3815, 0x0022 },
+  { 3817, 0x4102 }, { 3820, 0x5000 }, { 3822, 0x08c0 }, { 3825, 0x0300 },
+  { 3827, 0xa100 }, { 3830, 0x01b4 }, { 3835, 0x6001 }, { 3838, 0x464d },
+  /* 0x8100 */
+  { 3845, 0x0808 }, { 3847, 0x51c0 }, { 3852, 0x1091 }, { 3856, 0x1421 },
+  { 3860, 0x14a0 }, { 3864, 0x0084 }, { 3866, 0xa383 }, { 3873, 0x0080 },
+  { 3874, 0x4872 }, { 3880, 0x4941 }, { 3885, 0x4004 }, { 3887, 0x0814 },
+  { 3890, 0xcc28 }, { 3896, 0x68a0 }, { 3901, 0x1812 }, { 3905, 0xa367 },
+  /* 0x8200 */
+  { 3914, 0x8009 }, { 3917, 0x2618 }, { 3922, 0x0106 }, { 3925, 0x0414 },
+  { 3928, 0xc878 }, { 3935, 0x1042 }, { 3938, 0x2089 }, { 3942, 0xa810 },
+  { 3946, 0x469b }, { 3954, 0x0d52 }, { 3960, 0x479b }, { 3969, 0xd495 },
+  { 3977, 0x0040 }, { 3978, 0x0421 }, { 3981, 0xa515 }, { 3988, 0x60c0 },
+  /* 0x8300 */
+  { 3992, 0x0d83 }, { 3998, 0xe800 }, { 4002, 0x7006 }, { 4007, 0x3489 },
+  { 4013, 0x609c }, { 4019, 0x00fa }, { 4025, 0x0000 }, { 4025, 0xa101 },
+  { 4029, 0x2055 }, { 4034, 0x3b34 }, { 4042, 0x32c0 }, { 4047, 0xc000 },
+  { 4049, 0x8281 }, { 4053, 0x2013 }, { 4057, 0x0500 }, { 4059, 0x1340 },
+  /* 0x8400 */
+  { 4063, 0x8442 }, { 4067, 0x0222 }, { 4070, 0x8000 }, { 4071, 0x0200 },
+  { 4072, 0xa5a0 }, { 4078, 0x1746 }, { 4085, 0x04b1 }, { 4090, 0x3159 },
+  { 4097, 0x0022 }, { 4099, 0x402c }, { 4103, 0x8740 }, { 4108, 0x6412 },
+  { 4113, 0x9185 }, { 4119, 0x1008 }, { 4121, 0x8480 }, { 4124, 0x2c87 },
+  /* 0x8500 */
+  { 4131, 0x508c }, { 4136, 0x5001 }, { 4139, 0x8cbc }, { 4147, 0x805c },
+  { 4152, 0x8040 }, { 4154, 0xf24f }, { 4164, 0x8817 }, { 4170, 0xae00 },
+  { 4175, 0x9a62 }, { 4182, 0xa108 }, { 4186, 0x20a5 }, { 4191, 0xf1d0 },
+  { 4199, 0x4c84 }, { 4204, 0x8500 }, { 4207, 0x2141 }, { 4211, 0x9048 },
+  /* 0x8600 */
+  { 4215, 0x6031 }, { 4220, 0x4b07 }, { 4227, 0x0282 }, { 4230, 0x3540 },
+  { 4235, 0x0047 }, { 4239, 0x23cc }, { 4246, 0x921f }, { 4254, 0x04e0 },
+  { 4258, 0x2100 }, { 4260, 0x1542 }, { 4265, 0x21c2 }, { 4270, 0x83ba },
+  { 4278, 0x002b }, { 4282, 0x14a6 }, { 4288, 0x00a9 }, { 4292, 0x3400 },
+  /* 0x8700 */
+  { 4295, 0xc8b0 }, { 4301, 0xc219 }, { 4307, 0xc10a }, { 4312, 0x7606 },
+  { 4319, 0x2029 }, { 4323, 0x2100 }, { 4325, 0x8032 }, { 4329, 0x0806 },
+  { 4332, 0x1bf8 }, { 4341, 0x43a9 }, { 4348, 0x7089 }, { 4354, 0xc022 },
+  { 4358, 0x4702 }, { 4363, 0x9660 }, { 4369, 0x2c1c }, { 4375, 0x850a },
+  /* 0x8800 */
+  { 4380, 0x0e4a }, { 4386, 0xdf1d }, { 4397, 0x6100 }, { 4400, 0x1425 },
+  { 4405, 0x4f2a }, { 4413, 0x9562 }, { 4420, 0x0211 }, { 4423, 0x0a02 },
+  { 4426, 0x0001 }, { 4427, 0x9d00 }, { 4432, 0x0501 }, { 4435, 0x6400 },
+  { 4438, 0x7c01 }, { 4444, 0x480e }, { 4449, 0x8080 }, { 4451, 0x00a3 },
+  /* 0x8900 */
+  { 4455, 0xe042 }, { 4460, 0x1760 }, { 4466, 0x01c1 }, { 4470, 0x4627 },
+  { 4477, 0x8265 }, { 4483, 0x1c84 }, { 4488, 0x480e }, { 4493, 0x3c29 },
+  { 4500, 0x2200 }, { 4502, 0x9831 }, { 4508, 0x0021 }, { 4510, 0x10f1 },
+  { 4516, 0x0000 }, { 4516, 0x01f0 }, { 4521, 0x2a20 }, { 4525, 0xa24a },
+  /* 0x8a00 */
+  { 4531, 0x80b0 }, { 4535, 0x4036 }, { 4540, 0x9855 }, { 4547, 0x60a0 },
+  { 4551, 0x62a9 }, { 4558, 0x31c8 }, { 4564, 0x00a2 }, { 4567, 0xcee0 },
+  { 4575, 0x8849 }, { 4580, 0x82c5 }, { 4586, 0xc280 }, { 4590, 0x48c8 },
+  { 4595, 0x0748 }, { 4600, 0xa0ba }, { 4607, 0x1000 }, { 4608, 0x9071 },
+  /* 0x8b00 */
+  { 4614, 0x0c60 }, { 4618, 0xd002 }, { 4622, 0x2000 }, { 4623, 0x1081 },
+  { 4626, 0x217c }, { 4633, 0x421c }, { 4638, 0x2008 }, { 4640, 0x5340 },
+  { 4645, 0xa832 }, { 4651, 0xd030 }, { 4656, 0x0000 }, { 4656, 0x0000 },
+  { 4656, 0x0000 }, { 4656, 0x0000 }, { 4656, 0x0000 }, { 4656, 0x0000 },
+  /* 0x8c00 */
+  { 4656, 0x0000 }, { 4656, 0x0000 }, { 4656, 0x0000 }, { 4656, 0x6300 },
+  { 4660, 0x8aa0 }, { 4665, 0x2b9a }, { 4673, 0x2358 }, { 4679, 0x4868 },
+  { 4684, 0x08c0 }, { 4687, 0x1a0d }, { 4693, 0x0010 }, { 4694, 0x0600 },
+  { 4696, 0x8a60 }, { 4701, 0x2260 }, { 4705, 0x9102 }, { 4709, 0xc1a5 },
+  /* 0x8d00 */
+  { 4716, 0x020a }, { 4719, 0x0884 }, { 4722, 0x0000 }, { 4722, 0x0000 },
+  { 4722, 0x0000 }, { 4722, 0x0000 }, { 4722, 0x5220 }, { 4726, 0x8000 },
+  { 4727, 0x2114 }, { 4731, 0xc023 }, { 4736, 0x9841 }, { 4741, 0x1aa4 },
+  { 4747, 0x45e1 }, { 4754, 0x02b2 }, { 4759, 0x10b0 }, { 4763, 0x2017 },
+  /* 0x8e00 */
+  { 4768, 0x0872 }, { 4773, 0x0052 }, { 4776, 0x00cf }, { 4782, 0x23ca },
+  { 4789, 0xe803 }, { 4795, 0x7810 }, { 4800, 0xb206 }, { 4806, 0x0e03 },
+  { 4811, 0x020c }, { 4814, 0x6c25 }, { 4821, 0x6284 }, { 4826, 0x0c28 },
+  { 4830, 0x809b }, { 4836, 0x1012 }, { 4839, 0x6100 }, { 4842, 0x0683 },
+  /* 0x8f00 */
+  { 4847, 0x8185 }, { 4852, 0x41c1 }, { 4857, 0x71ab }, { 4866, 0x04f0 },
+  { 4871, 0x808b }, { 4876, 0x613e }, { 4884, 0x0020 }, { 4885, 0x0000 },
+  { 4885, 0x0000 }, { 4885, 0x2000 }, { 4886, 0x0073 }, { 4891, 0x4160 },
+  { 4895, 0x2c43 }, { 4901, 0x002d }, { 4905, 0x4119 }, { 4910, 0x4862 },
+  /* 0x9000 */
+  { 4915, 0x1114 }, { 4919, 0x0900 }, { 4921, 0xb700 }, { 4927, 0x8098 },
+  { 4931, 0x1018 }, { 4934, 0x2800 }, { 4936, 0x10c4 }, { 4940, 0x0211 },
+  { 4943, 0x5920 }, { 4948, 0x0ba1 }, { 4954, 0x0027 }, { 4958, 0x605d },
+  { 4965, 0x11b8 }, { 4971, 0xb3a4 }, { 4979, 0x8820 }, { 4982, 0xc051 },
+  /* 0x9100 */
+  { 4987, 0x2171 }, { 4993, 0x55d1 }, { 5001, 0xc2ad }, { 5009, 0x36d2 },
+  { 5017, 0x8188 }, { 5021, 0x0e88 }, { 5026, 0x2092 }, { 5030, 0x0e10 },
+  { 5034, 0x446a }, { 5040, 0x413a }, { 5046, 0x7142 }, { 5052, 0xb84f },
+  { 5061, 0x002c }, { 5064, 0x4698 }, { 5070, 0xf630 }, { 5078, 0x2a83 },
+  /* 0x9200 */
+  { 5084, 0x16f3 }, { 5093, 0x314d }, { 5100, 0xc178 }, { 5107, 0x5769 },
+  { 5116, 0xe4cd }, { 5125, 0x3302 }, { 5130, 0xc3a3 }, { 5138, 0xbbe1 },
+  { 5148, 0x6700 }, { 5153, 0x8284 }, { 5157, 0x89b1 }, { 5164, 0xbd44 },
+  { 5172, 0x79ef }, { 5184, 0xb3a9 }, { 5193, 0x51ab }, { 5201, 0x8a01 },
+  /* 0x9300 */
+  { 5205, 0x2105 }, { 5209, 0xf032 }, { 5216, 0x06b2 }, { 5222, 0x00d8 },
+  { 5226, 0x0380 }, { 5229, 0x45a7 }, { 5237, 0xa6b0 }, { 5244, 0xa45b },
+  { 5252, 0xad07 }, { 5260, 0x4924 }, { 5265, 0x0b5a }, { 5272, 0x0470 },
+  { 5276, 0x3ef2 }, { 5286, 0xd208 }, { 5291, 0x00c4 }, { 5294, 0x2f80 },
+  /* 0x9400 */
+  { 5300, 0xe316 }, { 5308, 0x80e0 }, { 5312, 0xc000 }, { 5314, 0xa81e },
+  { 5321, 0x1528 }, { 5326, 0x9220 }, { 5330, 0xe90a }, { 5337, 0x0006 },
+  { 5339, 0x0018 }, { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x0000 },
+  { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x0000 },
+  /* 0x9500 */
+  { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x0000 },
+  { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x0000 }, { 5341, 0x4300 },
+  { 5344, 0x7110 }, { 5349, 0xe000 }, { 5352, 0x1a42 }, { 5357, 0xa450 },
+  { 5362, 0x0b40 }, { 5366, 0xe60f }, { 5375, 0x0051 }, { 5378, 0x0000 },
+  /* 0x9600 */
+  { 5378, 0x0000 }, { 5378, 0x6000 }, { 5380, 0x1074 }, { 5385, 0x378a },
+  { 5393, 0x0002 }, { 5394, 0x01d4 }, { 5399, 0x4002 }, { 5401, 0xd810 },
+  { 5406, 0x021e }, { 5411, 0xa442 }, { 5416, 0xc270 }, { 5422, 0x0408 },
+  { 5424, 0x0400 }, { 5425, 0xe504 }, { 5431, 0x8200 }, { 5433, 0x0402 },
+  /* 0x9700 */
+  { 5435, 0x022c }, { 5439, 0x2c00 }, { 5442, 0x010e }, { 5446, 0x000a },
+  { 5448, 0xc40a }, { 5453, 0x0da0 }, { 5458, 0x4488 }, { 5462, 0xa9c8 },
+  { 5469, 0x0201 }, { 5471, 0xc6e0 }, { 5478, 0x5004 }, { 5481, 0xd766 },
+  { 5491, 0x76b2 }, { 5500, 0x6b93 }, { 5509, 0x8013 }, { 5513, 0x0592 },
+  /* 0x9800 */
+  { 5518, 0x6480 }, { 5522, 0x5250 }, { 5527, 0xc869 }, { 5534, 0x402d },
+  { 5539, 0x0490 }, { 5542, 0x06ce }, { 5549, 0x146c }, { 5555, 0x0000 },
+  { 5555, 0x0000 }, { 5555, 0x0000 }, { 5555, 0x6800 }, { 5558, 0x8d91 },
+  { 5565, 0x1124 }, { 5569, 0x0000 }, { 5569, 0x04ea }, { 5575, 0x0048 },
+  /* 0x9900 */
+  { 5577, 0x0184 }, { 5580, 0x9ce2 }, { 5588, 0x08c4 }, { 5592, 0x1e3e },
+  { 5601, 0x61c3 }, { 5608, 0xdb10 }, { 5615, 0x0001 }, { 5616, 0x0000 },
+  { 5616, 0x0000 }, { 5616, 0xa800 }, { 5619, 0x0040 }, { 5620, 0xa627 },
+  { 5628, 0x0208 }, { 5630, 0x5618 }, { 5636, 0x1c80 }, { 5640, 0x6231 },
+  /* 0x9a00 */
+  { 5646, 0x181c }, { 5651, 0x4043 }, { 5655, 0x609d }, { 5662, 0x0168 },
+  { 5666, 0x5c92 }, { 5673, 0x2052 }, { 5677, 0x0000 }, { 5677, 0x0000 },
+  { 5677, 0x0000 }, { 5677, 0x0000 }, { 5677, 0xd400 }, { 5681, 0xca74 },
+  { 5689, 0x414a }, { 5694, 0x18e5 }, { 5701, 0x12b1 }, { 5707, 0xa62c },
+  /* 0x9b00 */
+  { 5714, 0x7b3f }, { 5726, 0x1a45 }, { 5732, 0x2841 }, { 5736, 0x26b8 },
+  { 5743, 0x1900 }, { 5746, 0x48e0 }, { 5751, 0x7d6a }, { 5761, 0x83a8 },
+  { 5767, 0xaef1 }, { 5777, 0x6411 }, { 5782, 0x12c0 }, { 5786, 0xd987 },
+  { 5795, 0x4182 }, { 5799, 0xa181 }, { 5804, 0x8ca0 }, { 5809, 0xa788 },
+  /* 0x9c00 */
+  { 5816, 0x8805 }, { 5820, 0x5742 }, { 5827, 0x07cc }, { 5834, 0x20e2 },
+  { 5839, 0xc63a }, { 5847, 0xf959 }, { 5857, 0x4f08 }, { 5863, 0x08a5 },
+  { 5868, 0x0000 }, { 5868, 0x0000 }, { 5868, 0x0000 }, { 5868, 0x0000 },
+  { 5868, 0x0000 }, { 5868, 0x0000 }, { 5868, 0x0040 }, { 5869, 0x0284 },
+  /* 0x9d00 */
+  { 5872, 0x0804 }, { 5874, 0x7182 }, { 5880, 0x8000 }, { 5881, 0x341d },
+  { 5888, 0x04ac }, { 5893, 0x8018 }, { 5896, 0x0e2c }, { 5902, 0x58c1 },
+  { 5908, 0x6458 }, { 5914, 0x01ec }, { 5920, 0x5402 }, { 5924, 0x9222 },
+  { 5929, 0x0688 }, { 5933, 0xc4f0 }, { 5940, 0x4aa1 }, { 5946, 0x4019 },
+  /* 0x9e00 */
+  { 5950, 0x4484 }, { 5954, 0x3267 }, { 5962, 0x0000 }, { 5962, 0x0000 },
+  { 5962, 0x0000 }, { 5962, 0x0000 }, { 5962, 0x0000 }, { 5962, 0x1c00 },
+  { 5965, 0xc0bd }, { 5973, 0x4940 }, { 5977, 0xd110 }, { 5982, 0x0039 },
+  { 5986, 0x0940 }, { 5989, 0x8020 }, { 5991, 0x7090 }, { 5996, 0x8127 },
+  /* 0x9f00 */
+  { 6002, 0x820c }, { 6006, 0x8ed7 }, { 6016, 0x8c44 }, { 6021, 0xb696 },
+  { 6030, 0x00fa }, { 6036, 0x65e8 }, { 6044, 0xe300 }, { 6049, 0x242b },
+  { 6055, 0x8000 }, { 6056, 0x40d7 }, { 6063, 0x002e },
+};
+
+static int
+jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    const Summary16 *summary = NULL;
+    if (wc < 0x0460)
+      summary = &jisx0212_uni2indx_page00[(wc>>4)];
+    else if (wc >= 0x2100 && wc < 0x2130)
+      summary = &jisx0212_uni2indx_page21[(wc>>4)-0x210];
+    else if (wc >= 0x4e00 && wc < 0x9fb0)
+      summary = &jisx0212_uni2indx_page4e[(wc>>4)-0x4e0];
+    if (summary) {
+      unsigned short used = summary->used;
+      unsigned int i = wc & 0x0f;
+      if (used & ((unsigned short) 1 << i)) {
+        unsigned short c;
+        /* Keep in `used' only the bits 0..i-1. */
+        used &= ((unsigned short) 1 << i) - 1;
+        /* Add `summary->indx' and the number of bits set in `used'. */
+        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);
+        used = (used & 0x3333) + ((used & 0xcccc) >> 2);
+        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);
+        used = (used & 0x00ff) + (used >> 8);
+        c = jisx0212_2charset[summary->indx + used];
+        r[0] = (c >> 8); r[1] = (c & 0xff);
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_c.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_c.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_c.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,103 @@
+/* $XFree86: xc/lib/X11/lcUniConv/koi8_c.h,v 1.2 2000/11/28 16:10:29 dawes Exp $ */
+
+/*
+ * KOI8-C
+ */
+
+static const unsigned short koi8_c_2uni[128] = {
+  /* 0x80 */
+  0x0493, 0x0497, 0x049b, 0x049d, 0x04a3, 0x04af, 0x04b1, 0x04b3,
+  0x04b7, 0x04b9, 0x04bb, 0x2580, 0x04d9, 0x04e3, 0x04e9, 0x04ef,
+  /* 0x90 */
+  0x0492, 0x0496, 0x049a, 0x049c, 0x04a2, 0x04ae, 0x04b0, 0x04b2,
+  0x04b6, 0x04b8, 0x04ba, 0x2321, 0x04d8, 0x04e2, 0x04e8, 0x04ee,
+  /* 0xa0 */
+  0x00a0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457,
+  0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x0491, 0x045e, 0x045f,
+  /* 0xb0 */
+  0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407,
+  0x0486, 0x0409, 0x040a, 0x040b, 0x040c, 0x0490, 0x040e, 0x040f,
+  /* 0xc0 */
+  0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
+  0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
+  /* 0xd0 */
+  0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
+  0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a,
+  /* 0xe0 */
+  0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
+  0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
+  /* 0xf0 */
+  0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
+  0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a,
+};
+
+static int
+koi8_c_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) koi8_c_2uni[c-0x80];
+  return 1;
+}
+
+static const unsigned char koi8_c_page00[1] = {
+  0xa0,                                           /* 0xa0-0xa7 */
+};
+static const unsigned char koi8_c_page04[240] = {
+  0x00, 0xb3, 0xb1, 0xb2, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x00-0x07 */
+  0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0x00, 0xbe, 0xbf, /* 0x08-0x0f */
+  0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, /* 0x10-0x17 */
+  0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, /* 0x18-0x1f */
+  0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, /* 0x20-0x27 */
+  0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, /* 0x28-0x2f */
+  0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, /* 0x30-0x37 */
+  0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, /* 0x38-0x3f */
+  0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */
+  0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */
+  0x00, 0xa3, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x50-0x57 */
+  0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x00, 0xae, 0xaf, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0xbd, 0xad, 0x90, 0x80, 0x00, 0x00, 0x91, 0x81, /* 0x90-0x97 */
+  0x00, 0x00, 0x92, 0x82, 0x93, 0x83, 0x00, 0x00, /* 0x98-0x9f */
+  0x00, 0x00, 0x94, 0x84, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x85, /* 0xa8-0xaf */
+  0x96, 0x86, 0x97, 0x87, 0x00, 0x00, 0x98, 0x88, /* 0xb0-0xb7 */
+  0x99, 0x89, 0x9a, 0x8a, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x9c, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x9d, 0x8d, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0x9e, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x8f, /* 0xe8-0xef */
+};
+static const unsigned char koi8_c_page22[1] = {
+                                      0xb0,       /* 0x16-0x16 */
+};
+
+static int
+koi8_c_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00a1)
+    c = koi8_c_page00[wc-0x00a0];
+  else if (wc >= 0x0400 && wc < 0x04ef)
+    c = koi8_c_page04[wc-0x0400];
+  else if (wc >= 0x2216 && wc < 0x2217)
+    c = koi8_c_page22[wc-0x2216];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_r.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_r.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_r.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,139 @@
+/* $XFree86: xc/lib/X11/lcUniConv/koi8_r.h,v 1.3 2000/11/29 17:40:34 dawes Exp $ */
+
+/*
+ * KOI8-R
+ */
+
+/* Specification: RFC 1489 */
+
+#ifdef NEED_TOWC
+static const unsigned short koi8_r_2uni[128] = {
+  /* 0x80 */
+  0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524,
+  0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590,
+  /* 0x90 */
+  0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248,
+  0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7,
+  /* 0xa0 */
+  0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
+  0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e,
+  /* 0xb0 */
+  0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
+  0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9,
+  /* 0xc0 */
+  0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
+  0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
+  /* 0xd0 */
+  0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
+  0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a,
+  /* 0xe0 */
+  0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
+  0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
+  /* 0xf0 */
+  0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
+  0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a,
+};
+
+static int
+koi8_r_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) koi8_r_2uni[c-0x80];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char koi8_r_page00[88] = {
+  0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
+  0x9c, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, /* 0xf0-0xf7 */
+};
+static const unsigned char koi8_r_page04[88] = {
+  0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, /* 0x10-0x17 */
+  0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, /* 0x18-0x1f */
+  0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, /* 0x20-0x27 */
+  0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, /* 0x28-0x2f */
+  0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, /* 0x30-0x37 */
+  0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, /* 0x38-0x3f */
+  0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */
+  0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */
+  0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+};
+static const unsigned char koi8_r_page22[80] = {
+  0x00, 0x95, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x98, 0x99, 0x00, 0x00, /* 0x60-0x67 */
+};
+static const unsigned char koi8_r_page23[8] = {
+  0x93, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+};
+static const unsigned char koi8_r_page25[168] = {
+  0x80, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x83, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x85, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0xa0, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, /* 0x50-0x57 */
+  0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, /* 0x58-0x5f */
+  0xb1, 0xb2, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, /* 0x60-0x67 */
+  0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x8b, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x8d, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x8f, 0x90, 0x91, 0x92, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
+  0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+};
+
+static int
+koi8_r_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00f8)
+    c = koi8_r_page00[wc-0x00a0];
+  else if (wc >= 0x0400 && wc < 0x0458)
+    c = koi8_r_page04[wc-0x0400];
+  else if (wc >= 0x2218 && wc < 0x2268)
+    c = koi8_r_page22[wc-0x2218];
+  else if (wc >= 0x2320 && wc < 0x2328)
+    c = koi8_r_page23[wc-0x2320];
+  else if (wc >= 0x2500 && wc < 0x25a8)
+    c = koi8_r_page25[wc-0x2500];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_u.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_u.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/koi8_u.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,146 @@
+/* $XFree86: xc/lib/X11/lcUniConv/koi8_u.h,v 1.3 2000/11/29 17:40:34 dawes Exp $ */
+
+/*
+ * KOI8-U
+ */
+
+/* Specification: RFC 2319 */
+#ifdef NEED_TOWC
+static const unsigned short koi8_u_2uni[128] = {
+  /* 0x80 */
+  0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524,
+  0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590,
+  /* 0x90 */
+  0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248,
+  0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7,
+  /* 0xa0 */
+  0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457,
+  0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x0491, 0x255d, 0x255e,
+  /* 0xb0 */
+  0x255f, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407,
+  0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x0490, 0x256c, 0x00a9,
+  /* 0xc0 */
+  0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
+  0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e,
+  /* 0xd0 */
+  0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
+  0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a,
+  /* 0xe0 */
+  0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
+  0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
+  /* 0xf0 */
+  0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
+  0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a,
+};
+
+static int
+koi8_u_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) koi8_u_2uni[c-0x80];
+  return 1;
+}
+#endif /* NEED_TOWC */
+
+#ifdef  NEED_TOMB
+static const unsigned char koi8_u_page00[88] = {
+  0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
+  0x9c, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, /* 0xf0-0xf7 */
+};
+static const unsigned char koi8_u_page04[152] = {
+  0x00, 0xb3, 0x00, 0x00, 0xb4, 0x00, 0xb6, 0xb7, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, /* 0x10-0x17 */
+  0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, /* 0x18-0x1f */
+  0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, /* 0x20-0x27 */
+  0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, /* 0x28-0x2f */
+  0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, /* 0x30-0x37 */
+  0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, /* 0x38-0x3f */
+  0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */
+  0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */
+  0x00, 0xa3, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0xbd, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+};
+static const unsigned char koi8_u_page22[80] = {
+  0x00, 0x95, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x98, 0x99, 0x00, 0x00, /* 0x60-0x67 */
+};
+static const unsigned char koi8_u_page23[8] = {
+  0x93, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+};
+static const unsigned char koi8_u_page25[168] = {
+  0x80, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x83, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x85, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0xa0, 0xa1, 0xa2, 0x00, 0xa5, 0x00, 0x00, 0xa8, /* 0x50-0x57 */
+  0xa9, 0xaa, 0xab, 0xac, 0x00, 0xae, 0xaf, 0xb0, /* 0x58-0x5f */
+  0xb1, 0xb2, 0x00, 0xb5, 0x00, 0x00, 0xb8, 0xb9, /* 0x60-0x67 */
+  0xba, 0xbb, 0xbc, 0x00, 0xbe, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x8b, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x8d, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x8f, 0x90, 0x91, 0x92, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
+  0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+};
+
+static int
+koi8_u_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00f8)
+    c = koi8_u_page00[wc-0x00a0];
+  else if (wc >= 0x0400 && wc < 0x0498)
+    c = koi8_u_page04[wc-0x0400];
+  else if (wc >= 0x2218 && wc < 0x2268)
+    c = koi8_u_page22[wc-0x2218];
+  else if (wc >= 0x2320 && wc < 0x2328)
+    c = koi8_u_page23[wc-0x2320];
+  else if (wc >= 0x2500 && wc < 0x25a8)
+    c = koi8_u_page25[wc-0x2500];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/ksc5601.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/ksc5601.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/ksc5601.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,3006 @@
+/* $XFree86: xc/lib/X11/lcUniConv/ksc5601.h,v 1.5 2003/05/27 22:26:34 tsi Exp $ */
+
+/*
+ * KSC5601.1987-0
+ */
+#ifdef NEED_TOWC
+static const unsigned short ksc5601_2uni_page21[1115] = {
+  /* 0x21 */
+  0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, 0x3003,
+  0x00ad, 0x2015, 0x2225, 0xff3c, 0x223c, 0x2018, 0x2019, 0x201c,
+  0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c,
+  0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0x00b1, 0x00d7, 0x00f7,
+  0x2260, 0x2264, 0x2265, 0x221e, 0x2234, 0x00b0, 0x2032, 0x2033,
+  0x2103, 0x212b, 0xffe0, 0xffe1, 0xffe5, 0x2642, 0x2640, 0x2220,
+  0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x00a7, 0x203b,
+  0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1,
+  0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x2192, 0x2190, 0x2191,
+  0x2193, 0x2194, 0x3013, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d,
+  0x2235, 0x222b, 0x222c, 0x2208, 0x220b, 0x2286, 0x2287, 0x2282,
+  0x2283, 0x222a, 0x2229, 0x2227, 0x2228, 0xffe2,
+  /* 0x22 */
+  0x21d2, 0x21d4, 0x2200, 0x2203, 0x00b4, 0xff5e, 0x02c7, 0x02d8,
+  0x02dd, 0x02da, 0x02d9, 0x00b8, 0x02db, 0x00a1, 0x00bf, 0x02d0,
+  0x222e, 0x2211, 0x220f, 0x00a4, 0x2109, 0x2030, 0x25c1, 0x25c0,
+  0x25b7, 0x25b6, 0x2664, 0x2660, 0x2661, 0x2665, 0x2667, 0x2663,
+  0x2299, 0x25c8, 0x25a3, 0x25d0, 0x25d1, 0x2592, 0x25a4, 0x25a5,
+  0x25a8, 0x25a7, 0x25a6, 0x25a9, 0x2668, 0x260f, 0x260e, 0x261c,
+  0x261e, 0x00b6, 0x2020, 0x2021, 0x2195, 0x2197, 0x2199, 0x2196,
+  0x2198, 0x266d, 0x2669, 0x266a, 0x266c, 0x327f, 0x321c, 0x2116,
+  0x33c7, 0x2122, 0x33c2, 0x33d8, 0x2121, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x23 */
+  0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, 0xff08,
+  0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10,
+  0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18,
+  0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20,
+  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, 0xff3b, 0xffe6, 0xff3d, 0xff3e, 0xff3f, 0xff40,
+  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, 0xff5b, 0xff5c, 0xff5d, 0xffe3,
+  /* 0x24 */
+  0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138,
+  0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140,
+  0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
+  0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150,
+  0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158,
+  0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160,
+  0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, 0x3168,
+  0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, 0x3170,
+  0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, 0x3178,
+  0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, 0x3180,
+  0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, 0x3188,
+  0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e,
+  /* 0x25 */
+  0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+  0x2178, 0x2179, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2160,
+  0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168,
+  0x2169, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
+  0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0,
+  0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
+  0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
+  0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x26 */
+  0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c,
+  0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b,
+  0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f,
+  0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542,
+  0x2512, 0x2511, 0x251a, 0x2519, 0x2516, 0x2515, 0x250e, 0x250d,
+  0x251e, 0x251f, 0x2521, 0x2522, 0x2526, 0x2527, 0x2529, 0x252a,
+  0x252d, 0x252e, 0x2531, 0x2532, 0x2535, 0x2536, 0x2539, 0x253a,
+  0x253d, 0x253e, 0x2540, 0x2541, 0x2543, 0x2544, 0x2545, 0x2546,
+  0x2547, 0x2548, 0x2549, 0x254a, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x27 */
+  0x3395, 0x3396, 0x3397, 0x2113, 0x3398, 0x33c4, 0x33a3, 0x33a4,
+  0x33a5, 0x33a6, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, 0x339e,
+  0x339f, 0x33a0, 0x33a1, 0x33a2, 0x33ca, 0x338d, 0x338e, 0x338f,
+  0x33cf, 0x3388, 0x3389, 0x33c8, 0x33a7, 0x33a8, 0x33b0, 0x33b1,
+  0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, 0x33b8, 0x33b9,
+  0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x33ba, 0x33bb, 0x33bc,
+  0x33bd, 0x33be, 0x33bf, 0x3390, 0x3391, 0x3392, 0x3393, 0x3394,
+  0x2126, 0x33c0, 0x33c1, 0x338a, 0x338b, 0x338c, 0x33d6, 0x33c5,
+  0x33ad, 0x33ae, 0x33af, 0x33db, 0x33a9, 0x33aa, 0x33ab, 0x33ac,
+  0x33dd, 0x33d0, 0x33d3, 0x33c3, 0x33c9, 0x33dc, 0x33c6, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x28 */
+  0x00c6, 0x00d0, 0x00aa, 0x0126, 0xfffd, 0x0132, 0xfffd, 0x013f,
+  0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, 0xfffd,
+  0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, 0x3267,
+  0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, 0x326f,
+  0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, 0x3277,
+  0x3278, 0x3279, 0x327a, 0x327b, 0x24d0, 0x24d1, 0x24d2, 0x24d3,
+  0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, 0x24da, 0x24db,
+  0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, 0x24e2, 0x24e3,
+  0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, 0x2460, 0x2461,
+  0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469,
+  0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x00bd, 0x2153, 0x2154,
+  0x00bc, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e,
+  /* 0x29 */
+  0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, 0x0140,
+  0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0x0149,
+  0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, 0x3207,
+  0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, 0x320f,
+  0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, 0x3217,
+  0x3218, 0x3219, 0x321a, 0x321b, 0x249c, 0x249d, 0x249e, 0x249f,
+  0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7,
+  0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af,
+  0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x2474, 0x2475,
+  0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d,
+  0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x00b9, 0x00b2, 0x00b3,
+  0x2074, 0x207f, 0x2081, 0x2082, 0x2083, 0x2084,
+  /* 0x2a */
+  0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048,
+  0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050,
+  0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058,
+  0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060,
+  0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068,
+  0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070,
+  0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078,
+  0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080,
+  0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088,
+  0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090,
+  0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x2b */
+  0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
+  0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
+  0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
+  0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
+  0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
+  0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
+  0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
+  0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0,
+  0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8,
+  0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0,
+  0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  /* 0x2c */
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 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, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 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,
+};
+static const unsigned short ksc5601_2uni_page30[2350] = {
+  /* 0x30 */
+  0xac00, 0xac01, 0xac04, 0xac07, 0xac08, 0xac09, 0xac0a, 0xac10,
+  0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, 0xac19,
+  0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac20, 0xac24, 0xac2c, 0xac2d,
+  0xac2f, 0xac30, 0xac31, 0xac38, 0xac39, 0xac3c, 0xac40, 0xac4b,
+  0xac4d, 0xac54, 0xac58, 0xac5c, 0xac70, 0xac71, 0xac74, 0xac77,
+  0xac78, 0xac7a, 0xac80, 0xac81, 0xac83, 0xac84, 0xac85, 0xac86,
+  0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac90, 0xac94, 0xac9c, 0xac9d,
+  0xac9f, 0xaca0, 0xaca1, 0xaca8, 0xaca9, 0xacaa, 0xacac, 0xacaf,
+  0xacb0, 0xacb8, 0xacb9, 0xacbb, 0xacbc, 0xacbd, 0xacc1, 0xacc4,
+  0xacc8, 0xaccc, 0xacd5, 0xacd7, 0xace0, 0xace1, 0xace4, 0xace7,
+  0xace8, 0xacea, 0xacec, 0xacef, 0xacf0, 0xacf1, 0xacf3, 0xacf5,
+  0xacf6, 0xacfc, 0xacfd, 0xad00, 0xad04, 0xad06,
+  /* 0x31 */
+  0xad0c, 0xad0d, 0xad0f, 0xad11, 0xad18, 0xad1c, 0xad20, 0xad29,
+  0xad2c, 0xad2d, 0xad34, 0xad35, 0xad38, 0xad3c, 0xad44, 0xad45,
+  0xad47, 0xad49, 0xad50, 0xad54, 0xad58, 0xad61, 0xad63, 0xad6c,
+  0xad6d, 0xad70, 0xad73, 0xad74, 0xad75, 0xad76, 0xad7b, 0xad7c,
+  0xad7d, 0xad7f, 0xad81, 0xad82, 0xad88, 0xad89, 0xad8c, 0xad90,
+  0xad9c, 0xad9d, 0xada4, 0xadb7, 0xadc0, 0xadc1, 0xadc4, 0xadc8,
+  0xadd0, 0xadd1, 0xadd3, 0xaddc, 0xade0, 0xade4, 0xadf8, 0xadf9,
+  0xadfc, 0xadff, 0xae00, 0xae01, 0xae08, 0xae09, 0xae0b, 0xae0d,
+  0xae14, 0xae30, 0xae31, 0xae34, 0xae37, 0xae38, 0xae3a, 0xae40,
+  0xae41, 0xae43, 0xae45, 0xae46, 0xae4a, 0xae4c, 0xae4d, 0xae4e,
+  0xae50, 0xae54, 0xae56, 0xae5c, 0xae5d, 0xae5f, 0xae60, 0xae61,
+  0xae65, 0xae68, 0xae69, 0xae6c, 0xae70, 0xae78,
+  /* 0x32 */
+  0xae79, 0xae7b, 0xae7c, 0xae7d, 0xae84, 0xae85, 0xae8c, 0xaebc,
+  0xaebd, 0xaebe, 0xaec0, 0xaec4, 0xaecc, 0xaecd, 0xaecf, 0xaed0,
+  0xaed1, 0xaed8, 0xaed9, 0xaedc, 0xaee8, 0xaeeb, 0xaeed, 0xaef4,
+  0xaef8, 0xaefc, 0xaf07, 0xaf08, 0xaf0d, 0xaf10, 0xaf2c, 0xaf2d,
+  0xaf30, 0xaf32, 0xaf34, 0xaf3c, 0xaf3d, 0xaf3f, 0xaf41, 0xaf42,
+  0xaf43, 0xaf48, 0xaf49, 0xaf50, 0xaf5c, 0xaf5d, 0xaf64, 0xaf65,
+  0xaf79, 0xaf80, 0xaf84, 0xaf88, 0xaf90, 0xaf91, 0xaf95, 0xaf9c,
+  0xafb8, 0xafb9, 0xafbc, 0xafc0, 0xafc7, 0xafc8, 0xafc9, 0xafcb,
+  0xafcd, 0xafce, 0xafd4, 0xafdc, 0xafe8, 0xafe9, 0xaff0, 0xaff1,
+  0xaff4, 0xaff8, 0xb000, 0xb001, 0xb004, 0xb00c, 0xb010, 0xb014,
+  0xb01c, 0xb01d, 0xb028, 0xb044, 0xb045, 0xb048, 0xb04a, 0xb04c,
+  0xb04e, 0xb053, 0xb054, 0xb055, 0xb057, 0xb059,
+  /* 0x33 */
+  0xb05d, 0xb07c, 0xb07d, 0xb080, 0xb084, 0xb08c, 0xb08d, 0xb08f,
+  0xb091, 0xb098, 0xb099, 0xb09a, 0xb09c, 0xb09f, 0xb0a0, 0xb0a1,
+  0xb0a2, 0xb0a8, 0xb0a9, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af,
+  0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b8, 0xb0bc, 0xb0c4, 0xb0c5,
+  0xb0c7, 0xb0c8, 0xb0c9, 0xb0d0, 0xb0d1, 0xb0d4, 0xb0d8, 0xb0e0,
+  0xb0e5, 0xb108, 0xb109, 0xb10b, 0xb10c, 0xb110, 0xb112, 0xb113,
+  0xb118, 0xb119, 0xb11b, 0xb11c, 0xb11d, 0xb123, 0xb124, 0xb125,
+  0xb128, 0xb12c, 0xb134, 0xb135, 0xb137, 0xb138, 0xb139, 0xb140,
+  0xb141, 0xb144, 0xb148, 0xb150, 0xb151, 0xb154, 0xb155, 0xb158,
+  0xb15c, 0xb160, 0xb178, 0xb179, 0xb17c, 0xb180, 0xb182, 0xb188,
+  0xb189, 0xb18b, 0xb18d, 0xb192, 0xb193, 0xb194, 0xb198, 0xb19c,
+  0xb1a8, 0xb1cc, 0xb1d0, 0xb1d4, 0xb1dc, 0xb1dd,
+  /* 0x34 */
+  0xb1df, 0xb1e8, 0xb1e9, 0xb1ec, 0xb1f0, 0xb1f9, 0xb1fb, 0xb1fd,
+  0xb204, 0xb205, 0xb208, 0xb20b, 0xb20c, 0xb214, 0xb215, 0xb217,
+  0xb219, 0xb220, 0xb234, 0xb23c, 0xb258, 0xb25c, 0xb260, 0xb268,
+  0xb269, 0xb274, 0xb275, 0xb27c, 0xb284, 0xb285, 0xb289, 0xb290,
+  0xb291, 0xb294, 0xb298, 0xb299, 0xb29a, 0xb2a0, 0xb2a1, 0xb2a3,
+  0xb2a5, 0xb2a6, 0xb2aa, 0xb2ac, 0xb2b0, 0xb2b4, 0xb2c8, 0xb2c9,
+  0xb2cc, 0xb2d0, 0xb2d2, 0xb2d8, 0xb2d9, 0xb2db, 0xb2dd, 0xb2e2,
+  0xb2e4, 0xb2e5, 0xb2e6, 0xb2e8, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee,
+  0xb2ef, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f7, 0xb2f8, 0xb2f9, 0xb2fa,
+  0xb2fb, 0xb2ff, 0xb300, 0xb301, 0xb304, 0xb308, 0xb310, 0xb311,
+  0xb313, 0xb314, 0xb315, 0xb31c, 0xb354, 0xb355, 0xb356, 0xb358,
+  0xb35b, 0xb35c, 0xb35e, 0xb35f, 0xb364, 0xb365,
+  /* 0x35 */
+  0xb367, 0xb369, 0xb36b, 0xb36e, 0xb370, 0xb371, 0xb374, 0xb378,
+  0xb380, 0xb381, 0xb383, 0xb384, 0xb385, 0xb38c, 0xb390, 0xb394,
+  0xb3a0, 0xb3a1, 0xb3a8, 0xb3ac, 0xb3c4, 0xb3c5, 0xb3c8, 0xb3cb,
+  0xb3cc, 0xb3ce, 0xb3d0, 0xb3d4, 0xb3d5, 0xb3d7, 0xb3d9, 0xb3db,
+  0xb3dd, 0xb3e0, 0xb3e4, 0xb3e8, 0xb3fc, 0xb410, 0xb418, 0xb41c,
+  0xb420, 0xb428, 0xb429, 0xb42b, 0xb434, 0xb450, 0xb451, 0xb454,
+  0xb458, 0xb460, 0xb461, 0xb463, 0xb465, 0xb46c, 0xb480, 0xb488,
+  0xb49d, 0xb4a4, 0xb4a8, 0xb4ac, 0xb4b5, 0xb4b7, 0xb4b9, 0xb4c0,
+  0xb4c4, 0xb4c8, 0xb4d0, 0xb4d5, 0xb4dc, 0xb4dd, 0xb4e0, 0xb4e3,
+  0xb4e4, 0xb4e6, 0xb4ec, 0xb4ed, 0xb4ef, 0xb4f1, 0xb4f8, 0xb514,
+  0xb515, 0xb518, 0xb51b, 0xb51c, 0xb524, 0xb525, 0xb527, 0xb528,
+  0xb529, 0xb52a, 0xb530, 0xb531, 0xb534, 0xb538,
+  /* 0x36 */
+  0xb540, 0xb541, 0xb543, 0xb544, 0xb545, 0xb54b, 0xb54c, 0xb54d,
+  0xb550, 0xb554, 0xb55c, 0xb55d, 0xb55f, 0xb560, 0xb561, 0xb5a0,
+  0xb5a1, 0xb5a4, 0xb5a8, 0xb5aa, 0xb5ab, 0xb5b0, 0xb5b1, 0xb5b3,
+  0xb5b4, 0xb5b5, 0xb5bb, 0xb5bc, 0xb5bd, 0xb5c0, 0xb5c4, 0xb5cc,
+  0xb5cd, 0xb5cf, 0xb5d0, 0xb5d1, 0xb5d8, 0xb5ec, 0xb610, 0xb611,
+  0xb614, 0xb618, 0xb625, 0xb62c, 0xb634, 0xb648, 0xb664, 0xb668,
+  0xb69c, 0xb69d, 0xb6a0, 0xb6a4, 0xb6ab, 0xb6ac, 0xb6b1, 0xb6d4,
+  0xb6f0, 0xb6f4, 0xb6f8, 0xb700, 0xb701, 0xb705, 0xb728, 0xb729,
+  0xb72c, 0xb72f, 0xb730, 0xb738, 0xb739, 0xb73b, 0xb744, 0xb748,
+  0xb74c, 0xb754, 0xb755, 0xb760, 0xb764, 0xb768, 0xb770, 0xb771,
+  0xb773, 0xb775, 0xb77c, 0xb77d, 0xb780, 0xb784, 0xb78c, 0xb78d,
+  0xb78f, 0xb790, 0xb791, 0xb792, 0xb796, 0xb797,
+  /* 0x37 */
+  0xb798, 0xb799, 0xb79c, 0xb7a0, 0xb7a8, 0xb7a9, 0xb7ab, 0xb7ac,
+  0xb7ad, 0xb7b4, 0xb7b5, 0xb7b8, 0xb7c7, 0xb7c9, 0xb7ec, 0xb7ed,
+  0xb7f0, 0xb7f4, 0xb7fc, 0xb7fd, 0xb7ff, 0xb800, 0xb801, 0xb807,
+  0xb808, 0xb809, 0xb80c, 0xb810, 0xb818, 0xb819, 0xb81b, 0xb81d,
+  0xb824, 0xb825, 0xb828, 0xb82c, 0xb834, 0xb835, 0xb837, 0xb838,
+  0xb839, 0xb840, 0xb844, 0xb851, 0xb853, 0xb85c, 0xb85d, 0xb860,
+  0xb864, 0xb86c, 0xb86d, 0xb86f, 0xb871, 0xb878, 0xb87c, 0xb88d,
+  0xb8a8, 0xb8b0, 0xb8b4, 0xb8b8, 0xb8c0, 0xb8c1, 0xb8c3, 0xb8c5,
+  0xb8cc, 0xb8d0, 0xb8d4, 0xb8dd, 0xb8df, 0xb8e1, 0xb8e8, 0xb8e9,
+  0xb8ec, 0xb8f0, 0xb8f8, 0xb8f9, 0xb8fb, 0xb8fd, 0xb904, 0xb918,
+  0xb920, 0xb93c, 0xb93d, 0xb940, 0xb944, 0xb94c, 0xb94f, 0xb951,
+  0xb958, 0xb959, 0xb95c, 0xb960, 0xb968, 0xb969,
+  /* 0x38 */
+  0xb96b, 0xb96d, 0xb974, 0xb975, 0xb978, 0xb97c, 0xb984, 0xb985,
+  0xb987, 0xb989, 0xb98a, 0xb98d, 0xb98e, 0xb9ac, 0xb9ad, 0xb9b0,
+  0xb9b4, 0xb9bc, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c8, 0xb9c9, 0xb9cc,
+  0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d8, 0xb9d9, 0xb9db,
+  0xb9dd, 0xb9de, 0xb9e1, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e8, 0xb9ec,
+  0xb9f4, 0xb9f5, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9fa, 0xba00, 0xba01,
+  0xba08, 0xba15, 0xba38, 0xba39, 0xba3c, 0xba40, 0xba42, 0xba48,
+  0xba49, 0xba4b, 0xba4d, 0xba4e, 0xba53, 0xba54, 0xba55, 0xba58,
+  0xba5c, 0xba64, 0xba65, 0xba67, 0xba68, 0xba69, 0xba70, 0xba71,
+  0xba74, 0xba78, 0xba83, 0xba84, 0xba85, 0xba87, 0xba8c, 0xbaa8,
+  0xbaa9, 0xbaab, 0xbaac, 0xbab0, 0xbab2, 0xbab8, 0xbab9, 0xbabb,
+  0xbabd, 0xbac4, 0xbac8, 0xbad8, 0xbad9, 0xbafc,
+  /* 0x39 */
+  0xbb00, 0xbb04, 0xbb0d, 0xbb0f, 0xbb11, 0xbb18, 0xbb1c, 0xbb20,
+  0xbb29, 0xbb2b, 0xbb34, 0xbb35, 0xbb36, 0xbb38, 0xbb3b, 0xbb3c,
+  0xbb3d, 0xbb3e, 0xbb44, 0xbb45, 0xbb47, 0xbb49, 0xbb4d, 0xbb4f,
+  0xbb50, 0xbb54, 0xbb58, 0xbb61, 0xbb63, 0xbb6c, 0xbb88, 0xbb8c,
+  0xbb90, 0xbba4, 0xbba8, 0xbbac, 0xbbb4, 0xbbb7, 0xbbc0, 0xbbc4,
+  0xbbc8, 0xbbd0, 0xbbd3, 0xbbf8, 0xbbf9, 0xbbfc, 0xbbff, 0xbc00,
+  0xbc02, 0xbc08, 0xbc09, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0f, 0xbc11,
+  0xbc14, 0xbc15, 0xbc16, 0xbc17, 0xbc18, 0xbc1b, 0xbc1c, 0xbc1d,
+  0xbc1e, 0xbc1f, 0xbc24, 0xbc25, 0xbc27, 0xbc29, 0xbc2d, 0xbc30,
+  0xbc31, 0xbc34, 0xbc38, 0xbc40, 0xbc41, 0xbc43, 0xbc44, 0xbc45,
+  0xbc49, 0xbc4c, 0xbc4d, 0xbc50, 0xbc5d, 0xbc84, 0xbc85, 0xbc88,
+  0xbc8b, 0xbc8c, 0xbc8e, 0xbc94, 0xbc95, 0xbc97,
+  /* 0x3a */
+  0xbc99, 0xbc9a, 0xbca0, 0xbca1, 0xbca4, 0xbca7, 0xbca8, 0xbcb0,
+  0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5, 0xbcbc, 0xbcbd, 0xbcc0, 0xbcc4,
+  0xbccd, 0xbccf, 0xbcd0, 0xbcd1, 0xbcd5, 0xbcd8, 0xbcdc, 0xbcf4,
+  0xbcf5, 0xbcf6, 0xbcf8, 0xbcfc, 0xbd04, 0xbd05, 0xbd07, 0xbd09,
+  0xbd10, 0xbd14, 0xbd24, 0xbd2c, 0xbd40, 0xbd48, 0xbd49, 0xbd4c,
+  0xbd50, 0xbd58, 0xbd59, 0xbd64, 0xbd68, 0xbd80, 0xbd81, 0xbd84,
+  0xbd87, 0xbd88, 0xbd89, 0xbd8a, 0xbd90, 0xbd91, 0xbd93, 0xbd95,
+  0xbd99, 0xbd9a, 0xbd9c, 0xbda4, 0xbdb0, 0xbdb8, 0xbdd4, 0xbdd5,
+  0xbdd8, 0xbddc, 0xbde9, 0xbdf0, 0xbdf4, 0xbdf8, 0xbe00, 0xbe03,
+  0xbe05, 0xbe0c, 0xbe0d, 0xbe10, 0xbe14, 0xbe1c, 0xbe1d, 0xbe1f,
+  0xbe44, 0xbe45, 0xbe48, 0xbe4c, 0xbe4e, 0xbe54, 0xbe55, 0xbe57,
+  0xbe59, 0xbe5a, 0xbe5b, 0xbe60, 0xbe61, 0xbe64,
+  /* 0x3b */
+  0xbe68, 0xbe6a, 0xbe70, 0xbe71, 0xbe73, 0xbe74, 0xbe75, 0xbe7b,
+  0xbe7c, 0xbe7d, 0xbe80, 0xbe84, 0xbe8c, 0xbe8d, 0xbe8f, 0xbe90,
+  0xbe91, 0xbe98, 0xbe99, 0xbea8, 0xbed0, 0xbed1, 0xbed4, 0xbed7,
+  0xbed8, 0xbee0, 0xbee3, 0xbee4, 0xbee5, 0xbeec, 0xbf01, 0xbf08,
+  0xbf09, 0xbf18, 0xbf19, 0xbf1b, 0xbf1c, 0xbf1d, 0xbf40, 0xbf41,
+  0xbf44, 0xbf48, 0xbf50, 0xbf51, 0xbf55, 0xbf94, 0xbfb0, 0xbfc5,
+  0xbfcc, 0xbfcd, 0xbfd0, 0xbfd4, 0xbfdc, 0xbfdf, 0xbfe1, 0xc03c,
+  0xc051, 0xc058, 0xc05c, 0xc060, 0xc068, 0xc069, 0xc090, 0xc091,
+  0xc094, 0xc098, 0xc0a0, 0xc0a1, 0xc0a3, 0xc0a5, 0xc0ac, 0xc0ad,
+  0xc0af, 0xc0b0, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0bc, 0xc0bd,
+  0xc0bf, 0xc0c0, 0xc0c1, 0xc0c5, 0xc0c8, 0xc0c9, 0xc0cc, 0xc0d0,
+  0xc0d8, 0xc0d9, 0xc0db, 0xc0dc, 0xc0dd, 0xc0e4,
+  /* 0x3c */
+  0xc0e5, 0xc0e8, 0xc0ec, 0xc0f4, 0xc0f5, 0xc0f7, 0xc0f9, 0xc100,
+  0xc104, 0xc108, 0xc110, 0xc115, 0xc11c, 0xc11d, 0xc11e, 0xc11f,
+  0xc120, 0xc123, 0xc124, 0xc126, 0xc127, 0xc12c, 0xc12d, 0xc12f,
+  0xc130, 0xc131, 0xc136, 0xc138, 0xc139, 0xc13c, 0xc140, 0xc148,
+  0xc149, 0xc14b, 0xc14c, 0xc14d, 0xc154, 0xc155, 0xc158, 0xc15c,
+  0xc164, 0xc165, 0xc167, 0xc168, 0xc169, 0xc170, 0xc174, 0xc178,
+  0xc185, 0xc18c, 0xc18d, 0xc18e, 0xc190, 0xc194, 0xc196, 0xc19c,
+  0xc19d, 0xc19f, 0xc1a1, 0xc1a5, 0xc1a8, 0xc1a9, 0xc1ac, 0xc1b0,
+  0xc1bd, 0xc1c4, 0xc1c8, 0xc1cc, 0xc1d4, 0xc1d7, 0xc1d8, 0xc1e0,
+  0xc1e4, 0xc1e8, 0xc1f0, 0xc1f1, 0xc1f3, 0xc1fc, 0xc1fd, 0xc200,
+  0xc204, 0xc20c, 0xc20d, 0xc20f, 0xc211, 0xc218, 0xc219, 0xc21c,
+  0xc21f, 0xc220, 0xc228, 0xc229, 0xc22b, 0xc22d,
+  /* 0x3d */
+  0xc22f, 0xc231, 0xc232, 0xc234, 0xc248, 0xc250, 0xc251, 0xc254,
+  0xc258, 0xc260, 0xc265, 0xc26c, 0xc26d, 0xc270, 0xc274, 0xc27c,
+  0xc27d, 0xc27f, 0xc281, 0xc288, 0xc289, 0xc290, 0xc298, 0xc29b,
+  0xc29d, 0xc2a4, 0xc2a5, 0xc2a8, 0xc2ac, 0xc2ad, 0xc2b4, 0xc2b5,
+  0xc2b7, 0xc2b9, 0xc2dc, 0xc2dd, 0xc2e0, 0xc2e3, 0xc2e4, 0xc2eb,
+  0xc2ec, 0xc2ed, 0xc2ef, 0xc2f1, 0xc2f6, 0xc2f8, 0xc2f9, 0xc2fb,
+  0xc2fc, 0xc300, 0xc308, 0xc309, 0xc30c, 0xc30d, 0xc313, 0xc314,
+  0xc315, 0xc318, 0xc31c, 0xc324, 0xc325, 0xc328, 0xc329, 0xc345,
+  0xc368, 0xc369, 0xc36c, 0xc370, 0xc372, 0xc378, 0xc379, 0xc37c,
+  0xc37d, 0xc384, 0xc388, 0xc38c, 0xc3c0, 0xc3d8, 0xc3d9, 0xc3dc,
+  0xc3df, 0xc3e0, 0xc3e2, 0xc3e8, 0xc3e9, 0xc3ed, 0xc3f4, 0xc3f5,
+  0xc3f8, 0xc408, 0xc410, 0xc424, 0xc42c, 0xc430,
+  /* 0x3e */
+  0xc434, 0xc43c, 0xc43d, 0xc448, 0xc464, 0xc465, 0xc468, 0xc46c,
+  0xc474, 0xc475, 0xc479, 0xc480, 0xc494, 0xc49c, 0xc4b8, 0xc4bc,
+  0xc4e9, 0xc4f0, 0xc4f1, 0xc4f4, 0xc4f8, 0xc4fa, 0xc4ff, 0xc500,
+  0xc501, 0xc50c, 0xc510, 0xc514, 0xc51c, 0xc528, 0xc529, 0xc52c,
+  0xc530, 0xc538, 0xc539, 0xc53b, 0xc53d, 0xc544, 0xc545, 0xc548,
+  0xc549, 0xc54a, 0xc54c, 0xc54d, 0xc54e, 0xc553, 0xc554, 0xc555,
+  0xc557, 0xc558, 0xc559, 0xc55d, 0xc55e, 0xc560, 0xc561, 0xc564,
+  0xc568, 0xc570, 0xc571, 0xc573, 0xc574, 0xc575, 0xc57c, 0xc57d,
+  0xc580, 0xc584, 0xc587, 0xc58c, 0xc58d, 0xc58f, 0xc591, 0xc595,
+  0xc597, 0xc598, 0xc59c, 0xc5a0, 0xc5a9, 0xc5b4, 0xc5b5, 0xc5b8,
+  0xc5b9, 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5c4, 0xc5c5, 0xc5c6,
+  0xc5c7, 0xc5c8, 0xc5c9, 0xc5ca, 0xc5cc, 0xc5ce,
+  /* 0x3f */
+  0xc5d0, 0xc5d1, 0xc5d4, 0xc5d8, 0xc5e0, 0xc5e1, 0xc5e3, 0xc5e5,
+  0xc5ec, 0xc5ed, 0xc5ee, 0xc5f0, 0xc5f4, 0xc5f6, 0xc5f7, 0xc5fc,
+  0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, 0xc605, 0xc606, 0xc607,
+  0xc608, 0xc60c, 0xc610, 0xc618, 0xc619, 0xc61b, 0xc61c, 0xc624,
+  0xc625, 0xc628, 0xc62c, 0xc62d, 0xc62e, 0xc630, 0xc633, 0xc634,
+  0xc635, 0xc637, 0xc639, 0xc63b, 0xc640, 0xc641, 0xc644, 0xc648,
+  0xc650, 0xc651, 0xc653, 0xc654, 0xc655, 0xc65c, 0xc65d, 0xc660,
+  0xc66c, 0xc66f, 0xc671, 0xc678, 0xc679, 0xc67c, 0xc680, 0xc688,
+  0xc689, 0xc68b, 0xc68d, 0xc694, 0xc695, 0xc698, 0xc69c, 0xc6a4,
+  0xc6a5, 0xc6a7, 0xc6a9, 0xc6b0, 0xc6b1, 0xc6b4, 0xc6b8, 0xc6b9,
+  0xc6ba, 0xc6c0, 0xc6c1, 0xc6c3, 0xc6c5, 0xc6cc, 0xc6cd, 0xc6d0,
+  0xc6d4, 0xc6dc, 0xc6dd, 0xc6e0, 0xc6e1, 0xc6e8,
+  /* 0x40 */
+  0xc6e9, 0xc6ec, 0xc6f0, 0xc6f8, 0xc6f9, 0xc6fd, 0xc704, 0xc705,
+  0xc708, 0xc70c, 0xc714, 0xc715, 0xc717, 0xc719, 0xc720, 0xc721,
+  0xc724, 0xc728, 0xc730, 0xc731, 0xc733, 0xc735, 0xc737, 0xc73c,
+  0xc73d, 0xc740, 0xc744, 0xc74a, 0xc74c, 0xc74d, 0xc74f, 0xc751,
+  0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc75c,
+  0xc760, 0xc768, 0xc76b, 0xc774, 0xc775, 0xc778, 0xc77c, 0xc77d,
+  0xc77e, 0xc783, 0xc784, 0xc785, 0xc787, 0xc788, 0xc789, 0xc78a,
+  0xc78e, 0xc790, 0xc791, 0xc794, 0xc796, 0xc797, 0xc798, 0xc79a,
+  0xc7a0, 0xc7a1, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7ac, 0xc7ad,
+  0xc7b0, 0xc7b4, 0xc7bc, 0xc7bd, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c8,
+  0xc7c9, 0xc7cc, 0xc7ce, 0xc7d0, 0xc7d8, 0xc7dd, 0xc7e4, 0xc7e8,
+  0xc7ec, 0xc800, 0xc801, 0xc804, 0xc808, 0xc80a,
+  /* 0x41 */
+  0xc810, 0xc811, 0xc813, 0xc815, 0xc816, 0xc81c, 0xc81d, 0xc820,
+  0xc824, 0xc82c, 0xc82d, 0xc82f, 0xc831, 0xc838, 0xc83c, 0xc840,
+  0xc848, 0xc849, 0xc84c, 0xc84d, 0xc854, 0xc870, 0xc871, 0xc874,
+  0xc878, 0xc87a, 0xc880, 0xc881, 0xc883, 0xc885, 0xc886, 0xc887,
+  0xc88b, 0xc88c, 0xc88d, 0xc894, 0xc89d, 0xc89f, 0xc8a1, 0xc8a8,
+  0xc8bc, 0xc8bd, 0xc8c4, 0xc8c8, 0xc8cc, 0xc8d4, 0xc8d5, 0xc8d7,
+  0xc8d9, 0xc8e0, 0xc8e1, 0xc8e4, 0xc8f5, 0xc8fc, 0xc8fd, 0xc900,
+  0xc904, 0xc905, 0xc906, 0xc90c, 0xc90d, 0xc90f, 0xc911, 0xc918,
+  0xc92c, 0xc934, 0xc950, 0xc951, 0xc954, 0xc958, 0xc960, 0xc961,
+  0xc963, 0xc96c, 0xc970, 0xc974, 0xc97c, 0xc988, 0xc989, 0xc98c,
+  0xc990, 0xc998, 0xc999, 0xc99b, 0xc99d, 0xc9c0, 0xc9c1, 0xc9c4,
+  0xc9c7, 0xc9c8, 0xc9ca, 0xc9d0, 0xc9d1, 0xc9d3,
+  /* 0x42 */
+  0xc9d5, 0xc9d6, 0xc9d9, 0xc9da, 0xc9dc, 0xc9dd, 0xc9e0, 0xc9e2,
+  0xc9e4, 0xc9e7, 0xc9ec, 0xc9ed, 0xc9ef, 0xc9f0, 0xc9f1, 0xc9f8,
+  0xc9f9, 0xc9fc, 0xca00, 0xca08, 0xca09, 0xca0b, 0xca0c, 0xca0d,
+  0xca14, 0xca18, 0xca29, 0xca4c, 0xca4d, 0xca50, 0xca54, 0xca5c,
+  0xca5d, 0xca5f, 0xca60, 0xca61, 0xca68, 0xca7d, 0xca84, 0xca98,
+  0xcabc, 0xcabd, 0xcac0, 0xcac4, 0xcacc, 0xcacd, 0xcacf, 0xcad1,
+  0xcad3, 0xcad8, 0xcad9, 0xcae0, 0xcaec, 0xcaf4, 0xcb08, 0xcb10,
+  0xcb14, 0xcb18, 0xcb20, 0xcb21, 0xcb41, 0xcb48, 0xcb49, 0xcb4c,
+  0xcb50, 0xcb58, 0xcb59, 0xcb5d, 0xcb64, 0xcb78, 0xcb79, 0xcb9c,
+  0xcbb8, 0xcbd4, 0xcbe4, 0xcbe7, 0xcbe9, 0xcc0c, 0xcc0d, 0xcc10,
+  0xcc14, 0xcc1c, 0xcc1d, 0xcc21, 0xcc22, 0xcc27, 0xcc28, 0xcc29,
+  0xcc2c, 0xcc2e, 0xcc30, 0xcc38, 0xcc39, 0xcc3b,
+  /* 0x43 */
+  0xcc3c, 0xcc3d, 0xcc3e, 0xcc44, 0xcc45, 0xcc48, 0xcc4c, 0xcc54,
+  0xcc55, 0xcc57, 0xcc58, 0xcc59, 0xcc60, 0xcc64, 0xcc66, 0xcc68,
+  0xcc70, 0xcc75, 0xcc98, 0xcc99, 0xcc9c, 0xcca0, 0xcca8, 0xcca9,
+  0xccab, 0xccac, 0xccad, 0xccb4, 0xccb5, 0xccb8, 0xccbc, 0xccc4,
+  0xccc5, 0xccc7, 0xccc9, 0xccd0, 0xccd4, 0xcce4, 0xccec, 0xccf0,
+  0xcd01, 0xcd08, 0xcd09, 0xcd0c, 0xcd10, 0xcd18, 0xcd19, 0xcd1b,
+  0xcd1d, 0xcd24, 0xcd28, 0xcd2c, 0xcd39, 0xcd5c, 0xcd60, 0xcd64,
+  0xcd6c, 0xcd6d, 0xcd6f, 0xcd71, 0xcd78, 0xcd88, 0xcd94, 0xcd95,
+  0xcd98, 0xcd9c, 0xcda4, 0xcda5, 0xcda7, 0xcda9, 0xcdb0, 0xcdc4,
+  0xcdcc, 0xcdd0, 0xcde8, 0xcdec, 0xcdf0, 0xcdf8, 0xcdf9, 0xcdfb,
+  0xcdfd, 0xce04, 0xce08, 0xce0c, 0xce14, 0xce19, 0xce20, 0xce21,
+  0xce24, 0xce28, 0xce30, 0xce31, 0xce33, 0xce35,
+  /* 0x44 */
+  0xce58, 0xce59, 0xce5c, 0xce5f, 0xce60, 0xce61, 0xce68, 0xce69,
+  0xce6b, 0xce6d, 0xce74, 0xce75, 0xce78, 0xce7c, 0xce84, 0xce85,
+  0xce87, 0xce89, 0xce90, 0xce91, 0xce94, 0xce98, 0xcea0, 0xcea1,
+  0xcea3, 0xcea4, 0xcea5, 0xceac, 0xcead, 0xcec1, 0xcee4, 0xcee5,
+  0xcee8, 0xceeb, 0xceec, 0xcef4, 0xcef5, 0xcef7, 0xcef8, 0xcef9,
+  0xcf00, 0xcf01, 0xcf04, 0xcf08, 0xcf10, 0xcf11, 0xcf13, 0xcf15,
+  0xcf1c, 0xcf20, 0xcf24, 0xcf2c, 0xcf2d, 0xcf2f, 0xcf30, 0xcf31,
+  0xcf38, 0xcf54, 0xcf55, 0xcf58, 0xcf5c, 0xcf64, 0xcf65, 0xcf67,
+  0xcf69, 0xcf70, 0xcf71, 0xcf74, 0xcf78, 0xcf80, 0xcf85, 0xcf8c,
+  0xcfa1, 0xcfa8, 0xcfb0, 0xcfc4, 0xcfe0, 0xcfe1, 0xcfe4, 0xcfe8,
+  0xcff0, 0xcff1, 0xcff3, 0xcff5, 0xcffc, 0xd000, 0xd004, 0xd011,
+  0xd018, 0xd02d, 0xd034, 0xd035, 0xd038, 0xd03c,
+  /* 0x45 */
+  0xd044, 0xd045, 0xd047, 0xd049, 0xd050, 0xd054, 0xd058, 0xd060,
+  0xd06c, 0xd06d, 0xd070, 0xd074, 0xd07c, 0xd07d, 0xd081, 0xd0a4,
+  0xd0a5, 0xd0a8, 0xd0ac, 0xd0b4, 0xd0b5, 0xd0b7, 0xd0b9, 0xd0c0,
+  0xd0c1, 0xd0c4, 0xd0c8, 0xd0c9, 0xd0d0, 0xd0d1, 0xd0d3, 0xd0d4,
+  0xd0d5, 0xd0dc, 0xd0dd, 0xd0e0, 0xd0e4, 0xd0ec, 0xd0ed, 0xd0ef,
+  0xd0f0, 0xd0f1, 0xd0f8, 0xd10d, 0xd130, 0xd131, 0xd134, 0xd138,
+  0xd13a, 0xd140, 0xd141, 0xd143, 0xd144, 0xd145, 0xd14c, 0xd14d,
+  0xd150, 0xd154, 0xd15c, 0xd15d, 0xd15f, 0xd161, 0xd168, 0xd16c,
+  0xd17c, 0xd184, 0xd188, 0xd1a0, 0xd1a1, 0xd1a4, 0xd1a8, 0xd1b0,
+  0xd1b1, 0xd1b3, 0xd1b5, 0xd1ba, 0xd1bc, 0xd1c0, 0xd1d8, 0xd1f4,
+  0xd1f8, 0xd207, 0xd209, 0xd210, 0xd22c, 0xd22d, 0xd230, 0xd234,
+  0xd23c, 0xd23d, 0xd23f, 0xd241, 0xd248, 0xd25c,
+  /* 0x46 */
+  0xd264, 0xd280, 0xd281, 0xd284, 0xd288, 0xd290, 0xd291, 0xd295,
+  0xd29c, 0xd2a0, 0xd2a4, 0xd2ac, 0xd2b1, 0xd2b8, 0xd2b9, 0xd2bc,
+  0xd2bf, 0xd2c0, 0xd2c2, 0xd2c8, 0xd2c9, 0xd2cb, 0xd2d4, 0xd2d8,
+  0xd2dc, 0xd2e4, 0xd2e5, 0xd2f0, 0xd2f1, 0xd2f4, 0xd2f8, 0xd300,
+  0xd301, 0xd303, 0xd305, 0xd30c, 0xd30d, 0xd30e, 0xd310, 0xd314,
+  0xd316, 0xd31c, 0xd31d, 0xd31f, 0xd320, 0xd321, 0xd325, 0xd328,
+  0xd329, 0xd32c, 0xd330, 0xd338, 0xd339, 0xd33b, 0xd33c, 0xd33d,
+  0xd344, 0xd345, 0xd37c, 0xd37d, 0xd380, 0xd384, 0xd38c, 0xd38d,
+  0xd38f, 0xd390, 0xd391, 0xd398, 0xd399, 0xd39c, 0xd3a0, 0xd3a8,
+  0xd3a9, 0xd3ab, 0xd3ad, 0xd3b4, 0xd3b8, 0xd3bc, 0xd3c4, 0xd3c5,
+  0xd3c8, 0xd3c9, 0xd3d0, 0xd3d8, 0xd3e1, 0xd3e3, 0xd3ec, 0xd3ed,
+  0xd3f0, 0xd3f4, 0xd3fc, 0xd3fd, 0xd3ff, 0xd401,
+  /* 0x47 */
+  0xd408, 0xd41d, 0xd440, 0xd444, 0xd45c, 0xd460, 0xd464, 0xd46d,
+  0xd46f, 0xd478, 0xd479, 0xd47c, 0xd47f, 0xd480, 0xd482, 0xd488,
+  0xd489, 0xd48b, 0xd48d, 0xd494, 0xd4a9, 0xd4cc, 0xd4d0, 0xd4d4,
+  0xd4dc, 0xd4df, 0xd4e8, 0xd4ec, 0xd4f0, 0xd4f8, 0xd4fb, 0xd4fd,
+  0xd504, 0xd508, 0xd50c, 0xd514, 0xd515, 0xd517, 0xd53c, 0xd53d,
+  0xd540, 0xd544, 0xd54c, 0xd54d, 0xd54f, 0xd551, 0xd558, 0xd559,
+  0xd55c, 0xd560, 0xd565, 0xd568, 0xd569, 0xd56b, 0xd56d, 0xd574,
+  0xd575, 0xd578, 0xd57c, 0xd584, 0xd585, 0xd587, 0xd588, 0xd589,
+  0xd590, 0xd5a5, 0xd5c8, 0xd5c9, 0xd5cc, 0xd5d0, 0xd5d2, 0xd5d8,
+  0xd5d9, 0xd5db, 0xd5dd, 0xd5e4, 0xd5e5, 0xd5e8, 0xd5ec, 0xd5f4,
+  0xd5f5, 0xd5f7, 0xd5f9, 0xd600, 0xd601, 0xd604, 0xd608, 0xd610,
+  0xd611, 0xd613, 0xd614, 0xd615, 0xd61c, 0xd620,
+  /* 0x48 */
+  0xd624, 0xd62d, 0xd638, 0xd639, 0xd63c, 0xd640, 0xd645, 0xd648,
+  0xd649, 0xd64b, 0xd64d, 0xd651, 0xd654, 0xd655, 0xd658, 0xd65c,
+  0xd667, 0xd669, 0xd670, 0xd671, 0xd674, 0xd683, 0xd685, 0xd68c,
+  0xd68d, 0xd690, 0xd694, 0xd69d, 0xd69f, 0xd6a1, 0xd6a8, 0xd6ac,
+  0xd6b0, 0xd6b9, 0xd6bb, 0xd6c4, 0xd6c5, 0xd6c8, 0xd6cc, 0xd6d1,
+  0xd6d4, 0xd6d7, 0xd6d9, 0xd6e0, 0xd6e4, 0xd6e8, 0xd6f0, 0xd6f5,
+  0xd6fc, 0xd6fd, 0xd700, 0xd704, 0xd711, 0xd718, 0xd719, 0xd71c,
+  0xd720, 0xd728, 0xd729, 0xd72b, 0xd72d, 0xd734, 0xd735, 0xd738,
+  0xd73c, 0xd744, 0xd747, 0xd749, 0xd750, 0xd751, 0xd754, 0xd756,
+  0xd757, 0xd758, 0xd759, 0xd760, 0xd761, 0xd763, 0xd765, 0xd769,
+  0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788, 0xd789,
+  0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d,
+};
+static const unsigned short ksc5601_2uni_page4a[4888] = {
+  /* 0x4a */
+  0x4f3d, 0x4f73, 0x5047, 0x50f9, 0x52a0, 0x53ef, 0x5475, 0x54e5,
+  0x5609, 0x5ac1, 0x5bb6, 0x6687, 0x67b6, 0x67b7, 0x67ef, 0x6b4c,
+  0x73c2, 0x75c2, 0x7a3c, 0x82db, 0x8304, 0x8857, 0x8888, 0x8a36,
+  0x8cc8, 0x8dcf, 0x8efb, 0x8fe6, 0x99d5, 0x523b, 0x5374, 0x5404,
+  0x606a, 0x6164, 0x6bbc, 0x73cf, 0x811a, 0x89ba, 0x89d2, 0x95a3,
+  0x4f83, 0x520a, 0x58be, 0x5978, 0x59e6, 0x5e72, 0x5e79, 0x61c7,
+  0x63c0, 0x6746, 0x67ec, 0x687f, 0x6f97, 0x764e, 0x770b, 0x78f5,
+  0x7a08, 0x7aff, 0x7c21, 0x809d, 0x826e, 0x8271, 0x8aeb, 0x9593,
+  0x4e6b, 0x559d, 0x66f7, 0x6e34, 0x78a3, 0x7aed, 0x845b, 0x8910,
+  0x874e, 0x97a8, 0x52d8, 0x574e, 0x582a, 0x5d4c, 0x611f, 0x61be,
+  0x6221, 0x6562, 0x67d1, 0x6a44, 0x6e1b, 0x7518, 0x75b3, 0x76e3,
+  0x77b0, 0x7d3a, 0x90af, 0x9451, 0x9452, 0x9f95,
+  /* 0x4b */
+  0x5323, 0x5cac, 0x7532, 0x80db, 0x9240, 0x9598, 0x525b, 0x5808,
+  0x59dc, 0x5ca1, 0x5d17, 0x5eb7, 0x5f3a, 0x5f4a, 0x6177, 0x6c5f,
+  0x757a, 0x7586, 0x7ce0, 0x7d73, 0x7db1, 0x7f8c, 0x8154, 0x8221,
+  0x8591, 0x8941, 0x8b1b, 0x92fc, 0x964d, 0x9c47, 0x4ecb, 0x4ef7,
+  0x500b, 0x51f1, 0x584f, 0x6137, 0x613e, 0x6168, 0x6539, 0x69ea,
+  0x6f11, 0x75a5, 0x7686, 0x76d6, 0x7b87, 0x82a5, 0x84cb, 0xf900,
+  0x93a7, 0x958b, 0x5580, 0x5ba2, 0x5751, 0xf901, 0x7cb3, 0x7fb9,
+  0x91b5, 0x5028, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x636e, 0x64da,
+  0x64e7, 0x6e20, 0x70ac, 0x795b, 0x8ddd, 0x8e1e, 0xf902, 0x907d,
+  0x9245, 0x92f8, 0x4e7e, 0x4ef6, 0x5065, 0x5dfe, 0x5efa, 0x6106,
+  0x6957, 0x8171, 0x8654, 0x8e47, 0x9375, 0x9a2b, 0x4e5e, 0x5091,
+  0x6770, 0x6840, 0x5109, 0x528d, 0x5292, 0x6aa2,
+  /* 0x4c */
+  0x77bc, 0x9210, 0x9ed4, 0x52ab, 0x602f, 0x8ff2, 0x5048, 0x61a9,
+  0x63ed, 0x64ca, 0x683c, 0x6a84, 0x6fc0, 0x8188, 0x89a1, 0x9694,
+  0x5805, 0x727d, 0x72ac, 0x7504, 0x7d79, 0x7e6d, 0x80a9, 0x898b,
+  0x8b74, 0x9063, 0x9d51, 0x6289, 0x6c7a, 0x6f54, 0x7d50, 0x7f3a,
+  0x8a23, 0x517c, 0x614a, 0x7b9d, 0x8b19, 0x9257, 0x938c, 0x4eac,
+  0x4fd3, 0x501e, 0x50be, 0x5106, 0x52c1, 0x52cd, 0x537f, 0x5770,
+  0x5883, 0x5e9a, 0x5f91, 0x6176, 0x61ac, 0x64ce, 0x656c, 0x666f,
+  0x66bb, 0x66f4, 0x6897, 0x6d87, 0x7085, 0x70f1, 0x749f, 0x74a5,
+  0x74ca, 0x75d9, 0x786c, 0x78ec, 0x7adf, 0x7af6, 0x7d45, 0x7d93,
+  0x8015, 0x803f, 0x811b, 0x8396, 0x8b66, 0x8f15, 0x9015, 0x93e1,
+  0x9803, 0x9838, 0x9a5a, 0x9be8, 0x4fc2, 0x5553, 0x583a, 0x5951,
+  0x5b63, 0x5c46, 0x60b8, 0x6212, 0x6842, 0x68b0,
+  /* 0x4d */
+  0x68e8, 0x6eaa, 0x754c, 0x7678, 0x78ce, 0x7a3d, 0x7cfb, 0x7e6b,
+  0x7e7c, 0x8a08, 0x8aa1, 0x8c3f, 0x968e, 0x9dc4, 0x53e4, 0x53e9,
+  0x544a, 0x5471, 0x56fa, 0x59d1, 0x5b64, 0x5c3b, 0x5eab, 0x62f7,
+  0x6537, 0x6545, 0x6572, 0x66a0, 0x67af, 0x69c1, 0x6cbd, 0x75fc,
+  0x7690, 0x777e, 0x7a3f, 0x7f94, 0x8003, 0x80a1, 0x818f, 0x82e6,
+  0x82fd, 0x83f0, 0x85c1, 0x8831, 0x88b4, 0x8aa5, 0xf903, 0x8f9c,
+  0x932e, 0x96c7, 0x9867, 0x9ad8, 0x9f13, 0x54ed, 0x659b, 0x66f2,
+  0x688f, 0x7a40, 0x8c37, 0x9d60, 0x56f0, 0x5764, 0x5d11, 0x6606,
+  0x68b1, 0x68cd, 0x6efe, 0x7428, 0x889e, 0x9be4, 0x6c68, 0xf904,
+  0x9aa8, 0x4f9b, 0x516c, 0x5171, 0x529f, 0x5b54, 0x5de5, 0x6050,
+  0x606d, 0x62f1, 0x63a7, 0x653b, 0x73d9, 0x7a7a, 0x86a3, 0x8ca2,
+  0x978f, 0x4e32, 0x5be1, 0x6208, 0x679c, 0x74dc,
+  /* 0x4e */
+  0x79d1, 0x83d3, 0x8a87, 0x8ab2, 0x8de8, 0x904e, 0x934b, 0x9846,
+  0x5ed3, 0x69e8, 0x85ff, 0x90ed, 0xf905, 0x51a0, 0x5b98, 0x5bec,
+  0x6163, 0x68fa, 0x6b3e, 0x704c, 0x742f, 0x74d8, 0x7ba1, 0x7f50,
+  0x83c5, 0x89c0, 0x8cab, 0x95dc, 0x9928, 0x522e, 0x605d, 0x62ec,
+  0x9002, 0x4f8a, 0x5149, 0x5321, 0x58d9, 0x5ee3, 0x66e0, 0x6d38,
+  0x709a, 0x72c2, 0x73d6, 0x7b50, 0x80f1, 0x945b, 0x5366, 0x639b,
+  0x7f6b, 0x4e56, 0x5080, 0x584a, 0x58de, 0x602a, 0x6127, 0x62d0,
+  0x69d0, 0x9b41, 0x5b8f, 0x7d18, 0x80b1, 0x8f5f, 0x4ea4, 0x50d1,
+  0x54ac, 0x55ac, 0x5b0c, 0x5da0, 0x5de7, 0x652a, 0x654e, 0x6821,
+  0x6a4b, 0x72e1, 0x768e, 0x77ef, 0x7d5e, 0x7ff9, 0x81a0, 0x854e,
+  0x86df, 0x8f03, 0x8f4e, 0x90ca, 0x9903, 0x9a55, 0x9bab, 0x4e18,
+  0x4e45, 0x4e5d, 0x4ec7, 0x4ff1, 0x5177, 0x52fe,
+  /* 0x4f */
+  0x5340, 0x53e3, 0x53e5, 0x548e, 0x5614, 0x5775, 0x57a2, 0x5bc7,
+  0x5d87, 0x5ed0, 0x61fc, 0x62d8, 0x6551, 0x67b8, 0x67e9, 0x69cb,
+  0x6b50, 0x6bc6, 0x6bec, 0x6c42, 0x6e9d, 0x7078, 0x72d7, 0x7396,
+  0x7403, 0x77bf, 0x77e9, 0x7a76, 0x7d7f, 0x8009, 0x81fc, 0x8205,
+  0x820a, 0x82df, 0x8862, 0x8b33, 0x8cfc, 0x8ec0, 0x9011, 0x90b1,
+  0x9264, 0x92b6, 0x99d2, 0x9a45, 0x9ce9, 0x9dd7, 0x9f9c, 0x570b,
+  0x5c40, 0x83ca, 0x97a0, 0x97ab, 0x9eb4, 0x541b, 0x7a98, 0x7fa4,
+  0x88d9, 0x8ecd, 0x90e1, 0x5800, 0x5c48, 0x6398, 0x7a9f, 0x5bae,
+  0x5f13, 0x7a79, 0x7aae, 0x828e, 0x8eac, 0x5026, 0x5238, 0x52f8,
+  0x5377, 0x5708, 0x62f3, 0x6372, 0x6b0a, 0x6dc3, 0x7737, 0x53a5,
+  0x7357, 0x8568, 0x8e76, 0x95d5, 0x673a, 0x6ac3, 0x6f70, 0x8a6d,
+  0x8ecc, 0x994b, 0xf906, 0x6677, 0x6b78, 0x8cb4,
+  /* 0x50 */
+  0x9b3c, 0xf907, 0x53eb, 0x572d, 0x594e, 0x63c6, 0x69fb, 0x73ea,
+  0x7845, 0x7aba, 0x7ac5, 0x7cfe, 0x8475, 0x898f, 0x8d73, 0x9035,
+  0x95a8, 0x52fb, 0x5747, 0x7547, 0x7b60, 0x83cc, 0x921e, 0xf908,
+  0x6a58, 0x514b, 0x524b, 0x5287, 0x621f, 0x68d8, 0x6975, 0x9699,
+  0x50c5, 0x52a4, 0x52e4, 0x61c3, 0x65a4, 0x6839, 0x69ff, 0x747e,
+  0x7b4b, 0x82b9, 0x83eb, 0x89b2, 0x8b39, 0x8fd1, 0x9949, 0xf909,
+  0x4eca, 0x5997, 0x64d2, 0x6611, 0x6a8e, 0x7434, 0x7981, 0x79bd,
+  0x82a9, 0x887e, 0x887f, 0x895f, 0xf90a, 0x9326, 0x4f0b, 0x53ca,
+  0x6025, 0x6271, 0x6c72, 0x7d1a, 0x7d66, 0x4e98, 0x5162, 0x77dc,
+  0x80af, 0x4f01, 0x4f0e, 0x5176, 0x5180, 0x55dc, 0x5668, 0x573b,
+  0x57fa, 0x57fc, 0x5914, 0x5947, 0x5993, 0x5bc4, 0x5c90, 0x5d0e,
+  0x5df1, 0x5e7e, 0x5fcc, 0x6280, 0x65d7, 0x65e3,
+  /* 0x51 */
+  0x671e, 0x671f, 0x675e, 0x68cb, 0x68c4, 0x6a5f, 0x6b3a, 0x6c23,
+  0x6c7d, 0x6c82, 0x6dc7, 0x7398, 0x7426, 0x742a, 0x7482, 0x74a3,
+  0x7578, 0x757f, 0x7881, 0x78ef, 0x7941, 0x7947, 0x7948, 0x797a,
+  0x7b95, 0x7d00, 0x7dba, 0x7f88, 0x8006, 0x802d, 0x808c, 0x8a18,
+  0x8b4f, 0x8c48, 0x8d77, 0x9321, 0x9324, 0x98e2, 0x9951, 0x9a0e,
+  0x9a0f, 0x9a65, 0x9e92, 0x7dca, 0x4f76, 0x5409, 0x62ee, 0x6854,
+  0x91d1, 0x55ab, 0x513a, 0xf90b, 0xf90c, 0x5a1c, 0x61e6, 0xf90d,
+  0x62cf, 0x62ff, 0xf90e, 0xf90f, 0xf910, 0xf911, 0xf912, 0xf913,
+  0x90a3, 0xf914, 0xf915, 0xf916, 0xf917, 0xf918, 0x8afe, 0xf919,
+  0xf91a, 0xf91b, 0xf91c, 0x6696, 0xf91d, 0x7156, 0xf91e, 0xf91f,
+  0x96e3, 0xf920, 0x634f, 0x637a, 0x5357, 0xf921, 0x678f, 0x6960,
+  0x6e73, 0xf922, 0x7537, 0xf923, 0xf924, 0xf925,
+  /* 0x52 */
+  0x7d0d, 0xf926, 0xf927, 0x8872, 0x56ca, 0x5a18, 0xf928, 0xf929,
+  0xf92a, 0xf92b, 0xf92c, 0x4e43, 0xf92d, 0x5167, 0x5948, 0x67f0,
+  0x8010, 0xf92e, 0x5973, 0x5e74, 0x649a, 0x79ca, 0x5ff5, 0x606c,
+  0x62c8, 0x637b, 0x5be7, 0x5bd7, 0x52aa, 0xf92f, 0x5974, 0x5f29,
+  0x6012, 0xf930, 0xf931, 0xf932, 0x7459, 0xf933, 0xf934, 0xf935,
+  0xf936, 0xf937, 0xf938, 0x99d1, 0xf939, 0xf93a, 0xf93b, 0xf93c,
+  0xf93d, 0xf93e, 0xf93f, 0xf940, 0xf941, 0xf942, 0xf943, 0x6fc3,
+  0xf944, 0xf945, 0x81bf, 0x8fb2, 0x60f1, 0xf946, 0xf947, 0x8166,
+  0xf948, 0xf949, 0x5c3f, 0xf94a, 0xf94b, 0xf94c, 0xf94d, 0xf94e,
+  0xf94f, 0xf950, 0xf951, 0x5ae9, 0x8a25, 0x677b, 0x7d10, 0xf952,
+  0xf953, 0xf954, 0xf955, 0xf956, 0xf957, 0x80fd, 0xf958, 0xf959,
+  0x5c3c, 0x6ce5, 0x533f, 0x6eba, 0x591a, 0x8336,
+  /* 0x53 */
+  0x4e39, 0x4eb6, 0x4f46, 0x55ae, 0x5718, 0x58c7, 0x5f56, 0x65b7,
+  0x65e6, 0x6a80, 0x6bb5, 0x6e4d, 0x77ed, 0x7aef, 0x7c1e, 0x7dde,
+  0x86cb, 0x8892, 0x9132, 0x935b, 0x64bb, 0x6fbe, 0x737a, 0x75b8,
+  0x9054, 0x5556, 0x574d, 0x61ba, 0x64d4, 0x66c7, 0x6de1, 0x6e5b,
+  0x6f6d, 0x6fb9, 0x75f0, 0x8043, 0x81bd, 0x8541, 0x8983, 0x8ac7,
+  0x8b5a, 0x931f, 0x6c93, 0x7553, 0x7b54, 0x8e0f, 0x905d, 0x5510,
+  0x5802, 0x5858, 0x5e62, 0x6207, 0x649e, 0x68e0, 0x7576, 0x7cd6,
+  0x87b3, 0x9ee8, 0x4ee3, 0x5788, 0x576e, 0x5927, 0x5c0d, 0x5cb1,
+  0x5e36, 0x5f85, 0x6234, 0x64e1, 0x73b3, 0x81fa, 0x888b, 0x8cb8,
+  0x968a, 0x9edb, 0x5b85, 0x5fb7, 0x60b3, 0x5012, 0x5200, 0x5230,
+  0x5716, 0x5835, 0x5857, 0x5c0e, 0x5c60, 0x5cf6, 0x5d8b, 0x5ea6,
+  0x5f92, 0x60bc, 0x6311, 0x6389, 0x6417, 0x6843,
+  /* 0x54 */
+  0x68f9, 0x6ac2, 0x6dd8, 0x6e21, 0x6ed4, 0x6fe4, 0x71fe, 0x76dc,
+  0x7779, 0x79b1, 0x7a3b, 0x8404, 0x89a9, 0x8ced, 0x8df3, 0x8e48,
+  0x9003, 0x9014, 0x9053, 0x90fd, 0x934d, 0x9676, 0x97dc, 0x6bd2,
+  0x7006, 0x7258, 0x72a2, 0x7368, 0x7763, 0x79bf, 0x7be4, 0x7e9b,
+  0x8b80, 0x58a9, 0x60c7, 0x6566, 0x65fd, 0x66be, 0x6c8c, 0x711e,
+  0x71c9, 0x8c5a, 0x9813, 0x4e6d, 0x7a81, 0x4edd, 0x51ac, 0x51cd,
+  0x52d5, 0x540c, 0x61a7, 0x6771, 0x6850, 0x68df, 0x6d1e, 0x6f7c,
+  0x75bc, 0x77b3, 0x7ae5, 0x80f4, 0x8463, 0x9285, 0x515c, 0x6597,
+  0x675c, 0x6793, 0x75d8, 0x7ac7, 0x8373, 0xf95a, 0x8c46, 0x9017,
+  0x982d, 0x5c6f, 0x81c0, 0x829a, 0x9041, 0x906f, 0x920d, 0x5f97,
+  0x5d9d, 0x6a59, 0x71c8, 0x767b, 0x7b49, 0x85e4, 0x8b04, 0x9127,
+  0x9a30, 0x5587, 0x61f6, 0xf95b, 0x7669, 0x7f85,
+  /* 0x55 */
+  0x863f, 0x87ba, 0x88f8, 0x908f, 0xf95c, 0x6d1b, 0x70d9, 0x73de,
+  0x7d61, 0x843d, 0xf95d, 0x916a, 0x99f1, 0xf95e, 0x4e82, 0x5375,
+  0x6b04, 0x6b12, 0x703e, 0x721b, 0x862d, 0x9e1e, 0x524c, 0x8fa3,
+  0x5d50, 0x64e5, 0x652c, 0x6b16, 0x6feb, 0x7c43, 0x7e9c, 0x85cd,
+  0x8964, 0x89bd, 0x62c9, 0x81d8, 0x881f, 0x5eca, 0x6717, 0x6d6a,
+  0x72fc, 0x7405, 0x746f, 0x8782, 0x90de, 0x4f86, 0x5d0d, 0x5fa0,
+  0x840a, 0x51b7, 0x63a0, 0x7565, 0x4eae, 0x5006, 0x5169, 0x51c9,
+  0x6881, 0x6a11, 0x7cae, 0x7cb1, 0x7ce7, 0x826f, 0x8ad2, 0x8f1b,
+  0x91cf, 0x4fb6, 0x5137, 0x52f5, 0x5442, 0x5eec, 0x616e, 0x623e,
+  0x65c5, 0x6ada, 0x6ffe, 0x792a, 0x85dc, 0x8823, 0x95ad, 0x9a62,
+  0x9a6a, 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x701d, 0x792b,
+  0x8f62, 0x9742, 0x6190, 0x6200, 0x6523, 0x6f23,
+  /* 0x56 */
+  0x7149, 0x7489, 0x7df4, 0x806f, 0x84ee, 0x8f26, 0x9023, 0x934a,
+  0x51bd, 0x5217, 0x52a3, 0x6d0c, 0x70c8, 0x88c2, 0x5ec9, 0x6582,
+  0x6bae, 0x6fc2, 0x7c3e, 0x7375, 0x4ee4, 0x4f36, 0x56f9, 0xf95f,
+  0x5cba, 0x5dba, 0x601c, 0x73b2, 0x7b2d, 0x7f9a, 0x7fce, 0x8046,
+  0x901e, 0x9234, 0x96f6, 0x9748, 0x9818, 0x9f61, 0x4f8b, 0x6fa7,
+  0x79ae, 0x91b4, 0x96b7, 0x52de, 0xf960, 0x6488, 0x64c4, 0x6ad3,
+  0x6f5e, 0x7018, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, 0x8def,
+  0x8f05, 0x9732, 0x9b6f, 0x9dfa, 0x9e75, 0x788c, 0x797f, 0x7da0,
+  0x83c9, 0x9304, 0x9e7f, 0x9e93, 0x8ad6, 0x58df, 0x5f04, 0x6727,
+  0x7027, 0x74cf, 0x7c60, 0x807e, 0x5121, 0x7028, 0x7262, 0x78ca,
+  0x8cc2, 0x8cda, 0x8cf4, 0x96f7, 0x4e86, 0x50da, 0x5bee, 0x5ed6,
+  0x6599, 0x71ce, 0x7642, 0x77ad, 0x804a, 0x84fc,
+  /* 0x57 */
+  0x907c, 0x9b27, 0x9f8d, 0x58d8, 0x5a41, 0x5c62, 0x6a13, 0x6dda,
+  0x6f0f, 0x763b, 0x7d2f, 0x7e37, 0x851e, 0x8938, 0x93e4, 0x964b,
+  0x5289, 0x65d2, 0x67f3, 0x69b4, 0x6d41, 0x6e9c, 0x700f, 0x7409,
+  0x7460, 0x7559, 0x7624, 0x786b, 0x8b2c, 0x985e, 0x516d, 0x622e,
+  0x9678, 0x4f96, 0x502b, 0x5d19, 0x6dea, 0x7db8, 0x8f2a, 0x5f8b,
+  0x6144, 0x6817, 0xf961, 0x9686, 0x52d2, 0x808b, 0x51dc, 0x51cc,
+  0x695e, 0x7a1c, 0x7dbe, 0x83f1, 0x9675, 0x4fda, 0x5229, 0x5398,
+  0x540f, 0x550e, 0x5c65, 0x60a7, 0x674e, 0x68a8, 0x6d6c, 0x7281,
+  0x72f8, 0x7406, 0x7483, 0xf962, 0x75e2, 0x7c6c, 0x7f79, 0x7fb8,
+  0x8389, 0x88cf, 0x88e1, 0x91cc, 0x91d0, 0x96e2, 0x9bc9, 0x541d,
+  0x6f7e, 0x71d0, 0x7498, 0x85fa, 0x8eaa, 0x96a3, 0x9c57, 0x9e9f,
+  0x6797, 0x6dcb, 0x7433, 0x81e8, 0x9716, 0x782c,
+  /* 0x58 */
+  0x7acb, 0x7b20, 0x7c92, 0x6469, 0x746a, 0x75f2, 0x78bc, 0x78e8,
+  0x99ac, 0x9b54, 0x9ebb, 0x5bde, 0x5e55, 0x6f20, 0x819c, 0x83ab,
+  0x9088, 0x4e07, 0x534d, 0x5a29, 0x5dd2, 0x5f4e, 0x6162, 0x633d,
+  0x6669, 0x66fc, 0x6eff, 0x6f2b, 0x7063, 0x779e, 0x842c, 0x8513,
+  0x883b, 0x8f13, 0x9945, 0x9c3b, 0x551c, 0x62b9, 0x672b, 0x6cab,
+  0x8309, 0x896a, 0x977a, 0x4ea1, 0x5984, 0x5fd8, 0x5fd9, 0x671b,
+  0x7db2, 0x7f54, 0x8292, 0x832b, 0x83bd, 0x8f1e, 0x9099, 0x57cb,
+  0x59b9, 0x5a92, 0x5bd0, 0x6627, 0x679a, 0x6885, 0x6bcf, 0x7164,
+  0x7f75, 0x8cb7, 0x8ce3, 0x9081, 0x9b45, 0x8108, 0x8c8a, 0x964c,
+  0x9a40, 0x9ea5, 0x5b5f, 0x6c13, 0x731b, 0x76f2, 0x76df, 0x840c,
+  0x51aa, 0x8993, 0x514d, 0x5195, 0x52c9, 0x68c9, 0x6c94, 0x7704,
+  0x7720, 0x7dbf, 0x7dec, 0x9762, 0x9eb5, 0x6ec5,
+  /* 0x59 */
+  0x8511, 0x51a5, 0x540d, 0x547d, 0x660e, 0x669d, 0x6927, 0x6e9f,
+  0x76bf, 0x7791, 0x8317, 0x84c2, 0x879f, 0x9169, 0x9298, 0x9cf4,
+  0x8882, 0x4fae, 0x5192, 0x52df, 0x59c6, 0x5e3d, 0x6155, 0x6478,
+  0x6479, 0x66ae, 0x67d0, 0x6a21, 0x6bcd, 0x6bdb, 0x725f, 0x7261,
+  0x7441, 0x7738, 0x77db, 0x8017, 0x82bc, 0x8305, 0x8b00, 0x8b28,
+  0x8c8c, 0x6728, 0x6c90, 0x7267, 0x76ee, 0x7766, 0x7a46, 0x9da9,
+  0x6b7f, 0x6c92, 0x5922, 0x6726, 0x8499, 0x536f, 0x5893, 0x5999,
+  0x5edf, 0x63cf, 0x6634, 0x6773, 0x6e3a, 0x732b, 0x7ad7, 0x82d7,
+  0x9328, 0x52d9, 0x5deb, 0x61ae, 0x61cb, 0x620a, 0x62c7, 0x64ab,
+  0x65e0, 0x6959, 0x6b66, 0x6bcb, 0x7121, 0x73f7, 0x755d, 0x7e46,
+  0x821e, 0x8302, 0x856a, 0x8aa3, 0x8cbf, 0x9727, 0x9d61, 0x58a8,
+  0x9ed8, 0x5011, 0x520e, 0x543b, 0x554f, 0x6587,
+  /* 0x5a */
+  0x6c76, 0x7d0a, 0x7d0b, 0x805e, 0x868a, 0x9580, 0x96ef, 0x52ff,
+  0x6c95, 0x7269, 0x5473, 0x5a9a, 0x5c3e, 0x5d4b, 0x5f4c, 0x5fae,
+  0x672a, 0x68b6, 0x6963, 0x6e3c, 0x6e44, 0x7709, 0x7c73, 0x7f8e,
+  0x8587, 0x8b0e, 0x8ff7, 0x9761, 0x9ef4, 0x5cb7, 0x60b6, 0x610d,
+  0x61ab, 0x654f, 0x65fb, 0x65fc, 0x6c11, 0x6cef, 0x739f, 0x73c9,
+  0x7de1, 0x9594, 0x5bc6, 0x871c, 0x8b10, 0x525d, 0x535a, 0x62cd,
+  0x640f, 0x64b2, 0x6734, 0x6a38, 0x6cca, 0x73c0, 0x749e, 0x7b94,
+  0x7c95, 0x7e1b, 0x818a, 0x8236, 0x8584, 0x8feb, 0x96f9, 0x99c1,
+  0x4f34, 0x534a, 0x53cd, 0x53db, 0x62cc, 0x642c, 0x6500, 0x6591,
+  0x69c3, 0x6cee, 0x6f58, 0x73ed, 0x7554, 0x7622, 0x76e4, 0x76fc,
+  0x78d0, 0x78fb, 0x792c, 0x7d46, 0x822c, 0x87e0, 0x8fd4, 0x9812,
+  0x98ef, 0x52c3, 0x62d4, 0x64a5, 0x6e24, 0x6f51,
+  /* 0x5b */
+  0x767c, 0x8dcb, 0x91b1, 0x9262, 0x9aee, 0x9b43, 0x5023, 0x508d,
+  0x574a, 0x59a8, 0x5c28, 0x5e47, 0x5f77, 0x623f, 0x653e, 0x65b9,
+  0x65c1, 0x6609, 0x678b, 0x699c, 0x6ec2, 0x78c5, 0x7d21, 0x80aa,
+  0x8180, 0x822b, 0x82b3, 0x84a1, 0x868c, 0x8a2a, 0x8b17, 0x90a6,
+  0x9632, 0x9f90, 0x500d, 0x4ff3, 0xf963, 0x57f9, 0x5f98, 0x62dc,
+  0x6392, 0x676f, 0x6e43, 0x7119, 0x76c3, 0x80cc, 0x80da, 0x88f4,
+  0x88f5, 0x8919, 0x8ce0, 0x8f29, 0x914d, 0x966a, 0x4f2f, 0x4f70,
+  0x5e1b, 0x67cf, 0x6822, 0x767d, 0x767e, 0x9b44, 0x5e61, 0x6a0a,
+  0x7169, 0x71d4, 0x756a, 0xf964, 0x7e41, 0x8543, 0x85e9, 0x98dc,
+  0x4f10, 0x7b4f, 0x7f70, 0x95a5, 0x51e1, 0x5e06, 0x68b5, 0x6c3e,
+  0x6c4e, 0x6cdb, 0x72af, 0x7bc4, 0x8303, 0x6cd5, 0x743a, 0x50fb,
+  0x5288, 0x58c1, 0x64d8, 0x6a97, 0x74a7, 0x7656,
+  /* 0x5c */
+  0x78a7, 0x8617, 0x95e2, 0x9739, 0xf965, 0x535e, 0x5f01, 0x8b8a,
+  0x8fa8, 0x8faf, 0x908a, 0x5225, 0x77a5, 0x9c49, 0x9f08, 0x4e19,
+  0x5002, 0x5175, 0x5c5b, 0x5e77, 0x661e, 0x663a, 0x67c4, 0x68c5,
+  0x70b3, 0x7501, 0x75c5, 0x79c9, 0x7add, 0x8f27, 0x9920, 0x9a08,
+  0x4fdd, 0x5821, 0x5831, 0x5bf6, 0x666e, 0x6b65, 0x6d11, 0x6e7a,
+  0x6f7d, 0x73e4, 0x752b, 0x83e9, 0x88dc, 0x8913, 0x8b5c, 0x8f14,
+  0x4f0f, 0x50d5, 0x5310, 0x535c, 0x5b93, 0x5fa9, 0x670d, 0x798f,
+  0x8179, 0x832f, 0x8514, 0x8907, 0x8986, 0x8f39, 0x8f3b, 0x99a5,
+  0x9c12, 0x672c, 0x4e76, 0x4ff8, 0x5949, 0x5c01, 0x5cef, 0x5cf0,
+  0x6367, 0x68d2, 0x70fd, 0x71a2, 0x742b, 0x7e2b, 0x84ec, 0x8702,
+  0x9022, 0x92d2, 0x9cf3, 0x4e0d, 0x4ed8, 0x4fef, 0x5085, 0x5256,
+  0x526f, 0x5426, 0x5490, 0x57e0, 0x592b, 0x5a66,
+  /* 0x5d */
+  0x5b5a, 0x5b75, 0x5bcc, 0x5e9c, 0xf966, 0x6276, 0x6577, 0x65a7,
+  0x6d6e, 0x6ea5, 0x7236, 0x7b26, 0x7c3f, 0x7f36, 0x8150, 0x8151,
+  0x819a, 0x8240, 0x8299, 0x83a9, 0x8a03, 0x8ca0, 0x8ce6, 0x8cfb,
+  0x8d74, 0x8dba, 0x90e8, 0x91dc, 0x961c, 0x9644, 0x99d9, 0x9ce7,
+  0x5317, 0x5206, 0x5429, 0x5674, 0x58b3, 0x5954, 0x596e, 0x5fff,
+  0x61a4, 0x626e, 0x6610, 0x6c7e, 0x711a, 0x76c6, 0x7c89, 0x7cde,
+  0x7d1b, 0x82ac, 0x8cc1, 0x96f0, 0xf967, 0x4f5b, 0x5f17, 0x5f7f,
+  0x62c2, 0x5d29, 0x670b, 0x68da, 0x787c, 0x7e43, 0x9d6c, 0x4e15,
+  0x5099, 0x5315, 0x532a, 0x5351, 0x5983, 0x5a62, 0x5e87, 0x60b2,
+  0x618a, 0x6249, 0x6279, 0x6590, 0x6787, 0x69a7, 0x6bd4, 0x6bd6,
+  0x6bd7, 0x6bd8, 0x6cb8, 0xf968, 0x7435, 0x75fa, 0x7812, 0x7891,
+  0x79d5, 0x79d8, 0x7c83, 0x7dcb, 0x7fe1, 0x80a5,
+  /* 0x5e */
+  0x813e, 0x81c2, 0x83f2, 0x871a, 0x88e8, 0x8ab9, 0x8b6c, 0x8cbb,
+  0x9119, 0x975e, 0x98db, 0x9f3b, 0x56ac, 0x5b2a, 0x5f6c, 0x658c,
+  0x6ab3, 0x6baf, 0x6d5c, 0x6ff1, 0x7015, 0x725d, 0x73ad, 0x8ca7,
+  0x8cd3, 0x983b, 0x6191, 0x6c37, 0x8058, 0x9a01, 0x4e4d, 0x4e8b,
+  0x4e9b, 0x4ed5, 0x4f3a, 0x4f3c, 0x4f7f, 0x4fdf, 0x50ff, 0x53f2,
+  0x53f8, 0x5506, 0x55e3, 0x56db, 0x58eb, 0x5962, 0x5a11, 0x5beb,
+  0x5bfa, 0x5c04, 0x5df3, 0x5e2b, 0x5f99, 0x601d, 0x6368, 0x659c,
+  0x65af, 0x67f6, 0x67fb, 0x68ad, 0x6b7b, 0x6c99, 0x6cd7, 0x6e23,
+  0x7009, 0x7345, 0x7802, 0x793e, 0x7940, 0x7960, 0x79c1, 0x7be9,
+  0x7d17, 0x7d72, 0x8086, 0x820d, 0x838e, 0x84d1, 0x86c7, 0x88df,
+  0x8a50, 0x8a5e, 0x8b1d, 0x8cdc, 0x8d66, 0x8fad, 0x90aa, 0x98fc,
+  0x99df, 0x9e9d, 0x524a, 0xf969, 0x6714, 0xf96a,
+  /* 0x5f */
+  0x5098, 0x522a, 0x5c71, 0x6563, 0x6c55, 0x73ca, 0x7523, 0x759d,
+  0x7b97, 0x849c, 0x9178, 0x9730, 0x4e77, 0x6492, 0x6bba, 0x715e,
+  0x85a9, 0x4e09, 0xf96b, 0x6749, 0x68ee, 0x6e17, 0x829f, 0x8518,
+  0x886b, 0x63f7, 0x6f81, 0x9212, 0x98af, 0x4e0a, 0x50b7, 0x50cf,
+  0x511f, 0x5546, 0x55aa, 0x5617, 0x5b40, 0x5c19, 0x5ce0, 0x5e38,
+  0x5e8a, 0x5ea0, 0x5ec2, 0x60f3, 0x6851, 0x6a61, 0x6e58, 0x723d,
+  0x7240, 0x72c0, 0x76f8, 0x7965, 0x7bb1, 0x7fd4, 0x88f3, 0x89f4,
+  0x8a73, 0x8c61, 0x8cde, 0x971c, 0x585e, 0x74bd, 0x8cfd, 0x55c7,
+  0xf96c, 0x7a61, 0x7d22, 0x8272, 0x7272, 0x751f, 0x7525, 0xf96d,
+  0x7b19, 0x5885, 0x58fb, 0x5dbc, 0x5e8f, 0x5eb6, 0x5f90, 0x6055,
+  0x6292, 0x637f, 0x654d, 0x6691, 0x66d9, 0x66f8, 0x6816, 0x68f2,
+  0x7280, 0x745e, 0x7b6e, 0x7d6e, 0x7dd6, 0x7f72,
+  /* 0x60 */
+  0x80e5, 0x8212, 0x85af, 0x897f, 0x8a93, 0x901d, 0x92e4, 0x9ecd,
+  0x9f20, 0x5915, 0x596d, 0x5e2d, 0x60dc, 0x6614, 0x6673, 0x6790,
+  0x6c50, 0x6dc5, 0x6f5f, 0x77f3, 0x78a9, 0x84c6, 0x91cb, 0x932b,
+  0x4ed9, 0x50ca, 0x5148, 0x5584, 0x5b0b, 0x5ba3, 0x6247, 0x657e,
+  0x65cb, 0x6e32, 0x717d, 0x7401, 0x7444, 0x7487, 0x74bf, 0x766c,
+  0x79aa, 0x7dda, 0x7e55, 0x7fa8, 0x817a, 0x81b3, 0x8239, 0x861a,
+  0x87ec, 0x8a75, 0x8de3, 0x9078, 0x9291, 0x9425, 0x994d, 0x9bae,
+  0x5368, 0x5c51, 0x6954, 0x6cc4, 0x6d29, 0x6e2b, 0x820c, 0x859b,
+  0x893b, 0x8a2d, 0x8aaa, 0x96ea, 0x9f67, 0x5261, 0x66b9, 0x6bb2,
+  0x7e96, 0x87fe, 0x8d0d, 0x9583, 0x965d, 0x651d, 0x6d89, 0x71ee,
+  0xf96e, 0x57ce, 0x59d3, 0x5bac, 0x6027, 0x60fa, 0x6210, 0x661f,
+  0x665f, 0x7329, 0x73f9, 0x76db, 0x7701, 0x7b6c,
+  /* 0x61 */
+  0x8056, 0x8072, 0x8165, 0x8aa0, 0x9192, 0x4e16, 0x52e2, 0x6b72,
+  0x6d17, 0x7a05, 0x7b39, 0x7d30, 0xf96f, 0x8cb0, 0x53ec, 0x562f,
+  0x5851, 0x5bb5, 0x5c0f, 0x5c11, 0x5de2, 0x6240, 0x6383, 0x6414,
+  0x662d, 0x68b3, 0x6cbc, 0x6d88, 0x6eaf, 0x701f, 0x70a4, 0x71d2,
+  0x7526, 0x758f, 0x758e, 0x7619, 0x7b11, 0x7be0, 0x7c2b, 0x7d20,
+  0x7d39, 0x852c, 0x856d, 0x8607, 0x8a34, 0x900d, 0x9061, 0x90b5,
+  0x92b7, 0x97f6, 0x9a37, 0x4fd7, 0x5c6c, 0x675f, 0x6d91, 0x7c9f,
+  0x7e8c, 0x8b16, 0x8d16, 0x901f, 0x5b6b, 0x5dfd, 0x640d, 0x84c0,
+  0x905c, 0x98e1, 0x7387, 0x5b8b, 0x609a, 0x677e, 0x6dde, 0x8a1f,
+  0x8aa6, 0x9001, 0x980c, 0x5237, 0xf970, 0x7051, 0x788e, 0x9396,
+  0x8870, 0x91d7, 0x4fee, 0x53d7, 0x55fd, 0x56da, 0x5782, 0x58fd,
+  0x5ac2, 0x5b88, 0x5cab, 0x5cc0, 0x5e25, 0x6101,
+  /* 0x62 */
+  0x620d, 0x624b, 0x6388, 0x641c, 0x6536, 0x6578, 0x6a39, 0x6b8a,
+  0x6c34, 0x6d19, 0x6f31, 0x71e7, 0x72e9, 0x7378, 0x7407, 0x74b2,
+  0x7626, 0x7761, 0x79c0, 0x7a57, 0x7aea, 0x7cb9, 0x7d8f, 0x7dac,
+  0x7e61, 0x7f9e, 0x8129, 0x8331, 0x8490, 0x84da, 0x85ea, 0x8896,
+  0x8ab0, 0x8b90, 0x8f38, 0x9042, 0x9083, 0x916c, 0x9296, 0x92b9,
+  0x968b, 0x96a7, 0x96a8, 0x96d6, 0x9700, 0x9808, 0x9996, 0x9ad3,
+  0x9b1a, 0x53d4, 0x587e, 0x5919, 0x5b70, 0x5bbf, 0x6dd1, 0x6f5a,
+  0x719f, 0x7421, 0x74b9, 0x8085, 0x83fd, 0x5de1, 0x5f87, 0x5faa,
+  0x6042, 0x65ec, 0x6812, 0x696f, 0x6a53, 0x6b89, 0x6d35, 0x6df3,
+  0x73e3, 0x76fe, 0x77ac, 0x7b4d, 0x7d14, 0x8123, 0x821c, 0x8340,
+  0x84f4, 0x8563, 0x8a62, 0x8ac4, 0x9187, 0x931e, 0x9806, 0x99b4,
+  0x620c, 0x8853, 0x8ff0, 0x9265, 0x5d07, 0x5d27,
+  /* 0x63 */
+  0x5d69, 0x745f, 0x819d, 0x8768, 0x6fd5, 0x62fe, 0x7fd2, 0x8936,
+  0x8972, 0x4e1e, 0x4e58, 0x50e7, 0x52dd, 0x5347, 0x627f, 0x6607,
+  0x7e69, 0x8805, 0x965e, 0x4f8d, 0x5319, 0x5636, 0x59cb, 0x5aa4,
+  0x5c38, 0x5c4e, 0x5c4d, 0x5e02, 0x5f11, 0x6043, 0x65bd, 0x662f,
+  0x6642, 0x67be, 0x67f4, 0x731c, 0x77e2, 0x793a, 0x7fc5, 0x8494,
+  0x84cd, 0x8996, 0x8a66, 0x8a69, 0x8ae1, 0x8c55, 0x8c7a, 0x57f4,
+  0x5bd4, 0x5f0f, 0x606f, 0x62ed, 0x690d, 0x6b96, 0x6e5c, 0x7184,
+  0x7bd2, 0x8755, 0x8b58, 0x8efe, 0x98df, 0x98fe, 0x4f38, 0x4f81,
+  0x4fe1, 0x547b, 0x5a20, 0x5bb8, 0x613c, 0x65b0, 0x6668, 0x71fc,
+  0x7533, 0x795e, 0x7d33, 0x814e, 0x81e3, 0x8398, 0x85aa, 0x85ce,
+  0x8703, 0x8a0a, 0x8eab, 0x8f9b, 0xf971, 0x8fc5, 0x5931, 0x5ba4,
+  0x5be6, 0x6089, 0x5be9, 0x5c0b, 0x5fc3, 0x6c81,
+  /* 0x64 */
+  0xf972, 0x6df1, 0x700b, 0x751a, 0x82af, 0x8af6, 0x4ec0, 0x5341,
+  0xf973, 0x96d9, 0x6c0f, 0x4e9e, 0x4fc4, 0x5152, 0x555e, 0x5a25,
+  0x5ce8, 0x6211, 0x7259, 0x82bd, 0x83aa, 0x86fe, 0x8859, 0x8a1d,
+  0x963f, 0x96c5, 0x9913, 0x9d09, 0x9d5d, 0x580a, 0x5cb3, 0x5dbd,
+  0x5e44, 0x60e1, 0x6115, 0x63e1, 0x6a02, 0x6e25, 0x9102, 0x9354,
+  0x984e, 0x9c10, 0x9f77, 0x5b89, 0x5cb8, 0x6309, 0x664f, 0x6848,
+  0x773c, 0x96c1, 0x978d, 0x9854, 0x9b9f, 0x65a1, 0x8b01, 0x8ecb,
+  0x95bc, 0x5535, 0x5ca9, 0x5dd6, 0x5eb5, 0x6697, 0x764c, 0x83f4,
+  0x95c7, 0x58d3, 0x62bc, 0x72ce, 0x9d28, 0x4ef0, 0x592e, 0x600f,
+  0x663b, 0x6b83, 0x79e7, 0x9d26, 0x5393, 0x54c0, 0x57c3, 0x5d16,
+  0x611b, 0x66d6, 0x6daf, 0x788d, 0x827e, 0x9698, 0x9744, 0x5384,
+  0x627c, 0x6396, 0x6db2, 0x7e0a, 0x814b, 0x984d,
+  /* 0x65 */
+  0x6afb, 0x7f4c, 0x9daf, 0x9e1a, 0x4e5f, 0x503b, 0x51b6, 0x591c,
+  0x60f9, 0x63f6, 0x6930, 0x723a, 0x8036, 0xf974, 0x91ce, 0x5f31,
+  0xf975, 0xf976, 0x7d04, 0x82e5, 0x846f, 0x84bb, 0x85e5, 0x8e8d,
+  0xf977, 0x4f6f, 0xf978, 0xf979, 0x58e4, 0x5b43, 0x6059, 0x63da,
+  0x6518, 0x656d, 0x6698, 0xf97a, 0x694a, 0x6a23, 0x6d0b, 0x7001,
+  0x716c, 0x75d2, 0x760d, 0x79b3, 0x7a70, 0xf97b, 0x7f8a, 0xf97c,
+  0x8944, 0xf97d, 0x8b93, 0x91c0, 0x967d, 0xf97e, 0x990a, 0x5704,
+  0x5fa1, 0x65bc, 0x6f01, 0x7600, 0x79a6, 0x8a9e, 0x99ad, 0x9b5a,
+  0x9f6c, 0x5104, 0x61b6, 0x6291, 0x6a8d, 0x81c6, 0x5043, 0x5830,
+  0x5f66, 0x7109, 0x8a00, 0x8afa, 0x5b7c, 0x8616, 0x4ffa, 0x513c,
+  0x56b4, 0x5944, 0x63a9, 0x6df9, 0x5daa, 0x696d, 0x5186, 0x4e88,
+  0x4f59, 0xf97f, 0xf980, 0xf981, 0x5982, 0xf982,
+  /* 0x66 */
+  0xf983, 0x6b5f, 0x6c5d, 0xf984, 0x74b5, 0x7916, 0xf985, 0x8207,
+  0x8245, 0x8339, 0x8f3f, 0x8f5d, 0xf986, 0x9918, 0xf987, 0xf988,
+  0xf989, 0x4ea6, 0xf98a, 0x57df, 0x5f79, 0x6613, 0xf98b, 0xf98c,
+  0x75ab, 0x7e79, 0x8b6f, 0xf98d, 0x9006, 0x9a5b, 0x56a5, 0x5827,
+  0x59f8, 0x5a1f, 0x5bb4, 0xf98e, 0x5ef6, 0xf98f, 0xf990, 0x6350,
+  0x633b, 0xf991, 0x693d, 0x6c87, 0x6cbf, 0x6d8e, 0x6d93, 0x6df5,
+  0x6f14, 0xf992, 0x70df, 0x7136, 0x7159, 0xf993, 0x71c3, 0x71d5,
+  0xf994, 0x784f, 0x786f, 0xf995, 0x7b75, 0x7de3, 0xf996, 0x7e2f,
+  0xf997, 0x884d, 0x8edf, 0xf998, 0xf999, 0xf99a, 0x925b, 0xf99b,
+  0x9cf6, 0xf99c, 0xf99d, 0xf99e, 0x6085, 0x6d85, 0xf99f, 0x71b1,
+  0xf9a0, 0xf9a1, 0x95b1, 0x53ad, 0xf9a2, 0xf9a3, 0xf9a4, 0x67d3,
+  0xf9a5, 0x708e, 0x7130, 0x7430, 0x8276, 0x82d2,
+  /* 0x67 */
+  0xf9a6, 0x95bb, 0x9ae5, 0x9e7d, 0x66c4, 0xf9a7, 0x71c1, 0x8449,
+  0xf9a8, 0xf9a9, 0x584b, 0xf9aa, 0xf9ab, 0x5db8, 0x5f71, 0xf9ac,
+  0x6620, 0x668e, 0x6979, 0x69ae, 0x6c38, 0x6cf3, 0x6e36, 0x6f41,
+  0x6fda, 0x701b, 0x702f, 0x7150, 0x71df, 0x7370, 0xf9ad, 0x745b,
+  0xf9ae, 0x74d4, 0x76c8, 0x7a4e, 0x7e93, 0xf9af, 0xf9b0, 0x82f1,
+  0x8a60, 0x8fce, 0xf9b1, 0x9348, 0xf9b2, 0x9719, 0xf9b3, 0xf9b4,
+  0x4e42, 0x502a, 0xf9b5, 0x5208, 0x53e1, 0x66f3, 0x6c6d, 0x6fca,
+  0x730a, 0x777f, 0x7a62, 0x82ae, 0x85dd, 0x8602, 0xf9b6, 0x88d4,
+  0x8a63, 0x8b7d, 0x8c6b, 0xf9b7, 0x92b3, 0xf9b8, 0x9713, 0x9810,
+  0x4e94, 0x4f0d, 0x4fc9, 0x50b2, 0x5348, 0x543e, 0x5433, 0x55da,
+  0x5862, 0x58ba, 0x5967, 0x5a1b, 0x5be4, 0x609f, 0xf9b9, 0x61ca,
+  0x6556, 0x65ff, 0x6664, 0x68a7, 0x6c5a, 0x6fb3,
+  /* 0x68 */
+  0x70cf, 0x71ac, 0x7352, 0x7b7d, 0x8708, 0x8aa4, 0x9c32, 0x9f07,
+  0x5c4b, 0x6c83, 0x7344, 0x7389, 0x923a, 0x6eab, 0x7465, 0x761f,
+  0x7a69, 0x7e15, 0x860a, 0x5140, 0x58c5, 0x64c1, 0x74ee, 0x7515,
+  0x7670, 0x7fc1, 0x9095, 0x96cd, 0x9954, 0x6e26, 0x74e6, 0x7aa9,
+  0x7aaa, 0x81e5, 0x86d9, 0x8778, 0x8a1b, 0x5a49, 0x5b8c, 0x5b9b,
+  0x68a1, 0x6900, 0x6d63, 0x73a9, 0x7413, 0x742c, 0x7897, 0x7de9,
+  0x7feb, 0x8118, 0x8155, 0x839e, 0x8c4c, 0x962e, 0x9811, 0x66f0,
+  0x5f80, 0x65fa, 0x6789, 0x6c6a, 0x738b, 0x502d, 0x5a03, 0x6b6a,
+  0x77ee, 0x5916, 0x5d6c, 0x5dcd, 0x7325, 0x754f, 0xf9ba, 0xf9bb,
+  0x50e5, 0x51f9, 0x582f, 0x592d, 0x5996, 0x59da, 0x5be5, 0xf9bc,
+  0xf9bd, 0x5da2, 0x62d7, 0x6416, 0x6493, 0x64fe, 0xf9be, 0x66dc,
+  0xf9bf, 0x6a48, 0xf9c0, 0x71ff, 0x7464, 0xf9c1,
+  /* 0x69 */
+  0x7a88, 0x7aaf, 0x7e47, 0x7e5e, 0x8000, 0x8170, 0xf9c2, 0x87ef,
+  0x8981, 0x8b20, 0x9059, 0xf9c3, 0x9080, 0x9952, 0x617e, 0x6b32,
+  0x6d74, 0x7e1f, 0x8925, 0x8fb1, 0x4fd1, 0x50ad, 0x5197, 0x52c7,
+  0x57c7, 0x5889, 0x5bb9, 0x5eb8, 0x6142, 0x6995, 0x6d8c, 0x6e67,
+  0x6eb6, 0x7194, 0x7462, 0x7528, 0x752c, 0x8073, 0x8338, 0x84c9,
+  0x8e0a, 0x9394, 0x93de, 0xf9c4, 0x4e8e, 0x4f51, 0x5076, 0x512a,
+  0x53c8, 0x53cb, 0x53f3, 0x5b87, 0x5bd3, 0x5c24, 0x611a, 0x6182,
+  0x65f4, 0x725b, 0x7397, 0x7440, 0x76c2, 0x7950, 0x7991, 0x79b9,
+  0x7d06, 0x7fbd, 0x828b, 0x85d5, 0x865e, 0x8fc2, 0x9047, 0x90f5,
+  0x91ea, 0x9685, 0x96e8, 0x96e9, 0x52d6, 0x5f67, 0x65ed, 0x6631,
+  0x682f, 0x715c, 0x7a36, 0x90c1, 0x980a, 0x4e91, 0xf9c5, 0x6a52,
+  0x6b9e, 0x6f90, 0x7189, 0x8018, 0x82b8, 0x8553,
+  /* 0x6a */
+  0x904b, 0x9695, 0x96f2, 0x97fb, 0x851a, 0x9b31, 0x4e90, 0x718a,
+  0x96c4, 0x5143, 0x539f, 0x54e1, 0x5713, 0x5712, 0x57a3, 0x5a9b,
+  0x5ac4, 0x5bc3, 0x6028, 0x613f, 0x63f4, 0x6c85, 0x6d39, 0x6e72,
+  0x6e90, 0x7230, 0x733f, 0x7457, 0x82d1, 0x8881, 0x8f45, 0x9060,
+  0xf9c6, 0x9662, 0x9858, 0x9d1b, 0x6708, 0x8d8a, 0x925e, 0x4f4d,
+  0x5049, 0x50de, 0x5371, 0x570d, 0x59d4, 0x5a01, 0x5c09, 0x6170,
+  0x6690, 0x6e2d, 0x7232, 0x744b, 0x7def, 0x80c3, 0x840e, 0x8466,
+  0x853f, 0x875f, 0x885b, 0x8918, 0x8b02, 0x9055, 0x97cb, 0x9b4f,
+  0x4e73, 0x4f91, 0x5112, 0x516a, 0xf9c7, 0x552f, 0x55a9, 0x5b7a,
+  0x5ba5, 0x5e7c, 0x5e7d, 0x5ebe, 0x60a0, 0x60df, 0x6108, 0x6109,
+  0x63c4, 0x6538, 0x6709, 0xf9c8, 0x67d4, 0x67da, 0xf9c9, 0x6961,
+  0x6962, 0x6cb9, 0x6d27, 0xf9ca, 0x6e38, 0xf9cb,
+  /* 0x6b */
+  0x6fe1, 0x7336, 0x7337, 0xf9cc, 0x745c, 0x7531, 0xf9cd, 0x7652,
+  0xf9ce, 0xf9cf, 0x7dad, 0x81fe, 0x8438, 0x88d5, 0x8a98, 0x8adb,
+  0x8aed, 0x8e30, 0x8e42, 0x904a, 0x903e, 0x907a, 0x9149, 0x91c9,
+  0x936e, 0xf9d0, 0xf9d1, 0x5809, 0xf9d2, 0x6bd3, 0x8089, 0x80b2,
+  0xf9d3, 0xf9d4, 0x5141, 0x596b, 0x5c39, 0xf9d5, 0xf9d6, 0x6f64,
+  0x73a7, 0x80e4, 0x8d07, 0xf9d7, 0x9217, 0x958f, 0xf9d8, 0xf9d9,
+  0xf9da, 0xf9db, 0x807f, 0x620e, 0x701c, 0x7d68, 0x878d, 0xf9dc,
+  0x57a0, 0x6069, 0x6147, 0x6bb7, 0x8abe, 0x9280, 0x96b1, 0x4e59,
+  0x541f, 0x6deb, 0x852d, 0x9670, 0x97f3, 0x98ee, 0x63d6, 0x6ce3,
+  0x9091, 0x51dd, 0x61c9, 0x81ba, 0x9df9, 0x4f9d, 0x501a, 0x5100,
+  0x5b9c, 0x610f, 0x61ff, 0x64ec, 0x6905, 0x6bc5, 0x7591, 0x77e3,
+  0x7fa9, 0x8264, 0x858f, 0x87fb, 0x8863, 0x8abc,
+  /* 0x6c */
+  0x8b70, 0x91ab, 0x4e8c, 0x4ee5, 0x4f0a, 0xf9dd, 0xf9de, 0x5937,
+  0x59e8, 0xf9df, 0x5df2, 0x5f1b, 0x5f5b, 0x6021, 0xf9e0, 0xf9e1,
+  0xf9e2, 0xf9e3, 0x723e, 0x73e5, 0xf9e4, 0x7570, 0x75cd, 0xf9e5,
+  0x79fb, 0xf9e6, 0x800c, 0x8033, 0x8084, 0x82e1, 0x8351, 0xf9e7,
+  0xf9e8, 0x8cbd, 0x8cb3, 0x9087, 0xf9e9, 0xf9ea, 0x98f4, 0x990c,
+  0xf9eb, 0xf9ec, 0x7037, 0x76ca, 0x7fca, 0x7fcc, 0x7ffc, 0x8b1a,
+  0x4eba, 0x4ec1, 0x5203, 0x5370, 0xf9ed, 0x54bd, 0x56e0, 0x59fb,
+  0x5bc5, 0x5f15, 0x5fcd, 0x6e6e, 0xf9ee, 0xf9ef, 0x7d6a, 0x8335,
+  0xf9f0, 0x8693, 0x8a8d, 0xf9f1, 0x976d, 0x9777, 0xf9f2, 0xf9f3,
+  0x4e00, 0x4f5a, 0x4f7e, 0x58f9, 0x65e5, 0x6ea2, 0x9038, 0x93b0,
+  0x99b9, 0x4efb, 0x58ec, 0x598a, 0x59d9, 0x6041, 0xf9f4, 0xf9f5,
+  0x7a14, 0xf9f6, 0x834f, 0x8cc3, 0x5165, 0x5344,
+  /* 0x6d */
+  0xf9f7, 0xf9f8, 0xf9f9, 0x4ecd, 0x5269, 0x5b55, 0x82bf, 0x4ed4,
+  0x523a, 0x54a8, 0x59c9, 0x59ff, 0x5b50, 0x5b57, 0x5b5c, 0x6063,
+  0x6148, 0x6ecb, 0x7099, 0x716e, 0x7386, 0x74f7, 0x75b5, 0x78c1,
+  0x7d2b, 0x8005, 0x81ea, 0x8328, 0x8517, 0x85c9, 0x8aee, 0x8cc7,
+  0x96cc, 0x4f5c, 0x52fa, 0x56bc, 0x65ab, 0x6628, 0x707c, 0x70b8,
+  0x7235, 0x7dbd, 0x828d, 0x914c, 0x96c0, 0x9d72, 0x5b71, 0x68e7,
+  0x6b98, 0x6f7a, 0x76de, 0x5c91, 0x66ab, 0x6f5b, 0x7bb4, 0x7c2a,
+  0x8836, 0x96dc, 0x4e08, 0x4ed7, 0x5320, 0x5834, 0x58bb, 0x58ef,
+  0x596c, 0x5c07, 0x5e33, 0x5e84, 0x5f35, 0x638c, 0x66b2, 0x6756,
+  0x6a1f, 0x6aa3, 0x6b0c, 0x6f3f, 0x7246, 0xf9fa, 0x7350, 0x748b,
+  0x7ae0, 0x7ca7, 0x8178, 0x81df, 0x81e7, 0x838a, 0x846c, 0x8523,
+  0x8594, 0x85cf, 0x88dd, 0x8d13, 0x91ac, 0x9577,
+  /* 0x6e */
+  0x969c, 0x518d, 0x54c9, 0x5728, 0x5bb0, 0x624d, 0x6750, 0x683d,
+  0x6893, 0x6e3d, 0x6ed3, 0x707d, 0x7e21, 0x88c1, 0x8ca1, 0x8f09,
+  0x9f4b, 0x9f4e, 0x722d, 0x7b8f, 0x8acd, 0x931a, 0x4f47, 0x4f4e,
+  0x5132, 0x5480, 0x59d0, 0x5e95, 0x62b5, 0x6775, 0x696e, 0x6a17,
+  0x6cae, 0x6e1a, 0x72d9, 0x732a, 0x75bd, 0x7bb8, 0x7d35, 0x82e7,
+  0x83f9, 0x8457, 0x85f7, 0x8a5b, 0x8caf, 0x8e87, 0x9019, 0x90b8,
+  0x96ce, 0x9f5f, 0x52e3, 0x540a, 0x5ae1, 0x5bc2, 0x6458, 0x6575,
+  0x6ef4, 0x72c4, 0xf9fb, 0x7684, 0x7a4d, 0x7b1b, 0x7c4d, 0x7e3e,
+  0x7fdf, 0x837b, 0x8b2b, 0x8cca, 0x8d64, 0x8de1, 0x8e5f, 0x8fea,
+  0x8ff9, 0x9069, 0x93d1, 0x4f43, 0x4f7a, 0x50b3, 0x5168, 0x5178,
+  0x524d, 0x526a, 0x5861, 0x587c, 0x5960, 0x5c08, 0x5c55, 0x5edb,
+  0x609b, 0x6230, 0x6813, 0x6bbf, 0x6c08, 0x6fb1,
+  /* 0x6f */
+  0x714e, 0x7420, 0x7530, 0x7538, 0x7551, 0x7672, 0x7b4c, 0x7b8b,
+  0x7bad, 0x7bc6, 0x7e8f, 0x8a6e, 0x8f3e, 0x8f49, 0x923f, 0x9293,
+  0x9322, 0x942b, 0x96fb, 0x985a, 0x986b, 0x991e, 0x5207, 0x622a,
+  0x6298, 0x6d59, 0x7664, 0x7aca, 0x7bc0, 0x7d76, 0x5360, 0x5cbe,
+  0x5e97, 0x6f38, 0x70b9, 0x7c98, 0x9711, 0x9b8e, 0x9ede, 0x63a5,
+  0x647a, 0x8776, 0x4e01, 0x4e95, 0x4ead, 0x505c, 0x5075, 0x5448,
+  0x59c3, 0x5b9a, 0x5e40, 0x5ead, 0x5ef7, 0x5f81, 0x60c5, 0x633a,
+  0x653f, 0x6574, 0x65cc, 0x6676, 0x6678, 0x67fe, 0x6968, 0x6a89,
+  0x6b63, 0x6c40, 0x6dc0, 0x6de8, 0x6e1f, 0x6e5e, 0x701e, 0x70a1,
+  0x738e, 0x73fd, 0x753a, 0x775b, 0x7887, 0x798e, 0x7a0b, 0x7a7d,
+  0x7cbe, 0x7d8e, 0x8247, 0x8a02, 0x8aea, 0x8c9e, 0x912d, 0x914a,
+  0x91d8, 0x9266, 0x92cc, 0x9320, 0x9706, 0x9756,
+  /* 0x70 */
+  0x975c, 0x9802, 0x9f0e, 0x5236, 0x5291, 0x557c, 0x5824, 0x5e1d,
+  0x5f1f, 0x608c, 0x63d0, 0x68af, 0x6fdf, 0x796d, 0x7b2c, 0x81cd,
+  0x85ba, 0x88fd, 0x8af8, 0x8e44, 0x918d, 0x9664, 0x969b, 0x973d,
+  0x984c, 0x9f4a, 0x4fce, 0x5146, 0x51cb, 0x52a9, 0x5632, 0x5f14,
+  0x5f6b, 0x63aa, 0x64cd, 0x65e9, 0x6641, 0x66fa, 0x66f9, 0x671d,
+  0x689d, 0x68d7, 0x69fd, 0x6f15, 0x6f6e, 0x7167, 0x71e5, 0x722a,
+  0x74aa, 0x773a, 0x7956, 0x795a, 0x79df, 0x7a20, 0x7a95, 0x7c97,
+  0x7cdf, 0x7d44, 0x7e70, 0x8087, 0x85fb, 0x86a4, 0x8a54, 0x8abf,
+  0x8d99, 0x8e81, 0x9020, 0x906d, 0x91e3, 0x963b, 0x96d5, 0x9ce5,
+  0x65cf, 0x7c07, 0x8db3, 0x93c3, 0x5b58, 0x5c0a, 0x5352, 0x62d9,
+  0x731d, 0x5027, 0x5b97, 0x5f9e, 0x60b0, 0x616b, 0x68d5, 0x6dd9,
+  0x742e, 0x7a2e, 0x7d42, 0x7d9c, 0x7e31, 0x816b,
+  /* 0x71 */
+  0x8e2a, 0x8e35, 0x937e, 0x9418, 0x4f50, 0x5750, 0x5de6, 0x5ea7,
+  0x632b, 0x7f6a, 0x4e3b, 0x4f4f, 0x4f8f, 0x505a, 0x59dd, 0x80c4,
+  0x546a, 0x5468, 0x55fe, 0x594f, 0x5b99, 0x5dde, 0x5eda, 0x665d,
+  0x6731, 0x67f1, 0x682a, 0x6ce8, 0x6d32, 0x6e4a, 0x6f8d, 0x70b7,
+  0x73e0, 0x7587, 0x7c4c, 0x7d02, 0x7d2c, 0x7da2, 0x821f, 0x86db,
+  0x8a3b, 0x8a85, 0x8d70, 0x8e8a, 0x8f33, 0x9031, 0x914e, 0x9152,
+  0x9444, 0x99d0, 0x7af9, 0x7ca5, 0x4fca, 0x5101, 0x51c6, 0x57c8,
+  0x5bef, 0x5cfb, 0x6659, 0x6a3d, 0x6d5a, 0x6e96, 0x6fec, 0x710c,
+  0x756f, 0x7ae3, 0x8822, 0x9021, 0x9075, 0x96cb, 0x99ff, 0x8301,
+  0x4e2d, 0x4ef2, 0x8846, 0x91cd, 0x537d, 0x6adb, 0x696b, 0x6c41,
+  0x847a, 0x589e, 0x618e, 0x66fe, 0x62ef, 0x70dd, 0x7511, 0x75c7,
+  0x7e52, 0x84b8, 0x8b49, 0x8d08, 0x4e4b, 0x53ea,
+  /* 0x72 */
+  0x54ab, 0x5730, 0x5740, 0x5fd7, 0x6301, 0x6307, 0x646f, 0x652f,
+  0x65e8, 0x667a, 0x679d, 0x67b3, 0x6b62, 0x6c60, 0x6c9a, 0x6f2c,
+  0x77e5, 0x7825, 0x7949, 0x7957, 0x7d19, 0x80a2, 0x8102, 0x81f3,
+  0x829d, 0x82b7, 0x8718, 0x8a8c, 0xf9fc, 0x8d04, 0x8dbe, 0x9072,
+  0x76f4, 0x7a19, 0x7a37, 0x7e54, 0x8077, 0x5507, 0x55d4, 0x5875,
+  0x632f, 0x6422, 0x6649, 0x664b, 0x686d, 0x699b, 0x6b84, 0x6d25,
+  0x6eb1, 0x73cd, 0x7468, 0x74a1, 0x755b, 0x75b9, 0x76e1, 0x771e,
+  0x778b, 0x79e6, 0x7e09, 0x7e1d, 0x81fb, 0x852f, 0x8897, 0x8a3a,
+  0x8cd1, 0x8eeb, 0x8fb0, 0x9032, 0x93ad, 0x9663, 0x9673, 0x9707,
+  0x4f84, 0x53f1, 0x59ea, 0x5ac9, 0x5e19, 0x684e, 0x74c6, 0x75be,
+  0x79e9, 0x7a92, 0x81a3, 0x86ed, 0x8cea, 0x8dcc, 0x8fed, 0x659f,
+  0x6715, 0xf9fd, 0x57f7, 0x6f57, 0x7ddd, 0x8f2f,
+  /* 0x73 */
+  0x93f6, 0x96c6, 0x5fb5, 0x61f2, 0x6f84, 0x4e14, 0x4f98, 0x501f,
+  0x53c9, 0x55df, 0x5d6f, 0x5dee, 0x6b21, 0x6b64, 0x78cb, 0x7b9a,
+  0xf9fe, 0x8e49, 0x8eca, 0x906e, 0x6349, 0x643e, 0x7740, 0x7a84,
+  0x932f, 0x947f, 0x9f6a, 0x64b0, 0x6faf, 0x71e6, 0x74a8, 0x74da,
+  0x7ac4, 0x7c12, 0x7e82, 0x7cb2, 0x7e98, 0x8b9a, 0x8d0a, 0x947d,
+  0x9910, 0x994c, 0x5239, 0x5bdf, 0x64e6, 0x672d, 0x7d2e, 0x50ed,
+  0x53c3, 0x5879, 0x6158, 0x6159, 0x61fa, 0x65ac, 0x7ad9, 0x8b92,
+  0x8b96, 0x5009, 0x5021, 0x5275, 0x5531, 0x5a3c, 0x5ee0, 0x5f70,
+  0x6134, 0x655e, 0x660c, 0x6636, 0x66a2, 0x69cd, 0x6ec4, 0x6f32,
+  0x7316, 0x7621, 0x7a93, 0x8139, 0x8259, 0x83d6, 0x84bc, 0x50b5,
+  0x57f0, 0x5bc0, 0x5be8, 0x5f69, 0x63a1, 0x7826, 0x7db5, 0x83dc,
+  0x8521, 0x91c7, 0x91f5, 0x518a, 0x67f5, 0x7b56,
+  /* 0x74 */
+  0x8cac, 0x51c4, 0x59bb, 0x60bd, 0x8655, 0x501c, 0xf9ff, 0x5254,
+  0x5c3a, 0x617d, 0x621a, 0x62d3, 0x64f2, 0x65a5, 0x6ecc, 0x7620,
+  0x810a, 0x8e60, 0x965f, 0x96bb, 0x4edf, 0x5343, 0x5598, 0x5929,
+  0x5ddd, 0x64c5, 0x6cc9, 0x6dfa, 0x7394, 0x7a7f, 0x821b, 0x85a6,
+  0x8ce4, 0x8e10, 0x9077, 0x91e7, 0x95e1, 0x9621, 0x97c6, 0x51f8,
+  0x54f2, 0x5586, 0x5fb9, 0x64a4, 0x6f88, 0x7db4, 0x8f1f, 0x8f4d,
+  0x9435, 0x50c9, 0x5c16, 0x6cbe, 0x6dfb, 0x751b, 0x77bb, 0x7c3d,
+  0x7c64, 0x8a79, 0x8ac2, 0x581e, 0x59be, 0x5e16, 0x6377, 0x7252,
+  0x758a, 0x776b, 0x8adc, 0x8cbc, 0x8f12, 0x5ef3, 0x6674, 0x6df8,
+  0x807d, 0x83c1, 0x8acb, 0x9751, 0x9bd6, 0xfa00, 0x5243, 0x66ff,
+  0x6d95, 0x6eef, 0x7de0, 0x8ae6, 0x902e, 0x905e, 0x9ad4, 0x521d,
+  0x527f, 0x54e8, 0x6194, 0x6284, 0x62db, 0x68a2,
+  /* 0x75 */
+  0x6912, 0x695a, 0x6a35, 0x7092, 0x7126, 0x785d, 0x7901, 0x790e,
+  0x79d2, 0x7a0d, 0x8096, 0x8278, 0x82d5, 0x8349, 0x8549, 0x8c82,
+  0x8d85, 0x9162, 0x918b, 0x91ae, 0x4fc3, 0x56d1, 0x71ed, 0x77d7,
+  0x8700, 0x89f8, 0x5bf8, 0x5fd6, 0x6751, 0x90a8, 0x53e2, 0x585a,
+  0x5bf5, 0x60a4, 0x6181, 0x6460, 0x7e3d, 0x8070, 0x8525, 0x9283,
+  0x64ae, 0x50ac, 0x5d14, 0x6700, 0x589c, 0x62bd, 0x63a8, 0x690e,
+  0x6978, 0x6a1e, 0x6e6b, 0x76ba, 0x79cb, 0x82bb, 0x8429, 0x8acf,
+  0x8da8, 0x8ffd, 0x9112, 0x914b, 0x919c, 0x9310, 0x9318, 0x939a,
+  0x96db, 0x9a36, 0x9c0d, 0x4e11, 0x755c, 0x795d, 0x7afa, 0x7b51,
+  0x7bc9, 0x7e2e, 0x84c4, 0x8e59, 0x8e74, 0x8ef8, 0x9010, 0x6625,
+  0x693f, 0x7443, 0x51fa, 0x672e, 0x9edc, 0x5145, 0x5fe0, 0x6c96,
+  0x87f2, 0x885d, 0x8877, 0x60b4, 0x81b5, 0x8403,
+  /* 0x76 */
+  0x8d05, 0x53d6, 0x5439, 0x5634, 0x5a36, 0x5c31, 0x708a, 0x7fe0,
+  0x805a, 0x8106, 0x81ed, 0x8da3, 0x9189, 0x9a5f, 0x9df2, 0x5074,
+  0x4ec4, 0x53a0, 0x60fb, 0x6e2c, 0x5c64, 0x4f88, 0x5024, 0x55e4,
+  0x5cd9, 0x5e5f, 0x6065, 0x6894, 0x6cbb, 0x6dc4, 0x71be, 0x75d4,
+  0x75f4, 0x7661, 0x7a1a, 0x7a49, 0x7dc7, 0x7dfb, 0x7f6e, 0x81f4,
+  0x86a9, 0x8f1c, 0x96c9, 0x99b3, 0x9f52, 0x5247, 0x52c5, 0x98ed,
+  0x89aa, 0x4e03, 0x67d2, 0x6f06, 0x4fb5, 0x5be2, 0x6795, 0x6c88,
+  0x6d78, 0x741b, 0x7827, 0x91dd, 0x937c, 0x87c4, 0x79e4, 0x7a31,
+  0x5feb, 0x4ed6, 0x54a4, 0x553e, 0x58ae, 0x59a5, 0x60f0, 0x6253,
+  0x62d6, 0x6736, 0x6955, 0x8235, 0x9640, 0x99b1, 0x99dd, 0x502c,
+  0x5353, 0x5544, 0x577c, 0xfa01, 0x6258, 0xfa02, 0x64e2, 0x666b,
+  0x67dd, 0x6fc1, 0x6fef, 0x7422, 0x7438, 0x8a17,
+  /* 0x77 */
+  0x9438, 0x5451, 0x5606, 0x5766, 0x5f48, 0x619a, 0x6b4e, 0x7058,
+  0x70ad, 0x7dbb, 0x8a95, 0x596a, 0x812b, 0x63a2, 0x7708, 0x803d,
+  0x8caa, 0x5854, 0x642d, 0x69bb, 0x5b95, 0x5e11, 0x6e6f, 0xfa03,
+  0x8569, 0x514c, 0x53f0, 0x592a, 0x6020, 0x614b, 0x6b86, 0x6c70,
+  0x6cf0, 0x7b1e, 0x80ce, 0x82d4, 0x8dc6, 0x90b0, 0x98b1, 0xfa04,
+  0x64c7, 0x6fa4, 0x6491, 0x6504, 0x514e, 0x5410, 0x571f, 0x8a0e,
+  0x615f, 0x6876, 0xfa05, 0x75db, 0x7b52, 0x7d71, 0x901a, 0x5806,
+  0x69cc, 0x817f, 0x892a, 0x9000, 0x9839, 0x5078, 0x5957, 0x59ac,
+  0x6295, 0x900f, 0x9b2a, 0x615d, 0x7279, 0x95d6, 0x5761, 0x5a46,
+  0x5df4, 0x628a, 0x64ad, 0x64fa, 0x6777, 0x6ce2, 0x6d3e, 0x722c,
+  0x7436, 0x7834, 0x7f77, 0x82ad, 0x8ddb, 0x9817, 0x5224, 0x5742,
+  0x677f, 0x7248, 0x74e3, 0x8ca9, 0x8fa6, 0x9211,
+  /* 0x78 */
+  0x962a, 0x516b, 0x53ed, 0x634c, 0x4f69, 0x5504, 0x6096, 0x6557,
+  0x6c9b, 0x6d7f, 0x724c, 0x72fd, 0x7a17, 0x8987, 0x8c9d, 0x5f6d,
+  0x6f8e, 0x70f9, 0x81a8, 0x610e, 0x4fbf, 0x504f, 0x6241, 0x7247,
+  0x7bc7, 0x7de8, 0x7fe9, 0x904d, 0x97ad, 0x9a19, 0x8cb6, 0x576a,
+  0x5e73, 0x67b0, 0x840d, 0x8a55, 0x5420, 0x5b16, 0x5e63, 0x5ee2,
+  0x5f0a, 0x6583, 0x80ba, 0x853d, 0x9589, 0x965b, 0x4f48, 0x5305,
+  0x530d, 0x530f, 0x5486, 0x54fa, 0x5703, 0x5e03, 0x6016, 0x629b,
+  0x62b1, 0x6355, 0xfa06, 0x6ce1, 0x6d66, 0x75b1, 0x7832, 0x80de,
+  0x812f, 0x82de, 0x8461, 0x84b2, 0x888d, 0x8912, 0x900b, 0x92ea,
+  0x98fd, 0x9b91, 0x5e45, 0x66b4, 0x66dd, 0x7011, 0x7206, 0xfa07,
+  0x4ff5, 0x527d, 0x5f6a, 0x6153, 0x6753, 0x6a19, 0x6f02, 0x74e2,
+  0x7968, 0x8868, 0x8c79, 0x98c7, 0x98c4, 0x9a43,
+  /* 0x79 */
+  0x54c1, 0x7a1f, 0x6953, 0x8af7, 0x8c4a, 0x98a8, 0x99ae, 0x5f7c,
+  0x62ab, 0x75b2, 0x76ae, 0x88ab, 0x907f, 0x9642, 0x5339, 0x5f3c,
+  0x5fc5, 0x6ccc, 0x73cc, 0x7562, 0x758b, 0x7b46, 0x82fe, 0x999d,
+  0x4e4f, 0x903c, 0x4e0b, 0x4f55, 0x53a6, 0x590f, 0x5ec8, 0x6630,
+  0x6cb3, 0x7455, 0x8377, 0x8766, 0x8cc0, 0x9050, 0x971e, 0x9c15,
+  0x58d1, 0x5b78, 0x8650, 0x8b14, 0x9db4, 0x5bd2, 0x6068, 0x608d,
+  0x65f1, 0x6c57, 0x6f22, 0x6fa3, 0x701a, 0x7f55, 0x7ff0, 0x9591,
+  0x9592, 0x9650, 0x97d3, 0x5272, 0x8f44, 0x51fd, 0x542b, 0x54b8,
+  0x5563, 0x558a, 0x6abb, 0x6db5, 0x7dd8, 0x8266, 0x929c, 0x9677,
+  0x9e79, 0x5408, 0x54c8, 0x76d2, 0x86e4, 0x95a4, 0x95d4, 0x965c,
+  0x4ea2, 0x4f09, 0x59ee, 0x5ae6, 0x5df7, 0x6052, 0x6297, 0x676d,
+  0x6841, 0x6c86, 0x6e2f, 0x7f38, 0x809b, 0x822a,
+  /* 0x7a */
+  0xfa08, 0xfa09, 0x9805, 0x4ea5, 0x5055, 0x54b3, 0x5793, 0x595a,
+  0x5b69, 0x5bb3, 0x61c8, 0x6977, 0x6d77, 0x7023, 0x87f9, 0x89e3,
+  0x8a72, 0x8ae7, 0x9082, 0x99ed, 0x9ab8, 0x52be, 0x6838, 0x5016,
+  0x5e78, 0x674f, 0x8347, 0x884c, 0x4eab, 0x5411, 0x56ae, 0x73e6,
+  0x9115, 0x97ff, 0x9909, 0x9957, 0x9999, 0x5653, 0x589f, 0x865b,
+  0x8a31, 0x61b2, 0x6af6, 0x737b, 0x8ed2, 0x6b47, 0x96aa, 0x9a57,
+  0x5955, 0x7200, 0x8d6b, 0x9769, 0x4fd4, 0x5cf4, 0x5f26, 0x61f8,
+  0x665b, 0x6ceb, 0x70ab, 0x7384, 0x73b9, 0x73fe, 0x7729, 0x774d,
+  0x7d43, 0x7d62, 0x7e23, 0x8237, 0x8852, 0xfa0a, 0x8ce2, 0x9249,
+  0x986f, 0x5b51, 0x7a74, 0x8840, 0x9801, 0x5acc, 0x4fe0, 0x5354,
+  0x593e, 0x5cfd, 0x633e, 0x6d79, 0x72f9, 0x8105, 0x8107, 0x83a2,
+  0x92cf, 0x9830, 0x4ea8, 0x5144, 0x5211, 0x578b,
+  /* 0x7b */
+  0x5f62, 0x6cc2, 0x6ece, 0x7005, 0x7050, 0x70af, 0x7192, 0x73e9,
+  0x7469, 0x834a, 0x87a2, 0x8861, 0x9008, 0x90a2, 0x93a3, 0x99a8,
+  0x516e, 0x5f57, 0x60e0, 0x6167, 0x66b3, 0x8559, 0x8e4a, 0x91af,
+  0x978b, 0x4e4e, 0x4e92, 0x547c, 0x58d5, 0x58fa, 0x597d, 0x5cb5,
+  0x5f27, 0x6236, 0x6248, 0x660a, 0x6667, 0x6beb, 0x6d69, 0x6dcf,
+  0x6e56, 0x6ef8, 0x6f94, 0x6fe0, 0x6fe9, 0x705d, 0x72d0, 0x7425,
+  0x745a, 0x74e0, 0x7693, 0x795c, 0x7cca, 0x7e1e, 0x80e1, 0x82a6,
+  0x846b, 0x84bf, 0x864e, 0x865f, 0x8774, 0x8b77, 0x8c6a, 0x93ac,
+  0x9800, 0x9865, 0x60d1, 0x6216, 0x9177, 0x5a5a, 0x660f, 0x6df7,
+  0x6e3e, 0x743f, 0x9b42, 0x5ffd, 0x60da, 0x7b0f, 0x54c4, 0x5f18,
+  0x6c5e, 0x6cd3, 0x6d2a, 0x70d8, 0x7d05, 0x8679, 0x8a0c, 0x9d3b,
+  0x5316, 0x548c, 0x5b05, 0x6a3a, 0x706b, 0x7575,
+  /* 0x7c */
+  0x798d, 0x79be, 0x82b1, 0x83ef, 0x8a71, 0x8b41, 0x8ca8, 0x9774,
+  0xfa0b, 0x64f4, 0x652b, 0x78ba, 0x78bb, 0x7a6b, 0x4e38, 0x559a,
+  0x5950, 0x5ba6, 0x5e7b, 0x60a3, 0x63db, 0x6b61, 0x6665, 0x6853,
+  0x6e19, 0x7165, 0x74b0, 0x7d08, 0x9084, 0x9a69, 0x9c25, 0x6d3b,
+  0x6ed1, 0x733e, 0x8c41, 0x95ca, 0x51f0, 0x5e4c, 0x5fa8, 0x604d,
+  0x60f6, 0x6130, 0x614c, 0x6643, 0x6644, 0x69a5, 0x6cc1, 0x6e5f,
+  0x6ec9, 0x6f62, 0x714c, 0x749c, 0x7687, 0x7bc1, 0x7c27, 0x8352,
+  0x8757, 0x9051, 0x968d, 0x9ec3, 0x532f, 0x56de, 0x5efb, 0x5f8a,
+  0x6062, 0x6094, 0x61f7, 0x6666, 0x6703, 0x6a9c, 0x6dee, 0x6fae,
+  0x7070, 0x736a, 0x7e6a, 0x81be, 0x8334, 0x86d4, 0x8aa8, 0x8cc4,
+  0x5283, 0x7372, 0x5b96, 0x6a6b, 0x9404, 0x54ee, 0x5686, 0x5b5d,
+  0x6548, 0x6585, 0x66c9, 0x689f, 0x6d8d, 0x6dc6,
+  /* 0x7d */
+  0x723b, 0x80b4, 0x9175, 0x9a4d, 0x4faf, 0x5019, 0x539a, 0x540e,
+  0x543c, 0x5589, 0x55c5, 0x5e3f, 0x5f8c, 0x673d, 0x7166, 0x73dd,
+  0x9005, 0x52db, 0x52f3, 0x5864, 0x58ce, 0x7104, 0x718f, 0x71fb,
+  0x85b0, 0x8a13, 0x6688, 0x85a8, 0x55a7, 0x6684, 0x714a, 0x8431,
+  0x5349, 0x5599, 0x6bc1, 0x5f59, 0x5fbd, 0x63ee, 0x6689, 0x7147,
+  0x8af1, 0x8f1d, 0x9ebe, 0x4f11, 0x643a, 0x70cb, 0x7566, 0x8667,
+  0x6064, 0x8b4e, 0x9df8, 0x5147, 0x51f6, 0x5308, 0x6d36, 0x80f8,
+  0x9ed1, 0x6615, 0x6b23, 0x7098, 0x75d5, 0x5403, 0x5c79, 0x7d07,
+  0x8a16, 0x6b20, 0x6b3d, 0x6b46, 0x5438, 0x6070, 0x6d3d, 0x7fd5,
+  0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec, 0x5b09,
+  0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199, 0x71b9,
+  0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70,
+};
+
+static int
+ksc5601_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c1 = (s[0] & 0x7F);
+  if ((c1 >= 0x21 && c1 <= 0x2c) || (c1 >= 0x30 && c1 <= 0x48) || (c1 >= 0x4a && c1 <= 0x7d)) {
+    if (n >= 2) {
+      unsigned char c2 = (s[1] & 0x7F);
+      if (c2 >= 0x21 && c2 < 0x7f) {
+        unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
+        unsigned short wc = 0xfffd;
+        if (i < 1410) {
+          if (i < 1115)
+            wc = ksc5601_2uni_page21[i];
+        } else if (i < 3854) {
+          if (i < 3760)
+            wc = ksc5601_2uni_page30[i-1410];
+        } else {
+          if (i < 8742)
+            wc = ksc5601_2uni_page4a[i-3854];
+        }
+        if (wc != 0xfffd) {
+          *pwc = (ucs4_t) wc;
+          return 2;
+        }
+      }
+      return RET_ILSEQ;
+    }
+    return RET_TOOFEW(0);
+  }
+  return RET_ILSEQ;
+}
+#endif /* NEED_TOWC */
+
+#ifdef NEED_TOMB
+static const unsigned short ksc5601_2charset[8224] = {
+  0x222e, 0x2234, 0x2157, 0x2127, 0x2823, 0x2129, 0x2146, 0x213e,
+  0x2977, 0x2978, 0x2225, 0x2252, 0x2124, 0x222c, 0x2976, 0x282c,
+  0x2879, 0x2876, 0x287a, 0x222f, 0x2821, 0x2822, 0x213f, 0x282a,
+  0x282d, 0x292c, 0x2921, 0x2923, 0x2140, 0x292a, 0x292d, 0x2922,
+  0x2824, 0x2924, 0x2925, 0x2826, 0x2926, 0x2927, 0x2828, 0x2928,
+  0x2829, 0x2929, 0x2930, 0x282f, 0x292f, 0x282b, 0x292b, 0x282e,
+  0x292e, 0x2227, 0x2230, 0x2228, 0x222b, 0x222a, 0x222d, 0x2229,
+  0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, 0x2548,
+  0x2549, 0x254a, 0x254b, 0x254c, 0x254d, 0x254e, 0x254f, 0x2550,
+  0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, 0x2558,
+  0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, 0x2568,
+  0x2569, 0x256a, 0x256b, 0x256c, 0x256d, 0x256e, 0x256f, 0x2570,
+  0x2571, 0x2572, 0x2573, 0x2574, 0x2575, 0x2576, 0x2577, 0x2578,
+  0x2c27, 0x2c21, 0x2c22, 0x2c23, 0x2c24, 0x2c25, 0x2c26, 0x2c28,
+  0x2c29, 0x2c2a, 0x2c2b, 0x2c2c, 0x2c2d, 0x2c2e, 0x2c2f, 0x2c30,
+  0x2c31, 0x2c32, 0x2c33, 0x2c34, 0x2c35, 0x2c36, 0x2c37, 0x2c38,
+  0x2c39, 0x2c3a, 0x2c3b, 0x2c3c, 0x2c3d, 0x2c3e, 0x2c3f, 0x2c40,
+  0x2c41, 0x2c51, 0x2c52, 0x2c53, 0x2c54, 0x2c55, 0x2c56, 0x2c58,
+  0x2c59, 0x2c5a, 0x2c5b, 0x2c5c, 0x2c5d, 0x2c5e, 0x2c5f, 0x2c60,
+  0x2c61, 0x2c62, 0x2c63, 0x2c64, 0x2c65, 0x2c66, 0x2c67, 0x2c68,
+  0x2c69, 0x2c6a, 0x2c6b, 0x2c6c, 0x2c6d, 0x2c6e, 0x2c6f, 0x2c70,
+  0x2c71, 0x2c57, 0x212a, 0x212e, 0x212f, 0x2130, 0x2131, 0x2253,
+  0x2254, 0x2125, 0x2126, 0x2236, 0x2147, 0x2148, 0x2158, 0x2979,
+  0x297a, 0x297b, 0x297c, 0x297d, 0x297e, 0x2149, 0x2235, 0x2724,
+  0x2260, 0x2265, 0x2262, 0x2759, 0x214a, 0x2877, 0x2878, 0x287b,
+  0x287c, 0x287d, 0x287e, 0x2530, 0x2531, 0x2532, 0x2533, 0x2534,
+  0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x2521, 0x2522, 0x2523,
+  0x2524, 0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a, 0x2167,
+  0x2168, 0x2166, 0x2169, 0x216a, 0x2255, 0x2258, 0x2256, 0x2259,
+  0x2257, 0x2221, 0x2222, 0x2223, 0x2153, 0x2224, 0x2154, 0x2174,
+  0x2175, 0x2233, 0x2232, 0x216e, 0x2170, 0x2144, 0x2150, 0x212b,
+  0x217c, 0x217d, 0x217b, 0x217a, 0x2172, 0x2173, 0x2231, 0x2145,
+  0x2171, 0x212d, 0x216f, 0x2156, 0x2141, 0x2155, 0x2142, 0x2143,
+  0x216c, 0x216d, 0x2178, 0x2179, 0x2176, 0x2177, 0x2241, 0x2151,
+  0x2152, 0x2867, 0x2868, 0x2869, 0x286a, 0x286b, 0x286c, 0x286d,
+  0x286e, 0x286f, 0x2870, 0x2871, 0x2872, 0x2873, 0x2874, 0x2875,
+  0x2967, 0x2968, 0x2969, 0x296a, 0x296b, 0x296c, 0x296d, 0x296e,
+  0x296f, 0x2970, 0x2971, 0x2972, 0x2973, 0x2974, 0x2975, 0x294d,
+  0x294e, 0x294f, 0x2950, 0x2951, 0x2952, 0x2953, 0x2954, 0x2955,
+  0x2956, 0x2957, 0x2958, 0x2959, 0x295a, 0x295b, 0x295c, 0x295d,
+  0x295e, 0x295f, 0x2960, 0x2961, 0x2962, 0x2963, 0x2964, 0x2965,
+  0x2966, 0x284d, 0x284e, 0x284f, 0x2850, 0x2851, 0x2852, 0x2853,
+  0x2854, 0x2855, 0x2856, 0x2857, 0x2858, 0x2859, 0x285a, 0x285b,
+  0x285c, 0x285d, 0x285e, 0x285f, 0x2860, 0x2861, 0x2862, 0x2863,
+  0x2864, 0x2865, 0x2866, 0x2621, 0x262c, 0x2622, 0x262d, 0x2623,
+  0x2648, 0x2647, 0x262e, 0x2624, 0x2642, 0x2641, 0x262f, 0x2626,
+  0x2646, 0x2645, 0x2631, 0x2625, 0x2644, 0x2643, 0x2630, 0x2627,
+  0x263c, 0x2649, 0x264a, 0x2637, 0x264b, 0x264c, 0x2632, 0x2629,
+  0x263e, 0x264d, 0x264e, 0x2639, 0x264f, 0x2650, 0x2634, 0x2628,
+  0x2651, 0x2652, 0x2638, 0x263d, 0x2653, 0x2654, 0x2633, 0x262a,
+  0x2655, 0x2656, 0x263a, 0x263f, 0x2657, 0x2658, 0x2635, 0x262b,
+  0x2659, 0x265a, 0x263b, 0x265b, 0x265c, 0x2640, 0x265d, 0x265e,
+  0x265f, 0x2660, 0x2661, 0x2662, 0x2663, 0x2664, 0x2636, 0x2246,
+  0x2161, 0x2160, 0x2243, 0x2247, 0x2248, 0x224b, 0x224a, 0x2249,
+  0x224c, 0x2163, 0x2162, 0x223a, 0x2239, 0x2165, 0x2164, 0x2238,
+  0x2237, 0x215f, 0x215e, 0x2242, 0x215b, 0x215d, 0x215c, 0x2244,
+  0x2245, 0x215a, 0x2159, 0x224f, 0x224e, 0x2250, 0x2251, 0x214f,
+  0x214e, 0x223c, 0x223d, 0x2240, 0x223b, 0x223e, 0x223f, 0x224d,
+  0x225b, 0x225c, 0x225d, 0x225a, 0x2121, 0x2122, 0x2123, 0x2128,
+  0x2134, 0x2135, 0x2136, 0x2137, 0x2138, 0x2139, 0x213a, 0x213b,
+  0x213c, 0x213d, 0x216b, 0x2132, 0x2133, 0x2a21, 0x2a22, 0x2a23,
+  0x2a24, 0x2a25, 0x2a26, 0x2a27, 0x2a28, 0x2a29, 0x2a2a, 0x2a2b,
+  0x2a2c, 0x2a2d, 0x2a2e, 0x2a2f, 0x2a30, 0x2a31, 0x2a32, 0x2a33,
+  0x2a34, 0x2a35, 0x2a36, 0x2a37, 0x2a38, 0x2a39, 0x2a3a, 0x2a3b,
+  0x2a3c, 0x2a3d, 0x2a3e, 0x2a3f, 0x2a40, 0x2a41, 0x2a42, 0x2a43,
+  0x2a44, 0x2a45, 0x2a46, 0x2a47, 0x2a48, 0x2a49, 0x2a4a, 0x2a4b,
+  0x2a4c, 0x2a4d, 0x2a4e, 0x2a4f, 0x2a50, 0x2a51, 0x2a52, 0x2a53,
+  0x2a54, 0x2a55, 0x2a56, 0x2a57, 0x2a58, 0x2a59, 0x2a5a, 0x2a5b,
+  0x2a5c, 0x2a5d, 0x2a5e, 0x2a5f, 0x2a60, 0x2a61, 0x2a62, 0x2a63,
+  0x2a64, 0x2a65, 0x2a66, 0x2a67, 0x2a68, 0x2a69, 0x2a6a, 0x2a6b,
+  0x2a6c, 0x2a6d, 0x2a6e, 0x2a6f, 0x2a70, 0x2a71, 0x2a72, 0x2a73,
+  0x2b21, 0x2b22, 0x2b23, 0x2b24, 0x2b25, 0x2b26, 0x2b27, 0x2b28,
+  0x2b29, 0x2b2a, 0x2b2b, 0x2b2c, 0x2b2d, 0x2b2e, 0x2b2f, 0x2b30,
+  0x2b31, 0x2b32, 0x2b33, 0x2b34, 0x2b35, 0x2b36, 0x2b37, 0x2b38,
+  0x2b39, 0x2b3a, 0x2b3b, 0x2b3c, 0x2b3d, 0x2b3e, 0x2b3f, 0x2b40,
+  0x2b41, 0x2b42, 0x2b43, 0x2b44, 0x2b45, 0x2b46, 0x2b47, 0x2b48,
+  0x2b49, 0x2b4a, 0x2b4b, 0x2b4c, 0x2b4d, 0x2b4e, 0x2b4f, 0x2b50,
+  0x2b51, 0x2b52, 0x2b53, 0x2b54, 0x2b55, 0x2b56, 0x2b57, 0x2b58,
+  0x2b59, 0x2b5a, 0x2b5b, 0x2b5c, 0x2b5d, 0x2b5e, 0x2b5f, 0x2b60,
+  0x2b61, 0x2b62, 0x2b63, 0x2b64, 0x2b65, 0x2b66, 0x2b67, 0x2b68,
+  0x2b69, 0x2b6a, 0x2b6b, 0x2b6c, 0x2b6d, 0x2b6e, 0x2b6f, 0x2b70,
+  0x2b71, 0x2b72, 0x2b73, 0x2b74, 0x2b75, 0x2b76, 0x2421, 0x2422,
+  0x2423, 0x2424, 0x2425, 0x2426, 0x2427, 0x2428, 0x2429, 0x242a,
+  0x242b, 0x242c, 0x242d, 0x242e, 0x242f, 0x2430, 0x2431, 0x2432,
+  0x2433, 0x2434, 0x2435, 0x2436, 0x2437, 0x2438, 0x2439, 0x243a,
+  0x243b, 0x243c, 0x243d, 0x243e, 0x243f, 0x2440, 0x2441, 0x2442,
+  0x2443, 0x2444, 0x2445, 0x2446, 0x2447, 0x2448, 0x2449, 0x244a,
+  0x244b, 0x244c, 0x244d, 0x244e, 0x244f, 0x2450, 0x2451, 0x2452,
+  0x2453, 0x2454, 0x2455, 0x2456, 0x2457, 0x2458, 0x2459, 0x245a,
+  0x245b, 0x245c, 0x245d, 0x245e, 0x245f, 0x2460, 0x2461, 0x2462,
+  0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246a,
+  0x246b, 0x246c, 0x246d, 0x246e, 0x246f, 0x2470, 0x2471, 0x2472,
+  0x2473, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a,
+  0x247b, 0x247c, 0x247d, 0x247e, 0x2931, 0x2932, 0x2933, 0x2934,
+  0x2935, 0x2936, 0x2937, 0x2938, 0x2939, 0x293a, 0x293b, 0x293c,
+  0x293d, 0x293e, 0x293f, 0x2940, 0x2941, 0x2942, 0x2943, 0x2944,
+  0x2945, 0x2946, 0x2947, 0x2948, 0x2949, 0x294a, 0x294b, 0x294c,
+  0x225f, 0x2831, 0x2832, 0x2833, 0x2834, 0x2835, 0x2836, 0x2837,
+  0x2838, 0x2839, 0x283a, 0x283b, 0x283c, 0x283d, 0x283e, 0x283f,
+  0x2840, 0x2841, 0x2842, 0x2843, 0x2844, 0x2845, 0x2846, 0x2847,
+  0x2848, 0x2849, 0x284a, 0x284b, 0x284c, 0x225e, 0x2749, 0x274a,
+  0x274b, 0x274c, 0x274d, 0x273a, 0x273b, 0x275c, 0x275d, 0x275e,
+  0x2736, 0x2737, 0x2738, 0x2754, 0x2755, 0x2756, 0x2757, 0x2758,
+  0x2721, 0x2722, 0x2723, 0x2725, 0x272b, 0x272c, 0x272d, 0x272e,
+  0x272f, 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2727, 0x2728,
+  0x2729, 0x272a, 0x273d, 0x273e, 0x2765, 0x2766, 0x2767, 0x2768,
+  0x2761, 0x2762, 0x2763, 0x273f, 0x2740, 0x2741, 0x2742, 0x2743,
+  0x2744, 0x2745, 0x2746, 0x2747, 0x2748, 0x274e, 0x274f, 0x2750,
+  0x2751, 0x2752, 0x2753, 0x275a, 0x275b, 0x2263, 0x276c, 0x2726,
+  0x2760, 0x276f, 0x2261, 0x273c, 0x276d, 0x2735, 0x2739, 0x276a,
+  0x276b, 0x275f, 0x2264, 0x2764, 0x276e, 0x2769, 0x6c69, 0x6f4b,
+  0x7652, 0x5832, 0x6d5b, 0x5f32, 0x5f3e, 0x793b, 0x5c74, 0x7564,
+  0x7326, 0x5d60, 0x6126, 0x4e78, 0x5c30, 0x632a, 0x7169, 0x4d7a,
+  0x7c2f, 0x5321, 0x712b, 0x6751, 0x522c, 0x4e79, 0x717d, 0x5e3f,
+  0x7b3a, 0x7939, 0x4e52, 0x632b, 0x6b60, 0x4e7a, 0x4b77, 0x6525,
+  0x4a61, 0x544c, 0x6a61, 0x5c63, 0x5f2d, 0x4b6b, 0x552f, 0x5675,
+  0x6578, 0x5e40, 0x6c23, 0x694d, 0x6a27, 0x6976, 0x7b3b, 0x6769,
+  0x6f4c, 0x5066, 0x5e41, 0x642c, 0x584c, 0x7971, 0x4e5f, 0x7a24,
+  0x6632, 0x7a7b, 0x7a3d, 0x4c48, 0x6f4d, 0x5555, 0x5322, 0x6c51,
+  0x6427, 0x6c52, 0x7631, 0x4e7b, 0x5051, 0x4b3f, 0x6d24, 0x6d28,
+  0x5e42, 0x7662, 0x6d5c, 0x5c75, 0x6039, 0x544e, 0x7435, 0x535b,
+  0x5635, 0x6c24, 0x6466, 0x716a, 0x4b6c, 0x4b40, 0x6c72, 0x506a,
+  0x7972, 0x6c25, 0x505f, 0x676a, 0x506b, 0x5c51, 0x5b69, 0x7d4c,
+  0x5b57, 0x5a61, 0x5636, 0x635f, 0x5e43, 0x5e44, 0x4a21, 0x6e6c,
+  0x5323, 0x6e37, 0x784f, 0x6a48, 0x6e38, 0x712c, 0x7125, 0x694e,
+  0x793c, 0x6579, 0x6c6a, 0x5d56, 0x6d42, 0x7825, 0x653a, 0x5b58,
+  0x4a22, 0x514d, 0x6e6d, 0x6c6b, 0x5e45, 0x6360, 0x4a49, 0x7269,
+  0x554e, 0x7636, 0x4e42, 0x5647, 0x6334, 0x712d, 0x6a62, 0x5742,
+  0x7327, 0x4d6a, 0x6b6e, 0x5932, 0x7d25, 0x7655, 0x5562, 0x7835,
+  0x4c75, 0x7535, 0x642d, 0x676b, 0x7155, 0x703b, 0x6935, 0x4c49,
+  0x7a55, 0x6154, 0x5756, 0x5c41, 0x5e46, 0x7a6f, 0x6361, 0x6173,
+  0x5c76, 0x4e7c, 0x5b44, 0x7871, 0x5c64, 0x656f, 0x5c31, 0x5556,
+  0x735a, 0x4b41, 0x5b43, 0x597a, 0x536e, 0x7a38, 0x7d26, 0x6b6f,
+  0x7426, 0x4c4a, 0x7328, 0x735b, 0x5b27, 0x7637, 0x4f66, 0x7072,
+  0x4b5a, 0x6752, 0x5743, 0x7670, 0x685e, 0x6526, 0x6567, 0x4a23,
+  0x4c27, 0x6a49, 0x7836, 0x7a25, 0x712e, 0x6f4e, 0x4b6d, 0x7630,
+  0x6f4f, 0x694f, 0x775e, 0x4e53, 0x5c77, 0x5b28, 0x4b78, 0x5f21,
+  0x5d61, 0x754a, 0x6936, 0x676c, 0x6e6e, 0x7370, 0x5f3f, 0x4c4b,
+  0x5041, 0x7452, 0x603a, 0x5f40, 0x4e60, 0x5c52, 0x7d6a, 0x5676,
+  0x6a4a, 0x6869, 0x632c, 0x7350, 0x4a24, 0x5b78, 0x5e47, 0x6b70,
+  0x7156, 0x6562, 0x4c4c, 0x4b7b, 0x6a63, 0x5f41, 0x566d, 0x6950,
+  0x6e39, 0x5563, 0x5153, 0x6570, 0x6834, 0x6b43, 0x6a2a, 0x7a7c,
+  0x7576, 0x703c, 0x7d54, 0x603b, 0x4e43, 0x503a, 0x773a, 0x5873,
+  0x774d, 0x642e, 0x545f, 0x5067, 0x6c7d, 0x522e, 0x6e6f, 0x5557,
+  0x6a64, 0x7822, 0x4d6b, 0x573f, 0x7b31, 0x4d6c, 0x5c32, 0x506c,
+  0x4e7d, 0x6e70, 0x4c42, 0x506d, 0x6577, 0x737c, 0x6e22, 0x5933,
+  0x5874, 0x6937, 0x4e2e, 0x5922, 0x5871, 0x544f, 0x6527, 0x5552,
+  0x5629, 0x7422, 0x7157, 0x5558, 0x703d, 0x5750, 0x5450, 0x574f,
+  0x6b6a, 0x7d6b, 0x5b6d, 0x7c45, 0x4b42, 0x7d55, 0x7448, 0x686a,
+  0x7573, 0x795e, 0x536f, 0x6c53, 0x5d42, 0x6f37, 0x6754, 0x4a4a,
+  0x597b, 0x7a7d, 0x562a, 0x7478, 0x7777, 0x5c2c, 0x5757, 0x5f22,
+  0x4e3e, 0x5370, 0x7024, 0x616c, 0x4f67, 0x734b, 0x6d29, 0x4a3e,
+  0x746f, 0x764e, 0x5e7b, 0x503b, 0x5537, 0x6e71, 0x7428, 0x5c78,
+  0x4b27, 0x5a4e, 0x6066, 0x6d25, 0x6e72, 0x5c79, 0x795c, 0x735c,
+  0x7872, 0x7479, 0x7c71, 0x503c, 0x5b79, 0x5731, 0x4b7c, 0x7025,
+  0x4b7d, 0x5574, 0x4d6d, 0x4a25, 0x562b, 0x5042, 0x703e, 0x523d,
+  0x4c24, 0x7a36, 0x4c4d, 0x5a7a, 0x764f, 0x6938, 0x5875, 0x4c4e,
+  0x574d, 0x5451, 0x696d, 0x4a6b, 0x5962, 0x7d32, 0x632d, 0x564c,
+  0x5934, 0x6127, 0x6e53, 0x5043, 0x7d33, 0x5564, 0x4f68, 0x6d43,
+  0x5032, 0x4e7e, 0x5a28, 0x7850, 0x7d56, 0x7851, 0x7852, 0x5c53,
+  0x5d62, 0x7b79, 0x5d41, 0x6335, 0x6d5d, 0x4e44, 0x4b21, 0x5d63,
+  0x7c5d, 0x792f, 0x527b, 0x4f21, 0x6428, 0x7436, 0x6c7e, 0x632e,
+  0x676d, 0x7d41, 0x5a62, 0x5833, 0x5d64, 0x706f, 0x7671, 0x7a70,
+  0x5175, 0x5a4f, 0x5c54, 0x5c26, 0x6f3f, 0x4e4f, 0x6059, 0x5956,
+  0x6c54, 0x6a4b, 0x4a3f, 0x5530, 0x4f69, 0x716d, 0x4c4f, 0x6478,
+  0x646d, 0x5758, 0x7d27, 0x6a2b, 0x7632, 0x4f70, 0x793d, 0x6674,
+  0x4b5b, 0x7351, 0x6951, 0x7329, 0x5060, 0x6952, 0x5a63, 0x6252,
+  0x7622, 0x6174, 0x5a64, 0x6755, 0x753f, 0x4f22, 0x4d2f, 0x4f23,
+  0x4d30, 0x717e, 0x5023, 0x612f, 0x7823, 0x4a26, 0x773b, 0x726a,
+  0x5e48, 0x6953, 0x5e49, 0x7d5e, 0x4a40, 0x796a, 0x514e, 0x6e54,
+  0x5452, 0x5923, 0x7d28, 0x5759, 0x774e, 0x7a3e, 0x4f56, 0x5770,
+  0x6b61, 0x7845, 0x5c7a, 0x5d43, 0x795f, 0x676f, 0x7d65, 0x7623,
+  0x597c, 0x7d29, 0x676e, 0x5565, 0x6f50, 0x4d31, 0x7722, 0x7132,
+  0x7131, 0x4d32, 0x5a2b, 0x4a27, 0x6362, 0x7b3c, 0x5924, 0x6e3a,
+  0x7853, 0x7b7a, 0x4f24, 0x5c7b, 0x7663, 0x6d2a, 0x7221, 0x4e61,
+  0x7a26, 0x7960, 0x6c56, 0x646e, 0x7921, 0x7b6f, 0x796b, 0x6e23,
+  0x6a2c, 0x4a28, 0x747a, 0x4d56, 0x7c76, 0x7449, 0x7854, 0x7826,
+  0x5e4a, 0x7246, 0x575a, 0x5350, 0x5845, 0x6a66, 0x735d, 0x645a,
+  0x7664, 0x7672, 0x5f42, 0x597d, 0x4c76, 0x533a, 0x642f, 0x7961,
+  0x7026, 0x4b53, 0x603c, 0x744a, 0x547a, 0x7d2a, 0x7962, 0x7437,
+  0x7d42, 0x7c30, 0x7d6c, 0x4a62, 0x7d3d, 0x6a67, 0x5f43, 0x5152,
+  0x4e62, 0x5324, 0x7d2b, 0x5f60, 0x7247, 0x6770, 0x506e, 0x732a,
+  0x5e4b, 0x7638, 0x6175, 0x7133, 0x7723, 0x4a29, 0x4f25, 0x5f44,
+  0x6130, 0x703f, 0x7624, 0x6336, 0x7a46, 0x506f, 0x7d6d, 0x5d44,
+  0x7c77, 0x663f, 0x5e2d, 0x7a3f, 0x6571, 0x6d44, 0x5225, 0x7d6e,
+  0x7536, 0x6176, 0x5e4c, 0x7c5e, 0x6c57, 0x4d5d, 0x5637, 0x4d33,
+  0x7855, 0x6558, 0x4f6a, 0x4f50, 0x6a4c, 0x6a2e, 0x6a2d, 0x5371,
+  0x5325, 0x774f, 0x6e24, 0x5024, 0x7222, 0x5070, 0x7223, 0x7778,
+  0x5033, 0x5b29, 0x533b, 0x4a6c, 0x7126, 0x4b55, 0x7767, 0x4d5e,
+  0x7724, 0x7840, 0x535d, 0x4c50, 0x4f26, 0x7673, 0x6177, 0x535c,
+  0x7a7e, 0x7a27, 0x6b59, 0x4f27, 0x6a2f, 0x646f, 0x6939, 0x7158,
+  0x5858, 0x6072, 0x6634, 0x5c7c, 0x7371, 0x6350, 0x727b, 0x5b46,
+  0x5071, 0x5072, 0x4f5c, 0x5351, 0x4c31, 0x7758, 0x4b28, 0x6b3c,
+  0x643e, 0x745c, 0x5c42, 0x7027, 0x6640, 0x4a6d, 0x686b, 0x6568,
+  0x5c43, 0x6d5e, 0x5372, 0x4c77, 0x4e54, 0x672b, 0x4b43, 0x6131,
+  0x7732, 0x5373, 0x5352, 0x7540, 0x5f5d, 0x6e73, 0x6771, 0x7d34,
+  0x7248, 0x7352, 0x6e74, 0x6253, 0x4c51, 0x5f6a, 0x693a, 0x5957,
+  0x754d, 0x7172, 0x7a47, 0x5978, 0x5442, 0x7665, 0x5d45, 0x6772,
+  0x6d5f, 0x4a4b, 0x5b7a, 0x6835, 0x5326, 0x7d35, 0x7949, 0x6462,
+  0x7b3d, 0x5724, 0x4e45, 0x4e55, 0x5666, 0x653d, 0x5e4d, 0x6c73,
+  0x6d60, 0x6c6c, 0x7b3e, 0x5f6b, 0x6178, 0x793e, 0x5073, 0x602a,
+  0x6862, 0x6254, 0x527d, 0x6528, 0x5953, 0x535e, 0x7438, 0x773c,
+  0x5c7d, 0x686c, 0x6467, 0x6377, 0x6c28, 0x7a71, 0x6572, 0x5074,
+  0x522f, 0x5c65, 0x5025, 0x7134, 0x7c31, 0x4c78, 0x5d46, 0x7a51,
+  0x775f, 0x7a28, 0x6e75, 0x5e4e, 0x6773, 0x772c, 0x6b44, 0x6d61,
+  0x602b, 0x5d47, 0x5233, 0x523f, 0x4a4c, 0x7b3f, 0x657d, 0x5d65,
+  0x584d, 0x6c74, 0x5075, 0x686d, 0x5052, 0x5958, 0x7666, 0x5b2a,
+  0x7760, 0x5859, 0x7423, 0x745d, 0x6f51, 0x5935, 0x6d2b, 0x6337,
+  0x6e3b, 0x4d34, 0x6073, 0x6a4d, 0x6c75, 0x686e, 0x4b29, 0x712f,
+  0x4a4d, 0x6c29, 0x726b, 0x7d6f, 0x7973, 0x6641, 0x6c58, 0x6d2c,
+  0x6a4e, 0x685f, 0x5e4f, 0x5226, 0x6774, 0x5156, 0x6642, 0x6363,
+  0x6430, 0x5834, 0x7625, 0x735e, 0x5725, 0x7768, 0x6846, 0x7b66,
+  0x5d66, 0x5c7e, 0x585a, 0x5a2c, 0x6a30, 0x6338, 0x4a2a, 0x6179,
+  0x6a31, 0x726c, 0x7a6e, 0x6e55, 0x7974, 0x526c, 0x7b7b, 0x7d70,
+  0x603d, 0x4e63, 0x7846, 0x5e2e, 0x5f45, 0x653e, 0x6d2d, 0x7a6a,
+  0x4d6e, 0x6d26, 0x6d2e, 0x706d, 0x5d21, 0x6d2f, 0x7c78, 0x586b,
+  0x4c79, 0x4d35, 0x7a29, 0x615d, 0x6255, 0x6d4f, 0x5d22, 0x794a,
+  0x6a68, 0x656d, 0x536b, 0x6954, 0x617a, 0x644c, 0x6164, 0x6847,
+  0x4e5b, 0x5c55, 0x7735, 0x7c73, 0x7073, 0x4e2f, 0x7135, 0x6f52,
+  0x6848, 0x6b71, 0x4b54, 0x603e, 0x6378, 0x6a69, 0x7c32, 0x6074,
+  0x4f60, 0x6e25, 0x7a2a, 0x6643, 0x6132, 0x4a2b, 0x6364, 0x693b,
+  0x6256, 0x7372, 0x6e56, 0x6a32, 0x5076, 0x6c59, 0x5a4b, 0x4f28,
+  0x5d23, 0x585b, 0x794e, 0x6955, 0x6351, 0x523c, 0x582c, 0x734c,
+  0x4d7b, 0x7656, 0x6775, 0x686f, 0x6379, 0x523b, 0x7373, 0x637b,
+  0x5e50, 0x4e30, 0x5677, 0x7159, 0x7541, 0x5c44, 0x753b, 0x5e51,
+  0x5c66, 0x5e52, 0x6d62, 0x6e76, 0x6a4f, 0x706e, 0x637c, 0x535f,
+  0x5374, 0x6133, 0x6134, 0x7453, 0x5f46, 0x6956, 0x5b2b, 0x7626,
+  0x6339, 0x6b45, 0x7429, 0x4d36, 0x5279, 0x5a2d, 0x5263, 0x4f51,
+  0x4b5c, 0x4c7a, 0x4f5d, 0x6829, 0x633b, 0x633a, 0x605a, 0x6e77,
+  0x5c33, 0x5375, 0x5726, 0x7635, 0x575b, 0x6155, 0x546a, 0x5f23,
+  0x7d5f, 0x5077, 0x6d54, 0x4b2a, 0x645b, 0x617b, 0x4b22, 0x5360,
+  0x643f, 0x7b40, 0x5a3e, 0x644d, 0x5639, 0x6f40, 0x617c, 0x7639,
+  0x5f47, 0x6431, 0x5c67, 0x5c68, 0x7a56, 0x5376, 0x715a, 0x7a72,
+  0x627d, 0x554f, 0x5078, 0x4d5f, 0x754b, 0x6470, 0x4b2b, 0x5744,
+  0x627e, 0x5d5a, 0x5a2e, 0x4a6e, 0x5539, 0x6321, 0x6863, 0x732b,
+  0x4f29, 0x5377, 0x5471, 0x4e64, 0x6872, 0x6575, 0x672e, 0x563a,
+  0x5f6c, 0x6440, 0x6864, 0x5835, 0x645c, 0x7439, 0x7136, 0x625e,
+  0x6135, 0x4d6f, 0x7127, 0x4e65, 0x4b5d, 0x5963, 0x732c, 0x5079,
+  0x6c2b, 0x5e53, 0x7769, 0x7975, 0x615e, 0x4b6e, 0x633c, 0x7856,
+  0x5b6e, 0x7d71, 0x7736, 0x745e, 0x726d, 0x5b59, 0x7028, 0x617d,
+  0x5e54, 0x602c, 0x6d63, 0x5361, 0x5f48, 0x5936, 0x7d2c, 0x6f53,
+  0x6441, 0x786b, 0x5b2c, 0x7c46, 0x582d, 0x763a, 0x5b5f, 0x5353,
+  0x7847, 0x4a4e, 0x7841, 0x5234, 0x5c34, 0x7a39, 0x4a4f, 0x7c33,
+  0x6a6a, 0x6a6b, 0x507a, 0x6d64, 0x5d67, 0x5f49, 0x5f6d, 0x6e3c,
+  0x6f41, 0x4c52, 0x5d24, 0x5f4a, 0x5378, 0x7128, 0x4d37, 0x6f54,
+  0x645d, 0x5f6e, 0x4b2c, 0x693c, 0x6a6c, 0x5f4b, 0x793f, 0x562f,
+  0x5546, 0x4f2a, 0x4e29, 0x5678, 0x7137, 0x6e78, 0x5959, 0x735f,
+  0x7848, 0x4e46, 0x5566, 0x7466, 0x6645, 0x6f55, 0x4b6f, 0x7c5f,
+  0x5c27, 0x5667, 0x7849, 0x6352, 0x633d, 0x4f61, 0x7040, 0x6c5a,
+  0x5d57, 0x7b70, 0x6c2c, 0x7029, 0x7a57, 0x7b41, 0x5240, 0x6530,
+  0x6d65, 0x4b2d, 0x7930, 0x7725, 0x4b2e, 0x5a2f, 0x5836, 0x5327,
+  0x7b32, 0x7d44, 0x6c2d, 0x7b21, 0x6569, 0x696e, 0x7374, 0x7873,
+  0x7041, 0x5e2f, 0x7830, 0x7360, 0x672f, 0x5b2d, 0x6635, 0x7928,
+  0x5d58, 0x6859, 0x6f56, 0x5362, 0x625f, 0x7c60, 0x5748, 0x7d2d,
+  0x5f6f, 0x4c53, 0x5379, 0x5470, 0x5b47, 0x5e55, 0x7074, 0x5550,
+  0x6559, 0x7c47, 0x5c56, 0x6260, 0x5a30, 0x7323, 0x536c, 0x744b,
+  0x7d45, 0x637d, 0x7931, 0x507b, 0x6c5b, 0x753c, 0x7224, 0x584e,
+  0x584f, 0x7577, 0x7661, 0x5237, 0x7b6c, 0x5d48, 0x6468, 0x5241,
+  0x7857, 0x563b, 0x5e56, 0x773d, 0x6c2e, 0x5061, 0x6075, 0x6a33,
+  0x4e56, 0x4c25, 0x6c76, 0x6261, 0x633e, 0x7c48, 0x4d70, 0x7976,
+  0x5f70, 0x653f, 0x4e3f, 0x7c61, 0x6d30, 0x7d51, 0x763b, 0x794f,
+  0x6b5a, 0x4a41, 0x5238, 0x4d71, 0x6353, 0x7d66, 0x666d, 0x637a,
+  0x702a, 0x7950, 0x7c62, 0x7827, 0x6165, 0x6e79, 0x6776, 0x6a6d,
+  0x7c34, 0x7542, 0x575c, 0x7075, 0x5d68, 0x536d, 0x757c, 0x5a3f,
+  0x4c7b, 0x537a, 0x7424, 0x6f57, 0x5443, 0x7b63, 0x7b6d, 0x602d,
+  0x6a6e, 0x7b33, 0x6442, 0x7667, 0x525d, 0x5f4c, 0x7c49, 0x6529,
+  0x6076, 0x7633, 0x617e, 0x4b70, 0x6a6f, 0x6a70, 0x5a40, 0x7834,
+  0x6b72, 0x6443, 0x6957, 0x6471, 0x4a6f, 0x4e57, 0x7c4a, 0x7361,
+  0x4b44, 0x6365, 0x4b45, 0x6a34, 0x693d, 0x5749, 0x6b5b, 0x6d31,
+  0x4c43, 0x773e, 0x7c4b, 0x7874, 0x5937, 0x7353, 0x7354, 0x7764,
+  0x7751, 0x5837, 0x4e31, 0x4a42, 0x7b34, 0x4b46, 0x7076, 0x5567,
+  0x6a50, 0x4c54, 0x4b2f, 0x742a, 0x692f, 0x7543, 0x6958, 0x5d69,
+  0x7173, 0x557b, 0x5e3b, 0x747b, 0x7d73, 0x7d72, 0x7726, 0x5d49,
+  0x5453, 0x4c28, 0x5a41, 0x4c55, 0x5964, 0x7a4a, 0x6563, 0x533c,
+  0x4a70, 0x5044, 0x4a50, 0x7a2b, 0x6b6b, 0x6778, 0x5965, 0x5157,
+  0x7324, 0x547b, 0x7c63, 0x7a58, 0x7355, 0x4f2b, 0x6b73, 0x557c,
+  0x5354, 0x4d7c, 0x5966, 0x6279, 0x6221, 0x6b54, 0x6077, 0x6432,
+  0x4c7c, 0x7b64, 0x742b, 0x503d, 0x4a71, 0x6f38, 0x5740, 0x6e7a,
+  0x7d74, 0x5363, 0x7b42, 0x5568, 0x5b2e, 0x6136, 0x7837, 0x603f,
+  0x7b43, 0x5d6a, 0x6222, 0x6e26, 0x7668, 0x7675, 0x5d4a, 0x5062,
+  0x5d26, 0x5d6b, 0x6479, 0x632f, 0x507c, 0x747c, 0x4c3c, 0x776a,
+  0x6564, 0x5f71, 0x7761, 0x7977, 0x6f39, 0x7858, 0x7929, 0x7859,
+  0x6e3d, 0x5846, 0x6463, 0x754e, 0x5d59, 0x5967, 0x5239, 0x5543,
+  0x5a65, 0x5a50, 0x5159, 0x4e58, 0x4b5e, 0x742c, 0x5a7b, 0x7669,
+  0x6873, 0x4f2c, 0x7070, 0x747d, 0x5b48, 0x4e40, 0x6354, 0x514f,
+  0x7175, 0x4d72, 0x4f6b, 0x4d38, 0x6326, 0x515a, 0x7225, 0x7226,
+  0x644e, 0x537b, 0x7129, 0x7249, 0x6f58, 0x6649, 0x5838, 0x7a73,
+  0x7335, 0x7824, 0x5173, 0x6648, 0x785a, 0x5c69, 0x5e57, 0x4b5f,
+  0x4f6c, 0x745f, 0x5174, 0x523a, 0x5f72, 0x6137, 0x6223, 0x537c,
+  0x6d66, 0x5b49, 0x647a, 0x4f5e, 0x4e50, 0x5553, 0x7375, 0x772e,
+  0x6f48, 0x4d73, 0x754f, 0x6573, 0x7042, 0x4a51, 0x6a71, 0x5026,
+  0x595a, 0x702b, 0x6b67, 0x6540, 0x7c35, 0x6444, 0x4c29, 0x7d46,
+  0x6a35, 0x652a, 0x5f3a, 0x615f, 0x5a51, 0x6138, 0x6874, 0x537d,
+  0x6224, 0x724a, 0x5a66, 0x7733, 0x7d4d, 0x7336, 0x6e57, 0x7544,
+  0x5824, 0x7227, 0x5938, 0x5939, 0x6f49, 0x564e, 0x774b, 0x5f2e,
+  0x6875, 0x5235, 0x5355, 0x744c, 0x5a7c, 0x5968, 0x776b, 0x7549,
+  0x733c, 0x5a52, 0x5335, 0x6836, 0x564f, 0x743a, 0x7749, 0x4c2a,
+  0x7043, 0x4c56, 0x5053, 0x533d, 0x5b7b, 0x4b60, 0x5364, 0x7677,
+  0x553a, 0x734d, 0x4b61, 0x6b74, 0x742d, 0x7c2a, 0x776c, 0x6876,
+  0x5a67, 0x774c, 0x6541, 0x606e, 0x557d, 0x4e66, 0x7c2b, 0x553b,
+  0x7228, 0x6225, 0x4d39, 0x6a72, 0x4b47, 0x4d74, 0x5b2f, 0x6f59,
+  0x4d3a, 0x7c79, 0x5f73, 0x4e67, 0x5a42, 0x4f2d, 0x6779, 0x7828,
+  0x7362, 0x4a72, 0x5f24, 0x5444, 0x4c57, 0x6542, 0x4d3b, 0x6f5a,
+  0x6e58, 0x5d27, 0x6226, 0x6040, 0x5630, 0x784a, 0x7c7a, 0x597e,
+  0x5e30, 0x5d6c, 0x5a68, 0x5460, 0x5679, 0x4d57, 0x5e58, 0x7278,
+  0x6456, 0x5045, 0x742e, 0x5d28, 0x6d45, 0x7356, 0x5e59, 0x6366,
+  0x5328, 0x5b30, 0x655a, 0x633f, 0x5b31, 0x5569, 0x6041, 0x6f5b,
+  0x7069, 0x5732, 0x507d, 0x5969, 0x507e, 0x6c6d, 0x5329, 0x7229,
+  0x7044, 0x6262, 0x696f, 0x7951, 0x6959, 0x685a, 0x5a43, 0x5a44,
+  0x5445, 0x677a, 0x4d60, 0x6330, 0x5b32, 0x7b44, 0x7363, 0x5925,
+  0x7b67, 0x5d4b, 0x5054, 0x6636, 0x602e, 0x7d5a, 0x5c35, 0x6078,
+  0x6731, 0x7570, 0x585c, 0x6d46, 0x6139, 0x6340, 0x7940, 0x6970,
+  0x595b, 0x7364, 0x5c36, 0x6469, 0x7045, 0x6341, 0x7c4c, 0x7c4d,
+  0x724b, 0x724c, 0x644f, 0x715b, 0x7a59, 0x7138, 0x7d75, 0x6079,
+  0x677b, 0x7c37, 0x7c64, 0x7b45, 0x6367, 0x5839, 0x7678, 0x5c45,
+  0x4c58, 0x602f, 0x7467, 0x6f5c, 0x4f7c, 0x6f5d, 0x722a, 0x7d3e,
+  0x4a2c, 0x7d3b, 0x7d47, 0x6732, 0x6a51, 0x5f74, 0x516c, 0x645e,
+  0x6543, 0x5926, 0x4d3c, 0x7365, 0x6d55, 0x593a, 0x6d67, 0x7b35,
+  0x786c, 0x6067, 0x4c59, 0x5446, 0x6725, 0x5575, 0x533e, 0x7c7b,
+  0x6472, 0x5f75, 0x6878, 0x786d, 0x4e47, 0x7d76, 0x6858, 0x4d58,
+  0x6756, 0x4c5a, 0x4a63, 0x5f76, 0x7047, 0x7046, 0x583a, 0x7174,
+  0x7470, 0x754c, 0x7c65, 0x6a45, 0x6a73, 0x5d5b, 0x5c57, 0x5e7d,
+  0x7279, 0x5547, 0x5850, 0x7048, 0x5121, 0x5122, 0x5954, 0x5668,
+  0x594a, 0x5a31, 0x5847, 0x5c62, 0x734e, 0x7574, 0x7139, 0x5a53,
+  0x766a, 0x4f75, 0x7d2e, 0x4a52, 0x5f34, 0x575d, 0x7a3a, 0x6e27,
+  0x753d, 0x7875, 0x6d68, 0x5461, 0x5123, 0x6156, 0x7978, 0x5b4a,
+  0x4b79, 0x5454, 0x595c, 0x6e3e, 0x776d, 0x526e, 0x6166, 0x7779,
+  0x5d6d, 0x685b, 0x5b33, 0x5177, 0x6030, 0x5462, 0x7657, 0x5779,
+  0x585d, 0x4d7d, 0x722b, 0x4d3d, 0x7842, 0x722c, 0x4a2d, 0x4a2e,
+  0x4f2e, 0x6342, 0x5c37, 0x5b5a, 0x593b, 0x4a73, 0x7653, 0x6678,
+  0x6a75, 0x6a76, 0x7679, 0x4f2f, 0x4a53, 0x4a2f, 0x5230, 0x713a,
+  0x5733, 0x6343, 0x737d, 0x5e5a, 0x5e5b, 0x6f5e, 0x6263, 0x6e7b,
+  0x5f77, 0x574a, 0x4e68, 0x5b5b, 0x713b, 0x6971, 0x7a37, 0x5046,
+  0x4c2b, 0x6e28, 0x4b7a, 0x7979, 0x4c7d, 0x537e, 0x6450, 0x726e,
+  0x5455, 0x5f4d, 0x7c38, 0x5150, 0x724d, 0x7752, 0x4a54, 0x5559,
+  0x585e, 0x4d59, 0x6e29, 0x763c, 0x4c5b, 0x7049, 0x7c7c, 0x6849,
+  0x747e, 0x677c, 0x575e, 0x5e5c, 0x702c, 0x4c7e, 0x4d61, 0x613a,
+  0x5b6f, 0x5a32, 0x5125, 0x5c38, 0x5876, 0x5124, 0x4d62, 0x5c6a,
+  0x7077, 0x704a, 0x503e, 0x5d5c, 0x5456, 0x5356, 0x6d50, 0x4d21,
+  0x5f35, 0x5f78, 0x5421, 0x4e32, 0x684a, 0x6b75, 0x6355, 0x7550,
+  0x7521, 0x5927, 0x652b, 0x664b, 0x7571, 0x6545, 0x7923, 0x605b,
+  0x766b, 0x4b71, 0x596a, 0x7522, 0x5751, 0x5178, 0x6a78, 0x6a79,
+  0x5a33, 0x6f5f, 0x716f, 0x6576, 0x6e3f, 0x6264, 0x503f, 0x7a2c,
+  0x7551, 0x6733, 0x693e, 0x724e, 0x5b34, 0x7c4e, 0x5d6e, 0x6734,
+  0x5734, 0x7734, 0x4d3e, 0x5a69, 0x4f30, 0x7759, 0x7366, 0x4e59,
+  0x4e2a, 0x4b48, 0x5027, 0x704b, 0x5047, 0x6445, 0x5b60, 0x555a,
+  0x5727, 0x6e40, 0x7876, 0x7552, 0x6d69, 0x593c, 0x6546, 0x7523,
+  0x5a54, 0x6227, 0x7b7c, 0x715c, 0x4a74, 0x687a, 0x4e69, 0x6978,
+  0x6265, 0x5039, 0x5472, 0x5126, 0x5f4e, 0x7c74, 0x532a, 0x4c2c,
+  0x6f60, 0x6565, 0x5055, 0x5b7c, 0x7c66, 0x4b7e, 0x6d6a, 0x5e31,
+  0x7963, 0x5422, 0x4f76, 0x5650, 0x556a, 0x716e, 0x7a4b, 0x6521,
+  0x5531, 0x4f6d, 0x6d6b, 0x5532, 0x553c, 0x7d62, 0x732d, 0x7d5b,
+  0x6930, 0x5127, 0x7d63, 0x4e33, 0x7d64, 0x7a4e, 0x4a30, 0x7727,
+  0x4f31, 0x6622, 0x7c36, 0x722d, 0x6f61, 0x732e, 0x5c46, 0x596b,
+  0x6860, 0x6128, 0x5576, 0x4f7d, 0x5e5d, 0x5951, 0x646a, 0x724f,
+  0x773f, 0x6266, 0x6228, 0x6356, 0x6d51, 0x6979, 0x5631, 0x5e32,
+  0x6068, 0x532b, 0x6b5c, 0x5f2f, 0x4a43, 0x6e7c, 0x7d43, 0x6b76,
+  0x4f32, 0x596c, 0x593d, 0x585f, 0x5438, 0x6b3e, 0x5d6f, 0x5d70,
+  0x5d71, 0x5d72, 0x593e, 0x7b46, 0x4f33, 0x6e7d, 0x642b, 0x5a45,
+  0x586c, 0x5128, 0x6229, 0x5e3c, 0x6735, 0x5b70, 0x6f62, 0x7170,
+  0x4f34, 0x5b71, 0x6031, 0x5f25, 0x7952, 0x677d, 0x6623, 0x7b71,
+  0x4b30, 0x722e, 0x4d67, 0x685c, 0x6757, 0x7740, 0x5063, 0x5a21,
+  0x4c3d, 0x5129, 0x5d4c, 0x637e, 0x512a, 0x682a, 0x6a36, 0x797a,
+  0x664c, 0x7658, 0x5447, 0x594b, 0x5952, 0x534b, 0x5877, 0x5a29,
+  0x7578, 0x5e5e, 0x722f, 0x7829, 0x5848, 0x6e41, 0x7941, 0x5d73,
+  0x6a7a, 0x763d, 0x613b, 0x4d3f, 0x7454, 0x664d, 0x7c4f, 0x7b22,
+  0x605c, 0x743b, 0x5a55, 0x7932, 0x7b72, 0x5b76, 0x5e5f, 0x5b72,
+  0x785c, 0x776e, 0x6b68, 0x527a, 0x713c, 0x7a5a, 0x5a6a, 0x5a46,
+  0x7741, 0x6736, 0x6547, 0x562c, 0x5c47, 0x6129, 0x622a, 0x5526,
+  0x5457, 0x7250, 0x6a7b, 0x605d, 0x7b73, 0x713d, 0x6267, 0x7d57,
+  0x4e48, 0x6a37, 0x7c40, 0x7d67, 0x776f, 0x5735, 0x6f3a, 0x715d,
+  0x5e33, 0x684b, 0x785d, 0x7b47, 0x5548, 0x575f, 0x5d29, 0x6931,
+  0x7a2d, 0x7659, 0x7a74, 0x782a, 0x666e, 0x4c5c, 0x613c, 0x606f,
+  0x693f, 0x7c7d, 0x664e, 0x6157, 0x664f, 0x7471, 0x6473, 0x647b,
+  0x7964, 0x6f63, 0x4f6e, 0x763e, 0x6032, 0x7c7e, 0x512b, 0x577a,
+  0x7b48, 0x6257, 0x5423, 0x7078, 0x5728, 0x6167, 0x533f, 0x6f64,
+  0x5745, 0x6b62, 0x7c67, 0x6422, 0x6268, 0x6650, 0x7b68, 0x7468,
+  0x6574, 0x743c, 0x7455, 0x5f36, 0x7c39, 0x6e42, 0x4a75, 0x6f65,
+  0x4b62, 0x5424, 0x5e60, 0x5a7d, 0x6446, 0x683e, 0x605e, 0x7634,
+  0x6a52, 0x797b, 0x6042, 0x4a64, 0x6737, 0x6a7d, 0x595d, 0x5a34,
+  0x6e2a, 0x7b69, 0x5b4b, 0x5a35, 0x713e, 0x532c, 0x7b49, 0x5f4f,
+  0x5340, 0x6357, 0x6f66, 0x7c50, 0x6940, 0x7553, 0x6c5c, 0x7737,
+  0x6a38, 0x5179, 0x5c48, 0x6a39, 0x715e, 0x5736, 0x4f35, 0x5928,
+  0x6c6e, 0x5d2a, 0x4d22, 0x682e, 0x613d, 0x7251, 0x6941, 0x527c,
+  0x5b35, 0x7367, 0x587e, 0x7c51, 0x6d32, 0x742f, 0x7b23, 0x7c41,
+  0x6e2b, 0x5425, 0x7472, 0x6e59, 0x7b4a, 0x4d63, 0x583b, 0x655b,
+  0x7877, 0x7654, 0x5729, 0x4b49, 0x6651, 0x704c, 0x582e, 0x7953,
+  0x557e, 0x583c, 0x7230, 0x622b, 0x7368, 0x6f42, 0x6d6c, 0x6738,
+  0x5a7e, 0x4c3e, 0x727c, 0x5a6b, 0x6258, 0x6d56, 0x5651, 0x6033,
+  0x7c52, 0x6b48, 0x5341, 0x704d, 0x4f77, 0x6d52, 0x5458, 0x5c49,
+  0x5771, 0x5f3b, 0x7325, 0x744d, 0x713f, 0x7831, 0x697a, 0x7b4b,
+  0x4a55, 0x7954, 0x774a, 0x5648, 0x7c68, 0x733d, 0x6e7e, 0x677e,
+  0x5342, 0x5336, 0x4c2d, 0x767a, 0x5632, 0x5258, 0x6758, 0x6325,
+  0x6739, 0x702d, 0x7b4c, 0x6b21, 0x5426, 0x7b4d, 0x553d, 0x715f,
+  0x767b, 0x5e34, 0x556b, 0x6548, 0x7b24, 0x5439, 0x5e61, 0x6423,
+  0x5737, 0x786e, 0x5e35, 0x5652, 0x7955, 0x673a, 0x6b55, 0x5577,
+  0x6f67, 0x613e, 0x7a2e, 0x5669, 0x566e, 0x673b, 0x6c4b, 0x5533,
+  0x4e34, 0x7b25, 0x616e, 0x7728, 0x7b4e, 0x583d, 0x7b7d, 0x7c69,
+  0x4f36, 0x6d47, 0x6e2c, 0x4c5d, 0x7627, 0x667a, 0x7524, 0x7d5c,
+  0x6d33, 0x4e49, 0x6f68, 0x613f, 0x7a5b, 0x4b63, 0x7729, 0x7b26,
+  0x5c39, 0x7140, 0x6d48, 0x6f43, 0x562d, 0x7d4e, 0x6821, 0x7b74,
+  0x5527, 0x7176, 0x6653, 0x4c5e, 0x7832, 0x5c6b, 0x7d36, 0x656a,
+  0x7160, 0x5b4c, 0x5d4d, 0x5448, 0x596d, 0x7525, 0x667b, 0x6654,
+  0x7d48, 0x5621, 0x7d3f, 0x7c53, 0x6f21, 0x673c, 0x516e, 0x6655,
+  0x6972, 0x5f30, 0x5860, 0x7c3a, 0x7d2f, 0x704e, 0x5b61, 0x6549,
+  0x6d34, 0x6043, 0x6358, 0x697b, 0x6a28, 0x7d37, 0x7b27, 0x6942,
+  0x7d77, 0x6259, 0x5c6c, 0x6822, 0x6670, 0x7d78, 0x7d79, 0x763f,
+  0x6727, 0x6657, 0x5473, 0x5449, 0x567a, 0x5772, 0x6140, 0x5b62,
+  0x6658, 0x673d, 0x704f, 0x733e, 0x622c, 0x7537, 0x6070, 0x7d38,
+  0x6368, 0x5427, 0x687c, 0x7a52, 0x786f, 0x5653, 0x5534, 0x7050,
+  0x7770, 0x6e33, 0x6a3a, 0x6a53, 0x6d49, 0x5d2b, 0x652c, 0x7d21,
+  0x5f50, 0x6c33, 0x5f51, 0x6d6d, 0x7838, 0x777a, 0x782b, 0x7460,
+  0x543a, 0x6433, 0x695a, 0x5e36, 0x593f, 0x5940, 0x566f, 0x594c,
+  0x5a2a, 0x5f65, 0x7765, 0x4c32, 0x5f79, 0x5760, 0x543b, 0x7d7a,
+  0x4c33, 0x5b73, 0x5f52, 0x4e4a, 0x6e5a, 0x6464, 0x7b4f, 0x4f37,
+  0x6e43, 0x4e6a, 0x622d, 0x5761, 0x7a75, 0x5549, 0x782c, 0x6759,
+  0x7369, 0x586d, 0x6344, 0x7071, 0x6865, 0x607a, 0x6e44, 0x595e,
+  0x6b22, 0x6b23, 0x7c42, 0x6a3b, 0x682b, 0x5e62, 0x6d6f, 0x6823,
+  0x4f71, 0x543c, 0x7c6a, 0x673e, 0x7c72, 0x5634, 0x622e, 0x5337,
+  0x7a4c, 0x7a5c, 0x6d35, 0x6163, 0x682c, 0x685d, 0x6f69, 0x743d,
+  0x4f38, 0x695b, 0x512c, 0x5a47, 0x6b49, 0x684c, 0x5e37, 0x563c,
+  0x5365, 0x7a5d, 0x5a56, 0x4a31, 0x5a48, 0x5f26, 0x7933, 0x7252,
+  0x4a44, 0x4e4b, 0x4d75, 0x7d30, 0x5528, 0x7141, 0x6269, 0x5c4a,
+  0x6c34, 0x7a40, 0x7b28, 0x5028, 0x5a6c, 0x596e, 0x607b, 0x6f6a,
+  0x7a5e, 0x6044, 0x4f39, 0x554a, 0x5762, 0x622f, 0x5738, 0x684d,
+  0x765a, 0x6f22, 0x625a, 0x767c, 0x7b50, 0x512d, 0x4d64, 0x512e,
+  0x5c6d, 0x684e, 0x7079, 0x4e35, 0x667c, 0x577b, 0x5056, 0x5d75,
+  0x7771, 0x767d, 0x5b77, 0x7b6a, 0x695c, 0x5941, 0x7572, 0x6045,
+  0x6a54, 0x7942, 0x6a3c, 0x5245, 0x7b51, 0x6740, 0x6b25, 0x5f7a,
+  0x6322, 0x5739, 0x6943, 0x687d, 0x682f, 0x7253, 0x7b29, 0x5825,
+  0x554b, 0x5048, 0x512f, 0x5763, 0x6046, 0x5622, 0x6d70, 0x5773,
+  0x7c54, 0x5a57, 0x4c5f, 0x7254, 0x5130, 0x4c60, 0x5b7d, 0x733f,
+  0x7051, 0x7c3b, 0x6230, 0x6625, 0x625b, 0x5f5e, 0x6047, 0x726f,
+  0x4c61, 0x566a, 0x6742, 0x4e36, 0x7340, 0x4d7e, 0x7b52, 0x7878,
+  0x777b, 0x683f, 0x6837, 0x6d36, 0x5c3a, 0x4c34, 0x7177, 0x6838,
+  0x4a76, 0x6424, 0x7456, 0x5f66, 0x5f27, 0x5f67, 0x6141, 0x6944,
+  0x5c4b, 0x6945, 0x6f23, 0x6b26, 0x4b23, 0x6369, 0x517b, 0x6f24,
+  0x6f6b, 0x5034, 0x4d23, 0x6866, 0x6f25, 0x534c, 0x5a6d, 0x573a,
+  0x7255, 0x7565, 0x596f, 0x7934, 0x5554, 0x7d4f, 0x5b63, 0x7161,
+  0x6c36, 0x7b7e, 0x5357, 0x5131, 0x4b31, 0x5132, 0x4b32, 0x7142,
+  0x7461, 0x7935, 0x6143, 0x6142, 0x6b77, 0x5f28, 0x4b4a, 0x6639,
+  0x785e, 0x792a, 0x4a77, 0x6d37, 0x5338, 0x7256, 0x5459, 0x6e45,
+  0x7270, 0x4a32, 0x5c3b, 0x7178, 0x6c37, 0x654a, 0x7640, 0x7d5d,
+  0x5463, 0x4c62, 0x7754, 0x5765, 0x5343, 0x5826, 0x7641, 0x5d76,
+  0x4d40, 0x655c, 0x654b, 0x6144, 0x6830, 0x7430, 0x736a, 0x5a6e,
+  0x573b, 0x6231, 0x572a, 0x567b, 0x645f, 0x4a56, 0x6b28, 0x5b7e,
+  0x7642, 0x6f3b, 0x547d, 0x6048, 0x6839, 0x6f26, 0x4d24, 0x5474,
+  0x5b21, 0x5b5c, 0x5b5d, 0x6e5c, 0x4b4b, 0x7c55, 0x4e6b, 0x4d41,
+  0x7b53, 0x792b, 0x7554, 0x5929, 0x695d, 0x5b4d, 0x5d4e, 0x6743,
+  0x6c4c, 0x796c, 0x4b4c, 0x607c, 0x5428, 0x6d53, 0x586f, 0x7257,
+  0x4a78, 0x5a6f, 0x5654, 0x594d, 0x586e, 0x7241, 0x5f53, 0x5a70,
+  0x626a, 0x607d, 0x5878, 0x772f, 0x5a36, 0x4a57, 0x7258, 0x5879,
+  0x7a5f, 0x4f6f, 0x5942, 0x7052, 0x6451, 0x7337, 0x7a60, 0x6f6c,
+  0x6232, 0x543d, 0x594e, 0x7462, 0x5429, 0x4d42, 0x675a, 0x7259,
+  0x592a, 0x583e, 0x5c2d, 0x626b, 0x567c, 0x4a79, 0x545a, 0x7457,
+  0x4c21, 0x4f3a, 0x7538, 0x5943, 0x5068, 0x6345, 0x6b78, 0x7231,
+  0x4f3b, 0x532d, 0x6861, 0x4e6c, 0x6034, 0x5e63, 0x5d77, 0x7232,
+  0x7376, 0x765b, 0x577e, 0x785f, 0x7772, 0x5029, 0x665a, 0x7526,
+  0x573c, 0x4c63, 0x665b, 0x5d5d, 0x5133, 0x6f6d, 0x565e, 0x6474,
+  0x616f, 0x5d78, 0x684f, 0x4a65, 0x5c21, 0x6035, 0x7c2c, 0x7c2d,
+  0x5827, 0x6d38, 0x5b36, 0x5670, 0x732f, 0x4d25, 0x5a71, 0x5828,
+  0x4c64, 0x5134, 0x4a58, 0x5a72, 0x7527, 0x7528, 0x6626, 0x556c,
+  0x5578, 0x5a73, 0x6346, 0x5e64, 0x5e65, 0x5135, 0x5136, 0x5137,
+  0x7233, 0x695e, 0x7053, 0x7234, 0x7054, 0x4b64, 0x7b54, 0x7566,
+  0x636a, 0x5e66, 0x5f54, 0x7879, 0x702e, 0x5138, 0x565f, 0x5057,
+  0x7c21, 0x6f6e, 0x5c58, 0x695f, 0x655d, 0x7d7b, 0x6049, 0x5649,
+  0x542a, 0x654c, 0x6960, 0x5058, 0x7c22, 0x543e, 0x6233, 0x5e67,
+  0x5c3c, 0x5236, 0x7555, 0x4e21, 0x7529, 0x5d79, 0x5d7a, 0x7055,
+  0x765f, 0x725a, 0x646b, 0x7271, 0x6c39, 0x7d7c, 0x612a, 0x4a59,
+  0x6f6f, 0x752a, 0x6c79, 0x782d, 0x7242, 0x7643, 0x5752, 0x7922,
+  0x7056, 0x707a, 0x7660, 0x6973, 0x7243, 0x542b, 0x4a33, 0x4d26,
+  0x4d43, 0x4d5a, 0x594f, 0x7644, 0x6e5d, 0x6744, 0x6234, 0x5f62,
+  0x675b, 0x6831, 0x7c2e, 0x654d, 0x7a6b, 0x4f3c, 0x4f62, 0x4d76,
+  0x6f70, 0x743e, 0x544d, 0x7338, 0x6921, 0x7272, 0x736b, 0x7057,
+  0x4f57, 0x4f5f, 0x6840, 0x6841, 0x4f63, 0x6922, 0x502a, 0x7341,
+  0x502b, 0x5464, 0x6f3c, 0x5821, 0x595f, 0x7357, 0x5c3d, 0x4c65,
+  0x6d71, 0x7162, 0x545b, 0x6235, 0x4a66, 0x532e, 0x4c66, 0x7153,
+  0x7567, 0x4a5a, 0x7b6e, 0x6145, 0x5f69, 0x6e5e, 0x7742, 0x5822,
+  0x5d2c, 0x702f, 0x563d, 0x612b, 0x7936, 0x5475, 0x5049, 0x6f27,
+  0x626c, 0x5b6a, 0x4e4c, 0x7568, 0x7755, 0x534d, 0x737e, 0x5035,
+  0x607e, 0x5f7b, 0x665d, 0x6824, 0x4b4d, 0x6f28, 0x6e34, 0x5a58,
+  0x5139, 0x5f29, 0x7330, 0x4c44, 0x4e37, 0x6f29, 0x5f55, 0x6d57,
+  0x6e46, 0x6f3d, 0x7c56, 0x5b74, 0x6f2a, 0x7839, 0x7569, 0x6359,
+  0x6146, 0x543f, 0x5e68, 0x706a, 0x7342, 0x532f, 0x4a5b, 0x7c57,
+  0x6d58, 0x6147, 0x7458, 0x5633, 0x5d2d, 0x553e, 0x7143, 0x6e5f,
+  0x566b, 0x7459, 0x5766, 0x5a37, 0x5d7b, 0x5d4f, 0x5823, 0x5a59,
+  0x7058, 0x6f44, 0x6158, 0x7154, 0x6d72, 0x555b, 0x555c, 0x7344,
+  0x4b57, 0x6236, 0x6f71, 0x7b55, 0x5358, 0x5d50, 0x7059, 0x4b33,
+  0x555d, 0x4d27, 0x502c, 0x513a, 0x7144, 0x6533, 0x7b75, 0x6961,
+  0x7d60, 0x7c3c, 0x5a22, 0x5a23, 0x5221, 0x526f, 0x626d, 0x5e69,
+  0x4e5c, 0x7235, 0x5064, 0x5d51, 0x6148, 0x5b37, 0x5f63, 0x6d39,
+  0x7145, 0x734f, 0x572b, 0x612c, 0x636b, 0x6e47, 0x6149, 0x4a7a,
+  0x707b, 0x7a61, 0x705a, 0x4c67, 0x5a74, 0x4c3f, 0x4e6d, 0x5529,
+  0x7a62, 0x5065, 0x6b56, 0x6c5f, 0x5f7c, 0x7756, 0x5e6a, 0x4b34,
+  0x6f3e, 0x4c35, 0x4f3d, 0x6f72, 0x6237, 0x4c68, 0x707c, 0x5660,
+  0x7146, 0x6238, 0x6b2b, 0x4b35, 0x5851, 0x744e, 0x7377, 0x5746,
+  0x513b, 0x772a, 0x6d4a, 0x5753, 0x587a, 0x7645, 0x514c, 0x5d7c,
+  0x5f7d, 0x7965, 0x604a, 0x727d, 0x5330, 0x7473, 0x5a49, 0x665e,
+  0x783a, 0x6850, 0x587b, 0x6a55, 0x5623, 0x7646, 0x725b, 0x647c,
+  0x6832, 0x5a5a, 0x725c, 0x7b56, 0x6932, 0x6e2d, 0x7a63, 0x5c6e,
+  0x756a, 0x6660, 0x707d, 0x572c, 0x7545, 0x6e60, 0x5b65, 0x5d5e,
+  0x5970, 0x6923, 0x7179, 0x7244, 0x604b, 0x6924, 0x6239, 0x6331,
+  0x7c6b, 0x4d28, 0x4c36, 0x705b, 0x663a, 0x4d29, 0x7343, 0x6159,
+  0x6f2b, 0x6745, 0x6069, 0x7345, 0x5440, 0x553f, 0x5d2e, 0x797c,
+  0x4c40, 0x6522, 0x4e38, 0x5852, 0x7956, 0x712a, 0x4e51, 0x7647,
+  0x5b6b, 0x5f7e, 0x5861, 0x7773, 0x5767, 0x547e, 0x513c, 0x654f,
+  0x4b36, 0x5a38, 0x4d44, 0x563e, 0x623a, 0x4f58, 0x604c, 0x6b79,
+  0x7d7d, 0x5768, 0x4b58, 0x6962, 0x683a, 0x6347, 0x6c4d, 0x6c4e,
+  0x563f, 0x6327, 0x5f56, 0x7d68, 0x6e61, 0x7628, 0x5d7d, 0x783b,
+  0x6851, 0x7957, 0x4e6e, 0x6c4f, 0x6925, 0x5655, 0x4d45, 0x6d3a,
+  0x513d, 0x4f3e, 0x6c3b, 0x5231, 0x4c69, 0x5944, 0x697c, 0x513e,
+  0x6c3c, 0x652d, 0x7730, 0x4c6a, 0x5344, 0x5640, 0x567d, 0x6121,
+  0x5e3d, 0x7629, 0x5a24, 0x5624, 0x7546, 0x6122, 0x6946, 0x7245,
+  0x7469, 0x566c, 0x6b53, 0x6c3d, 0x625c, 0x5e6b, 0x705c, 0x6b3f,
+  0x574e, 0x513f, 0x752b, 0x797d, 0x4a5c, 0x4d46, 0x7236, 0x5d7e,
+  0x4c37, 0x5b38, 0x5069, 0x4e5d, 0x6b40, 0x7d22, 0x784b, 0x6a56,
+  0x7130, 0x5b4e, 0x7743, 0x5b4f, 0x4b24, 0x7860, 0x7b57, 0x6b4a,
+  0x6021, 0x4e4d, 0x545c, 0x7d58, 0x5276, 0x7237, 0x7a76, 0x762a,
+  0x7a77, 0x5866, 0x7431, 0x6852, 0x4a45, 0x4c6b, 0x626e, 0x623b,
+  0x772d, 0x7861, 0x736c, 0x5e21, 0x647d, 0x636c, 0x5d2f, 0x5d30,
+  0x4b37, 0x6853, 0x6123, 0x5260, 0x707e, 0x6926, 0x4b72, 0x6d73,
+  0x5c59, 0x604d, 0x775a, 0x5b39, 0x4c2e, 0x5a5b, 0x4d47, 0x5d31,
+  0x582f, 0x6323, 0x4e6f, 0x7273, 0x7833, 0x604e, 0x757d, 0x6b6c,
+  0x5345, 0x7c6c, 0x525b, 0x546b, 0x5e22, 0x6566, 0x7030, 0x5544,
+  0x6d74, 0x636d, 0x6842, 0x6d75, 0x577c, 0x6d3b, 0x762b, 0x7238,
+  0x7648, 0x5366, 0x725d, 0x4f3f, 0x6b2c, 0x4f40, 0x6628, 0x7d69,
+  0x4f41, 0x605f, 0x5e6c, 0x6022, 0x743f, 0x626f, 0x5971, 0x7147,
+  0x4b38, 0x797e, 0x5b3a, 0x5a75, 0x766c, 0x5a5c, 0x7a64, 0x604f,
+  0x5d32, 0x6629, 0x6f73, 0x736d, 0x6b7a, 0x7966, 0x4a5d, 0x555e,
+  0x4a5e, 0x5f64, 0x667d, 0x752c, 0x6475, 0x6963, 0x6d4b, 0x4f64,
+  0x5853, 0x5d33, 0x546c, 0x7239, 0x5f37, 0x4b4e, 0x7b58, 0x5059,
+  0x5d52, 0x7774, 0x675c, 0x6425, 0x7c23, 0x5b3b, 0x723a, 0x697d,
+  0x504a, 0x7556, 0x5945, 0x6434, 0x6d27, 0x6a3d, 0x667e, 0x7744,
+  0x752d, 0x5960, 0x4a34, 0x7862, 0x4f42, 0x6c3e, 0x6534, 0x4d48,
+  0x6e48, 0x6748, 0x4d49, 0x7937, 0x7168, 0x5972, 0x5b75, 0x4a35,
+  0x5946, 0x5849, 0x592b, 0x6d3c, 0x5854, 0x5c5a, 0x623c, 0x7c6d,
+  0x6c60, 0x527e, 0x6947, 0x662a, 0x6270, 0x7a3b, 0x752e, 0x7b2a,
+  0x6c7b, 0x6c3f, 0x7c58, 0x5465, 0x7943, 0x6e62, 0x5769, 0x6d76,
+  0x5e6d, 0x4c6c, 0x636e, 0x6854, 0x7a78, 0x5d34, 0x6435, 0x5830,
+  0x5855, 0x746a, 0x4e39, 0x5661, 0x4f52, 0x5036, 0x4e22, 0x736e,
+  0x7378, 0x5c4c, 0x504b, 0x7c24, 0x4d4a, 0x5754, 0x5e23, 0x6460,
+  0x6e49, 0x625d, 0x757e, 0x542c, 0x5551, 0x5870, 0x7843, 0x6a57,
+  0x7557, 0x583f, 0x7d40, 0x6b2d, 0x552a, 0x6728, 0x6e4a, 0x4a67,
+  0x7863, 0x545d, 0x6a58, 0x7b59, 0x6d77, 0x6535, 0x502d, 0x7171,
+  0x623d, 0x6348, 0x5955, 0x5f2a, 0x5b3c, 0x7864, 0x717a, 0x6536,
+  0x736f, 0x7b5a, 0x6160, 0x592c, 0x756b, 0x6036, 0x6948, 0x4b4f,
+  0x6349, 0x5e6e, 0x623e, 0x5c6f, 0x5625, 0x6271, 0x567e, 0x5921,
+  0x5840, 0x5c5b, 0x6d3d, 0x5f38, 0x6a25, 0x572d, 0x7379, 0x6d78,
+  0x7547, 0x614a, 0x6b63, 0x725e, 0x784c, 0x6a59, 0x5346, 0x5b66,
+  0x752f, 0x4e70, 0x697e, 0x7b36, 0x6272, 0x4f72, 0x7739, 0x5973,
+  0x614b, 0x5a5d, 0x5a39, 0x6b7b, 0x4b39, 0x6d79, 0x6060, 0x7440,
+  0x7d3c, 0x5f31, 0x636f, 0x6023, 0x7d39, 0x7031, 0x4d4b, 0x6d3e,
+  0x5540, 0x6370, 0x6d7a, 0x6964, 0x556d, 0x675d, 0x5476, 0x6537,
+  0x5b67, 0x623f, 0x6e4b, 0x5774, 0x705d, 0x4e2b, 0x675e, 0x5656,
+  0x614c, 0x6833, 0x656e, 0x5c22, 0x6050, 0x5535, 0x5521, 0x7b5b,
+  0x794b, 0x4b73, 0x7425, 0x7a48, 0x5657, 0x6965, 0x7b5c, 0x7d50,
+  0x7b76, 0x5a25, 0x5b3d, 0x6c62, 0x4d77, 0x705e, 0x7649, 0x5e6f,
+  0x5331, 0x7c6e, 0x6843, 0x7148, 0x4e71, 0x796d, 0x7274, 0x6436,
+  0x7539, 0x5c70, 0x6371, 0x6825, 0x723b, 0x5e24, 0x5a4c, 0x4a69,
+  0x635a, 0x7c59, 0x6a5a, 0x7944, 0x6324, 0x7b5d, 0x6f4a, 0x6844,
+  0x554c, 0x6b57, 0x592d, 0x7b2b, 0x5359, 0x5522, 0x765e, 0x5a76,
+  0x6051, 0x6928, 0x7579, 0x7a2f, 0x6b7c, 0x606a, 0x6332, 0x5545,
+  0x7163, 0x556e, 0x4d4c, 0x6d59, 0x5841, 0x7a6c, 0x716b, 0x7a3c,
+  0x6662, 0x7a65, 0x627a, 0x4a36, 0x6437, 0x6a5b, 0x757a, 0x7b2c,
+  0x4f43, 0x6b7d, 0x787a, 0x5f39, 0x6171, 0x5224, 0x757b, 0x505a,
+  0x505b, 0x6a3e, 0x5931, 0x4a37, 0x5367, 0x7865, 0x5332, 0x6240,
+  0x725f, 0x4d65, 0x792c, 0x4d4d, 0x6e2e, 0x562e, 0x576a, 0x6760,
+  0x6b2e, 0x4f59, 0x5c4d, 0x6d7b, 0x5e70, 0x576b, 0x5e25, 0x5f57,
+  0x5b50, 0x5b51, 0x5523, 0x7032, 0x5c5c, 0x4a68, 0x7866, 0x5c4e,
+  0x6a5c, 0x5b52, 0x6933, 0x775b, 0x6328, 0x572e, 0x6061, 0x4b3a,
+  0x6551, 0x505c, 0x5541, 0x584a, 0x6329, 0x6024, 0x6929, 0x5347,
+  0x5c5d, 0x782e, 0x4c38, 0x502e, 0x5872, 0x634a, 0x4c2f, 0x542d,
+  0x7651, 0x504c, 0x4a46, 0x5542, 0x4e3a, 0x4a47, 0x7a30, 0x5f58,
+  0x753a, 0x656b, 0x6f74, 0x5d35, 0x4d2a, 0x6372, 0x7b77, 0x7750,
+  0x7d3a, 0x7d61, 0x767e, 0x5140, 0x6845, 0x6438, 0x6168, 0x4c41,
+  0x526d, 0x5b3e, 0x6062, 0x7a49, 0x614d, 0x4a38, 0x7260, 0x7149,
+  0x5e71, 0x705f, 0x7844, 0x6e4c, 0x5e72, 0x6749, 0x6273, 0x6761,
+  0x634b, 0x634c, 0x4f78, 0x6f2c, 0x7d7e, 0x7c25, 0x7a31, 0x5f59,
+  0x6052, 0x745a, 0x714a, 0x4e23, 0x723c, 0x6c63, 0x6025, 0x772b,
+  0x6b2f, 0x655e, 0x6124, 0x4d2b, 0x5974, 0x6826, 0x4d4e, 0x6169,
+  0x7c6f, 0x6063, 0x6241, 0x4e24, 0x5e26, 0x6b7e, 0x6b5d, 0x7060,
+  0x745b, 0x6274, 0x5348, 0x746b, 0x6e35, 0x7558, 0x555f, 0x5665,
+  0x6b30, 0x7463, 0x634d, 0x7474, 0x7a32, 0x6f75, 0x4a5f, 0x6b31,
+  0x6d3f, 0x7d49, 0x6426, 0x7924, 0x7033, 0x656c, 0x5167, 0x5947,
+  0x6457, 0x6a5d, 0x5477, 0x5a3a, 0x5a4d, 0x794c, 0x615a, 0x5b3f,
+  0x4c45, 0x6c50, 0x4b3b, 0x5e73, 0x692a, 0x5948, 0x6e63, 0x573d,
+  0x4f44, 0x504d, 0x7c26, 0x717b, 0x7d52, 0x5141, 0x635b, 0x5349,
+  0x5c4f, 0x4c6d, 0x5e27, 0x663b, 0x6c21, 0x4c39, 0x7b5e, 0x6762,
+  0x5441, 0x5c28, 0x6242, 0x7358, 0x6553, 0x7359, 0x7346, 0x4d5b,
+  0x4d2c, 0x7c43, 0x5467, 0x5142, 0x7925, 0x6855, 0x634e, 0x544a,
+  0x5f5a, 0x7b5f, 0x6763, 0x787b, 0x634f, 0x7530, 0x5867, 0x5949,
+  0x782f, 0x6f76, 0x5d36, 0x6e2f, 0x4d78, 0x5e38, 0x7c27, 0x777c,
+  0x7731, 0x4e3b, 0x7421, 0x6e4d, 0x612e, 0x6c43, 0x4f7e, 0x783f,
+  0x5862, 0x5368, 0x5e28, 0x7464, 0x6c42, 0x5975, 0x7945, 0x5d53,
+  0x5671, 0x6c7c, 0x7c70, 0x6d40, 0x4a39, 0x6e64, 0x7261, 0x5e39,
+  0x5672, 0x5e74, 0x5f5b, 0x5b53, 0x7a67, 0x5863, 0x7441, 0x5d37,
+  0x7275, 0x542e, 0x5673, 0x5d38, 0x4f45, 0x5f5f, 0x723e, 0x7621,
+  0x6b4b, 0x717c, 0x7347, 0x606b, 0x6d7c, 0x615b, 0x6e65, 0x5e75,
+  0x7a53, 0x714b, 0x502f, 0x5d39, 0x5143, 0x7531, 0x6a46, 0x7061,
+  0x762c, 0x7559, 0x706b, 0x5d3a, 0x723f, 0x7745, 0x5b22, 0x7276,
+  0x4a3a, 0x7775, 0x4b65, 0x6e66, 0x6053, 0x4e25, 0x5658, 0x542f,
+  0x6949, 0x534e, 0x7442, 0x4b66, 0x7121, 0x6b32, 0x7122, 0x6b33,
+  0x7034, 0x4b74, 0x5430, 0x7332, 0x7b37, 0x756c, 0x6e67, 0x7432,
+  0x756d, 0x4f73, 0x7062, 0x6e4e, 0x714c, 0x6538, 0x5775, 0x6373,
+  0x4f65, 0x4f46, 0x7333, 0x6458, 0x4f79, 0x4f5a, 0x7a4d, 0x6663,
+  0x7262, 0x756e, 0x4a3b, 0x635c, 0x4e72, 0x5659, 0x6e30, 0x7465,
+  0x5842, 0x5c50, 0x4c6e, 0x5560, 0x764a, 0x7d4a, 0x5856, 0x744f,
+  0x5626, 0x5c3e, 0x5b54, 0x5747, 0x727e, 0x714d, 0x6243, 0x5c5e,
+  0x5c5f, 0x6f2d, 0x662b, 0x795d, 0x6a3f, 0x6f2e, 0x7450, 0x4e73,
+  0x662c, 0x4e5e, 0x5579, 0x6374, 0x4d50, 0x5538, 0x777d, 0x5c29,
+  0x5e76, 0x5c2a, 0x7263, 0x6934, 0x525c, 0x6966, 0x6376, 0x674a,
+  0x504e, 0x5a77, 0x4a3c, 0x6e68, 0x5a5e, 0x7277, 0x627b, 0x4c26,
+  0x5a3b, 0x6e69, 0x755a, 0x775c, 0x616a, 0x4e41, 0x5431, 0x7d31,
+  0x663d, 0x7b2d, 0x7867, 0x614e, 0x7762, 0x756f, 0x4f47, 0x5432,
+  0x4c6f, 0x5468, 0x6e4f, 0x7757, 0x6026, 0x5641, 0x615c, 0x7063,
+  0x7164, 0x5c71, 0x5627, 0x7475, 0x714e, 0x7264, 0x5030, 0x6c6f,
+  0x793a, 0x6b35, 0x546d, 0x6244, 0x6967, 0x6b34, 0x6a21, 0x783c,
+  0x4e26, 0x7946, 0x7c5a, 0x5433, 0x5339, 0x6a5e, 0x692b, 0x6161,
+  0x534f, 0x7476, 0x6a40, 0x614f, 0x4c3a, 0x6e6a, 0x7064, 0x7334,
+  0x546e, 0x7240, 0x7165, 0x7443, 0x6054, 0x6b36, 0x5721, 0x4b68,
+  0x792d, 0x692d, 0x5864, 0x7a33, 0x6245, 0x7c3d, 0x6c44, 0x5831,
+  0x5c2b, 0x5524, 0x6b69, 0x683b, 0x5857, 0x7b2e, 0x5161, 0x5b40,
+  0x753e, 0x5e77, 0x4a7b, 0x7746, 0x4f48, 0x6150, 0x6e50, 0x6974,
+  0x4e74, 0x554d, 0x4f5b, 0x5d3b, 0x4e2c, 0x6968, 0x5434, 0x6447,
+  0x755b, 0x7a41, 0x5e29, 0x5478, 0x6f77, 0x5333, 0x6b37, 0x6f78,
+  0x755c, 0x6d4c, 0x5b55, 0x714f, 0x7150, 0x7532, 0x592e, 0x552c,
+  0x6246, 0x7d23, 0x7b65, 0x5f2b, 0x6275, 0x762d, 0x7533, 0x7035,
+  0x6125, 0x755d, 0x6c22, 0x6d7d, 0x7534, 0x7b38, 0x5b23, 0x564a,
+  0x4b59, 0x6554, 0x737a, 0x6b38, 0x6037, 0x576c, 0x716c, 0x652f,
+  0x5561, 0x576d, 0x5151, 0x6172, 0x6f79, 0x5d3c, 0x765c, 0x7065,
+  0x7444, 0x6969, 0x737b, 0x546f, 0x4c22, 0x777e, 0x5f3c, 0x6b4d,
+  0x5037, 0x5642, 0x682d, 0x6f2f, 0x4b25, 0x4b69, 0x7a68, 0x4c46,
+  0x6667, 0x6a47, 0x5b24, 0x4f49, 0x627c, 0x6f7a, 0x6b5e, 0x7548,
+  0x545e, 0x6055, 0x6f30, 0x6247, 0x592f, 0x7967, 0x6765, 0x4f4a,
+  0x6151, 0x6248, 0x6f7b, 0x7a79, 0x5c72, 0x6027, 0x7868, 0x4b6a,
+  0x4b3c, 0x5662, 0x755e, 0x755f, 0x6e36, 0x6276, 0x534a, 0x6f7c,
+  0x5144, 0x6f31, 0x5145, 0x505e, 0x5961, 0x6038, 0x4d51, 0x7339,
+  0x674c, 0x5628, 0x4e27, 0x5435, 0x6448, 0x5334, 0x6b39, 0x4b75,
+  0x765d, 0x7123, 0x4c47, 0x694a, 0x6170, 0x7560, 0x7b2f, 0x4b51,
+  0x7b60, 0x7265, 0x6c70, 0x706c, 0x6e6b, 0x694b, 0x4c70, 0x572f,
+  0x7321, 0x7c75, 0x7124, 0x6056, 0x6f32, 0x7451, 0x7721, 0x7151,
+  0x4a7c, 0x4a7d, 0x4e4e, 0x7348, 0x733a, 0x6d7e, 0x5a26, 0x606c,
+  0x784d, 0x4b52, 0x6b4e, 0x7958, 0x7959, 0x4a60, 0x5a4a, 0x4b26,
+  0x4a48, 0x796e, 0x5b6c, 0x5031, 0x556f, 0x6673, 0x6722, 0x6459,
+  0x6461, 0x7c44, 0x796f, 0x4f74, 0x7766, 0x4e3c, 0x7445, 0x5c23,
+  0x5d3d, 0x7446, 0x7821, 0x6856, 0x5b41, 0x7066, 0x6439, 0x766d,
+  0x792e, 0x5d3e, 0x5730, 0x5868, 0x4b3d, 0x795a, 0x784e, 0x7970,
+  0x606d, 0x6333, 0x7433, 0x6a42, 0x7266, 0x7036, 0x5b56, 0x6b64,
+  0x7267, 0x5755, 0x5436, 0x7968, 0x5741, 0x6555, 0x696a, 0x574c,
+  0x5369, 0x6249, 0x7c5b, 0x4d2d, 0x4c30, 0x6a22, 0x6476, 0x5040,
+  0x7037, 0x6e21, 0x5776, 0x624a, 0x624b, 0x7a4f, 0x6b5f, 0x564b,
+  0x7434, 0x6d4d, 0x6452, 0x6a29, 0x643a, 0x7322, 0x4d52, 0x764b,
+  0x7166, 0x6d41, 0x683c, 0x6e51, 0x7067, 0x624c, 0x642a, 0x7561,
+  0x6d5a, 0x576e, 0x5171, 0x696b, 0x696c, 0x6064, 0x5a27, 0x5d54,
+  0x6a23, 0x5643, 0x5674, 0x5a5f, 0x6f33, 0x624d, 0x6f7d, 0x7268,
+  0x6f45, 0x6767, 0x577d, 0x674e, 0x5f5c, 0x7947, 0x5976, 0x5f2c,
+  0x565a, 0x5c24, 0x7038, 0x557a, 0x6477, 0x5644, 0x746c, 0x6f7e,
+  0x7021, 0x5e2a, 0x5a3c, 0x587c, 0x7a54, 0x6c65, 0x7c28, 0x6c66,
+  0x584b, 0x7b39, 0x6453, 0x4d79, 0x4f53, 0x4a6a, 0x4f54, 0x783d,
+  0x7447, 0x6a5f, 0x795b, 0x5437, 0x6b65, 0x6152, 0x6a24, 0x7a42,
+  0x7b61, 0x7a6d, 0x7022, 0x4c71, 0x7a23, 0x6277, 0x624e, 0x6975,
+  0x616b, 0x6768, 0x6857, 0x5a78, 0x544b, 0x7776, 0x5645, 0x5469,
+  0x7a7a, 0x4c72, 0x775d, 0x5e3a, 0x4e28, 0x7039, 0x647e, 0x6449,
+  0x6454, 0x6a43, 0x6f34, 0x573e, 0x7b62, 0x4d53, 0x6f35, 0x7a69,
+  0x7926, 0x5f3d, 0x7747, 0x787d, 0x787c, 0x5e2b, 0x5b68, 0x635d,
+  0x6162, 0x5146, 0x7650, 0x6b66, 0x5a79, 0x6c47, 0x5e78, 0x7869,
+  0x635e, 0x4e75, 0x7a43, 0x6557, 0x6c48, 0x7349, 0x643b, 0x662e,
+  0x6f36, 0x5c3f, 0x4e3d, 0x5843, 0x504f, 0x4f7a, 0x734a, 0x6057,
+  0x5147, 0x692e, 0x683d, 0x7a44, 0x624f, 0x7a45, 0x7938, 0x5c60,
+  0x7b30, 0x5829, 0x655f, 0x7927, 0x766e, 0x764c, 0x6278, 0x6c71,
+  0x5a60, 0x7152, 0x524c, 0x4f4b, 0x4a3d, 0x5d3f, 0x766f, 0x5e79,
+  0x7a34, 0x552d, 0x7167, 0x5e3e, 0x5c40, 0x5148, 0x5149, 0x783e,
+  0x4b76, 0x5479, 0x7562, 0x6153, 0x5869, 0x787e, 0x4f4c, 0x7d24,
+  0x4e76, 0x7a50, 0x4c73, 0x663e, 0x762e, 0x5570, 0x514a, 0x7c3e,
+  0x5571, 0x4d69, 0x7a35, 0x6250, 0x7477, 0x4d54, 0x6723, 0x5b25,
+  0x6251, 0x5722, 0x7763, 0x6a26, 0x5021, 0x4e5a, 0x7b6b, 0x5b26,
+  0x5b5e, 0x5865, 0x6a60, 0x582a, 0x6560, 0x565b, 0x6f46, 0x786a,
+  0x6455, 0x4e77, 0x6058, 0x576f, 0x746d, 0x4d66, 0x4c74, 0x7563,
+  0x644a, 0x5c61, 0x7948, 0x7c3f, 0x6827, 0x5844, 0x4b3e, 0x5c2e,
+  0x5777, 0x7068, 0x5d40, 0x4f4d, 0x5c73, 0x5930, 0x6669, 0x643c,
+  0x6a44, 0x646c, 0x6465, 0x7b78, 0x4c3b, 0x643d, 0x4d5c, 0x5977,
+  0x5d5f, 0x6d4e, 0x5950, 0x6523, 0x794d, 0x4d2e, 0x4f4e, 0x762f,
+  0x7d53, 0x6b6d, 0x565c, 0x6524, 0x5536, 0x565d, 0x7969, 0x6724,
+  0x5663, 0x514b, 0x5664, 0x5572, 0x5e7a, 0x5778, 0x586a, 0x4f55,
+  0x587d, 0x582b, 0x7d4b, 0x7c5c, 0x6028, 0x5573, 0x7d59, 0x4c23,
+  0x5979, 0x536a, 0x7575, 0x6f47, 0x535a, 0x5a3d, 0x6828, 0x5c2f,
+  0x7023, 0x4d55, 0x6029, 0x5e2c, 0x703a, 0x6e31, 0x6e32, 0x764d,
+  0x6e52, 0x5646, 0x6065, 0x733b, 0x6561, 0x644b, 0x5723, 0x5b42,
+  0x4a7e, 0x4f4f, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026,
+  0x3027, 0x3028, 0x3029, 0x302a, 0x302b, 0x302c, 0x302d, 0x302e,
+  0x302f, 0x3030, 0x3031, 0x3032, 0x3033, 0x3034, 0x3035, 0x3036,
+  0x3037, 0x3038, 0x3039, 0x303a, 0x303b, 0x303c, 0x303d, 0x303e,
+  0x303f, 0x3040, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046,
+  0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e,
+  0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056,
+  0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e,
+  0x305f, 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066,
+  0x3067, 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e,
+  0x306f, 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076,
+  0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e,
+  0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128,
+  0x3129, 0x312a, 0x312b, 0x312c, 0x312d, 0x312e, 0x312f, 0x3130,
+  0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138,
+  0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140,
+  0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
+  0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150,
+  0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158,
+  0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160,
+  0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, 0x3168,
+  0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, 0x3170,
+  0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, 0x3178,
+  0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x3221, 0x3222,
+  0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0x322a,
+  0x322b, 0x322c, 0x322d, 0x322e, 0x322f, 0x3230, 0x3231, 0x3232,
+  0x3233, 0x3234, 0x3235, 0x3236, 0x3237, 0x3238, 0x3239, 0x323a,
+  0x323b, 0x323c, 0x323d, 0x323e, 0x323f, 0x3240, 0x3241, 0x3242,
+  0x3243, 0x3244, 0x3245, 0x3246, 0x3247, 0x3248, 0x3249, 0x324a,
+  0x324b, 0x324c, 0x324d, 0x324e, 0x324f, 0x3250, 0x3251, 0x3252,
+  0x3253, 0x3254, 0x3255, 0x3256, 0x3257, 0x3258, 0x3259, 0x325a,
+  0x325b, 0x325c, 0x325d, 0x325e, 0x325f, 0x3260, 0x3261, 0x3262,
+  0x3263, 0x3264, 0x3265, 0x3266, 0x3267, 0x3268, 0x3269, 0x326a,
+  0x326b, 0x326c, 0x326d, 0x326e, 0x326f, 0x3270, 0x3271, 0x3272,
+  0x3273, 0x3274, 0x3275, 0x3276, 0x3277, 0x3278, 0x3279, 0x327a,
+  0x327b, 0x327c, 0x327d, 0x327e, 0x3321, 0x3322, 0x3323, 0x3324,
+  0x3325, 0x3326, 0x3327, 0x3328, 0x3329, 0x332a, 0x332b, 0x332c,
+  0x332d, 0x332e, 0x332f, 0x3330, 0x3331, 0x3332, 0x3333, 0x3334,
+  0x3335, 0x3336, 0x3337, 0x3338, 0x3339, 0x333a, 0x333b, 0x333c,
+  0x333d, 0x333e, 0x333f, 0x3340, 0x3341, 0x3342, 0x3343, 0x3344,
+  0x3345, 0x3346, 0x3347, 0x3348, 0x3349, 0x334a, 0x334b, 0x334c,
+  0x334d, 0x334e, 0x334f, 0x3350, 0x3351, 0x3352, 0x3353, 0x3354,
+  0x3355, 0x3356, 0x3357, 0x3358, 0x3359, 0x335a, 0x335b, 0x335c,
+  0x335d, 0x335e, 0x335f, 0x3360, 0x3361, 0x3362, 0x3363, 0x3364,
+  0x3365, 0x3366, 0x3367, 0x3368, 0x3369, 0x336a, 0x336b, 0x336c,
+  0x336d, 0x336e, 0x336f, 0x3370, 0x3371, 0x3372, 0x3373, 0x3374,
+  0x3375, 0x3376, 0x3377, 0x3378, 0x3379, 0x337a, 0x337b, 0x337c,
+  0x337d, 0x337e, 0x3421, 0x3422, 0x3423, 0x3424, 0x3425, 0x3426,
+  0x3427, 0x3428, 0x3429, 0x342a, 0x342b, 0x342c, 0x342d, 0x342e,
+  0x342f, 0x3430, 0x3431, 0x3432, 0x3433, 0x3434, 0x3435, 0x3436,
+  0x3437, 0x3438, 0x3439, 0x343a, 0x343b, 0x343c, 0x343d, 0x343e,
+  0x343f, 0x3440, 0x3441, 0x3442, 0x3443, 0x3444, 0x3445, 0x3446,
+  0x3447, 0x3448, 0x3449, 0x344a, 0x344b, 0x344c, 0x344d, 0x344e,
+  0x344f, 0x3450, 0x3451, 0x3452, 0x3453, 0x3454, 0x3455, 0x3456,
+  0x3457, 0x3458, 0x3459, 0x345a, 0x345b, 0x345c, 0x345d, 0x345e,
+  0x345f, 0x3460, 0x3461, 0x3462, 0x3463, 0x3464, 0x3465, 0x3466,
+  0x3467, 0x3468, 0x3469, 0x346a, 0x346b, 0x346c, 0x346d, 0x346e,
+  0x346f, 0x3470, 0x3471, 0x3472, 0x3473, 0x3474, 0x3475, 0x3476,
+  0x3477, 0x3478, 0x3479, 0x347a, 0x347b, 0x347c, 0x347d, 0x347e,
+  0x3521, 0x3522, 0x3523, 0x3524, 0x3525, 0x3526, 0x3527, 0x3528,
+  0x3529, 0x352a, 0x352b, 0x352c, 0x352d, 0x352e, 0x352f, 0x3530,
+  0x3531, 0x3532, 0x3533, 0x3534, 0x3535, 0x3536, 0x3537, 0x3538,
+  0x3539, 0x353a, 0x353b, 0x353c, 0x353d, 0x353e, 0x353f, 0x3540,
+  0x3541, 0x3542, 0x3543, 0x3544, 0x3545, 0x3546, 0x3547, 0x3548,
+  0x3549, 0x354a, 0x354b, 0x354c, 0x354d, 0x354e, 0x354f, 0x3550,
+  0x3551, 0x3552, 0x3553, 0x3554, 0x3555, 0x3556, 0x3557, 0x3558,
+  0x3559, 0x355a, 0x355b, 0x355c, 0x355d, 0x355e, 0x355f, 0x3560,
+  0x3561, 0x3562, 0x3563, 0x3564, 0x3565, 0x3566, 0x3567, 0x3568,
+  0x3569, 0x356a, 0x356b, 0x356c, 0x356d, 0x356e, 0x356f, 0x3570,
+  0x3571, 0x3572, 0x3573, 0x3574, 0x3575, 0x3576, 0x3577, 0x3578,
+  0x3579, 0x357a, 0x357b, 0x357c, 0x357d, 0x357e, 0x3621, 0x3622,
+  0x3623, 0x3624, 0x3625, 0x3626, 0x3627, 0x3628, 0x3629, 0x362a,
+  0x362b, 0x362c, 0x362d, 0x362e, 0x362f, 0x3630, 0x3631, 0x3632,
+  0x3633, 0x3634, 0x3635, 0x3636, 0x3637, 0x3638, 0x3639, 0x363a,
+  0x363b, 0x363c, 0x363d, 0x363e, 0x363f, 0x3640, 0x3641, 0x3642,
+  0x3643, 0x3644, 0x3645, 0x3646, 0x3647, 0x3648, 0x3649, 0x364a,
+  0x364b, 0x364c, 0x364d, 0x364e, 0x364f, 0x3650, 0x3651, 0x3652,
+  0x3653, 0x3654, 0x3655, 0x3656, 0x3657, 0x3658, 0x3659, 0x365a,
+  0x365b, 0x365c, 0x365d, 0x365e, 0x365f, 0x3660, 0x3661, 0x3662,
+  0x3663, 0x3664, 0x3665, 0x3666, 0x3667, 0x3668, 0x3669, 0x366a,
+  0x366b, 0x366c, 0x366d, 0x366e, 0x366f, 0x3670, 0x3671, 0x3672,
+  0x3673, 0x3674, 0x3675, 0x3676, 0x3677, 0x3678, 0x3679, 0x367a,
+  0x367b, 0x367c, 0x367d, 0x367e, 0x3721, 0x3722, 0x3723, 0x3724,
+  0x3725, 0x3726, 0x3727, 0x3728, 0x3729, 0x372a, 0x372b, 0x372c,
+  0x372d, 0x372e, 0x372f, 0x3730, 0x3731, 0x3732, 0x3733, 0x3734,
+  0x3735, 0x3736, 0x3737, 0x3738, 0x3739, 0x373a, 0x373b, 0x373c,
+  0x373d, 0x373e, 0x373f, 0x3740, 0x3741, 0x3742, 0x3743, 0x3744,
+  0x3745, 0x3746, 0x3747, 0x3748, 0x3749, 0x374a, 0x374b, 0x374c,
+  0x374d, 0x374e, 0x374f, 0x3750, 0x3751, 0x3752, 0x3753, 0x3754,
+  0x3755, 0x3756, 0x3757, 0x3758, 0x3759, 0x375a, 0x375b, 0x375c,
+  0x375d, 0x375e, 0x375f, 0x3760, 0x3761, 0x3762, 0x3763, 0x3764,
+  0x3765, 0x3766, 0x3767, 0x3768, 0x3769, 0x376a, 0x376b, 0x376c,
+  0x376d, 0x376e, 0x376f, 0x3770, 0x3771, 0x3772, 0x3773, 0x3774,
+  0x3775, 0x3776, 0x3777, 0x3778, 0x3779, 0x377a, 0x377b, 0x377c,
+  0x377d, 0x377e, 0x3821, 0x3822, 0x3823, 0x3824, 0x3825, 0x3826,
+  0x3827, 0x3828, 0x3829, 0x382a, 0x382b, 0x382c, 0x382d, 0x382e,
+  0x382f, 0x3830, 0x3831, 0x3832, 0x3833, 0x3834, 0x3835, 0x3836,
+  0x3837, 0x3838, 0x3839, 0x383a, 0x383b, 0x383c, 0x383d, 0x383e,
+  0x383f, 0x3840, 0x3841, 0x3842, 0x3843, 0x3844, 0x3845, 0x3846,
+  0x3847, 0x3848, 0x3849, 0x384a, 0x384b, 0x384c, 0x384d, 0x384e,
+  0x384f, 0x3850, 0x3851, 0x3852, 0x3853, 0x3854, 0x3855, 0x3856,
+  0x3857, 0x3858, 0x3859, 0x385a, 0x385b, 0x385c, 0x385d, 0x385e,
+  0x385f, 0x3860, 0x3861, 0x3862, 0x3863, 0x3864, 0x3865, 0x3866,
+  0x3867, 0x3868, 0x3869, 0x386a, 0x386b, 0x386c, 0x386d, 0x386e,
+  0x386f, 0x3870, 0x3871, 0x3872, 0x3873, 0x3874, 0x3875, 0x3876,
+  0x3877, 0x3878, 0x3879, 0x387a, 0x387b, 0x387c, 0x387d, 0x387e,
+  0x3921, 0x3922, 0x3923, 0x3924, 0x3925, 0x3926, 0x3927, 0x3928,
+  0x3929, 0x392a, 0x392b, 0x392c, 0x392d, 0x392e, 0x392f, 0x3930,
+  0x3931, 0x3932, 0x3933, 0x3934, 0x3935, 0x3936, 0x3937, 0x3938,
+  0x3939, 0x393a, 0x393b, 0x393c, 0x393d, 0x393e, 0x393f, 0x3940,
+  0x3941, 0x3942, 0x3943, 0x3944, 0x3945, 0x3946, 0x3947, 0x3948,
+  0x3949, 0x394a, 0x394b, 0x394c, 0x394d, 0x394e, 0x394f, 0x3950,
+  0x3951, 0x3952, 0x3953, 0x3954, 0x3955, 0x3956, 0x3957, 0x3958,
+  0x3959, 0x395a, 0x395b, 0x395c, 0x395d, 0x395e, 0x395f, 0x3960,
+  0x3961, 0x3962, 0x3963, 0x3964, 0x3965, 0x3966, 0x3967, 0x3968,
+  0x3969, 0x396a, 0x396b, 0x396c, 0x396d, 0x396e, 0x396f, 0x3970,
+  0x3971, 0x3972, 0x3973, 0x3974, 0x3975, 0x3976, 0x3977, 0x3978,
+  0x3979, 0x397a, 0x397b, 0x397c, 0x397d, 0x397e, 0x3a21, 0x3a22,
+  0x3a23, 0x3a24, 0x3a25, 0x3a26, 0x3a27, 0x3a28, 0x3a29, 0x3a2a,
+  0x3a2b, 0x3a2c, 0x3a2d, 0x3a2e, 0x3a2f, 0x3a30, 0x3a31, 0x3a32,
+  0x3a33, 0x3a34, 0x3a35, 0x3a36, 0x3a37, 0x3a38, 0x3a39, 0x3a3a,
+  0x3a3b, 0x3a3c, 0x3a3d, 0x3a3e, 0x3a3f, 0x3a40, 0x3a41, 0x3a42,
+  0x3a43, 0x3a44, 0x3a45, 0x3a46, 0x3a47, 0x3a48, 0x3a49, 0x3a4a,
+  0x3a4b, 0x3a4c, 0x3a4d, 0x3a4e, 0x3a4f, 0x3a50, 0x3a51, 0x3a52,
+  0x3a53, 0x3a54, 0x3a55, 0x3a56, 0x3a57, 0x3a58, 0x3a59, 0x3a5a,
+  0x3a5b, 0x3a5c, 0x3a5d, 0x3a5e, 0x3a5f, 0x3a60, 0x3a61, 0x3a62,
+  0x3a63, 0x3a64, 0x3a65, 0x3a66, 0x3a67, 0x3a68, 0x3a69, 0x3a6a,
+  0x3a6b, 0x3a6c, 0x3a6d, 0x3a6e, 0x3a6f, 0x3a70, 0x3a71, 0x3a72,
+  0x3a73, 0x3a74, 0x3a75, 0x3a76, 0x3a77, 0x3a78, 0x3a79, 0x3a7a,
+  0x3a7b, 0x3a7c, 0x3a7d, 0x3a7e, 0x3b21, 0x3b22, 0x3b23, 0x3b24,
+  0x3b25, 0x3b26, 0x3b27, 0x3b28, 0x3b29, 0x3b2a, 0x3b2b, 0x3b2c,
+  0x3b2d, 0x3b2e, 0x3b2f, 0x3b30, 0x3b31, 0x3b32, 0x3b33, 0x3b34,
+  0x3b35, 0x3b36, 0x3b37, 0x3b38, 0x3b39, 0x3b3a, 0x3b3b, 0x3b3c,
+  0x3b3d, 0x3b3e, 0x3b3f, 0x3b40, 0x3b41, 0x3b42, 0x3b43, 0x3b44,
+  0x3b45, 0x3b46, 0x3b47, 0x3b48, 0x3b49, 0x3b4a, 0x3b4b, 0x3b4c,
+  0x3b4d, 0x3b4e, 0x3b4f, 0x3b50, 0x3b51, 0x3b52, 0x3b53, 0x3b54,
+  0x3b55, 0x3b56, 0x3b57, 0x3b58, 0x3b59, 0x3b5a, 0x3b5b, 0x3b5c,
+  0x3b5d, 0x3b5e, 0x3b5f, 0x3b60, 0x3b61, 0x3b62, 0x3b63, 0x3b64,
+  0x3b65, 0x3b66, 0x3b67, 0x3b68, 0x3b69, 0x3b6a, 0x3b6b, 0x3b6c,
+  0x3b6d, 0x3b6e, 0x3b6f, 0x3b70, 0x3b71, 0x3b72, 0x3b73, 0x3b74,
+  0x3b75, 0x3b76, 0x3b77, 0x3b78, 0x3b79, 0x3b7a, 0x3b7b, 0x3b7c,
+  0x3b7d, 0x3b7e, 0x3c21, 0x3c22, 0x3c23, 0x3c24, 0x3c25, 0x3c26,
+  0x3c27, 0x3c28, 0x3c29, 0x3c2a, 0x3c2b, 0x3c2c, 0x3c2d, 0x3c2e,
+  0x3c2f, 0x3c30, 0x3c31, 0x3c32, 0x3c33, 0x3c34, 0x3c35, 0x3c36,
+  0x3c37, 0x3c38, 0x3c39, 0x3c3a, 0x3c3b, 0x3c3c, 0x3c3d, 0x3c3e,
+  0x3c3f, 0x3c40, 0x3c41, 0x3c42, 0x3c43, 0x3c44, 0x3c45, 0x3c46,
+  0x3c47, 0x3c48, 0x3c49, 0x3c4a, 0x3c4b, 0x3c4c, 0x3c4d, 0x3c4e,
+  0x3c4f, 0x3c50, 0x3c51, 0x3c52, 0x3c53, 0x3c54, 0x3c55, 0x3c56,
+  0x3c57, 0x3c58, 0x3c59, 0x3c5a, 0x3c5b, 0x3c5c, 0x3c5d, 0x3c5e,
+  0x3c5f, 0x3c60, 0x3c61, 0x3c62, 0x3c63, 0x3c64, 0x3c65, 0x3c66,
+  0x3c67, 0x3c68, 0x3c69, 0x3c6a, 0x3c6b, 0x3c6c, 0x3c6d, 0x3c6e,
+  0x3c6f, 0x3c70, 0x3c71, 0x3c72, 0x3c73, 0x3c74, 0x3c75, 0x3c76,
+  0x3c77, 0x3c78, 0x3c79, 0x3c7a, 0x3c7b, 0x3c7c, 0x3c7d, 0x3c7e,
+  0x3d21, 0x3d22, 0x3d23, 0x3d24, 0x3d25, 0x3d26, 0x3d27, 0x3d28,
+  0x3d29, 0x3d2a, 0x3d2b, 0x3d2c, 0x3d2d, 0x3d2e, 0x3d2f, 0x3d30,
+  0x3d31, 0x3d32, 0x3d33, 0x3d34, 0x3d35, 0x3d36, 0x3d37, 0x3d38,
+  0x3d39, 0x3d3a, 0x3d3b, 0x3d3c, 0x3d3d, 0x3d3e, 0x3d3f, 0x3d40,
+  0x3d41, 0x3d42, 0x3d43, 0x3d44, 0x3d45, 0x3d46, 0x3d47, 0x3d48,
+  0x3d49, 0x3d4a, 0x3d4b, 0x3d4c, 0x3d4d, 0x3d4e, 0x3d4f, 0x3d50,
+  0x3d51, 0x3d52, 0x3d53, 0x3d54, 0x3d55, 0x3d56, 0x3d57, 0x3d58,
+  0x3d59, 0x3d5a, 0x3d5b, 0x3d5c, 0x3d5d, 0x3d5e, 0x3d5f, 0x3d60,
+  0x3d61, 0x3d62, 0x3d63, 0x3d64, 0x3d65, 0x3d66, 0x3d67, 0x3d68,
+  0x3d69, 0x3d6a, 0x3d6b, 0x3d6c, 0x3d6d, 0x3d6e, 0x3d6f, 0x3d70,
+  0x3d71, 0x3d72, 0x3d73, 0x3d74, 0x3d75, 0x3d76, 0x3d77, 0x3d78,
+  0x3d79, 0x3d7a, 0x3d7b, 0x3d7c, 0x3d7d, 0x3d7e, 0x3e21, 0x3e22,
+  0x3e23, 0x3e24, 0x3e25, 0x3e26, 0x3e27, 0x3e28, 0x3e29, 0x3e2a,
+  0x3e2b, 0x3e2c, 0x3e2d, 0x3e2e, 0x3e2f, 0x3e30, 0x3e31, 0x3e32,
+  0x3e33, 0x3e34, 0x3e35, 0x3e36, 0x3e37, 0x3e38, 0x3e39, 0x3e3a,
+  0x3e3b, 0x3e3c, 0x3e3d, 0x3e3e, 0x3e3f, 0x3e40, 0x3e41, 0x3e42,
+  0x3e43, 0x3e44, 0x3e45, 0x3e46, 0x3e47, 0x3e48, 0x3e49, 0x3e4a,
+  0x3e4b, 0x3e4c, 0x3e4d, 0x3e4e, 0x3e4f, 0x3e50, 0x3e51, 0x3e52,
+  0x3e53, 0x3e54, 0x3e55, 0x3e56, 0x3e57, 0x3e58, 0x3e59, 0x3e5a,
+  0x3e5b, 0x3e5c, 0x3e5d, 0x3e5e, 0x3e5f, 0x3e60, 0x3e61, 0x3e62,
+  0x3e63, 0x3e64, 0x3e65, 0x3e66, 0x3e67, 0x3e68, 0x3e69, 0x3e6a,
+  0x3e6b, 0x3e6c, 0x3e6d, 0x3e6e, 0x3e6f, 0x3e70, 0x3e71, 0x3e72,
+  0x3e73, 0x3e74, 0x3e75, 0x3e76, 0x3e77, 0x3e78, 0x3e79, 0x3e7a,
+  0x3e7b, 0x3e7c, 0x3e7d, 0x3e7e, 0x3f21, 0x3f22, 0x3f23, 0x3f24,
+  0x3f25, 0x3f26, 0x3f27, 0x3f28, 0x3f29, 0x3f2a, 0x3f2b, 0x3f2c,
+  0x3f2d, 0x3f2e, 0x3f2f, 0x3f30, 0x3f31, 0x3f32, 0x3f33, 0x3f34,
+  0x3f35, 0x3f36, 0x3f37, 0x3f38, 0x3f39, 0x3f3a, 0x3f3b, 0x3f3c,
+  0x3f3d, 0x3f3e, 0x3f3f, 0x3f40, 0x3f41, 0x3f42, 0x3f43, 0x3f44,
+  0x3f45, 0x3f46, 0x3f47, 0x3f48, 0x3f49, 0x3f4a, 0x3f4b, 0x3f4c,
+  0x3f4d, 0x3f4e, 0x3f4f, 0x3f50, 0x3f51, 0x3f52, 0x3f53, 0x3f54,
+  0x3f55, 0x3f56, 0x3f57, 0x3f58, 0x3f59, 0x3f5a, 0x3f5b, 0x3f5c,
+  0x3f5d, 0x3f5e, 0x3f5f, 0x3f60, 0x3f61, 0x3f62, 0x3f63, 0x3f64,
+  0x3f65, 0x3f66, 0x3f67, 0x3f68, 0x3f69, 0x3f6a, 0x3f6b, 0x3f6c,
+  0x3f6d, 0x3f6e, 0x3f6f, 0x3f70, 0x3f71, 0x3f72, 0x3f73, 0x3f74,
+  0x3f75, 0x3f76, 0x3f77, 0x3f78, 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c,
+  0x3f7d, 0x3f7e, 0x4021, 0x4022, 0x4023, 0x4024, 0x4025, 0x4026,
+  0x4027, 0x4028, 0x4029, 0x402a, 0x402b, 0x402c, 0x402d, 0x402e,
+  0x402f, 0x4030, 0x4031, 0x4032, 0x4033, 0x4034, 0x4035, 0x4036,
+  0x4037, 0x4038, 0x4039, 0x403a, 0x403b, 0x403c, 0x403d, 0x403e,
+  0x403f, 0x4040, 0x4041, 0x4042, 0x4043, 0x4044, 0x4045, 0x4046,
+  0x4047, 0x4048, 0x4049, 0x404a, 0x404b, 0x404c, 0x404d, 0x404e,
+  0x404f, 0x4050, 0x4051, 0x4052, 0x4053, 0x4054, 0x4055, 0x4056,
+  0x4057, 0x4058, 0x4059, 0x405a, 0x405b, 0x405c, 0x405d, 0x405e,
+  0x405f, 0x4060, 0x4061, 0x4062, 0x4063, 0x4064, 0x4065, 0x4066,
+  0x4067, 0x4068, 0x4069, 0x406a, 0x406b, 0x406c, 0x406d, 0x406e,
+  0x406f, 0x4070, 0x4071, 0x4072, 0x4073, 0x4074, 0x4075, 0x4076,
+  0x4077, 0x4078, 0x4079, 0x407a, 0x407b, 0x407c, 0x407d, 0x407e,
+  0x4121, 0x4122, 0x4123, 0x4124, 0x4125, 0x4126, 0x4127, 0x4128,
+  0x4129, 0x412a, 0x412b, 0x412c, 0x412d, 0x412e, 0x412f, 0x4130,
+  0x4131, 0x4132, 0x4133, 0x4134, 0x4135, 0x4136, 0x4137, 0x4138,
+  0x4139, 0x413a, 0x413b, 0x413c, 0x413d, 0x413e, 0x413f, 0x4140,
+  0x4141, 0x4142, 0x4143, 0x4144, 0x4145, 0x4146, 0x4147, 0x4148,
+  0x4149, 0x414a, 0x414b, 0x414c, 0x414d, 0x414e, 0x414f, 0x4150,
+  0x4151, 0x4152, 0x4153, 0x4154, 0x4155, 0x4156, 0x4157, 0x4158,
+  0x4159, 0x415a, 0x415b, 0x415c, 0x415d, 0x415e, 0x415f, 0x4160,
+  0x4161, 0x4162, 0x4163, 0x4164, 0x4165, 0x4166, 0x4167, 0x4168,
+  0x4169, 0x416a, 0x416b, 0x416c, 0x416d, 0x416e, 0x416f, 0x4170,
+  0x4171, 0x4172, 0x4173, 0x4174, 0x4175, 0x4176, 0x4177, 0x4178,
+  0x4179, 0x417a, 0x417b, 0x417c, 0x417d, 0x417e, 0x4221, 0x4222,
+  0x4223, 0x4224, 0x4225, 0x4226, 0x4227, 0x4228, 0x4229, 0x422a,
+  0x422b, 0x422c, 0x422d, 0x422e, 0x422f, 0x4230, 0x4231, 0x4232,
+  0x4233, 0x4234, 0x4235, 0x4236, 0x4237, 0x4238, 0x4239, 0x423a,
+  0x423b, 0x423c, 0x423d, 0x423e, 0x423f, 0x4240, 0x4241, 0x4242,
+  0x4243, 0x4244, 0x4245, 0x4246, 0x4247, 0x4248, 0x4249, 0x424a,
+  0x424b, 0x424c, 0x424d, 0x424e, 0x424f, 0x4250, 0x4251, 0x4252,
+  0x4253, 0x4254, 0x4255, 0x4256, 0x4257, 0x4258, 0x4259, 0x425a,
+  0x425b, 0x425c, 0x425d, 0x425e, 0x425f, 0x4260, 0x4261, 0x4262,
+  0x4263, 0x4264, 0x4265, 0x4266, 0x4267, 0x4268, 0x4269, 0x426a,
+  0x426b, 0x426c, 0x426d, 0x426e, 0x426f, 0x4270, 0x4271, 0x4272,
+  0x4273, 0x4274, 0x4275, 0x4276, 0x4277, 0x4278, 0x4279, 0x427a,
+  0x427b, 0x427c, 0x427d, 0x427e, 0x4321, 0x4322, 0x4323, 0x4324,
+  0x4325, 0x4326, 0x4327, 0x4328, 0x4329, 0x432a, 0x432b, 0x432c,
+  0x432d, 0x432e, 0x432f, 0x4330, 0x4331, 0x4332, 0x4333, 0x4334,
+  0x4335, 0x4336, 0x4337, 0x4338, 0x4339, 0x433a, 0x433b, 0x433c,
+  0x433d, 0x433e, 0x433f, 0x4340, 0x4341, 0x4342, 0x4343, 0x4344,
+  0x4345, 0x4346, 0x4347, 0x4348, 0x4349, 0x434a, 0x434b, 0x434c,
+  0x434d, 0x434e, 0x434f, 0x4350, 0x4351, 0x4352, 0x4353, 0x4354,
+  0x4355, 0x4356, 0x4357, 0x4358, 0x4359, 0x435a, 0x435b, 0x435c,
+  0x435d, 0x435e, 0x435f, 0x4360, 0x4361, 0x4362, 0x4363, 0x4364,
+  0x4365, 0x4366, 0x4367, 0x4368, 0x4369, 0x436a, 0x436b, 0x436c,
+  0x436d, 0x436e, 0x436f, 0x4370, 0x4371, 0x4372, 0x4373, 0x4374,
+  0x4375, 0x4376, 0x4377, 0x4378, 0x4379, 0x437a, 0x437b, 0x437c,
+  0x437d, 0x437e, 0x4421, 0x4422, 0x4423, 0x4424, 0x4425, 0x4426,
+  0x4427, 0x4428, 0x4429, 0x442a, 0x442b, 0x442c, 0x442d, 0x442e,
+  0x442f, 0x4430, 0x4431, 0x4432, 0x4433, 0x4434, 0x4435, 0x4436,
+  0x4437, 0x4438, 0x4439, 0x443a, 0x443b, 0x443c, 0x443d, 0x443e,
+  0x443f, 0x4440, 0x4441, 0x4442, 0x4443, 0x4444, 0x4445, 0x4446,
+  0x4447, 0x4448, 0x4449, 0x444a, 0x444b, 0x444c, 0x444d, 0x444e,
+  0x444f, 0x4450, 0x4451, 0x4452, 0x4453, 0x4454, 0x4455, 0x4456,
+  0x4457, 0x4458, 0x4459, 0x445a, 0x445b, 0x445c, 0x445d, 0x445e,
+  0x445f, 0x4460, 0x4461, 0x4462, 0x4463, 0x4464, 0x4465, 0x4466,
+  0x4467, 0x4468, 0x4469, 0x446a, 0x446b, 0x446c, 0x446d, 0x446e,
+  0x446f, 0x4470, 0x4471, 0x4472, 0x4473, 0x4474, 0x4475, 0x4476,
+  0x4477, 0x4478, 0x4479, 0x447a, 0x447b, 0x447c, 0x447d, 0x447e,
+  0x4521, 0x4522, 0x4523, 0x4524, 0x4525, 0x4526, 0x4527, 0x4528,
+  0x4529, 0x452a, 0x452b, 0x452c, 0x452d, 0x452e, 0x452f, 0x4530,
+  0x4531, 0x4532, 0x4533, 0x4534, 0x4535, 0x4536, 0x4537, 0x4538,
+  0x4539, 0x453a, 0x453b, 0x453c, 0x453d, 0x453e, 0x453f, 0x4540,
+  0x4541, 0x4542, 0x4543, 0x4544, 0x4545, 0x4546, 0x4547, 0x4548,
+  0x4549, 0x454a, 0x454b, 0x454c, 0x454d, 0x454e, 0x454f, 0x4550,
+  0x4551, 0x4552, 0x4553, 0x4554, 0x4555, 0x4556, 0x4557, 0x4558,
+  0x4559, 0x455a, 0x455b, 0x455c, 0x455d, 0x455e, 0x455f, 0x4560,
+  0x4561, 0x4562, 0x4563, 0x4564, 0x4565, 0x4566, 0x4567, 0x4568,
+  0x4569, 0x456a, 0x456b, 0x456c, 0x456d, 0x456e, 0x456f, 0x4570,
+  0x4571, 0x4572, 0x4573, 0x4574, 0x4575, 0x4576, 0x4577, 0x4578,
+  0x4579, 0x457a, 0x457b, 0x457c, 0x457d, 0x457e, 0x4621, 0x4622,
+  0x4623, 0x4624, 0x4625, 0x4626, 0x4627, 0x4628, 0x4629, 0x462a,
+  0x462b, 0x462c, 0x462d, 0x462e, 0x462f, 0x4630, 0x4631, 0x4632,
+  0x4633, 0x4634, 0x4635, 0x4636, 0x4637, 0x4638, 0x4639, 0x463a,
+  0x463b, 0x463c, 0x463d, 0x463e, 0x463f, 0x4640, 0x4641, 0x4642,
+  0x4643, 0x4644, 0x4645, 0x4646, 0x4647, 0x4648, 0x4649, 0x464a,
+  0x464b, 0x464c, 0x464d, 0x464e, 0x464f, 0x4650, 0x4651, 0x4652,
+  0x4653, 0x4654, 0x4655, 0x4656, 0x4657, 0x4658, 0x4659, 0x465a,
+  0x465b, 0x465c, 0x465d, 0x465e, 0x465f, 0x4660, 0x4661, 0x4662,
+  0x4663, 0x4664, 0x4665, 0x4666, 0x4667, 0x4668, 0x4669, 0x466a,
+  0x466b, 0x466c, 0x466d, 0x466e, 0x466f, 0x4670, 0x4671, 0x4672,
+  0x4673, 0x4674, 0x4675, 0x4676, 0x4677, 0x4678, 0x4679, 0x467a,
+  0x467b, 0x467c, 0x467d, 0x467e, 0x4721, 0x4722, 0x4723, 0x4724,
+  0x4725, 0x4726, 0x4727, 0x4728, 0x4729, 0x472a, 0x472b, 0x472c,
+  0x472d, 0x472e, 0x472f, 0x4730, 0x4731, 0x4732, 0x4733, 0x4734,
+  0x4735, 0x4736, 0x4737, 0x4738, 0x4739, 0x473a, 0x473b, 0x473c,
+  0x473d, 0x473e, 0x473f, 0x4740, 0x4741, 0x4742, 0x4743, 0x4744,
+  0x4745, 0x4746, 0x4747, 0x4748, 0x4749, 0x474a, 0x474b, 0x474c,
+  0x474d, 0x474e, 0x474f, 0x4750, 0x4751, 0x4752, 0x4753, 0x4754,
+  0x4755, 0x4756, 0x4757, 0x4758, 0x4759, 0x475a, 0x475b, 0x475c,
+  0x475d, 0x475e, 0x475f, 0x4760, 0x4761, 0x4762, 0x4763, 0x4764,
+  0x4765, 0x4766, 0x4767, 0x4768, 0x4769, 0x476a, 0x476b, 0x476c,
+  0x476d, 0x476e, 0x476f, 0x4770, 0x4771, 0x4772, 0x4773, 0x4774,
+  0x4775, 0x4776, 0x4777, 0x4778, 0x4779, 0x477a, 0x477b, 0x477c,
+  0x477d, 0x477e, 0x4821, 0x4822, 0x4823, 0x4824, 0x4825, 0x4826,
+  0x4827, 0x4828, 0x4829, 0x482a, 0x482b, 0x482c, 0x482d, 0x482e,
+  0x482f, 0x4830, 0x4831, 0x4832, 0x4833, 0x4834, 0x4835, 0x4836,
+  0x4837, 0x4838, 0x4839, 0x483a, 0x483b, 0x483c, 0x483d, 0x483e,
+  0x483f, 0x4840, 0x4841, 0x4842, 0x4843, 0x4844, 0x4845, 0x4846,
+  0x4847, 0x4848, 0x4849, 0x484a, 0x484b, 0x484c, 0x484d, 0x484e,
+  0x484f, 0x4850, 0x4851, 0x4852, 0x4853, 0x4854, 0x4855, 0x4856,
+  0x4857, 0x4858, 0x4859, 0x485a, 0x485b, 0x485c, 0x485d, 0x485e,
+  0x485f, 0x4860, 0x4861, 0x4862, 0x4863, 0x4864, 0x4865, 0x4866,
+  0x4867, 0x4868, 0x4869, 0x486a, 0x486b, 0x486c, 0x486d, 0x486e,
+  0x486f, 0x4870, 0x4871, 0x4872, 0x4873, 0x4874, 0x4875, 0x4876,
+  0x4877, 0x4878, 0x4879, 0x487a, 0x487b, 0x487c, 0x487d, 0x487e,
+  0x4b50, 0x4b56, 0x4b67, 0x4d4f, 0x4d68, 0x4e2d, 0x4f7b, 0x5022,
+  0x5038, 0x5050, 0x505d, 0x5154, 0x5155, 0x5158, 0x515b, 0x515c,
+  0x515d, 0x515e, 0x515f, 0x5160, 0x5162, 0x5163, 0x5164, 0x5165,
+  0x5166, 0x5168, 0x5169, 0x516a, 0x516b, 0x516d, 0x516f, 0x5170,
+  0x5172, 0x5176, 0x517a, 0x517c, 0x517d, 0x517e, 0x5222, 0x5223,
+  0x5227, 0x5228, 0x5229, 0x522a, 0x522b, 0x522d, 0x5232, 0x523e,
+  0x5242, 0x5243, 0x5244, 0x5246, 0x5247, 0x5248, 0x5249, 0x524a,
+  0x524b, 0x524d, 0x524e, 0x524f, 0x5250, 0x5251, 0x5252, 0x5253,
+  0x5254, 0x5255, 0x5256, 0x5257, 0x5259, 0x525a, 0x525e, 0x525f,
+  0x5261, 0x5262, 0x5264, 0x5265, 0x5266, 0x5267, 0x5268, 0x5269,
+  0x526a, 0x526b, 0x5270, 0x5271, 0x5272, 0x5273, 0x5274, 0x5275,
+  0x5277, 0x5278, 0x5466, 0x547c, 0x5525, 0x552b, 0x552e, 0x5638,
+  0x564d, 0x574b, 0x5764, 0x5b45, 0x5b64, 0x5c25, 0x5d25, 0x5d55,
+  0x5d74, 0x5e7c, 0x5e7e, 0x5f33, 0x5f61, 0x5f68, 0x6071, 0x612d,
+  0x616d, 0x6375, 0x6421, 0x6429, 0x652e, 0x6531, 0x6532, 0x6539,
+  0x653b, 0x653c, 0x6544, 0x654e, 0x6550, 0x6552, 0x6556, 0x657a,
+  0x657b, 0x657c, 0x657e, 0x6621, 0x6624, 0x6627, 0x662d, 0x662f,
+  0x6630, 0x6631, 0x6633, 0x6637, 0x6638, 0x663c, 0x6644, 0x6646,
+  0x6647, 0x664a, 0x6652, 0x6656, 0x6659, 0x665c, 0x665f, 0x6661,
+  0x6664, 0x6665, 0x6666, 0x6668, 0x666a, 0x666b, 0x666c, 0x666f,
+  0x6671, 0x6672, 0x6675, 0x6676, 0x6677, 0x6679, 0x6721, 0x6726,
+  0x6729, 0x672a, 0x672c, 0x672d, 0x6730, 0x673f, 0x6741, 0x6746,
+  0x6747, 0x674b, 0x674d, 0x674f, 0x6750, 0x6753, 0x675f, 0x6764,
+  0x6766, 0x6777, 0x6867, 0x6868, 0x6870, 0x6871, 0x6877, 0x6879,
+  0x687b, 0x687e, 0x6927, 0x692c, 0x694c, 0x6977, 0x6a41, 0x6a65,
+  0x6a74, 0x6a77, 0x6a7c, 0x6a7e, 0x6b24, 0x6b27, 0x6b29, 0x6b2a,
+  0x6b3a, 0x6b3b, 0x6b3d, 0x6b41, 0x6b42, 0x6b46, 0x6b47, 0x6b4c,
+  0x6b4f, 0x6b50, 0x6b51, 0x6b52, 0x6b58, 0x6c26, 0x6c27, 0x6c2a,
+  0x6c2f, 0x6c30, 0x6c31, 0x6c32, 0x6c35, 0x6c38, 0x6c3a, 0x6c40,
+  0x6c41, 0x6c45, 0x6c46, 0x6c49, 0x6c4a, 0x6c55, 0x6c5d, 0x6c5e,
+  0x6c61, 0x6c64, 0x6c67, 0x6c68, 0x6c77, 0x6c78, 0x6c7a, 0x6d21,
+  0x6d22, 0x6d23, 0x6d6e, 0x6e5b, 0x723d, 0x727a, 0x7331, 0x7427,
+  0x746e, 0x7674, 0x7676, 0x7738, 0x7748, 0x7753, 0x785b, 0x7870,
+  0x7a21, 0x7a22, 0x7a66, 0x7c29, 0x2321, 0x2322, 0x2323, 0x2324,
+  0x2325, 0x2326, 0x2327, 0x2328, 0x2329, 0x232a, 0x232b, 0x232c,
+  0x232d, 0x232e, 0x232f, 0x2330, 0x2331, 0x2332, 0x2333, 0x2334,
+  0x2335, 0x2336, 0x2337, 0x2338, 0x2339, 0x233a, 0x233b, 0x233c,
+  0x233d, 0x233e, 0x233f, 0x2340, 0x2341, 0x2342, 0x2343, 0x2344,
+  0x2345, 0x2346, 0x2347, 0x2348, 0x2349, 0x234a, 0x234b, 0x234c,
+  0x234d, 0x234e, 0x234f, 0x2350, 0x2351, 0x2352, 0x2353, 0x2354,
+  0x2355, 0x2356, 0x2357, 0x2358, 0x2359, 0x235a, 0x235b, 0x212c,
+  0x235d, 0x235e, 0x235f, 0x2360, 0x2361, 0x2362, 0x2363, 0x2364,
+  0x2365, 0x2366, 0x2367, 0x2368, 0x2369, 0x236a, 0x236b, 0x236c,
+  0x236d, 0x236e, 0x236f, 0x2370, 0x2371, 0x2372, 0x2373, 0x2374,
+  0x2375, 0x2376, 0x2377, 0x2378, 0x2379, 0x237a, 0x237b, 0x237c,
+  0x237d, 0x2226, 0x214b, 0x214c, 0x217e, 0x237e, 0x214d, 0x235c,
+};
+
+static const Summary16 ksc5601_uni2indx_page00[70] = {
+  /* 0x0000 */
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x0000 },
+  {    0, 0x0000 }, {    0, 0x0000 }, {    0, 0x2592 }, {    6, 0xf7df },
+  {   20, 0x0040 }, {   21, 0xc181 }, {   26, 0x0040 }, {   27, 0x4181 },
+  /* 0x0100 */
+  {   31, 0x0000 }, {   31, 0x0002 }, {   32, 0x00c0 }, {   34, 0x810e },
+  {   39, 0x0e07 }, {   45, 0x000c }, {   47, 0x00c0 }, {   49, 0x0000 },
+  {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 },
+  {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 },
+  /* 0x0200 */
+  {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 },
+  {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 },
+  {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 }, {   49, 0x0000 },
+  {   49, 0x0080 }, {   50, 0x2f01 }, {   56, 0x0000 }, {   56, 0x0000 },
+  /* 0x0300 */
+  {   56, 0x0000 }, {   56, 0x0000 }, {   56, 0x0000 }, {   56, 0x0000 },
+  {   56, 0x0000 }, {   56, 0x0000 }, {   56, 0x0000 }, {   56, 0x0000 },
+  {   56, 0x0000 }, {   56, 0xfffe }, {   71, 0x03fb }, {   80, 0xfffe },
+  {   95, 0x03fb }, {  104, 0x0000 }, {  104, 0x0000 }, {  104, 0x0000 },
+  /* 0x0400 */
+  {  104, 0x0002 }, {  105, 0xffff }, {  121, 0xffff }, {  137, 0xffff },
+  {  153, 0xffff }, {  169, 0x0002 },
+};
+static const Summary16 ksc5601_uni2indx_page20[103] = {
+  /* 0x2000 */
+  {  170, 0x0000 }, {  170, 0x3320 }, {  175, 0x0063 }, {  179, 0x080d },
+  {  183, 0x0000 }, {  183, 0x0000 }, {  183, 0x0000 }, {  183, 0x8010 },
+  {  185, 0x001e }, {  189, 0x0000 }, {  189, 0x0000 }, {  189, 0x0000 },
+  {  189, 0x0000 }, {  189, 0x0000 }, {  189, 0x0000 }, {  189, 0x0000 },
+  /* 0x2100 */
+  {  189, 0x0208 }, {  191, 0x0048 }, {  193, 0x0846 }, {  197, 0x0000 },
+  {  197, 0x0000 }, {  197, 0x7818 }, {  203, 0x03ff }, {  213, 0x03ff },
+  {  223, 0x0000 }, {  223, 0x03ff }, {  233, 0x0000 }, {  233, 0x0000 },
+  {  233, 0x0000 }, {  233, 0x0014 }, {  235, 0x0000 }, {  235, 0x0000 },
+  /* 0x2200 */
+  {  235, 0x898d }, {  242, 0x6402 }, {  246, 0x5fa1 }, {  255, 0x3030 },
+  {  259, 0x0000 }, {  259, 0x0004 }, {  260, 0x0c33 }, {  266, 0x0000 },
+  {  266, 0x00cc }, {  270, 0x0200 }, {  271, 0x0020 }, {  272, 0x0000 },
+  {  272, 0x0000 }, {  272, 0x0000 }, {  272, 0x0000 }, {  272, 0x0000 },
+  /* 0x2300 */
+  {  272, 0x0000 }, {  272, 0x0004 }, {  273, 0x0000 }, {  273, 0x0000 },
+  {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 },
+  {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 },
+  {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 },
+  /* 0x2400 */
+  {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x0000 },
+  {  273, 0x0000 }, {  273, 0x0000 }, {  273, 0x7fff }, {  288, 0xfff0 },
+  {  300, 0x0007 }, {  303, 0xf000 }, {  307, 0xffff }, {  323, 0x003f },
+  {  329, 0x0000 }, {  329, 0xffff }, {  345, 0x03ff }, {  355, 0x0000 },
+  /* 0x2500 */
+  {  355, 0xf00f }, {  363, 0xffff }, {  379, 0xffff }, {  395, 0xffff },
+  {  411, 0x0fff }, {  423, 0x0000 }, {  423, 0x0000 }, {  423, 0x0000 },
+  {  423, 0x0000 }, {  423, 0x0004 }, {  424, 0x03fb }, {  433, 0x30cc },
+  {  439, 0xc9c3 }, {  447, 0x0003 }, {  449, 0x0000 }, {  449, 0x0000 },
+  /* 0x2600 */
+  {  449, 0xc060 }, {  453, 0x5000 }, {  455, 0x0000 }, {  455, 0x0000 },
+  {  455, 0x0005 }, {  457, 0x0000 }, {  457, 0x37bb },
+};
+static const Summary16 ksc5601_uni2indx_page30[62] = {
+  /* 0x3000 */
+  {  468, 0xff0f }, {  480, 0x003b }, {  485, 0x0000 }, {  485, 0x0000 },
+  {  485, 0xfffe }, {  500, 0xffff }, {  516, 0xffff }, {  532, 0xffff },
+  {  548, 0xffff }, {  564, 0x000f }, {  568, 0xfffe }, {  583, 0xffff },
+  {  599, 0xffff }, {  615, 0xffff }, {  631, 0xffff }, {  647, 0x007f },
+  /* 0x3100 */
+  {  654, 0x0000 }, {  654, 0x0000 }, {  654, 0x0000 }, {  654, 0xfffe },
+  {  669, 0xffff }, {  685, 0xffff }, {  701, 0xffff }, {  717, 0xffff },
+  {  733, 0x7fff }, {  748, 0x0000 }, {  748, 0x0000 }, {  748, 0x0000 },
+  {  748, 0x0000 }, {  748, 0x0000 }, {  748, 0x0000 }, {  748, 0x0000 },
+  /* 0x3200 */
+  {  748, 0xffff }, {  764, 0x1fff }, {  777, 0x0000 }, {  777, 0x0000 },
+  {  777, 0x0000 }, {  777, 0x0000 }, {  777, 0xffff }, {  793, 0x8fff },
+  {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 },
+  {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 },
+  /* 0x3300 */
+  {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 },
+  {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 }, {  806, 0x0000 },
+  {  806, 0xff1f }, {  819, 0xffff }, {  835, 0xffff }, {  851, 0xffff },
+  {  867, 0x87ff }, {  879, 0x3949 },
+};
+static const Summary16 ksc5601_uni2indx_page4e[1306] = {
+  /* 0x4e00 */
+  {  886, 0x2f8b }, {  895, 0x4372 }, {  902, 0x2000 }, {  903, 0x0b04 },
+  {  907, 0xe82c }, {  914, 0xe340 }, {  920, 0x2800 }, {  922, 0x40c8 },
+  {  926, 0x5944 }, {  932, 0x4937 }, {  940, 0x7976 }, {  950, 0x0440 },
+  {  952, 0x2c93 }, {  959, 0xa3f0 }, {  967, 0x0038 }, {  970, 0x08c5 },
+  /* 0x4f00 */
+  {  975, 0xee02 }, {  982, 0x0003 }, {  984, 0x8000 }, {  985, 0x3550 },
+  {  991, 0xe1c8 }, {  998, 0x1e23 }, { 1005, 0x8200 }, { 1007, 0xc449 },
+  { 1013, 0xad5a }, { 1022, 0x2942 }, { 1027, 0xc000 }, { 1029, 0x8060 },
+  { 1032, 0x461c }, { 1038, 0xa49a }, { 1045, 0xc003 }, { 1049, 0x052a },
+  /* 0x5000 */
+  { 1054, 0x2a44 }, { 1059, 0xd646 }, { 1067, 0x3dda }, { 1077, 0x0800 },
+  { 1078, 0x8388 }, { 1083, 0x1420 }, { 1086, 0x0020 }, { 1087, 0x0170 },
+  { 1091, 0x2021 }, { 1094, 0x0302 }, { 1097, 0x3000 }, { 1099, 0x40ac },
+  { 1104, 0x8620 }, { 1108, 0x4462 }, { 1113, 0x20a0 }, { 1116, 0x8a00 },
+  /* 0x5100 */
+  { 1119, 0x0253 }, { 1124, 0x8004 }, { 1126, 0x0402 }, { 1128, 0x1484 },
+  { 1132, 0x7bfb }, { 1145, 0x1004 }, { 1147, 0x7fa4 }, { 1157, 0x11e2 },
+  { 1163, 0x2441 }, { 1167, 0x00a4 }, { 1170, 0x1421 }, { 1174, 0x20c0 },
+  { 1177, 0x3a50 }, { 1183, 0x7000 }, { 1186, 0x0002 }, { 1187, 0x2743 },
+  /* 0x5200 */
+  { 1194, 0x45c9 }, { 1201, 0x2082 }, { 1204, 0x4630 }, { 1209, 0x0fc1 },
+  { 1216, 0x3c88 }, { 1222, 0x2850 }, { 1226, 0x8602 }, { 1230, 0xa024 },
+  { 1234, 0x2388 }, { 1239, 0x8806 }, { 1243, 0x0e19 }, { 1249, 0x4000 },
+  { 1250, 0x22aa }, { 1256, 0xeb64 }, { 1265, 0x001c }, { 1268, 0xcd28 },
+  /* 0x5300 */
+  { 1275, 0xa120 }, { 1279, 0x02e1 }, { 1284, 0x840b }, { 1289, 0x8200 },
+  { 1291, 0x279b }, { 1300, 0x549e }, { 1308, 0x8141 }, { 1312, 0xa0b3 },
+  { 1319, 0x0010 }, { 1320, 0x8508 }, { 1324, 0x2061 }, { 1328, 0x0800 },
+  { 1329, 0x2f08 }, { 1335, 0x08d0 }, { 1339, 0xbe3e }, { 1350, 0x010f },
+  /* 0x5400 */
+  { 1355, 0xf718 }, { 1364, 0xa803 }, { 1369, 0x0a41 }, { 1373, 0x5b08 },
+  { 1379, 0x0504 }, { 1382, 0x0002 }, { 1383, 0x0500 }, { 1385, 0x382a },
+  { 1391, 0x5041 }, { 1395, 0x0001 }, { 1396, 0x1910 }, { 1400, 0x2108 },
+  { 1403, 0x0313 }, { 1408, 0x0000 }, { 1408, 0x6122 }, { 1413, 0x0404 },
+  /* 0x5500 */
+  { 1415, 0x40d0 }, { 1419, 0x1001 }, { 1421, 0x8000 }, { 1422, 0x4022 },
+  { 1425, 0x8050 }, { 1428, 0x4048 }, { 1431, 0x0008 }, { 1432, 0x1000 },
+  { 1433, 0x06d1 }, { 1439, 0x3700 }, { 1444, 0x5e80 }, { 1450, 0x0000 },
+  { 1450, 0x00a0 }, { 1452, 0x9410 }, { 1456, 0x0018 }, { 1458, 0x6000 },
+  /* 0x5600 */
+  { 1460, 0x0240 }, { 1462, 0x0090 }, { 1464, 0x8000 }, { 1465, 0x0054 },
+  { 1468, 0x0000 }, { 1468, 0x0008 }, { 1469, 0x0900 }, { 1471, 0x0010 },
+  { 1472, 0x0040 }, { 1473, 0x0000 }, { 1473, 0x5020 }, { 1476, 0x1010 },
+  { 1478, 0x2400 }, { 1480, 0x4c02 }, { 1484, 0x0001 }, { 1485, 0x0601 },
+  /* 0x5700 */
+  { 1488, 0x2918 }, { 1493, 0x814c }, { 1498, 0x2100 }, { 1500, 0x0801 },
+  { 1502, 0x6485 }, { 1508, 0x0003 }, { 1510, 0x4452 }, { 1515, 0x1021 },
+  { 1518, 0x0904 }, { 1521, 0x0008 }, { 1522, 0x000d }, { 1525, 0x0000 },
+  { 1525, 0x4988 }, { 1530, 0x8000 }, { 1531, 0x0001 }, { 1532, 0x1691 },
+  /* 0x5800 */
+  { 1538, 0x0765 }, { 1545, 0x4000 }, { 1546, 0x8492 }, { 1551, 0x0433 },
+  { 1556, 0x8c00 }, { 1559, 0x4592 }, { 1565, 0x0016 }, { 1568, 0x5220 },
+  { 1572, 0x0228 }, { 1575, 0xd008 }, { 1579, 0x4300 }, { 1582, 0x4c08 },
+  { 1586, 0x40a2 }, { 1590, 0xc32a }, { 1597, 0x9810 }, { 1601, 0x2e00 },
+  /* 0x5900 */
+  { 1605, 0x8000 }, { 1606, 0x1670 }, { 1612, 0x6e84 }, { 1619, 0x4082 },
+  { 1622, 0xc390 }, { 1628, 0x04b3 }, { 1634, 0x7c85 }, { 1642, 0x2118 },
+  { 1646, 0x041c }, { 1650, 0x02c8 }, { 1654, 0x1120 }, { 1657, 0x4a00 },
+  { 1660, 0x0a48 }, { 1664, 0x361b }, { 1672, 0x5540 }, { 1677, 0x8900 },
+  /* 0x5a00 */
+  { 1680, 0x000a }, { 1682, 0x9902 }, { 1687, 0x0221 }, { 1690, 0x1040 },
+  { 1692, 0x0242 }, { 1695, 0x0400 }, { 1696, 0x0044 }, { 1698, 0x0000 },
+  { 1698, 0x0000 }, { 1698, 0x0c04 }, { 1701, 0x0010 }, { 1702, 0x0000 },
+  { 1702, 0x1216 }, { 1707, 0x0000 }, { 1707, 0x0242 }, { 1710, 0x0000 },
+  /* 0x5b00 */
+  { 1710, 0x1a20 }, { 1714, 0x0040 }, { 1715, 0x0400 }, { 1716, 0x0000 },
+  { 1716, 0x0009 }, { 1718, 0xb5b3 }, { 1728, 0x0a18 }, { 1732, 0x1523 },
+  { 1738, 0x9ba0 }, { 1745, 0x1fe8 }, { 1754, 0x507c }, { 1761, 0x8379 },
+  { 1769, 0x10fd }, { 1777, 0xc09d }, { 1784, 0xdbf6 }, { 1796, 0x0560 },
+  /* 0x5c00 */
+  { 1800, 0xef92 }, { 1810, 0x0242 }, { 1813, 0x0110 }, { 1815, 0xdf02 },
+  { 1823, 0x6961 }, { 1830, 0x0822 }, { 1833, 0x9035 }, { 1839, 0x0202 },
+  { 1841, 0x0000 }, { 1841, 0x0003 }, { 1843, 0x1a02 }, { 1847, 0x45aa },
+  { 1854, 0x0001 }, { 1855, 0x0200 }, { 1856, 0x8101 }, { 1859, 0x2851 },
+  /* 0x5d00 */
+  { 1864, 0x6080 }, { 1867, 0x02d2 }, { 1872, 0x0280 }, { 1874, 0x0000 },
+  { 1874, 0x1800 }, { 1876, 0x0001 }, { 1877, 0x9200 }, { 1880, 0x0000 },
+  { 1880, 0x0880 }, { 1882, 0x2000 }, { 1883, 0x0405 }, { 1886, 0x3500 },
+  { 1890, 0x2000 }, { 1891, 0x6044 }, { 1895, 0x49e6 }, { 1903, 0x609e },
+  /* 0x5e00 */
+  { 1910, 0x104c }, { 1914, 0x2a42 }, { 1919, 0x2820 }, { 1922, 0xa148 },
+  { 1927, 0x10b1 }, { 1932, 0x8020 }, { 1934, 0x000e }, { 1937, 0x7b9c },
+  { 1947, 0x8490 }, { 1951, 0x14a0 }, { 1955, 0x28c1 }, { 1960, 0x41e0 },
+  { 1965, 0x0704 }, { 1969, 0x8c49 }, { 1975, 0x100d }, { 1979, 0x0cc8 },
+  /* 0x5f00 */
+  { 1984, 0x8412 }, { 1988, 0x89ba }, { 1996, 0x02c0 }, { 1999, 0x1422 },
+  { 2003, 0x5500 }, { 2007, 0x0ac0 }, { 2011, 0x3ec4 }, { 2019, 0x9283 },
+  { 2025, 0x1ca3 }, { 2032, 0x4387 }, { 2039, 0x4703 }, { 2045, 0x22a0 },
+  { 2049, 0x3028 }, { 2053, 0x03c0 }, { 2057, 0x0801 }, { 2059, 0xa020 },
+  /* 0x6000 */
+  { 2062, 0x8000 }, { 2063, 0x3044 }, { 2067, 0x85a3 }, { 2074, 0x0000 },
+  { 2074, 0x200e }, { 2078, 0x2225 }, { 2083, 0xb73c }, { 2093, 0x0001 },
+  { 2094, 0x3220 }, { 2098, 0x8c50 }, { 2103, 0x0099 }, { 2107, 0x315d },
+  { 2115, 0x00a0 }, { 2117, 0x9402 }, { 2121, 0x0003 }, { 2123, 0x0e4b },
+  /* 0x6100 */
+  { 2130, 0xe342 }, { 2137, 0x8c20 }, { 2141, 0x0080 }, { 2142, 0xd091 },
+  { 2148, 0x1d94 }, { 2155, 0xa328 }, { 2161, 0x499c }, { 2168, 0x60c1 },
+  { 2173, 0x4406 }, { 2177, 0x0713 }, { 2183, 0x5a90 }, { 2189, 0x4444 },
+  { 2193, 0x0f88 }, { 2199, 0x0000 }, { 2199, 0x0040 }, { 2200, 0x95c4 },
+  /* 0x6200 */
+  { 2207, 0x7581 }, { 2214, 0x8447 }, { 2220, 0x4402 }, { 2223, 0xc053 },
+  { 2229, 0x2b83 }, { 2236, 0x0108 }, { 2238, 0x4000 }, { 2239, 0x9242 },
+  { 2244, 0x0611 }, { 2248, 0x09a6 }, { 2254, 0x0800 }, { 2255, 0x3222 },
+  { 2260, 0xb384 }, { 2267, 0x1bdd }, { 2277, 0xf000 }, { 2281, 0xc08a },
+  /* 0x6300 */
+  { 2286, 0x0282 }, { 2289, 0x0002 }, { 2290, 0x8800 }, { 2292, 0x6c00 },
+  { 2296, 0x9200 }, { 2299, 0x0021 }, { 2301, 0x4180 }, { 2304, 0x8c84 },
+  { 2309, 0x1308 }, { 2313, 0x0944 }, { 2317, 0x07a7 }, { 2325, 0x0000 },
+  { 2325, 0x8051 }, { 2329, 0x0c41 }, { 2333, 0x6002 }, { 2336, 0x00d0 },
+  /* 0x6400 */
+  { 2339, 0xa000 }, { 2341, 0x10d0 }, { 2345, 0x3004 }, { 2348, 0x4400 },
+  { 2350, 0x0000 }, { 2350, 0x0100 }, { 2351, 0x8201 }, { 2354, 0x0700 },
+  { 2357, 0x0100 }, { 2358, 0x440e }, { 2363, 0x6830 }, { 2368, 0x0805 },
+  { 2371, 0x64b2 }, { 2378, 0x0514 }, { 2382, 0x10e6 }, { 2388, 0x4414 },
+  /* 0x6500 */
+  { 2392, 0x0011 }, { 2394, 0x2100 }, { 2396, 0x9c08 }, { 2401, 0xcbc0 },
+  { 2408, 0xe120 }, { 2413, 0x40c2 }, { 2417, 0x304c }, { 2422, 0x41b4 },
+  { 2428, 0x10ac }, { 2433, 0x9a83 }, { 2440, 0x98b2 }, { 2447, 0x3281 },
+  { 2452, 0x9822 }, { 2457, 0x0084 }, { 2459, 0x3369 }, { 2467, 0xbc12 },
+  /* 0x6600 */
+  { 2474, 0xd6c0 }, { 2481, 0xc03b }, { 2488, 0xa1a1 }, { 2494, 0x0c53 },
+  { 2500, 0x8a1e }, { 2507, 0xea00 }, { 2512, 0xcbf0 }, { 2521, 0x05d8 },
+  { 2527, 0x4390 }, { 2532, 0x21c3 }, { 2538, 0x4805 }, { 2542, 0x4a1c },
+  { 2548, 0x02d0 }, { 2552, 0x3240 }, { 2556, 0x0041 }, { 2558, 0xd79d },
+  /* 0x6700 */
+  { 2569, 0x2b09 }, { 2575, 0xe8b0 }, { 2582, 0x7dc0 }, { 2590, 0x2452 },
+  { 2595, 0xc240 }, { 2599, 0xd04b }, { 2606, 0xa000 }, { 2608, 0xc8ab },
+  { 2616, 0x8a80 }, { 2620, 0x34a9 }, { 2627, 0x8000 }, { 2628, 0x41c9 },
+  { 2634, 0x8010 }, { 2636, 0x241f }, { 2643, 0x9200 }, { 2646, 0x487b },
+  /* 0x6800 */
+  { 2654, 0x0000 }, { 2654, 0x00cc }, { 2658, 0x8406 }, { 2662, 0x3300 },
+  { 2666, 0x410f }, { 2672, 0x001b }, { 2676, 0x2000 }, { 2677, 0x8040 },
+  { 2679, 0x8022 }, { 2682, 0xa098 }, { 2687, 0xa186 }, { 2693, 0x006b },
+  { 2698, 0x2a30 }, { 2703, 0x85a4 }, { 2709, 0x4181 }, { 2713, 0x0604 },
+  /* 0x6900 */
+  { 2716, 0x6021 }, { 2720, 0x0004 }, { 2721, 0x0080 }, { 2722, 0xa001 },
+  { 2725, 0x0400 }, { 2726, 0x46b8 }, { 2733, 0xe90f }, { 2742, 0x03a0 },
+  { 2746, 0x0000 }, { 2746, 0x1820 }, { 2749, 0x40a0 }, { 2752, 0x0810 },
+  { 2754, 0x380a }, { 2759, 0x0001 }, { 2760, 0x0500 }, { 2762, 0xa800 },
+  /* 0x6a00 */
+  { 2765, 0x0404 }, { 2767, 0xc28a }, { 2773, 0x000a }, { 2775, 0x2720 },
+  { 2780, 0x0910 }, { 2783, 0x830c }, { 2788, 0x0802 }, { 2790, 0x0000 },
+  { 2790, 0x6211 }, { 2795, 0x1080 }, { 2797, 0x000c }, { 2799, 0x0808 },
+  { 2801, 0x000c }, { 2803, 0x0c08 }, { 2806, 0x0000 }, { 2806, 0x0840 },
+  /* 0x6b00 */
+  { 2808, 0x1410 }, { 2811, 0x0044 }, { 2813, 0x000b }, { 2816, 0x6404 },
+  { 2820, 0x50c0 }, { 2824, 0x8001 }, { 2826, 0x047e }, { 2833, 0x8984 },
+  { 2838, 0x0658 }, { 2843, 0x4140 }, { 2846, 0xc000 }, { 2848, 0x94a4 },
+  { 2854, 0xa862 }, { 2860, 0x09dc }, { 2867, 0x1800 }, { 2869, 0x0000 },
+  /* 0x6c00 */
+  { 2869, 0x8100 }, { 2871, 0x000a }, { 2873, 0x0008 }, { 2874, 0x4190 },
+  { 2878, 0x4007 }, { 2882, 0xe4a1 }, { 2889, 0x2501 }, { 2893, 0x6445 },
+  { 2899, 0x11ee }, { 2907, 0x0e7d }, { 2916, 0x4800 }, { 2918, 0xfb08 },
+  { 2926, 0x1616 }, { 2932, 0x08a8 }, { 2936, 0xc92e }, { 2944, 0x0009 },
+  /* 0x6d00 */
+  { 2946, 0x1800 }, { 2948, 0x4a82 }, { 2953, 0x06a0 }, { 2957, 0x6b64 },
+  { 2965, 0x0002 }, { 2966, 0x1600 }, { 2969, 0x5648 }, { 2975, 0x8390 },
+  { 2980, 0x73a0 }, { 2987, 0x002a }, { 2990, 0x8000 }, { 2991, 0x0024 },
+  { 2993, 0x88f9 }, { 3001, 0x4702 }, { 3006, 0x4d02 }, { 3011, 0x0faa },
+  /* 0x6e00 */
+  { 3019, 0x0000 }, { 3019, 0x8e80 }, { 3024, 0xb87b }, { 3034, 0x7554 },
+  { 3042, 0x2418 }, { 3046, 0xd940 }, { 3052, 0xc880 }, { 3056, 0x040c },
+  { 3059, 0x0000 }, { 3059, 0xb041 }, { 3064, 0x8c24 }, { 3069, 0x0442 },
+  { 3072, 0x5a34 }, { 3079, 0x001a }, { 3082, 0x8000 }, { 3083, 0xc110 },
+  /* 0x6f00 */
+  { 3087, 0x8046 }, { 3091, 0x0032 }, { 3094, 0x180d }, { 3099, 0x8106 },
+  { 3103, 0x0002 }, { 3104, 0xcd92 }, { 3112, 0x6014 }, { 3116, 0x7401 },
+  { 3121, 0x6112 }, { 3126, 0x0091 }, { 3129, 0xc098 }, { 3134, 0x420a },
+  { 3138, 0x040f }, { 3143, 0x8420 }, { 3146, 0x9a13 }, { 3153, 0x4002 },
+  /* 0x7000 */
+  { 3155, 0x8a62 }, { 3161, 0xfd22 }, { 3170, 0x8188 }, { 3174, 0x4080 },
+  { 3176, 0x1000 }, { 3177, 0x2103 }, { 3181, 0x0808 }, { 3183, 0x3101 },
+  { 3187, 0x4420 }, { 3190, 0x0704 }, { 3194, 0xb812 }, { 3200, 0x0388 },
+  { 3204, 0x8900 }, { 3207, 0xa300 }, { 3211, 0x0000 }, { 3211, 0x2202 },
+  /* 0x7100 */
+  { 3214, 0x1210 }, { 3217, 0x4600 }, { 3220, 0x0042 }, { 3222, 0x0041 },
+  { 3224, 0x5680 }, { 3229, 0x5241 }, { 3234, 0x52f0 }, { 3241, 0x2000 },
+  { 3242, 0x8610 }, { 3246, 0x8214 }, { 3250, 0x1004 }, { 3252, 0x4602 },
+  { 3256, 0x430a }, { 3261, 0x8035 }, { 3266, 0x60e0 }, { 3271, 0xd800 },
+  /* 0x7200 */
+  { 3275, 0x0041 }, { 3277, 0x0801 }, { 3279, 0x3400 }, { 3282, 0x6c65 },
+  { 3290, 0x11c1 }, { 3295, 0xab04 }, { 3301, 0x0286 }, { 3305, 0x2204 },
+  { 3308, 0x0003 }, { 3310, 0x0000 }, { 3310, 0x9084 }, { 3314, 0x0000 },
+  { 3314, 0x4015 }, { 3318, 0x0281 }, { 3321, 0x0202 }, { 3323, 0x3300 },
+  /* 0x7300 */
+  { 3327, 0x0400 }, { 3328, 0x3840 }, { 3332, 0x0e20 }, { 3336, 0xc0c0 },
+  { 3340, 0x0030 }, { 3342, 0x0085 }, { 3345, 0x0500 }, { 3347, 0x0d25 },
+  { 3353, 0x4ad0 }, { 3359, 0x81d0 }, { 3364, 0x2280 }, { 3367, 0x020c },
+  { 3370, 0xb605 }, { 3377, 0x6240 }, { 3381, 0x2679 }, { 3389, 0x6280 },
+  /* 0x7400 */
+  { 3393, 0x02ea }, { 3399, 0x0808 }, { 3401, 0xdd67 }, { 3412, 0x8579 },
+  { 3420, 0x081b }, { 3425, 0xdea0 }, { 3433, 0x8735 }, { 3441, 0x4000 },
+  { 3442, 0x0a8c }, { 3447, 0xd100 }, { 3451, 0x05aa }, { 3457, 0xa225 },
+  { 3463, 0x8440 }, { 3466, 0x1510 }, { 3470, 0x404d }, { 3475, 0x0080 },
+  /* 0x7500 */
+  { 3476, 0x0012 }, { 3478, 0x8d22 }, { 3484, 0x1968 }, { 3490, 0x058f },
+  { 3497, 0x9080 }, { 3500, 0x3a1a }, { 3507, 0x8464 }, { 3512, 0x8561 },
+  { 3518, 0xccc0 }, { 3524, 0x2002 }, { 3526, 0x0820 }, { 3528, 0x732e },
+  { 3537, 0x20a4 }, { 3541, 0x0b34 }, { 3547, 0x0004 }, { 3548, 0x1415 },
+  /* 0x7600 */
+  { 3553, 0x2001 }, { 3555, 0x8200 }, { 3557, 0x0057 }, { 3562, 0x0800 },
+  { 3563, 0x5004 }, { 3566, 0x0044 }, { 3568, 0x1212 }, { 3572, 0x7905 },
+  { 3579, 0x40d0 }, { 3583, 0x0009 }, { 3585, 0x4000 }, { 3586, 0x8400 },
+  { 3588, 0x054c }, { 3593, 0xd844 }, { 3599, 0x409a }, { 3604, 0x5114 },
+  /* 0x7700 */
+  { 3609, 0x0b12 }, { 3614, 0x4000 }, { 3615, 0x0201 }, { 3617, 0x1580 },
+  { 3621, 0x2001 }, { 3623, 0x0800 }, { 3624, 0x084a }, { 3628, 0xc200 },
+  { 3631, 0x0800 }, { 3632, 0x4002 }, { 3634, 0x3020 }, { 3637, 0x9809 },
+  { 3642, 0x0000 }, { 3642, 0x1880 }, { 3645, 0xe22c }, { 3652, 0x0008 },
+  /* 0x7800 */
+  { 3653, 0x0004 }, { 3654, 0x0004 }, { 3655, 0x10e0 }, { 3659, 0x0014 },
+  { 3661, 0x8020 }, { 3663, 0x2000 }, { 3664, 0x9800 }, { 3667, 0x1000 },
+  { 3668, 0x7082 }, { 3673, 0x0082 }, { 3675, 0x0288 }, { 3678, 0x1c00 },
+  { 3681, 0x4c22 }, { 3686, 0x0001 }, { 3687, 0x9100 }, { 3690, 0x0820 },
+  /* 0x7900 */
+  { 3692, 0x4002 }, { 3694, 0x0040 }, { 3695, 0x1c00 }, { 3698, 0x4400 },
+  { 3700, 0x0383 }, { 3705, 0x7cc1 }, { 3713, 0x2121 }, { 3717, 0x8400 },
+  { 3719, 0xe002 }, { 3723, 0x0002 }, { 3724, 0x44c0 }, { 3728, 0xe20a },
+  { 3734, 0x0e03 }, { 3739, 0x8126 }, { 3744, 0x02d0 }, { 3748, 0x0800 },
+  /* 0x7a00 */
+  { 3749, 0x2921 }, { 3754, 0x9690 }, { 3760, 0x4001 }, { 3762, 0xb8c2 },
+  { 3769, 0x6241 }, { 3774, 0x0080 }, { 3775, 0x0a06 }, { 3779, 0xa651 },
+  { 3786, 0x0112 }, { 3789, 0x812c }, { 3794, 0xc600 }, { 3798, 0x0400 },
+  { 3799, 0x0cb0 }, { 3804, 0xa280 }, { 3808, 0xa429 }, { 3814, 0x8640 },
+  /* 0x7b00 */
+  { 3818, 0x8000 }, { 3819, 0x4a02 }, { 3823, 0x3041 }, { 3827, 0x0200 },
+  { 3828, 0xba40 }, { 3834, 0x0057 }, { 3839, 0x5001 }, { 3842, 0x2020 },
+  { 3844, 0x8880 }, { 3847, 0x24b0 }, { 3852, 0x2002 }, { 3854, 0x0112 },
+  { 3857, 0x02d3 }, { 3863, 0x0004 }, { 3864, 0x0211 }, { 3867, 0x0000 },
+  /* 0x7c00 */
+  { 3867, 0x0080 }, { 3868, 0x4004 }, { 3870, 0x0c82 }, { 3874, 0xe000 },
+  { 3877, 0x3008 }, { 3880, 0x0000 }, { 3880, 0x1011 }, { 3883, 0x0008 },
+  { 3884, 0x0208 }, { 3886, 0x81a4 }, { 3891, 0x40a0 }, { 3894, 0x420e },
+  { 3899, 0x0400 }, { 3900, 0xc040 }, { 3903, 0x0081 }, { 3905, 0x4800 },
+  /* 0x7d00 */
+  { 3907, 0x2df5 }, { 3917, 0x0f91 }, { 3924, 0xd807 }, { 3931, 0x0629 },
+  { 3936, 0x007c }, { 3941, 0x4001 }, { 3943, 0x4546 }, { 3949, 0x824e },
+  { 3955, 0xc000 }, { 3957, 0x1008 }, { 3959, 0x3005 }, { 3963, 0xed36 },
+  { 3973, 0x0c80 }, { 3976, 0x6540 }, { 3981, 0x930b }, { 3988, 0x0810 },
+  /* 0x7e00 */
+  { 3990, 0x0600 }, { 3992, 0xe820 }, { 3997, 0xc80a }, { 4002, 0x6082 },
+  { 4006, 0x00ca }, { 4010, 0x4034 }, { 4014, 0x2e02 }, { 4019, 0x1201 },
+  { 4022, 0x9004 }, { 4025, 0x1948 }, { 4030, 0x0000 }, { 4030, 0x0000 },
+  { 4030, 0x0000 }, { 4030, 0x0000 }, { 4030, 0x0000 }, { 4030, 0x0000 },
+  /* 0x7f00 */
+  { 4030, 0x0000 }, { 4030, 0x0000 }, { 4030, 0x0000 }, { 4030, 0x0540 },
+  { 4033, 0x1000 }, { 4034, 0x0031 }, { 4037, 0x4c00 }, { 4040, 0x02a5 },
+  { 4045, 0x5520 }, { 4050, 0x4410 }, { 4053, 0x0310 }, { 4056, 0x2304 },
+  { 4060, 0x5422 }, { 4065, 0x8034 }, { 4069, 0x0a03 }, { 4073, 0x1201 },
+  /* 0x8000 */
+  { 4076, 0x126b }, { 4083, 0x01a1 }, { 4087, 0x2000 }, { 4088, 0xa048 },
+  { 4092, 0x0448 }, { 4095, 0x4540 }, { 4099, 0x8000 }, { 4100, 0xe08d },
+  { 4107, 0x1af0 }, { 4114, 0x2840 }, { 4117, 0x8626 }, { 4123, 0x0416 },
+  { 4127, 0x5018 }, { 4131, 0x4c00 }, { 4134, 0x0032 }, { 4137, 0x2112 },
+  /* 0x8100 */
+  { 4141, 0x05e4 }, { 4147, 0x0d00 }, { 4150, 0x8a08 }, { 4154, 0x4200 },
+  { 4156, 0x4800 }, { 4158, 0x0033 }, { 4162, 0x0860 }, { 4165, 0x8703 },
+  { 4171, 0x8501 }, { 4175, 0x3400 }, { 4178, 0x0109 }, { 4181, 0xe428 },
+  { 4187, 0x2045 }, { 4191, 0x8100 }, { 4193, 0x25a8 }, { 4199, 0x5c18 },
+  /* 0x8200 */
+  { 4205, 0x35a0 }, { 4211, 0xd804 }, { 4216, 0x1c02 }, { 4220, 0x02e0 },
+  { 4224, 0x00a1 }, { 4227, 0x0200 }, { 4228, 0xc050 }, { 4232, 0x4146 },
+  { 4237, 0x6800 }, { 4240, 0xa604 }, { 4245, 0xf260 }, { 4252, 0xbb8a },
+  { 4261, 0x0000 }, { 4261, 0xc8b6 }, { 4269, 0x00e2 }, { 4273, 0x6002 },
+  /* 0x8300 */
+  { 4276, 0x023e }, { 4282, 0x0080 }, { 4283, 0x8900 }, { 4286, 0x0372 },
+  { 4292, 0x8681 }, { 4297, 0x0006 }, { 4299, 0x0000 }, { 4299, 0x0888 },
+  { 4302, 0x4600 }, { 4305, 0x4140 }, { 4308, 0x0e04 }, { 4312, 0x2000 },
+  { 4313, 0x1622 }, { 4318, 0x1048 }, { 4321, 0x8a00 }, { 4324, 0x2217 },
+  /* 0x8400 */
+  { 4330, 0x7418 }, { 4336, 0x0000 }, { 4336, 0x1200 }, { 4338, 0x2102 },
+  { 4341, 0x0200 }, { 4342, 0x0880 }, { 4344, 0x984a }, { 4350, 0x0420 },
+  { 4352, 0x0000 }, { 4352, 0x1211 }, { 4356, 0x0002 }, { 4357, 0x9904 },
+  { 4362, 0x2a55 }, { 4369, 0x0402 }, { 4371, 0x5000 }, { 4373, 0x1010 },
+  /* 0x8500 */
+  { 4375, 0x0000 }, { 4375, 0x459a }, { 4382, 0xb02a }, { 4388, 0xa000 },
+  { 4390, 0x420a }, { 4394, 0x0208 }, { 4396, 0x2708 }, { 4401, 0x0000 },
+  { 4401, 0x8090 }, { 4404, 0x0812 }, { 4407, 0x8740 }, { 4412, 0x0401 },
+  { 4414, 0xe202 }, { 4419, 0x3020 }, { 4422, 0x0630 }, { 4426, 0x8c80 },
+  /* 0x8600 */
+  { 4430, 0x04c4 }, { 4434, 0x04c0 }, { 4437, 0x2000 }, { 4438, 0x8000 },
+  { 4439, 0x4000 }, { 4440, 0xd831 }, { 4447, 0x0080 }, { 4448, 0x0200 },
+  { 4449, 0x1400 }, { 4451, 0x0008 }, { 4452, 0x0218 }, { 4455, 0x0000 },
+  { 4455, 0x0880 }, { 4457, 0x8a10 }, { 4461, 0x2010 }, { 4463, 0x4000 },
+  /* 0x8700 */
+  { 4464, 0x010d }, { 4468, 0x1500 }, { 4471, 0x0000 }, { 4471, 0x0000 },
+  { 4471, 0x4000 }, { 4472, 0x80a0 }, { 4475, 0x0140 }, { 4477, 0x0150 },
+  { 4480, 0x2004 }, { 4482, 0x8000 }, { 4483, 0x0004 }, { 4484, 0x0408 },
+  { 4486, 0x0010 }, { 4487, 0x0000 }, { 4487, 0x9001 }, { 4490, 0x4a04 },
+  /* 0x8800 */
+  { 4494, 0x0020 }, { 4495, 0x8000 }, { 4496, 0x000c }, { 4498, 0x0842 },
+  { 4501, 0x3041 }, { 4505, 0x2a8c }, { 4511, 0x090e }, { 4516, 0xc085 },
+  { 4521, 0x2906 }, { 4526, 0x40c4 }, { 4530, 0x0800 }, { 4531, 0x0010 },
+  { 4532, 0x8006 }, { 4535, 0xb230 }, { 4541, 0x0102 }, { 4543, 0x2138 },
+  /* 0x8900 */
+  { 4548, 0x0080 }, { 4549, 0x030d }, { 4554, 0x0420 }, { 4556, 0x0940 },
+  { 4559, 0x0012 }, { 4561, 0x8000 }, { 4562, 0x0410 }, { 4564, 0x8004 },
+  { 4566, 0x88ca }, { 4572, 0x0048 }, { 4574, 0x0602 }, { 4577, 0x2404 },
+  { 4580, 0x0001 }, { 4581, 0x0004 }, { 4582, 0x0008 }, { 4583, 0x0110 },
+  /* 0x8a00 */
+  { 4585, 0x550d }, { 4592, 0xa9c8 }, { 4599, 0x2428 }, { 4603, 0x0c52 },
+  { 4608, 0x0000 }, { 4608, 0x4831 }, { 4613, 0x624d }, { 4620, 0x022f },
+  { 4626, 0x30a0 }, { 4630, 0x4128 }, { 4634, 0x057b }, { 4642, 0xd205 },
+  { 4648, 0xa894 }, { 4654, 0x1844 }, { 4658, 0x6cc2 }, { 4665, 0x45c2 },
+  /* 0x8b00 */
+  { 4671, 0x4017 }, { 4676, 0x2ed1 }, { 4684, 0x1901 }, { 4688, 0x0208 },
+  { 4690, 0xc202 }, { 4694, 0x1500 }, { 4697, 0x9040 }, { 4700, 0x2091 },
+  { 4704, 0x0401 }, { 4706, 0x044d }, { 4711, 0x0000 }, { 4711, 0x0000 },
+  { 4711, 0x0000 }, { 4711, 0x0000 }, { 4711, 0x0000 }, { 4711, 0x0000 },
+  /* 0x8c00 */
+  { 4711, 0x0000 }, { 4711, 0x0000 }, { 4711, 0x0000 }, { 4711, 0x8080 },
+  { 4713, 0x1542 }, { 4718, 0x0420 }, { 4720, 0x0c02 }, { 4723, 0x0600 },
+  { 4725, 0x1404 }, { 4728, 0x6000 }, { 4730, 0x9f87 }, { 4740, 0xb9d9 },
+  { 4750, 0x059f }, { 4758, 0x540a }, { 4763, 0x245d }, { 4770, 0x3810 },
+  /* 0x8d00 */
+  { 4774, 0x25b0 }, { 4780, 0x0048 }, { 4782, 0x0000 }, { 4782, 0x0000 },
+  { 4782, 0x0000 }, { 4782, 0x0000 }, { 4782, 0x0850 }, { 4785, 0x0099 },
+  { 4789, 0x0420 }, { 4791, 0x0200 }, { 4792, 0x0108 }, { 4794, 0x4408 },
+  { 4797, 0x9840 }, { 4801, 0x2800 }, { 4803, 0x810a }, { 4807, 0x0008 },
+  /* 0x8e00 */
+  { 4808, 0x8400 }, { 4810, 0x4001 }, { 4812, 0x0400 }, { 4813, 0x0021 },
+  { 4815, 0x0794 }, { 4821, 0x8200 }, { 4823, 0x0001 }, { 4824, 0x0050 },
+  { 4826, 0x2482 }, { 4830, 0x0000 }, { 4830, 0x1c00 }, { 4833, 0x0000 },
+  { 4833, 0x3c01 }, { 4838, 0x8004 }, { 4840, 0x0800 }, { 4841, 0x4900 },
+  /* 0x8f00 */
+  { 4844, 0x0228 }, { 4847, 0xf83c }, { 4856, 0x86c0 }, { 4861, 0xcb08 },
+  { 4867, 0x6230 }, { 4872, 0xa000 }, { 4874, 0x0004 }, { 4875, 0x0000 },
+  { 4875, 0x0000 }, { 4875, 0x1800 }, { 4877, 0xa148 }, { 4882, 0x0007 },
+  { 4885, 0x4024 }, { 4888, 0x0012 }, { 4890, 0x2c40 }, { 4894, 0x2285 },
+  /* 0x9000 */
+  { 4899, 0xa96f }, { 4909, 0xe6b3 }, { 4919, 0x400f }, { 4924, 0x5126 },
+  { 4930, 0x6c86 }, { 4937, 0x723b }, { 4946, 0xe20b }, { 4953, 0xb5a4 },
+  { 4961, 0x859f }, { 4970, 0x0222 }, { 4973, 0x854c }, { 4979, 0x0123 },
+  { 4983, 0x0402 }, { 4985, 0x4000 }, { 4986, 0x2102 }, { 4989, 0x2020 },
+  /* 0x9100 */
+  { 4991, 0x0004 }, { 4992, 0x0224 }, { 4995, 0x2080 }, { 4997, 0x0004 },
+  { 4998, 0x7e00 }, { 5004, 0x0004 }, { 5005, 0x1604 }, { 5009, 0x01a0 },
+  { 5012, 0x2a80 }, { 5016, 0x1004 }, { 5018, 0xd800 }, { 5022, 0x0032 },
+  { 5025, 0xfa81 }, { 5033, 0x3183 }, { 5039, 0x0488 }, { 5042, 0x0020 },
+  /* 0x9200 */
+  { 5043, 0x2000 }, { 5044, 0x4087 }, { 5049, 0x0000 }, { 5049, 0x8410 },
+  { 5052, 0x0221 }, { 5055, 0x4880 }, { 5058, 0x0074 }, { 5062, 0x0000 },
+  { 5062, 0x0029 }, { 5065, 0x114a }, { 5070, 0x0000 }, { 5070, 0x02c8 },
+  { 5074, 0x9000 }, { 5076, 0x0004 }, { 5077, 0x0410 }, { 5079, 0x1100 },
+  /* 0x9300 */
+  { 5081, 0x0010 }, { 5082, 0xc501 }, { 5087, 0xc957 }, { 5096, 0x0000 },
+  { 5096, 0x2d00 }, { 5100, 0x0810 }, { 5102, 0x4000 }, { 5103, 0x5020 },
+  { 5106, 0x1000 }, { 5107, 0x0450 }, { 5110, 0x3088 }, { 5114, 0x0001 },
+  { 5115, 0x0008 }, { 5116, 0x4002 }, { 5118, 0x0012 }, { 5120, 0x0040 },
+  /* 0x9400 */
+  { 5121, 0x0010 }, { 5122, 0x0100 }, { 5123, 0x0820 }, { 5125, 0x0120 },
+  { 5127, 0x0010 }, { 5128, 0x0806 }, { 5131, 0x0000 }, { 5131, 0xa000 },
+  { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 },
+  { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 },
+  /* 0x9500 */
+  { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 },
+  { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0000 }, { 5133, 0x0080 },
+  { 5134, 0x8a09 }, { 5139, 0x011e }, { 5144, 0x2138 }, { 5149, 0x1802 },
+  { 5152, 0x0480 }, { 5154, 0x1070 }, { 5158, 0x0006 }, { 5160, 0x0000 },
+  /* 0x9600 */
+  { 5160, 0x0000 }, { 5160, 0x1000 }, { 5161, 0x4402 }, { 5164, 0x8804 },
+  { 5167, 0x3815 }, { 5173, 0xf801 }, { 5179, 0x041c }, { 5183, 0x21e9 },
+  { 5190, 0x6c60 }, { 5196, 0x1b30 }, { 5202, 0x0588 }, { 5206, 0x0882 },
+  { 5209, 0x7af3 }, { 5220, 0x1a60 }, { 5225, 0x870c }, { 5231, 0x0ac5 },
+  /* 0x9700 */
+  { 5237, 0x00c1 }, { 5240, 0x524a }, { 5246, 0x0080 }, { 5247, 0x2205 },
+  { 5251, 0x0114 }, { 5254, 0x5042 }, { 5258, 0x2206 }, { 5262, 0x0490 },
+  { 5265, 0xa800 }, { 5268, 0x0000 }, { 5268, 0x2901 }, { 5272, 0x0000 },
+  { 5272, 0x0840 }, { 5274, 0x1008 }, { 5276, 0x0000 }, { 5276, 0x8848 },
+  /* 0x9800 */
+  { 5280, 0x156f }, { 5289, 0x018f }, { 5295, 0x2000 }, { 5296, 0x0b01 },
+  { 5300, 0x7040 }, { 5304, 0x4510 }, { 5308, 0x88a0 }, { 5312, 0x0000 },
+  { 5312, 0x0000 }, { 5312, 0x0000 }, { 5312, 0x8100 }, { 5314, 0x0002 },
+  { 5315, 0x0090 }, { 5317, 0x9800 }, { 5320, 0xe006 }, { 5325, 0x7010 },
+  /* 0x9900 */
+  { 5329, 0x1608 }, { 5333, 0x4109 }, { 5337, 0x0101 }, { 5339, 0x0000 },
+  { 5339, 0x3a20 }, { 5344, 0x0096 }, { 5348, 0x0000 }, { 5348, 0x0000 },
+  { 5348, 0x0000 }, { 5348, 0x2240 }, { 5351, 0x7120 }, { 5356, 0x021a },
+  { 5360, 0x0002 }, { 5361, 0xa227 }, { 5368, 0x2000 }, { 5369, 0x8002 },
+  /* 0x9a00 */
+  { 5371, 0xc102 }, { 5375, 0x0200 }, { 5376, 0x0800 }, { 5377, 0x00c1 },
+  { 5380, 0x2029 }, { 5384, 0x8ca0 }, { 5389, 0x0624 }, { 5393, 0x0000 },
+  { 5393, 0x0000 }, { 5393, 0x0000 }, { 5393, 0x0100 }, { 5394, 0x0100 },
+  { 5395, 0x0000 }, { 5395, 0x0118 }, { 5398, 0x4020 }, { 5400, 0x0000 },
+  /* 0x9b00 */
+  { 5400, 0x0000 }, { 5400, 0x0400 }, { 5401, 0x0480 }, { 5403, 0x1002 },
+  { 5405, 0x803e }, { 5411, 0x0410 }, { 5413, 0x8000 }, { 5414, 0x0000 },
+  { 5414, 0x4000 }, { 5415, 0x8002 }, { 5417, 0x4800 }, { 5419, 0x0000 },
+  { 5419, 0x0200 }, { 5420, 0x0040 }, { 5421, 0x0110 }, { 5423, 0x0000 },
+  /* 0x9c00 */
+  { 5423, 0x2000 }, { 5424, 0x0025 }, { 5427, 0x0020 }, { 5428, 0x0804 },
+  { 5430, 0x0280 }, { 5432, 0x0080 }, { 5433, 0x0000 }, { 5433, 0x0000 },
+  { 5433, 0x0000 }, { 5433, 0x0000 }, { 5433, 0x0000 }, { 5433, 0x0000 },
+  { 5433, 0x0000 }, { 5433, 0x0000 }, { 5433, 0x02a0 }, { 5436, 0x0058 },
+  /* 0x9d00 */
+  { 5439, 0x0200 }, { 5440, 0x0800 }, { 5441, 0x0140 }, { 5443, 0x0800 },
+  { 5444, 0x0000 }, { 5444, 0x2002 }, { 5446, 0x1003 }, { 5449, 0x0004 },
+  { 5450, 0x0000 }, { 5450, 0x0000 }, { 5450, 0x8200 }, { 5452, 0x0010 },
+  { 5453, 0x0010 }, { 5454, 0x0080 }, { 5455, 0x0000 }, { 5455, 0x0704 },
+  /* 0x9e00 */
+  { 5459, 0x0000 }, { 5459, 0x4400 }, { 5461, 0x0000 }, { 5461, 0x0000 },
+  { 5461, 0x0000 }, { 5461, 0x0000 }, { 5461, 0x0000 }, { 5461, 0xa220 },
+  { 5465, 0x0000 }, { 5465, 0xa08c }, { 5470, 0x0020 }, { 5471, 0x4830 },
+  { 5475, 0x6008 }, { 5478, 0x5912 }, { 5484, 0x0100 }, { 5485, 0x0010 },
+  /* 0x9f00 */
+  { 5486, 0x4180 }, { 5489, 0x0008 }, { 5490, 0x0001 }, { 5491, 0x0800 },
+  { 5492, 0x4c00 }, { 5495, 0x8004 }, { 5497, 0x1482 }, { 5501, 0x0080 },
+  { 5502, 0x2000 }, { 5503, 0x1021 },
+};
+static const Summary16 ksc5601_uni2indx_pageac[698] = {
+  /* 0xac00 */
+  { 5506, 0x0793 }, { 5513, 0x3eff }, { 5526, 0xb011 }, { 5531, 0x1303 },
+  { 5536, 0x2801 }, { 5539, 0x1110 }, { 5542, 0x0000 }, { 5542, 0x0593 },
+  { 5548, 0x1e7b }, { 5558, 0xb011 }, { 5563, 0x9703 }, { 5570, 0x3b01 },
+  { 5576, 0x1112 }, { 5580, 0x00a0 }, { 5582, 0x9593 }, { 5590, 0x306b },
+  /* 0xad00 */
+  { 5597, 0xb051 }, { 5603, 0x1102 }, { 5606, 0x3201 }, { 5610, 0x1130 },
+  { 5614, 0x02b0 }, { 5618, 0x0111 }, { 5621, 0x300a }, { 5625, 0xb879 },
+  { 5634, 0x1306 }, { 5639, 0x3001 }, { 5642, 0x0010 }, { 5643, 0x0080 },
+  { 5644, 0x0113 }, { 5648, 0x100b }, { 5652, 0x0011 }, { 5654, 0x9300 },
+  /* 0xae00 */
+  { 5658, 0x2b03 }, { 5664, 0x0010 }, { 5665, 0x0000 }, { 5665, 0x0593 },
+  { 5671, 0x746b }, { 5680, 0xb051 }, { 5686, 0x1323 }, { 5692, 0x3b01 },
+  { 5698, 0x1030 }, { 5701, 0x0000 }, { 5701, 0x0000 }, { 5701, 0x7000 },
+  { 5704, 0xb011 }, { 5709, 0x1303 }, { 5714, 0x2900 }, { 5717, 0x1110 },
+  /* 0xaf00 */
+  { 5720, 0x2180 }, { 5723, 0x0001 }, { 5724, 0x3000 }, { 5726, 0xb015 },
+  { 5732, 0x030e }, { 5737, 0x3001 }, { 5740, 0x0030 }, { 5742, 0x0200 },
+  { 5743, 0x0111 }, { 5746, 0x1023 }, { 5750, 0x0000 }, { 5750, 0x1300 },
+  { 5753, 0x6b81 }, { 5760, 0x1010 }, { 5762, 0x0300 }, { 5764, 0x0113 },
+  /* 0xb000 */
+  { 5768, 0x1013 }, { 5772, 0x3011 }, { 5776, 0x0100 }, { 5777, 0x0000 },
+  { 5777, 0x5530 }, { 5783, 0x22b8 }, { 5789, 0x0000 }, { 5789, 0x3000 },
+  { 5791, 0xb011 }, { 5796, 0x9702 }, { 5802, 0xfb07 }, { 5812, 0x113a },
+  { 5818, 0x03b0 }, { 5823, 0x0113 }, { 5827, 0x0021 }, { 5829, 0x0000 },
+  /* 0xb100 */
+  { 5829, 0x1b00 }, { 5833, 0x3b0d }, { 5841, 0x1138 }, { 5846, 0x03b0 },
+  { 5851, 0x0113 }, { 5855, 0x1133 }, { 5861, 0x0001 }, { 5862, 0x1300 },
+  { 5865, 0x2b05 }, { 5871, 0x111c }, { 5876, 0x0100 }, { 5877, 0x0000 },
+  { 5877, 0x1000 }, { 5878, 0xb011 }, { 5883, 0x1300 }, { 5886, 0x2a01 },
+  /* 0xb200 */
+  { 5890, 0x1930 }, { 5895, 0x02b0 }, { 5899, 0x0001 }, { 5900, 0x1010 },
+  { 5902, 0x0000 }, { 5902, 0x1100 }, { 5904, 0x0301 }, { 5907, 0x1030 },
+  { 5910, 0x0230 }, { 5913, 0x0713 }, { 5919, 0x146b }, { 5926, 0x0011 },
+  { 5928, 0x1300 }, { 5931, 0x2b05 }, { 5937, 0xf974 }, { 5947, 0x8fb8 },
+  /* 0xb300 */
+  { 5956, 0x0113 }, { 5960, 0x103b }, { 5966, 0x0000 }, { 5966, 0x0000 },
+  { 5966, 0x0000 }, { 5966, 0xd970 }, { 5974, 0x4ab0 }, { 5980, 0x0113 },
+  { 5984, 0x103b }, { 5990, 0x0011 }, { 5992, 0x1103 }, { 5996, 0x0000 },
+  { 5996, 0x5930 }, { 6002, 0x2ab1 }, { 6009, 0x0111 }, { 6012, 0x1000 },
+  /* 0xb400 */
+  { 6013, 0x0000 }, { 6013, 0x1101 }, { 6016, 0x0b01 }, { 6020, 0x0010 },
+  { 6021, 0x0000 }, { 6021, 0x0113 }, { 6025, 0x102b }, { 6030, 0x0000 },
+  { 6030, 0x0101 }, { 6032, 0x2000 }, { 6033, 0x1110 }, { 6036, 0x02a0 },
+  { 6039, 0x0111 }, { 6042, 0x3021 }, { 6046, 0xb059 }, { 6053, 0x0102 },
+  /* 0xb500 */
+  { 6055, 0x0000 }, { 6055, 0x1930 }, { 6060, 0x07b0 }, { 6066, 0x0113 },
+  { 6070, 0x383b }, { 6078, 0xb011 }, { 6083, 0x0003 }, { 6085, 0x0000 },
+  { 6085, 0x0000 }, { 6085, 0x0000 }, { 6085, 0x0d13 }, { 6091, 0x383b },
+  { 6099, 0xb011 }, { 6104, 0x0103 }, { 6107, 0x1000 }, { 6108, 0x0000 },
+  /* 0xb600 */
+  { 6108, 0x0000 }, { 6108, 0x0113 }, { 6112, 0x1020 }, { 6114, 0x0010 },
+  { 6115, 0x0100 }, { 6116, 0x0000 }, { 6116, 0x0110 }, { 6118, 0x0000 },
+  { 6118, 0x0000 }, { 6118, 0x3000 }, { 6120, 0x1811 }, { 6124, 0x0002 },
+  { 6125, 0x0000 }, { 6125, 0x0010 }, { 6126, 0x0000 }, { 6126, 0x0111 },
+  /* 0xb700 */
+  { 6129, 0x0023 }, { 6132, 0x0000 }, { 6132, 0x9300 }, { 6136, 0x0b01 },
+  { 6140, 0x1110 }, { 6143, 0x0030 }, { 6145, 0x0111 }, { 6148, 0x302b },
+  { 6154, 0xb011 }, { 6159, 0x13c7 }, { 6167, 0x3b01 }, { 6173, 0x0130 },
+  { 6176, 0x0280 }, { 6178, 0x0000 }, { 6178, 0x3000 }, { 6180, 0xb011 },
+  /* 0xb800 */
+  { 6185, 0x1383 }, { 6191, 0x2b01 }, { 6196, 0x1130 }, { 6200, 0x03b0 },
+  { 6205, 0x0011 }, { 6207, 0x300a }, { 6211, 0xb011 }, { 6216, 0x1102 },
+  { 6219, 0x2000 }, { 6220, 0x0000 }, { 6220, 0x0100 }, { 6221, 0x0111 },
+  { 6224, 0x102b }, { 6229, 0xa011 }, { 6233, 0x1302 }, { 6237, 0x2b01 },
+  /* 0xb900 */
+  { 6242, 0x0010 }, { 6243, 0x0100 }, { 6244, 0x0001 }, { 6245, 0x3000 },
+  { 6247, 0x9011 }, { 6251, 0x1302 }, { 6255, 0x2b01 }, { 6260, 0x1130 },
+  { 6264, 0x66b0 }, { 6271, 0x0000 }, { 6271, 0x3000 }, { 6273, 0xb011 },
+  { 6278, 0xd302 }, { 6284, 0x6b07 }, { 6292, 0x113a }, { 6298, 0x07b0 },
+  /* 0xba00 */
+  { 6304, 0x0103 }, { 6307, 0x0020 }, { 6308, 0x0000 }, { 6308, 0x1300 },
+  { 6311, 0x6b05 }, { 6318, 0x1138 }, { 6323, 0x03b0 }, { 6328, 0x0113 },
+  { 6332, 0x10b8 }, { 6337, 0x0000 }, { 6337, 0x1b00 }, { 6341, 0x2b05 },
+  { 6347, 0x0110 }, { 6349, 0x0300 }, { 6351, 0x0000 }, { 6351, 0x1000 },
+  /* 0xbb00 */
+  { 6352, 0xa011 }, { 6356, 0x1102 }, { 6359, 0x0a01 }, { 6362, 0x7970 },
+  { 6370, 0xa2b0 }, { 6376, 0x0111 }, { 6379, 0x100a }, { 6382, 0x0000 },
+  { 6382, 0x1100 }, { 6384, 0x0001 }, { 6385, 0x1110 }, { 6388, 0x0090 },
+  { 6390, 0x0111 }, { 6393, 0x0009 }, { 6395, 0x0000 }, { 6395, 0x9300 },
+  /* 0xbc00 */
+  { 6399, 0xbb05 }, { 6407, 0xf9f2 }, { 6418, 0x22b0 }, { 6423, 0x0113 },
+  { 6427, 0x323b }, { 6435, 0x2001 }, { 6437, 0x0000 }, { 6437, 0x0000 },
+  { 6437, 0x5930 }, { 6443, 0x06b0 }, { 6448, 0x0193 }, { 6453, 0x303b },
+  { 6460, 0xa011 }, { 6464, 0x1123 }, { 6469, 0x0000 }, { 6469, 0x1170 },
+  /* 0xbd00 */
+  { 6474, 0x02b0 }, { 6478, 0x0011 }, { 6480, 0x1010 }, { 6482, 0x0000 },
+  { 6482, 0x1301 }, { 6486, 0x0301 }, { 6489, 0x0110 }, { 6491, 0x0000 },
+  { 6491, 0x0793 }, { 6498, 0x162b }, { 6505, 0x0010 }, { 6506, 0x0101 },
+  { 6508, 0x0000 }, { 6508, 0x1130 }, { 6512, 0x0200 }, { 6513, 0x0111 },
+  /* 0xbe00 */
+  { 6516, 0x3029 }, { 6521, 0xb011 }, { 6526, 0x0000 }, { 6526, 0x0000 },
+  { 6526, 0x5130 }, { 6531, 0x0eb0 }, { 6537, 0x0513 }, { 6542, 0x383b },
+  { 6550, 0xb011 }, { 6555, 0x0303 }, { 6559, 0x0100 }, { 6560, 0x0000 },
+  { 6560, 0x0000 }, { 6560, 0x0193 }, { 6565, 0x1039 }, { 6570, 0x0000 },
+  /* 0xbf00 */
+  { 6570, 0x0302 }, { 6573, 0x3b00 }, { 6578, 0x0000 }, { 6578, 0x0000 },
+  { 6578, 0x0113 }, { 6582, 0x0023 }, { 6585, 0x0000 }, { 6585, 0x0000 },
+  { 6585, 0x0000 }, { 6585, 0x0010 }, { 6586, 0x0000 }, { 6586, 0x0001 },
+  { 6587, 0x3020 }, { 6590, 0x9011 }, { 6594, 0x0002 }, { 6595, 0x0000 },
+  /* 0xc000 */
+  { 6595, 0x0000 }, { 6595, 0x0000 }, { 6595, 0x0000 }, { 6595, 0x1000 },
+  { 6596, 0x0000 }, { 6596, 0x1102 }, { 6599, 0x0301 }, { 6602, 0x0000 },
+  { 6602, 0x0000 }, { 6602, 0x0113 }, { 6606, 0xb02b }, { 6613, 0xb079 },
+  { 6621, 0x1323 }, { 6627, 0x3b01 }, { 6633, 0x1130 }, { 6637, 0x02b0 },
+  /* 0xc100 */
+  { 6641, 0x0111 }, { 6644, 0xf021 }, { 6650, 0xb0d9 }, { 6658, 0x1343 },
+  { 6664, 0x3b01 }, { 6670, 0x1130 }, { 6674, 0x03b0 }, { 6679, 0x0111 },
+  { 6682, 0x7020 }, { 6686, 0xb051 }, { 6692, 0x1322 }, { 6697, 0x2001 },
+  { 6699, 0x1110 }, { 6702, 0x0190 }, { 6705, 0x0111 }, { 6708, 0x300b },
+  /* 0xc200 */
+  { 6713, 0xb011 }, { 6718, 0x9302 }, { 6723, 0xab01 }, { 6729, 0x0016 },
+  { 6732, 0x0100 }, { 6733, 0x0113 }, { 6737, 0x3021 }, { 6741, 0xb011 },
+  { 6746, 0x0302 }, { 6749, 0x2901 }, { 6753, 0x3130 }, { 6758, 0x02b0 },
+  { 6762, 0x0000 }, { 6762, 0x3000 }, { 6764, 0xb819 }, { 6771, 0x1b42 },
+  /* 0xc300 */
+  { 6777, 0x3301 }, { 6782, 0x1138 }, { 6787, 0x0330 }, { 6791, 0x0000 },
+  { 6791, 0x0020 }, { 6792, 0x0000 }, { 6792, 0x1300 }, { 6795, 0x3305 },
+  { 6801, 0x1110 }, { 6804, 0x0000 }, { 6804, 0x0000 }, { 6804, 0x0000 },
+  { 6804, 0x0001 }, { 6805, 0x9300 }, { 6809, 0x2305 }, { 6814, 0x0130 },
+  /* 0xc400 */
+  { 6817, 0x0100 }, { 6818, 0x0001 }, { 6819, 0x1010 }, { 6821, 0x3011 },
+  { 6825, 0x0100 }, { 6826, 0x0000 }, { 6826, 0x1130 }, { 6830, 0x0230 },
+  { 6833, 0x0001 }, { 6834, 0x1010 }, { 6836, 0x0000 }, { 6836, 0x1100 },
+  { 6838, 0x0000 }, { 6838, 0x0000 }, { 6838, 0x0200 }, { 6839, 0x8513 },
+  /* 0xc500 */
+  { 6845, 0x1003 }, { 6848, 0x1011 }, { 6851, 0x1300 }, { 6854, 0x2b01 },
+  { 6859, 0x7730 }, { 6867, 0x63b8 }, { 6875, 0x0113 }, { 6879, 0x303b },
+  { 6886, 0xb091 }, { 6892, 0x11a2 }, { 6897, 0x0201 }, { 6899, 0x7b30 },
+  { 6907, 0x57f0 }, { 6916, 0x0113 }, { 6920, 0x702b }, { 6927, 0xf0d1 },
+  /* 0xc600 */
+  { 6935, 0x11e3 }, { 6942, 0x1b01 }, { 6947, 0x7130 }, { 6953, 0x0ab9 },
+  { 6960, 0x0113 }, { 6964, 0x303b }, { 6971, 0x9001 }, { 6974, 0x1302 },
+  { 6978, 0x2b01 }, { 6983, 0x1130 }, { 6987, 0x02b0 }, { 6991, 0x0713 },
+  { 6997, 0x302b }, { 7003, 0x3011 }, { 7007, 0x1303 }, { 7012, 0x2301 },
+  /* 0xc700 */
+  { 7016, 0x1130 }, { 7020, 0x02b0 }, { 7024, 0x0113 }, { 7028, 0x30ab },
+  { 7035, 0xb411 }, { 7041, 0x11fe }, { 7050, 0x0901 }, { 7053, 0x7130 },
+  { 7059, 0x47b8 }, { 7067, 0x05d3 }, { 7074, 0x307b }, { 7082, 0xb011 },
+  { 7087, 0x5303 }, { 7093, 0x2101 }, { 7096, 0x1110 }, { 7099, 0x0000 },
+  /* 0xc800 */
+  { 7099, 0x0513 }, { 7104, 0x306b }, { 7111, 0xb011 }, { 7116, 0x1102 },
+  { 7119, 0x3301 }, { 7124, 0x0010 }, { 7125, 0x0000 }, { 7125, 0x0513 },
+  { 7130, 0x38eb }, { 7139, 0xa010 }, { 7142, 0x0102 }, { 7144, 0x3000 },
+  { 7146, 0x1110 }, { 7149, 0x02b0 }, { 7153, 0x0013 }, { 7156, 0x3020 },
+  /* 0xc900 */
+  { 7159, 0xb071 }, { 7166, 0x0102 }, { 7168, 0x1000 }, { 7169, 0x0010 },
+  { 7170, 0x0000 }, { 7170, 0x0113 }, { 7174, 0x100b }, { 7178, 0x1011 },
+  { 7181, 0x1300 }, { 7184, 0x2b01 }, { 7189, 0x0000 }, { 7189, 0x0000 },
+  { 7189, 0x0593 }, { 7195, 0x366b }, { 7204, 0xb095 }, { 7211, 0x1303 },
+  /* 0xca00 */
+  { 7216, 0x3b01 }, { 7222, 0x0110 }, { 7224, 0x0200 }, { 7225, 0x0000 },
+  { 7225, 0x3000 }, { 7227, 0xb011 }, { 7232, 0x0103 }, { 7235, 0x2000 },
+  { 7236, 0x0010 }, { 7237, 0x0100 }, { 7238, 0x0000 }, { 7238, 0x3000 },
+  { 7240, 0xb011 }, { 7245, 0x030a }, { 7249, 0x1001 }, { 7251, 0x0010 },
+  /* 0xcb00 */
+  { 7252, 0x0100 }, { 7253, 0x0111 }, { 7256, 0x0003 }, { 7258, 0x0000 },
+  { 7258, 0x1302 }, { 7262, 0x2301 }, { 7266, 0x0010 }, { 7267, 0x0300 },
+  { 7269, 0x0000 }, { 7269, 0x1000 }, { 7270, 0x0000 }, { 7270, 0x0100 },
+  { 7271, 0x0000 }, { 7271, 0x0010 }, { 7272, 0x0290 }, { 7275, 0x0000 },
+  /* 0xcc00 */
+  { 7275, 0x3000 }, { 7277, 0x3011 }, { 7281, 0x5386 }, { 7288, 0x7b01 },
+  { 7295, 0x1130 }, { 7299, 0x03b0 }, { 7304, 0x0151 }, { 7308, 0x0021 },
+  { 7310, 0x0000 }, { 7310, 0x1300 }, { 7313, 0x3b01 }, { 7319, 0x1130 },
+  { 7323, 0x02b0 }, { 7327, 0x0011 }, { 7329, 0x1010 }, { 7331, 0x0001 },
+  /* 0xcd00 */
+  { 7332, 0x1302 }, { 7336, 0x2b01 }, { 7341, 0x1110 }, { 7344, 0x0200 },
+  { 7345, 0x0000 }, { 7345, 0x1000 }, { 7346, 0xb011 }, { 7351, 0x0102 },
+  { 7353, 0x0100 }, { 7354, 0x1130 }, { 7358, 0x02b0 }, { 7362, 0x0001 },
+  { 7363, 0x1010 }, { 7365, 0x0001 }, { 7366, 0x1100 }, { 7368, 0x2b01 },
+  /* 0xce00 */
+  { 7373, 0x1110 }, { 7376, 0x0210 }, { 7378, 0x0113 }, { 7382, 0x002b },
+  { 7386, 0x0000 }, { 7386, 0x9300 }, { 7390, 0x2b03 }, { 7396, 0x1130 },
+  { 7400, 0x02b0 }, { 7404, 0x0113 }, { 7408, 0x303b }, { 7415, 0x0000 },
+  { 7415, 0x0002 }, { 7416, 0x0000 }, { 7416, 0x1930 }, { 7421, 0x03b0 },
+  /* 0xcf00 */
+  { 7426, 0x0113 }, { 7430, 0x102b }, { 7435, 0xb011 }, { 7440, 0x0103 },
+  { 7443, 0x0000 }, { 7443, 0x1130 }, { 7447, 0x02b0 }, { 7451, 0x0113 },
+  { 7455, 0x1021 }, { 7458, 0x0000 }, { 7458, 0x0102 }, { 7460, 0x0001 },
+  { 7461, 0x0010 }, { 7462, 0x0000 }, { 7462, 0x0113 }, { 7466, 0x102b },
+  /* 0xd000 */
+  { 7471, 0x0011 }, { 7473, 0x0102 }, { 7475, 0x2000 }, { 7476, 0x1130 },
+  { 7480, 0x02b0 }, { 7484, 0x0111 }, { 7487, 0x3001 }, { 7490, 0x3011 },
+  { 7494, 0x0002 }, { 7495, 0x0000 }, { 7495, 0x1130 }, { 7499, 0x02b0 },
+  { 7503, 0x0313 }, { 7508, 0x303b }, { 7515, 0xb011 }, { 7520, 0x0103 },
+  /* 0xd100 */
+  { 7523, 0x2000 }, { 7524, 0x0000 }, { 7524, 0x0000 }, { 7524, 0x0513 },
+  { 7529, 0x303b }, { 7536, 0xb011 }, { 7541, 0x1102 }, { 7544, 0x1000 },
+  { 7545, 0x0110 }, { 7547, 0x0000 }, { 7547, 0x0113 }, { 7551, 0x142b },
+  { 7557, 0x0001 }, { 7558, 0x0100 }, { 7559, 0x0000 }, { 7559, 0x0110 },
+  /* 0xd200 */
+  { 7561, 0x0280 }, { 7563, 0x0001 }, { 7564, 0x3000 }, { 7566, 0xb011 },
+  { 7571, 0x0102 }, { 7573, 0x1000 }, { 7574, 0x0010 }, { 7575, 0x0000 },
+  { 7575, 0x0113 }, { 7579, 0x1023 }, { 7583, 0x1011 }, { 7586, 0x9302 },
+  { 7591, 0x0b05 }, { 7596, 0x1110 }, { 7599, 0x0030 }, { 7601, 0x0113 },
+  /* 0xd300 */
+  { 7605, 0x702b }, { 7612, 0xb051 }, { 7618, 0x1323 }, { 7624, 0x3b01 },
+  { 7630, 0x0030 }, { 7632, 0x0000 }, { 7632, 0x0000 }, { 7632, 0x3000 },
+  { 7634, 0xb011 }, { 7639, 0x1303 }, { 7644, 0x2b01 }, { 7649, 0x1110 },
+  { 7652, 0x0330 }, { 7656, 0x0101 }, { 7658, 0x300a }, { 7662, 0xb011 },
+  /* 0xd400 */
+  { 7667, 0x0102 }, { 7669, 0x2000 }, { 7670, 0x0000 }, { 7670, 0x0000 },
+  { 7670, 0x0011 }, { 7672, 0x1000 }, { 7673, 0xa011 }, { 7677, 0x9300 },
+  { 7681, 0x2b05 }, { 7687, 0x0010 }, { 7688, 0x0200 }, { 7689, 0x0000 },
+  { 7689, 0x1000 }, { 7690, 0x9011 }, { 7694, 0x1100 }, { 7696, 0x2901 },
+  /* 0xd500 */
+  { 7700, 0x1110 }, { 7703, 0x00b0 }, { 7706, 0x0000 }, { 7706, 0x3000 },
+  { 7708, 0xb011 }, { 7713, 0x1302 }, { 7717, 0x2b21 }, { 7723, 0x1130 },
+  { 7727, 0x03b0 }, { 7732, 0x0001 }, { 7733, 0x0020 }, { 7734, 0x0000 },
+  { 7734, 0x1300 }, { 7737, 0x2b05 }, { 7743, 0x1130 }, { 7747, 0x02b0 },
+  /* 0xd600 */
+  { 7751, 0x0113 }, { 7755, 0x103b }, { 7761, 0x2011 }, { 7764, 0x1300 },
+  { 7767, 0x2b21 }, { 7773, 0x1132 }, { 7778, 0x0280 }, { 7780, 0x0013 },
+  { 7783, 0x3028 }, { 7787, 0xa011 }, { 7791, 0x1102 }, { 7794, 0x0a01 },
+  { 7797, 0x1130 }, { 7801, 0x0292 }, { 7805, 0x0111 }, { 7808, 0x3021 },
+  /* 0xd700 */
+  { 7812, 0x0011 }, { 7814, 0x1302 }, { 7818, 0x2b01 }, { 7823, 0x1130 },
+  { 7827, 0x0290 }, { 7830, 0x03d3 }, { 7837, 0x122b }, { 7843, 0x3011 },
+  { 7847, 0x1302 }, { 7851, 0x2b01 },
+};
+static const Summary16 ksc5601_uni2indx_pagef9[17] = {
+  /* 0xf900 */
+  { 7856, 0xffff }, { 7872, 0xffff }, { 7888, 0xffff }, { 7904, 0xffff },
+  { 7920, 0xffff }, { 7936, 0xffff }, { 7952, 0xffff }, { 7968, 0xffff },
+  { 7984, 0xffff }, { 8000, 0xffff }, { 8016, 0xffff }, { 8032, 0xffff },
+  { 8048, 0xffff }, { 8064, 0xffff }, { 8080, 0xffff }, { 8096, 0xffff },
+  /* 0xfa00 */
+  { 8112, 0x0fff },
+};
+static const Summary16 ksc5601_uni2indx_pageff[15] = {
+  /* 0xff00 */
+  { 8124, 0xfffe }, { 8139, 0xffff }, { 8155, 0xffff }, { 8171, 0xffff },
+  { 8187, 0xffff }, { 8203, 0x7fff }, { 8218, 0x0000 }, { 8218, 0x0000 },
+  { 8218, 0x0000 }, { 8218, 0x0000 }, { 8218, 0x0000 }, { 8218, 0x0000 },
+  { 8218, 0x0000 }, { 8218, 0x0000 }, { 8218, 0x006f },
+};
+
+static int
+ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (n >= 2) {
+    const Summary16 *summary = NULL;
+    if (wc < 0x0460)
+      summary = &ksc5601_uni2indx_page00[(wc>>4)];
+    else if (wc >= 0x2000 && wc < 0x2670)
+      summary = &ksc5601_uni2indx_page20[(wc>>4)-0x200];
+    else if (wc >= 0x3000 && wc < 0x33e0)
+      summary = &ksc5601_uni2indx_page30[(wc>>4)-0x300];
+    else if (wc >= 0x4e00 && wc < 0x9fa0)
+      summary = &ksc5601_uni2indx_page4e[(wc>>4)-0x4e0];
+    else if (wc >= 0xac00 && wc < 0xd7a0)
+      summary = &ksc5601_uni2indx_pageac[(wc>>4)-0xac0];
+    else if (wc >= 0xf900 && wc < 0xfa10)
+      summary = &ksc5601_uni2indx_pagef9[(wc>>4)-0xf90];
+    else if (wc >= 0xff00 && wc < 0xfff0)
+      summary = &ksc5601_uni2indx_pageff[(wc>>4)-0xff0];
+    if (summary) {
+      unsigned short used = summary->used;
+      unsigned int i = wc & 0x0f;
+      if (used & ((unsigned short) 1 << i)) {
+        unsigned short c;
+        /* Keep in `used' only the bits 0..i-1. */
+        used &= ((unsigned short) 1 << i) - 1;
+        /* Add `summary->indx' and the number of bits set in `used'. */
+        used = (used & 0x5555) + ((used & 0xaaaa) >> 1);
+        used = (used & 0x3333) + ((used & 0xcccc) >> 2);
+        used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);
+        used = (used & 0x00ff) + (used >> 8);
+        c = ksc5601_2charset[summary->indx + used];
+        r[0] = (c >> 8); r[1] = (c & 0xff);
+        return 2;
+      }
+    }
+    return RET_ILSEQ;
+  }
+  return RET_TOOSMALL;
+}
+#endif /* NEED_TOMB */

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/mulelao.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/mulelao.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/mulelao.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,78 @@
+/* $XFree86: xc/lib/X11/lcUniConv/mulelao.h,v 1.3 2000/11/29 17:40:35 dawes Exp $ */
+
+/*
+ * MULELAO-1
+ */
+
+static const unsigned short mulelao_2uni[96] = {
+  /* 0xa0 */
+  0x00a0, 0x0e81, 0x0e82, 0xfffd, 0x0e84, 0xfffd, 0xfffd, 0x0e87,
+  0x0e88, 0xfffd, 0x0e8a, 0xfffd, 0xfffd, 0x0e8d, 0xfffd, 0xfffd,
+  /* 0xb0 */
+  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e94, 0x0e95, 0x0e96, 0x0e97,
+  0xfffd, 0x0e99, 0x0e9a, 0x0e9b, 0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f,
+  /* 0xc0 */
+  0xfffd, 0x0ea1, 0x0ea2, 0x0ea3, 0xfffd, 0x0ea5, 0xfffd, 0x0ea7,
+  0xfffd, 0xfffd, 0x0eaa, 0x0eab, 0xfffd, 0x0ead, 0x0eae, 0x0eaf,
+  /* 0xd0 */
+  0x0eb0, 0x0eb1, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7,
+  0x0eb8, 0x0eb9, 0xfffd, 0x0ebb, 0x0ebc, 0x0ebd, 0xfffd, 0xfffd,
+  /* 0xe0 */
+  0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0xfffd, 0x0ec6, 0xfffd,
+  0x0ec8, 0x0ec9, 0x0eca, 0x0ecb, 0x0ecc, 0x0ecd, 0xfffd, 0xfffd,
+  /* 0xf0 */
+  0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7,
+  0x0ed8, 0x0ed9, 0xfffd, 0xfffd, 0x0edc, 0x0edd, 0xfffd, 0xfffd,
+};
+
+static int
+mulelao_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0xa0) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else {
+    unsigned short wc = mulelao_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+
+static const unsigned char mulelao_page0e[96] = {
+  0x00, 0xa1, 0xa2, 0x00, 0xa4, 0x00, 0x00, 0xa7, /* 0x80-0x87 */
+  0xa8, 0x00, 0xaa, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x00, 0x00, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x90-0x97 */
+  0x00, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x98-0x9f */
+  0x00, 0xc1, 0xc2, 0xc3, 0x00, 0xc5, 0x00, 0xc7, /* 0xa0-0xa7 */
+  0x00, 0x00, 0xca, 0xcb, 0x00, 0xcd, 0xce, 0xcf, /* 0xa8-0xaf */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xb0-0xb7 */
+  0xd8, 0xd9, 0x00, 0xdb, 0xdc, 0xdd, 0x00, 0x00, /* 0xb8-0xbf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0x00, 0xe6, 0x00, /* 0xc0-0xc7 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0x00, 0x00, /* 0xc8-0xcf */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xd0-0xd7 */
+  0xf8, 0xf9, 0x00, 0x00, 0xfc, 0xfd, 0x00, 0x00, /* 0xd8-0xdf */
+};
+
+static int
+mulelao_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x00a0) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc == 0x00a0)
+    c = 0xa0;
+  else if (wc >= 0x0e80 && wc < 0x0ee0)
+    c = mulelao_page0e[wc-0x0e80];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/tatar_cyr.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/tatar_cyr.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/tatar_cyr.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,123 @@
+/* $XFree86: xc/lib/X11/lcUniConv/tatar_cyr.h,v 1.3 2000/12/04 18:49:42 dawes Exp $ */
+
+/*
+ * TATAR-CYR
+ */
+
+static const unsigned short tatar_cyr_2uni[128] = {
+  /* 0x80 */
+  0x04d8, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021,
+  0x20ac, 0x2030, 0x04e8, 0x2039, 0x04ae, 0x0496, 0x04a2, 0x04ba,
+  /* 0x90 */
+  0x04d9, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+    0x98, 0x2122, 0x04e9, 0x203a, 0x04af, 0x0497, 0x04a3, 0x04bb,
+  /* 0xa0 */
+  0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7,
+  0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
+  /* 0xb0 */
+  0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7,
+  0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457,
+  /* 0xc0 */
+  0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+  0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
+  /* 0xd0 */
+  0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+  0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
+  /* 0xe0 */
+  0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+  0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
+  /* 0xf0 */
+  0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+  0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
+};
+
+static int
+tatar_cyr_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) tatar_cyr_2uni[c-0x80];
+  return 1;
+}
+
+static const unsigned char tatar_cyr_page00[32] = {
+  0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */
+  0x00, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */
+  0xb0, 0xb1, 0x00, 0x00, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+};
+static const unsigned char tatar_cyr_page04[240] = {
+  0x00, 0xa8, 0x00, 0x81, 0xaa, 0xbd, 0xb2, 0xaf, /* 0x00-0x07 */
+  0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, /* 0x08-0x0f */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x10-0x17 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x18-0x1f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x20-0x27 */
+  0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0x28-0x2f */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x30-0x37 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x38-0x3f */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x40-0x47 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0x48-0x4f */
+  0x00, 0xb8, 0x00, 0x83, 0xba, 0xbe, 0xb3, 0xbf, /* 0x50-0x57 */
+  0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0xa5, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x9d, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
+  0x00, 0x00, 0x8e, 0x9e, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x9c, /* 0xa8-0xaf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x8f, 0x9f, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x80, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0x8a, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
+};
+static const unsigned char tatar_cyr_page20[48] = {
+  0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */
+  0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+};
+static const unsigned char tatar_cyr_page21[24] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+};
+static const unsigned char tatar_cyr_page22[1] = {
+                                      0xb0,       /* 0x16-0x16 */
+};
+
+static int
+tatar_cyr_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x00bc)
+    c = tatar_cyr_page00[wc-0x00a0];
+  else if (wc >= 0x0400 && wc < 0x04ef)
+    c = tatar_cyr_page04[wc-0x0400];
+  else if (wc >= 0x2010 && wc < 0x203b)
+    c = tatar_cyr_page20[wc-0x2010];
+  else if (wc == 0x20ac)
+    c = 0x88;
+  else if (wc >= 0x2110 && wc < 0x2123)
+    c = tatar_cyr_page21[wc-0x2110];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/tcvn.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/tcvn.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/tcvn.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,134 @@
+/* $XFree86: xc/lib/X11/lcUniConv/tcvn.h,v 1.3 2000/11/29 17:40:35 dawes Exp $ */
+
+/*
+ * TCVN-5712
+ */
+
+static const unsigned short tcvn_2uni_1[32] = {
+  /* 0x00 */
+  0x0000, 0x00da, 0x1ee4, 0x0003, 0x1eea, 0x1eec, 0x1eee, 0x0007,
+  0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
+  /* 0x10 */
+  0x0010, 0x1ee8, 0x1ef0, 0x1ef2, 0x1ef6, 0x1ef8, 0x00dd, 0x1ef4,
+  0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
+};
+static const unsigned short tcvn_2uni_2[128] = {
+  /* 0x80 */
+  0x00c0, 0x1ea2, 0x00c3, 0x00c1, 0x1ea0, 0x1eb6, 0x1eac, 0x00c8,
+  0x1eba, 0x1ebc, 0x00c9, 0x1eb8, 0x1ec6, 0x00cc, 0x1ec8, 0x0128,
+  /* 0x90 */
+  0x00cd, 0x1eca, 0x00d2, 0x1ece, 0x00d5, 0x00d3, 0x1ecc, 0x1ed8,
+  0x1edc, 0x1ede, 0x1ee0, 0x1eda, 0x1ee2, 0x00d9, 0x1ee6, 0x0168,
+  /* 0xa0 */
+  0x00a0, 0x0102, 0x00c2, 0x00ca, 0x00d4, 0x01a0, 0x01af, 0x0110,
+  0x0103, 0x00e2, 0x00ea, 0x00f4, 0x01a1, 0x01b0, 0x0111, 0x1eb0,
+  /* 0xb0 */
+  0x0300, 0x0309, 0x0303, 0x0301, 0x0323, 0x00e0, 0x1ea3, 0x00e3,
+  0x00e1, 0x1ea1, 0x1eb2, 0x1eb1, 0x1eb3, 0x1eb5, 0x1eaf, 0x1eb4,
+  /* 0xc0 */
+  0x1eae, 0x1ea6, 0x1ea8, 0x1eaa, 0x1ea4, 0x1ec0, 0x1eb7, 0x1ea7,
+  0x1ea9, 0x1eab, 0x1ea5, 0x1ead, 0x00e8, 0x1ec2, 0x1ebb, 0x1ebd,
+  /* 0xd0 */
+  0x00e9, 0x1eb9, 0x1ec1, 0x1ec3, 0x1ec5, 0x1ebf, 0x1ec7, 0x00ec,
+  0x1ec9, 0x1ec4, 0x1ebe, 0x1ed2, 0x0129, 0x00ed, 0x1ecb, 0x00f2,
+  /* 0xe0 */
+  0x1ed4, 0x1ecf, 0x00f5, 0x00f3, 0x1ecd, 0x1ed3, 0x1ed5, 0x1ed7,
+  0x1ed1, 0x1ed9, 0x1edd, 0x1edf, 0x1ee1, 0x1edb, 0x1ee3, 0x00f9,
+  /* 0xf0 */
+  0x1ed6, 0x1ee7, 0x0169, 0x00fa, 0x1ee5, 0x1eeb, 0x1eed, 0x1eef,
+  0x1ee9, 0x1ef1, 0x1ef3, 0x1ef7, 0x1ef9, 0x00fd, 0x1ef5, 0x1ed0,
+};
+
+static int
+tcvn_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x20)
+    *pwc = (ucs4_t) tcvn_2uni_1[c];
+  else if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) tcvn_2uni_2[c-0x80];
+  return 1;
+}
+
+static const unsigned char tcvn_page00[96+184] = {
+  0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
+  0x80, 0x83, 0xa2, 0x82, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0x87, 0x8a, 0xa3, 0x00, 0x8d, 0x90, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0x92, 0x95, 0xa4, 0x94, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0x9d, 0x01, 0x00, 0x00, 0x16, 0x00, 0x00, /* 0xd8-0xdf */
+  0xb5, 0xb8, 0xa9, 0xb7, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0xcc, 0xd0, 0xaa, 0x00, 0xd7, 0xdd, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0xdf, 0xe3, 0xab, 0xe2, 0x00, 0x00, /* 0xf0-0xf7 */
+  0x00, 0xef, 0xf3, 0x00, 0x00, 0xfd, 0x00, 0x00, /* 0xf8-0xff */
+  /* 0x0100 */
+  0x00, 0x00, 0xa1, 0xa8, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0xa7, 0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0x8f, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x9f, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
+  0xa5, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, /* 0xa8-0xaf */
+  0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+};
+static const unsigned char tcvn_page03[40] = {
+  0xb0, 0xb3, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+};
+static const unsigned char tcvn_page1e[96] = {
+  0x84, 0xb9, 0x81, 0xb6, 0xc4, 0xca, 0xc1, 0xc7, /* 0xa0-0xa7 */
+  0xc2, 0xc8, 0xc3, 0xc9, 0x86, 0xcb, 0xc0, 0xbe, /* 0xa8-0xaf */
+  0xaf, 0xbb, 0xba, 0xbc, 0xbf, 0xbd, 0x85, 0xc6, /* 0xb0-0xb7 */
+  0x8b, 0xd1, 0x88, 0xce, 0x89, 0xcf, 0xda, 0xd5, /* 0xb8-0xbf */
+  0xc5, 0xd2, 0xcd, 0xd3, 0xd9, 0xd4, 0x8c, 0xd6, /* 0xc0-0xc7 */
+  0x8e, 0xd8, 0x91, 0xde, 0x96, 0xe4, 0x93, 0xe1, /* 0xc8-0xcf */
+  0xff, 0xe8, 0xdb, 0xe5, 0xe0, 0xe6, 0xf0, 0xe7, /* 0xd0-0xd7 */
+  0x97, 0xe9, 0x9b, 0xed, 0x98, 0xea, 0x99, 0xeb, /* 0xd8-0xdf */
+  0x9a, 0xec, 0x9c, 0xee, 0x02, 0xf4, 0x9e, 0xf1, /* 0xe0-0xe7 */
+  0x11, 0xf8, 0x04, 0xf5, 0x05, 0xf6, 0x06, 0xf7, /* 0xe8-0xef */
+  0x12, 0xf9, 0x13, 0xfa, 0x17, 0xfe, 0x14, 0xfb, /* 0xf0-0xf7 */
+  0x15, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
+};
+
+static int
+tcvn_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080 && (wc >= 0x0020 || (0x00fe0076 & (1 << wc)) == 0)) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00a0 && wc < 0x01b8)
+    c = tcvn_page00[wc-0x00a0];
+  else if (wc >= 0x0300 && wc < 0x0328)
+    c = tcvn_page03[wc-0x0300];
+  else if (wc >= 0x1ea0 && wc < 0x1f00)
+    c = tcvn_page1e[wc-0x1ea0];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/tis620.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/tis620.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/tis620.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,78 @@
+/* $XFree86: xc/lib/X11/lcUniConv/tis620.h,v 1.4 2001/02/09 00:02:54 dawes Exp $ */
+
+/*
+ * TIS620-0
+ */
+
+static const unsigned short tis620_2uni[96] = {
+  /* 0xa0 */
+  0xfffd, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07,
+  0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
+  /* 0xb0 */
+  0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17,
+  0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
+  /* 0xc0 */
+  0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27,
+  0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
+  /* 0xd0 */
+  0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
+  0x0e38, 0x0e39, 0x0e3a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e3f,
+  /* 0xe0 */
+  0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
+  0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
+  /* 0xf0 */
+  0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
+  0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
+};
+
+static int
+tis620_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x80) {
+    *pwc = (ucs4_t) c;
+    return 1;
+  }
+  else if (c < 0xa0) {
+  }
+  else {
+    unsigned short wc = tis620_2uni[c-0xa0];
+    if (wc != 0xfffd) {
+      *pwc = (ucs4_t) wc;
+      return 1;
+    }
+  }
+  return RET_ILSEQ;
+}
+
+static const unsigned char tis620_page0e[96] = {
+  0x00, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */
+  0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x08-0x0f */
+  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x10-0x17 */
+  0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x18-0x1f */
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
+  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
+  0xd8, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdf, /* 0x38-0x3f */
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
+  0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x50-0x57 */
+  0xf8, 0xf9, 0xfa, 0xfb, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+};
+
+static int
+tis620_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x0e00 && wc < 0x0e60)
+    c = tis620_page0e[wc-0x0e00];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/ucs2be.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/ucs2be.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/ucs2be.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,32 @@
+/*
+ * UCS-2BE = UCS-2 big endian
+ */
+/* $XFree86: xc/lib/X11/lcUniConv/ucs2be.h,v 1.1 2000/11/28 17:25:09 dawes Exp $ */
+
+static int
+ucs2be_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  if (n >= 2) {
+    if (s[0] >= 0xd8 && s[0] < 0xe0) {
+      return RET_ILSEQ;
+    } else {
+      *pwc = (s[0] << 8) + s[1];
+      return 2;
+    }
+  }
+  return RET_TOOFEW(0);
+}
+
+static int
+ucs2be_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  if (wc < 0x10000 && !(wc >= 0xd800 && wc < 0xe000)) {
+    if (n >= 2) {
+      r[0] = (unsigned char) (wc >> 8);
+      r[1] = (unsigned char) wc;
+      return 2;
+    } else
+      return RET_TOOSMALL;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/utf8.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/utf8.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/utf8.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,110 @@
+/* $XFree86: xc/lib/X11/lcUniConv/utf8.h,v 1.3 2000/11/28 18:50:07 dawes Exp $ */
+
+/*
+ * UTF-8
+ */
+
+/* Specification: RFC 2279 */
+
+static int
+utf8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = s[0];
+
+  if (c < 0x80) {
+    *pwc = c;
+    return 1;
+  } else if (c < 0xc2) {
+    return RET_ILSEQ;
+  } else if (c < 0xe0) {
+    if (n < 2)
+      return RET_TOOFEW(0);
+    if (!((s[1] ^ 0x80) < 0x40))
+      return RET_ILSEQ;
+    *pwc = ((ucs4_t) (c & 0x1f) << 6)
+           | (ucs4_t) (s[1] ^ 0x80);
+    return 2;
+  } else if (c < 0xf0) {
+    if (n < 3)
+      return RET_TOOFEW(0);
+    if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
+          && (c >= 0xe1 || s[1] >= 0xa0)))
+      return RET_ILSEQ;
+    *pwc = ((ucs4_t) (c & 0x0f) << 12)
+           | ((ucs4_t) (s[1] ^ 0x80) << 6)
+           | (ucs4_t) (s[2] ^ 0x80);
+    return 3;
+  } else if (c < 0xf8) {
+    if (n < 4)
+      return RET_TOOFEW(0);
+    if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
+          && (s[3] ^ 0x80) < 0x40
+          && (c >= 0xf1 || s[1] >= 0x90)))
+      return RET_ILSEQ;
+    *pwc = ((ucs4_t) (c & 0x07) << 18)
+           | ((ucs4_t) (s[1] ^ 0x80) << 12)
+           | ((ucs4_t) (s[2] ^ 0x80) << 6)
+           | (ucs4_t) (s[3] ^ 0x80);
+    return 4;
+  } else if (c < 0xfc) {
+    if (n < 5)
+      return RET_TOOFEW(0);
+    if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
+          && (s[3] ^ 0x80) < 0x40 && (s[4] ^ 0x80) < 0x40
+          && (c >= 0xf9 || s[1] >= 0x88)))
+      return RET_ILSEQ;
+    *pwc = ((ucs4_t) (c & 0x03) << 24)
+           | ((ucs4_t) (s[1] ^ 0x80) << 18)
+           | ((ucs4_t) (s[2] ^ 0x80) << 12)
+           | ((ucs4_t) (s[3] ^ 0x80) << 6)
+           | (ucs4_t) (s[4] ^ 0x80);
+    return 5;
+  } else if (c < 0xfe) {
+    if (n < 6)
+      return RET_TOOFEW(0);
+    if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
+          && (s[3] ^ 0x80) < 0x40 && (s[4] ^ 0x80) < 0x40
+          && (s[5] ^ 0x80) < 0x40
+          && (c >= 0xfd || s[1] >= 0x84)))
+      return RET_ILSEQ;
+    *pwc = ((ucs4_t) (c & 0x01) << 30)
+           | ((ucs4_t) (s[1] ^ 0x80) << 24)
+           | ((ucs4_t) (s[2] ^ 0x80) << 18)
+           | ((ucs4_t) (s[3] ^ 0x80) << 12)
+           | ((ucs4_t) (s[4] ^ 0x80) << 6)
+           | (ucs4_t) (s[5] ^ 0x80);
+    return 6;
+  } else
+    return RET_ILSEQ;
+}
+
+static int
+utf8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) /* n == 0 is acceptable */
+{
+  int count;
+  if (wc < 0x80)
+    count = 1;
+  else if (wc < 0x800)
+    count = 2;
+  else if (wc < 0x10000)
+    count = 3;
+  else if (wc < 0x200000)
+    count = 4;
+  else if (wc < 0x4000000)
+    count = 5;
+  else if (wc <= 0x7fffffff)
+    count = 6;
+  else
+    return RET_ILSEQ;
+  if (n < count)
+    return RET_TOOSMALL;
+  switch (count) { /* note: code falls through cases! */
+    case 6: r[5] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x4000000;
+    case 5: r[4] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x200000;
+    case 4: r[3] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x10000;
+    case 3: r[2] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x800;
+    case 2: r[1] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0xc0;
+    case 1: r[0] = wc;
+  }
+  return count;
+}

Added: branches/branch-3.0/src/core/xutf8/lcUniConv/viscii.h
===================================================================
--- branches/branch-3.0/src/core/xutf8/lcUniConv/viscii.h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/lcUniConv/viscii.h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,123 @@
+/* $XFree86: xc/lib/X11/lcUniConv/viscii.h,v 1.3 2000/11/29 17:40:35 dawes Exp $ */
+
+/*
+ * VISCII1.1-1
+ */
+
+/* Specification: RFC 1456 */
+
+static const unsigned short viscii_2uni_1[32] = {
+  /* 0x00 */
+  0x0000, 0x0001, 0x1eb2, 0x0003, 0x0004, 0x1eb4, 0x1eaa, 0x0007,
+  0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
+  /* 0x10 */
+  0x0010, 0x0011, 0x0012, 0x0013, 0x1ef6, 0x0015, 0x0016, 0x0017,
+  0x0018, 0x1ef8, 0x001a, 0x001b, 0x001c, 0x001d, 0x1ef4, 0x001f,
+};
+static const unsigned short viscii_2uni_2[128] = {
+  /* 0x80 */
+  0x1ea0, 0x1eae, 0x1eb0, 0x1eb6, 0x1ea4, 0x1ea6, 0x1ea8, 0x1eac,
+  0x1ebc, 0x1eb8, 0x1ebe, 0x1ec0, 0x1ec2, 0x1ec4, 0x1ec6, 0x1ed0,
+  /* 0x90 */
+  0x1ed2, 0x1ed4, 0x1ed6, 0x1ed8, 0x1ee2, 0x1eda, 0x1edc, 0x1ede,
+  0x1eca, 0x1ece, 0x1ecc, 0x1ec8, 0x1ee6, 0x0168, 0x1ee4, 0x1ef2,
+  /* 0xa0 */
+  0x00d5, 0x1eaf, 0x1eb1, 0x1eb7, 0x1ea5, 0x1ea7, 0x1ea9, 0x1ead,
+  0x1ebd, 0x1eb9, 0x1ebf, 0x1ec1, 0x1ec3, 0x1ec5, 0x1ec7, 0x1ed1,
+  /* 0xb0 */
+  0x1ed3, 0x1ed5, 0x1ed7, 0x1ee0, 0x01a0, 0x1ed9, 0x1edd, 0x1edf,
+  0x1ecb, 0x1ef0, 0x1ee8, 0x1eea, 0x1eec, 0x01a1, 0x1edb, 0x01af,
+  /* 0xc0 */
+  0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x1ea2, 0x0102, 0x1eb3, 0x1eb5,
+  0x00c8, 0x00c9, 0x00ca, 0x1eba, 0x00cc, 0x00cd, 0x0128, 0x1ef3,
+  /* 0xd0 */
+  0x0110, 0x1ee9, 0x00d2, 0x00d3, 0x00d4, 0x1ea1, 0x1ef7, 0x1eeb,
+  0x1eed, 0x00d9, 0x00da, 0x1ef9, 0x1ef5, 0x00dd, 0x1ee1, 0x01b0,
+  /* 0xe0 */
+  0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x1ea3, 0x0103, 0x1eef, 0x1eab,
+  0x00e8, 0x00e9, 0x00ea, 0x1ebb, 0x00ec, 0x00ed, 0x0129, 0x1ec9,
+  /* 0xf0 */
+  0x0111, 0x1ef1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x1ecf, 0x1ecd,
+  0x1ee5, 0x00f9, 0x00fa, 0x0169, 0x1ee7, 0x00fd, 0x1ee3, 0x1eee,
+};
+
+static int
+viscii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+  unsigned char c = *s;
+  if (c < 0x20)
+    *pwc = (ucs4_t) viscii_2uni_1[c];
+  else if (c < 0x80)
+    *pwc = (ucs4_t) c;
+  else
+    *pwc = (ucs4_t) viscii_2uni_2[c-0x80];
+  return 1;
+}
+
+static const unsigned char viscii_page00[64+184] = {
+  0xc0, 0xc1, 0xc2, 0xc3, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
+  0xc8, 0xc9, 0xca, 0x00, 0xcc, 0xcd, 0x00, 0x00, /* 0xc8-0xcf */
+  0x00, 0x00, 0xd2, 0xd3, 0xd4, 0xa0, 0x00, 0x00, /* 0xd0-0xd7 */
+  0x00, 0xd9, 0xda, 0x00, 0x00, 0xdd, 0x00, 0x00, /* 0xd8-0xdf */
+  0xe0, 0xe1, 0xe2, 0xe3, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
+  0xe8, 0xe9, 0xea, 0x00, 0xec, 0xed, 0x00, 0x00, /* 0xe8-0xef */
+  0x00, 0x00, 0xf2, 0xf3, 0xf4, 0xf5, 0x00, 0x00, /* 0xf0-0xf7 */
+  0x00, 0xf9, 0xfa, 0x00, 0x00, 0xfd, 0x00, 0x00, /* 0xf8-0xff */
+  /* 0x0100 */
+  0x00, 0x00, 0xc5, 0xe5, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
+  0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
+  0xce, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
+  0x9d, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
+  0xb4, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, /* 0xa8-0xaf */
+  0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
+};
+static const unsigned char viscii_page1e[96] = {
+  0x80, 0xd5, 0xc4, 0xe4, 0x84, 0xa4, 0x85, 0xa5, /* 0xa0-0xa7 */
+  0x86, 0xa6, 0x06, 0xe7, 0x87, 0xa7, 0x81, 0xa1, /* 0xa8-0xaf */
+  0x82, 0xa2, 0x02, 0xc6, 0x05, 0xc7, 0x83, 0xa3, /* 0xb0-0xb7 */
+  0x89, 0xa9, 0xcb, 0xeb, 0x88, 0xa8, 0x8a, 0xaa, /* 0xb8-0xbf */
+  0x8b, 0xab, 0x8c, 0xac, 0x8d, 0xad, 0x8e, 0xae, /* 0xc0-0xc7 */
+  0x9b, 0xef, 0x98, 0xb8, 0x9a, 0xf7, 0x99, 0xf6, /* 0xc8-0xcf */
+  0x8f, 0xaf, 0x90, 0xb0, 0x91, 0xb1, 0x92, 0xb2, /* 0xd0-0xd7 */
+  0x93, 0xb5, 0x95, 0xbe, 0x96, 0xb6, 0x97, 0xb7, /* 0xd8-0xdf */
+  0xb3, 0xde, 0x94, 0xfe, 0x9e, 0xf8, 0x9c, 0xfc, /* 0xe0-0xe7 */
+  0xba, 0xd1, 0xbb, 0xd7, 0xbc, 0xd8, 0xff, 0xe6, /* 0xe8-0xef */
+  0xb9, 0xf1, 0x9f, 0xcf, 0x1e, 0xdc, 0x14, 0xd6, /* 0xf0-0xf7 */
+  0x19, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8-0xff */
+};
+
+static int
+viscii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+  unsigned char c = 0;
+  if (wc < 0x0080 && (wc >= 0x0020 || (0x42100064 & (1 << wc)) == 0)) {
+    *r = wc;
+    return 1;
+  }
+  else if (wc >= 0x00c0 && wc < 0x01b8)
+    c = viscii_page00[wc-0x00c0];
+  else if (wc >= 0x1ea0 && wc < 0x1f00)
+    c = viscii_page1e[wc-0x1ea0];
+  if (c != 0) {
+    *r = c;
+    return 1;
+  }
+  return RET_ILSEQ;
+}

Added: branches/branch-3.0/src/core/xutf8/mk_wcwidth.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/mk_wcwidth.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/mk_wcwidth.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,353 @@
+/*
+ * FLTK: Important!
+ * This file should remain as close to Markus Kuhn's original source
+ * as possible for easy checking for changes later, however unlikely.
+ * All customisations to work with FLTK shall be annotated!
+ */
+
+/*
+ * This is an implementation of wcwidth() and wcswidth() (defined in
+ * IEEE Std 1002.1-2001) for Unicode.
+ *
+ * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
+ * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
+ *
+ * In fixed-width output devices, Latin characters all occupy a single
+ * "cell" position of equal width, whereas ideographic CJK characters
+ * occupy two such cells. Interoperability between terminal-line
+ * applications and (teletype-style) character terminals using the
+ * UTF-8 encoding requires agreement on which character should advance
+ * the cursor by how many cell positions. No established formal
+ * standards exist at present on which Unicode character shall occupy
+ * how many cell positions on character terminals. These routines are
+ * a first attempt of defining such behavior based on simple rules
+ * applied to data provided by the Unicode Consortium.
+ *
+ * For some graphical characters, the Unicode standard explicitly
+ * defines a character-cell width via the definition of the East Asian
+ * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
+ * In all these cases, there is no ambiguity about which width a
+ * terminal shall use. For characters in the East Asian Ambiguous (A)
+ * class, the width choice depends purely on a preference of backward
+ * compatibility with either historic CJK or Western practice.
+ * Choosing single-width for these characters is easy to justify as
+ * the appropriate long-term solution, as the CJK practice of
+ * displaying these characters as double-width comes from historic
+ * implementation simplicity (8-bit encoded characters were displayed
+ * single-width and 16-bit ones double-width, even for Greek,
+ * Cyrillic, etc.) and not any typographic considerations.
+ *
+ * Much less clear is the choice of width for the Not East Asian
+ * (Neutral) class. Existing practice does not dictate a width for any
+ * of these characters. It would nevertheless make sense
+ * typographically to allocate two character cells to characters such
+ * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
+ * represented adequately with a single-width glyph. The following
+ * routines at present merely assign a single-cell width to all
+ * neutral characters, in the interest of simplicity. This is not
+ * entirely satisfactory and should be reconsidered before
+ * establishing a formal standard in this area. At the moment, the
+ * decision which Not East Asian (Neutral) characters should be
+ * represented by double-width glyphs cannot yet be answered by
+ * applying a simple rule from the Unicode database content. Setting
+ * up a proper standard for the behavior of UTF-8 character terminals
+ * will require a careful analysis not only of each Unicode character,
+ * but also of each presentation form, something the author of these
+ * routines has avoided to do so far.
+ *
+ * http://www.unicode.org/unicode/reports/tr11/
+ *
+ * Markus Kuhn -- 2007-05-26 (Unicode 5.0)
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * for any purpose and without fee is hereby granted. The author
+ * disclaims all warranties with regard to this software.
+ *
+ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+ */
+
+/*
+ * FLTK - avoid possible problems on systems with 32-bit wchar_t.
+ *        Don't include wchar.h, and change wchar_t to unsigned int.
+ *        Can we guarantee sizeof(unsigned int) >= 4 ?
+ */
+#if 0
+#include <wchar.h>
+#endif
+
+struct interval {
+  unsigned int first;
+  unsigned int last;
+};
+
+/* auxiliary function for binary search in interval table */
+/*
+ * FLTK: was
+static int bisearch(wchar_t ucs, const struct interval *table, int max) {
+ */
+static int bisearch(unsigned int ucs, const struct interval *table, int max) {
+  int min = 0;
+  int mid;
+
+  if (ucs < table[0].first || ucs > table[max].last)
+    return 0;
+  while (max >= min) {
+    mid = (min + max) / 2;
+    if (ucs > table[mid].last)
+      min = mid + 1;
+    else if (ucs < table[mid].first)
+      max = mid - 1;
+    else
+      return 1;
+  }
+
+  return 0;
+}
+
+
+/* The following two functions define the column width of an ISO 10646
+ * character as follows:
+ *
+ *    - The null character (U+0000) has a column width of 0.
+ *
+ *    - Other C0/C1 control characters and DEL will lead to a return
+ *      value of -1.
+ *
+ *    - Non-spacing and enclosing combining characters (general
+ *      category code Mn or Me in the Unicode database) have a
+ *      column width of 0.
+ *
+ *    - SOFT HYPHEN (U+00AD) has a column width of 1.
+ *
+ *    - Other format characters (general category code Cf in the Unicode
+ *      database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.
+ *
+ *    - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
+ *      have a column width of 0.
+ *
+ *    - Spacing characters in the East Asian Wide (W) or East Asian
+ *      Full-width (F) category as defined in Unicode Technical
+ *      Report #11 have a column width of 2.
+ *
+ *    - All remaining characters (including all printable
+ *      ISO 8859-1 and WGL4 characters, Unicode control characters,
+ *      etc.) have a column width of 1.
+ *
+ * This implementation assumes that wchar_t characters are encoded
+ * in ISO 10646.
+ */
+
+/*
+ * FLTK: was
+int mk_wcwidth(wchar_t ucs)
+ */
+int mk_wcwidth(unsigned int ucs)
+{
+  /* sorted list of non-overlapping intervals of non-spacing characters */
+  /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
+  static const struct interval combining[] = {
+    { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 },
+    { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
+    { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 },
+    { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 },
+    { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
+    { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
+    { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 },
+    { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D },
+    { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 },
+    { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD },
+    { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },
+    { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },
+    { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC },
+    { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD },
+    { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
+    { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D },
+    { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 },
+    { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
+    { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC },
+    { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
+    { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D },
+    { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
+    { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
+    { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },
+    { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },
+    { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },
+    { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 },
+    { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },
+    { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 },
+    { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F },
+    { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 },
+    { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD },
+    { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD },
+    { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },
+    { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B },
+    { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
+    { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },
+    { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF },
+    { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 },
+    { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F },
+    { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
+    { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },
+    { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },
+    { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },
+    { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 },
+    { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },
+    { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },
+    { 0xE0100, 0xE01EF }
+  };
+
+  /* test for 8-bit control characters */
+  if (ucs == 0)
+    return 0;
+  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
+    return -1;
+
+  /* binary search in table of non-spacing characters */
+  if (bisearch(ucs, combining,
+	       sizeof(combining) / sizeof(struct interval) - 1))
+    return 0;
+
+  /* if we arrive here, ucs is not a combining or C0/C1 control character */
+
+  return 1 + 
+    (ucs >= 0x1100 &&
+     (ucs <= 0x115f ||                    /* Hangul Jamo init. consonants */
+      ucs == 0x2329 || ucs == 0x232a ||
+      (ucs >= 0x2e80 && ucs <= 0xa4cf &&
+       ucs != 0x303f) ||                  /* CJK ... Yi */
+      (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */
+      (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
+      (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */
+      (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
+      (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */
+      (ucs >= 0xffe0 && ucs <= 0xffe6) ||
+      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
+      (ucs >= 0x30000 && ucs <= 0x3fffd)));
+}
+
+
+/*
+ * FLTK: comment out the remaining functions, as we don't need themm.
+ */
+#if 0
+
+/*
+ * FLTK: was
+int mk_wcswidth(const wchar_t *pwcs, size_t n)
+ */
+int mk_wcswidth(const unsigned int *pwcs, size_t n)
+{
+  int w, width = 0;
+
+  for (;*pwcs && n-- > 0; pwcs++)
+    if ((w = mk_wcwidth(*pwcs)) < 0)
+      return -1;
+    else
+      width += w;
+
+  return width;
+}
+
+
+/*
+ * The following functions are the same as mk_wcwidth() and
+ * mk_wcswidth(), except that spacing characters in the East Asian
+ * Ambiguous (A) category as defined in Unicode Technical Report #11
+ * have a column width of 2. This variant might be useful for users of
+ * CJK legacy encodings who want to migrate to UCS without changing
+ * the traditional terminal character-width behaviour. It is not
+ * otherwise recommended for general use.
+ */
+/*
+ * FLTK: was
+int mk_wcwidth_cjk(wchar_t ucs)
+ */
+int mk_wcwidth_cjk(unsigned int ucs)
+{
+  /* sorted list of non-overlapping intervals of East Asian Ambiguous
+   * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
+  static const struct interval ambiguous[] = {
+    { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 },
+    { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 },
+    { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 },
+    { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 },
+    { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED },
+    { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA },
+    { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 },
+    { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B },
+    { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 },
+    { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 },
+    { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 },
+    { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE },
+    { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 },
+    { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA },
+    { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 },
+    { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB },
+    { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB },
+    { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0391, 0x03A1 },
+    { 0x03A3, 0x03A9 }, { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 },
+    { 0x0401, 0x0401 }, { 0x0410, 0x044F }, { 0x0451, 0x0451 },
+    { 0x2010, 0x2010 }, { 0x2013, 0x2016 }, { 0x2018, 0x2019 },
+    { 0x201C, 0x201D }, { 0x2020, 0x2022 }, { 0x2024, 0x2027 },
+    { 0x2030, 0x2030 }, { 0x2032, 0x2033 }, { 0x2035, 0x2035 },
+    { 0x203B, 0x203B }, { 0x203E, 0x203E }, { 0x2074, 0x2074 },
+    { 0x207F, 0x207F }, { 0x2081, 0x2084 }, { 0x20AC, 0x20AC },
+    { 0x2103, 0x2103 }, { 0x2105, 0x2105 }, { 0x2109, 0x2109 },
+    { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 },
+    { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 },
+    { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 },
+    { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 },
+    { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 },
+    { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B },
+    { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 },
+    { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 },
+    { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E },
+    { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 },
+    { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 },
+    { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },
+    { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },
+    { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },
+    { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },
+    { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },
+    { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 },
+    { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 },
+    { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 },
+    { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 },
+    { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 },
+    { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 },
+    { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 },
+    { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F },
+    { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF },
+    { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }
+  };
+
+  /* binary search in table of non-spacing characters */
+  if (bisearch(ucs, ambiguous,
+	       sizeof(ambiguous) / sizeof(struct interval) - 1))
+    return 2;
+
+  return mk_wcwidth(ucs);
+}
+
+
+/*
+ * FLTK: was
+int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
+ */
+int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n)
+{
+  int w, width = 0;
+
+  for (;*pwcs && n-- > 0; pwcs++)
+    if ((w = mk_wcwidth_cjk(*pwcs)) < 0)
+      return -1;
+    else
+      width += w;
+
+  return width;
+}
+
+/*
+ * FLTK: end of commented out functions
+ */
+#endif


Property changes on: branches/branch-3.0/src/core/xutf8/mk_wcwidth.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/branch-3.0/src/core/xutf8/stamp-h
===================================================================
--- branches/branch-3.0/src/core/xutf8/stamp-h	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/stamp-h	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1 @@
+timestamp

Added: branches/branch-3.0/src/core/xutf8/stamp-h.in
===================================================================
--- branches/branch-3.0/src/core/xutf8/stamp-h.in	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/stamp-h.in	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1 @@
+timestamp

Added: branches/branch-3.0/src/core/xutf8/test.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/test.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/test.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,292 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ *   UTF-8 X test program (It contains MINIMAL code to support XIM !!!)
+ *
+ ****************
+ * To test it do:
+ ****************
+
+kinput2 -canna
+XMODIFIERS="@im=kinput2"; export XMODIFIERS
+LANG=ja_JP; export LANG
+./test
+
+	to open a conversion window press "Shift space"
+	type some keys.
+	press space.
+	select glyph with arrows keys.
+	press return.
+	press return.
+	press "Shift space" to close the window
+
+LANG=ar_AE; export LANG
+LANG=he_IL; export LANG
+export LANG=ja_JP; export XMODIFIERS="@im=kinput2"
+export LANG=ja_JP; export XMODIFIERS="@im=nicolatter"
+export LANG=ja_JP; export XMODIFIERS="@im=jmode"
+export LANG=ja_JP; export XMODIFIERS="@im=htt"
+export LANG=ko_KR; export XMODIFIERS="@im=Ami"
+export LANG=zh_TW; export XMODIFIERS="@im=xcin-zh_TW"
+export LANG=zh_TW; export XMODIFIERS="@im=xcin-zh_CN"
+export LANG=C; export XMODIFIERS="@im=interxim"
+**********************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "Xutf8.h"
+#include <X11/Xlocale.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Intrinsic.h>
+#include <X11/Xmd.h>
+
+char *jp_txt = "�UTF-8 e\xCC\x82=\xC3\xAA"
+		"  \357\274\270\357\274\254\357\274\246\357\274"
+		"\244\345\220\215\343\201\247\346\214\207    \345\256\232"
+		"\343\201\231\343\202\213";
+
+char *rtl_txt = "->e\xCC\x82=\xC3\xAA";
+
+XIM xim_im = NULL;
+XIC xim_ic = NULL;
+static XIMStyles* xim_styles = NULL;
+XUtf8FontStruct *fontset;
+GC gc;
+int x = 2;
+int y = 40;
+
+int main(int argc, char**argv) {
+  char **missing_charset_list;
+  int missing_charset_count;
+  XGCValues xgcv;
+  unsigned long mask;
+  Display* dpy;
+  int scr;
+  Window w, root;
+  XSetWindowAttributes set_attr;
+  int i;
+  XIMStyle *style;
+  static char buf[128];
+  KeySym keysym = 0;
+  Status status;
+  XWMHints wm_hints;
+  XClassHint class_hints;
+  XIMStyle input_style = 0;
+  char **font_name_list;
+  char *def_string;
+  XFontStruct **font_struct_list;
+  char **font_encoding_list;
+  int nb_font;
+  int len = 0;
+  int no_xim = 0;
+
+  printf ("A -> %c \n", XUtf8Tolower('A'));
+  if (!setlocale(LC_ALL, ""))
+    puts("locale not supported by C library, locale unchanged");
+
+  if (!XSetLocaleModifiers(""))
+    puts("X locale modifiers not supported, using default");
+  
+  dpy = XOpenDisplay(0);
+  if (!dpy) { puts("cannot open display.\n"); exit(-1); }
+  scr = DefaultScreen(dpy);
+  root = RootWindow(dpy, scr);
+  set_attr.event_mask = KeyPressMask|FocusChangeMask;
+  set_attr.background_pixel = WhitePixel(dpy, DefaultScreen(dpy));
+  set_attr.border_pixel = BlackPixel(dpy, DefaultScreen(dpy));
+  w = XCreateWindow(dpy, root, 10,10,200,100,0, 
+		    DefaultDepth(dpy, DefaultScreen(dpy)),
+		    InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
+		    CWEventMask | CWBackPixel | CWBorderPixel, &set_attr);
+  if (!w) {
+    puts("cannot creat window.\n");
+    exit(-1);
+  }
+
+  class_hints.res_name = "test";
+  class_hints.res_class = "Test";
+  wm_hints.input = True;
+  wm_hints.flags = InputHint;
+
+  XmbSetWMProperties(dpy, w, "test", "test", NULL, 0,
+		     NULL, &wm_hints, &class_hints);
+
+  XMapWindow(dpy, w);
+  xim_im = XOpenIM(dpy, NULL, "test", "Test");
+  if (!xim_im) { 
+    puts("cannot Open Input Manager: Try default.\n"); 
+    XSetLocaleModifiers("@im=");
+    xim_im = XOpenIM(dpy, NULL, "test", "Test");
+    if (!xim_im) {
+      puts("Failed exiting.\n");
+      exit(-1);
+    }
+  }
+  XGetIMValues (xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL);
+  for (i = 0, style = xim_styles->supported_styles;
+       i < xim_styles->count_styles; i++, style++) {
+    if (i == 0 && *style == (XIMStatusNone|XIMPreeditNone)) {
+      printf("this is not a XIM server !!!\n");
+      no_xim = 1;
+    }
+    printf("input style : 0x%X\n", *style);
+  }
+
+  xim_ic = XCreateIC(xim_im,
+		     XNInputStyle, 
+		     (XIMPreeditNothing | XIMStatusNothing),
+		     XNClientWindow, w,
+		     XNFocusWindow, w,
+		     NULL);
+  if (!xim_ic) {
+    puts("cannot create Input Context.\n");
+    exit(-1);
+  }
+  XFree(xim_styles);
+  XSetICFocus(xim_ic);
+
+  /***************************************************************
+   *  I don't recommend to use a font base name list similar 
+   *  to the following one in a real application ;-) 
+   *  You should use an iso8859-1 font, plus a single font for 
+   *  your language.
+   ***************************************************************/
+  fontset = XCreateUtf8FontStruct(dpy, 
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8858-3," /* not valid */
+	  "-*-*-medium-r-*-*-*-*-*-*-*-*-iso8859-1,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-6,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-8,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987-0,"
+	  "-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific," 
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0212.1990-0,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-0,"
+	  "-*-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1[0x300 0x400_0x500],"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"); 
+
+  /* THIS PART IS NOT REQUIERED */
+  nb_font = fontset->nb_font;
+
+  while (nb_font > 0) {
+    nb_font--;
+    if (fontset->fonts[nb_font]) {
+      printf("encoding=\"\" fid=%d \n  %s\n", 
+      /*     fontset->encodings[nb_font], */
+	     fontset->fonts[nb_font]->fid,
+	     fontset->font_name_list[nb_font]);
+    }
+  }
+  /* END OF NOT REQUIERED PART*/
+
+  mask = (GCForeground | GCBackground);
+  xgcv.foreground = BlackPixel(dpy, DefaultScreen(dpy));
+  xgcv.background = WhitePixel(dpy, DefaultScreen(dpy));
+
+  gc = XCreateGC(dpy, w, mask, &xgcv);
+  if (!gc) {
+    puts("cannot create Graphic Context.\n");
+    exit(-1);
+  }
+
+  /***************************************************************/
+  while (1) {
+    int filtered;
+    static XEvent xevent;
+    static XVaNestedList list1 = 0;
+    int r;
+
+    XNextEvent(dpy, &xevent);
+    if (xevent.type == KeyPress) {
+      XKeyEvent *e = (XKeyEvent*) &xevent;
+      printf ("0x%X %d\n", e->state, e->keycode);
+    }
+    if (xevent.type == DestroyNotify) {
+      /* XIM server has crashed */
+      no_xim = 1;
+      XSetLocaleModifiers("@im=");
+      xim_im = XOpenIM(dpy, NULL, "test", "Test");
+      if (xim_im) {
+	xim_ic = XCreateIC(xim_im,
+	                   XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
+			   XNClientWindow, w,
+			   XNFocusWindow, w,
+			   NULL);
+      } else {
+	xim_ic = NULL;
+      }
+      if (!xim_ic) {
+	puts("Crash recovery failed. exiting.\n");
+	exit(-1);
+      }
+    }
+    if (xevent.type != DestroyNotify) {
+      filtered = XFilterEvent(&xevent, 0);
+    }
+    if (xevent.type == FocusOut && xim_ic) XUnsetICFocus(xim_ic);
+    if (xevent.type == FocusIn && xim_ic) XSetICFocus(xim_ic);
+
+    if (xevent.type == KeyPress && !filtered) {
+      len = XUtf8LookupString(xim_ic, &xevent.xkey, 
+			      buf, 127, &keysym, &status);
+
+      if (len == 1 && buf[0] == '\b') {
+	x -= XUtf8TextWidth(fontset, buf, len);
+	XUtf8DrawImageString(dpy, w, fontset, gc, 
+			     x, y, buf, len);
+      } else if (len == 1 && buf[0] == '\r') {
+	y += fontset->ascent + fontset->descent;
+	x = 0;
+	XCloseIM(xim_im);
+      } else {
+	XUtf8DrawImageString(dpy, w, fontset, gc, x, y, buf, len);
+	x += XUtf8TextWidth(fontset, buf, len);
+      }
+
+      XUtf8DrawString(dpy, w, fontset, gc, 0, 20, jp_txt, strlen(jp_txt));
+      XUtf8DrawString(dpy, w, fontset, gc, 50, 90, rtl_txt, strlen(rtl_txt));
+      XUtf8DrawRtlString(dpy, w, fontset, gc, 50, 90, rtl_txt, strlen(rtl_txt));
+      buf[len] = 0;
+      printf("'%s' %d %x\n", buf, keysym, keysym);
+      buf[0] = 0;
+    }
+    if (filtered) {
+      printf("Dead key\n");
+    }
+  }
+  XFreeUtf8FontStruct(dpy, fontset);
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/test2.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/test2.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/test2.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,223 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ *   UTF-8 X test program
+ *
+ *****************
+ * To test it do :
+ *****************
+
+kinput2 -canna
+XMODIFIERS="@im=kinput2"; export XMODIFIERS
+LANG=ja_JP; export LANG
+./test
+
+	to open a conversion window press "Shift space"
+	type some keys.
+	press space.
+	select glyph with arrows keys.
+	press return.
+	press return.
+	press "Shift space" to close the window
+
+LANG=ar_AE; export LANG
+LANG=he_IL; export LANG
+export LANG=ja_JP; export XMODIFIERS="@im=kinput2"
+export LANG=ja_JP; export XMODIFIERS="@im=nicolatter"
+export LANG=ja_JP; export XMODIFIERS="@im=jmode"
+export LANG=ja_JP; export XMODIFIERS="@im=htt"
+export LANG=ko_KR; export XMODIFIERS="@im=ami"
+export LANG=zh_TW; export XMODIFIERS="@im=xcin-zh_TW"
+export LANG=zh_TW; export XMODIFIERS="@im=xcin-zh_CN"
+export LANG=fr_FR.UTF-8; export XMODIFIERS="@im=interxim"
+
+export LD_PRELOAD="/usr/src/x11/xc/exports/lib/libX11.so /usr/src/x11/xc/exports/lib/libxlcDef.so.2 /usr/src/x11/xc/exports/lib/libxlibi18n.so.2 /usr/src/x11/xc/exports/lib/libxlocale.so.2 /usr/src/x11/xc/exports/lib/libxomGeneric.so.2 /usr/src/x11/xc/exports/lib/libximcp.so.2"
+
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <wchar.h>
+#include <X11/Xlocale.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Intrinsic.h>
+#include <X11/Xmd.h>
+
+char *jp_txt = "�UTF-8 e\xCC\x82=\xC3\xAA"
+	       "  \357\274\270\357\274\254\357\274\246\357\274"
+	       "\244\345\220\215\343\201\247\346\214\207    \345\256\232"
+	       "\343\201\231\343\202\213";
+
+char *rtl_txt = "->e\xCC\x82=\xC3\xAA";
+
+XIM xim_im = NULL;
+XIC xim_ic = NULL;
+static XIMStyles* xim_styles = NULL;
+XFontSet fontset;
+GC gc;
+int x = 2;
+int y = 40;
+
+int main(int argc, char**argv) {
+  char **missing_charset_list;
+  int missing_charset_count;
+  XGCValues xgcv;
+  unsigned long mask;
+  Display* dpy;
+  int scr;
+  Window w, root;
+  XSetWindowAttributes set_attr;
+  int i;
+  XIMStyle *style;
+  static char buf[128];
+  KeySym keysym = 0;
+  Status status;
+  XWMHints wm_hints;
+  XClassHint class_hints;
+  XIMStyle input_style = 0;
+  char **font_name_list;
+  char *def_string;
+  XFontStruct **font_struct_list;
+  char **font_encoding_list;
+  int nb_font;
+  int len = 0;
+  int no_xim = 0;
+  char **missing_charset_list_return;
+  int missing_charset_count_return;
+  char *def_string_return;
+  
+  if (!setlocale(LC_ALL, ""))
+    puts("locale not supported by C library, locale unchanged");
+
+  if (!XSetLocaleModifiers(""))
+    puts("X locale modifiers not supported, using default");
+  
+  dpy = XOpenDisplay(0);
+  scr = DefaultScreen(dpy);
+  root = RootWindow(dpy, scr);
+  set_attr.event_mask = KeyPressMask|FocusChangeMask;
+  set_attr.background_pixel = WhitePixel(dpy, DefaultScreen(dpy));
+  set_attr.border_pixel = BlackPixel(dpy, DefaultScreen(dpy));
+  w = XCreateWindow(dpy, root, 10,10,200,100,0, 
+		    DefaultDepth(dpy, DefaultScreen(dpy)),
+		    InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
+		    CWEventMask | CWBackPixel | CWBorderPixel, &set_attr);
+
+  class_hints.res_name = "test";
+  class_hints.res_class = "Test";
+  wm_hints.input = True;
+  wm_hints.flags = InputHint;
+
+  XmbSetWMProperties(dpy, w, "test", "test", NULL, 0,
+		     NULL, &wm_hints, &class_hints);
+
+  XMapWindow(dpy, w);
+  xim_im = XOpenIM(dpy, NULL, "test", "Test");
+  XGetIMValues(xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL);
+  for (i = 0, style = xim_styles->supported_styles;
+       i < xim_styles->count_styles; i++, style++) {
+    if (*style == (XIMStatusNone|XIMPreeditNone)) {
+      printf("this is not a XIM server !!!\n");
+      no_xim = 1;
+    }
+    printf("input style : 0x%X\n", *style);
+  }
+  XFree(xim_styles);
+
+  xim_ic = XCreateIC(xim_im,
+		     XNInputStyle, (XIMPreeditNothing | XIMStatusNothing),
+		     XNClientWindow, w,
+		     XNFocusWindow, w,
+		     NULL);
+  XSetICFocus(xim_ic);
+
+  /***************************************************************
+   *  I don't recommend to use a font base name list similar 
+   *  to the following one in a real application ;-)
+   ***************************************************************/
+  fontset = XCreateFontSet(dpy, 
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8858-3," /* not valid */
+	  "-*-*-medium-r-*-*-*-*-*-*-*-*-iso8859-1,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-6,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-8,"
+	  "-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific," 
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0212.1990-0,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0,"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-0,"
+	  "-*-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1[0x300 0x400_0x500],"
+	  "-*-*-*-*-*-*-*-*-*-*-*-*-*-*",
+	  &missing_charset_list_return,
+	  &missing_charset_count_return,
+	  &def_string_return); 
+  mask = (GCForeground | GCBackground);
+  xgcv.foreground = BlackPixel(dpy, DefaultScreen(dpy));
+  xgcv.background = WhitePixel(dpy, DefaultScreen(dpy));
+
+  gc = XCreateGC(dpy, w, mask, &xgcv);
+
+  /***************************************************************/
+  while (1) {
+    int filtered;
+    static XEvent xevent;
+    static XVaNestedList list1 = 0;
+    int r;
+
+    XNextEvent(dpy, &xevent);
+    if (xevent.type == KeyPress) {
+      XKeyEvent *e = (XKeyEvent*) &xevent;
+      printf ("0x%X %d\n", e->state, e->keycode);
+    }
+    filtered = XFilterEvent(&xevent, w);
+    if (xevent.type == FocusOut) XUnsetICFocus(xim_ic);
+    if (xevent.type == FocusIn) XSetICFocus(xim_ic);
+
+    if (xevent.type == KeyPress && !filtered) {
+      len = Xutf8LookupString(xim_ic, &xevent.xkey, buf, 127, &keysym, &status); 
+      Xutf8DrawImageString(dpy, w, fontset, gc, x, y, buf, len);
+      Xutf8DrawString(dpy, w, fontset, gc, 0, 20, jp_txt, strlen(jp_txt));
+      Xutf8DrawString(dpy, w, fontset, gc, 50, 90, rtl_txt, strlen(rtl_txt));
+      buf[len] = 0;
+      printf("'%s' %d\n", buf, keysym);
+      buf[0] = 0;
+      XCloseIM(xim_im);
+    }
+    if (filtered) {
+      printf("Dead key\n");
+    }
+  }
+  XFreeFontSet(dpy, fontset);
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/ucs2fontmap.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/ucs2fontmap.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/ucs2fontmap.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,380 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#define RET_ILSEQ -1
+#define RET_TOOFEW(x) (-10 - x)
+#define RET_TOOSMALL -2
+#define conv_t void*
+#define ucs4_t unsigned int
+typedef struct {
+  unsigned short indx;
+  unsigned short used;
+} Summary16;
+
+#define NEED_TOMB /* indicates what part of these include files is needed here (avoid compilation warnings) */
+#include "lcUniConv/cp936ext.h"
+#include "lcUniConv/big5.h"
+#include "lcUniConv/gb2312.h"
+#include "lcUniConv/iso8859_10.h"
+#include "lcUniConv/iso8859_11.h"
+#include "lcUniConv/iso8859_13.h"
+#include "lcUniConv/iso8859_14.h"
+#include "lcUniConv/iso8859_15.h"
+#include "lcUniConv/iso8859_2.h"
+#include "lcUniConv/iso8859_3.h"
+#include "lcUniConv/iso8859_4.h"
+#include "lcUniConv/iso8859_5.h"
+#include "lcUniConv/iso8859_6.h"
+#include "lcUniConv/iso8859_7.h"
+#include "lcUniConv/iso8859_8.h"
+#include "lcUniConv/iso8859_9.h"
+#include "lcUniConv/jisx0201.h"
+#include "lcUniConv/jisx0208.h"
+#include "lcUniConv/jisx0212.h"
+#include "lcUniConv/koi8_r.h"
+#include "lcUniConv/koi8_u.h"
+#include "lcUniConv/ksc5601.h"
+#include "lcUniConv/cp1251.h"
+#include "headers/symbol_.h"
+#include "headers/dingbats_.h"
+  
+/*************** conv_gen.c ************/
+
+/*const*/
+int ucs2fontmap(char *s, unsigned int ucs, int enc) {
+  switch(enc) {
+  case 0:	/* iso10646-1 */
+    s[0] = (char) ((ucs & 0xFF00) >> 8);
+    s[1] = (char) (ucs & 0xFF);
+    return 0;
+    break;
+  case 1:	/* iso8859-1 */
+    if (ucs <= 0x00FF) {
+      if (ucs >= 0x0001) {
+        s[0] = 0;
+        s[1] = (char) (ucs & 0xFF);
+        return 1;
+      }
+    }
+    break;
+  case 2:	/* iso8859-2 */
+    if (ucs <= 0x00a0) {
+      s[0] = 0;
+      s[1] = (char) ucs;
+      return 2;
+    } else if (ucs < 0x0180) {
+      if (ucs >= 0x00a0) {
+	s[0] = 0;
+	s[1] = (char)  iso8859_2_page00[ucs-0x00a0];
+        if (s[1]) return 2;
+      }
+    } else if (ucs < 0x02e0) {
+      if (ucs >= 0x02c0) {
+        s[0] = 0;
+        s[1] = (char) iso8859_2_page02[ucs-0x02c0];
+        if (s[1]) return 2;
+      }	
+    }
+    break;
+  case 3:	/* iso8859-3 */
+    if (iso8859_3_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 3;
+    } 
+    break;
+  case 4:	/* iso8859-4 */
+    if (iso8859_4_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 4;
+    } 
+    break;
+  case 5:	/* iso8859-5 */
+    if (iso8859_5_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 5;
+    } 
+    break;
+  case 6:	/* iso8859-6 */
+    if (iso8859_6_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 6;
+    } 
+    break;
+  case 7:	/* iso8859-7 */
+    if (iso8859_7_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 7;
+    } 
+    break;
+  case 8:	/* iso8859-8 */
+    if (iso8859_8_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 8;
+    } 
+    break;
+  case 9:	/* iso8859-9 */
+    if (iso8859_9_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 9;
+    } 
+    break;
+  case 10:	/* iso8859-10 */
+    if (iso8859_10_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 10;
+    } 
+    break;
+  case 25:	/* iso8859-11 */
+    if (iso8859_11_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 25;
+    } 
+    break;
+  case 11:	/* iso8859-13 */
+    if (iso8859_13_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 11;
+    } 
+    break;
+  case 12:	/* iso8859-14 */
+    if (iso8859_14_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 12;
+    } 
+    break;
+  case 13:	/* iso8859-15 */
+    if (iso8859_15_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 13;
+    } 
+    break;
+  case 14:	/* koi8-r */
+    if (koi8_r_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 14;
+    } 
+    break;
+  case 15:	/* big5 */
+    if (big5_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 15;
+    } 
+    break;
+  case 16:	/* ksc5601.1987-0 */
+    if (ksc5601_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 16;
+    } 
+    break;
+  case 17:	/* gb2312.1980-0 */
+    if (gb2312_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 17;
+    } 
+    break;
+  case 18:	/* jisx0201.1976-0 */
+    if (jisx0201_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 18;
+    } 
+    break;
+  case 19:	/* jisx0208.1983-0 */
+    if (jisx0208_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 19;
+    } 
+    break;
+  case 20:	/* jisx0212.1990-0 */
+    if (jisx0212_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 20;
+    } 
+    break;
+  case 21:	/* symbol */
+    if (ucs <= 0x00F7) {
+      if (ucs >= 0x0020) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_0020[ucs - 0x0020];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0x0192) {
+      if (ucs >= 0x0192) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_0192[ucs - 0x0192];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0x03D6) {
+      if (ucs >= 0x0391) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_0391[ucs - 0x0391];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0x232A) {
+      if (ucs >= 0x2022) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_2022[ucs - 0x2022];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0x25CA) {
+      if (ucs >= 0x25CA) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_25CA[ucs - 0x25CA];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0x2666) {
+      if (ucs >= 0x2660) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_2660[ucs - 0x2660];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0xF6DB) {
+      if (ucs >= 0xF6D9) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_F6D9[ucs - 0xF6D9];
+        if (s[1]) return 21;
+      }
+    } else if (ucs <= 0xF8FE) {
+      if (ucs >= 0xF8E5) {
+        s[0] = 0;
+        s[1] = unicode_to_symbol_1b_F8E5[ucs - 0xF8E5];
+        if (s[1]) return 21;
+      }
+    }
+    break;
+  case 22:	/* dingbats */
+    if (ucs <= 0x00A0) {
+      if (ucs >= 0x0020) {
+        s[0] = 0;
+        s[1] = unicode_to_dingbats_1b_0020[ucs - 0x0020];
+        if (s[1]) return 22;
+      }
+    } else if (ucs <= 0x2195) {
+      if (ucs >= 0x2192) {
+        s[0] = 0;
+        s[1] = unicode_to_dingbats_1b_2192[ucs - 0x2192];
+        if (s[1]) return 22;
+      }
+    } else if (ucs <= 0x2469) {
+      if (ucs >= 0x2460) {
+        s[0] = 0;
+        s[1] = unicode_to_dingbats_1b_2460[ucs - 0x2460];
+        if (s[1]) return 22;
+      }
+    } else if (ucs <= 0x2666) {
+      if (ucs >= 0x25A0) {
+        s[0] = 0;
+        s[1] = unicode_to_dingbats_1b_25A0[ucs - 0x25A0];
+        if (s[1]) return 22;
+      }
+    } else if (ucs <= 0x27BE) {
+      if (ucs >= 0x2701) {
+        s[0] = 0;
+        s[1] = unicode_to_dingbats_1b_2701[ucs - 0x2701];
+        if (s[1]) return 22;
+      }
+    } else if (ucs <= 0xF8E4) {
+      if (ucs >= 0xF8D7) {
+        s[0] = 0;
+        s[1] = unicode_to_dingbats_1b_F8D7[ucs - 0xF8D7];
+        if (s[1]) return 22;
+      }
+    }
+    break;
+  case 23:	/* koi8-u */
+    if (koi8_u_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 23;
+    } 
+    break;
+  case 24:	/* microsoft-cp1251 */
+    if (cp1251_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 24;
+    } 
+    break;
+  case 26: /* gbk/cp936ext */
+    if (cp936ext_wctomb(NULL, (unsigned char*)s, ucs, 2) > 0) {
+      return 26;
+    }
+    break;
+  default:
+    break;
+  };
+  return -1;
+}
+
+/*const*/
+int encoding_number(const char *enc) {
+  if (!enc || !strncmp(enc, "iso10646-1", 10)) {
+    return 0;
+  } else if (!strcmp(enc, "iso8859-1")) {
+    return 1;
+  } else if (!strcmp(enc, "iso8859-2")) {
+    return 2;
+  } else if (!strcmp(enc, "iso8859-3")) {
+    return 3;
+  } else if (!strcmp(enc, "iso8859-4")) {
+    return 4;
+  } else if (!strcmp(enc, "iso8859-5")) {
+    return 5;
+  } else if (!strcmp(enc, "iso8859-6")) {
+    return 6;
+  } else if (!strcmp(enc, "iso8859-7")) {
+    return 7;
+  } else if (!strcmp(enc, "iso8859-8")) {
+    return 8;
+  } else if (!strcmp(enc, "iso8859-9")) {
+    return 9;
+  } else if (!strcmp(enc, "iso8859-10")) {
+    return 10;
+  } else if (!strcmp(enc, "iso8859-13")) {
+    return 11;
+  } else if (!strcmp(enc, "iso8859-14")) {
+    return 12;
+  } else if (!strcmp(enc, "iso8859-15")) {
+    return 13;
+  } else if (!strcmp(enc, "koi8-r")) {
+    return 14;
+  } else if (!strcmp(enc, "big5-0") || !strcmp(enc, "big5.eten-0") ||
+    !strcmp(enc, "big5p-0")) 
+  {
+    return 15;
+  } else if (!strcmp(enc, "ksc5601.1987-0")) {
+    return 16;
+  } else if (!strcmp(enc, "gb2312.1980-0") || !strcmp(enc, "gb2312.80-0") || 
+     !strcmp(enc, "gb2312.80&gb8565.88") ||  !strcmp(enc, "gb2312.80-0")) 
+  {
+    return 17;
+  } else if (!strcmp(enc, "jisx0201.1976-0")) {
+    return 18;
+  } else if (!strcmp(enc, "jisx0208.1983-0") || !strcmp(enc, "jisx0208.1990-0")
+    || !strcmp(enc, "jisx0208.1978-0")) 
+  {
+    return 19;
+  } else if (!strcmp(enc, "jisx0212.1990-0")) {
+    return 20;
+  } else if (!strcmp(enc, "symbol")) {
+    return 21;
+  } else if (!strcmp(enc, "dingbats") || !strcmp(enc, "zapfdingbats") || 
+    !strcmp(enc, "zapf dingbats") || !strcmp(enc, "itc zapf dingbats")) 
+  {
+    return 22;
+  } else if (!strcmp(enc, "koi8-u")) {
+    return 23;
+  } else if (!strcmp(enc, "microsoft-cp1251")) {
+    return 24;
+  } else if (!strcmp(enc, "iso8859-11")) {
+    return 25;
+  } else if (!strcmp(enc, "gbk-0") || !strcmp(enc, "cp936") || !strcmp(enc, "gbk")) {
+    return 26;
+  };
+  return -1;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/ucs2fontmap.c.mini
===================================================================
--- branches/branch-3.0/src/core/xutf8/ucs2fontmap.c.mini	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/ucs2fontmap.c.mini	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,46 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+int ucs2fontmap(char *s, unsigned long ucs, int enc)
+{
+    s[0] = (char) ((ucs & 0xFF00) >> 8);
+    s[1] = (char) (ucs & 0xFF);
+    return 0;
+}
+
+
+int encoding_number(const char *enc)
+{
+  return 0;
+}
+
+const char *encoding_name(int num)
+{
+    return "iso10646-1";
+};
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/utf8Input.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utf8Input.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utf8Input.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,459 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#if !defined(WIN32) && !defined(__APPLE__)
+
+#include <config.h>
+#include "../../fltk3/Xutf8.h"
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <string.h>
+#include <stdlib.h>
+
+#if HAVE_LIBC_ICONV
+#include <iconv.h>
+#endif
+/*
+  I haven't found much doc on the web about EUC encodings, so I've used
+  GNU libiconv source code as a reference.
+  http://clisp.cons.org/~haible/packages-libiconv.html
+*/
+
+#define RET_ILSEQ -1
+#define RET_TOOFEW(x) (-10 - x)
+#define RET_TOOSMALL -2
+#define conv_t void*
+#define ucs4_t unsigned int
+typedef struct {
+  unsigned short indx;
+  unsigned short used;
+} Summary16;
+
+#define NEED_TOWC /* indicates what part of these include files is needed here (avoid compilation warnings) */
+#include "lcUniConv/big5.h"
+#include "lcUniConv/gb2312.h"
+#include "lcUniConv/cp936ext.h"
+#include "lcUniConv/jisx0201.h"
+#include "lcUniConv/jisx0208.h"
+#include "lcUniConv/jisx0212.h"
+#include "lcUniConv/ksc5601.h"
+
+int 
+XConvertEucTwToUtf8(char* buffer_return, int len) {
+  /* FIXME */
+#if HAVE_LIBC_ICONV
+  iconv_t cd;
+  int cdl;
+#else
+  int i = 0;
+#endif
+  int l = 0;
+  char *buf, *b;
+
+  if (len < 1) return 0;
+  b = buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned) len);
+
+#if HAVE_LIBC_ICONV
+  l = cdl = len;
+  cd = iconv_open("EUC-TW", "UTF-8");
+  iconv(cd, &b, &len, &buffer_return, &cdl);
+  iconv_close(cd);
+  l -= cdl;	
+#else
+  while (i < len) {
+    unsigned int ucs;
+    unsigned char c; 
+    c = (unsigned char) buf[i];
+    if (c < 0x80) {
+      ucs = c;	
+      i++;
+    } else if (c >= 0xa1 && c < 0xff && len - i > 1 ) {
+      unsigned char b[2];
+      b[0] = (unsigned char) c - 0x80;
+      b[1] = (unsigned char) buf[i + 1] - 0x80;
+      ucs = ' '; i += 2;
+    } else if (c == 0x8e &&  len - i > 3) {
+      unsigned char b[2];
+      unsigned char c1 =  buf[i + 1];
+      unsigned char c2 =  buf[i + 2];
+      unsigned char c3 =  buf[i + 3];
+      b[0] = (unsigned char)  buf[i + 2] - 0x80;
+      b[1] = (unsigned char)  buf[i + 3] - 0x80;
+      if (c1 >= 0xa1 && c1 <= 0xb0) {
+	if (c2 >= 0xa1 && c2 < 0xff && c3 >= 0xa1 && c3 < 0xff) {
+	  ucs = ' '; i += 4;
+	} else {
+	  ucs = '?'; i++;
+	}
+      } else {
+	ucs = '?'; i++;
+      }
+    } else {
+      ucs = '?';
+      i++;
+    }
+    l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+#endif
+  free(buf);
+  return l;
+}
+
+int 
+XConvertEucKrToUtf8(char* buffer_return, int len) {
+  int i = 0, l = 0;
+  char *buf;
+
+  if (len < 1) return 0;
+
+  buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned)len);
+
+  while (i < len) {
+    unsigned int ucs;
+    unsigned char c, c1;
+    c = (unsigned char) buf[i];
+    if (c < 0x80) {
+      ucs = c;	
+      i++;
+    } else if (c >= 0xA1 && c < 0xFF && len - i > 1) {
+      c1 = (unsigned char) buf[i + 1];
+      if (c1 >= 0xa1 && c1 < 0xff) {
+	unsigned char b[2];
+	b[0] = c - 0x80;
+	b[1] = c1 - 0x80;
+	if (ksc5601_mbtowc(NULL, &ucs, b, 2) < 1) {
+	  ucs = '?';
+	}
+      } else {
+	ucs = '?';
+      }
+      i += 2;
+    } else {
+      ucs = '?';
+      i++;
+    }
+    l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+  free(buf);
+  return l;
+}
+
+int 
+XConvertBig5ToUtf8(char* buffer_return, int len) {
+  int i = 0, l = 0;
+  char *buf;
+
+  if (len < 1) return 0;
+  buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned)len);
+
+  if (len == 1) {
+    l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
+  }
+  while (i + 1 < len) {
+    unsigned int ucs;
+    unsigned char b[2];
+    b[0] = (unsigned char) buf[i];
+    b[1] = (unsigned char) buf[i + 1];
+    if (big5_mbtowc(NULL, &ucs, b, 2) == 2) {
+      i += 2;
+    } else {
+      ucs = '?';
+      i++;
+    }
+    l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+  free(buf);
+  return l;
+}
+
+int 
+XConvertCp936extToUtf8(char* buffer_return, int len)
+{
+  int i = 0, l = 0;
+  char *buf;
+
+  if (len < 1) return 0;
+  buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned)len);
+
+  if (len == 1) {
+	  l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
+  }
+  while (i + 1 < len) {
+	  unsigned int ucs;
+	  unsigned char b[2];
+	  b[0] = (unsigned char) buf[i];
+	  b[1] = (unsigned char) buf[i + 1];
+	  if (cp936ext_mbtowc(NULL, &ucs, b, 2) == 2) {
+		  i += 2;
+	  } else {
+	      if ( b[0] < 0x80) {
+		    ucs = b[0];
+		}else{
+			      ucs = '?';
+		  }
+			  i++;
+		  }
+	  l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+  if(i + 1 == len) { 
+      l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
+  }
+  free(buf);
+  return l;
+}
+
+int 
+XConvertGb2312ToUtf8(char* buffer_return, int len) {
+  int i = 0, l = 0;
+  char *buf;
+
+  if (len < 1) return 0;
+  buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned)len);
+
+  if (len == 1) {
+    l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
+  }
+  while (i + 1 < len) {
+    unsigned int ucs;
+    unsigned char b[2];
+    b[0] = (unsigned char) buf[i];
+    b[1] = (unsigned char) buf[i + 1];
+    if ( b[0] < 0x80 ) {
+      ucs = b[0];
+      i++;
+    } else if (gb2312_mbtowc(NULL, &ucs, b, 2) == 2) {
+      i += 2;
+    } else {
+      ucs = '?';
+      i++;
+    }
+    l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+  if (i + 1 == len) {
+    l += XConvertUcsToUtf8((unsigned int)buf[i], buffer_return + l);
+  }
+  free(buf);
+  return l;
+}
+
+int 
+XConvertEucCnToUtf8(char* buffer_return, int len) {
+  int i = 0, l = 0;
+  char *buf;
+
+  if (len < 1) return 0;
+  buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned)len);
+
+  while (i < len) {
+    unsigned int ucs;
+    unsigned char c, c1;
+    c = (unsigned char) buf[i];
+    if (c < 0x80) {
+      ucs = c;	
+      i++;
+    } else if (c >= 0xA1 && c < 0xFF && len - i > 1) {
+      c1 = (unsigned char) buf[i + 1];
+      if (c1 >= 0xa1 && c1 < 0xff) {	
+	unsigned char b[2];
+	b[0] = (unsigned char) c;
+	b[1] = (unsigned char) c1;
+	if (gb2312_mbtowc(NULL, &ucs, b, 2) < 1) {
+	  ucs = '?';
+	}	
+      } else {
+	ucs = '?';
+      }
+      i += 2;
+    } else {
+      ucs = '?';
+      i++;
+    }
+    l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+  free(buf);
+  return l;
+}
+
+int 
+XConvertEucJpToUtf8(char* buffer_return, int len) {
+  int i = 0, l = 0;
+  char *buf;
+
+  if (len < 1) return 0;
+  buf = (char*) malloc((unsigned)len);
+  memcpy(buf, buffer_return, (unsigned)len);
+
+  while (i < len) {
+    unsigned int ucs;
+    unsigned char c, c1;
+    c = (unsigned char) buf[i];
+    if (c < 0x80) {
+      ucs = c;	
+      i++;
+    } else if (c >= 0xA1 && c < 0xFF && len - i > 1) {
+      c1 = (unsigned char) buf[i + 1];		
+      if (c < 0xF5 && c1 >= 0xa1) {
+	unsigned char b[2];
+	b[0] = c - 0x80;
+	b[1] = c1 - 0x80;
+	if (jisx0208_mbtowc(NULL, &ucs, b, 2) < 1) { 
+	  ucs = '?';
+	}
+      } else if (c1 >= 0xA1 && c1 < 0xFF) {
+	ucs = 0xE000 + 94 * (c - 0xF5) + (c1 - 0xA1);
+      } else {
+	ucs = '?';
+      }
+      i += 2;
+    } else if (c == 0x8E && len - i > 1) {
+      c1 = (unsigned char) buf[i + 1];		
+      if (c1 >= 0xa1 && c1 <= 0xe0) {
+	if (jisx0201_mbtowc(NULL, &ucs, &c1, 1) != 1) {
+	  ucs = '?';
+	}
+      } else {
+	ucs = '?';
+      }
+      i += 2;
+    } else if (c == 0x8F && len - i > 2) {
+      c = (unsigned char) buf[i + 1];		
+      c1 = (unsigned char) buf[i + 2];	
+      if (c >= 0xa1 && c < 0xff) {
+	if (c < 0xf5 && c1 >= 0xa1 && c1 < 0xff) {
+	  unsigned char b[2];
+	  b[0] = c - 0x80;
+	  b[1] = c1 - 0x80;
+	  if (jisx0212_mbtowc(NULL, &ucs, b, 2) < 1) {
+	    ucs = '?';
+	  }
+	} else {
+	  ucs = '?';
+	}
+      } else {
+	if (c1 >= 0xa1 && c1 < 0xff) {
+	  ucs = 0xe3ac + 94 * (c - 0xF5) + (c1 - 0xA1);
+	} else {
+	  ucs = '?';
+	}
+      }
+      i += 3;
+    } else {
+      ucs = '?';
+      i++;
+    }
+    l += XConvertUcsToUtf8(ucs, buffer_return + l);
+  }
+  free(buf);
+  return l;
+}
+
+int
+XConvertEucToUtf8(const char*	locale,
+		  char*		buffer_return, 
+		  int		len, 
+		  int		bytes_buffer) {
+
+  /* if (!locale) { */
+  /* if (!locale || strstr(locale, "UTF") || strstr(locale, "utf")) { */
+  if (!locale || strstr(locale, "UTF") || strstr(locale, "utf")) {
+    return len;
+  }
+
+  if (strstr(locale, "ja")) {	
+    return XConvertEucJpToUtf8(buffer_return, len);
+  } else if (strstr(locale, "Big5") || strstr(locale, "big5")) { /* BIG5 */
+    return XConvertBig5ToUtf8(buffer_return, len);
+  } else if (strstr(locale, "GBK") || strstr(locale, "gbk")) {
+    return XConvertCp936extToUtf8(buffer_return, len);
+  } else if (strstr(locale, "zh") || strstr(locale, "chinese-")) {
+    if (strstr(locale, "TW") || strstr(locale, "chinese-t")) {
+      if (strstr(locale, "EUC") || strstr(locale, "euc") || strstr(locale, "chinese-t")) {
+	return XConvertEucTwToUtf8(buffer_return, len);
+      }
+      return XConvertBig5ToUtf8(buffer_return, len);
+    }
+    if (strstr(locale, "EUC") || strstr(locale, "euc")) {
+      return XConvertEucCnToUtf8(buffer_return, len);
+    }
+    return XConvertGb2312ToUtf8(buffer_return, len);
+  } else if (strstr(locale, "ko")) { 
+    return XConvertEucKrToUtf8(buffer_return, len);
+  }
+  return len;
+}
+
+int
+XUtf8LookupString(XIC                 ic,
+		  XKeyPressedEvent*   event,
+		  char*               buffer_return,
+		  int                 bytes_buffer,
+		  KeySym*             keysym,
+		  Status*             status_return) {
+
+  long ucs = -1;
+  int len;
+  len = XmbLookupString(ic, event, buffer_return, bytes_buffer / 5,
+		        keysym, status_return);
+  if (*status_return == XBufferOverflow) {
+    return len * 5;
+  }
+  if (*keysym > 0 && *keysym < 0x100 && len == 1) {
+    if (*keysym < 0x80) {
+      ucs = (unsigned char)buffer_return[0];
+    } else {
+      ucs = *keysym;
+    }
+  } else  if (((*keysym >= 0x100 && *keysym <= 0xf000) ||
+	      (*keysym & 0xff000000U) == 0x01000000))
+  {
+    ucs = XKeysymToUcs(*keysym);
+  } else {
+    ucs = -2;
+  }
+
+  if (ucs > 0) {
+    len = XConvertUcsToUtf8((unsigned)ucs, (char *)buffer_return);
+  } else if (len > 0) {
+    XIM im;
+    if (!ic) return 0;
+    im = XIMOfIC(ic);
+    if (!im) return 0;
+    len = XConvertEucToUtf8(XLocaleOfIM(im), buffer_return, len, bytes_buffer);	
+  }
+  return len;
+}
+
+#endif /* X11 only */
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/utf8Utils.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utf8Utils.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utf8Utils.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,238 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ * Unicode to UTF-8 conversion functions.
+ */
+
+#if !defined(WIN32) && !defined(__APPLE__)
+
+#include "../../fltk3/Xutf8.h"
+
+/*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
+
+/* 
+ * Converts the first char of the UTF-8 string to an Unicode value 
+ * Returns the byte length of the converted UTF-8 char 
+ * Returns -1 if the UTF-8 string is not valid 
+ */
+int
+XConvertUtf8ToUcs(const unsigned char     *buf,
+		  int                     len,
+		  unsigned int         	  *ucs) {
+
+  if (buf[0] & 0x80) {
+    if (buf[0] & 0x40) {
+      if (buf[0] & 0x20) {
+	if (buf[0] & 0x10) {
+	  if (buf[0] & 0x08) {
+	    if (buf[0] & 0x04) {
+	      if (buf[0] & 0x02) {
+		/* bad UTF-8 string */
+	      } else {
+		/* 0x04000000 - 0x7FFFFFFF */
+	      }	
+	    } else if (len > 4 
+		       && (buf[1] & 0xC0) == 0x80
+		       && (buf[2] & 0xC0) == 0x80
+		       && (buf[3] & 0xC0) == 0x80
+		       && (buf[4] & 0xC0) == 0x80) {
+	      /* 0x00200000 - 0x03FFFFFF */
+	      *ucs =  ((buf[0] & ~0xF8) << 24) +
+		      ((buf[1] & ~0x80) << 18) +
+		      ((buf[2] & ~0x80) << 12) +
+		      ((buf[3] & ~0x80) << 6) +
+		       (buf[4] & ~0x80);
+	      if (*ucs > 0x001FFFFF && *ucs < 0x01000000) return 5;
+	    }
+	  } else if (len > 3 
+		     && (buf[1] & 0xC0) == 0x80
+		     && (buf[2] & 0xC0) == 0x80
+		     && (buf[3] & 0xC0) == 0x80) {
+	    /* 0x00010000 - 0x001FFFFF */
+	    *ucs =  ((buf[0] & ~0xF0) << 18) +
+		    ((buf[1] & ~0x80) << 12) +
+		    ((buf[2] & ~0x80) << 6) +
+		     (buf[3] & ~0x80);
+	    if (*ucs > 0x0000FFFF) return 4;
+	  }
+	} else if (len > 2
+	           && (buf[1] & 0xC0) == 0x80 
+		   && (buf[2] & 0xC0) == 0x80) {
+	  /* 0x00000800 - 0x0000FFFF */
+	  *ucs =  ((buf[0] & ~0xE0) << 12) +
+		  ((buf[1] & ~0x80) << 6) +
+		   (buf[2] & ~0x80);
+	  if (*ucs > 0x000007FF) return 3;
+	}	
+      } else if (len > 1 && (buf[1] & 0xC0) == 0x80) {
+	/* 0x00000080 - 0x000007FF */
+	*ucs = ((buf[0] & ~0xC0) << 6) +
+		(buf[1] & ~0x80);
+	if (*ucs > 0x0000007F) return 2;
+      }
+    }
+  } else if (len > 0) {
+    /* 0x00000000 - 0x0000007F */
+    *ucs = buf[0];
+    return 1;
+  } 
+
+  *ucs = (unsigned int) '?'; /* bad utf-8 string */
+  return -1;
+}
+
+/* 
+ * Converts an Unicode value to an UTF-8 string 
+ * NOTE : the buffer (buf) must be at least 5 bytes long !!!  
+ */
+int 
+XConvertUcsToUtf8(unsigned int 	ucs, 
+		  char 		*buf) {
+
+  if (ucs < 0x000080) {
+    buf[0] = ucs;
+    return 1;
+  } else if (ucs < 0x000800) {
+    buf[0] = 0xC0 | (ucs >> 6);
+    buf[1] = 0x80 | (ucs & 0x3F);
+    return 2;
+  } else if (ucs < 0x010000) { 
+    buf[0] = 0xE0 | (ucs >> 12);
+    buf[1] = 0x80 | ((ucs >> 6) & 0x3F);
+    buf[2] = 0x80 | (ucs & 0x3F);
+    return 3;
+  } else if (ucs < 0x00200000) {
+    buf[0] = 0xF0 | (ucs >> 18);
+    buf[1] = 0x80 | ((ucs >> 12) & 0x3F);
+    buf[2] = 0x80 | ((ucs >> 6) & 0x3F);
+    buf[3] = 0x80 | (ucs & 0x3F);
+    return 4;
+  } else if (ucs < 0x01000000) {
+    buf[0] = 0xF8 | (ucs >> 24);
+    buf[1] = 0x80 | ((ucs >> 18) & 0x3F);
+    buf[2] = 0x80 | ((ucs >> 12) & 0x3F);
+    buf[3] = 0x80 | ((ucs >> 6) & 0x3F);
+    buf[4] = 0x80 | (ucs & 0x3F);
+    return 5;
+  }
+  buf[0] = '?';
+  return -1;
+}
+
+/* 
+ * returns the byte length of the first UTF-8 char 
+ * (returns -1 if not valid) 
+ */
+int
+XUtf8CharByteLen(const unsigned char     *buf,
+		 int                     len) {
+  unsigned int ucs;
+  return XConvertUtf8ToUcs(buf, len, &ucs);
+}
+
+/*
+ * returns the quantity of Unicode chars in the UTF-8 string 
+ */
+int 
+XCountUtf8Char(const unsigned char 	*buf, 
+	       int 			len) {
+
+  int i = 0;
+  int nbc = 0;
+  while (i < len) {
+    int cl = XUtf8CharByteLen(buf + i, len - i);
+    if (cl < 1) cl = 1;
+    nbc++;
+    i += cl;
+  }
+  return nbc;
+}
+
+/* 
+ * Same as XConvertUtf8ToUcs but no sanity check is done.
+ */
+int
+XFastConvertUtf8ToUcs(const unsigned char     *buf,
+		      int                     len,
+		      unsigned int            *ucs) {
+
+  if (buf[0] & 0x80) {
+    if (buf[0] & 0x40) {
+      if (buf[0] & 0x20) {
+	if (buf[0] & 0x10) {
+	  if (buf[0] & 0x08) {
+	    if (buf[0] & 0x04) {
+	      if (buf[0] & 0x02) {
+		/* bad UTF-8 string */
+	      } else {
+		/* 0x04000000 - 0x7FFFFFFF */
+	      }	
+	    } else if (len > 4) {
+	      /* 0x00200000 - 0x03FFFFFF */
+	      *ucs =  ((buf[0] & ~0xF8) << 24) +
+		      ((buf[1] & ~0x80) << 18) +
+		      ((buf[2] & ~0x80) << 12) +
+		      ((buf[3] & ~0x80) << 6) +
+		       (buf[4] & ~0x80);
+	      return 5;
+	    }
+	  } else if (len > 3) {
+	    /* 0x00010000 - 0x001FFFFF */
+	    *ucs =  ((buf[0] & ~0xF0) << 18) +
+		    ((buf[1] & ~0x80) << 12) +
+		    ((buf[2] & ~0x80) << 6) +
+		     (buf[3] & ~0x80);
+	    return 4;
+	  }
+	} else if (len > 2) {
+	  /* 0x00000800 - 0x0000FFFF */
+	  *ucs =  ((buf[0] & ~0xE0) << 12) +
+		  ((buf[1] & ~0x80) << 6) +
+		   (buf[2] & ~0x80);
+	  return 3;
+	}	
+      } else if (len > 1) {
+	/* 0x00000080 - 0x000007FF */
+	*ucs = ((buf[0] & ~0xC0) << 6) +
+		(buf[1] & ~0x80);
+	return 2;
+      }
+    }
+  } else if (len > 0) {
+    /* 0x00000000 - 0x0000007F */
+    *ucs = buf[0];
+    return 1;
+  } 
+
+  *ucs = (unsigned int) '?'; /* bad utf-8 string */
+  return -1;
+}
+
+#endif /* X11 only */
+
+/*
+ * End of "$Id: $".
+ */

Added: branches/branch-3.0/src/core/xutf8/utf8Wrap.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utf8Wrap.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utf8Wrap.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,1049 @@
+/* "$Id$"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ * X11 UTF-8 text drawing functions.
+ */
+#if !defined(WIN32) && !defined(__APPLE__)
+
+#include "../../fltk3/Xutf8.h"
+#include <X11/Xlib.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+/* External auto generated functions : */
+#include "ucs2fontmap.c"
+/*
+ * extern int ucs2fontmap(char *s, unsigned int ucs, int enc);
+ * extern int encoding_number(const char *enc);
+ * extern const char *encoding_name(int num);
+ */
+
+/* The ARM header files have a bug by not taking into account that ARM cpu
+ * likes pacing to 4 bytes. This little trick defines our own version of
+ * XChar2b which does not have this problem
+ */
+
+#if defined(__GNUC__) && defined(__arm__) && !defined(__ARM_EABI__)
+typedef struct {
+  unsigned char byte1;
+  unsigned char byte2;
+}
+__attribute__ ((packed))
+Fl_XChar2b;
+#else
+#define Fl_XChar2b XChar2b
+#endif
+
+
+/*********************************************************************/
+/** extract a list of font from the base font name list             **/
+/*********************************************************************/
+static int
+get_font_list(
+	const char	*base_font_name_list,
+	char 		***flist) {
+  const char *ptr;
+  const char *p;
+  int nb;
+  int nb_name;
+
+  ptr = base_font_name_list;
+  p = NULL;
+  nb = 0;
+  nb_name = 1;
+
+  while (*ptr) {
+    if (*ptr == ',') nb_name++;
+    ptr++;
+  }
+
+  *flist = (char **) malloc(sizeof(char*) * nb_name);
+  ptr = base_font_name_list;
+
+  while (*ptr) {
+    int l = 0, i = 0;
+
+    while(isspace(*ptr)) ptr++;
+    p = ptr;
+    while (*ptr && *ptr != ',') { ptr++; l++; }
+    if (l > 2) {
+      (*flist)[nb] = (char*) malloc((unsigned)l + 2);
+      while (p != ptr) { ((*flist)[nb])[i] = *p; i++; p++; }
+      (*flist)[nb][i] = '\0';
+      nb++;
+    }
+    if (*ptr) ptr++;
+  }
+  if (nb < 1) {
+    free(*flist);
+    *flist = (char**)NULL;
+  }
+  return nb;
+}
+
+/*********************************************************************/
+/** get the font name used as encoding for "fontspecific" encoding  **/
+/** (mainly used for adobe-symbol and adobe-zapfdingbats)	    **/
+/*********************************************************************/
+static int
+font_spec_enc(char *font) {
+  int ret;
+  char *enc;
+  char *end;
+
+  enc = font;
+  while (*enc != '-') enc++;
+  enc++;
+  while (*enc != '-') enc++;
+  enc++;
+  end = enc;
+  while (*end != '-') end++;
+  *end = '\0';
+
+  ret = encoding_number(enc);
+  *end = '-';
+
+  return ret;
+}
+
+
+/*********************************************************************/
+/** get the sub range of a iso10646-1 font			    **/
+/*********************************************************************/
+static void
+get_range(const char	*enc,
+	  int 		*min,
+	  int		*max) {
+
+  const char *ptr = enc;
+  const char *ptr1;
+
+  if (!enc) return;
+
+  while (*ptr && *ptr != '-') ptr++;
+  if (!*ptr) return;
+  while (*ptr && *ptr != '[') ptr++;
+  if (!*ptr) return;
+  *min = 0xFFFF;
+  *max = 0;
+  while (*ptr && *ptr != ']') {
+    int val;
+    ptr++;
+    ptr1 = ptr;
+    while (*ptr && *ptr != ']' && *ptr != ' ' && *ptr != '_') ptr++;
+    val = strtol(ptr1, NULL, 0);
+    if (val < *min) *min = val;
+    if (val > *max) *max = val;
+  }
+}
+
+/*********************************************************************/
+/** get the internal encoding number of each fonts 		    **/
+/*********************************************************************/
+static int *
+get_encodings(char	**font_name_list,
+	      int 	*ranges,
+	      int 	nb_font) {
+
+  int *font_encoding_list;
+  int i;
+  i = 0;
+
+  font_encoding_list = (int *) malloc(sizeof(int) * nb_font);
+  while (i < nb_font) {
+    char *ptr;
+    int ec;
+    ptr = font_name_list[i];
+    ec = 0;
+    font_encoding_list[i] = -1;
+    ranges[i * 2] = 0;
+    ranges[i * 2 + 1] = 0xFFFF;
+
+    if (ptr && strstr(ptr, "fontspecific")) {
+      font_encoding_list[i] = font_spec_enc(ptr);
+      ptr = NULL;
+    }
+    while (ptr && *ptr) {
+      if (*ptr == '-') {
+	ec++;
+	if (ec == 13) {
+	  font_encoding_list[i] = encoding_number(ptr + 1);
+	  if (font_encoding_list[i] == 0) {
+	    get_range(ptr + 1,
+		      ranges + i * 2,
+		      ranges + i * 2 + 1);
+	  }
+	  break;
+	}
+      }
+      ptr++;
+    }
+    if (font_encoding_list[i] < 0) font_encoding_list[i] = 1;
+    i++;
+  }
+  return font_encoding_list;
+}
+
+/*********************************************************************/
+/** find the first font which matches the name and load it.	    **/
+/*********************************************************************/
+XFontStruct *
+find_best_font(Display  *dpy,
+	       char     **name) {
+
+  char **list;
+  int cnt;
+  XFontStruct *s;
+
+  list = XListFonts(dpy, *name, 1, &cnt);
+  if (cnt && list) {
+    free(*name);
+    *name = strdup(list[0]);
+    s = XLoadQueryFont(dpy, *name);
+    XFreeFontNames(list);
+    return s;
+  }
+  return NULL;
+}
+
+/*********************************************************************/
+/** load all fonts 						    **/
+/*********************************************************************/
+static void
+load_fonts(Display 	   *dpy,
+	   XUtf8FontStruct *font_set) {
+
+  int i;
+  char **list;
+
+  i = 0;
+  list = NULL;
+
+  font_set->fonts = (XFontStruct**) malloc(sizeof(XFontStruct*) *
+                                           font_set->nb_font);
+
+  font_set->ranges = (int*) malloc(sizeof(int) *
+                                   font_set->nb_font * 2);
+
+  font_set->descent = 0;
+  font_set->ascent = 0;
+  font_set->fid = 0;
+
+  while (i < font_set->nb_font) {
+    XFontStruct *fnt;
+
+    fnt = font_set->fonts[i] =
+      find_best_font(dpy, &(font_set->font_name_list[i]));
+    if (fnt) {
+      font_set->fid = fnt->fid;
+      if (fnt->ascent > font_set->ascent) {
+	font_set->ascent = fnt->ascent;
+      }
+      if (fnt->descent > font_set->descent) {
+	font_set->descent = fnt->descent;
+      }
+    } else {
+      free(font_set->font_name_list[i]);
+      font_set->font_name_list[i] = NULL;
+    }
+    i++;
+  }
+
+  font_set->encodings =
+    get_encodings(font_set->font_name_list,
+      font_set->ranges, font_set->nb_font);
+
+  /* unload fonts with same encoding */
+  for (i = 0; i < font_set->nb_font; i++) {
+    if (font_set->font_name_list[i]) {
+      int j;
+      for (j = 0; j < i; j++) {
+	if (font_set->font_name_list[j] &&
+	    font_set->encodings[j] ==
+	    font_set->encodings[i] &&
+	    font_set->ranges[2*j] ==
+	    font_set->ranges[2*i] &&
+	    font_set->ranges[(2*j)+1] &&
+	    font_set->ranges[(2*i)+1]) {
+	  XFreeFont(dpy, font_set->fonts[i]);
+	  free(font_set->font_name_list[i]);
+	  font_set->font_name_list[i] = NULL;
+	  font_set->fonts[i] = 0;
+	}
+      }
+    }
+  }
+}
+
+/*********************************************************************/
+/** Creates an array of XFontStruct acording to the comma separated **/
+/** list of fonts. XLoad all fonts.				    **/
+/*********************************************************************/
+XUtf8FontStruct *
+XCreateUtf8FontStruct(Display    *dpy,
+		      const char *base_font_name_list) {
+
+  XUtf8FontStruct *font_set;
+
+  font_set = (XUtf8FontStruct*)malloc(sizeof(XUtf8FontStruct));
+
+  if (!font_set) {
+    return NULL;
+  }
+
+  font_set->nb_font = get_font_list(base_font_name_list,
+				    &font_set->font_name_list);
+
+  if (font_set->nb_font < 1) {
+    free(font_set);
+    return NULL;
+  }
+
+  load_fonts(dpy, font_set);
+
+  return font_set;
+}
+
+
+/*****************************************************************************/
+/** draw a Right To Left UTF-8 string using multiple fonts as needed.	    **/
+/*****************************************************************************/
+void
+XUtf8DrawRtlString(Display 		*display,
+		   Drawable 		d,
+		   XUtf8FontStruct 	*font_set,
+		   GC 			gc,
+		   int 			x,
+		   int 			y,
+		   const char		*string,
+		   int 			num_bytes) {
+
+  int 		*encodings;	/* encodings array */
+  XFontStruct 	**fonts;	/* fonts array */
+  Fl_XChar2b 	buf[128];	/* drawing buffer */
+  Fl_XChar2b	*ptr;		/* pointer to the drawing buffer */
+  int 		fnum;		/* index of the current font in the fonts array*/
+  int 		i;		/* current byte in the XChar2b buffer */
+  int 		first;		/* first valid font index */
+  int 		last_fnum;	/* font index of the previous char */
+  int 		nb_font;	/* quantity of fonts in the font array */
+  char 		glyph[2];	/* byte1 and byte2 value of the UTF-8 char */
+  int		*ranges;	/* sub range of iso10646 */
+
+  nb_font = font_set->nb_font;
+
+  if (nb_font < 1) {
+    /* there is no font in the font_set :-( */
+    return;
+  }
+
+  ranges = font_set->ranges;
+  fonts = font_set->fonts;
+  encodings = font_set->encodings;
+  i = 0;
+  fnum = 0;
+  ptr = buf + 128;
+
+  while(fnum < nb_font && !fonts[fnum]) fnum++;
+  if (fnum >= nb_font) {
+    /* there is no valid font for the X server */
+    return;
+  }
+
+  first = fnum;
+  last_fnum = fnum;
+
+  while (num_bytes > 0) {
+    int 	 ulen;   /* byte length of the UTF-8 char */
+    unsigned int ucs;    /* Unicode value of the UTF-8 char */
+    unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
+
+    if (i > 120) {
+      /*** draw the buffer **/
+      XSetFont(display, gc, fonts[fnum]->fid);
+      x -= XTextWidth16(fonts[fnum], ptr, i);
+      XDrawString16(display, d, gc, x, y, ptr, i);
+      i = 0;
+      ptr = buf + 128;
+    }
+
+    ulen = XFastConvertUtf8ToUcs((unsigned char*)string, num_bytes, &ucs);
+
+    if (ulen < 1) ulen = 1;
+
+    no_spc = XUtf8IsNonSpacing(ucs);
+    if (no_spc) ucs = no_spc;
+
+    /*
+     * find the first encoding which can be used to
+     * draw the glyph
+     */
+    fnum = first;
+    while (fnum < nb_font) {
+      if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+	if (encodings[fnum] != 0 ||
+	    (ucs >= ranges[fnum * 2] && ucs <= ranges[fnum * 2 + 1])) {
+	  break;
+	}
+      }
+      fnum++;
+    }
+    if (fnum == nb_font) {
+      /* the char is not valid in all encodings ->
+       * draw it using the first font :-(
+       */
+      fnum = first;
+      ucs2fontmap(glyph, '?', encodings[fnum]);
+    }
+
+    if (last_fnum != fnum || no_spc) {
+      XSetFont(display, gc, fonts[last_fnum]->fid);
+      x -= XTextWidth16(fonts[last_fnum], ptr, i);
+      XDrawString16(display, d, gc, x, y, ptr, i);
+      i = 0;
+      ptr = buf + 127;
+      (*ptr).byte1 = glyph[0];
+      (*ptr).byte2 = glyph[1];
+      if (no_spc) {
+	x += XTextWidth16(fonts[fnum], ptr, 1);
+      }
+    } else {
+      ptr--;
+      (*ptr).byte1 = glyph[0];
+      (*ptr).byte2 = glyph[1];
+    }
+    last_fnum = fnum;
+    i++;
+    string += ulen;
+    num_bytes -= ulen;
+  }
+
+  if (i < 1) return;
+
+  XSetFont(display, gc, fonts[fnum]->fid);
+  x -= XTextWidth16(fonts[last_fnum], ptr, i);
+  XDrawString16(display, d, gc, x, y, ptr, i);
+}
+
+
+/*****************************************************************************/
+/** draw an UTF-8 string using multiple fonts as needed.		    **/
+/*****************************************************************************/
+void
+XUtf8DrawString(Display 	*display,
+	        Drawable 	d,
+                XUtf8FontStruct *font_set,
+	        GC 		gc,
+	        int 		x,
+	        int 		y,
+	        const char	*string,
+                int 		num_bytes) {
+
+  int 		*encodings; /* encodings array */
+  XFontStruct 	**fonts;    /* fonts array */
+  Fl_XChar2b 	buf[128];   /* drawing buffer */
+  int 		fnum;       /* index of the current font in the fonts array*/
+  int 		i;          /* current byte in the XChar2b buffer */
+  int 		first;      /* first valid font index */
+  int 		last_fnum;  /* font index of the previous char */
+  int 		nb_font;    /* quantity of fonts in the font array */
+  char 		glyph[2];   /* byte1 and byte2 value of the UTF-8 char */
+  int		*ranges;    /* sub range of iso10646 */
+
+  nb_font = font_set->nb_font;
+
+  if (nb_font < 1) {
+    /* there is no font in the font_set :-( */
+    return;
+  }
+  ranges = font_set->ranges;
+  fonts = font_set->fonts;
+  encodings = font_set->encodings;
+  i = 0;
+  fnum = 0;
+
+  while(fnum < nb_font && !fonts[fnum]) fnum++;
+  if (fnum >= nb_font) {
+    /* there is no valid font for the X server */
+    return;
+  }
+
+  first = fnum;
+  last_fnum = fnum;
+
+  while (num_bytes > 0) {
+    int 	 ulen;   /* byte length of the UTF-8 char */
+    unsigned int ucs;    /* Unicode value of the UTF-8 char */
+    unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
+
+    if (i > 120) {
+      /*** draw the buffer **/
+      XSetFont(display, gc, fonts[fnum]->fid);
+      XDrawString16(display, d, gc, x, y, buf, i);
+      x += XTextWidth16(fonts[fnum], buf, i);
+      i = 0;
+    }
+
+    ulen = XFastConvertUtf8ToUcs((unsigned char*)string, num_bytes, &ucs);
+
+    if (ulen < 1) ulen = 1;
+
+    no_spc = XUtf8IsNonSpacing(ucs);
+    if (no_spc) ucs = no_spc;
+
+    /*
+     * find the first encoding which can be used to
+     * draw the glyph
+     */
+    fnum = first;
+    while (fnum < nb_font) {
+      if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+	if (encodings[fnum] != 0 ||
+	    (ucs >= ranges[fnum * 2] &&
+	    ucs <= ranges[fnum * 2 + 1])) {
+	  break;
+	}
+      }
+      fnum++;
+    }
+    if (fnum == nb_font) {
+      /* the char is not valid in all encodings ->
+       * draw it using the first font :-(
+       */
+      fnum = first;
+      ucs2fontmap(glyph, '?', encodings[fnum]);
+    }
+
+    if (last_fnum != fnum || no_spc) {
+      XSetFont(display, gc, fonts[last_fnum]->fid);
+      XDrawString16(display, d, gc, x, y, buf, i);
+      x += XTextWidth16(fonts[last_fnum], buf, i);
+      i = 0;
+      (*buf).byte1 = glyph[0];
+      (*buf).byte2 = glyph[1];
+      if (no_spc) {
+	x -= XTextWidth16(fonts[fnum], buf, 1);
+      }
+    } else {
+      (*(buf + i)).byte1 = glyph[0];
+      (*(buf + i)).byte2 = glyph[1];
+    }
+    last_fnum = fnum;
+    i++;
+    string += ulen;
+    num_bytes -= ulen;
+  }
+
+  XSetFont(display, gc, fonts[fnum]->fid);
+  XDrawString16(display, d, gc, x, y, buf, i);
+}
+
+
+/*****************************************************************************/
+/** Measure the inked extents of a UTF-8 string using multiple fonts as     **/
+/** needed. Tries to mirror the behaviour of the draw function              **/
+/** XUtf8DrawString() as closely as possible to get consistent sizes.       **/
+/*****************************************************************************/
+void
+XUtf8_measure_extents(
+        Display         	*display,
+        Drawable        	d,
+        XUtf8FontStruct  *font_set,
+        GC              	gc,
+        int             	*xx,     /* x-offset from origin */
+        int             	*yy,     /* y-offset from origin */
+        int             	*ww,     /* overall inked width  */
+        int             	*hh,     /* maximum inked height */
+        const char      	*string, /* text to measure */
+        int             	num_bytes) {
+  int 		*encodings; /* encodings array */
+  XFontStruct 	**fonts;    /* fonts array */
+  Fl_XChar2b 	buf[128];   /* drawing buffer */
+  int 		fnum;       /* index of the current font in the fonts array*/
+  int 		i;          /* current byte in the XChar2b buffer */
+  int 		first;      /* first valid font index */
+  int 		last_fnum;  /* font index of the previous char */
+  int 		nb_font;    /* quantity of fonts in the font array */
+  char 		glyph[2];   /* byte1 and byte2 value of the UTF-8 char */
+  int		*ranges;    /* sub range of iso10646 */
+
+  int wd = 0; /* accumulates the width of the text */
+  int ht = 0; /* used to find max height in text */
+  int hs;     /* "height sum" of current text segment */
+  int yt = 0x7FFFFFFF; /* used to find bounding rectangle delta-y */
+  int res; /* result from calling XTextExtents16() - we should test this is OK! */
+
+  XCharStruct sizes;
+  int dir_ret = 0;
+  int fnt_asc = 0;
+  int fnt_dsc = 0;
+
+  nb_font = font_set->nb_font;
+
+  if (nb_font < 1) {
+    /* there is no font in the font_set :-( */
+    return;
+  }
+  ranges = font_set->ranges;
+  fonts = font_set->fonts;
+  encodings = font_set->encodings;
+  i = 0;
+  fnum = 0;
+
+  while(fnum < nb_font && !fonts[fnum]) fnum++;
+  if (fnum >= nb_font) {
+    /* there is no valid font for the X server */
+    return;
+  }
+
+  first = fnum;
+  last_fnum = fnum;
+
+  while (num_bytes > 0) {
+    int 	 ulen;   /* byte length of the UTF-8 char */
+    unsigned int ucs;    /* Unicode value of the UTF-8 char */
+    unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
+
+    if (i > 120) {
+      /*** draw the buffer **/
+      XSetFont(display, gc, fonts[fnum]->fid);
+      res = XTextExtents16(fonts[fnum], buf, i, &dir_ret, &fnt_asc, &fnt_dsc, &sizes);
+      /* recover the dimensions - should verify that res == 0 first! */
+      wd += sizes.width; /* accumulate the width */
+      hs = sizes.ascent + sizes.descent; /* total height */
+      if(hs > ht) ht = hs; /* new height exceeds previous height */
+      if(yt > (-sizes.ascent)) yt = -sizes.ascent; /* delta y offset */
+      i = 0;
+    }
+
+    ulen = XFastConvertUtf8ToUcs((unsigned char*)string, num_bytes, &ucs);
+
+    if (ulen < 1) ulen = 1;
+
+    no_spc = XUtf8IsNonSpacing(ucs);
+    if (no_spc) ucs = no_spc;
+
+    /*
+     * find the first encoding which can be used to
+     * draw the glyph
+     */
+    fnum = first;
+    while (fnum < nb_font) {
+      if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+	if (encodings[fnum] != 0 ||
+	    (ucs >= ranges[fnum * 2] &&
+	    ucs <= ranges[fnum * 2 + 1])) {
+	  break;
+	}
+      }
+      fnum++;
+    }
+    if (fnum == nb_font) {
+      /* the char is not valid in all encodings ->
+       * draw it using the first font :-(
+       */
+      fnum = first;
+      ucs2fontmap(glyph, '?', encodings[fnum]);
+    }
+
+    if (last_fnum != fnum || no_spc) {
+      XSetFont(display, gc, fonts[last_fnum]->fid);
+      res = XTextExtents16(fonts[last_fnum], buf, i, &dir_ret, &fnt_asc, &fnt_dsc, &sizes);
+      /* recover the dimensions - should verify that res == 0 first! */
+      wd += sizes.width; /* accumulate the width */
+      hs = sizes.ascent + sizes.descent; /* total height */
+      if(hs > ht) ht = hs; /* new height exceeds previous height */
+      if(yt > (-sizes.ascent)) yt = -sizes.ascent; /* delta y offset */
+      i = 0;
+      (*buf).byte1 = glyph[0];
+      (*buf).byte2 = glyph[1];
+      if (no_spc) {
+	wd -= XTextWidth16(fonts[fnum], buf, 1);
+      }
+    } else {
+      (*(buf + i)).byte1 = glyph[0];
+      (*(buf + i)).byte2 = glyph[1];
+    }
+    last_fnum = fnum;
+    i++;
+    string += ulen;
+    num_bytes -= ulen;
+  }
+
+  XSetFont(display, gc, fonts[fnum]->fid);
+  res = XTextExtents16(fonts[fnum], buf, i, &dir_ret, &fnt_asc, &fnt_dsc, &sizes);
+  /* recover the dimensions - should verify that res == 0 first! */
+  wd += sizes.width; /* accumulate the width */
+  hs = sizes.ascent + sizes.descent; /* total height */
+  if(hs > ht) ht = hs; /* new height exceeds previous height */
+  if(yt > (-sizes.ascent)) yt = -sizes.ascent; /* delta y offset */
+  /* return values */
+  *ww = wd; /* width of inked area rectangle */
+  *hh = ht; /* max height of inked area rectangle */
+  *xx = 0;  /* x-offset from origin to start of inked area - this is wrong! */
+  *yy = yt; /* y-offset from origin to start of inked rectangle */
+}
+
+
+/*****************************************************************************/
+/** returns the pixel width of a UTF-8 string				    **/
+/*****************************************************************************/
+int
+XUtf8TextWidth(XUtf8FontStruct 	*font_set,
+	       const char 	*string,
+	       int 		num_bytes) {
+
+  int		x;
+  int 		*encodings; /* encodings array */
+  XFontStruct 	**fonts;    /* fonts array */
+  Fl_XChar2b 	buf[128];   /* drawing buffer */
+  int 		fnum;       /* index of the current font in the fonts array*/
+  int 		i;          /* current byte in the XChar2b buffer */
+  int 		first;      /* first valid font index */
+  int 		last_fnum;  /* font index of the previous char */
+  int 		nb_font;    /* quantity of fonts in the font array */
+  char 		glyph[2];   /* byte1 and byte2 value of the UTF-8 char */
+  int		*ranges;    /* sub range of iso10646 */
+
+  nb_font = font_set->nb_font;
+  x = 0;
+
+  if (nb_font < 1) {
+    /* there is no font in the font_set :-( */
+    return x;
+  }
+
+  ranges = font_set->ranges;
+  fonts = font_set->fonts;
+  encodings = font_set->encodings;
+  i = 0;
+  fnum = 0;
+
+  while(fnum < nb_font && !fonts[fnum]) fnum++;
+  if (fnum >= nb_font) {
+    /* there is no valid font for the X server */
+    return x;
+  }
+
+  first = fnum;
+  last_fnum = fnum;
+
+  while (num_bytes > 0) {
+    int 	 ulen;   /* byte length of the UTF-8 char */
+    unsigned int ucs;    /* Unicode value of the UTF-8 char */
+    unsigned int no_spc; /* Spacing char equivalent of a non-spacing char */
+
+    if (i > 120) {
+      /*** measure the buffer **/
+      x += XTextWidth16(fonts[fnum], buf, i);
+      i = 0;
+    }
+
+    ulen = XFastConvertUtf8ToUcs((unsigned char*)string, num_bytes, &ucs);
+
+    if (ulen < 1) ulen = 1;
+
+    no_spc = XUtf8IsNonSpacing(ucs);
+    if (no_spc) {
+      ucs = no_spc;
+    }
+
+    /*
+     * find the first encoding which can be used to
+     * draw the glyph
+     */
+    fnum = first;
+    while (fnum < nb_font) {
+      if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+	if (encodings[fnum] != 0 ||
+		(ucs >= ranges[fnum * 2] &&
+		ucs <= ranges[fnum * 2 + 1])) {
+	  break;
+	}
+      }
+      fnum++;
+    }
+    if (fnum == nb_font) {
+      /* the char is not valid in all encodings ->
+       * draw it using the first font :-(
+       */
+      fnum = first;
+      ucs2fontmap(glyph, '?', encodings[fnum]);
+    }
+
+    if (last_fnum != fnum || no_spc) {
+      x += XTextWidth16(fonts[last_fnum], buf, i);
+      i = 0;
+      (*buf).byte1 = glyph[0];
+      (*buf).byte2 = glyph[1];
+      if (no_spc) {
+	/* go back to draw the non-spacing char over the previous char */
+	x -= XTextWidth16(fonts[fnum], buf, 1);
+      }
+    } else {
+      (*(buf + i)).byte1 = glyph[0];
+      (*(buf + i)).byte2 = glyph[1];
+    }
+    last_fnum = fnum;
+    i++;
+    string += ulen;
+    num_bytes -= ulen;
+  }
+
+  x += XTextWidth16(fonts[last_fnum], buf, i);
+
+  return x;
+}
+
+/*****************************************************************************/
+/**  get the X font and glyph ID of a UCS char                              **/
+/*****************************************************************************/
+int
+XGetUtf8FontAndGlyph(XUtf8FontStruct  *font_set,
+		     unsigned int     ucs,
+		     XFontStruct      **fnt,
+		     unsigned short   *id) {
+
+  int             x;
+  int             *encodings; /* encodings array */
+  XFontStruct     **fonts;    /* fonts array */
+  int             fnum;       /* index of the current font in the fonts array*/
+  int             i;          /* current byte in the XChar2b buffer */
+  int             first;      /* first valid font index */
+  int             last_fnum;  /* font index of the previous char */
+  int             nb_font;    /* quantity of fonts in the font array */
+  char 		  glyph[2];   /* byte1 and byte2 value of the UTF-8 char */
+  int             *ranges;    /* sub range of iso10646 */
+
+  nb_font = font_set->nb_font;
+  x = 0;
+
+  if (nb_font < 1) {
+    /* there is no font in the font_set :-( */
+    return -1;
+  }
+
+  ranges = font_set->ranges;
+  fonts = font_set->fonts;
+  encodings = font_set->encodings;
+  i = 0;
+  fnum = 0;
+
+  while(fnum < nb_font && !fonts[fnum]) fnum++;
+  if (fnum >= nb_font) {
+    /* there is no valid font for the X server */
+    return -1;
+  }
+
+  first = fnum;
+  last_fnum = fnum;
+
+  /*
+   * find the first encoding which can be used to
+   * draw the glyph
+   */
+  fnum = first;
+  while (fnum < nb_font) {
+    if (fonts[fnum] && ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+      if (encodings[fnum] != 0 ||
+          (ucs >= ranges[fnum * 2] &&
+	  ucs <= ranges[fnum * 2 + 1])) {
+	break;
+      }
+    }
+    fnum++;
+  }
+  if (fnum == nb_font) {
+    /* the char is not valid in all encodings ->
+     * draw it using the first font :-(
+     */
+    fnum = first;
+    ucs2fontmap(glyph, '?', encodings[fnum]);
+  }
+
+  *id = ((unsigned char)glyph[0] << 8) | (unsigned char)glyph[1] ;
+  *fnt = fonts[fnum];
+  return 0;
+}
+
+/*****************************************************************************/
+/** returns the pixel width of a UCS char				    **/
+/*****************************************************************************/
+int
+XUtf8UcsWidth(XUtf8FontStruct  *font_set,
+	      unsigned int     ucs) {
+
+  int		x;
+  int 		*encodings; /* encodings array */
+  XFontStruct 	**fonts;    /* fonts array */
+  Fl_XChar2b 	buf[8];     /* drawing buffer */
+  int 		fnum;       /* index of the current font in the fonts array*/
+  int 		i;          /* current byte in the XChar2b buffer */
+  int 		first;      /* first valid font index */
+  int 		last_fnum;  /* font index of the previous char */
+  int 		nb_font;    /* quantity of fonts in the font array */
+  char 		glyph[2];   /* byte1 and byte2 value of the UTF-8 char */
+  int		*ranges;    /* sub range of iso10646 */
+
+  nb_font = font_set->nb_font;
+  x = 0;
+
+  if (nb_font < 1) {
+    /* there is no font in the font_set :-( */
+    return x;
+  }
+
+  ranges = font_set->ranges;
+  fonts = font_set->fonts;
+  encodings = font_set->encodings;
+  i = 0;
+  fnum = 0;
+
+  while(fnum < nb_font && !fonts[fnum]) fnum++;
+  if (fnum >= nb_font) {
+    /* there is no valid font for the X server */
+    return x;
+  }
+
+  first = fnum;
+  last_fnum = fnum;
+
+  ucs = XUtf8IsNonSpacing(ucs);
+
+  /*
+   * find the first encoding which can be used to
+   * draw the glyph
+   */
+  fnum = first;
+  while (fnum < nb_font) {
+    if (fonts[fnum] &&
+	ucs2fontmap(glyph, ucs, encodings[fnum]) >= 0) {
+      if (encodings[fnum] != 0 || (ucs >= ranges[fnum * 2] &&
+	  ucs <= ranges[fnum * 2 + 1])) {
+	break;
+      }
+    }
+    fnum++;
+  }
+  if (fnum == nb_font) {
+    /* the char is not valid in all encodings ->
+     * draw it using the first font :-(
+     */
+    fnum = first;
+    ucs2fontmap(glyph, '?', encodings[fnum]);
+  }
+
+  (*buf).byte1 = glyph[0];
+  (*buf).byte2 = glyph[1];
+
+  x += XTextWidth16(fonts[fnum], buf, 1);
+
+  return x;
+}
+
+/*****************************************************************************/
+/** draw an UTF-8 string and clear the background.	 		    **/
+/*****************************************************************************/
+void
+XUtf8DrawImageString(Display         *display,
+		     Drawable        d,
+		     XUtf8FontStruct *font_set,
+		     GC              gc,
+		     int             x,
+		     int             y,
+		     const char      *string,
+		     int             num_bytes) {
+
+  /* FIXME: must be improved ! */
+  int w;
+  int fill_style;
+  unsigned long foreground;
+  unsigned long background;
+  int function;
+  XGCValues xgcv;
+
+  w = XUtf8TextWidth(font_set, string, num_bytes);
+
+  XGetGCValues(display, gc,
+	       GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
+
+  function = xgcv.function;
+  fill_style = xgcv.fill_style;
+  foreground = xgcv.foreground;
+  background = xgcv.background;
+
+  xgcv.function = GXcopy;
+  xgcv.foreground = background;
+  xgcv.background = foreground;
+  xgcv.fill_style = FillSolid;
+
+  XChangeGC(display, gc,
+	    GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
+
+  XFillRectangle(display, d, gc, x, y - font_set->ascent,
+	         (unsigned)w, (unsigned)(font_set->ascent + font_set->descent));
+
+  xgcv.function = function;
+  xgcv.foreground = foreground;
+  xgcv.background = background;
+  xgcv.fill_style = fill_style;
+
+  XChangeGC(display, gc,
+	    GCFunction|GCForeground|GCBackground|GCFillStyle, &xgcv);
+
+  XUtf8DrawString(display, d, font_set, gc, x, y, string, num_bytes);
+}
+
+/*****************************************************************************/
+/** free the XFontSet and others things created by XCreateUtf8FontSet       **/
+/*****************************************************************************/
+void
+XFreeUtf8FontStruct(Display 	    *dpy,
+		    XUtf8FontStruct *font_set) {
+
+  int i;
+  i = 0;
+  while (i < font_set->nb_font) {
+    if (font_set->fonts[i]) {
+	XFreeFont(dpy, font_set->fonts[i]);
+	free(font_set->font_name_list[i]);
+    }
+    i++;
+  }
+  free(font_set->ranges);
+  free(font_set->font_name_list);
+  free(font_set->fonts);
+  free(font_set->encodings);
+  free(font_set);
+}
+
+#endif /* X11 only */
+
+/*
+ *  End of "$Id$".
+ */


Property changes on: branches/branch-3.0/src/core/xutf8/utf8Wrap.c
___________________________________________________________________
Name: svn:keywords
   + ID
Name: svn:eol-style
   + native

Added: branches/branch-3.0/src/core/xutf8/utils/INSTALL
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/INSTALL	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/INSTALL	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,26 @@
+
+Default install :
+
+        tar -xvzf Xutf8.tar.gz
+        cd Xutf8
+        ./configure --prefix=/usr
+	su -c "make install"
+
+
+
+Install with tables generation :
+
+	You must have a copy of http://www.unicode.org/Public/MAPPINGS/ in
+	the ./MAPPINGS/ directory and a copy of UnicodeData-2.txt in ./
+	to generate the conversion tables.
+
+	To add a table, edit utils/tbl_gen.sh and utils/convert_map.c.
+
+	tar -xvzf Xutf8.tar.gz
+	cd Xutf8
+	./configure
+	cd utils
+	make
+	cd ..
+	su -c "make install"
+		

Added: branches/branch-3.0/src/core/xutf8/utils/Makefile
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/Makefile	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/Makefile	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,22 @@
+euc_tw: euc_tw.c
+	gcc  euc_tw.c -o  euc_tw
+
+all: convert_map create_table conv_gen  
+	./tbl_gen.sh
+	./non_spacing.sh
+	./case.sh
+
+conv_gen: conv_gen.c
+	gcc conv_gen.c -o conv_gen
+
+convert_map: convert_map.c
+	gcc convert_map.c -o convert_map
+
+create_table: create_table.c
+	gcc create_table.c -o create_table
+
+clean:
+	rm -f *.o convert_map create_table conv_gen euc_tw
+
+	
+

Added: branches/branch-3.0/src/core/xutf8/utils/README
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/README	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/README	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,14 @@
+tbl_gen.sh :
+        shell script that convert unicode.org mappings tables to c headers.
+        Also creates unicode2fontmap.c.
+
+conv_gen.c:
+        create unicode2fontmap.c functions.
+
+convert_map.c:
+        convert diffrent unicode.org mappings to a unique format.
+
+create_table.c:
+        convert text files created by convert_map.c to to c tables.
+
+

Added: branches/branch-3.0/src/core/xutf8/utils/case.sh
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/case.sh	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/case.sh	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+
+nopsc=`grep 'CAPITAL' ../UnicodeData-2.txt`
+
+IFS="
+"
+
+#echo "#
+# List of case chars
+#
+# 
+#       Format:  Three tab-separated columns
+#                Column #1 is the non-spacing Unicode (in hex as 0xXXXX)
+#                Column #2 is the spacing Unicode (in hex as 0xXXXX)
+#                Column #3 the Unicode name (follows a comment sign, '#')
+# " > case.txt
+
+rm -f case.txt
+
+
+for line in ${nopsc}
+do
+	ucs=`echo ${line} | cut -d\; -f1`
+	name=`echo ${line} | cut -d\; -f2 | cut -d\; -f1| sed s/CAPITAL/SMALL/`
+	small=`grep ";${name};" ../UnicodeData-2.txt` 
+	if test "X${small}" != X ;then
+		tbl=`echo ${small} | cut -d\; -f1`
+	#	echo "0x${ucs}	0x${tbl}	#	${name}" >> space.txt
+		echo "/* U+${ucs} */ 0x${tbl}," >> case.txt
+	else
+	#	echo "0x${ucs}	0x${ucs}	#	${name}" >> space.txt
+		echo "/* U+${ucs} */ 0x0," >> case.txt
+	fi
+done
+
+unset nospc
+
+# echo "/* EOF */" >> space.txt
+
+cat case.txt | ./create_table "spacing" > "../headers/case.h" 2> ../headers/case_tbl.txt
+
+rm -f case.txt
+
+cat >../case.c << ENDOFTEXT
+/*
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#include "headers/case.h"
+
+ENDOFTEXT
+
+echo "
+int 
+XUtf8Tolower(
+	int ucs)
+{
+	int ret;
+" >>../case.c
+
+tables=`cat ../headers/case_tbl.txt`
+
+for line in ${tables} 
+do
+	tbl=`echo ${line} | cut -d']' -f1`
+	bot=`echo ${line} | cut -d'_' -f3 | cut -d'[' -f1`
+	eot=`echo ${line} | cut -d'	' -f2 | cut -d'+' -f2 | cut -d' ' -f1`
+	echo "\
+	if (ucs <= 0x${eot}) {
+		if (ucs >= 0x${bot}) {
+			ret = ${tbl}ucs - 0x${bot}];
+			if (ret > 0) return ret;
+		}
+		return ucs;
+	}
+" >>../case.c
+
+done
+
+echo "	return ucs;
+}
+" >>../case.c
+
+


Property changes on: branches/branch-3.0/src/core/xutf8/utils/case.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/branch-3.0/src/core/xutf8/utils/conv_gen.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/conv_gen.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/conv_gen.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,174 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*	
+ *    generate the "if(){} else if ..." structure of ucs2fontmap()
+ */
+#include <wchar.h>
+#include <stdio.h>
+char buffer[1000000];
+
+int main(int argc, char **argv) {
+  char buf[80];
+  int len;
+  char *encode[256];
+  int encode_number = 0;
+  unsigned int i = 0;
+  unsigned char *ptr;
+  unsigned char *lst = "";
+  size_t nb;
+  int nbb = 0;
+  len = fread(buffer, 1, 1000000, stdin);
+
+  puts("  ");
+  puts("   /*************** conv_gen.c ************/");
+  buffer[len] = '\0';
+  ptr = buffer;
+  
+  printf("const int ucs2fontmap"
+	  "(char *s, unsigned int ucs, int enc)\n");
+  printf("{\n");
+  printf("  switch(enc) {\n");
+  printf("  case 0:\n");
+  printf("    s[0] = (char) ((ucs & 0xFF00) >> 8);\n");
+  printf("    s[1] = (char) (ucs & 0xFF);\n");
+  printf("    return 0;");
+  while (len > 0) {
+    unsigned char *p = ptr;
+    unsigned char *f, *t;
+    
+    while (*p != ']') {
+      i++;
+      p++;
+    }
+    *(p - 1) = '\0';
+    *(p - 6) = '\0';
+    f = p - 5;
+    while (*p != '+') { i++; p++;}
+    p++;
+    t = p;
+    *(p + 4) = '\0';
+    if (strcmp(lst, ptr)) {
+      encode_number++;
+      encode[encode_number] = ptr;
+      printf("\n    break;");
+      printf("\n  case %d:\n", encode_number);
+      printf("    ");
+    } else {
+      printf(" else ");
+    }
+    lst = ptr;
+    printf("if (ucs <= 0x%s) {\n", t);
+    printf("      if (ucs >= 0x%s) {\n", f);
+    if (*(f - 3) == '2') {
+      printf("        int i = (ucs - 0x%s) * 2;\n", f);
+      printf("        s[0] = %s_%s[i++];\n", ptr, f, f);
+      printf("        s[1] = %s_%s[i];\n", ptr, f, f);
+      printf("        if (s[0] || s[1]) return %d;\n", encode_number);
+    } else {
+      printf("        s[0] = 0;\n");
+      printf("        s[1] = %s_%s[ucs - 0x%s];\n", ptr, f, f);
+      printf("        if (s[1]) return %d;\n", encode_number);
+    }
+    printf("      }\n");
+    printf("    }");
+    while (*ptr != '\n') {
+      ptr++;
+      len--;
+    } 
+    ptr++;
+    len--;
+  }
+  printf("\n    break;\n");
+  printf("\n  default:\n");
+  printf("    break;\n");
+  printf("  };\n");
+  printf("  return -1;\n");
+  printf("};\n\n");
+
+  printf("const int encoding_number(const char *enc)\n{\n");
+  printf("  if (!enc || !strcmp(enc, \"iso10646-1\")) {\n");
+  printf("    return 0;\n");
+  i = 1;
+  while (i <= encode_number) {
+    int l;
+    char *ptr;
+    l = strlen(encode[i]) - 3;
+    ptr = encode[i] + l;
+    *(ptr) = '\0';
+    ptr--;
+    while (ptr != encode[i]) {
+      if (*ptr == '_') {
+	*ptr = '-';
+	ptr--;
+	break;
+      }
+      ptr--;
+    }
+    while (ptr != encode[i]) {
+      if (*ptr == '_') {
+	*ptr = '.';
+      }
+      ptr--;
+    }
+    printf("  } else if (!strcmp(enc, \"%s\")", encode[i] +11);
+
+    if (!strcmp(encode[i] + 11, "big5-0")) { 
+      printf(" || !strcmp(enc, \"big5.eten-0\")");
+    } else if (!strcmp(encode[i] + 11, "dingbats")) {
+      printf(" || !strcmp(enc, \"zapfdingbats\")");
+      printf(" || !strcmp(enc, \"zapf dingbats\")");
+      printf(" || !strcmp(enc, \"itc zapf dingbats\")");
+    } else if (!strcmp(encode[i] + 11, "jisx0208.1983-0")) {
+      printf(" || !strcmp(enc, \"jisx0208.1990-0\")");
+    }
+
+    printf(") {\n");
+    printf("    return %d;\n", i);
+    i++;
+  }
+  printf("  };\n");	
+  printf("  return -1;\n");	
+  printf("};\n\n");	
+
+  printf("/*\n");	
+  printf("const char *encoding_name(int num)\n{\n");
+  printf("  switch (num) {\n");
+  i = 1;
+  while (i <= encode_number) {
+    printf("  case %d:\n", i);
+    printf("    return \"%s\";\n", encode[i] + 11);
+    i++;
+  }
+  printf("  };\n");
+  printf("  return \"iso10646-1\";\n");
+  printf("};\n\n");
+  printf("*/\n");	
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/utils/convert_map.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/convert_map.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/convert_map.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,179 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*
+ *    read the http://www.unicode.org/Public/MAPPINGS/ and create something
+ *    usable in C.
+ */
+
+#include <wchar.h>
+#include <stdio.h>
+
+char buffer[1000000];
+
+int JIS0208(unsigned char * ptr) {
+  int i = 0;
+  unsigned int fmap;
+  unsigned int ucs;
+  while(*ptr != '\t') { ptr++; i++; }
+  ptr++; i++; *(ptr+6) = '\0';
+  fmap = (unsigned int)strtoul(ptr, NULL, 16);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++; *(ptr+6) = '\0';
+  ucs = (unsigned int)strtoul(ptr, NULL, 16);
+  if (ucs) 
+    printf("/* U+%04X */ 0x%02X, 0x%02X,\n", ucs, 
+	  (fmap & 0xFF00) >> 8, fmap & 0xFF);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++;
+  while(*ptr != '\n') { ptr++; i++; }
+  i++;
+  return i;
+}
+
+int JIS0201(unsigned char * ptr) {
+  int i = 0;
+  unsigned int fmap;
+  unsigned int ucs;
+  *(ptr+4) = '\0';
+  fmap = (unsigned int)strtoul(ptr, NULL, 16);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++; *(ptr+6) = '\0';
+  ucs = (unsigned int)strtoul(ptr, NULL, 16);
+  if (*(ptr + 1) != 'x') {
+    printf("/* EOF */\n");
+    abort();
+  }
+  if (ucs) printf("/* U+%04X */ 0x%02X,\n", ucs, (unsigned char)fmap);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++;
+  while(*ptr != '\n') { ptr++; i++; }
+  i++;
+  return i;
+}
+
+int ADOBE(unsigned char * ptr) {
+  int i = 0;
+  unsigned int fmap;
+  unsigned int ucs;
+  *(ptr+4) = '\0';
+  ucs = (unsigned int)strtoul(ptr, NULL, 16);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++; *(ptr+2) = '\0';
+  fmap = (unsigned int)strtoul(ptr, NULL, 16);
+  if (fmap < 1) {
+    printf("/* EOF */\n");
+    abort();
+  }
+  if (ucs) printf("/* U+%04X */ 0x%02X,\n", ucs, (unsigned char)fmap);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++;
+  while(*ptr != '\n') { ptr++; i++; }
+  i++;
+  return i;
+}
+
+
+int JIS0212(unsigned char * ptr) {
+  int i = 0;
+  unsigned int fmap;
+  unsigned int ucs;
+  *(ptr+6) = '\0';
+  fmap = (unsigned int)strtoul(ptr, NULL, 16);
+  ptr += 7;
+  i += 7;
+  while(*ptr == ' ') { ptr++; i++; }
+  /* i++; ptr++; */
+  *(ptr+6) = '\0';
+  ucs = (unsigned int)strtoul(ptr, NULL, 16);
+  if (*(ptr + 1) != 'x') {
+    printf("/* EOF */\n");
+    abort();
+  }
+  if (ucs)
+    printf("/* U+%04X */ 0x%02X, 0x%02X,\n", ucs, 
+	  (fmap & 0xFF00) >> 8, fmap & 0xFF);
+  while(*ptr != '\0') { ptr++; i++; }
+  i++; ptr++;
+  while(*ptr != '\n') { ptr++; i++; }
+  i++;
+  return i;
+}
+
+int main(int argc, char **argv) {
+  char buf[80];
+  int len;
+  int i;
+  unsigned char *ptr;
+  size_t nb;
+  len = fread(buffer, 1, 1000000, stdin);
+
+  buffer[len] = '\0';
+  ptr = (unsigned char *)buffer;
+  while (*ptr !='\n') {ptr++; len--;};
+  ptr++; len--;
+  while (*ptr == '#') {
+    while (*ptr !='\n') {
+      ptr++;
+      len--;
+    }
+    ptr++;
+    len--;
+  }
+
+  while (len > 0) {
+    nb = 0;
+    if (!strcmp("jisx0208.1983-0", argv[1])) {
+      nb = JIS0208(ptr);
+    } else if (!strcmp("jisx0201.1976-0", argv[1])) {
+      nb = JIS0201(ptr);
+    } else if (!strcmp("jisx0212.1990-0", argv[1])) {
+      nb = JIS0212(ptr);
+    } else if (!strcmp("gb2312.1980-0", argv[1])) {
+      nb = JIS0212(ptr);
+    } else if (!strcmp("ksc5601.1987-0", argv[1])) {
+      nb = JIS0212(ptr);
+    } else if (!strcmp("big5-0", argv[1])) {
+      nb = JIS0212(ptr);
+    } else if (!strncmp("iso8859", argv[1], 7)) {
+      nb = JIS0201(ptr);
+    } else if (!strcmp("koi8-1", argv[1])) {
+      nb = JIS0201(ptr);
+    } else if (!strcmp("dingbats", argv[1]) ||
+	       !strcmp("symbol", argv[1])) 
+    {
+      nb = ADOBE(ptr);
+    } else {
+      len = 0;
+    }
+    ptr += nb;
+    len = len - nb;
+  }
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/utils/create_table.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/create_table.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/create_table.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,112 @@
+/* "$Id: $"
+ *
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#include <wchar.h>
+#include <stdio.h>
+char buffer[1000000];
+
+/*** you can try to modifie this value to have better performences **/
+#define MAX_DELTA 0x80
+
+int main(int argc, char **argv) {
+  char buf[80];
+  int len;
+  unsigned int i = 0;
+  unsigned char *ptr;
+  size_t nb;
+  int nbb = 0;
+  len = fread(buffer, 1, 1000000, stdin);
+
+  buffer[len] = '\0';
+  ptr = (unsigned char *)buffer;
+  while (*ptr != '\n') ptr++;
+  ptr++;
+  while (*ptr != '\n') {
+    if (*ptr == ',') nbb++;
+    ptr++;
+  }
+  ptr = (unsigned char *)buffer;
+  printf("/* %s */\n", argv[1]);
+  while (len > 0) {
+    unsigned int ucs = 0;
+    char *p = ptr;
+    char pp[20];
+    nb = 0;
+    pp[0] = '\0';
+    while (*p != 'U') p++;
+    strncat(pp, p, 6);
+    *pp = '0';
+    *(pp+1) = 'x';
+    ucs = (unsigned int)strtoul(pp, NULL, 16);;
+    if (ucs < 1) {
+      printf("ERROR %d %d\n", len, ucs);
+      abort();
+    }
+    if (i != ucs - 1 || !i) {
+      if ((ucs - i) > MAX_DELTA || !i) {
+	if (i) {
+	  printf("};\n");
+	  fprintf(stderr, "\t/* end: U+%04X */\n", i);
+	}
+	if (strcmp(argv[1], "spacing")) {
+	  printf("\nstatic const char unicode_to_%s_%db_%04X[] = {\n",
+	         argv[1], nbb, ucs);
+	  fprintf(stderr, "unicode_to_%s_%db_%04X[]; ", 
+		  argv[1], nbb, ucs);
+	} else {
+	  printf("\nstatic const unsigned short"
+		 " ucs_table_%04X[]"
+		 " = {\n", ucs);
+	  fprintf(stderr, "ucs_table_%04X[]; ", ucs);
+	}
+      } else {
+	while (i < ucs - 1) {
+	  i++;
+	  if (nbb == 1) {
+	    printf("0x00,\n");
+	  } else {
+	    printf("0x00, 0x00,\n");
+	  }
+	};
+      }
+    }
+    i = ucs;
+    while (*ptr != '\n') {
+      printf("%c", *ptr);
+      ptr++;
+      len--;
+    }
+    printf("\n");
+    ptr++;
+    len--;
+  }
+  printf("};\n");
+  fprintf(stderr, "\t/* end: U+%04X */\n", i);
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/utils/euc_tw.c
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/euc_tw.c	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/euc_tw.c	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,67 @@
+/*
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+/*	
+ *    generate the "if(){} else if ..." structure of ucs2fontmap()
+ */
+
+#include <wchar.h>
+#include <stdio.h>
+#include <iconv.h>
+char uni[0x10000];
+#include "../utf8Utils.c"
+
+int main(int argc, char **argv) {
+
+  iconv_t cd;
+
+  int i;
+  cd = iconv_open("EUC-TW", "UTF16");
+  for(i = 0; i < 0x10000; i++) uni[i] = 0;
+  for(i = 0x00000000; i < 0xFFFFFFFF; i++) {
+    char buf[4], ob[6];
+    char *b = buf;
+    int ucs = -1;
+    int l1 = 4, l2 = 6;
+    char *o = ob ;
+    buf[0] = i & 0xff;
+    buf[1] = (i >> 8) & 0xFF;
+    buf[2] = (i >> 16) & 0xFF;
+    buf[3] = (i >> 24) & 0xFF;
+    iconv(cd, NULL, NULL, NULL, NULL);
+    iconv(cd, &b, &l1, &o, &l2);
+    if (l2 != 6) {
+      ucs = (unsigned)ob[0];
+      ucs += (unsigned) (ob[1] << 8);
+      /* XConvertUtf8ToUcs((unsigned char*)ob, 6 - l2, &ucs); */
+      printf ("%x --> %X\n", i, ucs & 0xFFFF);
+    }
+  }
+  iconv_close(cd);
+  return 0;
+}
+
+/*
+ * End of "$Id$".
+ */

Added: branches/branch-3.0/src/core/xutf8/utils/non_spacing.sh
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/non_spacing.sh	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/non_spacing.sh	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+
+nopsc=`grep ';Mn;' ../UnicodeData-2.txt`
+
+IFS="
+"
+
+#echo "#
+# List of non-spacing chars
+#
+# 
+#       Format:  Three tab-separated columns
+#                Column #1 is the non-spacing Unicode (in hex as 0xXXXX)
+#                Column #2 is the spacing Unicode (in hex as 0xXXXX)
+#                Column #3 the Unicode name (follows a comment sign, '#')
+# " > space.txt
+
+rm -f space.txt
+
+
+for line in ${nopsc}
+do
+	ucs=`echo ${line} | cut -d\; -f1`
+	name=`echo ${line} | cut -d\; -f2`
+	space=`grep " 0020 ${ucs};" ../UnicodeData-2.txt` 
+	if test "X${space}" != X ;then
+		tbl=`echo ${space} | cut -d\; -f1`
+	#	echo "0x${ucs}	0x${tbl}	#	${name}" >> space.txt
+		echo "/* U+${ucs} */ 0x${tbl}," >> space.txt
+	else
+	#	echo "0x${ucs}	0x${ucs}	#	${name}" >> space.txt
+		echo "/* U+${ucs} */ 0x${ucs}," >> space.txt
+	fi
+done
+
+unset nospc
+
+# echo "/* EOF */" >> space.txt
+
+cat space.txt | ./create_table "spacing" > "../headers/spacing.h" 2> ../headers/spacing_tbl.txt
+
+rm -f space.txt
+
+cat >../is_spacing.c << ENDOFTEXT
+/*
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+#include "headers/spacing.h"
+
+ENDOFTEXT
+
+echo "
+unsigned short 
+XUtf8IsNonSpacing(
+	unsigned int ucs)
+{
+" >>../is_spacing.c
+
+tables=`cat ../headers/spacing_tbl.txt`
+
+for line in ${tables} 
+do
+	tbl=`echo ${line} | cut -d']' -f1`
+	bot=`echo ${line} | cut -d'_' -f3 | cut -d'[' -f1`
+	eot=`echo ${line} | cut -d'	' -f2 | cut -d'+' -f2 | cut -d' ' -f1`
+	echo "\
+	if (ucs <= 0x${eot}) {
+		if (ucs >= 0x${bot}) return ${tbl}ucs - 0x${bot}];
+		return 0;
+	}
+" >>../is_spacing.c
+
+done
+
+echo "	return 0;
+}
+" >>../is_spacing.c
+
+


Property changes on: branches/branch-3.0/src/core/xutf8/utils/non_spacing.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/branch-3.0/src/core/xutf8/utils/tbl_gen.sh
===================================================================
--- branches/branch-3.0/src/core/xutf8/utils/tbl_gen.sh	                        (rev 0)
+++ branches/branch-3.0/src/core/xutf8/utils/tbl_gen.sh	2011-08-22 15:21:44 UTC (rev 8991)
@@ -0,0 +1,179 @@
+#!/bin/sh
+#/*
+# *    generates ucs2fontmap.c and headers/*_.h
+# *
+# * Author: Jean-Marc Lienher ( http://oksid.ch )
+# * Copyright 2000-2003 by O'ksi'D.
+# *
+# * 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.
+# *
+# * Please report all bugs and problems on the following page:
+# *
+# *     http://www.fltk.org/str.php
+# */
+#
+
+# iso10646-1
+
+encode="iso8859-1 iso8859-2 iso8859-3 \
+	iso8859-4 iso8859-5 iso8859-6 iso8859-7 iso8859-8 iso8859-9 \
+	iso8859-10 iso8859-13 iso8859-14 iso8859-15 \
+	koi8-1 big5-0 ksc5601.1987-0 gb2312.1980-0 jisx0201.1976-0 \
+	jisx0208.1983-0 jisx0212.1990-0 symbol dingbats"
+
+mkdir -p ../headers/
+rm -f ../headers/* ucs2fontmap
+
+for enc in ${encode}
+do
+	echo ${enc}
+
+	case ${enc} in 
+	ksc5601.1987-0)
+#		cat ../MAPPINGS/EASTASIA/KSC/KSC5601.TXT | \
+		cat ../MAPPINGS/EASTASIA/KSC/KSX1001.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	koi8-1)
+		cat ../MAPPINGS/VENDORS/MISC/KOI8-R.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-14)
+		cat ../MAPPINGS/ISO8859/8859-14.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-13)
+		cat ../MAPPINGS/ISO8859/8859-13.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-5)
+		cat ../MAPPINGS/ISO8859/8859-5.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-6)
+		cat ../MAPPINGS/ISO8859/8859-6.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-1)
+		cat ../MAPPINGS/ISO8859/8859-1.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-10)
+		cat ../MAPPINGS/ISO8859/8859-10.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-15)
+		cat ../MAPPINGS/ISO8859/8859-15.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-2)
+		cat ../MAPPINGS/ISO8859/8859-2.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-3)
+		cat ../MAPPINGS/ISO8859/8859-3.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-4)
+		cat ../MAPPINGS/ISO8859/8859-4.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-7)
+		cat ../MAPPINGS/ISO8859/8859-7.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-8)
+		cat ../MAPPINGS/ISO8859/8859-8.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	iso8859-9)
+		cat ../MAPPINGS/ISO8859/8859-9.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	dingbats)
+		cat ../MAPPINGS/VENDORS/ADOBE/zdingbat.txt | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	symbol)
+		cat ../MAPPINGS/VENDORS/ADOBE/symbol.txt | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	big5-0)
+		cat ../MAPPINGS/EASTASIA/OTHER/BIG5.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	gb2312.1980-0)
+		cat ../MAPPINGS/EASTASIA/GB/GB2312.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	jisx0212.1990-0)
+		cat ../MAPPINGS/EASTASIA/JIS/JIS0212.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	jisx0208.1983-0)
+		cat ../MAPPINGS/EASTASIA/JIS/JIS0208.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	jisx0201.1976-0)
+		cat ../MAPPINGS/EASTASIA/JIS/JIS0201.TXT | \
+			./convert_map "${enc}" > ${enc}.txt
+		;;
+	esac
+	nm=`echo ${enc} |tr '.' '_' | tr '-' '_'`
+	cat ${enc}.txt | sort | uniq | \
+	 	./create_table "${nm}"  >> ../headers/${nm}_.h 2>> ../headers/tbl.txt 
+	rm -f ${enc}.txt
+	enc=" "
+done
+
+cat > ../ucs2fontmap.c << ENDOFTEXT
+/*
+ * Author: Jean-Marc Lienher ( http://oksid.ch )
+ * Copyright 2000-2003 by O'ksi'D.
+ *
+ * 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.
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ *     http://www.fltk.org/str.php
+ */
+
+ENDOFTEXT
+
+
+he=`cd ..; ls headers/*.h`
+for hea in ${he}
+do
+ 	echo "#include \"${hea}\"" >> ../ucs2fontmap.c
+done
+
+
+cat ../headers/tbl.txt | ./conv_gen >> ../ucs2fontmap.c
+
+


Property changes on: branches/branch-3.0/src/core/xutf8/utils/tbl_gen.sh
___________________________________________________________________
Name: svn:executable
   + *

Deleted: branches/branch-3.0/src/d1.xbm

Deleted: branches/branch-3.0/src/d1_mask.xbm

Deleted: branches/branch-3.0/src/dump_compose.c

Deleted: branches/branch-3.0/src/ew.xbm

Deleted: branches/branch-3.0/src/ew_mask.xbm

Deleted: branches/branch-3.0/src/fastarrow.h

Deleted: branches/branch-3.0/src/filename_absolute.cxx

Deleted: branches/branch-3.0/src/filename_expand.cxx

Deleted: branches/branch-3.0/src/filename_ext.cxx

Deleted: branches/branch-3.0/src/filename_isdir.cxx

Deleted: branches/branch-3.0/src/filename_list.cxx

Deleted: branches/branch-3.0/src/filename_match.cxx

Deleted: branches/branch-3.0/src/filename_setext.cxx

Deleted: branches/branch-3.0/src/fl_arc.cxx

Deleted: branches/branch-3.0/src/fl_arci.cxx

Deleted: branches/branch-3.0/src/fl_ask.cxx

Deleted: branches/branch-3.0/src/fl_boxtype.cxx

Deleted: branches/branch-3.0/src/fl_call_main.cxx

Deleted: branches/branch-3.0/src/fl_cmap.h

Deleted: branches/branch-3.0/src/fl_color.cxx

Deleted: branches/branch-3.0/src/fl_color_mac.cxx

Deleted: branches/branch-3.0/src/fl_color_win32.cxx

Deleted: branches/branch-3.0/src/fl_cursor.cxx

Deleted: branches/branch-3.0/src/fl_curve.cxx

Deleted: branches/branch-3.0/src/fl_diamond_box.cxx

Deleted: branches/branch-3.0/src/fl_dnd.cxx

Deleted: branches/branch-3.0/src/fl_dnd_win32.cxx

Deleted: branches/branch-3.0/src/fl_dnd_x.cxx

Deleted: branches/branch-3.0/src/fl_draw.cxx

Deleted: branches/branch-3.0/src/fl_draw_image.cxx

Deleted: branches/branch-3.0/src/fl_draw_image_mac.cxx

Deleted: branches/branch-3.0/src/fl_draw_image_win32.cxx

Deleted: branches/branch-3.0/src/fl_draw_pixmap.cxx

Deleted: branches/branch-3.0/src/fl_encoding_latin1.cxx

Deleted: branches/branch-3.0/src/fl_encoding_mac_roman.cxx

Deleted: branches/branch-3.0/src/fl_engraved_label.cxx

Deleted: branches/branch-3.0/src/fl_file_dir.cxx

Deleted: branches/branch-3.0/src/fl_font.cxx

Deleted: branches/branch-3.0/src/fl_font_mac.cxx

Deleted: branches/branch-3.0/src/fl_font_win32.cxx

Deleted: branches/branch-3.0/src/fl_font_x.cxx

Deleted: branches/branch-3.0/src/fl_font_xft.cxx

Deleted: branches/branch-3.0/src/fl_gtk.cxx

Deleted: branches/branch-3.0/src/fl_images_core.cxx

Deleted: branches/branch-3.0/src/fl_labeltype.cxx

Deleted: branches/branch-3.0/src/fl_line_style.cxx

Deleted: branches/branch-3.0/src/fl_open_uri.cxx

Deleted: branches/branch-3.0/src/fl_oval_box.cxx

Deleted: branches/branch-3.0/src/fl_overlay.cxx

Deleted: branches/branch-3.0/src/fl_overlay_visual.cxx

Deleted: branches/branch-3.0/src/fl_plastic.cxx

Deleted: branches/branch-3.0/src/fl_read_image.cxx

Deleted: branches/branch-3.0/src/fl_read_image_mac.cxx

Deleted: branches/branch-3.0/src/fl_read_image_win32.cxx

Deleted: branches/branch-3.0/src/fl_rect.cxx

Deleted: branches/branch-3.0/src/fl_round_box.cxx

Deleted: branches/branch-3.0/src/fl_rounded_box.cxx

Deleted: branches/branch-3.0/src/fl_scroll_area.cxx

Deleted: branches/branch-3.0/src/fl_set_font.cxx

Deleted: branches/branch-3.0/src/fl_set_fonts.cxx

Deleted: branches/branch-3.0/src/fl_set_fonts_mac.cxx

Deleted: branches/branch-3.0/src/fl_set_fonts_win32.cxx

Deleted: branches/branch-3.0/src/fl_set_fonts_x.cxx

Deleted: branches/branch-3.0/src/fl_set_fonts_xft.cxx

Deleted: branches/branch-3.0/src/fl_shadow_box.cxx

Deleted: branches/branch-3.0/src/fl_shortcut.cxx

Deleted: branches/branch-3.0/src/fl_show_colormap.cxx

Deleted: branches/branch-3.0/src/fl_symbols.cxx

Deleted: branches/branch-3.0/src/fl_utf.cxx

Deleted: branches/branch-3.0/src/fl_utf8.cxx

Deleted: branches/branch-3.0/src/fl_vertex.cxx

Deleted: branches/branch-3.0/src/flstring.c

Deleted: branches/branch-3.0/src/flstring.h

Deleted: branches/branch-3.0/src/forms_bitmap.cxx

Deleted: branches/branch-3.0/src/forms_compatability.cxx

Deleted: branches/branch-3.0/src/forms_fselect.cxx

Deleted: branches/branch-3.0/src/forms_pixmap.cxx

Deleted: branches/branch-3.0/src/forms_timer.cxx

Deleted: branches/branch-3.0/src/freeglut_geometry.cxx

Deleted: branches/branch-3.0/src/freeglut_stroke_mono_roman.cxx

Deleted: branches/branch-3.0/src/freeglut_stroke_roman.cxx

Deleted: branches/branch-3.0/src/freeglut_teapot.cxx

Deleted: branches/branch-3.0/src/freeglut_teapot_data.h

Deleted: branches/branch-3.0/src/gl_draw.cxx

Deleted: branches/branch-3.0/src/gl_start.cxx

Deleted: branches/branch-3.0/src/glut_compatability.cxx

Deleted: branches/branch-3.0/src/glut_font.cxx

Copied: branches/branch-3.0/src/jpeg (from rev 8987, branches/branch-3.0/jpeg)

Deleted: branches/branch-3.0/src/jpeg/jconfig.h

Deleted: branches/branch-3.0/src/jpeg/jdct.h

Deleted: branches/branch-3.0/src/jpeg/jerror.h

Deleted: branches/branch-3.0/src/jpeg/jinclude.h

Deleted: branches/branch-3.0/src/jpeg/jmemsys.h

Deleted: branches/branch-3.0/src/jpeg/jmorecfg.h

Deleted: branches/branch-3.0/src/jpeg/jpegint.h

Deleted: branches/branch-3.0/src/jpeg/jpeglib.h

Deleted: branches/branch-3.0/src/jpeg/jversion.h

Modified: branches/branch-3.0/src/makedepend
===================================================================
--- branches/branch-3.0/src/makedepend	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/src/makedepend	2011-08-22 15:21:44 UTC (rev 8991)
@@ -1,1324 +1 @@
 # DO NOT DELETE THIS LINE -- make depend depends on it.
-
-Fl.o: ../config.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-Fl.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/run.h ../fltk3/utf8.h
-Fl.o: ../fltk3/Xutf8.h ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl.o: ../fltk3/Tooltip.h ../fltk3/x.h ../fltk3/Window.h flstring.h
-Fl.o: ../fltk3/Export.h ../fltk3/draw.h ../fltk3/enumerations.h
-Fl.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Adjuster.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Adjuster.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Adjuster.o: ../fltk3/Adjuster.h ../fltk3/Valuator.h ../fltk3/Widget.h
-Fl_Adjuster.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/draw.h
-Fl_Adjuster.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Adjuster.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Adjuster.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Adjuster.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Adjuster.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Adjuster.o: ../fltk3/RGBImage.h fastarrow.h mediumarrow.h slowarrow.h
-Fl_Bitmap.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Bitmap.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Bitmap.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/draw.h
-Fl_Bitmap.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Bitmap.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Bitmap.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-Fl_Bitmap.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Bitmap.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Bitmap.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/MenuItem.h
-Fl_Bitmap.o: ../fltk3/Printer.h ../fltk3/PagedDevice.h ../fltk3/PostScript.h
-Fl_Bitmap.o: flstring.h ../fltk3/Export.h ../config.h
-Fl_Box.o: ../fltk3/Widget.h ../fltk3/enumerations.h ../fltk3/Export.h
-Fl_Box.o: ../fltk3/types.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Box.o: ../fltk3/Box.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Browser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Browser.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Browser.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Group.h
-Fl_Browser.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Browser.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Scrollbar.h
-Fl_Browser.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Image.h
-Fl_Browser.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Browser.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-Fl_Browser.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Browser.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-Fl_Browser.o: ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Browser_.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Browser_.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Browser_.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Browser_.o: ../fltk3/Browser_.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Browser_.o: ../fltk3/Wrapper.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Browser_.o: ../fltk3/Valuator.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Browser_.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Browser_.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Browser_.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Browser_.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Browser_load.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Browser_load.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Browser_load.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Group.h
-Fl_Browser_load.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Browser_load.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Browser_load.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Browser_load.o: ../fltk3/Image.h ../fltk3/utf8.h
-Fl_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Button.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Button.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Button.o: ../fltk3/Group.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Chart.o: ../fltk3/math.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Chart.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Chart.o: ../fltk3/Chart.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Chart.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Chart.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Chart.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Chart.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Chart.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Chart.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-Fl_Chart.o: ../fltk3/Export.h ../config.h
-Fl_Check_Browser.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/draw.h
-Fl_Check_Browser.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Export.h
-Fl_Check_Browser.o: ../fltk3/types.h ../fltk3/Window.h ../fltk3/Xutf8.h
-Fl_Check_Browser.o: ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Check_Browser.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Check_Browser.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Check_Browser.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Check_Browser.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Check_Browser.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Check_Browser.o: ../fltk3/CheckBrowser.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Check_Browser.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-Fl_Check_Browser.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/run.h
-Fl_Check_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Check_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Check_Button.o: ../fltk3/CheckButton.h ../fltk3/LightButton.h
-Fl_Check_Button.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Check_Button.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Choice.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Choice.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Choice.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/Widget.h
-Fl_Choice.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/Wrapper.h
-Fl_Choice.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Choice.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Choice.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Choice.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Choice.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Choice.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-Fl_Choice.o: ../fltk3/Export.h ../config.h
-Fl_Clock.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Clock.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Clock.h
-Fl_Clock.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Clock.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/draw.h
-Fl_Clock.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Clock.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Device.h
-Fl_Clock.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Clock.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Clock.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Color_Chooser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Color_Chooser.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Color_Chooser.o: ../fltk3/ColorChooser.h ../fltk3/Group.h
-Fl_Color_Chooser.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Color_Chooser.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Box.h
-Fl_Color_Chooser.o: ../fltk3/ReturnButton.h ../fltk3/Button.h
-Fl_Color_Chooser.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-Fl_Color_Chooser.o: ../fltk3/Image.h ../fltk3/ValueInput.h
-Fl_Color_Chooser.o: ../fltk3/Valuator.h ../fltk3/Input.h ../fltk3/Input_.h
-Fl_Color_Chooser.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Color_Chooser.o: ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Color_Chooser.o: ../fltk3/Group.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Color_Chooser.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Color_Chooser.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Color_Chooser.o: ../fltk3/math.h
-Fl_Counter.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Counter.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Counter.o: ../fltk3/Counter.h ../fltk3/Valuator.h ../fltk3/Widget.h
-Fl_Counter.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Counter.o: ../fltk3/Object.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Counter.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Counter.o: ../fltk3/Group.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Counter.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Counter.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Counter.o: ../fltk3/RGBImage.h
-Fl_Device.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Device.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Device.o: ../fltk3/Device.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Device.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Device.o: ../fltk3/Image.h ../fltk3/Object.h ../fltk3/Bitmap.h
-Fl_Device.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Dial.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Dial.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Dial.h
-Fl_Dial.o: ../fltk3/Valuator.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Dial.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Dial.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Dial.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Dial.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Dial.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Dial.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Dial.o: ../fltk3/math.h
-Fl_Double_Window.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Double_Window.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Double_Window.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-Fl_Double_Window.o: ../fltk3/Window.h ../fltk3/Printer.h ../fltk3/x.h
-Fl_Double_Window.o: ../fltk3/PagedDevice.h ../fltk3/Device.h
-Fl_Double_Window.o: ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Double_Window.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Object.h
-Fl_Double_Window.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Double_Window.o: ../fltk3/RGBImage.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Double_Window.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Double_Window.o: ../fltk3/Rectangle.h ../fltk3/draw.h
-Fl_Double_Window.o: ../fltk3/enumerations.h ../fltk3/PostScript.h
-Fl_File_Browser.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h
-Fl_File_Browser.o: ../fltk3/Browser_.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_File_Browser.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_File_Browser.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-Fl_File_Browser.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_File_Browser.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_File_Browser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Xutf8.h
-Fl_File_Browser.o: ../fltk3/Image.h ../fltk3/FileIcon.h ../fltk3/run.h
-Fl_File_Browser.o: ../fltk3/filename.h ../fltk3/draw.h ../fltk3/x.h
-Fl_File_Browser.o: ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_File_Browser.o: ../fltk3/Window.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_File_Browser.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_File_Browser.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_File_Browser.o: ../fltk3/filename.h flstring.h ../fltk3/Export.h
-Fl_File_Browser.o: ../config.h
-Fl_File_Chooser.o: ../fltk3/FileChooser.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_File_Chooser.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_File_Chooser.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-Fl_File_Chooser.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_File_Chooser.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_File_Chooser.o: ../fltk3/Object.h ../fltk3/Choice.h ../fltk3/Menu_.h
-Fl_File_Chooser.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/MenuButton.h
-Fl_File_Chooser.o: ../fltk3/Button.h ../fltk3/Preferences.h
-Fl_File_Chooser.o: ../fltk3/TiledGroup.h ../fltk3/Group.h
-Fl_File_Chooser.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h
-Fl_File_Chooser.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_File_Chooser.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-Fl_File_Chooser.o: ../fltk3/filename.h ../fltk3/Box.h ../fltk3/CheckButton.h
-Fl_File_Chooser.o: ../fltk3/LightButton.h ../fltk3/Button.h
-Fl_File_Chooser.o: ../fltk3/FileInput.h ../fltk3/Input.h ../fltk3/Input_.h
-Fl_File_Chooser.o: ../fltk3/ReturnButton.h ../fltk3/ask.h ../fltk3/draw.h
-Fl_File_Chooser.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_File_Chooser.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_File_Chooser.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-Fl_File_Chooser.o: ../fltk3/RGBImage.h
-Fl_File_Chooser2.o: ../fltk3/FileChooser.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_File_Chooser2.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_File_Chooser2.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-Fl_File_Chooser2.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_File_Chooser2.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_File_Chooser2.o: ../fltk3/Object.h ../fltk3/Choice.h ../fltk3/Menu_.h
-Fl_File_Chooser2.o: ../fltk3/MenuItem.h ../fltk3/Image.h
-Fl_File_Chooser2.o: ../fltk3/MenuButton.h ../fltk3/Button.h
-Fl_File_Chooser2.o: ../fltk3/Preferences.h ../fltk3/TiledGroup.h
-Fl_File_Chooser2.o: ../fltk3/Group.h ../fltk3/FileBrowser.h
-Fl_File_Chooser2.o: ../fltk3/Browser.h ../fltk3/Browser_.h
-Fl_File_Chooser2.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_File_Chooser2.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-Fl_File_Chooser2.o: ../fltk3/filename.h ../fltk3/Box.h ../fltk3/CheckButton.h
-Fl_File_Chooser2.o: ../fltk3/LightButton.h ../fltk3/Button.h
-Fl_File_Chooser2.o: ../fltk3/FileInput.h ../fltk3/Input.h ../fltk3/Input_.h
-Fl_File_Chooser2.o: ../fltk3/ReturnButton.h ../fltk3/ask.h
-Fl_File_Chooser2.o: ../fltk3/filename.h ../fltk3/x.h ../fltk3/SharedImage.h
-Fl_File_Chooser2.o: ../fltk3/draw.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_File_Chooser2.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_File_Chooser2.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-Fl_File_Chooser2.o: ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h
-Fl_File_Chooser2.o: ../config.h
-Fl_File_Icon.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_File_Icon.o: ../fltk3/FileIcon.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_File_Icon.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_File_Icon.o: ../fltk3/enumerations.h ../fltk3/Widget.h
-Fl_File_Icon.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/draw.h
-Fl_File_Icon.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_File_Icon.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_File_Icon.o: ../fltk3/Wrapper.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_File_Icon.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_File_Icon.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_File_Icon.o: ../fltk3/RGBImage.h ../fltk3/filename.h
-Fl_File_Input.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_File_Input.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_File_Input.o: ../fltk3/FileInput.h ../fltk3/Input.h ../fltk3/Input_.h
-Fl_File_Input.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_File_Input.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Window.h
-Fl_File_Input.o: ../fltk3/Group.h ../fltk3/draw.h ../fltk3/x.h
-Fl_File_Input.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Device.h
-Fl_File_Input.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_File_Input.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_File_Input.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/filename.h
-Fl_File_Input.o: flstring.h ../fltk3/Export.h ../config.h
-Fl_Group.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Group.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Group.h
-Fl_Group.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Group.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Window.h
-Fl_Group.o: ../fltk3/Group.h ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Group.o: ../fltk3/enumerations.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Group.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Group.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Group.o: ../fltk3/RGBImage.h
-Fl_Help_View.o: ../fltk3/HelpView.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Help_View.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Help_View.o: ../fltk3/enumerations.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Help_View.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Help_View.o: ../fltk3/Object.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Help_View.o: ../fltk3/Valuator.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Help_View.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Help_View.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Help_View.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Help_View.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Help_View.o: ../fltk3/SharedImage.h ../fltk3/filename.h ../fltk3/utf8.h
-Fl_Help_View.o: ../fltk3/filename.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Image.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/draw.h
-Fl_Image.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Image.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Image.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Image.o: ../fltk3/Object.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Image.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Image.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Image.o: ../fltk3/RGBImage.h ../fltk3/MenuItem.h flstring.h
-Fl_Image.o: ../fltk3/Export.h ../config.h
-Fl_Input.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Input.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Input.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Input.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Input.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Input.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Device.h
-Fl_Input.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Input.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Input.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/ask.h flstring.h
-Fl_Input.o: ../fltk3/Export.h ../config.h
-Fl_Input_.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Input_.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Input_.o: ../fltk3/Input_.h ../fltk3/Widget.h ../fltk3/Window.h
-Fl_Input_.o: ../fltk3/Group.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Input_.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/draw.h
-Fl_Input_.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Input_.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Input_.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Input_.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Input_.o: ../fltk3/ask.h ../fltk3/utf8.h flstring.h ../fltk3/Export.h
-Fl_Input_.o: ../config.h
-Fl_Light_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Light_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Light_Button.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/Widget.h
-Fl_Light_Button.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Light_Button.o: ../fltk3/Object.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Light_Button.o: ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Light_Button.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Device.h
-Fl_Light_Button.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Light_Button.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Light_Button.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-Fl_Light_Button.o: ../fltk3/Export.h ../config.h
-Fl_Menu.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Menu.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/MenuWindow.h
-Fl_Menu.o: ../fltk3/SingleWindow.h ../fltk3/Window.h ../fltk3/Menu_.h
-Fl_Menu.o: ../fltk3/Widget.h ../fltk3/MenuItem.h ../fltk3/Image.h
-Fl_Menu.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Menu.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Menu.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Menu.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Menu.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Menu.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h
-Fl_Menu.o: ../config.h
-Fl_Menu_.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Menu_.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Menu_.h
-Fl_Menu_.o: ../fltk3/Widget.h ../fltk3/MenuItem.h ../fltk3/Image.h flstring.h
-Fl_Menu_.o: ../fltk3/Export.h ../config.h
-Fl_Menu_Bar.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Menu_Bar.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Menu_Bar.o: ../fltk3/MenuBar.h ../fltk3/Menu_.h ../fltk3/Widget.h
-Fl_Menu_Bar.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/draw.h
-Fl_Menu_Bar.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Menu_Bar.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Menu_Bar.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Menu_Bar.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Menu_Bar.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Menu_Bar.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Menu_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Menu_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Menu_Button.o: ../fltk3/MenuButton.h ../fltk3/Menu_.h ../fltk3/Widget.h
-Fl_Menu_Button.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/draw.h
-Fl_Menu_Button.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Menu_Button.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Menu_Button.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Menu_Button.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Menu_Button.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Menu_Button.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Menu_Window.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Menu_Window.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Menu_Window.o: ../fltk3/enumerations.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Menu_Window.o: ../fltk3/draw.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Menu_Window.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Menu_Window.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Menu_Window.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Menu_Window.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Menu_Window.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Menu_Window.o: ../fltk3/MenuWindow.h ../fltk3/SingleWindow.h
-Fl_Menu_add.o: ../fltk3/Menu_.h ../fltk3/Widget.h ../fltk3/MenuItem.h
-Fl_Menu_add.o: ../fltk3/Image.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Menu_global.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Menu_global.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Menu_global.o: ../fltk3/Menu_.h ../fltk3/Widget.h ../fltk3/MenuItem.h
-Fl_Menu_global.o: ../fltk3/Image.h
-Fl_Multi_Label.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Multi_Label.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Multi_Label.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Multi_Label.o: ../fltk3/MenuItem.h ../fltk3/Widget.h ../fltk3/Image.h
-Fl_Multi_Label.o: ../fltk3/MultiLabel.h
-Fl_Native_File_Chooser.o: Fl_Native_File_Chooser_FLTK.cxx
-Fl_Native_File_Chooser.o: ../fltk3/NativeFileChooser.h ../fltk3/FileChooser.h
-Fl_Native_File_Chooser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Native_File_Chooser.o: ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Native_File_Chooser.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-Fl_Native_File_Chooser.o: ../fltk3/Window.h ../fltk3/Group.h
-Fl_Native_File_Chooser.o: ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Native_File_Chooser.o: ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Native_File_Chooser.o: ../fltk3/Object.h ../fltk3/Choice.h
-Fl_Native_File_Chooser.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h
-Fl_Native_File_Chooser.o: ../fltk3/Image.h ../fltk3/MenuButton.h
-Fl_Native_File_Chooser.o: ../fltk3/Button.h ../fltk3/Preferences.h
-Fl_Native_File_Chooser.o: ../fltk3/TiledGroup.h ../fltk3/Group.h
-Fl_Native_File_Chooser.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h
-Fl_Native_File_Chooser.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-Fl_Native_File_Chooser.o: ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Native_File_Chooser.o: ../fltk3/FileIcon.h ../fltk3/run.h
-Fl_Native_File_Chooser.o: ../fltk3/filename.h ../fltk3/Box.h
-Fl_Native_File_Chooser.o: ../fltk3/CheckButton.h ../fltk3/LightButton.h
-Fl_Native_File_Chooser.o: ../fltk3/Button.h ../fltk3/FileInput.h
-Fl_Native_File_Chooser.o: ../fltk3/Input.h ../fltk3/Input_.h
-Fl_Native_File_Chooser.o: ../fltk3/ReturnButton.h ../fltk3/ask.h
-Fl_Native_File_Chooser.o: ../fltk3/FileIcon.h
-Fl_Native_File_Chooser.o: Fl_Native_File_Chooser_common.cxx
-Fl_Native_File_Chooser.o: ../fltk3/enumerations.h
-Fl_Overlay_Window.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Overlay_Window.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Overlay_Window.o: ../fltk3/enumerations.h ../fltk3/OverlayWindow.h
-Fl_Overlay_Window.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h
-Fl_Overlay_Window.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Overlay_Window.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Overlay_Window.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Overlay_Window.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-Fl_Overlay_Window.o: ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Overlay_Window.o: ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Overlay_Window.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Overlay_Window.o: ../fltk3/RGBImage.h
-Fl_Pack.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Pack.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/PackedGroup.h
-Fl_Pack.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Pack.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Pack.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Pack.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Pack.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Pack.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Pack.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Paged_Device.o: ../fltk3/PagedDevice.h ../fltk3/Device.h ../fltk3/x.h
-Fl_Paged_Device.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Paged_Device.o: ../fltk3/Window.h ../fltk3/Xutf8.h ../fltk3/Object.h
-Fl_Paged_Device.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Paged_Device.o: ../fltk3/Object.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Paged_Device.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/Window.h
-Fl_Paged_Device.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Paged_Device.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/run.h
-Fl_Paged_Device.o: ../fltk3/utf8.h ../fltk3/draw.h ../fltk3/enumerations.h
-Fl_Pixmap.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Pixmap.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Pixmap.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Pixmap.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Pixmap.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Pixmap.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-Fl_Pixmap.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Pixmap.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Pixmap.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/MenuItem.h
-Fl_Pixmap.o: ../fltk3/Printer.h ../fltk3/PagedDevice.h ../fltk3/PostScript.h
-Fl_Pixmap.o: flstring.h ../fltk3/Export.h ../config.h
-Fl_Positioner.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Positioner.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Positioner.o: ../fltk3/Positioner.h ../fltk3/Widget.h ../fltk3/draw.h
-Fl_Positioner.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Positioner.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Positioner.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Positioner.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Positioner.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Positioner.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Printer.o: ../fltk3/Printer.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Printer.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-Fl_Printer.o: ../fltk3/Xutf8.h ../fltk3/PagedDevice.h ../fltk3/Device.h
-Fl_Printer.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Printer.o: ../fltk3/Image.h ../fltk3/Object.h ../fltk3/Bitmap.h
-Fl_Printer.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Printer.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Printer.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Printer.o: ../fltk3/draw.h ../fltk3/enumerations.h ../fltk3/PostScript.h
-Fl_Printer.o: Fl_PostScript.cxx ../config.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Printer.o: ../fltk3/ask.h ../fltk3/NativeFileChooser.h
-Fl_Printer.o: ../fltk3/FileChooser.h ../fltk3/DoubleWindow.h ../fltk3/Group.h
-Fl_Printer.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-Fl_Printer.o: ../fltk3/MenuButton.h ../fltk3/Button.h ../fltk3/TiledGroup.h
-Fl_Printer.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h ../fltk3/Browser_.h
-Fl_Printer.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Printer.o: ../fltk3/FileIcon.h ../fltk3/run.h ../fltk3/filename.h
-Fl_Printer.o: ../fltk3/Box.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-Fl_Printer.o: ../fltk3/Button.h ../fltk3/FileInput.h ../fltk3/Input.h
-Fl_Printer.o: ../fltk3/Input_.h ../fltk3/ReturnButton.h print_panel.cxx
-Fl_Printer.o: print_panel.h ../fltk3/RoundButton.h ../fltk3/Spinner.h
-Fl_Printer.o: ../fltk3/RepeatButton.h ../fltk3/Progress.h ../src/flstring.h
-Fl_Printer.o: ../fltk3/Export.h ../fltk3/IntInput.h ../fltk3/Input.h
-Fl_Preferences.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Preferences.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Preferences.o: ../fltk3/Preferences.h ../fltk3/Plugin.h
-Fl_Preferences.o: ../fltk3/filename.h ../fltk3/utf8.h flstring.h
-Fl_Preferences.o: ../fltk3/Export.h ../config.h
-Fl_Progress.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Progress.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Progress.o: ../fltk3/Progress.h ../fltk3/Widget.h ../fltk3/draw.h
-Fl_Progress.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Progress.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Progress.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Progress.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Progress.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Progress.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Repeat_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Repeat_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Repeat_Button.o: ../fltk3/RepeatButton.h ../fltk3/run.h ../fltk3/Button.h
-Fl_Repeat_Button.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Repeat_Button.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Return_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Return_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Return_Button.o: ../fltk3/ReturnButton.h ../fltk3/Button.h
-Fl_Return_Button.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Return_Button.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/draw.h
-Fl_Return_Button.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Return_Button.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Device.h
-Fl_Return_Button.o: ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Return_Button.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Return_Button.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Roller.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Roller.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Roller.o: ../fltk3/Roller.h ../fltk3/Valuator.h ../fltk3/Widget.h
-Fl_Roller.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Roller.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Roller.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Roller.o: ../fltk3/Object.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Roller.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Roller.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Roller.o: ../fltk3/RGBImage.h
-Fl_Round_Button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Round_Button.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Round_Button.o: ../fltk3/RoundButton.h ../fltk3/LightButton.h
-Fl_Round_Button.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Round_Button.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Scroll.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Scroll.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Scroll.o: ../fltk3/TiledImage.h ../fltk3/Image.h ../fltk3/ScrollGroup.h
-Fl_Scroll.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Scroll.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Scroll.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Scroll.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Scroll.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-Fl_Scroll.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Scroll.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-Fl_Scroll.o: ../fltk3/RGBImage.h
-Fl_Scrollbar.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Scrollbar.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Scrollbar.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Scrollbar.o: ../fltk3/Widget.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Scrollbar.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Scrollbar.o: ../fltk3/Group.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Scrollbar.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-Fl_Scrollbar.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Scrollbar.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Scrollbar.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-Fl_Scrollbar.o: ../fltk3/Export.h ../config.h
-Fl_Shared_Image.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Shared_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Shared_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Shared_Image.o: ../fltk3/SharedImage.h ../fltk3/Image.h
-Fl_Shared_Image.o: ../fltk3/XBMImage.h ../fltk3/Bitmap.h ../fltk3/XPMImage.h
-Fl_Shared_Image.o: ../fltk3/Pixmap.h
-Fl_Single_Window.o: ../fltk3/SingleWindow.h ../fltk3/Window.h
-Fl_Slider.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Slider.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Slider.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Widget.h
-Fl_Slider.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Slider.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Slider.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Slider.o: ../fltk3/Object.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Slider.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Slider.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Slider.o: ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Table.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-Fl_Table.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-Fl_Table.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Table.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Table.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Table.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Table.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Table.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Table.o: ../fltk3/Table.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Group.h
-Fl_Table.o: ../fltk3/ScrollGroup.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Table.o: ../fltk3/Valuator.h ../fltk3/Box.h ../fltk3/Scrollbar.h
-Fl_Table_Row.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Table_Row.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Table_Row.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Table_Row.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Table_Row.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Table_Row.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-Fl_Table_Row.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Table_Row.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Table_Row.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/TableRow.h
-Fl_Table_Row.o: ../fltk3/Table.h ../fltk3/Group.h ../fltk3/ScrollGroup.h
-Fl_Table_Row.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Table_Row.o: ../fltk3/Box.h ../fltk3/Scrollbar.h
-Fl_Tabs.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Tabs.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/TabGroup.h
-Fl_Tabs.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Tabs.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Tabs.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Tabs.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-Fl_Tabs.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Tabs.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Tabs.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/Tooltip.h
-Fl_Text_Buffer.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Text_Buffer.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Text_Buffer.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Text_Buffer.o: ../fltk3/TextBuffer.h ../fltk3/ask.h
-Fl_Text_Display.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Text_Display.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Text_Display.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Text_Display.o: ../fltk3/TextBuffer.h ../fltk3/TextDisplay.h
-Fl_Text_Display.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Text_Display.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Text_Display.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Text_Display.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-Fl_Text_Display.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-Fl_Text_Display.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Text_Display.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/Scrollbar.h
-Fl_Text_Display.o: ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Text_Display.o: ../fltk3/TextBuffer.h ../fltk3/Printer.h
-Fl_Text_Display.o: ../fltk3/PagedDevice.h ../fltk3/draw.h
-Fl_Text_Display.o: ../fltk3/PostScript.h
-Fl_Text_Editor.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/run.h
-Fl_Text_Editor.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Text_Editor.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Text_Editor.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Text_Editor.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Text_Editor.o: ../fltk3/TextEditor.h ../fltk3/TextDisplay.h
-Fl_Text_Editor.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Text_Editor.o: ../fltk3/enumerations.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Text_Editor.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Text_Editor.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Text_Editor.o: ../fltk3/RGBImage.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-Fl_Text_Editor.o: ../fltk3/Valuator.h ../fltk3/TextBuffer.h ../fltk3/ask.h
-Fl_Tile.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_Tile.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/TiledGroup.h
-Fl_Tile.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Tile.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Tile.o: ../fltk3/Window.h
-Fl_Tiled_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Tiled_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Tiled_Image.o: ../fltk3/TiledImage.h ../fltk3/Image.h ../fltk3/draw.h
-Fl_Tiled_Image.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Tiled_Image.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Tiled_Image.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Tiled_Image.o: ../fltk3/Object.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Tiled_Image.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Tiled_Image.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Tooltip.o: ../fltk3/Tooltip.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Tooltip.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Tooltip.o: ../fltk3/enumerations.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Tooltip.o: ../fltk3/Object.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Tooltip.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Tooltip.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Tooltip.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Tooltip.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Tooltip.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Tooltip.o: ../fltk3/MenuWindow.h ../fltk3/SingleWindow.h
-Fl_Tree.o: ../fltk3/Tree.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Tree.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Tree.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Tree.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Tree.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-Fl_Tree.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Tree.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Tree.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Tree.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Tree.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Tree.o: ../fltk3/TreeItem.h ../fltk3/TreeItemArray.h ../fltk3/TreePrefs.h
-Fl_Tree_Item.o: ../fltk3/Widget.h ../fltk3/enumerations.h ../fltk3/Export.h
-Fl_Tree_Item.o: ../fltk3/types.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Tree_Item.o: ../fltk3/TreeItem.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Tree_Item.o: ../fltk3/Xutf8.h ../fltk3/Image.h ../fltk3/draw.h
-Fl_Tree_Item.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Tree_Item.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Tree_Item.o: ../fltk3/Wrapper.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Tree_Item.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Bitmap.h
-Fl_Tree_Item.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Tree_Item.o: ../fltk3/TreeItemArray.h ../fltk3/TreePrefs.h
-Fl_Tree_Item_Array.o: ../fltk3/TreeItemArray.h ../fltk3/Export.h
-Fl_Tree_Item_Array.o: ../fltk3/TreeItem.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Tree_Item_Array.o: ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Tree_Item_Array.o: ../fltk3/enumerations.h ../fltk3/Widget.h
-Fl_Tree_Item_Array.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Image.h
-Fl_Tree_Item_Array.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-Fl_Tree_Item_Array.o: ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Tree_Item_Array.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Tree_Item_Array.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Tree_Item_Array.o: ../fltk3/Preferences.h ../fltk3/Bitmap.h
-Fl_Tree_Item_Array.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Tree_Item_Array.o: ../fltk3/TreePrefs.h
-Fl_Tree_Prefs.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Tree_Prefs.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Tree_Prefs.o: ../fltk3/Pixmap.h ../fltk3/Image.h ../fltk3/TreePrefs.h
-Fl_Valuator.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Valuator.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Valuator.o: ../fltk3/Valuator.h ../fltk3/Widget.h ../fltk3/math.h
-Fl_Valuator.o: flstring.h ../fltk3/Export.h ../config.h
-Fl_Value_Input.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Value_Input.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Value_Input.o: ../fltk3/ValueInput.h ../fltk3/Valuator.h ../fltk3/Widget.h
-Fl_Value_Input.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Group.h
-Fl_Value_Input.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Value_Input.o: ../fltk3/Object.h ../fltk3/math.h
-Fl_Value_Output.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Value_Output.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Value_Output.o: ../fltk3/ValueOutput.h ../fltk3/Valuator.h
-Fl_Value_Output.o: ../fltk3/Widget.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Value_Output.o: ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Value_Output.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Value_Output.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Value_Output.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Value_Output.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Value_Output.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Value_Slider.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Value_Slider.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Value_Slider.o: ../fltk3/ValueSlider.h ../fltk3/Slider.h
-Fl_Value_Slider.o: ../fltk3/Valuator.h ../fltk3/Widget.h ../fltk3/draw.h
-Fl_Value_Slider.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_Value_Slider.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-Fl_Value_Slider.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Value_Slider.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Value_Slider.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Value_Slider.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Widget.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Widget.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Widget.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Widget.o: ../fltk3/Wrapper.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Widget.o: ../fltk3/Tooltip.h ../fltk3/draw.h ../fltk3/x.h
-Fl_Widget.o: ../fltk3/Window.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Widget.o: ../fltk3/Group.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Widget.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Widget.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Widget.o: ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Window.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Window.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Window.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/Window.h
-Fl_Window.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Window.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Window.o: flstring.h ../fltk3/Export.h ../fltk3/draw.h
-Fl_Window.o: ../fltk3/enumerations.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Window.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Window.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Window.o: ../fltk3/RGBImage.h
-Fl_Window_fullscreen.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Window_fullscreen.o: ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Window_fullscreen.o: ../fltk3/enumerations.h ../fltk3/x.h
-Fl_Window_fullscreen.o: ../fltk3/Window.h ../config.h
-Fl_Window_hotspot.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Window_hotspot.o: ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Window_hotspot.o: ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Window_hotspot.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-Fl_Window_hotspot.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Window_hotspot.o: ../fltk3/x.h ../fltk3/Window.h
-Fl_Window_iconize.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Export.h
-Fl_Window_iconize.o: ../fltk3/types.h ../fltk3/Window.h ../fltk3/Xutf8.h
-Fl_Wizard.o: ../fltk3/WizardGroup.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Wizard.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/enumerations.h
-Fl_Wizard.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Rectangle.h
-Fl_Wizard.o: ../fltk3/Object.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_Wizard.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h ../fltk3/Xutf8.h
-Fl_Wizard.o: ../fltk3/enumerations.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_Wizard.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Wizard.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_Wizard.o: ../fltk3/RGBImage.h
-Fl_XBM_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_XBM_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_XBM_Image.o: ../fltk3/XBMImage.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_XBM_Image.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_XPM_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_XPM_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_XPM_Image.o: ../fltk3/XPMImage.h ../fltk3/Pixmap.h ../fltk3/Image.h
-Fl_XPM_Image.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_abort.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_abort.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h flstring.h
-Fl_abort.o: ../fltk3/Export.h ../config.h
-Fl_add_idle.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_add_idle.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_arg.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_arg.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/x.h
-Fl_arg.o: ../fltk3/Window.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_arg.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_arg.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Tooltip.h
-Fl_arg.o: ../fltk3/filename.h ../fltk3/draw.h ../fltk3/enumerations.h
-Fl_arg.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_arg.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_arg.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-Fl_arg.o: ../fltk3/Export.h ../config.h
-Fl_compose.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_compose.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_compose.o: ../fltk3/x.h ../fltk3/Window.h
-Fl_display.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_display.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_display.o: flstring.h ../fltk3/Export.h ../config.h
-Fl_get_key.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_get_key.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_get_key.o: ../fltk3/x.h ../fltk3/Window.h
-Fl_get_system_colors.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_get_system_colors.o: ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_get_system_colors.o: ../fltk3/enumerations.h ../fltk3/draw.h ../fltk3/x.h
-Fl_get_system_colors.o: ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_get_system_colors.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_get_system_colors.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_get_system_colors.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_get_system_colors.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_get_system_colors.o: ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_get_system_colors.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-Fl_get_system_colors.o: ../fltk3/RGBImage.h ../fltk3/math.h ../fltk3/utf8.h
-Fl_get_system_colors.o: flstring.h ../fltk3/Export.h ../config.h
-Fl_get_system_colors.o: ../fltk3/TiledImage.h tile.xpm
-Fl_grab.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_grab.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_grab.o: ../fltk3/x.h ../fltk3/Window.h
-Fl_lock.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_lock.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../config.h
-Fl_own_colormap.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_own_colormap.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_own_colormap.o: ../fltk3/enumerations.h ../fltk3/x.h ../fltk3/Window.h
-Fl_visual.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_visual.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_visual.o: ../fltk3/x.h ../fltk3/Window.h
-Fl_x.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_x.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_x.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/Window.h ../fltk3/Group.h
-Fl_x.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_x.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/utf8.h
-Fl_x.o: ../fltk3/Tooltip.h ../fltk3/draw.h ../fltk3/enumerations.h
-Fl_x.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_x.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_x.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_x.o: ../fltk3/PagedDevice.h ../fltk3/filename.h flstring.h
-Fl_x.o: ../fltk3/Export.h
-filename_absolute.o: ../fltk3/filename.h ../fltk3/utf8.h flstring.h
-filename_absolute.o: ../fltk3/Export.h ../config.h
-filename_expand.o: ../fltk3/filename.h ../fltk3/utf8.h flstring.h
-filename_expand.o: ../fltk3/Export.h ../config.h
-filename_ext.o: ../fltk3/filename.h
-filename_isdir.o: flstring.h ../fltk3/Export.h ../config.h
-filename_isdir.o: ../fltk3/filename.h ../fltk3/utf8.h
-filename_list.o: ../fltk3/filename.h ../fltk3/utf8.h flstring.h
-filename_list.o: ../fltk3/Export.h ../config.h
-filename_match.o: ../fltk3/filename.h
-filename_setext.o: ../fltk3/filename.h flstring.h ../fltk3/Export.h
-filename_setext.o: ../config.h
-fl_arc.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-fl_arc.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-fl_arc.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_arc.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_arc.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_arc.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_arc.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_arc.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_arc.o: ../fltk3/math.h
-fl_arci.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-fl_arci.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-fl_arci.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_arci.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_arci.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_arci.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_arci.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_arci.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../config.h
-fl_ask.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/run.h
-fl_ask.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-fl_ask.o: ../fltk3/enumerations.h ../fltk3/ask.h ../fltk3/Box.h
-fl_ask.o: ../fltk3/Widget.h ../fltk3/Button.h ../fltk3/Wrapper.h
-fl_ask.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_ask.o: ../fltk3/ReturnButton.h ../fltk3/Button.h ../fltk3/Window.h
-fl_ask.o: ../fltk3/Group.h ../fltk3/Input.h ../fltk3/Input_.h
-fl_ask.o: ../fltk3/SecretInput.h ../fltk3/Input.h ../fltk3/x.h
-fl_ask.o: ../fltk3/Window.h ../fltk3/draw.h ../fltk3/enumerations.h
-fl_ask.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_ask.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_ask.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_boxtype.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_boxtype.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_boxtype.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_boxtype.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_boxtype.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_boxtype.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Device.h
-fl_boxtype.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_boxtype.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_boxtype.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../config.h
-fl_color.o: Fl_XColor.H ../config.h ../fltk3/enumerations.h ../fltk3/run.h
-fl_color.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-fl_color.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/x.h
-fl_color.o: ../fltk3/Window.h ../fltk3/draw.h ../fltk3/Window.h
-fl_color.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_color.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_color.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_color.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_color.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h fl_cmap.h
-fl_cursor.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_cursor.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_cursor.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_cursor.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-fl_cursor.o: ../fltk3/Object.h ../fltk3/x.h ../fltk3/Window.h ../fltk3/draw.h
-fl_cursor.o: ../fltk3/enumerations.h ../fltk3/Device.h ../fltk3/Object.h
-fl_cursor.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-fl_cursor.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-fl_cursor.o: ../fltk3/RGBImage.h
-fl_curve.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-fl_curve.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-fl_curve.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_curve.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_curve.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_curve.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_curve.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_curve.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_diamond_box.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_diamond_box.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_diamond_box.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_diamond_box.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_diamond_box.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_diamond_box.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_diamond_box.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_diamond_box.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_diamond_box.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_dnd.o: fl_dnd_x.cxx ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_dnd.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_dnd.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_dnd.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-fl_dnd.o: ../fltk3/Object.h ../fltk3/x.h ../fltk3/Window.h flstring.h
-fl_dnd.o: ../fltk3/Export.h ../config.h
-fl_draw.o: ../fltk3/utf8.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_draw.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_draw.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_draw.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_draw.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_draw.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_draw.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_draw.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_draw.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h
-fl_draw.o: ../config.h
-fl_draw_image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_draw_image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_draw_image.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_draw_image.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_draw_image.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_draw_image.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_draw_image.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_draw_image.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_draw_image.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h Fl_XColor.H
-fl_draw_image.o: ../config.h flstring.h ../fltk3/Export.h
-fl_draw_pixmap.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_draw_pixmap.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_draw_pixmap.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_draw_pixmap.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_draw_pixmap.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_draw_pixmap.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_draw_pixmap.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_draw_pixmap.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_draw_pixmap.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-fl_draw_pixmap.o: ../fltk3/Export.h ../config.h
-fl_encoding_latin1.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-fl_encoding_latin1.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-fl_encoding_latin1.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_encoding_latin1.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_encoding_latin1.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_encoding_latin1.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_encoding_latin1.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_encoding_latin1.o: ../fltk3/Preferences.h ../fltk3/Image.h
-fl_encoding_latin1.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-fl_encoding_latin1.o: ../fltk3/RGBImage.h flstring.h ../fltk3/Export.h
-fl_encoding_latin1.o: ../config.h
-fl_encoding_mac_roman.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-fl_encoding_mac_roman.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-fl_encoding_mac_roman.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_encoding_mac_roman.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_encoding_mac_roman.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_encoding_mac_roman.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_encoding_mac_roman.o: ../fltk3/Device.h ../fltk3/Object.h
-fl_encoding_mac_roman.o: ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_encoding_mac_roman.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_encoding_mac_roman.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-fl_encoding_mac_roman.o: ../fltk3/Export.h ../config.h
-fl_engraved_label.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_engraved_label.o: ../fltk3/types.h ../fltk3/Xutf8.h
-fl_engraved_label.o: ../fltk3/enumerations.h ../fltk3/Widget.h
-fl_engraved_label.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/draw.h
-fl_engraved_label.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-fl_engraved_label.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_engraved_label.o: ../fltk3/Wrapper.h ../fltk3/Device.h ../fltk3/Object.h
-fl_engraved_label.o: ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_engraved_label.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_engraved_label.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_file_dir.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/filename.h
-fl_file_dir.o: ../fltk3/FileChooser.h ../fltk3/run.h ../fltk3/utf8.h
-fl_file_dir.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-fl_file_dir.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-fl_file_dir.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_file_dir.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-fl_file_dir.o: ../fltk3/Object.h ../fltk3/Choice.h ../fltk3/Menu_.h
-fl_file_dir.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/MenuButton.h
-fl_file_dir.o: ../fltk3/Button.h ../fltk3/Preferences.h ../fltk3/TiledGroup.h
-fl_file_dir.o: ../fltk3/Group.h ../fltk3/FileBrowser.h ../fltk3/Browser.h
-fl_file_dir.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-fl_file_dir.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-fl_file_dir.o: ../fltk3/filename.h ../fltk3/Box.h ../fltk3/CheckButton.h
-fl_file_dir.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/FileInput.h
-fl_file_dir.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/ReturnButton.h
-fl_file_dir.o: ../fltk3/ask.h
-fl_font.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/run.h
-fl_font.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-fl_font.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/draw.h
-fl_font.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-fl_font.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_font.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-fl_font.o: ../fltk3/Object.h ../fltk3/Device.h ../fltk3/Object.h
-fl_font.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-fl_font.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-fl_font.o: ../fltk3/RGBImage.h Fl_Font.H ../fltk3/Xutf8.h fl_font_x.cxx
-fl_gtk.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-fl_gtk.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/draw.h
-fl_gtk.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-fl_gtk.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fl_gtk.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-fl_gtk.o: ../fltk3/Object.h ../fltk3/Device.h ../fltk3/Object.h
-fl_gtk.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-fl_gtk.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-fl_gtk.o: ../fltk3/RGBImage.h
-fl_labeltype.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_labeltype.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_labeltype.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_labeltype.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_labeltype.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_labeltype.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_labeltype.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_labeltype.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_labeltype.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_labeltype.o: ../fltk3/Input_.h
-fl_line_style.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_line_style.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_line_style.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_line_style.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_line_style.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_line_style.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_line_style.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_line_style.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_line_style.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/Printer.h
-fl_line_style.o: ../fltk3/PagedDevice.h ../fltk3/PostScript.h flstring.h
-fl_line_style.o: ../fltk3/Export.h ../config.h
-fl_open_uri.o: ../fltk3/filename.h flstring.h ../fltk3/Export.h ../config.h
-fl_oval_box.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_oval_box.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_oval_box.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_oval_box.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_oval_box.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_oval_box.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_oval_box.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_oval_box.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_oval_box.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_overlay.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Export.h
-fl_overlay.o: ../fltk3/types.h ../fltk3/Window.h ../fltk3/Xutf8.h
-fl_overlay.o: ../fltk3/draw.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_overlay.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_overlay.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_overlay.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_overlay.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_overlay.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_overlay_visual.o: ../config.h
-fl_plastic.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_plastic.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_plastic.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_plastic.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_plastic.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_plastic.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_plastic.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_plastic.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_plastic.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-fl_plastic.o: ../fltk3/Export.h ../config.h
-fl_read_image.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Export.h
-fl_read_image.o: ../fltk3/types.h ../fltk3/Window.h ../fltk3/Xutf8.h
-fl_read_image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/draw.h
-fl_read_image.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_read_image.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_read_image.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_read_image.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_read_image.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_read_image.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-fl_read_image.o: ../fltk3/Export.h ../config.h
-fl_rect.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_rect.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_rect.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_rect.o: ../fltk3/Printer.h ../fltk3/x.h ../fltk3/Window.h
-fl_rect.o: ../fltk3/PagedDevice.h ../fltk3/Device.h ../fltk3/Object.h
-fl_rect.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-fl_rect.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-fl_rect.o: ../fltk3/RGBImage.h ../fltk3/Window.h ../fltk3/Group.h
-fl_rect.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/draw.h
-fl_rect.o: ../fltk3/enumerations.h ../fltk3/PostScript.h
-fl_round_box.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_round_box.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_round_box.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_round_box.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_round_box.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_round_box.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_round_box.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_round_box.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_round_box.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_rounded_box.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_rounded_box.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_rounded_box.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_rounded_box.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_rounded_box.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_rounded_box.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_rounded_box.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_rounded_box.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_rounded_box.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_scroll_area.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h
-fl_scroll_area.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-fl_scroll_area.o: ../fltk3/enumerations.h ../fltk3/x.h ../fltk3/Window.h
-fl_scroll_area.o: ../fltk3/draw.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_scroll_area.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_scroll_area.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_scroll_area.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_scroll_area.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_scroll_area.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_set_font.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_set_font.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_set_font.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/draw.h
-fl_set_font.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_set_font.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_set_font.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_set_font.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_set_font.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_set_font.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h flstring.h
-fl_set_font.o: ../fltk3/Export.h ../config.h Fl_Font.H ../fltk3/Xutf8.h
-fl_set_fonts.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_set_fonts.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_set_fonts.o: ../fltk3/x.h ../fltk3/Window.h Fl_Font.H ../config.h
-fl_set_fonts.o: ../fltk3/Xutf8.h flstring.h ../fltk3/Export.h
-fl_set_fonts.o: fl_set_fonts_x.cxx
-fl_shadow_box.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_shadow_box.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_shadow_box.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_shadow_box.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_shadow_box.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_shadow_box.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_shadow_box.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_shadow_box.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_shadow_box.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_shortcut.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_shortcut.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_shortcut.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_shortcut.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_shortcut.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_shortcut.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_shortcut.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_shortcut.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_shortcut.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_shortcut.o: flstring.h ../fltk3/Export.h ../config.h
-fl_show_colormap.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_show_colormap.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_show_colormap.o: ../fltk3/SingleWindow.h ../fltk3/Window.h ../fltk3/draw.h
-fl_show_colormap.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_show_colormap.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_show_colormap.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_show_colormap.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_show_colormap.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_show_colormap.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_show_colormap.o: ../fltk3/show_colormap.h ../config.h
-fl_symbols.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fl_symbols.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fl_symbols.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h
-fl_symbols.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-fl_symbols.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-fl_symbols.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-fl_symbols.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-fl_symbols.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-fl_symbols.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/math.h
-fl_symbols.o: flstring.h ../fltk3/Export.h ../config.h
-fl_utf8.o: ../config.h ../fltk3/filename.h ../fltk3/Xutf8.h ../fltk3/utf8.h
-fl_utf.o: ../fltk3/utf8.h xutf8/mk_wcwidth.c
-fl_vertex.o: ../config.h ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-fl_vertex.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Window.h
-fl_vertex.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-fl_vertex.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Wrapper.h
-fl_vertex.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fl_vertex.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-fl_vertex.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-fl_vertex.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-fl_vertex.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/math.h
-numericsort.o: ../config.h ../fltk3/filename.h
-ps_image.o: ../fltk3/PostScript.h ../fltk3/PagedDevice.h ../fltk3/Device.h
-ps_image.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Export.h
-ps_image.o: ../fltk3/types.h ../fltk3/Window.h ../fltk3/Xutf8.h
-ps_image.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-ps_image.o: ../fltk3/Image.h ../fltk3/Object.h ../fltk3/Bitmap.h
-ps_image.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-ps_image.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-ps_image.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-ps_image.o: ../fltk3/draw.h ../fltk3/enumerations.h ../fltk3/run.h
-ps_image.o: ../fltk3/utf8.h
-scandir.o: flstring.h ../fltk3/Export.h ../config.h
-screen_xywh.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-screen_xywh.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-screen_xywh.o: ../fltk3/x.h ../fltk3/Window.h ../config.h
-Fl_Gl_Choice.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Gl_Choice.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Gl_Choice.o: ../fltk3/x.h ../fltk3/Window.h Fl_Gl_Choice.H
-Fl_Gl_Choice.o: ../fltk3/glDraw.h ../fltk3/gl.h flstring.h ../fltk3/Export.h
-Fl_Gl_Choice.o: ../fltk3/utf8.h
-Fl_Gl_Overlay.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_Gl_Overlay.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_Gl_Overlay.o: ../fltk3/x.h ../fltk3/Window.h Fl_Gl_Choice.H
-Fl_Gl_Overlay.o: ../fltk3/GlWindow.h
-Fl_Gl_Device_Plugin.o: ../config.h ../fltk3/Printer.h ../fltk3/x.h
-Fl_Gl_Device_Plugin.o: ../fltk3/enumerations.h ../fltk3/Export.h
-Fl_Gl_Device_Plugin.o: ../fltk3/types.h ../fltk3/Window.h ../fltk3/Xutf8.h
-Fl_Gl_Device_Plugin.o: ../fltk3/PagedDevice.h ../fltk3/Device.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Object.h ../fltk3/Bitmap.h ../fltk3/Image.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-Fl_Gl_Device_Plugin.o: ../fltk3/Rectangle.h ../fltk3/draw.h
-Fl_Gl_Device_Plugin.o: ../fltk3/enumerations.h ../fltk3/PostScript.h
-Fl_Gl_Device_Plugin.o: ../fltk3/GlWindow.h Fl_Gl_Choice.H ../fltk3/run.h
-Fl_Gl_Device_Plugin.o: ../fltk3/utf8.h
-Fl_Gl_Window.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/Wrapper.h
-Fl_Gl_Window.o: ../fltk3/Widget.h ../fltk3/enumerations.h ../fltk3/Export.h
-Fl_Gl_Window.o: ../fltk3/types.h ../fltk3/Rectangle.h ../fltk3/Object.h
-Fl_Gl_Window.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Xutf8.h ../fltk3/x.h
-Fl_Gl_Window.o: ../fltk3/Window.h Fl_Gl_Choice.H ../fltk3/GlWindow.h
-Fl_Gl_Window.o: ../fltk3/utf8.h
-freeglut_geometry.o: ../fltk3/glut.h ../fltk3/gl.h ../fltk3/enumerations.h
-freeglut_geometry.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/run.h
-freeglut_geometry.o: ../fltk3/utf8.h ../fltk3/Xutf8.h ../fltk3/GlWindow.h
-freeglut_geometry.o: ../fltk3/Window.h ../fltk3/math.h
-freeglut_stroke_mono_roman.o: ../fltk3/glut.h ../fltk3/gl.h
-freeglut_stroke_mono_roman.o: ../fltk3/enumerations.h ../fltk3/Export.h
-freeglut_stroke_mono_roman.o: ../fltk3/types.h ../fltk3/run.h ../fltk3/utf8.h
-freeglut_stroke_mono_roman.o: ../fltk3/Xutf8.h ../fltk3/GlWindow.h
-freeglut_stroke_mono_roman.o: ../fltk3/Window.h
-freeglut_stroke_roman.o: ../fltk3/glut.h ../fltk3/gl.h
-freeglut_stroke_roman.o: ../fltk3/enumerations.h ../fltk3/Export.h
-freeglut_stroke_roman.o: ../fltk3/types.h ../fltk3/run.h ../fltk3/utf8.h
-freeglut_stroke_roman.o: ../fltk3/Xutf8.h ../fltk3/GlWindow.h
-freeglut_stroke_roman.o: ../fltk3/Window.h
-freeglut_teapot.o: ../fltk3/glut.h ../fltk3/gl.h ../fltk3/enumerations.h
-freeglut_teapot.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/run.h
-freeglut_teapot.o: ../fltk3/utf8.h ../fltk3/Xutf8.h ../fltk3/GlWindow.h
-freeglut_teapot.o: ../fltk3/Window.h freeglut_teapot_data.h
-gl_draw.o: flstring.h ../fltk3/Export.h ../config.h ../fltk3/run.h
-gl_draw.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-gl_draw.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/gl.h
-gl_draw.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/draw.h
-gl_draw.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Group.h
-gl_draw.o: ../fltk3/Widget.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-gl_draw.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Device.h
-gl_draw.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-gl_draw.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-gl_draw.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h Fl_Gl_Choice.H Fl_Font.H
-gl_draw.o: ../fltk3/Xutf8.h ../fltk3/utf8.h
-gl_start.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-gl_start.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-gl_start.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-gl_start.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-gl_start.o: ../fltk3/Object.h ../fltk3/x.h ../fltk3/Window.h ../fltk3/draw.h
-gl_start.o: ../fltk3/enumerations.h ../fltk3/Device.h ../fltk3/Object.h
-gl_start.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-gl_start.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-gl_start.o: ../fltk3/RGBImage.h Fl_Gl_Choice.H
-glut_compatability.o: flstring.h ../fltk3/Export.h ../config.h
-glut_compatability.o: ../fltk3/glut.h ../fltk3/gl.h ../fltk3/enumerations.h
-glut_compatability.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/run.h
-glut_compatability.o: ../fltk3/utf8.h ../fltk3/Xutf8.h ../fltk3/GlWindow.h
-glut_compatability.o: ../fltk3/Window.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-glut_compatability.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-glut_compatability.o: ../fltk3/MenuItem.h ../fltk3/Widget.h ../fltk3/Image.h
-glut_font.o: ../config.h ../fltk3/glut.h ../fltk3/gl.h
-glut_font.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
-glut_font.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Xutf8.h
-glut_font.o: ../fltk3/GlWindow.h ../fltk3/Window.h
-fl_images_core.o: ../fltk3/SharedImage.h ../fltk3/Image.h ../fltk3/BMPImage.h
-fl_images_core.o: ../fltk3/GIFImage.h ../fltk3/Pixmap.h ../fltk3/JPEGImage.h
-fl_images_core.o: ../fltk3/PNGImage.h ../fltk3/PNMImage.h flstring.h
-fl_images_core.o: ../fltk3/Export.h ../config.h
-Fl_BMP_Image.o: ../fltk3/BMPImage.h ../fltk3/Image.h ../fltk3/utf8.h
-Fl_BMP_Image.o: ../config.h
-Fl_File_Icon2.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_File_Icon2.o: ../fltk3/math.h ../fltk3/FileIcon.h ../fltk3/run.h
-Fl_File_Icon2.o: ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-Fl_File_Icon2.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_File_Icon2.o: ../fltk3/SharedImage.h ../fltk3/Image.h ../fltk3/Widget.h
-Fl_File_Icon2.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/draw.h
-Fl_File_Icon2.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/enumerations.h
-Fl_File_Icon2.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_File_Icon2.o: ../fltk3/Wrapper.h ../fltk3/Device.h ../fltk3/Object.h
-Fl_File_Icon2.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-Fl_File_Icon2.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_File_Icon2.o: ../fltk3/filename.h
-Fl_GIF_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_GIF_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_GIF_Image.o: ../fltk3/GIFImage.h ../fltk3/Pixmap.h ../fltk3/Image.h
-Fl_GIF_Image.o: ../fltk3/utf8.h flstring.h ../fltk3/Export.h ../config.h
-Fl_Help_Dialog.o: ../fltk3/HelpDialog.h ../fltk3/run.h ../fltk3/utf8.h
-Fl_Help_Dialog.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-Fl_Help_Dialog.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-Fl_Help_Dialog.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-Fl_Help_Dialog.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-Fl_Help_Dialog.o: ../fltk3/Object.h ../fltk3/Button.h ../fltk3/Input.h
-Fl_Help_Dialog.o: ../fltk3/Input_.h ../fltk3/Box.h ../fltk3/HelpView.h
-Fl_Help_Dialog.o: ../fltk3/run.h ../fltk3/Group.h ../fltk3/Scrollbar.h
-Fl_Help_Dialog.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/draw.h
-Fl_Help_Dialog.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-Fl_Help_Dialog.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-Fl_Help_Dialog.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/Bitmap.h
-Fl_Help_Dialog.o: ../fltk3/Image.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-Fl_Help_Dialog.o: ../fltk3/SharedImage.h ../fltk3/filename.h flstring.h
-Fl_Help_Dialog.o: ../fltk3/Export.h ../config.h ../fltk3/ask.h
-Fl_JPEG_Image.o: ../fltk3/JPEGImage.h ../fltk3/Image.h ../fltk3/SharedImage.h
-Fl_JPEG_Image.o: ../fltk3/utf8.h ../config.h
-Fl_PNG_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_PNG_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_PNG_Image.o: ../fltk3/PNGImage.h ../fltk3/Image.h ../fltk3/SharedImage.h
-Fl_PNG_Image.o: ../config.h ../fltk3/utf8.h
-Fl_PNM_Image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-Fl_PNM_Image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-Fl_PNM_Image.o: ../fltk3/PNMImage.h ../fltk3/Image.h ../fltk3/utf8.h
-Fl_PNM_Image.o: flstring.h ../fltk3/Export.h ../config.h
-flstring.o: flstring.h ../fltk3/Export.h ../config.h
-vsnprintf.o: flstring.h ../fltk3/Export.h ../config.h
-xutf8/case.o: xutf8/headers/case.h
-xutf8/is_spacing.o: xutf8/headers/spacing.h
-xutf8/keysym2Ucs.o: ../fltk3/Xutf8.h xutf8/imKStoUCS.c xutf8/Xlibint.h
-xutf8/keysym2Ucs.o: xutf8/Ximint.h
-xutf8/utf8Input.o: ../config.h ../fltk3/Xutf8.h xutf8/lcUniConv/big5.h
-xutf8/utf8Input.o: xutf8/lcUniConv/gb2312.h xutf8/lcUniConv/cp936ext.h
-xutf8/utf8Input.o: xutf8/lcUniConv/jisx0201.h xutf8/lcUniConv/jisx0208.h
-xutf8/utf8Input.o: xutf8/lcUniConv/jisx0212.h xutf8/lcUniConv/ksc5601.h
-xutf8/utf8Utils.o: ../fltk3/Xutf8.h
-xutf8/utf8Wrap.o: ../fltk3/Xutf8.h xutf8/ucs2fontmap.c
-xutf8/utf8Wrap.o: xutf8/lcUniConv/cp936ext.h xutf8/lcUniConv/big5.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/gb2312.h xutf8/lcUniConv/iso8859_10.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_11.h xutf8/lcUniConv/iso8859_13.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_14.h xutf8/lcUniConv/iso8859_15.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_2.h xutf8/lcUniConv/iso8859_3.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_4.h xutf8/lcUniConv/iso8859_5.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_6.h xutf8/lcUniConv/iso8859_7.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_8.h xutf8/lcUniConv/iso8859_9.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/jisx0201.h xutf8/lcUniConv/jisx0208.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/jisx0212.h xutf8/lcUniConv/koi8_r.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/koi8_u.h xutf8/lcUniConv/ksc5601.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/cp1251.h xutf8/headers/symbol_.h
-xutf8/utf8Wrap.o: xutf8/headers/dingbats_.h

Deleted: branches/branch-3.0/src/mediumarrow.h

Deleted: branches/branch-3.0/src/new.xbm

Deleted: branches/branch-3.0/src/ns.xbm

Deleted: branches/branch-3.0/src/ns_mask.xbm

Deleted: branches/branch-3.0/src/numericsort.cxx

Copied: branches/branch-3.0/src/png (from rev 8987, branches/branch-3.0/png)

Deleted: branches/branch-3.0/src/png/png.h

Deleted: branches/branch-3.0/src/png/pngconf.h

Deleted: branches/branch-3.0/src/png/pngdebug.h

Deleted: branches/branch-3.0/src/png/pnginfo.h

Deleted: branches/branch-3.0/src/png/pnglibconf.h

Deleted: branches/branch-3.0/src/png/pngpriv.h

Deleted: branches/branch-3.0/src/png/pngstruct.h

Deleted: branches/branch-3.0/src/print_panel.cxx

Deleted: branches/branch-3.0/src/print_panel.h

Deleted: branches/branch-3.0/src/ps_image.cxx

Deleted: branches/branch-3.0/src/scandir.cxx

Deleted: branches/branch-3.0/src/scandir_win32.cxx

Deleted: branches/branch-3.0/src/screen_xywh.cxx

Deleted: branches/branch-3.0/src/slowarrow.h

Deleted: branches/branch-3.0/src/tile.xpm

Deleted: branches/branch-3.0/src/up.xbm

Deleted: branches/branch-3.0/src/vsnprintf.c

Copied: branches/branch-3.0/src/zlib (from rev 8987, branches/branch-3.0/zlib)

Deleted: branches/branch-3.0/src/zlib/crc32.h

Deleted: branches/branch-3.0/src/zlib/deflate.h

Deleted: branches/branch-3.0/src/zlib/gzguts.h

Deleted: branches/branch-3.0/src/zlib/inffast.h

Deleted: branches/branch-3.0/src/zlib/inffixed.h

Deleted: branches/branch-3.0/src/zlib/inflate.h

Deleted: branches/branch-3.0/src/zlib/inftrees.h

Deleted: branches/branch-3.0/src/zlib/trees.h

Deleted: branches/branch-3.0/src/zlib/zconf.h

Deleted: branches/branch-3.0/src/zlib/zlib.h

Deleted: branches/branch-3.0/src/zlib/zutil.h

Modified: branches/branch-3.0/test/Makefile
===================================================================
--- branches/branch-3.0/test/Makefile	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/test/Makefile	2011-08-22 15:21:44 UTC (rev 8991)
@@ -116,6 +116,8 @@
 	clock$(EXEEXT) \
 	colbrowser$(EXEEXT) \
 	color_chooser$(EXEEXT) \
+	cube$(EXEEXT) \
+	CubeView$(EXEEXT) \
 	cursor$(EXEEXT) \
 	curve$(EXEEXT) \
 	device$(EXEEXT) \
@@ -124,6 +126,10 @@
 	fast_slow$(EXEEXT) \
 	file_chooser$(EXEEXT) \
 	fonts$(EXEEXT) \
+	fractals$(EXEEXT) \
+	fullscreen$(EXEEXT) \
+	gl_overlay$(EXEEXT) \
+	glpuzzle$(EXEEXT) \
 	hello$(EXEEXT) \
 	help$(EXEEXT) \
 	iconize$(EXEEXT) \
@@ -152,6 +158,7 @@
 	resize$(EXEEXT) \
 	rotated_text$(EXEEXT) \
 	scroll$(EXEEXT) \
+	shape$(EXEEXT) \
 	subwindow$(EXEEXT) \
 	sudoku$(EXEEXT) \
 	symbols$(EXEEXT) \
@@ -165,14 +172,7 @@
 	utf8$(EXEEXT) \
 	valuators$(EXEEXT)
 
-GLALL = \
-	cube$(EXEEXT) \
-	CubeView$(EXEEXT) \
-	fractals$(EXEEXT) \
-	fullscreen$(EXEEXT) \
-	gl_overlay$(EXEEXT) \
-	glpuzzle$(EXEEXT) \
-	shape$(EXEEXT)
+GLALL =
 
 all:	$(ALL) $(GLDEMOS)
 
@@ -268,301 +268,301 @@
 # All demos depend on the FLTK library...
 $(ALL): $(FLTK_LIBNAME)
 
-Demo$(EXEEXT): demo.o $(FLTK_LIB_NAME)
+Demo$(EXEEXT): demo.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINK_FLTK3) $(LDLIBS)
 
-adjuster$(EXEEXT): adjuster.o $(FLTK_LIB_NAME)
+adjuster$(EXEEXT): adjuster.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ adjuster.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ adjuster.o $(LINK_FLTK3) $(LDLIBS)
 
-arc$(EXEEXT): arc.o $(FLTK_LIB_NAME)
+arc$(EXEEXT): arc.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ arc.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ arc.o $(LINK_FLTK3) $(LDLIBS)
 
-ask$(EXEEXT): ask.o $(FLTK_LIB_NAME)
+ask$(EXEEXT): ask.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ ask.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ ask.o $(LINK_FLTK3) $(LDLIBS)
 
-bitmap$(EXEEXT): bitmap.o $(FLTK_LIB_NAME)
+bitmap$(EXEEXT): bitmap.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ bitmap.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ bitmap.o $(LINK_FLTK3) $(LDLIBS)
 
-blocks$(EXEEXT): blocks.o $(FLTK_LIB_NAME)
+blocks$(EXEEXT): blocks.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ blocks.o $(LINK_FLTK) $(AUDIOLIBS) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ blocks.o $(LINK_FLTK3) $(AUDIOLIBS) $(LDLIBS)
 
-boxtype$(EXEEXT): boxtype.o $(FLTK_LIB_NAME)
+boxtype$(EXEEXT): boxtype.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ boxtype.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ boxtype.o $(LINK_FLTK3) $(LDLIBS)
 
-browser$(EXEEXT): browser.o $(FLTK_LIB_NAME)
+browser$(EXEEXT): browser.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ browser.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ browser.o $(LINK_FLTK3) $(LDLIBS)
 
-button$(EXEEXT): button.o $(FLTK_LIB_NAME)
+button$(EXEEXT): button.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ button.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ button.o $(LINK_FLTK3) $(LDLIBS)
 
-buttons$(EXEEXT): buttons.o $(FLTK_LIB_NAME)
+buttons$(EXEEXT): buttons.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ buttons.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ buttons.o $(LINK_FLTK3) $(LDLIBS)
 
-checkers$(EXEEXT): checkers.o $(FLTK_LIB_NAME)
+checkers$(EXEEXT): checkers.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ checkers.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ checkers.o $(LINK_FLTK3) $(LDLIBS)
 
-clock$(EXEEXT): clock.o $(FLTK_LIB_NAME)
+clock$(EXEEXT): clock.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ clock.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ clock.o $(LINK_FLTK3) $(LDLIBS)
 
-colbrowser$(EXEEXT): colbrowser.o $(FLTK_LIB_NAME)
+colbrowser$(EXEEXT): colbrowser.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ colbrowser.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ colbrowser.o $(LINK_FLTK3) $(LDLIBS)
 
-color_chooser$(EXEEXT): color_chooser.o $(FLTK_LIB_NAME)
+color_chooser$(EXEEXT): color_chooser.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ color_chooser.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ color_chooser.o $(LINK_FLTK3) $(LDLIBS)
 
-cube$(EXEEXT): cube.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+cube$(EXEEXT): cube.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ cube.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ cube.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 
-CubeView$(EXEEXT): CubeView.o CubeMain.o CubeViewUI.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+CubeView$(EXEEXT): CubeView.o CubeMain.o CubeViewUI.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ CubeView.o CubeMain.o CubeViewUI.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ CubeView.o CubeMain.o CubeViewUI.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 CubeViewUI.o: CubeViewUI.h
 CubeViewUI.cxx: CubeViewUI.fl ../fluid/fluid$(EXEEXT)
 
-cursor$(EXEEXT): cursor.o $(FLTK_LIB_NAME)
+cursor$(EXEEXT): cursor.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ cursor.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ cursor.o $(LINK_FLTK3) $(LDLIBS)
 
-curve$(EXEEXT): curve.o $(FLTK_LIB_NAME)
+curve$(EXEEXT): curve.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ curve.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ curve.o $(LINK_FLTK3) $(LDLIBS)
 
-device$(EXEEXT): device.o $(FLTK_LIB_NAME) $(FLTK_IMAGES_LIB_NAME) $(FLTK_PNG_LIB_NAME) $(FLTK_JPEG_LIB_NAME) $(FLTK_ZLIB_LIB_NAME)
+device$(EXEEXT): device.o $(FLTK3_LIB_NAME) $(FLTK3IMAGES_LIB_NAME) $(FLTK3PNG_LIB_NAME) $(FLTK3JPEG_LIB_NAME) $(FLTK3ZLIB_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ device.o $(LINK_FLTK) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ device.o $(LINK_FLTK3) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(LDLIBS)
 
-doublebuffer$(EXEEXT): doublebuffer.o $(FLTK_LIB_NAME)
+doublebuffer$(EXEEXT): doublebuffer.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ doublebuffer.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ doublebuffer.o $(LINK_FLTK3) $(LDLIBS)
 
-editor$(EXEEXT): editor.o $(FLTK_LIB_NAME)
+editor$(EXEEXT): editor.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ editor.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ editor.o $(LINK_FLTK3) $(LDLIBS)
 
-fast_slow$(EXEEXT): fast_slow.o $(FLTK_LIB_NAME)
+fast_slow$(EXEEXT): fast_slow.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fast_slow.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fast_slow.o $(LINK_FLTK3) $(LDLIBS)
 fast_slow.o: fast_slow.h
 fast_slow.cxx: fast_slow.fl ../fluid/fluid$(EXEEXT)
 
-file_chooser$(EXEEXT): file_chooser.o $(FLTK_LIB_NAME) $(FLTK_IMAGES_LIB_NAME) $(FLTK_PNG_LIB_NAME) $(FLTK_JPEG_LIB_NAME) $(FLTK_ZLIB_LIB_NAME)
+file_chooser$(EXEEXT): file_chooser.o $(FLTK3_LIB_NAME) $(FLTK3IMAGES_LIB_NAME) $(FLTK3PNG_LIB_NAME) $(FLTK3JPEG_LIB_NAME) $(FLTK3ZLIB_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ file_chooser.o $(LINK_FLTK) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ file_chooser.o $(LINK_FLTK3) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(LDLIBS)
 
-fonts$(EXEEXT): fonts.o $(FLTK_LIB_NAME)
+fonts$(EXEEXT): fonts.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fonts.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fonts.o $(LINK_FLTK3) $(LDLIBS)
 
-fractals$(EXEEXT): fractals.o fracviewer.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+fractals$(EXEEXT): fractals.o fracviewer.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fractals.o fracviewer.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fractals.o fracviewer.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 
-fullscreen$(EXEEXT): fullscreen.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+fullscreen$(EXEEXT): fullscreen.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fullscreen.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fullscreen.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 
-gl_overlay$(EXEEXT): gl_overlay.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+gl_overlay$(EXEEXT): gl_overlay.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ gl_overlay.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ gl_overlay.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 
-glpuzzle$(EXEEXT): glpuzzle.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+glpuzzle$(EXEEXT): glpuzzle.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ glpuzzle.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ glpuzzle.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 
-hello$(EXEEXT): hello.o $(FLTK_LIB_NAME)
+hello$(EXEEXT): hello.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ hello.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ hello.o $(LINK_FLTK3) $(LDLIBS)
 
-help$(EXEEXT): help.o $(FLTK_LIB_NAME) $(FLTK_IMAGES_LIB_NAME) $(FLTK_PNG_LIB_NAME) $(FLTK_JPEG_LIB_NAME) $(FLTK_ZLIB_LIB_NAME)
+help$(EXEEXT): help.o $(FLTK3_LIB_NAME) $(FLTK3IMAGES_LIB_NAME) $(FLTK3PNG_LIB_NAME) $(FLTK3JPEG_LIB_NAME) $(FLTK3ZLIB_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ help.o $(LINK_FLTK) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ help.o $(LINK_FLTK3) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(LDLIBS)
 
-iconize$(EXEEXT): iconize.o $(FLTK_LIB_NAME)
+iconize$(EXEEXT): iconize.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ iconize.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ iconize.o $(LINK_FLTK3) $(LDLIBS)
 
-image$(EXEEXT): image.o $(FLTK_LIB_NAME)
+image$(EXEEXT): image.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ image.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ image.o $(LINK_FLTK3) $(LDLIBS)
 
-inactive$(EXEEXT): inactive.o $(FLTK_LIB_NAME)
+inactive$(EXEEXT): inactive.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ inactive.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ inactive.o $(LINK_FLTK3) $(LDLIBS)
 inactive.o: inactive.h
 inactive.cxx: inactive.fl ../fluid/fluid$(EXEEXT)
 
-input$(EXEEXT): input.o $(FLTK_LIB_NAME)
+input$(EXEEXT): input.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ input.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ input.o $(LINK_FLTK3) $(LDLIBS)
 
-input_choice$(EXEEXT): input_choice.o $(FLTK_LIB_NAME)
+input_choice$(EXEEXT): input_choice.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ input_choice.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ input_choice.o $(LINK_FLTK3) $(LDLIBS)
 
-keyboard$(EXEEXT): keyboard.o keyboard_ui.o $(FLTK_LIB_NAME)
+keyboard$(EXEEXT): keyboard.o keyboard_ui.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ keyboard.o keyboard_ui.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ keyboard.o keyboard_ui.o $(LINK_FLTK3) $(LDLIBS)
 keyboard_ui.o: keyboard_ui.h
 keyboard_ui.cxx: keyboard_ui.fl ../fluid/fluid$(EXEEXT)
 
-label$(EXEEXT): label.o $(FLTK_LIB_NAME)
+label$(EXEEXT): label.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ label.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ label.o $(LINK_FLTK3) $(LDLIBS)
 
-line_style$(EXEEXT): line_style.o $(FLTK_LIB_NAME)
+line_style$(EXEEXT): line_style.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ line_style.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ line_style.o $(LINK_FLTK3) $(LDLIBS)
 
-list_visuals$(EXEEXT): list_visuals.o $(FLTK_LIB_NAME)
+list_visuals$(EXEEXT): list_visuals.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ list_visuals.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ list_visuals.o $(LINK_FLTK3) $(LDLIBS)
 
-mandelbrot$(EXEEXT): mandelbrot.o mandelbrot_ui.o $(FLTK_LIB_NAME)
+mandelbrot$(EXEEXT): mandelbrot.o mandelbrot_ui.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ mandelbrot.o mandelbrot_ui.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ mandelbrot.o mandelbrot_ui.o $(LINK_FLTK3) $(LDLIBS)
 mandelbrot_ui.o: mandelbrot_ui.h
 mandelbrot_ui.cxx: mandelbrot_ui.fl ../fluid/fluid$(EXEEXT)
 
-menubar$(EXEEXT): menubar.o $(FLTK_LIB_NAME)
+menubar$(EXEEXT): menubar.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ menubar.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ menubar.o $(LINK_FLTK3) $(LDLIBS)
 
-message$(EXEEXT): message.o $(FLTK_LIB_NAME)
+message$(EXEEXT): message.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ message.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ message.o $(LINK_FLTK3) $(LDLIBS)
 
-minimum$(EXEEXT): minimum.o $(FLTK_LIB_NAME)
+minimum$(EXEEXT): minimum.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ minimum.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ minimum.o $(LINK_FLTK3) $(LDLIBS)
 
-navigation$(EXEEXT): navigation.o $(FLTK_LIB_NAME)
+navigation$(EXEEXT): navigation.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ navigation.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ navigation.o $(LINK_FLTK3) $(LDLIBS)
 
-native-filechooser$(EXEEXT): native-filechooser.o $(FLTK_LIB_NAME)
+native-filechooser$(EXEEXT): native-filechooser.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ native-filechooser.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ native-filechooser.o $(LINK_FLTK3) $(LDLIBS)
 
-output$(EXEEXT): output.o $(FLTK_LIB_NAME)
+output$(EXEEXT): output.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ output.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ output.o $(LINK_FLTK3) $(LDLIBS)
 
-overlay$(EXEEXT): overlay.o $(FLTK_LIB_NAME)
+overlay$(EXEEXT): overlay.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ overlay.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ overlay.o $(LINK_FLTK3) $(LDLIBS)
 
-pack$(EXEEXT): pack.o $(FLTK_LIB_NAME)
+pack$(EXEEXT): pack.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ pack.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ pack.o $(LINK_FLTK3) $(LDLIBS)
 
-pixmap_browser$(EXEEXT): pixmap_browser.o $(FLTK_LIB_NAME) $(FLTK_IMAGES_LIB_NAME) $(FLTK_PNG_LIB_NAME) $(FLTK_JPEG_LIB_NAME) $(FLTK_ZLIB_LIB_NAME)
+pixmap_browser$(EXEEXT): pixmap_browser.o $(FLTK3_LIB_NAME) $(FLTK3IMAGES_LIB_NAME) $(FLTK3PNG_LIB_NAME) $(FLTK3JPEG_LIB_NAME) $(FLTK3ZLIB_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ pixmap_browser.o $(LINK_FLTK) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ pixmap_browser.o $(LINK_FLTK3) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(LDLIBS)
 
-pixmap$(EXEEXT): pixmap.o $(FLTK_LIB_NAME)
+pixmap$(EXEEXT): pixmap.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ pixmap.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ pixmap.o $(LINK_FLTK3) $(LDLIBS)
 
-preferences$(EXEEXT): preferences.o $(FLTK_LIB_NAME)
+preferences$(EXEEXT): preferences.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ preferences.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ preferences.o $(LINK_FLTK3) $(LDLIBS)
 preferences.o: preferences.h
 preferences.cxx: preferences.fl ../fluid/fluid$(EXEEXT)
 
-radio$(EXEEXT): radio.o $(FLTK_LIB_NAME)
+radio$(EXEEXT): radio.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ radio.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ radio.o $(LINK_FLTK3) $(LDLIBS)
 radio.o: radio.h
 radio.cxx: radio.fl ../fluid/fluid$(EXEEXT)
 
-resizebox$(EXEEXT): resizebox.o $(FLTK_LIB_NAME)
+resizebox$(EXEEXT): resizebox.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ resizebox.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ resizebox.o $(LINK_FLTK3) $(LDLIBS)
 
-resize$(EXEEXT): resize.o $(FLTK_LIB_NAME)
+resize$(EXEEXT): resize.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ resize.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ resize.o $(LINK_FLTK3) $(LDLIBS)
 resize.o: resize.h
 resize.cxx: resize.fl ../fluid/fluid$(EXEEXT)
 
-rotated_text$(EXEEXT): rotated_text.o $(FLTK_LIB_NAME)
+rotated_text$(EXEEXT): rotated_text.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ rotated_text.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ rotated_text.o $(LINK_FLTK3) $(LDLIBS)
 
-scroll$(EXEEXT): scroll.o $(FLTK_LIB_NAME)
+scroll$(EXEEXT): scroll.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ scroll.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ scroll.o $(LINK_FLTK3) $(LDLIBS)
 
-shape$(EXEEXT): shape.o $(FLTK_LIB_NAME) $(FLTK_GL_LIB_NAME)
+shape$(EXEEXT): shape.o $(FLTK3_LIB_NAME) $(FLTK3GL_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ shape.o $(LINK_FLTK) $(LINK_FLTK_GL) $(GLLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ shape.o $(LINK_FLTK3) $(LINK_FLTK3GL) $(GLLIB) $(LDLIBS)
 
-subwindow$(EXEEXT): subwindow.o $(FLTK_LIB_NAME)
+subwindow$(EXEEXT): subwindow.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ subwindow.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ subwindow.o $(LINK_FLTK3) $(LDLIBS)
 
-sudoku$(EXEEXT): sudoku.o $(FLTK_LIB_NAME) $(FLTK_IMAGES_LIB_NAME) $(FLTK_PNG_LIB_NAME) $(FLTK_JPEG_LIB_NAME) $(FLTK_ZLIB_LIB_NAME)
+sudoku$(EXEEXT): sudoku.o $(FLTK3_LIB_NAME) $(FLTK3IMAGES_LIB_NAME) $(FLTK3PNG_LIB_NAME) $(FLTK3JPEG_LIB_NAME) $(FLTK3ZLIB_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ sudoku.o $(LINK_FLTK) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(AUDIOLIBS) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ sudoku.o $(LINK_FLTK3) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(AUDIOLIBS) $(LDLIBS)
 
-symbols$(EXEEXT): symbols.o $(FLTK_LIB_NAME)
+symbols$(EXEEXT): symbols.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ symbols.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ symbols.o $(LINK_FLTK3) $(LDLIBS)
 
-table$(EXEEXT): table.o $(FLTK_LIB_NAME)
+table$(EXEEXT): table.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ table.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ table.o $(LINK_FLTK3) $(LDLIBS)
 
-tabs$(EXEEXT): tabs.o $(FLTK_LIB_NAME)
+tabs$(EXEEXT): tabs.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tabs.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tabs.o $(LINK_FLTK3) $(LDLIBS)
 tabs.o: tabs.h
 tabs.cxx: tabs.fl ../fluid/fluid$(EXEEXT)
 
-threads$(EXEEXT): threads.o $(FLTK_LIB_NAME)
+threads$(EXEEXT): threads.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ threads.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ threads.o $(LINK_FLTK3) $(LDLIBS)
 
-tile$(EXEEXT): tile.o $(FLTK_LIB_NAME)
+tile$(EXEEXT): tile.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tile.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tile.o $(LINK_FLTK3) $(LDLIBS)
 
-tiled_image$(EXEEXT): tiled_image.o $(FLTK_LIB_NAME) $(FLTK_IMAGES_LIB_NAME) $(FLTK_PNG_LIB_NAME) $(FLTK_JPEG_LIB_NAME) $(FLTK_ZLIB_LIB_NAME)
+tiled_image$(EXEEXT): tiled_image.o $(FLTK3_LIB_NAME) $(FLTK3IMAGES_LIB_NAME) $(FLTK3PNG_LIB_NAME) $(FLTK3JPEG_LIB_NAME) $(FLTK3ZLIB_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tiled_image.o $(LINK_FLTK) $(LINK_FLTK_IMAGES) $(LINK_FLTK_PNG) $(LINK_FLTK_JPEG) $(LINK_FLTK_ZLIB) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tiled_image.o $(LINK_FLTK3) $(LINK_FLTK3IMAGES) $(LINK_FLTK3PNG) $(LINK_FLTK3JPEG) $(LINK_FLTK3ZLIB) $(LDLIBS)
 
-tree$(EXEEXT): tree.o $(FLTK_LIB_NAME)
+tree$(EXEEXT): tree.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tree.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ tree.o $(LINK_FLTK3) $(LDLIBS)
 tree.o: tree.h
 tree.cxx: tree.fl ../fluid/fluid$(EXEEXT)
 
-unittests$(EXEEXT): unittests.o unittest_about.o unittest_circles.o unittest_images.o unittest_lines.o unittest_points.o unittest_rects.o unittest_scrollbarsize.o unittest_text.o unittest_viewport.o $(FLTK_LIB_NAME)
+unittests$(EXEEXT): unittests.o unittest_about.o unittest_circles.o unittest_images.o unittest_lines.o unittest_points.o unittest_rects.o unittest_scrollbarsize.o unittest_text.o unittest_viewport.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ unittests.o unittest_about.o unittest_circles.o unittest_images.o unittest_lines.o unittest_points.o unittest_rects.o unittest_scrollbarsize.o unittest_text.o unittest_viewport.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ unittests.o unittest_about.o unittest_circles.o unittest_images.o unittest_lines.o unittest_points.o unittest_rects.o unittest_scrollbarsize.o unittest_text.o unittest_viewport.o $(LINK_FLTK3) $(LDLIBS)
 
-utf8$(EXEEXT): utf8.o $(FLTK_LIB_NAME)
+utf8$(EXEEXT): utf8.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ utf8.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ utf8.o $(LINK_FLTK3) $(LDLIBS)
 
-valuators$(EXEEXT): valuators.o $(FLTK_LIB_NAME)
+valuators$(EXEEXT): valuators.o $(FLTK3_LIB_NAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ valuators.o $(LINK_FLTK) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ valuators.o $(LINK_FLTK3) $(LDLIBS)
 valuators.o: valuators.h
 valuators.cxx: valuators.fl ../fluid/fluid$(EXEEXT)
 

Modified: branches/branch-3.0/test/makedepend
===================================================================
--- branches/branch-3.0/test/makedepend	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/test/makedepend	2011-08-22 15:21:44 UTC (rev 8991)
@@ -1,662 +1,44 @@
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
-unittests.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-unittests.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-unittests.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-unittests.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-unittests.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/HoldBrowser.h
-unittests.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-unittests.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Image.h
-unittests.o: ../fltk3/HelpView.h ../fltk3/run.h ../fltk3/draw.h ../fltk3/x.h
-unittests.o: ../fltk3/enumerations.h ../fltk3/Window.h ../fltk3/Device.h
-unittests.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-unittests.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-unittests.o: ../fltk3/RGBImage.h ../fltk3/SharedImage.h ../fltk3/filename.h
-unittests.o: ../fltk3/Group.h ../fltk3/Box.h ../fltk3/draw.h
-unittests.o: unittest_about.cxx unittest_points.cxx unittest_lines.cxx
-unittests.o: unittest_rects.cxx unittest_circles.cxx unittest_text.cxx
-unittests.o: unittest_images.cxx unittest_viewport.cxx
-unittests.o: unittest_scrollbarsize.cxx ../fltk3/Browser.h ../fltk3/Tree.h
-unittests.o: ../fltk3/Scrollbar.h ../fltk3/TreeItem.h
-unittests.o: ../fltk3/TreeItemArray.h ../fltk3/TreePrefs.h
-unittests.o: ../fltk3/ValueSlider.h
-adjuster.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-adjuster.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-adjuster.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-adjuster.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-adjuster.o: ../fltk3/Widget.h ../fltk3/Adjuster.h ../fltk3/Valuator.h
-adjuster.o: ../fltk3/Box.h
-arc.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-arc.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-arc.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-arc.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-arc.o: ../fltk3/Widget.h ../fltk3/HorValueSlider.h ../fltk3/ValueSlider.h
-arc.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/draw.h
-ask.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-ask.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-ask.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-ask.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-ask.o: ../fltk3/Widget.h ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Button.h
-ask.o: ../fltk3/ReturnButton.h ../fltk3/Button.h ../fltk3/ask.h
-bitmap.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-bitmap.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-bitmap.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-bitmap.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-bitmap.o: ../fltk3/Widget.h ../fltk3/Button.h ../fltk3/ToggleButton.h
-bitmap.o: ../fltk3/Button.h ../fltk3/Bitmap.h ../fltk3/Image.h
-blocks.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-blocks.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-blocks.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-blocks.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-blocks.o: ../fltk3/Widget.h ../fltk3/Button.h ../fltk3/Preferences.h
-blocks.o: ../fltk3/XPMImage.h ../fltk3/Pixmap.h ../fltk3/Image.h
-blocks.o: ../fltk3/XBMImage.h ../fltk3/Bitmap.h ../fltk3/TiledImage.h
-blocks.o: ../fltk3/draw.h ../fltk3/x.h ../config.h pixmaps/blast.xpm
-blocks.o: pixmaps/red.xpm pixmaps/red_bomb.xpm pixmaps/green.xpm
-blocks.o: pixmaps/green_bomb.xpm pixmaps/blue.xpm pixmaps/blue_bomb.xpm
-blocks.o: pixmaps/yellow.xpm pixmaps/yellow_bomb.xpm pixmaps/cyan.xpm
-blocks.o: pixmaps/cyan_bomb.xpm pixmaps/magenta.xpm pixmaps/magenta_bomb.xpm
-blocks.o: pixmaps/gray.xpm pixmaps/gray_bomb.xpm
-boxtype.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-boxtype.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-boxtype.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-boxtype.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-boxtype.o: ../fltk3/Widget.h ../fltk3/Box.h
-browser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-browser.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/SelectBrowser.h
-browser.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Group.h
-browser.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-browser.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Scrollbar.h
-browser.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Image.h
-browser.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Button.h
-browser.o: ../fltk3/IntInput.h ../fltk3/Input.h ../fltk3/Input_.h
-browser.o: ../fltk3/ask.h
-button.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-button.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-button.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-button.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-buttons.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-buttons.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-buttons.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-buttons.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-buttons.o: ../fltk3/ReturnButton.h ../fltk3/Button.h ../fltk3/RepeatButton.h
-buttons.o: ../fltk3/run.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-buttons.o: ../fltk3/LightButton.h ../fltk3/RoundButton.h ../fltk3/Tooltip.h
-cairo_test.o: ../config.h ../fltk3/ask.h ../fltk3/enumerations.h
-cairo_test.o: ../fltk3/Export.h ../fltk3/types.h
-checkers.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-checkers.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-checkers.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-checkers.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-checkers.o: ../fltk3/Widget.h ../fltk3/Bitmap.h ../fltk3/Image.h
-checkers.o: ../fltk3/draw.h ../fltk3/MenuItem.h ../fltk3/ask.h
+blocks.o: ../config.h pixmaps/blast.xpm pixmaps/red.xpm pixmaps/red_bomb.xpm
+blocks.o: pixmaps/green.xpm pixmaps/green_bomb.xpm pixmaps/blue.xpm
+blocks.o: pixmaps/blue_bomb.xpm pixmaps/yellow.xpm pixmaps/yellow_bomb.xpm
+blocks.o: pixmaps/cyan.xpm pixmaps/cyan_bomb.xpm pixmaps/magenta.xpm
+blocks.o: pixmaps/magenta_bomb.xpm pixmaps/gray.xpm pixmaps/gray_bomb.xpm
 checkers.o: pixmaps/black_1.xbm pixmaps/black_2.xbm pixmaps/black_3.xbm
 checkers.o: pixmaps/black_4.xbm pixmaps/white_1.xbm pixmaps/white_2.xbm
 checkers.o: pixmaps/white_3.xbm pixmaps/white_4.xbm pixmaps/blackking_1.xbm
 checkers.o: pixmaps/blackking_2.xbm pixmaps/blackking_3.xbm
 checkers.o: pixmaps/blackking_4.xbm pixmaps/whiteking_1.xbm
 checkers.o: pixmaps/whiteking_2.xbm pixmaps/whiteking_3.xbm
-checkers.o: pixmaps/whiteking_4.xbm ../fltk3/Box.h ../fltk3/Slider.h
-checkers.o: ../fltk3/Valuator.h ../fltk3/ValueOutput.h
-clock.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-clock.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-clock.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-clock.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-clock.o: ../fltk3/Widget.h ../fltk3/Clock.h ../fltk3/RoundClock.h
-clock.o: ../fltk3/Clock.h
-colbrowser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-colbrowser.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-colbrowser.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-colbrowser.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-colbrowser.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Button.h
-colbrowser.o: ../fltk3/ValueSlider.h ../fltk3/Slider.h ../fltk3/Valuator.h
-colbrowser.o: ../fltk3/HoldBrowser.h ../fltk3/Browser.h ../fltk3/Browser_.h
-colbrowser.o: ../fltk3/Scrollbar.h ../fltk3/Image.h ../fltk3/Box.h
-colbrowser.o: ../fltk3/ask.h ../fltk3/filename.h
-color_chooser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-color_chooser.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-color_chooser.o: ../fltk3/Window.h ../fltk3/Box.h ../fltk3/Widget.h
-color_chooser.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Button.h
-color_chooser.o: ../fltk3/Wrapper.h ../fltk3/Widget.h
-color_chooser.o: ../fltk3/show_colormap.h ../fltk3/ColorChooser.h
-color_chooser.o: ../fltk3/Group.h ../fltk3/ReturnButton.h ../fltk3/Button.h
-color_chooser.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-color_chooser.o: ../fltk3/Image.h ../fltk3/ValueInput.h ../fltk3/Valuator.h
-color_chooser.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Image.h
-color_chooser.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/Group.h
-color_chooser.o: ../fltk3/draw.h list_visuals.cxx ../config.h
-cube.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-cube.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-cube.o: ../fltk3/Window.h ../fltk3/Box.h ../fltk3/Widget.h
-cube.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Button.h
-cube.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/RadioLightButton.h
-cube.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/Slider.h
-cube.o: ../fltk3/Valuator.h ../fltk3/GlWindow.h ../fltk3/Window.h
-cube.o: ../fltk3/Group.h ../fltk3/gl.h ../fltk3/SysMenuBar.h
-cube.o: ../fltk3/MenuBar.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-cube.o: ../fltk3/Image.h ../fltk3/x.h ../fltk3/Printer.h ../fltk3/x.h
-cube.o: ../fltk3/PagedDevice.h ../fltk3/Device.h ../fltk3/Object.h
-cube.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-cube.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-cube.o: ../fltk3/draw.h ../fltk3/PostScript.h
-CubeMain.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-CubeMain.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-CubeMain.o: CubeViewUI.h ../fltk3/DoubleWindow.h ../fltk3/Window.h
-CubeMain.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-CubeMain.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-CubeMain.o: ../fltk3/Group.h ../fltk3/Roller.h ../fltk3/Valuator.h
-CubeMain.o: ../fltk3/Slider.h ../fltk3/Box.h CubeView.h ../fltk3/GlWindow.h
-CubeMain.o: ../fltk3/gl.h ../fltk3/ValueSlider.h ../fltk3/Slider.h
-CubeView.o: CubeView.h ../config.h ../fltk3/run.h ../fltk3/utf8.h
-CubeView.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-CubeView.o: ../fltk3/enumerations.h ../fltk3/GlWindow.h ../fltk3/Window.h
-CubeView.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-CubeView.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-CubeView.o: ../fltk3/gl.h
-cursor.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-cursor.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-cursor.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-cursor.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-cursor.o: ../fltk3/Widget.h ../fltk3/HorValueSlider.h ../fltk3/ValueSlider.h
-cursor.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Choice.h
-cursor.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-cursor.o: ../fltk3/draw.h ../fltk3/Box.h
-curve.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-curve.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-curve.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-curve.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-curve.o: ../fltk3/Widget.h ../fltk3/HorValueSlider.h ../fltk3/ValueSlider.h
-curve.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/draw.h
-curve.o: ../fltk3/ToggleButton.h ../fltk3/Button.h
-demo.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-demo.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-demo.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-demo.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-demo.o: ../fltk3/Widget.h ../fltk3/Box.h ../fltk3/Button.h ../fltk3/Choice.h
-demo.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-demo.o: ../fltk3/filename.h ../fltk3/x.h
-device.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-device.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/OverlayWindow.h
-device.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-device.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-device.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/LightButton.h
-device.o: ../fltk3/draw.h ../fltk3/Clock.h pixmaps/porsche.xpm
-device.o: ../fltk3/Pixmap.h ../fltk3/Image.h ../fltk3/Bitmap.h
-device.o: ../fltk3/RoundButton.h ../fltk3/LightButton.h ../fltk3/Button.h
-device.o: ../fltk3/Printer.h ../fltk3/x.h ../fltk3/PagedDevice.h
-device.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-device.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/RGBImage.h
-device.o: ../fltk3/Window.h ../fltk3/PostScript.h ../fltk3/FileChooser.h
-device.o: ../fltk3/DoubleWindow.h ../fltk3/Group.h ../fltk3/Choice.h
-device.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/MenuButton.h
-device.o: ../fltk3/Button.h ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h
-device.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-device.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/FileIcon.h
-device.o: ../fltk3/run.h ../fltk3/filename.h ../fltk3/Box.h
-device.o: ../fltk3/CheckButton.h ../fltk3/FileInput.h ../fltk3/Input.h
-device.o: ../fltk3/Input_.h ../fltk3/ReturnButton.h ../fltk3/ask.h
-doublebuffer.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-doublebuffer.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-doublebuffer.o: ../fltk3/SingleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-doublebuffer.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-doublebuffer.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/DoubleWindow.h
-doublebuffer.o: ../fltk3/Box.h ../fltk3/draw.h ../fltk3/HorSlider.h
-doublebuffer.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/math.h
-editor.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-editor.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Group.h
-editor.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-editor.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-editor.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/ask.h
-editor.o: ../fltk3/NativeFileChooser.h ../fltk3/FileChooser.h
-editor.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-editor.o: ../fltk3/Image.h ../fltk3/MenuButton.h ../fltk3/Button.h
-editor.o: ../fltk3/Preferences.h ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h
-editor.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-editor.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/FileIcon.h
-editor.o: ../fltk3/run.h ../fltk3/filename.h ../fltk3/Box.h
-editor.o: ../fltk3/CheckButton.h ../fltk3/LightButton.h ../fltk3/Button.h
-editor.o: ../fltk3/FileInput.h ../fltk3/Input.h ../fltk3/Input_.h
-editor.o: ../fltk3/ReturnButton.h ../fltk3/MenuBar.h ../fltk3/TextBuffer.h
-editor.o: ../fltk3/TextEditor.h ../fltk3/TextDisplay.h ../fltk3/draw.h
-editor.o: ../fltk3/x.h ../fltk3/enumerations.h ../fltk3/Window.h
-editor.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-editor.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
-editor.o: ../fltk3/RGBImage.h ../fltk3/TextBuffer.h ../fltk3/filename.h
-fast_slow.o: fast_slow.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fast_slow.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fast_slow.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-fast_slow.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fast_slow.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Slider.h
-fast_slow.o: ../fltk3/Valuator.h ../fltk3/Box.h
-file_chooser.o: ../fltk3/FileChooser.h ../fltk3/run.h ../fltk3/utf8.h
-file_chooser.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-file_chooser.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-file_chooser.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-file_chooser.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-file_chooser.o: ../fltk3/Widget.h ../fltk3/Group.h ../fltk3/Choice.h
-file_chooser.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-file_chooser.o: ../fltk3/MenuButton.h ../fltk3/Button.h
-file_chooser.o: ../fltk3/Preferences.h ../fltk3/TiledGroup.h
-file_chooser.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h ../fltk3/Browser_.h
-file_chooser.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-file_chooser.o: ../fltk3/FileIcon.h ../fltk3/run.h ../fltk3/filename.h
-file_chooser.o: ../fltk3/Box.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-file_chooser.o: ../fltk3/Button.h ../fltk3/FileInput.h ../fltk3/Input.h
-file_chooser.o: ../fltk3/Input_.h ../fltk3/ReturnButton.h ../fltk3/ask.h
-file_chooser.o: ../fltk3/FileIcon.h ../fltk3/SharedImage.h
-file_chooser.o: ../fltk3/PNMImage.h ../fltk3/LightButton.h
-fonts.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-fonts.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-fonts.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-fonts.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-fonts.o: ../fltk3/Widget.h ../fltk3/TiledGroup.h ../fltk3/HoldBrowser.h
-fonts.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-fonts.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Image.h
-fonts.o: ../fltk3/draw.h ../fltk3/Box.h ../fltk3/ask.h
-fractals.o: ../config.h ../fltk3/glut.h ../fltk3/gl.h ../fltk3/enumerations.h
-fractals.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/run.h
-fractals.o: ../fltk3/GlWindow.h ../fltk3/Window.h ../fltk3/Group.h
-fractals.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fractals.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/glu.h fracviewer.h
-fractals.o: ../fltk3/Button.h ../fltk3/Group.h ../fltk3/Window.h
-fullscreen.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-fullscreen.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-fullscreen.o: ../fltk3/SingleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-fullscreen.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-fullscreen.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/HorSlider.h
-fullscreen.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/LightButton.h
-fullscreen.o: ../fltk3/math.h ../fltk3/gl.h ../fltk3/GlWindow.h
-gl_overlay.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-gl_overlay.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-gl_overlay.o: ../fltk3/Window.h ../fltk3/HorSlider.h ../fltk3/Slider.h
-gl_overlay.o: ../fltk3/Valuator.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-gl_overlay.o: ../fltk3/Object.h ../fltk3/ToggleButton.h ../fltk3/Button.h
-gl_overlay.o: ../fltk3/math.h ../fltk3/gl.h ../fltk3/GlWindow.h
-gl_overlay.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-gl_overlay.o: ../fltk3/Widget.h
-glpuzzle.o: ../config.h ../fltk3/glut.h ../fltk3/gl.h ../fltk3/enumerations.h
-glpuzzle.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/run.h
-glpuzzle.o: ../fltk3/GlWindow.h ../fltk3/Window.h ../fltk3/Group.h
-glpuzzle.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-glpuzzle.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/glu.h trackball.c
-glpuzzle.o: trackball.h
-hello.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-hello.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-hello.o: ../fltk3/Box.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-hello.o: ../fltk3/Object.h
-help.o: ../fltk3/HelpDialog.h ../fltk3/run.h ../fltk3/utf8.h
-help.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-help.o: ../fltk3/enumerations.h ../fltk3/DoubleWindow.h ../fltk3/Window.h
-help.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-help.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-help.o: ../fltk3/Group.h ../fltk3/Button.h ../fltk3/Input.h ../fltk3/Input_.h
-help.o: ../fltk3/Box.h ../fltk3/HelpView.h ../fltk3/run.h
-help.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-help.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/enumerations.h
-help.o: ../fltk3/Window.h ../fltk3/Device.h ../fltk3/Object.h
-help.o: ../fltk3/Plugin.h ../fltk3/Preferences.h ../fltk3/Image.h
-help.o: ../fltk3/Bitmap.h ../fltk3/Image.h ../fltk3/Pixmap.h
-help.o: ../fltk3/RGBImage.h ../fltk3/SharedImage.h ../fltk3/filename.h
-iconize.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-iconize.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-iconize.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-iconize.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-iconize.o: ../fltk3/Box.h
-image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-image.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-image.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-image.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-image.o: ../fltk3/Widget.h ../fltk3/Button.h ../fltk3/Image.h
-image.o: ../fltk3/ToggleButton.h ../fltk3/Button.h ../fltk3/x.h
+checkers.o: pixmaps/whiteking_4.xbm
+color_chooser.o: list_visuals.cxx ../config.h
+cube.o: ../config.h
+CubeView.o: CubeView.h ../config.h
+CubeMain.o: ../config.h CubeViewUI.h CubeView.h
+device.o: pixmaps/porsche.xpm
+fractals.o: ../config.h fracviewer.h
+fracviewer.o: ../config.h fracviewer.h
+fullscreen.o: ../config.h
+gl_overlay.o: ../config.h
+glpuzzle.o: ../config.h trackball.c trackball.h
 image.o: list_visuals.cxx ../config.h
-inactive.o: inactive.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-inactive.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-inactive.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-inactive.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-inactive.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Group.h
-inactive.o: ../fltk3/Button.h ../fltk3/LightButton.h ../fltk3/CheckButton.h
-inactive.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/RoundButton.h
-inactive.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Input.h
-inactive.o: ../fltk3/Input_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-inactive.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/ValueOutput.h
-inactive.o: ../fltk3/Box.h ../fltk3/Scrollbar.h ../fltk3/Roller.h
-inactive.o: ../fltk3/Dial.h ../fltk3/Clock.h
-input.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-input.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-input.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Widget.h
-input.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/FloatInput.h
-input.o: ../fltk3/Input.h ../fltk3/IntInput.h ../fltk3/SecretInput.h
-input.o: ../fltk3/MultilineInput.h ../fltk3/Button.h ../fltk3/Wrapper.h
-input.o: ../fltk3/Widget.h ../fltk3/ToggleButton.h ../fltk3/Button.h
-input.o: ../fltk3/LightButton.h ../fltk3/ColorChooser.h ../fltk3/Group.h
-input.o: ../fltk3/Box.h ../fltk3/ReturnButton.h ../fltk3/Choice.h
-input.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-input.o: ../fltk3/ValueInput.h ../fltk3/Valuator.h
-input_choice.o: ../fltk3/Button.h ../fltk3/Widget.h ../fltk3/enumerations.h
-input_choice.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Rectangle.h
-input_choice.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-input_choice.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-input_choice.o: ../fltk3/InputChoice.h ../fltk3/run.h ../fltk3/utf8.h
-input_choice.o: ../fltk3/Xutf8.h ../fltk3/Group.h ../fltk3/Input.h
-input_choice.o: ../fltk3/Input_.h ../fltk3/MenuButton.h ../fltk3/Menu_.h
-input_choice.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/draw.h
-keyboard.o: keyboard_ui.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-keyboard.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-keyboard.o: keyboard.h ../fltk3/Window.h ../fltk3/Button.h ../fltk3/Widget.h
-keyboard.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-keyboard.o: ../fltk3/Widget.h ../fltk3/Output.h ../fltk3/Input.h
-keyboard.o: ../fltk3/Input_.h ../fltk3/Box.h ../fltk3/Dial.h
-keyboard.o: ../fltk3/Valuator.h
-label.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-label.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-label.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-label.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-label.o: ../fltk3/Widget.h ../fltk3/Box.h ../fltk3/HorValueSlider.h
-label.o: ../fltk3/ValueSlider.h ../fltk3/Slider.h ../fltk3/Valuator.h
-label.o: ../fltk3/ToggleButton.h ../fltk3/Button.h ../fltk3/Input.h
-label.o: ../fltk3/Input_.h ../fltk3/Choice.h ../fltk3/Menu_.h
-label.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/Pixmap.h
-label.o: ../fltk3/draw.h pixmaps/blast.xpm
-line_style.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-line_style.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-line_style.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-line_style.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-line_style.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/ValueSlider.h
-line_style.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/draw.h
-line_style.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-line_style.o: ../fltk3/Image.h ../fltk3/CheckButton.h ../fltk3/LightButton.h
-line_style.o: ../fltk3/Button.h ../fltk3/Box.h
+keyboard.o: keyboard_ui.h keyboard.h
+label.o: pixmaps/blast.xpm
 list_visuals.o: ../config.h
-mandelbrot.o: mandelbrot_ui.h ../fltk3/run.h ../fltk3/utf8.h
-mandelbrot.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-mandelbrot.o: ../fltk3/enumerations.h mandelbrot.h ../fltk3/Box.h
-mandelbrot.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-mandelbrot.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/DoubleWindow.h
-mandelbrot.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-mandelbrot.o: ../fltk3/Widget.h ../fltk3/Input.h ../fltk3/Input_.h
-mandelbrot.o: ../fltk3/Window.h ../fltk3/FloatInput.h ../fltk3/Input.h
-mandelbrot.o: ../fltk3/draw.h ../fltk3/Button.h ../fltk3/Printer.h
-mandelbrot.o: ../fltk3/x.h ../fltk3/PagedDevice.h ../fltk3/Device.h
-mandelbrot.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-mandelbrot.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-mandelbrot.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/PostScript.h
-menubar.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-menubar.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Box.h
-menubar.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-menubar.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-menubar.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/MenuBar.h
-menubar.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-menubar.o: ../fltk3/ToggleButton.h ../fltk3/Button.h ../fltk3/MenuButton.h
-menubar.o: ../fltk3/Choice.h ../src/flstring.h ../fltk3/Export.h ../config.h
-menubar.o: ../fltk3/draw.h
-message.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-message.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-message.o: ../fltk3/ask.h
-minimum.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-minimum.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-minimum.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-minimum.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-minimum.o: ../fltk3/Widget.h ../fltk3/Slider.h ../fltk3/Valuator.h
-minimum.o: ../fltk3/Box.h ../fltk3/ReturnButton.h ../fltk3/Button.h
-native-filechooser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-native-filechooser.o: ../fltk3/types.h ../fltk3/Xutf8.h
-native-filechooser.o: ../fltk3/enumerations.h ../fltk3/ask.h
-native-filechooser.o: ../fltk3/Window.h ../fltk3/Button.h ../fltk3/Widget.h
-native-filechooser.o: ../fltk3/Rectangle.h ../fltk3/Object.h
-native-filechooser.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Input.h
-native-filechooser.o: ../fltk3/Input_.h ../fltk3/Box.h
-native-filechooser.o: ../fltk3/NativeFileChooser.h ../fltk3/FileChooser.h
-native-filechooser.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h
-native-filechooser.o: ../fltk3/Group.h ../fltk3/Group.h ../fltk3/Choice.h
-native-filechooser.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-native-filechooser.o: ../fltk3/MenuButton.h ../fltk3/Preferences.h
-native-filechooser.o: ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h
-native-filechooser.o: ../fltk3/Browser.h ../fltk3/Browser_.h
-native-filechooser.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h
-native-filechooser.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-native-filechooser.o: ../fltk3/filename.h ../fltk3/CheckButton.h
-native-filechooser.o: ../fltk3/LightButton.h ../fltk3/Button.h
-native-filechooser.o: ../fltk3/FileInput.h ../fltk3/ReturnButton.h
-navigation.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-navigation.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-navigation.o: ../fltk3/Window.h ../fltk3/Input.h ../fltk3/Input_.h
-navigation.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-navigation.o: ../fltk3/LightButton.h
-output.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-output.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/ValueInput.h
-output.o: ../fltk3/Valuator.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-output.o: ../fltk3/Object.h ../fltk3/Input.h ../fltk3/Input_.h
-output.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-output.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Box.h
-output.o: ../fltk3/HorValueSlider.h ../fltk3/ValueSlider.h ../fltk3/Slider.h
-output.o: ../fltk3/ToggleButton.h ../fltk3/Button.h ../fltk3/Input.h
-output.o: ../fltk3/draw.h ../fltk3/Output.h ../fltk3/MultilineOutput.h
-output.o: ../fltk3/Output.h
-overlay.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-overlay.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-overlay.o: ../fltk3/OverlayWindow.h ../fltk3/DoubleWindow.h ../fltk3/Window.h
-overlay.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-overlay.o: ../fltk3/Object.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-overlay.o: ../fltk3/Button.h ../fltk3/draw.h
-pack.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-pack.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Button.h
-pack.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-pack.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/LightButton.h
-pack.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-pack.o: ../fltk3/ScrollGroup.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-pack.o: ../fltk3/Valuator.h ../fltk3/ValueSlider.h ../fltk3/PackedGroup.h
-pack.o: ../fltk3/Group.h
-pixmap_browser.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-pixmap_browser.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-pixmap_browser.o: ../fltk3/Box.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-pixmap_browser.o: ../fltk3/Object.h ../fltk3/DoubleWindow.h ../fltk3/Window.h
-pixmap_browser.o: ../fltk3/Group.h ../fltk3/Wrapper.h ../fltk3/Widget.h
-pixmap_browser.o: ../fltk3/Button.h ../fltk3/SharedImage.h ../fltk3/Image.h
-pixmap_browser.o: ../fltk3/FileChooser.h ../fltk3/Group.h ../fltk3/Choice.h
-pixmap_browser.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/MenuButton.h
-pixmap_browser.o: ../fltk3/Preferences.h ../fltk3/TiledGroup.h
-pixmap_browser.o: ../fltk3/FileBrowser.h ../fltk3/Browser.h
-pixmap_browser.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-pixmap_browser.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-pixmap_browser.o: ../fltk3/filename.h ../fltk3/CheckButton.h
-pixmap_browser.o: ../fltk3/LightButton.h ../fltk3/Button.h
-pixmap_browser.o: ../fltk3/FileInput.h ../fltk3/Input.h ../fltk3/Input_.h
-pixmap_browser.o: ../fltk3/ReturnButton.h ../fltk3/ask.h ../fltk3/message.h
-pixmap_browser.o: ../fltk3/ask.h
-pixmap.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-pixmap.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-pixmap.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-pixmap.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-pixmap.o: ../fltk3/Widget.h ../fltk3/Button.h ../fltk3/Pixmap.h
-pixmap.o: ../fltk3/Image.h ../fltk3/ToggleButton.h ../fltk3/Button.h
+mandelbrot.o: mandelbrot_ui.h mandelbrot.h
 pixmap.o: pixmaps/porsche.xpm
-preferences.o: preferences.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-preferences.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-preferences.o: ../fltk3/Preferences.h ../fltk3/DoubleWindow.h
-preferences.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-preferences.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-preferences.o: ../fltk3/Widget.h ../fltk3/Button.h ../fltk3/Group.h
-preferences.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Choice.h
-preferences.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-preferences.o: ../fltk3/RoundButton.h ../fltk3/LightButton.h
-preferences.o: ../fltk3/Button.h ../fltk3/Box.h ../fltk3/CheckButton.h
-preferences.o: ../fltk3/IntInput.h ../fltk3/Input.h ../fltk3/ValueSlider.h
-preferences.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/filename.h
-preferences.o: ../fltk3/ask.h
-device.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-device.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/OverlayWindow.h
-device.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-device.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-device.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/LightButton.h
-device.o: ../fltk3/draw.h ../fltk3/Clock.h pixmaps/porsche.xpm
-device.o: ../fltk3/Pixmap.h ../fltk3/Image.h ../fltk3/Bitmap.h
-device.o: ../fltk3/RoundButton.h ../fltk3/LightButton.h ../fltk3/Button.h
-device.o: ../fltk3/Printer.h ../fltk3/x.h ../fltk3/PagedDevice.h
-device.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-device.o: ../fltk3/Preferences.h ../fltk3/Image.h ../fltk3/RGBImage.h
-device.o: ../fltk3/Window.h ../fltk3/PostScript.h ../fltk3/FileChooser.h
-device.o: ../fltk3/DoubleWindow.h ../fltk3/Group.h ../fltk3/Choice.h
-device.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/MenuButton.h
-device.o: ../fltk3/Button.h ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h
-device.o: ../fltk3/Browser.h ../fltk3/Browser_.h ../fltk3/Scrollbar.h
-device.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/FileIcon.h
-device.o: ../fltk3/run.h ../fltk3/filename.h ../fltk3/Box.h
-device.o: ../fltk3/CheckButton.h ../fltk3/FileInput.h ../fltk3/Input.h
-device.o: ../fltk3/Input_.h ../fltk3/ReturnButton.h ../fltk3/ask.h
-radio.o: radio.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-radio.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-radio.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-radio.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-radio.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Button.h
-radio.o: ../fltk3/ReturnButton.h ../fltk3/Button.h ../fltk3/LightButton.h
-radio.o: ../fltk3/CheckButton.h ../fltk3/LightButton.h ../fltk3/RoundButton.h
-radio.o: ../fltk3/Group.h ../fltk3/Output.h ../fltk3/Input.h
-radio.o: ../fltk3/Input_.h
-resizebox.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-resizebox.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-resizebox.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-resizebox.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-resizebox.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Box.h
-resizebox.o: ../fltk3/RadioButton.h ../fltk3/Button.h ../fltk3/draw.h
-resizebox.o: ../fltk3/message.h ../fltk3/ask.h
-resize.o: resize.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-resize.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-resize.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-resize.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-resize.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Button.h
-resize.o: ../fltk3/Box.h
-rotated_text.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-rotated_text.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-rotated_text.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-rotated_text.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-rotated_text.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Box.h
-rotated_text.o: ../fltk3/HorValueSlider.h ../fltk3/ValueSlider.h
-rotated_text.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/ToggleButton.h
-rotated_text.o: ../fltk3/Button.h ../fltk3/Input.h ../fltk3/Input_.h
-rotated_text.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-rotated_text.o: ../fltk3/Image.h ../fltk3/draw.h
-scroll.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-scroll.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-scroll.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-scroll.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-scroll.o: ../fltk3/Widget.h ../fltk3/ScrollGroup.h ../fltk3/Scrollbar.h
-scroll.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/LightButton.h
-scroll.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-scroll.o: ../fltk3/Image.h ../fltk3/Box.h ../fltk3/draw.h ../fltk3/math.h
-shape.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-shape.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-shape.o: ../fltk3/Window.h ../fltk3/HorSlider.h ../fltk3/Slider.h
-shape.o: ../fltk3/Valuator.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-shape.o: ../fltk3/Object.h ../fltk3/math.h ../fltk3/gl.h ../fltk3/GlWindow.h
-shape.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Wrapper.h
-shape.o: ../fltk3/Widget.h
-subwindow.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-subwindow.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-subwindow.o: ../fltk3/Window.h ../fltk3/ToggleButton.h ../fltk3/Button.h
-subwindow.o: ../fltk3/MenuButton.h ../fltk3/Menu_.h ../fltk3/Widget.h
-subwindow.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/MenuItem.h
-subwindow.o: ../fltk3/Image.h ../fltk3/Box.h ../fltk3/Input.h
-subwindow.o: ../fltk3/Input_.h
-sudoku.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-sudoku.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/enumerations.h
-sudoku.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-sudoku.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-sudoku.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Button.h
-sudoku.o: ../fltk3/Group.h ../fltk3/ask.h ../fltk3/draw.h
-sudoku.o: ../fltk3/HelpDialog.h ../fltk3/Input.h ../fltk3/Input_.h
-sudoku.o: ../fltk3/Box.h ../fltk3/HelpView.h ../fltk3/run.h
-sudoku.o: ../fltk3/Scrollbar.h ../fltk3/Slider.h ../fltk3/Valuator.h
-sudoku.o: ../fltk3/draw.h ../fltk3/x.h ../fltk3/Window.h ../fltk3/Device.h
-sudoku.o: ../fltk3/Object.h ../fltk3/Plugin.h ../fltk3/Preferences.h
-sudoku.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Image.h
-sudoku.o: ../fltk3/Pixmap.h ../fltk3/RGBImage.h ../fltk3/SharedImage.h
-sudoku.o: ../fltk3/filename.h ../fltk3/SysMenuBar.h ../fltk3/MenuBar.h
-sudoku.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/x.h ../fltk3/math.h
+shape.o: ../config.h
 sudoku.o: pixmaps/sudoku.xbm ../config.h
-symbols.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-symbols.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-symbols.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-symbols.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-symbols.o: ../fltk3/Widget.h ../fltk3/Box.h ../fltk3/ValueSlider.h
-symbols.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/draw.h
-table.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-table.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Window.h
-table.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Widget.h
-table.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/CheckButton.h
-table.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/Choice.h
-table.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-table.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/draw.h ../fltk3/ask.h
-table.o: ../fltk3/TableRow.h ../fltk3/Table.h ../fltk3/Group.h
-table.o: ../fltk3/ScrollGroup.h ../fltk3/Group.h ../fltk3/Scrollbar.h
-table.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Box.h
-table.o: ../fltk3/Scrollbar.h
-tabs.o: tabs.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-tabs.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-tabs.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-tabs.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-tabs.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Box.h
-tabs.o: ../fltk3/TabGroup.h ../fltk3/Group.h ../fltk3/Input.h
-tabs.o: ../fltk3/Input_.h ../fltk3/Button.h ../fltk3/ask.h ../fltk3/Clock.h
-tabs.o: ../fltk3/WizardGroup.h ../fltk3/ReturnButton.h ../fltk3/Button.h
-threads.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-threads.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-threads.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-threads.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-threads.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Browser.h
-threads.o: ../fltk3/ValueOutput.h ../fltk3/Valuator.h ../fltk3/ask.h
-threads.o: threads.h
-tile.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-tile.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-tile.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-tile.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-tile.o: ../fltk3/Widget.h ../fltk3/TiledGroup.h ../fltk3/Box.h
-tiled_image.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-tiled_image.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-tiled_image.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-tiled_image.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-tiled_image.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Button.h
-tiled_image.o: ../fltk3/Pixmap.h ../fltk3/Image.h ../fltk3/TiledImage.h
-tiled_image.o: pixmaps/tile.xpm ../fltk3/x.h list_visuals.cxx ../config.h
-tree.o: tree.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-tree.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-tree.o: ../fltk3/Pixmap.h ../fltk3/Image.h ../fltk3/Object.h ../fltk3/Group.h
-tree.o: ../fltk3/Tree.h ../fltk3/Scrollbar.h ../fltk3/draw.h
-tree.o: ../fltk3/TreeItem.h ../fltk3/Widget.h ../fltk3/Image.h
-tree.o: ../fltk3/TreeItemArray.h ../fltk3/TreePrefs.h ../fltk3/ask.h
-tree.o: ../fltk3/message.h ../fltk3/ask.h ../fltk3/FileChooser.h
-tree.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-tree.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Wrapper.h
-tree.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-tree.o: ../fltk3/MenuButton.h ../fltk3/Button.h ../fltk3/Preferences.h
-tree.o: ../fltk3/TiledGroup.h ../fltk3/FileBrowser.h ../fltk3/Browser.h
-tree.o: ../fltk3/Browser_.h ../fltk3/Scrollbar.h ../fltk3/Slider.h
-tree.o: ../fltk3/Valuator.h ../fltk3/FileIcon.h ../fltk3/run.h
-tree.o: ../fltk3/filename.h ../fltk3/Box.h ../fltk3/CheckButton.h
-tree.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/FileInput.h
-tree.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/ReturnButton.h
-tree.o: ../fltk3/ColorChooser.h ../fltk3/ValueInput.h ../fltk3/Input.h
-tree.o: ../fltk3/ValueSlider.h ../fltk3/LightButton.h
-valuators.o: valuators.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-valuators.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-valuators.o: ../fltk3/DoubleWindow.h ../fltk3/Window.h ../fltk3/Group.h
-valuators.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-valuators.o: ../fltk3/Wrapper.h ../fltk3/Widget.h ../fltk3/Box.h
-valuators.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/ValueSlider.h
-valuators.o: ../fltk3/Slider.h ../fltk3/ValueInput.h ../fltk3/Input.h
-valuators.o: ../fltk3/Input_.h ../fltk3/ValueOutput.h ../fltk3/Scrollbar.h
-valuators.o: ../fltk3/Adjuster.h ../fltk3/Counter.h ../fltk3/Spinner.h
-valuators.o: ../fltk3/enumerations.h ../fltk3/Group.h ../fltk3/Input.h
-valuators.o: ../fltk3/RepeatButton.h ../fltk3/run.h ../fltk3/Button.h
-valuators.o: ../fltk3/Dial.h ../fltk3/Roller.h
-utf8.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
-utf8.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
-utf8.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
-utf8.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Wrapper.h
-utf8.o: ../fltk3/Widget.h ../fltk3/ScrollGroup.h ../fltk3/Scrollbar.h
-utf8.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/Choice.h
-utf8.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
-utf8.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/Box.h
-utf8.o: ../fltk3/TiledGroup.h ../fltk3/HoldBrowser.h ../fltk3/Browser.h
-utf8.o: ../fltk3/Browser_.h ../fltk3/ValueOutput.h ../fltk3/Button.h
-utf8.o: ../fltk3/CheckButton.h ../fltk3/LightButton.h ../fltk3/Button.h
-utf8.o: ../fltk3/Output.h ../fltk3/Input.h ../fltk3/draw.h ../fltk3/utf8.h
+threads.o: ../config.h threads.h
+tiled_image.o: pixmaps/tile.xpm list_visuals.cxx ../config.h
+unittests.o: unittests.h
+unittest_about.o: unittests.h
+unittest_circles.o: unittests.h
+unittest_images.o: unittests.h
+unittest_lines.o: unittests.h
+unittest_points.o: unittests.h
+unittest_rects.o: unittests.h
+unittest_scrollbarsize.o: unittests.h
+unittest_text.o: unittests.h
+unittest_viewport.o: unittests.h

Modified: branches/branch-3.0/test/menubar.cxx
===================================================================
--- branches/branch-3.0/test/menubar.cxx	2011-08-22 13:59:12 UTC (rev 8990)
+++ branches/branch-3.0/test/menubar.cxx	2011-08-22 15:21:44 UTC (rev 8991)
@@ -34,7 +34,7 @@
 #include <fltk3/Choice.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include "../src/flstring.h"
+#include "../src/core/flstring.h"
 #include <fltk3/draw.h>
 
 void window_cb(fltk3::Widget* w, void*) {

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.