source: buchla-68k/ram/etsnbt.c@ 3fcb810

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 =============================================================================
3 etsnbt.c -- beat field handlers
4 Version 4 -- 1988-07-28 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_snbt() -- load edit buffer
13 =============================================================================
14*/
15
16int16_t et_snbt(int16_t n)
17{
18 register int32_t curfr, beat;
19
20 (void)n;
21
22 if (clkrun) {
23
24 ebflag = FALSE;
25 return(FAILURE);
26 }
27
28 curfr = t_cur;
29 beat = curfr / 48;
30
31 sprintf(ebuf, "%05ld", beat);
32 ebflag = TRUE;
33
34 return(SUCCESS);
35}
36
37/*
38 =============================================================================
39 ef_snbt() -- parse edit buffer
40 =============================================================================
41*/
42
43int16_t ef_snbt(int16_t n)
44{
45 register int32_t ival;
46 register int16_t i;
47
48 (void)n;
49
50 if (clkrun)
51 return(FAILURE);
52
53 ival = 0L;
54
55 for (i = 0; i < 5; i++)
56 ival = (ival * 10) + (ebuf[i] - '0');
57
58 ebflag = FALSE;
59
60 if (insmode) {
61
62 icancel();
63 dsimode();
64 }
65
66 sc_goto(fc_val = ival * 48L);
67 return(SUCCESS);
68}
69
70/*
71 =============================================================================
72 rd_snbt() -- (re)display the field
73 =============================================================================
74*/
75
76int16_t rd_snbt(int16_t n)
77{
78 register int32_t curfr, beat;
79 int8_t buf[8];
80
81 (void)n;
82
83 curfr = t_cur;
84 beat = curfr / 48;
85 sprintf(buf, "%05ld", beat);
86
87 if (v_regs[5] & 0x0180)
88 vbank(0);
89
90 vputs(obj8, 0, 11, buf, SDW00ATR);
91
92 return(SUCCESS);
93}
94
95/*
96 =============================================================================
97 nd_snbt() -- data entry function
98 =============================================================================
99*/
100
101int16_t nd_snbt(int16_t n, int16_t k)
102{
103 register int16_t ec;
104
105 (void)n;
106
107 if (clkrun)
108 return(FAILURE);
109
110 ec = stccol - cfetp->flcol;
111 ebuf[ec] = k + '0';
112
113 if (v_regs[5] & 0x0180)
114 vbank(0);
115
116 vputc(obj8, 0, stccol, k + '0', SDW00DEA);
117 advscur();
118
119 return(SUCCESS);
120}
121
Note: See TracBrowser for help on using the repository browser.