home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libi18n / ugen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.2 KB  |  104 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef __UGEN__
  20. #define __UGEN__
  21.  
  22. #include "xp_core.h"
  23.  
  24.  
  25. /* =================================================
  26.                     uShiftTable
  27. ================================================= */
  28. /*=================================================================================
  29.  
  30. =================================================================================*/
  31.  
  32. enum {
  33.     u1ByteCharset = 0,
  34.     u2BytesCharset,
  35.     uMultibytesCharset,
  36.     u2BytesGRCharset,
  37.     u2BytesGRPrefix8FCharset,
  38.     u2BytesGRPrefix8EA2Charset,
  39.     uNumOfCharsetType
  40. };
  41. /*=================================================================================
  42.  
  43. =================================================================================*/
  44.  
  45. enum {
  46.     u1ByteChar            = 0,
  47.     u2BytesChar,
  48.     u2BytesGRChar,
  49.     u1BytePrefix8EChar,        /* Used by JIS0201 GR in EUC_JP */
  50.     u2BytesUTF8,            /* Used by UTF8 */
  51.     u3BytesUTF8,            /* Used by UTF8 */
  52.     uNumOfCharType
  53. };
  54. /*=================================================================================
  55.  
  56. =================================================================================*/
  57. typedef struct  {
  58.     unsigned char MinHB;
  59.     unsigned char MinLB;
  60.     unsigned char MaxHB;
  61.     unsigned char MaxLB;
  62. } uShiftOut;
  63. /*=================================================================================
  64.  
  65. =================================================================================*/
  66. typedef struct  {
  67.     unsigned char Min;
  68.     unsigned char Max;
  69. } uShiftIn;
  70. /*=================================================================================
  71.  
  72. =================================================================================*/
  73. typedef struct  {
  74.     unsigned char   classID;
  75.     unsigned char   reserveLen;
  76.     uShiftIn    shiftin;
  77.     uShiftOut    shiftout;
  78. } uShiftCell;
  79. /*=================================================================================
  80.  
  81. =================================================================================*/
  82. typedef struct  {
  83.     int16        numOfItem;
  84.     int16        classID;
  85.     uShiftCell    shiftcell[1];
  86. } uShiftTable;
  87. /*=================================================================================
  88.  
  89. =================================================================================*/
  90.  
  91. #define MAXINTERCSID 4
  92. typedef struct StrRangeMap StrRangeMap;
  93. struct StrRangeMap {
  94.     uint16 intercsid;
  95.     unsigned char min;
  96.     unsigned char max;    
  97. };
  98. typedef struct UnicodeTableSet UnicodeTableSet;
  99. struct UnicodeTableSet {
  100.  uint16 maincsid;
  101.  StrRangeMap range[MAXINTERCSID];
  102. };
  103. #endif
  104.