mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
921 lines
26 KiB
Diff
921 lines
26 KiB
Diff
diff -Naur macutils.orig/binhex/binhex.c macutils/binhex/binhex.c
|
|
--- macutils.orig/binhex/binhex.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/binhex/binhex.c 2016-07-26 17:55:20.160706531 -0400
|
|
@@ -1,12 +1,16 @@
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+#include <unistd.h>
|
|
+
|
|
#include "../fileio/machdr.h"
|
|
#include "../fileio/rdfile.h"
|
|
#include "../util/patchlevel.h"
|
|
|
|
-extern char *malloc();
|
|
-extern char *realloc();
|
|
-extern char *strcat();
|
|
-extern void exit();
|
|
+extern int rdfileopt(char c);
|
|
+extern int do_query();
|
|
+extern void give_rdfileopt();
|
|
+extern char *get_rdfileopt();
|
|
extern void transname();
|
|
extern void do_indent();
|
|
extern void dofile();
|
|
diff -Naur macutils.orig/binhex/dofile.c macutils/binhex/dofile.c
|
|
--- macutils.orig/binhex/dofile.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/binhex/dofile.c 2016-07-26 17:42:21.590752572 -0400
|
|
@@ -1,3 +1,4 @@
|
|
+#include <stdio.h>
|
|
#include "../fileio/machdr.h"
|
|
#include "../fileio/rdfile.h"
|
|
|
|
diff -Naur macutils.orig/comm/frommac.c macutils/comm/frommac.c
|
|
--- macutils.orig/comm/frommac.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/comm/frommac.c 2016-07-26 17:47:31.237734261 -0400
|
|
@@ -1,4 +1,7 @@
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+#include <unistd.h>
|
|
#include "comm.h"
|
|
#include "../util/patchlevel.h"
|
|
#include "../fileio/machdr.h"
|
|
@@ -8,7 +11,14 @@
|
|
|
|
#define LOCALOPT "lmxyzoTVH"
|
|
|
|
-extern void exit();
|
|
+extern void cleanup();
|
|
+extern unsigned long get4();
|
|
+extern void transname(char *name, char *namebuf, int n);
|
|
+extern void xm_from();
|
|
+extern void give_wrfileopt();
|
|
+extern int wrfileopt();
|
|
+extern char *get_wrfileopt();
|
|
+extern void set_wrfileopt();
|
|
extern void setup_tty();
|
|
extern void reset_tty();
|
|
|
|
@@ -32,7 +42,7 @@
|
|
char fauth[5];
|
|
char ftype[5];
|
|
|
|
- set_wrfileopt(0);
|
|
+ set_wrfileopt(NULL);
|
|
(void)strcat(options, get_wrfileopt());
|
|
(void)strcat(options, LOCALOPT);
|
|
errflg = 0;
|
|
diff -Naur macutils.orig/comm/tomac.c macutils/comm/tomac.c
|
|
--- macutils.orig/comm/tomac.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/comm/tomac.c 2016-07-26 17:55:25.982706186 -0400
|
|
@@ -1,14 +1,19 @@
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+#include <unistd.h>
|
|
+
|
|
#include "comm.h"
|
|
#include "../fileio/machdr.h"
|
|
#include "../fileio/rdfile.h"
|
|
#include "../util/patchlevel.h"
|
|
#include "globals.h"
|
|
|
|
-extern char *malloc();
|
|
-extern char *realloc();
|
|
-extern char *strcat();
|
|
-extern void exit();
|
|
+extern int rdfileopt(char c);
|
|
+extern void give_rdfileopt();
|
|
+extern int do_query();
|
|
+extern char *get_rdfileopt();
|
|
+extern void xm_to();
|
|
extern void transname();
|
|
extern void do_indent();
|
|
extern void dofile();
|
|
diff -Naur macutils.orig/comm/tty.c macutils/comm/tty.c
|
|
--- macutils.orig/comm/tty.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/comm/tty.c 2016-07-26 17:38:25.120766555 -0400
|
|
@@ -1,4 +1,6 @@
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <unistd.h>
|
|
#include <signal.h>
|
|
#ifndef TERMIOS_H
|
|
#include <sgtty.h>
|
|
@@ -101,7 +103,7 @@
|
|
}
|
|
}
|
|
|
|
-tgetrec(buf, count, timeout)
|
|
+int tgetrec(buf, count, timeout)
|
|
char *buf;
|
|
int count, timeout;
|
|
{
|
|
diff -Naur macutils.orig/comm/xm_from.c macutils/comm/xm_from.c
|
|
--- macutils.orig/comm/xm_from.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/comm/xm_from.c 2016-07-26 17:47:36.283733962 -0400
|
|
@@ -7,6 +7,14 @@
|
|
#include "globals.h"
|
|
#include "protocol.h"
|
|
|
|
+extern void cleanup();
|
|
+extern unsigned long get4();
|
|
+extern void transname(char *name, char *namebuf, int n);
|
|
+extern void xm_from();
|
|
+extern void give_wrfileopt();
|
|
+extern int wrfileopt();
|
|
+extern char *get_wrfileopt();
|
|
+extern void set_wrfileopt();
|
|
extern int tgetc();
|
|
extern int tgetrec();
|
|
extern void tputc();
|
|
diff -Naur macutils.orig/comm/xm_to.c macutils/comm/xm_to.c
|
|
--- macutils.orig/comm/xm_to.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/comm/xm_to.c 2016-07-26 17:48:50.800729556 -0400
|
|
@@ -6,6 +6,7 @@
|
|
#include "globals.h"
|
|
#include "protocol.h"
|
|
|
|
+extern void cleanup();
|
|
extern int tgetc();
|
|
extern void tputc();
|
|
extern void tputrec();
|
|
diff -Naur macutils.orig/crc/makecrc.c macutils/crc/makecrc.c
|
|
--- macutils.orig/crc/makecrc.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/crc/makecrc.c 2016-07-26 16:51:07.862934338 -0400
|
|
@@ -37,7 +37,7 @@
|
|
|
|
static void initcrctab();
|
|
|
|
-main()
|
|
+int main(int argc, char **argv)
|
|
{
|
|
initcrctab("ccitt", 0x1021, 0xffff, 0, 16);
|
|
initcrctab("kermit", 0x8408, 0, 1, 16);
|
|
diff -Naur macutils.orig/fileio/rdfile.c macutils/fileio/rdfile.c
|
|
--- macutils.orig/fileio/rdfile.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/fileio/rdfile.c 2016-07-26 17:54:58.750707797 -0400
|
|
@@ -1,3 +1,8 @@
|
|
+#include <stdlib.h>
|
|
+#include <unistd.h>
|
|
+#include <string.h>
|
|
+#include <strings.h>
|
|
+
|
|
#include <stdio.h>
|
|
#ifdef TYPES_H
|
|
#include <sys/types.h>
|
|
@@ -42,13 +47,6 @@
|
|
#define RSRC_FORMAT 2
|
|
#define UNIX_FORMAT 3
|
|
|
|
-extern char *malloc();
|
|
-extern char *realloc();
|
|
-extern char *strcpy();
|
|
-extern char *strncpy();
|
|
-extern char *strcat();
|
|
-extern void exit();
|
|
-
|
|
static void check_files();
|
|
static void read_file();
|
|
static void enter_dir();
|
|
@@ -937,8 +935,7 @@
|
|
return ISFILE;
|
|
}
|
|
|
|
-int rdfileopt(c)
|
|
-char c;
|
|
+int rdfileopt(char c)
|
|
{
|
|
extern char *optarg;
|
|
char name[32];
|
|
diff -Naur macutils.orig/fileio/rdfileopt.h macutils/fileio/rdfileopt.h
|
|
--- macutils.orig/fileio/rdfileopt.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/fileio/rdfileopt.h 2016-07-26 17:55:10.056707128 -0400
|
|
@@ -1,4 +1,4 @@
|
|
-extern int rdfileopt();
|
|
+extern int rdfileopt(char c);
|
|
extern void give_rdfileopt();
|
|
extern void set_norecurse();
|
|
extern char *get_rdfileopt();
|
|
diff -Naur macutils.orig/fileio/wrfile.c macutils/fileio/wrfile.c
|
|
--- macutils.orig/fileio/wrfile.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/fileio/wrfile.c 2016-07-26 16:51:07.834934340 -0400
|
|
@@ -1,3 +1,8 @@
|
|
+#include <stdlib.h>
|
|
+#include <unistd.h>
|
|
+#include <string.h>
|
|
+#include <strings.h>
|
|
+
|
|
#ifdef TYPES_H
|
|
#include <sys/types.h>
|
|
#endif /* TYPES_H */
|
|
@@ -35,13 +40,6 @@
|
|
#define MACI 9
|
|
#endif /* SCAN */
|
|
|
|
-extern char *malloc();
|
|
-extern char *realloc();
|
|
-extern char *strcpy();
|
|
-extern char *strncpy();
|
|
-extern char *strcat();
|
|
-extern void exit();
|
|
-
|
|
#ifdef UNDEF /* Do not declare sprintf; not portable (but lint will complain) */
|
|
char *sprintf();
|
|
#endif /* UNDEF */
|
|
@@ -802,12 +800,12 @@
|
|
#endif /* APPLESHARE */
|
|
}
|
|
|
|
-void set_wrfileopt(restricted)
|
|
+void set_wrfileopt(int restricted)
|
|
{
|
|
mode_restricted = restricted;
|
|
}
|
|
|
|
-void set_s_wrfileopt(restricted)
|
|
+void set_s_wrfileopt(int restricted)
|
|
{
|
|
mode_s_restricted = restricted;
|
|
}
|
|
diff -Naur macutils.orig/hexbin/dl.c macutils/hexbin/dl.c
|
|
--- macutils.orig/hexbin/dl.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/dl.c 2016-07-26 16:52:49.438928331 -0400
|
|
@@ -121,7 +121,7 @@
|
|
static int nextc()
|
|
{
|
|
while(*icp == 0) {
|
|
- if(readline() == 0) {
|
|
+ if(readlin() == 0) {
|
|
return EOF;
|
|
}
|
|
icp = &line[0];
|
|
diff -Naur macutils.orig/hexbin/globals.h macutils/hexbin/globals.h
|
|
--- macutils.orig/hexbin/globals.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/globals.h 2016-07-26 17:00:38.894900570 -0400
|
|
@@ -13,7 +13,7 @@
|
|
extern char info[];
|
|
extern char trname[];
|
|
|
|
-typedef struct macheader {
|
|
+struct macheader {
|
|
char m_name[128];
|
|
char m_type[4];
|
|
char m_author[4];
|
|
diff -Naur macutils.orig/hexbin/hecx.c macutils/hexbin/hecx.c
|
|
--- macutils.orig/hexbin/hecx.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/hecx.c 2016-07-26 16:52:54.543928029 -0400
|
|
@@ -104,7 +104,7 @@
|
|
|
|
set_put(0);
|
|
set_put(1);
|
|
- while(!found_crc && readline()) {
|
|
+ while(!found_crc && readlin()) {
|
|
if(line[0] == 0) {
|
|
continue;
|
|
}
|
|
@@ -155,7 +155,7 @@
|
|
{
|
|
register long nbytes = 0L;
|
|
|
|
- while(readline()) {
|
|
+ while(readlin()) {
|
|
if(line[0] == 0) {
|
|
continue;
|
|
}
|
|
diff -Naur macutils.orig/hexbin/hexbin.c macutils/hexbin/hexbin.c
|
|
--- macutils.orig/hexbin/hexbin.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/hexbin.c 2016-07-26 17:27:05.668806735 -0400
|
|
@@ -1,3 +1,5 @@
|
|
+#include <unistd.h>
|
|
+
|
|
#ifdef TYPES_H
|
|
#include <sys/types.h>
|
|
#endif /* TYPES_H */
|
|
@@ -294,7 +296,7 @@
|
|
/* or for "begin " */
|
|
/* dl format starts with a line containing only the symbols '@' to 'O',
|
|
or '|'. */
|
|
- while(readline()) {
|
|
+ while(readlin()) {
|
|
llen = strlen(line);
|
|
#ifdef HQX
|
|
if((strncmp(line, "(This file", 10) == 0) ||
|
|
@@ -329,7 +331,7 @@
|
|
(void)fprintf(stderr, "Skip:%s\n", line);
|
|
}
|
|
}
|
|
- while(readline()) {
|
|
+ while(readlin()) {
|
|
switch (line[0]) {
|
|
#ifdef HQX
|
|
case ':':
|
|
diff -Naur macutils.orig/hexbin/hqx.c macutils/hexbin/hqx.c
|
|
--- macutils.orig/hexbin/hqx.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/hqx.c 2016-07-26 17:36:56.467771798 -0400
|
|
@@ -16,7 +16,7 @@
|
|
static int getq();
|
|
static long get2q();
|
|
static long get4q();
|
|
-static getqbuf();
|
|
+static void getqbuf(char *buf, int n);
|
|
|
|
static char *g_macname;
|
|
|
|
@@ -150,7 +150,7 @@
|
|
*out = 0;
|
|
(void)fprintf(stderr, "Skip:%s\n", line);
|
|
}
|
|
- if(readline()) {
|
|
+ if(readlin()) {
|
|
continue;
|
|
} else {
|
|
break;
|
|
@@ -214,7 +214,7 @@
|
|
}
|
|
} while(++in < out);
|
|
if(!stop) {
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
break;
|
|
}
|
|
}
|
|
@@ -380,9 +380,7 @@
|
|
}
|
|
|
|
/* getqbuf(); q format -- read n characters from input into buf */
|
|
-static getqbuf(buf, n)
|
|
- char *buf;
|
|
- int n;
|
|
+static void getqbuf(char *buf, int n)
|
|
{
|
|
int i;
|
|
|
|
diff -Naur macutils.orig/hexbin/mu.c macutils/hexbin/mu.c
|
|
--- macutils.orig/hexbin/mu.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/mu.c 2016-07-26 16:53:11.549927024 -0400
|
|
@@ -53,7 +53,7 @@
|
|
set_put(1);
|
|
do_mu_fork();
|
|
mh.m_datalen = data_size;
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
(void)fprintf(stderr, "Premature EOF\n");
|
|
#ifdef SCAN
|
|
do_error("hexbin: Premature EOF");
|
|
@@ -71,7 +71,7 @@
|
|
set_put(0);
|
|
do_mu_fork();
|
|
mh.m_rsrclen = rsrc_size;
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
(void)fprintf(stderr, "Premature EOF\n");
|
|
#ifdef SCAN
|
|
do_error("hexbin: Premature EOF");
|
|
@@ -95,7 +95,7 @@
|
|
#endif /* SCAN */
|
|
exit(1);
|
|
}
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
(void)fprintf(stderr, "Premature EOF\n");
|
|
#ifdef SCAN
|
|
do_error("hexbin: Premature EOF");
|
|
@@ -103,7 +103,7 @@
|
|
exit(1);
|
|
}
|
|
(void)mu_convert(line, info + I_TYPEOFF);
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
(void)fprintf(stderr, "Premature EOF\n");
|
|
#ifdef SCAN
|
|
do_error("hexbin: Premature EOF");
|
|
@@ -117,7 +117,7 @@
|
|
#endif /* SCAN */
|
|
exit(1);
|
|
}
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
(void)fprintf(stderr, "Premature EOF\n");
|
|
#ifdef SCAN
|
|
do_error("hexbin: Premature EOF");
|
|
@@ -147,7 +147,7 @@
|
|
{
|
|
long newbytes;
|
|
|
|
- while(readline()) {
|
|
+ while(readlin()) {
|
|
if(line[0] == 0) {
|
|
continue;
|
|
}
|
|
@@ -155,7 +155,7 @@
|
|
if(newbytes != 0) {
|
|
continue;
|
|
}
|
|
- if(!readline()) {
|
|
+ if(!readlin()) {
|
|
(void)fprintf(stderr, "Premature EOF\n");
|
|
#ifdef SCAN
|
|
do_error("hexbin: Premature EOF");
|
|
diff -Naur macutils.orig/hexbin/printhdr.c macutils/hexbin/printhdr.c
|
|
--- macutils.orig/hexbin/printhdr.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/printhdr.c 2016-07-26 17:30:03.293796231 -0400
|
|
@@ -33,7 +33,7 @@
|
|
}
|
|
|
|
/* print out header information in human-readable format */
|
|
-void print_header2(skip)
|
|
+void print_header2(int skip)
|
|
{
|
|
if(listmode) {
|
|
if(skip) {
|
|
diff -Naur macutils.orig/hexbin/readline.c macutils/hexbin/readline.c
|
|
--- macutils.orig/hexbin/readline.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/readline.c 2016-07-26 16:54:59.245920655 -0400
|
|
@@ -6,7 +6,7 @@
|
|
/* Read a line. Allow termination by CR or LF or both. Also allow for
|
|
a non-terminated line at end-of-file. Returns 1 if a line is read,
|
|
0 otherwise. */
|
|
-int readline()
|
|
+int readlin(void)
|
|
{
|
|
int ptr = 0, c;
|
|
|
|
diff -Naur macutils.orig/hexbin/readline.h macutils/hexbin/readline.h
|
|
--- macutils.orig/hexbin/readline.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/hexbin/readline.h 2016-07-26 16:55:06.138920247 -0400
|
|
@@ -1,2 +1,3 @@
|
|
extern char line[];
|
|
+int readlin(void);
|
|
|
|
diff -Naur macutils.orig/macunpack/arc.h macutils/macunpack/arc.h
|
|
--- macutils.orig/macunpack/arc.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/arc.h 2016-07-26 16:57:30.503911710 -0400
|
|
@@ -18,7 +18,7 @@
|
|
#define SIZE2 84 /* Not present if KIND == 1 */
|
|
#define HEADERBYTES 88
|
|
|
|
-typedef struct fileHdr { /* 84 or 88 bytes */
|
|
+struct fileHdr { /* 84 or 88 bytes */
|
|
char magic1;
|
|
char kind;
|
|
char fname[31];
|
|
diff -Naur macutils.orig/macunpack/bin.c macutils/macunpack/bin.c
|
|
--- macutils.orig/macunpack/bin.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/bin.c 2016-07-26 16:51:07.844934339 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef BIN
|
|
#include "globals.h"
|
|
diff -Naur macutils.orig/macunpack/cpt.c macutils/macunpack/cpt.c
|
|
--- macutils.orig/macunpack/cpt.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/cpt.c 2016-07-26 17:26:35.886808496 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef DD
|
|
#ifndef CPT
|
|
@@ -21,9 +25,7 @@
|
|
#define ESC1SEEN 1
|
|
#define ESC2SEEN 2
|
|
|
|
-extern char *malloc();
|
|
-extern char *realloc();
|
|
-extern int free();
|
|
+extern int gethuffbyte(node *l_nodelist);
|
|
|
|
static void cpt_uncompact();
|
|
static unsigned char *cpt_data;
|
|
diff -Naur macutils.orig/macunpack/cpt.h macutils/macunpack/cpt.h
|
|
--- macutils.orig/macunpack/cpt.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/cpt.h 2016-07-26 16:57:44.985910854 -0400
|
|
@@ -31,7 +31,7 @@
|
|
|
|
typedef long OSType;
|
|
|
|
-typedef struct cptHdr { /* 8 bytes */
|
|
+struct cptHdr { /* 8 bytes */
|
|
unsigned char signature; /* = 1 -- for verification */
|
|
unsigned char volume; /* for multi-file archives */
|
|
unsigned short xmagic; /* verification multi-file consistency*/
|
|
@@ -42,7 +42,7 @@
|
|
unsigned char commentsize; /* number of bytes comment that follow*/
|
|
};
|
|
|
|
-typedef struct fileHdr { /* 78 bytes */
|
|
+struct fileHdr { /* 78 bytes */
|
|
unsigned char fName[32]; /* a STR32 */
|
|
unsigned char folder; /* set to 1 if a folder */
|
|
unsigned short foldersize; /* number of entries in folder */
|
|
diff -Naur macutils.orig/macunpack/dd.c macutils/macunpack/dd.c
|
|
--- macutils.orig/macunpack/dd.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/dd.c 2016-07-26 17:00:22.699901527 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef DD
|
|
#include "globals.h"
|
|
@@ -9,10 +13,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();
|
|
@@ -45,7 +45,7 @@
|
|
#endif /* UNTESTED */
|
|
static void dd_cpt_compat();
|
|
|
|
-typedef struct methodinfo {
|
|
+struct methodinfo {
|
|
char *name;
|
|
int number;
|
|
};
|
|
diff -Naur macutils.orig/macunpack/dd.h macutils/macunpack/dd.h
|
|
--- macutils.orig/macunpack/dd.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/dd.h 2016-07-26 16:58:00.644909928 -0400
|
|
@@ -52,7 +52,7 @@
|
|
|
|
typedef long OSType;
|
|
|
|
-typedef struct fileHdr { /* 124 bytes */
|
|
+struct fileHdr { /* 124 bytes */
|
|
unsigned char magic[4]; /* "DDAR" */
|
|
unsigned char fill1[4]; /* ??? */
|
|
unsigned char fName[64]; /* a STR63 */
|
|
@@ -73,7 +73,7 @@
|
|
unsigned short hdrcrc; /* true crc */
|
|
};
|
|
|
|
-typedef struct fileCHdr { /* 84 bytes */
|
|
+struct fileCHdr { /* 84 bytes */
|
|
unsigned char magic[4]; /* "\253\315\000\124" */
|
|
unsigned long dataLength; /* lengths */
|
|
unsigned long dataCLength;
|
|
diff -Naur macutils.orig/macunpack/de_huffman.c macutils/macunpack/de_huffman.c
|
|
--- macutils.orig/macunpack/de_huffman.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/de_huffman.c 2016-07-26 17:26:18.568809520 -0400
|
|
@@ -21,6 +21,7 @@
|
|
#include "huffman.h"
|
|
#include "../util/util.h"
|
|
|
|
+int gethuffbyte(node *l_nodelist);
|
|
int (*get_bit)();
|
|
int bytesread;
|
|
/* 515 because StuffIt Classic needs more than the needed 511 */
|
|
@@ -121,8 +122,7 @@
|
|
bit = 0;
|
|
}
|
|
|
|
-int gethuffbyte(l_nodelist)
|
|
-node *l_nodelist;
|
|
+int gethuffbyte(node *l_nodelist)
|
|
{
|
|
register node *np;
|
|
|
|
diff -Naur macutils.orig/macunpack/dia.c macutils/macunpack/dia.c
|
|
--- macutils.orig/macunpack/dia.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/dia.c 2016-07-26 16:51:07.858934338 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef DIA
|
|
#include "globals.h"
|
|
@@ -9,9 +13,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 -Naur macutils.orig/macunpack/dir.c macutils/macunpack/dir.c
|
|
--- macutils.orig/macunpack/dir.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/dir.c 2016-07-26 16:51:07.837934339 -0400
|
|
@@ -1,12 +1,13 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#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 -Naur macutils.orig/macunpack/jdw.h macutils/macunpack/jdw.h
|
|
--- macutils.orig/macunpack/jdw.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/jdw.h 2016-07-26 16:58:11.849909265 -0400
|
|
@@ -8,7 +8,7 @@
|
|
#define J_MTIME 34
|
|
#define J_FLENGTH 38
|
|
|
|
-typedef struct fileHdr {
|
|
+struct fileHdr {
|
|
char magic[6];
|
|
unsigned long type;
|
|
unsigned long auth;
|
|
diff -Naur macutils.orig/macunpack/lzc.c macutils/macunpack/lzc.c
|
|
--- macutils.orig/macunpack/lzc.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/lzc.c 2016-07-26 16:51:07.850934339 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef LZC
|
|
#include "globals.h"
|
|
diff -Naur macutils.orig/macunpack/lzc.h macutils/macunpack/lzc.h
|
|
--- macutils.orig/macunpack/lzc.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/lzc.h 2016-07-26 16:58:14.539909106 -0400
|
|
@@ -12,7 +12,7 @@
|
|
#define C_AUTHOFF 36
|
|
#define C_FLAGOFF 40
|
|
|
|
-typedef struct fileHdr {
|
|
+struct fileHdr {
|
|
unsigned long magic1;
|
|
unsigned long dataLength;
|
|
unsigned long dataCLength;
|
|
diff -Naur macutils.orig/macunpack/lzh.c macutils/macunpack/lzh.c
|
|
--- macutils.orig/macunpack/lzh.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/lzh.c 2016-07-26 17:00:03.358902671 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef LZH
|
|
#include "globals.h"
|
|
@@ -17,13 +21,11 @@
|
|
#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();
|
|
|
|
-typedef struct methodinfo {
|
|
+struct methodinfo {
|
|
char *name;
|
|
int number;
|
|
};
|
|
diff -Naur macutils.orig/macunpack/lzh.h macutils/macunpack/lzh.h
|
|
--- macutils.orig/macunpack/lzh.h 2016-07-26 15:54:52.088133966 -0400
|
|
+++ macutils/macunpack/lzh.h 2016-07-26 16:58:19.748908798 -0400
|
|
@@ -30,7 +30,7 @@
|
|
#define L_EEXTENDSZ 0
|
|
#define L_EEXTEND 1
|
|
|
|
-typedef struct fileHdr { /* 58 bytes */
|
|
+struct fileHdr { /* 58 bytes */
|
|
unsigned char hsize;
|
|
unsigned char hcrc;
|
|
char method[5];
|
|
diff -Naur macutils.orig/macunpack/macbinary.c macutils/macunpack/macbinary.c
|
|
--- macutils.orig/macunpack/macbinary.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/macbinary.c 2016-07-26 16:51:07.852934339 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#include "globals.h"
|
|
#include "../fileio/machdr.h"
|
|
diff -Naur macutils.orig/macunpack/macunpack.c macutils/macunpack/macunpack.c
|
|
--- macutils.orig/macunpack/macunpack.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/macunpack.c 2016-07-26 16:51:07.860934338 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#include "globals.h"
|
|
#include "../util/patchlevel.h"
|
|
diff -Naur macutils.orig/macunpack/pit.c macutils/macunpack/pit.c
|
|
--- macutils.orig/macunpack/pit.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/pit.c 2016-07-26 17:25:03.450813963 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef PIT
|
|
#include "../fileio/wrfile.h"
|
|
@@ -11,6 +15,7 @@
|
|
#include "../util/util.h"
|
|
#include "huffman.h"
|
|
|
|
+extern int getihuffbyte();
|
|
extern void read_tree();
|
|
extern void de_huffman();
|
|
extern void set_huffman();
|
|
diff -Naur macutils.orig/macunpack/sit.c macutils/macunpack/sit.c
|
|
--- macutils.orig/macunpack/sit.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/sit.c 2016-07-26 16:59:50.894903408 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef SIT
|
|
#include "globals.h"
|
|
@@ -19,7 +23,7 @@
|
|
extern void de_lzah();
|
|
extern unsigned char (*lzah_getbyte)();
|
|
|
|
-typedef struct methodinfo {
|
|
+struct methodinfo {
|
|
char *name;
|
|
int number;
|
|
};
|
|
diff -Naur macutils.orig/macunpack/sit.h macutils/macunpack/sit.h
|
|
--- macutils.orig/macunpack/sit.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/sit.h 2016-07-26 16:58:35.482907868 -0400
|
|
@@ -24,7 +24,7 @@
|
|
|
|
typedef long OSType;
|
|
|
|
-typedef struct sitHdr { /* 22 bytes */
|
|
+struct sitHdr { /* 22 bytes */
|
|
OSType signature; /* = 'SIT!' -- for verification */
|
|
unsigned short numFiles; /* number of files in archive */
|
|
unsigned long arcLength; /* length of entire archive incl.
|
|
@@ -34,7 +34,7 @@
|
|
char reserved[7];
|
|
};
|
|
|
|
-typedef struct fileHdr { /* 112 bytes */
|
|
+struct fileHdr { /* 112 bytes */
|
|
unsigned char compRMethod; /* rsrc fork compression method */
|
|
unsigned char compDMethod; /* data fork compression method */
|
|
unsigned char fName[64]; /* a STR63 */
|
|
diff -Naur macutils.orig/macunpack/stf.c macutils/macunpack/stf.c
|
|
--- macutils.orig/macunpack/stf.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/stf.c 2016-07-26 16:51:07.846934339 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef STF
|
|
#include "stf.h"
|
|
diff -Naur macutils.orig/macunpack/stf.h macutils/macunpack/stf.h
|
|
--- macutils.orig/macunpack/stf.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/stf.h 2016-07-26 16:58:39.630907622 -0400
|
|
@@ -5,7 +5,7 @@
|
|
#define S_RSRCLNGTH 3 /* + NAMELENGTH */
|
|
#define S_DATALNGTH 7 /* + NAMELENGTH */
|
|
|
|
-typedef struct fileHdr {
|
|
+struct fileHdr {
|
|
char magic[3];
|
|
char flength;
|
|
char fname[32]; /* actually flength */
|
|
diff -Naur macutils.orig/macunpack/zma.c macutils/macunpack/zma.c
|
|
--- macutils.orig/macunpack/zma.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/zma.c 2016-07-26 16:51:07.849934339 -0400
|
|
@@ -1,3 +1,7 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+
|
|
#include "macunpack.h"
|
|
#ifdef ZMA
|
|
#include "globals.h"
|
|
@@ -9,8 +13,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 -Naur macutils.orig/macunpack/zma.h macutils/macunpack/zma.h
|
|
--- macutils.orig/macunpack/zma.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/macunpack/zma.h 2016-07-26 16:58:44.491907335 -0400
|
|
@@ -20,7 +20,7 @@
|
|
#define Z_RCRC 44 /* Resource crc */
|
|
#define Z_FNAME 46 /* File name length and name */
|
|
|
|
-typedef struct fileHdr { /* 78 bytes */
|
|
+struct fileHdr { /* 78 bytes */
|
|
char deleted; /* Not in original, split off from: */
|
|
char what; /* What kind? Negative if deleted */
|
|
unsigned char hlen ; /* Header length */
|
|
diff -Naur macutils.orig/mixed/dir.c macutils/mixed/dir.c
|
|
--- macutils.orig/mixed/dir.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/mixed/dir.c 2016-07-26 17:30:42.603793907 -0400
|
|
@@ -1,12 +1,11 @@
|
|
+#include <stdlib.h>
|
|
+
|
|
#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 -Naur macutils.orig/mixed/macsave.c macutils/mixed/macsave.c
|
|
--- macutils.orig/mixed/macsave.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/mixed/macsave.c 2016-07-26 17:29:26.534798405 -0400
|
|
@@ -1,3 +1,6 @@
|
|
+#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+
|
|
#include "globals.h"
|
|
#include "../util/patchlevel.h"
|
|
#include "../fileio/wrfile.h"
|
|
diff -Naur macutils.orig/mixed/macstream.c macutils/mixed/macstream.c
|
|
--- macutils.orig/mixed/macstream.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/mixed/macstream.c 2016-07-26 17:56:05.677703839 -0400
|
|
@@ -1,13 +1,13 @@
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
+#include <unistd.h>
|
|
#include "../fileio/machdr.h"
|
|
#include "../fileio/rdfile.h"
|
|
#include "../fileio/rdfileopt.h"
|
|
#include "../util/patchlevel.h"
|
|
|
|
-extern char *malloc();
|
|
-extern char *realloc();
|
|
-extern char *strcat();
|
|
-extern void exit();
|
|
+extern int do_query();
|
|
extern void transname();
|
|
extern void do_indent();
|
|
|
|
diff -Naur macutils.orig/util/backtrans.c macutils/util/backtrans.c
|
|
--- macutils.orig/util/backtrans.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/util/backtrans.c 2016-07-26 16:51:07.782934343 -0400
|
|
@@ -54,8 +54,7 @@
|
|
0277, 0235, 0234, 0236, 0237, '_', '_', 0330};
|
|
#endif /* LATIN1 */
|
|
|
|
-void backtrans(macname, name)
|
|
-char *macname, *name;
|
|
+void backtrans(char *macname, char *name)
|
|
{
|
|
char *in, *out;
|
|
int c, count = 0;
|
|
diff -Naur macutils.orig/util/util.c macutils/util/util.c
|
|
--- macutils.orig/util/util.c 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/util/util.c 2016-07-26 16:51:07.782934343 -0400
|
|
@@ -1,4 +1,5 @@
|
|
#include <stdio.h>
|
|
+#include <unistd.h>
|
|
#include "../fileio/fileglob.h"
|
|
#include "masks.h"
|
|
#include "util.h"
|
|
diff -Naur macutils.orig/util/util.h macutils/util/util.h
|
|
--- macutils.orig/util/util.h 1993-10-02 16:16:00.000000000 -0400
|
|
+++ macutils/util/util.h 2016-07-26 16:51:07.782934343 -0400
|
|
@@ -20,4 +20,5 @@
|
|
extern real_time set_time();
|
|
extern unsigned long tomactime();
|
|
extern real_time frommactime();
|
|
+extern void backtrans(char *macname, char *name);
|
|
|