source: buchla-68k/ram/etains.c@ 9738a78

Last change on this file since 9738a78 was 7ecfb7b, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 =============================================================================
3 etains.c -- MIDAS assignment editor -- instrument to groups
4 Version 10 -- 1988-07-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 modasg() -- indicate that the assignment table was modified
13 =============================================================================
14*/
15
16void modasg(void)
17{
18 if (NOT asgmod) {
19
20 asgmod = TRUE;
21 adswin(0);
22 }
23}
24
25/*
26 =============================================================================
27 et_ains() -- load the edit buffer
28 =============================================================================
29*/
30
31int16_t et_ains(int16_t n)
32{
33 register int16_t grp;
34
35 grp = 0x00FF & (n >> 8);
36
37 sprintf(ebuf, "%02.2d", ins2grp[grp] & 0x00FF);
38 ebflag = TRUE;
39
40 return(SUCCESS);
41}
42
43/*
44 =============================================================================
45 ef_ains() -- parse (unload) the edit buffer
46 =============================================================================
47*/
48
49int16_t ef_ains(int16_t n)
50{
51 register int16_t tmpval, grp, i;
52
53 grp = 0x00FF & (n >> 8);
54 ebuf[2] = '\0';
55 ebflag = FALSE;
56 tmpval = 0;
57
58 for (i = 0; i < 2; i++)
59 tmpval = (tmpval * 10) + (ebuf[i] - '0');
60
61 if (tmpval GE NINST )
62 return(FAILURE);
63
64 ins2grp[grp] = tmpval | (ins2grp[grp] & 0xFF00);
65 modasg();
66 setv2gi(grp);
67 setinst();
68 return(SUCCESS);
69}
70
71/*
72 =============================================================================
73 rd_ains() -- (re)display the field
74 =============================================================================
75*/
76
77int16_t rd_ains(int16_t nn)
78{
79 register int16_t n, grp;
80
81 n = 0x00FF & nn;
82 grp = 0x00FF & (nn >> 8);
83
84 sprintf(dspbuf, "%02.2d", ins2grp[grp] & 0x00FF);
85
86 vbank(0);
87 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
88 cfetp->frow, cfetp->flcol, dspbuf, 14);
89
90 return(SUCCESS);
91}
92
93/*
94 =============================================================================
95 nd_ains() -- handle new data entry
96 =============================================================================
97*/
98
99int16_t nd_ains(int16_t nn, int16_t k)
100{
101 register int16_t n;
102
103 n = nn & 0xFF;
104 ebuf[stccol - cfetp->flcol] = k + '0';
105 ebuf[2] = '\0';
106
107 dspbuf[0] = k + '0';
108 dspbuf[1] = '\0';
109
110 vbank(0);
111 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
112 stcrow, stccol, dspbuf, 14);
113
114 advacur();
115 return(SUCCESS);
116}
117
118
Note: See TracBrowser for help on using the repository browser.