40 |
return (int)hread (mem, size, (happy_file *)fh); |
return (int)hread (mem, size, (happy_file *)fh); |
41 |
} |
} |
42 |
|
|
43 |
|
static int fwrite_wrapper (void * mem, int size, void * fh) |
44 |
|
{ |
45 |
|
return (int)fwrite (mem, 1, size, (FILE *)fh); |
46 |
|
} |
47 |
|
|
48 |
static struct option long_options[] = { |
static struct option long_options[] = { |
49 |
{"mak", 1, 0, 'm'}, |
{"mak", 1, 0, 'm'}, |
50 |
{"out", 1, 0, 'o'}, |
{"out", 1, 0, 'o'}, |
248 |
{ |
{ |
249 |
if ((marker & 0xFFFFFF00) == 0x100) |
if ((marker & 0xFFFFFF00) == 0x100) |
250 |
{ |
{ |
251 |
int ret = process_frame(byte, &turing, htell(hfh), hfh, &hread_wrapper, ofh); |
int ret = process_frame(byte, &turing, htell(hfh), hfh, &hread_wrapper, ofh, &fwrite_wrapper); |
252 |
if (ret == 1) |
if (ret == 1) |
253 |
{ |
{ |
254 |
marker = 0xFFFFFFFF; |
marker = 0xFFFFFFFF; |