1 | /*
|
---|
2 | =============================================================================
|
---|
3 | etttab.c -- MIDAS tuning editor - tuning table number field handlers
|
---|
4 | Version 3 -- 1988-08-22 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "ram.h"
|
---|
9 |
|
---|
10 | /*
|
---|
11 | =============================================================================
|
---|
12 | et_ttab() -- load the edit buffer
|
---|
13 | =============================================================================
|
---|
14 | */
|
---|
15 |
|
---|
16 | int16_t et_ttab(int16_t n)
|
---|
17 | {
|
---|
18 | sprintf(ebuf, "%d", curtun);
|
---|
19 | ebflag = TRUE;
|
---|
20 |
|
---|
21 | return(SUCCESS);
|
---|
22 | }
|
---|
23 |
|
---|
24 | /*
|
---|
25 | =============================================================================
|
---|
26 | ef_ttab() -- parse (unload) the edit buffer
|
---|
27 | =============================================================================
|
---|
28 | */
|
---|
29 |
|
---|
30 | int16_t ef_ttab(int16_t n)
|
---|
31 | {
|
---|
32 | register int16_t i, tmpval;
|
---|
33 |
|
---|
34 | ebuf[1] = '\0'; /* terminate the string in ebuf */
|
---|
35 | ebflag = FALSE;
|
---|
36 |
|
---|
37 | curtun = ebuf[0] - '0';
|
---|
38 | modtun();
|
---|
39 | settc(22, 54);
|
---|
40 | return(SUCCESS);
|
---|
41 | }
|
---|
42 |
|
---|
43 | /*
|
---|
44 | =============================================================================
|
---|
45 | rd_ttab() -- (re)display the field
|
---|
46 | =============================================================================
|
---|
47 | */
|
---|
48 |
|
---|
49 | int16_t rd_ttab(int16_t nn)
|
---|
50 | {
|
---|
51 | register int16_t n;
|
---|
52 |
|
---|
53 | n = nn & 0xFF;
|
---|
54 | sprintf(dspbuf, "%d", curtun);
|
---|
55 |
|
---|
56 | vbank(0);
|
---|
57 | vcputsv(tunob, 64, (tunmod ? TDCHGD : tdbox[n][4]), tdbox[n][5],
|
---|
58 | 24, 61, dspbuf, 14);
|
---|
59 |
|
---|
60 | return(SUCCESS);
|
---|
61 | }
|
---|
62 |
|
---|
63 | /*
|
---|
64 | =============================================================================
|
---|
65 | nd_ttab() -- handle new data entry
|
---|
66 | =============================================================================
|
---|
67 | */
|
---|
68 |
|
---|
69 | int16_t nd_ttab(int16_t nn, int16_t k)
|
---|
70 | {
|
---|
71 | register int16_t n;
|
---|
72 |
|
---|
73 | n = nn & 0xFF;
|
---|
74 |
|
---|
75 | ebuf[0] = k + '0';
|
---|
76 | ebuf[1] = '\0';
|
---|
77 |
|
---|
78 | dspbuf[0] = k + '0';
|
---|
79 | dspbuf[1] = '\0';
|
---|
80 |
|
---|
81 | vbank(0);
|
---|
82 | vcputsv(tunob, 64, TDENTRY, tdbox[n][5], stcrow, stccol, dspbuf, 14);
|
---|
83 |
|
---|
84 | return(SUCCESS);
|
---|
85 | }
|
---|
86 |
|
---|