source: buchla-68k/ram/etagch.c@ 7ecfb7b

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 =============================================================================
3 etagch.c -- assignment editor - group to channel number field handlers
4 Version 6 -- 1987-12-10 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_agch() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_agch(int16_t n)
17{
18 register int16_t grp;
19
20 grp = 0x00FF & (n >> 8);
21
22 numblk(ebuf, grp2prt[grp][1]);
23 ebflag = TRUE;
24
25 return(SUCCESS);
26}
27
28/*
29 =============================================================================
30 ef_agch() -- parse (unload) the edit buffer
31 =============================================================================
32*/
33
34int16_t ef_agch(int16_t n)
35{
36 register int16_t tmpval, grp, i;
37
38 grp = 0x00FF & (n >> 8);
39
40 ebuf[2] = '\0'; /* terminate the string in ebuf */
41 ebflag = FALSE;
42 tmpval = 0;
43
44 if ((ebuf[0] EQ ' ') AND (ebuf[1] EQ ' ')) {
45
46 tmpval = -1;
47
48 } else {
49
50 for (i = 0; i < 2; i++) {
51
52 if (ebuf[i] EQ ' ')
53 ebuf[i] = '0';
54
55 tmpval = (tmpval * 10) + (ebuf[i] - '0');
56 }
57
58 if ((tmpval EQ 0) OR (tmpval GT 16))
59 return(FAILURE);
60 }
61
62 grp2prt[grp][1] = tmpval;
63
64 modasg();
65 return(SUCCESS);
66}
67
68/*
69 =============================================================================
70 rd_agch() -- (re)display the field
71 =============================================================================
72*/
73
74int16_t rd_agch(int16_t nn)
75{
76 register int16_t n, grp;
77 int8_t buf[4];
78
79 n = 0x00FF & nn;
80 grp = 0x00FF & (nn >> 8);
81
82 vbank(0);
83 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
84 cfetp->frow, cfetp->flcol, numblk(buf, grp2prt[grp][1]), 14);
85
86 return(SUCCESS);
87}
88
89/*
90 =============================================================================
91 nd_agch() -- handle new data entry
92 =============================================================================
93*/
94
95int16_t nd_agch(int16_t nn, int16_t k)
96{
97 register int16_t n;
98
99 n = nn & 0xFF;
100 ebuf[stccol - cfetp->flcol] = k + '0';
101 ebuf[2] = '\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 advacur();
111 return(SUCCESS);
112}
113
114
Note: See TracBrowser for help on using the repository browser.