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

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/rselstr/sources/src/chstr/h/cutstr.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
#include <stdio.h>
58
58
/*#include <windows.h>*/
67
67
#include "dpuma.h"
68
68
#include "cpage.h"
69
69
 
70
 
 
71
70
/*----------------------------------------------------------------------------*/
72
71
 
73
 
//���������
 
72
//Настройки
74
73
 
75
74
extern int inf_str_h;
76
75
extern int inf_let_h;
81
80
extern double cut_white;
82
81
extern double cut_str;
83
82
 
84
 
 
85
83
/*----------------------------------------------------------------------------*/
86
 
//���������
 
84
//Параметры
87
85
 
88
86
extern double inf_let_black;
89
87
extern CLhstr* list;
96
94
 
97
95
/*-------------------------------------------------------------------------------------*/
98
96
 
99
 
void Invert(Rect16*,Word8*);
100
 
void CopyP(Rect16*,Word8*,Word8*);
101
 
void ToHorizont(Rect16*,Word8*,Word8*);
102
 
BOOL IfNewStr(Word8*,int,int,int,int,int&,int);
103
 
int GetStrW(Word8*,int,int,int,int,int&,int&);
104
 
void StrDrawRect(Handle,Word32,Word32,Rect16*,int,BOOL,Rect16);
105
 
void StrDrawRect(Handle,Word32,Word32,Rect16);
106
 
void SortLetter(CCOM_comp** ppComp,int,BOOL);
107
 
int IfStr(Rect16*,int,BOOL);
108
 
void StrMoveMas(Rect16*,int&,int);
109
 
void StrMoveMas(int*,int&,int);
110
 
void StrMoveMasR(Rect16*,int&,int);
111
 
BOOL GetMasP(Handle,Word8*,Rect16,Word8**);
112
 
Handle GetStrCCOM(Handle,Word8*,Rect16,BOOL,BOOL);
113
 
BOOL InitStrMas(Rect16**,int);
114
 
void InitRc(Rect16*,int,CCOM_comp *);
 
97
void Invert(Rect16*, uchar*);
 
98
void CopyP(Rect16*, uchar*, uchar*);
 
99
void ToHorizont(Rect16*, uchar*, uchar*);
 
100
Bool IfNewStr(uchar*, int, int, int, int, int&, int);
 
101
int GetStrW(uchar*, int, int, int, int, int&, int&);
 
102
void StrDrawRect(Handle, uint32_t, uint32_t, Rect16*, int, Bool, Rect16);
 
103
void StrDrawRect(Handle, uint32_t, uint32_t, Rect16);
 
104
void SortLetter(CCOM_comp** ppComp, int, Bool);
 
105
int IfStr(Rect16*, int, Bool);
 
106
void StrMoveMas(Rect16*, int&, int);
 
107
void StrMoveMas(int*, int&, int);
 
108
void StrMoveMasR(Rect16*, int&, int);
 
109
Bool GetMasP(Handle, uchar*, Rect16, uchar**);
 
110
Handle GetStrCCOM(Handle, uchar*, Rect16, Bool, Bool);
 
111
Bool InitStrMas(Rect16**, int);
 
112
void InitRc(Rect16*, int, CCOM_comp *);
115
113
//void DelStrMas(Rect16*);
116
114
void DelStrMas(Rect16**);
117
 
BOOL AddLenStrMas(Rect16**,int&,int);
 
115
Bool AddLenStrMas(Rect16**, int&, int);