summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2006-04-21 10:30:08 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-21 10:30:08 +0000
commit28f02967abbf61c832bd5713ee7c055e2c73eb19 (patch)
treefab6a9dab642c1e0ea3f78a5d0394c34a60397d2 /packages
parent2ae892dc300673b51fb9eb2515a3b0e4f14ae587 (diff)
added qt/e 2.3.12 as non-default, WIP
Diffstat (limited to 'packages')
-rw-r--r--packages/qte/qte-2.3.12/.mtn2git_empty0
-rw-r--r--packages/qte/qte-2.3.12/bidimetrics.patch2389
-rw-r--r--packages/qte/qte-2.3.12/c700-hardware.patch114
-rw-r--r--packages/qte/qte-2.3.12/c7x0-w100-accel.patch3414
-rw-r--r--packages/qte/qte-2.3.12/daemonize.patch115
-rw-r--r--packages/qte/qte-2.3.12/devfs.patch161
-rw-r--r--packages/qte/qte-2.3.12/encoding.patch36
-rw-r--r--packages/qte/qte-2.3.12/fix-linuxfb-offscreenoverflow.patch24
-rw-r--r--packages/qte/qte-2.3.12/fix-linuxfb-setmode.patch36
-rw-r--r--packages/qte/qte-2.3.12/fix-native-build.patch11
-rw-r--r--packages/qte/qte-2.3.12/fix-qgfxraster.patch30
-rw-r--r--packages/qte/qte-2.3.12/fix-qscreen-sync.patch17
-rw-r--r--packages/qte/qte-2.3.12/gcc3.patch27
-rw-r--r--packages/qte/qte-2.3.12/handhelds.patch66
-rw-r--r--packages/qte/qte-2.3.12/improve-calibration-r0.patch159
-rw-r--r--packages/qte/qte-2.3.12/increase-qxml-robustness.patch17
-rw-r--r--packages/qte/qte-2.3.12/ipaq-keyboard.patch27
-rw-r--r--packages/qte/qte-2.3.12/ipaq_sound_fix.patch60
-rw-r--r--packages/qte/qte-2.3.12/kernel-keymap-CXK.patch19
-rw-r--r--packages/qte/qte-2.3.12/kernel-keymap-corgi.patch25
-rw-r--r--packages/qte/qte-2.3.12/kernel-keymap-tosa.patch81
-rw-r--r--packages/qte/qte-2.3.12/kernel-keymap.patch1042
-rw-r--r--packages/qte/qte-2.3.12/key.patch90
-rw-r--r--packages/qte/qte-2.3.12/mnci-touchscreen.patch1987
-rw-r--r--packages/qte/qte-2.3.12/mnci.patch125
-rw-r--r--packages/qte/qte-2.3.12/no-moc.patch39
-rw-r--r--packages/qte/qte-2.3.12/qiconview-speed.patch122
-rw-r--r--packages/qte/qte-2.3.12/qpe.patch105
-rw-r--r--packages/qte/qte-2.3.12/qt-visibility.patch499
-rw-r--r--packages/qte/qte-2.3.12/qtabbar.patch41
-rw-r--r--packages/qte/qte-2.3.12/qte-fix-iconsize.patch105
-rw-r--r--packages/qte/qte-2.3.12/sharp_char.h309
-rw-r--r--packages/qte/qte-2.3.12/simpad-defaultkbd.patch13
-rw-r--r--packages/qte/qte-2.3.12/simpad.patch392
-rw-r--r--packages/qte/qte-2.3.12/suspend-resume-hooks.patch64
-rw-r--r--packages/qte/qte-2.3.12/switches.h74
-rw-r--r--packages/qte/qte-2.3.12/tslib.patch53
-rw-r--r--packages/qte/qte-2.3.12/vt-switch.patch184
-rw-r--r--packages/qte/qte_2.3.12.bb159
39 files changed, 12231 insertions, 0 deletions
diff --git a/packages/qte/qte-2.3.12/.mtn2git_empty b/packages/qte/qte-2.3.12/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/qte/qte-2.3.12/.mtn2git_empty
diff --git a/packages/qte/qte-2.3.12/bidimetrics.patch b/packages/qte/qte-2.3.12/bidimetrics.patch
new file mode 100644
index 0000000000..ea4765c601
--- /dev/null
+++ b/packages/qte/qte-2.3.12/bidimetrics.patch
@@ -0,0 +1,2389 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: qt-2.3.10-snapshot-20060120/src/kernel/qgfxraster_qws.cpp
+===================================================================
+--- qt-2.3.10-snapshot-20060120.orig/src/kernel/qgfxraster_qws.cpp 2006-01-20 20:50:26.577740040 +0100
++++ qt-2.3.10-snapshot-20060120/src/kernel/qgfxraster_qws.cpp 2006-01-20 21:09:56.399900040 +0100
+@@ -51,6 +51,11 @@
+ #include <fcntl.h>
+ #include <errno.h>
+
++//HAQ bidi patch
++#ifdef USE_BIDI
++#include "qbidi.h"
++#endif
++// end HAQ patch
+
+ extern bool qws_sw_cursor;
+
+@@ -1408,6 +1413,53 @@
+ setAlphaType(BigEndianMask);
+ }
+
++#ifdef USE_BIDI
++ // HAQ do bidi
++ QString n;
++ qApplyBidi(s, n);
++
++ for( loopc=0; loopc < int(n.length()); loopc++ ) {
++ QGlyph glyph = memorymanager->lockGlyph(myfont, n[loopc]);
++ int myw=glyph.metrics->width;
++ srcwidth = myw;
++ srcheight = glyph.metrics->height;
++ setAlphaSource(glyph.data,glyph.metrics->linestep);
++ int myx=x;
++ int myy=y;
++ myx+=glyph.metrics->bearingx;
++ myy-=glyph.metrics->bearingy;
++
++ // HAQ hack to show arabic tashkeel (diacriticals) above
++ // the previous character (which in reversed arabic, as it is here, is the next character)
++
++ QChar c = n[loopc];
++ if (ISTASHKEEL(c.unicode())) {
++ //printf("glyph %d bearingx %d width %d advance %d\n",
++ // c.unicode(),glyph.metrics->bearingx, glyph.metrics->width, glyph.metrics->advance);
++
++ if (loopc < int(n.length()-1)) // if there is a following character then place this glyph over it
++ {
++ QGlyph nextGlyph = memorymanager->lockGlyph(myfont, n[loopc+1]);
++ int nextCharWidth = nextGlyph.metrics->width;
++ myx += nextCharWidth/2 - glyph.metrics->width;
++ // pre-undo the advance in x so that the next glyph is placed over this one
++ x -= glyph.metrics->advance;
++ }
++ }
++
++ if(glyph.metrics->width<1 || glyph.metrics->height<1
++ || glyph.metrics->linestep==0)
++ {
++ // non-printing characters
++ } else {
++ blt(myx,myy,myw,glyph.metrics->height,0,0);
++ }
++ x+=glyph.metrics->advance;
++ // ... unlock glyph
++ }
++
++#else
++
+ for( loopc=0; loopc < int(s.length()); loopc++ ) {
+ QGlyph glyph = memorymanager->lockGlyph(myfont, s[loopc]);
+ int myw=glyph.metrics->width;
+@@ -1428,6 +1480,9 @@
+ x+=glyph.metrics->advance;
+ // ... unlock glyph
+ }
++
++#endif
++
+ #ifdef DEBUG_LOCKS
+ qDebug("unaccelerated drawText unlock");
+ #endif
+Index: qt-2.3.10-snapshot-20060120/src/kernel/qfont_qws.cpp
+===================================================================
+--- qt-2.3.10-snapshot-20060120.orig/src/kernel/qfont_qws.cpp 2006-01-20 20:57:33.115896384 +0100
++++ qt-2.3.10-snapshot-20060120/src/kernel/qfont_qws.cpp 2006-01-20 21:09:56.400899888 +0100
+@@ -49,6 +49,12 @@
+ #include "qfontmanager_qws.h"
+ #include "qmemorymanager_qws.h"
+
++//HAQ
++#ifdef USE_BIDI
++#include "qbidi.h"
++#endif
++// end HAQ
++
+ // QFont_Private accesses QFont protected functions
+
+ class QFont_Private : public QFont
+@@ -388,17 +394,46 @@
+
+ int QFontMetrics::width( QChar ch ) const
+ {
++#ifdef USE_BIDI
++
++ int advance;
++ if (ISTASHKEEL(ch.unicode())) {
++ advance = 0;
++ }
++ else
++ advance = memorymanager->lockGlyphMetrics(((QFontMetrics*)this)->internal()->handle(),ch)->advance;
++ return advance;
++
++#else
++
+ return memorymanager->lockGlyphMetrics(((QFontMetrics*)this)->internal()->handle(),ch)->advance;
++
++#endif
+ }
+
+ int QFontMetrics::width( const QString &str, int len ) const
+ {
++#ifdef USE_BIDI
++
++ QString n;
++ qApplyBidi(str, n);
++ if (len < 0) len = n.length();
++ int ret=0;
++ for (int i=0; i<len; i++)
++ ret += width(n[i]);
++ return ret;
++
++#else
++
+ if ( len < 0 )
+ len = str.length();
+ int ret=0;
+ for (int i=0; i<len; i++)
+ ret += width(str[i]);
+ return ret;
++
++#endif
++
+ }
+
+ QRect QFontMetrics::boundingRect( const QString &str, int len ) const
+Index: qt-2.3.10-snapshot-20060120/src/kernel/qbidi.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qt-2.3.10-snapshot-20060120/src/kernel/qbidi.h 2006-01-20 21:09:56.400899888 +0100
+@@ -0,0 +1,6 @@
++#include "stdio.h"
++#include <qstring.h>
++
++#define ISTASHKEEL(x) ((x >= 0x64B && x<=0x658) || (x>=0x6d6 && x <= 0x6dc) || (x>=0x6df && x <= 0x6e4) || x==0x6e7 || x == 0x6e8 || (x>=0x6ea && x <= 0x6ed) || (x>=0xfe70 && x <= 0xfe7f))
++
++void qApplyBidi(const QString& s, QString& news);
+Index: qt-2.3.10-snapshot-20060120/src/kernel/qbidi.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qt-2.3.10-snapshot-20060120/src/kernel/qbidi.cpp 2006-01-20 21:09:56.401899736 +0100
+@@ -0,0 +1,45 @@
++#include <malloc.h>
++#include "qbidi.h"
++
++
++#define BLOCKTYPE unsigned short*
++#define CHARTYPE unsigned short
++
++extern "C" {
++
++int doShape(BLOCKTYPE line, CHARTYPE* to, int from, int count);
++int doBidi(BLOCKTYPE line, int count, int applyShape, int reorderCombining, int removeMarks);
++
++}
++
++void qApplyBidi(const QString& s, QString& news) {
++ //convert to utf16 zero-terminated
++ //printf(": qs length is %d\n",s.length());
++ int loopc;
++ int slength = sizeof(unsigned short) * (s.length());
++ //printf(": slength is %d\n",slength);
++ unsigned short* sutf16 = (unsigned short*)malloc(slength);
++ for( loopc=0; loopc < int(s.length()); loopc++ ) {
++ sutf16[loopc] = s[loopc].unicode();
++ //printf(": char %d is %x\n",loopc,sutf16[loopc]);
++ }
++ //printf(": mark 0\n");
++ ///sutf16[s.length()] = 0;
++
++ unsigned short* sutf16s = (unsigned short*)malloc(slength);
++ doShape(sutf16,sutf16s,0,s.length());
++ //printf(": do bidi\n");
++ doBidi(sutf16s, s.length(),0,0,0);
++ //sutf16s[s.length()] = 0;
++
++ //printf(": back to QString\n");
++ news = "";
++ for( loopc=0; loopc < s.length(); loopc++ ) {
++ QChar newChar((short) sutf16s[loopc]);
++ news = news + newChar;
++ //printf(": add char %x\n",newChar.unicode());
++ }
++
++ free(sutf16);
++ free(sutf16s);
++}
+Index: qt-2.3.10-snapshot-20060120/src/kernel/minibidi.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qt-2.3.10-snapshot-20060120/src/kernel/minibidi.c 2006-01-20 21:09:56.403899432 +0100
+@@ -0,0 +1,2127 @@
++/************************************************************************
++ * $Id: minibidi.c,v 1.2 2005/04/08 18:01:45 lynch Exp $
++ *
++ * ------------
++ * Description:
++ * ------------
++ * This is an implemention of Unicode's Bidirectional Algorithm
++ * (known as UAX #9).
++ *
++ * http://www.unicode.org/reports/tr9/
++ *
++ * Author: Ahmad Khalifa
++ *
++ * -----------------
++ * Revision Details: (Updated by Revision Control System)
++ * -----------------
++ * $Date: 2005/04/08 18:01:45 $
++ * $Author: lynch $
++ * $Revision: 1.2 $
++ * $Source: /home/arabeyes/cvs/projects/external/qt_e/minibidi.c,v $
++ *
++ * (www.arabeyes.org - under MIT license)
++ *
++ ************************************************************************/
++
++#include <malloc.h> /* malloc() and free() definition */
++
++/*
++ * Datatype Extension Macros
++ */
++#define BLOCKTYPE unsigned short*
++#define CHARTYPE unsigned short
++#define GETCHAR(from,i) from[i]
++
++#define GetType(x) getType(x)
++/*=====TESTING mode===========*/
++//#define GetType(x) getCAPRtl(x)
++
++#define lenof(x) sizeof(x) / sizeof(x[0])
++
++/* character types */
++enum
++{
++ /* Strong Char Types */
++ L, /* Left-to-Right char */
++ LRE, /* Left-to-Right Embedding */
++ LRO, /* Left-to-Right Override */
++ R, /* Right-to-Left char */
++ AL, /* Right-to-Left Arabic char */
++ RLE, /* Right-to-Left Embedding */
++ RLO, /* Right-to-Left Override */
++ /* Weak Char Types */
++ PDF, /* Pop Directional Format */
++ EN, /* European Number */
++ ES, /* European Number Separator */
++ ET, /* European Number Terminator */
++ AN, /* Arabic Number */
++ CS, /* Common Number Separator */
++ NSM, /* Non Spacing Mark */
++ BN, /* Boundary Neutral */
++ /* Neutral Char Types */
++ B, /* Paragraph Separator */
++ S, /* Segment Separator */
++ WS, /* Whitespace */
++ ON, /* Other Neutrals */
++};
++
++/* Shaping Types */
++enum
++{
++ SL, /* Left-Joining, doesnt exist in U+0600 - U+06FF */
++ SR, /* Right-Joining, ie has Isolated, Final */
++ SD, /* Dual-Joining, ie has Isolated, Final, Initial, Medial */
++ SU, /* Non-Joining */
++ SC /* Join-Causing, like U+0640 (TATWEEL) */
++};
++
++#define odd(x) (x%2)
++/* Returns the first odd/even value greater than x */
++#define leastGreaterOdd(x) odd(x) ? (x+2) : (x+1)
++#define leastGreaterEven(x) odd(x) ? (x+1) : (x+2)
++
++/* Shaping Helpers */
++#define STYPE(xh) ((xh >= SHAPE_FIRST) && (xh <= SHAPE_LAST)) ? \
++ shapetypes[xh-SHAPE_FIRST].type : SU
++#define SISOLATED(xh) shapetypes[xh-SHAPE_FIRST].form_b
++#define SFINAL(xh) xh+1
++#define SINITIAL(xh) xh+2
++#define SMEDIAL(xh) xh+3
++
++
++/* function declarations */
++int findIndexOfRun(unsigned char* level , int start, int count, int tlevel);
++unsigned char getType(CHARTYPE ch);
++unsigned char getCAPRtl(CHARTYPE ch);
++void doMirror(BLOCKTYPE ch);
++
++typedef struct{
++ unsigned char type;
++ unsigned short form_b;
++} shape_node;
++
++/* Kept near the actual table, for verification. */
++#define SHAPE_FIRST 0x621
++#define SHAPE_LAST 0x668
++/* very bad Memory alignment for 32-bit machines
++ * could split it to 2 arrays or promote type to 2 bytes type
++ */
++shape_node shapetypes[] = {
++/* index, Typ, Iso */
++/* 621 */ {SU, 0xFE80},
++/* 622 */ {SR, 0xFE81},
++/* 623 */ {SR, 0xFE83},
++/* 624 */ {SR, 0xFE85},
++/* 625 */ {SR, 0xFE87},
++/* 626 */ {SD, 0xFE89},
++/* 627 */ {SR, 0xFE8D},
++/* 628 */ {SD, 0xFE8F},
++/* 629 */ {SR, 0xFE93},
++/* 62A */ {SD, 0xFE95},
++/* 62B */ {SD, 0xFE99},
++/* 62C */ {SD, 0xFE9D},
++/* 62D */ {SD, 0xFEA1},
++/* 62E */ {SD, 0xFEA5},
++/* 62F */ {SR, 0xFEA9},
++/* 630 */ {SR, 0xFEAB},
++/* 631 */ {SR, 0xFEAD},
++/* 632 */ {SR, 0xFEAF},
++/* 633 */ {SD, 0xFEB1},
++/* 634 */ {SD, 0xFEB5},
++/* 635 */ {SD, 0xFEB9},
++/* 636 */ {SD, 0xFEBD},
++/* 637 */ {SD, 0xFEC1},
++/* 638 */ {SD, 0xFEC5},
++/* 639 */ {SD, 0xFEC9},
++/* 63A */ {SD, 0xFECD},
++/* 63B */ {SU, 0x0},
++/* 63C */ {SU, 0x0},
++/* 63D */ {SU, 0x0},
++/* 63E */ {SU, 0x0},
++/* 63F */ {SU, 0x0},
++/* 640 */ {SC, 0x0},
++/* 641 */ {SD, 0xFED1},
++/* 642 */ {SD, 0xFED5},
++/* 643 */ {SD, 0xFED9},
++/* 644 */ {SD, 0xFEDD},
++/* 645 */ {SD, 0xFEE1},
++/* 646 */ {SD, 0xFEE5},
++/* 647 */ {SD, 0xFEE9},
++/* 648 */ {SR, 0xFEED},
++/* 649 */ {SR, 0xFEEF}, /* SD */
++/* 64A */ {SD, 0xFEF1},
++/* 64B */ {SU, 0xFEF1},
++/* 64C */ {SU, 0xFEF1},
++/* 64D */ {SU, 0xFEF1},
++/* 64E */ {SU, 0xFEF1},
++/* 64F */ {SU, 0xFEF1},
++/* 650 */ {SU,0xFEF1},
++/* 651 */ {SU,0xFEF1},
++/* 652 */ {SU,0xFEF1},
++/* 653 */ {SU, 0xFEF1},
++/* 654 */ {SU, 0xFEF1},
++/* 655 */ {SU, 0xFEF1},
++/* 656 */ {SU, 0xFEF1},
++/* 657 */ {SU, 0xFEF1},
++/* 658 */ {SU, 0xFEF1},
++/* 659 */ {SU, 0xFEF1},
++/* 65a */ {SU, 0xFEF1},
++/* 65b */ {SU, 0xFEF1},
++/* 65c */ {SU, 0xFEF1},
++/* 65d */ {SU, 0xFEF1},
++/* 65e */ {SU, 0xFEF1},
++/* 65f */ {SU, 0xFEF1},
++/* 660 */ {SU, 0xFEF1},
++/* 661 */ {SU, 0xFEF1},
++/* 662 */ {SU, 0xFEF1},
++/* 663 */ {SU, 0xFEF1},
++/* 664 */ {SU, 0xFEF1},
++/* 665 */ {SU, 0xFEF1},
++/* 666 */ {SU, 0xFEF1},
++/* 667 */ {SU, 0xFEF1},
++/* 668 */ {SU, 0xFEF1}
++};
++
++/*
++ * Flips the text buffer, according to max level, and
++ * all higher levels
++ *
++ * Input:
++ * from: text buffer, on which to apply flipping
++ * level: resolved levels buffer
++ * max: the maximum level found in this line (should be unsigned char)
++ * count: line size in wchar_t
++ */
++void flipThisRun(BLOCKTYPE from, unsigned char* level, int max, int count)
++{
++ int i, j, rcount, tlevel;
++ CHARTYPE temp;
++
++
++ j = i = 0;
++ while(i<count && j<count)
++ {
++
++ /* find the start of the run of level=max */
++ tlevel = max;
++ i = j = findIndexOfRun(level, i, count, max);
++ /* find the end of the run */
++ while((tlevel <= level[i]) && (i < count))
++ {
++ i++;
++ }
++ rcount = i-j;
++ for(; rcount>((i-j)/2); rcount--)
++ {
++ temp = GETCHAR(from, j+rcount-1);
++ GETCHAR(from, j+rcount-1) = GETCHAR(from, i-rcount);
++ GETCHAR(from, i-rcount) = temp;
++ }
++ }
++}
++
++/*
++ * Finds the index of a run with level equals tlevel
++ */
++int findIndexOfRun(unsigned char* level , int start, int count, int tlevel)
++{
++ int i;
++ for(i=start; i<count; i++)
++ {
++ if(tlevel <= level[i])
++ {
++ return i;
++ }
++ }
++ return count;
++}
++
++unsigned char GetParagraphLevel(BLOCKTYPE line, int count)
++{
++ int i;
++ for( i=0; i<count ; i++)
++ {
++ if(GetType(GETCHAR(line, i)) == R || GetType(/*line[i]*/ GETCHAR(line, i)) == AL)
++ return 1;
++ else if(GetType(GETCHAR(line, i)) == L)
++ return 0;
++ }
++ return 0; /* Compiler Nag-Stopper */
++}
++
++/*
++ * Returns character type of ch, by calling RLE table lookup
++ * function
++ */
++unsigned char getCAPRtl(CHARTYPE ch)
++{
++/* CAPRtl Charset */
++int TypesFromChar[] =
++{
++//0 1 2 3 4 5 6 7 8 9 a b c d e f
++ ON, ON, ON, ON, L, R, ON, ON, ON, ON, ON, ON, ON, B, RLO,RLE, /*00-0f*/
++ LRO,LRE,PDF,WS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, /*10-1f*/
++
++ WS, ON, ON, ON, ET, ON, ON, ON, ON, ON, ON, ET, CS, ON, ES, ES, /*20-2f*/
++ EN, EN, EN, EN, EN, EN, AN, AN, AN, AN, LRE, RLE, RLO, PDF, LRO, ON, /*30-3f*/
++ R, AL, AL, AL, AL, AL, AL, R, R, R, R, R, R, R, R, R, /*40-4f*/
++ R, R, R, R, R, R, R, R, R, R, R, ON, B, ON, ON, ON, /*50-5f*/
++ NSM, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, /*60-6f*/
++ L, L, L, L, L, L, L, L, L, L, L, ON, S, ON, ON, ON, /*70-7f*/
++};
++
++//0 1 2 3 4 5 6 7 8 9 a b c d e f
++// ON, ON, ON, ON, L, R, ON, ON, ON, ON, ON, ON, ON, B, RLO,RLE, /*00-0f*/
++//LRO,LRE,PDF,WS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, /*10-1f*/
++
++// WS, ON, ON, ON, ET, ON, ON, ON, ON, ON, ON, ET, CS, ON, ES, ES, /*20-2f*/
++// EN, EN, EN, EN, EN, EN, AN, AN, AN, AN, CS, ON, ON, ON, ON, ON, /*30-3f*/
++// R, AL, AL, AL, AL, AL, AL, R, R, R, R, R, R, R, R, R, /*40-4f*/
++// R, R, R, R, R, R, R, R, R, R, R, ON, B, ON, ON, ON, /*50-5f*/
++// NSM, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, /*60-6f*/
++// L, L, L, L, L, L, L, L, L, L, L, ON, S, ON, ON, ON, /*70-7f*/
++//};
++ if(ch <0x7f)
++ return TypesFromChar[ch];
++ else
++ return R;
++}
++
++unsigned char getType(CHARTYPE ch)
++{
++ static const struct {
++ CHARTYPE first, last, type;
++ } lookup[] = {
++ {0x0000, 0x0008, BN},
++ {0x0009, 0x0009, S},
++ {0x000a, 0x000a, B},
++ {0x000b, 0x000b, S},
++ {0x000c, 0x000c, WS},
++ {0x000d, 0x000d, B},
++ {0x000e, 0x001b, BN},
++ {0x001c, 0x001e, B},
++ {0x001f, 0x001f, S},
++ {0x0020, 0x0020, WS},
++ {0x0023, 0x0025, ET},
++ {0x002b, 0x002b, ES},
++ {0x002c, 0x002c, CS},
++ {0x002d, 0x002d, ES},
++ {0x002e, 0x002f, CS},
++ {0x0030, 0x0039, EN},
++ {0x003a, 0x003a, CS},
++ {0x0041, 0x005a, L},
++ {0x0061, 0x007a, L},
++ {0x007f, 0x0084, BN},
++ {0x0085, 0x0085, B},
++ {0x0086, 0x009f, BN},
++ {0x00a0, 0x00a0, CS},
++ {0x00a2, 0x00a5, ET},
++ {0x00aa, 0x00aa, L},
++ {0x00ad, 0x00ad, BN},
++ {0x00b0, 0x00b1, ET},
++ {0x00b2, 0x00b3, EN},
++ {0x00b5, 0x00b5, L},
++ {0x00b9, 0x00b9, EN},
++ {0x00ba, 0x00ba, L},
++ {0x00c0, 0x00d6, L},
++ {0x00d8, 0x00f6, L},
++ {0x00f8, 0x0236, L},
++ {0x0250, 0x02b8, L},
++ {0x02bb, 0x02c1, L},
++ {0x02d0, 0x02d1, L},
++ {0x02e0, 0x02e4, L},
++ {0x02ee, 0x02ee, L},
++ {0x0300, 0x0357, NSM},
++ {0x035d, 0x036f, NSM},
++ {0x037a, 0x037a, L},
++ {0x0386, 0x0386, L},
++ {0x0388, 0x038a, L},
++ {0x038c, 0x038c, L},
++ {0x038e, 0x03a1, L},
++ {0x03a3, 0x03ce, L},
++ {0x03d0, 0x03f5, L},
++ {0x03f7, 0x03fb, L},
++ {0x0400, 0x0482, L},
++ {0x0483, 0x0486, NSM},
++ {0x0488, 0x0489, NSM},
++ {0x048a, 0x04ce, L},
++ {0x04d0, 0x04f5, L},
++ {0x04f8, 0x04f9, L},
++ {0x0500, 0x050f, L},
++ {0x0531, 0x0556, L},
++ {0x0559, 0x055f, L},
++ {0x0561, 0x0587, L},
++ {0x0589, 0x0589, L},
++ {0x0591, 0x05a1, NSM},
++ {0x05a3, 0x05b9, NSM},
++ {0x05bb, 0x05bd, NSM},
++ {0x05be, 0x05be, R},
++ {0x05bf, 0x05bf, NSM},
++ {0x05c0, 0x05c0, R},
++ {0x05c1, 0x05c2, NSM},
++ {0x05c3, 0x05c3, R},
++ {0x05c4, 0x05c4, NSM},
++ {0x05d0, 0x05ea, R},
++ {0x05f0, 0x05f4, R},
++ {0x0600, 0x0603, AL},
++ {0x060c, 0x060c, CS},
++ {0x060d, 0x060d, AL},
++ {0x0610, 0x0615, NSM},
++ {0x061b, 0x061b, AL},
++ {0x061f, 0x061f, AL},
++ {0x0621, 0x063a, AL},
++ {0x0640, 0x064a, AL},
++ {0x064b, 0x0658, NSM},
++ {0x0660, 0x0669, AN},
++ {0x066a, 0x066a, ET},
++ {0x066b, 0x066c, AN},
++ {0x066d, 0x066f, AL},
++ {0x0670, 0x0670, NSM},
++ {0x0671, 0x06d5, AL},
++ {0x06d6, 0x06dc, NSM},
++ {0x06dd, 0x06dd, AL},
++ {0x06de, 0x06e4, NSM},
++ {0x06e5, 0x06e6, AL},
++ {0x06e7, 0x06e8, NSM},
++ {0x06ea, 0x06ed, NSM},
++ {0x06ee, 0x06ef, AL},
++ {0x06f0, 0x06f9, EN},
++ {0x06fa, 0x070d, AL},
++ {0x070f, 0x070f, BN},
++ {0x0710, 0x0710, AL},
++ {0x0711, 0x0711, NSM},
++ {0x0712, 0x072f, AL},
++ {0x0730, 0x074a, NSM},
++ {0x074d, 0x074f, AL},
++ {0x0780, 0x07a5, AL},
++ {0x07a6, 0x07b0, NSM},
++ {0x07b1, 0x07b1, AL},
++ {0x0901, 0x0902, NSM},
++ {0x0903, 0x0939, L},
++ {0x093c, 0x093c, NSM},
++ {0x093d, 0x0940, L},
++ {0x0941, 0x0948, NSM},
++ {0x0949, 0x094c, L},
++ {0x094d, 0x094d, NSM},
++ {0x0950, 0x0950, L},
++ {0x0951, 0x0954, NSM},
++ {0x0958, 0x0961, L},
++ {0x0962, 0x0963, NSM},
++ {0x0964, 0x0970, L},
++ {0x0981, 0x0981, NSM},
++ {0x0982, 0x0983, L},
++ {0x0985, 0x098c, L},
++ {0x098f, 0x0990, L},
++ {0x0993, 0x09a8, L},
++ {0x09aa, 0x09b0, L},
++ {0x09b2, 0x09b2, L},
++ {0x09b6, 0x09b9, L},
++ {0x09bc, 0x09bc, NSM},
++ {0x09bd, 0x09c0, L},
++ {0x09c1, 0x09c4, NSM},
++ {0x09c7, 0x09c8, L},
++ {0x09cb, 0x09cc, L},
++ {0x09cd, 0x09cd, NSM},
++ {0x09d7, 0x09d7, L},
++ {0x09dc, 0x09dd, L},
++ {0x09df, 0x09e1, L},
++ {0x09e2, 0x09e3, NSM},
++ {0x09e6, 0x09f1, L},
++ {0x09f2, 0x09f3, ET},
++ {0x09f4, 0x09fa, L},
++ {0x0a01, 0x0a02, NSM},
++ {0x0a03, 0x0a03, L},
++ {0x0a05, 0x0a0a, L},
++ {0x0a0f, 0x0a10, L},
++ {0x0a13, 0x0a28, L},
++ {0x0a2a, 0x0a30, L},
++ {0x0a32, 0x0a33, L},
++ {0x0a35, 0x0a36, L},
++ {0x0a38, 0x0a39, L},
++ {0x0a3c, 0x0a3c, NSM},
++ {0x0a3e, 0x0a40, L},
++ {0x0a41, 0x0a42, NSM},
++ {0x0a47, 0x0a48, NSM},
++ {0x0a4b, 0x0a4d, NSM},
++ {0x0a59, 0x0a5c, L},
++ {0x0a5e, 0x0a5e, L},
++ {0x0a66, 0x0a6f, L},
++ {0x0a70, 0x0a71, NSM},
++ {0x0a72, 0x0a74, L},
++ {0x0a81, 0x0a82, NSM},
++ {0x0a83, 0x0a83, L},
++ {0x0a85, 0x0a8d, L},
++ {0x0a8f, 0x0a91, L},
++ {0x0a93, 0x0aa8, L},
++ {0x0aaa, 0x0ab0, L},
++ {0x0ab2, 0x0ab3, L},
++ {0x0ab5, 0x0ab9, L},
++ {0x0abc, 0x0abc, NSM},
++ {0x0abd, 0x0ac0, L},
++ {0x0ac1, 0x0ac5, NSM},
++ {0x0ac7, 0x0ac8, NSM},
++ {0x0ac9, 0x0ac9, L},
++ {0x0acb, 0x0acc, L},
++ {0x0acd, 0x0acd, NSM},
++ {0x0ad0, 0x0ad0, L},
++ {0x0ae0, 0x0ae1, L},
++ {0x0ae2, 0x0ae3, NSM},
++ {0x0ae6, 0x0aef, L},
++ {0x0af1, 0x0af1, ET},
++ {0x0b01, 0x0b01, NSM},
++ {0x0b02, 0x0b03, L},
++ {0x0b05, 0x0b0c, L},
++ {0x0b0f, 0x0b10, L},
++ {0x0b13, 0x0b28, L},
++ {0x0b2a, 0x0b30, L},
++ {0x0b32, 0x0b33, L},
++ {0x0b35, 0x0b39, L},
++ {0x0b3c, 0x0b3c, NSM},
++ {0x0b3d, 0x0b3e, L},
++ {0x0b3f, 0x0b3f, NSM},
++ {0x0b40, 0x0b40, L},
++ {0x0b41, 0x0b43, NSM},
++ {0x0b47, 0x0b48, L},
++ {0x0b4b, 0x0b4c, L},
++ {0x0b4d, 0x0b4d, NSM},
++ {0x0b56, 0x0b56, NSM},
++ {0x0b57, 0x0b57, L},
++ {0x0b5c, 0x0b5d, L},
++ {0x0b5f, 0x0b61, L},
++ {0x0b66, 0x0b71, L},
++ {0x0b82, 0x0b82, NSM},
++ {0x0b83, 0x0b83, L},
++ {0x0b85, 0x0b8a, L},
++ {0x0b8e, 0x0b90, L},
++ {0x0b92, 0x0b95, L},
++ {0x0b99, 0x0b9a, L},
++ {0x0b9c, 0x0b9c, L},
++ {0x0b9e, 0x0b9f, L},
++ {0x0ba3, 0x0ba4, L},
++ {0x0ba8, 0x0baa, L},
++ {0x0bae, 0x0bb5, L},
++ {0x0bb7, 0x0bb9, L},
++ {0x0bbe, 0x0bbf, L},
++ {0x0bc0, 0x0bc0, NSM},
++ {0x0bc1, 0x0bc2, L},
++ {0x0bc6, 0x0bc8, L},
++ {0x0bca, 0x0bcc, L},
++ {0x0bcd, 0x0bcd, NSM},
++ {0x0bd7, 0x0bd7, L},
++ {0x0be7, 0x0bf2, L},
++ {0x0bf9, 0x0bf9, ET},
++ {0x0c01, 0x0c03, L},
++ {0x0c05, 0x0c0c, L},
++ {0x0c0e, 0x0c10, L},
++ {0x0c12, 0x0c28, L},
++ {0x0c2a, 0x0c33, L},
++ {0x0c35, 0x0c39, L},
++ {0x0c3e, 0x0c40, NSM},
++ {0x0c41, 0x0c44, L},
++ {0x0c46, 0x0c48, NSM},
++ {0x0c4a, 0x0c4d, NSM},
++ {0x0c55, 0x0c56, NSM},
++ {0x0c60, 0x0c61, L},
++ {0x0c66, 0x0c6f, L},
++ {0x0c82, 0x0c83, L},
++ {0x0c85, 0x0c8c, L},
++ {0x0c8e, 0x0c90, L},
++ {0x0c92, 0x0ca8, L},
++ {0x0caa, 0x0cb3, L},
++ {0x0cb5, 0x0cb9, L},
++ {0x0cbc, 0x0cbc, NSM},
++ {0x0cbd, 0x0cc4, L},
++ {0x0cc6, 0x0cc8, L},
++ {0x0cca, 0x0ccb, L},
++ {0x0ccc, 0x0ccd, NSM},
++ {0x0cd5, 0x0cd6, L},
++ {0x0cde, 0x0cde, L},
++ {0x0ce0, 0x0ce1, L},
++ {0x0ce6, 0x0cef, L},
++ {0x0d02, 0x0d03, L},
++ {0x0d05, 0x0d0c, L},
++ {0x0d0e, 0x0d10, L},
++ {0x0d12, 0x0d28, L},
++ {0x0d2a, 0x0d39, L},
++ {0x0d3e, 0x0d40, L},
++ {0x0d41, 0x0d43, NSM},
++ {0x0d46, 0x0d48, L},
++ {0x0d4a, 0x0d4c, L},
++ {0x0d4d, 0x0d4d, NSM},
++ {0x0d57, 0x0d57, L},
++ {0x0d60, 0x0d61, L},
++ {0x0d66, 0x0d6f, L},
++ {0x0d82, 0x0d83, L},
++ {0x0d85, 0x0d96, L},
++ {0x0d9a, 0x0db1, L},
++ {0x0db3, 0x0dbb, L},
++ {0x0dbd, 0x0dbd, L},
++ {0x0dc0, 0x0dc6, L},
++ {0x0dca, 0x0dca, N