From: Guillermo J. Rozas Date: Thu, 24 Jun 1993 04:49:14 +0000 (+0000) Subject: Global NT merge. X-Git-Tag: 20090517-FFI~8307 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=28b4dd5c5c08acf2c9ff780385aa89a805235902;p=mit-scheme.git Global NT merge. --- diff --git a/v7/src/microcode/dosio.c b/v7/src/microcode/dosio.c index 6dbcc0460..44230763b 100644 --- a/v7/src/microcode/dosio.c +++ b/v7/src/microcode/dosio.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: dosio.c,v 1.5 1993/04/19 08:31:05 cph Exp $ +$Id: dosio.c,v 1.6 1993/06/24 04:32:16 gjr Exp $ -Copyright (c) 1992-93 Massachusetts Institute of Technology +Copyright (c) 1992-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -410,17 +410,17 @@ DEFUN (OS_terminal_get_ospeed, (channel), Tchannel channel) } void -DEFUN (terminal_state_set_ospeed, (s, b), - Ttty_state * s AND - unsigned int b) +DEFUN (OS_terminal_set_ispeed, (channel, baud), + Tchannel channel AND + unsigned int baud) { error_unimplemented_primitive (); } void -DEFUN (terminal_state_set_ispeed, (s, b), - Ttty_state * s AND - unsigned int b) +DEFUN (OS_terminal_set_ospeed, (channel, baud), + Tchannel channel AND + unsigned int baud) { error_unimplemented_primitive (); } diff --git a/v7/src/microcode/dosutl/bch-ztc.lst b/v7/src/microcode/dosutl/bch-ztc.lst index 7cc2f2086..e1b2cd929 100644 --- a/v7/src/microcode/dosutl/bch-ztc.lst +++ b/v7/src/microcode/dosutl/bch-ztc.lst @@ -4,7 +4,7 @@ bigprm.obj bitstr.obj boot.obj char.obj -cmpi386.obj +cmpauxmd.obj cmpint.obj comutl.obj daemon.obj @@ -30,6 +30,7 @@ obstack.obj option.obj osscheme.obj ostty.obj +outf.obj prim.obj primutl.obj prmcon.obj diff --git a/v7/src/microcode/dosutl/makefile b/v7/src/microcode/dosutl/makefile index 5d4713932..5e9cadbf7 100644 --- a/v7/src/microcode/dosutl/makefile +++ b/v7/src/microcode/dosutl/makefile @@ -1,8 +1,8 @@ ### -*- Fundamental -*- ### -### $Id: makefile,v 1.4 1992/09/30 14:37:56 jinx Exp $ +### $Id: makefile,v 1.5 1993/06/24 04:38:08 gjr Exp $ ### -### Copyright (c) 1992 Massachusetts Institute of Technology +### Copyright (c) 1992-1993 Massachusetts Institute of Technology ### ### This material was developed by the Scheme project at the ### Massachusetts Institute of Technology, Department of @@ -39,20 +39,19 @@ #### Makefile for Scheme on DOS -TERMCAP_OBJECTS = dostterm.obj tparam.obj # terminfo.obj -TERMCAP_SOURCES = dostterm.c tparam.c # terminfo.c -TERMCAP_LIBS = # -lcurses -GRAPHICS_SOURCES = dosfg.c # starbase.c -GRAPHICS_OBJECTS = dosfg.obj # starbase.obj -GRAPHICS_LIBS = fgp.lib # -lsb1 -lsb2 +TERMCAP_OBJECTS = dostterm.obj tparam.obj +TERMCAP_SOURCES = dostterm.c tparam.c +TERMCAP_LIBS = +GRAPHICS_SOURCES = # dosfg.c +GRAPHICS_OBJECTS = # dosfg.obj +GRAPHICS_LIBS = # fgp.lib MACHINE_SWITCHES = -3 -mx -DNO_CONST -Di386 -MACHINE_SOURCES = cmpint.c cmpi386.asm -MACHINE_OBJECTS = cmpint.obj cmpi386.obj -GC_HEAD_FILES = gccode.h cmpgc.h cmpint2.h cmpi386.h +MACHINE_SOURCES = cmpint.c cmpauxmd.asm +MACHINE_OBJECTS = cmpint.obj cmpauxmd.obj +GC_HEAD_FILES = gccode.h cmpgc.h cmpintmd.h USER_PRIM_SOURCES = dosint10.c dosi10.asm dosx32.c USER_PRIM_OBJECTS = dosint10.obj dosi10.obj dosx32.obj USER_LIBS = -BINDIR = \scheme\microcode CC = ztc M4 = # m4 AS = mlx @@ -103,6 +102,7 @@ obstack.c \ option.c \ osscheme.c \ ostty.c \ +outf.c \ prim.c \ primutl.c \ prmcon.c \ @@ -140,7 +140,6 @@ dosenv.c \ dosfile.c \ dosio.c \ dosconio.c \ -dosprm.c \ dostty.c \ dostop.c \ dosutil.c \ @@ -161,7 +160,6 @@ dosenv.obj \ dosfile.obj \ dosio.obj \ dosconio.obj \ -dosprm.obj \ dostty.obj \ dostop.obj \ dosutil.obj \ @@ -219,6 +217,7 @@ obstack.obj \ option.obj \ osscheme.obj \ ostty.obj \ +outf.obj \ prim.obj \ primutl.obj \ prmcon.obj \ @@ -284,7 +283,7 @@ breakup.exe : breakup.obj wsize.exe : wsize.obj $(CC) wsize.obj $(MACHINE_SWITCHES) $(LDFLAGS) ppband.exe : ppband.obj - $(CC) ppband.obj $(MACHINE_SWITCHES) $(LDFLAG) + $(CC) ppband.obj $(MACHINE_SWITCHES) $(LDFLAGS) $(FLASHTEK) usrdef.c : $(SCHEME_SOURCES) $(SOURCES) $(OS_PRIM_SOURCES) dosconio.c usrdef.tch findprim.exe scm-prm.lst rm -f usrdef.c @@ -314,7 +313,7 @@ scheme.tch : scheme.h oscond.h ansidecl.h dstack.h obstack.h config.h \ rm -f scheme.tch touch scheme.tch -psbmap.tch : config.h object.h bignum.h bignumint.h bitstr.h types.h \ +psbmap.tch : config.h object.h bignum.h bignmint.h bitstr.h types.h \ sdata.h const.h psbmap.h $(GC_HEAD_FILES) comlin.h comlin.c rm -f psbmap.tch touch psbmap.tch @@ -351,7 +350,7 @@ purify.obj : scheme.tch prims.h $(GC_HEAD_FILES) zones.h purutl.obj : scheme.tch prims.h $(GC_HEAD_FILES) zones.h comutl.obj : scheme.tch prims.h artutl.obj : scheme.tch -bignum.obj : scheme.tch bignumint.h limits.h +bignum.obj : scheme.tch bignmint.h limits.h bigprm.obj flonum.obj intprm.obj : scheme.tch prims.h zones.h generic.obj : scheme.tch prims.h fixnum.obj : scheme.tch prims.h mul.c @@ -413,7 +412,7 @@ dostrap.obj: dostrap.h dosexcp.h $(DOS_DEPENDENCIES) dossys.obj: dossys.h prdosenv.obj : $(DOS_DEPENDENCIES) prdosfs.obj : $(DOS_DEPENDENCIES) scheme.h prims.h osfs.h -cmpi386.obj : cmpi386.asm +cmpauxmd.obj : cmpauxmd.asm dosexcp.obj : dosexcp.h dossys.h dosinsn.h doskbd.obj : doskbd.h dossys.h dosinsn.h dosasutl.obj : dosasutl.asm @@ -423,12 +422,16 @@ dosint10.obj: dosint10.c dosint10.h dosi10.obj: dosi10.asm dosx32.obj: dosx32.c -mswload.exe: mswload.obj mswload.def mswload.res - blinkx /CO /MO mswload.obj,mswload.exe,mswload.map,,mswload.def,mswload.res +clean: + del *.obj + del *.exe -mswload.res: mswload.rc - zrc -V mswload.rc +unconfig: + del cmpintmd.h + del cmpauxmd.asm + del float.h + del limits.h + del makefile + del *.lst -mswload.obj: mswload.c mswload.h - ztc -ms -W1 -bx -o -c -g mswload.c diff --git a/v7/src/microcode/dosutl/scm-ztc.lst b/v7/src/microcode/dosutl/scm-ztc.lst index 470e6f334..69227742c 100644 --- a/v7/src/microcode/dosutl/scm-ztc.lst +++ b/v7/src/microcode/dosutl/scm-ztc.lst @@ -4,7 +4,7 @@ bigprm.obj bitstr.obj boot.obj char.obj -cmpi386.obj +cmpauxmd.obj cmpint.obj comutl.obj daemon.obj @@ -30,6 +30,7 @@ obstack.obj option.obj osscheme.obj ostty.obj +outf.obj prim.obj primutl.obj prmcon.obj diff --git a/v7/src/microcode/error.c b/v7/src/microcode/error.c index 9924bb7fb..fb34ac9cc 100644 --- a/v7/src/microcode/error.c +++ b/v7/src/microcode/error.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1990-1992 Free Software Foundation, Inc. +/* Copyright (C) 1990-1993 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,9 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/error.c,v 1.4 1993/02/22 21:25:32 gjr Exp $ */ +/* $Id: error.c,v 1.5 1993/06/24 04:42:06 gjr Exp $ */ #include +#include "outf.h" #include "dstack.h" static PTR @@ -26,8 +27,8 @@ DEFUN (xmalloc, (length), unsigned int length) PTR result = (malloc (length)); if (result == 0) { - fputs ("malloc: memory allocation failed\n", stderr); - fflush (stderr); + outf_fatal ("malloc: memory allocation failed\n"); + outf_flush_fatal (); abort (); } return (result); diff --git a/v7/src/microcode/extern.h b/v7/src/microcode/extern.h index dcc8f3592..f149a2015 100644 --- a/v7/src/microcode/extern.h +++ b/v7/src/microcode/extern.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: extern.h,v 9.49 1992/09/26 02:54:58 cph Exp $ +$Id: extern.h,v 9.50 1993/06/24 04:44:10 gjr Exp $ -Copyright (c) 1987-1992 Massachusetts Institute of Technology +Copyright (c) 1987-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -85,7 +85,12 @@ extern int local_circle []; /* The register block */ +#ifdef WINNT +extern SCHEME_OBJECT *RegistersPtr; +#define Registers RegistersPtr +#else extern SCHEME_OBJECT Registers []; +#endif extern SCHEME_OBJECT * Ext_History, /* History register */ @@ -257,7 +262,7 @@ extern SCHEME_OBJECT EXFUN (Find_State_Space, (SCHEME_OBJECT)); extern void EXFUN (debug_edit_flags, (void)); -extern void EXFUN (Back_Trace, (FILE *)); +extern void EXFUN (Back_Trace, (outf_channel)); extern void EXFUN (Show_Env, (SCHEME_OBJECT)); extern void EXFUN (Show_Pure, (void)); extern void EXFUN (Print_Return, (char *)); diff --git a/v7/src/microcode/fasload.c b/v7/src/microcode/fasload.c index 7620db570..dde875e65 100644 --- a/v7/src/microcode/fasload.c +++ b/v7/src/microcode/fasload.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: fasload.c,v 9.67 1992/11/24 01:10:35 gjr Exp $ +$Id: fasload.c,v 9.68 1993/06/24 04:44:55 gjr Exp $ -Copyright (c) 1987-1992 Massachusetts Institute of Technology +Copyright (c) 1987-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -227,6 +227,7 @@ DEFUN (read_file_start, (file_name, from_band_load), Tchannel channel; channel = (OS_open_load_file (file_name)); + if (Per_File) { debug_edit_flags (); @@ -344,10 +345,10 @@ DEFUN (Relocate, (P), long P) } else { - printf ("Pointer out of range: 0x%lx\n", P); + outf_console ("Pointer out of range: 0x%lx\n", P); if (!Warned) { - printf ("Heap: %lx-%lx, Constant: %lx-%lx, Stack: ?-0x%lx\n", + outf_console ("Heap: %lx-%lx, Constant: %lx-%lx, Stack: ?-0x%lx\n", ((long) Heap_Base), ((long) Dumped_Heap_Top), ((long) Const_Base), ((long) Dumped_Constant_Top), ((long) Dumped_Stack_Top)); @@ -357,7 +358,7 @@ DEFUN (Relocate, (P), long P) } if (Reloc_Debug) { - printf ("0x%06lx -> 0x%06lx\n", P, ((long) Result)); + outf_console ("0x%06lx -> 0x%06lx\n", P, ((long) Result)); } return (Result); } @@ -415,7 +416,7 @@ DEFUN (Relocate_Block, (Scan, Stop_At), if (Reloc_Debug) { - fprintf (stderr, + outf_error ( "\nRelocate_Block: block = 0x%lx, length = 0x%lx, end = 0x%lx.\n", ((long) Scan), ((long) ((Stop_At - Scan) - 1)), ((long) Stop_At)); } @@ -626,7 +627,7 @@ DEFUN (Intern_Block, (Next_Pointer, Stop_At), { if (Reloc_Debug) { - printf ("Interning a block.\n"); + outf_console ("Interning a block.\n"); } while (Next_Pointer < Stop_At) @@ -673,7 +674,7 @@ DEFUN (Intern_Block, (Next_Pointer, Stop_At), } if (Reloc_Debug) { - printf ("Done interning block.\n"); + outf_console ("Done interning block.\n"); } return; } @@ -764,7 +765,7 @@ DEFUN (load_file, (mode), int mode) /* We need to relocate. Oh well. */ if (Reloc_Debug) { - printf ("heap_relocation = %ld = %lx; const_relocation = %ld = %lx\n", + outf_console ("heap_relocation = %ld = %lx; const_relocation = %ld = %lx\n", ((long) heap_relocation), ((long) heap_relocation), ((long) const_relocation), ((long) const_relocation)); } @@ -877,7 +878,7 @@ DEFUN (add_reload_cleanup, (cleanup_procedure), Tcleanup cleanup_procedure) (* ((Tcleanup *) (PTRVEC_LOC (reload_cleanups, 0)))) = cleanup_procedure; } else - ptrvec_adjoin (reload_cleanups, cleanup_procedure); + ptrvec_adjoin (reload_cleanups, (PTR) cleanup_procedure); } void @@ -894,9 +895,8 @@ DEFUN_VOID (execute_reload_cleanups) void DEFUN_VOID (compiler_reset_error) { - fprintf (stderr, - "\ncompiler_reset_error: The band being restored and\n"); - fprintf (stderr, + outf_fatal ("\ncompiler_reset_error: The band being restored and\n"); + outf_fatal ( "the compiled code interface in this microcode are inconsistent.\n"); Microcode_Termination (TERM_COMPILER_DEATH); } @@ -946,24 +946,23 @@ DEFUN (terminate_band_load, (ap), PTR ap) { int abort_value = (abort_to_interpreter_argument ()); if (abort_value > 0) - fprintf (stderr, "Error %ld (%s)", + outf_fatal ("Error %ld (%s)", ((long) abort_value), (Error_Names [abort_value])); else - fprintf (stderr, "Abort %ld (%s)", + outf_fatal ("Abort %ld (%s)", ((long) abort_value), (Abort_Names [(-abort_value) - 1])); } - fputs (" past the point of no return.\n", stderr); + outf_fatal (" past the point of no return.\n"); { char * band_name = (* ((char **) ap)); if (band_name != 0) { - fprintf (stderr, "band-name = \"%s\".\n", band_name); + outf_fatal ("band-name = \"%s\".\n", band_name); free (band_name); } } - fflush (stderr); END_BAND_LOAD (false, true); Microcode_Termination (TERM_DISK_RESTORE); /*NOTREACHED*/ @@ -1089,7 +1088,7 @@ DEFUN_VOID (Finish_String_Inversion) Count = 4 * (Count - 2) + (OBJECT_TYPE (String_Chain)) - MAGIC_OFFSET; if (Reloc_Debug) { - printf ("String at 0x%lx: restoring length of %ld.\n", + outf_console ("String at 0x%lx: restoring length of %ld.\n", ((long) (OBJECT_ADDRESS (String_Chain))), ((long) Count)); } @@ -1101,7 +1100,7 @@ DEFUN_VOID (Finish_String_Inversion) return; } -#define print_char(C) printf (((C < ' ') || (C > '|')) ? \ +#define print_char(C) outf_console (((C < ' ') || (C > '|')) ? \ "\\%03o" : "%c", (C && UCHAR_MAX)); void @@ -1127,16 +1126,16 @@ DEFUN (String_Inversion, (Orig_Pointer), SCHEME_OBJECT * Orig_Pointer) if (Reloc_Debug) { - printf ("\nString at 0x%lx with %ld characters", + outf_console ("\nString at 0x%lx with %ld characters", ((long) Orig_Pointer), ((long) (Orig_Pointer[STRING_LENGTH_INDEX]))); } if (old_size != new_size) { - printf ("\nWord count changed from %ld to %ld: ", - ((long) old_size), ((long) new_size)); - printf ("\nWhich, of course, is impossible!!\n"); + outf_fatal ("\nWord count changed from %ld to %ld: ", + ((long) old_size), ((long) new_size)); + outf_fatal ("\nWhich, of course, is impossible!!\n"); Microcode_Termination (TERM_EXIT); } @@ -1161,7 +1160,7 @@ DEFUN (String_Inversion, (Orig_Pointer), SCHEME_OBJECT * Orig_Pointer) Count = (OBJECT_DATUM (Orig_Pointer[STRING_HEADER])) - 1; if (Reloc_Debug) { - printf ("\nCell count = %ld\n", ((long) Count)); + outf_console ("\nCell count = %ld\n", ((long) Count)); } Pointer_Address = &(Orig_Pointer[STRING_CHARS]); To_Char = (char *) Pointer_Address; @@ -1188,7 +1187,7 @@ DEFUN (String_Inversion, (Orig_Pointer), SCHEME_OBJECT * Orig_Pointer) } if (Reloc_Debug) { - printf ("\n"); + outf_console ("\n"); } return; } diff --git a/v7/src/microcode/gc.h b/v7/src/microcode/gc.h index 68fb53067..ac864c63b 100644 --- a/v7/src/microcode/gc.h +++ b/v7/src/microcode/gc.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: gc.h,v 9.32 1992/09/26 02:54:59 cph Exp $ +$Id: gc.h,v 9.33 1993/06/24 04:45:49 gjr Exp $ -Copyright (c) 1987-92 Massachusetts Institute of Technology +Copyright (c) 1987-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -79,7 +79,7 @@ MIT in each case. */ */ #define INVALID_TYPE_CODE(TC) \ - (fprintf(stderr, "\nGC_Type_Code: Bad Type code = 0x%02x\n", TC), \ + (outf_fatal ("\nGC_Type_Code: Bad Type code = 0x%02x\n", TC), \ Microcode_Termination(TERM_INVALID_TYPE_CODE), \ GC_Undefined) diff --git a/v7/src/microcode/gccode.h b/v7/src/microcode/gccode.h index 2e902d994..9e31cdf0f 100644 --- a/v7/src/microcode/gccode.h +++ b/v7/src/microcode/gccode.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: gccode.h,v 9.47 1993/03/10 17:19:44 cph Exp $ +$Id: gccode.h,v 9.48 1993/06/24 04:48:12 gjr Exp $ -Copyright (c) 1987-93 Massachusetts Institute of Technology +Copyright (c) 1987-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -184,13 +184,11 @@ do \ #define GC_BAD_TYPE(name) \ do \ { \ - fprintf \ - (stderr, \ - "\n%s: bad type code (0x%02x) 0x%lx", \ + outf_error ("\n%s: bad type code (0x%02x) 0x%lx", \ (name), \ (OBJECT_TYPE (Temp)), \ Temp); \ - fprintf (stderr, " -- Treating as non-pointer.\n"); \ + outf_error (" -- Treating as non-pointer.\n"); \ /* Fall through */ \ } while (0) @@ -346,18 +344,18 @@ extern SCHEME_OBJECT * gc_objects_referencing_end; ? ((Constant_Space <= Scan) && (Scan < Constant_Top)) \ : ((Heap_Bottom <= Scan) && (Scan < Heap_Top))))) \ { \ - fprintf (stderr, "\nBad transport_vector limit:\n"); \ - fprintf (stderr, " limit = 0x%lx\n", ((long) Scan)); \ - fprintf (stderr, " Scan = 0x%lx\n", ((long) Saved_Scan)); \ - fprintf (stderr, " To = 0x%lx\n", ((long) To)); \ - fflush (stderr); \ + outf_fatal ("\nBad transport_vector limit:\n"); \ + outf_fatal (" limit = 0x%lx\n", ((long) Scan)); \ + outf_fatal (" Scan = 0x%lx\n", ((long) Saved_Scan)); \ + outf_fatal (" To = 0x%lx\n", ((long) To)); \ + outf_flush_fatal (); \ abort (); \ } \ if ((OBJECT_DATUM (*Old)) > 65536) \ { \ - fprintf (stderr, "\nWarning: copying large vector: %d\n", \ - (OBJECT_DATUM (*Old))); \ - fflush (stderr); \ + outf_error ("\nWarning: copying large vector: %d\n", \ + (OBJECT_DATUM (*Old))); \ + outf_flush_error (); \ } \ } diff --git a/v7/src/microcode/gcloop.c b/v7/src/microcode/gcloop.c index 62bee7668..e1c1e87c3 100644 --- a/v7/src/microcode/gcloop.c +++ b/v7/src/microcode/gcloop.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: gcloop.c,v 9.40 1993/03/10 17:19:52 cph Exp $ +$Id: gcloop.c,v 9.41 1993/06/24 04:49:14 gjr Exp $ -Copyright (c) 1987-93 Massachusetts Institute of Technology +Copyright (c) 1987-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -105,7 +105,7 @@ static int gc_scan_history_index; || ((gc_scan_trap != 0) && (Scan >= gc_scan_trap)) \ || ((gc_free_trap != 0) && (To >= gc_free_trap))) \ { \ - fprintf(stderr, "\nGCLoop: trap.\n"); \ + outf_error ("\nGCLoop: trap.\n"); \ abort (); \ } \ }