-/* NetHack 3.6 termcap.c $NHDT-Date: 1447234979 2015/11/11 09:42:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.23 $ */
+/* NetHack 3.6 termcap.c $NHDT-Date: 1456907853 2016/03/02 08:37:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.24 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
+/*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
char c;
#endif
{
+/*JP
(void) putchar(c);
+*/
+ (void) cputchar(c);
}
void
const char *s;
{
#ifndef TERMLIB
+#if 1 /*JP*/
+ (void) jputchar('\0');
+#endif
(void) fputs(s, stdout);
#else
#if defined(NHSTDC) || defined(ULTRIX_PROTO)
{
if (flags.silent)
return;
+#if 0 /*JP*/
(void) putchar('\007'); /* curx does not change */
+#else
+ (void) cputchar('\007'); /* curx does not change */
+#endif
(void) fflush(stdout);
}
#endif
#if defined(MICRO)
/* simulate the delay with "cursor here" */
+#if 1 /*JP*//*JPTB need?*/
+ {
+ register int i;
+#endif
for (i = 0; i < 3; i++) {
cmov(ttyDisplay->curx, ttyDisplay->cury);
(void) fflush(stdout);
}
+#if 1 /*JP*/
+ }
+#endif
#else /* MICRO */
/* BUG: if the padding character is visible, as it is on the 5620
then this looks terrible. */
case ATR_ULINE:
if (nh_US)
return nh_US;
+ /*FALLTHRU*/
case ATR_BOLD:
case ATR_BLINK:
#if defined(TERMLIB) && defined(TEXTCOLOR)
case ATR_ULINE:
if (nh_UE)
return nh_UE;
+ /*FALLTHRU*/
case ATR_BOLD:
case ATR_BLINK:
return nh_HE;
xputs(hilites[color]);
}
+/* not to be confused with has_colors() in unixtty.c */
int
has_color(color)
int color;
#ifdef X11_GRAPHICS
/* XXX has_color() should be added to windowprocs */
if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "X11"))
- return TRUE;
+ return 1;
#endif
#ifdef GEM_GRAPHICS
/* XXX has_color() should be added to windowprocs */
if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "Gem"))
- return TRUE;
+ return 1;
#endif
#ifdef QT_GRAPHICS
/* XXX has_color() should be added to windowprocs */
if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "Qt"))
- return TRUE;
+ return 1;
#endif
#ifdef AMII_GRAPHICS
/* hilites[] not used */
- return iflags.use_color;
-#endif
+ return iflags.use_color ? 1 : 0;
+#else
return hilites[color] != (char *) 0;
+#endif
}
#endif /* TEXTCOLOR */