[Pkg-nethack-devel] nethack/sys/share NetHack.cnf,1.1.1.1,1.2 pcmain.c,1.1.1.1,1.2 pcsys.c,1.1.1.1,1.2 pctty.c,1.1.1.1,1.2 pcunix.c,1.1.1.1,1.2

Joshua Kwan joshk-guest@quantz.debian.org
Tue, 09 Dec 2003 16:14:46 +0000


Update of /cvsroot/pkg-nethack/nethack/sys/share
In directory quantz:/tmp/cvs-serv9687/sys/share

Modified Files:
	NetHack.cnf pcmain.c pcsys.c pctty.c pcunix.c 
Log Message:
Merge Nethack 3.4.3 upstream source.


Index: pctty.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/share/pctty.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- pctty.c	7 Oct 2003 19:00:32 -0000	1.1.1.1
+++ pctty.c	9 Dec 2003 16:14:44 -0000	1.2
@@ -75,9 +75,6 @@
 	VA_INIT(s, const char *);
 	/* error() may get called before tty is initialized */
 	if (iflags.window_inited) end_screen();
-#ifdef WIN32CON
-	if (iflags.rawio) set_output_mode(0);
-#endif
 	putchar('\n');
 	Vprintf(s,VA_ARGS);
 	putchar('\n');

Index: pcmain.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/share/pcmain.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- pcmain.c	7 Oct 2003 19:00:31 -0000	1.1.1.1
+++ pcmain.c	9 Dec 2003 16:14:44 -0000	1.2
@@ -59,6 +59,10 @@
 #define nethack_exit exit
 #endif
 
+#ifdef WIN32
+extern boolean getreturn_enabled;	/* from sys/share/pcsys.c */
+#endif
+
 #if defined(MSWIN_GRAPHICS)
 extern void NDECL(mswin_destroy_reg);
 #endif
@@ -291,19 +295,8 @@
 # endif
 #endif
 
-	if (!*plname) {
-#ifdef WIN32CON
-		boolean revert = FALSE;
-		if (!iflags.rawio) {
-			set_output_mode(1);
-			revert = TRUE;
-		}
-#endif
+	if (!*plname)
 		askname();
-#ifdef WIN32CON
-		if (revert && iflags.rawio) set_output_mode(0);
-#endif
-	}
 	plnamesuffix(); 	/* strip suffix from name; calls askname() */
 				/* again if suffix was whole name */
 				/* accepts any suffix */
@@ -402,6 +395,9 @@
 	dlb_init();
 
 	display_gamewindows();
+#ifdef WIN32
+	getreturn_enabled = TRUE;
+#endif
 
 	if ((fd = restore_saved_game()) >= 0) {
 #ifdef WIZARD
@@ -457,7 +453,6 @@
 #ifdef OS2
 	gettty(); /* somehow ctrl-P gets turned back on during startup ... */
 #endif
-
 	return;
 }
 

Index: pcunix.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/share/pcunix.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- pcunix.c	7 Oct 2003 19:00:32 -0000	1.1.1.1
+++ pcunix.c	9 Dec 2003 16:14:44 -0000	1.2
@@ -5,6 +5,7 @@
 /* This file collects some Unix dependencies; pager.c contains some more */
 
 #include "hack.h"
+#include "wintty.h"
 
 #include	<sys/stat.h>
 #if defined(WIN32) || defined(MSDOS)
@@ -105,7 +106,6 @@
 # if defined(MSDOS) && defined(NO_TERMS)
 	int grmode = iflags.grmode;
 # endif
-	
 	/* we ignore QUIT and INT at this point */
 	if (!lock_file(HLOCK, LOCKPREFIX, 10)) {
 		wait_synch();
@@ -177,13 +177,7 @@
 # endif
 		while ((ci=nhgetch()) != '\n') {
 		    if (ct > 0) {
-# if defined(WIN32CON)
-			backsp();       /* \b is visible on NT */
-			(void) putchar(' ');
-			backsp();
-# else
 			msmsg("\b \b");
-# endif
 			ct = 0;
 			c = 'n';
 		    }
@@ -263,9 +257,6 @@
 # if defined(MSDOS) && defined(NO_TERMS)
 	if (grmode) gr_init();
 # endif
-#ifdef WIN32CON
-	if (!iflags.rawio) set_output_mode(1);
-#endif
 }	
 #endif /* PC_LOCKING */
 

Index: NetHack.cnf
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/share/NetHack.cnf,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- NetHack.cnf	7 Oct 2003 19:00:31 -0000	1.1.1.1
+++ NetHack.cnf	9 Dec 2003 16:14:44 -0000	1.2
@@ -58,7 +58,11 @@
 # number_pad option can have an optional value of 0 (off), 1 (on), 
 # or 2(on,legacy-mode) which causes 5='g', alt-5='G', alt-0='I'
 #
-OPTIONS=time,noshowexp,number_pad:2,lit_corridor,rest_on_space
+OPTIONS=time,noshowexp,number_pad:2,lit_corridor
+
+# Treat space bar as rest. Warning: may be dangerous for new players.
+# OPTIONS=rest_on_space
+
 #
 # If you want to get rid of "use #quit to quit..." use:
 #OPTIONS=suppress_alert:3.3.1

Index: pcsys.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/share/pcsys.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- pcsys.c	7 Oct 2003 19:00:32 -0000	1.1.1.1
+++ pcsys.c	9 Dec 2003 16:14:44 -0000	1.2
@@ -389,7 +389,7 @@
 }
 
 #ifdef WIN32
-boolean getreturn_disable;
+boolean getreturn_enabled;
 #endif
 
 void
@@ -397,7 +397,7 @@
 const char *str;
 {
 #ifdef WIN32
-	if (getreturn_disable) return;
+	if (!getreturn_enabled) return;
 #endif
 #ifdef TOS
 	msmsg("Hit <Return> %s.", str);
@@ -408,6 +408,7 @@
 	return;
 }
 
+#ifndef WIN32CON
 void
 msmsg VA_DECL(const char *, fmt)
 	VA_START(fmt);
@@ -416,14 +417,12 @@
 	if (iflags.grmode)
 		gr_finish();
 # endif
-#ifdef WIN32CON
-	if (iflags.rawio) set_output_mode(0);
-#endif
 	Vprintf(fmt, VA_ARGS);
 	flushout();
 	VA_END();
 	return;
 }
+#endif
 
 /*
  * Follow the PATH, trying to fopen the file.
@@ -491,10 +490,6 @@
 int code;
 {
 	msexit();
-#ifdef MTHREAD_VIEW
-	if (iflags.mthreaded) nh_thread_exit(code);  /* no return from this */
-	else
-#endif
 	exit(code);
 }
 
@@ -537,8 +532,9 @@
 	 * not vanish instantly after being created.
 	 * GUILaunched is defined and set in nttty.c.
 	 */
-
+	synch_cursor();
 	if (GUILaunched) getreturn("to end");
+	synch_cursor();
 #endif
 	return;
 }