The help and man commands now issue an error message when
the help file cannot be opened: say because there is a
help command typo and there is no such help file.
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
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
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
The following are the changes in this release:
Added builtin functions to convert between degrees and
degrees, minutes and seconds under the config("mod")
round rules:
d2dms(degs, d, m, s [,rnd]) - given degs, compute d, m, s
d2dm(degs, d, m [,rnd]) - given degs, compute d, m
See help/d2dms and help/d2dm.
Example:
; print d2dms(360.321,deg=,min=,sec=), deg, min, sec;
0.321 0 19 15.6
; print d2dm(360.321,deg=,min=), deg, min;
0.321 0 19.26
Added builtin functions to convert between gradians and
gradians, minutes and seconds under the config("mod")
round rules:
g2gms(grads, g, m, s [,rnd]) - given grads, compute g, m, s
g2gm(grads, g, m [,rnd]) - given grads, compute g, m
See help/g2gms and help/g2gm.
Example:
; print g2gms(400.321,grad=,min=,sec=), grad, min, sec;
0.321 0 19 15.6
; print g2gm(400.321,grad=,min=), grad, min;
0.321 0 19.26
Added builtin functions to convert between hours and
hours, minutes and seconds under the config("mod")
round rules:
h2hms(hours, h, m, s [,rnd]) - given hours, compute h, m, s
h2hm(hours, h, m [,rnd]) - given hours, compute h, m
See help/h2hms and help/h2hm.
Example:
; print h2hms(24.321,hour=,min=,sec=), hour, min, sec;
0.321 0 19 15.6
; print h2hm(24.321,hour=,min=), hour, min;
0.321 0 19.26
Renumbered regression tests 3408 thru 3437, to 9102 thru 9131.
Updated Added hms.cal resource file to use h2hms() builtin.
Updated Added dms.cal resource file to use d2dms() builtin.
Fix minor typo in help/mod SYNOPSIS.
Fix minor typo in help/quo SYNOPSIS.
Added a few more examples to help/strcmp.
Added builtin functions to convert between degrees, minutes and
seconds and degrees under the config("mod") round rules:
dms2d(d, m, s [,rnd]) - convert deg, min, and secs to deg
dm2d(d, m [,rnd]) - convert deg, min to deg
See help/dms2d and help/dm2d.
Example:
; print dms2d(12, 20, 44.16);
12.3456
; print dm2d(3601, -25.5594);
0.57401
Added builtin functions to convert between gradians, minutes and
seconds and gradians under the config("mod") round rules:
gms2g(g, m, s [,rnd]) - convert grad, min, and secs to grad
gm2g(g, m [,rnd]) - convert grad and min to grad
See help/g2gms and help/g2gm.
Example:
; print gms2g(12, 20, 44.16);
12.3456
; print gm2g(4001, -25.5594);
0.57401
Added builtin functions to convert between hours, minutes and
seconds and hours under the config("mod") round rules:
hms2h(h, m, s [,rnd]) - convert hours, min, and secs to hours
hm2h(h, m [,rnd]) - convert hours, min to hours
See help/hms2h and help/hm2h.
Example:
; print hms2h(12, 20, 44.16);
12.3456
; print hm2h(241, -25.5594);
0.57401
Added builtin functions to convert between degrees, minutes and
seconds and degrees under the config("mod") round rules:
dms2d(d, m, s [,rnd]) - convert deg, min, and secs to deg
dm2d(d, m [,rnd]) - convert deg, min to deg
See help/dms2d and help/dm2d.
Example:
; print dms2d(12, 20, 44.16);
12.3456
; print dm2d(3601, -25.5594);
0.57401
Added builtin functions to convert between gradians, minutes and
seconds and gradians under the config("mod") round rules:
gms2g(g, m, s [,rnd]) - convert grad, min, and secs to grad
gm2g(g, m [,rnd]) - convert grad and min to grad
See help/g2gms and help/g2gm.
Example:
; print gms2g(12, 20, 44.16);
12.3456
; print gm2g(4001, -25.5594);
0.57401
Added builtin functions to convert between hours, minutes and
seconds and hours under the config("mod") round rules:
hms2h(h, m, s [,rnd]) - convert hours, min, and secs to hours
hm2h(h, m [,rnd]) - convert hours, min to hours
See help/hms2h and help/hm2h.
Example:
; print hms2h(12, 20, 44.16);
12.3456
; print hm2h(241, -25.5594);
0.57401
Added several conversion functions:
Added builtin functions to convert between degrees and
degrees, minutes and seconds under the config("mod")
round rules:
d2dms(degs, d, m, s [,rnd]) - given degs, compute d, m, s
d2dm(degs, d, m [,rnd]) - given degs, compute d, m
See help/d2dms and help/d2dm.
Example:
; print d2dms(360.321,deg=,min=,sec=), deg, min, sec;
0.321 0 19 15.6
; print d2dm(360.321,deg=,min=), deg, min;
0.321 0 19.26
Added builtin functions to convert between gradians and
gradians, minutes and seconds under the config("mod")
round rules:
g2gms(grads, g, m, s [,rnd]) - given grads, compute g, m, s
g2gm(grads, g, m [,rnd]) - given grads, compute g, m
See help/g2gms and help/g2gm.
Example:
; print g2gms(400.321,grad=,min=,sec=), grad, min, sec;
0.321 0 19 15.6
; print g2gm(400.321,grad=,min=), grad, min;
0.321 0 19.26
Added builtin functions to convert between hours and
hours, minutes and seconds under the config("mod")
round rules:
h2hms(hours, h, m, s [,rnd]) - given hours, compute h, m, s
h2hm(hours, h, m [,rnd]) - given hours, compute h, m
See help/h2hms and help/h2hm.
Example:
; print h2hms(24.321,hour=,min=,sec=), hour, min, sec;
0.321 0 19 15.6
; print h2hm(24.321,hour=,min=), hour, min;
0.321 0 19.26
In addtion:
Renumbered regression tests 3408 thru 3437, to 9102 thru 9131.
Updated Added hms.cal resource file to use h2hms() builtin.
Updated Added dms.cal resource file to use d2dms() builtin.
Fix minor typo in help/mod SYNOPSIS.
Fix minor typo in help/quo SYNOPSIS.
Added a few more examples to help/strcmp.
The clean and clobber makefile rules no longer list custom/Makefile
as a dependency.
Unfortunately due to the complex dependency issues between
Makefile, Makefile.ship and custom/Makefile, parallel GNU make
is NOT recommended. Sorry (tm Canada) :)
Fixed a few typos in CHANGES.
As a side note: We stayed v2.13.x was kept for only a short time.
The move to 2.14.x was motivated by non-compatible changes due to
the default order of CALCRC, plus some new builtin functions.
More changes are likely, so we might see another v2.14.0.x release
before things are declared "recommended stable".
Not that we wan to discourage people from trying v2.14.0, you should
try it. We just want things to become stable and well field tested
before we reach the "recommended stable" release state.
Unfortunately due to the complex dependency issues between
Makefile, Makefile.ship and custom/Makefile, parallel GNU make
is NOT recommended. Sorry (tm Canada) :)
A .bak file was accicently put into the DETAIL_HELP list.
That bogus help file was removed.
Modified the help/Makefile detail_help_list rule to remove .bak files
when forming DETAIL_HELP.
Updated CHANGES.
Updated help/unexpected.
Added help files for d2g(), d2r(), g2d(), g2r(), r2d(), r2g().
Added regression test code for the same functions.
Fixed a few minor typos.
We still need to add:
help files for g2d & d2g
regression tests for g2d & d2g
notes in related trig help files
note in unexpected help file
note in CHANGES
We still need to add:
help files for g2r & r2g
regression tests for g2r & r2g
notes in related trig help files
note in unexpected help file
note in CHANGES
We still need to add:
help files for d2r & r2d
regression tests for d2r & r2d
notes in related trig help files
note in unexpected help file
note in CHANGES
The :-separated default CALCRC value has been reversed.
The default CALCRC was:
${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
The default CALCRC is now:
./.calcinit:~/.calcrc:${CALC_SHAREDIR}/startup
See "help environment" for details.
Added engineering mode as per a GitHub pull request from
<GitHub user heitzmann>. Thank you! For example:
; config("mode","eng"),
; 10^41
100e39
or for example:
; base(1000),
; 2^23209-1
~402.87411577898877818187e6984
For more information see:
help base
Added regression test code for engineering mode. Improved and
expanded regression test code related to the base() and base2()
builtin functions.
Fixed a critical bug in the above mentioned pull request where
a call to base2(1000) would make calc unstable and likely to
dump core.
The :-separated default CALCRC value has been reversed.
The default CALCRC was:
${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
The default CALCRC is now:
./.calcinit:~/.calcrc:${CALC_SHAREDIR}/startup
See "help environment" for details.
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.
Replaced /usr/local with the use of ${PREFIX} in calc Makefiles.
The ${PREFIX} is not the same as ${T}. The ${T} specifies
a top level directory under which calc installs things.
While usally ${T} is empty, it can be specific path
as if calc where "chrooted" during an install.
The ${PREFIX} value, during install, is a path between
the top level ${T} install directory and the object
such as an include file.
Corrected a few more typos in Makefile comments.
Added Makefile.local, a file with a single comment. The main
Makefile includes Makefile.local just before the first all rule.
One may overtide any Makefile setting by modifying Makefile.local.
For example, Makefile.local could force BLD_TYPE:
HAVE_STRING_H:= YES
HAVE_TIMES_H:= YES
SED:= /usr/local/bin/nsed
Added ${LOC_MKF} to specify the make of the file that is
included just before the all file. So one could place
the above override lines into a different file and call
make changing the ${LOC_MKF} value. For example:
make LOC_MKF=Makefile.private clobber all chk
Updated HOWTO.INSTALL to mention Makefile.local.
Added Makefile.local, a file with a single comment. The main
Makefile includes Makefile.local just before the first all rule.
One may overtide any Makefile setting by modifying Makefile.local.
For example, Makefile.local could force BLD_TYPE:
HAVE_STRING_H:= YES
HAVE_TIMES_H:= YES
SED:= /usr/local/bin/nsed
Added ${LOC_MKF} to specify the make of the file that is
included just before the all file. So one could place
the above override lines into a different file and call
make changing the ${LOC_MKF} value. For example:
make LOC_MKF=Makefile.private clobber all chk
Replaced /usr/local with the use of ${PREFIX} in calc Makefiles.
The ${PREFIX} is not the same as ${T}. The ${T} specifies
a top level directory under which calc installs things.
While usally ${T} is empty, it can be specific path
as if calc where "chrooted" during an install.
The ${PREFIX} value, during install, is a path between
the top level ${T} install directory and the object
such as an include file.
Corrected a few more typos in Makefile comments.
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 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 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.
The following are the changes in this release:
Fixed a typo typo in help/Makefile that caused the build of
2.12.9.0 to fail in a number of cases. Thanks to a report by
<GitHub user balducci>.
Pass form Makefile variables ${Q}, ${S}, ${E}, ${H} and ${V} down
to all sub-directory Makefiles from the top level Makefile.