diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..11b0518 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +macunpack/macunpack + diff --git a/macunpack/arc.h b/macunpack/arc.h old mode 100755 new mode 100644 diff --git a/macunpack/bin.c b/macunpack/bin.c old mode 100755 new mode 100644 index 86fb1f0..50cf3be --- a/macunpack/bin.c +++ b/macunpack/bin.c @@ -1,5 +1,6 @@ #include "macunpack.h" #ifdef BIN +#include #include "globals.h" #include "../fileio/machdr.h" #include "../fileio/wrfile.h" diff --git a/macunpack/bits_be.c b/macunpack/bits_be.c old mode 100755 new mode 100644 diff --git a/macunpack/bits_be.h b/macunpack/bits_be.h old mode 100755 new mode 100644 diff --git a/macunpack/cpt.c b/macunpack/cpt.c old mode 100755 new mode 100644 index 5514302..bdeb8d4 --- a/macunpack/cpt.c +++ b/macunpack/cpt.c @@ -5,6 +5,7 @@ #endif /* CPT */ #endif /* DD */ #ifdef CPT +#include #include "globals.h" #include "cpt.h" #include "crc.h" @@ -21,10 +22,6 @@ #define ESC1SEEN 1 #define ESC2SEEN 2 -extern char *malloc(); -extern char *realloc(); -extern int free(); - static void cpt_uncompact(); static unsigned char *cpt_data; static unsigned long cpt_datamax; diff --git a/macunpack/cpt.h b/macunpack/cpt.h old mode 100755 new mode 100644 index 43700b8..89f233d --- a/macunpack/cpt.h +++ b/macunpack/cpt.h @@ -40,7 +40,7 @@ typedef struct cptHdr { /* 8 bytes */ unsigned long hdrcrc; /* header crc */ unsigned short entries; /* number of index entries */ unsigned char commentsize; /* number of bytes comment that follow*/ -}; +} cptHdr; typedef struct fileHdr { /* 78 bytes */ unsigned char fName[32]; /* a STR32 */ @@ -61,7 +61,7 @@ typedef struct fileHdr { /* 78 bytes */ unsigned long dataLength; unsigned long compRLength; /* compressed lengths */ unsigned long compDLength; -}; +} fileHdr; /* file format is: diff --git a/macunpack/cpt.o b/macunpack/cpt.o deleted file mode 100644 index 4268419..0000000 Binary files a/macunpack/cpt.o and /dev/null differ diff --git a/macunpack/crc.c b/macunpack/crc.c old mode 100755 new mode 100644 diff --git a/macunpack/crc.h b/macunpack/crc.h old mode 100755 new mode 100644 diff --git a/macunpack/dd.c b/macunpack/dd.c old mode 100755 new mode 100644 index 28f417d..fd16f99 --- a/macunpack/dd.c +++ b/macunpack/dd.c @@ -1,5 +1,7 @@ #include "macunpack.h" #ifdef DD +#include +#include #include "globals.h" #include "dd.h" #include "crc.h" @@ -9,10 +11,6 @@ #include "../util/masks.h" #include "../util/util.h" -extern char *malloc(); -extern char *realloc(); -extern char *strcpy(); -extern char *strncpy(); extern void cpt_wrfile1(); extern void core_compress(); extern void de_compress(); @@ -48,7 +46,7 @@ static void dd_cpt_compat(); typedef struct methodinfo { char *name; int number; -}; +} methodinfo; static struct methodinfo methods[] = { {"NoComp", nocomp}, diff --git a/macunpack/dd.h b/macunpack/dd.h old mode 100755 new mode 100644 index 1fc0453..b608f6c --- a/macunpack/dd.h +++ b/macunpack/dd.h @@ -71,7 +71,7 @@ typedef struct fileHdr { /* 124 bytes */ unsigned short datacrc; /* checksum */ unsigned short rsrccrc; unsigned short hdrcrc; /* true crc */ -}; +} fileHdr; typedef struct fileCHdr { /* 84 bytes */ unsigned char magic[4]; /* "\253\315\000\124" */ @@ -101,7 +101,7 @@ typedef struct fileCHdr { /* 84 bytes */ unsigned short datacrc2; /* other checksum */ unsigned short rsrccrc2; unsigned short hdrcrc; /* true crc */ -}; +} fileCHdr; #define DD_FILE 0 #define DD_COPY 1 diff --git a/macunpack/de_compress.c b/macunpack/de_compress.c old mode 100755 new mode 100644 diff --git a/macunpack/de_huffman.c b/macunpack/de_huffman.c old mode 100755 new mode 100644 diff --git a/macunpack/de_lzah.c b/macunpack/de_lzah.c old mode 100755 new mode 100644 diff --git a/macunpack/de_lzh.c b/macunpack/de_lzh.c old mode 100755 new mode 100644 diff --git a/macunpack/dia.c b/macunpack/dia.c old mode 100755 new mode 100644 index 984eff3..0ad0616 --- a/macunpack/dia.c +++ b/macunpack/dia.c @@ -1,5 +1,7 @@ #include "macunpack.h" #ifdef DIA +#include +#include #include "globals.h" #include "dia.h" #include "../util/curtime.h" @@ -9,9 +11,6 @@ #include "../fileio/kind.h" #include "../util/util.h" -extern char *malloc(); -extern char *realloc(); - static unsigned char *dia_archive; static int dia_archive_size; static int dia_max_archive_size; diff --git a/macunpack/dia.h b/macunpack/dia.h old mode 100755 new mode 100644 diff --git a/macunpack/dia.o b/macunpack/dia.o deleted file mode 100644 index 43618db..0000000 Binary files a/macunpack/dia.o and /dev/null differ diff --git a/macunpack/dir.c b/macunpack/dir.c old mode 100755 new mode 100644 index 494b395..a1e3182 --- a/macunpack/dir.c +++ b/macunpack/dir.c @@ -1,12 +1,10 @@ +#include #include "globals.h" #include "../fileio/machdr.h" #include "../fileio/wrfile.h" #include "../util/util.h" #include "../util/masks.h" -extern char *malloc(); -extern char *realloc(); - static char *dir_stack; static int dir_ptr = -64; static int dir_max; diff --git a/macunpack/dir.o b/macunpack/dir.o deleted file mode 100644 index 1a00d4a..0000000 Binary files a/macunpack/dir.o and /dev/null differ diff --git a/macunpack/globals.c b/macunpack/globals.c old mode 100755 new mode 100644 diff --git a/macunpack/globals.h b/macunpack/globals.h old mode 100755 new mode 100644 diff --git a/macunpack/huffman.h b/macunpack/huffman.h old mode 100755 new mode 100644 diff --git a/macunpack/jdw.c b/macunpack/jdw.c old mode 100755 new mode 100644 diff --git a/macunpack/jdw.h b/macunpack/jdw.h old mode 100755 new mode 100644 index 545c365..05badff --- a/macunpack/jdw.h +++ b/macunpack/jdw.h @@ -19,5 +19,5 @@ typedef struct fileHdr { unsigned long mtime; char flength; char fname[32]; /* actually flength */ -}; +} fileHdr; diff --git a/macunpack/lzc.c b/macunpack/lzc.c old mode 100755 new mode 100644 index 08e26ff..5fa3c46 --- a/macunpack/lzc.c +++ b/macunpack/lzc.c @@ -1,5 +1,6 @@ #include "macunpack.h" #ifdef LZC +#include #include "globals.h" #include "lzc.h" #include "../util/util.h" diff --git a/macunpack/lzc.h b/macunpack/lzc.h old mode 100755 new mode 100644 index daa6d86..c42eb2c --- a/macunpack/lzc.h +++ b/macunpack/lzc.h @@ -25,5 +25,4 @@ typedef struct fileHdr { unsigned long fileauth; unsigned long flag1; unsigned long flag2; -}; - +} fileHdr; diff --git a/macunpack/lzh.c b/macunpack/lzh.c old mode 100755 new mode 100644 index 136f8d1..552cd19 --- a/macunpack/lzh.c +++ b/macunpack/lzh.c @@ -1,5 +1,6 @@ #include "macunpack.h" -#ifdef LZH +#include +#include #include "globals.h" #include "lzh.h" #include "crc.h" @@ -17,8 +18,6 @@ #define LZSMASK 4095 #define LZBUFFSIZE 8192 /* Max of above buffsizes */ -extern char *malloc(); -extern char *realloc(); extern void de_lzah(); extern unsigned char (*lzah_getbyte)(); extern void de_lzh(); @@ -26,7 +25,7 @@ extern void de_lzh(); typedef struct methodinfo { char *name; int number; -}; +} methodinfo; static struct methodinfo methods[] = { {"-lh0-", lh0}, @@ -770,7 +769,3 @@ unsigned long obytes; de_lzh((long)(-1), (long)obytes, &lzh_current, 13); out_ptr = tmp_out_ptr; } -#else /* LZH */ -int lzh; /* keep lint and some compilers happy */ -#endif /* LZH */ - diff --git a/macunpack/lzh.h b/macunpack/lzh.h old mode 100755 new mode 100644 index 5ebf8e5..93ad340 --- a/macunpack/lzh.h +++ b/macunpack/lzh.h @@ -45,7 +45,7 @@ typedef struct fileHdr { /* 58 bytes */ unsigned char extendsize; char *extend; char *data; -}; +} fileHdr; /* Currently known methods: */ #define lh0 0 @@ -57,11 +57,3 @@ typedef struct fileHdr { /* 58 bytes */ #define lz4 6 #define lz5 7 #define lzs 8 - -extern char *lzh_pointer; -extern char *lzh_data; -extern char *lzh_finfo; -extern int lzh_fsize; -extern int lzh_kind; -extern char *lzh_file; - diff --git a/macunpack/macbinary.c b/macunpack/macbinary.c old mode 100755 new mode 100644 index cab1e36..4142f31 --- a/macunpack/macbinary.c +++ b/macunpack/macbinary.c @@ -1,4 +1,5 @@ #include "macunpack.h" +#include #include "globals.h" #include "../fileio/machdr.h" #include "../fileio/wrfile.h" diff --git a/macunpack/macunpack.c b/macunpack/macunpack.c old mode 100755 new mode 100644 index 767512f..19c648f --- a/macunpack/macunpack.c +++ b/macunpack/macunpack.c @@ -1,4 +1,5 @@ #include "macunpack.h" +#include #include "globals.h" #include "../util/patchlevel.h" #include "../fileio/wrfile.h" diff --git a/macunpack/macunpack.h b/macunpack/macunpack.h old mode 100755 new mode 100644 diff --git a/macunpack/macunpack.o b/macunpack/macunpack.o deleted file mode 100644 index ef4770d..0000000 Binary files a/macunpack/macunpack.o and /dev/null differ diff --git a/macunpack/makefile b/macunpack/makefile old mode 100755 new mode 100644 index 69a19d3..fe07910 --- a/macunpack/makefile +++ b/macunpack/makefile @@ -77,10 +77,10 @@ lint: lint $(CF) $(LFLAGS) $(SRCS) $(XSRCS) $(CRCS) clean: - -rm -f *.o + rm -f *.o clobber:clean - -rm -f macunpack + rm -f macunpack macunpack.o: macunpack.h macunpack.o: globals.h diff --git a/macunpack/mcb.c b/macunpack/mcb.c old mode 100755 new mode 100644 diff --git a/macunpack/pit.c b/macunpack/pit.c old mode 100755 new mode 100644 index 9c5eae2..5f42fb8 --- a/macunpack/pit.c +++ b/macunpack/pit.c @@ -1,5 +1,6 @@ #include "macunpack.h" #ifdef PIT +#include #include "../fileio/wrfile.h" #include "../fileio/fileglob.h" #include "../fileio/kind.h" diff --git a/macunpack/pit.h b/macunpack/pit.h old mode 100755 new mode 100644 diff --git a/macunpack/sit.c b/macunpack/sit.c old mode 100755 new mode 100644 index 88d61cd..6fb46b4 --- a/macunpack/sit.c +++ b/macunpack/sit.c @@ -1,5 +1,6 @@ #include "macunpack.h" #ifdef SIT +#include #include "globals.h" #include "sit.h" #include "crc.h" @@ -22,7 +23,7 @@ extern unsigned char (*lzah_getbyte)(); typedef struct methodinfo { char *name; int number; -}; +} methodinfo; static struct methodinfo methods[] = { {"NoComp", nocomp}, diff --git a/macunpack/sit.h b/macunpack/sit.h old mode 100755 new mode 100644 index 383417b..ce51332 --- a/macunpack/sit.h +++ b/macunpack/sit.h @@ -32,7 +32,7 @@ typedef struct sitHdr { /* 22 bytes */ OSType signature2; /* = 'rLau' -- for verification */ unsigned char version; /* version number */ char reserved[7]; -}; +} sitHdr; typedef struct fileHdr { /* 112 bytes */ unsigned char compRMethod; /* rsrc fork compression method */ @@ -53,8 +53,7 @@ typedef struct fileHdr { /* 112 bytes */ unsigned short dataCRC; /* crc of data fork */ char reserved[6]; unsigned short hdrCRC; /* crc of file header */ -}; - +} fileHdr; /* file format is: sitArchiveHdr @@ -92,4 +91,3 @@ typedef struct fileHdr { /* 112 bytes */ /* all other numbers are reserved */ #define ESC 0x90 /* repeat packing escape */ - diff --git a/macunpack/stf.c b/macunpack/stf.c old mode 100755 new mode 100644 index 3c33fa1..b432e46 --- a/macunpack/stf.c +++ b/macunpack/stf.c @@ -1,5 +1,6 @@ #include "macunpack.h" #ifdef STF +#include #include "stf.h" #include "globals.h" #include "huffman.h" diff --git a/macunpack/stf.h b/macunpack/stf.h old mode 100755 new mode 100644 index 5d5a9bd..8fe1adb --- a/macunpack/stf.h +++ b/macunpack/stf.h @@ -11,5 +11,4 @@ typedef struct fileHdr { char fname[32]; /* actually flength */ unsigned long rsrcLength; unsigned long dataLength; -}; - +} fileHdr; diff --git a/macunpack/zma.c b/macunpack/zma.c old mode 100755 new mode 100644 index 371d7eb..ba9d2f7 --- a/macunpack/zma.c +++ b/macunpack/zma.c @@ -1,5 +1,7 @@ #include "macunpack.h" #ifdef ZMA +#include +#include #include "globals.h" #include "zma.h" #include "crc.h" @@ -9,8 +11,6 @@ #include "../util/masks.h" #include "../util/util.h" -extern char *malloc(); -extern char *realloc(); extern void de_lzh(); /* We do allow for possible backpointing, so we allocate the archive in core */ diff --git a/macunpack/zma.h b/macunpack/zma.h old mode 100755 new mode 100644 index 04bfc9f..8626942 --- a/macunpack/zma.h +++ b/macunpack/zma.h @@ -42,7 +42,7 @@ typedef struct fileHdr { /* 78 bytes */ unsigned char fName[32]; /* a STR32 */ /* The following are overlayed in the original structure */ unsigned long conts; /* Pointer to directory contents */ -}; +} fileHdr; /* zma types (see what) */ #define z_noth 0 /* ??? */ diff --git a/macunpack/zma.o b/macunpack/zma.o deleted file mode 100644 index 86d424d..0000000 Binary files a/macunpack/zma.o and /dev/null differ diff --git a/macunpack/zmahdr.h b/macunpack/zmahdr.h old mode 100755 new mode 100644 diff --git a/makefile b/makefile index 6a94a0e..85208fa 100755 --- a/makefile +++ b/makefile @@ -1,5 +1,4 @@ -SHELL = /bin/sh -BINDIR = /ufs/dik/tmpbin +BINDIR = bin # Use the following flags on the CF macro definition as needed. # # -DBSD if you are on a BSD system