mirror of
https://github.com/wnayes/macutils.git
synced 2025-02-08 04:30:25 +00:00
Convert remaining code to use prototypes.
This commit is contained in:
parent
926f4a694d
commit
a5e3a5e59c
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#define LOCALOPT "RilqVH"
|
#define LOCALOPT "RilqVH"
|
||||||
|
|
||||||
static void usage();
|
static void usage(void);
|
||||||
|
|
||||||
static char options[128];
|
static char options[128];
|
||||||
static char *dir_stack;
|
static char *dir_stack;
|
||||||
|
@ -16,13 +16,13 @@ static int savebits;
|
|||||||
static int rep_char;
|
static int rep_char;
|
||||||
static int rep_count;
|
static int rep_count;
|
||||||
|
|
||||||
void doheader();
|
static void doheader();
|
||||||
void dofork();
|
static void dofork(char *fork, int size);
|
||||||
void outbyte();
|
static void outbyte(int b);
|
||||||
void finish();
|
static void finish(void);
|
||||||
void outbyte1();
|
static void outbyte1(int b);
|
||||||
void out6bit();
|
static void out6bit(int c);
|
||||||
void outchar();
|
static void outchar(int c);
|
||||||
|
|
||||||
void
|
void
|
||||||
dofile (void)
|
dofile (void)
|
||||||
@ -42,7 +42,7 @@ dofile (void)
|
|||||||
(void)putchar('\n');
|
(void)putchar('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
doheader (void)
|
doheader (void)
|
||||||
{
|
{
|
||||||
uint32_t crc;
|
uint32_t crc;
|
||||||
@ -95,7 +95,7 @@ int i;
|
|||||||
outbyte((int)(crc & 0xff));
|
outbyte((int)(crc & 0xff));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
outbyte (int b)
|
outbyte (int b)
|
||||||
{
|
{
|
||||||
b &= 0xff;
|
b &= 0xff;
|
||||||
@ -128,7 +128,7 @@ outbyte (int b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
finish (void)
|
finish (void)
|
||||||
{
|
{
|
||||||
if(rep_count > 0) {
|
if(rep_count > 0) {
|
||||||
@ -153,7 +153,7 @@ finish (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
outbyte1 (int b)
|
outbyte1 (int b)
|
||||||
{
|
{
|
||||||
switch(state) {
|
switch(state) {
|
||||||
@ -177,13 +177,13 @@ outbyte1 (int b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
out6bit (int c)
|
out6bit (int c)
|
||||||
{
|
{
|
||||||
outchar(codes[c & 0x3f]);
|
outchar(codes[c & 0x3f]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
outchar (int c)
|
outchar (int c)
|
||||||
{
|
{
|
||||||
(void)putchar(c);
|
(void)putchar(c);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
extern char info[];
|
extern char info[];
|
||||||
|
|
||||||
static void usage();
|
static void usage(void);
|
||||||
|
|
||||||
static char options[128];
|
static char options[128];
|
||||||
static int multi_file = 0;
|
static int multi_file = 0;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#define LOCALOPT "ilqxyzoTVH"
|
#define LOCALOPT "ilqxyzoTVH"
|
||||||
|
|
||||||
static void usage();
|
static void usage(void);
|
||||||
|
|
||||||
static char options[128];
|
static char options[128];
|
||||||
static char *dir_stack;
|
static char *dir_stack;
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
|
|
||||||
static void receive_part();
|
static void receive_part(char *info, int size, int more);
|
||||||
static int receive_sync();
|
static int receive_sync(void);
|
||||||
static int receive_rec();
|
static int receive_rec(char *buf, int bufsize, int recno);
|
||||||
|
|
||||||
char info[INFOBYTES];
|
char info[INFOBYTES];
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
void xm_from();
|
void xm_from(void);
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
|
|
||||||
static void send_part();
|
static void send_part(char *info, int size, int more);
|
||||||
static int send_sync();
|
static int send_sync(void);
|
||||||
static void send_rec();
|
static void send_rec(char *buf, int bufsize, int recno);
|
||||||
|
|
||||||
void
|
void
|
||||||
xm_to (void)
|
xm_to (void)
|
||||||
|
@ -1 +1 @@
|
|||||||
void xm_to();
|
void xm_to(void);
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static void initcrctab();
|
static void initcrctab(char *name, int poly, int init, int swapped, int bits);
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "rdfile.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -7,7 +9,6 @@
|
|||||||
#endif /* TYPES_H */
|
#endif /* TYPES_H */
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "machdr.h"
|
#include "machdr.h"
|
||||||
#include "rdfile.h"
|
|
||||||
#include "rdfileopt.h"
|
#include "rdfileopt.h"
|
||||||
#ifndef DIRENT_H
|
#ifndef DIRENT_H
|
||||||
#include <sys/dir.h>
|
#include <sys/dir.h>
|
||||||
@ -46,11 +47,11 @@
|
|||||||
#define RSRC_FORMAT 2
|
#define RSRC_FORMAT 2
|
||||||
#define UNIX_FORMAT 3
|
#define UNIX_FORMAT 3
|
||||||
|
|
||||||
static void check_files();
|
static void check_files(int initial);
|
||||||
static void read_file();
|
static void read_file(void);
|
||||||
static void enter_dir();
|
static void enter_dir(void);
|
||||||
static void exit_dir();
|
static void exit_dir(void);
|
||||||
static int get_stdin_file();
|
static int get_stdin_file(void);
|
||||||
|
|
||||||
char file_info[INFOBYTES];
|
char file_info[INFOBYTES];
|
||||||
char *data_fork, *rsrc_fork;
|
char *data_fork, *rsrc_fork;
|
||||||
@ -81,12 +82,12 @@ static char f_name[] = ".foldername";
|
|||||||
#include "aufs.h"
|
#include "aufs.h"
|
||||||
static char infodir[] = ".finderinfo";
|
static char infodir[] = ".finderinfo";
|
||||||
static char rsrcdir[] = ".resource";
|
static char rsrcdir[] = ".resource";
|
||||||
static void read_aufs_info();
|
static void read_aufs_info(FILE *fd);
|
||||||
#endif /* AUFS */
|
#endif /* AUFS */
|
||||||
#ifdef APPLEDOUBLE
|
#ifdef APPLEDOUBLE
|
||||||
#include "appledouble.h"
|
#include "appledouble.h"
|
||||||
static char infodir[] = ".AppleDouble";
|
static char infodir[] = ".AppleDouble";
|
||||||
static void read_appledouble_info();
|
static void read_appledouble_info(FILE *fd);
|
||||||
#endif /* APPLEDOUBLE */
|
#endif /* APPLEDOUBLE */
|
||||||
#endif /* APPLESHARE */
|
#endif /* APPLESHARE */
|
||||||
static char filename[255];
|
static char filename[255];
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "machdr.h"
|
||||||
|
|
||||||
#define ISATEND 0
|
#define ISATEND 0
|
||||||
#define ISFILE 1
|
#define ISFILE 1
|
||||||
#define ISDIR 2
|
#define ISDIR 2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
extern int rdfileopt();
|
extern int rdfileopt(int c);
|
||||||
extern void give_rdfileopt();
|
extern void give_rdfileopt(void);
|
||||||
extern void set_norecurse();
|
extern void set_norecurse(void);
|
||||||
extern char *get_rdfileopt();
|
extern char *get_rdfileopt(void);
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif /* TYPES_H */
|
#endif /* TYPES_H */
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -44,17 +45,17 @@ char *sprintf();
|
|||||||
#endif /* UNDEF */
|
#endif /* UNDEF */
|
||||||
|
|
||||||
#ifdef AUFS
|
#ifdef AUFS
|
||||||
static void check_aufs();
|
static void check_aufs(void);
|
||||||
static void aufs_namings();
|
static void aufs_namings(void);
|
||||||
static void wr_aufs_info();
|
static void wr_aufs_info(FILE* fp);
|
||||||
#endif /* AUFS */
|
#endif /* AUFS */
|
||||||
#ifdef APPLEDOUBLE
|
#ifdef APPLEDOUBLE
|
||||||
static void check_appledouble();
|
static void check_appledouble(void);
|
||||||
static void appledouble_namings();
|
static void appledouble_namings(void);
|
||||||
static void wr_appledouble_info();
|
static void wr_appledouble_info(FILE* fp);
|
||||||
#endif /* APPLEDOUBLE */
|
#endif /* APPLEDOUBLE */
|
||||||
#ifdef APPLESHARE
|
#ifdef APPLESHARE
|
||||||
static void mk_share_name();
|
static void mk_share_name(void);
|
||||||
#endif /* APPLESHARE */
|
#endif /* APPLESHARE */
|
||||||
|
|
||||||
#ifndef BSD
|
#ifndef BSD
|
||||||
@ -531,7 +532,7 @@ int i;
|
|||||||
|
|
||||||
#ifdef APPLESHARE
|
#ifdef APPLESHARE
|
||||||
#ifdef AUFS
|
#ifdef AUFS
|
||||||
static void check_aufs()
|
static void check_aufs(void)
|
||||||
{
|
{
|
||||||
/* check for .resource/ and .finderinfo/ */
|
/* check for .resource/ and .finderinfo/ */
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
@ -557,7 +558,7 @@ static void check_aufs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void aufs_namings()
|
static void aufs_namings(void)
|
||||||
{
|
{
|
||||||
mk_share_name();
|
mk_share_name();
|
||||||
(void)sprintf(f_info_aufs, "%s/%s", infodir, share_name);
|
(void)sprintf(f_info_aufs, "%s/%s", infodir, share_name);
|
||||||
@ -565,8 +566,7 @@ static void aufs_namings()
|
|||||||
(void)sprintf(f_data, "%s", share_name);
|
(void)sprintf(f_data, "%s", share_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wr_aufs_info(fp)
|
static void wr_aufs_info(FILE* fp)
|
||||||
FILE *fp;
|
|
||||||
{
|
{
|
||||||
FileInfo theinfo;
|
FileInfo theinfo;
|
||||||
int n;
|
int n;
|
||||||
@ -601,7 +601,7 @@ FILE *fp;
|
|||||||
#endif /* AUFS */
|
#endif /* AUFS */
|
||||||
|
|
||||||
#ifdef APPLEDOUBLE
|
#ifdef APPLEDOUBLE
|
||||||
static void check_appledouble()
|
static void check_appledouble(void)
|
||||||
{
|
{
|
||||||
/* check for .AppleDouble/ */
|
/* check for .AppleDouble/ */
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
@ -620,15 +620,14 @@ static void check_appledouble()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void appledouble_namings()
|
static void appledouble_namings(void)
|
||||||
{
|
{
|
||||||
mk_share_name();
|
mk_share_name();
|
||||||
(void)snprintf(f_info_appledouble, sizeof(f_info_appledouble), "%s/%s", infodir, share_name);
|
(void)snprintf(f_info_appledouble, sizeof(f_info_appledouble), "%s/%s", infodir, share_name);
|
||||||
(void)snprintf(f_data, sizeof(f_data), "%s", share_name);
|
(void)snprintf(f_data, sizeof(f_data), "%s", share_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wr_appledouble_info(fp)
|
static void wr_appledouble_info(FILE* fp)
|
||||||
FILE *fp;
|
|
||||||
{
|
{
|
||||||
FileInfo theinfo;
|
FileInfo theinfo;
|
||||||
int n;
|
int n;
|
||||||
@ -673,7 +672,7 @@ FILE *fp;
|
|||||||
}
|
}
|
||||||
#endif /* APPLEDOUBLE */
|
#endif /* APPLEDOUBLE */
|
||||||
|
|
||||||
static void mk_share_name()
|
static void mk_share_name(void)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
char *mp, *up;
|
char *mp, *up;
|
||||||
@ -693,8 +692,7 @@ static void mk_share_name()
|
|||||||
}
|
}
|
||||||
#endif /* APPLESHARE */
|
#endif /* APPLESHARE */
|
||||||
|
|
||||||
int wrfileopt(c)
|
int wrfileopt(char c)
|
||||||
char c;
|
|
||||||
{
|
{
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'b':
|
case 'b':
|
||||||
@ -767,7 +765,7 @@ char c;
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void give_wrfileopt()
|
void give_wrfileopt(void)
|
||||||
{
|
{
|
||||||
(void)fprintf(stderr, "File output options:\n");
|
(void)fprintf(stderr, "File output options:\n");
|
||||||
(void)fprintf(stderr, "-b:\tMacBinary (default)\n");
|
(void)fprintf(stderr, "-b:\tMacBinary (default)\n");
|
||||||
@ -810,7 +808,7 @@ void set_s_wrfileopt(int restricted)
|
|||||||
mode_s_restricted = restricted;
|
mode_s_restricted = restricted;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_wrfileopt()
|
char *get_wrfileopt(void)
|
||||||
{
|
{
|
||||||
static char options[20];
|
static char options[20];
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ extern void start_rsrc(void);
|
|||||||
extern void start_data(void);
|
extern void start_data(void);
|
||||||
extern void end_file(void);
|
extern void end_file(void);
|
||||||
#ifdef SCAN
|
#ifdef SCAN
|
||||||
extern void do_idf();
|
extern void do_idf(char *name, int kind);
|
||||||
#endif /* SCAN */
|
#endif /* SCAN */
|
||||||
extern void do_mkdir(char *name, char *header);
|
extern void do_mkdir(char *name, char *header);
|
||||||
extern void enddir(void);
|
extern void enddir(void);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
extern int wrfileopt();
|
extern int wrfileopt(char c);
|
||||||
extern void give_wrfileopt();
|
extern void give_wrfileopt(void);
|
||||||
extern void set_wrfileopt();
|
extern void set_wrfileopt(int restricted);
|
||||||
extern void set_s_wrfileopt();
|
extern void set_s_wrfileopt(int restricted);
|
||||||
extern char *get_wrfileopt();
|
extern char *get_wrfileopt(void);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
extern char *data_fork, *rsrc_fork;
|
extern char *data_fork, *rsrc_fork;
|
||||||
extern int data_size, rsrc_size;
|
extern int data_size, rsrc_size;
|
||||||
extern void put_byte();
|
extern void put_byte(int c);
|
||||||
extern void set_put();
|
extern void set_put(int data);
|
||||||
extern void end_put();
|
extern void end_put(void);
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "printhdr.h"
|
#include "printhdr.h"
|
||||||
|
|
||||||
|
@ -2,15 +2,12 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef BSD
|
#ifdef BSD
|
||||||
extern char *rindex();
|
#include <strings.h>
|
||||||
#define search_last rindex
|
#define search_last rindex
|
||||||
#else /* BSD */
|
#else /* BSD */
|
||||||
extern char *strrchr();
|
|
||||||
#define search_last strrchr
|
#define search_last strrchr
|
||||||
#endif /* BSD */
|
#endif /* BSD */
|
||||||
|
|
||||||
extern void transname();
|
|
||||||
|
|
||||||
extern char info[];
|
extern char info[];
|
||||||
extern char trname[];
|
extern char trname[];
|
||||||
|
|
||||||
@ -36,5 +33,5 @@ extern int was_macbin;
|
|||||||
|
|
||||||
extern FILE *ifp;
|
extern FILE *ifp;
|
||||||
|
|
||||||
extern void do_error();
|
extern void do_error(char *string);
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "crc.h"
|
#include "crc.h"
|
||||||
#include "readline.h"
|
#include "readline.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
@ -12,13 +13,13 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static void do_o_forks();
|
static void do_o_forks(void);
|
||||||
static int32_t make_file();
|
static int32_t make_file(int compressed);
|
||||||
static void comp_c_crc();
|
static void comp_c_crc(int c);
|
||||||
static void comp_e_crc();
|
static void comp_e_crc(int c);
|
||||||
static int comp_to_bin();
|
static int comp_to_bin(void);
|
||||||
static int hex_to_bin();
|
static int hex_to_bin(void);
|
||||||
static int hexit();
|
static int hexit(int c);
|
||||||
|
|
||||||
static int compressed;
|
static int compressed;
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "printhdr.h"
|
#include "printhdr.h"
|
||||||
|
|
||||||
static void get_header(void);
|
static void get_header(void);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "readline.h"
|
#include "readline.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
@ -12,9 +13,9 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static void do_mu_fork();
|
static void do_mu_fork(void);
|
||||||
static int mu_comp_to_bin();
|
static int mu_comp_to_bin(void);
|
||||||
static int mu_convert();
|
static int mu_convert(char *ibuf, char *obuf);
|
||||||
|
|
||||||
/* mu format -- process .mu files */
|
/* mu format -- process .mu files */
|
||||||
void
|
void
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "printhdr.h"
|
#include "printhdr.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
|
|
||||||
/* print out header information in human-readable format */
|
/* print out header information in human-readable format */
|
||||||
void print_header0(int skip)
|
void print_header0(int skip)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
extern void print_header0();
|
extern void print_header0(int skip);
|
||||||
extern void print_header1();
|
extern void print_header1(int skip1, int skip2);
|
||||||
extern void print_header2();
|
extern void print_header2(int skip);
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
extern char line[];
|
extern char line[];
|
||||||
|
|
||||||
int readline();
|
int readline(void);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#include "bin.h"
|
#include "bin.h"
|
||||||
#ifdef BIN
|
#ifdef BIN
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
|
@ -4,7 +4,7 @@ extern unsigned int bit_be_bitbuf;
|
|||||||
extern char *bit_be_filestart;
|
extern char *bit_be_filestart;
|
||||||
extern int bit_be_inbytes;
|
extern int bit_be_inbytes;
|
||||||
|
|
||||||
extern void bit_be_fillbuf();
|
extern void bit_be_fillbuf(int n);
|
||||||
extern unsigned int bit_be_getbits();
|
extern unsigned int bit_be_getbits(int n);
|
||||||
extern void bit_be_init_getbits();
|
extern void bit_be_init_getbits(void);
|
||||||
|
|
||||||
|
@ -5,15 +5,19 @@
|
|||||||
#endif /* CPT */
|
#endif /* CPT */
|
||||||
#endif /* DD */
|
#endif /* DD */
|
||||||
#ifdef CPT
|
#ifdef CPT
|
||||||
|
|
||||||
|
#define CPT_INTERNAL
|
||||||
|
#include "cpt.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "cpt.h"
|
|
||||||
#include "crc.h"
|
#include "crc.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
|
|
||||||
#define ESC1 0x81
|
#define ESC1 0x81
|
||||||
@ -22,7 +26,6 @@
|
|||||||
#define ESC1SEEN 1
|
#define ESC1SEEN 1
|
||||||
#define ESC2SEEN 2
|
#define ESC2SEEN 2
|
||||||
|
|
||||||
static void cpt_uncompact();
|
|
||||||
static unsigned char *cpt_data;
|
static unsigned char *cpt_data;
|
||||||
static uint32_t cpt_datamax;
|
static uint32_t cpt_datamax;
|
||||||
static uint32_t cpt_datasize;
|
static uint32_t cpt_datasize;
|
||||||
@ -42,17 +45,17 @@ static int cpt_blocksize;
|
|||||||
static node cpt_Hufftree[512 + SLACK], cpt_LZlength[128 + SLACK],
|
static node cpt_Hufftree[512 + SLACK], cpt_LZlength[128 + SLACK],
|
||||||
cpt_LZoffs[256 + SLACK];
|
cpt_LZoffs[256 + SLACK];
|
||||||
|
|
||||||
static int readcpthdr();
|
static int readcpthdr(struct cptHdr *s);
|
||||||
static int cpt_filehdr();
|
static int cpt_filehdr(struct cpt_fileHdr *f, char *hdr);
|
||||||
static void cpt_folder();
|
static void cpt_folder(char *name, struct cpt_fileHdr fileh, char *cptptr);
|
||||||
static void cpt_uncompact();
|
static void cpt_uncompact(struct cpt_fileHdr filehdr);
|
||||||
static void cpt_wrfile();
|
static void cpt_wrfile(uint32_t ibytes, uint32_t obytes, int type);
|
||||||
static void cpt_outch();
|
static void cpt_outch(int ch);
|
||||||
static void cpt_rle();
|
static void cpt_rle(void);
|
||||||
static void cpt_rle_lzh();
|
static void cpt_rle_lzh(void);
|
||||||
static void cpt_readHuff();
|
static void cpt_readHuff(int size, struct node *Hufftree);
|
||||||
static int cpt_get6bits();
|
static int cpt_get6bits(void);
|
||||||
static int cpt_getbit();
|
static int cpt_getbit(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
cpt (void)
|
cpt (void)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef CPT
|
||||||
|
#ifdef CPT_INTERNAL
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define C_SIGNATURE 0
|
#define C_SIGNATURE 0
|
||||||
@ -93,9 +97,13 @@ typedef struct cpt_fileHdr { /* 78 bytes */
|
|||||||
|
|
||||||
#define CIRCSIZE 8192
|
#define CIRCSIZE 8192
|
||||||
|
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
cpt_wrfile1 (unsigned char *in_char,
|
cpt_wrfile1 (unsigned char *in_char,
|
||||||
uint32_t ibytes,
|
uint32_t ibytes,
|
||||||
uint32_t obytes,
|
uint32_t obytes,
|
||||||
int type,
|
int type,
|
||||||
uint32_t blocksize);
|
uint32_t blocksize);
|
||||||
|
void cpt (void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -13,34 +13,35 @@
|
|||||||
#include "../fileio/fileglob.h"
|
#include "../fileio/fileglob.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
|
|
||||||
static void dd_name();
|
static void dd_name(unsigned char *bin_hdr);
|
||||||
static int dd_filehdr();
|
static int dd_filehdr(struct dd_fileHdr *f, struct dd_fileCHdr *cf, int skip);
|
||||||
static void dd_cfilehdr();
|
static void dd_cfilehdr(struct dd_fileCHdr *f);
|
||||||
static int dd_valid();
|
static int dd_valid(int dmethod, int rmethod);
|
||||||
static int dd_valid1();
|
static int dd_valid1(int method);
|
||||||
static char *dd_methname();
|
static char *dd_methname(int n);
|
||||||
static uint32_t dd_checksum();
|
static uint32_t dd_checksum(uint32_t init, char *buffer, uint32_t length);
|
||||||
static void dd_chksum();
|
static void dd_chksum(struct dd_fileHdr hdr, unsigned char *data);
|
||||||
static uint32_t dd_checkor();
|
static uint32_t dd_checkor(uint32_t init, char *buffer, uint32_t length);
|
||||||
static void dd_do_delta();
|
static void dd_do_delta(char *out_ptr, uint32_t nbytes, int kind);
|
||||||
static void dd_delta();
|
static void dd_delta(char *out_ptr, uint32_t nbytes);
|
||||||
static void dd_delta3();
|
static void dd_delta3(char *out_ptr, uint32_t nbytes);
|
||||||
static void dd_copy();
|
static void dd_copy(struct dd_fileHdr hdr, unsigned char *data);
|
||||||
static void dd_copyfile();
|
static void dd_copyfile(uint32_t obytes, unsigned char *data);
|
||||||
static void dd_expand();
|
static void dd_expand(struct dd_fileCHdr hdr, unsigned char *data);
|
||||||
static void dd_expandfile();
|
static void dd_expandfile(uint32_t obytes, uint32_t ibytes, int method, int kind, unsigned char *data, uint32_t chksum);
|
||||||
static void dd_nocomp();
|
static void dd_nocomp(uint32_t obytes, unsigned char *data);
|
||||||
static void dd_lzc();
|
static void dd_lzc(uint32_t ibytes, uint32_t obytes, unsigned char *data, int mb, uint32_t chksum, uint32_t ckinit);
|
||||||
#ifdef UNTESTED
|
#ifdef UNTESTED
|
||||||
static void dd_rle();
|
static void dd_rle(uint32_t ibytes, unsigned char *data);
|
||||||
#ifdef NOTIMPLEMENTED
|
#ifdef NOTIMPLEMENTED
|
||||||
static void dd_huffman();
|
static void dd_huffman(uint32_t ibytes, unsigned char *data);
|
||||||
#endif /* NOTIMPLEMENTED */
|
#endif /* NOTIMPLEMENTED */
|
||||||
static void dd_lzss();
|
static void dd_lzss(unsigned char *data, uint32_t chksum);
|
||||||
static int dd_getbits();
|
static int dd_getbits(int n);
|
||||||
#endif /* UNTESTED */
|
#endif /* UNTESTED */
|
||||||
static void dd_cpt_compat();
|
static void dd_cpt_compat(uint32_t ibytes, uint32_t obytes, unsigned char *data, int sub_method, uint32_t chksum);
|
||||||
|
|
||||||
typedef struct methodinfo {
|
typedef struct methodinfo {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#include "de_compress.h"
|
#include "de_compress.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef SIT
|
#ifdef SIT
|
||||||
#define DECOMPRESS
|
#define DECOMPRESS
|
||||||
@ -32,7 +35,7 @@ static unsigned short codetab [HSIZE];
|
|||||||
|
|
||||||
static int32_t free_ent = 0; /* first unused entry */
|
static int32_t free_ent = 0; /* first unused entry */
|
||||||
|
|
||||||
static int32_t getcode();
|
static int32_t getcode(void);
|
||||||
|
|
||||||
static int clear_flg = 0;
|
static int clear_flg = 0;
|
||||||
|
|
||||||
@ -121,8 +124,8 @@ static unsigned char rmask[9] =
|
|||||||
|
|
||||||
static int get_core_bytes;
|
static int get_core_bytes;
|
||||||
static char *core_ptr;
|
static char *core_ptr;
|
||||||
static int file_bytes();
|
static int file_bytes(char *buf, int length);
|
||||||
static int core_bytes();
|
static int core_bytes(char *buf, int length);
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
getcode (void)
|
getcode (void)
|
||||||
|
@ -23,15 +23,15 @@
|
|||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
|
||||||
int (*get_bit)();
|
int (*get_bit)(void);
|
||||||
int bytesread;
|
int bytesread;
|
||||||
/* 515 because StuffIt Classic needs more than the needed 511 */
|
/* 515 because StuffIt Classic needs more than the needed 511 */
|
||||||
struct node nodelist[515];
|
struct node nodelist[515];
|
||||||
static int getbit_be();
|
static int getbit_be(void);
|
||||||
static int getbit_le();
|
static int getbit_le(void);
|
||||||
static int getdecodebyte();
|
static int getdecodebyte(void);
|
||||||
|
|
||||||
static node *nodeptr, *read_sub_tree();
|
static node *nodeptr, *read_sub_tree(void);
|
||||||
|
|
||||||
static int bit;
|
static int bit;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ read_tree (void)
|
|||||||
|
|
||||||
/* This routine recursively reads the Huffman encoding table and builds
|
/* This routine recursively reads the Huffman encoding table and builds
|
||||||
a decoding tree. */
|
a decoding tree. */
|
||||||
static node *read_sub_tree()
|
static node *read_sub_tree(void)
|
||||||
{
|
{
|
||||||
node *np;
|
node *np;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
void set_huffman(int endian);
|
void set_huffman(int endian);
|
||||||
void read_tree();
|
void read_tree(void);
|
||||||
void de_huffman(uint32_t obytes);
|
void de_huffman(uint32_t obytes);
|
||||||
void de_huffman_end(unsigned int term);
|
void de_huffman_end(unsigned int term);
|
@ -79,13 +79,13 @@ static short HuffLength[] = {
|
|||||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
|
||||||
|
|
||||||
unsigned char (*lzah_getbyte)();
|
unsigned char (*lzah_getbyte)(void);
|
||||||
|
|
||||||
static void lzah_inithuf();
|
static void lzah_inithuf(void);
|
||||||
static void lzah_reorder();
|
static void lzah_reorder(void);
|
||||||
static void lzah_move(int *p, int *q, int n);
|
static void lzah_move(int *p, int *q, int n);
|
||||||
static void lzah_getbit();
|
static void lzah_getbit(void);
|
||||||
static void lzah_outchar();
|
static void lzah_outchar(int ch);
|
||||||
|
|
||||||
static char lzah_buf[4096];
|
static char lzah_buf[4096];
|
||||||
static int lzah_bufptr;
|
static int lzah_bufptr;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
extern void de_lzah(uint32_t obytes);
|
extern void de_lzah(uint32_t obytes);
|
||||||
extern unsigned char (*lzah_getbyte)();
|
extern unsigned char (*lzah_getbyte)(void);
|
||||||
extern void de_lzh(int32_t ibytes, int32_t obytes, char **data, int bits);
|
extern void de_lzh(int32_t ibytes, int32_t obytes, char **data, int bits);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
static int decoded;
|
static int decoded;
|
||||||
static int bitsused;
|
static int bitsused;
|
||||||
static unsigned int blocksize;
|
static unsigned int blocksize;
|
||||||
static unsigned int decode_c();
|
static unsigned int decode_c(void);
|
||||||
static unsigned int decode_p();
|
static unsigned int decode_p(void);
|
||||||
static void make_table();
|
static void make_table(int nchar, unsigned char bitlen[], int tablebits, unsigned int table[]);
|
||||||
|
|
||||||
/* lzh compression */
|
/* lzh compression */
|
||||||
void de_lzh(int32_t ibytes, int32_t obytes, char **data, int bits)
|
void de_lzh(int32_t ibytes, int32_t obytes, char **data, int bits)
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef DIA
|
#ifdef DIA
|
||||||
|
#define DIA_INTERNAL
|
||||||
|
#include "dia.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "dia.h"
|
|
||||||
#include "../util/curtime.h"
|
#include "../util/curtime.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
@ -26,14 +29,14 @@ static int dia_LZtab[BCHUNKSIZE];
|
|||||||
static unsigned char *dia_bit_base;
|
static unsigned char *dia_bit_base;
|
||||||
static int dia_imask;
|
static int dia_imask;
|
||||||
|
|
||||||
static void dia_folder();
|
static void dia_folder(unsigned char *name);
|
||||||
static void dia_file();
|
static void dia_file(int indicator, unsigned char *name);
|
||||||
static void dia_getlength();
|
static void dia_getlength(int nblocks);
|
||||||
static void dia_skipfork();
|
static void dia_skipfork(int nblocks);
|
||||||
static void dia_getfork();
|
static void dia_getfork(int nblocks);
|
||||||
static void dia_getblock();
|
static void dia_getblock(unsigned char **archive_ptr, unsigned char **block_ptr);
|
||||||
static int dia_decode();
|
static int dia_decode(unsigned char *ibuff, unsigned char *obuff, int in_length);
|
||||||
static int dia_prevbit();
|
static int dia_prevbit(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
dia (unsigned char *bin_hdr)
|
dia (unsigned char *bin_hdr)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef DIA
|
||||||
|
#ifdef DIA_INTERNAL
|
||||||
|
|
||||||
#define IS_FOLDER 0x80
|
#define IS_FOLDER 0x80
|
||||||
#define F_INFO 0x40
|
#define F_INFO 0x40
|
||||||
#define VOLUME 0x30
|
#define VOLUME 0x30
|
||||||
@ -20,3 +24,8 @@
|
|||||||
#define NOCOMP 1
|
#define NOCOMP 1
|
||||||
#define COMP 2
|
#define COMP 2
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
void dia (unsigned char *bin_hdr);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
|
#include "dir.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
|
|
||||||
static char *dir_stack;
|
static char *dir_stack;
|
||||||
static int dir_ptr = -64;
|
static int dir_ptr = -64;
|
||||||
|
1
macunpack/dir.h
Normal file
1
macunpack/dir.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
void dir (char *hdr);
|
@ -1,8 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
extern void exit();
|
void do_error (char *string);
|
||||||
extern void transname();
|
|
||||||
extern void do_error();
|
|
||||||
|
|
||||||
extern char info[];
|
extern char info[];
|
||||||
extern char text[];
|
extern char text[];
|
||||||
|
@ -6,10 +6,10 @@ typedef struct node {
|
|||||||
struct node *one, *zero;
|
struct node *one, *zero;
|
||||||
} node;
|
} node;
|
||||||
|
|
||||||
extern int (*get_bit)();
|
extern int (*get_bit)(void);
|
||||||
extern void clrhuff();
|
extern void clrhuff(void);
|
||||||
int gethuffbyte(node *l_nodelist);
|
int gethuffbyte(node *l_nodelist);
|
||||||
int getihuffbyte();
|
int getihuffbyte(void);
|
||||||
|
|
||||||
extern struct node nodelist[];
|
extern struct node nodelist[];
|
||||||
extern int bytesread;
|
extern int bytesread;
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef JDW
|
#ifdef JDW
|
||||||
|
#define JDW_INTERNAL
|
||||||
#include "jdw.h"
|
#include "jdw.h"
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
#include "de_huffman.h"
|
#include "de_huffman.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
|
||||||
static void jdw_wrfile();
|
static void jdw_wrfile(uint32_t rsrcLength, uint32_t dataLength);
|
||||||
static void jdw_wrfork();
|
static void jdw_wrfork(uint32_t length);
|
||||||
static void jdw_block();
|
static void jdw_block(int olength);
|
||||||
|
|
||||||
void
|
void
|
||||||
jdw (uint32_t ibytes)
|
jdw (uint32_t ibytes)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef JDW
|
||||||
|
#ifdef JDW_INTERNAL
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define J_MAGIC 0
|
#define J_MAGIC 0
|
||||||
@ -23,3 +27,6 @@ typedef struct jdw_fileHdr {
|
|||||||
char fname[32]; /* actually flength */
|
char fname[32]; /* actually flength */
|
||||||
} jdw_fileHdr;
|
} jdw_fileHdr;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
void jdw (uint32_t ibytes);
|
||||||
|
#endif
|
@ -1,18 +1,22 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef LZC
|
#ifdef LZC
|
||||||
#include <string.h>
|
#define LZC_INTERNAL
|
||||||
#include "globals.h"
|
|
||||||
#include "lzc.h"
|
#include "lzc.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "globals.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "de_compress.h"
|
#include "de_compress.h"
|
||||||
#include "mcb.h"
|
#include "mcb.h"
|
||||||
|
|
||||||
static void lzc_zivm();
|
static void lzc_zivm(char *ohdr);
|
||||||
static void lzc_wrfile();
|
static void lzc_wrfile(uint32_t obytes, uint32_t ibytes);
|
||||||
static void lzc_zivu();
|
static void lzc_zivu(char *ohdr);
|
||||||
|
|
||||||
void
|
void
|
||||||
lzc (char *ohdr)
|
lzc (char *ohdr)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef LZC
|
||||||
|
#ifdef LZC_INTERNAL
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define HEADERBYTES 48
|
#define HEADERBYTES 48
|
||||||
@ -28,3 +32,6 @@ typedef struct lzc_fileHdr {
|
|||||||
uint32_t flag1;
|
uint32_t flag1;
|
||||||
uint32_t flag2;
|
uint32_t flag2;
|
||||||
} lzc_fileHdr;
|
} lzc_fileHdr;
|
||||||
|
#endif
|
||||||
|
void lzc (char *ohdr);
|
||||||
|
#endif
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
|
|
||||||
|
#define LZH_INTERNAL
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
@ -7,8 +10,10 @@
|
|||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "bits_be.h"
|
#include "bits_be.h"
|
||||||
|
#include "de_lzah.h"
|
||||||
|
|
||||||
#define LZ5LOOKAHEAD 18 /* look ahead buffer size for LArc */
|
#define LZ5LOOKAHEAD 18 /* look ahead buffer size for LArc */
|
||||||
#define LZ5BUFFSIZE 8192
|
#define LZ5BUFFSIZE 8192
|
||||||
@ -18,10 +23,6 @@
|
|||||||
#define LZSMASK 4095
|
#define LZSMASK 4095
|
||||||
#define LZBUFFSIZE 8192 /* Max of above buffsizes */
|
#define LZBUFFSIZE 8192 /* Max of above buffsizes */
|
||||||
|
|
||||||
extern void de_lzah();
|
|
||||||
extern unsigned char (*lzah_getbyte)();
|
|
||||||
extern void de_lzh();
|
|
||||||
|
|
||||||
typedef struct methodinfo {
|
typedef struct methodinfo {
|
||||||
char *name;
|
char *name;
|
||||||
int number;
|
int number;
|
||||||
@ -51,26 +52,26 @@ static char *lzh_current;
|
|||||||
static char *tmp_out_ptr;
|
static char *tmp_out_ptr;
|
||||||
static char lzh_lzbuf[LZBUFFSIZE];
|
static char lzh_lzbuf[LZBUFFSIZE];
|
||||||
|
|
||||||
static int lzh_filehdr();
|
static int lzh_filehdr(struct lzh_fileHdr *f);
|
||||||
static int lzh_checkm();
|
static int lzh_checkm(struct lzh_fileHdr *f);
|
||||||
static char *lzh_methname();
|
static char *lzh_methname(int n);
|
||||||
static void lzh_wrfile();
|
static void lzh_wrfile(struct lzh_fileHdr *filehdr, int method);
|
||||||
static void lzh_skip();
|
static void lzh_skip(struct lzh_fileHdr *filehdr);
|
||||||
static void lzh_nocomp();
|
static void lzh_nocomp(uint32_t obytes);
|
||||||
#ifdef UNTESTED
|
#ifdef UNTESTED
|
||||||
static void lzh_lzss1();
|
static void lzh_lzss1(uint32_t obytes);
|
||||||
static void lzh_lzss2();
|
static void lzh_lzss2(uint32_t obytes);
|
||||||
#endif /* UNTESTED */
|
#endif /* UNTESTED */
|
||||||
static void lzh_lzah();
|
static void lzh_lzah(uint32_t obytes);
|
||||||
static unsigned char lzh_getbyte();
|
static unsigned char lzh_getbyte(void);
|
||||||
#ifdef UNDEF
|
#ifdef UNDEF
|
||||||
static void lzh_lh2();
|
static void lzh_lh2(uint32_t obytes);
|
||||||
static void lzh_lh3();
|
static void lzh_lh3(uint32_t obytes);
|
||||||
#endif /* UNDEF */
|
#endif /* UNDEF */
|
||||||
#ifdef UNTESTED
|
#ifdef UNTESTED
|
||||||
static void lzh_lzh12();
|
static void lzh_lzh12(uint32_t obytes);
|
||||||
#endif /* UNTESTED */
|
#endif /* UNTESTED */
|
||||||
static void lzh_lzh13();
|
static void lzh_lzh13(uint32_t obytes);
|
||||||
|
|
||||||
void
|
void
|
||||||
lzh (int kind)
|
lzh (int kind)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef LZH
|
||||||
|
#ifdef LZH_INTERNAL
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define FILEHDRSIZE 22
|
#define FILEHDRSIZE 22
|
||||||
@ -59,3 +63,9 @@ typedef struct lzh_fileHdr { /* 58 bytes */
|
|||||||
#define lz4 6
|
#define lz4 6
|
||||||
#define lz5 7
|
#define lz5 7
|
||||||
#define lzs 8
|
#define lzs 8
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void lzh (int kind);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,49 +1,38 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
|
#include "macbinary.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "globals.h"
|
#include "../fileio/kind.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/kind.h"
|
|
||||||
#include "zmahdr.h"
|
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "stf.h"
|
|
||||||
#include "mcb.h"
|
|
||||||
#include "bin.h"
|
#include "bin.h"
|
||||||
#include "dd.h"
|
#include "dd.h"
|
||||||
|
#include "dir.h"
|
||||||
|
#include "globals.h"
|
||||||
|
#include "mcb.h"
|
||||||
#include "sit.h"
|
#include "sit.h"
|
||||||
|
#include "stf.h"
|
||||||
|
#include "zmahdr.h"
|
||||||
|
#include "jdw.h"
|
||||||
|
#include "lzc.h"
|
||||||
|
#include "pit.h"
|
||||||
|
#include "dia.h"
|
||||||
|
#include "cpt.h"
|
||||||
|
#include "zma.h"
|
||||||
|
#include "lzh.h"
|
||||||
|
|
||||||
extern void dir(char *hdr);
|
|
||||||
#ifdef JDW
|
|
||||||
extern void jdw();
|
|
||||||
#endif /* JDW */
|
|
||||||
#ifdef LZC
|
|
||||||
extern void lzc();
|
|
||||||
#endif /* LZC */
|
|
||||||
#ifdef ASQ
|
#ifdef ASQ
|
||||||
extern void asq();
|
extern void asq();
|
||||||
#endif /* ASQ */
|
#endif /* ASQ */
|
||||||
#ifdef ARC
|
#ifdef ARC
|
||||||
extern void arc();
|
extern void arc();
|
||||||
#endif /* ARC */
|
#endif /* ARC */
|
||||||
#ifdef PIT
|
|
||||||
extern void pit();
|
|
||||||
#endif /* PIT */
|
|
||||||
#ifdef DIA
|
|
||||||
extern void dia();
|
|
||||||
#endif /* DIA */
|
|
||||||
#ifdef CPT
|
|
||||||
extern void cpt();
|
|
||||||
#endif /* CPT */
|
|
||||||
#ifdef ZMA
|
|
||||||
extern void zma();
|
|
||||||
#endif /* ZMA */
|
|
||||||
#ifdef LZH
|
|
||||||
extern void lzh();
|
|
||||||
#endif /* LZH */
|
|
||||||
|
|
||||||
static void skip_file();
|
static void skip_file(int skip);
|
||||||
#ifdef SCAN
|
#ifdef SCAN
|
||||||
static void get_idf();
|
static void get_idf(int kind);
|
||||||
#endif /* SCAN */
|
#endif /* SCAN */
|
||||||
|
|
||||||
#define Z (ZMAHDRS2 + 1)
|
#define Z (ZMAHDRS2 + 1)
|
||||||
|
1
macunpack/macbinary.h
Normal file
1
macunpack/macbinary.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
void macbinary (void);
|
@ -1,4 +1,7 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../util/patchlevel.h"
|
#include "../util/patchlevel.h"
|
||||||
@ -6,25 +9,15 @@
|
|||||||
#include "../fileio/wrfileopt.h"
|
#include "../fileio/wrfileopt.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "stf.h"
|
||||||
|
#include "pit.h"
|
||||||
|
#include "sit.h"
|
||||||
|
#include "cpt.h"
|
||||||
|
#include "macbinary.h"
|
||||||
|
|
||||||
#define LOCALOPT "ilvqVH"
|
#define LOCALOPT "ilvqVH"
|
||||||
|
|
||||||
extern char *strcat();
|
static void usage(void);
|
||||||
#ifdef STF
|
|
||||||
extern void stf();
|
|
||||||
#endif /* STF */
|
|
||||||
#ifdef PIT
|
|
||||||
extern void pit();
|
|
||||||
#endif /* PIT */
|
|
||||||
#ifdef SIT
|
|
||||||
extern void sit();
|
|
||||||
#endif /* SIT */
|
|
||||||
#ifdef CPT
|
|
||||||
extern void cpt();
|
|
||||||
#endif /* CPT */
|
|
||||||
void macbinary();
|
|
||||||
|
|
||||||
static void usage();
|
|
||||||
|
|
||||||
static char options[128];
|
static char options[128];
|
||||||
|
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
|
#include "mcb.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
|
|
||||||
static int mcb_read;
|
static int mcb_read;
|
||||||
|
|
||||||
static void mcb_wrfile();
|
static void mcb_wrfile(uint32_t ibytes);
|
||||||
|
|
||||||
void mcb(char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread)
|
void mcb(char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread)
|
||||||
{
|
{
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
extern void mcb(char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread);
|
extern void mcb(char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread);
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef PIT
|
#ifdef PIT
|
||||||
|
#define PIT_INTERNAL
|
||||||
|
#include "pit.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../fileio/wrfile.h"
|
|
||||||
#include "../fileio/fileglob.h"
|
#include "../fileio/fileglob.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
#include "globals.h"
|
|
||||||
#include "pit.h"
|
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "crc.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
#include "huffman.h"
|
#include "crc.h"
|
||||||
#include "de_huffman.h"
|
#include "de_huffman.h"
|
||||||
|
#include "globals.h"
|
||||||
|
#include "huffman.h"
|
||||||
|
|
||||||
static int pit_filehdr();
|
static int pit_filehdr(struct pit_header *f, int compr);
|
||||||
static void pit_wrfile();
|
static void pit_wrfile(uint32_t bytes, int type);
|
||||||
static void pit_nocomp();
|
static void pit_nocomp(uint32_t ibytes);
|
||||||
static void pit_huffman();
|
static void pit_huffman(uint32_t obytes);
|
||||||
|
|
||||||
void
|
void
|
||||||
pit (void)
|
pit (void)
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef PIT
|
||||||
|
#ifdef PIT_INTERNAL
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#define H_NAMELEN 63
|
#define H_NAMELEN 63
|
||||||
|
|
||||||
#define H_NLENOFF 0
|
#define H_NLENOFF 0
|
||||||
@ -30,3 +36,8 @@ struct pit_header { /* Packit file header (92 bytes) */
|
|||||||
#define nocomp 0
|
#define nocomp 0
|
||||||
#define huffman 1
|
#define huffman 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void pit (void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#ifdef SIT
|
#ifdef SIT
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "crc.h"
|
#include "crc.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
@ -11,6 +12,7 @@
|
|||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
#include "de_compress.h"
|
#include "de_compress.h"
|
||||||
#include "de_huffman.h"
|
#include "de_huffman.h"
|
||||||
@ -33,26 +35,26 @@ static struct methodinfo methods[] = {
|
|||||||
};
|
};
|
||||||
static int sit_nodeptr;
|
static int sit_nodeptr;
|
||||||
|
|
||||||
static int readsithdr();
|
static int readsithdr(sitHdr *s);
|
||||||
static int sit_filehdr();
|
static int sit_filehdr(struct sit_fileHdr *f, int skip);
|
||||||
static int sit_valid();
|
static int sit_valid(struct sit_fileHdr f);
|
||||||
static int sit_checkm();
|
static int sit_checkm(int f);
|
||||||
static char *sit_methname();
|
static char *sit_methname(int n);
|
||||||
static void sit_folder();
|
static void sit_folder(char *name);
|
||||||
static void sit_unstuff();
|
static void sit_unstuff(struct sit_fileHdr filehdr);
|
||||||
static void sit_wrfile();
|
static void sit_wrfile(uint32_t ibytes, uint32_t obytes, int type);
|
||||||
static void sit_skip();
|
static void sit_skip(uint32_t ibytes);
|
||||||
static void sit_nocomp();
|
static void sit_nocomp(uint32_t ibytes);
|
||||||
static void sit_rle();
|
static void sit_rle(uint32_t ibytes);
|
||||||
static void sit_lzc();
|
static void sit_lzc(uint32_t ibytes);
|
||||||
static void sit_huffman();
|
static void sit_huffman(uint32_t obytes);
|
||||||
static void sit_lzah();
|
static void sit_lzah(uint32_t obytes);
|
||||||
static unsigned char sit_getbyte();
|
static unsigned char sit_getbyte(void);
|
||||||
static void sit_fixhuf();
|
static void sit_fixhuf(uint32_t ibytes);
|
||||||
static void sit_dosplit();
|
static void sit_dosplit(int ptr, int sum, int low, int upp);
|
||||||
static void sit_mw();
|
static void sit_mw(uint32_t ibytes);
|
||||||
static void sit_mw_out();
|
static void sit_mw_out(int ptr);
|
||||||
static int sit_mw_in();
|
static int sit_mw_in(int bits, uint32_t *ibytes);
|
||||||
|
|
||||||
static short code6[258] = {
|
static short code6[258] = {
|
||||||
1024, 512, 256, 256, 256, 256, 128, 128,
|
1024, 512, 256, 256, 256, 256, 128, 128,
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef STF
|
#ifdef STF
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "stf.h"
|
#include "stf.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
#include "../util/curtime.h"
|
#include "../util/curtime.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "de_huffman.h"
|
||||||
extern void de_huffman();
|
|
||||||
extern void set_huffman();
|
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
int num;
|
int num;
|
||||||
@ -20,9 +20,9 @@ typedef struct{
|
|||||||
static table_struct table[511];
|
static table_struct table[511];
|
||||||
static char length[256];
|
static char length[256];
|
||||||
|
|
||||||
static void stf_wrfile();
|
static void stf_wrfile(uint32_t rsrcLength, uint32_t dataLength, uint32_t ibytes);
|
||||||
static void stf_wrfork();
|
static void stf_wrfork(uint32_t *num, uint32_t towrite, int offs);
|
||||||
static void stf_construct();
|
static void stf_construct(int n);
|
||||||
|
|
||||||
void
|
void
|
||||||
stf (uint32_t ibytes)
|
stf (uint32_t ibytes)
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
#include "macunpack.h"
|
#include "macunpack.h"
|
||||||
#ifdef ZMA
|
#ifdef ZMA
|
||||||
|
#define ZMA_INTERNAL
|
||||||
|
#include "zma.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "zma.h"
|
|
||||||
#include "crc.h"
|
#include "crc.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "de_lzah.h"
|
||||||
extern void de_lzh();
|
|
||||||
|
|
||||||
/* We do allow for possible backpointing, so we allocate the archive in core */
|
/* We do allow for possible backpointing, so we allocate the archive in core */
|
||||||
static char *zma_archive;
|
static char *zma_archive;
|
||||||
@ -20,12 +23,12 @@ static char *zma_filestart;
|
|||||||
static uint32_t zma_length;
|
static uint32_t zma_length;
|
||||||
static int32_t zma_archlength;
|
static int32_t zma_archlength;
|
||||||
|
|
||||||
static int zma_filehdr();
|
static int zma_filehdr(struct zma_fileHdr *f, int skip);
|
||||||
static void zma_folder();
|
static void zma_folder(struct zma_fileHdr fhdr);
|
||||||
static void zma_mooz();
|
static void zma_mooz(struct zma_fileHdr filehdr);
|
||||||
static void zma_wrfile();
|
static void zma_wrfile(uint32_t ibytes, uint32_t obytes, int type);
|
||||||
static void zma_nocomp();
|
static void zma_nocomp(uint32_t ibytes);
|
||||||
static void zma_lzh();
|
static void zma_lzh(uint32_t ibytes);
|
||||||
|
|
||||||
void
|
void
|
||||||
zma (char *start, uint32_t length)
|
zma (char *start, uint32_t length)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#include "macunpack.h"
|
||||||
|
#ifdef ZMA
|
||||||
|
#ifdef ZMA_INTERNAL
|
||||||
|
|
||||||
#include "zmahdr.h"
|
#include "zmahdr.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -53,3 +57,8 @@ typedef struct zma_fileHdr { /* 78 bytes */
|
|||||||
#define z_dir 3 /* directory */
|
#define z_dir 3 /* directory */
|
||||||
#define z_plug 4 /* for plug in, not supported */
|
#define z_plug 4 /* for plug in, not supported */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void zma (char *start, uint32_t length);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
|
#include "dir.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
|
|
||||||
static char *dir_stack;
|
static char *dir_stack;
|
||||||
|
1
mixed/dir.h
Normal file
1
mixed/dir.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
void dir(char *hdr);
|
@ -1,8 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
extern void exit();
|
|
||||||
extern void transname();
|
|
||||||
|
|
||||||
extern char info[];
|
extern char info[];
|
||||||
extern char text[];
|
extern char text[];
|
||||||
|
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
|
#include "macbinary.h"
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/kind.h"
|
#include "../fileio/kind.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "dir.h"
|
||||||
|
#include "mcb.h"
|
||||||
|
|
||||||
extern void dir();
|
|
||||||
extern void mcb();
|
|
||||||
extern void do_indent();
|
|
||||||
|
|
||||||
static void skip_file();
|
static void skip_file(int skip);
|
||||||
#ifdef SCAN
|
#ifdef SCAN
|
||||||
static void get_idf();
|
static void get_idf(int kind);
|
||||||
#endif /* SCAN */
|
#endif /* SCAN */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
1
mixed/macbinary.h
Normal file
1
mixed/macbinary.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
void macbinary (void);
|
@ -1,16 +1,17 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../util/patchlevel.h"
|
#include "../util/patchlevel.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../fileio/wrfileopt.h"
|
#include "../fileio/wrfileopt.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "macbinary.h"
|
||||||
|
|
||||||
#define LOCALOPT "ilqVH"
|
#define LOCALOPT "ilqVH"
|
||||||
|
|
||||||
void macbinary();
|
static void usage(void);
|
||||||
|
|
||||||
static void usage();
|
|
||||||
|
|
||||||
static char options[128];
|
static char options[128];
|
||||||
|
|
||||||
|
@ -9,11 +9,9 @@
|
|||||||
#include "../util/transname.h"
|
#include "../util/transname.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
|
||||||
extern void do_indent();
|
|
||||||
|
|
||||||
#define LOCALOPT "ilqVH"
|
#define LOCALOPT "ilqVH"
|
||||||
|
|
||||||
static void usage();
|
static void usage(void);
|
||||||
|
|
||||||
static char options[128];
|
static char options[128];
|
||||||
static char *dir_stack;
|
static char *dir_stack;
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
|
#include "mcb.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "../fileio/machdr.h"
|
#include "../fileio/machdr.h"
|
||||||
#include "../fileio/wrfile.h"
|
#include "../fileio/wrfile.h"
|
||||||
#include "../util/masks.h"
|
#include "../util/masks.h"
|
||||||
#include "../util/util.h"
|
#include "../util/util.h"
|
||||||
|
#include "../util/transname.h"
|
||||||
|
|
||||||
static int mcb_read;
|
static int mcb_read;
|
||||||
|
|
||||||
static void mcb_wrfile();
|
static void mcb_wrfile(uint32_t ibytes);
|
||||||
|
|
||||||
void
|
void
|
||||||
mcb (char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread)
|
mcb (char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread)
|
||||||
|
3
mixed/mcb.h
Normal file
3
mixed/mcb.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void mcb (char *hdr, uint32_t rsrcLength, uint32_t dataLength, int toread);
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#ifdef BSD
|
#ifdef BSD
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
extern time_t time();
|
|
||||||
#else /* BSD */
|
#else /* BSD */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif /* BSD */
|
#endif /* BSD */
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
typedef struct real_time {
|
typedef struct real_time {
|
||||||
int year;
|
int year;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user