[f40a309] | 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 |
|
---|
[b28a12e] | 8 | #include "ram.h"
|
---|
[f40a309] | 9 |
|
---|
| 10 | /*
|
---|
| 11 | =============================================================================
|
---|
| 12 | et_aopt() -- load the edit buffer
|
---|
| 13 | =============================================================================
|
---|
| 14 | */
|
---|
| 15 |
|
---|
[7258c6a] | 16 | int16_t et_aopt(int16_t n)
|
---|
[f40a309] | 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 |
|
---|
[7258c6a] | 30 | int16_t ef_aopt(int16_t n)
|
---|
[f40a309] | 31 | {
|
---|
[7258c6a] | 32 | register int16_t tmpval;
|
---|
[f40a309] | 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 |
|
---|
[7258c6a] | 53 | int16_t rd_aopt(int16_t nn)
|
---|
[f40a309] | 54 | {
|
---|
[7258c6a] | 55 | register int16_t n;
|
---|
[f40a309] | 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 |
|
---|
[7258c6a] | 72 | int16_t nd_aopt(int16_t nn, int16_t k)
|
---|
[f40a309] | 73 | {
|
---|
[7258c6a] | 74 | register int16_t n;
|
---|
[f40a309] | 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 |
|
---|
[6262b5c] | 92 |
|
---|