From: Chris Hanson Date: Tue, 24 Apr 2007 05:32:01 +0000 (+0000) Subject: Changes to get v15 working in win32. X-Git-Tag: 20090517-FFI~633 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f898df0dd734f3ab56ee3fbf92dcc599a0dcc672;p=mit-scheme.git Changes to get v15 working in win32. --- diff --git a/v7/src/microcode/cmpint.c b/v7/src/microcode/cmpint.c index 6b876d4df..c70d0e085 100644 --- a/v7/src/microcode/cmpint.c +++ b/v7/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.109 2007/04/22 16:31:22 cph Exp $ +$Id: cmpint.c,v 1.110 2007/04/24 05:31:08 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -171,32 +171,6 @@ static long make_redirection_trampoline (SCHEME_OBJECT *, trampoline_type_t, SCHEME_OBJECT); static long make_apply_trampoline (SCHEME_OBJECT *, trampoline_type_t, SCHEME_OBJECT, unsigned long); - -/* ASM_ENTRY_POINT is for OS/2, but it could also be used for any - compiler that supports multiple calling conventions, such as GCC. - - The IBM C Set++/2 compiler has several different external calling - conventions. The default calling convention is called _Optlink, - uses a combination of registers and the stack, and is complicated. - The calling convention used for operating system interface - procedures is called _System, uses only the stack, and is very - similar to the calling conventions used with our DOS compilers. - So, in order to simplify the changes to the assembly language, we - use _System conventions for calling C procedures from the assembly - language file. - - Since _Optlink is the default, we must somehow cause the relevant - procedures to be compiled using _System. The easiest way to do - this is to force the use of _System everywhere, but that's - undesirable since _Optlink is generally more efficient. Instead, - we use the ASM_ENTRY_POINT wrapper to cause each of the relevant - procedures to be tagged with the compiler's _System keyword. The - relevant procedures are all of the SCHEME_UTILITY procedures, - C_to_interface, interface_to_C, and interface_to_scheme. */ - -#ifndef ASM_ENTRY_POINT -# define ASM_ENTRY_POINT(name) name -#endif #ifndef UTILITY_RESULT_DEFINED #ifdef CMPINT_USE_STRUCS @@ -2833,6 +2807,7 @@ typedef struct register_storage SCHEME_OBJECT Registers [REGBLOCK_LENGTH]; } REGMEM; +SCHEME_OBJECT * RegistersPtr = 0; unsigned long * win32_catatonia_block = 0; static REGMEM regmem; diff --git a/v7/src/microcode/cmpint.h b/v7/src/microcode/cmpint.h index 48d03e70f..683ab6c3a 100644 --- a/v7/src/microcode/cmpint.h +++ b/v7/src/microcode/cmpint.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.h,v 10.15 2007/04/22 16:31:22 cph Exp $ +$Id: cmpint.h,v 10.16 2007/04/24 05:31:14 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -44,6 +44,32 @@ typedef struct cc_entry_offset_s cc_entry_offset_t; # undef CC_SUPPORT_P #else # define CC_SUPPORT_P 1 + +/* ASM_ENTRY_POINT is for OS/2, but it could also be used for any + compiler that supports multiple calling conventions, such as GCC. + + The IBM C Set++/2 compiler has several different external calling + conventions. The default calling convention is called _Optlink, + uses a combination of registers and the stack, and is complicated. + The calling convention used for operating system interface + procedures is called _System, uses only the stack, and is very + similar to the calling conventions used with our DOS compilers. + So, in order to simplify the changes to the assembly language, we + use _System conventions for calling C procedures from the assembly + language file. + + Since _Optlink is the default, we must somehow cause the relevant + procedures to be compiled using _System. The easiest way to do + this is to force the use of _System everywhere, but that's + undesirable since _Optlink is generally more efficient. Instead, + we use the ASM_ENTRY_POINT wrapper to cause each of the relevant + procedures to be tagged with the compiler's _System keyword. The + relevant procedures are all of the SCHEME_UTILITY procedures, + C_to_interface, interface_to_C, and interface_to_scheme. */ + +#ifndef ASM_ENTRY_POINT +# define ASM_ENTRY_POINT(name) name +#endif /* The following code handles compiled entry points, where the addresses point to the "middle" of the code vector. From the entry @@ -332,7 +358,7 @@ extern long C_return_value; #endif #endif -typedef void utility_proc_t +typedef void ASM_ENTRY_POINT (utility_proc_t) (utility_result_t *, unsigned long, unsigned long, unsigned long, unsigned long); extern utility_proc_t * utility_table []; diff --git a/v7/src/microcode/cmpintmd/i386.h b/v7/src/microcode/cmpintmd/i386.h index b1fcb1d76..24d9c74a2 100644 --- a/v7/src/microcode/cmpintmd/i386.h +++ b/v7/src/microcode/cmpintmd/i386.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: i386.h,v 1.40 2007/04/22 16:31:24 cph Exp $ +$Id: i386.h,v 1.41 2007/04/24 05:31:51 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -264,64 +264,64 @@ typedef struct extern int ASM_ENTRY_POINT (i386_interface_initialize) (void); -extern void ASM_ENTRY_POINT (asm_assignment_trap) (void); -extern void ASM_ENTRY_POINT (asm_dont_serialize_cache) (void); -extern void ASM_ENTRY_POINT (asm_error) (void); -extern void ASM_ENTRY_POINT (asm_generic_add) (void); -extern void ASM_ENTRY_POINT (asm_generic_decrement) (void); -extern void ASM_ENTRY_POINT (asm_generic_divide) (void); -extern void ASM_ENTRY_POINT (asm_generic_equal) (void); -extern void ASM_ENTRY_POINT (asm_generic_greater) (void); -extern void ASM_ENTRY_POINT (asm_generic_increment) (void); -extern void ASM_ENTRY_POINT (asm_generic_less) (void); -extern void ASM_ENTRY_POINT (asm_generic_modulo) (void); -extern void ASM_ENTRY_POINT (asm_generic_multiply) (void); -extern void ASM_ENTRY_POINT (asm_generic_negative) (void); -extern void ASM_ENTRY_POINT (asm_generic_positive) (void); -extern void ASM_ENTRY_POINT (asm_generic_quotient) (void); -extern void ASM_ENTRY_POINT (asm_generic_remainder) (void); -extern void ASM_ENTRY_POINT (asm_generic_subtract) (void); -extern void ASM_ENTRY_POINT (asm_generic_zero) (void); -extern void ASM_ENTRY_POINT (asm_interrupt_closure) (void); -extern void ASM_ENTRY_POINT (asm_interrupt_continuation) (void); -extern void ASM_ENTRY_POINT (asm_interrupt_continuation_2) (void); -extern void ASM_ENTRY_POINT (asm_interrupt_dlink) (void); -extern void ASM_ENTRY_POINT (asm_interrupt_procedure) (void); -extern void ASM_ENTRY_POINT (asm_link) (void); -extern void ASM_ENTRY_POINT (asm_nofp_add) (void); -extern void ASM_ENTRY_POINT (asm_nofp_decrement) (void); -extern void ASM_ENTRY_POINT (asm_nofp_divide) (void); -extern void ASM_ENTRY_POINT (asm_nofp_equal) (void); -extern void ASM_ENTRY_POINT (asm_nofp_greater) (void); -extern void ASM_ENTRY_POINT (asm_nofp_increment) (void); -extern void ASM_ENTRY_POINT (asm_nofp_less) (void); -extern void ASM_ENTRY_POINT (asm_nofp_modulo) (void); -extern void ASM_ENTRY_POINT (asm_nofp_multiply) (void); -extern void ASM_ENTRY_POINT (asm_nofp_negative) (void); -extern void ASM_ENTRY_POINT (asm_nofp_positive) (void); -extern void ASM_ENTRY_POINT (asm_nofp_quotient) (void); -extern void ASM_ENTRY_POINT (asm_nofp_remainder) (void); -extern void ASM_ENTRY_POINT (asm_nofp_subtract) (void); -extern void ASM_ENTRY_POINT (asm_nofp_zero) (void); -extern void ASM_ENTRY_POINT (asm_primitive_apply) (void); -extern void ASM_ENTRY_POINT (asm_primitive_error) (void); -extern void ASM_ENTRY_POINT (asm_primitive_lexpr_apply) (void); -extern void ASM_ENTRY_POINT (asm_reference_trap) (void); -extern void ASM_ENTRY_POINT (asm_safe_reference_trap) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_1) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_2) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_3) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_4) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_5) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_6) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_7) (void); -extern void ASM_ENTRY_POINT (asm_sc_apply_size_8) (void); -extern void ASM_ENTRY_POINT (asm_scheme_to_interface) (void); -extern void ASM_ENTRY_POINT (asm_scheme_to_interface_call) (void); -extern void ASM_ENTRY_POINT (asm_serialize_cache) (void); -extern void ASM_ENTRY_POINT (asm_short_primitive_apply) (void); -extern void ASM_ENTRY_POINT (asm_trampoline_to_interface) (void); +extern void asm_assignment_trap (void); +extern void asm_dont_serialize_cache (void); +extern void asm_error (void); +extern void asm_generic_add (void); +extern void asm_generic_decrement (void); +extern void asm_generic_divide (void); +extern void asm_generic_equal (void); +extern void asm_generic_greater (void); +extern void asm_generic_increment (void); +extern void asm_generic_less (void); +extern void asm_generic_modulo (void); +extern void asm_generic_multiply (void); +extern void asm_generic_negative (void); +extern void asm_generic_positive (void); +extern void asm_generic_quotient (void); +extern void asm_generic_remainder (void); +extern void asm_generic_subtract (void); +extern void asm_generic_zero (void); +extern void asm_interrupt_closure (void); +extern void asm_interrupt_continuation (void); +extern void asm_interrupt_continuation_2 (void); +extern void asm_interrupt_dlink (void); +extern void asm_interrupt_procedure (void); +extern void asm_link (void); +extern void asm_nofp_add (void); +extern void asm_nofp_decrement (void); +extern void asm_nofp_divide (void); +extern void asm_nofp_equal (void); +extern void asm_nofp_greater (void); +extern void asm_nofp_increment (void); +extern void asm_nofp_less (void); +extern void asm_nofp_modulo (void); +extern void asm_nofp_multiply (void); +extern void asm_nofp_negative (void); +extern void asm_nofp_positive (void); +extern void asm_nofp_quotient (void); +extern void asm_nofp_remainder (void); +extern void asm_nofp_subtract (void); +extern void asm_nofp_zero (void); +extern void asm_primitive_apply (void); +extern void asm_primitive_error (void); +extern void asm_primitive_lexpr_apply (void); +extern void asm_reference_trap (void); +extern void asm_safe_reference_trap (void); +extern void asm_sc_apply (void); +extern void asm_sc_apply_size_1 (void); +extern void asm_sc_apply_size_2 (void); +extern void asm_sc_apply_size_3 (void); +extern void asm_sc_apply_size_4 (void); +extern void asm_sc_apply_size_5 (void); +extern void asm_sc_apply_size_6 (void); +extern void asm_sc_apply_size_7 (void); +extern void asm_sc_apply_size_8 (void); +extern void asm_scheme_to_interface (void); +extern void asm_scheme_to_interface_call (void); +extern void asm_serialize_cache (void); +extern void asm_short_primitive_apply (void); +extern void asm_trampoline_to_interface (void); extern void ia32_cache_synchronize (void); extern void start_closure_relocation (SCHEME_OBJECT *, reloc_ref_t *); diff --git a/v7/src/microcode/extern.h b/v7/src/microcode/extern.h index cf9bbd1da..6dc9b877e 100644 --- a/v7/src/microcode/extern.h +++ b/v7/src/microcode/extern.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: extern.h,v 9.69 2007/04/22 16:31:22 cph Exp $ +$Id: extern.h,v 9.70 2007/04/24 05:31:20 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -34,7 +34,12 @@ USA. /* The register block */ -extern SCHEME_OBJECT Registers []; +#ifdef __WIN32__ + extern SCHEME_OBJECT * RegistersPtr; +# define Registers RegistersPtr +#else + extern SCHEME_OBJECT Registers []; +#endif #define GET_REG_O(i) (Registers[REGBLOCK_##i]) #define GET_REG_P(i) ((SCHEME_OBJECT *) (Registers[REGBLOCK_##i])) diff --git a/v7/src/microcode/ntapi.h b/v7/src/microcode/ntapi.h index 7ceb1d56a..820b8742b 100644 --- a/v7/src/microcode/ntapi.h +++ b/v7/src/microcode/ntapi.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntapi.h,v 1.20 2007/01/05 21:19:25 cph Exp $ +$Id: ntapi.h,v 1.21 2007/04/24 05:31:25 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -892,7 +892,7 @@ extern void NT_error_unix_call (int, enum syscall_names); #ifdef SCM_NTTOP_C -static char * syscall_names_table [] = +static const char * syscall_names_table [] = { /* Native Win32 API procedures: */ "close-handle", @@ -980,7 +980,7 @@ static char * syscall_names_table [] = }; /* Machine-generated table, do not edit: */ -static char * syserr_names_table [] = +static const char * syserr_names_table [] = { /* Win32 error codes: */ "success", diff --git a/v7/src/microcode/ntgui.c b/v7/src/microcode/ntgui.c index 64e17a035..598aa2952 100644 --- a/v7/src/microcode/ntgui.c +++ b/v7/src/microcode/ntgui.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntgui.c,v 1.34 2007/04/22 16:31:22 cph Exp $ +$Id: ntgui.c,v 1.35 2007/04/24 05:31:31 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -224,11 +224,10 @@ DEFINE_PRIMITIVE ("MICROCODE-POLL-INTERRUPT-HANDLER", Prim_microcode_poll_interr DEFINE_PRIMITIVE ("NT-DEFAULT-POLL-GUI", Prim_nt_default_poll_gui, 2, 2, 0) { - PRIMITIVE_HEADER(2) - { - nt_gui_default_poll (); - PRIMITIVE_RETURN (UNSPECIFIC); - } + PRIMITIVE_HEADER (2); + + nt_gui_default_poll (); + PRIMITIVE_RETURN (UNSPECIFIC); } extern void NT_gui_init (void); diff --git a/v7/src/microcode/ntsig.c b/v7/src/microcode/ntsig.c index 1d9d7312f..5f88d5f63 100644 --- a/v7/src/microcode/ntsig.c +++ b/v7/src/microcode/ntsig.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntsig.c,v 1.27 2007/04/22 16:31:22 cph Exp $ +$Id: ntsig.c,v 1.28 2007/04/24 05:31:36 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -460,7 +460,6 @@ NT_initialize_fov (SCHEME_OBJECT fov) { int ctr, in; SCHEME_OBJECT iv, imv, prim; - extern SCHEME_OBJECT make_primitive (char *, int); static int interrupt_numbers[2] = { Global_GC_Level, diff --git a/v7/src/microcode/nttrap.c b/v7/src/microcode/nttrap.c index 030232e15..653caec8c 100644 --- a/v7/src/microcode/nttrap.c +++ b/v7/src/microcode/nttrap.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: nttrap.c,v 1.30 2007/04/22 16:31:22 cph Exp $ +$Id: nttrap.c,v 1.31 2007/04/24 05:31:41 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -26,6 +26,7 @@ USA. */ #include "scheme.h" +#include "history.h" #include "os.h" #include "nt.h" #include "nttrap.h" diff --git a/v7/src/microcode/ntutl/makefile.wcc b/v7/src/microcode/ntutl/makefile.wcc index c84e5f712..91bcddad0 100644 --- a/v7/src/microcode/ntutl/makefile.wcc +++ b/v7/src/microcode/ntutl/makefile.wcc @@ -1,6 +1,6 @@ -### -*- Fundamental -*- +### -*- Makefile -*- ### -### $Id: makefile.wcc,v 1.24 2007/02/13 19:25:15 cph Exp $ +### $Id: makefile.wcc,v 1.25 2007/04/24 05:31:56 cph Exp $ ### ### Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, ### 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -113,12 +113,12 @@ ASFLAGS = /bt=nt /d1 /fpi /fp3 /5p /mf /zq # /q operate quietly WLIB_FLAGS = /b /c /n /q -all : scheme.exe bchschem.exe bintopsb.exe psbtobin.exe +all : scheme.exe -.c.obj: +.c.obj: .AUTODEPEND $(CC) $(CFLAGS) $[@ -.asm.obj: +.asm.obj: .AUTODEPEND $(AS) $(ASFLAGS) /fo=$^@ $[@ CORE_SOURCES = & @@ -131,24 +131,46 @@ boot.c & char.c & cmpauxmd.asm & cmpint.c & +cmpintmd.c & comutl.c & daemon.c & debug.c & dfloat.c & error.c & extern.c & +fasdump.c & +fasl.c & fasload.c & fixnum.c & flonum.c & +gcloop.c & generic.c & hooks.c & hunk.c & intern.c & interp.c & +intext.c & intprm.c & list.c & lookprm.c & lookup.c & +memmag.c & +missing.c & +ntasutl.asm & +ntenv.c & +ntfile.c & +ntfs.c & +ntgui.c & +ntio.c & +ntproc.c & +ntscreen.c & +ntsig.c & +ntsock.c & +ntsys.c & +nttop.c & +nttrap.c & +nttterm.c & +nttty.c & obstack.c & option.c & osscheme.c & @@ -156,11 +178,23 @@ ostty.c & outf.c & prim.c & primutl.c & -prmcon.c & +prntenv.c & +prntfs.c & +prntio.c & +prosenv.c & +prosfile.c & +prosfs.c & +prosio.c & +prosproc.c & +prosterm.c & +prostty.c & +pruxsock.c & ptrvec.c & +purify.c & purutl.c & regex.c & rgxprim.c & +scheme32.c & step.c & storage.c & string.c & @@ -173,51 +207,6 @@ utils.c & vector.c & wind.c -OS_PRIM_SOURCES = & -prosfile.c & -prosfs.c & -prosio.c & -prosproc.c & -prosterm.c & -prostty.c & -prosenv.c & -prntenv.c & -prntfs.c & -prntio.c & -pruxsock.c - -STD_GC_SOURCES = & -fasdump.c & -gcloop.c & -memmag.c & -purify.c & -wabbit.c - -BCH_GC_SOURCES = & -bchdmp.c & -bchgcl.c & -bchmmg.c & -bchpur.c & -bchutl.c - -NT_SOURCES = & -intext.c & -ntenv.c & -ntfile.c & -ntfs.c & -ntgui.c & -ntio.c & -ntproc.c & -ntscreen.c & -ntsig.c & -ntsock.c & -ntsys.c & -nttop.c & -nttrap.c & -nttterm.c & -nttty.c & -ntasutl.asm - CORE_OBJECTS = & artutl.obj & avltree.obj & @@ -228,24 +217,46 @@ boot.obj & char.obj & cmpauxmd.obj & cmpint.obj & +cmpintmd.obj & comutl.obj & daemon.obj & debug.obj & dfloat.obj & error.obj & extern.obj & +fasdump.obj & +fasl.obj & fasload.obj & fixnum.obj & flonum.obj & +gcloop.obj & generic.obj & hooks.obj & hunk.obj & intern.obj & interp.obj & +intext.obj & intprm.obj & list.obj & lookprm.obj & lookup.obj & +memmag.obj & +missing.obj & +ntasutl.obj & +ntenv.obj & +ntfile.obj & +ntfs.obj & +ntgui.obj & +ntio.obj & +ntproc.obj & +ntscreen.obj & +ntsig.obj & +ntsock.obj & +ntsys.obj & +nttop.obj & +nttrap.obj & +nttterm.obj & +nttty.obj & obstack.obj & option.obj & osscheme.obj & @@ -253,11 +264,23 @@ ostty.obj & outf.obj & prim.obj & primutl.obj & -prmcon.obj & +prntenv.obj & +prntfs.obj & +prntio.obj & +prosenv.obj & +prosfile.obj & +prosfs.obj & +prosio.obj & +prosproc.obj & +prosterm.obj & +prostty.obj & +pruxsock.obj & ptrvec.obj & +purify.obj & purutl.obj & regex.obj & rgxprim.obj & +scheme32.obj & step.obj & storage.obj & string.obj & @@ -270,61 +293,8 @@ utils.obj & vector.obj & wind.obj -OS_PRIM_OBJECTS = & -prosfile.obj & -prosfs.obj & -prosio.obj & -prosproc.obj & -prosterm.obj & -prosenv.obj & -prostty.obj & -prntenv.obj & -prntfs.obj & -prntio.obj & -pruxsock.obj - -STD_GC_OBJECTS = & -fasdump.obj & -gcloop.obj & -memmag.obj & -purify.obj & -wabbit.obj - -BCH_GC_OBJECTS = & -bchdmp.obj & -bchgcl.obj & -bchmmg.obj & -bchpur.obj & -bchutl.obj - -NT_OBJECTS = & -intext.obj & -ntenv.obj & -ntfile.obj & -ntfs.obj & -ntgui.obj & -ntio.obj & -ntproc.obj & -ntscreen.obj & -ntsig.obj & -ntsock.obj & -ntsys.obj & -nttop.obj & -nttrap.obj & -nttterm.obj & -nttty.obj & -ntasutl.obj - -SOURCES = $(CORE_SOURCES) $(STD_GC_SOURCES) -OBJECTS = $(CORE_OBJECTS) $(STD_GC_OBJECTS) $(NT_OBJECTS) & - $(OS_PRIM_OBJECTS) usrdef.obj - -BCHSOURCES = $(CORE_SOURCES) $(BCH_GC_SOURCES) -BCHOBJECTS = $(CORE_OBJECTS) $(BCH_GC_OBJECTS) $(NT_OBJECTS) & - $(OS_PRIM_OBJECTS) bchdef.obj - -SCHEME_SOURCES = $(USER_PRIM_SOURCES) missing.c -SCHEME_OBJECTS = $(USER_PRIM_OBJECTS) missing.obj +SOURCES = $(CORE_SOURCES) $(USER_PRIM_SOURCES) +OBJECTS = $(CORE_OBJECTS) $(USER_PRIM_OBJECTS) usrdef.obj SCHEME_LIB = $(USER_LIBS) scheme : scheme.exe .SYMBOLIC @@ -332,53 +302,40 @@ scheme : scheme.exe .SYMBOLIC clean : .SYMBOLIC -del *.obj -del *.exe - -del *.lib - -del *.dll -del *.exp -del *.rbj -del *.res -del *.err -del *.sym -del *.map - -del usrdef.c bchdef.c + -del usrdef.c +# Must match "ntutl/wconfig.bat": unconfig : .SYMBOLIC -del cmpauxmd.asm + -del cmpintmd.c + -del cmpintmd-config.h -del cmpintmd.h + -del makefile + -del config.h -del float.h -del limits.h - -del makefile -del ntdialog.h - -del ntw16lib.c - -del ntw32lib.c - -del ntwntlib.c - -del *.mak - -del *.lbc - -del *.dlg + -del scheme16.c + -del scheme31.c + -del scheme32.c + -del scheme32.lbc + -del scheme32.lnk + -del ntdialog.dlg -del *.ico - -del *.rc - -del *.cur + -del ntgui.rc + -del gc.cur -scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scheme32.obj ntgui.res +scheme.exe : $(OBJECTS) ntgui.res *wlink system nt_win name $^@ $(LDFLAGS) & - file { $(OBJECTS) $(SCHEME_OBJECTS) scheme32.obj } & - $(SCHEME_LIB) + file { $(OBJECTS) } $(SCHEME_LIB) wrc /q /ad /bt=nt ntgui.res $^@ -bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) scheme32.obj ntgui.res - *wlink system nt_win name $^@ $(LDFLAGS) & - file { $(BCHOBJECTS) $(SCHEME_OBJECTS) scheme32.obj } & - $(SCHEME_LIB) - wrc /q /ad /bt=nt ntgui.res $^@ - -scheme32.obj : scheme32.c ntscmlib.h - -bintopsb.exe : bintopsb.obj missing.obj - wlink system nt $(LDFLAGS) name $^@ file { $< } - -psbtobin.exe : psbtobin.obj missing.obj - wlink system nt $(LDFLAGS) name $^@ file { $< } - findprim.exe : findprim.obj wlink system $(UTIL_SYSTEM) $(LDFLAGS) name $^@ file $[@ @@ -389,240 +346,5 @@ findprim.obj : findprim.c ntgui.res : ntgui.rc ntgui.h ntdialog.dlg ntdialog.h wrc /q /ad /bt=nt /r /x /D__WATCOMC__ $(WRCFLAGS_SYSTEM) $[@ -usrdef.c : $(SCHEME_SOURCES) $(SOURCES) $(OS_PRIM_SOURCES) ntgui.c & - findprim.exe - .\findprim $(SCHEME_SOURCES) $(SOURCES) $(OS_PRIM_SOURCES) ntgui.c & - > $^@ - -bchdef.c : $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) ntgui.c & - findprim.exe - .\findprim $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) ntgui.c & - > $^@ - -# -# Dependencies. (This was a lot of work!) -# -# This first section defines the dependencies of the include files. -# -AVLTREE_H = avltree.h $(CONFIG_H) -BCHDRN_H = bchdrn.h $(CONFIG_H) -BCHGCC_H = bchgcc.h $(CONFIG_H) $(GCCODE_H) -BIGNMINT_H = bignmint.h $(PRIMS_H) -BIGNUM_H = bignum.h ansidecl.h -BITSTR_H = bitstr.h -BKPT_H = bkpt.h -CMPGC_H = cmpgc.h $(CMPINTMD_H) -CMPINTMD_H = cmpintmd.h $(CMPTYPE_H) -CMPINT_H = cmpint.h -CMPTYPE_H = cmptype.h -COMLIN_H = comlin.h ansidecl.h -CONFIG_H = config.h confshared.h ansidecl.h -CONST_H = const.h -CRITSEC_H = critsec.h -DEFAULT_H = default.h -DSTACK_H = dstack.h ansidecl.h -DUMP_C = dump.c -EDWIN_H = edwin.h -ERRORS_H = errors.h -EXTERN_H = extern.h -FASL_H = fasl.h -FIXOBJ_H = fixobj.h -FLOAT_H = float.h -FUTURES_H = futures.h -GCCODE_H = gccode.h $(CMPGC_H) -GCTYPE_C = gctype.c $(CONFIG_H) -GC_H = gc.h -HISTORY_H = history.h -INTERP_H = interp.h -INTEXT_H = intext.h ansidecl.h $(DSTACK_H) -INTRPT_H = intrpt.h -LIMITS_H = limits.h -LOAD_C = load.c $(FASL_H) -LOCKS_H = locks.h -LOOKUP_H = lookup.h -MEMMAG_H = memmag.h $(NTSCMLIB_H) -MUL_C = mul.c $(CONFIG_H) -NTAPI_H = ntapi.h -NTDIALOG_H = ntdialog.h -NTGUI_H = ntgui.h -NTIO_H = ntio.h $(OSIO_H) -NTSCMLIB_H = ntscmlib.h -NTSCREEN_H = ntscreen.h -NTSYS_H = ntsys.h -NTTERM_H = ntterm.h $(OSTERM_H) -NTTOP_H = nttop.h $(OSTOP_H) -NTTRAP_H = nttrap.h -OBJECT_H = object.h -OBSTACK_H = obstack.h $(CONFIG_H) -OPTION_H = option.h ansidecl.h -OSCTTY_H = osctty.h $(OS_H) -OSENV_H = osenv.h $(OS_H) -OSFILE_H = osfile.h $(OS_H) -OSFS_H = osfs.h $(OS_H) -OSIO_H = osio.h $(OS_H) -OSSCHEME_H = osscheme.h $(OUTF_H) $(OS_H) -OSSIG_H = ossig.h $(OS_H) -OSTERM_H = osterm.h $(OS_H) -OSTOP_H = ostop.h $(OS_H) -OSTTY_H = ostty.h $(OS_H) -OS_H = os.h $(CONFIG_H) -OUTF_H = outf.h $(CONFIG_H) -PRENAME_H = prename.h -PRIMS_H = prims.h ansidecl.h -PRIM_H = prim.h -PRMCON_H = prmcon.h -REGEX_H = regex.h -RETURNS_H = returns.h -SCODE_H = scode.h -SDATA_H = sdata.h -STACK_H = stack.h -SYNTAX_H = syntax.h -SYSCALL_H = syscall.h $(CONFIG_H) $(NTAPI_H) -TRAP_H = trap.h -TYPES_H = types.h -USRDEF_H = usrdef.h $(SCHEME_H) $(PRIMS_H) -UXSOCK_H = uxsock.h $(OSIO_H) -WINDER_H = winder.h -ZONES_H = zones.h - -PSBMAP_H = psbmap.h $(CONFIG_H) $(TYPES_H) $(OBJECT_H) $(BIGNUM_H) & - $(BIGNMINT_H) $(SDATA_H) $(CONST_H) $(GCCODE_H) $(CMPTYPE_H) & - $(COMLIN_H) - -NT_H = nt.h $(CONFIG_H) $(INTEXT_H) $(DSTACK_H) $(OSSCHEME_H) $(NTSYS_H) & - $(SYSCALL_H) $(NTAPI_H) - -SCHEME_H = scheme.h $(CONFIG_H) $(DSTACK_H) $(OBSTACK_H) $(TYPES_H) & - $(CONST_H) $(OBJECT_H) $(INTRPT_H) $(CRITSEC_H) $(GC_H) $(SCODE_H) & - $(SDATA_H) $(FUTURES_H) $(ERRORS_H) $(RETURNS_H) $(FIXOBJ_H) & - $(STACK_H) $(INTERP_H) $(OUTF_H) $(BKPT_H) $(DEFAULT_H) $(EXTERN_H) & - $(BIGNUM_H) $(PRIM_H) $(FLOAT_H) - -# -# This second section is the dependencies of the object files. -# -artutl.obj: artutl.c $(SCHEME_H) $(LIMITS_H) -avltree.obj: avltree.c $(AVLTREE_H) -bignum.obj: bignum.c $(SCHEME_H) $(BIGNMINT_H) $(LIMITS_H) -bigprm.obj: bigprm.c $(SCHEME_H) $(PRIMS_H) $(ZONES_H) -bitstr.obj: bitstr.c $(SCHEME_H) $(PRIMS_H) $(BITSTR_H) -boot.obj: boot.c $(SCHEME_H) $(PRIMS_H) $(OPTION_H) $(OSTOP_H) $(OSTTY_H) -char.obj: char.c $(SCHEME_H) $(PRIMS_H) -cmpauxmd.obj: cmpauxmd.asm -cmpint.obj: cmpint.c $(CONFIG_H) $(DSTACK_H) $(OUTF_H) $(TYPES_H) $(CONST_H) & - $(OBJECT_H) $(INTRPT_H) $(GC_H) $(SDATA_H) $(ERRORS_H) $(RETURNS_H) & - $(FIXOBJ_H) $(STACK_H) $(INTERP_H) $(DEFAULT_H) $(EXTERN_H) $(TRAP_H) & - $(PRIMS_H) $(PRIM_H) $(CMPGC_H) $(NTSCMLIB_H) -comutl.obj: comutl.c $(SCHEME_H) $(PRIMS_H) -daemon.obj: daemon.c $(SCHEME_H) $(PRIMS_H) $(OSIO_H) -debug.obj: debug.c $(SCHEME_H) $(PRIMS_H) $(TRAP_H) $(LOOKUP_H) -dfloat.obj: dfloat.c $(SCHEME_H) $(PRIMS_H) -error.obj: error.c $(OUTF_H) $(DSTACK_H) -extern.obj: extern.c $(SCHEME_H) $(PRIMS_H) -fasload.obj: fasload.c $(SCHEME_H) $(PRIMS_H) $(OSSCHEME_H) $(OSFILE_H) & - $(OSIO_H) $(GCCODE_H) $(TRAP_H) $(OPTION_H) $(PRMCON_H) -fixnum.obj: fixnum.c $(SCHEME_H) $(PRIMS_H) $(MUL_C) -flonum.obj: flonum.c $(SCHEME_H) $(PRIMS_H) $(ZONES_H) -generic.obj: generic.c $(SCHEME_H) $(PRIMS_H) -hooks.obj: hooks.c $(SCHEME_H) $(PRIMS_H) $(WINDER_H) $(HISTORY_H) -hunk.obj: hunk.c $(SCHEME_H) $(PRIMS_H) -intern.obj: intern.c $(SCHEME_H) $(PRIMS_H) $(TRAP_H) -interp.obj: interp.c $(SCHEME_H) $(LOCKS_H) $(TRAP_H) $(LOOKUP_H) $(WINDER_H) & - $(HISTORY_H) $(CMPINT_H) $(ZONES_H) $(PRMCON_H) -intprm.obj: intprm.c $(SCHEME_H) $(PRIMS_H) $(ZONES_H) -list.obj: list.c $(SCHEME_H) $(PRIMS_H) -lookprm.obj: lookprm.c $(SCHEME_H) $(PRIMS_H) $(LOCKS_H) $(TRAP_H) $(LOOKUP_H) -lookup.obj: lookup.c $(SCHEME_H) $(LOCKS_H) $(TRAP_H) $(LOOKUP_H) -obstack.obj: obstack.c $(OBSTACK_H) -option.obj: option.c $(SCHEME_H) $(FASL_H) $(OSENV_H) $(OSFS_H) $(NT_H) & - $(NTIO_H) -osscheme.obj: osscheme.c $(SCHEME_H) $(PRIMS_H) $(OSSCHEME_H) -ostty.obj: ostty.c $(OSTTY_H) $(OSSCHEME_H) -outf.obj: outf.c $(SCHEME_H) $(NTSCREEN_H) -prim.obj: prim.c $(SCHEME_H) $(PRIMS_H) -primutl.obj: primutl.c $(SCHEME_H) $(PRIMS_H) $(OS_H) $(USRDEF_H) & - $(PRENAME_H) $(SYSCALL_H) $(AVLTREE_H) $(CMPGC_H) -prmcon.obj: prmcon.c $(SCHEME_H) $(PRIMS_H) $(PRMCON_H) -ptrvec.obj: ptrvec.c $(OUTF_H) $(DSTACK_H) -purutl.obj: purutl.c $(SCHEME_H) $(PRIMS_H) $(GCCODE_H) $(ZONES_H) & - $(CMPINT_H) -regex.obj: regex.c $(SCHEME_H) $(SYNTAX_H) $(REGEX_H) -rgxprim.obj: rgxprim.c $(SCHEME_H) $(PRIMS_H) $(EDWIN_H) $(SYNTAX_H) $(REGEX_H) -step.obj: step.c $(SCHEME_H) $(PRIMS_H) -storage.obj: storage.c $(SCHEME_H) $(GCTYPE_H) -string.obj: string.c $(SCHEME_H) $(PRIMS_H) -syntax.obj: syntax.c $(SCHEME_H) $(PRIMS_H) $(EDWIN_H) $(SYNTAX_H) -sysprim.obj: sysprim.c $(SCHEME_H) $(PRIMS_H) $(OSTTY_H) $(OSTOP_H) -term.obj: term.c $(SCHEME_H) $(OSTOP_H) $(OSIO_H) $(OSFS_H) $(OSFILE_H) & - $(EDWIN_H) -tparam.obj: tparam.c ansidecl.h -transact.obj: transact.c ansidecl.h $(OUTF_H) $(DSTACK_H) -utils.obj: utils.c $(SCHEME_H) $(PRIMS_H) $(WINDER_H) $(HISTORY_H) & - $(CMPINT_H) $(SYSCALL_H) -vector.obj: vector.c $(SCHEME_H) $(PRIMS_H) -wind.obj: wind.c $(OBSTACK_H) $(DSTACK_H) $(OUTF_H) - -prbfish.obj: prbfish.c $(SCHEME_H) $(PRIMS_H) -prgdbm.obj: prgdbm.c $(SCHEME_H) $(PRIMS_H) $(OS_H) -prmd5.obj: prmd5.c $(SCHEME_H) $(PRIMS_H) -prpgsql.obj: prpgsql.c $(SCHEME_H) $(PRIMS_H) $(USRDEF_H) $(OS_H) -prosenv.obj: prosenv.c $(SCHEME_H) $(PRIMS_H) $(OSENV_H) $(OSTOP_H) $(LIMITS_H) -prosfile.obj: prosfile.c $(SCHEME_H) $(PRIMS_H) $(OSFILE_H) -prosfs.obj: prosfs.c $(SCHEME_H) $(PRIMS_H) $(OSFILE_H) $(OSFS_H) $(OSIO_H) -prosio.obj: prosio.c $(SCHEME_H) $(PRIMS_H) $(OSIO_H) -prosproc.obj: prosproc.c $(SCHEME_H) $(PRIMS_H) $(OSPROC_H) $(OSIO_H) -prosterm.obj: prosterm.c $(SCHEME_H) $(PRIMS_H) $(OSTERM_H) $(OSIO_H) -prostty.obj: prostty.c $(SCHEME_H) $(PRIMS_H) $(OSTTY_H) $(OSCTTY_H) & - $(OSFILE_H) $(OSIO_H) -pruxsock.obj: pruxsock.c $(SCHEME_H) $(PRIMS_H) $(UXSOCK_H) -prntenv.obj: prntenv.c $(SCHEME_H) $(PRIMS_H) $(NT_H) $(NTIO_H) -prntfs.obj: prntfs.c $(SCHEME_H) $(PRIMS_H) $(NT_H) $(NTFS_H) -prntio.obj: prntio.c $(SCHEME_H) $(PRIMS_H) $(NTIO_H) $(NT_H) $(NTSCREEN_H) & - $(NTGUI_H) $(SYSCALL_H) $(NTPROC_H) $(OSTTY_H) - -fasdump.obj: fasdump.c $(SCHEME_H) $(PRIMS_H) $(OSSCHEME_H) $(OSIO_H) & - $(OSFILE_H) $(OSFS_H) $(GCCODE_H) $(TRAP_H) $(LOOKUP_H) $(FASL_H) & - $(DUMP_C) -gcloop.obj: gcloop.c $(SCHEME_H) $(GCCODE_H) -memmag.obj: memmag.c $(SCHEME_H) $(PRIMS_H) $(MEMMAG_H) $(GCCODE_H) -purify.obj: purify.c $(SCHEME_H) $(PRIMS_H) $(GCCODE_H) $(ZONES_H) -wabbit.obj: wabbit.c $(SCHEME_H) $(GCCODE_H) - -bchdmp.obj: bchdmp.c $(SCHEME_H) $(PRIMS_H) $(OSFILE_H) $(OSFS_H) $(TRAP_H) & - $(LOOKUP_H) $(FASL_H) $(NT_H) $(NTIO_H) $(BCHGCC_H) $(DUMP_C) -bchgcl.obj: bchgcl.c $(SCHEME_H) $(BCHGCC_H) -bchmmg.obj: bchmmg.c $(SCHEME_H) $(PRIMS_H) $(MEMMAG_H) $(OPTION_H) & - $(OSENV_H) $(OSENV_H) $(NT_H) $(BCHGCC_H) $(BCHDRN_H) -bchpur.obj: bchpur.c $(SCHEME_H) $(PRIMS_H) $(BCHGCC_H) $(ZONES_H) -bchutl.obj: bchutl.c $(CONFIG_H) - -intext.obj: intext.c ansidecl.h $(DSTACK_H) $(INTEXT_H) -ntenv.obj: ntenv.c $(SCHEME_H) $(NT_H) $(OSENV_H) $(NTSCREEN_H) -ntfile.obj: ntfile.c $(NT_H) $(OSFILE_H) $(NTIO_H) -ntfs.obj: ntfs.c $(NT_H) $(NTFS_H) $(OUTF_H) -ntgui.obj: ntgui.c $(SCHEME_H) $(PRIMS_H) $(OS_H) $(NT_H) $(NTDIALOG_H) & - $(NTGUI_H) $(NTSCREEN_H) -ntio.obj: ntio.c $(SCHEME_H) $(PRIMS_H) $(NT_H) $(NTIO_H) $(OSTERM_H) & - $(OSFILE_H) $(OUTF_H) $(OSSIG_H) $(INTRPT_H) $(NTSCREEN_H) -ntproc.obj: ntproc.c $(NT_H) $(NTPROC_H) $(NTIO_H) $(NTSCREEN_H) $(NTGUI_H) -ntscreen.obj: ntscreen.c $(NT_H) $(NTSCREEN_H) $(NTGUI_H) -ntsig.obj: ntsig.c $(SCHEME_H) $(CRITSEC_H) $(OSSIG_H) $(OSCTTY_H) $(OSTTY_H) & - $(NT_H) $(NTGUI_H) $(NTIO_H) $(NTSCMLIB_H) $(NTSCREEN_H) $(NTSYS_H) -ntsock.obj: ntsock.c $(SCHEME_H) $(PRIMS_H) $(NT_H) $(NTIO_H) $(UXSOCK_H) -ntsys.obj: ntsys.c $(NT_H) $(NTSYS_H) -nttop.obj: nttop.c $(NT_H) $(NTTOP_H) $(OSCTTY_H) $(PRIMS_H) $(ERRORS_H) & - $(OPTION_H) $(OUTF_H) $(NTSCMLIB_H) -nttrap.obj: nttrap.c $(SCHEME_H) $(OS_H) $(NT_H) $(NTTRAP_H) $(GCCODE_H) & - $(NTSCMLIB_H) -nttterm.obj: $(NTTTERM_H) $(SCHEME_H) $(PRIMS_H) $(OSTERM_H) -nttty.obj: nttty.c $(NT_H) $(OSTTY_H) $(OSENV_H) $(NTIO_H) $(NTTERM_H) & - $(NTSCREEN_H) -ntasutl.obj: ntasutl.asm - -missing.obj: missing.c $(CONFIG_H) - -findprim.$(OBJ): findprim.c $(CONFIG_H) - -bintopsb.obj: bintopsb.c $(PSBMAP_H) $(LIMITS_H) $(LOAD_C) $(BLTDEF_H) & - $(TRAP_H) -psbtobin.obj: psbtobin.c $(PSBMAP_H) $(FLOAT_H) $(LIMITS_H) $(FASL_H) $(DUMP_C) +usrdef.c : $(SOURCES) findprim.exe + .\findprim $(SOURCES) > $^@ diff --git a/v7/src/microcode/ntutl/wconfig.bat b/v7/src/microcode/ntutl/wconfig.bat index 769ba9ac6..0f5a626a5 100644 --- a/v7/src/microcode/ntutl/wconfig.bat +++ b/v7/src/microcode/ntutl/wconfig.bat @@ -1,5 +1,5 @@ @echo off -rem $Id: wconfig.bat,v 1.5 2007/01/05 21:19:26 cph Exp $ +rem $Id: wconfig.bat,v 1.6 2007/04/24 05:32:01 cph Exp $ rem rem Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, rem 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, @@ -24,14 +24,19 @@ rem 02110-1301, USA. rem rem Microcode configuration script for Win32 / Watcom C rem -copy cmpintmd\i386.h cmpintmd.h copy cmpauxmd\i386-ntw.asm cmpauxmd.asm +copy cmpintmd\i386.c cmpintmd.c +copy cmpintmd\i386-config.h cmpintmd-config.h +copy cmpintmd\i386.h cmpintmd.h copy ntutl\makefile.wcc makefile -copy ntutl\*.h . -copy ntutl\*.c . -copy ntutl\*.lbc . -copy ntutl\*.lnk . -copy ntutl\*.dlg . +copy ntutl\config.h . +copy ntutl\float.h . +copy ntutl\limits.h . +copy ntutl\ntdialog.h . +copy ntutl\scheme32.c . +copy ntutl\scheme32.lbc . +copy ntutl\scheme32.lnk . +copy ntutl\ntdialog.dlg . copy ntutl\*.ico . -copy ntutl\*.rc . -copy ntutl\*.cur . +copy ntutl\ntgui.rc . +copy ntutl\gc.cur . diff --git a/v7/src/microcode/outf.c b/v7/src/microcode/outf.c index 286b1d3f4..25ee40691 100644 --- a/v7/src/microcode/outf.c +++ b/v7/src/microcode/outf.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: outf.c,v 1.17 2007/04/22 16:31:23 cph Exp $ +$Id: outf.c,v 1.18 2007/04/24 05:31:46 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -136,7 +136,6 @@ voutf_master_tty (const char * format, va_list args) char buf [1000]; VSNPRINTF (buf, 1000, format, args); Screen_WriteText (master_tty_window, buf); - return (true); } void