source: buchla-68k/ram/etaopt.c@ f40a309

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

Unix line breaks.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 =============================================================================
3 etaopt.c -- assignment editor - MIDI output port number field handlers
4 Version 4 -- 1987-12-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "stddefs.h"
9#include "fields.h"
10#include "vsdd.h"
11#include "vsddsw.h"
12#include "graphdef.h"
13
14#include "midas.h"
15#include "asgdsp.h"
16
17extern unsigned *asgob;
18
19extern short stcrow, stccol;
20extern short curmop;
21
22extern short adbox[][8];
23
24extern char dspbuf[];
25
26extern char *gprep[];
27
28/*
29
30*/
31
32/*
33 =============================================================================
34 et_aopt() -- load the edit buffer
35 =============================================================================
36*/
37
38short
39et_aopt(n)
40short n;
41{
42 sprintf(ebuf, "%01.1d", curmop);
43 ebflag = TRUE;
44
45 return(SUCCESS);
46}
47
48/*
49 =============================================================================
50 ef_aopt() -- parse (unload) the edit buffer
51 =============================================================================
52*/
53
54short
55ef_aopt(n)
56short n;
57{
58 register short tmpval;
59
60 ebuf[1] = '\0'; /* terminate the string in ebuf */
61 ebflag = FALSE;
62
63 tmpval = ebuf[0] - '0';
64
65 if (tmpval GT 3)
66 return(FAILURE);
67
68 curmop = tmpval;
69 modasg();
70 return(SUCCESS);
71}
72
73/*
74
75*/
76
77/*
78 =============================================================================
79 rd_aopt() -- (re)display the field
80 =============================================================================
81*/
82
83short
84rd_aopt(nn)
85short nn;
86{
87 register short n;
88
89 n = nn & 0xFF;
90
91 vbank(0);
92 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
93 adbox[n][6], adbox[n][7] + 9, gprep[curmop], 14);
94
95 return(SUCCESS);
96}
97
98/*
99 =============================================================================
100 nd_aopt() -- handle new data entry
101 =============================================================================
102*/
103
104short
105nd_aopt(nn, k)
106short nn;
107register short k;
108{
109 register short n;
110
111 if ((k < 1) OR (k > 2))
112 return(FAILURE);
113
114 n = nn & 0xFF;
115 ebuf[0] = k + '0';
116 ebuf[1] = '\0';
117
118 dspbuf[0] = k + '0';
119 dspbuf[1] = '\0';
120
121 vbank(0);
122 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
123
124 return(SUCCESS);
125}
126
Note: See TracBrowser for help on using the repository browser.