source: buchla-68k/ram/etstrn.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.2 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 (void)n;
19
20 sprintf(ebuf, "%c%02d", grptran < 0 ? '-' : '+', abs(grptran));
21
22 ebflag = TRUE;
23
24 return(SUCCESS);
25}
26
27/*
28 =============================================================================
29 ef_strn() -- parse edit buffer
30 =============================================================================
31*/
32
33int16_t ef_strn(int16_t n)
34{
35 register int16_t ival;
36
37 (void)n;
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 (void)n;
61
62 sprintf(dspbuf, "%c%02d", grptran < 0 ? '-' : '+', abs(grptran));
63
64 if (v_regs[5] & 0x0180)
65 vbank(0);
66
67 vputs(obj8, 7, 22, dspbuf, SDMENUBG);
68
69 return(SUCCESS);
70}
71
72/*
73 =============================================================================
74 nd_strn() -- data entry
75 =============================================================================
76*/
77
78int16_t nd_strn(int16_t n, int16_t k)
79{
80 register int16_t ec;
81
82 (void)n;
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.