1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

Update Nyquist to v3.09.

This commit is contained in:
Leland Lucius
2015-04-07 22:10:17 -05:00
parent f88b27e6d8
commit 9fb0ce5b82
358 changed files with 26327 additions and 7043 deletions

View File

@@ -4,7 +4,6 @@
Permission is granted for unrestricted non-commercial use */
/* CHANGELOG:
23 Apr 11 (Dannenberg/Crook) xlrand() now retuns zero on zero range.
8 Oct 90 (Dannenberg) changed main() to xlisp_main_init and xlisp_main.
made xlisp run as a module that evaluates expressions and
retains state
@@ -77,12 +76,12 @@ long random() {
/* xlrand - return next random number in sequence */
long xlrand (long range) {
if (range == 0) return 0;
if (range == 0) return 0;
#ifdef USE_RAND
return rand() % range;
return rand() % range;
#endif
#ifdef USE_RANDOM
return random() % range;
return random() % range;
#endif
}
@@ -117,6 +116,22 @@ void xlisp_main_init(int argc, char *argv[])
case 'V':
verbose = TRUE;
break;
case 'r':
case 'R':
secure_read_path = &argv[i][2];
break;
case 'w':
case 'W':
safe_write_path = &argv[i][2];
break;
case 'l':
case 'L':
run_time_limit = atoi(&argv[i][2]);
break;
case 'm':
case 'M':
memory_limit = atoi(&argv[i][2]);
break;
}
#endif
@@ -125,9 +140,9 @@ void xlisp_main_init(int argc, char *argv[])
/* setup initialization error handler */
xlbegin(&cntxt,CF_TOPLEVEL|CF_CLEANUP|CF_BRKLEVEL,(LVAL)1);
if (setjmp(cntxt.c_jmpbuf))
if (_setjmp(cntxt.c_jmpbuf))
xlfatal("fatal initialization error");
if (setjmp(top_level))
if (_setjmp(top_level))
xlfatal("RESTORE not allowed during initialization");
/* initialize xlisp */
@@ -149,17 +164,17 @@ void xlisp_main_init(int argc, char *argv[])
}
/* load "init.lsp" */
if (setjmp(cntxt.c_jmpbuf) == 0) {
if (_setjmp(cntxt.c_jmpbuf) == 0) {
xlload("init.lsp",TRUE,FALSE);
}
/* load any files mentioned on the command line */
if (setjmp(cntxt.c_jmpbuf) == 0)
if (_setjmp(cntxt.c_jmpbuf) == 0)
for (i = 1; i < argc; i++)
if (argv[i][0] != '-' && !xlload(argv[i],TRUE,verbose))
xlerror("can't load file",cvstring(argv[i]));
xlend(&cntxt);
if (setjmp(top_level))
if (_setjmp(top_level))
xlfatal("RESTORE not allowed out of read-eval-print loop");
}
@@ -173,7 +188,7 @@ LVAL xlisp_eval(LVAL expr)
if (in_a_context == FALSE) {
/* create an execution context */
xlbegin(&cntxt,CF_TOPLEVEL|CF_CLEANUP|CF_BRKLEVEL,s_true);
if (setjmp(cntxt.c_jmpbuf)) {
if (_setjmp(cntxt.c_jmpbuf)) {
setvalue(s_evalhook,NIL);
setvalue(s_applyhook,NIL);
xltrcindent = 0;
@@ -207,7 +222,7 @@ void xlisp_main()
in_a_context = TRUE;
/* target for restore */
if (setjmp(top_level))
if (_setjmp(top_level))
xlbegin(&cntxt,CF_TOPLEVEL|CF_CLEANUP|CF_BRKLEVEL,s_true);
/* protect some pointers */
@@ -217,7 +232,7 @@ void xlisp_main()
for (xl_main_loop = TRUE; xl_main_loop;) {
/* setup the error return */
if (setjmp(cntxt.c_jmpbuf)) {
if (_setjmp(cntxt.c_jmpbuf)) {
setvalue(s_evalhook,NIL);
setvalue(s_applyhook,NIL);
xltrcindent = 0;
@@ -283,7 +298,7 @@ void xlevsave(LVAL expr)
}
/* xlfatal - print a fatal error message and exit */
void xlfatal(char *msg)
void xlfatal(const char *msg)
{
oserror(msg);
xlisp_wrapup();