- on WIN32 platforms, ask user to press a key before it exits. Otherwise,

if you run it by double-clicking, the window will disappear before
  you have a chance to read it.
This commit is contained in:
Bryce Denney 2002-10-15 20:47:43 +00:00
parent 0afccdd6a2
commit f05b2649f4
2 changed files with 22 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
* misc/bximage.c
* $Id: bximage.c,v 1.12 2002-09-30 22:33:52 bdenney Exp $
* $Id: bximage.c,v 1.13 2002-10-15 20:47:43 bdenney Exp $
*
* Create empty hard disk or floppy disk images for bochs.
*
@ -11,10 +11,13 @@
#include <string.h>
#include <ctype.h>
#include <assert.h>
#ifdef WIN32
# include <conio.h>
#endif
#include "config.h"
char *EOF_ERR = "ERROR: End of input";
char *rcsid = "$Id: bximage.c,v 1.12 2002-09-30 22:33:52 bdenney Exp $";
char *rcsid = "$Id: bximage.c,v 1.13 2002-10-15 20:47:43 bdenney Exp $";
char *divider = "========================================================================";
/* menu data for choosing floppy/hard disk */
@ -51,6 +54,10 @@ print_banner ()
void fatal (char *c)
{
printf ("%s\n", c);
#ifdef WIN32
printf ("\nPress any key to continue\n");
getch();
#endif
exit (1);
}

View File

@ -2,7 +2,7 @@
//
// misc/niclist.c
// by Don Becker <x-odus@iname.com>
// $Id: niclist.c,v 1.6 2002-02-03 06:22:21 bdenney Exp $
// $Id: niclist.c,v 1.7 2002-10-15 20:47:43 bdenney Exp $
//
// This program is for win32 only. It lists the network interface cards
// that you can use in the "ethdev" field of the ne2k line in your bochsrc.
@ -12,6 +12,10 @@
//
/////////////////////////////////////////////////////////////////////////
#ifndef WIN32
#error Niclist will only work on WIN32 platforms.
#endif
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
@ -37,6 +41,12 @@ NIC_INFO_9X ni9X[MAX_ADAPTERS];
BOOLEAN (*PacketGetAdapterNames)(PTSTR, PULONG) = NULL;
void myexit (int code)
{
printf ("\nPress any key to continue\n");
getch();
exit(code);
}
int main(int argc, char **argv)
{
@ -61,7 +71,7 @@ int main(int argc, char **argv)
printf("Could not load WinPCap driver!\n");
printf ("You can download them for free from\n");
printf ("http://netgroup-serv.polito.it/winpcap\n");
return 1;
myexit(1);
}
dwVersion = GetVersion();
@ -146,5 +156,5 @@ int main(int argc, char **argv)
printf("\n");
}
return 0;
myexit (0);
}