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

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hhh/cfio.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:
99
99
///////////////////////////////////////////////////////////////////////////////////////////////
100
100
//#ifndef Handle
101
101
        //#define Handle void *
102
 
//      typedef void *Handle, **PHandle;
 
102
//      typedef void *Handle, **Handle*;
103
103
//#endif
104
104
 
105
 
#ifndef LPVOID
106
 
    //#define LPVOID     void *
107
 
        typedef void   *PVOID, *LPVOID;
 
105
#ifndef pvoid
 
106
    //#define pvoid     void *
 
107
        typedef void   *pvoid, *pvoid;
108
108
#endif
109
109
///////////////////////////////////////////////////////////////////////////////////////////////
110
110
#define CFIO_MAX_PATH          256
111
111
#define CFIO_MAX_OWNER         16
112
112
#define CFIO_MAX_COMMENT       48
113
113
///////////////////////////////////////////////////////////////////////////////////////////////
114
 
CFIO_FUNC(Bool32) CFIO_Init(Word16 wHeightCode,Handle hStorage);
 
114
CFIO_FUNC(Bool32) CFIO_Init(uint16_t wHeightCode,Handle hStorage);
115
115
CFIO_FUNC(Bool32) CFIO_Done();
116
 
CFIO_FUNC(Word32) CFIO_GetReturnCode();
117
 
CFIO_FUNC(Int8 *) CFIO_GetReturnString(Word32 dwError);
118
 
CFIO_FUNC(Bool32) CFIO_GetExportData(Word32 dwType, void * pData);
119
 
CFIO_FUNC(Bool32) CFIO_SetImportData(Word32 dwType, void * pData);
 
116
CFIO_FUNC(uint32_t) CFIO_GetReturnCode();
 
117
CFIO_FUNC(char *) CFIO_GetReturnString(uint32_t dwError);
 
118
CFIO_FUNC(Bool32) CFIO_GetExportData(uint32_t dwType, void * pData);
 
119
CFIO_FUNC(Bool32) CFIO_SetImportData(uint32_t dwType, void * pData);
120
120
///////////////////////////////////////////////////////////////////////////////////////////////
121
121
enum Parameters
122
122
{
162
162
//Open storage
163
163
#define   OS_CREATE               0x01
164
164
#define   OS_OPEN                 0x02
165
 
//typedef   Handle (*FNOpenStorage)(char *, Word32);
 
165
//typedef   Handle (*FNOpenStorage)(char *, uint32_t);
166
166
//Handle    OpenStorage            (char * lpName,
167
 
//                                                                Word32 dwTypes);
168
 
DEC_FUN(Handle, OpenStorage, (PInt8, Word32) );
 
167
//                                                                uint32_t dwTypes);
 
168
DEC_FUN(Handle, OpenStorage, (pchar, uint32_t) );
169
169
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
170
170
//Close Storage
171
171
#define   CS_WITHOUT_SAVE         0x01                                 // Only close
174
174
#define   CS_SAVE                 0x08                                 // Save storage at current state
175
175
#define   CS_FILE_SAVE            0x10                                 // Save all attached files
176
176
#define   CS_ALL                  0x20                                 // Close all open storages
177
 
//typedef   Bool32 (*FNCloseStorage)(Handle, Word32);
 
177
//typedef   Bool32 (*FNCloseStorage)(Handle, uint32_t);
178
178
//Bool32    CloseStorage            (Handle  hStorage,
179
 
//                                                                 Word32  dwFlag);
180
 
DEC_FUN(Bool32, CloseStorage, (Handle, Word32));
 
179
//                                                                 uint32_t  dwFlag);
 
180
DEC_FUN(Bool32, CloseStorage, (Handle, uint32_t));
181
181
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
182
182
//Delete storage from disk (don't need to be opened)
183
183
//typedef   Bool32 (*FNDeleteStorage)(char *);
184
184
//Bool32    DeleteStorage            (char * lpName);
185
 
DEC_FUN(Bool32, DeleteStorage, (PInt8));
 
185
DEC_FUN(Bool32, DeleteStorage, (pchar));
186
186
////////////////////////////////////////////////////////////////////////////////////////////////////////Files
187
187
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
188
188
//Write file to storage
189
 
//typedef   Word32 (*FNWriteFileToStorage)(Handle , Handle, char * );
190
 
//Word32    WriteFileToStorage            (Handle hStorage,
 
189
//typedef   uint32_t (*FNWriteFileToStorage)(Handle , Handle, char * );
 
190
//uint32_t    WriteFileToStorage            (Handle hStorage,
191
191
//                                                                               Handle hFile,
192
192
//                                                                               char * lpName);
193
 
DEC_FUN(Word32, WriteFileToStorage, (Handle , Handle, PInt8 ));
 
193
DEC_FUN(uint32_t, WriteFileToStorage, (Handle , Handle, pchar ));
194
194
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
195
195
//Read file from storage
196
196
//typedef   Handle (*FNReadFileFromStorage)(Handle , char * );
197
197
//Handle    ReadFileFromStorage            (Handle hStorage,
198
198
//                                                                                char * lpName);
199
 
DEC_FUN(Handle, ReadFileFromStorage, (Handle , PInt8 ));
 
199
DEC_FUN(Handle, ReadFileFromStorage, (Handle , pchar ));
200
200
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
201
201
//Open file
202
202
#define   OSF_CREATE               0x01
206
206
#define   OSF_BINARY               0x10
207
207
#define   OSF_IN_MEMORY            0x20
208
208
#define   OSF_TEMPORARY            0x40
209
 
//typedef   Handle (*FNOpen)(Handle, char *, Word32);
 
209
//typedef   Handle (*FNOpen)(Handle, char *, uint32_t);
210
210
//Handle    OpenFreeFile    (Handle hFile,
211
211
//                                                 char * lpName,
212
 
//                                                 Word32 dwFlag);
213
 
DEC_FUN(Handle, OpenFreeFile, (Handle, PInt8, Word32));
 
212
//                                                 uint32_t dwFlag);
 
213
DEC_FUN(Handle, OpenFreeFile, (Handle, pchar, uint32_t));
214
214
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
215
215
//Close file
216
216
#define   CSF_SAVEDISK             0x01
217
217
#define   CSF_SAVESTORAGE          0x02
218
218
#define   CSF_DELETE               0x04
219
219
#define   CSF_WRITE                0x08
220
 
//typedef   Bool32 (*FNClose)(Handle, Word32);
 
220
//typedef   Bool32 (*FNClose)(Handle, uint32_t);
221
221
//Bool32    CloseFreeFile    (Handle hFile,
222
 
//                                                      Word32 dwFlag);
223
 
DEC_FUN(Bool32, CloseFreeFile, (Handle, Word32));
 
222
//                                                      uint32_t dwFlag);
 
223
DEC_FUN(Bool32, CloseFreeFile, (Handle, uint32_t));
224
224
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
225
225
//Write data to file
226
 
//typedef   Word32 (*FNWrite)(Handle, char *, Word32);
227
 
//Word32    WriteToFile      (Handle hFile,
 
226
//typedef   uint32_t (*FNWrite)(Handle, char *, uint32_t);
 
227
//uint32_t    WriteToFile      (Handle hFile,
228
228
//                                                      char * lpData,
229
 
//                                                      Word32 dwSize);
230
 
DEC_FUN(Word32, WriteToFile, (Handle, PInt8, Word32));
 
229
//                                                      uint32_t dwSize);
 
230
DEC_FUN(uint32_t, WriteToFile, (Handle, pchar, uint32_t));
231
231
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
232
232
// Read data from file
233
 
//typedef   Word32 (*FNRead)(Handle, char *, Word32);
234
 
//Word32    ReadFromFile    (Handle hFile,
 
233
//typedef   uint32_t (*FNRead)(Handle, char *, uint32_t);
 
234
//uint32_t    ReadFromFile    (Handle hFile,
235
235
//                                                 char * lpData,
236
 
//                                                 Word32 dwSize);
237
 
DEC_FUN(Word32, ReadFromFile, (Handle, PInt8, Word32));
 
236
//                                                 uint32_t dwSize);
 
237
DEC_FUN(uint32_t, ReadFromFile, (Handle, pchar, uint32_t));
238
238
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
239
239
//Seek pointer
240
240
#define   FS_END                   0x01
241
241
#define   FS_BEGIN                 0x02
242
242
#define   FS_CUR                   0x04
243
 
//typedef   Word32 (*FNSeek)(Handle, Word32, Word32);
244
 
//Word32    SeekFilePointer (Handle hFile,
245
 
//                                                 Word32 dwBytes,
246
 
//                                                 Word32 dwFrom);
247
 
DEC_FUN(Word32, SeekFilePointer, (Handle, Word32, Word32));
 
243
//typedef   uint32_t (*FNSeek)(Handle, uint32_t, uint32_t);
 
244
//uint32_t    SeekFilePointer (Handle hFile,
 
245
//                                                 uint32_t dwBytes,
 
246
//                                                 uint32_t dwFrom);
 
247
DEC_FUN(uint32_t, SeekFilePointer, (Handle, uint32_t, uint32_t));
248
248
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
249
249
//Tell pointer
250
 
//typedef   Word32 (*FNTell)(Handle);
251
 
//Word32    TellFilePointer (Handle hFile);
252
 
DEC_FUN(Word32, TellFilePointer, (Handle));
 
250
//typedef   uint32_t (*FNTell)(Handle);
 
251
//uint32_t    TellFilePointer (Handle hFile);
 
252
DEC_FUN(uint32_t, TellFilePointer, (Handle));
253
253
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
254
254
//Flash data from buffer
255
255
//typedef   Bool32 (*FNFlush)(Handle);
274
274
#define   MAF_GALL_GMEM_SHARE        0x2000
275
275
#define   MAF_GALL_GMEM_ZEROINIT     0x4000
276
276
#define   MAF_GALL_GMEM_RESERVED     0x8000
277
 
//typedef   Handle (*FNAlloc)(Word32, Word32);
278
 
//Handle    AllocMemory      (Word32 dwSize,
279
 
//                                                      Word32 dwFlag);
280
 
DEC_FUN(Handle, AllocMemory, (Word32, Word32));
281
 
DEC_FUN(Handle, DAllocMemory, (Word32, Word32, Int8*, Int8*));
 
277
//typedef   Handle (*FNAlloc)(uint32_t, uint32_t);
 
278
//Handle    AllocMemory      (uint32_t dwSize,
 
279
//                                                      uint32_t dwFlag);
 
280
DEC_FUN(Handle, AllocMemory, (uint32_t, uint32_t));
 
281
DEC_FUN(Handle, DAllocMemory, (uint32_t, uint32_t, char*, char*));
282
282
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
283
283
// ReAlloc memory
284
284
#define   MRF_NEW_MEMORY                  0x0000
286
286
#define   MRF_GALL_GMEM_MOVEABLE          0x0002
287
287
#define   MRF_GALL_GMEM_NOCOMPACT         0x0004
288
288
#define   MRF_GALL_GMEM_ZEROINIT          0x0008
289
 
//typedef   Handle (*FNReAlloc)(Handle, Word32, Word32);
 
289
//typedef   Handle (*FNReAlloc)(Handle, uint32_t, uint32_t);
290
290
//Handle    ReAllocMemory      (Handle hMemory,
291
 
//                                                        Word32 dwSize,
292
 
//                                                        Word32 dwFlag);
293
 
DEC_FUN(Handle, ReAllocMemory, (Handle, Word32, Word32));
 
291
//                                                        uint32_t dwSize,
 
292
//                                                        uint32_t dwFlag);
 
293
DEC_FUN(Handle, ReAllocMemory, (Handle, uint32_t, uint32_t));
294
294
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
295
295
//Free memory
296
296
//typedef   Bool32 (*FNFree);
308
308
DEC_FUN(Bool32, UnlockMemory, (Handle));
309
309
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
310
310
// Write from memory to disk
311
 
//typedef   Word32 (*FNWriteMemToFile)(Handle, char *);
312
 
//Word32    WriteMemoryToFile         (Handle hMem,
 
311
//typedef   uint32_t (*FNWriteMemToFile)(Handle, char *);
 
312
//uint32_t    WriteMemoryToFile         (Handle hMem,
313
313
//                                                                       char * lpName);
314
 
DEC_FUN(Word32, WriteMemoryToFile, (Handle, PInt8));
 
314
DEC_FUN(uint32_t, WriteMemoryToFile, (Handle, pchar));
315
315
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
316
316
//Read data from disk to memory
317
 
//typedef   Word32 (*FNReadMemFromFile)(char *, Handle *);
318
 
//Word32    ReadMemoryFromFile         (char * lpName,
 
317
//typedef   uint32_t (*FNReadMemFromFile)(char *, Handle *);
 
318
//uint32_t    ReadMemoryFromFile         (char * lpName,
319
319
//                                                                        Handle * phMem);
320
 
DEC_FUN(Word32, ReadMemoryFromFile, (PInt8, Handle *));
 
320
DEC_FUN(uint32_t, ReadMemoryFromFile, (pchar, Handle *));
321
321
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
322
322
//Write data from memory to storage
323
 
//typedef   Word32 (*FNWriteMemToStorage)(Handle, Handle, char *);
324
 
//Word32    WriteMemoryToStorage         (Handle hMem,
 
323
//typedef   uint32_t (*FNWriteMemToStorage)(Handle, Handle, char *);
 
324
//uint32_t    WriteMemoryToStorage         (Handle hMem,
325
325
//                                                                              Handle hStorage,
326
326
//                                                                              char * lpName);
327
 
DEC_FUN(Word32, WriteMemoryToStorage, (Handle, Handle, PInt8));
 
327
DEC_FUN(uint32_t, WriteMemoryToStorage, (Handle, Handle, pchar));
328
328
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
329
329
//Read data from storage to memory
330
 
//typedef   Word32 (*FNReadMemFromStorage)(Handle, char *, Handle *);
331
 
//Word32    ReadMemoryFromStorage         (Handle hStorage,
 
330
//typedef   uint32_t (*FNReadMemFromStorage)(Handle, char *, Handle *);
 
331
//uint32_t    ReadMemoryFromStorage         (Handle hStorage,
332
332
//                                                                               char * lpName,
333
333
//                                                                               Handle * phMem);
334
 
DEC_FUN(Word32, ReadMemoryFromStorage, (Handle, PInt8, Handle *));
 
334
DEC_FUN(uint32_t, ReadMemoryFromStorage, (Handle, pchar, Handle *));
335
335
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
336
336
#undef DEC_FUN
337
337
/////////////////////////////////////////////////////////////////////////////////////////////////////////////