Commit Graph

45 Commits

Author SHA1 Message Date
Landon Curt Noll
af72992ead Added testing for _WIN64 when testing for _WIN32 2021-12-08 12:04:13 -08:00
Landon Curt Noll
9f3a7817d3 Improve seed()
Do not rehash the hash.
2021-12-07 22:05:47 -08:00
Landon Curt Noll
dd0610db0a Improve seed()
xor-fold FNV hashes as seeds.
2021-12-07 22:01:23 -08:00
Landon Curt Noll
177a5d00d1 Improve seed()
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.
2021-12-07 21:41:28 -08:00
Landon Curt Noll
a02f8aa9f9 Improve seed() builtin
Increase size of random() data used by seed().
2021-12-07 13:47:00 -08:00
Landon Curt Noll
b7d1fb096d Improve the seed() builtin
Set seed() use of arc4random to same level as /dev/urandom.
Restore state size for initstated random().
2021-12-07 13:42:03 -08:00
Landon Curt Noll
48c4f3b948 Improve seed() builtin 2021-12-07 13:39:07 -08:00
Landon Curt Noll
cc5fb9a45b Improve the seed() function 2021-12-07 01:56:46 -08:00
Landon Curt Noll
7ffbaf922e Improve seed() function 2021-12-07 00:44:57 -08:00
Landon Curt Noll
f9464652fe Improve seed() even more 2021-12-06 23:30:52 -08:00
Landon Curt Noll
b30c5c1855 Improved seed() generation
Drop support for CLOCK_SGI_CYCLE.

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.
2021-12-06 21:16:08 -08:00
Landon Curt Noll
f5c5cea8b0 Correct typos 2021-12-05 18:23:27 -08:00
Landon Curt Noll
f4d754b47d Checkpoint in valgrind work 2021-11-27 00:05:28 -08:00
Landon Curt Noll
ac0d84eef8 Release v2.12.9.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.
2021-03-11 01:54:28 -08:00
Landon Curt Noll
507fe026e5 Fix many spelling errors 2021-02-12 22:09:47 -08:00
Landon Curt Noll
91991bb729 Checkpoint on calc version 2.12.8.0
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
2021-02-12 15:50:39 -08:00
Landon Curt Noll
a31078bbec Remove all RCS @(#) lines and RCS strings
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!
2017-05-23 01:33:23 -07:00
Landon Curt Noll
1ae2f953d3 Release calc version 2.12.5.0 2017-05-21 15:39:00 -07:00
Landon Curt Noll
7f125396c1 Release calc version 2.12.4.9 2017-05-21 15:38:57 -07:00
Landon Curt Noll
c9fce6a5bb Release calc version 2.12.4.1 2017-05-21 15:38:56 -07:00
Landon Curt Noll
5bada5fefd Release calc version 2.12.4.6 2017-05-21 15:38:55 -07:00
Landon Curt Noll
ca0dd4560b Release calc version 2.12.2 2017-05-21 15:38:50 -07:00
Landon Curt Noll
c773ee736f Release calc version 2.12.1.11 2017-05-21 15:38:50 -07:00
Landon Curt Noll
a6a37f9cad Release calc version 2.11.10 2017-05-21 15:38:45 -07:00
Landon Curt Noll
8aedcf801a Release calc version 2.11.6.2 2017-05-21 15:38:43 -07:00
Landon Curt Noll
d2cb9c81d5 Release calc version 2.11.5t4 2017-05-21 15:38:40 -07:00
Landon Curt Noll
63d9b22067 Release calc version 2.11.5t1.0 2017-05-21 15:38:39 -07:00
Landon Curt Noll
fc85ac3791 Release calc version 2.11.5t0 2017-05-21 15:38:39 -07:00
Landon Curt Noll
61dd47526f Release calc version 2.11.2t1.0 2017-05-21 15:38:38 -07:00
Landon Curt Noll
6f5e8bf1b6 Release calc version 2.11.1t1 2017-05-21 15:38:36 -07:00
Landon Curt Noll
0514dc0de9 Release calc version 2.11.0t10.5.1 2017-05-21 15:38:36 -07:00
Landon Curt Noll
867002aa77 Release calc version 2.11.1 2017-05-21 15:38:35 -07:00
Landon Curt Noll
96c34adee3 Release calc version 2.11.0t10 2017-05-21 15:38:33 -07:00
Landon Curt Noll
82ff31f246 Release calc version 2.11.0t9.4.2 2017-05-21 15:38:32 -07:00
Landon Curt Noll
7cb0a77c25 Release calc version 2.11.0t9.4.1 2017-05-21 15:38:32 -07:00
Landon Curt Noll
afb0e5c32a Release calc version 2.11.0t9.4 2017-05-21 15:38:32 -07:00
Landon Curt Noll
df32e3956d Release calc version 2.11.0t9.3.1 2017-05-21 15:38:32 -07:00
Landon Curt Noll
e6e2556893 Release calc version 2.11.0t8.6 2017-05-21 15:38:30 -07:00
Landon Curt Noll
a7e363da8b Release calc version 2.11.0t8.5 2017-05-21 15:38:30 -07:00
Landon Curt Noll
49be672338 Release calc version 2.11.0t8.3 2017-05-21 15:38:30 -07:00
Landon Curt Noll
5cc680fe42 Release calc version 2.11.0t8.1 2017-05-21 15:38:29 -07:00
Landon Curt Noll
2c72ea9339 Release calc version 2.11.0t8 2017-05-21 15:38:29 -07:00
Landon Curt Noll
2251281027 Release calc version 2.11.0t7.4 2017-05-21 15:38:29 -07:00
Landon Curt Noll
ea64a95b90 Release calc version 2.11.0t5.1 2017-05-21 15:38:27 -07:00
Landon Curt Noll
f60cbd24b2 Release calc version 2.11.0t5 2017-05-21 15:38:27 -07:00