diff --git a/.gitignore b/.gitignore index faf403b..4421751 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,7 @@ help/bugs help/builtin help/change help/changes +help/contrib help/copy help/cscript help/custom_cal @@ -76,6 +77,8 @@ help/funclist.c help/libcalc help/man help/new_custom +help/question +help/questions help/resource help/type help/usage diff --git a/BUGS b/BUGS index 86c28c8..6e885a8 100644 --- a/BUGS +++ b/BUGS @@ -1,12 +1,12 @@ If you notice something wrong, strange or broken, try rereading: - README.FIRST - HOWTO.INSTALL - BUGS (this file) + README.FIRST + HOWTO.INSTALL + BUGS (this file) 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: @@ -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! +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 configuration, try backing them out and see if things get better. -To be sure that your version of calc is up to date, check out: - - http://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, +then it may be time to send in a bug report. =-= -If you have tried all of the above and things still are not right, -then it may be time to send in a bug report. You can send bug -and bug fixes reports to: +The BEST WAY TO SEND IN A BUG REPORT is via calc GitHub issue URL: - 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 - following phase in your EMail Subject line: +If you don't see your issue addressed, then on the above +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 - to the calc-tester mailing list (see below) and then to - send your report to that mailing list as a wider set calc - testers may be able to help you. +If you prefer to not use GitHub, then you +may send bug and bug fixes reports to: -When you send your report, please include the following information: + calc-bugrept-mail at asthe dot com - * a description of the problem - * 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: + NOTE: Remove spaces and replace 'at' with @, 'dot' with . - make debug > debug.out 2>&1 (sh, ksh, bash users) - make debug >& debug.out (csh, tcsh users) + NOTE: This replaces the old calc-bugs at asthe dot com address. - 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). =-= -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. 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 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: - - 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 +## 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 diff --git a/CHANGES b/CHANGES index 2d99c83..a9de506 100644 --- a/CHANGES +++ b/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 & 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. Fixed spaces vs tabs and use FALLTHRU as it's used elsewhere. Fixed one FALLTHRU comment that was inconsistent with others. - <> + <> Fixed minor typo on help/power. <> @@ -64,7 +121,7 @@ The following are the changes from calc version 2.12.7.1 to date: by the $CALCHISTFILE environment variable. 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). 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: - 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: 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, 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 at asthe dot com for the calc tester mailing list. Replaced explicit Email addresses found this file with the 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. -## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License diff --git a/CONTRIB-CODE b/CONTRIB-CODE new file mode 100644 index 0000000..b32edd5 --- /dev/null +++ b/CONTRIB-CODE @@ -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 /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/COPYING b/COPYING index 735c187..9e6d483 100644 --- a/COPYING +++ b/COPYING @@ -49,65 +49,6 @@ Calc is covered by the GNU Lesser General Public License Boston, MA 02110-1301 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 ------------------------------------------------------------ diff --git a/Makefile b/Makefile index 44b250a..a491182 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,6 @@ # comments, this Makefile differs from the non-rpm bzip2-ed tarball # source Makefile in the following ways: # -# MAKEFILE_REV= $$Revision: 30.26 $$ # CCWERR= -Werror # USE_READLINE= -DUSE_READLINE # READLINE_LIB= -lreadline -lhistory -lncurses @@ -710,6 +709,9 @@ chk: # # debug # +# make calcinfo: +# * print information about the host ane compile environment +# # make env: # * print major Makefile variables # @@ -727,6 +729,11 @@ chk: # * 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: ${V} echo '=-=-=-=-= private Makefile $@ rule start =-=-=-=-=' ${Q} ${MAKE} ${XARG} -f ${MAKE_FILE} $@ ${XVAR} diff --git a/Makefile.ship b/Makefile.ship index b90da71..6ffd6b4 100644 --- a/Makefile.ship +++ b/Makefile.ship @@ -23,7 +23,7 @@ # READLINE_LIB= -lreadline # 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 # 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. # 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 # 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=. DYLD_LIBRARY_PATH=. +CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=. DYLD_LIBRARY_PATH=. CALCHELP=./help \ + CALCCUSTOMHELP=./custom #CALC_ENV= CALCPATH=./cal DYLD_LIBRARY_PATH=. \ # MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ # MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 LD_LIBRARY_PATH=.:./custom @@ -1054,7 +1053,7 @@ EXT= # The default calc versions # -VERSION= 2.12.7.6 +VERSION= 2.12.8.0 # Names of shared libraries with versions # @@ -1064,34 +1063,39 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # standard utilities used during make # SHELL= /bin/sh -LANG= C -MAKE= make +AR= ar AWK= awk -SED= sed -DIFF= diff -GREP= egrep -SORT= sort -TEE= tee -CTAGS= ctags +CAT= cat CHMOD= chmod -FMT= fmt -XARGS= xargs 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 +MV= mv +PWDCMD= pwd +RM= rm +RMDIR= rmdir +SED= sed +SORT= sort SPLINT= splint SPLINT_OPTS= -RM= rm +TEE= tee TOUCH= touch -RMDIR= rmdir -CP= cp -MV= mv -CO= co -AR= ar TRUE= true -CAT= cat -COL= col -LN= ln -LDCONFIG= ldconfig +UNAME= uname +XARGS= xargs + # assume the X11 makedepend tool for the depend rule MAKEDEPEND= makedepend STRIP= strip @@ -1202,7 +1206,7 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS} # # # 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. # ########################################################################## @@ -2084,7 +2088,7 @@ LICENSE= COPYING COPYING-LGPL # DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README.FIRST \ 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 # @@ -2322,6 +2326,7 @@ calc.1: calc.man ${MAKE_FILE} -e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \ -e 's,$${CUSTOMCALDIR},${CUSTOMCALDIR},g' \ -e 's,$${CUSTOMINCDIR},${CUSTOMINCDIR},g' \ + -e 's,$${HELPDIR},${HELPDIR},g' \ -e 's,$${CUSTOMHELPDIR},${CUSTOMHELPDIR},g' \ -e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1 ${Q} echo calc.1 formed @@ -2333,7 +2338,7 @@ calc.usage: calc.1 ${MAKE_FILE} LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \ else \ ${NROFF} -man calc.1; \ - fi | ${COL} -b > $@ + fi 2>&1 | ${GREP} -v 'cannot adjust line' | ${COL} -b > $@ ${Q} echo calc.usage formed @@ -4033,6 +4038,9 @@ chk: ./cal/regress.cal # # debug # +# make calcinfo: +# * print information about the host ane compile environment +# # make env: # * print major Makefile variables # @@ -4047,6 +4055,53 @@ chk: ./cal/regress.cal # * 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: @echo '=-=-=-=-= dumping major make variables =-=-=-=-=' @echo 'ALIGN32=${ALIGN32}'; echo '' @@ -4097,6 +4152,7 @@ env: @echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo '' @echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo '' @echo 'C_SRC=${C_SRC}'; echo '' + @echo 'DATE=${DATE}'; echo '' @echo 'DEBUG=${DEBUG}'; echo '' @echo 'DEFAULT_LIB_INSTALL_PATH=${DEFAULT_LIB_INSTALL_PATH}'; echo '' @echo 'DEV_BITS=${DEV_BITS}'; echo '' @@ -4134,6 +4190,7 @@ env: @echo 'HAVE_VSNPRINTF=${HAVE_VSNPRINTF}'; echo '' @echo 'HELPDIR=${HELPDIR}'; echo '' @echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo '' + @echo 'HOSTNAME=${HOSTNAME}'; echo '' @echo 'H_SRC=${H_SRC}'; echo '' @echo 'ICFLAGS=${ICFLAGS}'; echo '' @echo 'ILDFLAGS=${ILDFLAGS}'; echo '' @@ -4157,7 +4214,6 @@ env: @echo 'LONG_BITS=${LONG_BITS}'; echo '' @echo 'MAKE=${MAKE}'; echo '' @echo 'MAKEDEPEND=${MAKEDEPEND}'; echo '' - @echo 'MAKEFILE_REV=${MAKEFILE_REV}'; echo '' @echo 'MAKE_FILE=${MAKE_FILE}'; echo '' @echo 'MANDIR=${MANDIR}'; echo '' @echo 'MANEXT=${MANEXT}'; echo '' @@ -4170,6 +4226,8 @@ env: @echo 'OBJS=${OBJS}'; echo '' @echo 'OFF_T_BITS=${OFF_T_BITS}'; echo '' @echo 'PURIFY=${PURIFY}'; echo '' + @echo 'PWD=${PWD}'; echo '' + @echo 'PWDCMD=${PWDCMD}'; echo '' @echo 'Q=${Q}'; echo '' @echo 'RANLIB=${RANLIB}'; echo '' @echo 'READLINE_EXTRAS=${READLINE_EXTRAS}'; echo '' @@ -4196,11 +4254,12 @@ env: @echo 'TOP_MAKE_FILE=${TOP_MAKE_FILE}'; echo '' @echo 'TOUCH=${TOUCH}'; echo '' @echo 'TRUE=${TRUE}'; echo '' + @echo 'UNAME=${UNAME}'; echo '' @echo 'USE_READLINE=${USE_READLINE}'; 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_OBJS=${UTIL_OBJS}'; echo '' - @echo 'UTIL_FILES=${UTIL_FILES}'; echo '' @echo 'UTIL_PROGS=${UTIL_PROGS}'; echo '' @echo 'UTIL_TMP=${UTIL_TMP}'; echo '' @echo 'V=${V}'; echo '' @@ -4222,7 +4281,7 @@ mkdebug: env version.c @echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-=' @echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -debug: env +debug: calcinfo env @echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' @echo '=-=-=-= Invoking ${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 -n '=-=-=-= Print #defile values if custom functions ' @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 '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-=' @echo '=-=-= this may take a while =-=-=' @@ -5449,6 +5508,7 @@ help.o: have_string.h help.o: have_unistd.h help.o: help.c help.o: longbits.h +help.o: lib_calc.h help.o: nametype.h help.o: qmath.h help.o: sha1.h diff --git a/QUESTIONS b/QUESTIONS new file mode 100644 index 0000000..2d160f9 --- /dev/null +++ b/QUESTIONS @@ -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 /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/README.FIRST b/README.FIRST index 204d990..3bf9b8b 100644 --- a/README.FIRST +++ b/README.FIRST @@ -32,30 +32,30 @@ something that you type in. For list of help topics: - > help + ; help For overview of calc overview: - > help intro - > help overview - > help command - > help define - > help statement - > help variable - > help usage + ; help intro + ; help overview + ; help command + ; help define + ; help statement + ; help variable + ; help usage For list of builtin functions: - > help builtin + ; help builtin 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. 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. -=-= +-=- -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, - 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. +for information about how to report a bug. -=- -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 - 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. +for information about how to ask a question. -=- -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'. - -## Copyright (C) 1999,2014,2017 Landon Curt Noll +## Copyright (C) 1999,2014,2017,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 diff --git a/cal/README b/cal/README index 62def45..810bc7c 100644 --- a/cal/README +++ b/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 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, @@ -1816,7 +1779,7 @@ zeta2.cal 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 ## diff --git a/calc.c b/calc.c index 576b6dd..b5bbb13 100644 --- a/calc.c +++ b/calc.c @@ -1,7 +1,8 @@ /* * 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 * @@ -403,7 +404,7 @@ main(int argc, char **argv) " long"); exit(18); } - /* XXX What if *cp = '\''? */ + /* XXX - what if *cp = '\''? */ *bp++ = '\''; strncpy(bp, cp, len+1); bp += len; diff --git a/calc.h b/calc.h index 180b464..517c764 100644 --- a/calc.h +++ b/calc.h @@ -49,6 +49,8 @@ #define PAGER "PAGER" /* environment variable for help */ #define SHELL "SHELL" /* environment variable for shell */ #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 DEFAULTCALCHELP "help" /* help file that -h prints */ #define DEFAULTSHELL "sh" /* default shell to use */ diff --git a/calc.man b/calc.man index 9b3bbf2..e123c27 100644 --- a/calc.man +++ b/calc.man @@ -24,7 +24,7 @@ .\" calculator by David I. Bell .\" man page by Landon Noll .\" -.TH calc 1 "^..^" "2007-02-06" +.TH calc 1 "^..^" "Share and enjoy! :-)" .SH NAME calc \- arbitrary precision calculator .SH SYNOPSIS @@ -226,7 +226,7 @@ This flag is required when using calc in It must be at the end of the initial .B #! line of the script -and must be immedately preceeded by the +and must be immediately preceded by the .B \-s flag. .sp 1 @@ -1111,6 +1111,18 @@ Default value: ~/.calc_history .sp This variable is not used if calc was compiled with GNU-readline support. .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 \& .br @@ -1120,7 +1132,7 @@ was written by David I. Bell. .sp The .B calc -primary mirror, calc mailing list and calc bug report +primary mirror, and calc bug report processing is performed by Landon Curt Noll. .sp Landon Curt Noll maintains the master reference source, performs @@ -1199,76 +1211,71 @@ This man page is: .sp .in +0.5i .nf -Copyright (C) 1999 Landon Curt Noll +Copyright (C) 1999-2021 Landon Curt Noll .fi .in -0.5i .sp and is covered under version 2.1 GNU Lesser General Public License. .sp -.SH "CALC MAILING LIST / CALC UPDATES / ENHANCEMENTS" +.SH "CALC QUESTIONS" \& .br +If you have a simple general question about calc, send Email to: .sp -To contribute comments, suggestions, enhancements -and interesting -.B calc -resource files, and -shell scripts please join the calc-tester -low volume moderated calc mailing list. +.in +0.5i +calc-quest-mail at asthe dot com .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 .in +0.5i .nf -https://www.listbox.com/subscribe/?list_id=239342 +http://www.isthe.com/chongo/tech/comp/calc/calc-question.html .fi .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 .sp -If you need a human to help you with your mailing list subscription, -or if you have problems with the above procedure, please -send EMail to our special address: +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. .sp -.in +0.5i -.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. +Please be patient as we cannot always respond to Email messages quickly. .sp .SH "BUG REPORTS / BUG FIXES" \& @@ -1278,28 +1285,51 @@ Send bug reports and bug fixes to: .sp .in +0.5i .nf -calc-bug-report 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'. +calc-bugrept 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 -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 .in +0.5i .nf -calc bug report +http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html .fi .in -0.5i +.in -0.5i .sp -You may have additional words in your subject line. -.in -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. +.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 See the .I BUGS @@ -1315,6 +1345,135 @@ help bugs .sp for more information about bug reporting. .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" \& .br diff --git a/cscript/README.src b/cscript/README.src index a949b31..f12fe86 100644 --- a/cscript/README.src +++ b/cscript/README.src @@ -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 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. -## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License diff --git a/custom/Makefile b/custom/Makefile index c8f50f1..4af7020 100644 --- a/custom/Makefile +++ b/custom/Makefile @@ -2,7 +2,7 @@ # # 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 # the terms of the version 2.1 of the GNU Lesser General Public License @@ -348,7 +348,7 @@ EXT= # The default calc versions # -VERSION= 2.12.7.6 +VERSION= 2.12.8.0 # Names of shared libraries with versions # @@ -493,7 +493,7 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} # # # 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. # ########################################################################## diff --git a/custom/Makefile.head b/custom/Makefile.head index ea843a1..a9cca1e 100644 --- a/custom/Makefile.head +++ b/custom/Makefile.head @@ -2,7 +2,7 @@ # # 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 # the terms of the version 2.1 of the GNU Lesser General Public License @@ -348,7 +348,7 @@ EXT= # The default calc versions # -VERSION= 2.12.7.6 +VERSION= 2.12.8.0 # Names of shared libraries with versions # diff --git a/custom/pmodm127 b/custom/pmodm127 index 2d248c2..35fb68a 100644 --- a/custom/pmodm127 +++ b/custom/pmodm127 @@ -25,7 +25,7 @@ DESCRIPTION SPECIAL NOTE: 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: http://www.isthe.com/chongo/address.html @@ -51,7 +51,7 @@ LIBRARY SEE ALSO 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 ## the terms of the version 2.1 of the GNU Lesser General Public License diff --git a/file.c b/file.c index fc29f50..e283972 100644 --- a/file.c +++ b/file.c @@ -1,7 +1,7 @@ /* * 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 * @@ -1416,21 +1416,22 @@ z2filepos(ZVALUE zpos) #if FILEPOS_BITS == FULL_BITS /* ztofull puts the value into native byte order */ 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))); return ret; #elif FILEPOS_BITS < FULL_BITS /* ztofull puts the value into native byte order */ 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))); return ret; #else /* FILEPOS_BITS > FULL_BITS */ if (!zgtmaxfull(zpos)) { /* ztofull puts the value into native byte order */ pos = ztofull(zpos); - memset(&ret, 0, sizeof(ret)); /* on some hosts, FILEPOS is not a scalar */ - memcpy((void *)&ret, (void *)&pos, MIN(sizeof(ret), sizeof(pos))); + memset(&ret, 0, sizeof(ret)); /* FILEPOS could be non-scalar */ + memcpy((void *)&ret, (void *)&pos, + MIN(sizeof(ret), sizeof(pos))); return ret; } @@ -1439,12 +1440,13 @@ z2filepos(ZVALUE zpos) */ if (zpos.len >= FILEPOS_BITS/BASEB) { /* 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); } else { /* copy what bits we can into the temp value */ - memset(&tmp, 0, sizeof(tmp)); /* on some hosts, FILEPOS is not a scalar */ - memcpy(&tmp, zpos.v, MIN(sizeof(tmp), MIN(zpos.len*BASEB/8, FILEPOS_LEN))); + memset(&tmp, 0, sizeof(tmp)); /* FILEPOS could be non-scalar */ + memcpy(&tmp, zpos.v, MIN(sizeof(tmp), + MIN(zpos.len*BASEB/8, FILEPOS_LEN))); } /* swap into native byte order */ SWAP_HALF_IN_FILEPOS(&ret, &tmp); diff --git a/func.c b/func.c index 56a1879..b81775d 100644 --- a/func.c +++ b/func.c @@ -1,7 +1,8 @@ /* * 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 * @@ -7710,7 +7711,8 @@ f_putenv(int count, VALUE **vals) math_error("Cannot allocate string in putenv"); /*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'; } diff --git a/help.c b/help.c index 7722243..f3120ec 100644 --- a/help.c +++ b/help.c @@ -32,6 +32,7 @@ #include "calc.h" #include "conf.h" +#include "lib_calc.h" #include "have_unistd.h" #if defined(HAVE_UNISTD_H) @@ -78,6 +79,7 @@ STATIC struct help_alias { {"cd", "command"}, {"show", "command"}, {"stdlib", "resource"}, + {"question", "questions"}, {NULL, NULL} }; @@ -246,22 +248,13 @@ givehelp(char *type) /* * open the helpfile (looking in HELPDIR first) */ -#if defined(CUSTOM) - if (sizeof(CUSTOMHELPDIR) > sizeof(HELPDIR)) { - snprintf_len = sizeof(CUSTOMHELPDIR)+1+strlen(type) + 1; - } else { - snprintf_len = sizeof(HELPDIR)+1+strlen(type) + 1; - } + snprintf_len = strlen(calc_helpdir)+1+strlen(type) + 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) { - fprintf(stderr, "malloc failure in givehelp()\n"); + fprintf(stderr, "malloc failure in givehelp #0\n"); return; } - snprintf(helppath, snprintf_len, "%s/%s", HELPDIR, type); + snprintf(helppath, snprintf_len, "%s/%s", calc_helpdir, type); helppath[snprintf_len] = '\0'; /* paranoia */ stream = fopen(helppath, "r"); if (stream != NULL) { @@ -277,22 +270,30 @@ givehelp(char *type) * open the helpfile (looking in CUSTOMHELPDIR last) */ } 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); - helppath[snprintf_len] = '\0'; /* paranoia */ - stream = fopen(helppath, "r"); - if (stream == NULL) { + cust_snprintf_len = strlen(calc_customhelpdir)+1+strlen(type) + 1; + cust_helppath = (char *)malloc(cust_snprintf_len+1); + if (cust_helppath == 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, - "%s: no such help file, try: help help\n", - type); - } else { + /* + * we have the help file open, now display it + */ + page_file(stream); + (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 */ } @@ -300,5 +301,6 @@ givehelp(char *type) * cleanup */ free(helppath); + helppath = NULL; return; } diff --git a/help/Makefile b/help/Makefile index a59eff5..24437a9 100644 --- a/help/Makefile +++ b/help/Makefile @@ -2,7 +2,7 @@ # # 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 # 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 -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 @@ -405,6 +405,18 @@ bugs: ../BUGS ${TRUE}; \ 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 ${RM} -f $@ ${CAT} errorcodes.hdr > $@ @@ -505,6 +517,18 @@ COPYING-LGPL: ../COPYING-LGPL ${TRUE}; \ 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 ${RM} -f $@ ${CP} ../cscript/README $@ @@ -662,7 +686,7 @@ detail_help_list: ! -name mat ! -name obj.file ! -name operator \ ! -name overview ! -name script ! -name statement \ ! -name todo ! -name types ! -name unexpected \ - ! -name variable ! -name wishlist \ + ! -name variable ! -name wishlist ! -name question \ -print | \ while read i; do \ if [ X"$$i" != X"/dev/null" ]; then \ @@ -701,7 +725,7 @@ echo_inst_files: clean: ${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT} - ${RM} -f COPYING COPYING-LGPL + ${RM} -f COPYING COPYING-LGPL question clobber: clean ${RM} -f ${BLT_HELP_FILES} full .all calc diff --git a/help/contrib b/help/contrib deleted file mode 100644 index 0c3a643..0000000 --- a/help/contrib +++ /dev/null @@ -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 /\oo/\ http://www.isthe.com/chongo/ -## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/environment b/help/environment index e414988..8e51b19 100644 --- a/help/environment +++ b/help/environment @@ -101,6 +101,21 @@ Environment variables variable is an empty string, then ~/.calc_history 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 ## ## Calc is open software; you can redistribute it and/or modify it under diff --git a/help/intro b/help/intro index df2f82c..7a6410f 100644 --- a/help/intro +++ b/help/intro @@ -37,13 +37,13 @@ What is calc? 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 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) and the calculator will print: - 47385033654019111249345128555354223304 + 39614081257132168796771975167 For more complex calculations, variables can be used to save 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 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 ## the terms of the version 2.1 of the GNU Lesser General Public License diff --git a/help/todo b/help/todo index fe5bfbb..c4dd6ab 100644 --- a/help/todo +++ b/help/todo @@ -1,33 +1,5 @@ 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: @@ -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. - To be sure we see your EMail reporting a calc bug, please use the - following phase in your EMail Subject line: + To be sure we see your Email reporting a calc bug, please use the + following phase in your Email Subject line: calc bug report @@ -155,9 +127,9 @@ 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'. +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 ## the terms of the version 2.1 of the GNU Lesser General Public License diff --git a/help/wishlist b/help/wishlist index 65c436b..3a86988 100644 --- a/help/wishlist +++ b/help/wishlist @@ -4,34 +4,13 @@ Calc Enhancement Wish List: interesting calc scripts that you would like you see included in 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. - - 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. + ; help contrib =-= @@ -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. - To be sure we see your EMail reporting a calc bug, please use the - following phase in your EMail Subject line: + To be sure we see your Email reporting a calc bug, please use the + following phase in your Email Subject line: calc bug report @@ -232,9 +211,9 @@ 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'. +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 ## the terms of the version 2.1 of the GNU Lesser General Public License diff --git a/hist.c b/hist.c index 26ceeb7..1ca5c7b 100644 --- a/hist.c +++ b/hist.c @@ -1,7 +1,7 @@ /* * 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 * 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)); 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; } hp->next = NULL; @@ -754,7 +755,8 @@ hist_saveline(char *line, int len) hp->len = len; hp->data = malloc(len); 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; } memcpy(hp->data, line, len); diff --git a/lib_calc.c b/lib_calc.c index c18285c..75d045f 100644 --- a/lib_calc.c +++ b/lib_calc.c @@ -146,6 +146,9 @@ char *home = NULL; /* $HOME or default */ char *pager = NULL; /* $PAGER or default */ char *shell = NULL; /* $SHELL or default */ 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 havecommands = FALSE; /* TRUE if have one or more cmd args */ long stoponerror = 0; /* >0 => stop, <0 => continue, ==0 => use -c */ @@ -553,6 +556,22 @@ initenv(void) calc_history = (c ? strdup(c) : NULL); if (calc_history == NULL || *calc_history == '\0') 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; + } } diff --git a/lib_calc.h b/lib_calc.h index 2a510c4..349f73f 100644 --- a/lib_calc.h +++ b/lib_calc.h @@ -79,4 +79,10 @@ EXTERN unsigned long calc_warn_cnt; */ EXTERN char *calc_history; +/* + * calc help + */ +EXTERN char *calc_helpdir; +EXTERN char *calc_customhelpdir; + #endif /* !INCLUDE_MATH_ERROR_H */ diff --git a/quickhash.c b/quickhash.c index 0154afa..72b9704 100644 --- a/quickhash.c +++ b/quickhash.c @@ -6,7 +6,7 @@ * * 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 * 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/) * * 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. * * FNV hashes are architected to be fast while maintaining a low diff --git a/rpm.mk b/rpm.mk index 068aaad..5960465 100644 --- a/rpm.mk +++ b/rpm.mk @@ -3,7 +3,7 @@ # # 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 # 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. # 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 # File existed as early as: 2003 # diff --git a/seed.c b/seed.c index a5de839..c9c4653 100644 --- a/seed.c +++ b/seed.c @@ -1,7 +1,7 @@ /* * 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 * 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/) * * 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. * * FNV hashes are architected to be fast while maintaining a low diff --git a/version.c b/version.c index a52a3b5..a204206 100644 --- a/version.c +++ b/version.c @@ -44,8 +44,8 @@ static char *program; #define MAJOR_VER 2 /* major library version */ #define MINOR_VER 12 /* minor library version */ -#define MAJOR_PATCH 7 /* major software level under library version */ -#define MINOR_PATCH 6 /* minor software level or 0 if not patched */ +#define MAJOR_PATCH 8 /* major software version level */ +#define MINOR_PATCH 0 /* minor software version level */ /*