diff -r -c -N Icon.orig/config/unix/amiga/common.hdr Icon-9.1/config/unix/amiga/common.hdr *** Icon.orig/config/unix/amiga/common.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/common.hdr Mon Sep 23 17:50:18 1996 *************** *** 0 **** --- 1,12 ---- + # The -D$D option to CFLAGS makes it possible to specify a definition + # at the Make command level without revising the Makefile, as + # in + # + # make D=Debug + # + D=NOTHING + CC=gcc + CFLAGS= -D$D -Wall -O2 + LDFLAGS= + SHELL=/bin/sh + RSWITCH=rswitch.c diff -r -c -N Icon.orig/config/unix/amiga/define.h Icon-9.1/config/unix/amiga/define.h *** Icon.orig/config/unix/amiga/define.h Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/define.h Mon Sep 23 21:21:53 1996 *************** *** 0 **** --- 1,29 ---- + /* + * Icon configuration file for Amiga gcc + */ + #define MaxHdr 600 + #define MaxStatSize 20000 + #define StackAlign 8 + #define SysTime + #define ZERODIVIDE + + #undef AMIGA + #define AMIGA_GCC 1 + #define CComp "gcc" + #define COpts "" + + #define Standard + #define AllowConst + + #define HostStr "Amiga gcc" + #define NoShellHeader + #define SystemFnc + #define IconEcvt + #define Hz 1000 + + #define KeyboardFncs + #define HaveTermio + #define SysOpt + #define SysMem + #define NoReturn(decl) decl __attribute__ ((noreturn)) + #define AmigaFncs diff -r -c -N Icon.orig/config/unix/amiga/iconc.hdr Icon-9.1/config/unix/amiga/iconc.hdr *** Icon.orig/config/unix/amiga/iconc.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/iconc.hdr Fri Sep 20 15:07:31 1996 *************** *** 0 **** --- 1,11 ---- + # The -D$D option to CFLAGS makes it possible to specify a definition + # at the Make command level without revising the Makefile, as + # in + # + # make D=Debug + # + D=NOTHING + CC=gcc + CFLAGS= -D$D -Wall + LDFLAGS= + SHELL=/bin/sh diff -r -c -N Icon.orig/config/unix/amiga/icont.hdr Icon-9.1/config/unix/amiga/icont.hdr *** Icon.orig/config/unix/amiga/icont.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/icont.hdr Mon Sep 23 17:50:14 1996 *************** *** 0 **** --- 1,5 ---- + CC=gcc + CFLAGS= -Wall -O2 + HFLAGS= -N + LDFLAGS= + SHELL=/bin/sh diff -r -c -N Icon.orig/config/unix/amiga/preproc.hdr Icon-9.1/config/unix/amiga/preproc.hdr *** Icon.orig/config/unix/amiga/preproc.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/preproc.hdr Mon Sep 23 17:49:56 1996 *************** *** 0 **** --- 1,12 ---- + # The -D$D option to CFLAGS makes it possible to specify a definition + # at the Make command level without revising the Makefile, as + # in + # + # make D=Debug + # + D=NOTHING + CC=gcc + CFLAGS= -D$D -Wall -O2 + HFLAGS=-N + LDFLAGS= + SHELL=/bin/sh diff -r -c -N Icon.orig/config/unix/amiga/rswitch.c Icon-9.1/config/unix/amiga/rswitch.c *** Icon.orig/config/unix/amiga/rswitch.c Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/rswitch.c Sat Sep 21 16:30:29 1996 *************** *** 0 **** --- 1,39 ---- + /* + * coswitch for amiga with gcc + * + */ + int coswitch(old_cs, new_cs, first) + int *old_cs; + register int *new_cs; + int first; + { + /* we use a0 as this is a `scratch' register with gcc, + so it will minimize mucking around with saving/restoring it + */ + register int *_cs __asm("a0"); + _cs = old_cs; + /* + - we do save all other 15 registers, using the whole stackframe + - we save a7 separately in order to be able to retrieve it + independently + - the "r" (_cs) dependency is necessary, otherwise the optimizer + will optimize _cs away + */ + asm("movel a7, a0@(0); moveml d0-d7/a1-a6, a0@(4)": : "r" (_cs)); + _cs = new_cs; + if (first == 0) + { + /* note that you can't factorize this assembly instruction as the + first==0 test really need to occur before (since first might be + on the stack + */ + asm("movel a0@(0), a7" : :"r" (_cs)); + new_context(0, 0); + syserr("new_context() returned in coswitch"); + } + else + { + asm("movel a0@(0), a7; moveml a0@(4), d0-d7/a1-a6": :"r" (_cs)); + return; + } + } diff -r -c -N Icon.orig/config/unix/amiga/rtt.hdr Icon-9.1/config/unix/amiga/rtt.hdr *** Icon.orig/config/unix/amiga/rtt.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/rtt.hdr Mon Sep 23 17:50:01 1996 *************** *** 0 **** --- 1,5 ---- + CC=gcc + CFLAGS= -DTokDotH="\"../rtt/ltoken.h\"" -Wall -O2 + LDFLAGS= + YFLAGS= + SHELL=/bin/sh diff -r -c -N Icon.orig/config/unix/amiga/runtime.hdr Icon-9.1/config/unix/amiga/runtime.hdr *** Icon.orig/config/unix/amiga/runtime.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/runtime.hdr Mon Sep 23 17:49:50 1996 *************** *** 0 **** --- 1,4 ---- + LDFLAGS= + CC=gcc + CFLAGS= -Wall -O2 + SHELL=/bin/sh diff -r -c -N Icon.orig/config/unix/amiga/status Icon-9.1/config/unix/amiga/status *** Icon.orig/config/unix/amiga/status Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/status Mon Sep 23 17:42:16 1996 *************** *** 0 **** --- 1,35 ---- + System configuration: + + Amiga with gcc + + Latest Icon version: + + 9.1 + + + Installer: + + Marc Espie + 60 rue du 4 septembre + 87100 Limoges + FRANCE + Marc.Espie@ens.fr + + + Missing features: + + X Windows support + loadfunc and external calls + + Known bugs: + + Keyboard functions have problems. No fix in icon, though. + + Comments: + + uses ixemul.library to conform more to unix conventions and + less to amiga specific conventions. + + Date: + + September 1996 diff -r -c -N Icon.orig/config/unix/amiga/vtran.hdr Icon-9.1/config/unix/amiga/vtran.hdr *** Icon.orig/config/unix/amiga/vtran.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/vtran.hdr Mon Sep 23 17:50:09 1996 *************** *** 0 **** --- 1,4 ---- + CC=gcc + CFLAGS= -DVarTran -Wall -O2 + LDFLAGS= + SHELL=/bin/sh diff -r -c -N Icon.orig/config/unix/amiga/xpm.hdr Icon-9.1/config/unix/amiga/xpm.hdr *** Icon.orig/config/unix/amiga/xpm.hdr Thu Jan 1 00:00:00 1970 --- Icon-9.1/config/unix/amiga/xpm.hdr Fri Sep 20 15:08:30 1996 *************** *** 0 **** --- 1,2 ---- + CC=gcc + DEFINES= -DZPIPE -Wall diff -r -c -N Icon.orig/src/common/dconsole.c Icon-9.1/src/common/dconsole.c *** Icon.orig/src/common/dconsole.c Sun Feb 25 18:06:52 1996 --- Icon-9.1/src/common/dconsole.c Fri Sep 20 15:58:26 1996 *************** *** 516,522 **** #if HIGHC_386 sprintf(s,"%.*g", Precision, n); #else /* HIGHC_386 */ ! #if AMIGA || ARM || ATARI_ST || MSDOS || OS2 || UNIX || VMS gcvt(n, Precision, s); #endif /* AMIGA || ARM || ATARI_ST || ... */ #endif /* HIGHC_386 */ --- 516,522 ---- #if HIGHC_386 sprintf(s,"%.*g", Precision, n); #else /* HIGHC_386 */ ! #if AMIGA_GCC || AMIGA || ARM || ATARI_ST || MSDOS || OS2 || UNIX || VMS gcvt(n, Precision, s); #endif /* AMIGA || ARM || ATARI_ST || ... */ #endif /* HIGHC_386 */ diff -r -c -N Icon.orig/src/common/doincl.c Icon-9.1/src/common/doincl.c *** Icon.orig/src/common/doincl.c Sun Feb 25 18:06:51 1996 --- Icon-9.1/src/common/doincl.c Fri Sep 20 21:47:00 1996 *************** *** 13,25 **** #include "../h/rt.h" ! int doinclude Params((char *fname)); #define MAXLINE 500 /* maximum line length */ FILE *outfile; /* output file */ ! main(argc, argv) int argc; char *argv[]; { --- 13,25 ---- #include "../h/rt.h" ! novalue doinclude Params((char *fname)); #define MAXLINE 500 /* maximum line length */ FILE *outfile; /* output file */ ! int main(argc, argv) int argc; char *argv[]; { *************** *** 48,54 **** exit(0); } ! doinclude(fname) char *fname; { FILE *f; --- 48,54 ---- exit(0); } ! novalue doinclude(fname) char *fname; { FILE *f; diff -r -c -N Icon.orig/src/common/filepart.c Icon-9.1/src/common/filepart.c *** Icon.orig/src/common/filepart.c Sun Feb 25 18:06:50 1996 --- Icon-9.1/src/common/filepart.c Sun Sep 22 18:19:15 1996 *************** *** 23,29 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA #define Prefix "/:" #define FileSep '/' #endif /* AMIGA */ --- 23,29 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || AMIGA_GCC #define Prefix "/:" #define FileSep '/' #endif /* AMIGA */ *************** *** 180,185 **** --- 180,192 ---- return NULL; } + /* The following code is operating-system dependent [@filepart.02] + * parsing filenames is usually system-dependent, somewhat + */ + #if PORT + Deliberate syntax error + #endif /* PORT */ + /* * fparse - break a file name down into component parts. * Result is a pointer to a struct of static pointers good until the next call. *************** *** 366,371 **** --- 373,380 ---- return &fp; #endif /* ARM */ } + + /* * makename - make a file name, optionally substituting a new dir and/or ext *************** *** 409,414 **** --- 418,427 ---- return dest; } + + /* + * End of operating-system specific code + */ /* * smatch - case-insensitive string match - returns nonzero if they match diff -r -c -N Icon.orig/src/common/getopt.c Icon-9.1/src/common/getopt.c *** Icon.orig/src/common/getopt.c Sun Feb 25 18:06:49 1996 --- Icon-9.1/src/common/getopt.c Fri Sep 20 21:51:19 1996 *************** *** 22,28 **** int getopt(nargc,nargv,ostr) int nargc; ! char **nargv, *ostr; { static char *place = EMSG; /* option letter processing */ register char *oli; /* option letter list index */ --- 22,29 ---- int getopt(nargc,nargv,ostr) int nargc; ! char *const *nargv; ! const char *ostr; { static char *place = EMSG; /* option letter processing */ register char *oli; /* option letter list index */ diff -r -c -N Icon.orig/src/common/ipp.c Icon-9.1/src/common/ipp.c *** Icon.orig/src/common/ipp.c Sun Feb 25 18:06:49 1996 --- Icon-9.1/src/common/ipp.c Sun Sep 22 19:33:04 1996 *************** *** 203,208 **** --- 203,216 ---- return 1; } + + /* The following code is operating-system dependent [@ipp.01] + * m4 does not exist everywhere + */ + #if PORT + /* something is needed if you support m4 */ + Deliberate syntax error + #endif /* PORT */ /* * m4pipe -- open a pipe from m4. */ *************** *** 216,222 **** #endif /* MPW */ #endif /* MACINTOSH */ ! #if ARM || UNIX { FILE *f; char *s = alloc((unsigned int)(4 + strlen(filename))); --- 224,233 ---- #endif /* MPW */ #endif /* MACINTOSH */ ! /* note for amiga gcc: we assume we do have m4 around. ! * if this fails, we will return NULL as everybody ! */ ! #if AMIGA_GCC || ARM || UNIX { FILE *f; char *s = alloc((unsigned int)(4 + strlen(filename))); *************** *** 231,236 **** --- 242,251 ---- } /* + * End of operating-system specific code. + */ + + /* * ppdef(s,v) -- define/undefine a symbol * * If v is a null pointer, undefines symbol s. *************** *** 397,409 **** fs = curfile; curfile = fs->prev; ! #if ARM || UNIX if (fs->m4flag) { /* if m4 preprocessing */ if (pclose(fs->fp) != 0) /* close pipe */ quit("m4 terminated abnormally"); } else #endif /* ARM || UNIX */ fclose(fs->fp); /* close current file */ free((char *)fs->fname); --- 412,437 ---- fs = curfile; curfile = fs->prev; ! /* The following code is operating-system dependent [@ipp.02] ! * support for m4 preprocessing ! */ ! #if PORT ! /* Nothing is needed if m4 is not supported */ ! Deliberate syntax error ! #endif /* PORT */ ! ! #if AMIGA_GCC || ARM || UNIX if (fs->m4flag) { /* if m4 preprocessing */ if (pclose(fs->fp) != 0) /* close pipe */ quit("m4 terminated abnormally"); } else #endif /* ARM || UNIX */ + + /* + * End of operating-system specific code. + */ + fclose(fs->fp); /* close current file */ free((char *)fs->fname); diff -r -c -N Icon.orig/src/common/patchstr.c Icon-9.1/src/common/patchstr.c *** Icon.orig/src/common/patchstr.c Sun Feb 25 18:06:51 1996 --- Icon-9.1/src/common/patchstr.c Fri Sep 20 21:49:09 1996 *************** *** 22,29 **** #undef strlen ! int report Params((char *filename)); ! int patchstr Params((char *filename, char *newstring)); int findpattern Params((FILE *f)); int oldval Params((FILE *f, char *buf)); --- 22,29 ---- #undef strlen ! novalue report Params((char *filename)); ! novalue patchstr Params((char *filename, char *newstring)); int findpattern Params((FILE *f)); int oldval Params((FILE *f, char *buf)); *************** *** 40,46 **** /* * main program */ ! main (argc, argv) int argc; char *argv[]; { --- 40,46 ---- /* * main program */ ! int main (argc, argv) int argc; char *argv[]; { *************** *** 63,69 **** /* * report (filename) -- report existing string values in a file */ ! report (fname) char *fname; { FILE *f; --- 63,69 ---- /* * report (filename) -- report existing string values in a file */ ! novalue report (fname) char *fname; { FILE *f; *************** *** 95,101 **** /* * patchstr (filename, newstring) -- patch a file */ ! patchstr (fname, newstr) char *fname, *newstr; { FILE *f; --- 95,101 ---- /* * patchstr (filename, newstring) -- patch a file */ ! novalue patchstr (fname, newstr) char *fname, *newstr; { FILE *f; *************** *** 113,119 **** n = oldval(f, buf); /* check available space */ fseek(f, posn, 0); /* reposition to beginning of string */ if (n > MAXLEN) { ! fprintf(stderr, "%at byte %ld: unterminated string\n", posn); exitcode = 1; } --- 113,119 ---- n = oldval(f, buf); /* check available space */ fseek(f, posn, 0); /* reposition to beginning of string */ if (n > MAXLEN) { ! fprintf(stderr, "at byte %ld: unterminated string\n", posn); exitcode = 1; } *************** *** 175,181 **** * unterminated string. The file will need to be repositioned after calling * this function. */ ! oldval(f, buf) FILE *f; char buf[MAXLEN+2]; { --- 175,181 ---- * unterminated string. The file will need to be repositioned after calling * this function. */ ! int oldval(f, buf) FILE *f; char buf[MAXLEN+2]; { diff -r -c -N Icon.orig/src/common/redirerr.c Icon-9.1/src/common/redirerr.c *** Icon.orig/src/common/redirerr.c Sun Feb 25 18:06:52 1996 --- Icon-9.1/src/common/redirerr.c Fri Sep 20 15:58:03 1996 *************** *** 66,72 **** #endif /* MPW */ #endif /* MACINTOSH */ ! #if UNIX /* * This relies on the way UNIX assigns file numbers. */ --- 66,72 ---- #endif /* MPW */ #endif /* MACINTOSH */ ! #if AMIGA_GCC || UNIX /* * This relies on the way UNIX assigns file numbers. */ diff -r -c -N Icon.orig/src/common/time.c Icon-9.1/src/common/time.c *** Icon.orig/src/common/time.c Sun Feb 25 18:06:50 1996 --- Icon-9.1/src/common/time.c Sun Sep 22 00:09:39 1996 *************** *** 52,58 **** #include #endif /* OS2 */ ! #if UNIX #ifdef CRAY #define word fubar_word #include --- 52,58 ---- #include #endif /* OS2 */ ! #if AMIGA_GCC || UNIX #ifdef CRAY #define word fubar_word #include *************** *** 111,118 **** long xclock; Deliberate Syntax Error #endif /* PORT */ ! ! #if AMIGA || OS2 || UNIX || SCCX_MX #ifdef StandardLib time_t time(); time_t xclock; --- 111,117 ---- long xclock; Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || OS2 || UNIX || SCCX_MX #ifdef StandardLib time_t time(); time_t xclock; *************** *** 187,193 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ARM || MACINTOSH || OS2 || UNIX || VMS || MVS || VM time(&xclock); tbuf = localtime(&xclock); #endif /* AMIGA || ARM || ... */ --- 186,192 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ARM || MACINTOSH || OS2 || UNIX || VMS || MVS || VM time(&xclock); tbuf = localtime(&xclock); #endif /* AMIGA || ARM || ... */ *************** *** 322,328 **** static clock_t starttime; #endif /* MVS || VM */ ! #if UNIX || VMS struct tms tp; static long starttime; #endif /* UNIX || VMS */ --- 321,327 ---- static clock_t starttime; #endif /* MVS || VM */ ! #if AMIGA_GCC || UNIX || VMS struct tms tp; static long starttime; #endif /* UNIX || VMS */ *************** *** 376,382 **** starttime = clock(); /* clock ticks */ #endif /* MVS || VM || OS2 */ ! #if UNIX || VMS times(&tp); starttime = tp.tms_utime; #endif /* UNIX || VMS */ --- 375,381 ---- starttime = clock(); /* clock ticks */ #endif /* MVS || VM || OS2 */ ! #if AMIGA_GCC || UNIX || VMS times(&tp); starttime = tp.tms_utime; #endif /* UNIX || VMS */ *************** *** 442,448 **** return (1000.0/CLOCKS_PER_SEC) * (clock() - starttime); #endif /* MVS || VM */ ! #if UNIX || VMS times(&tp); return 1000 * ((tp.tms_utime - starttime) / (double)Hz); #endif /* UNIX || VMS */ --- 441,447 ---- return (1000.0/CLOCKS_PER_SEC) * (clock() - starttime); #endif /* MVS || VM */ ! #if AMIGA_GCC || UNIX || VMS times(&tp); return 1000 * ((tp.tms_utime - starttime) / (double)Hz); #endif /* UNIX || VMS */ diff -r -c -N Icon.orig/src/h/config.h Icon-9.1/src/h/config.h *** Icon.orig/src/h/config.h Sun Feb 25 18:07:08 1996 --- Icon-9.1/src/h/config.h Sun Sep 22 16:12:37 1996 *************** *** 54,59 **** --- 54,63 ---- #define PORT 0 #endif /* PORT */ + #ifndef AMIGA_GCC /* AMIGA_GCC */ + #define AMIGA_GCC 0 + #endif + #ifndef AMIGA #define AMIGA 0 #endif /* AMIGA */ *************** *** 102,108 **** #define VMS 0 #endif /* VMS */ - /* * The following definitions serve to cast common conditionals is * a positive way, while allowing defaults for the cases that --- 106,111 ---- *************** *** 227,232 **** --- 230,243 ---- #endif /* EnvVars */ + /* The following code is operating-system dependent [@config.02]. + * graphics configuration stuff and io setup + */ + #if PORT + /* Probably nothing is needed unless you intend to support graphics */ + Deliberate syntax error + #endif /* PORT */ + #ifdef MSWindows #undef Graphics #define Graphics 1 *************** *** 292,297 **** --- 303,312 ---- #undef ExternalFunctions #define ExternalFunctions #endif /* NoExternalFunctions */ + /* + * End of operating-system specific code. + */ + /* * EBCDIC == 0 corresponds to ASCII. EBCDIC == 1 corresponds to EBCDIC *************** *** 371,379 **** #define TargetDir LocalDir #endif /* TargetDir */ ! #ifndef Pipes ! #if ARM || OS2 || UNIX || VMS #define Pipes #endif /* ARM || OS2 || UNIX || VMS */ #endif /* Pipes */ --- 386,400 ---- #define TargetDir LocalDir #endif /* TargetDir */ ! /* ! * The following code is operating-system dependent [@config.03]. ! * Automatic setup for some isses like Pipes and System ! */ ! #if PORT ! Deliberate syntax error ! #endif /* PORT */ #ifndef Pipes ! #if AMIGA_GCC || ARM || OS2 || UNIX || VMS #define Pipes #endif /* ARM || OS2 || UNIX || VMS */ #endif /* Pipes */ *************** *** 382,387 **** --- 403,413 ---- #define SystemFnc #endif /* UNIX || VMS */ + /* + * End of operating-system specific code. + */ + + /* * Default sizing and such. *************** *** 475,480 **** --- 501,514 ---- #define noargs #endif /* VoidType */ + /* For compiler that support functions which do not return, NoReturn + * is defined in define.h + * gcc does: #define NoReturn(decl) decl __attribute__ ((noreturn)) + */ + #ifndef NoReturn + #define NoReturn(decl) decl + #endif + /* * And something to handle a cast problem for signal(). */ *************** *** 651,657 **** #endif /* WATERLOO_C_V3_0 */ #endif /* MVS || VM */ ! #if UNIX || (MACINTOSH && MPW) #undef WriteBinary #define WriteBinary "w" --- 685,691 ---- #endif /* WATERLOO_C_V3_0 */ #endif /* MVS || VM */ ! #if AMIGA_GCC || UNIX || (MACINTOSH && MPW) #undef WriteBinary #define WriteBinary "w" *************** *** 671,677 **** #define Header #endif /* NoHeader */ ! #endif /* UNIX || (MACINTOSH && MPW) */ /* * End of operating-system specific code. --- 705,711 ---- #define Header #endif /* NoHeader */ ! #endif /* AMIGA_GCC || UNIX || (MACINTOSH && MPW) */ /* * End of operating-system specific code. *************** *** 791,799 **** #endif /* COMPILER */ #ifndef IconOptions ! #if ARM || MPW || UNIX || VMS #define IconOptions "C:ELS:Tce:f:mn:o:p:r:stuv:x" #endif /* ARM || MPW || UNIX || VMS */ --- 825,840 ---- #endif /* COMPILER */ + /* The following code is operating-system dependent [@config.04] + * Options and usage + */ + #if PORT + /* Something is needed here or in the define.h file */ + Deliberate syntax error + #endif /* PORT */ #ifndef IconOptions ! #if AMIGA_GCC || ARM || MPW || UNIX || VMS #define IconOptions "C:ELS:Tce:f:mn:o:p:r:stuv:x" #endif /* ARM || MPW || UNIX || VMS */ *************** *** 816,822 **** <-o ofile> <-p C-opts> <-r runtime> <-s> <-t> <-u> <-v i>" #else /* EBCDIC */ #ifndef CUsage ! #if UNIX #define CUsage "[-C C-comp] [-E] [-T] [-c] [-f{adelns}] [-m] [-n{acest}]\n\ [-o ofile] [-p C-opts] [-r runtime] [-s] [-t] [-u] [-v i]" #else /* UNIX */ --- 857,863 ---- <-o ofile> <-p C-opts> <-r runtime> <-s> <-t> <-u> <-v i>" #else /* EBCDIC */ #ifndef CUsage ! #if AMIGA_GCC || UNIX #define CUsage "[-C C-comp] [-E] [-T] [-c] [-f{adelns}] [-m] [-n{acest}]\n\ [-o ofile] [-p C-opts] [-r runtime] [-s] [-t] [-u] [-v i]" #else /* UNIX */ *************** *** 832,838 **** #define TUsage "<-cstu> <-fs> <-e efile> <-o ofile>" #endif /* EBCDIC */ ! #if ARM || UNIX #define TUsage "[-cmstuE] [-fs] [-e efile] [-o ofile]" #endif /* ARM || UNIX */ --- 873,879 ---- #define TUsage "<-cstu> <-fs> <-e efile> <-o ofile>" #endif /* EBCDIC */ ! #if AMIGA_GCC || ARM || UNIX #define TUsage "[-cmstuE] [-fs] [-e efile] [-o ofile]" #endif /* ARM || UNIX */ *************** *** 863,868 **** --- 904,913 ---- #undef DirectExecution #define DirectExecution #endif /* Header */ + + /* + * End of operating-system specific code. + */ /* * TEMPORARY diff -r -c -N Icon.orig/src/h/cstructs.h Icon-9.1/src/h/cstructs.h *** Icon.orig/src/h/cstructs.h Sun Feb 25 18:07:09 1996 --- Icon-9.1/src/h/cstructs.h Sun Sep 22 17:38:16 1996 *************** *** 20,26 **** --- 20,33 ---- /* * fileparts holds a file name broken down into parts. */ + /* The following code is operating-system dependent [@cstruct.01] + * some weird architectures may need further fields + */ + #if PORT + /* Nothing is needed probably */ + Deliberate syntax error + #endif /* PORT */ struct fileparts { /* struct of file name parts */ char *dir; /* directory */ *************** *** 36,41 **** --- 43,52 ---- #endif /* MVS */ }; + /* + * End of operating-system specific code. + */ + /* * xval - holds references to literal constants diff -r -c -N Icon.orig/src/h/dproto.h Icon-9.1/src/h/dproto.h *** Icon.orig/src/h/dproto.h Sun Feb 25 18:07:10 1996 --- Icon-9.1/src/h/dproto.h Sun Sep 22 17:40:21 1996 *************** *** 2,7 **** --- 2,14 ---- * Temporary prototypes in the absence of system include files. */ + /* All of this code is operating-system dependent [@dproto.01]. + * some compilers and architectures may need some other prototypes + */ + #if PORT + /* Little might be needed, or extensive changes */ + Deliberate syntax error + #endif /* PORT */ #ifdef _Exit novalue _exit Params((int)); #endif /* _Exit */ *************** *** 11,28 **** --- 18,41 ---- double atof Params((char *)); long atol Params((char *)); pointer calloc Params((unsigned,unsigned)); + /* int execv Params((char *, char **)); int execvp Params((char *, char **)); + */ novalue exit Params((int)); double fmod Params((double, double)); char *getenv Params((char *)); char *getmem Params((unsigned)); + /* char *index Params((char *s, int c)); + */ pointer malloc Params((msize)); pointer realloc Params((pointer, unsigned)); + /* char *strchr Params((char *s, int i)); int strcmp Params((char *s1, char *s2)); char *strcpy Params((char *s1, char *s2)); + */ #if VMS #ifndef Graphics char *strncat Params((char *s1, char *s2, int n)); *************** *** 30,38 **** --- 43,53 ---- char *strncpy Params((char *s1, char *s2, int n)); #endif /* Graphics */ #else /* VMS */ + /* char *strncat Params((char *s1, char *s2, int n)); int strncmp Params((char *s1, char *s2, int n)); char *strncpy Params((char *s1, char *s2, int n)); + */ #endif /* VMS */ #endif /* MacGraph */ *************** *** 42,44 **** --- 57,63 ---- #ifdef SystemFnc int system Params((char *)); #endif /* SystemFnc */ + /* + * End of operating-system specific code. + */ + diff -r -c -N Icon.orig/src/h/fdefs.h Icon-9.1/src/h/fdefs.h *** Icon.orig/src/h/fdefs.h Sun Feb 25 18:07:08 1996 --- Icon-9.1/src/h/fdefs.h Mon Sep 23 13:10:17 1996 *************** *** 5,11 **** /* * These are the functions in the standard repertoire. */ ! FncDef(abs,1) FncDef(any,4) FncDef(args,1) --- 5,17 ---- /* * These are the functions in the standard repertoire. */ ! /* The following code is operating-system dependent [@fdefs.01]. ! * some functions may be added or removed depending on the port ! */ ! #if PORT ! /* at least checking this file is needed */ ! Deliberate syntax error ! #endif /* PORT */ FncDef(abs,1) FncDef(any,4) FncDef(args,1) *************** *** 18,24 **** FncDef(copy,1) FncDef(cset,1) ! #if UNIX || VMS || OS2_32 || NT || SCCX_MX FncDef(delay,1) #endif /* UNIX || VMS || OS2_32 || NT ... */ --- 24,30 ---- FncDef(copy,1) FncDef(cset,1) ! #if AMIGA_GCC || UNIX || VMS || OS2_32 || NT || SCCX_MX FncDef(delay,1) #endif /* UNIX || VMS || OS2_32 || NT ... */ *************** *** 193,198 **** --- 199,211 ---- #endif /* ArmFncs */ /* + * Functions for the Amiga. + */ + #ifdef AmigaFncs + FncDef(rexxcmd,2) + #endif + + /* * Functions to support program visualization. */ *************** *** 273,275 **** --- 286,292 ---- FncDef(paramnames,2) FncDef(fieldnames,1) #endif /* MultiThread */ + /* + * End of operating-system specific code. + */ + diff -r -c -N Icon.orig/src/h/features.h Icon-9.1/src/h/features.h *** Icon.orig/src/h/features.h Sun Feb 25 18:07:08 1996 --- Icon-9.1/src/h/features.h Sun Sep 22 17:36:42 1996 *************** *** 18,26 **** --- 18,36 ---- Feature(1, "_V9", 0) /* Version 9 (unconditional) */ + /* The following code is operating-system dependent [@features.01]. + * most features definitions may depend on the port + */ + #if PORT + /* This is where you can identify the port to icon programs */ + Deliberate syntax error + #endif /* PORT */ #if AMIGA Feature(1, "_AMIGA", "Amiga") #endif /* AMIGA */ + #if AMIGA_GCC + Feature(1, "_AMIGA_GCC", "Amiga gcc") + #endif /* AMIGA_GCC */ #if ARM Feature(1, "_ACORN", "Acorn Archimedes") #endif /* ARM */ *************** *** 145,147 **** --- 155,165 ---- #ifdef DosFncs Feature(1, "_DOS_FUNCTIONS", "MS-DOS extensions") #endif /* DosFncs */ + + #ifdef AmigaFncs + Feature(1, "_AMIGA_FUNCTIONS", "Amiga extensions") + #endif + /* + * End of operating-system specific code. + */ + diff -r -c -N Icon.orig/src/h/graphics.h Icon-9.1/src/h/graphics.h *** Icon.orig/src/h/graphics.h Sun Feb 25 18:07:11 1996 --- Icon-9.1/src/h/graphics.h Sun Sep 22 17:51:19 1996 *************** *** 1,6 **** --- 1,16 ---- /* * graphics.h - macros and types used in Icon's graphics interface. */ + + /* The following code is operating-system dependent [@graphics.01]. + * files to include depend upon the operating system + */ + + #if PORT + /* you need to write and include a new file for a new port + Deliberate Syntax error + #endif /* PORT */ + #endif #ifdef MacGraph #include "::h:macgraph.h" #endif /* MacGraph */ *************** *** 16,21 **** --- 26,35 ---- #ifdef MSWindows #include "../h/mswin.h" #endif /* MSWindows */ + /* + * End of operating-system specific code. + */ + #ifndef MAXXOBJS #define MAXXOBJS 256 *************** *** 81,86 **** --- 95,109 ---- #define EQUEUELEN 256 + /* The following code is operating-system dependent [@graphics.02]. + * most internal data structures do depend on the graphic system used + */ + + #if PORT + /* extensive changes to these may be needed for a new port */ + Deliberate Syntax error + #endif /* PORT */ + /* * mode bits for the Icon window context (as opposed to X context) */ *************** *** 205,210 **** --- 228,236 ---- LONG height; #endif /* MSWindows */ } wfont, *wfp; + /* + * End of operating-system specific code. + */ /* *************** *** 233,238 **** --- 259,272 ---- #define PCH2 ',' /* punctuation character */ + /* The following code is operating-system dependent [@graphics.03]. + * most internal data structures do depend on the graphic system used + */ + + #if PORT + /* displays are not handled the same way on every architecture */ + Deliberate Syntax error + #endif /* PORT */ #ifdef XWindows /* * Displays are maintained in a global list in rwinrsc.r. *************** *** 427,432 **** --- 461,470 ---- int hasCaret; #endif /* MSWindows */ } wstate, *wsp; + + /* + * End of operating-system specific code. + */ /* * Icon window file variables are actually pointers to "bindings" diff -r -c -N Icon.orig/src/h/grttin.h Icon-9.1/src/h/grttin.h *** Icon.orig/src/h/grttin.h Sun Feb 25 18:07:10 1996 --- Icon-9.1/src/h/grttin.h Mon Sep 23 14:59:49 1996 *************** *** 169,174 **** --- 169,181 ---- #define MMStr(n) #endif /* EventMon */ + /* The following code is operating-system dependent [@grttin.01]. + * you might need some more typedefs to fool rtt, especially for + * graphic ports + */ + #if PORT + Deliberate Syntax Error + #endif #ifdef Graphics typedef int wbp, wsp, wcp, wdp, wclrp, wfp; *************** *** 220,225 **** --- 227,249 ---- typedef int va_list, BITMAPINFOHEADER, BITMAPFILEHEADER, BITMAPARRAYFILEHEADER; typedef int PBITMAPINFOHEADER, MinBitmapHeader, RGB; #endif /* PresentationManager */ + + #ifndef AmigaFncs + #else + #ifndef AmigaGfx + #else /* AmigaFncs or AmigaGfx */ + /* why fake it ? the true typedefs are short enough */ + #include + /* some more types to keep dos happy */ + typedef long BPTR, BSTR; + /* and now for gfx/intuition */ + typedef int Point; + #endif /* AmigaFncs or AmigaGfx */ + #endif + + /* + * End of operating-system specific code. + */ /* * Convenience macros to make up for RTL's long-windedness. diff -r -c -N Icon.orig/src/h/mproto.h Icon-9.1/src/h/mproto.h *** Icon.orig/src/h/mproto.h Sun Feb 25 18:07:11 1996 --- Icon-9.1/src/h/mproto.h Sun Sep 22 17:57:51 1996 *************** *** 49,59 **** pointer memfill Params((char *to, int con, word n)); #endif /* SysMem */ #ifndef SysOpt ! #ifndef Linux ! int getopt Params((int nargs, char **nargv, char *ostr)); ! #endif /* Linux */ #endif /* SysOpt */ #if IntBits == 16 long lstrlen Params((char *s)); --- 49,73 ---- pointer memfill Params((char *to, int con, word n)); #endif /* SysMem */ + /* The following code is operating-system dependent [@mproto.01] + * getopt might already have a prototype elsewhere + */ + #if PORT + Deliberate Syntax error + #endif /* PORT */ #ifndef SysOpt ! #ifndef Linux ! #else ! #if AMIGA_GCC ! #else /* neither Linux nor AMIGA_GCC */ ! int getopt Params((int nargs, char *const *nargv, const char *ostr)); ! #endif ! #endif #endif /* SysOpt */ + + /* + * End of operating-system specific code. + */ #if IntBits == 16 long lstrlen Params((char *s)); diff -r -c -N Icon.orig/src/h/path.h Icon-9.1/src/h/path.h *** Icon.orig/src/h/path.h Sun Feb 25 18:07:08 1996 --- Icon-9.1/src/h/path.h Mon Sep 23 17:51:35 1996 *************** *** 1 **** ! #define BinPath "/home/icon/v9/bin/" --- 1 ---- ! #define BinPath "/Projects/Icon-9.1/bin/" diff -r -c -N Icon.orig/src/h/proto.h Icon-9.1/src/h/proto.h *** Icon.orig/src/h/proto.h Sun Feb 25 18:07:11 1996 --- Icon-9.1/src/h/proto.h Sun Sep 22 17:59:14 1996 *************** *** 86,92 **** #endif /* MICROSOFT || TURBO || ZTC_386 ... */ #endif /* MSDOS || OS2 */ ! #if UNIX #ifdef StandardLib #include #include --- 86,92 ---- #endif /* MICROSOFT || TURBO || ZTC_386 ... */ #endif /* MSDOS || OS2 */ ! #if AMIGA_GCC || UNIX #ifdef StandardLib #include #include *************** *** 133,148 **** #include "../h/dproto.h" #endif /* VMS */ - /* - * End of operating-system specific code. - */ - - #ifdef KeyboardFncs - int getch Params((noargs)); - int getche Params((noargs)); - int kbhit Params((noargs)); - #endif /* KeyboardFncs */ - #ifdef MSWindows #if BORLAND_286 #define lstrlen longstrlen --- 133,138 ---- *************** *** 157,162 **** --- 147,163 ---- int Consoleputc(int c, FILE *file); int Consolefflush(FILE *file); #endif /* ConsoleWindow */ + + /* + * End of operating-system specific code. + */ + + #ifdef KeyboardFncs + int getch Params((noargs)); + int getche Params((noargs)); + int kbhit Params((noargs)); + #endif /* KeyboardFncs */ + /* * These must be after prototypes to avoid clash with system * prototypes. diff -r -c -N Icon.orig/src/h/rexterns.h Icon-9.1/src/h/rexterns.h *** Icon.orig/src/h/rexterns.h Sun Feb 25 18:07:09 1996 --- Icon-9.1/src/h/rexterns.h Sun Sep 22 18:02:42 1996 *************** *** 99,104 **** --- 99,110 ---- extern word stksize; /* size of co-expression stacks in words */ extern struct tend_desc *tend; /* chain of tended descriptors */ + /* The following code is operating-system dependent [@rexterns.01] + * some of the following externals don't exist on all architectures + */ + #if PORT + Deliberate Syntax error + #endif /* PORT */ #ifdef DosFncs extern char *zptr; #endif /* DosFncs */ *************** *** 117,122 **** --- 123,132 ---- extern long starttime; /* start time in milliseconds */ #endif /* StandardLib */ + /* + * End of operating-system specific code. + */ + #if !COMPILER /* * External declarations for the interpreter. *************** *** 188,193 **** --- 198,210 ---- extern struct b_coexpr *mainhead; /* &main */ #endif /* MultiThread */ + /* The following code is operating-system dependent [@rexterns.02] + * the interpreter behavior might vary, especially with graphics support + */ + #if PORT + Deliberate syntax error + #endif /* PORT */ + #ifdef Polling extern int pollctr; #endif /* Polling */ *************** *** 249,259 **** #endif /* ConsoleWindow */ #endif /* Graphics */ ! #if UNIX #ifdef KeyboardFncs extern int keyboard_error; #endif /* KeyboardFncs */ #endif /* UNIX */ #ifdef EventMon extern word oldsum; --- 266,280 ---- #endif /* ConsoleWindow */ #endif /* Graphics */ ! #if AMIGA_GCC || UNIX #ifdef KeyboardFncs extern int keyboard_error; #endif /* KeyboardFncs */ #endif /* UNIX */ + + /* + * End of operating-system specific code. + */ #ifdef EventMon extern word oldsum; diff -r -c -N Icon.orig/src/h/rmacros.h Icon-9.1/src/h/rmacros.h *** Icon.orig/src/h/rmacros.h Sun Feb 25 18:07:08 1996 --- Icon-9.1/src/h/rmacros.h Fri Sep 20 15:38:57 1996 *************** *** 504,512 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ARM || ATARI_ST || MACINTOSH || MVS || UNIX || VM || VMS #define PushAVal(x) PushVal(x) ! #endif /* AMIGA || ARM || ATARI_ST ... */ #if MSDOS || OS2 #if HIGHC_386 || ZTC_386 || INTEL_386 || WATCOM || BORLAND_386 || SCCX_MX --- 504,512 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ARM || ATARI_ST || MACINTOSH || MVS || UNIX || VM || VMS #define PushAVal(x) PushVal(x) ! #endif /* AMIGA_GCC || AMIGA || ARM || ATARI_ST ... */ #if MSDOS || OS2 #if HIGHC_386 || ZTC_386 || INTEL_386 || WATCOM || BORLAND_386 || SCCX_MX diff -r -c -N Icon.orig/src/h/rproto.h Icon-9.1/src/h/rproto.h *** Icon.orig/src/h/rproto.h Sun Feb 25 18:07:08 1996 --- Icon-9.1/src/h/rproto.h Sun Sep 22 18:10:36 1996 *************** *** 128,133 **** --- 128,139 ---- char *qsearch Params((char *key,char *base,int nel,int width, int (*cmp)())); + /* The following code is operating-system dependent [@rproto.01] + * some systems might need some supplementary definitions + */ + #if PORT + Deliberate syntax error + #endif /* PORT */ /* * Temporary fix */ *************** *** 160,166 **** novalue free Params((void* addr)); #endif /* MVS || VM */ ! #if UNIX || VMS /* * We use old-style declarations instead of prototypes here to avoid conflicts * with system definitions. For example, some files don't declare --- 166,172 ---- novalue free Params((void* addr)); #endif /* MVS || VM */ ! #if AMIGA_GCC || UNIX || VMS /* * We use old-style declarations instead of prototypes here to avoid conflicts * with system definitions. For example, some files don't declare *************** *** 173,178 **** --- 179,188 ---- #endif /* ExecImages */ #endif /* UNIX || VMS */ + /* + * End of operating-system specific code. + */ + #ifdef Coexpr novalue new_context Params((int fsig, dptr cargp)); #endif /* Coexpr */ *************** *** 221,226 **** --- 231,244 ---- novalue wputstr Params((wbp w, char *s, int len)); int xyrowcol Params((dptr dx)); + + /* The following is operating-system dependent [@rproto.02] + * graphic routines that don't exist everywhere + */ + #if PORT + /* something is probably needed for every graphics port */ + Deliberate syntax error + #endif /* PORT */ /* * graphics implementation routines supplied for each platform * (excluding those defined as macros for X-windows) *************** *** 473,484 **** #endif /* PresentationManager */ #endif /* Graphics */ ! #if UNIX #ifdef KeyboardFncs int getch(), getche(), kbhit(); #endif /* KeyboardFncs */ #endif /* UNIX */ #ifdef LargeInts struct b_bignum *alcbignum Params((word n)); --- 491,517 ---- #endif /* PresentationManager */ #endif /* Graphics */ + /* + * end of operating-system specific code + */ + + /* The following code is operating-system dependent [@rproto.03] + * do we need a prototype for these ? + */ + #if PORT + /* Probably nothing needed */ + Deliberate syntax error + #endif /* PORT */ ! #if AMIGA_GCC || UNIX #ifdef KeyboardFncs int getch(), getche(), kbhit(); #endif /* KeyboardFncs */ #endif /* UNIX */ + + /* + * End of operating-system specific code. + */ #ifdef LargeInts struct b_bignum *alcbignum Params((word n)); diff -r -c -N Icon.orig/src/h/sys.h Icon-9.1/src/h/sys.h *** Icon.orig/src/h/sys.h Sun Feb 25 18:07:11 1996 --- Icon-9.1/src/h/sys.h Sat Sep 21 20:18:59 1996 *************** *** 11,17 **** */ #ifndef AllowConst #define const /* make const disapear */ ! #endif /* StandardLib */ /* * The following code is operating-system dependent [@sys.01]. Include files --- 11,17 ---- */ #ifndef AllowConst #define const /* make const disapear */ ! #endif /* AllowConst */ /* * The following code is operating-system dependent [@sys.01]. Include files *************** *** 165,171 **** #include #endif /* ConsoleWindow */ ! #if UNIX #ifdef ATT3B #include --- 165,171 ---- #include #endif /* ConsoleWindow */ ! #if AMIGA_GCC || UNIX #ifdef ATT3B #include *************** *** 222,228 **** #include #endif /* LoadFunc */ ! #endif /* UNIX */ #if VMS #include --- 222,228 ---- #include #endif /* LoadFunc */ ! #endif /* AMIGA_GCC || UNIX */ #if VMS #include diff -r -c -N Icon.orig/src/icont/amigahdr.c Icon-9.1/src/icont/amigahdr.c *** Icon.orig/src/icont/amigahdr.c Thu Jan 1 00:00:00 1970 --- Icon-9.1/src/icont/amigahdr.c Mon Sep 23 17:39:38 1996 *************** *** 0 **** --- 1,117 ---- + /* amiga OS 2.04 version of ixhdr */ + + /* The amiga version of the iconx header is using overlays (see smakefile) + * - the whole file is not loaded or even tested, which is nice since the + * end is not a valid amigaDOS executable file. + * - this file doesn't use any startup code, and is thus VERY small + */ + + /* we are working in a tiny model, with NO external linkage at all !!! */ + + #include + #include + #include + #include + #include + #include "/h/config.h" + #include + #include + + #define MAXDIRLENGTH 1000 + #define MAXNAMELENGTH 140 + + + #ifdef HardWiredPaths + #ifndef Iconx + #define Iconx IconxPath + #endif /* Iconx */ + #else + #define Iconx iconxstring + #endif /* HardWiredPaths */ + + #ifdef register + #undef register + #endif + + int __asm start(register __a0 char *commandline, register __d0 int length) + { + char *iconxstring = "ICONX:"; + struct Process *myself = FindTask(0); + int exitcode = 0; + + if (myself->pr_CLI) + /* running from Cli */ + { + struct DosLibrary *DOSBase; + DOSBase = OpenLibrary("dos.library", 37); + if (DOSBase) + { + char *programdir; + + programdir = AllocVec(MAXDIRLENGTH * 2 + MAXNAMELENGTH, MEMF_ANY); + if (programdir) + { + char *programname, *ibuffer; + char *iconname; + int pdirlength, ilength; + + programname = programdir + MAXDIRLENGTH; + ibuffer = programname + MAXNAMELENGTH; + /* should check for errors */ + /* rebuild our command name with full path for passing to iconx */ + /* note that ProgramDir being correct is a responsability of the shell */ + NameFromLock(GetProgramDir(), programdir, MAXDIRLENGTH); + GetProgramName(programname, MAXNAMELENGTH); + AddPart(programdir, programname, MAXDIRLENGTH); + + pdirlength = strlen(programdir); + /* try to obtain iconx name */ + ilength = GetVar("ICONX", ibuffer, MAXDIRLENGTH, GVF_GLOBAL_ONLY); + if (ilength < 0) + { + iconname = Iconx; + ilength = strlen(Iconx); + } + else + iconname = ibuffer; + /* put command line together */ + { + char *system; + + system = AllocVec(pdirlength + length + ilength + 8, MEMF_ANY|MEMF_CLEAR); + if (system) + { + strcpy(system, iconname); + strncat(system, " \"", 2); + strncat(system, programdir, pdirlength); + strncat(system, "\" ", 2); + strncat(system, commandline, length); + } + FreeVec(programdir); + if (system) + { + ULONG tags = TAG_END; + /* call iconx */ + exitcode = SystemTagList(system, &tags); + FreeVec(system); + } + } + } + CloseLibrary(DOSBase); + } + } + else + { + struct Message *wbmsg; + + WaitPort(&myself->pr_MsgPort); + wbmsg = GetMsg(&myself->pr_MsgPort); + /* for the time being, we don't run from workbench */ + if (wbmsg) + { + Forbid(); + ReplyMsg(wbmsg); + } + } + return exitcode; + } diff -r -c -N Icon.orig/src/icont/amigaovs.a Icon-9.1/src/icont/amigaovs.a *** Icon.orig/src/icont/amigaovs.a Thu Jan 1 00:00:00 1970 --- Icon-9.1/src/icont/amigaovs.a Mon Sep 23 00:08:44 1996 *************** *** 0 **** --- 1,34 ---- + TTL Stub overlay manager + + ; we just want to have a FAKE overlay manager + ; since nothing will EVER use it + ; These are the minimal definitions necessary + + + xdef _ovlyMgr + xref _start + + section NTRYHUNK,CODE + + FIRST bra.b Second + cnop 0,4 + + * This next word serves to identify the overlay + * supervisor to 'unloader'. + + DC.L $0000ABCD + + + * The loader plants values in the next locations. + + _fileHandle DC.L 0 + _ovlyTable DC.L 0 + _hunkTable DC.L 0 + DC.L 0 ;Global vector + + Second + jmp _start + + _ovlyMgr + end + diff -r -c -N Icon.orig/src/icont/amigastub.c Icon-9.1/src/icont/amigastub.c *** Icon.orig/src/icont/amigastub.c Thu Jan 1 00:00:00 1970 --- Icon-9.1/src/icont/amigastub.c Sat Sep 21 15:33:27 1996 *************** *** 0 **** --- 1 ---- + /* zap.c */ diff -r -c -N Icon.orig/src/icont/link.c Icon-9.1/src/icont/link.c *** Icon.orig/src/icont/link.c Sun Feb 25 18:06:44 1996 --- Icon-9.1/src/icont/link.c Sat Sep 21 00:12:07 1996 *************** *** 68,74 **** #endif /* MICROSOFT || CSET2 */ #endif /* OS2 */ ! #if UNIX #ifdef CRAY #define word word_fubar #include --- 68,74 ---- #endif /* MICROSOFT || CSET2 */ #endif /* OS2 */ ! #if AMIGA_GCC || UNIX #ifdef CRAY #define word word_fubar #include *************** *** 186,192 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ARM || ATARI_ST || MACINTOSH || MVS || UNIX || VM || VMS /* nothing to do */ #endif /* AMIGA || ARM || ATARI_ST || ... */ --- 186,192 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ARM || ATARI_ST || MACINTOSH || MVS || UNIX || VM || VMS /* nothing to do */ #endif /* AMIGA || ARM || ATARI_ST || ... */ *************** *** 514,520 **** } #endif /* OS2 */ ! #if UNIX { struct stat stbuf; int u, r, m; --- 514,520 ---- } #endif /* OS2 */ ! #if AMIGA_GCC || UNIX { struct stat stbuf; int u, r, m; diff -r -c -N Icon.orig/src/icont/smakefile Icon-9.1/src/icont/smakefile *** Icon.orig/src/icont/smakefile Thu Jan 1 00:00:00 1970 --- Icon-9.1/src/icont/smakefile Mon Sep 23 00:30:32 1996 *************** *** 0 **** --- 1,19 ---- + amigahdr.hdr: amigahdr.o amigastub.o amigaovs.o + blink #endif /* AMIGA */ ! #if ARM || MVS || UNIX || VM || VMS /* nothing is needed */ #endif /* ARM || ... */ --- 68,74 ---- #include #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || MVS || UNIX || VM || VMS /* nothing is needed */ #endif /* ARM || ... */ *************** *** 123,129 **** Deliberate Syntax Error #endif /* PORT */ ! #if UNIX || AMIGA || ATARI_ST || MACINTOSH || MSDOS || MVS || OS2 || VM char *refpath = RefPath; #endif /* UNIX ... */ --- 123,129 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || UNIX || AMIGA || ATARI_ST || MACINTOSH || MSDOS || MVS || OS2 || VM char *refpath = RefPath; #endif /* UNIX ... */ *************** *** 142,147 **** --- 142,156 ---- extern int optopt; /* character checked for validity */ extern char *optarg; /* argument associated with option */ + + /* The following code is operating-system dependent [@tmain.03] + * main icont calling sequence + */ + #if PORT + /* something is needed */ + Deliberate syntax error + #endif /* PORT */ + #ifdef ConsoleWindow int ConsolePause = 1; #endif /* ConsoleWindow */ *************** *** 322,328 **** */ #if !THINK_C ! novalue main(argc, argv) #else /* THINK_C */ novalue MacMain(argc,argv) #endif /* !THINKC_C */ --- 331,337 ---- */ #if !THINK_C ! int main(argc, argv) #else /* THINK_C */ novalue MacMain(argc,argv) #endif /* !THINKC_C */ *************** *** 741,747 **** exit(NormalExit); } ! /* * execute - execute iconx to run the icon program */ --- 750,769 ---- exit(NormalExit); } ! ! /* ! * End of operating-system specific code. ! */ ! /* ! * The following code is operating-system dependent [@tmain.04]. It calls ! * iconx on the way out. ! */ ! ! #if PORT ! /* something is needed */ ! Deliberate Syntax Error ! #endif /* PORT */ ! /* * execute - execute iconx to run the icon program */ *************** *** 805,819 **** *p = NULL; - /* - * The following code is operating-system dependent [@tmain.03]. It calls - * iconx on the way out. - */ - - #if PORT - /* something is needed */ - Deliberate Syntax Error - #endif /* PORT */ #if AMIGA #if AZTEC_C --- 827,832 ---- *************** *** 896,902 **** #endif /* PresentationManager */ #endif /* OS2 */ ! #if UNIX /* * If an ICONX environment variable is defined, use that. * If not, first try the predefined path, then search $PATH via execvp. --- 909,915 ---- #endif /* PresentationManager */ #endif /* OS2 */ ! #if AMIGA_GCC || UNIX /* * If an ICONX environment variable is defined, use that. * If not, first try the predefined path, then search $PATH via execvp. *************** *** 915,922 **** execv(argv[0], argv); #endif /* CRAY */ #endif /* HardWiredPaths */ ! argv[0] = "iconx"; execvp(argv[0], argv); /* if no iconxloc, search path for "iconx" */ #ifdef HardWiredPaths --- 928,938 ---- execv(argv[0], argv); #endif /* CRAY */ #endif /* HardWiredPaths */ ! #if AMIGA_GCC ! argv[0] = "iconx:"; ! #else argv[0] = "iconx"; + #endif execvp(argv[0], argv); /* if no iconxloc, search path for "iconx" */ #ifdef HardWiredPaths diff -r -c -N Icon.orig/src/preproc/files.c Icon-9.1/src/preproc/files.c *** Icon.orig/src/preproc/files.c Sun Feb 25 18:07:18 1996 --- Icon-9.1/src/preproc/files.c Mon Sep 23 01:41:58 1996 *************** *** 34,42 **** #endif /* TURBO || BORLAND_286 ... */ #endif /* MSDOS */ ! #if UNIX || VMS /* nothing is needed */ ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 34,42 ---- #endif /* TURBO || BORLAND_286 ... */ #endif /* MSDOS */ ! #if AMIGA_GCC || UNIX || VMS /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS */ /* * End of operating-system specific code. *************** *** 93,101 **** *s = '/'; #endif /* MSDOS */ ! #if UNIX || VMS /* nothing is needed */ ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 93,101 ---- *s = '/'; #endif /* MSDOS */ ! #if AMIGA_GCC || UNIX || VMS /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS */ /* * End of operating-system specific code. *************** *** 456,461 **** --- 456,466 ---- n_paths = 1; #endif /* UNIX */ + #if AMIGA_GCC + static char *sysdir[2] = {"gnu:include/", "gnu:os-include/"}; + + n_paths = 2; + #endif /* AMIGA_GCC */ /* * End of operating-system specific code. */ *************** *** 571,579 **** #endif /* HIGHC_386 || INTEL_386 || ... */ #endif /* MSDOS */ ! #if UNIX || VMS || MACINTOSH /* nothing is needed */ ! #endif /* UNIX || VMS || MACINTOSH */ /* * End of operating-system specific code. --- 576,584 ---- #endif /* HIGHC_386 || INTEL_386 || ... */ #endif /* MSDOS */ ! #if AMIGA_GCC || UNIX || VMS || MACINTOSH /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS || MACINTOSH */ /* * End of operating-system specific code. *************** *** 617,625 **** *s = '/'; #endif /* MSDOS */ ! #if UNIX || VMS /* nothing is needed */ ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 622,630 ---- *s = '/'; #endif /* MSDOS */ ! #if AMIGA_GCC || UNIX || VMS /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS */ /* * End of operating-system specific code. *************** *** 704,709 **** --- 709,718 ---- #endif /* HIGHC_386 || INTEL_386 || ... */ #endif /* MSDOS */ + #if AMIGA_GCC + incl_search[n_paths - 2] = sysdir[0]; + incl_search[n_paths - 1] = sysdir[1]; + #endif /* AMIGA_GCC */ #if UNIX || MACINTOSH incl_search[n_paths - 1] = sysdir; #endif /* UNIX || MACINTOSH */ diff -r -c -N Icon.orig/src/preproc/pinit.c Icon-9.1/src/preproc/pinit.c *** Icon.orig/src/preproc/pinit.c Sun Feb 25 18:07:18 1996 --- Icon-9.1/src/preproc/pinit.c Sun Sep 22 16:09:54 1996 *************** *** 47,55 **** /* ??? */ #endif /* VM */ ! #if UNIX || VMS /* nothing is needed */ ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 47,55 ---- /* ??? */ #endif /* VM */ ! #if AMIGA_GCC || UNIX || VMS /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS || */ /* * End of operating-system specific code. *************** *** 538,543 **** --- 538,547 ---- do_directive("#define unix 1\n"); do_directive(PPInit); /* defines that vary between Unix systems */ #endif /* UNIX */ + #if AMIGA_GCC + do_directive("#define AMIGA 1\n"); + do_directive(PPInit); /* other defines eventually */ + #endif /* AMIGA_GCC */ #if VMS /* nothing is needed */ *************** *** 819,827 **** /* ??? we'll see... */ #endif /* MVS || VM */ ! #if UNIX || VMS /* nothing is needed */ ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 823,831 ---- /* ??? we'll see... */ #endif /* MVS || VM */ ! #if AMIGA_GCC || UNIX || VMS /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS */ /* * End of operating-system specific code. diff -r -c -N Icon.orig/src/preproc/pmain.c Icon-9.1/src/preproc/pmain.c *** Icon.orig/src/preproc/pmain.c Sun Feb 25 18:07:17 1996 --- Icon-9.1/src/preproc/pmain.c Sat Sep 21 20:27:18 1996 *************** *** 55,65 **** /* ??? may need more options */ #endif /* VM || MVS */ ! #if UNIX || VMS static char *ostr = "CPD:I:U:o:"; static char *options = "[-C] [-P] [-Dname[=[text]]] [-Uname] [-Ipath] [-ofile] [files]"; ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 55,65 ---- /* ??? may need more options */ #endif /* VM || MVS */ ! #if AMIGA_GCC || UNIX || VMS static char *ostr = "CPD:I:U:o:"; static char *options = "[-C] [-P] [-Dname[=[text]]] [-Uname] [-Ipath] [-ofile] [files]"; ! #endif /* AMIGA_GCC || UNIX || VMS */ /* * End of operating-system specific code. *************** *** 164,172 **** /* ??? we'll see */ #endif /* MVS || VM */ ! #if UNIX || VMS /* nothing is needed */ ! #endif /* UNIX || VMS */ /* * End of operating-system specific code. --- 164,172 ---- /* ??? we'll see */ #endif /* MVS || VM */ ! #if AMIGA_GCC || UNIX || VMS /* nothing is needed */ ! #endif /* AMIGA_GCC || UNIX || VMS */ /* * End of operating-system specific code. diff -r -c -N Icon.orig/src/preproc/pproto.h Icon-9.1/src/preproc/pproto.h *** Icon.orig/src/preproc/pproto.h Sun Feb 25 18:07:18 1996 --- Icon-9.1/src/preproc/pproto.h Sun Sep 22 16:23:59 1996 *************** *** 4,19 **** long conditional Params((struct token **tp, struct token *trigger)); struct token *copy_t Params((struct token *t)); ! novalue err1 Params((char *s)); ! novalue err2 Params((char *s1, char *s2)); ! novalue errfl1 Params((char *f, int l, char *s)); ! novalue errfl2 Params((char *f, int l, char *s1, char *s2)); ! novalue errfl3 Params((char *f, int l, char *s1, char *s2, ! char *s3)); ! novalue errt1 Params((struct token *t, char *s)); ! novalue errt2 Params((struct token *t, char *s1, char *s2)); ! novalue errt3 Params((struct token *t, char *s1, char *s2, ! char *s3)); int eval Params((struct token *trigger)); novalue fill_cbuf Params((noargs)); novalue free_id_lst Params((struct id_lst *ilst)); --- 4,17 ---- long conditional Params((struct token **tp, struct token *trigger)); struct token *copy_t Params((struct token *t)); ! NoReturn(novalue err1 Params((char *s))); ! NoReturn(novalue err2 Params((char *s1, char *s2))); ! NoReturn(novalue errfl1 Params((char *f, int l, char *s))); ! NoReturn(novalue errfl2 Params((char *f, int l, char *s1, char *s2))); ! NoReturn(novalue errfl3 Params((char *f, int l, char *s1, char *s2, char *s3))); ! NoReturn(novalue errt1 Params((struct token *t, char *s))); ! NoReturn(novalue errt2 Params((struct token *t, char *s1, char *s2))); ! NoReturn(novalue errt3 Params((struct token *t, char *s1, char *s2, char *s3))); int eval Params((struct token *trigger)); novalue fill_cbuf Params((noargs)); novalue free_id_lst Params((struct id_lst *ilst)); diff -r -c -N Icon.orig/src/rtt/rttmain.c Icon-9.1/src/rtt/rttmain.c *** Icon.orig/src/rtt/rttmain.c Sun Feb 25 18:06:48 1996 --- Icon-9.1/src/rtt/rttmain.c Sat Sep 21 20:28:52 1996 *************** *** 24,30 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ATARI_ST || MACINTOSH || MSDOS || OS2 || UNIX char *refpath = RefPath; #endif /* AMIGA || ... ... */ --- 24,30 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ATARI_ST || MACINTOSH || MSDOS || OS2 || UNIX char *refpath = RefPath; #endif /* AMIGA || ... ... */ *************** *** 63,69 **** #if AMIGA char *grttin_path = "/h/grttin.h"; char *rt_path = "/h/rt.h"; ! #endif /* AMIGA */ #if MACINTOSH char *grttin_path = ":h:grttin.h"; --- 63,69 ---- #if AMIGA char *grttin_path = "/h/grttin.h"; char *rt_path = "/h/rt.h"; ! #endif /* AMIGA */ #if MACINTOSH char *grttin_path = ":h:grttin.h"; *************** *** 85,94 **** char *rt_path = "rt.h"; #endif /* VMS || VM */ ! #if UNIX char *grttin_path = "../src/h/grttin.h"; char *rt_path = "../src/h/rt.h"; ! #endif /* UNIX */ /* * End of operating-system specific code. --- 85,94 ---- char *rt_path = "rt.h"; #endif /* VMS || VM */ ! #if AMIGA_GCC || UNIX char *grttin_path = "../src/h/grttin.h"; char *rt_path = "../src/h/rt.h"; ! #endif /* AMIGA_GCC || UNIX */ /* * End of operating-system specific code. diff -r -c -N Icon.orig/src/runtime/amiga_code.i Icon-9.1/src/runtime/amiga_code.i *** Icon.orig/src/runtime/amiga_code.i Thu Jan 1 00:00:00 1970 --- Icon-9.1/src/runtime/amiga_code.i Mon Sep 23 19:21:47 1996 *************** *** 0 **** --- 1,93 ---- + /* amiga_code.i */ + + /* There are sooo many conflicts between rtt and amigados + * that it is easier to separate the actual C-code + */ + + #define _SYS_TIME_H + #include + #include + #include + #include + #include + + + + #include + #include + #include + + #include + + + /* Rexx interface */ + static struct MsgPort *rexxport = 0; + static struct Library *RexxSysBase = 0; + static struct RexxMsg *rexxmsg = 0; + + static void termRexx() + { + if (rexxmsg) + DeleteRexxMsg(rexxmsg); + if (RexxSysBase) + CloseLibrary(RexxSysBase); + if (rexxport) + DeleteMsgPort(rexxport); + } + + static void initRexx() + { + rexxport = CreateMsgPort(); + if (!rexxport) + return; + RexxSysBase = OpenLibrary(RXSNAME, 0); + if (!RexxSysBase) + return; + rexxmsg = CreateRexxMsg(rexxport, NULL, NULL); + if (!rexxmsg) + return; + rexxmsg->rm_LibBase = RexxSysBase; + } + + static void AmigaTerm() + { + termRexx(); + } + + void amiga_init(void) + { + atexit(AmigaTerm); + initRexx(); + } + + + static char *send_rexx_command(char *portname, char *cmd, int len) + { + struct MsgPort *send; + + rexxmsg->rm_Action = RXCOMM | RXFF_RESULT; + rexxmsg->rm_Args[0] = CreateArgstring(cmd, len); + rexxmsg->rm_Result2 = NULL; + /* send it */ + Forbid(); + if (send = FindPort(portname)) + PutMsg(send, rexxmsg); + Permit(); + + if (send) + { + while (!GetMsg(rexxport)) + WaitPort(rexxport); + } + DeleteArgstring(rexxmsg->rm_Args[0]); + /* no port -> Fail */ + if (!send) + return NULL; + else + return (char *)rexxmsg->rm_Result2; + } + + static void free_rexx_result(void) + { + DeleteArgstring(rexxmsg->rm_Result2); + } diff -r -c -N Icon.orig/src/runtime/cnv.r Icon-9.1/src/runtime/cnv.r *** Icon.orig/src/runtime/cnv.r Sun Feb 25 18:06:53 1996 --- Icon-9.1/src/runtime/cnv.r Sat Sep 21 23:45:16 1996 *************** *** 1143,1149 **** #if HIGHC_386 sprintf(s,"%.*g", Precision, n); #else /* HIGHC_386 */ ! #if AMIGA || ARM || ATARI_ST || MSDOS || OS2 || UNIX || VMS gcvt(n, Precision, s); #endif /* AMIGA || ARM || ATARI_ST || ... */ #endif /* HIGHC_386 */ --- 1143,1149 ---- #if HIGHC_386 sprintf(s,"%.*g", Precision, n); #else /* HIGHC_386 */ ! #if AMIGA_GCC || AMIGA || ARM || ATARI_ST || MSDOS || OS2 || UNIX || VMS gcvt(n, Precision, s); #endif /* AMIGA || ARM || ATARI_ST || ... */ #endif /* HIGHC_386 */ diff -r -c -N Icon.orig/src/runtime/fsys.r Icon-9.1/src/runtime/fsys.r *** Icon.orig/src/runtime/fsys.r Sun Feb 25 18:06:53 1996 --- Icon-9.1/src/runtime/fsys.r Sun Sep 22 15:46:05 1996 *************** *** 22,28 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ATARI_ST || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing to do */ #endif /* AMIGA || ATARI_ST || ... */ --- 22,28 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ATARI_ST || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing to do */ #endif /* AMIGA || ATARI_ST || ... */ *************** *** 74,80 **** else #endif /* Graphics */ ! #if ARM || OS2 || UNIX || VMS /* * Close pipe if pipes are supported. */ --- 74,80 ---- else #endif /* Graphics */ ! #if AMIGA_GCC || ARM || OS2 || UNIX || VMS /* * Close pipe if pipes are supported. */ *************** *** 237,245 **** #endif /* LSC */ #endif /* MACINTOSH */ ! #if OS2 || UNIX || VMS extern FILE *popen(); ! #endif /* OS2 || UNIX || VMS */ /* * End of operating-system specific code. --- 237,245 ---- #endif /* LSC */ #endif /* MACINTOSH */ ! #if AMIGA_GCC || OS2 || UNIX || VMS extern FILE *popen(); ! #endif /* AMIGA_GCC || OS2 || UNIX || VMS */ /* * End of operating-system specific code. *************** *** 267,275 **** /* translated mode could be supported, but is not now */ #endif /* AMIGA */ ! #if ARM || UNIX || VMS /* nothing to do */ ! #endif /* ARM || UNIX || VMS */ #if ATARI_ST || MSDOS || MVS || OS2 || VM untranslated = 0; --- 267,275 ---- /* translated mode could be supported, but is not now */ #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || UNIX || VMS /* nothing to do */ ! #endif /* AMIGA_GCC || ARM || UNIX || VMS */ #if ATARI_ST || MSDOS || MVS || OS2 || VM untranslated = 0; *************** *** 336,342 **** continue; /* no-op */ #endif /* AMIGA */ ! #if ARM || UNIX || VMS case 't': case 'T': case 'u': --- 336,342 ---- continue; /* no-op */ #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || UNIX || VMS case 't': case 'T': case 'u': *************** *** 346,352 **** case 'P': status |= Fs_Pipe; continue; ! #endif /* ARM || UNIX || VMS */ #if ATARI_ST || MSDOS || OS2 || SASC case 't': --- 346,352 ---- case 'P': status |= Fs_Pipe; continue; ! #endif /* AMIGA_GCC || ARM || UNIX || VMS */ #if ATARI_ST || MSDOS || OS2 || SASC case 't': *************** *** 455,461 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ARM || UNIX || VMS if ((status & (Fs_Read|Fs_Write)) == (Fs_Read|Fs_Write)) mode[1] = '+'; #endif /* AMIGA || ARM || UNIX || VMS */ --- 455,461 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ARM || UNIX || VMS if ((status & (Fs_Read|Fs_Write)) == (Fs_Read|Fs_Write)) mode[1] = '+'; #endif /* AMIGA || ARM || UNIX || VMS */ *************** *** 545,551 **** } else #endif /* Graphics */ ! #if ARM || OS2 || UNIX || VMS if (status & Fs_Pipe) { if (status != (Fs_Read|Fs_Pipe) && status != (Fs_Write|Fs_Pipe)) runerr(209, spec); --- 545,551 ---- } else #endif /* Graphics */ ! #if AMIGA_GCC || ARM || OS2 || UNIX || VMS if (status & Fs_Pipe) { if (status != (Fs_Read|Fs_Pipe) && status != (Fs_Write|Fs_Pipe)) runerr(209, spec); *************** *** 886,899 **** } #endif /* AMIGA || ARM || ATARI_ST ... */ ! #if UNIX if (link(s1,s2) != 0) fail; if (unlink(s1) != 0) { unlink(s2); /* try to undo partial rename */ fail; } ! #endif /* UNIX */ /* * End of operating-system specific code. --- 886,899 ---- } #endif /* AMIGA || ARM || ATARI_ST ... */ ! #if AMIGA_GCC || UNIX if (link(s1,s2) != 0) fail; if (unlink(s1) != 0) { unlink(s2); /* try to undo partial rename */ fail; } ! #endif /* AMIGA_GCC || UNIX */ /* * End of operating-system specific code. *************** *** 1057,1065 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || OS2 || UNIX i = ((system(s) >> 8) & 0377); ! #endif /* AMIGA || OS2 || ... */ #if MSDOS #if HIGHC_386 --- 1057,1065 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || OS2 || UNIX i = ((system(s) >> 8) & 0377); ! #endif /* AMIGA_GCC || AMIGA || OS2 || ... */ #if MSDOS #if HIGHC_386 *************** *** 1429,1435 **** GenWrite(writes, False, False) /* writes(s, ...) - write with no new-line */ #ifdef KeyboardFncs ! #if UNIX int keyboard_error; #endif /* UNIX */ --- 1429,1435 ---- GenWrite(writes, False, False) /* writes(s, ...) - write with no new-line */ #ifdef KeyboardFncs ! #if AMIGA_GCC || UNIX int keyboard_error; #endif /* UNIX */ *************** *** 1441,1447 **** } body { int i; ! #if UNIX keyboard_error = 0; #endif /* UNIX */ #ifndef ConsoleWindow --- 1441,1447 ---- } body { int i; ! #if AMIGA_GCC || UNIX keyboard_error = 0; #endif /* UNIX */ #ifndef ConsoleWindow *************** *** 1451,1457 **** if (wgetchne((wbp)OpenConsole(), &res) < 0) fail; i = *StrLoc(res); #endif /* ConsoleWindow */ ! #if UNIX if (keyboard_error) runerr(keyboard_error); #endif /* UNIX */ if (i<0 || i>255) --- 1451,1457 ---- if (wgetchne((wbp)OpenConsole(), &res) < 0) fail; i = *StrLoc(res); #endif /* ConsoleWindow */ ! #if AMIGA_GCC || UNIX if (keyboard_error) runerr(keyboard_error); #endif /* UNIX */ if (i<0 || i>255) *************** *** 1468,1474 **** } body { int i; ! #if UNIX keyboard_error = 0; #endif /* UNIX */ #ifndef ConsoleWindow --- 1468,1474 ---- } body { int i; ! #if AMIGA_GCC || UNIX keyboard_error = 0; #endif /* UNIX */ #ifndef ConsoleWindow *************** *** 1478,1484 **** if (wgetche((wbp)OpenConsole(), &res) < 0) fail; i = *StrLoc(res); #endif /* ConsoleWindow */ ! #if UNIX if (keyboard_error) runerr(keyboard_error); #endif /* UNIX */ if (i<0 || i>255) --- 1478,1484 ---- if (wgetche((wbp)OpenConsole(), &res) < 0) fail; i = *StrLoc(res); #endif /* ConsoleWindow */ ! #if AMIGA_GCC || UNIX if (keyboard_error) runerr(keyboard_error); #endif /* UNIX */ if (i<0 || i>255) *************** *** 1496,1502 **** } inline { int rv; ! #if UNIX keyboard_error = 0; #endif /* UNIX */ #ifndef ConsoleWindow --- 1496,1502 ---- } inline { int rv; ! #if AMIGA_GCC || UNIX keyboard_error = 0; #endif /* UNIX */ #ifndef ConsoleWindow *************** *** 1514,1520 **** } fail; #endif /* ConsoleWindow */ ! #if UNIX if (keyboard_error) runerr(keyboard_error); #endif /* UNIX */ if (rv) { --- 1514,1520 ---- } fail; #endif /* ConsoleWindow */ ! #if AMIGA_GCC || UNIX if (keyboard_error) runerr(keyboard_error); #endif /* UNIX */ if (rv) { *************** *** 1548,1554 **** runerr(121); #endif /* AMIGA || ARM || MACINTOSH ... */ ! #if ATARI_ST || MSDOS || OS2 || UNIX || VMS #if NT int nt_chdir(char *); if (nt_chdir(s) != 0) --- 1548,1554 ---- runerr(121); #endif /* AMIGA || ARM || MACINTOSH ... */ ! #if AMIGA_GCC || ATARI_ST || MSDOS || OS2 || UNIX || VMS #if NT int nt_chdir(char *); if (nt_chdir(s) != 0) diff -r -c -N Icon.orig/src/runtime/fxamiga.ri Icon-9.1/src/runtime/fxamiga.ri *** Icon.orig/src/runtime/fxamiga.ri Thu Jan 1 00:00:00 1970 --- Icon-9.1/src/runtime/fxamiga.ri Mon Sep 23 19:22:04 1996 *************** *** 0 **** --- 1,44 ---- + /* this code NEEDS not to get through rtt */ + + #passthru #include "amiga_code.i" + + function{0,2} rexxcmd(portname, command) + + if !cnv:C_string(portname) then + runerr(103,portname) + if is:null(command) then + { + abstract + { + return null + } + body + { + if (FindPort(portname)) + return nulldesc; + else + fail; + } + } + if !cnv:tmp_string(command) then + runerr(103,command) + abstract + { + return string + } + body + { + char *r; + + r = send_rexx_command(portname, StrLoc(command), StrLen(command)); + if (!r) + fail; + /* first return result */ + StrLen(result) = strlen(r); + Protect(StrLoc(result) = alcstr(r, StrLen(result)), runerr(0)); + /* don't forget to free everything BEFORE suspending */ + free_rexx_result(); + suspend result; + return C_integer rexxmsg->rm_Result1; + } + end diff -r -c -N Icon.orig/src/runtime/fxtra.r Icon-9.1/src/runtime/fxtra.r *** Icon.orig/src/runtime/fxtra.r Sun Feb 25 18:06:58 1996 --- Icon-9.1/src/runtime/fxtra.r Mon Sep 23 14:32:00 1996 *************** *** 9,15 **** * define the corresponding symbol in ../h/define.h. The functions themselves * are in separate files, included according to the defined symbols. */ ! #ifdef DosFncs #include "fxmsdos.ri" --- 9,15 ---- * define the corresponding symbol in ../h/define.h. The functions themselves * are in separate files, included according to the defined symbols. */ ! #define AmigaFncs #ifdef DosFncs #include "fxmsdos.ri" *************** *** 23,27 **** --- 23,30 ---- #include "fxvis.ri" #endif /* Visualization */ + #ifdef AmigaFncs + #include "fxamiga.ri" + #endif static char junk; /* avoid empty module */ diff -r -c -N Icon.orig/src/runtime/imain.r Icon-9.1/src/runtime/imain.r *** Icon.orig/src/runtime/imain.r Sun Feb 25 18:06:56 1996 --- Icon-9.1/src/runtime/imain.r Mon Sep 23 13:11:38 1996 *************** *** 33,45 **** Deliberate Syntax Error #endif /* PORT */ #if MACINTOSH #if MPW int NoOptions = 0; #endif /* MPW */ #endif /* MACINTOSH */ ! #if AMIGA || ARM || ATARI_ST || MSDOS || MVS || VM || OS2 || UNIX\ || VMS /* nothing needed */ #endif /* AMIGA || ARM || ATARI_ST ... */ --- 33,49 ---- Deliberate Syntax Error #endif /* PORT */ + #ifdef AmigaFncs + extern void amiga_init(void); + #endif /* AmigaFncs */ + #if MACINTOSH #if MPW int NoOptions = 0; #endif /* MPW */ #endif /* MACINTOSH */ ! #if AMIGA_GCC || AMIGA || ARM || ATARI_ST || MSDOS || MVS || VM || OS2 || UNIX\ || VMS /* nothing needed */ #endif /* AMIGA || ARM || ATARI_ST ... */ *************** *** 160,166 **** novalue MacMain (argc, argv) #else /* MacGraph */ ! novalue main(argc, argv) #endif /* MacGraph */ #endif /* OS2 */ int argc; --- 164,170 ---- novalue MacMain (argc, argv) #else /* MacGraph */ ! int main(argc, argv) #endif /* MacGraph */ #endif /* OS2 */ int argc; *************** *** 194,199 **** --- 198,207 ---- #if SASC quiet(1); /* suppress C library diagnostics */ #endif /* SASC */ + + #ifdef AmigaFncs + amiga_init(); + #endif /* AmigaFncs */ #ifdef MultiThread /* diff -r -c -N Icon.orig/src/runtime/init.r Icon-9.1/src/runtime/init.r *** Icon.orig/src/runtime/init.r Sun Feb 25 18:06:57 1996 --- Icon-9.1/src/runtime/init.r Sat Sep 21 00:11:41 1996 *************** *** 49,55 **** int stubexe; /* TRUE if resource attached to executable */ #endif /* OS2 */ ! #if ARM || ATARI_ST || MACINTOSH || MVS || VM || UNIX || VMS /* nothing needed */ #endif /* ARM || ATARI_ST || MACINTOSH ... */ --- 49,55 ---- int stubexe; /* TRUE if resource attached to executable */ #endif /* OS2 */ ! #if AMIGA_GCC || ARM || ATARI_ST || MACINTOSH || MVS || VM || UNIX || VMS /* nothing needed */ #endif /* ARM || ATARI_ST || MACINTOSH ... */ *************** *** 613,618 **** --- 613,621 ---- signal(SIGFPE, SigFncCast fpetrap); #endif /* PYRAMID */ #endif /* UNIX || VMS */ + #if AMIGA_GCC + signal(SIGFPE, SigFncCast fpetrap); + #endif /* * End of operating-system specific code. *************** *** 888,894 **** /* not done */ #endif /* AMIGA */ ! #if ARM || ATARI_ST || MACINTOSH || UNIX || OS2 || VMS if (noerrbuf) --- 891,897 ---- /* not done */ #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || ATARI_ST || MACINTOSH || UNIX || OS2 || VMS if (noerrbuf) *************** *** 971,977 **** chkbreak++; #endif /* AMIGA */ ! #if ARM || ATARI_ST || MACINTOSH || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing to do */ #endif /* ARM || ATARI_ST || ... */ --- 974,980 ---- chkbreak++; #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || ATARI_ST || MACINTOSH || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing to do */ #endif /* ARM || ATARI_ST || ... */ *************** *** 1006,1012 **** #endif /* TURBO || BORLAND_286 ... */ #endif /* MSDOS */ ! #if MVS || VM /* Really nothing to do. */ #endif /* MVS || VM */ --- 1009,1015 ---- #endif /* TURBO || BORLAND_286 ... */ #endif /* MSDOS */ ! #if AMIGA_GCC || MVS || VM /* Really nothing to do. */ #endif /* MVS || VM */ diff -r -c -N Icon.orig/src/runtime/interp.r Icon-9.1/src/runtime/interp.r *** Icon.orig/src/runtime/interp.r Sun Feb 25 18:06:56 1996 --- Icon-9.1/src/runtime/interp.r Fri Sep 20 15:51:24 1996 *************** *** 33,39 **** #endif /* LATTICE */ #endif /* AMIGA */ ! #if ARM || ATARI_ST || MACINTOSH || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing needed */ #endif /* ARM || ATARI_ST || ... */ --- 33,39 ---- #endif /* LATTICE */ #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || ATARI_ST || MACINTOSH || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing needed */ #endif /* ARM || ATARI_ST || ... */ *************** *** 191,197 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ARM || ATARI_ST || MACINTOSH || MVS || UNIX || VM || VMS #define PushAVal(x) PushVal(x) #endif /* AMIGA || ARM || ATARI_ST || ... */ --- 191,197 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ARM || ATARI_ST || MACINTOSH || MVS || UNIX || VM || VMS #define PushAVal(x) PushVal(x) #endif /* AMIGA || ARM || ATARI_ST || ... */ *************** *** 419,425 **** #endif /* LATTICE */ #endif /* AMIGA */ ! #if ARM || ATARI_ST || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing to do */ #endif /* ARM || ATARI_ST || ... */ --- 419,425 ---- #endif /* LATTICE */ #endif /* AMIGA */ ! #if AMIGA_GCC || ARM || ATARI_ST || MSDOS || MVS || OS2 || UNIX || VM || VMS /* nothing to do */ #endif /* ARM || ATARI_ST || ... */ *************** *** 1879,1885 **** #endif /* MICROSOFT || TURBO ... */ #endif /* MSDOS || OS2 */ ! #if UNIX || VMS novalue stkdump(op) int op; { --- 1879,1885 ---- #endif /* MICROSOFT || TURBO ... */ #endif /* MSDOS || OS2 */ ! #if UNIX || VMS || AMIGA_GCC novalue stkdump(op) int op; { diff -r -c -N Icon.orig/src/runtime/rlocal.r Icon-9.1/src/runtime/rlocal.r *** Icon.orig/src/runtime/rlocal.r Sun Feb 25 18:07:00 1996 --- Icon-9.1/src/runtime/rlocal.r Sun Sep 22 15:30:14 1996 *************** *** 1249,1255 **** /* End of pipe support for OS/2 */ #endif /* OS2 */ ! #if UNIX #ifdef ATTM32 /* --- 1249,1255 ---- /* End of pipe support for OS/2 */ #endif /* OS2 */ ! #if AMIGA_GCC || UNIX #ifdef ATTM32 /* *************** *** 1300,1308 **** #ifdef HaveTermio ! #define RawIOCTL TCGETA #define ResetIOCTL TCSETA #define TtyFlags(t) (t).c_lflag #else /* not HaveTermio */ --- 1300,1312 ---- #ifdef HaveTermio ! #ifdef AMIGA_GCC ! #define RawIOCTL TIOCGETA ! #define ResetIOCTL TIOCSETA ! #else #define RawIOCTL TCGETA #define ResetIOCTL TCSETA + #endif #define TtyFlags(t) (t).c_lflag #else /* not HaveTermio */ *************** *** 1325,1331 **** --- 1329,1339 ---- { char c; #ifdef HaveTermio + #if AMIGA_GCC + struct termios tty, new_tty; + #else struct termio tty, new_tty; + #endif novalue abort_on_signal(); #else /* HaveTermio */ struct tchars tty_characters; *************** *** 1448,1454 **** */ int getch() { - int read_a_char(); return read_a_char(ECHO_OFF); } --- 1456,1461 ---- *************** *** 1464,1471 **** */ int getche() { ! int read_a_char(); return read_a_char(ECHO_ON); } /* --- 1471,1489 ---- */ int getche() { ! /* under ixemul upto 44.0, ioctl doesn't heed echo on, so we have to fake it */ ! #if AMIGA_GCC ! int c; ! c = read_a_char(ECHO_OFF); ! if (c != -1) ! { ! putchar(c); ! fflush(stdout); ! } ! return c; ! #else return read_a_char(ECHO_ON); + #endif } /* *************** *** 1481,1487 **** --- 1499,1509 ---- { word arg; #ifdef HaveTermio + #if AMIGA_GCC + struct termios tty, new_tty; + #else struct termio tty, new_tty; + #endif #else /* HaveTermio */ struct sgttyb tty, new_tty; #endif /* HaveTermio */ *************** *** 1524,1530 **** --- 1546,1556 ---- #ifdef Xenix386 status = rdchk(0); #else /* Xenix386 */ + #if AMIGA_GCC + status = ioctl(0, FIONREAD, &arg); + #else /* AMIGA_GCC */ status = ioctl(0, FIORDCHK, &arg); + #endif /* AMIGA_GCC */ #endif /* Xenix386 */ #else status = ioctl(0, FIONREAD, &arg); diff -r -c -N Icon.orig/src/runtime/rmisc.r Icon-9.1/src/runtime/rmisc.r *** Icon.orig/src/runtime/rmisc.r Sun Feb 25 18:06:55 1996 --- Icon-9.1/src/runtime/rmisc.r Sat Sep 21 23:51:37 1996 *************** *** 1831,1837 **** Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA || ATARI_ST || MSDOS || OS2 || UNIX || VMS return (isascii(c) && isprint(c)); #endif /* AMIGA || ATARI_ST ... */ --- 1831,1837 ---- Deliberate Syntax Error #endif /* PORT */ ! #if AMIGA_GCC || AMIGA || ATARI_ST || MSDOS || OS2 || UNIX || VMS return (isascii(c) && isprint(c)); #endif /* AMIGA || ATARI_ST ... */ diff -r -c -N Icon.orig/src/runtime/rsys.r Icon-9.1/src/runtime/rsys.r *** Icon.orig/src/runtime/rsys.r Sun Feb 25 18:07:01 1996 --- Icon-9.1/src/runtime/rsys.r Fri Sep 20 15:53:42 1996 *************** *** 338,344 **** return Succeeded; #endif /* SASC */ ! #if UNIX #ifndef NoSelect struct timeval t; t.tv_sec = n / 1000; --- 338,344 ---- return Succeeded; #endif /* SASC */ ! #if UNIX || AMIGA_GCC #ifndef NoSelect struct timeval t; t.tv_sec = n / 1000; *************** *** 348,354 **** #else /* NoSelect */ return Failed; #endif /* NoSelect */ ! #endif /* UNIX */ #if MSDOS #if NT --- 348,354 ---- #else /* NoSelect */ return Failed; #endif /* NoSelect */ ! #endif /* AMIGA_GCC || UNIX */ #if MSDOS #if NT diff -r -c -N Icon.orig/src/vtran/Vtmake2 Icon-9.1/src/vtran/Vtmake2 *** Icon.orig/src/vtran/Vtmake2 Sun Feb 25 18:07:20 1996 --- Icon-9.1/src/vtran/Vtmake2 Mon Sep 23 17:51:57 1996 *************** *** 1,5 **** ! CC=cc ! CFLAGS= -DVarTran LDFLAGS= SHELL=/bin/sh MAKE=make --- 1,5 ---- ! CC=gcc ! CFLAGS= -DVarTran -Wall -O2 LDFLAGS= SHELL=/bin/sh MAKE=make diff -r -c -N Icon.orig/tests/general/Makefile Icon-9.1/tests/general/Makefile *** Icon.orig/tests/general/Makefile Sun Feb 25 18:09:12 1996 --- Icon-9.1/tests/general/Makefile Sat Sep 21 23:52:34 1996 *************** *** 15,43 **** make test-noopt test-icont: ! sh Test-icont icont ! sh Test-icont large test-opt: ! sh Test-iconc iconc ! sh Test-iconc invoke -fs ! sh Test-iconc errcnv -fen ! sh Test-iconc large -fdl test-noopt: ! sh Test-iconc iconc -na -p -w ! sh Test-iconc debug -fde -na -p -w ! sh Test-iconc large -fdl -na -p -w test-coexpr-iconc: ! sh Test-iconc coexpr -fd ! sh Test-iconc coexpr -fd -na -p -w test-coexpr-icont: ! sh Test-icont coexpr test-large: ! sh Test-icont large ########################################################## --- 15,43 ---- make test-noopt test-icont: ! sh Test-icont.sh icont ! sh Test-icont.sh large test-opt: ! sh Test-iconc.sh iconc ! sh Test-iconc.sh invoke -fs ! sh Test-iconc.sh errcnv -fen ! sh Test-iconc.sh large -fdl test-noopt: ! sh Test-iconc.sh iconc -na -p -w ! sh Test-iconc.sh debug -fde -na -p -w ! sh Test-iconc.sh large -fdl -na -p -w test-coexpr-iconc: ! sh Test-iconc.sh coexpr -fd ! sh Test-iconc.sh coexpr -fd -na -p -w test-coexpr-icont: ! sh Test-icont.sh coexpr test-large: ! sh Test-icont.sh large ########################################################## diff -r -c -N Icon.orig/tests/general/Test-iconc Icon-9.1/tests/general/Test-iconc *** Icon.orig/tests/general/Test-iconc Sun Feb 25 18:09:14 1996 --- Icon-9.1/tests/general/Test-iconc Thu Jan 1 00:00:00 1970 *************** *** 1,18 **** - j=$1 - shift - for i in `cat $j.lst` - do - rm -f local/$i.out - echo Compiling $i - ../../bin/iconc -s $* $i.icn - echo Running $i - if test -r $i.dat - then - ./$i <$i.dat >local/$i.out 2>&1 - else - ./$i >local/$i.out 2>&1 - fi - echo Checking $i - diff local/$i.out stand/$i.out - rm -f $i - done --- 0 ---- diff -r -c -N Icon.orig/tests/general/Test-iconc.sh Icon-9.1/tests/general/Test-iconc.sh *** Icon.orig/tests/general/Test-iconc.sh Thu Jan 1 00:00:00 1970 --- Icon-9.1/tests/general/Test-iconc.sh Sun Feb 25 18:09:14 1996 *************** *** 0 **** --- 1,18 ---- + j=$1 + shift + for i in `cat $j.lst` + do + rm -f local/$i.out + echo Compiling $i + ../../bin/iconc -s $* $i.icn + echo Running $i + if test -r $i.dat + then + ./$i <$i.dat >local/$i.out 2>&1 + else + ./$i >local/$i.out 2>&1 + fi + echo Checking $i + diff local/$i.out stand/$i.out + rm -f $i + done diff -r -c -N Icon.orig/tests/general/Test-icont Icon-9.1/tests/general/Test-icont *** Icon.orig/tests/general/Test-icont Sun Feb 25 18:09:12 1996 --- Icon-9.1/tests/general/Test-icont Thu Jan 1 00:00:00 1970 *************** *** 1,16 **** - for i in `cat $1.lst` - do - rm -f local/$i.out - echo Translating $i - ../../bin/icont -s $i.icn - echo Running $i - if test -r $i.dat - then - ../../bin/iconx $i <$i.dat >local/$i.out 2>&1 - else - ../../bin/iconx $i >local/$i.out 2>&1 - fi - echo Checking $i - diff local/$i.out stand/$i.out - rm -f $i - done --- 0 ---- diff -r -c -N Icon.orig/tests/general/Test-icont.sh Icon-9.1/tests/general/Test-icont.sh *** Icon.orig/tests/general/Test-icont.sh Thu Jan 1 00:00:00 1970 --- Icon-9.1/tests/general/Test-icont.sh Sun Feb 25 18:09:12 1996 *************** *** 0 **** --- 1,16 ---- + for i in `cat $1.lst` + do + rm -f local/$i.out + echo Translating $i + ../../bin/icont -s $i.icn + echo Running $i + if test -r $i.dat + then + ../../bin/iconx $i <$i.dat >local/$i.out 2>&1 + else + ../../bin/iconx $i >local/$i.out 2>&1 + fi + echo Checking $i + diff local/$i.out stand/$i.out + rm -f $i + done