[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | tdfield.c -- MIDAS-VII tuning display field processing and cursor motion
|
---|
| 4 | Version 18 -- 1989-11-15 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include "stddefs.h"
|
---|
| 9 | #include "fields.h"
|
---|
| 10 | #include "vsdd.h"
|
---|
| 11 | #include "graphdef.h"
|
---|
| 12 | #include "charset.h"
|
---|
| 13 | #include "hwdefs.h"
|
---|
| 14 | #include "curpak.h"
|
---|
| 15 |
|
---|
| 16 | #include "midas.h"
|
---|
| 17 | #include "tundsp.h"
|
---|
| 18 |
|
---|
[0580615] | 19 | extern void select(void);
|
---|
| 20 | extern short whatbox(void);
|
---|
| 21 | extern short nokey(void);
|
---|
| 22 | extern short stdctp0(void);
|
---|
| 23 | extern void cxkstd(void);
|
---|
| 24 | extern void cykstd(void);
|
---|
| 25 | extern void stdmkey(void);
|
---|
| 26 | extern void stddkey(void);
|
---|
| 27 |
|
---|
| 28 | extern short et_null(void);
|
---|
| 29 | extern short ef_null(void);
|
---|
| 30 | extern short rd_null(void);
|
---|
| 31 | extern short nd_null(void);
|
---|
| 32 | extern short et_ttab(short n);
|
---|
| 33 | extern short ef_ttab(short n);
|
---|
| 34 | extern short rd_ttab(short nn);
|
---|
| 35 | extern short nd_ttab(short nn, short k);
|
---|
| 36 | extern short et_tval(short n);
|
---|
| 37 | extern short ef_tval(short n);
|
---|
| 38 | extern short rd_tval(short nn);
|
---|
| 39 | extern short nd_tval(short nn, short k);
|
---|
| 40 | extern short et_tpch(short nn);
|
---|
| 41 | extern short ef_tpch(short nn);
|
---|
| 42 | extern short rd_tpch(short nn);
|
---|
| 43 | extern short nd_tpch(short nn, short k);
|
---|
| 44 |
|
---|
| 45 | extern char *memset(char *sp, char c, int n);
|
---|
[f40a309] | 46 |
|
---|
| 47 | extern short cxval, cyval, cxrate, cyrate;
|
---|
| 48 | extern short stcrow, stccol, submenu, vtcrow, vtccol, vtwrow, vtwcol;
|
---|
| 49 | extern short vtxval, vtyval;
|
---|
| 50 |
|
---|
| 51 | extern short crate1[];
|
---|
| 52 |
|
---|
| 53 | extern struct selbox *csbp;
|
---|
| 54 | extern struct selbox tdboxes[];
|
---|
| 55 |
|
---|
| 56 | extern short tunmod, tdnamsw;
|
---|
| 57 |
|
---|
| 58 | /* forward references */
|
---|
| 59 |
|
---|
[0580615] | 60 | void tdcxupd(void);
|
---|
| 61 | void tdcyupd(void);
|
---|
[f40a309] | 62 |
|
---|
| 63 | /* |
---|
| 64 |
|
---|
| 65 | */
|
---|
| 66 |
|
---|
| 67 | struct fet td_fet1[] = { /* field definitions */
|
---|
| 68 |
|
---|
| 69 | { 0, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 70 | { 1, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 71 | { 2, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 72 | { 3, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 73 | { 4, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 74 | { 5, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 75 | { 6, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 76 | { 7, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 77 | { 8, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 78 | { 9, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 79 | {10, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 80 | {11, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 81 | {12, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 82 | {13, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 83 | {14, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 84 | {15, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 85 | {16, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 86 | {17, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 87 | {18, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 88 | {19, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 89 | {20, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 90 | {21, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 91 | {22, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 92 | {23, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 93 |
|
---|
| 94 | { 0, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 95 | { 1, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 96 | { 2, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 97 | { 3, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 98 | { 4, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 99 | { 5, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 100 | { 6, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 101 | { 7, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 102 | { 8, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 103 | { 9, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 104 | {10, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 105 | {11, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 106 | {12, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 107 | {13, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 108 | {14, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 109 | {15, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 110 | {16, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 111 | {17, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 112 | {18, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 113 | {19, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 114 | {20, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 115 | {21, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 116 | {22, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 117 | {23, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 118 | /* |
---|
| 119 |
|
---|
| 120 | */
|
---|
| 121 | { 0, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 122 | { 1, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 123 | { 2, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 124 | { 3, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 125 | { 4, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 126 | { 5, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 127 | { 6, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 128 | { 7, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 129 | { 8, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 130 | { 9, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 131 | {10, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 132 | {11, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 133 | {12, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 134 | {13, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 135 | {14, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 136 | {15, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 137 | {16, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 138 | {17, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 139 | {18, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 140 | {19, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 141 | {20, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 142 | {21, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 143 | {22, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 144 | {23, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 145 |
|
---|
| 146 | { 0, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 147 | { 1, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 148 | { 2, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 149 | { 3, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 150 | { 4, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 151 | { 5, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 152 | { 6, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 153 | { 7, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 154 | { 8, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 155 | { 9, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 156 | {10, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 157 | {11, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 158 | {12, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 159 | {13, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 160 | {14, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 161 | {15, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 162 | {16, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 163 | {17, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 164 | {18, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 165 | {19, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 166 | {20, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 167 | {21, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 168 | {22, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 169 | {23, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 170 | /* |
---|
| 171 |
|
---|
| 172 | */
|
---|
| 173 | { 0, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 174 | { 1, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 175 | { 2, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 176 | { 3, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 177 | { 4, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 178 | { 5, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 179 | { 6, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 180 | { 7, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 181 | { 8, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 182 | { 9, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 183 | {10, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 184 | {11, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 185 | {12, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 186 | {13, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 187 | {14, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 188 | {15, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 189 | {16, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 190 | {17, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 191 | {18, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 192 | {19, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 193 | {20, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 194 | {21, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 195 | {22, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 196 | {23, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 197 |
|
---|
| 198 | { 0, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 199 | { 1, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 200 | { 2, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 201 | { 3, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 202 | { 4, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 203 | { 5, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 204 | { 6, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 205 | { 7, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 206 |
|
---|
| 207 | {18, 58, 62, 6, et_tval, ef_tval, rd_tval, nd_tval},
|
---|
| 208 |
|
---|
| 209 | {24, 7, 38, 7, et_null, ef_null, rd_null, nd_null},
|
---|
| 210 | {24, 61, 61, 6, et_ttab, ef_ttab, rd_ttab, nd_ttab},
|
---|
| 211 |
|
---|
| 212 | { 0, 0, 0, 0x0000, FN_NULL, FN_NULL, FN_NULL, FN_NULL}
|
---|
| 213 | };
|
---|
| 214 |
|
---|
| 215 | /* |
---|
| 216 |
|
---|
| 217 | */
|
---|
| 218 |
|
---|
| 219 | short tdbox[][8] = { /* display box parameters */
|
---|
| 220 |
|
---|
| 221 | { 0, 0, 95, 335, TCFBX00, TCBBX00, 0, 1}, /* 0 */
|
---|
| 222 | { 96, 0, 175, 335, TCFBX01, TCBBX01, 0, 13}, /* 1 */
|
---|
| 223 | {176, 0, 255, 335, TCFBX02, TCBBX02, 0, 23}, /* 2 */
|
---|
| 224 | {256, 0, 335, 335, TCFBX03, TCBBX03, 0, 33}, /* 3 */
|
---|
| 225 | {336, 0, 423, 335, TCFBX04, TCBBX04, 0, 43}, /* 4 */
|
---|
| 226 | {424, 0, 511, 118, TCFBX05, TCBBX05, 0, 54}, /* 5 */
|
---|
| 227 | {424, 119, 511, 349, TCFBX06, TCBBX06, 9, 54}, /* 6 */
|
---|
| 228 | { 0, 336, 423, 349, TCFBX07, TCBBX07, 24, 1} /* 7 */
|
---|
| 229 | };
|
---|
| 230 |
|
---|
| 231 | char *tdbxlb[] = { /* display box labels */
|
---|
| 232 |
|
---|
| 233 | "", /* 0 */
|
---|
| 234 | "", /* 1 */
|
---|
| 235 | "", /* 2 */
|
---|
| 236 | "", /* 3 */
|
---|
| 237 | "", /* 4 */
|
---|
| 238 | "", /* 5 */
|
---|
| 239 | "", /* 6 */
|
---|
| 240 | "Name:" /* 7 */
|
---|
| 241 | };
|
---|
| 242 |
|
---|
| 243 | /* |
---|
| 244 |
|
---|
| 245 | */
|
---|
| 246 |
|
---|
| 247 | struct curpak td_flds = {
|
---|
| 248 |
|
---|
| 249 | stdctp0, /* curtype */
|
---|
| 250 | nokey, /* premove */
|
---|
| 251 | nokey, /* pstmove */
|
---|
| 252 | cxkstd, /* cx_key */
|
---|
| 253 | cykstd, /* cy_key */
|
---|
| 254 | tdcxupd, /* cx_upd */
|
---|
| 255 | tdcyupd, /* cy_upd */
|
---|
| 256 | nokey, /* xy_up */
|
---|
| 257 | nokey, /* xy_dn */
|
---|
| 258 | nokey, /* x_key */
|
---|
| 259 | select, /* e_key */
|
---|
| 260 | stdmkey, /* m_key */
|
---|
| 261 | stddkey, /* d_key */
|
---|
| 262 | nokey, /* not_fld */
|
---|
| 263 | td_fet1, /* curfet */
|
---|
| 264 | tdboxes, /* csbp */
|
---|
| 265 | crate1, /* cratex */
|
---|
| 266 | crate1, /* cratey */
|
---|
| 267 | CT_TEXT, /* cmtype */
|
---|
| 268 | TDCURX, /* cxval */
|
---|
| 269 | TDCURY /* cyval */
|
---|
| 270 | };
|
---|
| 271 |
|
---|
| 272 | /* |
---|
| 273 |
|
---|
| 274 | */
|
---|
| 275 |
|
---|
[0580615] | 276 | /*
|
---|
[f40a309] | 277 | =============================================================================
|
---|
| 278 | tdcyupd() -- update cursor y location
|
---|
| 279 | =============================================================================
|
---|
| 280 | */
|
---|
| 281 |
|
---|
| 282 | void tdcyupd(void)
|
---|
| 283 | {
|
---|
| 284 | register short pval, vh, vl;
|
---|
| 285 |
|
---|
| 286 | if (tdnamsw) { /* see if we're in the menu area */
|
---|
| 287 |
|
---|
| 288 | vtcrow = YTOR(vtyval += cyrate);
|
---|
| 289 |
|
---|
| 290 | if (vtcrow > (vtwrow + 2))
|
---|
| 291 | vtyval = RTOY(vtcrow = vtwrow + 2);
|
---|
| 292 | else if (vtcrow < vtwrow)
|
---|
| 293 | vtyval = RTOY(vtcrow = vtwrow);
|
---|
| 294 |
|
---|
| 295 | } else { /* just moving the cursor */
|
---|
| 296 |
|
---|
| 297 | cyval += cyrate;
|
---|
| 298 |
|
---|
| 299 | if (cyval GT (CYMAX - 1))
|
---|
| 300 | cyval = CYMAX - 1;
|
---|
| 301 | else if (cyval LT 1)
|
---|
| 302 | cyval = 1;
|
---|
| 303 | }
|
---|
| 304 | }
|
---|
| 305 |
|
---|
| 306 | /* |
---|
| 307 |
|
---|
| 308 | */
|
---|
[0580615] | 309 |
|
---|
[f40a309] | 310 | /*
|
---|
| 311 | =============================================================================
|
---|
| 312 | tdcxupd() -- update cursor x location
|
---|
| 313 | =============================================================================
|
---|
| 314 | */
|
---|
| 315 |
|
---|
| 316 | void tdcxupd(void)
|
---|
| 317 | {
|
---|
| 318 |
|
---|
| 319 | if (tdnamsw) { /* see if we're in the menu area */
|
---|
| 320 |
|
---|
| 321 | vtccol = XTOC(vtxval += cxrate);
|
---|
| 322 |
|
---|
| 323 | if (vtccol > (vtwcol + 29))
|
---|
| 324 | vtxval = CTOX(vtccol = vtwcol + 29);
|
---|
| 325 | else if (vtccol < vtwcol)
|
---|
| 326 | vtxval = CTOX(vtccol = vtwcol);
|
---|
| 327 |
|
---|
| 328 | } else { /* just moving the cursor */
|
---|
| 329 |
|
---|
| 330 | cxval += cxrate;
|
---|
| 331 |
|
---|
| 332 | if (cxval GT (CXMAX- 1))
|
---|
| 333 | cxval = CXMAX - 1;
|
---|
| 334 | else if (cxval LT 1)
|
---|
| 335 | cxval = 1;
|
---|
| 336 | }
|
---|
| 337 | }
|
---|
| 338 |
|
---|
| 339 | /* |
---|
| 340 |
|
---|
[0580615] | 341 | */
|
---|
[f40a309] | 342 |
|
---|
| 343 | /*
|
---|
| 344 | =============================================================================
|
---|
| 345 | tdfield() -- setup field routines for the tuning editor
|
---|
| 346 | =============================================================================
|
---|
| 347 | */
|
---|
| 348 |
|
---|
| 349 | void tdfield(void)
|
---|
| 350 | {
|
---|
| 351 | tdnamsw = FALSE;
|
---|
| 352 | submenu = FALSE;
|
---|
| 353 |
|
---|
| 354 | curset(&td_flds);
|
---|
| 355 | }
|
---|