Compare commits

...

2 Commits

Author SHA1 Message Date
Landon Curt Noll
6254c4a14c Release calc version 2.11.0t10.1.1 2017-05-21 15:38:34 -07:00
Landon Curt Noll
c7c0de97f2 Release calc version 2.11.0t10.1 2017-05-21 15:38:34 -07:00
6 changed files with 24 additions and 14 deletions

View File

@@ -3,6 +3,14 @@ The following are the changes from calc version 2.11.0t10 to date:
Misc code cleanup. Removed dead code. Removed trailing whitespace.
Fixed whitespace to make the best use of 8 character tabs.
Fixed some bugs relaing to '// and %' in combination with some
of the the rounding modes based on a patch from Ernest Bowen
<ernie@turing.une.edu.au>.
A patch from Klaus Alexander Seistrup <klaus@seistrup.dk>, when
used in combination with the GNU-readline facility, will prevent
it from saving empty lines.
The following are the changes from calc version 2.11.0t8.9.1 to 2.11.0t9.4.5:

2
hist.c
View File

@@ -1523,7 +1523,7 @@ hist_saveline(char *line, int len)
{
static char *prev = NULL;
if (!len)
if (len <= 1)
return;
/* ignore if identical with previous line */

View File

@@ -2,11 +2,11 @@ To load a library, try:
read filename
You to not need to add the .cal extension to the filename. Calc
You do not need to add the .cal extension to the filename. Calc
will search along the $CALCPATH (see ``help environment'').
Normally a library will simply define some functions. By default,
most libraries will print out a short message when thei are read.
most libraries will print out a short message when they are read.
For example:
> read lucas
@@ -360,7 +360,7 @@ randbitrun.cal
randbitrun([run_cnt])
Using randbit(1) to generate a sequence of random bits, determine if
the number and kength of identical bits runs match what is expected.
the number and length of identical bits runs match what is expected.
By default, run_cnt is to test the next 65536 random values.
This tests the a55 generator.
@@ -416,7 +416,7 @@ randrun.cal
regress.cal
Test the correct execution of the calculator by reading this library file.
Errors are reported with '****' mssages, or worse. :-)
Errors are reported with '****' messages, or worse. :-)
seedrandom.cal

View File

@@ -3048,8 +3048,8 @@ define test_error()
print '3712: e9999 = error(9999)';
vrfy(errno() == 9999, '3713: errno() == 9999');
vrfy(error() == e9999, '3714: error() == e9999');
vrfy(strerror() == "Unknown error 9999",
'3715: strerror() == "Unknown error 9999"');
vrfy(substr(strerror(), strlen(strerror())-3, 4) == "9999",
'3715: substr(strerror(), strlen(strerror())-3, 4) == "9999"');
x = newerror("Alpha");
print '3716: x = newerror("Alpha")';
n = iserror(x);
@@ -3060,17 +3060,19 @@ define test_error()
vrfy(errno(9999) == n, '3721: errno() == n');
vrfy(errno() == 9999, '3722: errno() == 9999');
vrfy(error() == e9999, '3723: error() == e9999');
vrfy(strerror() == "Unknown error 9999",
'3724: strerror() == "Unknown error 9999"');
vrfy(substr(strerror(), strlen(strerror())-3, 4) == "9999",
'3724: substr(strerror(), strlen(strerror())-3, 4) == "9999"');
a = 1/0;
print '3725: a = 1/0';
vrfy(strerror() == "Division by zero",
'3726: strerror() == "Division by zero"');
vrfy(substr(strerror(9941), strlen(strerror(9941))-3, 4) == "9941",
'3728: substr(strerror(9941), strlen(strerror(9941))-3, 4) == "9941"');
/* errmax and errcount should be bumped up the 148 errors above */
vrfy(errcount() == ecnt, '3727: errcount() == ecnt');
vrfy(errcount() == ecnt, '3728: errcount() == ecnt');
print '3728: Ending test_error';
print '3729: Ending test_error';
}
print '054: parsed test_error()';

View File

@@ -18,7 +18,7 @@ static char *program;
#define MAJOR_VER 2 /* major version */
#define MINOR_VER 11 /* minor version */
#define MAJOR_PATCH 0 /* patch level or 0 if no patch */
#define MINOR_PATCH "10" /* test number or empty string if no patch */
#define MINOR_PATCH "10.1.1" /* test number or empty string if no patch */
/*
* calc version constants

View File

@@ -735,9 +735,9 @@ done: while (m > 0 && A[m - 1] == 0)
if (s) {
while (--i > 0) {
g = (FULL) *--a + (*--b >> 1 | f);
f = *b & 1 ? TOPHALF : 0;
if (g != BASE1)
break;
f = *b & 1 ? TOPHALF : 0;
}
if (g == BASE && f == 0) {
while ((--i > 0) && ((*--a | *--b) == 0));
@@ -748,9 +748,9 @@ done: while (m > 0 && A[m - 1] == 0)
} else {
while (--i > 0) {
g = (FULL) *--a - (*--b >> 1 | f);
f = *b & 1 ? TOPHALF : 0;
if (g != 0)
break;
f = *b & 1 ? TOPHALF : 0;
}
if (g > 0 && g < BASE)
t = 1;