diff src/ntheap.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents a307f9a2021d
children a634e3b7acc8
line wrap: on
line diff
--- a/src/ntheap.c	Fri Mar 08 13:33:14 2002 +0000
+++ b/src/ntheap.c	Wed Mar 13 08:54:06 2002 +0000
@@ -21,14 +21,15 @@
    Geoff Voelker (voelker@cs.washington.edu) 7-29-94 */
 
 /* Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au> */
-/* Synced with FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */
+/* Synced with FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org>
+   (Note: Sync messages from Marc Paquette may indicate
+   incomplete synching, so beware.)
+ */
 
 #include <config.h>
-#include "lisp.h"  /* for VALMASK */
+#include "lisp.h"
 
-#include <stdlib.h>
-
-#include "ntheap.h"
+#include "syswindows.h"
 
 /* This gives us the page size and the size of the allocation unit on NT.  */
 SYSTEM_INFO sysinfo_cache;
@@ -242,13 +243,13 @@
 	{
 	  /* Oops, something has already reserved or commited it, nothing we can do but exit */
 	  char buf[256];
-	  wsprintf(buf,
+	  sprintf (buf,
 			   "XEmacs cannot start because the memory region required by the heap is not available.\n"
 			   "(BaseAddress = 0x%lx, AllocationBase = 0x%lx, Size = 0x%lx, State = %s, Type = %s)",
 			   info.BaseAddress, info.AllocationBase, info.RegionSize,
 			   info.State == MEM_COMMIT ? "COMMITED" : "RESERVED",
 			   info.Type == MEM_IMAGE ? "IMAGE" : info.Type == MEM_MAPPED ? "MAPPED" : "PRIVATE");
-	  MessageBox(NULL, buf, "XEmacs", MB_OK | MB_ICONSTOP);
+	  MessageBoxA (NULL, buf, "XEmacs", MB_OK | MB_ICONSTOP);
 	  exit(1);
 	}
 
@@ -259,10 +260,10 @@
 	{
 	  /* Can't reserve it, nothing we can do but exit */
 	  char buf[256];
-	  wsprintf(buf,
+	  sprintf (buf,
 			   "XEmacs cannot start because it couldn't reserve space required for the heap.\n"
 			   "(VirtualAlloc at 0x%lx of 0x%lx failed (%d))", base, size, GetLastError());
-	  MessageBox(NULL, buf, "XEmacs", MB_OK | MB_ICONSTOP);
+	  MessageBoxA (NULL, buf, "XEmacs", MB_OK | MB_ICONSTOP);
 	  exit (1);
 	}