From 1add88bf085a7bd8cefd689e7ae3d5a4425c5ca3 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Fri, 2 Feb 2024 09:42:28 -0500 Subject: [PATCH 01/18] Initial commit of os2gui port --- curspriv.h | 3 + os2gui/.gitignore | 1 + os2gui/CMakeLists.txt | 30 + os2gui/Makefile | 179 ++ os2gui/Makefile.wcc | 247 +++ os2gui/README.md | 69 + os2gui/pdcclip.c | 165 ++ os2gui/pdcdisp.c | 2001 +++++++++++++++++++++ os2gui/pdcgetsc.c | 26 + os2gui/pdckbd.c | 79 + os2gui/pdcscrn.c | 2373 +++++++++++++++++++++++++ os2gui/pdcsetsc.c | 115 ++ os2gui/pdcutil.c | 42 + os2gui/pdcwin.h | 106 ++ os2gui/table.py | 112 ++ os2gui/unitable.h | 3933 +++++++++++++++++++++++++++++++++++++++++ 16 files changed, 9481 insertions(+) create mode 100644 os2gui/.gitignore create mode 100644 os2gui/CMakeLists.txt create mode 100644 os2gui/Makefile create mode 100644 os2gui/Makefile.wcc create mode 100644 os2gui/README.md create mode 100644 os2gui/pdcclip.c create mode 100644 os2gui/pdcdisp.c create mode 100644 os2gui/pdcgetsc.c create mode 100644 os2gui/pdckbd.c create mode 100644 os2gui/pdcscrn.c create mode 100644 os2gui/pdcsetsc.c create mode 100644 os2gui/pdcutil.c create mode 100644 os2gui/pdcwin.h create mode 100755 os2gui/table.py create mode 100644 os2gui/unitable.h diff --git a/curspriv.h b/curspriv.h index ca2c1878..74f36378 100644 --- a/curspriv.h +++ b/curspriv.h @@ -118,6 +118,9 @@ int PDC_mbtowc(wchar_t *, const char *, size_t); size_t PDC_mbstowcs(wchar_t *, const char *, size_t); size_t PDC_wcstombs(char *, const wchar_t *, size_t); PDCEX int PDC_wcwidth( const int32_t ucs); +#ifdef USING_COMBINING_CHARACTER_SCHEME +int PDC_expand_combined_characters( const cchar_t c, cchar_t *added); +#endif #endif #define MAX_UNICODE 0x110000 diff --git a/os2gui/.gitignore b/os2gui/.gitignore new file mode 100644 index 00000000..8704a0e2 --- /dev/null +++ b/os2gui/.gitignore @@ -0,0 +1 @@ +pdcurses.lbc diff --git a/os2gui/CMakeLists.txt b/os2gui/CMakeLists.txt new file mode 100644 index 00000000..f1d8699d --- /dev/null +++ b/os2gui/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.11) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE) + message(STATUS "No build type specified, defaulting to MinSizeRel.") +endif() + +PROJECT(wingui VERSION "${PROJECT_VERSION}" LANGUAGES C) + +INCLUDE(project_common) + +demo_app(../demos calendar) +demo_app(../demos firework) +demo_app(../demos init_col) +demo_app(../demos mbrot) +demo_app(../demos newtest WIN32) +demo_app(../demos ozdemo) +demo_app(../demos picsview) +demo_app(../demos ptest) +demo_app(../demos rain) +demo_app(../demos speed) +demo_app(../demos test_pan) +demo_app(../demos testcurs) +demo_app(../demos version) +demo_app(../demos widetest) +demo_app(../demos worm) +demo_app(../demos xmas) + + +SET(CPACK_COMPONENTS_ALL applications) diff --git a/os2gui/Makefile b/os2gui/Makefile new file mode 100644 index 00000000..a4172842 --- /dev/null +++ b/os2gui/Makefile @@ -0,0 +1,179 @@ +# GNU MAKE Makefile for PDCurses library - WIN32/64/ARM MinGW GCC/LLVM +# +# Usage: [g]make [-f path\Makefile] [DEBUG=Y] [DLL=Y] [WIDE=Y] [UTF8=Y] +# [LIBNAME=(name)] [DLLNAME=(name)] [target] +# [_w32=Y | _w64=Y | _a64=Y ] +# +# where target can be any of: +# [all|demos|pdcurses.a|testcurs.exe...] + +O = o +E = .exe + +ifndef PDCURSES_SRCDIR + PDCURSES_SRCDIR = .. +endif + +osdir = $(PDCURSES_SRCDIR)/os2gui +common = $(PDCURSES_SRCDIR)/common + +include $(common)/libobjs.mif + +uname_S := $(shell uname -s 2>/dev/null) + +CAT = cat +PREFIX = +PATH_SEP = / +CP = cp +RM = rm -f + +# It appears we have three cases: we're running in Cygwin/MSYS; or we're +# running in command.com on Windows with MinGW; or we're on Linux or BSD +# or similar system, cross-compiling with MinGW. + +ifneq (,$(findstring CYGWIN,$(uname_S))) + # Insert Cygwin-specific changes here + ON_WINDOWS = 1 +endif +ifneq (,$(findstring MINGW32_NT,$(uname_S))) + # Insert MINGW32-specific changes here + ON_WINDOWS = 1 +endif +ifneq (,$(findstring MINGW64_NT,$(uname_S))) + # Insert MINGW64-specific changes here + ON_WINDOWS = 1 +endif + +ifeq ($(uname_S),) + CAT = type + PATH_SEP = \\ + CP = copy + RM = cmd /c del + ON_WINDOWS = 1 +endif + +# If we aren't on Windows, assume MinGW on a Linux-like host +# Only decision is: are we doing a 64-bit compile (_w64 defined)? + +ifndef ON_WINDOWS + PREFIX = i686-w64-mingw32- + ifdef _w64 + PREFIX = x86_64-w64-mingw32- + endif + ifdef _a64 + PREFIX = aarch64-w64-mingw32- + endif +endif + +PDCURSES_WIN_H = $(osdir)/pdcwin.h + +CC = $(PREFIX)gcc + +AR = $(PREFIX)ar + +CFLAGS += -Wall -Wextra -pedantic +ifeq ($(DEBUG),Y) + CFLAGS += -g -DPDCDEBUG + LDFLAGS = -g +else + CFLAGS += -O3 + LDFLAGS = +endif + +CFLAGS += -I$(PDCURSES_SRCDIR) + +ifdef CHTYPE_32 + CFLAGS += -DCHTYPE_32 +endif + +ifeq ($(UTF8),Y) + CFLAGS += -DPDC_FORCE_UTF8 +else + ifeq ($(WIDE),Y) + CFLAGS += -DPDC_WIDE + endif +endif + +LINK = $(CC) +LIBNAME = pdcurses +DLLNAME = pdcurses + +ifeq ($(DLL),Y) + CFLAGS += -DPDC_DLL_BUILD + LIBEXE = $(CC) + LIBFLAGS = -Wl,--out-implib,$(LIBNAME).a -static-libgcc -shared -o + LIBCURSES = $(DLLNAME).dll + LIBDEPS = $(LIBOBJS) $(PDCOBJS) + LIBSADDED = -lgdi32 -lcomdlg32 -lwinmm + EXELIBS = + CLEAN = $(LIBCURSES) *.a +else + LIBEXE = $(AR) +ifeq ($(PREFIX),) + LIBFLAGS = rcv +else + LIBFLAGS = rv +endif + LIBCURSES = $(LIBNAME).a + LIBDEPS = $(LIBOBJS) $(PDCOBJS) + LIBSADDED = + EXELIBS = + CLEAN = *.a +endif + +.PHONY: all libs clean demos dist + +all: libs + +libs: $(LIBCURSES) + +clean: + -$(RM) *.o + -$(RM) *.exe + -$(RM) *.dll + -$(RM) $(CLEAN) + +demos: $(DEMOS) + +$(LIBCURSES) : $(LIBDEPS) + $(LIBEXE) $(LIBFLAGS) $@ $? $(LIBSADDED) + $(CP) $(LIBNAME).a panel.a + +$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS) +$(PDCOBJS) : $(PDCURSES_WIN_H) +$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES) +panel.o : $(PANEL_HEADER) + +$(LIBOBJS) : %.o: $(srcdir)/%.c + $(CC) -c $(CFLAGS) $< + +$(PDCOBJS) : %.o: $(osdir)/%.c + $(CC) -c $(CFLAGS) $< + +calendar.exe firework.exe init_col.exe mbrot.exe \ +newtest.exe ozdemo.exe picsview.exe \ +ptest.exe rain.exe speed.exe testcurs.exe test_pan.exe \ +version.exe widetest.exe worm.exe xmas.exe: %.exe: $(demodir)/%.c + $(CC) $(CFLAGS) -o$@ $< $(LIBCURSES) $(EXELIBS) + emxbind -ep $@ + +tuidemo.exe: tuidemo.o tui.o + $(LINK) $(LDFLAGS) -o$@ tuidemo.o tui.o $(LIBCURSES) $(EXELIBS) + emxbind -ep $@ + +tui.o: $(demodir)/tui.c $(demodir)/tui.h $(PDCURSES_CURSES_H) + $(CC) -c $(CFLAGS) -I$(demodir) -o$@ $< + +tuidemo.o: $(demodir)/tuidemo.c $(PDCURSES_CURSES_H) + $(CC) -c $(CFLAGS) -I$(demodir) -o$@ $< + +configure : + $(CC) $(CFLAGS) -o config_curses$(E) $(common)/config_curses.c +ifdef ON_WINDOWS + config_curses$(E) -v -d.. $(CFLAGS) +else + wine config_curses$(E) -v -d.. $(CFLAGS) +endif + rm config_curses$(E) + +include $(PDCURSES_SRCDIR)/demos/nctests.mif diff --git a/os2gui/Makefile.wcc b/os2gui/Makefile.wcc new file mode 100644 index 00000000..e5c42772 --- /dev/null +++ b/os2gui/Makefile.wcc @@ -0,0 +1,247 @@ +# Watcom WMAKE Makefile for PDCurses library - Win32 Watcom C/C++ 10.6+ +# +# Usage: wmake -f [wingui/]Makefile.wcc [DEBUG=Y] [WIDE=Y] [UTF8=Y] [target] +# +# where target can be any of: +# [all|demos|pdcurses.lib|testcurs.exe...] + +!ifdef %PDCURSES_SRCDIR +PDCURSES_SRCDIR = $(%PDCURSES_SRCDIR) +!else +PDCURSES_SRCDIR = .. +!endif + +common = $(PDCURSES_SRCDIR)/common + +osdir = os2gui + +TARGET = os2v2_pm + +LTARGET = os2v2_pm + +CFLAGS = -ei + +#!ifeq DLL Y +#ADDED_LIBS_FOR_DLL = lib winmm.lib +#!else +#ADDED_LIBS = lib winmm.lib +#!endif + +EXTRA_LIB_CMD = -$(COPY) $(PDCNAME).lib panel.lib + +############################################################################## +# Common elements for the Watcom makefiles + +!ifeq TARGET dos +!ifneq MODEL f +TARGET16 = 1 +!endif +!endif + +!ifdef __UNIX__ +DEL = rm -f +COPY = cp +!else +DEL = del +COPY = copy +!endif + +!ifeq TARGET linux +!else +E = .exe +!endif + +.EXTENSIONS : +!ifeq TARGET linux +.EXTENSIONS : . .lib .obj .h .c +!else +.EXTENSIONS : $(E) .dll .lib .res .obj .rc .h .c +!endif + +!ifdef TARGET16 +CC = *wcc +!else +CC = *wcc386 +MODEL = f +!endif + +LIBEXE = *wlib -q -n -b -c -t -pa + +LINK = *wlink + +RC = *wrc + +!ifdef DLL +cflags_dll_nt = -bd +cflags_dll_os2 = -bd -DPDC_DLL_BUILD +cflags_dll_imp_nt = -DPDC_DLL_BUILD +!endif + +CFLAGS += -bt=$(TARGET) -m$(MODEL) -wx -we -zq -i=$(PDCURSES_SRCDIR) +!ifeq DEBUG Y +CFLAGS += -d2 -DDEBUG -DPDCDEBUG +!ifdef TARGET16 +CFLAGS += -hw +!else +CFLAGS += -hd +!endif +!else +CFLAGS += -s -oneatx -DNDEBUG +!endif +!ifdef CHTYPE_32 +CFLAGS += -DCHTYPE_32 +!endif +!ifeq WIDE Y +CFLAGS += -DPDC_WIDE +!endif +!ifeq UTF8 Y +CFLAGS += -DPDC_FORCE_UTF8 +!endif +!ifeq TARGET dos +CFLAGS += -DDOS +!endif +!ifdef cflags_dll_$(TARGET) +CFLAGS += $(cflags_dll_imp_$(TARGET)) +DLL_CFLAGS_ = $(cflags_dll_$(TARGET)) +!endif + +!ifdef DLL +ltarget_dll_nt = nt_dll +ltarget_dll_os2 = os2v2_dll +!endif + +LDFLAGS = op q, noext +!ifeq DEBUG Y +!ifdef TARGET16 +LDFLAGS += debug watcom all +!else +LDFLAGS += debug dwarf all +!endif +!endif + +srcdir = $(PDCURSES_SRCDIR)/pdcurses +demodir = $(PDCURSES_SRCDIR)/demos + +LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj & + border.obj clear.obj color.obj delch.obj deleteln.obj & + getch.obj getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj & + insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj & + outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj & + scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj terminfo.obj & + touch.obj util.obj window.obj debug.obj + +PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj & + pdcsetsc.obj pdcutil.obj + +DEMOS = calendar$(E) firework$(E) init_col$(E) mbrot$(E) newtest$(E) & + ozdemo$(E) picsview$(E) ptest$(E) rain$(E) speed$(E) test_pan$(E) & + testcurs$(E) tuidemo$(E) widetest$(E) worm$(E) xmas$(E) + +PDCNAME = pdcurses + +!ifdef __LOADDLL__ +! loaddll wcc wccd +! loaddll wcc386 wccd386 +! loaddll wlink wlinkd +! loaddll wlib wlibd +!endif + +all: $(PDCNAME).lib + +.c: $(srcdir);$(PDCURSES_SRCDIR)/$(osdir);$(demodir) +.c.obj: .autodepend +!ifeq TARGET dos + @set INCLUDE=$(%WATCOM)/h +!else ifeq TARGET os2 + @set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/os2 +!else ifeq TARGET nt + @set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt +!else ifeq TARGET linux + @set INCLUDE=$(%WATCOM)/lh +!endif + $(CC) $(CFLAGS) $(DLL_CFLAGS_$(build_dll_$^&)) -fo=$@ $< + +!ifeq TARGET linux +.obj.: +!else +.obj$(E): +!endif +# $(LINK) $(LDFLAGS) name $@ form pm file $*.obj lib $(PDCNAME).lib $(ADDED_LIBS) + $(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file $*.obj lib $(PDCNAME).lib $(ADDED_LIBS) + +build_dll_calendar = no +build_dll_firework = no +build_dll_init_col = no +build_dll_mbrot = no +build_dll_newtest = no +build_dll_ozdemo = no +build_dll_picsview = no +build_dll_ptest = no +build_dll_rain = no +build_dll_test_pan = no +build_dll_testcurs = no +build_dll_tui = no +build_dll_tuidemo = no +build_dll_widetest = no +build_dll_worm = no +build_dll_xmas = no + +calendar$(E): calendar.obj $(PDCNAME).lib +firework$(E): firework.obj $(PDCNAME).lib +init_col$(E): init_col.obj $(PDCNAME).lib +mbrot$(E): mbrot.obj $(PDCNAME).lib +newtest$(E): newtest.obj $(PDCNAME).lib +ozdemo$(E): ozdemo.obj $(PDCNAME).lib +picsview$(E): picsview.obj $(PDCNAME).lib +ptest$(E): ptest.obj $(PDCNAME).lib +rain$(E): rain.obj $(PDCNAME).lib +testcurs$(E): testcurs.obj $(PDCNAME).lib +test_pan$(E): test_pan.obj $(PDCNAME).lib +widetest$(E): widetest.obj $(PDCNAME).lib +worm$(E): worm.obj $(PDCNAME).lib +xmas$(E): xmas.obj $(PDCNAME).lib + +tuidemo$(E): tuidemo.obj tui.obj $(PDCNAME).lib + $(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file {tuidemo.obj tui.obj} lib $(PDCNAME).lib $(ADDED_LIBS) + +!ifdef ltarget_dll_$(TARGET) +version_res_nt = $(PDCNAME).res + +.rc: $(PDCURSES_SRCDIR)/common +.rc.res: +!ifeq TARGET nt + @set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt +!endif + $(RC) -r -bt=$(TARGET) $< -fo=$@ +!endif + +$(PDCNAME).lbc : $(LIBOBJS) $(PDCOBJS) $(version_res_$(TARGET)) +!ifdef ltarget_dll_$(TARGET) + $(LINK) $(LDFLAGS) name $(PDCNAME).dll sys $(ltarget_dll_$(TARGET)) opt impfile=$@ file {$(LIBOBJS) $(PDCOBJS)} $(ADDED_LIBS_FOR_DLL) +!ifdef version_res_$(TARGET) + $(RC) -k -bt=$(TARGET) $(version_res_$(TARGET)) $(PDCNAME).dll +!endif +!else + %write $@ $(LIBOBJS) $(PDCOBJS) +!endif + +$(PDCNAME).lib : $(PDCNAME).lbc + $(LIBEXE) $@ @$< +!ifdef EXTRA_LIB_CMD + $(EXTRA_LIB_CMD) +!endif + +demos: $(DEMOS) + +dist: .symbolic + +clean: .symbolic + @if exist *.obj -$(DEL) *.obj + @if exist *.lib -$(DEL) *.lib + @if exist *.dll -$(DEL) *.dll + @for %f in ($(DEMOS)) do @if exist %f -$(DEL) %f + @if exist *.err -$(DEL) *.err + @if exist *.map -$(DEL) *.map + @if exist *.res -$(DEL) *.res + @if exist *.lbc -$(DEL) *.lbc +############################################################################## diff --git a/os2gui/README.md b/os2gui/README.md new file mode 100644 index 00000000..e01527d1 --- /dev/null +++ b/os2gui/README.md @@ -0,0 +1,69 @@ +PDCurses for OS2GUI +=================== + +This directory contains PDCurses source code files specific to OS/2 +graphics mode. + +Building +-------- + +- Choose the appropriate makefile for your compiler: + + Makefile - EMX 0.9d+ + Makefile.wcc - Open Watcom 1.9+ + +- Optionally, you can build in a different directory than the platform + directory by setting PDCURSES_SRCDIR to point to the directory where + you unpacked PDCurses, and changing to your target directory: + + set PDCURSES_SRCDIR=c:\pdcurses + +- Build it: + + make -f makefilename + + (For Watcom, use "wmake" instead of "make"; for MSVC, "nmake".) You'll + get the libraries (pdcurses.lib or .a, depending on your compiler; and + panel.lib or .a), the demos (*.exe), and a lot of object files. Note + that the panel library is just a copy of the main library, provided + for convenience; both panel and curses functions are in the main + library. + + You can also give the optional parameter "WIDE=Y", to build the + library with wide-character (Unicode) support: + + wmake -f Makefile.wcc WIDE=Y + + Another option, "UTF8=Y", makes PDCurses ignore the system locale, and + treat all narrow-character strings as UTF-8. This option has no effect + unless WIDE=Y is also set. This was originally provided to get around + poor support for UTF-8 in the Win32 console: + + wmake -f Makefile.wcc WIDE=Y UTF8=Y + + OS2GUI doesn't have the same limitations as the OS/2 console flavor, + but UTF-8 and non-UTF-8 versions are still available. If nothing else, + this means that if you've built a OS/2 console PDCurses DLL with any + configuration, you can build a matching OS2GUI DLL and swap between + console or GUI PDCurses just by swapping DLLs. + + You can also use the optional parameter "DLL=Y" with Visual C++, + MinGW or Cygwin, to build the library as a DLL: + + nmake -f Makefile.vc WIDE=Y DLL=Y + + When you build the library as a Windows DLL, you must always define + PDC_DLL_BUILD when linking against it. (Or, if you only want to use + the DLL, you could add this definition to your curses.h.) + +Distribution Status +------------------- + +The files in this directory are released to the Public Domain. + +Acknowledgements +---------------- + +Based heavily on the Win32 console flavor of PDCurses by Chris Szurgot +, ported to Win32 GUI by Bill Gray +. diff --git a/os2gui/pdcclip.c b/os2gui/pdcclip.c new file mode 100644 index 00000000..b61ed390 --- /dev/null +++ b/os2gui/pdcclip.c @@ -0,0 +1,165 @@ +/* PDCurses */ + +#include "pdcwin.h" +#include +#include + +/*man-start************************************************************** + +clipboard +--------- + +### Synopsis + + int PDC_getclipboard(char **contents, long *length); + int PDC_setclipboard(const char *contents, long length); + int PDC_freeclipboard(char *contents); + int PDC_clearclipboard(void); + +### Description + + PDC_getclipboard() gets the textual contents of the system's + clipboard. This function returns the contents of the clipboard in the + contents argument. It is the responsibility of the caller to free the + memory returned, via PDC_freeclipboard(). The length of the clipboard + contents is returned in the length argument. + + PDC_setclipboard copies the supplied text into the system's + clipboard, emptying the clipboard prior to the copy. + + PDC_clearclipboard() clears the internal clipboard. + +### Return Values + + indicator of success/failure of call. + PDC_CLIP_SUCCESS the call was successful + PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for + the clipboard contents + PDC_CLIP_EMPTY the clipboard contains no text + PDC_CLIP_ACCESS_ERROR no clipboard support + +### Portability + X/Open ncurses NetBSD + PDC_getclipboard - - - + PDC_setclipboard - - - + PDC_freeclipboard - - - + PDC_clearclipboard - - - + +**man-end****************************************************************/ + +int PDC_getclipboard(char **contents, long *length) +{ + HAB hab; + PTIB ptib; + PPIB ppib; + ULONG ulRet; + long len; + int rc; + + PDC_LOG(("PDC_getclipboard() - called\n")); + + DosGetInfoBlocks(&ptib, &ppib); + ppib->pib_ultype = 3; + hab = WinQueryAnchorBlock( PDC_hWnd); + + if (!WinOpenClipbrd(hab)) + { + return PDC_CLIP_ACCESS_ERROR; + } + + rc = PDC_CLIP_EMPTY; + + ulRet = WinQueryClipbrdData(hab, CF_TEXT); + + if (ulRet) + { + len = strlen((char *)ulRet); + *contents = malloc(len + 1); + + if (!*contents) + rc = PDC_CLIP_MEMORY_ERROR; + else + { + strcpy((char *)*contents, (char *)ulRet); + *length = len; + rc = PDC_CLIP_SUCCESS; + } + } + + WinCloseClipbrd(hab); + + return rc; +} + +int PDC_setclipboard(const char *contents, long length) +{ + HAB hab; + PTIB ptib; + PPIB ppib; + ULONG ulRC; + char *szTextOut = NULL; + int rc; + + PDC_LOG(("PDC_setclipboard() - called\n")); + + DosGetInfoBlocks(&ptib, &ppib); + ppib->pib_ultype = 3; + hab = WinQueryAnchorBlock( PDC_hWnd); + + if (!WinOpenClipbrd(hab)) + { + return PDC_CLIP_ACCESS_ERROR; + } + + rc = PDC_CLIP_MEMORY_ERROR; + + ulRC = DosAllocSharedMem((PVOID)&szTextOut, NULL, length + 1, + PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE); + + if (ulRC == 0) + { + strcpy(szTextOut, contents); + WinEmptyClipbrd(hab); + + if (WinSetClipbrdData(hab, (ULONG)szTextOut, CF_TEXT, CFI_POINTER)) + rc = PDC_CLIP_SUCCESS; + else + { + DosFreeMem(szTextOut); + rc = PDC_CLIP_ACCESS_ERROR; + } + } + + WinCloseClipbrd(hab); + + return rc; +} + +int PDC_freeclipboard(char *contents) +{ + PDC_LOG(("PDC_freeclipboard() - called\n")); + + if (contents) + free(contents); + + return PDC_CLIP_SUCCESS; +} + +int PDC_clearclipboard(void) +{ + HAB hab; + PTIB ptib; + PPIB ppib; + + PDC_LOG(("PDC_clearclipboard() - called\n")); + + DosGetInfoBlocks(&ptib, &ppib); + ppib->pib_ultype = 3; + hab = WinQueryAnchorBlock( PDC_hWnd); + + WinEmptyClipbrd(hab); + + WinCloseClipbrd(hab); + + return PDC_CLIP_SUCCESS; +} diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c new file mode 100644 index 00000000..0d441fc1 --- /dev/null +++ b/os2gui/pdcdisp.c @@ -0,0 +1,2001 @@ +/* Public Domain Curses */ + +#include "pdcwin.h" +#ifdef PDC_WIDE +#define USE_UNICODE_ACS_CHARS 1 +#else +#define USE_UNICODE_ACS_CHARS 0 +#endif +#include "../common/acs_defs.h" + +#include +#include +#include +#include "../common/pdccolor.h" +#include "../common/pdccolor.c" + +/* Cursors may be added to the 'shapes' array. A 'shapes' string +defines the cursor as one or more rectangles, separated by semicolons. +The coordinates of the upper left and lower right corners are given, +usually just as integers from zero to eight. Thus, "0488" means a +rectangle running from (0,4), middle of the left side, to (8,8), +bottom right corner: a rectangle filling the bottom half of the +character cell. "0048" would fill the left half of the cell, and +"0082;6088" would fill the top and bottom quarters of the cell. + + However, a coordinate may be followed by a + or -, and then by a +single-digit offset in pixels. So "08-4" refers to a point on the +left-hand side of the character cell, four pixels from the bottom. I +admit that the cursor descriptions themselves look a little strange! +But this way of describing cursors is compact and lends itself to some +pretty simple code. + + The first three lines are standard PDCurses cursors: 0=no cursor, +1=four-pixel thick line at bottom of the cell, 2="high-intensity", +i.e., a filled block. The rest are extended cursors, not currently +available in other PDCurses flavors. */ + +#define N_CURSORS 9 + +static void redraw_cursor_from_index( HPS hps, const int idx) +{ + const char *shapes[N_CURSORS] = { + "", /* 0: invisible */ + "08-488", /* 1: normal: four lines at bottom */ + "0088", /* 2: full block */ + "0088;0+10+18-18-1", /* 3: outlined block */ + "28-368;4-10+34+18-3;2060+3", /* 4: caret */ + "0488", /* 5: bottom half block */ + "2266", /* 6: central block */ + "0385;3053;3558", /* 7: cross */ + "0088;0+10+48-18-4" }; /* 8: outlined block: heavy top/bottom*/ + const char *sptr; + RECTL cell_rect; + + if (idx < 0 || N_CURSORS <= idx) + sptr = shapes[1]; + else + sptr = shapes[idx]; + PDC_screen_to_pixel(SP->curscol, SP->cursrow, &cell_rect); + + while( *sptr) + { + int i; + LONG coords[4]; + RECTL rect; + + for( i = 0; i < 4; i++) + { + coords[i] = (( i & 1) ? + cell_rect.yTop - (PDC_cyChar * (*sptr - '0') + 4) / 8 : + cell_rect.xLeft + (PDC_cxChar * (*sptr - '0') + 4) / 8); + sptr++; + if( *sptr == '+' || *sptr == '-') + { + if( (*sptr == '+') ^ (i & 1)) + coords[i] += sptr[1] - '0'; + else + coords[i] -= sptr[1] - '0'; + sptr += 2; + } + } + rect.xLeft = coords[0]; + rect.yTop = coords[1]; + rect.xRight = coords[2]; + rect.yBottom = coords[3]; + WinInvertRect( hps, &rect); + if( *sptr == ';') + sptr++; + } +} + +/* PDC_current_cursor_state( ) determines which cursor, if any, +is currently shown. This may depend on the blink state. Also, +if the window currently lacks the focus, we show cursor 3 (a hollow +box) in place of any visible cursor. */ + +static int PDC_current_cursor_state( void) +{ + const int shift_amount = (PDC_blink_state ? 0 : 8); + const int cursor_style_for_unfocussed_window = + PDC_CURSOR( PDC_CURSOR_OUTLINE, PDC_CURSOR_OUTLINE); + int cursor_style; + + /* for unfocussed windows, show an hollow box: */ + if( SP->visibility && (PDC_hWnd != WinQueryActiveWindow( HWND_DESKTOP))) + cursor_style = cursor_style_for_unfocussed_window; + else /* otherwise, just show the cursor "normally" */ + cursor_style = SP->visibility; + return( (cursor_style >> shift_amount) & 0xff); +} + +static void redraw_cursor( HPS hps) +{ + const int cursor_style = PDC_current_cursor_state( ); + + if( cursor_style > 0 && cursor_style < N_CURSORS) + redraw_cursor_from_index( hps, cursor_style); +} + +/* position "hardware" cursor at (y, x). We don't have a for-real hardware */ +/* cursor in this version, of course, but we can fake it. Note that much */ +/* of the logic was borrowed from the SDL version. In particular, the */ +/* cursor is moved by first overwriting the "original" location. */ + +void PDC_gotoyx(int row, int col) +{ + PDC_LOG(("PDC_gotoyx() - called: row %d col %d from row %d col %d\n", + row, col, SP->cursrow, SP->curscol)); + + /* clear the old cursor, if it's on-screen: */ + if( SP->cursrow >= 0 && SP->curscol >= 0 && + SP->cursrow < SP->lines && SP->curscol < SP->cols) + { + const int temp_visibility = SP->visibility; + + SP->visibility = 0; + PDC_transform_line_sliced( SP->cursrow, SP->curscol, 1, + curscr->_y[SP->cursrow] + SP->curscol); + SP->visibility = temp_visibility; + } + + /* ...then draw the new (assuming it's actually visible). */ + /* This used to require some logic. Now the redraw_cursor() */ + /* function figures out what cursor should be drawn, if any. */ + if( SP->visibility) + { + HPS hps = WinGetPS( PDC_hWnd) ; + GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL); + PDC_setup_font(hps); + + SP->curscol = col; + SP->cursrow = row; + redraw_cursor( hps); + WinReleasePS( hps) ; + } +} + +int PDC_choose_a_new_font(char font[FACESIZE], int *fontsize) +{ + FONTDLG dlg; + HPS hps = WinGetPS(PDC_hWnd); + char new_font[FACESIZE]; + HWND hwndDlg; + BOOL ok; + + memset(&dlg, 0, sizeof(dlg)); + strcpy(new_font, font); + dlg.cbSize = sizeof(dlg); + dlg.hpsScreen = hps; + dlg.pszFamilyname = (PSZ)new_font; + dlg.usFamilyBufLen = sizeof(new_font); + dlg.fl = FNTS_FIXEDWIDTHONLY | FNTS_CENTER | FNTS_INITFROMFATTRS; + dlg.fxPointSize = *fontsize << 16; + dlg.pszPreview = (PSZ)"The quick brown fox jumps over the lazy dog."; + dlg.clrFore = SYSCLR_WINDOWTEXT; + dlg.clrBack = SYSCLR_WINDOW; + + hwndDlg = WinFontDlg(HWND_DESKTOP, PDC_hWnd, &dlg); + + WinReleasePS(hps); + + ok = hwndDlg != NULLHANDLE && dlg.lReturn == DID_OK; + if (ok) + { + strcpy(font, new_font); + *fontsize = dlg.fxPointSize >> 16; + } + + return ok; +} + +/* Implement certain alternate characters by special means, because they are + not present in IBM 437, and are lacking in many fonts */ +/* Return true if ch requires a special draw */ +static int +do_special_draw(HPS hps, PRECTL rect, chtype ch) +{ + int dy = rect->yTop - rect->yBottom - 2; + POINTL p; + int y2 = 0; + + p.y = rect->yBottom + 1; + /* Watcom C doesn't like 64 bit int in switch */ + switch ((unsigned)(ch & (A_CHARTEXT | A_ALTCHARSET))) + { + case ACS_S1: +#ifdef PDC_WIDE + case 0x23BA: +#endif + p.y += dy; + y2 = p.y - 1; + break; + + case ACS_S3: +#ifdef PDC_WIDE + case 0x23BB: +#endif + p.y += dy - dy/4; + y2 = p.y - 1; + break; + + case ACS_S7: +#ifdef PDC_WIDE + case 0x23BC: +#endif + p.y += dy/4; + y2 = p.y + 1; + break; + + case ACS_S9: +#ifdef PDC_WIDE + case 0x23BD: +#endif + y2 = p.y + 1; + break; + + default: + return FALSE; + } + p.x = rect->xLeft; + GpiMove(hps, &p); + p.x = rect->xRight - 1; + GpiLine(hps, &p); + if (ch & A_BOLD) + { + p.y = y2; + p.x = rect->xLeft; + GpiMove(hps, &p); + p.x = rect->xRight - 1; + GpiLine(hps, &p); + } + return TRUE; +} + +/* OS/2 expects RGB triplets with red as the most significant byte; but + PDCursesMod expects red to be least significant. Switch the components + here, and also request the color index. */ +static LONG switch_colors(HPS hps, LONG color) +{ + color = ((color & 0xFF0000) >> 16) + | (color & 0x00FF00) + | ((color & 0x0000FF) << 16); + color = GpiQueryColorIndex(hps, 0, color); + return color; +} + +/* Code pages used for rendering text. + If PDC_WIDE is not in effect, the configured system code page renders + normal characters. Alternate characters are drawn from code page 437, + except the not-equals sign, which is drawn from code page 1275. + If PDC_WIDE is defined, we use the system code page for ASCII (it renders + faster than 1200). For non-ASCII, we use code page 1200, if we have it; + other code pages are used if 1200 is not available. + OS/2 Warp 4.52 and ArcaOS 5.1 have all of the code pages listed here. + OS/2 Warp 4.0 has all except 1200. + OS/2 Warp 3.0 has 437, 850, 852, 857 and 1004. + OS/2 2.0 is documented as having 437, 850, 852, 857 and 1004. */ +static const unsigned short code_pages[] = { + 437, /* For alternative character set */ + 1275, /* For the not-equal sign and a few Unicode characters */ +#ifdef PDC_WIDE + 1200, /* DBCS supporting the Unicode Basic Multilingual Plane */ + 850, /* Latin-1 */ + 852, /* Latin-2 */ + 857, /* Turkish */ + 1004, /* Windows-1252 (1252 is same, but not present in older OS/2s) */ + 1257, /* Windows-1257 */ + 869, /* Greek */ + 1251, /* Windows-1251 */ +#endif +}; + +enum CodePage { + cp_native = 0, + cp_437, + cp_1275 +#ifdef PDC_WIDE + , + cp_1200, + cp_850, + cp_852, + cp_857, + cp_1004, + cp_1257, + cp_869, + cp_1251 +#endif +}; + +static bool have_cp[sizeof(code_pages)/sizeof(code_pages[0]) + 1]; +static bool cp_inited = FALSE; + +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) +static uint32_t *PDC_normalize(uint32_t ch, bool compose); +#endif + +static void render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int charset); + +/* update the given physical line to look like the corresponding line in +curscr. + + NOTE that if x > 0, we decrement it and srcp, and increment the +length. In other words, we draw the preceding character, too. This +is done because, at certain font sizes, characters break out and +overwrite the preceding character. That results in debris left on +the screen. + + The code also now increments the length only, drawing one more +character (i.e., draws the character following the "text we really +want"). Again, this helps to avoid debris left on the screen. */ + +static void PDC_transform_line_given_hps( HPS hps, const int lineno, + int x, int len, const chtype *srcp) +{ +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) + /* A selection of characters to be overstruck, to provide combining characters that + cannot be supported via composition */ + static const unsigned short cchars[] = { + /* 0x0300 */ 0x0060, + /* 0x0301 */ 0x00B4, + /* 0x0302 */ 0x005E, + /* 0x0303 */ 0x02DC, + /* 0x0304 */ 0x00AF, + /* 0x0305 */ 0x203E, + /* 0x0306 */ 0x02D8, + /* 0x0307 */ 0x02D9, + /* 0x0308 */ 0x00A8, + /* 0x0309 */ ' ', + /* 0x030A */ 0x02DA, + /* 0x030B */ 0x02DD, + /* 0x030C */ 0x02C7, + /* 0x030D */ ' ', + /* 0x030E */ ' ', + /* 0x030F */ ' ', + /* 0x0310 */ ' ', + /* 0x0311 */ ' ', + /* 0x0312 */ ' ', + /* 0x0313 */ ' ', + /* 0x0314 */ ' ', + /* 0x0315 */ ' ', + /* 0x0316 */ ' ', + /* 0x0317 */ ' ', + /* 0x0318 */ ' ', + /* 0x0319 */ ' ', + /* 0x031A */ ' ', + /* 0x031B */ ' ', + /* 0x031C */ ' ', + /* 0x031D */ ' ', + /* 0x031E */ ' ', + /* 0x031F */ ' ', + /* 0x0320 */ ' ', + /* 0x0321 */ ' ', + /* 0x0322 */ ' ', + /* 0x0323 */ ' ', + /* 0x0324 */ ' ', + /* 0x0325 */ ' ', + /* 0x0326 */ ' ', + /* 0x0327 */ 0x00B8, + /* 0x0328 */ 0x02DB, + /* 0x0329 */ ' ', + /* 0x032A */ ' ', + /* 0x032B */ ' ', + /* 0x032C */ ' ', + /* 0x032D */ ' ', + /* 0x032E */ ' ', + /* 0x032F */ ' ', + /* 0x0330 */ ' ', + /* 0x0331 */ ' ', + /* 0x0332 */ 0x005F, + /* 0x0333 */ 0x2017, + /* 0x0334 */ ' ', + /* 0x0335 */ ' ', + /* 0x0336 */ ' ', + /* 0x0337 */ ' ', + /* 0x0338 */ ' ', + /* 0x0339 */ ' ', + /* 0x033A */ ' ', + /* 0x033B */ ' ', + /* 0x033C */ ' ', + /* 0x033D */ ' ', + /* 0x033E */ 0x2E2F, + /* 0x033F */ ' ', + /* 0x0340 */ ' ', + /* 0x0341 */ ' ', + /* 0x0342 */ 0x1FC0, + /* 0x0343 */ 0x1FBD, + /* 0x0344 */ 0x0385, + /* 0x0345 */ 0x037A, + }; +#endif + int cursor_overwritten = FALSE; + FATTRS fattrs; + STR8 synth; + BOOL have_bold; + PACKED_RGB foreground_rgb; + PACKED_RGB background_rgb; + RECTL clip_rect; + int i; + FONTMETRICS fm; + + /* Seems to me as if the input text to this function */ + if( x < 0) /* should _never_ be off-screen. But it sometimes is. */ + { /* Clipping is therefore necessary. */ + len += x; + srcp -= x; + x = 0; + } + if( len < SP->cols - x && (srcp[len] & A_CHARTEXT) < MAX_UNICODE) + len++; /* draw an extra char to avoid leaving garbage on screen */ + if( len > SP->cols - x) + len = SP->cols - x; + if( lineno >= SP->lines || len <= 0 || lineno < 0) + return; + assert( (srcp[len - 1] & A_CHARTEXT) != MAX_UNICODE); + if( x && (srcp[-1] & A_CHARTEXT) < MAX_UNICODE) + { /* back up by one character to avoid */ + x--; /* leaving garbage on the screen */ + len++; + srcp--; + } + if( lineno == SP->cursrow && SP->curscol >= x && SP->curscol < x + len) + if( PDC_current_cursor_state( )) + cursor_overwritten = TRUE; + + /* Do we have a real bold font? */ + GpiQueryLogicalFont(hps, 2 + 1, (PSTR8)synth, &fattrs, sizeof(fattrs)); + have_bold = synth[0] == '\0'; + + /* Erase the background */ + PDC_get_rgb_values( srcp[0], &foreground_rgb, &background_rgb); + PDC_screen_to_pixel(x, lineno, &clip_rect); + clip_rect.xRight = clip_rect.xLeft + PDC_cxChar; + for (i = 1; i < len; ++i) + { + PACKED_RGB new_bg; + PDC_get_rgb_values( srcp[i], &foreground_rgb, &new_bg); + if (new_bg != background_rgb) + { + WinFillRect(hps, &clip_rect, switch_colors(hps, background_rgb)); + clip_rect.xLeft = clip_rect.xRight; + background_rgb = new_bg; + } + clip_rect.xRight += PDC_cxChar; + } + WinFillRect(hps, &clip_rect, switch_colors(hps, background_rgb)); + + /* Expand by one more column */ + if( len < SP->cols - x && (srcp[len] & A_CHARTEXT) < MAX_UNICODE) + len++; + if( x && (srcp[-1] & A_CHARTEXT) < MAX_UNICODE) + { + x--; + len++; + srcp--; + } + + /* Render the text */ + GpiQueryFontMetrics(hps, sizeof(fm), &fm); + for (i = 0; i < len; ++i) + { + const attr_t attrib = (attr_t)( srcp[i] & ~A_CHARTEXT); + uint32_t cp_ch = (uint32_t)( srcp[i] & A_CHARTEXT); + int charset; + ULONG options = 0; +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) + uint32_t *seq = NULL; +#endif + + if (cp_ch == MAX_UNICODE) + continue; + + PDC_get_rgb_values( attrib, &foreground_rgb, &background_rgb); + foreground_rgb = switch_colors(hps, foreground_rgb); + + PDC_screen_to_pixel(x + i, lineno, &clip_rect); + clip_rect.xRight = clip_rect.xLeft + PDC_cxChar; + +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) + if (cp_ch > MAX_UNICODE) + { + seq = PDC_normalize(cp_ch, TRUE); + cp_ch = seq[0]; + } +#endif + + charset = 0; + if ((attrib & A_BOLD) && have_bold) + charset |= 2; + if (attrib & A_ITALIC) + charset |= 1; + + GpiSetColor(hps, foreground_rgb); + if (!do_special_draw(hps, &clip_rect, srcp[i])) + { + POINTL pt; + +#ifdef PDC_WIDE + if (_is_altcharset(attrib)) + cp_ch = acs_map[cp_ch & 0xFF]; +#else + cp_ch = srcp[i] & (A_CHARTEXT | A_ALTCHARSET); +#endif + + pt.x = clip_rect.xLeft; + pt.y = clip_rect.yBottom + fm.lMaxDescender; + render_char(hps, &pt, &clip_rect, options, cp_ch, charset); + if ((attrib & A_BOLD) && !have_bold) + { + /* Overstrike to make a bold font */ + ++pt.x; + render_char(hps, &pt, &clip_rect, options, cp_ch, charset); + --pt.x; + } +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) + if (seq) + { + unsigned j; + for (j = 1; seq[j] != 0; ++j) + { + uint32_t cch = seq[j]; + if (0x0300 <= cch && cch < 0x0300 + sizeof(cchars)/sizeof(cchars[0])) + { + cch = cchars[cch - 0x0300]; + render_char(hps, &pt, &clip_rect, options, cch, charset); + if ((attrib & A_BOLD) && !have_bold) + { + /* Overstrike to make a bold font */ + ++pt.x; + render_char(hps, &pt, &clip_rect, options, cch, charset); + --pt.x; + } + } + } + } +#endif + } +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) + free(seq); +#endif + + if (attrib & A_UNDERLINE) + { + POINTL pt; + pt.x = clip_rect.xLeft; + pt.y = clip_rect.yBottom; + GpiMove(hps, &pt); + pt.x = clip_rect.xRight - 1; + GpiLine(hps, &pt); + } + + if (attrib & A_STRIKEOUT) + { + POINTL pt; + pt.x = clip_rect.xLeft; + pt.y = (clip_rect.yBottom + clip_rect.yTop) / 2; + GpiMove(hps, &pt); + pt.x = clip_rect.xRight - 1; + GpiLine(hps, &pt); + } + + if (attrib & A_TOP) + { + POINTL pt; + pt.x = clip_rect.xLeft; + pt.y = clip_rect.yTop - 1; + GpiMove(hps, &pt); + pt.x = clip_rect.xRight - 1; + GpiLine(hps, &pt); + } + + if (attrib & A_LEFT) + { + POINTL pt; + pt.x = clip_rect.xLeft; + pt.y = clip_rect.yBottom; + GpiMove(hps, &pt); + pt.y = clip_rect.yTop - 1; + GpiLine(hps, &pt); + } + + if (attrib & A_RIGHT) + { + POINTL pt; + pt.x = clip_rect.xLeft + PDC_cxChar - 1; + pt.y = clip_rect.yBottom; + GpiMove(hps, &pt); + pt.y = clip_rect.yTop - 1; + GpiLine(hps, &pt); + } + } + + /* ...did we step on the cursor? If so, redraw it: */ + if( cursor_overwritten) + redraw_cursor( hps); +} + +struct CharRec { + unsigned short uni_ch; + struct { + unsigned char code_page; + unsigned char code_point; + } glyphs[3]; +}; + +#ifdef PDC_WIDE +/* Table of Unicode characters, and the code pages and code points needed to + render them. Where multiple code points are listed, they are overstruck. */ +static const struct CharRec characters[] = { + { 0x00A0, { { cp_850, 0xFF } } }, + { 0x00A1, { { cp_850, 0xAD } } }, + { 0x00A2, { { cp_850, 0xBD } } }, + { 0x00A3, { { cp_850, 0x9C } } }, + { 0x00A4, { { cp_850, 0xCF } } }, + { 0x00A5, { { cp_850, 0xBE } } }, + { 0x00A6, { { cp_850, 0xDD } } }, + { 0x00A7, { { cp_850, 0xF5 } } }, + { 0x00A8, { { cp_850, 0xF9 } } }, + { 0x00A9, { { cp_850, 0xB8 } } }, + { 0x00AA, { { cp_850, 0xA6 } } }, + { 0x00AB, { { cp_850, 0xAE } } }, + { 0x00AC, { { cp_850, 0xAA } } }, + { 0x00AD, { { cp_850, 0xF0 } } }, + { 0x00AE, { { cp_850, 0xA9 } } }, + { 0x00AF, { { cp_850, 0xEE } } }, + { 0x00B0, { { cp_850, 0xF8 } } }, + { 0x00B1, { { cp_850, 0xF1 } } }, + { 0x00B2, { { cp_850, 0xFD } } }, + { 0x00B3, { { cp_850, 0xFC } } }, + { 0x00B4, { { cp_850, 0xEF } } }, + { 0x00B5, { { cp_850, 0xE6 } } }, + { 0x00B6, { { cp_850, 0xF4 } } }, + { 0x00B7, { { cp_850, 0xFA } } }, + { 0x00B8, { { cp_850, 0xF7 } } }, + { 0x00B9, { { cp_850, 0xFB } } }, + { 0x00BA, { { cp_850, 0xA7 } } }, + { 0x00BB, { { cp_850, 0xAF } } }, + { 0x00BC, { { cp_850, 0xAC } } }, + { 0x00BD, { { cp_850, 0xAB } } }, + { 0x00BE, { { cp_850, 0xF3 } } }, + { 0x00BF, { { cp_850, 0xA8 } } }, + { 0x00C0, { { cp_850, 0xB7 } } }, + { 0x00C1, { { cp_850, 0xB5 } } }, + { 0x00C2, { { cp_850, 0xB6 } } }, + { 0x00C3, { { cp_850, 0xC7 } } }, + { 0x00C4, { { cp_850, 0x8E } } }, + { 0x00C5, { { cp_850, 0x8F } } }, + { 0x00C6, { { cp_850, 0x92 } } }, + { 0x00C7, { { cp_850, 0x80 } } }, + { 0x00C8, { { cp_850, 0xD4 } } }, + { 0x00C9, { { cp_850, 0x90 } } }, + { 0x00CA, { { cp_850, 0xD2 } } }, + { 0x00CB, { { cp_850, 0xD3 } } }, + { 0x00CC, { { cp_850, 0xDE } } }, + { 0x00CD, { { cp_850, 0xD6 } } }, + { 0x00CE, { { cp_850, 0xD7 } } }, + { 0x00CF, { { cp_850, 0xD8 } } }, + { 0x00D0, { { cp_850, 0xD1 } } }, + { 0x00D1, { { cp_850, 0xA5 } } }, + { 0x00D2, { { cp_850, 0xE3 } } }, + { 0x00D3, { { cp_850, 0xE0 } } }, + { 0x00D4, { { cp_850, 0xE2 } } }, + { 0x00D5, { { cp_850, 0xE5 } } }, + { 0x00D6, { { cp_850, 0x99 } } }, + { 0x00D7, { { cp_850, 0x9E } } }, + { 0x00D8, { { cp_850, 0x9D } } }, + { 0x00D9, { { cp_850, 0xEB } } }, + { 0x00DA, { { cp_850, 0xE9 } } }, + { 0x00DB, { { cp_850, 0xEA } } }, + { 0x00DC, { { cp_850, 0x9A } } }, + { 0x00DD, { { cp_850, 0xED } } }, + { 0x00DE, { { cp_850, 0xE8 } } }, + { 0x00DF, { { cp_850, 0xE1 } } }, + { 0x00E0, { { cp_850, 0x85 } } }, + { 0x00E1, { { cp_850, 0xA0 } } }, + { 0x00E2, { { cp_850, 0x83 } } }, + { 0x00E3, { { cp_850, 0xC6 } } }, + { 0x00E4, { { cp_850, 0x84 } } }, + { 0x00E5, { { cp_850, 0x86 } } }, + { 0x00E6, { { cp_850, 0x91 } } }, + { 0x00E7, { { cp_850, 0x87 } } }, + { 0x00E8, { { cp_850, 0x8A } } }, + { 0x00E9, { { cp_850, 0x82 } } }, + { 0x00EA, { { cp_850, 0x88 } } }, + { 0x00EB, { { cp_850, 0x89 } } }, + { 0x00EC, { { cp_850, 0x8D } } }, + { 0x00ED, { { cp_850, 0xA1 } } }, + { 0x00EE, { { cp_850, 0x8C } } }, + { 0x00EF, { { cp_850, 0x8B } } }, + { 0x00F0, { { cp_850, 0xD0 } } }, + { 0x00F1, { { cp_850, 0xA4 } } }, + { 0x00F2, { { cp_850, 0x95 } } }, + { 0x00F3, { { cp_850, 0xA2 } } }, + { 0x00F4, { { cp_850, 0x93 } } }, + { 0x00F5, { { cp_850, 0xE4 } } }, + { 0x00F6, { { cp_850, 0x94 } } }, + { 0x00F7, { { cp_850, 0xF6 } } }, + { 0x00F8, { { cp_850, 0x9B } } }, + { 0x00F9, { { cp_850, 0x97 } } }, + { 0x00FA, { { cp_850, 0xA3 } } }, + { 0x00FB, { { cp_850, 0x96 } } }, + { 0x00FC, { { cp_850, 0x81 } } }, + { 0x00FD, { { cp_850, 0xEC } } }, + { 0x00FE, { { cp_850, 0xE7 } } }, + { 0x00FF, { { cp_850, 0x98 } } }, + { 0x0100, { { cp_1257, 0xC2 } } }, + { 0x0101, { { cp_1257, 0xE2 } } }, + { 0x0102, { { cp_852, 0xC6 } } }, + { 0x0103, { { cp_852, 0xC7 } } }, + { 0x0104, { { cp_852, 0xA4 } } }, + { 0x0105, { { cp_852, 0xA5 } } }, + { 0x0106, { { cp_852, 0x8F } } }, + { 0x0107, { { cp_852, 0x86 } } }, + { 0x0108, { { cp_850, 'C' }, { cp_850, '^' } } }, + { 0x0109, { { cp_850, 'c' }, { cp_850, '^' } } }, + { 0x010A, { { cp_852, 'C' }, { cp_852, 0xFA } } }, + { 0x010B, { { cp_852, 'c' }, { cp_852, 0xFA } } }, + { 0x010C, { { cp_852, 0xAC } } }, + { 0x010D, { { cp_852, 0x9F } } }, + { 0x010E, { { cp_852, 0xD2 } } }, + { 0x010F, { { cp_852, 0xD4 } } }, + { 0x0110, { { cp_852, 0xD1 } } }, + { 0x0111, { { cp_852, 0xD0 } } }, + { 0x0112, { { cp_1257, 0xC7 } } }, + { 0x0113, { { cp_1257, 0xE7 } } }, + { 0x0114, { { cp_852, 'E' }, { cp_852, 0xF4 } } }, + { 0x0115, { { cp_852, 'e' }, { cp_852, 0xF4 } } }, + { 0x0116, { { cp_1257, 0xCB } } }, + { 0x0117, { { cp_1257, 0xEB } } }, + { 0x0118, { { cp_852, 0xA8 } } }, + { 0x0119, { { cp_852, 0xA9 } } }, + { 0x011A, { { cp_852, 0xB7 } } }, + { 0x011B, { { cp_852, 0xD8 } } }, + { 0x011C, { { cp_850, 'G' }, { cp_850, '^' } } }, + { 0x011D, { { cp_850, 'g' }, { cp_850, '^' } } }, + { 0x011E, { { cp_857, 0xA6 } } }, + { 0x011F, { { cp_857, 0xA7 } } }, + { 0x0120, { { cp_852, 'G' }, { cp_852, 0xFA } } }, + { 0x0121, { { cp_852, 'g' }, { cp_852, 0xFA } } }, + { 0x0122, { { cp_1257, 0xCC } } }, + { 0x0123, { { cp_1257, 0xEC } } }, + { 0x0124, { { cp_850, 'H' }, { cp_850, '^' } } }, + { 0x0125, { { cp_850, 'h' }, { cp_850, '^' } } }, + { 0x0128, { { cp_1004, 'I' }, { cp_1004, 0x98 } } }, + { 0x0129, { { cp_1004, 'i' }, { cp_1004, 0x98 } } }, + { 0x012A, { { cp_1257, 0xCE } } }, + { 0x012B, { { cp_1257, 0xEE } } }, + { 0x012C, { { cp_852, 'I' }, { cp_852, 0xF4 } } }, + { 0x012D, { { cp_852, 'i' }, { cp_852, 0xF4 } } }, + { 0x012E, { { cp_1257, 0xC1 } } }, + { 0x012F, { { cp_1257, 0xE1 } } }, + { 0x0130, { { cp_857, 0x98 } } }, + { 0x0131, { { cp_857, 0x8D } } }, + { 0x0134, { { cp_850, 'J' }, { cp_850, '^' } } }, + { 0x0135, { { cp_850, 'j' }, { cp_850, '^' } } }, + { 0x0136, { { cp_1257, 0xCD } } }, + { 0x0137, { { cp_1257, 0xED } } }, + { 0x0139, { { cp_852, 0x91 } } }, + { 0x013A, { { cp_852, 0x92 } } }, + { 0x013B, { { cp_1257, 0xCF } } }, + { 0x013C, { { cp_1257, 0xEF } } }, + { 0x013D, { { cp_852, 0x95 } } }, + { 0x013E, { { cp_852, 0x96 } } }, + { 0x0141, { { cp_852, 0x9D } } }, + { 0x0142, { { cp_852, 0x88 } } }, + { 0x0143, { { cp_852, 0xE3 } } }, + { 0x0144, { { cp_852, 0xE4 } } }, + { 0x0145, { { cp_1257, 0xD2 } } }, + { 0x0146, { { cp_1257, 0xF2 } } }, + { 0x0147, { { cp_852, 0xD5 } } }, + { 0x0148, { { cp_852, 0xE5 } } }, + { 0x014C, { { cp_1257, 0xD4 } } }, + { 0x014D, { { cp_1257, 0xF4 } } }, + { 0x014E, { { cp_852, 'O' }, { cp_852, 0xF4 } } }, + { 0x014F, { { cp_852, 'o' }, { cp_852, 0xF4 } } }, + { 0x0150, { { cp_852, 0x8A } } }, + { 0x0151, { { cp_852, 0x8B } } }, + { 0x0152, { { cp_1004, 0x8C } } }, + { 0x0153, { { cp_1004, 0x9C } } }, + { 0x0154, { { cp_852, 0xE8 } } }, + { 0x0155, { { cp_852, 0xEA } } }, + { 0x0156, { { cp_1257, 0xAA } } }, + { 0x0157, { { cp_1257, 0xBA } } }, + { 0x0158, { { cp_852, 0xFC } } }, + { 0x0159, { { cp_852, 0xFD } } }, + { 0x015A, { { cp_852, 0x97 } } }, + { 0x015B, { { cp_852, 0x98 } } }, + { 0x015C, { { cp_850, 'S' }, { cp_850, '^' } } }, + { 0x015D, { { cp_850, 's' }, { cp_850, '^' } } }, + { 0x015E, { { cp_852, 0xB8 } } }, + { 0x015F, { { cp_852, 0xAD } } }, + { 0x0160, { { cp_852, 0xE6 } } }, + { 0x0161, { { cp_852, 0xE7 } } }, + { 0x0162, { { cp_852, 0xDD } } }, + { 0x0163, { { cp_852, 0xEE } } }, + { 0x0164, { { cp_852, 0x9B } } }, + { 0x0165, { { cp_852, 0x9C } } }, + { 0x0168, { { cp_1004, 'U' }, { cp_1004, 0x98 } } }, + { 0x0169, { { cp_1004, 'u' }, { cp_1004, 0x98 } } }, + { 0x016A, { { cp_1257, 0xDB } } }, + { 0x016B, { { cp_1257, 0xFB } } }, + { 0x016C, { { cp_852, 'U' }, { cp_852, 0xF4 } } }, + { 0x016D, { { cp_852, 'u' }, { cp_852, 0xF4 } } }, + { 0x016E, { { cp_852, 0xDE } } }, + { 0x016F, { { cp_852, 0x85 } } }, + { 0x0170, { { cp_852, 0xEB } } }, + { 0x0171, { { cp_852, 0xFB } } }, + { 0x0172, { { cp_1257, 0xD8 } } }, + { 0x0173, { { cp_1257, 0xF8 } } }, + { 0x0174, { { cp_850, 'W' }, { cp_850, '^' } } }, + { 0x0175, { { cp_850, 'w' }, { cp_850, '^' } } }, + { 0x0176, { { cp_850, 'Y' }, { cp_850, '^' } } }, + { 0x0177, { { cp_850, 'y' }, { cp_850, '^' } } }, + { 0x0178, { { cp_1004, 0x9F } } }, + { 0x0179, { { cp_852, 0x8D } } }, + { 0x017A, { { cp_852, 0xAB } } }, + { 0x017B, { { cp_852, 0xBD } } }, + { 0x017C, { { cp_852, 0xBE } } }, + { 0x017D, { { cp_852, 0xA6 } } }, + { 0x017E, { { cp_852, 0xA7 } } }, + { 0x0192, { { cp_850, 0x9F } } }, + { 0x01CD, { { cp_852, 'A' }, { cp_852, 0xF3 } } }, + { 0x01CE, { { cp_852, 'a' }, { cp_852, 0xF3 } } }, + { 0x01CF, { { cp_852, 'I' }, { cp_852, 0xF3 } } }, + { 0x01D0, { { cp_852, 'i' }, { cp_852, 0xF3 } } }, + { 0x01D1, { { cp_852, 'O' }, { cp_852, 0xF3 } } }, + { 0x01D2, { { cp_852, 'o' }, { cp_852, 0xF3 } } }, + { 0x01D3, { { cp_852, 'U' }, { cp_852, 0xF3 } } }, + { 0x01D4, { { cp_852, 'u' }, { cp_852, 0xF3 } } }, + { 0x01D5, { { cp_850, 0x9A }, { cp_850, 0xEE } } }, + { 0x01D6, { { cp_850, 0x81 }, { cp_850, 0xEE } } }, + { 0x01D7, { { cp_850, 0x9A }, { cp_850, 0xEF } } }, + { 0x01D8, { { cp_850, 0x81 }, { cp_850, 0xEF } } }, + { 0x01D9, { { cp_850, 0x9A }, { cp_852, 0xF3 } } }, + { 0x01DA, { { cp_850, 0x81 }, { cp_852, 0xF3 } } }, + { 0x01DB, { { cp_850, 0x9A }, { cp_850, '`' } } }, + { 0x01DC, { { cp_850, 0x81 }, { cp_850, '`' } } }, + { 0x01DE, { { cp_850, 0x8E }, { cp_850, 0xEE } } }, + { 0x01DF, { { cp_850, 0x84 }, { cp_850, 0xEE } } }, + { 0x01E0, { { cp_852, 'A' }, { cp_852, 0xFA }, { cp_850, 0xEE } } }, + { 0x01E1, { { cp_852, 'a' }, { cp_852, 0xFA }, { cp_850, 0xEE } } }, + { 0x01E2, { { cp_850, 0x92 }, { cp_850, 0xEE } } }, + { 0x01E3, { { cp_850, 0x91 }, { cp_850, 0xEE } } }, + { 0x01E6, { { cp_852, 'G' }, { cp_852, 0xF3 } } }, + { 0x01E7, { { cp_852, 'g' }, { cp_852, 0xF3 } } }, + { 0x01E8, { { cp_852, 'K' }, { cp_852, 0xF3 } } }, + { 0x01E9, { { cp_852, 'k' }, { cp_852, 0xF3 } } }, + { 0x01EA, { { cp_852, 'O' }, { cp_852, 0xF2 } } }, + { 0x01EB, { { cp_852, 'o' }, { cp_852, 0xF2 } } }, + { 0x01EC, { { cp_852, 'O' }, { cp_852, 0xF2 }, { cp_850, 0xEE } } }, + { 0x01ED, { { cp_852, 'o' }, { cp_852, 0xF2 }, { cp_850, 0xEE } } }, + { 0x01F0, { { cp_852, 'j' }, { cp_852, 0xF3 } } }, + { 0x01F4, { { cp_850, 'G' }, { cp_850, 0xEF } } }, + { 0x01F5, { { cp_850, 'g' }, { cp_850, 0xEF } } }, + { 0x01F8, { { cp_850, 'N' }, { cp_850, '`' } } }, + { 0x01F9, { { cp_850, 'n' }, { cp_850, '`' } } }, + { 0x01FA, { { cp_850, 0x8F }, { cp_850, 0xEF } } }, + { 0x01FB, { { cp_850, 0x86 }, { cp_850, 0xEF } } }, + { 0x01FC, { { cp_850, 0x92 }, { cp_850, 0xEF } } }, + { 0x01FD, { { cp_850, 0x91 }, { cp_850, 0xEF } } }, + { 0x01FE, { { cp_850, 0x9D }, { cp_850, 0xEF } } }, + { 0x01FF, { { cp_850, 0x9B }, { cp_850, 0xEF } } }, + { 0x021E, { { cp_852, 'H' }, { cp_852, 0xF3 } } }, + { 0x021F, { { cp_852, 'h' }, { cp_852, 0xF3 } } }, + { 0x0226, { { cp_852, 'A' }, { cp_852, 0xFA } } }, + { 0x0227, { { cp_852, 'a' }, { cp_852, 0xFA } } }, + { 0x0228, { { cp_850, 'E' }, { cp_850, 0xF7 } } }, + { 0x0229, { { cp_850, 'e' }, { cp_850, 0xF7 } } }, + { 0x022A, { { cp_850, 0x99 }, { cp_850, 0xEE } } }, + { 0x022B, { { cp_850, 0x94 }, { cp_850, 0xEE } } }, + { 0x022C, { { cp_850, 0xE5 }, { cp_850, 0xEE } } }, + { 0x022D, { { cp_850, 0xE4 }, { cp_850, 0xEE } } }, + { 0x022E, { { cp_852, 'O' }, { cp_852, 0xFA } } }, + { 0x022F, { { cp_852, 'o' }, { cp_852, 0xFA } } }, + { 0x0230, { { cp_852, 'O' }, { cp_852, 0xFA }, { cp_850, 0xEE } } }, + { 0x0231, { { cp_852, 'o' }, { cp_852, 0xFA }, { cp_850, 0xEE } } }, + { 0x0232, { { cp_850, 'Y' }, { cp_850, 0xEE } } }, + { 0x0233, { { cp_850, 'y' }, { cp_850, 0xEE } } }, + { 0x02C6, { { cp_1004, 0x88 } } }, + { 0x02C7, { { cp_852, 0xF3 } } }, + { 0x02D8, { { cp_852, 0xF4 } } }, + { 0x02D9, { { cp_852, 0xFA } } }, + { 0x02DA, { { cp_1275, 0xFB } } }, + { 0x02DB, { { cp_852, 0xF2 } } }, + { 0x02DC, { { cp_1004, 0x98 } } }, + { 0x02DD, { { cp_852, 0xF1 } } }, + { 0x0384, { { cp_869, 0xEF } } }, + { 0x0385, { { cp_869, 0xF7 } } }, + { 0x0386, { { cp_869, 0x86 } } }, + { 0x0387, { { cp_869, 0x88 } } }, + { 0x0388, { { cp_869, 0x8D } } }, + { 0x0389, { { cp_869, 0x8F } } }, + { 0x038A, { { cp_869, 0x90 } } }, + { 0x038C, { { cp_869, 0x92 } } }, + { 0x038E, { { cp_869, 0x95 } } }, + { 0x038F, { { cp_869, 0x98 } } }, + { 0x0390, { { cp_869, 0xA1 } } }, + { 0x0391, { { cp_869, 0xA4 } } }, + { 0x0392, { { cp_869, 0xA5 } } }, + { 0x0393, { { cp_869, 0xA6 } } }, + { 0x0394, { { cp_869, 0xA7 } } }, + { 0x0395, { { cp_869, 0xA8 } } }, + { 0x0396, { { cp_869, 0xA9 } } }, + { 0x0397, { { cp_869, 0xAA } } }, + { 0x0398, { { cp_869, 0xAC } } }, + { 0x0399, { { cp_869, 0xAD } } }, + { 0x039A, { { cp_869, 0xB5 } } }, + { 0x039B, { { cp_869, 0xB6 } } }, + { 0x039C, { { cp_869, 0xB7 } } }, + { 0x039D, { { cp_869, 0xB8 } } }, + { 0x039E, { { cp_869, 0xBD } } }, + { 0x039F, { { cp_869, 0xBE } } }, + { 0x03A0, { { cp_869, 0xC6 } } }, + { 0x03A1, { { cp_869, 0xC7 } } }, + { 0x03A3, { { cp_869, 0xCF } } }, + { 0x03A4, { { cp_869, 0xD0 } } }, + { 0x03A5, { { cp_869, 0xD1 } } }, + { 0x03A6, { { cp_869, 0xD2 } } }, + { 0x03A7, { { cp_869, 0xD3 } } }, + { 0x03A8, { { cp_869, 0xD4 } } }, + { 0x03A9, { { cp_869, 0xD5 } } }, + { 0x03AA, { { cp_869, 0x91 } } }, + { 0x03AB, { { cp_869, 0x96 } } }, + { 0x03AC, { { cp_869, 0x9B } } }, + { 0x03AD, { { cp_869, 0x9D } } }, + { 0x03AE, { { cp_869, 0x9E } } }, + { 0x03AF, { { cp_869, 0x9F } } }, + { 0x03B0, { { cp_869, 0xFC } } }, + { 0x03B1, { { cp_869, 0xD6 } } }, + { 0x03B2, { { cp_869, 0xD7 } } }, + { 0x03B3, { { cp_869, 0xD8 } } }, + { 0x03B4, { { cp_869, 0xDD } } }, + { 0x03B5, { { cp_869, 0xDE } } }, + { 0x03B6, { { cp_869, 0xE0 } } }, + { 0x03B7, { { cp_869, 0xE1 } } }, + { 0x03B8, { { cp_869, 0xE2 } } }, + { 0x03B9, { { cp_869, 0xE3 } } }, + { 0x03BA, { { cp_869, 0xE4 } } }, + { 0x03BB, { { cp_869, 0xE5 } } }, + { 0x03BC, { { cp_869, 0xE6 } } }, + { 0x03BD, { { cp_869, 0xE7 } } }, + { 0x03BE, { { cp_869, 0xE8 } } }, + { 0x03BF, { { cp_869, 0xE9 } } }, + { 0x03C0, { { cp_869, 0xEA } } }, + { 0x03C1, { { cp_869, 0xEB } } }, + { 0x03C2, { { cp_869, 0xED } } }, + { 0x03C3, { { cp_869, 0xEC } } }, + { 0x03C4, { { cp_869, 0xEE } } }, + { 0x03C5, { { cp_869, 0xF2 } } }, + { 0x03C6, { { cp_869, 0xF3 } } }, + { 0x03C7, { { cp_869, 0xF4 } } }, + { 0x03C8, { { cp_869, 0xF6 } } }, + { 0x03C9, { { cp_869, 0xFA } } }, + { 0x03CA, { { cp_869, 0xA0 } } }, + { 0x03CB, { { cp_869, 0xFB } } }, + { 0x03CC, { { cp_869, 0xA2 } } }, + { 0x03CD, { { cp_869, 0xA3 } } }, + { 0x03CE, { { cp_869, 0xFD } } }, + { 0x0400, { { cp_1251, 0xC5 }, { cp_1251, '`' } } }, + { 0x0401, { { cp_1251, 0xA8 } } }, + { 0x0402, { { cp_1251, 0x80 } } }, + { 0x0403, { { cp_1251, 0x81 } } }, + { 0x0404, { { cp_1251, 0xAA } } }, + { 0x0405, { { cp_1251, 0xBD } } }, + { 0x0406, { { cp_1251, 0xB2 } } }, + { 0x0407, { { cp_1251, 0xAF } } }, + { 0x0408, { { cp_1251, 0xA3 } } }, + { 0x0409, { { cp_1251, 0x8A } } }, + { 0x040A, { { cp_1251, 0x8C } } }, + { 0x040B, { { cp_1251, 0x8E } } }, + { 0x040C, { { cp_1251, 0x8D } } }, + { 0x040D, { { cp_1251, 0xC8 }, { cp_1251, '`' } } }, + { 0x040E, { { cp_1251, 0xA1 } } }, + { 0x040F, { { cp_1251, 0x8F } } }, + { 0x0410, { { cp_1251, 0xC0 } } }, + { 0x0411, { { cp_1251, 0xC1 } } }, + { 0x0412, { { cp_1251, 0xC2 } } }, + { 0x0413, { { cp_1251, 0xC3 } } }, + { 0x0414, { { cp_1251, 0xC4 } } }, + { 0x0415, { { cp_1251, 0xC5 } } }, + { 0x0416, { { cp_1251, 0xC6 } } }, + { 0x0417, { { cp_1251, 0xC7 } } }, + { 0x0418, { { cp_1251, 0xC8 } } }, + { 0x0419, { { cp_1251, 0xC9 } } }, + { 0x041A, { { cp_1251, 0xCA } } }, + { 0x041B, { { cp_1251, 0xCB } } }, + { 0x041C, { { cp_1251, 0xCC } } }, + { 0x041D, { { cp_1251, 0xCD } } }, + { 0x041E, { { cp_1251, 0xCE } } }, + { 0x041F, { { cp_1251, 0xCF } } }, + { 0x0420, { { cp_1251, 0xD0 } } }, + { 0x0421, { { cp_1251, 0xD1 } } }, + { 0x0422, { { cp_1251, 0xD2 } } }, + { 0x0423, { { cp_1251, 0xD3 } } }, + { 0x0424, { { cp_1251, 0xD4 } } }, + { 0x0425, { { cp_1251, 0xD5 } } }, + { 0x0426, { { cp_1251, 0xD6 } } }, + { 0x0427, { { cp_1251, 0xD7 } } }, + { 0x0428, { { cp_1251, 0xD8 } } }, + { 0x0429, { { cp_1251, 0xD9 } } }, + { 0x042A, { { cp_1251, 0xDA } } }, + { 0x042B, { { cp_1251, 0xDB } } }, + { 0x042C, { { cp_1251, 0xDC } } }, + { 0x042D, { { cp_1251, 0xDD } } }, + { 0x042E, { { cp_1251, 0xDE } } }, + { 0x042F, { { cp_1251, 0xDF } } }, + { 0x0430, { { cp_1251, 0xE0 } } }, + { 0x0431, { { cp_1251, 0xE1 } } }, + { 0x0432, { { cp_1251, 0xE2 } } }, + { 0x0433, { { cp_1251, 0xE3 } } }, + { 0x0434, { { cp_1251, 0xE4 } } }, + { 0x0435, { { cp_1251, 0xE5 } } }, + { 0x0436, { { cp_1251, 0xE6 } } }, + { 0x0437, { { cp_1251, 0xE7 } } }, + { 0x0438, { { cp_1251, 0xE8 } } }, + { 0x0439, { { cp_1251, 0xE9 } } }, + { 0x043A, { { cp_1251, 0xEA } } }, + { 0x043B, { { cp_1251, 0xEB } } }, + { 0x043C, { { cp_1251, 0xEC } } }, + { 0x043D, { { cp_1251, 0xED } } }, + { 0x043E, { { cp_1251, 0xEE } } }, + { 0x043F, { { cp_1251, 0xEF } } }, + { 0x0440, { { cp_1251, 0xF0 } } }, + { 0x0441, { { cp_1251, 0xF1 } } }, + { 0x0442, { { cp_1251, 0xF2 } } }, + { 0x0443, { { cp_1251, 0xF3 } } }, + { 0x0444, { { cp_1251, 0xF4 } } }, + { 0x0445, { { cp_1251, 0xF5 } } }, + { 0x0446, { { cp_1251, 0xF6 } } }, + { 0x0447, { { cp_1251, 0xF7 } } }, + { 0x0448, { { cp_1251, 0xF8 } } }, + { 0x0449, { { cp_1251, 0xF9 } } }, + { 0x044A, { { cp_1251, 0xFA } } }, + { 0x044B, { { cp_1251, 0xFB } } }, + { 0x044C, { { cp_1251, 0xFC } } }, + { 0x044D, { { cp_1251, 0xFD } } }, + { 0x044E, { { cp_1251, 0xFE } } }, + { 0x044F, { { cp_1251, 0xFF } } }, + { 0x0450, { { cp_1251, 0xE5 }, { cp_1251, '`' } } }, + { 0x0451, { { cp_1251, 0xB8 } } }, + { 0x0452, { { cp_1251, 0x90 } } }, + { 0x0453, { { cp_1251, 0x83 } } }, + { 0x0454, { { cp_1251, 0xBA } } }, + { 0x0455, { { cp_1251, 0xBE } } }, + { 0x0456, { { cp_1251, 0xB3 } } }, + { 0x0457, { { cp_1251, 0xBF } } }, + { 0x0458, { { cp_1251, 0xBC } } }, + { 0x0459, { { cp_1251, 0x9A } } }, + { 0x045A, { { cp_1251, 0x9C } } }, + { 0x045B, { { cp_1251, 0x9E } } }, + { 0x045C, { { cp_1251, 0x9D } } }, + { 0x045D, { { cp_1251, 0xE8 }, { cp_1251, '`' } } }, + { 0x045E, { { cp_1251, 0xA2 } } }, + { 0x045F, { { cp_1251, 0x9F } } }, + { 0x0490, { { cp_1251, 0xA5 } } }, + { 0x0491, { { cp_1251, 0xB4 } } }, + { 0x04C1, { { cp_1251, 0xC6 }, { cp_852, 0xF4 } } }, + { 0x04C2, { { cp_1251, 0xE6 }, { cp_852, 0xF4 } } }, + { 0x04D0, { { cp_1251, 0xC0 }, { cp_852, 0xF4 } } }, + { 0x04D1, { { cp_1251, 0xE0 }, { cp_852, 0xF4 } } }, + { 0x04D2, { { cp_1251, 0xC0 }, { cp_850, 0xF9 } } }, + { 0x04D3, { { cp_1251, 0xE0 }, { cp_850, 0xF9 } } }, + { 0x04D6, { { cp_1251, 0xC5 }, { cp_852, 0xF4 } } }, + { 0x04D7, { { cp_1251, 0xE5 }, { cp_852, 0xF4 } } }, + { 0x04DC, { { cp_1251, 0xC6 }, { cp_850, 0xF9 } } }, + { 0x04DD, { { cp_1251, 0xE6 }, { cp_850, 0xF9 } } }, + { 0x04DE, { { cp_1251, 0xC7 }, { cp_850, 0xF9 } } }, + { 0x04DF, { { cp_1251, 0xE7 }, { cp_850, 0xF9 } } }, + { 0x04E2, { { cp_1251, 0xC8 }, { cp_850, 0xEE } } }, + { 0x04E3, { { cp_1251, 0xE8 }, { cp_850, 0xEE } } }, + { 0x04E4, { { cp_1251, 0xC8 }, { cp_850, 0xF9 } } }, + { 0x04E5, { { cp_1251, 0xE8 }, { cp_850, 0xF9 } } }, + { 0x04E6, { { cp_1251, 0xCE }, { cp_850, 0xF9 } } }, + { 0x04E7, { { cp_1251, 0xEE }, { cp_850, 0xF9 } } }, + { 0x04EC, { { cp_1251, 0xDD }, { cp_850, 0xF9 } } }, + { 0x04ED, { { cp_1251, 0xFD }, { cp_850, 0xF9 } } }, + { 0x04EE, { { cp_1251, 0xD3 }, { cp_850, 0xEE } } }, + { 0x04EF, { { cp_1251, 0xF3 }, { cp_850, 0xEE } } }, + { 0x04F0, { { cp_1251, 0xD3 }, { cp_850, 0xF9 } } }, + { 0x04F1, { { cp_1251, 0xF3 }, { cp_850, 0xF9 } } }, + { 0x04F2, { { cp_1251, 0xD3 }, { cp_852, 0xF1 } } }, + { 0x04F3, { { cp_1251, 0xF3 }, { cp_852, 0xF1 } } }, + { 0x04F4, { { cp_1251, 0xD7 }, { cp_850, 0xF9 } } }, + { 0x04F5, { { cp_1251, 0xF7 }, { cp_850, 0xF9 } } }, + { 0x04F8, { { cp_1251, 0xDB }, { cp_850, 0xF9 } } }, + { 0x04F9, { { cp_1251, 0xFB }, { cp_850, 0xF9 } } }, + { 0x1E02, { { cp_852, 'B' }, { cp_852, 0xFA } } }, + { 0x1E03, { { cp_852, 'b' }, { cp_852, 0xFA } } }, + { 0x1E08, { { cp_850, 0x80 }, { cp_850, 0xEF } } }, + { 0x1E09, { { cp_850, 0x87 }, { cp_850, 0xEF } } }, + { 0x1E0A, { { cp_852, 'D' }, { cp_852, 0xFA } } }, + { 0x1E0B, { { cp_852, 'd' }, { cp_852, 0xFA } } }, + { 0x1E10, { { cp_850, 'D' }, { cp_850, 0xF7 } } }, + { 0x1E11, { { cp_850, 'd' }, { cp_850, 0xF7 } } }, + { 0x1E14, { { cp_850, 'E' }, { cp_850, 0xEE }, { cp_850, '`' } } }, + { 0x1E15, { { cp_850, 'e' }, { cp_850, 0xEE }, { cp_850, '`' } } }, + { 0x1E16, { { cp_850, 'E' }, { cp_850, 0xEE }, { cp_850, 0xEF } } }, + { 0x1E17, { { cp_850, 'e' }, { cp_850, 0xEE }, { cp_850, 0xEF } } }, + { 0x1E1C, { { cp_850, 'E' }, { cp_850, 0xF7 }, { cp_852, 0xF4 } } }, + { 0x1E1D, { { cp_850, 'e' }, { cp_850, 0xF7 }, { cp_852, 0xF4 } } }, + { 0x1E1E, { { cp_852, 'F' }, { cp_852, 0xFA } } }, + { 0x1E1F, { { cp_852, 'f' }, { cp_852, 0xFA } } }, + { 0x1E20, { { cp_850, 'G' }, { cp_850, 0xEE } } }, + { 0x1E21, { { cp_850, 'g' }, { cp_850, 0xEE } } }, + { 0x1E22, { { cp_852, 'H' }, { cp_852, 0xFA } } }, + { 0x1E23, { { cp_852, 'h' }, { cp_852, 0xFA } } }, + { 0x1E26, { { cp_850, 'H' }, { cp_850, 0xF9 } } }, + { 0x1E27, { { cp_850, 'h' }, { cp_850, 0xF9 } } }, + { 0x1E28, { { cp_850, 'H' }, { cp_850, 0xF7 } } }, + { 0x1E29, { { cp_850, 'h' }, { cp_850, 0xF7 } } }, + { 0x1E2E, { { cp_850, 0xD8 }, { cp_850, 0xEF } } }, + { 0x1E2F, { { cp_850, 0x8B }, { cp_850, 0xEF } } }, + { 0x1E30, { { cp_850, 'K' }, { cp_850, 0xEF } } }, + { 0x1E31, { { cp_850, 'k' }, { cp_850, 0xEF } } }, + { 0x1E3E, { { cp_850, 'M' }, { cp_850, 0xEF } } }, + { 0x1E3F, { { cp_850, 'm' }, { cp_850, 0xEF } } }, + { 0x1E40, { { cp_852, 'M' }, { cp_852, 0xFA } } }, + { 0x1E41, { { cp_852, 'm' }, { cp_852, 0xFA } } }, + { 0x1E44, { { cp_852, 'N' }, { cp_852, 0xFA } } }, + { 0x1E45, { { cp_852, 'n' }, { cp_852, 0xFA } } }, + { 0x1E4C, { { cp_850, 0xE5 }, { cp_850, 0xEF } } }, + { 0x1E4D, { { cp_850, 0xE4 }, { cp_850, 0xEF } } }, + { 0x1E4E, { { cp_850, 0xE5 }, { cp_850, 0xF9 } } }, + { 0x1E4F, { { cp_850, 0xE4 }, { cp_850, 0xF9 } } }, + { 0x1E50, { { cp_850, 'O' }, { cp_850, 0xEE }, { cp_850, '`' } } }, + { 0x1E51, { { cp_850, 'o' }, { cp_850, 0xEE }, { cp_850, '`' } } }, + { 0x1E52, { { cp_850, 'O' }, { cp_850, 0xEE }, { cp_850, 0xEF } } }, + { 0x1E53, { { cp_850, 'o' }, { cp_850, 0xEE }, { cp_850, 0xEF } } }, + { 0x1E54, { { cp_850, 'P' }, { cp_850, 0xEF } } }, + { 0x1E55, { { cp_850, 'p' }, { cp_850, 0xEF } } }, + { 0x1E56, { { cp_852, 'P' }, { cp_852, 0xFA } } }, + { 0x1E57, { { cp_852, 'p' }, { cp_852, 0xFA } } }, + { 0x1E58, { { cp_852, 'R' }, { cp_852, 0xFA } } }, + { 0x1E59, { { cp_852, 'r' }, { cp_852, 0xFA } } }, + { 0x1E60, { { cp_852, 'S' }, { cp_852, 0xFA } } }, + { 0x1E61, { { cp_852, 's' }, { cp_852, 0xFA } } }, + { 0x1E64, { { cp_852, 0x97 }, { cp_852, 0xFA } } }, + { 0x1E65, { { cp_852, 0x98 }, { cp_852, 0xFA } } }, + { 0x1E66, { { cp_852, 0xE6 }, { cp_852, 0xFA } } }, + { 0x1E67, { { cp_852, 0xE7 }, { cp_852, 0xFA } } }, + { 0x1E6A, { { cp_852, 'T' }, { cp_852, 0xFA } } }, + { 0x1E6B, { { cp_852, 't' }, { cp_852, 0xFA } } }, + { 0x1E78, { { cp_1004, 'U' }, { cp_1004, 0x98 }, { cp_850, 0xEF } } }, + { 0x1E79, { { cp_1004, 'u' }, { cp_1004, 0x98 }, { cp_850, 0xEF } } }, + { 0x1E7A, { { cp_850, 'U' }, { cp_850, 0xEE }, { cp_850, 0xF9 } } }, + { 0x1E7B, { { cp_850, 'u' }, { cp_850, 0xEE }, { cp_850, 0xF9 } } }, + { 0x1E7C, { { cp_1004, 'V' }, { cp_1004, 0x98 } } }, + { 0x1E7D, { { cp_1004, 'v' }, { cp_1004, 0x98 } } }, + { 0x1E80, { { cp_850, 'W' }, { cp_850, '`' } } }, + { 0x1E81, { { cp_850, 'w' }, { cp_850, '`' } } }, + { 0x1E82, { { cp_850, 'W' }, { cp_850, 0xEF } } }, + { 0x1E83, { { cp_850, 'w' }, { cp_850, 0xEF } } }, + { 0x1E84, { { cp_850, 'W' }, { cp_850, 0xF9 } } }, + { 0x1E85, { { cp_850, 'w' }, { cp_850, 0xF9 } } }, + { 0x1E86, { { cp_852, 'W' }, { cp_852, 0xFA } } }, + { 0x1E87, { { cp_852, 'w' }, { cp_852, 0xFA } } }, + { 0x1E8A, { { cp_852, 'X' }, { cp_852, 0xFA } } }, + { 0x1E8B, { { cp_852, 'x' }, { cp_852, 0xFA } } }, + { 0x1E8C, { { cp_850, 'X' }, { cp_850, 0xF9 } } }, + { 0x1E8D, { { cp_850, 'x' }, { cp_850, 0xF9 } } }, + { 0x1E8E, { { cp_852, 'Y' }, { cp_852, 0xFA } } }, + { 0x1E8F, { { cp_852, 'y' }, { cp_852, 0xFA } } }, + { 0x1E90, { { cp_850, 'Z' }, { cp_850, '^' } } }, + { 0x1E91, { { cp_850, 'z' }, { cp_850, '^' } } }, + { 0x1E97, { { cp_850, 't' }, { cp_850, 0xF9 } } }, + { 0x1E98, { { cp_1275, 'w' }, { cp_1275, 0xFB } } }, + { 0x1E99, { { cp_1275, 'y' }, { cp_1275, 0xFB } } }, + { 0x1EA4, { { cp_850, 0xB6 }, { cp_850, 0xEF } } }, + { 0x1EA5, { { cp_850, 0x83 }, { cp_850, 0xEF } } }, + { 0x1EA6, { { cp_850, 0xB6 }, { cp_850, '`' } } }, + { 0x1EA7, { { cp_850, 0x83 }, { cp_850, '`' } } }, + { 0x1EAA, { { cp_850, 0xB6 }, { cp_1004, 0x98 } } }, + { 0x1EAB, { { cp_850, 0x83 }, { cp_1004, 0x98 } } }, + { 0x1EAE, { { cp_852, 0xC6 }, { cp_850, 0xEF } } }, + { 0x1EAF, { { cp_852, 0xC7 }, { cp_850, 0xEF } } }, + { 0x1EB0, { { cp_852, 0xC6 }, { cp_852, '`' } } }, + { 0x1EB1, { { cp_852, 0xC7 }, { cp_852, '`' } } }, + { 0x1EB4, { { cp_852, 0xC6 }, { cp_1004, 0x98 } } }, + { 0x1EB5, { { cp_852, 0xC7 }, { cp_1004, 0x98 } } }, + { 0x1EBC, { { cp_1004, 'E' }, { cp_1004, 0x98 } } }, + { 0x1EBD, { { cp_1004, 'e' }, { cp_1004, 0x98 } } }, + { 0x1EBE, { { cp_850, 0xD2 }, { cp_850, 0xEF } } }, + { 0x1EBF, { { cp_850, 0x88 }, { cp_850, 0xEF } } }, + { 0x1EC0, { { cp_850, 0xD2 }, { cp_850, '`' } } }, + { 0x1EC1, { { cp_850, 0x88 }, { cp_850, '`' } } }, + { 0x1EC4, { { cp_850, 0xD2 }, { cp_1004, 0x98 } } }, + { 0x1EC5, { { cp_850, 0x88 }, { cp_1004, 0x98 } } }, + { 0x1ED0, { { cp_850, 0xE2 }, { cp_850, 0xEF } } }, + { 0x1ED1, { { cp_850, 0x93 }, { cp_850, 0xEF } } }, + { 0x1ED2, { { cp_850, 0xE2 }, { cp_850, '`' } } }, + { 0x1ED3, { { cp_850, 0x93 }, { cp_850, '`' } } }, + { 0x1ED6, { { cp_850, 0xE2 }, { cp_1004, 0x98 } } }, + { 0x1ED7, { { cp_850, 0x93 }, { cp_1004, 0x98 } } }, + { 0x1EF2, { { cp_850, 'Y' }, { cp_850, '`' } } }, + { 0x1EF3, { { cp_850, 'y' }, { cp_850, '`' } } }, + { 0x1EF8, { { cp_1004, 'Y' }, { cp_1004, 0x98 } } }, + { 0x1EF9, { { cp_1004, 'y' }, { cp_1004, 0x98 } } }, + { 0x1F70, { { cp_869, 0xD6 }, { cp_869, '`' } } }, + { 0x1F72, { { cp_869, 0xDE }, { cp_869, '`' } } }, + { 0x1F74, { { cp_869, 0xE1 }, { cp_869, '`' } } }, + { 0x1F76, { { cp_869, 0xE3 }, { cp_869, '`' } } }, + { 0x1F78, { { cp_869, 0xE9 }, { cp_869, '`' } } }, + { 0x1F7A, { { cp_869, 0xF2 }, { cp_869, '`' } } }, + { 0x1F7C, { { cp_869, 0xFA }, { cp_869, '`' } } }, + { 0x1FB0, { { cp_869, 0xD6 }, { cp_852, 0xF4 } } }, + { 0x1FB1, { { cp_869, 0xD6 }, { cp_850, 0xEE } } }, + { 0x1FB8, { { cp_869, 0xA4 }, { cp_852, 0xF4 } } }, + { 0x1FB9, { { cp_869, 0xA4 }, { cp_850, 0xEE } } }, + { 0x1FBA, { { cp_869, 0xA4 }, { cp_869, '`' } } }, + { 0x1FC8, { { cp_869, 0xA8 }, { cp_869, '`' } } }, + { 0x1FCA, { { cp_869, 0xAA }, { cp_869, '`' } } }, + { 0x1FD0, { { cp_869, 0xE3 }, { cp_852, 0xF4 } } }, + { 0x1FD1, { { cp_869, 0xE3 }, { cp_850, 0xEE } } }, + { 0x1FD2, { { cp_869, 0xA0 }, { cp_869, '`' } } }, + { 0x1FD8, { { cp_869, 0xAD }, { cp_852, 0xF4 } } }, + { 0x1FD9, { { cp_869, 0xAD }, { cp_850, 0xEE } } }, + { 0x1FDA, { { cp_869, 0xAD }, { cp_869, '`' } } }, + { 0x1FE0, { { cp_869, 0xF2 }, { cp_852, 0xF4 } } }, + { 0x1FE1, { { cp_869, 0xF2 }, { cp_850, 0xEE } } }, + { 0x1FE2, { { cp_869, 0xFB }, { cp_869, '`' } } }, + { 0x1FE8, { { cp_869, 0xD1 }, { cp_852, 0xF4 } } }, + { 0x1FE9, { { cp_869, 0xD1 }, { cp_850, 0xEE } } }, + { 0x1FEA, { { cp_869, 0xD1 }, { cp_869, '`' } } }, + { 0x1FED, { { cp_850, 0xF9 }, { cp_850, '`' } } }, + { 0x1FF8, { { cp_869, 0xBE }, { cp_869, '`' } } }, + { 0x1FFA, { { cp_869, 0xD5 }, { cp_869, '`' } } }, + { 0x2013, { { cp_1004, 0x96 } } }, + { 0x2014, { { cp_1004, 0x97 } } }, + { 0x2015, { { cp_869, 0x8E } } }, + { 0x2017, { { cp_850, 0xF2 } } }, + { 0x2018, { { cp_1004, 0x91 } } }, + { 0x2019, { { cp_1004, 0x92 } } }, + { 0x201A, { { cp_1004, 0x82 } } }, + { 0x201C, { { cp_1004, 0x93 } } }, + { 0x201D, { { cp_1004, 0x94 } } }, + { 0x201E, { { cp_1004, 0x84 } } }, + { 0x2020, { { cp_1004, 0x86 } } }, + { 0x2021, { { cp_1004, 0x87 } } }, + { 0x2022, { { cp_437, 0x07 } } }, + { 0x2026, { { cp_1004, 0x85 } } }, + { 0x2030, { { cp_1004, 0x89 } } }, + { 0x2039, { { cp_1004, 0x8B } } }, + { 0x203A, { { cp_1004, 0x9B } } }, + { 0x203C, { { cp_437, 0x13 } } }, + { 0x2044, { { cp_1275, 0xDA } } }, + { 0x207F, { { cp_437, 0xFC } } }, + { 0x20A7, { { cp_437, 0x9E } } }, + { 0x20AC, { { cp_1004, 0x80 } } }, + { 0x2116, { { cp_1251, 0xB9 } } }, + { 0x2122, { { cp_1004, 0x99 } } }, + { 0x2190, { { cp_437, 0x1B } } }, + { 0x2191, { { cp_437, 0x18 } } }, + { 0x2192, { { cp_437, 0x1A } } }, + { 0x2193, { { cp_437, 0x19 } } }, + { 0x2194, { { cp_437, 0x1D } } }, + { 0x2195, { { cp_437, 0x12 } } }, + { 0x21A8, { { cp_437, 0x17 } } }, + { 0x2202, { { cp_1275, 0xB6 } } }, + { 0x2206, { { cp_1275, 0xC6 } } }, + { 0x220F, { { cp_1275, 0xB8 } } }, + { 0x2211, { { cp_1275, 0xB7 } } }, + { 0x2219, { { cp_437, 0xF9 } } }, + { 0x221A, { { cp_437, 0xFB } } }, + { 0x221E, { { cp_437, 0xEC } } }, + { 0x221F, { { cp_437, 0x1C } } }, + { 0x2229, { { cp_437, 0xEF } } }, + { 0x222B, { { cp_1275, 0xBA } } }, + { 0x2248, { { cp_437, 0xF7 } } }, + { 0x2260, { { cp_1275, 0xAD } } }, + { 0x2261, { { cp_437, 0xF0 } } }, + { 0x2264, { { cp_437, 0xF3 } } }, + { 0x2265, { { cp_437, 0xF2 } } }, + { 0x2302, { { cp_437, 0x7F } } }, + { 0x2310, { { cp_437, 0xA9 } } }, + { 0x2320, { { cp_437, 0xF4 } } }, + { 0x2321, { { cp_437, 0xF5 } } }, + { 0x2500, { { cp_850, 0xC4 } } }, + { 0x2502, { { cp_850, 0xB3 } } }, + { 0x250C, { { cp_850, 0xDA } } }, + { 0x2510, { { cp_850, 0xBF } } }, + { 0x2514, { { cp_850, 0xC0 } } }, + { 0x2518, { { cp_850, 0xD9 } } }, + { 0x251C, { { cp_850, 0xC3 } } }, + { 0x2524, { { cp_850, 0xB4 } } }, + { 0x252C, { { cp_850, 0xC2 } } }, + { 0x2534, { { cp_850, 0xC1 } } }, + { 0x253C, { { cp_850, 0xC5 } } }, + { 0x2550, { { cp_850, 0xCD } } }, + { 0x2551, { { cp_850, 0xBA } } }, + { 0x2552, { { cp_437, 0xD5 } } }, + { 0x2553, { { cp_437, 0xD6 } } }, + { 0x2554, { { cp_850, 0xC9 } } }, + { 0x2555, { { cp_437, 0xB8 } } }, + { 0x2556, { { cp_437, 0xB7 } } }, + { 0x2557, { { cp_850, 0xBB } } }, + { 0x2558, { { cp_437, 0xD4 } } }, + { 0x2559, { { cp_437, 0xD3 } } }, + { 0x255A, { { cp_850, 0xC8 } } }, + { 0x255B, { { cp_437, 0xBE } } }, + { 0x255C, { { cp_437, 0xBD } } }, + { 0x255D, { { cp_850, 0xBC } } }, + { 0x255E, { { cp_437, 0xC6 } } }, + { 0x255F, { { cp_437, 0xC7 } } }, + { 0x2560, { { cp_850, 0xCC } } }, + { 0x2561, { { cp_437, 0xB5 } } }, + { 0x2562, { { cp_437, 0xB6 } } }, + { 0x2563, { { cp_850, 0xB9 } } }, + { 0x2564, { { cp_437, 0xD1 } } }, + { 0x2565, { { cp_437, 0xD2 } } }, + { 0x2566, { { cp_850, 0xCB } } }, + { 0x2567, { { cp_437, 0xCF } } }, + { 0x2568, { { cp_437, 0xD0 } } }, + { 0x2569, { { cp_850, 0xCA } } }, + { 0x256A, { { cp_437, 0xD8 } } }, + { 0x256B, { { cp_437, 0xD7 } } }, + { 0x256C, { { cp_850, 0xCE } } }, + { 0x2580, { { cp_850, 0xDF } } }, + { 0x2584, { { cp_850, 0xDC } } }, + { 0x2588, { { cp_850, 0xDB } } }, + { 0x258C, { { cp_437, 0xDD } } }, + { 0x2590, { { cp_437, 0xDE } } }, + { 0x2591, { { cp_850, 0xB0 } } }, + { 0x2592, { { cp_850, 0xB1 } } }, + { 0x2593, { { cp_850, 0xB2 } } }, + { 0x25A0, { { cp_850, 0xFE } } }, + { 0x25AC, { { cp_437, 0x16 } } }, + { 0x25B2, { { cp_437, 0x1E } } }, + { 0x25BA, { { cp_437, 0x10 } } }, + { 0x25BC, { { cp_437, 0x1F } } }, + { 0x25C4, { { cp_437, 0x11 } } }, + { 0x25CA, { { cp_1275, 0xD7 } } }, + { 0x25CB, { { cp_437, 0x09 } } }, + { 0x25D8, { { cp_437, 0x08 } } }, + { 0x25D9, { { cp_437, 0x0A } } }, + { 0x263A, { { cp_437, 0x01 } } }, + { 0x263B, { { cp_437, 0x02 } } }, + { 0x263C, { { cp_437, 0x0F } } }, + { 0x2640, { { cp_437, 0x0C } } }, + { 0x2642, { { cp_437, 0x0B } } }, + { 0x2660, { { cp_437, 0x06 } } }, + { 0x2663, { { cp_437, 0x05 } } }, + { 0x2665, { { cp_437, 0x03 } } }, + { 0x2666, { { cp_437, 0x04 } } }, + { 0x266A, { { cp_437, 0x0D } } }, + { 0x266B, { { cp_437, 0x0E } } }, + { 0xFB01, { { cp_1275, 0xDE } } }, + { 0xFB02, { { cp_1275, 0xDF } } }, +}; + +/* Alternative renderings used when code pages 869, 1257 or 1275 aren't + available. */ +static const struct CharRec alt_chars[] = { + { 0x0100, { { cp_850, 'A' }, { cp_850, 0xEE } } }, + { 0x0101, { { cp_850, 'a' }, { cp_850, 0xEE } } }, + { 0x0112, { { cp_850, 'E' }, { cp_850, 0xEE } } }, + { 0x0113, { { cp_850, 'e' }, { cp_850, 0xEE } } }, + { 0x0116, { { cp_852, 'E' }, { cp_852, 0xFA } } }, + { 0x0117, { { cp_852, 'e' }, { cp_852, 0xFA } } }, + { 0x0122, { { cp_850, 'G' }, { cp_850, 0xF7 } } }, + { 0x0123, { { cp_850, 'g' }, { cp_850, 0xF7 } } }, + { 0x012A, { { cp_850, 'I' }, { cp_850, 0xEE } } }, + { 0x012B, { { cp_850, 'i' }, { cp_850, 0xEE } } }, + { 0x012E, { { cp_852, 'I' }, { cp_852, 0xF2 } } }, + { 0x012F, { { cp_852, 'i' }, { cp_852, 0xF2 } } }, + { 0x0136, { { cp_850, 'K' }, { cp_850, 0xF7 } } }, + { 0x0137, { { cp_850, 'k' }, { cp_850, 0xF7 } } }, + { 0x013B, { { cp_850, 'L' }, { cp_850, 0xF7 } } }, + { 0x013C, { { cp_850, 'l' }, { cp_850, 0xF7 } } }, + { 0x0145, { { cp_850, 'N' }, { cp_850, 0xF7 } } }, + { 0x0146, { { cp_850, 'n' }, { cp_850, 0xF7 } } }, + { 0x014C, { { cp_850, 'O' }, { cp_850, 0xEE } } }, + { 0x014D, { { cp_850, 'o' }, { cp_850, 0xEE } } }, + { 0x0156, { { cp_850, 'R' }, { cp_850, 0xF7 } } }, + { 0x0157, { { cp_850, 'r' }, { cp_850, 0xF7 } } }, + { 0x016A, { { cp_850, 'U' }, { cp_850, 0xEE } } }, + { 0x016B, { { cp_850, 'u' }, { cp_850, 0xEE } } }, + { 0x0172, { { cp_852, 'U' }, { cp_852, 0xF2 } } }, + { 0x0173, { { cp_852, 'u' }, { cp_852, 0xF2 } } }, + { 0x02DA, { { cp_850, 0xF8 } } }, + { 0x0391, { { cp_437, 'A' } } }, + { 0x0392, { { cp_437, 'B' } } }, + { 0x0393, { { cp_437, 0xE2 } } }, + { 0x0395, { { cp_437, 'E' } } }, + { 0x0396, { { cp_437, 'Z' } } }, + { 0x0397, { { cp_437, 'H' } } }, + { 0x0398, { { cp_437, 0xE9 } } }, + { 0x0399, { { cp_437, 'I' } } }, + { 0x039A, { { cp_437, 'K' } } }, + { 0x039C, { { cp_437, 'M' } } }, + { 0x039D, { { cp_437, 'N' } } }, + { 0x039F, { { cp_437, 'O' } } }, + { 0x03A1, { { cp_437, 'P' } } }, + { 0x03A3, { { cp_437, 0xE4 } } }, + { 0x03A4, { { cp_437, 'T' } } }, + { 0x03A5, { { cp_437, 'Y' } } }, + { 0x03A6, { { cp_437, 0xE8 } } }, + { 0x03A7, { { cp_437, 'X' } } }, + { 0x03A9, { { cp_437, 0xEA } } }, + { 0x03B1, { { cp_437, 0xE0 } } }, + { 0x03B4, { { cp_437, 0xEB } } }, + { 0x03B5, { { cp_437, 0xEE } } }, + { 0x03BC, { { cp_437, 0xE6 } } }, + { 0x03BF, { { cp_437, 'o' } } }, + { 0x03C0, { { cp_437, 0xE3 } } }, + { 0x03C3, { { cp_437, 0xE5 } } }, + { 0x03C4, { { cp_437, 0xE7 } } }, + { 0x03C6, { { cp_437, 0xED } } }, + { 0x2260, { { cp_437, '=' }, { cp_437, '/' } } }, +}; +#endif + +/* Compare function for the above tables */ +static int +char_compare(const void *p1, const void *p2) +{ + const ULONG *key = p1; + const struct CharRec *val = p2; + + if (*key < val->uni_ch) { + return -1; + } else if (*key > val->uni_ch) { + return +1; + } else { + return 0; + } +} + +/* Render a single character */ +static void +render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int charset) +{ +#ifdef PDC_WIDE + /* ch is a Unicode character */ + CHAR bytes[2]; + + if (0x20 <= ch && ch <= 0x7E) { + /* Render ASCII in the default code page; it's faster */ + bytes[0] = (CHAR)ch; + GpiSetCharSet(hps, (charset & 3) + 1); + GpiCharStringPosAt(hps, point, rect, options, 1, bytes, NULL); + } else if (have_cp[cp_1200]) { + /* We have Unicode support */ + bytes[0] = (ch & 0x00FF) >> 0; + bytes[1] = (ch & 0xFF00) >> 8; + GpiSetCharSet(hps, (charset & 3) + (cp_1200 << 2) + 1); + GpiCharStringPosAt(hps, point, rect, options, 2, bytes, NULL); + } else { + /* Select a matching character set */ + static const struct CharRec bad_char = { 0x003F, { cp_850, '?' } }; + const struct CharRec *rec; + unsigned i; + + /* Search the main character table */ + rec = bsearch(&ch, characters, + sizeof(characters)/sizeof(characters[0]), sizeof(characters[0]), + char_compare); + if (rec != NULL && !have_cp[rec->glyphs[0].code_page]) { + /* Search the alternate character table */ + const struct CharRec *rec2; + rec2 = bsearch(&ch, alt_chars, + sizeof(alt_chars)/sizeof(alt_chars[0]), sizeof(alt_chars[0]), + char_compare); + if (rec2 != NULL) { + rec = rec2; + } + } + if (rec == NULL || !have_cp[rec->glyphs[0].code_page]) { + /* Display '?' if we don't have the character */ + rec = &bad_char; + } + /* Overstrike the listed glyphs */ + for (i = 0; i < sizeof(rec->glyphs)/sizeof(rec->glyphs[0]); ++i) { + bytes[0] = rec->glyphs[i].code_point; + if (bytes[0] == 0) { + break; + } + GpiSetCharSet(hps, + (rec->glyphs[i].code_page << 2) + (charset & 3) + 1); + GpiCharStringPosAt(hps, point, rect, options, 1, bytes, NULL); + } + } +#else + /* For non-PDC_WIDE build, ch is either an 8 bit character or it has + A_ALTCHARSET set */ + CHAR byte; + + if (ch == ACS_NEQUAL) { + /* Not-equal sign from code page 1275 (which might not be available) */ + if (have_cp[cp_1275]) { + /* We have code page 1275 */ + byte = 0xAD; + GpiSetCharSet(hps, (cp_1275 << 2) | (charset & 3) + 1); + GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + } else { + /* Overstrike = and / */ + GpiSetCharSet(hps, (charset & 3) + 1); + byte = '='; + GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + byte = '/'; + GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + } + } else if (_is_altcharset(ch)) { + /* Other alternate characters come from code page 437 */ + byte = acs_map[ch & 0xFF]; + GpiSetCharSet(hps, (cp_437 << 2) | (charset & 3) + 1); + GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + } else { + /* Normal character from the configured default code page */ + byte = ch & 0xFF; + GpiSetCharSet(hps, (charset & 3) + 1); + GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + } +#endif +} + +HPS PDC_override_hps; + +void PDC_transform_line(int lineno, int x, int len, const chtype *srcp) +{ + if( !srcp) /* just freeing up fonts */ + PDC_transform_line_given_hps( 0, 0, 0, 0, NULL); + else + { + const HPS hps = (PDC_override_hps ? PDC_override_hps : WinGetPS( PDC_hWnd)) ; + GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL); + PDC_setup_font(hps); + + assert( len); + assert( (srcp[len - 1] & A_CHARTEXT) != MAX_UNICODE); + PDC_transform_line_given_hps( hps, lineno, x, len, srcp); + if (!PDC_override_hps) + WinReleasePS( hps); + } +} + +void PDC_doupdate(void) +{ +} + +char PDC_font_name[FACESIZE]; +int PDC_font_size = 12; + +void PDC_set_font_box(HWND hwnd) +{ + HPS hps; + POINTL pt[TXTBOX_COUNT]; + + /* Determine font dimensions */ + hps = WinGetPS(hwnd); + PDC_setup_font(hps); + + memset(pt, 0, sizeof(pt)); + GpiQueryTextBox(hps, 1, (PCH) "\xC5", TXTBOX_COUNT, pt); + PDC_cxChar = pt[TXTBOX_TOPRIGHT].x - pt[TXTBOX_BOTTOMLEFT].x; + PDC_cyChar = pt[TXTBOX_TOPRIGHT].y - pt[TXTBOX_BOTTOMLEFT].y; + WinReleasePS(hps); + if (PDC_n_rows != 0 && PDC_n_cols != 0) + PDC_resize_screen(PDC_n_rows, PDC_n_cols); +} + +void PDC_setup_font(HPS hps) +{ + struct font_type { + const char *suffix; + unsigned flags; + }; + static struct font_type const font_types[] = { + { "", 0 }, + { " Italic", FATTR_SEL_ITALIC }, + { " Bold", FATTR_SEL_BOLD }, + { " Bold Italic", FATTR_SEL_BOLD | FATTR_SEL_ITALIC }, + }; + FATTRS fattrs; + SIZEF box; + unsigned i; + + /* Determine the name of the font */ + if (PDC_font_name[0] == '\0') + { + const char *env_font = getenv("PDC_FONT"); + if (env_font != NULL) + { + const char *colon = strchr(env_font, ':'); + size_t len; + if (colon != NULL) + { + PDC_font_size = strtol(colon + 1, NULL, 10); + if (PDC_font_size < 2) + PDC_font_size = 12; + len = colon - env_font; + } + else + { + len = strlen(env_font); + } + snprintf(PDC_font_name, sizeof(PDC_font_name), "%.*s", + (int)len, env_font); + } + else + { + /* Assumed present on all OS/2s */ + strcpy(PDC_font_name, "Courier"); + } + } + + /* Query available code pages */ + if (!cp_inited) { + /* There seems to be no way to query the number of code pages. 200 is + more than enough for ArcaOS 5.1. */ + ULONG cp_list[200]; + ULONG num_cps; + ULONG m, n; + + cp_inited = TRUE; + num_cps = WinQueryCpList(WinQueryAnchorBlock(PDC_hWnd), + sizeof(cp_list)/sizeof(cp_list[0]), cp_list); + have_cp[0] = TRUE; + for (m = 0; m < sizeof(code_pages)/sizeof(code_pages[0]); ++m) { + have_cp[m+1] = FALSE; + for (n = 0; n < num_cps; ++n) { + if (cp_list[n] == code_pages[m]) { + have_cp[m+1] = TRUE; + break; + } + } + } + } + + memset(&fattrs, 0, sizeof(fattrs)); + fattrs.usRecordLength = sizeof(fattrs); + fattrs.fsType = FATTR_TYPE_ANTIALIASED; + fattrs.fsFontUse = FATTR_FONTUSE_OUTLINE | FATTR_FONTUSE_TRANSFORMABLE; + + for (i = 0; i < 4; ++i) + { + LONG lmatch; + unsigned j; + const char *facename = ""; + /* GCC makes the facename parameter to GpiCreateLogFont a const + pointer to STR8. Watcom uses a non-const pointer. This causes + warnings in one compiler or the other unless it is resolved here. */ +#ifdef __GNUC__ + typedef const STR8 *p_facename; +#else + typedef STR8 *p_facename; +#endif + + fattrs.usCodePage = 0; + fattrs.fsSelection = 0; + snprintf(fattrs.szFacename, sizeof(fattrs.szFacename), "%s%s", + PDC_font_name, font_types[i].suffix); + /* Null already written to last element fo fattrs.szFacename */ + lmatch = GpiCreateLogFont(hps, (p_facename)facename, i + 1, &fattrs); + if (lmatch != FONT_MATCH || strcmp(fattrs.szFacename, PDC_font_name) == 0) + { + snprintf(fattrs.szFacename, sizeof(fattrs.szFacename), "%s", + PDC_font_name); + facename = "synth"; + GpiCreateLogFont(hps, (p_facename)facename, i + 1, &fattrs); + } + for (j = 0; j < sizeof(code_pages)/sizeof(code_pages[0]); ++j) { + fattrs.usCodePage = code_pages[j]; + GpiCreateLogFont(hps, (p_facename)facename, i + 5 + j*4, &fattrs); + } + } + + GpiSetCharSet(hps, 1L); + GpiQueryCharBox(hps, &box); + box.cx = (FIXED)(((long long)box.cx * PDC_font_size) / 12); + box.cy = (FIXED)(((long long)box.cy * PDC_font_size) / 12); + GpiSetCharBox(hps, &box); +} + +/****************************************************************************/ +/* Canonical composition and decomposition to aid in Unicode rendering */ +/****************************************************************************/ + +#if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) + +/* Data types for Unicode tables: */ +/* Combining class */ +struct CClassTable { + uint32_t cp; + unsigned cclass; +}; + +/* Canonical decomposition */ +struct DecompTable { + uint32_t cp; + uint32_t decomp1; + uint32_t decomp2; +}; + +/* Canonical composition */ +struct CompTable { + uint32_t cp1; + uint32_t cp2; + uint32_t comp; +}; + +/* The actual tables, generated from Unicode data */ +#include "unitable.h" + +/* Comparison function for CClassTable */ +static int cclass_compare(const void *p1, const void *p2) +{ + const uint32_t *cp = p1; + const struct CClassTable *rec = p2; + + if (*cp < rec->cp) + return -1; + if (*cp > rec->cp) + return +1; + return 0; +} + +/* Comparison function for DecompTable */ +static int decomp_compare(const void *p1, const void *p2) +{ + const uint32_t *cp = p1; + const struct DecompTable *rec = p2; + + if (*cp < rec->cp) + return -1; + if (*cp > rec->cp) + return +1; + return 0; +} + +/* Comparison function for CompTable */ +static int comp_compare(const void *p1, const void *p2) +{ + const uint32_t *key = p1; + const struct CompTable *rec = p2; + + if (key[0] < rec->cp1) + return -1; + if (key[0] > rec->cp1) + return +1; + if (key[1] < rec->cp2) + return -1; + if (key[1] > rec->cp2) + return +1; + return 0; +} + +/* Search for canonical decomposition of character ch */ +/* Return true if a decomposition exists; seq returns the decomposition */ +static bool PDC_find_decomp(uint32_t ch, uint32_t seq[2]) +{ + const struct DecompTable *rec; + + rec = bsearch(&ch, decomp_table, + sizeof(decomp_table)/sizeof(decomp_table[0]), sizeof(decomp_table[0]), + decomp_compare); + if (rec) + { + seq[0] = rec->decomp1; + seq[1] = rec->decomp2; + return TRUE; + } + return FALSE; +} + +/* Find the full canonical decomposition of the character ch */ +/* Return the length of the decomposition; the decomposed code points are + in seq */ +/* As of Unicode 15.1, no canonical decomposition is longer than four + characters */ +static size_t PDC_decompose(uint32_t ch, uint32_t seq[]) +{ + uint32_t decomp[2]; + size_t len, i, j; + + if (0xAC00 <= ch && ch <= 0xD7A3) + { + /* Hangul syllables */ + unsigned s_index = (unsigned)(ch - 0xAC00); + unsigned t_index = s_index % 28; + unsigned v_index = (s_index / 28) % 21; + unsigned l_index = s_index / (28*21); + seq[0] = 0x1100 + l_index; /* leading consonant */ + seq[1] = 0x1161 + v_index; /* vowel */ + if (t_index != 0) + { + seq[1] = 0x11A7 + t_index; /* trailing consonant */ + return 3; + } + return 2; + } + + /* Find canonical decompositions until a non-decomposable character + is found */ + /* Store the suffixes in reverse order */ + seq[0] = ch; + len = 1; + while (PDC_find_decomp(seq[0], decomp)) + { + seq[0] = decomp[0]; + seq[len++] = decomp[1]; + } + + /* Reverse the order of the suffixes */ + for (i = 1, j = len - 1; i < j; ++i, --j) + { + uint32_t swap; + swap = seq[i]; + seq[i] = seq[j]; + seq[j] = swap; + } + + return len; +} + +/* Return the canonical composition of ch1 and ch2, or 0 if there is no + such composition */ +static uint32_t PDC_compose(uint32_t ch1, uint32_t ch2) +{ + const struct CompTable *rec; + uint32_t key[2]; + + key[0] = ch1; + key[1] = ch2; + if (0x1100 <= ch1 && ch1 <= 0x1112 && 0x1161 <= ch2 && ch2 <= 0x1175) + { + /* Hangul syllable without trailing consonant */ + return 0xAC00 + + (ch1 - 0x1100) * (28*21) + + (ch2 - 0x1161) * 28; + } + + if (0xAC00 <= ch1 && ch1 <= 0xD7A3 && 0x11A8 <= ch2 && ch2 <= 0x11C2) + { + /* Hangul syllable with trailing consonant */ + if ((ch1 - 0xAC00) % 28 == 0) + return ch1 + ch2 - 0x11A7; + else + return 0; + } + + rec = bsearch(key, comp_table, + sizeof(comp_table)/sizeof(comp_table[0]), sizeof(comp_table[0]), + comp_compare); + + return rec ? rec->comp : 0; +} + +/* Return the combining class of the character ch */ +/* Non-combining characters have combining class 0 */ +static unsigned PDC_cclass(uint32_t ch) +{ + const struct CClassTable *rec; + + rec = bsearch(&ch, cclass_table, + sizeof(cclass_table)/sizeof(cclass_table[0]), sizeof(cclass_table[0]), + cclass_compare); + + return rec ? rec->cclass : 0; +} + +/* Retrieve the combining sequence indexed by ch, and convert it to a + normalization form */ +/* If compose is true, the normalization form is NFC (characters are composed); + otherwise, it is NFD */ +/* Return a malloc'd buffer containing the sequence, terminated with a 0 */ +static uint32_t *PDC_normalize(uint32_t ch, bool compose) +{ + uint32_t *comp; + cchar_t added; + uint32_t ch2; + uint32_t seq[10]; + size_t count; + size_t i, j; + + /* If not combining sequence, return identity */ + if (ch <= MAX_UNICODE) + { + comp = malloc(sizeof(comp[0]) * 2); + comp[0] = ch; + comp[1] = 0; + return comp; + } + + /* Count characters needed for sequence */ + count = 0; + ch2 = ch; + while (ch2 > MAX_UNICODE) + { + ch2 = PDC_expand_combined_characters(ch2, &added); + count += PDC_decompose(added, seq); + } + count += PDC_decompose(ch2, seq); + + /* Allocate array */ + comp = malloc(sizeof(comp[0]) * (count + 1)); + + /* Build complete expanded sequence */ + i = count; + ch2 = ch; + while (ch2 > MAX_UNICODE) + { + size_t l; + + ch2 = PDC_expand_combined_characters(ch2, &added); + l = PDC_decompose(added, seq); + i -= l; + memcpy(comp + i, seq, l * sizeof(comp[0])); + } + PDC_decompose(ch2, comp); + + /* Sort according to combining class, preserving order for equal classes */ + /* We can't use qsort. We need a stable sort here, and qsort is not + guaranteed to be stable. + Combining sequences are expected to be short, so insertion sort should + work well, though it is O(n^2). Each entry in comp has an unused byte + that can hold the combining class. */ + + /* Tag each combining character with its combining class */ + for (i = 1; i < count; ++i) + { + unsigned cclass = PDC_cclass(comp[i]); + comp[i] |= cclass << 24; + } + + /* Sort by combining class */ + for (i = 2; i < count; ++i) + { + /* Portion before i is sorted */ + uint32_t swap = comp[i]; + unsigned cclass = (unsigned)(swap >> 24); + for (j = i; j > 1; --j) + { + if ((comp[j-1] >> 24) <= cclass) + break; + comp[j] = comp[j-1]; + } + comp[j] = swap; + } + + if (compose) + { + /* Compose according to Unicode rules: a combining character is + blocked from composing with the base character if another combining + character with the same combining class occurs before it */ + i = 1; + while (i < count) + { + uint32_t new_ch = PDC_compose(comp[0], comp[i] & 0x00FFFFFF); + if (new_ch != 0) + { + /* Replace the pair with the composed character */ + comp[0] = new_ch; + comp[i++] = 0; + } + else + { + /* Skip this combining character and all others of the same + combining class */ + unsigned cclass = (unsigned)(comp[i++] >> 24); + while (i < count && (comp[i] >> 24) <= cclass) + ++i; + } + } + /* Remove deleted characters from the array */ + j = 1; + for (i = 1; i < count; ++i) + { + if (comp[i] != 0) + comp[j++] = comp[i]; + } + count = j; + } + + /* Remove combining classes from characters */ + for (i = 1; i < count; ++i) + comp[i] &= 0x00FFFFFF; + + comp[count] = 0; + return comp; +} + +#endif /* PDC_WIDE && USING_COMBINING_CHARACTER_SCHEME */ diff --git a/os2gui/pdcgetsc.c b/os2gui/pdcgetsc.c new file mode 100644 index 00000000..6a3d4ea2 --- /dev/null +++ b/os2gui/pdcgetsc.c @@ -0,0 +1,26 @@ +/* Public Domain Curses */ + +#include "pdcwin.h" + +/* get the cursor size/shape */ + +int PDC_get_cursor_mode(void) +{ + PDC_LOG(("PDC_get_cursor_mode() - called\n")); + + return SP->visibility; +} + +/* return number of screen rows */ + +int PDC_get_rows(void) +{ + PDC_LOG(("PDC_get_rows() - called\n")); + return( PDC_n_rows); +} + +int PDC_get_columns(void) +{ + PDC_LOG(("PDC_get_columns() - called\n")); + return( PDC_n_cols); +} diff --git a/os2gui/pdckbd.c b/os2gui/pdckbd.c new file mode 100644 index 00000000..b56716bd --- /dev/null +++ b/os2gui/pdckbd.c @@ -0,0 +1,79 @@ +/* Public Domain Curses */ + +#include "pdcwin.h" + +void PDC_set_keyboard_binary(bool on) +{ + PDC_LOG(("PDC_set_keyboard_binary() - called\n")); + + INTENTIONALLY_UNUSED_PARAMETER( on); +} + +/* check if a key or mouse event is waiting */ + +bool PDC_check_key(void) +{ + HAB hab = WinQueryAnchorBlock( PDC_hWnd); + QMSG msg; + + while( PDC_key_queue_low == PDC_key_queue_high + && WinPeekMsg( hab, &msg, NULLHANDLE, 0, 0, PM_REMOVE) ) + WinDispatchMsg(hab, &msg); + return( PDC_key_queue_low != PDC_key_queue_high); +} + +/* return the next available key or mouse event */ + +int PDC_get_key(void) +{ + int rval = -1; + + if( PDC_key_queue_low != PDC_key_queue_high) + { + rval = PDC_key_queue[PDC_key_queue_low++]; + if( PDC_key_queue_low == KEY_QUEUE_SIZE) + PDC_key_queue_low = 0; + if( rval == KEY_RESIZE) + while( PDC_key_queue[PDC_key_queue_low] == KEY_RESIZE + && PDC_key_queue_low != PDC_key_queue_high) + { + PDC_key_queue_low++; + if( PDC_key_queue_low == KEY_QUEUE_SIZE) + PDC_key_queue_low = 0; + } + if( rval == KEY_MOUSE) + PDC_get_mouse_event_from_queue( ); + } + return rval; +} + +/* discard any pending keyboard or mouse input -- this is the core + routine for flushinp() */ + +void PDC_flushinp(void) +{ + PDC_LOG(("PDC_flushinp() - called\n")); + PDC_key_queue_low = PDC_key_queue_high = 0; + while( !PDC_get_mouse_event_from_queue( )) + ; +} + +bool PDC_has_mouse( void) +{ + return TRUE; +} + +int PDC_mouse_set(void) +{ + /* If turning on mouse input: Set ENABLE_MOUSE_INPUT, and clear + all other flags, including the extended flags; + If turning off the mouse: Set QuickEdit Mode to the status it + had on startup, and clear all other flags */ + + return OK; +} + +int PDC_modifiers_set(void) +{ + return OK; +} diff --git a/os2gui/pdcscrn.c b/os2gui/pdcscrn.c new file mode 100644 index 00000000..9a5052a6 --- /dev/null +++ b/os2gui/pdcscrn.c @@ -0,0 +1,2373 @@ +/* Public Domain Curses */ + +#include "pdcwin.h" +#include +#include +#include +#include +#include "../common/pdccolor.h" + +static int min_lines = 25, max_lines = 25; +static int min_cols = 80, max_cols = 80; + +static int set_default_sizes_from_registry( const int n_cols, const int n_rows, + const int xloc, const int yloc); + +/* We have a 'base' standard palette of 256 colors, plus a true-color +cube of 16 million colors. */ + +#define N_COLORS 256 + 256 * 256 * 256; + + /* If PDC_MAX_MOUSE_BUTTONS is undefined, it means the user hasn't */ + /* gotten a current 'curses.h' in which five-button mice are supported. */ + /* To handle this gracefully, we'll just fall back to three buttons. */ + +#ifndef PDC_MAX_MOUSE_BUTTONS + #define PDC_MAX_MOUSE_BUTTONS 3 +#endif + +#define WHEEL_EVENT PDC_MAX_MOUSE_BUTTONS + +/* RR: Removed statis on next line */ +bool PDC_bDone = FALSE; + +static int debug_printf( const char *format, ...) +{ + static bool debugging = TRUE; + + if( debugging) + { + const char *output_filename = getenv( "PDC_DEBUG"); + + if( !output_filename) + debugging = FALSE; /* don't bother trying again */ + else + { + FILE *ofile = fopen( output_filename, "a"); + + if( ofile) + { + va_list argptr; + va_start( argptr, format); + vfprintf( ofile, format, argptr); + va_end( argptr); + fclose( ofile); + } + else + { + printf( "Opening '%s' failed\n", output_filename); + exit( 1); + } + } + } + return( 0); +} + +static HAB PDC_hab; +static HMQ PDC_hmq; +HWND PDC_hWnd; +static int PDC_argc = 0; +static char **PDC_argv = NULL; + +static void final_cleanup( void) +{ + debug_printf( "final_cleanup: SP = %p\n", SP); + if (SP) + { + SWP swp; + + WinQueryWindowPos( PDC_hWnd, &swp); + set_default_sizes_from_registry( SP->cols, SP->lines, swp.x, swp.y); + } +#if 0 //RLC + PDC_LOG(( "final_cleanup: freeing fonts\n")); + PDC_transform_line( 0, 0, 0, NULL); /* free any fonts */ + if( originally_focussed_window) + SetForegroundWindow( originally_focussed_window); +#endif //RLC + if( PDC_argc) + { + int i; + + for( i = 0; i < PDC_argc; i++) + free( PDC_argv[i]); + free( PDC_argv); + PDC_argc = 0; + PDC_argv = NULL; + } +#if 0 //RLC +#ifdef USING_COMBINING_CHARACTER_SCHEME + PDC_expand_combined_characters( 0, NULL); /* free internal buffer */ +#endif +#endif //RLC + debug_printf( "reset foreground window\n"); +} + +void PDC_scr_close(void) +{ + PDC_LOG(("PDC_scr_close() - called\n")); + final_cleanup( ); + PDC_bDone = TRUE; +} + +/* NOTE that PDC_scr_free( ) is called only from delscreen( ), */ +/* which is rarely called. It appears that most programs simply */ +/* rely on the memory getting freed when the program terminates. */ + +void PDC_scr_free(void) +{ + PDC_free_palette( ); +#ifdef USING_COMBINING_CHARACTER_SCHEME + PDC_expand_combined_characters( 0, NULL); /* free internal buffer */ +#endif + WinDestroyWindow( PDC_hWnd); + WinDestroyMsgQueue( PDC_hmq); + WinTerminate( PDC_hab); + PDC_hWnd = NULLHANDLE; + PDC_hmq = NULLHANDLE; + PDC_hab = NULLHANDLE; + ttytype[1] = 0; +} + +int PDC_n_rows, PDC_n_cols; +int PDC_cxChar, PDC_cyChar, PDC_key_queue_low = 0, PDC_key_queue_high = 0; +int PDC_key_queue[KEY_QUEUE_SIZE]; + + /* If the following is true, you can enter Unicode values by hitting */ + /* Alt and holding it down while typing the value of the character on */ + /* the numeric keypad (for decimal entry); _or_ you can hit Alt-Padplus */ + /* and then enter a hex value, while holding down the Alt key. In */ + /* either case, when you release the Alt key, the Unicode character */ + /* is added to the queue. For hex entry, 0-9 can come either from */ + /* the numeric keypad or the "usual" keyboard. */ +bool PDC_allow_numpad_unicode = TRUE; +static int numpad_unicode_value = 0; + +static BOOL minimized = FALSE; + +static void add_key_to_queue( const int new_key) +{ + const int new_idx = ((PDC_key_queue_high + 1) % KEY_QUEUE_SIZE); + /* This is usually 10, but is set to 16 if the user */ + /* hits ALT_PADPLUS and is about to enter a hex value: */ + static int unicode_radix = 10; + + if( PDC_allow_numpad_unicode) + { + int digit = -1; + + if( new_key >= ALT_PAD0 && new_key <= ALT_PAD9) + digit = new_key - ALT_PAD0; + /* In hex Unicode entry, you can enter digits on both */ + /* the numeric and "standard" keyboards : */ + if( unicode_radix == 16 && new_key >= ALT_0 && new_key <= ALT_9) + digit = new_key - ALT_0; + if( unicode_radix == 16 && new_key >= ALT_A && new_key <= ALT_F) + digit = new_key - ALT_A + 10; + if( digit >= 0) + { + numpad_unicode_value = numpad_unicode_value * unicode_radix + digit; + if (numpad_unicode_value > MAX_UNICODE - 1) + numpad_unicode_value = MAX_UNICODE - 1; + return; + } + if( new_key == ALT_PADPLUS) + { /* signal to begin hex Unicode entry */ + unicode_radix = 16; + return; + } + } + unicode_radix = 10; + if( new_key && new_key == PDC_get_function_key( FUNCTION_KEY_ABORT)) + { + exit( -1); + } + else if( new_key && new_key == PDC_get_function_key( FUNCTION_KEY_ENLARGE_FONT)) + { + PDC_font_size += 2; + if (PDC_font_size > 40) + PDC_font_size = 40; + PDC_set_font_box(PDC_hWnd); + } + else if( new_key && new_key == PDC_get_function_key( FUNCTION_KEY_SHRINK_FONT)) + { + PDC_font_size -= 2; + if (PDC_font_size < 2) + PDC_font_size = 2; + PDC_set_font_box(PDC_hWnd); + } + else if( new_key && new_key == PDC_get_function_key( FUNCTION_KEY_CHOOSE_FONT)) + { + if( PDC_choose_a_new_font(PDC_font_name, &PDC_font_size)) + PDC_set_font_box(PDC_hWnd); + } + else if( new_idx != PDC_key_queue_low) + { + PDC_key_queue[PDC_key_queue_high] = new_key; + PDC_key_queue_high = new_idx; + } +} + +/************************************************************************ + * Table for key code translation of function keys in keypad mode * + * These values are for strict IBM keyboard compatibles only * + ************************************************************************/ + +typedef struct +{ + unsigned short normal; + unsigned short shift; + unsigned short control; + unsigned short alt; + unsigned short flags; +} KPTAB; + +enum kptab_flags +{ + KP_NUMLOCK = 0x1, /* NumLock inverts shift */ + KP_SHIFT = 0x2 /* Key is a shift key */ +}; + +/* Index by virtual key */ +static const KPTAB kptab[] = +{ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 1 VK_BUTTON1 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 2 VK_BUTTON2 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 3 VK_BUTTON3 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 4 VK_BREAK */ + {0x08, 0x08, 0x7F, ALT_BKSP, 0 }, /* 5 VK_BACKSPACE */ + {0x09, KEY_BTAB, CTL_TAB, ALT_TAB, 0 }, /* 6 VK_TAB */ + {0x09, KEY_BTAB, CTL_TAB, ALT_TAB, 0 }, /* 7 VK_BACKTAB */ + {0x0D, 0x0D, CTL_ENTER, ALT_ENTER, 0 }, /* 8 VK_NEWLINE */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 9 VK_SHIFT HANDLED SEPARATELY */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 10 VK_CONTROL HANDLED SEPARATELY */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 11 VK_ALT */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 12 VK_ALTGRAF */ + {KEY_PAUSE, KEY_PAUSE, KEY_PAUSE, 0xFFFF, 0 }, /* 13 VK_PAUSE */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 14 VK_CAPSLOCK */ + {0x1B, 0x1B, 0x1B, ALT_ESC, 0 }, /* 15 VK_ESCAPE */ + {' ', ' ', ' ', ' ', 0 }, /* 16 VK_SPACE */ + {KEY_PPAGE, KEY_SPREVIOUS, CTL_PGUP, ALT_PGUP, 0 }, /* 17 VK_PAGEUP */ + {KEY_NPAGE, KEY_SNEXT, CTL_PGDN, ALT_PGDN, 0 }, /* 18 VK_PAGEDOWN */ + {KEY_END, KEY_SEND, CTL_END, ALT_END, 0 }, /* 19 VK_END */ + {KEY_HOME, KEY_SHOME, CTL_HOME, ALT_HOME, 0 }, /* 20 VK_HOME */ + {KEY_LEFT, KEY_SLEFT, CTL_LEFT, ALT_LEFT, 0 }, /* 21 VK_LEFT */ + {KEY_UP, KEY_SUP, CTL_UP, ALT_UP, 0 }, /* 22 VK_UP */ + {KEY_RIGHT, KEY_SRIGHT, CTL_RIGHT, ALT_RIGHT, 0 }, /* 23 VK_RIGHT */ + {KEY_DOWN, KEY_SDOWN, CTL_DOWN, ALT_DOWN, 0 }, /* 24 VK_DOWN */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 25 VK_PRINTSCRN */ + {KEY_IC, KEY_SIC, CTL_INS, ALT_INS, 0 }, /* 26 VK_INSERT */ + {KEY_DC, KEY_SDC, CTL_DEL, ALT_DEL, 0 }, /* 27 VK_DELETE */ + {KEY_SCROLLLOCK, 0xFFFF, 0xFFFF, KEY_SCROLLLOCK, 0 }, /* 28 VK_SCRLLOCK */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 29 VK_NUMLOCK */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_PADENTER, 0 }, /* 30 VK_ENTER */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 31 VK_SYSRQ */ + {KEY_F(1), KEY_F(13), KEY_F(25), KEY_F(37), 0 }, /* 32 VK_F1 */ + {KEY_F(2), KEY_F(14), KEY_F(26), KEY_F(38), 0 }, /* 33 VK_F2 */ + {KEY_F(3), KEY_F(15), KEY_F(27), KEY_F(39), 0 }, /* 34 VK_F3 */ + {KEY_F(4), KEY_F(16), KEY_F(28), KEY_F(40), 0 }, /* 35 VK_F4 */ + {KEY_F(5), KEY_F(17), KEY_F(29), KEY_F(41), 0 }, /* 36 VK_F5 */ + {KEY_F(6), KEY_F(18), KEY_F(30), KEY_F(42), 0 }, /* 37 VK_F6 */ + {KEY_F(7), KEY_F(19), KEY_F(31), KEY_F(43), 0 }, /* 38 VK_F7 */ + {KEY_F(8), KEY_F(20), KEY_F(32), KEY_F(44), 0 }, /* 39 VK_F8 */ + {KEY_F(9), KEY_F(21), KEY_F(33), KEY_F(45), 0 }, /* 40 VK_F9 */ + {KEY_F(10), KEY_F(22), KEY_F(34), KEY_F(46), 0 }, /* 41 VK_F10 */ + {KEY_F(11), KEY_F(23), KEY_F(35), KEY_F(47), 0 }, /* 42 VK_F11 */ + {KEY_F(12), KEY_F(24), KEY_F(36), KEY_F(48), 0 }, /* 43 VK_F12 */ +}; +/* End of kptab[] */ + +/* Index by scan code */ +static const KPTAB scan_kptab[] = +{ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x00 */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_ESC, 0 }, /* 0x01 ESC */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_1, 0 }, /* 0x02 '1' */ + {0xFFFF, 0xFFFF, 0x00, ALT_2, 0 }, /* 0x03 '2' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_3, 0 }, /* 0x04 '3' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_4, 0 }, /* 0x05 '4' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_5, 0 }, /* 0x06 '5' */ + {0xFFFF, 0xFFFF, 0x1E, ALT_6, 0 }, /* 0x07 '6' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_7, 0 }, /* 0x08 '7' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_8, 0 }, /* 0x09 '8' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_9, 0 }, /* 0x0A '9' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_0, 0 }, /* 0x0B '0' */ + {0xFFFF, 0xFFFF, 0x1F, ALT_MINUS, 0 }, /* 0x0C '-' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_EQUAL, 0 }, /* 0x0D '=' */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x0E Backspace */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x0F Tab */ + {0xFFFF, 0xFFFF, 0x11, ALT_Q, 0 }, /* 0x10 'q' */ + {0xFFFF, 0xFFFF, 0x17, ALT_W, 0 }, /* 0x11 'w' */ + {0xFFFF, 0xFFFF, 0x05, ALT_E, 0 }, /* 0x12 'e' */ + {0xFFFF, 0xFFFF, 0x12, ALT_R, 0 }, /* 0x13 'r' */ + {0xFFFF, 0xFFFF, 0x14, ALT_T, 0 }, /* 0x14 't' */ + {0xFFFF, 0xFFFF, 0x19, ALT_Y, 0 }, /* 0x15 'y' */ + {0xFFFF, 0xFFFF, 0x15, ALT_U, 0 }, /* 0x16 'u' */ + {0xFFFF, 0xFFFF, 0x09, ALT_I, 0 }, /* 0x17 'i' */ + {0xFFFF, 0xFFFF, 0x0F, ALT_O, 0 }, /* 0x18 'o' */ + {0xFFFF, 0xFFFF, 0x10, ALT_P, 0 }, /* 0x19 'p' */ + {0xFFFF, 0xFFFF, 0x1B, ALT_LBRACKET, 0 }, /* 0x1A '[' */ + {0xFFFF, 0xFFFF, 0x1D, ALT_RBRACKET, 0 }, /* 0x1B ']' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_ENTER, 0 }, /* 0x1C Enter */ + {KEY_CONTROL_L, KEY_CONTROL_L, KEY_CONTROL_L, KEY_CONTROL_L, KP_SHIFT }, /* 0x1D Left Ctrl */ + {0xFFFF, 0xFFFF, 0x01, ALT_A, 0 }, /* 0x1E 'a' */ + {0xFFFF, 0xFFFF, 0x13, ALT_S, 0 }, /* 0x1F 's' */ + {0xFFFF, 0xFFFF, 0x04, ALT_D, 0 }, /* 0x20 'd' */ + {0xFFFF, 0xFFFF, 0x06, ALT_F, 0 }, /* 0x21 'f' */ + {0xFFFF, 0xFFFF, 0x07, ALT_G, 0 }, /* 0x22 'g' */ + {0xFFFF, 0xFFFF, 0x08, ALT_H, 0 }, /* 0x23 'h' */ + {0xFFFF, 0xFFFF, 0x0A, ALT_J, 0 }, /* 0x24 'j' */ + {0xFFFF, 0xFFFF, 0x0B, ALT_K, 0 }, /* 0x25 'k' */ + {0xFFFF, 0xFFFF, 0x0C, ALT_L, 0 }, /* 0x26 'l' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_SEMICOLON, 0 }, /* 0x27 ';' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_FQUOTE, 0 }, /* 0x28 "'" */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_BQUOTE, 0 }, /* 0x29 '`' */ + {KEY_SHIFT_L, KEY_SHIFT_L, KEY_SHIFT_L, KEY_SHIFT_L, KP_SHIFT }, /* 0x2A Left Shift */ + {0xFFFF, 0xFFFF, 0x1C, ALT_BSLASH, 0 }, /* 0x2B '\' */ + {0xFFFF, 0xFFFF, 0x1A, ALT_Z, 0 }, /* 0x2C 'z' */ + {0xFFFF, 0xFFFF, 0x18, ALT_X, 0 }, /* 0x2D 'x' */ + {0xFFFF, 0xFFFF, 0x03, ALT_C, 0 }, /* 0x2E 'c' */ + {0xFFFF, 0xFFFF, 0x16, ALT_V, 0 }, /* 0x2F 'v' */ + {0xFFFF, 0xFFFF, 0x02, ALT_B, 0 }, /* 0x30 'b' */ + {0xFFFF, 0xFFFF, 0x0E, ALT_N, 0 }, /* 0x31 'n' */ + {0xFFFF, 0xFFFF, 0x0D, ALT_M, 0 }, /* 0x32 'm' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_COMMA, 0 }, /* 0x33 ',' */ + {0xFFFF, 0xFFFF, 0xFFFF, ALT_STOP, 0 }, /* 0x34 '.' */ + {0xFFFF, 0xFFFF, 0x7F, ALT_FSLASH, 0 }, /* 0x35 '/' */ + {KEY_SHIFT_R, KEY_SHIFT_R, KEY_SHIFT_R, KEY_SHIFT_R, KP_SHIFT }, /* 0x36 Right Shift */ + {PADSTAR, SHF_PADSTAR, CTL_PADSTAR, ALT_PADSTAR, 0 }, /* 0x37 Pad '*' */ + {KEY_ALT_L, KEY_ALT_L, KEY_ALT_L, KEY_ALT_L, KP_SHIFT }, /* 0x38 Left Alt */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x39 ' ' */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x3A Caps Lock */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x3B F1 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x3C F2 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x3D F3 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x3E F4 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x3F F5 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x40 F6 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x41 F7 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x42 F8 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x43 F9 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x44 F10 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x45 Num Lock */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x46 Scroll Lock */ + {KEY_A1, '7', CTL_PAD7, ALT_PAD7, KP_NUMLOCK }, /* 0x47 Pad '7' */ + {KEY_A2, '8', CTL_PAD8, ALT_PAD8, KP_NUMLOCK }, /* 0x48 Pad '8' */ + {KEY_A3, '9', CTL_PAD9, ALT_PAD9, KP_NUMLOCK }, /* 0x49 Pad '9' */ + {PADMINUS, SHF_PADMINUS, CTL_PADMINUS, ALT_PADMINUS, 0 }, /* 0x4A Pad '-' */ + {KEY_B1, '4', CTL_PAD4, ALT_PAD4, KP_NUMLOCK }, /* 0x4B Pad '4' */ + {KEY_B2, '5', CTL_PAD5, ALT_PAD5, KP_NUMLOCK }, /* 0x4C Pad '5' */ + {KEY_B3, '6', CTL_PAD6, ALT_PAD6, KP_NUMLOCK }, /* 0x4D Pad '6' */ + {PADPLUS, SHF_PADPLUS, CTL_PADPLUS, ALT_PADPLUS, 0 }, /* 0x4E Pad '+' */ + {KEY_C1, '1', CTL_PAD1, ALT_PAD1, KP_NUMLOCK }, /* 0x4F Pad '1' */ + {KEY_C2, '2', CTL_PAD2, ALT_PAD2, KP_NUMLOCK }, /* 0x50 Pad '2' */ + {KEY_C3, '3', CTL_PAD3, ALT_PAD3, KP_NUMLOCK }, /* 0x51 Pad '3' */ + {PAD0, '0', CTL_PAD0, ALT_PAD0, KP_NUMLOCK }, /* 0x52 Pad '0' */ + {PADSTOP, '.', CTL_PADSTOP, ALT_PADSTOP, 0 }, /* 0x53 Pad '.' */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x54 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x55 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x56 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x57 F11 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x58 F12 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x59 */ + {PADENTER, SHF_PADENTER, CTL_PADENTER, ALT_PADENTER, 0 }, /* 0x5A Pad Enter */ + {KEY_CONTROL_R, KEY_CONTROL_R, KEY_CONTROL_R, KEY_CONTROL_R, KP_SHIFT }, /* 0x5B Right Ctrl */ + {PADSLASH, SHF_PADSLASH, CTL_PADSLASH, ALT_PADSLASH, 0 }, /* 0x5C Pad '/' */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x5D Print Screen */ + {KEY_ALT_R, KEY_ALT_R, KEY_ALT_R, KEY_ALT_R, KP_SHIFT }, /* 0x5E Right Alt */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x5F Pause/Break */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x60 Home */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x61 Up */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x62 Pg Up */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x63 Left */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x64 Right */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x65 End */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x66 Down */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x67 Pg Dn */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x68 Insert */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x69 Delete */ + {KEY_BROWSER_BACK, KEY_BROWSER_BACK, KEY_BROWSER_BACK, KEY_BROWSER_BACK, 0 }, /* 0x6A Browser Back */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x6B My Computer */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x6C */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x6D Media Folder */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x6E */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x6F */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x70 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x71 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x72 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x73 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x74 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x75 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x76 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x77 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x78 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x79 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x7A */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x7B */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x7C Menu */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x7D */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x7E Left Meta */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x7F Right Meta */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x80 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x81 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x82 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x83 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x84 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x85 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x86 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x87 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x88 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x89 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x8A */ + {KEY_SEARCH, KEY_SEARCH, KEY_SEARCH, KEY_SEARCH, 0 }, /* 0x8B Browser Search */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x8C */ + {KEY_BROWSER_REF, KEY_BROWSER_REF, KEY_BROWSER_REF, KEY_BROWSER_REF, 0 }, /* 0x8D Browser Reload */ + {KEY_BROWSER_STOP, KEY_BROWSER_STOP, KEY_BROWSER_STOP, KEY_BROWSER_STOP, 0 }, /* 0x8E Browser Stop */ + {KEY_BROWSER_FWD, KEY_BROWSER_FWD, KEY_BROWSER_FWD, KEY_BROWSER_FWD, 0 }, /* 0x8F Browser Forward */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x90 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x91 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x92 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x93 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x94 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x95 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x96 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x97 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x98 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x99 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x9A */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x9B */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x9C */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x9D */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x9E */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0x9F */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA0 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA1 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA2 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA3 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA4 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA5 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA6 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA7 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA8 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xA9 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xAA */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xAB */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xAC */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xAD */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xAE */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xAF */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB0 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB1 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB2 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB3 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB4 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB5 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB6 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB7 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB8 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xB9 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xBA */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xBB */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xBC */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xBD */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xBE */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xBF */ + {KEY_PREV_TRACK, KEY_PREV_TRACK, KEY_PREV_TRACK, KEY_PREV_TRACK, 0 }, /* 0xC0 Media Back */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC1 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC2 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC3 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC4 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC5 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC6 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC7 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xC8 */ + {KEY_NEXT_TRACK, KEY_NEXT_TRACK, KEY_NEXT_TRACK, KEY_NEXT_TRACK, 0 }, /* 0xC9 Media Forward */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xCA */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xCB */ + {KEY_VOLUME_DOWN, KEY_VOLUME_DOWN, KEY_VOLUME_DOWN, KEY_VOLUME_DOWN, 0 }, /* 0xCC Volume Down */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xCD */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xCE */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xCF */ + {KEY_VOLUME_MUTE, KEY_VOLUME_MUTE, KEY_VOLUME_MUTE, KEY_VOLUME_MUTE, 0 }, /* 0xD0 Mute */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD1 Calculator */ + {KEY_PLAY_PAUSE, KEY_PLAY_PAUSE, KEY_PLAY_PAUSE, KEY_PLAY_PAUSE, 0 }, /* 0xD2 Media Play */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD3 */ + {KEY_MEDIA_STOP, KEY_MEDIA_STOP, KEY_MEDIA_STOP, KEY_MEDIA_STOP, 0 }, /* 0xD4 Media Stop */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD5 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD6 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD7 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD8 */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xD9 */ + {KEY_BROWSER_HOME, KEY_BROWSER_HOME, KEY_BROWSER_HOME, KEY_BROWSER_HOME, 0 }, /* 0xDA Browser Home */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xDB */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xDC */ + {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0 }, /* 0xDD */ + {KEY_VOLUME_UP, KEY_VOLUME_UP, KEY_VOLUME_UP, KEY_VOLUME_UP, 0 }, /* 0xDE Volume Up */ +}; +/* End of scan_kptab[] */ + +#ifdef PDC_WIDE +/* Tables of conversion tables for incoming characters */ + +static const unsigned short cp437_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, + 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, + 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x03BC, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +/* Code page 813 encodes the older version of ISO 8859-7, lacking the drachma sign + (0x20AF) and the ypogegrammeni (0x037A), but adds the euro sign (0x20AC). + This table encodes the new version of ISO 8859-7. */ +static const unsigned short cp813_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x2018, 0x2019, 0x00A3, 0x20AC, 0x20AF, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x037A, 0x00AB, 0x00AC, 0x00AD, 0xFFFD, 0x2015, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x0387, + 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0xFFFD, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD +}; + +/* Code page 819 == ISO 8859-1 (Latin-1) */ +static const unsigned short cp819_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF +}; + +/* The OS/2 version of code page 850 differs from the one published by the Unicode + Consortium in that it has the euro sign (0x20AC) instead of the dotless lowercase I + (0x0131) */ +static const unsigned short cp850_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, + 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, + 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, + 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, + 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x20AC, 0x00CD, 0x00CE, + 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580, + 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE, + 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4, + 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, + 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 +}; + +/* The OS/2 version of code page 852 differs from the one published by the Unicode + Consortium in that it has the euro sign (0x20AC) instead of the not sign (0x00AC) */ +static const unsigned short cp852_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7, + 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106, + 0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A, + 0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E, + 0x0118, 0x0119, 0x20AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A, + 0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, + 0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE, + 0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580, + 0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, + 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4, + 0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8, + 0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0 +}; + +static const unsigned short cp855_tbl[] = { + 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, + 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, + 0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C, + 0x045E, 0x040E, 0x045F, 0x040F, 0x044E, 0x042E, 0x044A, 0x042A, + 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, + 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, + 0x0418, 0x2563, 0x2551, 0x2557, 0x255D, 0x0439, 0x0419, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x043A, 0x041A, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, + 0x043B, 0x041B, 0x043C, 0x041C, 0x043D, 0x041D, 0x043E, 0x041E, + 0x043F, 0x2518, 0x250C, 0x2588, 0x2584, 0x041F, 0x044F, 0x2580, + 0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, + 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116, + 0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D, + 0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0 +}; + +static const unsigned short cp856_tbl[] = { + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0x00A3, 0xFFFD, 0x00D7, 0x20AA, + 0x200E, 0x200F, 0x202A, 0x202B, 0x202D, 0x202E, 0x202C, 0xFFFD, + 0xFFFD, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0xFFFD, 0xFFFD, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0xFFFD, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x2580, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B5, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x203E, 0x00B4, + 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, + 0x00B0, 0x00A8, 0x2022, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 +}; + +/* The OS/2 version of code page 857 differs from the one published by the Unicode + Consortium in that it has the euro sign (0x20AC) in a previously undefined position */ +static const unsigned short cp857_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, + 0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F, + 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, + 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, + 0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, 0x20AC, 0x00CD, 0x00CE, + 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580, + 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0xFFFD, + 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4, + 0x00AD, 0x00B1, 0xFFFD, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, + 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 +}; + +/* Code page 859 is a modified form of 850, with the euro sign as in the OS/2 version of + 850 and with the following substitutions: + 850: 859: + 0xAB 0x00BD 0x0153 + 0xAC 0x00BC 0x0152 + 0xDD 0x00A6 0x0160 + 0xEF 0x00B4 0x017D + 0xF2 0x2017 undefined + 0xF3 0x00BE 0x0178 + 0xF7 0x00B8 0x017E + 0xF9 0x00A8 0x0161 */ +static const unsigned short cp859_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, + 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, + 0x00BF, 0x00AE, 0x00AC, 0x0153, 0x0152, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, + 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, + 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x20AC, 0x00CD, 0x00CE, + 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x0160, 0x00CC, 0x2580, + 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE, + 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x017D, + 0x00AD, 0x00B1, 0xFFFD, 0x0178, 0x00B6, 0x00A7, 0x00F7, 0x017E, + 0x00B0, 0x0161, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 +}; + +static const unsigned short cp860_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E3, 0x00E0, 0x00C1, 0x00E7, + 0x00EA, 0x00CA, 0x00E8, 0x00CD, 0x00D4, 0x00EC, 0x00C3, 0x00C2, + 0x00C9, 0x00C0, 0x00C8, 0x00F4, 0x00F5, 0x00F2, 0x00DA, 0x00F9, + 0x00CC, 0x00D5, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x20A7, 0x00D3, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, + 0x00BF, 0x00D2, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x03BC, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +static const unsigned short cp861_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00D0, 0x00F0, 0x00DE, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00FE, 0x00FB, 0x00DD, + 0x00FD, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00C1, 0x00CD, 0x00D3, 0x00DA, + 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +/* The OS/2 version of code page 862 differs from that published by the Unicode + Consortium in these positions: + Unicode OS/2 +0x9E 0x20A7 undefined +0x9F 0x0192 0x20AA +0xA0 0x00E1 0x200E +0xA1 0x00ED 0x200F +0xA2 0x00F3 0x202A +0xA3 0x00FA 0x202B +0xA4 0x00F1 0x202D +0xA5 0x00D1 0x202E +0xA6 0x00AA 0x202C +0xA7 0x00BA undefined +0xA8 0x00BF undefined +0xAD 0x00A1 0x20AC +0xE6 0x00B5 0x03BC */ +static const unsigned short cp862_tbl[] = { + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0x00A2, 0x00A3, 0x00A5, 0xFFFD, 0x20AA, + 0x200E, 0x200F, 0x202A, 0x202B, 0x202D, 0x202E, 0x202C, 0xFFFD, + 0xFFFD, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x20AC, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x03BC, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +static const unsigned short cp863_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00C2, 0x00E0, 0x00B6, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x2017, 0x00C0, 0x00A7, + 0x00C9, 0x00C8, 0x00CA, 0x00F4, 0x00CB, 0x00CF, 0x00FB, 0x00F9, + 0x00A4, 0x00D4, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x00DB, 0x0192, + 0x00A6, 0x00B4, 0x00F3, 0x00FA, 0x00A8, 0x00B8, 0x00B3, 0x00AF, + 0x00CE, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00BE, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x03BC, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +/* The OS/2 version of code page 864 differs from that published by the Unicode + Consortium in these positions: + Unicode OS/2 +0x9F undefined 0x200B +0xA7 undefined 0x20AC +0xD7 0xFEC1 0xFEC3 +0xD8 0xFEC5 0xFEC7 +0xF1 0x0651 0xFE7C */ +static const unsigned short cp864_tbl[] = { + 0x00B0, 0x00B7, 0x2219, 0x221A, 0x2592, 0x2500, 0x2502, 0x253C, + 0x2524, 0x252C, 0x251C, 0x2534, 0x2510, 0x250C, 0x2514, 0x2518, + 0x03B2, 0x221E, 0x03C6, 0x00B1, 0x00BD, 0x00BC, 0x2248, 0x00AB, + 0x00BB, 0xFEF7, 0xFEF8, 0xFFFD, 0xFFFD, 0xFEFB, 0xFEFC, 0x200B, + 0x00A0, 0x00AD, 0xFE82, 0x00A3, 0x00A4, 0xFE84, 0xFFFD, 0x20AC, + 0xFE8E, 0xFE8F, 0xFE95, 0xFE99, 0x060C, 0xFE9D, 0xFEA1, 0xFEA5, + 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, + 0x0668, 0x0669, 0xFED1, 0x061B, 0xFEB1, 0xFEB5, 0xFEB9, 0x061F, + 0x00A2, 0xFE80, 0xFE81, 0xFE83, 0xFE85, 0xFECA, 0xFE8B, 0xFE8D, + 0xFE91, 0xFE93, 0xFE97, 0xFE9B, 0xFE9F, 0xFEA3, 0xFEA7, 0xFEA9, + 0xFEAB, 0xFEAD, 0xFEAF, 0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, 0xFEC3, + 0xFEC7, 0xFECB, 0xFECF, 0x00A6, 0x00AC, 0x00F7, 0x00D7, 0xFEC9, + 0x0640, 0xFED3, 0xFED7, 0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, 0xFEEB, + 0xFEED, 0xFEEF, 0xFEF3, 0xFEBD, 0xFECC, 0xFECE, 0xFECD, 0xFEE1, + 0xFE7D, 0xFE7C, 0xFEE5, 0xFEE9, 0xFEEC, 0xFEF0, 0xFEF2, 0xFED0, + 0xFED5, 0xFEF5, 0xFEF6, 0xFEDD, 0xFED9, 0xFEF1, 0x25A0, 0xFFFD +}; + +static const unsigned short cp865_tbl[] = { + 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, + 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, + 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, + 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192, + 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, + 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00A4, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, + 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, + 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 +}; + +static const unsigned short cp866_tbl[] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0 +}; + +/* The OS/2 version of code page 864 differs from that published by the Unicode + Consortium in these positions: + Unicode OS/2 +0xA7 undefined 0x20AC +0xA8 0x00B7 0x0387 */ +static const unsigned short cp869_tbl[] = { + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0386, 0x20AC, + 0x0387, 0x00AC, 0x00A6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389, + 0x038A, 0x03AA, 0x038C, 0xFFFD, 0xFFFD, 0x038E, 0x03AB, 0x00A9, + 0x038F, 0x00B2, 0x00B3, 0x03AC, 0x00A3, 0x03AD, 0x03AE, 0x03AF, + 0x03CA, 0x0390, 0x03CC, 0x03CD, 0x0391, 0x0392, 0x0393, 0x0394, + 0x0395, 0x0396, 0x0397, 0x00BD, 0x0398, 0x0399, 0x00AB, 0x00BB, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039A, 0x039B, 0x039C, + 0x039D, 0x2563, 0x2551, 0x2557, 0x255D, 0x039E, 0x039F, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x03A0, 0x03A1, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x03A3, + 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2, + 0x03B3, 0x2518, 0x250C, 0x2588, 0x2584, 0x03B4, 0x03B5, 0x2580, + 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, + 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x0384, + 0x00AD, 0x00B1, 0x03C5, 0x03C6, 0x03C7, 0x00A7, 0x03C8, 0x0385, + 0x00B0, 0x00A8, 0x03C9, 0x03CB, 0x03B0, 0x03CE, 0x25A0, 0x00A0 +}; + +/* Code page 874 == almost ISO 8859-11 (Thai); check this one out */ +/* IBM's documents give position 0xDF as U+20AC, but tests show no euro sign when this + code page is configured. The correct mapping is unknown. */ +static const unsigned short cp874_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x0E48, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07, + 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F, + 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, + 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F, + 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, + 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F, + 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, + 0x0E38, 0x0E39, 0x0E3A, 0x0E49, 0x0E4A, 0x0E4B, 0x20AC, 0x0E3F, + 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, + 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F, + 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, + 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0x00A2, 0x00AC, 0x00A6, 0x00A0 +}; + +/* Code page 878 == KOI8-R */ +static const unsigned short cp878_tbl[] = { + 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, + 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, + 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, + 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, + 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, + 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, + 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, + 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, + 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, + 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, + 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, + 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, + 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, + 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, + 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, + 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A +}; + +/* Code page 912 == ISO 8859-2 (Latin-2) */ +static const unsigned short cp912_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, + 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B, + 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, + 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C, + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 +}; + +/* Code page 915 == ISO 8859-5 (Cyrillic) */ +static const unsigned short cp915_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, + 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, + 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F +}; + +/* Code page 921 == ISO 8859-13 (Latin-7) */ +static const unsigned short cp921_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7, + 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7, + 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6, + 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, + 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B, + 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, + 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF, + 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, + 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C, + 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, + 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019 +}; + +/* Code page 922 == a modified ISO 8859-1 */ +static const unsigned short cp922_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x0160, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x017D, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x0161, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x017E, 0x00FF +}; + +/* Code page 923 == ISO 8859-15 (Latin-9) */ +static const unsigned short cp923_tbl[] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7, + 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7, + 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF +}; + +static const unsigned short cp1125_tbl[] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x0401, 0x0451, 0x0490, 0x0491, 0x0404, 0x0454, 0x0406, 0x0456, + 0x0407, 0x0457, 0x00F7, 0x00B1, 0x2116, 0x00A4, 0x25A0, 0x00A0 +}; + +static const unsigned short cp1131_tbl[] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, + 0x0406, 0x0456, 0x00B7, 0x00A4, 0x0490, 0x0491, 0x2219, 0x00A0 +}; + +static const unsigned short cp1250_tbl[] = { + 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, + 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A, + 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B, + 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C, + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 +}; + +static const unsigned short cp1251_tbl[] = { + 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, + 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, + 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, + 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, + 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, + 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, + 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F +}; + +static const unsigned short cp1252_tbl[] = { + 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0x017D, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0x017E, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF +}; + +static const unsigned short cp1253_tbl[] = { + 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, + 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0xFFFD, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD +}; + +static const unsigned short cp1254_tbl[] = { + 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF +}; + +static const unsigned short cp1255_tbl[] = { + 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0xFFFD, 0x00B9, 0xFFFD, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0xFFFD, + 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, + 0x05B8, 0x05B9, 0xFFFD, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF, + 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0xFFFD, + 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0x200E, 0x200F, 0xFFFD +}; + +static const unsigned short cp1256_tbl[] = { + 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0xFFFD, 0x2039, 0x0152, 0x0686, 0x0698, 0xFFFD, + 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0x0153, 0x200C, 0x200D, 0xFFFD, + 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F, + 0xFFFD, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7, + 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643, + 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF, + 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7, + 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0xFFFD +}; + +static const unsigned short cp1257_tbl[] = { + 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, + 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, + 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, + 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0xFFFD, 0x00B5, 0x00B6, 0x00B7, + 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6, + 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, + 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B, + 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, + 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF, + 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, + 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C, + 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, + 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0xFFFD +}; + +static const unsigned short cp1275_tbl[] = { + 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1, + 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8, + 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3, + 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC, + 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF, + 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8, + 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211, + 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x2126, 0x00E6, 0x00F8, + 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB, + 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153, + 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA, + 0x00FF, 0x0178, 0x2044, 0x00A4, 0x2039, 0x203A, 0xFB01, 0xFB02, + 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1, + 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4, + 0xFFFD, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC, + 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7 +}; + +struct KbdUnicode { + unsigned code_page; + unsigned short const *map; +}; + +static const struct KbdUnicode kbd_unicode_tables[] = { + { 437, cp437_tbl }, + { 813, cp813_tbl }, + { 819, cp819_tbl }, + { 850, cp850_tbl }, + { 852, cp852_tbl }, + { 855, cp855_tbl }, + { 856, cp856_tbl }, + { 857, cp857_tbl }, + { 859, cp859_tbl }, + { 860, cp860_tbl }, + { 861, cp861_tbl }, + { 862, cp862_tbl }, + { 863, cp863_tbl }, + { 864, cp864_tbl }, + { 865, cp865_tbl }, + { 866, cp866_tbl }, + { 869, cp869_tbl }, + { 874, cp874_tbl }, + { 878, cp878_tbl }, + { 912, cp912_tbl }, + { 915, cp915_tbl }, + { 921, cp921_tbl }, + { 922, cp922_tbl }, + { 923, cp923_tbl }, + { 1004, cp1252_tbl }, /* 1004 and 1252 are the same code page */ + { 1125, cp1125_tbl }, + { 1131, cp1131_tbl }, + { 1250, cp1250_tbl }, + { 1251, cp1251_tbl }, + { 1252, cp1252_tbl }, + { 1253, cp1253_tbl }, + { 1254, cp1254_tbl }, + { 1255, cp1255_tbl }, + { 1256, cp1256_tbl }, + { 1257, cp1257_tbl }, + { 1275, cp1275_tbl } +}; + +static unsigned short const *kbd_unicode; +#endif + +/* Mouse handling is done as follows. Windows (*) gives us a +sequence of "raw" mouse events, which are : + + button pressed + button released + wheel up/down/left/right + mouse moved + + We need to provide a sequence of "combined" mouse events, +in which presses and releases get combined into clicks, +double-clicks, and triple-clicks if the "raw" events are within +SP->mouse_wait milliseconds of each other and the mouse doesn't +move in between. add_mouse( ) takes the "raw" events and figures +out what "combined" events should be emitted. + + If the raw event is a press or release, we also set a timer to +trigger in SP->mouse_wait milliseconds. When that timer event is +triggered, it calls add_mouse( -1, -1, -1, -1), meaning "synthesize +all events and pass them to add_mouse_event_to_queue( )". Basically, if +we hit the timeout _or_ the mouse is moved, we can send combined events +to add_mouse_event_to_queue( ). A corresponding KEY_MOUSE event will +be added to the key queue. + + A mouse move is simply ignored if it's within the current +character cell. (Note that ncurses does provide 'mouse move' events +even if the mouse has only moved within the character cell.) + + Also, a note about wheel handling. Pre-Vista, you could just say +"the wheel went up" or "the wheel went down". Vista introduced the possibility +that the mouse motion could be a smoothly varying quantity. So on each +mouse move, we add in the amount moved, then check to see if that's +enough to trigger a wheel up/down event (or possibly several). The idea +is that whereas before, each movement would be 120 units (the default), +you might now get a series of 40-unit moves and should emit a wheel up/down +event on every third move. + + (*) This is not necessarily Windows-specific. The same logic should +apply in any system where a timer can be set. Or a "timer" could be +synthesized by storing the time of the last mouse event, comparing +it to the current time, and saying that if SP->mouse_wait milliseconds +have elapsed, it's time to call add_mouse( -1, -1, -1, -1) to force +all mouse events to be output. */ + +#define TIMER_ID_FOR_BLINKING 0x2000 +#define TIMER_ID_FOR_MOUSE 0x2001 + +#define WM_CHOOSE_FONT (WM_USER + 6) + +static int add_resize_key = 1; +static int resize_limits_set = 0; + +/* This flavor of Curses tries to store the window and font sizes on an +app-by-app basis. To do this, it uses the above get_app_name( ) function, then +sets or gets a corresponding value from an OS/2 profile. The benefit should be +that one can have one screen size/font for, say, Testcurs, while having +different settings for, say, Firework or Rain or one's own programs. */ + +static void get_app_name(char *name, size_t name_len) +{ + PTIB tib; + PPIB pib; + const char *bname; + const char *ext; + size_t len; + size_t i; + + if (name_len == 0) + return; + + DosGetInfoBlocks(&tib, &pib); + + /* Start of base name */ + if (pib->pib_pchcmd == NULL) + { + bname = "pdcurses"; + } + else + { + bname = strrchr(pib->pib_pchcmd, '\\'); + if (bname == NULL) + bname = pib->pib_pchcmd; + else + ++bname; + } + + /* Remove extension if present */ + ext = strrchr(bname, '.'); + if (ext == NULL) + len = strlen(bname); + else + len = (size_t)(ext - bname); + + /* Copy to caller-supplied array */ + snprintf(name, name_len, "%.*s", (int)len, bname); + /* Convert to lowercase */ + for (i = 0; name[i] != '\0'; ++i) + name[i] = tolower(name[i]); +} + +static int set_default_sizes_from_registry( const int n_cols, const int n_rows, + const int xloc, const int yloc) +{ + char buff[1024]; + char app_name[FILENAME_MAX]; + BOOL rc; + + snprintf( buff, sizeof(buff), "%dx%d,%d,%d,%d,%d;%d,%d,%d,%d:%s", + n_cols, n_rows, PDC_font_size, + xloc, yloc, /*menu_shown*/ 0, + min_lines, max_lines, + min_cols, max_cols, + PDC_font_name); + + get_app_name( app_name, sizeof(app_name)); + rc = PrfWriteProfileString(HINI_PROFILE, (PSZ)"PDCurses", (PSZ)app_name, (PSZ)buff); + + debug_printf( "Size: %d %d; %d\n", n_cols, n_rows, rc); + return rc; +} + +static int get_default_sizes_from_registry( int *n_cols, int *n_rows, + int *xloc, int *yloc) +{ + char buff[1024]; + char app_name[FILENAME_MAX]; + ULONG rc; + + get_app_name(app_name, sizeof(app_name)); + rc = PrfQueryProfileString(HINI_PROFILE, (PSZ)"PDCurses", (PSZ)app_name, (PSZ)"", + buff, sizeof(buff)); + + if (rc != 0) + { + int x = n_cols ? *n_cols : -1, y = n_rows ? *n_rows : -1; + int bytes_read = 0; + + sscanf( buff, "%dx%d,%d,%d,%d,%*d;%d,%d,%d,%d:%n", + &x, &y, &PDC_font_size, + xloc, yloc, /*&menu_shown,*/ + &min_lines, &max_lines, + &min_cols, &max_cols, + &bytes_read); + if( bytes_read > 0 && buff[bytes_read - 1] == ':') + snprintf(PDC_font_name, sizeof(PDC_font_name), "%s", + buff + bytes_read); + if( n_cols != NULL) + *n_cols = x; + if( n_rows != NULL) + *n_rows = y; + } + if( rc == 0) + debug_printf( "get_default_sizes_from_registry error: %d\n", + WinGetLastError(PDC_hab)); + return rc != 0; +} + +/*man-start************************************************************** + +Resize limits +------------- + +### Synopsis + + void PDC_set_resize_limits( const int new_min_lines, + const int new_max_lines, + const int new_min_cols, + const int new_max_cols); + +### Description + + For platforms supporting resizable windows (SDLx, WinGUI, X11). Some + programs may be unprepared for a resize event; for these, calling + this function with the max and min limits equal ensures that no + user resizing can be done. Other programs may require at least a + certain number, and/or no more than a certain number, of columns + and/or lines. + +### Portability + + PDCurses-only function. + +**man-end****************************************************************/ + +void PDC_set_resize_limits( const int new_min_lines, const int new_max_lines, + const int new_min_cols, const int new_max_cols) +{ + min_lines = max( new_min_lines, 2); + max_lines = max( new_max_lines, min_lines); + min_cols = max( new_min_cols, 2); + max_cols = max( new_max_cols, min_cols); + resize_limits_set = 1; +} + +typedef void(*resize_callback_fnptr)(void); +static resize_callback_fnptr resize_callback = NULL; +void PDC_set_window_resized_callback(resize_callback_fnptr callback) { + resize_callback = callback; +} + +static void HandleSize( HWND hwnd, int n_xpixels, int n_ypixels) +{ + unsigned new_n_rows, new_n_cols; + BOOL first_time; + + first_time = (PDC_cxChar == 0 || PDC_cyChar == 0); + if (first_time) + PDC_set_font_box(hwnd); /* avoid division by zero */ + + /* If window has been minimized, don't mess with the size */ + if (minimized) + return; + + new_n_rows = n_ypixels / PDC_cyChar; + new_n_cols = n_xpixels / PDC_cxChar; + debug_printf( "Size was %d x %d; will be %d x %d\n", + PDC_n_rows, PDC_n_cols, new_n_rows, new_n_cols); + SP->resized = FALSE; + + /* If the window will have a different number of rows */ + /* or columns, we put KEY_RESIZE in the key queue. */ + /* We don't do this if */ + /* the resizing is the result of the window being */ + /* initialized, or as a result of PDC_resize_screen */ + /* being called. In the latter case, the user */ + /* presumably already knows the screen's been resized. */ + if( PDC_n_rows != (int)new_n_rows || PDC_n_cols != (int)new_n_cols) + { + PDC_n_cols = new_n_cols; + PDC_n_rows = new_n_rows; + if( !first_time && add_resize_key) + { + /* don't add a key when the window is initialized */ + add_key_to_queue( KEY_RESIZE); + SP->resized = TRUE; + if (resize_callback) { + resize_callback(); + } + } + } + + add_resize_key = 1; +} + +static void +HandlePaint(const HWND hwnd) +{ + RECTL update_rect; + HPS hps = WinBeginPaint(hwnd, NULLHANDLE, &update_rect); + int i; + int num_cols = PDC_n_cols; + int num_rows = PDC_n_rows; + if (num_cols > COLS) + num_cols = COLS; + if (num_rows > SP->lines) + num_rows = SP->lines; + + GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL); + WinFillRect(hps, &update_rect, GpiQueryColorIndex(hps, 0, 0x00000000)); + + PDC_setup_font(hps); + + for (i = 0; i < num_rows; i++) + { + if (i < SP->lines && curscr->_y[i]) + PDC_transform_line_sliced( i, 0, num_cols, curscr->_y[i]); + } + + WinEndPaint(hps); +} + +static void HandleTimer( void ) +{ + int i; /* see WndProc() notes */ + + PDC_blink_state ^= 1; + for( i = 0; i < SP->lines; i++) + { + if( curscr->_y[i]) + { + int j = 0; + chtype *line = curscr->_y[i]; + + /* skip over starting text that isn't blinking: */ + while( j < SP->cols) + { + int k; + + while( j < SP->cols && !(line[j] & A_BLINK)) + j++; + k = j; + while( j < SP->cols && (line[j] & A_BLINK)) + j++; + if( k != j) + PDC_transform_line_sliced( i, k, j - k, line + k); + } + } + } + if( PDC_CURSOR_IS_BLINKING && SP->cursrow < SP->lines && SP->curscol < COLS) + PDC_transform_line_sliced( SP->cursrow, SP->curscol, 1, + curscr->_y[SP->cursrow] + SP->curscol); +} + +typedef struct +{ + int x, y; + int button, action; + int button_flags; /* Alt, shift, ctrl */ +} PDC_mouse_event; + +/* As "combined" mouse events (i.e., clicks and double- and triple-clicks +along with the usual mouse moves, button presses and releases, and wheel +movements) occur, we add them to a queue. They are removed for each +KEY_MOUSE event from getch( ), and SP->mouse_status is set to reflect +what the mouse was doing at that event. + +Seven queued mouse events is possibly overkill. */ + +#define MAX_MOUSE_QUEUE 7 + +static PDC_mouse_event mouse_queue[MAX_MOUSE_QUEUE]; +static int n_mouse_queue = 0; + +int PDC_get_mouse_event_from_queue( void) +{ + size_t i; + + if( !n_mouse_queue) + return( -1); + memset(&SP->mouse_status, 0, sizeof(MOUSE_STATUS)); + if( mouse_queue->action == BUTTON_MOVED) + { + if( mouse_queue->button < 0) + SP->mouse_status.changes = PDC_MOUSE_MOVED; + else + { + SP->mouse_status.changes = PDC_MOUSE_MOVED | (1 << mouse_queue->button); + SP->mouse_status.button[mouse_queue->button] = BUTTON_MOVED; + } + } + else + { + if( mouse_queue->button < PDC_MAX_MOUSE_BUTTONS) + { + SP->mouse_status.button[mouse_queue->button] = (short)mouse_queue->action; + if( mouse_queue->button < 3) + SP->mouse_status.changes = (1 << mouse_queue->button); + else + SP->mouse_status.changes = (0x40 << mouse_queue->button); + } + else if( mouse_queue->button == WHEEL_EVENT) + SP->mouse_status.changes |= mouse_queue->action; + } + SP->mouse_status.x = mouse_queue->x; + SP->mouse_status.y = mouse_queue->y; + for (i = 0; i < PDC_MAX_MOUSE_BUTTONS; i++) + SP->mouse_status.button[i] |= mouse_queue->button_flags; + n_mouse_queue--; + memmove( mouse_queue, mouse_queue + 1, n_mouse_queue * sizeof( PDC_mouse_event)); + return( 0); +} + +static void add_mouse_event_to_queue( const int button, const int action, + const int x, const int y) +{ + if( x < PDC_n_cols && y < PDC_n_rows && n_mouse_queue < MAX_MOUSE_QUEUE) + { + int button_flags = 0; + + mouse_queue[n_mouse_queue].button = button; + mouse_queue[n_mouse_queue].action = action; + mouse_queue[n_mouse_queue].x = x; + mouse_queue[n_mouse_queue].y = y; + if( WinGetKeyState( HWND_DESKTOP, VK_MENU) & 0x8000) + button_flags |= PDC_BUTTON_ALT; + + if( WinGetKeyState( HWND_DESKTOP, VK_SHIFT) & 0x8000) + button_flags |= PDC_BUTTON_SHIFT; + + if( WinGetKeyState( HWND_DESKTOP, VK_CTRL) & 0x8000) + button_flags |= PDC_BUTTON_CONTROL; + mouse_queue[n_mouse_queue].button_flags = button_flags; + n_mouse_queue++; + add_key_to_queue( KEY_MOUSE); + } +} + +/* 'button_count' is zero if a button hasn't been pressed; one if it +has been; two if pressed/released (clicked); three if clicked and +pressed again... all the way up to six if it's been triple-clicked. */ + +static int add_mouse( int button, const int action, const int x, const int y) +{ + bool flush_events_to_queue = (button == -1 || action == BUTTON_MOVED); + static int mouse_state = 0, button_count[PDC_MAX_MOUSE_BUTTONS]; + static int prev_x, prev_y = -1; + const bool actually_moved = (x != prev_x || y != prev_y); + size_t i; + + if( action == BUTTON_RELEASED) + { + mouse_state &= ~(1 << button); + if( !button_count[button - 1]) /* a release with no matching press */ + { + add_mouse_event_to_queue( button - 1, BUTTON_RELEASED, x, y); + return( 0); + } + else if( button_count[button - 1] & 1) + { + button_count[button - 1]++; + if( button_count[button - 1] == 6) /* triple-click completed */ + flush_events_to_queue = TRUE; + } + } + else if( action == BUTTON_PRESSED && !(button_count[button - 1] & 1)) + { + mouse_state |= (1 << button); + button_count[button - 1]++; + } + if( button >= 0) + { + prev_x = x; + prev_y = y; + } + if( action == BUTTON_MOVED) + { + if( !actually_moved) /* have to move to a new character cell, */ + return( -1); /* not just a new pixel */ + button = -1; /* assume no buttons down */ + for( i = 0; i < PDC_MAX_MOUSE_BUTTONS; i++) + if( (mouse_state >> i) & 1) + button = (int)i; + if( button == -1 && !(SP->_trap_mbe & REPORT_MOUSE_POSITION)) + return( -1); + } + + if( flush_events_to_queue) + for( i = 0; i < PDC_MAX_MOUSE_BUTTONS; i++) + if( button_count[i]) + { + const int events[4] = { 0, BUTTON_CLICKED, + BUTTON_DOUBLE_CLICKED, BUTTON_TRIPLE_CLICKED }; + + assert( button_count[i] > 0 && button_count[i] < 7); + if( button_count[i] >= 2) + add_mouse_event_to_queue( (int)i, events[button_count[i] / 2], prev_x, prev_y); + if( button_count[i] & 1) + add_mouse_event_to_queue( (int)i, BUTTON_PRESSED, prev_x, prev_y); + button_count[i] = 0; + } + if( action == BUTTON_MOVED) + add_mouse_event_to_queue( button - 1, action, x, y); + debug_printf( "Button %d, act %d\n", button, action); + return( 0); +} + +/* Note that there are two types of WM_TIMER timer messages. One type +indicates that SP->mouse_wait milliseconds have elapsed since a mouse +button was pressed; that's handled as described in the above notes. +The other type, issued every half second, indicates that blinking +should take place. For these, HandleTimer() is called (see above). + + On WM_PAINT, we determine what parts of 'curscr' would be covered by +the update rectangle, and run those through PDC_transform_line. */ + +static void HandleChar(const MPARAM wParam, const MPARAM lParam); + +static MRESULT EXPENTRY WndProc (const HWND hwnd, + const ULONG message, + const MPARAM wParam, + const MPARAM lParam) +{ + int button = 0, action = 0; + MRESULT rc = 0; + +#if 1 + if (message != WM_TIMER) + debug_printf("message=%08lX wParam=%p lParam=%p\n", message, wParam,lParam); +#endif + switch (message) + { + case WM_CREATE: + { + HWND frame = WinQueryWindow(hwnd, QW_PARENT); + HWND menu = WinWindowFromID(frame, FID_SYSMENU); + MENUITEM item; + MRESULT mr; + SHORT id; + + /* Amend the system menu */ + mr = WinSendMsg(menu, MM_ITEMIDFROMPOSITION, MPFROMSHORT(0), NULL); + id = SHORT1FROMMR(mr); + memset(&item, 0, sizeof(item)); + WinSendMsg(menu, MM_QUERYITEM, MPFROM2SHORT(id, FALSE), &item); + menu = item.hwndSubMenu; + memset(&item, 0, sizeof(item)); + item.iPosition = MIT_END; + item.afStyle = MIS_SEPARATOR; + item.afAttribute = 0; + item.id = 0; + WinSendMsg(menu, MM_INSERTITEM, &item, ""); + memset(&item, 0, sizeof(item)); + item.iPosition = MIT_END; + item.afStyle = MIS_TEXT; + item.afAttribute = 0; + item.id = WM_CHOOSE_FONT; + WinSendMsg(menu, MM_INSERTITEM, &item, "Choose Font"); + + WinStartTimer(PDC_hab, hwnd, TIMER_ID_FOR_BLINKING, 500); + } + break; + + case WM_MINMAXFRAME: + { + PSWP swp = wParam; + debug_printf( "Flags = %04X\n", swp->fl); + minimized = (swp->fl & SWP_MINIMIZE) != 0; + } + break; + + case WM_SIZE: + { + SHORT cx = SHORT1FROMMP(lParam); + SHORT cy = SHORT2FROMMP(lParam); + + debug_printf("Size: recv x = %d y = %d\n", + SHORT1FROMMP(lParam), SHORT2FROMMP(lParam)); + HandleSize( hwnd, cx, cy); + } + break; + + case WM_COMMAND: + case WM_SYSCOMMAND: + switch (SHORT1FROMMP(wParam)) + { + case WM_CHOOSE_FONT: + if( PDC_choose_a_new_font(PDC_font_name, &PDC_font_size)) + PDC_set_font_box(hwnd); + break; + + default: + return WinDefWindowProc( hwnd, message, wParam, lParam); + } + break; + + case WM_MOUSEMOVE: + { + int mouse_x, mouse_y; + PDC_pixel_to_screen(SHORT1FROMMP(wParam), SHORT2FROMMP(wParam), + &mouse_x, &mouse_y); + + add_mouse( 0, BUTTON_MOVED, mouse_x, mouse_y); + } + return 0; + + case WM_BUTTON1DOWN: + button = 1; + action = BUTTON_PRESSED; + break; + + case WM_BUTTON1UP: + button = 1; + action = BUTTON_RELEASED; + break; + + case WM_BUTTON3DOWN: + button = 3; + action = BUTTON_PRESSED; + break; + + case WM_BUTTON3UP: + button = 3; + action = BUTTON_RELEASED; + break; + + case WM_BUTTON2DOWN: + button = 2; + action = BUTTON_PRESSED; + break; + + case WM_BUTTON2UP: + button = 2; + action = BUTTON_RELEASED; + break; + + case WM_PAINT: + HandlePaint(hwnd); + break; + + case WM_CHAR: + HandleChar(wParam, lParam); + break; + + case WM_TRANSLATEACCEL: + /* Translate no accelerators, but pass all function keys unaltered */ + break; + + case WM_TIMER: + switch (SHORT1FROMMP(wParam)) + { + case TIMER_ID_FOR_MOUSE: + WinStopTimer(PDC_hab, hwnd, TIMER_ID_FOR_MOUSE); + add_mouse( -1, -1, -1, -1); + break; + + case TIMER_ID_FOR_BLINKING: + if( SP && curscr && curscr->_y) + { + /* blink the blinking text */ + HandleTimer(); + } + break; + + default: + return WinDefWindowProc( hwnd, message, wParam, lParam); + } + break; + + default: + return WinDefWindowProc( hwnd, message, wParam, lParam); + } + + if (button != 0) + { + int col, row; + PDC_pixel_to_screen(SHORT1FROMMP(wParam), SHORT2FROMMP(wParam), + &col, &row); + add_mouse(button, action, col, row); + if (action == BUTTON_PRESSED) + WinSetCapture(HWND_DESKTOP, hwnd); + else + WinSetCapture(HWND_DESKTOP, NULLHANDLE); + WinStartTimer(PDC_hab, hwnd, TIMER_ID_FOR_MOUSE, SP->mouse_wait); + } + return rc; +} + +static void HandleChar(const MPARAM wParam, const MPARAM lParam) +{ + USHORT fsflags = SHORT1FROMMP(wParam); + UCHAR ucrepeat = CHAR3FROMMP(wParam); + UCHAR ucscancode = CHAR4FROMMP(wParam); + ULONG usch = SHORT1FROMMP(lParam); + USHORT usvk = SHORT2FROMMP(lParam); + const BOOL shift_pressed = (fsflags & KC_SHIFT) != 0; + const BOOL ctrl_pressed = (fsflags & KC_CTRL) != 0; + const BOOL alt_pressed = (fsflags & KC_ALT) != 0; + const BOOL num_lock = WinGetKeyState( HWND_DESKTOP, VK_NUMLOCK) & 1; + +#if 0 + printf("fsflags = 0x%04X ucrepeat = %u ucscancode = %u usch = 0x%04X usvk = 0x%04X\n", + fsflags, ucrepeat, ucscancode, usch, usvk); fflush(stdout); +#endif + + SP->key_modifiers = 0; + /* Save the key modifiers if required. Do this first to allow to + detect e.g. a pressed CTRL key after a hit of NUMLOCK. */ + + if( alt_pressed) + SP->key_modifiers |= PDC_KEY_MODIFIER_ALT; + + if( shift_pressed) + SP->key_modifiers |= PDC_KEY_MODIFIER_SHIFT; + + if( ctrl_pressed) + SP->key_modifiers |= PDC_KEY_MODIFIER_CONTROL; + + if( num_lock) + SP->key_modifiers |= PDC_KEY_MODIFIER_NUMLOCK; + + if( ucrepeat > 0) + SP->key_modifiers |= PDC_KEY_MODIFIER_REPEAT; + + if ((fsflags & (KC_SCANCODE | KC_KEYUP | KC_LONEKEY)) == (KC_SCANCODE | KC_KEYUP) && + (ucscancode == 0x38 || ucscancode == 0x5E) && + numpad_unicode_value != 0) + { + /* Alt keys */ + /* Place on queue but not if it would match a Curses special key */ + if (numpad_unicode_value < KEY_MIN || KEY_MAX <= numpad_unicode_value) + add_key_to_queue(numpad_unicode_value); + numpad_unicode_value = 0; + return; + } + + /* Keys that are indexed by scan code */ + if ((fsflags & (KC_SCANCODE | KC_KEYUP)) == KC_SCANCODE && + ucscancode < sizeof(scan_kptab)/sizeof(scan_kptab[0])) + { + const KPTAB *kptr = &scan_kptab[ucscancode]; + /* If KP_NUMLOCK, num lock inverts shift */ + BOOL shift_inv = num_lock && (kptr->flags & KP_NUMLOCK); + unsigned key; + + if( alt_pressed) + key = kptr->alt; + else if( ctrl_pressed) + key = kptr->control; + else if( shift_pressed ^ shift_inv) + key = kptr->shift; + else + key = kptr->normal; + if (key != 0xFFFF && !(kptr->flags & KP_SHIFT)) + { + /* CTRL-x and ALT-x should follow the letter on French AZERTY and + German QWERTZ layouts. Although KC_CHAR is not set, we must + rely on usch to detect such layouts. */ + if (1 <= key && key <= 26) + { + if (('A' <= usch && usch <= 'Z') || ('a' <= usch && usch <= 'z')) + key = usch & 0x1F; + } + else if (ALT_A <= key && key <= ALT_Z) + { + if ('A' <= usch && usch <= 'Z') + key = ALT_A - 'A' + usch; + else if ('a' <= usch && usch <= 'z') + key = ALT_A - 'a' + usch; + } + add_key_to_queue(key); + return; + } + } + + /* Shift keys taken as single keys */ + if ((fsflags & (KC_SCANCODE | KC_KEYUP | KC_LONEKEY)) == (KC_SCANCODE | KC_KEYUP | KC_LONEKEY) && + ucscancode < sizeof(scan_kptab)/sizeof(scan_kptab[0])) + { + const KPTAB *kptr = &scan_kptab[ucscancode]; + if (kptr->flags & KP_SHIFT) + { + add_key_to_queue(kptr->normal); + return; + } + } + + if ((fsflags & (KC_VIRTUALKEY | KC_KEYUP)) == KC_VIRTUALKEY && + usvk < sizeof(kptab)/sizeof(kptab[0])) + { + const KPTAB *kptr = &kptab[usvk]; + unsigned key; + + if( alt_pressed) + key = kptr->alt; + else if( ctrl_pressed) + key = kptr->control; + else if( shift_pressed) + key = kptr->shift; + else + key = kptr->normal; + if (key != 0xFFFF) + { + add_key_to_queue(key); + return; + } + } + + if ((fsflags & (KC_CHAR | KC_KEYUP)) == KC_CHAR) + { +#ifdef PDC_WIDE + /* WinSetCp(hmq, 1200) doesn't work, and neither does translation to code + page 1200. + Unicode translation is handled as follows: + * If a table according to kbd_unicode_tables is known, use it + * Otherwise, translate to code page 1004; that way, at least up to U+00FF + always works. */ + if (0x80 <= usch && usch <= 0xFF) + { + if (kbd_unicode != NULL) + usch = kbd_unicode[usch - 0x80]; + else + usch = WinCpTranslateChar(PDC_hab, WinQueryCp(PDC_hmq), usch, 1004); + } +#endif + add_key_to_queue(usch); + return; + } +} + +/* By default, the user cannot resize the window. This is because +many apps don't handle KEY_RESIZE, and one can get odd behavior +in such cases. There are two ways around this. If you call +PDC_set_resize_limits( ) before initwin( ), telling WinGUI exactly how +large/small the window can be, the window will be user-resizable. Or +you can set ttytype[0...3] to contain the resize limits. A call such as + +PDC_set_resize_limits( 42, 42, 135, 135); + + will result in the window being fixed at 42 lines by 135 columns. + +PDC_set_resize_limits( 20, 50, 70, 200); + + will mean the window can have 20 to 50 lines and 70 to 200 columns. +The user will be able to resize the window freely within those limits. +See 'newtest.c' (in the 'demos' folder) for an example. */ + +static int set_up_window( void) +{ + const int ID_MAIN = 1; + ULONG window_style; + BOOL rval; + char WindowTitle[FILENAME_MAX]; + int n_default_columns = 80; + int n_default_rows = 25; + int xloc = -9999, yloc = -9999; + + PDC_hab = WinInitialize(0); + PDC_hmq = WinCreateMsgQueue(PDC_hab, 0); + if (PDC_hmq == NULLHANDLE) + { + const ULONG last_error = WinGetLastError( PDC_hab); + + debug_printf( "WinCreateMsgQueue failed: GetLastError = %lx\n", last_error); + goto error; + } + +#ifdef PDC_WIDE + { + /* Select a map to convert incoming key presses to Unicode */ + ULONG code_page = WinQueryCp(PDC_hmq); + unsigned i; + kbd_unicode = NULL; + for (i = 0; i < sizeof(kbd_unicode_tables)/sizeof(kbd_unicode_tables[0]); ++i) + { + if (kbd_unicode_tables[i].code_page == code_page) + { + kbd_unicode = kbd_unicode_tables[i].map; + break; + } + } + } +#endif + + rval = WinRegisterClass(PDC_hab, (PCSZ)"PDCurses.main", WndProc, CS_SIZEREDRAW, 0L); + if( !rval) + { + const ULONG last_error = WinGetLastError( PDC_hab); + + debug_printf( "WinRegisterClass failed: GetLastError = %lx\n", last_error); + goto error; + } + + get_app_name(WindowTitle, sizeof(WindowTitle)); + + /* fixed-size window: looks "normal", but w/o a maximize box */ + window_style = FCF_TITLEBAR | FCF_SYSMENU | FCF_MINBUTTON | FCF_TASKLIST + | FCF_SHELLPOSITION; + if( min_lines != max_lines || min_cols != max_cols) + window_style |= FCF_MAXBUTTON | FCF_SIZEBORDER; + + get_default_sizes_from_registry( &n_default_columns, &n_default_rows, + &xloc, &yloc); + + PDC_hWnd = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE, &window_style, + (PCSZ)"PDCurses.main", (PCSZ)WindowTitle, 0L, 0, ID_MAIN, NULL); + if (PDC_hWnd == NULLHANDLE) + { + const ULONG last_error = WinGetLastError( PDC_hab); + + debug_printf( "WinCreateStdWindow failed; GetLastError = %lx\n", last_error); + goto error; + } + PDC_resize_screen(n_default_rows, n_default_columns); + if (xloc > -9999 && yloc > -9999) + WinSetWindowPos(PDC_hWnd, NULLHANDLE, xloc, yloc, 0, 0, SWP_MOVE); + + return 0; + +error: + WinDestroyWindow( PDC_hWnd); + WinDestroyMsgQueue( PDC_hmq); + WinTerminate( PDC_hab); + PDC_hWnd = NULLHANDLE; + PDC_hmq = NULLHANDLE; + PDC_hab = NULLHANDLE; + return( -1); +} + +/* open the physical screen -- allocate SP, miscellaneous intialization, + and may save the existing screen for later restoration. + + Deciding on a for-real maximum screen size has proven difficult. + But there is really no particularly good reason to set such a maximum. + If one does, you get some tricky issues: suppose the user drags the + window to create a screen larger than MAX_LINES or MAX_COLUMNS? My + hope is to evade that problem by just setting those constants to be... + well... unrealistically large. */ + +#define MAX_LINES 50000 +#define MAX_COLUMNS 50000 + +int PDC_scr_open(void) +{ + PDC_LOG(("PDC_scr_open() - called\n")); + + COLORS = N_COLORS; /* should give this a try and see if it works! */ + if (!SP || PDC_init_palette( )) + return ERR; + + debug_printf( "colors alloc\n"); + PDC_bDone = FALSE; + SP->mouse_wait = PDC_CLICK_PERIOD; + SP->visibility = 0; /* no cursor, by default */ + SP->curscol = SP->cursrow = 0; + SP->audible = TRUE; + SP->mono = FALSE; + SP->termattrs = A_COLOR | WA_ITALIC | WA_UNDERLINE | WA_LEFT | WA_RIGHT | + WA_REVERSE | WA_STRIKEOUT | WA_TOP | WA_BLINK | WA_DIM | WA_BOLD; + + if( set_up_window( )) + { + fprintf( stderr, "set_up_window failed\n"); + return ERR; + } + debug_printf( "Back from set_up_window\n"); + while( !PDC_get_rows( )) { /* wait for screen to be drawn and */ + QMSG qmsg; /* actual size to be determined */ + if (WinPeekMsg( PDC_hab, &qmsg, NULLHANDLE, 0, 0, PM_REMOVE)) { + WinDispatchMsg(PDC_hab, &qmsg); + } + } + + debug_printf( "Back from PDC_get_rows\n"); + SP->lines = PDC_get_rows(); + SP->cols = PDC_get_columns(); + + if (SP->lines < 2 || SP->lines > MAX_LINES + || SP->cols < 2 || SP->cols > MAX_COLUMNS) + { + fprintf(stderr, "LINES value must be >= 2 and <= %d: got %d\n", + MAX_LINES, SP->lines); + fprintf(stderr, "COLS value must be >= 2 and <= %d: got %d\n", + MAX_COLUMNS, SP->cols); + + return ERR; + } + +/* PDC_reset_prog_mode(); doesn't do anything anyway */ + PDC_set_function_key( FUNCTION_KEY_COPY, 0); + debug_printf( "...we're done\n"); + return OK; +} + +/* the core of resize_term() */ + +int PDC_resize_screen(int nlines, int ncols) +{ + if( !PDC_hWnd) /* window hasn't been created yet; we're */ + { /* specifying its size before doing so */ + PDC_n_rows = nlines; + PDC_n_cols = ncols; + return OK; + } + SP->resized = FALSE; + debug_printf( "Incoming: %d %d\n", nlines, ncols); + if( nlines >= 2 && ncols >= 2 && PDC_cxChar && PDC_cyChar && PDC_hWnd) + { + RECTL rect, new_rect; + + /* Get the current window extent */ + WinQueryWindowRect(PDC_hWnd, &rect); + + /* Get the new window extent */ + new_rect.xLeft = 0; + new_rect.xRight = ncols * PDC_cxChar; + new_rect.yBottom = 0; + new_rect.yTop = nlines * PDC_cyChar; + WinCalcFrameRect(PDC_hWnd, &new_rect, FALSE); + + /* Resize the window */ + if (rect.xRight - rect.xLeft != new_rect.xRight - new_rect.xLeft + || rect.yTop - rect.yBottom != new_rect.yTop - new_rect.yBottom) + { + RECTL dtop_rect; + int xsize = new_rect.xRight - new_rect.xLeft; + int ysize = new_rect.yTop - new_rect.yBottom; + int xpos, ypos; + + add_resize_key = 0; + + /* Center on the desktop, but do not place the top higher than + the top of the desktop */ + WinQueryWindowRect(HWND_DESKTOP, &dtop_rect); + dtop_rect.xRight -= dtop_rect.xLeft; + dtop_rect.yTop -= dtop_rect.yBottom; + xpos = (dtop_rect.xRight - xsize) / 2; + if (ysize > dtop_rect.yTop) + ypos = dtop_rect.yTop - ysize; + else + ypos = (dtop_rect.yTop - ysize) / 2; + + WinSetWindowPos(PDC_hWnd, NULLHANDLE, + xpos, ypos, xsize, ysize, + SWP_MOVE | SWP_SIZE | SWP_SHOW); + } + } + return OK; +} + +void PDC_reset_prog_mode(void) +{ + PDC_LOG(("PDC_reset_prog_mode() - called.\n")); +#ifdef NOT_CURRENTLY_IN_USE + if( PDC_bDone == FALSE && PDC_hWnd) + { + PDC_bDone = TRUE; + WinSetActiveWindow( HWND_DESKTOP, PDC_hWnd); + } +#endif +} + +void PDC_reset_shell_mode(void) +{ +} + +void PDC_restore_screen_mode(int i) +{ + INTENTIONALLY_UNUSED_PARAMETER( i); +} + +void PDC_save_screen_mode(int i) +{ + INTENTIONALLY_UNUSED_PARAMETER( i); +} + +bool PDC_can_change_color(void) +{ + return TRUE; +} + +int PDC_color_content( int color, int *red, int *green, int *blue) +{ + LONG col = PDC_get_palette_entry( color); + + *red = DIVROUND(((col >> 0) & 0xFF) * 1000, 255); + *green = DIVROUND(((col >> 8) & 0xFF) * 1000, 255); + *blue = DIVROUND(((col >> 16) & 0xFF) * 1000, 255); + + return OK; +} + +int PDC_init_color( int color, int red, int green, int blue) +{ + const LONG new_rgb = (DIVROUND(red * 255, 1000) << 0) + | (DIVROUND(green * 255, 1000) << 8) + | (DIVROUND(blue * 255, 1000) << 16); + + PDC_set_palette_entry( color, new_rgb); + return OK; +} + +/* Convert screen to pixel coordinates */ +void PDC_screen_to_pixel(int sx, int sy, RECTL *rect) +{ + RECTL client_rect; + + /* Determine origin of client rectangle */ + WinQueryWindowRect( PDC_hWnd, &client_rect); + WinCalcFrameRect( PDC_hWnd, &client_rect, TRUE); + + /* Determine extent of character cell */ + rect->xLeft = client_rect.xLeft + sx * PDC_cxChar; + rect->yBottom = client_rect.yBottom + (PDC_n_rows - 1 - sy) * PDC_cyChar; + rect->xRight = rect->xLeft + PDC_cxChar; + rect->yTop = rect->yBottom + PDC_cyChar; +} + +/* Convert pixel to screen coordinates */ +void PDC_pixel_to_screen(int px, int py, int *sx, int *sy) +{ + RECTL client_rect; + + /* Determine origin of client rectangle */ + WinQueryWindowRect( PDC_hWnd, &client_rect); + WinCalcFrameRect( PDC_hWnd, &client_rect, TRUE); + + /* Determine coordinates of character cell */ + *sx = (px - client_rect.xLeft) / PDC_cxChar; + *sy = PDC_n_rows - 1 - (py - client_rect.yBottom) / PDC_cyChar; + + /* Keep screen coordinates in bounds */ + if (*sx < 0) + *sx = 0; + if (*sx >= PDC_n_cols) + *sx = PDC_n_cols - 1; + if (*sy < 0) + *sy = 0; + if (*sy >= PDC_n_rows) + *sy = PDC_n_rows - 1; +} diff --git a/os2gui/pdcsetsc.c b/os2gui/pdcsetsc.c new file mode 100644 index 00000000..adabb707 --- /dev/null +++ b/os2gui/pdcsetsc.c @@ -0,0 +1,115 @@ +/* Public Domain Curses */ + +#include +#include "pdcwin.h" +#include "../common/pdccolor.h" + +/*man-start************************************************************** + +pdcsetsc +-------- + +### Synopsis + + int PDC_set_blink(bool blinkon); + int PDC_set_bold(bool boldon); + void PDC_set_title(const char *title); + +### Description + + PDC_set_blink() toggles whether the A_BLINK attribute sets an actual + blink mode (TRUE), or sets the background color to high intensity + (FALSE). The default is platform-dependent (FALSE in most cases). It + returns OK if it could set the state to match the given parameter, + ERR otherwise. + + PDC_set_bold() toggles whether the A_BOLD attribute selects an actual + bold font (TRUE), or sets the foreground color to high intensity + (FALSE). It returns OK if it could set the state to match the given + parameter, ERR otherwise. + + PDC_set_title() sets the title of the window in which the curses + program is running. This function may not do anything on some + platforms. + +### Portability + X/Open ncurses NetBSD + PDC_set_blink - - - + PDC_set_bold - - - + PDC_set_title - - - + +**man-end****************************************************************/ + + /* Note that the following is a line-for-line */ + /* copy of the SDL version of this function. */ +int PDC_curs_set(int visibility) +{ + int ret_vis; + + PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility)); + + ret_vis = SP->visibility; + + SP->visibility = visibility; + + PDC_gotoyx(SP->cursrow, SP->curscol); + + return ret_vis; +} + +void PDC_set_title(const char *title) +{ + PDC_LOG(("PDC_set_title() - called:<%s>\n", title)); + + WinSetWindowText( PDC_hWnd, (PCSZ)title); +} + + /* If SP->termattrs & A_BLINK is on, then text with the A_BLINK */ + /* attribute will actually blink. Otherwise, such text will */ + /* be shown with higher color intensity (the R, G, and B values */ + /* are averaged with pure white). See pdcdisp.c for details of */ + /* how this is done. */ + /* Unlike on other PDCurses platforms, this doesn't require */ + /* decreasing the number of colors by half. Also, the choice */ + /* indicated by 'blinkon' will actually be respected, so OK is */ + /* always returned (most platforms don't actually support */ + /* blinking). */ + /* The default behavior is to not show A_BLINK text as */ + /* blinking, i.e., SP->termattrs & A_BLINK = 0. Blinking text */ + /* can be pretty annoying to some people. You should probably */ + /* call PDC_set_blink( TRUE) only if there is something to which */ + /* the user _must_ pay attention; say, "the nuclear reactor */ + /* is about to melt down". Otherwise, the bolder, brighter */ + /* text should be attention-getting enough. */ + /* Note also that when turning 'blink' On, we don't have to */ + /* mark curscr as needing to be cleared. Blinking will begin */ + /* within half a second anyway. (This is an exception to the */ + /* general rule that changes only take place after refresh().) */ + +static int reset_attr( const attr_t attr, const bool attron) +{ + attr_t prev_termattrs; + + assert( SP); + if (!SP) + return ERR; + prev_termattrs = SP->termattrs; + if( attron) + SP->termattrs |= attr; + else + SP->termattrs &= ~attr; + if( prev_termattrs != SP->termattrs) + if( !attron || attr == A_BOLD) + curscr->_clear = TRUE; + return OK; +} + +int PDC_set_blink(bool blinkon) +{ + return( reset_attr( A_BLINK, blinkon)); +} + +int PDC_set_bold(bool boldon) +{ + return( reset_attr( A_BOLD, boldon)); +} diff --git a/os2gui/pdcutil.c b/os2gui/pdcutil.c new file mode 100644 index 00000000..a3961078 --- /dev/null +++ b/os2gui/pdcutil.c @@ -0,0 +1,42 @@ +/* Public Domain Curses */ + +#include "pdcwin.h" + +void PDC_beep(void) +{ + PDC_LOG(("PDC_beep() - called\n")); + DosBeep(440, 500); +} + +void PDC_napms(int ms) /* 'ms' = milli, _not_ microseconds! */ +{ + /* RR: keep GUI window responsive while PDCurses sleeps */ + HAB hab = WinQueryAnchorBlock( PDC_hWnd); + QMSG msg; + ULONG curr_ms = WinGetCurrentTime(hab); + const ULONG milliseconds_sleep_limit = curr_ms + ms; + + PDC_LOG(("PDC_napms() - called: ms=%d\n", ms)); + + /* Pump all pending messages from WIN32 to the window handler */ + while( !PDC_bDone && curr_ms < milliseconds_sleep_limit ) + { + const ULONG max_sleep_ms = 50; /* check msgs 20 times/second */ + ULONG sleep_millisecs; + + while( WinPeekMsg(hab, &msg, NULLHANDLE, 0, 0, PM_REMOVE) ) + WinDispatchMsg(hab, &msg); + curr_ms = WinGetCurrentTime(hab); + sleep_millisecs = milliseconds_sleep_limit - curr_ms; + if( sleep_millisecs > max_sleep_ms) + sleep_millisecs = max_sleep_ms; + DosSleep( sleep_millisecs); + } +} + +const char *PDC_sysname(void) +{ + return "OS2GUI"; +} + +enum PDC_port PDC_port_val = PDC_PORT_WINGUI; diff --git a/os2gui/pdcwin.h b/os2gui/pdcwin.h new file mode 100644 index 00000000..6b5401c7 --- /dev/null +++ b/os2gui/pdcwin.h @@ -0,0 +1,106 @@ +/* Public Domain Curses */ + +/* $Id: pdcwin.h,v 1.6 2008/07/13 06:36:32 wmcbrine Exp $ */ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */ +#endif + +#if defined( PDC_FORCE_UTF8) && !defined( PDC_WIDE) + #define PDC_WIDE +#endif + +#ifdef PDC_WIDE + #if !defined( UNICODE) + # define UNICODE + #endif + #if !defined( _UNICODE) + # define _UNICODE + #endif +#endif + +#define INCL_PM +#define INCL_DOS +#include + +#if defined( GS_8BIT_INDICES) && defined( PDC_WIDE) + /* We only need the 'fallback font' for the wide-char version, */ + /* and it'll only work in Win2000 or later (earlier versions */ + /* lack the necessary GetFontUnicodeRanges() function.) Comment */ + /* out the following line if you're dealing with a really old */ + /* system, or just don't want to use a fallback font. */ + #define USE_FALLBACK_FONT +#endif + +/* Windows.h will #define MOUSE_MOVED to 0x1, which is what the +Windows API expects. In Curses, MOUSE_MOVED is a macro indicating +whether the mouse has moved, so we'd get a compiler warning that +we're re-defining MOUSE_MOVED. That warning may be a Good Thing in +your software, letting you know: "Be careful; in a Curses program, +MOUSE_MOVED won't have the same meaning it does in a 'real' Windows +program." + + But in building WinGUI itself, we're expecting the Curses +meaning for MOUSE_MOVED, and the compiler warning would just be +a nuisance. So we'll #undefine MOUSE_MOVED before getting to the +Curses definition : */ + +#undef MOUSE_MOVED +#include + +extern int PDC_get_buffer_rows(void); + +/* The following probably ought to go into 'curses.h' at some point. */ +/* Or at least, not be here; this is a temporary place for them. */ + +/* WinGUI has some drastically extended cursor possibilities. The +following #defines can be used with curs_set(). For all other flavors +of PDCurses, only the invisible, "normal", and "intense" cursor +states will be recognized. In Win32, caret, half-block, central +block, cross, and outlined block cursors are available. + + By default, all such cursors will blink. However, in WinGUI, +the input value to curs_set() is treated as a two-byte value, with +the cursor blinking between those two states. For example, +curs_set( 0x0102) would blink between a "normal" (underline) cursor and +an "intense" (full-block) cursor. One can see that this behavior is +backward-compatible; for example, curs_set( 1) would blink between a +"normal" underline cursor and an invisible cursor. (But curs_set( 0x0101) +would result in a non-blinking underline cursor.) Note that one can use +the PDC_CURSOR macro for this, as in... + + curs_set( PDC_CURSOR( PDC_CURSOR_OUTLINE, PDC_CURSOR_INTENSE)); */ + +#define PDC_CURSOR_INVISIBLE 0x00 +#define PDC_CURSOR_NORMAL 0x01 +#define PDC_CURSOR_INTENSE 0x02 +#define PDC_CURSOR_OUTLINE 0x03 +#define PDC_CURSOR_CARET 0x04 +#define PDC_CURSOR_HALF_BLOCK 0x05 +#define PDC_CURSOR_CENTRAL_BLOCK 0x06 +#define PDC_CURSOR_CROSS 0x07 +#define PDC_CURSOR_OUTLINE_BLOCK 0x08 + +#define PDC_CURSOR( A, B) ((A)<<8 | (B)) +#define PDC_CURSOR_IS_BLINKING \ + ((SP->visibility >> 8) != (SP->visibility & 0xff)) + +#define KEY_QUEUE_SIZE 30 + +extern int PDC_key_queue_low, PDC_key_queue_high; +extern int PDC_key_queue[KEY_QUEUE_SIZE]; + +extern int PDC_n_rows, PDC_n_cols; +extern int PDC_cxChar, PDC_cyChar; +extern HWND PDC_hWnd; +extern bool PDC_bDone; + +extern char PDC_font_name[FACESIZE]; +extern int PDC_font_size; + +extern void PDC_set_font_box(HWND hwnd); +extern void PDC_setup_font(HPS hps); +extern void PDC_screen_to_pixel(int sx, int sy, RECTL *rect); +extern void PDC_pixel_to_screen(int px, int py, int *sx, int *sy); +extern int PDC_choose_a_new_font(char font[FACESIZE], int *fontsize); +extern int PDC_get_mouse_event_from_queue( void); diff --git a/os2gui/table.py b/os2gui/table.py new file mode 100755 index 00000000..6044df36 --- /dev/null +++ b/os2gui/table.py @@ -0,0 +1,112 @@ +#!/usr/bin/env python + +class UnicodeData: + """Parser for the UnicodeData.txt file""" + + def __init__(self, path): + self.path = path + + def __iter__(self): + return UnicodeData.UnicodeDataIterator(self.path) + + class UnicodeDataIterator: + def __init__(self, path): + self.file = None + self.file = open(path, "r") + self.rec = None + self.first = None + self.last = None + self.current = None + + def __del__(self): + if self.file is not None: + self.file.close() + + def __next__(self): + if self.current is not None: + # Between a "First>" and a "Last>" line + tup = (self.current, self.rec) + if self.current >= self.last: + # End of range + self.current = None + else: + # Go to next + self.current += 1 + else: + line = self.file.readline() + if line == '': + raise StopIteration() + if line.endswith("\n"): + line = line[:-1] + rec = line.split(';') + codepoint = int(rec[0], 16) + if rec[1].endswith(' First>'): + self.rec = rec + self.first = codepoint + elif rec[1].endswith(' Last>'): + self.last = codepoint + rec = self.rec + codepoint = self.first + 1 + self.current = self.first + 2 + if self.current > self.last: + self.current = None + tup = (codepoint, rec) + return tup + +combining = {} +decompose = {} +compose = {} +exclude = set() + +for cp, rec in UnicodeData("UnicodeData.txt"): + cclass = int(rec[3]) + if cclass != 0: + combining[cp] = cclass + + if rec[5] != "" and not rec[5].startswith('<'): + comp = tuple(map(lambda x: int(x, 16), rec[5].split(' '))) + decompose[cp] = comp + if len(comp) == 2: + compose[comp] = cp + +with open('CompositionExclusions.txt', 'r') as file: + while True: + line = file.readline() + if line == '': + break + sharp = line.find('#') + if sharp != -1: + line = line[:sharp] + line = line.strip() + if line != '': + exclude.add(int(line, 16)) + +with open("unitable.h", "w") as file: + file.write("/* Generated by table.py from UnicodeData.txt and CompositionExclusions.txt */\n") + file.write("static const struct CClassTable cclass_table[] = {\n") + c = list(combining.keys()) + c.sort() + for cp in c: + file.write(" { 0x%04X, %d },\n" % (cp, combining[cp])) + file.write("};\n") + file.write("\n") + + file.write("static const struct DecompTable decomp_table[] = {\n") + d = list(decompose.keys()) + d.sort() + for cp in d: + comp = decompose[cp] + comp0 = comp[0] + comp1 = comp[1] if len(comp) > 1 else 0 + file.write(" { 0x%04X, 0x%04X, 0x%04X },\n" % ( cp, comp0, comp1 )) + file.write("};\n") + file.write("\n") + + file.write("static const struct CompTable comp_table[] = {\n") + c = list(compose.keys()) + c.sort() + for comp in c: + cp = compose[comp] + if not (cp in exclude or cp in combining or comp[0] in combining): + file.write(" { 0x%04X, 0x%04X, 0x%04X },\n" % ( comp[0], comp[1], cp )) + file.write("};\n") diff --git a/os2gui/unitable.h b/os2gui/unitable.h new file mode 100644 index 00000000..6aba362f --- /dev/null +++ b/os2gui/unitable.h @@ -0,0 +1,3933 @@ +/* Generated by table.py from UnicodeData.txt and CompositionExclusions.txt */ +static const struct CClassTable cclass_table[] = { + { 0x0300, 230 }, + { 0x0301, 230 }, + { 0x0302, 230 }, + { 0x0303, 230 }, + { 0x0304, 230 }, + { 0x0305, 230 }, + { 0x0306, 230 }, + { 0x0307, 230 }, + { 0x0308, 230 }, + { 0x0309, 230 }, + { 0x030A, 230 }, + { 0x030B, 230 }, + { 0x030C, 230 }, + { 0x030D, 230 }, + { 0x030E, 230 }, + { 0x030F, 230 }, + { 0x0310, 230 }, + { 0x0311, 230 }, + { 0x0312, 230 }, + { 0x0313, 230 }, + { 0x0314, 230 }, + { 0x0315, 232 }, + { 0x0316, 220 }, + { 0x0317, 220 }, + { 0x0318, 220 }, + { 0x0319, 220 }, + { 0x031A, 232 }, + { 0x031B, 216 }, + { 0x031C, 220 }, + { 0x031D, 220 }, + { 0x031E, 220 }, + { 0x031F, 220 }, + { 0x0320, 220 }, + { 0x0321, 202 }, + { 0x0322, 202 }, + { 0x0323, 220 }, + { 0x0324, 220 }, + { 0x0325, 220 }, + { 0x0326, 220 }, + { 0x0327, 202 }, + { 0x0328, 202 }, + { 0x0329, 220 }, + { 0x032A, 220 }, + { 0x032B, 220 }, + { 0x032C, 220 }, + { 0x032D, 220 }, + { 0x032E, 220 }, + { 0x032F, 220 }, + { 0x0330, 220 }, + { 0x0331, 220 }, + { 0x0332, 220 }, + { 0x0333, 220 }, + { 0x0334, 1 }, + { 0x0335, 1 }, + { 0x0336, 1 }, + { 0x0337, 1 }, + { 0x0338, 1 }, + { 0x0339, 220 }, + { 0x033A, 220 }, + { 0x033B, 220 }, + { 0x033C, 220 }, + { 0x033D, 230 }, + { 0x033E, 230 }, + { 0x033F, 230 }, + { 0x0340, 230 }, + { 0x0341, 230 }, + { 0x0342, 230 }, + { 0x0343, 230 }, + { 0x0344, 230 }, + { 0x0345, 240 }, + { 0x0346, 230 }, + { 0x0347, 220 }, + { 0x0348, 220 }, + { 0x0349, 220 }, + { 0x034A, 230 }, + { 0x034B, 230 }, + { 0x034C, 230 }, + { 0x034D, 220 }, + { 0x034E, 220 }, + { 0x0350, 230 }, + { 0x0351, 230 }, + { 0x0352, 230 }, + { 0x0353, 220 }, + { 0x0354, 220 }, + { 0x0355, 220 }, + { 0x0356, 220 }, + { 0x0357, 230 }, + { 0x0358, 232 }, + { 0x0359, 220 }, + { 0x035A, 220 }, + { 0x035B, 230 }, + { 0x035C, 233 }, + { 0x035D, 234 }, + { 0x035E, 234 }, + { 0x035F, 233 }, + { 0x0360, 234 }, + { 0x0361, 234 }, + { 0x0362, 233 }, + { 0x0363, 230 }, + { 0x0364, 230 }, + { 0x0365, 230 }, + { 0x0366, 230 }, + { 0x0367, 230 }, + { 0x0368, 230 }, + { 0x0369, 230 }, + { 0x036A, 230 }, + { 0x036B, 230 }, + { 0x036C, 230 }, + { 0x036D, 230 }, + { 0x036E, 230 }, + { 0x036F, 230 }, + { 0x0483, 230 }, + { 0x0484, 230 }, + { 0x0485, 230 }, + { 0x0486, 230 }, + { 0x0487, 230 }, + { 0x0591, 220 }, + { 0x0592, 230 }, + { 0x0593, 230 }, + { 0x0594, 230 }, + { 0x0595, 230 }, + { 0x0596, 220 }, + { 0x0597, 230 }, + { 0x0598, 230 }, + { 0x0599, 230 }, + { 0x059A, 222 }, + { 0x059B, 220 }, + { 0x059C, 230 }, + { 0x059D, 230 }, + { 0x059E, 230 }, + { 0x059F, 230 }, + { 0x05A0, 230 }, + { 0x05A1, 230 }, + { 0x05A2, 220 }, + { 0x05A3, 220 }, + { 0x05A4, 220 }, + { 0x05A5, 220 }, + { 0x05A6, 220 }, + { 0x05A7, 220 }, + { 0x05A8, 230 }, + { 0x05A9, 230 }, + { 0x05AA, 220 }, + { 0x05AB, 230 }, + { 0x05AC, 230 }, + { 0x05AD, 222 }, + { 0x05AE, 228 }, + { 0x05AF, 230 }, + { 0x05B0, 10 }, + { 0x05B1, 11 }, + { 0x05B2, 12 }, + { 0x05B3, 13 }, + { 0x05B4, 14 }, + { 0x05B5, 15 }, + { 0x05B6, 16 }, + { 0x05B7, 17 }, + { 0x05B8, 18 }, + { 0x05B9, 19 }, + { 0x05BA, 19 }, + { 0x05BB, 20 }, + { 0x05BC, 21 }, + { 0x05BD, 22 }, + { 0x05BF, 23 }, + { 0x05C1, 24 }, + { 0x05C2, 25 }, + { 0x05C4, 230 }, + { 0x05C5, 220 }, + { 0x05C7, 18 }, + { 0x0610, 230 }, + { 0x0611, 230 }, + { 0x0612, 230 }, + { 0x0613, 230 }, + { 0x0614, 230 }, + { 0x0615, 230 }, + { 0x0616, 230 }, + { 0x0617, 230 }, + { 0x0618, 30 }, + { 0x0619, 31 }, + { 0x061A, 32 }, + { 0x064B, 27 }, + { 0x064C, 28 }, + { 0x064D, 29 }, + { 0x064E, 30 }, + { 0x064F, 31 }, + { 0x0650, 32 }, + { 0x0651, 33 }, + { 0x0652, 34 }, + { 0x0653, 230 }, + { 0x0654, 230 }, + { 0x0655, 220 }, + { 0x0656, 220 }, + { 0x0657, 230 }, + { 0x0658, 230 }, + { 0x0659, 230 }, + { 0x065A, 230 }, + { 0x065B, 230 }, + { 0x065C, 220 }, + { 0x065D, 230 }, + { 0x065E, 230 }, + { 0x065F, 220 }, + { 0x0670, 35 }, + { 0x06D6, 230 }, + { 0x06D7, 230 }, + { 0x06D8, 230 }, + { 0x06D9, 230 }, + { 0x06DA, 230 }, + { 0x06DB, 230 }, + { 0x06DC, 230 }, + { 0x06DF, 230 }, + { 0x06E0, 230 }, + { 0x06E1, 230 }, + { 0x06E2, 230 }, + { 0x06E3, 220 }, + { 0x06E4, 230 }, + { 0x06E7, 230 }, + { 0x06E8, 230 }, + { 0x06EA, 220 }, + { 0x06EB, 230 }, + { 0x06EC, 230 }, + { 0x06ED, 220 }, + { 0x0711, 36 }, + { 0x0730, 230 }, + { 0x0731, 220 }, + { 0x0732, 230 }, + { 0x0733, 230 }, + { 0x0734, 220 }, + { 0x0735, 230 }, + { 0x0736, 230 }, + { 0x0737, 220 }, + { 0x0738, 220 }, + { 0x0739, 220 }, + { 0x073A, 230 }, + { 0x073B, 220 }, + { 0x073C, 220 }, + { 0x073D, 230 }, + { 0x073E, 220 }, + { 0x073F, 230 }, + { 0x0740, 230 }, + { 0x0741, 230 }, + { 0x0742, 220 }, + { 0x0743, 230 }, + { 0x0744, 220 }, + { 0x0745, 230 }, + { 0x0746, 220 }, + { 0x0747, 230 }, + { 0x0748, 220 }, + { 0x0749, 230 }, + { 0x074A, 230 }, + { 0x07EB, 230 }, + { 0x07EC, 230 }, + { 0x07ED, 230 }, + { 0x07EE, 230 }, + { 0x07EF, 230 }, + { 0x07F0, 230 }, + { 0x07F1, 230 }, + { 0x07F2, 220 }, + { 0x07F3, 230 }, + { 0x07FD, 220 }, + { 0x0816, 230 }, + { 0x0817, 230 }, + { 0x0818, 230 }, + { 0x0819, 230 }, + { 0x081B, 230 }, + { 0x081C, 230 }, + { 0x081D, 230 }, + { 0x081E, 230 }, + { 0x081F, 230 }, + { 0x0820, 230 }, + { 0x0821, 230 }, + { 0x0822, 230 }, + { 0x0823, 230 }, + { 0x0825, 230 }, + { 0x0826, 230 }, + { 0x0827, 230 }, + { 0x0829, 230 }, + { 0x082A, 230 }, + { 0x082B, 230 }, + { 0x082C, 230 }, + { 0x082D, 230 }, + { 0x0859, 220 }, + { 0x085A, 220 }, + { 0x085B, 220 }, + { 0x0898, 230 }, + { 0x0899, 220 }, + { 0x089A, 220 }, + { 0x089B, 220 }, + { 0x089C, 230 }, + { 0x089D, 230 }, + { 0x089E, 230 }, + { 0x089F, 230 }, + { 0x08CA, 230 }, + { 0x08CB, 230 }, + { 0x08CC, 230 }, + { 0x08CD, 230 }, + { 0x08CE, 230 }, + { 0x08CF, 220 }, + { 0x08D0, 220 }, + { 0x08D1, 220 }, + { 0x08D2, 220 }, + { 0x08D3, 220 }, + { 0x08D4, 230 }, + { 0x08D5, 230 }, + { 0x08D6, 230 }, + { 0x08D7, 230 }, + { 0x08D8, 230 }, + { 0x08D9, 230 }, + { 0x08DA, 230 }, + { 0x08DB, 230 }, + { 0x08DC, 230 }, + { 0x08DD, 230 }, + { 0x08DE, 230 }, + { 0x08DF, 230 }, + { 0x08E0, 230 }, + { 0x08E1, 230 }, + { 0x08E3, 220 }, + { 0x08E4, 230 }, + { 0x08E5, 230 }, + { 0x08E6, 220 }, + { 0x08E7, 230 }, + { 0x08E8, 230 }, + { 0x08E9, 220 }, + { 0x08EA, 230 }, + { 0x08EB, 230 }, + { 0x08EC, 230 }, + { 0x08ED, 220 }, + { 0x08EE, 220 }, + { 0x08EF, 220 }, + { 0x08F0, 27 }, + { 0x08F1, 28 }, + { 0x08F2, 29 }, + { 0x08F3, 230 }, + { 0x08F4, 230 }, + { 0x08F5, 230 }, + { 0x08F6, 220 }, + { 0x08F7, 230 }, + { 0x08F8, 230 }, + { 0x08F9, 220 }, + { 0x08FA, 220 }, + { 0x08FB, 230 }, + { 0x08FC, 230 }, + { 0x08FD, 230 }, + { 0x08FE, 230 }, + { 0x08FF, 230 }, + { 0x093C, 7 }, + { 0x094D, 9 }, + { 0x0951, 230 }, + { 0x0952, 220 }, + { 0x0953, 230 }, + { 0x0954, 230 }, + { 0x09BC, 7 }, + { 0x09CD, 9 }, + { 0x09FE, 230 }, + { 0x0A3C, 7 }, + { 0x0A4D, 9 }, + { 0x0ABC, 7 }, + { 0x0ACD, 9 }, + { 0x0B3C, 7 }, + { 0x0B4D, 9 }, + { 0x0BCD, 9 }, + { 0x0C3C, 7 }, + { 0x0C4D, 9 }, + { 0x0C55, 84 }, + { 0x0C56, 91 }, + { 0x0CBC, 7 }, + { 0x0CCD, 9 }, + { 0x0D3B, 9 }, + { 0x0D3C, 9 }, + { 0x0D4D, 9 }, + { 0x0DCA, 9 }, + { 0x0E38, 103 }, + { 0x0E39, 103 }, + { 0x0E3A, 9 }, + { 0x0E48, 107 }, + { 0x0E49, 107 }, + { 0x0E4A, 107 }, + { 0x0E4B, 107 }, + { 0x0EB8, 118 }, + { 0x0EB9, 118 }, + { 0x0EBA, 9 }, + { 0x0EC8, 122 }, + { 0x0EC9, 122 }, + { 0x0ECA, 122 }, + { 0x0ECB, 122 }, + { 0x0F18, 220 }, + { 0x0F19, 220 }, + { 0x0F35, 220 }, + { 0x0F37, 220 }, + { 0x0F39, 216 }, + { 0x0F71, 129 }, + { 0x0F72, 130 }, + { 0x0F74, 132 }, + { 0x0F7A, 130 }, + { 0x0F7B, 130 }, + { 0x0F7C, 130 }, + { 0x0F7D, 130 }, + { 0x0F80, 130 }, + { 0x0F82, 230 }, + { 0x0F83, 230 }, + { 0x0F84, 9 }, + { 0x0F86, 230 }, + { 0x0F87, 230 }, + { 0x0FC6, 220 }, + { 0x1037, 7 }, + { 0x1039, 9 }, + { 0x103A, 9 }, + { 0x108D, 220 }, + { 0x135D, 230 }, + { 0x135E, 230 }, + { 0x135F, 230 }, + { 0x1714, 9 }, + { 0x1715, 9 }, + { 0x1734, 9 }, + { 0x17D2, 9 }, + { 0x17DD, 230 }, + { 0x18A9, 228 }, + { 0x1939, 222 }, + { 0x193A, 230 }, + { 0x193B, 220 }, + { 0x1A17, 230 }, + { 0x1A18, 220 }, + { 0x1A60, 9 }, + { 0x1A75, 230 }, + { 0x1A76, 230 }, + { 0x1A77, 230 }, + { 0x1A78, 230 }, + { 0x1A79, 230 }, + { 0x1A7A, 230 }, + { 0x1A7B, 230 }, + { 0x1A7C, 230 }, + { 0x1A7F, 220 }, + { 0x1AB0, 230 }, + { 0x1AB1, 230 }, + { 0x1AB2, 230 }, + { 0x1AB3, 230 }, + { 0x1AB4, 230 }, + { 0x1AB5, 220 }, + { 0x1AB6, 220 }, + { 0x1AB7, 220 }, + { 0x1AB8, 220 }, + { 0x1AB9, 220 }, + { 0x1ABA, 220 }, + { 0x1ABB, 230 }, + { 0x1ABC, 230 }, + { 0x1ABD, 220 }, + { 0x1ABF, 220 }, + { 0x1AC0, 220 }, + { 0x1AC1, 230 }, + { 0x1AC2, 230 }, + { 0x1AC3, 220 }, + { 0x1AC4, 220 }, + { 0x1AC5, 230 }, + { 0x1AC6, 230 }, + { 0x1AC7, 230 }, + { 0x1AC8, 230 }, + { 0x1AC9, 230 }, + { 0x1ACA, 220 }, + { 0x1ACB, 230 }, + { 0x1ACC, 230 }, + { 0x1ACD, 230 }, + { 0x1ACE, 230 }, + { 0x1B34, 7 }, + { 0x1B44, 9 }, + { 0x1B6B, 230 }, + { 0x1B6C, 220 }, + { 0x1B6D, 230 }, + { 0x1B6E, 230 }, + { 0x1B6F, 230 }, + { 0x1B70, 230 }, + { 0x1B71, 230 }, + { 0x1B72, 230 }, + { 0x1B73, 230 }, + { 0x1BAA, 9 }, + { 0x1BAB, 9 }, + { 0x1BE6, 7 }, + { 0x1BF2, 9 }, + { 0x1BF3, 9 }, + { 0x1C37, 7 }, + { 0x1CD0, 230 }, + { 0x1CD1, 230 }, + { 0x1CD2, 230 }, + { 0x1CD4, 1 }, + { 0x1CD5, 220 }, + { 0x1CD6, 220 }, + { 0x1CD7, 220 }, + { 0x1CD8, 220 }, + { 0x1CD9, 220 }, + { 0x1CDA, 230 }, + { 0x1CDB, 230 }, + { 0x1CDC, 220 }, + { 0x1CDD, 220 }, + { 0x1CDE, 220 }, + { 0x1CDF, 220 }, + { 0x1CE0, 230 }, + { 0x1CE2, 1 }, + { 0x1CE3, 1 }, + { 0x1CE4, 1 }, + { 0x1CE5, 1 }, + { 0x1CE6, 1 }, + { 0x1CE7, 1 }, + { 0x1CE8, 1 }, + { 0x1CED, 220 }, + { 0x1CF4, 230 }, + { 0x1CF8, 230 }, + { 0x1CF9, 230 }, + { 0x1DC0, 230 }, + { 0x1DC1, 230 }, + { 0x1DC2, 220 }, + { 0x1DC3, 230 }, + { 0x1DC4, 230 }, + { 0x1DC5, 230 }, + { 0x1DC6, 230 }, + { 0x1DC7, 230 }, + { 0x1DC8, 230 }, + { 0x1DC9, 230 }, + { 0x1DCA, 220 }, + { 0x1DCB, 230 }, + { 0x1DCC, 230 }, + { 0x1DCD, 234 }, + { 0x1DCE, 214 }, + { 0x1DCF, 220 }, + { 0x1DD0, 202 }, + { 0x1DD1, 230 }, + { 0x1DD2, 230 }, + { 0x1DD3, 230 }, + { 0x1DD4, 230 }, + { 0x1DD5, 230 }, + { 0x1DD6, 230 }, + { 0x1DD7, 230 }, + { 0x1DD8, 230 }, + { 0x1DD9, 230 }, + { 0x1DDA, 230 }, + { 0x1DDB, 230 }, + { 0x1DDC, 230 }, + { 0x1DDD, 230 }, + { 0x1DDE, 230 }, + { 0x1DDF, 230 }, + { 0x1DE0, 230 }, + { 0x1DE1, 230 }, + { 0x1DE2, 230 }, + { 0x1DE3, 230 }, + { 0x1DE4, 230 }, + { 0x1DE5, 230 }, + { 0x1DE6, 230 }, + { 0x1DE7, 230 }, + { 0x1DE8, 230 }, + { 0x1DE9, 230 }, + { 0x1DEA, 230 }, + { 0x1DEB, 230 }, + { 0x1DEC, 230 }, + { 0x1DED, 230 }, + { 0x1DEE, 230 }, + { 0x1DEF, 230 }, + { 0x1DF0, 230 }, + { 0x1DF1, 230 }, + { 0x1DF2, 230 }, + { 0x1DF3, 230 }, + { 0x1DF4, 230 }, + { 0x1DF5, 230 }, + { 0x1DF6, 232 }, + { 0x1DF7, 228 }, + { 0x1DF8, 228 }, + { 0x1DF9, 220 }, + { 0x1DFA, 218 }, + { 0x1DFB, 230 }, + { 0x1DFC, 233 }, + { 0x1DFD, 220 }, + { 0x1DFE, 230 }, + { 0x1DFF, 220 }, + { 0x20D0, 230 }, + { 0x20D1, 230 }, + { 0x20D2, 1 }, + { 0x20D3, 1 }, + { 0x20D4, 230 }, + { 0x20D5, 230 }, + { 0x20D6, 230 }, + { 0x20D7, 230 }, + { 0x20D8, 1 }, + { 0x20D9, 1 }, + { 0x20DA, 1 }, + { 0x20DB, 230 }, + { 0x20DC, 230 }, + { 0x20E1, 230 }, + { 0x20E5, 1 }, + { 0x20E6, 1 }, + { 0x20E7, 230 }, + { 0x20E8, 220 }, + { 0x20E9, 230 }, + { 0x20EA, 1 }, + { 0x20EB, 1 }, + { 0x20EC, 220 }, + { 0x20ED, 220 }, + { 0x20EE, 220 }, + { 0x20EF, 220 }, + { 0x20F0, 230 }, + { 0x2CEF, 230 }, + { 0x2CF0, 230 }, + { 0x2CF1, 230 }, + { 0x2D7F, 9 }, + { 0x2DE0, 230 }, + { 0x2DE1, 230 }, + { 0x2DE2, 230 }, + { 0x2DE3, 230 }, + { 0x2DE4, 230 }, + { 0x2DE5, 230 }, + { 0x2DE6, 230 }, + { 0x2DE7, 230 }, + { 0x2DE8, 230 }, + { 0x2DE9, 230 }, + { 0x2DEA, 230 }, + { 0x2DEB, 230 }, + { 0x2DEC, 230 }, + { 0x2DED, 230 }, + { 0x2DEE, 230 }, + { 0x2DEF, 230 }, + { 0x2DF0, 230 }, + { 0x2DF1, 230 }, + { 0x2DF2, 230 }, + { 0x2DF3, 230 }, + { 0x2DF4, 230 }, + { 0x2DF5, 230 }, + { 0x2DF6, 230 }, + { 0x2DF7, 230 }, + { 0x2DF8, 230 }, + { 0x2DF9, 230 }, + { 0x2DFA, 230 }, + { 0x2DFB, 230 }, + { 0x2DFC, 230 }, + { 0x2DFD, 230 }, + { 0x2DFE, 230 }, + { 0x2DFF, 230 }, + { 0x302A, 218 }, + { 0x302B, 228 }, + { 0x302C, 232 }, + { 0x302D, 222 }, + { 0x302E, 224 }, + { 0x302F, 224 }, + { 0x3099, 8 }, + { 0x309A, 8 }, + { 0xA66F, 230 }, + { 0xA674, 230 }, + { 0xA675, 230 }, + { 0xA676, 230 }, + { 0xA677, 230 }, + { 0xA678, 230 }, + { 0xA679, 230 }, + { 0xA67A, 230 }, + { 0xA67B, 230 }, + { 0xA67C, 230 }, + { 0xA67D, 230 }, + { 0xA69E, 230 }, + { 0xA69F, 230 }, + { 0xA6F0, 230 }, + { 0xA6F1, 230 }, + { 0xA806, 9 }, + { 0xA82C, 9 }, + { 0xA8C4, 9 }, + { 0xA8E0, 230 }, + { 0xA8E1, 230 }, + { 0xA8E2, 230 }, + { 0xA8E3, 230 }, + { 0xA8E4, 230 }, + { 0xA8E5, 230 }, + { 0xA8E6, 230 }, + { 0xA8E7, 230 }, + { 0xA8E8, 230 }, + { 0xA8E9, 230 }, + { 0xA8EA, 230 }, + { 0xA8EB, 230 }, + { 0xA8EC, 230 }, + { 0xA8ED, 230 }, + { 0xA8EE, 230 }, + { 0xA8EF, 230 }, + { 0xA8F0, 230 }, + { 0xA8F1, 230 }, + { 0xA92B, 220 }, + { 0xA92C, 220 }, + { 0xA92D, 220 }, + { 0xA953, 9 }, + { 0xA9B3, 7 }, + { 0xA9C0, 9 }, + { 0xAAB0, 230 }, + { 0xAAB2, 230 }, + { 0xAAB3, 230 }, + { 0xAAB4, 220 }, + { 0xAAB7, 230 }, + { 0xAAB8, 230 }, + { 0xAABE, 230 }, + { 0xAABF, 230 }, + { 0xAAC1, 230 }, + { 0xAAF6, 9 }, + { 0xABED, 9 }, + { 0xFB1E, 26 }, + { 0xFE20, 230 }, + { 0xFE21, 230 }, + { 0xFE22, 230 }, + { 0xFE23, 230 }, + { 0xFE24, 230 }, + { 0xFE25, 230 }, + { 0xFE26, 230 }, + { 0xFE27, 220 }, + { 0xFE28, 220 }, + { 0xFE29, 220 }, + { 0xFE2A, 220 }, + { 0xFE2B, 220 }, + { 0xFE2C, 220 }, + { 0xFE2D, 220 }, + { 0xFE2E, 230 }, + { 0xFE2F, 230 }, + { 0x101FD, 220 }, + { 0x102E0, 220 }, + { 0x10376, 230 }, + { 0x10377, 230 }, + { 0x10378, 230 }, + { 0x10379, 230 }, + { 0x1037A, 230 }, + { 0x10A0D, 220 }, + { 0x10A0F, 230 }, + { 0x10A38, 230 }, + { 0x10A39, 1 }, + { 0x10A3A, 220 }, + { 0x10A3F, 9 }, + { 0x10AE5, 230 }, + { 0x10AE6, 220 }, + { 0x10D24, 230 }, + { 0x10D25, 230 }, + { 0x10D26, 230 }, + { 0x10D27, 230 }, + { 0x10EAB, 230 }, + { 0x10EAC, 230 }, + { 0x10EFD, 220 }, + { 0x10EFE, 220 }, + { 0x10EFF, 220 }, + { 0x10F46, 220 }, + { 0x10F47, 220 }, + { 0x10F48, 230 }, + { 0x10F49, 230 }, + { 0x10F4A, 230 }, + { 0x10F4B, 220 }, + { 0x10F4C, 230 }, + { 0x10F4D, 220 }, + { 0x10F4E, 220 }, + { 0x10F4F, 220 }, + { 0x10F50, 220 }, + { 0x10F82, 230 }, + { 0x10F83, 220 }, + { 0x10F84, 230 }, + { 0x10F85, 220 }, + { 0x11046, 9 }, + { 0x11070, 9 }, + { 0x1107F, 9 }, + { 0x110B9, 9 }, + { 0x110BA, 7 }, + { 0x11100, 230 }, + { 0x11101, 230 }, + { 0x11102, 230 }, + { 0x11133, 9 }, + { 0x11134, 9 }, + { 0x11173, 7 }, + { 0x111C0, 9 }, + { 0x111CA, 7 }, + { 0x11235, 9 }, + { 0x11236, 7 }, + { 0x112E9, 7 }, + { 0x112EA, 9 }, + { 0x1133B, 7 }, + { 0x1133C, 7 }, + { 0x1134D, 9 }, + { 0x11366, 230 }, + { 0x11367, 230 }, + { 0x11368, 230 }, + { 0x11369, 230 }, + { 0x1136A, 230 }, + { 0x1136B, 230 }, + { 0x1136C, 230 }, + { 0x11370, 230 }, + { 0x11371, 230 }, + { 0x11372, 230 }, + { 0x11373, 230 }, + { 0x11374, 230 }, + { 0x11442, 9 }, + { 0x11446, 7 }, + { 0x1145E, 230 }, + { 0x114C2, 9 }, + { 0x114C3, 7 }, + { 0x115BF, 9 }, + { 0x115C0, 7 }, + { 0x1163F, 9 }, + { 0x116B6, 9 }, + { 0x116B7, 7 }, + { 0x1172B, 9 }, + { 0x11839, 9 }, + { 0x1183A, 7 }, + { 0x1193D, 9 }, + { 0x1193E, 9 }, + { 0x11943, 7 }, + { 0x119E0, 9 }, + { 0x11A34, 9 }, + { 0x11A47, 9 }, + { 0x11A99, 9 }, + { 0x11C3F, 9 }, + { 0x11D42, 7 }, + { 0x11D44, 9 }, + { 0x11D45, 9 }, + { 0x11D97, 9 }, + { 0x11F41, 9 }, + { 0x11F42, 9 }, + { 0x16AF0, 1 }, + { 0x16AF1, 1 }, + { 0x16AF2, 1 }, + { 0x16AF3, 1 }, + { 0x16AF4, 1 }, + { 0x16B30, 230 }, + { 0x16B31, 230 }, + { 0x16B32, 230 }, + { 0x16B33, 230 }, + { 0x16B34, 230 }, + { 0x16B35, 230 }, + { 0x16B36, 230 }, + { 0x16FF0, 6 }, + { 0x16FF1, 6 }, + { 0x1BC9E, 1 }, + { 0x1D165, 216 }, + { 0x1D166, 216 }, + { 0x1D167, 1 }, + { 0x1D168, 1 }, + { 0x1D169, 1 }, + { 0x1D16D, 226 }, + { 0x1D16E, 216 }, + { 0x1D16F, 216 }, + { 0x1D170, 216 }, + { 0x1D171, 216 }, + { 0x1D172, 216 }, + { 0x1D17B, 220 }, + { 0x1D17C, 220 }, + { 0x1D17D, 220 }, + { 0x1D17E, 220 }, + { 0x1D17F, 220 }, + { 0x1D180, 220 }, + { 0x1D181, 220 }, + { 0x1D182, 220 }, + { 0x1D185, 230 }, + { 0x1D186, 230 }, + { 0x1D187, 230 }, + { 0x1D188, 230 }, + { 0x1D189, 230 }, + { 0x1D18A, 220 }, + { 0x1D18B, 220 }, + { 0x1D1AA, 230 }, + { 0x1D1AB, 230 }, + { 0x1D1AC, 230 }, + { 0x1D1AD, 230 }, + { 0x1D242, 230 }, + { 0x1D243, 230 }, + { 0x1D244, 230 }, + { 0x1E000, 230 }, + { 0x1E001, 230 }, + { 0x1E002, 230 }, + { 0x1E003, 230 }, + { 0x1E004, 230 }, + { 0x1E005, 230 }, + { 0x1E006, 230 }, + { 0x1E008, 230 }, + { 0x1E009, 230 }, + { 0x1E00A, 230 }, + { 0x1E00B, 230 }, + { 0x1E00C, 230 }, + { 0x1E00D, 230 }, + { 0x1E00E, 230 }, + { 0x1E00F, 230 }, + { 0x1E010, 230 }, + { 0x1E011, 230 }, + { 0x1E012, 230 }, + { 0x1E013, 230 }, + { 0x1E014, 230 }, + { 0x1E015, 230 }, + { 0x1E016, 230 }, + { 0x1E017, 230 }, + { 0x1E018, 230 }, + { 0x1E01B, 230 }, + { 0x1E01C, 230 }, + { 0x1E01D, 230 }, + { 0x1E01E, 230 }, + { 0x1E01F, 230 }, + { 0x1E020, 230 }, + { 0x1E021, 230 }, + { 0x1E023, 230 }, + { 0x1E024, 230 }, + { 0x1E026, 230 }, + { 0x1E027, 230 }, + { 0x1E028, 230 }, + { 0x1E029, 230 }, + { 0x1E02A, 230 }, + { 0x1E08F, 230 }, + { 0x1E130, 230 }, + { 0x1E131, 230 }, + { 0x1E132, 230 }, + { 0x1E133, 230 }, + { 0x1E134, 230 }, + { 0x1E135, 230 }, + { 0x1E136, 230 }, + { 0x1E2AE, 230 }, + { 0x1E2EC, 230 }, + { 0x1E2ED, 230 }, + { 0x1E2EE, 230 }, + { 0x1E2EF, 230 }, + { 0x1E4EC, 232 }, + { 0x1E4ED, 232 }, + { 0x1E4EE, 220 }, + { 0x1E4EF, 230 }, + { 0x1E8D0, 220 }, + { 0x1E8D1, 220 }, + { 0x1E8D2, 220 }, + { 0x1E8D3, 220 }, + { 0x1E8D4, 220 }, + { 0x1E8D5, 220 }, + { 0x1E8D6, 220 }, + { 0x1E944, 230 }, + { 0x1E945, 230 }, + { 0x1E946, 230 }, + { 0x1E947, 230 }, + { 0x1E948, 230 }, + { 0x1E949, 230 }, + { 0x1E94A, 7 }, +}; + +static const struct DecompTable decomp_table[] = { + { 0x00C0, 0x0041, 0x0300 }, + { 0x00C1, 0x0041, 0x0301 }, + { 0x00C2, 0x0041, 0x0302 }, + { 0x00C3, 0x0041, 0x0303 }, + { 0x00C4, 0x0041, 0x0308 }, + { 0x00C5, 0x0041, 0x030A }, + { 0x00C7, 0x0043, 0x0327 }, + { 0x00C8, 0x0045, 0x0300 }, + { 0x00C9, 0x0045, 0x0301 }, + { 0x00CA, 0x0045, 0x0302 }, + { 0x00CB, 0x0045, 0x0308 }, + { 0x00CC, 0x0049, 0x0300 }, + { 0x00CD, 0x0049, 0x0301 }, + { 0x00CE, 0x0049, 0x0302 }, + { 0x00CF, 0x0049, 0x0308 }, + { 0x00D1, 0x004E, 0x0303 }, + { 0x00D2, 0x004F, 0x0300 }, + { 0x00D3, 0x004F, 0x0301 }, + { 0x00D4, 0x004F, 0x0302 }, + { 0x00D5, 0x004F, 0x0303 }, + { 0x00D6, 0x004F, 0x0308 }, + { 0x00D9, 0x0055, 0x0300 }, + { 0x00DA, 0x0055, 0x0301 }, + { 0x00DB, 0x0055, 0x0302 }, + { 0x00DC, 0x0055, 0x0308 }, + { 0x00DD, 0x0059, 0x0301 }, + { 0x00E0, 0x0061, 0x0300 }, + { 0x00E1, 0x0061, 0x0301 }, + { 0x00E2, 0x0061, 0x0302 }, + { 0x00E3, 0x0061, 0x0303 }, + { 0x00E4, 0x0061, 0x0308 }, + { 0x00E5, 0x0061, 0x030A }, + { 0x00E7, 0x0063, 0x0327 }, + { 0x00E8, 0x0065, 0x0300 }, + { 0x00E9, 0x0065, 0x0301 }, + { 0x00EA, 0x0065, 0x0302 }, + { 0x00EB, 0x0065, 0x0308 }, + { 0x00EC, 0x0069, 0x0300 }, + { 0x00ED, 0x0069, 0x0301 }, + { 0x00EE, 0x0069, 0x0302 }, + { 0x00EF, 0x0069, 0x0308 }, + { 0x00F1, 0x006E, 0x0303 }, + { 0x00F2, 0x006F, 0x0300 }, + { 0x00F3, 0x006F, 0x0301 }, + { 0x00F4, 0x006F, 0x0302 }, + { 0x00F5, 0x006F, 0x0303 }, + { 0x00F6, 0x006F, 0x0308 }, + { 0x00F9, 0x0075, 0x0300 }, + { 0x00FA, 0x0075, 0x0301 }, + { 0x00FB, 0x0075, 0x0302 }, + { 0x00FC, 0x0075, 0x0308 }, + { 0x00FD, 0x0079, 0x0301 }, + { 0x00FF, 0x0079, 0x0308 }, + { 0x0100, 0x0041, 0x0304 }, + { 0x0101, 0x0061, 0x0304 }, + { 0x0102, 0x0041, 0x0306 }, + { 0x0103, 0x0061, 0x0306 }, + { 0x0104, 0x0041, 0x0328 }, + { 0x0105, 0x0061, 0x0328 }, + { 0x0106, 0x0043, 0x0301 }, + { 0x0107, 0x0063, 0x0301 }, + { 0x0108, 0x0043, 0x0302 }, + { 0x0109, 0x0063, 0x0302 }, + { 0x010A, 0x0043, 0x0307 }, + { 0x010B, 0x0063, 0x0307 }, + { 0x010C, 0x0043, 0x030C }, + { 0x010D, 0x0063, 0x030C }, + { 0x010E, 0x0044, 0x030C }, + { 0x010F, 0x0064, 0x030C }, + { 0x0112, 0x0045, 0x0304 }, + { 0x0113, 0x0065, 0x0304 }, + { 0x0114, 0x0045, 0x0306 }, + { 0x0115, 0x0065, 0x0306 }, + { 0x0116, 0x0045, 0x0307 }, + { 0x0117, 0x0065, 0x0307 }, + { 0x0118, 0x0045, 0x0328 }, + { 0x0119, 0x0065, 0x0328 }, + { 0x011A, 0x0045, 0x030C }, + { 0x011B, 0x0065, 0x030C }, + { 0x011C, 0x0047, 0x0302 }, + { 0x011D, 0x0067, 0x0302 }, + { 0x011E, 0x0047, 0x0306 }, + { 0x011F, 0x0067, 0x0306 }, + { 0x0120, 0x0047, 0x0307 }, + { 0x0121, 0x0067, 0x0307 }, + { 0x0122, 0x0047, 0x0327 }, + { 0x0123, 0x0067, 0x0327 }, + { 0x0124, 0x0048, 0x0302 }, + { 0x0125, 0x0068, 0x0302 }, + { 0x0128, 0x0049, 0x0303 }, + { 0x0129, 0x0069, 0x0303 }, + { 0x012A, 0x0049, 0x0304 }, + { 0x012B, 0x0069, 0x0304 }, + { 0x012C, 0x0049, 0x0306 }, + { 0x012D, 0x0069, 0x0306 }, + { 0x012E, 0x0049, 0x0328 }, + { 0x012F, 0x0069, 0x0328 }, + { 0x0130, 0x0049, 0x0307 }, + { 0x0134, 0x004A, 0x0302 }, + { 0x0135, 0x006A, 0x0302 }, + { 0x0136, 0x004B, 0x0327 }, + { 0x0137, 0x006B, 0x0327 }, + { 0x0139, 0x004C, 0x0301 }, + { 0x013A, 0x006C, 0x0301 }, + { 0x013B, 0x004C, 0x0327 }, + { 0x013C, 0x006C, 0x0327 }, + { 0x013D, 0x004C, 0x030C }, + { 0x013E, 0x006C, 0x030C }, + { 0x0143, 0x004E, 0x0301 }, + { 0x0144, 0x006E, 0x0301 }, + { 0x0145, 0x004E, 0x0327 }, + { 0x0146, 0x006E, 0x0327 }, + { 0x0147, 0x004E, 0x030C }, + { 0x0148, 0x006E, 0x030C }, + { 0x014C, 0x004F, 0x0304 }, + { 0x014D, 0x006F, 0x0304 }, + { 0x014E, 0x004F, 0x0306 }, + { 0x014F, 0x006F, 0x0306 }, + { 0x0150, 0x004F, 0x030B }, + { 0x0151, 0x006F, 0x030B }, + { 0x0154, 0x0052, 0x0301 }, + { 0x0155, 0x0072, 0x0301 }, + { 0x0156, 0x0052, 0x0327 }, + { 0x0157, 0x0072, 0x0327 }, + { 0x0158, 0x0052, 0x030C }, + { 0x0159, 0x0072, 0x030C }, + { 0x015A, 0x0053, 0x0301 }, + { 0x015B, 0x0073, 0x0301 }, + { 0x015C, 0x0053, 0x0302 }, + { 0x015D, 0x0073, 0x0302 }, + { 0x015E, 0x0053, 0x0327 }, + { 0x015F, 0x0073, 0x0327 }, + { 0x0160, 0x0053, 0x030C }, + { 0x0161, 0x0073, 0x030C }, + { 0x0162, 0x0054, 0x0327 }, + { 0x0163, 0x0074, 0x0327 }, + { 0x0164, 0x0054, 0x030C }, + { 0x0165, 0x0074, 0x030C }, + { 0x0168, 0x0055, 0x0303 }, + { 0x0169, 0x0075, 0x0303 }, + { 0x016A, 0x0055, 0x0304 }, + { 0x016B, 0x0075, 0x0304 }, + { 0x016C, 0x0055, 0x0306 }, + { 0x016D, 0x0075, 0x0306 }, + { 0x016E, 0x0055, 0x030A }, + { 0x016F, 0x0075, 0x030A }, + { 0x0170, 0x0055, 0x030B }, + { 0x0171, 0x0075, 0x030B }, + { 0x0172, 0x0055, 0x0328 }, + { 0x0173, 0x0075, 0x0328 }, + { 0x0174, 0x0057, 0x0302 }, + { 0x0175, 0x0077, 0x0302 }, + { 0x0176, 0x0059, 0x0302 }, + { 0x0177, 0x0079, 0x0302 }, + { 0x0178, 0x0059, 0x0308 }, + { 0x0179, 0x005A, 0x0301 }, + { 0x017A, 0x007A, 0x0301 }, + { 0x017B, 0x005A, 0x0307 }, + { 0x017C, 0x007A, 0x0307 }, + { 0x017D, 0x005A, 0x030C }, + { 0x017E, 0x007A, 0x030C }, + { 0x01A0, 0x004F, 0x031B }, + { 0x01A1, 0x006F, 0x031B }, + { 0x01AF, 0x0055, 0x031B }, + { 0x01B0, 0x0075, 0x031B }, + { 0x01CD, 0x0041, 0x030C }, + { 0x01CE, 0x0061, 0x030C }, + { 0x01CF, 0x0049, 0x030C }, + { 0x01D0, 0x0069, 0x030C }, + { 0x01D1, 0x004F, 0x030C }, + { 0x01D2, 0x006F, 0x030C }, + { 0x01D3, 0x0055, 0x030C }, + { 0x01D4, 0x0075, 0x030C }, + { 0x01D5, 0x00DC, 0x0304 }, + { 0x01D6, 0x00FC, 0x0304 }, + { 0x01D7, 0x00DC, 0x0301 }, + { 0x01D8, 0x00FC, 0x0301 }, + { 0x01D9, 0x00DC, 0x030C }, + { 0x01DA, 0x00FC, 0x030C }, + { 0x01DB, 0x00DC, 0x0300 }, + { 0x01DC, 0x00FC, 0x0300 }, + { 0x01DE, 0x00C4, 0x0304 }, + { 0x01DF, 0x00E4, 0x0304 }, + { 0x01E0, 0x0226, 0x0304 }, + { 0x01E1, 0x0227, 0x0304 }, + { 0x01E2, 0x00C6, 0x0304 }, + { 0x01E3, 0x00E6, 0x0304 }, + { 0x01E6, 0x0047, 0x030C }, + { 0x01E7, 0x0067, 0x030C }, + { 0x01E8, 0x004B, 0x030C }, + { 0x01E9, 0x006B, 0x030C }, + { 0x01EA, 0x004F, 0x0328 }, + { 0x01EB, 0x006F, 0x0328 }, + { 0x01EC, 0x01EA, 0x0304 }, + { 0x01ED, 0x01EB, 0x0304 }, + { 0x01EE, 0x01B7, 0x030C }, + { 0x01EF, 0x0292, 0x030C }, + { 0x01F0, 0x006A, 0x030C }, + { 0x01F4, 0x0047, 0x0301 }, + { 0x01F5, 0x0067, 0x0301 }, + { 0x01F8, 0x004E, 0x0300 }, + { 0x01F9, 0x006E, 0x0300 }, + { 0x01FA, 0x00C5, 0x0301 }, + { 0x01FB, 0x00E5, 0x0301 }, + { 0x01FC, 0x00C6, 0x0301 }, + { 0x01FD, 0x00E6, 0x0301 }, + { 0x01FE, 0x00D8, 0x0301 }, + { 0x01FF, 0x00F8, 0x0301 }, + { 0x0200, 0x0041, 0x030F }, + { 0x0201, 0x0061, 0x030F }, + { 0x0202, 0x0041, 0x0311 }, + { 0x0203, 0x0061, 0x0311 }, + { 0x0204, 0x0045, 0x030F }, + { 0x0205, 0x0065, 0x030F }, + { 0x0206, 0x0045, 0x0311 }, + { 0x0207, 0x0065, 0x0311 }, + { 0x0208, 0x0049, 0x030F }, + { 0x0209, 0x0069, 0x030F }, + { 0x020A, 0x0049, 0x0311 }, + { 0x020B, 0x0069, 0x0311 }, + { 0x020C, 0x004F, 0x030F }, + { 0x020D, 0x006F, 0x030F }, + { 0x020E, 0x004F, 0x0311 }, + { 0x020F, 0x006F, 0x0311 }, + { 0x0210, 0x0052, 0x030F }, + { 0x0211, 0x0072, 0x030F }, + { 0x0212, 0x0052, 0x0311 }, + { 0x0213, 0x0072, 0x0311 }, + { 0x0214, 0x0055, 0x030F }, + { 0x0215, 0x0075, 0x030F }, + { 0x0216, 0x0055, 0x0311 }, + { 0x0217, 0x0075, 0x0311 }, + { 0x0218, 0x0053, 0x0326 }, + { 0x0219, 0x0073, 0x0326 }, + { 0x021A, 0x0054, 0x0326 }, + { 0x021B, 0x0074, 0x0326 }, + { 0x021E, 0x0048, 0x030C }, + { 0x021F, 0x0068, 0x030C }, + { 0x0226, 0x0041, 0x0307 }, + { 0x0227, 0x0061, 0x0307 }, + { 0x0228, 0x0045, 0x0327 }, + { 0x0229, 0x0065, 0x0327 }, + { 0x022A, 0x00D6, 0x0304 }, + { 0x022B, 0x00F6, 0x0304 }, + { 0x022C, 0x00D5, 0x0304 }, + { 0x022D, 0x00F5, 0x0304 }, + { 0x022E, 0x004F, 0x0307 }, + { 0x022F, 0x006F, 0x0307 }, + { 0x0230, 0x022E, 0x0304 }, + { 0x0231, 0x022F, 0x0304 }, + { 0x0232, 0x0059, 0x0304 }, + { 0x0233, 0x0079, 0x0304 }, + { 0x0340, 0x0300, 0x0000 }, + { 0x0341, 0x0301, 0x0000 }, + { 0x0343, 0x0313, 0x0000 }, + { 0x0344, 0x0308, 0x0301 }, + { 0x0374, 0x02B9, 0x0000 }, + { 0x037E, 0x003B, 0x0000 }, + { 0x0385, 0x00A8, 0x0301 }, + { 0x0386, 0x0391, 0x0301 }, + { 0x0387, 0x00B7, 0x0000 }, + { 0x0388, 0x0395, 0x0301 }, + { 0x0389, 0x0397, 0x0301 }, + { 0x038A, 0x0399, 0x0301 }, + { 0x038C, 0x039F, 0x0301 }, + { 0x038E, 0x03A5, 0x0301 }, + { 0x038F, 0x03A9, 0x0301 }, + { 0x0390, 0x03CA, 0x0301 }, + { 0x03AA, 0x0399, 0x0308 }, + { 0x03AB, 0x03A5, 0x0308 }, + { 0x03AC, 0x03B1, 0x0301 }, + { 0x03AD, 0x03B5, 0x0301 }, + { 0x03AE, 0x03B7, 0x0301 }, + { 0x03AF, 0x03B9, 0x0301 }, + { 0x03B0, 0x03CB, 0x0301 }, + { 0x03CA, 0x03B9, 0x0308 }, + { 0x03CB, 0x03C5, 0x0308 }, + { 0x03CC, 0x03BF, 0x0301 }, + { 0x03CD, 0x03C5, 0x0301 }, + { 0x03CE, 0x03C9, 0x0301 }, + { 0x03D3, 0x03D2, 0x0301 }, + { 0x03D4, 0x03D2, 0x0308 }, + { 0x0400, 0x0415, 0x0300 }, + { 0x0401, 0x0415, 0x0308 }, + { 0x0403, 0x0413, 0x0301 }, + { 0x0407, 0x0406, 0x0308 }, + { 0x040C, 0x041A, 0x0301 }, + { 0x040D, 0x0418, 0x0300 }, + { 0x040E, 0x0423, 0x0306 }, + { 0x0419, 0x0418, 0x0306 }, + { 0x0439, 0x0438, 0x0306 }, + { 0x0450, 0x0435, 0x0300 }, + { 0x0451, 0x0435, 0x0308 }, + { 0x0453, 0x0433, 0x0301 }, + { 0x0457, 0x0456, 0x0308 }, + { 0x045C, 0x043A, 0x0301 }, + { 0x045D, 0x0438, 0x0300 }, + { 0x045E, 0x0443, 0x0306 }, + { 0x0476, 0x0474, 0x030F }, + { 0x0477, 0x0475, 0x030F }, + { 0x04C1, 0x0416, 0x0306 }, + { 0x04C2, 0x0436, 0x0306 }, + { 0x04D0, 0x0410, 0x0306 }, + { 0x04D1, 0x0430, 0x0306 }, + { 0x04D2, 0x0410, 0x0308 }, + { 0x04D3, 0x0430, 0x0308 }, + { 0x04D6, 0x0415, 0x0306 }, + { 0x04D7, 0x0435, 0x0306 }, + { 0x04DA, 0x04D8, 0x0308 }, + { 0x04DB, 0x04D9, 0x0308 }, + { 0x04DC, 0x0416, 0x0308 }, + { 0x04DD, 0x0436, 0x0308 }, + { 0x04DE, 0x0417, 0x0308 }, + { 0x04DF, 0x0437, 0x0308 }, + { 0x04E2, 0x0418, 0x0304 }, + { 0x04E3, 0x0438, 0x0304 }, + { 0x04E4, 0x0418, 0x0308 }, + { 0x04E5, 0x0438, 0x0308 }, + { 0x04E6, 0x041E, 0x0308 }, + { 0x04E7, 0x043E, 0x0308 }, + { 0x04EA, 0x04E8, 0x0308 }, + { 0x04EB, 0x04E9, 0x0308 }, + { 0x04EC, 0x042D, 0x0308 }, + { 0x04ED, 0x044D, 0x0308 }, + { 0x04EE, 0x0423, 0x0304 }, + { 0x04EF, 0x0443, 0x0304 }, + { 0x04F0, 0x0423, 0x0308 }, + { 0x04F1, 0x0443, 0x0308 }, + { 0x04F2, 0x0423, 0x030B }, + { 0x04F3, 0x0443, 0x030B }, + { 0x04F4, 0x0427, 0x0308 }, + { 0x04F5, 0x0447, 0x0308 }, + { 0x04F8, 0x042B, 0x0308 }, + { 0x04F9, 0x044B, 0x0308 }, + { 0x0622, 0x0627, 0x0653 }, + { 0x0623, 0x0627, 0x0654 }, + { 0x0624, 0x0648, 0x0654 }, + { 0x0625, 0x0627, 0x0655 }, + { 0x0626, 0x064A, 0x0654 }, + { 0x06C0, 0x06D5, 0x0654 }, + { 0x06C2, 0x06C1, 0x0654 }, + { 0x06D3, 0x06D2, 0x0654 }, + { 0x0929, 0x0928, 0x093C }, + { 0x0931, 0x0930, 0x093C }, + { 0x0934, 0x0933, 0x093C }, + { 0x0958, 0x0915, 0x093C }, + { 0x0959, 0x0916, 0x093C }, + { 0x095A, 0x0917, 0x093C }, + { 0x095B, 0x091C, 0x093C }, + { 0x095C, 0x0921, 0x093C }, + { 0x095D, 0x0922, 0x093C }, + { 0x095E, 0x092B, 0x093C }, + { 0x095F, 0x092F, 0x093C }, + { 0x09CB, 0x09C7, 0x09BE }, + { 0x09CC, 0x09C7, 0x09D7 }, + { 0x09DC, 0x09A1, 0x09BC }, + { 0x09DD, 0x09A2, 0x09BC }, + { 0x09DF, 0x09AF, 0x09BC }, + { 0x0A33, 0x0A32, 0x0A3C }, + { 0x0A36, 0x0A38, 0x0A3C }, + { 0x0A59, 0x0A16, 0x0A3C }, + { 0x0A5A, 0x0A17, 0x0A3C }, + { 0x0A5B, 0x0A1C, 0x0A3C }, + { 0x0A5E, 0x0A2B, 0x0A3C }, + { 0x0B48, 0x0B47, 0x0B56 }, + { 0x0B4B, 0x0B47, 0x0B3E }, + { 0x0B4C, 0x0B47, 0x0B57 }, + { 0x0B5C, 0x0B21, 0x0B3C }, + { 0x0B5D, 0x0B22, 0x0B3C }, + { 0x0B94, 0x0B92, 0x0BD7 }, + { 0x0BCA, 0x0BC6, 0x0BBE }, + { 0x0BCB, 0x0BC7, 0x0BBE }, + { 0x0BCC, 0x0BC6, 0x0BD7 }, + { 0x0C48, 0x0C46, 0x0C56 }, + { 0x0CC0, 0x0CBF, 0x0CD5 }, + { 0x0CC7, 0x0CC6, 0x0CD5 }, + { 0x0CC8, 0x0CC6, 0x0CD6 }, + { 0x0CCA, 0x0CC6, 0x0CC2 }, + { 0x0CCB, 0x0CCA, 0x0CD5 }, + { 0x0D4A, 0x0D46, 0x0D3E }, + { 0x0D4B, 0x0D47, 0x0D3E }, + { 0x0D4C, 0x0D46, 0x0D57 }, + { 0x0DDA, 0x0DD9, 0x0DCA }, + { 0x0DDC, 0x0DD9, 0x0DCF }, + { 0x0DDD, 0x0DDC, 0x0DCA }, + { 0x0DDE, 0x0DD9, 0x0DDF }, + { 0x0F43, 0x0F42, 0x0FB7 }, + { 0x0F4D, 0x0F4C, 0x0FB7 }, + { 0x0F52, 0x0F51, 0x0FB7 }, + { 0x0F57, 0x0F56, 0x0FB7 }, + { 0x0F5C, 0x0F5B, 0x0FB7 }, + { 0x0F69, 0x0F40, 0x0FB5 }, + { 0x0F73, 0x0F71, 0x0F72 }, + { 0x0F75, 0x0F71, 0x0F74 }, + { 0x0F76, 0x0FB2, 0x0F80 }, + { 0x0F78, 0x0FB3, 0x0F80 }, + { 0x0F81, 0x0F71, 0x0F80 }, + { 0x0F93, 0x0F92, 0x0FB7 }, + { 0x0F9D, 0x0F9C, 0x0FB7 }, + { 0x0FA2, 0x0FA1, 0x0FB7 }, + { 0x0FA7, 0x0FA6, 0x0FB7 }, + { 0x0FAC, 0x0FAB, 0x0FB7 }, + { 0x0FB9, 0x0F90, 0x0FB5 }, + { 0x1026, 0x1025, 0x102E }, + { 0x1B06, 0x1B05, 0x1B35 }, + { 0x1B08, 0x1B07, 0x1B35 }, + { 0x1B0A, 0x1B09, 0x1B35 }, + { 0x1B0C, 0x1B0B, 0x1B35 }, + { 0x1B0E, 0x1B0D, 0x1B35 }, + { 0x1B12, 0x1B11, 0x1B35 }, + { 0x1B3B, 0x1B3A, 0x1B35 }, + { 0x1B3D, 0x1B3C, 0x1B35 }, + { 0x1B40, 0x1B3E, 0x1B35 }, + { 0x1B41, 0x1B3F, 0x1B35 }, + { 0x1B43, 0x1B42, 0x1B35 }, + { 0x1E00, 0x0041, 0x0325 }, + { 0x1E01, 0x0061, 0x0325 }, + { 0x1E02, 0x0042, 0x0307 }, + { 0x1E03, 0x0062, 0x0307 }, + { 0x1E04, 0x0042, 0x0323 }, + { 0x1E05, 0x0062, 0x0323 }, + { 0x1E06, 0x0042, 0x0331 }, + { 0x1E07, 0x0062, 0x0331 }, + { 0x1E08, 0x00C7, 0x0301 }, + { 0x1E09, 0x00E7, 0x0301 }, + { 0x1E0A, 0x0044, 0x0307 }, + { 0x1E0B, 0x0064, 0x0307 }, + { 0x1E0C, 0x0044, 0x0323 }, + { 0x1E0D, 0x0064, 0x0323 }, + { 0x1E0E, 0x0044, 0x0331 }, + { 0x1E0F, 0x0064, 0x0331 }, + { 0x1E10, 0x0044, 0x0327 }, + { 0x1E11, 0x0064, 0x0327 }, + { 0x1E12, 0x0044, 0x032D }, + { 0x1E13, 0x0064, 0x032D }, + { 0x1E14, 0x0112, 0x0300 }, + { 0x1E15, 0x0113, 0x0300 }, + { 0x1E16, 0x0112, 0x0301 }, + { 0x1E17, 0x0113, 0x0301 }, + { 0x1E18, 0x0045, 0x032D }, + { 0x1E19, 0x0065, 0x032D }, + { 0x1E1A, 0x0045, 0x0330 }, + { 0x1E1B, 0x0065, 0x0330 }, + { 0x1E1C, 0x0228, 0x0306 }, + { 0x1E1D, 0x0229, 0x0306 }, + { 0x1E1E, 0x0046, 0x0307 }, + { 0x1E1F, 0x0066, 0x0307 }, + { 0x1E20, 0x0047, 0x0304 }, + { 0x1E21, 0x0067, 0x0304 }, + { 0x1E22, 0x0048, 0x0307 }, + { 0x1E23, 0x0068, 0x0307 }, + { 0x1E24, 0x0048, 0x0323 }, + { 0x1E25, 0x0068, 0x0323 }, + { 0x1E26, 0x0048, 0x0308 }, + { 0x1E27, 0x0068, 0x0308 }, + { 0x1E28, 0x0048, 0x0327 }, + { 0x1E29, 0x0068, 0x0327 }, + { 0x1E2A, 0x0048, 0x032E }, + { 0x1E2B, 0x0068, 0x032E }, + { 0x1E2C, 0x0049, 0x0330 }, + { 0x1E2D, 0x0069, 0x0330 }, + { 0x1E2E, 0x00CF, 0x0301 }, + { 0x1E2F, 0x00EF, 0x0301 }, + { 0x1E30, 0x004B, 0x0301 }, + { 0x1E31, 0x006B, 0x0301 }, + { 0x1E32, 0x004B, 0x0323 }, + { 0x1E33, 0x006B, 0x0323 }, + { 0x1E34, 0x004B, 0x0331 }, + { 0x1E35, 0x006B, 0x0331 }, + { 0x1E36, 0x004C, 0x0323 }, + { 0x1E37, 0x006C, 0x0323 }, + { 0x1E38, 0x1E36, 0x0304 }, + { 0x1E39, 0x1E37, 0x0304 }, + { 0x1E3A, 0x004C, 0x0331 }, + { 0x1E3B, 0x006C, 0x0331 }, + { 0x1E3C, 0x004C, 0x032D }, + { 0x1E3D, 0x006C, 0x032D }, + { 0x1E3E, 0x004D, 0x0301 }, + { 0x1E3F, 0x006D, 0x0301 }, + { 0x1E40, 0x004D, 0x0307 }, + { 0x1E41, 0x006D, 0x0307 }, + { 0x1E42, 0x004D, 0x0323 }, + { 0x1E43, 0x006D, 0x0323 }, + { 0x1E44, 0x004E, 0x0307 }, + { 0x1E45, 0x006E, 0x0307 }, + { 0x1E46, 0x004E, 0x0323 }, + { 0x1E47, 0x006E, 0x0323 }, + { 0x1E48, 0x004E, 0x0331 }, + { 0x1E49, 0x006E, 0x0331 }, + { 0x1E4A, 0x004E, 0x032D }, + { 0x1E4B, 0x006E, 0x032D }, + { 0x1E4C, 0x00D5, 0x0301 }, + { 0x1E4D, 0x00F5, 0x0301 }, + { 0x1E4E, 0x00D5, 0x0308 }, + { 0x1E4F, 0x00F5, 0x0308 }, + { 0x1E50, 0x014C, 0x0300 }, + { 0x1E51, 0x014D, 0x0300 }, + { 0x1E52, 0x014C, 0x0301 }, + { 0x1E53, 0x014D, 0x0301 }, + { 0x1E54, 0x0050, 0x0301 }, + { 0x1E55, 0x0070, 0x0301 }, + { 0x1E56, 0x0050, 0x0307 }, + { 0x1E57, 0x0070, 0x0307 }, + { 0x1E58, 0x0052, 0x0307 }, + { 0x1E59, 0x0072, 0x0307 }, + { 0x1E5A, 0x0052, 0x0323 }, + { 0x1E5B, 0x0072, 0x0323 }, + { 0x1E5C, 0x1E5A, 0x0304 }, + { 0x1E5D, 0x1E5B, 0x0304 }, + { 0x1E5E, 0x0052, 0x0331 }, + { 0x1E5F, 0x0072, 0x0331 }, + { 0x1E60, 0x0053, 0x0307 }, + { 0x1E61, 0x0073, 0x0307 }, + { 0x1E62, 0x0053, 0x0323 }, + { 0x1E63, 0x0073, 0x0323 }, + { 0x1E64, 0x015A, 0x0307 }, + { 0x1E65, 0x015B, 0x0307 }, + { 0x1E66, 0x0160, 0x0307 }, + { 0x1E67, 0x0161, 0x0307 }, + { 0x1E68, 0x1E62, 0x0307 }, + { 0x1E69, 0x1E63, 0x0307 }, + { 0x1E6A, 0x0054, 0x0307 }, + { 0x1E6B, 0x0074, 0x0307 }, + { 0x1E6C, 0x0054, 0x0323 }, + { 0x1E6D, 0x0074, 0x0323 }, + { 0x1E6E, 0x0054, 0x0331 }, + { 0x1E6F, 0x0074, 0x0331 }, + { 0x1E70, 0x0054, 0x032D }, + { 0x1E71, 0x0074, 0x032D }, + { 0x1E72, 0x0055, 0x0324 }, + { 0x1E73, 0x0075, 0x0324 }, + { 0x1E74, 0x0055, 0x0330 }, + { 0x1E75, 0x0075, 0x0330 }, + { 0x1E76, 0x0055, 0x032D }, + { 0x1E77, 0x0075, 0x032D }, + { 0x1E78, 0x0168, 0x0301 }, + { 0x1E79, 0x0169, 0x0301 }, + { 0x1E7A, 0x016A, 0x0308 }, + { 0x1E7B, 0x016B, 0x0308 }, + { 0x1E7C, 0x0056, 0x0303 }, + { 0x1E7D, 0x0076, 0x0303 }, + { 0x1E7E, 0x0056, 0x0323 }, + { 0x1E7F, 0x0076, 0x0323 }, + { 0x1E80, 0x0057, 0x0300 }, + { 0x1E81, 0x0077, 0x0300 }, + { 0x1E82, 0x0057, 0x0301 }, + { 0x1E83, 0x0077, 0x0301 }, + { 0x1E84, 0x0057, 0x0308 }, + { 0x1E85, 0x0077, 0x0308 }, + { 0x1E86, 0x0057, 0x0307 }, + { 0x1E87, 0x0077, 0x0307 }, + { 0x1E88, 0x0057, 0x0323 }, + { 0x1E89, 0x0077, 0x0323 }, + { 0x1E8A, 0x0058, 0x0307 }, + { 0x1E8B, 0x0078, 0x0307 }, + { 0x1E8C, 0x0058, 0x0308 }, + { 0x1E8D, 0x0078, 0x0308 }, + { 0x1E8E, 0x0059, 0x0307 }, + { 0x1E8F, 0x0079, 0x0307 }, + { 0x1E90, 0x005A, 0x0302 }, + { 0x1E91, 0x007A, 0x0302 }, + { 0x1E92, 0x005A, 0x0323 }, + { 0x1E93, 0x007A, 0x0323 }, + { 0x1E94, 0x005A, 0x0331 }, + { 0x1E95, 0x007A, 0x0331 }, + { 0x1E96, 0x0068, 0x0331 }, + { 0x1E97, 0x0074, 0x0308 }, + { 0x1E98, 0x0077, 0x030A }, + { 0x1E99, 0x0079, 0x030A }, + { 0x1E9B, 0x017F, 0x0307 }, + { 0x1EA0, 0x0041, 0x0323 }, + { 0x1EA1, 0x0061, 0x0323 }, + { 0x1EA2, 0x0041, 0x0309 }, + { 0x1EA3, 0x0061, 0x0309 }, + { 0x1EA4, 0x00C2, 0x0301 }, + { 0x1EA5, 0x00E2, 0x0301 }, + { 0x1EA6, 0x00C2, 0x0300 }, + { 0x1EA7, 0x00E2, 0x0300 }, + { 0x1EA8, 0x00C2, 0x0309 }, + { 0x1EA9, 0x00E2, 0x0309 }, + { 0x1EAA, 0x00C2, 0x0303 }, + { 0x1EAB, 0x00E2, 0x0303 }, + { 0x1EAC, 0x1EA0, 0x0302 }, + { 0x1EAD, 0x1EA1, 0x0302 }, + { 0x1EAE, 0x0102, 0x0301 }, + { 0x1EAF, 0x0103, 0x0301 }, + { 0x1EB0, 0x0102, 0x0300 }, + { 0x1EB1, 0x0103, 0x0300 }, + { 0x1EB2, 0x0102, 0x0309 }, + { 0x1EB3, 0x0103, 0x0309 }, + { 0x1EB4, 0x0102, 0x0303 }, + { 0x1EB5, 0x0103, 0x0303 }, + { 0x1EB6, 0x1EA0, 0x0306 }, + { 0x1EB7, 0x1EA1, 0x0306 }, + { 0x1EB8, 0x0045, 0x0323 }, + { 0x1EB9, 0x0065, 0x0323 }, + { 0x1EBA, 0x0045, 0x0309 }, + { 0x1EBB, 0x0065, 0x0309 }, + { 0x1EBC, 0x0045, 0x0303 }, + { 0x1EBD, 0x0065, 0x0303 }, + { 0x1EBE, 0x00CA, 0x0301 }, + { 0x1EBF, 0x00EA, 0x0301 }, + { 0x1EC0, 0x00CA, 0x0300 }, + { 0x1EC1, 0x00EA, 0x0300 }, + { 0x1EC2, 0x00CA, 0x0309 }, + { 0x1EC3, 0x00EA, 0x0309 }, + { 0x1EC4, 0x00CA, 0x0303 }, + { 0x1EC5, 0x00EA, 0x0303 }, + { 0x1EC6, 0x1EB8, 0x0302 }, + { 0x1EC7, 0x1EB9, 0x0302 }, + { 0x1EC8, 0x0049, 0x0309 }, + { 0x1EC9, 0x0069, 0x0309 }, + { 0x1ECA, 0x0049, 0x0323 }, + { 0x1ECB, 0x0069, 0x0323 }, + { 0x1ECC, 0x004F, 0x0323 }, + { 0x1ECD, 0x006F, 0x0323 }, + { 0x1ECE, 0x004F, 0x0309 }, + { 0x1ECF, 0x006F, 0x0309 }, + { 0x1ED0, 0x00D4, 0x0301 }, + { 0x1ED1, 0x00F4, 0x0301 }, + { 0x1ED2, 0x00D4, 0x0300 }, + { 0x1ED3, 0x00F4, 0x0300 }, + { 0x1ED4, 0x00D4, 0x0309 }, + { 0x1ED5, 0x00F4, 0x0309 }, + { 0x1ED6, 0x00D4, 0x0303 }, + { 0x1ED7, 0x00F4, 0x0303 }, + { 0x1ED8, 0x1ECC, 0x0302 }, + { 0x1ED9, 0x1ECD, 0x0302 }, + { 0x1EDA, 0x01A0, 0x0301 }, + { 0x1EDB, 0x01A1, 0x0301 }, + { 0x1EDC, 0x01A0, 0x0300 }, + { 0x1EDD, 0x01A1, 0x0300 }, + { 0x1EDE, 0x01A0, 0x0309 }, + { 0x1EDF, 0x01A1, 0x0309 }, + { 0x1EE0, 0x01A0, 0x0303 }, + { 0x1EE1, 0x01A1, 0x0303 }, + { 0x1EE2, 0x01A0, 0x0323 }, + { 0x1EE3, 0x01A1, 0x0323 }, + { 0x1EE4, 0x0055, 0x0323 }, + { 0x1EE5, 0x0075, 0x0323 }, + { 0x1EE6, 0x0055, 0x0309 }, + { 0x1EE7, 0x0075, 0x0309 }, + { 0x1EE8, 0x01AF, 0x0301 }, + { 0x1EE9, 0x01B0, 0x0301 }, + { 0x1EEA, 0x01AF, 0x0300 }, + { 0x1EEB, 0x01B0, 0x0300 }, + { 0x1EEC, 0x01AF, 0x0309 }, + { 0x1EED, 0x01B0, 0x0309 }, + { 0x1EEE, 0x01AF, 0x0303 }, + { 0x1EEF, 0x01B0, 0x0303 }, + { 0x1EF0, 0x01AF, 0x0323 }, + { 0x1EF1, 0x01B0, 0x0323 }, + { 0x1EF2, 0x0059, 0x0300 }, + { 0x1EF3, 0x0079, 0x0300 }, + { 0x1EF4, 0x0059, 0x0323 }, + { 0x1EF5, 0x0079, 0x0323 }, + { 0x1EF6, 0x0059, 0x0309 }, + { 0x1EF7, 0x0079, 0x0309 }, + { 0x1EF8, 0x0059, 0x0303 }, + { 0x1EF9, 0x0079, 0x0303 }, + { 0x1F00, 0x03B1, 0x0313 }, + { 0x1F01, 0x03B1, 0x0314 }, + { 0x1F02, 0x1F00, 0x0300 }, + { 0x1F03, 0x1F01, 0x0300 }, + { 0x1F04, 0x1F00, 0x0301 }, + { 0x1F05, 0x1F01, 0x0301 }, + { 0x1F06, 0x1F00, 0x0342 }, + { 0x1F07, 0x1F01, 0x0342 }, + { 0x1F08, 0x0391, 0x0313 }, + { 0x1F09, 0x0391, 0x0314 }, + { 0x1F0A, 0x1F08, 0x0300 }, + { 0x1F0B, 0x1F09, 0x0300 }, + { 0x1F0C, 0x1F08, 0x0301 }, + { 0x1F0D, 0x1F09, 0x0301 }, + { 0x1F0E, 0x1F08, 0x0342 }, + { 0x1F0F, 0x1F09, 0x0342 }, + { 0x1F10, 0x03B5, 0x0313 }, + { 0x1F11, 0x03B5, 0x0314 }, + { 0x1F12, 0x1F10, 0x0300 }, + { 0x1F13, 0x1F11, 0x0300 }, + { 0x1F14, 0x1F10, 0x0301 }, + { 0x1F15, 0x1F11, 0x0301 }, + { 0x1F18, 0x0395, 0x0313 }, + { 0x1F19, 0x0395, 0x0314 }, + { 0x1F1A, 0x1F18, 0x0300 }, + { 0x1F1B, 0x1F19, 0x0300 }, + { 0x1F1C, 0x1F18, 0x0301 }, + { 0x1F1D, 0x1F19, 0x0301 }, + { 0x1F20, 0x03B7, 0x0313 }, + { 0x1F21, 0x03B7, 0x0314 }, + { 0x1F22, 0x1F20, 0x0300 }, + { 0x1F23, 0x1F21, 0x0300 }, + { 0x1F24, 0x1F20, 0x0301 }, + { 0x1F25, 0x1F21, 0x0301 }, + { 0x1F26, 0x1F20, 0x0342 }, + { 0x1F27, 0x1F21, 0x0342 }, + { 0x1F28, 0x0397, 0x0313 }, + { 0x1F29, 0x0397, 0x0314 }, + { 0x1F2A, 0x1F28, 0x0300 }, + { 0x1F2B, 0x1F29, 0x0300 }, + { 0x1F2C, 0x1F28, 0x0301 }, + { 0x1F2D, 0x1F29, 0x0301 }, + { 0x1F2E, 0x1F28, 0x0342 }, + { 0x1F2F, 0x1F29, 0x0342 }, + { 0x1F30, 0x03B9, 0x0313 }, + { 0x1F31, 0x03B9, 0x0314 }, + { 0x1F32, 0x1F30, 0x0300 }, + { 0x1F33, 0x1F31, 0x0300 }, + { 0x1F34, 0x1F30, 0x0301 }, + { 0x1F35, 0x1F31, 0x0301 }, + { 0x1F36, 0x1F30, 0x0342 }, + { 0x1F37, 0x1F31, 0x0342 }, + { 0x1F38, 0x0399, 0x0313 }, + { 0x1F39, 0x0399, 0x0314 }, + { 0x1F3A, 0x1F38, 0x0300 }, + { 0x1F3B, 0x1F39, 0x0300 }, + { 0x1F3C, 0x1F38, 0x0301 }, + { 0x1F3D, 0x1F39, 0x0301 }, + { 0x1F3E, 0x1F38, 0x0342 }, + { 0x1F3F, 0x1F39, 0x0342 }, + { 0x1F40, 0x03BF, 0x0313 }, + { 0x1F41, 0x03BF, 0x0314 }, + { 0x1F42, 0x1F40, 0x0300 }, + { 0x1F43, 0x1F41, 0x0300 }, + { 0x1F44, 0x1F40, 0x0301 }, + { 0x1F45, 0x1F41, 0x0301 }, + { 0x1F48, 0x039F, 0x0313 }, + { 0x1F49, 0x039F, 0x0314 }, + { 0x1F4A, 0x1F48, 0x0300 }, + { 0x1F4B, 0x1F49, 0x0300 }, + { 0x1F4C, 0x1F48, 0x0301 }, + { 0x1F4D, 0x1F49, 0x0301 }, + { 0x1F50, 0x03C5, 0x0313 }, + { 0x1F51, 0x03C5, 0x0314 }, + { 0x1F52, 0x1F50, 0x0300 }, + { 0x1F53, 0x1F51, 0x0300 }, + { 0x1F54, 0x1F50, 0x0301 }, + { 0x1F55, 0x1F51, 0x0301 }, + { 0x1F56, 0x1F50, 0x0342 }, + { 0x1F57, 0x1F51, 0x0342 }, + { 0x1F59, 0x03A5, 0x0314 }, + { 0x1F5B, 0x1F59, 0x0300 }, + { 0x1F5D, 0x1F59, 0x0301 }, + { 0x1F5F, 0x1F59, 0x0342 }, + { 0x1F60, 0x03C9, 0x0313 }, + { 0x1F61, 0x03C9, 0x0314 }, + { 0x1F62, 0x1F60, 0x0300 }, + { 0x1F63, 0x1F61, 0x0300 }, + { 0x1F64, 0x1F60, 0x0301 }, + { 0x1F65, 0x1F61, 0x0301 }, + { 0x1F66, 0x1F60, 0x0342 }, + { 0x1F67, 0x1F61, 0x0342 }, + { 0x1F68, 0x03A9, 0x0313 }, + { 0x1F69, 0x03A9, 0x0314 }, + { 0x1F6A, 0x1F68, 0x0300 }, + { 0x1F6B, 0x1F69, 0x0300 }, + { 0x1F6C, 0x1F68, 0x0301 }, + { 0x1F6D, 0x1F69, 0x0301 }, + { 0x1F6E, 0x1F68, 0x0342 }, + { 0x1F6F, 0x1F69, 0x0342 }, + { 0x1F70, 0x03B1, 0x0300 }, + { 0x1F71, 0x03AC, 0x0000 }, + { 0x1F72, 0x03B5, 0x0300 }, + { 0x1F73, 0x03AD, 0x0000 }, + { 0x1F74, 0x03B7, 0x0300 }, + { 0x1F75, 0x03AE, 0x0000 }, + { 0x1F76, 0x03B9, 0x0300 }, + { 0x1F77, 0x03AF, 0x0000 }, + { 0x1F78, 0x03BF, 0x0300 }, + { 0x1F79, 0x03CC, 0x0000 }, + { 0x1F7A, 0x03C5, 0x0300 }, + { 0x1F7B, 0x03CD, 0x0000 }, + { 0x1F7C, 0x03C9, 0x0300 }, + { 0x1F7D, 0x03CE, 0x0000 }, + { 0x1F80, 0x1F00, 0x0345 }, + { 0x1F81, 0x1F01, 0x0345 }, + { 0x1F82, 0x1F02, 0x0345 }, + { 0x1F83, 0x1F03, 0x0345 }, + { 0x1F84, 0x1F04, 0x0345 }, + { 0x1F85, 0x1F05, 0x0345 }, + { 0x1F86, 0x1F06, 0x0345 }, + { 0x1F87, 0x1F07, 0x0345 }, + { 0x1F88, 0x1F08, 0x0345 }, + { 0x1F89, 0x1F09, 0x0345 }, + { 0x1F8A, 0x1F0A, 0x0345 }, + { 0x1F8B, 0x1F0B, 0x0345 }, + { 0x1F8C, 0x1F0C, 0x0345 }, + { 0x1F8D, 0x1F0D, 0x0345 }, + { 0x1F8E, 0x1F0E, 0x0345 }, + { 0x1F8F, 0x1F0F, 0x0345 }, + { 0x1F90, 0x1F20, 0x0345 }, + { 0x1F91, 0x1F21, 0x0345 }, + { 0x1F92, 0x1F22, 0x0345 }, + { 0x1F93, 0x1F23, 0x0345 }, + { 0x1F94, 0x1F24, 0x0345 }, + { 0x1F95, 0x1F25, 0x0345 }, + { 0x1F96, 0x1F26, 0x0345 }, + { 0x1F97, 0x1F27, 0x0345 }, + { 0x1F98, 0x1F28, 0x0345 }, + { 0x1F99, 0x1F29, 0x0345 }, + { 0x1F9A, 0x1F2A, 0x0345 }, + { 0x1F9B, 0x1F2B, 0x0345 }, + { 0x1F9C, 0x1F2C, 0x0345 }, + { 0x1F9D, 0x1F2D, 0x0345 }, + { 0x1F9E, 0x1F2E, 0x0345 }, + { 0x1F9F, 0x1F2F, 0x0345 }, + { 0x1FA0, 0x1F60, 0x0345 }, + { 0x1FA1, 0x1F61, 0x0345 }, + { 0x1FA2, 0x1F62, 0x0345 }, + { 0x1FA3, 0x1F63, 0x0345 }, + { 0x1FA4, 0x1F64, 0x0345 }, + { 0x1FA5, 0x1F65, 0x0345 }, + { 0x1FA6, 0x1F66, 0x0345 }, + { 0x1FA7, 0x1F67, 0x0345 }, + { 0x1FA8, 0x1F68, 0x0345 }, + { 0x1FA9, 0x1F69, 0x0345 }, + { 0x1FAA, 0x1F6A, 0x0345 }, + { 0x1FAB, 0x1F6B, 0x0345 }, + { 0x1FAC, 0x1F6C, 0x0345 }, + { 0x1FAD, 0x1F6D, 0x0345 }, + { 0x1FAE, 0x1F6E, 0x0345 }, + { 0x1FAF, 0x1F6F, 0x0345 }, + { 0x1FB0, 0x03B1, 0x0306 }, + { 0x1FB1, 0x03B1, 0x0304 }, + { 0x1FB2, 0x1F70, 0x0345 }, + { 0x1FB3, 0x03B1, 0x0345 }, + { 0x1FB4, 0x03AC, 0x0345 }, + { 0x1FB6, 0x03B1, 0x0342 }, + { 0x1FB7, 0x1FB6, 0x0345 }, + { 0x1FB8, 0x0391, 0x0306 }, + { 0x1FB9, 0x0391, 0x0304 }, + { 0x1FBA, 0x0391, 0x0300 }, + { 0x1FBB, 0x0386, 0x0000 }, + { 0x1FBC, 0x0391, 0x0345 }, + { 0x1FBE, 0x03B9, 0x0000 }, + { 0x1FC1, 0x00A8, 0x0342 }, + { 0x1FC2, 0x1F74, 0x0345 }, + { 0x1FC3, 0x03B7, 0x0345 }, + { 0x1FC4, 0x03AE, 0x0345 }, + { 0x1FC6, 0x03B7, 0x0342 }, + { 0x1FC7, 0x1FC6, 0x0345 }, + { 0x1FC8, 0x0395, 0x0300 }, + { 0x1FC9, 0x0388, 0x0000 }, + { 0x1FCA, 0x0397, 0x0300 }, + { 0x1FCB, 0x0389, 0x0000 }, + { 0x1FCC, 0x0397, 0x0345 }, + { 0x1FCD, 0x1FBF, 0x0300 }, + { 0x1FCE, 0x1FBF, 0x0301 }, + { 0x1FCF, 0x1FBF, 0x0342 }, + { 0x1FD0, 0x03B9, 0x0306 }, + { 0x1FD1, 0x03B9, 0x0304 }, + { 0x1FD2, 0x03CA, 0x0300 }, + { 0x1FD3, 0x0390, 0x0000 }, + { 0x1FD6, 0x03B9, 0x0342 }, + { 0x1FD7, 0x03CA, 0x0342 }, + { 0x1FD8, 0x0399, 0x0306 }, + { 0x1FD9, 0x0399, 0x0304 }, + { 0x1FDA, 0x0399, 0x0300 }, + { 0x1FDB, 0x038A, 0x0000 }, + { 0x1FDD, 0x1FFE, 0x0300 }, + { 0x1FDE, 0x1FFE, 0x0301 }, + { 0x1FDF, 0x1FFE, 0x0342 }, + { 0x1FE0, 0x03C5, 0x0306 }, + { 0x1FE1, 0x03C5, 0x0304 }, + { 0x1FE2, 0x03CB, 0x0300 }, + { 0x1FE3, 0x03B0, 0x0000 }, + { 0x1FE4, 0x03C1, 0x0313 }, + { 0x1FE5, 0x03C1, 0x0314 }, + { 0x1FE6, 0x03C5, 0x0342 }, + { 0x1FE7, 0x03CB, 0x0342 }, + { 0x1FE8, 0x03A5, 0x0306 }, + { 0x1FE9, 0x03A5, 0x0304 }, + { 0x1FEA, 0x03A5, 0x0300 }, + { 0x1FEB, 0x038E, 0x0000 }, + { 0x1FEC, 0x03A1, 0x0314 }, + { 0x1FED, 0x00A8, 0x0300 }, + { 0x1FEE, 0x0385, 0x0000 }, + { 0x1FEF, 0x0060, 0x0000 }, + { 0x1FF2, 0x1F7C, 0x0345 }, + { 0x1FF3, 0x03C9, 0x0345 }, + { 0x1FF4, 0x03CE, 0x0345 }, + { 0x1FF6, 0x03C9, 0x0342 }, + { 0x1FF7, 0x1FF6, 0x0345 }, + { 0x1FF8, 0x039F, 0x0300 }, + { 0x1FF9, 0x038C, 0x0000 }, + { 0x1FFA, 0x03A9, 0x0300 }, + { 0x1FFB, 0x038F, 0x0000 }, + { 0x1FFC, 0x03A9, 0x0345 }, + { 0x1FFD, 0x00B4, 0x0000 }, + { 0x2000, 0x2002, 0x0000 }, + { 0x2001, 0x2003, 0x0000 }, + { 0x2126, 0x03A9, 0x0000 }, + { 0x212A, 0x004B, 0x0000 }, + { 0x212B, 0x00C5, 0x0000 }, + { 0x219A, 0x2190, 0x0338 }, + { 0x219B, 0x2192, 0x0338 }, + { 0x21AE, 0x2194, 0x0338 }, + { 0x21CD, 0x21D0, 0x0338 }, + { 0x21CE, 0x21D4, 0x0338 }, + { 0x21CF, 0x21D2, 0x0338 }, + { 0x2204, 0x2203, 0x0338 }, + { 0x2209, 0x2208, 0x0338 }, + { 0x220C, 0x220B, 0x0338 }, + { 0x2224, 0x2223, 0x0338 }, + { 0x2226, 0x2225, 0x0338 }, + { 0x2241, 0x223C, 0x0338 }, + { 0x2244, 0x2243, 0x0338 }, + { 0x2247, 0x2245, 0x0338 }, + { 0x2249, 0x2248, 0x0338 }, + { 0x2260, 0x003D, 0x0338 }, + { 0x2262, 0x2261, 0x0338 }, + { 0x226D, 0x224D, 0x0338 }, + { 0x226E, 0x003C, 0x0338 }, + { 0x226F, 0x003E, 0x0338 }, + { 0x2270, 0x2264, 0x0338 }, + { 0x2271, 0x2265, 0x0338 }, + { 0x2274, 0x2272, 0x0338 }, + { 0x2275, 0x2273, 0x0338 }, + { 0x2278, 0x2276, 0x0338 }, + { 0x2279, 0x2277, 0x0338 }, + { 0x2280, 0x227A, 0x0338 }, + { 0x2281, 0x227B, 0x0338 }, + { 0x2284, 0x2282, 0x0338 }, + { 0x2285, 0x2283, 0x0338 }, + { 0x2288, 0x2286, 0x0338 }, + { 0x2289, 0x2287, 0x0338 }, + { 0x22AC, 0x22A2, 0x0338 }, + { 0x22AD, 0x22A8, 0x0338 }, + { 0x22AE, 0x22A9, 0x0338 }, + { 0x22AF, 0x22AB, 0x0338 }, + { 0x22E0, 0x227C, 0x0338 }, + { 0x22E1, 0x227D, 0x0338 }, + { 0x22E2, 0x2291, 0x0338 }, + { 0x22E3, 0x2292, 0x0338 }, + { 0x22EA, 0x22B2, 0x0338 }, + { 0x22EB, 0x22B3, 0x0338 }, + { 0x22EC, 0x22B4, 0x0338 }, + { 0x22ED, 0x22B5, 0x0338 }, + { 0x2329, 0x3008, 0x0000 }, + { 0x232A, 0x3009, 0x0000 }, + { 0x2ADC, 0x2ADD, 0x0338 }, + { 0x304C, 0x304B, 0x3099 }, + { 0x304E, 0x304D, 0x3099 }, + { 0x3050, 0x304F, 0x3099 }, + { 0x3052, 0x3051, 0x3099 }, + { 0x3054, 0x3053, 0x3099 }, + { 0x3056, 0x3055, 0x3099 }, + { 0x3058, 0x3057, 0x3099 }, + { 0x305A, 0x3059, 0x3099 }, + { 0x305C, 0x305B, 0x3099 }, + { 0x305E, 0x305D, 0x3099 }, + { 0x3060, 0x305F, 0x3099 }, + { 0x3062, 0x3061, 0x3099 }, + { 0x3065, 0x3064, 0x3099 }, + { 0x3067, 0x3066, 0x3099 }, + { 0x3069, 0x3068, 0x3099 }, + { 0x3070, 0x306F, 0x3099 }, + { 0x3071, 0x306F, 0x309A }, + { 0x3073, 0x3072, 0x3099 }, + { 0x3074, 0x3072, 0x309A }, + { 0x3076, 0x3075, 0x3099 }, + { 0x3077, 0x3075, 0x309A }, + { 0x3079, 0x3078, 0x3099 }, + { 0x307A, 0x3078, 0x309A }, + { 0x307C, 0x307B, 0x3099 }, + { 0x307D, 0x307B, 0x309A }, + { 0x3094, 0x3046, 0x3099 }, + { 0x309E, 0x309D, 0x3099 }, + { 0x30AC, 0x30AB, 0x3099 }, + { 0x30AE, 0x30AD, 0x3099 }, + { 0x30B0, 0x30AF, 0x3099 }, + { 0x30B2, 0x30B1, 0x3099 }, + { 0x30B4, 0x30B3, 0x3099 }, + { 0x30B6, 0x30B5, 0x3099 }, + { 0x30B8, 0x30B7, 0x3099 }, + { 0x30BA, 0x30B9, 0x3099 }, + { 0x30BC, 0x30BB, 0x3099 }, + { 0x30BE, 0x30BD, 0x3099 }, + { 0x30C0, 0x30BF, 0x3099 }, + { 0x30C2, 0x30C1, 0x3099 }, + { 0x30C5, 0x30C4, 0x3099 }, + { 0x30C7, 0x30C6, 0x3099 }, + { 0x30C9, 0x30C8, 0x3099 }, + { 0x30D0, 0x30CF, 0x3099 }, + { 0x30D1, 0x30CF, 0x309A }, + { 0x30D3, 0x30D2, 0x3099 }, + { 0x30D4, 0x30D2, 0x309A }, + { 0x30D6, 0x30D5, 0x3099 }, + { 0x30D7, 0x30D5, 0x309A }, + { 0x30D9, 0x30D8, 0x3099 }, + { 0x30DA, 0x30D8, 0x309A }, + { 0x30DC, 0x30DB, 0x3099 }, + { 0x30DD, 0x30DB, 0x309A }, + { 0x30F4, 0x30A6, 0x3099 }, + { 0x30F7, 0x30EF, 0x3099 }, + { 0x30F8, 0x30F0, 0x3099 }, + { 0x30F9, 0x30F1, 0x3099 }, + { 0x30FA, 0x30F2, 0x3099 }, + { 0x30FE, 0x30FD, 0x3099 }, + { 0xF900, 0x8C48, 0x0000 }, + { 0xF901, 0x66F4, 0x0000 }, + { 0xF902, 0x8ECA, 0x0000 }, + { 0xF903, 0x8CC8, 0x0000 }, + { 0xF904, 0x6ED1, 0x0000 }, + { 0xF905, 0x4E32, 0x0000 }, + { 0xF906, 0x53E5, 0x0000 }, + { 0xF907, 0x9F9C, 0x0000 }, + { 0xF908, 0x9F9C, 0x0000 }, + { 0xF909, 0x5951, 0x0000 }, + { 0xF90A, 0x91D1, 0x0000 }, + { 0xF90B, 0x5587, 0x0000 }, + { 0xF90C, 0x5948, 0x0000 }, + { 0xF90D, 0x61F6, 0x0000 }, + { 0xF90E, 0x7669, 0x0000 }, + { 0xF90F, 0x7F85, 0x0000 }, + { 0xF910, 0x863F, 0x0000 }, + { 0xF911, 0x87BA, 0x0000 }, + { 0xF912, 0x88F8, 0x0000 }, + { 0xF913, 0x908F, 0x0000 }, + { 0xF914, 0x6A02, 0x0000 }, + { 0xF915, 0x6D1B, 0x0000 }, + { 0xF916, 0x70D9, 0x0000 }, + { 0xF917, 0x73DE, 0x0000 }, + { 0xF918, 0x843D, 0x0000 }, + { 0xF919, 0x916A, 0x0000 }, + { 0xF91A, 0x99F1, 0x0000 }, + { 0xF91B, 0x4E82, 0x0000 }, + { 0xF91C, 0x5375, 0x0000 }, + { 0xF91D, 0x6B04, 0x0000 }, + { 0xF91E, 0x721B, 0x0000 }, + { 0xF91F, 0x862D, 0x0000 }, + { 0xF920, 0x9E1E, 0x0000 }, + { 0xF921, 0x5D50, 0x0000 }, + { 0xF922, 0x6FEB, 0x0000 }, + { 0xF923, 0x85CD, 0x0000 }, + { 0xF924, 0x8964, 0x0000 }, + { 0xF925, 0x62C9, 0x0000 }, + { 0xF926, 0x81D8, 0x0000 }, + { 0xF927, 0x881F, 0x0000 }, + { 0xF928, 0x5ECA, 0x0000 }, + { 0xF929, 0x6717, 0x0000 }, + { 0xF92A, 0x6D6A, 0x0000 }, + { 0xF92B, 0x72FC, 0x0000 }, + { 0xF92C, 0x90CE, 0x0000 }, + { 0xF92D, 0x4F86, 0x0000 }, + { 0xF92E, 0x51B7, 0x0000 }, + { 0xF92F, 0x52DE, 0x0000 }, + { 0xF930, 0x64C4, 0x0000 }, + { 0xF931, 0x6AD3, 0x0000 }, + { 0xF932, 0x7210, 0x0000 }, + { 0xF933, 0x76E7, 0x0000 }, + { 0xF934, 0x8001, 0x0000 }, + { 0xF935, 0x8606, 0x0000 }, + { 0xF936, 0x865C, 0x0000 }, + { 0xF937, 0x8DEF, 0x0000 }, + { 0xF938, 0x9732, 0x0000 }, + { 0xF939, 0x9B6F, 0x0000 }, + { 0xF93A, 0x9DFA, 0x0000 }, + { 0xF93B, 0x788C, 0x0000 }, + { 0xF93C, 0x797F, 0x0000 }, + { 0xF93D, 0x7DA0, 0x0000 }, + { 0xF93E, 0x83C9, 0x0000 }, + { 0xF93F, 0x9304, 0x0000 }, + { 0xF940, 0x9E7F, 0x0000 }, + { 0xF941, 0x8AD6, 0x0000 }, + { 0xF942, 0x58DF, 0x0000 }, + { 0xF943, 0x5F04, 0x0000 }, + { 0xF944, 0x7C60, 0x0000 }, + { 0xF945, 0x807E, 0x0000 }, + { 0xF946, 0x7262, 0x0000 }, + { 0xF947, 0x78CA, 0x0000 }, + { 0xF948, 0x8CC2, 0x0000 }, + { 0xF949, 0x96F7, 0x0000 }, + { 0xF94A, 0x58D8, 0x0000 }, + { 0xF94B, 0x5C62, 0x0000 }, + { 0xF94C, 0x6A13, 0x0000 }, + { 0xF94D, 0x6DDA, 0x0000 }, + { 0xF94E, 0x6F0F, 0x0000 }, + { 0xF94F, 0x7D2F, 0x0000 }, + { 0xF950, 0x7E37, 0x0000 }, + { 0xF951, 0x964B, 0x0000 }, + { 0xF952, 0x52D2, 0x0000 }, + { 0xF953, 0x808B, 0x0000 }, + { 0xF954, 0x51DC, 0x0000 }, + { 0xF955, 0x51CC, 0x0000 }, + { 0xF956, 0x7A1C, 0x0000 }, + { 0xF957, 0x7DBE, 0x0000 }, + { 0xF958, 0x83F1, 0x0000 }, + { 0xF959, 0x9675, 0x0000 }, + { 0xF95A, 0x8B80, 0x0000 }, + { 0xF95B, 0x62CF, 0x0000 }, + { 0xF95C, 0x6A02, 0x0000 }, + { 0xF95D, 0x8AFE, 0x0000 }, + { 0xF95E, 0x4E39, 0x0000 }, + { 0xF95F, 0x5BE7, 0x0000 }, + { 0xF960, 0x6012, 0x0000 }, + { 0xF961, 0x7387, 0x0000 }, + { 0xF962, 0x7570, 0x0000 }, + { 0xF963, 0x5317, 0x0000 }, + { 0xF964, 0x78FB, 0x0000 }, + { 0xF965, 0x4FBF, 0x0000 }, + { 0xF966, 0x5FA9, 0x0000 }, + { 0xF967, 0x4E0D, 0x0000 }, + { 0xF968, 0x6CCC, 0x0000 }, + { 0xF969, 0x6578, 0x0000 }, + { 0xF96A, 0x7D22, 0x0000 }, + { 0xF96B, 0x53C3, 0x0000 }, + { 0xF96C, 0x585E, 0x0000 }, + { 0xF96D, 0x7701, 0x0000 }, + { 0xF96E, 0x8449, 0x0000 }, + { 0xF96F, 0x8AAA, 0x0000 }, + { 0xF970, 0x6BBA, 0x0000 }, + { 0xF971, 0x8FB0, 0x0000 }, + { 0xF972, 0x6C88, 0x0000 }, + { 0xF973, 0x62FE, 0x0000 }, + { 0xF974, 0x82E5, 0x0000 }, + { 0xF975, 0x63A0, 0x0000 }, + { 0xF976, 0x7565, 0x0000 }, + { 0xF977, 0x4EAE, 0x0000 }, + { 0xF978, 0x5169, 0x0000 }, + { 0xF979, 0x51C9, 0x0000 }, + { 0xF97A, 0x6881, 0x0000 }, + { 0xF97B, 0x7CE7, 0x0000 }, + { 0xF97C, 0x826F, 0x0000 }, + { 0xF97D, 0x8AD2, 0x0000 }, + { 0xF97E, 0x91CF, 0x0000 }, + { 0xF97F, 0x52F5, 0x0000 }, + { 0xF980, 0x5442, 0x0000 }, + { 0xF981, 0x5973, 0x0000 }, + { 0xF982, 0x5EEC, 0x0000 }, + { 0xF983, 0x65C5, 0x0000 }, + { 0xF984, 0x6FFE, 0x0000 }, + { 0xF985, 0x792A, 0x0000 }, + { 0xF986, 0x95AD, 0x0000 }, + { 0xF987, 0x9A6A, 0x0000 }, + { 0xF988, 0x9E97, 0x0000 }, + { 0xF989, 0x9ECE, 0x0000 }, + { 0xF98A, 0x529B, 0x0000 }, + { 0xF98B, 0x66C6, 0x0000 }, + { 0xF98C, 0x6B77, 0x0000 }, + { 0xF98D, 0x8F62, 0x0000 }, + { 0xF98E, 0x5E74, 0x0000 }, + { 0xF98F, 0x6190, 0x0000 }, + { 0xF990, 0x6200, 0x0000 }, + { 0xF991, 0x649A, 0x0000 }, + { 0xF992, 0x6F23, 0x0000 }, + { 0xF993, 0x7149, 0x0000 }, + { 0xF994, 0x7489, 0x0000 }, + { 0xF995, 0x79CA, 0x0000 }, + { 0xF996, 0x7DF4, 0x0000 }, + { 0xF997, 0x806F, 0x0000 }, + { 0xF998, 0x8F26, 0x0000 }, + { 0xF999, 0x84EE, 0x0000 }, + { 0xF99A, 0x9023, 0x0000 }, + { 0xF99B, 0x934A, 0x0000 }, + { 0xF99C, 0x5217, 0x0000 }, + { 0xF99D, 0x52A3, 0x0000 }, + { 0xF99E, 0x54BD, 0x0000 }, + { 0xF99F, 0x70C8, 0x0000 }, + { 0xF9A0, 0x88C2, 0x0000 }, + { 0xF9A1, 0x8AAA, 0x0000 }, + { 0xF9A2, 0x5EC9, 0x0000 }, + { 0xF9A3, 0x5FF5, 0x0000 }, + { 0xF9A4, 0x637B, 0x0000 }, + { 0xF9A5, 0x6BAE, 0x0000 }, + { 0xF9A6, 0x7C3E, 0x0000 }, + { 0xF9A7, 0x7375, 0x0000 }, + { 0xF9A8, 0x4EE4, 0x0000 }, + { 0xF9A9, 0x56F9, 0x0000 }, + { 0xF9AA, 0x5BE7, 0x0000 }, + { 0xF9AB, 0x5DBA, 0x0000 }, + { 0xF9AC, 0x601C, 0x0000 }, + { 0xF9AD, 0x73B2, 0x0000 }, + { 0xF9AE, 0x7469, 0x0000 }, + { 0xF9AF, 0x7F9A, 0x0000 }, + { 0xF9B0, 0x8046, 0x0000 }, + { 0xF9B1, 0x9234, 0x0000 }, + { 0xF9B2, 0x96F6, 0x0000 }, + { 0xF9B3, 0x9748, 0x0000 }, + { 0xF9B4, 0x9818, 0x0000 }, + { 0xF9B5, 0x4F8B, 0x0000 }, + { 0xF9B6, 0x79AE, 0x0000 }, + { 0xF9B7, 0x91B4, 0x0000 }, + { 0xF9B8, 0x96B8, 0x0000 }, + { 0xF9B9, 0x60E1, 0x0000 }, + { 0xF9BA, 0x4E86, 0x0000 }, + { 0xF9BB, 0x50DA, 0x0000 }, + { 0xF9BC, 0x5BEE, 0x0000 }, + { 0xF9BD, 0x5C3F, 0x0000 }, + { 0xF9BE, 0x6599, 0x0000 }, + { 0xF9BF, 0x6A02, 0x0000 }, + { 0xF9C0, 0x71CE, 0x0000 }, + { 0xF9C1, 0x7642, 0x0000 }, + { 0xF9C2, 0x84FC, 0x0000 }, + { 0xF9C3, 0x907C, 0x0000 }, + { 0xF9C4, 0x9F8D, 0x0000 }, + { 0xF9C5, 0x6688, 0x0000 }, + { 0xF9C6, 0x962E, 0x0000 }, + { 0xF9C7, 0x5289, 0x0000 }, + { 0xF9C8, 0x677B, 0x0000 }, + { 0xF9C9, 0x67F3, 0x0000 }, + { 0xF9CA, 0x6D41, 0x0000 }, + { 0xF9CB, 0x6E9C, 0x0000 }, + { 0xF9CC, 0x7409, 0x0000 }, + { 0xF9CD, 0x7559, 0x0000 }, + { 0xF9CE, 0x786B, 0x0000 }, + { 0xF9CF, 0x7D10, 0x0000 }, + { 0xF9D0, 0x985E, 0x0000 }, + { 0xF9D1, 0x516D, 0x0000 }, + { 0xF9D2, 0x622E, 0x0000 }, + { 0xF9D3, 0x9678, 0x0000 }, + { 0xF9D4, 0x502B, 0x0000 }, + { 0xF9D5, 0x5D19, 0x0000 }, + { 0xF9D6, 0x6DEA, 0x0000 }, + { 0xF9D7, 0x8F2A, 0x0000 }, + { 0xF9D8, 0x5F8B, 0x0000 }, + { 0xF9D9, 0x6144, 0x0000 }, + { 0xF9DA, 0x6817, 0x0000 }, + { 0xF9DB, 0x7387, 0x0000 }, + { 0xF9DC, 0x9686, 0x0000 }, + { 0xF9DD, 0x5229, 0x0000 }, + { 0xF9DE, 0x540F, 0x0000 }, + { 0xF9DF, 0x5C65, 0x0000 }, + { 0xF9E0, 0x6613, 0x0000 }, + { 0xF9E1, 0x674E, 0x0000 }, + { 0xF9E2, 0x68A8, 0x0000 }, + { 0xF9E3, 0x6CE5, 0x0000 }, + { 0xF9E4, 0x7406, 0x0000 }, + { 0xF9E5, 0x75E2, 0x0000 }, + { 0xF9E6, 0x7F79, 0x0000 }, + { 0xF9E7, 0x88CF, 0x0000 }, + { 0xF9E8, 0x88E1, 0x0000 }, + { 0xF9E9, 0x91CC, 0x0000 }, + { 0xF9EA, 0x96E2, 0x0000 }, + { 0xF9EB, 0x533F, 0x0000 }, + { 0xF9EC, 0x6EBA, 0x0000 }, + { 0xF9ED, 0x541D, 0x0000 }, + { 0xF9EE, 0x71D0, 0x0000 }, + { 0xF9EF, 0x7498, 0x0000 }, + { 0xF9F0, 0x85FA, 0x0000 }, + { 0xF9F1, 0x96A3, 0x0000 }, + { 0xF9F2, 0x9C57, 0x0000 }, + { 0xF9F3, 0x9E9F, 0x0000 }, + { 0xF9F4, 0x6797, 0x0000 }, + { 0xF9F5, 0x6DCB, 0x0000 }, + { 0xF9F6, 0x81E8, 0x0000 }, + { 0xF9F7, 0x7ACB, 0x0000 }, + { 0xF9F8, 0x7B20, 0x0000 }, + { 0xF9F9, 0x7C92, 0x0000 }, + { 0xF9FA, 0x72C0, 0x0000 }, + { 0xF9FB, 0x7099, 0x0000 }, + { 0xF9FC, 0x8B58, 0x0000 }, + { 0xF9FD, 0x4EC0, 0x0000 }, + { 0xF9FE, 0x8336, 0x0000 }, + { 0xF9FF, 0x523A, 0x0000 }, + { 0xFA00, 0x5207, 0x0000 }, + { 0xFA01, 0x5EA6, 0x0000 }, + { 0xFA02, 0x62D3, 0x0000 }, + { 0xFA03, 0x7CD6, 0x0000 }, + { 0xFA04, 0x5B85, 0x0000 }, + { 0xFA05, 0x6D1E, 0x0000 }, + { 0xFA06, 0x66B4, 0x0000 }, + { 0xFA07, 0x8F3B, 0x0000 }, + { 0xFA08, 0x884C, 0x0000 }, + { 0xFA09, 0x964D, 0x0000 }, + { 0xFA0A, 0x898B, 0x0000 }, + { 0xFA0B, 0x5ED3, 0x0000 }, + { 0xFA0C, 0x5140, 0x0000 }, + { 0xFA0D, 0x55C0, 0x0000 }, + { 0xFA10, 0x585A, 0x0000 }, + { 0xFA12, 0x6674, 0x0000 }, + { 0xFA15, 0x51DE, 0x0000 }, + { 0xFA16, 0x732A, 0x0000 }, + { 0xFA17, 0x76CA, 0x0000 }, + { 0xFA18, 0x793C, 0x0000 }, + { 0xFA19, 0x795E, 0x0000 }, + { 0xFA1A, 0x7965, 0x0000 }, + { 0xFA1B, 0x798F, 0x0000 }, + { 0xFA1C, 0x9756, 0x0000 }, + { 0xFA1D, 0x7CBE, 0x0000 }, + { 0xFA1E, 0x7FBD, 0x0000 }, + { 0xFA20, 0x8612, 0x0000 }, + { 0xFA22, 0x8AF8, 0x0000 }, + { 0xFA25, 0x9038, 0x0000 }, + { 0xFA26, 0x90FD, 0x0000 }, + { 0xFA2A, 0x98EF, 0x0000 }, + { 0xFA2B, 0x98FC, 0x0000 }, + { 0xFA2C, 0x9928, 0x0000 }, + { 0xFA2D, 0x9DB4, 0x0000 }, + { 0xFA2E, 0x90DE, 0x0000 }, + { 0xFA2F, 0x96B7, 0x0000 }, + { 0xFA30, 0x4FAE, 0x0000 }, + { 0xFA31, 0x50E7, 0x0000 }, + { 0xFA32, 0x514D, 0x0000 }, + { 0xFA33, 0x52C9, 0x0000 }, + { 0xFA34, 0x52E4, 0x0000 }, + { 0xFA35, 0x5351, 0x0000 }, + { 0xFA36, 0x559D, 0x0000 }, + { 0xFA37, 0x5606, 0x0000 }, + { 0xFA38, 0x5668, 0x0000 }, + { 0xFA39, 0x5840, 0x0000 }, + { 0xFA3A, 0x58A8, 0x0000 }, + { 0xFA3B, 0x5C64, 0x0000 }, + { 0xFA3C, 0x5C6E, 0x0000 }, + { 0xFA3D, 0x6094, 0x0000 }, + { 0xFA3E, 0x6168, 0x0000 }, + { 0xFA3F, 0x618E, 0x0000 }, + { 0xFA40, 0x61F2, 0x0000 }, + { 0xFA41, 0x654F, 0x0000 }, + { 0xFA42, 0x65E2, 0x0000 }, + { 0xFA43, 0x6691, 0x0000 }, + { 0xFA44, 0x6885, 0x0000 }, + { 0xFA45, 0x6D77, 0x0000 }, + { 0xFA46, 0x6E1A, 0x0000 }, + { 0xFA47, 0x6F22, 0x0000 }, + { 0xFA48, 0x716E, 0x0000 }, + { 0xFA49, 0x722B, 0x0000 }, + { 0xFA4A, 0x7422, 0x0000 }, + { 0xFA4B, 0x7891, 0x0000 }, + { 0xFA4C, 0x793E, 0x0000 }, + { 0xFA4D, 0x7949, 0x0000 }, + { 0xFA4E, 0x7948, 0x0000 }, + { 0xFA4F, 0x7950, 0x0000 }, + { 0xFA50, 0x7956, 0x0000 }, + { 0xFA51, 0x795D, 0x0000 }, + { 0xFA52, 0x798D, 0x0000 }, + { 0xFA53, 0x798E, 0x0000 }, + { 0xFA54, 0x7A40, 0x0000 }, + { 0xFA55, 0x7A81, 0x0000 }, + { 0xFA56, 0x7BC0, 0x0000 }, + { 0xFA57, 0x7DF4, 0x0000 }, + { 0xFA58, 0x7E09, 0x0000 }, + { 0xFA59, 0x7E41, 0x0000 }, + { 0xFA5A, 0x7F72, 0x0000 }, + { 0xFA5B, 0x8005, 0x0000 }, + { 0xFA5C, 0x81ED, 0x0000 }, + { 0xFA5D, 0x8279, 0x0000 }, + { 0xFA5E, 0x8279, 0x0000 }, + { 0xFA5F, 0x8457, 0x0000 }, + { 0xFA60, 0x8910, 0x0000 }, + { 0xFA61, 0x8996, 0x0000 }, + { 0xFA62, 0x8B01, 0x0000 }, + { 0xFA63, 0x8B39, 0x0000 }, + { 0xFA64, 0x8CD3, 0x0000 }, + { 0xFA65, 0x8D08, 0x0000 }, + { 0xFA66, 0x8FB6, 0x0000 }, + { 0xFA67, 0x9038, 0x0000 }, + { 0xFA68, 0x96E3, 0x0000 }, + { 0xFA69, 0x97FF, 0x0000 }, + { 0xFA6A, 0x983B, 0x0000 }, + { 0xFA6B, 0x6075, 0x0000 }, + { 0xFA6C, 0x242EE, 0x0000 }, + { 0xFA6D, 0x8218, 0x0000 }, + { 0xFA70, 0x4E26, 0x0000 }, + { 0xFA71, 0x51B5, 0x0000 }, + { 0xFA72, 0x5168, 0x0000 }, + { 0xFA73, 0x4F80, 0x0000 }, + { 0xFA74, 0x5145, 0x0000 }, + { 0xFA75, 0x5180, 0x0000 }, + { 0xFA76, 0x52C7, 0x0000 }, + { 0xFA77, 0x52FA, 0x0000 }, + { 0xFA78, 0x559D, 0x0000 }, + { 0xFA79, 0x5555, 0x0000 }, + { 0xFA7A, 0x5599, 0x0000 }, + { 0xFA7B, 0x55E2, 0x0000 }, + { 0xFA7C, 0x585A, 0x0000 }, + { 0xFA7D, 0x58B3, 0x0000 }, + { 0xFA7E, 0x5944, 0x0000 }, + { 0xFA7F, 0x5954, 0x0000 }, + { 0xFA80, 0x5A62, 0x0000 }, + { 0xFA81, 0x5B28, 0x0000 }, + { 0xFA82, 0x5ED2, 0x0000 }, + { 0xFA83, 0x5ED9, 0x0000 }, + { 0xFA84, 0x5F69, 0x0000 }, + { 0xFA85, 0x5FAD, 0x0000 }, + { 0xFA86, 0x60D8, 0x0000 }, + { 0xFA87, 0x614E, 0x0000 }, + { 0xFA88, 0x6108, 0x0000 }, + { 0xFA89, 0x618E, 0x0000 }, + { 0xFA8A, 0x6160, 0x0000 }, + { 0xFA8B, 0x61F2, 0x0000 }, + { 0xFA8C, 0x6234, 0x0000 }, + { 0xFA8D, 0x63C4, 0x0000 }, + { 0xFA8E, 0x641C, 0x0000 }, + { 0xFA8F, 0x6452, 0x0000 }, + { 0xFA90, 0x6556, 0x0000 }, + { 0xFA91, 0x6674, 0x0000 }, + { 0xFA92, 0x6717, 0x0000 }, + { 0xFA93, 0x671B, 0x0000 }, + { 0xFA94, 0x6756, 0x0000 }, + { 0xFA95, 0x6B79, 0x0000 }, + { 0xFA96, 0x6BBA, 0x0000 }, + { 0xFA97, 0x6D41, 0x0000 }, + { 0xFA98, 0x6EDB, 0x0000 }, + { 0xFA99, 0x6ECB, 0x0000 }, + { 0xFA9A, 0x6F22, 0x0000 }, + { 0xFA9B, 0x701E, 0x0000 }, + { 0xFA9C, 0x716E, 0x0000 }, + { 0xFA9D, 0x77A7, 0x0000 }, + { 0xFA9E, 0x7235, 0x0000 }, + { 0xFA9F, 0x72AF, 0x0000 }, + { 0xFAA0, 0x732A, 0x0000 }, + { 0xFAA1, 0x7471, 0x0000 }, + { 0xFAA2, 0x7506, 0x0000 }, + { 0xFAA3, 0x753B, 0x0000 }, + { 0xFAA4, 0x761D, 0x0000 }, + { 0xFAA5, 0x761F, 0x0000 }, + { 0xFAA6, 0x76CA, 0x0000 }, + { 0xFAA7, 0x76DB, 0x0000 }, + { 0xFAA8, 0x76F4, 0x0000 }, + { 0xFAA9, 0x774A, 0x0000 }, + { 0xFAAA, 0x7740, 0x0000 }, + { 0xFAAB, 0x78CC, 0x0000 }, + { 0xFAAC, 0x7AB1, 0x0000 }, + { 0xFAAD, 0x7BC0, 0x0000 }, + { 0xFAAE, 0x7C7B, 0x0000 }, + { 0xFAAF, 0x7D5B, 0x0000 }, + { 0xFAB0, 0x7DF4, 0x0000 }, + { 0xFAB1, 0x7F3E, 0x0000 }, + { 0xFAB2, 0x8005, 0x0000 }, + { 0xFAB3, 0x8352, 0x0000 }, + { 0xFAB4, 0x83EF, 0x0000 }, + { 0xFAB5, 0x8779, 0x0000 }, + { 0xFAB6, 0x8941, 0x0000 }, + { 0xFAB7, 0x8986, 0x0000 }, + { 0xFAB8, 0x8996, 0x0000 }, + { 0xFAB9, 0x8ABF, 0x0000 }, + { 0xFABA, 0x8AF8, 0x0000 }, + { 0xFABB, 0x8ACB, 0x0000 }, + { 0xFABC, 0x8B01, 0x0000 }, + { 0xFABD, 0x8AFE, 0x0000 }, + { 0xFABE, 0x8AED, 0x0000 }, + { 0xFABF, 0x8B39, 0x0000 }, + { 0xFAC0, 0x8B8A, 0x0000 }, + { 0xFAC1, 0x8D08, 0x0000 }, + { 0xFAC2, 0x8F38, 0x0000 }, + { 0xFAC3, 0x9072, 0x0000 }, + { 0xFAC4, 0x9199, 0x0000 }, + { 0xFAC5, 0x9276, 0x0000 }, + { 0xFAC6, 0x967C, 0x0000 }, + { 0xFAC7, 0x96E3, 0x0000 }, + { 0xFAC8, 0x9756, 0x0000 }, + { 0xFAC9, 0x97DB, 0x0000 }, + { 0xFACA, 0x97FF, 0x0000 }, + { 0xFACB, 0x980B, 0x0000 }, + { 0xFACC, 0x983B, 0x0000 }, + { 0xFACD, 0x9B12, 0x0000 }, + { 0xFACE, 0x9F9C, 0x0000 }, + { 0xFACF, 0x2284A, 0x0000 }, + { 0xFAD0, 0x22844, 0x0000 }, + { 0xFAD1, 0x233D5, 0x0000 }, + { 0xFAD2, 0x3B9D, 0x0000 }, + { 0xFAD3, 0x4018, 0x0000 }, + { 0xFAD4, 0x4039, 0x0000 }, + { 0xFAD5, 0x25249, 0x0000 }, + { 0xFAD6, 0x25CD0, 0x0000 }, + { 0xFAD7, 0x27ED3, 0x0000 }, + { 0xFAD8, 0x9F43, 0x0000 }, + { 0xFAD9, 0x9F8E, 0x0000 }, + { 0xFB1D, 0x05D9, 0x05B4 }, + { 0xFB1F, 0x05F2, 0x05B7 }, + { 0xFB2A, 0x05E9, 0x05C1 }, + { 0xFB2B, 0x05E9, 0x05C2 }, + { 0xFB2C, 0xFB49, 0x05C1 }, + { 0xFB2D, 0xFB49, 0x05C2 }, + { 0xFB2E, 0x05D0, 0x05B7 }, + { 0xFB2F, 0x05D0, 0x05B8 }, + { 0xFB30, 0x05D0, 0x05BC }, + { 0xFB31, 0x05D1, 0x05BC }, + { 0xFB32, 0x05D2, 0x05BC }, + { 0xFB33, 0x05D3, 0x05BC }, + { 0xFB34, 0x05D4, 0x05BC }, + { 0xFB35, 0x05D5, 0x05BC }, + { 0xFB36, 0x05D6, 0x05BC }, + { 0xFB38, 0x05D8, 0x05BC }, + { 0xFB39, 0x05D9, 0x05BC }, + { 0xFB3A, 0x05DA, 0x05BC }, + { 0xFB3B, 0x05DB, 0x05BC }, + { 0xFB3C, 0x05DC, 0x05BC }, + { 0xFB3E, 0x05DE, 0x05BC }, + { 0xFB40, 0x05E0, 0x05BC }, + { 0xFB41, 0x05E1, 0x05BC }, + { 0xFB43, 0x05E3, 0x05BC }, + { 0xFB44, 0x05E4, 0x05BC }, + { 0xFB46, 0x05E6, 0x05BC }, + { 0xFB47, 0x05E7, 0x05BC }, + { 0xFB48, 0x05E8, 0x05BC }, + { 0xFB49, 0x05E9, 0x05BC }, + { 0xFB4A, 0x05EA, 0x05BC }, + { 0xFB4B, 0x05D5, 0x05B9 }, + { 0xFB4C, 0x05D1, 0x05BF }, + { 0xFB4D, 0x05DB, 0x05BF }, + { 0xFB4E, 0x05E4, 0x05BF }, + { 0x1109A, 0x11099, 0x110BA }, + { 0x1109C, 0x1109B, 0x110BA }, + { 0x110AB, 0x110A5, 0x110BA }, + { 0x1112E, 0x11131, 0x11127 }, + { 0x1112F, 0x11132, 0x11127 }, + { 0x1134B, 0x11347, 0x1133E }, + { 0x1134C, 0x11347, 0x11357 }, + { 0x114BB, 0x114B9, 0x114BA }, + { 0x114BC, 0x114B9, 0x114B0 }, + { 0x114BE, 0x114B9, 0x114BD }, + { 0x115BA, 0x115B8, 0x115AF }, + { 0x115BB, 0x115B9, 0x115AF }, + { 0x11938, 0x11935, 0x11930 }, + { 0x1D15E, 0x1D157, 0x1D165 }, + { 0x1D15F, 0x1D158, 0x1D165 }, + { 0x1D160, 0x1D15F, 0x1D16E }, + { 0x1D161, 0x1D15F, 0x1D16F }, + { 0x1D162, 0x1D15F, 0x1D170 }, + { 0x1D163, 0x1D15F, 0x1D171 }, + { 0x1D164, 0x1D15F, 0x1D172 }, + { 0x1D1BB, 0x1D1B9, 0x1D165 }, + { 0x1D1BC, 0x1D1BA, 0x1D165 }, + { 0x1D1BD, 0x1D1BB, 0x1D16E }, + { 0x1D1BE, 0x1D1BC, 0x1D16E }, + { 0x1D1BF, 0x1D1BB, 0x1D16F }, + { 0x1D1C0, 0x1D1BC, 0x1D16F }, + { 0x2F800, 0x4E3D, 0x0000 }, + { 0x2F801, 0x4E38, 0x0000 }, + { 0x2F802, 0x4E41, 0x0000 }, + { 0x2F803, 0x20122, 0x0000 }, + { 0x2F804, 0x4F60, 0x0000 }, + { 0x2F805, 0x4FAE, 0x0000 }, + { 0x2F806, 0x4FBB, 0x0000 }, + { 0x2F807, 0x5002, 0x0000 }, + { 0x2F808, 0x507A, 0x0000 }, + { 0x2F809, 0x5099, 0x0000 }, + { 0x2F80A, 0x50E7, 0x0000 }, + { 0x2F80B, 0x50CF, 0x0000 }, + { 0x2F80C, 0x349E, 0x0000 }, + { 0x2F80D, 0x2063A, 0x0000 }, + { 0x2F80E, 0x514D, 0x0000 }, + { 0x2F80F, 0x5154, 0x0000 }, + { 0x2F810, 0x5164, 0x0000 }, + { 0x2F811, 0x5177, 0x0000 }, + { 0x2F812, 0x2051C, 0x0000 }, + { 0x2F813, 0x34B9, 0x0000 }, + { 0x2F814, 0x5167, 0x0000 }, + { 0x2F815, 0x518D, 0x0000 }, + { 0x2F816, 0x2054B, 0x0000 }, + { 0x2F817, 0x5197, 0x0000 }, + { 0x2F818, 0x51A4, 0x0000 }, + { 0x2F819, 0x4ECC, 0x0000 }, + { 0x2F81A, 0x51AC, 0x0000 }, + { 0x2F81B, 0x51B5, 0x0000 }, + { 0x2F81C, 0x291DF, 0x0000 }, + { 0x2F81D, 0x51F5, 0x0000 }, + { 0x2F81E, 0x5203, 0x0000 }, + { 0x2F81F, 0x34DF, 0x0000 }, + { 0x2F820, 0x523B, 0x0000 }, + { 0x2F821, 0x5246, 0x0000 }, + { 0x2F822, 0x5272, 0x0000 }, + { 0x2F823, 0x5277, 0x0000 }, + { 0x2F824, 0x3515, 0x0000 }, + { 0x2F825, 0x52C7, 0x0000 }, + { 0x2F826, 0x52C9, 0x0000 }, + { 0x2F827, 0x52E4, 0x0000 }, + { 0x2F828, 0x52FA, 0x0000 }, + { 0x2F829, 0x5305, 0x0000 }, + { 0x2F82A, 0x5306, 0x0000 }, + { 0x2F82B, 0x5317, 0x0000 }, + { 0x2F82C, 0x5349, 0x0000 }, + { 0x2F82D, 0x5351, 0x0000 }, + { 0x2F82E, 0x535A, 0x0000 }, + { 0x2F82F, 0x5373, 0x0000 }, + { 0x2F830, 0x537D, 0x0000 }, + { 0x2F831, 0x537F, 0x0000 }, + { 0x2F832, 0x537F, 0x0000 }, + { 0x2F833, 0x537F, 0x0000 }, + { 0x2F834, 0x20A2C, 0x0000 }, + { 0x2F835, 0x7070, 0x0000 }, + { 0x2F836, 0x53CA, 0x0000 }, + { 0x2F837, 0x53DF, 0x0000 }, + { 0x2F838, 0x20B63, 0x0000 }, + { 0x2F839, 0x53EB, 0x0000 }, + { 0x2F83A, 0x53F1, 0x0000 }, + { 0x2F83B, 0x5406, 0x0000 }, + { 0x2F83C, 0x549E, 0x0000 }, + { 0x2F83D, 0x5438, 0x0000 }, + { 0x2F83E, 0x5448, 0x0000 }, + { 0x2F83F, 0x5468, 0x0000 }, + { 0x2F840, 0x54A2, 0x0000 }, + { 0x2F841, 0x54F6, 0x0000 }, + { 0x2F842, 0x5510, 0x0000 }, + { 0x2F843, 0x5553, 0x0000 }, + { 0x2F844, 0x5563, 0x0000 }, + { 0x2F845, 0x5584, 0x0000 }, + { 0x2F846, 0x5584, 0x0000 }, + { 0x2F847, 0x5599, 0x0000 }, + { 0x2F848, 0x55AB, 0x0000 }, + { 0x2F849, 0x55B3, 0x0000 }, + { 0x2F84A, 0x55C2, 0x0000 }, + { 0x2F84B, 0x5716, 0x0000 }, + { 0x2F84C, 0x5606, 0x0000 }, + { 0x2F84D, 0x5717, 0x0000 }, + { 0x2F84E, 0x5651, 0x0000 }, + { 0x2F84F, 0x5674, 0x0000 }, + { 0x2F850, 0x5207, 0x0000 }, + { 0x2F851, 0x58EE, 0x0000 }, + { 0x2F852, 0x57CE, 0x0000 }, + { 0x2F853, 0x57F4, 0x0000 }, + { 0x2F854, 0x580D, 0x0000 }, + { 0x2F855, 0x578B, 0x0000 }, + { 0x2F856, 0x5832, 0x0000 }, + { 0x2F857, 0x5831, 0x0000 }, + { 0x2F858, 0x58AC, 0x0000 }, + { 0x2F859, 0x214E4, 0x0000 }, + { 0x2F85A, 0x58F2, 0x0000 }, + { 0x2F85B, 0x58F7, 0x0000 }, + { 0x2F85C, 0x5906, 0x0000 }, + { 0x2F85D, 0x591A, 0x0000 }, + { 0x2F85E, 0x5922, 0x0000 }, + { 0x2F85F, 0x5962, 0x0000 }, + { 0x2F860, 0x216A8, 0x0000 }, + { 0x2F861, 0x216EA, 0x0000 }, + { 0x2F862, 0x59EC, 0x0000 }, + { 0x2F863, 0x5A1B, 0x0000 }, + { 0x2F864, 0x5A27, 0x0000 }, + { 0x2F865, 0x59D8, 0x0000 }, + { 0x2F866, 0x5A66, 0x0000 }, + { 0x2F867, 0x36EE, 0x0000 }, + { 0x2F868, 0x36FC, 0x0000 }, + { 0x2F869, 0x5B08, 0x0000 }, + { 0x2F86A, 0x5B3E, 0x0000 }, + { 0x2F86B, 0x5B3E, 0x0000 }, + { 0x2F86C, 0x219C8, 0x0000 }, + { 0x2F86D, 0x5BC3, 0x0000 }, + { 0x2F86E, 0x5BD8, 0x0000 }, + { 0x2F86F, 0x5BE7, 0x0000 }, + { 0x2F870, 0x5BF3, 0x0000 }, + { 0x2F871, 0x21B18, 0x0000 }, + { 0x2F872, 0x5BFF, 0x0000 }, + { 0x2F873, 0x5C06, 0x0000 }, + { 0x2F874, 0x5F53, 0x0000 }, + { 0x2F875, 0x5C22, 0x0000 }, + { 0x2F876, 0x3781, 0x0000 }, + { 0x2F877, 0x5C60, 0x0000 }, + { 0x2F878, 0x5C6E, 0x0000 }, + { 0x2F879, 0x5CC0, 0x0000 }, + { 0x2F87A, 0x5C8D, 0x0000 }, + { 0x2F87B, 0x21DE4, 0x0000 }, + { 0x2F87C, 0x5D43, 0x0000 }, + { 0x2F87D, 0x21DE6, 0x0000 }, + { 0x2F87E, 0x5D6E, 0x0000 }, + { 0x2F87F, 0x5D6B, 0x0000 }, + { 0x2F880, 0x5D7C, 0x0000 }, + { 0x2F881, 0x5DE1, 0x0000 }, + { 0x2F882, 0x5DE2, 0x0000 }, + { 0x2F883, 0x382F, 0x0000 }, + { 0x2F884, 0x5DFD, 0x0000 }, + { 0x2F885, 0x5E28, 0x0000 }, + { 0x2F886, 0x5E3D, 0x0000 }, + { 0x2F887, 0x5E69, 0x0000 }, + { 0x2F888, 0x3862, 0x0000 }, + { 0x2F889, 0x22183, 0x0000 }, + { 0x2F88A, 0x387C, 0x0000 }, + { 0x2F88B, 0x5EB0, 0x0000 }, + { 0x2F88C, 0x5EB3, 0x0000 }, + { 0x2F88D, 0x5EB6, 0x0000 }, + { 0x2F88E, 0x5ECA, 0x0000 }, + { 0x2F88F, 0x2A392, 0x0000 }, + { 0x2F890, 0x5EFE, 0x0000 }, + { 0x2F891, 0x22331, 0x0000 }, + { 0x2F892, 0x22331, 0x0000 }, + { 0x2F893, 0x8201, 0x0000 }, + { 0x2F894, 0x5F22, 0x0000 }, + { 0x2F895, 0x5F22, 0x0000 }, + { 0x2F896, 0x38C7, 0x0000 }, + { 0x2F897, 0x232B8, 0x0000 }, + { 0x2F898, 0x261DA, 0x0000 }, + { 0x2F899, 0x5F62, 0x0000 }, + { 0x2F89A, 0x5F6B, 0x0000 }, + { 0x2F89B, 0x38E3, 0x0000 }, + { 0x2F89C, 0x5F9A, 0x0000 }, + { 0x2F89D, 0x5FCD, 0x0000 }, + { 0x2F89E, 0x5FD7, 0x0000 }, + { 0x2F89F, 0x5FF9, 0x0000 }, + { 0x2F8A0, 0x6081, 0x0000 }, + { 0x2F8A1, 0x393A, 0x0000 }, + { 0x2F8A2, 0x391C, 0x0000 }, + { 0x2F8A3, 0x6094, 0x0000 }, + { 0x2F8A4, 0x226D4, 0x0000 }, + { 0x2F8A5, 0x60C7, 0x0000 }, + { 0x2F8A6, 0x6148, 0x0000 }, + { 0x2F8A7, 0x614C, 0x0000 }, + { 0x2F8A8, 0x614E, 0x0000 }, + { 0x2F8A9, 0x614C, 0x0000 }, + { 0x2F8AA, 0x617A, 0x0000 }, + { 0x2F8AB, 0x618E, 0x0000 }, + { 0x2F8AC, 0x61B2, 0x0000 }, + { 0x2F8AD, 0x61A4, 0x0000 }, + { 0x2F8AE, 0x61AF, 0x0000 }, + { 0x2F8AF, 0x61DE, 0x0000 }, + { 0x2F8B0, 0x61F2, 0x0000 }, + { 0x2F8B1, 0x61F6, 0x0000 }, + { 0x2F8B2, 0x6210, 0x0000 }, + { 0x2F8B3, 0x621B, 0x0000 }, + { 0x2F8B4, 0x625D, 0x0000 }, + { 0x2F8B5, 0x62B1, 0x0000 }, + { 0x2F8B6, 0x62D4, 0x0000 }, + { 0x2F8B7, 0x6350, 0x0000 }, + { 0x2F8B8, 0x22B0C, 0x0000 }, + { 0x2F8B9, 0x633D, 0x0000 }, + { 0x2F8BA, 0x62FC, 0x0000 }, + { 0x2F8BB, 0x6368, 0x0000 }, + { 0x2F8BC, 0x6383, 0x0000 }, + { 0x2F8BD, 0x63E4, 0x0000 }, + { 0x2F8BE, 0x22BF1, 0x0000 }, + { 0x2F8BF, 0x6422, 0x0000 }, + { 0x2F8C0, 0x63C5, 0x0000 }, + { 0x2F8C1, 0x63A9, 0x0000 }, + { 0x2F8C2, 0x3A2E, 0x0000 }, + { 0x2F8C3, 0x6469, 0x0000 }, + { 0x2F8C4, 0x647E, 0x0000 }, + { 0x2F8C5, 0x649D, 0x0000 }, + { 0x2F8C6, 0x6477, 0x0000 }, + { 0x2F8C7, 0x3A6C, 0x0000 }, + { 0x2F8C8, 0x654F, 0x0000 }, + { 0x2F8C9, 0x656C, 0x0000 }, + { 0x2F8CA, 0x2300A, 0x0000 }, + { 0x2F8CB, 0x65E3, 0x0000 }, + { 0x2F8CC, 0x66F8, 0x0000 }, + { 0x2F8CD, 0x6649, 0x0000 }, + { 0x2F8CE, 0x3B19, 0x0000 }, + { 0x2F8CF, 0x6691, 0x0000 }, + { 0x2F8D0, 0x3B08, 0x0000 }, + { 0x2F8D1, 0x3AE4, 0x0000 }, + { 0x2F8D2, 0x5192, 0x0000 }, + { 0x2F8D3, 0x5195, 0x0000 }, + { 0x2F8D4, 0x6700, 0x0000 }, + { 0x2F8D5, 0x669C, 0x0000 }, + { 0x2F8D6, 0x80AD, 0x0000 }, + { 0x2F8D7, 0x43D9, 0x0000 }, + { 0x2F8D8, 0x6717, 0x0000 }, + { 0x2F8D9, 0x671B, 0x0000 }, + { 0x2F8DA, 0x6721, 0x0000 }, + { 0x2F8DB, 0x675E, 0x0000 }, + { 0x2F8DC, 0x6753, 0x0000 }, + { 0x2F8DD, 0x233C3, 0x0000 }, + { 0x2F8DE, 0x3B49, 0x0000 }, + { 0x2F8DF, 0x67FA, 0x0000 }, + { 0x2F8E0, 0x6785, 0x0000 }, + { 0x2F8E1, 0x6852, 0x0000 }, + { 0x2F8E2, 0x6885, 0x0000 }, + { 0x2F8E3, 0x2346D, 0x0000 }, + { 0x2F8E4, 0x688E, 0x0000 }, + { 0x2F8E5, 0x681F, 0x0000 }, + { 0x2F8E6, 0x6914, 0x0000 }, + { 0x2F8E7, 0x3B9D, 0x0000 }, + { 0x2F8E8, 0x6942, 0x0000 }, + { 0x2F8E9, 0x69A3, 0x0000 }, + { 0x2F8EA, 0x69EA, 0x0000 }, + { 0x2F8EB, 0x6AA8, 0x0000 }, + { 0x2F8EC, 0x236A3, 0x0000 }, + { 0x2F8ED, 0x6ADB, 0x0000 }, + { 0x2F8EE, 0x3C18, 0x0000 }, + { 0x2F8EF, 0x6B21, 0x0000 }, + { 0x2F8F0, 0x238A7, 0x0000 }, + { 0x2F8F1, 0x6B54, 0x0000 }, + { 0x2F8F2, 0x3C4E, 0x0000 }, + { 0x2F8F3, 0x6B72, 0x0000 }, + { 0x2F8F4, 0x6B9F, 0x0000 }, + { 0x2F8F5, 0x6BBA, 0x0000 }, + { 0x2F8F6, 0x6BBB, 0x0000 }, + { 0x2F8F7, 0x23A8D, 0x0000 }, + { 0x2F8F8, 0x21D0B, 0x0000 }, + { 0x2F8F9, 0x23AFA, 0x0000 }, + { 0x2F8FA, 0x6C4E, 0x0000 }, + { 0x2F8FB, 0x23CBC, 0x0000 }, + { 0x2F8FC, 0x6CBF, 0x0000 }, + { 0x2F8FD, 0x6CCD, 0x0000 }, + { 0x2F8FE, 0x6C67, 0x0000 }, + { 0x2F8FF, 0x6D16, 0x0000 }, + { 0x2F900, 0x6D3E, 0x0000 }, + { 0x2F901, 0x6D77, 0x0000 }, + { 0x2F902, 0x6D41, 0x0000 }, + { 0x2F903, 0x6D69, 0x0000 }, + { 0x2F904, 0x6D78, 0x0000 }, + { 0x2F905, 0x6D85, 0x0000 }, + { 0x2F906, 0x23D1E, 0x0000 }, + { 0x2F907, 0x6D34, 0x0000 }, + { 0x2F908, 0x6E2F, 0x0000 }, + { 0x2F909, 0x6E6E, 0x0000 }, + { 0x2F90A, 0x3D33, 0x0000 }, + { 0x2F90B, 0x6ECB, 0x0000 }, + { 0x2F90C, 0x6EC7, 0x0000 }, + { 0x2F90D, 0x23ED1, 0x0000 }, + { 0x2F90E, 0x6DF9, 0x0000 }, + { 0x2F90F, 0x6F6E, 0x0000 }, + { 0x2F910, 0x23F5E, 0x0000 }, + { 0x2F911, 0x23F8E, 0x0000 }, + { 0x2F912, 0x6FC6, 0x0000 }, + { 0x2F913, 0x7039, 0x0000 }, + { 0x2F914, 0x701E, 0x0000 }, + { 0x2F915, 0x701B, 0x0000 }, + { 0x2F916, 0x3D96, 0x0000 }, + { 0x2F917, 0x704A, 0x0000 }, + { 0x2F918, 0x707D, 0x0000 }, + { 0x2F919, 0x7077, 0x0000 }, + { 0x2F91A, 0x70AD, 0x0000 }, + { 0x2F91B, 0x20525, 0x0000 }, + { 0x2F91C, 0x7145, 0x0000 }, + { 0x2F91D, 0x24263, 0x0000 }, + { 0x2F91E, 0x719C, 0x0000 }, + { 0x2F91F, 0x243AB, 0x0000 }, + { 0x2F920, 0x7228, 0x0000 }, + { 0x2F921, 0x7235, 0x0000 }, + { 0x2F922, 0x7250, 0x0000 }, + { 0x2F923, 0x24608, 0x0000 }, + { 0x2F924, 0x7280, 0x0000 }, + { 0x2F925, 0x7295, 0x0000 }, + { 0x2F926, 0x24735, 0x0000 }, + { 0x2F927, 0x24814, 0x0000 }, + { 0x2F928, 0x737A, 0x0000 }, + { 0x2F929, 0x738B, 0x0000 }, + { 0x2F92A, 0x3EAC, 0x0000 }, + { 0x2F92B, 0x73A5, 0x0000 }, + { 0x2F92C, 0x3EB8, 0x0000 }, + { 0x2F92D, 0x3EB8, 0x0000 }, + { 0x2F92E, 0x7447, 0x0000 }, + { 0x2F92F, 0x745C, 0x0000 }, + { 0x2F930, 0x7471, 0x0000 }, + { 0x2F931, 0x7485, 0x0000 }, + { 0x2F932, 0x74CA, 0x0000 }, + { 0x2F933, 0x3F1B, 0x0000 }, + { 0x2F934, 0x7524, 0x0000 }, + { 0x2F935, 0x24C36, 0x0000 }, + { 0x2F936, 0x753E, 0x0000 }, + { 0x2F937, 0x24C92, 0x0000 }, + { 0x2F938, 0x7570, 0x0000 }, + { 0x2F939, 0x2219F, 0x0000 }, + { 0x2F93A, 0x7610, 0x0000 }, + { 0x2F93B, 0x24FA1, 0x0000 }, + { 0x2F93C, 0x24FB8, 0x0000 }, + { 0x2F93D, 0x25044, 0x0000 }, + { 0x2F93E, 0x3FFC, 0x0000 }, + { 0x2F93F, 0x4008, 0x0000 }, + { 0x2F940, 0x76F4, 0x0000 }, + { 0x2F941, 0x250F3, 0x0000 }, + { 0x2F942, 0x250F2, 0x0000 }, + { 0x2F943, 0x25119, 0x0000 }, + { 0x2F944, 0x25133, 0x0000 }, + { 0x2F945, 0x771E, 0x0000 }, + { 0x2F946, 0x771F, 0x0000 }, + { 0x2F947, 0x771F, 0x0000 }, + { 0x2F948, 0x774A, 0x0000 }, + { 0x2F949, 0x4039, 0x0000 }, + { 0x2F94A, 0x778B, 0x0000 }, + { 0x2F94B, 0x4046, 0x0000 }, + { 0x2F94C, 0x4096, 0x0000 }, + { 0x2F94D, 0x2541D, 0x0000 }, + { 0x2F94E, 0x784E, 0x0000 }, + { 0x2F94F, 0x788C, 0x0000 }, + { 0x2F950, 0x78CC, 0x0000 }, + { 0x2F951, 0x40E3, 0x0000 }, + { 0x2F952, 0x25626, 0x0000 }, + { 0x2F953, 0x7956, 0x0000 }, + { 0x2F954, 0x2569A, 0x0000 }, + { 0x2F955, 0x256C5, 0x0000 }, + { 0x2F956, 0x798F, 0x0000 }, + { 0x2F957, 0x79EB, 0x0000 }, + { 0x2F958, 0x412F, 0x0000 }, + { 0x2F959, 0x7A40, 0x0000 }, + { 0x2F95A, 0x7A4A, 0x0000 }, + { 0x2F95B, 0x7A4F, 0x0000 }, + { 0x2F95C, 0x2597C, 0x0000 }, + { 0x2F95D, 0x25AA7, 0x0000 }, + { 0x2F95E, 0x25AA7, 0x0000 }, + { 0x2F95F, 0x7AEE, 0x0000 }, + { 0x2F960, 0x4202, 0x0000 }, + { 0x2F961, 0x25BAB, 0x0000 }, + { 0x2F962, 0x7BC6, 0x0000 }, + { 0x2F963, 0x7BC9, 0x0000 }, + { 0x2F964, 0x4227, 0x0000 }, + { 0x2F965, 0x25C80, 0x0000 }, + { 0x2F966, 0x7CD2, 0x0000 }, + { 0x2F967, 0x42A0, 0x0000 }, + { 0x2F968, 0x7CE8, 0x0000 }, + { 0x2F969, 0x7CE3, 0x0000 }, + { 0x2F96A, 0x7D00, 0x0000 }, + { 0x2F96B, 0x25F86, 0x0000 }, + { 0x2F96C, 0x7D63, 0x0000 }, + { 0x2F96D, 0x4301, 0x0000 }, + { 0x2F96E, 0x7DC7, 0x0000 }, + { 0x2F96F, 0x7E02, 0x0000 }, + { 0x2F970, 0x7E45, 0x0000 }, + { 0x2F971, 0x4334, 0x0000 }, + { 0x2F972, 0x26228, 0x0000 }, + { 0x2F973, 0x26247, 0x0000 }, + { 0x2F974, 0x4359, 0x0000 }, + { 0x2F975, 0x262D9, 0x0000 }, + { 0x2F976, 0x7F7A, 0x0000 }, + { 0x2F977, 0x2633E, 0x0000 }, + { 0x2F978, 0x7F95, 0x0000 }, + { 0x2F979, 0x7FFA, 0x0000 }, + { 0x2F97A, 0x8005, 0x0000 }, + { 0x2F97B, 0x264DA, 0x0000 }, + { 0x2F97C, 0x26523, 0x0000 }, + { 0x2F97D, 0x8060, 0x0000 }, + { 0x2F97E, 0x265A8, 0x0000 }, + { 0x2F97F, 0x8070, 0x0000 }, + { 0x2F980, 0x2335F, 0x0000 }, + { 0x2F981, 0x43D5, 0x0000 }, + { 0x2F982, 0x80B2, 0x0000 }, + { 0x2F983, 0x8103, 0x0000 }, + { 0x2F984, 0x440B, 0x0000 }, + { 0x2F985, 0x813E, 0x0000 }, + { 0x2F986, 0x5AB5, 0x0000 }, + { 0x2F987, 0x267A7, 0x0000 }, + { 0x2F988, 0x267B5, 0x0000 }, + { 0x2F989, 0x23393, 0x0000 }, + { 0x2F98A, 0x2339C, 0x0000 }, + { 0x2F98B, 0x8201, 0x0000 }, + { 0x2F98C, 0x8204, 0x0000 }, + { 0x2F98D, 0x8F9E, 0x0000 }, + { 0x2F98E, 0x446B, 0x0000 }, + { 0x2F98F, 0x8291, 0x0000 }, + { 0x2F990, 0x828B, 0x0000 }, + { 0x2F991, 0x829D, 0x0000 }, + { 0x2F992, 0x52B3, 0x0000 }, + { 0x2F993, 0x82B1, 0x0000 }, + { 0x2F994, 0x82B3, 0x0000 }, + { 0x2F995, 0x82BD, 0x0000 }, + { 0x2F996, 0x82E6, 0x0000 }, + { 0x2F997, 0x26B3C, 0x0000 }, + { 0x2F998, 0x82E5, 0x0000 }, + { 0x2F999, 0x831D, 0x0000 }, + { 0x2F99A, 0x8363, 0x0000 }, + { 0x2F99B, 0x83AD, 0x0000 }, + { 0x2F99C, 0x8323, 0x0000 }, + { 0x2F99D, 0x83BD, 0x0000 }, + { 0x2F99E, 0x83E7, 0x0000 }, + { 0x2F99F, 0x8457, 0x0000 }, + { 0x2F9A0, 0x8353, 0x0000 }, + { 0x2F9A1, 0x83CA, 0x0000 }, + { 0x2F9A2, 0x83CC, 0x0000 }, + { 0x2F9A3, 0x83DC, 0x0000 }, + { 0x2F9A4, 0x26C36, 0x0000 }, + { 0x2F9A5, 0x26D6B, 0x0000 }, + { 0x2F9A6, 0x26CD5, 0x0000 }, + { 0x2F9A7, 0x452B, 0x0000 }, + { 0x2F9A8, 0x84F1, 0x0000 }, + { 0x2F9A9, 0x84F3, 0x0000 }, + { 0x2F9AA, 0x8516, 0x0000 }, + { 0x2F9AB, 0x273CA, 0x0000 }, + { 0x2F9AC, 0x8564, 0x0000 }, + { 0x2F9AD, 0x26F2C, 0x0000 }, + { 0x2F9AE, 0x455D, 0x0000 }, + { 0x2F9AF, 0x4561, 0x0000 }, + { 0x2F9B0, 0x26FB1, 0x0000 }, + { 0x2F9B1, 0x270D2, 0x0000 }, + { 0x2F9B2, 0x456B, 0x0000 }, + { 0x2F9B3, 0x8650, 0x0000 }, + { 0x2F9B4, 0x865C, 0x0000 }, + { 0x2F9B5, 0x8667, 0x0000 }, + { 0x2F9B6, 0x8669, 0x0000 }, + { 0x2F9B7, 0x86A9, 0x0000 }, + { 0x2F9B8, 0x8688, 0x0000 }, + { 0x2F9B9, 0x870E, 0x0000 }, + { 0x2F9BA, 0x86E2, 0x0000 }, + { 0x2F9BB, 0x8779, 0x0000 }, + { 0x2F9BC, 0x8728, 0x0000 }, + { 0x2F9BD, 0x876B, 0x0000 }, + { 0x2F9BE, 0x8786, 0x0000 }, + { 0x2F9BF, 0x45D7, 0x0000 }, + { 0x2F9C0, 0x87E1, 0x0000 }, + { 0x2F9C1, 0x8801, 0x0000 }, + { 0x2F9C2, 0x45F9, 0x0000 }, + { 0x2F9C3, 0x8860, 0x0000 }, + { 0x2F9C4, 0x8863, 0x0000 }, + { 0x2F9C5, 0x27667, 0x0000 }, + { 0x2F9C6, 0x88D7, 0x0000 }, + { 0x2F9C7, 0x88DE, 0x0000 }, + { 0x2F9C8, 0x4635, 0x0000 }, + { 0x2F9C9, 0x88FA, 0x0000 }, + { 0x2F9CA, 0x34BB, 0x0000 }, + { 0x2F9CB, 0x278AE, 0x0000 }, + { 0x2F9CC, 0x27966, 0x0000 }, + { 0x2F9CD, 0x46BE, 0x0000 }, + { 0x2F9CE, 0x46C7, 0x0000 }, + { 0x2F9CF, 0x8AA0, 0x0000 }, + { 0x2F9D0, 0x8AED, 0x0000 }, + { 0x2F9D1, 0x8B8A, 0x0000 }, + { 0x2F9D2, 0x8C55, 0x0000 }, + { 0x2F9D3, 0x27CA8, 0x0000 }, + { 0x2F9D4, 0x8CAB, 0x0000 }, + { 0x2F9D5, 0x8CC1, 0x0000 }, + { 0x2F9D6, 0x8D1B, 0x0000 }, + { 0x2F9D7, 0x8D77, 0x0000 }, + { 0x2F9D8, 0x27F2F, 0x0000 }, + { 0x2F9D9, 0x20804, 0x0000 }, + { 0x2F9DA, 0x8DCB, 0x0000 }, + { 0x2F9DB, 0x8DBC, 0x0000 }, + { 0x2F9DC, 0x8DF0, 0x0000 }, + { 0x2F9DD, 0x208DE, 0x0000 }, + { 0x2F9DE, 0x8ED4, 0x0000 }, + { 0x2F9DF, 0x8F38, 0x0000 }, + { 0x2F9E0, 0x285D2, 0x0000 }, + { 0x2F9E1, 0x285ED, 0x0000 }, + { 0x2F9E2, 0x9094, 0x0000 }, + { 0x2F9E3, 0x90F1, 0x0000 }, + { 0x2F9E4, 0x9111, 0x0000 }, + { 0x2F9E5, 0x2872E, 0x0000 }, + { 0x2F9E6, 0x911B, 0x0000 }, + { 0x2F9E7, 0x9238, 0x0000 }, + { 0x2F9E8, 0x92D7, 0x0000 }, + { 0x2F9E9, 0x92D8, 0x0000 }, + { 0x2F9EA, 0x927C, 0x0000 }, + { 0x2F9EB, 0x93F9, 0x0000 }, + { 0x2F9EC, 0x9415, 0x0000 }, + { 0x2F9ED, 0x28BFA, 0x0000 }, + { 0x2F9EE, 0x958B, 0x0000 }, + { 0x2F9EF, 0x4995, 0x0000 }, + { 0x2F9F0, 0x95B7, 0x0000 }, + { 0x2F9F1, 0x28D77, 0x0000 }, + { 0x2F9F2, 0x49E6, 0x0000 }, + { 0x2F9F3, 0x96C3, 0x0000 }, + { 0x2F9F4, 0x5DB2, 0x0000 }, + { 0x2F9F5, 0x9723, 0x0000 }, + { 0x2F9F6, 0x29145, 0x0000 }, + { 0x2F9F7, 0x2921A, 0x0000 }, + { 0x2F9F8, 0x4A6E, 0x0000 }, + { 0x2F9F9, 0x4A76, 0x0000 }, + { 0x2F9FA, 0x97E0, 0x0000 }, + { 0x2F9FB, 0x2940A, 0x0000 }, + { 0x2F9FC, 0x4AB2, 0x0000 }, + { 0x2F9FD, 0x29496, 0x0000 }, + { 0x2F9FE, 0x980B, 0x0000 }, + { 0x2F9FF, 0x980B, 0x0000 }, + { 0x2FA00, 0x9829, 0x0000 }, + { 0x2FA01, 0x295B6, 0x0000 }, + { 0x2FA02, 0x98E2, 0x0000 }, + { 0x2FA03, 0x4B33, 0x0000 }, + { 0x2FA04, 0x9929, 0x0000 }, + { 0x2FA05, 0x99A7, 0x0000 }, + { 0x2FA06, 0x99C2, 0x0000 }, + { 0x2FA07, 0x99FE, 0x0000 }, + { 0x2FA08, 0x4BCE, 0x0000 }, + { 0x2FA09, 0x29B30, 0x0000 }, + { 0x2FA0A, 0x9B12, 0x0000 }, + { 0x2FA0B, 0x9C40, 0x0000 }, + { 0x2FA0C, 0x9CFD, 0x0000 }, + { 0x2FA0D, 0x4CCE, 0x0000 }, + { 0x2FA0E, 0x4CED, 0x0000 }, + { 0x2FA0F, 0x9D67, 0x0000 }, + { 0x2FA10, 0x2A0CE, 0x0000 }, + { 0x2FA11, 0x4CF8, 0x0000 }, + { 0x2FA12, 0x2A105, 0x0000 }, + { 0x2FA13, 0x2A20E, 0x0000 }, + { 0x2FA14, 0x2A291, 0x0000 }, + { 0x2FA15, 0x9EBB, 0x0000 }, + { 0x2FA16, 0x4D56, 0x0000 }, + { 0x2FA17, 0x9EF9, 0x0000 }, + { 0x2FA18, 0x9EFE, 0x0000 }, + { 0x2FA19, 0x9F05, 0x0000 }, + { 0x2FA1A, 0x9F0F, 0x0000 }, + { 0x2FA1B, 0x9F16, 0x0000 }, + { 0x2FA1C, 0x9F3B, 0x0000 }, + { 0x2FA1D, 0x2A600, 0x0000 }, +}; + +static const struct CompTable comp_table[] = { + { 0x003C, 0x0338, 0x226E }, + { 0x003D, 0x0338, 0x2260 }, + { 0x003E, 0x0338, 0x226F }, + { 0x0041, 0x0300, 0x00C0 }, + { 0x0041, 0x0301, 0x00C1 }, + { 0x0041, 0x0302, 0x00C2 }, + { 0x0041, 0x0303, 0x00C3 }, + { 0x0041, 0x0304, 0x0100 }, + { 0x0041, 0x0306, 0x0102 }, + { 0x0041, 0x0307, 0x0226 }, + { 0x0041, 0x0308, 0x00C4 }, + { 0x0041, 0x0309, 0x1EA2 }, + { 0x0041, 0x030A, 0x00C5 }, + { 0x0041, 0x030C, 0x01CD }, + { 0x0041, 0x030F, 0x0200 }, + { 0x0041, 0x0311, 0x0202 }, + { 0x0041, 0x0323, 0x1EA0 }, + { 0x0041, 0x0325, 0x1E00 }, + { 0x0041, 0x0328, 0x0104 }, + { 0x0042, 0x0307, 0x1E02 }, + { 0x0042, 0x0323, 0x1E04 }, + { 0x0042, 0x0331, 0x1E06 }, + { 0x0043, 0x0301, 0x0106 }, + { 0x0043, 0x0302, 0x0108 }, + { 0x0043, 0x0307, 0x010A }, + { 0x0043, 0x030C, 0x010C }, + { 0x0043, 0x0327, 0x00C7 }, + { 0x0044, 0x0307, 0x1E0A }, + { 0x0044, 0x030C, 0x010E }, + { 0x0044, 0x0323, 0x1E0C }, + { 0x0044, 0x0327, 0x1E10 }, + { 0x0044, 0x032D, 0x1E12 }, + { 0x0044, 0x0331, 0x1E0E }, + { 0x0045, 0x0300, 0x00C8 }, + { 0x0045, 0x0301, 0x00C9 }, + { 0x0045, 0x0302, 0x00CA }, + { 0x0045, 0x0303, 0x1EBC }, + { 0x0045, 0x0304, 0x0112 }, + { 0x0045, 0x0306, 0x0114 }, + { 0x0045, 0x0307, 0x0116 }, + { 0x0045, 0x0308, 0x00CB }, + { 0x0045, 0x0309, 0x1EBA }, + { 0x0045, 0x030C, 0x011A }, + { 0x0045, 0x030F, 0x0204 }, + { 0x0045, 0x0311, 0x0206 }, + { 0x0045, 0x0323, 0x1EB8 }, + { 0x0045, 0x0327, 0x0228 }, + { 0x0045, 0x0328, 0x0118 }, + { 0x0045, 0x032D, 0x1E18 }, + { 0x0045, 0x0330, 0x1E1A }, + { 0x0046, 0x0307, 0x1E1E }, + { 0x0047, 0x0301, 0x01F4 }, + { 0x0047, 0x0302, 0x011C }, + { 0x0047, 0x0304, 0x1E20 }, + { 0x0047, 0x0306, 0x011E }, + { 0x0047, 0x0307, 0x0120 }, + { 0x0047, 0x030C, 0x01E6 }, + { 0x0047, 0x0327, 0x0122 }, + { 0x0048, 0x0302, 0x0124 }, + { 0x0048, 0x0307, 0x1E22 }, + { 0x0048, 0x0308, 0x1E26 }, + { 0x0048, 0x030C, 0x021E }, + { 0x0048, 0x0323, 0x1E24 }, + { 0x0048, 0x0327, 0x1E28 }, + { 0x0048, 0x032E, 0x1E2A }, + { 0x0049, 0x0300, 0x00CC }, + { 0x0049, 0x0301, 0x00CD }, + { 0x0049, 0x0302, 0x00CE }, + { 0x0049, 0x0303, 0x0128 }, + { 0x0049, 0x0304, 0x012A }, + { 0x0049, 0x0306, 0x012C }, + { 0x0049, 0x0307, 0x0130 }, + { 0x0049, 0x0308, 0x00CF }, + { 0x0049, 0x0309, 0x1EC8 }, + { 0x0049, 0x030C, 0x01CF }, + { 0x0049, 0x030F, 0x0208 }, + { 0x0049, 0x0311, 0x020A }, + { 0x0049, 0x0323, 0x1ECA }, + { 0x0049, 0x0328, 0x012E }, + { 0x0049, 0x0330, 0x1E2C }, + { 0x004A, 0x0302, 0x0134 }, + { 0x004B, 0x0301, 0x1E30 }, + { 0x004B, 0x030C, 0x01E8 }, + { 0x004B, 0x0323, 0x1E32 }, + { 0x004B, 0x0327, 0x0136 }, + { 0x004B, 0x0331, 0x1E34 }, + { 0x004C, 0x0301, 0x0139 }, + { 0x004C, 0x030C, 0x013D }, + { 0x004C, 0x0323, 0x1E36 }, + { 0x004C, 0x0327, 0x013B }, + { 0x004C, 0x032D, 0x1E3C }, + { 0x004C, 0x0331, 0x1E3A }, + { 0x004D, 0x0301, 0x1E3E }, + { 0x004D, 0x0307, 0x1E40 }, + { 0x004D, 0x0323, 0x1E42 }, + { 0x004E, 0x0300, 0x01F8 }, + { 0x004E, 0x0301, 0x0143 }, + { 0x004E, 0x0303, 0x00D1 }, + { 0x004E, 0x0307, 0x1E44 }, + { 0x004E, 0x030C, 0x0147 }, + { 0x004E, 0x0323, 0x1E46 }, + { 0x004E, 0x0327, 0x0145 }, + { 0x004E, 0x032D, 0x1E4A }, + { 0x004E, 0x0331, 0x1E48 }, + { 0x004F, 0x0300, 0x00D2 }, + { 0x004F, 0x0301, 0x00D3 }, + { 0x004F, 0x0302, 0x00D4 }, + { 0x004F, 0x0303, 0x00D5 }, + { 0x004F, 0x0304, 0x014C }, + { 0x004F, 0x0306, 0x014E }, + { 0x004F, 0x0307, 0x022E }, + { 0x004F, 0x0308, 0x00D6 }, + { 0x004F, 0x0309, 0x1ECE }, + { 0x004F, 0x030B, 0x0150 }, + { 0x004F, 0x030C, 0x01D1 }, + { 0x004F, 0x030F, 0x020C }, + { 0x004F, 0x0311, 0x020E }, + { 0x004F, 0x031B, 0x01A0 }, + { 0x004F, 0x0323, 0x1ECC }, + { 0x004F, 0x0328, 0x01EA }, + { 0x0050, 0x0301, 0x1E54 }, + { 0x0050, 0x0307, 0x1E56 }, + { 0x0052, 0x0301, 0x0154 }, + { 0x0052, 0x0307, 0x1E58 }, + { 0x0052, 0x030C, 0x0158 }, + { 0x0052, 0x030F, 0x0210 }, + { 0x0052, 0x0311, 0x0212 }, + { 0x0052, 0x0323, 0x1E5A }, + { 0x0052, 0x0327, 0x0156 }, + { 0x0052, 0x0331, 0x1E5E }, + { 0x0053, 0x0301, 0x015A }, + { 0x0053, 0x0302, 0x015C }, + { 0x0053, 0x0307, 0x1E60 }, + { 0x0053, 0x030C, 0x0160 }, + { 0x0053, 0x0323, 0x1E62 }, + { 0x0053, 0x0326, 0x0218 }, + { 0x0053, 0x0327, 0x015E }, + { 0x0054, 0x0307, 0x1E6A }, + { 0x0054, 0x030C, 0x0164 }, + { 0x0054, 0x0323, 0x1E6C }, + { 0x0054, 0x0326, 0x021A }, + { 0x0054, 0x0327, 0x0162 }, + { 0x0054, 0x032D, 0x1E70 }, + { 0x0054, 0x0331, 0x1E6E }, + { 0x0055, 0x0300, 0x00D9 }, + { 0x0055, 0x0301, 0x00DA }, + { 0x0055, 0x0302, 0x00DB }, + { 0x0055, 0x0303, 0x0168 }, + { 0x0055, 0x0304, 0x016A }, + { 0x0055, 0x0306, 0x016C }, + { 0x0055, 0x0308, 0x00DC }, + { 0x0055, 0x0309, 0x1EE6 }, + { 0x0055, 0x030A, 0x016E }, + { 0x0055, 0x030B, 0x0170 }, + { 0x0055, 0x030C, 0x01D3 }, + { 0x0055, 0x030F, 0x0214 }, + { 0x0055, 0x0311, 0x0216 }, + { 0x0055, 0x031B, 0x01AF }, + { 0x0055, 0x0323, 0x1EE4 }, + { 0x0055, 0x0324, 0x1E72 }, + { 0x0055, 0x0328, 0x0172 }, + { 0x0055, 0x032D, 0x1E76 }, + { 0x0055, 0x0330, 0x1E74 }, + { 0x0056, 0x0303, 0x1E7C }, + { 0x0056, 0x0323, 0x1E7E }, + { 0x0057, 0x0300, 0x1E80 }, + { 0x0057, 0x0301, 0x1E82 }, + { 0x0057, 0x0302, 0x0174 }, + { 0x0057, 0x0307, 0x1E86 }, + { 0x0057, 0x0308, 0x1E84 }, + { 0x0057, 0x0323, 0x1E88 }, + { 0x0058, 0x0307, 0x1E8A }, + { 0x0058, 0x0308, 0x1E8C }, + { 0x0059, 0x0300, 0x1EF2 }, + { 0x0059, 0x0301, 0x00DD }, + { 0x0059, 0x0302, 0x0176 }, + { 0x0059, 0x0303, 0x1EF8 }, + { 0x0059, 0x0304, 0x0232 }, + { 0x0059, 0x0307, 0x1E8E }, + { 0x0059, 0x0308, 0x0178 }, + { 0x0059, 0x0309, 0x1EF6 }, + { 0x0059, 0x0323, 0x1EF4 }, + { 0x005A, 0x0301, 0x0179 }, + { 0x005A, 0x0302, 0x1E90 }, + { 0x005A, 0x0307, 0x017B }, + { 0x005A, 0x030C, 0x017D }, + { 0x005A, 0x0323, 0x1E92 }, + { 0x005A, 0x0331, 0x1E94 }, + { 0x0061, 0x0300, 0x00E0 }, + { 0x0061, 0x0301, 0x00E1 }, + { 0x0061, 0x0302, 0x00E2 }, + { 0x0061, 0x0303, 0x00E3 }, + { 0x0061, 0x0304, 0x0101 }, + { 0x0061, 0x0306, 0x0103 }, + { 0x0061, 0x0307, 0x0227 }, + { 0x0061, 0x0308, 0x00E4 }, + { 0x0061, 0x0309, 0x1EA3 }, + { 0x0061, 0x030A, 0x00E5 }, + { 0x0061, 0x030C, 0x01CE }, + { 0x0061, 0x030F, 0x0201 }, + { 0x0061, 0x0311, 0x0203 }, + { 0x0061, 0x0323, 0x1EA1 }, + { 0x0061, 0x0325, 0x1E01 }, + { 0x0061, 0x0328, 0x0105 }, + { 0x0062, 0x0307, 0x1E03 }, + { 0x0062, 0x0323, 0x1E05 }, + { 0x0062, 0x0331, 0x1E07 }, + { 0x0063, 0x0301, 0x0107 }, + { 0x0063, 0x0302, 0x0109 }, + { 0x0063, 0x0307, 0x010B }, + { 0x0063, 0x030C, 0x010D }, + { 0x0063, 0x0327, 0x00E7 }, + { 0x0064, 0x0307, 0x1E0B }, + { 0x0064, 0x030C, 0x010F }, + { 0x0064, 0x0323, 0x1E0D }, + { 0x0064, 0x0327, 0x1E11 }, + { 0x0064, 0x032D, 0x1E13 }, + { 0x0064, 0x0331, 0x1E0F }, + { 0x0065, 0x0300, 0x00E8 }, + { 0x0065, 0x0301, 0x00E9 }, + { 0x0065, 0x0302, 0x00EA }, + { 0x0065, 0x0303, 0x1EBD }, + { 0x0065, 0x0304, 0x0113 }, + { 0x0065, 0x0306, 0x0115 }, + { 0x0065, 0x0307, 0x0117 }, + { 0x0065, 0x0308, 0x00EB }, + { 0x0065, 0x0309, 0x1EBB }, + { 0x0065, 0x030C, 0x011B }, + { 0x0065, 0x030F, 0x0205 }, + { 0x0065, 0x0311, 0x0207 }, + { 0x0065, 0x0323, 0x1EB9 }, + { 0x0065, 0x0327, 0x0229 }, + { 0x0065, 0x0328, 0x0119 }, + { 0x0065, 0x032D, 0x1E19 }, + { 0x0065, 0x0330, 0x1E1B }, + { 0x0066, 0x0307, 0x1E1F }, + { 0x0067, 0x0301, 0x01F5 }, + { 0x0067, 0x0302, 0x011D }, + { 0x0067, 0x0304, 0x1E21 }, + { 0x0067, 0x0306, 0x011F }, + { 0x0067, 0x0307, 0x0121 }, + { 0x0067, 0x030C, 0x01E7 }, + { 0x0067, 0x0327, 0x0123 }, + { 0x0068, 0x0302, 0x0125 }, + { 0x0068, 0x0307, 0x1E23 }, + { 0x0068, 0x0308, 0x1E27 }, + { 0x0068, 0x030C, 0x021F }, + { 0x0068, 0x0323, 0x1E25 }, + { 0x0068, 0x0327, 0x1E29 }, + { 0x0068, 0x032E, 0x1E2B }, + { 0x0068, 0x0331, 0x1E96 }, + { 0x0069, 0x0300, 0x00EC }, + { 0x0069, 0x0301, 0x00ED }, + { 0x0069, 0x0302, 0x00EE }, + { 0x0069, 0x0303, 0x0129 }, + { 0x0069, 0x0304, 0x012B }, + { 0x0069, 0x0306, 0x012D }, + { 0x0069, 0x0308, 0x00EF }, + { 0x0069, 0x0309, 0x1EC9 }, + { 0x0069, 0x030C, 0x01D0 }, + { 0x0069, 0x030F, 0x0209 }, + { 0x0069, 0x0311, 0x020B }, + { 0x0069, 0x0323, 0x1ECB }, + { 0x0069, 0x0328, 0x012F }, + { 0x0069, 0x0330, 0x1E2D }, + { 0x006A, 0x0302, 0x0135 }, + { 0x006A, 0x030C, 0x01F0 }, + { 0x006B, 0x0301, 0x1E31 }, + { 0x006B, 0x030C, 0x01E9 }, + { 0x006B, 0x0323, 0x1E33 }, + { 0x006B, 0x0327, 0x0137 }, + { 0x006B, 0x0331, 0x1E35 }, + { 0x006C, 0x0301, 0x013A }, + { 0x006C, 0x030C, 0x013E }, + { 0x006C, 0x0323, 0x1E37 }, + { 0x006C, 0x0327, 0x013C }, + { 0x006C, 0x032D, 0x1E3D }, + { 0x006C, 0x0331, 0x1E3B }, + { 0x006D, 0x0301, 0x1E3F }, + { 0x006D, 0x0307, 0x1E41 }, + { 0x006D, 0x0323, 0x1E43 }, + { 0x006E, 0x0300, 0x01F9 }, + { 0x006E, 0x0301, 0x0144 }, + { 0x006E, 0x0303, 0x00F1 }, + { 0x006E, 0x0307, 0x1E45 }, + { 0x006E, 0x030C, 0x0148 }, + { 0x006E, 0x0323, 0x1E47 }, + { 0x006E, 0x0327, 0x0146 }, + { 0x006E, 0x032D, 0x1E4B }, + { 0x006E, 0x0331, 0x1E49 }, + { 0x006F, 0x0300, 0x00F2 }, + { 0x006F, 0x0301, 0x00F3 }, + { 0x006F, 0x0302, 0x00F4 }, + { 0x006F, 0x0303, 0x00F5 }, + { 0x006F, 0x0304, 0x014D }, + { 0x006F, 0x0306, 0x014F }, + { 0x006F, 0x0307, 0x022F }, + { 0x006F, 0x0308, 0x00F6 }, + { 0x006F, 0x0309, 0x1ECF }, + { 0x006F, 0x030B, 0x0151 }, + { 0x006F, 0x030C, 0x01D2 }, + { 0x006F, 0x030F, 0x020D }, + { 0x006F, 0x0311, 0x020F }, + { 0x006F, 0x031B, 0x01A1 }, + { 0x006F, 0x0323, 0x1ECD }, + { 0x006F, 0x0328, 0x01EB }, + { 0x0070, 0x0301, 0x1E55 }, + { 0x0070, 0x0307, 0x1E57 }, + { 0x0072, 0x0301, 0x0155 }, + { 0x0072, 0x0307, 0x1E59 }, + { 0x0072, 0x030C, 0x0159 }, + { 0x0072, 0x030F, 0x0211 }, + { 0x0072, 0x0311, 0x0213 }, + { 0x0072, 0x0323, 0x1E5B }, + { 0x0072, 0x0327, 0x0157 }, + { 0x0072, 0x0331, 0x1E5F }, + { 0x0073, 0x0301, 0x015B }, + { 0x0073, 0x0302, 0x015D }, + { 0x0073, 0x0307, 0x1E61 }, + { 0x0073, 0x030C, 0x0161 }, + { 0x0073, 0x0323, 0x1E63 }, + { 0x0073, 0x0326, 0x0219 }, + { 0x0073, 0x0327, 0x015F }, + { 0x0074, 0x0307, 0x1E6B }, + { 0x0074, 0x0308, 0x1E97 }, + { 0x0074, 0x030C, 0x0165 }, + { 0x0074, 0x0323, 0x1E6D }, + { 0x0074, 0x0326, 0x021B }, + { 0x0074, 0x0327, 0x0163 }, + { 0x0074, 0x032D, 0x1E71 }, + { 0x0074, 0x0331, 0x1E6F }, + { 0x0075, 0x0300, 0x00F9 }, + { 0x0075, 0x0301, 0x00FA }, + { 0x0075, 0x0302, 0x00FB }, + { 0x0075, 0x0303, 0x0169 }, + { 0x0075, 0x0304, 0x016B }, + { 0x0075, 0x0306, 0x016D }, + { 0x0075, 0x0308, 0x00FC }, + { 0x0075, 0x0309, 0x1EE7 }, + { 0x0075, 0x030A, 0x016F }, + { 0x0075, 0x030B, 0x0171 }, + { 0x0075, 0x030C, 0x01D4 }, + { 0x0075, 0x030F, 0x0215 }, + { 0x0075, 0x0311, 0x0217 }, + { 0x0075, 0x031B, 0x01B0 }, + { 0x0075, 0x0323, 0x1EE5 }, + { 0x0075, 0x0324, 0x1E73 }, + { 0x0075, 0x0328, 0x0173 }, + { 0x0075, 0x032D, 0x1E77 }, + { 0x0075, 0x0330, 0x1E75 }, + { 0x0076, 0x0303, 0x1E7D }, + { 0x0076, 0x0323, 0x1E7F }, + { 0x0077, 0x0300, 0x1E81 }, + { 0x0077, 0x0301, 0x1E83 }, + { 0x0077, 0x0302, 0x0175 }, + { 0x0077, 0x0307, 0x1E87 }, + { 0x0077, 0x0308, 0x1E85 }, + { 0x0077, 0x030A, 0x1E98 }, + { 0x0077, 0x0323, 0x1E89 }, + { 0x0078, 0x0307, 0x1E8B }, + { 0x0078, 0x0308, 0x1E8D }, + { 0x0079, 0x0300, 0x1EF3 }, + { 0x0079, 0x0301, 0x00FD }, + { 0x0079, 0x0302, 0x0177 }, + { 0x0079, 0x0303, 0x1EF9 }, + { 0x0079, 0x0304, 0x0233 }, + { 0x0079, 0x0307, 0x1E8F }, + { 0x0079, 0x0308, 0x00FF }, + { 0x0079, 0x0309, 0x1EF7 }, + { 0x0079, 0x030A, 0x1E99 }, + { 0x0079, 0x0323, 0x1EF5 }, + { 0x007A, 0x0301, 0x017A }, + { 0x007A, 0x0302, 0x1E91 }, + { 0x007A, 0x0307, 0x017C }, + { 0x007A, 0x030C, 0x017E }, + { 0x007A, 0x0323, 0x1E93 }, + { 0x007A, 0x0331, 0x1E95 }, + { 0x00A8, 0x0300, 0x1FED }, + { 0x00A8, 0x0301, 0x0385 }, + { 0x00A8, 0x0342, 0x1FC1 }, + { 0x00C2, 0x0300, 0x1EA6 }, + { 0x00C2, 0x0301, 0x1EA4 }, + { 0x00C2, 0x0303, 0x1EAA }, + { 0x00C2, 0x0309, 0x1EA8 }, + { 0x00C4, 0x0304, 0x01DE }, + { 0x00C5, 0x0301, 0x01FA }, + { 0x00C6, 0x0301, 0x01FC }, + { 0x00C6, 0x0304, 0x01E2 }, + { 0x00C7, 0x0301, 0x1E08 }, + { 0x00CA, 0x0300, 0x1EC0 }, + { 0x00CA, 0x0301, 0x1EBE }, + { 0x00CA, 0x0303, 0x1EC4 }, + { 0x00CA, 0x0309, 0x1EC2 }, + { 0x00CF, 0x0301, 0x1E2E }, + { 0x00D4, 0x0300, 0x1ED2 }, + { 0x00D4, 0x0301, 0x1ED0 }, + { 0x00D4, 0x0303, 0x1ED6 }, + { 0x00D4, 0x0309, 0x1ED4 }, + { 0x00D5, 0x0301, 0x1E4C }, + { 0x00D5, 0x0304, 0x022C }, + { 0x00D5, 0x0308, 0x1E4E }, + { 0x00D6, 0x0304, 0x022A }, + { 0x00D8, 0x0301, 0x01FE }, + { 0x00DC, 0x0300, 0x01DB }, + { 0x00DC, 0x0301, 0x01D7 }, + { 0x00DC, 0x0304, 0x01D5 }, + { 0x00DC, 0x030C, 0x01D9 }, + { 0x00E2, 0x0300, 0x1EA7 }, + { 0x00E2, 0x0301, 0x1EA5 }, + { 0x00E2, 0x0303, 0x1EAB }, + { 0x00E2, 0x0309, 0x1EA9 }, + { 0x00E4, 0x0304, 0x01DF }, + { 0x00E5, 0x0301, 0x01FB }, + { 0x00E6, 0x0301, 0x01FD }, + { 0x00E6, 0x0304, 0x01E3 }, + { 0x00E7, 0x0301, 0x1E09 }, + { 0x00EA, 0x0300, 0x1EC1 }, + { 0x00EA, 0x0301, 0x1EBF }, + { 0x00EA, 0x0303, 0x1EC5 }, + { 0x00EA, 0x0309, 0x1EC3 }, + { 0x00EF, 0x0301, 0x1E2F }, + { 0x00F4, 0x0300, 0x1ED3 }, + { 0x00F4, 0x0301, 0x1ED1 }, + { 0x00F4, 0x0303, 0x1ED7 }, + { 0x00F4, 0x0309, 0x1ED5 }, + { 0x00F5, 0x0301, 0x1E4D }, + { 0x00F5, 0x0304, 0x022D }, + { 0x00F5, 0x0308, 0x1E4F }, + { 0x00F6, 0x0304, 0x022B }, + { 0x00F8, 0x0301, 0x01FF }, + { 0x00FC, 0x0300, 0x01DC }, + { 0x00FC, 0x0301, 0x01D8 }, + { 0x00FC, 0x0304, 0x01D6 }, + { 0x00FC, 0x030C, 0x01DA }, + { 0x0102, 0x0300, 0x1EB0 }, + { 0x0102, 0x0301, 0x1EAE }, + { 0x0102, 0x0303, 0x1EB4 }, + { 0x0102, 0x0309, 0x1EB2 }, + { 0x0103, 0x0300, 0x1EB1 }, + { 0x0103, 0x0301, 0x1EAF }, + { 0x0103, 0x0303, 0x1EB5 }, + { 0x0103, 0x0309, 0x1EB3 }, + { 0x0112, 0x0300, 0x1E14 }, + { 0x0112, 0x0301, 0x1E16 }, + { 0x0113, 0x0300, 0x1E15 }, + { 0x0113, 0x0301, 0x1E17 }, + { 0x014C, 0x0300, 0x1E50 }, + { 0x014C, 0x0301, 0x1E52 }, + { 0x014D, 0x0300, 0x1E51 }, + { 0x014D, 0x0301, 0x1E53 }, + { 0x015A, 0x0307, 0x1E64 }, + { 0x015B, 0x0307, 0x1E65 }, + { 0x0160, 0x0307, 0x1E66 }, + { 0x0161, 0x0307, 0x1E67 }, + { 0x0168, 0x0301, 0x1E78 }, + { 0x0169, 0x0301, 0x1E79 }, + { 0x016A, 0x0308, 0x1E7A }, + { 0x016B, 0x0308, 0x1E7B }, + { 0x017F, 0x0307, 0x1E9B }, + { 0x01A0, 0x0300, 0x1EDC }, + { 0x01A0, 0x0301, 0x1EDA }, + { 0x01A0, 0x0303, 0x1EE0 }, + { 0x01A0, 0x0309, 0x1EDE }, + { 0x01A0, 0x0323, 0x1EE2 }, + { 0x01A1, 0x0300, 0x1EDD }, + { 0x01A1, 0x0301, 0x1EDB }, + { 0x01A1, 0x0303, 0x1EE1 }, + { 0x01A1, 0x0309, 0x1EDF }, + { 0x01A1, 0x0323, 0x1EE3 }, + { 0x01AF, 0x0300, 0x1EEA }, + { 0x01AF, 0x0301, 0x1EE8 }, + { 0x01AF, 0x0303, 0x1EEE }, + { 0x01AF, 0x0309, 0x1EEC }, + { 0x01AF, 0x0323, 0x1EF0 }, + { 0x01B0, 0x0300, 0x1EEB }, + { 0x01B0, 0x0301, 0x1EE9 }, + { 0x01B0, 0x0303, 0x1EEF }, + { 0x01B0, 0x0309, 0x1EED }, + { 0x01B0, 0x0323, 0x1EF1 }, + { 0x01B7, 0x030C, 0x01EE }, + { 0x01EA, 0x0304, 0x01EC }, + { 0x01EB, 0x0304, 0x01ED }, + { 0x0226, 0x0304, 0x01E0 }, + { 0x0227, 0x0304, 0x01E1 }, + { 0x0228, 0x0306, 0x1E1C }, + { 0x0229, 0x0306, 0x1E1D }, + { 0x022E, 0x0304, 0x0230 }, + { 0x022F, 0x0304, 0x0231 }, + { 0x0292, 0x030C, 0x01EF }, + { 0x0391, 0x0300, 0x1FBA }, + { 0x0391, 0x0301, 0x0386 }, + { 0x0391, 0x0304, 0x1FB9 }, + { 0x0391, 0x0306, 0x1FB8 }, + { 0x0391, 0x0313, 0x1F08 }, + { 0x0391, 0x0314, 0x1F09 }, + { 0x0391, 0x0345, 0x1FBC }, + { 0x0395, 0x0300, 0x1FC8 }, + { 0x0395, 0x0301, 0x0388 }, + { 0x0395, 0x0313, 0x1F18 }, + { 0x0395, 0x0314, 0x1F19 }, + { 0x0397, 0x0300, 0x1FCA }, + { 0x0397, 0x0301, 0x0389 }, + { 0x0397, 0x0313, 0x1F28 }, + { 0x0397, 0x0314, 0x1F29 }, + { 0x0397, 0x0345, 0x1FCC }, + { 0x0399, 0x0300, 0x1FDA }, + { 0x0399, 0x0301, 0x038A }, + { 0x0399, 0x0304, 0x1FD9 }, + { 0x0399, 0x0306, 0x1FD8 }, + { 0x0399, 0x0308, 0x03AA }, + { 0x0399, 0x0313, 0x1F38 }, + { 0x0399, 0x0314, 0x1F39 }, + { 0x039F, 0x0300, 0x1FF8 }, + { 0x039F, 0x0301, 0x038C }, + { 0x039F, 0x0313, 0x1F48 }, + { 0x039F, 0x0314, 0x1F49 }, + { 0x03A1, 0x0314, 0x1FEC }, + { 0x03A5, 0x0300, 0x1FEA }, + { 0x03A5, 0x0301, 0x038E }, + { 0x03A5, 0x0304, 0x1FE9 }, + { 0x03A5, 0x0306, 0x1FE8 }, + { 0x03A5, 0x0308, 0x03AB }, + { 0x03A5, 0x0314, 0x1F59 }, + { 0x03A9, 0x0300, 0x1FFA }, + { 0x03A9, 0x0301, 0x038F }, + { 0x03A9, 0x0313, 0x1F68 }, + { 0x03A9, 0x0314, 0x1F69 }, + { 0x03A9, 0x0345, 0x1FFC }, + { 0x03AC, 0x0345, 0x1FB4 }, + { 0x03AE, 0x0345, 0x1FC4 }, + { 0x03B1, 0x0300, 0x1F70 }, + { 0x03B1, 0x0301, 0x03AC }, + { 0x03B1, 0x0304, 0x1FB1 }, + { 0x03B1, 0x0306, 0x1FB0 }, + { 0x03B1, 0x0313, 0x1F00 }, + { 0x03B1, 0x0314, 0x1F01 }, + { 0x03B1, 0x0342, 0x1FB6 }, + { 0x03B1, 0x0345, 0x1FB3 }, + { 0x03B5, 0x0300, 0x1F72 }, + { 0x03B5, 0x0301, 0x03AD }, + { 0x03B5, 0x0313, 0x1F10 }, + { 0x03B5, 0x0314, 0x1F11 }, + { 0x03B7, 0x0300, 0x1F74 }, + { 0x03B7, 0x0301, 0x03AE }, + { 0x03B7, 0x0313, 0x1F20 }, + { 0x03B7, 0x0314, 0x1F21 }, + { 0x03B7, 0x0342, 0x1FC6 }, + { 0x03B7, 0x0345, 0x1FC3 }, + { 0x03B9, 0x0300, 0x1F76 }, + { 0x03B9, 0x0301, 0x03AF }, + { 0x03B9, 0x0304, 0x1FD1 }, + { 0x03B9, 0x0306, 0x1FD0 }, + { 0x03B9, 0x0308, 0x03CA }, + { 0x03B9, 0x0313, 0x1F30 }, + { 0x03B9, 0x0314, 0x1F31 }, + { 0x03B9, 0x0342, 0x1FD6 }, + { 0x03BF, 0x0300, 0x1F78 }, + { 0x03BF, 0x0301, 0x03CC }, + { 0x03BF, 0x0313, 0x1F40 }, + { 0x03BF, 0x0314, 0x1F41 }, + { 0x03C1, 0x0313, 0x1FE4 }, + { 0x03C1, 0x0314, 0x1FE5 }, + { 0x03C5, 0x0300, 0x1F7A }, + { 0x03C5, 0x0301, 0x03CD }, + { 0x03C5, 0x0304, 0x1FE1 }, + { 0x03C5, 0x0306, 0x1FE0 }, + { 0x03C5, 0x0308, 0x03CB }, + { 0x03C5, 0x0313, 0x1F50 }, + { 0x03C5, 0x0314, 0x1F51 }, + { 0x03C5, 0x0342, 0x1FE6 }, + { 0x03C9, 0x0300, 0x1F7C }, + { 0x03C9, 0x0301, 0x03CE }, + { 0x03C9, 0x0313, 0x1F60 }, + { 0x03C9, 0x0314, 0x1F61 }, + { 0x03C9, 0x0342, 0x1FF6 }, + { 0x03C9, 0x0345, 0x1FF3 }, + { 0x03CA, 0x0300, 0x1FD2 }, + { 0x03CA, 0x0301, 0x0390 }, + { 0x03CA, 0x0342, 0x1FD7 }, + { 0x03CB, 0x0300, 0x1FE2 }, + { 0x03CB, 0x0301, 0x03B0 }, + { 0x03CB, 0x0342, 0x1FE7 }, + { 0x03CE, 0x0345, 0x1FF4 }, + { 0x03D2, 0x0301, 0x03D3 }, + { 0x03D2, 0x0308, 0x03D4 }, + { 0x0406, 0x0308, 0x0407 }, + { 0x0410, 0x0306, 0x04D0 }, + { 0x0410, 0x0308, 0x04D2 }, + { 0x0413, 0x0301, 0x0403 }, + { 0x0415, 0x0300, 0x0400 }, + { 0x0415, 0x0306, 0x04D6 }, + { 0x0415, 0x0308, 0x0401 }, + { 0x0416, 0x0306, 0x04C1 }, + { 0x0416, 0x0308, 0x04DC }, + { 0x0417, 0x0308, 0x04DE }, + { 0x0418, 0x0300, 0x040D }, + { 0x0418, 0x0304, 0x04E2 }, + { 0x0418, 0x0306, 0x0419 }, + { 0x0418, 0x0308, 0x04E4 }, + { 0x041A, 0x0301, 0x040C }, + { 0x041E, 0x0308, 0x04E6 }, + { 0x0423, 0x0304, 0x04EE }, + { 0x0423, 0x0306, 0x040E }, + { 0x0423, 0x0308, 0x04F0 }, + { 0x0423, 0x030B, 0x04F2 }, + { 0x0427, 0x0308, 0x04F4 }, + { 0x042B, 0x0308, 0x04F8 }, + { 0x042D, 0x0308, 0x04EC }, + { 0x0430, 0x0306, 0x04D1 }, + { 0x0430, 0x0308, 0x04D3 }, + { 0x0433, 0x0301, 0x0453 }, + { 0x0435, 0x0300, 0x0450 }, + { 0x0435, 0x0306, 0x04D7 }, + { 0x0435, 0x0308, 0x0451 }, + { 0x0436, 0x0306, 0x04C2 }, + { 0x0436, 0x0308, 0x04DD }, + { 0x0437, 0x0308, 0x04DF }, + { 0x0438, 0x0300, 0x045D }, + { 0x0438, 0x0304, 0x04E3 }, + { 0x0438, 0x0306, 0x0439 }, + { 0x0438, 0x0308, 0x04E5 }, + { 0x043A, 0x0301, 0x045C }, + { 0x043E, 0x0308, 0x04E7 }, + { 0x0443, 0x0304, 0x04EF }, + { 0x0443, 0x0306, 0x045E }, + { 0x0443, 0x0308, 0x04F1 }, + { 0x0443, 0x030B, 0x04F3 }, + { 0x0447, 0x0308, 0x04F5 }, + { 0x044B, 0x0308, 0x04F9 }, + { 0x044D, 0x0308, 0x04ED }, + { 0x0456, 0x0308, 0x0457 }, + { 0x0474, 0x030F, 0x0476 }, + { 0x0475, 0x030F, 0x0477 }, + { 0x04D8, 0x0308, 0x04DA }, + { 0x04D9, 0x0308, 0x04DB }, + { 0x04E8, 0x0308, 0x04EA }, + { 0x04E9, 0x0308, 0x04EB }, + { 0x0627, 0x0653, 0x0622 }, + { 0x0627, 0x0654, 0x0623 }, + { 0x0627, 0x0655, 0x0625 }, + { 0x0648, 0x0654, 0x0624 }, + { 0x064A, 0x0654, 0x0626 }, + { 0x06C1, 0x0654, 0x06C2 }, + { 0x06D2, 0x0654, 0x06D3 }, + { 0x06D5, 0x0654, 0x06C0 }, + { 0x0928, 0x093C, 0x0929 }, + { 0x0930, 0x093C, 0x0931 }, + { 0x0933, 0x093C, 0x0934 }, + { 0x09C7, 0x09BE, 0x09CB }, + { 0x09C7, 0x09D7, 0x09CC }, + { 0x0B47, 0x0B3E, 0x0B4B }, + { 0x0B47, 0x0B56, 0x0B48 }, + { 0x0B47, 0x0B57, 0x0B4C }, + { 0x0B92, 0x0BD7, 0x0B94 }, + { 0x0BC6, 0x0BBE, 0x0BCA }, + { 0x0BC6, 0x0BD7, 0x0BCC }, + { 0x0BC7, 0x0BBE, 0x0BCB }, + { 0x0C46, 0x0C56, 0x0C48 }, + { 0x0CBF, 0x0CD5, 0x0CC0 }, + { 0x0CC6, 0x0CC2, 0x0CCA }, + { 0x0CC6, 0x0CD5, 0x0CC7 }, + { 0x0CC6, 0x0CD6, 0x0CC8 }, + { 0x0CCA, 0x0CD5, 0x0CCB }, + { 0x0D46, 0x0D3E, 0x0D4A }, + { 0x0D46, 0x0D57, 0x0D4C }, + { 0x0D47, 0x0D3E, 0x0D4B }, + { 0x0DD9, 0x0DCA, 0x0DDA }, + { 0x0DD9, 0x0DCF, 0x0DDC }, + { 0x0DD9, 0x0DDF, 0x0DDE }, + { 0x0DDC, 0x0DCA, 0x0DDD }, + { 0x1025, 0x102E, 0x1026 }, + { 0x1B05, 0x1B35, 0x1B06 }, + { 0x1B07, 0x1B35, 0x1B08 }, + { 0x1B09, 0x1B35, 0x1B0A }, + { 0x1B0B, 0x1B35, 0x1B0C }, + { 0x1B0D, 0x1B35, 0x1B0E }, + { 0x1B11, 0x1B35, 0x1B12 }, + { 0x1B3A, 0x1B35, 0x1B3B }, + { 0x1B3C, 0x1B35, 0x1B3D }, + { 0x1B3E, 0x1B35, 0x1B40 }, + { 0x1B3F, 0x1B35, 0x1B41 }, + { 0x1B42, 0x1B35, 0x1B43 }, + { 0x1E36, 0x0304, 0x1E38 }, + { 0x1E37, 0x0304, 0x1E39 }, + { 0x1E5A, 0x0304, 0x1E5C }, + { 0x1E5B, 0x0304, 0x1E5D }, + { 0x1E62, 0x0307, 0x1E68 }, + { 0x1E63, 0x0307, 0x1E69 }, + { 0x1EA0, 0x0302, 0x1EAC }, + { 0x1EA0, 0x0306, 0x1EB6 }, + { 0x1EA1, 0x0302, 0x1EAD }, + { 0x1EA1, 0x0306, 0x1EB7 }, + { 0x1EB8, 0x0302, 0x1EC6 }, + { 0x1EB9, 0x0302, 0x1EC7 }, + { 0x1ECC, 0x0302, 0x1ED8 }, + { 0x1ECD, 0x0302, 0x1ED9 }, + { 0x1F00, 0x0300, 0x1F02 }, + { 0x1F00, 0x0301, 0x1F04 }, + { 0x1F00, 0x0342, 0x1F06 }, + { 0x1F00, 0x0345, 0x1F80 }, + { 0x1F01, 0x0300, 0x1F03 }, + { 0x1F01, 0x0301, 0x1F05 }, + { 0x1F01, 0x0342, 0x1F07 }, + { 0x1F01, 0x0345, 0x1F81 }, + { 0x1F02, 0x0345, 0x1F82 }, + { 0x1F03, 0x0345, 0x1F83 }, + { 0x1F04, 0x0345, 0x1F84 }, + { 0x1F05, 0x0345, 0x1F85 }, + { 0x1F06, 0x0345, 0x1F86 }, + { 0x1F07, 0x0345, 0x1F87 }, + { 0x1F08, 0x0300, 0x1F0A }, + { 0x1F08, 0x0301, 0x1F0C }, + { 0x1F08, 0x0342, 0x1F0E }, + { 0x1F08, 0x0345, 0x1F88 }, + { 0x1F09, 0x0300, 0x1F0B }, + { 0x1F09, 0x0301, 0x1F0D }, + { 0x1F09, 0x0342, 0x1F0F }, + { 0x1F09, 0x0345, 0x1F89 }, + { 0x1F0A, 0x0345, 0x1F8A }, + { 0x1F0B, 0x0345, 0x1F8B }, + { 0x1F0C, 0x0345, 0x1F8C }, + { 0x1F0D, 0x0345, 0x1F8D }, + { 0x1F0E, 0x0345, 0x1F8E }, + { 0x1F0F, 0x0345, 0x1F8F }, + { 0x1F10, 0x0300, 0x1F12 }, + { 0x1F10, 0x0301, 0x1F14 }, + { 0x1F11, 0x0300, 0x1F13 }, + { 0x1F11, 0x0301, 0x1F15 }, + { 0x1F18, 0x0300, 0x1F1A }, + { 0x1F18, 0x0301, 0x1F1C }, + { 0x1F19, 0x0300, 0x1F1B }, + { 0x1F19, 0x0301, 0x1F1D }, + { 0x1F20, 0x0300, 0x1F22 }, + { 0x1F20, 0x0301, 0x1F24 }, + { 0x1F20, 0x0342, 0x1F26 }, + { 0x1F20, 0x0345, 0x1F90 }, + { 0x1F21, 0x0300, 0x1F23 }, + { 0x1F21, 0x0301, 0x1F25 }, + { 0x1F21, 0x0342, 0x1F27 }, + { 0x1F21, 0x0345, 0x1F91 }, + { 0x1F22, 0x0345, 0x1F92 }, + { 0x1F23, 0x0345, 0x1F93 }, + { 0x1F24, 0x0345, 0x1F94 }, + { 0x1F25, 0x0345, 0x1F95 }, + { 0x1F26, 0x0345, 0x1F96 }, + { 0x1F27, 0x0345, 0x1F97 }, + { 0x1F28, 0x0300, 0x1F2A }, + { 0x1F28, 0x0301, 0x1F2C }, + { 0x1F28, 0x0342, 0x1F2E }, + { 0x1F28, 0x0345, 0x1F98 }, + { 0x1F29, 0x0300, 0x1F2B }, + { 0x1F29, 0x0301, 0x1F2D }, + { 0x1F29, 0x0342, 0x1F2F }, + { 0x1F29, 0x0345, 0x1F99 }, + { 0x1F2A, 0x0345, 0x1F9A }, + { 0x1F2B, 0x0345, 0x1F9B }, + { 0x1F2C, 0x0345, 0x1F9C }, + { 0x1F2D, 0x0345, 0x1F9D }, + { 0x1F2E, 0x0345, 0x1F9E }, + { 0x1F2F, 0x0345, 0x1F9F }, + { 0x1F30, 0x0300, 0x1F32 }, + { 0x1F30, 0x0301, 0x1F34 }, + { 0x1F30, 0x0342, 0x1F36 }, + { 0x1F31, 0x0300, 0x1F33 }, + { 0x1F31, 0x0301, 0x1F35 }, + { 0x1F31, 0x0342, 0x1F37 }, + { 0x1F38, 0x0300, 0x1F3A }, + { 0x1F38, 0x0301, 0x1F3C }, + { 0x1F38, 0x0342, 0x1F3E }, + { 0x1F39, 0x0300, 0x1F3B }, + { 0x1F39, 0x0301, 0x1F3D }, + { 0x1F39, 0x0342, 0x1F3F }, + { 0x1F40, 0x0300, 0x1F42 }, + { 0x1F40, 0x0301, 0x1F44 }, + { 0x1F41, 0x0300, 0x1F43 }, + { 0x1F41, 0x0301, 0x1F45 }, + { 0x1F48, 0x0300, 0x1F4A }, + { 0x1F48, 0x0301, 0x1F4C }, + { 0x1F49, 0x0300, 0x1F4B }, + { 0x1F49, 0x0301, 0x1F4D }, + { 0x1F50, 0x0300, 0x1F52 }, + { 0x1F50, 0x0301, 0x1F54 }, + { 0x1F50, 0x0342, 0x1F56 }, + { 0x1F51, 0x0300, 0x1F53 }, + { 0x1F51, 0x0301, 0x1F55 }, + { 0x1F51, 0x0342, 0x1F57 }, + { 0x1F59, 0x0300, 0x1F5B }, + { 0x1F59, 0x0301, 0x1F5D }, + { 0x1F59, 0x0342, 0x1F5F }, + { 0x1F60, 0x0300, 0x1F62 }, + { 0x1F60, 0x0301, 0x1F64 }, + { 0x1F60, 0x0342, 0x1F66 }, + { 0x1F60, 0x0345, 0x1FA0 }, + { 0x1F61, 0x0300, 0x1F63 }, + { 0x1F61, 0x0301, 0x1F65 }, + { 0x1F61, 0x0342, 0x1F67 }, + { 0x1F61, 0x0345, 0x1FA1 }, + { 0x1F62, 0x0345, 0x1FA2 }, + { 0x1F63, 0x0345, 0x1FA3 }, + { 0x1F64, 0x0345, 0x1FA4 }, + { 0x1F65, 0x0345, 0x1FA5 }, + { 0x1F66, 0x0345, 0x1FA6 }, + { 0x1F67, 0x0345, 0x1FA7 }, + { 0x1F68, 0x0300, 0x1F6A }, + { 0x1F68, 0x0301, 0x1F6C }, + { 0x1F68, 0x0342, 0x1F6E }, + { 0x1F68, 0x0345, 0x1FA8 }, + { 0x1F69, 0x0300, 0x1F6B }, + { 0x1F69, 0x0301, 0x1F6D }, + { 0x1F69, 0x0342, 0x1F6F }, + { 0x1F69, 0x0345, 0x1FA9 }, + { 0x1F6A, 0x0345, 0x1FAA }, + { 0x1F6B, 0x0345, 0x1FAB }, + { 0x1F6C, 0x0345, 0x1FAC }, + { 0x1F6D, 0x0345, 0x1FAD }, + { 0x1F6E, 0x0345, 0x1FAE }, + { 0x1F6F, 0x0345, 0x1FAF }, + { 0x1F70, 0x0345, 0x1FB2 }, + { 0x1F74, 0x0345, 0x1FC2 }, + { 0x1F7C, 0x0345, 0x1FF2 }, + { 0x1FB6, 0x0345, 0x1FB7 }, + { 0x1FBF, 0x0300, 0x1FCD }, + { 0x1FBF, 0x0301, 0x1FCE }, + { 0x1FBF, 0x0342, 0x1FCF }, + { 0x1FC6, 0x0345, 0x1FC7 }, + { 0x1FF6, 0x0345, 0x1FF7 }, + { 0x1FFE, 0x0300, 0x1FDD }, + { 0x1FFE, 0x0301, 0x1FDE }, + { 0x1FFE, 0x0342, 0x1FDF }, + { 0x2190, 0x0338, 0x219A }, + { 0x2192, 0x0338, 0x219B }, + { 0x2194, 0x0338, 0x21AE }, + { 0x21D0, 0x0338, 0x21CD }, + { 0x21D2, 0x0338, 0x21CF }, + { 0x21D4, 0x0338, 0x21CE }, + { 0x2203, 0x0338, 0x2204 }, + { 0x2208, 0x0338, 0x2209 }, + { 0x220B, 0x0338, 0x220C }, + { 0x2223, 0x0338, 0x2224 }, + { 0x2225, 0x0338, 0x2226 }, + { 0x223C, 0x0338, 0x2241 }, + { 0x2243, 0x0338, 0x2244 }, + { 0x2245, 0x0338, 0x2247 }, + { 0x2248, 0x0338, 0x2249 }, + { 0x224D, 0x0338, 0x226D }, + { 0x2261, 0x0338, 0x2262 }, + { 0x2264, 0x0338, 0x2270 }, + { 0x2265, 0x0338, 0x2271 }, + { 0x2272, 0x0338, 0x2274 }, + { 0x2273, 0x0338, 0x2275 }, + { 0x2276, 0x0338, 0x2278 }, + { 0x2277, 0x0338, 0x2279 }, + { 0x227A, 0x0338, 0x2280 }, + { 0x227B, 0x0338, 0x2281 }, + { 0x227C, 0x0338, 0x22E0 }, + { 0x227D, 0x0338, 0x22E1 }, + { 0x2282, 0x0338, 0x2284 }, + { 0x2283, 0x0338, 0x2285 }, + { 0x2286, 0x0338, 0x2288 }, + { 0x2287, 0x0338, 0x2289 }, + { 0x2291, 0x0338, 0x22E2 }, + { 0x2292, 0x0338, 0x22E3 }, + { 0x22A2, 0x0338, 0x22AC }, + { 0x22A8, 0x0338, 0x22AD }, + { 0x22A9, 0x0338, 0x22AE }, + { 0x22AB, 0x0338, 0x22AF }, + { 0x22B2, 0x0338, 0x22EA }, + { 0x22B3, 0x0338, 0x22EB }, + { 0x22B4, 0x0338, 0x22EC }, + { 0x22B5, 0x0338, 0x22ED }, + { 0x3046, 0x3099, 0x3094 }, + { 0x304B, 0x3099, 0x304C }, + { 0x304D, 0x3099, 0x304E }, + { 0x304F, 0x3099, 0x3050 }, + { 0x3051, 0x3099, 0x3052 }, + { 0x3053, 0x3099, 0x3054 }, + { 0x3055, 0x3099, 0x3056 }, + { 0x3057, 0x3099, 0x3058 }, + { 0x3059, 0x3099, 0x305A }, + { 0x305B, 0x3099, 0x305C }, + { 0x305D, 0x3099, 0x305E }, + { 0x305F, 0x3099, 0x3060 }, + { 0x3061, 0x3099, 0x3062 }, + { 0x3064, 0x3099, 0x3065 }, + { 0x3066, 0x3099, 0x3067 }, + { 0x3068, 0x3099, 0x3069 }, + { 0x306F, 0x3099, 0x3070 }, + { 0x306F, 0x309A, 0x3071 }, + { 0x3072, 0x3099, 0x3073 }, + { 0x3072, 0x309A, 0x3074 }, + { 0x3075, 0x3099, 0x3076 }, + { 0x3075, 0x309A, 0x3077 }, + { 0x3078, 0x3099, 0x3079 }, + { 0x3078, 0x309A, 0x307A }, + { 0x307B, 0x3099, 0x307C }, + { 0x307B, 0x309A, 0x307D }, + { 0x309D, 0x3099, 0x309E }, + { 0x30A6, 0x3099, 0x30F4 }, + { 0x30AB, 0x3099, 0x30AC }, + { 0x30AD, 0x3099, 0x30AE }, + { 0x30AF, 0x3099, 0x30B0 }, + { 0x30B1, 0x3099, 0x30B2 }, + { 0x30B3, 0x3099, 0x30B4 }, + { 0x30B5, 0x3099, 0x30B6 }, + { 0x30B7, 0x3099, 0x30B8 }, + { 0x30B9, 0x3099, 0x30BA }, + { 0x30BB, 0x3099, 0x30BC }, + { 0x30BD, 0x3099, 0x30BE }, + { 0x30BF, 0x3099, 0x30C0 }, + { 0x30C1, 0x3099, 0x30C2 }, + { 0x30C4, 0x3099, 0x30C5 }, + { 0x30C6, 0x3099, 0x30C7 }, + { 0x30C8, 0x3099, 0x30C9 }, + { 0x30CF, 0x3099, 0x30D0 }, + { 0x30CF, 0x309A, 0x30D1 }, + { 0x30D2, 0x3099, 0x30D3 }, + { 0x30D2, 0x309A, 0x30D4 }, + { 0x30D5, 0x3099, 0x30D6 }, + { 0x30D5, 0x309A, 0x30D7 }, + { 0x30D8, 0x3099, 0x30D9 }, + { 0x30D8, 0x309A, 0x30DA }, + { 0x30DB, 0x3099, 0x30DC }, + { 0x30DB, 0x309A, 0x30DD }, + { 0x30EF, 0x3099, 0x30F7 }, + { 0x30F0, 0x3099, 0x30F8 }, + { 0x30F1, 0x3099, 0x30F9 }, + { 0x30F2, 0x3099, 0x30FA }, + { 0x30FD, 0x3099, 0x30FE }, + { 0x11099, 0x110BA, 0x1109A }, + { 0x1109B, 0x110BA, 0x1109C }, + { 0x110A5, 0x110BA, 0x110AB }, + { 0x11131, 0x11127, 0x1112E }, + { 0x11132, 0x11127, 0x1112F }, + { 0x11347, 0x1133E, 0x1134B }, + { 0x11347, 0x11357, 0x1134C }, + { 0x114B9, 0x114B0, 0x114BC }, + { 0x114B9, 0x114BA, 0x114BB }, + { 0x114B9, 0x114BD, 0x114BE }, + { 0x115B8, 0x115AF, 0x115BA }, + { 0x115B9, 0x115AF, 0x115BB }, + { 0x11935, 0x11930, 0x11938 }, +}; From 3670346bc6a7aa37007c087ac050193048165d0b Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Fri, 2 Feb 2024 10:23:01 -0500 Subject: [PATCH 02/18] Compile char_compare only if PDC_WIDE --- os2gui/pdcdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 0d441fc1..2bb4a66b 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -1426,7 +1426,6 @@ static const struct CharRec alt_chars[] = { { 0x03C6, { { cp_437, 0xED } } }, { 0x2260, { { cp_437, '=' }, { cp_437, '/' } } }, }; -#endif /* Compare function for the above tables */ static int @@ -1443,6 +1442,7 @@ char_compare(const void *p1, const void *p2) return 0; } } +#endif /* Render a single character */ static void From 6c5e7a7e426eefe2aaf2b5734951d5ed51eaa97a Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Fri, 2 Feb 2024 20:26:02 -0500 Subject: [PATCH 03/18] Fix some GCC warnings --- os2gui/pdcdisp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 2bb4a66b..eda41a09 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -1450,11 +1450,11 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int ch { #ifdef PDC_WIDE /* ch is a Unicode character */ - CHAR bytes[2]; + unsigned char bytes[2]; if (0x20 <= ch && ch <= 0x7E) { /* Render ASCII in the default code page; it's faster */ - bytes[0] = (CHAR)ch; + bytes[0] = (unsigned char)ch; GpiSetCharSet(hps, (charset & 3) + 1); GpiCharStringPosAt(hps, point, rect, options, 1, bytes, NULL); } else if (have_cp[cp_1200]) { @@ -1465,7 +1465,7 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int ch GpiCharStringPosAt(hps, point, rect, options, 2, bytes, NULL); } else { /* Select a matching character set */ - static const struct CharRec bad_char = { 0x003F, { cp_850, '?' } }; + static const struct CharRec bad_char = { 0x003F, { { cp_850, '?' } } }; const struct CharRec *rec; unsigned i; From c060bdd08ab3b656e2c46898c3daae270449f779 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Fri, 2 Feb 2024 20:26:19 -0500 Subject: [PATCH 04/18] Fill background for full-width character --- os2gui/pdcdisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index eda41a09..9196a57a 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -462,6 +462,8 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, } clip_rect.xRight += PDC_cxChar; } + if (x + i < SP->cols && (srcp[i] & A_CHARTEXT) == MAX_UNICODE) + clip_rect.xRight += PDC_cxChar; WinFillRect(hps, &clip_rect, switch_colors(hps, background_rgb)); /* Expand by one more column */ From 57457f39ac8bd3ff13eae6a349a5bf8c0569fa60 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Mon, 5 Feb 2024 22:06:14 -0500 Subject: [PATCH 05/18] Support combining character U+0338 --- os2gui/pdcdisp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 9196a57a..7eec2219 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -392,7 +392,7 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, /* 0x0335 */ ' ', /* 0x0336 */ ' ', /* 0x0337 */ ' ', - /* 0x0338 */ ' ', + /* 0x0338 */ '/', /* 0x0339 */ ' ', /* 0x033A */ ' ', /* 0x033B */ ' ', @@ -1275,7 +1275,10 @@ static const struct CharRec characters[] = { { 0x2193, { { cp_437, 0x19 } } }, { 0x2194, { { cp_437, 0x1D } } }, { 0x2195, { { cp_437, 0x12 } } }, + { 0x219A, { { cp_437, 0x1B }, { cp_437, '/' } } }, + { 0x219B, { { cp_437, 0x1A }, { cp_437, '/' } } }, { 0x21A8, { { cp_437, 0x17 } } }, + { 0x21AE, { { cp_437, 0x1D }, { cp_437, '/' } } }, { 0x2202, { { cp_1275, 0xB6 } } }, { 0x2206, { { cp_1275, 0xC6 } } }, { 0x220F, { { cp_1275, 0xB8 } } }, @@ -1287,10 +1290,16 @@ static const struct CharRec characters[] = { { 0x2229, { { cp_437, 0xEF } } }, { 0x222B, { { cp_1275, 0xBA } } }, { 0x2248, { { cp_437, 0xF7 } } }, + { 0x2249, { { cp_437, 0xF7 }, { cp_437, '/' } } }, { 0x2260, { { cp_1275, 0xAD } } }, { 0x2261, { { cp_437, 0xF0 } } }, + { 0x2262, { { cp_437, 0xF0 }, { cp_437, '/' } } }, { 0x2264, { { cp_437, 0xF3 } } }, { 0x2265, { { cp_437, 0xF2 } } }, + { 0x226E, { { 0, '<' }, { 0, '/' } } }, + { 0x226F, { { 0, '>' }, { 0, '/' } } }, + { 0x2270, { { cp_437, 0xF3 }, { cp_437, '/' } } }, + { 0x2271, { { cp_437, 0xF2 }, { cp_437, '/' } } }, { 0x2302, { { cp_437, 0x7F } } }, { 0x2310, { { cp_437, 0xA9 } } }, { 0x2320, { { cp_437, 0xF4 } } }, From 3f3a8abcbab9ee96882be54992da86ab0a701a08 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 07:19:53 -0500 Subject: [PATCH 06/18] Limit WM_PAINT to the update rectangle --- os2gui/pdcscrn.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/os2gui/pdcscrn.c b/os2gui/pdcscrn.c index 9a5052a6..4ecce1e6 100644 --- a/os2gui/pdcscrn.c +++ b/os2gui/pdcscrn.c @@ -1533,6 +1533,9 @@ HandlePaint(const HWND hwnd) int i; int num_cols = PDC_n_cols; int num_rows = PDC_n_rows; + int row_min, row_max; + int col_min, col_max; + if (num_cols > COLS) num_cols = COLS; if (num_rows > SP->lines) @@ -1543,10 +1546,21 @@ HandlePaint(const HWND hwnd) PDC_setup_font(hps); - for (i = 0; i < num_rows; i++) + PDC_pixel_to_screen(update_rect.xLeft, update_rect.yTop, &col_min, &row_min); + PDC_pixel_to_screen(update_rect.xRight, update_rect.yBottom, &col_max, &row_max); + if (col_min < 0) + col_min = 0; + if (row_min < 0) + row_min = 0; + if (col_max > num_cols - 1) + col_max = num_cols - 1; + if (row_max > num_rows - 1) + row_max = num_rows - 1; + + for (i = row_min; i <= row_max; i++) { if (i < SP->lines && curscr->_y[i]) - PDC_transform_line_sliced( i, 0, num_cols, curscr->_y[i]); + PDC_transform_line_sliced( i, col_min, col_max - col_min + 1, curscr->_y[i] + col_min); } WinEndPaint(hps); From 5dd925f9b61b40ccb04085aaa9fd2310496c7c24 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 07:21:58 -0500 Subject: [PATCH 07/18] Remove 'options' parameter from render_char --- os2gui/pdcdisp.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 7eec2219..447f58ac 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -314,7 +314,7 @@ static bool cp_inited = FALSE; static uint32_t *PDC_normalize(uint32_t ch, bool compose); #endif -static void render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int charset); +static void render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset); /* update the given physical line to look like the corresponding line in curscr. @@ -483,7 +483,6 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, const attr_t attrib = (attr_t)( srcp[i] & ~A_CHARTEXT); uint32_t cp_ch = (uint32_t)( srcp[i] & A_CHARTEXT); int charset; - ULONG options = 0; #if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) uint32_t *seq = NULL; #endif @@ -525,12 +524,12 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, pt.x = clip_rect.xLeft; pt.y = clip_rect.yBottom + fm.lMaxDescender; - render_char(hps, &pt, &clip_rect, options, cp_ch, charset); + render_char(hps, &pt, &clip_rect, cp_ch, charset); if ((attrib & A_BOLD) && !have_bold) { /* Overstrike to make a bold font */ ++pt.x; - render_char(hps, &pt, &clip_rect, options, cp_ch, charset); + render_char(hps, &pt, &clip_rect, cp_ch, charset); --pt.x; } #if defined(PDC_WIDE) && defined(USING_COMBINING_CHARACTER_SCHEME) @@ -543,12 +542,12 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, if (0x0300 <= cch && cch < 0x0300 + sizeof(cchars)/sizeof(cchars[0])) { cch = cchars[cch - 0x0300]; - render_char(hps, &pt, &clip_rect, options, cch, charset); + render_char(hps, &pt, &clip_rect, cch, charset); if ((attrib & A_BOLD) && !have_bold) { /* Overstrike to make a bold font */ ++pt.x; - render_char(hps, &pt, &clip_rect, options, cch, charset); + render_char(hps, &pt, &clip_rect, cch, charset); --pt.x; } } @@ -1457,7 +1456,7 @@ char_compare(const void *p1, const void *p2) /* Render a single character */ static void -render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int charset) +render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) { #ifdef PDC_WIDE /* ch is a Unicode character */ @@ -1467,13 +1466,13 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int ch /* Render ASCII in the default code page; it's faster */ bytes[0] = (unsigned char)ch; GpiSetCharSet(hps, (charset & 3) + 1); - GpiCharStringPosAt(hps, point, rect, options, 1, bytes, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, bytes, NULL); } else if (have_cp[cp_1200]) { /* We have Unicode support */ bytes[0] = (ch & 0x00FF) >> 0; bytes[1] = (ch & 0xFF00) >> 8; GpiSetCharSet(hps, (charset & 3) + (cp_1200 << 2) + 1); - GpiCharStringPosAt(hps, point, rect, options, 2, bytes, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 2, bytes, NULL); } else { /* Select a matching character set */ static const struct CharRec bad_char = { 0x003F, { { cp_850, '?' } } }; @@ -1506,7 +1505,7 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int ch } GpiSetCharSet(hps, (rec->glyphs[i].code_page << 2) + (charset & 3) + 1); - GpiCharStringPosAt(hps, point, rect, options, 1, bytes, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, bytes, NULL); } } #else @@ -1520,25 +1519,25 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG options, ULONG ch, int ch /* We have code page 1275 */ byte = 0xAD; GpiSetCharSet(hps, (cp_1275 << 2) | (charset & 3) + 1); - GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } else { /* Overstrike = and / */ GpiSetCharSet(hps, (charset & 3) + 1); byte = '='; - GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); byte = '/'; - GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } } else if (_is_altcharset(ch)) { /* Other alternate characters come from code page 437 */ byte = acs_map[ch & 0xFF]; GpiSetCharSet(hps, (cp_437 << 2) | (charset & 3) + 1); - GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } else { /* Normal character from the configured default code page */ byte = ch & 0xFF; GpiSetCharSet(hps, (charset & 3) + 1); - GpiCharStringPosAt(hps, point, rect, options, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } #endif } From cf3d97e28cb53206c87c6c3be3d03620b78884bf Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 07:27:19 -0500 Subject: [PATCH 08/18] Set up fonts on demand rather than in advance Setting up all code pages and fonts in advance was drastically slowing down the rendering. --- os2gui/pdcdisp.c | 126 +++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 447f58ac..5e4f7b6e 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -315,6 +315,7 @@ static uint32_t *PDC_normalize(uint32_t ch, bool compose); #endif static void render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset); +static void set_charset(HPS hps, enum CodePage code_page, int charset); /* update the given physical line to look like the corresponding line in curscr. @@ -443,6 +444,7 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, cursor_overwritten = TRUE; /* Do we have a real bold font? */ + set_charset(hps, cp_native, 2); GpiQueryLogicalFont(hps, 2 + 1, (PSTR8)synth, &fattrs, sizeof(fattrs)); have_bold = synth[0] == '\0'; @@ -615,6 +617,58 @@ static void PDC_transform_line_given_hps( HPS hps, const int lineno, redraw_cursor( hps); } +static void set_charset(HPS hps, enum CodePage code_page, int charset) +{ + struct font_type { + const char *suffix; + unsigned flags; + }; + static struct font_type const font_types[] = { + { "", 0 }, + { " Italic", FATTR_SEL_ITALIC }, + { " Bold", FATTR_SEL_BOLD }, + { " Bold Italic", FATTR_SEL_BOLD | FATTR_SEL_ITALIC }, + }; + + int cs = code_page*4 + charset + 1; + BOOL rc = GpiSetCharSet(hps, cs); + if (!rc) + { + FATTRS fattrs; + LONG lmatch; + const char *facename = ""; + /* GCC makes the facename parameter to GpiCreateLogFont a const + pointer to STR8. Watcom uses a non-const pointer. This causes + warnings in one compiler or the other unless it is resolved here. */ +#ifdef __GNUC__ + typedef const STR8 *p_facename; +#else + typedef STR8 *p_facename; +#endif + + memset(&fattrs, 0, sizeof(fattrs)); + fattrs.usRecordLength = sizeof(fattrs); + fattrs.fsType = FATTR_TYPE_ANTIALIASED; + fattrs.fsFontUse = FATTR_FONTUSE_OUTLINE | FATTR_FONTUSE_TRANSFORMABLE; + + fattrs.usCodePage = (code_page == cp_native) ? 0 : code_pages[code_page-1]; + fattrs.fsSelection = 0; + snprintf(fattrs.szFacename, sizeof(fattrs.szFacename), "%s%s", + PDC_font_name, font_types[charset].suffix); + /* Null already written to last element fo fattrs.szFacename */ + lmatch = GpiCreateLogFont(hps, (p_facename)facename, cs, &fattrs); + if (lmatch != FONT_MATCH || strcmp(fattrs.szFacename, PDC_font_name) == 0) + { + snprintf(fattrs.szFacename, sizeof(fattrs.szFacename), "%s", + PDC_font_name); + fattrs.fsSelection = font_types[charset].flags; + facename = "synth"; + GpiCreateLogFont(hps, (p_facename)facename, cs, &fattrs); + } + } + GpiSetCharSet(hps, cs); +} + struct CharRec { unsigned short uni_ch; struct { @@ -1462,16 +1516,11 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) /* ch is a Unicode character */ unsigned char bytes[2]; - if (0x20 <= ch && ch <= 0x7E) { - /* Render ASCII in the default code page; it's faster */ - bytes[0] = (unsigned char)ch; - GpiSetCharSet(hps, (charset & 3) + 1); - GpiCharStringPosAt(hps, point, rect, 0, 1, bytes, NULL); - } else if (have_cp[cp_1200]) { + if (have_cp[cp_1200]) { /* We have Unicode support */ bytes[0] = (ch & 0x00FF) >> 0; bytes[1] = (ch & 0xFF00) >> 8; - GpiSetCharSet(hps, (charset & 3) + (cp_1200 << 2) + 1); + set_charset(hps, cp_1200, (charset & 3)); GpiCharStringPosAt(hps, point, rect, 0, 2, bytes, NULL); } else { /* Select a matching character set */ @@ -1503,8 +1552,7 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) if (bytes[0] == 0) { break; } - GpiSetCharSet(hps, - (rec->glyphs[i].code_page << 2) + (charset & 3) + 1); + set_charset(hps, rec->glyphs[i].code_page, + (charset & 3)); GpiCharStringPosAt(hps, point, rect, 0, 1, bytes, NULL); } } @@ -1518,11 +1566,11 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) if (have_cp[cp_1275]) { /* We have code page 1275 */ byte = 0xAD; - GpiSetCharSet(hps, (cp_1275 << 2) | (charset & 3) + 1); + set_charset(hps, cp_1275, (charset & 3)); GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } else { /* Overstrike = and / */ - GpiSetCharSet(hps, (charset & 3) + 1); + set_charset(hps, cp_native, (charset & 3)); byte = '='; GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); byte = '/'; @@ -1531,12 +1579,12 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) } else if (_is_altcharset(ch)) { /* Other alternate characters come from code page 437 */ byte = acs_map[ch & 0xFF]; - GpiSetCharSet(hps, (cp_437 << 2) | (charset & 3) + 1); + set_charset(hps, cp_437, (charset & 3)); GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } else { /* Normal character from the configured default code page */ byte = ch & 0xFF; - GpiSetCharSet(hps, (charset & 3) + 1); + set_charset(hps, cp_native, (charset & 3)); GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); } #endif @@ -1589,19 +1637,7 @@ void PDC_set_font_box(HWND hwnd) void PDC_setup_font(HPS hps) { - struct font_type { - const char *suffix; - unsigned flags; - }; - static struct font_type const font_types[] = { - { "", 0 }, - { " Italic", FATTR_SEL_ITALIC }, - { " Bold", FATTR_SEL_BOLD }, - { " Bold Italic", FATTR_SEL_BOLD | FATTR_SEL_ITALIC }, - }; - FATTRS fattrs; SIZEF box; - unsigned i; /* Determine the name of the font */ if (PDC_font_name[0] == '\0') @@ -1655,45 +1691,7 @@ void PDC_setup_font(HPS hps) } } - memset(&fattrs, 0, sizeof(fattrs)); - fattrs.usRecordLength = sizeof(fattrs); - fattrs.fsType = FATTR_TYPE_ANTIALIASED; - fattrs.fsFontUse = FATTR_FONTUSE_OUTLINE | FATTR_FONTUSE_TRANSFORMABLE; - - for (i = 0; i < 4; ++i) - { - LONG lmatch; - unsigned j; - const char *facename = ""; - /* GCC makes the facename parameter to GpiCreateLogFont a const - pointer to STR8. Watcom uses a non-const pointer. This causes - warnings in one compiler or the other unless it is resolved here. */ -#ifdef __GNUC__ - typedef const STR8 *p_facename; -#else - typedef STR8 *p_facename; -#endif - - fattrs.usCodePage = 0; - fattrs.fsSelection = 0; - snprintf(fattrs.szFacename, sizeof(fattrs.szFacename), "%s%s", - PDC_font_name, font_types[i].suffix); - /* Null already written to last element fo fattrs.szFacename */ - lmatch = GpiCreateLogFont(hps, (p_facename)facename, i + 1, &fattrs); - if (lmatch != FONT_MATCH || strcmp(fattrs.szFacename, PDC_font_name) == 0) - { - snprintf(fattrs.szFacename, sizeof(fattrs.szFacename), "%s", - PDC_font_name); - facename = "synth"; - GpiCreateLogFont(hps, (p_facename)facename, i + 1, &fattrs); - } - for (j = 0; j < sizeof(code_pages)/sizeof(code_pages[0]); ++j) { - fattrs.usCodePage = code_pages[j]; - GpiCreateLogFont(hps, (p_facename)facename, i + 5 + j*4, &fattrs); - } - } - - GpiSetCharSet(hps, 1L); + set_charset(hps, cp_native, 0); GpiQueryCharBox(hps, &box); box.cx = (FIXED)(((long long)box.cx * PDC_font_size) / 12); box.cy = (FIXED)(((long long)box.cy * PDC_font_size) / 12); From 1c664724395480e3bc789467e82174afd3d8ace7 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 07:28:48 -0500 Subject: [PATCH 09/18] Don't set up fonts when drawing the cursor --- os2gui/pdcdisp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 5e4f7b6e..46d3b93f 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -146,7 +146,6 @@ void PDC_gotoyx(int row, int col) { HPS hps = WinGetPS( PDC_hWnd) ; GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL); - PDC_setup_font(hps); SP->curscol = col; SP->cursrow = row; From d82596d156e3096dea94e7d3c9669f59f165d897 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 08:27:24 -0500 Subject: [PATCH 10/18] Put back writing ASCII in the native code page --- os2gui/pdcdisp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 46d3b93f..12ef57fd 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -1515,7 +1515,12 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) /* ch is a Unicode character */ unsigned char bytes[2]; - if (have_cp[cp_1200]) { + if (0x20 <= ch && ch <= 0x7E) { + /* Render ASCII in the default code page; it's faster */ + bytes[0] = (unsigned char)ch; + set_charset(hps, cp_native, (charset & 3)); + GpiCharStringPosAt(hps, point, rect, 0, 1, bytes, NULL); + } else if (have_cp[cp_1200]) { /* We have Unicode support */ bytes[0] = (ch & 0x00FF) >> 0; bytes[1] = (ch & 0xFF00) >> 8; From 798f75b6752a2e1c4872c35d985ddcb3c17d18ea Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 09:26:40 -0500 Subject: [PATCH 11/18] Use CP1004 for fast rendering --- os2gui/pdcdisp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index 12ef57fd..d6a51d09 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -1515,10 +1515,11 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) /* ch is a Unicode character */ unsigned char bytes[2]; - if (0x20 <= ch && ch <= 0x7E) { - /* Render ASCII in the default code page; it's faster */ + if (ch <= 0xFF) { + /* Render lower characters in code page 1004; it's faster */ + /* All known versions of OS/2 have code page 1004 */ bytes[0] = (unsigned char)ch; - set_charset(hps, cp_native, (charset & 3)); + set_charset(hps, cp_1004, (charset & 3)); GpiCharStringPosAt(hps, point, rect, 0, 1, bytes, NULL); } else if (have_cp[cp_1200]) { /* We have Unicode support */ From d1b8c8e8ce1d9306e171664941b8b88068473e14 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 13:18:04 -0500 Subject: [PATCH 12/18] Fix some warnings in GCC --- os2gui/pdcdisp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index d6a51d09..cc2ca35d 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -1564,7 +1564,7 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) #else /* For non-PDC_WIDE build, ch is either an 8 bit character or it has A_ALTCHARSET set */ - CHAR byte; + unsigned char byte; if (ch == ACS_NEQUAL) { /* Not-equal sign from code page 1275 (which might not be available) */ @@ -1572,25 +1572,25 @@ render_char(HPS hps, PPOINTL point, PRECTL rect, ULONG ch, int charset) /* We have code page 1275 */ byte = 0xAD; set_charset(hps, cp_1275, (charset & 3)); - GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, (PCH)&byte, NULL); } else { /* Overstrike = and / */ set_charset(hps, cp_native, (charset & 3)); byte = '='; - GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, (PCH)&byte, NULL); byte = '/'; - GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, (PCH)&byte, NULL); } } else if (_is_altcharset(ch)) { /* Other alternate characters come from code page 437 */ byte = acs_map[ch & 0xFF]; set_charset(hps, cp_437, (charset & 3)); - GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, (PCH)&byte, NULL); } else { /* Normal character from the configured default code page */ byte = ch & 0xFF; set_charset(hps, cp_native, (charset & 3)); - GpiCharStringPosAt(hps, point, rect, 0, 1, &byte, NULL); + GpiCharStringPosAt(hps, point, rect, 0, 1, (PCH)&byte, NULL); } #endif } From cd198a965fc563a0ca3c22d7cfd36237eef16bf8 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 13:31:17 -0500 Subject: [PATCH 13/18] Use watcom.wif, and other changes to Makefile.wcc --- os2gui/Makefile.wcc | 229 ++------------------------------------------ 1 file changed, 7 insertions(+), 222 deletions(-) diff --git a/os2gui/Makefile.wcc b/os2gui/Makefile.wcc index e5c42772..60725d6b 100644 --- a/os2gui/Makefile.wcc +++ b/os2gui/Makefile.wcc @@ -1,4 +1,4 @@ -# Watcom WMAKE Makefile for PDCurses library - Win32 Watcom C/C++ 10.6+ +# Watcom WMAKE Makefile for PDCurses library - OS/2 Watcom C/C++ # # Usage: wmake -f [wingui/]Makefile.wcc [DEBUG=Y] [WIDE=Y] [UTF8=Y] [target] # @@ -15,233 +15,18 @@ common = $(PDCURSES_SRCDIR)/common osdir = os2gui -TARGET = os2v2_pm +TARGET = os2 LTARGET = os2v2_pm CFLAGS = -ei -#!ifeq DLL Y -#ADDED_LIBS_FOR_DLL = lib winmm.lib -#!else -#ADDED_LIBS = lib winmm.lib -#!endif - -EXTRA_LIB_CMD = -$(COPY) $(PDCNAME).lib panel.lib - -############################################################################## -# Common elements for the Watcom makefiles - -!ifeq TARGET dos -!ifneq MODEL f -TARGET16 = 1 -!endif -!endif - -!ifdef __UNIX__ -DEL = rm -f -COPY = cp +!ifeq DLL Y +ADDED_LIBS_FOR_DLL = !else -DEL = del -COPY = copy -!endif - -!ifeq TARGET linux -!else -E = .exe -!endif - -.EXTENSIONS : -!ifeq TARGET linux -.EXTENSIONS : . .lib .obj .h .c -!else -.EXTENSIONS : $(E) .dll .lib .res .obj .rc .h .c -!endif - -!ifdef TARGET16 -CC = *wcc -!else -CC = *wcc386 -MODEL = f -!endif - -LIBEXE = *wlib -q -n -b -c -t -pa - -LINK = *wlink - -RC = *wrc - -!ifdef DLL -cflags_dll_nt = -bd -cflags_dll_os2 = -bd -DPDC_DLL_BUILD -cflags_dll_imp_nt = -DPDC_DLL_BUILD -!endif - -CFLAGS += -bt=$(TARGET) -m$(MODEL) -wx -we -zq -i=$(PDCURSES_SRCDIR) -!ifeq DEBUG Y -CFLAGS += -d2 -DDEBUG -DPDCDEBUG -!ifdef TARGET16 -CFLAGS += -hw -!else -CFLAGS += -hd -!endif -!else -CFLAGS += -s -oneatx -DNDEBUG -!endif -!ifdef CHTYPE_32 -CFLAGS += -DCHTYPE_32 -!endif -!ifeq WIDE Y -CFLAGS += -DPDC_WIDE -!endif -!ifeq UTF8 Y -CFLAGS += -DPDC_FORCE_UTF8 -!endif -!ifeq TARGET dos -CFLAGS += -DDOS -!endif -!ifdef cflags_dll_$(TARGET) -CFLAGS += $(cflags_dll_imp_$(TARGET)) -DLL_CFLAGS_ = $(cflags_dll_$(TARGET)) -!endif - -!ifdef DLL -ltarget_dll_nt = nt_dll -ltarget_dll_os2 = os2v2_dll +ADDED_LIBS = !endif -LDFLAGS = op q, noext -!ifeq DEBUG Y -!ifdef TARGET16 -LDFLAGS += debug watcom all -!else -LDFLAGS += debug dwarf all -!endif -!endif - -srcdir = $(PDCURSES_SRCDIR)/pdcurses -demodir = $(PDCURSES_SRCDIR)/demos - -LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj & - border.obj clear.obj color.obj delch.obj deleteln.obj & - getch.obj getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj & - insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj & - outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj & - scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj terminfo.obj & - touch.obj util.obj window.obj debug.obj - -PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj & - pdcsetsc.obj pdcutil.obj - -DEMOS = calendar$(E) firework$(E) init_col$(E) mbrot$(E) newtest$(E) & - ozdemo$(E) picsview$(E) ptest$(E) rain$(E) speed$(E) test_pan$(E) & - testcurs$(E) tuidemo$(E) widetest$(E) worm$(E) xmas$(E) - -PDCNAME = pdcurses - -!ifdef __LOADDLL__ -! loaddll wcc wccd -! loaddll wcc386 wccd386 -! loaddll wlink wlinkd -! loaddll wlib wlibd -!endif - -all: $(PDCNAME).lib - -.c: $(srcdir);$(PDCURSES_SRCDIR)/$(osdir);$(demodir) -.c.obj: .autodepend -!ifeq TARGET dos - @set INCLUDE=$(%WATCOM)/h -!else ifeq TARGET os2 - @set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/os2 -!else ifeq TARGET nt - @set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt -!else ifeq TARGET linux - @set INCLUDE=$(%WATCOM)/lh -!endif - $(CC) $(CFLAGS) $(DLL_CFLAGS_$(build_dll_$^&)) -fo=$@ $< - -!ifeq TARGET linux -.obj.: -!else -.obj$(E): -!endif -# $(LINK) $(LDFLAGS) name $@ form pm file $*.obj lib $(PDCNAME).lib $(ADDED_LIBS) - $(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file $*.obj lib $(PDCNAME).lib $(ADDED_LIBS) - -build_dll_calendar = no -build_dll_firework = no -build_dll_init_col = no -build_dll_mbrot = no -build_dll_newtest = no -build_dll_ozdemo = no -build_dll_picsview = no -build_dll_ptest = no -build_dll_rain = no -build_dll_test_pan = no -build_dll_testcurs = no -build_dll_tui = no -build_dll_tuidemo = no -build_dll_widetest = no -build_dll_worm = no -build_dll_xmas = no - -calendar$(E): calendar.obj $(PDCNAME).lib -firework$(E): firework.obj $(PDCNAME).lib -init_col$(E): init_col.obj $(PDCNAME).lib -mbrot$(E): mbrot.obj $(PDCNAME).lib -newtest$(E): newtest.obj $(PDCNAME).lib -ozdemo$(E): ozdemo.obj $(PDCNAME).lib -picsview$(E): picsview.obj $(PDCNAME).lib -ptest$(E): ptest.obj $(PDCNAME).lib -rain$(E): rain.obj $(PDCNAME).lib -testcurs$(E): testcurs.obj $(PDCNAME).lib -test_pan$(E): test_pan.obj $(PDCNAME).lib -widetest$(E): widetest.obj $(PDCNAME).lib -worm$(E): worm.obj $(PDCNAME).lib -xmas$(E): xmas.obj $(PDCNAME).lib - -tuidemo$(E): tuidemo.obj tui.obj $(PDCNAME).lib - $(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file {tuidemo.obj tui.obj} lib $(PDCNAME).lib $(ADDED_LIBS) - -!ifdef ltarget_dll_$(TARGET) -version_res_nt = $(PDCNAME).res - -.rc: $(PDCURSES_SRCDIR)/common -.rc.res: -!ifeq TARGET nt - @set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt -!endif - $(RC) -r -bt=$(TARGET) $< -fo=$@ -!endif - -$(PDCNAME).lbc : $(LIBOBJS) $(PDCOBJS) $(version_res_$(TARGET)) -!ifdef ltarget_dll_$(TARGET) - $(LINK) $(LDFLAGS) name $(PDCNAME).dll sys $(ltarget_dll_$(TARGET)) opt impfile=$@ file {$(LIBOBJS) $(PDCOBJS)} $(ADDED_LIBS_FOR_DLL) -!ifdef version_res_$(TARGET) - $(RC) -k -bt=$(TARGET) $(version_res_$(TARGET)) $(PDCNAME).dll -!endif -!else - %write $@ $(LIBOBJS) $(PDCOBJS) -!endif - -$(PDCNAME).lib : $(PDCNAME).lbc - $(LIBEXE) $@ @$< -!ifdef EXTRA_LIB_CMD - $(EXTRA_LIB_CMD) -!endif - -demos: $(DEMOS) - -dist: .symbolic +EXTRA_LIB_CMD = -$(COPY) $(PDCNAME).lib panel.lib -clean: .symbolic - @if exist *.obj -$(DEL) *.obj - @if exist *.lib -$(DEL) *.lib - @if exist *.dll -$(DEL) *.dll - @for %f in ($(DEMOS)) do @if exist %f -$(DEL) %f - @if exist *.err -$(DEL) *.err - @if exist *.map -$(DEL) *.map - @if exist *.res -$(DEL) *.res - @if exist *.lbc -$(DEL) *.lbc -############################################################################## +!include $(common)/watcom.mif From ff74a30000ec191e58af43708fed62008dbb67b7 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Wed, 7 Feb 2024 21:35:42 -0500 Subject: [PATCH 14/18] Add PDC_PORT_OS2GUI enum --- curses.h | 3 ++- os2gui/pdcutil.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/curses.h b/curses.h index 4d098eb1..a3fc3aaf 100644 --- a/curses.h +++ b/curses.h @@ -167,7 +167,8 @@ enum PDC_port PDC_PORT_DOSVGA = 8, PDC_PORT_PLAN9 = 9, PDC_PORT_LINUX_FB = 10, - PDC_PORT_OPENGL = 11 + PDC_PORT_OPENGL = 11, + PDC_PORT_OS2GUI = 12 }; /* Use this structure with PDC_get_version() for run-time info about the diff --git a/os2gui/pdcutil.c b/os2gui/pdcutil.c index a3961078..0e8a0cf1 100644 --- a/os2gui/pdcutil.c +++ b/os2gui/pdcutil.c @@ -39,4 +39,4 @@ const char *PDC_sysname(void) return "OS2GUI"; } -enum PDC_port PDC_port_val = PDC_PORT_WINGUI; +enum PDC_port PDC_port_val = PDC_PORT_OS2GUI; From 0bf639920a16ca5e00ab53f66b445c425ad1fa30 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Thu, 8 Feb 2024 21:56:20 -0500 Subject: [PATCH 15/18] Set focus to Curses window on mouse click --- os2gui/pdcscrn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os2gui/pdcscrn.c b/os2gui/pdcscrn.c index 4ecce1e6..3b75ea65 100644 --- a/os2gui/pdcscrn.c +++ b/os2gui/pdcscrn.c @@ -1851,6 +1851,7 @@ static MRESULT EXPENTRY WndProc (const HWND hwnd, return 0; case WM_BUTTON1DOWN: + WinSetActiveWindow(HWND_DESKTOP, hwnd); button = 1; action = BUTTON_PRESSED; break; @@ -1861,6 +1862,7 @@ static MRESULT EXPENTRY WndProc (const HWND hwnd, break; case WM_BUTTON3DOWN: + WinSetActiveWindow(HWND_DESKTOP, hwnd); button = 3; action = BUTTON_PRESSED; break; @@ -1871,6 +1873,7 @@ static MRESULT EXPENTRY WndProc (const HWND hwnd, break; case WM_BUTTON2DOWN: + WinSetActiveWindow(HWND_DESKTOP, hwnd); button = 2; action = BUTTON_PRESSED; break; From dd7a2aa6627057d3fa88b92522a1dbbea6e22e4c Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Thu, 8 Feb 2024 22:41:39 -0500 Subject: [PATCH 16/18] Rework handling of PDC_FONT * Use PDC_FONT in preference to registry * Support PDC_FONT_SIZE * Don't save font face and size if set via environment --- os2gui/pdcdisp.c | 13 ++++++++++--- os2gui/pdcscrn.c | 40 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/os2gui/pdcdisp.c b/os2gui/pdcdisp.c index cc2ca35d..593ac1e1 100644 --- a/os2gui/pdcdisp.c +++ b/os2gui/pdcdisp.c @@ -1620,7 +1620,7 @@ void PDC_doupdate(void) } char PDC_font_name[FACESIZE]; -int PDC_font_size = 12; +int PDC_font_size = 0; void PDC_set_font_box(HWND hwnd) { @@ -1645,6 +1645,12 @@ void PDC_setup_font(HPS hps) SIZEF box; /* Determine the name of the font */ + if (PDC_font_size == 0) + { + const char *env_size = getenv("PDC_FONT_SIZE"); + if (env_size != NULL) + PDC_font_size = strtol(env_size, NULL, 10); + } if (PDC_font_name[0] == '\0') { const char *env_font = getenv("PDC_FONT"); @@ -1654,9 +1660,8 @@ void PDC_setup_font(HPS hps) size_t len; if (colon != NULL) { - PDC_font_size = strtol(colon + 1, NULL, 10); if (PDC_font_size < 2) - PDC_font_size = 12; + PDC_font_size = strtol(colon + 1, NULL, 10); len = colon - env_font; } else @@ -1672,6 +1677,8 @@ void PDC_setup_font(HPS hps) strcpy(PDC_font_name, "Courier"); } } + if (PDC_font_size < 2) + PDC_font_size = 12; /* Query available code pages */ if (!cp_inited) { diff --git a/os2gui/pdcscrn.c b/os2gui/pdcscrn.c index 3b75ea65..78ea67fe 100644 --- a/os2gui/pdcscrn.c +++ b/os2gui/pdcscrn.c @@ -1381,19 +1381,43 @@ static void get_app_name(char *name, size_t name_len) name[i] = tolower(name[i]); } +/* Font name and size as read from the registry */ +static char prf_font_name[FACESIZE] = ""; +static int prf_font_size = 0; + static int set_default_sizes_from_registry( const int n_cols, const int n_rows, const int xloc, const int yloc) { char buff[1024]; char app_name[FILENAME_MAX]; BOOL rc; + const char *pdc_font = getenv("PDC_FONT"); + const char *pdc_font_size = getenv("PDC_FONT_SIZE"); + const char *save_font_name; + int save_font_size; + + /* If the font has been set through PDC_FONT, keep the setting, if any, + in the registry */ + if (pdc_font == NULL) + save_font_name = PDC_font_name; + else + save_font_name = prf_font_name; + if (save_font_name[0] == '\0') + save_font_name = "Courier"; + + if (pdc_font_size == NULL && (pdc_font == NULL || strchr(pdc_font, ':') == NULL)) + save_font_size = PDC_font_size; + else + save_font_size = prf_font_size; + if (save_font_size < 2) + save_font_size = 12; snprintf( buff, sizeof(buff), "%dx%d,%d,%d,%d,%d;%d,%d,%d,%d:%s", - n_cols, n_rows, PDC_font_size, + n_cols, n_rows, save_font_size, xloc, yloc, /*menu_shown*/ 0, min_lines, max_lines, min_cols, max_cols, - PDC_font_name); + save_font_name); get_app_name( app_name, sizeof(app_name)); rc = PrfWriteProfileString(HINI_PROFILE, (PSZ)"PDCurses", (PSZ)app_name, (PSZ)buff); @@ -1417,20 +1441,28 @@ static int get_default_sizes_from_registry( int *n_cols, int *n_rows, { int x = n_cols ? *n_cols : -1, y = n_rows ? *n_rows : -1; int bytes_read = 0; + const char *pdc_font = getenv("PDC_FONT"); + const char *pdc_font_size = getenv("PDC_FONT_SIZE"); sscanf( buff, "%dx%d,%d,%d,%d,%*d;%d,%d,%d,%d:%n", - &x, &y, &PDC_font_size, + &x, &y, &prf_font_size, xloc, yloc, /*&menu_shown,*/ &min_lines, &max_lines, &min_cols, &max_cols, &bytes_read); + /* Set the font name if it is present and if PDC_FONT not set */ if( bytes_read > 0 && buff[bytes_read - 1] == ':') - snprintf(PDC_font_name, sizeof(PDC_font_name), "%s", + snprintf(prf_font_name, sizeof(prf_font_name), "%s", buff + bytes_read); if( n_cols != NULL) *n_cols = x; if( n_rows != NULL) *n_rows = y; + + if (pdc_font == NULL) + strcpy(PDC_font_name, prf_font_name); + if (pdc_font_size == NULL && (pdc_font == NULL || strchr(pdc_font, ':') == NULL)) + PDC_font_size = prf_font_size; } if( rc == 0) debug_printf( "get_default_sizes_from_registry error: %d\n", From a3abc82c1057dbdf5c865cb027ea708f468c0f97 Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Thu, 8 Feb 2024 22:42:34 -0500 Subject: [PATCH 17/18] Adjustments for "classic" EMX EMX 0.9d uses an ancient version of GCC. This does not have -Wextra, and requires a space after -o. It can build PDCurses, but only in narrow mode; it does not have wchar.h. --- os2gui/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/os2gui/Makefile b/os2gui/Makefile index a4172842..de3d4ce2 100644 --- a/os2gui/Makefile +++ b/os2gui/Makefile @@ -71,7 +71,7 @@ CC = $(PREFIX)gcc AR = $(PREFIX)ar -CFLAGS += -Wall -Wextra -pedantic +CFLAGS += -Wall -pedantic ifeq ($(DEBUG),Y) CFLAGS += -g -DPDCDEBUG LDFLAGS = -g @@ -154,18 +154,18 @@ calendar.exe firework.exe init_col.exe mbrot.exe \ newtest.exe ozdemo.exe picsview.exe \ ptest.exe rain.exe speed.exe testcurs.exe test_pan.exe \ version.exe widetest.exe worm.exe xmas.exe: %.exe: $(demodir)/%.c - $(CC) $(CFLAGS) -o$@ $< $(LIBCURSES) $(EXELIBS) + $(CC) $(CFLAGS) -o $@ $< $(LIBCURSES) $(EXELIBS) emxbind -ep $@ tuidemo.exe: tuidemo.o tui.o - $(LINK) $(LDFLAGS) -o$@ tuidemo.o tui.o $(LIBCURSES) $(EXELIBS) + $(LINK) $(LDFLAGS) -o $@ tuidemo.o tui.o $(LIBCURSES) $(EXELIBS) emxbind -ep $@ tui.o: $(demodir)/tui.c $(demodir)/tui.h $(PDCURSES_CURSES_H) - $(CC) -c $(CFLAGS) -I$(demodir) -o$@ $< + $(CC) -c $(CFLAGS) -I$(demodir) -o $@ $< tuidemo.o: $(demodir)/tuidemo.c $(PDCURSES_CURSES_H) - $(CC) -c $(CFLAGS) -I$(demodir) -o$@ $< + $(CC) -c $(CFLAGS) -I$(demodir) -o $@ $< configure : $(CC) $(CFLAGS) -o config_curses$(E) $(common)/config_curses.c From 9ff74e9b8a020d0eb2ec27182a7be2d95995bb0c Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Sat, 10 Feb 2024 18:23:24 -0500 Subject: [PATCH 18/18] Respond to WM_CLOSE as WinGUI does --- os2gui/pdcscrn.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/os2gui/pdcscrn.c b/os2gui/pdcscrn.c index 78ea67fe..63af28f1 100644 --- a/os2gui/pdcscrn.c +++ b/os2gui/pdcscrn.c @@ -1858,6 +1858,17 @@ static MRESULT EXPENTRY WndProc (const HWND hwnd, } break; + case WM_CLOSE: + if( !PDC_get_function_key( FUNCTION_KEY_SHUT_DOWN)) + { + final_cleanup( ); + /*PDC_bDone = TRUE;*/ + exit( 0); + } + else + add_key_to_queue( PDC_get_function_key( FUNCTION_KEY_SHUT_DOWN)); + return 0; + case WM_COMMAND: case WM_SYSCOMMAND: switch (SHORT1FROMMP(wParam))