1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1995, by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 /* 30 * wattr_on.c 31 * 32 * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved. 33 * 34 */ 35 36 #ifdef M_RCSID 37 #ifndef lint 38 static char rcsID[] = "$Header: /rd/src/libc/xcurses/rcs/wattr_on.c 1.3 1995/06/05 18:55:16 ant Exp $"; 39 #endif 40 #endif 41 42 #include <private.h> 43 44 #undef wattr_on 45 46 int 47 wattr_on(WINDOW *w, attr_t at, void *opts) 48 { 49 #ifdef M_CURSES_TRACE 50 __m_trace("wattr_on(%p, %x, %p)", w, at, opts); 51 #endif 52 53 w->_fg._at |= at; 54 55 return __m_return_code("wattr_on", OK); 56 } 57 58 #undef wattr_off 59 60 int 61 wattr_off(WINDOW *w, attr_t at, void *opts) 62 { 63 #ifdef M_CURSES_TRACE 64 __m_trace("wattr_off(%p, %x, %p)", w, at, opts); 65 #endif 66 67 w->_fg._at &= ~at; 68 69 return __m_return_code("wattr_off", OK); 70 } 71 72 #undef wattr_set 73 74 int 75 wattr_set(WINDOW *w, attr_t at, short co, void *opts) 76 { 77 #ifdef M_CURSES_TRACE 78 __m_trace("wattr_set(%p, %x, %d, %p)", w, at, co, opts); 79 #endif 80 81 w->_fg._co = co; 82 w->_fg._at = at; 83 84 return __m_return_code("wattr_set", OK); 85 } 86 87 #undef wattr_get 88 89 int 90 wattr_get(WINDOW *w, attr_t *at, short *co, void *opts) 91 { 92 #ifdef M_CURSES_TRACE 93 __m_trace("wattr_get(%p, %p, %p, %p)", w, at, co, opts); 94 #endif 95 96 if (at != (attr_t *) 0) 97 *at = w->_fg._at; 98 99 if (co != (short *) 0) 100 *co = w->_fg._co; 101 102 return __m_return_int("wattr_get", OK); 103 } 104 105 #undef wcolor_set 106 107 int 108 wcolor_set(WINDOW *w, short co, void *opts) 109 { 110 #ifdef M_CURSES_TRACE 111 __m_trace("wcolor_set(%p, %d, %p)", w, co, opts); 112 #endif 113 114 w->_fg._co = co; 115 116 return __m_return_code("wcolor_set", OK); 117 } 118 119 #undef wstandout 120 121 int 122 wstandout(WINDOW *w) 123 { 124 #ifdef M_CURSES_TRACE 125 __m_trace("wstandout(%p)", w); 126 #endif 127 128 w->_fg._at |= WA_STANDOUT; 129 130 return __m_return_int("wstandout", 1); 131 } 132 133 #undef wstandend 134 135 int 136 wstandend(WINDOW *w) 137 { 138 #ifdef M_CURSES_TRACE 139 __m_trace("wstandend(%p)", w); 140 #endif 141 142 w->_fg._at = WA_NORMAL; 143 144 return __m_return_int("wstandend", 1); 145 } 146 147