From da74b24733803b4e7f0c917a1a57b6ff5363433d Mon Sep 17 00:00:00 2001 From: ahodgkinson Date: Mon, 21 Aug 2006 20:54:23 +0000 Subject: [PATCH] FLAIM changes. Update to use more of the toolkit collation routines. git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@781 0109f412-320b-0410-ab79-c3e0c5ffbbe6 --- flaim/src/f_nici.cpp | 2 +- flaim/src/ffilehdr.cpp | 6 +- flaim/src/flaim.h | 24 +- flaim/src/flaimsys.h | 104 -- flaim/src/flindex.cpp | 71 +- flaim/src/flrddrct.cpp | 1 + flaim/src/flverify.cpp | 51 +- flaim/src/fmisc.cpp | 11 +- flaim/src/fnumber.cpp | 12 +- flaim/src/frec.cpp | 174 --- flaim/src/fssearch.cpp | 2 +- flaim/src/ftext.cpp | 2944 ++++----------------------------------- flaim/src/kybuild.cpp | 30 +- flaim/src/kycollat.cpp | 3002 +++------------------------------------- flaim/src/rcache.cpp | 128 +- flaim/src/scache.cpp | 98 +- 16 files changed, 685 insertions(+), 5975 deletions(-) diff --git a/flaim/src/f_nici.cpp b/flaim/src/f_nici.cpp index 5a17f60..feda0c2 100644 --- a/flaim/src/f_nici.cpp +++ b/flaim/src/f_nici.cpp @@ -434,7 +434,7 @@ RCODE F_CCS::generateEncryptionKeyDES3( void) keyAttr[2].u.f.value = N_TRUE; keyAttr[2].u.f.valueInfo = 0; - // Generate a AES key + // Generate a DES3 key if( CCS_GenerateKey( context, &algorithm, keyAttr, 3, (NICI_BBOOL *)&keySizeChanged, &m_keyHandle, NICI_H_INVALID) != 0) diff --git a/flaim/src/ffilehdr.cpp b/flaim/src/ffilehdr.cpp index 7f4b11a..5de7924 100644 --- a/flaim/src/ffilehdr.cpp +++ b/flaim/src/ffilehdr.cpp @@ -94,9 +94,9 @@ RCODE flmGetFileHdrInfo( pFileHdrRV->uiAppMinorVer = pPrefixBuf [11]; pFileHdrRV->uiDefaultLanguage = pFileHdrBuf [DB_DEFAULT_LANGUAGE]; pFileHdrRV->uiVersionNum = uiVersionNum = - ((FLMUINT16)(pFileHdrBuf [FLM_FILE_FORMAT_VER_POS] - ASCII_ZERO) * 100 + - (FLMUINT16)(pFileHdrBuf [FLM_MINOR_VER_POS] - ASCII_ZERO) * 10 + - (FLMUINT16)(pFileHdrBuf [FLM_SMINOR_VER_POS] - ASCII_ZERO)); + ((FLMUINT16)(pFileHdrBuf [FLM_FILE_FORMAT_VER_POS] - ASCII_ZERO) * 100 + + (FLMUINT16)(pFileHdrBuf [FLM_MINOR_VER_POS] - ASCII_ZERO) * 10 + + (FLMUINT16)(pFileHdrBuf [FLM_SMINOR_VER_POS] - ASCII_ZERO)); uiTmpBlkSize = pFileHdrRV->uiBlockSize; if( !VALID_BLOCK_SIZE( uiTmpBlkSize)) diff --git a/flaim/src/flaim.h b/flaim/src/flaim.h index 5a7fd17..8e024f1 100644 --- a/flaim/src/flaim.h +++ b/flaim/src/flaim.h @@ -612,18 +612,18 @@ FLMUINT * puiInsertPos = NULL); RCODE insertTagInTables( - FLM_TAG_INFO * pTagInfo, - FLMUINT uiTagNameTblInsertPos, - FLMUINT uiTagTypeAndNameTblInsertPos, - FLMUINT uiTagNumTblInsertPos); + FLM_TAG_INFO * pTagInfo, + FLMUINT uiTagNameTblInsertPos, + FLMUINT uiTagTypeAndNameTblInsertPos, + FLMUINT uiTagNumTblInsertPos); - F_Pool m_pool; - FLM_TAG_INFO ** m_ppSortedByTagName; - FLM_TAG_INFO ** m_ppSortedByTagNum; - FLM_TAG_INFO ** m_ppSortedByTagTypeAndName; - FLMUINT m_uiTblSize; - FLMUINT m_uiNumTags; - FLMBOOL m_bTablesSorted; + F_Pool m_pool; + FLM_TAG_INFO ** m_ppSortedByTagName; + FLM_TAG_INFO ** m_ppSortedByTagNum; + FLM_TAG_INFO ** m_ppSortedByTagTypeAndName; + FLMUINT m_uiTblSize; + FLMUINT m_uiNumTags; + FLMBOOL m_bTablesSorted; }; #define RECID_UNDEFINED 0xFFFFFFFF @@ -4593,8 +4593,6 @@ FLMUINT uiPosition); - RCODE checkRecord( void); - RCODE checkField( FlmField * pFld); diff --git a/flaim/src/flaimsys.h b/flaim/src/flaimsys.h index 2915f4d..cf188a4 100644 --- a/flaim/src/flaimsys.h +++ b/flaim/src/flaimsys.h @@ -78,29 +78,6 @@ class F_CCS; // IMPORTANT NOTE: No other include files should follow this one except // for fpackoff.h -// Character code high byte values for character sets - -#define CHSASCI 0 // ASCII -#define CHSMUL1 1 // Multinational 1 -#define CHSMUL2 2 // Multinational 2 -#define CHSBOXD 3 // Box drawing -#define CHSSYM1 4 // Typographic Symbols -#define CHSSYM2 5 // Iconic Symbols -#define CHSMATH 6 // Math -#define CHMATHX 7 // Math Extension -#define CHSGREK 8 // Greek -#define CHSHEB 9 // Hebrew -#define CHSCYR 10 // Cyrillic -#define CHSKANA 11 // Japanese Kana -#define CHSUSER 12 // User-defined -#define CHSARB1 13 // Arabic -#define CHSARB2 14 // Arabic script - -#define NCHSETS 15 // # of character sets (excluding asian) -#define ACHSETS 0x0E0 // maximum character set value - asian -#define ACHSMIN 0x024 // minimum character set value - asian -#define ACHCMAX 0x0FE // maxmimum character value in asian sets - // Bit patterns for codes in internal text type #define ASCII_CHAR_CODE 0x00 // 0nnnnnnn @@ -165,64 +142,6 @@ class F_CCS; #define MIN_7BIT_EXP 0x08 #define MAX_7BIT_EXP 0x78 -// Definitions for diacritics - -#define grave 0 -#define centerd 1 -#define tilde 2 -#define circum 3 -#define crossb 4 -#define slash 5 -#define acute 6 -#define umlaut 7 -#define macron 8 -#define aposab 9 -#define aposbes 10 -#define aposba 11 -#define ring 14 -#define dota 15 -#define dacute 16 -#define cedilla 17 -#define ogonek 18 -#define caron 19 -#define stroke 20 -#define breve 22 -#define dotlesi 239 -#define dotlesj 25 -#define gacute 83 // greek acute -#define gdia 84 // greek diaeresis -#define gactdia 85 // acute diaeresis -#define ggrvdia 86 // grave diaeresis -#define ggrave 87 // greek grave -#define gcircm 88 // greek circumflex -#define gsmooth 89 // smooth breathing -#define grough 90 // rough breathing -#define giota 91 // iota subscript -#define gsmact 92 // smooth breathing acute -#define grgact 93 // rough breathing acute -#define gsmgrv 94 // smooth breathing grave -#define grggrv 95 // rough breathing grave -#define gsmcir 96 // smooth breathing circumflex -#define grgcir 97 // rough breathing circumflex -#define gactio 98 // acute iota -#define ggrvio 99 // grave iota -#define gcirio 100 // circumflex iota -#define gsmio 101 // smooth iota -#define grgio 102 // rough iota -#define gsmaio 103 // smooth acute iota -#define grgaio 104 // rough acute iota -#define gsmgvio 105 // smooth grave iota -#define grggvio 106 // rough grave iota -#define gsmcio 107 // smooth circumflex iota -#define grgcio 108 // rough circumflex iota -#define ghprime 81 // high prime -#define glprime 82 // low prime -#define racute 200 // russian acute -#define rgrave 201 // russian grave -#define rrtdesc 204 // russian right descender -#define rogonek 205 // russian ogonek -#define rmacron 206 // russian macron - /**************************************************************************** Desc: ****************************************************************************/ @@ -242,29 +161,6 @@ Desc: ) \ ) -FLMBOOL flmIsUpper( - FLMUINT16 ui16Char); - -FLMUINT16 flmCh6Upper( - FLMUINT16 ui16WpChar); - -FLMUINT16 flmCh6Lower( - FLMUINT16 ui16WpChar); - -FLMBOOL flmCh6Brkcar( - FLMUINT16 ui16WpChar, - FLMUINT16 * pui16BaseChar, - FLMUINT16 * pui16DiacriticChar); - -FLMBOOL flmCh6Cmbcar( - FLMUINT16 * pui16WpChar, - FLMUINT16 ui16BaseChar, - FLMINT16 i16DiacriticChar); - -FLMUINT flmUnicodeToWP( - const FLMUNICODE * pUniStr, - FLMUINT16 * pWPChr); - /**************************************************************************** General FLAIM diff --git a/flaim/src/flindex.cpp b/flaim/src/flindex.cpp index 4d88d0d..fb53b4c 100644 --- a/flaim/src/flindex.cpp +++ b/flaim/src/flindex.cpp @@ -25,13 +25,13 @@ #include "flaimsys.h" FSTATIC RCODE FLMAPI flmBackgroundIndexBuildThrd( - IF_Thread * pThread); + IF_Thread * pThread); FSTATIC void stopBackgroundIndexThread( - FDB * pDb, - FLMUINT uiIndexNum, - FLMBOOL bWait, - FLMBOOL * pbStopped); + FDB * pDb, + FLMUINT uiIndexNum, + FLMBOOL bWait, + FLMBOOL * pbStopped); FSTATIC RCODE flmIndexStatusCS( FDB * pDb, @@ -46,13 +46,13 @@ FLMEXP RCODE FLMAPI FlmIndexStatus( FLMUINT uiIndexNum, FINDEX_STATUS * pIndexStatus) { - RCODE rc = FERR_OK; - FLMBOOL bStartedAutoTrans = FALSE; - FLMUINT uiLastDrnIndexed; - FDB * pDb = (FDB *)hDb; - F_BKGND_IX * pBackgroundIx; - FLMBOOL bSuspended; - FLMBOOL bMutexLocked = FALSE; + RCODE rc = FERR_OK; + FLMBOOL bStartedAutoTrans = FALSE; + FLMUINT uiLastDrnIndexed; + FDB * pDb = (FDB *)hDb; + F_BKGND_IX * pBackgroundIx; + FLMBOOL bSuspended; + FLMBOOL bMutexLocked = FALSE; flmAssert( pIndexStatus != NULL); @@ -875,9 +875,9 @@ FSTATIC void stopBackgroundIndexThread( FLMBOOL bWait, FLMBOOL * pbStopped) { - F_BKGND_IX * pBackgroundIx; - FLMUINT uiThreadId; - FLMBOOL bMutexLocked = FALSE; + F_BKGND_IX * pBackgroundIx; + FLMUINT uiThreadId; + FLMBOOL bMutexLocked = FALSE; if( pbStopped) { @@ -1002,15 +1002,15 @@ Desc: Thread that will build an index in the background. freed at the conclusion of the routine. ****************************************************************************/ RCODE flmStartIndexBuild( - FDB * pDb, - FLMUINT uiIndexNum) + FDB * pDb, + FLMUINT uiIndexNum) { - RCODE rc = FERR_OK; - FLMUINT uiGMT; - IXD * pIxd; - F_BKGND_IX * pBackgroundIx = NULL; - char szThreadName[ F_PATH_MAX_SIZE]; - char szBaseName[ F_FILENAME_SIZE]; + RCODE rc = FERR_OK; + FLMUINT uiGMT; + IXD * pIxd; + F_BKGND_IX * pBackgroundIx = NULL; + char szThreadName[ F_PATH_MAX_SIZE]; + char szBaseName[ F_FILENAME_SIZE]; f_timeGetSeconds( &uiGMT ); @@ -1090,7 +1090,7 @@ Desc: Thread that will build an index in the background. freed at the conclusion of the routine. ****************************************************************************/ FSTATIC RCODE FLMAPI flmBackgroundIndexBuildThrd( - IF_Thread * pThread) + IF_Thread * pThread) { RCODE rc = FERR_OK; IXD * pIxd; @@ -1249,9 +1249,7 @@ Loop_Again: } bStartedTrans = TRUE; - if( RC_BAD( rc = fdictGetIndex( - pDb->pDict, - pDb->pFile->bInLimitedMode, + if( RC_BAD( rc = fdictGetIndex( pDb->pDict, pDb->pFile->bInLimitedMode, uiIndexNum, NULL, &pIxd, TRUE))) { // Index may have been deleted by another transaction, or @@ -1303,8 +1301,7 @@ Loop_Again: } else { - if( uiFirstDrn == DRN_LAST_MARKER && - uiContainerNum == 0xFFFFFFFF) + if( uiFirstDrn == DRN_LAST_MARKER && uiContainerNum == 0xFFFFFFFF) { goto Exit; } @@ -1514,10 +1511,10 @@ F_BKGND_IX * flmBackgroundIndexGet( FLMBOOL bMutexLocked, FLMUINT * puiThreadId) { - RCODE rc = FERR_OK; - IF_Thread * pThread; - FLMUINT uiThreadId; - F_BKGND_IX * pBackgroundIx = NULL; + RCODE rc = FERR_OK; + IF_Thread * pThread; + FLMUINT uiThreadId; + F_BKGND_IX * pBackgroundIx = NULL; if( !bMutexLocked) { @@ -1578,10 +1575,10 @@ FSTATIC RCODE flmIndexStatusCS( FLMUINT uiIndexNum, FINDEX_STATUS * pIndexStatus) { - RCODE rc = FERR_OK; - CS_CONTEXT * pCSContext = pDb->pCSContext; - FCL_WIRE Wire( pCSContext, pDb); - void * pvMark = pCSContext->pool.poolMark(); + RCODE rc = FERR_OK; + CS_CONTEXT * pCSContext = pDb->pCSContext; + FCL_WIRE Wire( pCSContext, pDb); + void * pvMark = pCSContext->pool.poolMark(); // Set the temporary pool diff --git a/flaim/src/flrddrct.cpp b/flaim/src/flrddrct.cpp index 7d2e6e3..400258e 100644 --- a/flaim/src/flrddrct.cpp +++ b/flaim/src/flrddrct.cpp @@ -115,6 +115,7 @@ FLMEXP RCODE FLMAPI FlmRecordRetrieve( goto Search_Record; } } + if( uiFlag & FO_EXACT) { if( RC_OK( rc = flmRcaRetrieveRec( pDb, &bTransStarted, diff --git a/flaim/src/flverify.cpp b/flaim/src/flverify.cpp index 0cc2787..05c9bf5 100644 --- a/flaim/src/flverify.cpp +++ b/flaim/src/flverify.cpp @@ -25,10 +25,6 @@ #include "flaimsys.h" -extern FLMBYTE gnDaysInMonth[]; -extern FLMBYTE SENLenArray[]; -extern FLMBYTE flm_c60_max[]; - FSTATIC eCorruptionType flmVerifyBlobField( FLMBYTE * pBlobHdr, FLMUINT uiBlobHdrLen); @@ -52,6 +48,47 @@ FSTATIC FLMBOOL flmGetSEN( FLMUINT * puiDrnRV, FLMUINT * puiNumBytesRV); +extern FLMBYTE gnDaysInMonth[]; +extern FLMBYTE SENLenArray[]; + +#define ASC_N 95 +#define ML1_N 242 +#define ML2_N 145 +#define BOX_N 88 +#define TYP_N 103 +#define ICN_N 255 +#define MTH_N 238 +#define MTX_N 229 +#define GRK_N 219 +#define HEB_N 123 +#define CYR_N 250 +#define KAN_N 63 +#define USR_N 255 +#define ARB_N 196 +#define ARS_N 220 + +/**************************************************************************** +Desc: Number of characters in each character set +****************************************************************************/ +FLMBYTE flm_c60_max[] = +{ + ASC_N, // ascii + ML1_N, // multinational 1 + ML2_N, // multinational 2 + BOX_N, // line draw + TYP_N, // typographic + ICN_N, // icons + MTH_N, // math + MTX_N, // math extension + GRK_N, // Greek + HEB_N, // Hebrew + CYR_N, // Cyrillic - Russian + KAN_N, // Kana + USR_N, // user + ARB_N, // Arabic + ARS_N, // Arabic Script +}; + /**************************************************************************** Desc: Verifies that a WordPerfect character is a legal character. ****************************************************************************/ @@ -59,16 +96,16 @@ eCorruptionType flmVerifyWPChar( FLMUINT uiCharSet, FLMUINT uiChar) { - if (uiCharSet < NCHSETS) + if (uiCharSet < F_NCHSETS) { if (uiChar >= (FLMUINT) flm_c60_max[uiCharSet]) { return (FLM_BAD_CHAR); } } - else if ((uiCharSet >= ACHSMIN) && (uiCharSet < ACHSETS)) + else if ((uiCharSet >= F_ACHSMIN) && (uiCharSet < F_ACHSETS)) { - if (uiChar > ACHCMAX) + if (uiChar > F_ACHCMAX) { return (FLM_BAD_ASIAN_CHAR); } diff --git a/flaim/src/fmisc.cpp b/flaim/src/fmisc.cpp index e867dd5..37280b1 100644 --- a/flaim/src/fmisc.cpp +++ b/flaim/src/fmisc.cpp @@ -149,20 +149,20 @@ Exit: return( rc); } - /**************************************************************************** Desc: Get the total bytes represented by a particular block address. ****************************************************************************/ FLMUINT64 FSGetSizeInBytes( - FLMUINT uiMaxFileSize, - FLMUINT uiBlkAddress) + FLMUINT uiMaxFileSize, + FLMUINT uiBlkAddress) { - FLMUINT uiFileNum; - FLMUINT uiFileOffset; + FLMUINT uiFileNum; + FLMUINT uiFileOffset; FLMUINT64 ui64Size; uiFileNum = FSGetFileNumber( uiBlkAddress); uiFileOffset = FSGetFileOffset( uiBlkAddress); + if( uiFileNum > 1) { ui64Size = (FLMUINT64)(((FLMUINT64)uiFileNum - (FLMUINT64)1) * @@ -173,6 +173,7 @@ FLMUINT64 FSGetSizeInBytes( { ui64Size = (FLMUINT64)uiFileOffset; } + return( ui64Size); } diff --git a/flaim/src/fnumber.cpp b/flaim/src/fnumber.cpp index 0b39664..4709e70 100644 --- a/flaim/src/fnumber.cpp +++ b/flaim/src/fnumber.cpp @@ -172,8 +172,8 @@ FLMEXP RCODE FLMAPI FlmStorage2INT( const FLMBYTE * pucValue, FLMINT * piNum) { - RCODE rc = FERR_OK; - BCD_TYPE bcd; + RCODE rc = FERR_OK; + BCD_TYPE bcd; if( RC_OK(rc = flmBcd2Num( uiValueType, uiValueLength, pucValue, &bcd))) { @@ -210,8 +210,8 @@ FLMEXP RCODE FLMAPI FlmStorage2UINT( const FLMBYTE * pucValue, FLMUINT * puiNum) { - RCODE rc = FERR_OK; - BCD_TYPE bcd; + RCODE rc = FERR_OK; + BCD_TYPE bcd; if( RC_OK( rc = flmBcd2Num( uiValueType, uiValueLength, pucValue, &bcd))) { @@ -250,8 +250,8 @@ FLMEXP RCODE FLMAPI FlmStorage2UINT32( const FLMBYTE * pucValue, FLMUINT32 * pui32Num) { - RCODE rc = FERR_OK; - BCD_TYPE bcd; + RCODE rc = FERR_OK; + BCD_TYPE bcd; if( RC_OK(rc = flmBcd2Num( uiValueType, uiValueLength, pucValue, &bcd))) { diff --git a/flaim/src/frec.cpp b/flaim/src/frec.cpp index 379c0b4..43604ef 100644 --- a/flaim/src/frec.cpp +++ b/flaim/src/frec.cpp @@ -97,13 +97,6 @@ FlmRecord * FlmRecord::copy( void) FlmRecord * pNewRec = NULL; FLMBOOL bHeapAlloc = FALSE; -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - goto Exit; - } -#endif - if( (pNewRec = f_new FlmRecord) == NULL) { rc = RC_SET( FERR_MEM); @@ -168,22 +161,8 @@ FlmRecord * FlmRecord::copy( void) pNewRec->m_uiAvailFields = m_uiAvailFields; pNewRec->m_bHolesInData = m_bHolesInData; -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = pNewRec->checkRecord())) - { - goto Exit; - } -#endif - pNewRec->compressMemory(); -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = pNewRec->checkRecord())) - { - goto Exit; - } -#endif - Exit: if( RC_BAD( rc) && pNewRec) @@ -369,14 +348,6 @@ RCODE FlmRecord::setINT( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - uiStorageLen = sizeof( ucStorageBuf); if( RC_BAD( rc = FlmINT2Storage( iNumber, &uiStorageLen, ucStorageBuf))) @@ -411,14 +382,6 @@ RCODE FlmRecord::setINT( f_memcpy( pucData, ucStorageBuf, uiStorageLen); -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -446,14 +409,6 @@ RCODE FlmRecord::setUINT( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - uiStorageLen = sizeof( ucStorageBuf); if( RC_BAD( rc = FlmUINT2Storage( uiNumber, &uiStorageLen, ucStorageBuf))) { @@ -487,14 +442,6 @@ RCODE FlmRecord::setUINT( f_memcpy( pucData, ucStorageBuf, uiStorageLen); -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -520,14 +467,6 @@ RCODE FlmRecord::setRecPointer( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - if( uiEncId) { // For encrypted fields, we want to make sure we allocate @@ -547,14 +486,6 @@ RCODE FlmRecord::setRecPointer( UD2FBA( (FLMUINT32)uiRecPointer, pucData); -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -581,14 +512,6 @@ RCODE FlmRecord::setUnicode( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - // A NULL or empty pUnicode string is allowed - on those // cases just set the field type. @@ -638,14 +561,6 @@ RCODE FlmRecord::setUnicode( } } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -672,14 +587,6 @@ RCODE FlmRecord::setNative( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - if( !pszString || *pszString == 0) { // Field may have had a value pointer that now @@ -726,14 +633,6 @@ RCODE FlmRecord::setNative( } } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -760,14 +659,6 @@ RCODE FlmRecord::setBinary( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - if( !uiBufLen) { // Field may have had a value pointer that now @@ -810,14 +701,6 @@ RCODE FlmRecord::setBinary( f_memcpy( pucData, pvBuf, uiBufLen); } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -844,14 +727,6 @@ RCODE FlmRecord::setBlob( goto Exit; } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - if( !uiDataLen) { // Field may have had a value pointer that now @@ -894,14 +769,6 @@ RCODE FlmRecord::setBlob( f_memcpy( pucData, ((FlmBlobImp *)pBlob)->getDataPtr(), uiDataLen); } -#ifdef FLM_CHECK_RECORD - if( RC_BAD( rc = checkRecord())) - { - flmAssert( 0); - goto Exit; - } -#endif - Exit: return( rc); @@ -2897,21 +2764,7 @@ FLMINT FlmRecord::Release( if( m_bHolesInData || getFreeMemory()) { -#ifdef FLM_CHECK_RECORD - if (RC_BAD( checkRecord())) - { - flmAssert( 0); - } -#endif - compactMemory(); - -#ifdef FLM_CHECK_RECORD - if (RC_BAD( checkRecord())) - { - flmAssert( 0); - } -#endif flmAssert( !getFreeMemory()); } } @@ -4762,33 +4615,6 @@ void FlmRecord::operator delete[]( #endif -/***************************************************************************** -Desc: Verify the structural integrity of the FlmRecord -*****************************************************************************/ -RCODE FlmRecord::checkRecord() -{ - RCODE rc = FERR_OK; - FlmField * pFld; - - // Check each field to make sure it is acceptable. - pFld = getFieldPointer( root()); - while( pFld) - { - if (RC_BAD( rc = checkField( pFld))) - { - flmAssert( 0); - goto Exit; - } - - pFld = nextField( pFld); - } - -Exit: - - return( rc); -} - - /****************************************************************************** Desc: Verify the structure and content of the FlmField ******************************************************************************/ diff --git a/flaim/src/fssearch.cpp b/flaim/src/fssearch.cpp index ce4bf85..d150980 100644 --- a/flaim/src/fssearch.cpp +++ b/flaim/src/fssearch.cpp @@ -1070,7 +1070,7 @@ RCODE FSBtNextElm( if (uiKeyLen + uiPKC <= pStack->uiKeyBufSize) { pStack->uiKeyLen = (uiKeyLen + uiPKC); - f_memcpy( &pStack->pKeyBuf[uiPKC], &pCurElm[pStack->uiElmOvhd], + f_memcpy( &pStack->pKeyBuf[ uiPKC], &pCurElm[ pStack->uiElmOvhd], uiKeyLen); } else diff --git a/flaim/src/ftext.cpp b/flaim/src/ftext.cpp index 47cbbfe..999593e 100644 --- a/flaim/src/ftext.cpp +++ b/flaim/src/ftext.cpp @@ -24,2247 +24,15 @@ #include "flaimsys.h" -#define UTOWP60_ENTRIES 1502 #define WP60toUni_MAX 15 - -#define Upper_JP_A 0x2520 -#define Upper_JP_Z 0x2539 -#define Upper_KR_A 0x5420 -#define Upper_KR_Z 0x5439 -#define Upper_CS_A 0x82FC -#define Upper_CS_Z 0x8316 -#define Upper_CT_A 0xA625 -#define Upper_CT_Z 0xA63E - -#define Lower_JP_a 0x2540 -#define Lower_JP_z 0x2559 -#define Lower_KR_a 0x5440 -#define Lower_KR_z 0x5459 -#define Lower_CS_a 0x82DC -#define Lower_CS_z 0x82F5 -#define Lower_CT_a 0xA60B -#define Lower_CT_z 0xA624 - -// Number of characters in each character set - -#define ASC_N 95 -#define ML1_N 242 -#define ML2_N 145 -#define BOX_N 88 -#define TYP_N 103 -#define ICN_N 255 -#define MTH_N 238 -#define MTX_N 229 -#define GRK_N 219 -#define HEB_N 123 -#define CYR_N 250 -#define KAN_N 63 -#define USR_N 255 -#define ARB_N 196 -#define ARS_N 220 - -// TOTAL: 1447 WP + 255 User Characters - -#define C_N ASC_N + ML1_N + ML2_N + BOX_N + MTH_N + \ - MTX_N + TYP_N + ICN_N + GRK_N + \ - HEB_N + CYR_N + KAN_N + USR_N + ARB_N + \ - ARS_N - -// Misc - #define WPCH_HIMASK 0x00FF #define WPCH_LOMASK 0xFF00 #define WPCH_MAX_COMPLEX 5 -#define NON_DISPLAYABLE_CHAR 0xFF - -/**************************************************************************** -Desc: -****************************************************************************/ -typedef struct BASE_DIACRIT_TABLE -{ - FLMBYTE base; - FLMBYTE diacrit; -} BASE_DIACRIT_TABLE; - -/**************************************************************************** -Desc: -****************************************************************************/ -typedef struct BASE_DIACRIT -{ - FLMUINT16 char_count; // Number of characters in table - FLMUINT16 start_char; // Start char - BASE_DIACRIT_TABLE * table; -} BASE_DIACRIT; - -/**************************************************************************** -Desc: Defines the range of characters within the set which are case - convertible -****************************************************************************/ -static FLMBYTE flmCaseConvertableRange[] = -{ - 26, 241, // Multinational 1 - 0, 0, // Multinational 2 - 0, 0, // Box Drawing - 0, 0, // Symbol 1 - 0, 0, // Symbol 2 - 0, 0, // Math 1 - 0, 0, // Math 2 - 0, 69, // Greek 1 - 0, 0, // Hebrew - 0, 199, // Cyrillic - 0, 0, // Japanese Kana - 0, 0, // User-defined - 0, 0, // Not defined - 0, 0, // Not defined - 0, 0, // Not defined -}; - -/**************************************************************************** -Desc: Base character location bit mapped table. - (1) - corresponding base char is in same set as combined - (0) - corresponding base char is in ascii set -****************************************************************************/ -FLMBYTE flm_ml1_cb60[] = -{ - 0x00, // 0-7 - 0x00, // 8-15 - 0x00, // 16-23 - 0x00, // 24-31 - 0x00, // 32-39 - 0x00, // 40-47 - 0x55, // 48-55 - 0x00, // 56-63 - 0x00, // 64-71 - 0x00, // 72-79 - 0x00, // 80-87 - 0x00, // 88-95 - 0x00, // 96-103 - 0x00, // 104-111 - 0x00, // 112-119 - 0x00, // 120-127 - 0x14, // 128-135 - 0x44, // 136-143 - 0x00, // 144-151 - 0x00, // 152-159 - 0x00, // 160-167 - 0x00, // 168-175 - 0x00, // 176-183 - 0x00, // 184-191 - 0x00, // 192-199 - 0x00, // 200-207 - 0x00, // 208-215 - 0x00, // 216-223 - 0x00, // 224-231 - 0x04, // 232-239 - 0x00, // 240-241 -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -BASE_DIACRIT_TABLE flm_ml1c_table[] = -{ - { 'A', acute }, - { 'a', acute }, - { 'A', circum }, - { 'a', circum }, - { 'A', umlaut }, - { 'a', umlaut }, - { 'A', grave }, - { 'a', grave }, - { 'A', ring }, - { 'a', ring }, - { 0xff, 0xff }, - { 0xff, 0xff }, - { 'C',cedilla}, - { 'c',cedilla}, - { 'E',acute}, - { 'e',acute}, - { 'E',circum}, - { 'e',circum}, - { 'E',umlaut}, - { 'e',umlaut}, - { 'E',grave}, - { 'e',grave}, - { 'I',acute}, - { dotlesi,acute}, - { 'I',circum}, - { dotlesi,circum}, - { 'I',umlaut}, - { dotlesi,umlaut}, - { 'I',grave}, - { dotlesi,grave}, - { 'N',tilde}, - { 'n',tilde}, - { 'O',acute}, - { 'o',acute}, - { 'O',circum}, - { 'o',circum}, - { 'O',umlaut}, - { 'o',umlaut}, - { 'O',grave}, - { 'o',grave}, - { 'U',acute}, - { 'u',acute}, - { 'U',circum}, - { 'u',circum}, - { 'U',umlaut}, - { 'u',umlaut}, - { 'U',grave}, - { 'u',grave}, - { 'Y',umlaut}, - { 'y',umlaut}, - { 'A',tilde}, - { 'a',tilde}, - { 'D',crossb}, - { 'd',crossb}, - { 'O',slash}, - { 'o',slash}, - { 'O',tilde}, - { 'o',tilde}, - { 'Y',acute}, - { 'y',acute}, - { 0xff,0xff}, - { 0xff,0xff}, - { 0xff,0xff}, - { 0xff,0xff}, - { 'A',breve}, - { 'a',breve}, - { 'A',macron}, - { 'a',macron}, - { 'A',ogonek}, - { 'a',ogonek}, - { 'C',acute}, - { 'c',acute}, - { 'C',caron}, - { 'c',caron}, - { 'C',circum}, - { 'c',circum}, - { 'C',dota}, - { 'c',dota}, - { 'D',caron}, - { 'd',caron}, - { 'E',caron}, - { 'e',caron}, - { 'E',dota}, - { 'e',dota}, - { 'E',macron}, - { 'e',macron}, - { 'E',ogonek}, - { 'e',ogonek}, - { 'G',acute}, - { 'g',acute}, - { 'G',breve}, - { 'g',breve}, - { 'G',caron}, - { 'g',caron}, - { 'G',cedilla}, - { 'g',aposab}, - { 'G',circum}, - { 'g',circum}, - { 'G',dota}, - { 'g',dota}, - { 'H',circum}, - { 'h',circum}, - { 'H',crossb}, - { 'h',crossb}, - { 'I',dota}, - { dotlesi,dota}, - { 'I',macron}, - { dotlesi,macron}, - { 'I',ogonek}, - { 'i',ogonek}, - { 'I',tilde}, - { dotlesi,tilde}, - { 0xff,0xff}, - { 0xff,0xff}, - { 'J',circum}, - { dotlesj,circum}, - { 'K',cedilla}, - { 'k',cedilla}, - { 'L',acute}, - { 'l',acute}, - { 'L',caron}, - { 'l',caron}, - { 'L',cedilla}, - { 'l',cedilla}, - { 'L',centerd}, - { 'l',centerd}, - { 'L',stroke}, - { 'l',stroke}, - { 'N',acute}, - { 'n',acute}, - { 'N',aposba}, - { 'n',aposba}, - { 'N',caron}, - { 'n',caron}, - { 'N',cedilla}, - { 'n',cedilla}, - { 'O',dacute}, - { 'o',dacute}, - { 'O',macron}, - { 'o',macron}, - { 0xff,0xff}, - { 0xff,0xff}, - { 'R',acute}, - { 'r',acute}, - { 'R',caron}, - { 'r',caron}, - { 'R',cedilla}, - { 'r',cedilla}, - { 'S',acute}, - { 's',acute}, - { 'S',caron}, - { 's',caron}, - { 'S',cedilla}, - { 's',cedilla}, - { 'S',circum}, - { 's',circum}, - { 'T',caron}, - { 't',caron}, - { 'T',cedilla}, - { 't',cedilla}, - { 'T',crossb}, - { 't',crossb}, - { 'U',breve}, - { 'u',breve}, - { 'U',dacute}, - { 'u',dacute}, - { 'U',macron}, - { 'u',macron}, - { 'U',ogonek}, - { 'u',ogonek}, - { 'U',ring}, - { 'u',ring}, - { 'U',tilde}, - { 'u',tilde}, - { 'W',circum}, - { 'w',circum}, - { 'Y',circum}, - { 'y',circum}, - { 'Z',acute}, - { 'z',acute}, - { 'Z',caron}, - { 'z',caron}, - { 'Z',dota}, - { 'z',dota}, - { 0xff,0xff}, - { 0xff,0xff}, - { 'D',macron}, - {'d',macron}, - {'L',macron}, - {'l',macron}, - {'N',macron}, - {'n',macron}, - {'R',grave}, - {'r',grave}, - {'S',macron}, - {'s',macron}, - {'T',macron}, - {'t',macron}, - {'Y',breve}, - {'y',breve}, - {'Y',grave}, - {'y',grave}, - {'D',aposbes}, - {'d',aposbes}, - {'O',aposbes}, - {'o',aposbes}, - {'U',aposbes}, - {'u',aposbes}, - {'E',breve}, - {'e',breve}, - {'I',breve}, - {dotlesi,breve}, - {0xff,0xff}, - {0xff,0xff}, - {'O',breve}, - {'o',breve} -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -BASE_DIACRIT flm_ml1c = -{ - 216, // Number of characters in table - 26, // Start char - flm_ml1c_table, -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -static BASE_DIACRIT_TABLE flm_grk_c_table[] = -{ - { 0, ghprime }, // ALPHA High Prime - { 1, gacute }, // alpha acute - { 10, ghprime }, // EPSILON High Prime - { 11, gacute }, // epsilon Acute - { 14, ghprime }, // ETA High Prime - { 15, gacute }, // eta Acute - { 18, ghprime }, // IOTA High Prime - { 19, gacute }, // iota Acute - { 0xFF, 0xFF }, // IOTA Diaeresis - { 19, gdia }, // iota Diaeresis - { 30, ghprime }, // OMICRON High Prime - { 31, gacute }, // omicron Acute - { 42, ghprime }, // UPSILON High Prime - { 43, gacute }, // upsilon Acute - { 0xFF, 0xFF }, // UPSILON Diaeresis - { 43,gdia }, // upsilon Diaeresis - { 50,ghprime }, // OMEGA High Prime - { 51,gacute }, // omega Acute - { 0xFF, 0xFF }, // epsilon (Variant) - { 0xFF, 0xFF }, // theta (Variant) - { 0xFF, 0xFF }, // kappa (Variant) - { 0xFF, 0xFF }, // pi (Variant) - { 0xFF, 0xFF }, // rho (Variant) - { 0xFF, 0xFF }, // sigma (Variant) - { 0xFF, 0xFF }, // UPSILON (Variant) - { 0xFF, 0xFF }, // phi (Variant) - { 0xFF, 0xFF }, // omega (Variant) - { 0xFF, 0xFF }, // Greek Question Mark - { 0xFF, 0xFF }, // Greek Semicolon - { 0xFF, 0xFF }, // High Prime - { 0xFF, 0xFF }, // Low Prime - { 0xFF, 0xFF }, // Acute (Greek) - { 0xFF, 0xFF }, // Diaeresis (Greek) - { gacute,gdia }, // Acute Diaeresis - { ggrave, gdia }, // Grave Diaeresis - { 0xFF, 0xFF }, // Grave (Greek) - { 0xFF, 0xFF }, // Circumflex (Greek) - { 0xFF, 0xFF }, // Smooth Breathing - { 0xFF, 0xFF }, // Rough Breathing - { 0xFF, 0xFF }, // Iota Subscript - { gsmooth, gacute }, // Smooth Breathing Acute - { grough, gacute }, // Rough Breathing Acute - { gsmooth, ggrave }, // Smooth Breathing Grave - { grough, ggrave }, // Rough Breathing Grave - { gsmooth, gcircm }, // Smooth Breathing Circumflex - { grough, gcircm }, // Rough Breathing Circumflex - { gacute, giota }, // Acute w/Iota Subscript - { ggrave, giota }, // Grave w/Iota Subscript - { gcircm, giota }, // Circumflex w/Iota Subscript - { gsmooth, giota }, // Smooth Breathing w/Iota Subscript - { grough, giota }, // Rough Breathing w/Iota Subscript - { gsmact, giota }, // Smooth Breathing Acute w/Iota Subscript - { grgact, giota }, // Rough Breathing Acute w/Iota Subscript - { gsmgrv, giota }, // Smooth Breathing Grave w/Iota Subscript - { grggrv, giota }, // Rough Breathing Grave w/Iota Subscript - { gsmcir, giota }, // Smooth Breathing Circumflex w/Iota Sub - { grgcir, giota }, // Rough Breathing Circumflex w/Iota Sub - { 1, ggrave }, // alpha Grave - { 1, gcircm }, // alpha Circumflex - { 1, giota }, // alpha w/Iota - { 1, gactio }, // alpha Acute w/Iota - { 1, ggrvio }, // alpha Grave w/Iota - { 1, gcirio }, // alpha Circumflex w/Iota - { 1, gsmooth }, // alpha Smooth - { 1, gsmact }, // alpha Smooth Acute - { 1, gsmgrv }, // alpha Smooth Grave - { 1, gsmcir }, // alpha Smooth Circumflex - { 1, gsmio }, // alpha Smooth w/Iota - { 1, gsmaio }, // alpha Smooth Acute w/Iota - { 1, gsmgvio }, // alpha Smooth Grave w/Iota - { 1, gsmcio }, // alpha Smooth Circumflex w/Iota - { 1, grough }, // alpha Rough - { 1, grgact }, // alpha Rough Acute - { 1, grggrv }, // alpha Rough Grave - { 1, grgcir }, // alpha Rough Circumflex - { 1, grgio }, // alpha Rough w/Iota - { 1, grgaio }, // alpha Rough Acute w/Iota - { 1, grggvio }, // alpha Rough Grave w/Iota - { 1, grgcio }, // alpha Rough Circumflex w/Iota - { 11, ggrave }, // epsilon Grave - { 11, gsmooth }, // epsilon Smooth - { 11, gsmact }, // epsilon Smooth Acute - { 11, gsmgrv }, // epsilon Smooth Grave - { 11, grough }, // epsilon Rough - { 11, grgact }, // epsilon Rough Acute - { 11, grggrv }, // epsilon Rough Grave - { 15, ggrave }, // eta Grave - { 15, gcircm }, // eta Circumflex - { 15, giota }, // eta w/Iota - { 15, gactio }, // eta Acute w/Iota - { 15, ggrvio }, // eta Grave w/Iota - { 15, gcirio }, // eta Circumflex w/Iota - { 15, gsmooth }, // eta Smooth - { 15, gsmact }, // eta Smooth Acute - { 15, gsmgrv }, // eta Smooth Grave - { 15, gsmcir }, // eta Smooth Circumflex - { 15, gsmio }, // eta Smooth w/Iota - { 15, gsmaio }, // eta Smooth Acute w/Iota - { 15, gsmgvio }, // eta Smooth Grave w/Iota - { 15, gsmcio }, // eta Smooth Circumflex w/Iota - { 15, grough }, // eta Rough - { 15, grgact }, // eta Rough Acute - { 15, grggrv }, // eta Rough Grave - { 15, grgcir }, // eta Rough Circumflex - { 15, grgio }, // eta Rough w/Iota - { 15, grgaio }, // eta Rough Acute w/Iota - { 15, grggvio }, // eta Rough Grave w/Iota - { 15, grgcio }, // eta Rough Circumflex w/Iota - { 19, ggrave }, // iota Grave - { 19, gcircm }, // iota Circumflex - { 19, gactdia }, // iota Acute Diaeresis - { 19, ggrvdia }, // iota Grave Diaeresis - { 19, gsmooth }, // iota Smooth - { 19, gsmact }, // iota Smooth Acute - { 19, gsmgrv }, // iota Smooth Grave - { 19, gsmcir }, // iota Smooth Circumflex - { 19, grough }, // iota Rough - { 19, grgact }, // iota Rough Acute - { 19, grggrv }, // iota Rough Grave - { 19, grgcir }, // iota Rough Circumflex - { 31, ggrave }, // omicron Grave - { 31, gsmooth }, // omicron Smooth - { 31, gsmact }, // omicron Smooth Acute - { 31, gsmgrv }, // omicron Smooth Grave - { 31, grough }, // omicron Rough - { 31, grgact }, // omicron Rough Acute - { 31, grggrv }, // omicron Rough Grave - { 0xFF, 0xFF }, // rho rough - { 0xFF, 0xFF }, // rho smooth - { 43, ggrave }, // upsilon Grave - { 43, gcircm }, // upsilon Circumflex - { 43, gactdia }, // upsilon Acute Diaeresis - { 43, ggrvdia }, // upsilon Grave Diaeresis - { 43, gsmooth }, // upsilon Smooth - { 43, gsmact }, // upsilon Smooth Acute - { 43, gsmgrv }, // upsilon Smooth Grave - { 43, gsmcir }, // upsilon Smooth Circumflex - { 43, grough }, // upsilon Rough - { 43, grgact }, // upsilon Rough Acute - { 43, grggrv }, // upsilon Rough Grave - { 43, grgcir }, // upsilon Rough Circumflex - { 51, ggrave }, // omega Grave - { 51, gcircm }, // omega Circumflex - { 51, giota }, // omega w/Iota - { 51, gactio }, // omega Acute w/Iota - { 51, ggrvio }, // omega Grave w/Iota - { 51, gcirio }, // omega Circumflex w/Iota - { 51, gsmooth }, // omega Smooth - { 51, gsmact }, // omega Smooth Acute - { 51, gsmgrv }, // omega Smooth Grave - { 51, gsmcir }, // omega Smooth Circumflex - { 51, gsmio }, // omega Smooth w/Iota - { 51, gsmaio }, // omega Smooth Acute w/Iota - { 51, gsmgvio }, // omega Smooth Grave w/Iota - { 51, gsmcio }, // omega Smooth Circumflex w/Iota - { 51, grough }, // omega Rough - { 51, grgact }, // omega Rough Acute - { 51, grggrv }, // omega Rough Grave - { 51, grgcir }, // omega Rough Circumflex - { 51, grgio }, // omega Rough w/Iota - { 51, grgaio }, // omega Rough Acute w/Iota - { 51, grggvio }, // omega Rough Grave w/Iota - { 51, grgcio} // omega Rough Circumflex w/Iota -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -static BASE_DIACRIT flm_grk_c = -{ - 163, // Number of characters in table - 52, // Start char - flm_grk_c_table -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -static BASE_DIACRIT_TABLE flm_rus_c_table[] = -{ - { 14, 204 }, // ZHE with right descender - { 15, 204 }, // zhe with right descender - { 0xFF, 0xFF}, // DZE - { 0xFF, 0xFF}, // dze - { 0xFF, 0xFF}, // Z - { 0xFF, 0xFF}, // z - { 18, 206 }, // II with macron - { 19, 206}, // ii with macron - { 0xFF, 0xFF}, // I - { 0xFF, 0xFF}, // i - { 0xFF, 0xFF}, // YI - { 0xFF, 0xFF}, // yi - { 0xFF, 0xFF}, // I ligature - { 0xFF, 0xFF}, // i ligature - { 0xFF, 0xFF}, // JE - { 0xFF, 0xFF}, // je - { 0xFF, 0xFF}, // KJE - { 0xFF, 0xFF}, // kje - { 22, 204}, // KA with right descender - { 23, 204}, // ka with right descender - { 22, 205 }, // KA ogonek - { 23, 205 }, // ka ogonek - { 0xFF, 0xFF}, // KA vertical bar - { 0xFF, 0xFF}, // ka vertical bar - { 0xFF, 0xFF}, // LJE - { 0xFF, 0xFF}, // lje - { 28, 204 }, // EN with right descender - { 29, 204 }, // en with right descender - { 0xFF, 0xFF}, // NJE - { 0xFF, 0xFF}, // nje - { 0xFF, 0xFF}, // ROUND OMEGA - { 0xFF, 0xFF}, // round omega - { 0xFF, 0xFF}, // OMEGA - { 0xFF, 0xFF}, // omega - { 0xFF, 0xFF}, // TSHE - { 0xFF, 0xFF}, // tshe - { 0xFF, 0xFF}, // SHORT U - { 0xFF, 0xFF}, // short u - { 40, 206}, // U with macron - { 41, 206 }, // u with macron - { 0xFF, 0xFF}, // STRAIGHT U - { 0xFF, 0xFF}, // straight u - { 0xFF, 0xFF}, // STRAIGHT U BAR - { 0xFF, 0xFF}, // straight u bar - { 0xFF, 0xFF}, // OU ligature - { 0xFF, 0xFF}, // ou ligature - { 44, 204 }, // KHA with right descender - { 45, 204 }, // kha with right descender - { 44, 205 }, // KHA ogonek - { 45, 205 }, // kha ogonek - { 0xFF, 0xFF}, // H - { 0xFF, 0xFF}, // h - { 0xFF, 0xFF}, // OMEGA titlo - { 0xFF, 0xFF}, // omega titlo - { 0xFF, 0xFF}, // DZHE - { 0xFF, 0xFF}, // dzhe - { 48, 204 }, // CHE with right descender - { 49, 204 }, // che with right descender - { 0xFF, 0xFF}, // CHE vertical bar - { 0xFF, 0xFF}, // che vertical bar - { 0xFF, 0xFF}, // SHCHA (variant) - { 0xFF, 0xFF}, // shcha (variant) - { 0xFF, 0xFF}, // YAT - { 0xFF, 0xFF}, // yat - { 0xFF, 0xFF}, // YUS BOLSHOI - { 0xFF, 0xFF}, // yus bolshoi - { 0xFF, 0xFF}, // BIG MALYI - { 0xFF, 0xFF}, // big malyi - { 0xFF, 0xFF}, // KSI - { 0xFF, 0xFF}, // ksi - { 0xFF, 0xFF}, // PSI - { 0xFF, 0xFF}, // psi - { 0xFF, 0xFF}, // FITA - { 0xFF, 0xFF}, // fita - { 0xFF, 0xFF}, // IZHITSA - { 0xFF, 0xFF}, // izhitsa - { 00, racute}, // Russian A acute - { 01, racute }, // Russian a acute - { 10, racute }, // Russian IE acute - { 11, racute }, // Russian ie acute - { 78, racute }, // Russian E acute - { 79, racute }, // Russian e acute - { 18, racute }, // Russian II acute - { 19, racute }, // Russian ii acute - { 88, racute }, // Russian I acute - { 89, racute }, // Russian i acute - { 90, racute }, // Russian YI acute - { 91, racute }, // Russian yi acute - { 30, racute }, // Russian O acute - { 31, racute }, // Russian o acute - { 40, racute }, // Russian U acute - { 41, racute }, // Russian u acute - { 56, racute }, // Russian YERI acute - { 57, racute }, // Russian yeri acute - { 60, racute }, // Russian REVERSED E acute - { 61, racute }, // Russian reversed e acute - { 62, racute }, // Russian IU acute - { 63, racute }, // Russian iu acute - { 64, racute }, // Russian IA acute - { 65, racute }, // Russian ia acute - { 00, rgrave }, // Russian A grave - { 01, rgrave }, // Russian a grave - { 10, rgrave }, // Russian IE grave - { 11, rgrave }, // Russian ie grave - { 12, rgrave }, // Russian YO grave - { 13, rgrave }, // Russian yo grave - { 18, rgrave }, // Russian I grave - { 19, rgrave }, // Russian i grave - { 30, rgrave }, // Russian O grave - { 31, rgrave }, // Russian o grave - { 40, rgrave }, // Russian U grave - { 41, rgrave }, // Russian u grave - { 56, rgrave }, // Russian YERI grave - { 57, rgrave }, // Russian yeri grave - { 60, rgrave }, // Russian REVERSED E grave - { 61, rgrave }, // Russian reversed e grave - { 62, rgrave }, // Russian IU grave - { 63, rgrave }, // Russian iu grave - { 64, rgrave }, // Russian IA grave - { 65, rgrave} // Russian ia grave -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -static BASE_DIACRIT flm_rus_c = { - 120, // Number of characters in table - 156, // Start char - flm_rus_c_table, -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -BASE_DIACRIT * flm_car60_c[ NCHSETS] = -{ - (BASE_DIACRIT*)0, // no composed characters for ascii - &flm_ml1c, - (BASE_DIACRIT*)0, // no composed characters for multinational 2 - (BASE_DIACRIT*)0, // no composed characters for line draw - (BASE_DIACRIT*)0, // no composed characters for typographic - (BASE_DIACRIT*)0, // no composed characters for icons - (BASE_DIACRIT*)0, // no composed characters for math - (BASE_DIACRIT*)0, // no composed characters for math extension - &flm_grk_c, // Greek - (BASE_DIACRIT*)0, // Hebrew - &flm_rus_c, // Cyrillic - Russian - (BASE_DIACRIT*)0, // Hiragana or Katakana (Japanese) - (BASE_DIACRIT*)0, // no composed characters for user - (BASE_DIACRIT*)0, // no composed characters for Arabic - (BASE_DIACRIT*)0, // no composed characters for Arabic Script -}; - -/**************************************************************************** -Desc: Number of characters in each character set -****************************************************************************/ -FLMBYTE flm_c60_max[] = -{ - ASC_N, // ascii - ML1_N, // multinational 1 - ML2_N, // multinational 2 - BOX_N, // line draw - TYP_N, // typographic - ICN_N, // icons - MTH_N, // math - MTX_N, // math extension - GRK_N, // Greek - HEB_N, // Hebrew - CYR_N, // Cyrillic - Russian - KAN_N, // Kana - USR_N, // user - ARB_N, // Arabic - ARS_N, // Arabic Script -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMUINT16 WP_UTOWP60[ UTOWP60_ENTRIES][ 2] = -{ - { 0x00A1, 0x0407 }, // 7 , 4, - { 0x00A2, 0x0413 }, // 19 , 4, - { 0x00A3, 0x040b }, // 11 , 4, - { 0x00A4, 0x0418 }, // 24 , 4, - { 0x00A5, 0x040c }, // 12 , 4, - { 0x00A7, 0x0406 }, // 6 , 4, - { 0x00A9, 0x0417 }, // 23 , 4, - { 0x00AA, 0x040f }, // 15 , 4, - { 0x00AB, 0x0409 }, // 9 , 4, - { 0x00AC, 0x0614 }, // 20 , 6, - { 0x00AE, 0x0416 }, // 22 , 4, - { 0x00B0, 0x0624 }, // 36 , 6, - { 0x00B1, 0x0601 }, // 1 , 6, - { 0x00B2, 0x0414 }, // 20 , 4, - { 0x00B3, 0x041a }, // 26 , 4, - { 0x00B5, 0x0625 }, // 37 , 6, - { 0x00B6, 0x0405 }, // 5 , 4, - { 0x00B7, 0x0101 }, // 101, 1, - { 0x00B9, 0x044e }, // 78 , 4, - { 0x00BA, 0x0410 }, // 16 , 4, - { 0x00BB, 0x040a }, // 10 , 4, - { 0x00BC, 0x0412 }, // 18 , 4, - { 0x00BD, 0x0411 }, // 17 , 4, - { 0x00BE, 0x0419 }, // 25 , 4, - { 0x00BF, 0x0408 }, // 8 , 4, - { 0x00C0, 0x0120 }, // 32 , 1, - { 0x00C1, 0x011a }, // 26 , 1, - { 0x00C2, 0x011c }, // 28 , 1, - { 0x00C3, 0x014c }, // 76 , 1, - { 0x00C4, 0x011e }, // 30 , 1, - { 0x00C5, 0x0122 }, // 34 , 1, - { 0x00C6, 0x0124 }, // 36 , 1, - { 0x00C7, 0x0126 }, // 38 , 1, - { 0x00C8, 0x012e }, // 46 , 1, - { 0x00C9, 0x0128 }, // 40 , 1, - { 0x00CA, 0x012a }, // 42 , 1, - { 0x00CB, 0x012c }, // 44 , 1, - { 0x00CC, 0x0136 }, // 54 , 1, - { 0x00CD, 0x0130 }, // 48 , 1, - { 0x00CE, 0x0132 }, // 50 , 1, - { 0x00CF, 0x0134 }, // 52 , 1, - { 0x00D0, 0x0156 }, // 86 , 1, - { 0x00D1, 0x0138 }, // 56 , 1, - { 0x00D2, 0x0140 }, // 64 , 1, - { 0x00D3, 0x013a }, // 58 , 1, - { 0x00D4, 0x013c }, // 60 , 1, - { 0x00D5, 0x0152 }, // 82 , 1, - { 0x00D6, 0x013e }, // 62 , 1, - { 0x00D7, 0x0627 }, // 39 , 6, - { 0x00D8, 0x0150 }, // 80 , 1, - { 0x00D9, 0x0148 }, // 72 , 1, - { 0x00DA, 0x0142 }, // 66 , 1, - { 0x00DB, 0x0144 }, // 68 , 1, - { 0x00DC, 0x0146 }, // 70 , 1, - { 0x00DD, 0x0154 }, // 84 , 1, - { 0x00DE, 0x0158 }, // 88 , 1, - { 0x00DF, 0x0117 }, // 23 , 1, - { 0x00E0, 0x0121 }, // 33 , 1, - { 0x00E1, 0x011b }, // 27 , 1, - { 0x00E2, 0x011d }, // 29 , 1, - { 0x00E3, 0x014d }, // 77 , 1, - { 0x00E4, 0x011f }, // 31 , 1, - { 0x00E5, 0x0123 }, // 35 , 1, - { 0x00E6, 0x0125 }, // 37 , 1, - { 0x00E7, 0x0127 }, // 39 , 1, - { 0x00E8, 0x012f }, // 47 , 1, - { 0x00E9, 0x0129 }, // 41 , 1, - { 0x00EA, 0x012b }, // 43 , 1, - { 0x00EB, 0x012d }, // 45 , 1, - { 0x00EC, 0x0137 }, // 55 , 1, - { 0x00ED, 0x0131 }, // 49 , 1, - { 0x00EE, 0x0133 }, // 51 , 1, - { 0x00EF, 0x0135 }, // 53 , 1, - { 0x00F0, 0x0157 }, // 87 , 1, - { 0x00F1, 0x0139 }, // 57 , 1, - { 0x00F2, 0x0141 }, // 65 , 1, - { 0x00F3, 0x013b }, // 59 , 1, - { 0x00F4, 0x013d }, // 61 , 1, - { 0x00F5, 0x0153 }, // 83 , 1, - { 0x00F6, 0x013f }, // 63 , 1, - { 0x00F7, 0x0608 }, // 8 , 6, - { 0x00F8, 0x0151 }, // 81 , 1, - { 0x00F9, 0x0149 }, // 73 , 1, - { 0x00FA, 0x0143 }, // 67 , 1, - { 0x00FB, 0x0145 }, // 69 , 1, - { 0x00FC, 0x0147 }, // 71 , 1, - { 0x00FD, 0x0155 }, // 85 , 1, - { 0x00FE, 0x0159 }, // 89 , 1, - { 0x00FF, 0x014b }, // 75 , 1, - { 0x0100, 0x015c }, // 92 , 1, - { 0x0101, 0x015d }, // 93 , 1, - { 0x0102, 0x015a }, // 90 , 1, - { 0x0103, 0x015b }, // 91 , 1, - { 0x0104, 0x015e }, // 94 , 1, - { 0x0105, 0x015f }, // 95 , 1, - { 0x0106, 0x0160 }, // 96 , 1, - { 0x0107, 0x0161 }, // 97 , 1, - { 0x0108, 0x0164 }, // 100, 1, - { 0x0109, 0x0165 }, // 101, 1, - { 0x010A, 0x0166 }, // 102, 1, - { 0x010B, 0x0167 }, // 103, 1, - { 0x010C, 0x0162 }, // 98 , 1, - { 0x010D, 0x0163 }, // 99 , 1, - { 0x010E, 0x0168 }, // 104, 1, - { 0x010F, 0x0169 }, // 105, 1, - { 0x0110, 0x014e }, // 78 , 1, - { 0x0111, 0x014f }, // 79 , 1, - { 0x0112, 0x016e }, // 110, 1, - { 0x0113, 0x016f }, // 111, 1, - { 0x0114, 0x01ea }, // 234, 1, - { 0x0115, 0x01eb }, // 235, 1, - { 0x0116, 0x016c }, // 108, 1, - { 0x0117, 0x016d }, // 109, 1, - { 0x0118, 0x0170 }, // 112, 1, - { 0x0119, 0x0171 }, // 113, 1, - { 0x011A, 0x016a }, // 106, 1, - { 0x011B, 0x016b }, // 107, 1, - { 0x011C, 0x017a }, // 122, 1, - { 0x011D, 0x017b }, // 123, 1, - { 0x011E, 0x0174 }, // 116, 1, - { 0x011F, 0x0175 }, // 117, 1, - { 0x0120, 0x017c }, // 124, 1, - { 0x0121, 0x017d }, // 125, 1, - { 0x0122, 0x0178 }, // 120, 1, - { 0x0123, 0x0179 }, // 121, 1, - { 0x0124, 0x017e }, // 126, 1, - { 0x0125, 0x017f }, // 127, 1, - { 0x0126, 0x0180 }, // 128, 1, - { 0x0127, 0x0181 }, // 129, 1, - { 0x0128, 0x0188 }, // 136, 1, - { 0x0129, 0x0189 }, // 137, 1, - { 0x012A, 0x0184 }, // 132, 1, - { 0x012B, 0x0185 }, // 133, 1, - { 0x012C, 0x01ec }, // 236, 1, - { 0x012D, 0x01ed }, // 237, 1, - { 0x012E, 0x0186 }, // 134, 1, - { 0x012F, 0x0187 }, // 135, 1, - { 0x0130, 0x0182 }, // 130, 1, - { 0x0131, 0x01ef }, // 239, 1, - { 0x0132, 0x018a }, // 138, 1, - { 0x0133, 0x018b }, // 139, 1, - { 0x0134, 0x018c }, // 140, 1, - { 0x0135, 0x018d }, // 141, 1, - { 0x0136, 0x018e }, // 142, 1, - { 0x0137, 0x018f }, // 143, 1, - { 0x0138, 0x0118 }, // 24 , 1, - { 0x0139, 0x0190 }, // 144, 1, - { 0x013A, 0x0191 }, // 145, 1, - { 0x013B, 0x0194 }, // 148, 1, - { 0x013C, 0x0195 }, // 149, 1, - { 0x013D, 0x0192 }, // 146, 1, - { 0x013E, 0x0193 }, // 147, 1, - { 0x013F, 0x0196 }, // 150, 1, - { 0x0140, 0x0197 }, // 151, 1, - { 0x0141, 0x0198 }, // 152, 1, - { 0x0142, 0x0199 }, // 153, 1, - { 0x0143, 0x019a }, // 154, 1, - { 0x0144, 0x019b }, // 155, 1, - { 0x0145, 0x01a0 }, // 160, 1, - { 0x0146, 0x01a1 }, // 161, 1, - { 0x0147, 0x019e }, // 158, 1, - { 0x0148, 0x019f }, // 159, 1, - { 0x0149, 0x019d }, // 157, 1, - { 0x014A, 0x01d2 }, // 210, 1, - { 0x014B, 0x01d3 }, // 211, 1, - { 0x014C, 0x01a4 }, // 164, 1, - { 0x014D, 0x01a5 }, // 165, 1, - { 0x014E, 0x01f0 }, // 240, 1, - { 0x014F, 0x01f1 }, // 241, 1, - { 0x0150, 0x01a2 }, // 162, 1, - { 0x0151, 0x01a3 }, // 163, 1, - { 0x0152, 0x01a6 }, // 166, 1, - { 0x0153, 0x01a7 }, // 167, 1, - { 0x0154, 0x01a8 }, // 168, 1, - { 0x0155, 0x01a9 }, // 169, 1, - { 0x0156, 0x01ac }, // 172, 1, - { 0x0157, 0x01ad }, // 173, 1, - { 0x0158, 0x01aa }, // 170, 1, - { 0x0159, 0x01ab }, // 171, 1, - { 0x015A, 0x01ae }, // 174, 1, - { 0x015B, 0x01af }, // 175, 1, - { 0x015C, 0x01b4 }, // 180, 1, - { 0x015D, 0x01b5 }, // 181, 1, - { 0x015E, 0x01b2 }, // 178, 1, - { 0x015F, 0x01b3 }, // 179, 1, - { 0x0160, 0x01b0 }, // 176, 1, - { 0x0161, 0x01b1 }, // 177, 1, - { 0x0162, 0x01b8 }, // 184, 1, - { 0x0163, 0x01b9 }, // 185, 1, - { 0x0164, 0x01b6 }, // 182, 1, - { 0x0165, 0x01b7 }, // 183, 1, - { 0x0166, 0x01ba }, // 186, 1, - { 0x0167, 0x01bb }, // 187, 1, - { 0x0168, 0x01c6 }, // 198, 1, - { 0x0169, 0x01c7 }, // 199, 1, - { 0x016A, 0x01c0 }, // 192, 1, - { 0x016B, 0x01c1 }, // 193, 1, - { 0x016C, 0x01bc }, // 188, 1, - { 0x016D, 0x01bd }, // 189, 1, - { 0x016E, 0x01c4 }, // 196, 1, - { 0x016F, 0x01c5 }, // 197, 1, - { 0x0170, 0x01be }, // 190, 1, - { 0x0171, 0x01bf }, // 191, 1, - { 0x0172, 0x01c2 }, // 194, 1, - { 0x0173, 0x01c3 }, // 195, 1, - { 0x0174, 0x01c8 }, // 200, 1, - { 0x0175, 0x01c9 }, // 201, 1, - { 0x0176, 0x01ca }, // 202, 1, - { 0x0177, 0x01cb }, // 203, 1, - { 0x0178, 0x014a }, // 74 , 1, - { 0x0179, 0x01cc }, // 204, 1, - { 0x017A, 0x01cd }, // 205, 1, - { 0x017B, 0x01d0 }, // 208, 1, - { 0x017C, 0x01d1 }, // 209, 1, - { 0x017D, 0x01ce }, // 206, 1, - { 0x017E, 0x01cf }, // 207, 1, - { 0x0192, 0x040e }, // 14 , 4, - { 0x0194, 0x0a7c }, // 124, 10, - { 0x01A0, 0x01e6 }, // 230, 1, - { 0x01A1, 0x01e7 }, // 231, 1, - { 0x01AF, 0x01e8 }, // 232, 1, - { 0x01B0, 0x01e9 }, // 233, 1, - { 0x01C0, 0x0605 }, // 5 , 6, - { 0x0250, 0x0237 }, // 55 , 2, - { 0x0251, 0x0238 }, // 56 , 2, - { 0x0252, 0x0239 }, // 57 , 2, - { 0x0253, 0x023a }, // 58 , 2, - { 0x0254, 0x023c }, // 60 , 2, - { 0x0255, 0x023d }, // 61 , 2, - { 0x0256, 0x023f }, // 63 , 2, - { 0x0257, 0x0240 }, // 64 , 2, - { 0x0258, 0x0241 }, // 65 , 2, - { 0x0259, 0x0242 }, // 66 , 2, - { 0x025A, 0x0243 }, // 67 , 2, - { 0x025B, 0x0244 }, // 68 , 2, - { 0x025C, 0x0245 }, // 69 , 2, - { 0x025D, 0x0246 }, // 70 , 2, - { 0x025E, 0x0248 }, // 72 , 2, - { 0x025F, 0x0249 }, // 73 , 2, - { 0x0260, 0x024c }, // 76 , 2, - { 0x0261, 0x024b }, // 75 , 2, - { 0x0262, 0x024d }, // 77 , 2, - { 0x0263, 0x024f }, // 79 , 2, - { 0x0264, 0x0250 }, // 80 , 2, - { 0x0265, 0x0251 }, // 81 , 2, - { 0x0266, 0x0252 }, // 82 , 2, - { 0x0267, 0x0253 }, // 83 , 2, - { 0x0268, 0x0255 }, // 85 , 2, - { 0x0269, 0x0257 }, // 87 , 2, - { 0x026A, 0x0256 }, // 86 , 2, - { 0x026B, 0x025a }, // 90 , 2, - { 0x026C, 0x025b }, // 91 , 2, - { 0x026D, 0x025c }, // 92 , 2, - { 0x026E, 0x025e }, // 94 , 2, - { 0x026F, 0x0260 }, // 96 , 2, - { 0x0270, 0x0261 }, // 97 , 2, - { 0x0271, 0x0262 }, // 98 , 2, - { 0x0272, 0x0263 }, // 99 , 2, - { 0x0273, 0x0264 }, // 100, 2, - { 0x0274, 0x0265 }, // 101, 2, - { 0x0275, 0x0279 }, // 121, 2, - { 0x0276, 0x0266 }, // 102, 2, - { 0x0277, 0x0267 }, // 103, 2, - { 0x0278, 0x024a }, // 74 , 2, - { 0x0279, 0x0269 }, // 105, 2, - { 0x027A, 0x026a }, // 106, 2, - { 0x027B, 0x026b }, // 107, 2, - { 0x027C, 0x026c }, // 108, 2, - { 0x027D, 0x026d }, // 109, 2, - { 0x027E, 0x026e }, // 110, 2, - { 0x027F, 0x026f }, // 111, 2, - { 0x0280, 0x0270 }, // 112, 2, - { 0x0281, 0x0271 }, // 113, 2, - { 0x0282, 0x0272 }, // 114, 2, - { 0x0283, 0x0273 }, // 115, 2, - { 0x0284, 0x0274 }, // 116, 2, - { 0x0285, 0x0275 }, // 117, 2, - { 0x0286, 0x0276 }, // 118, 2, - { 0x0287, 0x0277 }, // 119, 2, - { 0x0288, 0x0278 }, // 120, 2, - { 0x0289, 0x027a }, // 122, 2, - { 0x028A, 0x027b }, // 123, 2, - { 0x028B, 0x027d }, // 125, 2, - { 0x028C, 0x027c }, // 124, 2, - { 0x028D, 0x027e }, // 126, 2, - { 0x028E, 0x025f }, // 95 , 2, - { 0x028F, 0x0280 }, // 128, 2, - { 0x0290, 0x0281 }, // 129, 2, - { 0x0291, 0x0282 }, // 130, 2, - { 0x0292, 0x0283 }, // 131, 2, - { 0x0293, 0x0284 }, // 132, 2, - { 0x0294, 0x0285 }, // 133, 2, - { 0x0295, 0x0286 }, // 134, 2, - { 0x0296, 0x0287 }, // 135, 2, - { 0x0297, 0x023e }, // 62 , 2, - { 0x0298, 0x028a }, // 138, 2, - { 0x0299, 0x023b }, // 59 , 2, - { 0x029A, 0x0247 }, // 71 , 2, - { 0x029B, 0x024e }, // 78 , 2, - { 0x029C, 0x0254 }, // 84 , 2, - { 0x029D, 0x0258 }, // 88 , 2, - { 0x029E, 0x0259 }, // 89 , 2, - { 0x029F, 0x025d }, // 93 , 2, - { 0x02A0, 0x0268 }, // 104, 2, - { 0x02A1, 0x0288 }, // 136, 2, - { 0x02A2, 0x0289 }, // 137, 2, - { 0x02A3, 0x028b }, // 139, 2, - { 0x02A4, 0x028c }, // 140, 2, - { 0x02A5, 0x028d }, // 141, 2, - { 0x02A6, 0x028e }, // 142, 2, - { 0x02A7, 0x028f }, // 143, 2, - { 0x02A8, 0x0290 }, // 144, 2, - { 0x02B0, 0x0235 }, // 53 , 2, - { 0x02B6, 0x0236 }, // 54 , 2, - { 0x02B9, 0x0200 }, // 0 , 2, - { 0x02BA, 0x0201 }, // 1 , 2, - { 0x02BB, 0x0202 }, // 2 , 2, - { 0x02BC, 0x0205 }, // 5 , 2, - { 0x02BD, 0x0204 }, // 4 , 2, - { 0x02BE, 0x0207 }, // 7 , 2, - { 0x02BF, 0x0208 }, // 8 , 2, - { 0x02C6, 0x0217 }, // 23 , 2, - { 0x02C7, 0x0218 }, // 24 , 2, - { 0x02C8, 0x020f }, // 15 , 2, - { 0x02C9, 0x0211 }, // 17 , 2, - { 0x02CA, 0x0212 }, // 18 , 2, - { 0x02CB, 0x0213 }, // 19 , 2, - { 0x02CC, 0x0210 }, // 16 , 2, - { 0x02CD, 0x0214 }, // 20 , 2, - { 0x02CE, 0x0215 }, // 21 , 2, - { 0x02CF, 0x0216 }, // 22 , 2, - { 0x02D0, 0x020a }, // 10 , 2, - { 0x02D1, 0x020b }, // 11 , 2, - { 0x02D2, 0x022a }, // 42 , 2, - { 0x02D3, 0x022b }, // 43 , 2, - { 0x02DA, 0x021b }, // 27 , 2, - { 0x02DB, 0x0231 }, // 49 , 2, - { 0x02DC, 0x0219 }, // 25 , 2, - { 0x02DE, 0x0233 }, // 51 , 2, - { 0x0300, 0x0100 }, // 0 , 1, - { 0x0301, 0x0106 }, // 6 , 1, - { 0x0302, 0x0103 }, // 3 , 1, - { 0x0303, 0x0102 }, // 2 , 1, - { 0x0304, 0x0108 }, // 8 , 1, - { 0x0305, 0x0115 }, // 21 , 1, - { 0x0306, 0x0116 }, // 22 , 1, - { 0x0307, 0x010f }, // 15 , 1, - { 0x0308, 0x0107 }, // 7 , 1, - { 0x030A, 0x010e }, // 14 , 1, - { 0x030B, 0x0110 }, // 16 , 1, - { 0x030C, 0x0113 }, // 19 , 1, - { 0x0310, 0x0209 }, // 9 , 2, - { 0x0311, 0x0858 }, // 88 , 8, - { 0x0313, 0x0109 }, // 9 , 1, - { 0x0314, 0x085a }, // 90 , 8, - { 0x0315, 0x010a }, // 10 , 1, - { 0x031C, 0x0221 }, // 33 , 2, - { 0x031D, 0x0222 }, // 34 , 2, - { 0x031E, 0x0223 }, // 35 , 2, - { 0x031F, 0x0224 }, // 36 , 2, - { 0x0320, 0x0225 }, // 37 , 2, - { 0x0321, 0x0226 }, // 38 , 2, - { 0x0322, 0x0227 }, // 39 , 2, - { 0x0323, 0x021e }, // 30 , 2, - { 0x0324, 0x0220 }, // 32 , 2, - { 0x0325, 0x021a }, // 26 , 2, - { 0x0326, 0x010c }, // 12 , 1, - { 0x0327, 0x0111 }, // 17 , 1, - { 0x0328, 0x0112 }, // 18 , 1, - { 0x0329, 0x020e }, // 14 , 2, - { 0x032A, 0x0228 }, // 40 , 2, - { 0x032B, 0x0229 }, // 41 , 2, - { 0x032C, 0x021d }, // 29 , 2, - { 0x032D, 0x021c }, // 28 , 2, - { 0x032E, 0x020d }, // 13 , 2, - { 0x0335, 0x0104 }, // 4 , 1, - { 0x0337, 0x0114 }, // 20 , 1, - { 0x0338, 0x0105 }, // 5 , 1, - { 0x033E, 0x0230 }, // 48 , 2, - { 0x0345, 0x085b }, // 91 , 8, - { 0x0374, 0x0851 }, // 81 , 8, - { 0x0375, 0x0852 }, // 82 , 8, - { 0x0391, 0x0800 }, // 0 , 8, - { 0x0392, 0x0802 }, // 2 , 8, - { 0x0393, 0x0806 }, // 6 , 8, - { 0x0394, 0x0808 }, // 8 , 8, - { 0x0395, 0x080a }, // 10 , 8, - { 0x0396, 0x080c }, // 12 , 8, - { 0x0397, 0x080e }, // 14 , 8, - { 0x0398, 0x0810 }, // 16 , 8, - { 0x0399, 0x0812 }, // 18 , 8, - { 0x039A, 0x0814 }, // 20 , 8, - { 0x039B, 0x0816 }, // 22 , 8, - { 0x039C, 0x0818 }, // 24 , 8, - { 0x039D, 0x081a }, // 26 , 8, - { 0x039E, 0x081c }, // 28 , 8, - { 0x039F, 0x081e }, // 30 , 8, - { 0x03A0, 0x0820 }, // 32 , 8, - { 0x03A1, 0x0822 }, // 34 , 8, - { 0x03A3, 0x0824 }, // 36 , 8, - { 0x03A4, 0x0828 }, // 40 , 8, - { 0x03A5, 0x082a }, // 42 , 8, - { 0x03A6, 0x082c }, // 44 , 8, - { 0x03A7, 0x082e }, // 46 , 8, - { 0x03A8, 0x0830 }, // 48 , 8, - { 0x03A9, 0x0832 }, // 50 , 8, - { 0x03AA, 0x083c }, // 60 , 8, - { 0x03AB, 0x0842 }, // 66 , 8, - { 0x03AC, 0x0835 }, // 53 , 8, - { 0x03AD, 0x0837 }, // 55 , 8, - { 0x03AE, 0x0839 }, // 57 , 8, - { 0x03AF, 0x083b }, // 59 , 8, - { 0x03B1, 0x0801 }, // 1 , 8, - { 0x03B2, 0x0803 }, // 3 , 8, - { 0x03B3, 0x0807 }, // 7 , 8, - { 0x03B4, 0x0809 }, // 9 , 8, - { 0x03B5, 0x080b }, // 11 , 8, - { 0x03B6, 0x080d }, // 13 , 8, - { 0x03B7, 0x080f }, // 15 , 8, - { 0x03B8, 0x0811 }, // 17 , 8, - { 0x03B9, 0x0813 }, // 19 , 8, - { 0x03BA, 0x0815 }, // 21 , 8, - { 0x03BB, 0x0817 }, // 23 , 8, - { 0x03BC, 0x0819 }, // 25 , 8, - { 0x03BD, 0x081b }, // 27 , 8, - { 0x03BE, 0x081d }, // 29 , 8, - { 0x03BF, 0x081f }, // 31 , 8, - { 0x03C0, 0x0821 }, // 33 , 8, - { 0x03C1, 0x0823 }, // 35 , 8, - { 0x03C2, 0x0827 }, // 39 , 8, - { 0x03C3, 0x0825 }, // 37 , 8, - { 0x03C4, 0x0829 }, // 41 , 8, - { 0x03C5, 0x082b }, // 43 , 8, - { 0x03C6, 0x082d }, // 45 , 8, - { 0x03C7, 0x082f }, // 47 , 8, - { 0x03C8, 0x0831 }, // 49 , 8, - { 0x03C9, 0x0833 }, // 51 , 8, - { 0x03CA, 0x083d }, // 61 , 8, - { 0x03CB, 0x0843 }, // 67 , 8, - { 0x03CC, 0x083f }, // 63 , 8, - { 0x03CD, 0x0841 }, // 65 , 8, - { 0x03CE, 0x0845 }, // 69 , 8, - { 0x03D0, 0x0805 }, // 5 , 8, - { 0x03D1, 0x0847 }, // 71 , 8, - { 0x03D2, 0x084c }, // 76 , 8, - { 0x03D5, 0x084d }, // 77 , 8, - { 0x03D6, 0x0849 }, // 73 , 8, - { 0x03D7, 0x084f }, // 79 , 8, - { 0x03DA, 0x08d7 }, // 215, 8, - { 0x03DB, 0x084B }, // 75 , 8, - { 0x03DC, 0x08d8 }, // 216, 8, - { 0x03DE, 0x08d9 }, // 217, 8, - { 0x03E0, 0x08da }, // 218, 8, - { 0x03F0, 0x0848 }, // 72 , 8, - { 0x03F1, 0x084a }, // 74 , 8, - { 0x0401, 0x0a0c }, // 12 , 10, - { 0x0402, 0x0a4a }, // 74 , 10, - { 0x0403, 0x0a44 }, // 68 , 10, - { 0x0404, 0x0a4e }, // 78 , 10, - { 0x0405, 0x0a52 }, // 82 , 10, - { 0x0406, 0x0a58 }, // 88 , 10, - { 0x0407, 0x0a5a }, // 90 , 10, - { 0x0408, 0x0a5e }, // 94 , 10, - { 0x0409, 0x0a68 }, // 104, 10, - { 0x040A, 0x0a6c }, // 108, 10, - { 0x040B, 0x0a72 }, // 114, 10, - { 0x040C, 0x0a60 }, // 96 , 10, - { 0x040E, 0x0a74 }, // 116, 10, - { 0x040F, 0x0a86 }, // 134, 10, - { 0x0410, 0x0a00 }, // 0 , 10, - { 0x0411, 0x0a02 }, // 2 , 10, - { 0x0412, 0x0a04 }, // 4 , 10, - { 0x0413, 0x0a06 }, // 6 , 10, - { 0x0414, 0x0a08 }, // 8 , 10, - { 0x0415, 0x0a0a }, // 10 , 10, - { 0x0416, 0x0a0e }, // 14 , 10, - { 0x0417, 0x0a10 }, // 16 , 10, - { 0x0418, 0x0a12 }, // 18 , 10, - { 0x0419, 0x0a14 }, // 20 , 10, - { 0x041A, 0x0a16 }, // 22 , 10, - { 0x041B, 0x0a18 }, // 24 , 10, - { 0x041C, 0x0a1a }, // 26 , 10, - { 0x041D, 0x0a1c }, // 28 , 10, - { 0x041E, 0x0a1e }, // 30 , 10, - { 0x041F, 0x0a20 }, // 32 , 10, - { 0x0420, 0x0a22 }, // 34 , 10, - { 0x0421, 0x0a24 }, // 36 , 10, - { 0x0422, 0x0a26 }, // 38 , 10, - { 0x0423, 0x0a28 }, // 40 , 10, - { 0x0424, 0x0a2a }, // 42 , 10, - { 0x0425, 0x0a2c }, // 44 , 10, - { 0x0426, 0x0a2e }, // 46 , 10, - { 0x0427, 0x0a30 }, // 48 , 10, - { 0x0428, 0x0a32 }, // 50 , 10, - { 0x0429, 0x0a34 }, // 52 , 10, - { 0x042A, 0x0a36 }, // 54 , 10, - { 0x042B, 0x0a38 }, // 56 , 10, - { 0x042C, 0x0a3a }, // 58 , 10, - { 0x042D, 0x0a3c }, // 60 , 10, - { 0x042E, 0x0a3e }, // 62 , 10, - { 0x042F, 0x0a40 }, // 64 , 10, - { 0x0430, 0x0a01 }, // 1 , 10, - { 0x0431, 0x0a03 }, // 3 , 10, - { 0x0432, 0x0a05 }, // 5 , 10, - { 0x0433, 0x0a07 }, // 7 , 10, - { 0x0434, 0x0a09 }, // 9 , 10, - { 0x0435, 0x0a0b }, // 11 , 10, - { 0x0436, 0x0a0f }, // 15 , 10, - { 0x0437, 0x0a11 }, // 17 , 10, - { 0x0438, 0x0a13 }, // 19 , 10, - { 0x0439, 0x0a15 }, // 21 , 10, - { 0x043A, 0x0a17 }, // 23 , 10, - { 0x043B, 0x0a19 }, // 25 , 10, - { 0x043C, 0x0a1b }, // 27 , 10, - { 0x043D, 0x0a1d }, // 29 , 10, - { 0x043E, 0x0a1f }, // 31 , 10, - { 0x043F, 0x0a21 }, // 33 , 10, - { 0x0440, 0x0a23 }, // 35 , 10, - { 0x0441, 0x0a25 }, // 37 , 10, - { 0x0442, 0x0a27 }, // 39 , 10, - { 0x0443, 0x0a29 }, // 41 , 10, - { 0x0444, 0x0a2b }, // 43 , 10, - { 0x0445, 0x0a2d }, // 45 , 10, - { 0x0446, 0x0a2f }, // 47 , 10, - { 0x0447, 0x0a31 }, // 49 , 10, - { 0x0448, 0x0a33 }, // 51 , 10, - { 0x0449, 0x0a35 }, // 53 , 10, - { 0x044A, 0x0a37 }, // 55 , 10, - { 0x044B, 0x0a39 }, // 57 , 10, - { 0x044C, 0x0a3b }, // 59 , 10, - { 0x044D, 0x0a3d }, // 61 , 10, - { 0x044E, 0x0a3f }, // 63 , 10, - { 0x044F, 0x0a41 }, // 65 , 10, - { 0x0451, 0x0a0d }, // 13 , 10, - { 0x0452, 0x0a4b }, // 75 , 10, - { 0x0453, 0x0a45 }, // 69 , 10, - { 0x0454, 0x0a4f }, // 79 , 10, - { 0x0455, 0x0a53 }, // 83 , 10, - { 0x0456, 0x0a59 }, // 89 , 10, - { 0x0457, 0x0a5b }, // 91 , 10, - { 0x0458, 0x0a5f }, // 95 , 10, - { 0x0459, 0x0a69 }, // 105, 10, - { 0x045A, 0x0a6d }, // 109, 10, - { 0x045B, 0x0a73 }, // 115, 10, - { 0x045C, 0x0a61 }, // 97 , 10, - { 0x045E, 0x0a75 }, // 117, 10, - { 0x045F, 0x0a87 }, // 135, 10, - { 0x0460, 0x0a70 }, // 112, 10, - { 0x0461, 0x0a71 }, // 113, 10, - { 0x0462, 0x0a8e }, // 142, 10, - { 0x0463, 0x0a8f }, // 143, 10, - { 0x0466, 0x0a90 }, // 144, 10, - { 0x0467, 0x0a91 }, // 145, 10, - { 0x046A, 0x0a92 }, // 146, 10, - { 0x046B, 0x0a93 }, // 147, 10, - { 0x046E, 0x0a94 }, // 148, 10, - { 0x046F, 0x0a95 }, // 149, 10, - { 0x0470, 0x0a96 }, // 150, 10, - { 0x0471, 0x0a97 }, // 151, 10, - { 0x0472, 0x0a98 }, // 152, 10, - { 0x0473, 0x0a99 }, // 153, 10, - { 0x0474, 0x0a9a }, // 154, 10, - { 0x0475, 0x0a9b }, // 155, 10, - { 0x047A, 0x0a6e }, // 110, 10, - { 0x047B, 0x0a6f }, // 111, 10, - { 0x047E, 0x0a84 }, // 132, 10, - { 0x047F, 0x0a85 }, // 133, 10, - { 0x0490, 0x0a46 }, // 70 , 10, - { 0x0491, 0x0a47 }, // 71 , 10, - { 0x0492, 0x0a48 }, // 72 , 10, - { 0x0493, 0x0a49 }, // 73 , 10, - { 0x0496, 0x0a50 }, // 80 , 10, - { 0x0497, 0x0a51 }, // 81 , 10, - { 0x049A, 0x0a62 }, // 98 , 10, - { 0x049B, 0x0a63 }, // 99 , 10, - { 0x049C, 0x0a66 }, // 102, 10, - { 0x049D, 0x0a67 }, // 103, 10, - { 0x04A2, 0x0a6a }, // 106, 10, - { 0x04A3, 0x0a6b }, // 107, 10, - { 0x04AE, 0x0a78 }, // 120, 10, - { 0x04AF, 0x0a79 }, // 121, 10, - { 0x04B0, 0x0a7a }, // 122, 10, - { 0x04B1, 0x0a7b }, // 123, 10, - { 0x04B2, 0x0a7e }, // 126, 10, - { 0x04B3, 0x0a7f }, // 127, 10, - { 0x04B6, 0x0a88 }, // 136, 10, - { 0x04B7, 0x0a89 }, // 137, 10, - { 0x04B8, 0x0a8a }, // 138, 10, - { 0x04B9, 0x0a8b }, // 139, 10, - { 0x04BA, 0x0a82 }, // 130, 10, - { 0x04BB, 0x0a83 }, // 131, 10, - { 0x04D8, 0x0a42 }, // 66 , 10, - { 0x04D9, 0x0a43 }, // 67 , 10, - { 0x04EE, 0x0a76 }, // 118, 10, - { 0x04EF, 0x0a77 }, // 119, 10, - { 0x05B0, 0x0920 }, // 32 , 9, - { 0x05B1, 0x0921 }, // 33 , 9, - { 0x05B2, 0x0922 }, // 34 , 9, - { 0x05B3, 0x0923 }, // 35 , 9, - { 0x05B4, 0x0924 }, // 36 , 9, - { 0x05B5, 0x0925 }, // 37 , 9, - { 0x05B6, 0x0926 }, // 38 , 9, - { 0x05B7, 0x0927 }, // 39 , 9, - { 0x05B8, 0x0928 }, // 40 , 9, - { 0x05B9, 0x0929 }, // 41 , 9, - { 0x05BB, 0x092b }, // 43 , 9, - { 0x05BC, 0x092c }, // 44 , 9, - { 0x05BD, 0x092d }, // 45 , 9, - { 0x05BF, 0x092e }, // 46 , 9, - { 0x05C0, 0x091c }, // 28 , 9, - { 0x05C3, 0x091d }, // 29 , 9, - { 0x05D0, 0x0900 }, // 0 , 9, - { 0x05D1, 0x0901 }, // 1 , 9, - { 0x05D2, 0x0902 }, // 2 , 9, - { 0x05D3, 0x0903 }, // 3 , 9, - { 0x05D4, 0x0904 }, // 4 , 9, - { 0x05D5, 0x0905 }, // 5 , 9, - { 0x05D6, 0x0906 }, // 6 , 9, - { 0x05D7, 0x0907 }, // 7 , 9, - { 0x05D8, 0x0908 }, // 8 , 9, - { 0x05D9, 0x0909 }, // 9 , 9, - { 0x05DA, 0x090a }, // 10 , 9, - { 0x05DB, 0x090b }, // 11 , 9, - { 0x05DC, 0x090c }, // 12 , 9, - { 0x05DD, 0x090d }, // 13 , 9, - { 0x05DE, 0x090e }, // 14 , 9, - { 0x05DF, 0x090f }, // 15 , 9, - { 0x05E0, 0x0910 }, // 16 , 9, - { 0x05E1, 0x0911 }, // 17 , 9, - { 0x05E2, 0x0912 }, // 18 , 9, - { 0x05E3, 0x0913 }, // 19 , 9, - { 0x05E4, 0x0914 }, // 20 , 9, - { 0x05E5, 0x0915 }, // 21 , 9, - { 0x05E6, 0x0916 }, // 22 , 9, - { 0x05E7, 0x0917 }, // 23 , 9, - { 0x05E8, 0x0918 }, // 24 , 9, - { 0x05E9, 0x0919 }, // 25 , 9, - { 0x05EA, 0x091a }, // 26 , 9, - { 0x05F0, 0x0931 }, // 49 , 9, - { 0x05F1, 0x0932 }, // 50 , 9, - { 0x05F2, 0x0933 }, // 51 , 9, - { 0x05F3, 0x091e }, // 30 , 9, - { 0x05F4, 0x091f }, // 31 , 9, - { 0x060C, 0x0d26 }, // 38 , 13, - { 0x061B, 0x0d27 }, // 39 , 13, - { 0x061F, 0x0d28 }, // 40 , 13, - { 0x0621, 0x0da4 }, // 164, 13, - { 0x0622, 0x0db1 }, // 177, 13, - { 0x0623, 0x0da5 }, // 165, 13, - { 0x0624, 0x0da9 }, // 169, 13, - { 0x0625, 0x0da7 }, // 167, 13, - { 0x0626, 0x0dab }, // 171, 13, - { 0x0627, 0x0d3a }, // 58 , 13, - { 0x0628, 0x0d3c }, // 60 , 13, - { 0x0629, 0x0d98 }, // 152, 13, - { 0x062A, 0x0d40 }, // 64 , 13, - { 0x062B, 0x0d44 }, // 68 , 13, - { 0x062C, 0x0d48 }, // 72 , 13, - { 0x062D, 0x0d4c }, // 76 , 13, - { 0x062E, 0x0d50 }, // 80 , 13, - { 0x062F, 0x0d54 }, // 84 , 13, - { 0x0630, 0x0d56 }, // 86 , 13, - { 0x0631, 0x0d58 }, // 88 , 13, - { 0x0632, 0x0d5a }, // 90 , 13, - { 0x0633, 0x0d5c }, // 92 , 13, - { 0x0634, 0x0d60 }, // 96 , 13, - { 0x0635, 0x0d64 }, // 100, 13, - { 0x0636, 0x0d68 }, // 104, 13, - { 0x0637, 0x0d6c }, // 108, 13, - { 0x0638, 0x0d70 }, // 112, 13, - { 0x0639, 0x0d74 }, // 116, 13, - { 0x063A, 0x0d78 }, // 120, 13, - { 0x0640, 0x0dc2 }, // 194, 13, - { 0x0641, 0x0d7c }, // 124, 13, - { 0x0642, 0x0d80 }, // 128, 13, - { 0x0643, 0x0d84 }, // 132, 13, - { 0x0644, 0x0d88 }, // 136, 13, - { 0x0645, 0x0d8c }, // 140, 13, - { 0x0646, 0x0d90 }, // 144, 13, - { 0x0647, 0x0d94 }, // 148, 13, - { 0x0648, 0x0d9a }, // 154, 13, - { 0x0649, 0x0da0 }, // 160, 13, - { 0x064A, 0x0d9c }, // 156, 13, - { 0x064B, 0x0d10 }, // 16 , 13, - { 0x064C, 0x0d11 }, // 17 , 13, - { 0x064E, 0x0d0a }, // 10 , 13, - { 0x064F, 0x0d0c }, // 12 , 13, - { 0x0650, 0x0d0e }, // 14 , 13, - { 0x0651, 0x0d16 }, // 22 , 13, - { 0x0652, 0x0d14 }, // 20 , 13, - { 0x0660, 0x0d38 }, // 56 , 13, - { 0x0661, 0x0d2f }, // 47 , 13, - { 0x0662, 0x0d30 }, // 48 , 13, - { 0x0663, 0x0d31 }, // 49 , 13, - { 0x0664, 0x0d32 }, // 50 , 13, - { 0x0665, 0x0d33 }, // 51 , 13, - { 0x0666, 0x0d34 }, // 52 , 13, - { 0x0667, 0x0d35 }, // 53 , 13, - { 0x0668, 0x0d36 }, // 54 , 13, - { 0x0669, 0x0d37 }, // 55 , 13, - { 0x066A, 0x0d2a }, // 42 , 13, - { 0x0671, 0x0db3 }, // 179, 13, - { 0x0674, 0x0d24 }, // 36 , 13, - { 0x0679, 0x0e3c }, // 60 , 14, - { 0x067A, 0x0e4c }, // 76 , 14, - { 0x067B, 0x0e30 }, // 48 , 14, - { 0x067C, 0x0e40 }, // 64 , 14, - { 0x067D, 0x0e48 }, // 72 , 14, - { 0x067E, 0x0e38 }, // 56 , 14, - { 0x067F, 0x0e44 }, // 68 , 14, - { 0x0680, 0x0e34 }, // 52 , 14, - { 0x0681, 0x0e64 }, // 100, 14, - { 0x0683, 0x0e54 }, // 84 , 14, - { 0x0684, 0x0e50 }, // 80 , 14, - { 0x0685, 0x0e60 }, // 96 , 14, - { 0x0686, 0x0e58 }, // 88 , 14, - { 0x0687, 0x0e5c }, // 92 , 14, - { 0x0688, 0x0e68 }, // 104, 14, - { 0x0689, 0x0e6a }, // 106, 14, - { 0x068A, 0x0e70 }, // 112, 14, - { 0x068C, 0x0e6c }, // 108, 14, - { 0x068D, 0x0e72 }, // 114, 14, - { 0x068E, 0x0e6e }, // 110, 14, - { 0x0691, 0x0e76 }, // 118, 14, - { 0x0692, 0x0e7C }, // 124, 14, - { 0x0693, 0x0e74 }, // 116, 14, - { 0x0695, 0x0e7a }, // 122, 14, - { 0x0696, 0x0e80 }, // 128, 14, - { 0x0698, 0x0e7e }, // 126, 14, - { 0x0699, 0x0e78 }, // 120, 14, - { 0x069A, 0x0e84 }, // 132, 14, - { 0x06A0, 0x0e88 }, // 136, 14, - { 0x06A4, 0x0e8c }, // 140, 14, - { 0x06A6, 0x0e90 }, // 144, 14, - { 0x06A9, 0x0e94 }, // 148, 14, - { 0x06AA, 0x0e9c }, // 156, 14, - { 0x06AB, 0x0ea8 }, // 168, 14, - { 0x06AF, 0x0ea0 }, // 160, 14, - { 0x06B1, 0x0eac }, // 172, 14, - { 0x06B3, 0x0eb0 }, // 176, 14, - { 0x06B5, 0x0eb4 }, // 180, 14, - { 0x06BA, 0x0eba }, // 186, 14, - { 0x06BB, 0x0ec2 }, // 194, 14, - { 0x06BC, 0x0ebe }, // 190, 14, - { 0x06C0, 0x0eda }, // 218, 14, - { 0x06C6, 0x0ec6 }, // 198, 14, - { 0x06CA, 0x0ec8 }, // 200, 14, - { 0x06CE, 0x0ed0 }, // 208, 14, - { 0x06D1, 0x0ed6 }, // 214, 14, - { 0x06D2, 0x0ed4 }, // 212, 14, - { 0x06D6, 0x0d25 }, // 37 , 13, - { 0x06E4, 0x0d22 }, // 34 , 13, - { 0x06F4, 0x0e29 }, // 41 , 14, - { 0x06F5, 0x0e2b }, // 43 , 14, - { 0x06F6, 0x0e2c }, // 44 , 14, - { 0x06F7, 0x0e2e }, // 46 , 14, - { 0x06F8, 0x0e2f }, // 47 , 14, - { 0x10D0, 0x0ad2 }, // 210, 10, - { 0x10D1, 0x0ad3 }, // 211, 10, - { 0x10D2, 0x0ad4 }, // 212, 10, - { 0x10D3, 0x0ad5 }, // 213, 10, - { 0x10D4, 0x0ad6 }, // 214, 10, - { 0x10D5, 0x0ad7 }, // 215, 10, - { 0x10D6, 0x0ad8 }, // 216, 10, - { 0x10D7, 0x0ada }, // 218, 10, - { 0x10D8, 0x0adb }, // 219, 10, - { 0x10D9, 0x0adc }, // 220, 10, - { 0x10DA, 0x0add }, // 221, 10, - { 0x10DB, 0x0ade }, // 222, 10, - { 0x10DC, 0x0adf }, // 223, 10, - { 0x10DD, 0x0ae1 }, // 225, 10, - { 0x10DE, 0x0ae2 }, // 226, 10, - { 0x10DF, 0x0ae3 }, // 227, 10, - { 0x10E0, 0x0ae4 }, // 228, 10, - { 0x10E1, 0x0ae5 }, // 229, 10, - { 0x10E2, 0x0ae6 }, // 230, 10, - { 0x10E3, 0x0ae7 }, // 231, 10, - { 0x10E4, 0x0ae9 }, // 233, 10, - { 0x10E5, 0x0aea }, // 234, 10, - { 0x10E6, 0x0aeb }, // 235, 10, - { 0x10E7, 0x0aec }, // 236, 10, - { 0x10E8, 0x0aed }, // 237, 10, - { 0x10E9, 0x0aee }, // 238, 10, - { 0x10EA, 0x0aef }, // 239, 10, - { 0x10EB, 0x0af0 }, // 240, 10, - { 0x10EC, 0x0af1 }, // 241, 10, - { 0x10ED, 0x0af2 }, // 242, 10, - { 0x10EE, 0x0af3 }, // 243, 10, - { 0x10EF, 0x0af5 }, // 245, 10, - { 0x10F0, 0x0af6 }, // 246, 10, - { 0x10F1, 0x0ad9 }, // 217, 10, - { 0x10F2, 0x0ae0 }, // 224, 10, - { 0x10F3, 0x0ae8 }, // 232, 10, - { 0x10F4, 0x0af4 }, // 244, 10, - { 0x10F5, 0x0af7 }, // 247, 10, - { 0x10F6, 0x0af8 }, // 248, 10, - { 0x1F00, 0x0873 }, // 115, 8, - { 0x1F01, 0x087b }, // 123, 8, - { 0x1F02, 0x0875 }, // 117, 8, - { 0x1F03, 0x087d }, // 125, 8, - { 0x1F04, 0x0874 }, // 116, 8, - { 0x1F05, 0x087c }, // 124, 8, - { 0x1F10, 0x0884 }, // 132, 8, - { 0x1F11, 0x0887 }, // 135, 8, - { 0x1F12, 0x0886 }, // 134, 8, - { 0x1F13, 0x0889 }, // 137, 8, - { 0x1F14, 0x0885 }, // 133, 8, - { 0x1F15, 0x0888 }, // 136, 8, - { 0x1F20, 0x0890 }, // 144, 8, - { 0x1F21, 0x0898 }, // 152, 8, - { 0x1F22, 0x0892 }, // 146, 8, - { 0x1F23, 0x089a }, // 154, 8, - { 0x1F24, 0x0891 }, // 145, 8, - { 0x1F25, 0x0899 }, // 153, 8, - { 0x1F30, 0x08a4 }, // 164, 8, - { 0x1F31, 0x08a8 }, // 168, 8, - { 0x1F32, 0x08a6 }, // 166, 8, - { 0x1F33, 0x08aa }, // 170, 8, - { 0x1F34, 0x08a5 }, // 165, 8, - { 0x1F35, 0x08a9 }, // 169, 8, - { 0x1F40, 0x08ad }, // 173, 8, - { 0x1F41, 0x08b0 }, // 176, 8, - { 0x1F42, 0x08af }, // 175, 8, - { 0x1F43, 0x08b2 }, // 178, 8, - { 0x1F44, 0x08ae }, // 174, 8, - { 0x1F45, 0x08b1 }, // 177, 8, - { 0x1F50, 0x08b9 }, // 185, 8, - { 0x1F51, 0x08bd }, // 189, 8, - { 0x1F52, 0x08bb }, // 187, 8, - { 0x1F53, 0x08bf }, // 191, 8, - { 0x1F54, 0x08ba }, // 186, 8, - { 0x1F55, 0x08be }, // 190, 8, - { 0x1F60, 0x08c7 }, // 199, 8, - { 0x1F61, 0x08cf }, // 207, 8, - { 0x1F62, 0x08c9 }, // 201, 8, - { 0x1F63, 0x08d1 }, // 209, 8, - { 0x1F64, 0x08c8 }, // 200, 8, - { 0x1F65, 0x08d0 }, // 208, 8, - { 0x1F70, 0x086d }, // 109, 8, - { 0x1F72, 0x0883 }, // 131, 8, - { 0x1F74, 0x088a }, // 138, 8, - { 0x1F76, 0x08a0 }, // 160, 8, - { 0x1F78, 0x08ac }, // 172, 8, - { 0x1F7A, 0x08b5 }, // 181, 8, - { 0x1F7C, 0x08c1 }, // 193, 8, - { 0x1F80, 0x0877 }, // 119, 8, - { 0x1F81, 0x087f }, // 127, 8, - { 0x1F82, 0x0879 }, // 121, 8, - { 0x1F83, 0x0881 }, // 129, 8, - { 0x1F84, 0x0878 }, // 120, 8, - { 0x1F85, 0x0880 }, // 128, 8, - { 0x1F90, 0x0894 }, // 148, 8, - { 0x1F91, 0x089c }, // 156, 8, - { 0x1F92, 0x0896 }, // 150, 8, - { 0x1F93, 0x089e }, // 158, 8, - { 0x1F94, 0x0895 }, // 149, 8, - { 0x1F95, 0x089d }, // 157, 8, - { 0x1FA0, 0x08cb }, // 203, 8, - { 0x1FA1, 0x08d3 }, // 211, 8, - { 0x1FA2, 0x08cd }, // 205, 8, - { 0x1FA3, 0x08d5 }, // 213, 8, - { 0x1FA4, 0x08cc }, // 204, 8, - { 0x1FA5, 0x08d4 }, // 212, 8, - { 0x1FB2, 0x0871 }, // 113, 8, - { 0x1FB3, 0x086f }, // 111, 8, - { 0x1FB4, 0x0870 }, // 112, 8, - { 0x1FC2, 0x088e }, // 142, 8, - { 0x1FC3, 0x088c }, // 140, 8, - { 0x1FC4, 0x088d }, // 141, 8, - { 0x1FCD, 0x085e }, // 94 , 8, - { 0x1FCE, 0x085c }, // 92 , 8, - { 0x1FDD, 0x085f }, // 95 , 8, - { 0x1FDE, 0x085d }, // 93 , 8, - { 0x1FE4, 0x08B4 }, // 180, 8, - { 0x1FE5, 0x08B3 }, // 179, 8, - { 0x1FF2, 0x08c5 }, // 197, 8, - { 0x1FF3, 0x08c3 }, // 195, 8, - { 0x1FF4, 0x08c4 }, // 196, 8, - { 0x2007, 0x0517 }, // 23 , 5, - { 0x2012, 0x0432 }, // 50 , 4, - { 0x2013, 0x0421 }, // 33 , 4, - { 0x2014, 0x0422 }, // 34 , 4, - { 0x2017, 0x022f }, // 47 , 2, - { 0x2018, 0x041d }, // 29 , 4, - { 0x2019, 0x041c }, // 28 , 4, - { 0x201A, 0x043e }, // 62 , 4, - { 0x201B, 0x041b }, // 27 , 4, - { 0x201C, 0x0420 }, // 32 , 4, - { 0x201D, 0x041f }, // 31 , 4, - { 0x201E, 0x043f }, // 63 , 4, - { 0x201F, 0x041e }, // 30 , 4, - { 0x2020, 0x0427 }, // 39 , 4, - { 0x2021, 0x0428 }, // 40 , 4, - { 0x2022, 0x0403 }, // 3 , 4, - { 0x2026, 0x0438 }, // 56 , 4, - { 0x2030, 0x044b }, // 75 , 4, - { 0x2033, 0x0580 }, // 128, 5, - { 0x2034, 0x0671 }, // 113, 6, - { 0x2036, 0x057f }, // 127, 5, - { 0x2039, 0x0423 }, // 35 , 4, - { 0x203A, 0x0424 }, // 36 , 4, - { 0x203C, 0x050d }, // 13 , 5, - { 0x203E, 0x0626 }, // 38 , 6, - { 0x207F, 0x0415 }, // 21 , 4, - { 0x20A0, 0x043c }, // 60 , 4, - { 0x20A2, 0x043b }, // 59 , 4, - { 0x20A3, 0x043a }, // 58 , 4, - { 0x20A4, 0x043d }, // 61 , 4, - { 0x20A6, 0x0457 }, // 87 , 4, - { 0x20A7, 0x040d }, // 13 , 4, - { 0x20A8, 0x0458 }, // 88 , 4, - { 0x20A9, 0x0456 }, // 86 , 4, - { 0x20AA, 0x097A }, // 122, 9, - { 0x20AC, 0x0466 }, // 102, 4, - { 0x20DD, 0x066d }, // 109, 6, - { 0x20E1, 0x06e1 }, // 225, 6, - { 0x2102, 0x06d5 }, // 213, 6, - { 0x2104, 0x0515 }, // 21 , 5, - { 0x2105, 0x0449 }, // 73 , 4, - { 0x2106, 0x044a }, // 74 , 4, - { 0x210C, 0x06e9 }, // 233, 6, - { 0x210F, 0x0632 }, // 50 , 6, - { 0x2111, 0x0633 }, // 51 , 6, - { 0x2112, 0x0669 }, // 105, 6, - { 0x2113, 0x0631 }, // 49 , 6, - { 0x2115, 0x06d7 }, // 215, 6, - { 0x2116, 0x044c }, // 76 , 4, - { 0x2118, 0x0635 }, // 53 , 6, - { 0x211C, 0x0634 }, // 52 , 6, - { 0x211D, 0x06d8 }, // 216, 6, - { 0x211E, 0x042b }, // 43 , 4, - { 0x2120, 0x042a }, // 42 , 4, - { 0x2122, 0x0429 }, // 41 , 4, - { 0x2127, 0x06a7 }, // 167, 6, - { 0x2128, 0x066b }, // 107, 6, - { 0x212B, 0x0623 }, // 35 , 6, - { 0x212D, 0x066a }, // 106, 6, - { 0x212F, 0x0630 }, // 48 , 6, - { 0x2130, 0x06d3 }, // 211, 6, - { 0x2131, 0x06d4 }, // 212, 6, - { 0x2153, 0x0440 }, // 64 , 4, - { 0x2154, 0x0441 }, // 65 , 4, - { 0x215B, 0x0442 }, // 66 , 4, - { 0x215C, 0x0443 }, // 67 , 4, - { 0x215D, 0x0444 }, // 68 , 4, - { 0x215E, 0x0445 }, // 69 , 4, - { 0x2190, 0x0590 }, // 144, 5, - { 0x2191, 0x0617 }, // 23 , 6, - { 0x2192, 0x05d5 }, // 213, 5, - { 0x2193, 0x0618 }, // 24 , 6, - { 0x2194, 0x05d6 }, // 214, 5, - { 0x2195, 0x05d7 }, // 215, 5, - { 0x2196, 0x0640 }, // 64 , 6, - { 0x2197, 0x063e }, // 62 , 6, - { 0x2198, 0x063f }, // 63 , 6, - { 0x2199, 0x0641 }, // 65 , 6, - { 0x219D, 0x0690 }, // 144, 6, - { 0x21A3, 0x0693 }, // 147, 6, - { 0x21A8, 0x050f }, // 15 , 5, - { 0x21A9, 0x0691 }, // 145, 6, - { 0x21AA, 0x0692 }, // 146, 6, - { 0x21B5, 0x0514 }, // 20 , 5, - { 0x21BC, 0x0694 }, // 148, 6, - { 0x21BD, 0x0695 }, // 149, 6, - { 0x21BE, 0x069b }, // 155, 6, - { 0x21BF, 0x069a }, // 154, 6, - { 0x21C0, 0x0696 }, // 150, 6, - { 0x21C1, 0x0697 }, // 151, 6, - { 0x21C2, 0x069d }, // 157, 6, - { 0x21C3, 0x069c }, // 156, 6, - { 0x21C4, 0x0636 }, // 54 , 6, - { 0x21C6, 0x0637 }, // 55 , 6, - { 0x21C7, 0x069f }, // 159, 6, - { 0x21C9, 0x069e }, // 158, 6, - { 0x21CB, 0x0699 }, // 153, 6, - { 0x21CC, 0x0698 }, // 152, 6, - { 0x21D0, 0x0639 }, // 57 , 6, - { 0x21D1, 0x063a }, // 58 , 6, - { 0x21D2, 0x0638 }, // 56 , 6, - { 0x21D3, 0x063b }, // 59 , 6, - { 0x21D4, 0x063c }, // 60 , 6, - { 0x21D5, 0x063d }, // 61 , 6, - { 0x21E6, 0x0597 }, // 151, 5, - { 0x21E8, 0x0596 }, // 150, 5, - { 0x2200, 0x067a }, // 122, 6, - { 0x2202, 0x062c }, // 44 , 6, - { 0x2203, 0x0679 }, // 121, 6, - { 0x2204, 0x06d0 }, // 208, 6, - { 0x2205, 0x0648 }, // 72 , 6, - { 0x2207, 0x062b }, // 43 , 6, - { 0x2208, 0x060f }, // 15 , 6, - { 0x2209, 0x06d1 }, // 209, 6, - { 0x220B, 0x06db }, // 219, 6, - { 0x220D, 0x0647 }, // 71 , 6, - { 0x220F, 0x0629 }, // 41 , 6, - { 0x2210, 0x0672 }, // 114, 6, - { 0x2211, 0x0612 }, // 18 , 6, - { 0x2212, 0x0600 }, // 0 , 6, - { 0x2213, 0x062a }, // 42 , 6, - { 0x2214, 0x06ae }, // 174, 6, - { 0x2215, 0x0606 }, // 6 , 6, - { 0x2216, 0x0607 }, // 7 , 6, - { 0x2218, 0x0621 }, // 33 , 6, - { 0x2219, 0x0622 }, // 34 , 6, - { 0x221A, 0x0704 }, // 4 , 7, - { 0x221D, 0x0604 }, // 4 , 6, - { 0x221E, 0x0613 }, // 19 , 6, - { 0x221F, 0x06da }, // 218, 6, - { 0x2220, 0x064f }, // 79 , 6, - { 0x2221, 0x06a8 }, // 168, 6, - { 0x2222, 0x06a9 }, // 169, 6, - { 0x2223, 0x0609 }, // 9 , 6, - { 0x2224, 0x06ce }, // 206, 6, - { 0x2225, 0x0611 }, // 17 , 6, - { 0x2226, 0x06cd }, // 205, 6, - { 0x2227, 0x0655 }, // 85 , 6, - { 0x2228, 0x0656 }, // 86 , 6, - { 0x2229, 0x0610 }, // 16 , 6, - { 0x222A, 0x0642 }, // 66 , 6, - { 0x222B, 0x0628 }, // 40 , 6, - { 0x222E, 0x0668 }, // 104, 6, - { 0x2234, 0x0666 }, // 102, 6, - { 0x2235, 0x0665 }, // 101, 6, - { 0x2237, 0x0667 }, // 103, 6, - { 0x223C, 0x060c }, // 12 , 6, - { 0x2241, 0x06bd }, // 189, 6, - { 0x2243, 0x0673 }, // 115, 6, - { 0x2244, 0x06be }, // 190, 6, - { 0x2245, 0x0674 }, // 116, 6, - { 0x2247, 0x06bf }, // 191, 6, - { 0x2248, 0x060d }, // 13 , 6, - { 0x2249, 0x06c0 }, // 192, 6, - { 0x224D, 0x06b3 }, // 179, 6, - { 0x224E, 0x06b2 }, // 178, 6, - { 0x2250, 0x06af }, // 175, 6, - { 0x2252, 0x06b0 }, // 176, 6, - { 0x2253, 0x06b1 }, // 177, 6, - { 0x225F, 0x06d9 }, // 217, 6, - { 0x2260, 0x0663 }, // 99 , 6, - { 0x2261, 0x060e }, // 14 , 6, - { 0x2262, 0x0664 }, // 100, 6, - { 0x2264, 0x0602 }, // 2 , 6, - { 0x2265, 0x0603 }, // 3 , 6, - { 0x226A, 0x064d }, // 77 , 6, - { 0x226B, 0x064e }, // 78 , 6, - { 0x226C, 0x06b6 }, // 182, 6, - { 0x226D, 0x06cf }, // 207, 6, - { 0x226E, 0x06b9 }, // 185, 6, - { 0x226F, 0x06bb }, // 187, 6, - { 0x2270, 0x06ba }, // 186, 6, - { 0x2271, 0x06bc }, // 188, 6, - { 0x2272, 0x06eb }, // 235, 6, - { 0x2273, 0x06ec }, // 236, 6, - { 0x227A, 0x0675 }, // 117, 6, - { 0x227B, 0x0677 }, // 119, 6, - { 0x227C, 0x0676 }, // 118, 6, - { 0x227D, 0x0678 }, // 120, 6, - { 0x2280, 0x06c1 }, // 193, 6, - { 0x2281, 0x06c3 }, // 195, 6, - { 0x2282, 0x0643 }, // 67 , 6, - { 0x2283, 0x0644 }, // 68 , 6, - { 0x2284, 0x06c5 }, // 197, 6, - { 0x2285, 0x06c6 }, // 198, 6, - { 0x2286, 0x0645 }, // 69 , 6, - { 0x2287, 0x0646 }, // 70 , 6, - { 0x2288, 0x06c7 }, // 199, 6, - { 0x2289, 0x06c8 }, // 200, 6, - { 0x228A, 0x067e }, // 126, 6, - { 0x228B, 0x067f }, // 127, 6, - { 0x228E, 0x067d }, // 125, 6, - { 0x228F, 0x0682 }, // 130, 6, - { 0x2290, 0x0685 }, // 133, 6, - { 0x2291, 0x0683 }, // 131, 6, - { 0x2292, 0x0686 }, // 134, 6, - { 0x2293, 0x0680 }, // 128, 6, - { 0x2294, 0x0681 }, // 129, 6, - { 0x2295, 0x0651 }, // 81 , 6, - { 0x2296, 0x0652 }, // 82 , 6, - { 0x2297, 0x0650 }, // 80 , 6, - { 0x2299, 0x0654 }, // 84 , 6, - { 0x229A, 0x06a4 }, // 164, 6, - { 0x229B, 0x06a5 }, // 165, 6, - { 0x229D, 0x06a6 }, // 166, 6, - { 0x22A2, 0x065b }, // 91 , 6, - { 0x22A3, 0x065c }, // 92 , 6, - { 0x22A4, 0x0658 }, // 88 , 6, - { 0x22A5, 0x0659 }, // 89 , 6, - { 0x22A8, 0x06b4 }, // 180, 6, - { 0x22BB, 0x0657 }, // 87 , 6, - { 0x22C5, 0x061f }, // 31 , 6, - { 0x22C6, 0x0670 }, // 112, 6, - { 0x22C8, 0x068c }, // 140, 6, - { 0x22D0, 0x06a2 }, // 162, 6, - { 0x22D1, 0x06a3 }, // 163, 6, - { 0x22D2, 0x06a1 }, // 161, 6, - { 0x22D3, 0x06a0 }, // 160, 6, - { 0x22D8, 0x067b }, // 123, 6, - { 0x22D9, 0x067c }, // 124, 6, - { 0x22E0, 0x06c2 }, // 194, 6, - { 0x22E1, 0x06c4 }, // 196, 6, - { 0x22E2, 0x06cb }, // 203, 6, - { 0x22E3, 0x06cc }, // 204, 6, - { 0x22E4, 0x0684 }, // 132, 6, - { 0x22E5, 0x0687 }, // 135, 6, - { 0x22EE, 0x06de }, // 222, 6, - { 0x22EF, 0x06dc }, // 220, 6, - { 0x22F1, 0x06df }, // 223, 6, - { 0x2302, 0x050c }, // 12 , 5, - { 0x2308, 0x0649 }, // 73 , 6, - { 0x2309, 0x064a }, // 74 , 6, - { 0x230A, 0x064b }, // 75 , 6, - { 0x230B, 0x064c }, // 76 , 6, - { 0x2310, 0x0510 }, // 16 , 5, - { 0x2312, 0x065a }, // 90 , 6, - { 0x2319, 0x0511 }, // 17 , 5, - { 0x231A, 0x051f }, // 31 , 5, - { 0x231B, 0x0520 }, // 32 , 5, - { 0x2320, 0x0700 }, // 0 , 7, - { 0x2321, 0x0701 }, // 1 , 7, - { 0x2322, 0x068e }, // 142, 6, - { 0x2323, 0x068d }, // 141, 6, - { 0x2329, 0x060a }, // 10 , 6, - { 0x232A, 0x060b }, // 11 , 6, - { 0x2409, 0x044f }, // 79 , 4, - { 0x240A, 0x0452 }, // 82 , 4, - { 0x240B, 0x0454 }, // 84 , 4, - { 0x240C, 0x0450 }, // 80 , 4, - { 0x240D, 0x0451 }, // 81 , 4, - { 0x2424, 0x0453 }, // 83 , 4, - { 0x24C2, 0x0446 }, // 70 , 4, - { 0x24C5, 0x0447 }, // 71 , 4, - { 0x24CA, 0x0448 }, // 72 , 4, - { 0x2500, 0x0308 }, // 8 , 3, - { 0x2502, 0x0309 }, // 9 , 3, - { 0x250C, 0x030a }, // 10 , 3, - { 0x2510, 0x030b }, // 11 , 3, - { 0x2514, 0x030d }, // 13 , 3, - { 0x2518, 0x030c }, // 12 , 3, - { 0x251C, 0x030e }, // 14 , 3, - { 0x251E, 0x033e }, // 62 , 3, - { 0x251F, 0x033c }, // 60 , 3, - { 0x2521, 0x033f }, // 63 , 3, - { 0x2522, 0x033d }, // 61 , 3, - { 0x2524, 0x0310 }, // 16 , 3, - { 0x2526, 0x0345 }, // 69 , 3, - { 0x2527, 0x0344 }, // 68 , 3, - { 0x2529, 0x0347 }, // 71 , 3, - { 0x252A, 0x0346 }, // 70 , 3, - { 0x252C, 0x030f }, // 15 , 3, - { 0x252D, 0x0342 }, // 66 , 3, - { 0x252E, 0x0340 }, // 64 , 3, - { 0x2531, 0x0343 }, // 67 , 3, - { 0x2532, 0x0341 }, // 65 , 3, - { 0x2534, 0x0311 }, // 17 , 3, - { 0x2535, 0x034a }, // 74 , 3, - { 0x2536, 0x0348 }, // 72 , 3, - { 0x2539, 0x034b }, // 75 , 3, - { 0x253A, 0x0349 }, // 73 , 3, - { 0x253C, 0x0312 }, // 18 , 3, - { 0x253D, 0x0352 }, // 82 , 3, - { 0x253E, 0x034e }, // 78 , 3, - { 0x2540, 0x034f }, // 79 , 3, - { 0x2541, 0x034c }, // 76 , 3, - { 0x2543, 0x0355 }, // 85 , 3, - { 0x2544, 0x0350 }, // 80 , 3, - { 0x2545, 0x0353 }, // 83 , 3, - { 0x2546, 0x034d }, // 77 , 3, - { 0x2547, 0x0357 }, // 87 , 3, - { 0x2548, 0x0354 }, // 84 , 3, - { 0x2549, 0x0356 }, // 86 , 3, - { 0x254A, 0x0351 }, // 81 , 3, - { 0x2550, 0x0313 }, // 19 , 3, - { 0x2551, 0x0314 }, // 20 , 3, - { 0x2552, 0x031e }, // 30 , 3, - { 0x2553, 0x0322 }, // 34 , 3, - { 0x2554, 0x0315 }, // 21 , 3, - { 0x2555, 0x031f }, // 31 , 3, - { 0x2556, 0x0323 }, // 35 , 3, - { 0x2557, 0x0316 }, // 22 , 3, - { 0x2558, 0x0321 }, // 33 , 3, - { 0x2559, 0x0325 }, // 37 , 3, - { 0x255A, 0x0318 }, // 24 , 3, - { 0x255B, 0x0320 }, // 32 , 3, - { 0x255C, 0x0324 }, // 36 , 3, - { 0x255D, 0x0317 }, // 23 , 3, - { 0x255E, 0x0326 }, // 38 , 3, - { 0x255F, 0x032a }, // 42 , 3, - { 0x2560, 0x0319 }, // 25 , 3, - { 0x2561, 0x0328 }, // 40 , 3, - { 0x2562, 0x032c }, // 44 , 3, - { 0x2563, 0x031b }, // 27 , 3, - { 0x2564, 0x032b }, // 43 , 3, - { 0x2565, 0x0327 }, // 39 , 3, - { 0x2566, 0x031a }, // 26 , 3, - { 0x2567, 0x032d }, // 45 , 3, - { 0x2568, 0x0329 }, // 41 , 3, - { 0x2569, 0x031c }, // 28 , 3, - { 0x256A, 0x032f }, // 47 , 3, - { 0x256B, 0x032e }, // 46 , 3, - { 0x256C, 0x031d }, // 29 , 3, - { 0x2574, 0x0330 }, // 48 , 3, - { 0x2575, 0x0331 }, // 49 , 3, - { 0x2576, 0x0332 }, // 50 , 3, - { 0x2577, 0x0333 }, // 51 , 3, - { 0x2578, 0x0334 }, // 52 , 3, - { 0x2579, 0x0335 }, // 53 , 3, - { 0x257A, 0x0336 }, // 54 , 3, - { 0x257B, 0x0337 }, // 55 , 3, - { 0x257C, 0x0338 }, // 56 , 3, - { 0x257D, 0x033a }, // 58 , 3, - { 0x257E, 0x0339 }, // 57 , 3, - { 0x257F, 0x033b }, // 59 , 3, - { 0x2580, 0x0305 }, // 5 , 3, - { 0x2584, 0x0307 }, // 7 , 3, - { 0x2588, 0x0303 }, // 3 , 3, - { 0x258C, 0x0304 }, // 4 , 3, - { 0x2590, 0x0306 }, // 6 , 3, - { 0x2591, 0x0300 }, // 0 , 3, - { 0x2592, 0x0301 }, // 1 , 3, - { 0x2593, 0x0302 }, // 2 , 3, - { 0x25A0, 0x0402 }, // 2 , 4, - { 0x25A1, 0x0426 }, // 38 , 4, - { 0x25AA, 0x042f }, // 47 , 4, - { 0x25AB, 0x0431 }, // 49 , 4, - { 0x25AC, 0x050b }, // 11 , 5, - { 0x25B2, 0x0573 }, // 115, 5, - { 0x25B3, 0x0688 }, // 136, 6, - { 0x25B4, 0x061d }, // 29 , 6, - { 0x25B5, 0x06ac }, // 172, 6, - { 0x25B8, 0x061b }, // 27 , 6, - { 0x25B9, 0x068b }, // 139, 6, - { 0x25BC, 0x0574 }, // 116, 5, - { 0x25BD, 0x0689 }, // 137, 6, - { 0x25BE, 0x061e }, // 30 , 6, - { 0x25BF, 0x06ad }, // 173, 6, - { 0x25C2, 0x061c }, // 28 , 6, - { 0x25C3, 0x068a }, // 138, 6, - { 0x25C6, 0x0575 }, // 117, 5, - { 0x25C7, 0x066f }, // 111, 6, - { 0x25CA, 0x065f }, // 95 , 6, - { 0x25CB, 0x0401 }, // 1 , 4, - { 0x25CF, 0x0400 }, // 0 , 4, - { 0x25D6, 0x059e }, // 158, 5, - { 0x25D7, 0x0577 }, // 119, 5, - { 0x25D8, 0x0512 }, // 18 , 5, - { 0x25D9, 0x0513 }, // 19 , 5, - { 0x25E6, 0x042d }, // 45 , 4, - { 0x2605, 0x0548 }, // 72, 5, - { 0x260E, 0x051e }, // 30 , 5, - { 0x2610, 0x0518 }, // 24 , 5, - { 0x2612, 0x0519 }, // 25 , 5, - { 0x261B, 0x052a }, // 42 , 5, - { 0x261C, 0x0516 }, // 22 , 5, - { 0x261E, 0x052b }, // 43 , 5, - { 0x2639, 0x051a }, // 26 , 5, - { 0x263A, 0x0507 }, // 7 , 5, - { 0x263B, 0x0508 }, // 8 , 5, - { 0x263C, 0x0506 }, // 6 , 5, - { 0x2640, 0x0505 }, // 5 , 5, - { 0x2642, 0x0504 }, // 4 , 5, - { 0x2660, 0x05ab }, // 171, 5, - { 0x2661, 0x0500 }, // 0 , 5, - { 0x2662, 0x0501 }, // 1 , 5, - { 0x2663, 0x05a8 }, // 168, 5, - { 0x2664, 0x0503 }, // 3 , 5, - { 0x2665, 0x05aa }, // 170, 5, - { 0x2666, 0x05a9 }, // 169, 5, - { 0x2667, 0x0502 }, // 2 , 5, - { 0x266A, 0x0509 }, // 9 , 5, - { 0x266C, 0x050a }, // 10 , 5, - { 0x266D, 0x051c }, // 28 , 5, - { 0x266E, 0x051d }, // 29 , 5, - { 0x266F, 0x051b }, // 27 , 5, - { 0x2701, 0x0521 }, // 33 , 5, - { 0x2702, 0x0522 }, // 34 , 5, - { 0x2703, 0x0523 }, // 35 , 5, - { 0x2704, 0x0524 }, // 36 , 5, - { 0x2706, 0x0526 }, // 38 , 5, - { 0x2707, 0x0527 }, // 39 , 5, - { 0x2708, 0x0528 }, // 40 , 5, - { 0x2709, 0x0529 }, // 41 , 5, - { 0x270C, 0x052c }, // 44 , 5, - { 0x270D, 0x052d }, // 45 , 5, - { 0x270E, 0x052e }, // 46 , 5, - { 0x270F, 0x052f }, // 47 , 5, - { 0x2710, 0x0530 }, // 48 , 5, - { 0x2711, 0x0531 }, // 49 , 5, - { 0x2712, 0x0532 }, // 50 , 5, - { 0x2713, 0x0533 }, // 51 , 5, - { 0x2714, 0x0534 }, // 52 , 5, - { 0x2715, 0x0535 }, // 53 , 5, - { 0x2716, 0x0536 }, // 54 , 5, - { 0x2717, 0x0537 }, // 55 , 5, - { 0x2718, 0x0538 }, // 56 , 5, - { 0x2719, 0x0539 }, // 57 , 5, - { 0x271A, 0x053a }, // 58 , 5, - { 0x271B, 0x053b }, // 59 , 5, - { 0x271C, 0x053c }, // 60 , 5, - { 0x271D, 0x053d }, // 61 , 5, - { 0x271E, 0x053e }, // 62 , 5, - { 0x271F, 0x053f }, // 63 , 5, - { 0x2720, 0x0540 }, // 64 , 5, - { 0x2721, 0x0541 }, // 65 , 5, - { 0x2722, 0x0542 }, // 66 , 5, - { 0x2723, 0x0543 }, // 67 , 5, - { 0x2724, 0x0544 }, // 68 , 5, - { 0x2725, 0x0545 }, // 69 , 5, - { 0x2726, 0x0546 }, // 70 , 5, - { 0x2727, 0x0547 }, // 71 , 5, - { 0x2729, 0x0549 }, // 73 , 5, - { 0x272A, 0x054a }, // 74 , 5, - { 0x272B, 0x054b }, // 75 , 5, - { 0x272C, 0x054c }, // 76 , 5, - { 0x272D, 0x054d }, // 77 , 5, - { 0x272E, 0x054e }, // 78 , 5, - { 0x272F, 0x054f }, // 79 , 5, - { 0x2730, 0x0550 }, // 80 , 5, - { 0x2731, 0x0551 }, // 81 , 5, - { 0x2732, 0x0552 }, // 82 , 5, - { 0x2733, 0x0553 }, // 83 , 5, - { 0x2734, 0x0554 }, // 84 , 5, - { 0x2735, 0x0555 }, // 85 , 5, - { 0x2736, 0x0556 }, // 86 , 5, - { 0x2737, 0x0557 }, // 87 , 5, - { 0x2738, 0x0558 }, // 88 , 5, - { 0x2739, 0x0559 }, // 89 , 5, - { 0x273A, 0x055a }, // 90 , 5, - { 0x273B, 0x055b }, // 91 , 5, - { 0x273C, 0x055c }, // 92 , 5, - { 0x273D, 0x055d }, // 93 , 5, - { 0x273E, 0x055e }, // 94 , 5, - { 0x273F, 0x055f }, // 95 , 5, - { 0x2740, 0x0560 }, // 96 , 5, - { 0x2741, 0x0561 }, // 97 , 5, - { 0x2742, 0x0562 }, // 98 , 5, - { 0x2743, 0x0563 }, // 99 , 5, - { 0x2744, 0x0564 }, // 100, 5, - { 0x2745, 0x0565 }, // 101, 5, - { 0x2746, 0x0566 }, // 102, 5, - { 0x2747, 0x0567 }, // 103, 5, - { 0x2748, 0x0568 }, // 104, 5, - { 0x2749, 0x0569 }, // 105, 5, - { 0x274A, 0x056a }, // 106, 5, - { 0x274B, 0x056b }, // 107, 5, - { 0x274D, 0x056d }, // 109, 5, - { 0x274F, 0x056f }, // 111, 5, - { 0x2750, 0x0570 }, // 112, 5, - { 0x2751, 0x0571 }, // 113, 5, - { 0x2752, 0x0572 }, // 114, 5, - { 0x2756, 0x0576 }, // 118, 5, - { 0x2758, 0x0578 }, // 120, 5, - { 0x2759, 0x0579 }, // 121, 5, - { 0x275A, 0x057a }, // 122, 5, - { 0x275B, 0x057b }, // 123, 5, - { 0x275C, 0x057c }, // 124, 5, - { 0x275D, 0x057d }, // 125, 5, - { 0x275E, 0x057e }, // 126, 5, - { 0x2761, 0x05a1 }, // 161, 5, - { 0x2762, 0x05a2 }, // 162, 5, - { 0x2763, 0x05a3 }, // 163, 5, - { 0x2764, 0x05a4 }, // 164, 5, - { 0x2765, 0x05a5 }, // 165, 5, - { 0x2766, 0x05a6 }, // 166, 5, - { 0x2767, 0x05a7 }, // 167, 5, - { 0x2776, 0x05b6 }, // 182, 5, - { 0x2777, 0x05b7 }, // 183, 5, - { 0x2778, 0x05b8 }, // 184, 5, - { 0x2779, 0x05b9 }, // 185, 5, - { 0x277A, 0x05ba }, // 186, 5, - { 0x277B, 0x05bb }, // 187, 5, - { 0x277C, 0x05bc }, // 188, 5, - { 0x277D, 0x05bd }, // 189, 5, - { 0x277E, 0x05be }, // 190, 5, - { 0x277F, 0x05bf }, // 191, 5, - { 0x2780, 0x05c0 }, // 192, 5, - { 0x2781, 0x05c1 }, // 193, 5, - { 0x2782, 0x05c2 }, // 194, 5, - { 0x2783, 0x05c3 }, // 195, 5, - { 0x2784, 0x05c4 }, // 196, 5, - { 0x2785, 0x05c5 }, // 197, 5, - { 0x2786, 0x05c6 }, // 198, 5, - { 0x2787, 0x05c7 }, // 199, 5, - { 0x2788, 0x05c8 }, // 200, 5, - { 0x2789, 0x05c9 }, // 201, 5, - { 0x278A, 0x05ca }, // 202, 5, - { 0x278B, 0x05cb }, // 203, 5, - { 0x278C, 0x05cc }, // 204, 5, - { 0x278D, 0x05cd }, // 205, 5, - { 0x278E, 0x05ce }, // 206, 5, - { 0x278F, 0x05cf }, // 207, 5, - { 0x2790, 0x05d0 }, // 208, 5, - { 0x2791, 0x05d1 }, // 209, 5, - { 0x2792, 0x05d2 }, // 210, 5, - { 0x2793, 0x05d3 }, // 211, 5, - { 0x2794, 0x05d4 }, // 212, 5, - { 0x2798, 0x05d8 }, // 216, 5, - { 0x2799, 0x05d9 }, // 217, 5, - { 0x279A, 0x05da }, // 218, 5, - { 0x279B, 0x05db }, // 219, 5, - { 0x279C, 0x05dc }, // 220, 5, - { 0x279D, 0x05dd }, // 221, 5, - { 0x279E, 0x05de }, // 222, 5, - { 0x279F, 0x05df }, // 223, 5, - { 0x27A0, 0x05e0 }, // 224, 5, - { 0x27A1, 0x05e1 }, // 225, 5, - { 0x27A2, 0x05e2 }, // 226, 5, - { 0x27A3, 0x05e3 }, // 227, 5, - { 0x27A4, 0x05e4 }, // 228, 5, - { 0x27A5, 0x05e5 }, // 229, 5, - { 0x27A6, 0x05e6 }, // 230, 5, - { 0x27A7, 0x05e7 }, // 231, 5, - { 0x27A8, 0x05e8 }, // 232, 5, - { 0x27A9, 0x05e9 }, // 233, 5, - { 0x27AA, 0x05ea }, // 234, 5, - { 0x27AB, 0x05eb }, // 235, 5, - { 0x27AC, 0x05ec }, // 236, 5, - { 0x27AD, 0x05ed }, // 237, 5, - { 0x27AE, 0x05ee }, // 238, 5, - { 0x27AF, 0x05ef }, // 239, 5, - { 0x27B1, 0x05f1 }, // 241, 5, - { 0x27B2, 0x05f2 }, // 242, 5, - { 0x27B3, 0x05f3 }, // 243, 5, - { 0x27B4, 0x05f4 }, // 244, 5, - { 0x27B5, 0x05f5 }, // 245, 5, - { 0x27B6, 0x05f6 }, // 246, 5, - { 0x27B7, 0x05f7 }, // 247, 5, - { 0x27B8, 0x05f8 }, // 248, 5, - { 0x27B9, 0x05f9 }, // 249, 5, - { 0x27BA, 0x05fa }, // 250, 5, - { 0x27BB, 0x05fb }, // 251, 5, - { 0x27BC, 0x05fc }, // 252, 5, - { 0x27BD, 0x05fd }, // 253, 5, - { 0x27BE, 0x05fe }, // 254, 5, - { 0xFB00, 0x0433 }, // 51 , 4, - { 0xFB01, 0x0436 }, // 54 , 4, - { 0xFB02, 0x0437 }, // 55 , 4, - { 0xFB03, 0x0434 }, // 52 , 4, - { 0xFB04, 0x0435 }, // 53 , 4, - { 0xFB1E, 0x0930 }, // 48 , 9, - { 0xFF61, 0x0b00 }, // 0 , 11, - { 0xFF62, 0x0b01 }, // 1 , 11, - { 0xFF63, 0x0b02 }, // 2 , 11, - { 0xFF64, 0x0b03 }, // 3 , 11, - { 0xFF65, 0x0b04 }, // 4 , 11, - { 0xFF66, 0x0b05 }, // 5 , 11, - { 0xFF67, 0x0b06 }, // 6 , 11, - { 0xFF68, 0x0b07 }, // 7 , 11, - { 0xFF69, 0x0b08 }, // 8 , 11, - { 0xFF6A, 0x0b09 }, // 9 , 11, - { 0xFF6B, 0x0b0a }, // 10 , 11, - { 0xFF6C, 0x0b0b }, // 11 , 11, - { 0xFF6D, 0x0b0c }, // 12 , 11, - { 0xFF6E, 0x0b0d }, // 13 , 11, - { 0xFF6F, 0x0b0e }, // 14 , 11, - { 0xFF70, 0x0b0f }, // 15 , 11, - { 0xFF71, 0x0b10 }, // 16 , 11, - { 0xFF72, 0x0b11 }, // 17 , 11, - { 0xFF73, 0x0b12 }, // 18 , 11, - { 0xFF74, 0x0b13 }, // 19 , 11, - { 0xFF75, 0x0b14 }, // 20 , 11, - { 0xFF76, 0x0b15 }, // 21 , 11, - { 0xFF77, 0x0b16 }, // 22 , 11, - { 0xFF78, 0x0b17 }, // 23 , 11, - { 0xFF79, 0x0b18 }, // 24 , 11, - { 0xFF7A, 0x0b19 }, // 25 , 11, - { 0xFF7B, 0x0b1a }, // 26 , 11, - { 0xFF7C, 0x0b1b }, // 27 , 11, - { 0xFF7D, 0x0b1c }, // 28 , 11, - { 0xFF7E, 0x0b1d }, // 29 , 11, - { 0xFF7F, 0x0b1e }, // 30 , 11, - { 0xFF80, 0x0b1f }, // 31 , 11, - { 0xFF81, 0x0b20 }, // 32 , 11, - { 0xFF82, 0x0b21 }, // 33 , 11, - { 0xFF83, 0x0b22 }, // 34 , 11, - { 0xFF84, 0x0b23 }, // 35 , 11, - { 0xFF85, 0x0b24 }, // 36 , 11, - { 0xFF86, 0x0b25 }, // 37 , 11, - { 0xFF87, 0x0b26 }, // 38 , 11, - { 0xFF88, 0x0b27 }, // 39 , 11, - { 0xFF89, 0x0b28 }, // 40 , 11, - { 0xFF8A, 0x0b29 }, // 41 , 11, - { 0xFF8B, 0x0b2a }, // 42 , 11, - { 0xFF8C, 0x0b2b }, // 43 , 11, - { 0xFF8D, 0x0b2c }, // 44 , 11, - { 0xFF8E, 0x0b2d }, // 45 , 11, - { 0xFF8F, 0x0b2e }, // 46 , 11, - { 0xFF90, 0x0b2f }, // 47 , 11, - { 0xFF91, 0x0b30 }, // 48 , 11, - { 0xFF92, 0x0b31 }, // 49 , 11, - { 0xFF93, 0x0b32 }, // 50 , 11, - { 0xFF94, 0x0b33 }, // 51 , 11, - { 0xFF95, 0x0b34 }, // 52 , 11, - { 0xFF96, 0x0b35 }, // 53 , 11, - { 0xFF97, 0x0b36 }, // 54 , 11, - { 0xFF98, 0x0b37 }, // 55 , 11, - { 0xFF99, 0x0b38 }, // 56 , 11, - { 0xFF9A, 0x0b39 }, // 57 , 11, - { 0xFF9B, 0x0b3a }, // 58 , 11, - { 0xFF9C, 0x0b3b }, // 59 , 11, - { 0xFF9D, 0x0b3c }, // 60 , 11, - { 0xFF9E, 0x0b3d }, // 61 , 11, - { 0xFF9F, 0x0b3e } // 62 , 11 -}; /**************************************************************************** Desc: WP60 to Unicode - Multinational 1 ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI1[] = +FSTATIC FLMUINT16 WPCH_WP60UNI1[ 256] = { 0x0300, 0x00B7, 0x0303, 0x0302, 0x0335, 0x0338, 0x0301, 0x0308, 0x0304, 0x0313, @@ -2314,13 +82,16 @@ FLMUINT16 WPCH_WP60UNI1[] = 0xF00D, 0xF00E, 0xF00F, 0x010E, 0x010F, 0x01A0, 0x01A1, 0x01AF, 0x01B0, 0x0114, 0x0115, 0x012C, 0x012D, 0x0049, 0x0131, - 0x014E, 0x014F + 0x014E, 0x014F, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Standard Phonetic ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI2[] = +FSTATIC FLMUINT16 WPCH_WP60UNI2[ 256] = { 0x02B9, 0x02BA, 0x02BB, 0xF813, 0x02BD, 0x02BC, 0xF814, 0x02BE, 0x02BF, 0x0310, @@ -2350,13 +121,36 @@ FLMUINT16 WPCH_WP60UNI2[] = 0x028B, 0x028D, 0x0058, 0x028F, 0x0290, 0x0291, 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x02A1, 0x02A2, 0x0298, 0x02A3, - 0x02A4, 0x02A5, 0x02A6, 0x02A7, 0x02A8 + 0x02A4, 0x02A5, 0x02A6, 0x02A7, 0x02A8, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP51/WP60 to Unicode - Box Drawing ****************************************************************************/ -FLMUINT16 WPCH_WPUNI3[] = +FSTATIC FLMUINT16 WPCH_WPUNI3[ 256] = { 0x2591, 0x2592, 0x2593, 0x2588, 0x258C, 0x2580, 0x2590, 0x2584, 0x2500, 0x2502, @@ -2375,13 +169,47 @@ FLMUINT16 WPCH_WPUNI3[] = 0x252A, 0x2529, 0x2536, 0x253A, 0x2535, 0x2539, 0x2541, 0x2546, 0x253E, 0x2540, 0x2544, 0x254A, 0x253D, 0x2545, 0x2548, - 0x2543, 0x2549, 0x2547 + 0x2543, 0x2549, 0x2547, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP51/WP60 to Unicode - Typographic Symbols ****************************************************************************/ -FLMUINT16 WPCH_WPUNI4[] = +FSTATIC FLMUINT16 WPCH_WPUNI4[ 256] = { 0x25CF, 0x25CB, 0x25A0, 0x2022, 0xF817, 0x00B6, 0x00A7, 0x00A1, 0x00BF, 0x00AB, @@ -2403,13 +231,44 @@ FLMUINT16 WPCH_WPUNI4[] = 0xF819, 0x20A9, 0x20A6, 0x20A8, 0xF81A, 0xF81B, 0xF81C, 0xF81D, 0xF81E, 0xF81F, 0xF820, 0xF821, 0xF822, 0xF823, 0xF824, - 0xF825, 0xF826, 0x20AC + 0xF825, 0xF826, 0x20AC, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Iconic Symbols ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI5[] = +FSTATIC FLMUINT16 WPCH_WP60UNI5[ 256] = { 0x2661, 0x2662, 0x2667, 0x2664, 0x2642, 0x2640, 0x263C, 0x263A, 0x263B, 0x266A, @@ -2461,13 +320,14 @@ FLMUINT16 WPCH_WP60UNI5[] = 0x27AB, 0x27AC, 0x27AD, 0x27AE, 0x27AF, 0xF83F, 0x27B1, 0x27B2, 0x27B3, 0x27B4, 0x27B5, 0x27B6, 0x27B7, 0x27B8, 0x27B9, - 0x27BA, 0x27BB, 0x27BC, 0x27BD, 0x27BE + 0x27BA, 0x27BB, 0x27BC, 0x27BD, 0x27BE, + 0x0000 }; /**************************************************************************** Desc: WP51/WP60 to Unicode - Math/Scientific ****************************************************************************/ -FLMUINT16 WPCH_WPUNI6[] = +FSTATIC FLMUINT16 WPCH_WPUNI6[ 256] = { 0x2212, 0x00B1, 0x2264, 0x2265, 0x221D, 0x01C0, 0x2215, 0x2216, 0x00F7, 0x2223, @@ -2516,13 +376,17 @@ FLMUINT16 WPCH_WPUNI6[] = 0x22EF, 0xF85C, 0x22EE, 0x22F1, 0xF85D, 0x20E1, 0x002B, 0x002D, 0x003D, 0x002A, 0xF85E, 0xF85F, 0xF860, 0x210C, 0x2118, - 0x2272, 0x2273, 0xF861 + 0x2272, 0x2273, 0xF861, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP51/WP60 to Unicode - Math/Science Extension ****************************************************************************/ -FLMUINT16 WPCH_WPUNI7[] = +FSTATIC FLMUINT16 WPCH_WPUNI7[ 256] = { 0x2320, 0x2321, 0xF702, 0xF703, 0x221A, 0xF705, 0xF706, 0xF707, 0xF708, 0xF709, @@ -2569,13 +433,19 @@ FLMUINT16 WPCH_WPUNI7[] = 0xF7D2, 0xF7D3, 0xF7D4, 0xF7D5, 0xF7D6, 0xF7D7, 0xF7D8, 0xF7D9, 0xF7DA, 0xF7DB, 0xF7DC, 0xF7DD, 0xF7DE, 0xF7DF, 0xF7E0, - 0xF7E1, 0xF7E2, 0xF7E3, 0xF7E4 + 0xF7E1, 0xF7E2, 0xF7E3, 0xF7E4, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Greek ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI8[] = +FSTATIC FLMUINT16 WPCH_WP60UNI8[ 256] = { 0x0391, 0x03B1, 0x0392, 0x03B2, 0x0392, 0x03D0, 0x0393, 0x03B3, 0x0394, 0x03B4, @@ -2620,13 +490,21 @@ FLMUINT16 WPCH_WP60UNI8[] = 0x1F64, 0x1F62, 0xF214, 0x1FA0, 0x1FA4, 0x1FA2, 0xF30A, 0x1F61, 0x1F65, 0x1F63, 0xF215, 0x1FA1, 0x1FA5, 0x1FA3, 0xF30B, - 0x03DA, 0x03DC, 0x03DE, 0x03E0 + 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Hebrew ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI9[] = +FSTATIC FLMUINT16 WPCH_WP60UNI9[ 256] = { 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, @@ -2652,13 +530,40 @@ FLMUINT16 WPCH_WP60UNI9[] = 0xF128, 0xF129, 0xF12A, 0xF12B, 0xF12C, 0xF12D, 0xF880, 0xF12E, 0xF12F, 0xF130, 0xF219, 0x05E9, 0xF131, 0xF132, 0xF140, - 0xF141, 0xF142, 0x20AA + 0xF141, 0xF142, 0x20AA, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Cyrillic/Georgian ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI10[] = +FSTATIC FLMUINT16 WPCH_WP60UNI10[ 256] = { 0x0410, 0x0430, 0x0411, 0x0431, 0x0412, 0x0432, 0x0413, 0x0433, 0x0414, 0x0434, @@ -2709,13 +614,15 @@ FLMUINT16 WPCH_WP60UNI10[] = 0x10E2, 0x10E3, 0x10F3, 0x10E4, 0x10E5, 0x10E6, 0x10E7, 0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10F4, - 0x10EF, 0x10F0, 0x10F5, 0x10F6, 0xF42C + 0x10EF, 0x10F0, 0x10F5, 0x10F6, 0xF42C, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Japanese ****************************************************************************/ -FLMUINT16 WPCH_WP60UNI11[] = +FSTATIC FLMUINT16 WPCH_WP60UNI11[ 256] = { 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67, 0xFF68, 0xFF69, 0xFF6A, @@ -2729,13 +636,52 @@ FLMUINT16 WPCH_WP60UNI11[] = 0xFF8E, 0xFF8F, 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97, 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, - 0xFF9D, 0xFF9E, 0xFF9F + 0xFF9D, 0xFF9E, 0xFF9F, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Arabic ****************************************************************************/ -FLMUINT16 WPCH_WPUNI13[] = +FSTATIC FLMUINT16 WPCH_WPUNI13[ 256] = { 0xF895, 0xF896, 0xF897, 0xF898, 0xF899, 0xF89A, 0xF89B, 0xF89C, 0xF89D, 0xF89E, @@ -2776,13 +722,25 @@ FLMUINT16 WPCH_WPUNI13[] = 0x0671, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0640, - 0x0640 + 0x0640, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 }; /**************************************************************************** Desc: WP60 to Unicode - Arabic Script ****************************************************************************/ -FLMUINT16 WPCH_WPUNI14[] = +FSTATIC FLMUINT16 WPCH_WPUNI14[ 256] = { 0xF8B6, 0xF8B7, 0xF8B8, 0xF8B9, 0xF8BA, 0xF8BB, 0xF8BC, 0xF8BD, 0xF8BE, 0xF8BF, @@ -2827,7 +785,37 @@ FLMUINT16 WPCH_WPUNI14[] = 0x06CA, 0x06CA, 0x06CA, 0x06CA, 0x0647, 0x0647, 0x0647, 0x0647, 0x06CE, 0x06CE, 0x06CE, 0x06CE, 0x06D2, 0x06D2, 0x06D1, - 0x06D1, 0x06D1, 0x06D1, 0x06C0, 0x06C0 + 0x06D1, 0x06D1, 0x06D1, 0x06C0, 0x06C0, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000 +}; + +/**************************************************************************** +Desc: +****************************************************************************/ +FSTATIC FLMUINT16 * WP60toUni[] = +{ + 0, + WPCH_WP60UNI1, + WPCH_WP60UNI2, + WPCH_WPUNI3, + WPCH_WPUNI4, + WPCH_WP60UNI5, + WPCH_WPUNI6, + WPCH_WPUNI7, + WPCH_WP60UNI8, + WPCH_WP60UNI9, + WPCH_WP60UNI10, + WPCH_WP60UNI11, + 0, + WPCH_WPUNI13, + WPCH_WPUNI14 }; /**************************************************************************** @@ -2995,7 +983,8 @@ FLMUINT16 WPCH_CPXGREEK[][5] = /**************************************************************************** Desc: WP60 to Unicode - Complex Character Unit Table (Hebrew) ****************************************************************************/ -FLMUINT16 WPCH_CPXHEBREW[][5] = { +FLMUINT16 WPCH_CPXHEBREW[][5] = +{ { 0x05F2, 0x05B7, 0x0000, 0x0000, 0x0000 }, { 0x05D0, 0x05BC, 0x0000, 0x0000, 0x0000 }, { 0x05D1, 0x05BC, 0x0000, 0x0000, 0x0000 }, @@ -3057,7 +1046,8 @@ FLMUINT16 WPCH_CPXARABIC2[][5] = /**************************************************************************** Desc: WP60 to Unicode - Complex Character Unit Table (Cyrillic / Georgian) ****************************************************************************/ -FLMUINT16 WPCH_CPXCYRILLIC[][5] = { +FLMUINT16 WPCH_CPXCYRILLIC[][5] = +{ { 0x0410, 0x0301, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0301, 0x0000, 0x0000, 0x0000 }, { 0x0415, 0x0301, 0x0000, 0x0000, 0x0000 }, @@ -3118,28 +1108,6 @@ FLMUINT16 WPCH_CPXCYRILLIC[][5] = { { 0x0448, 0x0329, 0x0000, 0x0000, 0x0000 } }; -/**************************************************************************** -Desc: -****************************************************************************/ -FLMUINT16 * WP60toUni[] = -{ - 0, - WPCH_WP60UNI1, - WPCH_WP60UNI2, - WPCH_WPUNI3, - WPCH_WPUNI4, - WPCH_WP60UNI5, - WPCH_WPUNI6, - WPCH_WPUNI7, - WPCH_WP60UNI8, - WPCH_WP60UNI9, - WPCH_WP60UNI10, - WPCH_WP60UNI11, - 0, - WPCH_WPUNI13, - WPCH_WPUNI14 -}; - /**************************************************************************** Desc: ****************************************************************************/ @@ -3160,330 +1128,6 @@ FLMUINT16 * WP60toCpxUni[] = (FLMUINT16 *)WPCH_CPXARABIC2 }; -/**************************************************************************** -Desc: Converts a character to upper case (if possible) -****************************************************************************/ -FLMUINT16 flmCh6Upper( - FLMUINT16 ui16WpChar) -{ - if (ui16WpChar < 256) - { - if (ui16WpChar >= ASCII_LOWER_A && ui16WpChar <= ASCII_LOWER_Z) - { - - // Return ASCII upper case - - return (ui16WpChar & 0xdf); - } - } - else - { - FLMBYTE ucCharSet = ui16WpChar >> 8; - - if (ucCharSet == CHSMUL1) - { - FLMBYTE ucChar = ui16WpChar & 0xFF; - - if (ucChar >= flmCaseConvertableRange[(CHSMUL1 - 1) * 2] && - ucChar <= flmCaseConvertableRange[((CHSMUL1 - 1) * 2) + 1]) - { - return (ui16WpChar & 0xFFFE); - } - } - else if (ucCharSet == CHSGREK) - { - if ((ui16WpChar & 0xFF) <= flmCaseConvertableRange[ - ((CHSGREK - 1) * 2) + 1]) - { - return (ui16WpChar & 0xFFFE); - } - } - else if (ucCharSet == CHSCYR) - { - if ((ui16WpChar & 0xFF) <= flmCaseConvertableRange[ - ((CHSCYR - 1) * 2) + 1]) - { - return (ui16WpChar & 0xFFFE); - } - } - else if (ui16WpChar >= Lower_JP_a) - { - - // Possible double byte character set alphabetic character? - - if (ui16WpChar <= Lower_JP_z) - { - - // Japanese? - - ui16WpChar = (ui16WpChar - Lower_JP_a) + Upper_JP_A; - } - else if (ui16WpChar >= Lower_KR_a && ui16WpChar <= Lower_KR_z) - { - - // Korean? - - ui16WpChar = (ui16WpChar - Lower_KR_a) + Upper_KR_A; - } - else if (ui16WpChar >= Lower_CS_a && ui16WpChar <= Lower_CS_z) - { - - // Chinese Simplified? - - ui16WpChar = (ui16WpChar - Lower_CS_a) + Upper_CS_A; - } - else if (ui16WpChar >= Lower_CT_a && ui16WpChar <= Lower_CT_z) - { - - // Chinese Traditional? - - ui16WpChar = (ui16WpChar - Lower_CT_a) + Upper_CT_A; - } - } - } - - // Return original character - original not in lower case. - - return (ui16WpChar); -} - -/**************************************************************************** -Desc: Checks to see if WP character is upper case -****************************************************************************/ -FLMBOOL flmIsUpper( - FLMUINT16 ui16WpChar) -{ - FLMBYTE ucChar; - FLMBYTE ucCharSet; - - // Get character - - ucChar = (FLMBYTE) (ui16WpChar & 0xFF); - - // Test if ASCII character set - - if (!(ui16WpChar & 0xFF00)) - { - return ((ucChar >= ASCII_LOWER_A && ucChar <= ASCII_LOWER_Z) - ? FALSE - : TRUE); - } - - // Get the character set - - ucCharSet = (FLMBYTE) (ui16WpChar >> 8); - - // CHSMUL1 == Multinational 1 character set - // CHSGREK == Greek character set - // CHSCYR == Cyrillic character set - - if ((ucCharSet == CHSMUL1 && ucChar >= 26 && ucChar <= 241) || - (ucCharSet == CHSGREK && ucChar <= 69) || - (ucCharSet == CHSCYR && ucChar <= 199)) - { - return ((ucChar & 1) ? FALSE : TRUE); - } - - // Don't care that double ss is lower - - return (TRUE); -} - -/**************************************************************************** -Desc: Converts a character to lower case (if possible) -****************************************************************************/ -FLMUINT16 flmCh6Lower( - FLMUINT16 ui16WpChar) -{ - if (ui16WpChar < 256) - { - if (ui16WpChar >= ASCII_UPPER_A && ui16WpChar <= ASCII_UPPER_Z) - { - return (ui16WpChar | 0x20); - } - } - else - { - FLMBYTE ucCharSet = ui16WpChar >> 8; - - if (ucCharSet == CHSMUL1) - { - FLMBYTE ucChar = ui16WpChar & 0xFF; - - if (ucChar >= flmCaseConvertableRange[(CHSMUL1 - 1) * 2] && - ucChar <= flmCaseConvertableRange[((CHSMUL1 - 1) * 2) + 1]) - { - return (ui16WpChar | 1); - } - } - else if (ucCharSet == CHSGREK) - { - if ((ui16WpChar & 0xFF) <= flmCaseConvertableRange[ - ((CHSGREK - 1) * 2) + 1]) - { - return (ui16WpChar | 1); - } - } - else if (ucCharSet == CHSCYR) - { - if ((ui16WpChar & 0xFF) <= flmCaseConvertableRange[ - ((CHSCYR - 1) * 2) + 1]) - { - return (ui16WpChar | 1); - } - } - else if (ui16WpChar >= Upper_JP_A) - { - - // Possible double byte character set alphabetic character? - - if (ui16WpChar <= Upper_JP_Z) - { - - // Japanese? - - ui16WpChar = ui16WpChar - Upper_JP_A + Lower_JP_a; - } - else if (ui16WpChar >= Upper_KR_A && ui16WpChar <= Upper_KR_Z) - { - - // Korean? - - ui16WpChar = ui16WpChar - Upper_KR_A + Lower_KR_a; - } - else if (ui16WpChar >= Upper_CS_A && ui16WpChar <= Upper_CS_Z) - { - - // Chinese Simplified? - - ui16WpChar = ui16WpChar - Upper_CS_A + Lower_CS_a; - } - else if (ui16WpChar >= Upper_CT_A && ui16WpChar <= Upper_CT_Z) - { - - // Chinese Traditional? - - ui16WpChar = ui16WpChar - Upper_CT_A + Lower_CT_a; - } - } - } - - // Return original character, original not in upper case - - return (ui16WpChar); -} - -/**************************************************************************** -Desc: Break a WP character into a base and a diacritical char. -Ret: TRUE - if not found FALSE - if found -****************************************************************************/ -FLMBOOL flmCh6Brkcar( - FLMUINT16 ui16WpChar, - FLMUINT16 * pui16BaseChar, - FLMUINT16 * pui16DiacriticChar) -{ - BASE_DIACRIT * pBaseDiacritic; - FLMINT iTableIndex; - - if ((pBaseDiacritic = flm_car60_c[HI( ui16WpChar)]) == 0) - { - return (TRUE); - } - - iTableIndex = ((FLMBYTE) ui16WpChar) - pBaseDiacritic->start_char; - - if (iTableIndex < 0 || - iTableIndex > pBaseDiacritic->char_count || - pBaseDiacritic->table[iTableIndex].base == (FLMBYTE) 0xFF) - { - return (TRUE); - } - - if ((HI( ui16WpChar) != CHSMUL1) || - ((flm_ml1_cb60[((FLMBYTE) ui16WpChar) >> 3] >> - (7 - (ui16WpChar & 0x07))) & 0x01)) - { - - // normal case, same base as same as characters - - *pui16BaseChar = (ui16WpChar & 0xFF00) | - pBaseDiacritic->table[iTableIndex].base; - - *pui16DiacriticChar = (ui16WpChar & 0xFF00) | - pBaseDiacritic->table[iTableIndex].diacrit; - } - else - { - - // Multi-national where base is ascii value. - - *pui16BaseChar = pBaseDiacritic->table[iTableIndex].base; - *pui16DiacriticChar = (ui16WpChar & 0xFF00) | - pBaseDiacritic->table[iTableIndex].diacrit; - } - - return (FALSE); -} - -/**************************************************************************** -Desc: Take a base and a diacritic and compose a WP character. -Ret: TRUE - if not found FALSE - if found -****************************************************************************/ -FLMBOOL flmCh6Cmbcar( - FLMUINT16 * pui16WpChar, - FLMUINT16 ui16BaseChar, - FLMINT16 ui16DiacriticChar) -{ - FLMUINT uiRemaining; - FLMBYTE ucCharSet; - FLMBYTE ucChar; - BASE_DIACRIT * pBaseDiacritic; - BASE_DIACRIT_TABLE * pTable; - - ucCharSet = HI( ui16BaseChar); - if (ucCharSet > NCHSETS) - { - return (TRUE); - } - - // Is base ASCII? If so, look in multinational 1 - - if (!ucCharSet) - { - ucCharSet = CHSMUL1; - } - - if ((pBaseDiacritic = flm_car60_c[ucCharSet]) == 0) - { - return (TRUE); - } - - ucChar = LO( ui16BaseChar); - ui16DiacriticChar = LO( ui16DiacriticChar); - pTable = pBaseDiacritic->table; - for (uiRemaining = pBaseDiacritic->char_count; - uiRemaining; - uiRemaining--, pTable++) - { - - // Same base? - - if (pTable->base == ucChar && - (pTable->diacrit & 0x7F) == ui16DiacriticChar) - { - - // Same diacritic? - - *pui16WpChar = (FLMUINT16) (((FLMUINT16) ucCharSet << 8) + - (pBaseDiacritic->start_char + - (FLMUINT16) (pTable - pBaseDiacritic->table))); - return (FALSE); - } - } - - return (TRUE); -} - /**************************************************************************** Desc: ****************************************************************************/ @@ -3758,7 +1402,6 @@ FLMEXP FLMUINT FLMAPI FlmGetUnicodeStorageLength( { FLMBYTE chrSet; FLMUINT uiStorageLength = 0; - FLMUINT uniLength; FLMUINT16 wp60Buf[12]; flmAssert( puzStr != NULL); @@ -3772,7 +1415,6 @@ FLMEXP FLMUINT FLMAPI FlmGetUnicodeStorageLength( { if (*puzStr < 0x20) { - uniLength = 1; uiStorageLength += 3; } else @@ -3784,12 +1426,9 @@ FLMEXP FLMUINT FLMAPI FlmGetUnicodeStorageLength( continue; } - uniLength = flmUnicodeToWP( puzStr, wp60Buf); - - if (!uniLength) + if( !f_depricatedUnicodeToWP( *puzStr, wp60Buf)) { uiStorageLength += 3; - uniLength = 1; } else { @@ -3804,7 +1443,7 @@ FLMEXP FLMUINT FLMAPI FlmGetUnicodeStorageLength( } } - puzStr += uniLength; + puzStr++; } while (*puzStr != 0); return (uiStorageLength); @@ -3824,7 +1463,6 @@ FLMEXP RCODE FLMAPI FlmUnicode2Storage( FLMBYTE chrSet; FLMUINT16 wp60Buf[12]; FLMUINT uiStorageLength = 0; - FLMUINT uniLength; flmAssert( puzStr != NULL); flmAssert( pBuf != NULL); @@ -3839,7 +1477,6 @@ FLMEXP RCODE FLMAPI FlmUnicode2Storage( *pBuf++ = UNICODE_CODE; *pBuf++ = *puzStr >> 8; *pBuf++ = (FLMBYTE) *puzStr; - uniLength = 1; uiStorageLength += 3; } else @@ -3851,14 +1488,11 @@ FLMEXP RCODE FLMAPI FlmUnicode2Storage( continue; } - uniLength = flmUnicodeToWP( puzStr, wp60Buf); - - if (!uniLength) + if( !f_depricatedUnicodeToWP( *puzStr, wp60Buf)) { *pBuf++ = UNICODE_CODE; *pBuf++ = *puzStr >> 8; *pBuf++ = (FLMBYTE) *puzStr; - uniLength = 1; uiStorageLength += 3; } else @@ -3886,7 +1520,7 @@ FLMEXP RCODE FLMAPI FlmUnicode2Storage( } } - puzStr += uniLength; + puzStr++; // Make sure input buffer was large enough @@ -3900,68 +1534,6 @@ FLMEXP RCODE FLMAPI FlmUnicode2Storage( return (FERR_OK); } -/**************************************************************************** -Desc: Convert from Unicode to 1 and only 1 WP60 character -Ret: Conversion count - 0 means Unicode character could not be converted -****************************************************************************/ -FLMUINT flmUnicodeToWP( - const FLMUNICODE * pUniStr, - FLMUINT16 * pWPChr) -{ - FLMUINT uiReturnLen = 1; - FLMUNICODE uzUniChar = *pUniStr; - FLMINT16 max; - FLMINT16 min; - FLMINT16 temp; - FLMUINT16 * tablePtr; - FLMUINT16 tblChr; - - if (uzUniChar < 127) - { - *pWPChr = uzUniChar; - goto Exit; - } - - tablePtr = (FLMUINT16 *) WP_UTOWP60; - - // Value we should use ... max = UTOWP60_ENTRIES - 1; - // Bug introduced before Nov99 where UTOWP60_ENTRIES is actually 1502 - // and the value of 2042 was used. Through debugging, all values in the - // table from 1021 to 1502 were never converted to WP character. So, in - // order to search correctly on these values we must preserve the WRONG - // conversion of these characters (Unicode x222E on). The new max table - // size is 1021 so max will be set to 1020 to work correctly. - - max = 1020; - min = 0; - - do - { - temp = (min + max) >> 1; - tblChr = *(tablePtr + (temp * 2)); - - if (tblChr < uzUniChar) - { - min = temp + 1; - } - else if (tblChr > uzUniChar) - { - max = temp - 1; - } - else - { - *pWPChr = *(tablePtr + (temp * 2) + 1); - goto Exit; - } - } while (min <= max); - - uiReturnLen = 0; - -Exit: - - return (uiReturnLen); -} - /**************************************************************************** Desc: Converts storage formats to UNICODE. ****************************************************************************/ @@ -3972,6 +1544,7 @@ FLMEXP RCODE FLMAPI FlmStorage2Unicode( FLMUINT * puiStrBufLen, FLMUNICODE * puzStrBuf) { + RCODE rc = FERR_OK; FLMUNICODE * tablePtr; FLMBYTE c; FLMUINT bytesProcessed = 0; @@ -3984,7 +1557,6 @@ FLMEXP RCODE FLMAPI FlmStorage2Unicode( FLMBYTE chrSet; FLMBYTE chrVal; FLMUNICODE newChrVal; - RCODE rc = FERR_OK; // If the value is a number, convert to text first @@ -4526,7 +2098,7 @@ FLMEXP RCODE FLMAPI FlmStorage2Native( } else { - *outPtr++ = NON_DISPLAYABLE_CHAR; + *outPtr++ = 0xFF; } } else @@ -4665,7 +2237,7 @@ FLMEXP RCODE FLMAPI FlmStorage2Native( { if (bytesOutput < maxOutLen) { - *outPtr += NON_DISPLAYABLE_CHAR; + *outPtr += 0xFF; } else { @@ -4728,7 +2300,7 @@ FLMEXP RCODE FLMAPI FlmStorage2Native( bytesProcessed += objLength; } - // Add a terminating NULL character, but DO NOT increment the ; + // Add a terminating NULL character, but DO NOT increment the // bytesOutput counter! Native_Output: diff --git a/flaim/src/kybuild.cpp b/flaim/src/kybuild.cpp index 05240ae..87ae910 100644 --- a/flaim/src/kybuild.cpp +++ b/flaim/src/kybuild.cpp @@ -708,7 +708,7 @@ RCODE KYAddToKrefTbl( // NULL character is to ensure that the compare in the qsort routine // will work. - uiSizeNeeded = sizeof(KREF_ENTRY) + uiKrefKeyLen + 1; + uiSizeNeeded = sizeof( KREF_ENTRY) + uiKrefKeyLen + 1; if( RC_BAD( rc = pKrefCntrl->pPool->poolAlloc( uiSizeNeeded, (void **)&pKref))) @@ -787,13 +787,6 @@ RCODE flmEncryptField( pvMark = pPool->poolMark(); -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - if (!pRecord->isEncryptedField( pvField)) { flmAssert( 0); @@ -864,13 +857,6 @@ RCODE flmEncryptField( pRecord->setEncFlags( pvField, FLD_HAVE_DECRYPTED_DATA | FLD_HAVE_ENCRYPTED_DATA); -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - Exit: pPool->poolReset( pvMark); @@ -897,13 +883,6 @@ RCODE flmDecryptField( pvMark = pPool->poolMark(); -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - if (!pRecord->isEncryptedField( pvField)) { flmAssert( 0); @@ -943,13 +922,6 @@ RCODE flmDecryptField( pRecord->setEncFlags( pvField, FLD_HAVE_DECRYPTED_DATA | FLD_HAVE_ENCRYPTED_DATA); -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - Exit: pPool->poolReset( pvMark); diff --git a/flaim/src/kycollat.cpp b/flaim/src/kycollat.cpp index bb84e18..d3de48d 100644 --- a/flaim/src/kycollat.cpp +++ b/flaim/src/kycollat.cpp @@ -82,16 +82,6 @@ #define FIXUP_AREA_SIZE 24 -#define ASCTBLLEN 95 -#define MNTBLLEN 219 -#define SYMTBLLEN 9 -#define GRKTBLLEN 219 -#define CYRLTBLLEN 200 -#define HEBTBL1LEN 27 -#define HEBTBL2LEN 35 -#define AR1TBLLEN 158 -#define AR2TBLLEN 179 - #define COMPARE_COLLATION 1 #define COMPARE_COL_AND_SUBCOL 2 #define COMPARE_VALUE 3 @@ -110,21 +100,21 @@ #define COLS_ASIAN_MARKS 0x140 FSTATIC RCODE KYCmpKeyElmBld( - FDB * pDb, - IXD * pIxd, - FLMUINT uiContainerNum, - IFD * pIfd, - FLMUINT uiAction, - FLMUINT uiDrn, - FLMBOOL * pbHadUniqueKeys, - FLMUINT uiCdlEntry, - FLMUINT uiCompoundPos, - FLMBYTE * pKeyBuf, - FLMUINT uiKeyLen, - FLMBYTE * pLowUpBuf, - FLMUINT uiLuLen, - FlmRecord * pRecord, - FLD_CONTEXT * pFldContext); + FDB * pDb, + IXD * pIxd, + FLMUINT uiContainerNum, + IFD * pIfd, + FLMUINT uiAction, + FLMUINT uiDrn, + FLMBOOL * pbHadUniqueKeys, + FLMUINT uiCdlEntry, + FLMUINT uiCompoundPos, + FLMBYTE * pKeyBuf, + FLMUINT uiKeyLen, + FLMBYTE * pLowUpBuf, + FLMUINT uiLuLen, + FlmRecord * pRecord, + FLD_CONTEXT * pFldContext); FSTATIC RCODE KYFormatText( const FLMBYTE * psVal, @@ -184,12 +174,6 @@ FSTATIC FLMUINT FWWSCmbSubColBuf( FLMBYTE * subColBuf, FLMBOOL hebrewArabicFlag); -FSTATIC FLMUINT FWWSToMixed( - FLMBYTE * wordStr, - FLMUINT wdStrLen, - FLMBYTE * lowUpBitStr, - FLMUINT fWPLang); - FSTATIC FLMUINT AsiaParseCase( FLMBYTE * WordStr, FLMUINT * uiWordStrLenRV, @@ -218,12 +202,6 @@ FSTATIC FLMUINT16 flmAsiaGetCollation( FLMBYTE * pucCaseBits, FLMUINT16 uiUppercaseFlag); -FSTATIC FLMUINT16 flmCheckDoubleCollation( - FLMUINT16 * pui16WpChar, - FLMBOOL * pbTwoIntoOne, - const FLMBYTE ** ppucInputStr, - FLMUINT uiLanguage); - FSTATIC FLMUINT AsiaParseSubCol( FLMBYTE * WordStr, FLMUINT * puiWordStrLen, @@ -239,15 +217,6 @@ FSTATIC FLMUINT FColStrToText( FLMBOOL * pbDataTruncated, FLMBOOL * pbFirstSubstring); -FSTATIC FLMUINT16 ZenToHankaku( - FLMUINT16 ui16WpChar, - FLMUINT16 * DakutenOrHandakutenRV); - -FSTATIC FLMUINT16 HanToZenkaku( - FLMUINT16 ui16WpChar, - FLMUINT16 ui16NextWpChar, - FLMUINT16 * pui16Zenkaku); - /**************************************************************************** Desc: ****************************************************************************/ @@ -257,15 +226,6 @@ typedef struct BYTE_WORD_TBL FLMUINT16 WordValue; } BYTE_WORD_TBL; -/**************************************************************************** -Desc: -****************************************************************************/ -typedef struct TBL_B_TO_BP -{ - FLMBYTE key; - FLMBYTE * charPtr; -} TBL_B_TO_BP; - /**************************************************************************** Desc: ****************************************************************************/ @@ -311,7 +271,7 @@ Desc: /**************************************************************************** Desc: ****************************************************************************/ -#define SETnBITS( n, bf, bit, v) \ +#define SETnBITS( n, bf, bit, v) \ { (bf)[ (bit) >> 3] |= \ (FLMBYTE)(((v) << (8 - (n))) \ >> \ @@ -322,1521 +282,6 @@ Desc: (16 - (n) - ((bit) & 7))); \ } -/**************************************************************************** -Desc: -****************************************************************************/ -FLMUINT16 flmValuea[] = -{ - STATE1, - STATE3, - STATE2, - STATE2, - STATE8, - STATE8, - STATE1, - STATE3, - STATE9, - STATE10, // No longer in use - STATE10, // No longer in use - STATE4, - STATE6, - STATE6, - STATE5, - INSTAE, - INSTOE, - AFTERC, - AFTERH, - AFTERL, - STATE7, - STATE6, - INSTSG, // ss for German - INSTIJ, - STATE11, // aa - no longer in use - WITHAA, // aa - no longer in use - START_CZ, // Czech - START_DK, // Danish - START_NO, // Norwegian - START_SL, // Slovak - START_TK, // Turkish - START_SU, // Finnish - START_IS, // Icelandic - START_SV, // Swedish - START_YK, // Ukrainian - - // Single character fixups - - COLS9, COLS9, COLS9, COLS9, // US and others - COLS9+1, COLS9+1, COLS9+21, COLS9+21, - COLS9+30, COLS9+30, COLS9+21, COLS9+21, - COLS10+43, COLS10+43, COLS9+12, COLS9+12, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9+45, COLS9+45, COLS9+55, COLS9+55, // DANISH - COLS9+42, COLS9+42, COLS9+53, COLS9+53, - COLS9+30, COLS9+30, COLS9+49, COLS9+49, - COLS10+43, COLS10+43, COLS9+12, COLS9+12, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9, COLS9, COLS9, COLS9, // Icelandic - COLS9+46, COLS9+46, COLS9+50, COLS9+50, - COLS9+30, COLS9+30, COLS9+54, COLS9+54, - COLS10+43, COLS10+43, COLS9+12, COLS9+12, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9, COLS9, COLS9+51, COLS9+51, // Norwegian - COLS9+43, COLS9+43, COLS9+21, COLS9+21, - COLS9+30, COLS9+30, COLS9+47, COLS9+47, - COLS10+43, COLS10+43, COLS9+12, COLS9+12, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9+48, COLS9+48, COLS9+44, COLS9+44, // Finnish/Swedish - COLS9+1, COLS9+1, COLS9+52, COLS9+52, - COLS9+30, COLS9+30, COLS9+21, COLS9+21, - COLS10+43, COLS10+43, COLS9+12, COLS9+12, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9, COLS9, COLS9, COLS9, // Ukrain - COLS9+1, COLS9+1, COLS9+21, COLS9+21, - COLS9+30, COLS9+30, COLS9+21, COLS9+21, - COLS10+48, COLS10+48, COLS9+12, COLS9+12, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9, COLS9, COLS9, COLS9, // Turkish - COLS9+1, COLS9+1, COLS9+21, COLS9+21, - COLS9+30, COLS9+30, COLS9+21, COLS9+21, - COLS9+43, COLS9+43, COLS9+11, COLS9+11, - COLS9+3, COLS9+3, COLS9+25, COLS9+25, - COLS9+27, COLS9+27, COLS9+35, COLS9+35, - - COLS9, COLS9, COLS9, COLS9, // Czech / Slovak - COLS9+1, COLS9+1, COLS9+21, COLS9+21, - COLS9+30, COLS9+30, COLS9+21, COLS9+21, - COLS10+43, COLS10+43, COLS9+12, COLS9+12, - COLS9+5, COLS9+5, COLS9+26, COLS9+26, - COLS9+28, COLS9+28, COLS9+36, COLS9+36 -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmAsc60Tbl[ ASCTBLLEN + 2] = -{ - 0x20, // Initial character offset - ASCTBLLEN, // Length of this table - COLLS, // - COLLS+5, // ! - COLS1, // " - COLS6+1, // # - COLS3, // $ - COLS6, // % - COLS6+2, // & - COLS1+1, // ' - COLS2, // ( - COLS2+1, // ) - COLS4+2, // * - COLS4, // + - COLLS+2, // , - COLS4+1, // - - COLLS+1, // . - COLS4+3, // / - COLS8, // 0 - COLS8+1, // 1 - COLS8+2, // 2 - COLS8+3, // 3 - COLS8+4, // 4 - COLS8+5, // 5 - COLS8+6, // 6 - COLS8+7, // 7 - COLS8+8, // 8 - COLS8+9, // 9 - COLLS+3, // : - COLLS+4, // ; - COLS5, // < - COLS5+2, // = - COLS5+4, // > - COLLS+7, // ? - COLS6+3, // @ - COLS9, // A - COLS9+2, // B - COLS9+3, // C - COLS9+6, // D - COLS9+7, // E - COLS9+8, // F - COLS9+9, // G - COLS9+10, // H - COLS9+12, // I - COLS9+14, // J - COLS9+15, // K - COLS9+16, // L - COLS9+18, // M - COLS9+19, // N - COLS9+21, // O - COLS9+23, // P - COLS9+24, // Q - COLS9+25, // R - COLS9+27, // S - COLS9+29, // T - COLS9+30, // U - COLS9+31, // V - COLS9+32, // W - COLS9+33, // X - COLS9+34, // Y - COLS9+35, // Z - COLS9+40, // [ - COLS6+4, // backslash - COLS9+41, // ] - COLS4+4, // ^ - COLS6+5, // _ - COLS1+2, // ` - COLS9, // a - COLS9+2, // b - COLS9+3, // c - COLS9+6, // d - COLS9+7, // e - COLS9+8, // f - COLS9+9, // g - COLS9+10, // h - COLS9+12, // i - COLS9+14, // j - COLS9+15, // k - COLS9+16, // l - COLS9+18, // m - COLS9+19, // n - COLS9+21, // o - COLS9+23, // p - COLS9+24, // q - COLS9+25, // r - COLS9+27, // s - COLS9+29, // t - COLS9+30, // u - COLS9+31, // v - COLS9+32, // w - COLS9+33, // x - COLS9+34, // y - COLS9+35, // z - COLS2+4, // { - COLS6+6, // | - COLS2+5, // } - COLS6+7 // ~ -}; - -/**************************************************************************** -Desc: Multinational table -****************************************************************************/ -FLMBYTE flmMn60Tbl[ MNTBLLEN + 2] = -{ - 23, // Initial character offset - MNTBLLEN, // Length of this table - COLS9+27, // German Double s - COLS9+15, // Icelandic k - COLS9+14, // Dotless j - - // IBM Charset - - COLS9, // A Acute - COLS9, // a Acute - COLS9, // A Circumflex - COLS9, // a Circumflex - COLS9, // A Diaeresis or Umlaut - COLS9, // a Diaeresis or Umlaut - COLS9, // A Grave - COLS9, // a Grave - COLS9, // A Ring - COLS9, // a Ring - COLS9+1, // AE digraph - COLS9+1, // ae digraph - COLS9+3, // C Cedilla - COLS9+3, // c Cedilla - COLS9+7, // E Acute - COLS9+7, // e Acute - COLS9+7, // E Circumflex - COLS9+7, // e Circumflex - COLS9+7, // E Diaeresis or Umlaut - COLS9+7, // e Diaeresis or Umlaut - COLS9+7, // E Grave - COLS9+7, // e Grave - COLS9+12, // I Acute - COLS9+12, // i Acute - COLS9+12, // I Circumflex - COLS9+12, // i Circumflex - COLS9+12, // I Diaeresis or Umlaut - COLS9+12, // i Diaeresis or Umlaut - COLS9+12, // I Grave - COLS9+12, // i Grave - COLS9+20, // N Tilde - COLS9+20, // n Tilde - COLS9+21, // O Acute - COLS9+21, // o Acute - COLS9+21, // O Circumflex - COLS9+21, // o Circumflex - COLS9+21, // O Diaeresis or Umlaut - COLS9+21, // o Diaeresis or Umlaut - COLS9+21, // O Grave - COLS9+21, // o Grave - COLS9+30, // U Acute - COLS9+30, // u Acute - COLS9+30, // U Circumflex - COLS9+30, // u Circumflex - COLS9+30, // U Diaeresis or Umlaut - COLS9+30, // u Diaeresis or Umlaut - COLS9+30, // U Grave - COLS9+30, // u Grave - COLS9+34, // Y Diaeresis or Umlaut - COLS9+34, // y Diaeresis or Umlaut - - // IBM foreign - - COLS9, // A Tilde - COLS9, // a Tilde - COLS9+6, // D Cross Bar - COLS9+6, // d Cross Bar - COLS9+21, // O Slash - COLS9+21, // o Slash - COLS9+21, // O Tilde - COLS9+21, // o Tilde - COLS9+34, // Y Acute - COLS9+34, // y Acute - COLS9+6, // Uppercase Eth - COLS9+6, // Lowercase Eth - COLS9+37, // Uppercase Thorn - COLS9+37, // Lowercase Thorn - - // Teletex chars - - COLS9, // A Breve - COLS9, // a Breve - COLS9, // A Macron - COLS9, // a Macron - COLS9, // A Ogonek - COLS9, // a Ogonek - COLS9+3, // C Acute - COLS9+3, // c Acute - COLS9+3, // C Caron or Hachek - COLS9+3, // c Caron or Hachek - COLS9+3, // C Circumflex - COLS9+3, // c Circumflex - COLS9+3, // C Dot Above - COLS9+3, // c Dot Above - COLS9+6, // D Caron or Hachek (Apostrophe Beside) - COLS9+6, // d Caron or Hachek (Apostrophe Beside) - COLS9+7, // E Caron or Hachek - COLS9+7, // e Caron or Hachek - COLS9+7, // E Dot Above - COLS9+7, // e Dot Above - COLS9+7, // E Macron - COLS9+7, // e Macron - COLS9+7, // E Ogonek - COLS9+7, // e Ogonek - COLS9+9, // G Acute - COLS9+9, // g Acute - COLS9+9, // G Breve - COLS9+9, // g Breve - COLS9+9, // G Caron or Hachek - COLS9+9, // g Caron or Hachek - COLS9+9, // G Cedilla (Apostrophe Under) - COLS9+9, // g Cedilla (Apostrophe Over) - COLS9+9, // G Circumflex - COLS9+9, // g Circumflex - COLS9+9, // G Dot Above - COLS9+9, // g Dot Above - COLS9+10, // H Circumflex - COLS9+10, // h Circumflex - COLS9+10, // H Cross Bar - COLS9+10, // h Cross Bar - COLS9+12, // I Dot Above (Sharp Accent) - COLS9+12, // i Dot Above (Sharp Accent) - COLS9+12, // I Macron - COLS9+12, // i Macron - COLS9+12, // I Ogonek - COLS9+12, // i Ogonek - COLS9+12, // I Tilde - COLS9+12, // i Tilde - COLS9+13, // IJ Digraph - COLS9+13, // ij Digraph - COLS9+14, // J Circumflex - COLS9+14, // j Circumflex - COLS9+15, // K Cedilla (Apostrophe Under) - COLS9+15, // k Cedilla (Apostrophe Under) - COLS9+16, // L Acute - COLS9+16, // l Acute - COLS9+16, // L Caron or Hachek (Apostrophe Beside) - COLS9+16, // l Caron or Hachek (Apostrophe Beside) - COLS9+16, // L Cedilla (Apostrophe Under) - COLS9+16, // l Cedilla (Apostrophe Under) - COLS9+16, // L Center Dot - COLS9+16, // l Center Dot - COLS9+16, // L Stroke - COLS9+16, // l Stroke - COLS9+19, // N Acute - COLS9+19, // n Acute - COLS9+19, // N Apostrophe - COLS9+19, // n Apostrophe - COLS9+19, // N Caron or Hachek - COLS9+19, // n Caron or Hachek - COLS9+19, // N Cedilla (Apostrophe Under) - COLS9+19, // n Cedilla (Apostrophe Under) - COLS9+21, // O Double Acute - COLS9+21, // o Double Acute - COLS9+21, // O Macron - COLS9+21, // o Macron - COLS9+22, // OE digraph - COLS9+22, // oe digraph - COLS9+25, // R Acute - COLS9+25, // r Acute - COLS9+25, // R Caron or Hachek - COLS9+25, // r Caron or Hachek - COLS9+25, // R Cedilla (Apostrophe Under) - COLS9+25, // r Cedilla (Apostrophe Under) - COLS9+27, // S Acute - COLS9+27, // s Acute - COLS9+27, // S Caron or Hachek - COLS9+27, // s Caron or Hachek - COLS9+27, // S Cedilla - COLS9+27, // s Cedilla - COLS9+27, // S Circumflex - COLS9+27, // s Circumflex - COLS9+29, // T Caron or Hachek (Apostrophe Beside) - COLS9+29, // t Caron or Hachek (Apostrophe Beside) - COLS9+29, // T Cedilla (Apostrophe Under) - COLS9+29, // t Cedilla (Apostrophe Under) - COLS9+29, // T Cross Bar - COLS9+29, // t Cross Bar - COLS9+30, // U Breve - COLS9+30, // u Breve - COLS9+30, // U Double Acute - COLS9+30, // u Double Acute - COLS9+30, // U Macron - COLS9+30, // u Macron - COLS9+30, // U Ogonek - COLS9+30, // u Ogonek - COLS9+30, // U Ring - COLS9+30, // u Ring - COLS9+30, // U Tilde - COLS9+30, // u Tilde - COLS9+32, // W Circumflex - COLS9+32, // w Circumflex - COLS9+34, // Y Circumflex - COLS9+34, // y Circumflex - COLS9+35, // Z Acute - COLS9+35, // z Acute - COLS9+35, // Z Caron or Hachek - COLS9+35, // z Caron or Hachek - COLS9+35, // Z Dot Above - COLS9+35, // z Dot Above - COLS9+19, // Uppercase Eng - COLS9+19, // Lowercase Eng - - // other - - COLS9+6, // D Macron - COLS9+6, // d Macron - COLS9+16, // L Macron - COLS9+16, // l Macron - COLS9+19, // N Macron - COLS9+19, // n Macron - COLS9+25, // R Grave - COLS9+25, // r Grave - COLS9+27, // S Macron - COLS9+27, // s Macron - COLS9+29, // T Macron - COLS9+29, // t Macron - COLS9+34, // Y Breve - COLS9+34, // y Breve - COLS9+34, // Y Grave - COLS9+34, // y Grave - COLS9+6, // D Apostrophe Beside - COLS9+6, // d Apostrophe Beside - COLS9+21, // O Apostrophe Beside - COLS9+21, // o Apostrophe Beside - COLS9+30, // U Apostrophe Beside - COLS9+30, // u Apostrophe Beside - COLS9+7, // E breve - COLS9+7, // e breve - COLS9+12, // I breve - COLS9+12, // i breve - COLS9+12, // dotless I - COLS9+12, // dotless i - COLS9+21, // O breve - COLS9+21 // o breve -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmSym60Tbl[ SYMTBLLEN + 2] = -{ - 11, // Initial character offset - SYMTBLLEN, // Length of this table - COLS3+2, // pound - COLS3+3, // yen - COLS3+4, // pacetes - COLS3+5, // floren - COLS0, - COLS0, - COLS0, - COLS0, - COLS3+1, // cent -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmGrk60Tbl[ GRKTBLLEN + 2] = -{ - 0, // Starting offset - GRKTBLLEN, // Length - COLS7, // Uppercase Alpha - COLS7, // Lowercase Alpha - COLS7+1, // Uppercase Beta - COLS7+1, // Lowercase Beta - COLS7+1, // Uppercase Beta Medial - COLS7+1, // Lowercase Beta Medial - COLS7+2, // Uppercase Gamma - COLS7+2, // Lowercase Gamma - COLS7+3, // Uppercase Delta - COLS7+3, // Lowercase Delta - COLS7+4, // Uppercase Epsilon - COLS7+4, // Lowercase Epsilon - COLS7+5, // Uppercase Zeta - COLS7+5, // Lowercase Zeta - COLS7+6, // Uppercase Eta - COLS7+6, // Lowercase Eta - COLS7+7, // Uppercase Theta - COLS7+7, // Lowercase Theta - COLS7+8, // Uppercase Iota - COLS7+8, // Lowercase Iota - COLS7+9, // Uppercase Kappa - COLS7+9, // Lowercase Kappa - COLS7+10, // Uppercase Lambda - COLS7+10, // Lowercase Lambda - COLS7+11, // Uppercase Mu - COLS7+11, // Lowercase Mu - COLS7+12, // Uppercase Nu - COLS7+12, // Lowercase Nu - COLS7+13, // Uppercase Xi - COLS7+13, // Lowercase Xi - COLS7+14, // Uppercase Omicron - COLS7+14, // Lowercase Omicron - COLS7+15, // Uppercase Pi - COLS7+15, // Lowercase Pi - COLS7+16, // Uppercase Rho - COLS7+16, // Lowercase Rho - COLS7+17, // Uppercase Sigma - COLS7+17, // Lowercase Sigma - COLS7+17, // Uppercase Sigma Terminal - COLS7+17, // Lowercase Sigma Terminal - COLS7+18, // Uppercase Tau - COLS7+18, // Lowercase Tau - COLS7+19, // Uppercase Upsilon - COLS7+19, // Lowercase Upsilon - COLS7+20, // Uppercase Phi - COLS7+20, // Lowercase Phi - COLS7+21, // Uppercase Chi - COLS7+21, // Lowercase Chi - COLS7+22, // Uppercase Psi - COLS7+22, // Lowercase Psi - COLS7+23, // Uppercase Omega - COLS7+23, // Lowercase Omega - - // Other Modern Greek Characters [8,52] - - COLS7, // Uppercase ALPHA Tonos high prime - COLS7, // Lowercase Alpha Tonos - acute - COLS7+4, // Uppercase EPSILON Tonos - high prime - COLS7+4, // Lowercase Epslion Tonos - acute - COLS7+6, // Uppercase ETA Tonos - high prime - COLS7+6, // Lowercase Eta Tonos - acute - COLS7+8, // Uppercase IOTA Tonos - high prime - COLS7+8, // Lowercase iota Tonos - acute - COLS7+8, // Uppercase IOTA Diaeresis - COLS7+8, // Lowercase iota diaeresis - COLS7+14, // Uppercase OMICRON Tonos - high prime - COLS7+14, // Lowercase Omicron Tonos - acute - COLS7+19, // Uppercase UPSILON Tonos - high prime - COLS7+19, // Lowercase Upsilon Tonos - acute - COLS7+19, // Uppercase UPSILON Diaeresis - COLS7+19, // Lowercase Upsilon diaeresis - COLS7+23, // Uppercase OMEGA Tonos - high prime - COLS7+23, // Lowercase Omega Tonso - acute - - // Variants [8,70] - - COLS7+4, // epsilon (variant) - COLS7+7, // theta (variant) - COLS7+9, // kappa (variant) - COLS7+15, // pi (variant) - COLS7+16, // rho (variant) - COLS7+17, // sigma (variant) - COLS7+19, // upsilon (variant) - COLS7+20, // phi (variant) - COLS7+23, // omega (variant) - - // Greek Diacritic marks [8,79] - - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, - COLS0, // 8,108 end of diacritic marks - - // Ancient Greek [8,109] - - COLS7, // alpha grave - COLS7, // alpha circumflex - COLS7, // alpha w/iota - COLS7, // alpha acute w/iota - COLS7, // alpha grave w/iota - COLS7, // alpha circumflex w/Iota - COLS7, // alpha smooth - COLS7, // alpha smooth acute - COLS7, // alpha smooth grave - COLS7, // alpha smooth circumflex - COLS7, // alpha smooth w/Iota - COLS7, // alpha smooth acute w/Iota - COLS7, // alpha smooth grave w/Iota - COLS7, // alpha smooth circumflex w/Iota - COLS7, // alpha rough - COLS7, // alpha rough acute - COLS7, // alpha rough grave - COLS7, // alpha rough circumflex - COLS7, // alpha rough w/Iota - COLS7, // alpha rough acute w/Iota - COLS7, // alpha rough grave w/Iota - COLS7, // alpha rough circumflex w/Iota - COLS7+4, // epsilon grave - COLS7+4, // epsilon smooth - COLS7+4, // epsilon smooth acute - COLS7+4, // epsilon smooth grave - COLS7+4, // epsilon rough - COLS7+4, // epsilon rough acute - COLS7+4, // epsilon rough grave - COLS7+6, // eta grave - COLS7+6, // eta circumflex - COLS7+6, // eta w/iota - COLS7+6, // eta acute w/iota - COLS7+6, // eta grave w/Iota - COLS7+6, // eta circumflex w/Iota - COLS7+6, // eta smooth - COLS7+6, // eta smooth acute - COLS7+6, // eta smooth grave - COLS7+6, // eta smooth circumflex - COLS7+6, // eta smooth w/Iota - COLS7+6, // eta smooth acute w/Iota - COLS7+6, // eta smooth grave w/Iota - COLS7+6, // eta smooth circumflex w/Iota - COLS7+6, // eta rough - COLS7+6, // eta rough acute - COLS7+6, // eta rough grave - COLS7+6, // eta rough circumflex - COLS7+6, // eta rough w/Iota - COLS7+6, // eta rough acute w/Iota - COLS7+6, // eta rough grave w/Iota - COLS7+6, // eta rough circumflex w/Iota - COLS7+8, // iota grave - COLS7+8, // iota circumflex - COLS7+8, // iota acute diaeresis - COLS7+8, // iota grave diaeresis - COLS7+8, // iota smooth - COLS7+8, // iota smooth acute - COLS7+8, // iota smooth grave - COLS7+8, // iota smooth circumflex - COLS7+8, // iota rough - COLS7+8, // iota rough acute - COLS7+8, // iota rough grave - COLS7+8, // iota rough circumflex - COLS7+14, // omicron grave - COLS7+14, // omicron smooth - COLS7+14, // omicron smooth acute - COLS7+14, // omicron smooth grave - COLS7+14, // omicron rough - COLS7+14, // omicron rough acute - COLS7+14, // omicron rough grave - COLS7+16, // rho smooth - COLS7+16, // rho rough - COLS7+19, // upsilon grave - COLS7+19, // upsilon circumflex - COLS7+19, // upsilon acute diaeresis - COLS7+19, // upsilon grave diaeresis - COLS7+19, // upsilon smooth - COLS7+19, // upsilon smooth acute - COLS7+19, // upsilon smooth grave - COLS7+19, // upsilon smooth circumflex - COLS7+19, // upsilon rough - COLS7+19, // upsilon rough acute - COLS7+19, // upsilon rough grave - COLS7+19, // upsilon rough circumflex - COLS7+23, // omega grave - COLS7+23, // omega circumflex - COLS7+23, // omega w/Iota - COLS7+23, // omega acute w/Iota - COLS7+23, // omega grave w/Iota - COLS7+23, // omega circumflex w/Iota - COLS7+23, // omega smooth - COLS7+23, // omega smooth acute - COLS7+23, // omega smooth grave - COLS7+23, // omega smooth circumflex - COLS7+23, // omega smooth w/Iota - COLS7+23, // omega smooth acute w/Iota - COLS7+23, // omega smooth grave w/Iota - COLS7+23, // omega smooth circumflex w/Iota - COLS7+23, // omega rough - COLS7+23, // omega rough acute - COLS7+23, // omega rough grave - COLS7+23, // omega rough circumflex - COLS7+23, // omega rough w/Iota - COLS7+23, // omega rough acute w/Iota - COLS7+23, // omega rough grave w/Iota - COLS7+23, // omega rough circumflex w/Iota - COLS7+24, // Uppercase Stigma--the number 6 - COLS7+24, // Uppercase Digamma--Obsolete letter used as 6 - COLS7+24, // Uppercase Koppa--Obsolete letter used as 90 - COLS7+24 // Uppercase Sampi--Obsolete letter used as 900 -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmCyrl60Tbl[ CYRLTBLLEN + 2] = -{ - 0, // Starting offset - CYRLTBLLEN, // Length of table - COLS10, // Russian uppercase A - COLS10, // Russian lowercase A - COLS10+1, // Russian uppercase BE - COLS10+1, // Russian lowercase BE - COLS10+2, // Russian uppercase VE - COLS10+2, // Russian lowercase VE - COLS10+3, // Russian uppercase GHE - COLS10+3, // Russian lowercase GHE - COLS10+5, // Russian uppercase DE - COLS10+5, // Russian lowercase DE - COLS10+8, // Russian uppercase E - COLS10+8, // Russian lowercase E - COLS10+9, // Russian lowercase YO - COLS10+9, // Russian lowercase YO - COLS10+11, // Russian uppercase ZHE - COLS10+11, // Russian lowercase ZHE - COLS10+12, // Russian uppercase ZE - COLS10+12, // Russian lowercase ZE - COLS10+14, // Russian uppercase I - COLS10+14, // Russian lowercase I - COLS10+17, // Russian uppercase SHORT I - COLS10+17, // Russian lowercase SHORT I - COLS10+19, // Russian uppercase KA - COLS10+19, // Russian lowercase KA - COLS10+20, // Russian uppercase EL - COLS10+20, // Russian lowercase EL - COLS10+22, // Russian uppercase EM - COLS10+22, // Russian lowercase EM - COLS10+23, // Russian uppercase EN - COLS10+23, // Russian lowercase EN - COLS10+25, // Russian uppercase O - COLS10+25, // Russian lowercase O - COLS10+26, // Russian uppercase PE - COLS10+26, // Russian lowercase PE - COLS10+27, // Russian uppercase ER - COLS10+27, // Russian lowercase ER - COLS10+28, // Russian uppercase ES - COLS10+28, // Russian lowercase ES - COLS10+29, // Russian uppercase TE - COLS10+29, // Russian lowercase TE - COLS10+32, // Russian uppercase U - COLS10+32, // Russian lowercase U - COLS10+34, // Russian uppercase EF - COLS10+34, // Russian lowercase EF - COLS10+35, // Russian uppercase HA - COLS10+35, // Russian lowercase HA - COLS10+36, // Russian uppercase TSE - COLS10+36, // Russian lowercase TSE - COLS10+37, // Russian uppercase CHE - COLS10+37, // Russian lowercase CHE - COLS10+39, // Russian uppercase SHA - COLS10+39, // Russian lowercase SHA - COLS10+40, // Russian uppercase SHCHA - COLS10+40, // Russian lowercase SHCHA - COLS10+41, // Russian lowercase ER (also hard sign) - COLS10+41, // Russian lowercase ER (also hard sign) - COLS10+42, // Russian lowercase ERY - COLS10+42, // Russian lowercase ERY - COLS10+43, // Russian lowercase SOFT SIGN - COLS10+43, // Russian lowercase SOFT SIGN - COLS10+45, // Russian uppercase REVERSE E - COLS10+45, // Russian lowercase REVERSE E - COLS10+46, // Russian uppercase YU - COLS10+46, // Russian lowercase yu - COLS10+47, // Russian uppercase YA - COLS10+47, // Russian lowercase ya - COLS0, // Russian uppercase EH - COLS0, // Russian lowercase eh - COLS10+7, // Macedonian uppercase SOFT DJ - COLS10+7, // Macedonian lowercase soft dj - COLS10+4, // Ukrainian uppercase HARD G - COLS10+4, // Ukrainian lowercase hard g - COLS0, // GE bar - COLS0, // ge bar - COLS10+6, // Serbian uppercase SOFT DJ - COLS10+6, // Serbian lowercase SOFT DJ - COLS0, // IE (variant) - COLS0, // ie (variant) - COLS10+10, // Ukrainian uppercase YE - COLS10+10, // Ukrainian lowercase YE - COLS0, // ZHE with right descender - COLS0, // zhe with right descender - COLS10+13, // Macedonian uppercase ZELO - COLS10+13, // Macedonian lowercase ZELO - COLS0, // Old Slovanic uppercase Z - COLS0, // Old Slovanic uppercase z - COLS0, // II with macron - COLS0, // ii with mscron - COLS10+15, // Ukrainian uppercase I - COLS10+15, // Ukrainian lowercase I - COLS10+16, // Ukrainian uppercase I with Two Dots - COLS10+16, // Ukrainian lowercase I with Two Dots - COLS0, // Old Slovanic uppercase I ligature - COLS0, // Old Slovanic lowercase I ligature - COLS10+18, // Serbian--Macedonian uppercase JE - COLS10+18, // Serbian--Macedonian lowercase JE - COLS10+31, // Macedonian uppercase SOFT K - COLS10+31, // Macedonian lowercase SOFT K - COLS0, // KA with right descender - COLS0, // ka with right descender - COLS0, // KA ogonek - COLS0, // ka ogonek - COLS0, // KA vertical bar - COLS0, // ka vertical bar - COLS10+21, // Serbian--Macedonian uppercase SOFT L - COLS10+21, // Serbian--Macedonian lowercase SOFT L - COLS0, // EN with right descender - COLS0, // en with right descender - COLS10+24, // Serbian--Macedonian uppercase SOFT N - COLS10+24, // Serbian--Macedonian lowercase SOFT N - COLS0, // ROUND OMEGA - COLS0, // round omega - COLS0, // OMEGA - COLS0, // omega - COLS10+30, // Serbian uppercase SOFT T - COLS10+30, // Serbian lowercase SOFT T - COLS10+33, // Byelorussian uppercase SHORT U - COLS10+33, // Byelorussian lowercase SHORT U - COLS0, // U with macron - COLS0, // u with macron - COLS0, // STRAIGHT U - COLS0, // straight u - COLS0, // STRAIGHT U bar - COLS0, // straight u bar - COLS0, // OU ligature - COLS0, // ou ligature - COLS0, // KHA with right descender - COLS0, // kha with right descender - COLS0, // KHA ogonek - COLS0, // kha ogonek - COLS0, // H - COLS0, // h - COLS0, // OMEGA titlo - COLS0, // omega titlo - COLS10+38, // Serbian uppercase HARD DJ - COLS10+38, // Serbian lowercase HARD DJ - COLS0, // CHE with right descender - COLS0, // che with right descender - COLS0, // CHE vertical bar - COLS0, // che vertical bar - COLS0, // Old Slavonic SHCHA (variant) - COLS0, // old SLAVONIC shcha (variant) - COLS10+44, // Old Russian uppercase YAT - COLS10+44, // Old Russian lowercase YAT - - // END OF UNIQUE COLLATED BYTES - // CHARACTERS BELOW MUST HAVE HAVE THEIR OWN - // SUB-COLLATION VALUE TO COMPARE CORRECTLY. - - COLS0, // Old Bulgarian uppercase YUS - COLS0, // Old Bulgarian lowercase YUS - COLS0, // Old Slovanic uppercase YUS MALYI - COLS0, // Old Slovanic uppercase YUS MALYI - COLS0, // KSI - COLS0, // ksi - COLS0, // PSI - COLS0, // psi - COLS0, // Old Russian uppercase FITA - COLS0, // Old Russian lowercase FITA - COLS0, // Old Russian uppercase IZHITSA - COLS0, // Old Russian lowercase IZHITSA - COLS0, // Russian uppercase A acute - COLS0, // Russian lowercase A acute - COLS10+8, // Russian uppercase E acute - COLS10+8, // Russian lowercase E acute - COLS0, // E acute - COLS0, // e acute - COLS10+14, // II acute - COLS10+14, // ii acute - COLS0, // I acute - COLS0, // i acute - COLS0, // YI acute - COLS0, // yi acute - COLS10+25, // O acute - COLS10+25, // o acute - COLS10+32, // U acute - COLS10+32, // u acute - COLS10+42, // YERI acute - COLS10+42, // YERI acute - COLS10+45, // REVERSED E acute - COLS10+45, // reversed e acute - COLS10+46, // YU acute - COLS10+46, // yu acute - COLS10+47, // YA acute - COLS10+47, // ya acute - COLS10, // A grave - COLS10, // a grave - COLS10+8, // E grave - COLS10+8, // e grave - COLS10+9, // YO grave - COLS10+9, // yo grave - COLS10+14, // I grave - COLS10+14, // i grave - COLS10+25, // O grave - COLS10+25, // o grave - COLS10+32, // U grave - COLS10+32, // u grave - COLS10+42, // YERI grave - COLS10+42, // yeri grave - COLS10+45, // REVERSED E grave - COLS10+45, // reversed e grave - COLS10+46, // IU (YU) grave - COLS10+46, // iu (yu) grave - COLS10+47, // ia (YA) grave - COLS10+47, // ia (ya) grave ******* [10,199] -}; - -/**************************************************************************** -Desc: The Hebrew characters are collated over the Russian characters. - Therefore sorting both Hebrew and Russian is impossible to do. -****************************************************************************/ -FLMBYTE flmHeb60TblA[ HEBTBL1LEN + 2] = -{ - 0, // Starting offset - HEBTBL1LEN, // Length of table - COLS10h+0, // Alef - COLS10h+1, // Bet - COLS10h+2, // Gimel - COLS10h+3, // Dalet - COLS10h+4, // He - COLS10h+5, // Vav - COLS10h+6, // Zayin - COLS10h+7, // Het - COLS10h+8, // Tet - COLS10h+9, // Yod - COLS10h+10, // Kaf (final) [9,10] - COLS10h+11, // Kaf - COLS10h+12, // Lamed - COLS10h+13, // Mem (final) - COLS10h+14, // Mem - COLS10h+15, // Nun (final) - COLS10h+16, // Nun - COLS10h+17, // Samekh - COLS10h+18, // Ayin - COLS10h+19, // Pe (final) - COLS10h+20, // Pe [9,20] - COLS10h+21, // Tsadi (final) - COLS10h+22, // Tsadi - COLS10h+23, // Qof - COLS10h+24, // Resh - COLS10h+25, // Shin - COLS10h+26 // Tav [9,26] -}; - -/**************************************************************************** -Desc: This is the ANCIENT HEBREW SCRIPT piece. The actual value will be - stored in the subcollation. This way we don't play - diacritic/subcollation games. -****************************************************************************/ -FLMBYTE flmHeb60TblB[ HEBTBL2LEN + 2] = -{ - 84, - HEBTBL2LEN, - COLS10h+0, // Alef Dagesh [9,84] - COLS10h+1, // Bet Dagesh - COLS10h+1, // Vez - looks like a bet - COLS10h+2, // Gimel Dagesh - COLS10h+3, // Dalet Dagesh - COLS10h+4, // He Dagesh - COLS10h+5, // Vav Dagesh [9,90] - COLS10h+5, // Vav Holem - COLS10h+6, // Zayin Dagesh - COLS10h+7, // Het Dagesh - COLS10h+8, // Tet Dagesh - COLS10h+9, // Yod Dagesh - COLS10h+9, // Yod Hiriq [9,96] - not on my list - COLS10h+11, // Kaf Dagesh - COLS10h+10, // Kaf Dagesh (final) - COLS10h+10, // Kaf Sheva (final) - COLS10h+10, // Kaf Tsere (final) [9,100] - COLS10h+10, // Kaf Segol (final) - COLS10h+10, // Kaf Patah (final) - COLS10h+10, // Kaf Qamats (final) - COLS10h+10, // Kaf Dagesh Qamats (final) - COLS10h+12, // Lamed Dagesh - COLS10h+14, // Mem Dagesh - COLS10h+16, // Nun Dagesh - COLS10h+15, // Nun Qamats (final) - COLS10h+17, // Samekh Dagesh - COLS10h+20, // Pe Dagesh [9,110] - COLS10h+20, // Fe - just guessing this is like Pe - was +21 - COLS10h+22, // Tsadi Dagesh - COLS10h+23, // Qof Dagesh - COLS10h+25, // Sin (with sin dot) - COLS10h+25, // Sin Dagesh (with sin dot) - COLS10h+25, // Shin - COLS10h+25, // Shin Dagesh - COLS10h+26 // Tav Dagesh [9,118] -}; - -/**************************************************************************** -Desc: The Arabic characters are collated OVER the Russian characters - Therefore sorting both Arabic and Russian in the same database - is not supported. - - Arabic starts with a bunch of accents/diacritic marks that are - Actually placed OVER a preceeding character. These accents are - ignored while sorting the first pass - when collation == COLS0. - - There are 4 possible states for all/most arabic characters: - ÚÙ - occurs as the only character in a word - ÄÙ - appears at the first of the word - ÄÄ - appears at the middle of a word - ÚÄ - appears at the end of the word - - Usually only the simple version of the letter is stored. - Therefore we should not have to worry about sub-collation - of these characters. - - The arabic characters with diacritics differ however. The alef has - sub-collation values to sort correctly. There is not any more room - to add more collation values. Some chars in CS14 are combined when - urdu, pashto and sindhi characters overlap. -****************************************************************************/ -FLMBYTE flmAr160Tbl[ AR1TBLLEN + 2] = -{ - 38, // Starting offset - AR1TBLLEN, // Length of table - COLLS+2, // , comma - COLLS+3, // : colon - COLLS+7, // ? question mark - COLS4+2, // * asterick - COLS6, // % percent - COLS9+41, // >> alphabetic - end of list) - COLS9+40, // << alphabetic - end of list) - COLS2, // ( - COLS2+1, // ) - COLS8+1, // ÚÙ One - COLS8+2, // ÚÙ Two - COLS8+3, // ÚÙ Three - COLS8+4, // ÚÙ Four - COLS8+5, // ÚÙ Five - COLS8+6, // ÚÙ Six - COLS8+7, // ÚÙ Seven - COLS8+8, // ÚÙ Eight - COLS8+9, // ÚÙ Nine - COLS8+0, // ÚÙ Zero - COLS8+2, // ÚÙ Two (Handwritten) - COLS10a+1, // ÚÙ alif - COLS10a+1, // ÚÄ alif - COLS10a+2, // ÚÙ ba - COLS10a+2, // ÄÙ ba - COLS10a+2, // ÄÄ ba - COLS10a+2, // ÚÄ ba - COLS10a+6, // ÚÙ ta - COLS10a+6, // ÄÙ ta - COLS10a+6, // ÄÄ ta - COLS10a+6, // ÚÄ ta - COLS10a+8, // ÚÙ tha - COLS10a+8, // ÄÙ tha - COLS10a+8, // ÄÄ tha - COLS10a+8, // ÚÄ tha - COLS10a+12, // ÚÙ jiim - COLS10a+12, // ÄÙ jiim - COLS10a+12, // ÄÄ jiim - COLS10a+12, // ÚÄ jiim - COLS10a+16, // ÚÙ Ha - COLS10a+16, // ÄÙ Ha - COLS10a+16, // ÄÄ Ha - COLS10a+16, // ÚÄ Ha - COLS10a+17, // ÚÙ kha - COLS10a+17, // ÄÙ kha - COLS10a+17, // ÄÄ kha - COLS10a+17, // ÚÄ kha - COLS10a+20, // ÚÙ dal - COLS10a+20, // ÚÄ dal - COLS10a+22, // ÚÙ dhal - COLS10a+22, // ÚÄ dhal - COLS10a+27, // ÚÙ ra - COLS10a+27, // ÚÄ ra - COLS10a+29, // ÚÙ ziin - COLS10a+29, // ÚÄ ziin - COLS10a+31, // ÚÙ siin - COLS10a+31, // ÄÙ siin - COLS10a+31, // ÄÄ siin - COLS10a+31, // ÚÄ siin - COLS10a+32, // ÚÙ shiin - COLS10a+32, // ÄÙ shiin - COLS10a+32, // ÄÄ shiin - COLS10a+32, // ÚÄ shiin - COLS10a+34, // ÚÙ Sad - COLS10a+34, // ÄÙ Sad - COLS10a+34, // ÄÄ Sad - COLS10a+34, // ÚÄ Sad - COLS10a+35, // ÚÙ Dad - COLS10a+35, // ÄÙ Dad - COLS10a+35, // ÄÄ Dad - COLS10a+35, // ÚÄ Dad - COLS10a+36, // ÚÙ Ta - COLS10a+36, // ÄÙ Ta - COLS10a+36, // ÄÄ Ta - COLS10a+36, // ÚÄ Ta - COLS10a+37, // ÚÙ Za - COLS10a+37, // ÄÙ Za - COLS10a+37, // ÄÄ Za - COLS10a+37, // ÚÄ Za - COLS10a+38, // ÚÙ 'ain - COLS10a+38, // ÄÙ 'ain - COLS10a+38, // ÄÄ 'ain - COLS10a+38, // ÚÄ 'ain - COLS10a+39, // ÚÙ ghain - COLS10a+39, // ÄÙ ghain - COLS10a+39, // ÄÄ ghain - COLS10a+39, // ÚÄ ghain - COLS10a+40, // ÚÙ fa - COLS10a+40, // ÄÙ fa - COLS10a+40, // ÄÄ fa - COLS10a+40, // ÚÄ fa - COLS10a+42, // ÚÙ Qaf - COLS10a+42, // ÄÙ Qaf - COLS10a+42, // ÄÄ Qaf - COLS10a+42, // ÚÄ Qaf - COLS10a+43, // ÚÙ kaf - COLS10a+43, // ÄÙ kaf - COLS10a+43, // ÄÄ kaf - COLS10a+43, // ÚÄ kaf - COLS10a+46, // ÚÙ lam - COLS10a+46, // ÄÙ lam - COLS10a+46, // ÄÄ lam - COLS10a+46, // ÚÄ lam - COLS10a+47, // ÚÙ miim - COLS10a+47, // ÄÙ miim - COLS10a+47, // ÄÄ miim - COLS10a+47, // ÚÄ miim - COLS10a+48, // ÚÙ nuun - COLS10a+48, // ÄÙ nuun - COLS10a+48, // ÄÄ nuun - COLS10a+48, // ÚÄ nuun - COLS10a+49, // ÚÙ ha - COLS10a+49, // ÄÙ ha - COLS10a+49, // ÄÄ ha - COLS10a+49, // ÚÄ ha - COLS10a+6, // ÚÙ ta marbuuTah - COLS10a+6, // ÚÄ ta marbuuTah - COLS10a+50, // ÚÙ waw - COLS10a+50, // ÚÄ waw - COLS10a+53, // ÚÙ ya - COLS10a+53, // ÄÙ ya - COLS10a+53, // ÄÄ ya - COLS10a+53, // ÚÄ ya - COLS10a+52, // ÚÙ alif maqSuurah - COLS10a+52, // ÄÙ ya maqSuurah? - COLS10a+52, // ÄÄ ya maqSuurah? - COLS10a+52, // ÚÄ alif maqSuurah - COLS10a+0, // ÚÙ hamzah accent - never appears alone - - // Store the sub-collation as the actual - // character value from this point on - - COLS10a+1, // ÚÙ alif hamzah - COLS10a+1, // ÚÄ alif hamzah - COLS10a+1, // ÚÙ hamzah-under-alif - COLS10a+1, // ÚÄ hamzah-under-alif - COLS10a+1, // ÚÙ waw hamzah - COLS10a+1, // ÚÄ waw hamzah - COLS10a+1, // ÚÙ ya hamzah - COLS10a+1, // ÄÙ ya hamzah - COLS10a+1, // ÄÄ ya hamzah - COLS10a+1, // ÚÄ ya hamzah - COLS10a+1, // ÚÙ alif fatHataan - COLS10a+1, // ÚÄ alif fatHataan - COLS10a+1, // ÚÙ alif maddah - COLS10a+1, // ÚÄ alif maddah - COLS10a+1, // ÚÙ alif waSlah - COLS10a+1, // ÚÄ alif waSlah (final) - - // LIGATURES - // Should NEVER be stored so will not worry - // about breaking up into pieces for collation. - // NOTE: - // Let's store the "Lam" collation value (+42) - // below and in the sub-collation store the - // actual character. This will sort real close. - // The best implementation is to - // break up ligatures into its base pieces. - - COLS10a+46, // ÚÙ lamalif - COLS10a+46, // ÚÄ lamalif - COLS10a+46, // ÚÙ lamalif hamzah - COLS10a+46, // ÚÄ lamalif hamzah - COLS10a+46, // ÚÙ hamzah-under-lamalif - COLS10a+46, // ÚÄ hamzah-under-lamalif - COLS10a+46, // ÚÙ lamalif fatHataan - COLS10a+46, // ÚÄ lamalif fatHataan - COLS10a+46, // ÚÙ lamalif maddah - COLS10a+46, // ÚÄ lamalif maddah - COLS10a+46, // ÚÙ lamalif waSlah - COLS10a+46, // ÚÄ lamalif waSlah - COLS10a+46, // ÚÙ Allah - khaDalAlif - COLS0_ARABIC, // ÄÄ taTwiil - COLS0_ARABIC // ÄÄ taTwiil -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmAlefSubColTbl[] = -{ - 1, // ÚÙ alif hamzah - 1, // ÚÄ alif hamzah - 3, // ÚÙ hamzah-under-alif - 3, // ÚÄ hamzah-under-alif - 2, // ÚÙ waw hamzah - 2, // ÚÄ waw hamzah - 4, // ÚÙ ya hamzah - 4, // ÄÙ ya hamzah - 4, // ÄÄ ya hamzah - 4, // ÚÄ ya hamzah - 5, // ÚÙ alif fatHataan - 5, // ÚÄ alif fatHataan - 0, // ÚÙ alif maddah - 0, // ÚÄ alif maddah - 6, // ÚÙ alif waSlah - 6 // ÚÄ alif waSlah (final) -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmAr260Tbl[ AR2TBLLEN + 2] = -{ - 41, // Starting offset - AR2TBLLEN, // Length of table - COLS8+4, // Farsi and Urdu Four - COLS8+4, // Urdu Four - COLS8+5, // Farsi and Urdu Five - COLS8+6, // Farsi Six - COLS8+6, // Farsi and Urdu Six - COLS8+7, // Urdu Seven - COLS8+8, // Urdu Eight - COLS10a+3, // Sindhi bb - baa /w 2 dots below (67b) - COLS10a+3, - COLS10a+3, - COLS10a+3, - COLS10a+4, // Sindhi bh - baa /w 4 dots below (680) - COLS10a+4, - COLS10a+4, - COLS10a+4, - COLS10a+5, // Malay, Kurdish, Pashto, Farsi, Sindhi, and Urdu p - COLS10a+5, // =peh - taa /w 3 dots below (67e) - COLS10a+5, - COLS10a+5, - COLS10a+7, // Urdu T - taa /w small tah - COLS10a+7, - COLS10a+7, - COLS10a+7, - COLS10a+7, // Pashto T - taa /w ring (forced to combine) - COLS10a+7, - COLS10a+7, - COLS10a+7, - COLS10a+9, // Sindhi th - taa /w 4 dots above (67f) - COLS10a+9, - COLS10a+9, - COLS10a+9, - COLS10a+10, // Sindhi Tr - taa /w 3 dots above (67d) - COLS10a+10, - COLS10a+10, - COLS10a+10, - COLS10a+11, // Sindhi Th - taa /w 2 dots above (67a) - COLS10a+11, - COLS10a+11, - COLS10a+11, - COLS10a+13, // Sindhi jj - haa /w 2 middle dots verticle (684) - COLS10a+13, - COLS10a+13, - COLS10a+13, - COLS10a+14, // Sindhi ny - haa /w 2 middle dots (683) - COLS10a+14, - COLS10a+14, - COLS10a+14, - COLS10a+15, // Malay, Kurdish, Pashto, Farsi, Sindhi, and Urdu ch - COLS10a+15, // =tcheh (686) - COLS10a+15, - COLS10a+15, - COLS10a+15, // Sindhi chh - haa /w middle 4 dots (687) - COLS10a+15, // forced to combine - COLS10a+15, - COLS10a+15, - COLS10a+18, // Pashto ts - haa /w 3 dots above (685) - COLS10a+18, - COLS10a+18, - COLS10a+18, - COLS10a+19, // Pashto dz - hamzah on haa (681) - COLS10a+19, - COLS10a+19, - COLS10a+19, - COLS10a+21, // Urdu D - dal /w small tah (688) - COLS10a+21, - COLS10a+21, // Pashto D - dal /w ring (689) forced to combine - COLS10a+21, - COLS10a+23, // Sindhi dh - dal /w 2 dots above (68c) - COLS10a+23, - COLS10a+24, // Sindhi D - dal /w 3 dots above (68e) - COLS10a+24, - COLS10a+25, // Sindhi Dr - dal /w dot below (68a) - COLS10a+25, - COLS10a+26, // Sindhi Dh - dal /w 2 dots below (68d) - COLS10a+26, - COLS10a+28, // Pashto r - ra /w ring (693) - COLS10a+28, - COLS10a+28, // Urdu R - ra /w small tah (691) forced to combine - COLS10a+28, - COLS10a+28, // Sindhi r - ra /w 4 dots above (699) forced to combine - COLS10a+28, - COLS10a+27, // Kurdish rolled r - ra /w 'v' below (695) - COLS10a+27, - COLS10a+27, - COLS10a+27, - COLS10a+30, // Kurdish, Pashto, Farsi, Sindhi, and Urdu Z - COLS10a+30, // = jeh - ra /w 3 dots above (698) - COLS10a+30, // Pashto zz - ra /w dot below & dot above (696) - COLS10a+30, // forced to combine - COLS10a+30, // Pashto g - not in unicode! - forced to combine - COLS10a+30, - COLS10a+33, // Pashto x - seen dot below & above (69a) - COLS10a+33, - COLS10a+33, - COLS10a+33, - COLS10a+39, // Malay ng - old maly ain /w 3 dots above (6a0) - COLS10a+39, // forced to combine - COLS10a+39, - COLS10a+39, - COLS10a+41, // Malay p, Kurdish v - Farsi ? - fa /w 3 dots above - COLS10a+41, // = veh - means foreign words (6a4) - COLS10a+41, - COLS10a+41, - COLS10a+41, // Sindhi ph - fa /w 4 dots above (6a6) forced to combine - COLS10a+41, - COLS10a+41, - COLS10a+41, - COLS10a+43, // Misc k - open caf (6a9) - COLS10a+43, - COLS10a+43, - COLS10a+43, - COLS10a+43, // misc k - no unicode - forced to combine - COLS10a+43, - COLS10a+43, - COLS10a+43, - COLS10a+43, // Sindhi k - swash caf (various) (6aa) -forced to combine - COLS10a+43, - COLS10a+43, - COLS10a+43, - COLS10a+44, // Persian/Urdu g - gaf (6af) - COLS10a+44, - COLS10a+44, - COLS10a+44, - COLS10a+44, // Persian/Urdu g - no unicode - COLS10a+44, - COLS10a+44, - COLS10a+44, - COLS10a+44, // malay g - gaf /w ring (6b0) - COLS10a+44, - COLS10a+44, - COLS10a+44, - COLS10a+44, // Sindhi ng - gaf /w 2 dots above (6ba) - COLS10a+44, // forced to combine ng only - COLS10a+44, - COLS10a+44, - COLS10a+45, // Sindhi gg - gaf /w 2 dots vertical below (6b3) - COLS10a+45, - COLS10a+45, - COLS10a+45, - COLS10a+46, // Kurdish velar l - lam /w small v (6b5) - COLS10a+46, - COLS10a+46, - COLS10a+46, - COLS10a+46, // Kurdish Lamalif with diacritic - no unicode - COLS10a+46, - COLS10a+48, // Urdu n - dotless noon (6ba) - COLS10a+48, - COLS10a+48, - COLS10a+48, - COLS10a+48, // Pashto N - noon /w ring (6bc) - forced to combine - COLS10a+48, - COLS10a+48, - COLS10a+48, - COLS10a+48, // Sindhi N - dotless noon/w small tah (6bb) - COLS10a+48, // forced to combine - COLS10a+48, - COLS10a+48, - COLS10a+50, // Kurdish o - waw /w small v (6c6) - COLS10a+50, - COLS10a+50, // Kurdish o - waw /w bar above (6c5) - COLS10a+50, - COLS10a+50, // Kurdish o - waw /w 2 dots above (6ca) - COLS10a+50, - COLS10a+51, // Urdu h - no unicode - COLS10a+51, - COLS10a+51, - COLS10a+51, - COLS10a+52, // Kurdish ˆ - ya /w small v (6ce) - COLS10a+52, - COLS10a+52, - COLS10a+52, - COLS10a+54, // Urdu y - ya barree (6d2) - COLS10a+54, - COLS10a+54, // Malay ny - ya /w 3 dots below (6d1) forced to combine - COLS10a+54, - COLS10a+54, - COLS10a+54, - COLS10a+51, // Farsi hamzah - hamzah on ha (6c0) forced to combine - COLS10a+51 -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE flmAr2BitTbl[] = -{ - 0xF0, // 64..71 - 0x00, // 72..79 - 0x00, // 80..87 - 0x0F, // 88..95 - 92..95 - 0x00, // 96..103 - 0x00, // 104..111 - 0x03, // 112..119 - 0xFC, // 120..127 - 0xFF, // 128..135 - 0xF0, // 136..143 - 136..139 - 0xFF, // 144..151 - 144..147, 148..159 - 0xFF, // 152..159 - 0x0F, // 160..167 - 164..175 - 0xFF, // 168..175 - 0x0F, // 176..183 - 180..185 - 0xFF, // 184..191 - 186..197 - 0xFF, // 192..199 - 198..203 - 0xFF, // 200..207 - 204..207 - 0xF3, // 208..215 - 208..211 , 214..217 - 0xF0 // 216..219 - 218..219 -}; - -/**************************************************************************** -Desc: This table describes and gives addresses for collating - character sets. Each line corresponds to a character set. -****************************************************************************/ -TBL_B_TO_BP flmCol60Tbl[] = -{ - {CHSASCI, flmAsc60Tbl}, // ascii - " " - "~" - {CHSMUL1, flmMn60Tbl}, // multinational - {CHSSYM1, flmSym60Tbl}, // symbols - {CHSGREK, flmGrk60Tbl}, // Greek - {CHSCYR, flmCyrl60Tbl}, // Cyrillic - Russian - {0xFF, 0} // table terminator -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -TBL_B_TO_BP flmHebArabicCol60Tbl[] = -{ - {CHSASCI, flmAsc60Tbl}, // ascii - " " - "~" - {CHSMUL1, flmMn60Tbl}, // multinational - {CHSSYM1, flmSym60Tbl}, // symbols - {CHSGREK, flmGrk60Tbl}, // Greek - {CHSHEB, flmHeb60TblA}, // Hebrew - {CHSHEB, flmHeb60TblB}, // Hebrew - {CHSARB1, flmAr160Tbl}, // Arabic Set 1 - {CHSARB2, flmAr260Tbl}, // Arabic Set 2 - {0xff, 0} // table terminator -}; - -/**************************************************************************** -Desc: The diacritical to collated table translates the first 26 characters - of character set #1 into a 5 bit value for "correct" sorting - sequence for that diacritical (DCV) - diacritic collated value. - - The attempt here is to convert the collated character value - along with the DCV to form the original character. - - The diacriticals are in an order to fit the most languages. - Czech, Swedish, and Finnish will have to manual reposition the - ring above (assign it a value greater then the umlaut) - - This table is index by the diacritical value. -****************************************************************************/ -FLMBYTE flmDia60Tbl[] = -{ - 2, // grave offset = 0 - 16, // centerd offset = 1 - 7, // tilde offset = 2 - 4, // circum offset = 3 - 12, // crossb offset = 4 - 10, // slash offset = 5 - 1, // acute offset = 6 - 6, // umlaut offset = 7 - // In SU, SV and CZ will = 9 - 17, // macron offset = 8 - 18, // aposab offset = 9 - 19, // aposbes offset = 10 - 20, // aposba offset = 11 - 21, // aposbc offset = 12 - 22, // abosbl offset = 13 - 8, // ring offset = 14 - 13, // dota offset = 15 - 23, // dacute offset = 16 - 11, // cedilla offset = 17 - 14, // ogonek offset = 18 - 5, // caron offset = 19 - 15, // stroke offset = 20 - 24, // bara offset = 21 - 3, // breve offset = 22 - 0, // dbls offset = 23 sorts as 'ss' - 25, // dotlesi offset = 24 - 26 // dotlesj offset = 25 -}; - /**************************************************************************** Desc: Map special chars in CharSet (x24) to collation values ****************************************************************************/ @@ -2139,7 +584,7 @@ FLMUINT16 HebArabColToWPChr[ ] = /**************************************************************************** Desc: ****************************************************************************/ -FLMUINT16 ArabSubColToWPChr[] = +FLMUINT16 ArabSubColToWPChr[] = { 0x0D00 +177, // Alef maddah 0x0D00 +165, // Alef Hamzah @@ -2186,94 +631,6 @@ FLMBYTE ml1_COLtoD[ 27] = 25 // dotlesj sort value = 26 }; -/**************************************************************************** -Desc: -****************************************************************************/ -FLMUINT16 flmIndexi[] = -{ - 0, - 11, - 14, - 15, - 17, - 18, - 19, - 21, - 22, - 23, - 24, - 25, - 26, - 35, - 59 -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMUINT16 flmIndexj[] = -{ - FLM_CA_LANG, // Catalan - FLM_CF_LANG, // Canadian French - FLM_CZ_LANG, // Czech - FLM_SL_LANG, // Slovak - FLM_DE_LANG, // German - FLM_SD_LANG, // Swiss German - FLM_ES_LANG, // Spanish (Spain) - FLM_FR_LANG, // French - FLM_NL_LANG, // Netherlands - 0xFFFF, // DK_LANG, Danish - 0xFFFF, // NO_LANG, Norwegian - 0x0063, // c - 0x006c, // l - 0x0197, // l with center dot - 0x0063, // c - 0x0125, // ae digraph - 0x01a7, // oe digraph - 0x0068, // h - 0x0068, // h - 0x006c, // l - 0x0101, // center dot alone - 0x006c, // l - 0x0117, // á (for German) - 0x018b, // ij digraph - 0x0000, // was 'a' - will no longer map 'aa' to a-ring - 0x0000, // was 'a' - FLM_CZ_LANG, - FLM_DK_LANG, - FLM_NO_LANG, - FLM_SL_LANG, - FLM_TK_LANG, - FLM_SU_LANG, - FLM_IS_LANG, - FLM_SV_LANG, - FLM_YK_LANG, - 0x011e, // A diaeresis - 0x011f, // a diaeresis - 0x0122, // A ring - 0x0123, // a ring - 0x0124, // AE diagraph - 0x0125, // ae diagraph - 0x013e, // O diaeresis - 0x013f, // o diaeresis - 0x0146, // U diaeresis - 0x0147, // u diaeresis - 0x0150, // O slash - 0x0151, // o slash - 0x0A3a, // CYRILLIC SOFT SIGN - 0x0A3b, // CYRILLIC soft sign - 0x01ee, // dotless i - turkish - 0x01ef, // dotless I - turkish - 0x0162, // C Hacek/caron - 0x0163, // c Hacek/caron - 0x01aa, // R Hacek/caron - 0x01ab, // r Hacek/caron - 0x01b0, // S Hacek/caron - 0x01b1, // s Hacek/caron - 0x01ce, // Z Hacek/caron - 0x01cf, // z Hacek/caron -}; - /**************************************************************************** Desc: Kana subcollation values BIT 0: set if large char @@ -2303,7 +660,7 @@ FLMBYTE flmKanaSubColTbl[] = Desc: Map KataKana (CharSet x26) to collation values. Kana collating values are two byte values where the high byte is 0x01. ****************************************************************************/ -FLMBYTE KanaColTbl[] = +FLMBYTE KanaColTbl[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, // a A i I u U e E o O 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, // KA GA KI GI KU GU KE GE KO GO @@ -2393,299 +750,98 @@ static FLMBYTE ColToKanaTbl[ 48] = }; /**************************************************************************** -Desc: Maps from charset 11 to CS24 (punctuation) (starting from 11,0) -****************************************************************************/ -FLMBYTE From0AToZen[] = -{ - 0, 9, 40, 0x53, // sp ! " # - 0x4f, 0x52, 0x54, 38, // $ % & ' - 0x29, 0x2a, 0x55, 0x3b, // ( ) * + - 3, 0x1d, 4, 0x1e // , - . / -}; +Desc: The diacritical to collated table translates the first 26 characters + of character set #1 into a 5 bit value for "correct" sorting + sequence for that diacritical (DCV) - diacritic collated value. -/**************************************************************************** -Desc: + The attempt here is to convert the collated character value + along with the DCV to form the original character. + + The diacriticals are in an order to fit the most languages. + Czech, Swedish, and Finnish will have to manual reposition the + ring above (assign it a value greater then the umlaut) + + This table is index by the diacritical value. ****************************************************************************/ -FLMBYTE From0BToZen[] = +FLMBYTE flmDia60Tbl[] = { - 6, 7, 0x42, 0x40, // : ; < = - 0x43, 8, 0x56 // > ? @ + 2, // grave offset = 0 + 16, // centerd offset = 1 + 7, // tilde offset = 2 + 4, // circum offset = 3 + 12, // crossb offset = 4 + 10, // slash offset = 5 + 1, // acute offset = 6 + 6, // umlaut offset = 7 + // In SU, SV and CZ will = 9 + 17, // macron offset = 8 + 18, // aposab offset = 9 + 19, // aposbes offset = 10 + 20, // aposba offset = 11 + 21, // aposbc offset = 12 + 22, // abosbl offset = 13 + 8, // ring offset = 14 + 13, // dota offset = 15 + 23, // dacute offset = 16 + 11, // cedilla offset = 17 + 14, // ogonek offset = 18 + 5, // caron offset = 19 + 15, // stroke offset = 20 + 24, // bara offset = 21 + 3, // breve offset = 22 + 0, // dbls offset = 23 sorts as 'ss' + 25, // dotlesi offset = 24 + 26 // dotlesj offset = 25 }; /**************************************************************************** Desc: ****************************************************************************/ -FLMBYTE From0CToZen[] = +FLMBYTE flmAlefSubColTbl[] = { - 0x2d, 0x1f, 0x2e, // [ \ ] - 0x0f, 0x11, 0x0d // ^ _ ` -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -FLMBYTE From0DToZen[] = -{ - 0x2f, 0x22, 0x30, 0x20 // { | } ~ + 1, // ÚÙ alif hamzah + 1, // ÚÄ alif hamzah + 3, // ÚÙ hamzah-under-alif + 3, // ÚÄ hamzah-under-alif + 2, // ÚÙ waw hamzah + 2, // ÚÄ waw hamzah + 4, // ÚÙ ya hamzah + 4, // ÄÙ ya hamzah + 4, // ÄÄ ya hamzah + 4, // ÚÄ ya hamzah + 5, // ÚÙ alif fatHataan + 5, // ÚÄ alif fatHataan + 0, // ÚÙ alif maddah + 0, // ÚÄ alif maddah + 6, // ÚÙ alif waSlah + 6 // ÚÄ alif waSlah (final) }; /**************************************************************************** Desc: ****************************************************************************/ -FLMBYTE From8ToZen[] = -{ - 0x5e, 0x7e, 0x5f, 0x7f, 0x5f, 0xFF, 0x60, 0x80, - 0x61, 0x81, 0x62, 0x82, 0x63, 0x83, 0x64, 0x84, - 0x65, 0x85, 0x66, 0x86, 0x67, 0x87, 0x68, 0x88, - 0x69, 0x89, 0x6a, 0x8a, 0x6b, 0x8b, 0x6c, 0x8c, - 0x6d, 0x8d, 0x6e, 0x8e, 0x6f, 0x8f, 0x6f, 0xFF, - 0x70, 0x90, 0x71, 0x91, 0x72, 0x92, 0x73, 0x93, - 0x74, 0x94, 0x75, 0x95 -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -static FLMBYTE From11AToZen[] = -{ - 2, // japanese period - 0x35, // left bracket - 0x36, // right bracket - 0x01, // comma - 0x05 // chuuten -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -static FLMBYTE From11BToZen[] = -{ - 0x51, // wo - 0,2,4,6,8,0x42,0x44,0x46,0x22, // small a i u e o ya yu yo tsu - 0xFF, 1, 3, 5, 7, 9, // dash (x241b) a i u e o - 0x0a, 0x0c, 0x0e, 0x10, 0x12, // ka ki ku ke ko - 0x14, 0x16, 0x18, 0x1a, 0x1c, // sa shi su se so - 0x1e, 0x20, 0x23, 0x25, 0x27, // ta chi tsu te to - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, // na ni nu ne no - 0x2e, 0x31, 0x34, 0x37, 0x3a, // ha hi fu he ho - 0x3d, 0x3e, 0x3f, 0x40, 0x41, // ma mi mu me mo - 0x43, 0x45, 0x47, // ya yu yo - 0x48, 0x49, 0x4a, 0x4b, 0x4c, // ra ri ru re ro - 0x4e, 0x52 // WA N -}; - -/**************************************************************************** -Desc: Convert Zenkaku (double wide) to Hankaku (single wide) - Character set 0x24 maps to single wide chars in other char sets. - This enables collation values to be found on some symbols. - This is also used to convert symbols from hankaku to Zen24. -****************************************************************************/ -BYTE_WORD_TBL Zen24ToHankaku[] = -{ - { 0 ,0x0020 }, // space - { 1 ,0x0b03 }, // japanese comma - { 2 ,0x0b00 }, // circle period - { 3 , 44 }, // comma - { 4 , 46 }, // period - { 5 ,0x0b04 }, // center dot - { 6 , 58 }, // colon - { 7 , 59 }, // semicolon - { 8 , 63 }, // question mark - { 9 , 33 }, // exclamation mark - { 10 ,0x0b3d }, // dakuten - { 11 ,0x0b3e }, // handakuten - { 12 ,0x0106 }, // accent mark - { 13 , 96 }, // accent mark - { 14 ,0x0107 }, // umlat - { 15 , 94 }, // caret - { 16 ,0x0108 }, // macron - { 17 , 95 }, // underscore - { 27 ,0x0b0f }, // extend vowel - { 28 ,0x0422 }, // mdash - { 29 , 45 }, // hyphen - { 30 , 47 }, // slash - { 31 ,0x0607 }, // backslash - { 32 , 126 }, // tilde - { 33 ,0x0611 }, // doubleline - { 34 ,0x0609 }, // line - { 37 ,0x041d }, // left apostrophe - { 38 ,0x041c }, // right apostrophe - { 39 ,0x0420 }, // left quote - { 40 ,0x041f }, // right quote - { 41 , 40 }, // left paren - { 42 , 41 }, // right paren - { 45 , 91 }, // left bracket - { 46 , 93 }, // right bracket - { 47 , 123 }, // left curly bracket - { 48 , 125 }, // right curly bracket - { 53 ,0x0b01 }, // left j quote - { 54 ,0x0b02 }, // right j quote - { 59 , 43 }, // plus - { 60 ,0x0600 }, // minus - { 61 ,0x0601 }, // plus/minus - { 62 ,0x0627 }, // times - { 63 ,0x0608 }, // divide - { 64 , 61 }, // equal - { 65 ,0x0663 }, // unequal - { 66 , 60 }, // less - { 67 , 62 }, // greater - { 68 ,0x0602 }, // less/equal - { 69 ,0x0603 }, // greater/equal - { 70 ,0x0613 }, // infinity - { 71 ,0x0666 }, // traingle dots - { 72 ,0x0504 }, // man - { 73 ,0x0505 }, // woman - { 75 ,0x062d }, // prime - { 76 ,0x062e }, // double prime - { 78 ,0x040c }, // yen - { 79 , 36 }, // dollar - { 80 ,0x0413 }, // cent - { 81 ,0x040b }, // pound - { 82 , 37 }, // percent - { 83 , 35 }, // # - { 84 , 38 }, // & - { 85 , 42 }, // * - { 86 , 64 }, // @ - { 87 ,0x0406 }, // squiggle - { 89 ,0x06b8 }, // filled star - { 90 ,0x0425 }, // hollow circle - { 91 ,0x042c }, // filled circle - { 93 ,0x065f }, // hollow diamond - { 94 ,0x0660 }, // filled diamond - { 95 ,0x0426 }, // hollow box - { 96 ,0x042e }, // filled box - { 97 ,0x0688 }, // hollow triangle - { 99 ,0x0689 }, // hollow upside down triangle - { 103,0x0615 }, // right arrow - { 104,0x0616 }, // left arrow - { 105,0x0617 }, // up arrow - { 106,0x0622 }, // down arrow - { 119,0x060f }, - { 121,0x0645 }, - { 122,0x0646 }, - { 123,0x0643 }, - { 124,0x0644 }, - { 125,0x0642 }, // union - { 126,0x0610 }, // intersection - { 135,0x0655 }, - { 136,0x0656 }, - { 138,0x0638 }, // right arrow - { 139,0x063c }, // left/right arrow - { 140,0x067a }, - { 141,0x0679 }, - { 153,0x064f }, // angle - { 154,0x0659 }, - { 155,0x065a }, - { 156,0x062c }, - { 157,0x062b }, - { 158,0x060e }, - { 159,0x06b0 }, - { 160,0x064d }, - { 161,0x064e }, - { 162,0x050e }, // square root - { 164,0x0604 }, - { 175,0x0623 }, // angstrom - { 176,0x044b }, // percent - { 177,0x051b }, // sharp - { 178,0x051c }, // flat - { 179,0x0509 }, // musical note - { 180,0x0427 }, // dagger - { 181,0x0428 }, // double dagger - { 182,0x0405 }, // paragraph - { 187,0x068f } // big hollow circle -}; - -/**************************************************************************** -Desc: Maps CS26 to CharSet 11 -****************************************************************************/ -FLMBYTE MapCS26ToCharSet11[ 86 ] = -{ - 0x06, // 0 a - 0x10, // 1 A - 0x07, // 2 i - 0x11, // 3 I - 0x08, // 4 u - 0x12, // 5 U - 0x09, // 6 e - 0x13, // 7 E - 0x0a, // 8 o - 0x14, // 9 O - 0x15, // 0x0a KA - 0x95, // GA - 21 followed by 0x3D dakuten - 0x16, // 0x0c KI - 0x96, // GI - 0x17, // 0x0e KU - 0x97, // GU - 0x18, // 0x10 KE - 0x98, // GE - 0x19, // 0x12 KO - 0x99, // GO - 0x1a, // 0x14 SA - 0x9a, // ZA - 0x1b, // 0x16 SHI - 0x9b, // JI - 0x1c, // 0x18 SU - 0x9c, // ZU - 0x1d, // 0x1a SE - 0x9d, // ZE - 0x1e, // 0x1c SO - 0x9e, // ZO - 0x1f, // 0x1e TA - 0x9f, // DA - 0x20, // 0x20 CHI - 0xa0, // JI - 0x0e, // 0x22 small tsu - 0x21, // 0x23 TSU - 0xa1, // ZU - 0x22, // 0x25 TE - 0xa2, // DE - 0x23, // 0x27 TO - 0xa3, // DO - 0x24, // 0x29 NA - 0x25, // 0x2a NI - 0x26, // 0x2b NU - 0x27, // 0x2c NE - 0x28, // 0x2d NO - 0x29, // 0x2e HA - 0xa9, // 0x2f BA - 0xe9, // 0x30 PA - 0x2a, // 0x31 HI - 0xaa, // 0x32 BI - 0xea, // 0x33 PI - 0x2b, // 0x34 FU - 0xab, // 0x35 BU - 0xeb, // 0x36 PU - 0x2c, // 0x37 HE - 0xac, // 0x38 BE - 0xec, // 0x39 PE - 0x2d, // 0x3a HO - 0xad, // 0x3b BO - 0xed, // 0x3c PO - 0x2e, // 0x3d MA - 0x2f, // 0x3e MI - 0x30, // 0x3f MU - 0x31, // 0x40 ME - 0x32, // 0x41 MO - 0x0b, // 0x42 small ya - 0x33, // 0x43 YA - 0x0c, // 0x44 small yu - 0x34, // 0x45 YU - 0x0d, // 0x46 small yo - 0x35, // 0x47 YO - 0x36, // 0x48 RA - 0x37, // 0x49 RI - 0x38, // 0x4a RU - 0x39, // 0x4b RE - 0x3a, // 0x4c RO - 0xff, // 0x4d small wa - 0x3b, // 0x4e WA - 0xff, // 0x4f WI - 0xff, // 0x50 WE - 0x05, // 0x51 WO - 0x3c, // 0x52 N - 0xff, // 0x53 VU - 0xff, // 0x54 ka - 0xff // 0x55 ke +FLMBYTE flmAr2BitTbl[] = +{ + 0xF0, // 64..71 + 0x00, // 72..79 + 0x00, // 80..87 + 0x0F, // 88..95 - 92..95 + 0x00, // 96..103 + 0x00, // 104..111 + 0x03, // 112..119 + 0xFC, // 120..127 + 0xFF, // 128..135 + 0xF0, // 136..143 - 136..139 + 0xFF, // 144..151 - 144..147, 148..159 + 0xFF, // 152..159 + 0x0F, // 160..167 - 164..175 + 0xFF, // 168..175 + 0x0F, // 176..183 - 180..185 + 0xFF, // 184..191 - 186..197 + 0xFF, // 192..199 - 198..203 + 0xFF, // 200..207 - 204..207 + 0xF3, // 208..215 - 208..211 , 214..217 + 0xF0 // 216..219 - 218..219 }; /**************************************************************************** @@ -2699,145 +855,18 @@ FINLINE FLMBOOL charIsUpper( ui16Char <= ASCII_LOWER_Z) ? (FLMBOOL)FALSE : (FLMBOOL)TRUE) - : flmIsUpper( ui16Char))); -} - -/**************************************************************************** -Desc: getNextCharState can be thought of as a 2 dimentional array with - i and j as the row and column indicators respectively. If a value - exists at the intersection of i and j, it is returned. Sparse array - techniques are used to minimize memory usage. -****************************************************************************/ -FINLINE FLMUINT16 getNextCharState( - FLMUINT i, - FLMUINT j) -{ - FLMUINT k; - FLMUINT x; - - for( k = flmIndexi[ x = (i > START_COL) ? (START_ALL) : i ]; - k <= (FLMUINT) (flmIndexi[ x + 1] - 1); - k++ ) - { - if( j == flmIndexj[ k]) - { - return( flmValuea[ (i > START_COL) - ? (k + (FIXUP_AREA_SIZE * (i - START_ALL))) - : k]); - } - } - - return(0); -} - -/************************************************************************** -Desc: Find the collating value of a WP character -Ret: Collating value (COLS0 is high value - undefined WP char) -***************************************************************************/ -FLMUINT16 flmGetCollation( - FLMUINT16 ui16WpChar, - FLMUINT uiLanguage) -{ - FLMUINT16 ui16State; - FLMBYTE ucCharVal; - FLMBYTE ucCharSet; - FLMBOOL bHebrewArabicFlag = FALSE; - TBL_B_TO_BP * pColTbl = flmCol60Tbl; - - // State ONLY for non-US - - if (uiLanguage != FLM_US_LANG) - { - if (uiLanguage == FLM_AR_LANG || // Arabic - uiLanguage == FLM_FA_LANG || // Farsi - persian - uiLanguage == FLM_HE_LANG || // Hebrew - uiLanguage == FLM_UR_LANG) // Urdu - { - pColTbl = flmHebArabicCol60Tbl; - bHebrewArabicFlag = TRUE; - } - else - { - - // Check if uiLanguage candidate for alternate double collating - - ui16State = getNextCharState( START_COL, uiLanguage); - if (0 != (ui16State = getNextCharState( (ui16State - ? ui16State // look at special case languages - : START_ALL), // look at US and European - (FLMUINT) ui16WpChar))) - { - return( ui16State); - } - } - } - - ucCharVal = (FLMBYTE)ui16WpChar; - ucCharSet = (FLMBYTE)(ui16WpChar >> 8); - - // This is an optimized version of f_b_bp_citrp() inline for performance - - do - { - if (pColTbl->key == ucCharSet) - { - FLMBYTE * pucColVals; - - pucColVals = pColTbl->charPtr; - - // Above lower range of table? - - if (ucCharVal >= *pucColVals) - { - - // Make value zero based to index - - ucCharVal -= *pucColVals++; - - // Below maximum number of table entries? - - if (ucCharVal < *pucColVals++) - { - - // Return collated value. - - return( pucColVals[ ucCharVal]); - } - } - } - - // Go to next table entry - - pColTbl++; - } while (pColTbl->key != 0xFF); - - if (bHebrewArabicFlag) - { - if (ucCharSet == CHSHEB || - ucCharSet == CHSARB1 || - ucCharSet == CHSARB2) - { - - // Same as COLS0_HEBREW - - return( COLS0_ARABIC); - } - } - - // Defaults for characters that don't have a collation value. - - return( COLS0); + : f_wpIsUpper( ui16Char))); } /**************************************************************************** Desc: Add an field into the CDL (Compound Data List) for this ISK. ****************************************************************************/ RCODE KYCmpKeyAdd2Lst( - FDB * pDb, - IXD * pIxd, // Index definition - IFD * pIfd, // Index field definition - void * pvField, // Field whose value is part of the key - void * pRootContext) // Points to root context of field path + FDB * pDb, + IXD * pIxd, // Index definition + IFD * pIfd, // Index field definition + void * pvField, // Field whose value is part of the key + void * pRootContext) // Points to root context of field path { RCODE rc = FERR_OK; CDL * pCdl; @@ -3001,8 +1030,8 @@ RCODE KYBuildCmpKeys( // Reset the CDL pointers to NULL - f_memset( (void *) (&ppCdlTbl [ uiFirstCdlEntry ]), - 0, sizeof(CDL *) * pIxd->uiNumFlds); + f_memset( (void *) (&ppCdlTbl[ uiFirstCdlEntry]), + 0, sizeof( CDL *) * pIxd->uiNumFlds); } Exit: @@ -3014,21 +1043,21 @@ Exit: Desc: Build all compound keys for a record. ****************************************************************************/ RCODE KYCmpKeyElmBld( - FDB * pDb, - IXD * pIxd, // Index definition. - FLMUINT uiContainerNum, - IFD * pIfd, // Index field definition. - FLMUINT uiAction, - FLMUINT uiDrn, - FLMBOOL * pbHadUniqueKeys, - FLMUINT uiCdlEntry, // CDL entry for the IFD. - FLMUINT uiCompoundPos, // Compound Piece number - zero based - FLMBYTE * pKeyBuf, // Key buffer to build the key in - FLMUINT uiKeyLen, // Total length left in the key buffer - FLMBYTE * pLowUpBuf, // For POST compound keys place bits here. - FLMUINT uiLuLen, // Length used in pLowUpBuf. - FlmRecord * pRecord, // Record being indexed. - FLD_CONTEXT * pFldContext) // State to verify all fields are siblings. + FDB * pDb, + IXD * pIxd, // Index definition. + FLMUINT uiContainerNum, + IFD * pIfd, // Index field definition. + FLMUINT uiAction, + FLMUINT uiDrn, + FLMBOOL * pbHadUniqueKeys, + FLMUINT uiCdlEntry, // CDL entry for the IFD. + FLMUINT uiCompoundPos, // Compound Piece number - zero based + FLMBYTE * pKeyBuf, // Key buffer to build the key in + FLMUINT uiKeyLen, // Total length left in the key buffer + FLMBYTE * pLowUpBuf, // For POST compound keys place bits here. + FLMUINT uiLuLen, // Length used in pLowUpBuf. + FlmRecord * pRecord, // Record being indexed. + FLD_CONTEXT * pFldContext) // State to verify all fields are siblings. { RCODE rc = FERR_OK; CDL ** pCdlTbl = pDb->KrefCntrl.ppCdlTbl; @@ -3410,10 +1439,10 @@ RCODE KYValidatePathRelation( FLD_CONTEXT * pFldContext, FLMUINT uiCompoundPos) { - RCODE rc = FERR_OK; - void * pCurParent; - FLMUINT uiPrevCompoundPos; - FLMBOOL bMatchedContext; + RCODE rc = FERR_OK; + void * pCurParent; + FLMUINT uiPrevCompoundPos; + FLMBOOL bMatchedContext; // If too many compound levels, just exit and don't check. @@ -3625,13 +1654,13 @@ Desc: Create an index key given a keyTree and index definition. This routine a data record is traversed with field paths being checked. ****************************************************************************/ RCODE KYTreeToKey( - FDB * pDb, - IXD * pIxd, - FlmRecord * pRecord, - FLMUINT uiContainerNum, - FLMBYTE * pKeyBuf, - FLMUINT * puiKeyLenRV, - FLMUINT uiFlags) + FDB * pDb, + IXD * pIxd, + FlmRecord * pRecord, + FLMUINT uiContainerNum, + FLMBYTE * pKeyBuf, + FLMUINT * puiKeyLenRV, + FLMUINT uiFlags) { RCODE rc = FERR_OK; IFD * pIfd; @@ -3887,9 +1916,9 @@ RCODE KYCollateValue( FLMBOOL * pbOriginalCharsLost, FLMBOOL bFldIsEncrypted) { - RCODE rc = FERR_OK; - FLMUINT uiDestLen; - FLMUINT uiDataType = uiFlags & 0x0F; + RCODE rc = FERR_OK; + FLMUINT uiDestLen; + FLMUINT uiDataType = uiFlags & 0x0F; // Treat an encrypted field as binary for collation purposes. @@ -4159,15 +2188,15 @@ RCODE KYFormatText( FLMBYTE * psDestBuf, // (out) Destination buffer FLMUINT * puuiDestLen) // (out) Length of key in destination buffer. { - RCODE rc = FERR_OK; - FLMBYTE * psDestPtr = psDestBuf; - FLMBYTE ucValue; - FLMBYTE objType; - FLMUINT uiCurPos = 0; - FLMUINT uiDestPos = 0; - FLMUINT uiOldDestPos = 0; - FLMUINT objLength; - FLMBOOL bLastCharWasSpace = bMinSpaces; + RCODE rc = FERR_OK; + FLMBYTE * psDestPtr = psDestBuf; + FLMBYTE ucValue; + FLMBYTE objType; + FLMUINT uiCurPos = 0; + FLMUINT uiDestPos = 0; + FLMUINT uiOldDestPos = 0; + FLMUINT objLength; + FLMBOOL bLastCharWasSpace = bMinSpaces; for( ; uiCurPos < uiSrcLen && uiDestPos < MAX_KEY_SIZ - 1; uiCurPos += objLength) @@ -4894,7 +2923,7 @@ RCODE FTextToColStr( break; } - // flmCheckDoubleCollation modifies ui16WpChr if a digraph or a double + // f_wpCheckDoubleCollation modifies ui16WpChr if a digraph or a double // character sequence is found. If a double character is found, pucStr // is incremented and ui16WpChr2 is set to 1. If a digraph is found, // pucStr is not changed, but ui16WpChr contains the first character and @@ -4902,7 +2931,7 @@ RCODE FTextToColStr( if (uiLanguage != FLM_US_LANG) { - ui16WpChr2 = flmCheckDoubleCollation( &ui16WpChr, &bTwoIntoOne, + ui16WpChr2 = f_wpCheckDoubleCollation( &ui16WpChr, &bTwoIntoOne, &pucStr, uiLanguage); } @@ -4935,7 +2964,7 @@ RCODE FTextToColStr( // Get the collated value from the WP character-if not collating value if ((pucCollatedStr[ uiColLen++] = - (FLMBYTE)(flmGetCollation( ui16WpChr, uiLanguage))) >= COLS11) + (FLMBYTE)(f_wpGetCollation( ui16WpChr, uiLanguage))) >= COLS11) { FLMUINT uiTemp; @@ -5066,7 +3095,7 @@ store_extended_char: switch (ucCharSet) { - case CHSMUL1: // Multinational 1 + case F_CHSMUL1: // Multinational 1 { // If we cannot break down a char into base and @@ -5074,7 +3103,7 @@ store_extended_char: // later when converting back the key. In that case, // write the entire WP char in the sub-collation area. - if (flmCh6Brkcar( ui16WpChr, &ui16Base, &ui16SubColVal)) + if (f_breakWPChar( ui16WpChr, &ui16Base, &ui16SubColVal)) { goto store_extended_char; } @@ -5085,12 +3114,12 @@ store_extended_char: // NOTE: The "unlaut" character must sort after the "ring" // character. - ui16SubColVal = ((ui16SubColVal & 0xFF) == umlaut && + ui16SubColVal = ((ui16SubColVal & 0xFF) == F_UMLAUT && (uiLanguage == FLM_SU_LANG || uiLanguage == FLM_SV_LANG || uiLanguage == FLM_CZ_LANG || uiLanguage == FLM_SL_LANG)) - ? (FLMUINT16)(flmDia60Tbl[ ring] + 1) + ? (FLMUINT16)(flmDia60Tbl[ F_RING] + 1) : (FLMUINT16)(flmDia60Tbl[ ui16SubColVal & 0xFF]); store_sub_col: @@ -5112,7 +3141,7 @@ store_sub_col: break; } - case CHSGREK: // Greek + case F_CHSGREK: // Greek { if (ucTmpChar >= 52 || // Keep case bit for 52-69 else ignore ui16WpChr == 0x804 || // [ 8,4] BETA Medial | Terminal @@ -5128,7 +3157,7 @@ store_sub_col: break; } - case CHSCYR: + case F_CHSCYR: { if (ucTmpChar >= 144) { @@ -5145,7 +3174,7 @@ store_sub_col: break; } - case CHSHEB: // Hebrew + case F_CHSHEB: // Hebrew { // Three sections in Hebrew: // 0..26 - main characters @@ -5169,7 +3198,7 @@ store_sub_col: break; } - case CHSARB1: // Arabic 1 + case F_CHSARB1: // Arabic 1 { // Three sections in Arabic: // 00..37 - accents that display OVER a previous character @@ -5212,7 +3241,7 @@ store_sub_col: break; } - case CHSARB2: // Arabic 2 + case F_CHSARB2: // Arabic 2 { // There are some characters that share the same slot @@ -5258,7 +3287,7 @@ store_sub_col: if (bTwoIntoOne) { // Sorts after character in ui16WpChr after call to - // flmCheckDoubleCollation + // f_wpCheckDoubleCollation // Write the char 2 times so lower/upper bits are correct. // Could write infinite times because of collation rules. @@ -5291,7 +3320,7 @@ store_sub_col: // We have a digraph, get second collation value pucCollatedStr[ uiColLen++] = - (FLMBYTE)(flmGetCollation( ui16WpChr2, uiLanguage)); + (FLMBYTE)(f_wpGetCollation( ui16WpChr2, uiLanguage)); // Normal case, assume no diacritics set @@ -5482,14 +3511,14 @@ FLMUINT16 flmTextGetSubCol( // This just happens to work with all WP character values - if (!flmIsUpper( ui16WPValue)) + if (!f_wpIsUpper( ui16WPValue)) { ui16WPValue &= ~1; } switch( byCharSet) { - case CHSMUL1: + case F_CHSMUL1: { // If you cannot break down a char into base and // diacritic then you cannot combine the charaacter @@ -5497,7 +3526,7 @@ FLMUINT16 flmTextGetSubCol( // the entire WP char in the sub-collation area. // We can ONLY SUPPORT MULTINATIONAL 1 for brkcar() - if( flmCh6Brkcar( ui16WPValue, &ui16Base, &ui16SubColVal)) + if( f_breakWPChar( ui16WPValue, &ui16Base, &ui16SubColVal)) { // WordPerfect character cannot be broken down. @@ -5516,18 +3545,18 @@ FLMUINT16 flmTextGetSubCol( // Prefix is 2 bits "10". Remember to leave // "111" alone for the future. - ui16SubColVal = ((ui16SubColVal & 0xFF) == umlaut && + ui16SubColVal = ((ui16SubColVal & 0xFF) == F_UMLAUT && ((uiLangId == FLM_SU_LANG) || (uiLangId == FLM_SV_LANG) || (uiLangId == FLM_CZ_LANG) || (uiLangId == FLM_SL_LANG))) - ? (FLMUINT16)(flmDia60Tbl[ ring] + 1) + ? (FLMUINT16)(flmDia60Tbl[ F_RING] + 1) : (FLMUINT16)(flmDia60Tbl[ ui16SubColVal & 0xFF]); break; } - case CHSGREK: + case F_CHSGREK: { if( (byCharVal >= 52) || (ui16WPValue == 0x804) || (ui16WPValue == 0x826)) @@ -5537,7 +3566,7 @@ FLMUINT16 flmTextGetSubCol( break; } - case CHSCYR: + case F_CHSCYR: { if( byCharVal >= 144) { @@ -5546,7 +3575,7 @@ FLMUINT16 flmTextGetSubCol( break; } - case CHSHEB: + case F_CHSHEB: { // Three sections in Hebrew: @@ -5567,7 +3596,7 @@ FLMUINT16 flmTextGetSubCol( break; } - case CHSARB1: + case F_CHSARB1: { // Three sections in Arabic: @@ -5607,7 +3636,7 @@ FLMUINT16 flmTextGetSubCol( break; } - case CHSARB2: + case F_CHSARB2: { // There are some characters that share the same slot // Check the bit table if above character 64 @@ -5628,22 +3657,22 @@ Exit: } /**************************************************************************** -Desc: Get the original string from an asian collation string Ret: Length - of the word string in bytes +Desc: Get the original string from an asian collation string +Ret: Length of the word string in bytes ****************************************************************************/ FLMUINT AsiaConvertColStr( - FLMBYTE* CollatedStr, // Points to the Flaim collated string - FLMUINT* CollatedStrLenRV, // Length of the Flaim collated string - FLMBYTE* WordStr, // Output string to build - WP word string - FLMBOOL* pbDataTruncated, // Set to TRUE if data was truncated - FLMBOOL* pbFirstSubstring) // Set to TRUE if marker exists + FLMBYTE * CollatedStr, // Points to the Flaim collated string + FLMUINT * CollatedStrLenRV, // Length of the Flaim collated string + FLMBYTE * WordStr, // Output string to build - WP word string + FLMBOOL * pbDataTruncated, // Set to TRUE if data was truncated + FLMBOOL * pbFirstSubstring) // Set to TRUE if marker exists { - FLMBYTE* pWordStr = WordStr; - FLMUINT Length = *CollatedStrLenRV; // May optimize as a register - FLMUINT CollStrPos = 0; // Position in CollatedStr[] - FLMBOOL bHadExtended = FALSE; - FLMUINT WordStrLen; - FLMUINT16 ColChar; // 2 byte value for asian + FLMBYTE * pWordStr = WordStr; + FLMUINT Length = *CollatedStrLenRV; // May optimize as a register + FLMUINT CollStrPos = 0; // Position in CollatedStr[] + FLMBOOL bHadExtended = FALSE; + FLMUINT WordStrLen; + FLMUINT16 ColChar; // 2 byte value for asian while (Length) { @@ -5894,7 +3923,7 @@ FLMUINT AsiaParseSubCol( // Convert to WP diacritic and combine characters - flmCh6Cmbcar( &WpChar, WpChar, (FLMUINT16) ml1_COLtoD[Diac]); + f_combineWPChar( &WpChar, WpChar, (FLMUINT16) ml1_COLtoD[Diac]); // Even if cmbcar fails, WpChar is still set to a valid // value @@ -6074,7 +4103,7 @@ FLMUINT AsiaParseCase( } else { - HanToZenkaku( WpChar, 0, &WpChar); + f_wpHanToZenkaku( WpChar, 0, &WpChar); } } else if (CharSet == 8) // Greek @@ -6097,7 +4126,7 @@ FLMUINT AsiaParseCase( } else { - HanToZenkaku( WpChar, 0, &WpChar); + f_wpHanToZenkaku( WpChar, 0, &WpChar); } CharSet = (FLMBYTE) (WpChar >> 8); // Less code this way @@ -6168,11 +4197,11 @@ FLMUINT AsiaParseCase( if (TempByte & MaskByte) // Original chars from // CharSet 11 { - if (CharSet == 0x26) // Convert to ZenToHankaku + if (CharSet == 0x26) { FLMUINT16 NextChar = 0; - WpChar = ZenToHankaku( WpChar, &NextChar); + WpChar = f_wpZenToHankaku( WpChar, &NextChar); if (NextChar) // Move everyone down { @@ -6189,7 +4218,7 @@ FLMUINT AsiaParseCase( } else if (CharSet == 0x24) { - WpChar = ZenToHankaku( WpChar, (FLMUINT16*) 0); + WpChar = f_wpZenToHankaku( WpChar, (FLMUINT16*) 0); } MaskByte >>= 1; // Eat next bit @@ -6301,9 +4330,9 @@ Latin_Greek_Cyrillic: // YES: Pass FLM_US_LANG because this is what we want - Prevents double // character sorting. - ui16ColValue = flmGetCollation( ui16WpChar, FLM_US_LANG); + ui16ColValue = f_wpGetCollation( ui16WpChar, FLM_US_LANG); - if (uiUppercaseFlag || flmIsUpper( ui16WpChar)) + if (uiUppercaseFlag || f_wpIsUpper( ui16WpChar)) { // Uppercase - set case bit @@ -6317,7 +4346,7 @@ Latin_Greek_Cyrillic: { ui16ReturnValue = 0; - if (!flmIsUpper( ui16WpChar)) + if (!f_wpIsUpper( ui16WpChar)) { // Convert to uppercase @@ -6329,23 +4358,23 @@ Latin_Greek_Cyrillic: } else if (ucCharSet) // Don't bother with ascii { - if (!flmIsUpper( ui16WpChar)) + if (!f_wpIsUpper( ui16WpChar)) { // Convert to uppercase ui16WpChar--; } - if (ucCharSet == CHSMUL1) + if (ucCharSet == F_CHSMUL1) { FLMUINT16 ui16Base; FLMUINT16 ui16Diacritic; - ui16SubColVal = !flmCh6Brkcar( ui16WpChar, &ui16Base, &ui16Diacritic) + ui16SubColVal = !f_breakWPChar( ui16WpChar, &ui16Base, &ui16Diacritic) ? flmDia60Tbl[ui16Diacritic & 0xFF] : ui16WpChar; } - else if (ucCharSet == CHSGREK) // GREEK + else if (ucCharSet == F_CHSGREK) // GREEK { if (ui16WpChar >= 0x834 || // [8,52] or above ui16WpChar == 0x804 || // [8,4] BETA Medial | Terminal @@ -6356,7 +4385,7 @@ Latin_Greek_Cyrillic: ui16SubColVal = ui16WpChar; } } - else if (ucCharSet == CHSCYR) // CYRILLIC + else if (ucCharSet == F_CHSCYR) // CYRILLIC { if (ui16WpChar >= 0xA90) // [10, 144] or above { @@ -6381,7 +4410,7 @@ Latin_Greek_Cyrillic: // All characters in charset 11 will convert to CS24 or CS26. When // combining the collation and the sub-collation values. - if (HanToZenkaku( ui16WpChar, ui16NextWpChar, &ui16KanaChar) == 2) + if (f_wpHanToZenkaku( ui16WpChar, ui16NextWpChar, &ui16KanaChar) == 2) { // Return 2 @@ -6423,7 +4452,7 @@ Latin_Greek_Cyrillic: goto Exit; } - if ((ui16Hankaku = ZenToHankaku( ui16WpChar, (FLMUINT16*) 0)) != 0) + if ((ui16Hankaku = f_wpZenToHankaku( ui16WpChar, (FLMUINT16*) 0)) != 0) { if ((ui16Hankaku >> 8) != 11) { @@ -6686,7 +4715,7 @@ FLMUINT FWWSGetColStr( // Don't pre-increment pos on line below! - pos += FWWSToMixed( wordStr, wdStrLen, &fColStr[pos], fWPLang); + pos += f_wpToMixed( wordStr, wdStrLen, &fColStr[pos], fWPLang); } // else 0x04 or 0x06 - all characters already in uppercase @@ -6699,7 +4728,7 @@ FLMUINT FWWSGetColStr( /************************************************************************** Desc: Combine the diacritic 5 bit values to an existing word string -Todo: May want to check flmCh6Cmbcar() for CY return value +Todo: May want to check f_combineWPChar() for CY return value ***************************************************************************/ FLMUINT FWWSCmbSubColBuf( FLMBYTE* wordStr, // Existing word string to modify @@ -6745,7 +4774,7 @@ after_last_character: // Convert to WP diacritic and combine characters - flmCh6Cmbcar( &wpchar, wpchar, (FLMUINT16) ml1_COLtoD[diac]); + f_combineWPChar( &wpchar, wpchar, (FLMUINT16) ml1_COLtoD[diac]); // Even if cmbcar fails, wpchar is still set to a valid // value @@ -6829,77 +4858,6 @@ after_last_character: return (subColBitPos); } -/************************************************************************** -Desc: Convert the word string to lower case chars given low/upp bit string -Out: WP characters have modified to their original case -Ret: Number of bytes used in the lower/upper buffer -Notes: Only WP to lower case conversion is done here for each bit NOT set. -***************************************************************************/ -FLMUINT FWWSToMixed( - FLMBYTE * wordStr, // Existing word string to modify - FLMUINT wdStrLen, // Length of the wordstring in bytes - FLMBYTE* lowUpBitStr, // Lower/upper case bit string - FLMUINT fWPLang) -{ - FLMUINT numWords; - FLMUINT tempWord; - FLMBYTE tempByte = 0; - FLMBYTE maskByte; - FLMBYTE xorByte; - - xorByte = (fWPLang == FLM_US_LANG) - ? (FLMBYTE) 0 - : (fWPLang == FLM_GR_LANG) - ? (FLMBYTE) 0xFF - : (FLMBYTE) 0; - - // For each word in the word string ... - - for (numWords = wdStrLen >> 1, maskByte = 0; - numWords--; - wordStr += 2, maskByte >>= 1) - { - if (maskByte == 0) // Time to get another byte - { - tempByte = xorByte ^ *lowUpBitStr++; - maskByte = 0x80; - } - - if ((tempByte & maskByte) == 0) // If lowercase conver - else is upper - { - - // Convert to lower case - COLL -> WP is already in upper case - - tempWord = (FLMUINT) FB2UW( wordStr); - - if ((tempWord >= ASCII_UPPER_A) && (tempWord <= ASCII_UPPER_Z)) - { - tempWord |= 0x20; - } - else - { - FLMBYTE charVal = (FLMBYTE) (tempWord & 0xFF); - FLMBYTE charSet = (FLMBYTE) (tempWord >> 8); - - // check if charact within region of character set - - if (((charSet == CHSMUL1) && - ((charVal >= 26) && (charVal <= 241))) || - ((charSet == CHSGREK) && (charVal <= 69)) || - ((charSet == CHSCYR) && (charVal <= 199))) - { - tempWord |= 0x01; - } - } - - UW2FBA( (FLMUINT16) tempWord, wordStr); - } - } - - numWords = wdStrLen >> 1; - return (BYTES_IN_BITS( numWords)); -} - /******************************************************************** Desc: Build a responce tree of NODEs for the key output. *********************************************************************/ @@ -7432,7 +5390,7 @@ Desc: Compare only the leading left and right characters according to save and set state for the calling routine. TODO: This routine does NOT support Asian, Hebrew, or Arabic language - collations. In addition, flmCheckDoubleCollation() is not called + collations. In addition, f_wpCheckDoubleCollation() is not called for other non-US lanagues. There is still a lot of work to do! This is our default US compare and it is not very good for JP. @@ -7677,12 +5635,12 @@ FLMINT flmTextCompareSingleChar( const FLMBYTE * pucTmp; pucTmp = pLeftText + uiLeftValueLen; - uiLeftWpChar2 = flmCheckDoubleCollation( &ui16LeftWPChar, + uiLeftWpChar2 = f_wpCheckDoubleCollation( &ui16LeftWPChar, &bLeftTwoIntoOne, &pucTmp, uiLangId); uiLeftValueLen = (FLMUINT)(pucTmp - pLeftText); pucTmp = pRightText + uiRightValueLen; - uiRightWpChar2 = flmCheckDoubleCollation( &ui16RightWPChar, + uiRightWpChar2 = f_wpCheckDoubleCollation( &ui16RightWPChar, &bRightTwoIntoOne, &pucTmp, uiLangId); uiRightValueLen = (FLMUINT)(pucTmp - pRightText); @@ -7704,7 +5662,7 @@ FLMINT flmTextCompareSingleChar( goto Exit; } - ui16LeftCol = flmGetCollation( ui16LeftWPChar, uiLangId); + ui16LeftCol = f_wpGetCollation( ui16LeftWPChar, uiLangId); // Handle two characters collating as one. @@ -7713,7 +5671,7 @@ FLMINT flmTextCompareSingleChar( ui16LeftCol++; } - ui16RightCol = flmGetCollation( ui16RightWPChar, uiLangId); + ui16RightCol = f_wpGetCollation( ui16RightWPChar, uiLangId); // Handle two characters collating as one. @@ -7752,14 +5710,14 @@ FLMINT flmTextCompareSingleChar( if (ui16LeftSubCol == ui16LeftWPChar) { ui16LeftSubCol = flmTextGetSubCol( - flmCh6Upper( ui16LeftWPChar), + f_wpUpper( ui16LeftWPChar), ui16LeftCol, uiLangId); } if (ui16RightSubCol == ui16RightWPChar) { ui16RightSubCol= flmTextGetSubCol( - flmCh6Upper( ui16RightWPChar), + f_wpUpper( ui16RightWPChar), ui16RightCol, uiLangId); } } @@ -7797,10 +5755,10 @@ FLMINT flmTextCompareSingleChar( if( piCaseCompare && (*piCaseCompare == 0)) { - // flmIsUpper() only returns FALSE (lower) or TRUE (not-lower) + // f_wpIsUpper() only returns FALSE (lower) or TRUE (not-lower) - FLMBOOL bLeftUpper = flmIsUpper( ui16LeftWPChar); - FLMBOOL bRightUpper = flmIsUpper( ui16RightWPChar); + FLMBOOL bLeftUpper = f_wpIsUpper( ui16LeftWPChar); + FLMBOOL bRightUpper = f_wpIsUpper( ui16RightWPChar); if (bLeftUpper != bRightUpper) { @@ -7917,7 +5875,7 @@ FLMINT flmTextCompareSingleChar( { // Remember - unicode subcol is always COLS0. - if( flmGetCollation( ui16LeftWPChar, uiLangId) == COLS0) + if( f_wpGetCollation( ui16LeftWPChar, uiLangId) == COLS0) { if( piSubColCompare && (*piSubColCompare == 0)) { @@ -7934,7 +5892,7 @@ FLMINT flmTextCompareSingleChar( // left=unicode, right=WP // Remember - unicode subcol is always COLS0 for non-asian. - if( flmGetCollation( ui16RightWPChar, uiLangId) == COLS0) + if( f_wpGetCollation( ui16RightWPChar, uiLangId) == COLS0) { if( piSubColCompare && (*piSubColCompare == 0)) { @@ -8033,7 +5991,7 @@ FLMUINT FColStrToText( if (postBuf[postBytes++] == (COLL_MARKER | SC_MIXED)) { - postBytes += FWWSToMixed( wsPtr, wsLen, &postBuf[postBytes], fWPLang); + postBytes += f_wpToMixed( wsPtr, wsLen, &postBuf[postBytes], fWPLang); } *postBytesRV = postBytes; @@ -8282,7 +6240,6 @@ FLMUINT flmTextMatch( FLMINT iCompareType; FLMUINT uiLeftWpChar2 = 0; FLMUINT uiRightWpChar2 = 0; - // LWCP = Last Wild Card Position - used for wild card state FLMBYTE * pLWCPLeftBuf = NULL; FLMBYTE * pLWCPRightBuf = NULL; FLMUINT uiLWCPLeftLen = 0; @@ -8467,540 +6424,3 @@ Exit: return (!iCompare ? FLM_TRUE : FLM_FALSE); } - -/**************************************************************************** -Desc: Check for double characters that sort as 1 (like ch in Spanish) or - 1 character that should sort as 2 (like � sorts as ae in French). -Return: 0 = nothing changes. Otherwise, *pui16WpChar is the first - character, and the return value contains the 2nd character. - In addition, *pbTwoIntoOne will be TRUE if we should take two - characters and treat as one (i.e, change the collation on the - outside to one more than the collation of the first character). -****************************************************************************/ -FLMUINT16 flmCheckDoubleCollation( - FLMUINT16 * pui16WpChar, - FLMBOOL * pbTwoIntoOne, - const FLMBYTE ** ppucInputStr, - FLMUINT uiLanguage) -{ - FLMUINT16 ui16CurState; - FLMUINT16 ui16WpChar; - FLMUINT16 ui16SecondChar; - FLMUINT16 ui16LastChar = 0; - FLMUINT uiInLen; - FLMBOOL bUpperFlag; - - ui16WpChar = *pui16WpChar; - bUpperFlag = flmIsUpper( ui16WpChar); - - uiInLen = 0; - ui16SecondChar = 0; - - // Primer read - - if ((ui16CurState = getNextCharState( 0, uiLanguage)) == 0) - { - goto Exit; - } - - for (;;) - { - switch (ui16CurState) - { - case INSTSG: - { - *pui16WpChar = ui16SecondChar = (FLMUINT16) f_toascii( 's'); - *pbTwoIntoOne = FALSE; - goto Exit; - } - - case INSTAE: - { - if (bUpperFlag) - { - *pui16WpChar = (FLMUINT16) f_toascii( 'A'); - ui16SecondChar = (FLMUINT16) f_toascii( 'E'); - } - else - { - *pui16WpChar = (FLMUINT16) f_toascii( 'a'); - ui16SecondChar = (FLMUINT16) f_toascii( 'e'); - } - - *pbTwoIntoOne = FALSE; - goto Exit; - } - - case INSTIJ: - { - if (bUpperFlag) - { - *pui16WpChar = (FLMUINT16) f_toascii( 'I'); - ui16SecondChar = (FLMUINT16) f_toascii( 'J'); - } - else - { - *pui16WpChar = (FLMUINT16) f_toascii( 'i'); - ui16SecondChar = (FLMUINT16) f_toascii( 'j'); - } - - *pbTwoIntoOne = FALSE; - goto Exit; - } - - case INSTOE: - { - if (bUpperFlag) - { - *pui16WpChar = (FLMUINT16) f_toascii( 'O'); - ui16SecondChar = (FLMUINT16) f_toascii( 'E'); - } - else - { - *pui16WpChar = (FLMUINT16) f_toascii( 'o'); - ui16SecondChar = (FLMUINT16) f_toascii( 'e'); - } - - *pbTwoIntoOne = FALSE; - goto Exit; - } - - case WITHAA: - { - *pui16WpChar = (FLMUINT16) (bUpperFlag - ? (FLMUINT16) 0x122 - : (FLMUINT16) 0x123); - (*ppucInputStr)++; - break; - } - - case AFTERC: - { - *pui16WpChar = (FLMUINT16) (bUpperFlag - ? (FLMUINT16) f_toascii( 'C') - : (FLMUINT16) f_toascii( 'c')); - ui16SecondChar = ui16LastChar; - *pbTwoIntoOne = TRUE; - (*ppucInputStr)++; - goto Exit; - } - - case AFTERH: - { - *pui16WpChar = (FLMUINT16) (bUpperFlag - ? (FLMUINT16) f_toascii( 'H') - : (FLMUINT16) f_toascii( 'h')); - ui16SecondChar = ui16LastChar; - *pbTwoIntoOne = TRUE; - (*ppucInputStr)++; - goto Exit; - } - - case AFTERL: - { - *pui16WpChar = (FLMUINT16) (bUpperFlag - ? (FLMUINT16) f_toascii( 'L') - : (FLMUINT16) f_toascii( 'l')); - ui16SecondChar = ui16LastChar; - *pbTwoIntoOne = TRUE; - (*ppucInputStr)++; - goto Exit; - } - - default: - { - - // Handles STATE1 through STATE11 also - - break; - } - } - - if ((ui16CurState = getNextCharState( ui16CurState, - flmCh6Lower( ui16WpChar))) == 0) - { - goto Exit; - } - - ui16LastChar = ui16WpChar; - ui16WpChar = (FLMUINT16) * ((*ppucInputStr) + (uiInLen++)); - } - -Exit: - - return (ui16SecondChar); -} - -/**************************************************************************** -Desc: Convert a WPChar from hankaku (single wide) to zenkaku (double wide). -Ret: 0 = no conversion - 1 = converted character to zenkaku - 2 = ui16NextWpChar dakuten or handakuten voicing got combined -****************************************************************************/ -FLMUINT16 HanToZenkaku( - FLMUINT16 ui16WpChar, - FLMUINT16 ui16NextWpChar, - FLMUINT16 * pui16Zenkaku) -{ - FLMUINT16 ui16Zenkaku = 0; - FLMBYTE ucCharSet = ui16WpChar >> 8; - FLMBYTE ucCharVal = ui16WpChar & 0xFF; - FLMUINT uiLoop; - FLMUINT16 ui16CharsUsed = 1; - - switch (ucCharSet) - { - - // Character set 0 - symbols - - case 0: - { - - // Invalid? - all others are used. - - if (ucCharVal < 0x20) - { - ; - } - else if (ucCharVal <= 0x2F) - { - - // Symbols A - - ui16Zenkaku = 0x2400 + From0AToZen[ucCharVal - 0x20]; - } - else if (ucCharVal <= 0x39) - { - - // 0..9 - - ui16Zenkaku = 0x2500 + (ucCharVal - 0x21); - } - else if (ucCharVal <= 0x40) - { - - // Symbols B - - ui16Zenkaku = 0x2400 + From0BToZen[ucCharVal - 0x3A]; - } - else if (ucCharVal <= 0x5A) - { - - // A..Z - - ui16Zenkaku = 0x2500 + (ucCharVal - 0x21); - } - else if (ucCharVal <= 0x60) - { - - // Symbols C - - ui16Zenkaku = 0x2400 + From0CToZen[ucCharVal - 0x5B]; - } - else if (ucCharVal <= 0x7A) - { - - // a..z - - ui16Zenkaku = 0x2500 + (ucCharVal - 0x21); - } - else if (ucCharVal <= 0x7E) - { - - // Symbols D - - ui16Zenkaku = 0x2400 + From0DToZen[ucCharVal - 0x7B]; - } - break; - } - - // GREEK - - case 8: - { - if ((ucCharVal >= sizeof(From8ToZen)) || - ((ui16Zenkaku = 0x2600 + From8ToZen[ucCharVal]) == 0x26FF)) - { - ui16Zenkaku = 0; - } - break; - } - - // CYRILLIC - - case 10: - { - - // Check range - - ui16Zenkaku = 0x2700 + (ucCharVal >> 1); // Uppercase value - - // Convert to lower case? - - if (ucCharVal & 0x01) - { - ui16Zenkaku += 0x30; - } - break; - } - - // JAPANESE - - case 11: - { - if (ucCharVal < 5) - { - ui16Zenkaku = 0x2400 + From11AToZen[ucCharVal]; - } - else if (ucCharVal < 0x3D) // katakana? - { - if ((ui16Zenkaku = 0x2600 + From11BToZen[ucCharVal - 5]) == 0x26FF) - { - - // Dash - convert to this - - ui16Zenkaku = 0x241b; - } - else - { - if (ui16NextWpChar == 0xB3D) // dakuten? - voicing - { - - // First check exception(s) then check if voicing - // exists! - - if ((ui16Zenkaku != 0x2652) && // is not 'N'? - (flmKanaSubColTbl[ui16Zenkaku - 0x2600 + 1] == 3)) - { - ui16Zenkaku++; - - // Return 2 - - ui16CharsUsed++; - } - } - else if (ui16NextWpChar == 0xB3E) // handakuten? - voicing - { - - // Check if voicing exists! - will NOT access out of - // table - - if (flmKanaSubColTbl[ui16Zenkaku - 0x2600 + 2] == 5) - { - ui16Zenkaku += 2; - - // Return 2 - - ui16CharsUsed++; - } - } - } - } - else if (ucCharVal == 0x3D) // dakuten? - { - - // Convert to voicing symbol - - ui16Zenkaku = 0x240A; - } - else if (ucCharVal == 0x3E) // handakuten? - { - - // Convert to voicing symbol - - ui16Zenkaku = 0x240B; - } - - // else cannot convert - - break; - } - - // Other character sets CS 1,4,5,6 - symbols - - default: - { - - // Instead of includes more tables from char.asm - look down the - // Zen24Tohankaku[] table for a matching value - not much slower. - - for (uiLoop = 0; - uiLoop < (sizeof(Zen24ToHankaku) / sizeof(BYTE_WORD_TBL)); - uiLoop++) - { - if (Zen24ToHankaku[uiLoop].WordValue == ui16WpChar) - { - ui16Zenkaku = 0x2400 + Zen24ToHankaku[uiLoop].ByteValue; - break; - } - } - break; - } - } - - if (!ui16Zenkaku) - { - - // Change return value - - ui16CharsUsed = 0; - } - - *pui16Zenkaku = ui16Zenkaku; - return (ui16CharsUsed); -} - -/**************************************************************************** -Desc: Convert a zenkaku (double wide) char to a hankaku (single wide) char -Ret: Hankaku char or 0 if a conversion doesn't exist -****************************************************************************/ -FLMUINT16 ZenToHankaku( - FLMUINT16 ui16WpChar, - FLMUINT16 * DakutenOrHandakutenRV) -{ - FLMUINT16 ui16Hankaku = 0; - FLMBYTE ucCharSet = ui16WpChar >> 8; - FLMBYTE ucCharVal = ui16WpChar & 0xFF; - FLMUINT uiLoop; - - switch (ucCharSet) - { - - // SYMBOLS - - case 0x24: - { - for (uiLoop = 0; - uiLoop < (sizeof(Zen24ToHankaku) / sizeof(BYTE_WORD_TBL)); - uiLoop++) - { - - // List is sorted so table entry is more you are done - - if (Zen24ToHankaku[uiLoop].ByteValue >= ucCharVal) - { - if (Zen24ToHankaku[uiLoop].ByteValue == ucCharVal) - { - ui16Hankaku = Zen24ToHankaku[uiLoop].WordValue; - } - break; - } - } - break; - } - - // ROMAN - 0x250F..2559 Hiragana - 0x255E..2580 - - case 0x25: - { - if (ucCharVal >= 0x0F && ucCharVal < 0x5E) - { - ui16Hankaku = ucCharVal + 0x21; - } - break; - } - - // Katakana - 0x2600..2655 Greek - 0x265B..2695 - - case 0x26: - { - if (ucCharVal <= 0x55) // Katakana range - { - FLMBYTE ucCS11CharVal; - FLMUINT16 ui16NextWpChar = 0; - - if ((ucCS11CharVal = MapCS26ToCharSet11[ucCharVal]) != 0xFF) - { - if (ucCS11CharVal & 0x80) - { - if (ucCS11CharVal & 0x40) - { - - // Handakuten voicing - - ui16NextWpChar = 0xB3E; - } - else - { - - // Dakuten voicing - - ui16NextWpChar = 0xB3D; - } - - ucCS11CharVal &= 0x3F; - } - - ui16Hankaku = 0x0b00 + ucCS11CharVal; - if (ui16NextWpChar && DakutenOrHandakutenRV) - { - *DakutenOrHandakutenRV = ui16NextWpChar; - } - } - } - else if (ucCharVal <= 0x95) // Greek - { - FLMBYTE ucGreekChar = ucCharVal; - - // Make a zero based number. - - ucGreekChar -= 0x5E; - - // Check for lowercase - - if (ucGreekChar >= 0x20) - { - - // Convert to upper case for now - - ucGreekChar -= 0x20; - } - - if (ucGreekChar >= 2) - { - ucGreekChar++; - } - - if (ucGreekChar >= 19) - { - ucGreekChar++; - } - - // Convert to character set 8 - - ui16Hankaku = (ucGreekChar << 1) + 0x800; - if (ucCharVal >= (0x5E + 0x20)) - { - - // Adjust to lower case character - - ui16Hankaku++; - } - } - break; - } - - // Cyrillic - - case 0x27: - { - - // Uppercase? - - if (ucCharVal <= 0x20) - { - ui16Hankaku = (ucCharVal << 1) + 0xa00; - } - else if (ucCharVal >= 0x30 && ucCharVal <= 0x50) - { - - // Lower case - - ui16Hankaku = ((ucCharVal - 0x30) << 1) + 0xa01; - } - break; - } - } - - return (ui16Hankaku); -} diff --git a/flaim/src/rcache.cpp b/flaim/src/rcache.cpp index 9b4d66e..fdb1673 100644 --- a/flaim/src/rcache.cpp +++ b/flaim/src/rcache.cpp @@ -883,15 +883,15 @@ Desc: This routine determines what hash table size best fits the current the minimum and maximum range is closest to the record count. ****************************************************************************/ FSTATIC FLMUINT flmRcaGetBestHashTblSize( - FLMUINT uiCurrRecCount) + FLMUINT uiCurrRecCount) { - FLMUINT uiHashTblSize; - FLMUINT uiMaxRecsForHashTblSize; - FLMUINT uiMinRecsForHashTblSize; - FLMUINT uiClosestHashTblSize = 0; - FLMUINT uiDistanceFromMidpoint; - FLMUINT uiLowestDistanceFromMidpoint; - FLMUINT uiHashTblRecsMidpoint; + FLMUINT uiHashTblSize; + FLMUINT uiMaxRecsForHashTblSize; + FLMUINT uiMinRecsForHashTblSize; + FLMUINT uiClosestHashTblSize = 0; + FLMUINT uiDistanceFromMidpoint; + FLMUINT uiLowestDistanceFromMidpoint; + FLMUINT uiHashTblRecsMidpoint; uiLowestDistanceFromMidpoint = 0xFFFFFFFF; for (uiHashTblSize = MIN_RCACHE_BUCKETS; @@ -1074,11 +1074,11 @@ Desc: This routine configures the record cache manager. NOTE: This routine assumes that the record cache mutex has been locked. ****************************************************************************/ RCODE flmRcaConfig( - FLMUINT uiType, - void * Value1, - void * Value2) + FLMUINT uiType, + void * Value1, + void * Value2) { - RCODE rc = FERR_OK; + RCODE rc = FERR_OK; F_UNREFERENCED_PARM( Value2); @@ -1109,6 +1109,8 @@ Desc: This routine shuts down the record cache manager and frees all ****************************************************************************/ void flmRcaExit( void) { + FLMUINT uiCount; + if (gv_FlmSysData.RCacheMgr.hMutex != F_MUTEX_NULL) { f_mutexLock( gv_FlmSysData.RCacheMgr.hMutex); @@ -1116,17 +1118,26 @@ void flmRcaExit( void) // Free all of the record cache objects. + uiCount = 0; while (gv_FlmSysData.RCacheMgr.pMRURecord) { - f_yieldCPU(); + if( (++uiCount & 0xFF) == 0) + { + f_yieldCPU(); + } + flmRcaFreeCache( gv_FlmSysData.RCacheMgr.pMRURecord, FALSE); } // Must free those in the purge list too. + uiCount = 0; while (gv_FlmSysData.RCacheMgr.pPurgeList) { - f_yieldCPU(); + if( (++uiCount & 0xFF) == 0) + { + f_yieldCPU(); + } flmRcaFreePurged( gv_FlmSysData.RCacheMgr.pPurgeList); } @@ -1538,9 +1549,9 @@ Start_Find: { pNewerRCache = NULL; pOlderRCache = pRCache; + for (;;) { - // If this one is being read in, we need to wait on it. if (RCA_IS_READING_IN( pRCache->uiFlags)) @@ -2348,25 +2359,11 @@ RCODE flmRcaInsertRec( { // Found latest UNCOMMITTED VERSION - replace it. -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - if (RC_BAD( rc = pRecord->compressMemory())) { goto Exit; } -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - // Replace the old record data with the new record data. flmRcaSetRecord( pRCache, pRecord); @@ -2398,25 +2395,11 @@ RCODE flmRcaInsertRec( flmAssert( !pNewerRCache); -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - if (RC_BAD( rc = pRecord->compressMemory())) { goto Exit; } -#ifdef FLM_CHECK_RECORD - if (RC_BAD( rc = pRecord->checkRecord())) - { - goto Exit; - } -#endif - // Allocate a new RCACHE structure. if (RC_BAD( rc = flmRcaAllocCacheStruct( &pRCache))) @@ -2594,15 +2577,15 @@ Desc: This routine is called when an update transaction aborts. At that the record cache. ****************************************************************************/ void flmRcaAbortTrans( - FDB * pDb) + FDB * pDb) { - FFILE * pFile = pDb->pFile; - RCACHE * pRCache; - RCACHE * pOlderVersion; - FLMUINT uiOlderTransId = - pDb->LogHdr.uiCurrTransID - 1; + FFILE * pFile = pDb->pFile; + RCACHE * pRCache; + RCACHE * pOlderVersion; + FLMUINT uiOlderTransId = pDb->LogHdr.uiCurrTransID - 1; f_mutexLock( gv_FlmSysData.RCacheMgr.hMutex); + pRCache = pFile->pFirstRecord; while (pRCache) { @@ -2653,6 +2636,7 @@ void flmRcaAbortTrans( break; } } + f_mutexUnlock( gv_FlmSysData.RCacheMgr.hMutex); } @@ -2662,11 +2646,12 @@ Desc: This routine is called when an update transaction commits. At that currently in record cache for the FFILE. ****************************************************************************/ void flmRcaCommitTrans( - FDB * pDb) + FDB * pDb) { - RCACHE * pRCache; + RCACHE * pRCache; f_mutexLock( gv_FlmSysData.RCacheMgr.hMutex); + pRCache = pDb->pFile->pFirstRecord; while (pRCache) { @@ -2686,6 +2671,7 @@ void flmRcaCommitTrans( break; } } + f_mutexUnlock( gv_FlmSysData.RCacheMgr.hMutex); } @@ -2695,13 +2681,13 @@ Desc: This routine is called when a container in the database is deleted. removed from cache. ****************************************************************************/ void flmRcaRemoveContainerRecs( - FDB * pDb, - FLMUINT uiContainer) + FDB * pDb, + FLMUINT uiContainer) { - FFILE * pFile = pDb->pFile; - RCACHE * pRCache; - RCACHE * pPrevRCache; - FLMUINT uiTransId = pDb->LogHdr.uiCurrTransID; + FFILE * pFile = pDb->pFile; + RCACHE * pRCache; + RCACHE * pPrevRCache; + FLMUINT uiTransId = pDb->LogHdr.uiCurrTransID; f_mutexLock( gv_FlmSysData.RCacheMgr.hMutex); pRCache = gv_FlmSysData.RCacheMgr.pLRURecord; @@ -2770,6 +2756,7 @@ void flmRcaRemoveContainerRecs( pRCache = pPrevRCache; } + f_mutexUnlock( gv_FlmSysData.RCacheMgr.hMutex); } @@ -2778,9 +2765,9 @@ Desc: ****************************************************************************/ #ifdef FLM_DEBUG FSTATIC RCODE flmRcaCheck( - FDB * pDb, - FLMUINT uiContainer, - FLMUINT uiDrn) + FDB * pDb, + FLMUINT uiContainer, + FLMUINT uiDrn) { LFILE * pLFile; FlmRecord * pRecord = NULL; @@ -2807,7 +2794,7 @@ FSTATIC RCODE flmRcaCheck( Desc: ****************************************************************************/ FLMBOOL F_RecRelocator::canRelocate( - void * pvAlloc) + void * pvAlloc) { FlmRecord * pRec = (FlmRecord *)pvAlloc; @@ -2823,8 +2810,8 @@ FLMBOOL F_RecRelocator::canRelocate( Desc: ****************************************************************************/ void F_RecRelocator::relocate( - void * pvOldAlloc, - void * pvNewAlloc) + void * pvOldAlloc, + void * pvNewAlloc) { FlmRecord * pOldRec = (FlmRecord *)pvOldAlloc; FlmRecord * pNewRec = (FlmRecord *)pvNewAlloc; @@ -2842,6 +2829,7 @@ void F_RecRelocator::relocate( flmAssert( *((FlmRecord **)pOldRec->m_pucBuffer) == pOldRec); *((FlmRecord **)pNewRec->m_pucBuffer) = pNewRec; } + if( pNewRec->m_pucFieldIdTable) { flmAssert( *((FlmRecord **)pOldRec->m_pucFieldIdTable) == pOldRec); @@ -2882,11 +2870,12 @@ Done: Desc: ****************************************************************************/ FLMBOOL F_RecBufferRelocator::canRelocate( - void * pvAlloc) + void * pvAlloc) { FlmRecord * pRec = *((FlmRecord **)pvAlloc); - flmAssert( pRec->m_pucBuffer == pvAlloc || pRec->m_pucFieldIdTable == pvAlloc); + flmAssert( pRec->m_pucBuffer == pvAlloc || + pRec->m_pucFieldIdTable == pvAlloc); if( pRec->getRefCount() == 1 && pRec->isCached()) { @@ -2900,8 +2889,8 @@ FLMBOOL F_RecBufferRelocator::canRelocate( Desc: ****************************************************************************/ void F_RecBufferRelocator::relocate( - void * pvOldAlloc, - void * pvNewAlloc) + void * pvOldAlloc, + void * pvNewAlloc) { FlmRecord * pRec = *((FlmRecord **)pvOldAlloc); @@ -2949,8 +2938,8 @@ Desc: Fixes up all pointers needed to allow an RCACHE struct to be Notes: This routine assumes the rcache mutex is locked ****************************************************************************/ void F_RCacheRelocator::relocate( - void * pvOldAlloc, - void * pvNewAlloc) + void * pvOldAlloc, + void * pvNewAlloc) { RCACHE * pOldRCache = (RCACHE *)pvOldAlloc; RCACHE * pNewRCache = (RCACHE *)pvNewAlloc; @@ -3013,6 +3002,7 @@ void F_RCacheRelocator::relocate( } ppBucket = FLM_RCA_HASH( pOldRCache->uiDrn); + if( *ppBucket == pOldRCache) { *ppBucket = pNewRCache; diff --git a/flaim/src/scache.cpp b/flaim/src/scache.cpp index 918ef19..ada2b1c 100644 --- a/flaim/src/scache.cpp +++ b/flaim/src/scache.cpp @@ -3411,8 +3411,7 @@ FSTATIC RCODE ScaReadTheBlock( if (uiFilePos != uiBlkAddress) { pTmpReadStats->OldViewBlockReads.ui64Count++; - pTmpReadStats->OldViewBlockReads.ui64TotalBytes += - uiBlkSize; + pTmpReadStats->OldViewBlockReads.ui64TotalBytes += uiBlkSize; } else { @@ -3597,10 +3596,12 @@ FSTATIC RCODE ScaBlkSanityCheck( f_memset( &LfStats, 0, sizeof( LF_STATS)); LogicalFile.pLfStats = &LfStats; LogicalFile.pLFile = pLFile; + if (pLFile->uiLfType == LF_INDEX) { bIsIndex = TRUE; } + if (bIsIndex) { if (RC_BAD( fdictGetIndex( @@ -3626,9 +3627,8 @@ FSTATIC RCODE ScaBlkSanityCheck( StateInfo.pBlk = pucBlk; StateInfo.uiBlkAddress = uiBlkAddress; - if (flmVerifyBlockHeader( &StateInfo, NULL, - pFile->FileHdr.uiBlockSize, - 0L, 0L, FALSE, bCheckFullBlkAddr) != FLM_NO_CORRUPTION) + if( flmVerifyBlockHeader( &StateInfo, NULL, pFile->FileHdr.uiBlockSize, + 0L, 0L, FALSE, bCheckFullBlkAddr) != FLM_NO_CORRUPTION) { goto Error_Exit; } @@ -3676,7 +3676,8 @@ FSTATIC RCODE ScaBlkSanityCheck( } else { - if (StateInfo.uiElmOffset + StateInfo.uiElmOvhd > StateInfo.uiEndOfBlock) + if (StateInfo.uiElmOffset + StateInfo.uiElmOvhd > + StateInfo.uiEndOfBlock) { goto Error_Exit; } @@ -3693,17 +3694,18 @@ FSTATIC RCODE ScaBlkSanityCheck( // Make sure the element doesn't go beyond the end of the block - if (StateInfo.uiElmOffset + StateInfo.uiElmLen > StateInfo.uiEndOfBlock) + if( StateInfo.uiElmOffset + StateInfo.uiElmLen > + StateInfo.uiEndOfBlock) { goto Error_Exit; } - if (!bMinimalBasicCheck) + if( !bMinimalBasicCheck) { // Verify the first/last flags if it is a leaf element - if (StateInfo.uiBlkType == BHT_LEAF) + if( StateInfo.uiBlkType == BHT_LEAF) { FLMUINT uiFirstFlag = (FLMUINT)(BBE_IS_FIRST( StateInfo.pElm)); FLMUINT uiPrevLastFlag = StateInfo.uiElmLastFlag; @@ -3819,9 +3821,12 @@ FSTATIC RCODE ScaBlkSanityCheck( { if (StateInfo.uiFOPType != FLM_FOP_REC_INFO) { - if (flmVerifyField( StateInfo.pFOPData, StateInfo.uiFOPDataLen, - StateInfo.uiFieldType) != FLM_NO_CORRUPTION) + if (flmVerifyField( StateInfo.pFOPData, + StateInfo.uiFOPDataLen, + StateInfo.uiFieldType) != FLM_NO_CORRUPTION) + { goto Error_Exit; + } } } @@ -3836,6 +3841,7 @@ FSTATIC RCODE ScaBlkSanityCheck( } } } + StateInfo.uiElmOffset += StateInfo.uiElmLen; } @@ -4095,8 +4101,7 @@ Get_Next_Block: // See if this version of the block is what we want - if ((FLMUINT)FB2UD( &pucBlk [BH_TRANS_ID]) <= - pDb->LogHdr.uiCurrTransID) + if ((FLMUINT)FB2UD( &pucBlk [BH_TRANS_ID]) <= pDb->LogHdr.uiCurrTransID) { // Set the high trans ID on the block @@ -4143,6 +4148,7 @@ Get_Next_Block: } } } + f_mutexUnlock( gv_FlmSysData.hShareMutex); bMutexLocked = FALSE; break; @@ -4205,8 +4211,7 @@ Get_Next_Block: if (gv_FlmSysData.bCheckCache) { if (RC_BAD( rc = ScaBlkSanityCheck( pDb, pFile, pLFile, - pucBlk, uiBlkAddress, TRUE, - FLM_EXTENSIVE_CHECK))) + pucBlk, uiBlkAddress, TRUE, FLM_EXTENSIVE_CHECK))) { goto Exit; } @@ -4357,8 +4362,7 @@ FSTATIC void _ScaDbgUseForThread( if (!pUse) { - if (RC_BAD( f_alloc( - (FLMUINT)sizeof( SCACHE_USE), &pUse))) + if (RC_BAD( f_alloc( (FLMUINT)sizeof( SCACHE_USE), &pUse))) { ScaDebugMsg( "Could not allocate SCACHE_USE structure", pSCache, NULL); @@ -4565,6 +4569,7 @@ FSTATIC RCODE ScaReadIntoCache( // an existing one. rc = ScaAllocCache( pDb, &pSCache); + if (pPrevInVerList) { ScaReleaseForThread( pPrevInVerList); @@ -4609,6 +4614,7 @@ FSTATIC RCODE ScaReadIntoCache( } ScaLinkToFile( pSCache, pDb->pFile); + if (!pPrevInVerList) { SCACHE ** ppSCacheBucket; @@ -4761,7 +4767,7 @@ Desc: This routine frees all cache blocks that have been modified by transaction is to be aborted. ****************************************************************************/ void ScaFreeModifiedBlocks( - FDB * pDb) + FDB * pDb) { FFILE * pFile = pDb->pFile; SCACHE * pSCache; @@ -4929,9 +4935,8 @@ Iterate_Larger_Half: uiLBPos++; } - while (uiUBPos == uiMIDPos || - (((iCompare = - scaCompare( pCurSCache, ppSCacheTbl [uiUBPos])) < 0))) + while( uiUBPos == uiMIDPos || + (((iCompare = scaCompare( pCurSCache, ppSCacheTbl [uiUBPos])) < 0))) { if (!uiUBPos) { @@ -5143,6 +5148,7 @@ Add_Contiguous_Block: uiGap = FSGetFileOffset( pSCache->uiBlkAddress) - FSGetFileOffset( uiLastBlkAddr) - uiBlockSize; + if (uiGap > 32 * 1024 - (uiBlockSize * 2)) { break; @@ -5942,10 +5948,8 @@ FLMBOOL flmNeededByReadTrans( // Quick check - so we don't have to traverse all read transactions. if ((!pFile->pFirstReadTrans) || - (uiHighTransId < - pFile->pFirstReadTrans->LogHdr.uiCurrTransID) || - (uiLowTransId > - pFile->pLastReadTrans->LogHdr.uiCurrTransID)) + (uiHighTransId < pFile->pFirstReadTrans->LogHdr.uiCurrTransID) || + (uiLowTransId > pFile->pLastReadTrans->LogHdr.uiCurrTransID)) { goto Exit; } @@ -6142,10 +6146,8 @@ RCODE ScaGetBlock( } gv_FlmSysData.SCacheMgr.Usage.uiCacheFaults++; gv_FlmSysData.SCacheMgr.Usage.uiCacheFaultLooks += uiNumLooks; - if (RC_BAD( rc = ScaReadIntoCache( pDb, - uiBlkType, pLFile, - uiBlkAddress, - NULL, NULL, &pSCache, &bGotFromDisk))) + if (RC_BAD( rc = ScaReadIntoCache( pDb, uiBlkType, pLFile, + uiBlkAddress, NULL, NULL, &pSCache, &bGotFromDisk))) { goto Exit; } @@ -6234,10 +6236,9 @@ RCODE ScaGetBlock( if (pSMoreRecentVerCache) { if( RC_BAD( rc = ScaReadIntoCache( pDb, uiBlkType, pLFile, - uiBlkAddress, - pSMoreRecentVerCache, - pSMoreRecentVerCache->pNextInVersionList, - &pSCache, &bGotFromDisk))) + uiBlkAddress, pSMoreRecentVerCache, + pSMoreRecentVerCache->pNextInVersionList, + &pSCache, &bGotFromDisk))) { goto Exit; } @@ -6245,9 +6246,8 @@ RCODE ScaGetBlock( else { if( RC_BAD( rc = ScaReadIntoCache( pDb, uiBlkType, pLFile, - uiBlkAddress, - NULL, pSBlkVerCache, - &pSCache, &bGotFromDisk))) + uiBlkAddress, NULL, pSBlkVerCache, + &pSCache, &bGotFromDisk))) { goto Exit; } @@ -6361,20 +6361,20 @@ Exit: Desc: Create a data block. ****************************************************************************/ RCODE ScaCreateBlock( - FDB * pDb, - LFILE * pLFile, - SCACHE ** ppSCacheRV) + FDB * pDb, + LFILE * pLFile, + SCACHE ** ppSCacheRV) { - RCODE rc = FERR_OK; - FLMUINT uiBlkAddress; - FLMBYTE * pucBlkBuf; - SCACHE * pSCache; - SCACHE * pOldSCache; - FFILE * pFile = pDb->pFile; - FLMBOOL bMutexLocked = FALSE; - FLMUINT uiOldLogicalEOF; - SCACHE ** ppSCacheBucket; - FLMUINT uiBlockSize = pFile->FileHdr.uiBlockSize; + RCODE rc = FERR_OK; + FLMUINT uiBlkAddress; + FLMBYTE * pucBlkBuf; + SCACHE * pSCache; + SCACHE * pOldSCache; + FFILE * pFile = pDb->pFile; + FLMBOOL bMutexLocked = FALSE; + FLMUINT uiOldLogicalEOF; + SCACHE ** ppSCacheBucket; + FLMUINT uiBlockSize = pFile->FileHdr.uiBlockSize; pDb->bHadUpdOper = TRUE;