First batch of conversion to using prototypes

This commit is contained in:
Arvid Norlander 2022-09-29 22:41:24 +02:00
parent a07435fd95
commit 84b38a61b5
No known key found for this signature in database
GPG Key ID: E824A8E5D8D29AA0
69 changed files with 723 additions and 690 deletions

View File

@ -7,10 +7,8 @@
#include "../fileio/rdfileopt.h"
#include "../util/patchlevel.h"
#include "../util/util.h"
extern void transname();
extern void do_indent();
extern void dofile();
#include "../util/transname.h"
#include "dofile.h"
#define LOCALOPT "RilqVH"
@ -25,8 +23,6 @@ int dorep = 1;
int main(int argc, char **argv)
{
int c, i, j, n;
extern int optind;
extern char *optarg;
int errflg;
char text[32], ftype[5], fauth[5];
int dir_skip = 0, write_it, query = 0, list = 0, info_only = 0;
@ -165,7 +161,8 @@ int main(int argc, char **argv)
/* NOTREACHED */
}
static void usage()
static void
usage (void)
{
(void)fprintf(stderr, "Usage: binhex [-%s] [files]\n", options);
(void)fprintf(stderr, "Use \"binhex -H\" for help.\n");

View File

@ -1,3 +1,4 @@
#include "dofile.h"
#include <stdio.h>
#include "../fileio/machdr.h"
#include "../fileio/rdfile.h"
@ -23,7 +24,8 @@ void outbyte1();
void out6bit();
void outchar();
void dofile()
void
dofile (void)
{
(void)printf("(This file must be converted; you knew that already.)\n");
(void)printf("\n");
@ -40,7 +42,8 @@ void dofile()
(void)putchar('\n');
}
void doheader()
void
doheader (void)
{
uint32_t crc;
int i, n;
@ -78,9 +81,8 @@ int i, n;
outbyte((int)(crc & 0xff));
}
void dofork(fork, size)
char *fork;
int size;
void
dofork (char *fork, int size)
{
uint32_t crc;
int i;
@ -93,8 +95,8 @@ int i;
outbyte((int)(crc & 0xff));
}
void outbyte(b)
int b;
void
outbyte (int b)
{
b &= 0xff;
if(dorep && (b == rep_char)) {
@ -126,7 +128,8 @@ int b;
}
}
void finish()
void
finish (void)
{
if(rep_count > 0) {
if(rep_count > 3) {
@ -150,8 +153,8 @@ void finish()
}
}
void outbyte1(b)
int b;
void
outbyte1 (int b)
{
switch(state) {
case 0:
@ -174,14 +177,14 @@ int b;
}
}
void out6bit(c)
char c;
void
out6bit (int c)
{
outchar(codes[c & 0x3f]);
}
void outchar(c)
char c;
void
outchar (int c)
{
(void)putchar(c);
if(++pos_ptr > 64) {

1
binhex/dofile.h Normal file
View File

@ -0,0 +1 @@
void dofile (void);

View File

@ -8,6 +8,7 @@
#include "../util/util.h"
#include "../fileio/machdr.h"
#include "globals.h"
#include "tty.h"
#include "../fileio/fileglob.h"
#include "../fileio/wrfile.h"
#include "../fileio/wrfileopt.h"
@ -17,9 +18,6 @@
#define LOCALOPT "lmxyzoTVH"
extern void setup_tty();
extern void reset_tty();
extern char info[];
static void usage();
@ -30,8 +28,6 @@ static int listmode = 0;
int main(int argc, char **argv)
{
extern int optind;
extern char *optarg;
int errflg;
int c;
char tname[64];
@ -165,7 +161,8 @@ int main(int argc, char **argv)
/* NOTREACHED */
}
static void usage()
static void
usage (void)
{
(void)fprintf(stderr, "Usage: frommac [-%s]\n", options);
(void)fprintf(stderr, "Use \"frommac -H\" for help.\n");

View File

@ -8,17 +8,13 @@
#include "../fileio/rdfileopt.h"
#include "../util/patchlevel.h"
#include "../util/util.h"
#include "../util/transname.h"
#include "globals.h"
#include "tty.h"
#ifdef XM
#include "xm_to.h"
#endif /* XM */
extern void transname();
extern void do_indent();
extern void dofile();
extern void setup_tty();
extern void reset_tty();
#define LOCALOPT "ilqxyzoTVH"
static void usage();
@ -31,8 +27,6 @@ static int dir_max;
int main(int argc, char **argv)
{
int c, i, j, n;
extern int optind;
extern char *optarg;
int errflg;
char text[32], ftype[5], fauth[5];
int dir_skip = 0, write_it, query = 0, list = 0, info_only = 0;
@ -236,7 +230,8 @@ int main(int argc, char **argv)
/* NOTREACHED */
}
static void usage()
static void
usage (void)
{
(void)fprintf(stderr, "Usage: tomac [-%s] [files]\n", options);
(void)fprintf(stderr, "Use \"tomac -H\" for help.\n");

View File

@ -1,3 +1,4 @@
#include "tty.h"
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
@ -12,10 +13,7 @@
#include "protocol.h"
#include "globals.h"
void cleanup();
void timedout();
int tgetc();
void tputc();
void timedout(int);
static jmp_buf timobuf;
@ -27,7 +25,8 @@ static struct termios otty, ntty;
static int ttyfd;
static int signal_set;
void setup_tty()
void
setup_tty (void)
{
ttyfd = fileno(stderr);
if(!signal_set) {
@ -58,7 +57,8 @@ void setup_tty()
#endif /* TERMIOS_H */
}
void reset_tty()
void
reset_tty (void)
{
(void)sleep(1); /* Wait for output to drain */
#ifndef TERMIOS_H
@ -74,14 +74,15 @@ void cleanup(int sig)
exit(sig);
}
void timedout()
void
timedout (int)
{
(void)signal(SIGALRM, timedout);
longjmp(timobuf, 1);
}
int tgetc(timeout)
int timeout;
int
tgetc (int timeout)
{
char c;
int i;
@ -136,9 +137,8 @@ void tputc(int c)
(void)write(ttyfd, &cc, 1);
}
void tputrec(buf, count)
char *buf;
int count;
void
tputrec (char *buf, int count)
{
(void)write(ttyfd, buf, count);
}

View File

@ -1 +1,7 @@
void cleanup(int sig);
void reset_tty (void);
void setup_tty (void);
int tgetrec(char *buf, int count, int timeout);
int tgetc (int timeout);
void tputc(int c);
void tputrec (char *buf, int count);

View File

@ -10,17 +10,14 @@
#include "protocol.h"
#include "tty.h"
extern int tgetc();
extern int tgetrec();
extern void tputc();
static void receive_part();
static int receive_sync();
static int receive_rec();
char info[INFOBYTES];
void xm_from()
void
xm_from (void)
{
unsigned long data_size, rsrc_size;
char text[64];
@ -40,11 +37,10 @@ char text[64];
}
}
static void receive_part(info, size, more)
char *info;
int size, more;
static void
receive_part (char *info, int size, int more)
{
int recno = 1, i, status, naks = 0;
int recno = 1, status, naks = 0;
status = 0;
while(status != EOT) {
@ -82,7 +78,8 @@ int recno = 1, i, status, naks = 0;
}
}
static int receive_sync()
static int
receive_sync (void)
{
int c;
@ -109,9 +106,8 @@ int c;
return ACK;
}
static int receive_rec(buf, bufsize, recno)
char *buf;
int bufsize, recno;
static int
receive_rec (char *buf, int bufsize, int recno)
{
int i, cksum, c, rec, recbar;
char *bp;

View File

@ -7,15 +7,12 @@
#include "protocol.h"
#include "tty.h"
extern int tgetc();
extern void tputc();
extern void tputrec();
static void send_part();
static int send_sync();
static void send_rec();
void xm_to()
void
xm_to (void)
{
if(send_sync() == ACK) {
send_part(file_info, DATABYTES, 1);
@ -24,9 +21,8 @@ void xm_to()
}
}
static void send_part(info, size, more)
char *info;
int size, more;
static void
send_part (char *info, int size, int more)
{
int recno = 1, i, status;
@ -54,7 +50,8 @@ int recno = 1, i, status;
}
}
static int send_sync()
static int
send_sync (void)
{
int c, i;
@ -75,9 +72,8 @@ int c, i;
return CAN;
}
static void send_rec(buf, bufsize, recno)
char *buf;
int bufsize, recno;
static void
send_rec (char *buf, int bufsize, int recno)
{
int i, cksum;
char *bp;

View File

@ -36,7 +36,8 @@
static void initcrctab();
int main()
int
main (void)
{
initcrctab("ccitt", 0x1021, 0xffff, 0, 16);
initcrctab("kermit", 0x8408, 0, 1, 16);
@ -47,9 +48,8 @@ int main()
exit(0);
}
static void initcrctab(name, poly, init, swapped, bits)
char *name;
int poly, init, swapped, bits;
static void
initcrctab (char *name, int poly, int init, int swapped, int bits)
{
register int b, i;
unsigned short v;
@ -99,7 +99,7 @@ int poly, init, swapped, bits;
for(vv = b<<24, i = 8; --i >= 0;)
vv = vv & 0x80000000 ? (vv<<1)^poly : vv<<1;
}
(void)fprintf(fd, "0x%.8x,", vv & 0xffffffff);
(void)fprintf(fd, "0x%.8lx,", vv & 0xffffffff);
if((b&3) == 3) {
(void)fprintf(fd, "\n");
if(b != 255) (void)fprintf(fd, " ");

View File

@ -92,9 +92,8 @@ static void read_appledouble_info();
static char filename[255];
static int filekind;
void setup(argc, argv)
int argc;
char **argv;
void
setup (int argc, char **argv)
{
if(argc == 0) {
read_stdin = 1;
@ -109,8 +108,8 @@ char **argv;
}
}
static void check_files(initial)
int initial;
static void
check_files (int initial)
{
struct stat stbuf;
int i, j, n;
@ -292,7 +291,8 @@ int initial;
}
}
int nextfile()
int
nextfile (void)
{
int i;
@ -337,7 +337,8 @@ again:
}
}
static void read_file()
static void
read_file (void)
{
FILE *fd;
int c, j, lname, skip;
@ -652,7 +653,8 @@ static void read_file()
}
}
static void enter_dir()
static void
enter_dir (void)
{
DIR *directory;
struct dirstruct *curentry;
@ -746,7 +748,8 @@ static void enter_dir()
check_files(0);
}
static void exit_dir()
static void
exit_dir (void)
{
filelist *old_files;
int i;
@ -767,8 +770,8 @@ static void exit_dir()
#ifdef APPLESHARE
#ifdef AUFS
static void read_aufs_info(fd)
FILE *fd;
static void
read_aufs_info (FILE *fd)
{
FileInfo theinfo;
int i, n;
@ -832,8 +835,8 @@ FILE *fd;
size and format. I have not yet seen something that will lead me to
believe different.
*/
static void read_appledouble_info(fd)
FILE *fd;
static void
read_appledouble_info (FILE *fd)
{
FileInfo theinfo;
int i, n;
@ -866,7 +869,8 @@ FILE *fd;
#endif /* APPLEDOUBLE */
#endif /* APPLESHARE */
static int get_stdin_file()
static int
get_stdin_file (void)
{
int i, skip;
@ -934,10 +938,9 @@ static int get_stdin_file()
return ISFILE;
}
int rdfileopt(c)
char c;
int
rdfileopt (int c)
{
extern char *optarg;
char name[32];
switch(c) {
@ -965,7 +968,8 @@ char name[32];
return 1;
}
void give_rdfileopt()
void
give_rdfileopt (void)
{
(void)fprintf(stderr, "File input options:\n");
(void)fprintf(stderr, "-r:\tread as resource files\n");
@ -979,19 +983,22 @@ void give_rdfileopt()
"-t ty:\tfiletype if one of the above options is used\n");
}
void set_norecurse()
void
set_norecurse (void)
{
no_recurse = 1;
}
char *get_rdfileopt()
char *
get_rdfileopt (void)
{
static char options[] = "rduUc:t:";
return options;
}
char *get_minb()
char *
get_minb (void)
{
#ifdef APPLESHARE
#ifdef AUFS

View File

@ -7,6 +7,6 @@ extern char file_info[INFOBYTES];
extern char *data_fork, *rsrc_fork;
extern int data_size, rsrc_size;
extern void setup();
extern int nextfile();
extern char *get_minb();
extern void setup(int argc, char **argv);
extern int nextfile(void);
extern char *get_minb(void);

View File

@ -1,3 +1,5 @@
#include "wrfile.h"
#ifdef TYPES_H
#include <sys/types.h>
#endif /* TYPES_H */
@ -8,7 +10,6 @@
#include <stdio.h>
#include <unistd.h>
#include "machdr.h"
#include "wrfile.h"
#include "wrfileopt.h"
#include "../util/util.h"
#ifdef AUFSPLUS
@ -102,8 +103,8 @@ static char *rbuffer = NULL, *dbuffer = NULL;
static char *ptr;
static unsigned long rsz, dsz, totsize, maxsize;
void define_name(text)
char *text;
void
define_name (char *text)
{
(void)sprintf(f_info, "%s.info", text);
(void)sprintf(f_rsrc, "%s.rsrc", text);
@ -118,9 +119,8 @@ char *text;
#endif /* APPLESHARE */
}
void start_info(info, rsize, dsize)
char *info;
unsigned long rsize, dsize;
void
start_info (char *info, unsigned long rsize, unsigned long dsize)
{
int rs, ds;
@ -158,17 +158,20 @@ unsigned long rsize, dsize;
#endif /* APPLEDOUBLE */
}
void start_rsrc()
void
start_rsrc (void)
{
out_buffer = out_ptr = rbuffer;
}
void start_data()
void
start_data (void)
{
out_buffer = out_ptr = dbuffer;
}
void end_file()
void
end_file (void)
{
FILE *fp;
int i, c;
@ -324,9 +327,8 @@ void end_file()
}
#ifdef SCAN
void do_idf(name, kind)
char *name;
int kind;
void
do_idf (char *name, int kind)
{
int n;
@ -348,8 +350,8 @@ int kind;
}
#endif /* SCAN */
void do_mkdir(name, header)
char *name, *header;
void
do_mkdir (char *name, char *header)
{
struct stat sbuf;
FILE *fp;
@ -507,7 +509,7 @@ char dirinfo[I_NAMELEN*3+INFOSZ+10];
#endif /* APPLESHARE */
}
void enddir()
void enddir(void)
{
char header[INFOBYTES];
int i;
@ -621,8 +623,8 @@ static void check_appledouble()
static void appledouble_namings()
{
mk_share_name();
(void)sprintf(f_info_appledouble, "%s/%s", infodir, share_name);
(void)sprintf(f_data, "%s", 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);
}
static void wr_appledouble_info(fp)
@ -678,7 +680,7 @@ static void mk_share_name()
mp = buffer + 2;
up = &(share_name[0]);
while(ch = *mp++) {
while((ch = *mp++)) {
if(isascii(ch) && ! iscntrl(ch) && isprint(ch) && ch != '/') {
*up++ = ch;
} else {
@ -827,7 +829,7 @@ char *get_wrfileopt()
return options;
}
char *get_mina()
char *get_mina(void)
{
#ifdef APPLESHARE
#ifdef AUFS

View File

@ -1,14 +1,14 @@
extern char *out_buffer, *out_ptr;
extern void define_name();
extern void start_info();
extern void start_rsrc();
extern void start_data();
extern void end_file();
extern void define_name(char *text);
void start_info(char *info, unsigned long rsize, unsigned long dsize);
extern void start_rsrc(void);
extern void start_data(void);
extern void end_file(void);
#ifdef SCAN
extern void do_idf();
#endif /* SCAN */
extern void do_mkdir();
extern void enddir();
extern char *get_mina();
extern void do_mkdir(char *name, char *header);
extern void enddir(void);
extern char *get_mina(void);

View File

@ -9,8 +9,8 @@ int data_size, rsrc_size;
static int max_data_size, max_rsrc_size;
static int do_data;
void put_byte(c)
char c;
void
put_byte (int c)
{
if(do_data) {
if(data_size >= max_data_size) {
@ -43,8 +43,8 @@ char c;
}
}
void set_put(data)
int data;
void
set_put (int data)
{
do_data = data;
if(do_data) {
@ -54,7 +54,8 @@ int data;
}
}
void end_put()
void
end_put (void)
{
if(info_only) {
return;

View File

@ -6,28 +6,28 @@
#include "../util/masks.h"
#include "globals.h"
extern void exit();
#include <stdlib.h>
uint32_t crc;
#ifdef HQX
void comp_q_crc(c)
register unsigned int c;
void
comp_q_crc (register unsigned int c)
{
unsigned char cc = c;
crc = binhex_updcrc(crc, &cc, 1);
}
void comp_q_crc_n(s, e)
register unsigned char *s, *e;
void
comp_q_crc_n (register unsigned char *s, register unsigned char *e)
{
crc = binhex_updcrc(crc, s, e - s);
}
#endif /* HQX */
void verify_crc(calc_crc, file_crc)
unsigned long calc_crc, file_crc;
void
verify_crc (unsigned long calc_crc, unsigned long file_crc)
{
calc_crc &= WORDMASK;
file_crc &= WORDMASK;

View File

@ -9,7 +9,7 @@
#include "buffer.h"
#include "printhdr.h"
extern void exit();
#include <stdlib.h>
static long dl_fork();
static int nchar();
@ -18,8 +18,8 @@ static int nextc();
static char *icp = &line[0];
/* oldest format -- process .dl files */
void dl(macname, filename)
char *macname, *filename;
void
dl (char *macname, char *filename)
{
int n;
@ -75,7 +75,8 @@ char *macname, *filename;
end_put();
}
static long dl_fork()
static long
dl_fork (void)
{
register unsigned long i, v, c;
register unsigned long n, bytes;
@ -104,7 +105,8 @@ static long dl_fork()
return bytes;
}
static int nchar()
static int
nchar (void)
{
int i;
@ -118,7 +120,8 @@ static int nchar()
return i & 0177;
}
static int nextc()
static int
nextc (void)
{
while(*icp == 0) {
if(readline() == 0) {

7
hexbin/dl.h Normal file
View File

@ -0,0 +1,7 @@
#include "hexbin.h"
#ifdef DL
void dl (char *macname, char *filename);
#endif

View File

@ -18,8 +18,8 @@ int was_macbin;
FILE *ifp;
#ifdef SCAN
void do_error(string)
char *string;
void
do_error (char *string)
{
do_idf(string, ERROR);
}

View File

@ -10,7 +10,7 @@
#include "buffer.h"
#include "printhdr.h"
extern void exit();
#include <stdlib.h>
static void do_o_forks();
static long make_file();
@ -23,8 +23,8 @@ static int hexit();
static int compressed;
/* old format -- process .hex and .hcx files */
void hecx(macname, filename)
char *macname, *filename;
void
hecx (char *macname, char *filename)
{
int n;
@ -95,7 +95,8 @@ char *macname, *filename;
end_put();
}
static void do_o_forks()
static void
do_o_forks (void)
{
int forks = 0, found_crc = 0;
unsigned long calc_crc, file_crc;
@ -150,8 +151,8 @@ static void do_o_forks()
}
}
static long make_file(compressed)
int compressed;
static long
make_file (int compressed)
{
register long nbytes = 0L;
@ -171,22 +172,23 @@ int compressed;
return nbytes;
}
static void comp_c_crc(c)
unsigned char c;
static void
comp_c_crc (int c)
{
crc = (crc + c) & WORDMASK;
crc = ((crc << 3) & WORDMASK) | (crc >> 13);
}
static void comp_e_crc(c)
unsigned char c;
static void
comp_e_crc (int c)
{
crc += c;
}
#define SIXB(c) (((c)-0x20) & 0x3f)
static int comp_to_bin()
static int
comp_to_bin (void)
{
char obuf[BUFSIZ];
register char *ip = line;
@ -217,7 +219,8 @@ static int comp_to_bin()
return outcount;
}
static int hex_to_bin()
static int
hex_to_bin (void)
{
register char *ip = line;
register int n, outcount;
@ -233,8 +236,8 @@ static int hex_to_bin()
return outcount;
}
static int hexit(c)
int c;
static int
hexit (int c)
{
if('0' <= c && c <= '9') {
return c - '0';

7
hexbin/hecx.h Normal file
View File

@ -0,0 +1,7 @@
#include "hexbin.h"
#ifdef HECX
void hecx (char *macname, char *filename);
#endif

View File

@ -16,38 +16,26 @@
#include "../fileio/machdr.h"
#include "../fileio/kind.h"
#include "../util/curtime.h"
#include "../util/backtrans.h"
#include "hexbin.h"
#include "dl.h"
#include "hecx.h"
#include "hqx.h"
#include "mu.h"
#define LOCALOPT "ilvcn:qVH"
extern void backtrans();
#ifdef DL
extern void dl();
#endif /* DL */
#ifdef HECX
extern void hecx();
#endif /* HECX */
#ifdef HQX
extern void hqx();
#endif /* HQX */
#ifdef MU
extern void mu();
#endif /* MU */
static void usage();
static void do_files();
static int find_header();
static void usage(void);
static void do_files(char *filename, char *macname);
static int find_header(int again);
static char options[128];
int main(argc, argv)
int argc;
char **argv;
int
main (int argc, char **argv)
{
char *filename;
char macname[32];
extern int optind;
extern char *optarg;
int errflg;
int c;
@ -162,9 +150,11 @@ static char *extensions[] = {
NULL
};
static void do_files(filename, macname)
char *filename; /* input file name -- extension optional */
char *macname; /* name to use on the mac side of things */
static void
do_files (
char *filename, /* input file name -- extension optional */
char *macname /* name to use on the mac side of things */
)
{
char namebuf[256];
char **ep;
@ -237,8 +227,8 @@ nexttry:
}
/* eat characters until header detected, return which format */
static int find_header(again)
int again;
static int
find_header (int again)
{
int c, dl_start, llen;
char *cp;
@ -356,7 +346,8 @@ int again;
return form_none;
}
static void usage()
static void
usage (void)
{
(void)fprintf(stderr, "Usage: hexbin [-%s] [filenames]\n", options);
(void)fprintf(stderr, "Use \"hexbin -H\" for help.\n");

View File

@ -1,4 +1,5 @@
#include "hexbin.h"
#include "hqx.h"
#ifdef HQX
#include <stdlib.h>
#include "globals.h"
@ -104,12 +105,12 @@ static long todo;
#define output(c) { *op++ = (c); if(op >= &obuf[BUFSIZ]) oflush(); }
void hqx(macname)
char *macname;
void
hqx (char *macname)
{
int n, normlen, c;
register char *in, *out;
register int b6, b8, data, lastc = 0;
register int b6, b8 = 0, data = 0, lastc = 0;
char state68 = 0, run = 0, linestate, first = 1;
g_macname = macname;
@ -231,7 +232,8 @@ done:
print_header2(verbose);
}
static void get_header()
static void
get_header (void)
{
int n;
unsigned long calc_crc, file_crc;
@ -282,7 +284,8 @@ static void get_header()
put4(info + I_MTIMOFF, (unsigned long)mh.m_modifytime);
}
static void oflush()
static void
oflush (void)
{
int n, i;
@ -335,7 +338,7 @@ static void oflush()
++ostate;
break;
case S_EXCESS:
(void)fprintf(stderr, "%d excess bytes ignored\n", op-oq);
(void)fprintf(stderr, "%ld excess bytes ignored\n", op-oq);
oq = op;
break;
}
@ -343,7 +346,8 @@ static void oflush()
op = obuf;
}
static int getq()
static int
getq (void)
{
int c;
@ -360,14 +364,16 @@ static int getq()
}
/* get2q(); q format -- read 2 bytes from input, return short */
static long get2q()
static long
get2q (void)
{
short high = getq() << 8;
return high | getq();
}
/* get4q(); q format -- read 4 bytes from input, return long */
static long get4q()
static long
get4q (void)
{
int i;
long value = 0;

7
hexbin/hqx.h Normal file
View File

@ -0,0 +1,7 @@
#include "hexbin.h"
#ifdef HQX
void hqx (char *macname);
#endif

View File

@ -1,4 +1,5 @@
#include "hexbin.h"
#include "mu.h"
#ifdef MU
#include "globals.h"
#include "readline.h"
@ -9,15 +10,15 @@
#include "buffer.h"
#include "printhdr.h"
extern void exit();
#include <stdlib.h>
static void do_mu_fork();
static int mu_comp_to_bin();
static int mu_convert();
/* mu format -- process .mu files */
void mu(macname)
char *macname;
void
mu (char *macname)
{
int n;
@ -143,7 +144,8 @@ char *macname;
end_put();
}
static void do_mu_fork()
static void
do_mu_fork (void)
{
long newbytes;
@ -179,7 +181,8 @@ static void do_mu_fork()
/*NOTREACHED*/
}
static int mu_comp_to_bin()
static int
mu_comp_to_bin (void)
{
char obuf[BUFSIZ];
int outcount, n;
@ -193,8 +196,8 @@ static int mu_comp_to_bin()
#define SIXB(c) (((c)-0x20) & 0x3f)
static int mu_convert(ibuf, obuf)
char *ibuf, *obuf;
static int
mu_convert (char *ibuf, char *obuf)
{
register char *ip = ibuf;
register char *op = obuf;

7
hexbin/mu.h Normal file
View File

@ -0,0 +1,7 @@
#include "hexbin.h"
#ifdef MU
void mu (char *macname);
#endif

View File

@ -6,7 +6,8 @@ char line[1024]; /* Allow a lot! */
/* 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
readline (void)
{
int ptr = 0, c;

View File

@ -18,7 +18,7 @@
#define SIZE2 84 /* Not present if KIND == 1 */
#define HEADERBYTES 88
typedef struct fileHdr { /* 84 or 88 bytes */
typedef struct arc_fileHdr { /* 84 or 88 bytes */
char magic1;
char kind;