source: buchla-68k/ram/etaccn.c@ 8b685e0

Last change on this file since 8b685e0 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 etaccn.c -- assignment editor - source controller number field handlers
4 Version 7 -- 1988-03-19 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_accn() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_accn(int16_t n)
17{
18 register int16_t ctl;
19
20 ctl = 0x00FF & (n >> 8);
21
22 numblk(ebuf, (mctlnum[ctl] & 0x00FF));
23 ebflag = TRUE;
24
25 return(SUCCESS);
26}
27
28/*
29 =============================================================================
30 ef_accn() -- parse (unload) the edit buffer
31 =============================================================================
32*/
33
34int16_t ef_accn(int16_t n)
35{
36 register int16_t tmpval, ctl, i;
37
38 ctl = 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
59 if (mctlnum[ctl] EQ -1)
60 mctlnum[ctl] = tmpval;
61 else
62 mctlnum[ctl] = (mctlnum[ctl] & 0xFF00) | tmpval;
63
64 modasg();
65 return(SUCCESS);
66}
67
68/*
69 =============================================================================
70 rd_accn() -- (re)display the field
71 =============================================================================
72*/
73
74int16_t rd_accn(int16_t nn)
75{
76 register int16_t n, ctl;
77 int8_t buf[4];
78
79 n = 0x00FF & nn;
80 ctl = 0x00FF & (nn >> 8);
81
82 vbank(0);
83 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
84 cfetp->frow, cfetp->flcol,
85 numblk(buf, (mctlnum[ctl] & 0x00FF)), 14);
86
87 return(SUCCESS);
88}
89
90/*
91 =============================================================================
92 nd_accn() -- handle new data entry
93 =============================================================================
94*/
95
96int16_t nd_accn(int16_t nn, int16_t k)
97{
98 register int16_t n;
99
100 n = nn & 0xFF;
101 ebuf[stccol - cfetp->flcol] = k + '0';
102 ebuf[2] = '\0';
103
104 dspbuf[0] = k + '0';
105 dspbuf[1] = '\0';
106
107 vbank(0);
108 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
109 stcrow, stccol, dspbuf, 14);
110
111 advacur();
112 return(SUCCESS);
113}
114
115
Note: See TracBrowser for help on using the repository browser.