home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libi18n / umap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.8 KB  |  72 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. #ifndef __UMAP__
  19. #define __UMAP__
  20.  
  21. #define NOMAPPING 0xfffd
  22.  
  23. /* =================================================
  24.                     MapCellArray
  25. ================================================= */
  26.  
  27. enum {
  28.     uFormat0Tag = 0,
  29.     uFormat1Tag,
  30.     uFormat2Tag,
  31.     uNumFormatTag
  32. };
  33.  
  34. typedef struct {
  35.         uint16 srcBegin;        /* 2 byte    */
  36.         uint16 srcEnd;            /* 2 byte    */
  37.         uint16 destBegin;        /* 2 byte    */
  38. } uFormat0;
  39.  
  40. typedef struct {
  41.         uint16 srcBegin;        /* 2 byte    */
  42.         uint16 srcEnd;            /* 2 byte    */
  43.         uint16    mappingOffset;    /* 2 byte    */
  44. } uFormat1;
  45.  
  46. typedef struct {
  47.         uint16 srcBegin;        /* 2 byte    */
  48.         uint16 srcEnd;            /* 2 byte    -waste    */
  49.         uint16 destBegin;        /* 2 byte    */
  50. } uFormat2;
  51.  
  52. typedef struct  {
  53.     union {
  54.         uFormat0    format0;
  55.         uFormat1    format1;
  56.         uFormat2    format2;
  57.     } fmt;
  58. } uMapCell;
  59.  
  60. /* =================================================
  61.                     uTable 
  62. ================================================= */
  63. typedef struct  {
  64.     uint16         itemOfList;
  65.     uint16        offsetToFormatArray;
  66.     uint16        offsetToMapCellArray;
  67.     uint16        offsetToMappingTable;
  68.     uint16        data[1];
  69. } uTable;
  70.  
  71. #endif
  72.