21 #define MTYPE_DISKFILE (0x01)
22 #define MTYPE_STDIOFH (0x02)
23 #define MTYPE_FILEDESC (0x03)
24 #define MTYPE_MEMORY (0x04)
67 fprintf(stderr,
"%s: ",
file->file->filename);
70 vfprintf(stderr, format, ap);
72 fputc((
int)
'\n', stderr);
83 if (!
fn->x.memory.data)
return NULL;
84 if (!
fn->x.memory.length)
return NULL;
88 fn->x.memory.length : 0;
106 default:
return NULL;
122 fh->x.fh = fopen(
fn->x.diskfile, fmode);
126 fd = fileno(
fn->x.stdiofh);
127 fh->x.fh = (
fd >= 0) ? fdopen(
fd, fmode) :
NULL;
131 fh->x.fh = fdopen(
fn->x.filedesc, fmode);
150 if (!
self || !
fn)
return NULL;
165 if (!
fh || !
fh->file)
return;
175 int count =
fh->file->x.memory.length -
fh->x.position;
185 if (!ferror(
fh->x.fh))
return (
int)
count;
195 int count =
fh->file->x.memory.length -
fh->x.position;
205 if (!ferror(
fh->x.fh))
return (
int)
count;
212 if (!
fh || !
fh->file)
return 1;
250 if (!
fh || !
fh->file)
return -1;
257 return (
off_t) ftell(
fh->x.fh);
289 return (
const char *)
fn;
302 return (
const char *)
fn;
315 return (
const char *)
fn;
327 fn->x.memory.data = (
unsigned char *)
data;
330 return (
const char *)
fn;
350 0x4D,0x53,0x43,0x46,0x00,0x00,0x00,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x00,
351 0x00,0x2C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x01,0x00,0x02,0x00,
352 0x00,0x00,0x22,0x06,0x00,0x00,0x5E,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x4D,
353 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6C,0x22,0xBA,0x59,0x20,0x00,
354 0x68,0x65,0x6C,0x6C,0x6F,0x2E,0x63,0x00,0x4A,0x00,0x00,0x00,0x4D,0x00,0x00,
355 0x00,0x00,0x00,0x6C,0x22,0xE7,0x59,0x20,0x00,0x77,0x65,0x6C,0x63,0x6F,0x6D,
356 0x65,0x2E,0x63,0x00,0xBD,0x5A,0xA6,0x30,0x97,0x00,0x97,0x00,0x23,0x69,0x6E,
357 0x63,0x6C,0x75,0x64,0x65,0x20,0x3C,0x73,0x74,0x64,0x69,0x6F,0x2E,0x68,0x3E,
358 0x0D,0x0A,0x0D,0x0A,0x76,0x6F,0x69,0x64,0x20,0x6D,0x61,0x69,0x6E,0x28,0x76,
359 0x6F,0x69,0x64,0x29,0x0D,0x0A,0x7B,0x0D,0x0A,0x20,0x20,0x20,0x20,0x70,0x72,
360 0x69,0x6E,0x74,0x66,0x28,0x22,0x48,0x65,0x6C,0x6C,0x6F,0x2C,0x20,0x77,0x6F,
361 0x72,0x6C,0x64,0x21,0x5C,0x6E,0x22,0x29,0x3B,0x0D,0x0A,0x7D,0x0D,0x0A,0x23,
362 0x69,0x6E,0x63,0x6C,0x75,0x64,0x65,0x20,0x3C,0x73,0x74,0x64,0x69,0x6F,0x2E,
363 0x68,0x3E,0x0D,0x0A,0x0D,0x0A,0x76,0x6F,0x69,0x64,0x20,0x6D,0x61,0x69,0x6E,
364 0x28,0x76,0x6F,0x69,0x64,0x29,0x0D,0x0A,0x7B,0x0D,0x0A,0x20,0x20,0x20,0x20,
365 0x70,0x72,0x69,0x6E,0x74,0x66,0x28,0x22,0x57,0x65,0x6C,0x63,0x6F,0x6D,0x65,
366 0x21,0x5C,0x6E,0x22,0x29,0x3B,0x0D,0x0A,0x7D,0x0D,0x0A,0x0D,0x0A
370 const char *mem_cab, *std_out, *std_err, *example;
377 if (!mem_cab)
exit(1);
380 if (!std_out)
exit(1);
383 if (!std_err)
exit(1);
386 if (!example)
exit(1);
425 fprintf(stderr,
"can't make decompressor\n");
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
RZ_API void Ht_() free(HtName_(Ht) *ht)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * malloc(size_t size)
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
static struct m_file * m_open(struct mspack_system *self, struct m_filename *fn, int mode)
static void m_free(void *buffer)
static void m_msg(struct m_file *file, const char *format,...)
static void * m_alloc(struct mspack_system *self, size_t bytes)
const char * create_filename_from_memory(void *data, size_t length)
static struct m_file * m_open_mem(struct mspack_system *self, struct m_filename *fn, int mode)
static struct m_file * m_open_file(struct mspack_system *self, struct m_filename *fn, int mode)
static int m_read(struct m_file *fh, void *buffer, int bytes)
static struct mspack_system multi_system
const char * create_filename(const char *filename)
static void m_copy(void *src, void *dest, size_t bytes)
static int m_write(struct m_file *fh, void *buffer, int bytes)
const char * create_filename_from_handle(FILE *fh)
void set_filename_printable_name(const char *filename, const char *name)
const char * create_filename_from_descriptor(int fd)
void free_filename(const char *filename)
static unsigned char memory_cab[]
static void m_close(struct m_file *fh)
static int m_seek(struct m_file *fh, off_t offset, int mode)
static off_t m_tell(struct m_file *fh)
z_const unsigned char * next
struct m_filename::@390::@391 memory
int(* last_error)(struct mscab_decompressor *self)
struct mscabd_cabinet *(* open)(struct mscab_decompressor *self, const char *filename)
int(* extract)(struct mscab_decompressor *self, struct mscabd_file *file, const char *filename)
void(* close)(struct mscab_decompressor *self, struct mscabd_cabinet *cab)
struct mscabd_file * files
static const z80_opcode fd[]