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
This commit is contained in:
Landon Curt Noll
2021-02-12 15:50:39 -08:00
parent 71a116ca6f
commit 91991bb729
33 changed files with 804 additions and 645 deletions

8
hist.c
View File

@@ -1,7 +1,7 @@
/*
* hist - interactive readline module
*
* Copyright (C) 1999-2007 David I. Bell
* Copyright (C) 1999-2007,2021 David I. Bell
*
* Calc is open software; you can redistribute it and/or modify it under
* the terms of the version 2.1 of the GNU Lesser General Public License
@@ -746,7 +746,8 @@ hist_saveline(char *line, int len)
*/
hp = malloc(sizeof(HIST));
if (hp == NULL) {
fprintf(stderr, "Out of memory adding line to the history table #0\n");
fprintf(stderr,
"Out of memory adding line to the history table #0\n");
return;
}
hp->next = NULL;
@@ -754,7 +755,8 @@ hist_saveline(char *line, int len)
hp->len = len;
hp->data = malloc(len);
if (hp->data == NULL) {
fprintf(stderr, "Out of memory adding line to the history table #1\n");
fprintf(stderr,
"Out of memory adding line to the history table #1\n");
return;
}
memcpy(hp->data, line, len);