| 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 |
|
|---|
| 16 | int16_t et_aopt(int16_t n)
|
|---|
| 17 | {
|
|---|
| 18 | (void)n;
|
|---|
| 19 |
|
|---|
| 20 | sprintf(ebuf, "%01.1d", curmop);
|
|---|
| 21 | ebflag = TRUE;
|
|---|
| 22 |
|
|---|
| 23 | return(SUCCESS);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | /*
|
|---|
| 27 | =============================================================================
|
|---|
| 28 | ef_aopt() -- parse (unload) the edit buffer
|
|---|
| 29 | =============================================================================
|
|---|
| 30 | */
|
|---|
| 31 |
|
|---|
| 32 | int16_t ef_aopt(int16_t n)
|
|---|
| 33 | {
|
|---|
| 34 | register int16_t tmpval;
|
|---|
| 35 |
|
|---|
| 36 | (void)n;
|
|---|
| 37 |
|
|---|
| 38 | ebuf[1] = '\0'; /* terminate the string in ebuf */
|
|---|
| 39 | ebflag = FALSE;
|
|---|
| 40 |
|
|---|
| 41 | tmpval = ebuf[0] - '0';
|
|---|
| 42 |
|
|---|
| 43 | if (tmpval GT 3)
|
|---|
| 44 | return(FAILURE);
|
|---|
| 45 |
|
|---|
| 46 | curmop = tmpval;
|
|---|
| 47 | modasg();
|
|---|
| 48 | return(SUCCESS);
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | /*
|
|---|
| 52 | =============================================================================
|
|---|
| 53 | rd_aopt() -- (re)display the field
|
|---|
| 54 | =============================================================================
|
|---|
| 55 | */
|
|---|
| 56 |
|
|---|
| 57 | int16_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 |
|
|---|
| 76 | int16_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 |
|
|---|