2
Copyright (c) 1993-2008, Cognitive Technologies
5
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
6
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
8
* ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
9
���� ����������� �� ��������� �����, ���� ������ ������� � �����������
11
* ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
12
������ ����������, ������������ ��� ���������������, ������ �����������
13
��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
14
����������� ����� �� ��������.
15
* �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
16
���� ������������ � �������� �������� ��������� �/��� �����������
17
���������, ���������� �� ���� ��, ��� ���������������� �����������
20
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
21
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
22
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
23
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
24
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
25
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
26
������������� ������, ��������� � �������������� ��� ���������� ����������
27
������������� ������������� ��������� (������� ������ ������, ��� ������,
28
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
29
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
30
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
31
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
33
Redistribution and use in source and binary forms, with or without modification,
34
are permitted provided that the following conditions are met:
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.
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.
2
Copyright (c) 1993-2008, Cognitive Technologies
5
Разрешается повторное распространение и использование как в виде исходного кода,
6
так и в двоичной форме, с изменениями или без, при соблюдении следующих условий:
8
* При повторном распространении исходного кода должны оставаться указанное
9
выше уведомление об авторском праве, этот список условий и последующий
11
* При повторном распространении двоичного кода в документации и/или в
12
других материалах, поставляемых при распространении, должны сохраняться
13
указанная выше информация об авторском праве, этот список условий и
14
последующий отказ от гарантий.
15
* Ни название Cognitive Technologies, ни имена ее сотрудников не могут
16
быть использованы в качестве средства поддержки и/или продвижения
17
продуктов, основанных на этом ПО, без предварительного письменного
20
ЭТА ПРОГРАММА ПРЕДОСТАВЛЕНА ВЛАДЕЛЬЦАМИ АВТОРСКИХ ПРАВ И/ИЛИ ДРУГИМИ ЛИЦАМИ "КАК
21
ОНА ЕСТЬ" БЕЗ КАКОГО-ЛИБО ВИДА ГАРАНТИЙ, ВЫРАЖЕННЫХ ЯВНО ИЛИ ПОДРАЗУМЕВАЕМЫХ,
22
ВКЛЮЧАЯ ГАРАНТИИ КОММЕРЧЕСКОЙ ЦЕННОСТИ И ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, НО НЕ
23
ОГРАНИЧИВАЯСЬ ИМИ. НИ ВЛАДЕЛЕЦ АВТОРСКИХ ПРАВ И НИ ОДНО ДРУГОЕ ЛИЦО, КОТОРОЕ
24
МОЖЕТ ИЗМЕНЯТЬ И/ИЛИ ПОВТОРНО РАСПРОСТРАНЯТЬ ПРОГРАММУ, НИ В КОЕМ СЛУЧАЕ НЕ
25
НЕСЁТ ОТВЕТСТВЕННОСТИ, ВКЛЮЧАЯ ЛЮБЫЕ ОБЩИЕ, СЛУЧАЙНЫЕ, СПЕЦИАЛЬНЫЕ ИЛИ
26
ПОСЛЕДОВАВШИЕ УБЫТКИ, СВЯЗАННЫЕ С ИСПОЛЬЗОВАНИЕМ ИЛИ ПОНЕСЕННЫЕ ВСЛЕДСТВИЕ
27
НЕВОЗМОЖНОСТИ ИСПОЛЬЗОВАНИЯ ПРОГРАММЫ (ВКЛЮЧАЯ ПОТЕРИ ДАННЫХ, ИЛИ ДАННЫЕ,
28
СТАВШИЕ НЕГОДНЫМИ, ИЛИ УБЫТКИ И/ИЛИ ПОТЕРИ ДОХОДОВ, ПОНЕСЕННЫЕ ИЗ-ЗА ДЕЙСТВИЙ
29
ТРЕТЬИХ ЛИЦ И/ИЛИ ОТКАЗА ПРОГРАММЫ РАБОТАТЬ СОВМЕСТНО С ДРУГИМИ ПРОГРАММАМИ,
30
НО НЕ ОГРАНИЧИВАЯСЬ ЭТИМИ СЛУЧАЯМИ), НО НЕ ОГРАНИЧИВАЯСЬ ИМИ, ДАЖЕ ЕСЛИ ТАКОЙ
31
ВЛАДЕЛЕЦ ИЛИ ДРУГОЕ ЛИЦО БЫЛИ ИЗВЕЩЕНЫ О ВОЗМОЖНОСТИ ТАКИХ УБЫТКОВ И ПОТЕРЬ.
33
Redistribution and use in source and binary forms, with or without modification,
34
are permitted provided that the following conditions are met:
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.
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.
57
57
#include "stdafx.h"
63
63
//#include "edfile.h"
64
64
//#include "edext.h"
66
Bool32 func_char(PWord8 p, Word32 lth);
67
Bool32 func_spec(PWord8 p, Word32 lth);
66
Bool32 func_char(puchar p, uint32_t lth);
67
Bool32 func_spec(puchar p, uint32_t lth);
69
FNCFIOReadMemoryFromFile MemFromFile;
70
FNCFIOLockMemory Lock;
71
FNCFIOUnlockMemory Unlock;
72
FNCFIOFreeMemory Free;
69
FNCFIOReadMemoryFromFile MemFromFile;
70
FNCFIOLockMemory Lock;
71
FNCFIOUnlockMemory Unlock;
72
FNCFIOFreeMemory Free;
73
73
//FNCFIOAllocMemory Alloc;
74
FNCFIOOpenFreeFile Open;
75
FNCFIOCloseFreeFile Close;
76
FNCFIOWriteToFile Write;
79
static unsigned char ed_table[]=
81
sizeof (struct bit_map_ref), /* 0 SS_BITMAP_REF */
82
sizeof (struct text_ref), /* 1 SS_TEXT_REF */
83
sizeof (struct font_kegl), /* 2 SS_FONT_KEGL */
84
sizeof (struct kegl), /* 3 SS_KEGL */
85
sizeof (struct shift), /* 4 SS_SHIFT */
86
sizeof (struct retrieve_level), /* 5 SS_RETR_LEVEL */
87
sizeof (struct underline), /* 6 SS_UNDERLINE */
88
sizeof (struct dens_print), /* 7 SS_DENS_PRINT */
89
sizeof (struct tabul), /* 8 SS_TABUL */
90
0x41, /* 9 SS_TABL_TABUL */
91
0x84, /* 0A SS_SHEET_DESCR */
92
sizeof (struct fragm_disk), /* 0B SS_FRAGMENT */
93
sizeof (struct step_back), /* 0C SS_STEP_BACK */
94
sizeof (struct line_beg), /* 0D SS_LINE_BEG */
95
sizeof (struct position), /* 0E SS_POSITION */
96
sizeof(struct EdTagLanguage), /* 0F SS_LANGUAGE */
97
sizeof (struct table_conform_sizes),/* 10 SS_TABL_CONFORM_SIZES */
98
sizeof (struct group_words), /* 11 SS_GROUP_WORDS */
99
sizeof (struct group_symbols), /* 12 SS_GROUP_SYMBOLS */
100
0, /* 13 Unused code */
101
0, /* 14 Unused code */
102
2, /* 15 ASCII symbol 'Start Paragraph' */
103
sizeof (struct border), /* 16 SS_BORDER */
104
0x82, /* 17 SS_TABLE_HEADER */
105
0x82, /* 18 SS_LIST_OF FRAGMENTS */
106
0, /* 19 Unused code */
107
0, /* 1A Unused code */
108
0, /* 1B Unused code */
109
0x83, /* 1C Special code of Extention ED */
110
sizeof (struct aksant), /* 1D SS_AKSANT */
111
sizeof (struct neg_half_space), /* 1E SS_NEG_HALF_SPACE */
112
sizeof (struct pos_half_space) /* 1F SS_POS_HALF_SPACE */
74
FNCFIOOpenFreeFile Open;
75
FNCFIOCloseFreeFile Close;
76
FNCFIOWriteToFile Write;
78
static unsigned char ed_table[] = { sizeof(struct bit_map_ref), /* 0 SS_BITMAP_REF */
79
sizeof(struct text_ref), /* 1 SS_TEXT_REF */
80
sizeof(struct font_kegl), /* 2 SS_FONT_KEGL */
81
sizeof(struct kegl), /* 3 SS_KEGL */
82
sizeof(struct shift), /* 4 SS_SHIFT */
83
sizeof(struct retrieve_level), /* 5 SS_RETR_LEVEL */
84
sizeof(struct underline), /* 6 SS_UNDERLINE */
85
sizeof(struct dens_print), /* 7 SS_DENS_PRINT */
86
sizeof(struct tabul), /* 8 SS_TABUL */
87
0x41, /* 9 SS_TABL_TABUL */
88
0x84, /* 0A SS_SHEET_DESCR */
89
sizeof(struct fragm_disk), /* 0B SS_FRAGMENT */
90
sizeof(struct step_back), /* 0C SS_STEP_BACK */
91
sizeof(struct line_beg), /* 0D SS_LINE_BEG */
92
sizeof(struct position), /* 0E SS_POSITION */
93
sizeof(struct EdTagLanguage), /* 0F SS_LANGUAGE */
94
sizeof(struct table_conform_sizes),/* 10 SS_TABL_CONFORM_SIZES */
95
sizeof(struct group_words), /* 11 SS_GROUP_WORDS */
96
sizeof(struct group_symbols), /* 12 SS_GROUP_SYMBOLS */
97
0, /* 13 Unused code */
98
0, /* 14 Unused code */
99
2, /* 15 ASCII symbol 'Start Paragraph' */
100
sizeof(struct border), /* 16 SS_BORDER */
101
0x82, /* 17 SS_TABLE_HEADER */
102
0x82, /* 18 SS_LIST_OF FRAGMENTS */
103
0, /* 19 Unused code */
104
0, /* 1A Unused code */
105
0, /* 1B Unused code */
106
0x83, /* 1C Special code of Extention ED */
107
sizeof(struct aksant), /* 1D SS_AKSANT */
108
sizeof(struct neg_half_space), /* 1E SS_NEG_HALF_SPACE */
109
sizeof(struct pos_half_space) /* 1F SS_POS_HALF_SPACE */
115
112
//###########################################
116
void CED_SetRawDataProc(FNRDProc proc)
113
void CED_SetRawDataProc(FNRDProc proc) {
118
114
#define DEC_FUN(a,b,c) b=MyRawData##b
120
DEC_FUN(void, CED_BitmapRef,(const bit_map_ref* pt));
121
DEC_FUN(void, CED_TextRef,(const text_ref* pt));
122
DEC_FUN(void, CED_FontKegl,(const font_kegl *pt));
123
DEC_FUN(void, CED_Kegl,(const kegl* pt));
124
DEC_FUN(void, CED_Shift,(const shift* pt));
125
DEC_FUN(void, CED_RetrieveLevel,(const retrieve_level* pt));
126
DEC_FUN(void, CED_Underline,(const underline* pt));
127
DEC_FUN(void, CED_DensPrint,(const dens_print* pt));
128
DEC_FUN(void, CED_Tabul,(const tabul* pt));
129
DEC_FUN(void, CED_TablTabul,(const tabl_tabul* pt));
130
DEC_FUN(void, CED_SheetDiskDescr,(const sheet_disk_descr* pt));
131
DEC_FUN(void, CED_FragmDiskDescr,(const fragm_disk_descr* pt));
132
DEC_FUN(void, CED_FragmDisk,(const fragm_disk* pt));
133
DEC_FUN(void, CED_StepBack,(const step_back* pt));
134
DEC_FUN(void, CED_LineBeg,(const line_beg* pt));
135
DEC_FUN(void, CED_Position,(const position* pt));
136
DEC_FUN(void, CED_EdTagLanguage,(const EdTagLanguage* pt));
137
DEC_FUN(void, CED_TableConformSizes,(const table_conform_sizes* pt));
138
DEC_FUN(void, CED_GroupWords,(const group_words* pt));
139
DEC_FUN(void, CED_GroupSymbols,(const group_symbols* pt));
140
DEC_FUN(void, CED_Border,(const border* pt));
141
DEC_FUN(void, CED_TableHeader,(const table_header* pt));
142
DEC_FUN(void, CED_ListOfFragments,(const list_of_fragments* pt));
143
DEC_FUN(void, CED_Extention,(const edExtention* pt,const void* ptExt));
144
DEC_FUN(void, CED_ExtentionNew,(const edExtentionNew* pt,const void* ptExt));
145
DEC_FUN(void, CED_Aksant,(const aksant* pt));
146
DEC_FUN(void, CED_Letter,(const letter* pt,const Word32 alternatives));
116
DEC_FUN(void, CED_BitmapRef,(const bit_map_ref* pt));
117
DEC_FUN(void, CED_TextRef,(const text_ref* pt));
118
DEC_FUN(void, CED_FontKegl,(const font_kegl *pt));
119
DEC_FUN(void, CED_Kegl,(const kegl* pt));
120
DEC_FUN(void, CED_Shift,(const shift* pt));
121
DEC_FUN(void, CED_RetrieveLevel,(const retrieve_level* pt));
122
DEC_FUN(void, CED_Underline,(const underline* pt));
123
DEC_FUN(void, CED_DensPrint,(const dens_print* pt));
124
DEC_FUN(void, CED_Tabul,(const tabul* pt));
125
DEC_FUN(void, CED_TablTabul,(const tabl_tabul* pt));
126
DEC_FUN(void, CED_SheetDiskDescr,(const sheet_disk_descr* pt));
127
DEC_FUN(void, CED_FragmDiskDescr,(const fragm_disk_descr* pt));
128
DEC_FUN(void, CED_FragmDisk,(const fragm_disk* pt));
129
DEC_FUN(void, CED_StepBack,(const step_back* pt));
130
DEC_FUN(void, CED_LineBeg,(const line_beg* pt));
131
DEC_FUN(void, CED_Position,(const position* pt));
132
DEC_FUN(void, CED_EdTagLanguage,(const EdTagLanguage* pt));
133
DEC_FUN(void, CED_TableConformSizes,(const table_conform_sizes* pt));
134
DEC_FUN(void, CED_GroupWords,(const group_words* pt));
135
DEC_FUN(void, CED_GroupSymbols,(const group_symbols* pt));
136
DEC_FUN(void, CED_Border,(const border* pt));
137
DEC_FUN(void, CED_TableHeader,(const table_header* pt));
138
DEC_FUN(void, CED_ListOfFragments,(const list_of_fragments* pt));
139
DEC_FUN(void, CED_Extention,(const edExtention* pt,const void* ptExt));
140
DEC_FUN(void, CED_ExtentionNew,(const edExtentionNew* pt,const void* ptExt));
141
DEC_FUN(void, CED_Aksant,(const aksant* pt));
142
DEC_FUN(void, CED_Letter,(const letter* pt,const uint32_t alternatives));
153
/*CED_FUNC(*/Word32/*)*/ CED_ReadED(char * file,Bool32 readFromFile, Word32 bufLen)
149
/*CED_FUNC(*/uint32_t/*)*/CED_ReadED(char * file, Bool32 readFromFile,
156
152
HANDLE PedHandle;
158
PWord8 start,edscan_stop;
154
puchar start, edscan_stop;
162
ret=MemFromFile((PInt8)file,&PedHandle);
157
ret = MemFromFile((pchar) file, &PedHandle);
165
start = (PWord8)Lock(PedHandle);
160
start = (puchar) Lock(PedHandle);
168
162
Unlock(PedHandle);
178
PWord8 curr = edscan_stop=start;
179
PWord8 end=start+ret;
167
start = (uchar*) file;
170
puchar curr = edscan_stop = start;
171
puchar end = start + ret;
182
if (curr>=end) goto quit;
173
next_symb: if (curr >= end)
186
while (end - curr >= 2)
177
while (end - curr >= 2) {
189
if (!(*(curr-1) & 1))
179
if (!(*(curr - 1) & 1))
192
edscan_stop = start; goto quit;
195
if (func_char(start, (WORD)(curr-start))) goto next_symb;
196
edscan_stop = start; goto quit;
185
char_proc: if (func_char(start, (uint16_t)(curr - start)))
200
/*If the size exceeds 0x40, then actual size is stored in structure itself. Its offset is equal to (value in a table & 0xf). length of the size is 2 bytes if value in table >=0x80 and 1 byte otherwise.
202
code = ed_table [*curr];
192
/*If the size exceeds 0x40, then actual size is stored in structure itself. Its offset is equal to (value in a table & 0xf). length of the size is 2 bytes if value in table >=0x80 and 1 byte otherwise.
194
code = ed_table[*curr];
204
if ((code & 0xc0) == 0)
196
if ((code & 0xc0) == 0) {
208
198
curr += sizeof(*curr);
211
// { edscan_stop = curr; return 32; }
212
if (end - curr < code)
201
// { edscan_stop = curr; return 32; }
202
if (end - curr < code) {
214
203
edscan_stop = curr;
217
if ( func_spec(curr, code) )
206
if (func_spec(curr, code)) {
228
//SS_EXTENTION can be either 16 or 32 bit.
229
if (*(Word8*)curr!=SS_EXTENTION)
230
lth = *(PWord16) (curr + (code & 0xf));
233
if (!( (*(Word16*)(curr+1)) &0x8000))
234
lth=*(PWord16) (curr + (code & 0xf));
215
//SS_EXTENTION can be either 16 or 32 bit.
216
if (*(uchar*) curr != SS_EXTENTION)
217
lth = *(uint16_t*)(curr + (code & 0xf));
219
if (!((*(uint16_t*) (curr + 1)) & 0x8000))
220
lth = *(uint16_t*)(curr + (code & 0xf));
236
lth=*(PWord32) (curr + (code & 0xf));
222
lth = *(uint32_t*)(curr + (code & 0xf));
240
lth = *(PWord8) (curr + (code & 0xf));
225
lth = *(puchar)(curr + (code & 0xf));
244
228
curr += sizeof(*curr);
247
//{ edscan_stop = curr; return 32; }
248
if ((unsigned)(end - curr) < lth)
231
//{ edscan_stop = curr; return 32; }
232
if ((unsigned) (end - curr) < lth) {
250
233
edscan_stop = curr;
253
if ( func_spec(curr, lth) )
236
if (func_spec(curr, lth)) {
262
ret=(int)(edscan_stop-start);
243
quit: ret = (int) (edscan_stop - start);
265
245
Unlock(PedHandle);
272
Bool32 func_char(PWord8 p, Word32 lth)
274
const struct letter *pt= (struct letter*)p;
275
CED_Letter(pt,lth/2);
251
Bool32 func_char(puchar p, uint32_t lth) {
252
const struct letter *pt = (struct letter*) p;
253
CED_Letter(pt, lth / 2);
279
Bool32 func_spec(PWord8 p, Word32 lth)
286
const struct bit_map_ref *pt= (struct bit_map_ref*)p;
293
const struct text_ref *pt = (text_ref *)p;
300
const struct font_kegl *pt = (struct font_kegl*)p;
307
const struct kegl *pt = (struct kegl*)p;
314
const shift *pt=(shift*)p;
321
const retrieve_level *pt=(retrieve_level *)p;
322
CED_RetrieveLevel(pt);
328
const struct underline *pt = (struct underline*)p;
335
const struct dens_print *pt = (struct dens_print*)p;
342
const tabul *pt=(tabul*)p;
349
const tabl_tabul *pt=(tabl_tabul*)p;
356
const sheet_disk_descr* pt=(sheet_disk_descr*)p;
357
CED_SheetDiskDescr(pt);
358
for (int i=0;i<pt->quant_fragm;i++)
360
const fragm_disk_descr *pt1=(fragm_disk_descr*)(p+
361
i*sizeof(fragm_disk_descr)+sizeof(sheet_disk_descr));
362
CED_FragmDiskDescr(pt1);
369
const fragm_disk* pt=(fragm_disk*)p;
376
const step_back* pt=(step_back*)p;
383
const struct line_beg *pt= (struct line_beg*)p;
390
const struct position *pt= (struct position*)p;
397
const struct EdTagLanguage *pt= (struct EdTagLanguage*)p;
398
CED_EdTagLanguage(pt);
402
case SS_TABL_CONFORM_SIZES:
404
const struct table_conform_sizes *pt= (struct table_conform_sizes*)p;
405
CED_TableConformSizes(pt);
411
const struct group_words *pt= (struct group_words*)p;
416
case SS_GROUP_SYMBOLS:
418
const struct group_symbols *pt= (struct group_symbols*)p;
419
CED_GroupSymbols(pt);
432
const struct border *pt= (struct border*)p;
437
case SS_TABLE_HEADER:
439
const struct table_header *pt= (struct table_header*)p;
444
case SS_LIST_OF_FRAGMENTS:
446
const struct list_of_fragments *pt= (struct list_of_fragments*)p;
447
CED_ListOfFragments(pt);
453
const struct edExtention *pt= (struct edExtention*)p;
454
if (!(pt->Ecode&0x8000))
455
CED_Extention(pt,(const char*)(p+sizeof(edExtention)));
458
const struct edExtentionNew *pt1= (struct edExtentionNew*)p;
459
CED_ExtentionNew(pt1,(const char*)(p+sizeof(edExtentionNew)));
466
const struct aksant *pt= (struct aksant*)p;
471
case SS_NEG_HALF_SPACE:
478
case SS_POS_HALF_SPACE:
257
Bool32 func_spec(puchar p, uint32_t lth) {
260
case SS_BITMAP_REF: {
261
const struct bit_map_ref *pt = (struct bit_map_ref*) p;
267
const struct text_ref *pt = (text_ref *) p;
273
const struct font_kegl *pt = (struct font_kegl*) p;
279
const struct kegl *pt = (struct kegl*) p;
285
const shift *pt = (shift*) p;
290
case SS_RETR_LEVEL: {
291
const retrieve_level *pt = (retrieve_level *) p;
292
CED_RetrieveLevel(pt);
297
const struct underline *pt = (struct underline*) p;
302
case SS_DENS_PRINT: {
303
const struct dens_print *pt = (struct dens_print*) p;
309
const tabul *pt = (tabul*) p;
314
case SS_TABL_TABUL: {
315
const tabl_tabul *pt = (tabl_tabul*) p;
320
case SS_SHEET_DESCR: {
321
const sheet_disk_descr* pt = (sheet_disk_descr*) p;
322
CED_SheetDiskDescr(pt);
323
for (int i = 0; i < pt->quant_fragm; i++) {
324
const fragm_disk_descr *pt1 = (fragm_disk_descr*) (p + i
325
* sizeof(fragm_disk_descr) + sizeof(sheet_disk_descr));
326
CED_FragmDiskDescr(pt1);
332
const fragm_disk* pt = (fragm_disk*) p;
338
const step_back* pt = (step_back*) p;
344
const struct line_beg *pt = (struct line_beg*) p;
350
const struct position *pt = (struct position*) p;
356
const struct EdTagLanguage *pt = (struct EdTagLanguage*) p;
357
CED_EdTagLanguage(pt);
361
case SS_TABL_CONFORM_SIZES: {
362
const struct table_conform_sizes *pt = (struct table_conform_sizes*) p;
363
CED_TableConformSizes(pt);
367
case SS_GROUP_WORDS: {
368
const struct group_words *pt = (struct group_words*) p;
373
case SS_GROUP_SYMBOLS: {
374
const struct group_symbols *pt = (struct group_symbols*) p;
375
CED_GroupSymbols(pt);
386
const struct border *pt = (struct border*) p;
391
case SS_TABLE_HEADER: {
392
const struct table_header *pt = (struct table_header*) p;
397
case SS_LIST_OF_FRAGMENTS: {
398
const struct list_of_fragments *pt = (struct list_of_fragments*) p;
399
CED_ListOfFragments(pt);
404
const struct edExtention *pt = (struct edExtention*) p;
405
if (!(pt->Ecode & 0x8000))
406
CED_Extention(pt, (const char*) (p + sizeof(edExtention)));
408
const struct edExtentionNew *pt1 = (struct edExtentionNew*) p;
409
CED_ExtentionNew(pt1, (const char*) (p + sizeof(edExtentionNew)));
415
const struct aksant *pt = (struct aksant*) p;
420
case SS_NEG_HALF_SPACE: {
426
case SS_POS_HALF_SPACE: