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