mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7cf611bca8 | ||
|
c9fce6a5bb | ||
|
a1c96f95a6 | ||
|
5e6b3cbd3f | ||
|
5bada5fefd | ||
|
0c20c96a7e | ||
|
e054ea87f2 | ||
|
e229393250 | ||
|
a407c7d197 |
44
CHANGES
44
CHANGES
@@ -1,4 +1,39 @@
|
||||
The following are the changes from calc version 2.12.3.0 to date:
|
||||
The following are the changes from calc version 2.12.4.0 to date:
|
||||
|
||||
Fixed a documentation bug for the sgn() builtin.
|
||||
|
||||
Added the 1<<8/2 evaluation example to "help unexpected". That
|
||||
expression evalutes to 128, not 16 as some C programmers might expect.
|
||||
|
||||
Fixed a bug in solve.cal where high was not returned in some situations.
|
||||
|
||||
Fixed a bug reported by Paul & Karen Tomlinson (paulnkaz at pktomlinson
|
||||
dot fsnet dot co dot uk) where calling log multiple times with different
|
||||
values of epsilon resulted in an incorrect value.
|
||||
|
||||
Removed cvd rule from Makefiles.
|
||||
|
||||
The Makefile used in the source rpm (calc-*.src.rpm) no longer uses
|
||||
the -Werror compile flag. This is to help those distributions with
|
||||
compilers that make produce (hopefully) complination warnings.
|
||||
NOTE: For testing and calc build purposes will recommend and will
|
||||
continue to use the -Werror flag.
|
||||
|
||||
Fixed a typo in the Makefile where the make variable ${SAMPLE_OBJ}
|
||||
was misspelled as ${SAMPLE_OBJS}.
|
||||
|
||||
Added prep makefile rule to make is easier to compile calc without
|
||||
an optimizer. By doing:
|
||||
|
||||
make clobber prep
|
||||
|
||||
one may build a calc binary that is easier to debug.
|
||||
|
||||
Fixed a bug where an certains typos (e.g., calling an unknown
|
||||
function) would previously cause calc to exit.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.12.3.0 to 2.12.3.3:
|
||||
|
||||
Fixed the Jacobi function where it returned 1 when it should have
|
||||
returned 0. Thanks goes to Kevin Sopp (baraclese at googlemail dot com)
|
||||
@@ -22,6 +57,9 @@ The following are the changes from calc version 2.12.3.0 to date:
|
||||
if it is empty. Now when ${ALLOW_CUSTOM} make variable is empty,
|
||||
an empty ${CALC_INCDIR}/custom may be left hehind.
|
||||
|
||||
Fixed a problem where a "make clobber" would remove custom/Makefile
|
||||
and fail to rebuilt it.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.12.2.3 to 2.12.2.4:
|
||||
|
||||
@@ -6731,8 +6769,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.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.16 $
|
||||
## @(#) $Id: CHANGES,v 30.16 2008/05/09 20:30:04 chongo Exp $
|
||||
## @(#) $Revision: 30.18 $
|
||||
## @(#) $Id: CHANGES,v 30.18 2008/10/24 09:55:12 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
|
||||
##
|
||||
## Under source code control: 1993/06/02 18:12:57
|
||||
|
34
Makefile
34
Makefile
@@ -23,7 +23,7 @@
|
||||
# READLINE_LIB= -lreadline
|
||||
# READLINE_EXTRAS= -lhistory -lncurses
|
||||
#
|
||||
# Copyright (C) 1999-2007 Landon Curt Noll
|
||||
# Copyright (C) 1999-2008 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
|
||||
@@ -39,8 +39,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
MAKEFILE_REV= $$Revision: 30.33 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.33 2008/05/09 20:30:04 chongo Exp $
|
||||
MAKEFILE_REV= $$Revision: 30.41 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.41 2008/10/24 09:20:09 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||
#
|
||||
# Under source code control: 1990/02/15 01:48:41
|
||||
@@ -598,6 +598,18 @@ INCDIR= /usr/include
|
||||
# by default is empty. If ${T} is non-empty, then installation
|
||||
# locations will be relative to the ${T} directory.
|
||||
#
|
||||
# NOTE: If you change LIBDIR to a non-standard location, you will need
|
||||
# to make changes to your execution environment so that executables
|
||||
# will search LIBDIR when they are resolving dynamic shared libraries.
|
||||
#
|
||||
# On OS X, this means you need to export $DYLD_LIBRARY_PATH
|
||||
# to include the LIBDIR path in the value.
|
||||
#
|
||||
# On Linux and BSD, this means you need to export $LD_LIBRARY_PATH
|
||||
# to include the LIBDIR path in the value.
|
||||
#
|
||||
# You might be better off not changing LIBDIR in the first place.
|
||||
#
|
||||
# For DJGPP, select:
|
||||
#
|
||||
# BINDIR= /dev/env/DJDIR/bin
|
||||
@@ -984,8 +996,8 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.3.2
|
||||
VERS= 2.12.3
|
||||
VERSION= 2.12.4.0
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
|
||||
@@ -1814,7 +1826,7 @@ CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \
|
||||
|
||||
# complete list of .o files
|
||||
#
|
||||
OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJS}
|
||||
OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJ}
|
||||
|
||||
# static library build
|
||||
#
|
||||
@@ -1913,6 +1925,9 @@ TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS}
|
||||
|
||||
all: ${BLD_TYPE} CHANGES
|
||||
|
||||
prep:
|
||||
${Q} ${MAKE} -f ${MAKE_FILE} all DEBUG='-g3'
|
||||
|
||||
calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} calc${EXT} \
|
||||
${SAMPLE_TARGETS} ${LATE_TARGETS}
|
||||
@@ -4043,9 +4058,6 @@ debug: env
|
||||
# make run
|
||||
# * only run calc interactively with the ${CALC_ENV} environment
|
||||
#
|
||||
# make cvd
|
||||
# * run the SGI WorkShop debugger on calc with the ${CALC_ENV} environment
|
||||
#
|
||||
# make dbx
|
||||
# * run the dbx debugger on calc with the ${CALC_ENV} environment
|
||||
#
|
||||
@@ -4057,9 +4069,6 @@ debug: env
|
||||
run:
|
||||
${CALC_ENV} ./calc${EXT}
|
||||
|
||||
cvd:
|
||||
${CALC_ENV} cvd ./calc${EXT}
|
||||
|
||||
dbx:
|
||||
${CALC_ENV} dbx ./calc${EXT}
|
||||
|
||||
@@ -4256,6 +4265,7 @@ clobber: custom/Makefile clean
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
${RM} -f Makefile.simple
|
||||
${RM} -f custom/Makefile
|
||||
-${MAKE} -f ${MAKE_FILE} custom/Makefile
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
${RM} -f .static .dynamic calc-dynamic-only calc-static-only
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
@@ -23,7 +23,7 @@
|
||||
# READLINE_LIB= -lreadline
|
||||
# READLINE_EXTRAS= -lhistory -lncurses
|
||||
#
|
||||
# Copyright (C) 1999-2007 Landon Curt Noll
|
||||
# Copyright (C) 1999-2008 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
|
||||
@@ -39,8 +39,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
MAKEFILE_REV= $$Revision: 30.33 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.33 2008/05/09 20:30:04 chongo Exp $
|
||||
MAKEFILE_REV= $$Revision: 30.41 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.41 2008/10/24 09:20:09 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||
#
|
||||
# Under source code control: 1990/02/15 01:48:41
|
||||
@@ -583,6 +583,18 @@ INCDIR= /usr/include
|
||||
# by default is empty. If ${T} is non-empty, then installation
|
||||
# locations will be relative to the ${T} directory.
|
||||
#
|
||||
# NOTE: If you change LIBDIR to a non-standard location, you will need
|
||||
# to make changes to your execution environment so that executables
|
||||
# will search LIBDIR when they are resolving dynamic shared libraries.
|
||||
#
|
||||
# On OS X, this means you need to export $DYLD_LIBRARY_PATH
|
||||
# to include the LIBDIR path in the value.
|
||||
#
|
||||
# On Linux and BSD, this means you need to export $LD_LIBRARY_PATH
|
||||
# to include the LIBDIR path in the value.
|
||||
#
|
||||
# You might be better off not changing LIBDIR in the first place.
|
||||
#
|
||||
# For DJGPP, select:
|
||||
#
|
||||
# BINDIR= /dev/env/DJDIR/bin
|
||||
@@ -961,8 +973,8 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.3.2
|
||||
VERS= 2.12.3
|
||||
VERSION= 2.12.4.0
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
|
||||
@@ -1462,7 +1474,7 @@ CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \
|
||||
|
||||
# complete list of .o files
|
||||
#
|
||||
OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJS}
|
||||
OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJ}
|
||||
|
||||
# static library build
|
||||
#
|
||||
@@ -1528,6 +1540,9 @@ TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS}
|
||||
|
||||
all: ${BLD_TYPE} CHANGES
|
||||
|
||||
prep:
|
||||
${Q} ${MAKE} -f ${MAKE_FILE} all DEBUG='-g3'
|
||||
|
||||
calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} calc${EXT} \
|
||||
${SAMPLE_TARGETS} ${LATE_TARGETS}
|
||||
@@ -3614,9 +3629,6 @@ debug: env
|
||||
# make run
|
||||
# * only run calc interactively with the ${CALC_ENV} environment
|
||||
#
|
||||
# make cvd
|
||||
# * run the SGI WorkShop debugger on calc with the ${CALC_ENV} environment
|
||||
#
|
||||
# make dbx
|
||||
# * run the dbx debugger on calc with the ${CALC_ENV} environment
|
||||
#
|
||||
@@ -3628,9 +3640,6 @@ debug: env
|
||||
run:
|
||||
${CALC_ENV} ./calc${EXT}
|
||||
|
||||
cvd:
|
||||
${CALC_ENV} cvd ./calc${EXT}
|
||||
|
||||
dbx:
|
||||
${CALC_ENV} dbx ./calc${EXT}
|
||||
|
||||
|
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: regress.cal,v 30.4 2008/02/24 07:41:49 chongo Exp $
|
||||
* @(#) $Revision: 30.5 $
|
||||
* @(#) $Id: regress.cal,v 30.5 2008/10/24 07:09:41 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:50:36
|
||||
@@ -2738,11 +2738,24 @@ define test_2600()
|
||||
vrfy(log(1e127) == 127,
|
||||
strcat(str(tnum++), ': log(1e127)) == 127'));
|
||||
vrfy(round(log(17^47),10) == 57.8310993048,
|
||||
strcat(str(tnum++),
|
||||
': round(log(17^47),10) == 57.8310993048'));
|
||||
strcat(str(tnum++),
|
||||
': round(log(17^47),10) == 57.8310993048'));
|
||||
vrfy(round(log(127),10) == 2.103803721,
|
||||
strcat(str(tnum++),
|
||||
': round(log(127),10) == 2.103803721'));
|
||||
strcat(str(tnum++),
|
||||
': round(log(127),10) == 2.103803721'));
|
||||
vrfy(round(log(0.25,0.00001),5) == -0.60206,
|
||||
strcat(str(tnum++),
|
||||
': round(log(0.25,0.00001),5) == -0.60206'));
|
||||
vrfy(round(log(0.25,1e-10),10) == -0.6020599913,
|
||||
strcat(str(tnum++),
|
||||
': round(log(0.25,1e-10),10) == -0.6020599913'));
|
||||
vrfy(round( log(1.2+1.2i,1e-5),5) == 0.2297+0.34109i,
|
||||
strcat(str(tnum++),
|
||||
': round(log(1.2+1.2i,1e-5),5) == 0.2297+0.34109i'));
|
||||
vrfy(round( log(1.2+1.2i,1e-10),10) == 0.2296962439+0.3410940885i,
|
||||
strcat(str(tnum++),
|
||||
': round(log(1.2+1.2i,1e-10),10) == ',
|
||||
'0.2296962439+0.3410940885i'));
|
||||
epsilon(i),;
|
||||
print tnum++: ': epsilon(i),;';
|
||||
|
||||
|
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.1 $
|
||||
* @(#) $Id: solve.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: solve.cal,v 30.2 2008/05/10 13:30:00 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/solve.cal,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:50:37
|
||||
@@ -47,7 +47,7 @@ define solve(low, high, epsilon)
|
||||
if (abs(flow) < epsilon)
|
||||
return low;
|
||||
fhigh = f(high);
|
||||
if (abs(flow) < epsilon)
|
||||
if (abs(fhigh) < epsilon)
|
||||
return high;
|
||||
if (sgn(flow) == sgn(fhigh))
|
||||
quit "Non-opposite signs";
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: comfunc.c,v 30.2 2007/07/11 23:05:49 chongo Exp $
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: comfunc.c,v 30.3 2008/10/24 07:09:41 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/comfunc.c,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:13
|
||||
@@ -556,7 +556,7 @@ c_log(COMPLEX *c, NUMBER *epsilon)
|
||||
if (cln_10_epsilon == NULL) {
|
||||
/* first time call */
|
||||
cln_10_epsilon = qcopy(epsilon);
|
||||
} else if (qcmp(cln_10_epsilon, epsilon) == FALSE) {
|
||||
} else if (qcmp(cln_10_epsilon, epsilon) == TRUE) {
|
||||
/* replaced cacheed value with epsilon arg */
|
||||
qfree(cln_10_epsilon);
|
||||
cln_10_epsilon = qcopy(epsilon);
|
||||
|
@@ -18,8 +18,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# @(#) $Revision: 30.17 $
|
||||
# @(#) $Id: Makefile.head,v 30.17 2008/04/15 20:50:07 chongo Exp $
|
||||
# @(#) $Revision: 30.20 $
|
||||
# @(#) $Id: Makefile.head,v 30.20 2008/10/23 00:13:44 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
|
||||
#
|
||||
# Under source code control: 1997/03/09 02:28:54
|
||||
@@ -366,8 +366,8 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.3.1
|
||||
VERS= 2.12.3
|
||||
VERSION= 2.12.4.0
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
|
||||
|
@@ -18,8 +18,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# @(#) $Revision: 30.17 $
|
||||
# @(#) $Id: Makefile.head,v 30.17 2008/04/15 20:50:07 chongo Exp $
|
||||
# @(#) $Revision: 30.20 $
|
||||
# @(#) $Id: Makefile.head,v 30.20 2008/10/23 00:13:44 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
|
||||
#
|
||||
# Under source code control: 1997/03/09 02:28:54
|
||||
@@ -366,8 +366,8 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.3.1
|
||||
VERS= 2.12.3
|
||||
VERSION= 2.12.4.0
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
|
||||
|
@@ -18,8 +18,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# @(#) $Revision: 30.17 $
|
||||
# @(#) $Id: Makefile.head,v 30.17 2008/04/15 20:50:07 chongo Exp $
|
||||
# @(#) $Revision: 30.20 $
|
||||
# @(#) $Id: Makefile.head,v 30.20 2008/10/23 00:13:44 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
|
||||
#
|
||||
# Under source code control: 1997/03/09 02:28:54
|
||||
@@ -351,8 +351,8 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.3.1
|
||||
VERS= 2.12.3
|
||||
VERSION= 2.12.4.0
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
|
||||
|
6
help/sgn
6
help/sgn
@@ -1,5 +1,5 @@
|
||||
NAME
|
||||
sign - indicator of sign of a real or complex number
|
||||
sgn - indicator of sign of a real or complex number
|
||||
|
||||
SYNOPSIS
|
||||
sgn(x)
|
||||
@@ -55,8 +55,8 @@ SEE ALSO
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: sgn,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Revision: 30.2 $
|
||||
## @(#) $Id: sgn,v 30.2 2008/05/10 13:23:57 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sgn,v $
|
||||
##
|
||||
## Under source code control: 1995/10/25 04:03:46
|
||||
|
@@ -224,6 +224,12 @@ Unexpected
|
||||
|
||||
and increments x three times.
|
||||
|
||||
In an other example, this expression:
|
||||
|
||||
1<<8/2
|
||||
|
||||
evalues to 128, not 16, because <<8 is performed before the /2.
|
||||
|
||||
|
||||
&A[0] and A are different things in calc
|
||||
========================================
|
||||
@@ -414,8 +420,8 @@ Unexpected
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.3 $
|
||||
## @(#) $Id: unexpected,v 30.3 2007/09/08 02:48:45 chongo Exp $
|
||||
## @(#) $Revision: 30.4 $
|
||||
## @(#) $Id: unexpected,v 30.4 2008/05/10 13:18:09 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/unexpected,v $
|
||||
##
|
||||
## Under source code control: 1997/03/21 13:15:18
|
||||
|
21
math_error.c
21
math_error.c
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.1 $
|
||||
* @(#) $Id: math_error.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: math_error.c,v 30.2 2008/10/24 09:49:20 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/math_error.c,v $
|
||||
*
|
||||
* Under source code control: 1994/08/03 05:08:22
|
||||
@@ -93,6 +93,8 @@ math_error(char *fmt, ...)
|
||||
* if we should longjmp, so do
|
||||
*/
|
||||
if (calc_use_matherr_jmpbuf != 0) {
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: longjmp calc_matherr_jmpbuf\n");
|
||||
longjmp(calc_matherr_jmpbuf, calc_use_matherr_jmpbuf);
|
||||
}
|
||||
|
||||
@@ -102,6 +104,21 @@ math_error(char *fmt, ...)
|
||||
(void) fflush(stdout);
|
||||
(void) fflush(stderr);
|
||||
fprintf(stderr, "%s\n\n", calc_err_msg);
|
||||
|
||||
/*
|
||||
* if interactive, return to main via longjmp()
|
||||
*/
|
||||
if (calc_use_scanerr_jmpbuf != 0) {
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: longjmp calc_scanerr_jmpbuf\n");
|
||||
longjmp(calc_scanerr_jmpbuf, calc_use_scanerr_jmpbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* exit
|
||||
*/
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: about to exit\n");
|
||||
libcalc_call_me_last();
|
||||
exit(40);
|
||||
}
|
||||
|
14
opcodes.c
14
opcodes.c
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: opcodes.c,v 30.2 2007/07/10 21:18:08 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: opcodes.c,v 30.4 2008/05/10 13:51:32 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/opcodes.c,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:19
|
||||
@@ -3120,8 +3120,18 @@ o_printresult(void)
|
||||
VALUE *vp;
|
||||
|
||||
vp = stack;
|
||||
|
||||
/* firewall */
|
||||
if (vp == NULL)
|
||||
return;
|
||||
|
||||
if (vp->v_type == V_ADDR)
|
||||
vp = vp->v_addr;
|
||||
|
||||
/* firewall */
|
||||
if (vp == NULL)
|
||||
return;
|
||||
|
||||
if (vp->v_type != V_NULL) {
|
||||
if (conf->tab_ok)
|
||||
math_chr('\t');
|
||||
|
6
qtrans.c
6
qtrans.c
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.1 $
|
||||
* @(#) $Id: qtrans.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: qtrans.c,v 30.2 2008/10/24 07:09:41 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/qtrans.c,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:22
|
||||
@@ -1062,7 +1062,7 @@ qlog(NUMBER *q, NUMBER *epsilon)
|
||||
if (ln_10_epsilon == NULL) {
|
||||
/* first time call */
|
||||
ln_10_epsilon = qcopy(epsilon);
|
||||
} else if (qcmp(ln_10_epsilon, epsilon) == FALSE) {
|
||||
} else if (qcmp(ln_10_epsilon, epsilon) == TRUE) {
|
||||
/* replaced cacheed value with epsilon arg */
|
||||
qfree(ln_10_epsilon);
|
||||
ln_10_epsilon = qcopy(epsilon);
|
||||
|
11
rpm.mk
11
rpm.mk
@@ -19,8 +19,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
MAKEFILE_REV= $$Revision: 30.4 $$
|
||||
# @(#) $Id: rpm.mk,v 30.4 2007/10/16 12:22:22 chongo Exp $
|
||||
MAKEFILE_REV= $$Revision: 30.5 $$
|
||||
# @(#) $Id: rpm.mk,v 30.5 2008/10/24 08:44:00 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/rpm.mk,v $
|
||||
#
|
||||
# Under source code control: 2003/02/16 20:21:39
|
||||
@@ -53,6 +53,7 @@ EGREP= egrep
|
||||
MKDIR= mkdir
|
||||
GREP= grep
|
||||
SORT= sort
|
||||
CHMOD= chmod
|
||||
|
||||
# rpm-related parameters
|
||||
#
|
||||
@@ -116,6 +117,12 @@ srcpkg: make_rhdir
|
||||
${EGREP} -v '/old[._-]|\.old$$|\.tar\.gz$$|/ver_calc$$' | \
|
||||
LANG=C ${SORT} | \
|
||||
${CPIO} -dumpv "$(TMPDIR)/$(PROJECT)"
|
||||
${RM} -f "$(TMPDIR)/$(PROJECT)/Makefile"
|
||||
${SED} -e 's/^CCWERR=[ ]*-Werror/CCWERR=/' \
|
||||
-e 's/^#.*CCWERR=.*-Werror$$/#/' \
|
||||
-e 's/^CHECK= check/CHECK= true/' \
|
||||
Makefile > "$(TMPDIR)/$(PROJECT)/Makefile"
|
||||
${CHMOD} 0444 "$(TMPDIR)/$(PROJECT)/Makefile"
|
||||
(cd "$(TMPDIR)"; ${TAR} cf - "$(PROJECT)") | \
|
||||
${BZIP2_PROG} --best -c -z > "$(RPMDIR)/SOURCES/$(TARBALL)"
|
||||
${RM} -fr "$(TMPDIR)/$(PROJECT)"
|
||||
|
8
value.c
8
value.c
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: value.c,v 30.3 2007/07/11 23:09:01 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: value.c,v 30.4 2008/05/10 13:44:28 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/value.c,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:25
|
||||
@@ -179,6 +179,10 @@ protecttodepth(VALUE *vp, int sts, int depth)
|
||||
void
|
||||
copyvalue(VALUE *oldvp, VALUE *newvp)
|
||||
{
|
||||
/* firewall */
|
||||
if (oldvp == NULL)
|
||||
return;
|
||||
|
||||
newvp->v_type = oldvp->v_type;
|
||||
if (oldvp->v_type >= 0) {
|
||||
switch (oldvp->v_type) {
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.8 $
|
||||
* @(#) $Id: version.c,v 30.8 2008/05/09 19:45:39 chongo Exp $
|
||||
* @(#) $Revision: 30.10 $
|
||||
* @(#) $Id: version.c,v 30.10 2008/10/24 09:55:12 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $
|
||||
*
|
||||
* Under source code control: 1990/05/22 11:00:58
|
||||
@@ -48,8 +48,8 @@ static char *program;
|
||||
|
||||
#define MAJOR_VER 2 /* major library version */
|
||||
#define MINOR_VER 12 /* minor library version */
|
||||
#define MAJOR_PATCH 3 /* major software level under library version */
|
||||
#define MINOR_PATCH 2 /* minor software level or 0 if not patched */
|
||||
#define MAJOR_PATCH 4 /* major software level under library version */
|
||||
#define MINOR_PATCH 0 /* minor software level or 0 if not patched */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user