Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Only return TRUE if we can actually manipulate...



details:   https://anonhg.NetBSD.org/src/rev/eb74e30657e0
branches:  trunk
changeset: 485827:eb74e30657e0
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sat May 06 19:03:39 2000 +0000

description:
Only return TRUE if we can actually manipulate colours.

diffstat:

 lib/libcurses/color.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r a6d0c8829a09 -r eb74e30657e0 lib/libcurses/color.c
--- a/lib/libcurses/color.c     Sat May 06 18:28:36 2000 +0000
+++ b/lib/libcurses/color.c     Sat May 06 19:03:39 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: color.c,v 1.11 2000/04/29 00:43:36 mycroft Exp $       */
+/*     $NetBSD: color.c,v 1.12 2000/05/06 19:03:39 jdc Exp $   */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: color.c,v 1.11 2000/04/29 00:43:36 mycroft Exp $");
+__RCSID("$NetBSD: color.c,v 1.12 2000/05/06 19:03:39 jdc Exp $");
 #endif                         /* not lint */
 
 #include "curses.h"
@@ -91,7 +91,8 @@
 bool
 has_colors(void)
 {
-       if (cO > 0)
+       if (cO > 0 && PA > 0 && ((af != NULL && ab != NULL) || iP != NULL ||
+           iC != NULL || (sB != NULL && sF != NULL)))
                return(TRUE);
        else
                return(FALSE);



Home | Main Index | Thread Index | Old Index