source: buchla-68k/ram/etaint.c@ b28a12e

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

Zero redundant declarations.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 etaint.c -- MIDAS assignment editor - phase shifter intensity field
4 Version 5 -- 1987-12-19 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_aint() -- load the edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_aint(int16_t n)
[f40a309]17{
18 sprintf(ebuf, "%02d", ps_intn);
19 ebflag = TRUE;
20
21 return(SUCCESS);
22}
23
24/*
25 =============================================================================
26 ef_aint() -- parse (unload) the edit buffer
27 =============================================================================
28*/
29
[7258c6a]30int16_t ef_aint(int16_t n)
[f40a309]31{
[7258c6a]32 register int16_t i, tmpval;
[f40a309]33
34 ebuf[2] = '\0'; /* terminate the string in ebuf */
35 ebflag = FALSE;
36 tmpval = 0;
37
38 for (i = 0; i < 2; i++) /* convert from ASCII to binary */
39 tmpval = (tmpval * 10) + (ebuf[i] - '0');
40
41 ps_intn = tmpval;
42 sendval(1, 0, ((ps_intn * 10) << 5));
43 modasg();
44 return(SUCCESS);
45}
46
47/*
48
49*/
50
51/*
52 =============================================================================
53 rd_aint() -- (re)display the field
54 =============================================================================
55*/
[7258c6a]56
[f40a309]57int16_t rd_aint(int16_t nn)
[7258c6a]58{
[f40a309]59 register int16_t n;
60
61 n = nn & 0xFF;
62 sprintf(dspbuf, "%02.2d", ps_intn);
63
64 vbank(0);
65 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
66 adbox[n][6] + 1, adbox[n][7] + 8, dspbuf, 14);
67
68 return(SUCCESS);
69}
70
71/*
72 =============================================================================
73 nd_aint() -- handle new data entry
74 =============================================================================
75*/
[7258c6a]76
[f40a309]77int16_t nd_aint(int16_t nn, int16_t k)
[7258c6a]78{
[f40a309]79 register int16_t ec, n;
80
81 n = nn & 0xFF;
82
83 ec = stccol - cfetp->flcol; /* setup edit buffer column */
84
85 ebuf[ec] = k + '0';
86 ebuf[2] = '\0';
87
88 dspbuf[0] = k + '0';
89 dspbuf[1] = '\0';
90
91 vbank(0);
92 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
93
94 advacur();
95 return(SUCCESS);
96}
[6262b5c]97
98
Note: See TracBrowser for help on using the repository browser.