Commit Graph

149 Commits

Author SHA1 Message Date
Landon Curt Noll
a6824debbc improved calc computation error codes message array
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.

Updated .gitignore and trailblank to support the above changes.
2023-09-13 02:45:33 -07:00
Landon Curt Noll
999ad61a78 fix bool.h dependency on have_stdbool.h, make depend 2023-08-21 03:51:28 -07:00
Landon Curt Noll
3c18e6e25b changed C source to use C booleans with backward compatibility
Fix "Under source code control" date for new version.h file.

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.

The sign in a ZVALUE is now of type SIGN, whcih is either
SB32 when CALC2_COMPAT is defined, or a bool.

Replaced in C source, TRUE with true, FALSE with false, and
BOOL with bool.
2023-08-19 19:20:32 -07:00
Landon Curt Noll
91c0c99a2c add CALC2_COMPAT and version.h
Moved calc version definition from version.c to version.h.
Added CALC2_COMPAT, that when defined attempts to maintain calc
version 2 compatibility.  When MAJOR_VER <= 2, CALC2_COMPAT is
defined.  This is anticipation for a future calc version 3 code.
2023-08-19 17:32:42 -07:00
Landon Curt Noll
f097dd7dc1 update calc rpm to relase 14
Sort .gitignore.  Add calc.spec to .gitignore.

Update format of header part of Makefiles.

Modify calc.spec.in to handle dynamic shared libraries with 3-digit
version numbers.
2023-08-14 22:39:40 -07:00
Landon Curt Noll
92c8d89ed1 cleanup Makefile comments 2023-08-14 05:02:48 -07:00
Landon Curt Noll
6ee34e709d fix calc when CUSTOM is undefined, remove PASSDOWN values
Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN},
${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile
include files keep Makefile variables in sync.

Fixed the ability of calc to compile when CUSTOM is undefined
(i.e., -UCUSTOM).  The libcustcalc is always built, regardless
of the $(ALLOW_CUSTOM} Makefile variable.  However when CUSTOM
is undefined, the bulk of custom functions are not defined.
2023-08-14 01:26:52 -07:00
Landon Curt Noll
21ab25d1c9 add Makefile.config, change all Makefile includes
Moved makefile variables that configure calc and configure how to
compile calc from Makefile into a new Makefile.config file.

The Makeifle includes the Makefile.config file.
The cal/Makeifle includes the Makefile.config file.
The cscript/Makeifle includes the Makefile.config file.
The custom/Makeifle includes the Makefile.config file.
The help/Makeifle includes the Makefile.config file.

Now, the Makefile.config file will consistently configure
calc and how calc is compiled and built by all calc Makefiles.

The platform target section from the old Makefile has been moved to
a new file, Makefile.target.  The custom/Makefile no longer includes
Makefile.

The Makeifle includes the Makefile.target file.
The cal/Makeifle includes the Makefile.target file.
The cscript/Makeifle includes the Makefile.target file.
The custom/Makeifle includes the Makefile.target file.
The help/Makeifle includes the Makefile.target file.

Now, the Makefile.target file will consistently set
target information for all calc Makefiles.

The cal/Makeifle includes the Makefile.local file.
The cscript/Makeifle includes the Makefile.local file.
The custom/Makeifle includes the Makefile.local file.
The help/Makeifle includes the Makefile.local file.

Thus, one may modify or append many Makefile variables
in all calc Makefiles.
2023-08-13 23:40:33 -07:00
Landon Curt Noll
06dcb3e51e Release v2.14.3.1
IMPORTANT: This is just a test release.  Please do not use.
2023-08-13 21:09:51 -07:00
Landon Curt Noll
f416973a31 remove Makefile.simple and add Makefile.target
Dropped support of Makefile.simple and custom/Makefile.simple.
The calc version 2.14.3.0 is the last release that supported
the Makefile.simple and custom/Makefile.simple files.
Now, a make that supports makefile conditional syntax is required.

The platform target section from the old Makefile has been moved
to a new file, Makefile.target.  The Makefile.target is shared
by both Makefile and custom/Makefile.  The custom/Makefile no
longer includes Makefile (instead it includes ../Makefile.target).
2023-08-13 20:48:06 -07:00
Landon Curt Noll
b408b59d8d checkpoint on ALLOW_CUSTOM use
Updated comments in Makefile.local for how to Diagnosing memory,
thread, and crash issues under RHEL and macOS.

We no longer support the Makefile variable ${ALLOW_CUSTOM} to be empty.
Normally ${ALLOW_CUSTOM} is:

    ALLOW_CUSTOM= -DCUSTOM

Now, to disable custom disable custom even if -C is given, use:

    ALLOW_CUSTOM="-UCUSTOM"

Added comments in Makefile.local for how to reduce dependency chains
under macOS.  XXX - this doesn't yet work so don't uncomment - XXX.
2023-08-13 16:17:10 -07:00
Landon Curt Noll
e2686911ae Release v2.14.3.0
The following are the changes in this release:

    Updated COPYING to include the actual text of "The Unlicense".
    Made minor formatting changes to the file.

    The Darwin specific ${DARWIN_ARCH}, thay by default was unset,
    is now the ${ARCH_CFLAGS} Makefile variable.  Comments about
    various "-arch name" have been moved to the ${ARCH_CFLAGS} area.

    For old Apple Power PC systems, the following is added:

	COMMON_CFLAGS+= -std=gnu99
	COMMON_LDFLAGS+= -std=gnu99
	ARCH_CFLAGS+= -arch ppc

    Old Apple Power PC systems should be detected by the
    "uname -p" command returning "powerpc".  One may force the
    Power PC mode by adding to the end of any make command:

	make ...make_args... target=Darwin arch=powerpc

    or by adding the following in the Makefile.local file:

	target= Darwin
	arch= powerpc

    Improved the output of the calcinfo rule by adding echos
    of various uname values as well as some top Makefile variables.

    Fixed the BUGS file with respect to using `make debug`.

    Added a final ls of `debug.out` for `make debug`.
2023-08-02 16:09:00 -07:00
Landon Curt Noll
b03e71f0ce Release v2.14.2.2
The following are the changes in this release:

    Removed references to obsolete Email addresses.

    macOS Darwin defaults LCC to "cc".
2023-07-28 21:33:59 -07:00
Landon Curt Noll
80e841eded Release v2.14.2.1
The following are the changes in this release:

    Added cal/fnv_tool.cal, a calc resource file defining:

	find_fnv_prime(bits)
	deprecated_fnv0(bits,fnv_prime,string)
	fnv_offset_basis(bits,fnv_prime)
	fnv1a_style_hash(bits,fnv_prime,prev_hash,string)

    Fixed sorted order of cal/README.
2023-07-25 23:09:39 -07:00
Landon Curt Noll
3ec7b39366 Release v2.14.2.0
The following are the changes in this release:

    Ported calc to the s390x IBM Mainframe running RHEL9.1.

    Added cal/splitbits.cal:

	splitbits(x, b)

	Given an integer x, split the value into a list of integers,
	each of which is at most b bits long.

	The value b must be an integer > 0.

	The number of elements in the returned list is:

	    ceil((highbit(x) + 1) / b)

	If x == 0, then a list of 1 element containing 0 is returned.

	If x < 0, then the two's compliment of abs(x) is returned.
	Even though calc represents negative integers as positive values
	with sign bit, the bits returned by this function are as if
	the integer converted as if the integer was a two's compliment value.

	See also the help command:

	    ; help resource
2023-07-21 23:22:20 -07:00
Landon Curt Noll
bd64a6cc36 Release v2.14.1.6
The following are the changes in this release:

    Fixed version numbers in two cases in CHANGES that referred
    to the 2.14.2.x instead of 2.14.1.x.

    Rename MINGW Makefile variable (a holdover from MINGW32_NT-5.0)
    to OSNAME.

    Fixed FUNCPTR typedef in hist.c to fix deprecated compiler warnings.

    Fixed when USE_READLINE, READLINE_LIB, READLINE_EXTRAS, and
    READLINE_INCLUDE are set to empty (disable use of the GNU-readline
    facility).

    Fix cases of spaces before tabs in Makefile and Makefile.simple.

    Fixed obsolete references to the atoz() in LIBRARY to use the
    correct internal function name of str2z().

    Fixed obsolete references to the atoq() in LIBRARY to use the
    correct internal function name of str2q().

    Document in help/unexpected that * operator has has a higher
    precedence than << in calc, which differs from C.  Thanks
    goes to GitHub user @inguin for pointing put this difference.
2023-05-31 18:55:56 -07:00
Landon Curt Noll
5fa732b869 Release v2.14.1.5
The following are the changes in this release:

    Fixed version numbers in two cases in CHANGES that referred
    to the 2.14.2.x instead of 2.14.1.x.

    Rename MINGW Makefile variable (a holdover from MINGW32_NT-5.0)
    to OSNAME.

    Fixed FUNCPTR typedef in hist.c to fix deprecated compiler warnings.

    Fixed when USE_READLINE, READLINE_LIB, READLINE_EXTRAS, and
    READLINE_INCLUDE are set to empty (disable use of the GNU-readline
    facility).

    Fix cases of spaces before tabs in Makefile and Makefile.simple.
2023-03-12 20:52:45 -07:00
Landon Curt Noll
75159fcbc2 Release v2.14.1.4
The following are the changes in this release:

    Updated COPYING file to indicate that these files are now
    covered under "The Unlicense" (see https://unlicense.org):

	    sha1.c
	    sha1.h
	    cal/dotest.cal
	    cal/screen.cal

    Updated help/credit to match the above changes to COPYING.

    Updated CONTRIB-CODE and calc.man to refer to using GitHub pull requests
    for contributing to calc (instead of using Email).

    Updated BUGS and calc.man to refer to using GitHub issues
    for reporting calc bugs (instead of using Email).

    Updated QUESTIONS and calc.man to refer to using GitHub issues
    for asking calc questions (instead of using Email).

    Fixed Makefile.local command example to refer to overriding the
    Makefile variable DEBUG (instead of CDEBUG).

    Fixed all make chk ASAN warnings under macOS 13.2.1 when calc is compiled
    with the following uncommented lines in Makefile.local:

	DEBUG:= -O0 -g
	CFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
	LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
	CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1

    Improved how pointers to functions are declared for the builtins
    array in func.c to avoid function declarations without a prototype
    that is now deprecated in C.

    Improved how pointers to functions are declared for the opcodes
    array in opcodes.c to avoid function declarations without a prototype

    Replaced use of egrep with grep -E in Makefiles.

    Fixed cases where variables were set but not used in symbol.c, calc.c,
    and the main function in func.c as used by funclist.c.

    Added rule name to "DO NOT EDIT -- generated by the Makefile" lines
    in constructed files.

    Test if <sys/vfs.h> exists and set HAVE_SYS_VFS_H accordingly
    in have_sys_vfs.h.  Added HAVE_SYS_VFS_H to allow one to force
    this value.

    Test if <sys/param.h> exists and set HAVE_SYS_PARAM_H accordingly
    in have_sys_param.h.  Added HAVE_SYS_PARAM_H to allow one to force
    this value.

    Test if <sys/mount.h> exists and set HAVE_SYS_MOUNT_H accordingly
    in have_sys_mount.h.  Added HAVE_SYS_MOUNT_H to allow one to force
    this value.

    Test if the system as the statfs() system call and set HAVE_STATFS
    accordingly in have_statfs.h.  Added HAVE_STATFS to allow one
    to force this value.

    The pseudo_seed() function will also try to call statfs() if
    possible and permitted by the HAVE_STATFS value.

    Test if makedepend command is available before trying to build
    the Makefile dependency list via "make depend".
2023-03-06 03:45:03 -08:00
Landon Curt Noll
8ef7b5311e fix make depend 2023-03-06 03:39:40 -08:00
Landon Curt Noll
d89ea78104 prep for calc version 2.14.1.4
Updated COPYING file to indicate that these files are now
covered under "The Unlicense" (see https://unlicense.org):

	sha1.c
	sha1.h
	cal/dotest.cal
	cal/screen.cal

Updated help/credit to match the above changes to COPYING.

Updated CONTRIB-CODE and calc.man to refer to using GitHub pull requests
for contributing to calc (instead of using Email).

Updated BUGS and calc.man to refer to using GitHub issues
for reporting calc bugs (instead of using Email).

Updated QUESTIONS and calc.man to refer to using GitHub issues
for asking calc questions (instead of using Email).

Fixed Makefile.local command example to refer to overriding the
Makefile variable DEBUG (instead of CDEBUG).

Fixed all make chk ASAN warnings under macOS 13.2.1 when calc is compiled
with the following uncommented lines in Makefile.local:

    DEBUG:= -O0 -g
    CFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
    LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
    CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1

Improved how pointers to functions are declared for the builtins
array in func.c to avoid function declarations without a prototype
that is now deprecated in C.

Improved how pointers to functions are declared for the opcodes
array in opcodes.c to avoid function declarations without a prototype

Replaced use of egrep with grep -E in Makefiles.

Fixed cases where variables were set but not used in symbol.c, calc.c,
and the main function in func.c as used by funclist.c.

Added rule name to "DO NOT EDIT -- generated by the Makefile" lines
in constructed files.

Test if <sys/vfs.h> exists and set HAVE_SYS_VFS_H accordingly
in have_sys_vfs.h.  Added HAVE_SYS_VFS_H to allow one to force
this value.

Test if <sys/param.h> exists and set HAVE_SYS_PARAM_H accordingly
in have_sys_param.h.  Added HAVE_SYS_PARAM_H to allow one to force
this value.

Test if <sys/mount.h> exists and set HAVE_SYS_MOUNT_H accordingly
in have_sys_mount.h.  Added HAVE_SYS_MOUNT_H to allow one to force
this value.

Test if the system as the statfs() system call and set HAVE_STATFS
accordingly in have_statfs.h.  Added HAVE_STATFS to allow one
to force this value.

The pseudo_seed() function will also try to call statfs() if
possible and permitted by the HAVE_STATFS value.
2023-03-06 02:17:40 -08:00
Landon Curt Noll
644b348bcb minor Makefile changes
Changes #! lines in Makefiles to "#!/usr/bin/env make".

Set SHELL in Makefiles to the basename of the shell.
2023-02-16 16:47:01 -08:00
Landon Curt Noll
11ddc30528 Release v2.14.1.3
The following are the changes in this release:

    Fixed missing <string.h include in have_fpos_pos.c.

    Change calc version from 2.14.1.2 to 2.14.2.3 as part of a test to
    build calc RPMs on a reference RHEL8.7 platform (formerly a RHEL7.9
    platform).
2023-02-14 15:49:05 -08:00
Landon Curt Noll
d91ace6091 Release v2.14.1.2
The following are the changes in this release:

    Restored use of the #define FPOS_POS_LEN symbol.  This refers to
    the length of the __pos element (if the __pos element exists),
    the fpos_t type (if that type exists).

    Changed SWAP_HALF_IN_FILEPOS(dest, src) mato to use FILEPOS_LEN Little
    Endian when FILEPOS is a simple scalar type (i.e., HAVE_FILEPOS_SCALAR
    is defined).

    Changed #define HAVE_FPOS to HAVE_FGETSETPOS.

    Corrected comment in have_fpos_pos.h.  The HAVE_FPOS_POS symbol was
    NOT related to fgetpos & fsetpos but rather if we we have an __pos
    element in FILEPOS.

    Changed #define HAVE_NO_FPOS to HAVE_NO_FGETSETPOS.

    Improved comments in have_fpos_pos.h to show why and how
    HAVE_FPOS_POS, FPOS_POS_BITS, and FPOS_POS_LEN were defined or undefed.

    Changed showfiles builtin to print sizes cast to (long int) with
    the "%ld" printf format to avoid implementations that do not support
    the "%lld" printf format specifier.

    Renamed have_fpos.h to have_fgetsetpos.h.  Renamed CALC_HAVE_FPOS_H
    to CALC_HAVE_FGETSETPOS_H.  The make install and the olduninstall
    rules remove the any old have_fpos.h that was previously installed.

    Added swap_HALFs(dest, src, len) function to byteswap.c.

    Calc can now handle Big Engian file position sizes that are a
    multiple of BASEB bits in length.  Before handle Big Engian file
    positions could only be 32 and 64 bits in length.  This will allow,
    for example, a Big Engian file position size of 128 (assuming that
    128/BASEB is is an integer).

    Temporary workaround for musl libc systems such as gentoo Linux that
    allows them to compile calc and successfully run the regression test.
2022-11-29 13:10:33 -08:00
Landon Curt Noll
25dcd8cb80 Release v2.14.1.1
The following are the changes in this release:

    Added a few remarks on calc version numbers to version.c.

    Fixed how fposval.h is built.  On a number of systems, the fposval.c
    file failed to compile incorrectly.  This caused problems for systems in
    which fposval.h.def was not correct.

    Fixed how have_memmv.h is built.  On a number of systems, the have_memmv.c
    file failed to compile incorrectly, producing a potentially incorrect
    have_memmv.h file for such systems.

    Fixed how align32.h is built.  On a number of systems, the align32.c
    file failed to compile incorrectly, producing a potentially incorrect
    align32.h file for such systems.

    Fixed how have_newstr.h is built.  On a number of systems, the have_newstr.c
    failed to compile incorrectly, producing a potentially incorrect
    have_newstr.h file for such systems.

    Fixed how have_strdup.h is built.  On a number of systems, the have_strdup.c
    file failed to compile incorrectly, producing a potentially incorrect
    have_strdup.h file for such systems.

    Fixed how have_strlcat.h is built.  On a number of systems, the have_strlcat.c
    file failed to compile incorrectly, producing a potentially incorrect
    have_strlcat.h file for such systems.

    Fixed how have_strlcpy.h is built.  On a number of systems, the have_strlcpy.c
    file failed to compile incorrectly, producing a potentially incorrect
    have_strlcpy.h file for such systems.

    Fixed how have_uid_t.h is built.  On a number of systems, the have_uid_t.c
    file failed to compile incorrectly, producing a potentially incorrect
    have_uid_t.h file for such systems.

    Fixed how have_uid_t.h is built.  On a number of systems, the have_uid_t.c
    file failed to compile incorrectly, producing a potentially incorrect
    have_uid_t.h file for such systems.
2022-11-27 13:41:32 -08:00
Landon Curt Noll
741ea46853 Release v2.14.1.0
The following are the changes from calc version 2.14.1.0 to date:

    Fixed alignment of show item section of help command.

    Bug fix: While 0^0 == 1, now for y > 0, 0^y == 0.
    Adjusted cal/test8900.cal to reflect this bug fix.
    Added tests to cal/regress.cal to help verify bug fix is fixed.
2022-04-08 00:02:44 -07:00
Landon Curt Noll
80f13a4e45 Changed Makefiles as per make depend 2022-01-22 02:52:02 -08:00
Landon Curt Noll
3f177f2d81 Improved source code flow
Changed /*NOTREACHED*/ to not_reached(); and use "attribute.h".

Added .PHONY rule, just after all rule, to Makefiles.

Fixed an improper indentation issue.
2022-01-22 01:16:07 -08:00
Landon Curt Noll
ee70c12481 Release v2.14.0.14
The following are the changes in this release:

    Fixed typo in Makefile.local comment.

    Established a tagging procedure for a production release.
    Production git tags will be of the form:

	prod-2.x.y.z
2021-12-27 19:10:56 -08:00
Landon Curt Noll
f7dadbf1f8 Improve how Makefiles are formed, updated related doc 2021-12-13 16:54:45 -08:00
Landon Curt Noll
22e123140c Fix to add missing Makefiles to distlist
The output of the distlist rule was used to form the source tarball.
2021-12-13 16:27:37 -08:00
Landon Curt Noll
1242700601 Fix how Makefile.simple and custom/Makefile.simple are formed 2021-12-13 16:11:38 -08:00
Landon Curt Noll
b3c015d338 Release v2.14.0.13
We apologize for the calc v2.14.0.12 source tarball that was missing
critical files.  While the executable was well tested, our release
process was deficient.

We are improved our release process and added tests during the release
procedure to help verify that we are not regressing in to the "v2.14.0.12
source tarball" issue, among other things.

Depending on how things do, you might is several releases come out over
a short period of time.  The core of calc isn't changing, so the calc
executable will be the same as we focus on the Makefiles, our release
procedure, and related documentation / help files.

=-=

The following are the changes in this release:

    Minor tweak to seed() builtin.  Updated help/srand and help/srandom.

    Moved Makefile.ship into Makefile.

    Removed custom/Makefile.head and custom/Makefile.tail.

    The custom/Makefile is now part of source and includes Makefile.
    In particular, custom/Makefile makes use of the 'middle' of
    the new top level Makefile where calc's top level Makefile
    variables are defined.

    Makefile.simple and custom/Makefile.simple are now part of the source
    and are constructed from Makefile and custom/Makefile respectively.
    The Makefile.simple and custom/Makefile.simple avoid using GNU
    conditionals. They may be used with older/classic make commands.

    Makefile.local will include comments about how to better use
    it. Between releases, Makefile.local at the top of the master branch
    will contain how we typically build calc and test calc (FYI: we
    normally enable things such as -Werror -Wextra -pedantic).  When we
    push out a release, Makefile.local will be stripped of non-comment
    lines.  Thus, releases of calc, and, released "calc*.src.rpm"
    files and the source tarballs, will have a Makefile.local with
    only comments.

    The "README.*" files and "HOWTO.INSTALL" file have been updated.

    By default, compiler warnings have been turned up.  The Makefile
    variable ${CCWARN} now defaults to:

	CCWARN= -Wall -Wextra -pedantic

    The previous level of compiler warnings can be easily restored by
    adding to Makefile.local:

	CCWARN:= -Wall

    The readline, history and ncurses libraries are now default.
    The Makefile variables ${USE_READLINE}, ${READLINE_LIB}, and
    ${READLINE_EXTRAS} now default to:

	USE_READLINE= -DUSE_READLINE
	READLINE_LIB= -lreadline
	READLINE_EXTRAS= -lhistory -lncurses

    The previous mode where readline, history and ncurses libraries
    were not compiled in by default can be easily restored by
    adding to Makefile.local:

	USE_READLINE:=
	READLINE_LIB:=
	READLINE_EXTRAS:=

    We have renamed "stable" as "production".
    We have renamed "unstable" as "tested".

    On the web site:

	http://www.isthe.com/chongo/src/calc/

    these files has been renamed:

	2.x.y.z_IS_LATEST_STABLE   ==> 2.x.y.z_IS_LATEST_PRODUCTION
	2.x.y.z_IS_LATEST_UNSTABLE ==> 2.x.y.z_IS_LATEST_TESTED

    The terms 'stable' and 'unstable' were both misleading and
    inaccurate.  For details see the new documention file:

	README.RELEASE

    See also the help command:

	; help release

    Fixed bug impacting how have_ustat.h was formed.

    Updated help/archive to reflect GitHub use.
2021-12-13 14:23:47 -08:00
Landon Curt Noll
862dbd6777 Improve the calc build and release process
We apologize for the calc v2.14.0.12 source tarball that was missing
critical files.  While the executable was well tested, our release
process was deficient.

We are improved our release process and added tests during the release
procedure to help verify that we are not regressing in to the "v2.14.0.12
source tarball" issue, among other things.

Depending on how things do, you might is several releases come out over
a short period of time.  The core of calc isn't changing, so the calc
executable will be the same as we focus on the Makefiles, our release
procedure, and related documentation / help files.

We made several changes to the Makefiles.  We also added a new
README.RELEASE document (see "help release") that is a work in
progress. Along the way we discovered a few things that needed to be
updated in documentation.

See the CHANGES file for details.
2021-12-13 12:17:51 -08:00
Landon Curt Noll
39c0cba1ca Release v2.14.0.12
The following are the changes in this release:

    Fixed a number of typos.

    Drop support for SunOS, IRIX and MINGW32_NT-5.0 targets.
    Drop support for CLOCK_SGI_CYCLE.  Drop testing for __MSDOS__.

    Minor improvement of various help files.  Made format of help
    files more consistent.

    Corrected a few comments in zrandom.c, including a case where
    the comment referred to 1007 when it should have used 2^32.

    Improved seed() generation.  Improved some comments in seed.c.
    Added have_environ.c to build have_environ.h in order to
    determine if:

	extern char **environ;	/* user environment */

    is an valid external symbol.

    Fixed documentation that referred to the old additive 55
    generator.  We have been using the subtractive 100 in place
    of the additive 55 generator for a while now.

    Fixed depend rule for custom/Makefile.

    Fixed how Makefile variable SHELL is set on macOS vs. Linux.
    Using /bin/sh on macOS due to how zsh treats globs by default.

    Added charbit.h to define CALC_CHARBIT which is either CHAR_BIT
    from <limits.h> or 8 or a value set by the Makefile variable
    CALC_CHARBIT.  Added have_limits.h to determine if <limits.h>
    is a system include file.

    Compiling now tests for _WIN64 as well when testing for _WIN32.

    Now assuming that <stdio.h> is available under _WIN32 and _WIN64.

    Added some preliminary notes about attempts to compile calc
    under Windows 11.

	BTW: While we are unable to use Windows 11, we welcome
	     Windows 11 developers to try compiling calc natively
	     (instead of via a Linux virtual machine).  If you are
	     able to compile Windows 11 natively, we would welcome
	     GitHub pull requests showing any needed modifications:

		https://github.com/lcn2/calc/pulls

	     Please also add notes to the 'Compiling calc under Windows 11'
	     section in README.WINDOWS file.

    We added Makefile.simple as part of the master branch source
    to help those who may be using a make tool that does not support
    GNU Make-like features such as "ifeq" and ":=".

    Fixed incorrect ustat_dev member ref in seed() builtin that
    was part of the unreleased calc v2.12.0.11.
2021-12-08 15:52:34 -08:00
Landon Curt Noll
e213cc5072 Release v2.14.0.11
The following are the changes in this release:

    Fixed a number of typos.

    Drop support for SunOS, IRIX and MINGW32_NT-5.0 targets.
    Drop support for CLOCK_SGI_CYCLE.  Drop testing for __MSDOS__.

    Minor improvement of various help files.  Made format of help
    files more consistent.

    Corrected a few comments in zrandom.c, including a case where
    the comment referred to 1007 when it should have used 2^32.

    Improved seed() generation.  Improved some comments in seed.c.
    Added have_environ.c to build have_environ.h in order to
    determine if:

	extern char **environ;	/* user environment */

    is an valid external symbol.

    Fixed documentation that referred to the old additive 55
    generator.  We have been using the subtractive 100 in place
    of the additive 55 generator for a while now.

    Fixed depend rule for custom/Makefile.

    Fixed how Makefile variable SHELL is set on macOS vs. Linux.
    Using /bin/sh on macOS due to how zsh treats globs by default.

    Added charbit.h to define CALC_CHARBIT which is either CHAR_BIT
    from <limits.h> or 8 or a value set by the Makefile variable
    CALC_CHARBIT.  Added have_limits.h to determine if <limits.h>
    is a system include file.

    Compiling now tests for _WIN64 as well when testing for _WIN32.

    Now assuming that <stdio.h> is available under _WIN32 and _WIN64.

    Added some preliminary notes about attempts to compile calc
    under Windows 11.

	BTW: While we are unable to use Windows 11, we welcome
	     Windows 11 developers to try compiling calc natively
	     (instead of via a Linux virtual machine).  If you are
	     able to compile Windows 11 natively, we would welcome
	     GitHub pull requests showing any needed modifications:

		https://github.com/lcn2/calc/pulls

	     Please also add notes to the 'Compiling calc under Windows 11'
	     section in README.WINDOWS file.

    We added Makefile.simple as part of the master branch source
    to help those who may be using a make tool that does not support
    GNU Make-like features such as "ifeq" and ":=".
2021-12-08 15:30:08 -08:00
Landon Curt Noll
e5c8f00adc Ship with Makefile.simple & custom/Makefile.simple 2021-12-08 14:55:23 -08:00
Landon Curt Noll
8db8f93ae0 Change -DWINDOZ to -D_WIN32 for DJGPP 2021-12-08 12:25:16 -08:00
Landon Curt Noll
2023175fcc Change how SHELL is set for all calc Makefiles
Using /bin/sh on macOS due to how zsh treats globs by default.
2021-12-07 04:45:23 -08:00
Landon Curt Noll
faf40b7149 Fixed how SHELL is set in Makefiles, fix make depend on linux 2021-12-07 04:18:39 -08:00
Landon Curt Noll
4b2ae40c86 Fixed make depend on linux 2021-12-07 04:00:36 -08:00
Landon Curt Noll
af57104e25 Fixed depend rule for custom/Makefile 2021-12-07 03:01:46 -08:00
Landon Curt Noll
c3a51f42e2 Drop support for SunOS, IRIX and MINGW32_NT-5.0 targets 2021-12-05 19:02:09 -08:00
Landon Curt Noll
f5c5cea8b0 Correct typos 2021-12-05 18:23:27 -08:00
Landon Curt Noll
769ac51f8c Release v2.14.0.10 2021-12-01 23:38:56 -08:00
Landon Curt Noll
ef00e00328 Remove unnecessary spaces inbetween or next to tabs 2021-12-01 23:25:49 -08:00
Landon Curt Noll
fde724aa2d Release v2.14.0.9
The following are the changes in this release:

    Due to issues with clang and Apple Silicon, ARCH_CFLAGS is now,
    by default, empty:

	ARCH_CFLAGS=

    If you want to use, say, -march=native, then either change
    the Makefile or make with:

	make all ARCH_CFLAGS='-march=native'

    Added arch and hardware as GNU Makefile computed values.
    As with ${target}, ${arch} and ${hardware} is computed by uname:

	target: uname -a
	arch: uname -p
	hardware: uname -m

    Fixed compiling calc on Apple Silicon with homebrew.  On Apple
    Silicon, HomeBrew installs on into a different location.  The
    Makefile checks if ${hardware} is arm64 and adjusts the location
    of libraries such as readline and history accordingly.
2021-11-24 01:35:01 -08:00
Landon Curt Noll
08fe6f13f4 Release v2.14.0.8
The following are the changes in this release:

    Identical to v2.14.0.7: now declared a stable release.
2021-11-23 00:04:09 -08:00
Landon Curt Noll
e11d159c81 Release v2.14.0.7
The following are the changes in this release:

    Fizzbin is a better word. :-)

    The help and man builtin commands now return an error when a
    help file cannot be opened, such as when there is no help file.

    Added palindrome.cal resource file.  For example, to find the
    largest (highly probable) prime palindrome under 280 decimal
    digits (text tweet limit):

	prevprimepal(1e280)
2021-11-07 20:36:07 -08:00
Landon Curt Noll
e0cd9bb3db Release v2.14.0.6
The following are the changes in this release:

    Fixed typo in cal/statistics.cal thanks to a report by <GitHub user
    dennisaldea>.

    Fixed an old Windoz pun in README.WINDOWS as requested by <GitHub
    user marcodegio>.

    Fixed a really obscure bug in the internal initconstants()
    function of const.c that has been sitting for over 31 years!

	We are amazed that nobody has encountered this bug before
	now.  Nevertheless, our very extensive regression and
	multi-architecture testing found the bug.  Now, after all
	those years, it is fixed.

    Fixed issues identied by the default CodeUL GitHub security code scan:

	Wrong type of arguments to printf in have_fpos_pos.c
	Multiplication result converted to larger type in zfunc.c
2021-10-22 03:36:40 -07:00
Landon Curt Noll
8aa5f140bf Release v2.12.0.4 2021-10-22 01:26:25 -07:00