Moved versin() and coversin() to bottom of functions in func.c
(however the builtin function list remains sorted).
Created a historical trig functions section for cmath.h and qmath.h.
Moved cal/test3500.cal to cal/test9300.cal to make room
for future trip tests going from test 3427 thru 3599.
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.
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.
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.
Fixed a \-escape bug in calc(1) man page.
Added cal/comma.cal:
Convert numbers into strings with 3-digit group and integer-fraction
separators.
If the value is an integer, the integer-fraction separator is not used.
str_comma(x, [group, [decimal]])
Convert x into a string.
If group is given and is a string, group will be used as
the 3-digit group separator, otherwise the default 3-digit
group separator will be used.
If decimal is given and is a string, group will be used as
the integer-fraction separator, otherwise the default
integer-fraction separator will be used.
The decimal and group arguments are optional.
set_default_group_separator(group)
Change the default 3-digit group separator if group is a string,
otherwise the default 3-digit group separator will not be
changed. Return the old 3-digit group separator.
set_default_decimal_separator(decimal)
Change the default 3-digit group separator if decimal is a
string, otherwise the default integer-fraction separator
will not be changed. Return the old integer-fraction separator.
print_comma(x, [group, [decimal]])
Print the value produced by str_comma(x, [group, [decimal]])
followed by a newline.
If the str_comma() does not return a string, nothing is printed.
The decimal and group arguments are optional.
The value produced by str_comma() is returned.
fprint_comma(fd, x, [group, [decimal]])
Print the value produced by str_comma(x, [group, [decimal]]),
without a trailing newline, on file fd.
If the str_comma() does not return a string, nothing is printed.
If fd is not an open file, nothing is printed.
The decimal and group arguments are optional.
The value produced by str_comma() is returned.
Changed /*NOTREACHED*/ to not_reached(); and use "attribute.h".
Added .PHONY rule, just after all rule, to Makefiles.
Fixed an improper indentation issue.
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.
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 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 ...
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.
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 Makefile dependenies 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.
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!