From: PatR Date: Thu, 24 Dec 2015 00:25:06 +0000 (-0800) Subject: fix #H4041 - implicit declaration of has_colors() X-Git-Tag: NetHack-3.6.1_RC01~1125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad838c7e798454191cf0e52d2f61535faa0005ec;p=nethack fix #H4041 - implicit declaration of has_colors() _M_UNIX (SCO UNIX) and __linux__ (all flavors of linux?) both call has_colors() for TTY_GRAPHICS+TEXTCOLOR configuration, but neither declared it. The new declaration is just a guess based on usage. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index e5e62f723..4c55bc680 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -65,6 +65,7 @@ tty: specifying all four of role, race, gender, and alignment still prompted for confirmation with "Is this ok?" before starting play unix/X11: in top level Makefile, some commented out definitions of VARDATND misspelled pilemark.xbm (as pilemark.xpm) +unix/tty: fix compile warning about 'has_colors' for some configurations win32gui: getversionstring() was overflowing the provided Help About buffer win32gui: guard against buffer overflow in in mswin_getlin() MacOSX: initial binary release was built from out of date source code that diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index 55e362f66..efaa176d0 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 unixtty.c $NHDT-Date: 1432512788 2015/05/25 00:13:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $ */ +/* NetHack 3.6 unixtty.c $NHDT-Date: 1450916700 2015/12/24 00:25:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.21 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -335,6 +335,9 @@ int sco_flag_console = 0; int sco_map_valid = -1; unsigned char sco_chanmap_buf[BSIZE]; +#if defined(TTY_GRAPHICS) && defined(TEXTCOLOR) +extern int NDECL(has_colors); +#endif void NDECL(sco_mapon); void NDECL(sco_mapoff); void NDECL(check_sco_console); @@ -399,6 +402,9 @@ init_sco_cons() int linux_flag_console = 0; +#if defined(TTY_GRAPHICS) && defined(TEXTCOLOR) +extern int NDECL(has_colors); +#endif void NDECL(linux_mapon); void NDECL(linux_mapoff); void NDECL(check_linux_console);