1*11be35a1SLionel Sambuc /* $NetBSD: curses_commands.c,v 1.7 2012/09/19 11:51:08 blymn Exp $ */
2*11be35a1SLionel Sambuc
3*11be35a1SLionel Sambuc /*-
4*11be35a1SLionel Sambuc * Copyright 2009 Brett Lymn <blymn@NetBSD.org>
5*11be35a1SLionel Sambuc *
6*11be35a1SLionel Sambuc * All rights reserved.
7*11be35a1SLionel Sambuc *
8*11be35a1SLionel Sambuc * This code has been donated to The NetBSD Foundation by the Author.
9*11be35a1SLionel Sambuc *
10*11be35a1SLionel Sambuc * Redistribution and use in source and binary forms, with or without
11*11be35a1SLionel Sambuc * modification, are permitted provided that the following conditions
12*11be35a1SLionel Sambuc * are met:
13*11be35a1SLionel Sambuc * 1. Redistributions of source code must retain the above copyright
14*11be35a1SLionel Sambuc * notice, this list of conditions and the following disclaimer.
15*11be35a1SLionel Sambuc * 2. The name of the author may not be used to endorse or promote products
16*11be35a1SLionel Sambuc * derived from this software withough specific prior written permission
17*11be35a1SLionel Sambuc *
18*11be35a1SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19*11be35a1SLionel Sambuc * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20*11be35a1SLionel Sambuc * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21*11be35a1SLionel Sambuc * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22*11be35a1SLionel Sambuc * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23*11be35a1SLionel Sambuc * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24*11be35a1SLionel Sambuc * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25*11be35a1SLionel Sambuc * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26*11be35a1SLionel Sambuc * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27*11be35a1SLionel Sambuc * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*11be35a1SLionel Sambuc *
29*11be35a1SLionel Sambuc *
30*11be35a1SLionel Sambuc */
31*11be35a1SLionel Sambuc
32*11be35a1SLionel Sambuc #include <curses.h>
33*11be35a1SLionel Sambuc #include <stdio.h>
34*11be35a1SLionel Sambuc #include <stdlib.h>
35*11be35a1SLionel Sambuc #include <string.h>
36*11be35a1SLionel Sambuc #include <termios.h>
37*11be35a1SLionel Sambuc #include <stdarg.h>
38*11be35a1SLionel Sambuc
39*11be35a1SLionel Sambuc #include "slave.h"
40*11be35a1SLionel Sambuc #include "curses_commands.h"
41*11be35a1SLionel Sambuc
42*11be35a1SLionel Sambuc void
cmd_DRAIN(int nargs,char ** args)43*11be35a1SLionel Sambuc cmd_DRAIN(int nargs, char **args)
44*11be35a1SLionel Sambuc {
45*11be35a1SLionel Sambuc while (getch() != ERR);
46*11be35a1SLionel Sambuc report_count(1);
47*11be35a1SLionel Sambuc report_return(OK);
48*11be35a1SLionel Sambuc }
49*11be35a1SLionel Sambuc
50*11be35a1SLionel Sambuc void
cmd_addbytes(int nargs,char ** args)51*11be35a1SLionel Sambuc cmd_addbytes(int nargs, char **args)
52*11be35a1SLionel Sambuc {
53*11be35a1SLionel Sambuc int count;
54*11be35a1SLionel Sambuc
55*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
56*11be35a1SLionel Sambuc return;
57*11be35a1SLionel Sambuc
58*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
59*11be35a1SLionel Sambuc report_count(1);
60*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
61*11be35a1SLionel Sambuc return;
62*11be35a1SLionel Sambuc }
63*11be35a1SLionel Sambuc
64*11be35a1SLionel Sambuc report_count(1);
65*11be35a1SLionel Sambuc report_return(addbytes(args[0], count));
66*11be35a1SLionel Sambuc }
67*11be35a1SLionel Sambuc
68*11be35a1SLionel Sambuc
69*11be35a1SLionel Sambuc void
cmd_addch(int nargs,char ** args)70*11be35a1SLionel Sambuc cmd_addch(int nargs, char **args)
71*11be35a1SLionel Sambuc {
72*11be35a1SLionel Sambuc chtype *ch;
73*11be35a1SLionel Sambuc
74*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
75*11be35a1SLionel Sambuc return;
76*11be35a1SLionel Sambuc
77*11be35a1SLionel Sambuc ch = (chtype *) args[0];
78*11be35a1SLionel Sambuc report_count(1);
79*11be35a1SLionel Sambuc report_return(addch(ch[0]));
80*11be35a1SLionel Sambuc }
81*11be35a1SLionel Sambuc
82*11be35a1SLionel Sambuc
83*11be35a1SLionel Sambuc void
cmd_addchnstr(int nargs,char ** args)84*11be35a1SLionel Sambuc cmd_addchnstr(int nargs, char **args)
85*11be35a1SLionel Sambuc {
86*11be35a1SLionel Sambuc int count;
87*11be35a1SLionel Sambuc
88*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
89*11be35a1SLionel Sambuc return;
90*11be35a1SLionel Sambuc
91*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
92*11be35a1SLionel Sambuc report_count(1);
93*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
94*11be35a1SLionel Sambuc return;
95*11be35a1SLionel Sambuc }
96*11be35a1SLionel Sambuc
97*11be35a1SLionel Sambuc report_count(1);
98*11be35a1SLionel Sambuc report_return(addchnstr((chtype *) args[0], count));
99*11be35a1SLionel Sambuc }
100*11be35a1SLionel Sambuc
101*11be35a1SLionel Sambuc
102*11be35a1SLionel Sambuc void
cmd_addchstr(int nargs,char ** args)103*11be35a1SLionel Sambuc cmd_addchstr(int nargs, char **args)
104*11be35a1SLionel Sambuc {
105*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
106*11be35a1SLionel Sambuc return;
107*11be35a1SLionel Sambuc
108*11be35a1SLionel Sambuc report_count(1);
109*11be35a1SLionel Sambuc report_return(addchstr((chtype *) args[0]));
110*11be35a1SLionel Sambuc }
111*11be35a1SLionel Sambuc
112*11be35a1SLionel Sambuc
113*11be35a1SLionel Sambuc void
cmd_addnstr(int nargs,char ** args)114*11be35a1SLionel Sambuc cmd_addnstr(int nargs, char **args)
115*11be35a1SLionel Sambuc {
116*11be35a1SLionel Sambuc int count;
117*11be35a1SLionel Sambuc
118*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
119*11be35a1SLionel Sambuc return;
120*11be35a1SLionel Sambuc
121*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
122*11be35a1SLionel Sambuc report_count(1);
123*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
124*11be35a1SLionel Sambuc return;
125*11be35a1SLionel Sambuc }
126*11be35a1SLionel Sambuc
127*11be35a1SLionel Sambuc report_count(1);
128*11be35a1SLionel Sambuc report_return(addnstr(args[0], count));
129*11be35a1SLionel Sambuc }
130*11be35a1SLionel Sambuc
131*11be35a1SLionel Sambuc
132*11be35a1SLionel Sambuc void
cmd_addstr(int nargs,char ** args)133*11be35a1SLionel Sambuc cmd_addstr(int nargs, char **args)
134*11be35a1SLionel Sambuc {
135*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
136*11be35a1SLionel Sambuc return;
137*11be35a1SLionel Sambuc
138*11be35a1SLionel Sambuc report_count(1);
139*11be35a1SLionel Sambuc report_return(addstr(args[0]));
140*11be35a1SLionel Sambuc }
141*11be35a1SLionel Sambuc
142*11be35a1SLionel Sambuc
143*11be35a1SLionel Sambuc void
cmd_attr_get(int nargs,char ** args)144*11be35a1SLionel Sambuc cmd_attr_get(int nargs, char **args)
145*11be35a1SLionel Sambuc {
146*11be35a1SLionel Sambuc attr_t attrs;
147*11be35a1SLionel Sambuc short colours;
148*11be35a1SLionel Sambuc int retval;
149*11be35a1SLionel Sambuc
150*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
151*11be35a1SLionel Sambuc return;
152*11be35a1SLionel Sambuc
153*11be35a1SLionel Sambuc retval = attr_get(&attrs, &colours, NULL);
154*11be35a1SLionel Sambuc
155*11be35a1SLionel Sambuc /* XXXX - call3 */
156*11be35a1SLionel Sambuc report_count(3);
157*11be35a1SLionel Sambuc report_return(retval);
158*11be35a1SLionel Sambuc report_int(attrs);
159*11be35a1SLionel Sambuc report_int(colours);
160*11be35a1SLionel Sambuc }
161*11be35a1SLionel Sambuc
162*11be35a1SLionel Sambuc
163*11be35a1SLionel Sambuc void
cmd_attr_off(int nargs,char ** args)164*11be35a1SLionel Sambuc cmd_attr_off(int nargs, char **args)
165*11be35a1SLionel Sambuc {
166*11be35a1SLionel Sambuc int attrib;
167*11be35a1SLionel Sambuc
168*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
169*11be35a1SLionel Sambuc return;
170*11be35a1SLionel Sambuc
171*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &attrib) == 0) {
172*11be35a1SLionel Sambuc report_count(1);
173*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
174*11be35a1SLionel Sambuc return;
175*11be35a1SLionel Sambuc }
176*11be35a1SLionel Sambuc
177*11be35a1SLionel Sambuc report_count(1);
178*11be35a1SLionel Sambuc report_return(attr_off(attrib, NULL));
179*11be35a1SLionel Sambuc }
180*11be35a1SLionel Sambuc
181*11be35a1SLionel Sambuc
182*11be35a1SLionel Sambuc void
cmd_attr_on(int nargs,char ** args)183*11be35a1SLionel Sambuc cmd_attr_on(int nargs, char **args)
184*11be35a1SLionel Sambuc {
185*11be35a1SLionel Sambuc int attrib;
186*11be35a1SLionel Sambuc
187*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
188*11be35a1SLionel Sambuc return;
189*11be35a1SLionel Sambuc
190*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &attrib) == 0) {
191*11be35a1SLionel Sambuc report_count(1);
192*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
193*11be35a1SLionel Sambuc return;
194*11be35a1SLionel Sambuc }
195*11be35a1SLionel Sambuc
196*11be35a1SLionel Sambuc report_count(1);
197*11be35a1SLionel Sambuc report_return(attr_on(attrib, NULL));
198*11be35a1SLionel Sambuc }
199*11be35a1SLionel Sambuc
200*11be35a1SLionel Sambuc
201*11be35a1SLionel Sambuc void
cmd_attr_set(int nargs,char ** args)202*11be35a1SLionel Sambuc cmd_attr_set(int nargs, char **args)
203*11be35a1SLionel Sambuc {
204*11be35a1SLionel Sambuc int attrib;
205*11be35a1SLionel Sambuc short pair;
206*11be35a1SLionel Sambuc
207*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
208*11be35a1SLionel Sambuc return;
209*11be35a1SLionel Sambuc
210*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &attrib) == 0) {
211*11be35a1SLionel Sambuc report_count(1);
212*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
213*11be35a1SLionel Sambuc return;
214*11be35a1SLionel Sambuc }
215*11be35a1SLionel Sambuc
216*11be35a1SLionel Sambuc if (sscanf(args[1], "%hd", &pair) == 0) {
217*11be35a1SLionel Sambuc report_count(1);
218*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
219*11be35a1SLionel Sambuc return;
220*11be35a1SLionel Sambuc }
221*11be35a1SLionel Sambuc
222*11be35a1SLionel Sambuc report_count(1);
223*11be35a1SLionel Sambuc report_return(attr_set(attrib, pair, NULL));
224*11be35a1SLionel Sambuc }
225*11be35a1SLionel Sambuc
226*11be35a1SLionel Sambuc
227*11be35a1SLionel Sambuc void
cmd_attroff(int nargs,char ** args)228*11be35a1SLionel Sambuc cmd_attroff(int nargs, char **args)
229*11be35a1SLionel Sambuc {
230*11be35a1SLionel Sambuc int attrib;
231*11be35a1SLionel Sambuc
232*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
233*11be35a1SLionel Sambuc return;
234*11be35a1SLionel Sambuc
235*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &attrib) == 0) {
236*11be35a1SLionel Sambuc report_count(1);
237*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
238*11be35a1SLionel Sambuc return;
239*11be35a1SLionel Sambuc }
240*11be35a1SLionel Sambuc
241*11be35a1SLionel Sambuc report_count(1);
242*11be35a1SLionel Sambuc report_return(attroff(attrib));
243*11be35a1SLionel Sambuc }
244*11be35a1SLionel Sambuc
245*11be35a1SLionel Sambuc
246*11be35a1SLionel Sambuc void
cmd_attron(int nargs,char ** args)247*11be35a1SLionel Sambuc cmd_attron(int nargs, char **args)
248*11be35a1SLionel Sambuc {
249*11be35a1SLionel Sambuc int attrib;
250*11be35a1SLionel Sambuc
251*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
252*11be35a1SLionel Sambuc return;
253*11be35a1SLionel Sambuc
254*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &attrib) == 0) {
255*11be35a1SLionel Sambuc report_count(1);
256*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
257*11be35a1SLionel Sambuc return;
258*11be35a1SLionel Sambuc }
259*11be35a1SLionel Sambuc
260*11be35a1SLionel Sambuc report_count(1);
261*11be35a1SLionel Sambuc report_return(attron(attrib));
262*11be35a1SLionel Sambuc }
263*11be35a1SLionel Sambuc
264*11be35a1SLionel Sambuc
265*11be35a1SLionel Sambuc void
cmd_attrset(int nargs,char ** args)266*11be35a1SLionel Sambuc cmd_attrset(int nargs, char **args)
267*11be35a1SLionel Sambuc {
268*11be35a1SLionel Sambuc int attrib;
269*11be35a1SLionel Sambuc
270*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
271*11be35a1SLionel Sambuc return;
272*11be35a1SLionel Sambuc
273*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &attrib) == 0) {
274*11be35a1SLionel Sambuc report_count(1);
275*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
276*11be35a1SLionel Sambuc return;
277*11be35a1SLionel Sambuc }
278*11be35a1SLionel Sambuc
279*11be35a1SLionel Sambuc report_count(1);
280*11be35a1SLionel Sambuc report_return(attrset(attrib));
281*11be35a1SLionel Sambuc }
282*11be35a1SLionel Sambuc
283*11be35a1SLionel Sambuc
284*11be35a1SLionel Sambuc void
cmd_bkgd(int nargs,char ** args)285*11be35a1SLionel Sambuc cmd_bkgd(int nargs, char **args)
286*11be35a1SLionel Sambuc {
287*11be35a1SLionel Sambuc chtype *ch;
288*11be35a1SLionel Sambuc
289*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
290*11be35a1SLionel Sambuc return;
291*11be35a1SLionel Sambuc
292*11be35a1SLionel Sambuc ch = (chtype *) args[0];
293*11be35a1SLionel Sambuc report_count(1);
294*11be35a1SLionel Sambuc report_return(bkgd(ch[0]));
295*11be35a1SLionel Sambuc }
296*11be35a1SLionel Sambuc
297*11be35a1SLionel Sambuc
298*11be35a1SLionel Sambuc void
cmd_bkgdset(int nargs,char ** args)299*11be35a1SLionel Sambuc cmd_bkgdset(int nargs, char **args)
300*11be35a1SLionel Sambuc {
301*11be35a1SLionel Sambuc chtype *ch;
302*11be35a1SLionel Sambuc
303*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
304*11be35a1SLionel Sambuc return;
305*11be35a1SLionel Sambuc
306*11be35a1SLionel Sambuc ch = (chtype *) args[0];
307*11be35a1SLionel Sambuc bkgdset(ch[0]); /* returns void */
308*11be35a1SLionel Sambuc report_count(1);
309*11be35a1SLionel Sambuc report_return(OK);
310*11be35a1SLionel Sambuc }
311*11be35a1SLionel Sambuc
312*11be35a1SLionel Sambuc
313*11be35a1SLionel Sambuc void
cmd_border(int nargs,char ** args)314*11be35a1SLionel Sambuc cmd_border(int nargs, char **args)
315*11be35a1SLionel Sambuc {
316*11be35a1SLionel Sambuc int ls, rs, ts, bs, tl, tr, bl, br;
317*11be35a1SLionel Sambuc
318*11be35a1SLionel Sambuc if (check_arg_count(nargs, 8) == 1)
319*11be35a1SLionel Sambuc return;
320*11be35a1SLionel Sambuc
321*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &ls) == 0) {
322*11be35a1SLionel Sambuc report_count(1);
323*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
324*11be35a1SLionel Sambuc return;
325*11be35a1SLionel Sambuc }
326*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &rs) == 0) {
327*11be35a1SLionel Sambuc report_count(1);
328*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
329*11be35a1SLionel Sambuc return;
330*11be35a1SLionel Sambuc }
331*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &ts) == 0) {
332*11be35a1SLionel Sambuc report_count(1);
333*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
334*11be35a1SLionel Sambuc return;
335*11be35a1SLionel Sambuc }
336*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &bs) == 0) {
337*11be35a1SLionel Sambuc report_count(1);
338*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
339*11be35a1SLionel Sambuc return;
340*11be35a1SLionel Sambuc }
341*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &tl) == 0) {
342*11be35a1SLionel Sambuc report_count(1);
343*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
344*11be35a1SLionel Sambuc return;
345*11be35a1SLionel Sambuc }
346*11be35a1SLionel Sambuc if (sscanf(args[5], "%d", &tr) == 0) {
347*11be35a1SLionel Sambuc report_count(1);
348*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
349*11be35a1SLionel Sambuc return;
350*11be35a1SLionel Sambuc }
351*11be35a1SLionel Sambuc if (sscanf(args[6], "%d", &bl) == 0) {
352*11be35a1SLionel Sambuc report_count(1);
353*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
354*11be35a1SLionel Sambuc return;
355*11be35a1SLionel Sambuc }
356*11be35a1SLionel Sambuc if (sscanf(args[7], "%d", &br) == 0) {
357*11be35a1SLionel Sambuc report_count(1);
358*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
359*11be35a1SLionel Sambuc return;
360*11be35a1SLionel Sambuc }
361*11be35a1SLionel Sambuc
362*11be35a1SLionel Sambuc report_count(1);
363*11be35a1SLionel Sambuc report_return(border(ls, rs, ts, bs, tl, tr, bl, br));
364*11be35a1SLionel Sambuc }
365*11be35a1SLionel Sambuc
366*11be35a1SLionel Sambuc
367*11be35a1SLionel Sambuc void
cmd_clear(int nargs,char ** args)368*11be35a1SLionel Sambuc cmd_clear(int nargs, char **args)
369*11be35a1SLionel Sambuc {
370*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
371*11be35a1SLionel Sambuc return;
372*11be35a1SLionel Sambuc
373*11be35a1SLionel Sambuc report_count(1);
374*11be35a1SLionel Sambuc report_return(clear());
375*11be35a1SLionel Sambuc }
376*11be35a1SLionel Sambuc
377*11be35a1SLionel Sambuc
378*11be35a1SLionel Sambuc void
cmd_clrtobot(int nargs,char ** args)379*11be35a1SLionel Sambuc cmd_clrtobot(int nargs, char **args)
380*11be35a1SLionel Sambuc {
381*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
382*11be35a1SLionel Sambuc return;
383*11be35a1SLionel Sambuc
384*11be35a1SLionel Sambuc report_count(1);
385*11be35a1SLionel Sambuc report_return(clrtobot());
386*11be35a1SLionel Sambuc }
387*11be35a1SLionel Sambuc
388*11be35a1SLionel Sambuc
389*11be35a1SLionel Sambuc void
cmd_clrtoeol(int nargs,char ** args)390*11be35a1SLionel Sambuc cmd_clrtoeol(int nargs, char **args)
391*11be35a1SLionel Sambuc {
392*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
393*11be35a1SLionel Sambuc return;
394*11be35a1SLionel Sambuc
395*11be35a1SLionel Sambuc report_count(1);
396*11be35a1SLionel Sambuc report_return(clrtoeol());
397*11be35a1SLionel Sambuc }
398*11be35a1SLionel Sambuc
399*11be35a1SLionel Sambuc
400*11be35a1SLionel Sambuc void
cmd_color_set(int nargs,char ** args)401*11be35a1SLionel Sambuc cmd_color_set(int nargs, char **args)
402*11be35a1SLionel Sambuc {
403*11be35a1SLionel Sambuc short colour_pair;
404*11be35a1SLionel Sambuc
405*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
406*11be35a1SLionel Sambuc return;
407*11be35a1SLionel Sambuc
408*11be35a1SLionel Sambuc if (sscanf(args[0], "%hd", &colour_pair) == 0) {
409*11be35a1SLionel Sambuc report_count(1);
410*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
411*11be35a1SLionel Sambuc return;
412*11be35a1SLionel Sambuc }
413*11be35a1SLionel Sambuc
414*11be35a1SLionel Sambuc report_count(1);
415*11be35a1SLionel Sambuc report_return(color_set(colour_pair, NULL));
416*11be35a1SLionel Sambuc }
417*11be35a1SLionel Sambuc
418*11be35a1SLionel Sambuc
419*11be35a1SLionel Sambuc void
cmd_delch(int nargs,char ** args)420*11be35a1SLionel Sambuc cmd_delch(int nargs, char **args)
421*11be35a1SLionel Sambuc {
422*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
423*11be35a1SLionel Sambuc return;
424*11be35a1SLionel Sambuc
425*11be35a1SLionel Sambuc report_count(1);
426*11be35a1SLionel Sambuc report_return(delch());
427*11be35a1SLionel Sambuc }
428*11be35a1SLionel Sambuc
429*11be35a1SLionel Sambuc
430*11be35a1SLionel Sambuc void
cmd_deleteln(int nargs,char ** args)431*11be35a1SLionel Sambuc cmd_deleteln(int nargs, char **args)
432*11be35a1SLionel Sambuc {
433*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
434*11be35a1SLionel Sambuc return;
435*11be35a1SLionel Sambuc
436*11be35a1SLionel Sambuc report_count(1);
437*11be35a1SLionel Sambuc report_return(deleteln());
438*11be35a1SLionel Sambuc }
439*11be35a1SLionel Sambuc
440*11be35a1SLionel Sambuc
441*11be35a1SLionel Sambuc void
cmd_echochar(int nargs,char ** args)442*11be35a1SLionel Sambuc cmd_echochar(int nargs, char **args)
443*11be35a1SLionel Sambuc {
444*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
445*11be35a1SLionel Sambuc return;
446*11be35a1SLionel Sambuc
447*11be35a1SLionel Sambuc /* XXX causes refresh */
448*11be35a1SLionel Sambuc report_count(1);
449*11be35a1SLionel Sambuc report_return(echochar(args[0][0]));
450*11be35a1SLionel Sambuc }
451*11be35a1SLionel Sambuc
452*11be35a1SLionel Sambuc
453*11be35a1SLionel Sambuc void
cmd_erase(int nargs,char ** args)454*11be35a1SLionel Sambuc cmd_erase(int nargs, char **args)
455*11be35a1SLionel Sambuc {
456*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
457*11be35a1SLionel Sambuc return;
458*11be35a1SLionel Sambuc
459*11be35a1SLionel Sambuc report_count(1);
460*11be35a1SLionel Sambuc report_return(erase());
461*11be35a1SLionel Sambuc }
462*11be35a1SLionel Sambuc
463*11be35a1SLionel Sambuc
464*11be35a1SLionel Sambuc void
cmd_getch(int nargs,char ** args)465*11be35a1SLionel Sambuc cmd_getch(int nargs, char **args)
466*11be35a1SLionel Sambuc {
467*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
468*11be35a1SLionel Sambuc return;
469*11be35a1SLionel Sambuc
470*11be35a1SLionel Sambuc /* XXX causes refresh */
471*11be35a1SLionel Sambuc report_count(1);
472*11be35a1SLionel Sambuc report_int(getch());
473*11be35a1SLionel Sambuc }
474*11be35a1SLionel Sambuc
475*11be35a1SLionel Sambuc
476*11be35a1SLionel Sambuc void
cmd_getnstr(int nargs,char ** args)477*11be35a1SLionel Sambuc cmd_getnstr(int nargs, char **args)
478*11be35a1SLionel Sambuc {
479*11be35a1SLionel Sambuc int limit;
480*11be35a1SLionel Sambuc char *string;
481*11be35a1SLionel Sambuc
482*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
483*11be35a1SLionel Sambuc return;
484*11be35a1SLionel Sambuc
485*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &limit) == 0) {
486*11be35a1SLionel Sambuc report_count(1);
487*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
488*11be35a1SLionel Sambuc return;
489*11be35a1SLionel Sambuc }
490*11be35a1SLionel Sambuc
491*11be35a1SLionel Sambuc if ((string = malloc(limit + 1)) == NULL) {
492*11be35a1SLionel Sambuc report_count(1);
493*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
494*11be35a1SLionel Sambuc return;
495*11be35a1SLionel Sambuc }
496*11be35a1SLionel Sambuc
497*11be35a1SLionel Sambuc /* XXX call2 */
498*11be35a1SLionel Sambuc report_count(2);
499*11be35a1SLionel Sambuc report_return(getnstr(string, limit));
500*11be35a1SLionel Sambuc report_status(string);
501*11be35a1SLionel Sambuc free(string);
502*11be35a1SLionel Sambuc }
503*11be35a1SLionel Sambuc
504*11be35a1SLionel Sambuc
505*11be35a1SLionel Sambuc void
cmd_getstr(int nargs,char ** args)506*11be35a1SLionel Sambuc cmd_getstr(int nargs, char **args)
507*11be35a1SLionel Sambuc {
508*11be35a1SLionel Sambuc char string[256];
509*11be35a1SLionel Sambuc
510*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
511*11be35a1SLionel Sambuc return;
512*11be35a1SLionel Sambuc
513*11be35a1SLionel Sambuc /* XXX call2 */
514*11be35a1SLionel Sambuc report_count(2);
515*11be35a1SLionel Sambuc report_return(getstr(string));
516*11be35a1SLionel Sambuc report_status(string);
517*11be35a1SLionel Sambuc }
518*11be35a1SLionel Sambuc
519*11be35a1SLionel Sambuc
520*11be35a1SLionel Sambuc void
cmd_inch(int nargs,char ** args)521*11be35a1SLionel Sambuc cmd_inch(int nargs, char **args)
522*11be35a1SLionel Sambuc {
523*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
524*11be35a1SLionel Sambuc return;
525*11be35a1SLionel Sambuc
526*11be35a1SLionel Sambuc
527*11be35a1SLionel Sambuc report_count(1);
528*11be35a1SLionel Sambuc report_byte(inch());
529*11be35a1SLionel Sambuc }
530*11be35a1SLionel Sambuc
531*11be35a1SLionel Sambuc
532*11be35a1SLionel Sambuc void
cmd_inchnstr(int nargs,char ** args)533*11be35a1SLionel Sambuc cmd_inchnstr(int nargs, char **args)
534*11be35a1SLionel Sambuc {
535*11be35a1SLionel Sambuc int limit;
536*11be35a1SLionel Sambuc chtype *string;
537*11be35a1SLionel Sambuc
538*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
539*11be35a1SLionel Sambuc return;
540*11be35a1SLionel Sambuc
541*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &limit) == 0) {
542*11be35a1SLionel Sambuc report_count(1);
543*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
544*11be35a1SLionel Sambuc return;
545*11be35a1SLionel Sambuc }
546*11be35a1SLionel Sambuc
547*11be35a1SLionel Sambuc if ((string = malloc((limit + 1) * sizeof(chtype))) == NULL) {
548*11be35a1SLionel Sambuc report_count(1);
549*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
550*11be35a1SLionel Sambuc return;
551*11be35a1SLionel Sambuc }
552*11be35a1SLionel Sambuc
553*11be35a1SLionel Sambuc /* XXX call2 */
554*11be35a1SLionel Sambuc report_count(2);
555*11be35a1SLionel Sambuc report_return(inchnstr(string, limit));
556*11be35a1SLionel Sambuc report_nstr(string);
557*11be35a1SLionel Sambuc free(string);
558*11be35a1SLionel Sambuc }
559*11be35a1SLionel Sambuc
560*11be35a1SLionel Sambuc
561*11be35a1SLionel Sambuc void
cmd_inchstr(int nargs,char ** args)562*11be35a1SLionel Sambuc cmd_inchstr(int nargs, char **args)
563*11be35a1SLionel Sambuc {
564*11be35a1SLionel Sambuc chtype string[256];
565*11be35a1SLionel Sambuc
566*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
567*11be35a1SLionel Sambuc return;
568*11be35a1SLionel Sambuc
569*11be35a1SLionel Sambuc /* XXX call2 */
570*11be35a1SLionel Sambuc report_count(2);
571*11be35a1SLionel Sambuc report_return(inchstr(string));
572*11be35a1SLionel Sambuc report_nstr(string);
573*11be35a1SLionel Sambuc }
574*11be35a1SLionel Sambuc
575*11be35a1SLionel Sambuc
576*11be35a1SLionel Sambuc void
cmd_innstr(int nargs,char ** args)577*11be35a1SLionel Sambuc cmd_innstr(int nargs, char **args)
578*11be35a1SLionel Sambuc {
579*11be35a1SLionel Sambuc int limit;
580*11be35a1SLionel Sambuc char *string;
581*11be35a1SLionel Sambuc
582*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
583*11be35a1SLionel Sambuc return;
584*11be35a1SLionel Sambuc
585*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &limit) == 0) {
586*11be35a1SLionel Sambuc report_count(1);
587*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
588*11be35a1SLionel Sambuc return;
589*11be35a1SLionel Sambuc }
590*11be35a1SLionel Sambuc
591*11be35a1SLionel Sambuc if ((string = malloc(limit + 1)) == NULL) {
592*11be35a1SLionel Sambuc report_count(1);
593*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
594*11be35a1SLionel Sambuc return;
595*11be35a1SLionel Sambuc }
596*11be35a1SLionel Sambuc
597*11be35a1SLionel Sambuc /* XXX call2 */
598*11be35a1SLionel Sambuc report_count(2);
599*11be35a1SLionel Sambuc report_int(innstr(string, limit));
600*11be35a1SLionel Sambuc report_status(string);
601*11be35a1SLionel Sambuc free(string);
602*11be35a1SLionel Sambuc }
603*11be35a1SLionel Sambuc
604*11be35a1SLionel Sambuc
605*11be35a1SLionel Sambuc void
cmd_insch(int nargs,char ** args)606*11be35a1SLionel Sambuc cmd_insch(int nargs, char **args)
607*11be35a1SLionel Sambuc {
608*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
609*11be35a1SLionel Sambuc return;
610*11be35a1SLionel Sambuc
611*11be35a1SLionel Sambuc report_count(1);
612*11be35a1SLionel Sambuc report_return(insch(args[0][0]));
613*11be35a1SLionel Sambuc }
614*11be35a1SLionel Sambuc
615*11be35a1SLionel Sambuc
616*11be35a1SLionel Sambuc void
cmd_insdelln(int nargs,char ** args)617*11be35a1SLionel Sambuc cmd_insdelln(int nargs, char **args)
618*11be35a1SLionel Sambuc {
619*11be35a1SLionel Sambuc int nlines;
620*11be35a1SLionel Sambuc
621*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
622*11be35a1SLionel Sambuc return;
623*11be35a1SLionel Sambuc
624*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &nlines) == 0) {
625*11be35a1SLionel Sambuc report_count(1);
626*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
627*11be35a1SLionel Sambuc return;
628*11be35a1SLionel Sambuc }
629*11be35a1SLionel Sambuc
630*11be35a1SLionel Sambuc report_count(1);
631*11be35a1SLionel Sambuc report_return(insdelln(nlines));
632*11be35a1SLionel Sambuc }
633*11be35a1SLionel Sambuc
634*11be35a1SLionel Sambuc
635*11be35a1SLionel Sambuc void
cmd_insertln(int nargs,char ** args)636*11be35a1SLionel Sambuc cmd_insertln(int nargs, char **args)
637*11be35a1SLionel Sambuc {
638*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
639*11be35a1SLionel Sambuc return;
640*11be35a1SLionel Sambuc
641*11be35a1SLionel Sambuc report_count(1);
642*11be35a1SLionel Sambuc report_return(insertln());
643*11be35a1SLionel Sambuc }
644*11be35a1SLionel Sambuc
645*11be35a1SLionel Sambuc
646*11be35a1SLionel Sambuc void
cmd_instr(int nargs,char ** args)647*11be35a1SLionel Sambuc cmd_instr(int nargs, char **args)
648*11be35a1SLionel Sambuc {
649*11be35a1SLionel Sambuc char string[256];
650*11be35a1SLionel Sambuc
651*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
652*11be35a1SLionel Sambuc return;
653*11be35a1SLionel Sambuc
654*11be35a1SLionel Sambuc /* XXX call2 */
655*11be35a1SLionel Sambuc report_count(2);
656*11be35a1SLionel Sambuc report_return(instr(string));
657*11be35a1SLionel Sambuc report_status(string);
658*11be35a1SLionel Sambuc }
659*11be35a1SLionel Sambuc
660*11be35a1SLionel Sambuc
661*11be35a1SLionel Sambuc void
cmd_move(int nargs,char ** args)662*11be35a1SLionel Sambuc cmd_move(int nargs, char **args)
663*11be35a1SLionel Sambuc {
664*11be35a1SLionel Sambuc int y, x;
665*11be35a1SLionel Sambuc
666*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
667*11be35a1SLionel Sambuc return;
668*11be35a1SLionel Sambuc
669*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
670*11be35a1SLionel Sambuc report_count(1);
671*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
672*11be35a1SLionel Sambuc return;
673*11be35a1SLionel Sambuc }
674*11be35a1SLionel Sambuc
675*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
676*11be35a1SLionel Sambuc report_count(1);
677*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
678*11be35a1SLionel Sambuc return;
679*11be35a1SLionel Sambuc }
680*11be35a1SLionel Sambuc
681*11be35a1SLionel Sambuc report_count(1);
682*11be35a1SLionel Sambuc report_return(move(y, x));
683*11be35a1SLionel Sambuc }
684*11be35a1SLionel Sambuc
685*11be35a1SLionel Sambuc
686*11be35a1SLionel Sambuc void
cmd_refresh(int nargs,char ** args)687*11be35a1SLionel Sambuc cmd_refresh(int nargs, char **args)
688*11be35a1SLionel Sambuc {
689*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
690*11be35a1SLionel Sambuc return;
691*11be35a1SLionel Sambuc
692*11be35a1SLionel Sambuc report_count(1);
693*11be35a1SLionel Sambuc report_return(refresh());
694*11be35a1SLionel Sambuc }
695*11be35a1SLionel Sambuc
696*11be35a1SLionel Sambuc
697*11be35a1SLionel Sambuc void
cmd_scrl(int nargs,char ** args)698*11be35a1SLionel Sambuc cmd_scrl(int nargs, char **args)
699*11be35a1SLionel Sambuc {
700*11be35a1SLionel Sambuc int nlines;
701*11be35a1SLionel Sambuc
702*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
703*11be35a1SLionel Sambuc return;
704*11be35a1SLionel Sambuc
705*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &nlines) == 0) {
706*11be35a1SLionel Sambuc report_count(1);
707*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
708*11be35a1SLionel Sambuc return;
709*11be35a1SLionel Sambuc }
710*11be35a1SLionel Sambuc
711*11be35a1SLionel Sambuc report_count(1);
712*11be35a1SLionel Sambuc report_return(scrl(nlines));
713*11be35a1SLionel Sambuc }
714*11be35a1SLionel Sambuc
715*11be35a1SLionel Sambuc
716*11be35a1SLionel Sambuc void
cmd_setscrreg(int nargs,char ** args)717*11be35a1SLionel Sambuc cmd_setscrreg(int nargs, char **args)
718*11be35a1SLionel Sambuc {
719*11be35a1SLionel Sambuc int top, bottom;
720*11be35a1SLionel Sambuc
721*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
722*11be35a1SLionel Sambuc return;
723*11be35a1SLionel Sambuc
724*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &top) == 0) {
725*11be35a1SLionel Sambuc report_count(1);
726*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
727*11be35a1SLionel Sambuc return;
728*11be35a1SLionel Sambuc }
729*11be35a1SLionel Sambuc
730*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &bottom) == 0) {
731*11be35a1SLionel Sambuc report_count(1);
732*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
733*11be35a1SLionel Sambuc return;
734*11be35a1SLionel Sambuc }
735*11be35a1SLionel Sambuc
736*11be35a1SLionel Sambuc report_count(1);
737*11be35a1SLionel Sambuc report_return(setscrreg(top, bottom));
738*11be35a1SLionel Sambuc }
739*11be35a1SLionel Sambuc
740*11be35a1SLionel Sambuc
741*11be35a1SLionel Sambuc void
cmd_standend(int nargs,char ** args)742*11be35a1SLionel Sambuc cmd_standend(int nargs, char **args)
743*11be35a1SLionel Sambuc {
744*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
745*11be35a1SLionel Sambuc return;
746*11be35a1SLionel Sambuc
747*11be35a1SLionel Sambuc report_count(1);
748*11be35a1SLionel Sambuc report_return(standend());
749*11be35a1SLionel Sambuc }
750*11be35a1SLionel Sambuc
751*11be35a1SLionel Sambuc
752*11be35a1SLionel Sambuc void
cmd_standout(int nargs,char ** args)753*11be35a1SLionel Sambuc cmd_standout(int nargs, char **args)
754*11be35a1SLionel Sambuc {
755*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
756*11be35a1SLionel Sambuc return;
757*11be35a1SLionel Sambuc
758*11be35a1SLionel Sambuc report_count(1);
759*11be35a1SLionel Sambuc report_return(standout());
760*11be35a1SLionel Sambuc }
761*11be35a1SLionel Sambuc
762*11be35a1SLionel Sambuc
763*11be35a1SLionel Sambuc void
cmd_timeout(int nargs,char ** args)764*11be35a1SLionel Sambuc cmd_timeout(int nargs, char **args)
765*11be35a1SLionel Sambuc {
766*11be35a1SLionel Sambuc int tval;
767*11be35a1SLionel Sambuc
768*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
769*11be35a1SLionel Sambuc return;
770*11be35a1SLionel Sambuc
771*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &tval) == 0) {
772*11be35a1SLionel Sambuc report_count(1);
773*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
774*11be35a1SLionel Sambuc return;
775*11be35a1SLionel Sambuc }
776*11be35a1SLionel Sambuc
777*11be35a1SLionel Sambuc timeout(tval); /* void return */
778*11be35a1SLionel Sambuc report_count(1);
779*11be35a1SLionel Sambuc report_return(OK);
780*11be35a1SLionel Sambuc }
781*11be35a1SLionel Sambuc
782*11be35a1SLionel Sambuc
783*11be35a1SLionel Sambuc void
cmd_underscore(int nargs,char ** args)784*11be35a1SLionel Sambuc cmd_underscore(int nargs, char **args)
785*11be35a1SLionel Sambuc {
786*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
787*11be35a1SLionel Sambuc return;
788*11be35a1SLionel Sambuc
789*11be35a1SLionel Sambuc report_count(1);
790*11be35a1SLionel Sambuc report_return(underscore());
791*11be35a1SLionel Sambuc }
792*11be35a1SLionel Sambuc
793*11be35a1SLionel Sambuc
794*11be35a1SLionel Sambuc void
cmd_underend(int nargs,char ** args)795*11be35a1SLionel Sambuc cmd_underend(int nargs, char **args)
796*11be35a1SLionel Sambuc {
797*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
798*11be35a1SLionel Sambuc return;
799*11be35a1SLionel Sambuc
800*11be35a1SLionel Sambuc report_count(1);
801*11be35a1SLionel Sambuc report_return(underend());
802*11be35a1SLionel Sambuc }
803*11be35a1SLionel Sambuc
804*11be35a1SLionel Sambuc
805*11be35a1SLionel Sambuc void
cmd_waddbytes(int nargs,char ** args)806*11be35a1SLionel Sambuc cmd_waddbytes(int nargs, char **args)
807*11be35a1SLionel Sambuc {
808*11be35a1SLionel Sambuc WINDOW *win;
809*11be35a1SLionel Sambuc int count;
810*11be35a1SLionel Sambuc
811*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
812*11be35a1SLionel Sambuc return;
813*11be35a1SLionel Sambuc
814*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
815*11be35a1SLionel Sambuc report_count(1);
816*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
817*11be35a1SLionel Sambuc return;
818*11be35a1SLionel Sambuc }
819*11be35a1SLionel Sambuc
820*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
821*11be35a1SLionel Sambuc report_count(1);
822*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
823*11be35a1SLionel Sambuc return;
824*11be35a1SLionel Sambuc }
825*11be35a1SLionel Sambuc
826*11be35a1SLionel Sambuc report_count(1);
827*11be35a1SLionel Sambuc report_return(waddbytes(win, args[1], count));
828*11be35a1SLionel Sambuc }
829*11be35a1SLionel Sambuc
830*11be35a1SLionel Sambuc
831*11be35a1SLionel Sambuc void
cmd_waddstr(int nargs,char ** args)832*11be35a1SLionel Sambuc cmd_waddstr(int nargs, char **args)
833*11be35a1SLionel Sambuc {
834*11be35a1SLionel Sambuc WINDOW *win;
835*11be35a1SLionel Sambuc
836*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
837*11be35a1SLionel Sambuc return;
838*11be35a1SLionel Sambuc
839*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
840*11be35a1SLionel Sambuc report_count(1);
841*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
842*11be35a1SLionel Sambuc return;
843*11be35a1SLionel Sambuc }
844*11be35a1SLionel Sambuc
845*11be35a1SLionel Sambuc report_count(1);
846*11be35a1SLionel Sambuc report_return(waddstr(win, args[1]));
847*11be35a1SLionel Sambuc }
848*11be35a1SLionel Sambuc
849*11be35a1SLionel Sambuc
850*11be35a1SLionel Sambuc void
cmd_mvaddbytes(int nargs,char ** args)851*11be35a1SLionel Sambuc cmd_mvaddbytes(int nargs, char **args)
852*11be35a1SLionel Sambuc {
853*11be35a1SLionel Sambuc int y, x, count;
854*11be35a1SLionel Sambuc
855*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
856*11be35a1SLionel Sambuc return;
857*11be35a1SLionel Sambuc
858*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
859*11be35a1SLionel Sambuc report_count(1);
860*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
861*11be35a1SLionel Sambuc return;
862*11be35a1SLionel Sambuc }
863*11be35a1SLionel Sambuc
864*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
865*11be35a1SLionel Sambuc report_count(1);
866*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
867*11be35a1SLionel Sambuc return;
868*11be35a1SLionel Sambuc }
869*11be35a1SLionel Sambuc
870*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &count) == 0) {
871*11be35a1SLionel Sambuc report_count(1);
872*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
873*11be35a1SLionel Sambuc return;
874*11be35a1SLionel Sambuc }
875*11be35a1SLionel Sambuc
876*11be35a1SLionel Sambuc report_count(1);
877*11be35a1SLionel Sambuc report_return(mvaddbytes(y, x, args[2], count));
878*11be35a1SLionel Sambuc }
879*11be35a1SLionel Sambuc
880*11be35a1SLionel Sambuc
881*11be35a1SLionel Sambuc void
cmd_mvaddch(int nargs,char ** args)882*11be35a1SLionel Sambuc cmd_mvaddch(int nargs, char **args)
883*11be35a1SLionel Sambuc {
884*11be35a1SLionel Sambuc int y, x;
885*11be35a1SLionel Sambuc chtype *ch;
886*11be35a1SLionel Sambuc
887*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
888*11be35a1SLionel Sambuc return;
889*11be35a1SLionel Sambuc
890*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
891*11be35a1SLionel Sambuc report_count(1);
892*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
893*11be35a1SLionel Sambuc return;
894*11be35a1SLionel Sambuc }
895*11be35a1SLionel Sambuc
896*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
897*11be35a1SLionel Sambuc report_count(1);
898*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
899*11be35a1SLionel Sambuc return;
900*11be35a1SLionel Sambuc }
901*11be35a1SLionel Sambuc
902*11be35a1SLionel Sambuc ch = (chtype *) args[2];
903*11be35a1SLionel Sambuc report_count(1);
904*11be35a1SLionel Sambuc report_return(mvaddch(y, x, ch[0]));
905*11be35a1SLionel Sambuc }
906*11be35a1SLionel Sambuc
907*11be35a1SLionel Sambuc
908*11be35a1SLionel Sambuc void
cmd_mvaddchnstr(int nargs,char ** args)909*11be35a1SLionel Sambuc cmd_mvaddchnstr(int nargs, char **args)
910*11be35a1SLionel Sambuc {
911*11be35a1SLionel Sambuc int y, x, count;
912*11be35a1SLionel Sambuc
913*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
914*11be35a1SLionel Sambuc return;
915*11be35a1SLionel Sambuc
916*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
917*11be35a1SLionel Sambuc report_count(1);
918*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
919*11be35a1SLionel Sambuc return;
920*11be35a1SLionel Sambuc }
921*11be35a1SLionel Sambuc
922*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
923*11be35a1SLionel Sambuc report_count(1);
924*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
925*11be35a1SLionel Sambuc return;
926*11be35a1SLionel Sambuc }
927*11be35a1SLionel Sambuc
928*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &count) == 0) {
929*11be35a1SLionel Sambuc report_count(1);
930*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
931*11be35a1SLionel Sambuc return;
932*11be35a1SLionel Sambuc }
933*11be35a1SLionel Sambuc
934*11be35a1SLionel Sambuc report_count(1);
935*11be35a1SLionel Sambuc report_return(mvaddchnstr(y, x, (chtype *) args[2], count));
936*11be35a1SLionel Sambuc }
937*11be35a1SLionel Sambuc
938*11be35a1SLionel Sambuc
939*11be35a1SLionel Sambuc void
cmd_mvaddchstr(int nargs,char ** args)940*11be35a1SLionel Sambuc cmd_mvaddchstr(int nargs, char **args)
941*11be35a1SLionel Sambuc {
942*11be35a1SLionel Sambuc int y, x;
943*11be35a1SLionel Sambuc
944*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
945*11be35a1SLionel Sambuc return;
946*11be35a1SLionel Sambuc
947*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
948*11be35a1SLionel Sambuc report_count(1);
949*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
950*11be35a1SLionel Sambuc return;
951*11be35a1SLionel Sambuc }
952*11be35a1SLionel Sambuc
953*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
954*11be35a1SLionel Sambuc report_count(1);
955*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
956*11be35a1SLionel Sambuc return;
957*11be35a1SLionel Sambuc }
958*11be35a1SLionel Sambuc
959*11be35a1SLionel Sambuc report_count(1);
960*11be35a1SLionel Sambuc report_return(mvaddchstr(y, x, (chtype *) args[2]));
961*11be35a1SLionel Sambuc }
962*11be35a1SLionel Sambuc
963*11be35a1SLionel Sambuc
964*11be35a1SLionel Sambuc void
cmd_mvaddnstr(int nargs,char ** args)965*11be35a1SLionel Sambuc cmd_mvaddnstr(int nargs, char **args)
966*11be35a1SLionel Sambuc {
967*11be35a1SLionel Sambuc int y, x, count;
968*11be35a1SLionel Sambuc
969*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
970*11be35a1SLionel Sambuc return;
971*11be35a1SLionel Sambuc
972*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
973*11be35a1SLionel Sambuc report_count(1);
974*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
975*11be35a1SLionel Sambuc return;
976*11be35a1SLionel Sambuc }
977*11be35a1SLionel Sambuc
978*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
979*11be35a1SLionel Sambuc report_count(1);
980*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
981*11be35a1SLionel Sambuc return;
982*11be35a1SLionel Sambuc }
983*11be35a1SLionel Sambuc
984*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &count) == 0) {
985*11be35a1SLionel Sambuc report_count(1);
986*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
987*11be35a1SLionel Sambuc return;
988*11be35a1SLionel Sambuc }
989*11be35a1SLionel Sambuc
990*11be35a1SLionel Sambuc report_count(1);
991*11be35a1SLionel Sambuc report_return(mvaddnstr(y, x, args[2], count));
992*11be35a1SLionel Sambuc }
993*11be35a1SLionel Sambuc
994*11be35a1SLionel Sambuc
995*11be35a1SLionel Sambuc void
cmd_mvaddstr(int nargs,char ** args)996*11be35a1SLionel Sambuc cmd_mvaddstr(int nargs, char **args)
997*11be35a1SLionel Sambuc {
998*11be35a1SLionel Sambuc int y, x;
999*11be35a1SLionel Sambuc
1000*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1001*11be35a1SLionel Sambuc return;
1002*11be35a1SLionel Sambuc
1003*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1004*11be35a1SLionel Sambuc report_count(1);
1005*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1006*11be35a1SLionel Sambuc return;
1007*11be35a1SLionel Sambuc }
1008*11be35a1SLionel Sambuc
1009*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1010*11be35a1SLionel Sambuc report_count(1);
1011*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1012*11be35a1SLionel Sambuc return;
1013*11be35a1SLionel Sambuc }
1014*11be35a1SLionel Sambuc
1015*11be35a1SLionel Sambuc report_count(1);
1016*11be35a1SLionel Sambuc report_return(mvaddstr(y, x, args[2]));
1017*11be35a1SLionel Sambuc }
1018*11be35a1SLionel Sambuc
1019*11be35a1SLionel Sambuc
1020*11be35a1SLionel Sambuc void
cmd_mvdelch(int nargs,char ** args)1021*11be35a1SLionel Sambuc cmd_mvdelch(int nargs, char **args)
1022*11be35a1SLionel Sambuc {
1023*11be35a1SLionel Sambuc int y, x;
1024*11be35a1SLionel Sambuc
1025*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1026*11be35a1SLionel Sambuc return;
1027*11be35a1SLionel Sambuc
1028*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1029*11be35a1SLionel Sambuc report_count(1);
1030*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1031*11be35a1SLionel Sambuc return;
1032*11be35a1SLionel Sambuc }
1033*11be35a1SLionel Sambuc
1034*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1035*11be35a1SLionel Sambuc report_count(1);
1036*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1037*11be35a1SLionel Sambuc return;
1038*11be35a1SLionel Sambuc }
1039*11be35a1SLionel Sambuc
1040*11be35a1SLionel Sambuc report_count(1);
1041*11be35a1SLionel Sambuc report_return(mvdelch(y, x));
1042*11be35a1SLionel Sambuc }
1043*11be35a1SLionel Sambuc
1044*11be35a1SLionel Sambuc
1045*11be35a1SLionel Sambuc void
cmd_mvgetch(int nargs,char ** args)1046*11be35a1SLionel Sambuc cmd_mvgetch(int nargs, char **args)
1047*11be35a1SLionel Sambuc {
1048*11be35a1SLionel Sambuc int y, x;
1049*11be35a1SLionel Sambuc
1050*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1051*11be35a1SLionel Sambuc return;
1052*11be35a1SLionel Sambuc
1053*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1054*11be35a1SLionel Sambuc report_count(1);
1055*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1056*11be35a1SLionel Sambuc return;
1057*11be35a1SLionel Sambuc }
1058*11be35a1SLionel Sambuc
1059*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1060*11be35a1SLionel Sambuc report_count(1);
1061*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1062*11be35a1SLionel Sambuc return;
1063*11be35a1SLionel Sambuc }
1064*11be35a1SLionel Sambuc
1065*11be35a1SLionel Sambuc report_count(1);
1066*11be35a1SLionel Sambuc report_int(mvgetch(y, x));
1067*11be35a1SLionel Sambuc }
1068*11be35a1SLionel Sambuc
1069*11be35a1SLionel Sambuc
1070*11be35a1SLionel Sambuc void
cmd_mvgetnstr(int nargs,char ** args)1071*11be35a1SLionel Sambuc cmd_mvgetnstr(int nargs, char **args)
1072*11be35a1SLionel Sambuc {
1073*11be35a1SLionel Sambuc int y, x, count;
1074*11be35a1SLionel Sambuc char *string;
1075*11be35a1SLionel Sambuc
1076*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1077*11be35a1SLionel Sambuc return;
1078*11be35a1SLionel Sambuc
1079*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1080*11be35a1SLionel Sambuc report_count(1);
1081*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1082*11be35a1SLionel Sambuc return;
1083*11be35a1SLionel Sambuc }
1084*11be35a1SLionel Sambuc
1085*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1086*11be35a1SLionel Sambuc report_count(1);
1087*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1088*11be35a1SLionel Sambuc return;
1089*11be35a1SLionel Sambuc }
1090*11be35a1SLionel Sambuc
1091*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
1092*11be35a1SLionel Sambuc report_count(1);
1093*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1094*11be35a1SLionel Sambuc return;
1095*11be35a1SLionel Sambuc }
1096*11be35a1SLionel Sambuc
1097*11be35a1SLionel Sambuc if ((string = malloc(count + 1)) == NULL) {
1098*11be35a1SLionel Sambuc report_count(1);
1099*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
1100*11be35a1SLionel Sambuc return;
1101*11be35a1SLionel Sambuc }
1102*11be35a1SLionel Sambuc
1103*11be35a1SLionel Sambuc /* XXX call2 */
1104*11be35a1SLionel Sambuc report_count(2);
1105*11be35a1SLionel Sambuc report_return(mvgetnstr(y, x, string, count));
1106*11be35a1SLionel Sambuc report_status(string);
1107*11be35a1SLionel Sambuc free(string);
1108*11be35a1SLionel Sambuc }
1109*11be35a1SLionel Sambuc
1110*11be35a1SLionel Sambuc
1111*11be35a1SLionel Sambuc void
cmd_mvgetstr(int nargs,char ** args)1112*11be35a1SLionel Sambuc cmd_mvgetstr(int nargs, char **args)
1113*11be35a1SLionel Sambuc {
1114*11be35a1SLionel Sambuc int y, x;
1115*11be35a1SLionel Sambuc char string[256];
1116*11be35a1SLionel Sambuc
1117*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1118*11be35a1SLionel Sambuc return;
1119*11be35a1SLionel Sambuc
1120*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1121*11be35a1SLionel Sambuc report_count(1);
1122*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1123*11be35a1SLionel Sambuc return;
1124*11be35a1SLionel Sambuc }
1125*11be35a1SLionel Sambuc
1126*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1127*11be35a1SLionel Sambuc report_count(1);
1128*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1129*11be35a1SLionel Sambuc return;
1130*11be35a1SLionel Sambuc }
1131*11be35a1SLionel Sambuc
1132*11be35a1SLionel Sambuc /* XXX call2 */
1133*11be35a1SLionel Sambuc report_count(2);
1134*11be35a1SLionel Sambuc report_return(mvgetstr(y, x, string));
1135*11be35a1SLionel Sambuc report_status(string);
1136*11be35a1SLionel Sambuc }
1137*11be35a1SLionel Sambuc
1138*11be35a1SLionel Sambuc
1139*11be35a1SLionel Sambuc void
cmd_mvinch(int nargs,char ** args)1140*11be35a1SLionel Sambuc cmd_mvinch(int nargs, char **args)
1141*11be35a1SLionel Sambuc {
1142*11be35a1SLionel Sambuc int y, x;
1143*11be35a1SLionel Sambuc
1144*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1145*11be35a1SLionel Sambuc return;
1146*11be35a1SLionel Sambuc
1147*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1148*11be35a1SLionel Sambuc report_count(1);
1149*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1150*11be35a1SLionel Sambuc return;
1151*11be35a1SLionel Sambuc }
1152*11be35a1SLionel Sambuc
1153*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1154*11be35a1SLionel Sambuc report_count(1);
1155*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1156*11be35a1SLionel Sambuc return;
1157*11be35a1SLionel Sambuc }
1158*11be35a1SLionel Sambuc
1159*11be35a1SLionel Sambuc report_count(1);
1160*11be35a1SLionel Sambuc report_int(mvinch(y, x));
1161*11be35a1SLionel Sambuc }
1162*11be35a1SLionel Sambuc
1163*11be35a1SLionel Sambuc
1164*11be35a1SLionel Sambuc void
cmd_mvinchnstr(int nargs,char ** args)1165*11be35a1SLionel Sambuc cmd_mvinchnstr(int nargs, char **args)
1166*11be35a1SLionel Sambuc {
1167*11be35a1SLionel Sambuc int y, x, count;
1168*11be35a1SLionel Sambuc chtype *string;
1169*11be35a1SLionel Sambuc
1170*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1171*11be35a1SLionel Sambuc return;
1172*11be35a1SLionel Sambuc
1173*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1174*11be35a1SLionel Sambuc report_count(1);
1175*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1176*11be35a1SLionel Sambuc return;
1177*11be35a1SLionel Sambuc }
1178*11be35a1SLionel Sambuc
1179*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1180*11be35a1SLionel Sambuc report_count(1);
1181*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1182*11be35a1SLionel Sambuc return;
1183*11be35a1SLionel Sambuc }
1184*11be35a1SLionel Sambuc
1185*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
1186*11be35a1SLionel Sambuc report_count(1);
1187*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1188*11be35a1SLionel Sambuc return;
1189*11be35a1SLionel Sambuc }
1190*11be35a1SLionel Sambuc
1191*11be35a1SLionel Sambuc if ((string = malloc((count + 1) * sizeof(chtype))) == NULL) {
1192*11be35a1SLionel Sambuc report_count(1);
1193*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
1194*11be35a1SLionel Sambuc return;
1195*11be35a1SLionel Sambuc }
1196*11be35a1SLionel Sambuc
1197*11be35a1SLionel Sambuc /* XXX call2 */
1198*11be35a1SLionel Sambuc report_count(2);
1199*11be35a1SLionel Sambuc report_return(mvinchnstr(y, x, string, count));
1200*11be35a1SLionel Sambuc report_nstr(string);
1201*11be35a1SLionel Sambuc free(string);
1202*11be35a1SLionel Sambuc }
1203*11be35a1SLionel Sambuc
1204*11be35a1SLionel Sambuc
1205*11be35a1SLionel Sambuc void
cmd_mvinchstr(int nargs,char ** args)1206*11be35a1SLionel Sambuc cmd_mvinchstr(int nargs, char **args)
1207*11be35a1SLionel Sambuc {
1208*11be35a1SLionel Sambuc int y, x;
1209*11be35a1SLionel Sambuc chtype string[256];
1210*11be35a1SLionel Sambuc
1211*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1212*11be35a1SLionel Sambuc return;
1213*11be35a1SLionel Sambuc
1214*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1215*11be35a1SLionel Sambuc report_count(1);
1216*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1217*11be35a1SLionel Sambuc return;
1218*11be35a1SLionel Sambuc }
1219*11be35a1SLionel Sambuc
1220*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1221*11be35a1SLionel Sambuc report_count(1);
1222*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1223*11be35a1SLionel Sambuc return;
1224*11be35a1SLionel Sambuc }
1225*11be35a1SLionel Sambuc
1226*11be35a1SLionel Sambuc /* XXX call2 */
1227*11be35a1SLionel Sambuc report_count(2);
1228*11be35a1SLionel Sambuc report_return(mvinchstr(y, x, string));
1229*11be35a1SLionel Sambuc report_nstr(string);
1230*11be35a1SLionel Sambuc }
1231*11be35a1SLionel Sambuc
1232*11be35a1SLionel Sambuc
1233*11be35a1SLionel Sambuc void
cmd_mvinnstr(int nargs,char ** args)1234*11be35a1SLionel Sambuc cmd_mvinnstr(int nargs, char **args)
1235*11be35a1SLionel Sambuc {
1236*11be35a1SLionel Sambuc int y, x, count;
1237*11be35a1SLionel Sambuc char *string;
1238*11be35a1SLionel Sambuc
1239*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1240*11be35a1SLionel Sambuc return;
1241*11be35a1SLionel Sambuc
1242*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1243*11be35a1SLionel Sambuc report_count(1);
1244*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1245*11be35a1SLionel Sambuc return;
1246*11be35a1SLionel Sambuc }
1247*11be35a1SLionel Sambuc
1248*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1249*11be35a1SLionel Sambuc report_count(1);
1250*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1251*11be35a1SLionel Sambuc return;
1252*11be35a1SLionel Sambuc }
1253*11be35a1SLionel Sambuc
1254*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
1255*11be35a1SLionel Sambuc report_count(1);
1256*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1257*11be35a1SLionel Sambuc return;
1258*11be35a1SLionel Sambuc }
1259*11be35a1SLionel Sambuc
1260*11be35a1SLionel Sambuc if ((string = malloc(count + 1)) == NULL) {
1261*11be35a1SLionel Sambuc report_count(1);
1262*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
1263*11be35a1SLionel Sambuc return;
1264*11be35a1SLionel Sambuc }
1265*11be35a1SLionel Sambuc
1266*11be35a1SLionel Sambuc /* XXX call2 */
1267*11be35a1SLionel Sambuc report_count(2);
1268*11be35a1SLionel Sambuc report_return(mvinnstr(y, x, string, count));
1269*11be35a1SLionel Sambuc report_status(string);
1270*11be35a1SLionel Sambuc free(string);
1271*11be35a1SLionel Sambuc }
1272*11be35a1SLionel Sambuc
1273*11be35a1SLionel Sambuc
1274*11be35a1SLionel Sambuc void
cmd_mvinsch(int nargs,char ** args)1275*11be35a1SLionel Sambuc cmd_mvinsch(int nargs, char **args)
1276*11be35a1SLionel Sambuc {
1277*11be35a1SLionel Sambuc int y, x, ch;
1278*11be35a1SLionel Sambuc
1279*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1280*11be35a1SLionel Sambuc return;
1281*11be35a1SLionel Sambuc
1282*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1283*11be35a1SLionel Sambuc report_count(1);
1284*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1285*11be35a1SLionel Sambuc return;
1286*11be35a1SLionel Sambuc }
1287*11be35a1SLionel Sambuc
1288*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1289*11be35a1SLionel Sambuc report_count(1);
1290*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1291*11be35a1SLionel Sambuc return;
1292*11be35a1SLionel Sambuc }
1293*11be35a1SLionel Sambuc
1294*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &ch) == 0) {
1295*11be35a1SLionel Sambuc report_count(1);
1296*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1297*11be35a1SLionel Sambuc return;
1298*11be35a1SLionel Sambuc }
1299*11be35a1SLionel Sambuc
1300*11be35a1SLionel Sambuc report_count(1);
1301*11be35a1SLionel Sambuc report_return(mvinsch(y, x, ch));
1302*11be35a1SLionel Sambuc }
1303*11be35a1SLionel Sambuc
1304*11be35a1SLionel Sambuc
1305*11be35a1SLionel Sambuc void
cmd_mvinstr(int nargs,char ** args)1306*11be35a1SLionel Sambuc cmd_mvinstr(int nargs, char **args)
1307*11be35a1SLionel Sambuc {
1308*11be35a1SLionel Sambuc int y, x;
1309*11be35a1SLionel Sambuc
1310*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1311*11be35a1SLionel Sambuc return;
1312*11be35a1SLionel Sambuc
1313*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
1314*11be35a1SLionel Sambuc report_count(1);
1315*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1316*11be35a1SLionel Sambuc return;
1317*11be35a1SLionel Sambuc }
1318*11be35a1SLionel Sambuc
1319*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
1320*11be35a1SLionel Sambuc report_count(1);
1321*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1322*11be35a1SLionel Sambuc return;
1323*11be35a1SLionel Sambuc }
1324*11be35a1SLionel Sambuc
1325*11be35a1SLionel Sambuc report_count(1);
1326*11be35a1SLionel Sambuc report_return(mvinstr(y, x, args[2]));
1327*11be35a1SLionel Sambuc }
1328*11be35a1SLionel Sambuc
1329*11be35a1SLionel Sambuc
1330*11be35a1SLionel Sambuc
1331*11be35a1SLionel Sambuc void
cmd_mvwaddbytes(int nargs,char ** args)1332*11be35a1SLionel Sambuc cmd_mvwaddbytes(int nargs, char **args)
1333*11be35a1SLionel Sambuc {
1334*11be35a1SLionel Sambuc int y, x, count;
1335*11be35a1SLionel Sambuc WINDOW *win;
1336*11be35a1SLionel Sambuc
1337*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
1338*11be35a1SLionel Sambuc return;
1339*11be35a1SLionel Sambuc
1340*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1341*11be35a1SLionel Sambuc report_count(1);
1342*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1343*11be35a1SLionel Sambuc return;
1344*11be35a1SLionel Sambuc }
1345*11be35a1SLionel Sambuc
1346*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1347*11be35a1SLionel Sambuc report_count(1);
1348*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1349*11be35a1SLionel Sambuc return;
1350*11be35a1SLionel Sambuc }
1351*11be35a1SLionel Sambuc
1352*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1353*11be35a1SLionel Sambuc report_count(1);
1354*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1355*11be35a1SLionel Sambuc return;
1356*11be35a1SLionel Sambuc }
1357*11be35a1SLionel Sambuc
1358*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &count) == 0) {
1359*11be35a1SLionel Sambuc report_count(1);
1360*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1361*11be35a1SLionel Sambuc return;
1362*11be35a1SLionel Sambuc }
1363*11be35a1SLionel Sambuc
1364*11be35a1SLionel Sambuc report_count(1);
1365*11be35a1SLionel Sambuc report_return(mvwaddbytes(win, y, x, args[3], count));
1366*11be35a1SLionel Sambuc }
1367*11be35a1SLionel Sambuc
1368*11be35a1SLionel Sambuc
1369*11be35a1SLionel Sambuc void
cmd_mvwaddch(int nargs,char ** args)1370*11be35a1SLionel Sambuc cmd_mvwaddch(int nargs, char **args)
1371*11be35a1SLionel Sambuc {
1372*11be35a1SLionel Sambuc int y, x;
1373*11be35a1SLionel Sambuc WINDOW *win;
1374*11be35a1SLionel Sambuc
1375*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
1376*11be35a1SLionel Sambuc return;
1377*11be35a1SLionel Sambuc
1378*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1379*11be35a1SLionel Sambuc report_count(1);
1380*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1381*11be35a1SLionel Sambuc return;
1382*11be35a1SLionel Sambuc }
1383*11be35a1SLionel Sambuc
1384*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1385*11be35a1SLionel Sambuc report_count(1);
1386*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1387*11be35a1SLionel Sambuc return;
1388*11be35a1SLionel Sambuc }
1389*11be35a1SLionel Sambuc
1390*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1391*11be35a1SLionel Sambuc report_count(1);
1392*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1393*11be35a1SLionel Sambuc return;
1394*11be35a1SLionel Sambuc }
1395*11be35a1SLionel Sambuc
1396*11be35a1SLionel Sambuc report_count(1);
1397*11be35a1SLionel Sambuc report_return(mvwaddch(win, y, x, args[3][0]));
1398*11be35a1SLionel Sambuc }
1399*11be35a1SLionel Sambuc
1400*11be35a1SLionel Sambuc
1401*11be35a1SLionel Sambuc void
cmd_mvwaddchnstr(int nargs,char ** args)1402*11be35a1SLionel Sambuc cmd_mvwaddchnstr(int nargs, char **args)
1403*11be35a1SLionel Sambuc {
1404*11be35a1SLionel Sambuc int y, x, count;
1405*11be35a1SLionel Sambuc WINDOW *win;
1406*11be35a1SLionel Sambuc
1407*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
1408*11be35a1SLionel Sambuc return;
1409*11be35a1SLionel Sambuc
1410*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1411*11be35a1SLionel Sambuc report_count(1);
1412*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1413*11be35a1SLionel Sambuc return;
1414*11be35a1SLionel Sambuc }
1415*11be35a1SLionel Sambuc
1416*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1417*11be35a1SLionel Sambuc report_count(1);
1418*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1419*11be35a1SLionel Sambuc return;
1420*11be35a1SLionel Sambuc }
1421*11be35a1SLionel Sambuc
1422*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1423*11be35a1SLionel Sambuc report_count(1);
1424*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1425*11be35a1SLionel Sambuc return;
1426*11be35a1SLionel Sambuc }
1427*11be35a1SLionel Sambuc
1428*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &count) == 0) {
1429*11be35a1SLionel Sambuc report_count(1);
1430*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1431*11be35a1SLionel Sambuc return;
1432*11be35a1SLionel Sambuc }
1433*11be35a1SLionel Sambuc
1434*11be35a1SLionel Sambuc report_count(1);
1435*11be35a1SLionel Sambuc report_return(mvwaddchnstr(win, y, x, (chtype *) args[3], count));
1436*11be35a1SLionel Sambuc }
1437*11be35a1SLionel Sambuc
1438*11be35a1SLionel Sambuc
1439*11be35a1SLionel Sambuc void
cmd_mvwaddchstr(int nargs,char ** args)1440*11be35a1SLionel Sambuc cmd_mvwaddchstr(int nargs, char **args)
1441*11be35a1SLionel Sambuc {
1442*11be35a1SLionel Sambuc int y, x;
1443*11be35a1SLionel Sambuc WINDOW *win;
1444*11be35a1SLionel Sambuc
1445*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
1446*11be35a1SLionel Sambuc return;
1447*11be35a1SLionel Sambuc
1448*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1449*11be35a1SLionel Sambuc report_count(1);
1450*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1451*11be35a1SLionel Sambuc return;
1452*11be35a1SLionel Sambuc }
1453*11be35a1SLionel Sambuc
1454*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1455*11be35a1SLionel Sambuc report_count(1);
1456*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1457*11be35a1SLionel Sambuc return;
1458*11be35a1SLionel Sambuc }
1459*11be35a1SLionel Sambuc
1460*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1461*11be35a1SLionel Sambuc report_count(1);
1462*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1463*11be35a1SLionel Sambuc return;
1464*11be35a1SLionel Sambuc }
1465*11be35a1SLionel Sambuc
1466*11be35a1SLionel Sambuc report_count(1);
1467*11be35a1SLionel Sambuc report_return(mvwaddchstr(win, y, x, (chtype *) args[3]));
1468*11be35a1SLionel Sambuc }
1469*11be35a1SLionel Sambuc
1470*11be35a1SLionel Sambuc
1471*11be35a1SLionel Sambuc void
cmd_mvwaddnstr(int nargs,char ** args)1472*11be35a1SLionel Sambuc cmd_mvwaddnstr(int nargs, char **args)
1473*11be35a1SLionel Sambuc {
1474*11be35a1SLionel Sambuc int y, x, count;
1475*11be35a1SLionel Sambuc WINDOW *win;
1476*11be35a1SLionel Sambuc
1477*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
1478*11be35a1SLionel Sambuc return;
1479*11be35a1SLionel Sambuc
1480*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1481*11be35a1SLionel Sambuc report_count(1);
1482*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1483*11be35a1SLionel Sambuc return;
1484*11be35a1SLionel Sambuc }
1485*11be35a1SLionel Sambuc
1486*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1487*11be35a1SLionel Sambuc report_count(1);
1488*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1489*11be35a1SLionel Sambuc return;
1490*11be35a1SLionel Sambuc }
1491*11be35a1SLionel Sambuc
1492*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1493*11be35a1SLionel Sambuc report_count(1);
1494*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1495*11be35a1SLionel Sambuc return;
1496*11be35a1SLionel Sambuc }
1497*11be35a1SLionel Sambuc
1498*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &count) == 0) {
1499*11be35a1SLionel Sambuc report_count(1);
1500*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1501*11be35a1SLionel Sambuc return;
1502*11be35a1SLionel Sambuc }
1503*11be35a1SLionel Sambuc
1504*11be35a1SLionel Sambuc report_count(1);
1505*11be35a1SLionel Sambuc report_return(mvwaddnstr(win, y, x, args[3], count));
1506*11be35a1SLionel Sambuc }
1507*11be35a1SLionel Sambuc
1508*11be35a1SLionel Sambuc
1509*11be35a1SLionel Sambuc void
cmd_mvwaddstr(int nargs,char ** args)1510*11be35a1SLionel Sambuc cmd_mvwaddstr(int nargs, char **args)
1511*11be35a1SLionel Sambuc {
1512*11be35a1SLionel Sambuc int y, x;
1513*11be35a1SLionel Sambuc WINDOW *win;
1514*11be35a1SLionel Sambuc
1515*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
1516*11be35a1SLionel Sambuc return;
1517*11be35a1SLionel Sambuc
1518*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1519*11be35a1SLionel Sambuc report_count(1);
1520*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1521*11be35a1SLionel Sambuc return;
1522*11be35a1SLionel Sambuc }
1523*11be35a1SLionel Sambuc
1524*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1525*11be35a1SLionel Sambuc report_count(1);
1526*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1527*11be35a1SLionel Sambuc return;
1528*11be35a1SLionel Sambuc }
1529*11be35a1SLionel Sambuc
1530*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1531*11be35a1SLionel Sambuc report_count(1);
1532*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1533*11be35a1SLionel Sambuc return;
1534*11be35a1SLionel Sambuc }
1535*11be35a1SLionel Sambuc
1536*11be35a1SLionel Sambuc report_count(1);
1537*11be35a1SLionel Sambuc report_return(mvwaddstr(win, y, x, args[3]));
1538*11be35a1SLionel Sambuc }
1539*11be35a1SLionel Sambuc
1540*11be35a1SLionel Sambuc
1541*11be35a1SLionel Sambuc void
cmd_mvwdelch(int nargs,char ** args)1542*11be35a1SLionel Sambuc cmd_mvwdelch(int nargs, char **args)
1543*11be35a1SLionel Sambuc {
1544*11be35a1SLionel Sambuc int y, x;
1545*11be35a1SLionel Sambuc WINDOW *win;
1546*11be35a1SLionel Sambuc
1547*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1548*11be35a1SLionel Sambuc return;
1549*11be35a1SLionel Sambuc
1550*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1551*11be35a1SLionel Sambuc report_count(1);
1552*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1553*11be35a1SLionel Sambuc return;
1554*11be35a1SLionel Sambuc }
1555*11be35a1SLionel Sambuc
1556*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1557*11be35a1SLionel Sambuc report_count(1);
1558*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1559*11be35a1SLionel Sambuc return;
1560*11be35a1SLionel Sambuc }
1561*11be35a1SLionel Sambuc
1562*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1563*11be35a1SLionel Sambuc report_count(1);
1564*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1565*11be35a1SLionel Sambuc return;
1566*11be35a1SLionel Sambuc }
1567*11be35a1SLionel Sambuc
1568*11be35a1SLionel Sambuc report_count(1);
1569*11be35a1SLionel Sambuc report_return(mvwdelch(win, y, x));
1570*11be35a1SLionel Sambuc }
1571*11be35a1SLionel Sambuc
1572*11be35a1SLionel Sambuc
1573*11be35a1SLionel Sambuc void
cmd_mvwgetch(int nargs,char ** args)1574*11be35a1SLionel Sambuc cmd_mvwgetch(int nargs, char **args)
1575*11be35a1SLionel Sambuc {
1576*11be35a1SLionel Sambuc int y, x;
1577*11be35a1SLionel Sambuc WINDOW *win;
1578*11be35a1SLionel Sambuc
1579*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1580*11be35a1SLionel Sambuc return;
1581*11be35a1SLionel Sambuc
1582*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1583*11be35a1SLionel Sambuc report_count(1);
1584*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1585*11be35a1SLionel Sambuc return;
1586*11be35a1SLionel Sambuc }
1587*11be35a1SLionel Sambuc
1588*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1589*11be35a1SLionel Sambuc report_count(1);
1590*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1591*11be35a1SLionel Sambuc return;
1592*11be35a1SLionel Sambuc }
1593*11be35a1SLionel Sambuc
1594*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1595*11be35a1SLionel Sambuc report_count(1);
1596*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1597*11be35a1SLionel Sambuc return;
1598*11be35a1SLionel Sambuc }
1599*11be35a1SLionel Sambuc
1600*11be35a1SLionel Sambuc /* XXX - implicit refresh */
1601*11be35a1SLionel Sambuc report_count(1);
1602*11be35a1SLionel Sambuc report_int(mvwgetch(win, y, x));
1603*11be35a1SLionel Sambuc }
1604*11be35a1SLionel Sambuc
1605*11be35a1SLionel Sambuc
1606*11be35a1SLionel Sambuc void
cmd_mvwgetnstr(int nargs,char ** args)1607*11be35a1SLionel Sambuc cmd_mvwgetnstr(int nargs, char **args)
1608*11be35a1SLionel Sambuc {
1609*11be35a1SLionel Sambuc int y, x, count;
1610*11be35a1SLionel Sambuc char *string;
1611*11be35a1SLionel Sambuc WINDOW *win;
1612*11be35a1SLionel Sambuc
1613*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
1614*11be35a1SLionel Sambuc return;
1615*11be35a1SLionel Sambuc
1616*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1617*11be35a1SLionel Sambuc report_count(1);
1618*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1619*11be35a1SLionel Sambuc return;
1620*11be35a1SLionel Sambuc }
1621*11be35a1SLionel Sambuc
1622*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1623*11be35a1SLionel Sambuc report_count(1);
1624*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1625*11be35a1SLionel Sambuc return;
1626*11be35a1SLionel Sambuc }
1627*11be35a1SLionel Sambuc
1628*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1629*11be35a1SLionel Sambuc report_count(1);
1630*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1631*11be35a1SLionel Sambuc return;
1632*11be35a1SLionel Sambuc }
1633*11be35a1SLionel Sambuc
1634*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &count) == 0) {
1635*11be35a1SLionel Sambuc report_count(1);
1636*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1637*11be35a1SLionel Sambuc return;
1638*11be35a1SLionel Sambuc }
1639*11be35a1SLionel Sambuc
1640*11be35a1SLionel Sambuc if ((string = malloc(count + 1)) == NULL) {
1641*11be35a1SLionel Sambuc report_count(1);
1642*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
1643*11be35a1SLionel Sambuc return;
1644*11be35a1SLionel Sambuc }
1645*11be35a1SLionel Sambuc
1646*11be35a1SLionel Sambuc /* XXX call2 */
1647*11be35a1SLionel Sambuc report_count(2);
1648*11be35a1SLionel Sambuc report_return(mvwgetnstr(win, y, x, string, count));
1649*11be35a1SLionel Sambuc report_status(string);
1650*11be35a1SLionel Sambuc free(string);
1651*11be35a1SLionel Sambuc }
1652*11be35a1SLionel Sambuc
1653*11be35a1SLionel Sambuc
1654*11be35a1SLionel Sambuc void
cmd_mvwgetstr(int nargs,char ** args)1655*11be35a1SLionel Sambuc cmd_mvwgetstr(int nargs, char **args)
1656*11be35a1SLionel Sambuc {
1657*11be35a1SLionel Sambuc int y, x;
1658*11be35a1SLionel Sambuc WINDOW *win;
1659*11be35a1SLionel Sambuc char string[256];
1660*11be35a1SLionel Sambuc
1661*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1662*11be35a1SLionel Sambuc return;
1663*11be35a1SLionel Sambuc
1664*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1665*11be35a1SLionel Sambuc report_count(1);
1666*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1667*11be35a1SLionel Sambuc return;
1668*11be35a1SLionel Sambuc }
1669*11be35a1SLionel Sambuc
1670*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1671*11be35a1SLionel Sambuc report_count(1);
1672*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1673*11be35a1SLionel Sambuc return;
1674*11be35a1SLionel Sambuc }
1675*11be35a1SLionel Sambuc
1676*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1677*11be35a1SLionel Sambuc report_count(1);
1678*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1679*11be35a1SLionel Sambuc return;
1680*11be35a1SLionel Sambuc }
1681*11be35a1SLionel Sambuc
1682*11be35a1SLionel Sambuc /* XXX - call2 */
1683*11be35a1SLionel Sambuc report_count(2);
1684*11be35a1SLionel Sambuc report_return(mvwgetstr(win, y, x, string));
1685*11be35a1SLionel Sambuc report_status(string);
1686*11be35a1SLionel Sambuc }
1687*11be35a1SLionel Sambuc
1688*11be35a1SLionel Sambuc
1689*11be35a1SLionel Sambuc void
cmd_mvwinch(int nargs,char ** args)1690*11be35a1SLionel Sambuc cmd_mvwinch(int nargs, char **args)
1691*11be35a1SLionel Sambuc {
1692*11be35a1SLionel Sambuc int y, x;
1693*11be35a1SLionel Sambuc WINDOW *win;
1694*11be35a1SLionel Sambuc
1695*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1696*11be35a1SLionel Sambuc return;
1697*11be35a1SLionel Sambuc
1698*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1699*11be35a1SLionel Sambuc report_count(1);
1700*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1701*11be35a1SLionel Sambuc return;
1702*11be35a1SLionel Sambuc }
1703*11be35a1SLionel Sambuc
1704*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1705*11be35a1SLionel Sambuc report_count(1);
1706*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1707*11be35a1SLionel Sambuc return;
1708*11be35a1SLionel Sambuc }
1709*11be35a1SLionel Sambuc
1710*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1711*11be35a1SLionel Sambuc report_count(1);
1712*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1713*11be35a1SLionel Sambuc return;
1714*11be35a1SLionel Sambuc }
1715*11be35a1SLionel Sambuc
1716*11be35a1SLionel Sambuc report_count(1);
1717*11be35a1SLionel Sambuc report_int(mvwinch(win, y, x));
1718*11be35a1SLionel Sambuc }
1719*11be35a1SLionel Sambuc
1720*11be35a1SLionel Sambuc
1721*11be35a1SLionel Sambuc void
cmd_mvwinsch(int nargs,char ** args)1722*11be35a1SLionel Sambuc cmd_mvwinsch(int nargs, char **args)
1723*11be35a1SLionel Sambuc {
1724*11be35a1SLionel Sambuc int y, x;
1725*11be35a1SLionel Sambuc WINDOW *win;
1726*11be35a1SLionel Sambuc
1727*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
1728*11be35a1SLionel Sambuc return;
1729*11be35a1SLionel Sambuc
1730*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1731*11be35a1SLionel Sambuc report_count(1);
1732*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1733*11be35a1SLionel Sambuc return;
1734*11be35a1SLionel Sambuc }
1735*11be35a1SLionel Sambuc
1736*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
1737*11be35a1SLionel Sambuc report_count(1);
1738*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1739*11be35a1SLionel Sambuc return;
1740*11be35a1SLionel Sambuc }
1741*11be35a1SLionel Sambuc
1742*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
1743*11be35a1SLionel Sambuc report_count(1);
1744*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1745*11be35a1SLionel Sambuc return;
1746*11be35a1SLionel Sambuc }
1747*11be35a1SLionel Sambuc
1748*11be35a1SLionel Sambuc report_count(1);
1749*11be35a1SLionel Sambuc report_int(mvwinsch(win, y, x, args[3][0]));
1750*11be35a1SLionel Sambuc }
1751*11be35a1SLionel Sambuc
1752*11be35a1SLionel Sambuc
1753*11be35a1SLionel Sambuc void
cmd_assume_default_colors(int nargs,char ** args)1754*11be35a1SLionel Sambuc cmd_assume_default_colors(int nargs, char **args)
1755*11be35a1SLionel Sambuc {
1756*11be35a1SLionel Sambuc short fore, back;
1757*11be35a1SLionel Sambuc
1758*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1759*11be35a1SLionel Sambuc return;
1760*11be35a1SLionel Sambuc
1761*11be35a1SLionel Sambuc if (sscanf(args[0], "%hd", &fore) == 0) {
1762*11be35a1SLionel Sambuc report_count(1);
1763*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1764*11be35a1SLionel Sambuc return;
1765*11be35a1SLionel Sambuc }
1766*11be35a1SLionel Sambuc
1767*11be35a1SLionel Sambuc if (sscanf(args[1], "%hd", &back) == 0) {
1768*11be35a1SLionel Sambuc report_count(1);
1769*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1770*11be35a1SLionel Sambuc return;
1771*11be35a1SLionel Sambuc }
1772*11be35a1SLionel Sambuc
1773*11be35a1SLionel Sambuc report_count(1);
1774*11be35a1SLionel Sambuc report_return(assume_default_colors(fore, back));
1775*11be35a1SLionel Sambuc }
1776*11be35a1SLionel Sambuc
1777*11be35a1SLionel Sambuc
1778*11be35a1SLionel Sambuc void
cmd_baudrate(int nargs,char ** args)1779*11be35a1SLionel Sambuc cmd_baudrate(int nargs, char **args)
1780*11be35a1SLionel Sambuc {
1781*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
1782*11be35a1SLionel Sambuc return;
1783*11be35a1SLionel Sambuc
1784*11be35a1SLionel Sambuc report_count(1);
1785*11be35a1SLionel Sambuc report_int(baudrate());
1786*11be35a1SLionel Sambuc }
1787*11be35a1SLionel Sambuc
1788*11be35a1SLionel Sambuc
1789*11be35a1SLionel Sambuc void
cmd_beep(int nargs,char ** args)1790*11be35a1SLionel Sambuc cmd_beep(int nargs, char **args)
1791*11be35a1SLionel Sambuc {
1792*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
1793*11be35a1SLionel Sambuc return;
1794*11be35a1SLionel Sambuc
1795*11be35a1SLionel Sambuc report_count(1);
1796*11be35a1SLionel Sambuc report_return(beep());
1797*11be35a1SLionel Sambuc }
1798*11be35a1SLionel Sambuc
1799*11be35a1SLionel Sambuc
1800*11be35a1SLionel Sambuc void
cmd_box(int nargs,char ** args)1801*11be35a1SLionel Sambuc cmd_box(int nargs, char **args)
1802*11be35a1SLionel Sambuc {
1803*11be35a1SLionel Sambuc WINDOW *win;
1804*11be35a1SLionel Sambuc chtype *vertical, *horizontal;
1805*11be35a1SLionel Sambuc
1806*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
1807*11be35a1SLionel Sambuc return;
1808*11be35a1SLionel Sambuc
1809*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1810*11be35a1SLionel Sambuc report_count(1);
1811*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1812*11be35a1SLionel Sambuc return;
1813*11be35a1SLionel Sambuc }
1814*11be35a1SLionel Sambuc
1815*11be35a1SLionel Sambuc vertical = (chtype *) args[1];
1816*11be35a1SLionel Sambuc horizontal = (chtype *) args[2];
1817*11be35a1SLionel Sambuc report_count(1);
1818*11be35a1SLionel Sambuc report_return(box(win, vertical[0], horizontal[0]));
1819*11be35a1SLionel Sambuc }
1820*11be35a1SLionel Sambuc
1821*11be35a1SLionel Sambuc
1822*11be35a1SLionel Sambuc void
cmd_can_change_color(int nargs,char ** args)1823*11be35a1SLionel Sambuc cmd_can_change_color(int nargs, char **args)
1824*11be35a1SLionel Sambuc {
1825*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
1826*11be35a1SLionel Sambuc return;
1827*11be35a1SLionel Sambuc
1828*11be35a1SLionel Sambuc report_count(1);
1829*11be35a1SLionel Sambuc report_int(can_change_color());
1830*11be35a1SLionel Sambuc }
1831*11be35a1SLionel Sambuc
1832*11be35a1SLionel Sambuc
1833*11be35a1SLionel Sambuc void
cmd_cbreak(int nargs,char ** args)1834*11be35a1SLionel Sambuc cmd_cbreak(int nargs, char **args)
1835*11be35a1SLionel Sambuc {
1836*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
1837*11be35a1SLionel Sambuc return;
1838*11be35a1SLionel Sambuc
1839*11be35a1SLionel Sambuc report_count(1);
1840*11be35a1SLionel Sambuc report_return(cbreak());
1841*11be35a1SLionel Sambuc }
1842*11be35a1SLionel Sambuc
1843*11be35a1SLionel Sambuc
1844*11be35a1SLionel Sambuc void
cmd_clearok(int nargs,char ** args)1845*11be35a1SLionel Sambuc cmd_clearok(int nargs, char **args)
1846*11be35a1SLionel Sambuc {
1847*11be35a1SLionel Sambuc WINDOW *win;
1848*11be35a1SLionel Sambuc int flag;
1849*11be35a1SLionel Sambuc
1850*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
1851*11be35a1SLionel Sambuc return;
1852*11be35a1SLionel Sambuc
1853*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
1854*11be35a1SLionel Sambuc report_count(1);
1855*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1856*11be35a1SLionel Sambuc return;
1857*11be35a1SLionel Sambuc }
1858*11be35a1SLionel Sambuc
1859*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
1860*11be35a1SLionel Sambuc report_count(1);
1861*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1862*11be35a1SLionel Sambuc return;
1863*11be35a1SLionel Sambuc }
1864*11be35a1SLionel Sambuc
1865*11be35a1SLionel Sambuc report_count(1);
1866*11be35a1SLionel Sambuc report_return(clearok(win, flag));
1867*11be35a1SLionel Sambuc }
1868*11be35a1SLionel Sambuc
1869*11be35a1SLionel Sambuc
1870*11be35a1SLionel Sambuc void
cmd_color_content(int nargs,char ** args)1871*11be35a1SLionel Sambuc cmd_color_content(int nargs, char **args)
1872*11be35a1SLionel Sambuc {
1873*11be35a1SLionel Sambuc short colour, red, green, blue;
1874*11be35a1SLionel Sambuc
1875*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
1876*11be35a1SLionel Sambuc return;
1877*11be35a1SLionel Sambuc
1878*11be35a1SLionel Sambuc if (sscanf(args[0], "%hd", &colour) == 0) {
1879*11be35a1SLionel Sambuc report_count(1);
1880*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1881*11be35a1SLionel Sambuc return;
1882*11be35a1SLionel Sambuc }
1883*11be35a1SLionel Sambuc
1884*11be35a1SLionel Sambuc /* XXX - call4 */
1885*11be35a1SLionel Sambuc report_count(4);
1886*11be35a1SLionel Sambuc report_return(color_content(colour, &red, &green, &blue));
1887*11be35a1SLionel Sambuc report_int(red);
1888*11be35a1SLionel Sambuc report_int(green);
1889*11be35a1SLionel Sambuc report_int(blue);
1890*11be35a1SLionel Sambuc }
1891*11be35a1SLionel Sambuc
1892*11be35a1SLionel Sambuc
1893*11be35a1SLionel Sambuc void
cmd_copywin(int nargs,char ** args)1894*11be35a1SLionel Sambuc cmd_copywin(int nargs, char **args)
1895*11be35a1SLionel Sambuc {
1896*11be35a1SLionel Sambuc int sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, ovlay;
1897*11be35a1SLionel Sambuc WINDOW *source, *destination;
1898*11be35a1SLionel Sambuc
1899*11be35a1SLionel Sambuc if (check_arg_count(nargs, 9) == 1)
1900*11be35a1SLionel Sambuc return;
1901*11be35a1SLionel Sambuc
1902*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &source) == 0) {
1903*11be35a1SLionel Sambuc report_count(1);
1904*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1905*11be35a1SLionel Sambuc return;
1906*11be35a1SLionel Sambuc }
1907*11be35a1SLionel Sambuc
1908*11be35a1SLionel Sambuc if (sscanf(args[1], "%p", &destination) == 0) {
1909*11be35a1SLionel Sambuc report_count(1);
1910*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1911*11be35a1SLionel Sambuc return;
1912*11be35a1SLionel Sambuc }
1913*11be35a1SLionel Sambuc
1914*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &sminrow) == 0) {
1915*11be35a1SLionel Sambuc report_count(1);
1916*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1917*11be35a1SLionel Sambuc return;
1918*11be35a1SLionel Sambuc }
1919*11be35a1SLionel Sambuc
1920*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &smincol) == 0) {
1921*11be35a1SLionel Sambuc report_count(1);
1922*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1923*11be35a1SLionel Sambuc return;
1924*11be35a1SLionel Sambuc }
1925*11be35a1SLionel Sambuc
1926*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &dminrow) == 0) {
1927*11be35a1SLionel Sambuc report_count(1);
1928*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1929*11be35a1SLionel Sambuc return;
1930*11be35a1SLionel Sambuc }
1931*11be35a1SLionel Sambuc
1932*11be35a1SLionel Sambuc if (sscanf(args[5], "%d", &dmincol) == 0) {
1933*11be35a1SLionel Sambuc report_count(1);
1934*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1935*11be35a1SLionel Sambuc return;
1936*11be35a1SLionel Sambuc }
1937*11be35a1SLionel Sambuc
1938*11be35a1SLionel Sambuc if (sscanf(args[6], "%d", &dmaxrow) == 0) {
1939*11be35a1SLionel Sambuc report_count(1);
1940*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1941*11be35a1SLionel Sambuc return;
1942*11be35a1SLionel Sambuc }
1943*11be35a1SLionel Sambuc
1944*11be35a1SLionel Sambuc if (sscanf(args[7], "%d", &dmaxcol) == 0) {
1945*11be35a1SLionel Sambuc report_count(1);
1946*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1947*11be35a1SLionel Sambuc return;
1948*11be35a1SLionel Sambuc }
1949*11be35a1SLionel Sambuc
1950*11be35a1SLionel Sambuc if (sscanf(args[8], "%d", &ovlay) == 0) {
1951*11be35a1SLionel Sambuc report_count(1);
1952*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1953*11be35a1SLionel Sambuc return;
1954*11be35a1SLionel Sambuc }
1955*11be35a1SLionel Sambuc
1956*11be35a1SLionel Sambuc report_count(1);
1957*11be35a1SLionel Sambuc report_return(copywin(source, destination, sminrow, smincol, dminrow,
1958*11be35a1SLionel Sambuc dmincol, dmaxrow, dmaxcol, ovlay));
1959*11be35a1SLionel Sambuc }
1960*11be35a1SLionel Sambuc
1961*11be35a1SLionel Sambuc
1962*11be35a1SLionel Sambuc void
cmd_curs_set(int nargs,char ** args)1963*11be35a1SLionel Sambuc cmd_curs_set(int nargs, char **args)
1964*11be35a1SLionel Sambuc {
1965*11be35a1SLionel Sambuc int vis;
1966*11be35a1SLionel Sambuc
1967*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
1968*11be35a1SLionel Sambuc return;
1969*11be35a1SLionel Sambuc
1970*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &vis) == 0) {
1971*11be35a1SLionel Sambuc report_count(1);
1972*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
1973*11be35a1SLionel Sambuc return;
1974*11be35a1SLionel Sambuc }
1975*11be35a1SLionel Sambuc
1976*11be35a1SLionel Sambuc report_count(1);
1977*11be35a1SLionel Sambuc report_int(curs_set(vis));
1978*11be35a1SLionel Sambuc }
1979*11be35a1SLionel Sambuc
1980*11be35a1SLionel Sambuc
1981*11be35a1SLionel Sambuc void
cmd_def_prog_mode(int nargs,char ** args)1982*11be35a1SLionel Sambuc cmd_def_prog_mode(int nargs, char **args)
1983*11be35a1SLionel Sambuc {
1984*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
1985*11be35a1SLionel Sambuc return;
1986*11be35a1SLionel Sambuc
1987*11be35a1SLionel Sambuc report_count(1);
1988*11be35a1SLionel Sambuc report_return(def_prog_mode());
1989*11be35a1SLionel Sambuc }
1990*11be35a1SLionel Sambuc
1991*11be35a1SLionel Sambuc
1992*11be35a1SLionel Sambuc void
cmd_def_shell_mode(int nargs,char ** args)1993*11be35a1SLionel Sambuc cmd_def_shell_mode(int nargs, char **args)
1994*11be35a1SLionel Sambuc {
1995*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
1996*11be35a1SLionel Sambuc return;
1997*11be35a1SLionel Sambuc
1998*11be35a1SLionel Sambuc report_count(1);
1999*11be35a1SLionel Sambuc report_return(def_shell_mode());
2000*11be35a1SLionel Sambuc }
2001*11be35a1SLionel Sambuc
2002*11be35a1SLionel Sambuc
2003*11be35a1SLionel Sambuc void
cmd_define_key(int nargs,char ** args)2004*11be35a1SLionel Sambuc cmd_define_key(int nargs, char **args)
2005*11be35a1SLionel Sambuc {
2006*11be35a1SLionel Sambuc int symbol;
2007*11be35a1SLionel Sambuc
2008*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2009*11be35a1SLionel Sambuc return;
2010*11be35a1SLionel Sambuc
2011*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &symbol) == 0) {
2012*11be35a1SLionel Sambuc report_count(1);
2013*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2014*11be35a1SLionel Sambuc return;
2015*11be35a1SLionel Sambuc }
2016*11be35a1SLionel Sambuc
2017*11be35a1SLionel Sambuc report_count(1);
2018*11be35a1SLionel Sambuc report_return(define_key(args[0], symbol));
2019*11be35a1SLionel Sambuc }
2020*11be35a1SLionel Sambuc
2021*11be35a1SLionel Sambuc
2022*11be35a1SLionel Sambuc void
cmd_delay_output(int nargs,char ** args)2023*11be35a1SLionel Sambuc cmd_delay_output(int nargs, char **args)
2024*11be35a1SLionel Sambuc {
2025*11be35a1SLionel Sambuc int dtime;
2026*11be35a1SLionel Sambuc
2027*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2028*11be35a1SLionel Sambuc return;
2029*11be35a1SLionel Sambuc
2030*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &dtime) == 0) {
2031*11be35a1SLionel Sambuc report_count(1);
2032*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2033*11be35a1SLionel Sambuc return;
2034*11be35a1SLionel Sambuc }
2035*11be35a1SLionel Sambuc
2036*11be35a1SLionel Sambuc report_count(1);
2037*11be35a1SLionel Sambuc report_return(delay_output(dtime));
2038*11be35a1SLionel Sambuc }
2039*11be35a1SLionel Sambuc
2040*11be35a1SLionel Sambuc
2041*11be35a1SLionel Sambuc void
cmd_delscreen(int nargs,char ** args)2042*11be35a1SLionel Sambuc cmd_delscreen(int nargs, char **args)
2043*11be35a1SLionel Sambuc {
2044*11be35a1SLionel Sambuc SCREEN *scrn;
2045*11be35a1SLionel Sambuc
2046*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2047*11be35a1SLionel Sambuc return;
2048*11be35a1SLionel Sambuc
2049*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &scrn) == 0) {
2050*11be35a1SLionel Sambuc report_count(1);
2051*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2052*11be35a1SLionel Sambuc return;
2053*11be35a1SLionel Sambuc }
2054*11be35a1SLionel Sambuc
2055*11be35a1SLionel Sambuc delscreen(scrn); /* void return */
2056*11be35a1SLionel Sambuc report_count(1);
2057*11be35a1SLionel Sambuc report_return(OK);
2058*11be35a1SLionel Sambuc }
2059*11be35a1SLionel Sambuc
2060*11be35a1SLionel Sambuc
2061*11be35a1SLionel Sambuc void
cmd_delwin(int nargs,char ** args)2062*11be35a1SLionel Sambuc cmd_delwin(int nargs, char **args)
2063*11be35a1SLionel Sambuc {
2064*11be35a1SLionel Sambuc WINDOW *win;
2065*11be35a1SLionel Sambuc
2066*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2067*11be35a1SLionel Sambuc return;
2068*11be35a1SLionel Sambuc
2069*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2070*11be35a1SLionel Sambuc report_count(1);
2071*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2072*11be35a1SLionel Sambuc return;
2073*11be35a1SLionel Sambuc }
2074*11be35a1SLionel Sambuc
2075*11be35a1SLionel Sambuc report_count(1);
2076*11be35a1SLionel Sambuc report_return(delwin(win));
2077*11be35a1SLionel Sambuc }
2078*11be35a1SLionel Sambuc
2079*11be35a1SLionel Sambuc
2080*11be35a1SLionel Sambuc void
cmd_derwin(int nargs,char ** args)2081*11be35a1SLionel Sambuc cmd_derwin(int nargs, char **args)
2082*11be35a1SLionel Sambuc {
2083*11be35a1SLionel Sambuc int lines, cols, y, x;
2084*11be35a1SLionel Sambuc WINDOW *win;
2085*11be35a1SLionel Sambuc
2086*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
2087*11be35a1SLionel Sambuc return;
2088*11be35a1SLionel Sambuc
2089*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2090*11be35a1SLionel Sambuc report_count(1);
2091*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2092*11be35a1SLionel Sambuc return;
2093*11be35a1SLionel Sambuc }
2094*11be35a1SLionel Sambuc
2095*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &lines) == 0) {
2096*11be35a1SLionel Sambuc report_count(1);
2097*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2098*11be35a1SLionel Sambuc return;
2099*11be35a1SLionel Sambuc }
2100*11be35a1SLionel Sambuc
2101*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &cols) == 0) {
2102*11be35a1SLionel Sambuc report_count(1);
2103*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2104*11be35a1SLionel Sambuc return;
2105*11be35a1SLionel Sambuc }
2106*11be35a1SLionel Sambuc
2107*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &y) == 0) {
2108*11be35a1SLionel Sambuc report_count(1);
2109*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2110*11be35a1SLionel Sambuc return;
2111*11be35a1SLionel Sambuc }
2112*11be35a1SLionel Sambuc
2113*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &x) == 0) {
2114*11be35a1SLionel Sambuc report_count(1);
2115*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2116*11be35a1SLionel Sambuc return;
2117*11be35a1SLionel Sambuc }
2118*11be35a1SLionel Sambuc
2119*11be35a1SLionel Sambuc report_count(1);
2120*11be35a1SLionel Sambuc report_ptr(derwin(win, lines, cols, y, x));
2121*11be35a1SLionel Sambuc }
2122*11be35a1SLionel Sambuc
2123*11be35a1SLionel Sambuc
2124*11be35a1SLionel Sambuc void
cmd_dupwin(int nargs,char ** args)2125*11be35a1SLionel Sambuc cmd_dupwin(int nargs, char **args)
2126*11be35a1SLionel Sambuc {
2127*11be35a1SLionel Sambuc WINDOW *win;
2128*11be35a1SLionel Sambuc
2129*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2130*11be35a1SLionel Sambuc return;
2131*11be35a1SLionel Sambuc
2132*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2133*11be35a1SLionel Sambuc report_count(1);
2134*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2135*11be35a1SLionel Sambuc return;
2136*11be35a1SLionel Sambuc }
2137*11be35a1SLionel Sambuc
2138*11be35a1SLionel Sambuc report_count(1);
2139*11be35a1SLionel Sambuc report_ptr(dupwin(win));
2140*11be35a1SLionel Sambuc }
2141*11be35a1SLionel Sambuc
2142*11be35a1SLionel Sambuc
2143*11be35a1SLionel Sambuc void
cmd_doupdate(int nargs,char ** args)2144*11be35a1SLionel Sambuc cmd_doupdate(int nargs, char **args)
2145*11be35a1SLionel Sambuc {
2146*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2147*11be35a1SLionel Sambuc return;
2148*11be35a1SLionel Sambuc
2149*11be35a1SLionel Sambuc /* XXX - implicit refresh */
2150*11be35a1SLionel Sambuc report_count(1);
2151*11be35a1SLionel Sambuc report_return(doupdate());
2152*11be35a1SLionel Sambuc }
2153*11be35a1SLionel Sambuc
2154*11be35a1SLionel Sambuc
2155*11be35a1SLionel Sambuc void
cmd_echo(int nargs,char ** args)2156*11be35a1SLionel Sambuc cmd_echo(int nargs, char **args)
2157*11be35a1SLionel Sambuc {
2158*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2159*11be35a1SLionel Sambuc return;
2160*11be35a1SLionel Sambuc
2161*11be35a1SLionel Sambuc report_count(1);
2162*11be35a1SLionel Sambuc report_return(echo());
2163*11be35a1SLionel Sambuc }
2164*11be35a1SLionel Sambuc
2165*11be35a1SLionel Sambuc
2166*11be35a1SLionel Sambuc void
cmd_endwin(int nargs,char ** args)2167*11be35a1SLionel Sambuc cmd_endwin(int nargs, char **args)
2168*11be35a1SLionel Sambuc {
2169*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2170*11be35a1SLionel Sambuc return;
2171*11be35a1SLionel Sambuc
2172*11be35a1SLionel Sambuc report_count(1);
2173*11be35a1SLionel Sambuc report_return(endwin());
2174*11be35a1SLionel Sambuc }
2175*11be35a1SLionel Sambuc
2176*11be35a1SLionel Sambuc
2177*11be35a1SLionel Sambuc void
cmd_erasechar(int nargs,char ** args)2178*11be35a1SLionel Sambuc cmd_erasechar(int nargs, char **args)
2179*11be35a1SLionel Sambuc {
2180*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2181*11be35a1SLionel Sambuc return;
2182*11be35a1SLionel Sambuc
2183*11be35a1SLionel Sambuc report_count(1);
2184*11be35a1SLionel Sambuc report_int(erasechar());
2185*11be35a1SLionel Sambuc }
2186*11be35a1SLionel Sambuc
2187*11be35a1SLionel Sambuc
2188*11be35a1SLionel Sambuc void
cmd_flash(int nargs,char ** args)2189*11be35a1SLionel Sambuc cmd_flash(int nargs, char **args)
2190*11be35a1SLionel Sambuc {
2191*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2192*11be35a1SLionel Sambuc return;
2193*11be35a1SLionel Sambuc
2194*11be35a1SLionel Sambuc report_count(1);
2195*11be35a1SLionel Sambuc report_return(flash());
2196*11be35a1SLionel Sambuc }
2197*11be35a1SLionel Sambuc
2198*11be35a1SLionel Sambuc
2199*11be35a1SLionel Sambuc void
cmd_flushinp(int nargs,char ** args)2200*11be35a1SLionel Sambuc cmd_flushinp(int nargs, char **args)
2201*11be35a1SLionel Sambuc {
2202*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2203*11be35a1SLionel Sambuc return;
2204*11be35a1SLionel Sambuc
2205*11be35a1SLionel Sambuc report_count(1);
2206*11be35a1SLionel Sambuc report_return(flushinp());
2207*11be35a1SLionel Sambuc }
2208*11be35a1SLionel Sambuc
2209*11be35a1SLionel Sambuc
2210*11be35a1SLionel Sambuc void
cmd_flushok(int nargs,char ** args)2211*11be35a1SLionel Sambuc cmd_flushok(int nargs, char **args)
2212*11be35a1SLionel Sambuc {
2213*11be35a1SLionel Sambuc int flag;
2214*11be35a1SLionel Sambuc WINDOW *win;
2215*11be35a1SLionel Sambuc
2216*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2217*11be35a1SLionel Sambuc return;
2218*11be35a1SLionel Sambuc
2219*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2220*11be35a1SLionel Sambuc report_count(1);
2221*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2222*11be35a1SLionel Sambuc return;
2223*11be35a1SLionel Sambuc }
2224*11be35a1SLionel Sambuc
2225*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2226*11be35a1SLionel Sambuc report_count(1);
2227*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2228*11be35a1SLionel Sambuc return;
2229*11be35a1SLionel Sambuc }
2230*11be35a1SLionel Sambuc
2231*11be35a1SLionel Sambuc report_count(1);
2232*11be35a1SLionel Sambuc report_return(flushok(win, flag));
2233*11be35a1SLionel Sambuc }
2234*11be35a1SLionel Sambuc
2235*11be35a1SLionel Sambuc
2236*11be35a1SLionel Sambuc void
cmd_fullname(int nargs,char ** args)2237*11be35a1SLionel Sambuc cmd_fullname(int nargs, char **args)
2238*11be35a1SLionel Sambuc {
2239*11be35a1SLionel Sambuc char string[256];
2240*11be35a1SLionel Sambuc
2241*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2242*11be35a1SLionel Sambuc return;
2243*11be35a1SLionel Sambuc
2244*11be35a1SLionel Sambuc /* XXX - call2 */
2245*11be35a1SLionel Sambuc report_count(2);
2246*11be35a1SLionel Sambuc report_status(fullname(args[0], string));
2247*11be35a1SLionel Sambuc report_status(string);
2248*11be35a1SLionel Sambuc }
2249*11be35a1SLionel Sambuc
2250*11be35a1SLionel Sambuc
2251*11be35a1SLionel Sambuc void
cmd_getattrs(int nargs,char ** args)2252*11be35a1SLionel Sambuc cmd_getattrs(int nargs, char **args)
2253*11be35a1SLionel Sambuc {
2254*11be35a1SLionel Sambuc WINDOW *win;
2255*11be35a1SLionel Sambuc
2256*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2257*11be35a1SLionel Sambuc return;
2258*11be35a1SLionel Sambuc
2259*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2260*11be35a1SLionel Sambuc report_count(1);
2261*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2262*11be35a1SLionel Sambuc return;
2263*11be35a1SLionel Sambuc }
2264*11be35a1SLionel Sambuc
2265*11be35a1SLionel Sambuc report_count(1);
2266*11be35a1SLionel Sambuc report_int(getattrs(win));
2267*11be35a1SLionel Sambuc }
2268*11be35a1SLionel Sambuc
2269*11be35a1SLionel Sambuc
2270*11be35a1SLionel Sambuc void
cmd_getbkgd(int nargs,char ** args)2271*11be35a1SLionel Sambuc cmd_getbkgd(int nargs, char **args)
2272*11be35a1SLionel Sambuc {
2273*11be35a1SLionel Sambuc WINDOW *win;
2274*11be35a1SLionel Sambuc
2275*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2276*11be35a1SLionel Sambuc return;
2277*11be35a1SLionel Sambuc
2278*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2279*11be35a1SLionel Sambuc report_count(1);
2280*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2281*11be35a1SLionel Sambuc return;
2282*11be35a1SLionel Sambuc }
2283*11be35a1SLionel Sambuc
2284*11be35a1SLionel Sambuc report_count(1);
2285*11be35a1SLionel Sambuc report_byte(getbkgd(win));
2286*11be35a1SLionel Sambuc }
2287*11be35a1SLionel Sambuc
2288*11be35a1SLionel Sambuc
2289*11be35a1SLionel Sambuc void
cmd_getcury(int nargs,char ** args)2290*11be35a1SLionel Sambuc cmd_getcury(int nargs, char **args)
2291*11be35a1SLionel Sambuc {
2292*11be35a1SLionel Sambuc WINDOW *win;
2293*11be35a1SLionel Sambuc
2294*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2295*11be35a1SLionel Sambuc return;
2296*11be35a1SLionel Sambuc
2297*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2298*11be35a1SLionel Sambuc report_count(1);
2299*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2300*11be35a1SLionel Sambuc return;
2301*11be35a1SLionel Sambuc }
2302*11be35a1SLionel Sambuc
2303*11be35a1SLionel Sambuc report_count(1);
2304*11be35a1SLionel Sambuc report_int(getcury(win));
2305*11be35a1SLionel Sambuc }
2306*11be35a1SLionel Sambuc
2307*11be35a1SLionel Sambuc
2308*11be35a1SLionel Sambuc void
cmd_getcurx(int nargs,char ** args)2309*11be35a1SLionel Sambuc cmd_getcurx(int nargs, char **args)
2310*11be35a1SLionel Sambuc {
2311*11be35a1SLionel Sambuc WINDOW *win;
2312*11be35a1SLionel Sambuc
2313*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2314*11be35a1SLionel Sambuc return;
2315*11be35a1SLionel Sambuc
2316*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2317*11be35a1SLionel Sambuc report_count(1);
2318*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2319*11be35a1SLionel Sambuc return;
2320*11be35a1SLionel Sambuc }
2321*11be35a1SLionel Sambuc
2322*11be35a1SLionel Sambuc report_count(1);
2323*11be35a1SLionel Sambuc report_int(getcurx(win));
2324*11be35a1SLionel Sambuc }
2325*11be35a1SLionel Sambuc
2326*11be35a1SLionel Sambuc
2327*11be35a1SLionel Sambuc void
cmd_getyx(int nargs,char ** args)2328*11be35a1SLionel Sambuc cmd_getyx(int nargs, char **args)
2329*11be35a1SLionel Sambuc {
2330*11be35a1SLionel Sambuc WINDOW *win;
2331*11be35a1SLionel Sambuc int y, x;
2332*11be35a1SLionel Sambuc
2333*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2334*11be35a1SLionel Sambuc return;
2335*11be35a1SLionel Sambuc
2336*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2337*11be35a1SLionel Sambuc report_count(1);
2338*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2339*11be35a1SLionel Sambuc return;
2340*11be35a1SLionel Sambuc }
2341*11be35a1SLionel Sambuc
2342*11be35a1SLionel Sambuc getyx(win, y, x);
2343*11be35a1SLionel Sambuc report_count(2);
2344*11be35a1SLionel Sambuc report_int(y);
2345*11be35a1SLionel Sambuc report_int(x);
2346*11be35a1SLionel Sambuc }
2347*11be35a1SLionel Sambuc
2348*11be35a1SLionel Sambuc
2349*11be35a1SLionel Sambuc void
cmd_getbegy(int nargs,char ** args)2350*11be35a1SLionel Sambuc cmd_getbegy(int nargs, char **args)
2351*11be35a1SLionel Sambuc {
2352*11be35a1SLionel Sambuc WINDOW *win;
2353*11be35a1SLionel Sambuc
2354*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2355*11be35a1SLionel Sambuc return;
2356*11be35a1SLionel Sambuc
2357*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2358*11be35a1SLionel Sambuc report_count(1);
2359*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2360*11be35a1SLionel Sambuc return;
2361*11be35a1SLionel Sambuc }
2362*11be35a1SLionel Sambuc
2363*11be35a1SLionel Sambuc report_count(1);
2364*11be35a1SLionel Sambuc report_int(getbegy(win));
2365*11be35a1SLionel Sambuc }
2366*11be35a1SLionel Sambuc
2367*11be35a1SLionel Sambuc
2368*11be35a1SLionel Sambuc void
cmd_getbegx(int nargs,char ** args)2369*11be35a1SLionel Sambuc cmd_getbegx(int nargs, char **args)
2370*11be35a1SLionel Sambuc {
2371*11be35a1SLionel Sambuc WINDOW *win;
2372*11be35a1SLionel Sambuc
2373*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2374*11be35a1SLionel Sambuc return;
2375*11be35a1SLionel Sambuc
2376*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2377*11be35a1SLionel Sambuc report_count(1);
2378*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2379*11be35a1SLionel Sambuc return;
2380*11be35a1SLionel Sambuc }
2381*11be35a1SLionel Sambuc
2382*11be35a1SLionel Sambuc report_count(1);
2383*11be35a1SLionel Sambuc report_int(getbegx(win));
2384*11be35a1SLionel Sambuc }
2385*11be35a1SLionel Sambuc
2386*11be35a1SLionel Sambuc
2387*11be35a1SLionel Sambuc void
cmd_getmaxy(int nargs,char ** args)2388*11be35a1SLionel Sambuc cmd_getmaxy(int nargs, char **args)
2389*11be35a1SLionel Sambuc {
2390*11be35a1SLionel Sambuc WINDOW *win;
2391*11be35a1SLionel Sambuc
2392*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2393*11be35a1SLionel Sambuc return;
2394*11be35a1SLionel Sambuc
2395*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2396*11be35a1SLionel Sambuc report_count(1);
2397*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2398*11be35a1SLionel Sambuc return;
2399*11be35a1SLionel Sambuc }
2400*11be35a1SLionel Sambuc
2401*11be35a1SLionel Sambuc report_count(1);
2402*11be35a1SLionel Sambuc report_int(getmaxy(win));
2403*11be35a1SLionel Sambuc }
2404*11be35a1SLionel Sambuc
2405*11be35a1SLionel Sambuc
2406*11be35a1SLionel Sambuc void
cmd_getmaxx(int nargs,char ** args)2407*11be35a1SLionel Sambuc cmd_getmaxx(int nargs, char **args)
2408*11be35a1SLionel Sambuc {
2409*11be35a1SLionel Sambuc WINDOW *win;
2410*11be35a1SLionel Sambuc
2411*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2412*11be35a1SLionel Sambuc return;
2413*11be35a1SLionel Sambuc
2414*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2415*11be35a1SLionel Sambuc report_count(1);
2416*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2417*11be35a1SLionel Sambuc return;
2418*11be35a1SLionel Sambuc }
2419*11be35a1SLionel Sambuc
2420*11be35a1SLionel Sambuc report_count(1);
2421*11be35a1SLionel Sambuc report_int(getmaxx(win));
2422*11be35a1SLionel Sambuc }
2423*11be35a1SLionel Sambuc
2424*11be35a1SLionel Sambuc
2425*11be35a1SLionel Sambuc void
cmd_getpary(int nargs,char ** args)2426*11be35a1SLionel Sambuc cmd_getpary(int nargs, char **args)
2427*11be35a1SLionel Sambuc {
2428*11be35a1SLionel Sambuc WINDOW *win;
2429*11be35a1SLionel Sambuc
2430*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2431*11be35a1SLionel Sambuc return;
2432*11be35a1SLionel Sambuc
2433*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2434*11be35a1SLionel Sambuc report_count(1);
2435*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2436*11be35a1SLionel Sambuc return;
2437*11be35a1SLionel Sambuc }
2438*11be35a1SLionel Sambuc
2439*11be35a1SLionel Sambuc report_count(1);
2440*11be35a1SLionel Sambuc report_int(getpary(win));
2441*11be35a1SLionel Sambuc }
2442*11be35a1SLionel Sambuc
2443*11be35a1SLionel Sambuc
2444*11be35a1SLionel Sambuc void
cmd_getparx(int nargs,char ** args)2445*11be35a1SLionel Sambuc cmd_getparx(int nargs, char **args)
2446*11be35a1SLionel Sambuc {
2447*11be35a1SLionel Sambuc WINDOW *win;
2448*11be35a1SLionel Sambuc
2449*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2450*11be35a1SLionel Sambuc return;
2451*11be35a1SLionel Sambuc
2452*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2453*11be35a1SLionel Sambuc report_count(1);
2454*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2455*11be35a1SLionel Sambuc return;
2456*11be35a1SLionel Sambuc }
2457*11be35a1SLionel Sambuc
2458*11be35a1SLionel Sambuc report_count(1);
2459*11be35a1SLionel Sambuc report_int(getparx(win));
2460*11be35a1SLionel Sambuc }
2461*11be35a1SLionel Sambuc
2462*11be35a1SLionel Sambuc
2463*11be35a1SLionel Sambuc void
cmd_getparyx(int nargs,char ** args)2464*11be35a1SLionel Sambuc cmd_getparyx(int nargs, char **args)
2465*11be35a1SLionel Sambuc {
2466*11be35a1SLionel Sambuc WINDOW *win;
2467*11be35a1SLionel Sambuc int y, x;
2468*11be35a1SLionel Sambuc
2469*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2470*11be35a1SLionel Sambuc return;
2471*11be35a1SLionel Sambuc
2472*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2473*11be35a1SLionel Sambuc report_count(1);
2474*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2475*11be35a1SLionel Sambuc return;
2476*11be35a1SLionel Sambuc }
2477*11be35a1SLionel Sambuc
2478*11be35a1SLionel Sambuc report_count(2);
2479*11be35a1SLionel Sambuc getparyx(win, y, x);
2480*11be35a1SLionel Sambuc report_int(y);
2481*11be35a1SLionel Sambuc report_int(x);
2482*11be35a1SLionel Sambuc }
2483*11be35a1SLionel Sambuc
2484*11be35a1SLionel Sambuc
2485*11be35a1SLionel Sambuc void
cmd_gettmode(int nargs,char ** args)2486*11be35a1SLionel Sambuc cmd_gettmode(int nargs, char **args)
2487*11be35a1SLionel Sambuc {
2488*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2489*11be35a1SLionel Sambuc return;
2490*11be35a1SLionel Sambuc
2491*11be35a1SLionel Sambuc report_count(1);
2492*11be35a1SLionel Sambuc report_return(gettmode());
2493*11be35a1SLionel Sambuc }
2494*11be35a1SLionel Sambuc
2495*11be35a1SLionel Sambuc
2496*11be35a1SLionel Sambuc void
cmd_getwin(int nargs,char ** args)2497*11be35a1SLionel Sambuc cmd_getwin(int nargs, char **args)
2498*11be35a1SLionel Sambuc {
2499*11be35a1SLionel Sambuc FILE *fp;
2500*11be35a1SLionel Sambuc
2501*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2502*11be35a1SLionel Sambuc return;
2503*11be35a1SLionel Sambuc
2504*11be35a1SLionel Sambuc if ((fp = fopen(args[0], "r")) == NULL) {
2505*11be35a1SLionel Sambuc report_count(1);
2506*11be35a1SLionel Sambuc report_error("BAD FILE_ARGUMENT");
2507*11be35a1SLionel Sambuc return;
2508*11be35a1SLionel Sambuc }
2509*11be35a1SLionel Sambuc
2510*11be35a1SLionel Sambuc report_count(1);
2511*11be35a1SLionel Sambuc report_ptr(getwin(fp));
2512*11be35a1SLionel Sambuc fclose(fp);
2513*11be35a1SLionel Sambuc }
2514*11be35a1SLionel Sambuc
2515*11be35a1SLionel Sambuc
2516*11be35a1SLionel Sambuc void
cmd_halfdelay(int nargs,char ** args)2517*11be35a1SLionel Sambuc cmd_halfdelay(int nargs, char **args)
2518*11be35a1SLionel Sambuc {
2519*11be35a1SLionel Sambuc int ms;
2520*11be35a1SLionel Sambuc
2521*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2522*11be35a1SLionel Sambuc return;
2523*11be35a1SLionel Sambuc
2524*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &ms) == 0) {
2525*11be35a1SLionel Sambuc report_count(1);
2526*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2527*11be35a1SLionel Sambuc return;
2528*11be35a1SLionel Sambuc }
2529*11be35a1SLionel Sambuc
2530*11be35a1SLionel Sambuc report_count(1);
2531*11be35a1SLionel Sambuc report_return(halfdelay(ms));
2532*11be35a1SLionel Sambuc }
2533*11be35a1SLionel Sambuc
2534*11be35a1SLionel Sambuc
2535*11be35a1SLionel Sambuc void
cmd_has_colors(int nargs,char ** args)2536*11be35a1SLionel Sambuc cmd_has_colors(int nargs, char **args)
2537*11be35a1SLionel Sambuc {
2538*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2539*11be35a1SLionel Sambuc return;
2540*11be35a1SLionel Sambuc
2541*11be35a1SLionel Sambuc report_count(1);
2542*11be35a1SLionel Sambuc report_int(has_colors());
2543*11be35a1SLionel Sambuc }
2544*11be35a1SLionel Sambuc
2545*11be35a1SLionel Sambuc
2546*11be35a1SLionel Sambuc void
cmd_has_ic(int nargs,char ** args)2547*11be35a1SLionel Sambuc cmd_has_ic(int nargs, char **args)
2548*11be35a1SLionel Sambuc {
2549*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2550*11be35a1SLionel Sambuc return;
2551*11be35a1SLionel Sambuc
2552*11be35a1SLionel Sambuc report_count(1);
2553*11be35a1SLionel Sambuc report_int(has_ic());
2554*11be35a1SLionel Sambuc }
2555*11be35a1SLionel Sambuc
2556*11be35a1SLionel Sambuc
2557*11be35a1SLionel Sambuc void
cmd_has_il(int nargs,char ** args)2558*11be35a1SLionel Sambuc cmd_has_il(int nargs, char **args)
2559*11be35a1SLionel Sambuc {
2560*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2561*11be35a1SLionel Sambuc return;
2562*11be35a1SLionel Sambuc
2563*11be35a1SLionel Sambuc report_count(1);
2564*11be35a1SLionel Sambuc report_int(has_il());
2565*11be35a1SLionel Sambuc }
2566*11be35a1SLionel Sambuc
2567*11be35a1SLionel Sambuc
2568*11be35a1SLionel Sambuc void
cmd_hline(int nargs,char ** args)2569*11be35a1SLionel Sambuc cmd_hline(int nargs, char **args)
2570*11be35a1SLionel Sambuc {
2571*11be35a1SLionel Sambuc int count;
2572*11be35a1SLionel Sambuc chtype *ch;
2573*11be35a1SLionel Sambuc
2574*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2575*11be35a1SLionel Sambuc return;
2576*11be35a1SLionel Sambuc
2577*11be35a1SLionel Sambuc ch = (chtype *) args[0];
2578*11be35a1SLionel Sambuc
2579*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
2580*11be35a1SLionel Sambuc report_count(1);
2581*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2582*11be35a1SLionel Sambuc return;
2583*11be35a1SLionel Sambuc }
2584*11be35a1SLionel Sambuc
2585*11be35a1SLionel Sambuc report_count(1);
2586*11be35a1SLionel Sambuc report_return(hline(ch[0], count));
2587*11be35a1SLionel Sambuc }
2588*11be35a1SLionel Sambuc
2589*11be35a1SLionel Sambuc
2590*11be35a1SLionel Sambuc void
cmd_idcok(int nargs,char ** args)2591*11be35a1SLionel Sambuc cmd_idcok(int nargs, char **args)
2592*11be35a1SLionel Sambuc {
2593*11be35a1SLionel Sambuc int flag;
2594*11be35a1SLionel Sambuc WINDOW *win;
2595*11be35a1SLionel Sambuc
2596*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2597*11be35a1SLionel Sambuc return;
2598*11be35a1SLionel Sambuc
2599*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2600*11be35a1SLionel Sambuc report_count(1);
2601*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2602*11be35a1SLionel Sambuc return;
2603*11be35a1SLionel Sambuc }
2604*11be35a1SLionel Sambuc
2605*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2606*11be35a1SLionel Sambuc report_count(1);
2607*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2608*11be35a1SLionel Sambuc return;
2609*11be35a1SLionel Sambuc }
2610*11be35a1SLionel Sambuc
2611*11be35a1SLionel Sambuc report_count(1);
2612*11be35a1SLionel Sambuc report_return(idcok(win, flag));
2613*11be35a1SLionel Sambuc }
2614*11be35a1SLionel Sambuc
2615*11be35a1SLionel Sambuc
2616*11be35a1SLionel Sambuc void
cmd_idlok(int nargs,char ** args)2617*11be35a1SLionel Sambuc cmd_idlok(int nargs, char **args)
2618*11be35a1SLionel Sambuc {
2619*11be35a1SLionel Sambuc int flag;
2620*11be35a1SLionel Sambuc WINDOW *win;
2621*11be35a1SLionel Sambuc
2622*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2623*11be35a1SLionel Sambuc return;
2624*11be35a1SLionel Sambuc
2625*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2626*11be35a1SLionel Sambuc report_count(1);
2627*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2628*11be35a1SLionel Sambuc return;
2629*11be35a1SLionel Sambuc }
2630*11be35a1SLionel Sambuc
2631*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2632*11be35a1SLionel Sambuc report_count(1);
2633*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2634*11be35a1SLionel Sambuc return;
2635*11be35a1SLionel Sambuc }
2636*11be35a1SLionel Sambuc
2637*11be35a1SLionel Sambuc report_count(1);
2638*11be35a1SLionel Sambuc report_return(idlok(win, flag));
2639*11be35a1SLionel Sambuc }
2640*11be35a1SLionel Sambuc
2641*11be35a1SLionel Sambuc
2642*11be35a1SLionel Sambuc void
cmd_init_color(int nargs,char ** args)2643*11be35a1SLionel Sambuc cmd_init_color(int nargs, char **args)
2644*11be35a1SLionel Sambuc {
2645*11be35a1SLionel Sambuc short colour, red, green, blue;
2646*11be35a1SLionel Sambuc
2647*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
2648*11be35a1SLionel Sambuc return;
2649*11be35a1SLionel Sambuc
2650*11be35a1SLionel Sambuc if (sscanf(args[0], "%hd", &colour) == 0) {
2651*11be35a1SLionel Sambuc report_count(1);
2652*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2653*11be35a1SLionel Sambuc return;
2654*11be35a1SLionel Sambuc }
2655*11be35a1SLionel Sambuc
2656*11be35a1SLionel Sambuc if (sscanf(args[1], "%hd", &red) == 0) {
2657*11be35a1SLionel Sambuc report_count(1);
2658*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2659*11be35a1SLionel Sambuc return;
2660*11be35a1SLionel Sambuc }
2661*11be35a1SLionel Sambuc
2662*11be35a1SLionel Sambuc if (sscanf(args[2], "%hd", &green) == 0) {
2663*11be35a1SLionel Sambuc report_count(1);
2664*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2665*11be35a1SLionel Sambuc return;
2666*11be35a1SLionel Sambuc }
2667*11be35a1SLionel Sambuc
2668*11be35a1SLionel Sambuc if (sscanf(args[3], "%hd", &blue) == 0) {
2669*11be35a1SLionel Sambuc report_count(1);
2670*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2671*11be35a1SLionel Sambuc return;
2672*11be35a1SLionel Sambuc }
2673*11be35a1SLionel Sambuc
2674*11be35a1SLionel Sambuc report_count(1);
2675*11be35a1SLionel Sambuc report_return(init_color(colour, red, green, blue));
2676*11be35a1SLionel Sambuc }
2677*11be35a1SLionel Sambuc
2678*11be35a1SLionel Sambuc
2679*11be35a1SLionel Sambuc void
cmd_init_pair(int nargs,char ** args)2680*11be35a1SLionel Sambuc cmd_init_pair(int nargs, char **args)
2681*11be35a1SLionel Sambuc {
2682*11be35a1SLionel Sambuc short pair, fore, back;
2683*11be35a1SLionel Sambuc
2684*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
2685*11be35a1SLionel Sambuc return;
2686*11be35a1SLionel Sambuc
2687*11be35a1SLionel Sambuc if (sscanf(args[0], "%hd", &pair) == 0) {
2688*11be35a1SLionel Sambuc report_count(1);
2689*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2690*11be35a1SLionel Sambuc return;
2691*11be35a1SLionel Sambuc }
2692*11be35a1SLionel Sambuc
2693*11be35a1SLionel Sambuc if (sscanf(args[1], "%hd", &fore) == 0) {
2694*11be35a1SLionel Sambuc report_count(1);
2695*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2696*11be35a1SLionel Sambuc return;
2697*11be35a1SLionel Sambuc }
2698*11be35a1SLionel Sambuc
2699*11be35a1SLionel Sambuc if (sscanf(args[2], "%hd", &back) == 0) {
2700*11be35a1SLionel Sambuc report_count(1);
2701*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2702*11be35a1SLionel Sambuc return;
2703*11be35a1SLionel Sambuc }
2704*11be35a1SLionel Sambuc
2705*11be35a1SLionel Sambuc report_count(1);
2706*11be35a1SLionel Sambuc report_return(init_pair(pair, fore, back));
2707*11be35a1SLionel Sambuc }
2708*11be35a1SLionel Sambuc
2709*11be35a1SLionel Sambuc
2710*11be35a1SLionel Sambuc void
cmd_initscr(int nargs,char ** args)2711*11be35a1SLionel Sambuc cmd_initscr(int nargs, char **args)
2712*11be35a1SLionel Sambuc {
2713*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2714*11be35a1SLionel Sambuc return;
2715*11be35a1SLionel Sambuc
2716*11be35a1SLionel Sambuc report_count(1);
2717*11be35a1SLionel Sambuc report_ptr(initscr());
2718*11be35a1SLionel Sambuc }
2719*11be35a1SLionel Sambuc
2720*11be35a1SLionel Sambuc
2721*11be35a1SLionel Sambuc void
cmd_intrflush(int nargs,char ** args)2722*11be35a1SLionel Sambuc cmd_intrflush(int nargs, char **args)
2723*11be35a1SLionel Sambuc {
2724*11be35a1SLionel Sambuc int flag;
2725*11be35a1SLionel Sambuc WINDOW *win;
2726*11be35a1SLionel Sambuc
2727*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2728*11be35a1SLionel Sambuc return;
2729*11be35a1SLionel Sambuc
2730*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2731*11be35a1SLionel Sambuc report_count(1);
2732*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2733*11be35a1SLionel Sambuc return;
2734*11be35a1SLionel Sambuc }
2735*11be35a1SLionel Sambuc
2736*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2737*11be35a1SLionel Sambuc report_count(1);
2738*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2739*11be35a1SLionel Sambuc return;
2740*11be35a1SLionel Sambuc }
2741*11be35a1SLionel Sambuc
2742*11be35a1SLionel Sambuc report_count(1);
2743*11be35a1SLionel Sambuc report_return(intrflush(win, flag));
2744*11be35a1SLionel Sambuc }
2745*11be35a1SLionel Sambuc
2746*11be35a1SLionel Sambuc
2747*11be35a1SLionel Sambuc void
cmd_isendwin(int nargs,char ** args)2748*11be35a1SLionel Sambuc cmd_isendwin(int nargs, char **args)
2749*11be35a1SLionel Sambuc {
2750*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2751*11be35a1SLionel Sambuc return;
2752*11be35a1SLionel Sambuc
2753*11be35a1SLionel Sambuc report_count(1);
2754*11be35a1SLionel Sambuc report_int(isendwin());
2755*11be35a1SLionel Sambuc }
2756*11be35a1SLionel Sambuc
2757*11be35a1SLionel Sambuc
2758*11be35a1SLionel Sambuc void
cmd_is_linetouched(int nargs,char ** args)2759*11be35a1SLionel Sambuc cmd_is_linetouched(int nargs, char **args)
2760*11be35a1SLionel Sambuc {
2761*11be35a1SLionel Sambuc int line;
2762*11be35a1SLionel Sambuc WINDOW *win;
2763*11be35a1SLionel Sambuc
2764*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2765*11be35a1SLionel Sambuc return;
2766*11be35a1SLionel Sambuc
2767*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2768*11be35a1SLionel Sambuc report_count(1);
2769*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2770*11be35a1SLionel Sambuc return;
2771*11be35a1SLionel Sambuc }
2772*11be35a1SLionel Sambuc
2773*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &line) == 0) {
2774*11be35a1SLionel Sambuc report_count(1);
2775*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2776*11be35a1SLionel Sambuc return;
2777*11be35a1SLionel Sambuc }
2778*11be35a1SLionel Sambuc
2779*11be35a1SLionel Sambuc report_count(1);
2780*11be35a1SLionel Sambuc report_int(is_linetouched(win, line));
2781*11be35a1SLionel Sambuc }
2782*11be35a1SLionel Sambuc
2783*11be35a1SLionel Sambuc
2784*11be35a1SLionel Sambuc void
cmd_is_wintouched(int nargs,char ** args)2785*11be35a1SLionel Sambuc cmd_is_wintouched(int nargs, char **args)
2786*11be35a1SLionel Sambuc {
2787*11be35a1SLionel Sambuc WINDOW *win;
2788*11be35a1SLionel Sambuc
2789*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2790*11be35a1SLionel Sambuc return;
2791*11be35a1SLionel Sambuc
2792*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2793*11be35a1SLionel Sambuc report_count(1);
2794*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2795*11be35a1SLionel Sambuc return;
2796*11be35a1SLionel Sambuc }
2797*11be35a1SLionel Sambuc
2798*11be35a1SLionel Sambuc report_count(1);
2799*11be35a1SLionel Sambuc report_int(is_wintouched(win));
2800*11be35a1SLionel Sambuc }
2801*11be35a1SLionel Sambuc
2802*11be35a1SLionel Sambuc
2803*11be35a1SLionel Sambuc void
cmd_keyok(int nargs,char ** args)2804*11be35a1SLionel Sambuc cmd_keyok(int nargs, char **args)
2805*11be35a1SLionel Sambuc {
2806*11be35a1SLionel Sambuc int keysym, flag;
2807*11be35a1SLionel Sambuc
2808*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2809*11be35a1SLionel Sambuc return;
2810*11be35a1SLionel Sambuc
2811*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &keysym) == 0) {
2812*11be35a1SLionel Sambuc report_count(1);
2813*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2814*11be35a1SLionel Sambuc return;
2815*11be35a1SLionel Sambuc }
2816*11be35a1SLionel Sambuc
2817*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2818*11be35a1SLionel Sambuc report_count(1);
2819*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2820*11be35a1SLionel Sambuc return;
2821*11be35a1SLionel Sambuc }
2822*11be35a1SLionel Sambuc
2823*11be35a1SLionel Sambuc report_count(1);
2824*11be35a1SLionel Sambuc report_return(keyok(keysym, flag));
2825*11be35a1SLionel Sambuc }
2826*11be35a1SLionel Sambuc
2827*11be35a1SLionel Sambuc
2828*11be35a1SLionel Sambuc void
cmd_keypad(int nargs,char ** args)2829*11be35a1SLionel Sambuc cmd_keypad(int nargs, char **args)
2830*11be35a1SLionel Sambuc {
2831*11be35a1SLionel Sambuc int flag;
2832*11be35a1SLionel Sambuc WINDOW *win;
2833*11be35a1SLionel Sambuc
2834*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2835*11be35a1SLionel Sambuc return;
2836*11be35a1SLionel Sambuc
2837*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2838*11be35a1SLionel Sambuc report_count(1);
2839*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2840*11be35a1SLionel Sambuc return;
2841*11be35a1SLionel Sambuc }
2842*11be35a1SLionel Sambuc
2843*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2844*11be35a1SLionel Sambuc report_count(1);
2845*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2846*11be35a1SLionel Sambuc return;
2847*11be35a1SLionel Sambuc }
2848*11be35a1SLionel Sambuc
2849*11be35a1SLionel Sambuc report_count(1);
2850*11be35a1SLionel Sambuc report_return(keypad(win, flag));
2851*11be35a1SLionel Sambuc }
2852*11be35a1SLionel Sambuc
2853*11be35a1SLionel Sambuc
2854*11be35a1SLionel Sambuc void
cmd_keyname(int nargs,char ** args)2855*11be35a1SLionel Sambuc cmd_keyname(int nargs, char **args)
2856*11be35a1SLionel Sambuc {
2857*11be35a1SLionel Sambuc unsigned int key;
2858*11be35a1SLionel Sambuc
2859*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
2860*11be35a1SLionel Sambuc return;
2861*11be35a1SLionel Sambuc
2862*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &key) == 0) {
2863*11be35a1SLionel Sambuc report_count(1);
2864*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2865*11be35a1SLionel Sambuc return;
2866*11be35a1SLionel Sambuc }
2867*11be35a1SLionel Sambuc
2868*11be35a1SLionel Sambuc report_count(1);
2869*11be35a1SLionel Sambuc report_status(keyname(key));
2870*11be35a1SLionel Sambuc }
2871*11be35a1SLionel Sambuc
2872*11be35a1SLionel Sambuc
2873*11be35a1SLionel Sambuc void
cmd_killchar(int nargs,char ** args)2874*11be35a1SLionel Sambuc cmd_killchar(int nargs, char **args)
2875*11be35a1SLionel Sambuc {
2876*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
2877*11be35a1SLionel Sambuc return;
2878*11be35a1SLionel Sambuc
2879*11be35a1SLionel Sambuc report_count(1);
2880*11be35a1SLionel Sambuc report_int(killchar());
2881*11be35a1SLionel Sambuc }
2882*11be35a1SLionel Sambuc
2883*11be35a1SLionel Sambuc
2884*11be35a1SLionel Sambuc void
cmd_leaveok(int nargs,char ** args)2885*11be35a1SLionel Sambuc cmd_leaveok(int nargs, char **args)
2886*11be35a1SLionel Sambuc {
2887*11be35a1SLionel Sambuc int flag;
2888*11be35a1SLionel Sambuc WINDOW *win;
2889*11be35a1SLionel Sambuc
2890*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2891*11be35a1SLionel Sambuc return;
2892*11be35a1SLionel Sambuc
2893*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2894*11be35a1SLionel Sambuc report_count(1);
2895*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2896*11be35a1SLionel Sambuc return;
2897*11be35a1SLionel Sambuc }
2898*11be35a1SLionel Sambuc
2899*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2900*11be35a1SLionel Sambuc report_count(1);
2901*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2902*11be35a1SLionel Sambuc return;
2903*11be35a1SLionel Sambuc }
2904*11be35a1SLionel Sambuc
2905*11be35a1SLionel Sambuc report_count(1);
2906*11be35a1SLionel Sambuc report_return(leaveok(win, flag));
2907*11be35a1SLionel Sambuc }
2908*11be35a1SLionel Sambuc
2909*11be35a1SLionel Sambuc
2910*11be35a1SLionel Sambuc void
cmd_meta(int nargs,char ** args)2911*11be35a1SLionel Sambuc cmd_meta(int nargs, char **args)
2912*11be35a1SLionel Sambuc {
2913*11be35a1SLionel Sambuc int flag;
2914*11be35a1SLionel Sambuc WINDOW *win;
2915*11be35a1SLionel Sambuc
2916*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
2917*11be35a1SLionel Sambuc return;
2918*11be35a1SLionel Sambuc
2919*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2920*11be35a1SLionel Sambuc report_count(1);
2921*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2922*11be35a1SLionel Sambuc return;
2923*11be35a1SLionel Sambuc }
2924*11be35a1SLionel Sambuc
2925*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
2926*11be35a1SLionel Sambuc report_count(1);
2927*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2928*11be35a1SLionel Sambuc return;
2929*11be35a1SLionel Sambuc }
2930*11be35a1SLionel Sambuc
2931*11be35a1SLionel Sambuc report_count(1);
2932*11be35a1SLionel Sambuc report_return(meta(win, flag));
2933*11be35a1SLionel Sambuc }
2934*11be35a1SLionel Sambuc
2935*11be35a1SLionel Sambuc
2936*11be35a1SLionel Sambuc void
cmd_mvcur(int nargs,char ** args)2937*11be35a1SLionel Sambuc cmd_mvcur(int nargs, char **args)
2938*11be35a1SLionel Sambuc {
2939*11be35a1SLionel Sambuc int oldy, oldx, y, x;
2940*11be35a1SLionel Sambuc
2941*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
2942*11be35a1SLionel Sambuc return;
2943*11be35a1SLionel Sambuc
2944*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &oldy) == 0) {
2945*11be35a1SLionel Sambuc report_count(1);
2946*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2947*11be35a1SLionel Sambuc return;
2948*11be35a1SLionel Sambuc }
2949*11be35a1SLionel Sambuc
2950*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &oldx) == 0) {
2951*11be35a1SLionel Sambuc report_count(1);
2952*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2953*11be35a1SLionel Sambuc return;
2954*11be35a1SLionel Sambuc }
2955*11be35a1SLionel Sambuc
2956*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &y) == 0) {
2957*11be35a1SLionel Sambuc report_count(1);
2958*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2959*11be35a1SLionel Sambuc return;
2960*11be35a1SLionel Sambuc }
2961*11be35a1SLionel Sambuc
2962*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &x) == 0) {
2963*11be35a1SLionel Sambuc report_count(1);
2964*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2965*11be35a1SLionel Sambuc return;
2966*11be35a1SLionel Sambuc }
2967*11be35a1SLionel Sambuc
2968*11be35a1SLionel Sambuc report_count(1);
2969*11be35a1SLionel Sambuc report_return(mvcur(oldy, oldx, y, x));
2970*11be35a1SLionel Sambuc }
2971*11be35a1SLionel Sambuc
2972*11be35a1SLionel Sambuc
2973*11be35a1SLionel Sambuc void
cmd_mvderwin(int nargs,char ** args)2974*11be35a1SLionel Sambuc cmd_mvderwin(int nargs, char **args)
2975*11be35a1SLionel Sambuc {
2976*11be35a1SLionel Sambuc int y, x;
2977*11be35a1SLionel Sambuc WINDOW *win;
2978*11be35a1SLionel Sambuc
2979*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
2980*11be35a1SLionel Sambuc return;
2981*11be35a1SLionel Sambuc
2982*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
2983*11be35a1SLionel Sambuc report_count(1);
2984*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2985*11be35a1SLionel Sambuc return;
2986*11be35a1SLionel Sambuc }
2987*11be35a1SLionel Sambuc
2988*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
2989*11be35a1SLionel Sambuc report_count(1);
2990*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2991*11be35a1SLionel Sambuc return;
2992*11be35a1SLionel Sambuc }
2993*11be35a1SLionel Sambuc
2994*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
2995*11be35a1SLionel Sambuc report_count(1);
2996*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
2997*11be35a1SLionel Sambuc return;
2998*11be35a1SLionel Sambuc }
2999*11be35a1SLionel Sambuc
3000*11be35a1SLionel Sambuc report_count(1);
3001*11be35a1SLionel Sambuc report_return(mvderwin(win, y, x));
3002*11be35a1SLionel Sambuc }
3003*11be35a1SLionel Sambuc
3004*11be35a1SLionel Sambuc
3005*11be35a1SLionel Sambuc void
cmd_mvhline(int nargs,char ** args)3006*11be35a1SLionel Sambuc cmd_mvhline(int nargs, char **args)
3007*11be35a1SLionel Sambuc {
3008*11be35a1SLionel Sambuc int y, x, n;
3009*11be35a1SLionel Sambuc chtype *ch;
3010*11be35a1SLionel Sambuc
3011*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3012*11be35a1SLionel Sambuc return;
3013*11be35a1SLionel Sambuc
3014*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
3015*11be35a1SLionel Sambuc report_count(1);
3016*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3017*11be35a1SLionel Sambuc return;
3018*11be35a1SLionel Sambuc }
3019*11be35a1SLionel Sambuc
3020*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
3021*11be35a1SLionel Sambuc report_count(1);
3022*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3023*11be35a1SLionel Sambuc return;
3024*11be35a1SLionel Sambuc }
3025*11be35a1SLionel Sambuc
3026*11be35a1SLionel Sambuc ch = (chtype *) args[2];
3027*11be35a1SLionel Sambuc
3028*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &n) == 0) {
3029*11be35a1SLionel Sambuc report_count(1);
3030*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3031*11be35a1SLionel Sambuc return;
3032*11be35a1SLionel Sambuc }
3033*11be35a1SLionel Sambuc
3034*11be35a1SLionel Sambuc report_count(1);
3035*11be35a1SLionel Sambuc report_return(mvhline(y, x, ch[0], n));
3036*11be35a1SLionel Sambuc }
3037*11be35a1SLionel Sambuc
3038*11be35a1SLionel Sambuc
3039*11be35a1SLionel Sambuc void
cmd_mvprintw(int nargs,char ** args)3040*11be35a1SLionel Sambuc cmd_mvprintw(int nargs, char **args)
3041*11be35a1SLionel Sambuc {
3042*11be35a1SLionel Sambuc int y, x;
3043*11be35a1SLionel Sambuc
3044*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3045*11be35a1SLionel Sambuc return;
3046*11be35a1SLionel Sambuc
3047*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
3048*11be35a1SLionel Sambuc report_count(1);
3049*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3050*11be35a1SLionel Sambuc return;
3051*11be35a1SLionel Sambuc }
3052*11be35a1SLionel Sambuc
3053*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
3054*11be35a1SLionel Sambuc report_count(1);
3055*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3056*11be35a1SLionel Sambuc return;
3057*11be35a1SLionel Sambuc }
3058*11be35a1SLionel Sambuc
3059*11be35a1SLionel Sambuc report_count(1);
3060*11be35a1SLionel Sambuc report_return(mvprintw(y, x, args[2], args[3]));
3061*11be35a1SLionel Sambuc }
3062*11be35a1SLionel Sambuc
3063*11be35a1SLionel Sambuc
3064*11be35a1SLionel Sambuc void
cmd_mvscanw(int nargs,char ** args)3065*11be35a1SLionel Sambuc cmd_mvscanw(int nargs, char **args)
3066*11be35a1SLionel Sambuc {
3067*11be35a1SLionel Sambuc int y, x;
3068*11be35a1SLionel Sambuc char string[256];
3069*11be35a1SLionel Sambuc
3070*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
3071*11be35a1SLionel Sambuc return;
3072*11be35a1SLionel Sambuc
3073*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
3074*11be35a1SLionel Sambuc report_count(1);
3075*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3076*11be35a1SLionel Sambuc return;
3077*11be35a1SLionel Sambuc }
3078*11be35a1SLionel Sambuc
3079*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
3080*11be35a1SLionel Sambuc report_count(1);
3081*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3082*11be35a1SLionel Sambuc return;
3083*11be35a1SLionel Sambuc }
3084*11be35a1SLionel Sambuc
3085*11be35a1SLionel Sambuc /* XXX - call2 */
3086*11be35a1SLionel Sambuc report_count(2);
3087*11be35a1SLionel Sambuc report_return(mvscanw(y, x, args[2], &string));
3088*11be35a1SLionel Sambuc report_status(string);
3089*11be35a1SLionel Sambuc }
3090*11be35a1SLionel Sambuc
3091*11be35a1SLionel Sambuc
3092*11be35a1SLionel Sambuc void
cmd_mvvline(int nargs,char ** args)3093*11be35a1SLionel Sambuc cmd_mvvline(int nargs, char **args)
3094*11be35a1SLionel Sambuc {
3095*11be35a1SLionel Sambuc int y, x, n;
3096*11be35a1SLionel Sambuc chtype *ch;
3097*11be35a1SLionel Sambuc
3098*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3099*11be35a1SLionel Sambuc return;
3100*11be35a1SLionel Sambuc
3101*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
3102*11be35a1SLionel Sambuc report_count(1);
3103*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3104*11be35a1SLionel Sambuc return;
3105*11be35a1SLionel Sambuc }
3106*11be35a1SLionel Sambuc
3107*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
3108*11be35a1SLionel Sambuc report_count(1);
3109*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3110*11be35a1SLionel Sambuc return;
3111*11be35a1SLionel Sambuc }
3112*11be35a1SLionel Sambuc
3113*11be35a1SLionel Sambuc ch = (chtype *) args[2];
3114*11be35a1SLionel Sambuc
3115*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &n) == 0) {
3116*11be35a1SLionel Sambuc report_count(1);
3117*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3118*11be35a1SLionel Sambuc return;
3119*11be35a1SLionel Sambuc }
3120*11be35a1SLionel Sambuc
3121*11be35a1SLionel Sambuc report_count(1);
3122*11be35a1SLionel Sambuc report_return(mvvline(y, x, ch[0], n));
3123*11be35a1SLionel Sambuc }
3124*11be35a1SLionel Sambuc
3125*11be35a1SLionel Sambuc
3126*11be35a1SLionel Sambuc void
cmd_mvwhline(int nargs,char ** args)3127*11be35a1SLionel Sambuc cmd_mvwhline(int nargs, char **args)
3128*11be35a1SLionel Sambuc {
3129*11be35a1SLionel Sambuc int y, x, ch, n;
3130*11be35a1SLionel Sambuc WINDOW *win;
3131*11be35a1SLionel Sambuc
3132*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
3133*11be35a1SLionel Sambuc return;
3134*11be35a1SLionel Sambuc
3135*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3136*11be35a1SLionel Sambuc report_count(1);
3137*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3138*11be35a1SLionel Sambuc return;
3139*11be35a1SLionel Sambuc }
3140*11be35a1SLionel Sambuc
3141*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3142*11be35a1SLionel Sambuc report_count(1);
3143*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3144*11be35a1SLionel Sambuc return;
3145*11be35a1SLionel Sambuc }
3146*11be35a1SLionel Sambuc
3147*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3148*11be35a1SLionel Sambuc report_count(1);
3149*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3150*11be35a1SLionel Sambuc return;
3151*11be35a1SLionel Sambuc }
3152*11be35a1SLionel Sambuc
3153*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &ch) == 0) {
3154*11be35a1SLionel Sambuc report_count(1);
3155*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3156*11be35a1SLionel Sambuc return;
3157*11be35a1SLionel Sambuc }
3158*11be35a1SLionel Sambuc
3159*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &n) == 0) {
3160*11be35a1SLionel Sambuc report_count(1);
3161*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3162*11be35a1SLionel Sambuc return;
3163*11be35a1SLionel Sambuc }
3164*11be35a1SLionel Sambuc
3165*11be35a1SLionel Sambuc report_count(1);
3166*11be35a1SLionel Sambuc report_return(mvwhline(win, y, x, ch, n));
3167*11be35a1SLionel Sambuc }
3168*11be35a1SLionel Sambuc
3169*11be35a1SLionel Sambuc
3170*11be35a1SLionel Sambuc void
cmd_mvwvline(int nargs,char ** args)3171*11be35a1SLionel Sambuc cmd_mvwvline(int nargs, char **args)
3172*11be35a1SLionel Sambuc {
3173*11be35a1SLionel Sambuc int y, x, n;
3174*11be35a1SLionel Sambuc WINDOW *win;
3175*11be35a1SLionel Sambuc chtype *ch;
3176*11be35a1SLionel Sambuc
3177*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
3178*11be35a1SLionel Sambuc return;
3179*11be35a1SLionel Sambuc
3180*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3181*11be35a1SLionel Sambuc report_count(1);
3182*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3183*11be35a1SLionel Sambuc return;
3184*11be35a1SLionel Sambuc }
3185*11be35a1SLionel Sambuc
3186*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3187*11be35a1SLionel Sambuc report_count(1);
3188*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3189*11be35a1SLionel Sambuc return;
3190*11be35a1SLionel Sambuc }
3191*11be35a1SLionel Sambuc
3192*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3193*11be35a1SLionel Sambuc report_count(1);
3194*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3195*11be35a1SLionel Sambuc return;
3196*11be35a1SLionel Sambuc }
3197*11be35a1SLionel Sambuc
3198*11be35a1SLionel Sambuc ch = (chtype *) args[3];
3199*11be35a1SLionel Sambuc
3200*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &n) == 0) {
3201*11be35a1SLionel Sambuc report_count(1);
3202*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3203*11be35a1SLionel Sambuc return;
3204*11be35a1SLionel Sambuc }
3205*11be35a1SLionel Sambuc
3206*11be35a1SLionel Sambuc report_count(1);
3207*11be35a1SLionel Sambuc report_return(mvwvline(win, y, x, ch[0], n));
3208*11be35a1SLionel Sambuc }
3209*11be35a1SLionel Sambuc
3210*11be35a1SLionel Sambuc
3211*11be35a1SLionel Sambuc void
cmd_mvwin(int nargs,char ** args)3212*11be35a1SLionel Sambuc cmd_mvwin(int nargs, char **args)
3213*11be35a1SLionel Sambuc {
3214*11be35a1SLionel Sambuc int y, x;
3215*11be35a1SLionel Sambuc WINDOW *win;
3216*11be35a1SLionel Sambuc
3217*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
3218*11be35a1SLionel Sambuc return;
3219*11be35a1SLionel Sambuc
3220*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3221*11be35a1SLionel Sambuc report_count(1);
3222*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3223*11be35a1SLionel Sambuc return;
3224*11be35a1SLionel Sambuc }
3225*11be35a1SLionel Sambuc
3226*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3227*11be35a1SLionel Sambuc report_count(1);
3228*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3229*11be35a1SLionel Sambuc return;
3230*11be35a1SLionel Sambuc }
3231*11be35a1SLionel Sambuc
3232*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3233*11be35a1SLionel Sambuc report_count(1);
3234*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3235*11be35a1SLionel Sambuc return;
3236*11be35a1SLionel Sambuc }
3237*11be35a1SLionel Sambuc
3238*11be35a1SLionel Sambuc report_count(1);
3239*11be35a1SLionel Sambuc report_return(mvwin(win, y, x));
3240*11be35a1SLionel Sambuc }
3241*11be35a1SLionel Sambuc
3242*11be35a1SLionel Sambuc
3243*11be35a1SLionel Sambuc void
cmd_mvwinchnstr(int nargs,char ** args)3244*11be35a1SLionel Sambuc cmd_mvwinchnstr(int nargs, char **args)
3245*11be35a1SLionel Sambuc {
3246*11be35a1SLionel Sambuc int y, x, count;
3247*11be35a1SLionel Sambuc chtype *string;
3248*11be35a1SLionel Sambuc WINDOW *win;
3249*11be35a1SLionel Sambuc
3250*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3251*11be35a1SLionel Sambuc return;
3252*11be35a1SLionel Sambuc
3253*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3254*11be35a1SLionel Sambuc report_count(1);
3255*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3256*11be35a1SLionel Sambuc return;
3257*11be35a1SLionel Sambuc }
3258*11be35a1SLionel Sambuc
3259*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3260*11be35a1SLionel Sambuc report_count(1);
3261*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3262*11be35a1SLionel Sambuc return;
3263*11be35a1SLionel Sambuc }
3264*11be35a1SLionel Sambuc
3265*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3266*11be35a1SLionel Sambuc report_count(1);
3267*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3268*11be35a1SLionel Sambuc return;
3269*11be35a1SLionel Sambuc }
3270*11be35a1SLionel Sambuc
3271*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &count) == 0) {
3272*11be35a1SLionel Sambuc report_count(1);
3273*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3274*11be35a1SLionel Sambuc return;
3275*11be35a1SLionel Sambuc }
3276*11be35a1SLionel Sambuc
3277*11be35a1SLionel Sambuc if ((string = malloc((count + 1) * sizeof(chtype))) == NULL) {
3278*11be35a1SLionel Sambuc report_count(1);
3279*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
3280*11be35a1SLionel Sambuc return;
3281*11be35a1SLionel Sambuc }
3282*11be35a1SLionel Sambuc
3283*11be35a1SLionel Sambuc /* XXX call2 */
3284*11be35a1SLionel Sambuc report_count(2);
3285*11be35a1SLionel Sambuc report_return(mvwinchnstr(win, y, x, string, count));
3286*11be35a1SLionel Sambuc report_nstr(string);
3287*11be35a1SLionel Sambuc free(string);
3288*11be35a1SLionel Sambuc }
3289*11be35a1SLionel Sambuc
3290*11be35a1SLionel Sambuc
3291*11be35a1SLionel Sambuc void
cmd_mvwinchstr(int nargs,char ** args)3292*11be35a1SLionel Sambuc cmd_mvwinchstr(int nargs, char **args)
3293*11be35a1SLionel Sambuc {
3294*11be35a1SLionel Sambuc int y, x;
3295*11be35a1SLionel Sambuc chtype string[256];
3296*11be35a1SLionel Sambuc WINDOW *win;
3297*11be35a1SLionel Sambuc
3298*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
3299*11be35a1SLionel Sambuc return;
3300*11be35a1SLionel Sambuc
3301*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3302*11be35a1SLionel Sambuc report_count(1);
3303*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3304*11be35a1SLionel Sambuc return;
3305*11be35a1SLionel Sambuc }
3306*11be35a1SLionel Sambuc
3307*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3308*11be35a1SLionel Sambuc report_count(1);
3309*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3310*11be35a1SLionel Sambuc return;
3311*11be35a1SLionel Sambuc }
3312*11be35a1SLionel Sambuc
3313*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3314*11be35a1SLionel Sambuc report_count(1);
3315*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3316*11be35a1SLionel Sambuc return;
3317*11be35a1SLionel Sambuc }
3318*11be35a1SLionel Sambuc
3319*11be35a1SLionel Sambuc /* XXX call2 */
3320*11be35a1SLionel Sambuc report_count(2);
3321*11be35a1SLionel Sambuc report_return(mvwinchstr(win, y, x, string));
3322*11be35a1SLionel Sambuc report_nstr(string);
3323*11be35a1SLionel Sambuc }
3324*11be35a1SLionel Sambuc
3325*11be35a1SLionel Sambuc
3326*11be35a1SLionel Sambuc void
cmd_mvwinnstr(int nargs,char ** args)3327*11be35a1SLionel Sambuc cmd_mvwinnstr(int nargs, char **args)
3328*11be35a1SLionel Sambuc {
3329*11be35a1SLionel Sambuc int y, x, count;
3330*11be35a1SLionel Sambuc char *string;
3331*11be35a1SLionel Sambuc WINDOW *win;
3332*11be35a1SLionel Sambuc
3333*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3334*11be35a1SLionel Sambuc return;
3335*11be35a1SLionel Sambuc
3336*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3337*11be35a1SLionel Sambuc report_count(1);
3338*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3339*11be35a1SLionel Sambuc return;
3340*11be35a1SLionel Sambuc }
3341*11be35a1SLionel Sambuc
3342*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3343*11be35a1SLionel Sambuc report_count(1);
3344*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3345*11be35a1SLionel Sambuc return;
3346*11be35a1SLionel Sambuc }
3347*11be35a1SLionel Sambuc
3348*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3349*11be35a1SLionel Sambuc report_count(1);
3350*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3351*11be35a1SLionel Sambuc return;
3352*11be35a1SLionel Sambuc }
3353*11be35a1SLionel Sambuc
3354*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &count) == 0) {
3355*11be35a1SLionel Sambuc report_count(1);
3356*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3357*11be35a1SLionel Sambuc return;
3358*11be35a1SLionel Sambuc }
3359*11be35a1SLionel Sambuc
3360*11be35a1SLionel Sambuc if ((string = malloc(count + 1)) == NULL) {
3361*11be35a1SLionel Sambuc report_count(1);
3362*11be35a1SLionel Sambuc report_error("MALLOC_FAILED");
3363*11be35a1SLionel Sambuc return;
3364*11be35a1SLionel Sambuc }
3365*11be35a1SLionel Sambuc
3366*11be35a1SLionel Sambuc /* XXX call2 */
3367*11be35a1SLionel Sambuc report_count(2);
3368*11be35a1SLionel Sambuc report_return(mvwinnstr(win, y, x, string, count));
3369*11be35a1SLionel Sambuc report_status(string);
3370*11be35a1SLionel Sambuc free(string);
3371*11be35a1SLionel Sambuc }
3372*11be35a1SLionel Sambuc
3373*11be35a1SLionel Sambuc
3374*11be35a1SLionel Sambuc void
cmd_mvwinstr(int nargs,char ** args)3375*11be35a1SLionel Sambuc cmd_mvwinstr(int nargs, char **args)
3376*11be35a1SLionel Sambuc {
3377*11be35a1SLionel Sambuc int y, x;
3378*11be35a1SLionel Sambuc char string[256];
3379*11be35a1SLionel Sambuc WINDOW *win;
3380*11be35a1SLionel Sambuc
3381*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
3382*11be35a1SLionel Sambuc return;
3383*11be35a1SLionel Sambuc
3384*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3385*11be35a1SLionel Sambuc report_count(1);
3386*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3387*11be35a1SLionel Sambuc return;
3388*11be35a1SLionel Sambuc }
3389*11be35a1SLionel Sambuc
3390*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3391*11be35a1SLionel Sambuc report_count(1);
3392*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3393*11be35a1SLionel Sambuc return;
3394*11be35a1SLionel Sambuc }
3395*11be35a1SLionel Sambuc
3396*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3397*11be35a1SLionel Sambuc report_count(1);
3398*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3399*11be35a1SLionel Sambuc return;
3400*11be35a1SLionel Sambuc }
3401*11be35a1SLionel Sambuc
3402*11be35a1SLionel Sambuc /* XXX call2 */
3403*11be35a1SLionel Sambuc report_count(2);
3404*11be35a1SLionel Sambuc report_return(mvwinstr(win, y, x, string));
3405*11be35a1SLionel Sambuc report_status(string);
3406*11be35a1SLionel Sambuc }
3407*11be35a1SLionel Sambuc
3408*11be35a1SLionel Sambuc
3409*11be35a1SLionel Sambuc void
cmd_mvwprintw(int nargs,char ** args)3410*11be35a1SLionel Sambuc cmd_mvwprintw(int nargs, char **args)
3411*11be35a1SLionel Sambuc {
3412*11be35a1SLionel Sambuc int y, x;
3413*11be35a1SLionel Sambuc WINDOW *win;
3414*11be35a1SLionel Sambuc
3415*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
3416*11be35a1SLionel Sambuc return;
3417*11be35a1SLionel Sambuc
3418*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3419*11be35a1SLionel Sambuc report_count(1);
3420*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3421*11be35a1SLionel Sambuc return;
3422*11be35a1SLionel Sambuc }
3423*11be35a1SLionel Sambuc
3424*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3425*11be35a1SLionel Sambuc report_count(1);
3426*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3427*11be35a1SLionel Sambuc return;
3428*11be35a1SLionel Sambuc }
3429*11be35a1SLionel Sambuc
3430*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3431*11be35a1SLionel Sambuc report_count(1);
3432*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3433*11be35a1SLionel Sambuc return;
3434*11be35a1SLionel Sambuc }
3435*11be35a1SLionel Sambuc
3436*11be35a1SLionel Sambuc report_count(1);
3437*11be35a1SLionel Sambuc report_return(mvwprintw(win, y, x, args[3], args[4]));
3438*11be35a1SLionel Sambuc }
3439*11be35a1SLionel Sambuc
3440*11be35a1SLionel Sambuc
3441*11be35a1SLionel Sambuc void
cmd_mvwscanw(int nargs,char ** args)3442*11be35a1SLionel Sambuc cmd_mvwscanw(int nargs, char **args)
3443*11be35a1SLionel Sambuc {
3444*11be35a1SLionel Sambuc int y, x;
3445*11be35a1SLionel Sambuc WINDOW *win;
3446*11be35a1SLionel Sambuc char string[256];
3447*11be35a1SLionel Sambuc
3448*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3449*11be35a1SLionel Sambuc return;
3450*11be35a1SLionel Sambuc
3451*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3452*11be35a1SLionel Sambuc report_count(1);
3453*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3454*11be35a1SLionel Sambuc return;
3455*11be35a1SLionel Sambuc }
3456*11be35a1SLionel Sambuc
3457*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
3458*11be35a1SLionel Sambuc report_count(1);
3459*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3460*11be35a1SLionel Sambuc return;
3461*11be35a1SLionel Sambuc }
3462*11be35a1SLionel Sambuc
3463*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
3464*11be35a1SLionel Sambuc report_count(1);
3465*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3466*11be35a1SLionel Sambuc return;
3467*11be35a1SLionel Sambuc }
3468*11be35a1SLionel Sambuc
3469*11be35a1SLionel Sambuc /* XXX - call2 */
3470*11be35a1SLionel Sambuc report_count(2);
3471*11be35a1SLionel Sambuc report_int(mvwscanw(win, y, x, args[3], &string));
3472*11be35a1SLionel Sambuc report_status(string);
3473*11be35a1SLionel Sambuc }
3474*11be35a1SLionel Sambuc
3475*11be35a1SLionel Sambuc
3476*11be35a1SLionel Sambuc void
cmd_napms(int nargs,char ** args)3477*11be35a1SLionel Sambuc cmd_napms(int nargs, char **args)
3478*11be35a1SLionel Sambuc {
3479*11be35a1SLionel Sambuc int naptime;
3480*11be35a1SLionel Sambuc
3481*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
3482*11be35a1SLionel Sambuc return;
3483*11be35a1SLionel Sambuc
3484*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &naptime) == 0) {
3485*11be35a1SLionel Sambuc report_count(1);
3486*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3487*11be35a1SLionel Sambuc return;
3488*11be35a1SLionel Sambuc }
3489*11be35a1SLionel Sambuc
3490*11be35a1SLionel Sambuc report_count(1);
3491*11be35a1SLionel Sambuc report_return(napms(naptime));
3492*11be35a1SLionel Sambuc }
3493*11be35a1SLionel Sambuc
3494*11be35a1SLionel Sambuc
3495*11be35a1SLionel Sambuc void
cmd_newpad(int nargs,char ** args)3496*11be35a1SLionel Sambuc cmd_newpad(int nargs, char **args)
3497*11be35a1SLionel Sambuc {
3498*11be35a1SLionel Sambuc int y, x;
3499*11be35a1SLionel Sambuc
3500*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3501*11be35a1SLionel Sambuc return;
3502*11be35a1SLionel Sambuc
3503*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
3504*11be35a1SLionel Sambuc report_count(1);
3505*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3506*11be35a1SLionel Sambuc return;
3507*11be35a1SLionel Sambuc }
3508*11be35a1SLionel Sambuc
3509*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
3510*11be35a1SLionel Sambuc report_count(1);
3511*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3512*11be35a1SLionel Sambuc return;
3513*11be35a1SLionel Sambuc }
3514*11be35a1SLionel Sambuc
3515*11be35a1SLionel Sambuc report_count(1);
3516*11be35a1SLionel Sambuc report_ptr(newpad(y, x));
3517*11be35a1SLionel Sambuc }
3518*11be35a1SLionel Sambuc
3519*11be35a1SLionel Sambuc
3520*11be35a1SLionel Sambuc void
cmd_newterm(int nargs,char ** args)3521*11be35a1SLionel Sambuc cmd_newterm(int nargs, char **args)
3522*11be35a1SLionel Sambuc {
3523*11be35a1SLionel Sambuc FILE *in, *out;
3524*11be35a1SLionel Sambuc
3525*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
3526*11be35a1SLionel Sambuc return;
3527*11be35a1SLionel Sambuc
3528*11be35a1SLionel Sambuc if ((in = fopen(args[1], "rw")) == NULL) {
3529*11be35a1SLionel Sambuc report_count(1);
3530*11be35a1SLionel Sambuc report_error("BAD FILE_ARGUMENT");
3531*11be35a1SLionel Sambuc return;
3532*11be35a1SLionel Sambuc }
3533*11be35a1SLionel Sambuc
3534*11be35a1SLionel Sambuc
3535*11be35a1SLionel Sambuc if ((out = fopen(args[2], "rw")) == NULL) {
3536*11be35a1SLionel Sambuc report_count(1);
3537*11be35a1SLionel Sambuc report_error("BAD FILE_ARGUMENT");
3538*11be35a1SLionel Sambuc return;
3539*11be35a1SLionel Sambuc }
3540*11be35a1SLionel Sambuc
3541*11be35a1SLionel Sambuc report_count(1);
3542*11be35a1SLionel Sambuc report_ptr(newterm(args[0], out, in));
3543*11be35a1SLionel Sambuc }
3544*11be35a1SLionel Sambuc
3545*11be35a1SLionel Sambuc
3546*11be35a1SLionel Sambuc void
cmd_newwin(int nargs,char ** args)3547*11be35a1SLionel Sambuc cmd_newwin(int nargs, char **args)
3548*11be35a1SLionel Sambuc {
3549*11be35a1SLionel Sambuc int lines, cols, begin_y, begin_x;
3550*11be35a1SLionel Sambuc
3551*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
3552*11be35a1SLionel Sambuc return;
3553*11be35a1SLionel Sambuc
3554*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &lines) == 0) {
3555*11be35a1SLionel Sambuc report_count(1);
3556*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3557*11be35a1SLionel Sambuc return;
3558*11be35a1SLionel Sambuc }
3559*11be35a1SLionel Sambuc
3560*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &cols) == 0) {
3561*11be35a1SLionel Sambuc report_count(1);
3562*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3563*11be35a1SLionel Sambuc return;
3564*11be35a1SLionel Sambuc }
3565*11be35a1SLionel Sambuc
3566*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &begin_y) == 0) {
3567*11be35a1SLionel Sambuc report_count(1);
3568*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3569*11be35a1SLionel Sambuc return;
3570*11be35a1SLionel Sambuc }
3571*11be35a1SLionel Sambuc
3572*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &begin_x) == 0) {
3573*11be35a1SLionel Sambuc report_count(1);
3574*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3575*11be35a1SLionel Sambuc return;
3576*11be35a1SLionel Sambuc }
3577*11be35a1SLionel Sambuc
3578*11be35a1SLionel Sambuc report_count(1);
3579*11be35a1SLionel Sambuc report_ptr(newwin(lines, cols, begin_y, begin_x));
3580*11be35a1SLionel Sambuc }
3581*11be35a1SLionel Sambuc
3582*11be35a1SLionel Sambuc
3583*11be35a1SLionel Sambuc void
cmd_nl(int nargs,char ** args)3584*11be35a1SLionel Sambuc cmd_nl(int nargs, char **args)
3585*11be35a1SLionel Sambuc {
3586*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3587*11be35a1SLionel Sambuc return;
3588*11be35a1SLionel Sambuc
3589*11be35a1SLionel Sambuc report_count(1);
3590*11be35a1SLionel Sambuc report_return(nl());
3591*11be35a1SLionel Sambuc }
3592*11be35a1SLionel Sambuc
3593*11be35a1SLionel Sambuc
3594*11be35a1SLionel Sambuc void
cmd_no_color_attributes(int nargs,char ** args)3595*11be35a1SLionel Sambuc cmd_no_color_attributes(int nargs, char **args)
3596*11be35a1SLionel Sambuc {
3597*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3598*11be35a1SLionel Sambuc return;
3599*11be35a1SLionel Sambuc
3600*11be35a1SLionel Sambuc report_count(1);
3601*11be35a1SLionel Sambuc report_int(no_color_attributes());
3602*11be35a1SLionel Sambuc }
3603*11be35a1SLionel Sambuc
3604*11be35a1SLionel Sambuc
3605*11be35a1SLionel Sambuc void
cmd_nocbreak(int nargs,char ** args)3606*11be35a1SLionel Sambuc cmd_nocbreak(int nargs, char **args)
3607*11be35a1SLionel Sambuc {
3608*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3609*11be35a1SLionel Sambuc return;
3610*11be35a1SLionel Sambuc
3611*11be35a1SLionel Sambuc report_count(1);
3612*11be35a1SLionel Sambuc report_return(nocbreak());
3613*11be35a1SLionel Sambuc }
3614*11be35a1SLionel Sambuc
3615*11be35a1SLionel Sambuc
3616*11be35a1SLionel Sambuc void
cmd_nodelay(int nargs,char ** args)3617*11be35a1SLionel Sambuc cmd_nodelay(int nargs, char **args)
3618*11be35a1SLionel Sambuc {
3619*11be35a1SLionel Sambuc int flag;
3620*11be35a1SLionel Sambuc WINDOW *win;
3621*11be35a1SLionel Sambuc
3622*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3623*11be35a1SLionel Sambuc return;
3624*11be35a1SLionel Sambuc
3625*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3626*11be35a1SLionel Sambuc report_count(1);
3627*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3628*11be35a1SLionel Sambuc return;
3629*11be35a1SLionel Sambuc }
3630*11be35a1SLionel Sambuc
3631*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
3632*11be35a1SLionel Sambuc report_count(1);
3633*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3634*11be35a1SLionel Sambuc return;
3635*11be35a1SLionel Sambuc }
3636*11be35a1SLionel Sambuc
3637*11be35a1SLionel Sambuc report_count(1);
3638*11be35a1SLionel Sambuc report_return(nodelay(win, flag));
3639*11be35a1SLionel Sambuc }
3640*11be35a1SLionel Sambuc
3641*11be35a1SLionel Sambuc
3642*11be35a1SLionel Sambuc void
cmd_noecho(int nargs,char ** args)3643*11be35a1SLionel Sambuc cmd_noecho(int nargs, char **args)
3644*11be35a1SLionel Sambuc {
3645*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3646*11be35a1SLionel Sambuc return;
3647*11be35a1SLionel Sambuc
3648*11be35a1SLionel Sambuc report_count(1);
3649*11be35a1SLionel Sambuc report_return(noecho());
3650*11be35a1SLionel Sambuc }
3651*11be35a1SLionel Sambuc
3652*11be35a1SLionel Sambuc
3653*11be35a1SLionel Sambuc void
cmd_nonl(int nargs,char ** args)3654*11be35a1SLionel Sambuc cmd_nonl(int nargs, char **args)
3655*11be35a1SLionel Sambuc {
3656*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3657*11be35a1SLionel Sambuc return;
3658*11be35a1SLionel Sambuc
3659*11be35a1SLionel Sambuc report_count(1);
3660*11be35a1SLionel Sambuc report_return(nonl());
3661*11be35a1SLionel Sambuc }
3662*11be35a1SLionel Sambuc
3663*11be35a1SLionel Sambuc
3664*11be35a1SLionel Sambuc void
cmd_noqiflush(int nargs,char ** args)3665*11be35a1SLionel Sambuc cmd_noqiflush(int nargs, char **args)
3666*11be35a1SLionel Sambuc {
3667*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3668*11be35a1SLionel Sambuc return;
3669*11be35a1SLionel Sambuc
3670*11be35a1SLionel Sambuc noqiflush();
3671*11be35a1SLionel Sambuc report_count(1);
3672*11be35a1SLionel Sambuc report_return(OK); /* fake a return, the call returns void */
3673*11be35a1SLionel Sambuc }
3674*11be35a1SLionel Sambuc
3675*11be35a1SLionel Sambuc
3676*11be35a1SLionel Sambuc void
cmd_noraw(int nargs,char ** args)3677*11be35a1SLionel Sambuc cmd_noraw(int nargs, char **args)
3678*11be35a1SLionel Sambuc {
3679*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3680*11be35a1SLionel Sambuc return;
3681*11be35a1SLionel Sambuc
3682*11be35a1SLionel Sambuc report_count(1);
3683*11be35a1SLionel Sambuc report_return(noraw());
3684*11be35a1SLionel Sambuc }
3685*11be35a1SLionel Sambuc
3686*11be35a1SLionel Sambuc
3687*11be35a1SLionel Sambuc void
cmd_notimeout(int nargs,char ** args)3688*11be35a1SLionel Sambuc cmd_notimeout(int nargs, char **args)
3689*11be35a1SLionel Sambuc {
3690*11be35a1SLionel Sambuc int flag;
3691*11be35a1SLionel Sambuc WINDOW *win;
3692*11be35a1SLionel Sambuc
3693*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3694*11be35a1SLionel Sambuc return;
3695*11be35a1SLionel Sambuc
3696*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3697*11be35a1SLionel Sambuc report_count(1);
3698*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3699*11be35a1SLionel Sambuc return;
3700*11be35a1SLionel Sambuc }
3701*11be35a1SLionel Sambuc
3702*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
3703*11be35a1SLionel Sambuc report_count(1);
3704*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3705*11be35a1SLionel Sambuc return;
3706*11be35a1SLionel Sambuc }
3707*11be35a1SLionel Sambuc
3708*11be35a1SLionel Sambuc report_count(1);
3709*11be35a1SLionel Sambuc report_return(notimeout(win, flag));
3710*11be35a1SLionel Sambuc }
3711*11be35a1SLionel Sambuc
3712*11be35a1SLionel Sambuc
3713*11be35a1SLionel Sambuc void
cmd_overlay(int nargs,char ** args)3714*11be35a1SLionel Sambuc cmd_overlay(int nargs, char **args)
3715*11be35a1SLionel Sambuc {
3716*11be35a1SLionel Sambuc WINDOW *source, *dest;
3717*11be35a1SLionel Sambuc
3718*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3719*11be35a1SLionel Sambuc return;
3720*11be35a1SLionel Sambuc
3721*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &source) == 0) {
3722*11be35a1SLionel Sambuc report_count(1);
3723*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3724*11be35a1SLionel Sambuc return;
3725*11be35a1SLionel Sambuc }
3726*11be35a1SLionel Sambuc
3727*11be35a1SLionel Sambuc if (sscanf(args[1], "%p", &dest) == 0) {
3728*11be35a1SLionel Sambuc report_count(1);
3729*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3730*11be35a1SLionel Sambuc return;
3731*11be35a1SLionel Sambuc }
3732*11be35a1SLionel Sambuc
3733*11be35a1SLionel Sambuc report_count(1);
3734*11be35a1SLionel Sambuc report_return(overlay(source, dest));
3735*11be35a1SLionel Sambuc }
3736*11be35a1SLionel Sambuc
3737*11be35a1SLionel Sambuc
3738*11be35a1SLionel Sambuc void
cmd_overwrite(int nargs,char ** args)3739*11be35a1SLionel Sambuc cmd_overwrite(int nargs, char **args)
3740*11be35a1SLionel Sambuc {
3741*11be35a1SLionel Sambuc WINDOW *source, *dest;
3742*11be35a1SLionel Sambuc
3743*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3744*11be35a1SLionel Sambuc return;
3745*11be35a1SLionel Sambuc
3746*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &source) == 0) {
3747*11be35a1SLionel Sambuc report_count(1);
3748*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3749*11be35a1SLionel Sambuc return;
3750*11be35a1SLionel Sambuc }
3751*11be35a1SLionel Sambuc
3752*11be35a1SLionel Sambuc if (sscanf(args[1], "%p", &dest) == 0) {
3753*11be35a1SLionel Sambuc report_count(1);
3754*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3755*11be35a1SLionel Sambuc return;
3756*11be35a1SLionel Sambuc }
3757*11be35a1SLionel Sambuc
3758*11be35a1SLionel Sambuc report_count(1);
3759*11be35a1SLionel Sambuc report_return(overwrite(source, dest));
3760*11be35a1SLionel Sambuc }
3761*11be35a1SLionel Sambuc
3762*11be35a1SLionel Sambuc
3763*11be35a1SLionel Sambuc void
cmd_pair_content(int nargs,char ** args)3764*11be35a1SLionel Sambuc cmd_pair_content(int nargs, char **args)
3765*11be35a1SLionel Sambuc {
3766*11be35a1SLionel Sambuc short pair, fore, back;
3767*11be35a1SLionel Sambuc
3768*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
3769*11be35a1SLionel Sambuc return;
3770*11be35a1SLionel Sambuc
3771*11be35a1SLionel Sambuc if (sscanf(args[0], "%hd", &pair) == 0) {
3772*11be35a1SLionel Sambuc report_count(1);
3773*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3774*11be35a1SLionel Sambuc return;
3775*11be35a1SLionel Sambuc }
3776*11be35a1SLionel Sambuc
3777*11be35a1SLionel Sambuc /* XXX - call3 */
3778*11be35a1SLionel Sambuc report_count(3);
3779*11be35a1SLionel Sambuc report_return(pair_content(pair, &fore, &back));
3780*11be35a1SLionel Sambuc report_int(fore);
3781*11be35a1SLionel Sambuc report_int(back);
3782*11be35a1SLionel Sambuc }
3783*11be35a1SLionel Sambuc
3784*11be35a1SLionel Sambuc
3785*11be35a1SLionel Sambuc void
cmd_pechochar(int nargs,char ** args)3786*11be35a1SLionel Sambuc cmd_pechochar(int nargs, char **args)
3787*11be35a1SLionel Sambuc {
3788*11be35a1SLionel Sambuc int ch;
3789*11be35a1SLionel Sambuc WINDOW *pad;
3790*11be35a1SLionel Sambuc
3791*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3792*11be35a1SLionel Sambuc return;
3793*11be35a1SLionel Sambuc
3794*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &pad) == 0) {
3795*11be35a1SLionel Sambuc report_count(1);
3796*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3797*11be35a1SLionel Sambuc return;
3798*11be35a1SLionel Sambuc }
3799*11be35a1SLionel Sambuc
3800*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &ch) == 0) {
3801*11be35a1SLionel Sambuc report_count(1);
3802*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3803*11be35a1SLionel Sambuc return;
3804*11be35a1SLionel Sambuc }
3805*11be35a1SLionel Sambuc
3806*11be35a1SLionel Sambuc report_count(1);
3807*11be35a1SLionel Sambuc report_return(pechochar(pad, ch));
3808*11be35a1SLionel Sambuc }
3809*11be35a1SLionel Sambuc
3810*11be35a1SLionel Sambuc
3811*11be35a1SLionel Sambuc void
cmd_pnoutrefresh(int nargs,char ** args)3812*11be35a1SLionel Sambuc cmd_pnoutrefresh(int nargs, char **args)
3813*11be35a1SLionel Sambuc {
3814*11be35a1SLionel Sambuc int pbeg_y, pbeg_x, sbeg_y, sbeg_x, smax_y, smax_x;
3815*11be35a1SLionel Sambuc WINDOW *pad;
3816*11be35a1SLionel Sambuc
3817*11be35a1SLionel Sambuc if (check_arg_count(nargs, 7) == 1)
3818*11be35a1SLionel Sambuc return;
3819*11be35a1SLionel Sambuc
3820*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &pad) == 0) {
3821*11be35a1SLionel Sambuc report_count(1);
3822*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3823*11be35a1SLionel Sambuc return;
3824*11be35a1SLionel Sambuc }
3825*11be35a1SLionel Sambuc
3826*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &pbeg_y) == 0) {
3827*11be35a1SLionel Sambuc report_count(1);
3828*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3829*11be35a1SLionel Sambuc return;
3830*11be35a1SLionel Sambuc }
3831*11be35a1SLionel Sambuc
3832*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &pbeg_x) == 0) {
3833*11be35a1SLionel Sambuc report_count(1);
3834*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3835*11be35a1SLionel Sambuc return;
3836*11be35a1SLionel Sambuc }
3837*11be35a1SLionel Sambuc
3838*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &sbeg_y) == 0) {
3839*11be35a1SLionel Sambuc report_count(1);
3840*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3841*11be35a1SLionel Sambuc return;
3842*11be35a1SLionel Sambuc }
3843*11be35a1SLionel Sambuc
3844*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &sbeg_x) == 0) {
3845*11be35a1SLionel Sambuc report_count(1);
3846*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3847*11be35a1SLionel Sambuc return;
3848*11be35a1SLionel Sambuc }
3849*11be35a1SLionel Sambuc
3850*11be35a1SLionel Sambuc if (sscanf(args[5], "%d", &smax_y) == 0) {
3851*11be35a1SLionel Sambuc report_count(1);
3852*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3853*11be35a1SLionel Sambuc return;
3854*11be35a1SLionel Sambuc }
3855*11be35a1SLionel Sambuc
3856*11be35a1SLionel Sambuc if (sscanf(args[6], "%d", &smax_x) == 0) {
3857*11be35a1SLionel Sambuc report_count(1);
3858*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3859*11be35a1SLionel Sambuc return;
3860*11be35a1SLionel Sambuc }
3861*11be35a1SLionel Sambuc
3862*11be35a1SLionel Sambuc report_count(1);
3863*11be35a1SLionel Sambuc report_return(pnoutrefresh(pad, pbeg_y, pbeg_x, sbeg_y, sbeg_x, smax_y,
3864*11be35a1SLionel Sambuc smax_x));
3865*11be35a1SLionel Sambuc }
3866*11be35a1SLionel Sambuc
3867*11be35a1SLionel Sambuc
3868*11be35a1SLionel Sambuc void
cmd_prefresh(int nargs,char ** args)3869*11be35a1SLionel Sambuc cmd_prefresh(int nargs, char **args)
3870*11be35a1SLionel Sambuc {
3871*11be35a1SLionel Sambuc int pbeg_y, pbeg_x, sbeg_y, sbeg_x, smax_y, smax_x;
3872*11be35a1SLionel Sambuc WINDOW *pad;
3873*11be35a1SLionel Sambuc
3874*11be35a1SLionel Sambuc if (check_arg_count(nargs, 7) == 1)
3875*11be35a1SLionel Sambuc return;
3876*11be35a1SLionel Sambuc
3877*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &pad) == 0) {
3878*11be35a1SLionel Sambuc report_count(1);
3879*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3880*11be35a1SLionel Sambuc return;
3881*11be35a1SLionel Sambuc }
3882*11be35a1SLionel Sambuc
3883*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &pbeg_y) == 0) {
3884*11be35a1SLionel Sambuc report_count(1);
3885*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3886*11be35a1SLionel Sambuc return;
3887*11be35a1SLionel Sambuc }
3888*11be35a1SLionel Sambuc
3889*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &pbeg_x) == 0) {
3890*11be35a1SLionel Sambuc report_count(1);
3891*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3892*11be35a1SLionel Sambuc return;
3893*11be35a1SLionel Sambuc }
3894*11be35a1SLionel Sambuc
3895*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &sbeg_y) == 0) {
3896*11be35a1SLionel Sambuc report_count(1);
3897*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3898*11be35a1SLionel Sambuc return;
3899*11be35a1SLionel Sambuc }
3900*11be35a1SLionel Sambuc
3901*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &sbeg_x) == 0) {
3902*11be35a1SLionel Sambuc report_count(1);
3903*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3904*11be35a1SLionel Sambuc return;
3905*11be35a1SLionel Sambuc }
3906*11be35a1SLionel Sambuc
3907*11be35a1SLionel Sambuc if (sscanf(args[5], "%d", &smax_y) == 0) {
3908*11be35a1SLionel Sambuc report_count(1);
3909*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3910*11be35a1SLionel Sambuc return;
3911*11be35a1SLionel Sambuc }
3912*11be35a1SLionel Sambuc
3913*11be35a1SLionel Sambuc if (sscanf(args[6], "%d", &smax_x) == 0) {
3914*11be35a1SLionel Sambuc report_count(1);
3915*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3916*11be35a1SLionel Sambuc return;
3917*11be35a1SLionel Sambuc }
3918*11be35a1SLionel Sambuc
3919*11be35a1SLionel Sambuc /* XXX causes refresh */
3920*11be35a1SLionel Sambuc report_count(1);
3921*11be35a1SLionel Sambuc report_return(prefresh(pad, pbeg_y, pbeg_x, sbeg_y, sbeg_x, smax_y,
3922*11be35a1SLionel Sambuc smax_x));
3923*11be35a1SLionel Sambuc
3924*11be35a1SLionel Sambuc }
3925*11be35a1SLionel Sambuc
3926*11be35a1SLionel Sambuc
3927*11be35a1SLionel Sambuc void
cmd_printw(int nargs,char ** args)3928*11be35a1SLionel Sambuc cmd_printw(int nargs, char **args)
3929*11be35a1SLionel Sambuc {
3930*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3931*11be35a1SLionel Sambuc return;
3932*11be35a1SLionel Sambuc
3933*11be35a1SLionel Sambuc
3934*11be35a1SLionel Sambuc report_count(1);
3935*11be35a1SLionel Sambuc report_return(printw(args[0], args[1]));
3936*11be35a1SLionel Sambuc }
3937*11be35a1SLionel Sambuc
3938*11be35a1SLionel Sambuc
3939*11be35a1SLionel Sambuc void
cmd_putwin(int nargs,char ** args)3940*11be35a1SLionel Sambuc cmd_putwin(int nargs, char **args)
3941*11be35a1SLionel Sambuc {
3942*11be35a1SLionel Sambuc FILE *fp;
3943*11be35a1SLionel Sambuc WINDOW *win;
3944*11be35a1SLionel Sambuc
3945*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
3946*11be35a1SLionel Sambuc return;
3947*11be35a1SLionel Sambuc
3948*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3949*11be35a1SLionel Sambuc report_count(1);
3950*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3951*11be35a1SLionel Sambuc return;
3952*11be35a1SLionel Sambuc }
3953*11be35a1SLionel Sambuc
3954*11be35a1SLionel Sambuc if ((fp = fopen(args[1], "rw")) == NULL) {
3955*11be35a1SLionel Sambuc report_count(1);
3956*11be35a1SLionel Sambuc report_error("BAD FILE_ARGUMENT");
3957*11be35a1SLionel Sambuc return;
3958*11be35a1SLionel Sambuc }
3959*11be35a1SLionel Sambuc
3960*11be35a1SLionel Sambuc report_count(1);
3961*11be35a1SLionel Sambuc report_return(putwin(win, fp));
3962*11be35a1SLionel Sambuc }
3963*11be35a1SLionel Sambuc
3964*11be35a1SLionel Sambuc
3965*11be35a1SLionel Sambuc void
cmd_qiflush(int nargs,char ** args)3966*11be35a1SLionel Sambuc cmd_qiflush(int nargs, char **args)
3967*11be35a1SLionel Sambuc {
3968*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3969*11be35a1SLionel Sambuc return;
3970*11be35a1SLionel Sambuc
3971*11be35a1SLionel Sambuc qiflush();
3972*11be35a1SLionel Sambuc report_count(1);
3973*11be35a1SLionel Sambuc report_return(OK); /* fake a return because call returns void */
3974*11be35a1SLionel Sambuc }
3975*11be35a1SLionel Sambuc
3976*11be35a1SLionel Sambuc
3977*11be35a1SLionel Sambuc void
cmd_raw(int nargs,char ** args)3978*11be35a1SLionel Sambuc cmd_raw(int nargs, char **args)
3979*11be35a1SLionel Sambuc {
3980*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
3981*11be35a1SLionel Sambuc return;
3982*11be35a1SLionel Sambuc
3983*11be35a1SLionel Sambuc report_count(1);
3984*11be35a1SLionel Sambuc report_return(raw());
3985*11be35a1SLionel Sambuc }
3986*11be35a1SLionel Sambuc
3987*11be35a1SLionel Sambuc
3988*11be35a1SLionel Sambuc void
cmd_redrawwin(int nargs,char ** args)3989*11be35a1SLionel Sambuc cmd_redrawwin(int nargs, char **args)
3990*11be35a1SLionel Sambuc {
3991*11be35a1SLionel Sambuc WINDOW *win;
3992*11be35a1SLionel Sambuc
3993*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
3994*11be35a1SLionel Sambuc return;
3995*11be35a1SLionel Sambuc
3996*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
3997*11be35a1SLionel Sambuc report_count(1);
3998*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
3999*11be35a1SLionel Sambuc return;
4000*11be35a1SLionel Sambuc }
4001*11be35a1SLionel Sambuc
4002*11be35a1SLionel Sambuc report_count(1);
4003*11be35a1SLionel Sambuc report_return(redrawwin(win));
4004*11be35a1SLionel Sambuc }
4005*11be35a1SLionel Sambuc
4006*11be35a1SLionel Sambuc
4007*11be35a1SLionel Sambuc void
cmd_reset_prog_mode(int nargs,char ** args)4008*11be35a1SLionel Sambuc cmd_reset_prog_mode(int nargs, char **args)
4009*11be35a1SLionel Sambuc {
4010*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4011*11be35a1SLionel Sambuc return;
4012*11be35a1SLionel Sambuc
4013*11be35a1SLionel Sambuc report_count(1);
4014*11be35a1SLionel Sambuc report_return(reset_prog_mode());
4015*11be35a1SLionel Sambuc }
4016*11be35a1SLionel Sambuc
4017*11be35a1SLionel Sambuc
4018*11be35a1SLionel Sambuc void
cmd_reset_shell_mode(int nargs,char ** args)4019*11be35a1SLionel Sambuc cmd_reset_shell_mode(int nargs, char **args)
4020*11be35a1SLionel Sambuc {
4021*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4022*11be35a1SLionel Sambuc return;
4023*11be35a1SLionel Sambuc
4024*11be35a1SLionel Sambuc report_count(1);
4025*11be35a1SLionel Sambuc report_return(reset_shell_mode());
4026*11be35a1SLionel Sambuc }
4027*11be35a1SLionel Sambuc
4028*11be35a1SLionel Sambuc
4029*11be35a1SLionel Sambuc void
cmd_resetty(int nargs,char ** args)4030*11be35a1SLionel Sambuc cmd_resetty(int nargs, char **args)
4031*11be35a1SLionel Sambuc {
4032*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4033*11be35a1SLionel Sambuc return;
4034*11be35a1SLionel Sambuc
4035*11be35a1SLionel Sambuc report_count(1);
4036*11be35a1SLionel Sambuc report_return(resetty());
4037*11be35a1SLionel Sambuc }
4038*11be35a1SLionel Sambuc
4039*11be35a1SLionel Sambuc
4040*11be35a1SLionel Sambuc void
cmd_resizeterm(int nargs,char ** args)4041*11be35a1SLionel Sambuc cmd_resizeterm(int nargs, char **args)
4042*11be35a1SLionel Sambuc {
4043*11be35a1SLionel Sambuc int rows, cols;
4044*11be35a1SLionel Sambuc
4045*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4046*11be35a1SLionel Sambuc return;
4047*11be35a1SLionel Sambuc
4048*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &rows) == 0) {
4049*11be35a1SLionel Sambuc report_count(1);
4050*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4051*11be35a1SLionel Sambuc return;
4052*11be35a1SLionel Sambuc }
4053*11be35a1SLionel Sambuc
4054*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &cols) == 0) {
4055*11be35a1SLionel Sambuc report_count(1);
4056*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4057*11be35a1SLionel Sambuc return;
4058*11be35a1SLionel Sambuc }
4059*11be35a1SLionel Sambuc
4060*11be35a1SLionel Sambuc report_count(1);
4061*11be35a1SLionel Sambuc report_return(resizeterm(rows, cols));
4062*11be35a1SLionel Sambuc }
4063*11be35a1SLionel Sambuc
4064*11be35a1SLionel Sambuc
4065*11be35a1SLionel Sambuc void
cmd_savetty(int nargs,char ** args)4066*11be35a1SLionel Sambuc cmd_savetty(int nargs, char **args)
4067*11be35a1SLionel Sambuc {
4068*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4069*11be35a1SLionel Sambuc return;
4070*11be35a1SLionel Sambuc
4071*11be35a1SLionel Sambuc report_count(1);
4072*11be35a1SLionel Sambuc report_return(savetty());
4073*11be35a1SLionel Sambuc }
4074*11be35a1SLionel Sambuc
4075*11be35a1SLionel Sambuc
4076*11be35a1SLionel Sambuc void
cmd_scanw(int nargs,char ** args)4077*11be35a1SLionel Sambuc cmd_scanw(int nargs, char **args)
4078*11be35a1SLionel Sambuc {
4079*11be35a1SLionel Sambuc char string[256];
4080*11be35a1SLionel Sambuc
4081*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4082*11be35a1SLionel Sambuc return;
4083*11be35a1SLionel Sambuc
4084*11be35a1SLionel Sambuc /* XXX call2 */
4085*11be35a1SLionel Sambuc report_count(2);
4086*11be35a1SLionel Sambuc report_return(scanw("%s", string));
4087*11be35a1SLionel Sambuc report_status(string);
4088*11be35a1SLionel Sambuc }
4089*11be35a1SLionel Sambuc
4090*11be35a1SLionel Sambuc
4091*11be35a1SLionel Sambuc void
cmd_scroll(int nargs,char ** args)4092*11be35a1SLionel Sambuc cmd_scroll(int nargs, char **args)
4093*11be35a1SLionel Sambuc {
4094*11be35a1SLionel Sambuc WINDOW *win;
4095*11be35a1SLionel Sambuc
4096*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4097*11be35a1SLionel Sambuc return;
4098*11be35a1SLionel Sambuc
4099*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4100*11be35a1SLionel Sambuc report_count(1);
4101*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4102*11be35a1SLionel Sambuc return;
4103*11be35a1SLionel Sambuc }
4104*11be35a1SLionel Sambuc
4105*11be35a1SLionel Sambuc report_count(1);
4106*11be35a1SLionel Sambuc report_return(scroll(win));
4107*11be35a1SLionel Sambuc }
4108*11be35a1SLionel Sambuc
4109*11be35a1SLionel Sambuc
4110*11be35a1SLionel Sambuc void
cmd_scrollok(int nargs,char ** args)4111*11be35a1SLionel Sambuc cmd_scrollok(int nargs, char **args)
4112*11be35a1SLionel Sambuc {
4113*11be35a1SLionel Sambuc WINDOW *win;
4114*11be35a1SLionel Sambuc int flag;
4115*11be35a1SLionel Sambuc
4116*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4117*11be35a1SLionel Sambuc return;
4118*11be35a1SLionel Sambuc
4119*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4120*11be35a1SLionel Sambuc report_count(1);
4121*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4122*11be35a1SLionel Sambuc return;
4123*11be35a1SLionel Sambuc }
4124*11be35a1SLionel Sambuc
4125*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &flag) == 0) {
4126*11be35a1SLionel Sambuc report_count(1);
4127*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4128*11be35a1SLionel Sambuc return;
4129*11be35a1SLionel Sambuc }
4130*11be35a1SLionel Sambuc
4131*11be35a1SLionel Sambuc report_count(1);
4132*11be35a1SLionel Sambuc report_return(scrollok(win, flag));
4133*11be35a1SLionel Sambuc }
4134*11be35a1SLionel Sambuc
4135*11be35a1SLionel Sambuc
4136*11be35a1SLionel Sambuc void
cmd_setterm(int nargs,char ** args)4137*11be35a1SLionel Sambuc cmd_setterm(int nargs, char **args)
4138*11be35a1SLionel Sambuc {
4139*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4140*11be35a1SLionel Sambuc return;
4141*11be35a1SLionel Sambuc
4142*11be35a1SLionel Sambuc report_count(1);
4143*11be35a1SLionel Sambuc report_return(setterm(args[0]));
4144*11be35a1SLionel Sambuc }
4145*11be35a1SLionel Sambuc
4146*11be35a1SLionel Sambuc
4147*11be35a1SLionel Sambuc void
cmd_set_term(int nargs,char ** args)4148*11be35a1SLionel Sambuc cmd_set_term(int nargs, char **args)
4149*11be35a1SLionel Sambuc {
4150*11be35a1SLionel Sambuc SCREEN *scrn;
4151*11be35a1SLionel Sambuc
4152*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4153*11be35a1SLionel Sambuc return;
4154*11be35a1SLionel Sambuc
4155*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &scrn) == 0) {
4156*11be35a1SLionel Sambuc report_count(1);
4157*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4158*11be35a1SLionel Sambuc return;
4159*11be35a1SLionel Sambuc }
4160*11be35a1SLionel Sambuc
4161*11be35a1SLionel Sambuc report_count(1);
4162*11be35a1SLionel Sambuc report_ptr(set_term(scrn));
4163*11be35a1SLionel Sambuc }
4164*11be35a1SLionel Sambuc
4165*11be35a1SLionel Sambuc
4166*11be35a1SLionel Sambuc void
cmd_start_color(int nargs,char ** args)4167*11be35a1SLionel Sambuc cmd_start_color(int nargs, char **args)
4168*11be35a1SLionel Sambuc {
4169*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4170*11be35a1SLionel Sambuc return;
4171*11be35a1SLionel Sambuc
4172*11be35a1SLionel Sambuc report_count(1);
4173*11be35a1SLionel Sambuc report_return(start_color());
4174*11be35a1SLionel Sambuc }
4175*11be35a1SLionel Sambuc
4176*11be35a1SLionel Sambuc
4177*11be35a1SLionel Sambuc void
cmd_subpad(int nargs,char ** args)4178*11be35a1SLionel Sambuc cmd_subpad(int nargs, char **args)
4179*11be35a1SLionel Sambuc {
4180*11be35a1SLionel Sambuc WINDOW *pad;
4181*11be35a1SLionel Sambuc int lines, cols, begin_y, begin_x;
4182*11be35a1SLionel Sambuc
4183*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
4184*11be35a1SLionel Sambuc return;
4185*11be35a1SLionel Sambuc
4186*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &pad) == 0) {
4187*11be35a1SLionel Sambuc report_count(1);
4188*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4189*11be35a1SLionel Sambuc return;
4190*11be35a1SLionel Sambuc }
4191*11be35a1SLionel Sambuc
4192*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &lines) == 0) {
4193*11be35a1SLionel Sambuc report_count(1);
4194*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4195*11be35a1SLionel Sambuc return;
4196*11be35a1SLionel Sambuc }
4197*11be35a1SLionel Sambuc
4198*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &cols) == 0) {
4199*11be35a1SLionel Sambuc report_count(1);
4200*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4201*11be35a1SLionel Sambuc return;
4202*11be35a1SLionel Sambuc }
4203*11be35a1SLionel Sambuc
4204*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &begin_y) == 0) {
4205*11be35a1SLionel Sambuc report_count(1);
4206*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4207*11be35a1SLionel Sambuc return;
4208*11be35a1SLionel Sambuc }
4209*11be35a1SLionel Sambuc
4210*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &begin_x) == 0) {
4211*11be35a1SLionel Sambuc report_count(1);
4212*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4213*11be35a1SLionel Sambuc return;
4214*11be35a1SLionel Sambuc }
4215*11be35a1SLionel Sambuc
4216*11be35a1SLionel Sambuc report_count(1);
4217*11be35a1SLionel Sambuc report_ptr(subpad(pad, lines, cols, begin_y, begin_x));
4218*11be35a1SLionel Sambuc }
4219*11be35a1SLionel Sambuc
4220*11be35a1SLionel Sambuc
4221*11be35a1SLionel Sambuc void
cmd_subwin(int nargs,char ** args)4222*11be35a1SLionel Sambuc cmd_subwin(int nargs, char **args)
4223*11be35a1SLionel Sambuc {
4224*11be35a1SLionel Sambuc WINDOW *win;
4225*11be35a1SLionel Sambuc int lines, cols, begin_y, begin_x;
4226*11be35a1SLionel Sambuc
4227*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
4228*11be35a1SLionel Sambuc return;
4229*11be35a1SLionel Sambuc
4230*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4231*11be35a1SLionel Sambuc report_count(1);
4232*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4233*11be35a1SLionel Sambuc return;
4234*11be35a1SLionel Sambuc }
4235*11be35a1SLionel Sambuc
4236*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &lines) == 0) {
4237*11be35a1SLionel Sambuc report_count(1);
4238*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4239*11be35a1SLionel Sambuc return;
4240*11be35a1SLionel Sambuc }
4241*11be35a1SLionel Sambuc
4242*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &cols) == 0) {
4243*11be35a1SLionel Sambuc report_count(1);
4244*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4245*11be35a1SLionel Sambuc return;
4246*11be35a1SLionel Sambuc }
4247*11be35a1SLionel Sambuc
4248*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &begin_y) == 0) {
4249*11be35a1SLionel Sambuc report_count(1);
4250*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4251*11be35a1SLionel Sambuc return;
4252*11be35a1SLionel Sambuc }
4253*11be35a1SLionel Sambuc
4254*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &begin_x) == 0) {
4255*11be35a1SLionel Sambuc report_count(1);
4256*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4257*11be35a1SLionel Sambuc return;
4258*11be35a1SLionel Sambuc }
4259*11be35a1SLionel Sambuc
4260*11be35a1SLionel Sambuc report_count(1);
4261*11be35a1SLionel Sambuc report_ptr(subwin(win, lines, cols, begin_y, begin_x));
4262*11be35a1SLionel Sambuc }
4263*11be35a1SLionel Sambuc
4264*11be35a1SLionel Sambuc
4265*11be35a1SLionel Sambuc void
cmd_termattrs(int nargs,char ** args)4266*11be35a1SLionel Sambuc cmd_termattrs(int nargs, char **args)
4267*11be35a1SLionel Sambuc {
4268*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4269*11be35a1SLionel Sambuc return;
4270*11be35a1SLionel Sambuc
4271*11be35a1SLionel Sambuc report_count(1);
4272*11be35a1SLionel Sambuc report_int(termattrs());
4273*11be35a1SLionel Sambuc }
4274*11be35a1SLionel Sambuc
4275*11be35a1SLionel Sambuc
4276*11be35a1SLionel Sambuc void
cmd_term_attrs(int nargs,char ** args)4277*11be35a1SLionel Sambuc cmd_term_attrs(int nargs, char **args)
4278*11be35a1SLionel Sambuc {
4279*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4280*11be35a1SLionel Sambuc return;
4281*11be35a1SLionel Sambuc
4282*11be35a1SLionel Sambuc report_count(1);
4283*11be35a1SLionel Sambuc report_int(term_attrs());
4284*11be35a1SLionel Sambuc }
4285*11be35a1SLionel Sambuc
4286*11be35a1SLionel Sambuc
4287*11be35a1SLionel Sambuc void
cmd_touchline(int nargs,char ** args)4288*11be35a1SLionel Sambuc cmd_touchline(int nargs, char **args)
4289*11be35a1SLionel Sambuc {
4290*11be35a1SLionel Sambuc WINDOW *win;
4291*11be35a1SLionel Sambuc int start, count;
4292*11be35a1SLionel Sambuc
4293*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
4294*11be35a1SLionel Sambuc return;
4295*11be35a1SLionel Sambuc
4296*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4297*11be35a1SLionel Sambuc report_count(1);
4298*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4299*11be35a1SLionel Sambuc return;
4300*11be35a1SLionel Sambuc }
4301*11be35a1SLionel Sambuc
4302*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &start) == 0) {
4303*11be35a1SLionel Sambuc report_count(1);
4304*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4305*11be35a1SLionel Sambuc return;
4306*11be35a1SLionel Sambuc }
4307*11be35a1SLionel Sambuc
4308*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
4309*11be35a1SLionel Sambuc report_count(1);
4310*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4311*11be35a1SLionel Sambuc return;
4312*11be35a1SLionel Sambuc }
4313*11be35a1SLionel Sambuc
4314*11be35a1SLionel Sambuc report_count(1);
4315*11be35a1SLionel Sambuc report_return(touchline(win, start, count));
4316*11be35a1SLionel Sambuc }
4317*11be35a1SLionel Sambuc
4318*11be35a1SLionel Sambuc
4319*11be35a1SLionel Sambuc void
cmd_touchoverlap(int nargs,char ** args)4320*11be35a1SLionel Sambuc cmd_touchoverlap(int nargs, char **args)
4321*11be35a1SLionel Sambuc {
4322*11be35a1SLionel Sambuc WINDOW *win1, *win2;
4323*11be35a1SLionel Sambuc
4324*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4325*11be35a1SLionel Sambuc return;
4326*11be35a1SLionel Sambuc
4327*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win1) == 0) {
4328*11be35a1SLionel Sambuc report_count(1);
4329*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4330*11be35a1SLionel Sambuc return;
4331*11be35a1SLionel Sambuc }
4332*11be35a1SLionel Sambuc
4333*11be35a1SLionel Sambuc if (sscanf(args[1], "%p", &win2) == 0) {
4334*11be35a1SLionel Sambuc report_count(1);
4335*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4336*11be35a1SLionel Sambuc return;
4337*11be35a1SLionel Sambuc }
4338*11be35a1SLionel Sambuc
4339*11be35a1SLionel Sambuc report_count(1);
4340*11be35a1SLionel Sambuc report_return(touchoverlap(win1, win2));
4341*11be35a1SLionel Sambuc }
4342*11be35a1SLionel Sambuc
4343*11be35a1SLionel Sambuc
4344*11be35a1SLionel Sambuc void
cmd_touchwin(int nargs,char ** args)4345*11be35a1SLionel Sambuc cmd_touchwin(int nargs, char **args)
4346*11be35a1SLionel Sambuc {
4347*11be35a1SLionel Sambuc WINDOW *win;
4348*11be35a1SLionel Sambuc
4349*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4350*11be35a1SLionel Sambuc return;
4351*11be35a1SLionel Sambuc
4352*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4353*11be35a1SLionel Sambuc report_count(1);
4354*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4355*11be35a1SLionel Sambuc return;
4356*11be35a1SLionel Sambuc }
4357*11be35a1SLionel Sambuc
4358*11be35a1SLionel Sambuc report_count(1);
4359*11be35a1SLionel Sambuc report_return(touchwin(win));
4360*11be35a1SLionel Sambuc }
4361*11be35a1SLionel Sambuc
4362*11be35a1SLionel Sambuc
4363*11be35a1SLionel Sambuc void
cmd_ungetch(int nargs,char ** args)4364*11be35a1SLionel Sambuc cmd_ungetch(int nargs, char **args)
4365*11be35a1SLionel Sambuc {
4366*11be35a1SLionel Sambuc int ch;
4367*11be35a1SLionel Sambuc
4368*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4369*11be35a1SLionel Sambuc return;
4370*11be35a1SLionel Sambuc
4371*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &ch) == 0) {
4372*11be35a1SLionel Sambuc report_count(1);
4373*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4374*11be35a1SLionel Sambuc return;
4375*11be35a1SLionel Sambuc }
4376*11be35a1SLionel Sambuc
4377*11be35a1SLionel Sambuc report_count(1);
4378*11be35a1SLionel Sambuc report_return(ungetch(ch));
4379*11be35a1SLionel Sambuc }
4380*11be35a1SLionel Sambuc
4381*11be35a1SLionel Sambuc
4382*11be35a1SLionel Sambuc void
cmd_untouchwin(int nargs,char ** args)4383*11be35a1SLionel Sambuc cmd_untouchwin(int nargs, char **args)
4384*11be35a1SLionel Sambuc {
4385*11be35a1SLionel Sambuc WINDOW *win;
4386*11be35a1SLionel Sambuc
4387*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4388*11be35a1SLionel Sambuc return;
4389*11be35a1SLionel Sambuc
4390*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4391*11be35a1SLionel Sambuc report_count(1);
4392*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4393*11be35a1SLionel Sambuc return;
4394*11be35a1SLionel Sambuc }
4395*11be35a1SLionel Sambuc
4396*11be35a1SLionel Sambuc report_count(1);
4397*11be35a1SLionel Sambuc report_return(untouchwin(win));
4398*11be35a1SLionel Sambuc }
4399*11be35a1SLionel Sambuc
4400*11be35a1SLionel Sambuc
4401*11be35a1SLionel Sambuc void
cmd_use_default_colors(int nargs,char ** args)4402*11be35a1SLionel Sambuc cmd_use_default_colors(int nargs, char **args)
4403*11be35a1SLionel Sambuc {
4404*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
4405*11be35a1SLionel Sambuc return;
4406*11be35a1SLionel Sambuc
4407*11be35a1SLionel Sambuc report_count(1);
4408*11be35a1SLionel Sambuc report_return(use_default_colors());
4409*11be35a1SLionel Sambuc }
4410*11be35a1SLionel Sambuc
4411*11be35a1SLionel Sambuc
4412*11be35a1SLionel Sambuc void
cmd_vline(int nargs,char ** args)4413*11be35a1SLionel Sambuc cmd_vline(int nargs, char **args)
4414*11be35a1SLionel Sambuc {
4415*11be35a1SLionel Sambuc int count;
4416*11be35a1SLionel Sambuc chtype *ch;
4417*11be35a1SLionel Sambuc
4418*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4419*11be35a1SLionel Sambuc return;
4420*11be35a1SLionel Sambuc
4421*11be35a1SLionel Sambuc ch = (chtype *) args[0];
4422*11be35a1SLionel Sambuc
4423*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
4424*11be35a1SLionel Sambuc report_count(1);
4425*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4426*11be35a1SLionel Sambuc return;
4427*11be35a1SLionel Sambuc }
4428*11be35a1SLionel Sambuc
4429*11be35a1SLionel Sambuc report_count(1);
4430*11be35a1SLionel Sambuc report_return(vline(ch[0], count));
4431*11be35a1SLionel Sambuc }
4432*11be35a1SLionel Sambuc
4433*11be35a1SLionel Sambuc
4434*11be35a1SLionel Sambuc static int
internal_vw_printw(WINDOW * win,char * arg1,...)4435*11be35a1SLionel Sambuc internal_vw_printw(WINDOW *win, char *arg1, ...)
4436*11be35a1SLionel Sambuc {
4437*11be35a1SLionel Sambuc va_list va;
4438*11be35a1SLionel Sambuc int rv;
4439*11be35a1SLionel Sambuc
4440*11be35a1SLionel Sambuc va_start(va, arg1);
4441*11be35a1SLionel Sambuc rv = vw_printw(win, arg1, va);
4442*11be35a1SLionel Sambuc va_end(va);
4443*11be35a1SLionel Sambuc
4444*11be35a1SLionel Sambuc return rv;
4445*11be35a1SLionel Sambuc }
4446*11be35a1SLionel Sambuc
4447*11be35a1SLionel Sambuc void
cmd_vw_printw(int nargs,char ** args)4448*11be35a1SLionel Sambuc cmd_vw_printw(int nargs, char **args)
4449*11be35a1SLionel Sambuc {
4450*11be35a1SLionel Sambuc WINDOW *win;
4451*11be35a1SLionel Sambuc
4452*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
4453*11be35a1SLionel Sambuc return;
4454*11be35a1SLionel Sambuc
4455*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4456*11be35a1SLionel Sambuc report_count(1);
4457*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4458*11be35a1SLionel Sambuc return;
4459*11be35a1SLionel Sambuc }
4460*11be35a1SLionel Sambuc
4461*11be35a1SLionel Sambuc report_count(1);
4462*11be35a1SLionel Sambuc report_return(internal_vw_printw(win, args[1], args[2]));
4463*11be35a1SLionel Sambuc }
4464*11be35a1SLionel Sambuc
4465*11be35a1SLionel Sambuc
4466*11be35a1SLionel Sambuc static int
internal_vw_scanw(WINDOW * win,char * arg1,...)4467*11be35a1SLionel Sambuc internal_vw_scanw(WINDOW *win, char *arg1, ...)
4468*11be35a1SLionel Sambuc {
4469*11be35a1SLionel Sambuc va_list va;
4470*11be35a1SLionel Sambuc int rv;
4471*11be35a1SLionel Sambuc
4472*11be35a1SLionel Sambuc va_start(va, arg1);
4473*11be35a1SLionel Sambuc rv = vw_scanw(win, arg1, va);
4474*11be35a1SLionel Sambuc va_end(va);
4475*11be35a1SLionel Sambuc
4476*11be35a1SLionel Sambuc return rv;
4477*11be35a1SLionel Sambuc }
4478*11be35a1SLionel Sambuc
4479*11be35a1SLionel Sambuc void
cmd_vw_scanw(int nargs,char ** args)4480*11be35a1SLionel Sambuc cmd_vw_scanw(int nargs, char **args)
4481*11be35a1SLionel Sambuc {
4482*11be35a1SLionel Sambuc WINDOW *win;
4483*11be35a1SLionel Sambuc char string[256];
4484*11be35a1SLionel Sambuc
4485*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4486*11be35a1SLionel Sambuc return;
4487*11be35a1SLionel Sambuc
4488*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4489*11be35a1SLionel Sambuc report_count(1);
4490*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4491*11be35a1SLionel Sambuc return;
4492*11be35a1SLionel Sambuc }
4493*11be35a1SLionel Sambuc
4494*11be35a1SLionel Sambuc /* XXX - call2 */
4495*11be35a1SLionel Sambuc report_count(2);
4496*11be35a1SLionel Sambuc report_int(internal_vw_scanw(win, args[1], string));
4497*11be35a1SLionel Sambuc report_status(string);
4498*11be35a1SLionel Sambuc }
4499*11be35a1SLionel Sambuc
4500*11be35a1SLionel Sambuc
4501*11be35a1SLionel Sambuc void
cmd_vwprintw(int nargs,char ** args)4502*11be35a1SLionel Sambuc cmd_vwprintw(int nargs, char **args)
4503*11be35a1SLionel Sambuc {
4504*11be35a1SLionel Sambuc cmd_vw_printw(nargs, args);
4505*11be35a1SLionel Sambuc }
4506*11be35a1SLionel Sambuc
4507*11be35a1SLionel Sambuc
4508*11be35a1SLionel Sambuc void
cmd_vwscanw(int nargs,char ** args)4509*11be35a1SLionel Sambuc cmd_vwscanw(int nargs, char **args)
4510*11be35a1SLionel Sambuc {
4511*11be35a1SLionel Sambuc cmd_vw_scanw(nargs, args);
4512*11be35a1SLionel Sambuc }
4513*11be35a1SLionel Sambuc
4514*11be35a1SLionel Sambuc
4515*11be35a1SLionel Sambuc void
cmd_waddch(int nargs,char ** args)4516*11be35a1SLionel Sambuc cmd_waddch(int nargs, char **args)
4517*11be35a1SLionel Sambuc {
4518*11be35a1SLionel Sambuc WINDOW *win;
4519*11be35a1SLionel Sambuc chtype *ch;
4520*11be35a1SLionel Sambuc
4521*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4522*11be35a1SLionel Sambuc return;
4523*11be35a1SLionel Sambuc
4524*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4525*11be35a1SLionel Sambuc report_count(1);
4526*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4527*11be35a1SLionel Sambuc return;
4528*11be35a1SLionel Sambuc }
4529*11be35a1SLionel Sambuc
4530*11be35a1SLionel Sambuc ch = (chtype *) args[1];
4531*11be35a1SLionel Sambuc
4532*11be35a1SLionel Sambuc report_count(1);
4533*11be35a1SLionel Sambuc report_return(waddch(win, ch[0]));
4534*11be35a1SLionel Sambuc }
4535*11be35a1SLionel Sambuc
4536*11be35a1SLionel Sambuc
4537*11be35a1SLionel Sambuc void
cmd_waddchnstr(int nargs,char ** args)4538*11be35a1SLionel Sambuc cmd_waddchnstr(int nargs, char **args)
4539*11be35a1SLionel Sambuc {
4540*11be35a1SLionel Sambuc WINDOW *win;
4541*11be35a1SLionel Sambuc int count;
4542*11be35a1SLionel Sambuc
4543*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
4544*11be35a1SLionel Sambuc return;
4545*11be35a1SLionel Sambuc
4546*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4547*11be35a1SLionel Sambuc report_count(1);
4548*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4549*11be35a1SLionel Sambuc return;
4550*11be35a1SLionel Sambuc }
4551*11be35a1SLionel Sambuc
4552*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
4553*11be35a1SLionel Sambuc report_count(1);
4554*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4555*11be35a1SLionel Sambuc return;
4556*11be35a1SLionel Sambuc }
4557*11be35a1SLionel Sambuc
4558*11be35a1SLionel Sambuc report_count(1);
4559*11be35a1SLionel Sambuc report_return(waddchnstr(win, (chtype *) args[1], count));
4560*11be35a1SLionel Sambuc }
4561*11be35a1SLionel Sambuc
4562*11be35a1SLionel Sambuc
4563*11be35a1SLionel Sambuc void
cmd_waddchstr(int nargs,char ** args)4564*11be35a1SLionel Sambuc cmd_waddchstr(int nargs, char **args)
4565*11be35a1SLionel Sambuc {
4566*11be35a1SLionel Sambuc WINDOW *win;
4567*11be35a1SLionel Sambuc
4568*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4569*11be35a1SLionel Sambuc return;
4570*11be35a1SLionel Sambuc
4571*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4572*11be35a1SLionel Sambuc report_count(1);
4573*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4574*11be35a1SLionel Sambuc return;
4575*11be35a1SLionel Sambuc }
4576*11be35a1SLionel Sambuc
4577*11be35a1SLionel Sambuc report_count(1);
4578*11be35a1SLionel Sambuc report_return(waddchstr(win, (chtype *) args[1]));
4579*11be35a1SLionel Sambuc }
4580*11be35a1SLionel Sambuc
4581*11be35a1SLionel Sambuc
4582*11be35a1SLionel Sambuc void
cmd_waddnstr(int nargs,char ** args)4583*11be35a1SLionel Sambuc cmd_waddnstr(int nargs, char **args)
4584*11be35a1SLionel Sambuc {
4585*11be35a1SLionel Sambuc WINDOW *win;
4586*11be35a1SLionel Sambuc int count;
4587*11be35a1SLionel Sambuc
4588*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 3)
4589*11be35a1SLionel Sambuc return;
4590*11be35a1SLionel Sambuc
4591*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4592*11be35a1SLionel Sambuc report_count(1);
4593*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4594*11be35a1SLionel Sambuc return;
4595*11be35a1SLionel Sambuc }
4596*11be35a1SLionel Sambuc
4597*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
4598*11be35a1SLionel Sambuc report_count(1);
4599*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4600*11be35a1SLionel Sambuc return;
4601*11be35a1SLionel Sambuc }
4602*11be35a1SLionel Sambuc
4603*11be35a1SLionel Sambuc report_count(1);
4604*11be35a1SLionel Sambuc report_return(waddnstr(win, args[1], count));
4605*11be35a1SLionel Sambuc
4606*11be35a1SLionel Sambuc }
4607*11be35a1SLionel Sambuc
4608*11be35a1SLionel Sambuc
4609*11be35a1SLionel Sambuc void
cmd_wattr_get(int nargs,char ** args)4610*11be35a1SLionel Sambuc cmd_wattr_get(int nargs, char **args)
4611*11be35a1SLionel Sambuc {
4612*11be35a1SLionel Sambuc WINDOW *win;
4613*11be35a1SLionel Sambuc int attr;
4614*11be35a1SLionel Sambuc short pair;
4615*11be35a1SLionel Sambuc
4616*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4617*11be35a1SLionel Sambuc return;
4618*11be35a1SLionel Sambuc
4619*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4620*11be35a1SLionel Sambuc report_count(1);
4621*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4622*11be35a1SLionel Sambuc return;
4623*11be35a1SLionel Sambuc }
4624*11be35a1SLionel Sambuc
4625*11be35a1SLionel Sambuc /* XXX - call3 */
4626*11be35a1SLionel Sambuc report_count(3);
4627*11be35a1SLionel Sambuc report_return(wattr_get(win, &attr, &pair, NULL));
4628*11be35a1SLionel Sambuc report_int(attr);
4629*11be35a1SLionel Sambuc report_int(pair);
4630*11be35a1SLionel Sambuc }
4631*11be35a1SLionel Sambuc
4632*11be35a1SLionel Sambuc
4633*11be35a1SLionel Sambuc void
cmd_wattr_off(int nargs,char ** args)4634*11be35a1SLionel Sambuc cmd_wattr_off(int nargs, char **args)
4635*11be35a1SLionel Sambuc {
4636*11be35a1SLionel Sambuc WINDOW *win;
4637*11be35a1SLionel Sambuc int attr;
4638*11be35a1SLionel Sambuc
4639*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4640*11be35a1SLionel Sambuc return;
4641*11be35a1SLionel Sambuc
4642*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4643*11be35a1SLionel Sambuc report_count(1);
4644*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4645*11be35a1SLionel Sambuc return;
4646*11be35a1SLionel Sambuc }
4647*11be35a1SLionel Sambuc
4648*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
4649*11be35a1SLionel Sambuc report_count(1);
4650*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4651*11be35a1SLionel Sambuc return;
4652*11be35a1SLionel Sambuc }
4653*11be35a1SLionel Sambuc
4654*11be35a1SLionel Sambuc report_count(1);
4655*11be35a1SLionel Sambuc report_return(wattr_off(win, attr, NULL));
4656*11be35a1SLionel Sambuc }
4657*11be35a1SLionel Sambuc
4658*11be35a1SLionel Sambuc
4659*11be35a1SLionel Sambuc void
cmd_wattr_on(int nargs,char ** args)4660*11be35a1SLionel Sambuc cmd_wattr_on(int nargs, char **args)
4661*11be35a1SLionel Sambuc {
4662*11be35a1SLionel Sambuc WINDOW *win;
4663*11be35a1SLionel Sambuc int attr;
4664*11be35a1SLionel Sambuc
4665*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4666*11be35a1SLionel Sambuc return;
4667*11be35a1SLionel Sambuc
4668*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4669*11be35a1SLionel Sambuc report_count(1);
4670*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4671*11be35a1SLionel Sambuc return;
4672*11be35a1SLionel Sambuc }
4673*11be35a1SLionel Sambuc
4674*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
4675*11be35a1SLionel Sambuc report_count(1);
4676*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4677*11be35a1SLionel Sambuc return;
4678*11be35a1SLionel Sambuc }
4679*11be35a1SLionel Sambuc
4680*11be35a1SLionel Sambuc report_count(1);
4681*11be35a1SLionel Sambuc report_return(wattr_on(win, attr, NULL));
4682*11be35a1SLionel Sambuc }
4683*11be35a1SLionel Sambuc
4684*11be35a1SLionel Sambuc
4685*11be35a1SLionel Sambuc void
cmd_wattr_set(int nargs,char ** args)4686*11be35a1SLionel Sambuc cmd_wattr_set(int nargs, char **args)
4687*11be35a1SLionel Sambuc {
4688*11be35a1SLionel Sambuc WINDOW *win;
4689*11be35a1SLionel Sambuc int attr;
4690*11be35a1SLionel Sambuc short pair;
4691*11be35a1SLionel Sambuc
4692*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
4693*11be35a1SLionel Sambuc return;
4694*11be35a1SLionel Sambuc
4695*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4696*11be35a1SLionel Sambuc report_count(1);
4697*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4698*11be35a1SLionel Sambuc return;
4699*11be35a1SLionel Sambuc }
4700*11be35a1SLionel Sambuc
4701*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
4702*11be35a1SLionel Sambuc report_count(1);
4703*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4704*11be35a1SLionel Sambuc return;
4705*11be35a1SLionel Sambuc }
4706*11be35a1SLionel Sambuc
4707*11be35a1SLionel Sambuc if (sscanf(args[2], "%hd", &pair) == 0) {
4708*11be35a1SLionel Sambuc report_count(1);
4709*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4710*11be35a1SLionel Sambuc return;
4711*11be35a1SLionel Sambuc }
4712*11be35a1SLionel Sambuc
4713*11be35a1SLionel Sambuc report_count(1);
4714*11be35a1SLionel Sambuc report_return(wattr_set(win, attr, pair, NULL));
4715*11be35a1SLionel Sambuc }
4716*11be35a1SLionel Sambuc
4717*11be35a1SLionel Sambuc
4718*11be35a1SLionel Sambuc void
cmd_wattroff(int nargs,char ** args)4719*11be35a1SLionel Sambuc cmd_wattroff(int nargs, char **args)
4720*11be35a1SLionel Sambuc {
4721*11be35a1SLionel Sambuc WINDOW *win;
4722*11be35a1SLionel Sambuc int attr;
4723*11be35a1SLionel Sambuc
4724*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4725*11be35a1SLionel Sambuc return;
4726*11be35a1SLionel Sambuc
4727*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4728*11be35a1SLionel Sambuc report_count(1);
4729*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4730*11be35a1SLionel Sambuc return;
4731*11be35a1SLionel Sambuc }
4732*11be35a1SLionel Sambuc
4733*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
4734*11be35a1SLionel Sambuc report_count(1);
4735*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4736*11be35a1SLionel Sambuc return;
4737*11be35a1SLionel Sambuc }
4738*11be35a1SLionel Sambuc
4739*11be35a1SLionel Sambuc report_count(1);
4740*11be35a1SLionel Sambuc report_return(wattroff(win, attr));
4741*11be35a1SLionel Sambuc }
4742*11be35a1SLionel Sambuc
4743*11be35a1SLionel Sambuc
4744*11be35a1SLionel Sambuc void
cmd_wattron(int nargs,char ** args)4745*11be35a1SLionel Sambuc cmd_wattron(int nargs, char **args)
4746*11be35a1SLionel Sambuc {
4747*11be35a1SLionel Sambuc WINDOW *win;
4748*11be35a1SLionel Sambuc int attr;
4749*11be35a1SLionel Sambuc
4750*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4751*11be35a1SLionel Sambuc return;
4752*11be35a1SLionel Sambuc
4753*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4754*11be35a1SLionel Sambuc report_count(1);
4755*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4756*11be35a1SLionel Sambuc return;
4757*11be35a1SLionel Sambuc }
4758*11be35a1SLionel Sambuc
4759*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
4760*11be35a1SLionel Sambuc report_count(1);
4761*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4762*11be35a1SLionel Sambuc return;
4763*11be35a1SLionel Sambuc }
4764*11be35a1SLionel Sambuc
4765*11be35a1SLionel Sambuc report_count(1);
4766*11be35a1SLionel Sambuc report_return(wattron(win, attr));
4767*11be35a1SLionel Sambuc }
4768*11be35a1SLionel Sambuc
4769*11be35a1SLionel Sambuc
4770*11be35a1SLionel Sambuc void
cmd_wattrset(int nargs,char ** args)4771*11be35a1SLionel Sambuc cmd_wattrset(int nargs, char **args)
4772*11be35a1SLionel Sambuc {
4773*11be35a1SLionel Sambuc WINDOW *win;
4774*11be35a1SLionel Sambuc int attr;
4775*11be35a1SLionel Sambuc
4776*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4777*11be35a1SLionel Sambuc return;
4778*11be35a1SLionel Sambuc
4779*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4780*11be35a1SLionel Sambuc report_count(1);
4781*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4782*11be35a1SLionel Sambuc return;
4783*11be35a1SLionel Sambuc }
4784*11be35a1SLionel Sambuc
4785*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
4786*11be35a1SLionel Sambuc report_count(1);
4787*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4788*11be35a1SLionel Sambuc return;
4789*11be35a1SLionel Sambuc }
4790*11be35a1SLionel Sambuc
4791*11be35a1SLionel Sambuc report_count(1);
4792*11be35a1SLionel Sambuc report_return(wattrset(win, attr));
4793*11be35a1SLionel Sambuc }
4794*11be35a1SLionel Sambuc
4795*11be35a1SLionel Sambuc
4796*11be35a1SLionel Sambuc void
cmd_wbkgd(int nargs,char ** args)4797*11be35a1SLionel Sambuc cmd_wbkgd(int nargs, char **args)
4798*11be35a1SLionel Sambuc {
4799*11be35a1SLionel Sambuc WINDOW *win;
4800*11be35a1SLionel Sambuc chtype *ch;
4801*11be35a1SLionel Sambuc
4802*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4803*11be35a1SLionel Sambuc return;
4804*11be35a1SLionel Sambuc
4805*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4806*11be35a1SLionel Sambuc report_count(1);
4807*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4808*11be35a1SLionel Sambuc return;
4809*11be35a1SLionel Sambuc }
4810*11be35a1SLionel Sambuc
4811*11be35a1SLionel Sambuc ch = (chtype *) args[1];
4812*11be35a1SLionel Sambuc report_count(1);
4813*11be35a1SLionel Sambuc report_return(wbkgd(win, ch[0]));
4814*11be35a1SLionel Sambuc }
4815*11be35a1SLionel Sambuc
4816*11be35a1SLionel Sambuc
4817*11be35a1SLionel Sambuc void
cmd_wbkgdset(int nargs,char ** args)4818*11be35a1SLionel Sambuc cmd_wbkgdset(int nargs, char **args)
4819*11be35a1SLionel Sambuc {
4820*11be35a1SLionel Sambuc WINDOW *win;
4821*11be35a1SLionel Sambuc int ch;
4822*11be35a1SLionel Sambuc
4823*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4824*11be35a1SLionel Sambuc return;
4825*11be35a1SLionel Sambuc
4826*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4827*11be35a1SLionel Sambuc report_count(1);
4828*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4829*11be35a1SLionel Sambuc return;
4830*11be35a1SLionel Sambuc }
4831*11be35a1SLionel Sambuc
4832*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &ch) == 0) {
4833*11be35a1SLionel Sambuc report_count(1);
4834*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4835*11be35a1SLionel Sambuc return;
4836*11be35a1SLionel Sambuc }
4837*11be35a1SLionel Sambuc
4838*11be35a1SLionel Sambuc wbkgdset(win, ch); /* void return */
4839*11be35a1SLionel Sambuc report_count(1);
4840*11be35a1SLionel Sambuc report_return(OK);
4841*11be35a1SLionel Sambuc }
4842*11be35a1SLionel Sambuc
4843*11be35a1SLionel Sambuc
4844*11be35a1SLionel Sambuc void
cmd_wborder(int nargs,char ** args)4845*11be35a1SLionel Sambuc cmd_wborder(int nargs, char **args)
4846*11be35a1SLionel Sambuc {
4847*11be35a1SLionel Sambuc WINDOW *win;
4848*11be35a1SLionel Sambuc int ls, rs, ts, bs, tl, tr, bl, br;
4849*11be35a1SLionel Sambuc
4850*11be35a1SLionel Sambuc if (check_arg_count(nargs, 9) == 1)
4851*11be35a1SLionel Sambuc return;
4852*11be35a1SLionel Sambuc
4853*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4854*11be35a1SLionel Sambuc report_count(1);
4855*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4856*11be35a1SLionel Sambuc return;
4857*11be35a1SLionel Sambuc }
4858*11be35a1SLionel Sambuc
4859*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &ls) == 0) {
4860*11be35a1SLionel Sambuc report_count(1);
4861*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4862*11be35a1SLionel Sambuc return;
4863*11be35a1SLionel Sambuc }
4864*11be35a1SLionel Sambuc
4865*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &rs) == 0) {
4866*11be35a1SLionel Sambuc report_count(1);
4867*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4868*11be35a1SLionel Sambuc return;
4869*11be35a1SLionel Sambuc }
4870*11be35a1SLionel Sambuc
4871*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &ts) == 0) {
4872*11be35a1SLionel Sambuc report_count(1);
4873*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4874*11be35a1SLionel Sambuc return;
4875*11be35a1SLionel Sambuc }
4876*11be35a1SLionel Sambuc
4877*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &bs) == 0) {
4878*11be35a1SLionel Sambuc report_count(1);
4879*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4880*11be35a1SLionel Sambuc return;
4881*11be35a1SLionel Sambuc }
4882*11be35a1SLionel Sambuc
4883*11be35a1SLionel Sambuc if (sscanf(args[5], "%d", &tl) == 0) {
4884*11be35a1SLionel Sambuc report_count(1);
4885*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4886*11be35a1SLionel Sambuc return;
4887*11be35a1SLionel Sambuc }
4888*11be35a1SLionel Sambuc
4889*11be35a1SLionel Sambuc if (sscanf(args[6], "%d", &tr) == 0) {
4890*11be35a1SLionel Sambuc report_count(1);
4891*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4892*11be35a1SLionel Sambuc return;
4893*11be35a1SLionel Sambuc }
4894*11be35a1SLionel Sambuc
4895*11be35a1SLionel Sambuc if (sscanf(args[7], "%d", &bl) == 0) {
4896*11be35a1SLionel Sambuc report_count(1);
4897*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4898*11be35a1SLionel Sambuc return;
4899*11be35a1SLionel Sambuc }
4900*11be35a1SLionel Sambuc
4901*11be35a1SLionel Sambuc if (sscanf(args[8], "%d", &br) == 0) {
4902*11be35a1SLionel Sambuc report_count(1);
4903*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4904*11be35a1SLionel Sambuc return;
4905*11be35a1SLionel Sambuc }
4906*11be35a1SLionel Sambuc
4907*11be35a1SLionel Sambuc report_count(1);
4908*11be35a1SLionel Sambuc report_return(wborder(win, ls, rs, ts, bs, tl, tr, bl, br));
4909*11be35a1SLionel Sambuc }
4910*11be35a1SLionel Sambuc
4911*11be35a1SLionel Sambuc
4912*11be35a1SLionel Sambuc void
cmd_wclear(int nargs,char ** args)4913*11be35a1SLionel Sambuc cmd_wclear(int nargs, char **args)
4914*11be35a1SLionel Sambuc {
4915*11be35a1SLionel Sambuc WINDOW *win;
4916*11be35a1SLionel Sambuc
4917*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4918*11be35a1SLionel Sambuc return;
4919*11be35a1SLionel Sambuc
4920*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4921*11be35a1SLionel Sambuc report_count(1);
4922*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4923*11be35a1SLionel Sambuc return;
4924*11be35a1SLionel Sambuc }
4925*11be35a1SLionel Sambuc
4926*11be35a1SLionel Sambuc report_count(1);
4927*11be35a1SLionel Sambuc report_return(wclear(win));
4928*11be35a1SLionel Sambuc }
4929*11be35a1SLionel Sambuc
4930*11be35a1SLionel Sambuc
4931*11be35a1SLionel Sambuc void
cmd_wclrtobot(int nargs,char ** args)4932*11be35a1SLionel Sambuc cmd_wclrtobot(int nargs, char **args)
4933*11be35a1SLionel Sambuc {
4934*11be35a1SLionel Sambuc WINDOW *win;
4935*11be35a1SLionel Sambuc
4936*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4937*11be35a1SLionel Sambuc return;
4938*11be35a1SLionel Sambuc
4939*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4940*11be35a1SLionel Sambuc report_count(1);
4941*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4942*11be35a1SLionel Sambuc return;
4943*11be35a1SLionel Sambuc }
4944*11be35a1SLionel Sambuc
4945*11be35a1SLionel Sambuc report_count(1);
4946*11be35a1SLionel Sambuc report_return(wclrtobot(win));
4947*11be35a1SLionel Sambuc }
4948*11be35a1SLionel Sambuc
4949*11be35a1SLionel Sambuc
4950*11be35a1SLionel Sambuc void
cmd_wclrtoeol(int nargs,char ** args)4951*11be35a1SLionel Sambuc cmd_wclrtoeol(int nargs, char **args)
4952*11be35a1SLionel Sambuc {
4953*11be35a1SLionel Sambuc WINDOW *win;
4954*11be35a1SLionel Sambuc
4955*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
4956*11be35a1SLionel Sambuc return;
4957*11be35a1SLionel Sambuc
4958*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4959*11be35a1SLionel Sambuc report_count(1);
4960*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4961*11be35a1SLionel Sambuc return;
4962*11be35a1SLionel Sambuc }
4963*11be35a1SLionel Sambuc
4964*11be35a1SLionel Sambuc report_count(1);
4965*11be35a1SLionel Sambuc report_return(wclrtoeol(win));
4966*11be35a1SLionel Sambuc
4967*11be35a1SLionel Sambuc }
4968*11be35a1SLionel Sambuc
4969*11be35a1SLionel Sambuc
4970*11be35a1SLionel Sambuc void
cmd_wcolor_set(int nargs,char ** args)4971*11be35a1SLionel Sambuc cmd_wcolor_set(int nargs, char **args)
4972*11be35a1SLionel Sambuc {
4973*11be35a1SLionel Sambuc WINDOW *win;
4974*11be35a1SLionel Sambuc short pair;
4975*11be35a1SLionel Sambuc
4976*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
4977*11be35a1SLionel Sambuc return;
4978*11be35a1SLionel Sambuc
4979*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
4980*11be35a1SLionel Sambuc report_count(1);
4981*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4982*11be35a1SLionel Sambuc return;
4983*11be35a1SLionel Sambuc }
4984*11be35a1SLionel Sambuc
4985*11be35a1SLionel Sambuc if (sscanf(args[1], "%hd", &pair) == 0) {
4986*11be35a1SLionel Sambuc report_count(1);
4987*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
4988*11be35a1SLionel Sambuc return;
4989*11be35a1SLionel Sambuc }
4990*11be35a1SLionel Sambuc
4991*11be35a1SLionel Sambuc report_count(1);
4992*11be35a1SLionel Sambuc report_return(wcolor_set(win, pair, NULL));
4993*11be35a1SLionel Sambuc }
4994*11be35a1SLionel Sambuc
4995*11be35a1SLionel Sambuc
4996*11be35a1SLionel Sambuc void
cmd_wdelch(int nargs,char ** args)4997*11be35a1SLionel Sambuc cmd_wdelch(int nargs, char **args)
4998*11be35a1SLionel Sambuc {
4999*11be35a1SLionel Sambuc WINDOW *win;
5000*11be35a1SLionel Sambuc
5001*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5002*11be35a1SLionel Sambuc return;
5003*11be35a1SLionel Sambuc
5004*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5005*11be35a1SLionel Sambuc report_count(1);
5006*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5007*11be35a1SLionel Sambuc return;
5008*11be35a1SLionel Sambuc }
5009*11be35a1SLionel Sambuc
5010*11be35a1SLionel Sambuc report_count(1);
5011*11be35a1SLionel Sambuc report_return(wdelch(win));
5012*11be35a1SLionel Sambuc }
5013*11be35a1SLionel Sambuc
5014*11be35a1SLionel Sambuc
5015*11be35a1SLionel Sambuc void
cmd_wdeleteln(int nargs,char ** args)5016*11be35a1SLionel Sambuc cmd_wdeleteln(int nargs, char **args)
5017*11be35a1SLionel Sambuc {
5018*11be35a1SLionel Sambuc WINDOW *win;
5019*11be35a1SLionel Sambuc
5020*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5021*11be35a1SLionel Sambuc return;
5022*11be35a1SLionel Sambuc
5023*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5024*11be35a1SLionel Sambuc report_count(1);
5025*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5026*11be35a1SLionel Sambuc return;
5027*11be35a1SLionel Sambuc }
5028*11be35a1SLionel Sambuc
5029*11be35a1SLionel Sambuc report_count(1);
5030*11be35a1SLionel Sambuc report_return(wdeleteln(win));
5031*11be35a1SLionel Sambuc
5032*11be35a1SLionel Sambuc }
5033*11be35a1SLionel Sambuc
5034*11be35a1SLionel Sambuc
5035*11be35a1SLionel Sambuc void
cmd_wechochar(int nargs,char ** args)5036*11be35a1SLionel Sambuc cmd_wechochar(int nargs, char **args)
5037*11be35a1SLionel Sambuc {
5038*11be35a1SLionel Sambuc WINDOW *win;
5039*11be35a1SLionel Sambuc int ch;
5040*11be35a1SLionel Sambuc
5041*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5042*11be35a1SLionel Sambuc return;
5043*11be35a1SLionel Sambuc
5044*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5045*11be35a1SLionel Sambuc report_count(1);
5046*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5047*11be35a1SLionel Sambuc return;
5048*11be35a1SLionel Sambuc }
5049*11be35a1SLionel Sambuc
5050*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &ch) == 0) {
5051*11be35a1SLionel Sambuc report_count(1);
5052*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5053*11be35a1SLionel Sambuc return;
5054*11be35a1SLionel Sambuc }
5055*11be35a1SLionel Sambuc
5056*11be35a1SLionel Sambuc report_count(1);
5057*11be35a1SLionel Sambuc report_return(wechochar(win, ch));
5058*11be35a1SLionel Sambuc }
5059*11be35a1SLionel Sambuc
5060*11be35a1SLionel Sambuc
5061*11be35a1SLionel Sambuc void
cmd_werase(int nargs,char ** args)5062*11be35a1SLionel Sambuc cmd_werase(int nargs, char **args)
5063*11be35a1SLionel Sambuc {
5064*11be35a1SLionel Sambuc WINDOW *win;
5065*11be35a1SLionel Sambuc
5066*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5067*11be35a1SLionel Sambuc return;
5068*11be35a1SLionel Sambuc
5069*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5070*11be35a1SLionel Sambuc report_count(1);
5071*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5072*11be35a1SLionel Sambuc return;
5073*11be35a1SLionel Sambuc }
5074*11be35a1SLionel Sambuc
5075*11be35a1SLionel Sambuc report_count(1);
5076*11be35a1SLionel Sambuc report_return(werase(win));
5077*11be35a1SLionel Sambuc }
5078*11be35a1SLionel Sambuc
5079*11be35a1SLionel Sambuc
5080*11be35a1SLionel Sambuc void
cmd_wgetch(int nargs,char ** args)5081*11be35a1SLionel Sambuc cmd_wgetch(int nargs, char **args)
5082*11be35a1SLionel Sambuc {
5083*11be35a1SLionel Sambuc WINDOW *win;
5084*11be35a1SLionel Sambuc
5085*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5086*11be35a1SLionel Sambuc return;
5087*11be35a1SLionel Sambuc
5088*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5089*11be35a1SLionel Sambuc report_count(1);
5090*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5091*11be35a1SLionel Sambuc return;
5092*11be35a1SLionel Sambuc }
5093*11be35a1SLionel Sambuc
5094*11be35a1SLionel Sambuc report_count(1);
5095*11be35a1SLionel Sambuc report_int(wgetch(win));
5096*11be35a1SLionel Sambuc }
5097*11be35a1SLionel Sambuc
5098*11be35a1SLionel Sambuc
5099*11be35a1SLionel Sambuc void
cmd_wgetnstr(int nargs,char ** args)5100*11be35a1SLionel Sambuc cmd_wgetnstr(int nargs, char **args)
5101*11be35a1SLionel Sambuc {
5102*11be35a1SLionel Sambuc WINDOW *win;
5103*11be35a1SLionel Sambuc int count;
5104*11be35a1SLionel Sambuc char string[256];
5105*11be35a1SLionel Sambuc
5106*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5107*11be35a1SLionel Sambuc return;
5108*11be35a1SLionel Sambuc
5109*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5110*11be35a1SLionel Sambuc report_count(1);
5111*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5112*11be35a1SLionel Sambuc return;
5113*11be35a1SLionel Sambuc }
5114*11be35a1SLionel Sambuc
5115*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
5116*11be35a1SLionel Sambuc report_count(1);
5117*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5118*11be35a1SLionel Sambuc return;
5119*11be35a1SLionel Sambuc }
5120*11be35a1SLionel Sambuc
5121*11be35a1SLionel Sambuc /* XXX - call2 */
5122*11be35a1SLionel Sambuc report_count(2);
5123*11be35a1SLionel Sambuc report_return(wgetnstr(win, string, count));
5124*11be35a1SLionel Sambuc report_status(string);
5125*11be35a1SLionel Sambuc }
5126*11be35a1SLionel Sambuc
5127*11be35a1SLionel Sambuc
5128*11be35a1SLionel Sambuc void
cmd_wgetstr(int nargs,char ** args)5129*11be35a1SLionel Sambuc cmd_wgetstr(int nargs, char **args)
5130*11be35a1SLionel Sambuc {
5131*11be35a1SLionel Sambuc WINDOW *win;
5132*11be35a1SLionel Sambuc char string[256];
5133*11be35a1SLionel Sambuc
5134*11be35a1SLionel Sambuc
5135*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5136*11be35a1SLionel Sambuc return;
5137*11be35a1SLionel Sambuc
5138*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5139*11be35a1SLionel Sambuc report_count(1);
5140*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5141*11be35a1SLionel Sambuc return;
5142*11be35a1SLionel Sambuc }
5143*11be35a1SLionel Sambuc
5144*11be35a1SLionel Sambuc string[0] = '\0';
5145*11be35a1SLionel Sambuc
5146*11be35a1SLionel Sambuc report_count(2);
5147*11be35a1SLionel Sambuc report_return(wgetstr(win, string));
5148*11be35a1SLionel Sambuc report_status(string);
5149*11be35a1SLionel Sambuc }
5150*11be35a1SLionel Sambuc
5151*11be35a1SLionel Sambuc
5152*11be35a1SLionel Sambuc void
cmd_whline(int nargs,char ** args)5153*11be35a1SLionel Sambuc cmd_whline(int nargs, char **args)
5154*11be35a1SLionel Sambuc {
5155*11be35a1SLionel Sambuc WINDOW *win;
5156*11be35a1SLionel Sambuc int ch, count;
5157*11be35a1SLionel Sambuc
5158*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5159*11be35a1SLionel Sambuc return;
5160*11be35a1SLionel Sambuc
5161*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5162*11be35a1SLionel Sambuc report_count(1);
5163*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5164*11be35a1SLionel Sambuc return;
5165*11be35a1SLionel Sambuc }
5166*11be35a1SLionel Sambuc
5167*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &ch) == 0) {
5168*11be35a1SLionel Sambuc report_count(1);
5169*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5170*11be35a1SLionel Sambuc return;
5171*11be35a1SLionel Sambuc }
5172*11be35a1SLionel Sambuc
5173*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &count) == 0) {
5174*11be35a1SLionel Sambuc report_count(1);
5175*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5176*11be35a1SLionel Sambuc return;
5177*11be35a1SLionel Sambuc }
5178*11be35a1SLionel Sambuc
5179*11be35a1SLionel Sambuc report_count(1);
5180*11be35a1SLionel Sambuc report_return(whline(win, ch, count));
5181*11be35a1SLionel Sambuc }
5182*11be35a1SLionel Sambuc
5183*11be35a1SLionel Sambuc
5184*11be35a1SLionel Sambuc void
cmd_winch(int nargs,char ** args)5185*11be35a1SLionel Sambuc cmd_winch(int nargs, char **args)
5186*11be35a1SLionel Sambuc {
5187*11be35a1SLionel Sambuc WINDOW *win;
5188*11be35a1SLionel Sambuc
5189*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5190*11be35a1SLionel Sambuc return;
5191*11be35a1SLionel Sambuc
5192*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5193*11be35a1SLionel Sambuc report_count(1);
5194*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5195*11be35a1SLionel Sambuc return;
5196*11be35a1SLionel Sambuc }
5197*11be35a1SLionel Sambuc
5198*11be35a1SLionel Sambuc report_count(1);
5199*11be35a1SLionel Sambuc report_int(winch(win));
5200*11be35a1SLionel Sambuc }
5201*11be35a1SLionel Sambuc
5202*11be35a1SLionel Sambuc
5203*11be35a1SLionel Sambuc void
cmd_winchnstr(int nargs,char ** args)5204*11be35a1SLionel Sambuc cmd_winchnstr(int nargs, char **args)
5205*11be35a1SLionel Sambuc {
5206*11be35a1SLionel Sambuc WINDOW *win;
5207*11be35a1SLionel Sambuc chtype string[256];
5208*11be35a1SLionel Sambuc int count;
5209*11be35a1SLionel Sambuc
5210*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5211*11be35a1SLionel Sambuc return;
5212*11be35a1SLionel Sambuc
5213*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5214*11be35a1SLionel Sambuc report_count(1);
5215*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5216*11be35a1SLionel Sambuc return;
5217*11be35a1SLionel Sambuc }
5218*11be35a1SLionel Sambuc
5219*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
5220*11be35a1SLionel Sambuc report_count(1);
5221*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5222*11be35a1SLionel Sambuc return;
5223*11be35a1SLionel Sambuc }
5224*11be35a1SLionel Sambuc
5225*11be35a1SLionel Sambuc /* XXX - call2 */
5226*11be35a1SLionel Sambuc report_count(2);
5227*11be35a1SLionel Sambuc report_return(winchnstr(win, string, count));
5228*11be35a1SLionel Sambuc report_nstr(string);
5229*11be35a1SLionel Sambuc }
5230*11be35a1SLionel Sambuc
5231*11be35a1SLionel Sambuc
5232*11be35a1SLionel Sambuc void
cmd_winchstr(int nargs,char ** args)5233*11be35a1SLionel Sambuc cmd_winchstr(int nargs, char **args)
5234*11be35a1SLionel Sambuc {
5235*11be35a1SLionel Sambuc WINDOW *win;
5236*11be35a1SLionel Sambuc chtype string[256];
5237*11be35a1SLionel Sambuc
5238*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5239*11be35a1SLionel Sambuc return;
5240*11be35a1SLionel Sambuc
5241*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5242*11be35a1SLionel Sambuc report_count(1);
5243*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5244*11be35a1SLionel Sambuc return;
5245*11be35a1SLionel Sambuc }
5246*11be35a1SLionel Sambuc
5247*11be35a1SLionel Sambuc /* XXX - call2 */
5248*11be35a1SLionel Sambuc report_count(2);
5249*11be35a1SLionel Sambuc report_return(winchstr(win, string));
5250*11be35a1SLionel Sambuc report_nstr(string);
5251*11be35a1SLionel Sambuc }
5252*11be35a1SLionel Sambuc
5253*11be35a1SLionel Sambuc
5254*11be35a1SLionel Sambuc void
cmd_winnstr(int nargs,char ** args)5255*11be35a1SLionel Sambuc cmd_winnstr(int nargs, char **args)
5256*11be35a1SLionel Sambuc {
5257*11be35a1SLionel Sambuc WINDOW *win;
5258*11be35a1SLionel Sambuc char string[256];
5259*11be35a1SLionel Sambuc int count;
5260*11be35a1SLionel Sambuc
5261*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5262*11be35a1SLionel Sambuc return;
5263*11be35a1SLionel Sambuc
5264*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5265*11be35a1SLionel Sambuc report_count(1);
5266*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5267*11be35a1SLionel Sambuc return;
5268*11be35a1SLionel Sambuc }
5269*11be35a1SLionel Sambuc
5270*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
5271*11be35a1SLionel Sambuc report_count(1);
5272*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5273*11be35a1SLionel Sambuc return;
5274*11be35a1SLionel Sambuc }
5275*11be35a1SLionel Sambuc
5276*11be35a1SLionel Sambuc /* XXX - call2 */
5277*11be35a1SLionel Sambuc report_count(2);
5278*11be35a1SLionel Sambuc report_return(winnstr(win, string, count));
5279*11be35a1SLionel Sambuc report_status(string);
5280*11be35a1SLionel Sambuc }
5281*11be35a1SLionel Sambuc
5282*11be35a1SLionel Sambuc
5283*11be35a1SLionel Sambuc void
cmd_winsch(int nargs,char ** args)5284*11be35a1SLionel Sambuc cmd_winsch(int nargs, char **args)
5285*11be35a1SLionel Sambuc {
5286*11be35a1SLionel Sambuc WINDOW *win;
5287*11be35a1SLionel Sambuc int ch;
5288*11be35a1SLionel Sambuc
5289*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5290*11be35a1SLionel Sambuc return;
5291*11be35a1SLionel Sambuc
5292*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5293*11be35a1SLionel Sambuc report_count(1);
5294*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5295*11be35a1SLionel Sambuc return;
5296*11be35a1SLionel Sambuc }
5297*11be35a1SLionel Sambuc
5298*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &ch) == 0) {
5299*11be35a1SLionel Sambuc report_count(1);
5300*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5301*11be35a1SLionel Sambuc return;
5302*11be35a1SLionel Sambuc }
5303*11be35a1SLionel Sambuc
5304*11be35a1SLionel Sambuc report_count(1);
5305*11be35a1SLionel Sambuc report_return(winsch(win, ch));
5306*11be35a1SLionel Sambuc }
5307*11be35a1SLionel Sambuc
5308*11be35a1SLionel Sambuc
5309*11be35a1SLionel Sambuc void
cmd_winsdelln(int nargs,char ** args)5310*11be35a1SLionel Sambuc cmd_winsdelln(int nargs, char **args)
5311*11be35a1SLionel Sambuc {
5312*11be35a1SLionel Sambuc WINDOW *win;
5313*11be35a1SLionel Sambuc int count;
5314*11be35a1SLionel Sambuc
5315*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5316*11be35a1SLionel Sambuc return;
5317*11be35a1SLionel Sambuc
5318*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5319*11be35a1SLionel Sambuc report_count(1);
5320*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5321*11be35a1SLionel Sambuc return;
5322*11be35a1SLionel Sambuc }
5323*11be35a1SLionel Sambuc
5324*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &count) == 0) {
5325*11be35a1SLionel Sambuc report_count(1);
5326*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5327*11be35a1SLionel Sambuc return;
5328*11be35a1SLionel Sambuc }
5329*11be35a1SLionel Sambuc
5330*11be35a1SLionel Sambuc report_count(1);
5331*11be35a1SLionel Sambuc report_return(winsdelln(win, count));
5332*11be35a1SLionel Sambuc }
5333*11be35a1SLionel Sambuc
5334*11be35a1SLionel Sambuc
5335*11be35a1SLionel Sambuc void
cmd_winsertln(int nargs,char ** args)5336*11be35a1SLionel Sambuc cmd_winsertln(int nargs, char **args)
5337*11be35a1SLionel Sambuc {
5338*11be35a1SLionel Sambuc WINDOW *win;
5339*11be35a1SLionel Sambuc
5340*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5341*11be35a1SLionel Sambuc return;
5342*11be35a1SLionel Sambuc
5343*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5344*11be35a1SLionel Sambuc report_count(1);
5345*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5346*11be35a1SLionel Sambuc return;
5347*11be35a1SLionel Sambuc }
5348*11be35a1SLionel Sambuc
5349*11be35a1SLionel Sambuc report_count(1);
5350*11be35a1SLionel Sambuc report_return(winsertln(win));
5351*11be35a1SLionel Sambuc }
5352*11be35a1SLionel Sambuc
5353*11be35a1SLionel Sambuc
5354*11be35a1SLionel Sambuc void
cmd_winstr(int nargs,char ** args)5355*11be35a1SLionel Sambuc cmd_winstr(int nargs, char **args)
5356*11be35a1SLionel Sambuc {
5357*11be35a1SLionel Sambuc WINDOW *win;
5358*11be35a1SLionel Sambuc char string[256];
5359*11be35a1SLionel Sambuc
5360*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5361*11be35a1SLionel Sambuc return;
5362*11be35a1SLionel Sambuc
5363*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5364*11be35a1SLionel Sambuc report_count(1);
5365*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5366*11be35a1SLionel Sambuc return;
5367*11be35a1SLionel Sambuc }
5368*11be35a1SLionel Sambuc
5369*11be35a1SLionel Sambuc /* XXX - call2 */
5370*11be35a1SLionel Sambuc report_count(2);
5371*11be35a1SLionel Sambuc report_return(winstr(win, string));
5372*11be35a1SLionel Sambuc report_status(string);
5373*11be35a1SLionel Sambuc }
5374*11be35a1SLionel Sambuc
5375*11be35a1SLionel Sambuc
5376*11be35a1SLionel Sambuc void
cmd_wmove(int nargs,char ** args)5377*11be35a1SLionel Sambuc cmd_wmove(int nargs, char **args)
5378*11be35a1SLionel Sambuc {
5379*11be35a1SLionel Sambuc WINDOW *win;
5380*11be35a1SLionel Sambuc int y, x;
5381*11be35a1SLionel Sambuc
5382*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5383*11be35a1SLionel Sambuc return;
5384*11be35a1SLionel Sambuc
5385*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5386*11be35a1SLionel Sambuc report_count(1);
5387*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5388*11be35a1SLionel Sambuc return;
5389*11be35a1SLionel Sambuc }
5390*11be35a1SLionel Sambuc
5391*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
5392*11be35a1SLionel Sambuc report_count(1);
5393*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5394*11be35a1SLionel Sambuc return;
5395*11be35a1SLionel Sambuc }
5396*11be35a1SLionel Sambuc
5397*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
5398*11be35a1SLionel Sambuc report_count(1);
5399*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5400*11be35a1SLionel Sambuc return;
5401*11be35a1SLionel Sambuc }
5402*11be35a1SLionel Sambuc
5403*11be35a1SLionel Sambuc report_count(1);
5404*11be35a1SLionel Sambuc report_return(wmove(win, y, x));
5405*11be35a1SLionel Sambuc }
5406*11be35a1SLionel Sambuc
5407*11be35a1SLionel Sambuc
5408*11be35a1SLionel Sambuc void
cmd_wnoutrefresh(int nargs,char ** args)5409*11be35a1SLionel Sambuc cmd_wnoutrefresh(int nargs, char **args)
5410*11be35a1SLionel Sambuc {
5411*11be35a1SLionel Sambuc WINDOW *win;
5412*11be35a1SLionel Sambuc
5413*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5414*11be35a1SLionel Sambuc return;
5415*11be35a1SLionel Sambuc
5416*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5417*11be35a1SLionel Sambuc report_count(1);
5418*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5419*11be35a1SLionel Sambuc return;
5420*11be35a1SLionel Sambuc }
5421*11be35a1SLionel Sambuc
5422*11be35a1SLionel Sambuc report_count(1);
5423*11be35a1SLionel Sambuc report_return(wnoutrefresh(win));
5424*11be35a1SLionel Sambuc }
5425*11be35a1SLionel Sambuc
5426*11be35a1SLionel Sambuc
5427*11be35a1SLionel Sambuc void
cmd_wprintw(int nargs,char ** args)5428*11be35a1SLionel Sambuc cmd_wprintw(int nargs, char **args)
5429*11be35a1SLionel Sambuc {
5430*11be35a1SLionel Sambuc WINDOW *win;
5431*11be35a1SLionel Sambuc
5432*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5433*11be35a1SLionel Sambuc return;
5434*11be35a1SLionel Sambuc
5435*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5436*11be35a1SLionel Sambuc report_count(1);
5437*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5438*11be35a1SLionel Sambuc return;
5439*11be35a1SLionel Sambuc }
5440*11be35a1SLionel Sambuc
5441*11be35a1SLionel Sambuc report_count(1);
5442*11be35a1SLionel Sambuc report_return(wprintw(win, args[1], args[2]));
5443*11be35a1SLionel Sambuc }
5444*11be35a1SLionel Sambuc
5445*11be35a1SLionel Sambuc
5446*11be35a1SLionel Sambuc void
cmd_wredrawln(int nargs,char ** args)5447*11be35a1SLionel Sambuc cmd_wredrawln(int nargs, char **args)
5448*11be35a1SLionel Sambuc {
5449*11be35a1SLionel Sambuc WINDOW *win;
5450*11be35a1SLionel Sambuc int beg_line, num_lines;
5451*11be35a1SLionel Sambuc
5452*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5453*11be35a1SLionel Sambuc return;
5454*11be35a1SLionel Sambuc
5455*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5456*11be35a1SLionel Sambuc report_count(1);
5457*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5458*11be35a1SLionel Sambuc return;
5459*11be35a1SLionel Sambuc }
5460*11be35a1SLionel Sambuc
5461*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &beg_line) == 0) {
5462*11be35a1SLionel Sambuc report_count(1);
5463*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5464*11be35a1SLionel Sambuc return;
5465*11be35a1SLionel Sambuc }
5466*11be35a1SLionel Sambuc
5467*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &num_lines) == 0) {
5468*11be35a1SLionel Sambuc report_count(1);
5469*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5470*11be35a1SLionel Sambuc return;
5471*11be35a1SLionel Sambuc }
5472*11be35a1SLionel Sambuc
5473*11be35a1SLionel Sambuc report_count(1);
5474*11be35a1SLionel Sambuc report_return(wredrawln(win, beg_line, num_lines));
5475*11be35a1SLionel Sambuc }
5476*11be35a1SLionel Sambuc
5477*11be35a1SLionel Sambuc
5478*11be35a1SLionel Sambuc void
cmd_wrefresh(int nargs,char ** args)5479*11be35a1SLionel Sambuc cmd_wrefresh(int nargs, char **args)
5480*11be35a1SLionel Sambuc {
5481*11be35a1SLionel Sambuc WINDOW *win;
5482*11be35a1SLionel Sambuc
5483*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5484*11be35a1SLionel Sambuc return;
5485*11be35a1SLionel Sambuc
5486*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5487*11be35a1SLionel Sambuc report_count(1);
5488*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5489*11be35a1SLionel Sambuc return;
5490*11be35a1SLionel Sambuc }
5491*11be35a1SLionel Sambuc
5492*11be35a1SLionel Sambuc /* XXX - generates output */
5493*11be35a1SLionel Sambuc report_count(1);
5494*11be35a1SLionel Sambuc report_return(wrefresh(win));
5495*11be35a1SLionel Sambuc }
5496*11be35a1SLionel Sambuc
5497*11be35a1SLionel Sambuc
5498*11be35a1SLionel Sambuc void
cmd_wresize(int nargs,char ** args)5499*11be35a1SLionel Sambuc cmd_wresize(int nargs, char **args)
5500*11be35a1SLionel Sambuc {
5501*11be35a1SLionel Sambuc WINDOW *win;
5502*11be35a1SLionel Sambuc int lines, cols;
5503*11be35a1SLionel Sambuc
5504*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5505*11be35a1SLionel Sambuc return;
5506*11be35a1SLionel Sambuc
5507*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5508*11be35a1SLionel Sambuc report_count(1);
5509*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5510*11be35a1SLionel Sambuc return;
5511*11be35a1SLionel Sambuc }
5512*11be35a1SLionel Sambuc
5513*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &lines) == 0) {
5514*11be35a1SLionel Sambuc report_count(1);
5515*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5516*11be35a1SLionel Sambuc return;
5517*11be35a1SLionel Sambuc }
5518*11be35a1SLionel Sambuc
5519*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &cols) == 0) {
5520*11be35a1SLionel Sambuc report_count(1);
5521*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5522*11be35a1SLionel Sambuc return;
5523*11be35a1SLionel Sambuc }
5524*11be35a1SLionel Sambuc
5525*11be35a1SLionel Sambuc report_count(1);
5526*11be35a1SLionel Sambuc report_return(wresize(win, lines, cols));
5527*11be35a1SLionel Sambuc }
5528*11be35a1SLionel Sambuc
5529*11be35a1SLionel Sambuc
5530*11be35a1SLionel Sambuc void
cmd_wscanw(int nargs,char ** args)5531*11be35a1SLionel Sambuc cmd_wscanw(int nargs, char **args)
5532*11be35a1SLionel Sambuc {
5533*11be35a1SLionel Sambuc WINDOW *win;
5534*11be35a1SLionel Sambuc char string[256];
5535*11be35a1SLionel Sambuc
5536*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5537*11be35a1SLionel Sambuc return;
5538*11be35a1SLionel Sambuc
5539*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5540*11be35a1SLionel Sambuc report_count(1);
5541*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5542*11be35a1SLionel Sambuc return;
5543*11be35a1SLionel Sambuc }
5544*11be35a1SLionel Sambuc
5545*11be35a1SLionel Sambuc report_count(1);
5546*11be35a1SLionel Sambuc report_return(wscanw(win, args[1], &string));
5547*11be35a1SLionel Sambuc }
5548*11be35a1SLionel Sambuc
5549*11be35a1SLionel Sambuc
5550*11be35a1SLionel Sambuc void
cmd_wscrl(int nargs,char ** args)5551*11be35a1SLionel Sambuc cmd_wscrl(int nargs, char **args)
5552*11be35a1SLionel Sambuc {
5553*11be35a1SLionel Sambuc WINDOW *win;
5554*11be35a1SLionel Sambuc int n;
5555*11be35a1SLionel Sambuc
5556*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5557*11be35a1SLionel Sambuc return;
5558*11be35a1SLionel Sambuc
5559*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5560*11be35a1SLionel Sambuc report_count(1);
5561*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5562*11be35a1SLionel Sambuc return;
5563*11be35a1SLionel Sambuc }
5564*11be35a1SLionel Sambuc
5565*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &n) == 0) {
5566*11be35a1SLionel Sambuc report_count(1);
5567*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5568*11be35a1SLionel Sambuc return;
5569*11be35a1SLionel Sambuc }
5570*11be35a1SLionel Sambuc
5571*11be35a1SLionel Sambuc report_count(1);
5572*11be35a1SLionel Sambuc report_return(wscrl(win, n));
5573*11be35a1SLionel Sambuc }
5574*11be35a1SLionel Sambuc
5575*11be35a1SLionel Sambuc
5576*11be35a1SLionel Sambuc void
cmd_wsetscrreg(int nargs,char ** args)5577*11be35a1SLionel Sambuc cmd_wsetscrreg(int nargs, char **args)
5578*11be35a1SLionel Sambuc {
5579*11be35a1SLionel Sambuc WINDOW *win;
5580*11be35a1SLionel Sambuc int top, bottom;
5581*11be35a1SLionel Sambuc
5582*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5583*11be35a1SLionel Sambuc return;
5584*11be35a1SLionel Sambuc
5585*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5586*11be35a1SLionel Sambuc report_count(1);
5587*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5588*11be35a1SLionel Sambuc return;
5589*11be35a1SLionel Sambuc }
5590*11be35a1SLionel Sambuc
5591*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &top) == 0) {
5592*11be35a1SLionel Sambuc report_count(1);
5593*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5594*11be35a1SLionel Sambuc return;
5595*11be35a1SLionel Sambuc }
5596*11be35a1SLionel Sambuc
5597*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &bottom) == 0) {
5598*11be35a1SLionel Sambuc report_count(1);
5599*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5600*11be35a1SLionel Sambuc return;
5601*11be35a1SLionel Sambuc }
5602*11be35a1SLionel Sambuc
5603*11be35a1SLionel Sambuc report_count(1);
5604*11be35a1SLionel Sambuc report_return(wsetscrreg(win, top, bottom));
5605*11be35a1SLionel Sambuc }
5606*11be35a1SLionel Sambuc
5607*11be35a1SLionel Sambuc
5608*11be35a1SLionel Sambuc void
cmd_wstandend(int nargs,char ** args)5609*11be35a1SLionel Sambuc cmd_wstandend(int nargs, char **args)
5610*11be35a1SLionel Sambuc {
5611*11be35a1SLionel Sambuc WINDOW *win;
5612*11be35a1SLionel Sambuc
5613*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5614*11be35a1SLionel Sambuc return;
5615*11be35a1SLionel Sambuc
5616*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5617*11be35a1SLionel Sambuc report_count(1);
5618*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5619*11be35a1SLionel Sambuc return;
5620*11be35a1SLionel Sambuc }
5621*11be35a1SLionel Sambuc
5622*11be35a1SLionel Sambuc report_count(1);
5623*11be35a1SLionel Sambuc report_return(wstandend(win));
5624*11be35a1SLionel Sambuc }
5625*11be35a1SLionel Sambuc
5626*11be35a1SLionel Sambuc
5627*11be35a1SLionel Sambuc void
cmd_wstandout(int nargs,char ** args)5628*11be35a1SLionel Sambuc cmd_wstandout(int nargs, char **args)
5629*11be35a1SLionel Sambuc {
5630*11be35a1SLionel Sambuc WINDOW *win;
5631*11be35a1SLionel Sambuc
5632*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5633*11be35a1SLionel Sambuc return;
5634*11be35a1SLionel Sambuc
5635*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5636*11be35a1SLionel Sambuc report_count(1);
5637*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5638*11be35a1SLionel Sambuc return;
5639*11be35a1SLionel Sambuc }
5640*11be35a1SLionel Sambuc
5641*11be35a1SLionel Sambuc report_count(1);
5642*11be35a1SLionel Sambuc report_return(wstandout(win));
5643*11be35a1SLionel Sambuc }
5644*11be35a1SLionel Sambuc
5645*11be35a1SLionel Sambuc
5646*11be35a1SLionel Sambuc void
cmd_wtimeout(int nargs,char ** args)5647*11be35a1SLionel Sambuc cmd_wtimeout(int nargs, char **args)
5648*11be35a1SLionel Sambuc {
5649*11be35a1SLionel Sambuc WINDOW *win;
5650*11be35a1SLionel Sambuc int tval;
5651*11be35a1SLionel Sambuc
5652*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5653*11be35a1SLionel Sambuc return;
5654*11be35a1SLionel Sambuc
5655*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5656*11be35a1SLionel Sambuc report_count(1);
5657*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5658*11be35a1SLionel Sambuc return;
5659*11be35a1SLionel Sambuc }
5660*11be35a1SLionel Sambuc
5661*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &tval) == 0) {
5662*11be35a1SLionel Sambuc report_count(1);
5663*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5664*11be35a1SLionel Sambuc return;
5665*11be35a1SLionel Sambuc }
5666*11be35a1SLionel Sambuc
5667*11be35a1SLionel Sambuc wtimeout(win, tval); /* void return */
5668*11be35a1SLionel Sambuc report_count(1);
5669*11be35a1SLionel Sambuc report_return(OK);
5670*11be35a1SLionel Sambuc }
5671*11be35a1SLionel Sambuc
5672*11be35a1SLionel Sambuc
5673*11be35a1SLionel Sambuc void
cmd_wtouchln(int nargs,char ** args)5674*11be35a1SLionel Sambuc cmd_wtouchln(int nargs, char **args)
5675*11be35a1SLionel Sambuc {
5676*11be35a1SLionel Sambuc WINDOW *win;
5677*11be35a1SLionel Sambuc int line, n, changed;
5678*11be35a1SLionel Sambuc
5679*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
5680*11be35a1SLionel Sambuc return;
5681*11be35a1SLionel Sambuc
5682*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5683*11be35a1SLionel Sambuc report_count(1);
5684*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5685*11be35a1SLionel Sambuc return;
5686*11be35a1SLionel Sambuc }
5687*11be35a1SLionel Sambuc
5688*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &line) == 0) {
5689*11be35a1SLionel Sambuc report_count(1);
5690*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5691*11be35a1SLionel Sambuc return;
5692*11be35a1SLionel Sambuc }
5693*11be35a1SLionel Sambuc
5694*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &n) == 0) {
5695*11be35a1SLionel Sambuc report_count(1);
5696*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5697*11be35a1SLionel Sambuc return;
5698*11be35a1SLionel Sambuc }
5699*11be35a1SLionel Sambuc
5700*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &changed) == 0) {
5701*11be35a1SLionel Sambuc report_count(1);
5702*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5703*11be35a1SLionel Sambuc return;
5704*11be35a1SLionel Sambuc }
5705*11be35a1SLionel Sambuc
5706*11be35a1SLionel Sambuc report_count(1);
5707*11be35a1SLionel Sambuc report_return(wtouchln(win, line, n, changed));
5708*11be35a1SLionel Sambuc }
5709*11be35a1SLionel Sambuc
5710*11be35a1SLionel Sambuc
5711*11be35a1SLionel Sambuc void
cmd_wunderend(int nargs,char ** args)5712*11be35a1SLionel Sambuc cmd_wunderend(int nargs, char **args)
5713*11be35a1SLionel Sambuc {
5714*11be35a1SLionel Sambuc WINDOW *win;
5715*11be35a1SLionel Sambuc
5716*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5717*11be35a1SLionel Sambuc return;
5718*11be35a1SLionel Sambuc
5719*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5720*11be35a1SLionel Sambuc report_count(1);
5721*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5722*11be35a1SLionel Sambuc return;
5723*11be35a1SLionel Sambuc }
5724*11be35a1SLionel Sambuc
5725*11be35a1SLionel Sambuc report_count(1);
5726*11be35a1SLionel Sambuc report_return(wunderend(win));
5727*11be35a1SLionel Sambuc }
5728*11be35a1SLionel Sambuc
5729*11be35a1SLionel Sambuc
5730*11be35a1SLionel Sambuc void
cmd_wunderscore(int nargs,char ** args)5731*11be35a1SLionel Sambuc cmd_wunderscore(int nargs, char **args)
5732*11be35a1SLionel Sambuc {
5733*11be35a1SLionel Sambuc WINDOW *win;
5734*11be35a1SLionel Sambuc
5735*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5736*11be35a1SLionel Sambuc return;
5737*11be35a1SLionel Sambuc
5738*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5739*11be35a1SLionel Sambuc report_count(1);
5740*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5741*11be35a1SLionel Sambuc return;
5742*11be35a1SLionel Sambuc }
5743*11be35a1SLionel Sambuc
5744*11be35a1SLionel Sambuc report_count(1);
5745*11be35a1SLionel Sambuc report_return(wunderscore(win));
5746*11be35a1SLionel Sambuc }
5747*11be35a1SLionel Sambuc
5748*11be35a1SLionel Sambuc
5749*11be35a1SLionel Sambuc void
cmd_wvline(int nargs,char ** args)5750*11be35a1SLionel Sambuc cmd_wvline(int nargs, char **args)
5751*11be35a1SLionel Sambuc {
5752*11be35a1SLionel Sambuc WINDOW *win;
5753*11be35a1SLionel Sambuc int n;
5754*11be35a1SLionel Sambuc chtype *ch;
5755*11be35a1SLionel Sambuc
5756*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5757*11be35a1SLionel Sambuc return;
5758*11be35a1SLionel Sambuc
5759*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5760*11be35a1SLionel Sambuc report_count(1);
5761*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5762*11be35a1SLionel Sambuc return;
5763*11be35a1SLionel Sambuc }
5764*11be35a1SLionel Sambuc
5765*11be35a1SLionel Sambuc ch = (chtype *) args[1];
5766*11be35a1SLionel Sambuc
5767*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &n) == 0) {
5768*11be35a1SLionel Sambuc report_count(1);
5769*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5770*11be35a1SLionel Sambuc return;
5771*11be35a1SLionel Sambuc }
5772*11be35a1SLionel Sambuc
5773*11be35a1SLionel Sambuc report_count(1);
5774*11be35a1SLionel Sambuc report_return(wvline(win, ch[0], n));
5775*11be35a1SLionel Sambuc }
5776*11be35a1SLionel Sambuc
5777*11be35a1SLionel Sambuc
5778*11be35a1SLionel Sambuc void
cmd_insnstr(int nargs,char ** args)5779*11be35a1SLionel Sambuc cmd_insnstr(int nargs, char **args)
5780*11be35a1SLionel Sambuc {
5781*11be35a1SLionel Sambuc int n;
5782*11be35a1SLionel Sambuc
5783*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5784*11be35a1SLionel Sambuc return;
5785*11be35a1SLionel Sambuc
5786*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &n) == 0) {
5787*11be35a1SLionel Sambuc report_count(1);
5788*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5789*11be35a1SLionel Sambuc return;
5790*11be35a1SLionel Sambuc }
5791*11be35a1SLionel Sambuc
5792*11be35a1SLionel Sambuc report_count(1);
5793*11be35a1SLionel Sambuc report_return(insnstr(args[0], n));
5794*11be35a1SLionel Sambuc }
5795*11be35a1SLionel Sambuc
5796*11be35a1SLionel Sambuc
5797*11be35a1SLionel Sambuc void
cmd_insstr(int nargs,char ** args)5798*11be35a1SLionel Sambuc cmd_insstr(int nargs, char **args)
5799*11be35a1SLionel Sambuc {
5800*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
5801*11be35a1SLionel Sambuc return;
5802*11be35a1SLionel Sambuc
5803*11be35a1SLionel Sambuc report_count(1);
5804*11be35a1SLionel Sambuc report_return(insstr(args[0]));
5805*11be35a1SLionel Sambuc }
5806*11be35a1SLionel Sambuc
5807*11be35a1SLionel Sambuc
5808*11be35a1SLionel Sambuc void
cmd_mvinsnstr(int nargs,char ** args)5809*11be35a1SLionel Sambuc cmd_mvinsnstr(int nargs, char **args)
5810*11be35a1SLionel Sambuc {
5811*11be35a1SLionel Sambuc int y, x, n;
5812*11be35a1SLionel Sambuc
5813*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
5814*11be35a1SLionel Sambuc return;
5815*11be35a1SLionel Sambuc
5816*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
5817*11be35a1SLionel Sambuc report_count(1);
5818*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5819*11be35a1SLionel Sambuc return;
5820*11be35a1SLionel Sambuc }
5821*11be35a1SLionel Sambuc
5822*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
5823*11be35a1SLionel Sambuc report_count(1);
5824*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5825*11be35a1SLionel Sambuc return;
5826*11be35a1SLionel Sambuc }
5827*11be35a1SLionel Sambuc
5828*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &n) == 0) {
5829*11be35a1SLionel Sambuc report_count(1);
5830*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5831*11be35a1SLionel Sambuc return;
5832*11be35a1SLionel Sambuc }
5833*11be35a1SLionel Sambuc
5834*11be35a1SLionel Sambuc report_count(1);
5835*11be35a1SLionel Sambuc report_return(mvinsnstr(y, x, args[2], n));
5836*11be35a1SLionel Sambuc }
5837*11be35a1SLionel Sambuc
5838*11be35a1SLionel Sambuc
5839*11be35a1SLionel Sambuc void
cmd_mvinsstr(int nargs,char ** args)5840*11be35a1SLionel Sambuc cmd_mvinsstr(int nargs, char **args)
5841*11be35a1SLionel Sambuc {
5842*11be35a1SLionel Sambuc int y, x;
5843*11be35a1SLionel Sambuc
5844*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5845*11be35a1SLionel Sambuc return;
5846*11be35a1SLionel Sambuc
5847*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
5848*11be35a1SLionel Sambuc report_count(1);
5849*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5850*11be35a1SLionel Sambuc return;
5851*11be35a1SLionel Sambuc }
5852*11be35a1SLionel Sambuc
5853*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
5854*11be35a1SLionel Sambuc report_count(1);
5855*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5856*11be35a1SLionel Sambuc return;
5857*11be35a1SLionel Sambuc }
5858*11be35a1SLionel Sambuc
5859*11be35a1SLionel Sambuc report_count(1);
5860*11be35a1SLionel Sambuc report_return(mvinsstr(y, x, args[2]));
5861*11be35a1SLionel Sambuc }
5862*11be35a1SLionel Sambuc
5863*11be35a1SLionel Sambuc
5864*11be35a1SLionel Sambuc void
cmd_mvwinsnstr(int nargs,char ** args)5865*11be35a1SLionel Sambuc cmd_mvwinsnstr(int nargs, char **args)
5866*11be35a1SLionel Sambuc {
5867*11be35a1SLionel Sambuc WINDOW *win;
5868*11be35a1SLionel Sambuc int y, x, n;
5869*11be35a1SLionel Sambuc
5870*11be35a1SLionel Sambuc if (check_arg_count(nargs, 5) == 1)
5871*11be35a1SLionel Sambuc return;
5872*11be35a1SLionel Sambuc
5873*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5874*11be35a1SLionel Sambuc report_count(1);
5875*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5876*11be35a1SLionel Sambuc return;
5877*11be35a1SLionel Sambuc }
5878*11be35a1SLionel Sambuc
5879*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
5880*11be35a1SLionel Sambuc report_count(1);
5881*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5882*11be35a1SLionel Sambuc return;
5883*11be35a1SLionel Sambuc }
5884*11be35a1SLionel Sambuc
5885*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
5886*11be35a1SLionel Sambuc report_count(1);
5887*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5888*11be35a1SLionel Sambuc return;
5889*11be35a1SLionel Sambuc }
5890*11be35a1SLionel Sambuc
5891*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &n) == 0) {
5892*11be35a1SLionel Sambuc report_count(1);
5893*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5894*11be35a1SLionel Sambuc return;
5895*11be35a1SLionel Sambuc }
5896*11be35a1SLionel Sambuc
5897*11be35a1SLionel Sambuc report_count(1);
5898*11be35a1SLionel Sambuc report_return(mvwinsnstr(win, y, x, args[3], n));
5899*11be35a1SLionel Sambuc
5900*11be35a1SLionel Sambuc }
5901*11be35a1SLionel Sambuc
5902*11be35a1SLionel Sambuc
5903*11be35a1SLionel Sambuc void
cmd_mvwinsstr(int nargs,char ** args)5904*11be35a1SLionel Sambuc cmd_mvwinsstr(int nargs, char **args)
5905*11be35a1SLionel Sambuc {
5906*11be35a1SLionel Sambuc WINDOW *win;
5907*11be35a1SLionel Sambuc int y, x;
5908*11be35a1SLionel Sambuc
5909*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
5910*11be35a1SLionel Sambuc return;
5911*11be35a1SLionel Sambuc
5912*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5913*11be35a1SLionel Sambuc report_count(1);
5914*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5915*11be35a1SLionel Sambuc return;
5916*11be35a1SLionel Sambuc }
5917*11be35a1SLionel Sambuc
5918*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
5919*11be35a1SLionel Sambuc report_count(1);
5920*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5921*11be35a1SLionel Sambuc return;
5922*11be35a1SLionel Sambuc }
5923*11be35a1SLionel Sambuc
5924*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
5925*11be35a1SLionel Sambuc report_count(1);
5926*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5927*11be35a1SLionel Sambuc return;
5928*11be35a1SLionel Sambuc }
5929*11be35a1SLionel Sambuc
5930*11be35a1SLionel Sambuc report_count(1);
5931*11be35a1SLionel Sambuc report_return(mvwinsstr(win, y, x, args[3]));
5932*11be35a1SLionel Sambuc }
5933*11be35a1SLionel Sambuc
5934*11be35a1SLionel Sambuc
5935*11be35a1SLionel Sambuc void
cmd_winsnstr(int nargs,char ** args)5936*11be35a1SLionel Sambuc cmd_winsnstr(int nargs, char **args)
5937*11be35a1SLionel Sambuc {
5938*11be35a1SLionel Sambuc WINDOW *win;
5939*11be35a1SLionel Sambuc int n;
5940*11be35a1SLionel Sambuc
5941*11be35a1SLionel Sambuc if (check_arg_count(nargs, 3) == 1)
5942*11be35a1SLionel Sambuc return;
5943*11be35a1SLionel Sambuc
5944*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5945*11be35a1SLionel Sambuc report_count(1);
5946*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5947*11be35a1SLionel Sambuc return;
5948*11be35a1SLionel Sambuc }
5949*11be35a1SLionel Sambuc
5950*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &n) == 0) {
5951*11be35a1SLionel Sambuc report_count(1);
5952*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5953*11be35a1SLionel Sambuc return;
5954*11be35a1SLionel Sambuc }
5955*11be35a1SLionel Sambuc
5956*11be35a1SLionel Sambuc report_count(1);
5957*11be35a1SLionel Sambuc report_return(winsnstr(win, args[1], n));
5958*11be35a1SLionel Sambuc }
5959*11be35a1SLionel Sambuc
5960*11be35a1SLionel Sambuc
5961*11be35a1SLionel Sambuc void
cmd_winsstr(int nargs,char ** args)5962*11be35a1SLionel Sambuc cmd_winsstr(int nargs, char **args)
5963*11be35a1SLionel Sambuc {
5964*11be35a1SLionel Sambuc WINDOW *win;
5965*11be35a1SLionel Sambuc
5966*11be35a1SLionel Sambuc if (check_arg_count(nargs, 2) == 1)
5967*11be35a1SLionel Sambuc return;
5968*11be35a1SLionel Sambuc
5969*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
5970*11be35a1SLionel Sambuc report_count(1);
5971*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5972*11be35a1SLionel Sambuc return;
5973*11be35a1SLionel Sambuc }
5974*11be35a1SLionel Sambuc
5975*11be35a1SLionel Sambuc report_count(1);
5976*11be35a1SLionel Sambuc report_return(winsstr(win, args[1]));
5977*11be35a1SLionel Sambuc }
5978*11be35a1SLionel Sambuc
5979*11be35a1SLionel Sambuc
5980*11be35a1SLionel Sambuc
5981*11be35a1SLionel Sambuc void
cmd_chgat(int nargs,char ** args)5982*11be35a1SLionel Sambuc cmd_chgat(int nargs, char **args)
5983*11be35a1SLionel Sambuc {
5984*11be35a1SLionel Sambuc int n, attr, colour;
5985*11be35a1SLionel Sambuc
5986*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
5987*11be35a1SLionel Sambuc return;
5988*11be35a1SLionel Sambuc
5989*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &n) == 0) {
5990*11be35a1SLionel Sambuc report_count(1);
5991*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5992*11be35a1SLionel Sambuc return;
5993*11be35a1SLionel Sambuc }
5994*11be35a1SLionel Sambuc
5995*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &attr) == 0) {
5996*11be35a1SLionel Sambuc report_count(1);
5997*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
5998*11be35a1SLionel Sambuc return;
5999*11be35a1SLionel Sambuc }
6000*11be35a1SLionel Sambuc
6001*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &colour) == 0) {
6002*11be35a1SLionel Sambuc report_count(1);
6003*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6004*11be35a1SLionel Sambuc return;
6005*11be35a1SLionel Sambuc }
6006*11be35a1SLionel Sambuc
6007*11be35a1SLionel Sambuc /* Note: 4th argument unused in current curses implementation */
6008*11be35a1SLionel Sambuc report_count(1);
6009*11be35a1SLionel Sambuc report_return(chgat(n, attr, colour, NULL));
6010*11be35a1SLionel Sambuc }
6011*11be35a1SLionel Sambuc
6012*11be35a1SLionel Sambuc
6013*11be35a1SLionel Sambuc void
cmd_wchgat(int nargs,char ** args)6014*11be35a1SLionel Sambuc cmd_wchgat(int nargs, char **args)
6015*11be35a1SLionel Sambuc {
6016*11be35a1SLionel Sambuc WINDOW *win;
6017*11be35a1SLionel Sambuc int n, attr;
6018*11be35a1SLionel Sambuc short colour;
6019*11be35a1SLionel Sambuc
6020*11be35a1SLionel Sambuc if (check_arg_count(nargs, 4) == 1)
6021*11be35a1SLionel Sambuc return;
6022*11be35a1SLionel Sambuc
6023*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
6024*11be35a1SLionel Sambuc report_count(1);
6025*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6026*11be35a1SLionel Sambuc return;
6027*11be35a1SLionel Sambuc }
6028*11be35a1SLionel Sambuc
6029*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &n) == 0) {
6030*11be35a1SLionel Sambuc report_count(1);
6031*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6032*11be35a1SLionel Sambuc return;
6033*11be35a1SLionel Sambuc }
6034*11be35a1SLionel Sambuc
6035*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &attr) == 0) {
6036*11be35a1SLionel Sambuc report_count(1);
6037*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6038*11be35a1SLionel Sambuc return;
6039*11be35a1SLionel Sambuc }
6040*11be35a1SLionel Sambuc
6041*11be35a1SLionel Sambuc if (sscanf(args[3], "%hd", &colour) == 0) {
6042*11be35a1SLionel Sambuc report_count(1);
6043*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6044*11be35a1SLionel Sambuc return;
6045*11be35a1SLionel Sambuc }
6046*11be35a1SLionel Sambuc
6047*11be35a1SLionel Sambuc report_count(1);
6048*11be35a1SLionel Sambuc report_return(wchgat(win, n, attr, colour, NULL));
6049*11be35a1SLionel Sambuc }
6050*11be35a1SLionel Sambuc
6051*11be35a1SLionel Sambuc
6052*11be35a1SLionel Sambuc void
cmd_mvchgat(int nargs,char ** args)6053*11be35a1SLionel Sambuc cmd_mvchgat(int nargs, char **args)
6054*11be35a1SLionel Sambuc {
6055*11be35a1SLionel Sambuc int y, x, n, attr;
6056*11be35a1SLionel Sambuc short colour;
6057*11be35a1SLionel Sambuc
6058*11be35a1SLionel Sambuc if (check_arg_count(nargs, 6) == 1)
6059*11be35a1SLionel Sambuc return;
6060*11be35a1SLionel Sambuc
6061*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &y) == 0) {
6062*11be35a1SLionel Sambuc report_count(1);
6063*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6064*11be35a1SLionel Sambuc return;
6065*11be35a1SLionel Sambuc }
6066*11be35a1SLionel Sambuc
6067*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &x) == 0) {
6068*11be35a1SLionel Sambuc report_count(1);
6069*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6070*11be35a1SLionel Sambuc return;
6071*11be35a1SLionel Sambuc }
6072*11be35a1SLionel Sambuc
6073*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &n) == 0) {
6074*11be35a1SLionel Sambuc report_count(1);
6075*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6076*11be35a1SLionel Sambuc return;
6077*11be35a1SLionel Sambuc }
6078*11be35a1SLionel Sambuc
6079*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &attr) == 0) {
6080*11be35a1SLionel Sambuc report_count(1);
6081*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6082*11be35a1SLionel Sambuc return;
6083*11be35a1SLionel Sambuc }
6084*11be35a1SLionel Sambuc
6085*11be35a1SLionel Sambuc if (sscanf(args[4], "%hd", &colour) == 0) {
6086*11be35a1SLionel Sambuc report_count(1);
6087*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6088*11be35a1SLionel Sambuc return;
6089*11be35a1SLionel Sambuc }
6090*11be35a1SLionel Sambuc
6091*11be35a1SLionel Sambuc report_count(1);
6092*11be35a1SLionel Sambuc report_return(mvchgat(y, x, n, attr, colour, NULL));
6093*11be35a1SLionel Sambuc }
6094*11be35a1SLionel Sambuc
6095*11be35a1SLionel Sambuc
6096*11be35a1SLionel Sambuc void
cmd_mvwchgat(int nargs,char ** args)6097*11be35a1SLionel Sambuc cmd_mvwchgat(int nargs, char **args)
6098*11be35a1SLionel Sambuc {
6099*11be35a1SLionel Sambuc WINDOW *win;
6100*11be35a1SLionel Sambuc int y, x, n, attr, colour;
6101*11be35a1SLionel Sambuc
6102*11be35a1SLionel Sambuc if (check_arg_count(nargs, 6) == 1)
6103*11be35a1SLionel Sambuc return;
6104*11be35a1SLionel Sambuc
6105*11be35a1SLionel Sambuc if (sscanf(args[0], "%p", &win) == 0) {
6106*11be35a1SLionel Sambuc report_count(1);
6107*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6108*11be35a1SLionel Sambuc return;
6109*11be35a1SLionel Sambuc }
6110*11be35a1SLionel Sambuc
6111*11be35a1SLionel Sambuc if (sscanf(args[1], "%d", &y) == 0) {
6112*11be35a1SLionel Sambuc report_count(1);
6113*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6114*11be35a1SLionel Sambuc return;
6115*11be35a1SLionel Sambuc }
6116*11be35a1SLionel Sambuc
6117*11be35a1SLionel Sambuc if (sscanf(args[2], "%d", &x) == 0) {
6118*11be35a1SLionel Sambuc report_count(1);
6119*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6120*11be35a1SLionel Sambuc return;
6121*11be35a1SLionel Sambuc }
6122*11be35a1SLionel Sambuc
6123*11be35a1SLionel Sambuc if (sscanf(args[3], "%d", &n) == 0) {
6124*11be35a1SLionel Sambuc report_count(1);
6125*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6126*11be35a1SLionel Sambuc return;
6127*11be35a1SLionel Sambuc }
6128*11be35a1SLionel Sambuc
6129*11be35a1SLionel Sambuc if (sscanf(args[4], "%d", &attr) == 0) {
6130*11be35a1SLionel Sambuc report_count(1);
6131*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6132*11be35a1SLionel Sambuc return;
6133*11be35a1SLionel Sambuc }
6134*11be35a1SLionel Sambuc
6135*11be35a1SLionel Sambuc if (sscanf(args[5], "%d", &colour) == 0) {
6136*11be35a1SLionel Sambuc report_count(1);
6137*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6138*11be35a1SLionel Sambuc return;
6139*11be35a1SLionel Sambuc }
6140*11be35a1SLionel Sambuc
6141*11be35a1SLionel Sambuc report_count(1);
6142*11be35a1SLionel Sambuc report_return(mvwchgat(win, y, x, n, attr, colour, NULL));
6143*11be35a1SLionel Sambuc }
6144*11be35a1SLionel Sambuc
6145*11be35a1SLionel Sambuc
6146*11be35a1SLionel Sambuc void
cmd_add_wch(int nargs,char ** args)6147*11be35a1SLionel Sambuc cmd_add_wch(int nargs, char **args)
6148*11be35a1SLionel Sambuc {
6149*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6150*11be35a1SLionel Sambuc return;
6151*11be35a1SLionel Sambuc
6152*11be35a1SLionel Sambuc report_count(1);
6153*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6154*11be35a1SLionel Sambuc }
6155*11be35a1SLionel Sambuc
6156*11be35a1SLionel Sambuc
6157*11be35a1SLionel Sambuc void
cmd_wadd_wch(int nargs,char ** args)6158*11be35a1SLionel Sambuc cmd_wadd_wch(int nargs, char **args)
6159*11be35a1SLionel Sambuc {
6160*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6161*11be35a1SLionel Sambuc return;
6162*11be35a1SLionel Sambuc
6163*11be35a1SLionel Sambuc report_count(1);
6164*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6165*11be35a1SLionel Sambuc }
6166*11be35a1SLionel Sambuc
6167*11be35a1SLionel Sambuc
6168*11be35a1SLionel Sambuc void
cmd_mvadd_wch(int nargs,char ** args)6169*11be35a1SLionel Sambuc cmd_mvadd_wch(int nargs, char **args)
6170*11be35a1SLionel Sambuc {
6171*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6172*11be35a1SLionel Sambuc return;
6173*11be35a1SLionel Sambuc
6174*11be35a1SLionel Sambuc report_count(1);
6175*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6176*11be35a1SLionel Sambuc }
6177*11be35a1SLionel Sambuc
6178*11be35a1SLionel Sambuc
6179*11be35a1SLionel Sambuc void
cmd_mvwadd_wch(int nargs,char ** args)6180*11be35a1SLionel Sambuc cmd_mvwadd_wch(int nargs, char **args)
6181*11be35a1SLionel Sambuc {
6182*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6183*11be35a1SLionel Sambuc return;
6184*11be35a1SLionel Sambuc
6185*11be35a1SLionel Sambuc report_count(1);
6186*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6187*11be35a1SLionel Sambuc }
6188*11be35a1SLionel Sambuc
6189*11be35a1SLionel Sambuc
6190*11be35a1SLionel Sambuc
6191*11be35a1SLionel Sambuc void
cmd_add_wchnstr(int nargs,char ** args)6192*11be35a1SLionel Sambuc cmd_add_wchnstr(int nargs, char **args)
6193*11be35a1SLionel Sambuc {
6194*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6195*11be35a1SLionel Sambuc return;
6196*11be35a1SLionel Sambuc
6197*11be35a1SLionel Sambuc report_count(1);
6198*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6199*11be35a1SLionel Sambuc }
6200*11be35a1SLionel Sambuc
6201*11be35a1SLionel Sambuc
6202*11be35a1SLionel Sambuc void
cmd_add_wchstr(int nargs,char ** args)6203*11be35a1SLionel Sambuc cmd_add_wchstr(int nargs, char **args)
6204*11be35a1SLionel Sambuc {
6205*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6206*11be35a1SLionel Sambuc return;
6207*11be35a1SLionel Sambuc
6208*11be35a1SLionel Sambuc report_count(1);
6209*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6210*11be35a1SLionel Sambuc }
6211*11be35a1SLionel Sambuc
6212*11be35a1SLionel Sambuc
6213*11be35a1SLionel Sambuc void
cmd_wadd_wchnstr(int nargs,char ** args)6214*11be35a1SLionel Sambuc cmd_wadd_wchnstr(int nargs, char **args)
6215*11be35a1SLionel Sambuc {
6216*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6217*11be35a1SLionel Sambuc return;
6218*11be35a1SLionel Sambuc
6219*11be35a1SLionel Sambuc report_count(1);
6220*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6221*11be35a1SLionel Sambuc }
6222*11be35a1SLionel Sambuc
6223*11be35a1SLionel Sambuc
6224*11be35a1SLionel Sambuc void
cmd_wadd_wchstr(int nargs,char ** args)6225*11be35a1SLionel Sambuc cmd_wadd_wchstr(int nargs, char **args)
6226*11be35a1SLionel Sambuc {
6227*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6228*11be35a1SLionel Sambuc return;
6229*11be35a1SLionel Sambuc
6230*11be35a1SLionel Sambuc report_count(1);
6231*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6232*11be35a1SLionel Sambuc }
6233*11be35a1SLionel Sambuc
6234*11be35a1SLionel Sambuc
6235*11be35a1SLionel Sambuc void
cmd_mvadd_wchnstr(int nargs,char ** args)6236*11be35a1SLionel Sambuc cmd_mvadd_wchnstr(int nargs, char **args)
6237*11be35a1SLionel Sambuc {
6238*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6239*11be35a1SLionel Sambuc return;
6240*11be35a1SLionel Sambuc
6241*11be35a1SLionel Sambuc report_count(1);
6242*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6243*11be35a1SLionel Sambuc }
6244*11be35a1SLionel Sambuc
6245*11be35a1SLionel Sambuc
6246*11be35a1SLionel Sambuc void
cmd_mvadd_wchstr(int nargs,char ** args)6247*11be35a1SLionel Sambuc cmd_mvadd_wchstr(int nargs, char **args)
6248*11be35a1SLionel Sambuc {
6249*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6250*11be35a1SLionel Sambuc return;
6251*11be35a1SLionel Sambuc
6252*11be35a1SLionel Sambuc report_count(1);
6253*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6254*11be35a1SLionel Sambuc }
6255*11be35a1SLionel Sambuc
6256*11be35a1SLionel Sambuc
6257*11be35a1SLionel Sambuc void
cmd_mvwadd_wchnstr(int nargs,char ** args)6258*11be35a1SLionel Sambuc cmd_mvwadd_wchnstr(int nargs, char **args)
6259*11be35a1SLionel Sambuc {
6260*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6261*11be35a1SLionel Sambuc return;
6262*11be35a1SLionel Sambuc
6263*11be35a1SLionel Sambuc report_count(1);
6264*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6265*11be35a1SLionel Sambuc }
6266*11be35a1SLionel Sambuc
6267*11be35a1SLionel Sambuc
6268*11be35a1SLionel Sambuc void
cmd_mvwadd_wchstr(int nargs,char ** args)6269*11be35a1SLionel Sambuc cmd_mvwadd_wchstr(int nargs, char **args)
6270*11be35a1SLionel Sambuc {
6271*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6272*11be35a1SLionel Sambuc return;
6273*11be35a1SLionel Sambuc
6274*11be35a1SLionel Sambuc report_count(1);
6275*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6276*11be35a1SLionel Sambuc }
6277*11be35a1SLionel Sambuc
6278*11be35a1SLionel Sambuc
6279*11be35a1SLionel Sambuc
6280*11be35a1SLionel Sambuc void
cmd_addnwstr(int nargs,char ** args)6281*11be35a1SLionel Sambuc cmd_addnwstr(int nargs, char **args)
6282*11be35a1SLionel Sambuc {
6283*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6284*11be35a1SLionel Sambuc return;
6285*11be35a1SLionel Sambuc
6286*11be35a1SLionel Sambuc report_count(1);
6287*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6288*11be35a1SLionel Sambuc }
6289*11be35a1SLionel Sambuc
6290*11be35a1SLionel Sambuc
6291*11be35a1SLionel Sambuc void
cmd_addwstr(int nargs,char ** args)6292*11be35a1SLionel Sambuc cmd_addwstr(int nargs, char **args)
6293*11be35a1SLionel Sambuc {
6294*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6295*11be35a1SLionel Sambuc return;
6296*11be35a1SLionel Sambuc
6297*11be35a1SLionel Sambuc report_count(1);
6298*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6299*11be35a1SLionel Sambuc }
6300*11be35a1SLionel Sambuc
6301*11be35a1SLionel Sambuc
6302*11be35a1SLionel Sambuc void
cmd_mvaddnwstr(int nargs,char ** args)6303*11be35a1SLionel Sambuc cmd_mvaddnwstr(int nargs, char **args)
6304*11be35a1SLionel Sambuc {
6305*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6306*11be35a1SLionel Sambuc return;
6307*11be35a1SLionel Sambuc
6308*11be35a1SLionel Sambuc report_count(1);
6309*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6310*11be35a1SLionel Sambuc }
6311*11be35a1SLionel Sambuc
6312*11be35a1SLionel Sambuc
6313*11be35a1SLionel Sambuc void
cmd_mvaddwstr(int nargs,char ** args)6314*11be35a1SLionel Sambuc cmd_mvaddwstr(int nargs, char **args)
6315*11be35a1SLionel Sambuc {
6316*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6317*11be35a1SLionel Sambuc return;
6318*11be35a1SLionel Sambuc
6319*11be35a1SLionel Sambuc report_count(1);
6320*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6321*11be35a1SLionel Sambuc }
6322*11be35a1SLionel Sambuc
6323*11be35a1SLionel Sambuc
6324*11be35a1SLionel Sambuc void
cmd_mvwaddnwstr(int nargs,char ** args)6325*11be35a1SLionel Sambuc cmd_mvwaddnwstr(int nargs, char **args)
6326*11be35a1SLionel Sambuc {
6327*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6328*11be35a1SLionel Sambuc return;
6329*11be35a1SLionel Sambuc
6330*11be35a1SLionel Sambuc report_count(1);
6331*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6332*11be35a1SLionel Sambuc }
6333*11be35a1SLionel Sambuc
6334*11be35a1SLionel Sambuc
6335*11be35a1SLionel Sambuc void
cmd_mvwaddwstr(int nargs,char ** args)6336*11be35a1SLionel Sambuc cmd_mvwaddwstr(int nargs, char **args)
6337*11be35a1SLionel Sambuc {
6338*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6339*11be35a1SLionel Sambuc return;
6340*11be35a1SLionel Sambuc
6341*11be35a1SLionel Sambuc report_count(1);
6342*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6343*11be35a1SLionel Sambuc }
6344*11be35a1SLionel Sambuc
6345*11be35a1SLionel Sambuc
6346*11be35a1SLionel Sambuc void
cmd_waddnwstr(int nargs,char ** args)6347*11be35a1SLionel Sambuc cmd_waddnwstr(int nargs, char **args)
6348*11be35a1SLionel Sambuc {
6349*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6350*11be35a1SLionel Sambuc return;
6351*11be35a1SLionel Sambuc
6352*11be35a1SLionel Sambuc report_count(1);
6353*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6354*11be35a1SLionel Sambuc }
6355*11be35a1SLionel Sambuc
6356*11be35a1SLionel Sambuc
6357*11be35a1SLionel Sambuc void
cmd_waddwstr(int nargs,char ** args)6358*11be35a1SLionel Sambuc cmd_waddwstr(int nargs, char **args)
6359*11be35a1SLionel Sambuc {
6360*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6361*11be35a1SLionel Sambuc return;
6362*11be35a1SLionel Sambuc
6363*11be35a1SLionel Sambuc report_count(1);
6364*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6365*11be35a1SLionel Sambuc }
6366*11be35a1SLionel Sambuc
6367*11be35a1SLionel Sambuc
6368*11be35a1SLionel Sambuc
6369*11be35a1SLionel Sambuc void
cmd_echo_wchar(int nargs,char ** args)6370*11be35a1SLionel Sambuc cmd_echo_wchar(int nargs, char **args)
6371*11be35a1SLionel Sambuc {
6372*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6373*11be35a1SLionel Sambuc return;
6374*11be35a1SLionel Sambuc
6375*11be35a1SLionel Sambuc report_count(1);
6376*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6377*11be35a1SLionel Sambuc }
6378*11be35a1SLionel Sambuc
6379*11be35a1SLionel Sambuc
6380*11be35a1SLionel Sambuc void
cmd_wecho_wchar(int nargs,char ** args)6381*11be35a1SLionel Sambuc cmd_wecho_wchar(int nargs, char **args)
6382*11be35a1SLionel Sambuc {
6383*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6384*11be35a1SLionel Sambuc return;
6385*11be35a1SLionel Sambuc
6386*11be35a1SLionel Sambuc report_count(1);
6387*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6388*11be35a1SLionel Sambuc }
6389*11be35a1SLionel Sambuc
6390*11be35a1SLionel Sambuc
6391*11be35a1SLionel Sambuc void
cmd_pecho_wchar(int nargs,char ** args)6392*11be35a1SLionel Sambuc cmd_pecho_wchar(int nargs, char **args)
6393*11be35a1SLionel Sambuc {
6394*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6395*11be35a1SLionel Sambuc return;
6396*11be35a1SLionel Sambuc
6397*11be35a1SLionel Sambuc report_count(1);
6398*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6399*11be35a1SLionel Sambuc }
6400*11be35a1SLionel Sambuc
6401*11be35a1SLionel Sambuc
6402*11be35a1SLionel Sambuc
6403*11be35a1SLionel Sambuc /* insert */
6404*11be35a1SLionel Sambuc void
cmd_ins_wch(int nargs,char ** args)6405*11be35a1SLionel Sambuc cmd_ins_wch(int nargs, char **args)
6406*11be35a1SLionel Sambuc {
6407*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6408*11be35a1SLionel Sambuc return;
6409*11be35a1SLionel Sambuc
6410*11be35a1SLionel Sambuc report_count(1);
6411*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6412*11be35a1SLionel Sambuc }
6413*11be35a1SLionel Sambuc
6414*11be35a1SLionel Sambuc
6415*11be35a1SLionel Sambuc void
cmd_wins_wch(int nargs,char ** args)6416*11be35a1SLionel Sambuc cmd_wins_wch(int nargs, char **args)
6417*11be35a1SLionel Sambuc {
6418*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6419*11be35a1SLionel Sambuc return;
6420*11be35a1SLionel Sambuc
6421*11be35a1SLionel Sambuc report_count(1);
6422*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6423*11be35a1SLionel Sambuc }
6424*11be35a1SLionel Sambuc
6425*11be35a1SLionel Sambuc
6426*11be35a1SLionel Sambuc void
cmd_mvins_wch(int nargs,char ** args)6427*11be35a1SLionel Sambuc cmd_mvins_wch(int nargs, char **args)
6428*11be35a1SLionel Sambuc {
6429*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6430*11be35a1SLionel Sambuc return;
6431*11be35a1SLionel Sambuc
6432*11be35a1SLionel Sambuc report_count(1);
6433*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6434*11be35a1SLionel Sambuc }
6435*11be35a1SLionel Sambuc
6436*11be35a1SLionel Sambuc
6437*11be35a1SLionel Sambuc void
cmd_mvwins_wch(int nargs,char ** args)6438*11be35a1SLionel Sambuc cmd_mvwins_wch(int nargs, char **args)
6439*11be35a1SLionel Sambuc {
6440*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6441*11be35a1SLionel Sambuc return;
6442*11be35a1SLionel Sambuc
6443*11be35a1SLionel Sambuc report_count(1);
6444*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6445*11be35a1SLionel Sambuc }
6446*11be35a1SLionel Sambuc
6447*11be35a1SLionel Sambuc
6448*11be35a1SLionel Sambuc
6449*11be35a1SLionel Sambuc void
cmd_ins_nwstr(int nargs,char ** args)6450*11be35a1SLionel Sambuc cmd_ins_nwstr(int nargs, char **args)
6451*11be35a1SLionel Sambuc {
6452*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6453*11be35a1SLionel Sambuc return;
6454*11be35a1SLionel Sambuc
6455*11be35a1SLionel Sambuc report_count(1);
6456*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6457*11be35a1SLionel Sambuc }
6458*11be35a1SLionel Sambuc
6459*11be35a1SLionel Sambuc
6460*11be35a1SLionel Sambuc void
cmd_ins_wstr(int nargs,char ** args)6461*11be35a1SLionel Sambuc cmd_ins_wstr(int nargs, char **args)
6462*11be35a1SLionel Sambuc {
6463*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6464*11be35a1SLionel Sambuc return;
6465*11be35a1SLionel Sambuc
6466*11be35a1SLionel Sambuc report_count(1);
6467*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6468*11be35a1SLionel Sambuc }
6469*11be35a1SLionel Sambuc
6470*11be35a1SLionel Sambuc
6471*11be35a1SLionel Sambuc void
cmd_mvins_nwstr(int nargs,char ** args)6472*11be35a1SLionel Sambuc cmd_mvins_nwstr(int nargs, char **args)
6473*11be35a1SLionel Sambuc {
6474*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6475*11be35a1SLionel Sambuc return;
6476*11be35a1SLionel Sambuc
6477*11be35a1SLionel Sambuc report_count(1);
6478*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6479*11be35a1SLionel Sambuc }
6480*11be35a1SLionel Sambuc
6481*11be35a1SLionel Sambuc
6482*11be35a1SLionel Sambuc void
cmd_mvins_wstr(int nargs,char ** args)6483*11be35a1SLionel Sambuc cmd_mvins_wstr(int nargs, char **args)
6484*11be35a1SLionel Sambuc {
6485*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6486*11be35a1SLionel Sambuc return;
6487*11be35a1SLionel Sambuc
6488*11be35a1SLionel Sambuc report_count(1);
6489*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6490*11be35a1SLionel Sambuc }
6491*11be35a1SLionel Sambuc
6492*11be35a1SLionel Sambuc
6493*11be35a1SLionel Sambuc void
cmd_mvwins_nwstr(int nargs,char ** args)6494*11be35a1SLionel Sambuc cmd_mvwins_nwstr(int nargs, char **args)
6495*11be35a1SLionel Sambuc {
6496*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6497*11be35a1SLionel Sambuc return;
6498*11be35a1SLionel Sambuc
6499*11be35a1SLionel Sambuc report_count(1);
6500*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6501*11be35a1SLionel Sambuc }
6502*11be35a1SLionel Sambuc
6503*11be35a1SLionel Sambuc
6504*11be35a1SLionel Sambuc void
cmd_mvwins_wstr(int nargs,char ** args)6505*11be35a1SLionel Sambuc cmd_mvwins_wstr(int nargs, char **args)
6506*11be35a1SLionel Sambuc {
6507*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6508*11be35a1SLionel Sambuc return;
6509*11be35a1SLionel Sambuc
6510*11be35a1SLionel Sambuc report_count(1);
6511*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6512*11be35a1SLionel Sambuc }
6513*11be35a1SLionel Sambuc
6514*11be35a1SLionel Sambuc
6515*11be35a1SLionel Sambuc void
cmd_wins_nwstr(int nargs,char ** args)6516*11be35a1SLionel Sambuc cmd_wins_nwstr(int nargs, char **args)
6517*11be35a1SLionel Sambuc {
6518*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6519*11be35a1SLionel Sambuc return;
6520*11be35a1SLionel Sambuc
6521*11be35a1SLionel Sambuc report_count(1);
6522*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6523*11be35a1SLionel Sambuc }
6524*11be35a1SLionel Sambuc
6525*11be35a1SLionel Sambuc
6526*11be35a1SLionel Sambuc void
cmd_wins_wstr(int nargs,char ** args)6527*11be35a1SLionel Sambuc cmd_wins_wstr(int nargs, char **args)
6528*11be35a1SLionel Sambuc {
6529*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6530*11be35a1SLionel Sambuc return;
6531*11be35a1SLionel Sambuc
6532*11be35a1SLionel Sambuc report_count(1);
6533*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6534*11be35a1SLionel Sambuc }
6535*11be35a1SLionel Sambuc
6536*11be35a1SLionel Sambuc
6537*11be35a1SLionel Sambuc
6538*11be35a1SLionel Sambuc /* input */
6539*11be35a1SLionel Sambuc void
cmd_get_wch(int nargs,char ** args)6540*11be35a1SLionel Sambuc cmd_get_wch(int nargs, char **args)
6541*11be35a1SLionel Sambuc {
6542*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6543*11be35a1SLionel Sambuc return;
6544*11be35a1SLionel Sambuc
6545*11be35a1SLionel Sambuc report_count(1);
6546*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6547*11be35a1SLionel Sambuc }
6548*11be35a1SLionel Sambuc
6549*11be35a1SLionel Sambuc
6550*11be35a1SLionel Sambuc void
cmd_unget_wch(int nargs,char ** args)6551*11be35a1SLionel Sambuc cmd_unget_wch(int nargs, char **args)
6552*11be35a1SLionel Sambuc {
6553*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6554*11be35a1SLionel Sambuc return;
6555*11be35a1SLionel Sambuc
6556*11be35a1SLionel Sambuc report_count(1);
6557*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6558*11be35a1SLionel Sambuc }
6559*11be35a1SLionel Sambuc
6560*11be35a1SLionel Sambuc
6561*11be35a1SLionel Sambuc void
cmd_mvget_wch(int nargs,char ** args)6562*11be35a1SLionel Sambuc cmd_mvget_wch(int nargs, char **args)
6563*11be35a1SLionel Sambuc {
6564*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6565*11be35a1SLionel Sambuc return;
6566*11be35a1SLionel Sambuc
6567*11be35a1SLionel Sambuc report_count(1);
6568*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6569*11be35a1SLionel Sambuc }
6570*11be35a1SLionel Sambuc
6571*11be35a1SLionel Sambuc
6572*11be35a1SLionel Sambuc void
cmd_mvwget_wch(int nargs,char ** args)6573*11be35a1SLionel Sambuc cmd_mvwget_wch(int nargs, char **args)
6574*11be35a1SLionel Sambuc {
6575*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6576*11be35a1SLionel Sambuc return;
6577*11be35a1SLionel Sambuc
6578*11be35a1SLionel Sambuc report_count(1);
6579*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6580*11be35a1SLionel Sambuc }
6581*11be35a1SLionel Sambuc
6582*11be35a1SLionel Sambuc
6583*11be35a1SLionel Sambuc void
cmd_wget_wch(int nargs,char ** args)6584*11be35a1SLionel Sambuc cmd_wget_wch(int nargs, char **args)
6585*11be35a1SLionel Sambuc {
6586*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6587*11be35a1SLionel Sambuc return;
6588*11be35a1SLionel Sambuc
6589*11be35a1SLionel Sambuc report_count(1);
6590*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6591*11be35a1SLionel Sambuc }
6592*11be35a1SLionel Sambuc
6593*11be35a1SLionel Sambuc
6594*11be35a1SLionel Sambuc
6595*11be35a1SLionel Sambuc void
cmd_getn_wstr(int nargs,char ** args)6596*11be35a1SLionel Sambuc cmd_getn_wstr(int nargs, char **args)
6597*11be35a1SLionel Sambuc {
6598*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6599*11be35a1SLionel Sambuc return;
6600*11be35a1SLionel Sambuc
6601*11be35a1SLionel Sambuc report_count(1);
6602*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6603*11be35a1SLionel Sambuc }
6604*11be35a1SLionel Sambuc
6605*11be35a1SLionel Sambuc
6606*11be35a1SLionel Sambuc void
cmd_get_wstr(int nargs,char ** args)6607*11be35a1SLionel Sambuc cmd_get_wstr(int nargs, char **args)
6608*11be35a1SLionel Sambuc {
6609*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6610*11be35a1SLionel Sambuc return;
6611*11be35a1SLionel Sambuc
6612*11be35a1SLionel Sambuc report_count(1);
6613*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6614*11be35a1SLionel Sambuc }
6615*11be35a1SLionel Sambuc
6616*11be35a1SLionel Sambuc
6617*11be35a1SLionel Sambuc void
cmd_mvgetn_wstr(int nargs,char ** args)6618*11be35a1SLionel Sambuc cmd_mvgetn_wstr(int nargs, char **args)
6619*11be35a1SLionel Sambuc {
6620*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6621*11be35a1SLionel Sambuc return;
6622*11be35a1SLionel Sambuc
6623*11be35a1SLionel Sambuc report_count(1);
6624*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6625*11be35a1SLionel Sambuc }
6626*11be35a1SLionel Sambuc
6627*11be35a1SLionel Sambuc
6628*11be35a1SLionel Sambuc void
cmd_mvget_wstr(int nargs,char ** args)6629*11be35a1SLionel Sambuc cmd_mvget_wstr(int nargs, char **args)
6630*11be35a1SLionel Sambuc {
6631*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6632*11be35a1SLionel Sambuc return;
6633*11be35a1SLionel Sambuc
6634*11be35a1SLionel Sambuc report_count(1);
6635*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6636*11be35a1SLionel Sambuc }
6637*11be35a1SLionel Sambuc
6638*11be35a1SLionel Sambuc
6639*11be35a1SLionel Sambuc void
cmd_mvwgetn_wstr(int nargs,char ** args)6640*11be35a1SLionel Sambuc cmd_mvwgetn_wstr(int nargs, char **args)
6641*11be35a1SLionel Sambuc {
6642*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6643*11be35a1SLionel Sambuc return;
6644*11be35a1SLionel Sambuc
6645*11be35a1SLionel Sambuc report_count(1);
6646*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6647*11be35a1SLionel Sambuc }
6648*11be35a1SLionel Sambuc
6649*11be35a1SLionel Sambuc
6650*11be35a1SLionel Sambuc void
cmd_mvwget_wstr(int nargs,char ** args)6651*11be35a1SLionel Sambuc cmd_mvwget_wstr(int nargs, char **args)
6652*11be35a1SLionel Sambuc {
6653*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6654*11be35a1SLionel Sambuc return;
6655*11be35a1SLionel Sambuc
6656*11be35a1SLionel Sambuc report_count(1);
6657*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6658*11be35a1SLionel Sambuc }
6659*11be35a1SLionel Sambuc
6660*11be35a1SLionel Sambuc
6661*11be35a1SLionel Sambuc void
cmd_wgetn_wstr(int nargs,char ** args)6662*11be35a1SLionel Sambuc cmd_wgetn_wstr(int nargs, char **args)
6663*11be35a1SLionel Sambuc {
6664*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6665*11be35a1SLionel Sambuc return;
6666*11be35a1SLionel Sambuc
6667*11be35a1SLionel Sambuc report_count(1);
6668*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6669*11be35a1SLionel Sambuc }
6670*11be35a1SLionel Sambuc
6671*11be35a1SLionel Sambuc
6672*11be35a1SLionel Sambuc void
cmd_wget_wstr(int nargs,char ** args)6673*11be35a1SLionel Sambuc cmd_wget_wstr(int nargs, char **args)
6674*11be35a1SLionel Sambuc {
6675*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6676*11be35a1SLionel Sambuc return;
6677*11be35a1SLionel Sambuc
6678*11be35a1SLionel Sambuc report_count(1);
6679*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6680*11be35a1SLionel Sambuc }
6681*11be35a1SLionel Sambuc
6682*11be35a1SLionel Sambuc
6683*11be35a1SLionel Sambuc
6684*11be35a1SLionel Sambuc void
cmd_in_wch(int nargs,char ** args)6685*11be35a1SLionel Sambuc cmd_in_wch(int nargs, char **args)
6686*11be35a1SLionel Sambuc {
6687*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6688*11be35a1SLionel Sambuc return;
6689*11be35a1SLionel Sambuc
6690*11be35a1SLionel Sambuc report_count(1);
6691*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6692*11be35a1SLionel Sambuc }
6693*11be35a1SLionel Sambuc
6694*11be35a1SLionel Sambuc
6695*11be35a1SLionel Sambuc void
cmd_mvin_wch(int nargs,char ** args)6696*11be35a1SLionel Sambuc cmd_mvin_wch(int nargs, char **args)
6697*11be35a1SLionel Sambuc {
6698*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6699*11be35a1SLionel Sambuc return;
6700*11be35a1SLionel Sambuc
6701*11be35a1SLionel Sambuc report_count(1);
6702*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6703*11be35a1SLionel Sambuc }
6704*11be35a1SLionel Sambuc
6705*11be35a1SLionel Sambuc
6706*11be35a1SLionel Sambuc void
cmd_mvwin_wch(int nargs,char ** args)6707*11be35a1SLionel Sambuc cmd_mvwin_wch(int nargs, char **args)
6708*11be35a1SLionel Sambuc {
6709*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6710*11be35a1SLionel Sambuc return;
6711*11be35a1SLionel Sambuc
6712*11be35a1SLionel Sambuc report_count(1);
6713*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6714*11be35a1SLionel Sambuc }
6715*11be35a1SLionel Sambuc
6716*11be35a1SLionel Sambuc
6717*11be35a1SLionel Sambuc void
cmd_win_wch(int nargs,char ** args)6718*11be35a1SLionel Sambuc cmd_win_wch(int nargs, char **args)
6719*11be35a1SLionel Sambuc {
6720*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6721*11be35a1SLionel Sambuc return;
6722*11be35a1SLionel Sambuc
6723*11be35a1SLionel Sambuc report_count(1);
6724*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6725*11be35a1SLionel Sambuc }
6726*11be35a1SLionel Sambuc
6727*11be35a1SLionel Sambuc
6728*11be35a1SLionel Sambuc
6729*11be35a1SLionel Sambuc void
cmd_in_wchnstr(int nargs,char ** args)6730*11be35a1SLionel Sambuc cmd_in_wchnstr(int nargs, char **args)
6731*11be35a1SLionel Sambuc {
6732*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6733*11be35a1SLionel Sambuc return;
6734*11be35a1SLionel Sambuc
6735*11be35a1SLionel Sambuc report_count(1);
6736*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6737*11be35a1SLionel Sambuc }
6738*11be35a1SLionel Sambuc
6739*11be35a1SLionel Sambuc
6740*11be35a1SLionel Sambuc void
cmd_in_wchstr(int nargs,char ** args)6741*11be35a1SLionel Sambuc cmd_in_wchstr(int nargs, char **args)
6742*11be35a1SLionel Sambuc {
6743*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6744*11be35a1SLionel Sambuc return;
6745*11be35a1SLionel Sambuc
6746*11be35a1SLionel Sambuc report_count(1);
6747*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6748*11be35a1SLionel Sambuc }
6749*11be35a1SLionel Sambuc
6750*11be35a1SLionel Sambuc
6751*11be35a1SLionel Sambuc void
cmd_mvin_wchnstr(int nargs,char ** args)6752*11be35a1SLionel Sambuc cmd_mvin_wchnstr(int nargs, char **args)
6753*11be35a1SLionel Sambuc {
6754*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6755*11be35a1SLionel Sambuc return;
6756*11be35a1SLionel Sambuc
6757*11be35a1SLionel Sambuc report_count(1);
6758*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6759*11be35a1SLionel Sambuc }
6760*11be35a1SLionel Sambuc
6761*11be35a1SLionel Sambuc
6762*11be35a1SLionel Sambuc void
cmd_mvin_wchstr(int nargs,char ** args)6763*11be35a1SLionel Sambuc cmd_mvin_wchstr(int nargs, char **args)
6764*11be35a1SLionel Sambuc {
6765*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6766*11be35a1SLionel Sambuc return;
6767*11be35a1SLionel Sambuc
6768*11be35a1SLionel Sambuc report_count(1);
6769*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6770*11be35a1SLionel Sambuc }
6771*11be35a1SLionel Sambuc
6772*11be35a1SLionel Sambuc
6773*11be35a1SLionel Sambuc void
cmd_mvwin_wchnstr(int nargs,char ** args)6774*11be35a1SLionel Sambuc cmd_mvwin_wchnstr(int nargs, char **args)
6775*11be35a1SLionel Sambuc {
6776*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6777*11be35a1SLionel Sambuc return;
6778*11be35a1SLionel Sambuc
6779*11be35a1SLionel Sambuc report_count(1);
6780*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6781*11be35a1SLionel Sambuc }
6782*11be35a1SLionel Sambuc
6783*11be35a1SLionel Sambuc
6784*11be35a1SLionel Sambuc void
cmd_mvwin_wchstr(int nargs,char ** args)6785*11be35a1SLionel Sambuc cmd_mvwin_wchstr(int nargs, char **args)
6786*11be35a1SLionel Sambuc {
6787*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6788*11be35a1SLionel Sambuc return;
6789*11be35a1SLionel Sambuc
6790*11be35a1SLionel Sambuc report_count(1);
6791*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6792*11be35a1SLionel Sambuc }
6793*11be35a1SLionel Sambuc
6794*11be35a1SLionel Sambuc
6795*11be35a1SLionel Sambuc void
cmd_win_wchnstr(int nargs,char ** args)6796*11be35a1SLionel Sambuc cmd_win_wchnstr(int nargs, char **args)
6797*11be35a1SLionel Sambuc {
6798*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6799*11be35a1SLionel Sambuc return;
6800*11be35a1SLionel Sambuc
6801*11be35a1SLionel Sambuc report_count(1);
6802*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6803*11be35a1SLionel Sambuc }
6804*11be35a1SLionel Sambuc
6805*11be35a1SLionel Sambuc
6806*11be35a1SLionel Sambuc void
cmd_win_wchstr(int nargs,char ** args)6807*11be35a1SLionel Sambuc cmd_win_wchstr(int nargs, char **args)
6808*11be35a1SLionel Sambuc {
6809*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6810*11be35a1SLionel Sambuc return;
6811*11be35a1SLionel Sambuc
6812*11be35a1SLionel Sambuc report_count(1);
6813*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6814*11be35a1SLionel Sambuc }
6815*11be35a1SLionel Sambuc
6816*11be35a1SLionel Sambuc
6817*11be35a1SLionel Sambuc
6818*11be35a1SLionel Sambuc void
cmd_innwstr(int nargs,char ** args)6819*11be35a1SLionel Sambuc cmd_innwstr(int nargs, char **args)
6820*11be35a1SLionel Sambuc {
6821*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6822*11be35a1SLionel Sambuc return;
6823*11be35a1SLionel Sambuc
6824*11be35a1SLionel Sambuc report_count(1);
6825*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6826*11be35a1SLionel Sambuc }
6827*11be35a1SLionel Sambuc
6828*11be35a1SLionel Sambuc
6829*11be35a1SLionel Sambuc void
cmd_inwstr(int nargs,char ** args)6830*11be35a1SLionel Sambuc cmd_inwstr(int nargs, char **args)
6831*11be35a1SLionel Sambuc {
6832*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6833*11be35a1SLionel Sambuc return;
6834*11be35a1SLionel Sambuc
6835*11be35a1SLionel Sambuc report_count(1);
6836*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6837*11be35a1SLionel Sambuc }
6838*11be35a1SLionel Sambuc
6839*11be35a1SLionel Sambuc
6840*11be35a1SLionel Sambuc void
cmd_mvinnwstr(int nargs,char ** args)6841*11be35a1SLionel Sambuc cmd_mvinnwstr(int nargs, char **args)
6842*11be35a1SLionel Sambuc {
6843*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6844*11be35a1SLionel Sambuc return;
6845*11be35a1SLionel Sambuc
6846*11be35a1SLionel Sambuc report_count(1);
6847*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6848*11be35a1SLionel Sambuc }
6849*11be35a1SLionel Sambuc
6850*11be35a1SLionel Sambuc
6851*11be35a1SLionel Sambuc void
cmd_mvinwstr(int nargs,char ** args)6852*11be35a1SLionel Sambuc cmd_mvinwstr(int nargs, char **args)
6853*11be35a1SLionel Sambuc {
6854*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6855*11be35a1SLionel Sambuc return;
6856*11be35a1SLionel Sambuc
6857*11be35a1SLionel Sambuc report_count(1);
6858*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6859*11be35a1SLionel Sambuc }
6860*11be35a1SLionel Sambuc
6861*11be35a1SLionel Sambuc
6862*11be35a1SLionel Sambuc void
cmd_mvwinnwstr(int nargs,char ** args)6863*11be35a1SLionel Sambuc cmd_mvwinnwstr(int nargs, char **args)
6864*11be35a1SLionel Sambuc {
6865*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6866*11be35a1SLionel Sambuc return;
6867*11be35a1SLionel Sambuc
6868*11be35a1SLionel Sambuc report_count(1);
6869*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6870*11be35a1SLionel Sambuc }
6871*11be35a1SLionel Sambuc
6872*11be35a1SLionel Sambuc
6873*11be35a1SLionel Sambuc void
cmd_mvwinwstr(int nargs,char ** args)6874*11be35a1SLionel Sambuc cmd_mvwinwstr(int nargs, char **args)
6875*11be35a1SLionel Sambuc {
6876*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6877*11be35a1SLionel Sambuc return;
6878*11be35a1SLionel Sambuc
6879*11be35a1SLionel Sambuc report_count(1);
6880*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6881*11be35a1SLionel Sambuc }
6882*11be35a1SLionel Sambuc
6883*11be35a1SLionel Sambuc
6884*11be35a1SLionel Sambuc void
cmd_winnwstr(int nargs,char ** args)6885*11be35a1SLionel Sambuc cmd_winnwstr(int nargs, char **args)
6886*11be35a1SLionel Sambuc {
6887*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6888*11be35a1SLionel Sambuc return;
6889*11be35a1SLionel Sambuc
6890*11be35a1SLionel Sambuc report_count(1);
6891*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6892*11be35a1SLionel Sambuc }
6893*11be35a1SLionel Sambuc
6894*11be35a1SLionel Sambuc
6895*11be35a1SLionel Sambuc void
cmd_winwstr(int nargs,char ** args)6896*11be35a1SLionel Sambuc cmd_winwstr(int nargs, char **args)
6897*11be35a1SLionel Sambuc {
6898*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6899*11be35a1SLionel Sambuc return;
6900*11be35a1SLionel Sambuc
6901*11be35a1SLionel Sambuc report_count(1);
6902*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6903*11be35a1SLionel Sambuc }
6904*11be35a1SLionel Sambuc
6905*11be35a1SLionel Sambuc
6906*11be35a1SLionel Sambuc
6907*11be35a1SLionel Sambuc /* cchar handlgin */
6908*11be35a1SLionel Sambuc void
cmd_setcchar(int nargs,char ** args)6909*11be35a1SLionel Sambuc cmd_setcchar(int nargs, char **args)
6910*11be35a1SLionel Sambuc {
6911*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6912*11be35a1SLionel Sambuc return;
6913*11be35a1SLionel Sambuc
6914*11be35a1SLionel Sambuc report_count(1);
6915*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6916*11be35a1SLionel Sambuc }
6917*11be35a1SLionel Sambuc
6918*11be35a1SLionel Sambuc
6919*11be35a1SLionel Sambuc void
cmd_getcchar(int nargs,char ** args)6920*11be35a1SLionel Sambuc cmd_getcchar(int nargs, char **args)
6921*11be35a1SLionel Sambuc {
6922*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6923*11be35a1SLionel Sambuc return;
6924*11be35a1SLionel Sambuc
6925*11be35a1SLionel Sambuc report_count(1);
6926*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6927*11be35a1SLionel Sambuc }
6928*11be35a1SLionel Sambuc
6929*11be35a1SLionel Sambuc
6930*11be35a1SLionel Sambuc
6931*11be35a1SLionel Sambuc /* misc */
6932*11be35a1SLionel Sambuc void
cmd_key_name(int nargs,char ** args)6933*11be35a1SLionel Sambuc cmd_key_name(int nargs, char **args)
6934*11be35a1SLionel Sambuc {
6935*11be35a1SLionel Sambuc int w;
6936*11be35a1SLionel Sambuc
6937*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6938*11be35a1SLionel Sambuc return;
6939*11be35a1SLionel Sambuc
6940*11be35a1SLionel Sambuc if (sscanf(args[0], "%d", &w) == 0) {
6941*11be35a1SLionel Sambuc report_count(1);
6942*11be35a1SLionel Sambuc report_error("BAD ARGUMENT");
6943*11be35a1SLionel Sambuc return;
6944*11be35a1SLionel Sambuc }
6945*11be35a1SLionel Sambuc
6946*11be35a1SLionel Sambuc report_count(1);
6947*11be35a1SLionel Sambuc report_status(key_name(w));
6948*11be35a1SLionel Sambuc }
6949*11be35a1SLionel Sambuc
6950*11be35a1SLionel Sambuc
6951*11be35a1SLionel Sambuc void
cmd_border_set(int nargs,char ** args)6952*11be35a1SLionel Sambuc cmd_border_set(int nargs, char **args)
6953*11be35a1SLionel Sambuc {
6954*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6955*11be35a1SLionel Sambuc return;
6956*11be35a1SLionel Sambuc
6957*11be35a1SLionel Sambuc report_count(1);
6958*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6959*11be35a1SLionel Sambuc }
6960*11be35a1SLionel Sambuc
6961*11be35a1SLionel Sambuc
6962*11be35a1SLionel Sambuc void
cmd_wborder_set(int nargs,char ** args)6963*11be35a1SLionel Sambuc cmd_wborder_set(int nargs, char **args)
6964*11be35a1SLionel Sambuc {
6965*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6966*11be35a1SLionel Sambuc return;
6967*11be35a1SLionel Sambuc
6968*11be35a1SLionel Sambuc report_count(1);
6969*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6970*11be35a1SLionel Sambuc }
6971*11be35a1SLionel Sambuc
6972*11be35a1SLionel Sambuc
6973*11be35a1SLionel Sambuc void
cmd_box_set(int nargs,char ** args)6974*11be35a1SLionel Sambuc cmd_box_set(int nargs, char **args)
6975*11be35a1SLionel Sambuc {
6976*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
6977*11be35a1SLionel Sambuc return;
6978*11be35a1SLionel Sambuc
6979*11be35a1SLionel Sambuc report_count(1);
6980*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
6981*11be35a1SLionel Sambuc }
6982*11be35a1SLionel Sambuc
6983*11be35a1SLionel Sambuc
6984*11be35a1SLionel Sambuc void
cmd_erasewchar(int nargs,char ** args)6985*11be35a1SLionel Sambuc cmd_erasewchar(int nargs, char **args)
6986*11be35a1SLionel Sambuc {
6987*11be35a1SLionel Sambuc wchar_t ch;
6988*11be35a1SLionel Sambuc
6989*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
6990*11be35a1SLionel Sambuc return;
6991*11be35a1SLionel Sambuc
6992*11be35a1SLionel Sambuc /* XXX - call2 */
6993*11be35a1SLionel Sambuc report_count(2);
6994*11be35a1SLionel Sambuc report_return(erasewchar(&ch));
6995*11be35a1SLionel Sambuc report_int(ch);
6996*11be35a1SLionel Sambuc }
6997*11be35a1SLionel Sambuc
6998*11be35a1SLionel Sambuc
6999*11be35a1SLionel Sambuc void
cmd_killwchar(int nargs,char ** args)7000*11be35a1SLionel Sambuc cmd_killwchar(int nargs, char **args)
7001*11be35a1SLionel Sambuc {
7002*11be35a1SLionel Sambuc wchar_t ch;
7003*11be35a1SLionel Sambuc
7004*11be35a1SLionel Sambuc if (check_arg_count(nargs, 0) == 1)
7005*11be35a1SLionel Sambuc return;
7006*11be35a1SLionel Sambuc
7007*11be35a1SLionel Sambuc /* XXX - call2 */
7008*11be35a1SLionel Sambuc report_count(2);
7009*11be35a1SLionel Sambuc report_return(erasewchar(&ch));
7010*11be35a1SLionel Sambuc report_int(ch);
7011*11be35a1SLionel Sambuc }
7012*11be35a1SLionel Sambuc
7013*11be35a1SLionel Sambuc
7014*11be35a1SLionel Sambuc void
cmd_hline_set(int nargs,char ** args)7015*11be35a1SLionel Sambuc cmd_hline_set(int nargs, char **args)
7016*11be35a1SLionel Sambuc {
7017*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7018*11be35a1SLionel Sambuc return;
7019*11be35a1SLionel Sambuc
7020*11be35a1SLionel Sambuc report_count(1);
7021*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7022*11be35a1SLionel Sambuc }
7023*11be35a1SLionel Sambuc
7024*11be35a1SLionel Sambuc
7025*11be35a1SLionel Sambuc void
cmd_mvhline_set(int nargs,char ** args)7026*11be35a1SLionel Sambuc cmd_mvhline_set(int nargs, char **args)
7027*11be35a1SLionel Sambuc {
7028*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7029*11be35a1SLionel Sambuc return;
7030*11be35a1SLionel Sambuc
7031*11be35a1SLionel Sambuc report_count(1);
7032*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7033*11be35a1SLionel Sambuc }
7034*11be35a1SLionel Sambuc
7035*11be35a1SLionel Sambuc
7036*11be35a1SLionel Sambuc void
cmd_mvvline_set(int nargs,char ** args)7037*11be35a1SLionel Sambuc cmd_mvvline_set(int nargs, char **args)
7038*11be35a1SLionel Sambuc {
7039*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7040*11be35a1SLionel Sambuc return;
7041*11be35a1SLionel Sambuc
7042*11be35a1SLionel Sambuc report_count(1);
7043*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7044*11be35a1SLionel Sambuc }
7045*11be35a1SLionel Sambuc
7046*11be35a1SLionel Sambuc
7047*11be35a1SLionel Sambuc void
cmd_mvwhline_set(int nargs,char ** args)7048*11be35a1SLionel Sambuc cmd_mvwhline_set(int nargs, char **args)
7049*11be35a1SLionel Sambuc {
7050*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7051*11be35a1SLionel Sambuc return;
7052*11be35a1SLionel Sambuc
7053*11be35a1SLionel Sambuc report_count(1);
7054*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7055*11be35a1SLionel Sambuc }
7056*11be35a1SLionel Sambuc
7057*11be35a1SLionel Sambuc
7058*11be35a1SLionel Sambuc void
cmd_mvwvline_set(int nargs,char ** args)7059*11be35a1SLionel Sambuc cmd_mvwvline_set(int nargs, char **args)
7060*11be35a1SLionel Sambuc {
7061*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7062*11be35a1SLionel Sambuc return;
7063*11be35a1SLionel Sambuc
7064*11be35a1SLionel Sambuc report_count(1);
7065*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7066*11be35a1SLionel Sambuc }
7067*11be35a1SLionel Sambuc
7068*11be35a1SLionel Sambuc
7069*11be35a1SLionel Sambuc void
cmd_vline_set(int nargs,char ** args)7070*11be35a1SLionel Sambuc cmd_vline_set(int nargs, char **args)
7071*11be35a1SLionel Sambuc {
7072*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7073*11be35a1SLionel Sambuc return;
7074*11be35a1SLionel Sambuc
7075*11be35a1SLionel Sambuc report_count(1);
7076*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7077*11be35a1SLionel Sambuc }
7078*11be35a1SLionel Sambuc
7079*11be35a1SLionel Sambuc
7080*11be35a1SLionel Sambuc void
cmd_whline_set(int nargs,char ** args)7081*11be35a1SLionel Sambuc cmd_whline_set(int nargs, char **args)
7082*11be35a1SLionel Sambuc {
7083*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7084*11be35a1SLionel Sambuc return;
7085*11be35a1SLionel Sambuc
7086*11be35a1SLionel Sambuc report_count(1);
7087*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7088*11be35a1SLionel Sambuc }
7089*11be35a1SLionel Sambuc
7090*11be35a1SLionel Sambuc
7091*11be35a1SLionel Sambuc void
cmd_wvline_set(int nargs,char ** args)7092*11be35a1SLionel Sambuc cmd_wvline_set(int nargs, char **args)
7093*11be35a1SLionel Sambuc {
7094*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7095*11be35a1SLionel Sambuc return;
7096*11be35a1SLionel Sambuc
7097*11be35a1SLionel Sambuc report_count(1);
7098*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7099*11be35a1SLionel Sambuc }
7100*11be35a1SLionel Sambuc
7101*11be35a1SLionel Sambuc
7102*11be35a1SLionel Sambuc void
cmd_bkgrnd(int nargs,char ** args)7103*11be35a1SLionel Sambuc cmd_bkgrnd(int nargs, char **args)
7104*11be35a1SLionel Sambuc {
7105*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7106*11be35a1SLionel Sambuc return;
7107*11be35a1SLionel Sambuc
7108*11be35a1SLionel Sambuc report_count(1);
7109*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7110*11be35a1SLionel Sambuc }
7111*11be35a1SLionel Sambuc
7112*11be35a1SLionel Sambuc
7113*11be35a1SLionel Sambuc void
cmd_bkgrndset(int nargs,char ** args)7114*11be35a1SLionel Sambuc cmd_bkgrndset(int nargs, char **args)
7115*11be35a1SLionel Sambuc {
7116*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7117*11be35a1SLionel Sambuc return;
7118*11be35a1SLionel Sambuc
7119*11be35a1SLionel Sambuc report_count(1);
7120*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7121*11be35a1SLionel Sambuc }
7122*11be35a1SLionel Sambuc
7123*11be35a1SLionel Sambuc
7124*11be35a1SLionel Sambuc void
cmd_getbkgrnd(int nargs,char ** args)7125*11be35a1SLionel Sambuc cmd_getbkgrnd(int nargs, char **args)
7126*11be35a1SLionel Sambuc {
7127*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7128*11be35a1SLionel Sambuc return;
7129*11be35a1SLionel Sambuc
7130*11be35a1SLionel Sambuc report_count(1);
7131*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7132*11be35a1SLionel Sambuc }
7133*11be35a1SLionel Sambuc
7134*11be35a1SLionel Sambuc
7135*11be35a1SLionel Sambuc void
cmd_wbkgrnd(int nargs,char ** args)7136*11be35a1SLionel Sambuc cmd_wbkgrnd(int nargs, char **args)
7137*11be35a1SLionel Sambuc {
7138*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7139*11be35a1SLionel Sambuc return;
7140*11be35a1SLionel Sambuc
7141*11be35a1SLionel Sambuc report_count(1);
7142*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7143*11be35a1SLionel Sambuc }
7144*11be35a1SLionel Sambuc
7145*11be35a1SLionel Sambuc
7146*11be35a1SLionel Sambuc void
cmd_wbkgrndset(int nargs,char ** args)7147*11be35a1SLionel Sambuc cmd_wbkgrndset(int nargs, char **args)
7148*11be35a1SLionel Sambuc {
7149*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7150*11be35a1SLionel Sambuc return;
7151*11be35a1SLionel Sambuc
7152*11be35a1SLionel Sambuc report_count(1);
7153*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7154*11be35a1SLionel Sambuc }
7155*11be35a1SLionel Sambuc
7156*11be35a1SLionel Sambuc
7157*11be35a1SLionel Sambuc void
cmd_wgetbkgrnd(int nargs,char ** args)7158*11be35a1SLionel Sambuc cmd_wgetbkgrnd(int nargs, char **args)
7159*11be35a1SLionel Sambuc {
7160*11be35a1SLionel Sambuc if (check_arg_count(nargs, 1) == 1)
7161*11be35a1SLionel Sambuc return;
7162*11be35a1SLionel Sambuc
7163*11be35a1SLionel Sambuc report_count(1);
7164*11be35a1SLionel Sambuc report_error("UNSUPPORTED");
7165*11be35a1SLionel Sambuc }
7166