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