This commit was generated by cvs2svn to compensate for changes in r1705,
[chise/xemacs-chise.git.1] / src / unexnt.c
index d10f745..3a6b0b1 100644 (file)
@@ -56,10 +56,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  * version of my_ebss in lastfile.c and a new firstfile.c file.  jhar */
 
 #include <config.h>
-#include <stdlib.h>    /* _fmode */
-#include <stdio.h>
-#include <fcntl.h>
-#include <windows.h>
+#include "lisp.h"
+
+#include "syswindows.h"
 
 #include "nt.h"
 #include "ntheap.h"
@@ -103,13 +102,6 @@ DWORD  data_size = UNINIT_LONG;
 PUCHAR bss_start = UNINIT_PTR;
 DWORD  bss_size = UNINIT_LONG;
 
-#ifdef HAVE_NTGUI
-HINSTANCE hinst = NULL;
-HINSTANCE hprevinst = NULL;
-LPSTR lpCmdLine = "";
-int nCmdShow = 0;
-#endif /* HAVE_NTGUI */
-
 /* Startup code for running on NT.  When we are running as the dumped
    version, we need to bootstrap our heap and .bss section into our
    address space before we can actually hand off control to the startup
@@ -163,7 +155,7 @@ _start (void)
      hit and fix all the weirdities this causes us, the better --kkm */
 #if 0
   /* The default behavior is to treat files as binary and patch up
-     text files appropriately, in accordance with the MSDOS code.  */
+     text files appropriately.  */
   _fmode = O_BINARY;
 #endif
 
@@ -173,21 +165,13 @@ _start (void)
   SetConsoleCtrlHandler ((PHANDLER_ROUTINE) ctrl_c_handler, TRUE);
 #endif
 
-  /* Invoke the NT CRT startup routine now that our housecleaning
-     is finished.  */
-#ifdef HAVE_NTGUI
-  /* determine WinMain args like crt0.c does */
-  hinst = GetModuleHandle(NULL);
-  lpCmdLine = GetCommandLine();
-  nCmdShow = SW_SHOWDEFAULT;
-#endif
   mainCRTStartup ();
 }
 
 /* Dump out .data and .bss sections into a new executable.  */
-void
-unexec (char *new_name, char *old_name, void *start_data, void *start_bss,
-       void *entry_address)
+int
+unexec (char *new_name, char *old_name, unsigned int start_data,
+       unsigned int start_bss, unsigned int entry_address)
 {
   file_data in_file, out_file;
   char out_filename[MAX_PATH], in_filename[MAX_PATH];
@@ -282,6 +266,8 @@ unexec (char *new_name, char *old_name, void *start_data, void *start_bss,
 
   close_file_data (&in_file);
   close_file_data (&out_file);
+
+  return 0;
 }
 
 /* Routines to manipulate NT executable file sections.  */