xref: /illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/in_wchn.c (revision 5d9d9091f564c198a760790b0bfa72c44e17912b)
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  * in_wchn.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/in_wchn.c 1.1 1995/06/13 21:14:26 ant Exp $";
39 #endif
40 #endif
41 
42 #include <private.h>
43 
44 int
45 (in_wchnstr)(ccs, n)
46 cchar_t *ccs;
47 int n;
48 {
49 	int code;
50 
51 #ifdef M_CURSES_TRACE
52 	__m_trace("in_wchnstr(%p, %d)", ccs, n);
53 #endif
54 
55 	code = win_wchnstr(stdscr, ccs, n);
56 
57 	return __m_return_code("in_wchnstr", code);
58 }
59 
60 int
61 (mvin_wchnstr)(y, x, ccs, n)
62 int y, x;
63 cchar_t *ccs;
64 int n;
65 {
66 	int code;
67 
68 #ifdef M_CURSES_TRACE
69 	__m_trace("mvin_wchnstr(%d, %d, %p, %d)", y, x, ccs, n);
70 #endif
71 
72 	if ((code = wmove(stdscr, y, x)) == OK)
73 		code = win_wchnstr(stdscr, ccs, n);
74 
75 	return __m_return_code("mvin_wchnstr", code);
76 }
77 
78 int
79 (mvwin_wchnstr)(w, y, x, ccs, n)
80 WINDOW *w;
81 int y, x;
82 cchar_t *ccs;
83 int n;
84 {
85 	int code;
86 
87 #ifdef M_CURSES_TRACE
88 	__m_trace("mvwin_wchnstr(%p, %d, %d, %p, %d)", w, y, x, ccs, n);
89 #endif
90 
91 	if ((code = wmove(w, y, x)) == OK)
92 		code = win_wchnstr(w, ccs, n);
93 
94 	return __m_return_code("mvwin_wchnstr", code);
95 }
96 
97 int
98 (in_wchstr)(ccs)
99 cchar_t *ccs;
100 {
101 	int code;
102 
103 #ifdef M_CURSES_TRACE
104 	__m_trace("in_wchstr(%p)", ccs);
105 #endif
106 
107 	code = win_wchnstr(stdscr, ccs, -1);
108 
109 	return __m_return_code("in_wchstr", code);
110 }
111 
112 int
113 (mvin_wchstr)(y, x, ccs)
114 int y, x;
115 cchar_t *ccs;
116 {
117 	int code;
118 
119 #ifdef M_CURSES_TRACE
120 	__m_trace("mvin_wchstr(%d, %d, %p)", y, x, ccs);
121 #endif
122 
123 	if ((code = wmove(stdscr, y, x)) == OK)
124 		code = win_wchnstr(stdscr, ccs, -1);
125 
126 	return __m_return_code("mvin_wchstr", code);
127 }
128 
129 int
130 (mvwin_wchstr)(w, y, x, ccs)
131 WINDOW *w;
132 int y, x;
133 cchar_t *ccs;
134 {
135 	int code;
136 
137 #ifdef M_CURSES_TRACE
138 	__m_trace("mvwin_wchstr(%p, %d, %d, %p)", w, y, x, ccs);
139 #endif
140 
141 	if ((code = wmove(w, y, x)) == OK)
142 		code = win_wchnstr(w, ccs, -1);
143 
144 	return __m_return_code("mvwin_wchstr", code);
145 }
146 
147 int
148 (win_wchstr)(w, ccs)
149 WINDOW *w;
150 cchar_t *ccs;
151 {
152 	int code;
153 
154 #ifdef M_CURSES_TRACE
155 	__m_trace("win_wchstr(%p, %p)", w, ccs);
156 #endif
157 
158 	code = win_wchnstr(w, ccs, -1);
159 
160 	return __m_return_code("win_wchstr", code);
161 }
162 
163