From 1ae2f953d3e7f721a87f047ef12e105235c57e39 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 12 Oct 2014 05:54:17 -0700 Subject: [PATCH] Release calc version 2.12.5.0 --- BUGS | 60 +++++++++++++++++++++-------- CHANGES | 69 ++++++++++++++++++++++++++++++++-- COPYING | 65 ++++++++++++++++++++------------ Makefile | 60 +++-------------------------- Makefile.simple | 60 +++-------------------------- README | 66 ++++++++++++++++++-------------- assocfunc.c | 6 +-- cal/README | 46 +++++++++++++++++++---- calc.man | 85 ++++++++++++++++++++++++++---------------- cscript/README.src | 44 +++++++++++++++++----- custom/Makefile | 8 ++-- custom/Makefile.head | 8 ++-- custom/Makefile.simple | 8 ++-- func.c | 6 +-- help/contrib | 74 ++++++++++++++++++++++++------------ help/hash | 22 ++++++++--- help/todo | 74 +++++++++++++++++++++++++++--------- help/wishlist | 73 +++++++++++++++++++++++++++++------- quickhash.c | 21 +++++++---- seed.c | 37 ++++++++++-------- version.c | 18 +++------ zmath.h | 12 +++--- 22 files changed, 575 insertions(+), 347 deletions(-) diff --git a/BUGS b/BUGS index 81578b7..0529f42 100644 --- a/BUGS +++ b/BUGS @@ -32,16 +32,25 @@ 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: - calc-bugs at asthe dot com + calc-bug-report at asthe dot com - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe', the web site URL uses 'isthe' ]] + NOTE: Remove spaces and replace 'at' with @, 'dot' with . -Your subject must contain the words: + This replaces the old calc-bugs at asthe dot com address. - calc bug report + To be sure we see your EMail reporting a calc bug, please use the + following phase in your EMail Subject line: -You may have additional words in your 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 below) and then 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: @@ -77,14 +86,6 @@ Known bugs: =-= -Problems that have known work-a-rounds: - - * There is a bug in gcc v4.1.0 that causes calc to fail the regression - test. The work-a-round is to compile with gcc v4.1.1 or later. This - problems was observed on Fedora 5. - -=-= - mis-features in calc: Some problems are not bugs but rather mis-features / things that could @@ -132,6 +133,33 @@ mis-features in calc: will not. +=-= + +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 ## ## Calc is open software; you can redistribute it and/or modify it under @@ -148,8 +176,8 @@ mis-features in calc: ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.3 $ -## @(#) $Id: BUGS,v 30.3 2014/09/07 06:20:41 chongo Exp $ +## @(#) $Revision: 30.5 $ +## @(#) $Id: BUGS,v 30.5 2014/10/12 12:23:43 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/RCS/BUGS,v $ ## ## Under source code control: 1994/03/18 14:06:13 diff --git a/CHANGES b/CHANGES index 35c003d..5ed5e6e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,66 @@ +The following are the changes from calc version 2.12.5.0 to date: + + 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 + + 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 following makefile rules that were related to printing the + upper values of the calc version, rules that were made obsolete + in calc version 2.12.4.14, have been removed: + + calc_vers calc_ver calc_ve + vers ver ve + + Noted that the hash() builtin function, internally known as + quickhash (used for internal objects such as the associative + arrays as well as other internal processes) uses the deprcated + 32-bit FNV-0 hash. The use of this deprecated hash is sufficient + for calc internal purposes. Use of FNV-1a is recommended for + a general non-cryptographic quick hash. + + The following are the changes from calc version 2.12.4.14 to date: For Apple OS X / Darwin target: @@ -7027,7 +7090,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 Landon Curt Noll +## Copyright (C) 2001-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 @@ -7043,8 +7106,8 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1: ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.44 $ -## @(#) $Id: CHANGES,v 30.44 2014/09/22 03:40:07 chongo Exp $ +## @(#) $Revision: 30.46 $ +## @(#) $Id: CHANGES,v 30.46 2014/10/12 12:46:23 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/RCS/CHANGES,v $ ## ## Under source code control: 1993/06/02 18:12:57 diff --git a/COPYING b/COPYING index 04b2e4b..28f309d 100644 --- a/COPYING +++ b/COPYING @@ -6,14 +6,14 @@ This file is Copyrighted This file is covered under the following Copyright: - Copyright (C) 1999-2008 Landon Curt Noll + Copyright (C) 1999-2014 Landon Curt Noll All rights reserved. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - # @(#) $Revision: 30.4 $ - # @(#) $Id: COPYING,v 30.4 2013/09/01 20:14:30 chongo Exp $ + # @(#) $Revision: 30.6 $ + # @(#) $Id: COPYING,v 30.6 2014/10/12 12:23:43 chongo Exp $ # @(#) $Source: /usr/local/src/bin/calc/RCS/COPYING,v $ -=- @@ -53,45 +53,62 @@ Calc is covered by the GNU Lesser General Public License Boston, MA 02110-1301 USA - The contact addresses for calc is as follows: + To subscribe to the calc-tester mailing list, visit the following URL: - Web: http://www.isthe.com/chongo/tech/comp/calc/email.html + http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html - To join the low volume calc mailing list. Send a EMail message to: + This is a low volume moderated mailing list. - calc-tester-request at asthe dot com + This mailing list replaces calc-tester at asthe dot com list. - Your subject must contain the words: + If you need a human to help you with your mailing list subscription, + please send EMail to our special: - calc mailing list subscription + calc-tester-maillist-help at asthe dot com - You may have additional words in your subject line. + NOTE: Remove spaces and replace 'at' with @, 'dot' with . - Your message body (not the subject) should consist of: + 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: - subscribe calc-tester address - end - name your_full_name + calc tester mailing list help - where ``address'' is your EMail address and ``your_full_name'' is - your full name. - - Feel free to follow the name line with additional EMail text as desired. + 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-bugs at asthe dot com + calc-bug-report at asthe dot com - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + NOTE: Remove spaces and replace 'at' with @, 'dot' with . - Your subject must contain the words: + This replaces the old calc-bugs at asthe dot com address. - calc bug report + To be sure we see your EMail reporting a calc bug, please use the + following phase in your EMail Subject line: - You may have additional words in your 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'. -=- diff --git a/Makefile b/Makefile index 6c947f3..f90c9a1 100644 --- a/Makefile +++ b/Makefile @@ -39,8 +39,8 @@ # 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.75 $$ -# @(#) $Id: Makefile.ship,v 30.75 2014/09/21 14:09:18 chongo Exp $ +MAKEFILE_REV= $$Revision: 30.78 $$ +# @(#) $Id: Makefile.ship,v 30.78 2014/10/06 08:45:06 chongo Exp $ # @(#) $Source: /usr/local/src/bin/calc/RCS/Makefile.ship,v $ # # Under source code control: 1990/02/15 01:48:41 @@ -975,7 +975,7 @@ EXT= # The default calc versions # -VERSION= 2.12.4.14 +VERSION= 2.12.5.0 # Names of shared libraries with versions # @@ -984,7 +984,7 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # legacy partial versions are no longer used, only removed # -VERS= 2.12.4 +VERS= 2.12.5 VER= 2.12 VE= 2 LIB_EXT_VERS= ${LIB_EXT}.${VERS} @@ -2104,6 +2104,7 @@ calc.1: calc.man ${MAKE_FILE} ${Q} echo forming calc.1 from calc.man @${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \ -e 's,$${BINDIR},${BINDIR},g' \ + -e 's,$${VERSION},${VERSION},g' \ -e 's,$${CALCPATH},${CALCPATH},g' \ -e 's,$${SCRIPTDIR},${SCRIPTDIR},g' \ -e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \ @@ -3733,57 +3734,6 @@ ver_calc${EXT}: version.c have_unused.h ${RM} -f $@ ${LCC} ${ICFLAGS} -DCALC_VER ${ILDFLAGS} version.c -o $@ -### -# -# legacy partial versions are no longer used, only removed -# -# calc_vers: -# This rule is the most accurate as it uses calc source to -# produce the version value. This rule produces only a -# 3 level version string. -# -# calc_ver: -# This rule is the most accurate as it uses calc source to -# produce the version value. This rule produces only a -# 2 level version string. -# -# calc_ve: -# This rule is the most accurate as it uses calc source to -# produce the version value. This rule produces only a -# 1 level version string. -# -# vers: -# This rule simply echoes the value found in this makefile. -# This rule produces only a 3 level version string. -# -# ver: -# This rule simply echoes the value found in this makefile. -# This rule produces only a 2 level version string. -# -# ve: -# This rule simply echoes the value found in this makefile. -# This rule produces only a 1 level version string. -# -### - -calc_vers: ver_calc${EXT} - @./ver_calc${EXT} -V - -calc_ver: ver_calc${EXT} - @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*$$//' - -calc_ve: ver_calc${EXT} - @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*\.[^.]*$$//' - -vers: - @echo ${VERS} - -ver: - @echo ${VER} - -ve: - @echo ${VE} - ### # # File distribution list generation. You can ignore this section. diff --git a/Makefile.simple b/Makefile.simple index de301f1..63ecea4 100644 --- a/Makefile.simple +++ b/Makefile.simple @@ -39,8 +39,8 @@ # 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.75 $$ -# @(#) $Id: Makefile.ship,v 30.75 2014/09/21 14:09:18 chongo Exp $ +MAKEFILE_REV= $$Revision: 30.78 $$ +# @(#) $Id: Makefile.ship,v 30.78 2014/10/06 08:45:06 chongo Exp $ # @(#) $Source: /usr/local/src/bin/calc/RCS/Makefile.ship,v $ # # Under source code control: 1990/02/15 01:48:41 @@ -952,7 +952,7 @@ EXT= # The default calc versions # -VERSION= 2.12.4.14 +VERSION= 2.12.5.0 # Names of shared libraries with versions # @@ -961,7 +961,7 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # legacy partial versions are no longer used, only removed # -VERS= 2.12.4 +VERS= 2.12.5 VER= 2.12 VE= 2 LIB_EXT_VERS= ${LIB_EXT}.${VERS} @@ -1648,6 +1648,7 @@ calc.1: calc.man ${MAKE_FILE} ${Q} echo forming calc.1 from calc.man @${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \ -e 's,$${BINDIR},${BINDIR},g' \ + -e 's,$${VERSION},${VERSION},g' \ -e 's,$${CALCPATH},${CALCPATH},g' \ -e 's,$${SCRIPTDIR},${SCRIPTDIR},g' \ -e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \ @@ -3259,57 +3260,6 @@ ver_calc${EXT}: version.c have_unused.h ${RM} -f $@ ${LCC} ${ICFLAGS} -DCALC_VER ${ILDFLAGS} version.c -o $@ -### -# -# legacy partial versions are no longer used, only removed -# -# calc_vers: -# This rule is the most accurate as it uses calc source to -# produce the version value. This rule produces only a -# 3 level version string. -# -# calc_ver: -# This rule is the most accurate as it uses calc source to -# produce the version value. This rule produces only a -# 2 level version string. -# -# calc_ve: -# This rule is the most accurate as it uses calc source to -# produce the version value. This rule produces only a -# 1 level version string. -# -# vers: -# This rule simply echoes the value found in this makefile. -# This rule produces only a 3 level version string. -# -# ver: -# This rule simply echoes the value found in this makefile. -# This rule produces only a 2 level version string. -# -# ve: -# This rule simply echoes the value found in this makefile. -# This rule produces only a 1 level version string. -# -### - -calc_vers: ver_calc${EXT} - @./ver_calc${EXT} -V - -calc_ver: ver_calc${EXT} - @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*$$//' - -calc_ve: ver_calc${EXT} - @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*\.[^.]*$$//' - -vers: - @echo ${VERS} - -ver: - @echo ${VER} - -ve: - @echo ${VE} - ### # # File distribution list generation. You can ignore this section. diff --git a/README b/README index eac0e13..1824c3e 100644 --- a/README +++ b/README @@ -73,52 +73,64 @@ for a wish/todo list. Code contributions are welcome. =-= -To join the calc-tester mailing list. Send an EMail message to: +To subscribe to the calc-tester mailing list, visit the following URL: - calc-tester-request at asthe dot com + http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + This is a low volume moderated mailing list. -Your subject must contain the words: + This mailing list replaces calc-tester at asthe dot com list. - calc mailing list subscription + If you need a human to help you with your mailing list subscription, + please send EMail to our special: -You may have additional words in your subject line. + calc-tester-maillist-help at asthe dot com -Your message body (not the subject) should consist of: + NOTE: Remove spaces and replace 'at' with @, 'dot' with . - subscribe calc-tester address - end - name your_full_name + 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: -where ``address'' is your EMail address and ``your_full_name'' is -your full name. + calc tester mailing list help -Feel free to follow the name line with additional EMail text as desired. + 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. -=-= +-=- -Send Calc bug and bug fixes to: +Calc bug reports and calc bug fixes should be sent to: - calc-bugs at asthe dot com + calc-bug-report at asthe dot com - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + NOTE: Remove spaces and replace 'at' with @, 'dot' with . -but see the BUGS file first. + This replaces the old calc-bugs at asthe dot com address. -Your subject must contain the words: + To be sure we see your EMail reporting a calc bug, please use the + following phase in your EMail Subject line: - calc bug report + calc bug report -You may have additional words in your subject line. + 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/ + http://www.isthe.com/chongo/tech/comp/calc/ -## Copyright (C) 1999 Landon Curt Noll +NOTE: The EMail address uses 'asthe', while the web site uses 'isthe'. + +## 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 @@ -134,8 +146,8 @@ The calc web site is located at: ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.1 $ -## @(#) $Id: README,v 30.1 2007/03/16 11:09:46 chongo Exp $ +## @(#) $Revision: 30.3 $ +## @(#) $Id: README,v 30.3 2014/10/12 12:23:43 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/RCS/README,v $ ## ## Under source code control: 1995/10/25 05:27:59 diff --git a/assocfunc.c b/assocfunc.c index f230fe4..0c11361 100644 --- a/assocfunc.c +++ b/assocfunc.c @@ -17,8 +17,8 @@ * received a copy with calc; if not, write to Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 30.2 $ - * @(#) $Id: assocfunc.c,v 30.2 2013/08/11 08:41:38 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: assocfunc.c,v 30.3 2014/09/30 00:55:11 chongo Exp $ * @(#) $Source: /usr/local/src/bin/calc/RCS/assocfunc.c,v $ * * Under source code control: 1993/07/20 23:04:27 @@ -83,7 +83,7 @@ associndex(ASSOC *ap, BOOL create, long dim, VALUE *indices) * so that we can first select the correct hash chain, and * also so we can quickly compare each element for a match. */ - hash = FNV1_32_BASIS; + hash = QUICKHASH_BASIS; for (i = 0; i < dim; i++) hash = hashvalue(&indices[i], hash); diff --git a/cal/README b/cal/README index 508bc7b..16eb3db 100644 --- a/cal/README +++ b/cal/README @@ -35,12 +35,44 @@ 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 send it to: +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. - calc-contrib at asthe dot com +To subscribe to the calc-tester mailing list, visit the following URL: - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + 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, objects and variables. (The regress.cal and testxxx.cal regression test @@ -1766,7 +1798,7 @@ zeta2.cal for information on this special zeta function. -## Copyright (C) 2000 David I. Bell and Landon Curt Noll +## Copyright (C) 2000,2014 David I. Bell and Landon Curt Noll ## ## Primary author: Landon Curt Noll ## @@ -1784,8 +1816,8 @@ zeta2.cal ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.8 $ -## @(#) $Id: README,v 30.8 2013/09/02 01:46:05 chongo Exp $ +## @(#) $Revision: 30.9 $ +## @(#) $Id: README,v 30.9 2014/10/06 08:44:18 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/cal/RCS/README,v $ ## ## Under source code control: 1990/02/15 01:50:32 diff --git a/calc.man b/calc.man index 911583b..fa7b508 100644 --- a/calc.man +++ b/calc.man @@ -1,5 +1,5 @@ .\" -.\" Copyright (C) 1999-2007 Landon Curt Noll +.\" Copyright (C) 1999-2007,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 @@ -15,8 +15,8 @@ .\" received a copy with calc; if not, write to Free Software Foundation, Inc. .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" -.\" @(#) $Revision: 30.5 $ -.\" @(#) $Id: calc.man,v 30.5 2013/08/11 08:41:38 chongo Exp $ +.\" @(#) $Revision: 30.6 $ +.\" @(#) $Id: calc.man,v 30.6 2014/10/06 08:39:45 chongo Exp $ .\" @(#) $Source: /usr/local/src/bin/calc/RCS/calc.man,v $ .\" .\" Under source code control: 1991/07/23 05:48:26 @@ -1115,45 +1115,62 @@ To contribute comments, suggestions, enhancements and interesting .B calc resource files, and -shell scripts please join the low volume calc mailing list. +shell scripts please join the calc-tester +low volume moderated calc mailing list. .sp -To join the low volume calc mailing list, send EMail to: +To the calc-tester mailing list, visit the following URL: .sp .in +0.5i .nf -calc-tester-request at asthe dot com +https://www.listbox.com/subscribe/?list_id=239342 .fi .in -0.5i .sp -Your subject must contain the words: +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 -calc mailing list subscription +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: +.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. .sp -Your message body must contain: -.sp -.in +0.5i -.nf -subscribe calc-tester address -end -name your_full_name -.fi -.in -0.5i -.sp -where -.B address -s your EMail address and -.B your_full_name -is your full name. -Feel free to follow the -.B name -line with additional EMail text as desired. -.sp .SH "BUG REPORTS / BUG FIXES" \& .br @@ -1162,12 +1179,12 @@ Send bug reports and bug fixes to: .sp .in +0.5i .nf -calc-bugs at asthe dot com +calc-bug-report at asthe dot com -[[ NOTE: Replace 'at' with @, 'dot' is with . ]] -[[ and remove the spaces ]] -[[ NOTE: The EMail address uses 'asthe' and -[[ the web site URL uses 'isthe' ]] +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 @@ -1180,6 +1197,10 @@ calc bug report .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. .sp See the .I BUGS diff --git a/cscript/README.src b/cscript/README.src index 72df305..eb25dd3 100644 --- a/cscript/README.src +++ b/cscript/README.src @@ -43,20 +43,44 @@ This next example WRONG: # is is also wrong because the first line does not end in -f print "This example has invalid comments" -##### - -If you write something that you think is useful, please send it to: - - calc-contrib at asthe dot com - - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] +=-= For more info, see: help script help cscript +##### + +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 @@ -117,8 +141,8 @@ simple ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.3 $ -## @(#) $Id: README.src,v 30.3 2014/08/24 22:04:32 chongo Exp $ +## @(#) $Revision: 30.5 $ +## @(#) $Id: README.src,v 30.5 2014/10/12 12:23:43 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/cscript/RCS/README.src,v $ ## ## Under source code control: 1999/12/17 10:23:40 diff --git a/custom/Makefile b/custom/Makefile index 70a228e..ddc3022 100644 --- a/custom/Makefile +++ b/custom/Makefile @@ -18,8 +18,8 @@ # received a copy with calc; if not, write to Free Software Foundation, Inc. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 30.35 $ -# @(#) $Id: Makefile.head,v 30.35 2014/09/21 14:09:18 chongo Exp $ +# @(#) $Revision: 30.36 $ +# @(#) $Id: Makefile.head,v 30.36 2014/09/30 00:03:05 chongo Exp $ # @(#) $Source: /usr/local/src/bin/calc/custom/RCS/Makefile.head,v $ # # Under source code control: 1997/03/09 02:28:54 @@ -352,7 +352,7 @@ EXT= # The default calc versions # -VERSION= 2.12.4.14 +VERSION= 2.12.5.0 # Names of shared libraries with versions # @@ -361,7 +361,7 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # legacy partial versions are no longer used, only removed # -VERS= 2.12.4 +VERS= 2.12.5 VER= 2.12 VE= 2 LIB_EXT_VERS= ${LIB_EXT}.${VERS} diff --git a/custom/Makefile.head b/custom/Makefile.head index 38f834c..b94c936 100644 --- a/custom/Makefile.head +++ b/custom/Makefile.head @@ -18,8 +18,8 @@ # received a copy with calc; if not, write to Free Software Foundation, Inc. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 30.35 $ -# @(#) $Id: Makefile.head,v 30.35 2014/09/21 14:09:18 chongo Exp $ +# @(#) $Revision: 30.36 $ +# @(#) $Id: Makefile.head,v 30.36 2014/09/30 00:03:05 chongo Exp $ # @(#) $Source: /usr/local/src/bin/calc/custom/RCS/Makefile.head,v $ # # Under source code control: 1997/03/09 02:28:54 @@ -352,7 +352,7 @@ EXT= # The default calc versions # -VERSION= 2.12.4.14 +VERSION= 2.12.5.0 # Names of shared libraries with versions # @@ -361,7 +361,7 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # legacy partial versions are no longer used, only removed # -VERS= 2.12.4 +VERS= 2.12.5 VER= 2.12 VE= 2 LIB_EXT_VERS= ${LIB_EXT}.${VERS} diff --git a/custom/Makefile.simple b/custom/Makefile.simple index f9965e7..2adc986 100644 --- a/custom/Makefile.simple +++ b/custom/Makefile.simple @@ -18,8 +18,8 @@ # received a copy with calc; if not, write to Free Software Foundation, Inc. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 30.35 $ -# @(#) $Id: Makefile.head,v 30.35 2014/09/21 14:09:18 chongo Exp $ +# @(#) $Revision: 30.36 $ +# @(#) $Id: Makefile.head,v 30.36 2014/09/30 00:03:05 chongo Exp $ # @(#) $Source: /usr/local/src/bin/calc/custom/RCS/Makefile.head,v $ # # Under source code control: 1997/03/09 02:28:54 @@ -337,7 +337,7 @@ EXT= # The default calc versions # -VERSION= 2.12.4.14 +VERSION= 2.12.5.0 # Names of shared libraries with versions # @@ -346,7 +346,7 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # legacy partial versions are no longer used, only removed # -VERS= 2.12.4 +VERS= 2.12.5 VER= 2.12 VE= 2 LIB_EXT_VERS= ${LIB_EXT}.${VERS} diff --git a/func.c b/func.c index e6d03cd..26a4249 100644 --- a/func.c +++ b/func.c @@ -19,8 +19,8 @@ * received a copy with calc; if not, write to Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 30.10 $ - * @(#) $Id: func.c,v 30.10 2014/08/31 14:54:50 chongo Exp $ + * @(#) $Revision: 30.11 $ + * @(#) $Id: func.c,v 30.11 2014/09/30 00:55:11 chongo Exp $ * @(#) $Source: /usr/local/src/bin/calc/RCS/func.c,v $ * * Under source code control: 1990/02/15 01:48:15 @@ -1676,7 +1676,7 @@ f_hash(int count, VALUE **vals) result.v_type = V_NUM; result.v_subtype = V_NOSUBTYPE; - hash = FNV1_32_BASIS; + hash = QUICKHASH_BASIS; while (count-- > 0) hash = hashvalue(*vals++, hash); result.v_num = utoq((FULL) hash); diff --git a/help/contrib b/help/contrib index e1ebfce..3461b77 100644 --- a/help/contrib +++ b/help/contrib @@ -36,45 +36,73 @@ 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 by sending EMail to: +join the low volume calc mailing list calc-tester. Then send +your contribution to the calc-tester mailing list. - calc-contrib at asthe dot com +To subscribe to the calc-tester mailing list, visit the following URL: - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + https://www.listbox.com/subscribe/?list_id=239342 -Your subject must contain the words: + To help determine you are a human and not just a spam bot, + you will be required to provide the following additional info: - calc mailing list subscription + Your Name + Calc Version + Operating System + The date 7 days ago -You may have additional words in your subject line. + This is a low volume moderated mailing list. -Feel free to follow the name line with additional EMail text as desired. + This mailing list replaces calc-tester at asthe dot com list. -Thanks for considering submitting code to calc. Calc is a collective -work by a number of people. It would not be what it is today without -your efforts and submissions! + 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-bugs at asthe dot com + calc-bug-report at asthe dot com - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + NOTE: Remove spaces and replace 'at' with @, 'dot' with . -Your subject must contain the words: + This replaces the old calc-bugs at asthe dot com address. - calc bug report + To be sure we see your EMail reporting a calc bug, please use the + following phase in your EMail Subject line: -You may have additional words in your subject line. + calc bug report -See the BUGS file or try the help command: + 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 bugs + 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 details on bug reporting. +=-= + +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'. =-= @@ -83,7 +111,7 @@ http://www.isthe.com/chongo/ chongo (share and enjoy) /\../\ -## Copyright (C) 1999 Landon Curt Noll +## 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 @@ -99,8 +127,8 @@ chongo (share and enjoy) /\../\ ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.1 $ -## @(#) $Id: contrib,v 30.1 2007/03/16 11:10:42 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: contrib,v 30.2 2014/10/06 08:39:45 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/help/RCS/contrib,v $ ## ## Under source code control: 1997/03/09 16:33:22 diff --git a/help/hash b/help/hash index 70debb4..185c4cc 100644 --- a/help/hash +++ b/help/hash @@ -13,11 +13,21 @@ DESCRIPTION Returns a hash value for one or more values of arbitrary types. The calc hash value is based on the core Fowler/Noll/Vo hash - known as FNV-1. The return value, however, cannot be used + known as FNV-0. The return value, however, cannot be used as an FNV hash value because calc's internal function also takes into account more abstract concepts such as data types. - See: + WARNING: Use of FNV-0 is NOT recommended for general purposes. + Calc uses FNV-0 for internal objects such as associative + arrays as well as other internal processes. Calc + maintains the use of FNV-0 for backwards compatibility. + + You should use the FNV-1a hash instead!!!!! + + Use the fnv() builtin function for general quick, non-cryptographic + hash purposes. + + See also: http://www.isthe.com/chongo/tech/comp/fnv/ @@ -35,9 +45,9 @@ LINK LIBRARY none SEE ALSO - ishash, sha1 + ishash, fnv, sha1 -## Copyright (C) 1999-2007 Landon Curt Noll +## Copyright (C) 1999-2007,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 @@ -53,8 +63,8 @@ SEE ALSO ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.2 $ -## @(#) $Id: hash,v 30.2 2007/07/05 17:37:41 chongo Exp $ +## @(#) $Revision: 30.3 $ +## @(#) $Id: hash,v 30.3 2014/10/06 08:45:56 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/help/RCS/hash,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/todo b/help/todo index 27213f0..921768f 100644 --- a/help/todo +++ b/help/todo @@ -1,28 +1,36 @@ Calc Todo Items: - The following items should be addressed sometime in the short to - medium term future, if not before the next release. + Code contributions are welcome. First Subscribe to the calc-tester + mailing list. Next, send patches to the calc-tester mailing list. - Code contributions are welcome. Send patches to: + To subscribe to the calc-tester mailing list, visit the following URL: - calc-contrib at asthe dot com + http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html - Calc bug reports, however, should send to: + This is a low volume moderated mailing list. - calc-bugs at asthe dot com + This mailing list replaces calc-tester at asthe dot com list. - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + If you need a human to help you with your mailing list subscription, + please send EMail to our special: - See the BUGS file or try the calc command: + calc-tester-maillist-help at asthe dot com - help bugs + NOTE: Remove spaces and replace 'at' with @, 'dot' with . - See also the 'wishlist' help files for the calc enhancement wish list. + 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. =-= -Very High priority items: +High priority items: * Improve the way that calc parses statements such as if, for, while and do so that when a C programmer does. This works as expected: @@ -62,7 +70,7 @@ Very High priority items: =-= -High priority items: +Medium priority items: * Verify, complete or fix the 'SEE ALSO' help file sections. @@ -87,7 +95,7 @@ High priority items: =-= -Medium priority items: +Low priority items: * Complete the use of CONST where appropriate: @@ -117,7 +125,39 @@ Medium priority items: * Add a builtin function to access the 64 bit FNV hash which is currently being used internally in seed.c. -## Copyright (C) 1999-2007 Landon Curt Noll +=-= + +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'. + +## Copyright (C) 1999-2007,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 @@ -133,8 +173,8 @@ Medium priority items: ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.2 $ -## @(#) $Id: todo,v 30.2 2007/09/08 02:52:42 chongo Exp $ +## @(#) $Revision: 30.4 $ +## @(#) $Id: todo,v 30.4 2014/10/12 12:23:43 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/help/RCS/todo,v $ ## ## Under source code control: 1999/10/20 07:42:55 diff --git a/help/wishlist b/help/wishlist index eadc9a7..c144ccc 100644 --- a/help/wishlist +++ b/help/wishlist @@ -1,22 +1,37 @@ Calc Enhancement Wish List: - Send calc comments, suggestions, bug fixes, enhancements and + We welcome calc comments, suggestions, bug fixes, enhancements and interesting calc scripts that you would like you see included in - future distributions to: + future distributions. - calc-contrib at asthe dot com + 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. - The following items are in the calc wish list. Programs like this - can be extended and improved forever. + To subscribe to the calc-tester mailing list, visit the following URL: - Calc bug reports, however, should be sent to: + http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html - calc-bugs at asthe dot com + This is a low volume moderated mailing list. - [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] - [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] + This mailing list replaces calc-tester at asthe dot com list. - See the 'todo' help file for higher priority todo items. + 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. =-= @@ -187,7 +202,39 @@ Calc Enhancement Wish List: * Add read -once -try "filename" which would do nothing if "filename" was not a readable file. -## Copyright (C) 1999 Landon Curt Noll +=-= + +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'. + +## 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 @@ -203,8 +250,8 @@ Calc Enhancement Wish List: ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 30.1 $ -## @(#) $Id: wishlist,v 30.1 2007/03/16 11:10:42 chongo Exp $ +## @(#) $Revision: 30.3 $ +## @(#) $Id: wishlist,v 30.3 2014/10/12 12:23:43 chongo Exp $ ## @(#) $Source: /usr/local/src/bin/calc/help/RCS/wishlist,v $ ## ## Under source code control: 1991/07/21 04:37:24 diff --git a/quickhash.c b/quickhash.c index fe3782a..cd15f64 100644 --- a/quickhash.c +++ b/quickhash.c @@ -1,7 +1,12 @@ /* - * quickhash - quickly hash a calc value using a quasi Fowler/Noll/Vo hash + * quickhash - quickly hash a calc value using a 32-bit FNV-0 hash * - * Copyright (C) 1999-2007 Landon Curt Noll + * WARNING: General use of FNV-0 hash is not recommended. Calc uses FNV-0 + * for a specific You should use FNV-1a hash instead. See: + * + * http://www.isthe.com/chongo/tech/comp/fnv/index.html + * + * Copyright (C) 1999-2007,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 @@ -17,8 +22,8 @@ * received a copy with calc; if not, write to Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 30.1 $ - * @(#) $Id: quickhash.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: quickhash.c,v 30.2 2014/09/30 00:55:46 chongo Exp $ * @(#) $Source: /usr/local/src/bin/calc/RCS/quickhash.c,v $ * * Under source code control: 1995/03/04 11:34:23 @@ -59,6 +64,8 @@ S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val); /* * quasi_fnv - quasi Fowler/Noll/Vo-0 32 bit hash * + * NOTE: General use of FNV-0 hadh + * * The basis of this hash algorithm was taken from an idea sent * as reviewer comments to the IEEE POSIX P1003.2 committee by: * @@ -108,7 +115,7 @@ S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val); * to the (val) hash state. This is a simulation of hashing * a variable type. * - * The Fowler/Noll/Vo hash does a very good job in producing + * The 32-bit FNV-0 hash does a very good job in producing * a 32 bit hash arrays of octets in a short amount of time. * It is not bad for hashing calc data as well. So doing a * quick and dirty job of hashing on a part of a calc value @@ -139,7 +146,7 @@ S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val); /* - * fnv_qhash - compute the next Fowler/Noll/Vo hash given a NUMBER + * fnv_qhash - compute the next 32-bit FNV-0 hash given a NUMBER * * given: * q pointer to a NUMBER @@ -154,7 +161,7 @@ S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val); /* - * fnv_chash - compute the next Fowler/Noll/Vo hash given a COMPLEX + * fnv_chash - compute the next 32-bit FNV-0 hash given a COMPLEX * * given: * c pointer to a COMPLEX diff --git a/seed.c b/seed.c index 9310173..023ad65 100644 --- a/seed.c +++ b/seed.c @@ -17,8 +17,8 @@ * received a copy with calc; if not, write to Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 30.1 $ - * @(#) $Id: seed.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: seed.c,v 30.2 2014/09/30 01:00:04 chongo Exp $ * @(#) $Source: /usr/local/src/bin/calc/RCS/seed.c,v $ * * Under source code control: 1999/10/03 10:06:53 @@ -117,7 +117,7 @@ typedef struct s_hash64 hash64; /* - * FNV-1 initial basis + * 64-bit initial basis - Based on the 64-bit FNV basis value * * We start the hash at a non-zero value at the beginning so that * hashing blocks of data with all 0 bits do not map onto the same @@ -151,17 +151,17 @@ typedef struct s_hash64 hash64; * good hash function. */ #if defined(HAVE_B64) -# define FNV1_64_BASIS ((hash64)(0xcbf29ce484222325ULL)) +# define PRIVATE_64_BASIS ((hash64)(0xcbf29ce484222325ULL)) #else -# define FNV1_64_BASIS_0 ((USB32)0x2325) -# define FNV1_64_BASIS_1 ((USB32)0x8422) -# define FNV1_64_BASIS_2 ((USB32)0x9ce4) -# define FNV1_64_BASIS_3 ((USB32)0xcbf2) +# define PRIVATE_64_BASIS_0 ((USB32)0x2325) +# define PRIVATE_64_BASIS_1 ((USB32)0x8422) +# define PRIVATE_64_BASIS_2 ((USB32)0x9ce4) +# define PRIVATE_64_BASIS_3 ((USB32)0xcbf2) #endif /* - * hash_buf - perform a Fowler/Noll/Vo-1 64 bit hash + * prvate_hash64_buf - perform a Fowler/Noll/Vo-1 64 bit hash * * input: * buf - start of buffer to hash @@ -172,7 +172,7 @@ typedef struct s_hash64 hash64; * 64 bit hash as a static hash64 structure */ S_FUNC hash64 -hash_buf(char *buf, unsigned len) +prvate_hash64_buf(char *buf, unsigned len) { hash64 hval; /* current hash value */ #if !defined(HAVE_B64) @@ -205,10 +205,15 @@ hash_buf(char *buf, unsigned len) * http://www.isthe.com/chongo/tech/comp/fnv/ * * for more details as well as other forms of the FNV hash. + * + * NOTE: For general hash functions, we recommend using the + * FNV-1a hash function. The use of FNV-1 is kept + * for backwards compatibility purposes and because + * the use of FNV-1 in this special purpose, suffices. */ #if defined(HAVE_B64) /* hash each octet of the buffer */ - for (hval = FNV1_64_BASIS; buf < buf_end; ++buf) { + for (hval = PRIVATE_64_BASIS; buf < buf_end; ++buf) { /* multiply by 1099511628211ULL mod 2^64 using 64 bit longs */ hval *= (hash64)1099511628211ULL; @@ -220,10 +225,10 @@ hash_buf(char *buf, unsigned len) #else /* HAVE_B64 */ /* hash each octet of the buffer */ - val[0] = FNV1_64_BASIS_0; - val[1] = FNV1_64_BASIS_1; - val[2] = FNV1_64_BASIS_2; - val[3] = FNV1_64_BASIS_3; + val[0] = PRIVATE_64_BASIS_0; + val[1] = PRIVATE_64_BASIS_1; + val[2] = PRIVATE_64_BASIS_2; + val[3] = PRIVATE_64_BASIS_3; for (; buf < buf_end; ++buf) { /* @@ -441,7 +446,7 @@ pseudo_seed(void) /* * seed the generator with the above data */ - hash_val = hash_buf((char *)&sdata, sizeof(sdata)); + hash_val = prvate_hash64_buf((char *)&sdata, sizeof(sdata)); /* * load the hash data into the ZVALUE diff --git a/version.c b/version.c index db2e671..8ddb3f6 100644 --- a/version.c +++ b/version.c @@ -19,8 +19,8 @@ * received a copy with calc; if not, write to Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 30.24 $ - * @(#) $Id: version.c,v 30.24 2014/08/31 15:43:39 chongo Exp $ + * @(#) $Revision: 30.27 $ + * @(#) $Id: version.c,v 30.27 2014/10/12 12:44:57 chongo Exp $ * @(#) $Source: /usr/local/src/bin/calc/RCS/version.c,v $ * * Under source code control: 1990/05/22 11:00:58 @@ -48,8 +48,8 @@ static char *program; #define MAJOR_VER 2 /* major library version */ #define MINOR_VER 12 /* minor library version */ -#define MAJOR_PATCH 4 /* major software level under library version */ -#define MINOR_PATCH 14 /* minor software level or 0 if not patched */ +#define MAJOR_PATCH 5 /* major software level under library version */ +#define MINOR_PATCH 0 /* minor software level or 0 if not patched */ /* @@ -150,7 +150,6 @@ version(void) * This function prints a version string, rpm style: * * x.y.z.w-r - * x.y.z-r * * where 'r' comes from the content of the release file. */ @@ -184,13 +183,8 @@ print_rpm_version(char *release) /* * form the version buffer */ - if (MINOR_PATCH > 0) { - printf("%d.%d.%d.%d-%s\n", calc_major_ver, calc_minor_ver, - calc_major_patch, calc_minor_patch, buf); - } else { - printf("%d.%d.%d-%s\n", calc_major_ver, calc_minor_ver, - calc_major_patch, buf); - } + printf("%d.%d.%d.%d-%s\n", calc_major_ver, calc_minor_ver, + calc_major_patch, calc_minor_patch, buf); return; } diff --git a/zmath.h b/zmath.h index a1bc322..bf203f2 100644 --- a/zmath.h +++ b/zmath.h @@ -17,8 +17,8 @@ * received a copy with calc; if not, write to Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 30.5 $ - * @(#) $Id: zmath.h,v 30.5 2014/08/24 21:56:51 chongo Exp $ + * @(#) $Revision: 30.6 $ + * @(#) $Id: zmath.h,v 30.6 2014/09/30 00:55:11 chongo Exp $ * @(#) $Source: /usr/local/src/bin/calc/RCS/zmath.h,v $ * * Under source code control: 1993/07/30 19:42:48 @@ -180,12 +180,12 @@ typedef SB32 LEN; /* unit of length storage */ /* - * FNV-1 basis + * Quickhash basis * * We start the hash at a non-zero value at the beginning so that * hashing blocks of data with all 0 bits do not map onto the same - * 0 hash value. The virgin value that we use below is the hash value - * that we would get from following 32 ASCII characters: + * 0 hash value. The virgin value that we use below is the 32-bit + * FNV-0 hash value that we would get from following 32 ASCII characters: * * chongo /\../\ * @@ -213,7 +213,7 @@ typedef SB32 LEN; /* unit of length storage */ * to be a cryptographic hash function, just a fast and reasonably * good hash function. */ -#define FNV1_32_BASIS ((QCKHASH)(0x811c9dc5)) +#define QUICKHASH_BASIS ((QCKHASH)(0x811c9dc5)) /*