fix #H4041 - implicit declaration of has_colors()
authorPatR <rankin@nethack.org>
Thu, 24 Dec 2015 00:25:06 +0000 (16:25 -0800)
committerPatR <rankin@nethack.org>
Thu, 24 Dec 2015 00:25:06 +0000 (16:25 -0800)
_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.

doc/fixes36.1
sys/share/unixtty.c

index e5e62f72348d7bd0d43878dac8a552305ea4a2fa..4c55bc6806be490c2c6c10afa73bbd8bd93dd3f4 100644 (file)
@@ -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
index 55e362f6631f68515bd6ceeaff69c22259d62213..efaa176d0c3be9fb7f3a522fa178ee77fd788b3a 100644 (file)
@@ -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);