[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | etatun.c -- MIDAS assignment editor - tuning table field handlers
|
---|
| 4 | Version 1 -- 1987-12-10 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[b28a12e] | 8 | #include "ram.h"
|
---|
[f40a309] | 9 |
|
---|
| 10 | /*
|
---|
| 11 | =============================================================================
|
---|
| 12 | et_atun() -- load the edit buffer
|
---|
| 13 | =============================================================================
|
---|
| 14 | */
|
---|
| 15 |
|
---|
[7258c6a] | 16 | int16_t et_atun(int16_t n)
|
---|
[f40a309] | 17 | {
|
---|
| 18 | sprintf(ebuf, "%01.1d", curtun);
|
---|
| 19 | ebflag = TRUE;
|
---|
| 20 |
|
---|
| 21 | return(SUCCESS);
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | /*
|
---|
| 25 | =============================================================================
|
---|
| 26 | ef_atun() -- parse (unload) the edit buffer
|
---|
| 27 | =============================================================================
|
---|
| 28 | */
|
---|
| 29 |
|
---|
[7258c6a] | 30 | int16_t ef_atun(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 | gettun(tmpval);
|
---|
| 40 |
|
---|
| 41 | modasg();
|
---|
| 42 | return(SUCCESS);
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | /*
|
---|
| 46 | =============================================================================
|
---|
| 47 | rd_atun() -- (re)display the field
|
---|
| 48 | =============================================================================
|
---|
| 49 | */
|
---|
| 50 |
|
---|
[7258c6a] | 51 | int16_t rd_atun(int16_t nn)
|
---|
[f40a309] | 52 | {
|
---|
[7258c6a] | 53 | register int16_t n;
|
---|
[f40a309] | 54 |
|
---|
| 55 | n = nn & 0xFF;
|
---|
| 56 | sprintf(dspbuf, "Tun %01.1d", curtun);
|
---|
| 57 |
|
---|
| 58 | vbank(0);
|
---|
| 59 | vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
|
---|
| 60 | adbox[n][6], adbox[n][7], dspbuf, 14);
|
---|
| 61 |
|
---|
| 62 | return(SUCCESS);
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | /*
|
---|
| 66 | =============================================================================
|
---|
| 67 | nd_atun() -- handle new data entry
|
---|
| 68 | =============================================================================
|
---|
| 69 | */
|
---|
| 70 |
|
---|
[7258c6a] | 71 | int16_t nd_atun(int16_t nn, int16_t k)
|
---|
[f40a309] | 72 | {
|
---|
[7258c6a] | 73 | register int16_t n;
|
---|
[f40a309] | 74 |
|
---|
| 75 | n = nn & 0xFF;
|
---|
| 76 | ebuf[0] = k + '0';
|
---|
| 77 | ebuf[1] = '\0';
|
---|
| 78 |
|
---|
| 79 | dspbuf[0] = k + '0';
|
---|
| 80 | dspbuf[1] = '\0';
|
---|
| 81 |
|
---|
| 82 | vbank(0);
|
---|
| 83 | vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
|
---|
| 84 | stcrow, stccol, dspbuf, 14);
|
---|
| 85 |
|
---|
| 86 | return(SUCCESS);
|
---|
| 87 | }
|
---|
| 88 |
|
---|
[6262b5c] | 89 |
|
---|