parent
0c6074b692
commit
8425b514aa
6 changed files with 31 additions and 31 deletions
|
|
@ -8,13 +8,13 @@ typedef struct GZHead GZHead;
|
||||||
|
|
||||||
struct GZHead
|
struct GZHead
|
||||||
{
|
{
|
||||||
ulong mtime;
|
u32int mtime;
|
||||||
char *file;
|
char *file;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int crcwrite(void *bout, void *buf, int n);
|
static int crcwrite(void *bout, void *buf, int n);
|
||||||
static int get1(Biobuf *b);
|
static int get1(Biobuf *b);
|
||||||
static ulong get4(Biobuf *b);
|
static u32int get4(Biobuf *b);
|
||||||
static int gunzipf(char *file, int stdout);
|
static int gunzipf(char *file, int stdout);
|
||||||
static int gunzip(int ofd, char *ofile, Biobuf *bin);
|
static int gunzip(int ofd, char *ofile, Biobuf *bin);
|
||||||
static void header(Biobuf *bin, GZHead *h);
|
static void header(Biobuf *bin, GZHead *h);
|
||||||
|
|
@ -23,8 +23,8 @@ static void error(char*, ...);
|
||||||
/* #pragma varargck argpos error 1 */
|
/* #pragma varargck argpos error 1 */
|
||||||
|
|
||||||
static Biobuf bin;
|
static Biobuf bin;
|
||||||
static ulong crc;
|
static u32int crc;
|
||||||
static ulong *crctab;
|
static u32int *crctab;
|
||||||
static int debug;
|
static int debug;
|
||||||
static char *delfile;
|
static char *delfile;
|
||||||
static vlong gzok;
|
static vlong gzok;
|
||||||
|
|
@ -33,7 +33,7 @@ static int settimes;
|
||||||
static int table;
|
static int table;
|
||||||
static int verbose;
|
static int verbose;
|
||||||
static int wbad;
|
static int wbad;
|
||||||
static ulong wlen;
|
static u32int wlen;
|
||||||
static jmp_buf zjmp;
|
static jmp_buf zjmp;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -277,7 +277,7 @@ header(Biobuf *bin, GZHead *h)
|
||||||
static void
|
static void
|
||||||
trailer(Biobuf *bin, long wlen)
|
trailer(Biobuf *bin, long wlen)
|
||||||
{
|
{
|
||||||
ulong tcrc;
|
u32int tcrc;
|
||||||
long len;
|
long len;
|
||||||
|
|
||||||
tcrc = get4(bin);
|
tcrc = get4(bin);
|
||||||
|
|
@ -290,10 +290,10 @@ trailer(Biobuf *bin, long wlen)
|
||||||
error("bad output length: expected %lud got %lud", wlen, len);
|
error("bad output length: expected %lud got %lud", wlen, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ulong
|
static u32int
|
||||||
get4(Biobuf *b)
|
get4(Biobuf *b)
|
||||||
{
|
{
|
||||||
ulong v;
|
u32int v;
|
||||||
int i, c;
|
int i, c;
|
||||||
|
|
||||||
v = 0;
|
v = 0;
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@ static int crcread(void *fd, void *buf, int n);
|
||||||
static int gzwrite(void *bout, void *buf, int n);
|
static int gzwrite(void *bout, void *buf, int n);
|
||||||
|
|
||||||
static Biobuf bout;
|
static Biobuf bout;
|
||||||
static ulong crc;
|
static u32int crc;
|
||||||
static ulong *crctab;
|
static u32int *crctab;
|
||||||
static int debug;
|
static int debug;
|
||||||
static int eof;
|
static int eof;
|
||||||
static int level;
|
static int level;
|
||||||
static ulong totr;
|
static u32int totr;
|
||||||
static int verbose;
|
static int verbose;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ static int crcwrite(void *ofd, void *buf, int n);
|
||||||
static int findCDir(Biobuf *bin, char *file);
|
static int findCDir(Biobuf *bin, char *file);
|
||||||
static int get1(Biobuf *b);
|
static int get1(Biobuf *b);
|
||||||
static int get2(Biobuf *b);
|
static int get2(Biobuf *b);
|
||||||
static ulong get4(Biobuf *b);
|
static u32int get4(Biobuf *b);
|
||||||
static char *getname(Biobuf *b, int len);
|
static char *getname(Biobuf *b, int len);
|
||||||
static int header(Biobuf *bin, ZipHead *zh);
|
static int header(Biobuf *bin, ZipHead *zh);
|
||||||
static long msdos2time(int time, int date);
|
static long msdos2time(int time, int date);
|
||||||
|
|
@ -27,24 +27,24 @@ static int unzipEntry(Biobuf *bin, ZipHead *czh);
|
||||||
static int unztable(Biobuf *bin, char *file);
|
static int unztable(Biobuf *bin, char *file);
|
||||||
static int wantFile(char *file);
|
static int wantFile(char *file);
|
||||||
|
|
||||||
static void *emalloc(ulong);
|
static void *emalloc(u32int);
|
||||||
static void error(char*, ...);
|
static void error(char*, ...);
|
||||||
/* #pragma varargck argpos error 1 */
|
/* #pragma varargck argpos error 1 */
|
||||||
|
|
||||||
static Biobuf bin;
|
static Biobuf bin;
|
||||||
static ulong crc;
|
static u32int crc;
|
||||||
static ulong *crctab;
|
static u32int *crctab;
|
||||||
static int debug;
|
static int debug;
|
||||||
static char *delfile;
|
static char *delfile;
|
||||||
static int lower;
|
static int lower;
|
||||||
static int nwant;
|
static int nwant;
|
||||||
static ulong rlen;
|
static u32int rlen;
|
||||||
static int settimes;
|
static int settimes;
|
||||||
static int stdout;
|
static int stdout;
|
||||||
static int verbose;
|
static int verbose;
|
||||||
static char **want;
|
static char **want;
|
||||||
static int wbad;
|
static int wbad;
|
||||||
static ulong wlen;
|
static u32int wlen;
|
||||||
static jmp_buf zjmp;
|
static jmp_buf zjmp;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -190,7 +190,7 @@ sunztable(Biobuf *bin)
|
||||||
{
|
{
|
||||||
ZipHead zh;
|
ZipHead zh;
|
||||||
vlong off;
|
vlong off;
|
||||||
ulong hcrc, hcsize, huncsize;
|
u32int hcrc, hcsize, huncsize;
|
||||||
int ok, err;
|
int ok, err;
|
||||||
|
|
||||||
ok = 1;
|
ok = 1;
|
||||||
|
|
@ -545,7 +545,7 @@ findCDir(Biobuf *bin, char *file)
|
||||||
static int
|
static int
|
||||||
cheader(Biobuf *bin, ZipHead *zh)
|
cheader(Biobuf *bin, ZipHead *zh)
|
||||||
{
|
{
|
||||||
ulong v;
|
u32int v;
|
||||||
int flen, xlen, fclen;
|
int flen, xlen, fclen;
|
||||||
|
|
||||||
v = get4(bin);
|
v = get4(bin);
|
||||||
|
|
@ -587,7 +587,7 @@ cheader(Biobuf *bin, ZipHead *zh)
|
||||||
static int
|
static int
|
||||||
header(Biobuf *bin, ZipHead *zh)
|
header(Biobuf *bin, ZipHead *zh)
|
||||||
{
|
{
|
||||||
ulong v;
|
u32int v;
|
||||||
int flen, xlen;
|
int flen, xlen;
|
||||||
|
|
||||||
v = get4(bin);
|
v = get4(bin);
|
||||||
|
|
@ -679,10 +679,10 @@ copyout(int ofd, Biobuf *bin, long len)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ulong
|
static u32int
|
||||||
get4(Biobuf *b)
|
get4(Biobuf *b)
|
||||||
{
|
{
|
||||||
ulong v;
|
u32int v;
|
||||||
int i, c;
|
int i, c;
|
||||||
|
|
||||||
v = 0;
|
v = 0;
|
||||||
|
|
@ -739,7 +739,7 @@ msdos2time(int time, int date)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void*
|
static void*
|
||||||
emalloc(ulong n)
|
emalloc(u32int n)
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ static void zip(Biobuf *bout, char *file, int stdout);
|
||||||
static void zipDir(Biobuf *bout, int fd, ZipHead *zh, int stdout);
|
static void zipDir(Biobuf *bout, int fd, ZipHead *zh, int stdout);
|
||||||
static int crcread(void *fd, void *buf, int n);
|
static int crcread(void *fd, void *buf, int n);
|
||||||
static int zwrite(void *bout, void *buf, int n);
|
static int zwrite(void *bout, void *buf, int n);
|
||||||
static void put4(Biobuf *b, ulong v);
|
static void put4(Biobuf *b, u32int v);
|
||||||
static void put2(Biobuf *b, int v);
|
static void put2(Biobuf *b, int v);
|
||||||
static void put1(Biobuf *b, int v);
|
static void put1(Biobuf *b, int v);
|
||||||
static void header(Biobuf *bout, ZipHead *zh);
|
static void header(Biobuf *bout, ZipHead *zh);
|
||||||
|
|
@ -24,14 +24,14 @@ static void error(char*, ...);
|
||||||
/* #pragma varargck argpos error 1 */
|
/* #pragma varargck argpos error 1 */
|
||||||
|
|
||||||
static Biobuf bout;
|
static Biobuf bout;
|
||||||
static ulong crc;
|
static u32int crc;
|
||||||
static ulong *crctab;
|
static u32int *crctab;
|
||||||
static int debug;
|
static int debug;
|
||||||
static int eof;
|
static int eof;
|
||||||
static int level;
|
static int level;
|
||||||
static int nzheads;
|
static int nzheads;
|
||||||
static ulong totr;
|
static u32int totr;
|
||||||
static ulong totw;
|
static u32int totw;
|
||||||
static int verbose;
|
static int verbose;
|
||||||
static int zhalloc;
|
static int zhalloc;
|
||||||
static ZipHead *zheads;
|
static ZipHead *zheads;
|
||||||
|
|
@ -353,7 +353,7 @@ zwrite(void *bout, void *buf, int n)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
put4(Biobuf *b, ulong v)
|
put4(Biobuf *b, u32int v)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ struct Block{
|
||||||
};
|
};
|
||||||
|
|
||||||
static Biobuf *bin;
|
static Biobuf *bin;
|
||||||
static ulong *crctab;
|
static u32int *crctab;
|
||||||
static ulong crc;
|
static ulong crc;
|
||||||
|
|
||||||
static int findCDir(Biobuf *);
|
static int findCDir(Biobuf *);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ struct ZlibW
|
||||||
uchar *e;
|
uchar *e;
|
||||||
};
|
};
|
||||||
|
|
||||||
static ulong *crctab;
|
static u32int *crctab;
|
||||||
static uchar PNGmagic[] = { 137, 'P', 'N', 'G', '\r', '\n', 26, '\n'};
|
static uchar PNGmagic[] = { 137, 'P', 'N', 'G', '\r', '\n', 26, '\n'};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue