source: buchla-68k/ram/etsnbt.c@ 0acb7d0

Last change on this file since 0acb7d0 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
RevLine 
[f40a309]1/*
2 =============================================================================
3 etsnbt.c -- beat field handlers
4 Version 4 -- 1988-07-28 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_snbt() -- load edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_snbt(int16_t n)
[f40a309]17{
[7258c6a]18 register int32_t curfr, beat;
[f40a309]19
[7ecfb7b]20 (void)n;
21
[f40a309]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
[7258c6a]43int16_t ef_snbt(int16_t n)
[f40a309]44{
[7258c6a]45 register int32_t ival;
46 register int16_t i;
[f40a309]47
[7ecfb7b]48 (void)n;
49
[f40a309]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
[7258c6a]76int16_t rd_snbt(int16_t n)
[f40a309]77{
[7258c6a]78 register int32_t curfr, beat;
79 int8_t buf[8];
[f40a309]80
[7ecfb7b]81 (void)n;
82
[f40a309]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
[7258c6a]101int16_t nd_snbt(int16_t n, int16_t k)
[f40a309]102{
[7258c6a]103 register int16_t ec;
[f40a309]104
[7ecfb7b]105 (void)n;
106
[f40a309]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}
[6262b5c]121
Note: See TracBrowser for help on using the repository browser.