Back to index

im-sdk  12.3.91
KeysymType.c
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2003 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 
00043 #include "PYIM.h"
00044 
00045 /* 0x6e  0xoe   4  ==>  */
00046 /* 0x70  0x10   4  <==  */
00047 
00048 JINT   IsWantedKeysym(JINT *pks);
00049 JINT   IsQuitKeysym(JINT *pks);
00050 JINT   IsQpSpSwitchKeysym(JINT *pks);
00051 JINT   IsEditKeysym(JINT *pks);
00052 JINT   IsPageKeysym(JINT *pks);
00053 JINT   IsSelectKeysym(JINT *pks);
00054 JINT   IsPyKeysym(JINT *pks);
00055 
00056 static JINT IsAlphaNum(JINT *pks);
00057 JWORD  GetQuanjiaoSymbol(JINT *pks, JINT IsChnPunc, JINT IsChnAscii);
00058 
00059 JINT IsQuitKeysym(JINT *pks)
00060 {
00061        if (pks[0] == IMXK_QUIT_PYIM)
00062               return TRUE;
00063        return FALSE; 
00064 }
00065 
00066 
00067 JINT IsQpSpSwitchKeysym(JINT *pks)
00068 {
00069        if (pks[0] == IMXK_ALT_QP_SP)
00070               return TRUE;
00071        return FALSE; 
00072 }
00073 
00074 
00075 JINT IsWantedKeysym(JINT *pks)
00076 {
00077        JINT   i, nLen;
00078        
00079        nLen = 0;
00080        for (i = 0; (i < SUN_NUM_KEYSYM) && (pks[i] != 0x0L); i++)
00081               nLen ++;
00082               
00083        if (nLen == 0)
00084               return FALSE;
00085        
00086        /*
00087        **  The following range is fetched from file "IMKeyMap.h"
00088        **  There maybe some ingoration about "IMXK_KP_xxx". Check it later.
00089        **
00090        **  Notice: Internal pesudo_keysym REDRAW_INTERNAL was added !!!! 0xEEEE
00091        */
00092        if( ( pks[0] == IMXK_BackSpace)     ||
00093            ( pks[0] == IMXK_Linefeed)   ||
00094            ( pks[0] == IMXK_Return)     ||
00095            ( pks[0] == IMXK_Escape)     ||
00096            ( pks[0] == IMXK_Multi_key)  ||
00097            ( pks[0] == IMXK_MOUSEPREV)  ||
00098            ( pks[0] == IMXK_MOUSENEXT)  ||
00099            ( pks[0] == IMXK_Page_Up)    ||
00100            ( pks[0] == IMXK_Page_Down)  ||
00101            ( pks[0] == IMXK_Clear)        ||
00102            ((pks[0] >= IMXK_Home) && (pks[0] <= IMXK_Begin))           ||
00103            ((pks[0] >= IMSunXK_AltGraph) && (pks[0] <= IMXK_KP_Space)) ||
00104            ((pks[0] >= IMXK_KP_Home) && (pks[0] <= IMXK_KP_Begin))     ||
00105            ( pks[0] == IMXK_KP_Delete)  ||
00106            ((pks[0] >= IMXK_KP_Multiply) && (pks[0] <= IMXK_KP_9))     ||
00107            ((pks[0] >= IMXK_Shift_L) && (pks[0] <= IMXK_Alt_R))        ||
00108            ((pks[0] >= IMXK_space) && (pks[0] <= IMXK_asciitilde))     ||
00109            ( pks[0] == IMXK_Delete)        ||
00110            ( pks[0] == IMXK_REDRAW_INTERNAL)     
00111          )
00112               return TRUE;
00113               
00114        return FALSE;
00115 }
00116 
00117 
00118 JINT IsEditKeysym(JINT *pks)
00119 {
00120        JINT   i, nLen;
00121        
00122        nLen = 0;
00123        for (i = 0; (i < SUN_NUM_KEYSYM) && (pks[i] != 0x0L); i++)
00124               nLen ++;
00125               
00126        if (nLen == 0)
00127               return FALSE;
00128        
00129        /*
00130        **  The following range is fetched from file "IMWantedKey.h"
00131        **  There maybe some ingoration about "IMXK_KP_xxx". Check it later.
00132        **
00133        **  Notice: A Self defined Keysym IMXK_REDRAW_INTERNAL was added! 0xEEEE
00134        */
00135        if( (pks[0] == IMXK_Escape)      ||
00136            (pks[0] == IMXK_quoteright)  ||
00137            (pks[0] == IMXK_Delete)      ||
00138            (pks[0] == IMXK_BackSpace)   ||
00139            (pks[0] == IMXK_Left)        ||
00140            (pks[0] == IMXK_Right)       ||
00141            (pks[0] == IMXK_Home)        ||
00142            (pks[0] == IMXK_End)         ||
00143            (pks[0] == IMXK_REDRAW_INTERNAL)      ||
00144            ((pks[0] >= IMXK_a) && (pks[0] <= IMXK_z)) 
00145          )
00146               return TRUE;
00147        return FALSE;
00148 }
00149 
00150 
00151 JINT IsPyKeysym(JINT *pks)
00152 {
00153        JINT   i, nLen;
00154        
00155        nLen = 0;
00156        for (i = 0; (i < SUN_NUM_KEYSYM) && (pks[i] != 0x0L); i++)
00157               nLen ++;
00158               
00159        if (nLen == 0)
00160               return FALSE;
00161        
00162        /*
00163        **  The following range is fetched from file "IMWantedKey.h"
00164        **  There maybe some ingoration about "IMXK_KP_xxx". Check it later.
00165        **
00166        **  Notice: A Self defined Keysym IMXK_REDRAW_INTERNAL was added! 0xEEEE
00167        */
00168        if( (pks[0] == IMXK_Escape)      ||
00169            (pks[0] == IMXK_quoteright)  ||
00170            (pks[0] == IMXK_REDRAW_INTERNAL)      ||
00171            ((pks[0] >= IMXK_a) && (pks[0] <= IMXK_z)) 
00172          )
00173               return TRUE;
00174        return FALSE;
00175 }
00176 
00177 
00178 JINT IsPageKeysym(JINT *pks)
00179 {
00180        JINT   i, nLen;
00181        
00182        nLen = 0;
00183        for (i = 0; (i < SUN_NUM_KEYSYM) && (pks[i] != 0x0L); i++)
00184               nLen ++;
00185               
00186        if (nLen == 0)
00187               return FALSE;
00188        
00189        if( (pks[0] == IMXK_minus)      ||
00190            (pks[0] == IMXK_equal)          ||
00191            (pks[0] == IMXK_bracketleft)    ||
00192            (pks[0] == IMXK_bracketright)   ||
00193            (pks[0] == IMXK_comma)          ||
00194            (pks[0] == IMXK_MOUSEPREV)      ||
00195            (pks[0] == IMXK_MOUSENEXT)      ||
00196            (pks[0] == IMXK_Page_Up)        ||
00197            (pks[0] == IMXK_Page_Down)      ||
00198            (pks[0] == IMXK_period)         ||
00199            (pks[0] == IMXK_Return) )
00200               return TRUE;
00201        return FALSE;
00202 }
00203 
00204 
00205 JINT IsSelectKeysym(JINT *pks)
00206 {
00207        JINT   i, nLen;
00208        
00209        nLen = 0;
00210        for (i = 0; (i < SUN_NUM_KEYSYM) && (pks[i] != 0x0L); i++)
00211               nLen ++;
00212               
00213        if (nLen == 0)
00214               return FALSE;
00215        
00216        if( (pks[0] == IMXK_space)  ||
00217            ((pks[0] >= IMXK_0) && (pks[0] <= IMXK_9)) )
00218               return TRUE;
00219        return FALSE;
00220 }
00221 
00222 
00223 /* SP, 0~9, A~Z, a~z */
00224 /* Chinese Punctation and English Chars */
00225 static JWORD pwPuncArray[2][96] = {
00226        { 0xA1A1, 0xA3A1, 0xA1B0, 0xA3A3, 0xA1E7, 0xA3A5, 0xA1EC, 0xA1AE,
00227        0xA3A8, 0xA1B2, 0xA1C1, 0xA3AB, 0xA3AC, 0xA3AD, 0xA1A3, 0xA1A2,
00228        0xA3B0, 0xA3B1, 0xA3B2, 0xA3B3, 0xA3B4, 0xA3B5, 0xA3B6, 0xA3B7,
00229        0xA3B8, 0xA3B9, 0xA3BA, 0xA3BB, 0xA1B8, 0xA3BD, 0xA1BA, 0xA3BF,
00230        0xA1E6, 0xA3C1, 0xA3C2, 0xA3C3, 0xA3C4, 0xA3C5, 0xA3C6, 0xA3C7,
00231        0xA3C8, 0xA3C9, 0xA3CA, 0xA3CB, 0xA3CC, 0xA3CD, 0xA3CE, 0xA3CF,
00232        0xA3D0, 0xA3D1, 0xA3D2, 0xA3D3, 0xA3D4, 0xA3D5, 0xA3D6, 0xA3D7,
00233        0xA3D8, 0xA3D9, 0xA3DA, 0xA1BC, 0xA1C2, 0xA1BE, 0xA3A4, 0xA1AD,
00234        0xA1A4, 0xA3E1, 0xA3E2, 0xA3E3, 0xA3E4, 0xA3E5, 0xA3E6, 0xA3E7,
00235        0xA3E8, 0xA3E9, 0xA3EA, 0xA3EB, 0xA3EC, 0xA3ED, 0xA3EE, 0xA3EF,
00236        0xA3F0, 0xA3F1, 0xA3F2, 0xA3F3, 0xA3F4, 0xA3F5, 0xA3F6, 0xA3F7,
00237        0xA3F8, 0xA3F9, 0xA3FA, 0xA1B6, 0xA1F9, 0xA1B4, 0xA1AB, 0x0000 },
00238 
00239        { 0xA1A1, 0xA3A1, 0xA1B1, 0xA3A3, 0xA1E7, 0xA3A5, 0xA1EC, 0xA1AF,
00240        0xA3A9, 0xA1B3, 0xA1C1, 0xA3AB, 0xA3AC, 0xA3AD, 0xA1A3, 0xA1A2,
00241        0xA3B0, 0xA3B1, 0xA3B2, 0xA3B3, 0xA3B4, 0xA3B5, 0xA3B6, 0xA3B7,
00242        0xA3B8, 0xA3B9, 0xA3BA, 0xA3BB, 0xA1B9, 0xA3BD, 0xA1BB, 0xA3BF,
00243        0xA1E6, 0xA3C1, 0xA3C2, 0xA3C3, 0xA3C4, 0xA3C5, 0xA3C6, 0xA3C7,
00244        0xA3C8, 0xA3C9, 0xA3CA, 0xA3CB, 0xA3CC, 0xA3CD, 0xA3CE, 0xA3CF,
00245        0xA3D0, 0xA3D1, 0xA3D2, 0xA3D3, 0xA3D4, 0xA3D5, 0xA3D6, 0xA3D7,
00246        0xA3D8, 0xA3D9, 0xA3DA, 0xA1BD, 0xA1C2, 0xA1BF, 0xA3A4, 0xA1AD,
00247        0xA1A4, 0xA3E1, 0xA3E2, 0xA3E3, 0xA3E4, 0xA3E5, 0xA3E6, 0xA3E7,
00248        0xA3E8, 0xA3E9, 0xA3EA, 0xA3EB, 0xA3EC, 0xA3ED, 0xA3EE, 0xA3EF,
00249        0xA3F0, 0xA3F1, 0xA3F2, 0xA3F3, 0xA3F4, 0xA3F5, 0xA3F6, 0xA3F7,
00250        0xA3F8, 0xA3F9, 0xA3FA, 0xA1B7, 0xA1F9, 0xA1B5, 0xA1AB, 0x0000 }
00251 };
00252 
00253 
00254 /*
00255  * Get the Quanjiao[Full Width] symbol of a single 0x20~0x7F Ascii Key.
00256  * ChnAscii only valid for [SP, 0~9, A~Z, a~z]
00257  * Return 0x0000 if invalid
00258  */
00259 JWORD GetQuanjiaoSymbol(JINT *pks, JINT IsChnPunc, JINT IsChnAscii)
00260 {
00261        JWORD   wTmp;
00262        JWORD   wRet;
00263        
00264        wRet = 0x0000;
00265        if ((pks[0] < 0x20) || (pks[0] >= 0x7F))
00266               return wRet;
00267        
00268        if ( ((IsChnPunc == TRUE) && (IsChnAscii == TRUE))  || 
00269            ((IsChnPunc == TRUE) && (IsChnAscii != TRUE) && (IsAlphaNum(pks) == FALSE)) ||  /* Chinese Punctation Only */
00270            ((IsChnPunc != TRUE) && (IsChnAscii == TRUE) && (IsAlphaNum(pks) == TRUE)) )    /* Chinese Ascii Only */
00271        {
00272               wRet = pwPuncArray[0][pks[0] - 0x20];
00273               
00274               wTmp = pwPuncArray[0][pks[0] - 0x20];
00275               pwPuncArray[0][pks[0] - 0x20] = pwPuncArray[1][pks[0] - 0x20];
00276               pwPuncArray[1][pks[0] - 0x20] = wTmp;
00277        }
00278        else
00279               wRet = 0x0000;
00280               
00281        return wRet;
00282 }
00283 
00284 
00285 /* is SP or 0~9, A~Z, a~z, return TRUE, else, return FALSE */
00286 static JINT IsAlphaNum(JINT *pks)
00287 {
00288        if( (pks[0] == 0x20) || 
00289            ((pks[0] >= '0') && (pks[0] <= '9')) ||
00290            ((pks[0] >= 'A') && (pks[0] <= 'Z')) ||
00291            ((pks[0] >= 'a') && (pks[0] <= 'z')) )
00292               return TRUE;
00293        else
00294               return FALSE;
00295 }
00296 
00297 
00298     /* SKB_SYMBSCIENT */
00299 static unsigned short wNewpySym0[] = 
00300   { 0xA1A4, 0xA1A5, 0xA1A6, 0xA1A7, 0xA1A8, 0xA1A9, 0xA1AA, 0xA1AB, 0xA1AC, 0xA1AD,
00301     0xA1C0, 0xA1C1, 0xA1C2, 0xA1C3, 0xA1C4, 0xA1C5, 0xA1C6, 0xA1C7, 0xA1C8, 0xA1C9,
00302     0xA1CA, 0xA1CB, 0xA1CC, 0xA1CD, 0xA1CE,
00303     0xA1CF, 0xA1D0, 0xA1D1, 0xA1D2, 0xA1D3, 0xA1D4, 0xA1D5, 0xA1D6, 0xA1D7, 0xA1D8,
00304     0xA1D9, 0xA1DA, 0xA1DB, 0xA1DC, 0xA1DD, 0xA1DE, 0xA1DF, 0xA1E0, 0xA1E1, 0xA1E2,
00305     0xA1E3, 0xA1E4, 0xA1E5, 0xA1EE, 0xA1EF,
00306     0xA1F0, 0xA1F1, 0xA1F2, 0xA1F3, 0xA1F4, 0xA1F5, 0xA1F6, 0xA1F7, 0xA1F8, 0xA1F9,
00307     0xA1FA, 0xA1FB, 0xA1FC, 0xA1FD, 0xA1FE, 0xA1E6, 0xA1E7, 0xA1E8, 0xA1E9, 0xA1EA,
00308     0xA1EB, 0xA1EC, 0xA1ED,
00309     0xA3A2, 0xA3E0, 0xA3A7, 0xA3AA, 0xA3C0, 0xA3DE, 0xA3DF, 0xA3FE, 0xA3FC, 0x0000 };
00310 
00311     /* SKB_SERIESONE */
00312 static unsigned short wNewpySym1[] = 
00313   { 0xA2B1, 0xA2B2, 0xA2B3, 0xA2B4, 0xA2B5, 0xA2B6, 0xA2B7, 0xA2B8, 0xA2B9, 0xA2BA,
00314     0xA2BB, 0xA2BC, 0xA2BD, 0xA2BE, 0xA2BF, 0xA2C0, 0xA2C1, 0xA2C2, 0xA2C3, 0xA2C4, 
00315     0x0000 };
00316 
00317     /* SKB_SERIESTWO */
00318 static unsigned short wNewpySym2[] = 
00319   { 0xA2C5, 0xA2C6, 0xA2C7, 0xA2C8, 0xA2C9, 0xA2CA, 0xA2CB, 0xA2CC, 0xA2CD, 0xA2CE,
00320     0xA2CF, 0xA2D0, 0xA2D1, 0xA2D2, 0xA2D3, 0xA2D4, 0xA2D5, 0xA2D6, 0xA2D7, 0xA2D8, 
00321     0x0000 };
00322  
00323     /* SKB_SERIESTHREE */
00324 static unsigned short wNewpySym3[] = 
00325   { 0xA2D9, 0xA2DA, 0xA2DB, 0xA2DC, 0xA2DD, 0xA2DE, 0xA2DF, 0xA2E0, 0xA2E1, 0xA2E2,
00326     0xA2E5, 0xA2E6, 0xA2E7, 0xA2E8, 0xA2E9, 0xA2EA, 0xA2EB, 0xA2EC, 0xA2ED, 0xA2EE, 
00327     0x0000 };
00328     
00329     /* SKB_SERIESFOUR */
00330 static unsigned short wNewpySym4[] = 
00331   { 0xA2F1, 0xA2F2, 0xA2F3, 0xA2F4, 0xA2F5, 0xA2F6, 0xA2F7, 0xA2F8, 0xA2F9, 0xA2FA,
00332     0xA2FB, 0xA2FC,
00333     0xA2A1, 0xA2A2, 0xA2A3, 0xA2A4, 0xA2A5, 0xA2A6, 0xA2A7, 0xA2A8, 0xA2A9, 0xA2AA, 
00334     0x0000 };
00335 
00336     /* SKB_GREECE */
00337 static unsigned short wNewpySym5[] = 
00338   { 0xA6A1, 0xA6A2, 0xA6A3, 0xA6A4, 0xA6A5, 0xA6A6, 0xA6A7, 0xA6A8, 0xA6A9, 0xA6AA,
00339     0xA6AB, 0xA6AC, 0xA6AD, 0xA6AE, 0xA6AF, 0xA6B0, 0xA6B1, 0xA6B2, 0xA6B3, 0xA6B4,
00340     0xA6B5, 0xA6B6, 0xA6B7, 0xA6B8,
00341     0xA6C1, 0xA6C2, 0xA6C3, 0xA6C4, 0xA6C5, 0xA6C6, 0xA6C7, 0xA6C8, 0xA6C9, 0xA6CA,
00342     0xA6CB, 0xA6CC, 0xA6CD, 0xA6CE, 0xA6CF, 0xA6D0, 0xA6D1, 0xA6D2, 0xA6D3, 0xA6D4,
00343     0xA6D5, 0xA6D6, 0xA6D7, 0xA6D8, 0x0000 };
00344 
00345     /* SKB_RUSSIAN */
00346 static unsigned short wNewpySym6[] = 
00347   { 0xA7A1, 0xA7A2, 0xA7A3, 0xA7A4, 0xA7A5, 0xA7A6, 0xA7A7, 0xA7A8, 0xA7A9, 0xA7AA,
00348     0xA7AB, 0xA7AC, 0xA7AD, 0xA7AE, 0xA7AF, 0xA7B0, 0xA7B1, 0xA7B2, 0xA7B3, 0xA7B4,
00349     0xA7B5, 0xA7B6, 0xA7B7, 0xA7B8, 0xA7B9, 0xA7BA, 0xA7BB, 0xA7BC, 0xA7BD, 0xA7BE,
00350     0xA7BF, 0xA7C0, 0xA7C1,
00351     0xA7D1, 0xA7D2, 0xA7D3, 0xA7D4, 0xA7D5, 0xA7D6, 0xA7D7, 0xA7D8, 0xA7D9, 0xA7DA,
00352     0xA7DB, 0xA7DC, 0xA7DD, 0xA7DE, 0xA7DF, 0xA7E0, 0xA7E1, 0xA7E2, 0xA7E3, 0xA7E4,
00353     0xA7E5, 0xA7E6, 0xA7E7, 0xA7E8, 0xA7E9, 0xA7EA, 0xA7EB, 0xA7EC, 0xA7ED, 0xA7EE,
00354     0xA7EF, 0xA7F0, 0xA7F1, 0x0000 };
00355 
00356     /* SKB_PYSYM */
00357 static unsigned short wNewpySym7[] = 
00358   { 0xA8A1, 0xA8A2, 0xA8A3, 0xA8A4, 0xA8A5, 0xA8A6, 0xA8A7, 0xA8A8, 0xA8A9, 0xA8AA,
00359     0xA8AB, 0xA8AC, 0xA8AD, 0xA8AE, 0xA8AF, 0xA8B0, 0xA8B1, 0xA8B2, 0xA8B3, 0xA8B4,
00360     0xA8B5, 0xA8B6, 0xA8B7, 0xA8B8, 0xA8B9, 0xA8BA, 0xA8BB, 0xA8BC, 0xA8BD, 0xA8BE,
00361     0xA8BF, 0xA8C0,
00362     0xA8C5, 0xA8C6, 0xA8C7, 0xA8C8, 0xA8C9, 0xA8CA, 0xA8CB, 0xA8CC, 0xA8CD, 0xA8CE,
00363     0xA8CF, 0xA8D0, 0xA8D1, 0xA8D2, 0xA8D3, 0xA8D4, 0xA8D5, 0xA8D6, 0xA8D7, 0xA8D8,
00364     0xA8D9, 0xA8DA, 0xA8DB, 0xA8DC, 0xA8DD, 0xA8DE, 0xA8DF, 0xA8E0, 0xA8E1, 0xA8E2,
00365     0xA8E3, 0xA8E4, 0xA8E5, 0xA8E6, 0xA8E7, 0xA8E8, 0xA8E9, 0x0000 };
00366 
00367     /* SKB_JAPPIN */
00368 static unsigned short wNewpySym8[] = 
00369   { 0xA4A1, 0xA4A2, 0xA4A3, 0xA4A4, 0xA4A5, 0xA4A6, 0xA4A7, 0xA4A8, 0xA4A9, 0xA4AA,
00370     0xA4AB, 0xA4AC, 0xA4AD, 0xA4AE, 0xA4AF, 0xA4B0, 0xA4B1, 0xA4B2, 0xA4B3, 0xA4B4,
00371     0xA4B5, 0xA4B6, 0xA4B7, 0xA4B8, 0xA4B9, 0xA4BA, 0xA4BB, 0xA4BC, 0xA4BD, 0xA4BE,
00372     0xA4BF, 0xA4C0, 0xA4C1, 0xA4C2, 0xA4C3, 0xA4C4, 0xA4C5, 0xA4C6, 0xA4C7, 0xA4C8,
00373     0xA4C9, 0xA4CA, 0xA4CB, 0xA4CC, 0xA4CD, 0xA4CE, 0xA4CF, 0xA4D0, 0xA4D1, 0xA4D2,
00374     0xA4D3, 0xA4D4, 0xA4D5, 0xA4D6, 0xA4D7, 0xA4D8, 0xA4D9, 0xA4DA, 0xA4DB, 0xA4DC,
00375     0xA4DD, 0xA4DE, 0xA4DF, 0xA4E0, 0xA4E1, 0xA4E2, 0xA4E3, 0xA4E4, 0xA4E5, 0xA4E6,
00376     0xA4E7, 0xA4E8, 0xA4E9, 0xA4EA, 0xA4EB, 0xA4EC, 0xA4ED, 0xA4EE, 0xA4EF, 0xA4F0,
00377     0xA4F1, 0xA4F2, 0xA4F3, 0x0000 };
00378 
00379     /* SKB_JAPPIAN */
00380 static unsigned short wNewpySym9[] = 
00381   { 0xA5A1, 0xA5A2, 0xA5A3, 0xA5A4, 0xA5A5, 0xA5A6, 0xA5A7, 0xA5A8, 0xA5A9, 0xA5AA,
00382     0xA5AB, 0xA5AC, 0xA5AD, 0xA5AE, 0xA5AF, 0xA5B0, 0xA5B1, 0xA5B2, 0xA5B3, 0xA5B4,
00383     0xA5B5, 0xA5B6, 0xA5B7, 0xA5B8, 0xA5B9, 0xA5BA, 0xA5BB, 0xA5BC, 0xA5BD, 0xA5BE,
00384     0xA5BF, 0xA5C0, 0xA5C1, 0xA5C2, 0xA5C3, 0xA5C4, 0xA5C5, 0xA5C6, 0xA5C7, 0xA5C8,
00385     0xA5C9, 0xA5CA, 0xA5CB, 0xA5CC, 0xA5CD, 0xA5CE, 0xA5CF, 0xA5D0, 0xA5D1, 0xA5D2,
00386     0xA5D3, 0xA5D4, 0xA5D5, 0xA5D6, 0xA5D7, 0xA5D8, 0xA5D9, 0xA5DA, 0xA5DB, 0xA5DC,
00387     0xA5DD, 0xA5DE, 0xA5DF, 0xA5E0, 0xA5E1, 0xA5E2, 0xA5E3, 0xA5E4, 0xA5E5, 0xA5E6,
00388     0xA5E7, 0xA5E8, 0xA5E9, 0xA5EA, 0xA5EB, 0xA5EC, 0xA5ED, 0xA5EE, 0xA5EF, 0xA5F0,
00389     0xA5F1, 0xA5F2, 0xA5F3, 0xA5F4, 0xA5F5, 0xA5F6, 0x0000 };
00390     
00391     /* SKB_TABSYMB */
00392 static unsigned short wNewpySym10[] = 
00393   { 0xA9A4, 0xA9A5, 0xA9A6, 0xA9A7, 0xA9A8, 0xA9A9, 0xA9AA, 0xA9AB, 0xA9AC, 0xA9AD,
00394     0xA9AE, 0xA9AF, 0xA9B0, 0xA9B1, 0xA9B2, 0xA9B3, 0xA9B4, 0xA9B5, 0xA9B6, 0xA9B7,
00395     0xA9B8, 0xA9B9, 0xA9BA, 0xA9BB, 0xA9BC, 0xA9BD, 0xA9BE, 0xA9BF, 0xA9C0, 0xA9C1,
00396     0xA9C2, 0xA9C3, 0xA9C4, 0xA9C5, 0xA9C6, 0xA9C7, 0xA9C8, 0xA9C9, 0xA9CA, 0xA9CB,
00397     0xA9CC, 0xA9CD, 0xA9CE, 0xA9CF, 0xA9D0, 0xA9D1, 0xA9D2, 0xA9D3, 0xA9D4, 0xA9D5,
00398     0xA9D6, 0xA9D7, 0xA9D8, 0xA9D9, 0xA9DA, 0xA9DB, 0xA9DC, 0xA9DD, 0xA9DE, 0xA9DF,
00399     0xA9E0, 0xA9E1, 0xA9E2, 0xA9E3, 0xA9E4, 0xA9E5, 0xA9E6, 0xA9E7, 0xA9E8, 0xA9E9,
00400     0xA9EA, 0xA9EB, 0xA9EC, 0xA9ED, 0xA9EE, 0xA9EF, 0x0000 };
00401     
00402     /* SKB_GBKEXTSYM1 */
00403 static unsigned short wNewpySym11[] = 
00404   { 0xA6E0, 0xA6E1, 0xA6E2, 0xA6E3, 0xA6E4, 0xA6E5, 0xA6E6, 0xA6E7, 0xA6E8, 0xA6E9,
00405     0xA6EA, 0xA6EB, 0xA6EE, 0xA6EF, 0xA6F0, 0xA6F1, 0xA6F2, 0xA6F4, 0xA6F5, 0xA840,
00406     0xA841, 0xA842, 0xA843, 0xA844, 0xA845, 0xA846, 0xA847, 0xA848, 0xA849, 0xA84A,
00407     0xA84B, 0xA84C, 0xA84D, 0xA84E, 0xA84F, 0xA850, 0xA851, 0xA852, 0xA853, 0xA854,
00408     0xA855, 0xA856, 0xA857, 0xA858, 0xA859, 0xA85A, 0xA85B, 0xA85C, 0xA85D, 0xA85E,
00409     0xA85F, 0xA860, 0xA861, 0xA862, 0xA863, 0xA864, 0xA865, 0xA866, 0xA867, 0xA868,
00410     0xA869, 0xA86A, 0xA86B, 0xA86C, 0xA86D, 0xA86E, 0xA86F, 0xA870, 0xA871, 0xA872,
00411     0xA873, 0xA874, 0xA875, 0xA876, 0xA877, 0xA878, 0xA879, 0xA87A, 0xA87B, 0xA87C,
00412     0xA87D, 0xA87E, 0xA880, 0xA881, 0xA882, 0xA883, 0xA884, 0xA885, 0xA886, 0xA887,
00413     0xA888, 0xA889, 0xA88A, 0xA88B, 0xA88C, 0xA88D, 0xA88E, 0xA88F, 0xA890, 0xA891,
00414     0xA892, 0xA893, 0xA894, 0xA895, 0x0000 };
00415     
00416     /* SKB_GBKEXTSYM2 */
00417 static unsigned short wNewpySym12[] = 
00418   { 0xA940, 0xA941, 0xA942, 0xA943, 0xA944, 0xA945, 0xA946, 0xA947, 0xA948, 0xA949,
00419     0xA94A, 0xA94B, 0xA94C, 0xA94D, 0xA94E, 0xA94F, 0xA950, 0xA951, 0xA952, 0xA953,
00420     0xA954, 0xA955, 0xA956, 0xA957, 0xA959, 0xA95A, 0xA95C, 0xA960, 0xA961, 0xA962,
00421     0xA963, 0xA964, 0xA965, 0xA966, 0xA967, 0xA968, 0xA969, 0xA96A, 0xA96B, 0xA96C,
00422     0xA96D, 0xA96E, 0xA96F, 0xA970, 0xA971, 0xA972, 0xA973, 0xA974, 0xA975, 0xA976,
00423     0xA977, 0xA978, 0xA979, 0xA97A, 0xA97B, 0xA97C, 0xA97D, 0xA97E, 0xA980, 0xA981,
00424     0xA982, 0xA983, 0xA984, 0xA985, 0xA986, 0xA987, 0xA988, 0xA989, 0xA98A, 0xA98B,
00425     0xA98C, 0xA98D, 0xA98E, 0xA98F, 0xA990, 0xA991, 0xA992, 0xA993, 0xA994, 0xA995,
00426     0xA996, 0xA9A4, 0xA9A5, 0xA9A6, 0xA9A7, 0xA9A8, 0xA9A9, 0xA9AA, 0xA9AB, 0xA9AC,
00427     0xA9AD, 0xA9AE, 0xA9AF, 0x0000, 0x0000 };
00428 
00429 
00430 unsigned short *pwNewpySym[13] = {
00431        wNewpySym0,
00432        wNewpySym1,
00433        wNewpySym2,
00434        wNewpySym3,
00435        wNewpySym4,
00436        wNewpySym5,
00437        wNewpySym6,
00438        wNewpySym7,
00439        wNewpySym8,
00440        wNewpySym9,
00441        wNewpySym10,
00442        wNewpySym11,
00443        wNewpySym12
00444 };
00445 
00446 
00447 /********
00448 ` 1 2 3 4 5 6 7 8 9 0 - =
00449 ~ ! @ # $ % ^ & * ( ) _ +
00450 棣磥
00451 棣磥
00452 
00453 [ ] \ ; ' , . /
00454 £
00455 £
00456 
00457 { } | : " < > ?
00458 
00459 
00460 
00461 0 1 2 3 4 5 6 7 8 9 - = `
00462 
00463 £ãģţƣǣȣɣʣˣ̣ͣΣϣУѣңӣԣգ֣ףأ٣
00464 
00465 
00466      1          0xA1AB            0xA1AB            0xA1BC           0xA1BD
00467      2          0xA3A1            0xA3A1            0xA1BE           0xA1BF
00468      3          0xA1E6            0xA1E6            0xA1C2           0xA1C2
00469      4          0xA3A3            0xA3A3            0xA3BB           0xA3BB
00470      5          0xA1E7            0xA1E7            0xA1AE           0xA1AF
00471      6          0xA3A5            0xA3A5            0xA3AC           0xA3AC
00472      7          0xA3A4            0xA3A4            0xA1A3           0xA1A3
00473      8          0xA1EC            0xA1EC            0xA1A2           0xA1A2
00474      9          0xA1C1            0xA1C1
00475     10          0xA3A8            0xA3A9
00476     11          0xA1B2            0xA1B3            0xA3C1        0xA3E1
00477     12          0xA1AD            0xA1AD            0xA3C2        0xA3E2
00478     13          0xA3AB            0xA3AB            0xA3C3        0xA3E3
00479     14                                                  0xA3C4        0xA3E4
00480     15          0xA1B6            0xA1B7            0xA3C5        0xA3E5
00481     16          0xA1B4            0xA1B5            0xA3C6        0xA3E6
00482     17          0xA1F9            0xA1F9            0xA3C7        0xA3E7
00483     18          0xA3BA            0xA3BA            0xA3C8        0xA3E8
00484     19          0xA1B0            0xA1B1            0xA3C9        0xA3E9
00485     20          0xA1B8            0xA1B9            0xA3CA        0xA3EA
00486     21          0xA1BA            0xA1BB            0xA3CB        0xA3EB
00487     22          0xA3BF            0xA3BF            0xA3CC        0xA3EC
00488     23                                                  0xA3CD        0xA3ED
00489     24          0xA3B0                                0xA3CE        0xA3EE
00490     25          0xA3B1                                0xA3CF        0xA3EF
00491     26          0xA3B2                                0xA3D0        0xA3F0
00492     27          0xA3B3                                0xA3D1        0xA3F1
00493     28          0xA3B4                                0xA3D2        0xA3F2
00494     29          0xA3B5                                0xA3D3        0xA3F3
00495     30          0xA3B6                                0xA3D4        0xA3F4
00496     31          0xA3B7                                0xA3D5        0xA3F5
00497     32          0xA3B8                                0xA3D6        0xA3F6
00498     33          0xA3B9                                0xA3D7        0xA3F7
00499     34          0xA3AD                                0xA3D8        0xA3F8
00500     35          0xA3BD                                0xA3D9        0xA3F9
00501     36          0xA1A4                                0xA3DA        0xA3FA
00502     37
00503 
00504        | SP   |  !   |  "   |  #   |  $   |  %   |  &   |  '   |  0x20
00505        0xA1A1, 0xA3A1, 0xA1B0, 0xA3A3, 0xA1E7, 0xA3A5, 0xA1EC, 0xA1AE,
00506        0xA1A1, 0xA3A1, 0xA1B1, 0xA3A3, 0xA1E7, 0xA3A5, 0xA1EC, 0xA1AF,
00507 
00508        |  (   |  )   |  *   |  +   |  ,   |  -   |  .   |  /   |  0x28
00509        0xA3A8, 0xA1B2, 0xA1C1, 0xA3AB, 0xA3AC, 0xA3AD, 0xA1A3, 0xA1A2,
00510        0xA3A9, 0xA1B3, 0xA1C1, 0xA3AB, 0xA3AC, 0xA3AD, 0xA1A3, 0xA1A2,
00511        
00512        |  0   |  1   |  2   |  3   |  4   |  5   |  6   |  7   |  0x30
00513        0xA3B0, 0xA3B1, 0xA3B2, 0xA3B3, 0xA3B4, 0xA3B5, 0xA3B6, 0xA3B7,
00514        0xA3B0, 0xA3B1, 0xA3B2, 0xA3B3, 0xA3B4, 0xA3B5, 0xA3B6, 0xA3B7,
00515 
00516        |  8   |  9   |  :   |  ;   |  <   |  =   |  >   |  ?   |  0x38
00517        0xA3B8, 0xA3B9, 0xA3BA, 0xA3BB, 0xA1B8, 0xA3BD, 0xA1BA, 0xA3BF,
00518        0xA3B8, 0xA3B9, 0xA3BA, 0xA3BB, 0xA1B9, 0xA3BD, 0xA1BB, 0xA3BF,
00519 
00520        |  @   |  A   |  B   |  C   |  D   |  E   |  F   |  G   |  0x40
00521        0xA1E6, 0xA3C1, 0xA3C2, 0xA3C3, 0xA3C4, 0xA3C5, 0xA3C6, 0xA3C7,
00522        0xA1E6, 0xA3C1, 0xA3C2, 0xA3C3, 0xA3C4, 0xA3C5, 0xA3C6, 0xA3C7,
00523 
00524        |  H   |  I   |  J   |  K   |  L   |  M   |  N   |  O   |  0x48
00525        0xA3C8, 0xA3C9, 0xA3CA, 0xA3CB, 0xA3CC, 0xA3CD, 0xA3CE, 0xA3CF,
00526        0xA3C8, 0xA3C9, 0xA3CA, 0xA3CB, 0xA3CC, 0xA3CD, 0xA3CE, 0xA3CF,
00527 
00528        |  P   |  Q   |  R   |  S   |  T   |  U   |  V   |  W   |  0x50
00529        0xA3D0, 0xA3D1, 0xA3D2, 0xA3D3, 0xA3D4, 0xA3D5, 0xA3D6, 0xA3D7,
00530        0xA3D0, 0xA3D1, 0xA3D2, 0xA3D3, 0xA3D4, 0xA3D5, 0xA3D6, 0xA3D7,
00531 
00532        |  X   |  Y   |  Z   |  [   |  \   |  ]   |  ^   |  _   |  0x58
00533        0xA3D8, 0xA3D9, 0xA3DA, 0xA1BC, 0xA1C2, 0xA1BE, 0xA3A4, 0xA1AD,
00534        0xA3D8, 0xA3D9, 0xA3DA, 0xA1BD, 0xA1C2, 0xA1BF, 0xA3A4, 0xA1AD,
00535 
00536        |  `   |  a   |  b   |  c   |  d   |  e   |  f   |  g   |  0x60
00537        0xA1A4, 0xA3E1, 0xA3E2, 0xA3E3, 0xA3E4, 0xA3E5, 0xA3E6, 0xA3E7,
00538        0xA1A4, 0xA3E1, 0xA3E2, 0xA3E3, 0xA3E4, 0xA3E5, 0xA3E6, 0xA3E7,
00539 
00540        |  h   |  i   |  j   |  k   |  l   |  m   |  n   |  o   |  0x68
00541        0xA3E8, 0xA3E9, 0xA3EA, 0xA3EB, 0xA3EC, 0xA3ED, 0xA3EE, 0xA3EF,
00542        0xA3E8, 0xA3E9, 0xA3EA, 0xA3EB, 0xA3EC, 0xA3ED, 0xA3EE, 0xA3EF,
00543 
00544        |  p   |  q   |  r   |  s   |  t   |  u   |  v   |  w   |  0x70
00545        0xA3F0, 0xA3F1, 0xA3F2, 0xA3F3, 0xA3F4, 0xA3F5, 0xA3F6, 0xA3F7,
00546        0xA3F0, 0xA3F1, 0xA3F2, 0xA3F3, 0xA3F4, 0xA3F5, 0xA3F6, 0xA3F7,
00547 
00548        |  x   |  y   |  z   |  {   |  |   |  }   |  ~   | DEL  |  0x78
00549        0xA3F8, 0xA3F9, 0xA3FA, 0xA1B6, 0xA1F9, 0xA1B4, 0xA1AB, 0x0000
00550        0xA3F8, 0xA3F9, 0xA3FA, 0xA1B7, 0xA1F9, 0xA1B5, 0xA1AB, 0x0000
00551 
00552 *******/
00553