Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef __UMAP__
6 #define __UMAP__
8 #define NOMAPPING 0xfffd
10 enum {
11 uFormat0Tag = 0,
12 uFormat1Tag,
13 uFormat2Tag,
14 uNumFormatTag
15 };
17 typedef struct {
18 uint16_t srcBegin; /* 2 byte */
19 uint16_t srcEnd; /* 2 byte */
20 uint16_t destBegin; /* 2 byte */
21 } uFormat0;
23 typedef struct {
24 uint16_t srcBegin; /* 2 byte */
25 uint16_t srcEnd; /* 2 byte */
26 uint16_t mappingOffset; /* 2 byte */
27 } uFormat1;
29 typedef struct {
30 uint16_t srcBegin; /* 2 byte */
31 uint16_t srcEnd; /* 2 byte -waste */
32 uint16_t destBegin; /* 2 byte */
33 } uFormat2;
35 typedef struct {
36 union {
37 uFormat0 format0;
38 uFormat1 format1;
39 uFormat2 format2;
40 } fmt;
41 } uMapCell;
43 #define UMAPCELL_SIZE (3*sizeof(uint16_t))
45 typedef struct {
46 uint16_t itemOfList;
47 uint16_t offsetToFormatArray;
48 uint16_t offsetToMapCellArray;
49 uint16_t offsetToMappingTable;
50 uint16_t data[1];
51 } uTable;
53 #endif