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

View File

@@ -146,6 +146,9 @@ char *home = NULL; /* $HOME or default */
char *pager = NULL; /* $PAGER or default */
char *shell = NULL; /* $SHELL or default */
char *calc_history = NULL; /* $CALCHISTFILE or ~/.calc_history */
char *calc_helpdir = NULL; /* $CALCHELP or /usr/local/share/calc/help */
/* $CALCCUSTOMHELP or /usr/local/share/calc/custhelp */
char *calc_customhelpdir = NULL;
int stdin_tty = FALSE; /* TRUE if stdin is a tty */
int havecommands = FALSE; /* TRUE if have one or more cmd args */
long stoponerror = 0; /* >0 => stop, <0 => continue, ==0 => use -c */
@@ -553,6 +556,22 @@ initenv(void)
calc_history = (c ? strdup(c) : NULL);
if (calc_history == NULL || *calc_history == '\0')
calc_history = NULL; /* will use ~/.calc_history */
/* determine the $CALCHELP value */
c = (no_env ? NULL : getenv(CALCHELP));
calc_helpdir = (c ? strdup(c) : NULL);
if (calc_helpdir == NULL || *calc_helpdir == '\0') {
/* will use /usr/local/share/calc/help */
calc_helpdir = HELPDIR;
}
/* determine the $CALCCUSTOMHELP value */
c = (no_env ? NULL : getenv(CALCCUSTOMHELP));
calc_customhelpdir = (c ? strdup(c) : NULL);
if (calc_customhelpdir == NULL || *calc_customhelpdir == '\0') {
/* will use /usr/local/share/calc/custhelp */
calc_customhelpdir = CUSTOMHELPDIR;
}
}