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 /* 28 * addnws.c 29 * 30 * XCurses Library 31 * 32 * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved. 33 * 34 */ 35 36 #if M_RCSID 37 #ifndef lint 38 static char rcsID[] = "$Header: /rd/src/libc/xcurses/rcs/addnws.c 1.2 1995/05/18 20:55:00 ant Exp $"; 39 #endif 40 #endif 41 42 #include <private.h> 43 44 #undef addnwstr 45 46 int 47 addnwstr(wcs, n) 48 const wchar_t *wcs; 49 int n; 50 { 51 int code; 52 53 #ifdef M_CURSES_TRACE 54 __m_trace("addnwstr(%p, %d)", wcs, n); 55 #endif 56 57 code = waddnwstr(stdscr, wcs, n); 58 59 return __m_return_code("addnwstr", code); 60 } 61 62 #undef mvaddnwstr 63 64 int 65 mvaddnwstr(y, x, wcs, n) 66 int y, x; 67 const wchar_t *wcs; 68 int n; 69 { 70 int code; 71 72 #ifdef M_CURSES_TRACE 73 __m_trace("mvaddnwstr(%d, %d, %p, %d)", y, x, wcs, n); 74 #endif 75 76 if ((code = wmove(stdscr, y, x)) == OK) 77 code = waddnwstr(stdscr, wcs, n); 78 79 return __m_return_code("mvaddnwstr", code); 80 } 81 82 #undef mvwaddnwstr 83 84 int 85 mvwaddnwstr(w, y, x, wcs, n) 86 WINDOW *w; 87 int y, x; 88 const wchar_t *wcs; 89 int n; 90 { 91 int code; 92 93 #ifdef M_CURSES_TRACE 94 __m_trace("mvwaddnwstr(%p, %d, %d, %p, %d)", w, y, x, wcs, n); 95 #endif 96 97 if ((code = wmove(w, y, x)) == OK) 98 code = waddnwstr(w, wcs, n); 99 100 return __m_return_code("mvwaddnwstr", code); 101 } 102 103 #undef addwstr 104 105 int 106 addwstr(wcs) 107 const wchar_t *wcs; 108 { 109 int code; 110 111 #ifdef M_CURSES_TRACE 112 __m_trace("addwstr(%p)", wcs); 113 #endif 114 115 code = waddnwstr(stdscr, wcs, -1); 116 117 return __m_return_code("addwstr", code); 118 } 119 120 #undef mvaddwstr 121 122 int 123 mvaddwstr(y, x, wcs) 124 int y, x; 125 const wchar_t *wcs; 126 { 127 int code; 128 129 #ifdef M_CURSES_TRACE 130 __m_trace("mvaddwstr(%d, %d, %p)", y, x, wcs); 131 #endif 132 133 if ((code = wmove(stdscr, y, x)) == OK) 134 code = waddnwstr(stdscr, wcs, -1); 135 136 return __m_return_code("mvaddwstr", code); 137 } 138 139 #undef mvwaddwstr 140 141 int 142 mvwaddwstr(w, y, x, wcs) 143 WINDOW *w; 144 int y, x; 145 const wchar_t *wcs; 146 { 147 int code; 148 149 #ifdef M_CURSES_TRACE 150 __m_trace("mvwaddwstr(%p, %d, %d, %p)", w, y, x, wcs); 151 #endif 152 153 if ((code = wmove(w, y, x)) == OK) 154 code = waddnwstr(w, wcs, -1); 155 156 return __m_return_code("mvwaddwstr", code); 157 } 158 159 #undef waddwstr 160 161 int 162 waddwstr(w, wcs) 163 WINDOW *w; 164 const wchar_t *wcs; 165 { 166 int code; 167 168 #ifdef M_CURSES_TRACE 169 __m_trace("waddwstr(%p, %p)", w, wcs); 170 #endif 171 172 code = waddnwstr(w, wcs, -1); 173 174 return __m_return_code("waddwstr", code); 175 } 176 177