Merge branch 'NetHack-3.6.0'
This commit is contained in:
@@ -57,12 +57,14 @@ extern void FDECL(nethack_exit, (int));
|
||||
extern boolean getreturn_enabled; /* from sys/share/pcsys.c */
|
||||
extern int redirect_stdout; /* from sys/share/pcsys.c */
|
||||
extern int GUILaunched;
|
||||
HANDLE hStdOut;
|
||||
char *NDECL(exename);
|
||||
char default_window_sys[] = "mswin";
|
||||
#ifndef WIN32CON
|
||||
HANDLE hStdOut;
|
||||
boolean NDECL(fakeconsole);
|
||||
void NDECL(freefakeconsole);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(MSWIN_GRAPHICS)
|
||||
extern void NDECL(mswin_destroy_reg);
|
||||
@@ -93,6 +95,8 @@ char *argv[];
|
||||
{
|
||||
boolean resuming;
|
||||
|
||||
nethack_enter(argc, argv);
|
||||
|
||||
sys_early_init();
|
||||
#ifdef WIN32
|
||||
Strcpy(default_window_sys, "tty");
|
||||
@@ -331,9 +335,14 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
Strcpy(hackdir, HACKDIR);
|
||||
#endif
|
||||
if (argc > 1) {
|
||||
if (argcheck(argc, argv, ARG_VERSION))
|
||||
if (argcheck(argc, argv, ARG_VERSION) == 2)
|
||||
nethack_exit(EXIT_SUCCESS);
|
||||
|
||||
if (argcheck(argc, argv, ARG_DEBUG) == 1) {
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
|
||||
if (!strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
||||
/* avoid matching "-dec" for DECgraphics; since the man page
|
||||
* says -d directory, hope nobody's using -desomething_else
|
||||
@@ -353,7 +362,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
Strcpy(hackdir, dir);
|
||||
}
|
||||
if (argc > 1) {
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && !defined(WIN32CON)
|
||||
int sfd = 0;
|
||||
boolean tmpconsole = FALSE;
|
||||
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
@@ -363,7 +372,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
* may do a prscore().
|
||||
*/
|
||||
if (!strncmp(argv[1], "-s", 2)) {
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && !defined(WIN32CON)
|
||||
|
||||
#if 0
|
||||
if (!hStdOut) {
|
||||
@@ -390,7 +399,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
initoptions();
|
||||
#endif
|
||||
prscore(argc, argv);
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WIN32CON)
|
||||
if (tmpconsole) {
|
||||
getreturn("to exit");
|
||||
freefakeconsole();
|
||||
@@ -416,7 +425,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
#endif
|
||||
nhusage();
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WIN32CON)
|
||||
if (tmpconsole) {
|
||||
getreturn("to exit");
|
||||
freefakeconsole();
|
||||
@@ -913,7 +922,7 @@ authorize_wizard_mode()
|
||||
#define PATH_SEPARATOR '\\'
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WIN32CON)
|
||||
static char exenamebuf[PATHLEN];
|
||||
extern HANDLE hConIn;
|
||||
extern HANDLE hConOut;
|
||||
|
||||
Reference in New Issue
Block a user