Release calc version 2.11.0t9.4.2

This commit is contained in:
Landon Curt Noll
1999-11-09 05:29:05 -08:00
parent 7cb0a77c25
commit 82ff31f246
22 changed files with 457 additions and 127 deletions

140
CHANGES
View File

@@ -2,14 +2,14 @@ Following is the change from calc version 2.11.0t8.9.1 to date:
The config("verbose_quit") will control the printing of the message:
Quit or abort executed
Quit or abort executed
when a non-interactive ABORT, QUIT or EXIT is encounted. By default,
config("verbose_quit") is TRUE and the message is printed. If one does:
when a non-interactive ABORT, QUIT or EXIT is encounted. By default,
config("verbose_quit") is TRUE and the message is printed. If one does:
config("verbose_quit", 0)
config("verbose_quit", 0)
the message is disabled.
the message is disabled.
Added 8400 regression test set and test8400.cal to test the new
quit and config("verbose_quit") functionality.
@@ -33,34 +33,34 @@ Following is the change from calc version 2.11.0t8.9.1 to date:
When prompt() occurs while reading a file, it will take input from
the terminal rather than taking it from a file. For example:
/* This demonstrates the use of prompt() and some other things */
config("verbose_quit", 0);
define getnumber() {
local x;
for (;;) {
x = eval(prompt(">>> "));
if (isnum(x))
return x;
print "Not a number! Try again";
/* This demonstrates the use of prompt() and some other things */
config("verbose_quit", 0);
define getnumber() {
local x;
for (;;) {
x = eval(prompt(">>> "));
if (isnum(x))
return x;
print "Not a number! Try again";
}
}
}
print "This will display the sqrt of each number you enter";
print "Enter quit to stop";
for (;;) {
print sqrt(getnumber());
}
print "Good bye";
print "This will display the sqrt of each number you enter";
print "Enter quit to stop";
for (;;) {
print sqrt(getnumber());
}
print "Good bye";
Comments entered at input terminal level may be spread over several
lines. For example:
Comments entered at input terminal level may be spread over several
lines. For example:
/*
* Assume that this calc script is called: comment.cal
* Then these commands now work:
* cat comment.cal | calc
* calc < comment.cal
*/
print "Hello";
/*
* Assume that this calc script is called: comment.cal
* Then these commands now work:
* cat comment.cal | calc
* calc < comment.cal
*/
print "Hello";
Added:
@@ -95,21 +95,20 @@ Following is the change from calc version 2.11.0t8.9.1 to date:
GNU-readline. Note that GNU-readline is not shipped with calc.
His patch only provides the hooks to use it. One must comment out:
USE_READLINE=
READLINE_LIB=
READLINE_INCLUDE=
USE_READLINE=
READLINE_LIB=
READLINE_INCLUDE=
and comment in:
and comment in:
USE_READLINE= -DUSE_READLINE
READLINE_LIB= -lreadline -lhistory
READLINE_INCLUDE= -I/usr/include/readline
USE_READLINE= -DUSE_READLINE
READLINE_LIB= -lreadline -lhistory
READLINE_INCLUDE= -I/usr/include/readline
in addition to pre-installing GNU-readline in your system to use
this facility.
in addition to pre-installing GNU-readline in your system to use
this facility.
Changed the "object already defined" math_error message to a
scanerror message.
Changed the "object already defined" math_error to a scanerror message.
Removed the limit on the number of object types.
@@ -154,6 +153,65 @@ Following is the change from calc version 2.11.0t8.9.1 to date:
Fixed the URLs found thruout the source and documentation which did
not and in /, but should for performance and server load reasons.
Cleaned up and improved handling of "mat" and "obj". The comma in:
mat A[2], B[3];
is changed to whatever is appropriate in the context:
+ comma operator
+ separator of arguments in a function call
+ separator of arguments in a defintion
etc.
The expression (mat A[2]), B[3] returns B[3], assuming B already
exists as something created by a statement like: global mat B[4].
What used to be done by the expression:
mat A[2], B[3]
will now require something like:
mat A[2], mat B[3] or A = mat[2], B = mat[3]
For example, if obj point and obj pair are known types, the
following is now allowed:
L = list(mat[2], mat[3], obj point, obj pair)
As another example, the following is allowed:
define f(a = mat[2] = {3,4}) = 5 * a;
as well as the following:
obj point {x,y}, PP = obj pair {A,B} = {obj point, obj point}
which creates two object types at compile time and when executed,
assigns a pair-object value to a variable PP.
Fixed a bug whereby a for loop would behave incorrectly. For example:
config("trace", 2),
global x;
define f() {for ( ; x > 0; x--) {print x;}}
x = 5, f()
will stop after printing 1 instead of looping forever.
Added values l_format, which when CHECK_L_FORMAT is defined ahead
of including longlong.h will help detect when a system can deal with
'long long' but not '%lld' in printf. If a system with 'long long'
uses '%ld' to print a 64 bit value, then l_format will be > 0;
othewise if "%lld" is required, l_format will be < 0.
Added HAVE_STRDUP Makefile variable as well as the have_strdup.c
program that forms the have_strdup.h file. The have_strdup.h file
will define HAVE_STRDUP is the system has strdup(). If HAVE_STRDUP
is not defined, then calc will use calc_strdup() to simulate
the real strdup() function.
Following is the change from calc version 2.11.0t8 to 2.11.0t8.9: