/****************************************************************************
- * Copyright (c) 1998-2013,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
*****************************************************************************/
/*
- * $Id: blue.c,v 1.42 2016/04/09 23:55:52 tom Exp $
+ * $Id: blue.c,v 1.48 2017/01/22 00:39:52 tom Exp $
*/
#include <test.priv.h>
'c', /* clubs */
};
-#ifdef HAVE_LANGINFO_CODESET
+#if HAVE_LANGINFO_CODESET
#if HAVE_TIGETSTR
static int glyphs[] =
} else {
int which = (value / SUIT_LENGTH);
int isuit = (value % SUIT_LENGTH);
- attr_t color = COLOR_PAIR(((which % 2) == 0)
- ? RED_ON_WHITE
- : BLACK_ON_WHITE);
+ attr_t color = (attr_t) COLOR_PAIR(((which % 2) == 0)
+ ? RED_ON_WHITE
+ : BLACK_ON_WHITE);
addch(ranks[isuit][0] | (chtype) COLOR_PAIR(BLUE_ON_WHITE));
addch(ranks[isuit][1] | (chtype) COLOR_PAIR(BLUE_ON_WHITE));
- attr_on(color, NULL);
+#ifdef NCURSES_VERSION
+ (attron) ((int) color); /* quieter compiler warnings */
+#else
+ attron(color); /* PDCurses, etc., either no macro or wrong */
+#endif
#if USE_WIDEC_SUPPORT
{
wchar_t values[2];
#else
addch((chtype) suits[which]);
#endif
- attr_off(color, NULL);
+#ifdef NCURSES_VERSION
+ (attroff) ((int) color);
+#else
+ attroff(color);
+#endif
}
(void) addch(' ');
}
} else {
char buf[BUFSIZ];
- (void) sprintf(buf,
- "Type [%s] to move, r to redraw, q or INTR to quit: ",
- live);
+ _nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf))
+ "Type [%s] to move, r to redraw, q or INTR to quit: ",
+ live);
do {
move(PROMPTROW, 0);