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.
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")
Improved "SEE ALSO" for the hyperbolic function help files.
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.
Added config("fraction_space", boolean) to help/config, along with
a few few minor text improvements. Updated cal/regress to test
config("tilde_space").
Added config("complex_space", boolean). The "complex_space" controls
whether or not a space (' ') is printed before and after the + or -
in complex values.
By default, config("complex_space") is false.
For example, with the default, config("complex_space", 0):
; asin(2)
1.57079632679489661923-1.31695789692481670863i
With config("complex_space", 1):
; asin(2)
1.57079632679489661923 - 1.31695789692481670863i
NOTE: Use of config("complex_space", 1) can break printing and scanning
of fractional values via "%r".
NOTE: Use of config("complex_space", 1) can break printing and scanning
of complex values via "%c".
Added config("complex_space", boolean) to help/config, along with
a few few minor text improvements. Updated cal/regress to test
config("complex_space").
Added config("tilde_space", boolean) to help/config, along with
a few few minor text improvements. Updated cal/regress to test
config("tilde_space").
Added config("fraction_space", boolean). The "fraction_space" controls
whether or not a space (' ') is printed before and after fractions.
By default, config("fraction_space") is false.
For example, with the default, config("fraction_space", 0):
; base(1/3),
; 1/7
1/7
With config("fraction_space", 1):
; base(1/3),
; 1/7
1 / 7
NOTE: Use of config("fraction_space", 1) can break printing and scanning
of fractional values via "%r".
NOTE: Use of config("fraction_space", 1) can break printing and scanning
of complex values via "%c".
Added config("fraction_space", boolean) to help/config, along with
a few few minor text improvements. Updated cal/regress to test
config("tilde_space").
Added config("tilde_space", boolean). The "tilde_space" controls
whether or not a space (' ') is printed after leading tilde ('~').
By default, config("tilde_space") is true, which is a change
from past behavior. For example, now:
; 1/3
~ 0.33333333333333333333
With config("tilde_space", 0):
; 1/3
~0.33333333333333333333
To disable "tilde_space", use config("tilde_space", 0) on the
command line and/or use config("tilde_space", 0),; in your ~/.calcrc.
Thanks goes to <GitHub use ljramalho> for this suggestion.
Added config("tilde_space", boolean) to help/config, along with
a few few minor text improvements. Updated cal/regress to test
config("tilde_space") and to account for the new default.
Changed /*NOTREACHED*/ to not_reached(); and use "attribute.h".
Added .PHONY rule, just after all rule, to Makefiles.
Fixed an improper indentation issue.
Similar to scientific mode, engineering mode also displays numbers in
base 10 exponential notation, with the difference that exponents are
always multiples of 3, to facilitate the interpretation in terms of
SI prefixes.
The mode is activated in config thru "engineering" or "eng. For base
and base2, it uses the special value 1000.
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.
GCC 7 Added a warning for implicit fallthroughs in switch cases.
It's enabled by -Wextra, and treated as an error due to -Werror so
compilation fails on GCC 7 and higher.
See -Wimplicit-fallthrough in the GCC manual.
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!