23 #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
26 # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
28 # define SET_BINARY_MODE(file)
90 int ret, put = 0,
fail = 0;
95 unsigned long sourcelen, destlen;
100 if (
arg[1] ==
'w' &&
arg[2] == 0)
102 else if (
arg[1] ==
'f' &&
arg[2] == 0)
104 else if (
arg[1] >=
'0' &&
arg[1] <=
'9')
107 fprintf(stderr,
"invalid option %s\n",
arg);
112 fprintf(stderr,
"only one file name allowed\n");
119 fprintf(stderr,
"memory allocation failure\n");
123 fprintf(stderr,
"could not read %s, or it was empty\n",
129 fprintf(stderr,
"skip request of %d leaves no input\n",
skip);
136 sourcelen = (
unsigned long)
len;
139 fprintf(stderr,
"puff() failed with return code %d\n", ret);
141 fprintf(stderr,
"puff() succeeded uncompressing %lu bytes\n", destlen);
142 if (sourcelen <
len) fprintf(stderr,
"%lu compressed bytes unused\n",
147 if (put && ret == 0) {
152 fprintf(stderr,
"memory allocation failure\n");
158 fwrite(
dest, 1, destlen, stdout);
static const char * arg(RzAnalysis *a, csh *handle, cs_insn *insn, char *buf, int n)
const lzma_allocator const uint8_t * in
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 long
void skip(file *in, unsigned n)
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * realloc(void *ptr, size_t size)
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char argv
static void struct sockaddr socklen_t static fromlen static backlog static fork char char char static envp int struct rusage static rusage struct utsname static buf struct sembuf unsigned
int puff(unsigned char *dest, unsigned long *destlen, const unsigned char *source, unsigned long *sourcelen)
int main(int argc, char **argv)
#define SET_BINARY_MODE(file)
void * load(const char *name, size_t *len)
size_t bythirds(size_t size)