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

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/rline/sources/dll.cpp

  • 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:
86
86
Bool32 RLINE_SubInit( void );
87
87
 
88
88
///////////////////////////////////GLOBAL VARIABLES///////////////////////////////
89
 
static Word16            gwHeightRC = 0;
90
 
static Word16            gwLowRC = 0;
 
89
static uint16_t            gwHeightRC = 0;
 
90
static uint16_t            gwLowRC = 0;
91
91
static HANDLE            ghStorage = NULL;
92
92
static HINSTANCE         ghInst =  NULL;
93
93
//////////////////////////////////////////////////////////////////////////////////
94
94
 
95
 
BOOL APIENTRY DllMain( HINSTANCE hModule,
96
 
                        DWORD ul_reason_for_call,
97
 
                        LPVOID lpReserved )
 
95
Bool APIENTRY DllMain( HINSTANCE hModule,
 
96
uint32_t ul_reason_for_call,
 
97
                        pvoid lpReserved )
98
98
{
99
99
    switch( ul_reason_for_call )
100
100
        {
113
113
 
114
114
//////////////////////////////////////////////////////////////////////////////////
115
115
//
116
 
RLINE_FUNC(Bool32) RLINE_Init(Word16 wHeightCode,HANDLE hStorage)
 
116
RLINE_FUNC(Bool32) RLINE_Init(uint16_t wHeightCode,HANDLE hStorage)
117
117
{
118
118
        Bool32 b;
119
119
        gwHeightRC = wHeightCode;
145
145
}
146
146
//////////////////////////////////////////////////////////////////////////////////
147
147
//
148
 
RLINE_FUNC(Word32) RLINE_GetReturnCode()
 
148
RLINE_FUNC(uint32_t) RLINE_GetReturnCode()
149
149
{
150
 
        Word32 rc = 0;
 
150
        uint32_t rc = 0;
151
151
        if(gwLowRC && (gwLowRC - IDS_ERR_NO)> 0 )
152
 
                rc = (Word32)(gwHeightRC<<16)|(gwLowRC - IDS_ERR_NO);
 
152
                rc = (uint32_t)(gwHeightRC<<16)|(gwLowRC - IDS_ERR_NO);
153
153
return rc;
154
154
}
155
155
//////////////////////////////////////////////////////////////////////////////////
156
156
//
157
 
RLINE_FUNC(Int8 *) RLINE_GetReturnString(Word32 dwError)
 
157
RLINE_FUNC(char *) RLINE_GetReturnString(uint32_t dwError)
158
158
{
159
 
        Word16 rc = (Word16)(dwError & 0xFFFF) + IDS_ERR_NO;
160
 
        static Int8 szBuffer[512];
 
159
        uint16_t rc = (uint16_t)(dwError & 0xFFFF) + IDS_ERR_NO;
 
160
        static char szBuffer[512];
161
161
 
162
162
        if( dwError >> 16 != gwHeightRC)
163
163
                gwLowRC = IDS_ERR_NOTIMPLEMENT;
171
171
}
172
172
//////////////////////////////////////////////////////////////////////////////////
173
173
//
174
 
RLINE_FUNC(Bool32) RLINE_GetExportData(Word32 dwType, void * pData)
 
174
RLINE_FUNC(Bool32) RLINE_GetExportData(uint32_t dwType, void * pData)
175
175
{
176
176
        Bool32 rc = TRUE;
177
177
 
207
207
}
208
208
//////////////////////////////////////////////////////////////////////////////////
209
209
//
210
 
RLINE_FUNC(Bool32) RLINE_SetImportData(Word32 dwType, void * pData)
 
210
RLINE_FUNC(Bool32) RLINE_SetImportData(uint32_t dwType, void * pData)
211
211
{
212
212
        Bool32 rc = TRUE;
213
213
 
230
230
//////////////////////////////////////////////////////////////////////////////////
231
231
//
232
232
 
233
 
void SetReturnCode_rline(Word32 rc)
 
233
void SetReturnCode_rline(uint32_t rc)
234
234
{
235
 
        gwHeightRC = (Word16)(rc>>16);
236
 
        gwLowRC = (Word16)rc;
 
235
        gwHeightRC = (uint16_t)(rc>>16);
 
236
        gwLowRC = (uint16_t)rc;
237
237
}
238
238
 
239
239
 
240
 
void SetReturnCode_rline(Word16 rc)
 
240
void SetReturnCode_rline(uint16_t rc)
241
241
{
242
242
        gwLowRC = rc;
243
243
}
244
244
 
245
245
 
246
246
 
247
 
Word16 GetReturnCode_rline()
 
247
uint16_t GetReturnCode_rline()
248
248
{
249
249
        return gwLowRC;
250
250
}