compiler.
/* -*-C-*-
-$Id: ntgui.c,v 1.14 1994/11/02 20:35:27 adams Exp $
+$Id: ntgui.c,v 1.15 1995/10/24 05:04:18 cph Exp $
-Copyright (c) 1993-1994 Massachusetts Institute of Technology
+Copyright (c) 1993-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
if (!InitInstance(ghInstance, nCmdShow))
return FALSE;
- return (main (argc, argv));
+ return (scheme_main (argc, argv));
}
#endif
// PRIMITIVE_RETURN (long_to_integer (result));
//}
-static SCHEME_OBJECT call_ff_really()
+static SCHEME_OBJECT
+call_ff_really (void)
{
{
arg_sp = &local.c_args[10];
local.old_esp = saved_esp;
+#ifdef CL386
__asm
{
// Important: The order of these instructions guards against
mov esp, dword ptr [saved_esp]
mov dword ptr [result], eax
}
+#else /* not CL386 */
+#ifdef __WATCOMC__
+ {
+ extern void call_ff_really_1 (void);
+#pragma aux call_ff_really_1 = \
+ "mov eax,function_address" \
+ "mov saved_esp,esp" \
+ "mov esp,arg_sp" \
+ "call eax" \
+ "mov esp,saved_esp" \
+ "mov result,eax" \
+ modify [eax edx ecx];
+ call_ff_really_1 ();
+ }
+#endif /* __WATCOMC__ */
+#endif /* not CL386 */
saved_esp = local.old_esp;
return long_to_integer (result);
}
/* -*-C-*-
-$Id: ntio.c,v 1.10 1994/11/14 00:53:40 cph Exp $
+$Id: ntio.c,v 1.11 1995/10/24 05:05:08 cph Exp $
-Copyright (c) 1992-94 Massachusetts Institute of Technology
+Copyright (c) 1992-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
int OS_have_select_p = 0;
extern HANDLE master_tty_window;
-extern BOOL win32_under_win32s_p (void);
+extern BOOL __cdecl win32_under_win32s_p (void);
extern void EXFUN (NT_initialize_channels, (void));
extern void EXFUN (NT_reset_channels, (void));
extern void EXFUN (NT_restore_channels, (void));
/* -*-C-*-
-$Id: ntscreen.h,v 1.10 1994/11/02 20:27:05 adams Exp $
+$Id: ntscreen.h,v 1.11 1995/10/24 05:05:32 cph Exp $
-Copyright (c) 1993-1994 Massachusetts Institute of Technology
+Copyright (c) 1993-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
extern BOOL Screen_SetPosition (SCREEN, int, int);
+#ifdef __WATCOMC__
+#define _fastcall
+#endif
+
extern VOID _fastcall clear_screen_rectangle (SCREEN, int, int, int, int);
extern VOID Screen_CR_to_RECT (RECT *, SCREEN, int, int, int, int);
extern VOID _fastcall scroll_screen_vertically (SCREEN, int, int, int, int, int);
/* -*-C-*-
-$Id: nttrap.c,v 1.10 1993/12/07 20:36:02 gjr Exp $
+$Id: nttrap.c,v 1.11 1995/10/24 05:07:05 cph Exp $
-Copyright (c) 1992-1993 Massachusetts Institute of Technology
+Copyright (c) 1992-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
return (PRIM_APPLY);
}
-extern unsigned short EXFUN (getCS, (void));
-extern unsigned short EXFUN (getDS, (void));
-extern unsigned short EXFUN (getSS, (void));
+extern unsigned short __cdecl EXFUN (getCS, (void));
+extern unsigned short __cdecl EXFUN (getDS, (void));
\f
/* Needed because Stack_Check checks for <= instead of < when pushing */
{
do
{
+#ifdef CL386
try
+#endif
{
(* enter_interpreter) ();
}
+#ifdef CL386
except (WinntException ((GetExceptionCode ()),
(GetExceptionInformation ())))
{
outf_fatal ("Exception!\n");
termination_trap ();
}
+#endif
} while (1);
}
/* -*-C-*-
-$Id: nttty.c,v 1.4 1993/08/21 03:51:19 gjr Exp $
+$Id: nttty.c,v 1.5 1995/10/24 05:07:31 cph Exp $
-Copyright (c) 1992-1993 Massachusetts Institute of Technology
+Copyright (c) 1992-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
register int padcount = 0;
if (string == (char *) 0)
- return;
+ return (0);
while (*string >= '0' && *string <= '9')
{
padcount += *string++ - '0';
/* -*-C-*-
-$Id: oscond.h,v 1.20 1995/10/15 00:39:20 cph Exp $
+$Id: oscond.h,v 1.21 1995/10/24 05:08:19 cph Exp $
Copyright (c) 1990-95 Massachusetts Institute of Technology
#include "error: can't define both _BSD and _SYSV"
#endif
+#if (defined(_M_I386) || defined(M_I386)) && !defined(i386)
+#define i386
+#endif
+
#if defined(DOS386)
# define _DOS386
# define _DOS386_VERSION 50
#define _OS2
/* Don't really know the version but this is correct for my machine. */
#define _OS2_VERSION 211
-#if defined(_M_I386) || defined(M_I386)
+#ifdef i386
#define _OS2386
-#ifndef i386
-#define i386
-#endif /* i386 */
-#endif /* _M_I386 or M_I386 */
-#endif /* __OS2__ */
+#endif
+#endif
+
+#if defined(__NT__) && !defined(WINNT)
+#define WINNT
+#endif
#if defined(_BSD) || defined(_SYSV) || defined(_PIXEL)
# define _UNIX
/* -*-C-*-
-$Id: osio.h,v 1.10 1994/11/14 00:53:17 cph Exp $
+$Id: osio.h,v 1.11 1995/10/24 05:08:52 cph Exp $
-Copyright (c) 1990-94 Massachusetts Institute of Technology
+Copyright (c) 1990-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
extern void EXFUN (OS_channel_nonblocking, (Tchannel channel));
extern void EXFUN (OS_channel_blocking, (Tchannel channel));
+#ifdef WINNT
+extern int OS_have_select_p;
+#else
extern CONST int OS_have_select_p;
+#endif
#endif /* SCM_OSIO_H */
/* -*-C-*-
-$Id: outf.c,v 1.8 1995/10/08 15:30:29 cph Exp $
+$Id: outf.c,v 1.9 1995/10/24 05:09:21 cph Exp $
Copyright (c) 1993-95 Massachusetts Institute of Technology
static int max_fatal_buf = 1000;
static char fatal_buf[1000+1] = {0};
+#ifdef CL386
+#define VSNPRINTF(buffer,length,format,args) \
+ _vsnprintf ((buffer), (length), (format), (args))
+#else
+#ifdef __WATCOMC__
+#define VSNPRINTF(buffer,length,format,args) \
+ vsprintf ((buffer), (format), (args))
+#endif
+#endif
+
void
DEFUN (voutf_fatal, (format, args), CONST char *format AND va_list args)
{
int end = strlen(fatal_buf);
- _vsnprintf (&fatal_buf[end], max_fatal_buf - end, format, args);
+ VSNPRINTF (&fatal_buf[end], max_fatal_buf - end, format, args);
}
void
char buf[1000];
if (master_tty_window) {
- _vsnprintf (buf, 1000, format, args);
+ VSNPRINTF (buf, 1000, format, args);
Screen_WriteText (master_tty_window, buf);
} else {
vfprintf (outf_channel_to_FILE(chan), format, args);
/* -*-C-*-
-$Id: posixtyp.h,v 1.12 1995/10/15 00:39:32 cph Exp $
+$Id: posixtyp.h,v 1.13 1995/10/24 05:10:00 cph Exp $
-Copyright (c) 1990-1994 Massachusetts Institute of Technology
+Copyright (c) 1990-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#endif
#ifdef WINNT
+
#include <sys/types.h>
#include <time.h>
+
+#ifdef CL386
/*#define _MODE_T*/
#define _NLINK_T
#define _PID_T
/*#define _CC_T*/
#endif
+#ifdef __WATCOMC__
+#define _TIME_T
+#define _OFF_T
+#define _SIZE_T
+#define _CLOCK_T
+#endif
+
+#endif
+
#ifdef _OS2
#if defined(__IBMC__) || defined(__WATCOMC__)
/* -*-C-*-
-$Id: prntfs.c,v 1.2 1993/08/21 04:00:47 gjr Exp $
+$Id: prntfs.c,v 1.3 1995/10/24 05:10:35 cph Exp $
-Copyright (c) 1993 Massachusetts Institute of Technology
+Copyright (c) 1993-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
return ('d');
case S_IFCHR:
return ('c');
-#ifndef NT386CL
-/* S_IFBLK seems not to exist*/
+#ifdef S_IFBLK
case S_IFBLK:
return ('b');
#endif
/* -*-C-*-
-$Id: term.c,v 1.11 1994/12/19 22:29:05 cph Exp $
+$Id: term.c,v 1.12 1995/10/24 05:11:10 cph Exp $
-Copyright (c) 1990-94 Massachusetts Institute of Technology
+Copyright (c) 1990-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
extern void EXFUN (get_band_parameters, (long * heap_size, long * const_size));
extern void EXFUN (Reset_Memory, (void));
-#if WINNT || defined(_OS2)
+#if defined(WINNT) || defined(_OS2)
#define USING_MESSAGE_BOX_FOR_FATAL_OUTPUT
#endif
if (code != TERM_HALT)
#endif
outf_flush_fatal();
-#if WINNT
+#ifdef WINNT
winnt_deallocate_registers();
#endif
Reset_Memory ();
/* -*-C-*-
-$Id: utils.c,v 9.68 1995/09/18 22:33:04 cph Exp $
+$Id: utils.c,v 9.69 1995/10/24 05:11:33 cph Exp $
Copyright (c) 1987-95 Massachusetts Institute of Technology
cfp = C_Frame_Pointer;
csp = C_Stack_Pointer;
-#ifdef WINNT
+#ifdef NT386CL
try
-#endif /* WINNT */
+#endif /* NT386CL */
#endif /* i386 */
{
primitive = (Regs [REGBLOCK_PRIMITIVE]);
Regs [REGBLOCK_PRIMITIVE] = primitive;
}
#ifdef i386
-#ifdef WINNT
+#ifdef NT386CL
finally
-#endif /* WINNT */
+#endif /* NT386CL */
{
C_Frame_Pointer = cfp;
C_Stack_Pointer = csp;