diff --git a/CHANGES b/CHANGES index c438108..19b0597 100644 --- a/CHANGES +++ b/CHANGES @@ -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 + . + + A patch from Klaus Alexander Seistrup , 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: diff --git a/hist.c b/hist.c index 0004593..83bc797 100644 --- a/hist.c +++ b/hist.c @@ -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 */ diff --git a/version.c b/version.c index 9047438..adef41f 100644 --- a/version.c +++ b/version.c @@ -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" /* test number or empty string if no patch */ /* * calc version constants diff --git a/zmath.c b/zmath.c index 6d4a984..d028999 100644 --- a/zmath.c +++ b/zmath.c @@ -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;