File: seqfnint.c

package info (click to toggle)
audacity 2.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 86,844 kB
  • sloc: ansic: 225,005; cpp: 221,240; sh: 27,327; python: 16,896; makefile: 8,186; lisp: 8,002; perl: 317; xml: 307; sed: 16
file content (249 lines) | stat: -rw-r--r-- 5,513 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/* nyqsrc/seqfnint.c -- interface to  cmt/seqdecls.h, 
 * nyqsrc/seqext.h, cmt/seq.h, nyqsrc/seqinterf.h, 
 * cmt/seqread.h, cmt/seqmread.h, cmt/seqwrite.h, 
 * cmt/seqmwrite.h */

#ifndef mips
#include "stdlib.h"
#endif
#include "xlisp.h"

extern LVAL s_true;
#define cvboolean(i) ((i) ? s_true : NIL)
#define testarg2(e) (moreargs() ? (e) : (getflonum(xltoofew())))
#define xlgaanynum() (floatp(*xlargv) ? getflonum(nextarg()) : \
    (fixp(*xlargv) ? (double) getfixnum(nextarg()) : \
        getflonum(xlbadtype(*xlargv))))
#define getboolean(lval) ((lval) != NIL)

extern LVAL RSLT_sym;


#include "seqdecls.h"

#include "seqext.h"

#include "seq.h"

/* xlc_seq_reset -- interface to C routine seq_reset */
/**/
LVAL xlc_seq_reset(void)
{
    seq_type arg1 = getseq(xlgaseq());

    xllastarg();
    seq_reset(arg1);
    return NIL;
}


/* xlc_seq_insert_ctrl -- interface to C routine insert_ctrl */
/**/
LVAL xlc_seq_insert_ctrl(void)
{
    seq_type arg1 = getseq(xlgaseq());
    long arg2 = getfixnum(xlgafixnum());
    long arg3 = getfixnum(xlgafixnum());
    long arg4 = getfixnum(xlgafixnum());
    long arg5 = getfixnum(xlgafixnum());
    long arg6 = getfixnum(xlgafixnum());

    xllastarg();
    insert_ctrl(arg1, arg2, arg3, arg4, arg5, arg6);
    return NIL;
}


/* xlc_seq_insert_ramp -- interface to C routine insert_ctrlramp */
/**/
LVAL xlc_seq_insert_ramp(void)
{
    seq_type arg1 = getseq(xlgaseq());
    long arg2 = getfixnum(xlgafixnum());
    long arg3 = getfixnum(xlgafixnum());
    long arg4 = getfixnum(xlgafixnum());
    long arg5 = getfixnum(xlgafixnum());
    long arg6 = getfixnum(xlgafixnum());
    long arg7 = getfixnum(xlgafixnum());
    long arg8 = getfixnum(xlgafixnum());
    long arg9 = getfixnum(xlgafixnum());

    xllastarg();
    insert_ctrlramp(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    return NIL;
}


/* xlc_seq_insert_macctrl -- interface to C routine insert_macctrl */
/**/
LVAL xlc_seq_insert_macctrl(void)
{
    seq_type arg1 = getseq(xlgaseq());
    long arg2 = getfixnum(xlgafixnum());
    long arg3 = getfixnum(xlgafixnum());
    long arg4 = getfixnum(xlgafixnum());
    long arg5 = getfixnum(xlgafixnum());
    long arg6 = getfixnum(xlgafixnum());

    xllastarg();
    insert_macctrl(arg1, arg2, arg3, arg4, arg5, arg6);
    return NIL;
}


/* xlc_seq_insert_note -- interface to C routine insert_note */
/**/
LVAL xlc_seq_insert_note(void)
{
    seq_type arg1 = getseq(xlgaseq());
    long arg2 = getfixnum(xlgafixnum());
    long arg3 = getfixnum(xlgafixnum());
    long arg4 = getfixnum(xlgafixnum());
    long arg5 = getfixnum(xlgafixnum());
    long arg6 = getfixnum(xlgafixnum());
    long arg7 = getfixnum(xlgafixnum());

    xllastarg();
    insert_note(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    return NIL;
}


/* xlc_seq_copy -- interface to C routine seq_copy */
/**/
LVAL xlc_seq_copy(void)
{
    seq_type arg1 = getseq(xlgaseq());
    seq_type result;

    xllastarg();
    result = seq_copy(arg1);
    return cvseq(result);
}


/* xlc_seq_create -- interface to C routine seq_create */
/**/
LVAL xlc_seq_create(void)
{
    seq_type result;

    xllastarg();
    result = seq_create();
    return cvseq(result);
}


#include "seqinterf.h"

/* xlc_seq_next -- interface to C routine seq_next */
/**/
LVAL xlc_seq_next(void)
{
    seq_type arg1 = getseq(xlgaseq());
    boolean result;

    xllastarg();
    result = seq_next(arg1);
    return cvboolean(result);
}


/* xlc_seq_get -- interface to C routine seq_get */
/**/
LVAL xlc_seq_get(void)
{
    seq_type arg1 = getseq(xlgaseq());
    long arg2 = 0;
    long arg3 = 0;
    long arg4 = 0;
    long arg5 = 0;
    long arg6 = 0;
    long arg7 = 0;
    long arg8 = 0;
    LVAL result;

    xllastarg();
    seq_get(arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7, &arg8);
    {	LVAL *next = &getvalue(RSLT_sym);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg2);	next = &cdr(*next);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg3);	next = &cdr(*next);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg4);	next = &cdr(*next);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg5);	next = &cdr(*next);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg6);	next = &cdr(*next);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg7);	next = &cdr(*next);
	*next = cons(NIL, NIL);
	car(*next) = cvfixnum(arg8);
    }
    result = getvalue(RSLT_sym);
    return result;
}


#include "seqread.h"

/* xlc_seq_read -- interface to C routine seq_read */
/**/
LVAL xlc_seq_read(void)
{
    seq_type arg1 = getseq(xlgaseq());
    FILE * arg2 = getfile(xlgastream());

    xllastarg();
    seq_read(arg1, arg2);
    return NIL;
}


#include "seqmread.h"

/* xlc_seq_read_smf -- interface to C routine seq_read_smf */
/**/
LVAL xlc_seq_read_smf(void)
{
    seq_type arg1 = getseq(xlgaseq());
    FILE * arg2 = getfile(xlgastream());

    xllastarg();
    seq_read_smf(arg1, arg2);
    return NIL;
}


#include "seqwrite.h"

/* xlc_seq_write -- interface to C routine seq_write */
/**/
LVAL xlc_seq_write(void)
{
    seq_type arg1 = getseq(xlgaseq());
    FILE * arg2 = getfile(xlgastream());
    int arg3 = getboolean(xlgetarg());

    xllastarg();
    seq_write(arg1, arg2, arg3);
    return NIL;
}


#include "seqmwrite.h"

/* xlc_seq_write_smf -- interface to C routine seq_write_smf */
/**/
LVAL xlc_seq_write_smf(void)
{
    seq_type arg1 = getseq(xlgaseq());
    FILE * arg2 = getfile(xlgastream());

    xllastarg();
    seq_write_smf(arg1, arg2);
    return NIL;
}