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

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

Point of no return.

  • 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 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 et_ttab(short 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
50short ef_ttab(short n)
51{
52 register short 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
73short rd_ttab(short nn)
74{
75 register short 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
93short nd_ttab(short nn, short k)
94{
95 register short 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.