mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +02:00
Bug 101 - Nyquist implementation: (dribble [fname]) function
This commit is contained in:
parent
a7c1906bf5
commit
bcb4bb91c7
@ -862,11 +862,17 @@ nyx_rval nyx_eval_expression(const char *expr_string)
|
|||||||
while (nyx_expr_pos < nyx_expr_len) {
|
while (nyx_expr_pos < nyx_expr_len) {
|
||||||
expr = NULL;
|
expr = NULL;
|
||||||
|
|
||||||
|
// Simulate the prompt
|
||||||
|
stdputstr("> ");
|
||||||
|
|
||||||
// Read an expression
|
// Read an expression
|
||||||
if (!xlread(getvalue(s_stdin), &expr, FALSE)) {
|
if (!xlread(getvalue(s_stdin), &expr, FALSE)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Simulate the prompt
|
||||||
|
ostputc('\n');
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* save the input expression (so the user can refer to it
|
/* save the input expression (so the user can refer to it
|
||||||
as +, ++, or +++) */
|
as +, ++, or +++) */
|
||||||
@ -875,6 +881,9 @@ nyx_rval nyx_eval_expression(const char *expr_string)
|
|||||||
|
|
||||||
// Evaluate the expression
|
// Evaluate the expression
|
||||||
nyx_result = xleval(expr);
|
nyx_result = xleval(expr);
|
||||||
|
|
||||||
|
// Print it
|
||||||
|
stdprint(nyx_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will unwind the xlisp context and restore internals to a point just
|
// This will unwind the xlisp context and restore internals to a point just
|
||||||
@ -1204,12 +1213,14 @@ int ostgetc()
|
|||||||
{
|
{
|
||||||
if (nyx_expr_pos < nyx_expr_len) {
|
if (nyx_expr_pos < nyx_expr_len) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
ostputc(nyx_expr_string[nyx_expr_pos]);
|
||||||
return (nyx_expr_string[nyx_expr_pos++]);
|
return (nyx_expr_string[nyx_expr_pos++]);
|
||||||
}
|
}
|
||||||
else if (nyx_expr_pos == nyx_expr_len) {
|
else if (nyx_expr_pos == nyx_expr_len) {
|
||||||
/* Add whitespace at the end so that the parser
|
/* Add whitespace at the end so that the parser
|
||||||
knows that this is the end of the expression */
|
knows that this is the end of the expression */
|
||||||
nyx_expr_pos++;
|
nyx_expr_pos++;
|
||||||
|
ostputc('\n');
|
||||||
return '\n';
|
return '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user