/******************************************************************************/
/*
- * $Id: xmas.c,v 1.23 2008/04/12 22:05:04 tom Exp $
+ * $Id: xmas.c,v 1.25 2009/08/29 18:47:26 tom Exp $
*/
#include <test.priv.h>
unset_color(WINDOW *win)
{
if (has_colors())
- wattrset(win, COLOR_PAIR(0));
+ (void) wattrset(win, COLOR_PAIR(0));
}
static void
}
curs_set(0);
- treescrn = newwin(16, 27, 3, 53);
- treescrn2 = newwin(16, 27, 3, 53);
- treescrn3 = newwin(16, 27, 3, 53);
- treescrn4 = newwin(16, 27, 3, 53);
- treescrn5 = newwin(16, 27, 3, 53);
- treescrn6 = newwin(16, 27, 3, 53);
- treescrn7 = newwin(16, 27, 3, 53);
- treescrn8 = newwin(16, 27, 3, 53);
-
- dotdeer0 = newwin(3, 71, 0, 8);
-
- stardeer0 = newwin(4, 56, 0, 8);
-
- lildeer0 = newwin(7, 53, 0, 8);
- lildeer1 = newwin(2, 4, 0, 0);
- lildeer2 = newwin(2, 4, 0, 0);
- lildeer3 = newwin(2, 4, 0, 0);
-
- middeer0 = newwin(15, 42, 0, 8);
- middeer1 = newwin(3, 7, 0, 0);
- middeer2 = newwin(3, 7, 0, 0);
- middeer3 = newwin(3, 7, 0, 0);
-
- bigdeer0 = newwin(10, 23, 0, 0);
- bigdeer1 = newwin(10, 23, 0, 0);
- bigdeer2 = newwin(10, 23, 0, 0);
- bigdeer3 = newwin(10, 23, 0, 0);
- bigdeer4 = newwin(10, 23, 0, 0);
-
- lookdeer0 = newwin(10, 25, 0, 0);
- lookdeer1 = newwin(10, 25, 0, 0);
- lookdeer2 = newwin(10, 25, 0, 0);
- lookdeer3 = newwin(10, 25, 0, 0);
- lookdeer4 = newwin(10, 25, 0, 0);
-
- w_holiday = newwin(1, 26, 3, 27);
-
- w_del_msg = newwin(1, 19, 23, 60);
+ if ((treescrn = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn2 = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn3 = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn4 = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn5 = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn6 = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn7 = newwin(16, 27, 3, 53)) == 0 ||
+ (treescrn8 = newwin(16, 27, 3, 53)) == 0 ||
+
+ (dotdeer0 = newwin(3, 71, 0, 8)) == 0 ||
+
+ (stardeer0 = newwin(4, 56, 0, 8)) == 0 ||
+
+ (lildeer0 = newwin(7, 53, 0, 8)) == 0 ||
+ (lildeer1 = newwin(2, 4, 0, 0)) == 0 ||
+ (lildeer2 = newwin(2, 4, 0, 0)) == 0 ||
+ (lildeer3 = newwin(2, 4, 0, 0)) == 0 ||
+
+ (middeer0 = newwin(15, 42, 0, 8)) == 0 ||
+ (middeer1 = newwin(3, 7, 0, 0)) == 0 ||
+ (middeer2 = newwin(3, 7, 0, 0)) == 0 ||
+ (middeer3 = newwin(3, 7, 0, 0)) == 0 ||
+
+ (bigdeer0 = newwin(10, 23, 0, 0)) == 0 ||
+ (bigdeer1 = newwin(10, 23, 0, 0)) == 0 ||
+ (bigdeer2 = newwin(10, 23, 0, 0)) == 0 ||
+ (bigdeer3 = newwin(10, 23, 0, 0)) == 0 ||
+ (bigdeer4 = newwin(10, 23, 0, 0)) == 0 ||
+
+ (lookdeer0 = newwin(10, 25, 0, 0)) == 0 ||
+ (lookdeer1 = newwin(10, 25, 0, 0)) == 0 ||
+ (lookdeer2 = newwin(10, 25, 0, 0)) == 0 ||
+ (lookdeer3 = newwin(10, 25, 0, 0)) == 0 ||
+ (lookdeer4 = newwin(10, 25, 0, 0)) == 0 ||
+
+ (w_holiday = newwin(1, 26, 3, 27)) == 0 ||
+
+ (w_del_msg = newwin(1, 19, 23, 60)) == 0) {
+ endwin();
+ fprintf(stderr, "Cannot create windows - screen too small\n");
+ ExitProgram(EXIT_FAILURE);
+ }
mvwaddstr(w_del_msg, 0, 0, "Hit any key to quit");
mvwaddch(treescrn4, 12, 23, ' ');
/*star */
- wstandout(treescrn4);
+ (void) wstandout(treescrn4);
mvwaddch(treescrn4, 0, 12, '*');
- wstandend(treescrn4);
+ (void) wstandend(treescrn4);
/*strng1 */
mvwaddch(treescrn4, 3, 13, ' ');
mvwaddch(treescrn6, 11, 23, ' ');
/*star */
- wstandout(treescrn6);
+ (void) wstandout(treescrn6);
mvwaddch(treescrn6, 0, 12, '*');
- wstandend(treescrn6);
+ (void) wstandend(treescrn6);
/*strng1 */
static int
star(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
+ (void) wattrset(treescrn2, A_BOLD | A_BLINK);
set_color(treescrn2, COLOR_YELLOW);
mvwaddch(treescrn2, 0, 12, (chtype) '*');
- wstandend(treescrn2);
+ (void) wstandend(treescrn2);
unset_color(treescrn2);
wrefresh(treescrn2);
static int
strng1(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
+ (void) wattrset(treescrn2, A_BOLD | A_BLINK);
set_color(treescrn2, COLOR_WHITE);
mvwaddch(treescrn2, 3, 13, (chtype) '\'');
static int
strng2(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
+ (void) wattrset(treescrn2, A_BOLD | A_BLINK);
set_color(treescrn2, COLOR_WHITE);
mvwaddch(treescrn2, 5, 14, (chtype) '\'');
static int
strng3(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
+ (void) wattrset(treescrn2, A_BOLD | A_BLINK);
set_color(treescrn2, COLOR_WHITE);
mvwaddch(treescrn2, 7, 16, (chtype) '\'');
static int
strng4(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
+ (void) wattrset(treescrn2, A_BOLD | A_BLINK);
set_color(treescrn2, COLOR_WHITE);
mvwaddch(treescrn2, 9, 17, (chtype) '\'');
static int
strng5(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
+ (void) wattrset(treescrn2, A_BOLD | A_BLINK);
set_color(treescrn2, COLOR_WHITE);
mvwaddch(treescrn2, 11, 19, (chtype) '\'');