- Handle address relocation to allow the NT version of Scheme to run
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 21 Aug 1993 03:38:52 +0000 (03:38 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 21 Aug 1993 03:38:52 +0000 (03:38 +0000)
  under Windows 3.1.
- Cleanup of the NT sources.  Remove DOS fossils.

v7/src/microcode/ntgui.c
v7/src/microcode/ntio.c
v7/src/microcode/ntio.h
v7/src/microcode/ntscmlib.h
v7/src/microcode/ntutl/ntgui.rc
v7/src/microcode/ntutl/scheme31.def
v7/src/microcode/ntutl/scheme32.def

index 0125460ec380299175c60fc39fc38f9204fec027..ffd5956e481c2d988eed17fd766bb91e0e723ede 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntgui.c,v 1.5 1993/08/07 00:12:49 adams Exp $
+$Id: ntgui.c,v 1.6 1993/08/21 03:32:14 gjr Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -38,7 +38,9 @@ MIT in each case. */
 #include "os.h"
 #include "ntgui.h"
 #include "ntscreen.h"
+#include "ntdialog.h"
 #include <string.h>
+#include <stdarg.h>
 \f
 extern /*static*/ HANDLE  ghInstance = 0;
 
@@ -317,7 +319,7 @@ Prim_set_general_scheme_wndproc, 1, 1, "")
   PRIMITIVE_HEADER(1);
   {
     SCHEME_OBJECT  wndproc = ARG_REF(1);
-    if (! ADDRESS_CONSTANT_P (OBJECT_ADDRESS (wndproc)))
+    if (! (ADDRESS_CONSTANT_P (OBJECT_ADDRESS (wndproc))))
       signal_error_from_primitive (ERR_ARG_1_WRONG_TYPE);
     general_scheme_wndproc = wndproc;
     PRIMITIVE_RETURN (UNSPECIFIC);
@@ -429,7 +431,7 @@ DEFINE_PRIMITIVE ("WIN:CREATE-WINDOW", Prim_create_window, 10, 10,
     lpvParam   = (LPVOID)  ARG_REF (10);
     
     result = CreateWindowEx (0, class_name, window_name, style, x, y, w, h,
-                             hWndParent, hMenu, ghInstance, lpvParam);
+                            hWndParent, hMenu, ghInstance, lpvParam);
                 
     return  ulong_to_integer (result);
 }
@@ -783,8 +785,6 @@ DEFINE_PRIMITIVE ("UINT32-OFFSET-SET!", Prim_uint32_offset_set, 3, 3,
     }
     PRIMITIVE_RETURN (UNSPECIFIC);
 }
-
-
 \f
 static void *
 xmalloc (int size)
@@ -803,3 +803,106 @@ xfree (void *p)
 {
     free (p);
 }
+\f
+/* GUI utilities for debuggging .*/
+
+#ifdef W32_TRAP_DEBUG
+
+extern HANDLE ghInstance;
+extern HANDLE master_tty_window;
+extern int TellUser (char *, ...);
+extern int TellUserEx (int, char *, ...);
+extern char * AskUser (char *, int);
+
+int
+TellUser (char * format, ...)
+{
+  va_list arg_ptr;
+  char buffer[1024];
+  
+  va_start (arg_ptr, format);
+  wvsprintf (&buffer[0], format, arg_ptr);
+  va_end (arg_ptr);
+  return (MessageBox (master_tty_window,
+                     ((LPCSTR) &buffer[0]),
+                     ((LPCSTR) "MIT Scheme Win32 Notification"),
+                     (MB_TASKMODAL | MB_ICONINFORMATION
+                      | MB_SETFOREGROUND | MB_OK)));
+}
+
+int
+TellUserEx (int flags, char * format, ...)
+{
+  va_list arg_ptr;
+  char buffer[1024];
+  
+  va_start (arg_ptr, format);
+  wvsprintf (&buffer[0], format, arg_ptr);
+  va_end (arg_ptr);
+  return (MessageBox (master_tty_window,
+                     ((LPCSTR) &buffer[0]),
+                     ((LPCSTR) "MIT Scheme Win32 Notification"),
+                     (MB_TASKMODAL | MB_ICONINFORMATION
+                      | MB_SETFOREGROUND | flags)));
+}
+\f
+static char * askuserbuffer = ((char *) NULL);
+static int askuserbufferlength = 0;
+
+static BOOL APIENTRY
+DEFUN (askuserdlgproc, (hwnddlg, message, wparam, lparam),
+       HWND hwnddlg AND UINT message
+       AND WPARAM wparam AND LPARAM lparam)
+{
+  switch (message)
+  {
+    case WM_CLOSE:
+    done:
+      GetDlgItemText (hwnddlg, SCHEME_INPUT_TEXT,
+                     askuserbuffer,
+                     askuserbufferlength);
+      EndDialog (hwnddlg, 0);
+      return (TRUE);
+
+    case WM_COMMAND:
+      switch (wparam)
+      {
+        case IDOK:
+         goto done;
+         
+        case IDCANCEL:
+         EndDialog (hwnddlg, -1);
+         return (TRUE);
+
+        default:
+         return (FALSE);
+      }
+
+    case WM_INITDIALOG:
+      return (TRUE);
+
+    default:
+      return (FALSE);
+  }
+}
+
+char *
+DEFUN (AskUser, (buf, len), char * buf AND int len)
+{
+  char * result;
+
+  askuserbuffer = buf;
+  askuserbufferlength = len;
+  result = (DialogBox (ghInstance,
+                      SCHEME_INPUT,
+                      master_tty_window,
+                      askuserdlgproc));
+  if (result == -1)
+    return ((char *) NULL);
+
+  askuserbuffer = ((char *) NULL);
+  askuserbufferlength = 0;
+  return (buf);
+}
+
+#endif /* W32_TRAP_DEBUG */
index 69709dd3a406d94613011c895c632e78bedb9245..4a03724369badccecb4128fddbc2b4b2579383f7 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntio.c,v 1.6 1993/07/28 20:28:14 gjr Exp $
+$Id: ntio.c,v 1.7 1993/08/21 03:34:00 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -52,11 +52,12 @@ struct channel * channel_table;
 
 unsigned int OS_channels_registered;
 
-HANDLE  STDIN_HANDLE,  STDOUT_HANDLE,  STDERR_HANDLE;
-
+#ifndef GUI
+  HANDLE STDIN_HANDLE,  STDOUT_HANDLE,  STDERR_HANDLE;
+#endif
 
 static void
-DEFUN_VOID (DOS_channel_close_all)
+DEFUN_VOID (NT_channel_close_all)
 {
   Tchannel channel;
   for (channel = 0; (channel < OS_channel_table_size); channel += 1)
@@ -84,49 +85,51 @@ extern  HANDLE master_tty_window;
 void
 DEFUN_VOID (NT_initialize_channels)
 {
-  STDIN_HANDLE  = GetStdHandle (STD_INPUT_HANDLE);
-  STDOUT_HANDLE = GetStdHandle (STD_OUTPUT_HANDLE);
-  STDERR_HANDLE = GetStdHandle (STD_ERROR_HANDLE);
+#ifndef GUI
+  STDIN_HANDLE  = (GetStdHandle (STD_INPUT_HANDLE));
+  STDOUT_HANDLE = (GetStdHandle (STD_OUTPUT_HANDLE));
+  STDERR_HANDLE = (GetStdHandle (STD_ERROR_HANDLE));
 
   if (STDIN_HANDLE == INVALID_HANDLE_VALUE  ||
       STDOUT_HANDLE == INVALID_HANDLE_VALUE  ||
-      STDERR_HANDLE == INVALID_HANDLE_VALUE) {
+      STDERR_HANDLE == INVALID_HANDLE_VALUE)
+  {
     outf_fatal ("\nUnable to get standard handles %s(%d).\n",
                 __FILE__, __LINE__);
     termination_init_error ();
   }
 
-#ifndef GUI
   SetConsoleMode (STDIN_HANDLE,
-        ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT);
+                 (  ENABLE_LINE_INPUT
+                  | ENABLE_ECHO_INPUT
+                  | ENABLE_PROCESSED_INPUT));
   SetConsoleCtrlHandler (NT_ctrl_handler, TRUE);
 #endif /* GUI */
 
   master_tty_window = Screen_Create (NULL, "MIT Scheme", SW_SHOWNORMAL);
 
-
-  OS_channel_table_size = (DOS_SC_OPEN_MAX ());
+  OS_channel_table_size = (NT_SC_OPEN_MAX ());
   channel_table =
-    (DOS_malloc (OS_channel_table_size * (sizeof (struct channel))));
+    (NT_malloc (OS_channel_table_size * (sizeof (struct channel))));
   if (channel_table == 0)
-    {
-      outf_fatal ("\nUnable to allocate channel table.\n");
-      termination_init_error ();
-    }
+  {
+    outf_fatal ("\nUnable to allocate channel table.\n");
+    termination_init_error ();
+  }
   {
     Tchannel channel;
     for (channel = 0; (channel < OS_channel_table_size); channel += 1)
       MARK_CHANNEL_CLOSED (channel);
   }
-  add_reload_cleanup (DOS_channel_close_all);
+  add_reload_cleanup (NT_channel_close_all);
   OS_channels_registered = 0;
   return;
 }
 
 void
-DEFUN_VOID (DOS_reset_channels)
+DEFUN_VOID (NT_reset_channels)
 {
-  DOS_free (channel_table);
+  NT_free (channel_table);
   channel_table = 0;
   OS_channel_table_size = 0;
   return;
@@ -223,21 +226,6 @@ DEFUN (OS_terminal_drain_output, (channel), Tchannel channel)
   return;
 }
 
-//extern int EXFUN (dos_read, (int, PTR, size_t, int, int, int));
-//
-//int
-//DEFUN (dos_read, (fd, buffer, nbytes, buffered_p, blocking_p, intrpt_p),
-//       HANDLE  fd AND PTR buffer AND size_t nbytes
-//       AND int buffered_p AND int blocking_p AND int intrpt_p)
-//{
-//  if (nbytes == 0)
-//    return (0);
-//  else if (fd == (fileno (stdin)))
-//    return (console_read (buffer, nbytes, buffered_p, blocking_p, intrpt_p));
-//  else
-//    return (DOS_read (fd, buffer, nbytes));
-//}
-
 static void
 Relinquish_Timeslice (void)
 {
@@ -250,42 +238,44 @@ int
 DEFUN (nt_channel_read, (channel, buffer, nbytes),
        Tchannel channel AND PTR buffer AND size_t nbytes)
 {
-  DWORD  bytesRead = 0;
+  DWORD bytesRead = 0;
   
   if (nbytes == 0)
-    return 0;
-  else if (Screen_IsScreenHandle(CHANNEL_HANDLE (channel)))
+    return (0);
+
+  if (Screen_IsScreenHandle (CHANNEL_HANDLE (channel)))
   {
     bytesRead = Screen_Read ((CHANNEL_HANDLE (channel)),
                             ((BOOL) (CHANNEL_BUFFERED (channel))),
                             buffer, nbytes);
-    if (bytesRead == 0xffffffff) {
+    if (bytesRead == 0xffffffff)
+    {
       /* for pleasantness give up rest of this timeslice */
       Relinquish_Timeslice ();    
       errno = ERRNO_NONBLOCK;
     }
-    return  (int)bytesRead;
+    return ((int) bytesRead);
   }
-  else if (IsConsoleHandle(CHANNEL_HANDLE (channel))) {
+
+  if (IsConsoleHandle (CHANNEL_HANDLE (channel)))
+  {
     /* fake the console being a nonblocking channel that has nothing after
-       each alternate read */
+       each alternate read
+     */
+
     static int nonblock = 1;
     nonblock = !nonblock;
-    if (nonblock) {
+    if (nonblock)
+    {
       errno = ERRNO_NONBLOCK;
-      return  -1;
+      return (-1);
     }
-    if (ReadFile (CHANNEL_HANDLE (channel), buffer, nbytes, &bytesRead, 0))
-      return  (int)bytesRead;
-    else
-      return  -1;
-  }
-  else {
-    if (ReadFile (CHANNEL_HANDLE (channel), buffer, nbytes, &bytesRead, 0))
-      return  (int)bytesRead;
-    else
-      return  -1;
   }
+
+  if (ReadFile (CHANNEL_HANDLE (channel), buffer, nbytes, &bytesRead, 0))
+    return ((int) bytesRead);
+  else
+    return (-1);
 }
 
 long
@@ -298,15 +288,14 @@ DEFUN (OS_channel_read, (channel, buffer, nbytes),
     if (scr < 0)
     {
       if (errno == ERRNO_NONBLOCK)
-       return -1;
-      DOS_prim_check_errno (syscall_read);
+       return (-1);
+      NT_prim_check_errno (syscall_read);
       continue;
     }
     else if (((size_t) scr) > nbytes)
       error_external_return ();
-    else {
-        return (scr);
-    }
+    else 
+      return (scr);
   }
 }
 \f
@@ -321,7 +310,7 @@ DEFUN (raw_write, (fd, buffer, nbytes),
     return (nbytes);
   }
   if (IsConsoleHandle (fd))
-    return (dos_console_write (buffer, nbytes));
+    return (nt_console_write (buffer, nbytes));
   if (WriteFile (fd, buffer, nbytes, &bytesWritten, 0))
     return (bytesWritten);
   else
@@ -386,7 +375,7 @@ DEFUN (OS_channel_write, (channel, buffer, nbytes),
 
     if (scr < 0)
     {
-      DOS_prim_check_errno (syscall_write);
+      NT_prim_check_errno (syscall_write);
       continue;
     }
 
@@ -400,11 +389,10 @@ size_t
 DEFUN (OS_channel_read_load_file, (channel, buffer, nbytes),
        Tchannel channel AND PTR buffer AND size_t nbytes)
 {
-  DWORD  scr;
-  if (ReadFile (CHANNEL_HANDLE (channel), buffer, nbytes, &scr, 0))
-    return  scr;
-  else
-    return  0;
+  DWORD scr;
+
+  return ((ReadFile (CHANNEL_HANDLE (channel), buffer, nbytes, &scr, 0))
+         ? scr : 0);
 }
 
 size_t
@@ -412,10 +400,9 @@ DEFUN (OS_channel_write_dump_file, (channel, buffer, nbytes),
        Tchannel channel AND CONST PTR buffer AND size_t nbytes)
 {
   DWORD  scr;
-  if (WriteFile (CHANNEL_HANDLE (channel), buffer, nbytes, &scr, 0))
-    return  scr;
-  else
-    return  0;
+
+  return ((WriteFile (CHANNEL_HANDLE (channel), buffer, nbytes, &scr, 0))
+         ? scr : 0);
 }
 
 void
@@ -458,31 +445,31 @@ DEFUN (OS_channel_blocking, (channel), Tchannel channel)
 int
 DEFUN (OS_terminal_buffered_p, (channel), Tchannel channel)
 {
-  return (CHANNEL_BUFFERED(channel));
+  return (CHANNEL_BUFFERED (channel));
 }
 
 void
 DEFUN (OS_terminal_buffered, (channel), Tchannel channel)
 {
-  CHANNEL_BUFFERED(channel) = 1;
+  CHANNEL_BUFFERED (channel) = 1;
 }
 
 void
 DEFUN (OS_terminal_nonbuffered, (channel), Tchannel channel)
 {
-  CHANNEL_BUFFERED(channel) = 0;
+  CHANNEL_BUFFERED (channel) = 0;
 }
 
 int
 DEFUN (OS_terminal_cooked_output_p, (channel), Tchannel channel)
 {
-  return (CHANNEL_COOKED(channel));
+  return (CHANNEL_COOKED (channel));
 }
 
 void
 DEFUN (OS_terminal_cooked_output, (channel), Tchannel channel)
 {
-  CHANNEL_COOKED(channel) = 1;
+  CHANNEL_COOKED (channel) = 1;
 }
 
 void
@@ -500,13 +487,13 @@ DEFUN (arg_baud_index, (argument), unsigned int argument)
 unsigned int
 DEFUN (OS_terminal_get_ispeed, (channel), Tchannel channel)
 {
-  return  0;
+  return (0);
 }
 
 unsigned int
 DEFUN (OS_terminal_get_ospeed, (channel), Tchannel channel)
 {
-  return  0;
+  return (0);
 }
 
 void
@@ -514,6 +501,7 @@ DEFUN (OS_terminal_set_ispeed, (channel, baud),
        Tchannel channel AND
        unsigned int baud)
 {
+  return;
 }
 
 void
@@ -521,12 +509,13 @@ DEFUN (OS_terminal_set_ospeed, (channel, baud),
        Tchannel channel AND
        unsigned int baud)
 {
+  return;
 }
 
 unsigned int
 DEFUN (OS_baud_index_to_rate, (index), unsigned int index)
 {
-  return  9600;
+  return (9600);
 }
 
 int
@@ -545,11 +534,11 @@ void
 DEFUN (OS_terminal_get_state, (channel, state_ptr),
        Tchannel channel AND PTR state_ptr)
 {
-  unsigned char *statep = (unsigned char *) state_ptr;
+  unsigned char * statep = ((unsigned char *) state_ptr);
 
-  *statep++ = CHANNEL_NONBLOCKING(channel);
-  *statep++ = CHANNEL_BUFFERED(channel);
-  *statep   = CHANNEL_COOKED(channel);
+  *statep++ = CHANNEL_NONBLOCKING (channel);
+  *statep++ = CHANNEL_BUFFERED (channel);
+  *statep   = CHANNEL_COOKED (channel);
 
   return;
 }
@@ -558,11 +547,11 @@ void
 DEFUN (OS_terminal_set_state, (channel, state_ptr),
        Tchannel channel AND PTR state_ptr)
 {
-  unsigned char *statep = (unsigned char *) state_ptr;
+  unsigned char * statep = ((unsigned char *) state_ptr);
 
-  CHANNEL_NONBLOCKING(channel) = *statep++;
-  CHANNEL_BUFFERED(channel)    = *statep++;
-  CHANNEL_COOKED(channel)      = *statep;
+  CHANNEL_NONBLOCKING (channel) = *statep++;
+  CHANNEL_BUFFERED (channel)    = *statep++;
+  CHANNEL_COOKED (channel)      = *statep;
 
   return;
 }
@@ -606,7 +595,10 @@ DEFUN (OS_channel_unregister, (channel), Tchannel channel)
   return;
 }
 
-/* No SELECT in DOS */
+/* Hold-over from DOS.
+   This needs to be updated to use the NT equivalent.
+ */
+
 CONST int OS_have_select_p = 0;
 
 long
@@ -629,7 +621,7 @@ DEFUN (OS_channel_select_then_read, (channel, buffer, nbytes),
        return -4;
       else
       {
-       DOS_prim_check_errno (syscall_read);
+       NT_prim_check_errno (syscall_read);
        continue;
       }
     }
index 3a9bae36f2c495987acb0a7b3badd5a30fc7b431..89f5f0a8f1cec202c20426dfaf456caecf063c61 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntio.h,v 1.4 1993/06/24 02:15:21 gjr Exp $
+$Id: ntio.h,v 1.5 1993/08/21 03:34:27 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -83,9 +83,15 @@ extern Tchannel EXFUN (channel_allocate, (void));
 #define CARRIAGE_RETURN                '\r'
 #define LINEFEED               '\n'
 #define CNTRL_Z                        '\032'
-#define DELETE                 '\177'
+#define ASCII_DELETE           '\177'
 
-#define CONSOLE_HANDLE (STDIN_HANDLE)
-#define IsConsoleHandle(h)  ((h)==CONSOLE_HANDLE)
+extern BOOL EXFUN (Screen_IsScreenHandle, (HANDLE));
+
+#ifndef GUI
+#  define CONSOLE_HANDLE (STDIN_HANDLE)
+#  define IsConsoleHandle(h)  ((h) == CONSOLE_HANDLE)
+#else
+#  define IsConsoleHandle(h)  (0 == 1)
+#endif
 
 #endif /* SCM_NTIO_H */
index 0db17710ed036b6dd1803bc6a3f983c988def4b8..5cf2fdced598869f8422714629e5f8e80a2b31ce 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntscmlib.h,v 1.1 1993/07/27 20:53:51 gjr Exp $
+$Id: ntscmlib.h,v 1.2 1993/08/21 03:38:52 gjr Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -32,11 +32,13 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* MIT Scheme under Windows system utilities exports. */
+/* MIT Scheme under Windows system-dependent utilities. */
 
 #ifndef SCM_NTLIB_H
 
 #include <windows.h>
+\f
+/* Timer installation status codes. */
 
 #define WIN32_ASYNC_TIMER_OK           0
 #define WIN32_ASYNC_TIMER_NONE         1
@@ -44,18 +46,132 @@ MIT in each case. */
 #define WIN32_ASYNC_TIMER_RESOLUTION   3
 #define WIN32_ASYNC_TIMER_NOLOCK       4
 #define WIN32_ASYNC_TIMER_NOMEM                5
-
-extern BOOL win32_under_win32s_p (void);
-
-extern char * win32_allocate_heap (unsigned long, unsigned long *);
-extern void win32_release_heap (char *, unsigned long);
-
-extern BOOL win32_lock_memory_area (void *, unsigned long);
-extern void win32_unlock_memory_area (void *, unsigned long);
-
-extern UINT win32_install_async_timer (unsigned long *, unsigned long *,
-                                      unsigned long *, unsigned long,
-                                      void **);
-extern void win32_flush_async_timer (void *);
+#define WIN32_ASYNC_TIMER_NOLDT                6
+
+#ifndef W32SUT_16
+
+/* Exports to Scheme */
+
+extern BOOL 
+  win32_under_win32s_p (void);
+
+extern char *
+  win32_allocate_heap (unsigned long,                  /* size */
+                      unsigned long *);                /* handle */
+extern void
+  win32_release_heap (char *,                          /* base */
+                     unsigned long);                   /* handle */
+
+extern BOOL
+  win32_lock_memory_area (void *,                      /* area */
+                         unsigned long);               /* size */
+extern void
+  win32_unlock_memory_area (void *,                    /* area */
+                           unsigned long);             /* size */
+
+extern UINT
+  win32_install_async_timer (unsigned long *,          /* regs */
+                            unsigned long,             /* memtop off */
+                            unsigned long,             /* int_code off */
+                            unsigned long,             /* int_mask off */
+                            unsigned long,             /* mask */
+                            void **);                  /* timer state */
+extern void
+  win32_flush_async_timer (void *);
+
+extern BOOL
+  win32_alloc_scheme_selectors (unsigned long,         /* base */
+                               unsigned long,          /* limit */
+                               unsigned short *,       /* cs */
+                               unsigned short *,       /* ds */
+                               unsigned short *);      /* ss */
+extern void
+  win32_release_scheme_selectors (unsigned short,      /* cs */
+                                 unsigned short,       /* ds */
+                                 unsigned short);      /* ss */
+#endif /* W32SUT_16 */
+\f
+#if defined(W32SUT_32) || defined(W32SUT_16)
+
+/* Under Win3.1, there is a 16-bit "universal thunk".
+   The following define the communications protocol.
+ */
+
+#include <stdarg.h>
+#include <w32sut.h>
+
+#ifdef W32SUT_16
+  typedef unsigned long FAR * SCM_ULPTR;
+#else
+  typedef unsigned long * SCM_ULPTR;
+#endif
+
+typedef LPVOID SCM_VDPTR;
+typedef unsigned long SCM_ULONG;
+typedef unsigned short SCM_BOOL;
+typedef unsigned short SCM_SEL;
+
+#define STRINGIFY(arg) #arg
+
+#define NTW16LIB_DLL_NAME      "ntw16lib.dll"
+#define NTW16LIB_DLL_INIT      ntw16lib_init
+#define NTW16LIB_DLL_ENTRY     ntw16lib_handler
+
+#define NTW32LIB_RESERVED              0
+
+#define NTW32LIB_VIRTUAL_LOCK          1
+struct ntw32lib_vlock_s
+{
+  SCM_VDPTR area;              /* ->16 */
+  SCM_ULONG size;              /* ->16 */
+};
+
+#define NTW32LIB_VIRTUAL_UNLOCK                2
+struct ntw32lib_vulock_s
+{
+  SCM_VDPTR area;              /* ->16 */
+  SCM_ULONG size;              /* ->16 */
+};
+\f
+#define NTW32LIB_INSTALL_TIMER         3
+struct ntw32lib_itimer_s
+{
+  SCM_ULPTR base;              /* ->16 */
+  SCM_ULONG memtop_off;                /* ->16 */
+  SCM_ULONG int_code_off;      /* ->16 */
+  SCM_ULONG int_mask_off;      /* ->16 */
+  SCM_ULONG bit_mask;          /* ->16 */
+  SCM_ULONG handle;            /* ->32 */
+};
+
+#define NTW32LIB_FLUSH_TIMER           4
+struct ntw32lib_ftimer_s
+{
+  SCM_ULONG handle;            /* ->16 */
+};
+
+#define NTW32LIB_ALLOC_SELECTORS       5
+struct ntw32lib_selalloc_s
+{
+  SCM_ULONG base;              /* ->16 */
+  SCM_ULONG limit;             /* ->16 */
+  SCM_SEL cs32;                        /* ->16 */
+  SCM_SEL ds32;                        /* ->16 */
+  SCM_SEL cs;                  /* ->32 */
+  SCM_SEL ds;                  /* ->32 */
+  SCM_SEL ss;                  /* ->32 */
+};
+
+#define NTW32LIB_FREE_SELECTORS                6
+struct ntw32lib_selfree_s
+{
+  SCM_SEL cs32;                        /* ->16 */
+  SCM_SEL ds32;                        /* ->16 */
+  SCM_SEL cs;                  /* ->16 */
+  SCM_SEL ds;                  /* ->16 */
+  SCM_SEL ss;                  /* ->16 */
+};
+
+#endif /* defined(W32SUT_32) || defined(W32SUT_16) */
 
 #endif /* SCM_NTLIB_H */
index 4950fdaf68a3795a5aff28b8252e613254da4179..2de5dbada22ba11541a54a47d3b9f79cf85b3754 100644 (file)
@@ -1,5 +1,6 @@
 #include "windows.h"
 #include "ntgui.h"
+#include "ntdialog.h"
 
 SHIELD3_ICON ICON shield3.ico
 SHIELD4_ICON ICON shield4.ico
@@ -14,3 +15,5 @@ LAIR3_ICON ICON liar3.ico
 GRAPHICS_ICON ICON graphics.ico
 CONSES_ICON ICON conses.ico
 ENVIRONMENT_ICON ICON envir1.ico
+
+RCINCLUDE NTDIALOG.DLG
index 0e326e7cf5c667c5e384b9487adeb74c55a53598..5ce4541cf44144bc0343606246524cf906fb9fa8 100644 (file)
@@ -1,7 +1,7 @@
 LIBRARY                ntscmlib
 DESCRIPTION    "MIT Scheme Win32 DLL"
 
-VERSION                0.3
+VERSION                0.4
 
 CODE           PRELOAD MOVEABLE DISCARDABLE
 DATA           NONE
@@ -13,3 +13,5 @@ EXPORTS               win32_under_win32s_p            @ 1
                win32_unlock_memory_area        @ 5
                win32_install_async_timer       @ 6
                win32_flush_async_timer         @ 7
+               win32_alloc_scheme_selectors    @ 8
+               win32_release_scheme_selectors  @ 9
index 0e326e7cf5c667c5e384b9487adeb74c55a53598..5ce4541cf44144bc0343606246524cf906fb9fa8 100644 (file)
@@ -1,7 +1,7 @@
 LIBRARY                ntscmlib
 DESCRIPTION    "MIT Scheme Win32 DLL"
 
-VERSION                0.3
+VERSION                0.4
 
 CODE           PRELOAD MOVEABLE DISCARDABLE
 DATA           NONE
@@ -13,3 +13,5 @@ EXPORTS               win32_under_win32s_p            @ 1
                win32_unlock_memory_area        @ 5
                win32_install_async_timer       @ 6
                win32_flush_async_timer         @ 7
+               win32_alloc_scheme_selectors    @ 8
+               win32_release_scheme_selectors  @ 9