~ubuntu-branches/ubuntu/precise/cuneiform/precise

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hrk/cstrdefs.h

  • Committer: Bazaar Package Importer
  • Author(s): Jakub Wilk, c-assert.diff, slovenian-slv.diff
  • Date: 2011-01-26 21:53:07 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110126215307-62x61mcesr607qb7
Tags: 1.0.0+dfsg-2
* Upload to unstable.
* Explicitly build-depend on pkg-config. Thanks to Stefano Rivera for the
  bug report.
* Add Vcs-* fields.
* Use the standard C assert() macro, rather than custom Cuneiform one.
  [c-assert.diff]
* Pass CFLAGS, CXXFLAGS and LDFLAGS (get from dpkg-buildflags) to cmake
  (closes: #608345). Thanks to Sami Liedes for the bug report.
  + Build depend on dpkg-dev (>= 1.15.7).
* Pass --parallel to dh.
  + Bump debhelper minimum version to 7.4.10.
* Update debian/copyright to the latest DEP-5 version.
* Bump year in debian/copyright.
* Explicitly link to GraphicsMagick (rather than via the ImageMagick
  compatibility layer).
* Don't ship /usr/lib/cuneiform/*.so symlinks. These libraries are
  considered private, at least until #598616 is fixed.
* Rename some private variables in debian/rules to make them lowercase.
* Update patch headers.
* Provide proper ‘build-arch’ and ‘build-indep’ targets in debian/rules.
* Document input format in the manual page (closes: #572061). Thanks to
  Janusz S. Bień for the bug report.
* Use ‘slv’ (rather than ‘slo’) as language code for Slovenian.
  [slovenian-slv.diff]
* Fix package description: Slovenian is supported, Slovak is not.
* Improve documentation of the language (-l) option (closes: #602512).
  Thanks to Jari Aalto for the bug report.
* Install reasons file for vrms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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
 
*/
 
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
56
 
57
57
#ifndef H_cstrdef_h
58
58
#define H_cstrdef_h
59
59
 
60
60
#include "recdefs.h"
61
61
#include "ccomdefs.h"
62
 
//#include "lang.h"
63
62
#pragma pack (push,8)
64
63
#define DEBUG_MODE 1
65
64
 
67
66
 
68
67
typedef Handle CSTR_line;
69
68
 
70
 
typedef struct tagCSTR_stick
71
 
 {
72
 
 Int8  x,y,l,w,top,bot;
73
 
 Int16 incl;
74
 
 }CSTR_stick;
75
 
 
76
 
 
77
 
typedef struct strucCSTR_attr{
78
 
 
79
 
    Int32  incline              ;   // Incline*2048 = tg
80
 
    Int32  fragment             ;
81
 
    Int16  col, row             ;
82
 
    Int16  r_col, r_row     ;
83
 
    Int16  r_hei, r_wid     ;
84
 
    Int16  l_col, l_row     ;
85
 
    Int32  wid, hei             ;
86
 
// 32
87
 
    Word32 Flags            ;
 
69
typedef struct tagCSTR_stick {
 
70
        char x, y, l, w, top, bot;
 
71
        int16_t incl;
 
72
} CSTR_stick;
 
73
 
 
74
typedef struct strucCSTR_attr {
 
75
 
 
76
        int32_t incline; // Incline*2048 = tg
 
77
        int32_t fragment;
 
78
        int16_t col, row;
 
79
        int16_t r_col, r_row;
 
80
        int16_t r_hei, r_wid;
 
81
        int16_t l_col, l_row;
 
82
        int32_t wid, hei;
 
83
        // 32
 
84
        uint32_t Flags;
88
85
#define CSTR_STR_No              0x00000000
89
86
#define CSTR_STR_DotMatrix_RCM   0x00000001
90
87
#define CSTR_STR_DotMatrix_LEO   0x00000002
104
101
#define CSTR_STR_NEGATIVE        0x00008000
105
102
#define CSTR_STR_UPDOWN          0x00010000
106
103
#define CSTR_STR_DOWNUP          0x00020000
107
 
#define CSTR_STR_END_POINTED     0x00040000//� ����� ������ ������� �����
108
 
#define CSTR_STR_BEGIN_POINTED   0x00080000//� ������ ������ ������� �����
109
 
 
110
 
    Int16  bs1, bs2, bs3, bs4;
111
 
    Int16  Nb1, Nb2, Nb3, Nb4;
112
 
    Int16  Nbt, bsm, Ps,  Psf;
113
 
    Word8  VersionName[16]  ;  // Nick 20.02.2001 from 36 vto 16
114
 
        Int16  tab_row;           // Nick 20.02.2001
115
 
        Int16  ref_father;  // ��������� ������
116
 
        Int16  ref_nSon;     // Nick 22.05.2001
117
 
        Int16  ref_twin;
118
 
        Word8  reserve[12];       // Nick 22.05.
119
 
    Int16  pageSkew2048     ;
120
 
    Int16  ResolutionY      ;
121
 
// 100
122
 
    Word8  language;
123
 
    Word8  scale;
124
 
    Int16  l_hei, l_wid,erection;
125
 
    Int16  agregat;
126
 
    Int16  tab_column;
127
 
// 112
128
 
    Int32       number                      ;
129
 
    Int32       version                     ;
130
 
// 120
131
 
    Word8       colors[4]                   ;
132
 
// 124
133
 
    Int16  agregat_row;
134
 
    Word8  tab_number;
135
 
        Word8  cn_weight; // due to car numbers recognition
136
 
    // align to 128 bytes
137
 
    }   CSTR_attr           ;
138
 
 
139
 
 
140
 
 
141
 
typedef struct strucCSTR_rast_attr{
142
 
    Int16 row;  // ideal row of cell
143
 
    Int16 col;  // ideal collumn of cell
144
 
//// 4
145
 
    Int16 h;    // height of cell
146
 
    Int16 w;    // width of cell
147
 
//// 8
148
 
    Int8  bdiff;    // local base line corrective displacement
149
 
    Word8 difflg;   // local correction flg
150
 
// baseline defined by cell:
 
104
#define CSTR_STR_END_POINTED     0x00040000//в конце строки имеются точки
 
105
#define CSTR_STR_BEGIN_POINTED   0x00080000//в начале строки имеются точки
 
106
        int16_t bs1, bs2, bs3, bs4;
 
107
        int16_t Nb1, Nb2, Nb3, Nb4;
 
108
        int16_t Nbt, bsm, Ps, Psf;
 
109
        uchar VersionName[16]; // Nick 20.02.2001 from 36 vto 16
 
110
        int16_t tab_row; // Nick 20.02.2001
 
111
        int16_t ref_father; // параметры формул
 
112
        int16_t ref_nSon; // Nick 22.05.2001
 
113
        int16_t ref_twin;
 
114
        uchar reserve[12]; // Nick 22.05.
 
115
        int16_t pageSkew2048;
 
116
        int16_t ResolutionY;
 
117
        // 100
 
118
        uchar language;
 
119
        uchar scale;
 
120
        int16_t l_hei, l_wid, erection;
 
121
        int16_t agregat;
 
122
        int16_t tab_column;
 
123
        // 112
 
124
        int32_t number;
 
125
        int32_t version;
 
126
        // 120
 
127
        uchar colors[4];
 
128
        // 124
 
129
        int16_t agregat_row;
 
130
        uchar tab_number;
 
131
        uchar cn_weight; // due to car numbers recognition
 
132
        // align to 128 bytes
 
133
} CSTR_attr;
 
134
 
 
135
typedef struct strucCSTR_rast_attr {
 
136
        int16_t row; // ideal row of cell
 
137
        int16_t col; // ideal collumn of cell
 
138
        //// 4
 
139
        int16_t h; // height of cell
 
140
        int16_t w; // width of cell
 
141
        //// 8
 
142
        char bdiff; // local base line corrective displacement
 
143
        uchar difflg; // local correction flg
 
144
        // baseline defined by cell:
151
145
#define CSTR_db_b1      1
152
146
#define CSTR_db_b2      2
153
147
#define CSTR_db_b3      4
156
150
#define CSTR_db_up      32     // base corrected 1 pixel up
157
151
#define CSTR_db_forbid  64     // don't take to calculate bases (abnormal pos)
158
152
#define CSTR_db_solid   128    // BOX_solid letter not penalized
159
 
    Word8 basflg;
 
153
        uchar basflg;
160
154
#define CSTR_bs_b1a     1      // agrees to be at  b1
161
155
#define CSTR_bs_b2a     2      //                  b2
162
156
#define CSTR_bs_bt      4      //                  't' level
165
159
#define CSTR_bs_round   32
166
160
#define CSTR_bs_cap     64     // capital shape
167
161
#define CSTR_bs_done    128
168
 
    Word8   accent_leader; // leader cell in farajev complex-cell
169
 
//// 12
170
 
    Int16 r_row;    // real row of cell
171
 
    Int16 r_col;        // real collumn of cell
172
 
//// 16
173
 
    Int8 bas1;
174
 
    Int8 bas2;
175
 
    Int8 bas3;
176
 
    Int8 bas4;
177
 
//// 20
178
 
    Word8 cg_flag;  // cut-to-glue message
 
162
        uchar accent_leader; // leader cell in farajev complex-cell
 
163
        //// 12
 
164
        int16_t r_row; // real row of cell
 
165
        int16_t r_col; // real collumn of cell
 
166
        //// 16
 
167
        char bas1;
 
168
        char bas2;
 
169
        char bas3;
 
170
        char bas4;
 
171
        //// 20
 
172
        uchar cg_flag; // cut-to-glue message
179
173
#define CSTR_cg_noglue     1   // don't glue to ... ( just cut )
180
174
#define CSTR_cg_noenv      2    // envelope address obsolete
181
175
#define tenv(c)         ((c)->env && !((c)->cg_flag&c_cg_noenv))
182
176
#define CSTR_cg_comp       4   // composed cell
183
177
#define tsimple(c)      (tenv(c) && !((c)->cg_flag&c_cg_comp))
184
 
//#define c_cg_rqdot      4   // dot test needed (iIl1 in versions)
185
 
// 93.08.19  the flag uprazdnen
 
178
        //#define c_cg_rqdot      4   // dot test needed (iIl1 in versions)
 
179
        // 93.08.19  the flag uprazdnen
186
180
#define CSTR_cg_cutdone     8   // verarbeitet by cut
187
181
#define CSTR_cg_cutr        16  // cut at right side
188
182
#define CSTR_cg_cutl        32  // cut at left side
190
184
#define CSTR_cg_cutacc      8+16+32 // cutted accent
191
185
#define CSTR_cg_just        64  // just created
192
186
#define CSTR_cg_cutoff      128  // ignore "cutted" flags at glue attempt
193
 
 Word8 cpos;     // position of component
 
187
        uchar cpos; // position of component
194
188
#define CSTR_p_small        1
195
189
#define CSTR_p_large        2
196
190
#define CSTR_p_low              4
200
194
#define CSTR_p_bra              64
201
195
#define CSTR_p_ex                   128
202
196
#define CSTR_p_all              255     // all positions are possible
203
 
 Word8 reasno;    // proportional criteria messages
 
197
        uchar reasno; // proportional criteria messages
204
198
#define CSTR_rn_right       1   // right refuse by proportions
205
199
#define CSTR_rn_left        2   // left refuse by proportions
206
200
#define CSTR_rn_pi                  4       // this is a dot of some 'i'
207
 
 Word8 keg;      // kegel
208
 
//// 24
209
 
 Word8 font;     // font properties
 
201
        uchar keg; // kegel
 
202
        //// 24
 
203
        uchar font; // font properties
210
204
#define CSTR_fp_ser         1       // serific
211
205
#define CSTR_fp_gelv        2       // helvetic
212
206
#define CSTR_fp_bold        4       // bold
215
209
#define CSTR_fp_str         32      // stright
216
210
#define CSTR_fp_undrln      64      // underlined
217
211
#define CSTR_fp_narrow      128     // user defined
218
 
 Word8 dens;     // BOX - calculated density
219
 
 Word8 recsource;  // who and how recognized
 
212
        uchar dens; // BOX - calculated density
 
213
        uchar recsource; // who and how recognized
220
214
#define CSTR_rs_ev          1   // events brought versions
221
215
#define CSTR_rs_BOX         2   // BOX done
222
216
#define CSTR_rs_BOXs        4  // BOX > "29500"
223
217
#define CSTR_rs_bitcmp      8  // bit compare takes versions
224
218
#define CSTR_rs_LEO        64  // LEO
225
 
 Word8 bas_acc;       // cell's relations with bases
 
219
        uchar bas_acc; // cell's relations with bases
226
220
#define CSTR_ba_b1          1    // accepted  to b1
227
221
#define CSTR_ba_b2          2    // accepted  to b2
228
222
#define CSTR_ba_killed      4 // temporary: all versions killed by linear
229
223
#define CSTR_ba_penalty     8
230
224
#define CSTR_ba_chance      16 // one more chance for cut version
231
 
//// 28
232
 
 Int16 left;            // left  of main part (without accent)
233
 
 Int16 right;           // right of main part (without accent)
234
 
//// 32
235
 
 Word8 shape;
 
225
        //// 28
 
226
        int16_t left; // left  of main part (without accent)
 
227
        int16_t right; // right of main part (without accent)
 
228
        //// 32
 
229
        uchar shape;
236
230
#define CSTR_shp_cap        1
237
231
#define CSTR_shp_stick      2
238
232
#define CSTR_shp_stb1       4
239
233
#define CSTR_shp_small      8
240
234
#define CSTR_shp_dbh        32
241
235
#define CSTR_shp_b1up       16
242
 
 Word8 rus_eng_word; // information for RUS/ENG manipulations
 
236
        uchar rus_eng_word; // information for RUS/ENG manipulations
243
237
#define CSTR_ruseng_no      0  // russian
244
238
#define CSTR_ruseng_rus     0  // russian
245
239
#define CSTR_ruseng_re      1  // russian or english
246
240
#define CSTR_ruseng_eng     2  // english
247
241
#define CSTR_ruseng_alt     3  // many alternates
248
 
 Word8 broken_II;    // II configuration
249
 
 Word8 language;
250
 
//// 36
251
 
 Word8 pos_inc;
 
242
        uchar broken_II; // II configuration
 
243
        uchar language;
 
244
        //// 36
 
245
        uchar pos_inc;
252
246
#define CSTR_erect_no       0   // really envelop
253
247
#define CSTR_erect_rot      1   // rotate image
254
248
#define CSTR_erect_rest     2   // restore after rotating
256
250
#define CSTR_erect_zero     8   // disable rotate and cursive study
257
251
#define CSTR_set_erection( c, inc ) if( (inc)!=NO_INCLINE&&tenv(c) ) \
258
252
             { (c)->stick_inc=inc; (c)->pos_inc=inc?CSTR_erect_rot:CSTR_erect_zero; }
259
 
 Word8  cg_flag_fine;        // type of cutting position
 
253
        uchar cg_flag_fine; // type of cutting position
260
254
#define CSTR_cg_cut_tl     0x01    // left top    cutten
261
255
#define CSTR_cg_cut_ml     0x02    // left middle cutten
262
256
#define CSTR_cg_cut_bl     0x04    // left bottom cutten
266
260
#define CSTR_cg_cut_br     0x40    // right bottom cutten
267
261
#define CSTR_cg_cut_fr     0x80    // right full   cutten
268
262
#define CSTR_NO_BATONS 255
269
 
 Word8   n_baton;
270
 
 Word8   flg_spell;
 
263
        uchar n_baton;
 
264
        uchar flg_spell;
271
265
#define CSTR_fa_spell_none      0x00    // no spell checking
272
266
#define CSTR_fa_spell_solid     0x01    // solid word
273
267
#define CSTR_fa_spell_correct   0x02    // new order in alternates
275
269
#define CSTR_fa_spell_changed   (CSTR_fa_spell_correct|CSTR_fa_spell_restruct)
276
270
#define CSTR_fa_spell_reject    0x08    // non understand word
277
271
#define CSTR_fa_spell_nocarrying 0x10   // save dash in carrying word
278
 
//// 40
279
 
 Int16  stick_inc;   // inc of stick
 
272
        //// 40
 
273
        int16_t stick_inc; // inc of stick
280
274
#define NO_INCLINE 10000 // not init incline
281
 
 Int16  save_stick_inc;   // saved inc of stick
282
 
//// 44
 
275
        int16_t save_stick_inc; // saved inc of stick
 
276
        //// 44
283
277
#define MAX_BATON 3
284
 
 CSTR_stick  save_baton[MAX_BATON]; // 8*3 bytes
285
 
//// 68
 
278
        CSTR_stick save_baton[MAX_BATON]; // 8*3 bytes
 
279
        //// 68
286
280
#define dup_default     ((cell*)0xffffffff)
287
 
        Word32  RecogHistory        ;
 
281
        uint32_t RecogHistory;
288
282
#define CSTR_hi_none        0x00000000
289
283
#define CSTR_hi_evn         0x00000001
290
284
#define CSTR_hi_3x5         0x00000002
292
286
#define CSTR_hi_desk        0x00000008
293
287
#define CSTR_hi_fon         0x00000010
294
288
#define CSTR_hi_leo         0x00000020
295
 
//// 72
296
 
        Word32  RecogPass                   ;
297
 
//// 76
298
 
    Int16   clink               ; // link to cluster
299
 
    Word16  clu_attr            ; // cluster attributes
300
 
//// 80
301
 
    Int32   ColorLtr, ColorBack ; // colors of letters and background
302
 
//// 88
303
 
    Word16   flg;  // flag of cell
 
289
        //// 72
 
290
        uint32_t RecogPass;
 
291
        //// 76
 
292
        int16_t clink; // link to cluster
 
293
        uint16_t clu_attr; // cluster attributes
 
294
        //// 80
 
295
        int32_t ColorLtr, ColorBack; // colors of letters and background
 
296
        //// 88
 
297
        uint16_t flg; // flag of cell
304
298
#define CSTR_f_no           0   // not init
305
299
#define CSTR_f_let          1   // letter component
306
300
#define CSTR_f_bad          2   // badly recognized
310
304
#define CSTR_f_solid        32  // spelled solid text
311
305
#define CSTR_f_confirmed        64      // confirmed letter
312
306
#define CSTR_f_all              127     // non fictive element
313
 
 
314
307
#define CSTR_f_fict             128     // fictive element
315
308
#define CSTR_f_detouch      256 // fictive element ???
316
309
#define CSTR_f_spell        512 // speller solid cstr
317
 
    Word8   kegl_font;
318
 
    Word8   dlang_dup;
 
310
        uchar kegl_font;
 
311
        uchar dlang_dup;
319
312
#define CSTR_fd_none    0
320
313
#define CSTR_fd_similar 1
321
314
#define CSTR_fd_equal   2
322
315
#define CSTR_fd_lowprob 4
323
316
#define CSTR_fd_alias   8
324
 
//// 92
325
 
    Word8   kegf;
326
 
    Word8   font_spec;
 
317
        //// 92
 
318
        uchar kegf;
 
319
        uchar font_spec;
327
320
#define CSTR_fs_none    0
328
321
#define CSTR_fs_courier 1
329
 
    Int16   nClust;
330
 
//// 96
331
 
    Word32 flg_new;
 
322
        int16_t nClust;
 
323
        //// 96
 
324
        uint32_t flg_new;
332
325
#define CSTR_fn_shave       0x00000001 // shaved cell
333
326
#define CSTR_fn_acccap      0x00000002 // aceent cap
334
327
#define CSTR_fn_under       0x00000004 // shaved cell
344
337
#define CSTR_fn_stop        0x00001000 // stop cell marked
345
338
#define CSTR_fn_space       0x00002000 // need convert to space ' '
346
339
#define CSTR_fn_taken       0x00004000 // was taken from dust
347
 
//// 100
348
 
    Word8   version;
349
 
    Word8   font_new;
350
 
//// 102
351
 
        Word8   bottom_accent;    // need save in Rbal
352
 
//// 103 !
353
 
    Word8   reserve[25]             ; // for next special flags, aling to 128
354
 
    } CSTR_rast_attr            ;
355
 
 
356
 
 
357
 
typedef struct strucCSTR_cell{
358
 
    CSTR_rast_attr   attr              ;
359
 
    struct strucCSTR_cell * next       ;
360
 
    struct strucCSTR_cell * prev       ;
361
 
    struct strucCSTR_cell * dup        ;
362
 
    Word8                 * recRaster  ;
363
 
    Int32                   lnPixWidth ;
364
 
    Int32                   lnPixHeight;
365
 
    CCOM_comp             * env        ;
366
 
    struct strucCSTR_cell * complist   ;
367
 
    UniVersions           * vers       ;
368
 
    CSTR_line               line_no    ;
369
 
    struct strucCSTR_cell * prev_down  ;
370
 
    CCOM_USER_BLOCK       * user_block ;
371
 
    struct strucCSTR_cell * dupend     ;
372
 
    struct strucCSTR_cell * prev_up    ;
373
 
    struct strucCSTR_cell * next_up    ;
374
 
    struct strucCSTR_cell * next_down  ;
 
340
        //// 100
 
341
        uchar version;
 
342
        uchar font_new;
 
343
        //// 102
 
344
        uchar bottom_accent; // need save in Rbal
 
345
        //// 103 !
 
346
        uchar reserve[25]; // for next special flags, aling to 128
 
347
} CSTR_rast_attr;
 
348
 
 
349
typedef struct strucCSTR_cell {
 
350
        CSTR_rast_attr attr;
 
351
        struct strucCSTR_cell * next;
 
352
        struct strucCSTR_cell * prev;
 
353
        struct strucCSTR_cell * dup;
 
354
        uchar * recRaster;
 
355
        int32_t lnPixWidth;
 
356
        int32_t lnPixHeight;
 
357
        CCOM_comp * env;
 
358
        struct strucCSTR_cell * complist;
 
359
        UniVersions * vers;
 
360
        CSTR_line line_no;
 
361
        struct strucCSTR_cell * prev_down;
 
362
        CCOM_USER_BLOCK * user_block;
 
363
        struct strucCSTR_cell * dupend;
 
364
        struct strucCSTR_cell * prev_up;
 
365
        struct strucCSTR_cell * next_up;
 
366
        struct strucCSTR_cell * next_down;
375
367
} CSTR_cell;
376
368
 
377
 
typedef struct _strucCSTR_head{
378
 
CSTR_attr   attr                ;
379
 
CCOM_handle container           ;
380
 
Bool32      private_container   ;
381
 
Word32      Properties          ;
 
369
typedef struct _strucCSTR_head {
 
370
        CSTR_attr attr;
 
371
        CCOM_handle container;
 
372
        Bool32 private_container;
 
373
        uint32_t Properties;
382
374
#define CSTR_LN_NO          0x00000000
383
375
#define CSTR_LN_FICT        0x00000001
384
376
 
385
 
 
386
 
Int32       number                      ;
387
 
Int32       version                     ;
388
 
CSTR_cell   first               ;
389
 
CSTR_cell   last                ;
390
 
struct _strucCSTR_head  *prev, *next,*next_fragm_line;
391
 
} CSTR_head ;
392
 
 
 
377
        int32_t number;
 
378
        int32_t version;
 
379
        CSTR_cell first;
 
380
        CSTR_cell last;
 
381
        struct _strucCSTR_head *prev, *next, *next_fragm_line;
 
382
} CSTR_head;
393
383
 
394
384
#define CSTR_TYPE_IMAGE_NO  0   // no type
395
385
#define CSTR_TYPE_IMAGE_LP  1   // linerepresentation
396
386
#define CSTR_TYPE_IMAGE_RS  2   // RecRaster
397
387
#define CSTR_TYPE_IMAGE_RS1 3   // B/W bitmap aligned to 1 byte
398
 
 
399
388
#ifdef DEBUG_MODE
400
389
 
401
390
typedef struct strucCSTR_cell * CSTR_rast;
402
391
#else
403
392
 
404
 
typedef Int32 CSTR_rast;
 
393
typedef int32_t CSTR_rast;
405
394
#endif
406
395
 
407
396
#define CSTR_ANSI_CHARSET            0
426
415
#define MAC_CHARSET             77
427
416
#define BALTIC_CHARSET          186
428
417
#define TURKISH_CHARSET         162     // 31.05.2002 E.P.
429
 
 
430
418
#define UZBEK_CHARSET           254
431
419
#define KAZAH_CHARSET           253
432
420
 
433
 
// ������ ������ �����
 
421
// разные версии линий
434
422
#define CSTR_LINVERS_MAIN        0
435
423
#define CSTR_LINVERS_MAINOUT     1
436
424
#define CSTR_LINVERS_PASS2       2
439
427
#define CSTR_LINVERS_ENG         3
440
428
#define CSTR_LINVERS_ENGOUT      4
441
429
#define CSTR_LINVERS_SAVE        5
442
 
// ��� ������� �����
 
430
// для базовых линий
443
431
#define CSTR_LINVERS_BAL         8
444
432
 
445
433
#pragma pack (pop)