~ubuntu-branches/ubuntu/trusty/cuneiform/trusty

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/h/recdefs.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:
83
83
 
84
84
typedef struct tagRecRaster
85
85
   {
86
 
      Int32    lnPixWidth;
87
 
      Int32    lnPixHeight;
88
 
      Int32    lnRasterBufSize;                         // maximum of raster length
89
 
      Word8    Raster[REC_MAX_RASTER_SIZE];     // image
 
86
      int32_t    lnPixWidth;
 
87
      int32_t    lnPixHeight;
 
88
      int32_t    lnRasterBufSize;                               // maximum of raster length
 
89
      uchar    Raster[REC_MAX_RASTER_SIZE];     // image
90
90
   }  RecRaster;
91
91
 
92
92
typedef struct tagRecRasterEx
93
93
   {
94
 
      Int32    lnPixWidth;
95
 
      Int32    lnPixHeight;
96
 
      Int32    lnRasterBufSize;                         // maximum of raster length
97
 
      Int32    lnLevelGray;
98
 
      Word8    Raster[REC_MAX_RASTER_SIZE_EX];  // image
 
94
      int32_t    lnPixWidth;
 
95
      int32_t    lnPixHeight;
 
96
      int32_t    lnRasterBufSize;                               // maximum of raster length
 
97
      int32_t    lnLevelGray;
 
98
      uchar    Raster[REC_MAX_RASTER_SIZE_EX];  // image
99
99
   }  RecRasterEx;
100
100
/////////////////////////////////////////////////////////
101
101
// RecBmp - .............................................
104
104
typedef struct tagRecBmp
105
105
   {
106
106
      Rect16         Region;
107
 
      Word8  *   pBits;
108
 
      Int32          nOffsetX;   //this is offset of Region.left-bit
 
107
      uchar  *   pBits;
 
108
      int32_t          nOffsetX;   //this is offset of Region.left-bit
109
109
                                 //relatively 0-bit 0-byte of pBits
110
 
      Int32          nByteWidth;
111
 
      Int32          nResolutionX;
112
 
      Int32          nResolutionY;
 
110
      int32_t          nByteWidth;
 
111
      int32_t          nResolutionX;
 
112
      int32_t          nResolutionY;
113
113
      char           reserved[16];  // zero filled reserve
114
114
   }  RecBmp;
115
115
 
116
116
 
117
117
typedef struct tagRecAlt
118
118
   {
119
 
      Word8    Code;
120
 
      Word8    CodeExt;        // for unicode
121
 
      Word8    Method;         // recognize method
122
 
      Word8    Prob;
123
 
      Word16   Info;
 
119
      uchar    Code;
 
120
      uchar    CodeExt;        // for unicode
 
121
      uchar    Method;         // recognize method
 
122
      uchar    Prob;
 
123
      uint16_t   Info;
124
124
   }  RecAlt;
125
125
typedef struct tagUniAlt
126
126
   {
127
 
      Word8    Code[4];
128
 
      Word8    Liga;        // for unicode
129
 
      Word8    Method;         // recognize method
130
 
      Word8    Prob;
131
 
      Word8    Charset;
132
 
      Word16   Info;
 
127
      uchar    Code[4];
 
128
      uchar    Liga;        // for unicode
 
129
      uchar    Method;         // recognize method
 
130
      uchar    Prob;
 
131
      uchar    Charset;
 
132
      uint16_t   Info;
133
133
   }  UniAlt;
134
134
 
135
135
typedef struct tagClustAlt
136
136
   {
137
 
      Int16    nClust;         // cluster index; zero - structure is not initiated
138
 
      Word8    nDist;          // distance
139
 
      Word8    nReserved;
 
137
      int16_t    nClust;         // cluster index; zero - structure is not initiated
 
138
      uchar    nDist;          // distance
 
139
      uchar    nReserved;
140
140
   }  ClustAlt;
141
141
 
142
142
typedef struct tagRecVersions
143
143
        {
144
 
        Int32  lnAltCnt;           // count of alternates
145
 
        Int32  lnAltMax;                   // maximum of alternates
 
144
        int32_t  lnAltCnt;           // count of alternates
 
145
        int32_t  lnAltMax;                 // maximum of alternates
146
146
        RecAlt Alt[REC_MAX_VERS];  // alternates array
147
147
        } RecVersions;
148
148
typedef struct tagUniVersions
149
149
        {
150
 
        Int32  lnAltCnt;           // count of alternates
151
 
        Int32  lnAltMax;                   // maximum of alternates
 
150
        int32_t  lnAltCnt;           // count of alternates
 
151
        int32_t  lnAltMax;                 // maximum of alternates
152
152
        UniAlt Alt[REC_MAX_VERS];  // alternates array
153
153
        } UniVersions;
154
154
 
155
155
typedef struct tagRecVector {
156
156
Point16 beg,end;
157
 
Int32 incline;   // 2048 * tangens
 
157
int32_t incline;   // 2048 * tangens
158
158
#define INCLINE_UNKNOWN (-0x41414141)     ///         _______
159
 
Int32  len;  // -1 - It isn't vector;  metric Eucleede � x� + y�
160
 
Int32 Mx,My;
161
 
Int32 Cx,Cy;  // debug purposes
162
 
Int32 area;
163
 
Word8 Mn; // normalized moment
164
 
Word8 reserve[3];
 
159
int32_t  len;  // -1 - It isn't vector;  metric Eucleede ы xэ + yэ
 
160
int32_t Mx,My;
 
161
int32_t Cx,Cy;  // debug purposes
 
162
int32_t area;
 
163
uchar Mn; // normalized moment
 
164
uchar reserve[3];
165
165
#define MAX_VECT        64
166
166
#define NORMA_FACTOR    12
167
167
}  RecVector;
168
168
 
169
169
typedef struct tagRecData
170
170
        {
171
 
        Word32    lwStatus;
 
171
        uint32_t    lwStatus;
172
172
 
173
173
        RecRaster recRaster;       // basic raster. Can be not changed
174
 
        Word16    v3x5[16];        // normalizeted image 3x5
175
 
        Word32    lwCompCnt;       // number of components, 0 - not counted
 
174
        uint16_t    v3x5[16];        // normalizeted image 3x5
 
175
        uint32_t    lwCompCnt;       // number of components, 0 - not counted
176
176
        Rect16    rect;
177
177
  RecVector    vSticks[MAX_VECT];
178
 
  Int16     lwSticksCnt;
 
178
  int16_t     lwSticksCnt;
179
179
        } RecData;
180
180
 
181
181
typedef struct tagRecObject
182
182
        {
183
183
        RecData     recData;
184
184
        RecVersions recResults;
185
 
        Word32      lwStatusMethods; // indicator of used methods
 
185
        uint32_t      lwStatusMethods; // indicator of used methods
186
186
 
187
187
 
188
188
        } RecObject;