Compare commits

..

9 Commits

Author SHA1 Message Date
Landon Curt Noll
ddf0c8f1f5 fixed some warnings for errtbl.c on Cygwin systems 2023-10-05 05:02:05 -07:00
Landon Curt Noll
d52cbcea14 avoid issues where funclist.sed forms help/funclist.c
The funclist.sed sed script, when transforming func.c
into help/funclist.c, was creating nested comments.
While those were hardless, a single change to func.c
avoids the naive funclist.sed processing and avoids
(harmless) warnings when compiling help/funclist.c
in the course of building the function list.
2023-10-05 04:59:13 -07:00
Landon Curt Noll
d14d525a6a Release v2.15.0.1
The following are the changes in this release:

    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:

	versin(x [,eps])	versed trigonometric sine
	coversin(x [,eps])	coversed trigonometric sine
	vercos(x [,eps])	versed trigonometric cosine
	covercos(x [,eps])	coversed trigonometric cosine
	aversin(x [,eps])	inverse versed trigonometric sine
	acoversin(x [,eps])	inverse coversed trigonometric sine
	avercos(x [,eps])	inverse versed trigonometric cosine
	acovercos(x [,eps])	inverse coversed trigonometric cosine
	haversin(x [,eps])	half versed trigonometric sine
	hacoversin(x [,eps])	half coversed trigonometric sine
	havercos(x [,eps])	half versed trigonometric cosine
	hacovercos(x [,eps])	half coversed trigonometric cosine
	ahaversin(x [,eps])	inverse half versed trigonometric sine
	ahacoversin(x [,eps])	inverse half coversed trigonometric sine
	ahavercos(x [,eps])	inverse half versed trigonometric cosine
	ahacovercos(x [,eps])	inverse half coversed trigonometric cosine
	exsec(x [,eps])		exterior trigonometric secant
	aexsec(x [,eps])	inverse exterior trigonometric secant
	excsc(x [,eps])		exterior trigonometric cosecant
	aexcsc(x [,eps])	inverse exterior trigonometric cosecant
	crd(x [,eps])		trigonometric chord of a unit circle
	acrd(x [,eps])		inverse trigonometric chord of a unit circle
	cas(x [,eps])		trigonometric cosine plus sine
	cis(x [,eps])		Euler's formula

    As Msys2 is a fork of Cygwin, if the OSNAME is Msys, the Cygwin
    target will be used.  Thanks to GitHub user @iahung2 for the
    pull request.

    Support for win32 and DJGPP has been dropped.  Calc version
    2.14.3.5 was the last to make references to win32 and make
    references to DJGPP.  Future versions of calc may work under
    those systems, we just elected to remove the somewhat out of
    date and awkward `win32.mkdef` and related win32 references.

    If you are a win32 user, please feel free to create a win32
    target in Makefile.target and submit as a pull request.
    If you are a DJGPP user, please feel free to create a DJGPP
    target in Makefile.target and submit as a pull request.
    Until someone can test such systems, we prefer to wait
    until someone is able to test and supply a pull request.

    Added PTR_LEN (length of a pointer) and PTR_BITS (bit length
    of a pointer) to longbits.h.

    Moved calc version definition from version.c to version.h.

    Sorted the order of symbols printed by "make env".

    Test if <stdbool.h> exists and set HAVE_STDBOOL_H accordingly
    in have_stdbool.h.  Added HAVE_STDBOOL_H to allow one to force
    this value.

    Added "bool.h" include file to support use of boolean symbols,
    true and false for pre-c99 C compilers.  The "bool.h" include
    file defines TRUE as true, FALSE as false, and BOOL as bool:
    for backward compatibility.

    Replaced in C source, TRUE with true, FALSE with false, and
    BOOL with bool.

    Fixed have_statfs optional executable file extension ${EXT{ in
    the ${UTIL_PROGS} make variable.

    Test if <stdint.h> exists and set HAVE_STDINT_H accordingly
    in have_stdint.h.  Added HAVE_STDINT_H to allow one to force
    this value.

    Test if <inttypes.h> exists and set HAVE_INTTYPES_H accordingly
    in have_inttypes.h.  Added HAVE_INTTYPES_H to allow one to force
    this value.

    Added c_chk.c to check the compiler and C include for calc
    requirements.  If you are unable to compile this program, or
    if this program when compiles does not exit 0, then your C
    compiler and/or C include fails to meet calc requirements.
    Compilers that are at least c99 MUST be able to compile this
    program such that when run will exit 0.

    The "make hsrc" file will attempt to compile and run c_chk and
    will warn if the C compiler and/or C include fails to meet
    calc requirements.  The "make debug" system will run c_chk -c
    to print information about the C compiler and C include.
    Currently failure to compile cc_chk.c or c_chk exiting non-0
    will just print "WARNING!!" strings to stderr.

    The make chk_c file also forms status.chk_c.h which either
    defines CHK_C when the C compiler and select include files
    appear to meet calc requirements, or undefines CHK_C
    when it does not.

    Added int.h as a central place for calc integer types and
    integer macros.

    Removed `-R release_file` and `-r release_file` command
    line options from `ver_calc`.  Add `-h` option.  Updated
    comments in "README.RELEASE", which serves as the contents
    of the calc command "help release".

    Added log2(x [,eps]) builtin function.  When x is an integer
    power of 2, log2(x) will return an integer, otherwise it will
    return the equivalent of ln(x)/ln(2).

    Removed CALC2_COMPAT in favor of ckecking if MAJOR_VER < 3.

    The sign element in a ZVALUE is now of type SIGN, which is either
    SB32 when MAJOR_VER < 3, or a bool otherwise.

    The len element in a ZVALUE is of type LEN.  LEN type is SB32 when
    MAJOR_VER < 3, or a uintptr_t otherwise.

    Setting an invalid epsilon via the epsilon(value) or confiv("epsilon",
    value) triggers an error.  The epsilon value must be: 0 < epsilon < 1.

    Added new logn(x, n [,eps]) builtin to compute logarithms to base n.

    Verify that eps arguments (error tolerance arguments that override
    the default epsilon value) to builtin functions have proper values.
    Previously the eps argument had little to no value checks for
    many builtin functions.

    Document in help files for builtin functions that take eps arguments,
    the LIMIT range for such eps values.

    Removed old Makefile testing rules for make dbx and make gdb.

    Improved "make run" to execute calccalc using shared libraries
    from the local directory, and with reading of the startup scripts
    disabled.

    Changed "make prep" to perform various tests that are used to
    help verify that calc is ready for a release.  Added the
    update_ver tool, (formerly verupdate) and the trailblank tool
    that existed outside of the calc source base but neverthless
    used in the calc release process.  Both of these tools are used
    by "make prep".

    Added Makefile testing rule "make testfuncsort" to check for
    the sort of the builtin function list.  Changed the order that
    builtin functions are listed by "show builtin" and the help/builtin
    to match the sorting of "LANG=C LC_ALL=C sort -d -u".

    Added c_to_q(COMPLEX *c, bool cfree) to make is easier to convert
    a COMPLEX value that is real (imag part is 0) into a NUMBER and
    optionally free the COMPLEX value.  The func.c code now uses c_to_q().

    Added q_to_c(NUMBER *q) to make it easier to convert a NUMBER
    into an allocated COMPLEX value.

    Added new vercos(x, [,eps]) for versed cosine and covercos(x, [,eps])
    for inverse versed cosine.

    Added new avercos(x, [,eps]) for inverse versed cosine and acovercos(x, [,eps])
    for inverse coversed cosine.

    Improved comments about use of the ${CALC_ENV} Makefile variable.
    Noted in Makefile.cal where and how the ${CALC_ENV} is used.
    Use ${CALC_ENV} Makefile variable were needed.

    Modified regression test cal/regress.cal: in some cases test numbers
    were adjusted.  Add comments indicate which test numbers apply to
    which code.  Indicated where there is room for new tests.
    Expanded the end of test numbers from 9999 to  99999.

    To make the meaning a bit more clear in cal/regress.cal, we have
    renamed the following test calc resource files that are related to
    the calc regression test suite:

	cal/test1700.cal -> cal/test8000.read.cal
	cal/test2300.cal -> cal/test2300.obj_incdec.cal
	cal/test2600.cal -> cal/test2600.numfunc.cal
	cal/test2700.cal -> cal/test2700.isqrt.cal
	cal/test3100.cal -> cal/test3100.matobj.cal
	cal/test3400.cal -> cal/test3400.trig.cal
	cal/test4000.cal -> cal/test4000.ptest.cal
	cal/test4100.cal -> cal/test4100.redc.cal
	cal/test4600.cal -> cal/test4600.fileop.cal
	cal/test5100.cal -> cal/test5100.newdecl.cal
	cal/test5200.cal -> cal/test5200.globstat.cal
	cal/test8400.cal -> cal/test8400.quit.cal
	cal/test8500.cal -> cal/test8500.divmod.cal
	cal/test8600.cal -> cal/test8600.maxargs.cal
	cal/set8700.cal -> cal/test8700.dotest.cal
	cal/test8900.cal -> cal/test8900.special.cal
	cal/test9300.cal -> cal/test9300.frem.cal

    Added to test 94dd, read of a number of new calc resource files
    that are not already read as a result of the calc regression test suite.

    Fixed more documentation and code comments that referred to the
    old additive 55 (a55) shuffle pseudo-random number generator.
    We have been using the subtractive 100 shuffle pseudo-random
    number generator in place of the additive 55 generator for a
    while now.

    Improved help files trigonometric functions.  They were corrected
    to indicate that complex arguments are allowed: an oversight
    from long ago when those trigonometric functions were expanded
    to include complex arguments.  The EXAMPLE sections were expanded
    and made consistent, where applicable, across the trigonometric
    help files.  Documented libcalc functions in the SEE ALSO sections.

    Improved "SEE ALSO" for the hyperbolic function help files.

    Expanded the calc regression test suite test 34dd to test various
    real and complex values for trigonometric functions.

    Added complex multiple approximation function to commath.c so
    that users of libcalc may directly round complex number to
    nearest multiple of a given real number:

	E_FUNC COMPLEX *cmappr(COMPLEX *c, NUMBER *e, long rnd, bool cfree);

    For example:

	COMPLEX *c;             /* complex number to round to nearest epsilon */
	NUMBER *eps;            /* epsilon rounding precision */
	COMPLEX *res;           /* c rounded to nearest epsilon */
	long rnd = 24L;         /* a common rounding mode */
	bool ok_to_free;        /* true ==> free c, false ==> do not free c */

	...

	res = cmappr(c, eps, ok_to_free);

    The complex trigonometric functions tan, cot, sec, csc were
    implemented in func.c as calls to complex sin and complex cos.
    We added the following direct calls to comfunc.c so that users
    of libcalc may call them directly:

	E_FUNC COMPLEX *c_tan(COMPLEX *c, NUMBER *eps);
	E_FUNC COMPLEX *c_cot(COMPLEX *c, NUMBER *eps);
	E_FUNC COMPLEX *c_sec(COMPLEX *c, NUMBER *eps);
	E_FUNC COMPLEX *c_cot(COMPLEX *c, NUMBER *eps);

    Added help/errorcodes rule to the top level Makefile.

    Added E_USERMAX symbol (== 32767) to indicate the maximum value
    allowed for user error codes.

    Improved help/error.  Added text about error code ranges and
    range symbols.

    Changed calc_errno a global int variable so that is may be directly
    accessed by libcalc users.

    Further improve help files for help/errno, help/error, help/newerror,
    help/stoponerror and help/strerror by adding to documentation
    of the calc error code system as well as libcalc interface
    where applicable.

    Changed #define E_USERDEF to #define E__USERDEF.

    Removed use of E_USERDEF, E__BASE, E__COUNT, and E__HIGHEST
    from custom/c_sysinfo because the c_sysinfo is just a demo
    and this will simplify the custom/Makefile.

    The include file calcerr.h is now the errsym.h include file.
    The calcerr.tbl has been replaced by errtbl.c and errtbl.h.

    The calcerr_c.awk, calcerr_c.sed, calcerr_h.awk, and
    calcerr_h.sed files are now obsolete and have been removed.
    The calcerr.c and calcerr.h now obsolete and are no longer built.

    The calc computation error codes, symbols and messages are now in
    a error_table[] array of struct errtbl.

    An E_STRING is a string corresponds to an error code #define.
    For example, the E_STRING for the calc error E_STRCAT,
    is the string "E_STRING".  An E_STRING must now match
    the regular expression: "^E_[A-Z0-9_]+$".

    The old array error_table[] of error message strings has been
    replaced by a new error_table[] array of struct errtbl.  The struct
    errtbl array holds calc errnum error codes, the related E_STRING
    symbol as a string, and the original related error message.
    To add new computation error codes, add them near the bottom of the
    error_table[] array, just before the NULL entry.

    The ./errcode utility, when run, will verify the consistency of
    the error_table[] array.

    The Makefile uses ./errcode -e to generate the contents of
    help/errorcodes file.  The help errorcodes now prints
    information from the new cstruct errtbl error_table[] array.

    The help/errorcodes.hdr and help/errorcodes.sed files are
    now obsolete and have been removed.

    The Makefile uses ./errcode -d to generate the contents of the
    errsym.h include file.

    Code that used the old array error_table[] of error message strings
    such as:

	#include "calcerr.h"

	char *msg;	/* calc computation error message */

	msg = error_table[errnum - E__BASE];

    where errnum is the calc computation error code
    E__BASE <= errnum <= E__HIGHEST, may now use:

	#include "errtbl.h"
	#include "errsym.h"

	char *msg;	/* calc computation error message */

	msg = error_table[errnum - E__BASE].errmsg;

    Rename the #define E__COUNT to ECOUNT to avoid confusion
    with "E_STRING" error symbols.

    Renamed "E_1OVER0" to "E_DIVBYZERO".
    Renamed "E_0OVER0" to "E_ZERODIVZERO".

    The verify_error_table() function that does a verification
    the error_table[] array and setup private_error_alias[] array
    is now called by libcalc_call_me_first().

    Fix comment about wrong include file in have_sys_mount.h.

    Removed unused booltostr() and strtobool() macros from bool.h.

    Moved define of math_error(char *, ...) from zmath.h to errtbl.h.
    The errtbl.h include file, unless ERRCODE_SRC is defined
    also includes attribute.h and errsym.h.

    Added E_STRING to error([errnum | "E_STRING"]) builtin function.
    Added E_STRING to errno([errnum | "E_STRING"]) builtin function.
    Added E_STRING to strerror([errnum | "E_STRING"]) builtin function.
    Calling these functions with an E_STRING errsym is the same as calling
    them with the matching errnum code.

    Standardized on calc computation error related E_STRING strings
    where there are a set of related codes.  Changed "E_...digits" into
    "E_..._digits".  For example, E_FPUTC1 became E_FPUTC_1, E_FPUTC2
    became E_FPUTC_2, and E_FPUTC3 became E_FPUTC_3.  In a few cases
    such as E_APPR became E_APPR_1, because there was a E_APPR2 (which
    became E_APPR_2) and E_APPR3 (which became E_APPR_3).  To other
    special cases, E_ILOG10 became E_IBASE10_LOG and E_ILOG2 became
    E_IBASE2_LOG because E_ILOG10 and E_ILOG2 are both independent calc
    computation error related E_STRING strings.  Now related sets of
    E_STRING strings end in _ (underscore) followed by digits.

    Added errsym builtin function.  The errsym(errnum | "E_STRING")
    builtin, , when given a valid integer errnum that corresponds to a
    calc error condition, will return an E_STRING string, AND when given
    a valid E_STRING string that is associated with a calc error
    condition, will return errnum integer that corresponds to a calc
    error condition.

    Supplying a non-integer numeric errnum code to error(), errno(),
    strerror(), or errsym() will result in an error.

    Added tests to the calc regression test suite (cal/regress.cal) to
    verify that the errnum calc computation error codes and their
    E_STRING values have not changed.

    Improved the clarity of calc regression suite (regress.cal) to mostly
    use E_STRING errsym instead of numeric errnum values for error()
    and errno() related tests.

    Fixed SEE ALSO typo in help randperm.

    Fixed calc regression test 42dd to set the display value back to 20.

    Added to test 95dd and test9500.trigeq.cal to the calc regression test
    suite to perform extensive test of trigonometric functions.

    Added to test 34dd, some if the missing inverse trigonometric tests.

    Improved builtin function strings, as printed by help builtin,
    that use an optional accuracy (epsilon) arg by adding a comma.

The following are the changes from calc version 2.14.3.4 to 2.14.3.5:

    Under macOS, to reduce dependency chains, we remove functions
    and data that are unreachable by the entry point or exported
    symbols.  In particular, the macOS linker is used with both
    "-dead_strip" and "-dead_strip_dylibs".

    The libcalc shared library is now linked with libcustcalc.

    The config("triground") controls rounding for the following
    trigonometric and hyperbolic functions:

	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
	sinh, cosh, tanh, coth, sech, csch
	asinh, acosh, atanh, acoth, asech, acsch

    In addition to taking a complex root (such as via the power
    function on a complex value), "triground" is used for:

	exp, polar

    For the above mentioned functions, the rounding mode used to
    round the result to the nearest epsilon value is controlled by,
    and defaults to:

	config("triground", 24)

    As with other config options, the call returns the previous mode,
    without a 2nd argument, returns the current mode without changing it:

	config("triground")

    When printing an error, calc used to print the errnum (error number):

	; 1/0
		Error 10001

    Calc now prints the errsym (errsym):

	; 1/0
		Error E_DIVBYZERO

    Added errsym E_LN_3 for ln(0).
    Added errsym E_LOG_5 for log(0).
    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.
2023-10-05 04:37:59 -07:00
Landon Curt Noll
698f73cd3e prep CHANGES for the next release of calc 2023-10-05 04:34:22 -07:00
Landon Curt Noll
e1888d9b9e note recent chk_tree changes in CHANGES 2023-10-05 04:33:30 -07:00
Landon Curt Noll
b54f68a797 Add comments to Makefile.local
Added comments to Makefile.local about how to force calc to install
under /usr/local.
2023-10-05 03:42:26 -07:00
Landon Curt Noll
77d7e665e0 Improve Makefile comments and tests
Improved notes for install locations in Makefile.config.

Added printing of ${BUILD_ALL} to make env output.

Added double pass of chk_tree to make full_debug (and thus to the make
debug output).
2023-10-05 03:27:14 -07:00
Landon Curt Noll
e96ef61718 fix missing version.h, add chk_tree tool
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 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.
2023-10-05 02:50:45 -07:00
Landon Curt Noll
0eee1a615d add calc version regex on update_ver 2023-10-03 23:45:38 -07:00
14 changed files with 548 additions and 79 deletions

30
CHANGES
View File

@@ -1,4 +1,7 @@
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.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: Added the following new trigonometric functions:
@@ -434,6 +437,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_LOG2_4 for log2(0).
Added errsym E_LOGN_6 for logn(0,base). 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: The following are the changes from calc version 2.14.3.0 to 2.14.3.4:

227
Makefile
View File

@@ -162,25 +162,23 @@ CALCOBJS= calc.o
# these .h files are needed to build the math link library # 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 \ LIB_H_SRC= alloc.h attribute.h banned.h blkcpy.h block.h bool.h byteswap.h \
cmath.h config.h custom.h decl.h errtbl.h file.h func.h hash.h \ calc.h cmath.h config.h custom.h decl.h errtbl.h file.h func.h \
hist.h int.h jump.h label.h lib_util.h lib_calc.h nametype.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 \ opcodes.h prime.h qmath.h sha1.h str.h strl.h symbol.h token.h \
symbol.h token.h value.h zmath.h zrand.h zrandom.h attribute.h value.h version.h zmath.h zrand.h zrandom.h
# we build these .h files during the make # we build these .h files during the make
# #
BUILD_H_SRC= align32.h args.h conf.h endian_calc.h errsym.h \ BUILD_H_SRC= align32.h args.h charbit.h conf.h endian_calc.h errsym.h fposval.h \
fposval.h have_ban_pragma.h have_const.h have_fgetsetpos.h \ have_arc4random.h have_ban_pragma.h have_const.h have_environ.h \
have_fpos_pos.h have_getpgid.h have_getprid.h have_getsid.h \ have_fgetsetpos.h have_fpos_pos.h have_getpgid.h have_getprid.h \
have_gettime.h have_memmv.h have_newstr.h have_offscl.h \ have_getsid.h have_gettime.h have_inttypes.h have_limits.h have_memmv.h \
have_posscl.h have_rusage.h have_stdlib.h have_strdup.h \ have_newstr.h have_offscl.h have_posscl.h have_rusage.h have_statfs.h \
have_string.h have_strlcat.h have_strlcpy.h have_times.h \ have_stdbool.h have_stdint.h have_stdlib.h have_strdup.h have_string.h \
have_uid_t.h have_unistd.h have_unused.h have_urandom.h \ have_strlcat.h have_strlcpy.h have_sys_mount.h have_sys_param.h \
have_ustat.h longbits.h terminal.h have_environ.h \ have_sys_vfs.h have_times.h have_uid_t.h have_unistd.h have_unused.h \
have_arc4random.h have_limits.h charbit.h have_sys_vfs.h \ have_urandom.h have_ustat.h longbits.h status.chk_c.h terminal.h
have_sys_param.h have_sys_mount.h have_statfs.h have_stdbool.h \
have_stdint.h status.chk_c.h
# we build these .c files during the make # 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. # 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 \ UTIL_C_SRC= align32.c charbit.c chk_c.c endian.c fposval.c have_arc4random.c \
have_const.c have_stdvs.c have_varvs.c fposval.c have_fgetsetpos.c \ have_ban_pragma.c have_const.c have_environ.c have_fgetsetpos.c \
have_fpos_pos.c have_offscl.c have_posscl.c have_memmv.c \ have_fpos_pos.c have_getpgid.c have_getprid.c have_getsid.c \
have_ustat.c have_getsid.c have_getpgid.c have_environ.c \ have_gettime.c have_memmv.c have_newstr.c have_offscl.c have_posscl.c \
have_gettime.c have_getprid.c have_rusage.c have_strdup.c \ have_rusage.c have_statfs.c have_stdvs.c have_strdup.c have_strlcat.c \
have_unused.c have_ban_pragma.c have_strlcpy.c have_strlcat.c \ have_strlcpy.c have_uid_t.c have_unused.c have_ustat.c have_varvs.c \
have_arc4random.c charbit.c have_statfs.c chk_c.c longbits.c
# these awk and sed tools are used in the process of building BUILD_H_SRC # these awk and sed tools are used in the process of building BUILD_H_SRC
# and BUILD_C_SRC # and BUILD_C_SRC
@@ -269,10 +267,10 @@ LICENSE= COPYING COPYING-LGPL
# These files are found (but not built) in the distribution # These files are found (but not built) in the distribution
# #
DISTLIST= ${C_SRC} ${H_SRC} ${MK_SET} BUGS CHANGES LIBRARY README.FIRST \ DISTLIST= ${C_SRC} ${H_SRC} ${MK_SET} ${UTIL_MISC_SRC} ${LICENSE} \
README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \ BUGS calc.man calc.spec.in CHANGES check.awk chk_tree CONTRIB-CODE \
sample.README calc.spec.in rpm.mk README.md QUESTIONS CONTRIB-CODE \ HOWTO.INSTALL LIBRARY .lldbinit QUESTIONS README.FIRST README.md \
README.RELEASE 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 # These files are used to make (but not build) a calc .a link library
# #
@@ -336,15 +334,27 @@ TRAILBLANK= trailblank
UPDATE_VER= update_ver UPDATE_VER= update_ver
CALC_TOOLS= ${TRAILBLANK} ${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 # complete list of targets
# #
TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS} ${CALC_TOOLS} TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS} ${CALC_TOOLS}
# rules that are not also names of files # rules that are not also names of files
# #
PHONY= all calcliblist calc_version check chk clobber debug depend distdir \ PHONY= all check_include sample hsrc depend h_list calc_version version distlist \
distlist hsrc install inst_files mkdebug rpm sample splint tags \ buildlist distdir calcliblist calcliblistfmt verifydist check chk calcinfo \
uninstall 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 # # Allow Makefile.local to change any of the above settings #
@@ -2389,7 +2399,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; \ echo "#undef CHK_C /* chk_c failed to validate C compiler and/or include files */" >> status.chk_c.h; \
else \ else \
echo "Good news everyone! :-)" \ 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" \ echo "#define CHK_C" \
"/* C compiler and select include files appear to meet calc requirements */" >> status.chk_c.h; \ "/* C compiler and select include files appear to meet calc requirements */" >> status.chk_c.h; \
fi; \ fi; \
@@ -2650,19 +2660,31 @@ distlist: ${DISTLIST} custom/Makefile
echo $$i; \ echo $$i; \
fi; \ fi; \
done; \ done; \
(cd help; ${MAKE} -f Makefile $@); \ (cd help; ${MAKE} -f Makefile -s $@); \
(cd cal; ${MAKE} -f Makefile $@); \ (cd cal; ${MAKE} -f Makefile -s $@); \
(cd custom; ${MAKE} -f Makefile $@); \ (cd custom; ${MAKE} -f Makefile -s $@); \
(cd cscript; ${MAKE} -f Makefile $@) \ (cd cscript; ${MAKE} -f Makefile -s $@) \
) | LANG=C ${SORT} ) | 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 distdir: custom/Makefile
${Q} (echo .; \ ${Q} (echo .; \
(cd help; ${MAKE} -f Makefile $@); \ (cd help; ${MAKE} -f Makefile -s $@); \
(cd cal; ${MAKE} -f Makefile $@); \ (cd cal; ${MAKE} -f Makefile -s $@); \
(cd custom; ${MAKE} -f Makefile $@); \ (cd custom; ${MAKE} -f Makefile -s $@); \
(cd cscript; ${MAKE} -f Makefile $@) \ (cd cscript; ${MAKE} -f Makefile -s $@) \
) | LANG=C ${SORT} ) | LANG=C ${SORT} -u
calcliblist: custom/Makefile calcliblist: custom/Makefile
${Q} (for i in ${CALCLIBLIST} /dev/null; do \ ${Q} (for i in ${CALCLIBLIST} /dev/null; do \
@@ -2670,11 +2692,11 @@ calcliblist: custom/Makefile
echo $$i; \ echo $$i; \
fi; \ fi; \
done; \ done; \
(cd help; ${MAKE} -f Makefile $@); \ (cd help; ${MAKE} -f Makefile -s $@); \
(cd cal; ${MAKE} -f Makefile $@); \ (cd cal; ${MAKE} -f Makefile -s $@); \
(cd custom; ${MAKE} -f Makefile $@); \ (cd custom; ${MAKE} -f Makefile -s $@); \
(cd cscript; ${MAKE} -f Makefile $@) \ (cd cscript; ${MAKE} -f Makefile -s $@) \
) | LANG=C ${SORT} ) | LANG=C ${SORT} -u
calcliblistfmt: calcliblistfmt:
${Q} ${MAKE} -f Makefile calcliblist | \ ${Q} ${MAKE} -f Makefile calcliblist | \
@@ -2686,6 +2708,10 @@ Makefile.simple:
custom/Makefile.simple: custom/Makefile.simple:
${Q} echo Support for $@ was dropped after the the release of calc v2.14.3.0. ${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. # Doing a 'make check' will cause the regression test suite to be executed.
@@ -2704,10 +2730,7 @@ check: all ./cal/regress.cal
chk: ./cal/regress.cal chk: ./cal/regress.cal
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
${Q} echo
${CALC_ENV} ./calc${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk ${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
${Q} echo 'chk OK' ${Q} echo 'chk OK'
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
@@ -2816,6 +2839,7 @@ env:
@echo 'AWK=${AWK}'; echo '' @echo 'AWK=${AWK}'; echo ''
@echo 'BINDIR=${BINDIR}'; echo '' @echo 'BINDIR=${BINDIR}'; echo ''
@echo 'BLD_TYPE=${BLD_TYPE}'; echo '' @echo 'BLD_TYPE=${BLD_TYPE}'; echo ''
@echo 'BUILD_ALL=${BUILD_ALL}'; echo ''
@echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo '' @echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo ''
@echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo '' @echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo ''
@echo 'BYTE_ORDER=${BYTE_ORDER}'; echo '' @echo 'BYTE_ORDER=${BYTE_ORDER}'; echo ''
@@ -3022,6 +3046,15 @@ mkdebug: env version.c
full_debug: calcinfo env full_debug: calcinfo env
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' @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 =-=-=-=' @echo '=-=-=-= Contents of ${LOCAL_MKF} follows =-=-=-='
-@${CAT} ${LOCAL_MKF} -@${CAT} ${LOCAL_MKF}
@echo '=-=-=-= End of contents of ${LOCAL_MKF} =-=-=-=' @echo '=-=-=-= End of contents of ${LOCAL_MKF} =-=-=-='
@@ -3034,6 +3067,9 @@ full_debug: calcinfo env
@echo '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-=' @echo '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
-@${MAKE} -f Makefile Q= H=@ S= E= V=@ clobber -@${MAKE} -f Makefile Q= H=@ S= E= V=@ clobber
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-=' @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 '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
@echo '=-=-= this may take a bit of time =-=-=' @echo '=-=-= this may take a bit of time =-=-='
-@${MAKE} -f Makefile Q= H=@ S= E= V=@ all -@${MAKE} -f Makefile Q= H=@ S= E= V=@ all
@@ -3053,6 +3089,9 @@ full_debug: calcinfo env
@echo 'are allowed =-=-=-=' @echo 'are allowed =-=-=-='
-@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);' -@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-=' @echo '=-=-=-= 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 '=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
@echo '=-=-= this may take a while =-=-=' @echo '=-=-= this may take a while =-=-='
-@${MAKE} -f Makefile Q= V=@ check -@${MAKE} -f Makefile Q= V=@ check
@@ -3125,6 +3164,18 @@ prep:
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= end of ${MAKE} clobber =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= end of ${MAKE} clobber =-=-=-=-=-='
${Q}echo ${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 '=-=-=-=-=-= start of ${TRAILBLANK} =-=-=-=-=-='
${Q}echo ${Q}echo
./${TRAILBLANK} ./${TRAILBLANK}
@@ -3139,19 +3190,22 @@ prep:
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= start of ${MAKE} tags =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= start of ${MAKE} tags =-=-=-=-=-='
${Q}echo ${Q}echo
${MAKE} tags ${MAKE} -s tags
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= end of ${MAKE} tags =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= end of ${MAKE} tags =-=-=-=-=-='
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= start of ${MAKE} depend =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= start of ${MAKE} depend =-=-=-=-=-='
${Q}echo ${Q}echo
${MAKE} depend ${MAKE} -s depend
${Q}echo ${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 '=-=-=-=-=-= end of ${MAKE} depend =-=-=-=-=-='
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= start of ${MAKE} testfuncsort =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= start of ${MAKE} testfuncsort =-=-=-=-=-='
${Q}echo ${Q}echo
${MAKE} testfuncsort ${MAKE} -s testfuncsort
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= end of ${MAKE} testfuncsort =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= end of ${MAKE} testfuncsort =-=-=-=-=-='
${Q}echo ${Q}echo
@@ -3161,9 +3215,15 @@ prep:
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= end of ${UPDATE_VER} =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= end of ${UPDATE_VER} =-=-=-=-=-='
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= start of chk_tree pass #1 =-=-=-=-=-='
${Q}echo
-./chk_tree
${Q}echo
${Q}echo '=-=-=-=-=-= end of chk_tree pass #1 =-=-=-=-=-='
${Q}echo
${Q}echo '=-=-=-=-=-= start of ${MAKE} chk =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= start of ${MAKE} chk =-=-=-=-=-='
${Q}echo ${Q}echo
${MAKE} chk ${MAKE} -s chk
${Q}echo ${Q}echo
${Q}echo '=-=-=-=-=-= end of ${MAKE} chk =-=-=-=-=-=' ${Q}echo '=-=-=-=-=-= end of ${MAKE} chk =-=-=-=-=-='
${Q}echo ${Q}echo
@@ -3306,8 +3366,7 @@ olduninstall:
${RM} -f -v custom/Makefile.simple custom/Makefile.simple.bak ${RM} -f -v custom/Makefile.simple custom/Makefile.simple.bak
tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE} tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE}
-${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \ ${CTAGS} -w ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC}
${GREP} -E -v 'Duplicate entry|Second entry ignored'
clean: clean:
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
@@ -3395,6 +3454,7 @@ clobber: clean
${RM} -rf .DS_Store; \ ${RM} -rf .DS_Store; \
fi fi
${RM} -f func.show func.sort ${RM} -f func.show func.sort
${RM} -f outfile
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
# install everything # install everything
@@ -4020,6 +4080,7 @@ addop.o: str.h
addop.o: symbol.h addop.o: symbol.h
addop.o: token.h addop.o: token.h
addop.o: value.h addop.o: value.h
addop.o: version.h
addop.o: zmath.h addop.o: zmath.h
align32.o: align32.c align32.o: align32.c
align32.o: banned.h align32.o: banned.h
@@ -4057,6 +4118,7 @@ assocfunc.o: qmath.h
assocfunc.o: sha1.h assocfunc.o: sha1.h
assocfunc.o: str.h assocfunc.o: str.h
assocfunc.o: value.h assocfunc.o: value.h
assocfunc.o: version.h
assocfunc.o: zmath.h assocfunc.o: zmath.h
blkcpy.o: alloc.h blkcpy.o: alloc.h
blkcpy.o: attribute.h blkcpy.o: attribute.h
@@ -4091,6 +4153,7 @@ blkcpy.o: qmath.h
blkcpy.o: sha1.h blkcpy.o: sha1.h
blkcpy.o: str.h blkcpy.o: str.h
blkcpy.o: value.h blkcpy.o: value.h
blkcpy.o: version.h
blkcpy.o: zmath.h blkcpy.o: zmath.h
block.o: alloc.h block.o: alloc.h
block.o: attribute.h block.o: attribute.h
@@ -4121,6 +4184,7 @@ block.o: qmath.h
block.o: sha1.h block.o: sha1.h
block.o: str.h block.o: str.h
block.o: value.h block.o: value.h
block.o: version.h
block.o: zmath.h block.o: zmath.h
byteswap.o: alloc.h byteswap.o: alloc.h
byteswap.o: attribute.h byteswap.o: attribute.h
@@ -4144,6 +4208,7 @@ byteswap.o: have_stdlib.h
byteswap.o: have_string.h byteswap.o: have_string.h
byteswap.o: longbits.h byteswap.o: longbits.h
byteswap.o: qmath.h byteswap.o: qmath.h
byteswap.o: version.h
byteswap.o: zmath.h byteswap.o: zmath.h
calc.o: alloc.h calc.o: alloc.h
calc.o: args.h calc.o: args.h
@@ -4192,6 +4257,7 @@ calc.o: strl.h
calc.o: symbol.h calc.o: symbol.h
calc.o: token.h calc.o: token.h
calc.o: value.h calc.o: value.h
calc.o: version.h
calc.o: zmath.h calc.o: zmath.h
charbit.o: banned.h charbit.o: banned.h
charbit.o: charbit.c charbit.o: charbit.c
@@ -4201,6 +4267,7 @@ chk_c.o: banned.h
chk_c.o: bool.h chk_c.o: bool.h
chk_c.o: chk_c.c chk_c.o: chk_c.c
chk_c.o: have_ban_pragma.h chk_c.o: have_ban_pragma.h
chk_c.o: have_inttypes.h
chk_c.o: have_stdbool.h chk_c.o: have_stdbool.h
chk_c.o: have_stdint.h chk_c.o: have_stdint.h
chk_c.o: have_stdlib.h chk_c.o: have_stdlib.h
@@ -4245,6 +4312,7 @@ codegen.o: strl.h
codegen.o: symbol.h codegen.o: symbol.h
codegen.o: token.h codegen.o: token.h
codegen.o: value.h codegen.o: value.h
codegen.o: version.h
codegen.o: zmath.h codegen.o: zmath.h
comfunc.o: alloc.h comfunc.o: alloc.h
comfunc.o: attribute.h comfunc.o: attribute.h
@@ -4270,6 +4338,7 @@ comfunc.o: have_string.h
comfunc.o: longbits.h comfunc.o: longbits.h
comfunc.o: nametype.h comfunc.o: nametype.h
comfunc.o: qmath.h comfunc.o: qmath.h
comfunc.o: version.h
comfunc.o: zmath.h comfunc.o: zmath.h
commath.o: alloc.h commath.o: alloc.h
commath.o: attribute.h commath.o: attribute.h
@@ -4293,6 +4362,7 @@ commath.o: have_stdlib.h
commath.o: have_string.h commath.o: have_string.h
commath.o: longbits.h commath.o: longbits.h
commath.o: qmath.h commath.o: qmath.h
commath.o: version.h
commath.o: zmath.h commath.o: zmath.h
config.o: alloc.h config.o: alloc.h
config.o: attribute.h config.o: attribute.h
@@ -4331,6 +4401,7 @@ config.o: str.h
config.o: strl.h config.o: strl.h
config.o: token.h config.o: token.h
config.o: value.h config.o: value.h
config.o: version.h
config.o: zmath.h config.o: zmath.h
config.o: zrand.h config.o: zrand.h
const.o: alloc.h const.o: alloc.h
@@ -4363,6 +4434,7 @@ const.o: qmath.h
const.o: sha1.h const.o: sha1.h
const.o: str.h const.o: str.h
const.o: value.h const.o: value.h
const.o: version.h
const.o: zmath.h const.o: zmath.h
custom.o: alloc.h custom.o: alloc.h
custom.o: attribute.h custom.o: attribute.h
@@ -4395,6 +4467,7 @@ custom.o: qmath.h
custom.o: sha1.h custom.o: sha1.h
custom.o: str.h custom.o: str.h
custom.o: value.h custom.o: value.h
custom.o: version.h
custom.o: zmath.h custom.o: zmath.h
endian.o: banned.h endian.o: banned.h
endian.o: endian.c endian.o: endian.c
@@ -4431,6 +4504,7 @@ errtbl.o: qmath.h
errtbl.o: sha1.h errtbl.o: sha1.h
errtbl.o: str.h errtbl.o: str.h
errtbl.o: value.h errtbl.o: value.h
errtbl.o: version.h
errtbl.o: zmath.h errtbl.o: zmath.h
file.o: alloc.h file.o: alloc.h
file.o: attribute.h file.o: attribute.h
@@ -4470,6 +4544,7 @@ file.o: sha1.h
file.o: str.h file.o: str.h
file.o: strl.h file.o: strl.h
file.o: value.h file.o: value.h
file.o: version.h
file.o: zmath.h file.o: zmath.h
fposval.o: alloc.h fposval.o: alloc.h
fposval.o: banned.h fposval.o: banned.h
@@ -4493,6 +4568,7 @@ fposval.o: have_stdlib.h
fposval.o: have_string.h fposval.o: have_string.h
fposval.o: have_unused.h fposval.o: have_unused.h
fposval.o: longbits.h fposval.o: longbits.h
fposval.o: version.h
fposval.o: zmath.h fposval.o: zmath.h
func.o: alloc.h func.o: alloc.h
func.o: attribute.h func.o: attribute.h
@@ -4541,6 +4617,7 @@ func.o: strl.h
func.o: symbol.h func.o: symbol.h
func.o: token.h func.o: token.h
func.o: value.h func.o: value.h
func.o: version.h
func.o: zmath.h func.o: zmath.h
func.o: zrand.h func.o: zrand.h
func.o: zrandom.h func.o: zrandom.h
@@ -4574,6 +4651,7 @@ hash.o: qmath.h
hash.o: sha1.h hash.o: sha1.h
hash.o: str.h hash.o: str.h
hash.o: value.h hash.o: value.h
hash.o: version.h
hash.o: zmath.h hash.o: zmath.h
hash.o: zrand.h hash.o: zrand.h
hash.o: zrandom.h hash.o: zrandom.h
@@ -4706,6 +4784,7 @@ help.o: qmath.h
help.o: sha1.h help.o: sha1.h
help.o: str.h help.o: str.h
help.o: value.h help.o: value.h
help.o: version.h
help.o: zmath.h help.o: zmath.h
hist.o: alloc.h hist.o: alloc.h
hist.o: attribute.h hist.o: attribute.h
@@ -4745,6 +4824,7 @@ hist.o: sha1.h
hist.o: str.h hist.o: str.h
hist.o: strl.h hist.o: strl.h
hist.o: value.h hist.o: value.h
hist.o: version.h
hist.o: zmath.h hist.o: zmath.h
input.o: alloc.h input.o: alloc.h
input.o: attribute.h input.o: attribute.h
@@ -4782,6 +4862,7 @@ input.o: sha1.h
input.o: str.h input.o: str.h
input.o: strl.h input.o: strl.h
input.o: value.h input.o: value.h
input.o: version.h
input.o: zmath.h input.o: zmath.h
jump.o: banned.h jump.o: banned.h
jump.o: decl.h jump.o: decl.h
@@ -4823,6 +4904,7 @@ label.o: sha1.h
label.o: str.h label.o: str.h
label.o: token.h label.o: token.h
label.o: value.h label.o: value.h
label.o: version.h
label.o: zmath.h label.o: zmath.h
lib_calc.o: alloc.h lib_calc.o: alloc.h
lib_calc.o: attribute.h lib_calc.o: attribute.h
@@ -4867,6 +4949,7 @@ lib_calc.o: symbol.h
lib_calc.o: terminal.h lib_calc.o: terminal.h
lib_calc.o: token.h lib_calc.o: token.h
lib_calc.o: value.h lib_calc.o: value.h
lib_calc.o: version.h
lib_calc.o: zmath.h lib_calc.o: zmath.h
lib_calc.o: zrandom.h lib_calc.o: zrandom.h
lib_util.o: alloc.h lib_util.o: alloc.h
@@ -4890,6 +4973,7 @@ lib_util.o: have_string.h
lib_util.o: lib_util.c lib_util.o: lib_util.c
lib_util.o: lib_util.h lib_util.o: lib_util.h
lib_util.o: longbits.h lib_util.o: longbits.h
lib_util.o: version.h
lib_util.o: zmath.h lib_util.o: zmath.h
listfunc.o: alloc.h listfunc.o: alloc.h
listfunc.o: attribute.h listfunc.o: attribute.h
@@ -4920,6 +5004,7 @@ listfunc.o: qmath.h
listfunc.o: sha1.h listfunc.o: sha1.h
listfunc.o: str.h listfunc.o: str.h
listfunc.o: value.h listfunc.o: value.h
listfunc.o: version.h
listfunc.o: zmath.h listfunc.o: zmath.h
listfunc.o: zrand.h listfunc.o: zrand.h
longbits.o: banned.h longbits.o: banned.h
@@ -4959,6 +5044,7 @@ matfunc.o: qmath.h
matfunc.o: sha1.h matfunc.o: sha1.h
matfunc.o: str.h matfunc.o: str.h
matfunc.o: value.h matfunc.o: value.h
matfunc.o: version.h
matfunc.o: zmath.h matfunc.o: zmath.h
matfunc.o: zrand.h matfunc.o: zrand.h
math_error.o: alloc.h math_error.o: alloc.h
@@ -4993,6 +5079,7 @@ math_error.o: qmath.h
math_error.o: sha1.h math_error.o: sha1.h
math_error.o: str.h math_error.o: str.h
math_error.o: value.h math_error.o: value.h
math_error.o: version.h
math_error.o: zmath.h math_error.o: zmath.h
obj.o: alloc.h obj.o: alloc.h
obj.o: attribute.h obj.o: attribute.h
@@ -5031,6 +5118,7 @@ obj.o: str.h
obj.o: strl.h obj.o: strl.h
obj.o: symbol.h obj.o: symbol.h
obj.o: value.h obj.o: value.h
obj.o: version.h
obj.o: zmath.h obj.o: zmath.h
opcodes.o: alloc.h opcodes.o: alloc.h
opcodes.o: attribute.h opcodes.o: attribute.h
@@ -5072,6 +5160,7 @@ opcodes.o: sha1.h
opcodes.o: str.h opcodes.o: str.h
opcodes.o: symbol.h opcodes.o: symbol.h
opcodes.o: value.h opcodes.o: value.h
opcodes.o: version.h
opcodes.o: zmath.h opcodes.o: zmath.h
opcodes.o: zrand.h opcodes.o: zrand.h
opcodes.o: zrandom.h opcodes.o: zrandom.h
@@ -5094,6 +5183,7 @@ pix.o: longbits.h
pix.o: pix.c pix.o: pix.c
pix.o: prime.h pix.o: prime.h
pix.o: qmath.h pix.o: qmath.h
pix.o: version.h
pix.o: zmath.h pix.o: zmath.h
poly.o: alloc.h poly.o: alloc.h
poly.o: attribute.h poly.o: attribute.h
@@ -5124,6 +5214,7 @@ poly.o: qmath.h
poly.o: sha1.h poly.o: sha1.h
poly.o: str.h poly.o: str.h
poly.o: value.h poly.o: value.h
poly.o: version.h
poly.o: zmath.h poly.o: zmath.h
prime.o: alloc.h prime.o: alloc.h
prime.o: banned.h prime.o: banned.h
@@ -5145,6 +5236,7 @@ prime.o: longbits.h
prime.o: prime.c prime.o: prime.c
prime.o: prime.h prime.o: prime.h
prime.o: qmath.h prime.o: qmath.h
prime.o: version.h
prime.o: zmath.h prime.o: zmath.h
qfunc.o: alloc.h qfunc.o: alloc.h
qfunc.o: attribute.h qfunc.o: attribute.h
@@ -5170,6 +5262,7 @@ qfunc.o: nametype.h
qfunc.o: prime.h qfunc.o: prime.h
qfunc.o: qfunc.c qfunc.o: qfunc.c
qfunc.o: qmath.h qfunc.o: qmath.h
qfunc.o: version.h
qfunc.o: zmath.h qfunc.o: zmath.h
qio.o: alloc.h qio.o: alloc.h
qio.o: args.h qio.o: args.h
@@ -5196,6 +5289,7 @@ qio.o: longbits.h
qio.o: nametype.h qio.o: nametype.h
qio.o: qio.c qio.o: qio.c
qio.o: qmath.h qio.o: qmath.h
qio.o: version.h
qio.o: zmath.h qio.o: zmath.h
qmath.o: alloc.h qmath.o: alloc.h
qmath.o: attribute.h qmath.o: attribute.h
@@ -5220,6 +5314,7 @@ qmath.o: longbits.h
qmath.o: nametype.h qmath.o: nametype.h
qmath.o: qmath.c qmath.o: qmath.c
qmath.o: qmath.h qmath.o: qmath.h
qmath.o: version.h
qmath.o: zmath.h qmath.o: zmath.h
qmod.o: alloc.h qmod.o: alloc.h
qmod.o: attribute.h qmod.o: attribute.h
@@ -5244,6 +5339,7 @@ qmod.o: longbits.h
qmod.o: nametype.h qmod.o: nametype.h
qmod.o: qmath.h qmod.o: qmath.h
qmod.o: qmod.c qmod.o: qmod.c
qmod.o: version.h
qmod.o: zmath.h qmod.o: zmath.h
qtrans.o: alloc.h qtrans.o: alloc.h
qtrans.o: attribute.h qtrans.o: attribute.h
@@ -5268,6 +5364,7 @@ qtrans.o: longbits.h
qtrans.o: nametype.h qtrans.o: nametype.h
qtrans.o: qmath.h qtrans.o: qmath.h
qtrans.o: qtrans.c qtrans.o: qtrans.c
qtrans.o: version.h
qtrans.o: zmath.h qtrans.o: zmath.h
quickhash.o: alloc.h quickhash.o: alloc.h
quickhash.o: attribute.h quickhash.o: attribute.h
@@ -5298,6 +5395,7 @@ quickhash.o: quickhash.c
quickhash.o: sha1.h quickhash.o: sha1.h
quickhash.o: str.h quickhash.o: str.h
quickhash.o: value.h quickhash.o: value.h
quickhash.o: version.h
quickhash.o: zmath.h quickhash.o: zmath.h
quickhash.o: zrand.h quickhash.o: zrand.h
quickhash.o: zrandom.h quickhash.o: zrandom.h
@@ -5332,6 +5430,7 @@ sample_many.o: sample_many.c
sample_many.o: sha1.h sample_many.o: sha1.h
sample_many.o: str.h sample_many.o: str.h
sample_many.o: value.h sample_many.o: value.h
sample_many.o: version.h
sample_many.o: zmath.h sample_many.o: zmath.h
sample_many.o: zrandom.h sample_many.o: zrandom.h
sample_rand.o: alloc.h sample_rand.o: alloc.h
@@ -5365,6 +5464,7 @@ sample_rand.o: sample_rand.c
sample_rand.o: sha1.h sample_rand.o: sha1.h
sample_rand.o: str.h sample_rand.o: str.h
sample_rand.o: value.h sample_rand.o: value.h
sample_rand.o: version.h
sample_rand.o: zmath.h sample_rand.o: zmath.h
sample_rand.o: zrandom.h sample_rand.o: zrandom.h
seed.o: alloc.h seed.o: alloc.h
@@ -5401,6 +5501,7 @@ seed.o: have_ustat.h
seed.o: longbits.h seed.o: longbits.h
seed.o: qmath.h seed.o: qmath.h
seed.o: seed.c seed.o: seed.c
seed.o: version.h
seed.o: zmath.h seed.o: zmath.h
sha1.o: align32.h sha1.o: align32.h
sha1.o: alloc.h sha1.o: alloc.h
@@ -5432,6 +5533,7 @@ sha1.o: sha1.c
sha1.o: sha1.h sha1.o: sha1.h
sha1.o: str.h sha1.o: str.h
sha1.o: value.h sha1.o: value.h
sha1.o: version.h
sha1.o: zmath.h sha1.o: zmath.h
size.o: alloc.h size.o: alloc.h
size.o: attribute.h size.o: attribute.h
@@ -5462,6 +5564,7 @@ size.o: sha1.h
size.o: size.c size.o: size.c
size.o: str.h size.o: str.h
size.o: value.h size.o: value.h
size.o: version.h
size.o: zmath.h size.o: zmath.h
size.o: zrand.h size.o: zrand.h
size.o: zrandom.h size.o: zrandom.h
@@ -5498,6 +5601,7 @@ str.o: str.c
str.o: str.h str.o: str.h
str.o: strl.h str.o: strl.h
str.o: value.h str.o: value.h
str.o: version.h
str.o: zmath.h str.o: zmath.h
strl.o: alloc.h strl.o: alloc.h
strl.o: banned.h strl.o: banned.h
@@ -5546,6 +5650,7 @@ symbol.o: symbol.c
symbol.o: symbol.h symbol.o: symbol.h
symbol.o: token.h symbol.o: token.h
symbol.o: value.h symbol.o: value.h
symbol.o: version.h
symbol.o: zmath.h symbol.o: zmath.h
token.o: alloc.h token.o: alloc.h
token.o: args.h token.o: args.h
@@ -5580,6 +5685,7 @@ token.o: str.h
token.o: token.c token.o: token.c
token.o: token.h token.o: token.h
token.o: value.h token.o: value.h
token.o: version.h
token.o: zmath.h token.o: zmath.h
value.o: alloc.h value.o: alloc.h
value.o: attribute.h value.o: attribute.h
@@ -5617,6 +5723,7 @@ value.o: str.h
value.o: symbol.h value.o: symbol.h
value.o: value.c value.o: value.c
value.o: value.h value.o: value.h
value.o: version.h
value.o: zmath.h value.o: zmath.h
value.o: zrand.h value.o: zrand.h
value.o: zrandom.h value.o: zrandom.h
@@ -5654,6 +5761,7 @@ version.o: str.h
version.o: strl.h version.o: strl.h
version.o: value.h version.o: value.h
version.o: version.c version.o: version.c
version.o: version.h
version.o: zmath.h version.o: zmath.h
zfunc.o: alloc.h zfunc.o: alloc.h
zfunc.o: attribute.h zfunc.o: attribute.h
@@ -5674,6 +5782,7 @@ zfunc.o: have_stdbool.h
zfunc.o: have_stdlib.h zfunc.o: have_stdlib.h
zfunc.o: have_string.h zfunc.o: have_string.h
zfunc.o: longbits.h zfunc.o: longbits.h
zfunc.o: version.h
zfunc.o: zfunc.c zfunc.o: zfunc.c
zfunc.o: zmath.h zfunc.o: zmath.h
zio.o: alloc.h zio.o: alloc.h
@@ -5699,6 +5808,7 @@ zio.o: have_string.h
zio.o: longbits.h zio.o: longbits.h
zio.o: nametype.h zio.o: nametype.h
zio.o: qmath.h zio.o: qmath.h
zio.o: version.h
zio.o: zio.c zio.o: zio.c
zio.o: zmath.h zio.o: zmath.h
zmath.o: alloc.h zmath.o: alloc.h
@@ -5713,6 +5823,7 @@ zmath.o: errsym.h
zmath.o: errtbl.h zmath.o: errtbl.h
zmath.o: have_ban_pragma.h zmath.o: have_ban_pragma.h
zmath.o: have_const.h zmath.o: have_const.h
zmath.o: have_inttypes.h
zmath.o: have_limits.h zmath.o: have_limits.h
zmath.o: have_memmv.h zmath.o: have_memmv.h
zmath.o: have_newstr.h zmath.o: have_newstr.h
@@ -5723,6 +5834,7 @@ zmath.o: have_string.h
zmath.o: int.h zmath.o: int.h
zmath.o: longbits.h zmath.o: longbits.h
zmath.o: status.chk_c.h zmath.o: status.chk_c.h
zmath.o: version.h
zmath.o: zmath.c zmath.o: zmath.c
zmath.o: zmath.h zmath.o: zmath.h
zmod.o: alloc.h zmod.o: alloc.h
@@ -5747,6 +5859,7 @@ zmod.o: have_string.h
zmod.o: longbits.h zmod.o: longbits.h
zmod.o: nametype.h zmod.o: nametype.h
zmod.o: qmath.h zmod.o: qmath.h
zmod.o: version.h
zmod.o: zmath.h zmod.o: zmath.h
zmod.o: zmod.c zmod.o: zmod.c
zmul.o: alloc.h zmul.o: alloc.h
@@ -5771,6 +5884,7 @@ zmul.o: have_string.h
zmul.o: longbits.h zmul.o: longbits.h
zmul.o: nametype.h zmul.o: nametype.h
zmul.o: qmath.h zmul.o: qmath.h
zmul.o: version.h
zmul.o: zmath.h zmul.o: zmath.h
zmul.o: zmul.c zmul.o: zmul.c
zprime.o: alloc.h zprime.o: alloc.h
@@ -5803,6 +5917,7 @@ zprime.o: qmath.h
zprime.o: sha1.h zprime.o: sha1.h
zprime.o: str.h zprime.o: str.h
zprime.o: value.h zprime.o: value.h
zprime.o: version.h
zprime.o: zmath.h zprime.o: zmath.h
zprime.o: zprime.c zprime.o: zprime.c
zprime.o: zrand.h zprime.o: zrand.h
@@ -5835,6 +5950,7 @@ zrand.o: qmath.h
zrand.o: sha1.h zrand.o: sha1.h
zrand.o: str.h zrand.o: str.h
zrand.o: value.h zrand.o: value.h
zrand.o: version.h
zrand.o: zmath.h zrand.o: zmath.h
zrand.o: zrand.c zrand.o: zrand.c
zrand.o: zrand.h zrand.o: zrand.h
@@ -5867,6 +5983,7 @@ zrandom.o: qmath.h
zrandom.o: sha1.h zrandom.o: sha1.h
zrandom.o: str.h zrandom.o: str.h
zrandom.o: value.h zrandom.o: value.h
zrandom.o: version.h
zrandom.o: zmath.h zrandom.o: zmath.h
zrandom.o: zrandom.c zrandom.o: zrandom.c
zrandom.o: zrandom.h zrandom.o: zrandom.h

View File

@@ -852,12 +852,21 @@ endif # ($(target),Darwin)
# BINDIR= /usr/bin # BINDIR= /usr/bin
# LIBDIR= /usr/lib # LIBDIR= /usr/lib
# CALC_SHAREDIR= /usr/share/calc # 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: # However, if you are on macOS then set:
# #
# BINDIR= ${PREFIX}/bin # BINDIR= ${PREFIX}/bin
# LIBDIR= ${PREFIX}/lib # LIBDIR= ${PREFIX}/lib
# CALC_SHAREDIR= ${PREFIX}/share/calc # CALC_SHAREDIR= ${PREFIX}/share/calc
# CALC_INCDIR= ${PREFIX}/include/calc
# #
# NOTE: Starting with macOS El Capitan OS X 10.11, root by default # NOTE: Starting with macOS El Capitan OS X 10.11, root by default
# could not mkdir under system locations, so macOS must now # 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 # The calc version in the form of x.y.z.w
# #
VERSION= 2.15.0.0 VERSION= 2.15.0.1
# The calc major version in the form of x.y.z # The calc major version in the form of x.y.z
# #

View File

@@ -49,6 +49,17 @@
# Comments start with a #-character. # # Comments start with a #-character. #
################################################################### ###################################################################
####
#
# Force calc to install under /usr/local
#
# BINDIR:= /usr/local/bin
# LIBDIR:= /usr/local/lib
# CALC_SHAREDIR:= /usr/local/share/calc
# CALC_INCDIR:= /usr/local/include/calc
#
####
#### ####
# RHEL Diagnosing memory, thread, and crash issues: # RHEL Diagnosing memory, thread, and crash issues:
# #

View File

@@ -159,10 +159,11 @@ DISTLIST= ${CALC_FILES} ${MAKE_FILE}
# These files are used to make (but not built) a calc .a link library # These files are used to make (but not built) a calc .a link library
# #
CALCLIBLIST= CALCLIBLIST=
#
# rules that are not also names of files # 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 # # additional Makefile targets #
############################### ###############################
.PHONY: ${PHONY}
# used by the upper level Makefile to determine of we have done all # used by the upper level Makefile to determine of we have done all
# #
.all: .all:
${RM} -f .all ${RM} -f .all
${TOUCH} .all ${TOUCH} .all
.PHONY: ${PHONY}
## ##
# #
# File list generation. You can ignore this section. # File list generation. You can ignore this section.
@@ -210,6 +211,13 @@ distlist: ${DISTLIST}
fi; \ fi; \
done 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: distdir:
${Q} echo cal ${Q} echo cal

243
chk_tree Executable file
View File

@@ -0,0 +1,243 @@
#!/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)
# 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)
# 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=11
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=12
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)
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)
# 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=13
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)
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=14
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.
#
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 '*.out' ! -name '?' |
sed -e 's/^\.\///' | sort -u)
# 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=15
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"

View File

@@ -142,6 +142,12 @@ DISTLIST= ${SCRIPT_SRC} ${MAKE_FILE} README.src
# #
CALCLIBLIST= 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 # complete list of targets
# #
# NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable # NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable
@@ -149,10 +155,11 @@ CALCLIBLIST=
# #
CSCRIPT_TARGETS= ${SCRIPT} CSCRIPT_TARGETS= ${SCRIPT}
TARGETS= ${CSCRIPT_TARGETS} README TARGETS= ${CSCRIPT_TARGETS} README
#
# rules that are not also names of files # 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; \ fi; \
done | LANG=C ${SORT} 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: distdir:
${Q} echo cscript ${Q} echo cscript

View File

@@ -215,10 +215,23 @@ CALC_DYNAMIC_LIBCUSTCALC= libcustcalc${LIB_EXT_VERSION}
# #
CALC_STATIC_LIBCUSTCALC= libcustcalc.a 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 # complete list of targets
# #
TARGETS= ${BLD_TYPE} 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 # # 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 # # additional Makefile targets #
############################### ###############################
.PHONY: ${PHONY}
calc-dynamic-only: ${CUSTCALC_OBJ} ${CALC_DYNAMIC_LIBCUSTCALC} calc-dynamic-only: ${CUSTCALC_OBJ} ${CALC_DYNAMIC_LIBCUSTCALC}
calc-static-only: ${CUSTCALC_OBJ} ${CALC_STATIC_LIBCUSTCALC} calc-static-only: ${CUSTCALC_OBJ} ${CALC_STATIC_LIBCUSTCALC}
@@ -295,6 +310,13 @@ distlist: ${DISTLIST}
fi; \ fi; \
done 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: distdir:
${Q} echo custom ${Q} echo custom

View File

@@ -855,7 +855,7 @@ is_e_digits(CONST char *errsym)
* check for only digits remaining * check for only digits remaining
*/ */
for (p = errsym+2; *p != '\0'; ++p) { for (p = errsym+2; *p != '\0'; ++p) {
if (!isascii(*p) || !isdigit(*p)) { if (!isascii((int)*p) || !isdigit((int)*p)) {
return false; return false;
} }
} }
@@ -1090,7 +1090,7 @@ is_e_1string(CONST char *errsym)
* must match regular expression: ^E_[A-Z][A-Z0-9_]+$ * must match regular expression: ^E_[A-Z][A-Z0-9_]+$
*/ */
for (p = errsym+3; *p != '\0'; ++p) { 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; return false;
} }
} }
@@ -2183,8 +2183,8 @@ print_errsym(void)
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
extern char *optarg; /* argv index of the next arg */ EXTERN char *optarg; /* argv index of the next arg */
extern int optind; /* 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 e_flag = 0; /* 1 ==> -e flag was used */
int d_flag = 0; /* 1 ==> -s flag was used */ int d_flag = 0; /* 1 ==> -s flag was used */
int i; int i;

10
func.c
View File

@@ -2577,7 +2577,7 @@ f_logn(int count, VALUE **vals)
if (p_cval == NULL) { if (p_cval == NULL) {
return error_value(E_LOGN_3); return error_value(E_LOGN_3);
} }
/* check if division is COMPLEX or NUMBER */ /* check for COMPLEX or NUMBER division */
if (cisreal(p_cval)) { if (cisreal(p_cval)) {
/* ln(x) / ln(n) was NUMBER, not COMPLEX */ /* ln(x) / ln(n) was NUMBER, not COMPLEX */
result.v_num = c_to_q(p_cval, true); result.v_num = c_to_q(p_cval, true);
@@ -2597,7 +2597,7 @@ f_logn(int count, VALUE **vals)
if (p_cval == NULL) { if (p_cval == NULL) {
return error_value(E_LOGN_3); return error_value(E_LOGN_3);
} }
/* check if division is COMPLEX or NUMBER */ /* check for COMPLEX or NUMBER division */
if (cisreal(p_cval)) { if (cisreal(p_cval)) {
/* ln(x) / ln(n) was NUMBER, not COMPLEX */ /* ln(x) / ln(n) was NUMBER, not COMPLEX */
result.v_num = c_to_q(p_cval, true); result.v_num = c_to_q(p_cval, true);
@@ -2623,13 +2623,13 @@ f_logn(int count, VALUE **vals)
if (p_cval == NULL) { if (p_cval == NULL) {
return error_value(E_LOGN_3); return error_value(E_LOGN_3);
} }
/* check if division is COMPLEX or NUMBER */ /* check for COMPLEX or NUMBER division */
if (cisreal(p_cval)) { if (cisreal(p_cval)) {
/* ln(x) / ln(n) was NUMBER, not COMPLEX */ /* ln(x) / ln(n) was NUMBER, not COMPLEX */
result.v_num = c_to_q(p_cval, true); result.v_num = c_to_q(p_cval, true);
result.v_type = V_NUM; result.v_type = V_NUM;
} else { } else {
/* ln(x) / ln(n) is COMPLEX */ /* ln(x) / ln(n) is COMPLEX result */
result.v_type = V_COM; result.v_type = V_COM;
result.v_com = p_cval; result.v_com = p_cval;
} }
@@ -2643,7 +2643,7 @@ f_logn(int count, VALUE **vals)
if (result.v_com == NULL) { if (result.v_com == NULL) {
return error_value(E_LOGN_3); return error_value(E_LOGN_3);
} }
/* ln(x) / ln(n) is NUMBER */ /* ln(x) / ln(n) is NUMBER result */
result.v_type = V_NUM; result.v_type = V_NUM;
} }
} }

View File

@@ -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 # These files are used to make (but not built) a calc .a link library
# #
CALCLIBLIST= 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 # 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 # # additional Makefile targets #
############################### ###############################
.PHONY: ${PHONY}
# used by the upper level Makefile to determine of we have done all # 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 # 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 ${RM} -f .all
${TOUCH} .all ${TOUCH} .all
.PHONY: ${PHONY}
bindings: ../cal/bindings bindings: ../cal/bindings
${RM} -f $@ ${RM} -f $@
${CP} ../cal/bindings $@ ${CP} ../cal/bindings $@
@@ -619,6 +627,13 @@ distlist: ${DISTLIST}
fi; \ fi; \
done | fgrep -v '.bak' | LANG=C ${SORT} 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: distdir:
${Q} echo help ${Q} echo help

View File

@@ -53,7 +53,7 @@ LEADING_SPACES_BEFORE_TAB=$(
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \ -path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \ -name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
-name 'sample_many-static' -o -name 'sample_rand-static' -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' \
\) -prune -o -type f -print0 | \ \) -prune -o -type f -print0 | \
xargs -0 egrep -l '^ * * ' xargs -0 egrep -l '^ * * '
) )
@@ -84,7 +84,7 @@ TRAILING_WHITESPACE=$(
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \ -path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \ -name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
-name 'sample_many-static' -o -name 'sample_rand-static' -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' \
\) -prune -o -type f -print0 | \ \) -prune -o -type f -print0 | \
xargs -0 egrep -l '[ ]$' xargs -0 egrep -l '[ ]$'
) )
@@ -154,7 +154,7 @@ PICKY_PHASE_1=$(
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \ -path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \ -name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
-name 'sample_many-static' -o -name 'sample_rand-static' -o \ -name 'sample_many-static' -o -name 'sample_rand-static' -o \
-name 'codeql-analysis.yml' -o -name tags -o -name debug.out -o \ -name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
-name '.gitignore' -o -name 'README.md' -o -name '.lldbinit' \ -name '.gitignore' -o -name 'README.md' -o -name '.lldbinit' \
\) -prune -o -type f -print0 | \ \) -prune -o -type f -print0 | \
if [[ -x /usr/local/bin/picky ]]; then if [[ -x /usr/local/bin/picky ]]; then

View File

@@ -180,6 +180,8 @@ fi
echo echo
echo "calc $(./ver_calc) release" echo "calc $(./ver_calc) release"
echo echo
echo 'calc-*'$(./ver_calc)'*'
echo
echo "Release v$(./ver_calc)" echo "Release v$(./ver_calc)"
# All Done!!! -- Jessica Noll, Age 2 # All Done!!! -- Jessica Noll, Age 2

View File

@@ -64,7 +64,7 @@
#define MAJOR_VER 2 /* level 1: major library version */ #define MAJOR_VER 2 /* level 1: major library version */
#define MINOR_VER 15 /* level 2: minor library version */ #define MINOR_VER 15 /* level 2: minor library version */
#define MAJOR_PATCH 0 /* level 3: major software version level */ #define MAJOR_PATCH 0 /* level 3: major software version level */
#define MINOR_PATCH 0 /* level 4: minor software version level */ #define MINOR_PATCH 1 /* level 4: minor software version level */
#endif /* !INCLUDE_VERSION_H*/ #endif /* !INCLUDE_VERSION_H*/