~ubuntu-branches/debian/wheezy/cuneiform/wheezy

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hrstr/cuthdr.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-10 17:58:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090710175810-rqc89d2i3tki9m89
Tags: upstream-0.7.0+dfsg
ImportĀ upstreamĀ versionĀ 0.7.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#define prot_size 2
 
59
 
 
60
#define MAX_LINES 64    // maximum number of shortened lines in component
 
61
#define MAX_CELLS_IN_LIST 8
 
62
#define MAX_VERS_BOX 8
 
63
#define MERGE1 0x1
 
64
#define MERGE2 0x2
 
65
#define SPLIT  0x4
 
66
#define CONT   0x8
 
67
#define MAX_HOR 128
 
68
#define MAX_VERT 30
 
69
 
 
70
#define MAX_GLUE_COMP 8
 
71
#define LEFT_DISTANCE_MAX  10   // in % of width of letter
 
72
#define LEFT_DISTANCE_MIN  20
 
73
#define RIGHT_DISTANCE_MIN 10
 
74
#define RIGHT_DISTANCE_MAX 20
 
75
 
 
76
#define GFbadl   2      // may involve bad  at left side
 
77
#define GFbadr   1
 
78
#define GFsrc    4      // cell OR newcell to be used for makerast
 
79
#define GFndd    8      // don't disriminate by dust
 
80
///////// #define GFfinal  128    // decision will be treated as final
 
81
#define GFcut    64     // pattern produced by cut (not by Tiger)
 
82
#define GFtiger  32     // pattern estimated by Tiger
 
83
 
 
84
#define GRdust 4        // dust has been cut
 
85
#define GRflo  8        // {0OoQD} - not to be cut
 
86
 
 
87
#define GAtigr 1        // estimate by tiger
 
88
#define GABOXl 2        // estimate by BOX with NO LINEAR CRIT
 
89
#define GAbox  8        // try to take all-in-box to BOX
 
90
#define GAsur  4    // try to take all surrounding to BOX
 
91
#define GAown  16       // try to estimate as is
 
92
#define GABOXR  32       // BOX REQURED (not only allowed)
 
93
#define GABOXs  64       // BOX sticks REQURED (not only allowed)
 
94
#define GABOXt  128      // BOX estimate TIGR versions (not to apply full BOX)
 
95
#define GAallest GAbox+GAsur+GAown
 
96
 
 
97
struct andrew
 
98
 {
 
99
// char dum[prot_size];
 
100
 
 
101
 CHAR a_Totalth;
 
102
 CHAR a_bestc, a_best, a_bestx, a_bestxr, a_bestxh;
 
103
 CHAR a_Exbn, a_Exbx, a_Exfn, a_Exhn, a_Eahn, a_Eafn;
 
104
 CHAR a_Extrem, a_ExtreM, a_Extrex, a_ExtreX,
 
105
      a_Exbm, a_ExbM, a_ExfM, a_Exfm, a_ExhM, a_Exhm;
 
106
 CHAR a_Lbnd, a_lbnd, a_Rbnd, a_rbnd, a_lwpnt, a_rwpnt;
 
107
 CHAR a_nmax1, a_nmax2, a_bsnx;
 
108
 CHAR a_Startp, a_Endp, a_botflag;
 
109
 CHAR a_FlM, a_Nmb, a_lastmax, a_NBmax;
 
110
 struct extrem_elem *a_extrp;
 
111
 struct extrem_elem *a_extrc;
 
112
 struct extrem_elem *a_extrn;
 
113
 
 
114
 struct info_elm a_points[MAX_HOR];
 
115
 struct extrem_elem a_Exbody[MAX_HOR/2];
 
116
 struct extrem_elem a_Exfoot[MAX_HOR/2];
 
117
 struct extrem_elem a_Exhead[MAX_HOR/2];
 
118
 CHAR a_bodies[MAX_HOR];
 
119
 CHAR a_footes[MAX_HOR];
 
120
 CHAR a_heades[MAX_HOR];
 
121
 CHAR a_linums[MAX_HOR];
 
122
 CHAR a_linumsx[MAX_HOR];
 
123
 };
 
124
 
 
125
struct common
 
126
 {
 
127
 char dum[prot_size];
 
128
 struct own_cut *c_odrans;
 
129
 INT  c_pa8;
 
130
 INT  c_path_lth;
 
131
 CHAR c_S_flag;         // flag of "S"-case
 
132
 INT  c_s_width,c_s_width_b,c_s_height;
 
133
 INT  c_t_width,c_t_width_b,c_t_height;
 
134
 MN   *c_t_comp_ptr;    // pointer to component header
 
135
 INT  c_t_left_shift;
 
136
 CHAR c_cut_flag;
 
137
 CHAR c_best_cut_point;
 
138
 lnhead *c_t_line_ptr;
 
139
 INT  c_max_line;
 
140
 BYTE *c_s_raster;
 
141
 struct less_vertex_elem c_less_vertices[MAX_LINES];
 
142
 struct short_line_header c_lines[MAX_LINES];
 
143
 BYTE c_path[MAX_LINES];
 
144
// char dum[prot_size];
 
145
 };
 
146
 
 
147
struct edik
 
148
 {
 
149
 INT  e_first_line;     // number of first (shortened) line in list
 
150
 INT  e_n_lines;
 
151
 INT  e_n_verts;
 
152
 struct short_line_header *e_fl_ptr, *e_sl_ptr;
 
153
 struct segment *e_segm_ptr;
 
154
 struct vertex_header *e_vert_ptr;
 
155
 CHAR e_meet_flag;
 
156
 CHAR e_wr_vertex_flag;
 
157
 struct vertex_header e_verts[MAX_LINES];
 
158
 CHAR e_adj_matrix[MAX_LINES][MAX_LINES];
 
159
 };
 
160
 
 
161
union Work
 
162
 {
 
163
 struct
 
164
  {
 
165
  BYTE w_rast[1024];
 
166
  BYTE a_sum[32];
 
167
  CHAR a_end[3][32], a_lth[3][32],
 
168
       a_dif0[32], a_dif1[32], a_dif2[32];
 
169
  CHAR a_roof[128];
 
170
  } ct;
 
171
 
 
172
 struct
 
173
  {
 
174
  struct common c;
 
175
  union
 
176
   {
 
177
   struct edik e;
 
178
   struct andrew a;
 
179
   } u;
 
180
  } cp;
 
181
 };
 
182
 
 
183
extern union Work string;
 
184
#define W string
 
185
 
 
186
// atlant's memory
 
187
#define cell_raster     W.ct.w_rast
 
188
//#define at_roof         W.ct.a_roof
 
189
//#define at_end          W.ct.a_end
 
190
//#define at_lth          W.ct.a_lth
 
191
//#define at_sum          W.ct.a_sum
 
192
//#define at_dif0         W.ct.a_dif0
 
193
//#define at_dif1         W.ct.a_dif1
 
194
//#define at_dif2         W.ct.a_dif2
 
195
 
 
196
// common (cutgraph & cutpoint)
 
197
#define Ed_lines        W.cp.c.c_lines
 
198
#define path            W.cp.c.c_path
 
199
#define odrans          W.cp.c.c_odrans
 
200
#define pa8             W.cp.c.c_pa8
 
201
#define path_lth        W.cp.c.c_path_lth
 
202
#define S_flag          W.cp.c.c_S_flag
 
203
#define less_vertices   W.cp.c.c_less_vertices
 
204
#define t_width         W.cp.c.c_t_width
 
205
#define s_width         W.cp.c.c_s_width
 
206
#define s_width_b       W.cp.c.c_s_width_b
 
207
#define s_height        W.cp.c.c_s_height
 
208
#define t_width_b       W.cp.c.c_t_width_b
 
209
#define t_height        W.cp.c.c_t_height
 
210
#define cut_flag        W.cp.c.c_cut_flag
 
211
#define best_cut_point  W.cp.c.c_best_cut_point
 
212
#define s_raster        W.cp.c.c_s_raster
 
213
#define t_line_ptr      W.cp.c.c_t_line_ptr
 
214
#define max_line        W.cp.c.c_max_line
 
215
#define t_comp_ptr      W.cp.c.c_t_comp_ptr
 
216
#define t_left_shift    W.cp.c.c_t_left_shift
 
217
 
 
218
// cutpoint
 
219
#define bodies          W.cp.u.a.a_bodies
 
220
#define footes          W.cp.u.a.a_footes
 
221
#define heades          W.cp.u.a.a_heades
 
222
#define linums          W.cp.u.a.a_linums
 
223
#define linumsx         W.cp.u.a.a_linumsx
 
224
#define Totalth         W.cp.u.a.a_Totalth
 
225
#define Exbody          W.cp.u.a.a_Exbody
 
226
#define Exfoot          W.cp.u.a.a_Exfoot
 
227
#define Exhead          W.cp.u.a.a_Exhead
 
228
#define bestc           W.cp.u.a.a_bestc
 
229
#define best            W.cp.u.a.a_best
 
230
#define bestx           W.cp.u.a.a_bestx
 
231
#define bestxr          W.cp.u.a.a_bestxr
 
232
#define bestxh          W.cp.u.a.a_bestxh
 
233
#define bestv           W.cp.u.a.a_bestv
 
234
#define bestvx          W.cp.u.a.a_bestvx
 
235
#define bestvc          W.cp.u.a.a_bestvc
 
236
#define Exbn            W.cp.u.a.a_Exbn
 
237
#define Exfn            W.cp.u.a.a_Exfn
 
238
#define Exhn            W.cp.u.a.a_Exhn
 
239
#define Extrem          W.cp.u.a.a_Extrem
 
240
#define ExtreM          W.cp.u.a.a_ExtreM
 
241
#define points          W.cp.u.a.a_points
 
242
#define ExbM            W.cp.u.a.a_ExbM
 
243
#define Exbm            W.cp.u.a.a_Exbm
 
244
#define ExfM            W.cp.u.a.a_ExfM
 
245
#define Exfm            W.cp.u.a.a_Exfm
 
246
#define ExhM            W.cp.u.a.a_ExhM
 
247
#define Exhm            W.cp.u.a.a_Exhm
 
248
#define Lbnd            W.cp.u.a.a_Lbnd
 
249
#define lbnd            W.cp.u.a.a_lbnd
 
250
#define Rbnd            W.cp.u.a.a_Rbnd
 
251
#define rbnd            W.cp.u.a.a_rbnd
 
252
#define extrp           W.cp.u.a.a_extrp
 
253
#define extrc           W.cp.u.a.a_extrc
 
254
#define extrn           W.cp.u.a.a_extrn
 
255
#define Startp          W.cp.u.a.a_Startp
 
256
#define Endp            W.cp.u.a.a_Endp
 
257
#define botflag         W.cp.u.a.a_botflag
 
258
#define nmax1           W.cp.u.a.a_nmax1
 
259
#define nmax2           W.cp.u.a.a_nmax2
 
260
#define bsnx            W.cp.u.a.a_bsnx
 
261
#define FlM             W.cp.u.a.a_FlM
 
262
#define Axhead          W.cp.u.a.a_Axhead
 
263
#define Axfoot          W.cp.u.a.a_Axfoot
 
264
#define Eahn            W.cp.u.a.a_Eahn
 
265
#define Eafn            W.cp.u.a.a_Eafn
 
266
#define lastmax         W.cp.u.a.a_lastmax
 
267
#define NBmax           W.cp.u.a.a_NBmax
 
268
#define Nmb             W.cp.u.a.a_Nmb
 
269
#define Exbx            W.cp.u.a.a_Exbx
 
270
#define Extrex          W.cp.u.a.a_Extrex
 
271
#define ExtreX          W.cp.u.a.a_ExtreX
 
272
#define lwpnt           W.cp.u.a.a_lwpnt
 
273
#define rwpnt           W.cp.u.a.a_rwpnt
 
274
 
 
275
// cutgraph
 
276
#define verts           W.cp.u.e.e_verts
 
277
#define adj_matrix      W.cp.u.e.e_adj_matrix
 
278
#define first_line      W.cp.u.e.e_first_line
 
279
#define n_lines         W.cp.u.e.e_n_lines
 
280
#define n_verts         W.cp.u.e.e_n_verts
 
281
#define fl_ptr          W.cp.u.e.e_fl_ptr
 
282
#define sl_ptr          W.cp.u.e.e_sl_ptr
 
283
#define segm_ptr        W.cp.u.e.e_segm_ptr
 
284
#define vert_ptr        W.cp.u.e.e_vert_ptr
 
285
#define meet_flag       W.cp.u.e.e_meet_flag
 
286
#define wr_vertex_flag  W.cp.u.e.e_wr_vertex_flag
 
287
 
 
288
#define prot_dum        W.cp.c.dum
 
289
 
 
290
static union Work *Z;
 
291