mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
23 Commits
prod-2.14.
...
prod-2.14.
Author | SHA1 | Date | |
---|---|---|---|
|
e2686911ae | ||
|
544b873914 | ||
|
948d9e807b | ||
|
6d020b7fbe | ||
|
9fcdd80549 | ||
|
3148ce06a0 | ||
|
945977f1f4 | ||
|
b03e71f0ce | ||
|
db799aac10 | ||
|
adecf7d76e | ||
|
94bf264088 | ||
|
80e841eded | ||
|
3f78fc20d7 | ||
|
c26460b255 | ||
|
3ec7b39366 | ||
|
49c599aec9 | ||
|
a582511002 | ||
|
e05d904821 | ||
|
ccd579ecda | ||
|
15be1dec4d | ||
|
f34c659877 | ||
|
2ad27e7909 | ||
|
a4d3c8ff9d |
2
BUGS
2
BUGS
@@ -88,7 +88,7 @@ Please include the following information in the new issue:
|
|||||||
* cd to the calc source directory, and send the contents
|
* cd to the calc source directory, and send the contents
|
||||||
of debug.out.txt produced by this command:
|
of debug.out.txt produced by this command:
|
||||||
|
|
||||||
make debug > debug.out.txt 2>&1
|
make debug
|
||||||
|
|
||||||
PLEASE attach the debug.out.txt file to your GitHub issue (bug report)!!
|
PLEASE attach the debug.out.txt file to your GitHub issue (bug report)!!
|
||||||
|
|
||||||
|
90
CHANGES
90
CHANGES
@@ -1,4 +1,80 @@
|
|||||||
The following are the changes from calc version 2.14.1.5 to date:
|
The following are the changes from calc version 2.14.2.1 to date:
|
||||||
|
|
||||||
|
Added cal/fnv_tool.cal, a calc resource file defining:
|
||||||
|
|
||||||
|
find_fnv_prime(bits)
|
||||||
|
deprecated_fnv0(bits,fnv_prime,string)
|
||||||
|
fnv_offset_basis(bits,fnv_prime)
|
||||||
|
fnv1a_style_hash(bits,fnv_prime,prev_hash,string)
|
||||||
|
|
||||||
|
Fixed sorted order of cal/README.
|
||||||
|
|
||||||
|
Removed references to obsolete Email addresses.
|
||||||
|
|
||||||
|
macOS Darwin defaults LCC to "cc".
|
||||||
|
|
||||||
|
Updated COPYING to include the actual text of "The Unlicense".
|
||||||
|
Made minor formatting changes to the file.
|
||||||
|
|
||||||
|
The Darwin specific ${DARWIN_ARCH}, thay by default was unset,
|
||||||
|
is now the ${ARCH_CFLAGS} Makefile variable. Comments about
|
||||||
|
various "-arch name" have been moved to the ${ARCH_CFLAGS} area.
|
||||||
|
|
||||||
|
For old Apple Power PC systems, the following is added:
|
||||||
|
|
||||||
|
COMMON_CFLAGS+= -std=gnu99
|
||||||
|
COMMON_LDFLAGS+= -std=gnu99
|
||||||
|
ARCH_CFLAGS+= -arch ppc
|
||||||
|
|
||||||
|
Old Apple Power PC systems should be detected by the
|
||||||
|
"uname -p" command returning "powerpc". One may force the
|
||||||
|
Power PC mode by adding to the end of any make command:
|
||||||
|
|
||||||
|
make ...make_args... target=Darwin arch=powerpc
|
||||||
|
|
||||||
|
or by adding the following in the Makefile.local file:
|
||||||
|
|
||||||
|
target= Darwin
|
||||||
|
arch= powerpc
|
||||||
|
|
||||||
|
Improved the output of the calcinfo rule by adding echos
|
||||||
|
of various uname values as well as some top Makefile variables.
|
||||||
|
|
||||||
|
Fixed the BUGS file with respect to using `make debug`.
|
||||||
|
|
||||||
|
Added a final ls of `debug.out` for `make debug`.
|
||||||
|
|
||||||
|
|
||||||
|
The following are the changes from calc version 2.14.2.0 to 2.14.2.0:
|
||||||
|
|
||||||
|
Ported calc to the s390x IBM Mainframe running RHEL9.1.
|
||||||
|
|
||||||
|
Added cal/splitbits.cal:
|
||||||
|
|
||||||
|
splitbits(x, b)
|
||||||
|
|
||||||
|
Given an integer x, split the value into a list of integers,
|
||||||
|
each of which is at most b bits long.
|
||||||
|
|
||||||
|
The value b must be an integer > 0.
|
||||||
|
|
||||||
|
The number of elements in the returned list is:
|
||||||
|
|
||||||
|
ceil((highbit(x) + 1) / b)
|
||||||
|
|
||||||
|
If x == 0, then a list of 1 element containing 0 is returned.
|
||||||
|
|
||||||
|
If x < 0, then the two's compliment of abs(x) is returned.
|
||||||
|
Even though calc represents negative integers as positive values
|
||||||
|
with sign bit, the bits returned by this function are as if
|
||||||
|
the integer converted as if the integer was a two's compliment value.
|
||||||
|
|
||||||
|
See also the help command:
|
||||||
|
|
||||||
|
; help resource
|
||||||
|
|
||||||
|
|
||||||
|
The following are the changes from calc version 2.14.1.5 to 2.14.1.6:
|
||||||
|
|
||||||
Fixed version numbers in two cases in CHANGES that referred
|
Fixed version numbers in two cases in CHANGES that referred
|
||||||
to the 2.14.2.x instead of 2.14.1.x.
|
to the 2.14.2.x instead of 2.14.1.x.
|
||||||
@@ -1563,9 +1639,9 @@ The following are the changes from calc version 2.12.5.0 to 2.12.5.1:
|
|||||||
|
|
||||||
There is a new calc bug report Email address:
|
There is a new calc bug report Email address:
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
NOTE: calc-bug-report Email address no longer in use
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
This replaces the old calc-bugs Email address.
|
||||||
|
|
||||||
To be sure we see your Email reporting a calc bug, please use the
|
To be sure we see your Email reporting a calc bug, please use the
|
||||||
following phase in your Email Subject line:
|
following phase in your Email Subject line:
|
||||||
@@ -2159,7 +2235,7 @@ The following are the changes from calc version 2.12.1.10 to 2.12.2:
|
|||||||
NOTE: If your target is not supported below and the default target
|
NOTE: If your target is not supported below and the default target
|
||||||
is not suitable for your needs, please send to the:
|
is not suitable for your needs, please send to the:
|
||||||
|
|
||||||
calc-contrib at asthe dot com
|
NOTE: calc-contrib Email address no longer in use
|
||||||
|
|
||||||
Email address an "ifeq ($(target),YOUR_TARGET_NAME)"
|
Email address an "ifeq ($(target),YOUR_TARGET_NAME)"
|
||||||
... "endif" set of lines from the Makefile so that
|
... "endif" set of lines from the Makefile so that
|
||||||
@@ -3882,9 +3958,9 @@ The following are the changes from calc version 2.11.2t0 to 2.11.2t1.0:
|
|||||||
www.isthe.com. NOTE: The Email address uses 'asthe' and the web
|
www.isthe.com. NOTE: The Email address uses 'asthe' and the web
|
||||||
site URL uses 'isthe'.
|
site URL uses 'isthe'.
|
||||||
|
|
||||||
Using calc-bugs at asthe dot com for calc bug reports,
|
NOTE: calc-bugs Email address no longer in use
|
||||||
calc-contrib at asthe dot com for calc contributions,
|
NOTE: calc-contrib Email address no longer in use
|
||||||
calc-tester-request at asthe dot com for requests to join calc-tester and
|
NOTE: calc-tester-request Email address no longer in use
|
||||||
|
|
||||||
Replaced explicit Email addresses found this file with the <user at
|
Replaced explicit Email addresses found this file with the <user at
|
||||||
site dot domain> notation to reduce the potential for those folks
|
site dot domain> notation to reduce the potential for those folks
|
||||||
|
40
COPYING
40
COPYING
@@ -1,6 +1,5 @@
|
|||||||
calc - arbitrary precision calculator
|
calc - arbitrary precision calculator
|
||||||
|
|
||||||
|
|
||||||
This file is Copyrighted
|
This file is Copyrighted
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
@@ -76,8 +75,8 @@ Calc's relationship to the GNU Lesser General Public License
|
|||||||
Clearly all files that go into the creation of those binary link
|
Clearly all files that go into the creation of those binary link
|
||||||
libraries are covered under the License.
|
libraries are covered under the License.
|
||||||
|
|
||||||
The ``scripts used to control compilation and installation of the
|
The "scripts used to control compilation and installation of the
|
||||||
of the library'' include:
|
of the library" include:
|
||||||
|
|
||||||
* Makefiles
|
* Makefiles
|
||||||
* source files created by the Makefiles
|
* source files created by the Makefiles
|
||||||
@@ -85,7 +84,7 @@ Calc's relationship to the GNU Lesser General Public License
|
|||||||
|
|
||||||
All of those files are covered under the License.
|
All of those files are covered under the License.
|
||||||
|
|
||||||
The ``associated interface definition files'' are those files that:
|
The "associated interface definition files" are those files that:
|
||||||
|
|
||||||
* show how the calc binary link libraries are used
|
* show how the calc binary link libraries are used
|
||||||
* test the validity of the binary link libraries
|
* test the validity of the binary link libraries
|
||||||
@@ -100,9 +99,9 @@ Calc's relationship to the GNU Lesser General Public License
|
|||||||
* files under the lib sub-directory
|
* files under the lib sub-directory
|
||||||
* the main calc.c file
|
* the main calc.c file
|
||||||
|
|
||||||
The ``complete source code'' includes ALL files shipped with calc,
|
The "complete source code" includes ALL files shipped with calc,
|
||||||
except for the exception files explicitly listed in the ``Calc
|
except for the exception files explicitly listed in the "Calc
|
||||||
copyrights and exception files'' section below.
|
copyrights and exception files" section below.
|
||||||
|
|
||||||
-=-
|
-=-
|
||||||
|
|
||||||
@@ -146,9 +145,32 @@ Calc copyrights and exception files
|
|||||||
cal/dotest.cal
|
cal/dotest.cal
|
||||||
cal/screen.cal
|
cal/screen.cal
|
||||||
|
|
||||||
For more information on this license, see:
|
"The Unlicense" is as follows:
|
||||||
|
|
||||||
https://unlicense.org
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
|
|
||||||
In all cases one may use and distribute these exception files freely.
|
In all cases one may use and distribute these exception files freely.
|
||||||
And because one may freely distribute the LGPL covered files, the
|
And because one may freely distribute the LGPL covered files, the
|
||||||
|
103
Makefile
103
Makefile
@@ -841,8 +841,21 @@ HAVE_STRLCAT=
|
|||||||
#
|
#
|
||||||
ifeq ($(target),Darwin)
|
ifeq ($(target),Darwin)
|
||||||
|
|
||||||
# default INCDIR for macOS
|
# determine default INCDIR for macOS
|
||||||
INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include
|
#
|
||||||
|
ifeq ($(arch),powerpc)
|
||||||
|
#
|
||||||
|
# Default location for old systems such as Mac OS X 10.6 Snow Leopard
|
||||||
|
#
|
||||||
|
INCDIR= /usr/include
|
||||||
|
#
|
||||||
|
else
|
||||||
|
#
|
||||||
|
# Modern macOS such as macOS 10.11.6 and later
|
||||||
|
#
|
||||||
|
INCDIR= $(shell xcrun --sdk macosx --show-sdk-path 2>/dev/null)/usr/include
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
#
|
#
|
||||||
@@ -1381,7 +1394,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.14.1.6
|
VERSION= 2.14.3.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
@@ -1458,8 +1471,15 @@ EXTRA_LDFLAGS=
|
|||||||
# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
|
# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
|
||||||
# CCMISC and precede EXTRA_CFLAGS.
|
# CCMISC and precede EXTRA_CFLAGS.
|
||||||
#
|
#
|
||||||
|
# When ARCH_CFLAGS is empty, the native binary architecture is assumed.
|
||||||
|
#
|
||||||
ARCH_CFLAGS=
|
ARCH_CFLAGS=
|
||||||
#ARCH_CFLAGS= -march=native
|
# ARCH_CFLAGS= -arch i386 # old Intel binary
|
||||||
|
# ARCH_CFLAGS= -arch ppc # Power PC binary
|
||||||
|
# ARCH_CFLAGS= -arch x86_64 # Intel 64-bit binary
|
||||||
|
# ARCH_CFLAGS= -arch arm64 # Apple Silicon binary
|
||||||
|
# ARCH_CFLAGS= -arch arm64 -arch x86_64 # Apple Silicon and Intel 64-bit binary
|
||||||
|
# ARCH_CFLAGS= -arch i386 -arch ppc # old Intel and Power PC binary
|
||||||
|
|
||||||
# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
|
# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
|
||||||
# intermediate and final calc and calc related programs
|
# intermediate and final calc and calc related programs
|
||||||
@@ -1571,16 +1591,6 @@ endif
|
|||||||
#
|
#
|
||||||
# Specific target overrides or modifications to default values
|
# Specific target overrides or modifications to default values
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
# NOTE: If your target is not supported below and the default target #
|
|
||||||
# is not suitable for your needs, please send to the: #
|
|
||||||
# #
|
|
||||||
# calc-contrib at asthe dot com #
|
|
||||||
# #
|
|
||||||
# Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
|
||||||
# set of lines so that we can consider them for the next release. #
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
#if 0 /* start of skip for non-Gnu makefiles */
|
#if 0 /* start of skip for non-Gnu makefiles */
|
||||||
#
|
#
|
||||||
################
|
################
|
||||||
@@ -1640,39 +1650,48 @@ endif
|
|||||||
# Apple macOS / Darwin target #
|
# Apple macOS / Darwin target #
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
|
# For old Apple Power PC systems, we need to add:
|
||||||
|
#
|
||||||
|
# -std=gnu99 -arch ppc
|
||||||
|
#
|
||||||
|
ifeq ($(arch),powerpc)
|
||||||
|
COMMON_CFLAGS+= -std=gnu99
|
||||||
|
COMMON_LDFLAGS+= -std=gnu99
|
||||||
|
ARCH_CFLAGS+= -arch ppc
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(target),Darwin)
|
ifeq ($(target),Darwin)
|
||||||
#
|
#
|
||||||
BLD_TYPE= calc-dynamic-only
|
BLD_TYPE= calc-dynamic-only
|
||||||
#
|
#
|
||||||
CC_SHARE= -fPIC
|
CC_SHARE= -fPIC
|
||||||
DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:${PREFIX}/lib
|
DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:${PREFIX}/lib
|
||||||
LD_SHARE= ${DARWIN_ARCH}
|
LD_SHARE= ${ARCH_CFLAGS}
|
||||||
#SET_INSTALL_NAME= no
|
#SET_INSTALL_NAME= no
|
||||||
SET_INSTALL_NAME= yes
|
SET_INSTALL_NAME= yes
|
||||||
ifeq ($(SET_INSTALL_NAME),yes)
|
ifeq ($(SET_INSTALL_NAME),yes)
|
||||||
LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
||||||
-install_name ${LIBDIR}/libcalc${LIB_EXT_VERSION} ${DARWIN_ARCH}
|
-install_name ${LIBDIR}/libcalc${LIB_EXT_VERSION} ${ARCH_CFLAGS}
|
||||||
else
|
else
|
||||||
LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
||||||
${DARWIN_ARCH}
|
${ARCH_CFLAGS}
|
||||||
endif
|
endif
|
||||||
ifdef ALLOW_CUSTOM
|
ifdef ALLOW_CUSTOM
|
||||||
ifeq ($(SET_INSTALL_NAME),yes)
|
ifeq ($(SET_INSTALL_NAME),yes)
|
||||||
LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
||||||
-install_name ${LIBDIR}/libcustcalc${LIB_EXT_VERSION} ${DARWIN_ARCH}
|
-install_name ${LIBDIR}/libcustcalc${LIB_EXT_VERSION} ${ARCH_CFLAGS}
|
||||||
else
|
else
|
||||||
LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
||||||
${DARWIN_ARCH}
|
${ARCH_CFLAGS}
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
LIBCUSTCALC_SHLIB=
|
LIBCUSTCALC_SHLIB=
|
||||||
endif
|
endif
|
||||||
#
|
#
|
||||||
CC_STATIC=
|
CC_STATIC=
|
||||||
LD_STATIC= ${DARWIN_ARCH}
|
LD_STATIC= ${ARCH_CFLAGS}
|
||||||
LIBCALC_STATIC=
|
LIBCALC_STATIC=
|
||||||
LIBCUSTCALC_STATIC=
|
LIBCUSTCALC_STATIC=
|
||||||
#
|
|
||||||
# If you want to add flags to all compiler and linker
|
# If you want to add flags to all compiler and linker
|
||||||
# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
|
# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
|
||||||
# set ${COMMON_ADD}.
|
# set ${COMMON_ADD}.
|
||||||
@@ -1696,9 +1715,9 @@ WNO_ERROR_LONG_LONG= -Wno-error=long-long
|
|||||||
WNO_LONG_LONG= -Wno-long-long
|
WNO_LONG_LONG= -Wno-long-long
|
||||||
CCWERR=
|
CCWERR=
|
||||||
CCOPT= ${DEBUG}
|
CCOPT= ${DEBUG}
|
||||||
CCMISC= ${DARWIN_ARCH}
|
CCMISC= ${ARCH_CFLAGS}
|
||||||
#
|
#
|
||||||
LCC= clang
|
LCC= cc
|
||||||
CC= ${PURIFY} ${LCC} ${CCWERR}
|
CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||||
#
|
#
|
||||||
# Darwin dynamic shared lib filenames
|
# Darwin dynamic shared lib filenames
|
||||||
@@ -1706,11 +1725,6 @@ LIB_EXT:= .dylib
|
|||||||
LIB_EXT_VERSION:= .${VERSION}${LIB_EXT}
|
LIB_EXT_VERSION:= .${VERSION}${LIB_EXT}
|
||||||
# LDCONFIG not required on this platform, so we redefine it to an empty string
|
# LDCONFIG not required on this platform, so we redefine it to an empty string
|
||||||
LDCONFIG:=
|
LDCONFIG:=
|
||||||
# DARWIN_ARCH= -arch i386 -arch ppc # Universal binary
|
|
||||||
# DARWIN_ARCH= -arch i386 # Intel binary
|
|
||||||
# DARWIN_ARCH= -arch ppc # PPC binary
|
|
||||||
# DARWIN_ARCH= -arch x86_64 # native 64-bit binary
|
|
||||||
DARWIN_ARCH= # native binary
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
##################
|
##################
|
||||||
@@ -4956,6 +4970,30 @@ calcinfo:
|
|||||||
-@${UNAME} -a
|
-@${UNAME} -a
|
||||||
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
||||||
@echo
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -s follows =-=-='
|
||||||
|
-@${UNAME} -s
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -s =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -p follows =-=-='
|
||||||
|
-@${UNAME} -p
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -p =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -m follows =-=-='
|
||||||
|
-@${UNAME} -m
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -m =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -o follows =-=-='
|
||||||
|
-@${UNAME} -o
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -o =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of top makefile variables follows =-=-='
|
||||||
|
@echo "target= ${target}"
|
||||||
|
@echo "arch= ${arch}"
|
||||||
|
@echo "hardware= ${hardware}"
|
||||||
|
@echo "OSNAME= ${OSNAME}"
|
||||||
|
@echo "SHELL= ${SHELL}"
|
||||||
|
@echo '=-=-= end of output top makefile variables =-=-='
|
||||||
|
@echo
|
||||||
@echo '=-=-= HOSTNAME=${HOSTNAME} =-=-='
|
@echo '=-=-= HOSTNAME=${HOSTNAME} =-=-='
|
||||||
@echo
|
@echo
|
||||||
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
||||||
@@ -5230,7 +5268,9 @@ debug:
|
|||||||
@echo
|
@echo
|
||||||
@echo 'Click the ((New issue)) button to file a bug report.'
|
@echo 'Click the ((New issue)) button to file a bug report.'
|
||||||
@echo
|
@echo
|
||||||
@echo 'Please attch the debug.out file to the bug report.'
|
@echo 'Please attch the debug.out file to the bug report:'
|
||||||
|
@echo
|
||||||
|
-@${LS} -l debug.out
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -6415,7 +6455,9 @@ file.o: strl.h
|
|||||||
file.o: value.h
|
file.o: value.h
|
||||||
file.o: zmath.h
|
file.o: zmath.h
|
||||||
fposval.o: alloc.h
|
fposval.o: alloc.h
|
||||||
|
fposval.o: attribute.h
|
||||||
fposval.o: banned.h
|
fposval.o: banned.h
|
||||||
|
fposval.o: byteswap.h
|
||||||
fposval.o: decl.h
|
fposval.o: decl.h
|
||||||
fposval.o: endian_calc.h
|
fposval.o: endian_calc.h
|
||||||
fposval.o: fposval.c
|
fposval.o: fposval.c
|
||||||
@@ -6427,8 +6469,11 @@ fposval.o: have_memmv.h
|
|||||||
fposval.o: have_newstr.h
|
fposval.o: have_newstr.h
|
||||||
fposval.o: have_offscl.h
|
fposval.o: have_offscl.h
|
||||||
fposval.o: have_posscl.h
|
fposval.o: have_posscl.h
|
||||||
|
fposval.o: have_stdlib.h
|
||||||
fposval.o: have_string.h
|
fposval.o: have_string.h
|
||||||
fposval.o: have_unused.h
|
fposval.o: have_unused.h
|
||||||
|
fposval.o: longbits.h
|
||||||
|
fposval.o: zmath.h
|
||||||
func.o: alloc.h
|
func.o: alloc.h
|
||||||
func.o: attribute.h
|
func.o: attribute.h
|
||||||
func.o: banned.h
|
func.o: banned.h
|
||||||
|
@@ -1239,7 +1239,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.14.1.6
|
VERSION= 2.14.3.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
@@ -1316,8 +1316,15 @@ EXTRA_LDFLAGS=
|
|||||||
# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
|
# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
|
||||||
# CCMISC and precede EXTRA_CFLAGS.
|
# CCMISC and precede EXTRA_CFLAGS.
|
||||||
#
|
#
|
||||||
|
# When ARCH_CFLAGS is empty, the native binary architecture is assumed.
|
||||||
|
#
|
||||||
ARCH_CFLAGS=
|
ARCH_CFLAGS=
|
||||||
#ARCH_CFLAGS= -march=native
|
# ARCH_CFLAGS= -arch i386 # old Intel binary
|
||||||
|
# ARCH_CFLAGS= -arch ppc # Power PC binary
|
||||||
|
# ARCH_CFLAGS= -arch x86_64 # Intel 64-bit binary
|
||||||
|
# ARCH_CFLAGS= -arch arm64 # Apple Silicon binary
|
||||||
|
# ARCH_CFLAGS= -arch arm64 -arch x86_64 # Apple Silicon and Intel 64-bit binary
|
||||||
|
# ARCH_CFLAGS= -arch i386 -arch ppc # old Intel and Power PC binary
|
||||||
|
|
||||||
# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
|
# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
|
||||||
# intermediate and final calc and calc related programs
|
# intermediate and final calc and calc related programs
|
||||||
@@ -1411,16 +1418,6 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
|||||||
#
|
#
|
||||||
# Specific target overrides or modifications to default values
|
# Specific target overrides or modifications to default values
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
# NOTE: If your target is not supported below and the default target #
|
|
||||||
# is not suitable for your needs, please send to the: #
|
|
||||||
# #
|
|
||||||
# calc-contrib at asthe dot com #
|
|
||||||
# #
|
|
||||||
# Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
|
||||||
# set of lines so that we can consider them for the next release. #
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
#
|
#
|
||||||
BLD_TYPE= calc-static-only
|
BLD_TYPE= calc-static-only
|
||||||
#
|
#
|
||||||
@@ -4260,6 +4257,30 @@ calcinfo:
|
|||||||
-@${UNAME} -a
|
-@${UNAME} -a
|
||||||
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
||||||
@echo
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -s follows =-=-='
|
||||||
|
-@${UNAME} -s
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -s =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -p follows =-=-='
|
||||||
|
-@${UNAME} -p
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -p =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -m follows =-=-='
|
||||||
|
-@${UNAME} -m
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -m =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of $${UNAME} -o follows =-=-='
|
||||||
|
-@${UNAME} -o
|
||||||
|
@echo '=-=-= end of output of $${UNAME} -o =-=-='
|
||||||
|
@echo
|
||||||
|
@echo '=-=-= output of top makefile variables follows =-=-='
|
||||||
|
@echo "target= ${target}"
|
||||||
|
@echo "arch= ${arch}"
|
||||||
|
@echo "hardware= ${hardware}"
|
||||||
|
@echo "OSNAME= ${OSNAME}"
|
||||||
|
@echo "SHELL= ${SHELL}"
|
||||||
|
@echo '=-=-= end of output top makefile variables =-=-='
|
||||||
|
@echo
|
||||||
@echo '=-=-= HOSTNAME=${HOSTNAME} =-=-='
|
@echo '=-=-= HOSTNAME=${HOSTNAME} =-=-='
|
||||||
@echo
|
@echo
|
||||||
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
||||||
@@ -4534,7 +4555,9 @@ debug:
|
|||||||
@echo
|
@echo
|
||||||
@echo 'Click the ((New issue)) button to file a bug report.'
|
@echo 'Click the ((New issue)) button to file a bug report.'
|
||||||
@echo
|
@echo
|
||||||
@echo 'Please attch the debug.out file to the bug report.'
|
@echo 'Please attch the debug.out file to the bug report:'
|
||||||
|
@echo
|
||||||
|
-@${LS} -l debug.out
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -5699,7 +5722,9 @@ file.o: strl.h
|
|||||||
file.o: value.h
|
file.o: value.h
|
||||||
file.o: zmath.h
|
file.o: zmath.h
|
||||||
fposval.o: alloc.h
|
fposval.o: alloc.h
|
||||||
|
fposval.o: attribute.h
|
||||||
fposval.o: banned.h
|
fposval.o: banned.h
|
||||||
|
fposval.o: byteswap.h
|
||||||
fposval.o: decl.h
|
fposval.o: decl.h
|
||||||
fposval.o: endian_calc.h
|
fposval.o: endian_calc.h
|
||||||
fposval.o: fposval.c
|
fposval.o: fposval.c
|
||||||
@@ -5711,8 +5736,11 @@ fposval.o: have_memmv.h
|
|||||||
fposval.o: have_newstr.h
|
fposval.o: have_newstr.h
|
||||||
fposval.o: have_offscl.h
|
fposval.o: have_offscl.h
|
||||||
fposval.o: have_posscl.h
|
fposval.o: have_posscl.h
|
||||||
|
fposval.o: have_stdlib.h
|
||||||
fposval.o: have_string.h
|
fposval.o: have_string.h
|
||||||
fposval.o: have_unused.h
|
fposval.o: have_unused.h
|
||||||
|
fposval.o: longbits.h
|
||||||
|
fposval.o: zmath.h
|
||||||
func.o: alloc.h
|
func.o: alloc.h
|
||||||
func.o: attribute.h
|
func.o: attribute.h
|
||||||
func.o: banned.h
|
func.o: banned.h
|
||||||
|
22
README.md
22
README.md
@@ -1,3 +1,25 @@
|
|||||||
|
# TL;DR Try calc
|
||||||
|
|
||||||
|
## TL;DR Install calc
|
||||||
|
|
||||||
|
```
|
||||||
|
misc linux: sudo yum install calc
|
||||||
|
on Debian: sudo apt install calc
|
||||||
|
on RHEL: sudo dnf install calc
|
||||||
|
on Ubuntu: sudo apt install calc
|
||||||
|
via Termux: apt install calc
|
||||||
|
via src: sudo make clobber all chk instsll
|
||||||
|
```
|
||||||
|
|
||||||
|
## TL;DR Run calc
|
||||||
|
|
||||||
|
```
|
||||||
|
misc shell: calc
|
||||||
|
via bash: calc
|
||||||
|
via misc app: launch calc via Termux
|
||||||
|
via zsh: calc
|
||||||
|
```
|
||||||
|
|
||||||
# What is calc?
|
# What is calc?
|
||||||
|
|
||||||
Calc is an interactive calculator which provides for easy large
|
Calc is an interactive calculator which provides for easy large
|
||||||
|
27
cal/Makefile
27
cal/Makefile
@@ -269,19 +269,20 @@ TRUE= true
|
|||||||
CALC_FILES= README alg_config.cal beer.cal bernoulli.cal \
|
CALC_FILES= README alg_config.cal beer.cal bernoulli.cal \
|
||||||
bernpoly.cal bigprime.cal bindings brentsolve.cal chi.cal chrem.cal \
|
bernpoly.cal bigprime.cal bindings brentsolve.cal chi.cal chrem.cal \
|
||||||
comma.cal constants.cal deg.cal dms.cal dotest.cal ellip.cal \
|
comma.cal constants.cal deg.cal dms.cal dotest.cal ellip.cal \
|
||||||
factorial.cal factorial2.cal gvec.cal hello.cal hms.cal infinities.cal \
|
factorial.cal factorial2.cal fnv_tool.cal gvec.cal hello.cal hms.cal \
|
||||||
intfile.cal intnum.cal lambertw.cal linear.cal lnseries.cal lucas.cal \
|
infinities.cal intfile.cal intnum.cal lambertw.cal linear.cal \
|
||||||
lucas_chk.cal mersenne.cal mfactor.cal mod.cal natnumset.cal \
|
lnseries.cal lucas.cal lucas_chk.cal mersenne.cal mfactor.cal mod.cal \
|
||||||
palindrome.cal pell.cal pi.cal pix.cal pollard.cal poly.cal prompt.cal \
|
natnumset.cal palindrome.cal pell.cal pi.cal pix.cal pollard.cal \
|
||||||
psqrt.cal qtime.cal quat.cal randbitrun.cal randmprime.cal \
|
poly.cal prompt.cal psqrt.cal qtime.cal quat.cal randbitrun.cal \
|
||||||
randombitrun.cal randomrun.cal randrun.cal regress.cal repeat.cal \
|
randmprime.cal randombitrun.cal randomrun.cal randrun.cal regress.cal \
|
||||||
screen.cal seedrandom.cal set8700.cal set8700.line smallfactors.cal \
|
repeat.cal screen.cal seedrandom.cal set8700.cal set8700.line \
|
||||||
solve.cal specialfunctions.cal statistics.cal strings.cal sumsq.cal \
|
smallfactors.cal solve.cal specialfunctions.cal splitbits.cal \
|
||||||
sumtimes.cal surd.cal test1700.cal test2300.cal test2600.cal \
|
statistics.cal strings.cal sumsq.cal sumtimes.cal surd.cal \
|
||||||
test2700.cal test3100.cal test3300.cal test3400.cal test3500.cal \
|
test1700.cal test2300.cal test2600.cal test2700.cal test3100.cal \
|
||||||
test4000.cal test4100.cal test4600.cal test5100.cal test5200.cal \
|
test3300.cal test3400.cal test3500.cal test4000.cal test4100.cal \
|
||||||
test8400.cal test8500.cal test8600.cal test8900.cal toomcook.cal \
|
test4600.cal test5100.cal test5200.cal test8400.cal test8500.cal \
|
||||||
unitfrac.cal varargs.cal xx_print.cal zeta2.cal
|
test8600.cal test8900.cal toomcook.cal unitfrac.cal varargs.cal \
|
||||||
|
xx_print.cal zeta2.cal
|
||||||
|
|
||||||
# These calc files are now obsolete and are removed by the install rule.
|
# These calc files are now obsolete and are removed by the install rule.
|
||||||
#
|
#
|
||||||
|
120
cal/README
120
cal/README
@@ -388,6 +388,13 @@ dotest.cal
|
|||||||
dotest("set8700.line");
|
dotest("set8700.line");
|
||||||
|
|
||||||
|
|
||||||
|
ellip.cal
|
||||||
|
|
||||||
|
efactor(iN, ia, B, force)
|
||||||
|
|
||||||
|
Attempt to factor using the elliptic functions: y^2 = x^3 + a*x + b.
|
||||||
|
|
||||||
|
|
||||||
factorial.cal
|
factorial.cal
|
||||||
|
|
||||||
factorial(n)
|
factorial(n)
|
||||||
@@ -548,12 +555,65 @@ factorial2.cal
|
|||||||
for information on falling factorials.
|
for information on falling factorials.
|
||||||
|
|
||||||
|
|
||||||
ellip.cal
|
fnv_util.cal
|
||||||
|
|
||||||
efactor(iN, ia, B, force)
|
Utility tools for FNV hash and "FNV-style" hash operations.
|
||||||
|
|
||||||
Attempt to factor using the elliptic functions: y^2 = x^3 + a*x + b.
|
These functions, if given non-standard values, will produce bogus results.
|
||||||
|
In some cases, such as specifying the number of bits in the hash,
|
||||||
|
using a non-power of 2 bit will produce a result that may work,
|
||||||
|
but the hash will be only an "FNV-style" hash and not a true FNV hash.
|
||||||
|
|
||||||
|
find_fnv_prime(bits)
|
||||||
|
|
||||||
|
If bits == null(), this function will attempt to prompt stdin
|
||||||
|
for a value and provide commends on the value of bits.
|
||||||
|
|
||||||
|
given:
|
||||||
|
bits number of bits in the hash, null() ==> prompt for value
|
||||||
|
|
||||||
|
returns:
|
||||||
|
0 ==> no FNV prime found
|
||||||
|
>0 ==> FNV prime
|
||||||
|
|
||||||
|
deprecated_fnv0(bits, fnv_prime, string)
|
||||||
|
|
||||||
|
If fnv_prime == null(), this function will try to compute the FNV prime
|
||||||
|
for a hash of size bits.
|
||||||
|
|
||||||
|
given:
|
||||||
|
bits number of bits in FNV hash
|
||||||
|
fnv_prime FNV prime, null() ==> generate suitable FNV prime if possible
|
||||||
|
string string to hash
|
||||||
|
|
||||||
|
returns:
|
||||||
|
FNV-0 hash, for size bytes, of string
|
||||||
|
|
||||||
|
NOTE: This function does NOT attempt to determine that fnv_prime is prime.
|
||||||
|
|
||||||
|
fnv_offset_basis(bits, fnv_prime)
|
||||||
|
|
||||||
|
given:
|
||||||
|
bits number of bits in FNV hash
|
||||||
|
fnv_prime FNV prime, null() ==> generate suitable FNV prime if possible
|
||||||
|
|
||||||
|
returns:
|
||||||
|
FNV offset basis for a hash size of bits and an FNV prime of fnv_prime
|
||||||
|
|
||||||
|
NOTE: This function does NOT attempt to determine that fnv_prime is prime.
|
||||||
|
|
||||||
|
fnv1a_style_hash(bits, fnv_prime, prev_hash, string)
|
||||||
|
|
||||||
|
given:
|
||||||
|
bits number of bits in FNV hash
|
||||||
|
fnv_prime FNV prime, null() ==> generate suitable FNV prime if possible
|
||||||
|
prev_hash previous hash value, null() ==> generate FNV offset basis
|
||||||
|
string string to hash
|
||||||
|
|
||||||
|
returns:
|
||||||
|
"FNV-style" hash of bits
|
||||||
|
|
||||||
|
NOTE: This function does NOT attempt to determine that fnv_prime is prime.
|
||||||
|
|
||||||
gvec.cal
|
gvec.cal
|
||||||
|
|
||||||
@@ -1433,6 +1493,60 @@ specialfunctions.cal
|
|||||||
on the script zeta2.cal.
|
on the script zeta2.cal.
|
||||||
|
|
||||||
|
|
||||||
|
splitbits.cal
|
||||||
|
|
||||||
|
splitbits(x, b)
|
||||||
|
|
||||||
|
Given an integer x, split the value into a list of integers,
|
||||||
|
each of which is at most b bits long.
|
||||||
|
|
||||||
|
The value b must be an integer > 0.
|
||||||
|
|
||||||
|
The number of elements in the returned list is:
|
||||||
|
|
||||||
|
ceil((highbit(x) + 1) / b)
|
||||||
|
|
||||||
|
If x == 0, then a list of 1 element containing 0 is returned.
|
||||||
|
|
||||||
|
If x < 0, then the two's compliment of abs(x) is returned.
|
||||||
|
Even though calc represents negative integers as positive values
|
||||||
|
with sign bit, the bits returned by this function are as if
|
||||||
|
the integer converted as if the integer was a two's compliment
|
||||||
|
value. For example:
|
||||||
|
|
||||||
|
; L = splitbits(-1, 8);
|
||||||
|
; print L[[0]]
|
||||||
|
255
|
||||||
|
|
||||||
|
; L = splitbits(-2, 8);
|
||||||
|
; print L[[0]]
|
||||||
|
254
|
||||||
|
|
||||||
|
; L = splitbits(-3, 8);
|
||||||
|
; print L[[0]]
|
||||||
|
253
|
||||||
|
|
||||||
|
The first element of the list contains the lowest order bits
|
||||||
|
of x. The last element of the list contains the highest number
|
||||||
|
bits of x.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
; x = 2^23209-1
|
||||||
|
; L = splitbits(x, 16);
|
||||||
|
; print size(L), L[[0]]
|
||||||
|
|
||||||
|
; print istype(2, 3i), istype(2, "2"), istype(2, null())
|
||||||
|
0 0 0
|
||||||
|
|
||||||
|
; mat a[2]
|
||||||
|
; b = list(1,2,3)
|
||||||
|
; c = assoc()
|
||||||
|
; obj chongo {was, here} d;
|
||||||
|
; print istype(a,b), istype(b,c), istype(c,d)
|
||||||
|
0 0 0
|
||||||
|
|
||||||
|
|
||||||
statistics.cal
|
statistics.cal
|
||||||
|
|
||||||
gammaincoctave(z,a)
|
gammaincoctave(z,a)
|
||||||
|
473
cal/fnv_tool.cal
Normal file
473
cal/fnv_tool.cal
Normal file
@@ -0,0 +1,473 @@
|
|||||||
|
/*
|
||||||
|
* fnv_util - utility tools for FNV hash and "FNV-style" hash operations
|
||||||
|
*
|
||||||
|
* This file provides the following functions:
|
||||||
|
*
|
||||||
|
* find_fnv_prime(bits)
|
||||||
|
* deprecated_fnv0(bits, fnv_prime, string)
|
||||||
|
* fnv_offset_basis(bits, fnv_prime)
|
||||||
|
* fnv1a_style_hash(bits, fnv_prime, prev_hash, string)
|
||||||
|
*
|
||||||
|
* See the individual function for details on args and return value.
|
||||||
|
*
|
||||||
|
* If no args are given to find_fnv_prime() and stdin is associated
|
||||||
|
* with a tty (i.e., an interactive terminal), then bits will be
|
||||||
|
* prompted for and commentary will be printed to stdout as well.
|
||||||
|
*
|
||||||
|
* If fnv_prime == null(), then an attempt to compute the FNV prime
|
||||||
|
* for a hash if size bits is attempted..
|
||||||
|
*
|
||||||
|
* If prev_hash == null(), then the FNV offset basis for
|
||||||
|
* for a hash if size bits is computed.
|
||||||
|
*
|
||||||
|
* For more information on the FNV hash see:
|
||||||
|
*
|
||||||
|
* https://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function
|
||||||
|
* http://www.isthe.com/chongo/tech/comp/fnv/index.html
|
||||||
|
*
|
||||||
|
* IMPORTANT NOTE:
|
||||||
|
*
|
||||||
|
* These functions, if given non-standard values, will produce bogus results.
|
||||||
|
* In some cases, such as specifying the number of bits in the hash,
|
||||||
|
* using a non-power of 2 bit will produce a result that may work,
|
||||||
|
* but the hash will be only an "FNV-style" hash and not a true FNV hash.
|
||||||
|
*
|
||||||
|
* We say "FNV-style" because the result hash is not a "true FNV-like" hash.
|
||||||
|
*
|
||||||
|
* Let integer n > 0 be the number if bits in the FNV hash. Then:
|
||||||
|
*
|
||||||
|
* t = floor((5+n)/12)
|
||||||
|
*
|
||||||
|
* The FNV prime, for the given n bits is the smallest prime of the form:
|
||||||
|
*
|
||||||
|
* p = 256^t + 2^8 + b
|
||||||
|
*
|
||||||
|
* such that:
|
||||||
|
*
|
||||||
|
* 0 < b < 2^8
|
||||||
|
* The number of one-bits in b must be 4 or 5
|
||||||
|
* p mod (2^40 - 2^24 - 1) > (2^24 + 2^8 + 2^7)
|
||||||
|
*
|
||||||
|
* If you force n to not be a power of 2, for example:
|
||||||
|
*
|
||||||
|
* n = 44
|
||||||
|
*
|
||||||
|
* you will find that the FNV prime for 44 bits is:
|
||||||
|
*
|
||||||
|
* p44 = 4294967597
|
||||||
|
* = 0x10000012d
|
||||||
|
* = 0b100000000000000000000000100101101
|
||||||
|
* = 2^32 + 301 = 2^32 + 2^8 + 2^5 + 2^3 + 2^2 + 2^0
|
||||||
|
*
|
||||||
|
* However a hash size of 44 bits is not a true FNV hash, it is only a "FNV-style" hash.
|
||||||
|
*
|
||||||
|
* NOTE: We disallow n <= 31 because there are no FNV primes that small.
|
||||||
|
*
|
||||||
|
* NOTE: For n that is a power of 2 and n > 1024, you will find that
|
||||||
|
* that FNV primes become so rare that that one may not find a suitable
|
||||||
|
* FNV prime. For n = powers of 2 >= 2048 and <= 1048576,
|
||||||
|
* there is NO FNV primes.
|
||||||
|
*
|
||||||
|
* As for as hashing goes, large values of n, even if an
|
||||||
|
* FNV hash may be found, are unlikely to be truly useful. :-)
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software and
|
||||||
|
* its documentation for any purpose and without fee is hereby granted,
|
||||||
|
* provided that the above copyright, this permission notice and text
|
||||||
|
* this comment, and the disclaimer below appear in all of the following:
|
||||||
|
*
|
||||||
|
* supporting documentation
|
||||||
|
* source copies
|
||||||
|
* source works derived from this source
|
||||||
|
* binaries derived from this source or from derived source
|
||||||
|
*
|
||||||
|
* LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||||
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
|
||||||
|
* EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||||
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
|
||||||
|
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*
|
||||||
|
* chongo (Landon Curt Noll, http://www.isthe.com/chongo/index.html) /\oo/\
|
||||||
|
*
|
||||||
|
* Share and enjoy! :-)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* find_fnv_prime - try to find a FNV prime given the number of bits
|
||||||
|
*
|
||||||
|
* If bits == null(), this function will attempt to prompt stdin
|
||||||
|
* for a value and provide commends on the value of bits.
|
||||||
|
*
|
||||||
|
* given:
|
||||||
|
* bits number of bits in the hash, null() ==> prompt for value
|
||||||
|
*
|
||||||
|
* returns:
|
||||||
|
* 0 ==> no FNV prime found
|
||||||
|
* >0 ==> FNV prime
|
||||||
|
*/
|
||||||
|
define find_fnv_prime(bits)
|
||||||
|
{
|
||||||
|
local b; /* lower octet of the potential FNV prime: [1,255] */
|
||||||
|
local p; /* value to test as an FNV prime */
|
||||||
|
local t; /* power of 256 part of the FNV prime */
|
||||||
|
local one_bits; /* number of 1 bits in b */
|
||||||
|
local p_minus_b; /* potential FNV prime less b */
|
||||||
|
local interactive; /* true ==> interactive mode and print commentary */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* case: no arg, prompt for bits and print commentary
|
||||||
|
*/
|
||||||
|
interactive = 0; /* assume non-interactive mode */
|
||||||
|
if (isnull(bits)) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* must be attached to an interactive terminal
|
||||||
|
*/
|
||||||
|
if (!isatty(files(0))) {
|
||||||
|
print "# FATAL: stdin is not a tty: not attached to an interactive terminal";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
interactive = 1; /* set interactive mode */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* prompt for the number of bits
|
||||||
|
*/
|
||||||
|
do {
|
||||||
|
local strscanf_ret; /* return from strscanf_ret */
|
||||||
|
local input; /* value read after prompt */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* prompt and obtain the input
|
||||||
|
*/
|
||||||
|
input = prompt("Enter hash size in bits: ");
|
||||||
|
strscanf_ret = strscanf(input, "%i", bits);
|
||||||
|
print "input =", input;
|
||||||
|
print "bits =", bits;
|
||||||
|
if (!isint(bits) || bits <= 0) {
|
||||||
|
print;
|
||||||
|
print "# NOTE: must enter a integer > 0, try again";
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
} while (!isint(bits) || bits <= 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* firewall - bits must be non-negative integer
|
||||||
|
*/
|
||||||
|
if (!isint(bits) || bits < 0) {
|
||||||
|
if (interactive) {
|
||||||
|
print "# FATAL: bits must be non-negative integer";
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* provide commentary on the choice of bits if we are interactive
|
||||||
|
*/
|
||||||
|
if (interactive) {
|
||||||
|
if (popcnt(bits) == 1) {
|
||||||
|
if (bits > 1024) {
|
||||||
|
print "# WARNING: FNV primes for bit size powers of 2 > 1024 are extremely rare.";
|
||||||
|
print "# WARNING: There are no FNV primes for bit size powers of 2 >= 2048 and <= 1048576.";
|
||||||
|
}
|
||||||
|
print "n =", bits;
|
||||||
|
} else {
|
||||||
|
if (bits < 32) {
|
||||||
|
print "# WARNING: bits < 32 is not recommended because there isn't enough bits to be worth hashing";
|
||||||
|
}
|
||||||
|
print "# WARNING: because bits is not a power of 2, we can only form an \"FNV-style hash\": not a true FNV hash.";
|
||||||
|
print "# WARNING: A \"FNV-style hash\" may not have the desired hash properties of a true FNV hash.";
|
||||||
|
print "n =", bits;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* search setup
|
||||||
|
*/
|
||||||
|
t = floor((5+bits)/12);
|
||||||
|
p_minus_b = 256^t + 2^8;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* search for a b that forms a suitable FNV prime
|
||||||
|
*/
|
||||||
|
for (b=1; b < 256; ++b) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* reject b unless the of one-bits in bottom octet of p is 4 or 5
|
||||||
|
*/
|
||||||
|
one_bits = popcnt(b);
|
||||||
|
if (one_bits != 4 && one_bits != 5) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* reject p if p mod (2^40 - 2^24 - 1) <= (2^24 + 2^8 + 2^7)
|
||||||
|
*/
|
||||||
|
p = p_minus_b + b;
|
||||||
|
if ((p % (2^40 - 2^24 - 1)) <= (2^24 + 2^8 + 2^7)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* accept potential p value that is prime
|
||||||
|
*/
|
||||||
|
if (ptest(p) == 1) {
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* case: did not find an FNV prime
|
||||||
|
*/
|
||||||
|
if (b >= 256) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* examine results if interactive
|
||||||
|
*/
|
||||||
|
if (interactive) {
|
||||||
|
print "# FATAL: There is no a suitable FNV prime for bits =", bits;
|
||||||
|
quit "find_fnv_prime: FATAL: FNV prime search failed";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* return 0 to indicate no FNV prime found
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* provide FNV commentary if interactive
|
||||||
|
*/
|
||||||
|
if (interactive) {
|
||||||
|
print "t =", t;
|
||||||
|
print "b =", b;
|
||||||
|
print "# NOTE: p = 256^":t, "+ 2^8 +", b;
|
||||||
|
print;
|
||||||
|
print "p =", p;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* return FNV prime
|
||||||
|
*/
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* deprecated_fnv0 - FNV-0 hash that should only be used to generate an FNV offset basis
|
||||||
|
*
|
||||||
|
* If fnv_prime == null(), this function will try to compute the FNV prime
|
||||||
|
* for a hash of size bits.
|
||||||
|
*
|
||||||
|
* given:
|
||||||
|
* bits number of bits in FNV hash
|
||||||
|
* fnv_prime FNV prime, null() ==> generate suitable FNV prime if possible
|
||||||
|
* string string to hash
|
||||||
|
*
|
||||||
|
* returns:
|
||||||
|
* FNV-0 hash, for size bytes, of string
|
||||||
|
*
|
||||||
|
* NOTE: This function does NOT attempt to determine that fnv_prime is prime.
|
||||||
|
*/
|
||||||
|
define deprecated_fnv0(bits, fnv_prime, string)
|
||||||
|
{
|
||||||
|
local hash; /* FNV hash value */
|
||||||
|
local len; /* length of string */
|
||||||
|
local base; /* base of FNV hash: 2^bits */
|
||||||
|
local i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* firewall
|
||||||
|
*/
|
||||||
|
if (!isint(bits) || bits <= 0) {
|
||||||
|
quit "deprecated_fnv0: FATAL: bits arg must be an integer > 0";
|
||||||
|
}
|
||||||
|
if (!isstr(string)) {
|
||||||
|
quit "deprecated_fnv0: FATAL: string arg must be a string";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fnv_prime == null() means to try and generate the FNV prime
|
||||||
|
*/
|
||||||
|
if (isnull(fnv_prime)) {
|
||||||
|
/* try to generate an FNV prime */
|
||||||
|
fnv_prime = find_fnv_prime(bits);
|
||||||
|
if (fnv_prime == 0) {
|
||||||
|
quit "deprecated_fnv0: FATAL: no FNV prime exists for the given hash size in bits";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isint(fnv_prime) || fnv_prime <= 0) {
|
||||||
|
quit "deprecated_fnv0: FATAL: fnv_prime arg must be an integer > 0 and should be prime";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FNV-0 hash each character
|
||||||
|
*/
|
||||||
|
len = strlen(string);
|
||||||
|
base = 2^bits;
|
||||||
|
hash = 0;
|
||||||
|
for (i=0; i < len; ++i) {
|
||||||
|
hash = xor((hash * fnv_prime) % base, ord(string[i]));
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fnv_offset_basis - generate and FNV offset basis
|
||||||
|
*
|
||||||
|
* given:
|
||||||
|
* bits number of bits in FNV hash
|
||||||
|
* fnv_prime FNV prime, null() ==> generate suitable FNV prime if possible
|
||||||
|
*
|
||||||
|
* returns:
|
||||||
|
* FNV offset basis for a hash size of bits and an FNV prime of fnv_prime
|
||||||
|
*
|
||||||
|
* NOTE: This function does NOT attempt to determine that fnv_prime is prime.
|
||||||
|
*/
|
||||||
|
define
|
||||||
|
fnv_offset_basis(bits, fnv_prime)
|
||||||
|
{
|
||||||
|
local fnv0_hash = 0; /* FNV-0 hash value */
|
||||||
|
|
||||||
|
/* string to generate a FNV offset basis - do not change this value */
|
||||||
|
static chongo_was_here = "chongo <Landon Curt Noll> /\\../\\";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* firewall
|
||||||
|
*/
|
||||||
|
if (!isint(bits) || bits <= 0) {
|
||||||
|
quit "fnv_offset_basis: FATAL: bits arg must be an integer > 0";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fnv_prime == null() means to try and generate the FNV prime
|
||||||
|
*/
|
||||||
|
if (isnull(fnv_prime)) {
|
||||||
|
/* try to generate an FNV prime */
|
||||||
|
fnv_prime = find_fnv_prime(bits);
|
||||||
|
if (fnv_prime == 0) {
|
||||||
|
quit "fnv_offset_basis: FATAL: no FNV prime exists for the given hash size in bits";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isint(fnv_prime) || fnv_prime <= 0) {
|
||||||
|
quit "fnv_offset_basis: FATAL: fnv_prime arg must be an integer > 0 and should be prime";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* return the FNV-0 hash of fnv_offset_basis as the FNV offset basis
|
||||||
|
*/
|
||||||
|
fnv0_hash = deprecated_fnv0(bits, fnv_prime, chongo_was_here);
|
||||||
|
return fnv0_hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fnv_style_hash - compute an "FNV-1a-style" hash
|
||||||
|
*
|
||||||
|
* These functions, if given non-standard values, will produce bogus results.
|
||||||
|
* To produce a true FNV-1a hash:
|
||||||
|
*
|
||||||
|
* bits must be a power of 2
|
||||||
|
* 32 <= bits
|
||||||
|
* fnv_prime == find_fnv_prime(bits) OR fnv_prime == null()
|
||||||
|
* prev_hash == previous FNV hash OR prev_hash == null()
|
||||||
|
*
|
||||||
|
* If fnv_prime == null(), this function will try to compute the FNV prime
|
||||||
|
* for a hash of size bits.
|
||||||
|
*
|
||||||
|
* If prev_hash == null(), this function will try to compute the FNV offset basis
|
||||||
|
* for a hash of size bits.
|
||||||
|
*
|
||||||
|
* One may chain "FNV-style" hashes by replacing the offset_basis with
|
||||||
|
* the hash state of the previous hash. For the first hash:
|
||||||
|
*
|
||||||
|
* fnv_prime = find_fnv_prime(bits)
|
||||||
|
* hash_val = fnv_style_hash(bits, fnv_prime, null(), string_a);
|
||||||
|
*
|
||||||
|
* then:
|
||||||
|
*
|
||||||
|
* hash_val = fnv_style_hash(bits, fnv_prime, hash_val, string_b);
|
||||||
|
*
|
||||||
|
* This will produce the same as the string_a concatenated with string_b:
|
||||||
|
*
|
||||||
|
* hash_val = fnv_style_hash(bits, null(), null(), string_a + string_b);
|
||||||
|
*
|
||||||
|
* NOTE: Because string_a and string_b are strings, the expression:
|
||||||
|
*
|
||||||
|
* string_a + string_b
|
||||||
|
*
|
||||||
|
* is string_a concatenated with string_b.
|
||||||
|
*
|
||||||
|
* given:
|
||||||
|
* bits number of bits in FNV hash
|
||||||
|
* fnv_prime FNV prime, null() ==> generate suitable FNV prime if possible
|
||||||
|
* prev_hash previous hash value, null() ==> generate FNV offset basis
|
||||||
|
* string string to hash
|
||||||
|
*
|
||||||
|
* returns:
|
||||||
|
* "FNV-style" hash of bits
|
||||||
|
*
|
||||||
|
* NOTE: This function does NOT attempt to determine that fnv_prime is prime.
|
||||||
|
*/
|
||||||
|
define
|
||||||
|
fnv1a_style_hash(bits, fnv_prime, prev_hash, string)
|
||||||
|
{
|
||||||
|
local hash = 0; /* FNV hash value */
|
||||||
|
local len; /* length of string */
|
||||||
|
local base; /* base of FNV hash: 2^bits */
|
||||||
|
local i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* firewall
|
||||||
|
*/
|
||||||
|
if (!isint(bits) || bits <= 0) {
|
||||||
|
quit "fnv1a_style_hash: FATAL: bits arg must be an integer > 0";
|
||||||
|
}
|
||||||
|
if (!isstr(string)) {
|
||||||
|
quit "fnv1a_style_hash: FATAL: string arg must be a string";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fnv_prime == null() means to try and generate the FNV prime
|
||||||
|
*/
|
||||||
|
if (isnull(fnv_prime)) {
|
||||||
|
/* try to generate an FNV prime */
|
||||||
|
fnv_prime = find_fnv_prime(bits);
|
||||||
|
if (fnv_prime == 0) {
|
||||||
|
quit "fnv1a_style_hash: FATAL: no FNV prime exists for the given hash size in bits";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isint(fnv_prime) || fnv_prime <= 0) {
|
||||||
|
quit "fnv1a_style_hash: FATAL: fnv_prime arg must be an integer > 0 and should be prime";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* prev_hash == null() means to generate the FNV offset basis
|
||||||
|
*/
|
||||||
|
if (isnull(prev_hash)) {
|
||||||
|
|
||||||
|
/* generate the FNV offset basis for a hash of size bits */
|
||||||
|
prev_hash = fnv_offset_basis(bits, fnv_prime);
|
||||||
|
}
|
||||||
|
if (!isint(prev_hash) || prev_hash < 0) {
|
||||||
|
quit "fnv1a_style_hash: FATAL: prev_hash arg must be an integer => 0";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FNV-1a hash each character
|
||||||
|
*/
|
||||||
|
len = strlen(string);
|
||||||
|
base = 2^bits;
|
||||||
|
hash = prev_hash;
|
||||||
|
for (i=0; i < len; ++i) {
|
||||||
|
hash = xor((hash * fnv_prime) % base, ord(string[i]));
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
83
cal/splitbits.cal
Normal file
83
cal/splitbits.cal
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* splitbits - split an integer into list on bit boundardies of a fixed size
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018,2023 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: 2006/06/07 14:10:11
|
||||||
|
* File existed as early as: 2006
|
||||||
|
*
|
||||||
|
* chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||||
|
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* setup splitbits errors
|
||||||
|
*/
|
||||||
|
static E_SPLITBITS_1, E_SPLITBITS_2, E_SPLITBITS_3;
|
||||||
|
if (! iserror(E_SPLITBITS_1)) E_SPLITBITS_1 = newerror("1st argument to splitbits must be an integer");
|
||||||
|
if (! iserror(E_SPLITBITS_2)) E_SPLITBITS_2 = newerror("2nd argument to splitbits must be an integer");
|
||||||
|
if (! iserror(E_SPLITBITS_3)) E_SPLITBITS_3 = newerror("2nd argument must be an integer > 0");
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* define splitbits function
|
||||||
|
*/
|
||||||
|
define splitbits(x, b)
|
||||||
|
{
|
||||||
|
local ret; /* list to return */
|
||||||
|
local mask; /* 2^b-1 */
|
||||||
|
local x_is_reg = 0; /* true if x < 0 */
|
||||||
|
|
||||||
|
/* firewall */
|
||||||
|
if (! isint(x)) {
|
||||||
|
return error(E_SPLITBITS_1);
|
||||||
|
}
|
||||||
|
if (! isint(b)) {
|
||||||
|
return error(E_SPLITBITS_2);
|
||||||
|
}
|
||||||
|
if (b <= 0) {
|
||||||
|
return error(E_SPLITBITS_3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* special case: x == 0 */
|
||||||
|
if (x == 0) {
|
||||||
|
return list(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* setup for splitting x */
|
||||||
|
ret = list();
|
||||||
|
mask = 2^b-1;
|
||||||
|
if (x < 0) {
|
||||||
|
x_is_reg = 1;
|
||||||
|
x = abs(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* split x */
|
||||||
|
while (x > 0) {
|
||||||
|
printf("%d %x\n", size(ret), x);
|
||||||
|
if (x_is_reg) {
|
||||||
|
append(ret, xor(x & mask, mask));
|
||||||
|
} else {
|
||||||
|
append(ret, x & mask);
|
||||||
|
}
|
||||||
|
x >>= b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return list */
|
||||||
|
return ret;
|
||||||
|
}
|
@@ -475,7 +475,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.14.1.6
|
VERSION= 2.14.3.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
|
@@ -445,7 +445,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.14.1.6
|
VERSION= 2.14.3.0
|
||||||
|
|
||||||
# Names of shared libraries with versions
|
# Names of shared libraries with versions
|
||||||
#
|
#
|
||||||
@@ -586,16 +586,6 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
|||||||
#
|
#
|
||||||
# Specific target overrides or modifications to default values
|
# Specific target overrides or modifications to default values
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
# NOTE: If your target is not supported below and the default target #
|
|
||||||
# is not suitable for your needs, please send to the: #
|
|
||||||
# #
|
|
||||||
# calc-contrib at asthe dot com #
|
|
||||||
# #
|
|
||||||
# Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
|
|
||||||
# set of lines so that we can consider them for the next release. #
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
#
|
#
|
||||||
BLD_TYPE= calc-static-only
|
BLD_TYPE= calc-static-only
|
||||||
#
|
#
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* fposval - Determine information about the file position type
|
* fposval - Determine information about the file position type
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999,2021 Landon Curt Noll
|
* Copyright (C) 1999,2021,2023 Landon Curt Noll
|
||||||
*
|
*
|
||||||
* Calc is open software; you can redistribute it and/or modify it under
|
* Calc is open software; you can redistribute it and/or modify it under
|
||||||
* the terms of the version 2.1 of the GNU Lesser General Public License
|
* the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "have_unused.h"
|
#include "have_unused.h"
|
||||||
#include "have_memmv.h"
|
#include "have_memmv.h"
|
||||||
|
#include "zmath.h"
|
||||||
|
|
||||||
|
|
||||||
#include "banned.h" /* include after system header <> includes */
|
#include "banned.h" /* include after system header <> includes */
|
||||||
|
@@ -101,11 +101,11 @@ Low priority items:
|
|||||||
|
|
||||||
Calc bug reports and calc bug fixes should be sent to:
|
Calc bug reports and calc bug fixes should be sent to:
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
NOTE: calc-bug-report Email address no longer in use
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
This replaces the old calc-bugs Email address.
|
||||||
|
|
||||||
To be sure we see your Email reporting a calc bug, please use the
|
To be sure we see your Email reporting a calc bug, please use the
|
||||||
following phase in your Email Subject line:
|
following phase in your Email Subject line:
|
||||||
|
@@ -187,11 +187,11 @@ Please read CONTRIB-CODE or run the following calc command:
|
|||||||
|
|
||||||
Calc bug reports and calc bug fixes should be sent to:
|
Calc bug reports and calc bug fixes should be sent to:
|
||||||
|
|
||||||
calc-bug-report at asthe dot com
|
NOTE: calc-bug-report Email address no longer in use
|
||||||
|
|
||||||
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
NOTE: Remove spaces and replace 'at' with @, 'dot' with .
|
||||||
|
|
||||||
This replaces the old calc-bugs at asthe dot com address.
|
This replaces the old calc-bugs Email address.
|
||||||
|
|
||||||
To be sure we see your Email reporting a calc bug, please use the
|
To be sure we see your Email reporting a calc bug, please use the
|
||||||
following phase in your Email Subject line:
|
following phase in your Email Subject line:
|
||||||
|
@@ -83,8 +83,8 @@ static char *program;
|
|||||||
*/
|
*/
|
||||||
#define MAJOR_VER 2 /* major library version */
|
#define MAJOR_VER 2 /* major library version */
|
||||||
#define MINOR_VER 14 /* minor library version */
|
#define MINOR_VER 14 /* minor library version */
|
||||||
#define MAJOR_PATCH 1 /* major software version level */
|
#define MAJOR_PATCH 3 /* major software version level */
|
||||||
#define MINOR_PATCH 6 /* minor software version level */
|
#define MINOR_PATCH 0 /* minor software version level */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user