mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
256 lines
6.8 KiB
Plaintext
256 lines
6.8 KiB
Plaintext
If you notice something wrong, strange or broken, try rereading:
|
|
|
|
README.FIRST
|
|
HOWTO.INSTALL
|
|
BUGS (this file)
|
|
|
|
If that does not help, cd to the calc source directory and try:
|
|
|
|
make check
|
|
|
|
Look at the end of the output, it should say something like:
|
|
|
|
9998: passed all tests /\../\
|
|
9999: Ending regression tests
|
|
|
|
If it does not, then something is really broken!
|
|
|
|
If you made and modifications to calc beyond the simple Makefile
|
|
configuration, try backing them out and see if things get better.
|
|
|
|
To be sure that your version of calc is up to date, check out:
|
|
|
|
http://reality.sgi.com/chongo/tech/comp/calc/calc-download.html
|
|
|
|
The calc web site is located at:
|
|
|
|
http://reality.sgi.com/chongo/tech/comp/calc
|
|
|
|
=-=
|
|
|
|
If you have tried all of the above and things still are not right,
|
|
then it may be time to send in a bug report. You can send bug reports to:
|
|
|
|
calc-tester@postofc.corp.sgi.com
|
|
|
|
When you send your report, please include the following information:
|
|
|
|
* a description of the problem
|
|
|
|
* the version of calc you are using (if you cannot get calc
|
|
it to run, then send us the 4 #define lines from version.c)
|
|
|
|
* if you modified calc from an official patch, send me the mods you made
|
|
|
|
* the type of system you were using
|
|
|
|
* the type of compiler you were using
|
|
|
|
* any compiler warnings or errors that you saw
|
|
|
|
* cd to the calc source directory, and type:
|
|
|
|
make debug > debug.out 2>&1 (sh, ksh, bash users)
|
|
make debug >& debug.out (csh, tcsh users)
|
|
|
|
and send the contents of the 'debug.out' file.
|
|
|
|
Stack traces from core dumps are useful to send as well.
|
|
|
|
=-=
|
|
|
|
Send any comments, compiler warning messages, suggestions and most
|
|
importantly, fixes (in the form of a context diff patch) to:
|
|
|
|
calc-tester@postofc.corp.sgi.com
|
|
|
|
=-=
|
|
|
|
Known bugs:
|
|
|
|
* When compiled on some Big Endian machines with BASEB forced to
|
|
be 16 (by setting LONGLONG_BITS= 0 in the Makefile), calc fails
|
|
a number of regression tests:
|
|
|
|
4230: n = ftell(f)
|
|
4231: isnull(fputs(f,L,"\n",C,"\n",N,"\n"))
|
|
4232: fseek(f, n)
|
|
**** Non-true result (0): 4233: fgetstr(f) == LCN
|
|
4234: isnull(fclose(f))
|
|
4235: a = exp(27, 1e-1000)
|
|
4236: b = sqrt(7 + 5i, 1e-2000)
|
|
4252: fscanf(f, "%*[^|]%*c%n%*[^[]%*c%n", m, n) == 2
|
|
4253: fseek(f, m)
|
|
4254: fscanf(f, "%3c", x) == 1
|
|
**** Non-true result (0): 4255: x == " Cu"
|
|
4256: fseek(f, n)
|
|
4257: fscanf(f, "%s", y) == 1
|
|
**** Non-true result (0): 4258: y == "Noll"
|
|
4259: isnull(fclose(f))
|
|
4260: x = rm("junk4200")
|
|
4261: Ending test_fileops
|
|
4600: Beginning test_fileop
|
|
4601: ttest(0,0): passed
|
|
4602: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4603: ttest(1,1): failed
|
|
**** Failure 2 for i = 0
|
|
4604: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4605: ttest(2,2): failed
|
|
**** Failure 2 for i = 0
|
|
4606: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4607: ttest(3,3): failed
|
|
**** Failure 2 for i = 0
|
|
4608: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4609: ttest(4,4): failed
|
|
**** Failure 2 for i = 0
|
|
4610: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4611: ttest(5,5): failed
|
|
**** Failure 2 for i = 0
|
|
4612: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4613: ttest(6,6): failed
|
|
**** Failure 2 for i = 0
|
|
4614: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4615: ttest(7,7): failed
|
|
**** Failure 2 for i = 0
|
|
4616: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4617: ttest(8,8): failed
|
|
**** Failure 2 for i = 0
|
|
4618: stest(): failed
|
|
**** search(f, "and") != 10 failed
|
|
4619: ttest(9,9): failed
|
|
**** Failure 1 for file size
|
|
4620: stest(): failed
|
|
**** fopen("junk4600", "w") failed
|
|
4621: Ending test_fileop
|
|
|
|
4700: Beginning test_charset
|
|
**** errcount:172 > ecnt:150
|
|
4701: "\a" == char(7)
|
|
4702: "\v" == char(11)
|
|
4703: "\e" == char(27)
|
|
5000: Beginning test_filesearch
|
|
5001: x = rm("-f", "junk5000")
|
|
5002: f = fopen("junk5000", "w")
|
|
**** Unable to open "junk5000" for writing
|
|
|
|
5100: Beginning test_newdecl
|
|
5101: test5100(1)
|
|
**** errcount:173 > ecnt:172
|
|
5102: a5100 == 0
|
|
5103: b5100 == 2
|
|
5104: test5100(1)
|
|
5927: test unused
|
|
5928: test unused
|
|
5929: test unused
|
|
**** errcount:180 > ecnt:177
|
|
5930: isassoc(loc) == 0
|
|
5931: isassoc(a) == 1
|
|
5932: isassoc(ofd) == 0
|
|
6079: test unused
|
|
6080: iserror(loc) == 0
|
|
6081: iserror(a) == 0
|
|
**** Non-true result (0): 6082: iserror(ofd) == 0
|
|
**** Non-true result (0): 6083: iserror(cfd) == 0
|
|
6084: iserror(blk) == 0
|
|
6085: iserror(nblk) == 0
|
|
6086: iserror(cfg) == 0
|
|
6139: test unused
|
|
6140: isfile(loc) == 0
|
|
6141: isfile(a) == 0
|
|
**** Non-true result (0): 6142: isfile(ofd) == 1
|
|
**** Non-true result (0): 6143: isfile(cfd) == 1
|
|
6144: isfile(blk) == 0
|
|
6145: isfile(nblk) == 0
|
|
6146: isfile(cfg) == 0
|
|
|
|
6700: Beginning test_blk
|
|
6701: A = blk(20);
|
|
**** errcount:181 > ecnt:180
|
|
6702: size(A) == 20
|
|
6703: sizeof(A) == 256
|
|
6704: B = A;
|
|
6822: C == A
|
|
6823: fs = fopen("junk6800", "w+");
|
|
6824: blkcpy(fs, A);
|
|
**** errcount:183 > ecnt:181
|
|
**** Non-true result (0): 6825: size(f) == 5
|
|
6826: blkcpy(B = blk(), fs);
|
|
**** errcount:184 > ecnt:183
|
|
**** Non-true result (0): 6827: B == A
|
|
6828: blkcpy(fs, A, ,100);
|
|
**** errcount:185 > ecnt:184
|
|
**** Non-true result (0): 6829: size(f) == 105
|
|
6830: blkcpy(C = blk(), fs, 2, ,100)
|
|
**** errcount:186 > ecnt:185
|
|
**** Non-true result (0): 6831: C == (blk() = {1,2}
|
|
6832: A = blk();
|
|
6833: blkcpy(A, "blk6800");
|
|
6834: size(A) == 9
|
|
6900: Beginning test_name
|
|
6901: x = rm("-f", "junk6900")
|
|
6902: f = fopen("junk6900", "w")
|
|
**** errcount:189 > ecnt:186
|
|
**** Non-true result (0): 6903: name(f) == "junk6900"
|
|
6904: fclose(f)
|
|
**** errcount:190 > ecnt:189
|
|
6905: name(f) == null()
|
|
6906: A = blk("blk6900")
|
|
6907: name(A) == "blk6900"
|
|
7002: B = blk();
|
|
7003: copy("abc yz", A);
|
|
7004: copy("defg", B);
|
|
**** errcount:191 > ecnt:190
|
|
7005: strprintf("%s", A) == "abc yz"
|
|
7006: strprintf("%s", A[2]) == "c yz"
|
|
7007: strprintf("%s", A[7]) == ""
|
|
|
|
9995: freeredc()
|
|
9996: freestatics()
|
|
**** 24 error(s) found \/++\/
|
|
|
|
We are sure some more bugs exist. When you find them, please let
|
|
us know! See the above for details on how to report and were to
|
|
EMail your bug reports and hopefully patches to fix them.
|
|
|
|
=-=
|
|
|
|
Calc Mis-features:
|
|
|
|
* The following shell command (written in sh,ksh,bash-like form) works:
|
|
|
|
calc '/*
|
|
* comment
|
|
*/
|
|
print 2+3;'
|
|
|
|
However this (also written in sh,ksh,bash-like form) does not work:
|
|
|
|
echo '/*
|
|
* comment
|
|
*/
|
|
print 2+3;' | calc
|
|
|
|
The 2nd example will result in an 'Unterminated comment' error.
|
|
|
|
* Calc does not support the #! exec method. For example of the
|
|
following is placed in an executable file (assume the path to
|
|
calc is correct) called /tmp/xyzzy:
|
|
|
|
#!/usr/local/bin/calc
|
|
/*
|
|
* comment
|
|
*/
|
|
print 2+3;
|
|
|
|
Will result in '"tmp" is undefined' and '"xyzzy" is undefined'
|
|
error messages because calc considers $0 as an expression to
|
|
evaluate.
|