1350 lines
63 KiB
C
1350 lines
63 KiB
C
/*****************************************************************************
|
|
* *
|
|
* BTKTCMAP.C *
|
|
* *
|
|
* Copyright (C) Microsoft Corporation 1990 - 1994. *
|
|
* All Rights reserved. *
|
|
* *
|
|
******************************************************************************
|
|
* *
|
|
* Module Intent *
|
|
* *
|
|
* Functions for SZ (0-terminated string) keys. *
|
|
* *
|
|
******************************************************************************
|
|
* *
|
|
* Current Owner: BinhN *
|
|
* *
|
|
*****************************************************************************/
|
|
|
|
static char s_aszModule[] = __FILE__; /* For error report */
|
|
|
|
#include <mvopsys.h>
|
|
|
|
#ifdef _MAC
|
|
#include <winnls.h>
|
|
#endif
|
|
|
|
#include <orkin.h>
|
|
#include <string.h>
|
|
#include <misc.h>
|
|
#include <iterror.h>
|
|
#include <wrapstor.h>
|
|
#include <mvdbcs.h>
|
|
#include <mvsearch.h>
|
|
#include <_mvutil.h>
|
|
#include "common.h"
|
|
|
|
|
|
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
// When ligature tables are implemented again, take this out !!!!!!!!!!
|
|
//#define NOCHARTABLES_FIXME
|
|
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
/**************************************
|
|
* MASKS TO DEAL WITH KEYWORD SORTING *
|
|
* (SHOULD MATCH WITH wmvc\keyword.c) *
|
|
**************************************/
|
|
|
|
#define PRIMARY_SORT_MASK 0x0Fff
|
|
#define SECONDARY_SORT_MASK 0xF000
|
|
|
|
/*****************************************************************************
|
|
* *
|
|
* Tables for StringJCompare() - Japanese "50-on" sorting *
|
|
* *
|
|
*****************************************************************************/
|
|
|
|
static unsigned char pbPriHi[] = {
|
|
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
|
|
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
|
|
0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,
|
|
0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x23,0x24,0x25,0x26,0x27,0x28,
|
|
0x29,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,
|
|
0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x2A,0x2B,0x2C,0x2D,0x2E,
|
|
0x2F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,
|
|
0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x30,0x31,0x32,0x33,0x12,
|
|
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
|
|
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
|
|
0x13,0x38,0x3C,0x3D,0x37,0x43,0xB8,0x87,0x88,0x89,0x8A,0x8B,0xAA,0xAC,0xAE,0x98,
|
|
0x44,0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xC6,
|
|
0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,
|
|
0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,
|
|
0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,
|
|
0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,
|
|
0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,
|
|
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
|
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xC7,0x47,
|
|
0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,
|
|
0x47,0x47,0x47,0x47,0x47,0x47,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0x47,0xC7,
|
|
0x3E,0x3E,0x36,0x47,0x36,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,
|
|
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xC7,0xC7,0xC7
|
|
};
|
|
|
|
static unsigned char pbPriLo[] = {
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
|
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
|
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
|
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
|
|
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
|
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
|
|
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x02,0x00,
|
|
0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x28,0xFF,0x03,0x04,0xFF,0xFF,0x09,0x00,0x29,
|
|
0x2A,0x2B,0x00,0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x08,0x00,0x00,0x00,
|
|
0x00,0x05,0x06,0x07,0x08,0x00,0x00,0x01,0x02,0x03,0x04,0x00,0x00,0x04,0x07,0x7F,
|
|
0x08,0x00,0x3C,0x00,0x00,0x3F,0x40,0x27,0x36,0x8E,0x8D,0x03,0x06,0x07,0x09,0x00,
|
|
0x00,0x2B,0x2C,0x00,0x00,0x00,0x00,0x00,0x01,0x8C,0x8B,0x87,0x89,0x88,0x86,0x85,
|
|
0x80,0x7F,0x82,0x81,0x84,0x83,0x08,0x05,0x19,0x17,0x18,0x1A,0x06,0xAD,0xAE,0xAF,
|
|
0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0x21,0x22,0x45,0x46,0x43,0x44,0x30,0x2E,
|
|
0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0x2C,0x2D,0x2D,0x1B,0x1C,0x1D,0x1F,0xCF,
|
|
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0x29,0x47,0x4A,0x1E,0x20,0x3D,
|
|
0x3A,0x41,0x42,0x24,0x39,0x26,0x37,0x32,0x34,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
|
0x0C,0x05,0x91,0x90,0x8F,0x01,0x02,0x06,0xF8,0xF9,0xFA,0xFB,0x8A,0xFD,0xFE,0xFF,
|
|
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
|
|
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
|
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
|
|
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
|
|
0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
|
|
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9B,0x9C,0x9D,0x9E,0xFF,
|
|
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,
|
|
0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,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F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
|
0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x11,
|
|
0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,
|
|
0x22,0x23,0x24,0x25,0x26,0x27,0x28,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0x11,
|
|
0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,
|
|
0x22,0x23,0x24,0x25,0x26,0x27,0x28,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
|
0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
|
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
|
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
|
|
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
|
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
|
|
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
|
|
0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,
|
|
0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2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D0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
|
0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
|
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
|
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
|
|
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
|
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
|
|
0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
|
|
0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,
|
|
0x5B,0x5C,0x5D,0x5E,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x5E,0x17,
|
|
0x0E,0x10,0x19,0x0F,0x13,0x0C,0x15,0x1A,0x1B,0x0D,0x12,0x11,0x14,0x18,0x16,0x22,
|
|
0x23,0x24,0x20,0x21,0x26,0x25,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x1C,0x7F,
|
|
0x09,0x0A,0x0A,0x27,0x0B,0x07,0x08,0x09,0x0A,0x0B,0x04,0x05,0x06,0x1F,0x1E,0x1D,
|
|
0x3B,0x3E,0x33,0x35,0x23,0x25,0x48,0x2A,0x28,0x49,0x38,0x2F,0x31,0x9D,0x9E,0x9F
|
|
};
|
|
|
|
static unsigned char pbSecWgt[] = {
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x14,0x04,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x40,0x00,0x40,
|
|
0x40,0x40,0x08,0x09,0x08,0x09,0x00,0x00,0x08,0x00,0x00,0x54,0x54,0x00,0x40,0x00,
|
|
0x00,0x00,0x40,0x00,0x00,0x40,0x44,0x40,0x44,0x40,0x40,0x00,0x00,0x40,0x40,0x40,
|
|
0x40,0x00,0x00,0x00,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x40,0x40,0x00,0x00,0x00,
|
|
0x00,0x40,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
|
|
0x40,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
|
|
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
|
|
0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
|
|
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x60,
|
|
0x64,0x60,0x64,0x60,0x64,0x60,0x64,0x60,0x64,0x64,0x65,0x60,0x61,0x60,0x61,0x64,
|
|
0x65,0x60,0x61,0x60,0x61,0x60,0x61,0x60,0x61,0x60,0x61,0x60,0x61,0x60,0x61,0x60,
|
|
0x61,0x60,0x64,0x65,0x60,0x61,0x60,0x61,0x60,0x60,0x60,0x60,0x60,0x60,0x61,0x62,
|
|
0x60,0x61,0x62,0x60,0x61,0x62,0x60,0x61,0x62,0x60,0x61,0x62,0x60,0x60,0x60,0x60,
|
|
0x60,0x60,0x64,0x60,0x64,0x60,0x64,0x60,0x60,0x60,0x60,0x60,0x60,0x64,0x20,0x20,
|
|
0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x40,0x44,0x40,0x44,0x40,0x44,0x40,0x44,0x40,0x44,0x44,0x45,0x40,0x41,0x40,0x41,
|
|
0x44,0x45,0x40,0x41,0x40,0x41,0x40,0x41,0x40,0x41,0x40,0x41,0x40,0x41,0x40,0x41,
|
|
0x40,0x41,0x40,0x44,0x45,0x40,0x41,0x40,0x41,0x40,0x40,0x40,0x40,0x40,0x40,0x41,
|
|
0x42,0x40,0x41,0x42,0x40,0x41,0x42,0x40,0x41,0x42,0x40,0x41,0x42,0x40,0x40,0x00,
|
|
0x40,0x40,0x40,0x40,0x44,0x40,0x44,0x40,0x44,0x40,0x40,0x40,0x40,0x40,0x40,0x44,
|
|
0x00,0x00,0x40,0x40,0x45,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|
};
|
|
|
|
static unsigned char pbSecFlg[] = {
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x20,0x20,0x22,0x20,0x20,0x20,0x20,0x22,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
|
|
0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
|
|
0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x20,0x20,0x20,0x20,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x35,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
|
|
0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x35,0x35,0x37,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x35,0x37,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x35,0x35,0x35,0x37,0x37,0x37,0x35,0x35,0x35,0x35,0x35,0x37,0x35,0x20,0x20,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x20,
|
|
0x20,0x20,0x05,0x05,0x05,0x05,0x00,0x00,0x04,0x00,0x00,0x37,0x37,0x00,0x20,0x00,
|
|
0x00,0x00,0x20,0x00,0x00,0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x20,0x20,0x20,
|
|
0x20,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0x00,
|
|
0x00,0x20,0x00,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
|
|
0x20,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
|
|
0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
|
|
0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x37,
|
|
0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x35,0x35,0x35,0x35,0x37,
|
|
0x37,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x37,0x37,0x37,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x37,0x37,0x37,0x37,0x37,0x37,0x35,0x35,0x35,0x35,0x35,0x37,0x37,0x15,0x15,
|
|
0x35,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x35,0x35,0x35,0x35,
|
|
0x37,0x37,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x35,0x37,0x37,0x37,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
|
|
0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x00,
|
|
0x35,0x35,0x35,0x37,0x37,0x37,0x37,0x37,0x37,0x35,0x35,0x35,0x35,0x35,0x37,0x37,
|
|
0x15,0x15,0x35,0x35,0x37,0x37,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,
|
|
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
|
|
0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|
};
|
|
|
|
static unsigned char pbgMasks[] = {
|
|
0x03, 0x01, 0x00, 0x02
|
|
, 0x04, 0x02, 0x02, 0x01
|
|
, 0x18, 0x04, 0x03, 0x02
|
|
, 0x20, 0x18, 0x05, 0x01
|
|
, 0x40, 0x20, 0x06, 0x01
|
|
, 0x00, 0x00, 0x00, 0x00
|
|
};
|
|
|
|
static unsigned char pbIgnore[] = {
|
|
0x1F, 0x07, 0x00, 0x02
|
|
, 0x20, 0x08, 0x00, 0x01
|
|
, 0x20, 0x10, 0x00, 0x40
|
|
, 0x40, 0x20, 0x00, 0x08
|
|
, 0x00, 0x00, 0x00, 0x00
|
|
};
|
|
|
|
|
|
#define isDbcsJ( c, next) ((c >= 0x80 && c <= 0xA0) || (c >= 0xE0 && c <= 0xFF))
|
|
|
|
DWORD g_dwFlags;
|
|
|
|
typedef struct tagCOMPSTRINGINFO{
|
|
unsigned priwt;
|
|
unsigned char secwt;
|
|
unsigned char secflg;
|
|
} COMPSTRINGINFO;
|
|
|
|
typedef struct tagSTRINFO_J
|
|
{
|
|
LPBYTE pbPriHi;
|
|
LPBYTE pbPriLo;
|
|
LPBYTE pbSecWgt;
|
|
LPBYTE pbSecFlg;
|
|
LPBYTE pbMasks;
|
|
LPBYTE pbMaps;
|
|
LPBYTE pbIgnore;
|
|
LPBYTE pbC1JPN;
|
|
LPBYTE pbC2JPN;
|
|
LPBYTE pbC3JPN;
|
|
}
|
|
STRINFO_J;
|
|
|
|
// Prototypes for Japanese sorting functions
|
|
|
|
PUBLIC int PASCAL FAR StringJCompare (DWORD dwFlags, LPBYTE lpstr1, int cch1,
|
|
LPBYTE lpstr2, int cch2);
|
|
|
|
PRIVATE int PASCAL NEAR GetSortWeightJ(LPBYTE FAR*plpstr1,int cch1,
|
|
COMPSTRINGINFO FAR *pcompstrinfo);
|
|
|
|
|
|
/***************************************************************************
|
|
*
|
|
* @doc INTERNAL
|
|
*
|
|
* @func BK FAR PASCAL | BkScanCMapInternal |
|
|
* Scan an internal node for a key and return child BK.
|
|
*
|
|
* @parm BK | bk |
|
|
* BK of internal node to scan
|
|
*
|
|
* @parm KEY | key |
|
|
* key to search for
|
|
*
|
|
* @parm SHORT | wLevel |
|
|
* level of btree bk lives on
|
|
*
|
|
* @parm QBTHR | qbthr |
|
|
* btree header containing cache, and btree specs
|
|
*
|
|
* @parm QW | qiKey |
|
|
* address of an int or NULL to not get it
|
|
*
|
|
* @rdesc bk of subtree that might contain key; bkNil on error
|
|
* args OUT: qbthr->qCache - bk's block will be cached
|
|
* qiKey - index into rgbBlock of first key >= key
|
|
*
|
|
* Side Effects: bk's block will be cached
|
|
*
|
|
***************************************************************************/
|
|
|
|
PUBLIC BK FAR PASCAL BkScanCMapInternal(BK bk, KEY key, SHORT wLevel,
|
|
QBTHR qbthr, QW qiKey, PHRESULT phr)
|
|
{
|
|
QCB qcb; // Pointer to cache block
|
|
QB q; // Pointer to block buffer
|
|
SHORT cKeys; // Number of keys in the block
|
|
SZ szSaved = NULL;
|
|
int fCompare;
|
|
int KeyLength;
|
|
int length;
|
|
|
|
if ((qcb = QFromBk(bk, wLevel, qbthr, phr)) == NULL)
|
|
{
|
|
return bkNil;
|
|
}
|
|
|
|
q = qcb->db.rgbBlock; // Block buffer
|
|
cKeys = qcb->db.cKeys; // Number of keys in the block
|
|
|
|
bk = (BK)GETLONG(q); // Get leaf block number
|
|
q += sizeof(DWORD);
|
|
KeyLength = (int) STRLEN((SZ)key);
|
|
|
|
while (cKeys-- > 0)
|
|
{
|
|
length = (int) STRLEN((SZ)q);
|
|
if (PRIMARYLANGID(LANGIDFROMLCID(qbthr->bth.lcid)) == LANG_JAPANESE)
|
|
fCompare = StringJCompare(0L, (SZ)key, KeyLength, (SZ)q, length);
|
|
else
|
|
fCompare = StrFntMappedLigatureComp((SZ)key, (SZ)q,
|
|
qbthr->lrglpCharTab);
|
|
if (fCompare >= 0)
|
|
{
|
|
q += length + 1;
|
|
bk = (BK)GETLONG(q);
|
|
q += sizeof(DWORD);
|
|
}
|
|
else
|
|
break;
|
|
}
|
|
|
|
if (qiKey != NULL)
|
|
{
|
|
*qiKey = (WORD)(q - (QB)qcb->db.rgbBlock);
|
|
}
|
|
|
|
return bk;
|
|
}
|
|
|
|
/***************************************************************************
|
|
*
|
|
* @doc INTERNAL
|
|
*
|
|
* @func HRESULT FAR PASCAL | RcScanCMapLeaf |
|
|
* Scan a leaf node for a key and copy the associated data.
|
|
*
|
|
* @parm BK | bk |
|
|
* the leaf block
|
|
*
|
|
* @parm KEY | key |
|
|
* the key we're looking for
|
|
*
|
|
* @parm SHORT | wLevel |
|
|
* the level of leaves (unnecessary)
|
|
*
|
|
* @parm QBTHR | qbthr |
|
|
* the btree header
|
|
*
|
|
* @parm QV | qRec |
|
|
* if found, record gets copied into this buffer
|
|
*
|
|
* @parm QTPOS | qbtpos |
|
|
* pos of first key >= key goes here
|
|
*
|
|
* @rdesc ERR_SUCESS if found; ERR_NOTEXIST if not found
|
|
* If we are scanning for a key greater than any key in this
|
|
* block, the pos returned will be invalid and will point just
|
|
* past the last valid key in this block.
|
|
*
|
|
***************************************************************************/
|
|
|
|
PUBLIC HRESULT FAR PASCAL RcScanCMapLeaf(BK bk, KEY key, SHORT wLevel,
|
|
QBTHR qbthr, QV qRec, QBTPOS qbtpos)
|
|
{
|
|
QCB qcb;
|
|
SZ sz;
|
|
int fRet;
|
|
HRESULT rc;
|
|
SHORT i;
|
|
SHORT cKeys; // Number of keys in the block
|
|
SZ szSaved = NULL;
|
|
int KeyLength, length, lengthSaved = 0;
|
|
HRESULT errb;
|
|
|
|
|
|
if ((qcb = QFromBk(bk, wLevel, qbthr, &errb)) == NULL)
|
|
{
|
|
return errb;
|
|
}
|
|
|
|
rc = E_NOTEXIST;
|
|
|
|
sz = qcb->db.rgbBlock + 2 * sizeof(BK);
|
|
cKeys = qcb->db.cKeys;
|
|
|
|
KeyLength = (int) STRLEN((SZ)key);
|
|
|
|
for (i= 0; i < cKeys; i++)
|
|
{
|
|
length = (int) STRLEN((SZ)sz);
|
|
|
|
|
|
#ifdef NOCHARTABLES_FIXME
|
|
|
|
fRet=STRCMP((SZ)key, (SZ)sz);
|
|
|
|
#else
|
|
|
|
if (PRIMARYLANGID(LANGIDFROMLCID(qbthr->bth.lcid)) == LANG_JAPANESE)
|
|
fRet = StringJCompare(0L, (SZ)key, KeyLength, (SZ)sz, length);
|
|
else
|
|
fRet = StrFntMappedLigatureComp((SZ)key, (SZ)sz,
|
|
qbthr->lrglpCharTab);
|
|
|
|
#endif
|
|
|
|
|
|
if (fRet > 0) /* still looking for key */
|
|
{
|
|
sz += length + 1;
|
|
sz += CbSizeRec(sz, qbthr);
|
|
}
|
|
else if (fRet < 0) /* key not found */
|
|
{
|
|
if (szSaved)
|
|
{
|
|
sz = szSaved;
|
|
/* Return 1st match match */
|
|
if (qRec != NULL) {
|
|
sz = (QB)sz + lengthSaved + 1;
|
|
QVCOPY(qRec, sz, (LONG)CbSizeRec(sz, qbthr));
|
|
}
|
|
|
|
rc = S_OK;
|
|
}
|
|
|
|
break;
|
|
}
|
|
else /* matched the key */
|
|
{
|
|
/* We only save the location of the 1st element in the list */
|
|
if (szSaved == NULL)
|
|
{
|
|
szSaved = sz;
|
|
lengthSaved = length;
|
|
}
|
|
if (STRICMP((SZ)key, (SZ)sz) == 0)
|
|
{
|
|
/* This is a real match */
|
|
if (qRec != NULL) {
|
|
sz = (QB)sz + length + 1;
|
|
QVCOPY(qRec, sz, (LONG)CbSizeRec(sz, qbthr));
|
|
}
|
|
|
|
rc = S_OK;
|
|
break;
|
|
}
|
|
|
|
sz += length + 1;
|
|
sz += CbSizeRec(sz, qbthr);
|
|
}
|
|
}
|
|
|
|
if (qbtpos != NULL)
|
|
{
|
|
qbtpos->bk = bk;
|
|
qbtpos->cKey = i;
|
|
qbtpos->iKey = (int)((QB)sz - (QB)qcb->db.rgbBlock);
|
|
}
|
|
|
|
return rc;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* @func int PASCAL FAR | StrFntMappedLigatureComp |
|
|
* The function will compare two special zero-terminated strings.
|
|
* The strings contain information about their font maps given by
|
|
* 1 <x + 1>
|
|
* - 1 : next byte will be the font map index
|
|
* - x + 1 : font map index + 1
|
|
*
|
|
* @parm SZ | sz1|
|
|
* String 1
|
|
*
|
|
* @parm SZ | sz2 |
|
|
* String 2
|
|
*
|
|
* @parm LPCHARTAB FAR *| qrglpCharTab |
|
|
* Font mapping and ligature information
|
|
*
|
|
* @rdesc
|
|
* < 0 : if sz1 < sz2
|
|
* = 0 : if sz1 = sz2
|
|
* > 0 : if sz1 > sz2
|
|
*
|
|
* @comm The function still may fail in the case of comparing
|
|
* a[essetz]s with as[essetz]
|
|
***********************************************************************/
|
|
PUBLIC int EXPORT_API PASCAL FAR StrFntMappedLigatureComp(SZ sz1, SZ sz2,
|
|
LPCHARTAB FAR *qrglpCharTab )
|
|
{
|
|
LPCMAP lpCMap1; // Pointer to font map for string 1
|
|
LPCMAP lpCMap2; // Pointer to font map for string 2
|
|
LPBYTE lpbLigature1; // Pointer to ligature table for string 1
|
|
LPBYTE lpbLigature2; // Pointer to ligature table for string 2
|
|
LPBYTE lpb; // Scratch variable
|
|
BYTE ch1;
|
|
BYTE ch2;
|
|
BYTE chLig1; // 2nd ligature bytes
|
|
BYTE chLig2; // 2nd ligature bytes
|
|
int fRet; // Returned value
|
|
BYTE cDelimiter1 = 0;
|
|
BYTE cDelimiter2 = 0;
|
|
char chDiff1 = 0;
|
|
char chDiff2 = 0;
|
|
int fRet2 = 0; // Secondary returned value
|
|
|
|
/* Get the default character map & ligature table */
|
|
lpCMap1 = lpCMap2 = qrglpCharTab[0]->lpCMapTab;
|
|
lpbLigature1 = lpbLigature2 = qrglpCharTab[0]->lpLigature;
|
|
|
|
for (;; sz1++, sz2++)
|
|
{
|
|
|
|
ch1 = *sz1;
|
|
ch2 = *sz2;
|
|
#if 0 // do not enable. for Diff purposes only
|
|
if (ch1 == DELIMITER)
|
|
{
|
|
cDelimiter1++;
|
|
if (cDelimiter1 >= 2)
|
|
{
|
|
ch1 = 0;
|
|
}
|
|
}
|
|
if (ch2 == DELIMITER)
|
|
{
|
|
cDelimiter2++;
|
|
if (cDelimiter2 >= 2)
|
|
{
|
|
ch2 = 0;
|
|
}
|
|
}
|
|
#endif // 0
|
|
|
|
if ((lpCMap1[ch1].Class & SPECIAL_CHAR_MAP) == CLASS_TERMINATOR)
|
|
ch1 = 0;
|
|
if ((lpCMap1[ch2].Class & SPECIAL_CHAR_MAP) == CLASS_TERMINATOR)
|
|
ch2 = 0;
|
|
|
|
while (ch1 == EMBEDFONT_BYTE_TAG) // Change font map
|
|
{
|
|
sz1++; // Skip the font info
|
|
lpCMap1 = qrglpCharTab[ch1 = *sz1++ - 1]->lpCMapTab; // Get the new font map
|
|
lpbLigature1 = qrglpCharTab[ch1]->lpLigature; // Get the new ligature
|
|
ch1 = *sz1;
|
|
}
|
|
while (ch2 == EMBEDFONT_BYTE_TAG) // Change font map
|
|
{
|
|
sz2++; // Skip the font info
|
|
lpCMap2 = qrglpCharTab[ch2 = *sz2++ - 1]->lpCMapTab; // Get the new font map
|
|
lpbLigature2 = qrglpCharTab[ch2]->lpLigature; // Get the new ligature
|
|
ch2 = *sz2;
|
|
}
|
|
|
|
if (ch1 == 0 || ch2 == 0)
|
|
break;
|
|
|
|
/* A sort order = 0 means that you want to ignore this letter */
|
|
if (lpCMap1[ch1].SortOrder == 0)
|
|
{
|
|
// Skip this letter.
|
|
if (lpCMap1[ch2].SortOrder != 0)
|
|
{
|
|
if (chDiff1 == 0)
|
|
{
|
|
chDiff1 = -1;
|
|
chDiff2 = 1;
|
|
}
|
|
sz2--; // Compensate the increment
|
|
}
|
|
else if (ch1 != ch2)
|
|
{
|
|
// To fix the case of : (oui and !oui
|
|
if (chDiff1 == 0)
|
|
chDiff1 = ch1;
|
|
if (chDiff2 == 0)
|
|
chDiff2 = ch2;
|
|
}
|
|
continue;
|
|
}
|
|
|
|
if (lpCMap2[ch2].SortOrder == 0)
|
|
{
|
|
// Skip this letter.
|
|
if (lpCMap1[ch1].SortOrder != 0)
|
|
{
|
|
if (chDiff2 == 0)
|
|
{
|
|
chDiff2 = -1;
|
|
chDiff1 = 1;
|
|
}
|
|
sz1--; // Compensate the increment
|
|
}
|
|
continue;
|
|
}
|
|
|
|
/* Do this before ligature so that we can catch the case of
|
|
* ligature being greater than equivalent bytes
|
|
*/
|
|
if (fRet2 == 0)
|
|
fRet2 = (lpCMap1[ch1].SortOrder & SECONDARY_SORT_MASK)
|
|
- (lpCMap2[ch2].SortOrder & SECONDARY_SORT_MASK);
|
|
|
|
/**************************************************
|
|
* WE NOW HAVE TO CHECK FOR LIGATURES SORTING ORDER.
|
|
***************************************************/
|
|
chLig1 = 0;
|
|
chLig2 = 0;
|
|
if (lpbLigature1 && lpCMap1[ch1].Class == CLASS_LIGATURE)
|
|
{
|
|
for (lpb = lpbLigature1; *lpb; lpb += 3)
|
|
{
|
|
if (*lpb == ch1)
|
|
{
|
|
ch1 = lpb[1];
|
|
chLig1 = lpb[2];
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (lpbLigature2 && lpCMap2[ch2].Class == CLASS_LIGATURE)
|
|
{
|
|
for (lpb = lpbLigature2; *lpb; lpb += 3)
|
|
{
|
|
if (*lpb == ch2)
|
|
{
|
|
ch2 = lpb[1];
|
|
chLig2 = lpb[2];
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Now we have to check for ligature compared with non ligature */
|
|
if (chLig1 != 0 && chLig2 == 0)
|
|
{
|
|
chLig2 = *(++sz2);
|
|
}
|
|
|
|
if (chLig2 != 0 && chLig1 == 0)
|
|
{
|
|
chLig1 = *(++sz1);
|
|
}
|
|
|
|
|
|
if (fRet = (lpCMap1[ch1].SortOrder & PRIMARY_SORT_MASK)
|
|
- (lpCMap2[ch2].SortOrder & PRIMARY_SORT_MASK))
|
|
return(fRet);
|
|
|
|
if (fRet = (lpCMap1[chLig1].SortOrder & PRIMARY_SORT_MASK) -
|
|
(lpCMap2[chLig2].SortOrder & PRIMARY_SORT_MASK))
|
|
return (fRet);
|
|
|
|
// REVIEW: how to handle ligature secondary sort
|
|
if (fRet = (lpCMap1[chLig1].SortOrder & SECONDARY_SORT_MASK) -
|
|
(lpCMap2[chLig2].SortOrder & SECONDARY_SORT_MASK))
|
|
return (fRet);
|
|
|
|
if (fRet2 == 0)
|
|
{
|
|
fRet2 = (lpCMap1[ch1].SortOrder & SECONDARY_SORT_MASK)
|
|
- (lpCMap2[ch2].SortOrder & SECONDARY_SORT_MASK);
|
|
}
|
|
|
|
}
|
|
if (ch1 != ch2)
|
|
{
|
|
if ((ch1 == 0 && lpCMap2[ch2].SortOrder == 0) ||
|
|
(ch2 == 0 && lpCMap1[ch1].SortOrder == 0))
|
|
{
|
|
if (chDiff1 != chDiff2)
|
|
return (chDiff1 - chDiff2);
|
|
}
|
|
return(ch1 - ch2);
|
|
}
|
|
|
|
// REVIEW: Check case where chDiff1==chDiff2 and fRet2 != 0
|
|
// REVIEW: Merge this with btree compare
|
|
return ((fRet = chDiff1 - chDiff2) == 0 ? fRet2 : fRet);
|
|
}
|
|
|
|
|
|
PUBLIC VOID EXPORT_API PASCAL FAR BtreeSetCMap (HANDLE hbt,
|
|
LPCHARTAB FAR * lrglpCharTab)
|
|
{
|
|
QBTHR qbthr;
|
|
|
|
|
|
if (hbt == NULL || lrglpCharTab == NULL)
|
|
return;
|
|
qbthr = _GLOBALLOCK(hbt);
|
|
|
|
qbthr->lrglpCharTab = lrglpCharTab;
|
|
_GLOBALUNLOCK(hbt);
|
|
return;
|
|
}
|
|
|
|
PUBLIC LPVOID EXPORT_API PASCAL FAR BtreeGetCMap (HANDLE hbt)
|
|
{
|
|
QBTHR qbthr;
|
|
LPVOID lpv;
|
|
|
|
if (hbt == NULL)
|
|
return NULL;
|
|
qbthr = _GLOBALLOCK(hbt);
|
|
|
|
lpv = (LPVOID)qbthr->lrglpCharTab;
|
|
_GLOBALUNLOCK(hbt);
|
|
return lpv;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* @func int | PASCAL FAR | StringJCompare |
|
|
* Compares two Japanese strings for sorting order.
|
|
*
|
|
* @parm DWORD | dwFlags |
|
|
* - zero or more of
|
|
* NORM_IGNORECASE
|
|
* NORM_IGNORENONSPACE
|
|
* NORM_IGNORESYMBOLS
|
|
*
|
|
* @parm LPBYTE | lpStr1 |
|
|
* Pointer to string to compare
|
|
*
|
|
* @parm int | cch1 |
|
|
* length of string
|
|
*
|
|
* @parm LPBYTE | lpStr2 |
|
|
* pointer to string to compare
|
|
*
|
|
* @parm int | cch2 |
|
|
* length of string
|
|
*
|
|
* @rdesc
|
|
* < 0 : if sz1 < sz2
|
|
* = 0 : if sz1 = sz2
|
|
* > 0 : if sz1 > sz2
|
|
***********************************************************************/
|
|
|
|
PUBLIC int EXPORT_API PASCAL FAR StringJCompare( DWORD dwFlags,
|
|
LPBYTE lpstr1, int cch1, LPBYTE lpstr2, int cch2)
|
|
{
|
|
LPBYTE pbMasks;
|
|
unsigned char b1stDiff;
|
|
int b1stDiffValue;
|
|
unsigned char bFlgMask, bWgtMask;
|
|
int bTemp;
|
|
COMPSTRINGINFO compstrinfo1, compstrinfo2;
|
|
|
|
b1stDiff=0;
|
|
b1stDiffValue=0;
|
|
|
|
/* initialise to indicate no previous character */
|
|
g_dwFlags = dwFlags;
|
|
compstrinfo1.priwt = compstrinfo1.secwt = 0;
|
|
compstrinfo2.priwt = compstrinfo2.secwt = 0;
|
|
|
|
/* must continue even if one string empty, to ignore trailing punc */
|
|
while (cch1 || cch2)
|
|
{
|
|
/* get the sorting codes & if not equal, return the difference */
|
|
/* if we must ignore punc, then loop over them */
|
|
if (!cch1)
|
|
compstrinfo1.priwt = compstrinfo1.secwt = 0;
|
|
else
|
|
{
|
|
do
|
|
{
|
|
cch1 = GetSortWeightJ(&lpstr1, cch1, &compstrinfo1);
|
|
if ( (g_dwFlags & NORM_IGNORESYMBOLS) &&
|
|
compstrinfo1.priwt>=0x1400 &&
|
|
compstrinfo1.priwt<=0x54FF )
|
|
compstrinfo1.priwt = compstrinfo1.secwt = 0;
|
|
} while ( cch1 && compstrinfo1.priwt==0 );
|
|
}
|
|
|
|
if (!cch2)
|
|
compstrinfo2.priwt = compstrinfo2.secwt = 0;
|
|
|
|
else {
|
|
do
|
|
{
|
|
cch2 = GetSortWeightJ(&lpstr2, cch2, &compstrinfo2);
|
|
if ( (g_dwFlags & NORM_IGNORESYMBOLS) &&
|
|
compstrinfo2.priwt>=0x1400 &&
|
|
compstrinfo2.priwt<=0x54FF)
|
|
{
|
|
compstrinfo2.priwt = compstrinfo2.secwt = 0;
|
|
}
|
|
} while ( cch2 && compstrinfo2.priwt==0 );
|
|
}
|
|
|
|
/* This exit path also used when just one string is empty */
|
|
if (compstrinfo1.priwt != compstrinfo2.priwt)
|
|
return (compstrinfo1.priwt - compstrinfo2.priwt);
|
|
|
|
/* first order values same, so check 2nd, 3rd .. 6th for differences */
|
|
/* stop scanning when we reach an order where we have a previous diff */
|
|
if (compstrinfo1.secwt!=compstrinfo2.secwt)
|
|
{
|
|
for( pbMasks=pbgMasks;(bFlgMask=pbMasks[1]) && bFlgMask!=b1stDiff;
|
|
pbMasks+=4 )
|
|
{
|
|
if (bFlgMask & compstrinfo1.secflg)
|
|
{
|
|
bWgtMask = pbMasks[0];
|
|
bTemp = (compstrinfo1.secwt & bWgtMask) -
|
|
(compstrinfo2.secwt & bWgtMask);
|
|
|
|
/* if we find a difference it must be the most important
|
|
* so far so save it and remember which order it belongs
|
|
* to - then stop
|
|
*/
|
|
if (bTemp)
|
|
{
|
|
b1stDiffValue = bTemp;
|
|
b1stDiff = bFlgMask;
|
|
break; /* move onto the next character pair */
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* no 1st order diffs, so ret by 2nd..6th order diff */
|
|
if (b1stDiff)
|
|
return (b1stDiffValue);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/***
|
|
* GetSortWeightJ - get the sort weight for Japan.
|
|
* ( handles diacritical merging )
|
|
*Purpose:
|
|
*
|
|
*Entry:
|
|
*
|
|
*Exit:
|
|
* returns TRUE :
|
|
* FALSE :
|
|
*Note:
|
|
* Priwt : Word
|
|
* Secwt : Byte, contains 2nd, 3rd .. 6th order sorting values
|
|
* SecFlg: Byte, contains flags to say which orders to use
|
|
*
|
|
***********************************************************************/
|
|
PRIVATE int PASCAL NEAR GetSortWeightJ(
|
|
LPBYTE FAR*plpstr1, int cch1, COMPSTRINGINFO FAR *pcompstrinfo)
|
|
{
|
|
unsigned int Priwt, NextCh;
|
|
BYTE Secwt, SecFlg;
|
|
LPBYTE lpstr1 = *plpstr1;
|
|
LPBYTE pbMasks;
|
|
|
|
/* first pick up the next whole character */
|
|
Priwt = *lpstr1++;
|
|
cch1--;
|
|
|
|
if (cch1 && isDbcsJ(Priwt, 0))
|
|
{
|
|
Priwt = (Priwt << 8) + *lpstr1++;
|
|
cch1--;
|
|
}
|
|
|
|
/* if this a Kanji outside our tables force the correct values */
|
|
if (Priwt >= 0x87A0)
|
|
{
|
|
Priwt |= 0x4000; /* 0x8nnn -> 0xCnnn, 9->D, E->E, F->F */
|
|
Secwt = 0x00;
|
|
SecFlg = 0x04; /* for repeat character order */
|
|
goto AllDone;
|
|
}
|
|
|
|
/* Char can be sorted by table, so mask into range & get table values */
|
|
Priwt &= 0x0FFF; /* 0x00nn -> 0x00nn, 81->01, 82->02, 83->03 */
|
|
|
|
Secwt = pbSecWgt[Priwt];
|
|
SecFlg = pbSecFlg[Priwt];
|
|
Priwt = (pbPriHi[Priwt] << 8) + pbPriLo[Priwt];
|
|
|
|
/* Most characters now complete, but a few need extra processing */
|
|
/* eg. Kana that can have Daku-ten or Handaku-ten, Cho-on or repeat chars */
|
|
if ( (Priwt&0x00FF) != 0x00FF )
|
|
goto AllDone;
|
|
|
|
Priwt &= 0xFF00; /* mask off the special flag */
|
|
|
|
/* If we have a Kana, test for following Daku-ten or Handaku-ten */
|
|
if (Priwt >= 0x8700)
|
|
{
|
|
if (cch1)
|
|
{
|
|
NextCh = *lpstr1;
|
|
if (cch1>=2 && isDbcsJ(NextCh, 0))
|
|
NextCh = (NextCh << 8) + *(lpstr1+1);
|
|
if (NextCh==0x00DE || NextCh==0x814A)
|
|
{
|
|
lpstr1 += (NextCh==0x00DE) ? 1 : 2;
|
|
cch1 -= (NextCh==0x00DE) ? 1 : 2;
|
|
Secwt |= 0x01;
|
|
}
|
|
else if (NextCh==0x00DF || NextCh==0x814B)
|
|
{
|
|
lpstr1 += (NextCh==0x00DF) ? 1 : 2;
|
|
cch1 -= (NextCh==0x00DF) ? 1 : 2;
|
|
Secwt |= 0x02;
|
|
}
|
|
}
|
|
goto AllDone;
|
|
}
|
|
|
|
/* If not kana, must be Cho-on or a repeat character - try Kanji repeat */
|
|
if (Priwt==0x3A00)
|
|
{
|
|
if ( pcompstrinfo->priwt >= 0xC7A0 ) /* if prev was Kanji, use it */
|
|
Priwt = pcompstrinfo->priwt;
|
|
Secwt = pcompstrinfo->secwt | 0x08; /* with a repeat marker */
|
|
SecFlg = pcompstrinfo->secflg;
|
|
goto AllDone;
|
|
}
|
|
|
|
/* Cho-on and Kana repeat chars only used if they actually follow a kana */
|
|
if (pcompstrinfo->priwt<0x8700 || pcompstrinfo->priwt>0xB9FF)
|
|
goto AllDone;
|
|
|
|
/* Cho-on characters duplicate the vowel sound of the prev. charater */
|
|
/* except when they follow a N, in which case they act like repeat */
|
|
if ((Priwt==0x4400 || Priwt==0x3500) && pcompstrinfo->priwt<0xB900)
|
|
{
|
|
Priwt = ((pcompstrinfo->priwt % 5) << 8) + 0x8700;
|
|
Secwt |= (pcompstrinfo->secwt&0x20);
|
|
SecFlg = 0x37;
|
|
goto AllDone;
|
|
}
|
|
|
|
/* Kana repeat is the only special character left */
|
|
/* second order values should be merged with those of previous character */
|
|
Priwt = pcompstrinfo->priwt;
|
|
Secwt = (pcompstrinfo->secwt&0xE4) | (Secwt&0x1B); /* merge minus some bits */
|
|
SecFlg = pcompstrinfo->secflg;
|
|
|
|
AllDone: /* we have the full 50-on sorting values now */
|
|
|
|
/* mask off any bits that we want to ignore during this compare */
|
|
if (g_dwFlags & ~NORM_IGNORESYMBOLS)
|
|
{
|
|
//Special kludges to make some pairs of full-pitch chars that
|
|
//sort as different chars both convert to the same half-pitch char
|
|
if (g_dwFlags & NORM_IGNOREWIDTH)
|
|
{
|
|
if (SecFlg==0x22 && (Secwt&0x40))
|
|
Secwt = 0x04;
|
|
if (Priwt==0x3500)
|
|
Priwt = 0x4400;
|
|
}
|
|
for (pbMasks=pbIgnore; *pbMasks; pbMasks+=4)
|
|
{
|
|
unsigned int nIgnore;
|
|
|
|
nIgnore = (pbMasks[2] << 8) + pbMasks[3];
|
|
if( (g_dwFlags & nIgnore) && (SecFlg&pbMasks[1]) )
|
|
{
|
|
Secwt &= ~pbMasks[0];
|
|
SecFlg &= ~pbMasks[1];
|
|
}
|
|
}
|
|
}
|
|
|
|
pcompstrinfo->priwt = Priwt;
|
|
pcompstrinfo->secwt = Secwt;
|
|
pcompstrinfo->secflg = SecFlg;
|
|
*plpstr1 = lpstr1;
|
|
return(cch1);
|
|
}
|
|
|
|
/* EOF */
|
|
|
|
|
|
|