source: buchla-68k/ram/etttab.c@ 06f6615

Last change on this file since 06f6615 was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Zero redundant declarations.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 =============================================================================
3 etttab.c -- MIDAS tuning editor - tuning table number field handlers
4 Version 3 -- 1988-08-22 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_ttab() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_ttab(int16_t n)
17{
18 sprintf(ebuf, "%d", curtun);
19 ebflag = TRUE;
20
21 return(SUCCESS);
22}
23
24/*
25 =============================================================================
26 ef_ttab() -- parse (unload) the edit buffer
27 =============================================================================
28*/
29
30int16_t ef_ttab(int16_t n)
31{
32 register int16_t i, tmpval;
33
34 ebuf[1] = '\0'; /* terminate the string in ebuf */
35 ebflag = FALSE;
36
37 curtun = ebuf[0] - '0';
38 modtun();
39 settc(22, 54);
40 return(SUCCESS);
41}
42
43/*
44
45*/
46
47/*
48 =============================================================================
49 rd_ttab() -- (re)display the field
50 =============================================================================
51*/
52
53int16_t rd_ttab(int16_t nn)
54{
55 register int16_t n;
56
57 n = nn & 0xFF;
58 sprintf(dspbuf, "%d", curtun);
59
60 vbank(0);
61 vcputsv(tunob, 64, (tunmod ? TDCHGD : tdbox[n][4]), tdbox[n][5],
62 24, 61, dspbuf, 14);
63
64 return(SUCCESS);
65}
66
67/*
68 =============================================================================
69 nd_ttab() -- handle new data entry
70 =============================================================================
71*/
72
73int16_t nd_ttab(int16_t nn, int16_t k)
74{
75 register int16_t n;
76
77 n = nn & 0xFF;
78
79 ebuf[0] = k + '0';
80 ebuf[1] = '\0';
81
82 dspbuf[0] = k + '0';
83 dspbuf[1] = '\0';
84
85 vbank(0);
86 vcputsv(tunob, 64, TDENTRY, tdbox[n][5], stcrow, stccol, dspbuf, 14);
87
88 return(SUCCESS);
89}
90
Note: See TracBrowser for help on using the repository browser.