| 1 |
typedef __SIZE_TYPE__ size_t; |
| 2 |
typedef struct _IO_FILE FILE; |
| 3 |
extern size_t fread(void *__restrict __ptr, size_t __size, size_t __n, |
| 4 |
FILE *__restrict __stream); |
| 5 |
typedef unsigned char Byte; |
| 6 |
typedef unsigned int uInt; |
| 7 |
typedef unsigned long uLong; |
| 8 |
|
| 9 |
typedef struct z_stream_s { |
| 10 |
uInt avail_in; |
| 11 |
uInt avail_out; |
| 12 |
} z_stream; |
| 13 |
|
| 14 |
typedef struct gz_stream { |
| 15 |
z_stream stream; |
| 16 |
FILE *file; |
| 17 |
} gz_stream; |
| 18 |
|
| 19 |
void test_1_callee(gz_stream *s, Byte *buf) { |
| 20 |
Byte *next_out = buf; |
| 21 |
uInt n = s->stream.avail_in; |
| 22 |
if (n > 0) { |
| 23 |
next_out += n; |
| 24 |
} |
| 25 |
s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out, s->file); |
| 26 |
} |
| 27 |
|
| 28 |
void test_1_caller(gz_stream *s) { |
| 29 |
unsigned char c; |
| 30 |
test_1_callee(s, &c); |
| 31 |
} |