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