Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops - Don't even try to emulate WSATTR_HILIT on m...



details:   https://anonhg.NetBSD.org/src/rev/f11943dd80f2
branches:  trunk
changeset: 473696:f11943dd80f2
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Jun 15 22:34:45 1999 +0000

description:
- Don't even try to emulate WSATTR_HILIT on mono displays
- WSATTR_REVERSE is a capability of both mono/color

diffstat:

 sys/dev/rasops/rasops.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (52 lines):

diff -r a8784b439ddb -r f11943dd80f2 sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Tue Jun 15 22:33:48 1999 +0000
+++ b/sys/dev/rasops/rasops.c   Tue Jun 15 22:34:45 1999 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.10 1999/06/15 21:34:05 ad Exp $ */
+/*      $NetBSD: rasops.c,v 1.11 1999/06/15 22:34:45 ad Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.10 1999/06/15 21:34:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.11 1999/06/15 22:34:45 ad Exp $");
 
 #include "rasops_glue.h"
 
@@ -54,6 +54,10 @@
 #include <dev/wsfont/wsfont.h>
 #include <dev/rasops/rasops.h>
 
+#ifndef _KERNEL
+#include <errno.h>
+#endif
+
 /* ANSI colormap (R,G,B). Upper 8 are high-intensity */
 u_char rasops_cmap[256*3] = {
        0x00, 0x00, 0x00, /* black */
@@ -255,11 +259,11 @@
        
        if (ri->ri_depth < 8 || ri->ri_forcemono) {
                ri->ri_ops.alloc_attr = rasops_alloc_mattr;
-               ri->ri_caps = WSATTR_UNDERLINE;
+               ri->ri_caps = WSATTR_UNDERLINE | WSATTR_REVERSE;
        } else {
                ri->ri_ops.alloc_attr = rasops_alloc_cattr;
                ri->ri_caps = WSATTR_UNDERLINE | WSATTR_HILIT | 
-                   WSATTR_WSCOLORS;
+                   WSATTR_WSCOLORS | WSATTR_REVERSE;
        }
 
        switch (ri->ri_depth) {
@@ -402,7 +406,7 @@
        if (flg & WSATTR_BLINK)
                return (EINVAL);
                
-       if (!(flg & WSATTR_REVERSE) ^ !(flg & WSATTR_HILIT)) {
+       if ((flg & WSATTR_REVERSE) != 0) {
                swap = fg;
                fg = bg;
                bg = swap;



Home | Main Index | Thread Index | Old Index