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

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

Zero redundant declarations.

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[f40a309]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
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_ttab() -- load the edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_ttab(int16_t n)
[f40a309]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
[7258c6a]30int16_t ef_ttab(int16_t n)
[f40a309]31{
[7258c6a]32 register int16_t i, tmpval;
[f40a309]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*/
[7258c6a]52
[f40a309]53int16_t rd_ttab(int16_t nn)
[7258c6a]54{
[f40a309]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*/
[7258c6a]72
[f40a309]73int16_t nd_ttab(int16_t nn, int16_t k)
[7258c6a]74{
[f40a309]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);
[6262b5c]89}
90
Note: See TracBrowser for help on using the repository browser.