| [3ae31e9] | 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 | */
|
|---|
| 35 |
|
|---|
| 36 | short
|
|---|
| 37 | et_atun(n)
|
|---|
| 38 | short n;
|
|---|
| 39 | {
|
|---|
| 40 | sprintf(ebuf, "%01.1d", curtun);
|
|---|
| 41 | ebflag = TRUE;
|
|---|
| 42 |
|
|---|
| 43 | return(SUCCESS);
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | /*
|
|---|
| 47 | =============================================================================
|
|---|
| 48 | ef_atun() -- parse (unload) the edit buffer
|
|---|
| 49 | =============================================================================
|
|---|
| 50 | */
|
|---|
| 51 |
|
|---|
| 52 | short
|
|---|
| 53 | ef_atun(n)
|
|---|
| 54 | short n;
|
|---|
| 55 | {
|
|---|
| 56 | register short tmpval;
|
|---|
| 57 |
|
|---|
| 58 | ebuf[1] = '\0'; /* terminate the string in ebuf */
|
|---|
| 59 | ebflag = FALSE;
|
|---|
| 60 |
|
|---|
| 61 | tmpval = ebuf[0] - '0';
|
|---|
| 62 |
|
|---|
| 63 | gettun(tmpval);
|
|---|
| 64 |
|
|---|
| 65 | modasg();
|
|---|
| 66 | return(SUCCESS);
|
|---|
| 67 | }
|
|---|
| 68 |
|
|---|
| 69 | /* |
|---|
| 70 |
|
|---|
| 71 | */
|
|---|
| 72 |
|
|---|
| 73 | /*
|
|---|
| 74 | =============================================================================
|
|---|
| 75 | rd_atun() -- (re)display the field
|
|---|
| 76 | =============================================================================
|
|---|
| 77 | */
|
|---|
| 78 |
|
|---|
| 79 | short
|
|---|
| 80 | rd_atun(nn)
|
|---|
| 81 | short nn;
|
|---|
| 82 | {
|
|---|
| 83 | register short n;
|
|---|
| 84 |
|
|---|
| 85 | n = nn & 0xFF;
|
|---|
| 86 | sprintf(dspbuf, "Tun %01.1d", curtun);
|
|---|
| 87 |
|
|---|
| 88 | vbank(0);
|
|---|
| 89 | vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
|
|---|
| 90 | adbox[n][6], adbox[n][7], dspbuf, 14);
|
|---|
| 91 |
|
|---|
| 92 | return(SUCCESS);
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 | /*
|
|---|
| 96 | =============================================================================
|
|---|
| 97 | nd_atun() -- handle new data entry
|
|---|
| 98 | =============================================================================
|
|---|
| 99 | */
|
|---|
| 100 |
|
|---|
| 101 | short
|
|---|
| 102 | nd_atun(nn, k)
|
|---|
| 103 | short nn;
|
|---|
| 104 | register short k;
|
|---|
| 105 | {
|
|---|
| 106 | register short n;
|
|---|
| 107 |
|
|---|
| 108 | n = nn & 0xFF;
|
|---|
| 109 | ebuf[0] = k + '0';
|
|---|
| 110 | ebuf[1] = '\0';
|
|---|
| 111 |
|
|---|
| 112 | dspbuf[0] = k + '0';
|
|---|
| 113 | dspbuf[1] = '\0';
|
|---|
| 114 |
|
|---|
| 115 | vbank(0);
|
|---|
| 116 | vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
|
|---|
| 117 | stcrow, stccol, dspbuf, 14);
|
|---|
| 118 |
|
|---|
| 119 | return(SUCCESS);
|
|---|
| 120 | }
|
|---|
| 121 |
|
|---|