[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 |
|
---|
| 8 | #include "stddefs.h"
|
---|
| 9 | #include "fields.h"
|
---|
| 10 | #include "vsdd.h"
|
---|
| 11 | #include "vsddsw.h"
|
---|
| 12 | #include "graphdef.h"
|
---|
| 13 |
|
---|
| 14 | #include "midas.h"
|
---|
| 15 | #include "asgdsp.h"
|
---|
| 16 |
|
---|
| 17 | extern unsigned *asgob;
|
---|
| 18 |
|
---|
| 19 | extern short stcrow, stccol;
|
---|
| 20 | extern short curtun;
|
---|
| 21 |
|
---|
| 22 | extern short adbox[][8];
|
---|
| 23 |
|
---|
| 24 | extern char dspbuf[];
|
---|
| 25 |
|
---|
| 26 | /* |
---|
| 27 |
|
---|
| 28 | */
|
---|
| 29 |
|
---|
| 30 | /*
|
---|
| 31 | =============================================================================
|
---|
| 32 | et_atun() -- load the edit buffer
|
---|
| 33 | =============================================================================
|
---|
| 34 | */
|
---|
[0580615] | 35 |
|
---|
[f40a309] | 36 | short et_atun(short n)
|
---|
| 37 | {
|
---|
| 38 | sprintf(ebuf, "%01.1d", curtun);
|
---|
| 39 | ebflag = TRUE;
|
---|
| 40 |
|
---|
| 41 | return(SUCCESS);
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | /*
|
---|
| 45 | =============================================================================
|
---|
| 46 | ef_atun() -- parse (unload) the edit buffer
|
---|
| 47 | =============================================================================
|
---|
| 48 | */
|
---|
[0580615] | 49 |
|
---|
[f40a309] | 50 | short ef_atun(short n)
|
---|
| 51 | {
|
---|
| 52 | register short tmpval;
|
---|
| 53 |
|
---|
| 54 | ebuf[1] = '\0'; /* terminate the string in ebuf */
|
---|
| 55 | ebflag = FALSE;
|
---|
| 56 |
|
---|
| 57 | tmpval = ebuf[0] - '0';
|
---|
| 58 |
|
---|
| 59 | gettun(tmpval);
|
---|
| 60 |
|
---|
| 61 | modasg();
|
---|
| 62 | return(SUCCESS);
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | /* |
---|
| 66 |
|
---|
| 67 | */
|
---|
| 68 |
|
---|
| 69 | /*
|
---|
| 70 | =============================================================================
|
---|
| 71 | rd_atun() -- (re)display the field
|
---|
| 72 | =============================================================================
|
---|
[0580615] | 73 | */
|
---|
[f40a309] | 74 |
|
---|
| 75 | short rd_atun(short nn)
|
---|
| 76 | {
|
---|
| 77 | register short n;
|
---|
| 78 |
|
---|
| 79 | n = nn & 0xFF;
|
---|
| 80 | sprintf(dspbuf, "Tun %01.1d", curtun);
|
---|
| 81 |
|
---|
| 82 | vbank(0);
|
---|
| 83 | vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
|
---|
| 84 | adbox[n][6], adbox[n][7], dspbuf, 14);
|
---|
| 85 |
|
---|
| 86 | return(SUCCESS);
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | /*
|
---|
| 90 | =============================================================================
|
---|
| 91 | nd_atun() -- handle new data entry
|
---|
| 92 | =============================================================================
|
---|
[0580615] | 93 | */
|
---|
[f40a309] | 94 |
|
---|
| 95 | short nd_atun(short nn, short k)
|
---|
| 96 | {
|
---|
| 97 | register short n;
|
---|
| 98 |
|
---|
| 99 | n = nn & 0xFF;
|
---|
| 100 | ebuf[0] = k + '0';
|
---|
| 101 | ebuf[1] = '\0';
|
---|
| 102 |
|
---|
| 103 | dspbuf[0] = k + '0';
|
---|
| 104 | dspbuf[1] = '\0';
|
---|
| 105 |
|
---|
| 106 | vbank(0);
|
---|
| 107 | vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
|
---|
| 108 | stcrow, stccol, dspbuf, 14);
|
---|
| 109 |
|
---|
| 110 | return(SUCCESS);
|
---|
| 111 | }
|
---|
| 112 |
|
---|