6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#include "zutil.h"
#ifndef NO_DUMMY_DECL
struct internal_state {int dummy;};
#endif
const char * const z_errmsg[10] = {
"need dictionary",
"stream end",
"",
"file error",
"stream error",
"data error",
"insufficient memory",
"buffer error",
"incompatible version",
""};
#ifdef DEBUG
#ifndef verbose
#define verbose 0
#endif
int z_verbose = verbose;
void z_error (m)
char *m;
{
fprintf(stderr, "%s
", m);
hang ();
}
#endif
#ifndef MY_ZCALLOC /* Any system without a special alloc function */
#ifndef STDC
extern voidp malloc OF((uInt size));
extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr));
#endif
voidpf zcalloc(voidpf opaque, unsigned items, unsigned size)
{
if (opaque)
items += size - size;
return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
(voidpf)calloc(items, size);
}
void zcfree(voidpf opaque, voidpf ptr, unsigned nb)
{
free(ptr);
if (opaque)
return;
}
#endif /* MY_ZCALLOC */
|