source: buchla-68k/orig/RAM/LDSELBX.C@ 66b48e7

Last change on this file since 66b48e7 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 19.2 KB
Line 
1/*
2 =============================================================================
3 ldselbx.c -- librarian box selection functions
4 Version 46 -- 1988-11-18 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#define DEBUGIT 0
9
10#include "stdio.h"
11#include "stddefs.h"
12#include "fields.h"
13#include "graphdef.h"
14#include "glcfns.h"
15#include "glcdefs.h"
16#include "graphdef.h"
17#include "hwdefs.h"
18#include "lcdline.h"
19#include "panel.h"
20#include "vsdd.h"
21#include "vsddvars.h"
22
23#include "midas.h"
24#include "instdsp.h"
25#include "libdsp.h"
26#include "score.h"
27#include "scdsp.h"
28#include "scfns.h"
29
30extern short ldswin(), advlcur(), bsplcur(), ttcpos(), fcindex(), storit();
31extern short showsiz(), get_asg(), get_orc(), get_tun(), get_wav(), nokey();
32extern short ldline(), lin2slt(), dslslot(), vtdisp(), ldpoint(), rd_ec();
33extern short fcreset(), ftkind(), ldwmsg(), ldbusy(), ckstor();
34extern short get_pat(), get_scr();
35
36extern unsigned exp_c();
37
38extern char *slotnam();
39
40/*
41
42*/
43
44#if DEBUGIT
45extern short debugsw;
46#endif
47
48extern short (*point)();
49
50extern short asmode;
51extern short catin;
52extern short cxrate;
53extern short cxval;
54extern short cyrate;
55extern short cyval;
56extern short errno;
57extern short gomode;
58extern short hitcx;
59extern short hitcy;
60extern short ismode;
61extern short lasgsw;
62extern short ldelsw;
63extern short lderrsw;
64extern short ldkind;
65extern short ldrow;
66extern short ldslot;
67extern short lksel;
68extern short lmwtype;
69extern short lorchl;
70extern short lorchsw;
71extern short lorclsw;
72extern short ldpass;
73extern short lpatsw;
74extern short lrasw;
75extern short lscrsw;
76extern short lselsw;
77extern short lseqsw;
78extern short lstrsw;
79extern short ltagged;
80extern short ltunsw;
81extern short lwavsw;
82extern short ndisp;
83extern short oldpk;
84extern short oldsl;
85extern short pkctrl;
86extern short sliders;
87extern short stcrow;
88extern short stccol;
89extern short tagslot;
90
91extern unsigned *librob;
92
93extern short ldmap[];
94extern short scsizes[][2];
95
96extern short ldbox[][8];
97
98extern struct scndx sindex[];
99
100extern struct selbox *csbp;
101extern struct selbox *curboxp;
102
103extern PFS (*swpt)[];
104extern PFS (*oldsw)[];
105extern PFS t_libr[];
106
107extern char bfs[];
108extern char ldfile[];
109extern char ldcmnt[];
110
111extern char loadedf[][8];
112extern char loadedc[][37];
113
114/* forward references */
115
116short bx_null(), ldfnbox();
117
118/*
119
120*/
121
122short ft2lt[] = { /* file type to load type map */
123
124 LT_ASG,
125 LT_ORL,
126 LT_ORH,
127 LT_SCR,
128 LT_TUN,
129 LT_WAV,
130 LT_ORL,
131 LT_PAT,
132 LT_SEQ
133};
134
135struct selbox ldboxes[] = {
136
137 { 1, 1, 510, 13, 0, ldfnbox}, /* 0 - index area label */
138 { 1, 14, 510, 293, 1, ldfnbox}, /* 1 - index area */
139 { 1, 294, 78, 307, 2, ldfnbox}, /* 2 - file name label */
140 { 80, 294, 143, 307, 3, ldfnbox}, /* 3 - file name */
141 {145, 294, 214, 307, 4, ldfnbox}, /* 4 - comment label */
142 {216, 294, 510, 307, 5, ldfnbox}, /* 5 - comment */
143 { 1, 308, 70, 321, 6, ldfnbox}, /* 6 - fetch */
144 { 1, 322, 70, 335, 7, ldfnbox}, /* 7 - replace / append */
145 { 1, 336, 70, 349, 8, ldfnbox}, /* 8 - lo orch / hi orch */
146 { 72, 308, 255, 349, 9, ldfnbox}, /* 9 - store */
147 {257, 308, 510, 349, 10, ldfnbox}, /* 10 - message window */
148
149 { 0, 0, 0, 0, 0, FN_NULL} /* end of table */
150};
151
152/*
153
154*/
155
156/*
157 =============================================================================
158 skperr() -- complain about an error while skipping a score
159 =============================================================================
160*/
161
162skperr(sn)
163short sn;
164{
165 char scid[32];
166 char erms[64];
167
168 clrlsel();
169
170 sprintf(scid, " score %d", sn + 1);
171 sprintf(erms, " errno = %d", errno);
172
173 ldermsg("Couldn't skip", scid, erms,
174 LD_EMCF, LD_EMCB);
175}
176
177/*
178
179*/
180
181/*
182 =============================================================================
183 skp_ec() -- skip with error checking
184 =============================================================================
185*/
186
187short
188skp_ec(fp, len)
189register FILE *fp;
190register long len;
191{
192 register long count;
193 register int c;
194 char errbuf[64];
195
196 for (count = 0; count < len; count++) {
197
198 errno = 0;
199
200 if (EOF EQ (c = getc(fp))) {
201
202 sprintf(errbuf, "errno = %d", errno);
203
204 ldermsg("Unexpected EOF",
205 errbuf, (char *)NULL, LD_EMCF, LD_EMCB);
206
207#if DEBUGIT
208 if (debugsw)
209 FILEpr(fp);
210#endif
211
212 fclose(fp);
213 postio(); /* restore LCD backlight */
214 return(FAILURE);
215 }
216 }
217
218 return(SUCCESS);
219}
220
221/*
222
223*/
224
225/*
226 =============================================================================
227 scskip() -- skip a score starting with its section list
228 =============================================================================
229*/
230
231short
232scskip(fp, ns)
233register FILE *fp;
234short ns;
235{
236 register short ehdr, go;
237 char etype;
238 char erms[64];
239
240 go = TRUE;
241
242 if (skp_ec(fp, (long)(N_SECTS * 12))) { /* skip section times */
243
244 skperr(ns);
245 return(FAILURE);
246 }
247
248 if (rd_ec(fp, &etype, 1L)) { /* read first score header event */
249
250 skperr(ns);
251 return(FAILURE);
252 }
253
254 if (etype NE EV_SCORE) { /* complain if it's not a score event */
255
256 sprintf(erms, " score %d etype = %d", ns + 1, etype);
257
258 ldermsg("Bad score --", " 1st event is wrong",
259 erms, LD_EMCF, LD_EMCB);
260
261 return(FAILURE);
262 }
263
264 if (skp_ec(fp, (long)(scsizes[etype][1] - 1))) { /* skip data */
265
266 skperr(ns);
267 return(FAILURE);
268 }
269
270/*
271
272*/
273 do { /* skip remaining score events */
274
275 if (rd_ec(fp, &etype, 1L)) { /* get event type */
276
277 skperr(ns);
278 return(FAILURE);
279 }
280
281 /* skip the event's data */
282
283 if (skp_ec(fp, (long)(scsizes[etype][1] - 1))) {
284
285 skperr(ns);
286 return(FAILURE);
287 }
288
289 if (etype EQ EV_FINI) /* check for score end */
290 go = FALSE;
291
292 } while (go);
293
294 return(SUCCESS);
295}
296
297/*
298
299*/
300
301/*
302 =============================================================================
303 ldermsg() -- display an error message if none is up already
304 =============================================================================
305*/
306
307ldermsg(p1, p2, p3, p4, p5)
308char *p1, *p2, *p3;
309unsigned p4, p5;
310{
311 char msgbuf[64];
312
313 if (NOT lderrsw) { /* put up new messages only */
314
315 strcpy(msgbuf, "ERROR: ");
316 strcat(msgbuf, p1);
317
318 ldwmsg(p1, p2, p3, p4, p5);
319 }
320
321 lderrsw = TRUE; /* set error state */
322}
323
324/*
325 =============================================================================
326 clrerms() -- clear an error message from the message window
327 =============================================================================
328*/
329
330clrerms()
331{
332 if (lderrsw) {
333
334 lderrsw = FALSE;
335 lmwclr();
336 ldswin(10);
337 }
338}
339
340/*
341
342*/
343
344/*
345 =============================================================================
346 clrlsel() -- clear library selection
347 =============================================================================
348*/
349
350clrlsel()
351{
352 if (lselsw) {
353
354 if (lrasw) {
355
356 lksel = -1;
357 ldpass = 0;
358 pkctrl = oldpk;
359 sliders = oldsl;
360 swpt = oldsw;
361 lcdlbls();
362 setleds();
363 fcindex();
364
365 } else {
366
367 dslslot(ldslot, exp_c(ldbox[1][4]), ldrow);
368 }
369 }
370
371 fcreset();
372}
373
374/*
375 =============================================================================
376 endltyp() -- end function for virtual typewriter
377 =============================================================================
378*/
379
380endltyp()
381{
382 lmwclr();
383 ldswin(10);
384}
385
386/*
387
388*/
389
390/*
391 =============================================================================
392 savefc() -- save name and comment from loaded or stored file
393 =============================================================================
394*/
395
396savefc(kind)
397short kind;
398{
399 short fi;
400
401 fi = ft2lt[kind - 1];
402
403 if (kind EQ FT_ORC)
404 fi = lorchl ? LT_ORH : LT_ORL;
405
406 memcpy(loadedf[fi], ldfile, 8);
407 memcpy(loadedc[fi], ldcmnt, 37);
408}
409
410/*
411
412*/
413
414/*
415 =============================================================================
416 lcancel() -- cancel librarian selections
417 =============================================================================
418*/
419
420short
421lcancel(lct)
422short lct;
423{
424 short rc;
425
426 rc = FALSE;
427
428 if ((lct NE 0) AND lselsw) {
429
430 rc = TRUE;
431 clrlsel();
432 }
433
434 if ((lct NE 1) AND (lstrsw OR (NOT ckstor()))) {
435
436 rc = TRUE;
437 streset();
438 }
439
440 if ((lct NE 2) AND ldelsw) {
441
442 rc = TRUE;
443 ldelsw = FALSE;
444 dslslot(ldslot, exp_c(ldbox[1][4]), ldrow);
445 }
446
447 return(rc);
448}
449
450/*
451
452*/
453
454/*
455 =============================================================================
456 dpy_scr() -- display score contents entry
457 =============================================================================
458*/
459
460dpy_scr(color, ns)
461unsigned color;
462short ns;
463{
464 char buf[40];
465 long scl;
466
467 if (ndisp NE 0)
468 return;
469
470 if (v_regs[5] & 0x0180)
471 vbank(0);
472
473 if (ldmap[ns] EQ -1)
474 strcpy(buf, " ");
475 else
476 sprintf(buf, "%02d", 1 + ldmap[ns]);
477
478 vcputsv(librob, 64, ldbox[1][4], ldbox[1][5], 1 + ns, 1, buf, 14);
479
480 if (-1L EQ (scl = sindex[ns].sclen))
481 strcpy(buf, "{ empty score } 0");
482 else
483 sprintf(buf, "%-16.16s %5ld", sindex[ns].scfnm, scl);
484
485 vcputsv(librob, 64, color, ldbox[1][5], 1 + ns, 4, buf, 14);
486}
487
488/*
489
490*/
491
492/*
493 =============================================================================
494 lst_scr() -- list the score contents directory
495 =============================================================================
496*/
497
498lst_scr()
499{
500 register short i;
501 unsigned cx;
502
503 if (ndisp NE 0)
504 return;
505
506 point = ldpoint;
507
508 cx = exp_c(ldbox[0][5]);
509
510 if (v_regs[5] & 0x0180)
511 vbank(0);
512
513 vbfill4(librob, 128, ldbox[0][0], ldbox[0][1],
514 ldbox[0][2], ldbox[0][3], cx);
515
516 tsplot4(librob, 64, ldbox[0][4], ldbox[0][6], ldbox[0][7],
517 "No Score Name Length", 14);
518
519 lseg( 8, 13, 23, 13, LUNDRLN);
520 lseg( 32, 13, 159, 13, LUNDRLN);
521 lseg(168, 13, 215, 13, LUNDRLN);
522
523 cx = exp_c(ldbox[1][5]);
524
525 vbfill4(librob, 128, ldbox[1][0], ldbox[1][1],
526 ldbox[1][2], ldbox[1][3], cx);
527
528 for (i = 0; i < N_SCORES; i++)
529 dpy_scr(ldbox[1][4], i);
530}
531
532/*
533
534*/
535
536/*
537 =============================================================================
538 ndx_scr() -- display the table of contents for a score
539 =============================================================================
540*/
541
542short
543ndx_scr(slot)
544register short slot;
545{
546 register FILE *fp;
547 register short i;
548 register long rlen;
549 long rdlen;
550 char msgbuf1[64];
551 char msgbuf2[64];
552
553 ldpass = 0;
554
555 for (i = 0; i < N_SCORES; i++) {
556
557 sindex[i].sclen = -1L;
558 memset(sindex[i].scfnm, ' ', 16);
559 }
560
561 errno = 0;
562
563 if ((FILE *)NULL EQ (fp = fopenb(slotnam(slot, FT_SCR), "r"))) {
564
565 sprintf(msgbuf2, " errno = %d", errno);
566
567 ldermsg("Couldn't open the file",
568 " for the scores", msgbuf2,
569 LD_EMCF, LD_EMCB);
570
571 clrlsel();
572 return(FAILURE);
573 }
574
575 errno = 0;
576
577 if (fseek(fp, 60L, 1)) { /* seek past header */
578
579 sprintf(msgbuf2, " errno = %d", errno);
580
581 ldermsg("Seek failure",
582 (char *)NULL, msgbuf2,
583 LD_EMCF, LD_EMCB);
584
585
586#if DEBUGIT
587 if (debugsw)
588 FILEpr(fp);
589#endif
590
591 fclose(fp);
592 postio(); /* restore LCD backlight */
593 clrlsel();
594 return(FAILURE);
595 }
596
597/*
598
599*/
600#if DEBUGIT
601 if (debugsw)
602 FILEpr(fp);
603#endif
604
605 for (i = 0; i < N_SCORES; i++) {
606
607 if (rd_ec(fp, &rdlen, 4L)) {
608
609 sprintf(msgbuf1, " of score %d", i + 1);
610 sprintf(msgbuf2, " errno = %d", errno);
611
612 ldermsg("Unable to read the length",
613 msgbuf1, msgbuf2,
614 LD_EMCF, LD_EMCB);
615
616
617#if DEBUGIT
618 if (debugsw)
619 FILEpr(fp);
620#endif
621
622 clrlsel();
623 return(FAILURE);
624 }
625
626 sindex[i].sclen = rdlen;
627
628 if (-1L NE rdlen) {
629
630 if (rd_ec(fp, sindex[i].scfnm, 16L)) {
631
632 sprintf(msgbuf1, " of score %d", i + 1);
633 sprintf(msgbuf2, " errno = %d", errno);
634
635 ldermsg("Unable to read the name",
636 msgbuf1, msgbuf2,
637 LD_EMCF, LD_EMCB);
638
639
640#if DEBUGIT
641 if (debugsw)
642 FILEpr(fp);
643#endif
644
645 clrlsel();
646 return(FAILURE);
647 }
648
649 errno = 0;
650
651 if (scskip(fp, i)) {
652
653 sprintf(msgbuf1, " score %d", i + 1);
654 sprintf(msgbuf2, " errno=%d rlen=%ld",
655 errno, rlen);
656
657 ldermsg("Unable to skip past",
658 msgbuf1, msgbuf2,
659 LD_EMCF, LD_EMCB);
660
661
662#if DEBUGIT
663 if (debugsw)
664 FILEpr(fp);
665#endif
666
667 fclose(fp);
668 postio(); /* restore LCD backlight */
669 clrlsel();
670 return(FAILURE);
671 }
672 }
673 }
674
675 fclose(fp);
676 postio(); /* restore LCD backlight */
677 ldpass = 1;
678 lst_scr();
679
680/*
681
682*/
683 point = GLCplot;
684 GLCcurs(G_ON);
685
686 if (ismode NE IS_NULL) { /* cancel inst. mode */
687
688 ismode = IS_NULL;
689 pkctrl = oldpk;
690 sliders = oldsl;
691 swpt = oldsw;
692 lcdlbls();
693 }
694
695 if (gomode NE GO_NULL) { /* cancel goto mode */
696
697 gomode = GO_NULL;
698 pkctrl = oldpk;
699 lseg(GOTO_XL, GOTO_Y, GOTO_XR, GOTO_Y, 0);
700 }
701
702 if (asmode) { /* cancel assign mode */
703
704 asmode = 0;
705 pkctrl = oldpk;
706 swpt = oldsw;
707 lseg(ASGN_XL, ASGN_Y, ASGN_XR, ASGN_Y, 0);
708 }
709
710 if ((pkctrl EQ PK_PFRM) OR (pkctrl EQ PK_NOTE))
711 oldpk = pkctrl;
712
713 if (sliders NE LS_LIBR)
714 oldsl = sliders;
715
716 oldsw = swpt;
717 swpt = t_libr;
718 pkctrl = PK_LIBR;
719 sliders = LS_LIBR;
720
721 lcdlbls();
722 setleds();
723
724 return(SUCCESS);
725}
726
727/*
728
729*/
730
731/*
732 =============================================================================
733 getit() -- read selected file
734 =============================================================================
735*/
736
737short
738getit()
739{
740 ldkind = ftkind(ldslot);
741
742 if (ldkind EQ -1) {
743
744 ldermsg("Unknown file type",
745 (char *)NULL, (char *)NULL,
746 LD_EMCF, LD_EMCB);
747
748 clrlsel();
749 return(FAILURE);
750 }
751
752 ldbusy(" Reading file");
753/*
754
755*/
756 switch (ldkind) {
757
758 case FT_ASG:
759
760 if (get_asg())
761 return(FAILURE);
762
763 break;
764
765 case FT_ORH:
766 case FT_ORL:
767 case FT_ORC:
768
769 if (get_orc(lorchl, ldkind))
770 return(FAILURE);
771
772 break;
773
774 case FT_PAT:
775
776 if (get_pat())
777 return(FAILURE);
778
779 break;
780
781 case FT_SCR:
782
783 if (get_scr())
784 return(FAILURE);
785
786 break;
787
788 case FT_SEQ:
789
790 if (get_seq())
791 return(FAILURE);
792
793 break;
794
795 case FT_TUN:
796
797 if (get_tun())
798 return(FAILURE);
799
800 break;
801
802 case FT_WAV:
803
804 if (get_wav())
805 return(FAILURE);
806
807 break;
808
809 default:
810
811 ldermsg("ldkind bad",
812 (char *)NULL, (char *)NULL,
813 LD_EMCF, LD_EMCB);
814
815 clrlsel();
816 return(FAILURE);
817 }
818/*
819
820*/
821
822 memcpy(ldfile, filecat[ldslot].fcname, 8);
823 memcpy(ldcmnt, filecat[ldslot].fccmnt, 37);
824 savefc(ldkind);
825
826 clrlsel();
827
828 if (lrasw) {
829
830 ldswin(0);
831 ldswin(8);
832 }
833
834 ldswin(3);
835 ldswin(5);
836 showsiz();
837 return(SUCCESS);
838}
839
840/*
841
842*/
843
844/*
845 =============================================================================
846 ldfnbox() -- librarian display box hit processor
847 =============================================================================
848*/
849
850short
851ldfnbox(n)
852short n;
853{
854 register short col, i, slot, sn;
855
856 col = hitcx >> 3;
857
858 if (lderrsw)
859 clrerms();
860
861 switch (n) {
862
863 case 1: /* index area */
864
865 if (lcancel(0))
866 return(SUCCESS);
867
868 if (lselsw) { /* something already selected ? */
869
870 if (lrasw) { /* content mode ? */
871
872 if (ldkind EQ FT_SCR) { /* score */
873
874 sn = ldline(hitcy) - 1;
875
876 if (sindex[sn].sclen NE -1L) {
877
878 if ((1 + sn) NE ldrow) {
879
880 dpy_scr(ldbox[1][4], ldrow - 1);
881 ldrow = 1 + sn;
882 }
883
884 dpy_scr(LD_SELC, sn);
885 lksel = sn;
886
887 } else {
888
889 lksel = -1;
890 }
891
892 return(SUCCESS);
893 }
894 }
895
896 if (ldrow NE ldline(hitcy)) {
897
898 clrlsel();
899 return(SUCCESS);
900 }
901
902 return(getit());
903/*
904
905*/
906 } else { /* nothing selected yet */
907
908 if (0 NE (ldrow = ldline(hitcy))) {
909
910 if (col EQ 11) {
911
912 if (catin AND ltagged) {
913
914 slot = lin2slt(ldrow);
915
916 if (slot EQ tagslot) {
917
918 putcat();
919 ltagged = FALSE;
920 showcat();
921 }
922 }
923
924 } else {
925
926 if (-1 NE (ldslot = lin2slt(ldrow))) {
927
928 lselsw = TRUE;
929 ldswin(8);
930 ldkind = ftkind(ldslot);
931
932 for (i = 0; i < N_SCORES; i++)
933 ldmap[i] = i;
934
935 if (lrasw AND (ldkind EQ FT_SCR))
936 return(ndx_scr(ldslot));
937
938 dslslot(ldslot, exp_c(LD_SELC), ldrow);
939 return(SUCCESS);
940 }
941 }
942 }
943
944 clrlsel();
945 return(FAILURE);
946 }
947/*
948
949*/
950 case 3: /* file name field */
951
952 if (lcancel(3))
953 return(SUCCESS);
954
955 if (lmwtype NE 1) {
956
957 lmwvtyp(); /* setup for the typewriter */
958 ldswin(10); /* display the typewriter */
959
960 vtsetup(librob, vtdisp, 10, ldfile, 22, 33,
961 advlcur, bsplcur, nokey, nokey, endltyp,
962 ldbox[n][4], ldbox[n][5]);
963
964 } else {
965
966 vtyper();
967 }
968
969 return(SUCCESS);
970
971 case 5: /* comment field */
972
973 if (lcancel(3))
974 return(SUCCESS);
975
976 if (lmwtype NE 1) {
977
978 lmwvtyp(); /* setup for the typewriter */
979 ldswin(10); /* display the typewriter */
980
981 vtsetup(librob, vtdisp, 27, ldcmnt, 22, 33,
982 advlcur, bsplcur, nokey, nokey, endltyp,
983 ldbox[n][4], ldbox[n][5]);
984
985 } else {
986
987 vtyper();
988 }
989
990 return(SUCCESS);
991
992/*
993
994*/
995
996 case 6: /* "Index" */
997
998 if (lcancel(0))
999 return(SUCCESS);
1000
1001 clrlsel();
1002 return(fcindex());
1003
1004 case 7: /* "Content" */
1005
1006 if (lselsw AND lrasw)
1007 return(getit());
1008
1009 lrasw = NOT lrasw;
1010 ldswin(7);
1011 return(SUCCESS);
1012
1013 case 8: /* "Hi Orch" / "Lo Orch" */
1014
1015 lorchl = NOT lorchl;
1016 ldswin(8);
1017 return(SUCCESS);
1018
1019/*
1020
1021*/
1022 case 9: /* "Store" */
1023
1024 if (lcancel(1))
1025 return(SUCCESS);
1026
1027 if (cyval < 321) {
1028
1029 /* row 22: "Store", "Score", or "Hi Orch" */
1030
1031 if (cxval < 120) {
1032
1033 /* "Store" */
1034
1035 if (lstrsw) {
1036
1037 storit();
1038
1039 } else {
1040
1041 lstrsw = TRUE;
1042 ldswin(9);
1043 }
1044
1045 return(SUCCESS);
1046
1047 } else if ((cxval > 135) AND (cxval < 176)) {
1048
1049 /* "Score" */
1050
1051 lscrsw = NOT lscrsw;
1052 ldswin(9);
1053
1054 if (lstrsw)
1055 storit();
1056
1057 return(SUCCESS);
1058
1059 } else if (cxval > 191) {
1060
1061 /* "Hi Orch" */
1062
1063 lorchsw = NOT lorchsw;
1064 ldswin(9);
1065
1066 if (lstrsw)
1067 storit();
1068
1069 return(SUCCESS);
1070 }
1071/*
1072
1073*/
1074 } else if ((cyval > 321) AND (cyval < 335)) {
1075
1076 /* row 23: "Waves", "Patch", or "Lo Orch" */
1077
1078 if (cxval < 120) { /* "Waves" */
1079
1080 lwavsw = NOT lwavsw;
1081 ldswin(9);
1082
1083 if (lstrsw)
1084 storit();
1085
1086 return(SUCCESS);
1087
1088 } else if ((cxval > 135) AND (cxval < 176)) {
1089
1090 /* "Patch" */
1091
1092 lpatsw = NOT lpatsw;
1093 ldswin(9);
1094
1095 if (lstrsw)
1096 storit();
1097
1098 return(SUCCESS);
1099
1100 } else if (cxval > 191) { /* "Lo Orch" */
1101
1102 lorclsw = NOT lorclsw;
1103 ldswin(9);
1104
1105 if (lstrsw)
1106 storit();
1107
1108 return(SUCCESS);
1109 }
1110/*
1111
1112*/
1113 } else if (cyval > 335) {
1114
1115 /* row 24: "Assgn", "Seqnc", or "Tunings" */
1116
1117 if (cxval < 120) { /* "Assgn" */
1118
1119 lasgsw = NOT lasgsw;
1120 ldswin(9);
1121
1122 if (lstrsw)
1123 storit();
1124
1125 return(SUCCESS);
1126
1127 } else if ((cxval > 135) AND (cxval < 176)) {
1128
1129 /* "Seqnc" */
1130
1131 lseqsw = NOT lseqsw;
1132 ldswin(9);
1133
1134 if (lstrsw)
1135 storit();
1136
1137 return(SUCCESS);
1138
1139 } else if (cxval > 191) { /* "Tunings" */
1140
1141 ltunsw = NOT ltunsw;
1142 ldswin(9);
1143
1144 if (lstrsw)
1145 storit();
1146
1147 return(SUCCESS);
1148 }
1149 }
1150
1151 return(FAILURE);
1152
1153 default:
1154
1155 lcancel(3);
1156 return(FAILURE);
1157 }
1158}
Note: See TracBrowser for help on using the repository browser.