2
Copyright (c) 1993-2008, Cognitive Technologies
5
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½,
6
ļæ½ļæ½ļæ½ ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½:
8
* ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
9
ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
10
ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
11
* ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½
12
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
13
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½
14
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
15
* ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ Cognitive Technologies, ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½
16
ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
17
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
18
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
20
ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ "ļæ½ļæ½ļæ½
21
ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½" ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½-ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
22
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ ļæ½ļæ½
23
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½. ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
24
ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½
25
ļæ½ļæ½ŃØļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½
26
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
27
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ (ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
28
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½-ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
29
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
30
ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½), ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½
31
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
33
Redistribution and use in source and binary forms, with or without modification,
34
are permitted provided that the following conditions are met:
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.
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.
58
/********************************************************************/
60
/* common functions prototypes */
62
/********************************************************************/
64
#ifndef KERNEL_H_INCLUDE
65
#define KERNEL_H_INCLUDE
75
/* FIXME: to compile in MS VC++ */
76
#define c_locomp EVN_CLocomp
78
extern BYTE *let_linpos, *let_lindef,
79
*let_lincomp, *let_linshape,
80
*let_sans_acc, *let_lindef3;
81
extern Word16 *accent_tab ; // 30.08.2000 E.P.
84
void r_criteria(cell *c, const s_glue * gl);
87
INT brigt(INT,INT,INT,INT);
90
PCHAR full_name(PCHAR w, PCHAR n);
93
void correct_dir_path (PBYTE p);
96
void image_file_close();
97
BOOL image_file_open();
98
INT source_read (PBYTE start, PBYTE ptr, PBYTE end);
101
void set_percentage(void);
102
void progress_next_step(void);
103
DWORD progress_set_step (DWORD volume);
104
DWORD progress_set_percent (DWORD volume);
105
void progress_finish(void);
110
INT matrix_read(PBYTE buff, WORD lth);
118
void del_root(INT,INT,INT,INT);
121
LONG rules_shaving(MN *,INT);
131
void read_comp(DWORD,PCHAR,LONG);
132
void comp_file_close();
137
INT skew_corr(CSTR_line , INT);
139
void ideal_rc(cell *);
142
void pass3(CSTR_line lin,CSTR_line lout);
143
BOOL pass3BL(CSTR_line ln);
144
BOOL pass1_test_alphabet(str_info *str,CSTR_line ln);
145
BOOL pass2_test_alphabet(str_info *str,CSTR_line ln);
146
void accept_cell(cell *ce,c_comp *co);
147
void dust_ini(CSTR_line lin);
150
BOOL is_digital_string(void);
151
void serbian_J2j(void);
154
void reset_snap(void);
155
BOOL snap_fictive_skip(INT i);
156
BOOL snap_init(void);
157
BOOL snap_init_variables(void);
158
BOOL snap_finish(void);
159
BOOL snap_newline(void);
160
BOOL snap_newpass(BYTE);
161
BOOL snap_show_text(PBYTE);
162
BOOL snap_show_text1(PBYTE);
163
BOOL snap_monitor(void);
164
void snap_draw_line(Handle wnd, Point16 *start, Point16 *end, Int32 skew,
165
Word32 rgb, Int16 pen, Word32 key);//IGOR
166
void snap_del_line(Handle wnd, Word32 key);//IGOR
167
BOOL snap_baselines(BYTE a);//IGOR
168
BOOL snap_monitor_ori(CSTR_line *snap_line, Int32 nums);
169
BOOL snap_newcell(cell *);
170
BOOL snap_stopcell(cell *,cell *);
171
BOOL snap_activity(BYTE);
172
BOOL snap_is_marked(CSTR_line ln);
173
BOOL snap_show_raster(PBYTE,INT,INT);
174
BOOL Alik_snap_show_raster(PBYTE,PBYTE,PBYTE,INT,INT,PCHAR,PCHAR,PINT);
175
void snap_newcut(void);
176
void snap_show_cuts(cell *C, struct cut_elm *cut_points);
177
void snap_newpoint(INT i);
178
void snap_stop_cuts(void);
179
cell*snap_get_stopcell(void);
181
BOOL snap_is_active(void);
185
INT prop_index(INT h, INT w);
190
void criteria(cell *);
191
cell *dot_ri(cell *);
192
cell *dot_ij(cell *);
193
cell *dot_excl(cell *);
194
cell *dot_inv(cell *);
196
void v_to_y(cell * c, BYTE compose);
197
void c_to_ctail(cell * c, BYTE compose);
200
void pass_accent(void);
201
INT bottom_accent(cell *c);
203
INT type_acc(cell *,BOOL);
204
INT find_bottom_accent(cell *c);
210
INT obtain_diff(INT);
211
INT def_locbas(cell *);
212
void inter_diff(cell *);
214
INT if_dust_size(cell *);
215
void linpos(CSTR_line);
217
void cell_position(cell *);
218
INT levcut(cell *, INT);
219
void get_b_lines(cell *,B_LINES *);
221
INT get_bsm(); //AK 04.03.97 ? to LONG
222
INT is_defis(cell *);
223
void basedraft(CSTR_line);
224
void basefin(CSTR_line);
225
INT cut_by_pos(cell *C, BYTE c, INT wp, BYTE fl, BYTE arg);
228
INT try_cut_accent(cell *C1, B_LINES *my_bases, INT flag);
229
INT try_cut_top_accent(cell *C1, B_LINES *my_bases, INT flag);
230
INT try_cut_bot_accent(cell *C1, B_LINES *my_bases, INT flag);
234
INT discrid(cell *, INT);
235
INT decidust(cell *);
237
(CHAR,cell *,SVERS *,INT,INT,INT,s_glue *,cut_pos*,cut_pos*,CHAR,CHAR,CHAR);
239
void est_snap(CHAR user,cell *C,PCHAR txt);
240
void promote(BYTE, cell *, BYTE, INT);
241
void collect_pat(cell *, s_glue *, cell *);
245
void glsnap(CHAR,cell *,PCHAR);
248
void save_vers(cell *,SVERS *);
249
void min3(v_val *,BYTE,v_val *);
250
void rest_vers(cell *,SVERS *);
251
INT signif_line_count(cell*);
252
INT compare_vect(v_val *,v_val *);
253
INT cell_is_BOX_solid (cell*);
256
MN* c_locomp(PBYTE,LONG,LONG,INT,INT);
258
// module v0compgl.asm
259
void invert_tiff(PBYTE c, WORD lth);
267
INT cut_points(INT,INT,PBYTE,struct cut_elm *);
268
INT Alik_cut_points(INT,INT,PBYTE,struct cut_elm *, INT);
269
MN* cut_rast(PBYTE,INT,INT,INT,INT,struct cut_elm *,CHAR,CHAR,PCHAR,cut_pos*);
272
void Alik_def_cut_flg(cell *,struct cut_elm *,struct cut_elm *,INT,BYTE);
275
MN *glue(c_comp **, INT);
278
INT dmBOX(cell *,s_glue *);
279
INT dmiBOX(cell *,s_glue *,INT);
280
servBOX *make_broken_raster(s_glue *,INT);
281
INT crecell(cell *,s_glue *,INT);
282
INT crepat(cell *,s_glue *,INT,INT);
283
void SBOX_to_static();
284
void SBOX_to_GL(s_glue *);
285
void GL_to_SBOX(s_glue *);
286
void static_to_SBOX();
287
void dens_to_cell(cell *);
288
void static_to_cell(cell *);
291
void embBOX(servBOX *,SVERS *, BOOL );
292
void embBOXF(servBOX *,INT, BOOL);
295
INT proport(WORD,WORD,WORD,INT,INT);
296
extern WORD (*scalarf)(PWORD,PWORD,WORD);
297
extern LONG (*scalar) (PWORD,PWORD);
298
INT long_sqrt(DWORD);
300
// module funcBOX.asm
301
void comp_to_box(PWORD,c_comp *,WORD, WORD, WORD, WORD);
305
INT abris(s_glue *,cell *,BYTE,INT);
306
INT h_filt(cell *, INT, s_glue *, BYTE Let);
307
INT rtf(cell *cl, INT prob, s_glue *GL);
308
void apply_monus(cell *);
315
void atlant(cell *,s_glue *,INT,INT);
318
void LayoutPart1 (void);
319
void LayoutPart2 (void);
322
void SpecCompPut (MN *mn);
328
BOOL abris_curve(BYTE fun[],INT n,INT w);
329
INT find_minimum(BYTE fun[],INT n,BYTE *_imin);
333
void new_vers( cell *c, BYTE vers, BYTE prob);
334
void down_all_versions(cell *c, INT monus);
335
void filtr_shave(BYTE fun[],INT len);
336
BOOL set_prob(cell *c, CHAR let, BYTE prob);
337
BOOL check_let(cell *c, CHAR let );
338
void add_stick_vers(cell *c,CHAR let,BYTE prob);
339
void filtr_short(BYTE fun[],INT n,INT lev);
340
void filtr121(BYTE fun[],INT n);
341
void filtr_bullet(BYTE fun[],INT len);
342
void add_thick_stick_versions(cell *c,INT dx,INT wide,INT inc,
344
STICK_CHARS *left_chars,STICK_CHARS *right_chars,
345
STICK_SIGNUMS *signums);
346
void add_thin_stick_versions(cell *c,BYTE left[],BYTE right[],
347
INT dy,INT dx,INT typ_inc,
348
STICK_CHARS *left_chars,STICK_CHARS *right_chars,
349
STICK_SIGNUMS *signums);
350
BOOL sign_neck(BYTE left[],BYTE right[],INT n,INT base,INT mode);
351
INT conv_prob(INT prob);
352
INT shift_raster(BYTE *r,INT dy,INT dx,INT tab[],INT max_shift,BYTE *res,INT dir);
353
/******************************
354
void full_snap(cell *c,STICK_CHARS *l,STICK_CHARS *r,STICK_SIGNUMS *s,
356
INT left_mode,INT right_mode,INT opt,INT wide,
358
void short_snap(CHAR *s,INT t);
359
*******************************/
362
INT discrim_all_sticks(cell *c,
363
STICK_CHARS *left_chars,STICK_CHARS *right_chars,
364
STICK_SIGNUMS *signums);
365
INT discrim_stick(BYTE,STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *,
367
INT del_sticks(cell *c ,CHAR let);
368
INT similar_0xBA (STICK_CHARS *, STICK_CHARS *, STICK_SIGNUMS *);
369
INT similar_0xBB (STICK_CHARS *l,STICK_CHARS *r,STICK_SIGNUMS *s);
370
INT similar_1(STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *);
371
INT similar_l_stroked(STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *);
372
INT similar_lcb(STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *);
373
INT similar_rcb(STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *);
374
INT similar_excl(STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *);
375
INT similar_excl_with_dot(STICK_CHARS *,STICK_CHARS *,STICK_SIGNUMS *);
376
BYTE similar_wide_frt1(STICK_CHARS *left_chars,STICK_CHARS *right_chars);
380
INT stick_center_study(cell *c,s_glue *GL,INT typ );
381
WORD typ_thin_stick(lnhead *lin,INT dy,INT dx);
382
INT erector(cell *c, INT enable_erect, INT enable_shave, INT enable_snap, INT enable_diskrim );
385
INT set_stick_char(BYTE left[],BYTE right[],INT tails[],
386
INT dy,INT dx,INT opt,INT wid,INT corr_mode,
387
INT skip_ul,INT skip_dl,INT skip_ur,INT skip_dr, INT inc,
388
STICK_CHARS *left_chars, STICK_CHARS *right_chars,
389
STICK_SIGNUMS *signums,
390
INT *l_mode,INT *r_mode);
391
INT calc_right_f_symptom(BYTE fun[],INT n,INT m);
392
INT calc_left_f_symptom (BYTE fun[],INT n,INT nx,BOOL c_ft);
393
void num_of_skip_line(BYTE left[],BYTE right[],INT dy,INT opt,INT wide,
394
INT *up_l,INT *up_r,INT *down_l,INT *down_r);
396
void set_stick_aux_signums(cell *c,BYTE left[],BYTE right[],
398
STICK_CHARS *left_chars,STICK_CHARS *right_chars,
399
STICK_SIGNUMS *signums,
400
INT dis_left_brace,INT dis_right_brace,INT dis_slash,
401
INT l_f_sym,INT r_f_sym,
406
INT nlines,INT incline);
408
void calc_skipped_lines(INT hist_int[],BYTE left[],BYTE right[],
409
INT dy,INT dx,INT wide,INT opt,BOOL c_r,
410
INT *ul,INT *ur,INT *dl,INT *dr);
411
void correct_f_symptoms(INT hist_int[],INT dy,INT *l_f_sym,INT *r_f_sym);
412
void correct_upper_peaks(STICK_CHARS *l,STICK_CHARS *r,INT dy);
418
BOOL boldshave(cell *,INT); //AK: at .ms as BOOL
419
BOOL pimpleshave(cell *C, INT shave, INT inc); //AK: at .ms as BOOL
427
void clear_punct_twin_flags(void);
428
void clear_twin_flags(void);
430
void clean_punct_temp();
432
void recover_dusts(void);
433
void hide_dusts(BYTE reg);
436
void extremum(PCHAR,INT,INT,INT,INT,CHAR,CHAR);
442
void space_size(INT);
443
void set_space_size(INT);
446
void space_valid_words(void);
447
void showgap(cell *);
448
INT get_space_size(void);
453
void context_proc_line();
457
void correct_case(void);
460
BOOL abris_curve(BYTE fun[],INT n,INT w);
472
void lineout_fragment();
473
void lines_out_init();
477
void ed_out_finish();
478
void set_initial_edout (PBYTE pool, DWORD lth);
480
void init_sheet_tag(void);
488
INT ed_scan (BOOL (*)(PBYTE,INT),BOOL (*)(PBYTE,INT),PBYTE,PBYTE);
489
BOOL scan_skip (PBYTE p, INT lth);
492
void edp_main(PBYTE memory, LONG lth);
501
void write_prot(cell *);
504
BOOL comp_versions(version *v, version *w, INT n,INT snvers);
505
void set_bad_cell(cell *);
506
void sort_vers(cell *);
507
void sort_v_vect(INT,version *);
510
PBYTE il1_pool_ptr();
512
c_comp * comp_vers_to_kit(MN * mn, c_comp *c);
513
c_comp * comp_from_file(DWORD,LONG);
514
c_comp * compose_comp(INT,c_comp **);
515
BOOL compose_cell(INT,cell **,cell *);
516
BOOL compose_cell_save(INT,cell **,cell *);
517
void del_retain_cell(cell *);
518
cell *del_cell(cell *);
519
PBYTE del_save_cell(cell *);
520
cell *rest_cell(void *,cell *);
523
////////////////////////////////////////////////
524
//AK add 3 funcs for check chain of cells:
525
void AKTryChainRecover( cell ** );
527
INT AKCellInChain( cell * );
528
void AKClearVers(void);
529
////////////////////////////////////////////////
531
void free_cell(cell *c);
532
void insert_cell(cell *c, cell *ci);
533
void insert_cell1(cell *c,cell *ci);
534
void adjust_links (cell *c);
535
cell *create_cell (MN *,cell *,CHAR, CHAR);
536
cell *create_cell1(MN *,cell *,CHAR, CHAR);
537
cell *create_cell_work(MN * mn, cell * ci, CHAR bdiff, CHAR dflag);
538
INT short_recog_cell(cell *);
539
INT recog_cell(cell *);
540
INT recop_cell(cell *);
541
INT reco2_cell(cell *);
542
PBYTE save_raster(cell *);
543
PBYTE give_kit_addr();
544
void take_kit_addr(PBYTE a);
545
void add_vers(cell *, version *);
546
void del_version( cell *c, BYTE let);
547
void online_comp(c_comp *);
549
void cell_bonus_let(cell *C, CHAR Let, INT BonVal);
550
void cell_bonus(cell *C, version *pVer, INT BonVal);
553
INT sticks_in_letter(cell *,INT,STICK **);
557
void file_string(STRING *); // accept string into file
563
void maden_comp(PBYTE,INT,INT,INT,INT);
564
c_comp *get_comp(PROOT);
566
Bool32 read_rec_file(INT seqn, PBYTE pool, PBYTE * end);
567
///////////////////INT cond_open(INT seqn, PCHAR name, WORD b1, WORD b2);
568
PBYTE seq_nam(INT seqn);
572
void make_ASCII(void);
573
void make_smart_ASCII(void);
574
void LayoutSetup (void);
575
void load_vocs(void);
578
void error_exit(INT group, INT element);
579
void error_exit_asm(INT element);
580
void clear_error_status(void);
583
void snap_events(cell *);
584
void write_events(cell *);
585
void * snap_ev_res();
586
void snap_ev_reset();
587
void snap_keep(BYTE user, PBYTE addr, WORD lth);
588
/*void snap_sticks(cell *,char *);*/
590
// module v0compmn.asm
591
void extrcomp (void);
593
// module v0comprq.asm
595
void recog_save_maden();
598
void v2_pidx_crit(cell *);
600
BOOL pidx_skip(INT h, INT w,BYTE t_let);
601
WORD el_pidx_crit(WORD t_let,INT pidx);
604
void ev_lang_filter();
608
INT MN_to_line(MN *);
610
PBYTE make_extended_raster(c_comp *);
613
INT scaled(INT value, BYTE scale);
616
PBYTE compress_component(c_comp *c, BYTE scale);
617
PBYTE compress_large_component(c_comp *c, BYTE scale);
618
PBYTE compress_dust_component(c_comp *c, BYTE scale);
619
INT filling_MN(MN *mn, WORD h, WORD w);
622
INT spelling(PBYTE memory, LONG size);
625
BYTE * load_stat_dict (PBYTE ptr);
626
void load_user_dicts (PSTR list_name, PBYTE ptr);
627
void user_voc_init (void);
630
void discrim_un( cell *, s_glue *, INT );
633
void rtf_main(PBYTE memory, LONG memory_lth);
636
void print_fragments();
639
void smart_ascii_save(PBYTE pool, LONG lth);
640
void ascii_save(PBYTE pool, LONG lth);
643
void write_prot(cell *);
646
INT give_scan_handle(void);
647
WORD scan_close(void);
649
// module dllentry or run
650
void write_text(BYTE);
653
void setup_dump(void);
654
void cell_to_dump(cell *);
655
void dump_to_string(void);
658
void trade_marks(void);
661
cell * end_word(cell *cs,BYTE *str,BYTE *word_len,BYTE *add_letters);
662
cell * next_word(cell *cs);
663
BOOL russian_word(BYTE *wrd);
666
INT erection_cyr_language(BYTE language);
667
INT erection_cond_language(BYTE language);
668
INT erection_language(BYTE language);
669
void calcErection( cell *c );
670
void erect_init_global_tab(void);
671
void erect_set_global(void);
672
INT erect_get_global(void);
673
INT erect_get_local(void);
674
INT erect_get_represent(void);
675
INT erect_get_words(void);
676
BYTE erection_incline_words(INT pass);
677
BYTE erection_one_incline_word(cell *c, cell *e);
678
void erection_delete(void);
679
void erection_restore(void);
680
void erection_delete_seq(cell *b, cell *e);
681
void erection_restore_seq(cell *b, cell *e);
682
INT erection_compose_inc(INT n,cell **clist);
683
INT erect_original_dens (cell *c);
684
INT erect_original_width (cell *c);
685
cell* erect_cell_value (cell *c, INT inc, INT shave, BOOL cutting);
686
cell* erect_cell_table (cell *c, INT tab_angle[], INT shave, BOOL cutting);
687
BOOL erect_make_tab(cell *c, INT tab_angle[]);
688
void erect_shift_intervals(void *addr, INT h, INT tab_angle[] );
689
INT erect_raster_value (BYTE *raster, INT dx, INT dy, INT inc);
692
void shevron(cell* );
693
/*-------------------------- Extern -------------------*/
695
BOOL check_cancel(WORD perc);
699
MN *cell_cut(cell *);
702
void set_page_name(PBYTE);
706
void c_rastror(PBYTE,PBYTE,WORD,WORD);
708
lnhead *c_boxln(MN *);
711
Int16 rstr_cont_store(RecRaster *r,Word8 let, Word8 nLns,Rect16 *rect,Word8 IsPrint,
712
Word8 Prob, Word8 Valid, RecVersions *v,Word8 control,
713
Word8 kegl,Word8 column,Word8 tabno);
714
void rstr_close_cont(void);
715
Bool32 rstr_open_cont(void);
717
Bool32 Reload_lang_vocs(Word8 language);
718
Bool32 set_user_alphabet(Word8 * usa_ascii);
719
void ErrorExit(int Code);
722
#define _JBTYPE jmp_buf
724
_JBTYPE *Control_Point();
732
Bool32 cstr_erection_pass2(CSTR_line lout);