diff -Nu ../macforkorig/MacFork.cc ./MacFork.cc --- ../macforkorig/MacFork.cc Fri Aug 17 18:03:59 2001 +++ ./MacFork.cc Fri Aug 17 17:33:41 2001 @@ -13,7 +13,11 @@ #include "arg.h" #include "Resource.h" -#include +#ifdef AMIGA + #define ntohs(x) (x) +#else + #include +#endif const Int NO_ID = 65536; diff -Nu ../macforkorig/Resource.cc ./Resource.cc --- ../macforkorig/Resource.cc Fri Aug 17 18:03:59 2001 +++ ./Resource.cc Fri Aug 17 17:41:07 2001 @@ -9,7 +9,13 @@ */ #include "Resource.h" -#include +#include +#ifdef AMIGA + #define ntohl(x) (x) + #define ntohs(x) (x) +#else + #include +#endif #define dprintf if (0) printf @@ -162,7 +168,7 @@ ReadLong(); resPtr->name = 0; - resPtr->attr = resPtr->dataOffset >> 24; + resPtr->attr = (Char) (resPtr->dataOffset >> 24); resPtr->dataOffset &= 0xFFFFFF; dprintf("resource '%c%c%c%c' %d: name %d, data %d, attr %d\n", @@ -226,7 +232,8 @@ Void ResourceFile::PrintResources(Int i) { - Int j, len; + ResLong len; + Int j; for (j = 0; j < resTypes[i].items; j++) { diff -Nu ../macforkorig/SMakeFile ./SMakeFile --- ../macforkorig/SMakeFile Thu Jan 1 01:00:00 1970 +++ ./SMakeFile Fri Aug 17 18:04:28 2001 @@ -0,0 +1,14 @@ +SCOPTS = RESOPT PARM=R NOSTKCHK STRMER SMALLCODE SMALLDATA NOICONS MEMSIZE=HUGE\ +OPTIMIZE OPTINLOCAL OPTSCHED OPTGO LIB LIB:scm.lib + +macfork: MacFork.cc Resource.h arg.h Types.h mac-std-palette.txt resource.o arg.o + sc $(SCOPTS) LINK MacFork.cc Resource.o arg.o TO $@ + +Resource.o: Resource.cc Resource.h Types.h + sc $(SCOPTS) Resource.cc + +arg.o: arg.c arg.h simple.h + sc $(SCOPTS) arg.c + +clean: + delete \#?.(o|lnk) diff -Nu ../macforkorig/arg.c ./arg.c --- ../macforkorig/arg.c Fri Aug 17 18:03:59 2001 +++ ./arg.c Fri Aug 17 18:01:08 2001 @@ -24,7 +24,7 @@ * and Alvy Ray Smith's AARG at Pixar. */ -static char rcsid[] = "$Header: /usr/people/ajw/cvsroot/arg/arg.c,v 1.1 1998/01/21 04:57:18 ajw Exp $"; +/*static char rcsid[] = "$Header: /usr/people/ajw/cvsroot/arg/arg.c,v 1.1 1998/01/21 04:57:18 ajw Exp $";*/ #include #include @@ -65,10 +65,10 @@ static Arg_form *regf; /* advancing form ptr used by arg_find_reg */ -va_list arg_doc_parse(); +va_list arg_doc_parse(Arg_form *f, va_list ap); int arg_format(Arg_form *f); void arg_init(Arg_form *form); -int arg_done(); +int arg_done(void); int arg_parse_form1(int ac, char **av, Arg_form *form); int arg_do(int ac, char **av, Arg_form *f); void av_print(char *str, int ac, char **av); diff -Nu ../macforkorig/arg.h ./arg.h --- ../macforkorig/arg.h Fri Aug 17 18:03:59 2001 +++ ./arg.h Fri Aug 17 17:58:58 2001 @@ -22,7 +22,7 @@ short nparam; /* number of parameters to flag */ int parammask; /* bit i says ok to stop before param i, i=0..*/ int **param; /* parameter pointer list */ - int (*subr)(); /* subroutine to call for action (if any) */ + int (*subr)(int, char **); /* subroutine to call for action (if any) */ struct arg_form *sublist; /* subordinate list (if any) */ short rep; /* # times this flag repeated in arglist */ } Arg_form; @@ -56,7 +56,9 @@ extern int arg_debug, arg_doccol; extern int arg_warning; /* print warnings about repeated flags? */ -Arg_form *arg_to_form1(), *arg_find_flag(), *arg_find_reg(); +Arg_form *arg_to_form1(va_list ap); +Arg_form *arg_find_flag(char *arg, Arg_form *form); +Arg_form *arg_find_reg(void); #ifdef __cplusplus extern "C"