Compare commits

..

3 Commits

Author SHA1 Message Date
Landon Curt Noll
121b8f72c6 Release calc version 2.11.1t3.0 2017-05-21 15:38:37 -07:00
Landon Curt Noll
9968a69f50 Release calc version 2.11.1t3 2017-05-21 15:38:37 -07:00
Landon Curt Noll
1ea579d929 Release calc version 2.11.1t2.2 2017-05-21 15:38:37 -07:00
10 changed files with 128 additions and 28 deletions

17
CHANGES
View File

@@ -1,4 +1,12 @@
The following are the changes from calc version 2.11.1 to date:
The following are the changes from calc version 2.11.1t3 to date:
Removed non-portable strerror() tests (3715, 3724 and 3728) from
calc/regress.cal.
Fixed missing strdup() from func.c problem.
The following are the changes from calc version 2.11.1 to 2.11.1t2.2:
Placed calc under version 2.1 of the GNU Lesser General Public License.
@@ -50,6 +58,9 @@ The following are the changes from calc version 2.11.1 to date:
Added ./.calcinit to the default calcrc.
Added cscript/README and help cscript to document the calc shell
script supplied with calc.
The following are the changes from calc version 2.11.0t10 to 2.11.0t11:
@@ -4715,8 +4726,8 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1:
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 29.4 $
## @(#) $Id: CHANGES,v 29.4 1999/12/17 10:06:46 chongo Exp $
## @(#) $Revision: 29.6 $
## @(#) $Id: CHANGES,v 29.6 1999/12/19 03:26:47 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
##
## Under source code control: 1993/06/02 18:12:57

View File

@@ -20,8 +20,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# @(#) $Revision: 29.5 $
# @(#) $Id: Makefile.ship,v 29.5 1999/12/17 09:07:35 chongo Exp $
# @(#) $Revision: 29.6 $
# @(#) $Id: Makefile.ship,v 29.6 1999/12/19 03:19:58 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
#
# Under source code control: 1990/02/15 01:48:41
@@ -3316,6 +3316,7 @@ func.o: have_malloc.h
func.o: have_memmv.h
func.o: have_newstr.h
func.o: have_stdlib.h
func.o: have_strdup.h
func.o: have_string.h
func.o: have_times.h
func.o: have_unistd.h

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.1 $
* @(#) $Id: regress.cal,v 29.1 1999/12/14 09:15:32 chongo Exp $
* @(#) $Revision: 29.2 $
* @(#) $Id: regress.cal,v 29.2 1999/12/19 03:16:54 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $
*
* Under source code control: 1990/02/15 01:50:36
@@ -3085,8 +3085,7 @@ define test_error()
print '3712: e9999 = error(9999)';
vrfy(errno() == 9999, '3713: errno() == 9999');
vrfy(error() == e9999, '3714: error() == e9999');
vrfy(substr(strerror(), strpos(strerror(),"9999"), 4) == "9999",
'3715: substr(strerror(), strpos(strerror(),"9999"), 4) == "9999"');
/* test 3715 removed due to non-portable strerror() output */
x = newerror("Alpha");
print '3716: x = newerror("Alpha")';
n = iserror(x);
@@ -3097,16 +3096,14 @@ define test_error()
vrfy(errno(9999) == n, '3721: errno() == n');
vrfy(errno() == 9999, '3722: errno() == 9999');
vrfy(error() == e9999, '3723: error() == e9999');
vrfy(substr(strerror(), strpos(strerror(),"9999"), 4) == "9999",
'3724: substr(strerror(), strpos(strerror(),"9999"), 4) == "9999"');
/* test 3724 removed due to non-portable strerror() output */
a = 1/0;
print '3725: a = 1/0';
vrfy(strerror() == "Division by zero",
'3726: strerror() == "Division by zero"');
n = 8191;
print '3727: n = 8191';
vrfy(substr(strerror(8191),strpos(strerror(n),"8191"), 4) == "8191",
'3728: substr(strerror(n),strpos(strerror(n),"8191"),4) == "8191"');
/* test 3728 removed due to non-portable strerror() output */
/* errmax and errcount should be bumped up the 148 errors above */
vrfy(errcount() == ecnt, '3729: errcount() == ecnt');

View File

@@ -17,8 +17,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# @(#) $Revision: 29.3 $
# @(#) $Id: Makefile,v 29.3 1999/12/14 19:30:19 chongo Exp $
# @(#) $Revision: 29.4 $
# @(#) $Id: Makefile,v 29.4 1999/12/17 11:30:35 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $
#
# Under source code control: 1999/11/29 11:10:26
@@ -82,7 +82,7 @@ SCRIPT_SRC= mersenne.calc piforever.calc plus.calc simple.calc
# These files are found (but not built) in the distribution
#
DISTLIST= ${SCRIPT_SRC} ${MAKE_FILE}
DISTLIST= ${SCRIPT_SRC} ${MAKE_FILE} README
# These files are used to make (but not built) a calc .a library
#

64
cscript/README Normal file
View File

@@ -0,0 +1,64 @@
calc shell script examples
--------------------------
These calc shell scripts are provided because they serve as examples of
how use the calc language, and/or because the authors thought them to
be useful!
If you write something that you think is useful, please send it to:
calc-tester at postofc dot corp dot sgi dot com
[[ Replace 'at' with @, 'dot' is with . and remove the spaces ]]
For more info, see:
help script
help cscript
=-=
mersenne exp
Print the value of 2^exp-1.
piforever
Print the value of pi forever, or as long as you cpu / memory allows.
plus arg ...
Print the sum of 1 or more arguments.
simple
A trivial example of a calc shell script.
## Copyright (C) 1999 Landon Curt Noll
##
## 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
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 29.3 $
## @(#) $Id: README,v 29.3 1999/12/17 10:34:54 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/README,v $
##
## Under source code control: 1999/12/17 10:23:40
## File existed as early as: 1999
##
## chongo <was here> /\oo/\ http://reality.sgi.com/chongo/
## Share and enjoy! :-) http://reality.sgi.com/chongo/tech/comp/calc/

9
func.c
View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.1 $
* @(#) $Id: func.c,v 29.1 1999/12/14 09:15:38 chongo Exp $
* @(#) $Revision: 29.2 $
* @(#) $Id: func.c,v 29.2 1999/12/19 03:20:26 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/func.c,v $
*
* Under source code control: 1990/02/15 01:48:15
@@ -73,6 +73,11 @@
#include <sys/times.h>
#endif
#include "have_strdup.h"
#if !defined(HAVE_STRDUP)
# define strdup(x) calc_strdup((CONST char *)(x))
#endif
#include "have_const.h"
#include "calc.h"
#include "calcerr.h"

View File

@@ -18,8 +18,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# @(#) $Revision: 29.1 $
# @(#) $Id: Makefile,v 29.1 1999/12/14 09:16:34 chongo Exp $
# @(#) $Revision: 29.2 $
# @(#) $Id: Makefile,v 29.2 1999/12/17 10:33:00 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
#
# Under source code control: 1991/07/23 06:47:57
@@ -87,7 +87,11 @@ STD_HELP_FILES_8= operator statement
BLT_HELP_FILES_9= resource
STD_HELP_FILES_10= types usage script unexpected variable
STD_HELP_FILES_10= types usage script
BLT_HELP_FILES_10a= cscript
STD_HELP_FILES_10b= unexpected variable
BLT_HELP_FILES_11= bindings custom_cal libcalc new_custom resource
@@ -108,6 +112,7 @@ FULL_HELP_FILES= ${STD_HELP_FILES_1} ${STD_HELP_FILES_2} \
${BLT_HELP_FILES_5} ${STD_HELP_FILES_6} \
${SPECIAL_HELP_7} ${STD_HELP_FILES_8} \
${BLT_HELP_FILES_9} ${STD_HELP_FILES_10} \
${BLT_HELP_FILES_10a} ${STD_HELP_FILES_10b} \
${BLT_HELP_FILES_11} ${STD_HELP_FILES_12} \
${BLT_HELP_FILES_13} ${STD_HELP_FILES_14} \
${BLT_HELP_FILES_14} ${STD_HELP_FILES_15}
@@ -117,6 +122,7 @@ FULL_HELP_FILES= ${STD_HELP_FILES_1} ${STD_HELP_FILES_2} \
STD_HELP_FILES= ${STD_HELP_FILES_1} ${STD_HELP_FILES_2} \
${STD_HELP_FILES_4} ${STD_HELP_FILES_6} \
${STD_HELP_FILES_8} ${STD_HELP_FILES_10} \
${STD_HELP_FILES_10b} \
${STD_HELP_FILES_12} ${STD_HELP_FILES_14} \
${STD_HELP_FILES_15}
@@ -127,6 +133,7 @@ STD_HELP_FILES= ${STD_HELP_FILES_1} ${STD_HELP_FILES_2} \
#
BLT_HELP_FILES= ${BLT_HELP_FILES_3} ${BLT_HELP_FILES_5} \
${BLT_HELP_FILES_9} \
${BLT_HELP_FILES_10a} \
${BLT_HELP_FILES_11} ${BLT_HELP_FILES_13} \
${BLT_HELP_FILES_14}
@@ -337,6 +344,18 @@ COPYING-LGPL: ../COPYING-LGPL
true; \
fi
cscript: ../cscript/README
rm -f $@
cp ../cscript/README $@
${CHMOD} 0444 $@
-@if [ -z "${Q}" ]; then \
echo ''; \
echo '=-=-= skipping the cat of help/$@ =-=-='; \
echo ''; \
else \
true; \
fi
full: ${FULL_HELP_FILES} ${MAKE_FILE}
${Q}echo "forming full"
-${Q}rm -f $@

View File

@@ -35,6 +35,7 @@ following topics:
new_custom information about how to add new custom functions
resource standard calc resource files
script using calc shell scripts
cscript info on the calc shell scripts supplied with calc
archive where to get the latest versions of calc
bugs known bugs and mis-features
@@ -118,8 +119,8 @@ as the same effect as:
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 29.1 $
## @(#) $Id: help,v 29.1 1999/12/14 09:15:52 chongo Exp $
## @(#) $Revision: 29.2 $
## @(#) $Id: help,v 29.2 1999/12/17 10:33:00 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/help,v $
##
## Under source code control: 1991/07/21 04:37:20

View File

@@ -1,4 +1,5 @@
Calc shell scripts
------------------
If an executable file begins with:
@@ -62,6 +63,7 @@ For more information use the following calc commands:
help usage
help argv
help config
help cscript
## Copyright (C) 1999 Landon Curt Noll
##
@@ -79,8 +81,8 @@ For more information use the following calc commands:
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 29.1 $
## @(#) $Id: script,v 29.1 1999/12/14 09:16:06 chongo Exp $
## @(#) $Revision: 29.2 $
## @(#) $Id: script,v 29.2 1999/12/17 10:33:00 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/script,v $
##
## Under source code control: 1999/11/30 05:29:48

View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.4 $
* @(#) $Id: version.c,v 29.4 1999/12/17 10:06:46 chongo Exp $
* @(#) $Revision: 29.8 $
* @(#) $Id: version.c,v 29.8 1999/12/19 03:32:56 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $
*
* Under source code control: 1990/05/22 11:00:58
@@ -43,7 +43,7 @@ static char *program;
#define MAJOR_VER 2 /* major version */
#define MINOR_VER 11 /* minor version */
#define MAJOR_PATCH 1 /* patch level or 0 if no patch */
#define MINOR_PATCH "2" /* test number or empty string if no patch */
#define MINOR_PATCH "3.0" /* test number or empty string if no patch */
/*
* calc version constants