Release calc version 2.11.0t6.1

This commit is contained in:
Landon Curt Noll
1999-10-09 02:37:41 -07:00
parent b54d8fc510
commit 2dc364ee9f
9 changed files with 25 additions and 11 deletions

12
CHANGES
View File

@@ -174,6 +174,18 @@ Following is the change from calc version 2.11.0t1 to date:
to correctly hash a V_STR value-type that has an \0 byte to correctly hash a V_STR value-type that has an \0 byte
inside it. inside it.
A patch from Ernest Bowen <ernie@turing.une.edu.au> now defines
special meaning to the first 2 bits of config("lib_debug"):
bit 0 set => messages printed when inputisterminal
bit 1 set => messages printed when reading from a file
The lib/regress.cal regression suite does:
config("lib_debug", -4);
to eliminate lib messages (both bit 0 and bit 1 are not set).
Fixed misc compile warnings and notices. Fixed misc compile warnings and notices.

View File

@@ -164,7 +164,8 @@ endfunc(void)
size += dumpop(&fp->f_opcodes[size]); size += dumpop(&fp->f_opcodes[size]);
} }
} }
if (inputisterminal() || conf->lib_debug >= 0) { if ((inputisterminal() && conf->lib_debug & 1) ||
(!inputisterminal() && conf->lib_debug & 2)) {
printf("%s(", fp->f_name); printf("%s(", fp->f_name);
for (index = 0; index < fp->f_paramcount; index++) { for (index = 0; index < fp->f_paramcount; index++) {
if (index) if (index)
@@ -237,7 +238,8 @@ rmuserfunc(char *name)
return; return;
freenumbers(functions[index]); freenumbers(functions[index]);
free(functions[index]); free(functions[index]);
if (inputisterminal() && conf->lib_debug >= 0) if ((inputisterminal() && conf->lib_debug & 1) ||
(!inputisterminal() && conf->lib_debug & 2))
printf("%s() undefined\n", name); printf("%s() undefined\n", name);
functions[index] = NULL; functions[index] = NULL;
} }

View File

@@ -93,7 +93,7 @@ CONFIG oldstd = { /* backward compatible standard configuration */
FALSE, /* skip duplicate block output lines */ FALSE, /* skip duplicate block output lines */
BLK_BASE_HEX, /* block octet print base */ BLK_BASE_HEX, /* block octet print base */
BLK_FMT_HD_STYLE, /* block output format */ BLK_FMT_HD_STYLE, /* block output format */
0, /* calc library debug level */ 3, /* calc library debug level */
0, /* internal calc debug level */ 0, /* internal calc debug level */
0 /* user defined debug level */ 0 /* user defined debug level */
}; };
@@ -128,7 +128,7 @@ CONFIG newstd = { /* new non-backward compatible configuration */
FALSE, /* skip duplicate block output lines */ FALSE, /* skip duplicate block output lines */
BLK_BASE_HEX, /* block octet print base */ BLK_BASE_HEX, /* block octet print base */
BLK_FMT_HD_STYLE, /* block output format */ BLK_FMT_HD_STYLE, /* block output format */
0, /* calc library debug level */ 3, /* calc library debug level */
0, /* internal calc debug level */ 0, /* internal calc debug level */
0 /* user defined debug level */ 0 /* user defined debug level */
}; };

View File

@@ -58,7 +58,7 @@ c_pzasusb8(char *name, int count, VALUE **vals)
*/ */
h = (USB8 *) z.v; h = (USB8 *) z.v;
for (i=0; i < half_cnt; ++i) { for (i=0; i < half_cnt; ++i) {
printf("%d:\t", i); printf("%ld:\t", i);
for (j=0; j < half_len; ++j) { for (j=0; j < half_len; ++j) {
printf("%02x", (int)(*h++)); printf("%02x", (int)(*h++));
} }

View File

@@ -76,5 +76,5 @@ main(void)
exit(1); exit(1);
} }
/* exit(0); */ /* exit(0); */
return 0; return 0;
} }

2
hash.c
View File

@@ -604,7 +604,7 @@ hash_str(int type, char *str, HASH *state)
*/ */
return state; return state;
} }
/* /*
* hash_STR - hash a STRING * hash_STR - hash a STRING

View File

@@ -12,7 +12,7 @@ If you write something that you think is useful, please send it to:
By convention, a lib file only defines and/or initializes functions, By convention, a lib file only defines and/or initializes functions,
objects and variables. (The regress.cal and testxxx.cal regression test objects and variables. (The regress.cal and testxxx.cal regression test
suite is an exception.) Also by convention, an additional usage message suite is an exception.) Also by convention, an additional usage message
regarding important object and functions is printed. regarding important object and functions is printed.
If a lib file needs to load another lib file, it should use the -once If a lib file needs to load another lib file, it should use the -once
@@ -537,7 +537,7 @@ test3500.cal
testh(str, n, N, verbose) testh(str, n, N, verbose)
test3500(verbose, n, N) test3500(verbose, n, N)
This script is used by regress.cal to test the functions frem, This script is used by regress.cal to test the functions frem,
fcnt, gcdrem. fcnt, gcdrem.
test4000.cal test4000.cal

View File

@@ -28,7 +28,7 @@ global ecnt; /* expected value of errcount() */
ecnt = 0; /* clear expected errcount() value */ ecnt = 0; /* clear expected errcount() value */
initcfg = config("all", "oldstd"); /* set config to startup default */ initcfg = config("all", "oldstd"); /* set config to startup default */
initcfg = config("lib_debug", -1); /* disable lib startup messages */ initcfg = config("lib_debug", -4); /* disable lib startup messages */
initcfg = config("calc_debug", 1); /* enable more internal debugging */ initcfg = config("calc_debug", 1); /* enable more internal debugging */
initcfg = config("all"); /* save state for later use */ initcfg = config("all"); /* save state for later use */

View File

@@ -12,7 +12,7 @@
#define MAJOR_VER 2 /* major version */ #define MAJOR_VER 2 /* major version */
#define MINOR_VER 11 /* minor version */ #define MINOR_VER 11 /* minor version */
#define MAJOR_PATCH 0 /* patch level or 0 if no patch */ #define MAJOR_PATCH 0 /* patch level or 0 if no patch */
#define MINOR_PATCH "6" /* test number or empty string if no patch */ #define MINOR_PATCH "6.1" /* test number or empty string if no patch */
/* /*
* calc version constants * calc version constants