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-1998 by Sun Microsystems, Inc.
24 * All rights reserved.
25 */
26
27 #pragma ident "%Z%%M% %I% %E% SMI"
28
29 /* LINTLIBRARY */
30
31 /*
32 * innwwstr.c
33 *
34 * XCurses Library
35 *
36 * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
37 *
38 */
39
40 #if M_RCSID
41 #ifndef lint
42 static char rcsID[] =
43 "$Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/"
44 "libxcurses/src/libc/xcurses/rcs/innwstr.c 1.2 1998/04/30 20:30:23 "
45 "cbates Exp $";
46 #endif
47 #endif
48
49 #include <private.h>
50
51 #undef innwstr
52
53 int
innwstr(wchar_t * wcs,int n)54 innwstr(wchar_t *wcs, int n)
55 {
56 int code;
57
58 code = winnwstr(stdscr, wcs, n);
59
60 return (code);
61 }
62
63 #undef mvinnwstr
64
65 int
mvinnwstr(int y,int x,wchar_t * wcs,int n)66 mvinnwstr(int y, int x, wchar_t *wcs, int n)
67 {
68 int code;
69
70 if ((code = wmove(stdscr, y, x)) == OK)
71 code = winnwstr(stdscr, wcs, n);
72
73 return (code);
74 }
75
76 #undef mvwinnwstr
77
78 int
mvwinnwstr(WINDOW * w,int y,int x,wchar_t * wcs,int n)79 mvwinnwstr(WINDOW *w, int y, int x, wchar_t *wcs, int n)
80 {
81 int code;
82
83 if ((code = wmove(w, y, x)) == OK)
84 code = winnwstr(w, wcs, n);
85
86 return (code);
87 }
88
89 #undef inwstr
90
91 int
inwstr(wchar_t * wcs)92 inwstr(wchar_t *wcs)
93 {
94 int code;
95
96 code = winnwstr(stdscr, wcs, -1);
97
98 return ((code == ERR) ? ERR : OK);
99 }
100
101 #undef mvinwstr
102
103 int
mvinwstr(int y,int x,wchar_t * wcs)104 mvinwstr(int y, int x, wchar_t *wcs)
105 {
106 int code;
107
108 if ((code = wmove(stdscr, y, x)) == OK)
109 code = winnwstr(stdscr, wcs, -1);
110
111 return ((code == ERR) ? ERR : OK);
112 }
113
114 #undef mvwinwstr
115
116 int
mvwinwstr(WINDOW * w,int y,int x,wchar_t * wcs)117 mvwinwstr(WINDOW *w, int y, int x, wchar_t *wcs)
118 {
119 int code;
120
121 if ((code = wmove(w, y, x)) == OK)
122 code = winnwstr(w, wcs, -1);
123
124 return ((code == ERR) ? ERR : OK);
125 }
126
127 #undef winwstr
128
129 int
winwstr(WINDOW * w,wchar_t * wcs)130 winwstr(WINDOW *w, wchar_t *wcs)
131 {
132 int code;
133
134 code = winnwstr(w, wcs, -1);
135
136 return ((code == ERR) ? ERR : OK);
137 }
138