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

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

Use standard integer types.

  • Property mode set to 100644
File size: 2.1 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 "stddefs.h"
9#include "fields.h"
10#include "vsdd.h"
11#include "vsddsw.h"
12#include "graphdef.h"
13
14#include "midas.h"
15#include "tundsp.h"
16
17extern uint16_t *tunob;
18
19extern int16_t stcrow, stccol;
20extern int16_t curtun, tunmod;
21
22extern int16_t tdbox[][8];
23
24extern int8_t dspbuf[];
25
26/*
27
28*/
29
30/*
31 =============================================================================
32 et_ttab() -- load the edit buffer
33 =============================================================================
34*/
35
36int16_t et_ttab(int16_t n)
37{
38 sprintf(ebuf, "%d", curtun);
39 ebflag = TRUE;
40
41 return(SUCCESS);
42}
43
44/*
45 =============================================================================
46 ef_ttab() -- parse (unload) the edit buffer
47 =============================================================================
48*/
49
50int16_t ef_ttab(int16_t n)
51{
52 register int16_t i, tmpval;
53
54 ebuf[1] = '\0'; /* terminate the string in ebuf */
55 ebflag = FALSE;
56
57 curtun = ebuf[0] - '0';
58 modtun();
59 settc(22, 54);
60 return(SUCCESS);
61}
62
63/*
64
65*/
66
67/*
68 =============================================================================
69 rd_ttab() -- (re)display the field
70 =============================================================================
71*/
72
73int16_t rd_ttab(int16_t nn)
74{
75 register int16_t n;
76
77 n = nn & 0xFF;
78 sprintf(dspbuf, "%d", curtun);
79
80 vbank(0);
81 vcputsv(tunob, 64, (tunmod ? TDCHGD : tdbox[n][4]), tdbox[n][5],
82 24, 61, dspbuf, 14);
83
84 return(SUCCESS);
85}
86
87/*
88 =============================================================================
89 nd_ttab() -- handle new data entry
90 =============================================================================
91*/
92
93int16_t nd_ttab(int16_t nn, int16_t k)
94{
95 register int16_t n;
96
97 n = nn & 0xFF;
98
99 ebuf[0] = k + '0';
100 ebuf[1] = '\0';
101
102 dspbuf[0] = k + '0';
103 dspbuf[1] = '\0';
104
105 vbank(0);
106 vcputsv(tunob, 64, TDENTRY, tdbox[n][5], stcrow, stccol, dspbuf, 14);
107
108 return(SUCCESS);
109}
Note: See TracBrowser for help on using the repository browser.