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

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

Point of no return.

  • 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 et_aopt(short n)
39{
40 sprintf(ebuf, "%01.1d", curmop);
41 ebflag = TRUE;
42
43 return(SUCCESS);
44}
45
46/*
47 =============================================================================
48 ef_aopt() -- parse (unload) the edit buffer
49 =============================================================================
50*/
51
52short ef_aopt(short n)
53{
54 register short tmpval;
55
56 ebuf[1] = '\0'; /* terminate the string in ebuf */
57 ebflag = FALSE;
58
59 tmpval = ebuf[0] - '0';
60
61 if (tmpval GT 3)
62 return(FAILURE);
63
64 curmop = tmpval;
65 modasg();
66 return(SUCCESS);
67}
68
69/*
70
71*/
72
73/*
74 =============================================================================
75 rd_aopt() -- (re)display the field
76 =============================================================================
77*/
78
79short rd_aopt(short nn)
80{
81 register short n;
82
83 n = nn & 0xFF;
84
85 vbank(0);
86 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
87 adbox[n][6], adbox[n][7] + 9, gprep[curmop], 14);
88
89 return(SUCCESS);
90}
91
92/*
93 =============================================================================
94 nd_aopt() -- handle new data entry
95 =============================================================================
96*/
97
98short nd_aopt(short nn, short k)
99{
100 register short n;
101
102 if ((k < 1) OR (k > 2))
103 return(FAILURE);
104
105 n = nn & 0xFF;
106 ebuf[0] = k + '0';
107 ebuf[1] = '\0';
108
109 dspbuf[0] = k + '0';
110 dspbuf[1] = '\0';
111
112 vbank(0);
113 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
114
115 return(SUCCESS);
116}
117
Note: See TracBrowser for help on using the repository browser.