mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
46 Commits
prod-2.15.
...
v2.15.0.2
Author | SHA1 | Date | |
---|---|---|---|
|
8d6f83ad91 | ||
|
8dd380a9f7 | ||
|
fbaff69c92 | ||
|
c724227ef9 | ||
|
3fd64578a6 | ||
|
c9c4105ddc | ||
|
80b7cd34fe | ||
|
630947d35c | ||
|
45f62fd7b4 | ||
|
8ca980b2bb | ||
|
2ace631d00 | ||
|
41d339c60e | ||
|
cc3bb98fa0 | ||
|
2b506a74e7 | ||
|
826d2d8175 | ||
|
af8ffb3098 | ||
|
71dd30c4c6 | ||
|
8ca96a8c29 | ||
|
0bba80c92b | ||
|
c1882e2ea0 | ||
|
79964338d1 | ||
|
d809ce5cf0 | ||
|
daac7b35af | ||
|
40d6e22318 | ||
|
ab2038ecbc | ||
|
0b57d6b605 | ||
|
01f0605055 | ||
|
0e6016f429 | ||
|
2d2e1c5894 | ||
|
50ba5f9a3e | ||
|
850cdbef1d | ||
|
21cedfcae4 | ||
|
4fa137a638 | ||
|
6ebe707670 | ||
|
885db22315 | ||
|
06a9997da7 | ||
|
fae4b8e81b | ||
|
ddf0c8f1f5 | ||
|
d52cbcea14 | ||
|
d14d525a6a | ||
|
698f73cd3e | ||
|
e1888d9b9e | ||
|
b54f68a797 | ||
|
77d7e665e0 | ||
|
e96ef61718 | ||
|
0eee1a615d |
4
BUGS
4
BUGS
@@ -101,7 +101,9 @@ Known bugs in calc:
|
||||
The output of the alg_config.cal resource file is bogus.
|
||||
We would welcome a replacement for this code.
|
||||
|
||||
Calc may not compile natively under Windows 11. See README.WINDOWS.
|
||||
Calc may not compile natively under Windows 11, however with
|
||||
MSYS2 Software Distribution (a fork of Cygwin) people compile
|
||||
calc under Windiws just fine. See README.WINDOWS.
|
||||
|
||||
We are sure some more bugs exist. When you find them, please let
|
||||
us know! See the above for details on how to report and were to
|
||||
|
64
CHANGES
64
CHANGES
@@ -1,4 +1,39 @@
|
||||
The following are the changes from calc version 2.14.3.5 to 2.15.0.0:
|
||||
The following are the changes from calc version 2.15.0.1 to 2.15.0.2:
|
||||
|
||||
Updated BUGS about MSYS2 on Windows compiling of calc.
|
||||
|
||||
Added more git related checks and sanity checks to chk_tree.
|
||||
|
||||
Added ${FSANITIZE} make variable to Makefile.config to hold
|
||||
common Address Sanitizer (ASAN) optins to modern Linux and macOS.
|
||||
The Address Sanitizer is NOT enabled not compiled in by default.
|
||||
Improved comments in Makefile.local for RHEL9.2 (Linux) and for
|
||||
macOS 14.0 that, when uncommented and calc is recompiled (i.e.,
|
||||
make clobber all) will enable the Address Sanitizer (ASAN) for calc.
|
||||
|
||||
Fixed memory leaks in the logn, aversin, acoversin, avercos,
|
||||
acovercos, ahaversin, ahavercos, ahacovercos, aexsec,
|
||||
aexcsc, and acrd.
|
||||
|
||||
Fixed a compile error in zmath.h that impacted legacy 32-bit Big
|
||||
Endian machines. Thanks goes to GitHub user @gromit1811 for their
|
||||
pull request.
|
||||
|
||||
Fixed the check for <sys/mount.h> when forming have_sys_mount.h.
|
||||
Thanks goes to GitHub user @gromit1811 for their pull request.
|
||||
|
||||
Added "STATIC bool blum_initialized = false" to zrandom.c to improve
|
||||
how the code detects if the Blum-Blum-Shub pseudo-random number
|
||||
generator is seeded or not, and how to free the state correctly.
|
||||
|
||||
NOTE: There is a very minor memory leak in zrandom.c that will be
|
||||
fixed in a later release.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.14.3.5 to 2.15.0.1:
|
||||
|
||||
The tarball for calc version 2.15.0.0 was missing version.h.
|
||||
The version.h is now listed as part of the calc distribution.
|
||||
|
||||
Added the following new trigonometric functions:
|
||||
|
||||
@@ -434,6 +469,31 @@ The following are the changes from calc version 2.14.3.4 to 2.14.3.5:
|
||||
Added errsym E_LOG2_4 for log2(0).
|
||||
Added errsym E_LOGN_6 for logn(0,base).
|
||||
|
||||
Added a chk_tree tool to help look for problems such as files that are
|
||||
result of building calc that are also part of the calc distribution,
|
||||
and files that are part of the calc source that are missing from the
|
||||
calc distribution, and files that are of unknown status that are either
|
||||
result of building calc nor missing from the calc distribution.
|
||||
|
||||
Updated file lists in Makefile, sorting as needed.
|
||||
|
||||
Updated Makefile PHONY rule to include Makefile rules that are NOT files.
|
||||
|
||||
Reduced make chatter for rules that build lists.
|
||||
|
||||
Added make verifydist to verify the existence of files that are part of
|
||||
the calc distribution.
|
||||
|
||||
Added make verifydist to make prep.
|
||||
|
||||
Added a chk_tree double check, one after make clobber, one before
|
||||
the final make chk, to make prep. Added double pass of chk_tree to
|
||||
make full_debug (and thus to the make debug output).
|
||||
|
||||
Improved notes for install locations in Makefile.config.
|
||||
|
||||
Added printing of ${BUILD_ALL} to make env output.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.14.3.0 to 2.14.3.4:
|
||||
|
||||
@@ -4200,7 +4260,7 @@ The following are the changes from calc version 2.11.5t0 to 2.11.5t1.1:
|
||||
Fixed calc path in help/script.
|
||||
|
||||
Added read-only parameter, config("windows") to indicate if the system
|
||||
is MS windowz WIN32 like system.
|
||||
is MS Windows WIN32 like system.
|
||||
|
||||
Configuration values that used to return "true" or "false" now return
|
||||
1 (a true value) or 0 (a false value). Thus one can do:
|
||||
|
234
Makefile
234
Makefile
@@ -162,25 +162,23 @@ CALCOBJS= calc.o
|
||||
|
||||
# these .h files are needed to build the math link library
|
||||
#
|
||||
LIB_H_SRC= alloc.h banned.h blkcpy.h block.h bool.h byteswap.h calc.h \
|
||||
cmath.h config.h custom.h decl.h errtbl.h file.h func.h hash.h \
|
||||
hist.h int.h jump.h label.h lib_util.h lib_calc.h nametype.h \
|
||||
opcodes.h prime.h qmath.h sha1.h str.h strl.h \
|
||||
symbol.h token.h value.h zmath.h zrand.h zrandom.h attribute.h
|
||||
LIB_H_SRC= alloc.h attribute.h banned.h blkcpy.h block.h bool.h byteswap.h \
|
||||
calc.h cmath.h config.h custom.h decl.h errtbl.h file.h func.h \
|
||||
hash.h hist.h int.h jump.h label.h lib_calc.h lib_util.h nametype.h \
|
||||
opcodes.h prime.h qmath.h sha1.h str.h strl.h symbol.h token.h \
|
||||
value.h version.h zmath.h zrand.h zrandom.h
|
||||
|
||||
# we build these .h files during the make
|
||||
#
|
||||
BUILD_H_SRC= align32.h args.h conf.h endian_calc.h errsym.h \
|
||||
fposval.h have_ban_pragma.h have_const.h have_fgetsetpos.h \
|
||||
have_fpos_pos.h have_getpgid.h have_getprid.h have_getsid.h \
|
||||
have_gettime.h have_memmv.h have_newstr.h have_offscl.h \
|
||||
have_posscl.h have_rusage.h have_stdlib.h have_strdup.h \
|
||||
have_string.h have_strlcat.h have_strlcpy.h have_times.h \
|
||||
have_uid_t.h have_unistd.h have_unused.h have_urandom.h \
|
||||
have_ustat.h longbits.h terminal.h have_environ.h \
|
||||
have_arc4random.h have_limits.h charbit.h have_sys_vfs.h \
|
||||
have_sys_param.h have_sys_mount.h have_statfs.h have_stdbool.h \
|
||||
have_stdint.h status.chk_c.h
|
||||
BUILD_H_SRC= align32.h args.h charbit.h conf.h endian_calc.h errsym.h fposval.h \
|
||||
have_arc4random.h have_ban_pragma.h have_const.h have_environ.h \
|
||||
have_fgetsetpos.h have_fpos_pos.h have_getpgid.h have_getprid.h \
|
||||
have_getsid.h have_gettime.h have_inttypes.h have_limits.h have_memmv.h \
|
||||
have_newstr.h have_offscl.h have_posscl.h have_rusage.h have_statfs.h \
|
||||
have_stdbool.h have_stdint.h have_stdlib.h have_strdup.h have_string.h \
|
||||
have_strlcat.h have_strlcpy.h have_sys_mount.h have_sys_param.h \
|
||||
have_sys_vfs.h have_times.h have_uid_t.h have_unistd.h have_unused.h \
|
||||
have_urandom.h have_ustat.h longbits.h status.chk_c.h terminal.h
|
||||
|
||||
# we build these .c files during the make
|
||||
#
|
||||
@@ -190,13 +188,13 @@ BUILD_C_SRC=
|
||||
#
|
||||
# There MUST be a .c for every .o in UTIL_OBJS.
|
||||
#
|
||||
UTIL_C_SRC= align32.c endian.c longbits.c have_newstr.c have_uid_t.c \
|
||||
have_const.c have_stdvs.c have_varvs.c fposval.c have_fgetsetpos.c \
|
||||
have_fpos_pos.c have_offscl.c have_posscl.c have_memmv.c \
|
||||
have_ustat.c have_getsid.c have_getpgid.c have_environ.c \
|
||||
have_gettime.c have_getprid.c have_rusage.c have_strdup.c \
|
||||
have_unused.c have_ban_pragma.c have_strlcpy.c have_strlcat.c \
|
||||
have_arc4random.c charbit.c have_statfs.c chk_c.c
|
||||
UTIL_C_SRC= align32.c charbit.c chk_c.c endian.c fposval.c have_arc4random.c \
|
||||
have_ban_pragma.c have_const.c have_environ.c have_fgetsetpos.c \
|
||||
have_fpos_pos.c have_getpgid.c have_getprid.c have_getsid.c \
|
||||
have_gettime.c have_memmv.c have_newstr.c have_offscl.c have_posscl.c \
|
||||
have_rusage.c have_statfs.c have_stdvs.c have_strdup.c have_strlcat.c \
|
||||
have_strlcpy.c have_uid_t.c have_unused.c have_ustat.c have_varvs.c \
|
||||
longbits.c
|
||||
|
||||
# these awk and sed tools are used in the process of building BUILD_H_SRC
|
||||
# and BUILD_C_SRC
|
||||
@@ -269,10 +267,10 @@ LICENSE= COPYING COPYING-LGPL
|
||||
|
||||
# These files are found (but not built) in the distribution
|
||||
#
|
||||
DISTLIST= ${C_SRC} ${H_SRC} ${MK_SET} BUGS CHANGES LIBRARY README.FIRST \
|
||||
README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \
|
||||
sample.README calc.spec.in rpm.mk README.md QUESTIONS CONTRIB-CODE \
|
||||
README.RELEASE
|
||||
DISTLIST= ${C_SRC} ${H_SRC} ${MK_SET} ${UTIL_MISC_SRC} ${LICENSE} \
|
||||
BUGS calc.man calc.spec.in CHANGES check.awk chk_tree CONTRIB-CODE \
|
||||
HOWTO.INSTALL LIBRARY .lldbinit QUESTIONS README.FIRST README.md \
|
||||
README.RELEASE README.WINDOWS rpm.mk sample.README trailblank update_ver
|
||||
|
||||
# These files are used to make (but not build) a calc .a link library
|
||||
#
|
||||
@@ -336,15 +334,27 @@ TRAILBLANK= trailblank
|
||||
UPDATE_VER= update_ver
|
||||
CALC_TOOLS= ${TRAILBLANK} ${UPDATE_VER}
|
||||
|
||||
# complete list of files that may be created as part of the build process
|
||||
#
|
||||
# Used by chk_tree via make prep
|
||||
#
|
||||
BUILD_ALL= ${LIBOBJS} ${CALCOBJS} ${BUILD_H_SRC} ${BUILD_C_SRC} \
|
||||
${UTIL_OBJS} ${UTIL_TMP} ${UTIL_PROGS} ${SAMPLE_OBJ} \
|
||||
${CALC_STATIC_LIBS} ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} \
|
||||
${SAMPLE_TARGETS} ${SAMPLE_STATIC_TARGETS} ${CSCRIPT_TARGETS} \
|
||||
.dynamic .static ${LATE_TARGETS} calc${EXT} errcode${EXT} \
|
||||
tags .hsrc outfile
|
||||
|
||||
# complete list of targets
|
||||
#
|
||||
TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS} ${CALC_TOOLS}
|
||||
|
||||
# rules that are not also names of files
|
||||
#
|
||||
PHONY= all calcliblist calc_version check chk clobber debug depend distdir \
|
||||
distlist hsrc install inst_files mkdebug rpm sample splint tags \
|
||||
uninstall
|
||||
PHONY= all check_include sample hsrc depend h_list calc_version version distlist \
|
||||
buildlist distdir calcliblist calcliblistfmt verifydist check chk calcinfo \
|
||||
env mkdebug full_debug debug testfuncsort prep run rpm inst_files \
|
||||
olduninstall clean clobber install uninstall unbak splint strip
|
||||
|
||||
############################################################
|
||||
# Allow Makefile.local to change any of the above settings #
|
||||
@@ -500,6 +510,8 @@ libcalc${LIB_EXT_VER}: libcalc${LIB_EXT_VERSION}
|
||||
#
|
||||
###
|
||||
|
||||
# Note: The :\(...-sed pattern below allows word wrapping at the separators
|
||||
# of long path names (typically CALCPATH and CALCRC).
|
||||
calc.1: calc.man ${MK_SET}
|
||||
${RM} -f $@
|
||||
${Q} echo forming calc.1 from calc.man
|
||||
@@ -513,7 +525,8 @@ calc.1: calc.man ${MK_SET}
|
||||
-e 's,$${CUSTOMINCDIR},${CUSTOMINCDIR},g' \
|
||||
-e 's,$${HELPDIR},${HELPDIR},g' \
|
||||
-e 's,$${CUSTOMHELPDIR},${CUSTOMHELPDIR},g' \
|
||||
-e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1
|
||||
-e 's,$${CALCRC},${CALCRC},g' \
|
||||
-e 's,:\([/.~]\),:\\:\1,g' < calc.man > calc.1
|
||||
${Q} echo calc.1 formed
|
||||
|
||||
calc.usage: calc.1 ${MK_SET}
|
||||
@@ -1811,7 +1824,7 @@ have_sys_mount.h: ${MK_SET}
|
||||
echo '#define HAVE_SYS_MOUNT_H /* yes */' >> $@; \
|
||||
elif [ X"${HAVE_SYS_MOUNT_H}" = X"NO" ]; then \
|
||||
echo '#undef HAVE_SYS_MOUNT_H /* no */' >> $@; \
|
||||
elif echo '#include <sys/param.h>' | ${CC} -E - ${S}; then \
|
||||
elif echo '#include <sys/mount.h>' | ${CC} -E - ${S}; then \
|
||||
echo '#define HAVE_SYS_MOUNT_H /* yes */' >> $@; \
|
||||
else \
|
||||
echo '#undef HAVE_SYS_MOUNT_H /* no */' >> $@; \
|
||||
@@ -2389,7 +2402,7 @@ chk_c${EXT}: chk_c.c have_stdint.h have_inttypes.h have_stdlib.h bool.h have_ban
|
||||
echo "#undef CHK_C /* chk_c failed to validate C compiler and/or include files */" >> status.chk_c.h; \
|
||||
else \
|
||||
echo "Good news everyone! :-)" \
|
||||
"The C compiler and select include files appear to meet calc requirements." 1>&2; \
|
||||
"The C compiler and select include files appear to meet calc requirements."; \
|
||||
echo "#define CHK_C" \
|
||||
"/* C compiler and select include files appear to meet calc requirements */" >> status.chk_c.h; \
|
||||
fi; \
|
||||
@@ -2650,19 +2663,31 @@ distlist: ${DISTLIST} custom/Makefile
|
||||
echo $$i; \
|
||||
fi; \
|
||||
done; \
|
||||
(cd help; ${MAKE} -f Makefile $@); \
|
||||
(cd cal; ${MAKE} -f Makefile $@); \
|
||||
(cd custom; ${MAKE} -f Makefile $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile $@) \
|
||||
) | LANG=C ${SORT}
|
||||
(cd help; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cal; ${MAKE} -f Makefile -s $@); \
|
||||
(cd custom; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile -s $@) \
|
||||
) | LANG=C ${SORT} -u
|
||||
|
||||
buildlist:
|
||||
${Q} (for i in ${BUILD_ALL} /dev/null; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
echo $$i; \
|
||||
fi; \
|
||||
done; \
|
||||
(cd help; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cal; ${MAKE} -f Makefile -s $@); \
|
||||
(cd custom; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile -s $@) \
|
||||
) | LANG=C ${SORT} -u
|
||||
|
||||
distdir: custom/Makefile
|
||||
${Q} (echo .; \
|
||||
(cd help; ${MAKE} -f Makefile $@); \
|
||||
(cd cal; ${MAKE} -f Makefile $@); \
|
||||
(cd custom; ${MAKE} -f Makefile $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile $@) \
|
||||
) | LANG=C ${SORT}
|
||||
(cd help; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cal; ${MAKE} -f Makefile -s $@); \
|
||||
(cd custom; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile -s $@) \
|
||||
) | LANG=C ${SORT} -u
|
||||
|
||||
calcliblist: custom/Makefile
|
||||
${Q} (for i in ${CALCLIBLIST} /dev/null; do \
|
||||
@@ -2670,11 +2695,11 @@ calcliblist: custom/Makefile
|
||||
echo $$i; \
|
||||
fi; \
|
||||
done; \
|
||||
(cd help; ${MAKE} -f Makefile $@); \
|
||||
(cd cal; ${MAKE} -f Makefile $@); \
|
||||
(cd custom; ${MAKE} -f Makefile $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile $@) \
|
||||
) | LANG=C ${SORT}
|
||||
(cd help; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cal; ${MAKE} -f Makefile -s $@); \
|
||||
(cd custom; ${MAKE} -f Makefile -s $@); \
|
||||
(cd cscript; ${MAKE} -f Makefile -s $@) \
|
||||
) | LANG=C ${SORT} -u
|
||||
|
||||
calcliblistfmt:
|
||||
${Q} ${MAKE} -f Makefile calcliblist | \
|
||||
@@ -2686,6 +2711,10 @@ Makefile.simple:
|
||||
custom/Makefile.simple:
|
||||
${Q} echo Support for $@ was dropped after the the release of calc v2.14.3.0.
|
||||
|
||||
verifydist:
|
||||
@${MAKE} -f Makefile Q= V=@ distdir >/dev/null 2>&1
|
||||
@${MAKE} -f Makefile Q= V=@ distlist >/dev/null 2>&1
|
||||
|
||||
###
|
||||
#
|
||||
# Doing a 'make check' will cause the regression test suite to be executed.
|
||||
@@ -2704,10 +2733,7 @@ check: all ./cal/regress.cal
|
||||
|
||||
chk: ./cal/regress.cal
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
${Q} echo
|
||||
${CALC_ENV} ./calc${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk
|
||||
@${MAKE} -f Makefile Q= V=@ distdir >/dev/null 2>&1
|
||||
@${MAKE} -f Makefile Q= V=@ distlist >/dev/null 2>&1
|
||||
${Q} echo
|
||||
${Q} echo 'chk OK'
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
@@ -2816,6 +2842,7 @@ env:
|
||||
@echo 'AWK=${AWK}'; echo ''
|
||||
@echo 'BINDIR=${BINDIR}'; echo ''
|
||||
@echo 'BLD_TYPE=${BLD_TYPE}'; echo ''
|
||||
@echo 'BUILD_ALL=${BUILD_ALL}'; echo ''
|
||||
@echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo ''
|
||||
@echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo ''
|
||||
@echo 'BYTE_ORDER=${BYTE_ORDER}'; echo ''
|
||||
@@ -3022,6 +3049,15 @@ mkdebug: env version.c
|
||||
|
||||
full_debug: calcinfo env
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-= Output of ${MAKE} -s distdir follows =-=-=-='
|
||||
-@${MAKE} -f Makefile -s distdir
|
||||
@echo '=-=-=-= End of output of {MAKE} -s distdir =-=-=-='
|
||||
@echo '=-=-=-= Output of ${MAKE} -s distlist follows =-=-=-='
|
||||
-@${MAKE} -f Makefile -s distlist
|
||||
@echo '=-=-=-= End of output of {MAKE} -s distlist =-=-=-='
|
||||
@echo '=-=-=-= Output of ${MAKE} -s buildlist follows =-=-=-='
|
||||
-@${MAKE} -f Makefile -s buildlist
|
||||
@echo '=-=-=-= End of output of {MAKE} -s buildlist =-=-=-='
|
||||
@echo '=-=-=-= Contents of ${LOCAL_MKF} follows =-=-=-='
|
||||
-@${CAT} ${LOCAL_MKF}
|
||||
@echo '=-=-=-= End of contents of ${LOCAL_MKF} =-=-=-='
|
||||
@@ -3034,6 +3070,9 @@ full_debug: calcinfo env
|
||||
@echo '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
|
||||
-@${MAKE} -f Makefile Q= H=@ S= E= V=@ clobber
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= start of chk_tree pass #0 =-=-=-=-=-='
|
||||
-@./chk_tree
|
||||
@echo '=-=-=-=-=-= end of chk_tree pass #0 =-=-=-=-=-='
|
||||
@echo '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
|
||||
@echo '=-=-= this may take a bit of time =-=-='
|
||||
-@${MAKE} -f Makefile Q= H=@ S= E= V=@ all
|
||||
@@ -3053,6 +3092,9 @@ full_debug: calcinfo env
|
||||
@echo 'are allowed =-=-=-='
|
||||
-@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= start of chk_tree pass #1 =-=-=-=-=-='
|
||||
-@./chk_tree
|
||||
@echo '=-=-=-=-=-= end of chk_tree pass #1 =-=-=-=-=-='
|
||||
@echo '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
|
||||
@echo '=-=-= this may take a while =-=-='
|
||||
-@${MAKE} -f Makefile Q= V=@ check
|
||||
@@ -3125,6 +3167,18 @@ prep:
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= end of ${MAKE} clobber =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of ${MAKE} verifydist =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${MAKE} -s verifydist
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= end of ${MAKE} verifydist =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of chk_tree pass #0 =-=-=-=-=-='
|
||||
${Q}echo
|
||||
-./chk_tree
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= end of chk_tree pass #0 =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of ${TRAILBLANK} =-=-=-=-=-='
|
||||
${Q}echo
|
||||
./${TRAILBLANK}
|
||||
@@ -3139,19 +3193,22 @@ prep:
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of ${MAKE} tags =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${MAKE} tags
|
||||
${MAKE} -s tags
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= end of ${MAKE} tags =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of ${MAKE} depend =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${MAKE} depend
|
||||
${MAKE} -s depend
|
||||
${Q}echo
|
||||
@if [[ -f ${MAKE_FILE}.bak ]]; then echo ${MAKE_FILE}.bak exists 1>&2; exit 1; fi
|
||||
@if [[ -f cscript/${MAKE_FILE}.bak ]]; then echo cscript/${MAKE_FILE}.bak exists 1>&2; exit 2; fi
|
||||
@if [[ -f custom/${MAKE_FILE}.bak ]]; then echo custom/${MAKE_FILE}.bak exists 1>&2; exit 3; fi
|
||||
${Q}echo '=-=-=-=-=-= end of ${MAKE} depend =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of ${MAKE} testfuncsort =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${MAKE} testfuncsort
|
||||
${MAKE} -s testfuncsort
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= end of ${MAKE} testfuncsort =-=-=-=-=-='
|
||||
${Q}echo
|
||||
@@ -3163,11 +3220,15 @@ prep:
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= start of ${MAKE} chk =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${MAKE} chk
|
||||
${MAKE} -s chk
|
||||
${Q}echo
|
||||
${Q}echo '=-=-=-=-=-= end of ${MAKE} chk =-=-=-=-=-='
|
||||
${Q}echo
|
||||
${Q}echo All is OK
|
||||
@${Q}if ! ./chk_tree >/dev/null 2>&1; then \
|
||||
echo almost satifactory except for chk_tree; \
|
||||
else \
|
||||
echo All is OK; \
|
||||
fi
|
||||
${Q}echo
|
||||
|
||||
run:
|
||||
@@ -3306,8 +3367,7 @@ olduninstall:
|
||||
${RM} -f -v custom/Makefile.simple custom/Makefile.simple.bak
|
||||
|
||||
tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE}
|
||||
-${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \
|
||||
${GREP} -E -v 'Duplicate entry|Second entry ignored'
|
||||
${CTAGS} -w ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC}
|
||||
|
||||
clean:
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@@ -3395,6 +3455,7 @@ clobber: clean
|
||||
${RM} -rf .DS_Store; \
|
||||
fi
|
||||
${RM} -f func.show func.sort
|
||||
${RM} -f outfile
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
# install everything
|
||||
@@ -4020,6 +4081,7 @@ addop.o: str.h
|
||||
addop.o: symbol.h
|
||||
addop.o: token.h
|
||||
addop.o: value.h
|
||||
addop.o: version.h
|
||||
addop.o: zmath.h
|
||||
align32.o: align32.c
|
||||
align32.o: banned.h
|
||||
@@ -4057,6 +4119,7 @@ assocfunc.o: qmath.h
|
||||
assocfunc.o: sha1.h
|
||||
assocfunc.o: str.h
|
||||
assocfunc.o: value.h
|
||||
assocfunc.o: version.h
|
||||
assocfunc.o: zmath.h
|
||||
blkcpy.o: alloc.h
|
||||
blkcpy.o: attribute.h
|
||||
@@ -4091,6 +4154,7 @@ blkcpy.o: qmath.h
|
||||
blkcpy.o: sha1.h
|
||||
blkcpy.o: str.h
|
||||
blkcpy.o: value.h
|
||||
blkcpy.o: version.h
|
||||
blkcpy.o: zmath.h
|
||||
block.o: alloc.h
|
||||
block.o: attribute.h
|
||||
@@ -4121,6 +4185,7 @@ block.o: qmath.h
|
||||
block.o: sha1.h
|
||||
block.o: str.h
|
||||
block.o: value.h
|
||||
block.o: version.h
|
||||
block.o: zmath.h
|
||||
byteswap.o: alloc.h
|
||||
byteswap.o: attribute.h
|
||||
@@ -4144,6 +4209,7 @@ byteswap.o: have_stdlib.h
|
||||
byteswap.o: have_string.h
|
||||
byteswap.o: longbits.h
|
||||
byteswap.o: qmath.h
|
||||
byteswap.o: version.h
|
||||
byteswap.o: zmath.h
|
||||
calc.o: alloc.h
|
||||
calc.o: args.h
|
||||
@@ -4192,6 +4258,7 @@ calc.o: strl.h
|
||||
calc.o: symbol.h
|
||||
calc.o: token.h
|
||||
calc.o: value.h
|
||||
calc.o: version.h
|
||||
calc.o: zmath.h
|
||||
charbit.o: banned.h
|
||||
charbit.o: charbit.c
|
||||
@@ -4201,6 +4268,7 @@ chk_c.o: banned.h
|
||||
chk_c.o: bool.h
|
||||
chk_c.o: chk_c.c
|
||||
chk_c.o: have_ban_pragma.h
|
||||
chk_c.o: have_inttypes.h
|
||||
chk_c.o: have_stdbool.h
|
||||
chk_c.o: have_stdint.h
|
||||
chk_c.o: have_stdlib.h
|
||||
@@ -4245,6 +4313,7 @@ codegen.o: strl.h
|
||||
codegen.o: symbol.h
|
||||
codegen.o: token.h
|
||||
codegen.o: value.h
|
||||
codegen.o: version.h
|
||||
codegen.o: zmath.h
|
||||
comfunc.o: alloc.h
|
||||
comfunc.o: attribute.h
|
||||
@@ -4270,6 +4339,7 @@ comfunc.o: have_string.h
|
||||
comfunc.o: longbits.h
|
||||
comfunc.o: nametype.h
|
||||
comfunc.o: qmath.h
|
||||
comfunc.o: version.h
|
||||
comfunc.o: zmath.h
|
||||
commath.o: alloc.h
|
||||
commath.o: attribute.h
|
||||
@@ -4293,6 +4363,7 @@ commath.o: have_stdlib.h
|
||||
commath.o: have_string.h
|
||||
commath.o: longbits.h
|
||||
commath.o: qmath.h
|
||||
commath.o: version.h
|
||||
commath.o: zmath.h
|
||||
config.o: alloc.h
|
||||
config.o: attribute.h
|
||||
@@ -4331,6 +4402,7 @@ config.o: str.h
|
||||
config.o: strl.h
|
||||
config.o: token.h
|
||||
config.o: value.h
|
||||
config.o: version.h
|
||||
config.o: zmath.h
|
||||
config.o: zrand.h
|
||||
const.o: alloc.h
|
||||
@@ -4363,6 +4435,7 @@ const.o: qmath.h
|
||||
const.o: sha1.h
|
||||
const.o: str.h
|
||||
const.o: value.h
|
||||
const.o: version.h
|
||||
const.o: zmath.h
|
||||
custom.o: alloc.h
|
||||
custom.o: attribute.h
|
||||
@@ -4395,6 +4468,7 @@ custom.o: qmath.h
|
||||
custom.o: sha1.h
|
||||
custom.o: str.h
|
||||
custom.o: value.h
|
||||
custom.o: version.h
|
||||
custom.o: zmath.h
|
||||
endian.o: banned.h
|
||||
endian.o: endian.c
|
||||
@@ -4431,6 +4505,7 @@ errtbl.o: qmath.h
|
||||
errtbl.o: sha1.h
|
||||
errtbl.o: str.h
|
||||
errtbl.o: value.h
|
||||
errtbl.o: version.h
|
||||
errtbl.o: zmath.h
|
||||
file.o: alloc.h
|
||||
file.o: attribute.h
|
||||
@@ -4470,6 +4545,7 @@ file.o: sha1.h
|
||||
file.o: str.h
|
||||
file.o: strl.h
|
||||
file.o: value.h
|
||||
file.o: version.h
|
||||
file.o: zmath.h
|
||||
fposval.o: alloc.h
|
||||
fposval.o: banned.h
|
||||
@@ -4493,6 +4569,7 @@ fposval.o: have_stdlib.h
|
||||
fposval.o: have_string.h
|
||||
fposval.o: have_unused.h
|
||||
fposval.o: longbits.h
|
||||
fposval.o: version.h
|
||||
fposval.o: zmath.h
|
||||
func.o: alloc.h
|
||||
func.o: attribute.h
|
||||
@@ -4541,6 +4618,7 @@ func.o: strl.h
|
||||
func.o: symbol.h
|
||||
func.o: token.h
|
||||
func.o: value.h
|
||||
func.o: version.h
|
||||
func.o: zmath.h
|
||||
func.o: zrand.h
|
||||
func.o: zrandom.h
|
||||
@@ -4574,6 +4652,7 @@ hash.o: qmath.h
|
||||
hash.o: sha1.h
|
||||
hash.o: str.h
|
||||
hash.o: value.h
|
||||
hash.o: version.h
|
||||
hash.o: zmath.h
|
||||
hash.o: zrand.h
|
||||
hash.o: zrandom.h
|
||||
@@ -4706,6 +4785,7 @@ help.o: qmath.h
|
||||
help.o: sha1.h
|
||||
help.o: str.h
|
||||
help.o: value.h
|
||||
help.o: version.h
|
||||
help.o: zmath.h
|
||||
hist.o: alloc.h
|
||||
hist.o: attribute.h
|
||||
@@ -4745,6 +4825,7 @@ hist.o: sha1.h
|
||||
hist.o: str.h
|
||||
hist.o: strl.h
|
||||
hist.o: value.h
|
||||
hist.o: version.h
|
||||
hist.o: zmath.h
|
||||
input.o: alloc.h
|
||||
input.o: attribute.h
|
||||
@@ -4782,6 +4863,7 @@ input.o: sha1.h
|
||||
input.o: str.h
|
||||
input.o: strl.h
|
||||
input.o: value.h
|
||||
input.o: version.h
|
||||
input.o: zmath.h
|
||||
jump.o: banned.h
|
||||
jump.o: decl.h
|
||||
@@ -4823,6 +4905,7 @@ label.o: sha1.h
|
||||
label.o: str.h
|
||||
label.o: token.h
|
||||
label.o: value.h
|
||||
label.o: version.h
|
||||
label.o: zmath.h
|
||||
lib_calc.o: alloc.h
|
||||
lib_calc.o: attribute.h
|
||||
@@ -4867,6 +4950,7 @@ lib_calc.o: symbol.h
|
||||
lib_calc.o: terminal.h
|
||||
lib_calc.o: token.h
|
||||
lib_calc.o: value.h
|
||||
lib_calc.o: version.h
|
||||
lib_calc.o: zmath.h
|
||||
lib_calc.o: zrandom.h
|
||||
lib_util.o: alloc.h
|
||||
@@ -4890,6 +4974,7 @@ lib_util.o: have_string.h
|
||||
lib_util.o: lib_util.c
|
||||
lib_util.o: lib_util.h
|
||||
lib_util.o: longbits.h
|
||||
lib_util.o: version.h
|
||||
lib_util.o: zmath.h
|
||||
listfunc.o: alloc.h
|
||||
listfunc.o: attribute.h
|
||||
@@ -4920,6 +5005,7 @@ listfunc.o: qmath.h
|
||||
listfunc.o: sha1.h
|
||||
listfunc.o: str.h
|
||||
listfunc.o: value.h
|
||||
listfunc.o: version.h
|
||||
listfunc.o: zmath.h
|
||||
listfunc.o: zrand.h
|
||||
longbits.o: banned.h
|
||||
@@ -4959,6 +5045,7 @@ matfunc.o: qmath.h
|
||||
matfunc.o: sha1.h
|
||||
matfunc.o: str.h
|
||||
matfunc.o: value.h
|
||||
matfunc.o: version.h
|
||||
matfunc.o: zmath.h
|
||||
matfunc.o: zrand.h
|
||||
math_error.o: alloc.h
|
||||
@@ -4993,6 +5080,7 @@ math_error.o: qmath.h
|
||||
math_error.o: sha1.h
|
||||
math_error.o: str.h
|
||||
math_error.o: value.h
|
||||
math_error.o: version.h
|
||||
math_error.o: zmath.h
|
||||
obj.o: alloc.h
|
||||
obj.o: attribute.h
|
||||
@@ -5031,6 +5119,7 @@ obj.o: str.h
|
||||
obj.o: strl.h
|
||||
obj.o: symbol.h
|
||||
obj.o: value.h
|
||||
obj.o: version.h
|
||||
obj.o: zmath.h
|
||||
opcodes.o: alloc.h
|
||||
opcodes.o: attribute.h
|
||||
@@ -5072,6 +5161,7 @@ opcodes.o: sha1.h
|
||||
opcodes.o: str.h
|
||||
opcodes.o: symbol.h
|
||||
opcodes.o: value.h
|
||||
opcodes.o: version.h
|
||||
opcodes.o: zmath.h
|
||||
opcodes.o: zrand.h
|
||||
opcodes.o: zrandom.h
|
||||
@@ -5094,6 +5184,7 @@ pix.o: longbits.h
|
||||
pix.o: pix.c
|
||||
pix.o: prime.h
|
||||
pix.o: qmath.h
|
||||
pix.o: version.h
|
||||
pix.o: zmath.h
|
||||
poly.o: alloc.h
|
||||
poly.o: attribute.h
|
||||
@@ -5124,6 +5215,7 @@ poly.o: qmath.h
|
||||
poly.o: sha1.h
|
||||
poly.o: str.h
|
||||
poly.o: value.h
|
||||
poly.o: version.h
|
||||
poly.o: zmath.h
|
||||
prime.o: alloc.h
|
||||
prime.o: banned.h
|
||||
@@ -5145,6 +5237,7 @@ prime.o: longbits.h
|
||||
prime.o: prime.c
|
||||
prime.o: prime.h
|
||||
prime.o: qmath.h
|
||||
prime.o: version.h
|
||||
prime.o: zmath.h
|
||||
qfunc.o: alloc.h
|
||||
qfunc.o: attribute.h
|
||||
@@ -5170,6 +5263,7 @@ qfunc.o: nametype.h
|
||||
qfunc.o: prime.h
|
||||
qfunc.o: qfunc.c
|
||||
qfunc.o: qmath.h
|
||||
qfunc.o: version.h
|
||||
qfunc.o: zmath.h
|
||||
qio.o: alloc.h
|
||||
qio.o: args.h
|
||||
@@ -5196,6 +5290,7 @@ qio.o: longbits.h
|
||||
qio.o: nametype.h
|
||||
qio.o: qio.c
|
||||
qio.o: qmath.h
|
||||
qio.o: version.h
|
||||
qio.o: zmath.h
|
||||
qmath.o: alloc.h
|
||||
qmath.o: attribute.h
|
||||
@@ -5220,6 +5315,7 @@ qmath.o: longbits.h
|
||||
qmath.o: nametype.h
|
||||
qmath.o: qmath.c
|
||||
qmath.o: qmath.h
|
||||
qmath.o: version.h
|
||||
qmath.o: zmath.h
|
||||
qmod.o: alloc.h
|
||||
qmod.o: attribute.h
|
||||
@@ -5244,6 +5340,7 @@ qmod.o: longbits.h
|
||||
qmod.o: nametype.h
|
||||
qmod.o: qmath.h
|
||||
qmod.o: qmod.c
|
||||
qmod.o: version.h
|
||||
qmod.o: zmath.h
|
||||
qtrans.o: alloc.h
|
||||
qtrans.o: attribute.h
|
||||
@@ -5268,6 +5365,7 @@ qtrans.o: longbits.h
|
||||
qtrans.o: nametype.h
|
||||
qtrans.o: qmath.h
|
||||
qtrans.o: qtrans.c
|
||||
qtrans.o: version.h
|
||||
qtrans.o: zmath.h
|
||||
quickhash.o: alloc.h
|
||||
quickhash.o: attribute.h
|
||||
@@ -5298,6 +5396,7 @@ quickhash.o: quickhash.c
|
||||
quickhash.o: sha1.h
|
||||
quickhash.o: str.h
|
||||
quickhash.o: value.h
|
||||
quickhash.o: version.h
|
||||
quickhash.o: zmath.h
|
||||
quickhash.o: zrand.h
|
||||
quickhash.o: zrandom.h
|
||||
@@ -5332,6 +5431,7 @@ sample_many.o: sample_many.c
|
||||
sample_many.o: sha1.h
|
||||
sample_many.o: str.h
|
||||
sample_many.o: value.h
|
||||
sample_many.o: version.h
|
||||
sample_many.o: zmath.h
|
||||
sample_many.o: zrandom.h
|
||||
sample_rand.o: alloc.h
|
||||
@@ -5365,6 +5465,7 @@ sample_rand.o: sample_rand.c
|
||||
sample_rand.o: sha1.h
|
||||
sample_rand.o: str.h
|
||||
sample_rand.o: value.h
|
||||
sample_rand.o: version.h
|
||||
sample_rand.o: zmath.h
|
||||
sample_rand.o: zrandom.h
|
||||
seed.o: alloc.h
|
||||
@@ -5401,6 +5502,7 @@ seed.o: have_ustat.h
|
||||
seed.o: longbits.h
|
||||
seed.o: qmath.h
|
||||
seed.o: seed.c
|
||||
seed.o: version.h
|
||||
seed.o: zmath.h
|
||||
sha1.o: align32.h
|
||||
sha1.o: alloc.h
|
||||
@@ -5432,6 +5534,7 @@ sha1.o: sha1.c
|
||||
sha1.o: sha1.h
|
||||
sha1.o: str.h
|
||||
sha1.o: value.h
|
||||
sha1.o: version.h
|
||||
sha1.o: zmath.h
|
||||
size.o: alloc.h
|
||||
size.o: attribute.h
|
||||
@@ -5462,6 +5565,7 @@ size.o: sha1.h
|
||||
size.o: size.c
|
||||
size.o: str.h
|
||||
size.o: value.h
|
||||
size.o: version.h
|
||||
size.o: zmath.h
|
||||
size.o: zrand.h
|
||||
size.o: zrandom.h
|
||||
@@ -5498,6 +5602,7 @@ str.o: str.c
|
||||
str.o: str.h
|
||||
str.o: strl.h
|
||||
str.o: value.h
|
||||
str.o: version.h
|
||||
str.o: zmath.h
|
||||
strl.o: alloc.h
|
||||
strl.o: banned.h
|
||||
@@ -5546,6 +5651,7 @@ symbol.o: symbol.c
|
||||
symbol.o: symbol.h
|
||||
symbol.o: token.h
|
||||
symbol.o: value.h
|
||||
symbol.o: version.h
|
||||
symbol.o: zmath.h
|
||||
token.o: alloc.h
|
||||
token.o: args.h
|
||||
@@ -5580,6 +5686,7 @@ token.o: str.h
|
||||
token.o: token.c
|
||||
token.o: token.h
|
||||
token.o: value.h
|
||||
token.o: version.h
|
||||
token.o: zmath.h
|
||||
value.o: alloc.h
|
||||
value.o: attribute.h
|
||||
@@ -5617,6 +5724,7 @@ value.o: str.h
|
||||
value.o: symbol.h
|
||||
value.o: value.c
|
||||
value.o: value.h
|
||||
value.o: version.h
|
||||
value.o: zmath.h
|
||||
value.o: zrand.h
|
||||
value.o: zrandom.h
|
||||
@@ -5654,6 +5762,7 @@ version.o: str.h
|
||||
version.o: strl.h
|
||||
version.o: value.h
|
||||
version.o: version.c
|
||||
version.o: version.h
|
||||
version.o: zmath.h
|
||||
zfunc.o: alloc.h
|
||||
zfunc.o: attribute.h
|
||||
@@ -5674,6 +5783,7 @@ zfunc.o: have_stdbool.h
|
||||
zfunc.o: have_stdlib.h
|
||||
zfunc.o: have_string.h
|
||||
zfunc.o: longbits.h
|
||||
zfunc.o: version.h
|
||||
zfunc.o: zfunc.c
|
||||
zfunc.o: zmath.h
|
||||
zio.o: alloc.h
|
||||
@@ -5699,6 +5809,7 @@ zio.o: have_string.h
|
||||
zio.o: longbits.h
|
||||
zio.o: nametype.h
|
||||
zio.o: qmath.h
|
||||
zio.o: version.h
|
||||
zio.o: zio.c
|
||||
zio.o: zmath.h
|
||||
zmath.o: alloc.h
|
||||
@@ -5713,6 +5824,7 @@ zmath.o: errsym.h
|
||||
zmath.o: errtbl.h
|
||||
zmath.o: have_ban_pragma.h
|
||||
zmath.o: have_const.h
|
||||
zmath.o: have_inttypes.h
|
||||
zmath.o: have_limits.h
|
||||
zmath.o: have_memmv.h
|
||||
zmath.o: have_newstr.h
|
||||
@@ -5723,6 +5835,7 @@ zmath.o: have_string.h
|
||||
zmath.o: int.h
|
||||
zmath.o: longbits.h
|
||||
zmath.o: status.chk_c.h
|
||||
zmath.o: version.h
|
||||
zmath.o: zmath.c
|
||||
zmath.o: zmath.h
|
||||
zmod.o: alloc.h
|
||||
@@ -5747,6 +5860,7 @@ zmod.o: have_string.h
|
||||
zmod.o: longbits.h
|
||||
zmod.o: nametype.h
|
||||
zmod.o: qmath.h
|
||||
zmod.o: version.h
|
||||
zmod.o: zmath.h
|
||||
zmod.o: zmod.c
|
||||
zmul.o: alloc.h
|
||||
@@ -5771,6 +5885,7 @@ zmul.o: have_string.h
|
||||
zmul.o: longbits.h
|
||||
zmul.o: nametype.h
|
||||
zmul.o: qmath.h
|
||||
zmul.o: version.h
|
||||
zmul.o: zmath.h
|
||||
zmul.o: zmul.c
|
||||
zprime.o: alloc.h
|
||||
@@ -5803,6 +5918,7 @@ zprime.o: qmath.h
|
||||
zprime.o: sha1.h
|
||||
zprime.o: str.h
|
||||
zprime.o: value.h
|
||||
zprime.o: version.h
|
||||
zprime.o: zmath.h
|
||||
zprime.o: zprime.c
|
||||
zprime.o: zrand.h
|
||||
@@ -5835,6 +5951,7 @@ zrand.o: qmath.h
|
||||
zrand.o: sha1.h
|
||||
zrand.o: str.h
|
||||
zrand.o: value.h
|
||||
zrand.o: version.h
|
||||
zrand.o: zmath.h
|
||||
zrand.o: zrand.c
|
||||
zrand.o: zrand.h
|
||||
@@ -5867,6 +5984,7 @@ zrandom.o: qmath.h
|
||||
zrandom.o: sha1.h
|
||||
zrandom.o: str.h
|
||||
zrandom.o: value.h
|
||||
zrandom.o: version.h
|
||||
zrandom.o: zmath.h
|
||||
zrandom.o: zrandom.c
|
||||
zrandom.o: zrandom.h
|
||||
|
@@ -852,12 +852,21 @@ endif # ($(target),Darwin)
|
||||
# BINDIR= /usr/bin
|
||||
# LIBDIR= /usr/lib
|
||||
# CALC_SHAREDIR= /usr/share/calc
|
||||
# CALC_INCDIR= /usr/include/calc
|
||||
#
|
||||
# Or if you prefer everything under /usr/local:
|
||||
#
|
||||
# BINDIR= /usr/local/bin
|
||||
# LIBDIR= /usr/local/lib
|
||||
# CALC_SHAREDIR= /usr/local/share/calc
|
||||
# CALC_INCDIR= /usr/local/include/calc
|
||||
#
|
||||
# However, if you are on macOS then set:
|
||||
#
|
||||
# BINDIR= ${PREFIX}/bin
|
||||
# LIBDIR= ${PREFIX}/lib
|
||||
# CALC_SHAREDIR= ${PREFIX}/share/calc
|
||||
# CALC_INCDIR= ${PREFIX}/include/calc
|
||||
#
|
||||
# NOTE: Starting with macOS El Capitan OS X 10.11, root by default
|
||||
# could not mkdir under system locations, so macOS must now
|
||||
@@ -1267,7 +1276,7 @@ EXT=
|
||||
|
||||
# The calc version in the form of x.y.z.w
|
||||
#
|
||||
VERSION= 2.15.0.0
|
||||
VERSION= 2.15.0.2
|
||||
|
||||
# The calc major version in the form of x.y.z
|
||||
#
|
||||
@@ -1373,3 +1382,34 @@ endif # ($(ALLOW_CUSTOM),-DCUSTOM)
|
||||
# intermediate and final calc and calc related programs
|
||||
#
|
||||
COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
|
||||
# Common Address Sanitizer (ASAN)
|
||||
#
|
||||
# For more info see: https://github.com/google/sanitizers/wiki/AddressSanitizer
|
||||
# See also: https://developer.apple.com/documentation/xcode/diagnosing-memory-thread-and-crash-issues-early
|
||||
#
|
||||
# The following Address Sanitizer (ASAN) are common to both REHL9.2 (Linux) and macOS 14.0.
|
||||
#
|
||||
# By default, the Address Sanitizer is NOT enabled, not compiled into calc.
|
||||
# To enable the Address Sanitizer, uncomment the appropriate lines in Makefile.local !!!
|
||||
#
|
||||
FSANITIZE:= -Wno-invalid-command-line-argument
|
||||
FSANITIZE+= -fsanitize=address
|
||||
FSANITIZE+= -fsanitize=alignment
|
||||
FSANITIZE+= -fsanitize=bool
|
||||
FSANITIZE+= -fsanitize=enum
|
||||
FSANITIZE+= -fsanitize=vptr
|
||||
FSANITIZE+= -fsanitize=integer-divide-by-zero
|
||||
FSANITIZE+= -fsanitize=float-divide-by-zero
|
||||
FSANITIZE+= -fsanitize=float-cast-overflow
|
||||
FSANITIZE+= -fsanitize=nonnull-attribute
|
||||
FSANITIZE+= -fsanitize=returns-nonnull-attribute
|
||||
FSANITIZE+= -fsanitize=null
|
||||
FSANITIZE+= -fsanitize=object-size
|
||||
FSANITIZE+= -fsanitize=shift
|
||||
FSANITIZE+= -fsanitize=signed-integer-overflow
|
||||
FSANITIZE+= -fsanitize=undefined
|
||||
FSANITIZE+= -fsanitize=unreachable
|
||||
FSANITIZE+= -fsanitize=vla-bound
|
||||
FSANITIZE+= -fno-omit-frame-pointer
|
||||
FSANITIZE+= -fno-common
|
||||
|
@@ -50,64 +50,51 @@
|
||||
###################################################################
|
||||
|
||||
####
|
||||
# RHEL Diagnosing memory, thread, and crash issues:
|
||||
# Force calc to install under /usr/local
|
||||
#
|
||||
# For more info see: https://github.com/google/sanitizers/wiki/AddressSanitizer
|
||||
#
|
||||
# This comment block was tested under:
|
||||
#
|
||||
# RHEL9 gcc version 11.3.1 20221121 (Red Hat 11.3.1-4) (GCC)
|
||||
#
|
||||
# with:
|
||||
#
|
||||
# libasan-11.3.1-4.3.el9.x86_64 libubsan-11.3.1-4.3.el9.x86_64
|
||||
#
|
||||
# NOTE: With the above version, these are NOT supported:
|
||||
#
|
||||
# UNSUPPORTED_FSANITIZE:= -fsanitize=nullability-arg -fsanitize=nullability-assign
|
||||
#
|
||||
# Uncomment these lines:
|
||||
#
|
||||
# FSANITIZE:= -fsanitize=undefined -fsanitize=address -fsanitize=bool -fsanitize=bounds
|
||||
# FSANITIZE+= -fsanitize=enum -fsanitize=vptr -fsanitize=integer-divide-by-zero
|
||||
# FSANITIZE+= -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
|
||||
# FSANITIZE+= -fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute
|
||||
# FSANITIZE+= -fsanitize=null -fsanitize=shift -fsanitize=signed-integer-overflow
|
||||
# FSANITIZE+= -fsanitize=unreachable -fsanitize=vla-bound
|
||||
# CFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
|
||||
# LDFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
|
||||
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1
|
||||
# DEBUG:= -O0 -g
|
||||
# PREFIX:= /usr/local
|
||||
# BINDIR:= ${PREFIX}/bin
|
||||
# LIBDIR:= ${PREFIX}/lib
|
||||
# CALC_SHAREDIR:= ${PREFIX}/share/calc
|
||||
# CALC_INCDIR:= ${PREFIX}/include/calc
|
||||
####
|
||||
|
||||
####
|
||||
# macOS Diagnosing memory, thread, and crash issues:
|
||||
#
|
||||
# For more info see: https://github.com/google/sanitizers/wiki/AddressSanitizer
|
||||
# macOS Address Sanitizer (ASAN)
|
||||
#
|
||||
# This comment block was tested under:
|
||||
#
|
||||
# macOS 13.5 with clang version 14.0.3 (clang-1403.0.22.14.1)
|
||||
# macOS 14.0 with Apple clang version 15.0.0 (clang-1500.0.40.1) for arm64
|
||||
#
|
||||
# For more info for clang to Diagnosing memory, thread, and crash issues early, see:
|
||||
# See the FSANITIZE comment block in Makefile.config for common FSANITIZE values and more info.
|
||||
#
|
||||
# https://developer.apple.com/documentation/xcode/diagnosing-memory-thread-and-crash-issues-early
|
||||
# To use the Address Sanitizer, uncomment this set set of lines and recompile (make clobber all):
|
||||
#
|
||||
# NOTE: With the above version, these are NOT supported:
|
||||
#
|
||||
# UNSUPPORTED_FSANITIZE:= -fsanitize-nullability-return
|
||||
#
|
||||
# Uncomment these lines:
|
||||
#
|
||||
# FSANITIZE:= -fsanitize=undefined -fsanitize=address -fsanitize=bool -fsanitize=bounds
|
||||
# FSANITIZE+= -fsanitize=enum -fsanitize=vptr -fsanitize=integer-divide-by-zero
|
||||
# FSANITIZE+= -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
|
||||
# FSANITIZE+= -fsanitize=nonnull-attribute -fsanitize=nullability-arg
|
||||
# FSANITIZE+= -fsanitize=nullability-assign -fsanitize=returns-nonnull-attribute
|
||||
# FSANITIZE+= -fsanitize=null -fsanitize=object-size -fsanitize=shift
|
||||
# FSANITIZE+= -fsanitize=signed-integer-overflow -fsanitize=unreachable -fsanitize=vla-bound
|
||||
# CFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
|
||||
# LDFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
|
||||
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1
|
||||
# FSANITIZE+= -fsanitize=nullability-arg
|
||||
# FSANITIZE+= -fsanitize=nullability-assign
|
||||
# FSANITIZE+= -fsanitize=nullability-return
|
||||
# CFLAGS+= ${FSANITIZE}
|
||||
# LDFLAGS+= ${FSANITIZE}
|
||||
# DEBUG:= -O0 -g3
|
||||
####
|
||||
|
||||
####
|
||||
# RHEL (Linux) Address Sanitizer (ASAN)
|
||||
#
|
||||
# This comment block was tested under:
|
||||
#
|
||||
# RHEL9.2 with clang version 15.0.7 (Red Hat 15.0.7-2.el9) for x86_64
|
||||
#
|
||||
# with these RPMs installed:
|
||||
#
|
||||
# libasan-11.3.1-4.3.el9.x86_64 libubsan-11.3.1-4.3.el9.x86_64
|
||||
#
|
||||
# See the FSANITIZE comment block in Makefile.config for common FSANITIZE values and more info.
|
||||
#
|
||||
# To use the Address Sanitizer, uncomment this set set of lines and recompile (make clobber all):
|
||||
#
|
||||
# FSANITIZE+= -fsanitize=bounds
|
||||
# CFLAGS+= ${FSANITIZE}
|
||||
# LDFLAGS+= ${FSANITIZE}
|
||||
# DEBUG:= -O0 -g3
|
||||
###
|
||||
|
16
cal/Makefile
16
cal/Makefile
@@ -159,10 +159,11 @@ DISTLIST= ${CALC_FILES} ${MAKE_FILE}
|
||||
# These files are used to make (but not built) a calc .a link library
|
||||
#
|
||||
CALCLIBLIST=
|
||||
#
|
||||
|
||||
# rules that are not also names of files
|
||||
#
|
||||
PHONY= all clobber distlist install
|
||||
PHONY= all distlist buildlist distdir calcliblist calc_files_list echo_inst_files \
|
||||
clean clobber install uninstall
|
||||
|
||||
|
||||
############################################################
|
||||
@@ -182,14 +183,14 @@ all: ${CALC_FILES} ${MAKE_FILE} .all
|
||||
# additional Makefile targets #
|
||||
###############################
|
||||
|
||||
.PHONY: ${PHONY}
|
||||
|
||||
# used by the upper level Makefile to determine of we have done all
|
||||
#
|
||||
.all:
|
||||
${RM} -f .all
|
||||
${TOUCH} .all
|
||||
|
||||
.PHONY: ${PHONY}
|
||||
|
||||
##
|
||||
#
|
||||
# File list generation. You can ignore this section.
|
||||
@@ -210,6 +211,13 @@ distlist: ${DISTLIST}
|
||||
fi; \
|
||||
done
|
||||
|
||||
buildlist:
|
||||
${Q} for i in ${BUILD_ALL} /dev/null; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
echo cal/$$i; \
|
||||
fi; \
|
||||
done | fgrep -v '.bak' | LANG=C ${SORT}
|
||||
|
||||
distdir:
|
||||
${Q} echo cal
|
||||
|
||||
|
8
calc.man
8
calc.man
@@ -501,7 +501,7 @@ version number and exit.
|
||||
|
||||
.TP
|
||||
.B \-\-
|
||||
The double dash indicates to calc that no more option follow.
|
||||
The double dash indicates to calc that no more options follow.
|
||||
Thus calc will ignore a later argument on the command line
|
||||
even if it starts with a dash.
|
||||
This is useful when entering negative values on the command line as in:
|
||||
@@ -543,7 +543,7 @@ will not evaluate any
|
||||
arguments but instead make them available
|
||||
as strings to the argv() builtin function.
|
||||
|
||||
Sufficiently simple commands with no no characters like
|
||||
Sufficiently simple commands with no characters like
|
||||
parentheses, brackets, semicolons, '*', which have special
|
||||
interpretations in UNIX shells may be entered, possibly with
|
||||
spaces, until the terminating newline.
|
||||
@@ -804,7 +804,7 @@ the rest of the file will be processed in
|
||||
Note that
|
||||
.B \-s
|
||||
.B \-f
|
||||
must at the end of the initial ``#!'' line.
|
||||
must be at the end of the initial ``#!'' line.
|
||||
Any other optional
|
||||
.B "optional_other_flags"
|
||||
must come before
|
||||
@@ -973,7 +973,7 @@ Before a variable is assigned a value it has the value of zero.
|
||||
.PP
|
||||
The scope of a variable may be global, local to a file, or local to a
|
||||
procedure.
|
||||
Values may be grouped together in a matrix, or into a
|
||||
Values may be grouped together in a matrix, or into
|
||||
a list that permits stack and queue style operations.
|
||||
.PP
|
||||
For more information use the following
|
||||
|
350
chk_tree
Executable file
350
chk_tree
Executable file
@@ -0,0 +1,350 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# chk_tree - verify that the source tree and git and Makefiles are in sync
|
||||
#
|
||||
# This tools is used by "make prep".
|
||||
#
|
||||
# Copyright (C) 2023 Landon Curt Noll
|
||||
#
|
||||
# Calc is open software; you can redistribute it and/or modify it under
|
||||
# the terms of version 2.1 of the GNU Lesser General Public License
|
||||
# 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.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# Under source code control: 2023/10/04 21:04:44
|
||||
# File existed as early as: 2023
|
||||
#
|
||||
# chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
|
||||
# setup
|
||||
#
|
||||
EXIT_CODE=0
|
||||
|
||||
# firewall - verify that the "make distdir" directories exist
|
||||
#
|
||||
make distdir >/dev/null 2>&1
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: make distdir exit code: $status" 1>&2
|
||||
EXIT_CODE=10
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# collect make distdir directory list
|
||||
#
|
||||
# We ignore make action lines.
|
||||
#
|
||||
declare -a DISTDIR
|
||||
mapfile -t DISTDIR < <(make -s distdir | grep -v '^make\[[0-9]*\]: ' | sort -u)
|
||||
if [[ ${#DISTDIR[@]} -le 0 ]]; then
|
||||
echo "$0: ERROR: distdir is empty" 1>&2
|
||||
EXIT_CODE=11
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# collect directories
|
||||
#
|
||||
# We ignore NOTES because it contains notes that are not part of calc source.
|
||||
# We ignore .git and GitHub because they are not part of the calc source tarball.
|
||||
#
|
||||
declare -a FINDDIR
|
||||
mapfile -t FINDDIR < <(find . -type d \
|
||||
! -path './NOTES/*' ! -name NOTES \
|
||||
! -path './.git/*' ! -name .git \
|
||||
! -path './.github/*' ! -name .github | \
|
||||
sed -e 's/^\.\///' | sort -u)
|
||||
if [[ ${#FINDDIR[@]} -le 0 ]]; then
|
||||
echo "$0: ERROR: find dir is empty" 1>&2
|
||||
EXIT_CODE=12
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# compare DISTDIR and FINDDIR
|
||||
#
|
||||
declare -a DIFF_DISTDIR_FINDDIR
|
||||
mapfile -t DIFF_DISTDIR_FINDDIR < <(printf '%s\n' "${DISTDIR[@]}" "${FINDDIR[@]}" |
|
||||
tr ' ' '\n' | sort | uniq -u)
|
||||
if [[ ${#DIFF_DISTDIR_FINDDIR[@]} -ne 0 ]]; then
|
||||
|
||||
# report that DISTDIR and FINDDIR differ
|
||||
#
|
||||
echo "$0: ERROR: distdir and find dir differ for critical directories" 1>&2
|
||||
declare -a ONLY_FINDDIR
|
||||
mapfile -t ONLY_FINDDIR < <(printf '%s\n' "${DISTDIR[@]}" "${DISTDIR[@]}" "${FINDDIR[@]}" |
|
||||
tr ' ' '\n' | sort | uniq -u)
|
||||
if [[ ${#ONLY_FINDDIR[@]} -ne 0 ]]; then
|
||||
echo "$0: ERROR: found only in find dir: ${ONLY_FINDDIR[*]}" 1>&2
|
||||
fi
|
||||
declare -a ONLY_DISTDIR
|
||||
mapfile -t ONLY_DISTDIR < <(printf '%s\n' "${FINDDIR[@]}" "${FINDDIR[@]}" "${DISTDIR[@]}" |
|
||||
tr ' ' '\n' | sort | uniq -u)
|
||||
if [[ ${#ONLY_DISTDIR[@]} -ne 0 ]]; then
|
||||
echo "$0: ERROR: found only in distdir: ${ONLY_DISTDIR[*]}" 1>&2
|
||||
fi
|
||||
EXIT_CODE=13
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# firewall - verify that the "make distlist" files exist
|
||||
#
|
||||
make distlist >/dev/null 2>&1
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: make distlist exit code: $status" 1>&2
|
||||
EXIT_CODE=14
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# collect make distlist file list
|
||||
#
|
||||
declare -a DISTLIST
|
||||
mapfile -t DISTLIST < <(make -s distlist | grep -v '^make\[[0-9]*\]: ' | sort -u)
|
||||
if [[ ${#DISTLIST[@]} -le 0 ]]; then
|
||||
echo "$0: ERROR: distlist is empty" 1>&2
|
||||
EXIT_CODE=15
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
declare -A DISTLIST_A
|
||||
for i in "${DISTLIST[@]}"; do
|
||||
DISTLIST_A["$i"]="$i"
|
||||
done
|
||||
|
||||
# case: under git control
|
||||
#
|
||||
if [[ -d .git ]]; then
|
||||
|
||||
# obtain the list of files under git
|
||||
#
|
||||
# We ignore .git and GitHub related files because they are not part of the calc source tarball.
|
||||
#
|
||||
declare -a GITLS
|
||||
mapfile -t GITLS < <(git ls |
|
||||
grep -v -E '^\.github/|^\.gitignore$|^CODE_OF_CONDUCT\.md$|^CONTRIBUTING\.md$|^SECURITY\.md$' |
|
||||
sort -u)
|
||||
if [[ ${#GITLS[@]} -le 0 ]]; then
|
||||
echo "$0: ERROR: git ls is empty" 1>&2
|
||||
EXIT_CODE=16
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# compare DISTLIST and GITLS
|
||||
#
|
||||
declare -a DIFF_DISTLIST_GITLS
|
||||
mapfile -t DIFF_DISTLIST_GITLS < <(printf '%s\n' "${DISTLIST[@]}" "${GITLS[@]}" |
|
||||
tr ' ' '\n' | sort | uniq -u)
|
||||
if [[ ${#DIFF_DISTLIST_GITLS[@]} -ne 0 ]]; then
|
||||
|
||||
# report that DISTLIST and GITLS differ
|
||||
#
|
||||
echo "$0: ERROR: distlist and git ls differ for critical files" 1>&2
|
||||
declare -a ONLY_GITLS
|
||||
mapfile -t ONLY_GITLS < <(printf '%s\n' "${DISTLIST[@]}" "${DISTLIST[@]}" "${GITLS[@]}" |
|
||||
tr ' ' '\n' | sort | uniq -u)
|
||||
if [[ ${#ONLY_GITLS[@]} -ne 0 ]]; then
|
||||
echo "$0: ERROR: found only in git ls: ${ONLY_GITLS[*]}" 1>&2
|
||||
fi
|
||||
declare -a ONLY_DISTLIST
|
||||
mapfile -t ONLY_DISTLIST < <(printf '%s\n' "${GITLS[@]}" "${GITLS[@]}" "${DISTLIST[@]}" |
|
||||
tr ' ' '\n' | sort | uniq -u)
|
||||
if [[ ${#ONLY_DISTLIST[@]} -ne 0 ]]; then
|
||||
echo "$0: ERROR: found only in distlist: ${ONLY_DISTLIST[*]}" 1>&2
|
||||
fi
|
||||
EXIT_CODE=17
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# verify that there are no staged uncommitted changes under git
|
||||
#
|
||||
GIT_STATUS=$(git status --untracked-files=no --porcelain 2>&1)
|
||||
if [[ -n $GIT_STATUS ]] || ! git diff --cached --quiet --exit-code; then
|
||||
echo "$0: ERROR: there are staged uncommitted changes" 1>&2
|
||||
git status --short
|
||||
EXIT_CODE=18
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# verify that there are no uncommitted changes under git
|
||||
#
|
||||
if ! git diff --quiet --exit-code; then
|
||||
echo "$0: ERROR: there are unstaged changes" 1>&2
|
||||
git status --untracked-files=no --porcelain --short
|
||||
EXIT_CODE=19
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# verify that master branch is not ahead of 'origin/master'
|
||||
#
|
||||
GIT_MASTER=$(git rev-list --count master)
|
||||
GIT_ORIGIN_MASTER=$(git rev-list --count origin/master)
|
||||
if [[ $GIT_MASTER -gt $GIT_ORIGIN_MASTER ]]; then
|
||||
echo "$0: ERROR: master branch is behind of origin/master" 1>&2
|
||||
git status master
|
||||
EXIT_CODE=20
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
elif [[ $GIT_MASTER -lt $GIT_ORIGIN_MASTER ]]; then
|
||||
echo "$0: ERROR: master branch is ahead of origin/master" 1>&2
|
||||
git status master
|
||||
EXIT_CODE=21
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# verify that branch is not ahead of 'origin/HEAD'
|
||||
#
|
||||
GIT_HEAD=$(git rev-list --count HEAD)
|
||||
GIT_ORIGIN_HEAD=$(git rev-list --count origin/HEAD)
|
||||
if [[ $GIT_HEAD -gt $GIT_ORIGIN_HEAD ]]; then
|
||||
echo "$0: ERROR: HEAD is behind of origin/HEAD" 1>&2
|
||||
git status HEAD
|
||||
EXIT_CODE=22
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
elif [[ $GIT_HEAD -lt $GIT_ORIGIN_HEAD ]]; then
|
||||
echo "$0: ERROR: HEAD is ahead of origin/HEAD" 1>&2
|
||||
git status HEAD
|
||||
EXIT_CODE=23
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
# collect make buildlist file list
|
||||
#
|
||||
declare -a BUILDLIST
|
||||
mapfile -t BUILDLIST < <(make -s buildlist | grep -v '^make\[[0-9]*\]: ' | sort -u)
|
||||
if [[ ${#BUILDLIST[@]} -le 0 ]]; then
|
||||
echo "$0: ERROR: buildlist is empty" 1>&2
|
||||
EXIT_CODE=24
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
declare -A BUILDLIST_A
|
||||
for i in "${BUILDLIST[@]}"; do
|
||||
BUILDLIST_A["$i"]="$i"
|
||||
done
|
||||
|
||||
# look for something in DISTLIST that is also in BUILDLIST
|
||||
#
|
||||
# The BUILDLIST are a set of files that are result of building calc
|
||||
# and thus should NOT be part of the DISTLIST (list of files used
|
||||
# to form the calc source distribtion).
|
||||
#
|
||||
declare -a DISTLIST_ALSO_IN_BUILDLIST
|
||||
mapfile -t DISTLIST_ALSO_IN_BUILDLIST < <(
|
||||
for i in "${DISTLIST_A[@]}"; do
|
||||
if [[ -n "${BUILDLIST_A[$i]}" ]]; then
|
||||
echo "$i";
|
||||
fi
|
||||
done
|
||||
)
|
||||
if [[ ${#DISTLIST_ALSO_IN_BUILDLIST[@]} -ne 0 ]]; then
|
||||
|
||||
# report that something in DISTLIST was found in BUILDLIST
|
||||
#
|
||||
echo "$0: ERROR: distlist files found in buildlist" 1>&2
|
||||
echo "$0: ERROR: distlist files found in buildlist: ${DISTLIST_ALSO_IN_BUILDLIST[*]}" 1>&2
|
||||
EXIT_CODE=25
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# collect list of files
|
||||
#
|
||||
# We ignore NOTES because it contains notes that are not part of calc source.
|
||||
# We ignore .git and GitHub because they are not part of the calc source tarball.
|
||||
# We ignore .*.swp files as they are a result of vim sessions.
|
||||
# We ignore *.out files as they are used to collect information.
|
||||
# We ignore single letter files as they are used for temporary files.
|
||||
# We ignore files containing the any of the following in any letter case:
|
||||
#
|
||||
# foo bar baz curds whey rmme
|
||||
#
|
||||
declare -a FINDFILE
|
||||
mapfile -t FINDFILE < <(find . -type f \
|
||||
! -path './NOTES/*' ! -name NOTES \
|
||||
! -path './.git/*' ! -name .git \
|
||||
! -path './.github/*' ! -name .github \
|
||||
! -name 'CODE_OF_CONDUCT.md' ! -name 'CONTRIBUTING.md' ! -name '.gitignore' ! -name 'SECURITY.md' \
|
||||
! -name '*.swp' ! -name '?' ! -iname '*.out*' \
|
||||
! -iname '*foo*' ! -iname '*bar*' ! -iname '*baz*' \
|
||||
! -iname '*curds*' ! -iname '*whey*' ! -iname '*rmmee' -print |
|
||||
sed -e 's/^\.\///' | sort -u)
|
||||
if [[ ${#FINDFILE[@]} -le 0 ]]; then
|
||||
echo "$0: ERROR: find file is empty" 1>&2
|
||||
EXIT_CODE=26
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# look for something in FINDFILE that in neither DISTLIST nor BUILDLIST
|
||||
#
|
||||
# We look for a file that is neither a file that neither a result of building calc,
|
||||
# nor part of the calc distribution list in a file list.
|
||||
#
|
||||
# NOTE that the file list has already excluded certain files (see previous section).
|
||||
#
|
||||
# We flag any file in the list that is neither a result of building calc,
|
||||
# nor part of the calc distribution list in a file list.
|
||||
#
|
||||
declare -a UNKNOWN_FILE
|
||||
mapfile -t UNKNOWN_FILE < <(
|
||||
for i in "${FINDFILE[@]}"; do
|
||||
|
||||
# skip if this is a file that is result of building calc
|
||||
#
|
||||
if [[ -n ${BUILDLIST_A["$i"]} ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# skip if this is a file that is calc distribution list
|
||||
#
|
||||
if [[ -n ${DISTLIST_A["$i"]} ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# print the file of unknown status
|
||||
#
|
||||
echo "$i"
|
||||
done
|
||||
)
|
||||
if [[ ${#UNKNOWN_FILE[@]} -ne 0 ]]; then
|
||||
|
||||
# report that something in DISTLIST was found in BUILDLIST
|
||||
#
|
||||
echo "$0: ERROR: files that are neither built nor distlist are found" 1>&2
|
||||
echo "$0: ERROR: distlist files found in buildlist: ${UNKNOWN_FILE[*]}" 1>&2
|
||||
EXIT_CODE=27
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# Look for a find in distlist that would otherwise be ignored
|
||||
#
|
||||
# We ignore for trailblank and FINDFILE, filenames with a single letter, and files
|
||||
# that end in .out, and files containing the any of the following
|
||||
# in any letter case:
|
||||
#
|
||||
# foo bar baz curds whey rmme
|
||||
#
|
||||
# So we will object is any distlist file is one of these ignored filenames.
|
||||
#
|
||||
INVALID_DISTLIST=$(printf '%s\n' "${DISTLIST[@]}" | \
|
||||
tr '[:upper:]' '[:lower:]' | \
|
||||
sed -n -e '/^.$/p' -e '/.*foo.*/p' -e '/.*bar.*/p' -e '/.*baz.*/p' \
|
||||
-e '/.*curds.*/p' -e '/.*whey.*/p' -e '/.*rmme.*/p' |
|
||||
tr '\n' ' ')
|
||||
if [[ -n $INVALID_DISTLIST ]]; then
|
||||
echo "$0: ERROR: distlist contains invalid filename(s): $INVALID_DISTLIST" 1>&2
|
||||
EXIT_CODE=28
|
||||
echo "$0: Warning: set EXIT_CODE: $EXIT_CODE" 1>&2
|
||||
fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
if [[ $EXIT_CODE -ne 0 ]]; then
|
||||
echo "$0: Warning: about to exit $EXIT_CODE" 1>&2
|
||||
fi
|
||||
exit "$EXIT_CODE"
|
@@ -142,6 +142,12 @@ DISTLIST= ${SCRIPT_SRC} ${MAKE_FILE} README.src
|
||||
#
|
||||
CALCLIBLIST=
|
||||
|
||||
# complete list of files that may be created as part of the build process
|
||||
#
|
||||
# Used by chk_tree via make prep
|
||||
#
|
||||
BUILD_ALL= ${SCRIPT} README
|
||||
|
||||
# complete list of targets
|
||||
#
|
||||
# NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable
|
||||
@@ -149,10 +155,11 @@ CALCLIBLIST=
|
||||
#
|
||||
CSCRIPT_TARGETS= ${SCRIPT}
|
||||
TARGETS= ${CSCRIPT_TARGETS} README
|
||||
#
|
||||
|
||||
# rules that are not also names of files
|
||||
#
|
||||
PHONY= all clobber distlist install
|
||||
PHONY= all distlist buildlist distdir calcliblist detaillist depend \
|
||||
echo_inst_files clean clobber install uninstall
|
||||
|
||||
|
||||
############################################################
|
||||
@@ -206,6 +213,13 @@ distlist: ${DISTLIST}
|
||||
fi; \
|
||||
done | LANG=C ${SORT}
|
||||
|
||||
buildlist:
|
||||
${Q} for i in ${BUILD_ALL} /dev/null; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
echo cscript/$$i; \
|
||||
fi; \
|
||||
done | fgrep -v '.bak' | LANG=C ${SORT}
|
||||
|
||||
distdir:
|
||||
${Q} echo cscript
|
||||
|
||||
|
@@ -215,10 +215,23 @@ CALC_DYNAMIC_LIBCUSTCALC= libcustcalc${LIB_EXT_VERSION}
|
||||
#
|
||||
CALC_STATIC_LIBCUSTCALC= libcustcalc.a
|
||||
|
||||
# complete list of files that may be created as part of the build process
|
||||
#
|
||||
# Used by chk_tree via make prep
|
||||
#
|
||||
BUILD_ALL= ${REQUIRED_OBJ} ${CUSTOM_OBJ} \
|
||||
${CALC_DYNAMIC_LIBCUSTCALC} ${CALC_STATIC_LIBCUSTCALC} \
|
||||
.all
|
||||
|
||||
# complete list of targets
|
||||
#
|
||||
TARGETS= ${BLD_TYPE}
|
||||
|
||||
# rules that are not also names of files
|
||||
#
|
||||
PHONY= all distlist buildlist distdir calcliblist depend echo_inst_files clean \
|
||||
clobber install uninstall
|
||||
|
||||
|
||||
############################################################
|
||||
# Allow Makefile.local to change any of the above settings #
|
||||
@@ -238,6 +251,8 @@ all: ${TARGETS} ${INSTALL_H_SRC} ${CUSTOM_CALC_FILES} \
|
||||
# additional Makefile targets #
|
||||
###############################
|
||||
|
||||
.PHONY: ${PHONY}
|
||||
|
||||
calc-dynamic-only: ${CUSTCALC_OBJ} ${CALC_DYNAMIC_LIBCUSTCALC}
|
||||
|
||||
calc-static-only: ${CUSTCALC_OBJ} ${CALC_STATIC_LIBCUSTCALC}
|
||||
@@ -295,6 +310,13 @@ distlist: ${DISTLIST}
|
||||
fi; \
|
||||
done
|
||||
|
||||
buildlist:
|
||||
${Q} for i in ${BUILD_ALL} /dev/null; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
echo custom/$$i; \
|
||||
fi; \
|
||||
done | fgrep -v '.bak' | LANG=C ${SORT}
|
||||
|
||||
distdir:
|
||||
${Q} echo custom
|
||||
|
||||
|
8
errtbl.c
8
errtbl.c
@@ -855,7 +855,7 @@ is_e_digits(CONST char *errsym)
|
||||
* check for only digits remaining
|
||||
*/
|
||||
for (p = errsym+2; *p != '\0'; ++p) {
|
||||
if (!isascii(*p) || !isdigit(*p)) {
|
||||
if (!isascii((int)*p) || !isdigit((int)*p)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1090,7 +1090,7 @@ is_e_1string(CONST char *errsym)
|
||||
* must match regular expression: ^E_[A-Z][A-Z0-9_]+$
|
||||
*/
|
||||
for (p = errsym+3; *p != '\0'; ++p) {
|
||||
if (!isascii(*p) || !(isupper(*p) || isdigit(*p) || *p == '_')) {
|
||||
if (!isascii((int)*p) || !(isupper((int)*p) || isdigit((int)*p) || *p == '_')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2183,8 +2183,8 @@ print_errsym(void)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
extern char *optarg; /* argv index of the next arg */
|
||||
extern int optind; /* argv index of the next arg */
|
||||
EXTERN char *optarg; /* argv index of the next arg */
|
||||
EXTERN int optind; /* argv index of the next arg */
|
||||
int e_flag = 0; /* 1 ==> -e flag was used */
|
||||
int d_flag = 0; /* 1 ==> -s flag was used */
|
||||
int i;
|
||||
|
11
fposval.c
11
fposval.c
@@ -114,15 +114,20 @@ main(int UNUSED(argc), char **argv)
|
||||
/*
|
||||
* Big Endian
|
||||
*/
|
||||
/*
|
||||
* Use casts to (HALF *) because SWAP_HALF_IN_B* might expand to
|
||||
* a simple assignment and SWAP_HALF_IN_FILEPOS might get a
|
||||
* (HALF *) and a (FILEPOS *) which are not assignment-compatible.
|
||||
*/
|
||||
if (fileposlen == 64) {
|
||||
printf("#define SWAP_HALF_IN_FILEPOS(dest, src) \\\n"
|
||||
"\tSWAP_HALF_IN_B64(dest, src)\n");
|
||||
"\tSWAP_HALF_IN_B64((HALF *)dest, (HALF *)src)\n");
|
||||
} else if (fileposlen == 32) {
|
||||
printf("#define SWAP_HALF_IN_FILEPOS(dest, src) \\\n"
|
||||
"\tSWAP_HALF_IN_B32(dest, src)\n");
|
||||
"\tSWAP_HALF_IN_B32((HALF *)dest, (HALF *)src)\n");
|
||||
} else if (fileposlen%BASEB == 0) {
|
||||
printf("#define SWAP_HALF_IN_FILEPOS(dest, src) \\\n"
|
||||
"\tswap_HALFs(dest, src, %d)\n",
|
||||
"\tswap_HALFs((HALF *)dest, (HALF *)src, %d)\n",
|
||||
fileposlen/BASEB);
|
||||
} else {
|
||||
fprintf(stderr, "%s: unexpected BIG_ENDIAN FILEPOS bit size: %d\n",
|
||||
|
244
func.c
244
func.c
@@ -2479,6 +2479,7 @@ f_logn(int count, VALUE **vals)
|
||||
ln_of_x_is_complex = true;
|
||||
}
|
||||
} else {
|
||||
ln_x_c = NULL; /* avoid ln_x_c may be uninitialized warning later on */
|
||||
ln_x_r = qln(vals[0]->v_num, err);
|
||||
if (ln_x_r == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
@@ -2512,6 +2513,11 @@ f_logn(int count, VALUE **vals)
|
||||
switch (vals[1]->v_type) {
|
||||
case V_NUM:
|
||||
if (qiszero(vals[1]->v_num)) {
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
if (qisneg(vals[1]->v_num)) {
|
||||
@@ -2520,10 +2526,20 @@ f_logn(int count, VALUE **vals)
|
||||
ctmp.links = 1;
|
||||
ln_n_c = c_ln(&ctmp, err);
|
||||
if (ln_n_c == NULL) {
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
if (ciszero(ln_n_c)) {
|
||||
comfree(ln_n_c);
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
if (cisreal(ln_n_c)) {
|
||||
@@ -2534,24 +2550,49 @@ f_logn(int count, VALUE **vals)
|
||||
} else {
|
||||
ln_n_r = qln(vals[1]->v_num, err);
|
||||
if (ln_n_r == NULL) {
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
if (qiszero(ln_n_r)) {
|
||||
qfree(ln_n_r);
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case V_COM:
|
||||
if (ciszero(vals[1]->v_com)) {
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
ln_n_c = c_ln(vals[1]->v_com, err);
|
||||
if (ln_n_c == NULL) {
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
if (ciszero(ln_n_c)) {
|
||||
comfree(ln_n_c);
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_4);
|
||||
}
|
||||
if (cisreal(ln_n_c)) {
|
||||
@@ -2561,6 +2602,11 @@ f_logn(int count, VALUE **vals)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (ln_of_x_is_complex == true) {
|
||||
comfree(ln_x_c);
|
||||
} else {
|
||||
qfree(ln_x_r);
|
||||
}
|
||||
return error_value(E_LOGN_5);
|
||||
}
|
||||
|
||||
@@ -2574,10 +2620,12 @@ f_logn(int count, VALUE **vals)
|
||||
* case: ln(x) is COMPLEX, ln(n) is COMPLEX
|
||||
*/
|
||||
p_cval = c_div(ln_x_c, ln_n_c);
|
||||
comfree(ln_x_c);
|
||||
comfree(ln_n_c);
|
||||
if (p_cval == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* check if division is COMPLEX or NUMBER */
|
||||
/* check for COMPLEX or NUMBER division */
|
||||
if (cisreal(p_cval)) {
|
||||
/* ln(x) / ln(n) was NUMBER, not COMPLEX */
|
||||
result.v_num = c_to_q(p_cval, true);
|
||||
@@ -2594,10 +2642,12 @@ f_logn(int count, VALUE **vals)
|
||||
* case: ln(x) is COMPLEX, ln(n) is NUMBER
|
||||
*/
|
||||
p_cval = c_divq(ln_x_c, ln_n_r);
|
||||
comfree(ln_x_c);
|
||||
qfree(ln_n_r);
|
||||
if (p_cval == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* check if division is COMPLEX or NUMBER */
|
||||
/* check for COMPLEX or NUMBER division */
|
||||
if (cisreal(p_cval)) {
|
||||
/* ln(x) / ln(n) was NUMBER, not COMPLEX */
|
||||
result.v_num = c_to_q(p_cval, true);
|
||||
@@ -2620,16 +2670,18 @@ f_logn(int count, VALUE **vals)
|
||||
ctmp.imag = qlink(&_qzero_);
|
||||
ctmp.links = 1;
|
||||
p_cval = c_div(&ctmp, ln_n_c);
|
||||
comfree(&ctmp);
|
||||
comfree(ln_n_c);
|
||||
if (p_cval == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* check if division is COMPLEX or NUMBER */
|
||||
/* check for COMPLEX or NUMBER division */
|
||||
if (cisreal(p_cval)) {
|
||||
/* ln(x) / ln(n) was NUMBER, not COMPLEX */
|
||||
result.v_num = c_to_q(p_cval, true);
|
||||
result.v_type = V_NUM;
|
||||
} else {
|
||||
/* ln(x) / ln(n) is COMPLEX */
|
||||
/* ln(x) / ln(n) is COMPLEX result */
|
||||
result.v_type = V_COM;
|
||||
result.v_com = p_cval;
|
||||
}
|
||||
@@ -2640,10 +2692,12 @@ f_logn(int count, VALUE **vals)
|
||||
* case: ln(x) is NUMBER, ln(n) is NUMBER
|
||||
*/
|
||||
result.v_num = qqdiv(ln_x_r, ln_n_r);
|
||||
qfree(ln_x_r);
|
||||
qfree(ln_n_r);
|
||||
if (result.v_com == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* ln(x) / ln(n) is NUMBER */
|
||||
/* ln(x) / ln(n) is NUMBER result */
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
@@ -10900,7 +10954,6 @@ f_versin(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_aversin(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -10924,11 +10977,10 @@ f_aversin(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse versed trigonometric sine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qaversin_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qaversin_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -10941,17 +10993,17 @@ f_aversin(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_aversin(arg1.v_com, eps);
|
||||
c = c_aversin(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AVERSIN_3);
|
||||
}
|
||||
@@ -10966,7 +11018,7 @@ f_aversin(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11040,7 +11092,6 @@ f_coversin(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_acoversin(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11064,11 +11115,10 @@ f_acoversin(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse coversed trigonometric sine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qacoversin_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qacoversin_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11081,17 +11131,17 @@ f_acoversin(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_acoversin(arg1.v_com, eps);
|
||||
c = c_acoversin(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_ACOVERSIN_3);
|
||||
}
|
||||
@@ -11106,7 +11156,7 @@ f_acoversin(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11180,7 +11230,6 @@ f_vercos(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_avercos(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11204,11 +11253,10 @@ f_avercos(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse versed trigonometric cosine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qavercos_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qavercos_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11221,17 +11269,17 @@ f_avercos(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_avercos(arg1.v_com, eps);
|
||||
c = c_avercos(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AVERCOS_3);
|
||||
}
|
||||
@@ -11246,7 +11294,7 @@ f_avercos(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11320,7 +11368,6 @@ f_covercos(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_acovercos(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11344,11 +11391,10 @@ f_acovercos(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse coversed trigonometric cosine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qacovercos_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qacovercos_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11361,17 +11407,17 @@ f_acovercos(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_acovercos(arg1.v_com, eps);
|
||||
c = c_acovercos(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_ACOVERCOS_3);
|
||||
}
|
||||
@@ -11386,7 +11432,7 @@ f_acovercos(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11460,7 +11506,6 @@ f_haversin(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_ahaversin(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11484,11 +11529,10 @@ f_ahaversin(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse half versed trigonometric sine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qahaversin_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qahaversin_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11501,17 +11545,17 @@ f_ahaversin(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_ahaversin(arg1.v_com, eps);
|
||||
c = c_ahaversin(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AHAVERSIN_3);
|
||||
}
|
||||
@@ -11526,7 +11570,7 @@ f_ahaversin(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11600,7 +11644,6 @@ f_hacoversin(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_ahacoversin(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11624,11 +11667,10 @@ f_ahacoversin(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse half coversed trigonometric sine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qahacoversin_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qahacoversin_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11641,17 +11683,17 @@ f_ahacoversin(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_ahacoversin(arg1.v_com, eps);
|
||||
c = c_ahacoversin(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AHACOVERSIN_3);
|
||||
}
|
||||
@@ -11666,7 +11708,7 @@ f_ahacoversin(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11740,7 +11782,6 @@ f_havercos(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_ahavercos(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11764,11 +11805,10 @@ f_ahavercos(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse half versed trigonometric cosine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qahavercos_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qahavercos_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11781,17 +11821,17 @@ f_ahavercos(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_ahavercos(arg1.v_com, eps);
|
||||
c = c_ahavercos(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AHAVERCOS_3);
|
||||
}
|
||||
@@ -11806,7 +11846,7 @@ f_ahavercos(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -11880,7 +11920,6 @@ f_hacovercos(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_ahacovercos(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -11904,11 +11943,10 @@ f_ahacovercos(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse half coversed trigonometric cosine to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qahacovercos_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qahacovercos_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -11921,17 +11959,17 @@ f_ahacovercos(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_ahacovercos(arg1.v_com, eps);
|
||||
c = c_ahacovercos(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AHACOVERCOS_3);
|
||||
}
|
||||
@@ -11946,7 +11984,7 @@ f_ahacovercos(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -12016,7 +12054,6 @@ f_exsec(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_aexsec(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -12040,16 +12077,15 @@ f_aexsec(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse exterior trigonometric secant to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* firewall */
|
||||
if (qisnegone(arg1.v_num)) {
|
||||
if (qisnegone(vals[0]->v_num)) {
|
||||
return error_value(E_AEXSEC_3);
|
||||
}
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qaexsec_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qaexsec_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -12062,17 +12098,17 @@ f_aexsec(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_aexsec(arg1.v_com, eps);
|
||||
c = c_aexsec(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AEXSEC_3);
|
||||
}
|
||||
@@ -12087,7 +12123,7 @@ f_aexsec(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -12163,7 +12199,6 @@ f_excsc(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_aexcsc(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -12187,16 +12222,15 @@ f_aexcsc(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse exterior trigonometric cosecant to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* firewall */
|
||||
if (qisnegone(arg1.v_num)) {
|
||||
if (qisnegone(vals[0]->v_num)) {
|
||||
return error_value(E_AEXCSC_3);
|
||||
}
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qaexcsc_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qaexcsc_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -12209,17 +12243,17 @@ f_aexcsc(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_aexcsc(arg1.v_com, eps);
|
||||
c = c_aexcsc(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_AEXCSC_3);
|
||||
}
|
||||
@@ -12234,7 +12268,7 @@ f_aexcsc(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
@@ -12304,7 +12338,6 @@ f_crd(int count, VALUE **vals)
|
||||
S_FUNC VALUE
|
||||
f_acrd(int count, VALUE **vals)
|
||||
{
|
||||
VALUE arg1; /* 1st arg if it is a COMPLEX value */
|
||||
VALUE result; /* value to return */
|
||||
COMPLEX *c; /* COMPLEX trig result */
|
||||
NUMBER *eps; /* epsilon error tolerance */
|
||||
@@ -12328,11 +12361,10 @@ f_acrd(int count, VALUE **vals)
|
||||
/*
|
||||
* compute inverse trigonometric chord of a unit circle to a given error tolerance
|
||||
*/
|
||||
arg1 = *vals[0];
|
||||
if (arg1.v_type == V_NUM) {
|
||||
if (vals[0]->v_type == V_NUM) {
|
||||
|
||||
/* try to compute result using real trig function */
|
||||
result.v_num = qacrd_or_NULL(arg1.v_num, eps);
|
||||
result.v_num = qacrd_or_NULL(vals[0]->v_num, eps);
|
||||
|
||||
/*
|
||||
* case: trig function returned a NUMBER
|
||||
@@ -12345,17 +12377,17 @@ f_acrd(int count, VALUE **vals)
|
||||
*/
|
||||
} else {
|
||||
/* convert NUMBER argument from NUMBER to COMPLEX */
|
||||
arg1.v_com = qqtoc(arg1.v_num, &_qzero_);
|
||||
arg1.v_type = V_COM;
|
||||
vals[0]->v_com = qqtoc(vals[0]->v_num, &_qzero_);
|
||||
vals[0]->v_type = V_COM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type == V_COM) {
|
||||
if (vals[0]->v_type == V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument was COMPLEX or
|
||||
* trig function returned NULL and argument was converted to COMPLEX
|
||||
*/
|
||||
c = c_acrd(arg1.v_com, eps);
|
||||
c = c_acrd(vals[0]->v_com, eps);
|
||||
if (c == NULL) {
|
||||
return error_value(E_ACRD_3);
|
||||
}
|
||||
@@ -12370,7 +12402,7 @@ f_acrd(int count, VALUE **vals)
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
if (arg1.v_type != V_NUM && arg1.v_type != V_COM) {
|
||||
if (vals[0]->v_type != V_NUM && vals[0]->v_type != V_COM) {
|
||||
|
||||
/*
|
||||
* case: argument type is not valid for this function
|
||||
|
@@ -254,10 +254,18 @@ DISTLIST= ${STD_HELP_FILES} ${DETAIL_HELP} ${MAKE_FILE} \
|
||||
# These files are used to make (but not built) a calc .a link library
|
||||
#
|
||||
CALCLIBLIST=
|
||||
|
||||
# complete list of files that may be created as part of the build process
|
||||
#
|
||||
# Used by chk_tree via make prep
|
||||
#
|
||||
BUILD_ALL= ${BLT_HELP_FILES} ${SINGULAR_FILES} ${DETAIL_CLONE} \
|
||||
full funclist${EXT} funclist.c funclist.o
|
||||
|
||||
# rules that are not also names of files
|
||||
#
|
||||
PHONY= all clobber distlist install
|
||||
PHONY= all distlist buildlist distdir calcliblist detail_help_list \
|
||||
echo_inst_files clean clobber install uninstall
|
||||
|
||||
|
||||
############################################################
|
||||
@@ -278,6 +286,8 @@ all: ${FULL_HELP_FILES} full ${DETAIL_HELP} ${DETAIL_CLONE} \
|
||||
# additional Makefile targets #
|
||||
###############################
|
||||
|
||||
.PHONY: ${PHONY}
|
||||
|
||||
# used by the upper level Makefile to determine of we have done all
|
||||
#
|
||||
# NOTE: Due to bogus shells found on one common system we must have
|
||||
@@ -287,8 +297,6 @@ all: ${FULL_HELP_FILES} full ${DETAIL_HELP} ${DETAIL_CLONE} \
|
||||
${RM} -f .all
|
||||
${TOUCH} .all
|
||||
|
||||
.PHONY: ${PHONY}
|
||||
|
||||
bindings: ../cal/bindings
|
||||
${RM} -f $@
|
||||
${CP} ../cal/bindings $@
|
||||
@@ -619,6 +627,13 @@ distlist: ${DISTLIST}
|
||||
fi; \
|
||||
done | fgrep -v '.bak' | LANG=C ${SORT}
|
||||
|
||||
buildlist:
|
||||
${Q} for i in ${BUILD_ALL} /dev/null; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
echo help/$$i; \
|
||||
fi; \
|
||||
done | fgrep -v '.bak' | LANG=C ${SORT}
|
||||
|
||||
distdir:
|
||||
${Q} echo help
|
||||
|
||||
|
@@ -14,7 +14,7 @@ DESCRIPTION
|
||||
strings available, including the program or script name.
|
||||
|
||||
If the numeric arg is supplied, then the corresponding command line
|
||||
string is return, if it exists. Otherwise a nul() value is returned.
|
||||
string is return, if it exists. Otherwise a null() value is returned.
|
||||
|
||||
In keeping with the argc/argv convention of C, argv(0) will refer
|
||||
to the name of the program. If the -f filename argument is used,
|
||||
|
@@ -152,7 +152,7 @@ Command sequence
|
||||
exit string
|
||||
|
||||
The action of these commands depends on where they are used.
|
||||
At the interactive level, they will cause calc it edit.
|
||||
At the interactive level, they will cause calc to exit.
|
||||
This is the normal way to leave the calculator. In any
|
||||
other use, they will stop the current calculation as if
|
||||
an error had occurred.
|
||||
|
@@ -8,18 +8,17 @@ TYPES
|
||||
return string
|
||||
|
||||
DESCRIPTION
|
||||
The ctime() builtin returns the string formed by the first 24
|
||||
The ctime() builtin returns the string formed by the
|
||||
characters returned by the C library function, ctime(): E.g.
|
||||
|
||||
"Mon Oct 28 00:47:00 1996"
|
||||
|
||||
The 25th ctime() character, '\n' is removed.
|
||||
"Mon Oct 28 00:47:00 1996\n"
|
||||
|
||||
EXAMPLE
|
||||
; ## NOTE: Your output will likely vary:
|
||||
|
||||
; printf("The time is now %s.\n", ctime())
|
||||
The time is now Mon Apr 15 12:41:44 1996.
|
||||
The time is now Mon Apr 15 12:41:44 1996
|
||||
.
|
||||
|
||||
LIMITS
|
||||
none
|
||||
|
@@ -46,7 +46,7 @@ DESCRIPTION
|
||||
|
||||
Some non-POSIX systems such as MS Windows treat text files
|
||||
and binary files differently. In text mode MS Windows consider
|
||||
"\r\n" and end-of-line character. On an Apple MAC, the
|
||||
"\r\n" an end-of-line character. On an Apple MAC, the
|
||||
text mode end-of-line character is "\r".
|
||||
|
||||
Names of files are subject to ~ expansion just like the C or
|
||||
|
@@ -100,7 +100,7 @@ DESCRIPTION
|
||||
|
||||
Some non-POSIX systems such as MS Windows treat text files
|
||||
and binary files differently. In text mode MS Windows consider
|
||||
"\r\n" and end-of-line character. On an Apple MAC, the
|
||||
"\r\n" an end-of-line character. On an Apple MAC, the
|
||||
text mode end-of-line character is "\r".
|
||||
|
||||
Names of files are subject to ~ expansion just like the C or
|
||||
|
@@ -2,7 +2,7 @@ NAME
|
||||
matfill - fill a matrix with specified value or values
|
||||
|
||||
SYNOPSIS
|
||||
mat(m, x [, y])
|
||||
matfill(m, x [, y])
|
||||
|
||||
TYPES
|
||||
m matrix
|
||||
|
@@ -2,7 +2,7 @@ NAME
|
||||
mattrans - matrix transpose
|
||||
|
||||
SYNOPSIS
|
||||
matdim(m)
|
||||
mattrans(m)
|
||||
|
||||
TYPES
|
||||
m 2-dimensional matrix
|
||||
|
@@ -1,5 +1,5 @@
|
||||
NAME
|
||||
randbit - Blum-Blum-Shub pseudo-random number generator
|
||||
randombit - Blum-Blum-Shub pseudo-random number generator
|
||||
|
||||
SYNOPSIS
|
||||
randombit([x])
|
||||
|
@@ -534,8 +534,15 @@ Unexpected
|
||||
|
||||
Some might be surprised to discover that all of the trigonometric in calc:
|
||||
|
||||
sin, cos, tan, sec, csc, cot
|
||||
asin, acos, atan, asec, acsc, acot
|
||||
sin, cos, tan, cot, sec, csc
|
||||
asin, acos, atan, acot, asec, acsc
|
||||
versin, coversin, vercos, covercos
|
||||
aversin, acoversin, avercos, acovercos
|
||||
haversin, hacoversin, havercos, hacovercos
|
||||
ahaversin, hacoversin, havercos, ahacovercos
|
||||
exsec, aexsec, excsc, aexcsc
|
||||
crd, acrd
|
||||
cas, cis
|
||||
|
||||
work in only radians.
|
||||
|
||||
|
38
trailblank
38
trailblank
@@ -38,6 +38,14 @@ export EXIT_CODE=0
|
||||
# We exclude binary files, RCS source code history, intermediate
|
||||
# compiled files, patch droppings and compiled binary libraries.
|
||||
#
|
||||
# We also ignore filenames with a single letter, and files
|
||||
# that end in .out, and files containing the any of the following
|
||||
# in any letter case:
|
||||
#
|
||||
# foo bar baz curds whey rmme
|
||||
#
|
||||
# Such files are temporary/test files and are not part of calc.
|
||||
#
|
||||
# Last, we have two files that have long lines that, for now,
|
||||
# we cannot be as picky about without significant work.
|
||||
#
|
||||
@@ -53,7 +61,9 @@ LEADING_SPACES_BEFORE_TAB=$(
|
||||
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
|
||||
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
|
||||
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name debug.out \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
|
||||
-name '?' -o -iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
|
||||
-iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
|
||||
\) -prune -o -type f -print0 | \
|
||||
xargs -0 egrep -l '^ * * '
|
||||
)
|
||||
@@ -69,6 +79,14 @@ fi
|
||||
# We exclude binary files, RCS source code history, intermediate
|
||||
# compiled files, patch droppings and compiled binary libraries.
|
||||
#
|
||||
# We also ignore filenames with a single letter, and files
|
||||
# that end in .out, and files containing the any of the following
|
||||
# in any letter case:
|
||||
#
|
||||
# foo bar baz curds whey rmme
|
||||
#
|
||||
# Such files are temporary/test files and are not part of calc.
|
||||
#
|
||||
# Last, we have two files that have long lines that, for now,
|
||||
# we cannot be as picky about without significant work.
|
||||
#
|
||||
@@ -84,7 +102,8 @@ TRAILING_WHITESPACE=$(
|
||||
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
|
||||
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
|
||||
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name debug.out \
|
||||
-name '?' -o -iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
|
||||
-iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
|
||||
\) -prune -o -type f -print0 | \
|
||||
xargs -0 egrep -l '[ ]$'
|
||||
)
|
||||
@@ -139,6 +158,14 @@ fi
|
||||
# We exclude binary files, source code history, intermediate
|
||||
# compiled files, patch droppings and compiled binary libraries.
|
||||
#
|
||||
# We also ignore filenames with a single letter, and files
|
||||
# that end in .out, and files containing the any of the following
|
||||
# in any letter case:
|
||||
#
|
||||
# foo bar baz curds whey rmme
|
||||
#
|
||||
# Such files are temporary/test files and are not part of calc.
|
||||
#
|
||||
# Last, we have files that have long lines that, for now,
|
||||
# we cannot be as picky about without significant work.
|
||||
#
|
||||
@@ -154,8 +181,9 @@ PICKY_PHASE_1=$(
|
||||
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
|
||||
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
|
||||
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name debug.out -o \
|
||||
-name '.gitignore' -o -name 'README.md' -o -name '.lldbinit' \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
|
||||
-name '?' -o -iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
|
||||
-iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
|
||||
\) -prune -o -type f -print0 | \
|
||||
if [[ -x /usr/local/bin/picky ]]; then
|
||||
xargs -0 /usr/local/bin/picky -s -v -w132
|
||||
@@ -184,7 +212,7 @@ if [[ -n $BACKUP_MAKEILES ]]; then
|
||||
echo
|
||||
echo "# You need execute the following to remove backup Makefiles:"
|
||||
echo
|
||||
echo "$BACKUP_MAKEILES" | while read file; do
|
||||
echo "$BACKUP_MAKEILES" | while read -r file; do
|
||||
echo "rm -f $file"
|
||||
done
|
||||
EXIT_CODE=7
|
||||
|
@@ -180,6 +180,8 @@ fi
|
||||
echo
|
||||
echo "calc $(./ver_calc) release"
|
||||
echo
|
||||
echo 'calc-*'$(./ver_calc)'*'
|
||||
echo
|
||||
echo "Release v$(./ver_calc)"
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
|
@@ -64,7 +64,7 @@
|
||||
#define MAJOR_VER 2 /* level 1: major library version */
|
||||
#define MINOR_VER 15 /* level 2: minor library version */
|
||||
#define MAJOR_PATCH 0 /* level 3: major software version level */
|
||||
#define MINOR_PATCH 0 /* level 4: minor software version level */
|
||||
#define MINOR_PATCH 2 /* level 4: minor software version level */
|
||||
|
||||
|
||||
#endif /* !INCLUDE_VERSION_H*/
|
||||
|
77
zrandom.c
77
zrandom.c
@@ -1107,6 +1107,7 @@
|
||||
* current Blum generator state
|
||||
*/
|
||||
STATIC RANDOM blum;
|
||||
STATIC bool blum_initialized = false; /* true ==> blum has a seeded and initialized state */
|
||||
|
||||
|
||||
/*
|
||||
@@ -2272,11 +2273,14 @@ zsrandom1(CONST ZVALUE seed, bool need_ret)
|
||||
/*
|
||||
* initialize state if first call
|
||||
*/
|
||||
if (!blum.seeded) {
|
||||
if (blum_initialized == false || !blum.seeded) {
|
||||
p_blum = randomcopy(&init_blum);
|
||||
randomfree(&blum);
|
||||
if (blum_initialized == true) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
blum = *p_blum;
|
||||
free(p_blum);
|
||||
blum_initialized = true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2342,6 +2346,9 @@ zsrandom1(CONST ZVALUE seed, bool need_ret)
|
||||
* reserved seed
|
||||
*/
|
||||
} else {
|
||||
if (ret != NULL) {
|
||||
randomfree(ret);
|
||||
}
|
||||
math_error("srandom seed must be 0 or >= 2^32");
|
||||
not_reached();
|
||||
}
|
||||
@@ -2384,11 +2391,14 @@ zsrandom2(CONST ZVALUE seed, CONST ZVALUE newn)
|
||||
/*
|
||||
* initialize state if first call
|
||||
*/
|
||||
if (!blum.seeded) {
|
||||
if (blum_initialized == false || !blum.seeded) {
|
||||
p_blum = randomcopy(&init_blum);
|
||||
randomfree(&blum);
|
||||
if (blum_initialized == true) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
blum = *p_blum;
|
||||
free(p_blum);
|
||||
blum_initialized = true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2409,11 +2419,13 @@ zsrandom2(CONST ZVALUE seed, CONST ZVALUE newn)
|
||||
* preset moduli only if small newn
|
||||
*/
|
||||
if (ziszero(newn)) {
|
||||
randomfree(ret);
|
||||
math_error("srandom newn == 0 reserved for future use");
|
||||
not_reached();
|
||||
}
|
||||
set = (HALF)z1tol(newn);
|
||||
if (!zistiny(newn) || set > BLUM_PREGEN) {
|
||||
randomfree(ret);
|
||||
math_error("srandom small newn must be [1,20]");
|
||||
not_reached();
|
||||
}
|
||||
@@ -2433,7 +2445,7 @@ zsrandom2(CONST ZVALUE seed, CONST ZVALUE newn)
|
||||
* Otherwise non-zero seeds are processed as 1 arg calls
|
||||
*/
|
||||
} else {
|
||||
zsrandom1(seed, false);
|
||||
(void) zsrandom1(seed, false);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2452,6 +2464,7 @@ zsrandom2(CONST ZVALUE seed, CONST ZVALUE newn)
|
||||
* Blum modulus must be 1 mod 4
|
||||
*/
|
||||
if (newn.v[0] % 4 != 1) {
|
||||
randomfree(ret);
|
||||
math_error("srandom large newn must be 1 mod 4");
|
||||
not_reached();
|
||||
}
|
||||
@@ -2498,6 +2511,7 @@ zsrandom2(CONST ZVALUE seed, CONST ZVALUE newn)
|
||||
* reserved newn
|
||||
*/
|
||||
} else {
|
||||
randomfree(ret);
|
||||
math_error("srandom newn must be [1,20] or >= 2^32");
|
||||
not_reached();
|
||||
}
|
||||
@@ -2543,11 +2557,14 @@ zsrandom4(CONST ZVALUE seed, CONST ZVALUE ip, CONST ZVALUE iq, long trials)
|
||||
/*
|
||||
* initialize state if first call
|
||||
*/
|
||||
if (!blum.seeded) {
|
||||
if (blum_initialized == false || !blum.seeded) {
|
||||
p_blum = randomcopy(&init_blum);
|
||||
randomfree(&blum);
|
||||
if (blum_initialized == true) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
blum = *p_blum;
|
||||
free(p_blum);
|
||||
blum_initialized = true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2559,10 +2576,12 @@ zsrandom4(CONST ZVALUE seed, CONST ZVALUE ip, CONST ZVALUE iq, long trials)
|
||||
* search the 'p' and 'q' Blum prime (3 mod 4) candidates
|
||||
*/
|
||||
if (!znextcand(ip, trials, _zero_, _three_, _four_, &p)) {
|
||||
randomfree(ret);
|
||||
math_error("failed to find 1st Blum prime");
|
||||
not_reached();
|
||||
}
|
||||
if (!znextcand(iq, trials, _zero_, _three_, _four_, &q)) {
|
||||
randomfree(ret);
|
||||
math_error("failed to find 2nd Blum prime");
|
||||
not_reached();
|
||||
}
|
||||
@@ -2640,11 +2659,14 @@ zsetrandom(CONST RANDOM *state)
|
||||
/*
|
||||
* initialize state if first call
|
||||
*/
|
||||
if (!blum.seeded) {
|
||||
if (blum_initialized == false || !blum.seeded) {
|
||||
p_blum = randomcopy(&init_blum);
|
||||
randomfree(&blum);
|
||||
if (blum_initialized == true) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
blum = *p_blum;
|
||||
free(p_blum);
|
||||
blum_initialized = true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2684,11 +2706,14 @@ zrandomskip(long cnt)
|
||||
/*
|
||||
* initialize state if first call
|
||||
*/
|
||||
if (!blum.seeded) {
|
||||
if (blum_initialized == false || !blum.seeded) {
|
||||
p_blum = randomcopy(&init_blum);
|
||||
randomfree(&blum);
|
||||
if (blum_initialized == true) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
blum = *p_blum;
|
||||
free(p_blum);
|
||||
blum_initialized = true;
|
||||
}
|
||||
loglogn = (long)blum.loglogn;
|
||||
new_r.len = 0; /* paranoia */
|
||||
@@ -2798,11 +2823,14 @@ zrandom(long cnt, ZVALUE *res)
|
||||
/*
|
||||
* initialize state if first call
|
||||
*/
|
||||
if (!blum.seeded) {
|
||||
if (blum_initialized == false || !blum.seeded) {
|
||||
p_blum = randomcopy(&init_blum);
|
||||
randomfree(&blum);
|
||||
if (blum_initialized == true) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
blum = *p_blum;
|
||||
free(p_blum);
|
||||
blum_initialized = true;
|
||||
}
|
||||
loglogn = blum.loglogn;
|
||||
mask = blum.mask;
|
||||
@@ -3120,16 +3148,18 @@ randomfree(RANDOM *state)
|
||||
not_reached();
|
||||
}
|
||||
|
||||
/* free the values */
|
||||
/* clear the seed */
|
||||
state->seeded = 0;
|
||||
state->bits = 0; /* paranoia */
|
||||
state->loglogn = 0; /* paranoia */
|
||||
state->buffer = 0; /* paranoia */
|
||||
state->mask = 0; /* paranoia */
|
||||
|
||||
/* free the values - unless they are one of the default states */
|
||||
zfree_random(state->n);
|
||||
zfree_random(state->r);
|
||||
|
||||
/* free it if it is not pre-defined */
|
||||
state->seeded = 0;
|
||||
state->bits = 0; /* paranoia */
|
||||
state->buffer = 0;
|
||||
|
||||
/* free it if it is not pre-defined */
|
||||
/* free the RANDOM structure if it is NOT our static blum value */
|
||||
if (state != &blum) {
|
||||
free(state);
|
||||
}
|
||||
@@ -3223,8 +3253,10 @@ randomprint(CONST RANDOM *UNUSED(state), int UNUSED(flags))
|
||||
void
|
||||
random_libcalc_cleanup(void)
|
||||
{
|
||||
/* free our state - let zfree_random protect the default state */
|
||||
randomfree(&blum);
|
||||
/* free our state if seed was initialized - zfree_random protect default states */
|
||||
if (blum_initialized == true && blum.seeded) {
|
||||
randomfree(&blum);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3238,6 +3270,7 @@ random_libcalc_cleanup(void)
|
||||
S_FUNC void
|
||||
zfree_random(ZVALUE z)
|
||||
{
|
||||
/* do not free if NULL or one of the default states */
|
||||
if (z.v != NULL &&
|
||||
z.v != h_ndefvec && z.v != h_rdefvec && z.v != h_rdefvec_2 &&
|
||||
z.v != h_nvec01 && z.v != h_rvec01 &&
|
||||
|
Reference in New Issue
Block a user