mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Checkpoint on calc version 2.12.8.0
Fixed a mistake in "help intro" where some inserted text changed the value of "." and thus made the next result incorrect. Clarified in "help factor" that 1 is returned if no factor below the limit was found. Removed Makefile variable ${MAKEFILE_REV}. The missing cscript/square.calc file has been restored. Fixed compiler errors and warnings related to GCC. In particular, gcc/9.3.1 and gcc/10.2.1 now compile calc without any compiler errors or warnings, even with -Werror -Wextra -pedantic. To print out information about the calc compliation environment, we added the following make rule: make calcinfo Improved how 'make debug' operates. Moved help/contrib to CONTRIB-CODE. The help/contrib file is now build from a copy of CONTRIB-CODE. Created a new calc bug report Email address. Created a new calc question Email address. Created a new calc contribution Email address. See the BUGS file for details. Added "help questions" to print the QUESIONS help file. If the environment variable $CALCHELP is defined and is non-empty, then calc help files will be in the direcgory by the $CALCHISTFILE environment variable. If the environment variable $CALCCUSTOMHELP is defined and is non-empty, then custom calc help files will be in the direcgory by the $CALCCUSTOMHELP environment variable. The calc-tester mailing list has been retired. See: * How to submit a calc bug report: http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html * How to contribute code to calc: http://www.isthe.com/chongo/tech/comp/calc/calc-contrib.html * How to submit a question about calc: http://www.isthe.com/chongo/tech/comp/calc/calc-question.html
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -65,6 +65,7 @@ help/bugs
|
|||||||
help/builtin
|
help/builtin
|
||||||
help/change
|
help/change
|
||||||
help/changes
|
help/changes
|
||||||
|
help/contrib
|
||||||
help/copy
|
help/copy
|
||||||
help/cscript
|
help/cscript
|
||||||
help/custom_cal
|
help/custom_cal
|
||||||
@@ -76,6 +77,8 @@ help/funclist.c
|
|||||||
help/libcalc
|
help/libcalc
|
||||||
help/man
|
help/man
|
||||||
help/new_custom
|
help/new_custom
|
||||||
|
help/question
|
||||||
|
help/questions
|
||||||
help/resource
|
help/resource
|
||||||
help/type
|
help/type
|
||||||
help/usage
|
help/usage
|
||||||
|
154
BUGS
154
BUGS
@@ -1,12 +1,12 @@
|
|||||||
If you notice something wrong, strange or broken, try rereading:
|
If you notice something wrong, strange or broken, try rereading:
|
||||||
|
|
||||||
README.FIRST
|
README.FIRST
|
||||||
HOWTO.INSTALL
|
HOWTO.INSTALL
|
||||||
BUGS (this file)
|
BUGS (this file)
|
||||||
|
|
||||||
If that does not help, cd to the calc source directory and try:
|
If that does not help, cd to the calc source directory and try:
|
||||||
|
|
||||||
make check
|
make check
|
||||||
|
|
||||||
Look at the end of the output, it should say something like:
|
Look at the end of the output, it should say something like:
|
||||||
|
|
||||||
@@ -15,67 +15,108 @@ Look at the end of the output, it should say something like:
|
|||||||
|
|
||||||
If it does not, then something is really broken!
|
If it does not, then something is really broken!
|
||||||
|
|
||||||
|
To be sure that your version of calc is up to date, check out:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-mirror.html
|
||||||
|
|
||||||
If you made and modifications to calc beyond the simple Makefile
|
If you made and modifications to calc beyond the simple Makefile
|
||||||
configuration, try backing them out and see if things get better.
|
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:
|
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.
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-download.html
|
|
||||||
|
|
||||||
The calc web site is located at:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/index.html
|
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
If you have tried all of the above and things still are not right,
|
The BEST WAY TO SEND IN A BUG REPORT is via calc GitHub issue URL:
|
||||||
then it may be time to send in a bug report. You can send bug
|
|
||||||
and bug fixes reports to:
|
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
https://github.com/lcn2/calc/issues
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
If you see an existing issue that matches your problem, look
|
||||||
|
over the notes and if needed, add your own observation,
|
||||||
|
even if you just add to an existing issue:
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
I have this issue too
|
||||||
|
|
||||||
To be sure we see your EMail reporting a calc bug, please use the
|
If you don't see your issue addressed, then on the above
|
||||||
following phase in your EMail Subject line:
|
GitHub web page, click on this button:
|
||||||
|
|
||||||
calc bug report
|
((New Issue))
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your request
|
=-=
|
||||||
will get past our anti-spam filters. You may have additional
|
|
||||||
words in your subject line.
|
|
||||||
|
|
||||||
However, you may find it more helpful to simply subscribe
|
If you prefer to not use GitHub, then you
|
||||||
to the calc-tester mailing list (see below) and then to
|
may send bug and bug fixes reports to:
|
||||||
send your report to that mailing list as a wider set calc
|
|
||||||
testers may be able to help you.
|
|
||||||
|
|
||||||
When you send your report, please include the following information:
|
calc-bugrept-mail at asthe dot com
|
||||||
|
|
||||||
* a description of the problem
|
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
||||||
* the version of calc you are using (if you cannot get calc
|
|
||||||
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)
|
NOTE: This replaces the old calc-bugs at asthe dot com address.
|
||||||
make debug >& debug.out (csh, tcsh users)
|
|
||||||
|
|
||||||
and send the contents of the 'debug.out' file.
|
PLEASE put following the SPECIAL PHRASE somewhere in your Email Subject line:
|
||||||
|
|
||||||
Stack traces from core dumps are useful to send as well.
|
calc bug report
|
||||||
|
|
||||||
Fell free to use the above address to send in big fixes (in the form
|
You may add additional words to your subject line.
|
||||||
|
|
||||||
|
Suggestion:
|
||||||
|
|
||||||
|
From time to time, the Email address and Subject SPECIAL PHRASE
|
||||||
|
may change so verify you have the current info by visiting:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
|
||||||
|
|
||||||
|
IMPORTANT:
|
||||||
|
|
||||||
|
PLEASE use the above SPECIAL PHRASE somewhere in the Subject line or
|
||||||
|
the mail system won't deliver your Email message.
|
||||||
|
|
||||||
|
Keep in mind that the best way to report on a calc bug is
|
||||||
|
via the above mentioned calc GitHub issue URL.
|
||||||
|
|
||||||
|
Please be patient as we cannot always respond to Email messages quickly.
|
||||||
|
|
||||||
|
=-=
|
||||||
|
|
||||||
|
When you send your report, via the calc GitHub issue URL or Email,
|
||||||
|
please include the following information:
|
||||||
|
|
||||||
|
* A description of the problem
|
||||||
|
|
||||||
|
* Version of calc you are using
|
||||||
|
|
||||||
|
If you cannot compile calc, then look at version.c
|
||||||
|
and report the #define that start with:
|
||||||
|
|
||||||
|
#define MAJOR_VER
|
||||||
|
#define MINOR_VER
|
||||||
|
#define MAJOR_PATCH
|
||||||
|
#define MINOR_PATCH
|
||||||
|
|
||||||
|
* If you modified calc from an official patch,
|
||||||
|
send us the mods you made
|
||||||
|
|
||||||
|
* Type and version of the operating system
|
||||||
|
|
||||||
|
* Type and version of compiler
|
||||||
|
|
||||||
|
* Send us all compiler warnings or errors you find
|
||||||
|
|
||||||
|
* If calc dumped core, try to send us a core dump stack trace
|
||||||
|
|
||||||
|
* cd to the calc source directory, and send the contents
|
||||||
|
of debug.out produced by this command:
|
||||||
|
|
||||||
|
make debug > debug.out 2>&1
|
||||||
|
|
||||||
|
Fell free to use the above address to send in bug fixes (in the form
|
||||||
of a context diff patch).
|
of a context diff patch).
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
Known bugs:
|
Known bugs in calc:
|
||||||
|
|
||||||
|
Under macOS, the installation of the calc man page fails.
|
||||||
|
|
||||||
The output of the alg_config.cal resource file is bogus.
|
The output of the alg_config.cal resource file is bogus.
|
||||||
We would welcome a replacement for this code.
|
We would welcome a replacement for this code.
|
||||||
@@ -130,7 +171,7 @@ Known bugs:
|
|||||||
|
|
||||||
We are sure some more bugs exist. When you find them, please let
|
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
|
us know! See the above for details on how to report and were to
|
||||||
EMail your bug reports and hopefully patches to fix them.
|
Email your bug reports and hopefully patches to fix them.
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
@@ -183,32 +224,7 @@ mis-features in calc:
|
|||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
## Copyright (C) 1999-2014,2021 Landon Curt Noll
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
## Copyright (C) 1999-2014 Landon Curt Noll
|
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
92
CHANGES
92
CHANGES
@@ -1,4 +1,61 @@
|
|||||||
The following are the changes from calc version 2.12.7.1 to date:
|
The following are the changes from calc version 2.12.8.0 to date:
|
||||||
|
|
||||||
|
Fixed a mistake in "help intro" where some inserted text
|
||||||
|
changed the value of "." and thus made the next result
|
||||||
|
incorrect.
|
||||||
|
|
||||||
|
Clarified in "help factor" that 1 is returned if no
|
||||||
|
factor below the limit was found.
|
||||||
|
|
||||||
|
Removed Makefile variable ${MAKEFILE_REV}.
|
||||||
|
|
||||||
|
The missing cscript/square.calc file has been restored.
|
||||||
|
|
||||||
|
Fixed compiler errors and warnings related to GCC.
|
||||||
|
In particular, gcc/9.3.1 and gcc/10.2.1 now compile
|
||||||
|
calc without any compiler errors or warnings,
|
||||||
|
even with -Werror -Wextra -pedantic.
|
||||||
|
|
||||||
|
To print out information about the calc compliation
|
||||||
|
environment, we added the following make rule:
|
||||||
|
|
||||||
|
make calcinfo
|
||||||
|
|
||||||
|
Improved how 'make debug' operates.
|
||||||
|
|
||||||
|
Moved help/contrib to CONTRIB-CODE. The help/contrib file
|
||||||
|
is now build from a copy of CONTRIB-CODE.
|
||||||
|
|
||||||
|
Created a new calc bug report Email address. Created a new calc
|
||||||
|
question Email address. Created a new calc contribution Email
|
||||||
|
address. See the BUGS file for details.
|
||||||
|
|
||||||
|
Added "help questions" to print the QUESIONS help file.
|
||||||
|
|
||||||
|
If the environment variable $CALCHELP is defined and is non-empty,
|
||||||
|
then calc help files will be in the direcgory by the $CALCHISTFILE
|
||||||
|
environment variable.
|
||||||
|
|
||||||
|
If the environment variable $CALCCUSTOMHELP is defined and is
|
||||||
|
non-empty, then custom calc help files will be in the direcgory
|
||||||
|
by the $CALCCUSTOMHELP environment variable.
|
||||||
|
|
||||||
|
The calc-tester mailing list has been retired. See:
|
||||||
|
|
||||||
|
* How to submit a calc bug report:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
|
||||||
|
|
||||||
|
* How to contribute code to calc:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-contrib.html
|
||||||
|
|
||||||
|
* How to submit a question about calc:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-question.html
|
||||||
|
|
||||||
|
|
||||||
|
The following are the changes from calc version 2.12.7.1 to 2.12.7.5:
|
||||||
|
|
||||||
Corrected CHANGES notes that were mixed up for TAB, VT, CR &
|
Corrected CHANGES notes that were mixed up for TAB, VT, CR &
|
||||||
NL. The code in 2.12.7.0 is correct. The CHANGE notes should
|
NL. The code in 2.12.7.0 is correct. The CHANGE notes should
|
||||||
@@ -54,7 +111,7 @@ The following are the changes from calc version 2.12.7.1 to date:
|
|||||||
some specific regexes is enough to disable the warning.
|
some specific regexes is enough to disable the warning.
|
||||||
Fixed spaces vs tabs and use FALLTHRU as it's used elsewhere.
|
Fixed spaces vs tabs and use FALLTHRU as it's used elsewhere.
|
||||||
Fixed one FALLTHRU comment that was inconsistent with others.
|
Fixed one FALLTHRU comment that was inconsistent with others.
|
||||||
<<thanks jcul>>
|
<<GitHub jcul>>
|
||||||
|
|
||||||
Fixed minor typo on help/power. <<GitHub thegithubr>>
|
Fixed minor typo on help/power. <<GitHub thegithubr>>
|
||||||
|
|
||||||
@@ -64,7 +121,7 @@ The following are the changes from calc version 2.12.7.1 to date:
|
|||||||
by the $CALCHISTFILE environment variable.
|
by the $CALCHISTFILE environment variable.
|
||||||
|
|
||||||
Calc as defined 0^0 as 1. However in the past, 0 raised to
|
Calc as defined 0^0 as 1. However in the past, 0 raised to
|
||||||
an expression that evaluted to zero returned 1. The result
|
an expression that evaluated to zero returned 1. The result
|
||||||
was that 0^0 was different than 0^(6-6) or even 0^(0).
|
was that 0^0 was different than 0^(6-6) or even 0^(0).
|
||||||
Now, calc will return 1 for 0^(0) and 0^zero when zero == 0.
|
Now, calc will return 1 for 0^(0) and 0^zero when zero == 0.
|
||||||
|
|
||||||
@@ -413,32 +470,6 @@ The following are the changes from calc version 2.12.5.1 to 2.12.5.2:
|
|||||||
|
|
||||||
The following are the changes from calc version 2.12.5.0 to 2.12.5.1:
|
The following are the changes from calc version 2.12.5.0 to 2.12.5.1:
|
||||||
|
|
||||||
Calc has a new calc-tester mailing list. This list is for those
|
|
||||||
who are using/testing calc. We also use this list to announce
|
|
||||||
new versions of calc. To subscribe to the calc-tester mailing
|
|
||||||
list, visit the following URL:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send Email to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
address. To be sure we see your Email asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
Email Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
There is a new calc bug report Email address:
|
There is a new calc bug report Email address:
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
calc-bug-report at asthe dot com
|
||||||
@@ -2763,7 +2794,6 @@ The following are the changes from calc version 2.11.2t0 to 2.11.2t1.0:
|
|||||||
Using calc-bugs at asthe dot com for calc bug reports,
|
Using calc-bugs at asthe dot com for calc bug reports,
|
||||||
calc-contrib at asthe dot com for calc contributions,
|
calc-contrib at asthe dot com for calc contributions,
|
||||||
calc-tester-request at asthe dot com for requests to join calc-tester and
|
calc-tester-request at asthe dot com for requests to join calc-tester and
|
||||||
calc-tester at asthe dot com for the calc tester mailing list.
|
|
||||||
|
|
||||||
Replaced explicit Email addresses found this file with the <user at
|
Replaced explicit Email addresses found this file with the <user at
|
||||||
site dot domain> notation to reduce the potential for those folks
|
site dot domain> notation to reduce the potential for those folks
|
||||||
@@ -7503,7 +7533,7 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1:
|
|||||||
|
|
||||||
A small bug in the library file regress.cal was fixed.
|
A small bug in the library file regress.cal was fixed.
|
||||||
|
|
||||||
## Copyright (C) 2001-2017 Landon Curt Noll
|
## Copyright (C) 2001-2017,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
100
CONTRIB-CODE
Normal file
100
CONTRIB-CODE
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
Calc is open source. Contributions of code are welcome.
|
||||||
|
|
||||||
|
We welcome and encourage you to send us:
|
||||||
|
|
||||||
|
* calc resource files (cal/*.cal files)
|
||||||
|
* calc shell scripts (cscript/*.calc files)
|
||||||
|
* builtin functions that you have modified or written, i.e.:
|
||||||
|
assocfunc.c comfunc.c func.c func.h
|
||||||
|
listfunc.c matfunc.c qfunc.c zfunc.c
|
||||||
|
* custom functions that you have modified or written
|
||||||
|
* help files modified or written (help/*)
|
||||||
|
* Makefile improvements (Makefile, */Makefile)
|
||||||
|
* other source code modifications (*.c, *.h)
|
||||||
|
* etc. (* */* :) )
|
||||||
|
|
||||||
|
In order to consider integrating your code, we need:
|
||||||
|
|
||||||
|
* calc version you are working with (please try use the latest version)
|
||||||
|
* new help files or help file patches, if applicable (documentation)
|
||||||
|
* proposed text for the CHANGES file (brief description of what it does)
|
||||||
|
* regress.cal test patch as needed
|
||||||
|
* your source code and/or source code changes (:-))
|
||||||
|
|
||||||
|
If you add functionality to calc, please be sure to modify/patch/add
|
||||||
|
Makefiles, help files, cal/regress.cal test code as well.
|
||||||
|
Regression test cases are vital to maintaining calc's level
|
||||||
|
of correctness and helps us avoid code bug regression.
|
||||||
|
|
||||||
|
Please try to generate a patch against the most recent
|
||||||
|
version of calc, and if you use GitHub, the top of the
|
||||||
|
master branch:
|
||||||
|
|
||||||
|
https://github.com/lcn2/calc
|
||||||
|
|
||||||
|
The best way contribute to calc bug is to generate calc
|
||||||
|
GitHub pull request:
|
||||||
|
|
||||||
|
https://github.com/lcn2/calc/pulls
|
||||||
|
|
||||||
|
Your code needs to be contributed under either the 2.1 of the GNU
|
||||||
|
Lesser General Public License (LGPL 2.1) or in the public domain.
|
||||||
|
|
||||||
|
If you do not want to use calc GitHub, then send Email to:
|
||||||
|
|
||||||
|
calc-contrib-mail at asthe dot com
|
||||||
|
|
||||||
|
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
||||||
|
|
||||||
|
You MUST use following SPECIAL PHRASE in your Email Subject line:
|
||||||
|
|
||||||
|
calc contribution
|
||||||
|
|
||||||
|
You may add additional words to your subject line.
|
||||||
|
|
||||||
|
Suggestion:
|
||||||
|
|
||||||
|
From time to time, the Email address and Subject SPECIAL PHRASE
|
||||||
|
may change so verify you have the current info by visiting:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-contrib.html
|
||||||
|
|
||||||
|
IMPORTANT: If your Email doesn't contain the above phrase,
|
||||||
|
then we WILL NOT SEE your Email.
|
||||||
|
|
||||||
|
PLEASE BE SURE you have that SPECIAL PHRASE somewhere in the subject line!
|
||||||
|
|
||||||
|
Keep in mind that the best way to report on a calc bug is to use
|
||||||
|
the above mentioned calc GitHub procedure.
|
||||||
|
|
||||||
|
Please be patient as we cannot always respond to Email messages quickly.
|
||||||
|
|
||||||
|
=-=
|
||||||
|
|
||||||
|
See also the calc wishlist by running the calc command:
|
||||||
|
|
||||||
|
; help wishlist
|
||||||
|
|
||||||
|
=-=
|
||||||
|
|
||||||
|
## Copyright (C) 1999,2014,2021 Landon Curt Noll
|
||||||
|
##
|
||||||
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
## as published by the Free Software Foundation.
|
||||||
|
##
|
||||||
|
## Calc is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||||
|
## Public License for more details.
|
||||||
|
##
|
||||||
|
## A copy of version 2.1 of the GNU Lesser General Public License is
|
||||||
|
## distributed with calc under the filename COPYING-LGPL. You should have
|
||||||
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
##
|
||||||
|
## Under source code control: 1997/03/09 16:33:22
|
||||||
|
## File existed as early as: 1997
|
||||||
|
##
|
||||||
|
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||||
|
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
59
COPYING
59
COPYING
@@ -49,65 +49,6 @@ Calc is covered by the GNU Lesser General Public License
|
|||||||
Boston, MA 02110-1301
|
Boston, MA 02110-1301
|
||||||
USA
|
USA
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
-=-
|
|
||||||
|
|
||||||
Calc bug reports and calc bug fixes should be sent to:
|
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
|
||||||
|
|
||||||
To be sure we see your EMail reporting a calc bug, please use the
|
|
||||||
following phase in your EMail Subject line:
|
|
||||||
|
|
||||||
calc bug report
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
However, you may find it more helpful to simply subscribe
|
|
||||||
to the calc-tester mailing list (see above) and then to
|
|
||||||
send your report to that mailing list as a wider set calc
|
|
||||||
testers may be able to help you.
|
|
||||||
|
|
||||||
-=-
|
|
||||||
|
|
||||||
The calc web site is located at:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/
|
|
||||||
|
|
||||||
NOTE: The EMail address uses 'asthe', while the web site uses 'isthe'.
|
|
||||||
|
|
||||||
-=-
|
|
||||||
|
|
||||||
Calc's relationship to the GNU Lesser General Public License
|
Calc's relationship to the GNU Lesser General Public License
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
9
Makefile
9
Makefile
@@ -8,7 +8,6 @@
|
|||||||
# comments, this Makefile differs from the non-rpm bzip2-ed tarball
|
# comments, this Makefile differs from the non-rpm bzip2-ed tarball
|
||||||
# source Makefile in the following ways:
|
# source Makefile in the following ways:
|
||||||
#
|
#
|
||||||
# MAKEFILE_REV= $$Revision: 30.26 $$
|
|
||||||
# CCWERR= -Werror
|
# CCWERR= -Werror
|
||||||
# USE_READLINE= -DUSE_READLINE
|
# USE_READLINE= -DUSE_READLINE
|
||||||
# READLINE_LIB= -lreadline -lhistory -lncurses
|
# READLINE_LIB= -lreadline -lhistory -lncurses
|
||||||
@@ -710,6 +709,9 @@ chk:
|
|||||||
#
|
#
|
||||||
# debug
|
# debug
|
||||||
#
|
#
|
||||||
|
# make calcinfo:
|
||||||
|
# * print information about the host ane compile environment
|
||||||
|
#
|
||||||
# make env:
|
# make env:
|
||||||
# * print major Makefile variables
|
# * print major Makefile variables
|
||||||
#
|
#
|
||||||
@@ -727,6 +729,11 @@ chk:
|
|||||||
# * compile without optimizers to make debugging easier
|
# * compile without optimizers to make debugging easier
|
||||||
##
|
##
|
||||||
|
|
||||||
|
calcinfo:
|
||||||
|
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
|
||||||
|
${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR}
|
||||||
|
${V} echo '=-=-=-=-= private Makefile $@ rule end =-=-=-=-='
|
||||||
|
|
||||||
env:
|
env:
|
||||||
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
|
${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-='
|
||||||
${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR}
|
${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR}
|
||||||
|
124
Makefile.ship
124
Makefile.ship
@@ -23,7 +23,7 @@
|
|||||||
# READLINE_LIB= -lreadline
|
# READLINE_LIB= -lreadline
|
||||||
# READLINE_EXTRAS= -lhistory -lncurses
|
# READLINE_EXTRAS= -lhistory -lncurses
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2018 Landon Curt Noll
|
# Copyright (C) 1999-2018,2021 Landon Curt Noll
|
||||||
#
|
#
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
# Calc is open software; you can redistribute it and/or modify it under
|
||||||
# the terms of version 2.1 of the GNU Lesser General Public License
|
# the terms of version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -39,8 +39,6 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
MAKEFILE_REV= $$Revision: 30.88 $$
|
|
||||||
#
|
|
||||||
# Under source code control: 1990/02/15 01:48:41
|
# Under source code control: 1990/02/15 01:48:41
|
||||||
# File existed as early as: before 1990
|
# File existed as early as: before 1990
|
||||||
#
|
#
|
||||||
@@ -1028,7 +1026,8 @@ LD_DEBUG=
|
|||||||
#
|
#
|
||||||
# CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.:./custom DYLD_LIBRARY_PATH=.
|
# CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.:./custom DYLD_LIBRARY_PATH=.
|
||||||
#
|
#
|
||||||
CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=. DYLD_LIBRARY_PATH=.
|
CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=. DYLD_LIBRARY_PATH=. CALCHELP=./help \
|
||||||
|
CALCCUSTOMHELP=./custom
|
||||||
#CALC_ENV= CALCPATH=./cal DYLD_LIBRARY_PATH=. \
|
#CALC_ENV= CALCPATH=./cal DYLD_LIBRARY_PATH=. \
|
||||||
# MALLOC_VERBOSE=1 MALLOC_TRACING=1 \
|
# MALLOC_VERBOSE=1 MALLOC_TRACING=1 \
|
||||||
# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 LD_LIBRARY_PATH=.:./custom
|
# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 LD_LIBRARY_PATH=.:./custom
|
||||||
@@ -1054,7 +1053,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.12.7.6
|
VERSION= 2.12.8.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
@@ -1064,34 +1063,39 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION}
|
|||||||
# standard utilities used during make
|
# standard utilities used during make
|
||||||
#
|
#
|
||||||
SHELL= /bin/sh
|
SHELL= /bin/sh
|
||||||
LANG= C
|
AR= ar
|
||||||
MAKE= make
|
|
||||||
AWK= awk
|
AWK= awk
|
||||||
SED= sed
|
CAT= cat
|
||||||
DIFF= diff
|
|
||||||
GREP= egrep
|
|
||||||
SORT= sort
|
|
||||||
TEE= tee
|
|
||||||
CTAGS= ctags
|
|
||||||
CHMOD= chmod
|
CHMOD= chmod
|
||||||
FMT= fmt
|
|
||||||
XARGS= xargs
|
|
||||||
CMP= cmp
|
CMP= cmp
|
||||||
|
CO= co
|
||||||
|
COL= col
|
||||||
|
CP= cp
|
||||||
|
CTAGS= ctags
|
||||||
|
DATE= date
|
||||||
|
DIFF= diff
|
||||||
|
FMT= fmt
|
||||||
|
GREP= egrep
|
||||||
|
HOSTNAME= hostname
|
||||||
|
LANG= C
|
||||||
|
LDCONFIG= ldconfig
|
||||||
|
LN= ln
|
||||||
|
MAKE= make
|
||||||
MKDIR= mkdir
|
MKDIR= mkdir
|
||||||
|
MV= mv
|
||||||
|
PWDCMD= pwd
|
||||||
|
RM= rm
|
||||||
|
RMDIR= rmdir
|
||||||
|
SED= sed
|
||||||
|
SORT= sort
|
||||||
SPLINT= splint
|
SPLINT= splint
|
||||||
SPLINT_OPTS=
|
SPLINT_OPTS=
|
||||||
RM= rm
|
TEE= tee
|
||||||
TOUCH= touch
|
TOUCH= touch
|
||||||
RMDIR= rmdir
|
|
||||||
CP= cp
|
|
||||||
MV= mv
|
|
||||||
CO= co
|
|
||||||
AR= ar
|
|
||||||
TRUE= true
|
TRUE= true
|
||||||
CAT= cat
|
UNAME= uname
|
||||||
COL= col
|
XARGS= xargs
|
||||||
LN= ln
|
|
||||||
LDCONFIG= ldconfig
|
|
||||||
# assume the X11 makedepend tool for the depend rule
|
# assume the X11 makedepend tool for the depend rule
|
||||||
MAKEDEPEND= makedepend
|
MAKEDEPEND= makedepend
|
||||||
STRIP= strip
|
STRIP= strip
|
||||||
@@ -1202,7 +1206,7 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
|||||||
# #
|
# #
|
||||||
# calc-contrib at asthe dot com #
|
# calc-contrib at asthe dot com #
|
||||||
# #
|
# #
|
||||||
# EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
# Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
||||||
# set of lines so that we can consider them for the next release. #
|
# set of lines so that we can consider them for the next release. #
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
@@ -2084,7 +2088,7 @@ LICENSE= COPYING COPYING-LGPL
|
|||||||
#
|
#
|
||||||
DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README.FIRST \
|
DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README.FIRST \
|
||||||
README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \
|
README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \
|
||||||
sample.README calc.spec.in rpm.mk README.md
|
sample.README calc.spec.in rpm.mk README.md QUESTION CONTRUB
|
||||||
|
|
||||||
# These files are used to make (but not build) a calc .a link library
|
# These files are used to make (but not build) a calc .a link library
|
||||||
#
|
#
|
||||||
@@ -2322,6 +2326,7 @@ calc.1: calc.man ${MAKE_FILE}
|
|||||||
-e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \
|
-e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \
|
||||||
-e 's,$${CUSTOMCALDIR},${CUSTOMCALDIR},g' \
|
-e 's,$${CUSTOMCALDIR},${CUSTOMCALDIR},g' \
|
||||||
-e 's,$${CUSTOMINCDIR},${CUSTOMINCDIR},g' \
|
-e 's,$${CUSTOMINCDIR},${CUSTOMINCDIR},g' \
|
||||||
|
-e 's,$${HELPDIR},${HELPDIR},g' \
|
||||||
-e 's,$${CUSTOMHELPDIR},${CUSTOMHELPDIR},g' \
|
-e 's,$${CUSTOMHELPDIR},${CUSTOMHELPDIR},g' \
|
||||||
-e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1
|
-e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1
|
||||||
${Q} echo calc.1 formed
|
${Q} echo calc.1 formed
|
||||||
@@ -2333,7 +2338,7 @@ calc.usage: calc.1 ${MAKE_FILE}
|
|||||||
LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \
|
LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \
|
||||||
else \
|
else \
|
||||||
${NROFF} -man calc.1; \
|
${NROFF} -man calc.1; \
|
||||||
fi | ${COL} -b > $@
|
fi 2>&1 | ${GREP} -v 'cannot adjust line' | ${COL} -b > $@
|
||||||
${Q} echo calc.usage formed
|
${Q} echo calc.usage formed
|
||||||
|
|
||||||
|
|
||||||
@@ -4033,6 +4038,9 @@ chk: ./cal/regress.cal
|
|||||||
#
|
#
|
||||||
# debug
|
# debug
|
||||||
#
|
#
|
||||||
|
# make calcinfo:
|
||||||
|
# * print information about the host ane compile environment
|
||||||
|
#
|
||||||
# make env:
|
# make env:
|
||||||
# * print major Makefile variables
|
# * print major Makefile variables
|
||||||
#
|
#
|
||||||
@@ -4047,6 +4055,53 @@ chk: ./cal/regress.cal
|
|||||||
# * run the regression tests
|
# * run the regression tests
|
||||||
###
|
###
|
||||||
|
|
||||||
|
calcinfo:
|
||||||
|
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= UNAME=${UNAME} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -a follows =-=-='
|
||||||
|
-@${UNAME} -a
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= HOSTNAME=${HOSTNAME} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
||||||
|
-@${HOSTNAME}
|
||||||
|
@echo '=-=-= end of output of $${HOSTNAME} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= DATE=${DATE} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${DATE} follows =-=-='
|
||||||
|
-@${DATE}
|
||||||
|
@echo '=-=-= end of output of $${DATE} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= LCC=${LCC} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${LCC} -v follows =-=-='
|
||||||
|
-@${LCC} -v
|
||||||
|
@echo '=-=-= end of output of $${LCC} -v =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= PWD=${PWD} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of echo $${PWD} follows =-=-='
|
||||||
|
-@echo ${PWD}
|
||||||
|
@echo '=-=-= end of output of echo $${PWD} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= PWDCMD=${PWDCMD} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${PWDCMD} follows =-=-='
|
||||||
|
-@${PWDCMD}
|
||||||
|
@echo '=-=-= end of output of $${PWDCMD} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= VERSION=${VERSION} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of echo $${VERSION} follows =-=-='
|
||||||
|
-@echo ${VERSION}
|
||||||
|
@echo '=-=-= end of output of echo $${VERSION} =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@echo '=-=-=-=-= dumping major make variables =-=-=-=-='
|
@echo '=-=-=-=-= dumping major make variables =-=-=-=-='
|
||||||
@echo 'ALIGN32=${ALIGN32}'; echo ''
|
@echo 'ALIGN32=${ALIGN32}'; echo ''
|
||||||
@@ -4097,6 +4152,7 @@ env:
|
|||||||
@echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo ''
|
@echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo ''
|
||||||
@echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo ''
|
@echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo ''
|
||||||
@echo 'C_SRC=${C_SRC}'; echo ''
|
@echo 'C_SRC=${C_SRC}'; echo ''
|
||||||
|
@echo 'DATE=${DATE}'; echo ''
|
||||||
@echo 'DEBUG=${DEBUG}'; echo ''
|
@echo 'DEBUG=${DEBUG}'; echo ''
|
||||||
@echo 'DEFAULT_LIB_INSTALL_PATH=${DEFAULT_LIB_INSTALL_PATH}'; echo ''
|
@echo 'DEFAULT_LIB_INSTALL_PATH=${DEFAULT_LIB_INSTALL_PATH}'; echo ''
|
||||||
@echo 'DEV_BITS=${DEV_BITS}'; echo ''
|
@echo 'DEV_BITS=${DEV_BITS}'; echo ''
|
||||||
@@ -4134,6 +4190,7 @@ env:
|
|||||||
@echo 'HAVE_VSNPRINTF=${HAVE_VSNPRINTF}'; echo ''
|
@echo 'HAVE_VSNPRINTF=${HAVE_VSNPRINTF}'; echo ''
|
||||||
@echo 'HELPDIR=${HELPDIR}'; echo ''
|
@echo 'HELPDIR=${HELPDIR}'; echo ''
|
||||||
@echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo ''
|
@echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo ''
|
||||||
|
@echo 'HOSTNAME=${HOSTNAME}'; echo ''
|
||||||
@echo 'H_SRC=${H_SRC}'; echo ''
|
@echo 'H_SRC=${H_SRC}'; echo ''
|
||||||
@echo 'ICFLAGS=${ICFLAGS}'; echo ''
|
@echo 'ICFLAGS=${ICFLAGS}'; echo ''
|
||||||
@echo 'ILDFLAGS=${ILDFLAGS}'; echo ''
|
@echo 'ILDFLAGS=${ILDFLAGS}'; echo ''
|
||||||
@@ -4157,7 +4214,6 @@ env:
|
|||||||
@echo 'LONG_BITS=${LONG_BITS}'; echo ''
|
@echo 'LONG_BITS=${LONG_BITS}'; echo ''
|
||||||
@echo 'MAKE=${MAKE}'; echo ''
|
@echo 'MAKE=${MAKE}'; echo ''
|
||||||
@echo 'MAKEDEPEND=${MAKEDEPEND}'; echo ''
|
@echo 'MAKEDEPEND=${MAKEDEPEND}'; echo ''
|
||||||
@echo 'MAKEFILE_REV=${MAKEFILE_REV}'; echo ''
|
|
||||||
@echo 'MAKE_FILE=${MAKE_FILE}'; echo ''
|
@echo 'MAKE_FILE=${MAKE_FILE}'; echo ''
|
||||||
@echo 'MANDIR=${MANDIR}'; echo ''
|
@echo 'MANDIR=${MANDIR}'; echo ''
|
||||||
@echo 'MANEXT=${MANEXT}'; echo ''
|
@echo 'MANEXT=${MANEXT}'; echo ''
|
||||||
@@ -4170,6 +4226,8 @@ env:
|
|||||||
@echo 'OBJS=${OBJS}'; echo ''
|
@echo 'OBJS=${OBJS}'; echo ''
|
||||||
@echo 'OFF_T_BITS=${OFF_T_BITS}'; echo ''
|
@echo 'OFF_T_BITS=${OFF_T_BITS}'; echo ''
|
||||||
@echo 'PURIFY=${PURIFY}'; echo ''
|
@echo 'PURIFY=${PURIFY}'; echo ''
|
||||||
|
@echo 'PWD=${PWD}'; echo ''
|
||||||
|
@echo 'PWDCMD=${PWDCMD}'; echo ''
|
||||||
@echo 'Q=${Q}'; echo ''
|
@echo 'Q=${Q}'; echo ''
|
||||||
@echo 'RANLIB=${RANLIB}'; echo ''
|
@echo 'RANLIB=${RANLIB}'; echo ''
|
||||||
@echo 'READLINE_EXTRAS=${READLINE_EXTRAS}'; echo ''
|
@echo 'READLINE_EXTRAS=${READLINE_EXTRAS}'; echo ''
|
||||||
@@ -4196,11 +4254,12 @@ env:
|
|||||||
@echo 'TOP_MAKE_FILE=${TOP_MAKE_FILE}'; echo ''
|
@echo 'TOP_MAKE_FILE=${TOP_MAKE_FILE}'; echo ''
|
||||||
@echo 'TOUCH=${TOUCH}'; echo ''
|
@echo 'TOUCH=${TOUCH}'; echo ''
|
||||||
@echo 'TRUE=${TRUE}'; echo ''
|
@echo 'TRUE=${TRUE}'; echo ''
|
||||||
|
@echo 'UNAME=${UNAME}'; echo ''
|
||||||
@echo 'USE_READLINE=${USE_READLINE}'; echo ''
|
@echo 'USE_READLINE=${USE_READLINE}'; echo ''
|
||||||
@echo 'UTIL_C_SRC=${UTIL_C_SRC}'; echo ''
|
@echo 'UTIL_C_SRC=${UTIL_C_SRC}'; echo ''
|
||||||
|
@echo 'UTIL_FILES=${UTIL_FILES}'; echo ''
|
||||||
@echo 'UTIL_MISC_SRC=${UTIL_MISC_SRC}'; echo ''
|
@echo 'UTIL_MISC_SRC=${UTIL_MISC_SRC}'; echo ''
|
||||||
@echo 'UTIL_OBJS=${UTIL_OBJS}'; echo ''
|
@echo 'UTIL_OBJS=${UTIL_OBJS}'; echo ''
|
||||||
@echo 'UTIL_FILES=${UTIL_FILES}'; echo ''
|
|
||||||
@echo 'UTIL_PROGS=${UTIL_PROGS}'; echo ''
|
@echo 'UTIL_PROGS=${UTIL_PROGS}'; echo ''
|
||||||
@echo 'UTIL_TMP=${UTIL_TMP}'; echo ''
|
@echo 'UTIL_TMP=${UTIL_TMP}'; echo ''
|
||||||
@echo 'V=${V}'; echo ''
|
@echo 'V=${V}'; echo ''
|
||||||
@@ -4222,7 +4281,7 @@ mkdebug: env version.c
|
|||||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||||
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
debug: env
|
debug: calcinfo env
|
||||||
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
|
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
|
||||||
@${MAKE} -f Makefile Q= V=@ clobber
|
@${MAKE} -f Makefile Q= V=@ clobber
|
||||||
@@ -4237,7 +4296,7 @@ debug: env
|
|||||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||||
@echo -n '=-=-=-= Print #defile values if custom functions '
|
@echo -n '=-=-=-= Print #defile values if custom functions '
|
||||||
@echo 'are allowed =-=-=-='
|
@echo 'are allowed =-=-=-='
|
||||||
-@./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
-@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
||||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
|
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
|
||||||
@echo '=-=-= this may take a while =-=-='
|
@echo '=-=-= this may take a while =-=-='
|
||||||
@@ -5449,6 +5508,7 @@ help.o: have_string.h
|
|||||||
help.o: have_unistd.h
|
help.o: have_unistd.h
|
||||||
help.o: help.c
|
help.o: help.c
|
||||||
help.o: longbits.h
|
help.o: longbits.h
|
||||||
|
help.o: lib_calc.h
|
||||||
help.o: nametype.h
|
help.o: nametype.h
|
||||||
help.o: qmath.h
|
help.o: qmath.h
|
||||||
help.o: sha1.h
|
help.o: sha1.h
|
||||||
|
54
QUESTIONS
Normal file
54
QUESTIONS
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
If you have a simple general question about calc, send Email to:
|
||||||
|
|
||||||
|
calc-quest-mail at asthe dot com
|
||||||
|
|
||||||
|
NOTE: Remove spaces and replace 'at' with @, and 'dot' with .
|
||||||
|
|
||||||
|
PLEASE put following the SPECIAL PHRASE somewhere in your Email Subject line:
|
||||||
|
|
||||||
|
calc question
|
||||||
|
|
||||||
|
You may add additional words to your subject line.
|
||||||
|
|
||||||
|
IMPORTANT: If your Email doesn't contain the above phrase,
|
||||||
|
then we WILL NOT SEE your Email.
|
||||||
|
|
||||||
|
PLEASE BE SURE you have that SPECIAL PHRASE somewhere in the subject line!
|
||||||
|
|
||||||
|
Suggestion:
|
||||||
|
|
||||||
|
From time to time, the Email address and Subject SPECIAL PHRASE
|
||||||
|
may change so verify you have the current info by visiting:
|
||||||
|
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-question.html
|
||||||
|
|
||||||
|
Please limit your questions to general questions about calc. We
|
||||||
|
cannot go into great detail in our answers, nor can we do your
|
||||||
|
homework, nor can we do much more than answer short general questions
|
||||||
|
about calc.
|
||||||
|
|
||||||
|
Please be patient as we cannot always respond to Email messages quickly.
|
||||||
|
|
||||||
|
=-=
|
||||||
|
|
||||||
|
## Copyright (C) 2021 Landon Curt Noll
|
||||||
|
##
|
||||||
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
## as published by the Free Software Foundation.
|
||||||
|
##
|
||||||
|
## Calc is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||||
|
## Public License for more details.
|
||||||
|
##
|
||||||
|
## A copy of version 2.1 of the GNU Lesser General Public License is
|
||||||
|
## distributed with calc under the filename COPYING-LGPL. You should have
|
||||||
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
##
|
||||||
|
## Under source code control: 2021/02/10 00:15:05
|
||||||
|
## File existed as early as: 2021
|
||||||
|
##
|
||||||
|
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||||
|
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
79
README.FIRST
79
README.FIRST
@@ -32,30 +32,30 @@ something that you type in.
|
|||||||
|
|
||||||
For list of help topics:
|
For list of help topics:
|
||||||
|
|
||||||
> help
|
; help
|
||||||
|
|
||||||
For overview of calc overview:
|
For overview of calc overview:
|
||||||
|
|
||||||
> help intro
|
; help intro
|
||||||
> help overview
|
; help overview
|
||||||
> help command
|
; help command
|
||||||
> help define
|
; help define
|
||||||
> help statement
|
; help statement
|
||||||
> help variable
|
; help variable
|
||||||
> help usage
|
; help usage
|
||||||
|
|
||||||
For list of builtin functions:
|
For list of builtin functions:
|
||||||
|
|
||||||
> help builtin
|
; help builtin
|
||||||
|
|
||||||
C programmers should note some unexpected differences in the calc syntax:
|
C programmers should note some unexpected differences in the calc syntax:
|
||||||
|
|
||||||
> help unexpected
|
; help unexpected
|
||||||
|
|
||||||
Calc is shipped with a standard collection of calc resource files.
|
Calc is shipped with a standard collection of calc resource files.
|
||||||
For a list of calc standard resource files see:
|
For a list of calc standard resource files see:
|
||||||
|
|
||||||
> help resource
|
; help resource
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
@@ -71,66 +71,33 @@ or run:
|
|||||||
|
|
||||||
for a wish/todo list. Code contributions are welcome.
|
for a wish/todo list. Code contributions are welcome.
|
||||||
|
|
||||||
=-=
|
-=-
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
If you you notice something wrong, strange or broken, see the file:
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
BUGS
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
or run:
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
calc help bugs
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
for information about how to report a bug.
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
-=-
|
-=-
|
||||||
|
|
||||||
Calc bug reports and calc bug fixes should be sent to:
|
If you have a general question about calc, see the file:
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
QUESTIONS
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
or run:
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
calc help questions
|
||||||
|
|
||||||
To be sure we see your EMail reporting a calc bug, please use the
|
for information about how to ask a question.
|
||||||
following phase in your EMail Subject line:
|
|
||||||
|
|
||||||
calc bug report
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
However, you may find it more helpful to simply subscribe
|
|
||||||
to the calc-tester mailing list (see above) and then to
|
|
||||||
send your report to that mailing list as a wider set calc
|
|
||||||
testers may be able to help you.
|
|
||||||
|
|
||||||
-=-
|
-=-
|
||||||
|
|
||||||
The calc web site is located at:
|
## Copyright (C) 1999,2014,2017,2021 Landon Curt Noll
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/
|
|
||||||
|
|
||||||
NOTE: The EMail address uses 'asthe', while the web site uses 'isthe'.
|
|
||||||
|
|
||||||
## Copyright (C) 1999,2014,2017 Landon Curt Noll
|
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
39
cal/README
39
cal/README
@@ -38,43 +38,6 @@ Calc resource file files are provided because they serve as examples of
|
|||||||
how use the calc language, and/or because the authors thought them to
|
how use the calc language, and/or because the authors thought them to
|
||||||
be useful!
|
be useful!
|
||||||
|
|
||||||
If you write something that you think is useful, please join the
|
|
||||||
low volume calc mailing list calc-tester. Then send your contribution
|
|
||||||
to the calc-tester mailing list.
|
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
|
||||||
|
|
||||||
https://www.listbox.com/subscribe/?list_id=239342
|
|
||||||
|
|
||||||
To help determine you are a human and not just a spam bot,
|
|
||||||
you will be required to provide the following additional info:
|
|
||||||
|
|
||||||
Your Name
|
|
||||||
Calc Version
|
|
||||||
Operating System
|
|
||||||
The date 7 days ago
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
By convention, a resource file only defines and/or initializes functions,
|
By convention, a resource file only defines and/or initializes functions,
|
||||||
@@ -1816,7 +1779,7 @@ zeta2.cal
|
|||||||
for information on this special zeta function.
|
for information on this special zeta function.
|
||||||
|
|
||||||
|
|
||||||
## Copyright (C) 2000,2014,2017 David I. Bell and Landon Curt Noll
|
## Copyright (C) 2000,2014,2017,2021 David I. Bell and Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Primary author: Landon Curt Noll
|
## Primary author: Landon Curt Noll
|
||||||
##
|
##
|
||||||
|
5
calc.c
5
calc.c
@@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* calc - arbitrary precision calculator
|
* calc - arbitrary precision calculator
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2013 David I. Bell, Landon Curt Noll and Ernest Bowen
|
* Copyright (C) 1999-2013,2021 David I. Bell, Landon Curt Noll
|
||||||
|
* and Ernest Bowen
|
||||||
*
|
*
|
||||||
* Primary author: David I. Bell
|
* Primary author: David I. Bell
|
||||||
*
|
*
|
||||||
@@ -403,7 +404,7 @@ main(int argc, char **argv)
|
|||||||
" long");
|
" long");
|
||||||
exit(18);
|
exit(18);
|
||||||
}
|
}
|
||||||
/* XXX What if *cp = '\''? */
|
/* XXX - what if *cp = '\''? */
|
||||||
*bp++ = '\'';
|
*bp++ = '\'';
|
||||||
strncpy(bp, cp, len+1);
|
strncpy(bp, cp, len+1);
|
||||||
bp += len;
|
bp += len;
|
||||||
|
2
calc.h
2
calc.h
@@ -49,6 +49,8 @@
|
|||||||
#define PAGER "PAGER" /* environment variable for help */
|
#define PAGER "PAGER" /* environment variable for help */
|
||||||
#define SHELL "SHELL" /* environment variable for shell */
|
#define SHELL "SHELL" /* environment variable for shell */
|
||||||
#define CALCHISTFILE "CALCHISTFILE" /* history file environment variable */
|
#define CALCHISTFILE "CALCHISTFILE" /* history file environment variable */
|
||||||
|
#define CALCHELP "CALCHELP" /* help directory env variable */
|
||||||
|
#define CALCCUSTOMHELP "CALCCUSTOMHELP"/* custom help directory env variable */
|
||||||
#define DEFAULTCALCBINDINGS "bindings" /* default calc bindings file */
|
#define DEFAULTCALCBINDINGS "bindings" /* default calc bindings file */
|
||||||
#define DEFAULTCALCHELP "help" /* help file that -h prints */
|
#define DEFAULTCALCHELP "help" /* help file that -h prints */
|
||||||
#define DEFAULTSHELL "sh" /* default shell to use */
|
#define DEFAULTSHELL "sh" /* default shell to use */
|
||||||
|
295
calc.man
295
calc.man
@@ -24,7 +24,7 @@
|
|||||||
.\" calculator by David I. Bell
|
.\" calculator by David I. Bell
|
||||||
.\" man page by Landon Noll
|
.\" man page by Landon Noll
|
||||||
.\"
|
.\"
|
||||||
.TH calc 1 "^..^" "2007-02-06"
|
.TH calc 1 "^..^" "Share and enjoy! :-)"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
calc \- arbitrary precision calculator
|
calc \- arbitrary precision calculator
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -226,7 +226,7 @@ This flag is required when using calc in
|
|||||||
It must be at the end of the initial
|
It must be at the end of the initial
|
||||||
.B #!
|
.B #!
|
||||||
line of the script
|
line of the script
|
||||||
and must be immedately preceeded by the
|
and must be immediately preceded by the
|
||||||
.B \-s
|
.B \-s
|
||||||
flag.
|
flag.
|
||||||
.sp 1
|
.sp 1
|
||||||
@@ -1111,6 +1111,18 @@ Default value: ~/.calc_history
|
|||||||
.sp
|
.sp
|
||||||
This variable is not used if calc was compiled with GNU-readline support.
|
This variable is not used if calc was compiled with GNU-readline support.
|
||||||
.sp
|
.sp
|
||||||
|
.TP 5
|
||||||
|
CALCHELP
|
||||||
|
Location of the calc help directory.
|
||||||
|
.sp
|
||||||
|
Default value: ${HELPDIR}
|
||||||
|
.sp
|
||||||
|
.TP 5
|
||||||
|
CALCCUSTOMHELP
|
||||||
|
Location of the calc custom help directory.
|
||||||
|
.sp
|
||||||
|
Default value: ${CUSTOMHELPDIR}
|
||||||
|
.sp
|
||||||
.SH CREDIT
|
.SH CREDIT
|
||||||
\&
|
\&
|
||||||
.br
|
.br
|
||||||
@@ -1120,7 +1132,7 @@ was written by David I. Bell.
|
|||||||
.sp
|
.sp
|
||||||
The
|
The
|
||||||
.B calc
|
.B calc
|
||||||
primary mirror, calc mailing list and calc bug report
|
primary mirror, and calc bug report
|
||||||
processing is performed by Landon Curt Noll.
|
processing is performed by Landon Curt Noll.
|
||||||
.sp
|
.sp
|
||||||
Landon Curt Noll maintains the master reference source, performs
|
Landon Curt Noll maintains the master reference source, performs
|
||||||
@@ -1199,76 +1211,71 @@ This man page is:
|
|||||||
.sp
|
.sp
|
||||||
.in +0.5i
|
.in +0.5i
|
||||||
.nf
|
.nf
|
||||||
Copyright (C) 1999 Landon Curt Noll
|
Copyright (C) 1999-2021 Landon Curt Noll
|
||||||
.fi
|
.fi
|
||||||
.in -0.5i
|
.in -0.5i
|
||||||
.sp
|
.sp
|
||||||
and is covered under version 2.1 GNU Lesser General
|
and is covered under version 2.1 GNU Lesser General
|
||||||
Public License.
|
Public License.
|
||||||
.sp
|
.sp
|
||||||
.SH "CALC MAILING LIST / CALC UPDATES / ENHANCEMENTS"
|
.SH "CALC QUESTIONS"
|
||||||
\&
|
\&
|
||||||
.br
|
.br
|
||||||
|
If you have a simple general question about calc, send Email to:
|
||||||
.sp
|
.sp
|
||||||
To contribute comments, suggestions, enhancements
|
.in +0.5i
|
||||||
and interesting
|
calc-quest-mail at asthe dot com
|
||||||
.B calc
|
|
||||||
resource files, and
|
|
||||||
shell scripts please join the calc-tester
|
|
||||||
low volume moderated calc mailing list.
|
|
||||||
.sp
|
.sp
|
||||||
To the calc-tester mailing list, visit the following URL:
|
NOTE: Remove spaces and replace 'at' with @, and 'dot' with .
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
NOTE: Yes, the Email address uses 'asthe',
|
||||||
|
while the web site uses 'isthe'.
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
.B PLEASE
|
||||||
|
put following the
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
somewhere in your Email Subject line:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
.B calc question
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
You may add additional words to your subject line.
|
||||||
|
.sp
|
||||||
|
.B IMPORTANT:
|
||||||
|
If your Email doesn't contain the above phrase,
|
||||||
|
then we
|
||||||
|
.B WILL NOT SEE
|
||||||
|
your Email.
|
||||||
|
.sp
|
||||||
|
.B PLEASE BE SURE
|
||||||
|
you have that
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
somewhere in the subject line!
|
||||||
|
.sp
|
||||||
|
.B Suggestion:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
From time to time, the Email address and Subject
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
may change so verify you have the current info by visiting:
|
||||||
.sp
|
.sp
|
||||||
.in +0.5i
|
.in +0.5i
|
||||||
.nf
|
.nf
|
||||||
https://www.listbox.com/subscribe/?list_id=239342
|
http://www.isthe.com/chongo/tech/comp/calc/calc-question.html
|
||||||
.fi
|
.fi
|
||||||
.in -0.5i
|
.in -0.5i
|
||||||
.sp
|
|
||||||
To help determine you are a human and not just a spam bot,
|
|
||||||
you will be required to provide the following additional information:
|
|
||||||
.sp
|
|
||||||
.in +0.5i
|
|
||||||
.nf
|
|
||||||
Your Name
|
|
||||||
|
|
||||||
Calc Version
|
|
||||||
For example, the current version is: ${VERSION}
|
|
||||||
|
|
||||||
Operating System
|
|
||||||
If you don't know your operating system, enter: unknown
|
|
||||||
|
|
||||||
The date 7 days ago
|
|
||||||
Consult a calendar :-)
|
|
||||||
.fi
|
|
||||||
.in -0.5i
|
.in -0.5i
|
||||||
.sp
|
.sp
|
||||||
If you need a human to help you with your mailing list subscription,
|
Please limit your questions to general questions about calc.
|
||||||
or if you have problems with the above procedure, please
|
We cannot go into great detail in our answers,
|
||||||
send EMail to our special address:
|
nor can we do your homework, nor can
|
||||||
|
we do much more than answer short general questions about calc.
|
||||||
.sp
|
.sp
|
||||||
.in +0.5i
|
Please be patient as we cannot always respond to Email messages quickly.
|
||||||
.nf
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
NOTE: Yes, the EMail address uses 'asthe',
|
|
||||||
while the web site uses 'isthe'.
|
|
||||||
.fi
|
|
||||||
.in -0.5i
|
|
||||||
.sp
|
|
||||||
To be sure we see your EMail asking for help with your mailing list
|
|
||||||
subscription, please use the following phase in your EMail Subject line
|
|
||||||
your subject must contain the words:
|
|
||||||
.sp
|
|
||||||
.in +0.5i
|
|
||||||
.nf
|
|
||||||
calc tester mailing list help
|
|
||||||
.fi
|
|
||||||
.in -0.5i
|
|
||||||
.sp
|
|
||||||
You may have additional words in your subject line.
|
|
||||||
.sp
|
.sp
|
||||||
.SH "BUG REPORTS / BUG FIXES"
|
.SH "BUG REPORTS / BUG FIXES"
|
||||||
\&
|
\&
|
||||||
@@ -1278,28 +1285,51 @@ Send bug reports and bug fixes to:
|
|||||||
.sp
|
.sp
|
||||||
.in +0.5i
|
.in +0.5i
|
||||||
.nf
|
.nf
|
||||||
calc-bug-report at asthe dot com
|
calc-bugrept at asthe dot com
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
NOTE: Yes, the EMail address uses 'asthe',
|
|
||||||
while the web site uses 'isthe'.
|
|
||||||
.fi
|
.fi
|
||||||
|
.sp
|
||||||
|
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
||||||
|
.sp
|
||||||
|
NOTE: Yes, the Email address uses 'asthe',
|
||||||
|
while the web site uses 'isthe'.
|
||||||
.in -0.5i
|
.in -0.5i
|
||||||
.sp
|
.sp
|
||||||
Your subject must contain the words:
|
You
|
||||||
|
.B MUST
|
||||||
|
use following
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
in your Email Subject line:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
.B calc bug report
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
You may add additional words to your subject line.
|
||||||
|
.sp
|
||||||
|
.B Suggestion:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
From time to time, the Email address and Subject
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
may change so verify you have the current info by visiting:
|
||||||
.sp
|
.sp
|
||||||
.in +0.5i
|
.in +0.5i
|
||||||
.nf
|
.nf
|
||||||
calc bug report
|
http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
|
||||||
.fi
|
.fi
|
||||||
.in -0.5i
|
.in -0.5i
|
||||||
|
.in -0.5i
|
||||||
.sp
|
.sp
|
||||||
You may have additional words in your subject line.
|
.B IMPORTANT:
|
||||||
.in
|
If your Email doesn't contain the above phrase,
|
||||||
However, you may find it more helpful to simply subscribe to the
|
then we
|
||||||
calc-tester mailing list (see above) and then to send your report
|
.B WILL NOT SEE
|
||||||
to that mailing list as a wider set calc testers may be able to help you.
|
your Email.
|
||||||
|
.sp
|
||||||
|
.B PLEASE BE SURE
|
||||||
|
you have that
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
somewhere in the subject line!
|
||||||
.sp
|
.sp
|
||||||
See the
|
See the
|
||||||
.I BUGS
|
.I BUGS
|
||||||
@@ -1315,6 +1345,135 @@ help bugs
|
|||||||
.sp
|
.sp
|
||||||
for more information about bug reporting.
|
for more information about bug reporting.
|
||||||
.sp
|
.sp
|
||||||
|
Please be patient as we cannot always respond to Email messages quickly.
|
||||||
|
.sp
|
||||||
|
.SH "CONTRIBUTING CODE TO CALC"
|
||||||
|
\&
|
||||||
|
.br
|
||||||
|
.sp
|
||||||
|
.I Calc
|
||||||
|
is open source.
|
||||||
|
Contributions of code are welcome.
|
||||||
|
.sp
|
||||||
|
We welcome and encourage you to send us:
|
||||||
|
.sp
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
.nf
|
||||||
|
* calc resource files (cal/*.cal)
|
||||||
|
* calc shell scripts (cscript/*.calc)
|
||||||
|
* builtin functions that you have modified or written, i.e.:
|
||||||
|
assocfunc.c comfunc.c func.c func.h
|
||||||
|
listfunc.c matfunc.c qfunc.c zfunc.c
|
||||||
|
* custom functions that you have modified or written (custom/*)
|
||||||
|
* help files modified or written (help/*)
|
||||||
|
* brief description of you added, fixed, improved in CHANGES
|
||||||
|
* regression test cases (cal/regress.cal)
|
||||||
|
* Makefile improvements (Makefile, */Makefile)
|
||||||
|
* other source code modifications (*.c, *.h)
|
||||||
|
* etc. (* */* :) )
|
||||||
|
.fi
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
If you add functionality to calc, please be sure to modify/patch/add
|
||||||
|
Makefiles, help files, cal/regress.cal test code as well.
|
||||||
|
Regression test cases are vital to maintaining calc's level
|
||||||
|
of correctness and helps us avoid code bug regression.
|
||||||
|
.sp
|
||||||
|
In order to consider integrating your code, we need:
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.in +0.5i
|
||||||
|
* calc version you are working with (please try use the latest version)
|
||||||
|
* new help files or help file patches, if applicable (documentation)
|
||||||
|
* proposed text for the CHANGES file (brief description of what it does)
|
||||||
|
* regress.cal test patch as needed
|
||||||
|
* your source code and/or source code changes (:-))
|
||||||
|
.in -0.5i
|
||||||
|
.fi
|
||||||
|
.sp
|
||||||
|
The best way to send us new code, if your changes are small, is
|
||||||
|
via a patch (diff -c from the latest alpha code to your code).
|
||||||
|
If your change is large, you should send entire files (either
|
||||||
|
as a diff -c /dev/null your-file patch, or as a uuencoded and
|
||||||
|
gziped (or compressed) tar file).
|
||||||
|
.sp
|
||||||
|
Please try to generate a patch against the most recent
|
||||||
|
version of calc, and if you use GitHub, the top of the
|
||||||
|
master branch:
|
||||||
|
sp
|
||||||
|
.nf
|
||||||
|
.in +0.5i
|
||||||
|
https://github.com/lcn2/calc
|
||||||
|
.in -0.5i
|
||||||
|
.fi
|
||||||
|
.sp
|
||||||
|
.sp
|
||||||
|
The best way contribute to calc bug is to generate calc
|
||||||
|
GitHub pull request:
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.in +0.5i
|
||||||
|
https://github.com/lcn2/calc/pulls
|
||||||
|
.in -0.5i
|
||||||
|
.fi
|
||||||
|
.sp
|
||||||
|
Your code needs to be contributed under either the 2.1 of the
|
||||||
|
.B GNU Lesser General Public License (LGPL 2.1)
|
||||||
|
or be in the public domain.
|
||||||
|
.sp
|
||||||
|
If you do not want to use calc GitHub, then send EMail to:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
.nf
|
||||||
|
calc-contrib at asthe dot com
|
||||||
|
.fi
|
||||||
|
.sp
|
||||||
|
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
||||||
|
.sp
|
||||||
|
NOTE: Yes, the Email address uses 'asthe',
|
||||||
|
while the web site uses 'isthe'.
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
You
|
||||||
|
.B MUST
|
||||||
|
use following
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
in your Email Subject line:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
.B calc contribution
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
You may add additional words to your subject line.
|
||||||
|
.sp
|
||||||
|
.B Suggestion:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
From time to time, the Email address and Subject
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
may change so verify you have the current info by visiting:
|
||||||
|
.sp
|
||||||
|
.in +0.5i
|
||||||
|
.nf
|
||||||
|
http://www.isthe.com/chongo/tech/comp/calc/calc-contrib.html
|
||||||
|
.fi
|
||||||
|
.in -0.5i
|
||||||
|
.in -0.5i
|
||||||
|
.sp
|
||||||
|
.B IMPORTANT:
|
||||||
|
If your Email doesn't contain the above phrase,
|
||||||
|
then we
|
||||||
|
.B WILL NOT SEE
|
||||||
|
your Email.
|
||||||
|
.sp
|
||||||
|
.B PLEASE BE SURE
|
||||||
|
you have that
|
||||||
|
.B SPECIAL PHRASE
|
||||||
|
somewhere in the subject line!
|
||||||
|
.sp
|
||||||
|
Please be patient as we cannot always respond to Email messages quickly.
|
||||||
|
.sp
|
||||||
.SH "CALC WEB SITE"
|
.SH "CALC WEB SITE"
|
||||||
\&
|
\&
|
||||||
.br
|
.br
|
||||||
|
@@ -52,37 +52,6 @@ For more info, see:
|
|||||||
|
|
||||||
#####
|
#####
|
||||||
|
|
||||||
If you write something that you think is useful, please join the
|
|
||||||
low volume calc mailing list calc-tester. Then send your contribution
|
|
||||||
to the calc-tester mailing list.
|
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
=-=
|
|
||||||
|
|
||||||
4dsphere
|
4dsphere
|
||||||
|
|
||||||
Determine if 6 points lie on the surface of a 4-dimensional sphere in R^4.
|
Determine if 6 points lie on the surface of a 4-dimensional sphere in R^4.
|
||||||
@@ -125,7 +94,7 @@ simple
|
|||||||
|
|
||||||
A trivial example of a calc shell script.
|
A trivial example of a calc shell script.
|
||||||
|
|
||||||
## Copyright (C) 1999,2014 Landon Curt Noll
|
## Copyright (C) 1999,2014,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# custom - makefile for calc custom routines
|
# custom - makefile for calc custom routines
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2006,2014,2017-2018 Landon Curt Noll
|
# Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll
|
||||||
#
|
#
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
# Calc is open software; you can redistribute it and/or modify it under
|
||||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -348,7 +348,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.12.7.6
|
VERSION= 2.12.8.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
@@ -493,7 +493,7 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
|||||||
# #
|
# #
|
||||||
# calc-contrib at asthe dot com #
|
# calc-contrib at asthe dot com #
|
||||||
# #
|
# #
|
||||||
# EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
# Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
||||||
# set of lines so that we can consider them for the next release. #
|
# set of lines so that we can consider them for the next release. #
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# custom - makefile for calc custom routines
|
# custom - makefile for calc custom routines
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2006,2014,2017-2018 Landon Curt Noll
|
# Copyright (C) 1999-2006,2014,2017-2018,2021 Landon Curt Noll
|
||||||
#
|
#
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
# Calc is open software; you can redistribute it and/or modify it under
|
||||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -348,7 +348,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.12.7.6
|
VERSION= 2.12.8.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
|
@@ -25,7 +25,7 @@ DESCRIPTION
|
|||||||
SPECIAL NOTE:
|
SPECIAL NOTE:
|
||||||
|
|
||||||
Can you find a value, q, for which this custom function returns 1?
|
Can you find a value, q, for which this custom function returns 1?
|
||||||
If you do, send the value of q to chongo using the EMail address
|
If you do, send the value of q to chongo using the Email address
|
||||||
found at:
|
found at:
|
||||||
|
|
||||||
http://www.isthe.com/chongo/address.html
|
http://www.isthe.com/chongo/address.html
|
||||||
@@ -51,7 +51,7 @@ LIBRARY
|
|||||||
SEE ALSO
|
SEE ALSO
|
||||||
custom
|
custom
|
||||||
|
|
||||||
## Copyright (C) 2004 Landon Curt Noll
|
## Copyright (C) 2004,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
18
file.c
18
file.c
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* file - file I/O routines callable by users
|
* file - file I/O routines callable by users
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2007,2018 David I. Bell and Landon Curt Noll
|
* Copyright (C) 1999-2007,2018,2021 David I. Bell and Landon Curt Noll
|
||||||
*
|
*
|
||||||
* Primary author: David I. Bell
|
* Primary author: David I. Bell
|
||||||
*
|
*
|
||||||
@@ -1416,21 +1416,22 @@ z2filepos(ZVALUE zpos)
|
|||||||
#if FILEPOS_BITS == FULL_BITS
|
#if FILEPOS_BITS == FULL_BITS
|
||||||
/* ztofull puts the value into native byte order */
|
/* ztofull puts the value into native byte order */
|
||||||
pos = ztofull(zpos);
|
pos = ztofull(zpos);
|
||||||
memset(&ret, 0, sizeof(ret)); /* on some hosts, FILEPOS is not a scalar */
|
memset(&ret, 0, sizeof(ret)); /* FILEPOS could be non-scalar */
|
||||||
memcpy((void *)&ret, (void *)&pos, MIN(sizeof(ret), sizeof(pos)));
|
memcpy((void *)&ret, (void *)&pos, MIN(sizeof(ret), sizeof(pos)));
|
||||||
return ret;
|
return ret;
|
||||||
#elif FILEPOS_BITS < FULL_BITS
|
#elif FILEPOS_BITS < FULL_BITS
|
||||||
/* ztofull puts the value into native byte order */
|
/* ztofull puts the value into native byte order */
|
||||||
pos = ztolong(zpos);
|
pos = ztolong(zpos);
|
||||||
memset(&ret, 0, sizeof(ret)); /* on some hosts, FILEPOS is not a scalar */
|
memset(&ret, 0, sizeof(ret)); /* FILEPOS could be non-scalar */
|
||||||
memcpy((void *)&ret, (void *)&pos, MIN(sizeof(ret), sizeof(pos)));
|
memcpy((void *)&ret, (void *)&pos, MIN(sizeof(ret), sizeof(pos)));
|
||||||
return ret;
|
return ret;
|
||||||
#else /* FILEPOS_BITS > FULL_BITS */
|
#else /* FILEPOS_BITS > FULL_BITS */
|
||||||
if (!zgtmaxfull(zpos)) {
|
if (!zgtmaxfull(zpos)) {
|
||||||
/* ztofull puts the value into native byte order */
|
/* ztofull puts the value into native byte order */
|
||||||
pos = ztofull(zpos);
|
pos = ztofull(zpos);
|
||||||
memset(&ret, 0, sizeof(ret)); /* on some hosts, FILEPOS is not a scalar */
|
memset(&ret, 0, sizeof(ret)); /* FILEPOS could be non-scalar */
|
||||||
memcpy((void *)&ret, (void *)&pos, MIN(sizeof(ret), sizeof(pos)));
|
memcpy((void *)&ret, (void *)&pos,
|
||||||
|
MIN(sizeof(ret), sizeof(pos)));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1439,12 +1440,13 @@ z2filepos(ZVALUE zpos)
|
|||||||
*/
|
*/
|
||||||
if (zpos.len >= FILEPOS_BITS/BASEB) {
|
if (zpos.len >= FILEPOS_BITS/BASEB) {
|
||||||
/* copy the lower FILEPOS_BITS of the ZVALUE */
|
/* copy the lower FILEPOS_BITS of the ZVALUE */
|
||||||
memset(&tmp, 0, sizeof(tmp)); /* on some hosts, FILEPOS is not a scalar */
|
memset(&tmp, 0, sizeof(tmp)); /* FILEPOS could be non-scalar */
|
||||||
memcpy(&tmp, zpos.v, MIN(sizeof(tmp), FILEPOS_LEN);
|
memcpy(&tmp, zpos.v, MIN(sizeof(tmp), FILEPOS_LEN);
|
||||||
} else {
|
} else {
|
||||||
/* copy what bits we can into the temp value */
|
/* copy what bits we can into the temp value */
|
||||||
memset(&tmp, 0, sizeof(tmp)); /* on some hosts, FILEPOS is not a scalar */
|
memset(&tmp, 0, sizeof(tmp)); /* FILEPOS could be non-scalar */
|
||||||
memcpy(&tmp, zpos.v, MIN(sizeof(tmp), MIN(zpos.len*BASEB/8, FILEPOS_LEN)));
|
memcpy(&tmp, zpos.v, MIN(sizeof(tmp),
|
||||||
|
MIN(zpos.len*BASEB/8, FILEPOS_LEN)));
|
||||||
}
|
}
|
||||||
/* swap into native byte order */
|
/* swap into native byte order */
|
||||||
SWAP_HALF_IN_FILEPOS(&ret, &tmp);
|
SWAP_HALF_IN_FILEPOS(&ret, &tmp);
|
||||||
|
6
func.c
6
func.c
@@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* func - built-in functions implemented here
|
* func - built-in functions implemented here
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2007,2018 David I. Bell, Landon Curt Noll & Ernest Bowen
|
* Copyright (C) 1999-2007,2018,2021 David I. Bell, Landon Curt Noll
|
||||||
|
* and Ernest Bowen
|
||||||
*
|
*
|
||||||
* Primary author: David I. Bell
|
* Primary author: David I. Bell
|
||||||
*
|
*
|
||||||
@@ -7710,7 +7711,8 @@ f_putenv(int count, VALUE **vals)
|
|||||||
math_error("Cannot allocate string in putenv");
|
math_error("Cannot allocate string in putenv");
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
memcpy(putenv_str, vals[0]->v_str->s_str, vals[0]->v_str->s_len);
|
memcpy(putenv_str, vals[0]->v_str->s_str,
|
||||||
|
vals[0]->v_str->s_len);
|
||||||
putenv_str[vals[0]->v_str->s_len] = '\0';
|
putenv_str[vals[0]->v_str->s_len] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
52
help.c
52
help.c
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "calc.h"
|
#include "calc.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
#include "lib_calc.h"
|
||||||
|
|
||||||
#include "have_unistd.h"
|
#include "have_unistd.h"
|
||||||
#if defined(HAVE_UNISTD_H)
|
#if defined(HAVE_UNISTD_H)
|
||||||
@@ -78,6 +79,7 @@ STATIC struct help_alias {
|
|||||||
{"cd", "command"},
|
{"cd", "command"},
|
||||||
{"show", "command"},
|
{"show", "command"},
|
||||||
{"stdlib", "resource"},
|
{"stdlib", "resource"},
|
||||||
|
{"question", "questions"},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -246,22 +248,13 @@ givehelp(char *type)
|
|||||||
/*
|
/*
|
||||||
* open the helpfile (looking in HELPDIR first)
|
* open the helpfile (looking in HELPDIR first)
|
||||||
*/
|
*/
|
||||||
#if defined(CUSTOM)
|
snprintf_len = strlen(calc_helpdir)+1+strlen(type) + 1;
|
||||||
if (sizeof(CUSTOMHELPDIR) > sizeof(HELPDIR)) {
|
|
||||||
snprintf_len = sizeof(CUSTOMHELPDIR)+1+strlen(type) + 1;
|
|
||||||
} else {
|
|
||||||
snprintf_len = sizeof(HELPDIR)+1+strlen(type) + 1;
|
|
||||||
}
|
|
||||||
helppath = (char *)malloc(snprintf_len+1);
|
helppath = (char *)malloc(snprintf_len+1);
|
||||||
#else /* CUSTOM */
|
|
||||||
snprintf_len = sizeof(HELPDIR)+1+strlen(type) + 1;
|
|
||||||
helppath = (char *)malloc(snprintf_len+1);
|
|
||||||
#endif /* CUSTOM */
|
|
||||||
if (helppath == NULL) {
|
if (helppath == NULL) {
|
||||||
fprintf(stderr, "malloc failure in givehelp()\n");
|
fprintf(stderr, "malloc failure in givehelp #0\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
snprintf(helppath, snprintf_len, "%s/%s", HELPDIR, type);
|
snprintf(helppath, snprintf_len, "%s/%s", calc_helpdir, type);
|
||||||
helppath[snprintf_len] = '\0'; /* paranoia */
|
helppath[snprintf_len] = '\0'; /* paranoia */
|
||||||
stream = fopen(helppath, "r");
|
stream = fopen(helppath, "r");
|
||||||
if (stream != NULL) {
|
if (stream != NULL) {
|
||||||
@@ -277,22 +270,30 @@ givehelp(char *type)
|
|||||||
* open the helpfile (looking in CUSTOMHELPDIR last)
|
* open the helpfile (looking in CUSTOMHELPDIR last)
|
||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
|
char *cust_helppath; /* path to the custom help file */
|
||||||
|
size_t cust_snprintf_len; /* malloced custom snprintf buf len */
|
||||||
|
|
||||||
snprintf(helppath, snprintf_len, "%s/%s", CUSTOMHELPDIR, type);
|
cust_snprintf_len = strlen(calc_customhelpdir)+1+strlen(type) + 1;
|
||||||
helppath[snprintf_len] = '\0'; /* paranoia */
|
cust_helppath = (char *)malloc(cust_snprintf_len+1);
|
||||||
stream = fopen(helppath, "r");
|
if (cust_helppath == NULL) {
|
||||||
if (stream == NULL) {
|
fprintf(stderr, "malloc failure for givehelp #1\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
snprintf(cust_helppath, cust_snprintf_len,
|
||||||
|
"%s/%s", calc_customhelpdir, type);
|
||||||
|
cust_helppath[cust_snprintf_len] = '\0'; /* paranoia */
|
||||||
|
stream = fopen(cust_helppath, "r");
|
||||||
|
if (stream != NULL) {
|
||||||
|
|
||||||
/* no such help file */
|
/*
|
||||||
fprintf(stderr,
|
* we have the help file open, now display it
|
||||||
"%s: no such help file, try: help help\n",
|
*/
|
||||||
type);
|
page_file(stream);
|
||||||
} else {
|
(void) fclose(stream);
|
||||||
|
}
|
||||||
|
free(cust_helppath);
|
||||||
|
cust_helppath = NULL;
|
||||||
|
|
||||||
/* we have the help file open, now display it */
|
|
||||||
page_file(stream);
|
|
||||||
(void) fclose(stream);
|
|
||||||
}
|
|
||||||
#endif /* CUSTOM */
|
#endif /* CUSTOM */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,5 +301,6 @@ givehelp(char *type)
|
|||||||
* cleanup
|
* cleanup
|
||||||
*/
|
*/
|
||||||
free(helppath);
|
free(helppath);
|
||||||
|
helppath = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# help - makefile for calc help files
|
# help - makefile for calc help files
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2006,2017 Landon Curt Noll
|
# Copyright (C) 1999-2006,2017,2021 Landon Curt Noll
|
||||||
#
|
#
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
# Calc is open software; you can redistribute it and/or modify it under
|
||||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -231,9 +231,9 @@ STD_HELP_FILES_12= archive
|
|||||||
|
|
||||||
BLT_HELP_FILES_13= bugs changes
|
BLT_HELP_FILES_13= bugs changes
|
||||||
|
|
||||||
STD_HELP_FILES_14= contrib credit
|
STD_HELP_FILES_14= credit
|
||||||
|
|
||||||
BLT_HELP_FILES_14= COPYING COPYING-LGPL
|
BLT_HELP_FILES_14= contrib COPYING COPYING-LGPL question
|
||||||
|
|
||||||
STD_HELP_FILES_15= wishlist todo
|
STD_HELP_FILES_15= wishlist todo
|
||||||
|
|
||||||
@@ -405,6 +405,18 @@ bugs: ../BUGS
|
|||||||
${TRUE}; \
|
${TRUE}; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
contrib: ../CONTRIB-CODE
|
||||||
|
${RM} -f $@
|
||||||
|
${CP} ../CONTRIB-CODE $@
|
||||||
|
${CHMOD} 0444 $@
|
||||||
|
-@if [ -z "${Q}" ]; then \
|
||||||
|
echo ''; \
|
||||||
|
echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
|
||||||
|
echo ''; \
|
||||||
|
else \
|
||||||
|
${TRUE}; \
|
||||||
|
fi
|
||||||
|
|
||||||
errorcodes: ../calcerr.h errorcodes.hdr errorcodes.sed
|
errorcodes: ../calcerr.h errorcodes.hdr errorcodes.sed
|
||||||
${RM} -f $@
|
${RM} -f $@
|
||||||
${CAT} errorcodes.hdr > $@
|
${CAT} errorcodes.hdr > $@
|
||||||
@@ -505,6 +517,18 @@ COPYING-LGPL: ../COPYING-LGPL
|
|||||||
${TRUE}; \
|
${TRUE}; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
question: ../QUESTIONS
|
||||||
|
${RM} -f $@
|
||||||
|
${CP} ../QUESTIONS $@
|
||||||
|
${CHMOD} 0444 $@
|
||||||
|
-@if [ -z "${Q}" ]; then \
|
||||||
|
echo ''; \
|
||||||
|
echo '=-=-= skipping the ${CAT} of help/$@ =-=-='; \
|
||||||
|
echo ''; \
|
||||||
|
else \
|
||||||
|
${TRUE}; \
|
||||||
|
fi
|
||||||
|
|
||||||
cscript: ../cscript/README
|
cscript: ../cscript/README
|
||||||
${RM} -f $@
|
${RM} -f $@
|
||||||
${CP} ../cscript/README $@
|
${CP} ../cscript/README $@
|
||||||
@@ -662,7 +686,7 @@ detail_help_list:
|
|||||||
! -name mat ! -name obj.file ! -name operator \
|
! -name mat ! -name obj.file ! -name operator \
|
||||||
! -name overview ! -name script ! -name statement \
|
! -name overview ! -name script ! -name statement \
|
||||||
! -name todo ! -name types ! -name unexpected \
|
! -name todo ! -name types ! -name unexpected \
|
||||||
! -name variable ! -name wishlist \
|
! -name variable ! -name wishlist ! -name question \
|
||||||
-print | \
|
-print | \
|
||||||
while read i; do \
|
while read i; do \
|
||||||
if [ X"$$i" != X"/dev/null" ]; then \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
@@ -701,7 +725,7 @@ echo_inst_files:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT}
|
${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT}
|
||||||
${RM} -f COPYING COPYING-LGPL
|
${RM} -f COPYING COPYING-LGPL question
|
||||||
|
|
||||||
clobber: clean
|
clobber: clean
|
||||||
${RM} -f ${BLT_HELP_FILES} full .all calc
|
${RM} -f ${BLT_HELP_FILES} full .all calc
|
||||||
|
134
help/contrib
134
help/contrib
@@ -1,134 +0,0 @@
|
|||||||
We welcome and encourage you to send us:
|
|
||||||
|
|
||||||
* calc resource files
|
|
||||||
* calc shell scripts
|
|
||||||
* any builtin functions that you have modified or written
|
|
||||||
* custom functions that you have modified or written
|
|
||||||
* any other source code modifications
|
|
||||||
|
|
||||||
Prior to doing so, you should consider applying your changes to the most
|
|
||||||
recent version of calc.
|
|
||||||
|
|
||||||
Landon Noll maintains the official calc home page at:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/
|
|
||||||
|
|
||||||
See:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-download.html
|
|
||||||
|
|
||||||
for information on how to obtain up a recent version of calc.
|
|
||||||
|
|
||||||
=-=
|
|
||||||
|
|
||||||
In order to consider integrating your code, we need:
|
|
||||||
|
|
||||||
* the calc version you are working with (use the latest calc, see above)
|
|
||||||
* new help files or help file patches, if applicable (documentation)
|
|
||||||
* proposed text for the CHANGES file (brief description of what it does)
|
|
||||||
* regress.cal test patch, if applicable
|
|
||||||
* your source code and/or source code changes (:-))
|
|
||||||
|
|
||||||
The best way to send us new code, if your changes are small, is
|
|
||||||
via a patch (diff -c from the latest alpha code to your code).
|
|
||||||
If your change is large, you should send entire files (either
|
|
||||||
as a diff -c /dev/null your-file patch, or as a uuencoded and
|
|
||||||
gziped (or compressed) tar file).
|
|
||||||
|
|
||||||
To contribute code, scripts, resource files and/or to help please
|
|
||||||
join the low volume calc mailing list calc-tester. Then send
|
|
||||||
your contribution to the calc-tester mailing list.
|
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
|
||||||
|
|
||||||
https://www.listbox.com/subscribe/?list_id=239342
|
|
||||||
|
|
||||||
To help determine you are a human and not just a spam bot,
|
|
||||||
you will be required to provide the following additional info:
|
|
||||||
|
|
||||||
Your Name
|
|
||||||
Calc Version
|
|
||||||
Operating System
|
|
||||||
The date 7 days ago
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
=-=
|
|
||||||
|
|
||||||
Calc bug reports and calc bug fixes should be sent to:
|
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
|
||||||
|
|
||||||
To be sure we see your EMail reporting a calc bug, please use the
|
|
||||||
following phase in your EMail Subject line:
|
|
||||||
|
|
||||||
calc bug report
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
However, you may find it more helpful to simply subscribe
|
|
||||||
to the calc-tester mailing list (see above) and then to
|
|
||||||
send your report to that mailing list as a wider set calc
|
|
||||||
testers may be able to help you.
|
|
||||||
|
|
||||||
=-=
|
|
||||||
|
|
||||||
The calc web site is located at:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/
|
|
||||||
|
|
||||||
NOTE: The EMail address uses 'asthe', while the web site uses 'isthe'.
|
|
||||||
|
|
||||||
=-=
|
|
||||||
|
|
||||||
Landon Curt Noll
|
|
||||||
http://www.isthe.com/chongo/
|
|
||||||
|
|
||||||
chongo (share and enjoy) /\../\
|
|
||||||
|
|
||||||
## Copyright (C) 1999,2014 Landon Curt Noll
|
|
||||||
##
|
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
|
||||||
## as published by the Free Software Foundation.
|
|
||||||
##
|
|
||||||
## Calc is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
|
||||||
## Public License for more details.
|
|
||||||
##
|
|
||||||
## A copy of version 2.1 of the GNU Lesser General Public License is
|
|
||||||
## distributed with calc under the filename COPYING-LGPL. You should have
|
|
||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
##
|
|
||||||
## Under source code control: 1997/03/09 16:33:22
|
|
||||||
## File existed as early as: 1997
|
|
||||||
##
|
|
||||||
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
|
||||||
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
|
@@ -101,6 +101,21 @@ Environment variables
|
|||||||
variable is an empty string, then ~/.calc_history
|
variable is an empty string, then ~/.calc_history
|
||||||
is used.
|
is used.
|
||||||
|
|
||||||
|
CALCHELP
|
||||||
|
|
||||||
|
Location of the calc help directory.
|
||||||
|
|
||||||
|
If this variable does not exist, or if this
|
||||||
|
variable is an empty string, then ${HELPDIR}
|
||||||
|
|
||||||
|
CALCCUSTOMHELP
|
||||||
|
|
||||||
|
Location of the calc custom help directory.
|
||||||
|
|
||||||
|
If this variable does not exist, or if this
|
||||||
|
variable is an empty string, then ${CUSTOMHELPDIR}
|
||||||
|
is used.
|
||||||
|
|
||||||
## Copyright (C) 1999,2021 Landon Curt Noll
|
## Copyright (C) 1999,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
|
@@ -37,13 +37,13 @@ What is calc?
|
|||||||
last command expression, if any. This is of great use when a series
|
last command expression, if any. This is of great use when a series
|
||||||
of partial results are calculated, or when the output mode is changed
|
of partial results are calculated, or when the output mode is changed
|
||||||
and the last result needs to be redisplayed. For example, the above
|
and the last result needs to be redisplayed. For example, the above
|
||||||
result can be modified by typing:
|
result (2^23209-1) can be modified by typing:
|
||||||
|
|
||||||
. % (2^127-1)
|
. % (2^127-1)
|
||||||
|
|
||||||
and the calculator will print:
|
and the calculator will print:
|
||||||
|
|
||||||
47385033654019111249345128555354223304
|
39614081257132168796771975167
|
||||||
|
|
||||||
For more complex calculations, variables can be used to save the
|
For more complex calculations, variables can be used to save the
|
||||||
intermediate results. For example, the result of adding 7 to the
|
intermediate results. For example, the result of adding 7 to the
|
||||||
@@ -169,7 +169,7 @@ What is calc?
|
|||||||
In particular, check out the other help functions listed in the
|
In particular, check out the other help functions listed in the
|
||||||
overview help file.
|
overview help file.
|
||||||
|
|
||||||
## Copyright (C) 1999 Landon Curt Noll
|
## Copyright (C) 1999,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
36
help/todo
36
help/todo
@@ -1,33 +1,5 @@
|
|||||||
Calc Todo Items:
|
Calc Todo Items:
|
||||||
|
|
||||||
Code contributions are welcome. First Subscribe to the calc-tester
|
|
||||||
mailing list. Next, send patches to the calc-tester mailing list.
|
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
High priority items:
|
High priority items:
|
||||||
@@ -135,8 +107,8 @@ Calc bug reports and calc bug fixes should be sent to:
|
|||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
This replaces the old calc-bugs at asthe dot com address.
|
||||||
|
|
||||||
To be sure we see your EMail reporting a calc bug, please use the
|
To be sure we see your Email reporting a calc bug, please use the
|
||||||
following phase in your EMail Subject line:
|
following phase in your Email Subject line:
|
||||||
|
|
||||||
calc bug report
|
calc bug report
|
||||||
|
|
||||||
@@ -155,9 +127,9 @@ The calc web site is located at:
|
|||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/
|
http://www.isthe.com/chongo/tech/comp/calc/
|
||||||
|
|
||||||
NOTE: The EMail address uses 'asthe', while the web site uses 'isthe'.
|
NOTE: The Email address uses 'asthe', while the web site uses 'isthe'.
|
||||||
|
|
||||||
## Copyright (C) 1999-2007,2014 Landon Curt Noll
|
## Copyright (C) 1999-2007,2014,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
@@ -4,34 +4,13 @@ Calc Enhancement Wish List:
|
|||||||
interesting calc scripts that you would like you see included in
|
interesting calc scripts that you would like you see included in
|
||||||
future distributions.
|
future distributions.
|
||||||
|
|
||||||
To send such items, first subscribe to the calc-tester mailing list.
|
=-=
|
||||||
Then send your comments, suggestions, bug fixes, enhancements and
|
|
||||||
interesting calc scripts to the calc-tester mailing list.
|
|
||||||
|
|
||||||
To subscribe to the calc-tester mailing list, visit the following URL:
|
Calc is open source. Contributions of code are welcome.
|
||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
|
Please read CONTRIB-CODE or run the following calc command:
|
||||||
|
|
||||||
This is a low volume moderated mailing list.
|
; help contrib
|
||||||
|
|
||||||
This mailing list replaces calc-tester at asthe dot com list.
|
|
||||||
|
|
||||||
If you need a human to help you with your mailing list subscription,
|
|
||||||
please send EMail to our special:
|
|
||||||
|
|
||||||
calc-tester-maillist-help at asthe dot com
|
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
|
||||||
|
|
||||||
address. To be sure we see your EMail asking for help with your
|
|
||||||
mailing list subscription, please use the following phase in your
|
|
||||||
EMail Subject line:
|
|
||||||
|
|
||||||
calc tester mailing list help
|
|
||||||
|
|
||||||
That phrase in your subject line will help ensure your
|
|
||||||
request will get past our anti-spam filters. You may have
|
|
||||||
additional words in your subject line.
|
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
@@ -212,8 +191,8 @@ Calc bug reports and calc bug fixes should be sent to:
|
|||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
This replaces the old calc-bugs at asthe dot com address.
|
||||||
|
|
||||||
To be sure we see your EMail reporting a calc bug, please use the
|
To be sure we see your Email reporting a calc bug, please use the
|
||||||
following phase in your EMail Subject line:
|
following phase in your Email Subject line:
|
||||||
|
|
||||||
calc bug report
|
calc bug report
|
||||||
|
|
||||||
@@ -232,9 +211,9 @@ The calc web site is located at:
|
|||||||
|
|
||||||
http://www.isthe.com/chongo/tech/comp/calc/
|
http://www.isthe.com/chongo/tech/comp/calc/
|
||||||
|
|
||||||
NOTE: The EMail address uses 'asthe', while the web site uses 'isthe'.
|
NOTE: The Email address uses 'asthe', while the web site uses 'isthe'.
|
||||||
|
|
||||||
## Copyright (C) 1999,2014 Landon Curt Noll
|
## Copyright (C) 1999,2014,2021 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
8
hist.c
8
hist.c
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* hist - interactive readline module
|
* hist - interactive readline module
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2007 David I. Bell
|
* Copyright (C) 1999-2007,2021 David I. Bell
|
||||||
*
|
*
|
||||||
* Calc is open software; you can redistribute it and/or modify it under
|
* Calc is open software; you can redistribute it and/or modify it under
|
||||||
* the terms of the version 2.1 of the GNU Lesser General Public License
|
* the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -746,7 +746,8 @@ hist_saveline(char *line, int len)
|
|||||||
*/
|
*/
|
||||||
hp = malloc(sizeof(HIST));
|
hp = malloc(sizeof(HIST));
|
||||||
if (hp == NULL) {
|
if (hp == NULL) {
|
||||||
fprintf(stderr, "Out of memory adding line to the history table #0\n");
|
fprintf(stderr,
|
||||||
|
"Out of memory adding line to the history table #0\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hp->next = NULL;
|
hp->next = NULL;
|
||||||
@@ -754,7 +755,8 @@ hist_saveline(char *line, int len)
|
|||||||
hp->len = len;
|
hp->len = len;
|
||||||
hp->data = malloc(len);
|
hp->data = malloc(len);
|
||||||
if (hp->data == NULL) {
|
if (hp->data == NULL) {
|
||||||
fprintf(stderr, "Out of memory adding line to the history table #1\n");
|
fprintf(stderr,
|
||||||
|
"Out of memory adding line to the history table #1\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy(hp->data, line, len);
|
memcpy(hp->data, line, len);
|
||||||
|
19
lib_calc.c
19
lib_calc.c
@@ -146,6 +146,9 @@ char *home = NULL; /* $HOME or default */
|
|||||||
char *pager = NULL; /* $PAGER or default */
|
char *pager = NULL; /* $PAGER or default */
|
||||||
char *shell = NULL; /* $SHELL or default */
|
char *shell = NULL; /* $SHELL or default */
|
||||||
char *calc_history = NULL; /* $CALCHISTFILE or ~/.calc_history */
|
char *calc_history = NULL; /* $CALCHISTFILE or ~/.calc_history */
|
||||||
|
char *calc_helpdir = NULL; /* $CALCHELP or /usr/local/share/calc/help */
|
||||||
|
/* $CALCCUSTOMHELP or /usr/local/share/calc/custhelp */
|
||||||
|
char *calc_customhelpdir = NULL;
|
||||||
int stdin_tty = FALSE; /* TRUE if stdin is a tty */
|
int stdin_tty = FALSE; /* TRUE if stdin is a tty */
|
||||||
int havecommands = FALSE; /* TRUE if have one or more cmd args */
|
int havecommands = FALSE; /* TRUE if have one or more cmd args */
|
||||||
long stoponerror = 0; /* >0 => stop, <0 => continue, ==0 => use -c */
|
long stoponerror = 0; /* >0 => stop, <0 => continue, ==0 => use -c */
|
||||||
@@ -553,6 +556,22 @@ initenv(void)
|
|||||||
calc_history = (c ? strdup(c) : NULL);
|
calc_history = (c ? strdup(c) : NULL);
|
||||||
if (calc_history == NULL || *calc_history == '\0')
|
if (calc_history == NULL || *calc_history == '\0')
|
||||||
calc_history = NULL; /* will use ~/.calc_history */
|
calc_history = NULL; /* will use ~/.calc_history */
|
||||||
|
|
||||||
|
/* determine the $CALCHELP value */
|
||||||
|
c = (no_env ? NULL : getenv(CALCHELP));
|
||||||
|
calc_helpdir = (c ? strdup(c) : NULL);
|
||||||
|
if (calc_helpdir == NULL || *calc_helpdir == '\0') {
|
||||||
|
/* will use /usr/local/share/calc/help */
|
||||||
|
calc_helpdir = HELPDIR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* determine the $CALCCUSTOMHELP value */
|
||||||
|
c = (no_env ? NULL : getenv(CALCCUSTOMHELP));
|
||||||
|
calc_customhelpdir = (c ? strdup(c) : NULL);
|
||||||
|
if (calc_customhelpdir == NULL || *calc_customhelpdir == '\0') {
|
||||||
|
/* will use /usr/local/share/calc/custhelp */
|
||||||
|
calc_customhelpdir = CUSTOMHELPDIR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -79,4 +79,10 @@ EXTERN unsigned long calc_warn_cnt;
|
|||||||
*/
|
*/
|
||||||
EXTERN char *calc_history;
|
EXTERN char *calc_history;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* calc help
|
||||||
|
*/
|
||||||
|
EXTERN char *calc_helpdir;
|
||||||
|
EXTERN char *calc_customhelpdir;
|
||||||
|
|
||||||
#endif /* !INCLUDE_MATH_ERROR_H */
|
#endif /* !INCLUDE_MATH_ERROR_H */
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* http://www.isthe.com/chongo/tech/comp/fnv/index.html
|
* http://www.isthe.com/chongo/tech/comp/fnv/index.html
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2007,2014 Landon Curt Noll
|
* Copyright (C) 1999-2007,2014,2021 Landon Curt Noll
|
||||||
*
|
*
|
||||||
* Calc is open software; you can redistribute it and/or modify it under
|
* Calc is open software; you can redistribute it and/or modify it under
|
||||||
* the terms of the version 2.1 of the GNU Lesser General Public License
|
* the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -73,7 +73,7 @@ S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val);
|
|||||||
* Landon Curt Noll (http://www.isthe.com/chongo/)
|
* Landon Curt Noll (http://www.isthe.com/chongo/)
|
||||||
*
|
*
|
||||||
* improved on their algorithm. Some people tried this hash
|
* improved on their algorithm. Some people tried this hash
|
||||||
* and found that it worked rather well. In an EMail message
|
* and found that it worked rather well. In an Email message
|
||||||
* to Landon, they named it ``Fowler/Noll/Vo'' or the FNV hash.
|
* to Landon, they named it ``Fowler/Noll/Vo'' or the FNV hash.
|
||||||
*
|
*
|
||||||
* FNV hashes are architected to be fast while maintaining a low
|
* FNV hashes are architected to be fast while maintaining a low
|
||||||
|
4
rpm.mk
4
rpm.mk
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# rpm.mk - Makefile for building rpm packages for calc
|
# rpm.mk - Makefile for building rpm packages for calc
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003,2014 Petteri Kettunen and Landon Curt Noll
|
# Copyright (C) 2003,2014,2021 Petteri Kettunen and Landon Curt Noll
|
||||||
#
|
#
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
# Calc is open software; you can redistribute it and/or modify it under
|
||||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#
|
#
|
||||||
MAKEFILE_REV= $$Revision: 30.15 $$
|
|
||||||
#
|
|
||||||
# Under source code control: 2003/02/16 20:21:39
|
# Under source code control: 2003/02/16 20:21:39
|
||||||
# File existed as early as: 2003
|
# File existed as early as: 2003
|
||||||
#
|
#
|
||||||
|
4
seed.c
4
seed.c
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* seed - produce a pseudo-random seeds
|
* seed - produce a pseudo-random seeds
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2007 Landon Curt Noll
|
* Copyright (C) 1999-2007,2021 Landon Curt Noll
|
||||||
*
|
*
|
||||||
* Calc is open software; you can redistribute it and/or modify it under
|
* Calc is open software; you can redistribute it and/or modify it under
|
||||||
* the terms of the version 2.1 of the GNU Lesser General Public License
|
* the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -191,7 +191,7 @@ prvate_hash64_buf(char *buf, unsigned len)
|
|||||||
* Landon Curt Noll (http://www.isthe.com/chongo/)
|
* Landon Curt Noll (http://www.isthe.com/chongo/)
|
||||||
*
|
*
|
||||||
* improved on their algorithm. Some people tried this hash
|
* improved on their algorithm. Some people tried this hash
|
||||||
* and found that it worked rather well. In an EMail message
|
* and found that it worked rather well. In an Email message
|
||||||
* to Landon, they named it ``Fowler/Noll/Vo'' or the FNV hash.
|
* to Landon, they named it ``Fowler/Noll/Vo'' or the FNV hash.
|
||||||
*
|
*
|
||||||
* FNV hashes are architected to be fast while maintaining a low
|
* FNV hashes are architected to be fast while maintaining a low
|
||||||
|
@@ -44,8 +44,8 @@ static char *program;
|
|||||||
|
|
||||||
#define MAJOR_VER 2 /* major library version */
|
#define MAJOR_VER 2 /* major library version */
|
||||||
#define MINOR_VER 12 /* minor library version */
|
#define MINOR_VER 12 /* minor library version */
|
||||||
#define MAJOR_PATCH 7 /* major software level under library version */
|
#define MAJOR_PATCH 8 /* major software version level */
|
||||||
#define MINOR_PATCH 6 /* minor software level or 0 if not patched */
|
#define MINOR_PATCH 0 /* minor software version level */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user