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

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hhh/tigerh/h/struct.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:
2
2
Copyright (c) 1993-2008, Cognitive Technologies
3
3
All rights reserved.
4
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
 
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
 
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
32
 
33
33
Redistribution and use in source and binary forms, with or without modification,
34
34
are permitted provided that the following conditions are met:
55
55
*/
56
56
 
57
57
/*
58
 
  ������������������������������������������������������������������
59
 
  ��                                                              ��
60
 
  ��     Copyright (C) 1990 Cognitive Technology Corporation.     ��
61
 
  ��     All rights reserved. This program is proprietary and     ��
62
 
  ��     a trade secret of Cognitive Technology Corporation.      ��
63
 
  ��                                                              ��
64
 
  ������������������������������������������������������������������
 
58
  ЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫ
 
59
  ЫЫ                                                              ЫЫ
 
60
  ЫЫ     Copyright (C) 1990 Cognitive Technology Corporation.     ЫЫ
 
61
  ЫЫ     All rights reserved. This program is proprietary and     ЫЫ
 
62
  ЫЫ     a trade secret of Cognitive Technology Corporation.      ЫЫ
 
63
  ЫЫ                                                              ЫЫ
 
64
  ЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫЫ
65
65
*/
66
66
 
67
67
#ifndef H_struct_h
84
84
#define RASTER_MAX_WIDTH                128
85
85
#define SMALL_SIZE                          8
86
86
// AK! Atention!!!!//////////////////////////////////////////////////////
87
 
//  ����� ����� ��� ������������� �������� ����� ��� ��� ������ ��� �������
88
 
//  ������� dust �� letter
 
87
//  имеет смысл при необходимости отловить глюки так как падает при попытке
 
88
//  принять dust за letter
89
89
#define err_pnlet(c)       //((c))->nextl=((c))->prevl=(cell*)(0xffff0000)
90
90
#define err_pnnextlet(c)   //((c))->nextl=             (cell*)(0xffff0000)
91
91
#define err_pnprevlet(c)   //((c))->prevl=             (cell*)(0xffff0000)
101
101
struct mn_struc
102
102
 {
103
103
 void *mnfirstbox;              // address of the first box
104
 
 Int16 mncounter;               // (was INT) number of living lines in the component
 
104
 int16_t mncounter;             // (was int16_t) number of living lines in the component
105
105
#define mnfree  mnfirstbox      // reference to next free main number
106
 
 Int16 mnupper;                 // upper bound of component
107
 
 Int16 mnlower;                         // lower bound of component
108
 
 Int16 mnboxcnt;                // number of boxes in component
 
106
 int16_t mnupper;               // upper bound of component
 
107
 int16_t mnlower;                       // lower bound of component
 
108
 int16_t mnboxcnt;              // number of boxes in component
109
109
#define usual_box_count 20      // heuristic of number of lines in a letter
110
110
#define great_box_count 200     // heuristic for number of boxes in a picture
111
 
 Word8 mnlines;                  // number of lines in the component
112
 
 Word8 mnbegs;                  // number of free line begins
113
 
 Word8 mnends;                   // number of free line ends
114
 
 Word8 mnflag;                  // flag byte for main number
 
111
 uchar mnlines;                  // number of lines in the component
 
112
 uchar mnbegs;                  // number of free line begins
 
113
 uchar mnends;                   // number of free line ends
 
114
 uchar mnflag;                  // flag byte for main number
115
115
#define mnpicture 1             // component is a picture
116
116
 struct mn_struc *mnnext;       // address of next dead component
117
117
 };
123
123
 {
124
124
 struct box_struct *boxnext;    // chain address (zero if no next box)
125
125
 MN *               boxmain;    // component main number pointer
126
 
 Word16             boxptr;     // ptr to the empty place in the box
127
 
 Int16              boxleft;    // left boundary for line envelope
128
 
 Int16              boxright;   // right boundary for line envelope
129
 
 Int16              boxey;      // row of line end+1 ( if line ends within
 
126
 uint16_t                   boxptr;     // ptr to the empty place in the box
 
127
 int16_t                    boxleft;    // left boundary for line envelope
 
128
 int16_t                    boxright;   // right boundary for line envelope
 
129
 int16_t                    boxey;      // row of line end+1 ( if line ends within
130
130
                                //    box)
131
 
 Int16                boxel;    // length of the last segment (if line ends
 
131
 int16_t                boxel;  // length of the last segment (if line ends
132
132
                                //    within box)
133
 
 Int16              boxex;      // coordinate of last segment end (if line
 
133
 int16_t                    boxex;      // coordinate of last segment end (if line
134
134
                                //    ends within box)
135
 
 Word8              boxflag;    // byte for box attributes flags
136
 
 Word8              boxwf;      // working flag (for picture compress)
137
 
 Word16             boxresw;    // reserved word (for *4 arround)
 
135
 uchar              boxflag;    // byte for box attributes flags
 
136
 uchar              boxwf;      // working flag (for picture compress)
 
137
 uint16_t                   boxresw;    // reserved word (for *4 arround)
138
138
 };
139
139
typedef struct box_struct BOX;
140
140
 
159
159
 
160
160
struct ldescr_struct
161
161
 {
162
 
 INT y;         // y coord. of the first interval
163
 
 INT l;         // first interval length
164
 
 INT x;         // x coord. of the end of the first interval
 
162
 int16_t y;     // y coord. of the first interval
 
163
 int16_t l;     // first interval length
 
164
 int16_t x;     // x coord. of the end of the first interval
165
165
 };
166
166
typedef struct ldescr_struct LNSTRT;
167
167
 
168
168
struct box_interval
169
169
 {
170
 
 INT l;         // length of interval
171
 
 INT d;         // displacement of the end of the current interval relative
 
170
 int16_t l;             // length of interval
 
171
 int16_t d;             // displacement of the end of the current interval relative
172
172
 };             //      to the previous
173
173
typedef struct box_interval BOXINT;
174
174
 
176
176
 
177
177
struct comp_struc
178
178
 {
179
 
 WORD size;             // size of component in paragraphs >=3
180
 
 INT upper;             // upper boundary of component
181
 
 INT left;              // left boundary of component
182
 
 INT h;                 // height of component
183
 
 INT w;                 // width of component
184
 
 BYTE rw;               // raster width in bytes
185
 
 BYTE type;             // recognition type
 
179
 uint16_t size;         // size of component in paragraphs >=3
 
180
 int16_t upper;         // upper boundary of component
 
181
 int16_t left;          // left boundary of component
 
182
 int16_t h;             // height of component
 
183
 int16_t w;                     // width of component
 
184
 uchar rw;               // raster width in bytes
 
185
 uchar type;            // recognition type
186
186
#define ch_perfect    1     // perfect type defined
187
187
#define ch_letter     2     // letter type
188
188
#define ch_dust       4     // dust type
191
191
#define ch_great     32     // great component
192
192
#define ch_merge     64     // merged components
193
193
#define ch_notltr   128     // not letter or punctuation
194
 
 BYTE cs;               // recognition case (see bellow)
195
 
 BYTE pidx;             // proportional index (ref.)
196
 
 INT nvers;             // number of alternative versions
197
 
 INT records;           // recognition records offset
198
 
 INT lines;             // ptr to line representation
199
 
 INT nl;                // number of lines
200
 
 BYTE begs;             // number of free begins
201
 
 BYTE ends;             // number of free ends
202
 
 BYTE reasno;           // proportional criteria messages
203
 
 BYTE large;            // large type
 
194
 uchar cs;              // recognition case (see bellow)
 
195
 uchar pidx;            // proportional index (ref.)
 
196
 int16_t nvers;         // number of alternative versions
 
197
 int16_t records;               // recognition records offset
 
198
 int16_t lines;         // ptr to line representation
 
199
 int16_t nl;            // number of lines
 
200
 uchar begs;            // number of free begins
 
201
 uchar ends;            // number of free ends
 
202
 uchar reasno;           // proportional criteria messages
 
203
 uchar large;           // large type
204
204
#define ch_underlined   1       // component was underlined
205
205
#define ch_taken        2       // taken to line at dust_ini
206
 
 BYTE scale;                    // scale of the component
 
206
 uchar scale;                   // scale of the component
207
207
// union {
208
 
// BYTE stairs[4];                // bit_map for stairs_vector components
 
208
// uchar stairs[4];                // bit_map for stairs_vector components
209
209
 struct comp_struc * next;
210
210
//       };
211
211
 };
213
213
 
214
214
struct dust_comp_struc
215
215
 {
216
 
  WORD size;            // =1
217
 
  INT  upper;
218
 
  INT  left;
219
 
  BYTE h;               // >0
220
 
  BYTE w;               // >0
221
 
  BYTE raster[8];
 
216
  uint16_t size;            // =1
 
217
  int16_t  upper;
 
218
  int16_t  left;
 
219
  uchar h;               // >0
 
220
  uchar w;               // >0
 
221
  uchar raster[8];
222
222
 };
223
223
typedef struct dust_comp_struc dust_comp;
224
224
 
225
225
struct file_comp_struct
226
226
 {
227
 
 WORD  size;           // =1
228
 
 INT   upper;
229
 
 INT   left;
230
 
 BYTE  h;              // =0
231
 
 BYTE  w;              // =0
232
 
 DWORD offset;
233
 
 WORD  lth;
234
 
 BYTE scale;
235
 
 BYTE reserv;
 
227
 uint16_t  size;           // =1
 
228
 int16_t   upper;
 
229
 int16_t   left;
 
230
 uchar  h;              // =0
 
231
 uchar  w;              // =0
 
232
uint32_t offset;
 
233
 uint16_t  lth;
 
234
 uchar scale;
 
235
 uchar reserv;
236
236
 };
237
237
typedef struct file_comp_struct file_comp;
238
238
 
242
242
 
243
243
struct vers_struct      // versions with probabilities
244
244
 {
245
 
 BYTE let;    // character
246
 
 BYTE prob;   // probability
 
245
 uchar let;    // character
 
246
 uchar prob;   // probability
247
247
 };
248
248
typedef struct vers_struct version;
249
249
//----------------------- stick -------------------------------
250
250
 
251
251
struct stick_struct
252
252
 {
253
 
 CHAR x,y,l,w,top,bot;
254
 
 INT incl;
 
253
 char x,y,l,w,top,bot;
 
254
 int16_t incl;
255
255
 };
256
256
typedef struct stick_struct STICK;
257
257
 
258
258
struct cell_struc
259
259
 {
260
 
 INT row;       // ideal row of cell
261
 
 INT col;       // ideal collumn of cell
262
 
 INT h;         // height of cell
263
 
 INT w;         // width of cell
 
260
 int16_t row;   // ideal row of cell
 
261
 int16_t col;   // ideal collumn of cell
 
262
 int16_t h;     // height of cell
 
263
 int16_t w;     // width of cell
264
264
 c_comp *env;     // envelope and line representation ptr
265
265
 struct cell_struc *next;       // next in all string
266
266
 struct cell_struc *prev;       // prev in all string
267
267
 struct cell_struc *nextl;      // next letter ( only for letters )
268
268
 struct cell_struc *prevl;      // prev letter ( only for letters )
269
 
 CHAR bdiff;    // local base line corrective displacement
270
 
 BYTE difflg;   // local correction flg
 
269
 char bdiff;    // local base line corrective displacement
 
270
 uchar difflg;   // local correction flg
271
271
// baseline defined by cell:
272
272
#define c_db_b1 1
273
273
#define c_db_b2 2
278
278
#define c_db_up     32     // base corrected 1 pixel up
279
279
#define c_db_forbid 64     // don't take to calculate bases (abnormal pos)
280
280
#define c_db_solid  128    // BOX_solid letter not penalized
281
 
 BYTE basflg;
 
281
 uchar basflg;
282
282
#define c_bs_b1a    1      // agrees to be at  b1
283
283
#define c_bs_b2a    2      //                  b2
284
284
#define c_bs_bt     4      //                  't' level
287
287
#define c_bs_round  32
288
288
#define c_bs_cap    64     // capital shape
289
289
#define c_bs_done   128
290
 
 CHAR bas1;
291
 
 CHAR bas2;
292
 
 CHAR bas3;
293
 
 CHAR bas4;
294
 
 INT r_row;     // real row of cell
295
 
 INT r_col;     // real collumn of cell
296
 
 INT nvers;     // number of versions
 
290
 char bas1;
 
291
 char bas2;
 
292
 char bas3;
 
293
 char bas4;
 
294
 int16_t r_row;     // real row of cell
 
295
 int16_t r_col;         // real collumn of cell
 
296
 int16_t nvers;         // number of versions
297
297
 version vers[VERS_IN_CELL];
298
 
 BYTE cg_flag;  // cut-to-glue message
 
298
 uchar cg_flag;  // cut-to-glue message
299
299
#define c_cg_noglue     1   // don't glue to ... ( just cut )
300
300
#define c_cg_noenv      2       // envelope address obsolete
301
301
#define tenv(c)         ((c)->env && !((c)->cg_flag&c_cg_noenv))
310
310
#define c_cg_cutacc     8+16+32 // cutted accent
311
311
#define c_cg_just       64  // just created
312
312
#define c_cg_cutoff    128  // ignore "cutted" flags at glue attempt
313
 
  WORD flg;  // flag of cell
 
313
  uint16_t flg;  // flag of cell
314
314
#define c_f_let         1       // letter component
315
315
#define c_f_bad     2   // badly recognized
316
316
#define c_f_dust        4       // dust
320
320
#define c_f_confirmed   64      // confirmed letter
321
321
#define c_f_fict        128     // fictive element
322
322
#define c_f_detouch     256     // fictive element
323
 
 BYTE cpos;     // position of component
 
323
 uchar cpos;     // position of component
324
324
#define ce_p_small      1
325
325
#define ce_p_large      2
326
326
#define ce_p_low        4
330
330
#define ce_p_bra        64
331
331
#define ce_p_ex         128
332
332
#define ce_p_all        255     // all positions are possible
333
 
 BYTE reasno;    // proportional criteria messages
 
333
 uchar reasno;    // proportional criteria messages
334
334
#define c_rn_right      1       // right refuse by proportions
335
335
#define c_rn_left       2       // left refuse by proportions
336
336
#define c_rn_pi         4       // this is a dot of some 'i'
337
 
 BYTE keg;      // kegel
338
 
 BYTE font;     // font properties
 
337
 uchar keg;      // kegel
 
338
 uchar font;     // font properties
339
339
#define c_fp_ser        1       // serific
340
340
#define c_fp_gelv       2       // helvetic
341
341
#define c_fp_bold       4       // bold
343
343
#define c_fp_it         16      // italic
344
344
#define c_fp_str        32      // stright
345
345
#define c_fp_undrln     64      // underlined
346
 
 BYTE dens;     // BOX - calculated density
347
 
 BYTE recsource;  // who and how recognized
 
346
 uchar dens;     // BOX - calculated density
 
347
 uchar recsource;  // who and how recognized
348
348
#define c_rs_ev 1   // events brought versions
349
349
#define c_rs_BOX 2   // BOX done
350
350
#define c_rs_BOXs 4  // BOX > "29500"
351
351
#define c_rs_bitcmp 8  // bit compare takes versions
352
 
 INT  stick_inc;   // inc of stick
 
352
 int16_t  stick_inc;   // inc of stick
353
353
#define NO_INCLINE 10000 // not init incline
354
354
 c_comp *complist;   // if no envelope - list of envelopes
355
 
 BYTE bas_acc;       // cell's relations with bases
 
355
 uchar bas_acc;       // cell's relations with bases
356
356
#define c_ba_b1  1    // accepted  to b1
357
357
#define c_ba_b2  2    // accepted  to b2
358
358
#define c_ba_killed 4 // temporary: all versions killed by linear
359
359
#define c_ba_chance 8 // one more chance for cut version
360
 
 INT left;            // left  of main part (without accent)
361
 
 INT right;           // right of main part (without accent)
362
 
 BYTE shape;
 
360
 int16_t left;            // left  of main part (without accent)
 
361
 int16_t right;           // right of main part (without accent)
 
362
 uchar shape;
363
363
#define c_shp_cap   1
364
364
#define c_shp_stick 2
365
365
#define c_shp_stb1  4
366
366
#define c_shp_small 8
367
367
#define c_shp_dbh   32
368
368
#define c_shp_b1up  16
369
 
 BYTE rus_eng_word; // information for RUS/ENG manipulations
 
369
 uchar rus_eng_word; // information for RUS/ENG manipulations
370
370
#define ruseng_no      0  // russian
371
371
#define ruseng_rus     0  // russian
372
372
#define ruseng_re      1  // russian or english
373
373
#define ruseng_eng     2  // english
374
374
#define ruseng_alt     3  // many alternates
375
 
 BYTE broken_II;    // II configuration
376
 
 BYTE language;
377
 
 BYTE pos_inc;
 
375
 uchar broken_II;    // II configuration
 
376
 uchar language;
 
377
 uchar pos_inc;
378
378
#define erect_no       0   // really envelop
379
379
#define erect_rot      1   // rotate image
380
380
#define erect_rest     2   // restore after rotating
382
382
#define erect_zero     8   // disable rotate and cursive study
383
383
#define set_erection( c, inc ) if( (inc)!=NO_INCLINE&&tenv(c) ) \
384
384
             { (c)->stick_inc=inc; (c)->pos_inc=inc?erect_rot:erect_zero; }
385
 
 INT  save_stick_inc;   // save_inc of stick
386
 
 BYTE cg_flag_fine;        // type of cutting position
 
385
 int16_t  save_stick_inc;   // save_inc of stick
 
386
 uchar cg_flag_fine;        // type of cutting position
387
387
#define c_cg_cut_tl     0x01    // left top    cutten
388
388
#define c_cg_cut_ml     0x02    // left middle cutten
389
389
#define c_cg_cut_bl     0x04    // left bottom cutten
393
393
#define c_cg_cut_mr     0x20   // right middle cutten
394
394
#define c_cg_cut_br     0x40   // right bottom cutten
395
395
#define c_cg_cut_fr     0x80   // right full   cutten
396
 
 LONG clink;            // Link to the cluster
 
396
 int32_t clink;         // Link to the cluster
397
397
 struct cell_struc * dup; // ref to copy of this word; defined only in spaces
398
398
#define dup_default     ((cell*)0xffffffff)
399
399
#define MAX_BATON 3
400
400
#define NO_BATONS 255
401
401
 STICK  save_baton[MAX_BATON];
402
 
 BYTE   n_baton;
403
 
 BYTE   accent_leader; // leader cell in farajev complex-cell
404
 
 BYTE   bottom_accent; // was spare[1]; 16.10.97 E.P.
 
402
 uchar   n_baton;
 
403
 uchar   accent_leader; // leader cell in farajev complex-cell
 
404
 uchar   bottom_accent; // was spare[1]; 16.10.97 E.P.
405
405
  };
406
406
typedef struct cell_struc cell;
407
407
 
415
415
//      line header
416
416
struct ln_head
417
417
 {
418
 
 INT lth;       // length of one line representation
419
 
 INT h;         // height of line
420
 
 INT row;       // relative row of line start
421
 
 BYTE flg;      // flags of free beg and free end
 
418
 int16_t lth;   // length of one line representation
 
419
 int16_t h;             // height of line
 
420
 int16_t row;   // relative row of line start
 
421
 uchar flg;     // flags of free beg and free end
422
422
#define l_fbeg          0x20
423
423
#define l_fend          0x80
424
424
#define l_cbeg          0x02
429
429
//      one interval
430
430
struct int_s
431
431
 {
432
 
 BYTE l;        // length of interval
433
 
 BYTE e;        // end of interval coordinates
 
432
 uchar l;       // length of interval
 
433
 uchar e;       // end of interval coordinates
434
434
 };
435
435
typedef struct int_s interval;
436
436
 
437
437
struct large_int_s
438
438
 {
439
 
 WORD l;        // length of interval
440
 
 WORD e;        // end of interval coordinates
 
439
 uint16_t l;    // length of interval
 
440
 uint16_t e;    // end of interval coordinates
441
441
 };
442
442
typedef struct large_int_s large_interval;
443
443
 
445
445
 
446
446
struct str_struc
447
447
 {
448
 
 INT row;             // upper of line
449
 
 INT col;             // left of line
450
 
 INT lower;           // lower of line
451
 
 INT right;           // right of line
452
 
 WORD dust;           // end of letter ptrs
453
 
 WORD end;            // end of dust ptrs
454
 
 WORD lth;
455
 
 WORD first;
456
 
 WORD last;
457
 
 WORD scale;            // scale of the string
458
 
 INT fragment;          // fragment of the string
459
 
 BYTE language;         // language of the string
 
448
 int16_t row;             // upper of line
 
449
 int16_t col;             // left of line
 
450
 int16_t lower;           // lower of line
 
451
 int16_t right;           // right of line
 
452
 uint16_t dust;           // end of letter ptrs
 
453
 uint16_t end;            // end of dust ptrs
 
454
 uint16_t lth;
 
455
 uint16_t first;
 
456
 uint16_t last;
 
457
 uint16_t scale;                // scale of the string
 
458
 int16_t fragment;              // fragment of the string
 
459
 uchar language;         // language of the string
460
460
 c_comp *c__comp[1];       // array of ptrs to components
461
461
 };
462
462
typedef struct str_struc str;
465
465
 
466
466
struct baseline_struct
467
467
 {
468
 
 INT b0,b1,b2,b3,b4,bm,ps;    // four base lines, middle line, point size
469
 
 INT n1,n2,n3,n4;
 
468
 int16_t b0,b1,b2,b3,b4,bm,ps;    // four base lines, middle line, point size
 
469
 int16_t n1,n2,n3,n4;
470
470
 };
471
471
typedef struct baseline_struct B_LINES;
472
472
 
474
474
//AK:  without collision when snap.dll creating
475
475
#ifndef _SNAP_
476
476
 
477
 
struct POINT_S {INT row,col;} ;
 
477
struct POINT_S {int16_t row,col;} ;
478
478
 
479
479
struct rule_struct
480
480
 {
481
481
 struct POINT_S beg,end;
482
 
 BYTE width;
483
 
 BYTE type;
 
482
 uchar width;
 
483
 uchar type;
484
484
#define VERT_LN  0
485
485
#define HOR_LN   1
486
486
#define UNDRLN   2
500
500
#define TO_FDF(i) ((i)<FDSIZE ? (i):0)
501
501
 
502
502
struct FragmentDescriptor {
503
 
      INT  user_num;  // Number of USER
504
 
      BYTE language;  // Language of fragments
505
 
      BYTE reserv;
 
503
      int16_t  user_num;  // Number of USER
 
504
      uchar language;  // Language of fragments
 
505
      uchar reserv;
506
506
      };
507
507
typedef struct FragmentDescriptor   FragDesc;
508
508