~ubuntu-branches/debian/experimental/cuneiform/experimental

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/rpic/sources/debug.cpp

  • 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
# include "iolib.h"
 
58
//# include "layout.h"
 
59
//# include "extract.h"
 
60
//# include "kernel.h"
 
61
//# include "status.h"
 
62
 
 
63
# include "dpuma.h"
 
64
# include "debug.h"
 
65
//# include "pumadef.h"
 
66
 
 
67
//////////////////////////////////
 
68
Handle hDebugPictures = NULL;
 
69
Handle hRectanglePictures = NULL;
 
70
Handle hPolyPictures = NULL;
 
71
Handle hShowFirstAttempt = NULL;
 
72
Handle hShowAllGreat = NULL;
 
73
Handle hShowAllCancelledGreat = NULL;
 
74
Handle hShowCheckLetters = NULL;
 
75
Handle hShowBigLetters = NULL;
 
76
Handle hShowPossiblePics = NULL;
 
77
//Handle hDebugStrings = NULL;
 
78
//////////////////////////////////
 
79
void InitDebug()
 
80
{
 
81
        //layout = 0;
 
82
 
 
83
        LDPUMA_Registry(&hDebugPictures,"��������� ��������...",NULL);
 
84
    //LDPUMA_RegVariable(hDebugLayout,"���������� ������� �������.",&layout,"unsigned char");
 
85
        LDPUMA_RegistryHelp(hDebugPictures,"������ ��������� ��������",FALSE);
 
86
 
 
87
    LDPUMA_Registry(&hShowPossiblePics,"�������� ����������� �������� 1",hDebugPictures);
 
88
        LDPUMA_RegistryHelp(hShowPossiblePics,"���������� ����������� ��������, ���������� \
 
89
����� ������� �������.",FALSE);
 
90
 
 
91
        LDPUMA_Registry(&hShowBigLetters,"�������� �������",hDebugPictures);
 
92
        LDPUMA_RegistryHelp(hShowBigLetters,"���������� �������.",FALSE);
 
93
 
 
94
 
 
95
        LDPUMA_Registry(&hRectanglePictures,"�������� ����� ������������� ��������",hDebugPictures);
 
96
        LDPUMA_RegistryHelp(hRectanglePictures,"�������� ����� ������������� �������� \
 
97
(��������������� ������ ��������).",FALSE);
 
98
 
 
99
        LDPUMA_Registry(&hPolyPictures,"�������� ����� ��������������� ��������",hDebugPictures);
 
100
        LDPUMA_RegistryHelp(hPolyPictures,"�������� ����� ��������������� ��������. \
 
101
(������������� ������ ��������).",FALSE);
 
102
 
 
103
        LDPUMA_Registry(&hShowAllGreat,"�������� ��� ������ ���������� 1",hDebugPictures);
 
104
        LDPUMA_RegistryHelp(hShowAllGreat,"���������� ��� ������ ����������, \
 
105
�� ������� �� ������ ������� ����� ���������� ��������.",FALSE);
 
106
 
 
107
        LDPUMA_Registry(&hShowAllCancelledGreat,"�������� ��� ������������� ������ ���������� 1",hDebugPictures);
 
108
        LDPUMA_RegistryHelp(hShowAllCancelledGreat,"���������� ��� ������������� ������ ����������, \
 
109
�� ������� �� ������ ������� ����� ���������� ��������.",FALSE);
 
110
 
 
111
        LDPUMA_Registry(&hShowCheckLetters,"�������� �������� �� ��������� 1",hDebugPictures);
 
112
        LDPUMA_RegistryHelp(hShowCheckLetters,"���������� ������� �������� �� ���������",FALSE);
 
113
 
 
114
        LDPUMA_Registry(&hShowFirstAttempt,"�������� �������� 1",hDebugPictures);
 
115
        LDPUMA_RegistryHelp(hShowFirstAttempt,"���������� ��������, ���������� \
 
116
����� ������� �������.",FALSE);
 
117
 
 
118
        /*
 
119
#define REGVAR(a)       LDPUMA_RegVariable(hDebugLayout,#a,&a,"short int")
 
120
 
 
121
# ifdef LT_DEBUG
 
122
    LDPUMA_RegVariable(hDebugLayout,"LT_DebugGraphicsLevel",&LT_DebugGraphicsLevel,"int");
 
123
 
 
124
        REGVAR(bDebugTimeFlag);
 
125
        REGVAR(bDebugOptionCalibratePictureRemovingCriteria);
 
126
        REGVAR(bDebugOptionCalibrateDD_RemovingCriteria);
 
127
        REGVAR(bDebugOptionCalibrateLinearRemovingCriteria);
 
128
# endif
 
129
        REGVAR(bOptionForceOneColumn);
 
130
        REGVAR(bOptionBusinessCardsLayout);
 
131
        REGVAR(bOptionPointSizeAnalysis);
 
132
        REGVAR(bOptionSmartBreaking);
 
133
        REGVAR(bOptionInitialBreakingByPageMatrix);
 
134
        REGVAR(bOptionBlocksRemovingByPageMatrix);
 
135
        REGVAR(bOptionBlocksRemovingByDustDistribution);
 
136
        REGVAR(bOptionSpecialHorizontalCutting);
 
137
        REGVAR(bOptionWhiteStripsBreaking);
 
138
# ifdef SE_DEBUG
 
139
    REGVAR(SE_DebugGraphicsLevel);
 
140
# endif
 
141
# ifdef MA_DEBUG
 
142
    REGVAR(MA_DebugLevel);
 
143
# endif
 
144
 
 
145
#undef REGVAR
 
146
  */
 
147
 
 
148
}
 
149
/////////////////////////////////////////
 
150
void DoneDebug()
 
151
{
 
152
        /*
 
153
#define UNREGVAR(a)     LDPUMA_UnregVariable(&a)
 
154
 
 
155
# ifdef LT_DEBUG
 
156
    LDPUMA_UnregVariable(&LT_DebugGraphicsLevel);
 
157
 
 
158
        UNREGVAR(bDebugTimeFlag);
 
159
        UNREGVAR(bDebugOptionCalibratePictureRemovingCriteria);
 
160
        UNREGVAR(bDebugOptionCalibrateDD_RemovingCriteria);
 
161
        UNREGVAR(bDebugOptionCalibrateLinearRemovingCriteria);
 
162
# endif
 
163
        UNREGVAR(bOptionForceOneColumn);
 
164
        UNREGVAR(bOptionBusinessCardsLayout);
 
165
        UNREGVAR(bOptionPointSizeAnalysis);
 
166
        UNREGVAR(bOptionSmartBreaking);
 
167
        UNREGVAR(bOptionInitialBreakingByPageMatrix);
 
168
        UNREGVAR(bOptionBlocksRemovingByPageMatrix);
 
169
        UNREGVAR(bOptionBlocksRemovingByDustDistribution);
 
170
        UNREGVAR(bOptionSpecialHorizontalCutting);
 
171
        UNREGVAR(bOptionWhiteStripsBreaking);
 
172
# ifdef SE_DEBUG
 
173
    UNREGVAR(SE_DebugGraphicsLevel);
 
174
# endif
 
175
# ifdef MA_DEBUG
 
176
    UNREGVAR(MA_DebugLevel);
 
177
# endif
 
178
 
 
179
#undef UNREGVAR
 
180
  */
 
181
}
 
182
////////////////////////////////////////