source: buchla-68k/ram/etatab.c@ 572daa7

Last change on this file since 572daa7 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
RevLine 
[f40a309]1/*
2 =============================================================================
3 etatab.c -- assignment editor - assignment table number field handlers
4 Version 9 -- 1988-08-22 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_atab() -- load the edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_atab(int16_t n)
[f40a309]17{
[7ecfb7b]18 (void)n;
19
[f40a309]20 sprintf(ebuf, "%02d", curasg);
21 ebflag = TRUE;
22
23 return(SUCCESS);
24}
25
26/*
27 =============================================================================
28 ef_atab() -- parse (unload) the edit buffer
29 =============================================================================
30*/
31
[7258c6a]32int16_t ef_atab(int16_t n)
[f40a309]33{
[7258c6a]34 register int16_t i, tmpval;
[f40a309]35
[7ecfb7b]36 (void)n;
37
[f40a309]38 ebuf[2] = '\0'; /* terminate the string in ebuf */
39 ebflag = FALSE;
40 tmpval = 0;
41
42 for (i = 0; i < 2; i++) /* convert from ASCII to binary */
43 tmpval = (tmpval * 10) + (ebuf[i] - '0');
44
45 if (tmpval GE NASGS)
46 return(FAILURE);
47
48 curasg = tmpval;
49 asgmod = TRUE;
50 adswin(0);
51
52 settc(2, 6);
53
54 return(SUCCESS);
55}
56
57/*
58 =============================================================================
59 rd_atab() -- (re)display the field
60 =============================================================================
61*/
62
[7258c6a]63int16_t rd_atab(int16_t nn)
[f40a309]64{
[7258c6a]65 register int16_t n;
[f40a309]66
67 n = nn & 0xFF;
68 sprintf(dspbuf, "%02.2d", curasg);
69
70 point = adpoint;
71
72 if (v_regs[5] & 0x0180)
73 vbank(0);
74
75 vcputsv(asgob, 64, (asgmod ? exp_c(AK_MODC) : adbox[n][4]), adbox[n][5],
76 cfetp->frow, cfetp->flcol, dspbuf, 14);
77
78 lseg(0, 0, 128, 0, AK_BORD);
79
80 return(SUCCESS);
81}
82
83/*
84 =============================================================================
85 nd_atab() -- handle new data entry
86 =============================================================================
87*/
88
[7258c6a]89int16_t nd_atab(int16_t nn, int16_t k)
[f40a309]90{
[7258c6a]91 register int16_t ec, n;
[f40a309]92
93 n = nn & 0xFF;
94 ec = stccol - cfetp->flcol; /* setup edit buffer column */
95
96 ebuf[ec] = k + '0';
97 ebuf[2] = '\0';
98
99 dspbuf[0] = k + '0';
100 dspbuf[1] = '\0';
101
102 point = adpoint;
103
104 if (v_regs[5] & 0x0180)
105 vbank(0);
106
107 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
108 stcrow, stccol, dspbuf, 14);
109
110 lseg(0, 0, 128, 0, AK_BORD);
111
112 advacur();
113 return(SUCCESS);
114}
115
[6262b5c]116
Note: See TracBrowser for help on using the repository browser.