source: buchla-68k/ram/etsnbt.c@ 1efe224

Last change on this file since 1efe224 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 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
20 if (clkrun) {
21
22 ebflag = FALSE;
23 return(FAILURE);
24 }
25
26 curfr = t_cur;
27 beat = curfr / 48;
28
29 sprintf(ebuf, "%05ld", beat);
30 ebflag = TRUE;
31
32 return(SUCCESS);
33}
34
35/*
36 =============================================================================
37 ef_snbt() -- parse edit buffer
38 =============================================================================
39*/
40
[7258c6a]41int16_t ef_snbt(int16_t n)
[f40a309]42{
[7258c6a]43 register int32_t ival;
44 register int16_t i;
[f40a309]45
46 if (clkrun)
47 return(FAILURE);
48
49 ival = 0L;
50
51 for (i = 0; i < 5; i++)
52 ival = (ival * 10) + (ebuf[i] - '0');
53
54 ebflag = FALSE;
55
56 if (insmode) {
57
58 icancel();
59 dsimode();
60 }
61
62 sc_goto(fc_val = ival * 48L);
63 return(SUCCESS);
64}
65
66/*
67
68*/
69
70/*
71 =============================================================================
72 rd_snbt() -- (re)display the field
73 =============================================================================
74*/
[7258c6a]75
[f40a309]76int16_t rd_snbt(int16_t n)
[7258c6a]77{
78 register int32_t curfr, beat;
[f40a309]79 int8_t buf[8];
80
81 curfr = t_cur;
82 beat = curfr / 48;
83 sprintf(buf, "%05ld", beat);
84
85 if (v_regs[5] & 0x0180)
86 vbank(0);
87
88 vputs(obj8, 0, 11, buf, SDW00ATR);
89
90 return(SUCCESS);
91}
92
93/*
94
95*/
96
97/*
98 =============================================================================
99 nd_snbt() -- data entry function
100 =============================================================================
[7258c6a]101*/
[f40a309]102
[7258c6a]103int16_t nd_snbt(int16_t n, int16_t k)
[f40a309]104{
105 register int16_t ec;
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
[6262b5c]119 return(SUCCESS);
120}
121
Note: See TracBrowser for help on using the repository browser.