Debian Codegraph @

cuneiform_src/Kern/rling/sources/h/speltab.h

raw symbols SCIP
1 /*
2 Copyright (c) 1993-2008, Cognitive Technologies
3 All rights reserved.
4
5 Разрешается повторное распространение и использование как в виде исходного кода,
6 так и в двоичной форме, с изменениями или без, при соблюдении следующих условий:
7
8 * При повторном распространении исходного кода должны оставаться указанное
9 выше уведомление об авторском праве, этот список условий и последующий
10 отказ от гарантий.
11 * При повторном распространении двоичного кода в документации и/или в
12 других материалах, поставляемых при распространении, должны сохраняться
13 указанная выше информация об авторском праве, этот список условий и
14 последующий отказ от гарантий.
15 * Ни название Cognitive Technologies, ни имена ее сотрудников не могут
16 быть использованы в качестве средства поддержки и/или продвижения
17 продуктов, основанных на этом ПО, без предварительного письменного
18 разрешения.
19
20 ЭТА ПРОГРАММА ПРЕДОСТАВЛЕНА ВЛАДЕЛЬЦАМИ АВТОРСКИХ ПРАВ И/ИЛИ ДРУГИМИ ЛИЦАМИ "КАК
21 ОНА ЕСТЬ" БЕЗ КАКОГО-ЛИБО ВИДА ГАРАНТИЙ, ВЫРАЖЕННЫХ ЯВНО ИЛИ ПОДРАЗУМЕВАЕМЫХ,
22 ВКЛЮЧАЯ ГАРАНТИИ КОММЕРЧЕСКОЙ ЦЕННОСТИ И ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, НО НЕ
23 ОГРАНИЧИВАЯСЬ ИМИ. НИ ВЛАДЕЛЕЦ АВТОРСКИХ ПРАВ И НИ ОДНО ДРУГОЕ ЛИЦО, КОТОРОЕ
24 МОЖЕТ ИЗМЕНЯТЬ И/ИЛИ ПОВТОРНО РАСПРОСТРАНЯТЬ ПРОГРАММУ, НИ В КОЕМ СЛУЧАЕ НЕ
25 НЕСЁТ ОТВЕТСТВЕННОСТИ, ВКЛЮЧАЯ ЛЮБЫЕ ОБЩИЕ, СЛУЧАЙНЫЕ, СПЕЦИАЛЬНЫЕ ИЛИ
26 ПОСЛЕДОВАВШИЕ УБЫТКИ, СВЯЗАННЫЕ С ИСПОЛЬЗОВАНИЕМ ИЛИ ПОНЕСЕННЫЕ ВСЛЕДСТВИЕ
27 НЕВОЗМОЖНОСТИ ИСПОЛЬЗОВАНИЯ ПРОГРАММЫ (ВКЛЮЧАЯ ПОТЕРИ ДАННЫХ, ИЛИ ДАННЫЕ,
28 СТАВШИЕ НЕГОДНЫМИ, ИЛИ УБЫТКИ И/ИЛИ ПОТЕРИ ДОХОДОВ, ПОНЕСЕННЫЕ ИЗ-ЗА ДЕЙСТВИЙ
29 ТРЕТЬИХ ЛИЦ И/ИЛИ ОТКАЗА ПРОГРАММЫ РАБОТАТЬ СОВМЕСТНО С ДРУГИМИ ПРОГРАММАМИ,
30 НО НЕ ОГРАНИЧИВАЯСЬ ЭТИМИ СЛУЧАЯМИ), НО НЕ ОГРАНИЧИВАЯСЬ ИМИ, ДАЖЕ ЕСЛИ ТАКОЙ
31 ВЛАДЕЛЕЦ ИЛИ ДРУГОЕ ЛИЦО БЫЛИ ИЗВЕЩЕНЫ О ВОЗМОЖНОСТИ ТАКИХ УБЫТКОВ И ПОТЕРЬ.
32
33 Redistribution and use in source and binary forms, with or without modification,
34 are permitted provided that the following conditions are met:
35
36 * Redistributions of source code must retain the above copyright notice,
37 this list of conditions and the following disclaimer.
38 * Redistributions in binary form must reproduce the above copyright notice,
39 this list of conditions and the following disclaimer in the documentation
40 and/or other materials provided with the distribution.
41 * Neither the name of the Cognitive Technologies nor the names of its
42 contributors may be used to endorse or promote products derived from this
43 software without specific prior written permission.
44
45 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
46 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
47 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
48 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
49 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
51 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
52 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 */
56
57 /*
58
59 SPELTAB.h containes structures, headers and constants for
60 Special dictionary <CountryCode>.ART and SpecialReplacementTable
61 <CountryCode>.TAB files creature and processing.
62
63 */
64
65 #ifndef __SPEC_REP_TAB_DEFS__
66 #define __SPEC_REP_TAB_DEFS__
67
68 #if _MSC_VER > 1000
69 #pragma once
70 #endif // _MSC_VER > 1000
71
72 /* -------------------------------------------------------------------------
73 The following constants are restriction flags for special replacement table.
74 ------------------------------------------------------------------------- */
75
76
77 #define ANY_S 0x00 /*No restrictions */
78 #define BAD_S 0x01 /*Replacement applies only for notconfidentially
79 recognized symb */
80 #define EMB_S 0x01 /*Replacement applies for a couple of symbs with
81 overlapped envelopes. */
82 #define DEL_S 0x02 /* Only for delemeters. */
83 #define WID_S 0x04 /* wide letter */
84 #define FAX_M 0x10 /*Only for Fax recognition */
85
86 /* -------------------------------------------------------------------------
87 Some definitions for Spec dictionary and Spec Replacements Table.
88 ------------------------------------------------------------------------ */
89 #define ARTFILE_ID "CTC AS v1.0"
90 #define TABFILE_ID "CTC RT v1.0"
91
92 #define BUFF_SIZE 0x5000
93 #define LINE_LTH 120
94
95 #define EMP "_EMPTY"
96
97 #define XOR_MASK 0x4a
98
99 typedef struct
100 {
101 uchar id[ sizeof(ARTFILE_ID)];
102 uchar voc_no; // int16_t
103 uchar _unused;
104 } ArtFH;
105
106 typedef struct
107 {
108 char pref_no;
109 char post_no;
110 uchar relabty; // int16_t
111 uchar _unused;
112 } ArtVH;
113
114 #define NOVOC -1
115 #define VOC 0
116 #define PREF 1
117 #define BODY 2
118 #define POST 3
119 #define FREC 4
120
121
122
123 typedef struct
124 {
125 uchar id[ sizeof(TABFILE_ID)];
126 uchar rep_no; // int16_t
127 uchar _unused;
128 } TabFH;
129
130 typedef struct artstr
131 {
132 uchar sr1; /* code1 of what replace */
133 uchar sr2; /* code2 of what replace */
134 uchar obj1; /* code1 by what replace */
135 uchar obj2; /* code2 by what replace */
136 uchar objt1; /* type of obj1 */
137 uchar objt2; /* type of obj2 */
138 uchar objts1; /* type_sp of obj1 */
139 uchar objts2; /* type_sp of obj2 */
140 uchar cond_sr1; /* cond1 for sr1 */
141 uchar cond_sr2; /* cond2 for sr2 */
142 uchar cond_sr12; /* cond12 for sr1&sr2 */
143 uchar cond_obj12x; /* cond12 for obj1&obj2 to check before */
144 uchar cond_obj12r; /* cond12 for obj1&obj2 to check after */
145 uchar _unused;
146 } ARTS;
147
148 /*
149 #if !defined(WATCOM) && !defined(THINK_C)
150 #if sizeof(TabFH)%2 != 0
151 #error Must be odd length of structure for MAC portability.
152 #endif
153 #if sizeof(ARTS)%2 != 0
154 #error Must be odd length of structure for MAC portability.
155 #endif
156 #if sizeof(ArtFH)%2 != 0 || sizeof(ArtVH)%2 != 0
157 #error Must be odd length of structure for MAC portability.
158 #endif
159 #endif
160 */
161 #endif