- partially working code for windows to wait for ENTER before exiting.

This is to avoid the last message disappearing before it can be read.
  However, fgets isn't doing the trick.
This commit is contained in:
Bryce Denney 2001-05-25 01:56:28 +00:00
parent e1e266f14d
commit ace5845554

View File

@ -380,6 +380,15 @@ logfunctions::fatal (char *prefix, char *fmt, va_list ap)
fprintf (stderr, "%s ", prefix);
vfprintf (stderr, fmt, ap);
fprintf (stderr, "%s\n", divider);
#if 0 && defined(WIN32)
#error disabled because it is not working yet!
// wait for a keypress before quitting. Depending on how bochs is
// installed, the console window can disappear before the user has
// a chance to read the final message.
fprintf (stderr, "\n\nPress Enter to exit...\n");
char buf[8];
fgets (buf, 8, stdin);
#endif
#if !BX_DEBUGGER
exit(1);
#else