Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games initscr() returns a pointer, compare return value with...



details:   https://anonhg.NetBSD.org/src/rev/7f89b0d7c804
branches:  trunk
changeset: 472016:7f89b0d7c804
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Apr 18 03:30:12 1999 +0000

description:
initscr() returns a pointer, compare return value with NULL and not
an int.
Compatible with other versions of curses.

diffstat:

 games/battlestar/fly.c |  6 +++---
 games/sail/player.h    |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r 24573134279b -r 7f89b0d7c804 games/battlestar/fly.c
--- a/games/battlestar/fly.c    Sun Apr 18 03:29:18 1999 +0000
+++ b/games/battlestar/fly.c    Sun Apr 18 03:30:12 1999 +0000
@@ -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 @@
 visual()
 {
        destroyed = 0;
-       if (initscr() == ERR) {
+       if (initscr() == NULL) {
                puts("Whoops!  No more memory...");
                return (0);
        }
diff -r 24573134279b -r 7f89b0d7c804 games/sail/player.h
--- a/games/sail/player.h       Sun Apr 18 03:29:18 1999 +0000
+++ b/games/sail/player.h       Sun Apr 18 03:30:12 1999 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index