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

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

Removed form-feed comments.

  • 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 rd_aopt() -- (re)display the field
50 =============================================================================
51*/
52
53int16_t rd_aopt(int16_t nn)
54{
55 register int16_t n;
56
57 n = nn & 0xFF;
58
59 vbank(0);
60 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
61 adbox[n][6], adbox[n][7] + 9, gprep[curmop], 14);
62
63 return(SUCCESS);
64}
65
66/*
67 =============================================================================
68 nd_aopt() -- handle new data entry
69 =============================================================================
70*/
71
72int16_t nd_aopt(int16_t nn, int16_t k)
73{
74 register int16_t n;
75
76 if ((k < 1) OR (k > 2))
77 return(FAILURE);
78
79 n = nn & 0xFF;
80 ebuf[0] = k + '0';
81 ebuf[1] = '\0';
82
83 dspbuf[0] = k + '0';
84 dspbuf[1] = '\0';
85
86 vbank(0);
87 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
88
89 return(SUCCESS);
90}
91
92
Note: See TracBrowser for help on using the repository browser.