source: buchla-68k/ram/etstrn.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
Line 
1/*
2 =============================================================================
3 etstrn.c -- section edit group transposition field handlers
4 Version 3 -- 1989-11-14 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_strn() -- load edit buffer
13 =============================================================================
14*/
15
16int16_t et_strn(int16_t n)
17{
18 sprintf(ebuf, "%c%02d", grptran < 0 ? '-' : '+', abs(grptran));
19
20 ebflag = TRUE;
21
22 return(SUCCESS);
23}
24
25/*
26
27*/
28
29/*
30 =============================================================================
31 ef_strn() -- parse edit buffer
32 =============================================================================
33*/
34
35int16_t ef_strn(int16_t n)
36{
37 register int16_t ival;
38
39 ebuf[3] = '\0';
40 ival = ((ebuf[1] - '0') * 10) + (ebuf[2] - '0');
41
42 ebflag = FALSE;
43
44 if ((ival NE 0) AND (ebuf[0] EQ '-'))
45 ival = -ival;
46
47 grptran = ival;
48
49 return(SUCCESS);
50}
51
52/*
53 =============================================================================
54 rd_strn() -- redisplay field
55 =============================================================================
56*/
57
58int16_t rd_strn(int16_t n)
59{
60 sprintf(dspbuf, "%c%02d", grptran < 0 ? '-' : '+', abs(grptran));
61
62 if (v_regs[5] & 0x0180)
63 vbank(0);
64
65 vputs(obj8, 7, 22, dspbuf, SDMENUBG);
66
67 return(SUCCESS);
68}
69
70/*
71
72*/
73
74/*
75 =============================================================================
76 nd_strn() -- data entry
77 =============================================================================
78*/
79
80int16_t nd_strn(int16_t n, int16_t k)
81{
82 register int16_t ec;
83
84 if (sdmctl NE 4)
85 return(FAILURE);
86
87 if ((vtccol GE 22) AND (vtccol LE 24))
88 ec = vtccol - 22;
89 else
90 return(FAILURE);
91
92 if (ec EQ 0) {
93
94 if (k EQ 8)
95 k = '-';
96 else if (k EQ 9)
97 k = '+';
98 else
99 return(FAILURE);
100 } else
101 k += '0';
102
103 ebuf[ec] = k;
104
105 if (v_regs[5] & 0x0180)
106 vbank(0);
107
108 vputc(obj8, 7, vtccol, k, (SDBGMM | (SD_ENTR << 4)));
109
110 if (vtccol < 24) {
111
112 ++vtccol;
113 vtxval = CTOX(vtccol);
114 ttcpos(vtcrow, vtccol);
115 }
116
117 return(SUCCESS);
118}
119
Note: See TracBrowser for help on using the repository browser.