Release calc version 2.11.5t2.1

This commit is contained in:
Landon Curt Noll
2001-04-10 16:00:53 -07:00
parent bea726fc16
commit 59837e385c
17 changed files with 342 additions and 196 deletions

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.4 $
* @(#) $Id: intfile.cal,v 29.4 2001/04/08 08:13:10 chongo Exp $
* @(#) $Revision: 29.5 $
* @(#) $Id: intfile.cal,v 29.5 2001/04/10 22:09:34 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/intfile.cal,v $
*
* Under source code control: 2001/03/31 08:13:11
@@ -56,7 +56,7 @@ define file2be(filename)
/*
* open the file for reading
*/
fd = fopen(filename, "r");
fd = fopen(filename, "rb");
if (!isfile(fd)) quit "file2be: cannot open file for reading";
/*
@@ -98,7 +98,7 @@ define file2le(filename)
/*
* open the file for reading
*/
fd = fopen(filename, "r");
fd = fopen(filename, "rb");
if (!isfile(fd)) quit "file2le: cannot open file for reading";
/*
@@ -150,7 +150,7 @@ define be2file(v, filename)
/*
* open the file for writing
*/
fd = fopen(filename, "w");
fd = fopen(filename, "wb");
if (!isfile(fd)) quit "be2file: cannot open file for writing";
/*
@@ -199,7 +199,7 @@ define le2file(v, filename)
/*
* open the file for writing
*/
fd = fopen(filename, "w");
fd = fopen(filename, "wb");
if (!isfile(fd)) quit "le2file: cannot open file for writing";
/*

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.7 $
* @(#) $Id: regress.cal,v 29.7 2001/04/08 10:09:39 chongo Exp $
* @(#) $Revision: 29.8 $
* @(#) $Id: regress.cal,v 29.8 2001/04/10 22:08:20 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $
*
* Under source code control: 1990/02/15 01:50:36
@@ -5118,15 +5118,15 @@ define test_is()
a = assoc();
print '5901: a = assoc()';
if (config("windows")) {
ofd = fopen("NUL:", "r");
print '5902: ofd = fopen("NUL:", "r")';
cfd = fopen("NUL:", "r");
print '5903: cfd = fopen("NUL:", "r")';
ofd = fopen("NUL:", "rb");
print '5902: ofd = fopen("NUL:", "rb")';
cfd = fopen("NUL:", "rb");
print '5903: cfd = fopen("NUL:", "rb")';
} else {
ofd = fopen("/dev/null", "r");
print '5902: ofd = fopen("/dev/null", "r")';
cfd = fopen("/dev/null", "r");
print '5903: cfd = fopen("/dev/null", "r")';
ofd = fopen("/dev/null","rb");
print '5902: ofd = fopen("/dev/null","rb")';
cfd = fopen("/dev/null","rb");
print '5903: cfd = fopen("/dev/null","rb")';
}
fclose(cfd);
print '5904: fclose(cfd)';
@@ -6305,8 +6305,8 @@ define test_blkcpy()
/* blkcpy the last 5 octets of B1 to a new block C */
blkcpy(C = blk(), B1, 5, ,100);
print '6821: blkcpy(C = blk(), B1, 5, ,100);';
blkcpy(C = blk(), B1,5,,100);
print '6821: blkcpy(C = blk(), B1,5,,100);';
vrfy(C == A, '6822: C == A');
/* blkcpy to and from a file */
@@ -6322,8 +6322,8 @@ define test_blkcpy()
blkcpy(fs, A, ,100);
print '6828: blkcpy(fs, A, ,100);';
vrfy(size(fs) == 105, '6829: size(f) == 105');
blkcpy(C = blk(), fs, 2, ,100);
print '6830: blkcpy(C = blk(), fs, 2, ,100)';
blkcpy(C = blk(), fs,2,,100);
print '6830: blkcpy(C = blk(), fs,2,,100)';
vrfy(C == (blk() = {1,2}), '6831: C == (blk() = {1,2}');
/* blkcpy string to a block */

View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.3 $
* @(#) $Id: test4600.cal,v 29.3 2001/04/08 10:09:39 chongo Exp $
* @(#) $Revision: 29.4 $
* @(#) $Id: test4600.cal,v 29.4 2001/04/10 22:09:02 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4600.cal,v $
*
* Under source code control: 1996/07/02 20:04:40
@@ -53,10 +53,10 @@ define stest(str, verbose)
/*
* do file operations
*/
f = fopen("junk4600", "w");
f = fopen("junk4600", "wb");
if (iserror(f)) {
print 'failed';
print '**** fopen("junk4600", "w") failed';
print '**** fopen("junk4600", "wb") failed';
return 1;
}
if (iserror(fputs(f,
@@ -67,9 +67,9 @@ define stest(str, verbose)
print '**** fputs(f, "Fourscore ... failed';
return 1;
}
if (iserror(freopen(f, "r"))) {
if (iserror(freopen(f, "rb"))) {
print 'failed';
print '**** iserror(freopen(f, "r")) failed';
print '**** iserror(freopen(f, "rb")) failed';
return 1;
}
if (iserror(rewind(f))) {
@@ -87,68 +87,35 @@ define stest(str, verbose)
print '**** ftell(f) != 13 failed';
return 1;
}
if (config("windows")) {
if (search(f, "and") != 110) {
print 'failed';
print '**** search(f, "and") != 110 failed';
return 1;
}
if (ftell(f) != 113) {
print 'failed';
print '**** ftell(f) != 113 failed';
return 1;
}
if (!isnull(search(f, "and"))) {
print 'failed';
print '**** !isnull(search(f, "and")) failed';
return 1;
}
if (ftell(f) != 174) {
print 'failed';
print '**** ftell(f) != 174 failed';
return 1;
}
if (rsearch(f, "and") != 110) {
print 'failed';
print '**** rsearch(f, "and") != 110 failed';
return 1;
}
if (ftell(f) != 112) {
print 'failed';
print '**** ftell(f) != 112 failed';
return 1;
}
} else {
if (search(f, "and") != 109) {
print 'failed';
print '**** search(f, "and") != 109 failed';
return 1;
}
if (ftell(f) != 112) {
print 'failed';
print '**** ftell(f) != 112 failed';
return 1;
}
if (!isnull(search(f, "and"))) {
print 'failed';
print '**** !isnull(search(f, "and")) failed';
return 1;
}
if (ftell(f) != 172) {
print 'failed';
print '**** ftell(f) != 172 failed';
return 1;
}
if (rsearch(f, "and") != 109) {
print 'failed';
print '**** rsearch(f, "and") != 109 failed';
return 1;
}
if (ftell(f) != 111) {
print 'failed';
print '**** ftell(f) != 111 failed';
return 1;
}
if (search(f, "and") != 109) {
print 'failed';
print '**** search(f, "and") != 109 failed';
return 1;
}
if (ftell(f) != 112) {
print 'failed';
print '**** ftell(f) != 112 failed';
return 1;
}
if (!isnull(search(f, "and"))) {
print 'failed';
print '**** !isnull(search(f, "and")) failed';
return 1;
}
if (ftell(f) != 172) {
print 'failed';
print '**** ftell(f) != 172 failed';
return 1;
}
if (rsearch(f, "and") != 109) {
print 'failed';
print '**** rsearch(f, "and") != 109 failed';
return 1;
}
if (ftell(f) != 111) {
print 'failed';
print '**** ftell(f) != 111 failed';
return 1;
}
if (iserror(fseek(f, -4, 1))) {
print 'failed';
@@ -206,7 +173,7 @@ define ttest(str, m, n, verbose)
print str:":",:;
}
i = rm("-f", "junk4600");
f = fopen("junk4600", "w");
f = fopen("junk4600", "wb");
if (isnull(n))
n = 4;
@@ -231,7 +198,7 @@ define ttest(str, m, n, verbose)
fflush(f);
if (verbose > 1)
printf("File has size %d\n", pos[i]);
freopen(f, "r");
freopen(f, "rb");
if (size(f) != pos[i]) {
print 'failed';
printf("**** Failure 1 for file size\n");