Converted all ASCII tabs to ASCII spaces using a 8 character
tab stop, for all files, except for all Makefiles (plus rpm.mk).
The `git diff -w` reports no changes.
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.
The following are the changes in this release:
Fixed typo (missing quotes) in the env rule.
Fixed intendation problem in CHANGES.
Combined 2.12.9.1 changes into the 2.12.8.2 to 2.12.9.0
range, and thus renamed the range to 2.12.8.2 to 2.12.9.1.
Fixed issues related to building Makefile.simple.
Fixed how the Makefile variable MANPATH is set for macOS.
Added a bunch of information to the near bottom of HOWTO.INSTALL
on calc Makefiles. This information discusses the various
Makefiles found in the calc source.
Added comments in various calc Makefiles about their origin.
In particular, for Makefiles that are constructed such as
Makefile.simple, custom/Makefile and custom/Makefile.simple
there are comments about how they were made.
For all calc Makefiles, including those in sub-directories,
near the top there is now a line of the form:
# SRC: ... some message about the origin ...
Fixed how the calc(1) man page is installed under macOS.
Fixed how calc man page in ${CATDIR} is formed.
Fixed how Makefile.simple is formed.
Fixed the #! calc script argument processing. The initial #!
line must end in a -f. For example, if calc is in /usr/local/bin/calc,
then the following would be the first line of a calc script:
#!/usr/local/bin/calc -f
...
It is common that -q be usde with a calc script, so assuming the
same /usr/local/bin/calc path:
#!/usr/local/bin/calc -q -f
...
Use of -s in the #! first line of a calc script is not needed
since -f implies -f.
The argv() will now return values more typical of C's main().
Before it returned one less than the number of arguments. Now,
for example, when calc is given 2 args, argv() will return 3.
The value of argv(0) will be the path to calc, or in the
case of a #! calc cscript, it will return the name of the script.
Updated the calc man page and help/argv to reflect the
above changes.
Improved the formatting of the calc man page.
Fixed the formation of the win32 sub-directory via the win32_hsrc
Makefile rule.
Due to incompatible changes to the argv() function, and #! calc
scripts, we are setting the version to the next minor number:
2.13.0
Added notes to help/unexpected about:
display() will limit the number of digits printed after decimal point
%d will format after the decimal point for non-integer numeric values
%x will format as fractions for non-integer numeric values
fprintf(fd, "%d\n", huge_value) may need fflush(fd) to finish
Fixed Makefile dependencies for the args.h rule.
Fixed Makefile cases where echo with -n is used. On some systems,
/bin/sh does not use -n, so we must call /bin/echo -n instead
via the ${ECHON} Makefile variable.
Add missing standard tools to sub-Makefiles to make them
easier to invoke directly.
Sort lists of standard tool Makefile variables and remove duplicates.
Declare the SHELL at the top of Makefiles.
Fixed the depend rule in the custom Makefile.
Improved the messages produced by the depend in the Makefiles.
Changed the UNUSED define in have_unused.h to be a macro with
a parameter. Changed all use of UNUSED in *.c to be UNUSED(x).
Removed need for HAVE_UNUSED in building the have_unused.h file.
CCBAN is given to ${CC} in order to control if banned.h is in effect.
The banned.h attempts to ban the use of certain dangerous functions
that, if improperly used, could compromise the computational integrity
if calculations.
In the case of calc, we are motivated in part by the desire for calc
to correctly calculate: even during extremely long calculations.
If UNBAN is NOT defined, then calling certain functions
will result in a call to a non-existent function (link error).
While we do NOT encourage defining UNBAN, there may be
a system / compiler environment where re-defining a
function may lead to a fatal compiler complication.
If that happens, consider compiling as:
make clobber all chk CCBAN=-DUNBAN
as see if this is a work-a-round.
If YOU discover a need for the -DUNBAN work-a-round, PLEASE tell us!
Please send us a bug report. See the file:
BUGS
or the URL:
http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
for how to send us such a bug report.
Added the building of have_ban_pragma.h, which will determine
if "#pragma GCC poison func_name" is supported. If it is not,
or of HAVE_PRAGMA_GCC_POSION=-DHAVE_NO_PRAGMA_GCC_POSION, then
banned.h will have no effect.
Fixed building of the have_getpgid.h file.
Fixed building of the have_getprid.h file.
Fixed building of the have_getsid.h file.
Fixed building of the have_gettime.h file.
Fixed building of the have_strdup.h file.
Fixed building of the have_ustat.h file.
Fixed building of the have_rusage.h file.
Added HAVE_NO_STRLCPY to control if we want to test if
the system has a strlcpy() function. This in turn produces
the have_strlcpy.h file wherein the symbol HAVE_STRLCPY will
be defined, or not depending if the system comes with a
strlcpy() function.
If the system does not have a strlcpy() function, we
compile our own strlcpy() function. See strl.c for details.
Added HAVE_NO_STRLCAT to control if we want to test if
the system has a strlcat() function. This in turn produces
the have_strlcat.h file wherein the symbol HAVE_STRLCAT will
be defined, or not depending if the system comes with a
strlcat() function.
If the system does not have a strlcat() function, we
compile our own strlcat() function. See strl.c for details.
Fixed places were <string.h>, using #ifdef HAVE_STRING_H
for legacy systems that do not have that include file.
Added ${H} Makefile symbol to control the announcement
of forming and having formed hsrc related files. By default
H=@ (announce hsrc file formation) vs. H=@: to silence hsrc
related file formation.
Explicitly turn off quiet mode (set Makefile variable ${Q} to
be empty) when building rpms.
Improved and fixed the hsrc build process.
Forming rpms is performed in verbose mode to assist debugging
to the rpm build process.
Compile custom code, if needed, after main code is compiled.
Fixed a mistake in "help intro" where some inserted text
changed the value of "." and thus made the next result
incorrect.
Clarified in "help factor" that 1 is returned if no
factor below the limit was found.
Removed Makefile variable ${MAKEFILE_REV}.
The missing cscript/square.calc file has been restored.
Fixed compiler errors and warnings related to GCC.
In particular, gcc/9.3.1 and gcc/10.2.1 now compile
calc without any compiler errors or warnings,
even with -Werror -Wextra -pedantic.
To print out information about the calc compliation
environment, we added the following make rule:
make calcinfo
Improved how 'make debug' operates.
Moved help/contrib to CONTRIB-CODE. The help/contrib file
is now build from a copy of CONTRIB-CODE.
Created a new calc bug report Email address. Created a new calc
question Email address. Created a new calc contribution Email
address. See the BUGS file for details.
Added "help questions" to print the QUESIONS help file.
If the environment variable $CALCHELP is defined and is non-empty,
then calc help files will be in the direcgory by the $CALCHISTFILE
environment variable.
If the environment variable $CALCCUSTOMHELP is defined and is
non-empty, then custom calc help files will be in the direcgory
by the $CALCCUSTOMHELP environment variable.
The calc-tester mailing list has been retired. See:
* How to submit a calc bug report:
http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
* How to contribute code to calc:
http://www.isthe.com/chongo/tech/comp/calc/calc-contrib.html
* How to submit a question about calc:
http://www.isthe.com/chongo/tech/comp/calc/calc-question.html
Some folks might think: “you still use RCS”?!? And we will say,
hey, at least we switched from SCCS to RCS back in … I think it was
around 1994 ... at least we are keeping up! :-) :-) :-)
Logs say that SCCS version 18 became RCS version 19 on 1994 March 18.
RCS served us well. But now it is time to move on. And so we are
switching to git.
Calc releases produce a lot of file changes. In the 125 releases
of calc since 1996, when I started managing calc releases, there
have been 15473 file mods!