source: buchla-68k/ram/etwpnt.c@ e4a1376

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 etwpnt.c -- waveshape editor - point number field handlers
4 Version 8 -- 1987-12-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_wpnt() -- load the edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_wpnt(int16_t n)
[f40a309]17{
[7ecfb7b]18 (void)n;
19
[f40a309]20 sprintf(ebuf, "%03d", curwpnt);
21 ebflag = TRUE;
22
23 return(SUCCESS);
24}
25
26/*
27 =============================================================================
28 ef_wpnt() -- parse (unload) the edit buffer
29 =============================================================================
30*/
31
[7258c6a]32int16_t ef_wpnt(int16_t n)
[f40a309]33{
[7258c6a]34 register int16_t i, tmpval;
[f40a309]35
[7ecfb7b]36 (void)n;
37
[f40a309]38 ebuf[3] = '\0'; /* terminate the string in ebuf */
39 ebflag = FALSE;
40
41 tmpval = 0;
42
43 for (i = 0; i < 3; i++) /* convert from ASCII to binary */
44 tmpval = (tmpval * 10) + (ebuf[i] - '0');
45
46 if (tmpval GE NUMWPNT)
47 return(FAILURE);
48
49 curwpnt = tmpval;
50 newws();
51 wdswin(4);
52 return(SUCCESS);
53}
54
55/*
56 =============================================================================
57 rd_wpnt() -- (re)display the field
58 =============================================================================
59*/
60
[7258c6a]61int16_t rd_wpnt(int16_t nn)
[f40a309]62{
[7258c6a]63 register int16_t n;
[f40a309]64
65 n = nn & 0xFF;
66 sprintf(dspbuf, "%03d", curwpnt);
67
68 vbank(0);
69 vcputsv(waveob, 64, wdbox[n][4], wdbox[n][5],
70 wdbox[n][6], wdbox[n][7] + WPNT_OFF, dspbuf, 14);
71
72 return(SUCCESS);
73}
74
75/*
76 =============================================================================
77 nd_wpnt() -- handle new data entry
78 =============================================================================
79*/
80
[7258c6a]81int16_t nd_wpnt(int16_t nn, int16_t k)
[f40a309]82{
[7258c6a]83 register int16_t ec, n;
[f40a309]84
85 n = nn & 0xFF;
86 ec = stccol - cfetp->flcol; /* setup edit buffer column */
87 ebuf[ec] = k + '0';
88 ebuf[3] = '\0';
89
90 dspbuf[0] = k + '0';
91 dspbuf[1] = '\0';
92
93 vbank(0);
94
95 vcputsv(waveob, 64, WS_ENTRY, wdbox[n][5],
96 wdbox[n][6], stccol, dspbuf, 14);
97
98 advwcur();
99
100 return(SUCCESS);
101}
[6262b5c]102
Note: See TracBrowser for help on using the repository browser.