Merge branch 'master' into win32-x64-working
Conflicts: include/hack.h win/X11/winmenu.c win/X11/winstat.c
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 hack.h $NHDT-Date: 1429136301 2015/04/15 22:18:21 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.59 $ */
|
||||
/* NetHack 3.5 hack.h $NHDT-Date: 1430897858 2015/05/06 07:37:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.59 $ */
|
||||
/* SCCS Id: @(#)hack.h 3.5 2008/03/19 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -9,37 +9,7 @@
|
||||
#ifndef CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/* [DEBUG shouldn't be defined unless you know what you're doing...] */
|
||||
#ifdef DEBUG
|
||||
# define showdebug(file) debugcore(file, TRUE)
|
||||
# define explicitdebug(file) debugcore(file, FALSE)
|
||||
# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0)
|
||||
# ifdef _MSC_VER
|
||||
/* if we have microsoft's C runtime we can use these instead */
|
||||
# include <crtdbg.h>
|
||||
# define crtdebug(stmt) do { if (showdebug(__FILE__)) stmt; \
|
||||
_RPT0(_CRT_WARN,"\n"); } while (0)
|
||||
# define debugpline0(str) crtdebug(_RPT0(_CRT_WARN,str))
|
||||
# define debugpline1(fmt,arg) crtdebug(_RPT1(_CRT_WARN,fmt,arg))
|
||||
# define debugpline2(fmt,a1,a2) crtdebug(_RPT2(_CRT_WARN,fmt,a1,a2))
|
||||
# define debugpline3(fmt,a1,a2,a3) crtdebug(_RPT3(_CRT_WARN,fmt,a1,a2,a3))
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) crtdebug(_RPT4(_CRT_WARN,fmt,a1,a2,a3,a4))
|
||||
# else
|
||||
/* these don't require compiler support for C99 variadic macros */
|
||||
# define debugpline0(str) ifdebug(pline(str))
|
||||
# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg))
|
||||
# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2))
|
||||
# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3))
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4))
|
||||
# endif
|
||||
#else
|
||||
# define debugpline0(str) /*empty*/
|
||||
# define debugpline1(fmt,arg) /*empty*/
|
||||
# define debugpline2(fmt,a1,a2) /*empty*/
|
||||
# define debugpline3(fmt,a1,a2,a3) /*empty*/
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/
|
||||
#endif /*DEBUG*/
|
||||
#include "lint.h"
|
||||
|
||||
#define TELL 1
|
||||
#define NOTELL 0
|
||||
|
||||
52
include/lint.h
Normal file
52
include/lint.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* NetHack 3.5 lint.h $NHDT-Date: 1430897871 2015/05/06 07:37:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.0 $ */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
* Hacks to suppress compiler warnings. Use with caution.
|
||||
* Assumes it has been preceded by '#include "config.h"' but
|
||||
* not necessarily by '#include "hack.h"'.
|
||||
*/
|
||||
#ifndef LINT_H
|
||||
#define LINT_H
|
||||
|
||||
/* cast away implicit const from a string literal (caller's responsibility
|
||||
to ensure that) in order to avoid a warning from 'gcc -Wwrite-strings'
|
||||
(also caller's responsibility to ensure it isn't actually modified!) */
|
||||
#define nhStr(str) ((char *)str)
|
||||
|
||||
#if defined(GCC_WARN) && !defined(FORCE_ARG_USAGE)
|
||||
# define FORCE_ARG_USAGE
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_ARG_USAGE
|
||||
/* force an unused function argument to become used in an arbitrary
|
||||
manner in order to suppress warning about unused function arguments;
|
||||
viable for scalar and pointer arguments */
|
||||
# define nhUse(arg) nhUse_dummy += (unsigned)arg;
|
||||
extern unsigned nhUse_dummy;
|
||||
#else
|
||||
# define nhUse(arg) /*empty*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This stuff isn't related to lint suppression but lives here to
|
||||
* avoid cluttering up hack.h.
|
||||
*/
|
||||
/* [DEBUG shouldn't be defined unless you know what you're doing...] */
|
||||
#ifdef DEBUG
|
||||
# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0)
|
||||
/* these don't require compiler support for C99 variadic macros */
|
||||
# define debugpline0(str) ifdebug(pline(str))
|
||||
# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg))
|
||||
# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2))
|
||||
# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3))
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4))
|
||||
#else
|
||||
# define debugpline0(str) /*empty*/
|
||||
# define debugpline1(fmt,arg) /*empty*/
|
||||
# define debugpline2(fmt,a1,a2) /*empty*/
|
||||
# define debugpline3(fmt,a1,a2,a3) /*empty*/
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/
|
||||
#endif /*DEBUG*/
|
||||
|
||||
#endif /* LINT_H */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 winX.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winX.h $NHDT-Date: 1430899132 2015/05/06 07:58:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
|
||||
/* NetHack 3.5 winX.h $Date: 2012/01/24 04:26:18 $ $Revision: 1.9 $ */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -356,7 +356,7 @@ E void FDECL(calculate_rip_text, (int,time_t));
|
||||
|
||||
/* ### winval.c ### */
|
||||
E Widget FDECL(create_value,(Widget, const char*));
|
||||
E void FDECL(set_name,(Widget, char*));
|
||||
E void FDECL(set_name,(Widget, const char*));
|
||||
E void FDECL(set_name_width,(Widget, int));
|
||||
E int FDECL(get_name_width,(Widget));
|
||||
E void FDECL(set_value,(Widget, const char*));
|
||||
|
||||
Reference in New Issue
Block a user