pull in the recent unconditionals merge from master
This commit is contained in:
4
sys/winnt/.gitattributes
vendored
Normal file
4
sys/winnt/.gitattributes
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
Install.nt filter=NHtext merge=NHsubst
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
*.rc filter=NHtext merge=NHsubst
|
||||
*.bat filter=NHtext merge=NHsubst
|
||||
@@ -5,7 +5,8 @@
|
||||
NetHack 3.5 on a Windows system
|
||||
(Windows XP and Windows 2003 or later only)
|
||||
==============================================================
|
||||
Last revision: $Date$
|
||||
Last revision: $NHDT-Date$
|
||||
Last revision: $Date: 2012/01/15 17:43:54 $
|
||||
|
||||
Credit for the porting of NetHack to the Win32 Console Subsystem goes to
|
||||
the NT Porting Team started by Michael Allison.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# NetHack 3.5 Makefile.bcc $Date$ $Revision$
|
||||
# NetHack 3.5 Makefile.bcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5 Makefile.bcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.46 $
|
||||
# Copyright (c) NetHack PC Development Team 1993-2010
|
||||
#
|
||||
#
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# NetHack 3.5 Makefile.gcc $Date$ $Revision$
|
||||
# NetHack 3.5 Makefile.gcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5 Makefile.gcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.38 $
|
||||
# Copyright (c) NetHack PC Development Team 1993-2010
|
||||
#
|
||||
# NetHack 3.5.x Makefile for MinGW
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# NetHack 3.5 Makefile.msc $Date$ $Revision$
|
||||
# NetHack 3.5 Makefile.msc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5 Makefile.msc $Date: 2012/04/14 00:38:09 $ $Revision: 1.54 $
|
||||
# Copyright (c) NetHack PC Development Team 1993-2012
|
||||
#
|
||||
# NetHack 3.5.x Makefile for MS Visual Studio Visual C++ compiler
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 console.rc $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)console.rc 3.5 $Date$ */
|
||||
/* NetHack 3.5 console.rc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 console.rc $Date: 2009/05/06 10:53:27 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)console.rc 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)console.rc 3.5 $Date: 2009/05/06 10:53:27 $ */
|
||||
/* Copyright (c) Yitzhak Sapir, 2002. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#
|
||||
# To change the configuration, comment out the unwanted lines, and
|
||||
# uncomment the configuration you want.
|
||||
#
|
||||
# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# $Date: 2006/09/23 04:40:15 $ $Revision: 1.16 $
|
||||
|
||||
# *** OPTIONS ***
|
||||
#
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 nh340key.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)nh340key.c 3.5 $Date$ */
|
||||
/* NetHack 3.5 nh340key.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nh340key.c $Date: 2009/05/06 10:53:29 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)nh340key.c 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)nh340key.c 3.5 $Date: 2009/05/06 10:53:29 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 2003 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 nhdefkey.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)nhdefkey.c 3.5 $Date$ */
|
||||
/* NetHack 3.5 nhdefkey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nhdefkey.c $Date: 2009/05/06 10:53:29 $ $Revision: 1.10 $ */
|
||||
/* SCCS Id: @(#)nhdefkey.c 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)nhdefkey.c 3.5 $Date: 2009/05/06 10:53:29 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 2003 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 nhraykey.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)nhraykey.c 3.5 $Date$ */
|
||||
/* NetHack 3.5 nhraykey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nhraykey.c $Date: 2009/05/06 10:53:31 $ $Revision: 1.8 $ */
|
||||
/* SCCS Id: @(#)nhraykey.c 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)nhraykey.c 3.5 $Date: 2009/05/06 10:53:31 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 2003 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@REM NetHack 3.5 nhsetup.bat $Date$ $Revision$ */
|
||||
@REM NetHack 3.5 nhsetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
@REM NetHack 3.5 nhsetup.bat $Date: 2010/09/05 14:22:16 $ $Revision: 1.21 $ */
|
||||
@REM Copyright (c) NetHack PC Development Team 1993-2010
|
||||
@REM NetHack may be freely redistributed. See license for details.
|
||||
@REM Win32 setup batch file, see Install.nt for details
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 ntsound.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)ntsound.c 3.5 $Date$ */
|
||||
/* NetHack 3.5 ntsound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 ntsound.c $Date: 2009/05/06 10:53:33 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)ntsound.c 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)ntsound.c 3.5 $Date: 2009/05/06 10:53:33 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 1993 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
/* */
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 nttty.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)nttty.c 3.5 $Date$ */
|
||||
/* NetHack 3.5 nttty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nttty.c $Date: 2009/05/06 10:53:34 $ $Revision: 1.54 $ */
|
||||
/* SCCS Id: @(#)nttty.c 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)nttty.c 3.5 $Date: 2009/05/06 10:53:34 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 1993 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -62,6 +64,9 @@ int GUILaunched;
|
||||
extern int redirect_stdout;
|
||||
static BOOL FDECL(CtrlHandler, (DWORD));
|
||||
|
||||
/* Flag for whether unicode is supported */
|
||||
static boolean has_unicode;
|
||||
|
||||
#ifdef PORT_DEBUG
|
||||
static boolean display_cursor_info = FALSE;
|
||||
#endif
|
||||
@@ -144,12 +149,6 @@ static void NDECL(init_ttycolor);
|
||||
# endif
|
||||
static void NDECL(really_move_cursor);
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
void FDECL(xputc_core,(NHWCHAR_P));
|
||||
#else
|
||||
void FDECL(xputc_core,(int));
|
||||
#endif
|
||||
|
||||
#define MAX_OVERRIDES 256
|
||||
unsigned char key_overrides[MAX_OVERRIDES];
|
||||
|
||||
@@ -197,14 +196,11 @@ const char *s;
|
||||
void
|
||||
setftty()
|
||||
{
|
||||
static int cp = 0;
|
||||
if (!cp) cp = GetConsoleOutputCP();
|
||||
/* SetConsoleOutputCP(1250); */
|
||||
#ifdef CHANGE_COLOR
|
||||
if (altered_palette) adjust_palette();
|
||||
#endif
|
||||
start_screen();
|
||||
iflags.unicodecapable = ((GetVersion() & 0x80000000) == 0);
|
||||
has_unicode = ((GetVersion() & 0x80000000) == 0);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -415,7 +411,7 @@ int *x, *y, *mod;
|
||||
static void
|
||||
really_move_cursor()
|
||||
{
|
||||
#if defined(PORT_DEBUG) && defined(WIZARD)
|
||||
#ifdef PORT_DEBUG
|
||||
char oldtitle[BUFSZ], newtitle[BUFSZ];
|
||||
if (display_cursor_info && wizard) {
|
||||
oldtitle[0] = '\0';
|
||||
@@ -455,61 +451,24 @@ int x,y;
|
||||
ttyDisplay->cury = y;
|
||||
}
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
#define T(x) L##x
|
||||
#else
|
||||
#define T(x) x
|
||||
#endif
|
||||
|
||||
void
|
||||
xputc_core(ich)
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
nhwchar ich;
|
||||
#else
|
||||
int ich;
|
||||
#endif
|
||||
xputc_core(ch)
|
||||
char ch;
|
||||
{
|
||||
static uchar c[2] = {0,0};
|
||||
char ch = (char)ich;
|
||||
|
||||
#if 0
|
||||
/*EURO symbol*/
|
||||
if (ich == 0x20AC) {
|
||||
if (!c[0]) {
|
||||
wchar_t t[2]={0x20ac, 0x0000};
|
||||
int cp = GetConsoleOutputCP();
|
||||
(void) WideCharToMultiByte(cp,
|
||||
0,
|
||||
t, 1,
|
||||
c, 2,
|
||||
(LPCSTR)0,
|
||||
(LPBOOL)0);
|
||||
}
|
||||
ich = (nhwchar)c[0];
|
||||
}
|
||||
#endif
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
switch(ich) {
|
||||
#else
|
||||
switch(ch) {
|
||||
#endif
|
||||
case T('\n'):
|
||||
case '\n':
|
||||
cursor.Y++;
|
||||
/* fall through */
|
||||
case T('\r'):
|
||||
case '\r':
|
||||
cursor.X = 1;
|
||||
break;
|
||||
case T('\b'):
|
||||
case '\b':
|
||||
cursor.X--;
|
||||
break;
|
||||
default:
|
||||
WriteConsoleOutputAttribute(hConOut,&attr,1,
|
||||
cursor,&acount);
|
||||
if (iflags.unicodedisp) {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
WriteConsoleOutputCharacterW(hConOut,&ich,1,
|
||||
cursor,&ccount);
|
||||
#else
|
||||
if (has_unicode) {
|
||||
/* Avoid bug in ANSI API on WinNT */
|
||||
WCHAR c2[2];
|
||||
int rc;
|
||||
@@ -520,7 +479,6 @@ int ich;
|
||||
c2, 2);
|
||||
WriteConsoleOutputCharacterW(hConOut,c2,rc,
|
||||
cursor,&ccount);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
WriteConsoleOutputCharacterA(hConOut,&ch,1,
|
||||
@@ -532,11 +490,7 @@ int ich;
|
||||
|
||||
void
|
||||
xputc(ch)
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
nhwchar ch;
|
||||
#else
|
||||
int ch;
|
||||
#endif
|
||||
char ch;
|
||||
{
|
||||
cursor.X = ttyDisplay->curx;
|
||||
cursor.Y = ttyDisplay->cury;
|
||||
@@ -567,8 +521,8 @@ const char *s;
|
||||
* for win32. It is used for glyphs only, not text.
|
||||
*/
|
||||
void
|
||||
g_putch(in_sym)
|
||||
int in_sym;
|
||||
g_putch(in_ch)
|
||||
int in_ch;
|
||||
{
|
||||
/* CP437 to Unicode mapping according to the Unicode Consortium */
|
||||
static const WCHAR cp437[] =
|
||||
@@ -606,18 +560,12 @@ int in_sym;
|
||||
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
|
||||
0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0
|
||||
};
|
||||
uchar ch = (uchar)in_sym;
|
||||
unsigned char ch = (unsigned char)in_ch;
|
||||
|
||||
cursor.X = ttyDisplay->curx;
|
||||
cursor.Y = ttyDisplay->cury;
|
||||
WriteConsoleOutputAttribute(hConOut,&attr,1,cursor,&acount);
|
||||
#ifdef UNICODE_DRAWING
|
||||
if (symset[currentgraphics].name &&
|
||||
symset[currentgraphics].unicode && iflags.unicodedisp)
|
||||
WriteConsoleOutputCharacterW(hConOut,(LPCWSTR)&in_sym,1,cursor,&ccount);
|
||||
else
|
||||
#endif
|
||||
if (SYMHANDLING(H_IBM))
|
||||
if (has_unicode)
|
||||
WriteConsoleOutputCharacterW(hConOut,&cp437[ch],1,cursor,&ccount);
|
||||
else
|
||||
WriteConsoleOutputCharacterA(hConOut,&ch,1,cursor,&ccount);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 win32api.h $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)win32api.h 3.5 $Date$ */
|
||||
/* NetHack 3.5 win32api.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 win32api.h $Date: 2009/05/06 10:53:39 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)win32api.h 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)win32api.h 3.5 $Date: 2009/05/06 10:53:39 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 1996 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* NetHack 3.5 winnt.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)winnt.c 3.5 $Date$ */
|
||||
/* NetHack 3.5 winnt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winnt.c $Date: 2012/01/15 19:11:41 $ $Revision: 1.18 $ */
|
||||
/* SCCS Id: @(#)winnt.c 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)winnt.c 3.5 $Date: 2012/01/15 19:11:41 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 1993, 1994 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -234,7 +236,6 @@ extern void NDECL(backsp);
|
||||
|
||||
void win32_abort()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
# ifdef WIN32CON
|
||||
int c, ci, ct;
|
||||
@@ -261,7 +262,6 @@ void win32_abort()
|
||||
DebugBreak();
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user