0
|
1 |
/* ************************************************************************** */
|
|
2 |
/* * For conditions of distribution and use, * */
|
|
3 |
/* * see copyright notice in libmng.h * */
|
|
4 |
/* ************************************************************************** */
|
|
5 |
/* * * */
|
|
6 |
/* * project : libmng * */
|
|
7 |
/* * file : libmng_chunk_prc.c copyright (c) 2000-2005 G.Juyn * */
|
|
8 |
/* * version : 1.0.10 * */
|
|
9 |
/* * * */
|
|
10 |
/* * purpose : Chunk initialization & cleanup (implementation) * */
|
|
11 |
/* * * */
|
|
12 |
/* * author : G.Juyn * */
|
|
13 |
/* * * */
|
|
14 |
/* * comment : implementation of the chunk initialization & cleanup * */
|
|
15 |
/* * routines * */
|
|
16 |
/* * * */
|
|
17 |
/* * changes : 0.5.1 - 05/08/2000 - G.Juyn * */
|
|
18 |
/* * - changed strict-ANSI stuff * */
|
|
19 |
/* * 0.5.1 - 05/12/2000 - G.Juyn * */
|
|
20 |
/* * - changed trace to macro for callback error-reporting * */
|
|
21 |
/* * * */
|
|
22 |
/* * 0.9.1 - 07/19/2000 - G.Juyn * */
|
|
23 |
/* * - fixed creation-code * */
|
|
24 |
/* * * */
|
|
25 |
/* * 0.9.2 - 07/31/2000 - G.Juyn * */
|
|
26 |
/* * - put add_chunk() inside MNG_INCLUDE_WRITE_PROCS wrapper * */
|
|
27 |
/* * 0.9.2 - 08/01/2000 - G.Juyn * */
|
|
28 |
/* * - wrapper for add_chunk() changed * */
|
|
29 |
/* * 0.9.2 - 08/05/2000 - G.Juyn * */
|
|
30 |
/* * - changed file-prefixes * */
|
|
31 |
/* * * */
|
|
32 |
/* * 0.9.3 - 08/26/2000 - G.Juyn * */
|
|
33 |
/* * - added MAGN chunk * */
|
|
34 |
/* * 0.9.3 - 10/16/2000 - G.Juyn * */
|
|
35 |
/* * - added support for JDAA * */
|
|
36 |
/* * * */
|
|
37 |
/* * 1.0.5 - 08/19/2002 - G.Juyn * */
|
|
38 |
/* * - B597134 - libmng pollutes the linker namespace * */
|
|
39 |
/* * - added HLAPI function to copy chunks * */
|
|
40 |
/* * 1.0.5 - 09/14/2002 - G.Juyn * */
|
|
41 |
/* * - added event handling for dynamic MNG * */
|
|
42 |
/* * 1.0.5 - 10/04/2002 - G.Juyn * */
|
|
43 |
/* * - fixed chunk-storage for evNT chunk * */
|
|
44 |
/* * 1.0.5 - 10/17/2002 - G.Juyn * */
|
|
45 |
/* * - fixed issue in freeing evNT chunk * */
|
|
46 |
/* * * */
|
|
47 |
/* * 1.0.6 - 07/07/2003 - G.R-P * */
|
|
48 |
/* * - added MNG_SKIPCHUNK_cHNK footprint optimizations * */
|
|
49 |
/* * - added MNG_NO_DELTA_PNG reduction feature * */
|
|
50 |
/* * 1.0.6 - 07/14/2003 - G.R-P * */
|
|
51 |
/* * - added MNG_NO_LOOP_SIGNALS_SUPPORTED conditional * */
|
|
52 |
/* * 1.0.6 - 07/29/2003 - G.R-P * */
|
|
53 |
/* * - added conditionals around PAST chunk support * */
|
|
54 |
/* * 1.0.6 - 08/17/2003 - G.R-P * */
|
|
55 |
/* * - added conditionals around non-VLC chunk support * */
|
|
56 |
/* * * */
|
|
57 |
/* * 1.0.7 - 03/24/2004 - G.R-P * */
|
|
58 |
/* * - fixed SKIPCHUNK_eXPI -> fPRI typo * */
|
|
59 |
/* * * */
|
|
60 |
/* * 1.0.9 - 09/25/2004 - G.Juyn * */
|
|
61 |
/* * - replaced MNG_TWEAK_LARGE_FILES with permanent solution * */
|
|
62 |
/* * 1.0.9 - 12/05/2004 - G.Juyn * */
|
|
63 |
/* * - added conditional MNG_OPTIMIZE_CHUNKINITFREE * */
|
|
64 |
/* * 1.0.9 - 12/06/2004 - G.Juyn * */
|
|
65 |
/* * - added conditional MNG_OPTIMIZE_CHUNKASSIGN * */
|
|
66 |
/* * 1.0.9 - 12/20/2004 - G.Juyn * */
|
|
67 |
/* * - cleaned up macro-invocations (thanks to D. Airlie) * */
|
|
68 |
/* * * */
|
|
69 |
/* * 1.0.10 - 07/30/2005 - G.Juyn * */
|
|
70 |
/* * - fixed problem with CLON object during readdisplay() * */
|
|
71 |
/* * 1.0.10 - 04/08/2007 - G.Juyn * */
|
|
72 |
/* * - added support for mPNG proposal * */
|
|
73 |
/* * 1.0.10 - 04/12/2007 - G.Juyn * */
|
|
74 |
/* * - added support for ANG proposal * */
|
|
75 |
/* * * */
|
|
76 |
/* ************************************************************************** */
|
|
77 |
|
|
78 |
#include "libmng.h"
|
|
79 |
#include "libmng_data.h"
|
|
80 |
#include "libmng_error.h"
|
|
81 |
#include "libmng_trace.h"
|
|
82 |
#ifdef __BORLANDC__
|
|
83 |
#pragma hdrstop
|
|
84 |
#endif
|
|
85 |
#include "libmng_memory.h"
|
|
86 |
#include "libmng_chunks.h"
|
|
87 |
#include "libmng_chunk_prc.h"
|
|
88 |
|
|
89 |
#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
|
|
90 |
#pragma option -A /* force ANSI-C */
|
|
91 |
#endif
|
|
92 |
|
|
93 |
/* ************************************************************************** */
|
|
94 |
/* * * */
|
|
95 |
/* * General chunk routines * */
|
|
96 |
/* * * */
|
|
97 |
/* ************************************************************************** */
|
|
98 |
|
|
99 |
void mng_add_chunk (mng_datap pData,
|
|
100 |
mng_chunkp pChunk)
|
|
101 |
{
|
|
102 |
if (!pData->pFirstchunk) /* list is still empty ? */
|
|
103 |
{
|
|
104 |
pData->pFirstchunk = pChunk; /* then this becomes the first */
|
|
105 |
|
|
106 |
#ifdef MNG_SUPPORT_WRITE
|
|
107 |
if (!pData->iFirstchunkadded)
|
|
108 |
{
|
|
109 |
pData->iFirstchunkadded = ((mng_chunk_headerp)pChunk)->iChunkname;
|
|
110 |
#endif
|
|
111 |
|
|
112 |
if (((mng_chunk_headerp)pChunk)->iChunkname == MNG_UINT_IHDR)
|
|
113 |
pData->eImagetype = mng_it_png;
|
|
114 |
else
|
|
115 |
#ifdef MNG_INCLUDE_JNG
|
|
116 |
if (((mng_chunk_headerp)pChunk)->iChunkname == MNG_UINT_JHDR)
|
|
117 |
pData->eImagetype = mng_it_jng;
|
|
118 |
else
|
|
119 |
#endif
|
|
120 |
pData->eImagetype = mng_it_mng;
|
|
121 |
|
|
122 |
pData->eSigtype = pData->eImagetype;
|
|
123 |
#ifdef MNG_SUPPORT_WRITE
|
|
124 |
}
|
|
125 |
#endif
|
|
126 |
}
|
|
127 |
else
|
|
128 |
{ /* else we make appropriate links */
|
|
129 |
((mng_chunk_headerp)pChunk)->pPrev = pData->pLastchunk;
|
|
130 |
((mng_chunk_headerp)pData->pLastchunk)->pNext = pChunk;
|
|
131 |
}
|
|
132 |
|
|
133 |
pData->pLastchunk = pChunk; /* and it's always the last */
|
|
134 |
|
|
135 |
return;
|
|
136 |
}
|
|
137 |
|
|
138 |
/* ************************************************************************** */
|
|
139 |
/* * * */
|
|
140 |
/* * Chunk specific initialization routines * */
|
|
141 |
/* * * */
|
|
142 |
/* ************************************************************************** */
|
|
143 |
|
|
144 |
#ifdef MNG_OPTIMIZE_CHUNKINITFREE
|
|
145 |
INIT_CHUNK_HDR (mng_init_general)
|
|
146 |
{
|
|
147 |
MNG_ALLOC (pData, *ppChunk, ((mng_chunk_headerp)pHeader)->iChunksize);
|
|
148 |
MNG_COPY (*ppChunk, pHeader, sizeof (mng_chunk_header));
|
|
149 |
return MNG_NOERROR;
|
|
150 |
}
|
|
151 |
|
|
152 |
#else /* MNG_OPTIMIZE_CHUNKINITFREE */
|
|
153 |
|
|
154 |
/* ************************************************************************** */
|
|
155 |
|
|
156 |
INIT_CHUNK_HDR (mng_init_ihdr)
|
|
157 |
{
|
|
158 |
#ifdef MNG_SUPPORT_TRACE
|
|
159 |
MNG_TRACE (pData, MNG_FN_INIT_IHDR, MNG_LC_START);
|
|
160 |
#endif
|
|
161 |
|
|
162 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_ihdr));
|
|
163 |
((mng_ihdrp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
164 |
|
|
165 |
#ifdef MNG_SUPPORT_TRACE
|
|
166 |
MNG_TRACE (pData, MNG_FN_INIT_IHDR, MNG_LC_END);
|
|
167 |
#endif
|
|
168 |
|
|
169 |
return MNG_NOERROR;
|
|
170 |
}
|
|
171 |
|
|
172 |
/* ************************************************************************** */
|
|
173 |
|
|
174 |
INIT_CHUNK_HDR (mng_init_plte)
|
|
175 |
{
|
|
176 |
#ifdef MNG_SUPPORT_TRACE
|
|
177 |
MNG_TRACE (pData, MNG_FN_INIT_PLTE, MNG_LC_START);
|
|
178 |
#endif
|
|
179 |
|
|
180 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_plte));
|
|
181 |
((mng_pltep)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
182 |
|
|
183 |
#ifdef MNG_SUPPORT_TRACE
|
|
184 |
MNG_TRACE (pData, MNG_FN_INIT_PLTE, MNG_LC_END);
|
|
185 |
#endif
|
|
186 |
|
|
187 |
return MNG_NOERROR;
|
|
188 |
}
|
|
189 |
|
|
190 |
/* ************************************************************************** */
|
|
191 |
|
|
192 |
INIT_CHUNK_HDR (mng_init_idat)
|
|
193 |
{
|
|
194 |
#ifdef MNG_SUPPORT_TRACE
|
|
195 |
MNG_TRACE (pData, MNG_FN_INIT_IDAT, MNG_LC_START);
|
|
196 |
#endif
|
|
197 |
|
|
198 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_idat));
|
|
199 |
((mng_idatp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
200 |
|
|
201 |
#ifdef MNG_SUPPORT_TRACE
|
|
202 |
MNG_TRACE (pData, MNG_FN_INIT_IDAT, MNG_LC_END);
|
|
203 |
#endif
|
|
204 |
|
|
205 |
return MNG_NOERROR;
|
|
206 |
}
|
|
207 |
|
|
208 |
/* ************************************************************************** */
|
|
209 |
|
|
210 |
INIT_CHUNK_HDR (mng_init_iend)
|
|
211 |
{
|
|
212 |
#ifdef MNG_SUPPORT_TRACE
|
|
213 |
MNG_TRACE (pData, MNG_FN_INIT_IEND, MNG_LC_START);
|
|
214 |
#endif
|
|
215 |
|
|
216 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_iend));
|
|
217 |
((mng_iendp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
218 |
|
|
219 |
#ifdef MNG_SUPPORT_TRACE
|
|
220 |
MNG_TRACE (pData, MNG_FN_INIT_IEND, MNG_LC_END);
|
|
221 |
#endif
|
|
222 |
|
|
223 |
return MNG_NOERROR;
|
|
224 |
}
|
|
225 |
|
|
226 |
/* ************************************************************************** */
|
|
227 |
|
|
228 |
INIT_CHUNK_HDR (mng_init_trns)
|
|
229 |
{
|
|
230 |
#ifdef MNG_SUPPORT_TRACE
|
|
231 |
MNG_TRACE (pData, MNG_FN_INIT_TRNS, MNG_LC_START);
|
|
232 |
#endif
|
|
233 |
|
|
234 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_trns));
|
|
235 |
((mng_trnsp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
236 |
|
|
237 |
#ifdef MNG_SUPPORT_TRACE
|
|
238 |
MNG_TRACE (pData, MNG_FN_INIT_TRNS, MNG_LC_END);
|
|
239 |
#endif
|
|
240 |
|
|
241 |
return MNG_NOERROR;
|
|
242 |
}
|
|
243 |
|
|
244 |
/* ************************************************************************** */
|
|
245 |
|
|
246 |
#ifndef MNG_SKIPCHUNK_gAMA
|
|
247 |
INIT_CHUNK_HDR (mng_init_gama)
|
|
248 |
{
|
|
249 |
#ifdef MNG_SUPPORT_TRACE
|
|
250 |
MNG_TRACE (pData, MNG_FN_INIT_GAMA, MNG_LC_START);
|
|
251 |
#endif
|
|
252 |
|
|
253 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_gama));
|
|
254 |
((mng_gamap)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
255 |
|
|
256 |
#ifdef MNG_SUPPORT_TRACE
|
|
257 |
MNG_TRACE (pData, MNG_FN_INIT_GAMA, MNG_LC_END);
|
|
258 |
#endif
|
|
259 |
|
|
260 |
return MNG_NOERROR;
|
|
261 |
}
|
|
262 |
#endif
|
|
263 |
|
|
264 |
/* ************************************************************************** */
|
|
265 |
|
|
266 |
#ifndef MNG_SKIPCHUNK_cHRM
|
|
267 |
INIT_CHUNK_HDR (mng_init_chrm)
|
|
268 |
{
|
|
269 |
#ifdef MNG_SUPPORT_TRACE
|
|
270 |
MNG_TRACE (pData, MNG_FN_INIT_CHRM, MNG_LC_START);
|
|
271 |
#endif
|
|
272 |
|
|
273 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_chrm));
|
|
274 |
((mng_chrmp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
275 |
|
|
276 |
#ifdef MNG_SUPPORT_TRACE
|
|
277 |
MNG_TRACE (pData, MNG_FN_INIT_CHRM, MNG_LC_END);
|
|
278 |
#endif
|
|
279 |
|
|
280 |
return MNG_NOERROR;
|
|
281 |
}
|
|
282 |
#endif
|
|
283 |
|
|
284 |
/* ************************************************************************** */
|
|
285 |
|
|
286 |
#ifndef MNG_SKIPCHUNK_sRGB
|
|
287 |
INIT_CHUNK_HDR (mng_init_srgb)
|
|
288 |
{
|
|
289 |
#ifdef MNG_SUPPORT_TRACE
|
|
290 |
MNG_TRACE (pData, MNG_FN_INIT_SRGB, MNG_LC_START);
|
|
291 |
#endif
|
|
292 |
|
|
293 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_srgb));
|
|
294 |
((mng_srgbp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
295 |
|
|
296 |
#ifdef MNG_SUPPORT_TRACE
|
|
297 |
MNG_TRACE (pData, MNG_FN_INIT_SRGB, MNG_LC_END);
|
|
298 |
#endif
|
|
299 |
|
|
300 |
return MNG_NOERROR;
|
|
301 |
}
|
|
302 |
#endif
|
|
303 |
|
|
304 |
/* ************************************************************************** */
|
|
305 |
|
|
306 |
#ifndef MNG_SKIPCHUNK_iCCP
|
|
307 |
INIT_CHUNK_HDR (mng_init_iccp)
|
|
308 |
{
|
|
309 |
#ifdef MNG_SUPPORT_TRACE
|
|
310 |
MNG_TRACE (pData, MNG_FN_INIT_ICCP, MNG_LC_START);
|
|
311 |
#endif
|
|
312 |
|
|
313 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_iccp));
|
|
314 |
((mng_iccpp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
315 |
|
|
316 |
#ifdef MNG_SUPPORT_TRACE
|
|
317 |
MNG_TRACE (pData, MNG_FN_INIT_ICCP, MNG_LC_END);
|
|
318 |
#endif
|
|
319 |
|
|
320 |
return MNG_NOERROR;
|
|
321 |
}
|
|
322 |
#endif
|
|
323 |
|
|
324 |
/* ************************************************************************** */
|
|
325 |
|
|
326 |
#ifndef MNG_SKIPCHUNK_tEXt
|
|
327 |
INIT_CHUNK_HDR (mng_init_text)
|
|
328 |
{
|
|
329 |
#ifdef MNG_SUPPORT_TRACE
|
|
330 |
MNG_TRACE (pData, MNG_FN_INIT_TEXT, MNG_LC_START);
|
|
331 |
#endif
|
|
332 |
|
|
333 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_text));
|
|
334 |
((mng_textp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
335 |
|
|
336 |
#ifdef MNG_SUPPORT_TRACE
|
|
337 |
MNG_TRACE (pData, MNG_FN_INIT_TEXT, MNG_LC_END);
|
|
338 |
#endif
|
|
339 |
|
|
340 |
return MNG_NOERROR;
|
|
341 |
}
|
|
342 |
#endif
|
|
343 |
|
|
344 |
/* ************************************************************************** */
|
|
345 |
|
|
346 |
#ifndef MNG_SKIPCHUNK_zTXt
|
|
347 |
INIT_CHUNK_HDR (mng_init_ztxt)
|
|
348 |
{
|
|
349 |
#ifdef MNG_SUPPORT_TRACE
|
|
350 |
MNG_TRACE (pData, MNG_FN_INIT_ZTXT, MNG_LC_START);
|
|
351 |
#endif
|
|
352 |
|
|
353 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_ztxt));
|
|
354 |
((mng_ztxtp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
355 |
|
|
356 |
#ifdef MNG_SUPPORT_TRACE
|
|
357 |
MNG_TRACE (pData, MNG_FN_INIT_ZTXT, MNG_LC_END);
|
|
358 |
#endif
|
|
359 |
|
|
360 |
return MNG_NOERROR;
|
|
361 |
}
|
|
362 |
#endif
|
|
363 |
|
|
364 |
/* ************************************************************************** */
|
|
365 |
|
|
366 |
#ifndef MNG_SKIPCHUNK_iTXt
|
|
367 |
INIT_CHUNK_HDR (mng_init_itxt)
|
|
368 |
{
|
|
369 |
#ifdef MNG_SUPPORT_TRACE
|
|
370 |
MNG_TRACE (pData, MNG_FN_INIT_ITXT, MNG_LC_START);
|
|
371 |
#endif
|
|
372 |
|
|
373 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_itxt));
|
|
374 |
((mng_itxtp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
375 |
|
|
376 |
#ifdef MNG_SUPPORT_TRACE
|
|
377 |
MNG_TRACE (pData, MNG_FN_INIT_ITXT, MNG_LC_END);
|
|
378 |
#endif
|
|
379 |
|
|
380 |
return MNG_NOERROR;
|
|
381 |
}
|
|
382 |
#endif
|
|
383 |
|
|
384 |
/* ************************************************************************** */
|
|
385 |
|
|
386 |
#ifndef MNG_SKIPCHUNK_bKGD
|
|
387 |
INIT_CHUNK_HDR (mng_init_bkgd)
|
|
388 |
{
|
|
389 |
#ifdef MNG_SUPPORT_TRACE
|
|
390 |
MNG_TRACE (pData, MNG_FN_INIT_BKGD, MNG_LC_START);
|
|
391 |
#endif
|
|
392 |
|
|
393 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_bkgd));
|
|
394 |
((mng_bkgdp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
395 |
|
|
396 |
#ifdef MNG_SUPPORT_TRACE
|
|
397 |
MNG_TRACE (pData, MNG_FN_INIT_BKGD, MNG_LC_END);
|
|
398 |
#endif
|
|
399 |
|
|
400 |
return MNG_NOERROR;
|
|
401 |
}
|
|
402 |
#endif
|
|
403 |
|
|
404 |
/* ************************************************************************** */
|
|
405 |
|
|
406 |
#ifndef MNG_SKIPCHUNK_pHYs
|
|
407 |
INIT_CHUNK_HDR (mng_init_phys)
|
|
408 |
{
|
|
409 |
#ifdef MNG_SUPPORT_TRACE
|
|
410 |
MNG_TRACE (pData, MNG_FN_INIT_PHYS, MNG_LC_START);
|
|
411 |
#endif
|
|
412 |
|
|
413 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_phys));
|
|
414 |
((mng_physp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
415 |
|
|
416 |
#ifdef MNG_SUPPORT_TRACE
|
|
417 |
MNG_TRACE (pData, MNG_FN_INIT_PHYS, MNG_LC_END);
|
|
418 |
#endif
|
|
419 |
|
|
420 |
return MNG_NOERROR;
|
|
421 |
}
|
|
422 |
#endif
|
|
423 |
|
|
424 |
/* ************************************************************************** */
|
|
425 |
|
|
426 |
#ifndef MNG_SKIPCHUNK_sBIT
|
|
427 |
INIT_CHUNK_HDR (mng_init_sbit)
|
|
428 |
{
|
|
429 |
#ifdef MNG_SUPPORT_TRACE
|
|
430 |
MNG_TRACE (pData, MNG_FN_INIT_SBIT, MNG_LC_START);
|
|
431 |
#endif
|
|
432 |
|
|
433 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_sbit));
|
|
434 |
((mng_sbitp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
435 |
|
|
436 |
#ifdef MNG_SUPPORT_TRACE
|
|
437 |
MNG_TRACE (pData, MNG_FN_INIT_SBIT, MNG_LC_END);
|
|
438 |
#endif
|
|
439 |
|
|
440 |
return MNG_NOERROR;
|
|
441 |
}
|
|
442 |
#endif
|
|
443 |
|
|
444 |
/* ************************************************************************** */
|
|
445 |
|
|
446 |
#ifndef MNG_SKIPCHUNK_sPLT
|
|
447 |
INIT_CHUNK_HDR (mng_init_splt)
|
|
448 |
{
|
|
449 |
#ifdef MNG_SUPPORT_TRACE
|
|
450 |
MNG_TRACE (pData, MNG_FN_INIT_SPLT, MNG_LC_START);
|
|
451 |
#endif
|
|
452 |
|
|
453 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_splt));
|
|
454 |
((mng_spltp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
455 |
|
|
456 |
#ifdef MNG_SUPPORT_TRACE
|
|
457 |
MNG_TRACE (pData, MNG_FN_INIT_SPLT, MNG_LC_END);
|
|
458 |
#endif
|
|
459 |
|
|
460 |
return MNG_NOERROR;
|
|
461 |
}
|
|
462 |
#endif
|
|
463 |
|
|
464 |
/* ************************************************************************** */
|
|
465 |
|
|
466 |
#ifndef MNG_SKIPCHUNK_hIST
|
|
467 |
INIT_CHUNK_HDR (mng_init_hist)
|
|
468 |
{
|
|
469 |
#ifdef MNG_SUPPORT_TRACE
|
|
470 |
MNG_TRACE (pData, MNG_FN_INIT_HIST, MNG_LC_START);
|
|
471 |
#endif
|
|
472 |
|
|
473 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_hist));
|
|
474 |
((mng_histp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
475 |
|
|
476 |
#ifdef MNG_SUPPORT_TRACE
|
|
477 |
MNG_TRACE (pData, MNG_FN_INIT_HIST, MNG_LC_END);
|
|
478 |
#endif
|
|
479 |
|
|
480 |
return MNG_NOERROR;
|
|
481 |
}
|
|
482 |
#endif
|
|
483 |
|
|
484 |
/* ************************************************************************** */
|
|
485 |
|
|
486 |
#ifndef MNG_SKIPCHUNK_tIME
|
|
487 |
INIT_CHUNK_HDR (mng_init_time)
|
|
488 |
{
|
|
489 |
#ifdef MNG_SUPPORT_TRACE
|
|
490 |
MNG_TRACE (pData, MNG_FN_INIT_TIME, MNG_LC_START);
|
|
491 |
#endif
|
|
492 |
|
|
493 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_time));
|
|
494 |
((mng_timep)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
495 |
|
|
496 |
#ifdef MNG_SUPPORT_TRACE
|
|
497 |
MNG_TRACE (pData, MNG_FN_INIT_TIME, MNG_LC_END);
|
|
498 |
#endif
|
|
499 |
|
|
500 |
return MNG_NOERROR;
|
|
501 |
}
|
|
502 |
#endif
|
|
503 |
|
|
504 |
/* ************************************************************************** */
|
|
505 |
|
|
506 |
INIT_CHUNK_HDR (mng_init_mhdr)
|
|
507 |
{
|
|
508 |
#ifdef MNG_SUPPORT_TRACE
|
|
509 |
MNG_TRACE (pData, MNG_FN_INIT_MHDR, MNG_LC_START);
|
|
510 |
#endif
|
|
511 |
|
|
512 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_mhdr));
|
|
513 |
((mng_mhdrp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
514 |
|
|
515 |
#ifdef MNG_SUPPORT_TRACE
|
|
516 |
MNG_TRACE (pData, MNG_FN_INIT_MHDR, MNG_LC_END);
|
|
517 |
#endif
|
|
518 |
|
|
519 |
return MNG_NOERROR;
|
|
520 |
}
|
|
521 |
|
|
522 |
/* ************************************************************************** */
|
|
523 |
|
|
524 |
INIT_CHUNK_HDR (mng_init_mend)
|
|
525 |
{
|
|
526 |
#ifdef MNG_SUPPORT_TRACE
|
|
527 |
MNG_TRACE (pData, MNG_FN_INIT_MEND, MNG_LC_START);
|
|
528 |
#endif
|
|
529 |
|
|
530 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_mend));
|
|
531 |
((mng_mendp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
532 |
|
|
533 |
#ifdef MNG_SUPPORT_TRACE
|
|
534 |
MNG_TRACE (pData, MNG_FN_INIT_MEND, MNG_LC_END);
|
|
535 |
#endif
|
|
536 |
|
|
537 |
return MNG_NOERROR;
|
|
538 |
}
|
|
539 |
|
|
540 |
/* ************************************************************************** */
|
|
541 |
|
|
542 |
#ifndef MNG_SKIPCHUNK_LOOP
|
|
543 |
INIT_CHUNK_HDR (mng_init_loop)
|
|
544 |
{
|
|
545 |
#ifdef MNG_SUPPORT_TRACE
|
|
546 |
MNG_TRACE (pData, MNG_FN_INIT_LOOP, MNG_LC_START);
|
|
547 |
#endif
|
|
548 |
|
|
549 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_loop));
|
|
550 |
((mng_loopp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
551 |
|
|
552 |
#ifdef MNG_SUPPORT_TRACE
|
|
553 |
MNG_TRACE (pData, MNG_FN_INIT_LOOP, MNG_LC_END);
|
|
554 |
#endif
|
|
555 |
|
|
556 |
return MNG_NOERROR;
|
|
557 |
}
|
|
558 |
|
|
559 |
/* ************************************************************************** */
|
|
560 |
|
|
561 |
INIT_CHUNK_HDR (mng_init_endl)
|
|
562 |
{
|
|
563 |
#ifdef MNG_SUPPORT_TRACE
|
|
564 |
MNG_TRACE (pData, MNG_FN_INIT_ENDL, MNG_LC_START);
|
|
565 |
#endif
|
|
566 |
|
|
567 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_endl));
|
|
568 |
((mng_endlp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
569 |
|
|
570 |
#ifdef MNG_SUPPORT_TRACE
|
|
571 |
MNG_TRACE (pData, MNG_FN_INIT_ENDL, MNG_LC_END);
|
|
572 |
#endif
|
|
573 |
|
|
574 |
return MNG_NOERROR;
|
|
575 |
}
|
|
576 |
#endif
|
|
577 |
|
|
578 |
/* ************************************************************************** */
|
|
579 |
|
|
580 |
#ifndef MNG_SKIPCHUNK_DEFI
|
|
581 |
INIT_CHUNK_HDR (mng_init_defi)
|
|
582 |
{
|
|
583 |
#ifdef MNG_SUPPORT_TRACE
|
|
584 |
MNG_TRACE (pData, MNG_FN_INIT_DEFI, MNG_LC_START);
|
|
585 |
#endif
|
|
586 |
|
|
587 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_defi));
|
|
588 |
((mng_defip)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
589 |
|
|
590 |
#ifdef MNG_SUPPORT_TRACE
|
|
591 |
MNG_TRACE (pData, MNG_FN_INIT_DEFI, MNG_LC_END);
|
|
592 |
#endif
|
|
593 |
|
|
594 |
return MNG_NOERROR;
|
|
595 |
}
|
|
596 |
#endif
|
|
597 |
|
|
598 |
/* ************************************************************************** */
|
|
599 |
|
|
600 |
#ifndef MNG_SKIPCHUNK_BASI
|
|
601 |
INIT_CHUNK_HDR (mng_init_basi)
|
|
602 |
{
|
|
603 |
#ifdef MNG_SUPPORT_TRACE
|
|
604 |
MNG_TRACE (pData, MNG_FN_INIT_BASI, MNG_LC_START);
|
|
605 |
#endif
|
|
606 |
|
|
607 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_basi));
|
|
608 |
((mng_basip)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
609 |
|
|
610 |
#ifdef MNG_SUPPORT_TRACE
|
|
611 |
MNG_TRACE (pData, MNG_FN_INIT_BASI, MNG_LC_END);
|
|
612 |
#endif
|
|
613 |
|
|
614 |
return MNG_NOERROR;
|
|
615 |
}
|
|
616 |
#endif
|
|
617 |
|
|
618 |
/* ************************************************************************** */
|
|
619 |
|
|
620 |
#ifndef MNG_SKIPCHUNK_CLON
|
|
621 |
INIT_CHUNK_HDR (mng_init_clon)
|
|
622 |
{
|
|
623 |
#ifdef MNG_SUPPORT_TRACE
|
|
624 |
MNG_TRACE (pData, MNG_FN_INIT_CLON, MNG_LC_START);
|
|
625 |
#endif
|
|
626 |
|
|
627 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_clon));
|
|
628 |
((mng_clonp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
629 |
|
|
630 |
#ifdef MNG_SUPPORT_TRACE
|
|
631 |
MNG_TRACE (pData, MNG_FN_INIT_CLON, MNG_LC_END);
|
|
632 |
#endif
|
|
633 |
|
|
634 |
return MNG_NOERROR;
|
|
635 |
}
|
|
636 |
#endif
|
|
637 |
|
|
638 |
/* ************************************************************************** */
|
|
639 |
|
|
640 |
#ifndef MNG_SKIPCHUNK_PAST
|
|
641 |
INIT_CHUNK_HDR (mng_init_past)
|
|
642 |
{
|
|
643 |
#ifdef MNG_SUPPORT_TRACE
|
|
644 |
MNG_TRACE (pData, MNG_FN_INIT_PAST, MNG_LC_START);
|
|
645 |
#endif
|
|
646 |
|
|
647 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_past));
|
|
648 |
((mng_pastp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
649 |
|
|
650 |
#ifdef MNG_SUPPORT_TRACE
|
|
651 |
MNG_TRACE (pData, MNG_FN_INIT_PAST, MNG_LC_END);
|
|
652 |
#endif
|
|
653 |
|
|
654 |
return MNG_NOERROR;
|
|
655 |
}
|
|
656 |
#endif
|
|
657 |
|
|
658 |
/* ************************************************************************** */
|
|
659 |
|
|
660 |
#ifndef MNG_SKIPCHUNK_DISC
|
|
661 |
INIT_CHUNK_HDR (mng_init_disc)
|
|
662 |
{
|
|
663 |
#ifdef MNG_SUPPORT_TRACE
|
|
664 |
MNG_TRACE (pData, MNG_FN_INIT_DISC, MNG_LC_START);
|
|
665 |
#endif
|
|
666 |
|
|
667 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_disc));
|
|
668 |
((mng_discp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
669 |
|
|
670 |
#ifdef MNG_SUPPORT_TRACE
|
|
671 |
MNG_TRACE (pData, MNG_FN_INIT_DISC, MNG_LC_END);
|
|
672 |
#endif
|
|
673 |
|
|
674 |
return MNG_NOERROR;
|
|
675 |
}
|
|
676 |
#endif
|
|
677 |
|
|
678 |
/* ************************************************************************** */
|
|
679 |
|
|
680 |
#ifndef MNG_SKIPCHUNK_BACK
|
|
681 |
INIT_CHUNK_HDR (mng_init_back)
|
|
682 |
{
|
|
683 |
#ifdef MNG_SUPPORT_TRACE
|
|
684 |
MNG_TRACE (pData, MNG_FN_INIT_BACK, MNG_LC_START);
|
|
685 |
#endif
|
|
686 |
|
|
687 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_back));
|
|
688 |
((mng_backp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
689 |
|
|
690 |
#ifdef MNG_SUPPORT_TRACE
|
|
691 |
MNG_TRACE (pData, MNG_FN_INIT_BACK, MNG_LC_END);
|
|
692 |
#endif
|
|
693 |
|
|
694 |
return MNG_NOERROR;
|
|
695 |
}
|
|
696 |
#endif
|
|
697 |
|
|
698 |
/* ************************************************************************** */
|
|
699 |
|
|
700 |
#ifndef MNG_SKIPCHUNK_FRAM
|
|
701 |
INIT_CHUNK_HDR (mng_init_fram)
|
|
702 |
{
|
|
703 |
#ifdef MNG_SUPPORT_TRACE
|
|
704 |
MNG_TRACE (pData, MNG_FN_INIT_FRAM, MNG_LC_START);
|
|
705 |
#endif
|
|
706 |
|
|
707 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_fram));
|
|
708 |
((mng_framp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
709 |
|
|
710 |
#ifdef MNG_SUPPORT_TRACE
|
|
711 |
MNG_TRACE (pData, MNG_FN_INIT_FRAM, MNG_LC_END);
|
|
712 |
#endif
|
|
713 |
|
|
714 |
return MNG_NOERROR;
|
|
715 |
}
|
|
716 |
#endif
|
|
717 |
|
|
718 |
/* ************************************************************************** */
|
|
719 |
|
|
720 |
#ifndef MNG_SKIPCHUNK_MOVE
|
|
721 |
INIT_CHUNK_HDR (mng_init_move)
|
|
722 |
{
|
|
723 |
#ifdef MNG_SUPPORT_TRACE
|
|
724 |
MNG_TRACE (pData, MNG_FN_INIT_MOVE, MNG_LC_START);
|
|
725 |
#endif
|
|
726 |
|
|
727 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_move));
|
|
728 |
((mng_movep)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
729 |
|
|
730 |
#ifdef MNG_SUPPORT_TRACE
|
|
731 |
MNG_TRACE (pData, MNG_FN_INIT_MOVE, MNG_LC_END);
|
|
732 |
#endif
|
|
733 |
|
|
734 |
return MNG_NOERROR;
|
|
735 |
}
|
|
736 |
#endif
|
|
737 |
|
|
738 |
/* ************************************************************************** */
|
|
739 |
|
|
740 |
#ifndef MNG_SKIPCHUNK_CLIP
|
|
741 |
INIT_CHUNK_HDR (mng_init_clip)
|
|
742 |
{
|
|
743 |
#ifdef MNG_SUPPORT_TRACE
|
|
744 |
MNG_TRACE (pData, MNG_FN_INIT_CLIP, MNG_LC_START);
|
|
745 |
#endif
|
|
746 |
|
|
747 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_clip));
|
|
748 |
((mng_clipp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
749 |
|
|
750 |
#ifdef MNG_SUPPORT_TRACE
|
|
751 |
MNG_TRACE (pData, MNG_FN_INIT_CLIP, MNG_LC_END);
|
|
752 |
#endif
|
|
753 |
|
|
754 |
return MNG_NOERROR;
|
|
755 |
}
|
|
756 |
#endif
|
|
757 |
|
|
758 |
/* ************************************************************************** */
|
|
759 |
|
|
760 |
#ifndef MNG_SKIPCHUNK_SHOW
|
|
761 |
INIT_CHUNK_HDR (mng_init_show)
|
|
762 |
{
|
|
763 |
#ifdef MNG_SUPPORT_TRACE
|
|
764 |
MNG_TRACE (pData, MNG_FN_INIT_SHOW, MNG_LC_START);
|
|
765 |
#endif
|
|
766 |
|
|
767 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_show));
|
|
768 |
((mng_showp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
769 |
|
|
770 |
#ifdef MNG_SUPPORT_TRACE
|
|
771 |
MNG_TRACE (pData, MNG_FN_INIT_SHOW, MNG_LC_END);
|
|
772 |
#endif
|
|
773 |
|
|
774 |
return MNG_NOERROR;
|
|
775 |
}
|
|
776 |
#endif
|
|
777 |
|
|
778 |
/* ************************************************************************** */
|
|
779 |
|
|
780 |
#ifndef MNG_SKIPCHUNK_TERM
|
|
781 |
INIT_CHUNK_HDR (mng_init_term)
|
|
782 |
{
|
|
783 |
#ifdef MNG_SUPPORT_TRACE
|
|
784 |
MNG_TRACE (pData, MNG_FN_INIT_TERM, MNG_LC_START);
|
|
785 |
#endif
|
|
786 |
|
|
787 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_term));
|
|
788 |
((mng_termp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
789 |
|
|
790 |
#ifdef MNG_SUPPORT_TRACE
|
|
791 |
MNG_TRACE (pData, MNG_FN_INIT_TERM, MNG_LC_END);
|
|
792 |
#endif
|
|
793 |
|
|
794 |
return MNG_NOERROR;
|
|
795 |
}
|
|
796 |
#endif
|
|
797 |
|
|
798 |
/* ************************************************************************** */
|
|
799 |
|
|
800 |
#ifndef MNG_SKIPCHUNK_SAVE
|
|
801 |
INIT_CHUNK_HDR (mng_init_save)
|
|
802 |
{
|
|
803 |
#ifdef MNG_SUPPORT_TRACE
|
|
804 |
MNG_TRACE (pData, MNG_FN_INIT_SAVE, MNG_LC_START);
|
|
805 |
#endif
|
|
806 |
|
|
807 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_save));
|
|
808 |
((mng_savep)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
809 |
|
|
810 |
#ifdef MNG_SUPPORT_TRACE
|
|
811 |
MNG_TRACE (pData, MNG_FN_INIT_SAVE, MNG_LC_END);
|
|
812 |
#endif
|
|
813 |
|
|
814 |
return MNG_NOERROR;
|
|
815 |
|
|
816 |
}
|
|
817 |
#endif
|
|
818 |
|
|
819 |
/* ************************************************************************** */
|
|
820 |
|
|
821 |
#ifndef MNG_SKIPCHUNK_SEEK
|
|
822 |
INIT_CHUNK_HDR (mng_init_seek)
|
|
823 |
{
|
|
824 |
#ifdef MNG_SUPPORT_TRACE
|
|
825 |
MNG_TRACE (pData, MNG_FN_INIT_SEEK, MNG_LC_START);
|
|
826 |
#endif
|
|
827 |
|
|
828 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_seek));
|
|
829 |
((mng_seekp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
830 |
|
|
831 |
#ifdef MNG_SUPPORT_TRACE
|
|
832 |
MNG_TRACE (pData, MNG_FN_INIT_SEEK, MNG_LC_END);
|
|
833 |
#endif
|
|
834 |
|
|
835 |
return MNG_NOERROR;
|
|
836 |
}
|
|
837 |
#endif
|
|
838 |
|
|
839 |
/* ************************************************************************** */
|
|
840 |
|
|
841 |
#ifndef MNG_SKIPCHUNK_eXPI
|
|
842 |
INIT_CHUNK_HDR (mng_init_expi)
|
|
843 |
{
|
|
844 |
#ifdef MNG_SUPPORT_TRACE
|
|
845 |
MNG_TRACE (pData, MNG_FN_INIT_EXPI, MNG_LC_START);
|
|
846 |
#endif
|
|
847 |
|
|
848 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_expi));
|
|
849 |
((mng_expip)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
850 |
|
|
851 |
#ifdef MNG_SUPPORT_TRACE
|
|
852 |
MNG_TRACE (pData, MNG_FN_INIT_EXPI, MNG_LC_END);
|
|
853 |
#endif
|
|
854 |
|
|
855 |
return MNG_NOERROR;
|
|
856 |
}
|
|
857 |
#endif
|
|
858 |
|
|
859 |
/* ************************************************************************** */
|
|
860 |
|
|
861 |
#ifndef MNG_SKIPCHUNK_fPRI
|
|
862 |
INIT_CHUNK_HDR (mng_init_fpri)
|
|
863 |
{
|
|
864 |
#ifdef MNG_SUPPORT_TRACE
|
|
865 |
MNG_TRACE (pData, MNG_FN_INIT_FPRI, MNG_LC_START);
|
|
866 |
#endif
|
|
867 |
|
|
868 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_fpri));
|
|
869 |
((mng_fprip)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
870 |
|
|
871 |
#ifdef MNG_SUPPORT_TRACE
|
|
872 |
MNG_TRACE (pData, MNG_FN_INIT_FPRI, MNG_LC_END);
|
|
873 |
#endif
|
|
874 |
|
|
875 |
return MNG_NOERROR;
|
|
876 |
}
|
|
877 |
#endif
|
|
878 |
|
|
879 |
/* ************************************************************************** */
|
|
880 |
|
|
881 |
#ifndef MNG_SKIPCHUNK_nEED
|
|
882 |
INIT_CHUNK_HDR (mng_init_need)
|
|
883 |
{
|
|
884 |
#ifdef MNG_SUPPORT_TRACE
|
|
885 |
MNG_TRACE (pData, MNG_FN_INIT_NEED, MNG_LC_START);
|
|
886 |
#endif
|
|
887 |
|
|
888 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_need));
|
|
889 |
((mng_needp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
890 |
|
|
891 |
#ifdef MNG_SUPPORT_TRACE
|
|
892 |
MNG_TRACE (pData, MNG_FN_INIT_NEED, MNG_LC_END);
|
|
893 |
#endif
|
|
894 |
|
|
895 |
return MNG_NOERROR;
|
|
896 |
}
|
|
897 |
#endif
|
|
898 |
|
|
899 |
/* ************************************************************************** */
|
|
900 |
|
|
901 |
#ifndef MNG_SKIPCHUNK_pHYg
|
|
902 |
INIT_CHUNK_HDR (mng_init_phyg)
|
|
903 |
{
|
|
904 |
#ifdef MNG_SUPPORT_TRACE
|
|
905 |
MNG_TRACE (pData, MNG_FN_INIT_PHYG, MNG_LC_START);
|
|
906 |
#endif
|
|
907 |
|
|
908 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_phyg));
|
|
909 |
((mng_phygp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
910 |
|
|
911 |
#ifdef MNG_SUPPORT_TRACE
|
|
912 |
MNG_TRACE (pData, MNG_FN_INIT_PHYG, MNG_LC_END);
|
|
913 |
#endif
|
|
914 |
|
|
915 |
return MNG_NOERROR;
|
|
916 |
}
|
|
917 |
#endif
|
|
918 |
|
|
919 |
/* ************************************************************************** */
|
|
920 |
|
|
921 |
#ifdef MNG_INCLUDE_JNG
|
|
922 |
INIT_CHUNK_HDR (mng_init_jhdr)
|
|
923 |
{
|
|
924 |
#ifdef MNG_SUPPORT_TRACE
|
|
925 |
MNG_TRACE (pData, MNG_FN_INIT_JHDR, MNG_LC_START);
|
|
926 |
#endif
|
|
927 |
|
|
928 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_jhdr));
|
|
929 |
((mng_jhdrp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
930 |
|
|
931 |
#ifdef MNG_SUPPORT_TRACE
|
|
932 |
MNG_TRACE (pData, MNG_FN_INIT_JHDR, MNG_LC_END);
|
|
933 |
#endif
|
|
934 |
|
|
935 |
return MNG_NOERROR;
|
|
936 |
}
|
|
937 |
#endif /* MNG_INCLUDE_JNG */
|
|
938 |
|
|
939 |
/* ************************************************************************** */
|
|
940 |
|
|
941 |
#ifdef MNG_INCLUDE_JNG
|
|
942 |
INIT_CHUNK_HDR (mng_init_jdaa)
|
|
943 |
{
|
|
944 |
#ifdef MNG_SUPPORT_TRACE
|
|
945 |
MNG_TRACE (pData, MNG_FN_INIT_JDAA, MNG_LC_START);
|
|
946 |
#endif
|
|
947 |
|
|
948 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_jdaa));
|
|
949 |
((mng_jdaap)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
950 |
|
|
951 |
#ifdef MNG_SUPPORT_TRACE
|
|
952 |
MNG_TRACE (pData, MNG_FN_INIT_JDAA, MNG_LC_END);
|
|
953 |
#endif
|
|
954 |
|
|
955 |
return MNG_NOERROR;
|
|
956 |
}
|
|
957 |
#endif /* MNG_INCLUDE_JNG */
|
|
958 |
|
|
959 |
/* ************************************************************************** */
|
|
960 |
|
|
961 |
#ifdef MNG_INCLUDE_JNG
|
|
962 |
INIT_CHUNK_HDR (mng_init_jdat)
|
|
963 |
{
|
|
964 |
#ifdef MNG_SUPPORT_TRACE
|
|
965 |
MNG_TRACE (pData, MNG_FN_INIT_JDAT, MNG_LC_START);
|
|
966 |
#endif
|
|
967 |
|
|
968 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_jdat));
|
|
969 |
((mng_jdatp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
970 |
|
|
971 |
#ifdef MNG_SUPPORT_TRACE
|
|
972 |
MNG_TRACE (pData, MNG_FN_INIT_JDAT, MNG_LC_END);
|
|
973 |
#endif
|
|
974 |
|
|
975 |
return MNG_NOERROR;
|
|
976 |
}
|
|
977 |
#endif /* MNG_INCLUDE_JNG */
|
|
978 |
|
|
979 |
/* ************************************************************************** */
|
|
980 |
|
|
981 |
#ifdef MNG_INCLUDE_JNG
|
|
982 |
INIT_CHUNK_HDR (mng_init_jsep)
|
|
983 |
{
|
|
984 |
#ifdef MNG_SUPPORT_TRACE
|
|
985 |
MNG_TRACE (pData, MNG_FN_INIT_JSEP, MNG_LC_START);
|
|
986 |
#endif
|
|
987 |
|
|
988 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_jsep));
|
|
989 |
((mng_jsepp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
990 |
|
|
991 |
#ifdef MNG_SUPPORT_TRACE
|
|
992 |
MNG_TRACE (pData, MNG_FN_INIT_JSEP, MNG_LC_END);
|
|
993 |
#endif
|
|
994 |
|
|
995 |
return MNG_NOERROR;
|
|
996 |
}
|
|
997 |
#endif /* MNG_INCLUDE_JNG */
|
|
998 |
|
|
999 |
/* ************************************************************************** */
|
|
1000 |
|
|
1001 |
#ifndef MNG_NO_DELTA_PNG
|
|
1002 |
INIT_CHUNK_HDR (mng_init_dhdr)
|
|
1003 |
{
|
|
1004 |
#ifdef MNG_SUPPORT_TRACE
|
|
1005 |
MNG_TRACE (pData, MNG_FN_INIT_DHDR, MNG_LC_START);
|
|
1006 |
#endif
|
|
1007 |
|
|
1008 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_dhdr));
|
|
1009 |
((mng_dhdrp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1010 |
|
|
1011 |
#ifdef MNG_SUPPORT_TRACE
|
|
1012 |
MNG_TRACE (pData, MNG_FN_INIT_DHDR, MNG_LC_END);
|
|
1013 |
#endif
|
|
1014 |
|
|
1015 |
return MNG_NOERROR;
|
|
1016 |
}
|
|
1017 |
#endif
|
|
1018 |
|
|
1019 |
/* ************************************************************************** */
|
|
1020 |
|
|
1021 |
#ifndef MNG_NO_DELTA_PNG
|
|
1022 |
INIT_CHUNK_HDR (mng_init_prom)
|
|
1023 |
{
|
|
1024 |
#ifdef MNG_SUPPORT_TRACE
|
|
1025 |
MNG_TRACE (pData, MNG_FN_INIT_PROM, MNG_LC_START);
|
|
1026 |
#endif
|
|
1027 |
|
|
1028 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_prom));
|
|
1029 |
((mng_promp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1030 |
|
|
1031 |
#ifdef MNG_SUPPORT_TRACE
|
|
1032 |
MNG_TRACE (pData, MNG_FN_INIT_PROM, MNG_LC_END);
|
|
1033 |
#endif
|
|
1034 |
|
|
1035 |
return MNG_NOERROR;
|
|
1036 |
}
|
|
1037 |
#endif
|
|
1038 |
|
|
1039 |
/* ************************************************************************** */
|
|
1040 |
|
|
1041 |
#ifndef MNG_NO_DELTA_PNG
|
|
1042 |
INIT_CHUNK_HDR (mng_init_ipng)
|
|
1043 |
{
|
|
1044 |
#ifdef MNG_SUPPORT_TRACE
|
|
1045 |
MNG_TRACE (pData, MNG_FN_INIT_IPNG, MNG_LC_START);
|
|
1046 |
#endif
|
|
1047 |
|
|
1048 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_ipng));
|
|
1049 |
((mng_ipngp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1050 |
|
|
1051 |
#ifdef MNG_SUPPORT_TRACE
|
|
1052 |
MNG_TRACE (pData, MNG_FN_INIT_IPNG, MNG_LC_END);
|
|
1053 |
#endif
|
|
1054 |
|
|
1055 |
return MNG_NOERROR;
|
|
1056 |
}
|
|
1057 |
#endif
|
|
1058 |
|
|
1059 |
/* ************************************************************************** */
|
|
1060 |
|
|
1061 |
#ifndef MNG_NO_DELTA_PNG
|
|
1062 |
INIT_CHUNK_HDR (mng_init_pplt)
|
|
1063 |
{
|
|
1064 |
#ifdef MNG_SUPPORT_TRACE
|
|
1065 |
MNG_TRACE (pData, MNG_FN_INIT_PPLT, MNG_LC_START);
|
|
1066 |
#endif
|
|
1067 |
|
|
1068 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_pplt));
|
|
1069 |
((mng_ppltp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1070 |
|
|
1071 |
#ifdef MNG_SUPPORT_TRACE
|
|
1072 |
MNG_TRACE (pData, MNG_FN_INIT_PPLT, MNG_LC_END);
|
|
1073 |
#endif
|
|
1074 |
|
|
1075 |
return MNG_NOERROR;
|
|
1076 |
}
|
|
1077 |
#endif
|
|
1078 |
|
|
1079 |
/* ************************************************************************** */
|
|
1080 |
|
|
1081 |
#ifndef MNG_NO_DELTA_PNG
|
|
1082 |
#ifdef MNG_INCLUDE_JNG
|
|
1083 |
INIT_CHUNK_HDR (mng_init_ijng)
|
|
1084 |
{
|
|
1085 |
#ifdef MNG_SUPPORT_TRACE
|
|
1086 |
MNG_TRACE (pData, MNG_FN_INIT_IJNG, MNG_LC_START);
|
|
1087 |
#endif
|
|
1088 |
|
|
1089 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_ijng));
|
|
1090 |
((mng_ijngp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1091 |
|
|
1092 |
#ifdef MNG_SUPPORT_TRACE
|
|
1093 |
MNG_TRACE (pData, MNG_FN_INIT_IJNG, MNG_LC_END);
|
|
1094 |
#endif
|
|
1095 |
|
|
1096 |
return MNG_NOERROR;
|
|
1097 |
}
|
|
1098 |
#endif
|
|
1099 |
#endif
|
|
1100 |
|
|
1101 |
/* ************************************************************************** */
|
|
1102 |
|
|
1103 |
#ifndef MNG_NO_DELTA_PNG
|
|
1104 |
INIT_CHUNK_HDR (mng_init_drop)
|
|
1105 |
{
|
|
1106 |
#ifdef MNG_SUPPORT_TRACE
|
|
1107 |
MNG_TRACE (pData, MNG_FN_INIT_DROP, MNG_LC_START);
|
|
1108 |
#endif
|
|
1109 |
|
|
1110 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_drop));
|
|
1111 |
((mng_dropp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1112 |
|
|
1113 |
#ifdef MNG_SUPPORT_TRACE
|
|
1114 |
MNG_TRACE (pData, MNG_FN_INIT_DROP, MNG_LC_END);
|
|
1115 |
#endif
|
|
1116 |
|
|
1117 |
return MNG_NOERROR;
|
|
1118 |
}
|
|
1119 |
#endif
|
|
1120 |
|
|
1121 |
|
|
1122 |
/* ************************************************************************** */
|
|
1123 |
|
|
1124 |
#ifndef MNG_NO_DELTA_PNG
|
|
1125 |
#ifndef MNG_SKIPCHUNK_DBYK
|
|
1126 |
INIT_CHUNK_HDR (mng_init_dbyk)
|
|
1127 |
{
|
|
1128 |
#ifdef MNG_SUPPORT_TRACE
|
|
1129 |
MNG_TRACE (pData, MNG_FN_INIT_DBYK, MNG_LC_START);
|
|
1130 |
#endif
|
|
1131 |
|
|
1132 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_dbyk));
|
|
1133 |
((mng_dbykp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1134 |
|
|
1135 |
#ifdef MNG_SUPPORT_TRACE
|
|
1136 |
MNG_TRACE (pData, MNG_FN_INIT_DBYK, MNG_LC_END);
|
|
1137 |
#endif
|
|
1138 |
|
|
1139 |
return MNG_NOERROR;
|
|
1140 |
}
|
|
1141 |
#endif
|
|
1142 |
#endif
|
|
1143 |
|
|
1144 |
/* ************************************************************************** */
|
|
1145 |
|
|
1146 |
#ifndef MNG_NO_DELTA_PNG
|
|
1147 |
#ifndef MNG_SKIPCHUNK_ORDR
|
|
1148 |
INIT_CHUNK_HDR (mng_init_ordr)
|
|
1149 |
{
|
|
1150 |
#ifdef MNG_SUPPORT_TRACE
|
|
1151 |
MNG_TRACE (pData, MNG_FN_INIT_ORDR, MNG_LC_START);
|
|
1152 |
#endif
|
|
1153 |
|
|
1154 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_ordr));
|
|
1155 |
((mng_ordrp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1156 |
|
|
1157 |
#ifdef MNG_SUPPORT_TRACE
|
|
1158 |
MNG_TRACE (pData, MNG_FN_INIT_ORDR, MNG_LC_END);
|
|
1159 |
#endif
|
|
1160 |
|
|
1161 |
return MNG_NOERROR;
|
|
1162 |
}
|
|
1163 |
#endif
|
|
1164 |
#endif
|
|
1165 |
|
|
1166 |
/* ************************************************************************** */
|
|
1167 |
|
|
1168 |
#ifndef MNG_SKIPCHUNK_MAGN
|
|
1169 |
INIT_CHUNK_HDR (mng_init_magn)
|
|
1170 |
{
|
|
1171 |
#ifdef MNG_SUPPORT_TRACE
|
|
1172 |
MNG_TRACE (pData, MNG_FN_INIT_MAGN, MNG_LC_START);
|
|
1173 |
#endif
|
|
1174 |
|
|
1175 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_magn));
|
|
1176 |
((mng_magnp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1177 |
|
|
1178 |
#ifdef MNG_SUPPORT_TRACE
|
|
1179 |
MNG_TRACE (pData, MNG_FN_INIT_MAGN, MNG_LC_END);
|
|
1180 |
#endif
|
|
1181 |
|
|
1182 |
return MNG_NOERROR;
|
|
1183 |
}
|
|
1184 |
#endif
|
|
1185 |
|
|
1186 |
/* ************************************************************************** */
|
|
1187 |
|
|
1188 |
#ifndef MNG_SKIPCHUNK_evNT
|
|
1189 |
INIT_CHUNK_HDR (mng_init_evnt)
|
|
1190 |
{
|
|
1191 |
#ifdef MNG_SUPPORT_TRACE
|
|
1192 |
MNG_TRACE (pData, MNG_FN_INIT_EVNT, MNG_LC_START);
|
|
1193 |
#endif
|
|
1194 |
|
|
1195 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_evnt));
|
|
1196 |
((mng_evntp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1197 |
|
|
1198 |
#ifdef MNG_SUPPORT_TRACE
|
|
1199 |
MNG_TRACE (pData, MNG_FN_INIT_EVNT, MNG_LC_END);
|
|
1200 |
#endif
|
|
1201 |
|
|
1202 |
return MNG_NOERROR;
|
|
1203 |
}
|
|
1204 |
#endif
|
|
1205 |
|
|
1206 |
/* ************************************************************************** */
|
|
1207 |
|
|
1208 |
INIT_CHUNK_HDR (mng_init_unknown)
|
|
1209 |
{
|
|
1210 |
#ifdef MNG_SUPPORT_TRACE
|
|
1211 |
MNG_TRACE (pData, MNG_FN_INIT_UNKNOWN, MNG_LC_START);
|
|
1212 |
#endif
|
|
1213 |
|
|
1214 |
MNG_ALLOC (pData, *ppChunk, sizeof (mng_unknown_chunk));
|
|
1215 |
((mng_unknown_chunkp)*ppChunk)->sHeader = *((mng_chunk_headerp)pHeader);
|
|
1216 |
|
|
1217 |
#ifdef MNG_SUPPORT_TRACE
|
|
1218 |
MNG_TRACE (pData, MNG_FN_INIT_UNKNOWN, MNG_LC_END);
|
|
1219 |
#endif
|
|
1220 |
|
|
1221 |
return MNG_NOERROR;
|
|
1222 |
}
|
|
1223 |
|
|
1224 |
/* ************************************************************************** */
|
|
1225 |
|
|
1226 |
#endif /* MNG_OPTIMIZE_CHUNKINITFREE */
|
|
1227 |
|
|
1228 |
/* ************************************************************************** */
|
|
1229 |
/* * * */
|
|
1230 |
/* * Chunk specific cleanup routines * */
|
|
1231 |
/* * * */
|
|
1232 |
/* ************************************************************************** */
|
|
1233 |
|
|
1234 |
#ifdef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1235 |
FREE_CHUNK_HDR (mng_free_general)
|
|
1236 |
{
|
|
1237 |
MNG_FREEX (pData, pHeader, ((mng_chunk_headerp)pHeader)->iChunksize);
|
|
1238 |
return MNG_NOERROR;
|
|
1239 |
}
|
|
1240 |
#endif
|
|
1241 |
|
|
1242 |
/* ************************************************************************** */
|
|
1243 |
|
|
1244 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1245 |
FREE_CHUNK_HDR (mng_free_ihdr)
|
|
1246 |
{
|
|
1247 |
#ifdef MNG_SUPPORT_TRACE
|
|
1248 |
MNG_TRACE (pData, MNG_FN_FREE_IHDR, MNG_LC_START);
|
|
1249 |
#endif
|
|
1250 |
|
|
1251 |
MNG_FREEX (pData, pHeader, sizeof (mng_ihdr));
|
|
1252 |
|
|
1253 |
#ifdef MNG_SUPPORT_TRACE
|
|
1254 |
MNG_TRACE (pData, MNG_FN_FREE_IHDR, MNG_LC_END);
|
|
1255 |
#endif
|
|
1256 |
|
|
1257 |
return MNG_NOERROR;
|
|
1258 |
}
|
|
1259 |
#endif
|
|
1260 |
|
|
1261 |
/* ************************************************************************** */
|
|
1262 |
|
|
1263 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1264 |
FREE_CHUNK_HDR (mng_free_plte)
|
|
1265 |
{
|
|
1266 |
#ifdef MNG_SUPPORT_TRACE
|
|
1267 |
MNG_TRACE (pData, MNG_FN_FREE_PLTE, MNG_LC_START);
|
|
1268 |
#endif
|
|
1269 |
|
|
1270 |
MNG_FREEX (pData, pHeader, sizeof (mng_plte));
|
|
1271 |
|
|
1272 |
#ifdef MNG_SUPPORT_TRACE
|
|
1273 |
MNG_TRACE (pData, MNG_FN_FREE_PLTE, MNG_LC_END);
|
|
1274 |
#endif
|
|
1275 |
|
|
1276 |
return MNG_NOERROR;
|
|
1277 |
}
|
|
1278 |
#endif
|
|
1279 |
|
|
1280 |
/* ************************************************************************** */
|
|
1281 |
|
|
1282 |
FREE_CHUNK_HDR (mng_free_idat)
|
|
1283 |
{
|
|
1284 |
#ifdef MNG_SUPPORT_TRACE
|
|
1285 |
MNG_TRACE (pData, MNG_FN_FREE_IDAT, MNG_LC_START);
|
|
1286 |
#endif
|
|
1287 |
|
|
1288 |
if (((mng_idatp)pHeader)->iDatasize)
|
|
1289 |
MNG_FREEX (pData, ((mng_idatp)pHeader)->pData,
|
|
1290 |
((mng_idatp)pHeader)->iDatasize);
|
|
1291 |
|
|
1292 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1293 |
MNG_FREEX (pData, pHeader, sizeof (mng_idat));
|
|
1294 |
#endif
|
|
1295 |
|
|
1296 |
#ifdef MNG_SUPPORT_TRACE
|
|
1297 |
MNG_TRACE (pData, MNG_FN_FREE_IDAT, MNG_LC_END);
|
|
1298 |
#endif
|
|
1299 |
|
|
1300 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1301 |
return MNG_NOERROR;
|
|
1302 |
#else
|
|
1303 |
return mng_free_general(pData, pHeader);
|
|
1304 |
#endif
|
|
1305 |
}
|
|
1306 |
|
|
1307 |
/* ************************************************************************** */
|
|
1308 |
|
|
1309 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1310 |
FREE_CHUNK_HDR (mng_free_iend)
|
|
1311 |
{
|
|
1312 |
#ifdef MNG_SUPPORT_TRACE
|
|
1313 |
MNG_TRACE (pData, MNG_FN_FREE_IEND, MNG_LC_START);
|
|
1314 |
#endif
|
|
1315 |
|
|
1316 |
MNG_FREEX (pData, pHeader, sizeof (mng_iend));
|
|
1317 |
|
|
1318 |
#ifdef MNG_SUPPORT_TRACE
|
|
1319 |
MNG_TRACE (pData, MNG_FN_FREE_IEND, MNG_LC_END);
|
|
1320 |
#endif
|
|
1321 |
|
|
1322 |
return MNG_NOERROR;
|
|
1323 |
}
|
|
1324 |
#endif
|
|
1325 |
|
|
1326 |
/* ************************************************************************** */
|
|
1327 |
|
|
1328 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1329 |
FREE_CHUNK_HDR (mng_free_trns)
|
|
1330 |
{
|
|
1331 |
#ifdef MNG_SUPPORT_TRACE
|
|
1332 |
MNG_TRACE (pData, MNG_FN_FREE_TRNS, MNG_LC_START);
|
|
1333 |
#endif
|
|
1334 |
|
|
1335 |
MNG_FREEX (pData, pHeader, sizeof (mng_trns));
|
|
1336 |
|
|
1337 |
#ifdef MNG_SUPPORT_TRACE
|
|
1338 |
MNG_TRACE (pData, MNG_FN_FREE_TRNS, MNG_LC_END);
|
|
1339 |
#endif
|
|
1340 |
|
|
1341 |
return MNG_NOERROR;
|
|
1342 |
}
|
|
1343 |
#endif
|
|
1344 |
|
|
1345 |
/* ************************************************************************** */
|
|
1346 |
|
|
1347 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1348 |
#ifndef MNG_SKIPCHUNK_gAMA
|
|
1349 |
FREE_CHUNK_HDR (mng_free_gama)
|
|
1350 |
{
|
|
1351 |
#ifdef MNG_SUPPORT_TRACE
|
|
1352 |
MNG_TRACE (pData, MNG_FN_FREE_GAMA, MNG_LC_START);
|
|
1353 |
#endif
|
|
1354 |
|
|
1355 |
MNG_FREEX (pData, pHeader, sizeof (mng_gama));
|
|
1356 |
|
|
1357 |
#ifdef MNG_SUPPORT_TRACE
|
|
1358 |
MNG_TRACE (pData, MNG_FN_FREE_GAMA, MNG_LC_END);
|
|
1359 |
#endif
|
|
1360 |
|
|
1361 |
return MNG_NOERROR;
|
|
1362 |
}
|
|
1363 |
#endif
|
|
1364 |
#endif
|
|
1365 |
|
|
1366 |
/* ************************************************************************** */
|
|
1367 |
|
|
1368 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1369 |
#ifndef MNG_SKIPCHUNK_cHRM
|
|
1370 |
FREE_CHUNK_HDR (mng_free_chrm)
|
|
1371 |
{
|
|
1372 |
#ifdef MNG_SUPPORT_TRACE
|
|
1373 |
MNG_TRACE (pData, MNG_FN_FREE_CHRM, MNG_LC_START);
|
|
1374 |
#endif
|
|
1375 |
|
|
1376 |
MNG_FREEX (pData, pHeader, sizeof (mng_chrm));
|
|
1377 |
|
|
1378 |
#ifdef MNG_SUPPORT_TRACE
|
|
1379 |
MNG_TRACE (pData, MNG_FN_FREE_CHRM, MNG_LC_END);
|
|
1380 |
#endif
|
|
1381 |
|
|
1382 |
return MNG_NOERROR;
|
|
1383 |
}
|
|
1384 |
#endif
|
|
1385 |
#endif
|
|
1386 |
|
|
1387 |
/* ************************************************************************** */
|
|
1388 |
|
|
1389 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1390 |
#ifndef MNG_SKIPCHUNK_sRGB
|
|
1391 |
FREE_CHUNK_HDR (mng_free_srgb)
|
|
1392 |
{
|
|
1393 |
#ifdef MNG_SUPPORT_TRACE
|
|
1394 |
MNG_TRACE (pData, MNG_FN_FREE_SRGB, MNG_LC_START);
|
|
1395 |
#endif
|
|
1396 |
|
|
1397 |
MNG_FREEX (pData, pHeader, sizeof (mng_srgb));
|
|
1398 |
|
|
1399 |
#ifdef MNG_SUPPORT_TRACE
|
|
1400 |
MNG_TRACE (pData, MNG_FN_FREE_SRGB, MNG_LC_END);
|
|
1401 |
#endif
|
|
1402 |
|
|
1403 |
return MNG_NOERROR;
|
|
1404 |
}
|
|
1405 |
#endif
|
|
1406 |
#endif
|
|
1407 |
|
|
1408 |
/* ************************************************************************** */
|
|
1409 |
|
|
1410 |
#ifndef MNG_SKIPCHUNK_iCCP
|
|
1411 |
FREE_CHUNK_HDR (mng_free_iccp)
|
|
1412 |
{
|
|
1413 |
#ifdef MNG_SUPPORT_TRACE
|
|
1414 |
MNG_TRACE (pData, MNG_FN_FREE_ICCP, MNG_LC_START);
|
|
1415 |
#endif
|
|
1416 |
|
|
1417 |
if (((mng_iccpp)pHeader)->iNamesize)
|
|
1418 |
MNG_FREEX (pData, ((mng_iccpp)pHeader)->zName,
|
|
1419 |
((mng_iccpp)pHeader)->iNamesize + 1);
|
|
1420 |
|
|
1421 |
if (((mng_iccpp)pHeader)->iProfilesize)
|
|
1422 |
MNG_FREEX (pData, ((mng_iccpp)pHeader)->pProfile,
|
|
1423 |
((mng_iccpp)pHeader)->iProfilesize);
|
|
1424 |
|
|
1425 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1426 |
MNG_FREEX (pData, pHeader, sizeof (mng_iccp));
|
|
1427 |
#endif
|
|
1428 |
|
|
1429 |
#ifdef MNG_SUPPORT_TRACE
|
|
1430 |
MNG_TRACE (pData, MNG_FN_FREE_ICCP, MNG_LC_END);
|
|
1431 |
#endif
|
|
1432 |
|
|
1433 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1434 |
return MNG_NOERROR;
|
|
1435 |
#else
|
|
1436 |
return mng_free_general(pData, pHeader);
|
|
1437 |
#endif
|
|
1438 |
}
|
|
1439 |
#endif
|
|
1440 |
|
|
1441 |
/* ************************************************************************** */
|
|
1442 |
|
|
1443 |
#ifndef MNG_SKIPCHUNK_tEXt
|
|
1444 |
FREE_CHUNK_HDR (mng_free_text)
|
|
1445 |
{
|
|
1446 |
#ifdef MNG_SUPPORT_TRACE
|
|
1447 |
MNG_TRACE (pData, MNG_FN_FREE_TEXT, MNG_LC_START);
|
|
1448 |
#endif
|
|
1449 |
|
|
1450 |
if (((mng_textp)pHeader)->iKeywordsize)
|
|
1451 |
MNG_FREEX (pData, ((mng_textp)pHeader)->zKeyword,
|
|
1452 |
((mng_textp)pHeader)->iKeywordsize + 1);
|
|
1453 |
|
|
1454 |
if (((mng_textp)pHeader)->iTextsize)
|
|
1455 |
MNG_FREEX (pData, ((mng_textp)pHeader)->zText,
|
|
1456 |
((mng_textp)pHeader)->iTextsize + 1);
|
|
1457 |
|
|
1458 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1459 |
MNG_FREEX (pData, pHeader, sizeof (mng_text));
|
|
1460 |
#endif
|
|
1461 |
|
|
1462 |
#ifdef MNG_SUPPORT_TRACE
|
|
1463 |
MNG_TRACE (pData, MNG_FN_FREE_TEXT, MNG_LC_END);
|
|
1464 |
#endif
|
|
1465 |
|
|
1466 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1467 |
return MNG_NOERROR;
|
|
1468 |
#else
|
|
1469 |
return mng_free_general(pData, pHeader);
|
|
1470 |
#endif
|
|
1471 |
}
|
|
1472 |
#endif
|
|
1473 |
|
|
1474 |
/* ************************************************************************** */
|
|
1475 |
|
|
1476 |
#ifndef MNG_SKIPCHUNK_zTXt
|
|
1477 |
FREE_CHUNK_HDR (mng_free_ztxt)
|
|
1478 |
{
|
|
1479 |
#ifdef MNG_SUPPORT_TRACE
|
|
1480 |
MNG_TRACE (pData, MNG_FN_FREE_ZTXT, MNG_LC_START);
|
|
1481 |
#endif
|
|
1482 |
|
|
1483 |
if (((mng_ztxtp)pHeader)->iKeywordsize)
|
|
1484 |
MNG_FREEX (pData, ((mng_ztxtp)pHeader)->zKeyword,
|
|
1485 |
((mng_ztxtp)pHeader)->iKeywordsize + 1);
|
|
1486 |
|
|
1487 |
if (((mng_ztxtp)pHeader)->iTextsize)
|
|
1488 |
MNG_FREEX (pData, ((mng_ztxtp)pHeader)->zText,
|
|
1489 |
((mng_ztxtp)pHeader)->iTextsize);
|
|
1490 |
|
|
1491 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1492 |
MNG_FREEX (pData, pHeader, sizeof (mng_ztxt));
|
|
1493 |
#endif
|
|
1494 |
|
|
1495 |
#ifdef MNG_SUPPORT_TRACE
|
|
1496 |
MNG_TRACE (pData, MNG_FN_FREE_ZTXT, MNG_LC_END);
|
|
1497 |
#endif
|
|
1498 |
|
|
1499 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1500 |
return MNG_NOERROR;
|
|
1501 |
#else
|
|
1502 |
return mng_free_general(pData, pHeader);
|
|
1503 |
#endif
|
|
1504 |
}
|
|
1505 |
#endif
|
|
1506 |
|
|
1507 |
/* ************************************************************************** */
|
|
1508 |
#ifndef MNG_SKIPCHUNK_iTXt
|
|
1509 |
FREE_CHUNK_HDR (mng_free_itxt)
|
|
1510 |
{
|
|
1511 |
#ifdef MNG_SUPPORT_TRACE
|
|
1512 |
MNG_TRACE (pData, MNG_FN_FREE_ITXT, MNG_LC_START);
|
|
1513 |
#endif
|
|
1514 |
|
|
1515 |
if (((mng_itxtp)pHeader)->iKeywordsize)
|
|
1516 |
MNG_FREEX (pData, ((mng_itxtp)pHeader)->zKeyword,
|
|
1517 |
((mng_itxtp)pHeader)->iKeywordsize + 1);
|
|
1518 |
|
|
1519 |
if (((mng_itxtp)pHeader)->iLanguagesize)
|
|
1520 |
MNG_FREEX (pData, ((mng_itxtp)pHeader)->zLanguage,
|
|
1521 |
((mng_itxtp)pHeader)->iLanguagesize + 1);
|
|
1522 |
|
|
1523 |
if (((mng_itxtp)pHeader)->iTranslationsize)
|
|
1524 |
MNG_FREEX (pData, ((mng_itxtp)pHeader)->zTranslation,
|
|
1525 |
((mng_itxtp)pHeader)->iTranslationsize + 1);
|
|
1526 |
|
|
1527 |
if (((mng_itxtp)pHeader)->iTextsize)
|
|
1528 |
MNG_FREEX (pData, ((mng_itxtp)pHeader)->zText,
|
|
1529 |
((mng_itxtp)pHeader)->iTextsize);
|
|
1530 |
|
|
1531 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1532 |
MNG_FREEX (pData, pHeader, sizeof (mng_itxt));
|
|
1533 |
#endif
|
|
1534 |
|
|
1535 |
#ifdef MNG_SUPPORT_TRACE
|
|
1536 |
MNG_TRACE (pData, MNG_FN_FREE_ITXT, MNG_LC_END);
|
|
1537 |
#endif
|
|
1538 |
|
|
1539 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1540 |
return MNG_NOERROR;
|
|
1541 |
#else
|
|
1542 |
return mng_free_general(pData, pHeader);
|
|
1543 |
#endif
|
|
1544 |
}
|
|
1545 |
#endif
|
|
1546 |
|
|
1547 |
/* ************************************************************************** */
|
|
1548 |
#ifdef MNG_INCLUDE_MPNG_PROPOSAL
|
|
1549 |
FREE_CHUNK_HDR (mng_free_mpng)
|
|
1550 |
{
|
|
1551 |
#ifdef MNG_SUPPORT_TRACE
|
|
1552 |
MNG_TRACE (pData, MNG_FN_FREE_MPNG, MNG_LC_START);
|
|
1553 |
#endif
|
|
1554 |
|
|
1555 |
if (((mng_mpngp)pHeader)->iFramessize)
|
|
1556 |
MNG_FREEX (pData, ((mng_mpngp)pHeader)->pFrames,
|
|
1557 |
((mng_mpngp)pHeader)->iFramessize);
|
|
1558 |
|
|
1559 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1560 |
MNG_FREEX (pData, pHeader, sizeof (mng_mpng));
|
|
1561 |
#endif
|
|
1562 |
|
|
1563 |
#ifdef MNG_SUPPORT_TRACE
|
|
1564 |
MNG_TRACE (pData, MNG_FN_FREE_MPNG, MNG_LC_END);
|
|
1565 |
#endif
|
|
1566 |
|
|
1567 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1568 |
return MNG_NOERROR;
|
|
1569 |
#else
|
|
1570 |
return mng_free_general(pData, pHeader);
|
|
1571 |
#endif
|
|
1572 |
}
|
|
1573 |
#endif
|
|
1574 |
|
|
1575 |
/* ************************************************************************** */
|
|
1576 |
#ifdef MNG_INCLUDE_ANG_PROPOSAL
|
|
1577 |
FREE_CHUNK_HDR (mng_free_adat)
|
|
1578 |
{
|
|
1579 |
#ifdef MNG_SUPPORT_TRACE
|
|
1580 |
MNG_TRACE (pData, MNG_FN_FREE_ADAT, MNG_LC_START);
|
|
1581 |
#endif
|
|
1582 |
|
|
1583 |
if (((mng_adatp)pHeader)->iTilessize)
|
|
1584 |
MNG_FREEX (pData, ((mng_adatp)pHeader)->pTiles, ((mng_adatp)pHeader)->iTilessize);
|
|
1585 |
|
|
1586 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1587 |
MNG_FREEX (pData, pHeader, sizeof (mng_adat));
|
|
1588 |
#endif
|
|
1589 |
|
|
1590 |
#ifdef MNG_SUPPORT_TRACE
|
|
1591 |
MNG_TRACE (pData, MNG_FN_FREE_ADAT, MNG_LC_END);
|
|
1592 |
#endif
|
|
1593 |
|
|
1594 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1595 |
return MNG_NOERROR;
|
|
1596 |
#else
|
|
1597 |
return mng_free_general(pData, pHeader);
|
|
1598 |
#endif
|
|
1599 |
}
|
|
1600 |
#endif
|
|
1601 |
|
|
1602 |
/* ************************************************************************** */
|
|
1603 |
|
|
1604 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1605 |
#ifndef MNG_SKIPCHUNK_bKGD
|
|
1606 |
FREE_CHUNK_HDR (mng_free_bkgd)
|
|
1607 |
{
|
|
1608 |
#ifdef MNG_SUPPORT_TRACE
|
|
1609 |
MNG_TRACE (pData, MNG_FN_FREE_BKGD, MNG_LC_START);
|
|
1610 |
#endif
|
|
1611 |
|
|
1612 |
MNG_FREEX (pData, pHeader, sizeof (mng_bkgd));
|
|
1613 |
|
|
1614 |
#ifdef MNG_SUPPORT_TRACE
|
|
1615 |
MNG_TRACE (pData, MNG_FN_FREE_BKGD, MNG_LC_END);
|
|
1616 |
#endif
|
|
1617 |
|
|
1618 |
return MNG_NOERROR;
|
|
1619 |
}
|
|
1620 |
#endif
|
|
1621 |
#endif
|
|
1622 |
|
|
1623 |
/* ************************************************************************** */
|
|
1624 |
|
|
1625 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1626 |
#ifndef MNG_SKIPCHUNK_pHYs
|
|
1627 |
FREE_CHUNK_HDR (mng_free_phys)
|
|
1628 |
{
|
|
1629 |
#ifdef MNG_SUPPORT_TRACE
|
|
1630 |
MNG_TRACE (pData, MNG_FN_FREE_PHYS, MNG_LC_START);
|
|
1631 |
#endif
|
|
1632 |
|
|
1633 |
MNG_FREEX (pData, pHeader, sizeof (mng_phys));
|
|
1634 |
|
|
1635 |
#ifdef MNG_SUPPORT_TRACE
|
|
1636 |
MNG_TRACE (pData, MNG_FN_FREE_PHYS, MNG_LC_END);
|
|
1637 |
#endif
|
|
1638 |
|
|
1639 |
return MNG_NOERROR;
|
|
1640 |
}
|
|
1641 |
#endif
|
|
1642 |
#endif
|
|
1643 |
|
|
1644 |
/* ************************************************************************** */
|
|
1645 |
|
|
1646 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1647 |
#ifndef MNG_SKIPCHUNK_sBIT
|
|
1648 |
FREE_CHUNK_HDR (mng_free_sbit)
|
|
1649 |
{
|
|
1650 |
#ifdef MNG_SUPPORT_TRACE
|
|
1651 |
MNG_TRACE (pData, MNG_FN_FREE_SBIT, MNG_LC_START);
|
|
1652 |
#endif
|
|
1653 |
|
|
1654 |
MNG_FREEX (pData, pHeader, sizeof (mng_sbit));
|
|
1655 |
|
|
1656 |
#ifdef MNG_SUPPORT_TRACE
|
|
1657 |
MNG_TRACE (pData, MNG_FN_FREE_SBIT, MNG_LC_END);
|
|
1658 |
#endif
|
|
1659 |
|
|
1660 |
return MNG_NOERROR;
|
|
1661 |
}
|
|
1662 |
#endif
|
|
1663 |
#endif
|
|
1664 |
|
|
1665 |
/* ************************************************************************** */
|
|
1666 |
|
|
1667 |
#ifndef MNG_SKIPCHUNK_sPLT
|
|
1668 |
FREE_CHUNK_HDR (mng_free_splt)
|
|
1669 |
{
|
|
1670 |
#ifdef MNG_SUPPORT_TRACE
|
|
1671 |
MNG_TRACE (pData, MNG_FN_FREE_SPLT, MNG_LC_START);
|
|
1672 |
#endif
|
|
1673 |
|
|
1674 |
if (((mng_spltp)pHeader)->iNamesize)
|
|
1675 |
MNG_FREEX (pData, ((mng_spltp)pHeader)->zName,
|
|
1676 |
((mng_spltp)pHeader)->iNamesize + 1);
|
|
1677 |
|
|
1678 |
if (((mng_spltp)pHeader)->iEntrycount)
|
|
1679 |
MNG_FREEX (pData, ((mng_spltp)pHeader)->pEntries,
|
|
1680 |
((mng_spltp)pHeader)->iEntrycount *
|
|
1681 |
(((mng_spltp)pHeader)->iSampledepth * 3 + sizeof (mng_uint16)) );
|
|
1682 |
|
|
1683 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1684 |
MNG_FREEX (pData, pHeader, sizeof (mng_splt));
|
|
1685 |
#endif
|
|
1686 |
|
|
1687 |
#ifdef MNG_SUPPORT_TRACE
|
|
1688 |
MNG_TRACE (pData, MNG_FN_FREE_SPLT, MNG_LC_END);
|
|
1689 |
#endif
|
|
1690 |
|
|
1691 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1692 |
return MNG_NOERROR;
|
|
1693 |
#else
|
|
1694 |
return mng_free_general(pData, pHeader);
|
|
1695 |
#endif
|
|
1696 |
}
|
|
1697 |
#endif
|
|
1698 |
|
|
1699 |
/* ************************************************************************** */
|
|
1700 |
|
|
1701 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1702 |
#ifndef MNG_SKIPCHUNK_hIST
|
|
1703 |
FREE_CHUNK_HDR (mng_free_hist)
|
|
1704 |
{
|
|
1705 |
#ifdef MNG_SUPPORT_TRACE
|
|
1706 |
MNG_TRACE (pData, MNG_FN_FREE_HIST, MNG_LC_START);
|
|
1707 |
#endif
|
|
1708 |
|
|
1709 |
MNG_FREEX (pData, pHeader, sizeof (mng_hist));
|
|
1710 |
|
|
1711 |
#ifdef MNG_SUPPORT_TRACE
|
|
1712 |
MNG_TRACE (pData, MNG_FN_FREE_HIST, MNG_LC_END);
|
|
1713 |
#endif
|
|
1714 |
|
|
1715 |
return MNG_NOERROR;
|
|
1716 |
}
|
|
1717 |
#endif
|
|
1718 |
#endif
|
|
1719 |
|
|
1720 |
/* ************************************************************************** */
|
|
1721 |
|
|
1722 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1723 |
#ifndef MNG_SKIPCHUNK_tIME
|
|
1724 |
FREE_CHUNK_HDR (mng_free_time)
|
|
1725 |
{
|
|
1726 |
#ifdef MNG_SUPPORT_TRACE
|
|
1727 |
MNG_TRACE (pData, MNG_FN_FREE_TIME, MNG_LC_START);
|
|
1728 |
#endif
|
|
1729 |
|
|
1730 |
MNG_FREEX (pData, pHeader, sizeof (mng_time));
|
|
1731 |
|
|
1732 |
#ifdef MNG_SUPPORT_TRACE
|
|
1733 |
MNG_TRACE (pData, MNG_FN_FREE_TIME, MNG_LC_END);
|
|
1734 |
#endif
|
|
1735 |
|
|
1736 |
return MNG_NOERROR;
|
|
1737 |
}
|
|
1738 |
#endif
|
|
1739 |
#endif
|
|
1740 |
|
|
1741 |
/* ************************************************************************** */
|
|
1742 |
|
|
1743 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1744 |
FREE_CHUNK_HDR (mng_free_mhdr)
|
|
1745 |
{
|
|
1746 |
#ifdef MNG_SUPPORT_TRACE
|
|
1747 |
MNG_TRACE (pData, MNG_FN_FREE_MHDR, MNG_LC_START);
|
|
1748 |
#endif
|
|
1749 |
|
|
1750 |
MNG_FREEX (pData, pHeader, sizeof (mng_mhdr));
|
|
1751 |
|
|
1752 |
#ifdef MNG_SUPPORT_TRACE
|
|
1753 |
MNG_TRACE (pData, MNG_FN_FREE_MHDR, MNG_LC_END);
|
|
1754 |
#endif
|
|
1755 |
|
|
1756 |
return MNG_NOERROR;
|
|
1757 |
}
|
|
1758 |
#endif
|
|
1759 |
|
|
1760 |
/* ************************************************************************** */
|
|
1761 |
|
|
1762 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1763 |
FREE_CHUNK_HDR (mng_free_mend)
|
|
1764 |
{
|
|
1765 |
#ifdef MNG_SUPPORT_TRACE
|
|
1766 |
MNG_TRACE (pData, MNG_FN_FREE_MEND, MNG_LC_START);
|
|
1767 |
#endif
|
|
1768 |
|
|
1769 |
MNG_FREEX (pData, pHeader, sizeof (mng_mend));
|
|
1770 |
|
|
1771 |
#ifdef MNG_SUPPORT_TRACE
|
|
1772 |
MNG_TRACE (pData, MNG_FN_FREE_MEND, MNG_LC_END);
|
|
1773 |
#endif
|
|
1774 |
|
|
1775 |
return MNG_NOERROR;
|
|
1776 |
}
|
|
1777 |
#endif
|
|
1778 |
|
|
1779 |
/* ************************************************************************** */
|
|
1780 |
|
|
1781 |
#ifndef MNG_SKIPCHUNK_LOOP
|
|
1782 |
FREE_CHUNK_HDR (mng_free_loop)
|
|
1783 |
{
|
|
1784 |
#ifdef MNG_SUPPORT_TRACE
|
|
1785 |
MNG_TRACE (pData, MNG_FN_FREE_LOOP, MNG_LC_START);
|
|
1786 |
#endif
|
|
1787 |
|
|
1788 |
#ifndef MNG_NO_LOOP_SIGNALS_SUPPORTED
|
|
1789 |
if (((mng_loopp)pHeader)->iCount)
|
|
1790 |
MNG_FREEX (pData, ((mng_loopp)pHeader)->pSignals,
|
|
1791 |
((mng_loopp)pHeader)->iCount * sizeof (mng_uint32) );
|
|
1792 |
#endif
|
|
1793 |
|
|
1794 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1795 |
MNG_FREEX (pData, pHeader, sizeof (mng_loop));
|
|
1796 |
#endif
|
|
1797 |
|
|
1798 |
#ifdef MNG_SUPPORT_TRACE
|
|
1799 |
MNG_TRACE (pData, MNG_FN_FREE_LOOP, MNG_LC_END);
|
|
1800 |
#endif
|
|
1801 |
|
|
1802 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1803 |
return MNG_NOERROR;
|
|
1804 |
#else
|
|
1805 |
return mng_free_general(pData, pHeader);
|
|
1806 |
#endif
|
|
1807 |
}
|
|
1808 |
|
|
1809 |
/* ************************************************************************** */
|
|
1810 |
|
|
1811 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1812 |
FREE_CHUNK_HDR (mng_free_endl)
|
|
1813 |
{
|
|
1814 |
#ifdef MNG_SUPPORT_TRACE
|
|
1815 |
MNG_TRACE (pData, MNG_FN_FREE_ENDL, MNG_LC_START);
|
|
1816 |
#endif
|
|
1817 |
|
|
1818 |
MNG_FREEX (pData, pHeader, sizeof (mng_endl));
|
|
1819 |
|
|
1820 |
#ifdef MNG_SUPPORT_TRACE
|
|
1821 |
MNG_TRACE (pData, MNG_FN_FREE_ENDL, MNG_LC_END);
|
|
1822 |
#endif
|
|
1823 |
|
|
1824 |
return MNG_NOERROR;
|
|
1825 |
}
|
|
1826 |
#endif
|
|
1827 |
#endif
|
|
1828 |
|
|
1829 |
/* ************************************************************************** */
|
|
1830 |
|
|
1831 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1832 |
#ifndef MNG_SKIPCHUNK_DEFI
|
|
1833 |
FREE_CHUNK_HDR (mng_free_defi)
|
|
1834 |
{
|
|
1835 |
#ifdef MNG_SUPPORT_TRACE
|
|
1836 |
MNG_TRACE (pData, MNG_FN_FREE_DEFI, MNG_LC_START);
|
|
1837 |
#endif
|
|
1838 |
|
|
1839 |
MNG_FREEX (pData, pHeader, sizeof (mng_defi));
|
|
1840 |
|
|
1841 |
#ifdef MNG_SUPPORT_TRACE
|
|
1842 |
MNG_TRACE (pData, MNG_FN_FREE_DEFI, MNG_LC_END);
|
|
1843 |
#endif
|
|
1844 |
|
|
1845 |
return MNG_NOERROR;
|
|
1846 |
}
|
|
1847 |
#endif
|
|
1848 |
#endif
|
|
1849 |
|
|
1850 |
/* ************************************************************************** */
|
|
1851 |
|
|
1852 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1853 |
#ifndef MNG_SKIPCHUNK_BASI
|
|
1854 |
FREE_CHUNK_HDR (mng_free_basi)
|
|
1855 |
{
|
|
1856 |
#ifdef MNG_SUPPORT_TRACE
|
|
1857 |
MNG_TRACE (pData, MNG_FN_FREE_BASI, MNG_LC_START);
|
|
1858 |
#endif
|
|
1859 |
|
|
1860 |
MNG_FREEX (pData, pHeader, sizeof (mng_basi));
|
|
1861 |
|
|
1862 |
#ifdef MNG_SUPPORT_TRACE
|
|
1863 |
MNG_TRACE (pData, MNG_FN_FREE_BASI, MNG_LC_END);
|
|
1864 |
#endif
|
|
1865 |
|
|
1866 |
return MNG_NOERROR;
|
|
1867 |
}
|
|
1868 |
#endif
|
|
1869 |
#endif
|
|
1870 |
|
|
1871 |
/* ************************************************************************** */
|
|
1872 |
|
|
1873 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1874 |
#ifndef MNG_SKIPCHUNK_CLON
|
|
1875 |
FREE_CHUNK_HDR (mng_free_clon)
|
|
1876 |
{
|
|
1877 |
#ifdef MNG_SUPPORT_TRACE
|
|
1878 |
MNG_TRACE (pData, MNG_FN_FREE_CLON, MNG_LC_START);
|
|
1879 |
#endif
|
|
1880 |
|
|
1881 |
MNG_FREEX (pData, pHeader, sizeof (mng_clon));
|
|
1882 |
|
|
1883 |
#ifdef MNG_SUPPORT_TRACE
|
|
1884 |
MNG_TRACE (pData, MNG_FN_FREE_CLON, MNG_LC_END);
|
|
1885 |
#endif
|
|
1886 |
|
|
1887 |
return MNG_NOERROR;
|
|
1888 |
}
|
|
1889 |
#endif
|
|
1890 |
#endif
|
|
1891 |
|
|
1892 |
/* ************************************************************************** */
|
|
1893 |
|
|
1894 |
#ifndef MNG_SKIPCHUNK_PAST
|
|
1895 |
FREE_CHUNK_HDR (mng_free_past)
|
|
1896 |
{
|
|
1897 |
#ifdef MNG_SUPPORT_TRACE
|
|
1898 |
MNG_TRACE (pData, MNG_FN_FREE_PAST, MNG_LC_START);
|
|
1899 |
#endif
|
|
1900 |
|
|
1901 |
if (((mng_pastp)pHeader)->iCount)
|
|
1902 |
MNG_FREEX (pData, ((mng_pastp)pHeader)->pSources,
|
|
1903 |
((mng_pastp)pHeader)->iCount * sizeof (mng_past_source) );
|
|
1904 |
|
|
1905 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1906 |
MNG_FREEX (pData, pHeader, sizeof (mng_past));
|
|
1907 |
#endif
|
|
1908 |
|
|
1909 |
#ifdef MNG_SUPPORT_TRACE
|
|
1910 |
MNG_TRACE (pData, MNG_FN_FREE_PAST, MNG_LC_END);
|
|
1911 |
#endif
|
|
1912 |
|
|
1913 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1914 |
return MNG_NOERROR;
|
|
1915 |
#else
|
|
1916 |
return mng_free_general(pData, pHeader);
|
|
1917 |
#endif
|
|
1918 |
}
|
|
1919 |
#endif
|
|
1920 |
|
|
1921 |
/* ************************************************************************** */
|
|
1922 |
|
|
1923 |
#ifndef MNG_SKIPCHUNK_DISC
|
|
1924 |
FREE_CHUNK_HDR (mng_free_disc)
|
|
1925 |
{
|
|
1926 |
#ifdef MNG_SUPPORT_TRACE
|
|
1927 |
MNG_TRACE (pData, MNG_FN_FREE_DISC, MNG_LC_START);
|
|
1928 |
#endif
|
|
1929 |
|
|
1930 |
if (((mng_discp)pHeader)->iCount)
|
|
1931 |
MNG_FREEX (pData, ((mng_discp)pHeader)->pObjectids,
|
|
1932 |
((mng_discp)pHeader)->iCount * sizeof (mng_uint16) );
|
|
1933 |
|
|
1934 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1935 |
MNG_FREEX (pData, pHeader, sizeof (mng_disc));
|
|
1936 |
#endif
|
|
1937 |
|
|
1938 |
#ifdef MNG_SUPPORT_TRACE
|
|
1939 |
MNG_TRACE (pData, MNG_FN_FREE_DISC, MNG_LC_END);
|
|
1940 |
#endif
|
|
1941 |
|
|
1942 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1943 |
return MNG_NOERROR;
|
|
1944 |
#else
|
|
1945 |
return mng_free_general(pData, pHeader);
|
|
1946 |
#endif
|
|
1947 |
}
|
|
1948 |
#endif
|
|
1949 |
|
|
1950 |
/* ************************************************************************** */
|
|
1951 |
|
|
1952 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1953 |
#ifndef MNG_SKIPCHUNK_BACK
|
|
1954 |
FREE_CHUNK_HDR (mng_free_back)
|
|
1955 |
{
|
|
1956 |
#ifdef MNG_SUPPORT_TRACE
|
|
1957 |
MNG_TRACE (pData, MNG_FN_FREE_BACK, MNG_LC_START);
|
|
1958 |
#endif
|
|
1959 |
|
|
1960 |
MNG_FREEX (pData, pHeader, sizeof (mng_back));
|
|
1961 |
|
|
1962 |
#ifdef MNG_SUPPORT_TRACE
|
|
1963 |
MNG_TRACE (pData, MNG_FN_FREE_BACK, MNG_LC_END);
|
|
1964 |
#endif
|
|
1965 |
|
|
1966 |
return MNG_NOERROR;
|
|
1967 |
}
|
|
1968 |
#endif
|
|
1969 |
#endif
|
|
1970 |
|
|
1971 |
/* ************************************************************************** */
|
|
1972 |
|
|
1973 |
#ifndef MNG_SKIPCHUNK_FRAM
|
|
1974 |
FREE_CHUNK_HDR (mng_free_fram)
|
|
1975 |
{
|
|
1976 |
#ifdef MNG_SUPPORT_TRACE
|
|
1977 |
MNG_TRACE (pData, MNG_FN_FREE_FRAM, MNG_LC_START);
|
|
1978 |
#endif
|
|
1979 |
|
|
1980 |
if (((mng_framp)pHeader)->iNamesize)
|
|
1981 |
MNG_FREEX (pData, ((mng_framp)pHeader)->zName,
|
|
1982 |
((mng_framp)pHeader)->iNamesize + 1);
|
|
1983 |
|
|
1984 |
if (((mng_framp)pHeader)->iCount)
|
|
1985 |
MNG_FREEX (pData, ((mng_framp)pHeader)->pSyncids,
|
|
1986 |
((mng_framp)pHeader)->iCount * sizeof (mng_uint32) );
|
|
1987 |
|
|
1988 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1989 |
MNG_FREEX (pData, pHeader, sizeof (mng_fram));
|
|
1990 |
#endif
|
|
1991 |
|
|
1992 |
#ifdef MNG_SUPPORT_TRACE
|
|
1993 |
MNG_TRACE (pData, MNG_FN_FREE_FRAM, MNG_LC_END);
|
|
1994 |
#endif
|
|
1995 |
|
|
1996 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
1997 |
return MNG_NOERROR;
|
|
1998 |
#else
|
|
1999 |
return mng_free_general(pData, pHeader);
|
|
2000 |
#endif
|
|
2001 |
}
|
|
2002 |
#endif
|
|
2003 |
|
|
2004 |
/* ************************************************************************** */
|
|
2005 |
|
|
2006 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2007 |
#ifndef MNG_SKIPCHUNK_MOVE
|
|
2008 |
FREE_CHUNK_HDR (mng_free_move)
|
|
2009 |
{
|
|
2010 |
#ifdef MNG_SUPPORT_TRACE
|
|
2011 |
MNG_TRACE (pData, MNG_FN_FREE_MOVE, MNG_LC_START);
|
|
2012 |
#endif
|
|
2013 |
|
|
2014 |
MNG_FREEX (pData, pHeader, sizeof (mng_move));
|
|
2015 |
|
|
2016 |
#ifdef MNG_SUPPORT_TRACE
|
|
2017 |
MNG_TRACE (pData, MNG_FN_FREE_MOVE, MNG_LC_END);
|
|
2018 |
#endif
|
|
2019 |
|
|
2020 |
return MNG_NOERROR;
|
|
2021 |
}
|
|
2022 |
#endif
|
|
2023 |
#endif
|
|
2024 |
|
|
2025 |
/* ************************************************************************** */
|
|
2026 |
|
|
2027 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2028 |
#ifndef MNG_SKIPCHUNK_CLIP
|
|
2029 |
FREE_CHUNK_HDR (mng_free_clip)
|
|
2030 |
{
|
|
2031 |
#ifdef MNG_SUPPORT_TRACE
|
|
2032 |
MNG_TRACE (pData, MNG_FN_FREE_CLIP, MNG_LC_START);
|
|
2033 |
#endif
|
|
2034 |
|
|
2035 |
MNG_FREEX (pData, pHeader, sizeof (mng_clip));
|
|
2036 |
|
|
2037 |
#ifdef MNG_SUPPORT_TRACE
|
|
2038 |
MNG_TRACE (pData, MNG_FN_FREE_CLIP, MNG_LC_END);
|
|
2039 |
#endif
|
|
2040 |
|
|
2041 |
return MNG_NOERROR;
|
|
2042 |
}
|
|
2043 |
#endif
|
|
2044 |
#endif
|
|
2045 |
|
|
2046 |
/* ************************************************************************** */
|
|
2047 |
|
|
2048 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2049 |
#ifndef MNG_SKIPCHUNK_SHOW
|
|
2050 |
FREE_CHUNK_HDR (mng_free_show)
|
|
2051 |
{
|
|
2052 |
#ifdef MNG_SUPPORT_TRACE
|
|
2053 |
MNG_TRACE (pData, MNG_FN_FREE_SHOW, MNG_LC_START);
|
|
2054 |
#endif
|
|
2055 |
|
|
2056 |
MNG_FREEX (pData, pHeader, sizeof (mng_show));
|
|
2057 |
|
|
2058 |
#ifdef MNG_SUPPORT_TRACE
|
|
2059 |
MNG_TRACE (pData, MNG_FN_FREE_SHOW, MNG_LC_END);
|
|
2060 |
#endif
|
|
2061 |
|
|
2062 |
return MNG_NOERROR;
|
|
2063 |
}
|
|
2064 |
#endif
|
|
2065 |
#endif
|
|
2066 |
|
|
2067 |
/* ************************************************************************** */
|
|
2068 |
|
|
2069 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2070 |
#ifndef MNG_SKIPCHUNK_TERM
|
|
2071 |
FREE_CHUNK_HDR (mng_free_term)
|
|
2072 |
{
|
|
2073 |
#ifdef MNG_SUPPORT_TRACE
|
|
2074 |
MNG_TRACE (pData, MNG_FN_FREE_TERM, MNG_LC_START);
|
|
2075 |
#endif
|
|
2076 |
|
|
2077 |
MNG_FREEX (pData, pHeader, sizeof (mng_term));
|
|
2078 |
|
|
2079 |
#ifdef MNG_SUPPORT_TRACE
|
|
2080 |
MNG_TRACE (pData, MNG_FN_FREE_TERM, MNG_LC_END);
|
|
2081 |
#endif
|
|
2082 |
|
|
2083 |
return MNG_NOERROR;
|
|
2084 |
}
|
|
2085 |
#endif
|
|
2086 |
#endif
|
|
2087 |
|
|
2088 |
/* ************************************************************************** */
|
|
2089 |
|
|
2090 |
#ifndef MNG_SKIPCHUNK_SAVE
|
|
2091 |
FREE_CHUNK_HDR (mng_free_save)
|
|
2092 |
{
|
|
2093 |
mng_save_entryp pEntry = ((mng_savep)pHeader)->pEntries;
|
|
2094 |
mng_uint32 iX;
|
|
2095 |
|
|
2096 |
#ifdef MNG_SUPPORT_TRACE
|
|
2097 |
MNG_TRACE (pData, MNG_FN_FREE_SAVE, MNG_LC_START);
|
|
2098 |
#endif
|
|
2099 |
|
|
2100 |
for (iX = 0; iX < ((mng_savep)pHeader)->iCount; iX++)
|
|
2101 |
{
|
|
2102 |
if (pEntry->iNamesize)
|
|
2103 |
MNG_FREEX (pData, pEntry->zName, pEntry->iNamesize);
|
|
2104 |
|
|
2105 |
pEntry = pEntry + sizeof (mng_save_entry);
|
|
2106 |
}
|
|
2107 |
|
|
2108 |
if (((mng_savep)pHeader)->iCount)
|
|
2109 |
MNG_FREEX (pData, ((mng_savep)pHeader)->pEntries,
|
|
2110 |
((mng_savep)pHeader)->iCount * sizeof (mng_save_entry) );
|
|
2111 |
|
|
2112 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2113 |
MNG_FREEX (pData, pHeader, sizeof (mng_save));
|
|
2114 |
#endif
|
|
2115 |
|
|
2116 |
#ifdef MNG_SUPPORT_TRACE
|
|
2117 |
MNG_TRACE (pData, MNG_FN_FREE_SAVE, MNG_LC_END);
|
|
2118 |
#endif
|
|
2119 |
|
|
2120 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2121 |
return MNG_NOERROR;
|
|
2122 |
#else
|
|
2123 |
return mng_free_general(pData, pHeader);
|
|
2124 |
#endif
|
|
2125 |
}
|
|
2126 |
#endif
|
|
2127 |
|
|
2128 |
/* ************************************************************************** */
|
|
2129 |
|
|
2130 |
#ifndef MNG_SKIPCHUNK_SEEK
|
|
2131 |
FREE_CHUNK_HDR (mng_free_seek)
|
|
2132 |
{
|
|
2133 |
#ifdef MNG_SUPPORT_TRACE
|
|
2134 |
MNG_TRACE (pData, MNG_FN_FREE_SEEK, MNG_LC_START);
|
|
2135 |
#endif
|
|
2136 |
|
|
2137 |
if (((mng_seekp)pHeader)->iNamesize)
|
|
2138 |
MNG_FREEX (pData, ((mng_seekp)pHeader)->zName,
|
|
2139 |
((mng_seekp)pHeader)->iNamesize + 1);
|
|
2140 |
|
|
2141 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2142 |
MNG_FREEX (pData, pHeader, sizeof (mng_seek));
|
|
2143 |
#endif
|
|
2144 |
|
|
2145 |
#ifdef MNG_SUPPORT_TRACE
|
|
2146 |
MNG_TRACE (pData, MNG_FN_FREE_SEEK, MNG_LC_END);
|
|
2147 |
#endif
|
|
2148 |
|
|
2149 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2150 |
return MNG_NOERROR;
|
|
2151 |
#else
|
|
2152 |
return mng_free_general(pData, pHeader);
|
|
2153 |
#endif
|
|
2154 |
}
|
|
2155 |
#endif
|
|
2156 |
|
|
2157 |
/* ************************************************************************** */
|
|
2158 |
|
|
2159 |
#ifndef MNG_SKIPCHUNK_eXPI
|
|
2160 |
FREE_CHUNK_HDR (mng_free_expi)
|
|
2161 |
{
|
|
2162 |
#ifdef MNG_SUPPORT_TRACE
|
|
2163 |
MNG_TRACE (pData, MNG_FN_FREE_EXPI, MNG_LC_START);
|
|
2164 |
#endif
|
|
2165 |
|
|
2166 |
if (((mng_expip)pHeader)->iNamesize)
|
|
2167 |
MNG_FREEX (pData, ((mng_expip)pHeader)->zName,
|
|
2168 |
((mng_expip)pHeader)->iNamesize + 1);
|
|
2169 |
|
|
2170 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2171 |
MNG_FREEX (pData, pHeader, sizeof (mng_expi));
|
|
2172 |
#endif
|
|
2173 |
|
|
2174 |
#ifdef MNG_SUPPORT_TRACE
|
|
2175 |
MNG_TRACE (pData, MNG_FN_FREE_EXPI, MNG_LC_END);
|
|
2176 |
#endif
|
|
2177 |
|
|
2178 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2179 |
return MNG_NOERROR;
|
|
2180 |
#else
|
|
2181 |
return mng_free_general(pData, pHeader);
|
|
2182 |
#endif
|
|
2183 |
}
|
|
2184 |
#endif
|
|
2185 |
|
|
2186 |
/* ************************************************************************** */
|
|
2187 |
|
|
2188 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2189 |
#ifndef MNG_SKIPCHUNK_fPRI
|
|
2190 |
FREE_CHUNK_HDR (mng_free_fpri)
|
|
2191 |
{
|
|
2192 |
#ifdef MNG_SUPPORT_TRACE
|
|
2193 |
MNG_TRACE (pData, MNG_FN_FREE_FPRI, MNG_LC_START);
|
|
2194 |
#endif
|
|
2195 |
|
|
2196 |
MNG_FREEX (pData, pHeader, sizeof (mng_fpri));
|
|
2197 |
|
|
2198 |
#ifdef MNG_SUPPORT_TRACE
|
|
2199 |
MNG_TRACE (pData, MNG_FN_FREE_FPRI, MNG_LC_END);
|
|
2200 |
#endif
|
|
2201 |
|
|
2202 |
return MNG_NOERROR;
|
|
2203 |
}
|
|
2204 |
#endif
|
|
2205 |
#endif
|
|
2206 |
|
|
2207 |
/* ************************************************************************** */
|
|
2208 |
|
|
2209 |
#ifndef MNG_SKIPCHUNK_nEED
|
|
2210 |
FREE_CHUNK_HDR (mng_free_need)
|
|
2211 |
{
|
|
2212 |
#ifdef MNG_SUPPORT_TRACE
|
|
2213 |
MNG_TRACE (pData, MNG_FN_FREE_NEED, MNG_LC_START);
|
|
2214 |
#endif
|
|
2215 |
|
|
2216 |
if (((mng_needp)pHeader)->iKeywordssize)
|
|
2217 |
MNG_FREEX (pData, ((mng_needp)pHeader)->zKeywords,
|
|
2218 |
((mng_needp)pHeader)->iKeywordssize + 1);
|
|
2219 |
|
|
2220 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2221 |
MNG_FREEX (pData, pHeader, sizeof (mng_need));
|
|
2222 |
#endif
|
|
2223 |
|
|
2224 |
#ifdef MNG_SUPPORT_TRACE
|
|
2225 |
MNG_TRACE (pData, MNG_FN_FREE_NEED, MNG_LC_END);
|
|
2226 |
#endif
|
|
2227 |
|
|
2228 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2229 |
return MNG_NOERROR;
|
|
2230 |
#else
|
|
2231 |
return mng_free_general(pData, pHeader);
|
|
2232 |
#endif
|
|
2233 |
}
|
|
2234 |
#endif
|
|
2235 |
|
|
2236 |
/* ************************************************************************** */
|
|
2237 |
|
|
2238 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2239 |
#ifndef MNG_SKIPCHUNK_pHYg
|
|
2240 |
FREE_CHUNK_HDR (mng_free_phyg)
|
|
2241 |
{
|
|
2242 |
#ifdef MNG_SUPPORT_TRACE
|
|
2243 |
MNG_TRACE (pData, MNG_FN_FREE_PHYG, MNG_LC_START);
|
|
2244 |
#endif
|
|
2245 |
|
|
2246 |
MNG_FREEX (pData, pHeader, sizeof (mng_phyg));
|
|
2247 |
|
|
2248 |
#ifdef MNG_SUPPORT_TRACE
|
|
2249 |
MNG_TRACE (pData, MNG_FN_FREE_PHYG, MNG_LC_END);
|
|
2250 |
#endif
|
|
2251 |
|
|
2252 |
return MNG_NOERROR;
|
|
2253 |
}
|
|
2254 |
#endif
|
|
2255 |
#endif
|
|
2256 |
|
|
2257 |
/* ************************************************************************** */
|
|
2258 |
|
|
2259 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2260 |
#ifdef MNG_INCLUDE_JNG
|
|
2261 |
FREE_CHUNK_HDR (mng_free_jhdr)
|
|
2262 |
{
|
|
2263 |
#ifdef MNG_SUPPORT_TRACE
|
|
2264 |
MNG_TRACE (pData, MNG_FN_FREE_JHDR, MNG_LC_START);
|
|
2265 |
#endif
|
|
2266 |
|
|
2267 |
MNG_FREEX (pData, pHeader, sizeof (mng_jhdr));
|
|
2268 |
|
|
2269 |
#ifdef MNG_SUPPORT_TRACE
|
|
2270 |
MNG_TRACE (pData, MNG_FN_FREE_JHDR, MNG_LC_END);
|
|
2271 |
#endif
|
|
2272 |
|
|
2273 |
return MNG_NOERROR;
|
|
2274 |
}
|
|
2275 |
#endif /* MNG_INCLUDE_JNG */
|
|
2276 |
#endif
|
|
2277 |
|
|
2278 |
/* ************************************************************************** */
|
|
2279 |
|
|
2280 |
#ifdef MNG_INCLUDE_JNG
|
|
2281 |
FREE_CHUNK_HDR (mng_free_jdaa)
|
|
2282 |
{
|
|
2283 |
#ifdef MNG_SUPPORT_TRACE
|
|
2284 |
MNG_TRACE (pData, MNG_FN_FREE_JDAA, MNG_LC_START);
|
|
2285 |
#endif
|
|
2286 |
|
|
2287 |
if (((mng_jdaap)pHeader)->iDatasize)
|
|
2288 |
MNG_FREEX (pData, ((mng_jdaap)pHeader)->pData,
|
|
2289 |
((mng_jdaap)pHeader)->iDatasize);
|
|
2290 |
|
|
2291 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2292 |
MNG_FREEX (pData, pHeader, sizeof (mng_jdaa));
|
|
2293 |
#endif
|
|
2294 |
|
|
2295 |
#ifdef MNG_SUPPORT_TRACE
|
|
2296 |
MNG_TRACE (pData, MNG_FN_FREE_JDAA, MNG_LC_END);
|
|
2297 |
#endif
|
|
2298 |
|
|
2299 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2300 |
return MNG_NOERROR;
|
|
2301 |
#else
|
|
2302 |
return mng_free_general(pData, pHeader);
|
|
2303 |
#endif
|
|
2304 |
}
|
|
2305 |
#endif /* MNG_INCLUDE_JNG */
|
|
2306 |
|
|
2307 |
/* ************************************************************************** */
|
|
2308 |
|
|
2309 |
#ifdef MNG_INCLUDE_JNG
|
|
2310 |
FREE_CHUNK_HDR (mng_free_jdat)
|
|
2311 |
{
|
|
2312 |
#ifdef MNG_SUPPORT_TRACE
|
|
2313 |
MNG_TRACE (pData, MNG_FN_FREE_JDAT, MNG_LC_START);
|
|
2314 |
#endif
|
|
2315 |
|
|
2316 |
if (((mng_jdatp)pHeader)->iDatasize)
|
|
2317 |
MNG_FREEX (pData, ((mng_jdatp)pHeader)->pData,
|
|
2318 |
((mng_jdatp)pHeader)->iDatasize);
|
|
2319 |
|
|
2320 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2321 |
MNG_FREEX (pData, pHeader, sizeof (mng_jdat));
|
|
2322 |
#endif
|
|
2323 |
|
|
2324 |
#ifdef MNG_SUPPORT_TRACE
|
|
2325 |
MNG_TRACE (pData, MNG_FN_FREE_JDAT, MNG_LC_END);
|
|
2326 |
#endif
|
|
2327 |
|
|
2328 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2329 |
return MNG_NOERROR;
|
|
2330 |
#else
|
|
2331 |
return mng_free_general(pData, pHeader);
|
|
2332 |
#endif
|
|
2333 |
}
|
|
2334 |
#endif /* MNG_INCLUDE_JNG */
|
|
2335 |
|
|
2336 |
/* ************************************************************************** */
|
|
2337 |
|
|
2338 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2339 |
#ifdef MNG_INCLUDE_JNG
|
|
2340 |
FREE_CHUNK_HDR (mng_free_jsep)
|
|
2341 |
{
|
|
2342 |
#ifdef MNG_SUPPORT_TRACE
|
|
2343 |
MNG_TRACE (pData, MNG_FN_FREE_JSEP, MNG_LC_START);
|
|
2344 |
#endif
|
|
2345 |
|
|
2346 |
MNG_FREEX (pData, pHeader, sizeof (mng_jsep));
|
|
2347 |
|
|
2348 |
#ifdef MNG_SUPPORT_TRACE
|
|
2349 |
MNG_TRACE (pData, MNG_FN_FREE_JSEP, MNG_LC_END);
|
|
2350 |
#endif
|
|
2351 |
|
|
2352 |
return MNG_NOERROR;
|
|
2353 |
}
|
|
2354 |
#endif /* MNG_INCLUDE_JNG */
|
|
2355 |
#endif
|
|
2356 |
|
|
2357 |
/* ************************************************************************** */
|
|
2358 |
|
|
2359 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2360 |
#ifndef MNG_NO_DELTA_PNG
|
|
2361 |
FREE_CHUNK_HDR (mng_free_dhdr)
|
|
2362 |
{
|
|
2363 |
#ifdef MNG_SUPPORT_TRACE
|
|
2364 |
MNG_TRACE (pData, MNG_FN_FREE_DHDR, MNG_LC_START);
|
|
2365 |
#endif
|
|
2366 |
|
|
2367 |
MNG_FREEX (pData, pHeader, sizeof (mng_dhdr));
|
|
2368 |
|
|
2369 |
#ifdef MNG_SUPPORT_TRACE
|
|
2370 |
MNG_TRACE (pData, MNG_FN_FREE_DHDR, MNG_LC_END);
|
|
2371 |
#endif
|
|
2372 |
|
|
2373 |
return MNG_NOERROR;
|
|
2374 |
}
|
|
2375 |
#endif
|
|
2376 |
#endif
|
|
2377 |
|
|
2378 |
/* ************************************************************************** */
|
|
2379 |
|
|
2380 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2381 |
#ifndef MNG_NO_DELTA_PNG
|
|
2382 |
FREE_CHUNK_HDR (mng_free_prom)
|
|
2383 |
{
|
|
2384 |
#ifdef MNG_SUPPORT_TRACE
|
|
2385 |
MNG_TRACE (pData, MNG_FN_FREE_PROM, MNG_LC_START);
|
|
2386 |
#endif
|
|
2387 |
|
|
2388 |
MNG_FREEX (pData, pHeader, sizeof (mng_prom));
|
|
2389 |
|
|
2390 |
#ifdef MNG_SUPPORT_TRACE
|
|
2391 |
MNG_TRACE (pData, MNG_FN_FREE_PROM, MNG_LC_END);
|
|
2392 |
#endif
|
|
2393 |
|
|
2394 |
return MNG_NOERROR;
|
|
2395 |
}
|
|
2396 |
#endif
|
|
2397 |
#endif
|
|
2398 |
|
|
2399 |
/* ************************************************************************** */
|
|
2400 |
|
|
2401 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2402 |
#ifndef MNG_NO_DELTA_PNG
|
|
2403 |
FREE_CHUNK_HDR (mng_free_ipng)
|
|
2404 |
{
|
|
2405 |
#ifdef MNG_SUPPORT_TRACE
|
|
2406 |
MNG_TRACE (pData, MNG_FN_FREE_IPNG, MNG_LC_START);
|
|
2407 |
#endif
|
|
2408 |
|
|
2409 |
MNG_FREEX (pData, pHeader, sizeof (mng_ipng));
|
|
2410 |
|
|
2411 |
#ifdef MNG_SUPPORT_TRACE
|
|
2412 |
MNG_TRACE (pData, MNG_FN_FREE_IPNG, MNG_LC_END);
|
|
2413 |
#endif
|
|
2414 |
|
|
2415 |
return MNG_NOERROR;
|
|
2416 |
}
|
|
2417 |
#endif
|
|
2418 |
#endif
|
|
2419 |
|
|
2420 |
/* ************************************************************************** */
|
|
2421 |
|
|
2422 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2423 |
#ifndef MNG_NO_DELTA_PNG
|
|
2424 |
FREE_CHUNK_HDR (mng_free_pplt)
|
|
2425 |
{
|
|
2426 |
#ifdef MNG_SUPPORT_TRACE
|
|
2427 |
MNG_TRACE (pData, MNG_FN_FREE_PPLT, MNG_LC_START);
|
|
2428 |
#endif
|
|
2429 |
|
|
2430 |
MNG_FREEX (pData, pHeader, sizeof (mng_pplt));
|
|
2431 |
|
|
2432 |
#ifdef MNG_SUPPORT_TRACE
|
|
2433 |
MNG_TRACE (pData, MNG_FN_FREE_PPLT, MNG_LC_END);
|
|
2434 |
#endif
|
|
2435 |
|
|
2436 |
return MNG_NOERROR;
|
|
2437 |
}
|
|
2438 |
#endif
|
|
2439 |
#endif
|
|
2440 |
|
|
2441 |
/* ************************************************************************** */
|
|
2442 |
|
|
2443 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2444 |
#ifndef MNG_NO_DELTA_PNG
|
|
2445 |
#ifdef MNG_INCLUDE_JNG
|
|
2446 |
FREE_CHUNK_HDR (mng_free_ijng)
|
|
2447 |
{
|
|
2448 |
#ifdef MNG_SUPPORT_TRACE
|
|
2449 |
MNG_TRACE (pData, MNG_FN_FREE_IJNG, MNG_LC_START);
|
|
2450 |
#endif
|
|
2451 |
|
|
2452 |
MNG_FREEX (pData, pHeader, sizeof (mng_ijng));
|
|
2453 |
|
|
2454 |
#ifdef MNG_SUPPORT_TRACE
|
|
2455 |
MNG_TRACE (pData, MNG_FN_FREE_IJNG, MNG_LC_END);
|
|
2456 |
#endif
|
|
2457 |
|
|
2458 |
return MNG_NOERROR;
|
|
2459 |
}
|
|
2460 |
#endif
|
|
2461 |
#endif
|
|
2462 |
#endif
|
|
2463 |
|
|
2464 |
/* ************************************************************************** */
|
|
2465 |
|
|
2466 |
#ifndef MNG_NO_DELTA_PNG
|
|
2467 |
FREE_CHUNK_HDR (mng_free_drop)
|
|
2468 |
{
|
|
2469 |
#ifdef MNG_SUPPORT_TRACE
|
|
2470 |
MNG_TRACE (pData, MNG_FN_FREE_DROP, MNG_LC_START);
|
|
2471 |
#endif
|
|
2472 |
|
|
2473 |
if (((mng_dropp)pHeader)->iCount)
|
|
2474 |
MNG_FREEX (pData, ((mng_dropp)pHeader)->pChunknames,
|
|
2475 |
((mng_dropp)pHeader)->iCount * sizeof (mng_chunkid) );
|
|
2476 |
|
|
2477 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2478 |
MNG_FREEX (pData, pHeader, sizeof (mng_drop));
|
|
2479 |
#endif
|
|
2480 |
|
|
2481 |
#ifdef MNG_SUPPORT_TRACE
|
|
2482 |
MNG_TRACE (pData, MNG_FN_FREE_DROP, MNG_LC_END);
|
|
2483 |
#endif
|
|
2484 |
|
|
2485 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2486 |
return MNG_NOERROR;
|
|
2487 |
#else
|
|
2488 |
return mng_free_general(pData, pHeader);
|
|
2489 |
#endif
|
|
2490 |
}
|
|
2491 |
#endif
|
|
2492 |
|
|
2493 |
/* ************************************************************************** */
|
|
2494 |
|
|
2495 |
#ifndef MNG_NO_DELTA_PNG
|
|
2496 |
#ifndef MNG_SKIPCHUNK_DBYK
|
|
2497 |
FREE_CHUNK_HDR (mng_free_dbyk)
|
|
2498 |
{
|
|
2499 |
#ifdef MNG_SUPPORT_TRACE
|
|
2500 |
MNG_TRACE (pData, MNG_FN_FREE_DBYK, MNG_LC_START);
|
|
2501 |
#endif
|
|
2502 |
|
|
2503 |
if (((mng_dbykp)pHeader)->iKeywordssize)
|
|
2504 |
MNG_FREEX (pData, ((mng_dbykp)pHeader)->zKeywords,
|
|
2505 |
((mng_dbykp)pHeader)->iKeywordssize);
|
|
2506 |
|
|
2507 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2508 |
MNG_FREEX (pData, pHeader, sizeof (mng_dbyk));
|
|
2509 |
#endif
|
|
2510 |
|
|
2511 |
#ifdef MNG_SUPPORT_TRACE
|
|
2512 |
MNG_TRACE (pData, MNG_FN_FREE_DBYK, MNG_LC_END);
|
|
2513 |
#endif
|
|
2514 |
|
|
2515 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2516 |
return MNG_NOERROR;
|
|
2517 |
#else
|
|
2518 |
return mng_free_general(pData, pHeader);
|
|
2519 |
#endif
|
|
2520 |
}
|
|
2521 |
#endif
|
|
2522 |
#endif
|
|
2523 |
|
|
2524 |
/* ************************************************************************** */
|
|
2525 |
|
|
2526 |
#ifndef MNG_NO_DELTA_PNG
|
|
2527 |
#ifndef MNG_SKIPCHUNK_ORDR
|
|
2528 |
FREE_CHUNK_HDR (mng_free_ordr)
|
|
2529 |
{
|
|
2530 |
#ifdef MNG_SUPPORT_TRACE
|
|
2531 |
MNG_TRACE (pData, MNG_FN_FREE_ORDR, MNG_LC_START);
|
|
2532 |
#endif
|
|
2533 |
|
|
2534 |
if (((mng_ordrp)pHeader)->iCount)
|
|
2535 |
MNG_FREEX (pData, ((mng_ordrp)pHeader)->pEntries,
|
|
2536 |
((mng_ordrp)pHeader)->iCount * sizeof (mng_ordr_entry) );
|
|
2537 |
|
|
2538 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2539 |
MNG_FREEX (pData, pHeader, sizeof (mng_ordr));
|
|
2540 |
#endif
|
|
2541 |
|
|
2542 |
#ifdef MNG_SUPPORT_TRACE
|
|
2543 |
MNG_TRACE (pData, MNG_FN_FREE_ORDR, MNG_LC_END);
|
|
2544 |
#endif
|
|
2545 |
|
|
2546 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2547 |
return MNG_NOERROR;
|
|
2548 |
#else
|
|
2549 |
return mng_free_general(pData, pHeader);
|
|
2550 |
#endif
|
|
2551 |
}
|
|
2552 |
#endif
|
|
2553 |
#endif
|
|
2554 |
|
|
2555 |
/* ************************************************************************** */
|
|
2556 |
|
|
2557 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2558 |
#ifndef MNG_SKIPCHUNK_MAGN
|
|
2559 |
FREE_CHUNK_HDR (mng_free_magn)
|
|
2560 |
{
|
|
2561 |
#ifdef MNG_SUPPORT_TRACE
|
|
2562 |
MNG_TRACE (pData, MNG_FN_FREE_MAGN, MNG_LC_START);
|
|
2563 |
#endif
|
|
2564 |
|
|
2565 |
MNG_FREEX (pData, pHeader, sizeof (mng_magn));
|
|
2566 |
|
|
2567 |
#ifdef MNG_SUPPORT_TRACE
|
|
2568 |
MNG_TRACE (pData, MNG_FN_FREE_MAGN, MNG_LC_END);
|
|
2569 |
#endif
|
|
2570 |
|
|
2571 |
return MNG_NOERROR;
|
|
2572 |
}
|
|
2573 |
#endif
|
|
2574 |
#endif
|
|
2575 |
|
|
2576 |
/* ************************************************************************** */
|
|
2577 |
|
|
2578 |
#ifndef MNG_SKIPCHUNK_evNT
|
|
2579 |
FREE_CHUNK_HDR (mng_free_evnt)
|
|
2580 |
{
|
|
2581 |
mng_evnt_entryp pEntry = ((mng_evntp)pHeader)->pEntries;
|
|
2582 |
mng_uint32 iX;
|
|
2583 |
|
|
2584 |
#ifdef MNG_SUPPORT_TRACE
|
|
2585 |
MNG_TRACE (pData, MNG_FN_FREE_EVNT, MNG_LC_START);
|
|
2586 |
#endif
|
|
2587 |
|
|
2588 |
for (iX = 0; iX < ((mng_evntp)pHeader)->iCount; iX++)
|
|
2589 |
{
|
|
2590 |
if (pEntry->iSegmentnamesize)
|
|
2591 |
MNG_FREEX (pData, pEntry->zSegmentname, pEntry->iSegmentnamesize+1);
|
|
2592 |
|
|
2593 |
pEntry++;
|
|
2594 |
}
|
|
2595 |
|
|
2596 |
if (((mng_evntp)pHeader)->iCount)
|
|
2597 |
MNG_FREEX (pData, ((mng_evntp)pHeader)->pEntries,
|
|
2598 |
((mng_evntp)pHeader)->iCount * sizeof (mng_evnt_entry) );
|
|
2599 |
|
|
2600 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2601 |
MNG_FREEX (pData, pHeader, sizeof (mng_evnt));
|
|
2602 |
#endif
|
|
2603 |
|
|
2604 |
#ifdef MNG_SUPPORT_TRACE
|
|
2605 |
MNG_TRACE (pData, MNG_FN_FREE_EVNT, MNG_LC_END);
|
|
2606 |
#endif
|
|
2607 |
|
|
2608 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2609 |
return MNG_NOERROR;
|
|
2610 |
#else
|
|
2611 |
return mng_free_general(pData, pHeader);
|
|
2612 |
#endif
|
|
2613 |
}
|
|
2614 |
#endif
|
|
2615 |
|
|
2616 |
/* ************************************************************************** */
|
|
2617 |
|
|
2618 |
FREE_CHUNK_HDR (mng_free_unknown)
|
|
2619 |
{
|
|
2620 |
#ifdef MNG_SUPPORT_TRACE
|
|
2621 |
MNG_TRACE (pData, MNG_FN_FREE_UNKNOWN, MNG_LC_START);
|
|
2622 |
#endif
|
|
2623 |
|
|
2624 |
if (((mng_unknown_chunkp)pHeader)->iDatasize)
|
|
2625 |
MNG_FREEX (pData, ((mng_unknown_chunkp)pHeader)->pData,
|
|
2626 |
((mng_unknown_chunkp)pHeader)->iDatasize);
|
|
2627 |
|
|
2628 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2629 |
MNG_FREEX (pData, pHeader, sizeof (mng_unknown_chunk));
|
|
2630 |
#endif
|
|
2631 |
|
|
2632 |
#ifdef MNG_SUPPORT_TRACE
|
|
2633 |
MNG_TRACE (pData, MNG_FN_FREE_UNKNOWN, MNG_LC_END);
|
|
2634 |
#endif
|
|
2635 |
|
|
2636 |
#ifndef MNG_OPTIMIZE_CHUNKINITFREE
|
|
2637 |
return MNG_NOERROR;
|
|
2638 |
#else
|
|
2639 |
return mng_free_general(pData, pHeader);
|
|
2640 |
#endif
|
|
2641 |
}
|
|
2642 |
|
|
2643 |
/* ************************************************************************** */
|
|
2644 |
/* * * */
|
|
2645 |
/* * Chunk specific copy routines * */
|
|
2646 |
/* * * */
|
|
2647 |
/* ************************************************************************** */
|
|
2648 |
|
|
2649 |
#ifdef MNG_INCLUDE_WRITE_PROCS
|
|
2650 |
|
|
2651 |
/* ************************************************************************** */
|
|
2652 |
|
|
2653 |
#ifdef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2654 |
ASSIGN_CHUNK_HDR (mng_assign_general)
|
|
2655 |
{
|
|
2656 |
mng_ptr pSrc = (mng_uint8p)pChunkfrom + sizeof (mng_chunk_header);
|
|
2657 |
mng_ptr pDst = (mng_uint8p)pChunkto + sizeof (mng_chunk_header);
|
|
2658 |
mng_size_t iLen = ((mng_chunk_headerp)pChunkfrom)->iChunksize - sizeof (mng_chunk_header);
|
|
2659 |
|
|
2660 |
MNG_COPY (pDst, pSrc, iLen);
|
|
2661 |
|
|
2662 |
return MNG_NOERROR;
|
|
2663 |
}
|
|
2664 |
#endif
|
|
2665 |
|
|
2666 |
/* ************************************************************************** */
|
|
2667 |
|
|
2668 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2669 |
ASSIGN_CHUNK_HDR (mng_assign_ihdr)
|
|
2670 |
{
|
|
2671 |
#ifdef MNG_SUPPORT_TRACE
|
|
2672 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IHDR, MNG_LC_START);
|
|
2673 |
#endif
|
|
2674 |
|
|
2675 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_IHDR)
|
|
2676 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2677 |
|
|
2678 |
((mng_ihdrp)pChunkto)->iWidth = ((mng_ihdrp)pChunkfrom)->iWidth;
|
|
2679 |
((mng_ihdrp)pChunkto)->iHeight = ((mng_ihdrp)pChunkfrom)->iHeight;
|
|
2680 |
((mng_ihdrp)pChunkto)->iBitdepth = ((mng_ihdrp)pChunkfrom)->iBitdepth;
|
|
2681 |
((mng_ihdrp)pChunkto)->iColortype = ((mng_ihdrp)pChunkfrom)->iColortype;
|
|
2682 |
((mng_ihdrp)pChunkto)->iCompression = ((mng_ihdrp)pChunkfrom)->iCompression;
|
|
2683 |
((mng_ihdrp)pChunkto)->iFilter = ((mng_ihdrp)pChunkfrom)->iFilter;
|
|
2684 |
((mng_ihdrp)pChunkto)->iInterlace = ((mng_ihdrp)pChunkfrom)->iInterlace;
|
|
2685 |
|
|
2686 |
#ifdef MNG_SUPPORT_TRACE
|
|
2687 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IHDR, MNG_LC_END);
|
|
2688 |
#endif
|
|
2689 |
|
|
2690 |
return MNG_NOERROR;
|
|
2691 |
}
|
|
2692 |
#endif
|
|
2693 |
|
|
2694 |
/* ************************************************************************** */
|
|
2695 |
|
|
2696 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2697 |
ASSIGN_CHUNK_HDR (mng_assign_plte)
|
|
2698 |
{
|
|
2699 |
mng_uint32 iX;
|
|
2700 |
|
|
2701 |
#ifdef MNG_SUPPORT_TRACE
|
|
2702 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PLTE, MNG_LC_START);
|
|
2703 |
#endif
|
|
2704 |
|
|
2705 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_PLTE)
|
|
2706 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2707 |
|
|
2708 |
((mng_pltep)pChunkto)->bEmpty = ((mng_pltep)pChunkfrom)->bEmpty;
|
|
2709 |
((mng_pltep)pChunkto)->iEntrycount = ((mng_pltep)pChunkfrom)->iEntrycount;
|
|
2710 |
|
|
2711 |
for (iX = 0; iX < ((mng_pltep)pChunkto)->iEntrycount; iX++)
|
|
2712 |
((mng_pltep)pChunkto)->aEntries [iX] = ((mng_pltep)pChunkfrom)->aEntries [iX];
|
|
2713 |
|
|
2714 |
#ifdef MNG_SUPPORT_TRACE
|
|
2715 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PLTE, MNG_LC_END);
|
|
2716 |
#endif
|
|
2717 |
|
|
2718 |
return MNG_NOERROR;
|
|
2719 |
}
|
|
2720 |
#endif
|
|
2721 |
|
|
2722 |
/* ************************************************************************** */
|
|
2723 |
|
|
2724 |
ASSIGN_CHUNK_HDR (mng_assign_idat)
|
|
2725 |
{
|
|
2726 |
#ifdef MNG_SUPPORT_TRACE
|
|
2727 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IDAT, MNG_LC_START);
|
|
2728 |
#endif
|
|
2729 |
|
|
2730 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_IDAT)
|
|
2731 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2732 |
|
|
2733 |
((mng_idatp)pChunkto)->bEmpty = ((mng_idatp)pChunkfrom)->bEmpty;
|
|
2734 |
((mng_idatp)pChunkto)->iDatasize = ((mng_idatp)pChunkfrom)->iDatasize;
|
|
2735 |
|
|
2736 |
if (((mng_idatp)pChunkto)->iDatasize)
|
|
2737 |
{
|
|
2738 |
MNG_ALLOC (pData, ((mng_idatp)pChunkto)->pData, ((mng_idatp)pChunkto)->iDatasize);
|
|
2739 |
MNG_COPY (((mng_idatp)pChunkto)->pData, ((mng_idatp)pChunkfrom)->pData,
|
|
2740 |
((mng_idatp)pChunkto)->iDatasize);
|
|
2741 |
}
|
|
2742 |
|
|
2743 |
#ifdef MNG_SUPPORT_TRACE
|
|
2744 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IDAT, MNG_LC_END);
|
|
2745 |
#endif
|
|
2746 |
|
|
2747 |
return MNG_NOERROR;
|
|
2748 |
}
|
|
2749 |
|
|
2750 |
/* ************************************************************************** */
|
|
2751 |
|
|
2752 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2753 |
ASSIGN_CHUNK_HDR (mng_assign_iend)
|
|
2754 |
{
|
|
2755 |
#ifdef MNG_SUPPORT_TRACE
|
|
2756 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IEND, MNG_LC_START);
|
|
2757 |
#endif
|
|
2758 |
|
|
2759 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_IEND)
|
|
2760 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2761 |
|
|
2762 |
#ifdef MNG_SUPPORT_TRACE
|
|
2763 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IEND, MNG_LC_END);
|
|
2764 |
#endif
|
|
2765 |
|
|
2766 |
return MNG_NOERROR;
|
|
2767 |
}
|
|
2768 |
#endif
|
|
2769 |
|
|
2770 |
/* ************************************************************************** */
|
|
2771 |
|
|
2772 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2773 |
ASSIGN_CHUNK_HDR (mng_assign_trns)
|
|
2774 |
{
|
|
2775 |
mng_uint32 iX;
|
|
2776 |
|
|
2777 |
#ifdef MNG_SUPPORT_TRACE
|
|
2778 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TRNS, MNG_LC_START);
|
|
2779 |
#endif
|
|
2780 |
|
|
2781 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_tRNS)
|
|
2782 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2783 |
|
|
2784 |
((mng_trnsp)pChunkto)->bEmpty = ((mng_trnsp)pChunkfrom)->bEmpty;
|
|
2785 |
((mng_trnsp)pChunkto)->bGlobal = ((mng_trnsp)pChunkfrom)->bGlobal;
|
|
2786 |
((mng_trnsp)pChunkto)->iType = ((mng_trnsp)pChunkfrom)->iType;
|
|
2787 |
((mng_trnsp)pChunkto)->iCount = ((mng_trnsp)pChunkfrom)->iCount;
|
|
2788 |
((mng_trnsp)pChunkto)->iGray = ((mng_trnsp)pChunkfrom)->iGray;
|
|
2789 |
((mng_trnsp)pChunkto)->iRed = ((mng_trnsp)pChunkfrom)->iRed;
|
|
2790 |
((mng_trnsp)pChunkto)->iGreen = ((mng_trnsp)pChunkfrom)->iGreen;
|
|
2791 |
((mng_trnsp)pChunkto)->iBlue = ((mng_trnsp)pChunkfrom)->iBlue;
|
|
2792 |
((mng_trnsp)pChunkto)->iRawlen = ((mng_trnsp)pChunkfrom)->iRawlen;
|
|
2793 |
|
|
2794 |
for (iX = 0; iX < ((mng_trnsp)pChunkto)->iCount; iX++)
|
|
2795 |
((mng_trnsp)pChunkto)->aEntries [iX] = ((mng_trnsp)pChunkfrom)->aEntries [iX];
|
|
2796 |
|
|
2797 |
for (iX = 0; iX < ((mng_trnsp)pChunkto)->iRawlen; iX++)
|
|
2798 |
((mng_trnsp)pChunkto)->aRawdata [iX] = ((mng_trnsp)pChunkfrom)->aRawdata [iX];
|
|
2799 |
|
|
2800 |
#ifdef MNG_SUPPORT_TRACE
|
|
2801 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TRNS, MNG_LC_END);
|
|
2802 |
#endif
|
|
2803 |
|
|
2804 |
return MNG_NOERROR;
|
|
2805 |
}
|
|
2806 |
#endif
|
|
2807 |
|
|
2808 |
/* ************************************************************************** */
|
|
2809 |
|
|
2810 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2811 |
#ifndef MNG_SKIPCHUNK_gAMA
|
|
2812 |
ASSIGN_CHUNK_HDR (mng_assign_gama)
|
|
2813 |
{
|
|
2814 |
#ifdef MNG_SUPPORT_TRACE
|
|
2815 |
MNG_TRACE (pData, MNG_FN_ASSIGN_GAMA, MNG_LC_START);
|
|
2816 |
#endif
|
|
2817 |
|
|
2818 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_gAMA)
|
|
2819 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2820 |
|
|
2821 |
((mng_gamap)pChunkto)->bEmpty = ((mng_gamap)pChunkfrom)->bEmpty;
|
|
2822 |
((mng_gamap)pChunkto)->iGamma = ((mng_gamap)pChunkfrom)->iGamma;
|
|
2823 |
|
|
2824 |
#ifdef MNG_SUPPORT_TRACE
|
|
2825 |
MNG_TRACE (pData, MNG_FN_ASSIGN_GAMA, MNG_LC_END);
|
|
2826 |
#endif
|
|
2827 |
|
|
2828 |
return MNG_NOERROR;
|
|
2829 |
}
|
|
2830 |
#endif
|
|
2831 |
#endif
|
|
2832 |
|
|
2833 |
/* ************************************************************************** */
|
|
2834 |
|
|
2835 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2836 |
#ifndef MNG_SKIPCHUNK_cHRM
|
|
2837 |
ASSIGN_CHUNK_HDR (mng_assign_chrm)
|
|
2838 |
{
|
|
2839 |
#ifdef MNG_SUPPORT_TRACE
|
|
2840 |
MNG_TRACE (pData, MNG_FN_ASSIGN_CHRM, MNG_LC_START);
|
|
2841 |
#endif
|
|
2842 |
|
|
2843 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_cHRM)
|
|
2844 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2845 |
|
|
2846 |
((mng_chrmp)pChunkto)->bEmpty = ((mng_chrmp)pChunkfrom)->bEmpty;
|
|
2847 |
((mng_chrmp)pChunkto)->iWhitepointx = ((mng_chrmp)pChunkfrom)->iWhitepointx;
|
|
2848 |
((mng_chrmp)pChunkto)->iWhitepointy = ((mng_chrmp)pChunkfrom)->iWhitepointy;
|
|
2849 |
((mng_chrmp)pChunkto)->iRedx = ((mng_chrmp)pChunkfrom)->iRedx;
|
|
2850 |
((mng_chrmp)pChunkto)->iRedy = ((mng_chrmp)pChunkfrom)->iRedy;
|
|
2851 |
((mng_chrmp)pChunkto)->iGreenx = ((mng_chrmp)pChunkfrom)->iGreenx;
|
|
2852 |
((mng_chrmp)pChunkto)->iGreeny = ((mng_chrmp)pChunkfrom)->iGreeny;
|
|
2853 |
((mng_chrmp)pChunkto)->iBluex = ((mng_chrmp)pChunkfrom)->iBluex;
|
|
2854 |
((mng_chrmp)pChunkto)->iBluey = ((mng_chrmp)pChunkfrom)->iBluey;
|
|
2855 |
|
|
2856 |
#ifdef MNG_SUPPORT_TRACE
|
|
2857 |
MNG_TRACE (pData, MNG_FN_ASSIGN_CHRM, MNG_LC_END);
|
|
2858 |
#endif
|
|
2859 |
|
|
2860 |
return MNG_NOERROR;
|
|
2861 |
}
|
|
2862 |
#endif
|
|
2863 |
#endif
|
|
2864 |
|
|
2865 |
/* ************************************************************************** */
|
|
2866 |
|
|
2867 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
2868 |
#ifndef MNG_SKIPCHUNK_sRGB
|
|
2869 |
ASSIGN_CHUNK_HDR (mng_assign_srgb)
|
|
2870 |
{
|
|
2871 |
#ifdef MNG_SUPPORT_TRACE
|
|
2872 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SRGB, MNG_LC_START);
|
|
2873 |
#endif
|
|
2874 |
|
|
2875 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_sRGB)
|
|
2876 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2877 |
|
|
2878 |
((mng_srgbp)pChunkto)->iRenderingintent = ((mng_srgbp)pChunkfrom)->iRenderingintent;
|
|
2879 |
|
|
2880 |
#ifdef MNG_SUPPORT_TRACE
|
|
2881 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SRGB, MNG_LC_END);
|
|
2882 |
#endif
|
|
2883 |
|
|
2884 |
return MNG_NOERROR;
|
|
2885 |
}
|
|
2886 |
#endif
|
|
2887 |
#endif
|
|
2888 |
|
|
2889 |
/* ************************************************************************** */
|
|
2890 |
|
|
2891 |
#ifndef MNG_SKIPCHUNK_iCCP
|
|
2892 |
ASSIGN_CHUNK_HDR (mng_assign_iccp)
|
|
2893 |
{
|
|
2894 |
#ifdef MNG_SUPPORT_TRACE
|
|
2895 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ICCP, MNG_LC_START);
|
|
2896 |
#endif
|
|
2897 |
|
|
2898 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_iCCP)
|
|
2899 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2900 |
|
|
2901 |
((mng_iccpp)pChunkto)->bEmpty = ((mng_iccpp)pChunkfrom)->bEmpty;
|
|
2902 |
((mng_iccpp)pChunkto)->iNamesize = ((mng_iccpp)pChunkfrom)->iNamesize;
|
|
2903 |
((mng_iccpp)pChunkto)->iCompression = ((mng_iccpp)pChunkfrom)->iCompression;
|
|
2904 |
((mng_iccpp)pChunkto)->iProfilesize = ((mng_iccpp)pChunkfrom)->iProfilesize;
|
|
2905 |
|
|
2906 |
if (((mng_iccpp)pChunkto)->iNamesize)
|
|
2907 |
{
|
|
2908 |
MNG_ALLOC (pData, ((mng_iccpp)pChunkto)->zName, ((mng_iccpp)pChunkto)->iNamesize);
|
|
2909 |
MNG_COPY (((mng_iccpp)pChunkto)->zName, ((mng_iccpp)pChunkfrom)->zName,
|
|
2910 |
((mng_iccpp)pChunkto)->iNamesize);
|
|
2911 |
}
|
|
2912 |
|
|
2913 |
if (((mng_iccpp)pChunkto)->iProfilesize)
|
|
2914 |
{
|
|
2915 |
MNG_ALLOC (pData, ((mng_iccpp)pChunkto)->pProfile, ((mng_iccpp)pChunkto)->iProfilesize);
|
|
2916 |
MNG_COPY (((mng_iccpp)pChunkto)->pProfile, ((mng_iccpp)pChunkfrom)->pProfile,
|
|
2917 |
((mng_iccpp)pChunkto)->iProfilesize);
|
|
2918 |
}
|
|
2919 |
|
|
2920 |
#ifdef MNG_SUPPORT_TRACE
|
|
2921 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ICCP, MNG_LC_END);
|
|
2922 |
#endif
|
|
2923 |
|
|
2924 |
return MNG_NOERROR;
|
|
2925 |
}
|
|
2926 |
#endif
|
|
2927 |
|
|
2928 |
/* ************************************************************************** */
|
|
2929 |
|
|
2930 |
#ifndef MNG_SKIPCHUNK_tEXt
|
|
2931 |
ASSIGN_CHUNK_HDR (mng_assign_text)
|
|
2932 |
{
|
|
2933 |
#ifdef MNG_SUPPORT_TRACE
|
|
2934 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TEXT, MNG_LC_START);
|
|
2935 |
#endif
|
|
2936 |
|
|
2937 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_tEXt)
|
|
2938 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2939 |
|
|
2940 |
((mng_textp)pChunkto)->iKeywordsize = ((mng_textp)pChunkfrom)->iKeywordsize;
|
|
2941 |
((mng_textp)pChunkto)->iTextsize = ((mng_textp)pChunkfrom)->iTextsize;
|
|
2942 |
|
|
2943 |
if (((mng_textp)pChunkto)->iKeywordsize)
|
|
2944 |
{
|
|
2945 |
MNG_ALLOC (pData, ((mng_itxtp)pChunkto)->zKeyword, ((mng_textp)pChunkto)->iKeywordsize);
|
|
2946 |
MNG_COPY (((mng_itxtp)pChunkto)->zKeyword, ((mng_textp)pChunkfrom)->zKeyword,
|
|
2947 |
((mng_itxtp)pChunkto)->iKeywordsize);
|
|
2948 |
}
|
|
2949 |
|
|
2950 |
if (((mng_textp)pChunkto)->iTextsize)
|
|
2951 |
{
|
|
2952 |
MNG_ALLOC (pData, ((mng_textp)pChunkto)->zText, ((mng_textp)pChunkto)->iTextsize);
|
|
2953 |
MNG_COPY (((mng_textp)pChunkto)->zText, ((mng_textp)pChunkfrom)->zText,
|
|
2954 |
((mng_textp)pChunkto)->iTextsize);
|
|
2955 |
}
|
|
2956 |
|
|
2957 |
#ifdef MNG_SUPPORT_TRACE
|
|
2958 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TEXT, MNG_LC_END);
|
|
2959 |
#endif
|
|
2960 |
|
|
2961 |
return MNG_NOERROR;
|
|
2962 |
}
|
|
2963 |
#endif
|
|
2964 |
|
|
2965 |
/* ************************************************************************** */
|
|
2966 |
|
|
2967 |
#ifndef MNG_SKIPCHUNK_zTXt
|
|
2968 |
ASSIGN_CHUNK_HDR (mng_assign_ztxt)
|
|
2969 |
{
|
|
2970 |
#ifdef MNG_SUPPORT_TRACE
|
|
2971 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ZTXT, MNG_LC_START);
|
|
2972 |
#endif
|
|
2973 |
|
|
2974 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_zTXt)
|
|
2975 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
2976 |
|
|
2977 |
((mng_ztxtp)pChunkto)->iKeywordsize = ((mng_ztxtp)pChunkfrom)->iKeywordsize;
|
|
2978 |
((mng_ztxtp)pChunkto)->iCompression = ((mng_ztxtp)pChunkfrom)->iCompression;
|
|
2979 |
((mng_ztxtp)pChunkto)->iTextsize = ((mng_ztxtp)pChunkfrom)->iTextsize;
|
|
2980 |
|
|
2981 |
if (((mng_ztxtp)pChunkto)->iKeywordsize)
|
|
2982 |
{
|
|
2983 |
MNG_ALLOC (pData, ((mng_ztxtp)pChunkto)->zKeyword, ((mng_ztxtp)pChunkto)->iKeywordsize);
|
|
2984 |
MNG_COPY (((mng_ztxtp)pChunkto)->zKeyword, ((mng_ztxtp)pChunkfrom)->zKeyword,
|
|
2985 |
((mng_ztxtp)pChunkto)->iKeywordsize);
|
|
2986 |
}
|
|
2987 |
|
|
2988 |
if (((mng_ztxtp)pChunkto)->iTextsize)
|
|
2989 |
{
|
|
2990 |
MNG_ALLOC (pData, ((mng_ztxtp)pChunkto)->zText, ((mng_ztxtp)pChunkto)->iTextsize);
|
|
2991 |
MNG_COPY (((mng_ztxtp)pChunkto)->zText, ((mng_ztxtp)pChunkfrom)->zText,
|
|
2992 |
((mng_ztxtp)pChunkto)->iTextsize);
|
|
2993 |
}
|
|
2994 |
|
|
2995 |
#ifdef MNG_SUPPORT_TRACE
|
|
2996 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ZTXT, MNG_LC_END);
|
|
2997 |
#endif
|
|
2998 |
|
|
2999 |
return MNG_NOERROR;
|
|
3000 |
}
|
|
3001 |
#endif
|
|
3002 |
|
|
3003 |
/* ************************************************************************** */
|
|
3004 |
|
|
3005 |
#ifndef MNG_SKIPCHUNK_iTXt
|
|
3006 |
ASSIGN_CHUNK_HDR (mng_assign_itxt)
|
|
3007 |
{
|
|
3008 |
#ifdef MNG_SUPPORT_TRACE
|
|
3009 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ITXT, MNG_LC_START);
|
|
3010 |
#endif
|
|
3011 |
|
|
3012 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_iTXt)
|
|
3013 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3014 |
|
|
3015 |
((mng_itxtp)pChunkto)->iKeywordsize = ((mng_itxtp)pChunkfrom)->iKeywordsize;
|
|
3016 |
((mng_itxtp)pChunkto)->iCompressionflag = ((mng_itxtp)pChunkfrom)->iCompressionflag;
|
|
3017 |
((mng_itxtp)pChunkto)->iCompressionmethod = ((mng_itxtp)pChunkfrom)->iCompressionmethod;
|
|
3018 |
((mng_itxtp)pChunkto)->iLanguagesize = ((mng_itxtp)pChunkfrom)->iLanguagesize;
|
|
3019 |
((mng_itxtp)pChunkto)->iTranslationsize = ((mng_itxtp)pChunkfrom)->iTranslationsize;
|
|
3020 |
((mng_itxtp)pChunkto)->iTextsize = ((mng_itxtp)pChunkfrom)->iTextsize;
|
|
3021 |
|
|
3022 |
if (((mng_itxtp)pChunkto)->iKeywordsize)
|
|
3023 |
{
|
|
3024 |
MNG_ALLOC (pData, ((mng_itxtp)pChunkto)->zKeyword, ((mng_itxtp)pChunkto)->iKeywordsize);
|
|
3025 |
MNG_COPY (((mng_itxtp)pChunkto)->zKeyword, ((mng_itxtp)pChunkfrom)->zKeyword,
|
|
3026 |
((mng_itxtp)pChunkto)->iKeywordsize);
|
|
3027 |
}
|
|
3028 |
|
|
3029 |
if (((mng_itxtp)pChunkto)->iTextsize)
|
|
3030 |
{
|
|
3031 |
MNG_ALLOC (pData, ((mng_itxtp)pChunkto)->zLanguage, ((mng_itxtp)pChunkto)->iLanguagesize);
|
|
3032 |
MNG_COPY (((mng_itxtp)pChunkto)->zLanguage, ((mng_itxtp)pChunkfrom)->zLanguage,
|
|
3033 |
((mng_itxtp)pChunkto)->iLanguagesize);
|
|
3034 |
}
|
|
3035 |
|
|
3036 |
if (((mng_itxtp)pChunkto)->iTextsize)
|
|
3037 |
{
|
|
3038 |
MNG_ALLOC (pData, ((mng_itxtp)pChunkto)->zTranslation, ((mng_itxtp)pChunkto)->iTranslationsize);
|
|
3039 |
MNG_COPY (((mng_itxtp)pChunkto)->zTranslation, ((mng_itxtp)pChunkfrom)->zTranslation,
|
|
3040 |
((mng_itxtp)pChunkto)->iTranslationsize);
|
|
3041 |
}
|
|
3042 |
|
|
3043 |
if (((mng_itxtp)pChunkto)->iTextsize)
|
|
3044 |
{
|
|
3045 |
MNG_ALLOC (pData, ((mng_itxtp)pChunkto)->zText, ((mng_itxtp)pChunkto)->iTextsize);
|
|
3046 |
MNG_COPY (((mng_itxtp)pChunkto)->zText, ((mng_itxtp)pChunkfrom)->zText,
|
|
3047 |
((mng_itxtp)pChunkto)->iTextsize);
|
|
3048 |
}
|
|
3049 |
|
|
3050 |
#ifdef MNG_SUPPORT_TRACE
|
|
3051 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ITXT, MNG_LC_END);
|
|
3052 |
#endif
|
|
3053 |
|
|
3054 |
return MNG_NOERROR;
|
|
3055 |
}
|
|
3056 |
#endif
|
|
3057 |
|
|
3058 |
/* ************************************************************************** */
|
|
3059 |
|
|
3060 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3061 |
#ifndef MNG_SKIPCHUNK_bKGD
|
|
3062 |
ASSIGN_CHUNK_HDR (mng_assign_bkgd)
|
|
3063 |
{
|
|
3064 |
#ifdef MNG_SUPPORT_TRACE
|
|
3065 |
MNG_TRACE (pData, MNG_FN_ASSIGN_BKGD, MNG_LC_START);
|
|
3066 |
#endif
|
|
3067 |
|
|
3068 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_bKGD)
|
|
3069 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3070 |
|
|
3071 |
((mng_bkgdp)pChunkto)->bEmpty = ((mng_bkgdp)pChunkfrom)->bEmpty;
|
|
3072 |
((mng_bkgdp)pChunkto)->iType = ((mng_bkgdp)pChunkfrom)->iType;
|
|
3073 |
((mng_bkgdp)pChunkto)->iIndex = ((mng_bkgdp)pChunkfrom)->iIndex;
|
|
3074 |
((mng_bkgdp)pChunkto)->iGray = ((mng_bkgdp)pChunkfrom)->iGray;
|
|
3075 |
((mng_bkgdp)pChunkto)->iRed = ((mng_bkgdp)pChunkfrom)->iRed;
|
|
3076 |
((mng_bkgdp)pChunkto)->iGreen = ((mng_bkgdp)pChunkfrom)->iGreen;
|
|
3077 |
((mng_bkgdp)pChunkto)->iBlue = ((mng_bkgdp)pChunkfrom)->iBlue;
|
|
3078 |
|
|
3079 |
#ifdef MNG_SUPPORT_TRACE
|
|
3080 |
MNG_TRACE (pData, MNG_FN_ASSIGN_BKGD, MNG_LC_END);
|
|
3081 |
#endif
|
|
3082 |
|
|
3083 |
return MNG_NOERROR;
|
|
3084 |
}
|
|
3085 |
#endif
|
|
3086 |
#endif
|
|
3087 |
|
|
3088 |
/* ************************************************************************** */
|
|
3089 |
|
|
3090 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3091 |
#ifndef MNG_SKIPCHUNK_pHYs
|
|
3092 |
ASSIGN_CHUNK_HDR (mng_assign_phys)
|
|
3093 |
{
|
|
3094 |
#ifdef MNG_SUPPORT_TRACE
|
|
3095 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PHYS, MNG_LC_START);
|
|
3096 |
#endif
|
|
3097 |
|
|
3098 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_pHYs)
|
|
3099 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3100 |
|
|
3101 |
((mng_physp)pChunkto)->bEmpty = ((mng_physp)pChunkfrom)->bEmpty;
|
|
3102 |
((mng_physp)pChunkto)->iSizex = ((mng_physp)pChunkfrom)->iSizex;
|
|
3103 |
((mng_physp)pChunkto)->iSizey = ((mng_physp)pChunkfrom)->iSizey;
|
|
3104 |
((mng_physp)pChunkto)->iUnit = ((mng_physp)pChunkfrom)->iUnit;
|
|
3105 |
|
|
3106 |
#ifdef MNG_SUPPORT_TRACE
|
|
3107 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PHYS, MNG_LC_END);
|
|
3108 |
#endif
|
|
3109 |
|
|
3110 |
return MNG_NOERROR;
|
|
3111 |
}
|
|
3112 |
#endif
|
|
3113 |
#endif
|
|
3114 |
|
|
3115 |
/* ************************************************************************** */
|
|
3116 |
|
|
3117 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3118 |
#ifndef MNG_SKIPCHUNK_sBIT
|
|
3119 |
ASSIGN_CHUNK_HDR (mng_assign_sbit)
|
|
3120 |
{
|
|
3121 |
#ifdef MNG_SUPPORT_TRACE
|
|
3122 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SBIT, MNG_LC_START);
|
|
3123 |
#endif
|
|
3124 |
|
|
3125 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_sBIT)
|
|
3126 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3127 |
|
|
3128 |
((mng_sbitp)pChunkto)->bEmpty = ((mng_sbitp)pChunkfrom)->bEmpty;
|
|
3129 |
((mng_sbitp)pChunkto)->iType = ((mng_sbitp)pChunkfrom)->iType;
|
|
3130 |
((mng_sbitp)pChunkto)->aBits [0] = ((mng_sbitp)pChunkfrom)->aBits [0];
|
|
3131 |
((mng_sbitp)pChunkto)->aBits [1] = ((mng_sbitp)pChunkfrom)->aBits [1];
|
|
3132 |
((mng_sbitp)pChunkto)->aBits [2] = ((mng_sbitp)pChunkfrom)->aBits [2];
|
|
3133 |
((mng_sbitp)pChunkto)->aBits [3] = ((mng_sbitp)pChunkfrom)->aBits [3];
|
|
3134 |
|
|
3135 |
#ifdef MNG_SUPPORT_TRACE
|
|
3136 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SBIT, MNG_LC_END);
|
|
3137 |
#endif
|
|
3138 |
|
|
3139 |
return MNG_NOERROR;
|
|
3140 |
}
|
|
3141 |
#endif
|
|
3142 |
#endif
|
|
3143 |
|
|
3144 |
/* ************************************************************************** */
|
|
3145 |
|
|
3146 |
#ifndef MNG_SKIPCHUNK_sPLT
|
|
3147 |
ASSIGN_CHUNK_HDR (mng_assign_splt)
|
|
3148 |
{
|
|
3149 |
#ifdef MNG_SUPPORT_TRACE
|
|
3150 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SPLT, MNG_LC_START);
|
|
3151 |
#endif
|
|
3152 |
|
|
3153 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_sPLT)
|
|
3154 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3155 |
|
|
3156 |
((mng_spltp)pChunkto)->bEmpty = ((mng_spltp)pChunkfrom)->bEmpty;
|
|
3157 |
((mng_spltp)pChunkto)->iNamesize = ((mng_spltp)pChunkfrom)->iNamesize;
|
|
3158 |
((mng_spltp)pChunkto)->iSampledepth = ((mng_spltp)pChunkfrom)->iSampledepth;
|
|
3159 |
((mng_spltp)pChunkto)->iEntrycount = ((mng_spltp)pChunkfrom)->iEntrycount;
|
|
3160 |
((mng_spltp)pChunkto)->pEntries = ((mng_spltp)pChunkfrom)->pEntries;
|
|
3161 |
|
|
3162 |
if (((mng_spltp)pChunkto)->iNamesize)
|
|
3163 |
{
|
|
3164 |
MNG_ALLOC (pData, ((mng_spltp)pChunkto)->zName, ((mng_spltp)pChunkto)->iNamesize);
|
|
3165 |
MNG_COPY (((mng_spltp)pChunkto)->zName, ((mng_spltp)pChunkfrom)->zName,
|
|
3166 |
((mng_spltp)pChunkto)->iNamesize);
|
|
3167 |
}
|
|
3168 |
|
|
3169 |
if (((mng_spltp)pChunkto)->iEntrycount)
|
|
3170 |
{
|
|
3171 |
mng_uint32 iLen = ((mng_spltp)pChunkto)->iEntrycount *
|
|
3172 |
(((mng_spltp)pChunkto)->iSampledepth * 3 + sizeof (mng_uint16));
|
|
3173 |
|
|
3174 |
MNG_ALLOC (pData, ((mng_spltp)pChunkto)->pEntries, iLen);
|
|
3175 |
MNG_COPY (((mng_spltp)pChunkto)->pEntries, ((mng_spltp)pChunkfrom)->pEntries, iLen);
|
|
3176 |
}
|
|
3177 |
|
|
3178 |
#ifdef MNG_SUPPORT_TRACE
|
|
3179 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SPLT, MNG_LC_END);
|
|
3180 |
#endif
|
|
3181 |
|
|
3182 |
return MNG_NOERROR;
|
|
3183 |
}
|
|
3184 |
#endif
|
|
3185 |
|
|
3186 |
/* ************************************************************************** */
|
|
3187 |
|
|
3188 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3189 |
#ifndef MNG_SKIPCHUNK_hIST
|
|
3190 |
ASSIGN_CHUNK_HDR (mng_assign_hist)
|
|
3191 |
{
|
|
3192 |
mng_uint32 iX;
|
|
3193 |
|
|
3194 |
#ifdef MNG_SUPPORT_TRACE
|
|
3195 |
MNG_TRACE (pData, MNG_FN_ASSIGN_HIST, MNG_LC_START);
|
|
3196 |
#endif
|
|
3197 |
|
|
3198 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_hIST)
|
|
3199 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3200 |
|
|
3201 |
((mng_histp)pChunkto)->iEntrycount = ((mng_histp)pChunkfrom)->iEntrycount;
|
|
3202 |
|
|
3203 |
for (iX = 0; iX < ((mng_histp)pChunkto)->iEntrycount; iX++)
|
|
3204 |
((mng_histp)pChunkto)->aEntries [iX] = ((mng_histp)pChunkfrom)->aEntries [iX];
|
|
3205 |
|
|
3206 |
#ifdef MNG_SUPPORT_TRACE
|
|
3207 |
MNG_TRACE (pData, MNG_FN_ASSIGN_HIST, MNG_LC_END);
|
|
3208 |
#endif
|
|
3209 |
|
|
3210 |
return MNG_NOERROR;
|
|
3211 |
}
|
|
3212 |
#endif
|
|
3213 |
#endif
|
|
3214 |
|
|
3215 |
/* ************************************************************************** */
|
|
3216 |
|
|
3217 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3218 |
#ifndef MNG_SKIPCHUNK_tIME
|
|
3219 |
ASSIGN_CHUNK_HDR (mng_assign_time)
|
|
3220 |
{
|
|
3221 |
#ifdef MNG_SUPPORT_TRACE
|
|
3222 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TIME, MNG_LC_START);
|
|
3223 |
#endif
|
|
3224 |
|
|
3225 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_tIME)
|
|
3226 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3227 |
|
|
3228 |
((mng_timep)pChunkto)->iYear = ((mng_timep)pChunkfrom)->iYear;
|
|
3229 |
((mng_timep)pChunkto)->iMonth = ((mng_timep)pChunkfrom)->iMonth;
|
|
3230 |
((mng_timep)pChunkto)->iDay = ((mng_timep)pChunkfrom)->iDay;
|
|
3231 |
((mng_timep)pChunkto)->iHour = ((mng_timep)pChunkfrom)->iHour;
|
|
3232 |
((mng_timep)pChunkto)->iMinute = ((mng_timep)pChunkfrom)->iMinute;
|
|
3233 |
((mng_timep)pChunkto)->iSecond = ((mng_timep)pChunkfrom)->iSecond;
|
|
3234 |
|
|
3235 |
#ifdef MNG_SUPPORT_TRACE
|
|
3236 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TIME, MNG_LC_END);
|
|
3237 |
#endif
|
|
3238 |
|
|
3239 |
return MNG_NOERROR;
|
|
3240 |
}
|
|
3241 |
#endif
|
|
3242 |
#endif
|
|
3243 |
|
|
3244 |
/* ************************************************************************** */
|
|
3245 |
|
|
3246 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3247 |
ASSIGN_CHUNK_HDR (mng_assign_mhdr)
|
|
3248 |
{
|
|
3249 |
#ifdef MNG_SUPPORT_TRACE
|
|
3250 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MHDR, MNG_LC_START);
|
|
3251 |
#endif
|
|
3252 |
|
|
3253 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_MHDR)
|
|
3254 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3255 |
|
|
3256 |
((mng_mhdrp)pChunkto)->iWidth = ((mng_mhdrp)pChunkfrom)->iWidth;
|
|
3257 |
((mng_mhdrp)pChunkto)->iHeight = ((mng_mhdrp)pChunkfrom)->iHeight;
|
|
3258 |
((mng_mhdrp)pChunkto)->iTicks = ((mng_mhdrp)pChunkfrom)->iTicks;
|
|
3259 |
((mng_mhdrp)pChunkto)->iLayercount = ((mng_mhdrp)pChunkfrom)->iLayercount;
|
|
3260 |
((mng_mhdrp)pChunkto)->iFramecount = ((mng_mhdrp)pChunkfrom)->iFramecount;
|
|
3261 |
((mng_mhdrp)pChunkto)->iPlaytime = ((mng_mhdrp)pChunkfrom)->iPlaytime;
|
|
3262 |
((mng_mhdrp)pChunkto)->iSimplicity = ((mng_mhdrp)pChunkfrom)->iSimplicity;
|
|
3263 |
|
|
3264 |
#ifdef MNG_SUPPORT_TRACE
|
|
3265 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MHDR, MNG_LC_END);
|
|
3266 |
#endif
|
|
3267 |
|
|
3268 |
return MNG_NOERROR;
|
|
3269 |
}
|
|
3270 |
#endif
|
|
3271 |
|
|
3272 |
/* ************************************************************************** */
|
|
3273 |
|
|
3274 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3275 |
ASSIGN_CHUNK_HDR (mng_assign_mend)
|
|
3276 |
{
|
|
3277 |
#ifdef MNG_SUPPORT_TRACE
|
|
3278 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MEND, MNG_LC_START);
|
|
3279 |
#endif
|
|
3280 |
|
|
3281 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_MEND)
|
|
3282 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3283 |
|
|
3284 |
#ifdef MNG_SUPPORT_TRACE
|
|
3285 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MEND, MNG_LC_END);
|
|
3286 |
#endif
|
|
3287 |
|
|
3288 |
return MNG_NOERROR;
|
|
3289 |
}
|
|
3290 |
#endif
|
|
3291 |
|
|
3292 |
/* ************************************************************************** */
|
|
3293 |
|
|
3294 |
#ifndef MNG_SKIPCHUNK_LOOP
|
|
3295 |
ASSIGN_CHUNK_HDR (mng_assign_loop)
|
|
3296 |
{
|
|
3297 |
#ifdef MNG_SUPPORT_TRACE
|
|
3298 |
MNG_TRACE (pData, MNG_FN_ASSIGN_LOOP, MNG_LC_START);
|
|
3299 |
#endif
|
|
3300 |
|
|
3301 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_LOOP)
|
|
3302 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3303 |
|
|
3304 |
((mng_loopp)pChunkto)->iLevel = ((mng_loopp)pChunkfrom)->iLevel;
|
|
3305 |
((mng_loopp)pChunkto)->iRepeat = ((mng_loopp)pChunkfrom)->iRepeat;
|
|
3306 |
((mng_loopp)pChunkto)->iTermination = ((mng_loopp)pChunkfrom)->iTermination;
|
|
3307 |
((mng_loopp)pChunkto)->iItermin = ((mng_loopp)pChunkfrom)->iItermin;
|
|
3308 |
((mng_loopp)pChunkto)->iItermax = ((mng_loopp)pChunkfrom)->iItermax;
|
|
3309 |
((mng_loopp)pChunkto)->iCount = ((mng_loopp)pChunkfrom)->iCount;
|
|
3310 |
|
|
3311 |
#ifndef MNG_NO_LOOP_SIGNALS_SUPPORTED
|
|
3312 |
if (((mng_loopp)pChunkto)->iCount)
|
|
3313 |
{
|
|
3314 |
mng_uint32 iLen = ((mng_loopp)pChunkto)->iCount * sizeof (mng_uint32);
|
|
3315 |
MNG_ALLOC (pData, ((mng_loopp)pChunkto)->pSignals, iLen);
|
|
3316 |
MNG_COPY (((mng_loopp)pChunkto)->pSignals, ((mng_loopp)pChunkfrom)->pSignals, iLen);
|
|
3317 |
}
|
|
3318 |
#endif
|
|
3319 |
|
|
3320 |
#ifdef MNG_SUPPORT_TRACE
|
|
3321 |
MNG_TRACE (pData, MNG_FN_ASSIGN_LOOP, MNG_LC_END);
|
|
3322 |
#endif
|
|
3323 |
|
|
3324 |
return MNG_NOERROR;
|
|
3325 |
}
|
|
3326 |
|
|
3327 |
/* ************************************************************************** */
|
|
3328 |
|
|
3329 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3330 |
ASSIGN_CHUNK_HDR (mng_assign_endl)
|
|
3331 |
{
|
|
3332 |
#ifdef MNG_SUPPORT_TRACE
|
|
3333 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ENDL, MNG_LC_START);
|
|
3334 |
#endif
|
|
3335 |
|
|
3336 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_ENDL)
|
|
3337 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3338 |
|
|
3339 |
((mng_endlp)pChunkto)->iLevel = ((mng_endlp)pChunkfrom)->iLevel;
|
|
3340 |
|
|
3341 |
#ifdef MNG_SUPPORT_TRACE
|
|
3342 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ENDL, MNG_LC_END);
|
|
3343 |
#endif
|
|
3344 |
|
|
3345 |
return MNG_NOERROR;
|
|
3346 |
}
|
|
3347 |
#endif
|
|
3348 |
#endif
|
|
3349 |
|
|
3350 |
/* ************************************************************************** */
|
|
3351 |
|
|
3352 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3353 |
#ifndef MNG_SKIPCHUNK_DEFI
|
|
3354 |
ASSIGN_CHUNK_HDR (mng_assign_defi)
|
|
3355 |
{
|
|
3356 |
#ifdef MNG_SUPPORT_TRACE
|
|
3357 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DEFI, MNG_LC_START);
|
|
3358 |
#endif
|
|
3359 |
|
|
3360 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_DEFI)
|
|
3361 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3362 |
|
|
3363 |
((mng_defip)pChunkto)->iObjectid = ((mng_defip)pChunkfrom)->iObjectid;
|
|
3364 |
((mng_defip)pChunkto)->bHasdonotshow = ((mng_defip)pChunkfrom)->bHasdonotshow;
|
|
3365 |
((mng_defip)pChunkto)->iDonotshow = ((mng_defip)pChunkfrom)->iDonotshow;
|
|
3366 |
((mng_defip)pChunkto)->bHasconcrete = ((mng_defip)pChunkfrom)->bHasconcrete;
|
|
3367 |
((mng_defip)pChunkto)->iConcrete = ((mng_defip)pChunkfrom)->iConcrete;
|
|
3368 |
((mng_defip)pChunkto)->bHasloca = ((mng_defip)pChunkfrom)->bHasloca;
|
|
3369 |
((mng_defip)pChunkto)->iXlocation = ((mng_defip)pChunkfrom)->iXlocation;
|
|
3370 |
((mng_defip)pChunkto)->iYlocation = ((mng_defip)pChunkfrom)->iYlocation;
|
|
3371 |
((mng_defip)pChunkto)->bHasclip = ((mng_defip)pChunkfrom)->bHasclip;
|
|
3372 |
((mng_defip)pChunkto)->iLeftcb = ((mng_defip)pChunkfrom)->iLeftcb;
|
|
3373 |
((mng_defip)pChunkto)->iRightcb = ((mng_defip)pChunkfrom)->iRightcb;
|
|
3374 |
((mng_defip)pChunkto)->iTopcb = ((mng_defip)pChunkfrom)->iTopcb;
|
|
3375 |
((mng_defip)pChunkto)->iBottomcb = ((mng_defip)pChunkfrom)->iBottomcb;
|
|
3376 |
|
|
3377 |
#ifdef MNG_SUPPORT_TRACE
|
|
3378 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DEFI, MNG_LC_END);
|
|
3379 |
#endif
|
|
3380 |
|
|
3381 |
return MNG_NOERROR;
|
|
3382 |
}
|
|
3383 |
#endif
|
|
3384 |
#endif
|
|
3385 |
|
|
3386 |
/* ************************************************************************** */
|
|
3387 |
|
|
3388 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3389 |
#ifndef MNG_SKIPCHUNK_BASI
|
|
3390 |
ASSIGN_CHUNK_HDR (mng_assign_basi)
|
|
3391 |
{
|
|
3392 |
#ifdef MNG_SUPPORT_TRACE
|
|
3393 |
MNG_TRACE (pData, MNG_FN_ASSIGN_BASI, MNG_LC_START);
|
|
3394 |
#endif
|
|
3395 |
|
|
3396 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_BASI)
|
|
3397 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3398 |
|
|
3399 |
((mng_basip)pChunkto)->iWidth = ((mng_basip)pChunkfrom)->iWidth;
|
|
3400 |
((mng_basip)pChunkto)->iHeight = ((mng_basip)pChunkfrom)->iHeight;
|
|
3401 |
((mng_basip)pChunkto)->iBitdepth = ((mng_basip)pChunkfrom)->iBitdepth;
|
|
3402 |
((mng_basip)pChunkto)->iColortype = ((mng_basip)pChunkfrom)->iColortype;
|
|
3403 |
((mng_basip)pChunkto)->iCompression = ((mng_basip)pChunkfrom)->iCompression;
|
|
3404 |
((mng_basip)pChunkto)->iFilter = ((mng_basip)pChunkfrom)->iFilter;
|
|
3405 |
((mng_basip)pChunkto)->iInterlace = ((mng_basip)pChunkfrom)->iInterlace;
|
|
3406 |
((mng_basip)pChunkto)->iRed = ((mng_basip)pChunkfrom)->iRed;
|
|
3407 |
((mng_basip)pChunkto)->iGreen = ((mng_basip)pChunkfrom)->iGreen;
|
|
3408 |
((mng_basip)pChunkto)->iBlue = ((mng_basip)pChunkfrom)->iBlue;
|
|
3409 |
((mng_basip)pChunkto)->iAlpha = ((mng_basip)pChunkfrom)->iAlpha;
|
|
3410 |
((mng_basip)pChunkto)->iViewable = ((mng_basip)pChunkfrom)->iViewable;
|
|
3411 |
|
|
3412 |
#ifdef MNG_SUPPORT_TRACE
|
|
3413 |
MNG_TRACE (pData, MNG_FN_ASSIGN_BASI, MNG_LC_END);
|
|
3414 |
#endif
|
|
3415 |
|
|
3416 |
return MNG_NOERROR;
|
|
3417 |
}
|
|
3418 |
#endif
|
|
3419 |
#endif
|
|
3420 |
|
|
3421 |
/* ************************************************************************** */
|
|
3422 |
|
|
3423 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3424 |
#ifndef MNG_SKIPCHUNK_CLON
|
|
3425 |
ASSIGN_CHUNK_HDR (mng_assign_clon)
|
|
3426 |
{
|
|
3427 |
#ifdef MNG_SUPPORT_TRACE
|
|
3428 |
MNG_TRACE (pData, MNG_FN_ASSIGN_CLON, MNG_LC_START);
|
|
3429 |
#endif
|
|
3430 |
|
|
3431 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_CLON)
|
|
3432 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3433 |
|
|
3434 |
((mng_clonp)pChunkto)->iSourceid = ((mng_clonp)pChunkfrom)->iSourceid;
|
|
3435 |
((mng_clonp)pChunkto)->iCloneid = ((mng_clonp)pChunkfrom)->iCloneid;
|
|
3436 |
((mng_clonp)pChunkto)->iClonetype = ((mng_clonp)pChunkfrom)->iClonetype;
|
|
3437 |
#ifdef MNG_OPTIMIZE_CHUNKREADER
|
|
3438 |
((mng_clonp)pChunkto)->bHasdonotshow = ((mng_clonp)pChunkfrom)->bHasdonotshow;
|
|
3439 |
#endif
|
|
3440 |
((mng_clonp)pChunkto)->iDonotshow = ((mng_clonp)pChunkfrom)->iDonotshow;
|
|
3441 |
((mng_clonp)pChunkto)->iConcrete = ((mng_clonp)pChunkfrom)->iConcrete;
|
|
3442 |
((mng_clonp)pChunkto)->bHasloca = ((mng_clonp)pChunkfrom)->bHasloca;
|
|
3443 |
((mng_clonp)pChunkto)->iLocationtype = ((mng_clonp)pChunkfrom)->iLocationtype;
|
|
3444 |
((mng_clonp)pChunkto)->iLocationx = ((mng_clonp)pChunkfrom)->iLocationx;
|
|
3445 |
((mng_clonp)pChunkto)->iLocationy = ((mng_clonp)pChunkfrom)->iLocationy;
|
|
3446 |
|
|
3447 |
#ifdef MNG_SUPPORT_TRACE
|
|
3448 |
MNG_TRACE (pData, MNG_FN_ASSIGN_CLON, MNG_LC_END);
|
|
3449 |
#endif
|
|
3450 |
|
|
3451 |
return MNG_NOERROR;
|
|
3452 |
}
|
|
3453 |
#endif
|
|
3454 |
#endif
|
|
3455 |
/* ************************************************************************** */
|
|
3456 |
|
|
3457 |
#ifndef MNG_SKIPCHUNK_PAST
|
|
3458 |
ASSIGN_CHUNK_HDR (mng_assign_past)
|
|
3459 |
{
|
|
3460 |
#ifdef MNG_SUPPORT_TRACE
|
|
3461 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PAST, MNG_LC_START);
|
|
3462 |
#endif
|
|
3463 |
|
|
3464 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_PAST)
|
|
3465 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3466 |
|
|
3467 |
((mng_pastp)pChunkto)->iDestid = ((mng_pastp)pChunkfrom)->iDestid;
|
|
3468 |
((mng_pastp)pChunkto)->iTargettype = ((mng_pastp)pChunkfrom)->iTargettype;
|
|
3469 |
((mng_pastp)pChunkto)->iTargetx = ((mng_pastp)pChunkfrom)->iTargetx;
|
|
3470 |
((mng_pastp)pChunkto)->iTargety = ((mng_pastp)pChunkfrom)->iTargety;
|
|
3471 |
((mng_pastp)pChunkto)->iCount = ((mng_pastp)pChunkfrom)->iCount;
|
|
3472 |
|
|
3473 |
if (((mng_pastp)pChunkto)->iCount)
|
|
3474 |
{
|
|
3475 |
mng_uint32 iLen = ((mng_pastp)pChunkto)->iCount * sizeof (mng_past_source);
|
|
3476 |
|
|
3477 |
MNG_ALLOC (pData, ((mng_pastp)pChunkto)->pSources, iLen);
|
|
3478 |
MNG_COPY (((mng_pastp)pChunkto)->pSources, ((mng_pastp)pChunkfrom)->pSources, iLen);
|
|
3479 |
}
|
|
3480 |
|
|
3481 |
#ifdef MNG_SUPPORT_TRACE
|
|
3482 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PAST, MNG_LC_END);
|
|
3483 |
#endif
|
|
3484 |
|
|
3485 |
return MNG_NOERROR;
|
|
3486 |
}
|
|
3487 |
#endif
|
|
3488 |
|
|
3489 |
/* ************************************************************************** */
|
|
3490 |
|
|
3491 |
#ifndef MNG_SKIPCHUNK_DISC
|
|
3492 |
ASSIGN_CHUNK_HDR (mng_assign_disc)
|
|
3493 |
{
|
|
3494 |
#ifdef MNG_SUPPORT_TRACE
|
|
3495 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DISC, MNG_LC_START);
|
|
3496 |
#endif
|
|
3497 |
|
|
3498 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_DISC)
|
|
3499 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3500 |
|
|
3501 |
((mng_discp)pChunkto)->iCount = ((mng_discp)pChunkfrom)->iCount;
|
|
3502 |
|
|
3503 |
if (((mng_discp)pChunkto)->iCount)
|
|
3504 |
{
|
|
3505 |
mng_uint32 iLen = ((mng_discp)pChunkto)->iCount * sizeof (mng_uint16);
|
|
3506 |
|
|
3507 |
MNG_ALLOC (pData, ((mng_discp)pChunkto)->pObjectids, iLen);
|
|
3508 |
MNG_COPY (((mng_discp)pChunkto)->pObjectids, ((mng_discp)pChunkfrom)->pObjectids, iLen);
|
|
3509 |
}
|
|
3510 |
|
|
3511 |
#ifdef MNG_SUPPORT_TRACE
|
|
3512 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DISC, MNG_LC_END);
|
|
3513 |
#endif
|
|
3514 |
|
|
3515 |
return MNG_NOERROR;
|
|
3516 |
}
|
|
3517 |
#endif
|
|
3518 |
|
|
3519 |
/* ************************************************************************** */
|
|
3520 |
|
|
3521 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3522 |
#ifndef MNG_SKIPCHUNK_BACK
|
|
3523 |
ASSIGN_CHUNK_HDR (mng_assign_back)
|
|
3524 |
{
|
|
3525 |
#ifdef MNG_SUPPORT_TRACE
|
|
3526 |
MNG_TRACE (pData, MNG_FN_ASSIGN_BACK, MNG_LC_START);
|
|
3527 |
#endif
|
|
3528 |
|
|
3529 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_BACK)
|
|
3530 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3531 |
|
|
3532 |
((mng_backp)pChunkto)->iRed = ((mng_backp)pChunkfrom)->iRed;
|
|
3533 |
((mng_backp)pChunkto)->iGreen = ((mng_backp)pChunkfrom)->iGreen;
|
|
3534 |
((mng_backp)pChunkto)->iBlue = ((mng_backp)pChunkfrom)->iBlue;
|
|
3535 |
((mng_backp)pChunkto)->iMandatory = ((mng_backp)pChunkfrom)->iMandatory;
|
|
3536 |
((mng_backp)pChunkto)->iImageid = ((mng_backp)pChunkfrom)->iImageid;
|
|
3537 |
((mng_backp)pChunkto)->iTile = ((mng_backp)pChunkfrom)->iTile;
|
|
3538 |
|
|
3539 |
#ifdef MNG_SUPPORT_TRACE
|
|
3540 |
MNG_TRACE (pData, MNG_FN_ASSIGN_BACK, MNG_LC_END);
|
|
3541 |
#endif
|
|
3542 |
|
|
3543 |
return MNG_NOERROR;
|
|
3544 |
}
|
|
3545 |
#endif
|
|
3546 |
#endif
|
|
3547 |
|
|
3548 |
/* ************************************************************************** */
|
|
3549 |
|
|
3550 |
#ifndef MNG_SKIPCHUNK_FRAM
|
|
3551 |
ASSIGN_CHUNK_HDR (mng_assign_fram)
|
|
3552 |
{
|
|
3553 |
#ifdef MNG_SUPPORT_TRACE
|
|
3554 |
MNG_TRACE (pData, MNG_FN_ASSIGN_FRAM, MNG_LC_START);
|
|
3555 |
#endif
|
|
3556 |
|
|
3557 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_FRAM)
|
|
3558 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3559 |
|
|
3560 |
((mng_framp)pChunkto)->bEmpty = ((mng_framp)pChunkfrom)->bEmpty;
|
|
3561 |
((mng_framp)pChunkto)->iMode = ((mng_framp)pChunkfrom)->iMode;
|
|
3562 |
((mng_framp)pChunkto)->iNamesize = ((mng_framp)pChunkfrom)->iNamesize;
|
|
3563 |
((mng_framp)pChunkto)->iChangedelay = ((mng_framp)pChunkfrom)->iChangedelay;
|
|
3564 |
((mng_framp)pChunkto)->iChangetimeout = ((mng_framp)pChunkfrom)->iChangetimeout;
|
|
3565 |
((mng_framp)pChunkto)->iChangeclipping = ((mng_framp)pChunkfrom)->iChangeclipping;
|
|
3566 |
((mng_framp)pChunkto)->iChangesyncid = ((mng_framp)pChunkfrom)->iChangesyncid;
|
|
3567 |
((mng_framp)pChunkto)->iDelay = ((mng_framp)pChunkfrom)->iDelay;
|
|
3568 |
((mng_framp)pChunkto)->iTimeout = ((mng_framp)pChunkfrom)->iTimeout;
|
|
3569 |
((mng_framp)pChunkto)->iBoundarytype = ((mng_framp)pChunkfrom)->iBoundarytype;
|
|
3570 |
((mng_framp)pChunkto)->iBoundaryl = ((mng_framp)pChunkfrom)->iBoundaryl;
|
|
3571 |
((mng_framp)pChunkto)->iBoundaryr = ((mng_framp)pChunkfrom)->iBoundaryr;
|
|
3572 |
((mng_framp)pChunkto)->iBoundaryt = ((mng_framp)pChunkfrom)->iBoundaryt;
|
|
3573 |
((mng_framp)pChunkto)->iBoundaryb = ((mng_framp)pChunkfrom)->iBoundaryb;
|
|
3574 |
((mng_framp)pChunkto)->iCount = ((mng_framp)pChunkfrom)->iCount;
|
|
3575 |
|
|
3576 |
if (((mng_framp)pChunkto)->iNamesize)
|
|
3577 |
{
|
|
3578 |
MNG_ALLOC (pData, ((mng_framp)pChunkto)->zName, ((mng_framp)pChunkto)->iNamesize);
|
|
3579 |
MNG_COPY (((mng_framp)pChunkto)->zName, ((mng_framp)pChunkfrom)->zName,
|
|
3580 |
((mng_framp)pChunkto)->iNamesize);
|
|
3581 |
}
|
|
3582 |
|
|
3583 |
if (((mng_framp)pChunkto)->iCount)
|
|
3584 |
{
|
|
3585 |
mng_uint32 iLen = ((mng_framp)pChunkto)->iCount * sizeof (mng_uint32);
|
|
3586 |
|
|
3587 |
MNG_ALLOC (pData, ((mng_framp)pChunkto)->pSyncids, iLen);
|
|
3588 |
MNG_COPY (((mng_framp)pChunkto)->pSyncids, ((mng_framp)pChunkfrom)->pSyncids, iLen);
|
|
3589 |
}
|
|
3590 |
|
|
3591 |
#ifdef MNG_SUPPORT_TRACE
|
|
3592 |
MNG_TRACE (pData, MNG_FN_ASSIGN_FRAM, MNG_LC_END);
|
|
3593 |
#endif
|
|
3594 |
|
|
3595 |
return MNG_NOERROR;
|
|
3596 |
}
|
|
3597 |
#endif
|
|
3598 |
|
|
3599 |
/* ************************************************************************** */
|
|
3600 |
|
|
3601 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3602 |
#ifndef MNG_SKIPCHUNK_MOVE
|
|
3603 |
ASSIGN_CHUNK_HDR (mng_assign_move)
|
|
3604 |
{
|
|
3605 |
#ifdef MNG_SUPPORT_TRACE
|
|
3606 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MOVE, MNG_LC_START);
|
|
3607 |
#endif
|
|
3608 |
|
|
3609 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_MOVE)
|
|
3610 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3611 |
|
|
3612 |
((mng_movep)pChunkto)->iFirstid = ((mng_movep)pChunkfrom)->iFirstid;
|
|
3613 |
((mng_movep)pChunkto)->iLastid = ((mng_movep)pChunkfrom)->iLastid;
|
|
3614 |
((mng_movep)pChunkto)->iMovetype = ((mng_movep)pChunkfrom)->iMovetype;
|
|
3615 |
((mng_movep)pChunkto)->iMovex = ((mng_movep)pChunkfrom)->iMovex;
|
|
3616 |
((mng_movep)pChunkto)->iMovey = ((mng_movep)pChunkfrom)->iMovey;
|
|
3617 |
|
|
3618 |
#ifdef MNG_SUPPORT_TRACE
|
|
3619 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MOVE, MNG_LC_END);
|
|
3620 |
#endif
|
|
3621 |
|
|
3622 |
return MNG_NOERROR;
|
|
3623 |
}
|
|
3624 |
#endif
|
|
3625 |
#endif
|
|
3626 |
|
|
3627 |
/* ************************************************************************** */
|
|
3628 |
|
|
3629 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3630 |
#ifndef MNG_SKIPCHUNK_CLIP
|
|
3631 |
ASSIGN_CHUNK_HDR (mng_assign_clip)
|
|
3632 |
{
|
|
3633 |
#ifdef MNG_SUPPORT_TRACE
|
|
3634 |
MNG_TRACE (pData, MNG_FN_ASSIGN_CLIP, MNG_LC_START);
|
|
3635 |
#endif
|
|
3636 |
|
|
3637 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_CLIP)
|
|
3638 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3639 |
|
|
3640 |
((mng_clipp)pChunkto)->iFirstid = ((mng_clipp)pChunkfrom)->iFirstid;
|
|
3641 |
((mng_clipp)pChunkto)->iLastid = ((mng_clipp)pChunkfrom)->iLastid;
|
|
3642 |
((mng_clipp)pChunkto)->iCliptype = ((mng_clipp)pChunkfrom)->iCliptype;
|
|
3643 |
((mng_clipp)pChunkto)->iClipl = ((mng_clipp)pChunkfrom)->iClipl;
|
|
3644 |
((mng_clipp)pChunkto)->iClipr = ((mng_clipp)pChunkfrom)->iClipr;
|
|
3645 |
((mng_clipp)pChunkto)->iClipt = ((mng_clipp)pChunkfrom)->iClipt;
|
|
3646 |
((mng_clipp)pChunkto)->iClipb = ((mng_clipp)pChunkfrom)->iClipb;
|
|
3647 |
|
|
3648 |
#ifdef MNG_SUPPORT_TRACE
|
|
3649 |
MNG_TRACE (pData, MNG_FN_ASSIGN_CLIP, MNG_LC_END);
|
|
3650 |
#endif
|
|
3651 |
|
|
3652 |
return MNG_NOERROR;
|
|
3653 |
}
|
|
3654 |
#endif
|
|
3655 |
#endif
|
|
3656 |
|
|
3657 |
/* ************************************************************************** */
|
|
3658 |
|
|
3659 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3660 |
#ifndef MNG_SKIPCHUNK_SHOW
|
|
3661 |
ASSIGN_CHUNK_HDR (mng_assign_show)
|
|
3662 |
{
|
|
3663 |
#ifdef MNG_SUPPORT_TRACE
|
|
3664 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SHOW, MNG_LC_START);
|
|
3665 |
#endif
|
|
3666 |
|
|
3667 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_SHOW)
|
|
3668 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3669 |
|
|
3670 |
((mng_showp)pChunkto)->bEmpty = ((mng_showp)pChunkfrom)->bEmpty;
|
|
3671 |
((mng_showp)pChunkto)->iFirstid = ((mng_showp)pChunkfrom)->iFirstid;
|
|
3672 |
((mng_showp)pChunkto)->iLastid = ((mng_showp)pChunkfrom)->iLastid;
|
|
3673 |
((mng_showp)pChunkto)->iMode = ((mng_showp)pChunkfrom)->iMode;
|
|
3674 |
|
|
3675 |
#ifdef MNG_SUPPORT_TRACE
|
|
3676 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SHOW, MNG_LC_END);
|
|
3677 |
#endif
|
|
3678 |
|
|
3679 |
return MNG_NOERROR;
|
|
3680 |
}
|
|
3681 |
#endif
|
|
3682 |
#endif
|
|
3683 |
|
|
3684 |
/* ************************************************************************** */
|
|
3685 |
|
|
3686 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3687 |
#ifndef MNG_SKIPCHUNK_TERM
|
|
3688 |
ASSIGN_CHUNK_HDR (mng_assign_term)
|
|
3689 |
{
|
|
3690 |
#ifdef MNG_SUPPORT_TRACE
|
|
3691 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TERM, MNG_LC_START);
|
|
3692 |
#endif
|
|
3693 |
|
|
3694 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_TERM)
|
|
3695 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3696 |
|
|
3697 |
((mng_termp)pChunkto)->iTermaction = ((mng_termp)pChunkfrom)->iTermaction;
|
|
3698 |
((mng_termp)pChunkto)->iIteraction = ((mng_termp)pChunkfrom)->iIteraction;
|
|
3699 |
((mng_termp)pChunkto)->iDelay = ((mng_termp)pChunkfrom)->iDelay;
|
|
3700 |
((mng_termp)pChunkto)->iItermax = ((mng_termp)pChunkfrom)->iItermax;
|
|
3701 |
|
|
3702 |
#ifdef MNG_SUPPORT_TRACE
|
|
3703 |
MNG_TRACE (pData, MNG_FN_ASSIGN_TERM, MNG_LC_END);
|
|
3704 |
#endif
|
|
3705 |
|
|
3706 |
return MNG_NOERROR;
|
|
3707 |
}
|
|
3708 |
#endif
|
|
3709 |
#endif
|
|
3710 |
|
|
3711 |
/* ************************************************************************** */
|
|
3712 |
|
|
3713 |
#ifndef MNG_SKIPCHUNK_SAVE
|
|
3714 |
ASSIGN_CHUNK_HDR (mng_assign_save)
|
|
3715 |
{
|
|
3716 |
#ifdef MNG_SUPPORT_TRACE
|
|
3717 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SAVE, MNG_LC_START);
|
|
3718 |
#endif
|
|
3719 |
|
|
3720 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_SAVE)
|
|
3721 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3722 |
|
|
3723 |
((mng_savep)pChunkto)->bEmpty = ((mng_savep)pChunkfrom)->bEmpty;
|
|
3724 |
((mng_savep)pChunkto)->iOffsettype = ((mng_savep)pChunkfrom)->iOffsettype;
|
|
3725 |
((mng_savep)pChunkto)->iCount = ((mng_savep)pChunkfrom)->iCount;
|
|
3726 |
|
|
3727 |
if (((mng_savep)pChunkto)->iCount)
|
|
3728 |
{
|
|
3729 |
mng_uint32 iX;
|
|
3730 |
mng_save_entryp pEntry;
|
|
3731 |
mng_uint32 iLen = ((mng_savep)pChunkto)->iCount * sizeof (mng_save_entry);
|
|
3732 |
|
|
3733 |
MNG_ALLOC (pData, ((mng_savep)pChunkto)->pEntries, iLen);
|
|
3734 |
MNG_COPY (((mng_savep)pChunkto)->pEntries, ((mng_savep)pChunkfrom)->pEntries, iLen);
|
|
3735 |
|
|
3736 |
pEntry = ((mng_savep)pChunkto)->pEntries;
|
|
3737 |
|
|
3738 |
for (iX = 0; iX < ((mng_savep)pChunkto)->iCount; iX++)
|
|
3739 |
{
|
|
3740 |
if (pEntry->iNamesize)
|
|
3741 |
{
|
|
3742 |
mng_pchar pTemp = pEntry->zName;
|
|
3743 |
|
|
3744 |
MNG_ALLOC (pData, pEntry->zName, pEntry->iNamesize);
|
|
3745 |
MNG_COPY (pEntry->zName, pTemp, pEntry->iNamesize);
|
|
3746 |
}
|
|
3747 |
else
|
|
3748 |
{
|
|
3749 |
pEntry->zName = MNG_NULL;
|
|
3750 |
}
|
|
3751 |
|
|
3752 |
pEntry++;
|
|
3753 |
}
|
|
3754 |
}
|
|
3755 |
|
|
3756 |
#ifdef MNG_SUPPORT_TRACE
|
|
3757 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SAVE, MNG_LC_END);
|
|
3758 |
#endif
|
|
3759 |
|
|
3760 |
return MNG_NOERROR;
|
|
3761 |
}
|
|
3762 |
#endif
|
|
3763 |
|
|
3764 |
/* ************************************************************************** */
|
|
3765 |
|
|
3766 |
#ifndef MNG_SKIPCHUNK_SEEK
|
|
3767 |
ASSIGN_CHUNK_HDR (mng_assign_seek)
|
|
3768 |
{
|
|
3769 |
#ifdef MNG_SUPPORT_TRACE
|
|
3770 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SEEK, MNG_LC_START);
|
|
3771 |
#endif
|
|
3772 |
|
|
3773 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_SEEK)
|
|
3774 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3775 |
|
|
3776 |
((mng_seekp)pChunkto)->iNamesize = ((mng_seekp)pChunkfrom)->iNamesize;
|
|
3777 |
|
|
3778 |
if (((mng_seekp)pChunkto)->iNamesize)
|
|
3779 |
{
|
|
3780 |
MNG_ALLOC (pData, ((mng_seekp)pChunkto)->zName, ((mng_seekp)pChunkto)->iNamesize);
|
|
3781 |
MNG_COPY (((mng_seekp)pChunkto)->zName, ((mng_seekp)pChunkfrom)->zName,
|
|
3782 |
((mng_seekp)pChunkto)->iNamesize);
|
|
3783 |
}
|
|
3784 |
|
|
3785 |
#ifdef MNG_SUPPORT_TRACE
|
|
3786 |
MNG_TRACE (pData, MNG_FN_ASSIGN_SEEK, MNG_LC_END);
|
|
3787 |
#endif
|
|
3788 |
|
|
3789 |
return MNG_NOERROR;
|
|
3790 |
}
|
|
3791 |
#endif
|
|
3792 |
|
|
3793 |
/* ************************************************************************** */
|
|
3794 |
|
|
3795 |
#ifndef MNG_SKIPCHUNK_eXPI
|
|
3796 |
ASSIGN_CHUNK_HDR (mng_assign_expi)
|
|
3797 |
{
|
|
3798 |
#ifdef MNG_SUPPORT_TRACE
|
|
3799 |
MNG_TRACE (pData, MNG_FN_ASSIGN_EXPI, MNG_LC_START);
|
|
3800 |
#endif
|
|
3801 |
|
|
3802 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_eXPI)
|
|
3803 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3804 |
|
|
3805 |
((mng_expip)pChunkto)->iSnapshotid = ((mng_expip)pChunkfrom)->iSnapshotid;
|
|
3806 |
((mng_expip)pChunkto)->iNamesize = ((mng_expip)pChunkfrom)->iNamesize;
|
|
3807 |
|
|
3808 |
if (((mng_expip)pChunkto)->iNamesize)
|
|
3809 |
{
|
|
3810 |
MNG_ALLOC (pData, ((mng_expip)pChunkto)->zName, ((mng_expip)pChunkto)->iNamesize);
|
|
3811 |
MNG_COPY (((mng_expip)pChunkto)->zName, ((mng_expip)pChunkfrom)->zName,
|
|
3812 |
((mng_expip)pChunkto)->iNamesize);
|
|
3813 |
}
|
|
3814 |
|
|
3815 |
#ifdef MNG_SUPPORT_TRACE
|
|
3816 |
MNG_TRACE (pData, MNG_FN_ASSIGN_EXPI, MNG_LC_END);
|
|
3817 |
#endif
|
|
3818 |
|
|
3819 |
return MNG_NOERROR;
|
|
3820 |
}
|
|
3821 |
#endif
|
|
3822 |
|
|
3823 |
/* ************************************************************************** */
|
|
3824 |
|
|
3825 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3826 |
#ifndef MNG_SKIPCHUNK_fPRI
|
|
3827 |
ASSIGN_CHUNK_HDR (mng_assign_fpri)
|
|
3828 |
{
|
|
3829 |
#ifdef MNG_SUPPORT_TRACE
|
|
3830 |
MNG_TRACE (pData, MNG_FN_ASSIGN_FPRI, MNG_LC_START);
|
|
3831 |
#endif
|
|
3832 |
|
|
3833 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_fPRI)
|
|
3834 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3835 |
|
|
3836 |
((mng_fprip)pChunkto)->iDeltatype = ((mng_fprip)pChunkfrom)->iDeltatype;
|
|
3837 |
((mng_fprip)pChunkto)->iPriority = ((mng_fprip)pChunkfrom)->iPriority;
|
|
3838 |
|
|
3839 |
#ifdef MNG_SUPPORT_TRACE
|
|
3840 |
MNG_TRACE (pData, MNG_FN_ASSIGN_FPRI, MNG_LC_END);
|
|
3841 |
#endif
|
|
3842 |
|
|
3843 |
return MNG_NOERROR;
|
|
3844 |
}
|
|
3845 |
#endif
|
|
3846 |
#endif
|
|
3847 |
|
|
3848 |
/* ************************************************************************** */
|
|
3849 |
|
|
3850 |
#ifndef MNG_SKIPCHUNK_nEED
|
|
3851 |
ASSIGN_CHUNK_HDR (mng_assign_need)
|
|
3852 |
{
|
|
3853 |
#ifdef MNG_SUPPORT_TRACE
|
|
3854 |
MNG_TRACE (pData, MNG_FN_ASSIGN_NEED, MNG_LC_START);
|
|
3855 |
#endif
|
|
3856 |
|
|
3857 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_nEED)
|
|
3858 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3859 |
|
|
3860 |
((mng_needp)pChunkto)->iKeywordssize = ((mng_needp)pChunkfrom)->iKeywordssize;
|
|
3861 |
|
|
3862 |
if (((mng_needp)pChunkto)->iKeywordssize)
|
|
3863 |
{
|
|
3864 |
MNG_ALLOC (pData, ((mng_needp)pChunkto)->zKeywords, ((mng_needp)pChunkto)->iKeywordssize);
|
|
3865 |
MNG_COPY (((mng_needp)pChunkto)->zKeywords, ((mng_needp)pChunkfrom)->zKeywords,
|
|
3866 |
((mng_needp)pChunkto)->iKeywordssize);
|
|
3867 |
}
|
|
3868 |
|
|
3869 |
#ifdef MNG_SUPPORT_TRACE
|
|
3870 |
MNG_TRACE (pData, MNG_FN_ASSIGN_NEED, MNG_LC_END);
|
|
3871 |
#endif
|
|
3872 |
|
|
3873 |
return MNG_NOERROR;
|
|
3874 |
}
|
|
3875 |
#endif
|
|
3876 |
|
|
3877 |
/* ************************************************************************** */
|
|
3878 |
|
|
3879 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3880 |
#ifndef MNG_SKIPCHUNK_pHYg
|
|
3881 |
ASSIGN_CHUNK_HDR (mng_assign_phyg)
|
|
3882 |
{
|
|
3883 |
#ifdef MNG_SUPPORT_TRACE
|
|
3884 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PHYG, MNG_LC_START);
|
|
3885 |
#endif
|
|
3886 |
|
|
3887 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_pHYg)
|
|
3888 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3889 |
|
|
3890 |
((mng_phygp)pChunkto)->bEmpty = ((mng_phygp)pChunkfrom)->bEmpty;
|
|
3891 |
((mng_phygp)pChunkto)->iSizex = ((mng_phygp)pChunkfrom)->iSizex;
|
|
3892 |
((mng_phygp)pChunkto)->iSizey = ((mng_phygp)pChunkfrom)->iSizey;
|
|
3893 |
((mng_phygp)pChunkto)->iUnit = ((mng_phygp)pChunkfrom)->iUnit;
|
|
3894 |
|
|
3895 |
#ifdef MNG_SUPPORT_TRACE
|
|
3896 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PHYG, MNG_LC_END);
|
|
3897 |
#endif
|
|
3898 |
|
|
3899 |
return MNG_NOERROR;
|
|
3900 |
}
|
|
3901 |
#endif
|
|
3902 |
#endif
|
|
3903 |
|
|
3904 |
/* ************************************************************************** */
|
|
3905 |
|
|
3906 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
3907 |
#ifdef MNG_INCLUDE_JNG
|
|
3908 |
ASSIGN_CHUNK_HDR (mng_assign_jhdr)
|
|
3909 |
{
|
|
3910 |
#ifdef MNG_SUPPORT_TRACE
|
|
3911 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JHDR, MNG_LC_START);
|
|
3912 |
#endif
|
|
3913 |
|
|
3914 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_JHDR)
|
|
3915 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3916 |
|
|
3917 |
((mng_jhdrp)pChunkto)->iWidth = ((mng_jhdrp)pChunkfrom)->iWidth;
|
|
3918 |
((mng_jhdrp)pChunkto)->iHeight = ((mng_jhdrp)pChunkfrom)->iHeight;
|
|
3919 |
((mng_jhdrp)pChunkto)->iColortype = ((mng_jhdrp)pChunkfrom)->iColortype;
|
|
3920 |
((mng_jhdrp)pChunkto)->iImagesampledepth = ((mng_jhdrp)pChunkfrom)->iImagesampledepth;
|
|
3921 |
((mng_jhdrp)pChunkto)->iImagecompression = ((mng_jhdrp)pChunkfrom)->iImagecompression;
|
|
3922 |
((mng_jhdrp)pChunkto)->iImageinterlace = ((mng_jhdrp)pChunkfrom)->iImageinterlace;
|
|
3923 |
((mng_jhdrp)pChunkto)->iAlphasampledepth = ((mng_jhdrp)pChunkfrom)->iAlphasampledepth;
|
|
3924 |
((mng_jhdrp)pChunkto)->iAlphacompression = ((mng_jhdrp)pChunkfrom)->iAlphacompression;
|
|
3925 |
((mng_jhdrp)pChunkto)->iAlphafilter = ((mng_jhdrp)pChunkfrom)->iAlphafilter;
|
|
3926 |
((mng_jhdrp)pChunkto)->iAlphainterlace = ((mng_jhdrp)pChunkfrom)->iAlphainterlace;
|
|
3927 |
|
|
3928 |
#ifdef MNG_SUPPORT_TRACE
|
|
3929 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JHDR, MNG_LC_END);
|
|
3930 |
#endif
|
|
3931 |
|
|
3932 |
return MNG_NOERROR;
|
|
3933 |
}
|
|
3934 |
#endif /* MNG_INCLUDE_JNG */
|
|
3935 |
#endif
|
|
3936 |
|
|
3937 |
/* ************************************************************************** */
|
|
3938 |
|
|
3939 |
#ifdef MNG_INCLUDE_JNG
|
|
3940 |
ASSIGN_CHUNK_HDR (mng_assign_jdaa)
|
|
3941 |
{
|
|
3942 |
#ifdef MNG_SUPPORT_TRACE
|
|
3943 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JDAA, MNG_LC_START);
|
|
3944 |
#endif
|
|
3945 |
|
|
3946 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_JDAA)
|
|
3947 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3948 |
|
|
3949 |
((mng_jdaap)pChunkto)->bEmpty = ((mng_jdaap)pChunkfrom)->bEmpty;
|
|
3950 |
((mng_jdaap)pChunkto)->iDatasize = ((mng_jdaap)pChunkfrom)->iDatasize;
|
|
3951 |
|
|
3952 |
if (((mng_jdaap)pChunkto)->iDatasize)
|
|
3953 |
{
|
|
3954 |
MNG_ALLOC (pData, ((mng_jdaap)pChunkto)->pData, ((mng_jdaap)pChunkto)->iDatasize);
|
|
3955 |
MNG_COPY (((mng_jdaap)pChunkto)->pData, ((mng_jdaap)pChunkfrom)->pData,
|
|
3956 |
((mng_jdaap)pChunkto)->iDatasize);
|
|
3957 |
}
|
|
3958 |
|
|
3959 |
#ifdef MNG_SUPPORT_TRACE
|
|
3960 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JDAA, MNG_LC_END);
|
|
3961 |
#endif
|
|
3962 |
|
|
3963 |
return MNG_NOERROR;
|
|
3964 |
}
|
|
3965 |
#endif /* MNG_INCLUDE_JNG */
|
|
3966 |
|
|
3967 |
/* ************************************************************************** */
|
|
3968 |
|
|
3969 |
#ifdef MNG_INCLUDE_JNG
|
|
3970 |
ASSIGN_CHUNK_HDR (mng_assign_jdat)
|
|
3971 |
{
|
|
3972 |
#ifdef MNG_SUPPORT_TRACE
|
|
3973 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JDAT, MNG_LC_START);
|
|
3974 |
#endif
|
|
3975 |
|
|
3976 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_JDAT)
|
|
3977 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
3978 |
|
|
3979 |
((mng_jdatp)pChunkto)->bEmpty = ((mng_jdatp)pChunkfrom)->bEmpty;
|
|
3980 |
((mng_jdatp)pChunkto)->iDatasize = ((mng_jdatp)pChunkfrom)->iDatasize;
|
|
3981 |
|
|
3982 |
if (((mng_jdatp)pChunkto)->iDatasize)
|
|
3983 |
{
|
|
3984 |
MNG_ALLOC (pData, ((mng_jdatp)pChunkto)->pData, ((mng_jdatp)pChunkto)->iDatasize);
|
|
3985 |
MNG_COPY (((mng_jdatp)pChunkto)->pData, ((mng_jdatp)pChunkfrom)->pData,
|
|
3986 |
((mng_jdatp)pChunkto)->iDatasize);
|
|
3987 |
}
|
|
3988 |
|
|
3989 |
#ifdef MNG_SUPPORT_TRACE
|
|
3990 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JDAT, MNG_LC_END);
|
|
3991 |
#endif
|
|
3992 |
|
|
3993 |
return MNG_NOERROR;
|
|
3994 |
}
|
|
3995 |
#endif /* MNG_INCLUDE_JNG */
|
|
3996 |
|
|
3997 |
/* ************************************************************************** */
|
|
3998 |
|
|
3999 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4000 |
#ifdef MNG_INCLUDE_JNG
|
|
4001 |
ASSIGN_CHUNK_HDR (mng_assign_jsep)
|
|
4002 |
{
|
|
4003 |
#ifdef MNG_SUPPORT_TRACE
|
|
4004 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JSEP, MNG_LC_START);
|
|
4005 |
#endif
|
|
4006 |
|
|
4007 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_JSEP)
|
|
4008 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4009 |
|
|
4010 |
#ifdef MNG_SUPPORT_TRACE
|
|
4011 |
MNG_TRACE (pData, MNG_FN_ASSIGN_JSEP, MNG_LC_END);
|
|
4012 |
#endif
|
|
4013 |
|
|
4014 |
return MNG_NOERROR;
|
|
4015 |
}
|
|
4016 |
#endif /* MNG_INCLUDE_JNG */
|
|
4017 |
#endif
|
|
4018 |
|
|
4019 |
/* ************************************************************************** */
|
|
4020 |
|
|
4021 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4022 |
#ifndef MNG_NO_DELTA_PNG
|
|
4023 |
ASSIGN_CHUNK_HDR (mng_assign_dhdr)
|
|
4024 |
{
|
|
4025 |
#ifdef MNG_SUPPORT_TRACE
|
|
4026 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DHDR, MNG_LC_START);
|
|
4027 |
#endif
|
|
4028 |
|
|
4029 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_DHDR)
|
|
4030 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4031 |
|
|
4032 |
((mng_dhdrp)pChunkto)->iObjectid = ((mng_dhdrp)pChunkfrom)->iObjectid;
|
|
4033 |
((mng_dhdrp)pChunkto)->iImagetype = ((mng_dhdrp)pChunkfrom)->iImagetype;
|
|
4034 |
((mng_dhdrp)pChunkto)->iDeltatype = ((mng_dhdrp)pChunkfrom)->iDeltatype;
|
|
4035 |
((mng_dhdrp)pChunkto)->iBlockwidth = ((mng_dhdrp)pChunkfrom)->iBlockwidth;
|
|
4036 |
((mng_dhdrp)pChunkto)->iBlockheight = ((mng_dhdrp)pChunkfrom)->iBlockheight;
|
|
4037 |
((mng_dhdrp)pChunkto)->iBlockx = ((mng_dhdrp)pChunkfrom)->iBlockx;
|
|
4038 |
((mng_dhdrp)pChunkto)->iBlocky = ((mng_dhdrp)pChunkfrom)->iBlocky;
|
|
4039 |
|
|
4040 |
#ifdef MNG_SUPPORT_TRACE
|
|
4041 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DHDR, MNG_LC_END);
|
|
4042 |
#endif
|
|
4043 |
|
|
4044 |
return MNG_NOERROR;
|
|
4045 |
}
|
|
4046 |
#endif
|
|
4047 |
#endif
|
|
4048 |
|
|
4049 |
/* ************************************************************************** */
|
|
4050 |
|
|
4051 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4052 |
#ifndef MNG_NO_DELTA_PNG
|
|
4053 |
ASSIGN_CHUNK_HDR (mng_assign_prom)
|
|
4054 |
{
|
|
4055 |
#ifdef MNG_SUPPORT_TRACE
|
|
4056 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PROM, MNG_LC_START);
|
|
4057 |
#endif
|
|
4058 |
|
|
4059 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_PROM)
|
|
4060 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4061 |
|
|
4062 |
((mng_promp)pChunkto)->iColortype = ((mng_promp)pChunkfrom)->iColortype;
|
|
4063 |
((mng_promp)pChunkto)->iSampledepth = ((mng_promp)pChunkfrom)->iSampledepth;
|
|
4064 |
((mng_promp)pChunkto)->iFilltype = ((mng_promp)pChunkfrom)->iFilltype;
|
|
4065 |
|
|
4066 |
#ifdef MNG_SUPPORT_TRACE
|
|
4067 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PROM, MNG_LC_END);
|
|
4068 |
#endif
|
|
4069 |
|
|
4070 |
return MNG_NOERROR;
|
|
4071 |
}
|
|
4072 |
#endif
|
|
4073 |
#endif
|
|
4074 |
|
|
4075 |
/* ************************************************************************** */
|
|
4076 |
|
|
4077 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4078 |
#ifndef MNG_NO_DELTA_PNG
|
|
4079 |
ASSIGN_CHUNK_HDR (mng_assign_ipng)
|
|
4080 |
{
|
|
4081 |
#ifdef MNG_SUPPORT_TRACE
|
|
4082 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IPNG, MNG_LC_START);
|
|
4083 |
#endif
|
|
4084 |
|
|
4085 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_IPNG)
|
|
4086 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4087 |
|
|
4088 |
#ifdef MNG_SUPPORT_TRACE
|
|
4089 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IPNG, MNG_LC_END);
|
|
4090 |
#endif
|
|
4091 |
|
|
4092 |
return MNG_NOERROR;
|
|
4093 |
}
|
|
4094 |
#endif
|
|
4095 |
#endif
|
|
4096 |
|
|
4097 |
/* ************************************************************************** */
|
|
4098 |
|
|
4099 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4100 |
#ifndef MNG_NO_DELTA_PNG
|
|
4101 |
ASSIGN_CHUNK_HDR (mng_assign_pplt)
|
|
4102 |
{
|
|
4103 |
mng_uint32 iX;
|
|
4104 |
|
|
4105 |
#ifdef MNG_SUPPORT_TRACE
|
|
4106 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PPLT, MNG_LC_START);
|
|
4107 |
#endif
|
|
4108 |
|
|
4109 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_PPLT)
|
|
4110 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4111 |
|
|
4112 |
((mng_ppltp)pChunkto)->iDeltatype = ((mng_ppltp)pChunkfrom)->iDeltatype;
|
|
4113 |
((mng_ppltp)pChunkto)->iCount = ((mng_ppltp)pChunkfrom)->iCount;
|
|
4114 |
|
|
4115 |
for (iX = 0; iX < ((mng_ppltp)pChunkto)->iCount; iX++)
|
|
4116 |
((mng_ppltp)pChunkto)->aEntries [iX] = ((mng_ppltp)pChunkfrom)->aEntries [iX];
|
|
4117 |
|
|
4118 |
#ifdef MNG_SUPPORT_TRACE
|
|
4119 |
MNG_TRACE (pData, MNG_FN_ASSIGN_PPLT, MNG_LC_END);
|
|
4120 |
#endif
|
|
4121 |
|
|
4122 |
return MNG_NOERROR;
|
|
4123 |
}
|
|
4124 |
#endif
|
|
4125 |
#endif
|
|
4126 |
|
|
4127 |
/* ************************************************************************** */
|
|
4128 |
|
|
4129 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4130 |
#ifndef MNG_NO_DELTA_PNG
|
|
4131 |
#ifdef MNG_INCLUDE_JNG
|
|
4132 |
ASSIGN_CHUNK_HDR (mng_assign_ijng)
|
|
4133 |
{
|
|
4134 |
#ifdef MNG_SUPPORT_TRACE
|
|
4135 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IJNG, MNG_LC_START);
|
|
4136 |
#endif
|
|
4137 |
|
|
4138 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_IJNG)
|
|
4139 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4140 |
|
|
4141 |
#ifdef MNG_SUPPORT_TRACE
|
|
4142 |
MNG_TRACE (pData, MNG_FN_ASSIGN_IJNG, MNG_LC_END);
|
|
4143 |
#endif
|
|
4144 |
|
|
4145 |
return MNG_NOERROR;
|
|
4146 |
}
|
|
4147 |
#endif
|
|
4148 |
#endif
|
|
4149 |
#endif
|
|
4150 |
|
|
4151 |
/* ************************************************************************** */
|
|
4152 |
|
|
4153 |
#ifndef MNG_NO_DELTA_PNG
|
|
4154 |
ASSIGN_CHUNK_HDR (mng_assign_drop)
|
|
4155 |
{
|
|
4156 |
#ifdef MNG_SUPPORT_TRACE
|
|
4157 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DROP, MNG_LC_START);
|
|
4158 |
#endif
|
|
4159 |
|
|
4160 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_DROP)
|
|
4161 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4162 |
|
|
4163 |
((mng_dropp)pChunkto)->iCount = ((mng_dropp)pChunkfrom)->iCount;
|
|
4164 |
|
|
4165 |
if (((mng_dropp)pChunkto)->iCount)
|
|
4166 |
{
|
|
4167 |
mng_uint32 iLen = ((mng_dropp)pChunkto)->iCount * sizeof (mng_uint32);
|
|
4168 |
|
|
4169 |
MNG_ALLOC (pData, ((mng_dropp)pChunkto)->pChunknames, iLen);
|
|
4170 |
MNG_COPY (((mng_dropp)pChunkto)->pChunknames, ((mng_dropp)pChunkfrom)->pChunknames, iLen);
|
|
4171 |
}
|
|
4172 |
|
|
4173 |
#ifdef MNG_SUPPORT_TRACE
|
|
4174 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DROP, MNG_LC_END);
|
|
4175 |
#endif
|
|
4176 |
|
|
4177 |
return MNG_NOERROR;
|
|
4178 |
}
|
|
4179 |
#endif
|
|
4180 |
|
|
4181 |
/* ************************************************************************** */
|
|
4182 |
|
|
4183 |
#ifndef MNG_NO_DELTA_PNG
|
|
4184 |
#ifndef MNG_SKIPCHUNK_DBYK
|
|
4185 |
ASSIGN_CHUNK_HDR (mng_assign_dbyk)
|
|
4186 |
{
|
|
4187 |
#ifdef MNG_SUPPORT_TRACE
|
|
4188 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DBYK, MNG_LC_START);
|
|
4189 |
#endif
|
|
4190 |
|
|
4191 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_DBYK)
|
|
4192 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4193 |
|
|
4194 |
((mng_dbykp)pChunkto)->iChunkname = ((mng_dbykp)pChunkfrom)->iChunkname;
|
|
4195 |
((mng_dbykp)pChunkto)->iPolarity = ((mng_dbykp)pChunkfrom)->iPolarity;
|
|
4196 |
((mng_dbykp)pChunkto)->iKeywordssize = ((mng_dbykp)pChunkfrom)->iKeywordssize;
|
|
4197 |
|
|
4198 |
if (((mng_dbykp)pChunkto)->iKeywordssize)
|
|
4199 |
{
|
|
4200 |
MNG_ALLOC (pData, ((mng_dbykp)pChunkto)->zKeywords, ((mng_dbykp)pChunkto)->iKeywordssize);
|
|
4201 |
MNG_COPY (((mng_dbykp)pChunkto)->zKeywords, ((mng_dbykp)pChunkfrom)->zKeywords,
|
|
4202 |
((mng_dbykp)pChunkto)->iKeywordssize);
|
|
4203 |
}
|
|
4204 |
|
|
4205 |
#ifdef MNG_SUPPORT_TRACE
|
|
4206 |
MNG_TRACE (pData, MNG_FN_ASSIGN_DBYK, MNG_LC_END);
|
|
4207 |
#endif
|
|
4208 |
|
|
4209 |
return MNG_NOERROR;
|
|
4210 |
}
|
|
4211 |
#endif
|
|
4212 |
#endif
|
|
4213 |
|
|
4214 |
/* ************************************************************************** */
|
|
4215 |
|
|
4216 |
#ifndef MNG_NO_DELTA_PNG
|
|
4217 |
#ifndef MNG_SKIPCHUNK_ORDR
|
|
4218 |
ASSIGN_CHUNK_HDR (mng_assign_ordr)
|
|
4219 |
{
|
|
4220 |
#ifdef MNG_SUPPORT_TRACE
|
|
4221 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ORDR, MNG_LC_START);
|
|
4222 |
#endif
|
|
4223 |
|
|
4224 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_ORDR)
|
|
4225 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4226 |
|
|
4227 |
((mng_ordrp)pChunkto)->iCount = ((mng_ordrp)pChunkfrom)->iCount;
|
|
4228 |
|
|
4229 |
if (((mng_ordrp)pChunkto)->iCount)
|
|
4230 |
{
|
|
4231 |
mng_uint32 iLen = ((mng_ordrp)pChunkto)->iCount * sizeof (mng_ordr_entry);
|
|
4232 |
|
|
4233 |
MNG_ALLOC (pData, ((mng_ordrp)pChunkto)->pEntries, iLen);
|
|
4234 |
MNG_COPY (((mng_ordrp)pChunkto)->pEntries, ((mng_ordrp)pChunkfrom)->pEntries, iLen);
|
|
4235 |
}
|
|
4236 |
|
|
4237 |
#ifdef MNG_SUPPORT_TRACE
|
|
4238 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ORDR, MNG_LC_END);
|
|
4239 |
#endif
|
|
4240 |
|
|
4241 |
return MNG_NOERROR;
|
|
4242 |
}
|
|
4243 |
#endif
|
|
4244 |
#endif
|
|
4245 |
|
|
4246 |
/* ************************************************************************** */
|
|
4247 |
|
|
4248 |
#ifndef MNG_OPTIMIZE_CHUNKASSIGN
|
|
4249 |
#ifndef MNG_SKIPCHUNK_MAGN
|
|
4250 |
ASSIGN_CHUNK_HDR (mng_assign_magn)
|
|
4251 |
{
|
|
4252 |
#ifdef MNG_SUPPORT_TRACE
|
|
4253 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MAGN, MNG_LC_START);
|
|
4254 |
#endif
|
|
4255 |
|
|
4256 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_MAGN)
|
|
4257 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4258 |
|
|
4259 |
((mng_magnp)pChunkto)->iFirstid = ((mng_magnp)pChunkfrom)->iFirstid;
|
|
4260 |
((mng_magnp)pChunkto)->iLastid = ((mng_magnp)pChunkfrom)->iLastid;
|
|
4261 |
((mng_magnp)pChunkto)->iMethodX = ((mng_magnp)pChunkfrom)->iMethodX;
|
|
4262 |
((mng_magnp)pChunkto)->iMX = ((mng_magnp)pChunkfrom)->iMX;
|
|
4263 |
((mng_magnp)pChunkto)->iMY = ((mng_magnp)pChunkfrom)->iMY;
|
|
4264 |
((mng_magnp)pChunkto)->iML = ((mng_magnp)pChunkfrom)->iML;
|
|
4265 |
((mng_magnp)pChunkto)->iMR = ((mng_magnp)pChunkfrom)->iMR;
|
|
4266 |
((mng_magnp)pChunkto)->iMT = ((mng_magnp)pChunkfrom)->iMT;
|
|
4267 |
((mng_magnp)pChunkto)->iMB = ((mng_magnp)pChunkfrom)->iMB;
|
|
4268 |
((mng_magnp)pChunkto)->iMethodY = ((mng_magnp)pChunkfrom)->iMethodY;
|
|
4269 |
|
|
4270 |
#ifdef MNG_SUPPORT_TRACE
|
|
4271 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MAGN, MNG_LC_END);
|
|
4272 |
#endif
|
|
4273 |
|
|
4274 |
return MNG_NOERROR;
|
|
4275 |
}
|
|
4276 |
#endif
|
|
4277 |
#endif
|
|
4278 |
|
|
4279 |
/* ************************************************************************** */
|
|
4280 |
|
|
4281 |
#ifdef MNG_INCLUDE_MPNG_PROPOSAL
|
|
4282 |
ASSIGN_CHUNK_HDR (mng_assign_mpng)
|
|
4283 |
{
|
|
4284 |
#ifdef MNG_SUPPORT_TRACE
|
|
4285 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MPNG, MNG_LC_START);
|
|
4286 |
#endif
|
|
4287 |
|
|
4288 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_mpNG)
|
|
4289 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4290 |
|
|
4291 |
((mng_mpngp)pChunkto)->iFramewidth = ((mng_mpngp)pChunkfrom)->iFramewidth;
|
|
4292 |
((mng_mpngp)pChunkto)->iFrameheight = ((mng_mpngp)pChunkfrom)->iFrameheight;
|
|
4293 |
((mng_mpngp)pChunkto)->iNumplays = ((mng_mpngp)pChunkfrom)->iNumplays;
|
|
4294 |
((mng_mpngp)pChunkto)->iTickspersec = ((mng_mpngp)pChunkfrom)->iTickspersec;
|
|
4295 |
((mng_mpngp)pChunkto)->iCompressionmethod = ((mng_mpngp)pChunkfrom)->iCompressionmethod;
|
|
4296 |
((mng_mpngp)pChunkto)->iFramessize = ((mng_mpngp)pChunkfrom)->iFramessize;
|
|
4297 |
|
|
4298 |
if (((mng_mpngp)pChunkto)->iFramessize)
|
|
4299 |
{
|
|
4300 |
MNG_ALLOC (pData, ((mng_mpngp)pChunkto)->pFrames, ((mng_mpngp)pChunkto)->iFramessize);
|
|
4301 |
MNG_COPY (((mng_mpngp)pChunkto)->pFrames, ((mng_mpngp)pChunkfrom)->pFrames,
|
|
4302 |
((mng_mpngp)pChunkto)->iFramessize);
|
|
4303 |
}
|
|
4304 |
|
|
4305 |
#ifdef MNG_SUPPORT_TRACE
|
|
4306 |
MNG_TRACE (pData, MNG_FN_ASSIGN_MPNG, MNG_LC_END);
|
|
4307 |
#endif
|
|
4308 |
|
|
4309 |
return MNG_NOERROR;
|
|
4310 |
}
|
|
4311 |
#endif
|
|
4312 |
|
|
4313 |
/* ************************************************************************** */
|
|
4314 |
|
|
4315 |
#ifdef MNG_INCLUDE_ANG_PROPOSAL
|
|
4316 |
ASSIGN_CHUNK_HDR (mng_assign_ahdr)
|
|
4317 |
{
|
|
4318 |
#ifdef MNG_SUPPORT_TRACE
|
|
4319 |
MNG_TRACE (pData, MNG_FN_ASSIGN_AHDR, MNG_LC_START);
|
|
4320 |
#endif
|
|
4321 |
|
|
4322 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_ahDR)
|
|
4323 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4324 |
|
|
4325 |
((mng_ahdrp)pChunkto)->iNumframes = ((mng_ahdrp)pChunkfrom)->iNumframes;
|
|
4326 |
((mng_ahdrp)pChunkto)->iTickspersec = ((mng_ahdrp)pChunkfrom)->iTickspersec;
|
|
4327 |
((mng_ahdrp)pChunkto)->iNumplays = ((mng_ahdrp)pChunkfrom)->iNumplays;
|
|
4328 |
((mng_ahdrp)pChunkto)->iTilewidth = ((mng_ahdrp)pChunkfrom)->iTilewidth;
|
|
4329 |
((mng_ahdrp)pChunkto)->iTileheight = ((mng_ahdrp)pChunkfrom)->iTileheight;
|
|
4330 |
((mng_ahdrp)pChunkto)->iInterlace = ((mng_ahdrp)pChunkfrom)->iInterlace;
|
|
4331 |
((mng_ahdrp)pChunkto)->iStillused = ((mng_ahdrp)pChunkfrom)->iStillused;
|
|
4332 |
|
|
4333 |
#ifdef MNG_SUPPORT_TRACE
|
|
4334 |
MNG_TRACE (pData, MNG_FN_ASSIGN_AHDR, MNG_LC_END);
|
|
4335 |
#endif
|
|
4336 |
|
|
4337 |
return MNG_NOERROR;
|
|
4338 |
}
|
|
4339 |
#endif
|
|
4340 |
|
|
4341 |
/* ************************************************************************** */
|
|
4342 |
|
|
4343 |
#ifdef MNG_INCLUDE_ANG_PROPOSAL
|
|
4344 |
ASSIGN_CHUNK_HDR (mng_assign_adat)
|
|
4345 |
{
|
|
4346 |
#ifdef MNG_SUPPORT_TRACE
|
|
4347 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ADAT, MNG_LC_START);
|
|
4348 |
#endif
|
|
4349 |
|
|
4350 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_adAT)
|
|
4351 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4352 |
|
|
4353 |
((mng_adatp)pChunkto)->iTilessize = ((mng_adatp)pChunkfrom)->iTilessize;
|
|
4354 |
|
|
4355 |
if (((mng_adatp)pChunkto)->iTilessize)
|
|
4356 |
{
|
|
4357 |
MNG_ALLOC (pData, ((mng_adatp)pChunkto)->pTiles, ((mng_adatp)pChunkto)->iTilessize);
|
|
4358 |
MNG_COPY (((mng_adatp)pChunkto)->pTiles, ((mng_adatp)pChunkfrom)->pTiles,
|
|
4359 |
((mng_adatp)pChunkto)->iTilessize);
|
|
4360 |
}
|
|
4361 |
|
|
4362 |
#ifdef MNG_SUPPORT_TRACE
|
|
4363 |
MNG_TRACE (pData, MNG_FN_ASSIGN_ADAT, MNG_LC_END);
|
|
4364 |
#endif
|
|
4365 |
|
|
4366 |
return MNG_NOERROR;
|
|
4367 |
}
|
|
4368 |
#endif
|
|
4369 |
|
|
4370 |
/* ************************************************************************** */
|
|
4371 |
|
|
4372 |
#ifndef MNG_SKIPCHUNK_evNT
|
|
4373 |
ASSIGN_CHUNK_HDR (mng_assign_evnt)
|
|
4374 |
{
|
|
4375 |
#ifdef MNG_SUPPORT_TRACE
|
|
4376 |
MNG_TRACE (pData, MNG_FN_ASSIGN_EVNT, MNG_LC_START);
|
|
4377 |
#endif
|
|
4378 |
|
|
4379 |
if (((mng_chunk_headerp)pChunkfrom)->iChunkname != MNG_UINT_evNT)
|
|
4380 |
MNG_ERROR (pData, MNG_WRONGCHUNK); /* ouch */
|
|
4381 |
|
|
4382 |
((mng_evntp)pChunkto)->iCount = ((mng_evntp)pChunkfrom)->iCount;
|
|
4383 |
|
|
4384 |
if (((mng_evntp)pChunkto)->iCount)
|
|
4385 |
{
|
|
4386 |
mng_uint32 iX;
|
|
4387 |
mng_evnt_entryp pEntry;
|
|
4388 |
mng_uint32 iLen = ((mng_evntp)pChunkto)->iCount * sizeof (mng_evnt_entry);
|
|
4389 |
|
|
4390 |
MNG_ALLOC (pData, ((mng_evntp)pChunkto)->pEntries, iLen);
|
|
4391 |
MNG_COPY (((mng_evntp)pChunkto)->pEntries, ((mng_evntp)pChunkfrom)->pEntries, iLen);
|
|
4392 |
|
|
4393 |
pEntry = ((mng_evntp)pChunkto)->pEntries;
|
|
4394 |
|
|
4395 |
for (iX = 0; iX < ((mng_evntp)pChunkto)->iCount; iX++)
|
|
4396 |
{
|
|
4397 |
if (pEntry->iSegmentnamesize)
|
|
4398 |
{
|
|
4399 |
mng_pchar pTemp = pEntry->zSegmentname;
|
|
4400 |
|
|
4401 |
MNG_ALLOC (pData, pEntry->zSegmentname, pEntry->iSegmentnamesize+1);
|
|
4402 |
MNG_COPY (pEntry->zSegmentname, pTemp, pEntry->iSegmentnamesize);
|
|
4403 |
}
|
|
4404 |
else
|
|
4405 |
{
|
|
4406 |
pEntry->zSegmentname = MNG_NULL;
|
|
4407 |
}
|
|
4408 |
|
|
4409 |
pEntry++;
|
|
4410 |
}
|
|
4411 |
}
|
|
4412 |
|
|
4413 |
#ifdef MNG_SUPPORT_TRACE
|
|
4414 |
MNG_TRACE (pData, MNG_FN_ASSIGN_EVNT, MNG_LC_END);
|
|
4415 |
#endif
|
|
4416 |
|
|
4417 |
return MNG_NOERROR;
|
|
4418 |
}
|
|
4419 |
#endif
|
|
4420 |
|
|
4421 |
/* ************************************************************************** */
|
|
4422 |
|
|
4423 |
ASSIGN_CHUNK_HDR (mng_assign_unknown)
|
|
4424 |
{
|
|
4425 |
#ifdef MNG_SUPPORT_TRACE
|
|
4426 |
MNG_TRACE (pData, MNG_FN_ASSIGN_UNKNOWN, MNG_LC_START);
|
|
4427 |
#endif
|
|
4428 |
|
|
4429 |
((mng_unknown_chunkp)pChunkto)->iDatasize = ((mng_unknown_chunkp)pChunkfrom)->iDatasize;
|
|
4430 |
|
|
4431 |
if (((mng_unknown_chunkp)pChunkto)->iDatasize)
|
|
4432 |
{
|
|
4433 |
MNG_ALLOC (pData, ((mng_unknown_chunkp)pChunkto)->pData, ((mng_unknown_chunkp)pChunkto)->iDatasize);
|
|
4434 |
MNG_COPY (((mng_unknown_chunkp)pChunkto)->pData, ((mng_unknown_chunkp)pChunkfrom)->pData,
|
|
4435 |
((mng_unknown_chunkp)pChunkto)->iDatasize);
|
|
4436 |
}
|
|
4437 |
|
|
4438 |
#ifdef MNG_SUPPORT_TRACE
|
|
4439 |
MNG_TRACE (pData, MNG_FN_ASSIGN_UNKNOWN, MNG_LC_END);
|
|
4440 |
#endif
|
|
4441 |
|
|
4442 |
return MNG_NOERROR;
|
|
4443 |
}
|
|
4444 |
|
|
4445 |
/* ************************************************************************** */
|
|
4446 |
|
|
4447 |
#endif /* MNG_INCLUDE_WRITE_PROCS */
|
|
4448 |
|
|
4449 |
/* ************************************************************************** */
|
|
4450 |
/* * end of file * */
|
|
4451 |
/* ************************************************************************** */
|
|
4452 |
|