mirror of
https://github.com/lcn2/calc.git
synced 2025-08-22 01:23:28 +03:00
Compare commits
7 Commits
v2.14.2.2
...
prod-2.14.
Author | SHA1 | Date | |
---|---|---|---|
|
e2686911ae | ||
|
544b873914 | ||
|
948d9e807b | ||
|
6d020b7fbe | ||
|
9fcdd80549 | ||
|
3148ce06a0 | ||
|
945977f1f4 |
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
|
||||
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)!!
|
||||
|
||||
|
31
CHANGES
31
CHANGES
@@ -13,6 +13,37 @@ The following are the changes from calc version 2.14.2.1 to date:
|
||||
|
||||
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:
|
||||
|
||||
|
40
COPYING
40
COPYING
@@ -1,6 +1,5 @@
|
||||
calc - arbitrary precision calculator
|
||||
|
||||
|
||||
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
|
||||
libraries are covered under the License.
|
||||
|
||||
The ``scripts used to control compilation and installation of the
|
||||
of the library'' include:
|
||||
The "scripts used to control compilation and installation of the
|
||||
of the library" include:
|
||||
|
||||
* 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.
|
||||
|
||||
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
|
||||
* 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
|
||||
* the main calc.c file
|
||||
|
||||
The ``complete source code'' includes ALL files shipped with calc,
|
||||
except for the exception files explicitly listed in the ``Calc
|
||||
copyrights and exception files'' section below.
|
||||
The "complete source code" includes ALL files shipped with calc,
|
||||
except for the exception files explicitly listed in the "Calc
|
||||
copyrights and exception files" section below.
|
||||
|
||||
-=-
|
||||
|
||||
@@ -146,9 +145,32 @@ Calc copyrights and exception files
|
||||
cal/dotest.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.
|
||||
And because one may freely distribute the LGPL covered files, the
|
||||
|
86
Makefile
86
Makefile
@@ -841,8 +841,21 @@ HAVE_STRLCAT=
|
||||
#
|
||||
ifeq ($(target),Darwin)
|
||||
|
||||
# default INCDIR for macOS
|
||||
INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include
|
||||
# determine default INCDIR for macOS
|
||||
#
|
||||
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
|
||||
#
|
||||
@@ -1381,7 +1394,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.14.2.2
|
||||
VERSION= 2.14.3.0
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
@@ -1458,8 +1471,15 @@ EXTRA_LDFLAGS=
|
||||
# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
|
||||
# CCMISC and precede EXTRA_CFLAGS.
|
||||
#
|
||||
# When ARCH_CFLAGS is empty, the native binary architecture is assumed.
|
||||
#
|
||||
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
|
||||
# intermediate and final calc and calc related programs
|
||||
@@ -1630,39 +1650,48 @@ endif
|
||||
# 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)
|
||||
#
|
||||
BLD_TYPE= calc-dynamic-only
|
||||
#
|
||||
CC_SHARE= -fPIC
|
||||
DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:${PREFIX}/lib
|
||||
LD_SHARE= ${DARWIN_ARCH}
|
||||
LD_SHARE= ${ARCH_CFLAGS}
|
||||
#SET_INSTALL_NAME= no
|
||||
SET_INSTALL_NAME= yes
|
||||
ifeq ($(SET_INSTALL_NAME),yes)
|
||||
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
|
||||
LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
||||
${DARWIN_ARCH}
|
||||
${ARCH_CFLAGS}
|
||||
endif
|
||||
ifdef ALLOW_CUSTOM
|
||||
ifeq ($(SET_INSTALL_NAME),yes)
|
||||
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
|
||||
LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
|
||||
${DARWIN_ARCH}
|
||||
${ARCH_CFLAGS}
|
||||
endif
|
||||
else
|
||||
LIBCUSTCALC_SHLIB=
|
||||
endif
|
||||
#
|
||||
CC_STATIC=
|
||||
LD_STATIC= ${DARWIN_ARCH}
|
||||
LD_STATIC= ${ARCH_CFLAGS}
|
||||
LIBCALC_STATIC=
|
||||
LIBCUSTCALC_STATIC=
|
||||
#
|
||||
# If you want to add flags to all compiler and linker
|
||||
# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
|
||||
# set ${COMMON_ADD}.
|
||||
@@ -1686,7 +1715,7 @@ WNO_ERROR_LONG_LONG= -Wno-error=long-long
|
||||
WNO_LONG_LONG= -Wno-long-long
|
||||
CCWERR=
|
||||
CCOPT= ${DEBUG}
|
||||
CCMISC= ${DARWIN_ARCH}
|
||||
CCMISC= ${ARCH_CFLAGS}
|
||||
#
|
||||
LCC= cc
|
||||
CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
@@ -1696,11 +1725,6 @@ LIB_EXT:= .dylib
|
||||
LIB_EXT_VERSION:= .${VERSION}${LIB_EXT}
|
||||
# LDCONFIG not required on this platform, so we redefine it to an empty string
|
||||
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
|
||||
|
||||
##################
|
||||
@@ -4946,6 +4970,30 @@ calcinfo:
|
||||
-@${UNAME} -a
|
||||
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
||||
@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
|
||||
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
||||
@@ -5220,7 +5268,9 @@ debug:
|
||||
@echo
|
||||
@echo 'Click the ((New issue)) button to file a bug report.'
|
||||
@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
|
||||
|
||||
###
|
||||
|
@@ -1239,7 +1239,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.14.2.2
|
||||
VERSION= 2.14.3.0
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
@@ -1316,8 +1316,15 @@ EXTRA_LDFLAGS=
|
||||
# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
|
||||
# CCMISC and precede EXTRA_CFLAGS.
|
||||
#
|
||||
# When ARCH_CFLAGS is empty, the native binary architecture is assumed.
|
||||
#
|
||||
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
|
||||
# intermediate and final calc and calc related programs
|
||||
@@ -4250,6 +4257,30 @@ calcinfo:
|
||||
-@${UNAME} -a
|
||||
@echo '=-=-= end of output of $${UNAME} -a =-=-='
|
||||
@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
|
||||
@echo '=-=-= output of $${HOSTNAME} follows =-=-='
|
||||
@@ -4524,7 +4555,9 @@ debug:
|
||||
@echo
|
||||
@echo 'Click the ((New issue)) button to file a bug report.'
|
||||
@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
|
||||
|
||||
###
|
||||
|
@@ -65,8 +65,8 @@
|
||||
*
|
||||
* 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 = 2048, 4096, 8192, 16384, 32768, 65536, 131072
|
||||
* 262144, and 524288, there is NO suitable FNV prime.
|
||||
* 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. :-)
|
||||
@@ -173,10 +173,9 @@ define find_fnv_prime(bits)
|
||||
if (interactive) {
|
||||
if (popcnt(bits) == 1) {
|
||||
if (bits > 1024) {
|
||||
print "# WARNING: FNV primes for powers of 2 > 1024 are extremely rare.";
|
||||
print "# WARNING: There are no FNV primes for 2048, 4096, 8192, 16384, 327678, 65536, 131072, 262144, nor 524288.";
|
||||
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 "# NOTE: bits a power of 2 and bits >= 32: bits is suitable for a true FNV hash";
|
||||
print "n =", bits;
|
||||
} else {
|
||||
if (bits < 32) {
|
||||
|
@@ -475,7 +475,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.14.2.2
|
||||
VERSION= 2.14.3.0
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
|
@@ -445,7 +445,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.14.2.2
|
||||
VERSION= 2.14.3.0
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
|
@@ -83,8 +83,8 @@ static char *program;
|
||||
*/
|
||||
#define MAJOR_VER 2 /* major library version */
|
||||
#define MINOR_VER 14 /* minor library version */
|
||||
#define MAJOR_PATCH 2 /* major software version level */
|
||||
#define MINOR_PATCH 2 /* minor software version level */
|
||||
#define MAJOR_PATCH 3 /* major software version level */
|
||||
#define MINOR_PATCH 0 /* minor software version level */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user