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

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

Zero redundant declarations.

  • Property mode set to 100644
File size: 1.9 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 "ram.h"
9
10/*
11 =============================================================================
12 et_aopt() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_aopt(int16_t n)
17{
18 sprintf(ebuf, "%01.1d", curmop);
19 ebflag = TRUE;
20
21 return(SUCCESS);
22}
23
24/*
25 =============================================================================
26 ef_aopt() -- parse (unload) the edit buffer
27 =============================================================================
28*/
29
30int16_t ef_aopt(int16_t n)
31{
32 register int16_t tmpval;
33
34 ebuf[1] = '\0'; /* terminate the string in ebuf */
35 ebflag = FALSE;
36
37 tmpval = ebuf[0] - '0';
38
39 if (tmpval GT 3)
40 return(FAILURE);
41
42 curmop = tmpval;
43 modasg();
44 return(SUCCESS);
45}
46
47/*
48
49*/
50
51/*
52 =============================================================================
53 rd_aopt() -- (re)display the field
54 =============================================================================
55*/
56
57int16_t rd_aopt(int16_t nn)
58{
59 register int16_t n;
60
61 n = nn & 0xFF;
62
63 vbank(0);
64 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
65 adbox[n][6], adbox[n][7] + 9, gprep[curmop], 14);
66
67 return(SUCCESS);
68}
69
70/*
71 =============================================================================
72 nd_aopt() -- handle new data entry
73 =============================================================================
74*/
75
76int16_t nd_aopt(int16_t nn, int16_t k)
77{
78 register int16_t n;
79
80 if ((k < 1) OR (k > 2))
81 return(FAILURE);
82
83 n = nn & 0xFF;
84 ebuf[0] = k + '0';
85 ebuf[1] = '\0';
86
87 dspbuf[0] = k + '0';
88 dspbuf[1] = '\0';
89
90 vbank(0);
91 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
92
93 return(SUCCESS);
94}
95
96
Note: See TracBrowser for help on using the repository browser.