source: buchla-68k/orig/RAM/ETTTAB.C@ 6888aa2

Last change on this file since 6888aa2 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

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