From: simonb Date: Sun, 18 Apr 1999 03:30:12 +0000 (+0000) Subject: initscr() returns a pointer, compare return value with NULL and not X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/commitdiff_plain/8934c36764e1bf60b6c457e36466b50e5e78944c?ds=sidebyside initscr() returns a pointer, compare return value with NULL and not an int. Compatible with other versions of curses. --- diff --git a/battlestar/fly.c b/battlestar/fly.c index ebe292a1..bbc81402 100644 --- a/battlestar/fly.c +++ b/battlestar/fly.c @@ -1,4 +1,4 @@ -/* $NetBSD: fly.c,v 1.6 1997/10/11 02:07:20 lukem Exp $ */ +/* $NetBSD: fly.c,v 1.7 1999/04/18 03:30:12 simonb Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)fly.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: fly.c,v 1.6 1997/10/11 02:07:20 lukem Exp $"); +__RCSID("$NetBSD: fly.c,v 1.7 1999/04/18 03:30:12 simonb Exp $"); #endif #endif /* not lint */ @@ -75,7 +75,7 @@ int visual() { destroyed = 0; - if (initscr() == ERR) { + if (initscr() == NULL) { puts("Whoops! No more memory..."); return (0); } diff --git a/sail/player.h b/sail/player.h index 07c600b3..050c7971 100644 --- a/sail/player.h +++ b/sail/player.h @@ -1,4 +1,4 @@ -/* $NetBSD: player.h,v 1.6 1998/03/29 04:57:20 mrg Exp $ */ +/* $NetBSD: player.h,v 1.7 1999/04/18 03:30:12 simonb Exp $ */ /* * Copyright (c) 1983, 1993 @@ -93,9 +93,9 @@ #define SLOT_R (SLOT_L+SLOT_X-1) #ifdef SIGTSTP -#define SCREENTEST() (initscr() != ERR && signal(SIGTSTP, SIG_DFL) != SIG_ERR && STAT_R < COLS && SCROLL_Y > 0) +#define SCREENTEST() (initscr() != NULL && signal(SIGTSTP, SIG_DFL) != SIG_ERR && STAT_R < COLS && SCROLL_Y > 0) #else -#define SCREENTEST() (initscr() != ERR && STAT_R < COLS && SCROLL_Y > 0) +#define SCREENTEST() (initscr() != NULL && STAT_R < COLS && SCROLL_Y > 0) #endif WINDOW *view_w;