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 * addchn.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/addchn.c 1.1 1995/05/30 13:39:22 ant Exp $";
39 #endif
40 #endif
41
42 #include <private.h>
43
44 #undef addchnstr
45
46 int
addchnstr(chs,n)47 addchnstr(chs, n)
48 const chtype *chs;
49 int n;
50 {
51 int code;
52
53 #ifdef M_CURSES_TRACE
54 __m_trace("addchnstr(%p, %d)", chs, n);
55 #endif
56
57 code = waddchnstr(stdscr, chs, n);
58
59 return __m_return_code("addchnstr", code);
60 }
61
62 #undef mvaddchnstr
63
64 int
mvaddchnstr(y,x,chs,n)65 mvaddchnstr(y, x, chs, n)
66 int y, x;
67 const chtype *chs;
68 int n;
69 {
70 int code;
71
72 #ifdef M_CURSES_TRACE
73 __m_trace("mvaddchnstr(%d, %d, %p, %d)", y, x, chs, n);
74 #endif
75
76 if ((code = wmove(stdscr, y, x)) == OK)
77 code = waddchnstr(stdscr, chs, n);
78
79 return __m_return_code("mvaddchnstr", code);
80 }
81
82 #undef mvwaddchnstr
83
84 int
mvwaddchnstr(w,y,x,chs,n)85 mvwaddchnstr(w, y, x, chs, n)
86 WINDOW *w;
87 int y, x;
88 const chtype *chs;
89 int n;
90 {
91 int code;
92
93 #ifdef M_CURSES_TRACE
94 __m_trace("mvwaddchnstr(%p, %d, %d, %p, %d)", w, y, x, chs, n);
95 #endif
96
97 if ((code = wmove(w, y, x)) == OK)
98 code = waddchnstr(w, chs, n);
99
100 return __m_return_code("mvwaddchnstr", code);
101 }
102
103 #undef addchstr
104
105 int
addchstr(chs)106 addchstr(chs)
107 const chtype *chs;
108 {
109 int code;
110
111 #ifdef M_CURSES_TRACE
112 __m_trace("addchstr(%p)", chs);
113 #endif
114
115 code = waddchnstr(stdscr, chs, -1);
116
117 return __m_return_code("addchstr", code);
118 }
119
120 #undef mvaddchstr
121
122 int
mvaddchstr(y,x,chs)123 mvaddchstr(y, x, chs)
124 int y, x;
125 const chtype *chs;
126 {
127 int code;
128
129 #ifdef M_CURSES_TRACE
130 __m_trace("mvaddchstr(%d, %d, %p)", y, x, chs);
131 #endif
132
133 if ((code = wmove(stdscr, y, x)) == OK)
134 code = waddchnstr(stdscr, chs, -1);
135
136 return __m_return_code("mvaddchstr", code);
137 }
138
139 #undef mvwaddchstr
140
141 int
mvwaddchstr(w,y,x,chs)142 mvwaddchstr(w, y, x, chs)
143 WINDOW *w;
144 int y, x;
145 const chtype *chs;
146 {
147 int code;
148
149 #ifdef M_CURSES_TRACE
150 __m_trace("mvwaddchstr(%p, %d, %d, %p)", w, y, x, chs);
151 #endif
152
153 if ((code = wmove(w, y, x)) == OK)
154 code = waddchnstr(w, chs, -1);
155
156 return __m_return_code("mvwaddchstr", code);
157 }
158
159 #undef waddchstr
160
161 int
waddchstr(w,chs)162 waddchstr(w, chs)
163 WINDOW *w;
164 const chtype *chs;
165 {
166 int code;
167
168 #ifdef M_CURSES_TRACE
169 __m_trace("waddchstr(%p, %p)", w, chs);
170 #endif
171
172 code = waddchnstr(w, chs, -1);
173
174 return __m_return_code("waddchstr", code);
175 }
176
177