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

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/h/cttypes.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:
1
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
 
*/
 
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
56
 
57
57
#ifndef __CTTYPES_H
58
58
#define __CTTYPES_H
59
59
 
60
60
#ifdef _MSC_VER
61
 
 
62
61
/*
63
62
MSVC does not come with stdint.h, even though it was standardized
64
63
way back in 1999. But what would you expect from the company that brought
82
81
#include <stdint.h>
83
82
#endif
84
83
 
85
 
#if _MSC_VER > 1000
86
 
   #pragma once
87
 
#endif // _MSC_VER > 1000
 
84
#ifdef WIN32
 
85
#include<windows.h>
 
86
#endif
88
87
 
89
88
/*** _SETTYPES() ***/
90
 
   #undef _SETTYPES
91
 
   #if defined( __cplusplus )
92
 
      #define _SETTYPES( name )                       \
93
 
         typedef const name         C##name;         \
94
 
         typedef name            *  P##name;         \
95
 
         typedef const name      *  PC##name;        \
96
 
         typedef name            &  R##name;         \
97
 
         typedef const name      &  RC##name;
 
89
#undef _SETTYPES
 
90
#if defined( __cplusplus )
 
91
#define _SETTYPES( name )                       \
 
92
typedef const name         C##name;         \
 
93
        typedef name            *  P##name;         \
 
94
        typedef const name      *  PC##name;        \
 
95
        typedef name            &  R##name;         \
 
96
        typedef const name      &  RC##name;
98
97
 
99
 
      #define _SETCLASS( cls )       \
100
 
         class cls;                 \
101
 
         _SETTYPES( cls )
102
 
   #else   /* not __cplusplus */
103
 
      #define _SETTYPES( name )                        \
104
 
         typedef const name         C##name;           \
105
 
         typedef name            *  P##name;           \
106
 
         typedef const name      *  PC##name;
107
 
   #endif
 
98
#define _SETCLASS( cls )       \
 
99
class cls;                 \
 
100
        _SETTYPES( cls )
 
101
#else   /* not __cplusplus */
 
102
#define _SETTYPES( name )                        \
 
103
        typedef const name         C##name;           \
 
104
        typedef name            *  P##name;           \
 
105
        typedef const name      *  PC##name;
 
106
#endif
108
107
 
109
108
/*** Base types ***/
110
 
   typedef unsigned int           Indx   ;   _SETTYPES( Indx   )
111
 
   typedef int32_t                Int32  ;   _SETTYPES( Int32  )
112
 
   typedef uint32_t               Word32 ;   _SETTYPES( Word32 )
113
 
   typedef int16_t                Int16  ;   _SETTYPES( Int16  )
114
 
   typedef uint16_t               Word16 ;   _SETTYPES( Word16 )
115
 
   typedef char                   Int8   ;   _SETTYPES( Int8   )
116
 
   typedef unsigned char          Word8  ;   _SETTYPES( Word8  )
117
 
   typedef float                  Float32;   _SETTYPES( Float32 )
118
 
   typedef double                 Float64;   _SETTYPES( Float64 )
119
 
   typedef long double            Float80;   _SETTYPES( Float80 )
120
 
   typedef int                    Bool   ;   _SETTYPES( Bool   )
121
 
   typedef int16_t                Bool16 ;   _SETTYPES( Bool16 )
122
 
   typedef int32_t                Bool32 ;   _SETTYPES( Bool32 )
123
 
 
124
 
   #ifndef   FALSE
125
 
      #define FALSE               0
126
 
   #endif
127
 
   #ifndef   TRUE
128
 
      #define TRUE                1
129
 
   #endif
130
 
 
131
 
#pragma pack(4)
 
109
typedef int Bool;
 
110
typedef int16_t Bool16;
 
111
typedef int32_t Bool32;_SETTYPES( Bool32 )
 
112
 
 
113
typedef unsigned long ulong;
 
114
typedef unsigned int uint;
 
115
typedef unsigned char uchar;
 
116
 
 
117
typedef Bool * pBool;
 
118
typedef char * pchar;
 
119
typedef unsigned char * puchar;
 
120
typedef void * pvoid;
 
121
typedef int16_t * pint16_t;
 
122
 
 
123
typedef void * Handle;
 
124
 
 
125
#ifndef   FALSE
 
126
#define FALSE               0
 
127
#endif
 
128
#ifndef   TRUE
 
129
#define TRUE                1
 
130
#endif
 
131
 
132
132
/*** Derived types ***/
133
 
   typedef struct tagPoint16 { Int16 x,y; } Point16; _SETTYPES( Point16 )
134
 
   typedef struct tagPoint32 { Int32 x,y; } Point32; _SETTYPES( Point32 )
135
 
   typedef struct tagRect16 { Int16 left,top,right,bottom; } Rect16; _SETTYPES( Rect16 )
136
 
   typedef struct tagRect32 { Int32 left,top,right,bottom; } Rect32; _SETTYPES( Rect32 )
137
 
#pragma pack()
138
 
   //////////////////////////////
139
 
   // some of generic callbacks:
140
 
typedef void   (* FTVoid   )  ( void );
141
 
typedef void*  (* FTPVoid  )  ( void );
142
 
typedef Bool   (* FTBool   )  ( void );
143
 
typedef Bool16 (* FTBool16 )  ( void );
144
 
typedef Bool32 (* FTBool32 )  ( void );
145
 
 
146
 
typedef void   (* FTVoid_PVoid   )  ( void* );
147
 
typedef void*  (* FTPVoid_PVoid  )  ( void* );
148
 
typedef Bool   (* FTBool_PVoid   )  ( void* );
149
 
typedef Bool16 (* FTBool16_PVoid )  ( void* );
150
 
typedef Bool32 (* FTBool32_PVoid )  ( void* );
151
 
 
152
 
typedef void   (* FTVoid_Word32   )  ( Word32 );
153
 
typedef void*  (* FTPVoid_Word32  )  ( Word32 );
154
 
typedef Bool   (* FTBool_Word32   )  ( Word32 );
155
 
typedef Bool16 (* FTBool16_Word32 )  ( Word32 );
156
 
typedef Bool32 (* FTBool32_Word32 )  ( Word32 );
 
133
typedef struct tagPoint16 {
 
134
        int16_t x, y;
 
135
} Point16;
 
136
_SETTYPES( Point16 )
 
137
typedef struct tagPoint32 {
 
138
        int32_t x, y;
 
139
} Point32;
 
140
_SETTYPES( Point32 )
 
141
typedef struct tagRect16 {
 
142
        int16_t left, top, right, bottom;
 
143
} Rect16;
 
144
_SETTYPES( Rect16 )
 
145
typedef struct tagRect32 {
 
146
        int32_t left, top, right, bottom;
 
147
} Rect32;
 
148
_SETTYPES( Rect32 )
 
149
//////////////////////////////
 
150
// some of generic callbacks:
 
151
typedef void (* FTVoid)(void);
 
152
typedef void* (* FTPVoid)(void);
 
153
typedef Bool (* FTBool)(void);
 
154
typedef Bool16 (* FTBool16)(void);
 
155
typedef Bool32 (* FTBool32)(void);
 
156
 
 
157
typedef void (* FTVoid_PVoid)(void*);
 
158
typedef void* (* FTPVoid_PVoid)(void*);
 
159
typedef Bool (* FTBool_PVoid)(void*);
 
160
typedef Bool16 (* FTBool16_PVoid)(void*);
 
161
typedef Bool32 (* FTBool32_PVoid)(void*);
 
162
 
 
163
typedef void (* FTVoid_Word32)(uint32_t);
 
164
typedef void* (* FTPVoid_Word32)(uint32_t);
 
165
typedef Bool (* FTBool_Word32)(uint32_t);
 
166
typedef Bool16 (* FTBool16_Word32)(uint32_t);
 
167
typedef Bool32 (* FTBool32_Word32)(uint32_t);
157
168
 
158
169
#ifdef __cplusplus
159
 
extern "C"
160
 
{
161
 
   typedef void   (* CFTVoid   )  ( void );
162
 
   typedef void*  (* CFTPVoid  )  ( void );
163
 
   typedef Bool   (* CFTBool   )  ( void );
164
 
   typedef Bool16 (* CFTBool16 )  ( void );
165
 
   typedef Bool32 (* CFTBool32 )  ( void );
166
 
 
167
 
   typedef void   (* CFTVoid_PVoid   )  ( void* );
168
 
   typedef void*  (* CFTPVoid_PVoid  )  ( void* );
169
 
   typedef Bool   (* CFTBool_PVoid   )  ( void* );
170
 
   typedef Bool16 (* CFTBool16_PVoid )  ( void* );
171
 
   typedef Bool32 (* CFTBool32_PVoid )  ( void* );
172
 
 
173
 
   typedef void   (* CFTVoid_Word32   )  ( Word32 );
174
 
   typedef void*  (* CFTPVoid_Word32  )  ( Word32 );
175
 
   typedef Bool   (* CFTBool_Word32   )  ( Word32 );
176
 
   typedef Bool16 (* CFTBool16_Word32 )  ( Word32 );
177
 
   typedef Bool32 (* CFTBool32_Word32 )  ( Word32 );
 
170
extern "C" {
 
171
typedef void (* CFTVoid)(void);
 
172
typedef void* (* CFTPVoid)(void);
 
173
typedef Bool (* CFTBool)(void);
 
174
typedef Bool16 (* CFTBool16)(void);
 
175
typedef Bool32 (* CFTBool32)(void);
 
176
 
 
177
typedef void (* CFTVoid_PVoid)(void*);
 
178
typedef void* (* CFTPVoid_PVoid)(void*);
 
179
typedef Bool (* CFTBool_PVoid)(void*);
 
180
typedef Bool16 (* CFTBool16_PVoid)(void*);
 
181
typedef Bool32 (* CFTBool32_PVoid)(void*);
 
182
 
 
183
typedef void (* CFTVoid_Word32)(uint32_t);
 
184
typedef void* (* CFTPVoid_Word32)(uint32_t);
 
185
typedef Bool (* CFTBool_Word32)(uint32_t);
 
186
typedef Bool16 (* CFTBool16_Word32)(uint32_t);
 
187
typedef Bool32 (* CFTBool32_Word32)(uint32_t);
178
188
}
179
189
#endif   // __cplusplus
180
190
 
181
 
/* These definitions were originally scattered about the code tree.
 
191
/*
 
192
 * These definitions were originally scattered about the code tree.
182
193
 * Consolidating them all here.
183
194
 */
184
195
 
185
 
#ifdef WIN32
186
 
 
187
 
#include <windows.h>
188
 
 
189
 
#else
190
 
 
191
 
/* These elements are defined in Windows headers. */
192
 
 
193
 
typedef int32_t  LONG;
194
 
typedef uint32_t DWORD;
195
 
 
196
 
typedef uint16_t  WORD;
197
 
typedef uint32_t UINT;
198
 
 
 
196
#ifndef WIN32
199
197
typedef char* LPSTR;
200
198
typedef char* LPTSTR;
201
199
typedef const char* LPCSTR;
202
200
typedef const char* LPCWSTR;
203
201
typedef const char* LPCTSTR;
204
 
 
 
202
typedef uint32_t * PDWORD;
 
203
typedef uint32_t * LPDWORD;
 
204
typedef uchar* LPBYTE;
 
205
typedef int32_t * PLONG;
 
206
typedef uint16_t * PWORD;
 
207
typedef Bool* LPBOOL;
 
208
typedef int32_t* LPLONG;
205
209
#endif
206
210
 
207
 
typedef int BOOL;
208
 
 
209
 
typedef char CHAR;
210
 
typedef char * PCHAR;
211
 
 
212
 
typedef unsigned char   BYTE;
213
 
typedef unsigned char * PBYTE;
214
 
 
215
 
typedef int16_t  SINT;
216
 
 
217
 
typedef LONG  * PLONG;
218
 
typedef DWORD * PDWORD;
219
 
 
220
 
typedef int16_t _INT;
221
 
typedef int16_t * _PINT;
222
 
#define INT  _INT
223
 
#define PINT _PINT
224
 
typedef WORD * PWORD;
225
 
 
226
 
typedef BYTE* LPBYTE;
227
 
typedef DWORD * LPDWORD;
228
 
typedef BOOL* LPBOOL;
229
 
typedef LONG* LPLONG;
230
 
typedef void* LPVOID;
231
 
 
232
 
#define PSTR  PCHAR
233
 
 
234
 
typedef unsigned long ULONG;
235
 
 
236
 
#include "cttypext.h"
237
211
 
238
212
#endif   // __CTTYPES_H
239
 
 
240
 
//////////////////////////////////////////////////////////////////////////////////////////////////////////
241
 
// end of file