From 512d7fe4f88804880967e45150a5ce2f3f7b0d6b Mon Sep 17 00:00:00 2001 From: Don Ward Date: Thu, 7 Mar 2024 16:47:45 +0000 Subject: [PATCH] Remove MACINTOSH configuration. The standard configuration scripts could still select it, but the MACINTOSH specific code has been removed and compilation errors will occur. --- doc/book/langref.tex | 1 - doc/ib/appH.tex | 2 +- src/common/dconsole.c | 4 +--- src/common/filepart.c | 5 ---- src/h/config.h | 8 +++---- src/h/feature.h | 4 ---- src/h/rmacros.h | 4 ++-- src/h/sys.h | 12 ---------- src/iconc/ccomp.c | 8 +++---- src/iconc/cmain.c | 12 ++++------ src/icont/link.c | 8 +++---- src/icont/tmain.c | 5 ---- src/preproc/files.c | 51 +++++++--------------------------------- src/preproc/pinit.c | 12 ---------- src/preproc/pmain.c | 13 ---------- src/rtt/rttmain.c | 17 -------------- src/runtime/fsys.r | 16 ++++--------- src/runtime/init.r | 16 +++++-------- src/runtime/interp.r | 12 +++++----- src/runtime/rmisc.r | 4 ---- src/runtime/rsys.r | 8 ------- tests/general/prepro.icn | 2 -- uni/parser/preproce.icn | 1 - uni/unicon/preproce.icn | 1 - 24 files changed, 44 insertions(+), 182 deletions(-) diff --git a/doc/book/langref.tex b/doc/book/langref.tex index 057219cfb..3dc4456b4 100644 --- a/doc/book/langref.tex +++ b/doc/book/langref.tex @@ -4769,7 +4769,6 @@ \subsection*{Predefined symbols} \_V9\ \ \ \ \ \ \ \ \ \ Version 9\\ \_CMS\ \ \ \ \ \ \ \ \ \ CMS\\ -\_MACINTOSH\ \ \ \ \ \ Macintosh\\ \_MSDOS\_386\ \ \ \ \ \ MS-DOS/386\\ \_MS\_WINDOWS\_NT\ \ \ \ MS Windows NT\\ \_MSDOS\ \ \ \ \ \ \ \ MS-DOS\\ diff --git a/doc/ib/appH.tex b/doc/ib/appH.tex index b0203fff4..051dbdceb 100644 --- a/doc/ib/appH.tex +++ b/doc/ib/appH.tex @@ -273,7 +273,7 @@ \chapter{Glossary of Defined Symbols} M\_PI & IU & constant value of Pi \\ MacGraph & U & build graphics using (legacy pre OSX) Mac graphics (should delete) \\ MACGRAPH\_H & IU & macgraph.h has been included \\ -MACINTOSH & all & build on legacy Mac platform (delete?) \\ +{\gr MACINTOSH} & {\gr all} & {\gr build on legacy Mac platform (delete?)} \\ MacOS & U & build on modern UNIX-based Mac platform \\ max & all & compute maximum of x and y \\ MaxAbrSize & all & maximum allocated block region size \\ diff --git a/src/common/dconsole.c b/src/common/dconsole.c index 1e01aa03f..aaa069d5f 100644 --- a/src/common/dconsole.c +++ b/src/common/dconsole.c @@ -1045,9 +1045,7 @@ int i; pollevent(); } -#if !MACINTOSH - #undef exit -#endif /* MACINTOSH */ +#undef exit exit(i); } diff --git a/src/common/filepart.c b/src/common/filepart.c index 5b830d863..716633a9e 100644 --- a/src/common/filepart.c +++ b/src/common/filepart.c @@ -30,11 +30,6 @@ static char *tryfile (char *buf, char *dir, char *name, char *extn); #define FileSep '/' #endif /* MSDOS */ -#if MACINTOSH - #define Prefix ":" - #define FileSep ':' -#endif /* MACINTOSH */ - #if MVS #define Prefix "" #define FileSep '(' diff --git a/src/h/config.h b/src/h/config.h index 699e2912d..7e8a368ff 100644 --- a/src/h/config.h +++ b/src/h/config.h @@ -210,10 +210,6 @@ #define PORT 0 #endif /* PORT */ -#ifndef MACINTOSH - #define MACINTOSH 0 -#endif /* MACINTOSH */ - #ifndef MSDOS #define MSDOS 0 #endif /* MSDOS */ @@ -1026,3 +1022,7 @@ Deliberate Syntax Error #if defined(CRAY) || defined (CRAY_STACK) #error The CRAY configuration option is no longer supported (since 7 Mar 2024) #endif /* CRAY */ + +#if defined(MACINTOSH) +#error The MACINTOSH configuration option is no longer supported (since 7 Mar 2024) +#endif /* MACINTOSH */ diff --git a/src/h/feature.h b/src/h/feature.h index 7a0a28ca6..74bf7aa15 100644 --- a/src/h/feature.h +++ b/src/h/feature.h @@ -22,10 +22,6 @@ Feature(1, "_CMS", "CMS") #endif /* VM */ -#if MACINTOSH - Feature(1, "_MACINTOSH", "Macintosh") -#endif /* MACINTOSH */ - #ifdef MacOS Feature(1, "_MACOS", "MacOS") #endif /* MacOS */ diff --git a/src/h/rmacros.h b/src/h/rmacros.h index 43981c39f..d869e06c9 100644 --- a/src/h/rmacros.h +++ b/src/h/rmacros.h @@ -824,9 +824,9 @@ Deliberate Syntax Error #endif /* PORT */ - #if MACINTOSH || MVS || UNIX || VM || VMS + #if MVS || UNIX || VM || VMS #define PushAVal(x) PushVal(x) - #endif /* MACINTOSH ... */ + #endif /* MVS ... VMS */ #if MSDOS #define PushAVal(x) {sp++; \ diff --git a/src/h/sys.h b/src/h/sys.h index 8ba5db9eb..e326d9bd6 100644 --- a/src/h/sys.h +++ b/src/h/sys.h @@ -36,18 +36,6 @@ Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - #ifdef MacGraph - #include - #include - #include - #include - #include - #include - #include - #endif /* MacGraph */ -#endif /* MACINTOSH */ - #ifdef ISQL #undef Type #undef Precision diff --git a/src/iconc/ccomp.c b/src/iconc/ccomp.c index d378670ad..2c128ff7d 100644 --- a/src/iconc/ccomp.c +++ b/src/iconc/ccomp.c @@ -32,7 +32,7 @@ Deliberate Syntax Error #endif #endif -#if UNIX || MACINTOSH || MVS || VM +#if UNIX || MVS || VM #define ExeFlag "-o" #define LinkLibs " -lm" #endif /* UNIX ... */ @@ -79,7 +79,7 @@ char *libname; Deliberate Syntax Error #endif /* PORT */ -#if UNIX || MACINTOSH || MSDOS || MVS || VM +#if UNIX || MSDOS || MVS || VM l->libname = libname; l->nm_sz = strlen(libname); #endif /* UNIX ... */ @@ -123,7 +123,7 @@ rmv_ccomp_opts(opts) char * q; char * rslt; -#if PORT || MACINTOSH || MSDOS || MVS || VM || VMS +#if PORT || MSDOS || MVS || VM || VMS /* something may be needed */ fprintf(stderr, "warning: option \"-nO\" unsupported on this platform.\n"); return opts; @@ -214,7 +214,7 @@ char *exename; * time as the number of libraries grew, it became a maintenance problem. */ -#if PORT || MACINTOSH || MVS || VM +#if PORT || MVS || VM /* something may be needed */ Deliberate Syntax Error #endif /* PORT || ... */ diff --git a/src/iconc/cmain.c b/src/iconc/cmain.c index eb0e5740a..d4ee153dc 100644 --- a/src/iconc/cmain.c +++ b/src/iconc/cmain.c @@ -467,11 +467,11 @@ Deliberate Syntax Error addlib(argv[optind]); /* assume linker option */ #endif /* UNIX ... */ -#if MACINTOSH || MSDOS || MVS || VM || VMS +#if MSDOS || MVS || VM || VMS /* * Linker options on command line not supported. */ -#endif /* MACINTOSH || ... */ +#endif /* MSDOS || ... */ /* * End of operating-system specific code. @@ -511,12 +511,12 @@ Deliberate Syntax Error addlib(argv[optind]); #endif /* UNIX ... */ -#if MACINTOSH || MSDOS || MVS || VM || VMS +#if MSDOS || MVS || VM || VMS /* * Pass no files to the linker. */ quitf("bad argument %s",argv[optind]); -#endif /* MACINTOSH || ... */ +#endif /* MSDOS || ... */ /* * End of operating-system specific code. @@ -704,10 +704,6 @@ char *ofile, *efile, **args; Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - fprintf(stderr,"-x not supported\n"); fflush(stderr); -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT || TURBO execvp(ofile,argv); diff --git a/src/icont/link.c b/src/icont/link.c index 56169c91a..dd1f60ce9 100644 --- a/src/icont/link.c +++ b/src/icont/link.c @@ -33,9 +33,9 @@ void setexe (char *fname); Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || VM || VMS +#if VM || VMS /* nothing to do */ -#endif /* MACINTOSH || ... */ +#endif /* VM || VMS */ #if MSDOS extern char pathToIconDOS[]; @@ -199,9 +199,9 @@ char *outname; Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MVS || UNIX || VM || VMS +#if MVS || UNIX || VM || VMS /* nothing to do */ -#endif /* MACINTOSH || ... */ +#endif /* MVS || ... */ #if MSDOS #if MICROSOFT || TURBO diff --git a/src/icont/tmain.c b/src/icont/tmain.c index cd1ee7286..a88aaf053 100644 --- a/src/icont/tmain.c +++ b/src/icont/tmain.c @@ -805,11 +805,6 @@ char *ofile, *efile, **args; Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - fprintf(stderr,"-x not supported\n"); - fflush(stderr); -#endif /* MACINTOSH */ - #if MSDOS /* No special handling is needed for an .exe files, since iconx * recognizes it from the extension andfrom internal .exe data. diff --git a/src/preproc/files.c b/src/preproc/files.c index 1e5bdc4ce..168635f3e 100644 --- a/src/preproc/files.c +++ b/src/preproc/files.c @@ -18,13 +18,6 @@ Deliberate Syntax Error Deliberate Syntax Error #endif /* VM || MVS */ -#if MACINTOSH -char *FileNameMacToUnix(char *fn); -char *FileNameUnixToMac(char *fn); -char *FileNameMacConvert(char *(*func)(char *),char *fn); -#define IsRelPath(fname) (fname[0] != '/') -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT /* nothing is needed */ @@ -80,10 +73,6 @@ Deliberate Syntax Error Deliberate Syntax Error #endif /* VM || MVS */ -#if MACINTOSH - fname = FileNameMacConvert(FileNameMacToUnix,fname); -#endif /* MACINTOSH */ - #if MSDOS char *s; @@ -170,25 +159,11 @@ int system; if (*s == '/') end_prfx = s; if (end_prfx != NULL) -#if MACINTOSH - /* - * For Mac-style names, don't include the file - * separator character in the prefix. - */ - for (s = cs->fname; s < end_prfx; ++s) -#else /* MACINTOSH */ - for (s = cs->fname; s <= end_prfx; ++s) -#endif /* MACINTOSH */ - AppChar(*sbuf, *s); + for (s = cs->fname; s <= end_prfx; ++s) + AppChar(*sbuf, *s); for (s = fname; *s != '\0'; ++s) AppChar(*sbuf, *s); path = str_install(sbuf); -#if MACINTOSH - /* - * Convert UNIX-style path to Mac-style. - */ - path = FileNameMacConvert(FileNameUnixToMac,path); -#endif /* MACINTOSH */ f = fopen(path, "r"); } } @@ -207,12 +182,6 @@ int system; for (s = fname; *s != '\0'; ++s) AppChar(*sbuf, *s); path = str_install(sbuf); -#if MACINTOSH - /* - * Convert UNIX-style path to Mac-style. - */ - path = FileNameMacConvert(FileNameUnixToMac,path); -#endif /* MACINTOSH */ f = fopen(path, "r"); ++prefix; } @@ -300,10 +269,10 @@ Deliberate Syntax Error } #endif /* VMS */ -#if VM || MVS || MACINTOSH +#if VM || MVS /* probably needs something */ Deliberate Syntax Error -#endif /* VM || MVS || ... */ +#endif /* VM || MVS */ #if MSDOS @@ -458,9 +427,9 @@ Deliberate Syntax Error #endif /* MSDOS */ -#if UNIX || VMS || MACINTOSH +#if UNIX || VMS /* nothing is needed */ -#endif /* UNIX || VMS || MACINTOSH */ +#endif /* UNIX || VMS */ /* * End of operating-system specific code. @@ -492,10 +461,6 @@ Deliberate Syntax Error Deliberate Syntax Error #endif /* VM || MVS */ -#if MACINTOSH - s1 = FileNameMacConvert(FileNameMacToUnix,s); -#endif /* MACINTOSH */ - #if MSDOS /* * Convert back slashes to slashes for internal consistency. @@ -589,9 +554,9 @@ Deliberate Syntax Error #endif /* MSDOS */ -#if UNIX || MACINTOSH +#if UNIX incl_search[n_paths - 1] = sysdir; -#endif /* UNIX || MACINTOSH */ +#endif /* UNIX */ /* * End of operating-system specific code. diff --git a/src/preproc/pinit.c b/src/preproc/pinit.c index 9af27f49f..57e1ecd1d 100644 --- a/src/preproc/pinit.c +++ b/src/preproc/pinit.c @@ -16,10 +16,6 @@ Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - /* nothing is needed */ -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT /* nothing is needed */ @@ -98,10 +94,6 @@ char **opt_args; Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - /* nothing is needed */ -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT char *undef_model = "#undef M_I86SM\n#undef M_I86CM\n#undef M_I86MM\n" @@ -372,10 +364,6 @@ Deliberate Syntax Error Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - /* nothing is needed */ -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT case 'A': diff --git a/src/preproc/pmain.c b/src/preproc/pmain.c index 2f1b3f4ff..7ae8a6787 100644 --- a/src/preproc/pmain.c +++ b/src/preproc/pmain.c @@ -16,14 +16,6 @@ static char *options = Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH -static char *ostr = "CPD:I:U:o:"; -static char *options = - "[-C] [-P] [-Dname[=[text]]] [-Uname] [-Ipath] [-ofile] [files]"; - /* may need more options */ -Deliberate Syntax Error -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT /* this really isn't right for anything but Microsoft */ @@ -119,11 +111,6 @@ char **argv; Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - /* may need something */ -Deliberate Syntax Error -#endif /* MACINTOSH */ - #if MSDOS #if MICROSOFT case 'A': diff --git a/src/rtt/rttmain.c b/src/rtt/rttmain.c index 75dbdb2e7..42f54cf56 100644 --- a/src/rtt/rttmain.c +++ b/src/rtt/rttmain.c @@ -2,10 +2,6 @@ /*#include "../h/filepat.h" ?* added for filepat change */ -#if MACINTOSH -#include -#endif /* MACINTOSH */ - /* * prototypes for static functions. */ @@ -42,11 +38,6 @@ char *src_file_nm; Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH -char *grttin_path = "::h:grttin.h"; -char *rt_path = "::h:rt.h"; -#endif /* MACINTOSH */ - #if MSDOS char *grttin_path = "..\\src\\h\\grttin.h"; char *rt_path = "..\\src\\h\\rt.h"; @@ -265,10 +256,6 @@ char **argv; whsp_image = NoSpelling; line_cntrl = 1; -#if MACINTOSH - argc = ccommand(&argv); -#endif /* MACINTOSH */ - /* * opt_lst and opt_args are the options and corresponding arguments * that are passed along to the preprocessor initialization routine. @@ -342,10 +329,6 @@ char **argv; show_usage(); } -#if MACINTOSH - iconx_flg = 1; /* Produce interpreter code */ -#endif /* MACINTOSH */ - #ifdef Rttx if (!iconx_flg) { fprintf(stdout, diff --git a/src/runtime/fsys.r b/src/runtime/fsys.r index a5bb039c5..683f10464 100644 --- a/src/runtime/fsys.r +++ b/src/runtime/fsys.r @@ -332,9 +332,9 @@ function{0,1} open(fname, spec) Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MSDOS || MVS || VM +#if MSDOS || MVS || VM /* nothing is needed */ -#endif /* MACINTOSH || ... */ +#endif /* MSDOS || ... */ #ifdef PosixFns int is_udp_or_listener = 0; /* UDP = 1, listener = 2 */ @@ -639,14 +639,6 @@ Deliberate Syntax Error mode[1] = '+'; #endif /* UNIX || VMS */ -#if MACINTOSH - if ((status & (Fs_Read|Fs_Write)) == (Fs_Read|Fs_Write)) { - mode[1] = '+'; - if ((status & Fs_Untrans) != 0) mode[2] = 'b'; - } - else if ((status & Fs_Untrans) != 0) mode[1] = 'b'; -#endif /* MACINTOSH */ - #if MSDOS if ((status & (Fs_Read|Fs_Write)) == (Fs_Read|Fs_Write)) { mode[1] = '+'; @@ -3185,9 +3177,9 @@ function{0,1} chdir(s) #if PORT Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MVS || VM +#if MVS || VM runerr(121); -#endif /* MACINTOSH ... */ +#endif /* MVS || VM */ #if MSDOS || UNIX || VMS || NT char path[PATH_MAX]; diff --git a/src/runtime/init.r b/src/runtime/init.r index 9dcf566ab..945bd9267 100644 --- a/src/runtime/init.r +++ b/src/runtime/init.r @@ -29,9 +29,9 @@ FILE *pathOpen (char *fname, char *mode); Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MVS || VM || UNIX || VMS +#if MVS || VM || UNIX || VMS /* nothing needed */ -#endif /* MACINTOSH ... */ +#endif /* MVS ... VMS */ /* * End of operating-system specific code. @@ -1142,7 +1142,7 @@ btinit: Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || UNIX || VMS +#if UNIX || VMS if (noerrbuf) setbuf(stderr, NULL); else { @@ -1153,7 +1153,7 @@ Deliberate Syntax Error fatalerr(305, NULL); setbuf(stderr, buf); } -#endif /* MACINTOSH ... */ +#endif /* UNIX || VMS */ #if MSDOS if (noerrbuf) @@ -1260,9 +1260,9 @@ void envset() Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MSDOS || MVS || UNIX || VM || VMS +#if MSDOS || MVS || UNIX || VM || VMS /* nothing to do */ -#endif /* MACINTOSH || ... */ +#endif /* MSDOS || ... */ /* * End of operating-system specific code. @@ -1280,10 +1280,6 @@ Deliberate Syntax Error Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH - /* can't handle */ -#endif /* MACINTOSH */ - #if MSDOS #if TURBO signal(SIGFPE, SIG_DFL); diff --git a/src/runtime/interp.r b/src/runtime/interp.r index 61b0a94c7..5d34c6379 100644 --- a/src/runtime/interp.r +++ b/src/runtime/interp.r @@ -35,9 +35,9 @@ static void vanq_proc (struct ef_marker *efp_v, struct gf_marker *gfp_v); Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MSDOS || MVS || UNIX || VM || VMS +#if MSDOS || MVS || UNIX || VM || VMS /* nothing needed */ -#endif /* MACINTOSH || ... */ +#endif /* MSDOS|| ... */ /* * End of operating-system specific code. @@ -355,9 +355,9 @@ deliberate syntax error Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MVS || UNIX || VM || VMS +#if MVS || UNIX || VM || VMS #define PushAVal(x) PushVal(x) -#endif /* MACINTOSH || ... */ +#endif /* MSDOS || ... */ #if MSDOS #define PushAVal(x) {rsp++; \ @@ -2439,9 +2439,9 @@ interp_macro(interp,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, Deliberate Syntax Error #endif /* PORT */ -#if MACINTOSH || MVS || VM || VMS +#if MVS || VM || VMS /* not included */ -#endif /* MACINTOSH || ... */ +#endif /* MVS || ... */ #if DEBUG_INTERP void stkdump(op) diff --git a/src/runtime/rmisc.r b/src/runtime/rmisc.r index 49824905d..f64a9301c 100644 --- a/src/runtime/rmisc.r +++ b/src/runtime/rmisc.r @@ -2974,10 +2974,6 @@ Deliberate Syntax Error return (isascii(c) && isprint(c)); #endif /* MSDOS ... */ -#if MACINTOSH - return isprint(c); -#endif /* MACINTOSH */ - #if MVS || VM return isprint(c); #endif /* MVS || VM */ diff --git a/src/runtime/rsys.r b/src/runtime/rsys.r index 47505f02e..fc0e15de5 100644 --- a/src/runtime/rsys.r +++ b/src/runtime/rsys.r @@ -536,14 +536,6 @@ int n; #endif /* NT */ #endif /* MSDOS */ -#if MACINTOSH - void MacDelay(int n); - DEC_NARTHREADS; - MacDelay(n); - INC_NARTHREADS_CONTROLLED; - return Succeeded; -#endif /* MACINTOSH */ - #if PORT || MVS || VM return Failed; #endif /* PORT || ... */ diff --git a/tests/general/prepro.icn b/tests/general/prepro.icn index bc0578e23..666f60a86 100644 --- a/tests/general/prepro.icn +++ b/tests/general/prepro.icn @@ -50,9 +50,7 @@ $endif # test that predefined symbols agree with &features # (if defined, first argument is 1, else it's null) - precheck(_ACORN, "Acorn Archimedes") precheck(_CMS, "CMS") - precheck(_MACINTOSH, "Macintosh") precheck(_MACOS, "MacOS") precheck(_MSDOS_386, "MS-DOS/386") precheck(_MSDOS, "MS-DOS") diff --git a/uni/parser/preproce.icn b/uni/parser/preproce.icn index 68aee1706..f38e54575 100644 --- a/uni/parser/preproce.icn +++ b/uni/parser/preproce.icn @@ -41,7 +41,6 @@ procedure predefs() t[case s of { # _CMS # gone "CMS": "_CMS" - "Macintosh":"_MACINTOSH" "MacOS":"_MACOS" "MS Windows NT":"_MS_WINDOWS_NT" "MS-DOS":"_MSDOS" diff --git a/uni/unicon/preproce.icn b/uni/unicon/preproce.icn index 68aee1706..f38e54575 100644 --- a/uni/unicon/preproce.icn +++ b/uni/unicon/preproce.icn @@ -41,7 +41,6 @@ procedure predefs() t[case s of { # _CMS # gone "CMS": "_CMS" - "Macintosh":"_MACINTOSH" "MacOS":"_MACOS" "MS Windows NT":"_MS_WINDOWS_NT" "MS-DOS":"_MSDOS"